@zyzgroup/core-web 0.1.92 → 0.1.94

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 (275) hide show
  1. package/dist/css/font.css +108 -0
  2. package/dist/css/theme.css +58 -53
  3. package/dist/zyzgroup_core_web.iife.js +115 -54
  4. package/dist/zyzgroup_core_web.iife.js.map +1 -1
  5. package/dist/zyzgroup_core_web.js +30456 -23273
  6. package/dist/zyzgroup_core_web.js.map +1 -1
  7. package/dist/zyzgroup_core_web.umd.cjs +115 -54
  8. package/dist/zyzgroup_core_web.umd.cjs.map +1 -1
  9. package/package.json +10 -2
  10. package/types/components/angular/demoAngular.d.ts +1 -0
  11. package/types/components/angular/demoAngular.d.ts.map +1 -0
  12. package/types/components/component-core.d.ts +7 -2
  13. package/types/components/component-core.d.ts.map +1 -1
  14. package/types/components/index.d.ts +1 -0
  15. package/types/components/index.d.ts.map +1 -1
  16. package/types/components/react/CatFriends.d.ts +2 -0
  17. package/types/components/react/CatFriends.d.ts.map +1 -0
  18. package/types/components/react/DemoForm.d.ts +2 -0
  19. package/types/components/react/DemoForm.d.ts.map +1 -0
  20. package/types/components/react/ErrorBoundary.d.ts +16 -0
  21. package/types/components/react/ErrorBoundary.d.ts.map +1 -0
  22. package/types/components/react/TravelPlan.d.ts +2 -0
  23. package/types/components/react/TravelPlan.d.ts.map +1 -0
  24. package/types/components/react/VideoPlayer.d.ts +5 -0
  25. package/types/components/react/VideoPlayer.d.ts.map +1 -0
  26. package/types/components/react/demoReact.d.ts +4 -0
  27. package/types/components/react/demoReact.d.ts.map +1 -0
  28. package/types/components/react/index.d.ts +2 -0
  29. package/types/components/react/index.d.ts.map +1 -0
  30. package/types/components/react/motion/Refresh.d.ts +4 -0
  31. package/types/components/react/motion/Refresh.d.ts.map +1 -0
  32. package/types/components/react/motion/demo/AddToBasket.d.ts +12 -0
  33. package/types/components/react/motion/demo/AddToBasket.d.ts.map +1 -0
  34. package/types/components/react/motion/demo/Cursor.d.ts +4 -0
  35. package/types/components/react/motion/demo/Cursor.d.ts.map +1 -0
  36. package/types/components/react/motion/demo/LayoutAnchor.d.ts +6 -0
  37. package/types/components/react/motion/demo/LayoutAnchor.d.ts.map +1 -0
  38. package/types/components/react/motion/demo/LayoutAnimation.d.ts +2 -0
  39. package/types/components/react/motion/demo/LayoutAnimation.d.ts.map +1 -0
  40. package/types/components/react/motion/demo/LayoutGroup.d.ts +2 -0
  41. package/types/components/react/motion/demo/LayoutGroup.d.ts.map +1 -0
  42. package/types/components/react/motion/demo/MotionDemo.d.ts +2 -0
  43. package/types/components/react/motion/demo/MotionDemo.d.ts.map +1 -0
  44. package/types/components/react/motion/demo/Navigation.d.ts +2 -0
  45. package/types/components/react/motion/demo/Navigation.d.ts.map +1 -0
  46. package/types/components/react/motion/demo/Reordering.d.ts +2 -0
  47. package/types/components/react/motion/demo/Reordering.d.ts.map +1 -0
  48. package/types/components/react/motion/demo/ScrollLinked.d.ts +2 -0
  49. package/types/components/react/motion/demo/ScrollLinked.d.ts.map +1 -0
  50. package/types/components/react/motion/demo/ScrollTriggered.d.ts +2 -0
  51. package/types/components/react/motion/demo/ScrollTriggered.d.ts.map +1 -0
  52. package/types/components/react/motion/demo/SharedLayoutAnimation.d.ts +2 -0
  53. package/types/components/react/motion/demo/SharedLayoutAnimation.d.ts.map +1 -0
  54. package/types/components/react/motion/demo/StateAnimations.d.ts +2 -0
  55. package/types/components/react/motion/demo/StateAnimations.d.ts.map +1 -0
  56. package/types/components/react/motion/demo/UseTransform.d.ts +2 -0
  57. package/types/components/react/motion/demo/UseTransform.d.ts.map +1 -0
  58. package/types/components/react/motion/index.d.ts +2 -0
  59. package/types/components/react/motion/index.d.ts.map +1 -0
  60. package/types/components/react/ssr/Html.d.ts +7 -0
  61. package/types/components/react/ssr/Html.d.ts.map +1 -0
  62. package/types/components/vue/demoVue.d.ts +16 -0
  63. package/types/components/vue/demoVue.d.ts.map +1 -0
  64. package/types/{hooks/useCookie.d.ts → createCookie.d.ts} +2 -2
  65. package/types/createCookie.d.ts.map +1 -0
  66. package/types/{hooks/useIndexDB.d.ts → createIndexDB.d.ts} +1 -1
  67. package/types/createIndexDB.d.ts.map +1 -0
  68. package/types/{hooks/useLocalStorage.d.ts → createLocalStorage.d.ts} +2 -2
  69. package/types/createLocalStorage.d.ts.map +1 -0
  70. package/types/{hooks/useSessionStorage.d.ts → createSessionStorage.d.ts} +2 -2
  71. package/types/createSessionStorage.d.ts.map +1 -0
  72. package/types/{hooks/useAttribute.d.ts → dom/attribute.d.ts} +3 -3
  73. package/types/dom/attribute.d.ts.map +1 -0
  74. package/types/dom/coords.d.ts +6 -0
  75. package/types/dom/coords.d.ts.map +1 -0
  76. package/types/{hooks/useElementEventBus.d.ts → dom/createElementEventBus.d.ts} +8 -8
  77. package/types/dom/createElementEventBus.d.ts.map +1 -0
  78. package/types/{hooks/useEventListener.d.ts → dom/createEventListener.d.ts} +7 -7
  79. package/types/dom/createEventListener.d.ts.map +1 -0
  80. package/types/dom/dataset.d.ts +7 -0
  81. package/types/dom/dataset.d.ts.map +1 -0
  82. package/types/{hooks/useElement.d.ts → dom/dom.d.ts} +8 -8
  83. package/types/dom/dom.d.ts.map +1 -0
  84. package/types/{hooks/useElementEvents.d.ts → dom/elementEvents.d.ts} +24 -84
  85. package/types/dom/elementEvents.d.ts.map +1 -0
  86. package/types/{hooks/useFeRouteChange.d.ts → dom/feRouteChange.d.ts} +6 -6
  87. package/types/dom/feRouteChange.d.ts.map +1 -0
  88. package/types/dom/index.d.ts +15 -0
  89. package/types/dom/index.d.ts.map +1 -1
  90. package/types/dom/intersection.d.ts +4 -0
  91. package/types/dom/intersection.d.ts.map +1 -0
  92. package/types/dom/matchMedia.d.ts +3 -0
  93. package/types/dom/matchMedia.d.ts.map +1 -0
  94. package/types/{hooks/useMutation.d.ts → dom/mutation.d.ts} +2 -2
  95. package/types/dom/mutation.d.ts.map +1 -0
  96. package/types/dom/resize.d.ts +9 -0
  97. package/types/dom/resize.d.ts.map +1 -0
  98. package/types/{hooks/useSafeArea.d.ts → dom/safeArea.d.ts} +2 -2
  99. package/types/dom/safeArea.d.ts.map +1 -0
  100. package/types/{hooks/useStyle.d.ts → dom/style.d.ts} +1 -1
  101. package/types/dom/style.d.ts.map +1 -0
  102. package/types/dom/visible.d.ts +7 -0
  103. package/types/dom/visible.d.ts.map +1 -0
  104. package/types/file.d.ts +0 -4
  105. package/types/file.d.ts.map +1 -1
  106. package/types/hooks/alimini/createAliMiniControllableState.d.ts +12 -0
  107. package/types/hooks/alimini/createAliMiniControllableState.d.ts.map +1 -0
  108. package/types/hooks/core/index.d.ts +3 -0
  109. package/types/hooks/core/index.d.ts.map +1 -0
  110. package/types/hooks/core/reduxStore.d.ts +30 -0
  111. package/types/hooks/core/reduxStore.d.ts.map +1 -0
  112. package/types/hooks/core/stateStore.d.ts +10 -0
  113. package/types/hooks/core/stateStore.d.ts.map +1 -0
  114. package/types/hooks/index.d.ts +3 -20
  115. package/types/hooks/index.d.ts.map +1 -1
  116. package/types/hooks/react/index.d.ts +5 -0
  117. package/types/hooks/react/index.d.ts.map +1 -0
  118. package/types/hooks/react/useAnimationLoop.d.ts +2 -0
  119. package/types/hooks/react/useAnimationLoop.d.ts.map +1 -0
  120. package/types/hooks/react/useAppState.d.ts +15 -0
  121. package/types/hooks/react/useAppState.d.ts.map +1 -0
  122. package/types/hooks/react/useDelayedValue.d.ts +2 -0
  123. package/types/hooks/react/useDelayedValue.d.ts.map +1 -0
  124. package/types/hooks/react/useDimensions.d.ts +5 -0
  125. package/types/hooks/react/useDimensions.d.ts.map +1 -0
  126. package/types/hooks/react/useDoublePress.d.ts +3 -0
  127. package/types/hooks/react/useDoublePress.d.ts.map +1 -0
  128. package/types/hooks/react/useFadeIn.d.ts +3 -0
  129. package/types/hooks/react/useFadeIn.d.ts.map +1 -0
  130. package/types/hooks/react/useFetch.d.ts +2 -0
  131. package/types/hooks/react/useFetch.d.ts.map +1 -0
  132. package/types/hooks/react/useFormInput.d.ts +5 -0
  133. package/types/hooks/react/useFormInput.d.ts.map +1 -0
  134. package/types/hooks/react/useImmer.d.ts +9 -0
  135. package/types/hooks/react/useImmer.d.ts.map +1 -0
  136. package/types/hooks/react/useMailbox.d.ts +4 -0
  137. package/types/hooks/react/useMailbox.d.ts.map +1 -0
  138. package/types/hooks/react/useMinDisplayTime.d.ts +2 -0
  139. package/types/hooks/react/useMinDisplayTime.d.ts.map +1 -0
  140. package/types/hooks/react/useOnlineStatus.d.ts +2 -0
  141. package/types/hooks/react/useOnlineStatus.d.ts.map +1 -0
  142. package/types/hooks/react/usePointerPosition.d.ts +5 -0
  143. package/types/hooks/react/usePointerPosition.d.ts.map +1 -0
  144. package/types/hooks/react/useProgressBar.d.ts +1 -0
  145. package/types/hooks/react/useProgressBar.d.ts.map +1 -0
  146. package/types/hooks/react/useQuery.d.ts +12 -0
  147. package/types/hooks/react/useQuery.d.ts.map +1 -0
  148. package/types/hooks/react/useReactControllableState.d.ts +10 -0
  149. package/types/hooks/react/useReactControllableState.d.ts.map +1 -0
  150. package/types/hooks/react/useTimeout.d.ts +2 -0
  151. package/types/hooks/react/useTimeout.d.ts.map +1 -0
  152. package/types/hooks/react/useTimer.d.ts +2 -0
  153. package/types/hooks/react/useTimer.d.ts.map +1 -0
  154. package/types/hooks/useDraw/DrawContext.d.ts +3 -3
  155. package/types/hooks/useDraw/DrawContext.d.ts.map +1 -1
  156. package/types/hooks/useDraw/Shape.d.ts +2 -2
  157. package/types/hooks/useDraw/Shape.d.ts.map +1 -1
  158. package/types/hooks/useDraw/line/Arc.d.ts +1 -1
  159. package/types/hooks/useDraw/line/Arc.d.ts.map +1 -1
  160. package/types/hooks/useDraw/line/CubicBezier.d.ts +1 -1
  161. package/types/hooks/useDraw/line/CubicBezier.d.ts.map +1 -1
  162. package/types/hooks/useDraw/line/L.d.ts +1 -1
  163. package/types/hooks/useDraw/line/L.d.ts.map +1 -1
  164. package/types/hooks/useDraw/line/PathD.d.ts +1 -1
  165. package/types/hooks/useDraw/line/PathD.d.ts.map +1 -1
  166. package/types/hooks/useDraw/line/QuadraticBezier.d.ts +1 -1
  167. package/types/hooks/useDraw/line/QuadraticBezier.d.ts.map +1 -1
  168. package/types/hooks/useDraw/shapes/ArrowShape.d.ts +1 -1
  169. package/types/hooks/useDraw/shapes/ArrowShape.d.ts.map +1 -1
  170. package/types/hooks/useDraw/shapes/BallShape.d.ts +1 -1
  171. package/types/hooks/useDraw/shapes/BallShape.d.ts.map +1 -1
  172. package/types/hooks/useDraw/shapes/CurveShape.d.ts +1 -1
  173. package/types/hooks/useDraw/shapes/CurveShape.d.ts.map +1 -1
  174. package/types/hooks/useDraw/shapes/EllipseShape.d.ts +1 -1
  175. package/types/hooks/useDraw/shapes/EllipseShape.d.ts.map +1 -1
  176. package/types/hooks/useDraw/shapes/FoxShape.d.ts +1 -1
  177. package/types/hooks/useDraw/shapes/FoxShape.d.ts.map +1 -1
  178. package/types/hooks/useDraw/shapes/HeartShape.d.ts +1 -1
  179. package/types/hooks/useDraw/shapes/HeartShape.d.ts.map +1 -1
  180. package/types/hooks/useDraw/shapes/HeartVariantShape.d.ts +1 -1
  181. package/types/hooks/useDraw/shapes/HeartVariantShape.d.ts.map +1 -1
  182. package/types/hooks/useDraw/shapes/LineShape.d.ts +1 -1
  183. package/types/hooks/useDraw/shapes/LineShape.d.ts.map +1 -1
  184. package/types/hooks/useDraw/shapes/PointsShape.d.ts +1 -1
  185. package/types/hooks/useDraw/shapes/PointsShape.d.ts.map +1 -1
  186. package/types/hooks/useDraw/shapes/RabbitShape.d.ts +1 -1
  187. package/types/hooks/useDraw/shapes/RabbitShape.d.ts.map +1 -1
  188. package/types/hooks/useDraw/shapes/RectShape.d.ts +1 -1
  189. package/types/hooks/useDraw/shapes/RectShape.d.ts.map +1 -1
  190. package/types/hooks/useDraw/shapes/RingShape.d.ts +1 -1
  191. package/types/hooks/useDraw/shapes/RingShape.d.ts.map +1 -1
  192. package/types/hooks/useDraw/shapes/StarShape.d.ts +1 -1
  193. package/types/hooks/useDraw/shapes/StarShape.d.ts.map +1 -1
  194. package/types/hooks/useDraw/shapes/TextShape.d.ts +1 -1
  195. package/types/hooks/useDraw/shapes/TextShape.d.ts.map +1 -1
  196. package/types/hooks/vue/index.d.ts +3 -0
  197. package/types/hooks/vue/index.d.ts.map +1 -0
  198. package/types/hooks/vue/useAppState.d.ts +13 -0
  199. package/types/hooks/vue/useAppState.d.ts.map +1 -0
  200. package/types/hooks/vue/useVueControllableState.d.ts +11 -0
  201. package/types/hooks/vue/useVueControllableState.d.ts.map +1 -0
  202. package/types/hooks/wxmini/createWxMiniControllableState.d.ts +12 -0
  203. package/types/hooks/wxmini/createWxMiniControllableState.d.ts.map +1 -0
  204. package/types/index.d.ts +6 -3
  205. package/types/index.d.ts.map +1 -1
  206. package/types/math/Shape.d.ts +4 -4
  207. package/types/math/Shape.d.ts.map +1 -1
  208. package/types/math/line/Arc.d.ts +2 -2
  209. package/types/math/line/Arc.d.ts.map +1 -1
  210. package/types/math/line/CubicBezier.d.ts +2 -2
  211. package/types/math/line/CubicBezier.d.ts.map +1 -1
  212. package/types/math/line/L.d.ts +2 -2
  213. package/types/math/line/L.d.ts.map +1 -1
  214. package/types/math/line/PathD.d.ts +6 -6
  215. package/types/math/line/PathD.d.ts.map +1 -1
  216. package/types/math/line/QuadraticBezier.d.ts +2 -2
  217. package/types/math/line/QuadraticBezier.d.ts.map +1 -1
  218. package/types/math/shapes/Light3D.d.ts +2 -2
  219. package/types/math/shapes/Light3D.d.ts.map +1 -1
  220. package/types/math/shapes/Point3D.d.ts +2 -2
  221. package/types/math/shapes/Point3D.d.ts.map +1 -1
  222. package/types/math/shapes/Point3Ds.d.ts +2 -2
  223. package/types/math/shapes/Point3Ds.d.ts.map +1 -1
  224. package/types/motion.d.ts +7 -0
  225. package/types/motion.d.ts.map +1 -0
  226. package/types/{hooks/useServiceWorker.d.ts → serviceWorker.d.ts} +1 -1
  227. package/types/serviceWorker.d.ts.map +1 -0
  228. package/types/svg/SVGParse.d.ts +1 -1
  229. package/types/svg/SVGParse.d.ts.map +1 -1
  230. package/types/svg/SVGUtil.d.ts.map +1 -0
  231. package/types/svg/index.d.ts +2 -1
  232. package/types/svg/index.d.ts.map +1 -1
  233. package/types/{hooks/useTheme.d.ts → theme.d.ts} +13 -14
  234. package/types/theme.d.ts.map +1 -0
  235. package/types/Context.d.ts +0 -33
  236. package/types/Context.d.ts.map +0 -1
  237. package/types/env.d.ts +0 -23
  238. package/types/env.d.ts.map +0 -1
  239. package/types/hooks/useAttribute.d.ts.map +0 -1
  240. package/types/hooks/useCookie.d.ts.map +0 -1
  241. package/types/hooks/useCoords.d.ts +0 -6
  242. package/types/hooks/useCoords.d.ts.map +0 -1
  243. package/types/hooks/useDataset.d.ts +0 -4
  244. package/types/hooks/useDataset.d.ts.map +0 -1
  245. package/types/hooks/useDraw/svg/SVGParse.d.ts +0 -16
  246. package/types/hooks/useDraw/svg/SVGParse.d.ts.map +0 -1
  247. package/types/hooks/useDraw/svg/SVGUtil.d.ts.map +0 -1
  248. package/types/hooks/useDraw/svg/index.d.ts +0 -4
  249. package/types/hooks/useDraw/svg/index.d.ts.map +0 -1
  250. package/types/hooks/useDraw/svg/line2c.d.ts +0 -5
  251. package/types/hooks/useDraw/svg/line2c.d.ts.map +0 -1
  252. package/types/hooks/useElement.d.ts.map +0 -1
  253. package/types/hooks/useElementEventBus.d.ts.map +0 -1
  254. package/types/hooks/useElementEvents.d.ts.map +0 -1
  255. package/types/hooks/useEventListener.d.ts.map +0 -1
  256. package/types/hooks/useFeRouteChange.d.ts.map +0 -1
  257. package/types/hooks/useIndexDB.d.ts.map +0 -1
  258. package/types/hooks/useIntersection.d.ts +0 -4
  259. package/types/hooks/useIntersection.d.ts.map +0 -1
  260. package/types/hooks/useLocalStorage.d.ts.map +0 -1
  261. package/types/hooks/useMatchMedia.d.ts +0 -3
  262. package/types/hooks/useMatchMedia.d.ts.map +0 -1
  263. package/types/hooks/useMutation.d.ts.map +0 -1
  264. package/types/hooks/useResize.d.ts +0 -9
  265. package/types/hooks/useResize.d.ts.map +0 -1
  266. package/types/hooks/useSafeArea.d.ts.map +0 -1
  267. package/types/hooks/useServiceWorker.d.ts.map +0 -1
  268. package/types/hooks/useSessionStorage.d.ts.map +0 -1
  269. package/types/hooks/useStyle.d.ts.map +0 -1
  270. package/types/hooks/useTheme.d.ts.map +0 -1
  271. package/types/hooks/useVisible.d.ts +0 -10
  272. package/types/hooks/useVisible.d.ts.map +0 -1
  273. package/types/svg/DOMSVGUtil.d.ts +0 -20
  274. package/types/svg/DOMSVGUtil.d.ts.map +0 -1
  275. /package/types/{hooks/useDraw/svg → svg}/SVGUtil.d.ts +0 -0
@@ -1,4 +1,34 @@
1
- var ZYZGroupCoreWeb=function(g){"use strict";const Jf=Function("return this")();function Kf(){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||this||Jf}const tt=Kf(),ri=typeof process=="object"&&process?process:{env:{NODE_ENV:"",terminal:""},argv:[],execPath:"",platform:""};({...ri.env});const ic="@YZ/";function Zf(s,t=ic){return s.startsWith(t)}function oc(s,t=ic){return Zf(s,t)?s:`${t}${s}`}function ac(s){return typeof s=="string"&&s.startsWith("Symbol(")&&s.endsWith(")")}function cc(s){return ac(s)&&(s=s.slice(7,-1)),s}function ii(s){return s=cc(s),s=oc(s),typeof Symbol=="function"?Symbol(s):`Symbol(${s})`}const Qf=ii("META");function hc(s){if(!ac(s))return s;switch(s=cc(s),s){case oc("META"):return Qf;default:return ii(s)}}function oi(s){if(Array.isArray(s))return s.map(oi);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():oi(n)}return t}return typeof s=="symbol"?s.toString():s}function ai(s){if(Array.isArray(s))return s.map(ai);if(s&&typeof s=="object"){const t={};for(const e of Object.keys(s))t[hc(e)]=ai(s[e]);return t}return hc(s)}function lc(s){return JSON.stringify(oi(s))}function uc(s){return ai(JSON.parse(s))}const fc=NaN,td=Symbol("NO_VALUE"),zs={immediate:0,high:100,normal:200,low:300,idle:400};var ye=(s=>(s[s["text/plain"]=0]="text/plain",s[s["text/html"]=1]="text/html",s[s["text/xml"]=2]="text/xml",s[s["text/css"]=3]="text/css",s[s["image/jpeg"]=4]="image/jpeg",s[s["image/png"]=5]="image/png",s[s["image/gif"]=6]="image/gif",s[s["image/bmp"]=7]="image/bmp",s[s["image/webp"]=8]="image/webp",s[s["image/svg+xml"]=9]="image/svg+xml",s[s["image/x-icon"]=10]="image/x-icon",s[s["image/vnd.microsoft.icon"]=11]="image/vnd.microsoft.icon",s[s["image/octet-stream"]=12]="image/octet-stream",s[s["audio/mpeg"]=13]="audio/mpeg",s[s["video/mp4"]=14]="video/mp4",s[s["audio/ogg"]=15]="audio/ogg",s[s["audio/wav"]=16]="audio/wav",s[s["audio/midi"]=17]="audio/midi",s[s["video/webm"]=18]="video/webm",s[s["video/ogg"]=19]="video/ogg",s[s["application/octet-stream"]=20]="application/octet-stream",s[s["application/javascript"]=21]="application/javascript",s[s["application/ecmascript"]=22]="application/ecmascript",s[s["application/json"]=23]="application/json",s[s["application/xml"]=24]="application/xml",s[s["application/xhtml+xml"]=25]="application/xhtml+xml",s[s["application/x-www-form-urlencoded"]=26]="application/x-www-form-urlencoded",s[s["application/msword"]=27]="application/msword",s[s["application/x-csv"]=28]="application/x-csv",s[s["application/vnb.ms-excel"]=29]="application/vnb.ms-excel",s[s["application/vnb.mspowerpoint"]=30]="application/vnb.mspowerpoint",s[s["application/pdf"]=31]="application/pdf",s[s["application/zip"]=32]="application/zip",s[s["application/x-gtar"]=33]="application/x-gtar",s[s["application/x-gzip"]=34]="application/x-gzip",s[s["appliaction/vnd.ms-fontobject"]=35]="appliaction/vnd.ms-fontobject",s[s["aplication/font-sfnt"]=36]="aplication/font-sfnt",s[s["aplication/pkcs12"]=37]="aplication/pkcs12",s))(ye||{}),ie=(s=>(s[s.text=0]="text",s[s.dataURL=1]="dataURL",s[s.binaryString=2]="binaryString",s[s.arraybuffer=3]="arraybuffer",s))(ie||{});const Ns={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"};var nt={};/**
1
+ var ZYZGroupCoreWeb=function(w){"use strict";function Pb(n,t){for(var e=0;e<t.length;e++){const s=t[e];if(typeof s!="string"&&!Array.isArray(s)){for(const i in s)if(i!=="default"&&!(i in n)){const r=Object.getOwnPropertyDescriptor(s,i);r&&Object.defineProperty(n,i,r.get?r:{enumerable:!0,get:()=>s[i]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}const Ab=Function("return this")();function Mb(){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,s=typeof self=="object"&&self&&self.Object===Object&&self;return n||t||e||s||this||Ab}const tt=Mb(),ac={env:{NODE_ENV:"",terminal:""},argv:[],execPath:"",platform:"",versions:{node:void 0,bun:void 0},...typeof process=="object"&&process?process:{}};({...ac.env});const Zf="@YZ/";function Db(n,t=Zf){return n.startsWith(t)}function Rb(n,t=Zf){return Db(n,t)?n:`${t}${n}`}function Ob(n){return typeof n=="string"&&n.startsWith("Symbol(")&&n.endsWith(")")}function Ib(n){return Ob(n)&&(n=n.slice(7,-1)),n}function kb(n){return n=Ib(n),n=Rb(n),typeof Symbol=="function"?Symbol(n):`Symbol(${n})`}kb("META");const cc=NaN,Lb=Symbol("NO_VALUE"),zr={immediate:0,high:100,normal:200,low:300,idle:400};function Fr(n){return"dispatch"in n}var Ze=(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))(Ze||{}),Re=(n=>(n[n.text=0]="text",n[n.dataURL=1]="dataURL",n[n.binaryString=2]="binaryString",n[n.arraybuffer=3]="arraybuffer",n))(Re||{});const Br={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"},jr=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(jr("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
+ [\u{FA0E}\u{FA0F}\u{FA11}\u{FA13}\u{FA14}\u{FA1F}\u{FA21}\u{FA23}\u{FA24}\u{FA27}-\u{FA29}]
3
+ |[\u{4E00}-\u{9FCC}]
4
+ |[\u{3400}-\u{4DB5}]
5
+ |[\u{20000}-\u{2A6D6}]
6
+ |[\u{2A700}-\u{2B734}]
7
+ |[\u{2B740}-\u{2B81D}]
8
+ |[\u{2B820}-\u{2CEAF}]
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},dn=(n,t)=>(typeof n=="string"&&(n=jr(n)||new RegExp(n)),n.test(t)),Qf=(n,t)=>{typeof n=="string"&&(n=jr(n)||new RegExp(n));const e=t.match(n);return e?n.flags.toLowerCase().indexOf("g")>=0?e.map(s=>({matchIndex:-1,fullMatch:s,groupMatchs:[]})):{matchIndex:typeof e.index=="number"?e.index:-1,fullMatch:e[0],groupMatchs:e.slice(1)}:null},td=(n,t)=>{typeof n=="string"&&(n=jr(n)||new RegExp(n));const e=[],s=t.matchAll(n);for(const i of s)e.push({matchIndex:typeof i.index=="number"?i.index:-1,fullMatch:i[0],groupMatchs:i.slice(1)});return e};function Vb(n){const t=n.match(/[\s\S]/gu);return t?t.length:0}function ed(n,t){const e=n.codePointAt(t);return e?String.fromCodePoint(e):void 0}const Nb="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghijklmnopqrstuvwxyz0123456789",zb="0123456789";function nd(n=12,t=Nb){let e="";for(let s=0;s<n;s++)e+=t[Math.floor(Math.random()*t.length)];return e}function Fb(n=12){return nd(n,zb)}function Bb(n){return n.replace(/(^\w)/g,t=>t.toLowerCase())}const qt=(n,t="-")=>{let e=n.replace(new RegExp("[_-]?([A-Z])","g"),t+"$1").toLowerCase();const s=new RegExp(`^${t}`);return s.test(n)||(e=e.replace(s,"")),e};function jb(n){return n.replace(/(^\w|[_-]\w)/g,t=>t.slice(-1).toUpperCase())}function sd(n){return Bb(jb(n))}function id(n){let t="";for(let e=0,s=n.length;e<s;e++){const i=n.charCodeAt(e);i>=1&&i<=127?t+=n.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 $b(){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 Ns=(n,t=16)=>{let e=n.toLowerCase();const s=e.indexOf("0b")==0,i=e.indexOf("0o")==0,r=e.indexOf("0x")==0;(s||i||r)&&(e=e.slice(2)),s&&(t=2),i&&(t=8),r&&(t=16);const o=parseInt(e,t);if(Number.isNaN(o)||e.length==0)throw new Error(`radixStringToNumber(${n}, ${t}) 无法解析!`);return o};function hc(n,t){let e=t?.type;const s=t?.mime,i=t?.encode;if(!e&&s)switch(i){case Br.utf8:case Br["utf-8"]:e=`${s};charset=${i}`;break;case Br.base64:e=`${s};${i}`;break;default:e=`${s}`;break}return new Blob([n],{type:e})}function Ub(n){let t=Ze["text/plain"];switch(new DataView(n).getUint32(0,$b()).toString(16).toUpperCase()){case"FFD8FFDB":t=Ze["image/jpeg"];break;case"FFD8FFE0":case"FFD8FFE1":case"FFD8FFE2":case"FFD8FFE3":t=Ze["image/jpeg"];break;case"89504E47":t=Ze["image/png"];break;case"47494638":t=Ze["image/gif"];break;case"52494646":t=Ze["image/webp"];break;case"25504446":t=Ze["application/pdf"];break;case"504B0304":t=Ze["application/zip"];break}return t}const Yb="[object Undefined]",Gb="[object Null]",Xb="[object Boolean]",Wb="[object Number]",Hb="[object BigInt]",qb="[object String]",Kb="[object Symbol]",Jb="[object Function]",Zb="[object GeneratorFunction]",Qb="[object Array]";function uc(n){return Object.prototype.toString.call(n)}function tw(n){const t=uc(n);return t===Yb||t===Gb||t===Xb||t===Wb||t===qb||t===Kb||t===Hb}function rd(n){const t=uc(n);return t==Jb||t==Zb}function od(n){if(!hd(n))return!1;const t=/[\\^$.*+?()[\]{}|]/g,e=/^\[object .+?Constructor\]$/,s=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(t,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return(rd(n)?s:e).test(ow(n))}function ew(n,t){return n?.[t]}function ad(n,t){const e=ew(n,t);return od(e)?e:void 0}ad(tt,"Map"),ad(tt,"WeakMap");function cd(n){return uc(n)===Qb}function hd(n){const t=typeof n;return!!n&&(t=="object"||t=="function")}function us(n){return!!n&&typeof n=="object"}function $r(n){return us(n)&&!cd(n)}const ud=n=>{for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t))return!1;return!0};function nw(n){return typeof Promise<"u"&&n instanceof Promise||hd(n)&&typeof n.then=="function"&&typeof n.catch=="function"}function sw(n){const t=[];for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&t.push(e);return t}function zs(n,t,e=!0){if($r(n)&&$r(t))for(const s of sw(t))(e||typeof n[s]>"u")&&($r(n[s])&&$r(t[s])?zs(n[s],t[s],e):n[s]=t[s]);return n}function iw(n,...t){return new n.constructor(...t)}function rw(n,t){return n===t||n!==n&&t!==t}function ow(n){if(n!=null){try{return Function.prototype.toString.call(n)}catch{}try{return""+n}catch{}}return""}function aw(n,t){let e;return typeof t=="string"?e=t.split("."):e=t,e.reduce((s,i)=>s!=null&&s!=null?s[i]:s,n)}function mn(n,t){try{return aw(n,t)}catch{return}}function lc(n,t,e){if(!n||!t)return n;let s;typeof t=="string"?s=t.split("."):s=t;let i=n;for(let r=0,o=s.length-1;r<o;r++){const a=s[r];(!(a in i)||typeof i[a]!="object"||i[a]===null)&&(i[a]=Number.isNaN(Number(s[r+1]))?{}:[]),i=i[a]}return i[s[s.length-1]]=e,n}function bi(n){return n!=null}function cw(n){return bi(n)&&n!==Lb&&n!==cc}function hw(n){return typeof n=="number"&&!Number.isNaN(n)}const uw=2**31-1;function Oe(n,t){const e=parseFloat(n);return Number.isNaN(e)?typeof t=="number"?t:NaN:e}const lw=n=>typeof n=="number"&&n>=0&&Number.isFinite(n),fw=n=>lw(n)&&n>0,pn=n=>fw(n)&&n===Math.floor(n),fc=n=>n===1/0||pn(n);function dc(n=1e-6){return function(t,e){return Math.abs(t-e)<n}}function rt(n,t,e){const s=Math.min(t,e),i=Math.max(t,e);return n<s?s:n>i?i:n}function dw(n,t){return(n%t+t)%t}function Ur(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 mw(n,t,e){const s=Math.max(n.length,t.length),i=new Array(s);for(let r=0;r<s;r++)i[r]=Ur(n[r],t[r],e);return i}function pw(n,t,e){return s=>{const i=rt(s,n,t);return e==0?i:t-i<e?t:Math.round(i/e)*e}}function gw(n,t=2){return Oe(n,0).toFixed(t)}function at(n,t=2){return+gw(n,t)}function mc(n,t){const e=Qf("number-single",String(n));return{hasNumber:!!e,number:e&&!Array.isArray(e)&&e.fullMatch?parseFloat(e.fullMatch):cw(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 ld(n){const t=Qf("number",n);return t?Array.isArray(t)?t.map(e=>Number(e.fullMatch)):[Number(t.fullMatch)]:[]}function fd(n,t){for(let e=0,s=n.length;e<s;e++)if(n[e]==t)return!0;return!1}function yw(n=[],t=[]){const e=n.length,s=t.length;for(let r=0;r<s;r++)n[r]=t[r];let i=Math.max(0,e-s);for(;i>0;)n.pop(),i--;return n}function dd(n,t){const e=n.findIndex(s=>s===t);return e>=0&&n.splice(e,1),n}function vw(n,...t){return t.forEach(e=>{fd(n,e)||n.push(e)}),n}class Yr extends Array{constructor(t){super(t),this.fill(0)}}const md=n=>pn(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?Yr:null:null;function Gr(n,t){let e=n.length;for(;e--;)if(rw(n[e][0],t))return e;return-1}function kt(){return(typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date).now()}function Fs(n=new Date){return n.getTime()}function bw(n=new Date,t="yyyy-mm-dd hh:ii:ss.SSS"){return Tw(n,t)}function ww(n){const t=n.valueOf();return!Number.isNaN(t)}function xw(n,t=3,e=":"){const s=Math.max(n.length,6);let i="";for(let o=0;o<s-4;o++)i+=n[o]||"0";const r=[i,""+(n[s-4]||"0")+(n[s-3]||"0"),""+(n[s-2]||"0")+(n[s-1]||"0")];switch(t){case 1:return r[0];case 2:return r[0]+e+r[1];case 3:return r[0]+e+r[1]+e+r[2]}}function Sw(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 s=0;for(let i=0;i<t-4;i++)s=s*10+(n[i]||0);return e+=s*60*60,Math.floor(Math.max(0,e))}function _w(n,t=!1){let e=0;if(typeof n=="number"?e=n:e=Sw(n),e<=0)return[0,0,0,0,0,0];const s=[],i=e%60;s.unshift(i%10),s.unshift(Math.floor(i/10)),e=Math.floor(e/60);const r=e%60;if(s.unshift(r%10),s.unshift(Math.floor(r/10)),e=Math.floor(e/60),t){const o=e%100;for(s.unshift(o%10),s.unshift(Math.floor(o/10)),e=Math.floor(e/100);e;)s.unshift(e%10),e=Math.floor(e/10)}else{const o=e%24;s.unshift(o%10),s.unshift(Math.floor(o/10))}return s}function Ew(n,t=1,e=!1){return n[n.length-1]+=t,_w(n,e)}function Tw(n,t="yyyy-mm-dd hh:ii:ss"){if(!ww(n))return"";const e=/(y+)/.exec(t);if(e&&e[1]){const i=e[1];t=t.replace(i,(n.getFullYear()+"").substring(4-i.length))}const s={"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 i in s){const r=new RegExp("("+i+")").exec(t);if(r&&r[1]){const o=r[1];t=t.replace(o,o.length===1?""+s[i]:("00"+s[i]).slice(-o.length))}}return t}const pd=()=>{};function Cw(...n){return n.length===0?(...t)=>t:n.length===1?n[0]:n.reduce((t,e)=>(...s)=>t(e(...s)))}function Pw(n=0,t){const e=t?.min??300,s=t?.max??6e4,i=t?.exponent??2,r=t?.factor??.5;let o=e*Math.pow(i,n);if(r){const a=Math.random(),c=Math.floor(a*r*o);o=Math.floor(a*10)&1?o+c:o-c}return Math.min(o,s)|0}function Aw(n,t={}){if(typeof n!="function")throw new TypeError("Expected a function");const e=function(...s){const i=t?.thisArg||this,r=t?.cacheKeyResolver?t.cacheKeyResolver.apply(i,s):s[0],o=e.cache;if(o.has(r))return o.get(r);const a=n.apply(i,s);return a instanceof Promise&&a.catch(()=>o.delete(r)),e.cache=o.set(r,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 Mw(){let n,t;return{promise:new Promise((e,s)=>{n=e,t=s}),resolve:n,reject:t}}function ls(n,t=e=>console.error(e)){try{const e=n();return nw(e)?Promise.resolve(e).catch(s=>{t(s)}):e}catch(e){t(e)}}const Dw=2147483647;function gd(n,t,e){if(typeof t!="number"||t<=0)return n;let s;const i=new Promise((r,o)=>{s=setTimeout((a,c)=>{a(new Error(c||`Timeout of ${t}ms!`))},Math.min(t,Dw),o,e)});return Promise.race([n,i]).finally(()=>{s!==void 0&&(clearTimeout(s),s=void 0)})}function Rw(n,t,e){if(!t)return n;const s=e||"Aborted!";return t.aborted?Promise.reject(new Error(s)):new Promise((i,r)=>{const o=()=>{r(new Error(s))};t.addEventListener("abort",o,{once:!0}),n.finally(()=>{t.removeEventListener("abort",o)}),n.then(i,r)})}class Ow{__data__=[];size=0;constructor(t){t=t||[];const e=t.length;let s=-1;for(;++s<e;){const i=t[s];this.set(i[0],i[1])}}set(t,e){const s=this.__data__,i=Gr(s,t);return i<0?(++this.size,s.push([t,e])):s[i][1]=e,this}get(t){const e=this.__data__,s=Gr(e,t);return s<0?void 0:e[s][1]}has(t){return Gr(this.__data__,t)>-1}delete(t){const e=this.__data__,s=Gr(e,t);if(s<0)return!1;const i=e.length-1;return s==i?e.pop():Array.prototype.splice.call(e,s,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 Iw=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,yd=new Set,kw=(n,t,e,s)=>{typeof ac.emitWarning=="function"?ac.emitWarning(n,t,e,s):console.error(`[${e}] ${t}: ${n}`)},Lw=n=>!yd.has(n);class Bs{heap;length;static#a=!1;static create(t){const e=md(t);if(!e)return[];Bs.#a=!0;const s=new Bs(t,e);return Bs.#a=!1,s}constructor(t,e){if(!Bs.#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 pc{#a;#l;#g;#D;#y;#L;#V;#v;get perf(){return this.#v}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#i;#b;#s;#n;#t;#h;#f;#c;#r;#w;#o;#x;#S;#d;#m;#_;#A;#u;#N;static unsafeExposeInternals(t){return{starts:t.#S,ttls:t.#d,autopurgeTimers:t.#m,sizes:t.#x,keyMap:t.#s,keyList:t.#n,valList:t.#t,next:t.#h,prev:t.#f,get head(){return t.#c},get tail(){return t.#r},free:t.#w,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,s,i,r)=>t.#B(e,s,i,r),moveToTail:e=>t.#k(e),indexes:e=>t.#E(e),rindexes:e=>t.#T(e),isStale:e=>t.#p(e)}}get max(){return this.#a}get maxSize(){return this.#l}get calculatedSize(){return this.#b}get size(){return this.#i}get fetchMethod(){return this.#L}get memoMethod(){return this.#V}get dispose(){return this.#g}get onInsert(){return this.#D}get disposeAfter(){return this.#y}constructor(t){const{max:e=0,ttl:s,ttlResolution:i=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:c,dispose:h,onInsert:u,disposeAfter:l,noDisposeOnSet:f,noUpdateTTL:d,maxSize:p=0,maxEntrySize:m=0,sizeCalculation:y,fetchMethod:g,memoMethod:v,noDeleteOnFetchRejection:x,noDeleteOnStaleGet:b,allowStaleOnFetchRejection:E,allowStaleOnFetchAbort:_,ignoreFetchAbort:D,perf:V}=t;if(V!==void 0&&typeof V?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#v=V??Iw,e!==0&&!pn(e))throw new TypeError("max option must be a nonnegative integer");const O=e?md(e):Array;if(!O)throw new Error("invalid max value: "+e);if(this.#a=e,this.#l=p,this.maxEntrySize=m||this.#l,this.sizeCalculation=y,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(v!==void 0&&typeof v!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#V=v,g!==void 0&&typeof g!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#L=g,this.#A=!!g,this.#s=new Map,this.#n=Array.from({length:e}).fill(void 0),this.#t=Array.from({length:e}).fill(void 0),this.#h=new O(e),this.#f=new O(e),this.#c=0,this.#r=0,this.#w=Bs.create(e),this.#i=0,this.#b=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.#_=!!this.#g,this.#N=!!this.#D,this.#u=!!this.#y,this.noDisposeOnSet=!!f,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!x,this.allowStaleOnFetchRejection=!!E,this.allowStaleOnFetchAbort=!!_,this.ignoreFetchAbort=!!D,this.maxEntrySize!==0){if(this.#l!==0&&!pn(this.#l))throw new TypeError("maxSize must be a positive integer if specified");if(!pn(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#H()}if(this.allowStale=!!c,this.noDeleteOnStaleGet=!!b,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=pn(i)||i===0?i:1,this.ttlAutopurge=!!r,this.ttl=s||0,this.ttl){if(!pn(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#j()}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 N="LRU_CACHE_UNBOUNDED";Lw(N)&&(yd.add(N),kw("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",N,pc))}}getRemainingTTL(t){return this.#s.has(t)?1/0:0}#j(){const t=new Yr(this.#a),e=new Yr(this.#a);this.#d=t,this.#S=e;const s=this.ttlAutopurge?Array.from({length:this.#a}):void 0;this.#m=s,this.#$=(a,c,h=this.#v.now())=>{e[a]=c!==0?h:0,t[a]=c,i(a,c)},this.#R=a=>{e[a]=t[a]!==0?this.#v.now():0,i(a,t[a])};const i=this.ttlAutopurge?(a,c)=>{if(s?.[a]&&(clearTimeout(s[a]),s[a]=void 0),c&&c!==0&&s){const h=setTimeout(()=>{this.#p(a)&&this.#C(this.#n[a],"expire")},c+1);h.unref&&h.unref(),s[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=r||o();const l=a.now-u;a.remainingTTL=h-l}};let r=0;const o=()=>{const a=this.#v.now();if(this.ttlResolution>0){r=a;const c=setTimeout(()=>r=0,this.ttlResolution);c.unref&&c.unref()}return a};this.getRemainingTTL=a=>{const c=this.#s.get(a);if(c===void 0)return 0;const h=t[c],u=e[c];if(!h||!u)return 1/0;const l=(r||o())-u;return h-l},this.#p=a=>{const c=e[a],h=t[a];return!!h&&!!c&&(r||o())-c>h}}#R=()=>{};#P=()=>{};#$=()=>{};#p=()=>!1;#H(){const t=new Yr(this.#a);this.#b=0,this.#x=t,this.#O=e=>{this.#b-=t[e],t[e]=0},this.#U=(e,s,i,r)=>{if(this.#e(s))return 0;if(!pn(i))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(i=r(s,e),!pn(i))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 i||0},this.#z=(e,s,i)=>{if(t[e]=s,this.#l){const r=this.#l-t[e];for(;this.#b>r;)this.#F(!0)}this.#b+=t[e],i&&(i.entrySize=s,i.totalCalculatedSize=this.#b)}}#O=t=>{};#z=(t,e,s)=>{};#U=(t,e,s,i)=>{if(s||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#E({allowStale:t=this.allowStale}={}){if(this.#i)for(let e=this.#r;this.#Y(e)&&((t||!this.#p(e))&&(yield e),e!==this.#c);)e=this.#f[e]}*#T({allowStale:t=this.allowStale}={}){if(this.#i)for(let e=this.#c;this.#Y(e)&&((t||!this.#p(e))&&(yield e),e!==this.#r);)e=this.#h[e]}#Y(t){return t!==void 0&&this.#s.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.#T())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.#T()){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.#T())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 s of this.#E()){const i=this.#t[s],r=this.#e(i)?i.__staleWhileFetching:i;if(r!==void 0&&t(r,this.#n[s],this))return this.#I(this.#n[s],e)}}forEach(t,e=this){for(const s of this.#E()){const i=this.#t[s],r=this.#e(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#n[s],this)}}rforEach(t,e=this){for(const s of this.#T()){const i=this.#t[s],r=this.#e(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#n[s],this)}}purgeStale(){let t=!1;for(const e of this.#T({allowStale:!0}))this.#p(e)&&(this.#C(this.#n[e],"expire"),t=!0);return t}info(t){const e=this.#s.get(t);if(e===void 0)return;const s=this.#t[e],i=this.#e(s)?s.__staleWhileFetching:s;if(i===void 0)return;const r={value:i};if(this.#d&&this.#S){const o=this.#d[e],a=this.#S[e];if(o&&a){const c=o-(this.#v.now()-a);r.ttl=c,r.start=Date.now()}}return this.#x&&(r.size=this.#x[e]),r}dump(){const t=[];for(const e of this.#E({allowStale:!0})){const s=this.#n[e],i=this.#t[e],r=this.#e(i)?i.__staleWhileFetching:i;if(r===void 0||s===void 0)continue;const o={value:r};if(this.#d&&this.#S){o.ttl=this.#d[e];const a=this.#v.now()-this.#S[e];o.start=Math.floor(Date.now()-a)}this.#x&&(o.size=this.#x[e]),t.unshift([s,o])}return t}load(t){this.clear();for(const[e,s]of t){if(s.start){const i=Date.now()-s.start;s.start=this.#v.now()-i}this.#M(e,s.value,s)}}set(t,e,s={}){const{status:i=void 0}=s;return s.status=i,i&&(i.op="set",i.key=t,e!==void 0&&(i.value=e)),this.#M(t,e,s)}#M(t,e,s={}){const{ttl:i=this.ttl,start:r,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:c}=s;if(e===void 0)return c&&(c.set="deleted"),this.delete(t),this;let{noUpdateTTL:h=this.noUpdateTTL}=s;c&&!this.#e(e)&&(c.value=e);const u=this.#U(t,e,s.size||0,a,c);if(this.maxEntrySize&&u>this.maxEntrySize)return this.#C(t,"set"),c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this;let l=this.#i===0?void 0:this.#s.get(t);if(l===void 0)l=this.#i===0?this.#r:this.#w.length!==0?this.#w.pop():this.#i===this.#a?this.#F(!1):this.#i,this.#n[l]=t,this.#t[l]=e,this.#s.set(t,l),this.#h[this.#r]=l,this.#f[l]=this.#r,this.#r=l,this.#i++,this.#z(l,u,c),c&&(c.set="add"),h=!1,this.#N&&this.#D?.(e,t,"add");else{this.#k(l);const f=this.#t[l];if(e!==f){if(this.#A&&this.#e(f)){f.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:d}=f;d!==void 0&&!o&&(this.#_&&this.#g?.(d,t,"set"),this.#u&&this.#o?.push([d,t,"set"]))}else o||(this.#_&&this.#g?.(f,t,"set"),this.#u&&this.#o?.push([f,t,"set"]));if(this.#O(l),this.#z(l,u,c),this.#t[l]=e,c){c.set="replace";const d=f&&this.#e(f)?f.__staleWhileFetching:f;d!==void 0&&(c.oldValue=d)}}else c&&(c.set="update");this.#N&&this.onInsert?.(e,t,e===f?"update":"replace")}if(i!==0&&!this.#d&&this.#j(),this.#d&&(h||this.#$(l,i,r),c&&this.#P(c,l)),!o&&this.#u&&this.#o){const f=this.#o;let d;for(;d=f?.shift();)this.#y?.(...d)}return this}pop(){try{for(;this.#i;){const t=this.#t[this.#c];if(this.#F(!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)}}}#F(t){const e=this.#c,s=this.#n[e],i=this.#t[e];return this.#A&&this.#e(i)?i.__abortController.abort(new Error("evicted")):(this.#_||this.#u)&&(this.#_&&this.#g?.(i,s,"evict"),this.#u&&this.#o?.push([i,s,"evict"])),this.#O(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.#w.push(e)),this.#i===1?(this.#c=this.#r=0,this.#w.length=0):this.#c=this.#h[e],this.#s.delete(s),this.#i--,e}has(t,e={}){const{status:s=void 0}=e;return e.status=s,s&&(s.op="has",s.key=t),this.#q(t,e)}#q(t,e={}){const{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=e,r=this.#s.get(t);if(r!==void 0){const o=this.#t[r];if(this.#e(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#p(r))i&&(i.has="stale",this.#P(i,r));else return s&&this.#R(r),i&&(i.has="hit",this.#P(i,r)),!0}else i&&(i.has="miss");return!1}peek(t,e={}){const{status:s=void 0}=e;return s&&(s.op="peek",s.key=t),e.status=s,this.#K(t,e)}#K(t,e){const{status:s,allowStale:i=this.allowStale}=e,r=this.#s.get(t);if(r===void 0||!i&&this.#p(r)){s&&(s.peek=r===void 0?"miss":"stale");return}const o=this.#t[r],a=this.#e(o)?o.__staleWhileFetching:o;return s&&(a!==void 0?(s.peek="hit",s.value=a):s.peek="miss"),a}#B(t,e,s,i){const r=e===void 0?void 0:this.#t[e];if(this.#e(r))return r;const o=new AbortController,{signal:a}=s;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});const c={signal:o.signal,options:s,context:i},h=(m,y=!1)=>{const{aborted:g}=o.signal,v=s.ignoreFetchAbort&&m!==void 0,x=s.ignoreFetchAbort||!!(s.allowStaleOnFetchAbort&&m!==void 0);if(s.status&&(g&&!y?(s.status.fetchAborted=!0,s.status.fetchError=o.signal.reason,v&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),g&&!v&&!y)return l(o.signal.reason,x);const b=d,E=this.#t[e];return(E===d||E===void 0&&v&&y)&&(m===void 0?b.__staleWhileFetching!==void 0?this.#t[e]=b.__staleWhileFetching:this.#C(t,"fetch"):(s.status&&(s.status.fetchUpdated=!0),this.#M(t,m,c.options))),m},u=m=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=m),l(m,!1)),l=(m,y)=>{const{aborted:g}=o.signal,v=g&&s.allowStaleOnFetchAbort,x=v||s.allowStaleOnFetchRejection,b=x||s.noDeleteOnFetchRejection,E=d;if(this.#t[e]===d&&(!b||!y&&E.__staleWhileFetching===void 0?this.#C(t,"fetch"):v||(this.#t[e]=E.__staleWhileFetching)),x)return s.status&&E.__staleWhileFetching!==void 0&&(s.status.returnedStale=!0),E.__staleWhileFetching;if(E.__returned===E)throw m},f=(m,y)=>{const g=this.#L?.(t,r,c);g&&g instanceof Promise&&g.then(v=>m(v===void 0?void 0:v),y),o.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(m(void 0),s.allowStaleOnFetchAbort&&(m=v=>h(v,!0)))})};s.status&&(s.status.fetchDispatched=!0);const d=new Promise(f).then(h,u),p=Object.assign(d,{__abortController:o,__staleWhileFetching:r,__returned:void 0});return e===void 0?(this.#M(t,p,{...c.options,status:void 0}),e=this.#s.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:s=void 0}=e;return e.status=s,s&&e.context&&(s.context=e.context),this.#G(t,e)}async#G(t,e={}){const{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=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:f=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:m,forceRefresh:y=!1,status:g,signal:v}=e;if(g&&(g.op="fetch",g.key=t,y&&(g.forceRefresh=!0)),!this.#A)return g&&(g.fetch="get"),this.#I(t,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,status:g});const x={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,ttl:o,noDisposeOnSet:a,size:c,sizeCalculation:h,noUpdateTTL:u,noDeleteOnFetchRejection:l,allowStaleOnFetchRejection:f,allowStaleOnFetchAbort:p,ignoreFetchAbort:d,status:g,signal:v},b=this.#s.get(t);if(b===void 0){g&&(g.fetch="miss");const E=this.#B(t,b,x,m);return E.__returned=E}else{const E=this.#t[b];if(this.#e(E)){const O=s&&E.__staleWhileFetching!==void 0;return g&&(g.fetch="inflight",O&&(g.returnedStale=!0)),O?E.__staleWhileFetching:E.__returned=E}const _=this.#p(b);if(!y&&!_)return g&&(g.fetch="hit"),this.#k(b),i&&this.#R(b),g&&this.#P(g,b),E;const D=this.#B(t,b,x,m),V=D.__staleWhileFetching!==void 0&&s;return g&&(g.fetch=_?"stale":"refresh",V&&_&&(g.returnedStale=!0)),V?D.__staleWhileFetching:D.__returned=D}}forceFetch(t,e={}){const{status:s=void 0}=e;return e.status=s,s&&e.context&&(s.context=e.context),this.#J(t,e)}async#J(t,e={}){const s=await this.#G(t,e);if(s===void 0)throw new Error("fetch() returned undefined");return s}memo(t,e={}){const{status:s=void 0}=e;e.status=s,s&&(s.op="memo",s.key=t,e.context&&(s.context=e.context));const i=this.#Z(t,e);return s&&(s.value=i),i}#Z(t,e={}){const s=this.#V;if(!s)throw new Error("no memoMethod provided to constructor");const{context:i,status:r,forceRefresh:o,...a}=e;r&&o&&(r.forceRefresh=!0);const c=this.#I(t,a),h=o||c===void 0;if(r&&(r.memo=h?"miss":"hit",h||(r.value=c)),!h)return c;const u=s(t,c,{options:a,context:i});return r&&(r.value=u),this.#M(t,u,a),u}get(t,e={}){const{status:s=void 0}=e;e.status=s,s&&(s.op="get",s.key=t);const i=this.#I(t,e);return s&&i!==void 0&&(s.value=i),i}#I(t,e={}){const{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:o}=e,a=this.#s.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"),s&&c.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),c.__staleWhileFetching):void 0):(r||this.#C(t,"expire"),o&&(o.get="stale"),s?(o&&(o.returnedStale=!0),c):void 0):(o&&(o.get=h?"fetching":"hit"),this.#k(a),i&&this.#R(a),h?c.__staleWhileFetching:c)}#X(t,e){this.#f[e]=t,this.#h[t]=e}#k(t){t!==this.#r&&(t===this.#c?this.#c=this.#h[t]:this.#X(this.#f[t],this.#h[t]),this.#X(this.#r,t),this.#r=t)}delete(t){return this.#C(t,"delete")}#C(t,e){let s=!1;if(this.#i!==0){const i=this.#s.get(t);if(i!==void 0)if(this.#m?.[i]&&(clearTimeout(this.#m?.[i]),this.#m[i]=void 0),s=!0,this.#i===1)this.#W(e);else{this.#O(i);const r=this.#t[i];if(this.#e(r)?r.__abortController.abort(new Error("deleted")):(this.#_||this.#u)&&(this.#_&&this.#g?.(r,t,e),this.#u&&this.#o?.push([r,t,e])),this.#s.delete(t),this.#n[i]=void 0,this.#t[i]=void 0,i===this.#r)this.#r=this.#f[i];else if(i===this.#c)this.#c=this.#h[i];else{const o=this.#f[i];this.#h[o]=this.#h[i];const a=this.#h[i];this.#f[a]=this.#f[i]}this.#i--,this.#w.push(i)}}if(this.#u&&this.#o?.length){const i=this.#o;let r;for(;r=i?.shift();)this.#y?.(...r)}return s}clear(){return this.#W("delete")}#W(t){for(const e of this.#T({allowStale:!0})){const s=this.#t[e];if(this.#e(s))s.__abortController.abort(new Error("deleted"));else{const i=this.#n[e];this.#_&&this.#g?.(s,i,t),this.#u&&this.#o?.push([s,i,t])}}if(this.#s.clear(),this.#t.fill(void 0),this.#n.fill(void 0),this.#d&&this.#S){this.#d.fill(0),this.#S.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.#r=0,this.#w.length=0,this.#b=0,this.#i=0,this.#u&&this.#o){const e=this.#o;let s;for(;s=e?.shift();)this.#y?.(...s)}}}class gc{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:s=!1,checkAgeOnGet:i=!1,updateAgeOnHas:r=!1,checkAgeOnHas:o=!1,noUpdateTTL:a=!1,dispose:c,noDisposeOnSet:h=!1}={},u=new Map){if(t!==void 0&&!fc(t))throw new TypeError("ttl must be positive integer or Infinity if set");if(!fc(e))throw new TypeError("max must be positive integer or Infinity");if(this.data=u,this.ttl=t,this.max=e,this.updateAgeOnGet=!!s,this.checkAgeOnGet=!!i,this.updateAgeOnHas=!!r,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,f,d)=>{};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 s=setTimeout(()=>{this.timer=void 0,this.timerExpiration=void 0,this.purgeStale();for(const i in this.expirations){const r=Number(i);this.setTimer(r,r-kt());break}},Math.min(uw,Math.max(0,e)));s.unref&&s.unref(),this.timerExpiration=t,this.timer=s}cancelTimer(){this.timer&&(clearTimeout(this.timer),this.timerExpiration=void 0,this.timer=void 0)}clear(){const t=this.dispose!==gc.prototype.dispose?[...this]:[];this.data.clear(),this.expirationMap.clear(),this.cancelTimer(),this.expirations=Object.create(null);for(const[e,s]of t)this.dispose(s,e,"delete")}setTTL(t,e=this.ttl){const s=this.expirationMap.get(t);if(s!==void 0){const i=this.expirations[s];!i||i.length<=1?delete this.expirations[s]:this.expirations[s]=i.filter(r=>r!==t)}if(e&&e!==1/0){this.immortalKeys.delete(t);const i=Math.floor(kt()+e);this.expirationMap.set(t,i),this.expirations[i]||(this.expirations[i]=[],this.setTimer(i,e)),this.expirations[i].push(t)}else this.immortalKeys.add(t),this.expirationMap.set(t,1/0)}set(t,e,{ttl:s=this.ttl,noUpdateTTL:i=this.noUpdateTTL,noDisposeOnSet:r=this.noDisposeOnSet}={}){if(!fc(s))throw new TypeError("ttl must be positive integer or Infinity");if(this.expirationMap.has(t)){i||this.setTTL(t,s);const o=this.data.get(t),a=!r&&this.data.has(t);o!==e&&(this.data.set(t,e),a&&this.dispose(o,t,"set"))}else this.setTTL(t,s),this.data.set(t,e);for(;this.size>this.max;)this.purgeToCapacity();return this}has(t,{checkAgeOnHas:e=this.checkAgeOnHas,ttl:s=this.ttl,updateAgeOnHas:i=this.updateAgeOnHas}={}){return this.data.has(t)?e&&this.getRemainingTTL(t)===0?(this.delete(t),!1):(i&&this.setTTL(t,s),!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-kt())):0}get(t,{updateAgeOnGet:e=this.updateAgeOnGet,ttl:s=this.ttl,checkAgeOnGet:i=this.checkAgeOnGet}={}){const r=this.data.get(t);if(i&&this.getRemainingTTL(t)===0){this.delete(t);return}return e&&this.setTTL(t,s),r}delete(t){const e=this.expirationMap.get(t);if(e!==void 0){const s=this.data.get(t);this.data.delete(t),this.expirationMap.delete(t),this.immortalKeys.delete(t);const i=this.expirations[e];return i&&(i.length<=1?delete this.expirations[e]:this.expirations[e]=i.filter(r=>r!==t)),this.dispose(s,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 s=[];for(const i of e)s.push([i,this.data.get(i)]),this.data.delete(i),this.expirationMap.delete(i);for(const[i,r]of s)this.dispose(r,i,"evict")}else{const s=this.size-this.max,i=[];for(const r of e.splice(0,s))i.push([r,this.data.get(r)]),this.data.delete(r),this.expirationMap.delete(r);for(const[r,o]of i)this.dispose(o,r,"evict")}}}purgeStale(){const t=Math.ceil(kt());for(const e in this.expirations){if(e==="Infinity"||Number(e)>t)return;const s=[...this.expirations[e]||[]],i=[];delete this.expirations[e];for(const r of s)i.push([r,this.data.get(r)]),this.data.delete(r),this.expirationMap.delete(r);for(const[r,o]of i)this.dispose(o,r,"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 fs={branch:"├",lastBranch:"└",line:"│",empty:" "};function Xr(n,t={}){const{showValues:e=!0,hideFunctions:s=!1,lineBreak:i=`\r
11
+ `,maxDeep:r}=t,o=[],a=new WeakSet;function c(u,l="",f=0){if(typeof u=="string"){o.push(l+'"'+u+'"');return}if(typeof u!="object"||u===null){e&&o.push(l+String(u));return}if(r&&f>=r){Array.isArray(n)?o.push("[...OverMaxDeep]"):o.push("{...OverMaxDeep}");return}if(a.has(u)){o.push(l+"[Circular]");return}a.add(u);const d=Object.keys(u).filter(p=>!(s&&typeof u[p]=="function"));d.forEach((p,m)=>{const y=u[p],g=m===d.length-1,v=f===0&&m===0?"":l,x=g?fs.lastBranch:fs.branch,b=p.trim()===""?"":p;let E=v+x+(b?" "+b:"");const _=p.trim()!=="";if(y&&typeof y=="object"&&a.has(y))o.push(E+(_?": ":E?" ":"")+"[Circular]");else if(y&&typeof y=="object"&&!Array.isArray(y)){o.push(E);const D=g?fs.empty:fs.line,V=v+D+" ";c(y,V,f+1)}else if(Array.isArray(y)){o.push(E+(_?": ":E?" ":"")+"[Array("+y.length+")]");const D=g?fs.empty:fs.line,V=v+D+" ";c(y,V,f+1)}else if(e){const D=typeof y=="function"?"[Function]":typeof y=="string"?'"'+String(y)+'"':String(y);E+=(_?": ":E?" ":"")+D,o.push(E)}else o.push(E)})}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=fs.lastBranch,f=n[u],d=typeof f=="function"?"[Function]":typeof f=="string"?'"'+f+'"':String(f);return l+" "+d}return c(n),i+o.join(i)}function vd(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 Vw(n="verbose"){tt.OPEN_LOG_LEVEL=vd(n)}function bd(){tt.OPEN_LOG_LEVEL=-1}function Nw(n){tt.LOG_UPLOAD_FN=n}bd();function wi(n="verbose"){return tt.OPEN_LOG_LEVEL<=vd(n)}function yc(n){tt.LOG_UPLOAD_FN&&tt.LOG_UPLOAD_FN(n)}function zn(n,t=""){try{if(yc({level:"info",msg:n,type:t}),!wi("info"))return;console.log(n)}catch{}}function Ie(n,t=""){try{if(yc({level:"warn",msg:n,type:t}),!wi("warn"))return;console.warn(n)}catch{}}function zw(n,t=""){try{if(yc({level:"error",msg:n,type:t}),!wi("error"))return;console.error(n)}catch{}}const wd={start:n=>{wi("verbose")&&(!console||typeof console!="object"||typeof console.groupCollapsed!="function"||console.groupCollapsed(n))},end:()=>{!console||typeof console!="object"||typeof console.groupEnd!="function"||console.groupEnd()}},xd={start:n=>{wi("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 Wr(n){if(typeof MessageChannel<"u"&&(od(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 Fw(){return new Promise(n=>{Wr(n)})}if(tt.requestAnimationFrame=tt.requestAnimationFrame||tt.webkitRequestAnimationFrame||tt.mozRequestAnimationFrame||tt.oRequestAnimationFrame||tt.msRequestAnimationFrame,tt.cancelAnimationFrame=tt.cancelAnimationFrame||tt.webkitCancelAnimationFrame||tt.mozCancelAnimationFrame||tt.oCancelAnimationFrame||tt.msCancelAnimationFrame,!tt.requestAnimationFrame){let n=kt();tt.requestAnimationFrame=t=>{const e=kt(),s=Math.max(0,16-(e-n)),i=tt.setTimeout(()=>{t(e+s)},s);return n=e+s,i}}tt.cancelAnimationFrame||(tt.cancelAnimationFrame=n=>{tt.clearTimeout(n)});const Hr=tt.requestAnimationFrame,Bw=tt.cancelAnimationFrame;function jw(n){let t=!0,e=Hr(function s(i){t&&n(i)&&(e=Hr(s))});return()=>{t=!1,Bw(e)}}tt.requestIdleCallback=tt.requestIdleCallback||function(n,t){const e=kt();return setTimeout(()=>{const s=kt()-e,i={didTimeout:typeof t?.timeout!="number"?!1:s>t.timeout,timeRemaining:()=>Math.max(0,50-s)};n(i)},t?.timeout)},tt.cancelIdleCallback=tt.cancelIdleCallback||function(n){clearTimeout(n)},tt.requestIdleCallback,tt.cancelIdleCallback;let xi=33,gn=33,qr=0,Si=0,vc=!1;function Sd(n){vc||(vc=!0,Hr(t=>{vc=!1,qr=t,Si===0&&(Si=qr+gn);let e=gn+qr-Si;e<gn&&xi<gn?(e<8&&(e=8),gn=Math.max(e,xi)):e>gn&&xi>gn&&(gn=Math.min(e,xi)),xi=e,Si=qr+gn,Wr(()=>{n(Si),Sd(n)})}))}function bc(n){const t=n?.maxIterations||1e4,e=!!n?.tracing,s=n?.onTrace||(d=>{const p=" ".repeat(d.depth);console.log(`${p}emit#${d.id} parent=${d.parentId} source=${d.source}`)}),i=[];let r=0,o=0;const a=new Set,c=d=>(a.add(d),()=>{a.delete(d)});let h;function u(d,p){const m=h,y={id:String(++r),dataset:d,source:p,createdAt:kt(),parentId:m?.id,depth:m?m.depth+1:0};i.push(y)}let l=!1;function f(){if(l)return;l=!0;let d=0;try{for(;o<i.length;){if(++d>t)throw new Error("Possible infinite signal loop detected");const p=i[o],m=h;h=p,e&&s(p);const y=Array.from(a);for(const g of y)try{g(...p.dataset)}catch(v){Wr(()=>{throw v})}h=m,o++}}finally{l=!1,o>=i.length&&(i.length=0,o=0)}}return{subscribe:c,once(d){const p=c((...m)=>{p(),d(...m)});return p},emit(...d){u(d),f()},emitFrom(d,...p){u(p,d),f()},clear(){a.clear()}}}function $w(n={}){const{concurrency:t=1/0,maxWorkerRunTime:e=6e4}=n;let s=1/0;const i=()=>s===1/0||kt()<s,r=O=>{s=kt()+O,h()};let o=i()?0:1;const a=()=>o>0,c=()=>{o++},h=()=>{o>0&&o--,D()},u=()=>!a()&&!i(),l=async()=>{u()&&await Fw()};let f=0,d=[];const p=new Set,m=new Set;let y=0,g=[],v=[];const x=()=>{y===0&&(g.forEach(O=>O()),g=[],d.length===0&&(v.forEach(O=>O()),v=[]))},b=O=>{if(O.signal){if(O.signal.aborted)return O.resultReject("Cancel by Aborted!"),O;O.abortHandler=()=>{O.resultReject("Cancel by Abort!"),d=d.filter(N=>N.id!==O.id),x()},O.signal.addEventListener("abort",O.abortHandler,{once:!0})}if(d.filter(N=>O.invalidates?.includes(N.id)).forEach(N=>{N.resultReject("Cancel by invalidates!")}),d=d.filter(N=>!O.invalidates?.includes(N.id)),O.fold){const N=d.findIndex(U=>U.id===O.id);if(N!==-1){const U=d[N],Y=O.fold(U,O);return U.dataset=Y.dataset,U}else return d.push(O),O}else return d.push(O),O},E=()=>{if(d.length===0)return;let O=-1,N;for(let U=0,Y=d.length;U<Y;U++){const st=d[U];(!N||st.niceness<N.niceness)&&(O=U,N=st)}return d.splice(O,1),N};let _=!1;const D=()=>{_||a()||(_=!0,Wr(()=>{for(_=!1;d.length>0&&m.size>0&&y<t&&!a();){const O=E(),N=hw(O.deadline)&&kt()>=O.deadline,U=O.niceness==zr.immediate;if(!i()&&!N&&!U){b(O),D();break}if(O.signal?.aborted){O.resultReject("Cancel by Aborted!"),x();continue}y++;const Y=m.values().next().value;m.delete(Y),Rw(gd(Promise.resolve(Y(...O.dataset)),e),O.signal).then(st=>{O.resultResolve(st)}).catch(st=>{O.retry>0?(O.retry--,b(O)):O.resultReject(st)}).finally(async()=>{p.has(Y)&&m.add(Y),O.signal&&O.abortHandler&&O.signal.removeEventListener("abort",O.abortHandler),y--,x(),D()})}}))},V=O=>(p.add(O),m.add(O),D(),()=>{p.delete(O),m.delete(O)});return{put(...O){const N=O[O.length-1]||{};let U={};("niceness"in N||"deadline"in N||"retry"in N||"signal"in N||"invalidates"in N||"fold"in N)&&(U=O.pop());const Y=Mw(),st=b({id:String(++f),dataset:O,createdAt:kt(),result:Y.promise,resultResolve:Y.resolve,resultReject:Y.reject,niceness:U.niceness??zr.normal,deadline:U.deadline??cc,retry:U.retry??0,signal:U.signal});return D(),st},cancel(O){d=d.filter(N=>N.id!==O.id),O.signal&&O.abortHandler&&O.signal.removeEventListener("abort",O.abortHandler),x()},clear(){for(const O of d)O.signal&&O.abortHandler&&O.signal.removeEventListener("abort",O.abortHandler),O.resultReject(new Error("Cleared"));d.length=0,x()},run:V,once(O){const N=V((...U)=>{try{return O(...U)}finally{N()}});return N},async onDrain(){if(!(y===0&&d.length===0))return new Promise(O=>{v.push(O)})},async onIdle(){if(y!==0)return new Promise(O=>{g.push(O)})},pause:c,resume:h,get paused(){return a()},startFrame:r,yieldIfNeeded:l}}class Uw{pool;concurrency;maxWorkerRunTime;constructor(t={concurrency:1}){this.concurrency=t.concurrency??1,this.maxWorkerRunTime=t.maxWorkerRunTime??6e4,this.pool=$w({concurrency:this.concurrency,maxWorkerRunTime:this.maxWorkerRunTime});for(let e=0;e<this.concurrency;e++)this.pool.run(async function(s){return await s()})}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 gd(Promise.resolve(t()),this.maxWorkerRunTime)}finally{this.pool.resume()}}asap(t,e){return this.pool.put(t,{niceness:e?.niceness??zr.normal,deadline:typeof e?.timeout=="number"?kt()+e?.timeout:cc})}}class Yw{pool;started=!1;constructor(t={concurrency:1}){this.pool=new Uw(t),this.pool.startFrame(0)}clear(){this.pool.clear()}start(){this.started||(this.started=!0,Sd(t=>{this.pool.startFrame(t-kt())}))}async idle(t,e){return this.start(),await this.pool.asap(t,{niceness:zr.idle,timeout:e}).result}}const _d=new Yw,Gw=_d.idle.bind(_d);class wc{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,s){return this.events[t]||(this.events[t]=[]),this.events[t].unshift(s?e.bind(s):e),this}addListener(t,e,s){return this.events[t]||(this.events[t]=[]),this.events[t].push(s?e.bind(s):e),this}on(t,e,s){return this.addListener(t,e,s),this}removeListener(t,e){return this.events[t]&&(this.events[t]=this.events[t].filter(s=>s!==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(s=>{s(...e)}),this}once(t,e,s){const i=(...r)=>{s?e.apply(s,r):e(...r),this.off(t,i)};return this.on(t,i),this}}var xc=function(n,t){return xc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,s){e.__proto__=s}||function(e,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])},xc(n,t)};function Sc(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");xc(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function Ed(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],s=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&s>=n.length&&(n=void 0),{value:n&&n[s++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function _c(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var s=e.call(n),i,r=[],o;try{for(;(t===void 0||t-- >0)&&!(i=s.next()).done;)r.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(e=s.return)&&e.call(s)}finally{if(o)throw o.error}}return r}function Ec(n,t,e){if(e||arguments.length===2)for(var s=0,i=t.length,r;s<i;s++)(r||!(s in t))&&(r||(r=Array.prototype.slice.call(t,0,s)),r[s]=t[s]);return n.concat(r||Array.prototype.slice.call(t))}function yn(n){return typeof n=="function"}function Xw(n){var t=function(s){Error.call(s),s.stack=new Error().stack},e=n(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var Tc=Xw(function(n){return function(t){n(this),this.message=t?t.length+` errors occurred during unsubscription:
12
+ `+t.map(function(e,s){return s+1+") "+e.toString()}).join(`
13
+ `):"",this.name="UnsubscriptionError",this.errors=t}});function Td(n,t){if(n){var e=n.indexOf(t);0<=e&&n.splice(e,1)}}var Cc=function(){function n(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var t,e,s,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=Ed(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(yn(u))try{u()}catch(m){r=m instanceof Tc?m.errors:[m]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var f=Ed(l),d=f.next();!d.done;d=f.next()){var p=d.value;try{Pd(p)}catch(m){r=r??[],m instanceof Tc?r=Ec(Ec([],_c(r)),_c(m.errors)):r.push(m)}}}catch(m){s={error:m}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(s)throw s.error}}}if(r)throw new Tc(r)}},n.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Pd(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)&&Td(e,t)},n.prototype.remove=function(t){var e=this._finalizers;e&&Td(e,t),t instanceof n&&t._removeParent(this)},n.EMPTY=function(){var t=new n;return t.closed=!0,t}(),n}();Cc.EMPTY;function Cd(n){return n instanceof Cc||n&&"closed"in n&&yn(n.remove)&&yn(n.add)&&yn(n.unsubscribe)}function Pd(n){yn(n)?n():n.unsubscribe()}var Ad={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Ww={setTimeout:function(n,t){for(var e=[],s=2;s<arguments.length;s++)e[s-2]=arguments[s];return setTimeout.apply(void 0,Ec([n,t],_c(e)))},clearTimeout:function(n){return clearTimeout(n)},delegate:void 0};function Hw(n){Ww.setTimeout(function(){throw n})}function Md(){}function qw(n){n()}var Pc=function(n){Sc(t,n);function t(e){var s=n.call(this)||this;return s.isStopped=!1,e?(s.destination=e,Cd(e)&&e.add(s)):s.destination=Qw,s}return t.create=function(e,s,i){return new Mc(e,s,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,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}(Cc),Kw=Function.prototype.bind;function Ac(n,t){return Kw.call(n,t)}var Jw=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(s){Kr(s)}},n.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(s){Kr(s)}else Kr(t)},n.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){Kr(e)}},n}(),Mc=function(n){Sc(t,n);function t(e,s,i){var r=n.call(this)||this,o;if(yn(e)||!e)o={next:e??void 0,error:s??void 0,complete:i??void 0};else{var a;r&&Ad.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return r.unsubscribe()},o={next:e.next&&Ac(e.next,a),error:e.error&&Ac(e.error,a),complete:e.complete&&Ac(e.complete,a)}):o=e}return r.destination=new Jw(o),r}return t}(Pc);function Kr(n){Hw(n)}function Zw(n){throw n}var Qw={closed:!0,next:Md,error:Zw,complete:Md},tx=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function ex(n){return n}function nx(n){return n.length===0?ex:n.length===1?n[0]:function(t){return n.reduce(function(e,s){return s(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,s){var i=this,r=ix(t)?t:new Mc(t,e,s);return qw(function(){var o=i,a=o.operator,c=o.source;r.add(a?a.call(r,c):c?i._subscribe(r):i._trySubscribe(r))}),r},n.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},n.prototype.forEach=function(t,e){var s=this;return e=Dd(e),new e(function(i,r){var o=new Mc({next:function(a){try{t(a)}catch(c){r(c),o.unsubscribe()}},error:r,complete:i});s.subscribe(o)})},n.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},n.prototype[tx]=function(){return this},n.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return nx(t)(this)},n.prototype.toPromise=function(t){var e=this;return t=Dd(t),new t(function(s,i){var r;e.subscribe(function(o){return r=o},function(o){return i(o)},function(){return s(r)})})},n.create=function(t){return new n(t)},n})();function Dd(n){var t;return(t=n??Ad.Promise)!==null&&t!==void 0?t:Promise}function sx(n){return n&&yn(n.next)&&yn(n.error)&&yn(n.complete)}function ix(n){return n&&n instanceof Pc||sx(n)&&Cd(n)}(function(n){Sc(t,n);function t(e,s,i,r,o,a){var c=n.call(this,e)||this;return c.onFinalize=o,c.shouldUnsubscribe=a,c._next=s?function(h){try{s(h)}catch(u){e.error(u)}}:n.prototype._next,c._error=r?function(h){try{r(h)}catch(u){e.error(u)}finally{this.unsubscribe()}}:n.prototype._error,c._complete=i?function(){try{i()}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 s=this.closed;n.prototype.unsubscribe.call(this),!s&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t})(Pc);function rx(){const n=tt.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 s=n.indexOf("rv:");return parseInt(n.substring(s+3,n.indexOf(".",s)),10)}const e=n.indexOf("Edge/");return e>0?parseInt(n.substring(e+5,n.indexOf(".",e)),10):-1}rx(),tt.document&&tt.document.documentMode&&tt.document.documentMode,tt.document&&tt.document.documentMode&&tt.document.documentMode,tt.document&&tt.document.documentMode&&tt.document.documentMode,!!(tt.Worker&&tt.Blob&&tt.Promise&&tt.OffscreenCanvas&&tt.OffscreenCanvasRenderingContext2D&&tt.HTMLCanvasElement&&tt.HTMLCanvasElement.prototype.transferControlToOffscreen&&tt.URL&&tt.URL.createObjectURL);const ox=(()=>{if(!tt.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})(),Rd=tt.crypto;Rd?.subtle;function Od(){try{return Rd.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 ax="\uFEFF";function cx(n){return n.startsWith(ax)?n.slice(1):n}function hx(n){try{return{ok:!0,value:JSON.parse(cx(n))}}catch{return{ok:!1}}}Aw(hx,{createCache:()=>new pc({max:50}),cacheKeyResolver:n=>n});const Dc=10,Id=(n=0)=>t=>`\x1B[${t+n}m`,kd=(n=0)=>t=>`\x1B[${38+n};5;${t}m`,Ld=(n=0)=>(t,e,s)=>`\x1B[${38+n};2;${t};${e};${s}m`,Ot={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(Ot.modifier);const ux=Object.keys(Ot.color),lx=Object.keys(Ot.bgColor);[...ux,...lx];function fx(){const n=new Map;for(const[t,e]of Object.entries(Ot)){for(const[s,i]of Object.entries(e))Ot[s]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},e[s]=Ot[s],n.set(i[0],i[1]);Object.defineProperty(Ot,t,{value:e,enumerable:!1})}return Object.defineProperty(Ot,"codes",{value:n,enumerable:!1}),Ot.color.close="\x1B[39m",Ot.bgColor.close="\x1B[49m",Ot.color.ansi=Id(),Ot.color.ansi256=kd(),Ot.color.ansi16m=Ld(),Ot.bgColor.ansi=Id(Dc),Ot.bgColor.ansi256=kd(Dc),Ot.bgColor.ansi16m=Ld(Dc),Object.defineProperties(Ot,{rgbToAnsi256:{value(t,e,s){return t===e&&e===s?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(s/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[s]=e;s.length===3&&(s=[...s].map(r=>r+r).join(""));const i=Number.parseInt(s,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>Ot.rgbToAnsi256(...Ot.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let e,s,i;if(t>=232)e=((t-232)*10+8)/255,s=e,i=e;else{t-=16;const a=t%36;e=Math.floor(t/36)/5,s=Math.floor(a/6)/5,i=a%6/5}const r=Math.max(e,s,i)*2;if(r===0)return 30;let o=30+(Math.round(i)<<2|Math.round(s)<<1|Math.round(e));return r===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,e,s)=>Ot.ansi256ToAnsi(Ot.rgbToAnsi256(t,e,s)),enumerable:!1},hexToAnsi:{value:t=>Ot.ansi256ToAnsi(Ot.hexToAnsi256(t)),enumerable:!1}}),Ot}const dx=fx(),mx=0;new Set(dx.codes.values()).delete(mx);const _i={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)"},px=Array.from(Object.values(_i));Object.entries(_i).map(([n,t])=>{const e=t;return{name:n,rgb:e,brightness:gx(e)}}).sort((n,t)=>n.brightness-t.brightness);function gx(n){const[t,e,s]=n.replace("rgb(","").replace(")","").split(",").map(Number);return .2126*t+.7152*e+.0722*s}class Be{_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 Be)this.setRGB(t.r,t.g,t.b,t.a);else if(typeof t=="number")this.setHEX(t);else if(typeof t=="string"){let s;if(s=/^(\w+)\(([^)]*)\)/.exec(t)){const i=s[2];let r;switch(s[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=rt(parseFloat(r[1]),0,100)*255/100,this.g=rt(parseFloat(r[2]),0,100)*255/100,this.b=rt(parseFloat(r[3]),0,100)*255/100,this.a=r[4]?parseFloat(r[4]):1):Ie(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):Ie(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):Ie(e);break;default:Ie(e)}}else if(s=/#([A-Fa-f0-9]+)/.exec(t)){const i=s[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===4?this.setRGB(parseInt(i.charAt(0),16),parseInt(i.charAt(1),16),parseInt(i.charAt(2),16),rt(parseInt(i.charAt(3),16)/16,0,1)):r===6||r===8?this.setHEX(parseInt(i,16)):Ie(e)}else if(t&&t.length>0)try{this.setColorName(t)}catch{Ie(e)}else Ie(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):Ie(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=rt(Math.round(Oe(t,this.r)),0,255)}get g(){return this._color.g}set g(t){this._color.g=rt(Math.round(Oe(t,this.g)),0,255)}get b(){return this._color.b}set b(t){this._color.b=rt(Math.round(Oe(t,this.b)),0,255)}get a(){return this._color.a}set a(t){this._color.a=rt(Oe(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},${at(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 Be(this.color)}copy(t){return this.setColor(t.color),this}copySRGBToLinear(t){return this.r=Oc(t.r),this.g=Oc(t.g),this.b=Oc(t.b),this}copyLinearToSRGB(t){return this.r=Ic(t.r),this.g=Ic(t.g),this.b=Ic(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",s="#ffffff"){if(t)return this.setColor(this.r*.299+this.g*.587+this.b*.114>186?e:s);{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=rt(t,0,1);const{r:e,g:s,b:i,a:r}=this.color;return r==0?this.a=t:(this.r=e+(255-e)*t,this.g=s+(255-s)*t,this.b=i+(255-i)*t),this}darken(t){t=rt(t,0,1);const{r:e,g:s,b:i,a:r}=this.color;return r==0?this.a=t:(this.r=e*(1-t),this.g=s*(1-t),this.b=i*(1-t)),this}lerp(t,e){e=rt(e,0,1);const{r:s,g:i,b:r}=this.color;return this.r=s+(t.r-s)*e,this.g=i+(t.g-i)*e,this.b=r+(t.b-r)*e,this}lerpColors(t,e,s){return s=rt(s,0,1),this.r=t.r+(e.r-t.r)*s,this.g=t.g+(e.g-t.g)*s,this.b=t.b+(e.b-t.b)*s,this}static gradient(t,e,s){try{return Rc.lerpColors(new Be(t),new Be(e),s).toString()}catch{return e}}static random(){return Rc.setHEX(Math.random()*16777215).toString()}static nextIndex=0;static next(t=Be.nextIndex){Be.nextIndex=t;const e=Object.keys(_i),s=e.length;return Rc.set(_i[e[Be.nextIndex++%s]]).toString()}setColorName(t){const e=_i[t.toLowerCase()];return e!==void 0?this.set(e):t==="none"?this.a=0:(this.a=1,Ie("Color.setColorName: Unknown color "+t)),this}setRGB(t,e,s,i=1){return this.r=t,this.g=e,this.b=s,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,s,i=1){const r=dw(t,1),o=rt(e,0,1),a=rt(s,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=kc(h,c,r+.3333333333333333)*255,this.g=kc(h,c,r)*255,this.b=kc(h,c,r-.3333333333333333)*255}return this.a=i,this}getHSL(t){const e=this.r,s=this.g,i=this.b,r=Math.max(e,s,i)/255,o=Math.min(e,s,i)/255;let a,c;const h=(o+r)/2;if(o===r)a=0,c=0;else{const u=r-o;switch(c=h<=.5?u/(r+o):u/(2-r-o),r){case e:a=(s-i)/u+(s<i?6:0);break;case s:a=(i-e)/u+2;break;case i:default:a=(e-s)/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,s){const i=this.getHSL();return this.setHSL(i.h+t,i.s+e,i.l+s)}lerpHSL(t,e){const s=this.getHSL(),i=t.getHSL(),r=Ur(s.h,i.h,e),o=Ur(s.s,i.s,e),a=Ur(s.l,i.l,e);return this.setHSL(r,o,a),this}setHSV(t,e,s,i=1){const r=rt(t,0,1)*360,o=rt(e,0,1),a=rt(s,0,1),c=Math.floor(r/60)%6,h=r/60-Math.floor(r/60),u=a*(1-o),l=a*(1-h*o),f=a*(1-(1-h)*o),d=[[a,f,u],[l,a,u],[u,a,f],[u,l,a],[f,u,a],[a,u,l]][c];return this.r=d[0]*255,this.g=d[1]*255,this.b=d[2]*255,this.a=i,this}setHSB(t,e,s,i=1){this.setHSV(t,e,s,i)}getHSV(t){const{r:e,g:s,b:i,a:r}=this.color,o=Math.max(e,s,i),a=Math.min(e,s,i),c=o-a;let h;e===o?h=(s-i)/c:s===o?h=2+(i-e)/c:h=4+(e-s)/c,h/=6,h<0&&(h+=1);const u=c==0?0:h,l=o===0?0:c/o,f=o/255;return t&&t.setHSV(u,l,f,r),{h:u,s:l,v:f,a:r}}getHSB(t){const{h:e,s,v:i,a:r}=this.getHSV(t);return{h:e,s,b:i,a:r}}}const Rc=new Be;function Oc(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Ic(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}function kc(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 yx(n=window.location.href,t){try{return new URL(n,t)}catch{const e="(?<protocol>https?:)",s="(?<host>(?<hostname>[^/#?:]+)(?::(?<port>\\d+))?)",i="(?<pathname>(?:\\/[^/#?]+)*\\/?)",r="(?<search>(?:\\?[^#]*)?)",o="(?<hash>(?:#.*)?)",a=new RegExp(`^${e}//${s}${i}${r}${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 vx(n=window.location.href){const t=yx(n),e=t.href.indexOf(t.hash);return t.hash&&e>=0?t.href.substring(0,e):t.href}function bx(n,t){return n+t.replace(/^[&?]/,n.indexOf("?")>=0?"&":"?")}function xx(n){return"?"+Object.entries(n).map(([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`).join("&")}function Sx(n){return"?"+[...n.entries()].map(t=>encodeURIComponent(t[0])+"="+encodeURIComponent(t[1]instanceof File?t[1].name:t[1])).join("&")}function Vd(n,t){return function(){return n.apply(t,arguments)}}const{toString:_x}=Object.prototype,{getPrototypeOf:Lc}=Object,Jr=(n=>t=>{const e=_x.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),je=n=>(n=n.toLowerCase(),t=>Jr(t)===n),Zr=n=>t=>typeof t===n,{isArray:js}=Array,Ei=Zr("undefined");function Ex(n){return n!==null&&!Ei(n)&&n.constructor!==null&&!Ei(n.constructor)&&Te(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Nd=je("ArrayBuffer");function Tx(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&Nd(n.buffer),t}const Cx=Zr("string"),Te=Zr("function"),zd=Zr("number"),Qr=n=>n!==null&&typeof n=="object",Px=n=>n===!0||n===!1,to=n=>{if(Jr(n)!=="object")return!1;const t=Lc(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},Ax=je("Date"),Mx=je("File"),Dx=je("Blob"),Rx=je("FileList"),Ox=n=>Qr(n)&&Te(n.pipe),Ix=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||Te(n.append)&&((t=Jr(n))==="formdata"||t==="object"&&Te(n.toString)&&n.toString()==="[object FormData]"))},kx=je("URLSearchParams"),[Lx,Vx,Nx,zx]=["ReadableStream","Request","Response","Headers"].map(je),Fx=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ti(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let s,i;if(typeof n!="object"&&(n=[n]),js(n))for(s=0,i=n.length;s<i;s++)t.call(null,n[s],s,n);else{const r=e?Object.getOwnPropertyNames(n):Object.keys(n),o=r.length;let a;for(s=0;s<o;s++)a=r[s],t.call(null,n[a],a,n)}}function Fd(n,t){t=t.toLowerCase();const e=Object.keys(n);let s=e.length,i;for(;s-- >0;)if(i=e[s],t===i.toLowerCase())return i;return null}const ds=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Bd=n=>!Ei(n)&&n!==ds;function Vc(){const{caseless:n}=Bd(this)&&this||{},t={},e=(s,i)=>{const r=n&&Fd(t,i)||i;to(t[r])&&to(s)?t[r]=Vc(t[r],s):to(s)?t[r]=Vc({},s):js(s)?t[r]=s.slice():t[r]=s};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&Ti(arguments[s],e);return t}const Bx=(n,t,e,{allOwnKeys:s}={})=>(Ti(t,(i,r)=>{e&&Te(i)?n[r]=Vd(i,e):n[r]=i},{allOwnKeys:s}),n),jx=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),$x=(n,t,e,s)=>{n.prototype=Object.create(t.prototype,s),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},Ux=(n,t,e,s)=>{let i,r,o;const a={};if(t=t||{},n==null)return t;do{for(i=Object.getOwnPropertyNames(n),r=i.length;r-- >0;)o=i[r],(!s||s(o,n,t))&&!a[o]&&(t[o]=n[o],a[o]=!0);n=e!==!1&&Lc(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},Yx=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const s=n.indexOf(t,e);return s!==-1&&s===e},Gx=n=>{if(!n)return null;if(js(n))return n;let t=n.length;if(!zd(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},Xx=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Lc(Uint8Array)),Wx=(n,t)=>{const e=(n&&n[Symbol.iterator]).call(n);let s;for(;(s=e.next())&&!s.done;){const i=s.value;t.call(n,i[0],i[1])}},Hx=(n,t)=>{let e;const s=[];for(;(e=n.exec(t))!==null;)s.push(e);return s},qx=je("HTMLFormElement"),Kx=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,s){return e.toUpperCase()+s}),jd=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),Jx=je("RegExp"),$d=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),s={};Ti(e,(i,r)=>{let o;(o=t(i,r,n))!==!1&&(s[r]=o||i)}),Object.defineProperties(n,s)},Zx=n=>{$d(n,(t,e)=>{if(Te(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const s=n[e];if(Te(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},Qx=(n,t)=>{const e={},s=i=>{i.forEach(r=>{e[r]=!0})};return js(n)?s(n):s(String(n).split(t)),e},tS=()=>{},eS=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function nS(n){return!!(n&&Te(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const sS=n=>{const t=new Array(10),e=(s,i)=>{if(Qr(s)){if(t.indexOf(s)>=0)return;if(!("toJSON"in s)){t[i]=s;const r=js(s)?[]:{};return Ti(s,(o,a)=>{const c=e(o,i+1);!Ei(c)&&(r[a]=c)}),t[i]=void 0,r}}return s};return e(n,0)},iS=je("AsyncFunction"),rS=n=>n&&(Qr(n)||Te(n))&&Te(n.then)&&Te(n.catch),Ud=((n,t)=>n?setImmediate:t?((e,s)=>(ds.addEventListener("message",({source:i,data:r})=>{i===ds&&r===e&&s.length&&s.shift()()},!1),i=>{s.push(i),ds.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",Te(ds.postMessage)),oS=typeof queueMicrotask<"u"?queueMicrotask.bind(ds):typeof process<"u"&&process.nextTick||Ud,L={isArray:js,isArrayBuffer:Nd,isBuffer:Ex,isFormData:Ix,isArrayBufferView:Tx,isString:Cx,isNumber:zd,isBoolean:Px,isObject:Qr,isPlainObject:to,isReadableStream:Lx,isRequest:Vx,isResponse:Nx,isHeaders:zx,isUndefined:Ei,isDate:Ax,isFile:Mx,isBlob:Dx,isRegExp:Jx,isFunction:Te,isStream:Ox,isURLSearchParams:kx,isTypedArray:Xx,isFileList:Rx,forEach:Ti,merge:Vc,extend:Bx,trim:Fx,stripBOM:jx,inherits:$x,toFlatObject:Ux,kindOf:Jr,kindOfTest:je,endsWith:Yx,toArray:Gx,forEachEntry:Wx,matchAll:Hx,isHTMLForm:qx,hasOwnProperty:jd,hasOwnProp:jd,reduceDescriptors:$d,freezeMethods:Zx,toObjectSet:Qx,toCamelCase:Kx,noop:tS,toFiniteNumber:eS,findKey:Fd,global:ds,isContextDefined:Bd,isSpecCompliantForm:nS,toJSONObject:sS,isAsyncFn:iS,isThenable:rS,setImmediate:Ud,asap:oS};function pt(n,t,e,s,i){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),s&&(this.request=s),i&&(this.response=i,this.status=i.status?i.status:null)}L.inherits(pt,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:L.toJSONObject(this.config),code:this.code,status:this.status}}});const Yd=pt.prototype,Gd={};["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=>{Gd[n]={value:n}}),Object.defineProperties(pt,Gd),Object.defineProperty(Yd,"isAxiosError",{value:!0}),pt.from=(n,t,e,s,i,r)=>{const o=Object.create(Yd);return L.toFlatObject(n,o,function(a){return a!==Error.prototype},a=>a!=="isAxiosError"),pt.call(o,n.message,t,e,s,i),o.cause=n,o.name=n.name,r&&Object.assign(o,r),o};const aS=null;function Nc(n){return L.isPlainObject(n)||L.isArray(n)}function Xd(n){return L.endsWith(n,"[]")?n.slice(0,-2):n}function Wd(n,t,e){return n?n.concat(t).map(function(s,i){return s=Xd(s),!e&&i?"["+s+"]":s}).join(e?".":""):t}function cS(n){return L.isArray(n)&&!n.some(Nc)}const hS=L.toFlatObject(L,{},null,function(n){return/^is[A-Z]/.test(n)});function eo(n,t,e){if(!L.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=L.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(d,p){return!L.isUndefined(p[d])});const s=e.metaTokens,i=e.visitor||h,r=e.dots,o=e.indexes,a=(e.Blob||typeof Blob<"u"&&Blob)&&L.isSpecCompliantForm(t);if(!L.isFunction(i))throw new TypeError("visitor must be a function");function c(d){if(d===null)return"";if(L.isDate(d))return d.toISOString();if(!a&&L.isBlob(d))throw new pt("Blob is not supported. Use a Buffer instead.");return L.isArrayBuffer(d)||L.isTypedArray(d)?a&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function h(d,p,m){let y=d;if(d&&!m&&typeof d=="object"){if(L.endsWith(p,"{}"))p=s?p:p.slice(0,-2),d=JSON.stringify(d);else if(L.isArray(d)&&cS(d)||(L.isFileList(d)||L.endsWith(p,"[]"))&&(y=L.toArray(d)))return p=Xd(p),y.forEach(function(g,v){!(L.isUndefined(g)||g===null)&&t.append(o===!0?Wd([p],v,r):o===null?p:p+"[]",c(g))}),!1}return Nc(d)?!0:(t.append(Wd(m,p,r),c(d)),!1)}const u=[],l=Object.assign(hS,{defaultVisitor:h,convertValue:c,isVisitable:Nc});function f(d,p){if(!L.isUndefined(d)){if(u.indexOf(d)!==-1)throw Error("Circular reference detected in "+p.join("."));u.push(d),L.forEach(d,function(m,y){(!(L.isUndefined(m)||m===null)&&i.call(t,m,L.isString(y)?y.trim():y,p,l))===!0&&f(m,p?p.concat(y):[y])}),u.pop()}}if(!L.isObject(n))throw new TypeError("data must be an object");return f(n),t}function Hd(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function zc(n,t){this._pairs=[],n&&eo(n,this,t)}const qd=zc.prototype;qd.append=function(n,t){this._pairs.push([n,t])},qd.toString=function(n){const t=n?function(e){return n.call(this,e,Hd)}:Hd;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function uS(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Kd(n,t,e){if(!t)return n;const s=e&&e.encode||uS;L.isFunction(e)&&(e={serialize:e});const i=e&&e.serialize;let r;if(i?r=i(t,e):r=L.isURLSearchParams(t)?t.toString():new zc(t,e).toString(s),r){const o=n.indexOf("#");o!==-1&&(n=n.slice(0,o)),n+=(n.indexOf("?")===-1?"?":"&")+r}return n}class lS{constructor(){this.handlers=[]}use(t,e,s){return this.handlers.push({fulfilled:t,rejected:e,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){L.forEach(this.handlers,function(e){e!==null&&t(e)})}}const Jd=lS,Zd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},fS=typeof URLSearchParams<"u"?URLSearchParams:zc,dS=typeof FormData<"u"?FormData:null,mS=typeof Blob<"u"?Blob:null,pS={isBrowser:!0,classes:{URLSearchParams:fS,FormData:dS,Blob:mS},protocols:["http","https","file","blob","url","data"]},Fc=typeof window<"u"&&typeof document<"u",Bc=typeof navigator=="object"&&navigator||void 0,gS=Fc&&(!Bc||["ReactNative","NativeScript","NS"].indexOf(Bc.product)<0),yS=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),vS=Fc&&window.location.href||"http://localhost",bS=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Fc,hasStandardBrowserEnv:gS,hasStandardBrowserWebWorkerEnv:yS,navigator:Bc,origin:vS},Symbol.toStringTag,{value:"Module"})),oe={...bS,...pS};function wS(n,t){return eo(n,new oe.classes.URLSearchParams,Object.assign({visitor:function(e,s,i,r){return oe.isNode&&L.isBuffer(e)?(this.append(s,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}function xS(n){return L.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function SS(n){const t={},e=Object.keys(n);let s;const i=e.length;let r;for(s=0;s<i;s++)r=e[s],t[r]=n[r];return t}function Qd(n){function t(e,s,i,r){let o=e[r++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),c=r>=e.length;return o=!o&&L.isArray(i)?i.length:o,c?(L.hasOwnProp(i,o)?i[o]=[i[o],s]:i[o]=s,!a):((!i[o]||!L.isObject(i[o]))&&(i[o]=[]),t(e,s,i[o],r)&&L.isArray(i[o])&&(i[o]=SS(i[o])),!a)}if(L.isFormData(n)&&L.isFunction(n.entries)){const e={};return L.forEachEntry(n,(s,i)=>{t(xS(s),i,e,0)}),e}return null}function _S(n,t,e){if(L.isString(n))try{return(t||JSON.parse)(n),L.trim(n)}catch(s){if(s.name!=="SyntaxError")throw s}return(e||JSON.stringify)(n)}const jc={transitional:Zd,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",s=e.indexOf("application/json")>-1,i=L.isObject(n);if(i&&L.isHTMLForm(n)&&(n=new FormData(n)),L.isFormData(n))return s?JSON.stringify(Qd(n)):n;if(L.isArrayBuffer(n)||L.isBuffer(n)||L.isStream(n)||L.isFile(n)||L.isBlob(n)||L.isReadableStream(n))return n;if(L.isArrayBufferView(n))return n.buffer;if(L.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let r;if(i){if(e.indexOf("application/x-www-form-urlencoded")>-1)return wS(n,this.formSerializer).toString();if((r=L.isFileList(n))||e.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return eo(r?{"files[]":n}:n,o&&new o,this.formSerializer)}}return i||s?(t.setContentType("application/json",!1),_S(n)):n}],transformResponse:[function(n){const t=this.transitional||jc.transitional,e=t&&t.forcedJSONParsing,s=this.responseType==="json";if(L.isResponse(n)||L.isReadableStream(n))return n;if(n&&L.isString(n)&&(e&&!this.responseType||s)){const i=!(t&&t.silentJSONParsing)&&s;try{return JSON.parse(n)}catch(r){if(i)throw r.name==="SyntaxError"?pt.from(r,pt.ERR_BAD_RESPONSE,this,null,this.response):r}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:oe.classes.FormData,Blob:oe.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};L.forEach(["delete","get","head","post","put","patch"],n=>{jc.headers[n]={}});const $c=jc,ES=L.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"]),TS=n=>{const t={};let e,s,i;return n&&n.split(`
14
+ `).forEach(function(r){i=r.indexOf(":"),e=r.substring(0,i).trim().toLowerCase(),s=r.substring(i+1).trim(),!(!e||t[e]&&ES[e])&&(e==="set-cookie"?t[e]?t[e].push(s):t[e]=[s]:t[e]=t[e]?t[e]+", "+s:s)}),t},tm=Symbol("internals");function Ci(n){return n&&String(n).trim().toLowerCase()}function no(n){return n===!1||n==null?n:L.isArray(n)?n.map(no):String(n)}function CS(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=e.exec(n);)t[s[1]]=s[2];return t}const PS=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Uc(n,t,e,s,i){if(L.isFunction(s))return s.call(this,t,e);if(i&&(t=e),!!L.isString(t)){if(L.isString(s))return t.indexOf(s)!==-1;if(L.isRegExp(s))return s.test(t)}}function AS(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,s)=>e.toUpperCase()+s)}function MS(n,t){const e=L.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(n,s+e,{value:function(i,r,o){return this[s].call(this,t,i,r,o)},configurable:!0})})}class so{constructor(t){t&&this.set(t)}set(t,e,s){const i=this;function r(a,c,h){const u=Ci(c);if(!u)throw new Error("header name must be a non-empty string");const l=L.findKey(i,u);(!l||i[l]===void 0||h===!0||h===void 0&&i[l]!==!1)&&(i[l||c]=no(a))}const o=(a,c)=>L.forEach(a,(h,u)=>r(h,u,c));if(L.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(L.isString(t)&&(t=t.trim())&&!PS(t))o(TS(t),e);else if(L.isHeaders(t))for(const[a,c]of t.entries())r(c,a,s);else t!=null&&r(e,t,s);return this}get(t,e){if(t=Ci(t),t){const s=L.findKey(this,t);if(s){const i=this[s];if(!e)return i;if(e===!0)return CS(i);if(L.isFunction(e))return e.call(this,i,s);if(L.isRegExp(e))return e.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Ci(t),t){const s=L.findKey(this,t);return!!(s&&this[s]!==void 0&&(!e||Uc(this,this[s],s,e)))}return!1}delete(t,e){const s=this;let i=!1;function r(o){if(o=Ci(o),o){const a=L.findKey(s,o);a&&(!e||Uc(s,s[a],a,e))&&(delete s[a],i=!0)}}return L.isArray(t)?t.forEach(r):r(t),i}clear(t){const e=Object.keys(this);let s=e.length,i=!1;for(;s--;){const r=e[s];(!t||Uc(this,this[r],r,t,!0))&&(delete this[r],i=!0)}return i}normalize(t){const e=this,s={};return L.forEach(this,(i,r)=>{const o=L.findKey(s,r);if(o){e[o]=no(i),delete e[r];return}const a=t?AS(r):String(r).trim();a!==r&&delete e[r],e[a]=no(i),s[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return L.forEach(this,(s,i)=>{s!=null&&s!==!1&&(e[i]=t&&L.isArray(s)?s.join(", "):s)}),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 s=new this(t);return e.forEach(i=>s.set(i)),s}static accessor(t){const e=(this[tm]=this[tm]={accessors:{}}).accessors,s=this.prototype;function i(r){const o=Ci(r);e[o]||(MS(s,r),e[o]=!0)}return L.isArray(t)?t.forEach(i):i(t),this}}so.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),L.reduceDescriptors(so.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(s){this[e]=s}}}),L.freezeMethods(so);const $e=so;function Yc(n,t){const e=this||$c,s=t||e,i=$e.from(s.headers);let r=s.data;return L.forEach(n,function(o){r=o.call(e,r,i.normalize(),t?t.status:void 0)}),i.normalize(),r}function em(n){return!!(n&&n.__CANCEL__)}function $s(n,t,e){pt.call(this,n??"canceled",pt.ERR_CANCELED,t,e),this.name="CanceledError"}L.inherits($s,pt,{__CANCEL__:!0});function nm(n,t,e){const s=e.config.validateStatus;!e.status||!s||s(e.status)?n(e):t(new pt("Request failed with status code "+e.status,[pt.ERR_BAD_REQUEST,pt.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function DS(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function RS(n,t){n=n||10;const e=new Array(n),s=new Array(n);let i=0,r=0,o;return t=t!==void 0?t:1e3,function(a){const c=Date.now(),h=s[r];o||(o=c),e[i]=a,s[i]=c;let u=r,l=0;for(;u!==i;)l+=e[u++],u=u%n;if(i=(i+1)%n,i===r&&(r=(r+1)%n),c-o<t)return;const f=h&&c-h;return f?Math.round(l*1e3/f):void 0}}function OS(n,t){let e=0,s=1e3/t,i,r;const o=(a,c=Date.now())=>{e=c,i=null,r&&(clearTimeout(r),r=null),n.apply(null,a)};return[(...a)=>{const c=Date.now(),h=c-e;h>=s?o(a,c):(i=a,r||(r=setTimeout(()=>{r=null,o(i)},s-h)))},()=>i&&o(i)]}const io=(n,t,e=3)=>{let s=0;const i=RS(50,250);return OS(r=>{const o=r.loaded,a=r.lengthComputable?r.total:void 0,c=o-s,h=i(c),u=o<=a;s=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:r,lengthComputable:a!=null,[t?"download":"upload"]:!0};n(l)},e)},sm=(n,t)=>{const e=n!=null;return[s=>t[0]({lengthComputable:e,total:n,loaded:s}),t[1]]},im=n=>(...t)=>L.asap(()=>n(...t)),IS=oe.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,oe.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(oe.origin),oe.navigator&&/(msie|trident)/i.test(oe.navigator.userAgent)):()=>!0,kS=oe.hasStandardBrowserEnv?{write(n,t,e,s,i,r){const o=[n+"="+encodeURIComponent(t)];L.isNumber(e)&&o.push("expires="+new Date(e).toGMTString()),L.isString(s)&&o.push("path="+s),L.isString(i)&&o.push("domain="+i),r===!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 LS(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function VS(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function rm(n,t,e){let s=!LS(t);return n&&(s||e==!1)?VS(n,t):t}const om=n=>n instanceof $e?{...n}:n;function ms(n,t){t=t||{};const e={};function s(h,u,l,f){return L.isPlainObject(h)&&L.isPlainObject(u)?L.merge.call({caseless:f},h,u):L.isPlainObject(u)?L.merge({},u):L.isArray(u)?u.slice():u}function i(h,u,l,f){if(L.isUndefined(u)){if(!L.isUndefined(h))return s(void 0,h,l,f)}else return s(h,u,l,f)}function r(h,u){if(!L.isUndefined(u))return s(void 0,u)}function o(h,u){if(L.isUndefined(u)){if(!L.isUndefined(h))return s(void 0,h)}else return s(void 0,u)}function a(h,u,l){if(l in t)return s(h,u);if(l in n)return s(void 0,h)}const c={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:(h,u,l)=>i(om(h),om(u),l,!0)};return L.forEach(Object.keys(Object.assign({},n,t)),function(h){const u=c[h]||i,l=u(n[h],t[h],h);L.isUndefined(l)&&u!==a||(e[h]=l)}),e}const am=n=>{const t=ms({},n);let{data:e,withXSRFToken:s,xsrfHeaderName:i,xsrfCookieName:r,headers:o,auth:a}=t;t.headers=o=$e.from(o),t.url=Kd(rm(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(L.isFormData(e)){if(oe.hasStandardBrowserEnv||oe.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(oe.hasStandardBrowserEnv&&(s&&L.isFunction(s)&&(s=s(t)),s||s!==!1&&IS(t.url))){const h=i&&r&&kS.read(r);h&&o.set(i,h)}return t},NS=typeof XMLHttpRequest<"u",zS=NS&&function(n){return new Promise(function(t,e){const s=am(n);let i=s.data;const r=$e.from(s.headers).normalize();let{responseType:o,onUploadProgress:a,onDownloadProgress:c}=s,h,u,l,f,d;function p(){f&&f(),d&&d(),s.cancelToken&&s.cancelToken.unsubscribe(h),s.signal&&s.signal.removeEventListener("abort",h)}let m=new XMLHttpRequest;m.open(s.method.toUpperCase(),s.url,!0),m.timeout=s.timeout;function y(){if(!m)return;const v=$e.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),x={data:!o||o==="text"||o==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:v,config:n,request:m};nm(function(b){t(b),p()},function(b){e(b),p()},x),m=null}"onloadend"in m?m.onloadend=y:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(y)},m.onabort=function(){m&&(e(new pt("Request aborted",pt.ECONNABORTED,n,m)),m=null)},m.onerror=function(){e(new pt("Network Error",pt.ERR_NETWORK,n,m)),m=null},m.ontimeout=function(){let v=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const x=s.transitional||Zd;s.timeoutErrorMessage&&(v=s.timeoutErrorMessage),e(new pt(v,x.clarifyTimeoutError?pt.ETIMEDOUT:pt.ECONNABORTED,n,m)),m=null},i===void 0&&r.setContentType(null),"setRequestHeader"in m&&L.forEach(r.toJSON(),function(v,x){m.setRequestHeader(x,v)}),L.isUndefined(s.withCredentials)||(m.withCredentials=!!s.withCredentials),o&&o!=="json"&&(m.responseType=s.responseType),c&&([l,d]=io(c,!0),m.addEventListener("progress",l)),a&&m.upload&&([u,f]=io(a),m.upload.addEventListener("progress",u),m.upload.addEventListener("loadend",f)),(s.cancelToken||s.signal)&&(h=v=>{m&&(e(!v||v.type?new $s(null,n,m):v),m.abort(),m=null)},s.cancelToken&&s.cancelToken.subscribe(h),s.signal&&(s.signal.aborted?h():s.signal.addEventListener("abort",h)));const g=DS(s.url);if(g&&oe.protocols.indexOf(g)===-1){e(new pt("Unsupported protocol "+g+":",pt.ERR_BAD_REQUEST,n));return}m.send(i||null)})},FS=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let s=new AbortController,i;const r=function(h){if(!i){i=!0,a();const u=h instanceof Error?h:this.reason;s.abort(u instanceof pt?u:new $s(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,r(new pt(`timeout ${t} of ms exceeded`,pt.ETIMEDOUT))},t);const a=()=>{n&&(o&&clearTimeout(o),o=null,n.forEach(h=>{h.unsubscribe?h.unsubscribe(r):h.removeEventListener("abort",r)}),n=null)};n.forEach(h=>h.addEventListener("abort",r));const{signal:c}=s;return c.unsubscribe=()=>L.asap(a),c}},BS=FS,jS=function*(n,t){let e=n.byteLength;if(!t||e<t){yield n;return}let s=0,i;for(;s<e;)i=s+t,yield n.slice(s,i),s=i},$S=async function*(n,t){for await(const e of US(n))yield*jS(e,t)},US=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:e,value:s}=await t.read();if(e)break;yield s}}finally{await t.cancel()}},cm=(n,t,e,s)=>{const i=$S(n,t);let r=0,o,a=c=>{o||(o=!0,s&&s(c))};return new ReadableStream({async pull(c){try{const{done:h,value:u}=await i.next();if(h){a(),c.close();return}let l=u.byteLength;if(e){let f=r+=l;e(f)}c.enqueue(new Uint8Array(u))}catch(h){throw a(h),h}},cancel(c){return a(c),i.return()}},{highWaterMark:2})},ro=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",hm=ro&&typeof ReadableStream=="function",YS=ro&&(typeof TextEncoder=="function"?(n=>t=>n.encode(t))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),um=(n,...t)=>{try{return!!n(...t)}catch{return!1}},GS=hm&&um(()=>{let n=!1;const t=new Request(oe.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!t}),lm=64*1024,Gc=hm&&um(()=>L.isReadableStream(new Response("").body)),oo={stream:Gc&&(n=>n.body)};ro&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!oo[t]&&(oo[t]=L.isFunction(n[t])?e=>e[t]():(e,s)=>{throw new pt(`Response type '${t}' is not supported`,pt.ERR_NOT_SUPPORT,s)})})})(new Response);const XS=async n=>{if(n==null)return 0;if(L.isBlob(n))return n.size;if(L.isSpecCompliantForm(n))return(await new Request(oe.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(L.isArrayBufferView(n)||L.isArrayBuffer(n))return n.byteLength;if(L.isURLSearchParams(n)&&(n=n+""),L.isString(n))return(await YS(n)).byteLength},WS=async(n,t)=>L.toFiniteNumber(n.getContentLength())??XS(t),HS=ro&&(async n=>{let{url:t,method:e,data:s,signal:i,cancelToken:r,timeout:o,onDownloadProgress:a,onUploadProgress:c,responseType:h,headers:u,withCredentials:l="same-origin",fetchOptions:f}=am(n);h=h?(h+"").toLowerCase():"text";let d=BS([i,r&&r.toAbortSignal()],o),p;const m=d&&d.unsubscribe&&(()=>{d.unsubscribe()});let y;try{if(c&&GS&&e!=="get"&&e!=="head"&&(y=await WS(u,s))!==0){let E=new Request(t,{method:"POST",body:s,duplex:"half"}),_;if(L.isFormData(s)&&(_=E.headers.get("content-type"))&&u.setContentType(_),E.body){const[D,V]=sm(y,io(im(c)));s=cm(E.body,lm,D,V)}}L.isString(l)||(l=l?"include":"omit");const g="credentials"in Request.prototype;p=new Request(t,{...f,signal:d,method:e.toUpperCase(),headers:u.normalize().toJSON(),body:s,duplex:"half",credentials:g?l:void 0});let v=await fetch(p);const x=Gc&&(h==="stream"||h==="response");if(Gc&&(a||x&&m)){const E={};["status","statusText","headers"].forEach(O=>{E[O]=v[O]});const _=L.toFiniteNumber(v.headers.get("content-length")),[D,V]=a&&sm(_,io(im(a),!0))||[];v=new Response(cm(v.body,lm,D,()=>{V&&V(),m&&m()}),E)}h=h||"text";let b=await oo[L.findKey(oo,h)||"text"](v,n);return!x&&m&&m(),await new Promise((E,_)=>{nm(E,_,{data:b,headers:$e.from(v.headers),status:v.status,statusText:v.statusText,config:n,request:p})})}catch(g){throw m&&m(),g&&g.name==="TypeError"&&/fetch/i.test(g.message)?Object.assign(new pt("Network Error",pt.ERR_NETWORK,n,p),{cause:g.cause||g}):pt.from(g,g&&g.code,n,p)}}),Xc={http:aS,xhr:zS,fetch:HS};L.forEach(Xc,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const fm=n=>`- ${n}`,qS=n=>L.isFunction(n)||n===null||n===!1,dm={getAdapter:n=>{n=L.isArray(n)?n:[n];const{length:t}=n;let e,s;const i={};for(let r=0;r<t;r++){e=n[r];let o;if(s=e,!qS(e)&&(s=Xc[(o=String(e)).toLowerCase()],s===void 0))throw new pt(`Unknown adapter '${o}'`);if(s)break;i[o||"#"+r]=s}if(!s){const r=Object.entries(i).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=t?r.length>1?`since :
16
+ `+r.map(fm).join(`
17
+ `):" "+fm(r[0]):"as no adapter specified";throw new pt("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return s},adapters:Xc};function Wc(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new $s(null,n)}function mm(n){return Wc(n),n.headers=$e.from(n.headers),n.data=Yc.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),dm.getAdapter(n.adapter||$c.adapter)(n).then(function(t){return Wc(n),t.data=Yc.call(n,n.transformResponse,t),t.headers=$e.from(t.headers),t},function(t){return em(t)||(Wc(n),t&&t.response&&(t.response.data=Yc.call(n,n.transformResponse,t.response),t.response.headers=$e.from(t.response.headers))),Promise.reject(t)})}const pm="1.8.4",ao={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{ao[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const gm={};ao.transitional=function(n,t,e){function s(i,r){return"[Axios v"+pm+"] Transitional option '"+i+"'"+r+(e?". "+e:"")}return(i,r,o)=>{if(n===!1)throw new pt(s(r," has been removed"+(t?" in "+t:"")),pt.ERR_DEPRECATED);return t&&!gm[r]&&(gm[r]=!0,console.warn(s(r," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(i,r,o):!0}},ao.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function KS(n,t,e){if(typeof n!="object")throw new pt("options must be an object",pt.ERR_BAD_OPTION_VALUE);const s=Object.keys(n);let i=s.length;for(;i-- >0;){const r=s[i],o=t[r];if(o){const a=n[r],c=a===void 0||o(a,r,n);if(c!==!0)throw new pt("option "+r+" must be "+c,pt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new pt("Unknown option "+r,pt.ERR_BAD_OPTION)}}const co={assertOptions:KS,validators:ao},Qe=co.validators;class ho{constructor(t){this.defaults=t,this.interceptors={request:new Jd,response:new Jd}}async request(t,e){try{return await this._request(t,e)}catch(s){if(s instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const r=i.stack?i.stack.replace(/^.+\n/,""):"";try{s.stack?r&&!String(s.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(s.stack+=`
18
+ `+r):s.stack=r}catch{}}throw s}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=ms(this.defaults,e);const{transitional:s,paramsSerializer:i,headers:r}=e;s!==void 0&&co.assertOptions(s,{silentJSONParsing:Qe.transitional(Qe.boolean),forcedJSONParsing:Qe.transitional(Qe.boolean),clarifyTimeoutError:Qe.transitional(Qe.boolean)},!1),i!=null&&(L.isFunction(i)?e.paramsSerializer={serialize:i}:co.assertOptions(i,{encode:Qe.function,serialize:Qe.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),co.assertOptions(e,{baseUrl:Qe.spelling("baseURL"),withXsrfToken:Qe.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=r&&L.merge(r.common,r[e.method]);r&&L.forEach(["delete","get","head","post","put","patch","common"],p=>{delete r[p]}),e.headers=$e.concat(o,r);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,f;if(!c){const p=[mm.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,h),f=p.length,u=Promise.resolve(e);l<f;)u=u.then(p[l++],p[l++]);return u}f=a.length;let d=e;for(l=0;l<f;){const p=a[l++],m=a[l++];try{d=p(d)}catch(y){m.call(this,y);break}}try{u=mm.call(this,d)}catch(p){return Promise.reject(p)}for(l=0,f=h.length;l<f;)u=u.then(h[l++],h[l++]);return u}getUri(t){t=ms(this.defaults,t);const e=rm(t.baseURL,t.url,t.allowAbsoluteUrls);return Kd(e,t.params,t.paramsSerializer)}}L.forEach(["delete","get","head","options"],function(n){ho.prototype[n]=function(t,e){return this.request(ms(e||{},{method:n,url:t,data:(e||{}).data}))}}),L.forEach(["post","put","patch"],function(n){function t(e){return function(s,i,r){return this.request(ms(r||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}ho.prototype[n]=t(),ho.prototype[n+"Form"]=t(!0)});const uo=ho;class Hc{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 s=this;this.promise.then(i=>{if(!s._listeners)return;let r=s._listeners.length;for(;r-- >0;)s._listeners[r](i);s._listeners=null}),this.promise.then=i=>{let r;const o=new Promise(a=>{s.subscribe(a),r=a}).then(i);return o.cancel=function(){s.unsubscribe(r)},o},t(function(i,r,o){s.reason||(s.reason=new $s(i,r,o),e(s.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=s=>{t.abort(s)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new Hc(function(e){t=e}),cancel:t}}}const JS=Hc;function ZS(n){return function(t){return n.apply(null,t)}}function QS(n){return L.isObject(n)&&n.isAxiosError===!0}const qc={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(qc).forEach(([n,t])=>{qc[t]=n});const t2=qc;function ym(n){const t=new uo(n),e=Vd(uo.prototype.request,t);return L.extend(e,uo.prototype,t,{allOwnKeys:!0}),L.extend(e,t,null,{allOwnKeys:!0}),e.create=function(s){return ym(ms(n,s))},e}const jt=ym($c);jt.Axios=uo,jt.CanceledError=$s,jt.CancelToken=JS,jt.isCancel=em,jt.VERSION=pm,jt.toFormData=eo,jt.AxiosError=pt,jt.Cancel=jt.CanceledError,jt.all=function(n){return Promise.all(n)},jt.spread=ZS,jt.isAxiosError=QS,jt.mergeConfig=ms,jt.AxiosHeaders=$e,jt.formToJSON=n=>Qd(L.isHTMLForm(n)?new FormData(n):n),jt.getAdapter=dm.getAdapter,jt.HttpStatusCode=t2,jt.default=jt;const e2=jt;class n2{instance;constructor(t){this.instance=e2.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 s=this.instance.request;return s.cancel=()=>{e=!0},s(t).then(i=>{if(e)throw new Error("Canceled!");return i})}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,s){return this.request({...s,method:"post",url:t,data:e})}postFormData(t,e,s){return s={...s,headers:{...s?.headers,"Content-Type":"multipart/form-data"}},this.request({...s,method:"post",url:t,data:e})}postForm(t,e,s){return this.instance.postForm(t,e,{...s})}put(t,e,s){return this.request({...s,method:"put",url:t,data:e})}patch(t,e,s){return this.request({...s,method:"patch",url:t,data:e})}getUri(t){return this.instance.getUri(t)}}function s2(n,t=(e,s)=>e<=s){const e=n.length;let s=Math.floor(e/2);for(;s>0;){for(let i=s;i<e;i++){const r=n[i];let o=i;for(;o>=s&&!t(n[o-s],r);)n[o]=n[o-s],o-=s;n[o]=r}s=Math.floor(s/2)}}function lo(n,t){const e=typeof t?.aliveInSeconds=="number"?Math.max(t.aliveInSeconds,0):-1,s=typeof t?.aliveUntilTimestamp=="number"?Math.max(t.aliveUntilTimestamp,0):-1;function i(o,a=!1){return tw(o)||cd(o)||rd(o)?{value:o,timestamp:Fs()}:a&&Object.prototype.hasOwnProperty.call(o,"timestamp")?o:{...o,timestamp:Fs()}}let r=i(n,!0);return{get:()=>{let o=!1;return(e>=0&&Fs()>Oe(r.timestamp,0)+e*1e3||s>=0&&Fs()>s)&&(o=!0),o&&(r.value=void 0),r},set:o=>r=i(o,!1)}}function Kc(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function i2(n){if(n.__esModule)return n;var t=n.default;if(typeof t=="function"){var e=function s(){return this instanceof s?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(s){var i=Object.getOwnPropertyDescriptor(n,s);Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:function(){return n[s]}})}),e}var vm={exports:{}};(function(n,t){(function(e){n.exports=e()})(function(e){var s=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function i(g,v){var x=g[0],b=g[1],E=g[2],_=g[3];x+=(b&E|~b&_)+v[0]-680876936|0,x=(x<<7|x>>>25)+b|0,_+=(x&b|~x&E)+v[1]-389564586|0,_=(_<<12|_>>>20)+x|0,E+=(_&x|~_&b)+v[2]+606105819|0,E=(E<<17|E>>>15)+_|0,b+=(E&_|~E&x)+v[3]-1044525330|0,b=(b<<22|b>>>10)+E|0,x+=(b&E|~b&_)+v[4]-176418897|0,x=(x<<7|x>>>25)+b|0,_+=(x&b|~x&E)+v[5]+1200080426|0,_=(_<<12|_>>>20)+x|0,E+=(_&x|~_&b)+v[6]-1473231341|0,E=(E<<17|E>>>15)+_|0,b+=(E&_|~E&x)+v[7]-45705983|0,b=(b<<22|b>>>10)+E|0,x+=(b&E|~b&_)+v[8]+1770035416|0,x=(x<<7|x>>>25)+b|0,_+=(x&b|~x&E)+v[9]-1958414417|0,_=(_<<12|_>>>20)+x|0,E+=(_&x|~_&b)+v[10]-42063|0,E=(E<<17|E>>>15)+_|0,b+=(E&_|~E&x)+v[11]-1990404162|0,b=(b<<22|b>>>10)+E|0,x+=(b&E|~b&_)+v[12]+1804603682|0,x=(x<<7|x>>>25)+b|0,_+=(x&b|~x&E)+v[13]-40341101|0,_=(_<<12|_>>>20)+x|0,E+=(_&x|~_&b)+v[14]-1502002290|0,E=(E<<17|E>>>15)+_|0,b+=(E&_|~E&x)+v[15]+1236535329|0,b=(b<<22|b>>>10)+E|0,x+=(b&_|E&~_)+v[1]-165796510|0,x=(x<<5|x>>>27)+b|0,_+=(x&E|b&~E)+v[6]-1069501632|0,_=(_<<9|_>>>23)+x|0,E+=(_&b|x&~b)+v[11]+643717713|0,E=(E<<14|E>>>18)+_|0,b+=(E&x|_&~x)+v[0]-373897302|0,b=(b<<20|b>>>12)+E|0,x+=(b&_|E&~_)+v[5]-701558691|0,x=(x<<5|x>>>27)+b|0,_+=(x&E|b&~E)+v[10]+38016083|0,_=(_<<9|_>>>23)+x|0,E+=(_&b|x&~b)+v[15]-660478335|0,E=(E<<14|E>>>18)+_|0,b+=(E&x|_&~x)+v[4]-405537848|0,b=(b<<20|b>>>12)+E|0,x+=(b&_|E&~_)+v[9]+568446438|0,x=(x<<5|x>>>27)+b|0,_+=(x&E|b&~E)+v[14]-1019803690|0,_=(_<<9|_>>>23)+x|0,E+=(_&b|x&~b)+v[3]-187363961|0,E=(E<<14|E>>>18)+_|0,b+=(E&x|_&~x)+v[8]+1163531501|0,b=(b<<20|b>>>12)+E|0,x+=(b&_|E&~_)+v[13]-1444681467|0,x=(x<<5|x>>>27)+b|0,_+=(x&E|b&~E)+v[2]-51403784|0,_=(_<<9|_>>>23)+x|0,E+=(_&b|x&~b)+v[7]+1735328473|0,E=(E<<14|E>>>18)+_|0,b+=(E&x|_&~x)+v[12]-1926607734|0,b=(b<<20|b>>>12)+E|0,x+=(b^E^_)+v[5]-378558|0,x=(x<<4|x>>>28)+b|0,_+=(x^b^E)+v[8]-2022574463|0,_=(_<<11|_>>>21)+x|0,E+=(_^x^b)+v[11]+1839030562|0,E=(E<<16|E>>>16)+_|0,b+=(E^_^x)+v[14]-35309556|0,b=(b<<23|b>>>9)+E|0,x+=(b^E^_)+v[1]-1530992060|0,x=(x<<4|x>>>28)+b|0,_+=(x^b^E)+v[4]+1272893353|0,_=(_<<11|_>>>21)+x|0,E+=(_^x^b)+v[7]-155497632|0,E=(E<<16|E>>>16)+_|0,b+=(E^_^x)+v[10]-1094730640|0,b=(b<<23|b>>>9)+E|0,x+=(b^E^_)+v[13]+681279174|0,x=(x<<4|x>>>28)+b|0,_+=(x^b^E)+v[0]-358537222|0,_=(_<<11|_>>>21)+x|0,E+=(_^x^b)+v[3]-722521979|0,E=(E<<16|E>>>16)+_|0,b+=(E^_^x)+v[6]+76029189|0,b=(b<<23|b>>>9)+E|0,x+=(b^E^_)+v[9]-640364487|0,x=(x<<4|x>>>28)+b|0,_+=(x^b^E)+v[12]-421815835|0,_=(_<<11|_>>>21)+x|0,E+=(_^x^b)+v[15]+530742520|0,E=(E<<16|E>>>16)+_|0,b+=(E^_^x)+v[2]-995338651|0,b=(b<<23|b>>>9)+E|0,x+=(E^(b|~_))+v[0]-198630844|0,x=(x<<6|x>>>26)+b|0,_+=(b^(x|~E))+v[7]+1126891415|0,_=(_<<10|_>>>22)+x|0,E+=(x^(_|~b))+v[14]-1416354905|0,E=(E<<15|E>>>17)+_|0,b+=(_^(E|~x))+v[5]-57434055|0,b=(b<<21|b>>>11)+E|0,x+=(E^(b|~_))+v[12]+1700485571|0,x=(x<<6|x>>>26)+b|0,_+=(b^(x|~E))+v[3]-1894986606|0,_=(_<<10|_>>>22)+x|0,E+=(x^(_|~b))+v[10]-1051523|0,E=(E<<15|E>>>17)+_|0,b+=(_^(E|~x))+v[1]-2054922799|0,b=(b<<21|b>>>11)+E|0,x+=(E^(b|~_))+v[8]+1873313359|0,x=(x<<6|x>>>26)+b|0,_+=(b^(x|~E))+v[15]-30611744|0,_=(_<<10|_>>>22)+x|0,E+=(x^(_|~b))+v[6]-1560198380|0,E=(E<<15|E>>>17)+_|0,b+=(_^(E|~x))+v[13]+1309151649|0,b=(b<<21|b>>>11)+E|0,x+=(E^(b|~_))+v[4]-145523070|0,x=(x<<6|x>>>26)+b|0,_+=(b^(x|~E))+v[11]-1120210379|0,_=(_<<10|_>>>22)+x|0,E+=(x^(_|~b))+v[2]+718787259|0,E=(E<<15|E>>>17)+_|0,b+=(_^(E|~x))+v[9]-343485551|0,b=(b<<21|b>>>11)+E|0,g[0]=x+g[0]|0,g[1]=b+g[1]|0,g[2]=E+g[2]|0,g[3]=_+g[3]|0}function r(g){var v=[],x;for(x=0;x<64;x+=4)v[x>>2]=g.charCodeAt(x)+(g.charCodeAt(x+1)<<8)+(g.charCodeAt(x+2)<<16)+(g.charCodeAt(x+3)<<24);return v}function o(g){var v=[],x;for(x=0;x<64;x+=4)v[x>>2]=g[x]+(g[x+1]<<8)+(g[x+2]<<16)+(g[x+3]<<24);return v}function a(g){var v=g.length,x=[1732584193,-271733879,-1732584194,271733878],b,E,_,D,V,O;for(b=64;b<=v;b+=64)i(x,r(g.substring(b-64,b)));for(g=g.substring(b-64),E=g.length,_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],b=0;b<E;b+=1)_[b>>2]|=g.charCodeAt(b)<<(b%4<<3);if(_[b>>2]|=128<<(b%4<<3),b>55)for(i(x,_),b=0;b<16;b+=1)_[b]=0;return D=v*8,D=D.toString(16).match(/(.*?)(.{0,8})$/),V=parseInt(D[2],16),O=parseInt(D[1],16)||0,_[14]=V,_[15]=O,i(x,_),x}function c(g){var v=g.length,x=[1732584193,-271733879,-1732584194,271733878],b,E,_,D,V,O;for(b=64;b<=v;b+=64)i(x,o(g.subarray(b-64,b)));for(g=b-64<v?g.subarray(b-64):new Uint8Array(0),E=g.length,_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],b=0;b<E;b+=1)_[b>>2]|=g[b]<<(b%4<<3);if(_[b>>2]|=128<<(b%4<<3),b>55)for(i(x,_),b=0;b<16;b+=1)_[b]=0;return D=v*8,D=D.toString(16).match(/(.*?)(.{0,8})$/),V=parseInt(D[2],16),O=parseInt(D[1],16)||0,_[14]=V,_[15]=O,i(x,_),x}function h(g){var v="",x;for(x=0;x<4;x+=1)v+=s[g>>x*8+4&15]+s[g>>x*8&15];return v}function u(g){var v;for(v=0;v<g.length;v+=1)g[v]=h(g[v]);return g.join("")}u(a("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function g(v,x){return v=v|0||0,v<0?Math.max(v+x,0):Math.min(v,x)}ArrayBuffer.prototype.slice=function(v,x){var b=this.byteLength,E=g(v,b),_=b,D,V,O,N;return x!==e&&(_=g(x,b)),E>_?new ArrayBuffer(0):(D=_-E,V=new ArrayBuffer(D),O=new Uint8Array(V),N=new Uint8Array(this,E,D),O.set(N),V)}}();function l(g){return/[\u0080-\uFFFF]/.test(g)&&(g=unescape(encodeURIComponent(g))),g}function f(g,v){var x=g.length,b=new ArrayBuffer(x),E=new Uint8Array(b),_;for(_=0;_<x;_+=1)E[_]=g.charCodeAt(_);return v?E:b}function d(g){return String.fromCharCode.apply(null,new Uint8Array(g))}function p(g,v,x){var b=new Uint8Array(g.byteLength+v.byteLength);return b.set(new Uint8Array(g)),b.set(new Uint8Array(v),g.byteLength),x?b:b.buffer}function m(g){var v=[],x=g.length,b;for(b=0;b<x-1;b+=2)v.push(parseInt(g.substr(b,2),16));return String.fromCharCode.apply(String,v)}function y(){this.reset()}return y.prototype.append=function(g){return this.appendBinary(l(g)),this},y.prototype.appendBinary=function(g){this._buff+=g,this._length+=g.length;var v=this._buff.length,x;for(x=64;x<=v;x+=64)i(this._hash,r(this._buff.substring(x-64,x)));return this._buff=this._buff.substring(x-64),this},y.prototype.end=function(g){var v=this._buff,x=v.length,b,E=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],_;for(b=0;b<x;b+=1)E[b>>2]|=v.charCodeAt(b)<<(b%4<<3);return this._finish(E,x),_=u(this._hash),g&&(_=m(_)),this.reset(),_},y.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},y.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},y.prototype.setState=function(g){return this._buff=g.buff,this._length=g.length,this._hash=g.hash,this},y.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},y.prototype._finish=function(g,v){var x=v,b,E,_;if(g[x>>2]|=128<<(x%4<<3),x>55)for(i(this._hash,g),x=0;x<16;x+=1)g[x]=0;b=this._length*8,b=b.toString(16).match(/(.*?)(.{0,8})$/),E=parseInt(b[2],16),_=parseInt(b[1],16)||0,g[14]=E,g[15]=_,i(this._hash,g)},y.hash=function(g,v){return y.hashBinary(l(g),v)},y.hashBinary=function(g,v){var x=a(g),b=u(x);return v?m(b):b},y.ArrayBuffer=function(){this.reset()},y.ArrayBuffer.prototype.append=function(g){var v=p(this._buff.buffer,g,!0),x=v.length,b;for(this._length+=g.byteLength,b=64;b<=x;b+=64)i(this._hash,o(v.subarray(b-64,b)));return this._buff=b-64<x?new Uint8Array(v.buffer.slice(b-64)):new Uint8Array(0),this},y.ArrayBuffer.prototype.end=function(g){var v=this._buff,x=v.length,b=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],E,_;for(E=0;E<x;E+=1)b[E>>2]|=v[E]<<(E%4<<3);return this._finish(b,x),_=u(this._hash),g&&(_=m(_)),this.reset(),_},y.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},y.ArrayBuffer.prototype.getState=function(){var g=y.prototype.getState.call(this);return g.buff=d(g.buff),g},y.ArrayBuffer.prototype.setState=function(g){return g.buff=f(g.buff,!0),y.prototype.setState.call(this,g)},y.ArrayBuffer.prototype.destroy=y.prototype.destroy,y.ArrayBuffer.prototype._finish=y.prototype._finish,y.ArrayBuffer.hash=function(g,v){var x=c(new Uint8Array(g)),b=u(x);return v?m(b):b},y})})(vm);var r2=vm.exports;const o2=Kc(r2);function a2(n='script[type="text/js-worker"]'){return Array.prototype.map.call(document.querySelectorAll(n),t=>t.textContent)}const Jc=n=>new XMLSerializer().serializeToString(n),c2=(n,t="text/html")=>new DOMParser().parseFromString(n,t),bm=(n,t={mime:Ze["image/svg+xml"],encode:Br.utf8})=>hc(Jc(n),t);async function Zc(n=["*"],t){let e=[];const s=document.createElement("input");return s.setAttribute("type","file"),s.setAttribute("visibility","hidden"),s.setAttribute("accept",n.join(",")),t&&s.setAttribute("multiple","true"),s.addEventListener("click",i=>{s.value=""},!1),new Promise((i,r)=>{s.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}),s.click()}).then(i=>(s.remove(),i)).catch(i=>{throw s.remove(),i})}function Pi(n,t=Re.text,e){return new Promise((s,i)=>{const r=new FileReader;switch(r.addEventListener("progress",o=>{e?.(o.loaded,o.total)}),r.addEventListener("load",o=>{s(o.target?.result)}),r.addEventListener("error",o=>{i(o)}),t){case Re.dataURL:r.readAsDataURL(n);break;case Re.binaryString:r.readAsBinaryString(n);break;case Re.arraybuffer:r.readAsArrayBuffer(n);break;case Re.text:default:r.readAsText(n)}})}async function h2(n){const t=await Pi(n,Re.arraybuffer);return Ub(t)}function wm(n,t,e,s,i,r,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<s.size)wm(n,t,e,s,i,o,Math.min(o+i,s.size));else return n(e.end())}),a.addEventListener("error",c=>t(c)),a.readAsArrayBuffer(s.slice(r,o))}async function xm(n,t=1048576){return await new Promise((e,s)=>wm(e,s,new o2.ArrayBuffer,n,t,0,Math.min(t,n.size)))}class u2{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 n2({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 xm(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(()=>{Ew(this.time,1),this.onTime?.(xw(this.time))},1e3)}stopTimeCount(){this.timer&&(clearInterval(this.timer),this.timer=void 0)}}function Sm(){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,s=t.length;e<s;e++)try{n=new window.ActiveXObject(t[e]);break}catch{continue}}else n=new XMLHttpRequest;return n}function _m(n,t){return new Promise((e,s)=>{const{method:i="GET",data:r={},multipartFormDataString:o="",boundary:a="",headers:c={},withCredentials:h=!1,responseType:u="json",timeout:l=3e4}=t||{},f=Sm();f.timeout=l,f.responseType=u,f.onreadystatechange=function(v){f.readyState===4&&(f.status===200?e(f.response):s(f.statusText))},f.ontimeout=()=>{s(`${n} is timed out for ${l}ms.`)},f.addEventListener("load",v=>t?.load?.(v,f),!1),f.addEventListener("loadstart",v=>t?.loadstart?.(v,f),!1),f.addEventListener("loadend",v=>t?.loadend?.(v,f),!1),f.addEventListener("progress",v=>{if(v.lengthComputable){const x=Math.round(v.loaded*100/v.total);t?.progress?.(v,f,x)}},!1),f.addEventListener("error",v=>t?.error?.(v,f),!1),f.addEventListener("abort",v=>t?.abort?.(v,f),!1);const d=i.toUpperCase();Object.assign(c,{Accept:"*/*"});let p=!1,m=!1,y=!1;function g(){f.setRequestHeader("If-Modified-Since","Sat, 1 Jan 2000 00:00:00 GMT"),h&&(f.withCredentials=!0);for(const v in c)qt(v).toLowerCase()=="content-type"&&c[v].toLowerCase()=="multipart/form-data"?(p=!0,f.setRequestHeader("Content-Type","multipart/form-data; boundary="+a)):(qt(v).toLowerCase()=="content-type"&&(c[v].toLowerCase().indexOf("text/plain")>=0?m=!0:c[v].toLowerCase().indexOf("application/json")>=0&&(y=!0)),f.setRequestHeader(v,c[v]))}switch(d){case"GET":let v="";r instanceof FormData?v=Sx(r):v=xx(r),f.open("GET",bx(n,v),!0),g(),f.send(null);break;default:f.open(d,n,!0),g(),p?f.sendAsBinary(o):y?f.send(JSON.stringify(r)):m?f.send(Object.entries(r).map(([x,b])=>`${x}=${b}`).join(`\r
19
+ `)):f.send(Object.entries(r).map(([x,b])=>`${encodeURIComponent(x)}=${encodeURIComponent(b)}`).join("&"));break}})}async function l2(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=[],s=t.contentType=="multipart/form-data";for(let i=0;i<n.elements.length;i++){const r=n.elements[i];if(!r.hasAttribute("name"))continue;const o=r.getAttribute("type");switch(r.nodeName.toUpperCase()==="INPUT"&&o?o.toUpperCase():""){case"FILE":const c=r;if(s)for(let l=0,f=c.files?.length||0;l<f;l++){const d=c.files?.[l];if(d){const p=await Pi(d,Re.binaryString);e.push('Content-Disposition: form-data; name="'+c.name+'"; filename="'+d.name+`"\r
20
+ Content-Type: `+d.type+`\r
21
+ \r
22
+ `+p+`\r
23
+ `)}}break;case"RADIO":case"CHECKBOX":if(!r.checked)break;default:const u=r;s?e.push('Content-Disposition: form-data; name="'+u.name+`"\r
24
+ \r
25
+ `+u.value+`\r
26
+ `):t.data[u.name]=u.value;break}}return t.multipartFormDataString="--"+t.boundary+`\r
27
+ `+e.join("--"+t.boundary+`\r
28
+ `)+"--"+t.boundary+`--\r
29
+ `,t}function Em(n){const t=[];for(let e=0,s=el.length;e<s;e++){const i=qt(el[e]+n);t.push(i)}return t}function Ai(n,t,e){const s=xl(n);return s.props.style=s.props.style||{},t?s.props.style[t]||s.props.style[sd(t)]||s.props.style[qt(t)]||"":s.props.style}function Us(n,t,e){xa(n,s=>{s.props.style=s.props.style||{},typeof t=="string"&&e?s.props.style[t]=e:t instanceof Object&&Object.keys(t).forEach(i=>{s.props.style[i]=t[i]})}),Sl()}function Qc(n,t=!1){const e={};if(!t)if(getComputedStyle){const s=getComputedStyle(n);for(let i=0,r=s.length;i<r;i++){const o=s[i];e[o]=s.getPropertyValue(o)}}else{const s=n.style||n.currentStyle;for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}return n.style.cssText&&n.style.cssText.split(";").filter(s=>!!s).forEach(s=>{const[i,r]=s.split(":").map(o=>o.trim());i&&r&&(e[i]=r)}),e}function f2(n,t){const e=Em(t),s=e.length;let i="";for(let r=0;r<s;r++){const o=e[r];if(i=n[o]||"",i)return i}return i}function d2(n,t,e){const s=Em(t),i=s.length;let r="";for(let o=0;o<i;o++){const a=s[o];if(r="style"in n&&n.style[a]||"currentStyle"in n&&n.currentStyle[a]||"",r)return r}if(getComputedStyle){const o=getComputedStyle(n,e);for(let a=0;a<i;a++){const c=s[a];if(r=o.getPropertyValue(c).trim(),r)return r}}return r}function Mi(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(s=>{Mi(n,s,t[s])})}function th(n,t){typeof t=="string"?n.style.removeProperty(qt(t)):Object.keys(t).forEach(e=>{th(n,e)})}function Tm(n,t){let e;if(typeof t=="string"){const s=document.querySelector(t)?.shadowRoot;s?e=s:e=document.querySelector(t)}else e=t||document.getElementsByTagName("head")[0];if(e){const s=document.createElement("style");return s.innerHTML=n,e.appendChild(s),()=>{(e instanceof HTMLElement||e instanceof ShadowRoot)&&e.removeChild(s)}}else{const s=document.styleSheets[0].insertRule(n);return()=>{document.styleSheets[0].deleteRule(s)}}}class m2{selector;name;value;constructor(t,e,s){this.selector=t,this.name=e,this.value=s}toString(){return`${this.selector} { ${this.name}: ${this.value} }`}}class p2{propertyName;values=[];constructor(t){this.propertyName=t}add(t,e){this.values.push(new m2(t,this.propertyName,e))}}async function Cm(){const n=[],t=document.querySelectorAll("style, link");for(let e=0,s=t.length;e<s;e++){const i=t[e];let r=i.innerHTML;switch(i.nodeName.toLowerCase()){case"style":break;case"link":r=await _m(i.href,{method:"GET",responseType:"text"});break}r=r.replace(/\/\/.+?(?=\n|\r|$)|\/\*[\s\S]+?\*\//g,"").replace(/@[^{};]*;|@[^{};]*\{[^}]*\}/g,"").replace(/[\\n\n]+(?<=[\\n\n]+)\s+/g,""),n.push(r)}return n}async function g2(){const n={},t=await Cm();for(let e=0,s=t.length;e<s;e++){const r=t[e].match(/[^{]*{[^}]*}/g);if(r)for(let o=0,a=r.length;o<a;o++){const c=r[o].split(/[{}]/g),h=c[0].trim(),l=c[1].split(";");for(let f=0;f<l.length;f++)if(l[f].trim()!=""){const d=l[f].split(":"),p=d[0].trim().toLowerCase(),m=d[1];n[p]||(n[p]=new p2(p)),m&&n[p].add(h,m.trim())}}}return n}function Fn(n,t,e){if(t===void 0&&e===void 0)return eh(n);if(typeof t=="string"&&e===void 0)return Pm(n,t);typeof t=="object"?xa(n,s=>{for(const i in t)i=="style"?Us(n,i,t[i]):Object.prototype.hasOwnProperty.call(t,i)&&(s.props[i]=""+t[i])}):typeof t=="string"&&typeof e=="string"&&(t=="style"?Us(n,t,e):xa(n,s=>{s.props[t]=""+e})),Sl()}function eh(n){const t={};for(let e=0,s=n.attributes,i=s.length;e<i;e++){const r=s[e];r.nodeName&&r.nodeValue&&(r.nodeName==="style"?t[r.nodeName]=Qc(n,!0):t[r.nodeName]=r.nodeValue)}return t}function Pm(n,t){return t==="style"?Qc(n,!0):n.getAttribute(qt(t))}function ps(n,t,e){return n.setAttribute(qt(t),""+e)}function y2(n,t){t.split(/[,\s]+/i).forEach(e=>{const s=qt(e.trim());s!=""&&n.removeAttribute(s)})}function Am(n,t){for(const e in t){const s=t[e];switch(e){case"fill":s!=="none"&&(n.fillStyle=s);break;case"stroke":s!=="none"&&(n.strokeStyle=s);break;case"stroke-width":case"strokeWidth":n.lineWidth=Number(s);break;case"stroke-linecap":case"strokeLinecap":n.lineCap=s;break;case"stroke-linejoin":case"strokeLinejoin":switch(s){case"round":case"bevel":case"miter":n.lineJoin=s;break;default:n.lineJoin="miter";break}break;case"stroke-miterlimit":case"strokeMiterlimit":n.miterLimit=Number(s);break;case"stroke-opacity":case"strokeOpacity":break;case"stroke-dashoffset":case"strokeDashoffset":n.lineDashOffset=Number(s);break;case"stroke-dasharray":case"strokeDasharray":typeof s=="string"&&n.setLineDash(s.split(/\s+/).map(i=>Number(i)));break;case"cursor":break;case"font":typeof s=="string"&&(n.font=s);break;case"font-size":case"fontSize":n.font+=` ${s}`;break;case"font-family":case"fontFamily":n.font+=` ${s}`;break;case"font-weight":case"fontWeight":break;case"font-style":case"fontStyle":break;case"text-anchor":case"textAnchor":switch(s){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(s){case"middle":case"bottom":case"top":case"alphabetic":case"hanging":case"ideographic":n.textBaseline=s;break;default:n.textBaseline="alphabetic";break}break}}}var nh=function(n,t){return nh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,s){e.__proto__=s}||function(e,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])},nh(n,t)};function tn(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");nh(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function v2(n,t,e,s){function i(r){return r instanceof e?r:new e(function(o){o(r)})}return new(e||(e=Promise))(function(r,o){function a(u){try{h(s.next(u))}catch(l){o(l)}}function c(u){try{h(s.throw(u))}catch(l){o(l)}}function h(u){u.done?r(u.value):i(u.value).then(a,c)}h((s=s.apply(n,t||[])).next())})}function Mm(n,t){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},s,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(h){return function(u){return c([h,u])}}function c(h){if(s)throw new TypeError("Generator is already executing.");for(;o&&(o=0,h[0]&&(e=0)),e;)try{if(s=1,i&&(r=h[0]&2?i.return:h[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,h[1])).done)return r;switch(i=0,r&&(h=[h[0]&2,r.value]),h[0]){case 0:case 1:r=h;break;case 4:return e.label++,{value:h[1],done:!1};case 5:e.label++,i=h[1],h=[0];continue;case 7:h=e.ops.pop(),e.trys.pop();continue;default:if(r=e.trys,!(r=r.length>0&&r[r.length-1])&&(h[0]===6||h[0]===2)){e=0;continue}if(h[0]===3&&(!r||h[1]>r[0]&&h[1]<r[3])){e.label=h[1];break}if(h[0]===6&&e.label<r[1]){e.label=r[1],r=h;break}if(r&&e.label<r[2]){e.label=r[2],e.ops.push(h);break}r[2]&&e.ops.pop(),e.trys.pop();continue}h=t.call(n,e)}catch(u){h=[6,u],i=0}finally{s=r=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}}function gs(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],s=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&s>=n.length&&(n=void 0),{value:n&&n[s++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function vn(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var s=e.call(n),i,r=[],o;try{for(;(t===void 0||t-- >0)&&!(i=s.next()).done;)r.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(e=s.return)&&e.call(s)}finally{if(o)throw o.error}}return r}function Bn(n,t,e){if(e||arguments.length===2)for(var s=0,i=t.length,r;s<i;s++)(r||!(s in t))&&(r||(r=Array.prototype.slice.call(t,0,s)),r[s]=t[s]);return n.concat(r||Array.prototype.slice.call(t))}function Ys(n){return this instanceof Ys?(this.v=n,this):new Ys(n)}function b2(n,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=e.apply(n,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(d){return function(p){return Promise.resolve(p).then(d,l)}}function a(d,p){s[d]&&(i[d]=function(m){return new Promise(function(y,g){r.push([d,m,y,g])>1||c(d,m)})},p&&(i[d]=p(i[d])))}function c(d,p){try{h(s[d](p))}catch(m){f(r[0][3],m)}}function h(d){d.value instanceof Ys?Promise.resolve(d.value.v).then(u,l):f(r[0][2],d)}function u(d){c("next",d)}function l(d){c("throw",d)}function f(d,p){d(p),r.shift(),r.length&&c(r[0][0],r[0][1])}}function w2(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 gs=="function"?gs(n):n[Symbol.iterator](),e={},s("next"),s("throw"),s("return"),e[Symbol.asyncIterator]=function(){return this},e);function s(r){e[r]=n[r]&&function(o){return new Promise(function(a,c){o=n[r](o),i(a,c,o.done,o.value)})}}function i(r,o,a,c){Promise.resolve(c).then(function(h){r({value:h,done:a})},o)}}typeof SuppressedError=="function"&&SuppressedError;function Tt(n){return typeof n=="function"}function sh(n){var t=function(s){Error.call(s),s.stack=new Error().stack},e=n(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var ih=sh(function(n){return function(e){n(this),this.message=e?e.length+` errors occurred during unsubscription:
30
+ `+e.map(function(s,i){return i+1+") "+s.toString()}).join(`
31
+ `):"",this.name="UnsubscriptionError",this.errors=e}});function Di(n,t){if(n){var e=n.indexOf(t);0<=e&&n.splice(e,1)}}var Gs=function(){function n(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var t,e,s,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=gs(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(Tt(u))try{u()}catch(m){r=m instanceof ih?m.errors:[m]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var f=gs(l),d=f.next();!d.done;d=f.next()){var p=d.value;try{Om(p)}catch(m){r=r??[],m instanceof ih?r=Bn(Bn([],vn(r)),vn(m.errors)):r.push(m)}}}catch(m){s={error:m}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(s)throw s.error}}}if(r)throw new ih(r)}},n.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Om(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)&&Di(e,t)},n.prototype.remove=function(t){var e=this._finalizers;e&&Di(e,t),t instanceof n&&t._removeParent(this)},n.EMPTY=function(){var t=new n;return t.closed=!0,t}(),n}(),Dm=Gs.EMPTY;function Rm(n){return n instanceof Gs||n&&"closed"in n&&Tt(n.remove)&&Tt(n.add)&&Tt(n.unsubscribe)}function Om(n){Tt(n)?n():n.unsubscribe()}var Im={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},rh={setTimeout:function(n,t){for(var e=[],s=2;s<arguments.length;s++)e[s-2]=arguments[s];var i=rh.delegate;return i?.setTimeout?i.setTimeout.apply(i,Bn([n,t],vn(e))):setTimeout.apply(void 0,Bn([n,t],vn(e)))},clearTimeout:function(n){var t=rh.delegate;return(t?.clearTimeout||clearTimeout)(n)},delegate:void 0};function km(n){rh.setTimeout(function(){throw n})}function Ri(){}function fo(n){n()}var oh=function(n){tn(t,n);function t(e){var s=n.call(this)||this;return s.isStopped=!1,e?(s.destination=e,Rm(e)&&e.add(s)):s.destination=E2,s}return t.create=function(e,s,i){return new Xs(e,s,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,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}(Gs),x2=Function.prototype.bind;function ah(n,t){return x2.call(n,t)}var S2=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(s){mo(s)}},n.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(s){mo(s)}else mo(t)},n.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){mo(e)}},n}(),Xs=function(n){tn(t,n);function t(e,s,i){var r=n.call(this)||this,o;if(Tt(e)||!e)o={next:e??void 0,error:s??void 0,complete:i??void 0};else{var a;r&&Im.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return r.unsubscribe()},o={next:e.next&&ah(e.next,a),error:e.error&&ah(e.error,a),complete:e.complete&&ah(e.complete,a)}):o=e}return r.destination=new S2(o),r}return t}(oh);function mo(n){km(n)}function _2(n){throw n}var E2={closed:!0,next:Ri,error:_2,complete:Ri},ch=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function ys(n){return n}function T2(n){return n.length===0?ys:n.length===1?n[0]:function(e){return n.reduce(function(s,i){return i(s)},e)}}var Nt=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,s){var i=this,r=P2(t)?t:new Xs(t,e,s);return fo(function(){var o=i,a=o.operator,c=o.source;r.add(a?a.call(r,c):c?i._subscribe(r):i._trySubscribe(r))}),r},n.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},n.prototype.forEach=function(t,e){var s=this;return e=Lm(e),new e(function(i,r){var o=new Xs({next:function(a){try{t(a)}catch(c){r(c),o.unsubscribe()}},error:r,complete:i});s.subscribe(o)})},n.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},n.prototype[ch]=function(){return this},n.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return T2(t)(this)},n.prototype.toPromise=function(t){var e=this;return t=Lm(t),new t(function(s,i){var r;e.subscribe(function(o){return r=o},function(o){return i(o)},function(){return s(r)})})},n.create=function(t){return new n(t)},n}();function Lm(n){var t;return(t=n??Im.Promise)!==null&&t!==void 0?t:Promise}function C2(n){return n&&Tt(n.next)&&Tt(n.error)&&Tt(n.complete)}function P2(n){return n&&n instanceof oh||C2(n)&&Rm(n)}function A2(n){return Tt(n?.lift)}function ue(n){return function(t){if(A2(t))return t.lift(function(e){try{return n(e,this)}catch(s){this.error(s)}});throw new TypeError("Unable to lift unknown Observable type")}}function $t(n,t,e,s,i){return new M2(n,t,e,s,i)}var M2=function(n){tn(t,n);function t(e,s,i,r,o,a){var c=n.call(this,e)||this;return c.onFinalize=o,c.shouldUnsubscribe=a,c._next=s?function(h){try{s(h)}catch(u){e.error(u)}}:n.prototype._next,c._error=r?function(h){try{r(h)}catch(u){e.error(u)}finally{this.unsubscribe()}}:n.prototype._error,c._complete=i?function(){try{i()}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 s=this.closed;n.prototype.unsubscribe.call(this),!s&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t}(oh),D2=sh(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),bn=function(n){tn(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 s=new Vm(this,this);return s.operator=e,s},t.prototype._throwIfClosed=function(){if(this.closed)throw new D2},t.prototype.next=function(e){var s=this;fo(function(){var i,r;if(s._throwIfClosed(),!s.isStopped){s.currentObservers||(s.currentObservers=Array.from(s.observers));try{for(var o=gs(s.currentObservers),a=o.next();!a.done;a=o.next()){var c=a.value;c.next(e)}}catch(h){i={error:h}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}}})},t.prototype.error=function(e){var s=this;fo(function(){if(s._throwIfClosed(),!s.isStopped){s.hasError=s.isStopped=!0,s.thrownError=e;for(var i=s.observers;i.length;)i.shift().error(e)}})},t.prototype.complete=function(){var e=this;fo(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var s=e.observers;s.length;)s.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 s=this,i=this,r=i.hasError,o=i.isStopped,a=i.observers;return r||o?Dm:(this.currentObservers=null,a.push(e),new Gs(function(){s.currentObservers=null,Di(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var s=this,i=s.hasError,r=s.thrownError,o=s.isStopped;i?e.error(r):o&&e.complete()},t.prototype.asObservable=function(){var e=new Nt;return e.source=this,e},t.create=function(e,s){return new Vm(e,s)},t}(Nt),Vm=function(n){tn(t,n);function t(e,s){var i=n.call(this)||this;return i.destination=e,i.source=s,i}return t.prototype.next=function(e){var s,i;(i=(s=this.destination)===null||s===void 0?void 0:s.next)===null||i===void 0||i.call(s,e)},t.prototype.error=function(e){var s,i;(i=(s=this.destination)===null||s===void 0?void 0:s.error)===null||i===void 0||i.call(s,e)},t.prototype.complete=function(){var e,s;(s=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||s===void 0||s.call(e)},t.prototype._subscribe=function(e){var s,i;return(i=(s=this.source)===null||s===void 0?void 0:s.subscribe(e))!==null&&i!==void 0?i:Dm},t}(bn),po=function(n){tn(t,n);function t(e){var s=n.call(this)||this;return s._value=e,s}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(e){var s=n.prototype._subscribe.call(this,e);return!s.closed&&e.next(this._value),s},t.prototype.getValue=function(){var e=this,s=e.hasError,i=e.thrownError,r=e._value;if(s)throw i;return this._throwIfClosed(),r},t.prototype.next=function(e){n.prototype.next.call(this,this._value=e)},t}(bn),hh={now:function(){return(hh.delegate||Date).now()},delegate:void 0},R2=function(n){tn(t,n);function t(e,s,i){e===void 0&&(e=1/0),s===void 0&&(s=1/0),i===void 0&&(i=hh);var r=n.call(this)||this;return r._bufferSize=e,r._windowTime=s,r._timestampProvider=i,r._buffer=[],r._infiniteTimeWindow=!0,r._infiniteTimeWindow=s===1/0,r._bufferSize=Math.max(1,e),r._windowTime=Math.max(1,s),r}return t.prototype.next=function(e){var s=this,i=s.isStopped,r=s._buffer,o=s._infiniteTimeWindow,a=s._timestampProvider,c=s._windowTime;i||(r.push(e),!o&&r.push(a.now()+c)),this._trimBuffer(),n.prototype.next.call(this,e)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var s=this._innerSubscribe(e),i=this,r=i._infiniteTimeWindow,o=i._buffer,a=o.slice(),c=0;c<a.length&&!e.closed;c+=r?1:2)e.next(a[c]);return this._checkFinalizedStatuses(e),s},t.prototype._trimBuffer=function(){var e=this,s=e._bufferSize,i=e._timestampProvider,r=e._buffer,o=e._infiniteTimeWindow,a=(o?1:2)*s;if(s<1/0&&a<r.length&&r.splice(0,r.length-a),!o){for(var c=i.now(),h=0,u=1;u<r.length&&r[u]<=c;u+=2)h=u;h&&r.splice(0,h+1)}},t}(bn),O2=function(n){tn(t,n);function t(e,s){return n.call(this)||this}return t.prototype.schedule=function(e,s){return this},t}(Gs),go={setInterval:function(n,t){for(var e=[],s=2;s<arguments.length;s++)e[s-2]=arguments[s];var i=go.delegate;return i?.setInterval?i.setInterval.apply(i,Bn([n,t],vn(e))):setInterval.apply(void 0,Bn([n,t],vn(e)))},clearInterval:function(n){var t=go.delegate;return(t?.clearInterval||clearInterval)(n)},delegate:void 0},I2=function(n){tn(t,n);function t(e,s){var i=n.call(this,e,s)||this;return i.scheduler=e,i.work=s,i.pending=!1,i}return t.prototype.schedule=function(e,s){var i;if(s===void 0&&(s=0),this.closed)return this;this.state=e;var r=this.id,o=this.scheduler;return r!=null&&(this.id=this.recycleAsyncId(o,r,s)),this.pending=!0,this.delay=s,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(o,this.id,s),this},t.prototype.requestAsyncId=function(e,s,i){return i===void 0&&(i=0),go.setInterval(e.flush.bind(e,this),i)},t.prototype.recycleAsyncId=function(e,s,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return s;s!=null&&go.clearInterval(s)},t.prototype.execute=function(e,s){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(e,s);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,s){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,s=e.id,i=e.scheduler,r=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Di(r,this),s!=null&&(this.id=this.recycleAsyncId(i,s,null)),this.delay=null,n.prototype.unsubscribe.call(this)}},t}(O2),Nm=function(){function n(t,e){e===void 0&&(e=n.now),this.schedulerActionCtor=t,this.now=e}return n.prototype.schedule=function(t,e,s){return e===void 0&&(e=0),new this.schedulerActionCtor(this,t).schedule(s,e)},n.now=hh.now,n}(),k2=function(n){tn(t,n);function t(e,s){s===void 0&&(s=Nm.now);var i=n.call(this,e,s)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(e){var s=this.actions;if(this._active){s.push(e);return}var i;this._active=!0;do if(i=e.execute(e.state,e.delay))break;while(e=s.shift());if(this._active=!1,i){for(;e=s.shift();)e.unsubscribe();throw i}},t}(Nm),uh=new k2(I2),L2=uh,zm=new Nt(function(n){return n.complete()});function Fm(n){return n&&Tt(n.schedule)}function lh(n){return n[n.length-1]}function V2(n){return Tt(lh(n))?n.pop():void 0}function Oi(n){return Fm(lh(n))?n.pop():void 0}function N2(n,t){return typeof lh(n)=="number"?n.pop():t}var fh=function(n){return n&&typeof n.length=="number"&&typeof n!="function"};function Bm(n){return Tt(n?.then)}function jm(n){return Tt(n[ch])}function $m(n){return Symbol.asyncIterator&&Tt(n?.[Symbol.asyncIterator])}function Um(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 z2(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Ym=z2();function Gm(n){return Tt(n?.[Ym])}function Xm(n){return b2(this,arguments,function(){var e,s,i,r;return Mm(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,Ys(e.read())];case 3:return s=o.sent(),i=s.value,r=s.done,r?[4,Ys(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,Ys(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 Wm(n){return Tt(n?.getReader)}function Xt(n){if(n instanceof Nt)return n;if(n!=null){if(jm(n))return F2(n);if(fh(n))return B2(n);if(Bm(n))return j2(n);if($m(n))return Hm(n);if(Gm(n))return $2(n);if(Wm(n))return U2(n)}throw Um(n)}function F2(n){return new Nt(function(t){var e=n[ch]();if(Tt(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function B2(n){return new Nt(function(t){for(var e=0;e<n.length&&!t.closed;e++)t.next(n[e]);t.complete()})}function j2(n){return new Nt(function(t){n.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,km)})}function $2(n){return new Nt(function(t){var e,s;try{for(var i=gs(n),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&&(s=i.return)&&s.call(i)}finally{if(e)throw e.error}}t.complete()})}function Hm(n){return new Nt(function(t){Y2(n,t).catch(function(e){return t.error(e)})})}function U2(n){return Hm(Xm(n))}function Y2(n,t){var e,s,i,r;return v2(this,void 0,void 0,function(){var o,a;return Mm(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),e=w2(n),c.label=1;case 1:return[4,e.next()];case 2:if(s=c.sent(),!!s.done)return[3,4];if(o=s.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(),i={error:a},[3,11];case 6:return c.trys.push([6,,9,10]),s&&!s.done&&(r=e.return)?[4,r.call(e)]:[3,8];case 7:c.sent(),c.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 wn(n,t,e,s,i){s===void 0&&(s=0),i===void 0&&(i=!1);var r=t.schedule(function(){e(),i?n.add(this.schedule(null,s)):this.unsubscribe()},s);if(n.add(r),!i)return r}function qm(n,t){return t===void 0&&(t=0),ue(function(e,s){e.subscribe($t(s,function(i){return wn(s,n,function(){return s.next(i)},t)},function(){return wn(s,n,function(){return s.complete()},t)},function(i){return wn(s,n,function(){return s.error(i)},t)}))})}function dh(n,t){return t===void 0&&(t=0),ue(function(e,s){s.add(n.schedule(function(){return e.subscribe(s)},t))})}function G2(n,t){return Xt(n).pipe(dh(t),qm(t))}function X2(n,t){return Xt(n).pipe(dh(t),qm(t))}function W2(n,t){return new Nt(function(e){var s=0;return t.schedule(function(){s===n.length?e.complete():(e.next(n[s++]),e.closed||this.schedule())})})}function H2(n,t){return new Nt(function(e){var s;return wn(e,t,function(){s=n[Ym](),wn(e,t,function(){var i,r,o;try{i=s.next(),r=i.value,o=i.done}catch(a){e.error(a);return}o?e.complete():e.next(r)},0,!0)}),function(){return Tt(s?.return)&&s.return()}})}function Km(n,t){if(!n)throw new Error("Iterable cannot be null");return new Nt(function(e){wn(e,t,function(){var s=n[Symbol.asyncIterator]();wn(e,t,function(){s.next().then(function(i){i.done?e.complete():e.next(i.value)})},0,!0)})})}function q2(n,t){return Km(Xm(n),t)}function K2(n,t){if(n!=null){if(jm(n))return G2(n,t);if(fh(n))return W2(n,t);if(Bm(n))return X2(n,t);if($m(n))return Km(n,t);if(Gm(n))return H2(n,t);if(Wm(n))return q2(n,t)}throw Um(n)}function Ii(n,t){return t?K2(n,t):Xt(n)}function J2(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=Oi(n);return Ii(n,e)}var Z2=sh(function(n){return function(){n(this),this.name="EmptyError",this.message="no elements in sequence"}});function Q2(n,t){var e=typeof t=="object";return new Promise(function(s,i){var r=new Xs({next:function(o){s(o),r.unsubscribe()},error:i,complete:function(){e?s(t.defaultValue):i(new Z2)}});n.subscribe(r)})}function t_(n){return n instanceof Date&&!isNaN(n)}function zt(n,t){return ue(function(e,s){var i=0;e.subscribe($t(s,function(r){s.next(n.call(t,r,i++))}))})}var e_=Array.isArray;function n_(n,t){return e_(t)?n.apply(void 0,Bn([],vn(t))):n(t)}function mh(n){return zt(function(t){return n_(n,t)})}var s_=Array.isArray,i_=Object.getPrototypeOf,r_=Object.prototype,o_=Object.keys;function a_(n){if(n.length===1){var t=n[0];if(s_(t))return{args:t,keys:null};if(c_(t)){var e=o_(t);return{args:e.map(function(s){return t[s]}),keys:e}}}return{args:n,keys:null}}function c_(n){return n&&typeof n=="object"&&i_(n)===r_}function h_(n,t){return n.reduce(function(e,s,i){return e[s]=t[i],e},{})}function u_(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=Oi(n),s=V2(n),i=a_(n),r=i.args,o=i.keys;if(r.length===0)return Ii([],e);var a=new Nt(l_(r,e,o?function(c){return h_(o,c)}:ys));return s?a.pipe(mh(s)):a}function l_(n,t,e){return e===void 0&&(e=ys),function(s){Jm(t,function(){for(var i=n.length,r=new Array(i),o=i,a=i,c=function(u){Jm(t,function(){var l=Ii(n[u],t),f=!1;l.subscribe($t(s,function(d){r[u]=d,f||(f=!0,a--),a||s.next(e(r.slice()))},function(){--o||s.complete()}))},s)},h=0;h<i;h++)c(h)},s)}}function Jm(n,t,e){n?wn(e,n,t):t()}function f_(n,t,e,s,i,r,o,a){var c=[],h=0,u=0,l=!1,f=function(){l&&!c.length&&!h&&t.complete()},d=function(m){return h<s?p(m):c.push(m)},p=function(m){r&&t.next(m),h++;var y=!1;Xt(e(m,u++)).subscribe($t(t,function(g){i?.(g),r?d(g):t.next(g)},function(){y=!0},void 0,function(){if(y)try{h--;for(var g=function(){var v=c.shift();o?wn(t,o,function(){return p(v)}):p(v)};c.length&&h<s;)g();f()}catch(v){t.error(v)}}))};return n.subscribe($t(t,d,function(){l=!0,f()})),function(){a?.()}}function ph(n,t,e){return e===void 0&&(e=1/0),Tt(t)?ph(function(s,i){return zt(function(r,o){return t(s,r,i,o)})(Xt(n(s,i)))},e):(typeof t=="number"&&(e=t),ue(function(s,i){return f_(s,i,n,e)}))}function Zm(n){return n===void 0&&(n=1/0),ph(ys,n)}function d_(){return Zm(1)}function Qm(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return d_()(Ii(n,Oi(n)))}var m_=["addListener","removeListener"],p_=["addEventListener","removeEventListener"],g_=["on","off"];function gh(n,t,e,s){if(Tt(e)&&(s=e,e=void 0),s)return gh(n,t,e).pipe(mh(s));var i=vn(b_(n)?p_.map(function(a){return function(c){return n[a](t,c,e)}}):y_(n)?m_.map(tp(n,t)):v_(n)?g_.map(tp(n,t)):[],2),r=i[0],o=i[1];if(!r&&fh(n))return ph(function(a){return gh(a,t,e)})(Xt(n));if(!r)throw new TypeError("Invalid event target");return new Nt(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 r(c),function(){return o(c)}})}function tp(n,t){return function(e){return function(s){return n[e](t,s)}}}function y_(n){return Tt(n.addListener)&&Tt(n.removeListener)}function v_(n){return Tt(n.on)&&Tt(n.off)}function b_(n){return Tt(n.addEventListener)&&Tt(n.removeEventListener)}function Lt(n,t,e){return e?Lt(n,t).pipe(mh(e)):new Nt(function(s){var i=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return s.next(o.length===1?o[0]:o)},r=n(i);return Tt(t)?function(){return t(i,r)}:void 0})}function w_(n,t,e){n===void 0&&(n=0),e===void 0&&(e=L2);var s=-1;return t!=null&&(Fm(t)?e=t:s=t),new Nt(function(i){var r=t_(n)?+n-e.now():n;r<0&&(r=0);var o=0;return e.schedule(function(){i.closed||(i.next(o++),0<=s?this.schedule(void 0,s):i.complete())},r)})}function yo(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=Oi(n),s=N2(n,1/0),i=n;return i.length?i.length===1?Xt(i[0]):Zm(s)(Ii(i,e)):zm}var x_=Array.isArray;function S_(n){return n.length===1&&x_(n[0])?n[0]:n}function yh(n,t){return ue(function(e,s){var i=0;e.subscribe($t(s,function(r){return n.call(t,r,i++)&&s.next(r)}))})}function vo(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n=S_(n),n.length===1?Xt(n[0]):new Nt(__(n))}function __(n){return function(t){for(var e=[],s=function(r){e.push(Xt(n[r]).subscribe($t(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<n.length;i++)s(i)}}function ep(n){return ue(function(t,e){var s=null,i=!1,r;s=t.subscribe($t(e,void 0,void 0,function(o){r=Xt(n(o,ep(n)(t))),s?(s.unsubscribe(),s=null,r.subscribe(e)):i=!0})),i&&(s.unsubscribe(),s=null,r.subscribe(e))})}function jn(n,t){return t===void 0&&(t=ys),n=n??E_,ue(function(e,s){var i,r=!0;e.subscribe($t(s,function(o){var a=t(o);(r||!n(i,a))&&(r=!1,i=a,s.next(o))}))})}function E_(n,t){return n===t}function np(n,t){return t?function(e){return e.pipe(np(function(s,i){return Xt(n(s,i)).pipe(zt(function(r,o){return t(s,r,i,o)}))}))}:ue(function(e,s){var i=0,r=null,o=!1;e.subscribe($t(s,function(a){r||(r=$t(s,void 0,function(){r=null,o&&s.complete()}),Xt(n(a,i++)).subscribe(r))},function(){o=!0,!r&&s.complete()}))})}function T_(n){n===void 0&&(n={});var t=n.connector,e=t===void 0?function(){return new bn}:t,s=n.resetOnError,i=s===void 0?!0:s,r=n.resetOnComplete,o=r===void 0?!0:r,a=n.resetOnRefCountZero,c=a===void 0?!0:a;return function(h){var u,l,f,d=0,p=!1,m=!1,y=function(){l?.unsubscribe(),l=void 0},g=function(){y(),u=f=void 0,p=m=!1},v=function(){var x=u;g(),x?.unsubscribe()};return ue(function(x,b){d++,!m&&!p&&y();var E=f=f??e();b.add(function(){d--,d===0&&!m&&!p&&(l=vh(v,c))}),E.subscribe(b),!u&&d>0&&(u=new Xs({next:function(_){return E.next(_)},error:function(_){m=!0,y(),l=vh(g,i,_),E.error(_)},complete:function(){p=!0,y(),l=vh(g,o),E.complete()}}),Xt(x).subscribe(u))})(h)}}function vh(n,t){for(var e=[],s=2;s<arguments.length;s++)e[s-2]=arguments[s];if(t===!0){n();return}if(t!==!1){var i=new Xs({next:function(){i.unsubscribe(),n()}});return Xt(t.apply(void 0,Bn([],vn(e)))).subscribe(i)}}function sp(n,t,e){var s,i,r,o,a=!1;return n&&typeof n=="object"?(s=n.bufferSize,o=s===void 0?1/0:s,i=n.windowTime,t=i===void 0?1/0:i,r=n.refCount,a=r===void 0?!1:r,e=n.scheduler):o=n??1/0,T_({connector:function(){return new R2(o,t,e)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:a})}function vs(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=Oi(n);return ue(function(s,i){(e?Qm(n,s,e):Qm(n,s)).subscribe(i)})}function bo(n,t){return ue(function(e,s){var i=null,r=0,o=!1,a=function(){return o&&!i&&s.complete()};e.subscribe($t(s,function(c){i?.unsubscribe();var h=0,u=r++;Xt(n(c,u)).subscribe(i=$t(s,function(l){return s.next(t?t(c,l,u,h++):l)},function(){i=null,a()}))},function(){o=!0,a()}))})}function C_(){return bo(ys)}function bh(n){return ue(function(t,e){Xt(n).subscribe($t(e,function(){return e.complete()},Ri)),!e.closed&&t.subscribe(e)})}function bs(n,t,e){var s=Tt(n)||t||e?{next:n,error:t,complete:e}:n;return s?ue(function(i,r){var o;(o=s.subscribe)===null||o===void 0||o.call(s);var a=!0;i.subscribe($t(r,function(c){var h;(h=s.next)===null||h===void 0||h.call(s,c),r.next(c)},function(){var c;a=!1,(c=s.complete)===null||c===void 0||c.call(s),r.complete()},function(c){var h;a=!1,(h=s.error)===null||h===void 0||h.call(s,c),r.error(c)},function(){var c,h;a&&((c=s.unsubscribe)===null||c===void 0||c.call(s)),(h=s.finalize)===null||h===void 0||h.call(s)}))}):ys}function P_(n,t){return ue(function(e,s){var i=t??{},r=i.leading,o=r===void 0?!0:r,a=i.trailing,c=a===void 0?!1:a,h=!1,u=null,l=null,f=!1,d=function(){l?.unsubscribe(),l=null,c&&(y(),f&&s.complete())},p=function(){l=null,f&&s.complete()},m=function(g){return l=Xt(n(g)).subscribe($t(s,d,p))},y=function(){if(h){h=!1;var g=u;u=null,s.next(g),!f&&m(g)}};e.subscribe($t(s,function(g){h=!0,u=g,!(l&&!l.closed)&&(o?y():m(g))},function(){f=!0,!(c&&h&&l&&!l.closed)&&s.complete()}))})}function A_(n,t,e){t===void 0&&(t=uh);var s=w_(n,t);return P_(function(){return s},e)}function M_(n,t){return ue(function(e,s){var i=[],r=function(o){for(;0<i.length;)i.shift().error(o);s.error(o)};Xt(n).subscribe($t(s,function(o){var a=new bn;i.push(a);var c=new Gs,h=function(){Di(i,a),a.complete(),c.unsubscribe()},u;try{u=Xt(t(o))}catch(l){r(l);return}s.next(a.asObservable()),c.add(u.subscribe($t(s,h,Ri,r)))},Ri)),e.subscribe($t(s,function(o){var a,c,h=i.slice();try{for(var u=gs(h),l=u.next();!l.done;l=u.next()){var f=l.value;f.next(o)}}catch(d){a={error:d}}finally{try{l&&!l.done&&(c=u.return)&&c.call(u)}finally{if(a)throw a.error}}},function(){for(;0<i.length;)i.shift().complete();s.complete()},r,function(){for(;0<i.length;)i.shift().unsubscribe()}))})}function D_(n){return n.toElement?n.toElement:n.currentTarget?n.currentTarget:n.srcElement?n.srcElement:null}function Ct(n,t,e,s=!1){const i=async r=>{await e(r)};try{n.addEventListener(t,i,s)}catch{n.attachEvent("on"+t,i)}return()=>{try{n.removeEventListener(t,i,s)}catch{n.detachEvent("on"+t,i)}}}function R_(n,t,e,s,i=!1){return Ct(n||document.body,e,r=>{r.target===t&&s(r)},i)}function O_(n){n.replaceWith(n.cloneNode(!0))}function ot(n,t,e=!1){return gh(n,t,{capture:e})}function I_(n){const t=Lt(e=>n.register(e),(e,s)=>{n.unregister?.(e,...s||[])},(...e)=>[...e]);return n.share?t.pipe(sp({bufferSize:n.bufferSize||1,refCount:!0})):t}function ip(n){if(n.stopPropagation){n.stopPropagation();return}try{n.cancelBubble=!0}catch{}}function $n(n){if(n.preventDefault){n.preventDefault();return}try{n.returnValue=!1}catch{}}const k_=["click","dblclick","wheel","contextmenu","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave"],L_=["keydown","keyup","keypress"],V_=["touchstart","touchend","touchcancel","touchmove"],N_=["pointerdown","pointerup","pointercancel","pointermove"],z_=["dragstart","drag","dragend","dragenter","dragover","dragleave","drop"],F_=["change"];function wo(n,t={bubbles:!0,detail:{}}){let e;try{const s=Object.assign({bubbles:!0,cancelable:!0,view:window,detail:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null},t);k_.includes(n)?e=new MouseEvent(n,s):L_.includes(n)?e=new KeyboardEvent(n,s):V_.includes(n)?e=new TouchEvent(n,s):N_.includes(n)?e=new PointerEvent(n,s):z_.includes(n)?e=new DragEvent(n,s):F_.includes(n)?e=new Event(n,s):e=new CustomEvent(n,s)}catch{document.createEvent?e=document.createEvent("Event").initEvent(n,!0,!0):document.createEventObject&&(e=document.createEventObject())}return e}function wh(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 B_(n,t){const e=n.target,s=wo(t);wh(e,t,s)}function j_(n){const t=n.target,e="click";if(!/(SELECT|INPUT|TEXTAREA)/i.test(t.tagName)){const s=wo(e);s.view=n.view||window,s.detail=1,s.screenX=t.screenX||0,s.screenY=t.screenY||0,s.clientX=t.clientX||0,s.clientY=t.clientY||0,s.pageX=n.pageX,s.pageY=n.pageY,s.ctrlKey=!!n.ctrlKey,s.altKey=!!n.altKey,s.shiftKey=!!n.shiftKey,s.metaKey=!!n.metaKey,s.button=0,s.relatedTarget=null,s._constructed=!0,wh(t,e,s)}}function $_(n,t){const e=n.changedTouches[0];return wo(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 U_(n,t,e,s,i){const r=t/e;let o=0,a=0;switch(n){case"aspectFit":r>=1?(o=s,a=o/r,a>i&&(a=i,o=a*r)):(a=i,o=a*r,o>s&&(o=s,a=o/r));break;case"aspectFill":r>=1?(a=i,o=a*r):(o=s,a=o/r);break;case"widthFix":o=s,a=o/r;break;case"heightFix":a=i,o=a*r;break;case"scaleToFill":default:o=s,a=i;break}return{width:o,height:a}}function rp(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 Y_=n=>{const t=n.width,e=n.height,s=t*e*3,i=s+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,s&255,s>>8&255,s>>16&255,s>>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 f=String.fromCharCode;do{const p=u*(l-1);let m="";for(let y=0;y<t;y++){const g=y<<2;m+=f(c[p+g+2])+f(c[p+g+1])+f(c[p+g])}for(let y=0;y<a;y++)m+=String.fromCharCode(0);h+=m}while(--l);function d(p){if(!window.btoa)throw"btoa undefined";let m="";if(typeof p=="string")m=p;else for(let y=0;y<p.length;y++)m+=String.fromCharCode(p[y]);return btoa(m)}return d(r.concat(o))+d(h)};function G_(n){const{width:t,height:e}=n,s=document.createElement("canvas"),i=s.getContext("2d");return s.width=t,s.height=e,i.putImageData(n,0,0,0,0,t,e),s.toDataURL("image/png")}const X_=(n,t,e)=>{const{width:s,height:i}=n,r=document.createElement("canvas"),o=r.getContext("2d");r.width=s,r.height=i,o.putImageData(n,0,0,0,0,s,i);const a=`image/${t?t.toLowerCase():"png"}`;r.toBlob(c=>{e?.(null,c)},a,1)};function W_(n,t){return createImageBitmap(n,t)}function H_(n){const t=[],e=[],s=[];let i=0;for(let c=0,h=n.data.length;c<h;c+=4)t[i]=n.data[c],e[i]=n.data[c+1],s[i]=n.data[c+2],i+=1;const r=xh(t),o=xh(e),a=xh(s);return"rgb("+r+","+o+","+a+")"}function xh(n){const t={},e=[],s=[];for(let a=0;a<n.length;a++)t[n[a]]?e.push(n[a]):t[n[a]]=1;let i=0;for(let a=0;a<e.length;a++){i=0;for(let c=0;c<e.length;c++)e[a]===e[c]&&(i+=1),s[a]=i}const r=Math.max.apply(null,s);let o=0;for(;o<s.length;o++)if(s[o]===r)return;return e[o]}const q_=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let o=0;o<s;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=t[(o*e+e-a-1)*4],i[c+1]=t[(o*e+e-a-1)*4+1],i[c+2]=t[(o*e+e-a-1)*4+2],i[c+3]=t[(o*e+e-a-1)*4+3]}return new ImageData(i,e,s)},K_=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let o=0;o<s;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=t[((s-o-1)*e+a)*4],i[c+1]=t[((s-o-1)*e+a)*4+1],i[c+2]=t[((s-o-1)*e+a)*4+2],i[c+3]=t[((s-o-1)*e+a)*4+3]}return new ImageData(i,e,s)},J_=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let o=0;o<e;o++)for(let a=0;a<s;a++){const c=(o*s+a)*4;i[c]=t[(a*e+e-o-1)*4],i[c+1]=t[(a*e+e-o-1)*4+1],i[c+2]=t[(a*e+e-o-1)*4+2],i[c+3]=t[(a*e+e-o-1)*4+3]}return new ImageData(i,s,e)},Z_=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let o=0;o<e;o++)for(let a=0;a<s;a++){const c=(o*s+a)*4;i[c]=t[((s-a-1)*e+o)*4],i[c+1]=t[((s-a-1)*e+o)*4+1],i[c+2]=t[((s-a-1)*e+o)*4+2],i[c+3]=t[((s-a-1)*e+o)*4+3]}return new ImageData(i,s,e)},Q_=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let o=0;o<s;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c]+t[c+1]+t[c+2])/3;i[c]=h,i[c+1]=h,i[c+2]=h,i[c+3]=t[c+3]}return new ImageData(i,e,s)},tE=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let o=0;o<s;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];i[c]=h,i[c+1]=h,i[c+2]=h,i[c+3]=t[c+3]}return new ImageData(i,e,s)},eE=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let o=0;o<s;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;i[c]=u,i[c+1]=u,i[c+2]=u,i[c+3]=t[c+3]}return new ImageData(i,e,s)},nE=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let o=0;o<s;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=255-t[c],i[c+1]=255-t[c+1],i[c+2]=255-t[c+2],i[c+3]=t[c+3]}return new ImageData(i,e,s)},sE=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let o=0;o<s;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=t[c],i[c+1]=0,i[c+2]=0,i[c+3]=t[c+3]}return new ImageData(i,e,s)},iE=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let o=0;o<s;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=0,i[c+1]=t[c+1],i[c+2]=0,i[c+3]=t[c+3]}return new ImageData(i,e,s)},rE=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let o=0;o<s;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=0,i[c+1]=0,i[c+2]=t[c+2],i[c+3]=t[c+3]}return new ImageData(i,e,s)},oE=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let o=0;o<s;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=t[c],i[c+1]=t[c+1],i[c+2]=0,i[c+3]=t[c+3]}return new ImageData(i,e,s)},aE=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let o=0;o<s;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=t[c],i[c+1]=0,i[c+2]=t[c+1],i[c+3]=t[c+3]}return new ImageData(i,e,s)},cE=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let o=0;o<s;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=0,i[c+1]=t[c+1],i[c+2]=t[c+1],i[c+3]=t[c+3]}return new ImageData(i,e,s)},hE=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let o=0;o<s;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c+1]+t[c+2])/2;i[c]=t[c],i[c+1]=h,i[c+2]=h,i[c+3]=t[c+3]}return new ImageData(i,e,s)},uE=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let o=0;o<s;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c]+t[c+2])/2;i[c]=h,i[c+1]=t[c+1],i[c+2]=h,i[c+3]=t[c+3]}return new ImageData(i,e,s)},lE=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let o=0;o<s;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c]+t[c+1])/2;i[c]=h,i[c+1]=h,i[c+2]=t[c+2],i[c+3]=t[c+3]}return new ImageData(i,e,s)},fE=n=>op(n,[-1,-1,-1,-1,9,-1,-1,-1,-1]),dE=n=>op(n,[-1,-1,-1,-1,8,-1,-1,-1,-1]),mE=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let o=0;o<s;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=t[c],i[c+1]=t[c+1],i[c+2]=t[c+2],i[c+3]=255}return new ImageData(i,e,s)},pE=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let o=0;o<s;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;if(t[c+3]===0)i[c]=255,i[c+1]=255,i[c+2]=255,i[c+3]=255;else{const h=cp([t[c],t[c+1],t[c+2],t[c+3]],[255,255,255,255]);i[c]=h[0],i[c+1]=h[1],i[c+2]=h[2],i[c+3]=h[3]}}return new ImageData(i,e,s)};function gE(n,t,e,s,i,r=!1,o){const{data:a,width:c,height:h}=n;let u=i,l=s,f=t,d=e;if(u<0?u=0:u>c&&(u=c),l<0?l=0:l>h&&(l=h),f<1?f=1:f>c&&(f=c),d<1?d=1:d>h&&(d=h),u+f>c&&(f=c-u),l+d>h&&(d=h-l),r){const p=new Uint8ClampedArray(a.length);for(let y=0;y<h;y++)for(let g=0;g<c;g++){const v=(y*c+g)*4;g>=u&&g<=u+f&&y>=l&&y<=l+d?(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,c,h)}else{const p=new Uint8ClampedArray(f*d*4);for(let y=l;y<=l+d;y++)for(let g=u;g<=u+f;g++){const v=((y-l)*f+g-u)*4,x=(y*c+g)*4;p[v]=a[x],p[v+1]=a[x+1],p[v+2]=a[x+2],p[v+3]=a[x+3]}return new ImageData(p,f,d)}}function yE(n,t,e,s){const{data:i,width:r,height:o}=n;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 c=new Uint8ClampedArray(i.length);for(let u=0;u<o;u++)for(let l=0;l<r;l++){const f=(u*r+l)*4;let d=-1;l<a?u<a?d=Math.sqrt(Math.pow(a-l-1,2)+Math.pow(a-u-1,2)):u>o-a-1&&(d=Math.sqrt(Math.pow(a-l-1,2)+Math.pow(u-(o-a),2))):l>r-a-1&&(u<a?d=Math.sqrt(Math.pow(l-(r-a),2)+Math.pow(a-u-1,2)):u>o-a-1&&(d=Math.sqrt(Math.pow(l-(r-a),2)+Math.pow(u-(o-a),2)))),Math.round(d)>a?(c[f]=255,c[f+1]=255,c[f+2]=255,c[f+3]=s||e.toUpperCase()==="PNG"?0:255):(c[f]=i[f],c[f+1]=i[f+1],c[f+2]=i[f+2],c[f+3]=s||e.toUpperCase()==="PNG"?i[f+3]:255)}return new ImageData(c,r,o)}function vE(n,t,e,s,i,r=1e4){const o=new Image;o.src=n;const a=document.createElement("canvas"),c=a.getContext("2d");return a.width=r,a.height=r,c.drawImage(o,0,0,t,e,0,0,s,i),c.getImageData(0,0,s,i)}function bE(n,t){const{data:e,width:s,height:i}=n,r=new Uint8ClampedArray(e.length);for(let a=0;a<i;a++)for(let c=0;c<s;c++){const h=(a*s+c)*4;r[h]=Math.max(Math.min(e[h]+t,255),0),r[h+1]=Math.max(Math.min(e[h+1]+t,255),0),r[h+2]=Math.max(Math.min(e[h+2]+t,255),0),r[h+3]=e[h+3]}return new ImageData(r,s,i)}function wE(n,t,e=!1){const{data:s,width:i,height:r}=n,o=new Uint8ClampedArray(s.length);for(let c=0;c<r;c++)for(let h=0;h<i;h++){const u=(c*i+h)*4;s[u+3]===0?(o[u]=255,o[u+1]=255,o[u+2]=255):(o[u]=s[u],o[u+1]=s[u+1],o[u+2]=s[u+2]);let l=s[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,i,r)}function xE(n,t,e,s){const{data:i,width:r,height:o}=n,{data:a,width:c,height:h}=t;let u=e,l=s;e+h>o&&(u=o-h),s+c>r&&(l=r-c);const f=new Uint8ClampedArray(i.length);for(let p=0;p<o;p++)for(let m=0;m<r;m++){const y=(p*r+m)*4;if(m<l||m>l+c||p<=u||p>=u+h)f[y]=i[y],f[y+1]=i[y+1],f[y+2]=i[y+2],f[y+3]=i[y+3];else{const g=(p*r+m-((u+1)*r+(p-(u+1))*(r-c))+c-l-1)*4,v=[a[g],a[g+1],a[g+2],a[g+3]],x=[i[y],i[y+1],i[y+2],i[y+3]],b=cp(v,x);f[y]=b[0],f[y+1]=b[1],f[y+2]=b[2],f[y+3]=b[3]}}return new ImageData(f,r,o)}function SE(n,t,e,s,i,r=10){const{data:o,width:a,height:c}=n;let h=i,u=s,l=t,f=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),f<1?f=1:f>c&&(f=c),h+l>a&&(l=a-h),u+f>c&&(f=c-u);const d=new Uint8ClampedArray(o.length);for(let m=0;m<c;m++)for(let y=0;y<a;y++){const g=(m*a+y)*4;if(y>=h&&y<=h+l&&m>=u&&m<=u+f){const v=Math.floor((y-h)/r),x=Math.floor((m-u)/r);let b=Math.floor(r*(v+1)-r/2+h),E=Math.floor(r*(x+1)-r/2+u);b>a-1&&(b=a-1),E>c-1&&(E=c-1);const _=(E*a+b)*4;d[g]=o[_],d[g+1]=o[_+1],d[g+2]=o[_+2],d[g+3]=o[_+3]}else d[g]=o[g],d[g+1]=o[g+1],d[g+2]=o[g+2],d[g+3]=o[g+3]}return new ImageData(d,a,c)}function _E(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:s,width:i,height:r}=n,{data:o}=t,a=new Uint8ClampedArray(s.length),{backgroundColor:c,changeIntoColor:h}=e;for(let l=0;l<r;l++)for(let f=0;f<i;f++){const d=(l*i+f)*4,p=o[d],m=o[d+1],y=o[d+2],g=o[d+3];p===c.r&&m===c.g&&y===c.b&&g===c.a&&h.a!==0?(a[d]=h.r,a[d+1]=h.g,a[d+2]=h.b,a[d+3]=h.a):(a[d]=s[d],a[d+1]=s[d+1],a[d+2]=s[d+2],a[d+3]=s[d+3])}return new ImageData(a,i,r)}return n}function op(n,t){const{data:e,width:s,height:i}=n,r=new Uint8ClampedArray(e.length);for(let a=0;a<i;a++)for(let c=0;c<s;c++){const h=(a*s+c)*4;for(let u=0;u<3;u++){const l=h+u;c===0||c===s-1||a===0||a===i-1?r[l]=e[l]:r[l]=t[0]*e[l-s*4-4]+t[1]*e[l-s*4]+t[2]*e[l-s*4+4]+t[3]*e[l-4]+t[4]*e[l]+t[5]*e[l+4]+t[6]*e[l+s*4-4]+t[7]*e[l+s*4]+t[8]*e[l+s*4+4]}r[h+3]=e[h+3]}return new ImageData(r,s,i)}function cp(n,t){if(n&&n.length===4&&t&&t.length===4){const e=n[3],s=t[3];if(e===255||s===0)return n;if(e===0)return t;{const i=e/255,r=s/255,o=Math.max(Math.min(Math.floor(n[0]*i+t[0]*r*(1-i)),255),0),a=Math.max(Math.min(Math.floor(n[1]*i+t[1]*r*(1-i)),255),0),c=Math.max(Math.min(Math.floor(n[2]*i+t[2]*r*(1-i)),255),0),h=Math.max(Math.min(Math.floor((i+r*(1-i))*255),255),0);return[o,a,c,h]}}return[255,255,255,255]}const Sh=function(){const n=[];return{writeByte(t){n.push(t&255)},writeShort(t){this.writeByte(t),this.writeByte(t>>>8)},writeBytes(t,e=0,s=t.length){for(let i=0;i<s;i++)this.writeByte(t[i+e])},writeString(t){for(let e=0,s=t.length;e<s;e++)this.writeByte(t.charCodeAt(e))},toByteArray(){return n},toString(){let t="[";for(let e=0,s=n.length;e<s;e++)e>0&&(t+=","),t+=n[e];return t+="]",t}}},hp=function(){let n=0,t=0,e=0,s="";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){s+=String.fromCharCode(i(o&63))};return{writeByte(o){for(n=n<<8|o&255,t+=8,e+=1;t>=6;)r(n>>>t-6),t-=6},flush(){if(t>0&&(r(n<<6-t),n=0,t=0),e%3!=0){const o=3-e%3;for(let a=0;a<o;a++)s+="="}},toString(){return s}}},up=function(n,t,e){const s=new Array(n*n),i=function(a){const c=a;let h=0,u=0;return{write(l,f){if(l>>>f)throw new Error("length over");for(;h+f>=8;)c.writeByte(255&(l<<h|u)),f-=8-h,l>>>=8-h,u=0,h=0;u=l<<h|u,h=h+f},flush(){h>0&&c.writeByte(u)}}},r=function(a){const c=1<<a,h=(1<<a)+1;let u=a+1;const l=o();for(let y=0;y<c;y++)l.add(String.fromCharCode(y));l.add(String.fromCharCode(c)),l.add(String.fromCharCode(h));const f=Sh(),d=i(f);d.write(c,u);let p=0,m=String.fromCharCode(s[p]);for(p+=1;p<s.length;){const y=String.fromCharCode(s[p]);p+=1,l.contains(m+y)?m=m+y:(d.write(l.indexOf(m),u),l.size()<4095&&(l.size()==1<<u&&(u+=1),l.add(m+y)),m=y)}return d.write(l.indexOf(m),u),d.write(h,u),d.flush(),f.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){s[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(Ns("0x"+t[1]+t[2])),a.writeByte(Ns("0x"+t[3]+t[4])),a.writeByte(Ns("0x"+t[5]+t[6])),a.writeByte(Ns("0x"+e[1]+e[2])),a.writeByte(Ns("0x"+e[3]+e[4])),a.writeByte(Ns("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=r(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(";")}}},lp=function(n,t,e,s){const i=up(n,t,e);for(let h=0;h<n;h++)for(let u=0;u<n;u++)i.setPixel(u,h,s(u,h));const r=Sh();i.write(r);const o=hp(),a=r.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},Ce={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},ki={M:0,L:1,H:2,Q:3},Un={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},Kt={glog:function(n){if(n<1)throw new Error("glog("+n+")");return Kt.LOG_TABLE[n]},gexp:function(n){for(;n<0;)n+=255;for(;n>=256;)n-=255;return Kt.EXP_TABLE[n]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(let n=0;n<8;n++)Kt.EXP_TABLE[n]=1<<n;for(let n=8;n<256;n++)Kt.EXP_TABLE[n]=Kt.EXP_TABLE[n-4]^Kt.EXP_TABLE[n-5]^Kt.EXP_TABLE[n-6]^Kt.EXP_TABLE[n-8];for(let n=0;n<255;n++)Kt.LOG_TABLE[Kt.EXP_TABLE[n]]=n;const It={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(;It.getBCHDigit(t)-It.getBCHDigit(It.G15)>=0;)t^=It.G15<<It.getBCHDigit(t)-It.getBCHDigit(It.G15);return(n<<10|t)^It.G15_MASK},getBCHTypeNumber:function(n){let t=n<<12;for(;It.getBCHDigit(t)-It.getBCHDigit(It.G18)>=0;)t^=It.G18<<It.getBCHDigit(t)-It.getBCHDigit(It.G18);return n<<12|t},getBCHDigit:function(n){let t=0;for(;n!=0;)t++,n>>>=1;return t},getPatternPosition:function(n){return It.PATTERN_POSITION_TABLE[n-1]},getMask:function(n,t,e){switch(n){case Un.PATTERN000:return(t+e)%2==0;case Un.PATTERN001:return t%2==0;case Un.PATTERN010:return e%3==0;case Un.PATTERN011:return(t+e)%3==0;case Un.PATTERN100:return(Math.floor(t/2)+Math.floor(e/3))%2==0;case Un.PATTERN101:return t*e%2+t*e%3==0;case Un.PATTERN110:return(t*e%2+t*e%3)%2==0;case Un.PATTERN111:return(t*e%3+(t+e)%2)%2==0;default:throw new Error("bad maskPattern:"+n)}},getErrorCorrectPolynomial:function(n){let t=new Ws([1],0);for(let e=0;e<n;e++)t=t.multiply(new Ws([1,Kt.gexp(e)],0));return t},getLengthInBits:function(n,t){if(1<=t&&t<10)switch(n){case Ce.MODE_NUMBER:return 10;case Ce.MODE_ALPHA_NUM:return 9;case Ce.MODE_8BIT_BYTE:return 8;case Ce.MODE_KANJI:return 8;default:throw new Error("mode:"+n)}else if(t<27)switch(n){case Ce.MODE_NUMBER:return 12;case Ce.MODE_ALPHA_NUM:return 11;case Ce.MODE_8BIT_BYTE:return 16;case Ce.MODE_KANJI:return 10;default:throw new Error("mode:"+n)}else if(t<41)switch(n){case Ce.MODE_NUMBER:return 14;case Ce.MODE_ALPHA_NUM:return 13;case Ce.MODE_8BIT_BYTE:return 16;case Ce.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 r=0;r<t;r++)for(let o=0;o<t;o++){let a=0;const c=n.isDark(r,o);for(let h=-1;h<=1;h++)if(!(r+h<0||t<=r+h))for(let u=-1;u<=1;u++)o+u<0||t<=o+u||h==0&&u==0||c==n.isDark(r+h,o+u)&&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;n.isDark(r,o)&&a++,n.isDark(r+1,o)&&a++,n.isDark(r,o+1)&&a++,n.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++)n.isDark(r,o)&&!n.isDark(r,o+1)&&n.isDark(r,o+2)&&n.isDark(r,o+3)&&n.isDark(r,o+4)&&!n.isDark(r,o+5)&&n.isDark(r,o+6)&&(e+=40);for(let r=0;r<t;r++)for(let o=0;o<t-6;o++)n.isDark(o,r)&&!n.isDark(o+1,r)&&n.isDark(o+2,r)&&n.isDark(o+3,r)&&n.isDark(o+4,r)&&!n.isDark(o+5,r)&&n.isDark(o+6,r)&&(e+=40);let s=0;for(let r=0;r<t;r++)for(let o=0;o<t;o++)n.isDark(o,r)&&s++;const i=Math.abs(100*s/t/t-50)/5;return e+=i*10,e}};class Ws{num;constructor(t,e){if(t.length==null)throw new Error(t.length+"/"+e);let s=0;for(;s<t.length&&t[s]==0;)s++;this.num=new Array(t.length-s+e);for(let i=0;i<t.length-s;i++)this.num[i]=t[i+s]}get(t){return this.num[t]}getLength(){return this.num.length}multiply(t){const e=new Array(this.getLength()+t.getLength()-1);for(let s=0;s<this.getLength();s++)for(let i=0;i<t.getLength();i++)e[s+i]^=Kt.gexp(Kt.glog(this.get(s))+Kt.glog(t.get(i)));return new Ws(e,0)}mod(t){if(this.getLength()-t.getLength()<0)return this;const e=Kt.glog(this.get(0))-Kt.glog(t.get(0)),s=new Array(this.getLength());for(let i=0;i<this.getLength();i++)s[i]=this.get(i);for(let i=0;i<t.getLength();i++)s[i]^=Kt.gexp(Kt.glog(t.get(i))+e);return new Ws(s,0).mod(t)}}class xn{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 s=xn.getRsBlockTable(t,e);if(s==null)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);const i=s.length/3,r=[];for(let o=0;o<i;o++){const a=s[o*3+0],c=s[o*3+1],h=s[o*3+2];for(let u=0;u<a;u++)r.push(new xn(c,h))}return r}static getRsBlockTable(t,e){switch(e){case ki.L:return xn.RS_BLOCK_TABLE[(t-1)*4+0];case ki.M:return xn.RS_BLOCK_TABLE[(t-1)*4+1];case ki.Q:return xn.RS_BLOCK_TABLE[(t-1)*4+2];case ki.H:return xn.RS_BLOCK_TABLE[(t-1)*4+3];default:return}}}class fp{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 s=0;s<e;s++)this.putBit((t>>>e-s-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 EE{mode;data;constructor(t){this.mode=Ce.MODE_8BIT_BYTE,this.data=t}getLength(){return this.data.length}write(t){for(let e=0,s=this.data.length;e<s;e++)t.put(this.data.charCodeAt(e),8)}}class Yn{static PAD0=236;static PAD1=17;typeNumber;errorCorrectLevel;modules;moduleCount;dataCache;dataList;constructor(t,e){this.typeNumber=t,this.errorCorrectLevel=ki[e],this.modules=[],this.moduleCount=0,this.dataCache=null,this.dataList=[]}addData(t){const e=new EE(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=xn.getRSBlocks(t,this.errorCorrectLevel),s=new fp;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];s.put(o.mode,4),s.put(o.getLength(),It.getLengthInBits(o.mode,t)),o.write(s)}if(s.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 s=0;s<this.moduleCount;s++){this.modules[s]=new Array(this.moduleCount);for(let i=0;i<this.moduleCount;i++)this.modules[s][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=Yn.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)}setupPositionProbePattern(t,e){for(let s=-1;s<=7;s++)if(!(t+s<=-1||this.moduleCount<=t+s))for(let i=-1;i<=7;i++)e+i<=-1||this.moduleCount<=e+i||(0<=s&&s<=6&&(i==0||i==6)||0<=i&&i<=6&&(s==0||s==6)||2<=s&&s<=4&&2<=i&&i<=4?this.modules[t+s][e+i]=!0:this.modules[t+s][e+i]=!1)}getBestMaskPattern(){let t=0,e=0;for(let s=0;s<8;s++){this.makeImpl(!0,s);const i=It.getLostPoint(this);(s==0||t>i)&&(t=i,e=s)}return e}createMovieClip(t,e,s){const i=t.createEmptyMovieClip(e,s),r=1;this.make();for(let o=0;o<this.modules.length;o++){const a=o*r;for(let c=0;c<this.modules[o].length;c++){const h=c*r;this.modules[o][c]&&(i.beginFill(0,100),i.moveTo(h,a),i.lineTo(h+r,a),i.lineTo(h+r,a+r),i.lineTo(h,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=It.getPatternPosition(this.typeNumber);for(let e=0;e<t.length;e++)for(let s=0;s<t.length;s++){const i=t[e],r=t[s];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=It.getBCHTypeNumber(this.typeNumber);for(let s=0;s<18;s++){const i=!t&&(e>>s&1)==1;this.modules[Math.floor(s/3)][s%3+this.moduleCount-8-3]=i}for(let s=0;s<18;s++){const i=!t&&(e>>s&1)==1;this.modules[s%3+this.moduleCount-8-3][Math.floor(s/3)]=i}}setupTypeInfo(t,e){const s=this.errorCorrectLevel<<3|e,i=It.getBCHTypeInfo(s);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 s=-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 c=0;c<2;c++)if(this.modules[i][a-c]==null){let h=!1;o<t.length&&(h=(t[o]>>>r&1)==1),It.getMask(e,i,a-c)&&(h=!h),this.modules[i][a-c]=h,r--,r==-1&&(o++,r=7)}if(i+=s,i<0||this.moduleCount<=i){i-=s,s=-s;break}}}static createData(t,e,s){const i=xn.getRSBlocks(t,e),r=new fp;for(let a=0;a<s.length;a++){const c=s[a];r.put(c.mode,4),r.put(c.getLength(),It.getLengthInBits(c.mode,t)),c.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(Yn.PAD0,8),r.getLengthInBits()>=o*8));)r.put(Yn.PAD1,8);return Yn.createBytes(r,i)}static createBytes(t,e){let s=0,i=0,r=0;const o=new Array(e.length),a=new Array(e.length);for(let l=0;l<e.length;l++){const f=e[l].dataCount,d=e[l].totalCount-f;i=Math.max(i,f),r=Math.max(r,d),o[l]=new Array(f);for(let g=0;g<o[l].length;g++)o[l][g]=255&t.buffer[g+s];s+=f;const p=It.getErrorCorrectPolynomial(d),y=new Ws(o[l],p.getLength()-1).mod(p);a[l]=new Array(p.getLength()-1);for(let g=0;g<a[l].length;g++){const v=g+y.getLength()-a[l].length;a[l][g]=v>=0?y.get(v):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<i;l++)for(let f=0;f<e.length;f++)l<o[f].length&&(h[u++]=o[f][l]);for(let l=0;l<r;l++)for(let f=0;f<e.length;f++)l<a[f].length&&(h[u++]=a[f][l]);return h}}const dp=Math.ceil,Li=Math.floor,mp=Math.round;function TE(n,t){const e=id(n),s=t?.ecc||"H",i=t?.size||256,r=-1,o=t?.padding||0,a=t?.color||"#000000",c=t?.background||"#ffffff",h=new Yn(r,s);h.addData(e),h.make();const u=h.getModuleCount(),l=(i-o*2)/u,f=o,d=i-o;return lp(i,a,c,function(p,m){if(f<=p&&p<d&&f<=m&&m<d){const y=Li((p-f)/l),g=Li((m-f)/l);return h.isDark(g,y)?0:1}else return 1})}function CE(n,t){const e=t.x||0,s=t.y||0,i=id(n),r=t.ctx,o=t.ecc||"H",a=typeof t.size=="number"?Li(t.size):256,c=t.padding||0,h=-1,u=t.color||"#000000",l=t.background||"#ffffff",f=new Yn(h,o);f.addData(i),f.make();const d=f.getModuleCount(),p=(a-c*2)/d;r.fillStyle=l,r.fillRect(e,s,a,a);for(let m=0;m<d;m++)for(let y=0;y<d;y++){const g=dp((y+1)*p)-Li(y*p),v=dp((m+1)*p)-Li(m*p);r.fillStyle=f.isDark(m,y)?u:l,r.fillRect(e+mp(y*p)+c,s+mp(m*p)+c,g,v)}}function wt(n){return n*Math.PI/180}function Jt(n){return n*180/Math.PI}function Hs(n,t,e=0){return Math.sqrt(n*n+t*t+e*e)}function Gn(n,t,e,s){return Hs(e-n,s-t)}function Pe(n,t,e,s){let i=Math.atan2(s-t,e-n);return i<0&&(i+=Math.PI*2),i}function Xn(n,t){return{dx:Math.cos(n)*t,dy:Math.sin(n)*t}}function PE(n,t,e){if(typeof e=="number"){const s=Hs(n,t,e);return{x:n/=s,y:t/=s,z:e/=s}}else{const s=Hs(n,t);return{x:n/=s,y:t/=s}}}function AE(n,t,e,s,i=10){if(Math.abs(e-n)<i&&Math.abs(s-t)<i)return"no";const r=Jt(Pe(n,t,e,s));return r>=-135&&r<=-45?"up":r>45&&r<135?"down":r>=135&&r<=180||r>=-180&&r<-135?"left":"right"}class xo{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 xo(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,s=this.y;return this.x=t.m11*e+t.m21*s+t.m31,this.y=t.m12*e+t.m22*s+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=rt(this.x,t.x,e.x),this.y=rt(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=rt(this.x,t,e),this.y=rt(this.y,t,e),this}clampLength(t,e){const s=this.length();return this.divideScalar(s||1).multiplyScalar(rt(s,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 s=t.dot(this)/e;return this.copy(t).multiplyScalar(s)}perpendOnVector(t){return pp.copy(this).projectOnVector(t),this.sub(pp)}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 s=this.dot(t)/e;return Math.acos(rt(s,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,s=this.y-t.y;return e*e+s*s}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,s){return this.x=t.x+(e.x-t.x)*s,this.y=t.y+(e.y-t.y)*s,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 s=Math.cos(e),i=Math.sin(e),r=this.x-t.x,o=this.y-t.y;return this.x=r*s-o*i+t.x,this.y=r*i+o*s+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class en{x=0;y=0;z=0;constructor(t=0,e=0,s=0){this.x=t,this.y=e,this.z=s}set(t=0,e=0,s=0){return this.x=t,this.y=e,this.z=s,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 en(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,s=this.y,i=this.z,r=t.value;return this.x=r[0]*e+r[3]*s+r[6]*i,this.y=r[1]*e+r[4]*s+r[7]*i,this.z=r[2]*e+r[5]*s+r[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,s=this.y,i=this.z,r=t.value,o=1/(r[3]*e+r[7]*s+r[11]*i+r[15]);return this.x=(r[0]*e+r[4]*s+r[8]*i+r[12])*o,this.y=(r[1]*e+r[5]*s+r[9]*i+r[13])*o,this.z=(r[2]*e+r[6]*s+r[10]*i+r[14])*o,this}transformDirection(t){const e=this.x,s=this.y,i=this.z,r=t.value;return this.x=r[0]*e+r[4]*s+r[8]*i,this.y=r[1]*e+r[5]*s+r[9]*i,this.z=r[2]*e+r[6]*s+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=rt(this.x,t.x,e.x),this.y=rt(this.y,t.y,e.y),this.z=rt(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=rt(this.x,t,e),this.y=rt(this.y,t,e),this.z=rt(this.z,t,e),this}clampLength(t,e){const s=this.length();return this.divideScalar(s||1).multiplyScalar(rt(s,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,s){return this.x=t.x+(e.x-t.x)*s,this.y=t.y+(e.y-t.y)*s,this.z=t.z+(e.z-t.z)*s,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const s=t.x,i=t.y,r=t.z,o=e.x,a=e.y,c=e.z;return this.x=i*c-r*a,this.y=r*o-s*c,this.z=s*a-i*o,this}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0);const s=t.dot(this)/e;return this.copy(t).multiplyScalar(s)}perpendOnVector(t){return Eh.copy(this).projectOnVector(t),this.sub(Eh)}projectOnPlane(t){return this.perpendOnVector(t)}reflect(t){return this.sub(Eh.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 s=this.dot(t)/e;return Math.acos(rt(s,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,s=this.y-t.y,i=this.z-t.z;return e*e+s*s+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(),s=this.setFromMatrix4Column(t,1).length(),i=this.setFromMatrix4Column(t,2).length();return this.x=e,this.y=s,this.z=i,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,s=Math.sqrt(1-e*e);return this.x=s*Math.cos(t),this.y=e,this.z=s*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}class _h{x=0;y=0;z=0;w=1;constructor(t=0,e=0,s=0,i=1){this.x=t,this.y=e,this.z=s,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,s=0,i=1){return this.x=t,this.y=e,this.z=s,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 _h(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,s=this.y,i=this.z,r=this.w,o=t.value;return this.x=o[0]*e+o[4]*s+o[8]*i+o[12]*r,this.y=o[1]*e+o[5]*s+o[9]*i+o[13]*r,this.z=o[2]*e+o[6]*s+o[10]*i+o[14]*r,this.w=o[3]*e+o[7]*s+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)}setAxisAngleFromRotationMatrix4(t){let e,s,i,r;const c=t.value,h=c[0],u=c[4],l=c[8],f=c[1],d=c[5],p=c[9],m=c[2],y=c[6],g=c[10];if(Math.abs(u-f)<.01&&Math.abs(l-m)<.01&&Math.abs(p-y)<.01){if(Math.abs(u+f)<.1&&Math.abs(l+m)<.1&&Math.abs(p+y)<.1&&Math.abs(h+d+g-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;const x=(h+1)/2,b=(d+1)/2,E=(g+1)/2,_=(u+f)/4,D=(l+m)/4,V=(p+y)/4;return x>b&&x>E?x<.01?(s=0,i=.707106781,r=.707106781):(s=Math.sqrt(x),i=_/s,r=D/s):b>E?b<.01?(s=.707106781,i=0,r=.707106781):(i=Math.sqrt(b),s=_/i,r=V/i):E<.01?(s=.707106781,i=.707106781,r=0):(r=Math.sqrt(E),s=D/r,i=V/r),this.set(s,i,r,e),this}let v=Math.sqrt((y-p)*(y-p)+(l-m)*(l-m)+(f-u)*(f-u));return Math.abs(v)<.001&&(v=1),this.x=(y-p)/v,this.y=(l-m)/v,this.z=(f-u)/v,this.w=Math.acos((h+d+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=rt(this.x,t.x,e.x),this.y=rt(this.y,t.y,e.y),this.z=rt(this.z,t.z,e.z),this.w=rt(this.w,t.w,e.w),this}clampScalar(t,e){return this.x=rt(this.x,t,e),this.y=rt(this.y,t,e),this.z=rt(this.z,t,e),this.w=rt(this.w,t,e),this}clampLength(t,e){const s=this.length();return this.divideScalar(s||1).multiplyScalar(rt(s,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 s=t.dot(this)/e;return this.copy(t).multiplyScalar(s)}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,s){return this.x=t.x+(e.x-t.x)*s,this.y=t.y+(e.y-t.y)*s,this.z=t.z+(e.z-t.z)*s,this.w=t.w+(e.w-t.w)*s,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 pp=new xo,Eh=new en,gp=ME("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 ME(n,t=10){const e={},s=n.split(",");for(let i=0;i<s.length;i+=2){const r="&"+s[i+1]+";",o=parseInt(s[i],t);e[r]="&#"+o+";"}return e["\\xa0"]="&#160;",e}function le(n,t){const e=Object.keys(t);for(let s=0;s<e.length;s++)n=n.replace(new RegExp("{"+e[s]+"}","gi"),""+t[e[s]]);return n}function So(n){let t,e;if(!n)throw new Error("cannot create a random attribute name for an undefined object");const s="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=s[Math.floor(Math.random()*s.length)];while(n[t]);return t}function DE(n){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[n]||t.start}function RE(n){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[n]||t.alphabetic}const Vi={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 _o=class{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}addColorStop(t,e){const s=this.__ctx.__createElement("stop");if(s.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&&(s.setAttribute("stop-color",le("rgb({r},{g},{b})",{r:r[1],g:r[2],b:r[3]})),s.setAttribute("stop-opacity",r[4]))}else s.setAttribute("stop-color",e);this.__root.appendChild(s)}},Th=class{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}},yp=class Kf{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:t,width:e=500,height:s=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=s),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(Vi);for(let e=0,s=t.length;e<s;e++){const i=t[e];this[i]=Vi[i].canvas}}__getStyleState(){const t={},e=Object.keys(Vi);for(let s=0,i=e.length;s<i;s++){const r=e[s];t[r]=this[r]}return t}__applyStyleState(t){const e=Object.keys(t);for(let s=0,i=e.length;s<i;s++){const r=e[s];this[r]=t[r]}}__createElement(t,e={},s=!1){const i=this.__document.createElementNS("http://www.w3.org/2000/svg",t),r=Object.keys(e);s&&(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 s=this.__currentElementsToStyle;s&&(e.setAttribute(t,""),e=s.element,s.children.forEach(r=>{r.setAttribute(t,"")}));const i=Object.keys(Vi);for(let r=0;r<i.length;r++){const o=Vi[i[r]],a=this[i[r]];if(o.apply){if(a instanceof Th){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,le("url(#{id})",{id:a.__root.getAttribute("id")}))}else if(a instanceof _o)e.setAttribute(o.apply,le("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,le("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(i[r]==="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 i=Object.keys(gp);for(let r=0,o=i.length;r<o;r++){const a=i[r],c=gp[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 i=this.__createElement("g");e.appendChild(i),this.__currentElement=i}let s=this.__currentElement.getAttribute("transform");s?s+=" ":s="",s+=t,this.__currentElement.setAttribute("transform",s)}scale(t,e){e===void 0&&(e=t),this.__addTransform(le("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(le("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(le("translate({x},{y})",{x:t,y:e}))}transform(t,e,s,i,r,o){this.__addTransform(le("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:s,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(le("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(le("L {x} {y}",this.__currentPosition)):this.__addPathCommand(le("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,s,i,r,o){this.__currentPosition={x:r,y:o},this.__addPathCommand(le("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:s,cp2y:i,x:r,y:o}))}quadraticCurveTo(t,e,s,i){this.__currentPosition={x:s,y:i},this.__addPathCommand(le("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:s,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,s,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===s&&e===i||r===0){this.lineTo(t,e);return}const c=this.normalize([o-t,a-e]),h=this.normalize([s-t,i-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)),f=this.normalize([c[0]+h[0],c[1]+h[1]]),d=r/Math.sin(l/2),p=t+d*f[0],m=e+d*f[1],y=[-c[1],c[0]],g=[h[1],-h[0]],v=function(E){const _=E[0];return E[1]>=0?Math.acos(_):-Math.acos(_)},x=v(y),b=v(g);this.lineTo(p+y[0]*r,m+y[1]*r),this.arc(p,m,r,x,b)}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,s,i){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+s,e),this.lineTo(t+s,e+i),this.lineTo(t,e+i),this.lineTo(t,e),this.closePath()}fillRect(t,e,s,i){const r=this.__createElement("rect",{x:t,y:e,width:s,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,s,i){const r=this.__createElement("rect",{x:t,y:e,width:s,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),s=this.__rootSVG.childNodes[1],i=s.childNodes;for(let r=i.length-1;r>=0;r--)i[r]&&s.removeChild(i[r]);this.__currentElement=s,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,s,i){if(t===0&&e===0&&s===this.width&&i===this.height){this.__clearCanvas();return}const r=this.__closestGroupOrSvg(),o=this.__createElement("rect",{x:t,y:e,width:s,height:i,fill:"#FFFFFF"},!0);r.appendChild(o)}createLinearGradient(t,e,s,i){const r=this.__createElement("linearGradient",{id:So(this.__ids),x1:t+"px",x2:s+"px",y1:e+"px",y2:i+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(r),new _o(r,this)}createRadialGradient(t,e,s,i,r,o){const a=this.__createElement("radialGradient",{id:So(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 _o(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),s={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"&&(s.decoration="underline"),this.__fontHref&&(s.href=this.__fontHref),s}__wrapTextLink(t,e){if(t.href){const s=this.__createElement("a");return s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),s.appendChild(e),s}return e}__applyText(t,e,s,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:s,"text-anchor":DE(this.textAlign),"dominant-baseline":RE(this.textBaseline)},!0);a.appendChild(this.__document.createTextNode(t)),this.__currentElement=a,this.__applyStyleToCurrentElement(i),o.appendChild(this.__wrapTextLink(r,a))}fillText(t,e,s){this.__applyText(t,e,s,"fill")}strokeText(t,e,s){this.__applyText(t,e,s,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,s,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+s*Math.cos(r),c=e+s*Math.sin(r),h=t+s*Math.cos(i),u=e+s*Math.sin(i),l=o?0:1;let f=0,d=r-i;d<0&&(d+=2*Math.PI),o?f=d>Math.PI?0:1:f=d>Math.PI?1:0,this.lineTo(h,u),this.__addPathCommand(le("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:s,ry:s,xAxisRotation:0,largeArcFlag:f,sweepFlag:l,endX:a,endY:c})),this.__currentPosition={x:a,y:c}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),s=So(this.__ids),i=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",s),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",le("url(#{id})",{id:s})),t.appendChild(i),this.__currentElement=i}drawImage(...t){let e=t[0],s,i,r,o,a=0,c=0,h,u,l,f,d,p,m,y;if(t.length===3)s=t[1],i=t[2],h=e.width,u=e.height,r=h,o=u;else if(t.length===5)s=t[1],i=t[2],r=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],s=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 g=this.__closestGroupOrSvg();this.__currentElement;const v="translate("+s+", "+i+")";if(e instanceof Kf){if(l=e.getSvg().cloneNode(!0),l.childNodes&&l.childNodes.length>1){for(f=l.childNodes[0];f.childNodes.length;)y=f.childNodes[0].getAttribute("id"),this.__ids[y]=y,this.__SVGdefs.appendChild(f.childNodes[0]);if(d=l.childNodes[1],d){const x=d.getAttribute("transform");let b;x?b=x+" "+v:b=v,d.setAttribute("transform",b),g.appendChild(d)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(p=this.__createElement("image"),p.setAttribute("width",r),p.setAttribute("height",o),p.setAttribute("preserveAspectRatio","none"),(a||c||h!==e.width||u!==e.height)&&(m=this.__document.createElement("canvas"),m.width=r,m.height=o,m.getContext("2d")?.drawImage(e,a,c,h,u,0,0,r,o),e=m),p.setAttribute("transform",v),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 s=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),i=So(this.__ids);let r;return s.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")),s.appendChild(r),this.__SVGdefs.appendChild(s)):t instanceof Kf&&(s.setAttribute("width",""+t.width),s.setAttribute("height",""+t.height),s.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(s)),new Th(s,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}},Ch=class{canvas;context;customContext;currentPath2D=new Path2D;path2Ds=[];currentMatrix=new DOMMatrix;hasSetCustomStrokeStyle=!1;hasSetCustomFillStyle=!1;constructor(t,e,s,i=!1){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),i&&(this.customContext=new yp({canvas:this.canvas,width:e||this.canvas.width,height:s||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,s,i){return this.context.fillRect(t,e,s,i),this.customContext&&this.customContext.fillRect(t,e,s,i),this}fillText(t,e,s,i){return this.hasSetCustomFillStyle=!1,this.context.fillText(t,e,s,i),this.customContext&&this.customContext.fillText(t,e,s),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,s,i){return this.context.strokeText(t,e,s,i),this.customContext&&this.customContext.strokeText(t,e,s),this}strokeRect(t,e,s,i){return this.context.strokeRect(t,e,s,i),this.customContext&&this.customContext.strokeRect(t,e,s,i),this}measureText(t){return this.context.measureText(t)}clearRect(t=0,e=0,s=this.canvas.width,i=this.canvas.height){return this.context.clearRect(t,e,s,i),this.customContext&&this.customContext.clearRect(t,e,s,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 s=new Path2D;s.addPath(t,e),this.currentPath2D=s}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,s=0){return this.translate(e,s),this.context.rotate(t),this.customContext&&this.customContext.rotate(t),this.currentMatrix.rotate(t),this.translate(-e,-s),this.changePath2D(),this}scale(t,e=t,s=0,i=0){return this.translate(s,i),this.context.scale(t,e),this.customContext&&this.customContext.scale(t,e),this.currentMatrix.scale(t,e),this.translate(-s,-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,s,i,r,o){return this.context.arc(t,e,s,i,r,o),this.customContext&&this.customContext.arc(t,e,s,i,r,o?-1:1),this.currentPath2D.arc(t,e,s,i,r,o),this}arcTo(t,e,s,i,r){return this.context.arcTo(t,e,s,i,r),this.customContext&&this.customContext.arcTo(t,e,s,i,r),this.currentPath2D.arcTo(t,e,s,i,r),this}ellipse(t,e,s,i,r,o,a,c){return this.context.ellipse(t,e,s,i,r,o,a,c),this.currentPath2D.ellipse(t,e,s,i,r,o,a,c),this}quadraticCurveTo(t,e,s,i){return this.context.quadraticCurveTo(t,e,s,i),this.customContext&&this.customContext.quadraticCurveTo(t,e,s,i),this.currentPath2D.quadraticCurveTo(t,e,s,i),this}bezierCurveTo(t,e,s,i,r,o){return this.context.bezierCurveTo(t,e,s,i,r,o),this.customContext&&this.customContext.bezierCurveTo(t,e,s,i,r,o),this.currentPath2D.bezierCurveTo(t,e,s,i,r,o),this}rect(t,e,s,i){return this.context.rect(t,e,s,i),this.customContext&&this.customContext.rect(t,e,s,i),this.currentPath2D.rect(t,e,s,i),this}createLinearGradient(t,e,s,i,r){const o=this.context.createLinearGradient(t,e,s,i);return r&&Object.entries(r).forEach(([a,c])=>{o.addColorStop(parseFloat(a),c)}),o}createRadialGradient(t,e,s,i,r,o,a){const c=this.context.createRadialGradient(t,e,s,i,r,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 s=e[0],i=e[1];this.context.drawImage(t,s,i)}else if(e.length===4){const s=e[0],i=e[1],r=e[2],o=e[3];this.context.drawImage(t,s,i,r,o)}else if(e.length===8){const s=e[0],i=e[1],r=e[2],o=e[3],a=e[4],c=e[5],h=e[6],u=e[7];this.context.drawImage(t,s,i,r,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,s=this.canvas.width,i=this.canvas.height,r){return this.context.getImageData(t,e,s,i,r)}putImageData(t,e=0,s=0){return this.context.putImageData(t,e,s)}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}}},Ph=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=Pe(this.x,this.y,this.toX,this.toY);if(t===0){const e=Math.min(this.x,this.toX),s=Math.min(this.y,this.toY),i=Math.max(this.x,this.toX),r=Math.max(this.y,this.toY);return{x:e,y:s,width:i-e,height:r-s}}else{const e=Math.sin(t),s=Math.cos(t),i=s*this.x-e*this.y,r=s*this.toX-e*this.toY,o=s*this.y+e*this.x,a=s*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,s=this.y,i=t.toX,r=t.toY,o=this.toX-e,a=t.x-i;if(!o&&!a)return null;const c=(this.toY-s)/o,h=(t.y-r)/a;if(o){if(!a)return{x:i,y:c*(i-e)+s}}else return{x:e,y:h*(e-i)+r};const u=(-h*i+r+c*e-s)/(c-h),l=c*(u-e)+s;return isNaN(u)||isNaN(l)?null:{x:u,y:l}}};const OE=class extends Ph{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,s,i,r,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,s,i,r,o,a,c,!this.sweepFlag)}convert(t,e,s,i,r,o,a,c,h){const u=a/180*Math.PI,l=(t-s)/2,f=(e-i)/2,d=Math.cos(u)*l+Math.sin(u)*f,p=-Math.sin(u)*l+Math.cos(u)*f,m=d*d/(r*r)+p*p/(o*o);if(m>1){const U=Math.sqrt(m);throw r=U*r,o=U*o,new Error(`Radii are too small to build an arc. Correcting them to ${r}/${o}.`)}const y=Math.sqrt((r*r*o*o-r*r*p*p-o*o*d*d)/(r*r*p*p+o*o*d*d)),g=c!=h?1:-1,v=g*y*r*p/o,x=g*y*-o*d/r,b=(t+s)/2,E=(e+i)/2,_=Math.cos(u)*v-Math.sin(u)*x+b,D=Math.sin(u)*v+Math.cos(u)*x+E,V=(U,Y,st,it)=>(U*it>=Y*st?1:-1)*Math.acos((U*st+Y*it)/(Math.sqrt(U*U+Y*Y)*Math.sqrt(st*st+it*it))),O=V(1,0,t-_,e-D)-u,N=V(t-_,e-D,s-_,i-D);return[_,D,r,o,u,O,O+N]}},IE=class extends Ph{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,s=this.cy*2-(this.y+this.toY)/2;t.quadraticCurveTo(e,s,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 s,i,r,o;for(let h=0;h<2;++h)s=h==0?this.x-2*this.cx+this.toX:this.y-2*this.cy+this.toY,i=h==0?-2*this.x+2*this.cx:-2*this.y+2*this.cy,r=h==0?this.x:this.y,Math.abs(s)>1e-12&&(o=-i/(2*s),0<o&&o<1&&[t,e][h].push(s*o*o+i*o+r));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}}},Wn=class Nr extends Ph{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),s=this.x-this.c1x,i=(-e+Math.sqrt(e*e-4*t*s))/2/t,r=(-e-Math.sqrt(e*e-4*t*s))/2/t;const o=[this.y,this.toY],a=[this.x,this.toX];let c;const h=[];Math.abs(i)>1e12&&(i=.5),Math.abs(r)>1e12&&(r=.5),i>=0&&i<=1&&(c=this.interpolate(i),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y})),r>=0&&r<=1&&(c=this.interpolate(r),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),s=this.y-this.c1y,i=(-e+Math.sqrt(e*e-4*t*s))/2/t,r=(-e-Math.sqrt(e*e-4*t*s))/2/t,Math.abs(i)>1e12&&(i=.5),Math.abs(r)>1e12&&(r=.5),i>=0&&i<=1&&(c=this.interpolate(i),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y})),r>=0&&r<=1&&(c=this.interpolate(r),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 f={x:Math.min.apply(Math,a),y:Math.min.apply(Math,o)},d={x:Math.max.apply(Math,a),y:Math.max.apply(Math,o)};return{x:f.x,y:f.y,width:d.x-f.x,height:d.y-f.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,s,i,r){const o=-3*e+9*s-9*i+3*r,a=t*o+6*e-12*s+6*i;return t*a-3*e+3*s}static bezlen(t,e,s,i,r,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],f=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let d=0;for(let p=0;p<12;p++){const m=u*l[p]+u,y=this.base3(m,t,s,r,a),g=this.base3(m,e,i,o,c);d+=f[p]*Math.sqrt(y*y+g*g)}return u*d}length(t=1){return Nr.bezlen(this.x,this.y,this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY,t)}getTatLen(t){const e=this.x,s=this.y,i=this.c1x,r=this.c1y,o=this.c2x,a=this.c2y,c=this.toX,h=this.toY;if(t<0||Nr.bezlen(e,s,i,r,o,a,c,h)<t)return 0;const u=1;let l=u/2,f=u-l,d=Nr.bezlen(e,s,i,r,o,a,c,h,f);for(;Math.abs(d-t)>.01;)l/=2,f+=(d<t?1:-1)*l,d=Nr.bezlen(e,s,i,r,o,a,c,h,f);return f}getPointAtSegmentLength(t){const e=this.getTatLen(t),s=1-e,i=Math.pow(s,3),r=Math.pow(s,2),o=e*e,a=o*e,c=i*this.x+r*3*e*this.c1x+s*3*e*e*this.c2x+a*this.toX,h=i*this.y+r*3*e*this.c1y+s*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),f=this.c1x+2*e*(this.c2x-this.c1x)+o*(this.toX-2*this.c2x+this.c1x),d=this.c1y+2*e*(this.c2y-this.c1y)+o*(this.toY-2*this.c2y+this.c1y),p=s*this.x+e*this.c1x,m=s*this.y+e*this.c1y,y=s*this.c2x+e*this.toX,g=s*this.c2y+e*this.toY,v=90-Math.atan2(u-f,l-d)*180/Math.PI;return{x:c,y:h,m:{x:u,y:l},n:{x:f,y:d},start:{x:p,y:m},end:{x:y,y:g},alpha:v}}},Ni=Math.PI*2;function vp(n,t,e,s){const i=n*s-t*e<0?-1:1;let r=n*e+t*s;return r>1&&(r=1),r<-1&&(r=-1),i*Math.acos(r)}function kE(n,t,e,s,i,r,o,a,c,h){const u=h*(n-e)/2+c*(t-s)/2,l=-c*(n-e)/2+h*(t-s)/2,f=o*o,d=a*a,p=u*u,m=l*l;let y=f*d-f*m-d*p;y<0&&(y=0),y/=f*m+d*p,y=Math.sqrt(y)*(i===r?-1:1);const g=y*o/a*l,v=y*-a/o*u,x=h*g-c*v+(n+e)/2,b=c*g+h*v+(t+s)/2,E=(u-g)/o,_=(l-v)/a,D=(-u-g)/o,V=(-l-v)/a,O=vp(1,0,E,_);let N=vp(E,_,D,V);return r===0&&N>0&&(N-=Ni),r===1&&N<0&&(N+=Ni),[x,b,O,N]}function LE(n,t){const e=1.3333333333333333*Math.tan(t/4),s=Math.cos(n),i=Math.sin(n),r=Math.cos(n+t),o=Math.sin(n+t);return[s,i,s-i*e,i+s*e,r+o*e,o-r*e,r,o]}function Eo(n,t,e,s,i,r,o,a,c){const h=Math.sin(c*Ni/360),u=Math.cos(c*Ni/360),l=u*(n-e)/2+h*(t-s)/2,f=-h*(n-e)/2+u*(t-s)/2;if(l===0&&f===0)return[];if(o===0||a===0)return[];o=Math.abs(o),a=Math.abs(a);const d=l*l/(o*o)+f*f/(a*a);d>1&&(o*=Math.sqrt(d),a*=Math.sqrt(d));const p=kE(n,t,e,s,i,r,o,a,h,u),m=[];let y=p[2],g=p[3];const v=Math.max(Math.ceil(Math.abs(g)/(Ni/4)),1);g/=v;for(let x=0;x<v;x++)m.push(LE(y,g)),y+=g;return m.map(x=>{for(let b=0;b<x.length;b+=2){let E=x[b+0],_=x[b+1];E*=o,_*=a;const D=u*E-h*_,V=h*E+u*_;x[b+0]=D+p[0],x[b+1]=V+p[1]}return x})}function bp(n,t,e,s,i,r,o,a,c,h){const u=Math.PI*120/180,l=Math.PI/180*(+i||0);let f=[],d;const p=function(nt,et,ct){const ht=nt*Math.cos(ct)-et*Math.sin(ct),B=nt*Math.sin(ct)+et*Math.cos(ct);return{x:ht,y:B}};let m,y,g,v;if(h)m=h[0],y=h[1],g=h[2],v=h[3];else{d=p(n,t,-l),n=d.x,t=d.y,d=p(a,c,-l),a=d.x,c=d.y;const nt=(n-a)/2,et=(t-c)/2;let ct=nt*nt/(e*e)+et*et/(s*s);ct>1&&(ct=Math.sqrt(ct),e=ct*e,s=ct*s);const ht=e*e,B=s*s,z=(r==o?-1:1)*Math.sqrt(Math.abs((ht*B-ht*et*et-B*nt*nt)/(ht*et*et+B*nt*nt)));g=z*e*et/s+(n+a)/2,v=z*-s*nt/e+(t+c)/2,m=Math.asin(Number(((t-v)/s).toFixed(9))),y=Math.asin(Number(((c-v)/s).toFixed(9))),m=n<g?Math.PI-m:m,y=a<g?Math.PI-y:y,m<0&&(m=Math.PI*2+m),y<0&&(y=Math.PI*2+y),o&&m>y&&(m=m-Math.PI*2),!o&&y>m&&(y=y-Math.PI*2)}let x=y-m;if(Math.abs(x)>u){const nt=y,et=a,ct=c;y=m+u*(o&&y>m?1:-1),a=g+e*Math.cos(y),c=v+s*Math.sin(y),f=bp(a,c,e,s,i,0,o,et,ct,[y,nt,g,v])}x=y-m;const b=Math.cos(m),E=Math.sin(m),_=Math.cos(y),D=Math.sin(y),V=Math.tan(x/4),O=4/3*e*V,N=4/3*s*V,U=[n,t],Y=[n+O*E,t-N*b],st=[a+O*D,c-N*_],it=[a,c];return Y[0]=2*U[0]-Y[0],Y[1]=2*U[1]-Y[1],h?[[...Y,...st,...it]].concat(f):[[...Y,...st,...it]].concat(f).map(nt=>{const et=[];for(let ct=0,ht=nt.length;ct<ht;ct++)et[ct]=ct%2?p(nt[ct-1],nt[ct],l).y:p(nt[ct],nt[ct+1],l).x;return et})}function zi(n,t,e,s,i,r){return[n/3+.6666666666666666*e,t/3+.6666666666666666*s,i/3+.6666666666666666*e,r/3+.6666666666666666*s,i,r]}function ws(n,t,e,s){return[n,t,e,s,e,s]}const Fi={a:7,c:6,s:4,q:4,t:2,m:2,l:2,h:1,v:1,z:0};function Hn(n="path"){return document.createElementNS.call(document,"http://www.w3.org/2000/svg",n)}function Ah(){return Hn("path")}const wp=n=>n instanceof SVGElement&&n.tagName==="path";function xp(n,t="shape"){return il(bm(n),`${t}.svg`)}function VE(n,t="shape"){return il(hc(n),`${t}.svg`)}function NE(n){return Jc(n)}function Mh(n){return typeof n!="string"?!1:(n=n.trim(),/^[mlhvzaqtcs]\s*[-+.0-9][^mlhvzaqtcs]+/i.test(n)&&/[\dz]$/i.test(n))}function Dh(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 To(n){const t=[];return Mh(n)&&n.replace(/([mlhvzaqtcs])([^mlhvzaqtcs]*)/gi,(e,s,i)=>{let r=s.toLowerCase();const o=ld(i);for(r=="m"&&o.length>Fi[r]&&(t.push([s,...o.splice(0,Fi[r])]),r="l",s=s=="m"?"l":"L");o.length;){if(o.length<Fi[r])throw new Error(`parseSVGPath substring:{ ${e} } command:{ ${s} } args:{ ${o} }`);t.push([s,...o.splice(0,Fi[r])])}return r=="z"&&t.push([s]),""}),t}function Co(n){let t=0,e=0,s=0,i=0;return n.map(function(r){const o=r[0],a=o.toUpperCase();if(o!=a)switch(r[0]=a,o){case"a":r[6]+=s,r[7]+=i;break;case"v":r[1]+=i;break;case"h":r[1]+=s;break;default:for(let c=1;c<r.length;)r[c++]+=s,r[c++]+=i}switch(a){case"Z":s=t,i=e;break;case"H":s=r[1];break;case"V":i=r[1];break;case"M":s=t=r[1],i=e=r[2];break;default:s=r[r.length-2],i=r[r.length-1]}return r})}function zE(n){let t=0,e=0,s=0,i=0;return n.map(function(r){const o=r[0],a=o.toLowerCase();if(o!=a)switch(r[0]=a,o){case"A":r[6]-=s,r[7]-=i;break;case"V":r[1]-=i;break;case"H":r[1]-=s;break;default:for(let c=1;c<r.length;)r[c++]-=s,r[c++]-=i}switch(a){case"z":s=t,i=e;break;case"h":s+=r[1];break;case"v":i+=r[1];break;case"m":s+=r[1],i+=r[2],t+=r[1],e+=r[2];break;default:s+=r[r.length-2],i+=r[r.length-1]}return r})}function Rh(n){const t=[];let e=0,s=0,i=0,r=0,o=0,a=0,c=0,h=0,u;for(let l=0,f=n.length;l<f;l++){let d=n[l];const p=d[0];switch(p){case"M":e=d[1],s=d[2];break;case"A":const m=Eo(i,r,d[6],d[7],d[4],d[5],d[1],d[2],d[3]);if(!m.length)continue;m.forEach((v,x)=>{const[b,E,_,D,V,O,N,U]=v;d=["C",_,D,V,O,N,U],x<m.length-1&&t.push(d)});break;case"S":let y=i,g=r;(u=="C"||u=="S")&&(y+=y-c,g+=g-h),d=["C",y,g,d[1],d[2],d[3],d[4]];break;case"T":u=="Q"||u=="T"?(o=i*2-o,a=r*2-a):(o=i,a=r),d=["C",...zi(i,r,o,a,d[1],d[2])];break;case"Q":o=d[1],a=d[2],d=["C",...zi(i,r,d[1],d[2],d[3],d[4])];break;case"L":d=["C",...ws(i,r,d[1],d[2])];break;case"H":d=["C",...ws(i,r,d[1],r)];break;case"V":d=["C",...ws(i,r,i,d[1])];break;case"Z":d=["C",...ws(i,r,e,s)];break}u=p,i=d[d.length-2],r=d[d.length-1],d.length>4?(c=d[d.length-4],h=d[d.length-3]):(c=i,h=r),t.push(d)}return t}function FE(n){const t=[];for(let e=0,s=n.length;s-2>e;e+=2){let i;e==0?i=[{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]}]:s-4==e?i=[{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]}]:i=[{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 r=[{x:i[1].x,y:i[1].y},{x:(-i[0].x+6*i[1].x+i[2].x)/6,y:(-i[0].y+6*i[1].y+i[2].y)/6},{x:(i[1].x+6*i[2].x-i[3].x)/6,y:(i[1].y+6*i[2].y-i[3].y)/6},{x:i[2].x,y:i[2].y}];t.push(["C",r[1].x,r[1].y,r[2].x,r[2].y,r[3].x,r[3].y])}return t}function BE(n){const t=[];let e=["L",0,0],s;for(let i=0,r=n.length;i<r;i++){const o=n[i];switch(o[0]){case"M":e=["L",o[1],o[2]],t.push(o);break;case"Z":t.push(e);break;case"H":s=t[t.length-1]||["L",0,0],t.push(["L",o[1],s[s.length-1]]);break;case"V":s=t[t.length-1]||["L",0,0],t.push(["L",s[s.length-2],o[1]]);break;default:t.push(o)}}return t}function jE(n){const t={S:{to:"C",x:3},T:{to:"Q",x:1}};let e,s=0,i=0;for(let r=0,o=n.length;r<o;r++){const a=n[r],c=t[a[0]];c&&(a[0]=c.to,e&&(e[0]===c.to?(s=2*Number(e[c.x+2])-Number(e[c.x]),i=2*Number(e[c.x+3])-Number(e[c.x+1])):(s=Number(e[e.length-2]),i=Number(e[e.length-1]))),a.splice(1,0,s,i)),e=a}return n}let $E=class Nn{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(To(t),e):t instanceof Nn?this.resetFromSVGPathData(t.toSVGPathData(),e):this.resetFromSVGPathData(t||[],e)}resetFromSVGPathData(t,e){this.normalizedLines=[];const s=Rh(Co(t));this.prevPathX=this.startPathX=0,this.prevPathY=this.startPathY=0;let i=!1;for(let r=0,o=s.length;r<o;r++){const a=s[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 Wn({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 Nn;e.prevPathX=e.startPathX=t[0]||0,e.prevPathY=e.startPathY=t[1]||0;for(let s=2,i=t.length;s+5<i;s+=6)e.appendLine(new Wn({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 Nn;e.prevPathX=e.startPathX=t[0].x||0,e.prevPathY=e.startPathY=t[0].y||0;for(let s=0,i=t.length;s<i;s++)e.appendLine(t[s]);return e}appendLine(t){if(t instanceof OE){Eo(this.prevPathX,this.prevPathY,t.toX,t.toY,t.largeArcFlag,t.sweepFlag,t.rx,t.ry,t.xAxisRotate).forEach(h=>{const[u,l,f,d,p,m,y,g]=h;this.normalizedLines.push(new Wn({x:this.prevPathX,y:this.prevPathY,c1x:f,c1y:d,c2x:p,c2y:m,toX:y,toY:g})),this.prevPathX=y,this.prevPathY=g});return}let e,s,i,r,o,a;t instanceof Wn?(e=t.c1x,s=t.c1y,i=t.c2x,r=t.c2y,o=t.toX,a=t.toY):t instanceof IE?[e,s,i,r,o,a]=zi(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,s,i,r,o,a]=ws(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new Wn({x:this.prevPathX,y:this.prevPathY,c1x:e,c1y:s,c2x:i,c2y:r,toX:o,toY:a})),this.prevPathX=o,this.prevPathY=a}toSVGPathData(){const{startPathX:t,startPathY:e,normalizedLines:s}=this.updateTransform(),i=[];i.push(["M",t,e]);for(let r=0,o=s.length;r<o;r++)i.push(...s[r].toSVGPathData());return i}toSVGPathD(){return Dh(this.toSVGPathData())}toCanvasContext(t){const{startPathX:e,startPathY:s,normalizedLines:i}=this.updateTransform();t.beginPath(),t.moveTo(e,s),i.forEach(r=>{r.toCanvasContext(t)})}getBoundingClientRect(){const{normalizedLines:t}=this.updateTransform(),e=[],s=[];if(t.forEach(c=>{const h=c.getBoundingClientRect();e.push(h.x,h.x+h.width),s.push(h.y,h.y+h.height)}),e.length==0||s.length==0)return{x:0,y:0,width:0,height:0};const i=Math.min.apply(0,e),r=Math.min.apply(0,s),o=Math.max.apply(0,e),a=Math.max.apply(0,s);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 ee;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,s=this.startPathY;({x:e,y:s}=t.transformPoint({x:e,y:s}));const i=[];return this.normalizedLines.forEach(r=>{let o=r.x,a=r.y,c=r.c1x,h=r.c1y,u=r.c2x,l=r.c2y,f=r.toX,d=r.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:f,y:d}=t.transformPoint({x:f,y:d}),i.push(new Wn({x:o,y:a,c1x:c,c1y:h,c2x:u,c2y:l,toX:f,toY:d}))}),{startPathX:e,startPathY:s,normalizedLines:i}}}getTotalLength(){const{normalizedLines:t}=this.updateTransform();return t.reduce((e,s)=>e+=s.length(),0)}getPointAtLength(t){const{normalizedLines:e}=this.updateTransform();let s=0;const i=e.length;for(let r=0;r<i;r++){const o=e[r],a=o.length();if(s+a>=t)return o.getPointAtSegmentLength(t-s);s+=a}return e[i-1].getPointAtSegmentLength(1)}interpolate(t){const{startPathX:e,startPathY:s,normalizedLines:i}=this.updateTransform(),r=i.length;if(r===0)return{x:e,y:s};if(r===1)return i[0].interpolate(t);{let o=t*r,a=i[0];if(o--,o>1)for(let c=1;c<r&&(a=i[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 s=this.getSubpathsAtLength(this,e,1);return t?this.getSubpathsAtLength(s,t):s}}getSubpathsAtLength(t,e,s){const{startPathX:i,startPathY:r,normalizedLines:o}=t.updateTransform();let a=null,c=0;const h=new Nn;h.prevPathX=h.startPathX=i,h.prevPathY=h.startPathY=r;for(let u=0,l=o.length;u<l;u++){const f=o[u],d=f.length();if(c+d>e&&!a){const p=f.getPointAtSegmentLength(e-c);if(h.appendLine(new Wn({c1x:p.start.x,c1y:p.start.y,c2x:p.m.x,c2y:p.m.y,toX:p.x,toY:p.y})),s)return h;a=h,h.appendLine(new Wn({c1x:p.n.x,c1y:p.n.y,c2x:p.end.x,c2y:p.end.y,toX:f.x,toY:f.y})),c+=d;continue}c+=d,h.appendLine(f)}return h}closestPoint(t,e){const s=this.getTotalLength();let i={x:t,y:e},r=0,o=1/0,a=8;for(let h=0;h<=s;h+=a){const u=this.getPointAtLength(h),l=Math.pow(Gn(u.x,u.y,t,e),2);l<o&&(i=u,r=h,o=l)}for(a/=2;a>.5;){const h=r-a,u=this.getPointAtLength(h),l=Math.pow(Gn(u.x,u.y,t,e),2),f=r+a,d=this.getPointAtLength(f),p=Math.pow(Gn(d.x,d.y,t,e),2);h>=0&&l<o?(i=u,r=h,o=l):f<=s&&p<o?(i=d,r=f,o=p):a/=2}const c=this.getPointAtLength(r+(r===s?-.1:.1));return{point:i,rotation:r>=s?Pe(c.x,c.y,i.x,i.y):Pe(i.x,i.y,c.x,c.y),distance:Math.sqrt(o)}}get polymorphPoints(){const{startPathX:t,startPathY:e,normalizedLines:s}=this.updateTransform();return[t,e].concat(s.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 s=t[e-2],i=t[e-1],r=0;for(let o=0;o<e;o+=6)r+=Gn(t[o],t[o+1],s,i),s=t[o],i=t[o+1];return Math.floor(r)}expendFill(t){const e=this.polymorphPoints,s=e.length;let i=t-s;const r=Math.ceil(t/s),o=[];o.push(["M",e[0],e[1]]);let a=2;for(;a+5<=s-1;){const c=e[a++],h=e[a++],u=e[a++],l=e[a++],f=e[a++],d=e[a++];o.push(["C",c,h,u,l,f,d]);let p=0;for(;p<r&&i>0;)o.push(["C",f,d,f,d,f,d]),i-=6,p++}return o}static mixPoints(t,e,s){const i=t.length,r=new Array(i);for(let o=0;o<i;o++)r[o]=at(t[o]+(e[o]-t[o])*s,6);return r}static getPathInterpolator(t,e){return s=>Math.abs(s-0)<Number.EPSILON?t:Math.abs(s-1)<Number.EPSILON?e:Nn.fromPolymorphPoints(Nn.mixPoints(new Nn({d:t}).polymorphPoints,new Nn({d:e}).polymorphPoints,s)).toSVGPathData()}};class Bi{static _nextId=0;static nextId(){return Bi._nextId++}}const q={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-q.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?q.Bounce.In(n*2)*.5:q.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(s){return t*Math.random()+e*n(s)}},swing:function(n){return n+Math.sin(n*Math.PI*2)/2},causeSeizures:function(n){return n+.2*Math.random()-.1}};function Sp(n){switch(n){case q.Quadratic.In:return q.Quadratic.Out;case q.Quadratic.Out:return q.Quadratic.In;case q.Quadratic.InOut:return q.Quadratic.InOut;case q.Cubic.In:return q.Cubic.Out;case q.Cubic.Out:return q.Cubic.In;case q.Cubic.InOut:return q.Cubic.InOut;case q.Quartic.In:return q.Quartic.Out;case q.Quartic.Out:return q.Quartic.In;case q.Quartic.InOut:return q.Quartic.InOut;case q.Quintic.In:return q.Quintic.Out;case q.Quintic.Out:return q.Quintic.In;case q.Quintic.InOut:return q.Quintic.InOut;case q.Sinusoidal.In:return q.Sinusoidal.Out;case q.Sinusoidal.Out:return q.Sinusoidal.In;case q.Sinusoidal.InOut:return q.Sinusoidal.InOut;case q.Exponential.In:return q.Exponential.Out;case q.Exponential.Out:return q.Exponential.In;case q.Exponential.InOut:return q.Exponential.InOut;case q.Circular.In:return q.Circular.Out;case q.Circular.Out:return q.Circular.In;case q.Circular.InOut:return q.Circular.InOut;case q.Elastic.In:return q.Elastic.Out;case q.Elastic.Out:return q.Elastic.In;case q.Elastic.InOut:return q.Elastic.InOut;case q.Back.In:return q.Back.Out;case q.Back.Out:return q.Back.In;case q.Back.InOut:return q.Back.InOut;case q.Bounce.In:return q.Bounce.Out;case q.Bounce.Out:return q.Bounce.In;case q.Bounce.InOut:return q.Bounce.InOut;default:return n}}const UE=4,YE=.001,GE=1e-7,XE=10,ji=11,Po=1/(ji-1),WE=typeof Float32Array=="function";function _p(n,t){return 1-3*t+3*n}function Ep(n,t){return 3*t-6*n}function Tp(n){return 3*n}function Ao(n,t,e){return((_p(t,e)*n+Ep(t,e))*n+Tp(t))*n}function Cp(n,t,e){return 3*_p(t,e)*n*n+2*Ep(t,e)*n+Tp(t)}function HE(n,t,e,s,i){let r,o,a=0;do o=t+(e-t)/2,r=Ao(o,s,i)-n,r>0?e=o:t=o;while(Math.abs(r)>GE&&++a<XE);return o}function qE(n,t,e,s){for(let i=0;i<UE;++i){const r=Cp(t,e,s);if(r===0)return t;const o=Ao(t,e,s)-n;t-=o/r}return t}function KE(n){return n}function Oh(n,t,e,s){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===s)return KE;const i=WE?new Float32Array(ji):new Array(ji);for(let o=0;o<ji;++o)i[o]=Ao(o*Po,n,e);function r(o){let a=0,c=1;const h=ji-1;for(;c!==h&&i[c]<=o;++c)a+=Po;--c;const u=(o-i[c])/(i[c+1]-i[c]),l=a+u*Po,f=Cp(l,n,e);return f>=YE?qE(o,l,n,e):f===0?l:HE(o,a,a+Po,n,e)}return o=>o===0||o===1?o:Ao(r(o),t,s)}function Ih(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 Pp(n){const[t,e,s,i]=Ih(n);return[1-s,1-i,1-t,1-e]}function JE(n){return Oh(...Ih(n))}function ZE(n){return Oh(...Pp(n))}const Sn={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 s=t;s>1;s--)e*=s;return n[t]=e,e}}(),Bernstein:function(n,t){const e=Sn.Utils.Factorial;return e(n)/e(t)/e(n-t)},CatmullRom:function(n,t,e,s,i){const r=(e-n)*.5,o=(s-t)*.5,a=i*i,c=i*a;return(2*t-2*e+r+o)*c+(-3*t+3*e-2*r-o)*a+r*i+t},QuadraticBezier:(n,t,e,s)=>{const i=1-s;return i*i*n+2*i*s*t+s*s*e},CubicBezier:(n,t,e,s,i)=>{const r=1-i;return r*r*r*n+3*r*r*i*t+3*r*i*i*e+i*i*i*s}},Linear:function(n,t){const e=n.length-1,s=e*t,i=Math.floor(s),r=Sn.Utils.Linear;return t<0?r(n[0],n[1],s):t>1?r(n[e],n[e-1],e-s):r(n[i],n[i+1>e?e:i+1],s-i)},Bezier:function(n,t){let e=0;const s=n.length-1,i=Math.pow,r=Sn.Utils.Bernstein;for(let o=0;o<=s;o++)e+=i(1-t,s-o)*i(t,o)*n[o]*r(s,o);return e},CatmullRom:function(n,t){const e=n.length-1;let s=e*t,i=Math.floor(s);const r=Sn.Utils.CatmullRom;return n[0]===n[e]?(t<0&&(i=Math.floor(s=e*(1+t))),r(n[(i-1+e)%e],n[i],n[(i+1)%e],n[(i+2)%e],s-i)):t<0?n[0]-(r(n[0],n[0],n[1],n[1],-s)-n[0]):t>1?n[e]-(r(n[e],n[e],n[e-1],n[e-1],s-e)-n[e]):r(n[i?i-1:0],n[i],n[e<i+1?e:i+1],n[e<i+2?e:i+2],s-i)}};class Ap{_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=kt(),e=!1){const s=Object.keys(this._tweens);for(let i=0;i<s.length;i++){const r=this._tweens[s[i]],o=!e;r&&r.update(t,o)===!1&&!e&&delete this._tweens[s[i]]}return!!Object.keys(this._tweens).length}}const ke=new Ap;class kh{constructor(t,e=ke){this._object=t,this._group=e}_id=Bi.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=q.Linear.None;_interpolationFunction=Sn.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=kt()){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,s,i){for(const r in s){const o=t[r],a=Array.isArray(o),c=a?"array":typeof o,h=!a&&Array.isArray(s[r]);if(!(c==="undefined"||c==="function")){if(h){let u=s[r];if(u.length===0)continue;u=u.map(this._handleRelativeValue.bind(this,o)),s[r]=[o].concat(u)}if((c==="object"||a)&&o&&!h){e[r]=a?[]:{};for(const u in o)e[r][u]=o[u];i[r]=a?[]:{},this._setupProperties(o,e[r],s[r],i[r])}else typeof e[r]>"u"&&(e[r]=o),a||(e[r]*=1),h?i[r]=s[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=kt()){return this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStartTime=t,this._group&&this._group.remove(this),this)}resume(t=kt()){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=ke){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=q.Linear.None){return this._easingFunction=t,this}interpolation(t=Sn.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=kt(),e=!0){if(this._isPaused)return!0;let s,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(s in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[s]=="string"&&(this._valuesStartRepeat[s]=this._valuesStartRepeat[s]+parseFloat(this._valuesEnd[s])),this._yoyo&&this._swapEndStartRepeatValues(s),this._valuesStart[s]=this._valuesStartRepeat[s];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,s,i){for(const r in s){if(e[r]===void 0)continue;const o=e[r]||0;let a=s[r];const c=Array.isArray(t[r]),h=Array.isArray(a);!c&&h?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],s=this._valuesEnd[t];typeof s=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(s):this._valuesStartRepeat[t]=s,this._valuesEnd[t]=e}}const QE=Bi.nextId,tT=ke.getAll.bind(ke),eT=ke.removeAll.bind(ke),nT=ke.add.bind(ke),sT=ke.remove.bind(ke),iT=ke.update.bind(ke),rT={now:kt,Sequence:Bi,Easing:q,Interpolation:Sn,Group:Ap,Tween:kh,nextId:QE,getAll:tT,removeAll:eT,add:nT,remove:sT,update:iT};class Lh{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=kt(),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=kt();t=e-this.oldTime,this.oldTime=e,this.elapsedTime+=t}return t}}class $i{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){s2(this.tweens,(e,s)=>t?e.delay>s.delay:e.delay<=s.delay)}cloneTweens(t=this.tweens){const e=[];return t.forEach(s=>{const i={...s};delete i.tween,i.fromValues={...i.fromValues},i.toValues={...i.toValues},e.push(i)}),e}addTween(t,e,s){const i={fromValues:t,toValues:e,frames:typeof s?.frames=="number"?s.frames:1,delay:typeof s?.delay=="number"?s.delay:this.tweens.length,easeFunction:s?.easeFunction||q.Linear.None,interpolationFunction:s?.interpolationFunction||Sn.Linear,repeat:typeof s?.repeat=="number"?s.repeat:0,yoyo:s?.yoyo||!1,onStart:s?.onStart||(()=>{}),onUpdate:s?.onUpdate||(()=>{}),onComplete:s?.onComplete||(()=>{})};return this.tweens.push(i),this}cancelRequestAnimationCycle=()=>{};runTweens(t){this.cancelRequestAnimationCycle();const e=new Lh,s=this.frameDuration;return new Promise(i=>{this.onGroupStart?.(),this.cancelRequestAnimationCycle=jw(r=>{if(!this.isPaused){const a=Math.max(0,r-this.pausedDuration),c=Math.max(0,e.getElapsedTime()-this.pausedDuration);t.filter(h=>h.delay*s<=c).forEach(h=>{h.tween||(h.tween=new kh({...h.fromValues}).to({...h.toValues},h.frames*s).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))*s>c?h.tween.update(a):(h.tween.isPlaying()&&h.tween.end(),dd(t,h))})}const o=!!t.length;return o||(this.onGroupComplete?.(),i()),o})})}isPaused=!1;pausedClock=new Lh;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(s=>{e=Math.max(e,s.delay+s.frames),s.easeFunction=Sp(s.easeFunction);const i={...s.toValues};s.toValues={...s.fromValues},s.fromValues={...i}}),t.forEach(s=>{s.delay=e-s.frames}),this.play(t)}pause(){this.pausedClock.start(),this.isPaused=!0}resume(){this.pausedDuration+=this.pausedClock.getElapsedTime(),this.pausedClock.stop(),this.isPaused=!1}}var Vh={exports:{}},ft={};/**
2
32
  * @license React
3
33
  * react.production.js
4
34
  *
@@ -6,7 +36,7 @@ var ZYZGroupCoreWeb=function(g){"use strict";const Jf=Function("return this")();
6
36
  *
7
37
  * This source code is licensed under the MIT license found in the
8
38
  * LICENSE file in the root directory of this source tree.
9
- */var dc;function ed(){if(dc)return nt;dc=1;var s=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),e=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),r=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"),l=Symbol.for("react.lazy"),u=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 m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},p=Object.assign,_={};function y(A,L,H){this.props=A,this.context=L,this.refs=_,this.updater=H||m}y.prototype.isReactComponent={},y.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")},y.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function b(){}b.prototype=y.prototype;function v(A,L,H){this.props=A,this.context=L,this.refs=_,this.updater=H||m}var w=v.prototype=new b;w.constructor=v,p(w,y.prototype),w.isPureReactComponent=!0;var E=Array.isArray;function C(){}var D={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function O(A,L,H){var W=H.ref;return{$$typeof:s,type:A,key:L,ref:W!==void 0?W:null,props:H}}function U(A,L){return O(A.type,L,A.props)}function V(A){return typeof A=="object"&&A!==null&&A.$$typeof===s}function q(A){var L={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(H){return L[H]})}var ft=/\/+/g;function pt(A,L){return typeof A=="object"&&A!==null&&A.key!=null?q(""+A.key):L.toString(36)}function zt(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(C,C):(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 wt(A,L,H,W,ht){var mt=typeof A;(mt==="undefined"||mt==="boolean")&&(A=null);var Q=!1;if(A===null)Q=!0;else switch(mt){case"bigint":case"string":case"number":Q=!0;break;case"object":switch(A.$$typeof){case s:case t:Q=!0;break;case l:return Q=A._init,wt(Q(A._payload),L,H,W,ht)}}if(Q)return ht=ht(A),Q=W===""?"."+pt(A,0):W,E(ht)?(H="",Q!=null&&(H=Q.replace(ft,"$&/")+"/"),wt(ht,L,H,"",function(Ct){return Ct})):ht!=null&&(V(ht)&&(ht=U(ht,H+(ht.key==null||A&&A.key===ht.key?"":(""+ht.key).replace(ft,"$&/")+"/")+Q)),L.push(ht)),1;Q=0;var Pt=W===""?".":W+":";if(E(A))for(var at=0;at<A.length;at++)W=A[at],mt=Pt+pt(W,at),Q+=wt(W,L,H,mt,ht);else if(at=f(A),typeof at=="function")for(A=at.call(A),at=0;!(W=A.next()).done;)W=W.value,mt=Pt+pt(W,at++),Q+=wt(W,L,H,mt,ht);else if(mt==="object"){if(typeof A.then=="function")return wt(zt(A),L,H,W,ht);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 Q}function It(A,L,H){if(A==null)return A;var W=[],ht=0;return wt(A,W,"","",function(mt){return L.call(H,mt,ht++)}),W}function Xt(A){if(A._status===-1){var L=A._result;L=L(),L.then(function(H){(A._status===0||A._status===-1)&&(A._status=1,A._result=H)},function(H){(A._status===0||A._status===-1)&&(A._status=2,A._result=H)}),A._status===-1&&(A._status=0,A._result=L)}if(A._status===1)return A._result.default;throw A._result}var Y=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)},N={map:It,forEach:function(A,L,H){It(A,function(){L.apply(this,arguments)},H)},count:function(A){var L=0;return It(A,function(){L++}),L},toArray:function(A){return It(A,function(L){return L})||[]},only:function(A){if(!V(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return nt.Activity=u,nt.Children=N,nt.Component=y,nt.Fragment=e,nt.Profiler=r,nt.PureComponent=v,nt.StrictMode=n,nt.Suspense=c,nt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,nt.__COMPILER_RUNTIME={__proto__:null,c:function(A){return D.H.useMemoCache(A)}},nt.cache=function(A){return function(){return A.apply(null,arguments)}},nt.cacheSignal=function(){return null},nt.cloneElement=function(A,L,H){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var W=p({},A.props),ht=A.key;if(L!=null)for(mt in L.key!==void 0&&(ht=""+L.key),L)!$.call(L,mt)||mt==="key"||mt==="__self"||mt==="__source"||mt==="ref"&&L.ref===void 0||(W[mt]=L[mt]);var mt=arguments.length-2;if(mt===1)W.children=H;else if(1<mt){for(var Q=Array(mt),Pt=0;Pt<mt;Pt++)Q[Pt]=arguments[Pt+2];W.children=Q}return O(A.type,ht,W)},nt.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},nt.createElement=function(A,L,H){var W,ht={},mt=null;if(L!=null)for(W in L.key!==void 0&&(mt=""+L.key),L)$.call(L,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(ht[W]=L[W]);var Q=arguments.length-2;if(Q===1)ht.children=H;else if(1<Q){for(var Pt=Array(Q),at=0;at<Q;at++)Pt[at]=arguments[at+2];ht.children=Pt}if(A&&A.defaultProps)for(W in Q=A.defaultProps,Q)ht[W]===void 0&&(ht[W]=Q[W]);return O(A,mt,ht)},nt.createRef=function(){return{current:null}},nt.forwardRef=function(A){return{$$typeof:a,render:A}},nt.isValidElement=V,nt.lazy=function(A){return{$$typeof:l,_payload:{_status:-1,_result:A},_init:Xt}},nt.memo=function(A,L){return{$$typeof:h,type:A,compare:L===void 0?null:L}},nt.startTransition=function(A){var L=D.T,H={};D.T=H;try{var W=A(),ht=D.S;ht!==null&&ht(H,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(C,Y)}catch(mt){Y(mt)}finally{L!==null&&H.types!==null&&(L.types=H.types),D.T=L}},nt.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},nt.use=function(A){return D.H.use(A)},nt.useActionState=function(A,L,H){return D.H.useActionState(A,L,H)},nt.useCallback=function(A,L){return D.H.useCallback(A,L)},nt.useContext=function(A){return D.H.useContext(A)},nt.useDebugValue=function(){},nt.useDeferredValue=function(A,L){return D.H.useDeferredValue(A,L)},nt.useEffect=function(A,L){return D.H.useEffect(A,L)},nt.useEffectEvent=function(A){return D.H.useEffectEvent(A)},nt.useId=function(){return D.H.useId()},nt.useImperativeHandle=function(A,L,H){return D.H.useImperativeHandle(A,L,H)},nt.useInsertionEffect=function(A,L){return D.H.useInsertionEffect(A,L)},nt.useLayoutEffect=function(A,L){return D.H.useLayoutEffect(A,L)},nt.useMemo=function(A,L){return D.H.useMemo(A,L)},nt.useOptimistic=function(A,L){return D.H.useOptimistic(A,L)},nt.useReducer=function(A,L,H){return D.H.useReducer(A,L,H)},nt.useRef=function(A){return D.H.useRef(A)},nt.useState=function(A){return D.H.useState(A)},nt.useSyncExternalStore=function(A,L,H){return D.H.useSyncExternalStore(A,L,H)},nt.useTransition=function(){return D.H.useTransition()},nt.version="19.2.5",nt}var Fs={exports:{}};/**
39
+ */var Mp;function oT(){if(Mp)return ft;Mp=1;var n=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),e=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),r=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"),f=Symbol.iterator;function d(P){return P===null||typeof P!="object"?null:(P=f&&P[f]||P["@@iterator"],typeof P=="function"?P:null)}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,y={};function g(P,I,G){this.props=P,this.context=I,this.refs=y,this.updater=G||p}g.prototype.isReactComponent={},g.prototype.setState=function(P,I){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,I,"setState")},g.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function v(){}v.prototype=g.prototype;function x(P,I,G){this.props=P,this.context=I,this.refs=y,this.updater=G||p}var b=x.prototype=new v;b.constructor=x,m(b,g.prototype),b.isPureReactComponent=!0;var E=Array.isArray;function _(){}var D={H:null,A:null,T:null,S:null},V=Object.prototype.hasOwnProperty;function O(P,I,G){var X=G.ref;return{$$typeof:n,type:P,key:I,ref:X!==void 0?X:null,props:G}}function N(P,I){return O(P.type,I,P.props)}function U(P){return typeof P=="object"&&P!==null&&P.$$typeof===n}function Y(P){var I={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(G){return I[G]})}var st=/\/+/g;function it(P,I){return typeof P=="object"&&P!==null&&P.key!=null?Y(""+P.key):I.toString(36)}function nt(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(_,_):(P.status="pending",P.then(function(I){P.status==="pending"&&(P.status="fulfilled",P.value=I)},function(I){P.status==="pending"&&(P.status="rejected",P.reason=I)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function et(P,I,G,X,dt){var vt=typeof P;(vt==="undefined"||vt==="boolean")&&(P=null);var J=!1;if(P===null)J=!0;else switch(vt){case"bigint":case"string":case"number":J=!0;break;case"object":switch(P.$$typeof){case n:case t:J=!0;break;case u:return J=P._init,et(J(P._payload),I,G,X,dt)}}if(J)return dt=dt(P),J=X===""?"."+it(P,0):X,E(dt)?(G="",J!=null&&(G=J.replace(st,"$&/")+"/"),et(dt,I,G,"",function(Dt){return Dt})):dt!=null&&(U(dt)&&(dt=N(dt,G+(dt.key==null||P&&P.key===dt.key?"":(""+dt.key).replace(st,"$&/")+"/")+J)),I.push(dt)),1;J=0;var Et=X===""?".":X+":";if(E(P))for(var lt=0;lt<P.length;lt++)X=P[lt],vt=Et+it(X,lt),J+=et(X,I,G,vt,dt);else if(lt=d(P),typeof lt=="function")for(P=lt.call(P),lt=0;!(X=P.next()).done;)X=X.value,vt=Et+it(X,lt++),J+=et(X,I,G,vt,dt);else if(vt==="object"){if(typeof P.then=="function")return et(nt(P),I,G,X,dt);throw I=String(P),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return J}function ct(P,I,G){if(P==null)return P;var X=[],dt=0;return et(P,X,"","",function(vt){return I.call(G,vt,dt++)}),X}function ht(P){if(P._status===-1){var I=P._result;I=I(),I.then(function(G){(P._status===0||P._status===-1)&&(P._status=1,P._result=G)},function(G){(P._status===0||P._status===-1)&&(P._status=2,P._result=G)}),P._status===-1&&(P._status=0,P._result=I)}if(P._status===1)return P._result.default;throw P._result}var B=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},z={map:ct,forEach:function(P,I,G){ct(P,function(){I.apply(this,arguments)},G)},count:function(P){var I=0;return ct(P,function(){I++}),I},toArray:function(P){return ct(P,function(I){return I})||[]},only:function(P){if(!U(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};return ft.Activity=l,ft.Children=z,ft.Component=g,ft.Fragment=e,ft.Profiler=i,ft.PureComponent=x,ft.StrictMode=s,ft.Suspense=c,ft.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,ft.__COMPILER_RUNTIME={__proto__:null,c:function(P){return D.H.useMemoCache(P)}},ft.cache=function(P){return function(){return P.apply(null,arguments)}},ft.cacheSignal=function(){return null},ft.cloneElement=function(P,I,G){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var X=m({},P.props),dt=P.key;if(I!=null)for(vt in I.key!==void 0&&(dt=""+I.key),I)!V.call(I,vt)||vt==="key"||vt==="__self"||vt==="__source"||vt==="ref"&&I.ref===void 0||(X[vt]=I[vt]);var vt=arguments.length-2;if(vt===1)X.children=G;else if(1<vt){for(var J=Array(vt),Et=0;Et<vt;Et++)J[Et]=arguments[Et+2];X.children=J}return O(P.type,dt,X)},ft.createContext=function(P){return P={$$typeof:o,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:r,_context:P},P},ft.createElement=function(P,I,G){var X,dt={},vt=null;if(I!=null)for(X in I.key!==void 0&&(vt=""+I.key),I)V.call(I,X)&&X!=="key"&&X!=="__self"&&X!=="__source"&&(dt[X]=I[X]);var J=arguments.length-2;if(J===1)dt.children=G;else if(1<J){for(var Et=Array(J),lt=0;lt<J;lt++)Et[lt]=arguments[lt+2];dt.children=Et}if(P&&P.defaultProps)for(X in J=P.defaultProps,J)dt[X]===void 0&&(dt[X]=J[X]);return O(P,vt,dt)},ft.createRef=function(){return{current:null}},ft.forwardRef=function(P){return{$$typeof:a,render:P}},ft.isValidElement=U,ft.lazy=function(P){return{$$typeof:u,_payload:{_status:-1,_result:P},_init:ht}},ft.memo=function(P,I){return{$$typeof:h,type:P,compare:I===void 0?null:I}},ft.startTransition=function(P){var I=D.T,G={};D.T=G;try{var X=P(),dt=D.S;dt!==null&&dt(G,X),typeof X=="object"&&X!==null&&typeof X.then=="function"&&X.then(_,B)}catch(vt){B(vt)}finally{I!==null&&G.types!==null&&(I.types=G.types),D.T=I}},ft.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},ft.use=function(P){return D.H.use(P)},ft.useActionState=function(P,I,G){return D.H.useActionState(P,I,G)},ft.useCallback=function(P,I){return D.H.useCallback(P,I)},ft.useContext=function(P){return D.H.useContext(P)},ft.useDebugValue=function(){},ft.useDeferredValue=function(P,I){return D.H.useDeferredValue(P,I)},ft.useEffect=function(P,I){return D.H.useEffect(P,I)},ft.useEffectEvent=function(P){return D.H.useEffectEvent(P)},ft.useId=function(){return D.H.useId()},ft.useImperativeHandle=function(P,I,G){return D.H.useImperativeHandle(P,I,G)},ft.useInsertionEffect=function(P,I){return D.H.useInsertionEffect(P,I)},ft.useLayoutEffect=function(P,I){return D.H.useLayoutEffect(P,I)},ft.useMemo=function(P,I){return D.H.useMemo(P,I)},ft.useOptimistic=function(P,I){return D.H.useOptimistic(P,I)},ft.useReducer=function(P,I,G){return D.H.useReducer(P,I,G)},ft.useRef=function(P){return D.H.useRef(P)},ft.useState=function(P){return D.H.useState(P)},ft.useSyncExternalStore=function(P,I,G){return D.H.useSyncExternalStore(P,I,G)},ft.useTransition=function(){return D.H.useTransition()},ft.version="19.2.5",ft}var Ui={exports:{}};/**
10
40
  * @license React
11
41
  * react.development.js
12
42
  *
@@ -14,77 +44,87 @@ var ZYZGroupCoreWeb=function(g){"use strict";const Jf=Function("return this")();
14
44
  *
15
45
  * This source code is licensed under the MIT license found in the
16
46
  * LICENSE file in the root directory of this source tree.
17
- */Fs.exports;var mc;function nd(){return mc||(mc=1,function(s,t){({}).NODE_ENV!=="production"&&function(){function e(x,k){Object.defineProperty(i.prototype,x,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",k[0],k[1])}})}function n(x){return x===null||typeof x!="object"?null:(x=Se&&x[Se]||x["@@iterator"],typeof x=="function"?x:null)}function r(x,k){x=(x=x.constructor)&&(x.displayName||x.name)||"ReactClass";var B=x+"."+k;_e[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.",k,x),_e[B]=!0)}function i(x,k,B){this.props=x,this.context=k,this.refs=vt,this.updater=B||pe}function o(){}function a(x,k,B){this.props=x,this.context=k,this.refs=vt,this.updater=B||pe}function c(){}function h(x){return""+x}function l(x){try{h(x);var k=!1}catch{k=!0}if(k){k=console;var B=k.error,j=typeof Symbol=="function"&&Symbol.toStringTag&&x[Symbol.toStringTag]||x.constructor.name||"Object";return B.call(k,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",j),h(x)}}function u(x){if(x==null)return null;if(typeof x=="function")return x.$$typeof===Gr?null:x.displayName||x.name||null;if(typeof x=="string")return x;switch(x){case A:return"Fragment";case H:return"Profiler";case L:return"StrictMode";case Q:return"Suspense";case Pt:return"SuspenseList";case Ue:return"Activity"}if(typeof x=="object")switch(typeof x.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),x.$$typeof){case N:return"Portal";case ht:return x.displayName||"Context";case W:return(x._context.displayName||"Context")+".Consumer";case mt:var k=x.render;return x=x.displayName,x||(x=k.displayName||k.name||"",x=x!==""?"ForwardRef("+x+")":"ForwardRef"),x;case at:return k=x.displayName||null,k!==null?k:u(x.type)||"Memo";case Ct:k=x._payload,x=x._init;try{return u(x(k))}catch{}}return null}function d(x){if(x===A)return"<>";if(typeof x=="object"&&x!==null&&x.$$typeof===Ct)return"<...>";try{var k=u(x);return k?"<"+k+">":"<...>"}catch{return"<...>"}}function f(){var x=rt.A;return x===null?null:x.getOwner()}function m(){return Error("react-stack-top-frame")}function p(x){if(Gt.call(x,"key")){var k=Object.getOwnPropertyDescriptor(x,"key").get;if(k&&k.isReactWarning)return!1}return x.key!==void 0}function _(x,k){function B(){qr||(qr=!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)",k))}B.isReactWarning=!0,Object.defineProperty(x,"key",{get:B,configurable:!0})}function y(){var x=u(this.type);return Wr[x]||(Wr[x]=!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.")),x=this.props.ref,x!==void 0?x:null}function b(x,k,B,j,J,ct){var ot=B.ref;return x={$$typeof:Y,type:x,key:k,props:B,_owner:j},(ot!==void 0?ot:null)!==null?Object.defineProperty(x,"ref",{enumerable:!1,get:y}):Object.defineProperty(x,"ref",{enumerable:!1,value:null}),x._store={},Object.defineProperty(x._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(x,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(x,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:J}),Object.defineProperty(x,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ct}),Object.freeze&&(Object.freeze(x.props),Object.freeze(x)),x}function v(x,k){return k=b(x.type,k,x.props,x._owner,x._debugStack,x._debugTask),x._store&&(k._store.validated=x._store.validated),k}function w(x){E(x)?x._store&&(x._store.validated=1):typeof x=="object"&&x!==null&&x.$$typeof===Ct&&(x._payload.status==="fulfilled"?E(x._payload.value)&&x._payload.value._store&&(x._payload.value._store.validated=1):x._store&&(x._store.validated=1))}function E(x){return typeof x=="object"&&x!==null&&x.$$typeof===Y}function C(x){var k={"=":"=0",":":"=2"};return"$"+x.replace(/[=:]/g,function(B){return k[B]})}function D(x,k){return typeof x=="object"&&x!==null&&x.key!=null?(l(x.key),C(""+x.key)):k.toString(36)}function $(x){switch(x.status){case"fulfilled":return x.value;case"rejected":throw x.reason;default:switch(typeof x.status=="string"?x.then(c,c):(x.status="pending",x.then(function(k){x.status==="pending"&&(x.status="fulfilled",x.value=k)},function(k){x.status==="pending"&&(x.status="rejected",x.reason=k)})),x.status){case"fulfilled":return x.value;case"rejected":throw x.reason}}throw x}function O(x,k,B,j,J){var ct=typeof x;(ct==="undefined"||ct==="boolean")&&(x=null);var ot=!1;if(x===null)ot=!0;else switch(ct){case"bigint":case"string":case"number":ot=!0;break;case"object":switch(x.$$typeof){case Y:case N:ot=!0;break;case Ct:return ot=x._init,O(ot(x._payload),k,B,j,J)}}if(ot){ot=x,J=J(ot);var bt=j===""?"."+D(ot,0):j;return Ps(J)?(B="",bt!=null&&(B=bt.replace(Ms,"$&/")+"/"),O(J,k,B,"",function(Ce){return Ce})):J!=null&&(E(J)&&(J.key!=null&&(ot&&ot.key===J.key||l(J.key)),B=v(J,B+(J.key==null||ot&&ot.key===J.key?"":(""+J.key).replace(Ms,"$&/")+"/")+bt),j!==""&&ot!=null&&E(ot)&&ot.key==null&&ot._store&&!ot._store.validated&&(B._store.validated=2),J=B),k.push(J)),1}if(ot=0,bt=j===""?".":j+":",Ps(x))for(var lt=0;lt<x.length;lt++)j=x[lt],ct=bt+D(j,lt),ot+=O(j,k,B,ct,J);else if(lt=n(x),typeof lt=="function")for(lt===x.entries&&(As||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),As=!0),x=lt.call(x),lt=0;!(j=x.next()).done;)j=j.value,ct=bt+D(j,lt++),ot+=O(j,k,B,ct,J);else if(ct==="object"){if(typeof x.then=="function")return O($(x),k,B,j,J);throw k=String(x),Error("Objects are not valid as a React child (found: "+(k==="[object Object]"?"object with keys {"+Object.keys(x).join(", ")+"}":k)+"). If you meant to render a collection of children, use an array instead.")}return ot}function U(x,k,B){if(x==null)return x;var j=[],J=0;return O(x,j,"","",function(ct){return k.call(B,ct,J++)}),j}function V(x){if(x._status===-1){var k=x._ioInfo;k!=null&&(k.start=k.end=performance.now()),k=x._result;var B=k();if(B.then(function(J){if(x._status===0||x._status===-1){x._status=1,x._result=J;var ct=x._ioInfo;ct!=null&&(ct.end=performance.now()),B.status===void 0&&(B.status="fulfilled",B.value=J)}},function(J){if(x._status===0||x._status===-1){x._status=2,x._result=J;var ct=x._ioInfo;ct!=null&&(ct.end=performance.now()),B.status===void 0&&(B.status="rejected",B.reason=J)}}),k=x._ioInfo,k!=null){k.value=B;var j=B.displayName;typeof j=="string"&&(k.name=j)}x._status===-1&&(x._status=0,x._result=B)}if(x._status===1)return k=x._result,k===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
47
+ */Ui.exports;var Dp;function aT(){return Dp||(Dp=1,function(n,t){({}).NODE_ENV!=="production"&&function(){function e(S,R){Object.defineProperty(r.prototype,S,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",R[0],R[1])}})}function s(S){return S===null||typeof S!="object"?null:(S=hn&&S[hn]||S["@@iterator"],typeof S=="function"?S:null)}function i(S,R){S=(S=S.constructor)&&(S.displayName||S.name)||"ReactClass";var $=S+"."+R;un[$]||(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.",R,S),un[$]=!0)}function r(S,R,$){this.props=S,this.context=R,this.refs=Rt,this.updater=$||qe}function o(){}function a(S,R,$){this.props=S,this.context=R,this.refs=Rt,this.updater=$||qe}function c(){}function h(S){return""+S}function u(S){try{h(S);var R=!1}catch{R=!0}if(R){R=console;var $=R.error,W=typeof Symbol=="function"&&Symbol.toStringTag&&S[Symbol.toStringTag]||S.constructor.name||"Object";return $.call(R,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",W),h(S)}}function l(S){if(S==null)return null;if(typeof S=="function")return S.$$typeof===Ha?null:S.displayName||S.name||null;if(typeof S=="string")return S;switch(S){case P:return"Fragment";case G:return"Profiler";case I:return"StrictMode";case J:return"Suspense";case Et:return"SuspenseList";case In:return"Activity"}if(typeof S=="object")switch(typeof S.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),S.$$typeof){case z:return"Portal";case dt:return S.displayName||"Context";case X:return(S._context.displayName||"Context")+".Consumer";case vt:var R=S.render;return S=S.displayName,S||(S=R.displayName||R.name||"",S=S!==""?"ForwardRef("+S+")":"ForwardRef"),S;case lt:return R=S.displayName||null,R!==null?R:l(S.type)||"Memo";case Dt:R=S._payload,S=S._init;try{return l(S(R))}catch{}}return null}function f(S){if(S===P)return"<>";if(typeof S=="object"&&S!==null&&S.$$typeof===Dt)return"<...>";try{var R=l(S);return R?"<"+R+">":"<...>"}catch{return"<...>"}}function d(){var S=mt.A;return S===null?null:S.getOwner()}function p(){return Error("react-stack-top-frame")}function m(S){if(ie.call(S,"key")){var R=Object.getOwnPropertyDescriptor(S,"key").get;if(R&&R.isReactWarning)return!1}return S.key!==void 0}function y(S,R){function $(){Ka||(Ka=!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)",R))}$.isReactWarning=!0,Object.defineProperty(S,"key",{get:$,configurable:!0})}function g(){var S=l(this.type);return Za[S]||(Za[S]=!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.")),S=this.props.ref,S!==void 0?S:null}function v(S,R,$,W,Q,yt){var gt=$.ref;return S={$$typeof:B,type:S,key:R,props:$,_owner:W},(gt!==void 0?gt:null)!==null?Object.defineProperty(S,"ref",{enumerable:!1,get:g}):Object.defineProperty(S,"ref",{enumerable:!1,value:null}),S._store={},Object.defineProperty(S._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(S,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(S,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Q}),Object.defineProperty(S,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:yt}),Object.freeze&&(Object.freeze(S.props),Object.freeze(S)),S}function x(S,R){return R=v(S.type,R,S.props,S._owner,S._debugStack,S._debugTask),S._store&&(R._store.validated=S._store.validated),R}function b(S){E(S)?S._store&&(S._store.validated=1):typeof S=="object"&&S!==null&&S.$$typeof===Dt&&(S._payload.status==="fulfilled"?E(S._payload.value)&&S._payload.value._store&&(S._payload.value._store.validated=1):S._store&&(S._store.validated=1))}function E(S){return typeof S=="object"&&S!==null&&S.$$typeof===B}function _(S){var R={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function($){return R[$]})}function D(S,R){return typeof S=="object"&&S!==null&&S.key!=null?(u(S.key),_(""+S.key)):R.toString(36)}function V(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(c,c):(S.status="pending",S.then(function(R){S.status==="pending"&&(S.status="fulfilled",S.value=R)},function(R){S.status==="pending"&&(S.status="rejected",S.reason=R)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function O(S,R,$,W,Q){var yt=typeof S;(yt==="undefined"||yt==="boolean")&&(S=null);var gt=!1;if(S===null)gt=!0;else switch(yt){case"bigint":case"string":case"number":gt=!0;break;case"object":switch(S.$$typeof){case B:case z:gt=!0;break;case Dt:return gt=S._init,O(gt(S._payload),R,$,W,Q)}}if(gt){gt=S,Q=Q(gt);var Pt=W===""?"."+D(gt,0):W;return Mr(Q)?($="",Pt!=null&&($=Pt.replace(Rr,"$&/")+"/"),O(Q,R,$,"",function(Ke){return Ke})):Q!=null&&(E(Q)&&(Q.key!=null&&(gt&&gt.key===Q.key||u(Q.key)),$=x(Q,$+(Q.key==null||gt&&gt.key===Q.key?"":(""+Q.key).replace(Rr,"$&/")+"/")+Pt),W!==""&&gt!=null&&E(gt)&&gt.key==null&&gt._store&&!gt._store.validated&&($._store.validated=2),Q=$),R.push(Q)),1}if(gt=0,Pt=W===""?".":W+":",Mr(S))for(var bt=0;bt<S.length;bt++)W=S[bt],yt=Pt+D(W,bt),gt+=O(W,R,$,yt,Q);else if(bt=s(S),typeof bt=="function")for(bt===S.entries&&(Dr||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Dr=!0),S=bt.call(S),bt=0;!(W=S.next()).done;)W=W.value,yt=Pt+D(W,bt++),gt+=O(W,R,$,yt,Q);else if(yt==="object"){if(typeof S.then=="function")return O(V(S),R,$,W,Q);throw R=String(S),Error("Objects are not valid as a React child (found: "+(R==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":R)+"). If you meant to render a collection of children, use an array instead.")}return gt}function N(S,R,$){if(S==null)return S;var W=[],Q=0;return O(S,W,"","",function(yt){return R.call($,yt,Q++)}),W}function U(S){if(S._status===-1){var R=S._ioInfo;R!=null&&(R.start=R.end=performance.now()),R=S._result;var $=R();if($.then(function(Q){if(S._status===0||S._status===-1){S._status=1,S._result=Q;var yt=S._ioInfo;yt!=null&&(yt.end=performance.now()),$.status===void 0&&($.status="fulfilled",$.value=Q)}},function(Q){if(S._status===0||S._status===-1){S._status=2,S._result=Q;var yt=S._ioInfo;yt!=null&&(yt.end=performance.now()),$.status===void 0&&($.status="rejected",$.reason=Q)}}),R=S._ioInfo,R!=null){R.value=$;var W=$.displayName;typeof W=="string"&&(R.name=W)}S._status===-1&&(S._status=0,S._result=$)}if(S._status===1)return R=S._result,R===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
18
48
 
19
49
  Your code should look like:
20
50
  const MyComponent = lazy(() => import('./MyComponent'))
21
51
 
22
- Did you accidentally put curly braces around the import?`,k),"default"in k||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
52
+ Did you accidentally put curly braces around the import?`,R),"default"in R||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
23
53
 
24
54
  Your code should look like:
25
- const MyComponent = lazy(() => import('./MyComponent'))`,k),k.default;throw x._result}function q(){var x=rt.H;return x===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:
55
+ const MyComponent = lazy(() => import('./MyComponent'))`,R),R.default;throw S._result}function Y(){var S=mt.H;return S===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:
26
56
  1. You might have mismatching versions of React and the renderer (such as React DOM)
27
57
  2. You might be breaking the Rules of Hooks
28
58
  3. You might have more than one copy of React in the same app
29
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),x}function ft(){rt.asyncTransitions--}function pt(x){if(rn===null)try{var k=("require"+Math.random()).slice(0,7);rn=(s&&s[k]).call(s,"timers").setImmediate}catch{rn=function(B){xn===!1&&(xn=!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=B,j.port2.postMessage(void 0)}}return rn(x)}function zt(x){return 1<x.length&&typeof AggregateError=="function"?new AggregateError(x):x[0]}function wt(x,k){k!==Gn-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. "),Gn=k}function It(x,k,B){var j=rt.actQueue;if(j!==null)if(j.length!==0)try{Xt(j),pt(function(){return It(x,k,B)});return}catch(J){rt.thrownErrors.push(J)}else rt.actQueue=null;0<rt.thrownErrors.length?(j=zt(rt.thrownErrors),rt.thrownErrors.length=0,B(j)):k(x)}function Xt(x){if(!Is){Is=!0;var k=0;try{for(;k<x.length;k++){var B=x[k];do{rt.didUsePromise=!1;var j=B(!1);if(j!==null){if(rt.didUsePromise){x[k]=B,x.splice(0,k);return}B=j}else break}while(1)}x.length=0}catch(J){x.splice(0,k+1),rt.thrownErrors.push(J)}finally{Is=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Y=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),W=Symbol.for("react.consumer"),ht=Symbol.for("react.context"),mt=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),Pt=Symbol.for("react.suspense_list"),at=Symbol.for("react.memo"),Ct=Symbol.for("react.lazy"),Ue=Symbol.for("react.activity"),Se=Symbol.iterator,_e={},pe={isMounted:function(){return!1},enqueueForceUpdate:function(x){r(x,"forceUpdate")},enqueueReplaceState:function(x){r(x,"replaceState")},enqueueSetState:function(x){r(x,"setState")}},z=Object.assign,vt={};Object.freeze(vt),i.prototype.isReactComponent={},i.prototype.setState=function(x,k){if(typeof x!="object"&&typeof x!="function"&&x!=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,x,k,"setState")},i.prototype.forceUpdate=function(x){this.updater.enqueueForceUpdate(this,x,"forceUpdate")};var Ot={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(Sn in Ot)Ot.hasOwnProperty(Sn)&&e(Sn,Ot[Sn]);o.prototype=i.prototype,Ot=a.prototype=new o,Ot.constructor=a,z(Ot,i.prototype),Ot.isPureReactComponent=!0;var Ps=Array.isArray,Gr=Symbol.for("react.client.reference"),rt={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},Gt=Object.prototype.hasOwnProperty,Vr=console.createTask?console.createTask:function(){return null};Ot={react_stack_bottom_frame:function(x){return x()}};var qr,Hr,Wr={},qa=Ot.react_stack_bottom_frame.bind(Ot,m)(),Jr=Vr(d(m)),As=!1,Ms=/\/+/g,ks=typeof reportError=="function"?reportError:function(x){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var k=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof x=="object"&&x!==null&&typeof x.message=="string"?String(x.message):String(x),error:x});if(!window.dispatchEvent(k))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",x);return}console.error(x)},xn=!1,rn=null,Gn=0,Vn=!1,Is=!1,Kr=typeof queueMicrotask=="function"?function(x){queueMicrotask(function(){return queueMicrotask(x)})}:pt;Ot=Object.freeze({__proto__:null,c:function(x){return q().useMemoCache(x)}});var Sn={map:U,forEach:function(x,k,B){U(x,function(){k.apply(this,arguments)},B)},count:function(x){var k=0;return U(x,function(){k++}),k},toArray:function(x){return U(x,function(k){return k})||[]},only:function(x){if(!E(x))throw Error("React.Children.only expected to receive a single React element child.");return x}};t.Activity=Ue,t.Children=Sn,t.Component=i,t.Fragment=A,t.Profiler=H,t.PureComponent=a,t.StrictMode=L,t.Suspense=Q,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=rt,t.__COMPILER_RUNTIME=Ot,t.act=function(x){var k=rt.actQueue,B=Gn;Gn++;var j=rt.actQueue=k!==null?k:[],J=!1;try{var ct=x()}catch(lt){rt.thrownErrors.push(lt)}if(0<rt.thrownErrors.length)throw wt(k,B),x=zt(rt.thrownErrors),rt.thrownErrors.length=0,x;if(ct!==null&&typeof ct=="object"&&typeof ct.then=="function"){var ot=ct;return Kr(function(){J||Vn||(Vn=!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(lt,Ce){J=!0,ot.then(function(_n){if(wt(k,B),B===0){try{Xt(j),pt(function(){return It(_n,lt,Ce)})}catch(Wa){rt.thrownErrors.push(Wa)}if(0<rt.thrownErrors.length){var Ha=zt(rt.thrownErrors);rt.thrownErrors.length=0,Ce(Ha)}}else lt(_n)},function(_n){wt(k,B),0<rt.thrownErrors.length&&(_n=zt(rt.thrownErrors),rt.thrownErrors.length=0),Ce(_n)})}}}var bt=ct;if(wt(k,B),B===0&&(Xt(j),j.length!==0&&Kr(function(){J||Vn||(Vn=!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(() => ...)"))}),rt.actQueue=null),0<rt.thrownErrors.length)throw x=zt(rt.thrownErrors),rt.thrownErrors.length=0,x;return{then:function(lt,Ce){J=!0,B===0?(rt.actQueue=j,pt(function(){return It(bt,lt,Ce)})):lt(bt)}}},t.cache=function(x){return function(){return x.apply(null,arguments)}},t.cacheSignal=function(){return null},t.captureOwnerStack=function(){var x=rt.getCurrentStack;return x===null?null:x()},t.cloneElement=function(x,k,B){if(x==null)throw Error("The argument must be a React element, but you passed "+x+".");var j=z({},x.props),J=x.key,ct=x._owner;if(k!=null){var ot;t:{if(Gt.call(k,"ref")&&(ot=Object.getOwnPropertyDescriptor(k,"ref").get)&&ot.isReactWarning){ot=!1;break t}ot=k.ref!==void 0}ot&&(ct=f()),p(k)&&(l(k.key),J=""+k.key);for(bt in k)!Gt.call(k,bt)||bt==="key"||bt==="__self"||bt==="__source"||bt==="ref"&&k.ref===void 0||(j[bt]=k[bt])}var bt=arguments.length-2;if(bt===1)j.children=B;else if(1<bt){ot=Array(bt);for(var lt=0;lt<bt;lt++)ot[lt]=arguments[lt+2];j.children=ot}for(j=b(x.type,J,j,ct,x._debugStack,x._debugTask),J=2;J<arguments.length;J++)w(arguments[J]);return j},t.createContext=function(x){return x={$$typeof:ht,_currentValue:x,_currentValue2:x,_threadCount:0,Provider:null,Consumer:null},x.Provider=x,x.Consumer={$$typeof:W,_context:x},x._currentRenderer=null,x._currentRenderer2=null,x},t.createElement=function(x,k,B){for(var j=2;j<arguments.length;j++)w(arguments[j]);j={};var J=null;if(k!=null)for(lt in Hr||!("__self"in k)||"key"in k||(Hr=!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")),p(k)&&(l(k.key),J=""+k.key),k)Gt.call(k,lt)&&lt!=="key"&&lt!=="__self"&&lt!=="__source"&&(j[lt]=k[lt]);var ct=arguments.length-2;if(ct===1)j.children=B;else if(1<ct){for(var ot=Array(ct),bt=0;bt<ct;bt++)ot[bt]=arguments[bt+2];Object.freeze&&Object.freeze(ot),j.children=ot}if(x&&x.defaultProps)for(lt in ct=x.defaultProps,ct)j[lt]===void 0&&(j[lt]=ct[lt]);J&&_(j,typeof x=="function"?x.displayName||x.name||"Unknown":x);var lt=1e4>rt.recentlyCreatedOwnerStacks++;return b(x,J,j,f(),lt?Error("react-stack-top-frame"):qa,lt?Vr(d(x)):Jr)},t.createRef=function(){var x={current:null};return Object.seal(x),x},t.forwardRef=function(x){x!=null&&x.$$typeof===at?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof x!="function"?console.error("forwardRef requires a render function but was given %s.",x===null?"null":typeof x):x.length!==0&&x.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",x.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),x!=null&&x.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var k={$$typeof:mt,render:x},B;return Object.defineProperty(k,"displayName",{enumerable:!1,configurable:!0,get:function(){return B},set:function(j){B=j,x.name||x.displayName||(Object.defineProperty(x,"name",{value:j}),x.displayName=j)}}),k},t.isValidElement=E,t.lazy=function(x){x={_status:-1,_result:x};var k={$$typeof:Ct,_payload:x,_init:V},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 x._ioInfo=B,k._debugInfo=[{awaited:B}],k},t.memo=function(x,k){x==null&&console.error("memo: The first argument must be a component. Instead received: %s",x===null?"null":typeof x),k={$$typeof:at,type:x,compare:k===void 0?null:k};var B;return Object.defineProperty(k,"displayName",{enumerable:!1,configurable:!0,get:function(){return B},set:function(j){B=j,x.name||x.displayName||(Object.defineProperty(x,"name",{value:j}),x.displayName=j)}}),k},t.startTransition=function(x){var k=rt.T,B={};B._updatedFibers=new Set,rt.T=B;try{var j=x(),J=rt.S;J!==null&&J(B,j),typeof j=="object"&&j!==null&&typeof j.then=="function"&&(rt.asyncTransitions++,j.then(ft,ft),j.then(c,ks))}catch(ct){ks(ct)}finally{k===null&&B._updatedFibers&&(x=B._updatedFibers.size,B._updatedFibers.clear(),10<x&&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.")),k!==null&&B.types!==null&&(k.types!==null&&k.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."),k.types=B.types),rt.T=k}},t.unstable_useCacheRefresh=function(){return q().useCacheRefresh()},t.use=function(x){return q().use(x)},t.useActionState=function(x,k,B){return q().useActionState(x,k,B)},t.useCallback=function(x,k){return q().useCallback(x,k)},t.useContext=function(x){var k=q();return x.$$typeof===W&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),k.useContext(x)},t.useDebugValue=function(x,k){return q().useDebugValue(x,k)},t.useDeferredValue=function(x,k){return q().useDeferredValue(x,k)},t.useEffect=function(x,k){return x==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),q().useEffect(x,k)},t.useEffectEvent=function(x){return q().useEffectEvent(x)},t.useId=function(){return q().useId()},t.useImperativeHandle=function(x,k,B){return q().useImperativeHandle(x,k,B)},t.useInsertionEffect=function(x,k){return x==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),q().useInsertionEffect(x,k)},t.useLayoutEffect=function(x,k){return x==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),q().useLayoutEffect(x,k)},t.useMemo=function(x,k){return q().useMemo(x,k)},t.useOptimistic=function(x,k){return q().useOptimistic(x,k)},t.useReducer=function(x,k,B){return q().useReducer(x,k,B)},t.useRef=function(x){return q().useRef(x)},t.useState=function(x){return q().useState(x)},t.useSyncExternalStore=function(x,k,B){return q().useSyncExternalStore(x,k,B)},t.useTransition=function(){return q().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())}()}(Fs,Fs.exports)),Fs.exports}({}).NODE_ENV==="production"?ed():nd();const ci={}.NODE_ENV!=="production"?Object.freeze({}):{},sd=()=>{},pc=Object.assign,gc=Array.isArray,Bs=s=>typeof s=="function",rd=s=>typeof s=="string",id=s=>typeof s=="symbol",hi=s=>s!==null&&typeof s=="object";let yc;const Us=()=>yc||(yc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});new Set(Object.getOwnPropertyNames(Symbol).filter(s=>s!=="arguments"&&s!=="caller").map(s=>Symbol[s]).filter(id));function bc(s){return li(s)?bc(s.__v_raw):!!(s&&s.__v_isReactive)}function li(s){return!!(s&&s.__v_isReadonly)}function ui(s){return!!(s&&s.__v_isShallow)}function En(s){const t=s&&s.__v_raw;return t?En(t):s}function wc(s){return s?s.__v_isRef===!0:!1}/**
59
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),S}function st(){mt.asyncTransitions--}function it(S){if(as===null)try{var R=("require"+Math.random()).slice(0,7);as=(n&&n[R]).call(n,"timers").setImmediate}catch{as=function(W){ks===!1&&(ks=!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 Q=new MessageChannel;Q.port1.onmessage=W,Q.port2.postMessage(void 0)}}return as(S)}function nt(S){return 1<S.length&&typeof AggregateError=="function"?new AggregateError(S):S[0]}function et(S,R){R!==gi-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. "),gi=R}function ct(S,R,$){var W=mt.actQueue;if(W!==null)if(W.length!==0)try{ht(W),it(function(){return ct(S,R,$)});return}catch(Q){mt.thrownErrors.push(Q)}else mt.actQueue=null;0<mt.thrownErrors.length?(W=nt(mt.thrownErrors),mt.thrownErrors.length=0,$(W)):R(S)}function ht(S){if(!Ir){Ir=!0;var R=0;try{for(;R<S.length;R++){var $=S[R];do{mt.didUsePromise=!1;var W=$(!1);if(W!==null){if(mt.didUsePromise){S[R]=$,S.splice(0,R);return}$=W}else break}while(1)}S.length=0}catch(Q){S.splice(0,R+1),mt.thrownErrors.push(Q)}finally{Ir=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var B=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),P=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),X=Symbol.for("react.consumer"),dt=Symbol.for("react.context"),vt=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),Et=Symbol.for("react.suspense_list"),lt=Symbol.for("react.memo"),Dt=Symbol.for("react.lazy"),In=Symbol.for("react.activity"),hn=Symbol.iterator,un={},qe={isMounted:function(){return!1},enqueueForceUpdate:function(S){i(S,"forceUpdate")},enqueueReplaceState:function(S){i(S,"replaceState")},enqueueSetState:function(S){i(S,"setState")}},F=Object.assign,Rt={};Object.freeze(Rt),r.prototype.isReactComponent={},r.prototype.setState=function(S,R){if(typeof S!="object"&&typeof S!="function"&&S!=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,S,R,"setState")},r.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};var Gt={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(Ls in Gt)Gt.hasOwnProperty(Ls)&&e(Ls,Gt[Ls]);o.prototype=r.prototype,Gt=a.prototype=new o,Gt.constructor=a,F(Gt,r.prototype),Gt.isPureReactComponent=!0;var Mr=Array.isArray,Ha=Symbol.for("react.client.reference"),mt={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},ie=Object.prototype.hasOwnProperty,qa=console.createTask?console.createTask:function(){return null};Gt={react_stack_bottom_frame:function(S){return S()}};var Ka,Ja,Za={},Ff=Gt.react_stack_bottom_frame.bind(Gt,p)(),Qa=qa(f(p)),Dr=!1,Rr=/\/+/g,Or=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var R=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(R))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},ks=!1,as=null,gi=0,yi=!1,Ir=!1,tc=typeof queueMicrotask=="function"?function(S){queueMicrotask(function(){return queueMicrotask(S)})}:it;Gt=Object.freeze({__proto__:null,c:function(S){return Y().useMemoCache(S)}});var Ls={map:N,forEach:function(S,R,$){N(S,function(){R.apply(this,arguments)},$)},count:function(S){var R=0;return N(S,function(){R++}),R},toArray:function(S){return N(S,function(R){return R})||[]},only:function(S){if(!E(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};t.Activity=In,t.Children=Ls,t.Component=r,t.Fragment=P,t.Profiler=G,t.PureComponent=a,t.StrictMode=I,t.Suspense=J,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=mt,t.__COMPILER_RUNTIME=Gt,t.act=function(S){var R=mt.actQueue,$=gi;gi++;var W=mt.actQueue=R!==null?R:[],Q=!1;try{var yt=S()}catch(bt){mt.thrownErrors.push(bt)}if(0<mt.thrownErrors.length)throw et(R,$),S=nt(mt.thrownErrors),mt.thrownErrors.length=0,S;if(yt!==null&&typeof yt=="object"&&typeof yt.then=="function"){var gt=yt;return tc(function(){Q||yi||(yi=!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(bt,Ke){Q=!0,gt.then(function(cs){if(et(R,$),$===0){try{ht(W),it(function(){return ct(cs,bt,Ke)})}catch(jf){mt.thrownErrors.push(jf)}if(0<mt.thrownErrors.length){var Bf=nt(mt.thrownErrors);mt.thrownErrors.length=0,Ke(Bf)}}else bt(cs)},function(cs){et(R,$),0<mt.thrownErrors.length&&(cs=nt(mt.thrownErrors),mt.thrownErrors.length=0),Ke(cs)})}}}var Pt=yt;if(et(R,$),$===0&&(ht(W),W.length!==0&&tc(function(){Q||yi||(yi=!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(() => ...)"))}),mt.actQueue=null),0<mt.thrownErrors.length)throw S=nt(mt.thrownErrors),mt.thrownErrors.length=0,S;return{then:function(bt,Ke){Q=!0,$===0?(mt.actQueue=W,it(function(){return ct(Pt,bt,Ke)})):bt(Pt)}}},t.cache=function(S){return function(){return S.apply(null,arguments)}},t.cacheSignal=function(){return null},t.captureOwnerStack=function(){var S=mt.getCurrentStack;return S===null?null:S()},t.cloneElement=function(S,R,$){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var W=F({},S.props),Q=S.key,yt=S._owner;if(R!=null){var gt;t:{if(ie.call(R,"ref")&&(gt=Object.getOwnPropertyDescriptor(R,"ref").get)&&gt.isReactWarning){gt=!1;break t}gt=R.ref!==void 0}gt&&(yt=d()),m(R)&&(u(R.key),Q=""+R.key);for(Pt in R)!ie.call(R,Pt)||Pt==="key"||Pt==="__self"||Pt==="__source"||Pt==="ref"&&R.ref===void 0||(W[Pt]=R[Pt])}var Pt=arguments.length-2;if(Pt===1)W.children=$;else if(1<Pt){gt=Array(Pt);for(var bt=0;bt<Pt;bt++)gt[bt]=arguments[bt+2];W.children=gt}for(W=v(S.type,Q,W,yt,S._debugStack,S._debugTask),Q=2;Q<arguments.length;Q++)b(arguments[Q]);return W},t.createContext=function(S){return S={$$typeof:dt,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:X,_context:S},S._currentRenderer=null,S._currentRenderer2=null,S},t.createElement=function(S,R,$){for(var W=2;W<arguments.length;W++)b(arguments[W]);W={};var Q=null;if(R!=null)for(bt in Ja||!("__self"in R)||"key"in R||(Ja=!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(R)&&(u(R.key),Q=""+R.key),R)ie.call(R,bt)&&bt!=="key"&&bt!=="__self"&&bt!=="__source"&&(W[bt]=R[bt]);var yt=arguments.length-2;if(yt===1)W.children=$;else if(1<yt){for(var gt=Array(yt),Pt=0;Pt<yt;Pt++)gt[Pt]=arguments[Pt+2];Object.freeze&&Object.freeze(gt),W.children=gt}if(S&&S.defaultProps)for(bt in yt=S.defaultProps,yt)W[bt]===void 0&&(W[bt]=yt[bt]);Q&&y(W,typeof S=="function"?S.displayName||S.name||"Unknown":S);var bt=1e4>mt.recentlyCreatedOwnerStacks++;return v(S,Q,W,d(),bt?Error("react-stack-top-frame"):Ff,bt?qa(f(S)):Qa)},t.createRef=function(){var S={current:null};return Object.seal(S),S},t.forwardRef=function(S){S!=null&&S.$$typeof===lt?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof S!="function"?console.error("forwardRef requires a render function but was given %s.",S===null?"null":typeof S):S.length!==0&&S.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",S.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),S!=null&&S.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var R={$$typeof:vt,render:S},$;return Object.defineProperty(R,"displayName",{enumerable:!1,configurable:!0,get:function(){return $},set:function(W){$=W,S.name||S.displayName||(Object.defineProperty(S,"name",{value:W}),S.displayName=W)}}),R},t.isValidElement=E,t.lazy=function(S){S={_status:-1,_result:S};var R={$$typeof:Dt,_payload:S,_init:U},$={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return S._ioInfo=$,R._debugInfo=[{awaited:$}],R},t.memo=function(S,R){S==null&&console.error("memo: The first argument must be a component. Instead received: %s",S===null?"null":typeof S),R={$$typeof:lt,type:S,compare:R===void 0?null:R};var $;return Object.defineProperty(R,"displayName",{enumerable:!1,configurable:!0,get:function(){return $},set:function(W){$=W,S.name||S.displayName||(Object.defineProperty(S,"name",{value:W}),S.displayName=W)}}),R},t.startTransition=function(S){var R=mt.T,$={};$._updatedFibers=new Set,mt.T=$;try{var W=S(),Q=mt.S;Q!==null&&Q($,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&(mt.asyncTransitions++,W.then(st,st),W.then(c,Or))}catch(yt){Or(yt)}finally{R===null&&$._updatedFibers&&(S=$._updatedFibers.size,$._updatedFibers.clear(),10<S&&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.")),R!==null&&$.types!==null&&(R.types!==null&&R.types!==$.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."),R.types=$.types),mt.T=R}},t.unstable_useCacheRefresh=function(){return Y().useCacheRefresh()},t.use=function(S){return Y().use(S)},t.useActionState=function(S,R,$){return Y().useActionState(S,R,$)},t.useCallback=function(S,R){return Y().useCallback(S,R)},t.useContext=function(S){var R=Y();return S.$$typeof===X&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),R.useContext(S)},t.useDebugValue=function(S,R){return Y().useDebugValue(S,R)},t.useDeferredValue=function(S,R){return Y().useDeferredValue(S,R)},t.useEffect=function(S,R){return S==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),Y().useEffect(S,R)},t.useEffectEvent=function(S){return Y().useEffectEvent(S)},t.useId=function(){return Y().useId()},t.useImperativeHandle=function(S,R,$){return Y().useImperativeHandle(S,R,$)},t.useInsertionEffect=function(S,R){return S==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),Y().useInsertionEffect(S,R)},t.useLayoutEffect=function(S,R){return S==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),Y().useLayoutEffect(S,R)},t.useMemo=function(S,R){return Y().useMemo(S,R)},t.useOptimistic=function(S,R){return Y().useOptimistic(S,R)},t.useReducer=function(S,R,$){return Y().useReducer(S,R,$)},t.useRef=function(S){return Y().useRef(S)},t.useState=function(S){return Y().useState(S)},t.useSyncExternalStore=function(S,R,$){return Y().useSyncExternalStore(S,R,$)},t.useTransition=function(){return Y().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())}()}(Ui,Ui.exports)),Ui.exports}({}).NODE_ENV==="production"?Vh.exports=oT():Vh.exports=aT();var H=Vh.exports;const cT=Pb({__proto__:null,default:Kc(H)},[H]);/**
60
+ * @vue/shared v3.5.13
61
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
62
+ * @license MIT
63
+ **//*! #__NO_SIDE_EFFECTS__ */function hT(n){const t=Object.create(null);for(const e of n.split(","))t[e]=1;return e=>e in t}const Le={}.NODE_ENV!=="production"?Object.freeze({}):{},Yi=()=>{},Ue=Object.assign,uT=Object.prototype.hasOwnProperty,Ut=(n,t)=>uT.call(n,t),ae=Array.isArray,qs=n=>Do(n)==="[object Map]",lT=n=>Do(n)==="[object Set]",ce=n=>typeof n=="function",Mo=n=>typeof n=="string",Gi=n=>typeof n=="symbol",nn=n=>n!==null&&typeof n=="object",fT=n=>(nn(n)||ce(n))&&ce(n.then)&&ce(n.catch),dT=Object.prototype.toString,Do=n=>dT.call(n),Rp=n=>Do(n).slice(8,-1),mT=n=>Do(n)==="[object Object]",Nh=n=>Mo(n)&&n!=="NaN"&&n[0]!=="-"&&""+parseInt(n,10)===n,pT=(n=>{const t=Object.create(null);return e=>t[e]||(t[e]=n(e))})(n=>n.charAt(0).toUpperCase()+n.slice(1)),qn=(n,t)=>!Object.is(n,t),gT=(n,t,e,s=!1)=>{Object.defineProperty(n,t,{configurable:!0,enumerable:!1,writable:s,value:e})};let Op;const Ro=()=>Op||(Op=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 _n(n,...t){console.warn(`[Vue warn] ${n}`,...t)}let _t;const zh=new WeakSet;class yT{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,zh.has(this)&&(zh.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||kp(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Fp(this),Lp(this);const t=_t,e=Ye;_t=this,Ye=!0;try{return this.fn()}finally{({}).NODE_ENV!=="production"&&_t!==this&&_n("Active effect was not restored correctly - this is likely a Vue internal bug."),Vp(this),_t=t,Ye=e,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)$h(t);this.deps=this.depsTail=void 0,Fp(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?zh.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){jh(this)&&this.run()}get dirty(){return jh(this)}}let Ip=0,Xi,Wi;function kp(n,t=!1){if(n.flags|=8,t){n.next=Wi,Wi=n;return}n.next=Xi,Xi=n}function Fh(){Ip++}function Bh(){if(--Ip>0)return;if(Wi){let t=Wi;for(Wi=void 0;t;){const e=t.next;t.next=void 0,t.flags&=-9,t=e}}let n;for(;Xi;){let t=Xi;for(Xi=void 0;t;){const e=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){n||(n=s)}t=e}}if(n)throw n}function Lp(n){for(let t=n.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Vp(n){let t,e=n.depsTail,s=e;for(;s;){const i=s.prevDep;s.version===-1?(s===e&&(e=i),$h(s),vT(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=i}n.deps=t,n.depsTail=e}function jh(n){for(let t=n.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Np(t.dep.computed)||t.dep.version!==t.version))return!0;return!!n._dirty}function Np(n){if(n.flags&4&&!(n.flags&16)||(n.flags&=-17,n.globalVersion===Hi))return;n.globalVersion=Hi;const t=n.dep;if(n.flags|=2,t.version>0&&!n.isSSR&&n.deps&&!jh(n)){n.flags&=-3;return}const e=_t,s=Ye;_t=n,Ye=!0;try{Lp(n);const i=n.fn(n._value);(t.version===0||qn(i,n._value))&&(n._value=i,t.version++)}catch(i){throw t.version++,i}finally{_t=e,Ye=s,Vp(n),n.flags&=-3}}function $h(n,t=!1){const{dep:e,prevSub:s,nextSub:i}=n;if(s&&(s.nextSub=i,n.prevSub=void 0),i&&(i.prevSub=s,n.nextSub=void 0),{}.NODE_ENV!=="production"&&e.subsHead===n&&(e.subsHead=i),e.subs===n&&(e.subs=s,!s&&e.computed)){e.computed.flags&=-5;for(let r=e.computed.deps;r;r=r.nextDep)$h(r,!0)}!t&&!--e.sc&&e.map&&e.map.delete(e.key)}function vT(n){const{prevDep:t,nextDep:e}=n;t&&(t.nextDep=e,n.prevDep=void 0),e&&(e.prevDep=t,n.nextDep=void 0)}let Ye=!0;const zp=[];function Oo(){zp.push(Ye),Ye=!1}function Io(){const n=zp.pop();Ye=n===void 0?!0:n}function Fp(n){const{cleanup:t}=n;if(n.cleanup=void 0,t){const e=_t;_t=void 0;try{t()}finally{_t=e}}}let Hi=0;class bT{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 Uh{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(!_t||!Ye||_t===this.computed)return;let e=this.activeLink;if(e===void 0||e.sub!==_t)e=this.activeLink=new bT(_t,this),_t.deps?(e.prevDep=_t.depsTail,_t.depsTail.nextDep=e,_t.depsTail=e):_t.deps=_t.depsTail=e,Bp(e);else if(e.version===-1&&(e.version=this.version,e.nextDep)){const s=e.nextDep;s.prevDep=e.prevDep,e.prevDep&&(e.prevDep.nextDep=s),e.prevDep=_t.depsTail,e.nextDep=void 0,_t.depsTail.nextDep=e,_t.depsTail=e,_t.deps===e&&(_t.deps=s)}return{}.NODE_ENV!=="production"&&_t.onTrack&&_t.onTrack(Ue({effect:_t},t)),e}trigger(t){this.version++,Hi++,this.notify(t)}notify(t){Fh();try{if({}.NODE_ENV!=="production")for(let e=this.subsHead;e;e=e.nextSub)e.sub.onTrigger&&!(e.sub.flags&8)&&e.sub.onTrigger(Ue({effect:e.sub},t));for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Bh()}}}function Bp(n){if(n.dep.sc++,n.sub.flags&4){const t=n.dep.computed;if(t&&!n.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Bp(s)}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 Yh=new WeakMap,xs=Symbol({}.NODE_ENV!=="production"?"Object iterate":""),Gh=Symbol({}.NODE_ENV!=="production"?"Map keys iterate":""),qi=Symbol({}.NODE_ENV!=="production"?"Array iterate":"");function he(n,t,e){if(Ye&&_t){let s=Yh.get(n);s||Yh.set(n,s=new Map);let i=s.get(e);i||(s.set(e,i=new Uh),i.map=s,i.key=e),{}.NODE_ENV!=="production"?i.track({target:n,type:t,key:e}):i.track()}}function Kn(n,t,e,s,i,r){const o=Yh.get(n);if(!o){Hi++;return}const a=c=>{c&&({}.NODE_ENV!=="production"?c.trigger({target:n,type:t,key:e,newValue:s,oldValue:i,oldTarget:r}):c.trigger())};if(Fh(),t==="clear")o.forEach(a);else{const c=ae(n),h=c&&Nh(e);if(c&&e==="length"){const u=Number(s);o.forEach((l,f)=>{(f==="length"||f===qi||!Gi(f)&&f>=u)&&a(l)})}else switch((e!==void 0||o.has(void 0))&&a(o.get(e)),h&&a(o.get(qi)),t){case"add":c?h&&a(o.get("length")):(a(o.get(xs)),qs(n)&&a(o.get(Gh)));break;case"delete":c||(a(o.get(xs)),qs(n)&&a(o.get(Gh)));break;case"set":qs(n)&&a(o.get(xs));break}}Bh()}function Ks(n){const t=St(n);return t===n?t:(he(t,"iterate",qi),we(n)?t:t.map(fe))}function Xh(n){return he(n=St(n),"iterate",qi),n}const wT={__proto__:null,[Symbol.iterator](){return Wh(this,Symbol.iterator,fe)},concat(...n){return Ks(this).concat(...n.map(t=>ae(t)?Ks(t):t))},entries(){return Wh(this,"entries",n=>(n[1]=fe(n[1]),n))},every(n,t){return En(this,"every",n,t,void 0,arguments)},filter(n,t){return En(this,"filter",n,t,e=>e.map(fe),arguments)},find(n,t){return En(this,"find",n,t,fe,arguments)},findIndex(n,t){return En(this,"findIndex",n,t,void 0,arguments)},findLast(n,t){return En(this,"findLast",n,t,fe,arguments)},findLastIndex(n,t){return En(this,"findLastIndex",n,t,void 0,arguments)},forEach(n,t){return En(this,"forEach",n,t,void 0,arguments)},includes(...n){return Hh(this,"includes",n)},indexOf(...n){return Hh(this,"indexOf",n)},join(n){return Ks(this).join(n)},lastIndexOf(...n){return Hh(this,"lastIndexOf",n)},map(n,t){return En(this,"map",n,t,void 0,arguments)},pop(){return Ki(this,"pop")},push(...n){return Ki(this,"push",n)},reduce(n,...t){return jp(this,"reduce",n,t)},reduceRight(n,...t){return jp(this,"reduceRight",n,t)},shift(){return Ki(this,"shift")},some(n,t){return En(this,"some",n,t,void 0,arguments)},splice(...n){return Ki(this,"splice",n)},toReversed(){return Ks(this).toReversed()},toSorted(n){return Ks(this).toSorted(n)},toSpliced(...n){return Ks(this).toSpliced(...n)},unshift(...n){return Ki(this,"unshift",n)},values(){return Wh(this,"values",fe)}};function Wh(n,t,e){const s=Xh(n),i=s[t]();return s!==n&&!we(n)&&(i._next=i.next,i.next=()=>{const r=i._next();return r.value&&(r.value=e(r.value)),r}),i}const xT=Array.prototype;function En(n,t,e,s,i,r){const o=Xh(n),a=o!==n&&!we(n),c=o[t];if(c!==xT[t]){const l=c.apply(n,r);return a?fe(l):l}let h=e;o!==n&&(a?h=function(l,f){return e.call(this,fe(l),f,n)}:e.length>2&&(h=function(l,f){return e.call(this,l,f,n)}));const u=c.call(o,h,s);return a&&i?i(u):u}function jp(n,t,e,s){const i=Xh(n);let r=e;return i!==n&&(we(n)?e.length>3&&(r=function(o,a,c){return e.call(this,o,a,c,n)}):r=function(o,a,c){return e.call(this,o,fe(a),c,n)}),i[t](r,...s)}function Hh(n,t,e){const s=St(n);he(s,"iterate",qi);const i=s[t](...e);return(i===-1||i===!1)&&VT(e[0])?(e[0]=St(e[0]),s[t](...e)):i}function Ki(n,t,e=[]){Oo(),Fh();const s=St(n)[t].apply(n,e);return Bh(),Io(),s}const ST=hT("__proto__,__v_isRef,__isVue"),$p=new Set(Object.getOwnPropertyNames(Symbol).filter(n=>n!=="arguments"&&n!=="caller").map(n=>Symbol[n]).filter(Gi));function _T(n){Gi(n)||(n=String(n));const t=St(this);return he(t,"has",n),t.hasOwnProperty(n)}class Up{constructor(t=!1,e=!1){this._isReadonly=t,this._isShallow=e}get(t,e,s){if(e==="__v_skip")return t.__v_skip;const i=this._isReadonly,r=this._isShallow;if(e==="__v_isReactive")return!i;if(e==="__v_isReadonly")return i;if(e==="__v_isShallow")return r;if(e==="__v_raw")return s===(i?r?Hp:Wp:r?IT:Xp).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=ae(t);if(!i){let c;if(o&&(c=wT[e]))return c;if(e==="hasOwnProperty")return _T}const a=Reflect.get(t,e,xe(t)?t:s);return(Gi(e)?$p.has(e):ST(e))||(i||he(t,"get",e),r)?a:xe(a)?o&&Nh(e)?a:a.value:nn(a)?i?Jh(a):qp(a):a}}class ET extends Up{constructor(t=!1){super(!1,t)}set(t,e,s,i){let r=t[e];if(!this._isShallow){const c=Tn(r);if(!we(s)&&!Tn(s)&&(r=St(r),s=St(s)),!ae(t)&&xe(r)&&!xe(s))return c?!1:(r.value=s,!0)}const o=ae(t)&&Nh(e)?Number(e)<t.length:Ut(t,e),a=Reflect.set(t,e,s,xe(t)?t:i);return t===St(i)&&(o?qn(s,r)&&Kn(t,"set",e,s,r):Kn(t,"add",e,s)),a}deleteProperty(t,e){const s=Ut(t,e),i=t[e],r=Reflect.deleteProperty(t,e);return r&&s&&Kn(t,"delete",e,void 0,i),r}has(t,e){const s=Reflect.has(t,e);return(!Gi(e)||!$p.has(e))&&he(t,"has",e),s}ownKeys(t){return he(t,"iterate",ae(t)?"length":xs),Reflect.ownKeys(t)}}class Yp extends Up{constructor(t=!1){super(!0,t)}set(t,e){return{}.NODE_ENV!=="production"&&_n(`Set operation on key "${String(e)}" failed: target is readonly.`,t),!0}deleteProperty(t,e){return{}.NODE_ENV!=="production"&&_n(`Delete operation on key "${String(e)}" failed: target is readonly.`,t),!0}}const TT=new ET,CT=new Yp,PT=new Yp(!0),qh=n=>n,ko=n=>Reflect.getPrototypeOf(n);function AT(n,t,e){return function(...s){const i=this.__v_raw,r=St(i),o=qs(r),a=n==="entries"||n===Symbol.iterator&&o,c=n==="keys"&&o,h=i[n](...s),u=e?qh:t?Qh:fe;return!t&&he(r,"iterate",c?Gh:xs),{next(){const{value:l,done:f}=h.next();return f?{value:l,done:f}:{value:a?[u(l[0]),u(l[1])]:u(l),done:f}},[Symbol.iterator](){return this}}}}function Lo(n){return function(...t){if({}.NODE_ENV!=="production"){const e=t[0]?`on key "${t[0]}" `:"";_n(`${pT(n)} operation ${e}failed: target is readonly.`,St(this))}return n==="delete"?!1:n==="clear"?void 0:this}}function MT(n,t){const e={get(i){const r=this.__v_raw,o=St(r),a=St(i);n||(qn(i,a)&&he(o,"get",i),he(o,"get",a));const{has:c}=ko(o),h=t?qh:n?Qh:fe;if(c.call(o,i))return h(r.get(i));if(c.call(o,a))return h(r.get(a));r!==o&&r.get(i)},get size(){const i=this.__v_raw;return!n&&he(St(i),"iterate",xs),Reflect.get(i,"size",i)},has(i){const r=this.__v_raw,o=St(r),a=St(i);return n||(qn(i,a)&&he(o,"has",i),he(o,"has",a)),i===a?r.has(i):r.has(i)||r.has(a)},forEach(i,r){const o=this,a=o.__v_raw,c=St(a),h=t?qh:n?Qh:fe;return!n&&he(c,"iterate",xs),a.forEach((u,l)=>i.call(r,h(u),h(l),o))}};return Ue(e,n?{add:Lo("add"),set:Lo("set"),delete:Lo("delete"),clear:Lo("clear")}:{add(i){!t&&!we(i)&&!Tn(i)&&(i=St(i));const r=St(this);return ko(r).has.call(r,i)||(r.add(i),Kn(r,"add",i,i)),this},set(i,r){!t&&!we(r)&&!Tn(r)&&(r=St(r));const o=St(this),{has:a,get:c}=ko(o);let h=a.call(o,i);h?{}.NODE_ENV!=="production"&&Gp(o,a,i):(i=St(i),h=a.call(o,i));const u=c.call(o,i);return o.set(i,r),h?qn(r,u)&&Kn(o,"set",i,r,u):Kn(o,"add",i,r),this},delete(i){const r=St(this),{has:o,get:a}=ko(r);let c=o.call(r,i);c?{}.NODE_ENV!=="production"&&Gp(r,o,i):(i=St(i),c=o.call(r,i));const h=a?a.call(r,i):void 0,u=r.delete(i);return c&&Kn(r,"delete",i,void 0,h),u},clear(){const i=St(this),r=i.size!==0,o={}.NODE_ENV!=="production"?qs(i)?new Map(i):new Set(i):void 0,a=i.clear();return r&&Kn(i,"clear",void 0,void 0,o),a}}),["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=AT(i,n,t)}),e}function Kh(n,t){const e=MT(n,t);return(s,i,r)=>i==="__v_isReactive"?!n:i==="__v_isReadonly"?n:i==="__v_raw"?s:Reflect.get(Ut(e,i)&&i in s?e:s,i,r)}const DT={get:Kh(!1,!1)},RT={get:Kh(!0,!1)},OT={get:Kh(!0,!0)};function Gp(n,t,e){const s=St(e);if(s!==e&&t.call(n,s)){const i=Rp(n);_n(`Reactive ${i} contains both the raw and reactive versions of the same object${i==="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 Xp=new WeakMap,IT=new WeakMap,Wp=new WeakMap,Hp=new WeakMap;function kT(n){switch(n){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function LT(n){return n.__v_skip||!Object.isExtensible(n)?0:kT(Rp(n))}function qp(n){return Tn(n)?n:Zh(n,!1,TT,DT,Xp)}function Jh(n){return Zh(n,!0,CT,RT,Wp)}function Vo(n){return Zh(n,!0,PT,OT,Hp)}function Zh(n,t,e,s,i){if(!nn(n))return{}.NODE_ENV!=="production"&&_n(`value cannot be made ${t?"readonly":"reactive"}: ${String(n)}`),n;if(n.__v_raw&&!(t&&n.__v_isReactive))return n;const r=i.get(n);if(r)return r;const o=LT(n);if(o===0)return n;const a=new Proxy(n,o===2?s:e);return i.set(n,a),a}function Js(n){return Tn(n)?Js(n.__v_raw):!!(n&&n.__v_isReactive)}function Tn(n){return!!(n&&n.__v_isReadonly)}function we(n){return!!(n&&n.__v_isShallow)}function VT(n){return n?!!n.__v_raw:!1}function St(n){const t=n&&n.__v_raw;return t?St(t):n}function NT(n){return!Ut(n,"__v_skip")&&Object.isExtensible(n)&&gT(n,"__v_skip",!0),n}const fe=n=>nn(n)?qp(n):n,Qh=n=>nn(n)?Jh(n):n;function xe(n){return n?n.__v_isRef===!0:!1}function Kp(n){return Jp(n,!1)}function zT(n){return Jp(n,!0)}function Jp(n,t){return xe(n)?n:new FT(n,t)}class FT{constructor(t,e){this.dep=new Uh,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=e?t:St(t),this._value=e?t:fe(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,s=this.__v_isShallow||we(t)||Tn(t);t=s?t:St(t),qn(t,e)&&(this._rawValue=t,this._value=s?t:fe(t),{}.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:e}):this.dep.trigger())}}function BT(n){return xe(n)?n.value:n}const jT={get:(n,t,e)=>t==="__v_raw"?n:BT(Reflect.get(n,t,e)),set:(n,t,e,s)=>{const i=n[t];return xe(i)&&!xe(e)?(i.value=e,!0):Reflect.set(n,t,e,s)}};function $T(n){return Js(n)?n:new Proxy(n,jT)}class UT{constructor(t,e,s){this.fn=t,this.setter=e,this._value=void 0,this.dep=new Uh(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Hi-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!e,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&_t!==this)return kp(this,!0),!0}get value(){const t={}.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return Np(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter?this.setter(t):{}.NODE_ENV!=="production"&&_n("Write operation failed: computed value is readonly")}}function YT(n,t,e=!1){let s,i;ce(n)?s=n:(s=n.get,i=n.set);const r=new UT(s,i,e);return{}.NODE_ENV!=="production"&&t&&!e&&(r.onTrack=t.onTrack,r.onTrigger=t.onTrigger),r}const No={},zo=new WeakMap;let Ss;function GT(n,t=!1,e=Ss){if(e){let s=zo.get(e);s||zo.set(e,s=[]),s.push(n)}else({}).NODE_ENV!=="production"&&!t&&_n("onWatcherCleanup() was called when there was no active watcher to associate with.")}function XT(n,t,e=Le){const{immediate:s,deep:i,once:r,scheduler:o,augmentJob:a,call:c}=e,h=b=>{(e.onWarn||_n)("Invalid watch source: ",b,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},u=b=>i?b:we(b)||i===!1||i===0?Jn(b,1):Jn(b);let l,f,d,p,m=!1,y=!1;if(xe(n)?(f=()=>n.value,m=we(n)):Js(n)?(f=()=>u(n),m=!0):ae(n)?(y=!0,m=n.some(b=>Js(b)||we(b)),f=()=>n.map(b=>{if(xe(b))return b.value;if(Js(b))return u(b);if(ce(b))return c?c(b,2):b();({}).NODE_ENV!=="production"&&h(b)})):ce(n)?t?f=c?()=>c(n,2):n:f=()=>{if(d){Oo();try{d()}finally{Io()}}const b=Ss;Ss=l;try{return c?c(n,3,[p]):n(p)}finally{Ss=b}}:(f=Yi,{}.NODE_ENV!=="production"&&h(n)),t&&i){const b=f,E=i===!0?1/0:i;f=()=>Jn(b(),E)}const g=()=>{l.stop()};if(r&&t){const b=t;t=(...E)=>{b(...E),g()}}let v=y?new Array(n.length).fill(No):No;const x=b=>{if(!(!(l.flags&1)||!l.dirty&&!b))if(t){const E=l.run();if(i||m||(y?E.some((_,D)=>qn(_,v[D])):qn(E,v))){d&&d();const _=Ss;Ss=l;try{const D=[E,v===No?void 0:y&&v[0]===No?[]:v,p];c?c(t,3,D):t(...D),v=E}finally{Ss=_}}}else l.run()};return a&&a(x),l=new yT(f),l.scheduler=o?()=>o(x,!1):x,p=b=>GT(b,!1,l),d=l.onStop=()=>{const b=zo.get(l);if(b){if(c)c(b,4);else for(const E of b)E();zo.delete(l)}},{}.NODE_ENV!=="production"&&(l.onTrack=e.onTrack,l.onTrigger=e.onTrigger),t?s?x(!0):v=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 Jn(n,t=1/0,e){if(t<=0||!nn(n)||n.__v_skip||(e=e||new Set,e.has(n)))return n;if(e.add(n),t--,xe(n))Jn(n.value,t,e);else if(ae(n))for(let s=0;s<n.length;s++)Jn(n[s],t,e);else if(lT(n)||qs(n))n.forEach(s=>{Jn(s,t,e)});else if(mT(n)){for(const s in n)Jn(n[s],t,e);for(const s of Object.getOwnPropertySymbols(n))Object.prototype.propertyIsEnumerable.call(n,s)&&Jn(n[s],t,e)}return n}/**
30
68
  * @vue/runtime-core v3.5.13
31
69
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
32
70
  * @license MIT
33
- **/const an=[];function od(s){an.push(s)}function ad(){an.pop()}let fi=!1;function cd(s,...t){if(fi)return;fi=!0;const e=an.length?an[an.length-1].component:null,n=e&&e.appContext.config.warnHandler,r=hd();if(n)di(n,e,11,[s+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,r.map(({vnode:i})=>`at <${Ac(e,i.type)}>`).join(`
34
- `),r]);else{const i=[`[Vue warn]: ${s}`,...t];r.length&&i.push(`
35
- `,...ld(r)),console.warn(...i)}fi=!1}function hd(){let s=an[an.length-1];if(!s)return[];const t=[];for(;s;){const e=t[0];e&&e.vnode===s?e.recurseCount++:t.push({vnode:s,recurseCount:0});const n=s.component&&s.component.parent;s=n&&n.vnode}return t}function ld(s){const t=[];return s.forEach((e,n)=>{t.push(...n===0?[]:[`
36
- `],...ud(e))}),t}function ud({vnode:s,recurseCount:t}){const e=t>0?`... (${t} recursive calls)`:"",n=s.component?s.component.parent==null:!1,r=` at <${Ac(s.component,s.type,n)}`,i=">"+e;return s.props?[r,...fd(s.props),i]:[r+i]}function fd(s){const t=[],e=Object.keys(s);return e.slice(0,3).forEach(n=>{t.push(...vc(n,s[n]))}),e.length>3&&t.push(" ..."),t}function vc(s,t,e){return rd(t)?(t=JSON.stringify(t),e?t:[`${s}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?e?t:[`${s}=${t}`]:wc(t)?(t=vc(s,En(t.value),!0),e?t:[`${s}=Ref<`,t,">"]):Bs(t)?[`${s}=fn${t.name?`<${t.name}>`:""}`]:(t=En(t),e?t:[`${s}=`,t])}const xc={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 di(s,t,e,n){try{return n?s(...n):s()}catch(r){Sc(r,t,e)}}function Sc(s,t,e,n=!0){const r=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||ci;if(t){let a=t.parent;const c=t.proxy,h={}.NODE_ENV!=="production"?xc[e]:`https://vuejs.org/error-reference/#runtime-${e}`;for(;a;){const l=a.ec;if(l){for(let u=0;u<l.length;u++)if(l[u](s,c,h)===!1)return}a=a.parent}if(i){di(i,null,10,[s,c,h]);return}}dd(s,e,r,n,o)}function dd(s,t,e,n=!0,r=!1){if({}.NODE_ENV!=="production"){const i=xc[t];if(e&&od(e),cd(`Unhandled error${i?` during execution of ${i}`:""}`),e&&ad(),n)throw s;console.error(s)}else{if(r)throw s;console.error(s)}}const oe=[];let Pe=-1;const Tn=[];let Ge=null,Pn=0;const md=Promise.resolve();let mi=null;const pd=100;function gd(s){let t=Pe+1,e=oe.length;for(;t<e;){const n=t+e>>>1,r=oe[n],i=Hn(r);i<s||i===s&&r.flags&2?t=n+1:e=n}return t}function yd(s){if(!(s.flags&1)){const t=Hn(s),e=oe[oe.length-1];!e||!(s.flags&2)&&t>=Hn(e)?oe.push(s):oe.splice(gd(t),0,s),s.flags|=1,_c()}}function _c(){mi||(mi=md.then(Cc))}function bd(s){gc(s)?Tn.push(...s):Ge&&s.id===-1?Ge.splice(Pn+1,0,s):s.flags&1||(Tn.push(s),s.flags|=1),_c()}function wd(s){if(Tn.length){const t=[...new Set(Tn)].sort((e,n)=>Hn(e)-Hn(n));if(Tn.length=0,Ge){Ge.push(...t);return}for(Ge=t,{}.NODE_ENV!=="production"&&(s=s||new Map),Pn=0;Pn<Ge.length;Pn++){const e=Ge[Pn];({}).NODE_ENV!=="production"&&Ec(s,e)||(e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2)}Ge=null,Pn=0}}const Hn=s=>s.id==null?s.flags&2?-1:1/0:s.id;function Cc(s){({}).NODE_ENV!=="production"&&(s=s||new Map);const t={}.NODE_ENV!=="production"?e=>Ec(s,e):sd;try{for(Pe=0;Pe<oe.length;Pe++){const e=oe[Pe];if(e&&!(e.flags&8)){if({}.NODE_ENV!=="production"&&t(e))continue;e.flags&4&&(e.flags&=-2),di(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2)}}}finally{for(;Pe<oe.length;Pe++){const e=oe[Pe];e&&(e.flags&=-2)}Pe=-1,oe.length=0,wd(s),mi=null,(oe.length||Tn.length)&&Cc(s)}}function Ec(s,t){const e=s.get(t)||0;if(e>pd){const n=t.i,r=n&&Pc(n.type);return Sc(`Maximum recursive updates exceeded${r?` in component <${r}>`:""}. 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 s.set(t,e+1),!1}const pi=new Map;({}).NODE_ENV!=="production"&&(Us().__VUE_HMR_RUNTIME__={createRecord:gi(vd),rerender:gi(xd),reload:gi(Sd)});const $s=new Map;function vd(s,t){return $s.has(s)?!1:($s.set(s,{initialDef:Ys(t),instances:new Set}),!0)}function Ys(s){return Ed(s)?s.__vccOpts:s}function xd(s,t){const e=$s.get(s);e&&(e.initialDef.render=t,[...e.instances].forEach(n=>{t&&(n.render=t,Ys(n.type).render=t),n.renderCache=[],n.update()}))}function Sd(s,t){const e=$s.get(s);if(!e)return;t=Ys(t),Tc(e.initialDef,t);const n=[...e.instances];for(let r=0;r<n.length;r++){const i=n[r],o=Ys(i.type);let a=pi.get(o);a||(o!==e.initialDef&&Tc(o,t),pi.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?yd(()=>{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)}bd(()=>{pi.clear()})}function Tc(s,t){pc(s,t);for(const e in s)e!=="__file"&&!(e in t)&&delete s[e]}function gi(s){return(t,e)=>{try{return s(t,e)}catch(n){console.error(n),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}Us().requestIdleCallback,Us().cancelIdleCallback;{const s=Us(),t=(e,n)=>{let r;return(r=s[e])||(r=s[e]=[]),r.push(n),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};t("__VUE_INSTANCE_SETTERS__",e=>e),t("__VUE_SSR_SETTERS__",e=>e)}const _d=/(?:^|[-_])(\w)/g,Cd=s=>s.replace(_d,t=>t.toUpperCase()).replace(/[-_]/g,"");function Pc(s,t=!0){return Bs(s)?s.displayName||s.name:s.name||t&&s.__name}function Ac(s,t,e=!1){let n=Pc(t);if(!n&&t.__file){const r=t.__file.match(/([^/\\]+)\.\w+$/);r&&(n=r[1])}if(!n&&s&&s.parent){const r=i=>{for(const o in i)if(i[o]===t)return o};n=r(s.components||s.parent.type.components)||r(s.appContext.components)}return n?Cd(n):e?"App":"Anonymous"}function Ed(s){return Bs(s)&&"__vccOpts"in s}function Td(){if({}.NODE_ENV==="production"||typeof window>"u")return;const s={style:"color:#3ba776"},t={style:"color:#1677ff"},e={style:"color:#f5222d"},n={style:"color:#eb2f96"},r={__vue_custom_formatter:!0,header(u){return hi(u)?u.__isVue?["div",s,"VueInstance"]:wc(u)?["div",{},["span",s,l(u)],"<",a("_value"in u?u._value:u),">"]:bc(u)?["div",{},["span",s,ui(u)?"ShallowReactive":"Reactive"],"<",a(u),`>${li(u)?" (readonly)":""}`]:li(u)?["div",{},["span",s,ui(u)?"ShallowReadonly":"Readonly"],"<",a(u),">"]:null:null},hasBody(u){return u&&u.__isVue},body(u){if(u&&u.__isVue)return["div",{},...i(u.$)]}};function i(u){const d=[];u.type.props&&u.props&&d.push(o("props",En(u.props))),u.setupState!==ci&&d.push(o("setup",u.setupState)),u.data!==ci&&d.push(o("data",En(u.data)));const f=c(u,"computed");f&&d.push(o("computed",f));const m=c(u,"inject");return m&&d.push(o("injected",m)),d.push(["div",{},["span",{style:n.style+";opacity:0.66"},"$ (internal): "],["object",{object:u}]]),d}function o(u,d){return d=pc({},d),Object.keys(d).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},u],["div",{style:"padding-left:1.25em"},...Object.keys(d).map(f=>["div",{},["span",n,f+": "],a(d[f],!1)])]]:["span",{}]}function a(u,d=!0){return typeof u=="number"?["span",t,u]:typeof u=="string"?["span",e,JSON.stringify(u)]:typeof u=="boolean"?["span",n,u]:hi(u)?["object",{object:d?En(u):u}]:["span",e,String(u)]}function c(u,d){const f=u.type;if(Bs(f))return;const m={};for(const p in u.ctx)h(f,p,d)&&(m[p]=u.ctx[p]);return m}function h(u,d,f){const m=u[f];if(gc(m)&&m.includes(d)||hi(m)&&d in m||u.extends&&h(u.extends,d,f)||u.mixins&&u.mixins.some(p=>h(p,d,f)))return!0}function l(u){return ui(u)?"ShallowRef":u.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(r):window.devtoolsFormatters=[r]}/**
71
+ **/const _s=[];function WT(n){_s.push(n)}function HT(){_s.pop()}let tu=!1;function Qt(n,...t){if(tu)return;tu=!0,Oo();const e=_s.length?_s[_s.length-1].component:null,s=e&&e.appContext.config.warnHandler,i=qT();if(s)Fo(s,e,11,[n+t.map(r=>{var o,a;return(a=(o=r.toString)==null?void 0:o.call(r))!=null?a:JSON.stringify(r)}).join(""),e&&e.proxy,i.map(({vnode:r})=>`at <${gg(e,r.type)}>`).join(`
72
+ `),i]);else{const r=[`[Vue warn]: ${n}`,...t];i.length&&r.push(`
73
+ `,...KT(i)),console.warn(...r)}Io(),tu=!1}function qT(){let n=_s[_s.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 s=n.component&&n.component.parent;n=s&&s.vnode}return t}function KT(n){const t=[];return n.forEach((e,s)=>{t.push(...s===0?[]:[`
74
+ `],...JT(e))}),t}function JT({vnode:n,recurseCount:t}){const e=t>0?`... (${t} recursive calls)`:"",s=n.component?n.component.parent==null:!1,i=` at <${gg(n.component,n.type,s)}`,r=">"+e;return n.props?[i,...ZT(n.props),r]:[i+r]}function ZT(n){const t=[],e=Object.keys(n);return e.slice(0,3).forEach(s=>{t.push(...Zp(s,n[s]))}),e.length>3&&t.push(" ..."),t}function Zp(n,t,e){return Mo(t)?(t=JSON.stringify(t),e?t:[`${n}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?e?t:[`${n}=${t}`]:xe(t)?(t=Zp(n,St(t.value),!0),e?t:[`${n}=Ref<`,t,">"]):ce(t)?[`${n}=fn${t.name?`<${t.name}>`:""}`]:(t=St(t),e?t:[`${n}=`,t])}const Qp={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 Fo(n,t,e,s){try{return s?n(...s):n()}catch(i){eu(i,t,e)}}function tg(n,t,e,s){if(ce(n)){const i=Fo(n,t,e,s);return i&&fT(i)&&i.catch(r=>{eu(r,t,e)}),i}if(ae(n)){const i=[];for(let r=0;r<n.length;r++)i.push(tg(n[r],t,e,s));return i}else({}).NODE_ENV!=="production"&&Qt(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof n}`)}function eu(n,t,e,s=!0){const i=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||Le;if(t){let a=t.parent;const c=t.proxy,h={}.NODE_ENV!=="production"?Qp[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(r){Oo(),Fo(r,null,10,[n,c,h]),Io();return}}QT(n,e,i,s,o)}function QT(n,t,e,s=!0,i=!1){if({}.NODE_ENV!=="production"){const r=Qp[t];if(e&&WT(e),Qt(`Unhandled error${r?` during execution of ${r}`:""}`),e&&HT(),s)throw n;console.error(n)}else{if(i)throw n;console.error(n)}}const Ve=[];let Cn=-1;const Zs=[];let Zn=null,Qs=0;const eg=Promise.resolve();let Bo=null;const tC=100;function ng(n){const t=Bo||eg;return n?t.then(this?n.bind(this):n):t}function eC(n){let t=Cn+1,e=Ve.length;for(;t<e;){const s=t+e>>>1,i=Ve[s],r=Ji(i);r<n||r===n&&i.flags&2?t=s+1:e=s}return t}function nu(n){if(!(n.flags&1)){const t=Ji(n),e=Ve[Ve.length-1];!e||!(n.flags&2)&&t>=Ji(e)?Ve.push(n):Ve.splice(eC(t),0,n),n.flags|=1,sg()}}function sg(){Bo||(Bo=eg.then(rg))}function ig(n){ae(n)?Zs.push(...n):Zn&&n.id===-1?Zn.splice(Qs+1,0,n):n.flags&1||(Zs.push(n),n.flags|=1),sg()}function nC(n){if(Zs.length){const t=[...new Set(Zs)].sort((e,s)=>Ji(e)-Ji(s));if(Zs.length=0,Zn){Zn.push(...t);return}for(Zn=t,{}.NODE_ENV!=="production"&&(n=n||new Map),Qs=0;Qs<Zn.length;Qs++){const e=Zn[Qs];({}).NODE_ENV!=="production"&&og(n,e)||(e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2)}Zn=null,Qs=0}}const Ji=n=>n.id==null?n.flags&2?-1:1/0:n.id;function rg(n){({}).NODE_ENV!=="production"&&(n=n||new Map);const t={}.NODE_ENV!=="production"?e=>og(n,e):Yi;try{for(Cn=0;Cn<Ve.length;Cn++){const e=Ve[Cn];if(e&&!(e.flags&8)){if({}.NODE_ENV!=="production"&&t(e))continue;e.flags&4&&(e.flags&=-2),Fo(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2)}}}finally{for(;Cn<Ve.length;Cn++){const e=Ve[Cn];e&&(e.flags&=-2)}Cn=-1,Ve.length=0,nC(n),Bo=null,(Ve.length||Zs.length)&&rg(n)}}function og(n,t){const e=n.get(t)||0;if(e>tC){const s=t.i,i=s&&pg(s.type);return eu(`Maximum recursive updates exceeded${i?` in component <${i}>`:""}. 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 su=new Map;({}).NODE_ENV!=="production"&&(Ro().__VUE_HMR_RUNTIME__={createRecord:iu(sC),rerender:iu(iC),reload:iu(rC)});const jo=new Map;function sC(n,t){return jo.has(n)?!1:(jo.set(n,{initialDef:$o(t),instances:new Set}),!0)}function $o(n){return TC(n)?n.__vccOpts:n}function iC(n,t){const e=jo.get(n);e&&(e.initialDef.render=t,[...e.instances].forEach(s=>{t&&(s.render=t,$o(s.type).render=t),s.renderCache=[],s.update()}))}function rC(n,t){const e=jo.get(n);if(!e)return;t=$o(t),ag(e.initialDef,t);const s=[...e.instances];for(let i=0;i<s.length;i++){const r=s[i],o=$o(r.type);let a=su.get(o);a||(o!==e.initialDef&&ag(o,t),su.set(o,a=new Set)),a.add(r),r.appContext.propsCache.delete(r.type),r.appContext.emitsCache.delete(r.type),r.appContext.optionsCache.delete(r.type),r.ceReload?(a.add(r),r.ceReload(t.styles),a.delete(r)):r.parent?nu(()=>{r.parent.update(),a.delete(r)}):r.appContext.reload?r.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),r.root.ce&&r!==r.root&&r.root.ce._removeChildStyle(o)}ig(()=>{su.clear()})}function ag(n,t){Ue(n,t);for(const e in n)e!=="__file"&&!(e in t)&&delete n[e]}function iu(n){return(t,e)=>{try{return n(t,e)}catch(s){console.error(s),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let Uo=null;Ro().requestIdleCallback,Ro().cancelIdleCallback;const ru=n=>n?xC(n)?SC(n):ru(n.parent):null,Zi=Ue(Object.create(null),{$:n=>n,$el:n=>n.vnode.el,$data:n=>n.data,$props:n=>({}).NODE_ENV!=="production"?Vo(n.props):n.props,$attrs:n=>({}).NODE_ENV!=="production"?Vo(n.attrs):n.attrs,$slots:n=>({}).NODE_ENV!=="production"?Vo(n.slots):n.slots,$refs:n=>({}).NODE_ENV!=="production"?Vo(n.refs):n.refs,$parent:n=>ru(n.parent),$root:n=>ru(n.root),$host:n=>n.ce,$emit:n=>n.emit,$options:n=>cC(n),$forceUpdate:n=>n.f||(n.f=()=>{nu(n.update)}),$nextTick:n=>n.n||(n.n=ng.bind(n.proxy)),$watch:n=>yC.bind(n)}),oC=n=>n==="_"||n==="$",ou=(n,t)=>n!==Le&&!n.__isScriptSetup&&Ut(n,t),aC={get({_:n},t){if(t==="__v_skip")return!0;const{ctx:e,setupState:s,data:i,props:r,accessCache:o,type:a,appContext:c}=n;if({}.NODE_ENV!=="production"&&t==="__isVue")return!0;let h;if(t[0]!=="$"){const d=o[t];if(d!==void 0)switch(d){case 1:return s[t];case 2:return i[t];case 4:return e[t];case 3:return r[t]}else{if(ou(s,t))return o[t]=1,s[t];if(i!==Le&&Ut(i,t))return o[t]=2,i[t];if((h=n.propsOptions[0])&&Ut(h,t))return o[t]=3,r[t];if(e!==Le&&Ut(e,t))return o[t]=4,e[t];o[t]=0}}const u=Zi[t];let l,f;if(u)return t==="$attrs"?he(n.attrs,"get",""):{}.NODE_ENV!=="production"&&t==="$slots"&&he(n,"get",t),u(n);if((l=a.__cssModules)&&(l=l[t]))return l;if(e!==Le&&Ut(e,t))return o[t]=4,e[t];if(f=c.config.globalProperties,Ut(f,t))return f[t];({}).NODE_ENV!=="production"&&Uo&&(!Mo(t)||t.indexOf("__v")!==0)&&(i!==Le&&oC(t[0])&&Ut(i,t)?Qt(`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===Uo&&Qt(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:n},t,e){const{data:s,setupState:i,ctx:r}=n;return ou(i,t)?(i[t]=e,!0):{}.NODE_ENV!=="production"&&i.__isScriptSetup&&Ut(i,t)?(Qt(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):s!==Le&&Ut(s,t)?(s[t]=e,!0):Ut(n.props,t)?({}.NODE_ENV!=="production"&&Qt(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in n?({}.NODE_ENV!=="production"&&Qt(`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(r,t,{enumerable:!0,configurable:!0,value:e}):r[t]=e,!0)},has({_:{data:n,setupState:t,accessCache:e,ctx:s,appContext:i,propsOptions:r}},o){let a;return!!e[o]||n!==Le&&Ut(n,o)||ou(t,o)||(a=r[0])&&Ut(a,o)||Ut(s,o)||Ut(Zi,o)||Ut(i.config.globalProperties,o)},defineProperty(n,t,e){return e.get!=null?n._.accessCache[t]=0:Ut(e,"value")&&this.set(n,t,e.value,null),Reflect.defineProperty(n,t,e)}};({}).NODE_ENV!=="production"&&(aC.ownKeys=n=>(Qt("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 cg(n){return ae(n)?n.reduce((t,e)=>(t[e]=null,t),{}):n}function cC(n){const t=n.type,{mixins:e,extends:s}=t,{mixins:i,optionsCache:r,config:{optionMergeStrategies:o}}=n.appContext,a=r.get(t);let c;return a?c=a:!i.length&&!e&&!s?c=t:(c={},i.length&&i.forEach(h=>Yo(c,h,o,!0)),Yo(c,t,o)),nn(t)&&r.set(t,c),c}function Yo(n,t,e,s=!1){const{mixins:i,extends:r}=t;r&&Yo(n,r,e,!0),i&&i.forEach(o=>Yo(n,o,e,!0));for(const o in t)if(s&&o==="expose")({}).NODE_ENV!=="production"&&Qt('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=hC[o]||e&&e[o];n[o]=a?a(n[o],t[o]):t[o]}return n}const hC={data:hg,props:lg,emits:lg,methods:Qi,computed:Qi,beforeCreate:de,created:de,beforeMount:de,mounted:de,beforeUpdate:de,updated:de,beforeDestroy:de,beforeUnmount:de,destroyed:de,unmounted:de,activated:de,deactivated:de,errorCaptured:de,serverPrefetch:de,components:Qi,directives:Qi,watch:lC,provide:hg,inject:uC};function hg(n,t){return t?n?function(){return Ue(ce(n)?n.call(this,this):n,ce(t)?t.call(this,this):t)}:t:n}function uC(n,t){return Qi(ug(n),ug(t))}function ug(n){if(ae(n)){const t={};for(let e=0;e<n.length;e++)t[n[e]]=n[e];return t}return n}function de(n,t){return n?[...new Set([].concat(n,t))]:t}function Qi(n,t){return n?Ue(Object.create(null),n,t):t}function lg(n,t){return n?ae(n)&&ae(t)?[...new Set([...n,...t])]:Ue(Object.create(null),cg(n),cg(t??{})):t}function lC(n,t){if(!n)return t;if(!t)return n;const e=Ue(Object.create(null),n);for(const s in t)e[s]=de(n[s],t[s]);return e}let fC=null;function fg(n,t,e=!1){const s=tr||Uo;if(s||fC){const i=s?s.parent==null?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(i&&n in i)return i[n];if(arguments.length>1)return e&&ce(t)?t.call(s&&s.proxy):t;({}).NODE_ENV!=="production"&&Qt(`injection "${String(n)}" not found.`)}else({}).NODE_ENV!=="production"&&Qt("inject() can only be used inside setup() or functional components.")}const dC=bC,mC=Symbol.for("v-scx"),pC=()=>{{const n=fg(mC);return n||{}.NODE_ENV!=="production"&&Qt("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),n}};function gC(n,t,e){return{}.NODE_ENV!=="production"&&!ce(t)&&Qt("`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."),dg(n,t,e)}function dg(n,t,e=Le){const{immediate:s,deep:i,flush:r,once:o}=e;({}).NODE_ENV!=="production"&&!t&&(s!==void 0&&Qt('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),i!==void 0&&Qt('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),o!==void 0&&Qt('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const a=Ue({},e);({}).NODE_ENV!=="production"&&(a.onWarn=Qt);const c=t&&s||!t&&r!=="post";let h;if(Go){if(r==="sync"){const d=pC();h=d.__watcherHandles||(d.__watcherHandles=[])}else if(!c){const d=()=>{};return d.stop=Yi,d.resume=Yi,d.pause=Yi,d}}const u=tr;a.call=(d,p,m)=>tg(d,u,p,m);let l=!1;r==="post"?a.scheduler=d=>{dC(d,u&&u.suspense)}:r!=="sync"&&(l=!0,a.scheduler=(d,p)=>{p?d():nu(d)}),a.augmentJob=d=>{t&&(d.flags|=4),l&&(d.flags|=2,u&&(d.id=u.uid,d.i=u))};const f=XT(n,t,a);return Go&&(h?h.push(f):c&&f()),f}function yC(n,t,e){const s=this.proxy,i=Mo(n)?n.includes(".")?vC(s,n):()=>s[n]:n.bind(s,s);let r;ce(t)?r=t:(r=t.handler,e=t);const o=wC(this),a=dg(i,r.bind(s),e);return o(),a}function vC(n,t){const e=t.split(".");return()=>{let s=n;for(let i=0;i<e.length&&s;i++)s=s[e[i]];return s}}function bC(n,t){t&&t.pendingBranch?ae(n)?t.effects.push(...n):t.effects.push(n):ig(n)}let tr=null;const mg=()=>tr||Uo;let au;{const n=Ro(),t=(e,s)=>{let i;return(i=n[e])||(i=n[e]=[]),i.push(s),r=>{i.length>1?i.forEach(o=>o(r)):i[0](r)}};au=t("__VUE_INSTANCE_SETTERS__",e=>tr=e),t("__VUE_SSR_SETTERS__",e=>Go=e)}const wC=n=>{const t=tr;return au(n),n.scope.on(),()=>{n.scope.off(),au(t)}};function xC(n){return n.vnode.shapeFlag&4}let Go=!1;function SC(n){return n.exposed?n.exposeProxy||(n.exposeProxy=new Proxy($T(NT(n.exposed)),{get(t,e){if(e in t)return t[e];if(e in Zi)return Zi[e](n)},has(t,e){return e in t||e in Zi}})):n.proxy}const _C=/(?:^|[-_])(\w)/g,EC=n=>n.replace(_C,t=>t.toUpperCase()).replace(/[-_]/g,"");function pg(n,t=!0){return ce(n)?n.displayName||n.name:n.name||t&&n.__name}function gg(n,t,e=!1){let s=pg(t);if(!s&&t.__file){const i=t.__file.match(/([^/\\]+)\.\w+$/);i&&(s=i[1])}if(!s&&n&&n.parent){const i=r=>{for(const o in r)if(r[o]===t)return o};s=i(n.components||n.parent.type.components)||i(n.appContext.components)}return s?EC(s):e?"App":"Anonymous"}function TC(n){return ce(n)&&"__vccOpts"in n}const yg=(n,t)=>{const e=YT(n,t,Go);if({}.NODE_ENV!=="production"){const s=mg();s&&s.appContext.config.warnRecursiveComputed&&(e._warnRecursive=!0)}return e};function CC(){if({}.NODE_ENV==="production"||typeof window>"u")return;const n={style:"color:#3ba776"},t={style:"color:#1677ff"},e={style:"color:#f5222d"},s={style:"color:#eb2f96"},i={__vue_custom_formatter:!0,header(l){return nn(l)?l.__isVue?["div",n,"VueInstance"]:xe(l)?["div",{},["span",n,u(l)],"<",a("_value"in l?l._value:l),">"]:Js(l)?["div",{},["span",n,we(l)?"ShallowReactive":"Reactive"],"<",a(l),`>${Tn(l)?" (readonly)":""}`]:Tn(l)?["div",{},["span",n,we(l)?"ShallowReadonly":"Readonly"],"<",a(l),">"]:null:null},hasBody(l){return l&&l.__isVue},body(l){if(l&&l.__isVue)return["div",{},...r(l.$)]}};function r(l){const f=[];l.type.props&&l.props&&f.push(o("props",St(l.props))),l.setupState!==Le&&f.push(o("setup",l.setupState)),l.data!==Le&&f.push(o("data",St(l.data)));const d=c(l,"computed");d&&f.push(o("computed",d));const p=c(l,"inject");return p&&f.push(o("injected",p)),f.push(["div",{},["span",{style:s.style+";opacity:0.66"},"$ (internal): "],["object",{object:l}]]),f}function o(l,f){return f=Ue({},f),Object.keys(f).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},l],["div",{style:"padding-left:1.25em"},...Object.keys(f).map(d=>["div",{},["span",s,d+": "],a(f[d],!1)])]]:["span",{}]}function a(l,f=!0){return typeof l=="number"?["span",t,l]:typeof l=="string"?["span",e,JSON.stringify(l)]:typeof l=="boolean"?["span",s,l]:nn(l)?["object",{object:f?St(l):l}]:["span",e,String(l)]}function c(l,f){const d=l.type;if(ce(d))return;const p={};for(const m in l.ctx)h(d,m,f)&&(p[m]=l.ctx[m]);return p}function h(l,f,d){const p=l[d];if(ae(p)&&p.includes(f)||nn(p)&&f in p||l.extends&&h(l.extends,f,d)||l.mixins&&l.mixins.some(m=>h(m,f,d)))return!0}function u(l){return we(l)?"ShallowRef":l.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(i):window.devtoolsFormatters=[i]}/**
37
75
  * vue v3.5.13
38
76
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
39
77
  * @license MIT
40
- **/function Pd(){Td()}({}).NODE_ENV!=="production"&&Pd();var yi=function(s,t){return yi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])},yi(s,t)};function An(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");yi(s,t);function e(){this.constructor=s}s.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function bi(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 wi(s,t){var e=typeof Symbol=="function"&&s[Symbol.iterator];if(!e)return s;var n=e.call(s),r,i=[],o;try{for(;(t===void 0||t-- >0)&&!(r=n.next()).done;)i.push(r.value)}catch(a){o={error:a}}finally{try{r&&!r.done&&(e=n.return)&&e.call(n)}finally{if(o)throw o.error}}return i}function vi(s,t,e){if(e||arguments.length===2)for(var n=0,r=t.length,i;n<r;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return s.concat(i||Array.prototype.slice.call(t))}function Ae(s){return typeof s=="function"}function Mc(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 xi=Mc(function(s){return function(t){s(this),this.message=t?t.length+` errors occurred during unsubscription:
41
- `+t.map(function(e,n){return n+1+") "+e.toString()}).join(`
42
- `):"",this.name="UnsubscriptionError",this.errors=t}});function Si(s,t){if(s){var e=s.indexOf(t);0<=e&&s.splice(e,1)}}var js=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,r,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=bi(o),c=a.next();!c.done;c=a.next()){var h=c.value;h.remove(this)}}catch(p){t={error:p}}finally{try{c&&!c.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var l=this.initialTeardown;if(Ae(l))try{l()}catch(p){i=p instanceof xi?p.errors:[p]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var d=bi(u),f=d.next();!f.done;f=d.next()){var m=f.value;try{Dc(m)}catch(p){i=i??[],p instanceof xi?i=vi(vi([],wi(i)),wi(p.errors)):i.push(p)}}}catch(p){n={error:p}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}}if(i)throw new xi(i)}},s.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Dc(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)&&Si(e,t)},s.prototype.remove=function(t){var e=this._finalizers;e&&Si(e,t),t instanceof s&&t._removeParent(this)},s.EMPTY=function(){var t=new s;return t.closed=!0,t}(),s}(),kc=js.EMPTY;function Ic(s){return s instanceof js||s&&"closed"in s&&Ae(s.remove)&&Ae(s.add)&&Ae(s.unsubscribe)}function Dc(s){Ae(s)?s():s.unsubscribe()}var Oc={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Ad={setTimeout:function(s,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];return setTimeout.apply(void 0,vi([s,t],wi(e)))},clearTimeout:function(s){return clearTimeout(s)},delegate:void 0};function Md(s){Ad.setTimeout(function(){throw s})}function Rc(){}function Xs(s){s()}var _i=function(s){An(t,s);function t(e){var n=s.call(this)||this;return n.isStopped=!1,e?(n.destination=e,Ic(e)&&e.add(n)):n.destination=Od,n}return t.create=function(e,n,r){return new Ei(e,n,r)},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}(js),kd=Function.prototype.bind;function Ci(s,t){return kd.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){Gs(n)}},s.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(n){Gs(n)}else Gs(t)},s.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){Gs(e)}},s}(),Ei=function(s){An(t,s);function t(e,n,r){var i=s.call(this)||this,o;if(Ae(e)||!e)o={next:e??void 0,error:n??void 0,complete:r??void 0};else{var a;i&&Oc.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return i.unsubscribe()},o={next:e.next&&Ci(e.next,a),error:e.error&&Ci(e.error,a),complete:e.complete&&Ci(e.complete,a)}):o=e}return i.destination=new Id(o),i}return t}(_i);function Gs(s){Md(s)}function Dd(s){throw s}var Od={closed:!0,next:Rc,error:Dd,complete:Rc},Rd=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Ld(s){return s}function zd(s){return s.length===0?Ld:s.length===1?s[0]:function(t){return s.reduce(function(e,n){return n(e)},t)}}var Lc=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 r=this,i=Fd(t)?t:new Ei(t,e,n);return Xs(function(){var o=r,a=o.operator,c=o.source;i.add(a?a.call(i,c):c?r._subscribe(i):r._trySubscribe(i))}),i},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=zc(e),new e(function(r,i){var o=new Ei({next:function(a){try{t(a)}catch(c){i(c),o.unsubscribe()}},error:i,complete:r});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[Rd]=function(){return this},s.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return zd(t)(this)},s.prototype.toPromise=function(t){var e=this;return t=zc(t),new t(function(n,r){var i;e.subscribe(function(o){return i=o},function(o){return r(o)},function(){return n(i)})})},s.create=function(t){return new s(t)},s}();function zc(s){var t;return(t=s??Oc.Promise)!==null&&t!==void 0?t:Promise}function Nd(s){return s&&Ae(s.next)&&Ae(s.error)&&Ae(s.complete)}function Fd(s){return s&&s instanceof _i||Nd(s)&&Ic(s)}(function(s){An(t,s);function t(e,n,r,i,o,a){var c=s.call(this,e)||this;return c.onFinalize=o,c.shouldUnsubscribe=a,c._next=n?function(h){try{n(h)}catch(l){e.error(l)}}:s.prototype._next,c._error=i?function(h){try{i(h)}catch(l){e.error(l)}finally{this.unsubscribe()}}:s.prototype._error,c._complete=r?function(){try{r()}catch(h){e.error(h)}finally{this.unsubscribe()}}:s.prototype._complete,c}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})(_i);var Bd=Mc(function(s){return function(){s(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Nc=function(s){An(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 Fc(this,this);return n.operator=e,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new Bd},t.prototype.next=function(e){var n=this;Xs(function(){var r,i;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var o=bi(n.currentObservers),a=o.next();!a.done;a=o.next()){var c=a.value;c.next(e)}}catch(h){r={error:h}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}}})},t.prototype.error=function(e){var n=this;Xs(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=e;for(var r=n.observers;r.length;)r.shift().error(e)}})},t.prototype.complete=function(){var e=this;Xs(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,r=this,i=r.hasError,o=r.isStopped,a=r.observers;return i||o?kc:(this.currentObservers=null,a.push(e),new js(function(){n.currentObservers=null,Si(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var n=this,r=n.hasError,i=n.thrownError,o=n.isStopped;r?e.error(i):o&&e.complete()},t.prototype.asObservable=function(){var e=new Lc;return e.source=this,e},t.create=function(e,n){return new Fc(e,n)},t}(Lc),Fc=function(s){An(t,s);function t(e,n){var r=s.call(this)||this;return r.destination=e,r.source=n,r}return t.prototype.next=function(e){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.next)===null||r===void 0||r.call(n,e)},t.prototype.error=function(e){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.error)===null||r===void 0||r.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,r;return(r=(n=this.source)===null||n===void 0?void 0:n.subscribe(e))!==null&&r!==void 0?r:kc},t}(Nc);(function(s){An(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,r=e.thrownError,i=e._value;if(n)throw r;return this._throwIfClosed(),i},t.prototype.next=function(e){s.prototype.next.call(this,this._value=e)},t})(Nc);const Vs=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(Vs("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`
43
- [\u{FA0E}\u{FA0F}\u{FA11}\u{FA13}\u{FA14}\u{FA1F}\u{FA21}\u{FA23}\u{FA24}\u{FA27}-\u{FA29}]
44
- |[\u{4E00}-\u{9FCC}]
45
- |[\u{3400}-\u{4DB5}]
46
- |[\u{20000}-\u{2A6D6}]
47
- |[\u{2A700}-\u{2B734}]
48
- |[\u{2B740}-\u{2B81D}]
49
- |[\u{2B820}-\u{2CEAF}]
50
- |[\u{2CEB0}-\u{2EBEF}]
51
- `.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},Me=(s,t)=>(typeof s=="string"&&(s=Vs(s)||new RegExp(s)),s.test(t)),Bc=(s,t)=>{typeof s=="string"&&(s=Vs(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},Uc=(s,t)=>{typeof s=="string"&&(s=Vs(s)||new RegExp(s));const e=[],n=t.matchAll(s);for(const r of n)e.push({matchIndex:typeof r.index=="number"?r.index:-1,fullMatch:r[0],groupMatchs:r.slice(1)});return e};function Ud(s){const t=s.match(/[\s\S]/gu);return t?t.length:0}function $c(s,t){const e=s.codePointAt(t);return e?String.fromCodePoint(e):void 0}const $d="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghijklmnopqrstuvwxyz0123456789",Yd="0123456789";function Yc(s=12,t=$d){let e="";for(let n=0;n<s;n++)e+=t[Math.floor(Math.random()*t.length)];return e}function jd(s=12){return Yc(s,Yd)}function Xd(s){return s.replace(/(^\w)/g,t=>t.toLowerCase())}const Nt=(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 Gd(s){return s.replace(/(^\w|[_-]\w)/g,t=>t.slice(-1).toUpperCase())}function jc(s){return Xd(Gd(s))}function Xc(s){let t="";for(let e=0,n=s.length;e<n;e++){const r=s.charCodeAt(e);r>=1&&r<=127?t+=s.charAt(e):r>2047?(t+=String.fromCharCode(224|r>>12&15),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|r>>0&63)):(t+=String.fromCharCode(192|r>>6&31),t+=String.fromCharCode(128|r>>0&63))}return t}function Vd(){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:default:return!0}}const Mn=(s,t=16)=>{let e=s.toLowerCase();const n=e.indexOf("0b")==0,r=e.indexOf("0o")==0,i=e.indexOf("0x")==0;(n||r||i)&&(e=e.slice(2)),n&&(t=2),r&&(t=8),i&&(t=16);const o=parseInt(e,t);if(Number.isNaN(o)||e.length==0)throw new Error(`radixStringToNumber(${s}, ${t}) 无法解析!`);return o};function Ti(s,t){let e=t?.type;const n=t?.mime,r=t?.encode;if(!e&&n)switch(r){case Ns.utf8:case Ns["utf-8"]:e=`${n};charset=${r}`;break;case Ns.base64:e=`${n};${r}`;break;default:e=`${n}`;break}return new Blob([s],{type:e})}function qd(s){let t=ye["text/plain"];switch(new DataView(s).getUint32(0,Vd()).toString(16).toUpperCase()){case"FFD8FFDB":t=ye["image/jpeg"];break;case"FFD8FFE0":case"FFD8FFE1":case"FFD8FFE2":case"FFD8FFE3":t=ye["image/jpeg"];break;case"89504E47":t=ye["image/png"];break;case"47494638":t=ye["image/gif"];break;case"52494646":t=ye["image/webp"];break;case"25504446":t=ye["application/pdf"];break;case"504B0304":t=ye["application/zip"];break}return t}function Hd(s){return s!=null&&s!==td}function Wd(s){return typeof s=="number"&&!Number.isNaN(s)}const Jd=2**31-1;function ae(s,t){const e=parseFloat(s);return Number.isNaN(e)?typeof t=="number"?t:NaN:e}const Kd=s=>typeof s=="number"&&s>=0&&Number.isFinite(s),Zd=s=>Kd(s)&&s>0,ke=s=>Zd(s)&&s===Math.floor(s),Pi=s=>s===1/0||ke(s);function Ai(s=1e-6){return function(t,e){return Math.abs(t-e)<s}}function K(s,t,e){const n=Math.min(t,e),r=Math.max(t,e);return s<n?n:s>r?r:s}function Qd(s,t){return(s%t+t)%t}function qs(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 tm(s,t,e){const n=Math.max(s.length,t.length),r=new Array(n);for(let i=0;i<n;i++)r[i]=qs(s[i],t[i],e);return r}function em(s,t,e){return n=>{const r=K(n,s,t);return e==0?r:t-r<e?t:Math.round(r/e)*e}}function nm(s,t=2){return ae(s,0).toFixed(t)}function Z(s,t=2){return+nm(s,t)}function Mi(s,t){const e=Bc("number-single",String(s));return{hasNumber:!!e,number:e&&!Array.isArray(e)&&e.fullMatch?parseFloat(e.fullMatch):Hd(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 ki(s){const t=Bc("number",s);return t?Array.isArray(t)?t.map(e=>Number(e.fullMatch)):[Number(t.fullMatch)]:[]}function Gc(s,t){for(let e=0,n=s.length;e<n;e++)if(s[e]==t)return!0;return!1}function sm(s=[],t=[]){const e=s.length,n=t.length;for(let i=0;i<n;i++)s[i]=t[i];let r=Math.max(0,e-n);for(;r>0;)s.pop(),r--;return s}function Ii(s,t){const e=s.findIndex(n=>n===t);return e>=0&&s.splice(e,1),s}function rm(s,t){return s.splice(0,t)}function im(s,...t){return t.forEach(e=>{Gc(s,e)||s.push(e)}),s}class Hs extends Array{constructor(t){super(t),this.fill(0)}}const Vc=s=>ke(s)?s<=Math.pow(2,8)?Uint8Array:s<=Math.pow(2,16)?Uint16Array:s<=Math.pow(2,32)?Uint32Array:s<=Number.MAX_SAFE_INTEGER?Hs:null:null;function Ws(s,t){let e=s.length;for(;e--;)if(Dm(s[e][0],t))return e;return-1}function Et(){return(typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date).now()}function kn(s=new Date){return s.getTime()}function om(s=new Date,t="yyyy-mm-dd hh:ii:ss.SSS"){return fm(s,t)}function am(s){const t=s.valueOf();return!Number.isNaN(t)}function cm(s,t=3,e=":"){const n=Math.max(s.length,6);let r="";for(let o=0;o<n-4;o++)r+=s[o]||"0";const i=[r,""+(s[n-4]||"0")+(s[n-3]||"0"),""+(s[n-2]||"0")+(s[n-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 hm(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 r=0;r<t-4;r++)n=n*10+(s[r]||0);return e+=n*60*60,Math.floor(Math.max(0,e))}function lm(s,t=!1){let e=0;if(typeof s=="number"?e=s:e=hm(s),e<=0)return[0,0,0,0,0,0];const n=[],r=e%60;n.unshift(r%10),n.unshift(Math.floor(r/10)),e=Math.floor(e/60);const i=e%60;if(n.unshift(i%10),n.unshift(Math.floor(i/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 um(s,t=1,e=!1){return s[s.length-1]+=t,lm(s,e)}function fm(s,t="yyyy-mm-dd hh:ii:ss"){if(!am(s))return"";const e=/(y+)/.exec(t);if(e&&e[1]){const r=e[1];t=t.replace(r,(s.getFullYear()+"").substring(4-r.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 r in n){const i=new RegExp("("+r+")").exec(t);if(i&&i[1]){const o=i[1];t=t.replace(o,o.length===1?""+n[r]:("00"+n[r]).slice(-o.length))}}return t}const qc=()=>{};function dm(s=0,t){const e=t?.min??300,n=t?.max??6e4,r=t?.exponent??2,i=t?.factor??.5;let o=e*Math.pow(r,s);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,n)|0}function Js(s,t={}){if(typeof s!="function")throw new TypeError("Expected a function");const e=function(...n){const r=t?.thisArg||this,i=t?.cacheKeyResolver?t.cacheKeyResolver.apply(r,n):String(n[0]),o=e.cache;if(o.has(i))return o.get(i);const a=s.apply(r,n);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(s){return this.reduce((t,e)=>t.concat(s.map(e)),[])};function mm(){let s,t;return{promise:new Promise((e,n)=>{s=e,t=n}),resolve:s,reject:t}}function Di(s,t=e=>console.error(e)){try{const e=s();return Mm(e)?Promise.resolve(e).catch(n=>{t(n)}):e}catch(e){t(e)}}const pm=2147483647;function Hc(s,t,e){if(typeof t!="number"||t<=0)return s;let n;const r=new Promise((i,o)=>{n=setTimeout((a,c)=>{a(new Error(c||`Timeout of ${t}ms!`))},Math.min(t,pm),o,e)});return Promise.race([s,r]).finally(()=>{n!==void 0&&(clearTimeout(n),n=void 0)})}function gm(s,t,e){if(!t)return s;const n=e||"Aborted!";return t.aborted?Promise.reject(new Error(n)):new Promise((r,i)=>{const o=()=>{i(new Error(n))};t.addEventListener("abort",o,{once:!0}),s.finally(()=>{t.removeEventListener("abort",o)}),s.then(r,i)})}const ym="[object Undefined]",bm="[object Null]",wm="[object Boolean]",vm="[object Number]",xm="[object BigInt]",Sm="[object String]",_m="[object Symbol]",Cm="[object Function]",Em="[object GeneratorFunction]",Tm="[object Array]";function Oi(s){return Object.prototype.toString.call(s)}function Pm(s){const t=Oi(s);return t===ym||t===bm||t===wm||t===vm||t===Sm||t===_m||t===xm}function Wc(s){const t=Oi(s);return t==Cm||t==Em}function Jc(s){if(!Qc(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(Wc(s)?n:e).test(Om(s))}function Am(s,t){return s?.[t]}function Kc(s,t){const e=Am(s,t);return Jc(e)?e:void 0}Kc(tt,"Map"),Kc(tt,"WeakMap");function Zc(s){return Oi(s)===Tm}function Qc(s){const t=typeof s;return!!s&&(t=="object"||t=="function")}function cn(s){return!!s&&typeof s=="object"}function Wn(s){return cn(s)&&!Zc(s)}const th=s=>{for(const t in s)if(Object.prototype.hasOwnProperty.call(s,t))return!1;return!0};function Mm(s){return typeof Promise<"u"&&s instanceof Promise||Qc(s)&&typeof s.then=="function"&&typeof s.catch=="function"}function km(s){const t=[];for(const e in s)Object.prototype.hasOwnProperty.call(s,e)&&t.push(e);return t}function In(s,t,e=!0){if(Wn(s)&&Wn(t))for(const n of km(t))(e||typeof s[n]>"u")&&(Wn(s[n])&&Wn(t[n])?In(s[n],t[n],e):s[n]=t[n]);return s}function Im(s,...t){return new s.constructor(...t)}function Dm(s,t){return s===t||s!==s&&t!==t}function Om(s){if(s!=null){try{return Function.prototype.toString.call(s)}catch{}try{return""+s}catch{}}return""}function Rm(s,t=["","sign","key"]){return Wn(s)?Object.keys(s).filter(e=>{for(let n=0,r=t.length;n<r;n++)if(s[e]==t[n])return!1;return!0}).sort().map(e=>`${e}=${s[e]}`).join("&"):String(s)}function eh(s,t,e=""){let n=[];return!(typeof s=="object"&&s!==null)||!(typeof t=="object"&&t!==null)?(s===t||n.push({path:e,oldValue:s,newValue:t}),n):(new Set([...Object.keys(s),...Object.keys(t)]).forEach(r=>{const i=e?`${e}.${r}`:r;n=n.concat(eh(s[r],t[r],i))}),n)}function Lm(s,t){let e;return typeof t=="string"?e=t.split("."):e=t,e.reduce((n,r)=>n!=null&&n!=null?n[r]:n,s)}function Ie(s,t){try{return Lm(s,t)}catch{return}}function Ri(s,t,e){if(!s||!t)return s;let n;typeof t=="string"?n=t.split("."):n=t;let r=s;for(let i=0,o=n.length-1;i<o;i++){const a=n[i];(!(a in r)||typeof r[a]!="object"||r[a]===null)&&(r[a]=Number.isNaN(Number(n[i+1]))?{}:[]),r=r[a]}return r[n[n.length-1]]=e,s}function Ks(s){if(typeof MessageChannel<"u"&&(Jc(MessageChannel)||MessageChannel.toString()==="[object MessageChannelConstructor]")){const{port1:t,port2:e}=new MessageChannel;t.onmessage=()=>{t.onmessage=null,s()},e.postMessage(null)}else setTimeout(s,0)}async function zm(){return new Promise(s=>{Ks(s)})}if(tt.requestAnimationFrame=tt.requestAnimationFrame||tt.webkitRequestAnimationFrame||tt.mozRequestAnimationFrame||tt.oRequestAnimationFrame||tt.msRequestAnimationFrame,tt.cancelAnimationFrame=tt.cancelAnimationFrame||tt.webkitCancelAnimationFrame||tt.mozCancelAnimationFrame||tt.oCancelAnimationFrame||tt.msCancelAnimationFrame,!tt.requestAnimationFrame){let s=Et();tt.requestAnimationFrame=t=>{const e=Et(),n=Math.max(0,16-(e-s)),r=tt.setTimeout(()=>{t(e+n)},n);return s=e+n,r}}tt.cancelAnimationFrame||(tt.cancelAnimationFrame=s=>{tt.clearTimeout(s)});const Zs=tt.requestAnimationFrame,Nm=tt.cancelAnimationFrame;function Fm(s){let t=!0,e=Zs(function n(r){t&&s(r)&&(e=Zs(n))});return()=>{t=!1,Nm(e)}}tt.requestIdleCallback=tt.requestIdleCallback||function(s,t){const e=Et();return setTimeout(()=>{const n=Et()-e,r={didTimeout:typeof t?.timeout!="number"?!1:n>t.timeout,timeRemaining:()=>Math.max(0,50-n)};s(r)},t?.timeout)},tt.cancelIdleCallback=tt.cancelIdleCallback||function(s){clearTimeout(s)},tt.requestIdleCallback,tt.cancelIdleCallback;let Jn=33,De=33,Qs=0,Kn=0,Li=!1;function nh(s){Li||(Li=!0,Zs(t=>{Li=!1,Qs=t,Kn===0&&(Kn=Qs+De);let e=De+Qs-Kn;e<De&&Jn<De?(e<8&&(e=8),De=Math.max(e,Jn)):e>De&&Jn>De&&(De=Math.min(e,Jn)),Jn=e,Kn=Qs+De,Ks(()=>{s(Kn),nh(s)})}))}function Bm(s){const t=s?.maxIterations||1e4,e=!!s?.tracing,n=s?.onTrace||(f=>{const m=" ".repeat(f.depth);console.log(`${m}emit#${f.id} parent=${f.parentId} source=${f.source}`)}),r=[];let i=0,o=0;const a=new Set,c=f=>(a.add(f),()=>{a.delete(f)});let h;function l(f,m){const p=h,_={id:String(++i),dataset:f,source:m,createdAt:Et(),parentId:p?.id,depth:p?p.depth+1:0};r.push(_)}let u=!1;function d(){if(u)return;u=!0;let f=0;try{for(;o<r.length;){if(++f>t)throw new Error("Possible infinite signal loop detected");const m=r[o],p=h;h=m,e&&n(m);const _=Array.from(a);for(const y of _)try{y(...m.dataset)}catch(b){Ks(()=>{throw b})}h=p,o++}}finally{u=!1,o>=r.length&&(r.length=0,o=0)}}return{subscribe:c,once(f){const m=c((...p)=>{m(),f(...p)});return m},emit(...f){l(f),d()},emitFrom(f,...m){l(m,f),d()},clear(){a.clear()}}}function Um(s={}){const{concurrency:t=1/0,maxWorkerRunTime:e=6e4}=s;let n=1/0;const r=()=>n===1/0||Et()<n,i=O=>{n=Et()+O,h()};let o=r()?0:1;const a=()=>o>0,c=()=>{o++},h=()=>{o>0&&o--,D()},l=()=>!a()&&!r(),u=async()=>{l()&&await zm()};let d=0,f=[];const m=new Set,p=new Set;let _=0,y=[],b=[];const v=()=>{_===0&&(y.forEach(O=>O()),y=[],f.length===0&&(b.forEach(O=>O()),b=[]))},w=O=>{if(O.signal){if(O.signal.aborted)return O.resultReject("Cancel by Aborted!"),O;O.abortHandler=()=>{O.resultReject("Cancel by Abort!"),f=f.filter(U=>U.id!==O.id),v()},O.signal.addEventListener("abort",O.abortHandler,{once:!0})}if(f.filter(U=>O.invalidates?.includes(U.id)).forEach(U=>{U.resultReject("Cancel by invalidates!")}),f=f.filter(U=>!O.invalidates?.includes(U.id)),O.fold){const U=f.findIndex(V=>V.id===O.id);if(U!==-1){const V=f[U],q=O.fold(V,O);return V.dataset=q.dataset,V}else return f.push(O),O}else return f.push(O),O},E=()=>{if(f.length===0)return;let O=-1,U;for(let V=0,q=f.length;V<q;V++){const ft=f[V];(!U||ft.niceness<U.niceness)&&(O=V,U=ft)}return f.splice(O,1),U};let C=!1;const D=()=>{C||a()||(C=!0,Ks(()=>{for(C=!1;f.length>0&&p.size>0&&_<t&&!a();){const O=E(),U=Wd(O.deadline)&&Et()>=O.deadline,V=O.niceness==zs.immediate;if(!r()&&!U&&!V){w(O),D();break}if(O.signal?.aborted){O.resultReject("Cancel by Aborted!"),v();continue}_++;const q=p.values().next().value;p.delete(q),gm(Hc(Promise.resolve(q(...O.dataset)),e),O.signal).then(ft=>{O.resultResolve(ft)}).catch(ft=>{O.retry>0?(O.retry--,w(O)):O.resultReject(ft)}).finally(async()=>{m.has(q)&&p.add(q),O.signal&&O.abortHandler&&O.signal.removeEventListener("abort",O.abortHandler),_--,v(),D()})}}))},$=O=>(m.add(O),p.add(O),D(),()=>{m.delete(O),p.delete(O)});return{put(...O){const U=O[O.length-1]||{};let V={};("niceness"in U||"deadline"in U||"retry"in U||"signal"in U||"invalidates"in U||"fold"in U)&&(V=O.pop());const q=mm(),ft=w({id:String(++d),dataset:O,createdAt:Et(),result:q.promise,resultResolve:q.resolve,resultReject:q.reject,niceness:V.niceness??zs.normal,deadline:V.deadline??fc,retry:V.retry??0,signal:V.signal});return D(),ft},cancel(O){f=f.filter(U=>U.id!==O.id),O.signal&&O.abortHandler&&O.signal.removeEventListener("abort",O.abortHandler),v()},clear(){for(const O of f)O.signal&&O.abortHandler&&O.signal.removeEventListener("abort",O.abortHandler),O.resultReject(new Error("Cleared"));f.length=0,v()},run:$,once(O){const U=$((...V)=>{try{return O(...V)}finally{U()}});return U},async onDrain(){if(!(_===0&&f.length===0))return new Promise(O=>{b.push(O)})},async onIdle(){if(_!==0)return new Promise(O=>{y.push(O)})},pause:c,resume:h,get paused(){return a()},startFrame:i,yieldIfNeeded:u}}class sh{pool;concurrency;maxWorkerRunTime;constructor(t={concurrency:1}){this.concurrency=t.concurrency??1,this.maxWorkerRunTime=t.maxWorkerRunTime??6e4,this.pool=Um({concurrency:this.concurrency,maxWorkerRunTime:this.maxWorkerRunTime});for(let e=0;e<this.concurrency;e++)this.pool.run(async function(n){return await n()})}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 Hc(Promise.resolve(t()),this.maxWorkerRunTime)}finally{this.pool.resume()}}asap(t,e){return this.pool.put(t,{niceness:e?.niceness??zs.normal,deadline:typeof e?.timeout=="number"?Et()+e?.timeout:fc})}}class $m{pool;closes=[];constructor(t={concurrency:1}){this.pool=new sh({...t,maxWorkerRunTime:1/0})}close(t=!0){const e=t?this.closes.length:Math.max(0,this.closes.length-this.pool.concurrency+1),n=rm(this.closes,e);for(const r of n)r()}clear(){this.pool.clear(),this.close()}createNotifyTask(t,e,n=!0){return()=>new Promise((r,i)=>{try{this.close(n);const o=t({...e,onClose:()=>{e?.onClose?.(),r(),Ii(this.closes,a)}}),a=()=>{o(),r()};this.closes.push(a)}catch(o){i(o)}})}exclusive(t,e){return this.pool.immediate(this.createNotifyTask(t,e,!0))}enqueue(t,e){const n=this.pool.asap(this.createNotifyTask(t,e,!1));return()=>{this.pool.cancel(n)}}}class Ym{pool;started=!1;constructor(t={concurrency:1}){this.pool=new sh(t),this.pool.startFrame(0)}clear(){this.pool.clear()}start(){this.started||(this.started=!0,nh(t=>{this.pool.startFrame(t-Et())}))}async idle(t,e){return this.start(),await this.pool.asap(t,{niceness:zs.idle,timeout:e}).result}}const rh=new Ym,jm=rh.idle.bind(rh);function Xm(s){const t=new Set(s);return e=>{let n=e;for(;;){if(t.has(n))return!0;const r=n.lastIndexOf(".");if(r<0)return!1;n=n.slice(0,r)}}}function ih(s){let t=s;const e=Bm();return{get:()=>t,set:n=>{const r=typeof n=="function"?n(t):n,i=eh(t,r);i.length!==0&&(t=r,e.emit(t,i))},subscribe:(n,r)=>{const i=r?.length?Xm(r):null;Di(()=>{n(t,[])});const o=e.subscribe((a,c)=>{if(!i){Di(()=>{n(a,c)});return}const h=c.filter(l=>i(l.path));h.length&&Di(()=>{n(a,h)})});return()=>o()}}}function Gm(s="verbose"){let t=-1;switch(s){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}tt.OPEN_LOG_LEVEL=t}function oh(){tt.OPEN_LOG_LEVEL=-1}function Vm(s){tt.LOG_UPLOAD_FN=s}oh();function ah(s="verbose"){let t=-1;switch(s){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 tt.OPEN_LOG_LEVEL<=t}function ch(s){tt.LOG_UPLOAD_FN&&tt.LOG_UPLOAD_FN(s)}function tr(s,t=""){try{if(ch({level:"info",msg:s,type:t}),!ah("info"))return;console.log(s)}catch{}}function ce(s,t=""){try{if(ch({level:"warn",msg:s,type:t}),!ah("warn"))return;console.warn(s)}catch{}}class qm{__data__=[];size=0;constructor(t){t=t||[];const e=t.length;let n=-1;for(;++n<e;){const r=t[n];this.set(r[0],r[1])}}set(t,e){const n=this.__data__,r=Ws(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}get(t){const e=this.__data__,n=Ws(e,t);return n<0?void 0:e[n][1]}has(t){return Ws(this.__data__,t)>-1}delete(t){const e=this.__data__,n=Ws(e,t);if(n<0)return!1;const r=e.length-1;return n==r?e.pop():Array.prototype.splice.call(e,n,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 Hm=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,hh=new Set,Wm=(s,t,e,n)=>{typeof ri.emitWarning=="function"?ri.emitWarning(s,t,e,n):console.error(`[${e}] ${t}: ${s}`)},Jm=s=>!hh.has(s);class Dn{heap;length;static#a=!1;static create(t){const e=Vc(t);if(!e)return[];Dn.#a=!0;const n=new Dn(t,e);return Dn.#a=!1,n}constructor(t,e){if(!Dn.#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 zi{#a;#u;#g;#k;#y;#L;#z;#b;get perf(){return this.#b}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#r;#w;#s;#n;#t;#h;#f;#c;#i;#v;#o;#x;#S;#d;#m;#_;#A;#l;#N;static unsafeExposeInternals(t){return{starts:t.#S,ttls:t.#d,autopurgeTimers:t.#m,sizes:t.#x,keyMap:t.#s,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,n,r,i)=>t.#U(e,n,r,i),moveToTail:e=>t.#R(e),indexes:e=>t.#C(e),rindexes:e=>t.#E(e),isStale:e=>t.#p(e)}}get max(){return this.#a}get maxSize(){return this.#u}get calculatedSize(){return this.#w}get size(){return this.#r}get fetchMethod(){return this.#L}get memoMethod(){return this.#z}get dispose(){return this.#g}get onInsert(){return this.#k}get disposeAfter(){return this.#y}constructor(t){const{max:e=0,ttl:n,ttlResolution:r=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:c,dispose:h,onInsert:l,disposeAfter:u,noDisposeOnSet:d,noUpdateTTL:f,maxSize:m=0,maxEntrySize:p=0,sizeCalculation:_,fetchMethod:y,memoMethod:b,noDeleteOnFetchRejection:v,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:E,allowStaleOnFetchAbort:C,ignoreFetchAbort:D,perf:$}=t;if($!==void 0&&typeof $?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#b=$??Hm,e!==0&&!ke(e))throw new TypeError("max option must be a nonnegative integer");const O=e?Vc(e):Array;if(!O)throw new Error("invalid max value: "+e);if(this.#a=e,this.#u=m,this.maxEntrySize=p||this.#u,this.sizeCalculation=_,this.sizeCalculation){if(!this.#u&&!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.#z=b,y!==void 0&&typeof y!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#L=y,this.#A=!!y,this.#s=new Map,this.#n=Array.from({length:e}).fill(void 0),this.#t=Array.from({length:e}).fill(void 0),this.#h=new O(e),this.#f=new O(e),this.#c=0,this.#i=0,this.#v=Dn.create(e),this.#r=0,this.#w=0,typeof h=="function"&&(this.#g=h),typeof l=="function"&&(this.#k=l),typeof u=="function"?(this.#y=u,this.#o=[]):(this.#y=void 0,this.#o=void 0),this.#_=!!this.#g,this.#N=!!this.#k,this.#l=!!this.#y,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!v,this.allowStaleOnFetchRejection=!!E,this.allowStaleOnFetchAbort=!!C,this.ignoreFetchAbort=!!D,this.maxEntrySize!==0){if(this.#u!==0&&!ke(this.#u))throw new TypeError("maxSize must be a positive integer if specified");if(!ke(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#H()}if(this.allowStale=!!c,this.noDeleteOnStaleGet=!!w,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=ke(r)||r===0?r:1,this.ttlAutopurge=!!i,this.ttl=n||0,this.ttl){if(!ke(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#$()}if(this.#a===0&&this.ttl===0&&this.#u===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#a&&!this.#u){const U="LRU_CACHE_UNBOUNDED";Jm(U)&&(hh.add(U),Wm("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",U,zi))}}getRemainingTTL(t){return this.#s.has(t)?1/0:0}#$(){const t=new Hs(this.#a),e=new Hs(this.#a);this.#d=t,this.#S=e;const n=this.ttlAutopurge?Array.from({length:this.#a}):void 0;this.#m=n,this.#Y=(a,c,h=this.#b.now())=>{e[a]=c!==0?h:0,t[a]=c,r(a,c)},this.#I=a=>{e[a]=t[a]!==0?this.#b.now():0,r(a,t[a])};const r=this.ttlAutopurge?(a,c)=>{if(n?.[a]&&(clearTimeout(n[a]),n[a]=void 0),c&&c!==0&&n){const h=setTimeout(()=>{this.#p(a)&&this.#T(this.#n[a],"expire")},c+1);h.unref&&h.unref(),n[a]=h}}:()=>{};this.#P=(a,c)=>{if(t[c]){const h=t[c],l=e[c];if(!h||!l)return;a.ttl=h,a.start=l,a.now=i||o();const u=a.now-l;a.remainingTTL=h-u}};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.#s.get(a);if(c===void 0)return 0;const h=t[c],l=e[c];if(!h||!l)return 1/0;const u=(i||o())-l;return h-u},this.#p=a=>{const c=e[a],h=t[a];return!!h&&!!c&&(i||o())-c>h}}#I=()=>{};#P=()=>{};#Y=()=>{};#p=()=>!1;#H(){const t=new Hs(this.#a);this.#w=0,this.#x=t,this.#D=e=>{this.#w-=t[e],t[e]=0},this.#j=(e,n,r,i)=>{if(this.#e(n))return 0;if(!ke(r))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(r=i(n,e),!ke(r))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 r||0},this.#F=(e,n,r)=>{if(t[e]=n,this.#u){const i=this.#u-t[e];for(;this.#w>i;)this.#B(!0)}this.#w+=t[e],r&&(r.entrySize=n,r.totalCalculatedSize=this.#w)}}#D=t=>{};#F=(t,e,n)=>{};#j=(t,e,n,r)=>{if(n||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#C({allowStale:t=this.allowStale}={}){if(this.#r)for(let e=this.#i;this.#X(e)&&((t||!this.#p(e))&&(yield e),e!==this.#c);)e=this.#f[e]}*#E({allowStale:t=this.allowStale}={}){if(this.#r)for(let e=this.#c;this.#X(e)&&((t||!this.#p(e))&&(yield e),e!==this.#i);)e=this.#h[e]}#X(t){return t!==void 0&&this.#s.get(this.#n[t])===t}*entries(){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]])}*rentries(){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]])}*keys(){for(const t of this.#C()){const e=this.#n[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*rkeys(){for(const t of this.#E()){const e=this.#n[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*values(){for(const t of this.#C())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}*rvalues(){for(const t of this.#E())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 n of this.#C()){const r=this.#t[n],i=this.#e(r)?r.__staleWhileFetching:r;if(i!==void 0&&t(i,this.#n[n],this))return this.#O(this.#n[n],e)}}forEach(t,e=this){for(const n of this.#C()){const r=this.#t[n],i=this.#e(r)?r.__staleWhileFetching:r;i!==void 0&&t.call(e,i,this.#n[n],this)}}rforEach(t,e=this){for(const n of this.#E()){const r=this.#t[n],i=this.#e(r)?r.__staleWhileFetching:r;i!==void 0&&t.call(e,i,this.#n[n],this)}}purgeStale(){let t=!1;for(const e of this.#E({allowStale:!0}))this.#p(e)&&(this.#T(this.#n[e],"expire"),t=!0);return t}info(t){const e=this.#s.get(t);if(e===void 0)return;const n=this.#t[e],r=this.#e(n)?n.__staleWhileFetching:n;if(r===void 0)return;const i={value:r};if(this.#d&&this.#S){const o=this.#d[e],a=this.#S[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.#C({allowStale:!0})){const n=this.#n[e],r=this.#t[e],i=this.#e(r)?r.__staleWhileFetching:r;if(i===void 0||n===void 0)continue;const o={value:i};if(this.#d&&this.#S){o.ttl=this.#d[e];const a=this.#b.now()-this.#S[e];o.start=Math.floor(Date.now()-a)}this.#x&&(o.size=this.#x[e]),t.unshift([n,o])}return t}load(t){this.clear();for(const[e,n]of t){if(n.start){const r=Date.now()-n.start;n.start=this.#b.now()-r}this.#M(e,n.value,n)}}set(t,e,n={}){const{status:r=void 0}=n;return n.status=r,r&&(r.op="set",r.key=t,e!==void 0&&(r.value=e)),this.#M(t,e,n)}#M(t,e,n={}){const{ttl:r=this.ttl,start:i,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:c}=n;if(e===void 0)return c&&(c.set="deleted"),this.delete(t),this;let{noUpdateTTL:h=this.noUpdateTTL}=n;c&&!this.#e(e)&&(c.value=e);const l=this.#j(t,e,n.size||0,a,c);if(this.maxEntrySize&&l>this.maxEntrySize)return this.#T(t,"set"),c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this;let u=this.#r===0?void 0:this.#s.get(t);if(u===void 0)u=this.#r===0?this.#i:this.#v.length!==0?this.#v.pop():this.#r===this.#a?this.#B(!1):this.#r,this.#n[u]=t,this.#t[u]=e,this.#s.set(t,u),this.#h[this.#i]=u,this.#f[u]=this.#i,this.#i=u,this.#r++,this.#F(u,l,c),c&&(c.set="add"),h=!1,this.#N&&this.#k?.(e,t,"add");else{this.#R(u);const d=this.#t[u];if(e!==d){if(this.#A&&this.#e(d)){d.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:f}=d;f!==void 0&&!o&&(this.#_&&this.#g?.(f,t,"set"),this.#l&&this.#o?.push([f,t,"set"]))}else o||(this.#_&&this.#g?.(d,t,"set"),this.#l&&this.#o?.push([d,t,"set"]));if(this.#D(u),this.#F(u,l,c),this.#t[u]=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.#N&&this.onInsert?.(e,t,e===d?"update":"replace")}if(r!==0&&!this.#d&&this.#$(),this.#d&&(h||this.#Y(u,r,i),c&&this.#P(c,u)),!o&&this.#l&&this.#o){const d=this.#o;let f;for(;f=d?.shift();)this.#y?.(...f)}return this}pop(){try{for(;this.#r;){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.#l&&this.#o){const t=this.#o;let e;for(;e=t?.shift();)this.#y?.(...e)}}}#B(t){const e=this.#c,n=this.#n[e],r=this.#t[e];return this.#A&&this.#e(r)?r.__abortController.abort(new Error("evicted")):(this.#_||this.#l)&&(this.#_&&this.#g?.(r,n,"evict"),this.#l&&this.#o?.push([r,n,"evict"])),this.#D(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.#r===1?(this.#c=this.#i=0,this.#v.length=0):this.#c=this.#h[e],this.#s.delete(n),this.#r--,e}has(t,e={}){const{status:n=void 0}=e;return e.status=n,n&&(n.op="has",n.key=t),this.#W(t,e)}#W(t,e={}){const{updateAgeOnHas:n=this.updateAgeOnHas,status:r}=e,i=this.#s.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))r&&(r.has="stale",this.#P(r,i));else return n&&this.#I(i),r&&(r.has="hit",this.#P(r,i)),!0}else r&&(r.has="miss");return!1}peek(t,e={}){const{status:n=void 0}=e;return n&&(n.op="peek",n.key=t),e.status=n,this.#J(t,e)}#J(t,e){const{status:n,allowStale:r=this.allowStale}=e,i=this.#s.get(t);if(i===void 0||!r&&this.#p(i)){n&&(n.peek=i===void 0?"miss":"stale");return}const o=this.#t[i],a=this.#e(o)?o.__staleWhileFetching:o;return n&&(a!==void 0?(n.peek="hit",n.value=a):n.peek="miss"),a}#U(t,e,n,r){const i=e===void 0?void 0:this.#t[e];if(this.#e(i))return i;const o=new AbortController,{signal:a}=n;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});const c={signal:o.signal,options:n,context:r},h=(p,_=!1)=>{const{aborted:y}=o.signal,b=n.ignoreFetchAbort&&p!==void 0,v=n.ignoreFetchAbort||!!(n.allowStaleOnFetchAbort&&p!==void 0);if(n.status&&(y&&!_?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,b&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),y&&!b&&!_)return u(o.signal.reason,v);const w=f,E=this.#t[e];return(E===f||E===void 0&&b&&_)&&(p===void 0?w.__staleWhileFetching!==void 0?this.#t[e]=w.__staleWhileFetching:this.#T(t,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.#M(t,p,c.options))),p},l=p=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=p),u(p,!1)),u=(p,_)=>{const{aborted:y}=o.signal,b=y&&n.allowStaleOnFetchAbort,v=b||n.allowStaleOnFetchRejection,w=v||n.noDeleteOnFetchRejection,E=f;if(this.#t[e]===f&&(!w||!_&&E.__staleWhileFetching===void 0?this.#T(t,"fetch"):b||(this.#t[e]=E.__staleWhileFetching)),v)return n.status&&E.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),E.__staleWhileFetching;if(E.__returned===E)throw p},d=(p,_)=>{const y=this.#L?.(t,i,c);y&&y instanceof Promise&&y.then(b=>p(b===void 0?void 0:b),_),o.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(p(void 0),n.allowStaleOnFetchAbort&&(p=b=>h(b,!0)))})};n.status&&(n.status.fetchDispatched=!0);const f=new Promise(d).then(h,l),m=Object.assign(f,{__abortController:o,__staleWhileFetching:i,__returned:void 0});return e===void 0?(this.#M(t,m,{...c.options,status:void 0}),e=this.#s.get(t)):this.#t[e]=m,m}#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:n=void 0}=e;return e.status=n,n&&e.context&&(n.context=e.context),this.#G(t,e)}async#G(t,e={}){const{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:c=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:m=this.allowStaleOnFetchAbort,context:p,forceRefresh:_=!1,status:y,signal:b}=e;if(y&&(y.op="fetch",y.key=t,_&&(y.forceRefresh=!0)),!this.#A)return y&&(y.fetch="get"),this.#O(t,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,status:y});const v={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,ttl:o,noDisposeOnSet:a,size:c,sizeCalculation:h,noUpdateTTL:l,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:m,ignoreFetchAbort:f,status:y,signal:b},w=this.#s.get(t);if(w===void 0){y&&(y.fetch="miss");const E=this.#U(t,w,v,p);return E.__returned=E}else{const E=this.#t[w];if(this.#e(E)){const O=n&&E.__staleWhileFetching!==void 0;return y&&(y.fetch="inflight",O&&(y.returnedStale=!0)),O?E.__staleWhileFetching:E.__returned=E}const C=this.#p(w);if(!_&&!C)return y&&(y.fetch="hit"),this.#R(w),r&&this.#I(w),y&&this.#P(y,w),E;const D=this.#U(t,w,v,p),$=D.__staleWhileFetching!==void 0&&n;return y&&(y.fetch=C?"stale":"refresh",$&&C&&(y.returnedStale=!0)),$?D.__staleWhileFetching:D.__returned=D}}forceFetch(t,e={}){const{status:n=void 0}=e;return e.status=n,n&&e.context&&(n.context=e.context),this.#K(t,e)}async#K(t,e={}){const n=await this.#G(t,e);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(t,e={}){const{status:n=void 0}=e;e.status=n,n&&(n.op="memo",n.key=t,e.context&&(n.context=e.context));const r=this.#Z(t,e);return n&&(n.value=r),r}#Z(t,e={}){const n=this.#z;if(!n)throw new Error("no memoMethod provided to constructor");const{context:r,status:i,forceRefresh:o,...a}=e;i&&o&&(i.forceRefresh=!0);const c=this.#O(t,a),h=o||c===void 0;if(i&&(i.memo=h?"miss":"hit",h||(i.value=c)),!h)return c;const l=n(t,c,{options:a,context:r});return i&&(i.value=l),this.#M(t,l,a),l}get(t,e={}){const{status:n=void 0}=e;e.status=n,n&&(n.op="get",n.key=t);const r=this.#O(t,e);return n&&r!==void 0&&(n.value=r),r}#O(t,e={}){const{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:o}=e,a=this.#s.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"),n&&c.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),c.__staleWhileFetching):void 0):(i||this.#T(t,"expire"),o&&(o.get="stale"),n?(o&&(o.returnedStale=!0),c):void 0):(o&&(o.get=h?"fetching":"hit"),this.#R(a),r&&this.#I(a),h?c.__staleWhileFetching:c)}#V(t,e){this.#f[e]=t,this.#h[t]=e}#R(t){t!==this.#i&&(t===this.#c?this.#c=this.#h[t]:this.#V(this.#f[t],this.#h[t]),this.#V(this.#i,t),this.#i=t)}delete(t){return this.#T(t,"delete")}#T(t,e){let n=!1;if(this.#r!==0){const r=this.#s.get(t);if(r!==void 0)if(this.#m?.[r]&&(clearTimeout(this.#m?.[r]),this.#m[r]=void 0),n=!0,this.#r===1)this.#q(e);else{this.#D(r);const i=this.#t[r];if(this.#e(i)?i.__abortController.abort(new Error("deleted")):(this.#_||this.#l)&&(this.#_&&this.#g?.(i,t,e),this.#l&&this.#o?.push([i,t,e])),this.#s.delete(t),this.#n[r]=void 0,this.#t[r]=void 0,r===this.#i)this.#i=this.#f[r];else if(r===this.#c)this.#c=this.#h[r];else{const o=this.#f[r];this.#h[o]=this.#h[r];const a=this.#h[r];this.#f[a]=this.#f[r]}this.#r--,this.#v.push(r)}}if(this.#l&&this.#o?.length){const r=this.#o;let i;for(;i=r?.shift();)this.#y?.(...i)}return n}clear(){return this.#q("delete")}#q(t){for(const e of this.#E({allowStale:!0})){const n=this.#t[e];if(this.#e(n))n.__abortController.abort(new Error("deleted"));else{const r=this.#n[e];this.#_&&this.#g?.(n,r,t),this.#l&&this.#o?.push([n,r,t])}}if(this.#s.clear(),this.#t.fill(void 0),this.#n.fill(void 0),this.#d&&this.#S){this.#d.fill(0),this.#S.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.#r=0,this.#l&&this.#o){const e=this.#o;let n;for(;n=e?.shift();)this.#y?.(...n)}}}class Ni{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:n=!1,checkAgeOnGet:r=!1,updateAgeOnHas:i=!1,checkAgeOnHas:o=!1,noUpdateTTL:a=!1,dispose:c,noDisposeOnSet:h=!1}={},l=new Map){if(t!==void 0&&!Pi(t))throw new TypeError("ttl must be positive integer or Infinity if set");if(!Pi(e))throw new TypeError("max must be positive integer or Infinity");if(this.data=l,this.ttl=t,this.max=e,this.updateAgeOnGet=!!n,this.checkAgeOnGet=!!r,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=(u,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 n=setTimeout(()=>{this.timer=void 0,this.timerExpiration=void 0,this.purgeStale();for(const r in this.expirations){const i=Number(r);this.setTimer(i,i-Et());break}},Math.min(Jd,Math.max(0,e)));n.unref&&n.unref(),this.timerExpiration=t,this.timer=n}cancelTimer(){this.timer&&(clearTimeout(this.timer),this.timerExpiration=void 0,this.timer=void 0)}clear(){const t=this.dispose!==Ni.prototype.dispose?[...this]:[];this.data.clear(),this.expirationMap.clear(),this.cancelTimer(),this.expirations=Object.create(null);for(const[e,n]of t)this.dispose(n,e,"delete")}setTTL(t,e=this.ttl){const n=this.expirationMap.get(t);if(n!==void 0){const r=this.expirations[n];!r||r.length<=1?delete this.expirations[n]:this.expirations[n]=r.filter(i=>i!==t)}if(e&&e!==1/0){this.immortalKeys.delete(t);const r=Math.floor(Et()+e);this.expirationMap.set(t,r),this.expirations[r]||(this.expirations[r]=[],this.setTimer(r,e)),this.expirations[r].push(t)}else this.immortalKeys.add(t),this.expirationMap.set(t,1/0)}set(t,e,{ttl:n=this.ttl,noUpdateTTL:r=this.noUpdateTTL,noDisposeOnSet:i=this.noDisposeOnSet}={}){if(!Pi(n))throw new TypeError("ttl must be positive integer or Infinity");if(this.expirationMap.has(t)){r||this.setTTL(t,n);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,n),this.data.set(t,e);for(;this.size>this.max;)this.purgeToCapacity();return this}has(t,{checkAgeOnHas:e=this.checkAgeOnHas,ttl:n=this.ttl,updateAgeOnHas:r=this.updateAgeOnHas}={}){return this.data.has(t)?e&&this.getRemainingTTL(t)===0?(this.delete(t),!1):(r&&this.setTTL(t,n),!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-Et())):0}get(t,{updateAgeOnGet:e=this.updateAgeOnGet,ttl:n=this.ttl,checkAgeOnGet:r=this.checkAgeOnGet}={}){const i=this.data.get(t);if(r&&this.getRemainingTTL(t)===0){this.delete(t);return}return e&&this.setTTL(t,n),i}delete(t){const e=this.expirationMap.get(t);if(e!==void 0){const n=this.data.get(t);this.data.delete(t),this.expirationMap.delete(t),this.immortalKeys.delete(t);const r=this.expirations[e];return r&&(r.length<=1?delete this.expirations[e]:this.expirations[e]=r.filter(i=>i!==t)),this.dispose(n,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 n=[];for(const r of e)n.push([r,this.data.get(r)]),this.data.delete(r),this.expirationMap.delete(r);for(const[r,i]of n)this.dispose(i,r,"evict")}else{const n=this.size-this.max,r=[];for(const i of e.splice(0,n))r.push([i,this.data.get(i)]),this.data.delete(i),this.expirationMap.delete(i);for(const[i,o]of r)this.dispose(o,i,"evict")}}}purgeStale(){const t=Math.ceil(Et());for(const e in this.expirations){if(e==="Infinity"||Number(e)>t)return;const n=[...this.expirations[e]||[]],r=[];delete this.expirations[e];for(const i of n)r.push([i,this.data.get(i)]),this.data.delete(i),this.expirationMap.delete(i);for(const[i,o]of r)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}}class lh{cache;cacheKeyResolver;constructor(t){if(typeof AbortController>"u")throw new Error("AbortController not supported!");this.cache=t?.createCache?t.createCache():new Map,this.cacheKeyResolver=t?.cacheKeyResolver||((...e)=>String(e[0]))}set(...t){const e=this.cacheKeyResolver(...t),n=new AbortController;this.cache.set(e,n)}get(...t){const e=this.cacheKeyResolver(...t);return this.cache.get(e)}delete(...t){const e=this.cacheKeyResolver(...t);return this.cache.delete(e)}clear(){this.cache.clear()}}const hn={branch:"├",lastBranch:"└",line:"│",empty:" "};function Km(s,t={}){const{showValues:e=!0,hideFunctions:n=!1,lineBreak:r=`\r
52
- `,maxDeep:i}=t,o=[],a=new WeakSet;function c(l,u="",d=0){if(typeof l=="string"){o.push(u+'"'+l+'"');return}if(typeof l!="object"||l===null){e&&o.push(u+String(l));return}if(i&&d>=i){Array.isArray(s)?o.push("[...OverMaxDeep]"):o.push("{...OverMaxDeep}");return}if(a.has(l)){o.push(u+"[Circular]");return}a.add(l);const f=Object.keys(l).filter(m=>!(n&&typeof l[m]=="function"));f.forEach((m,p)=>{const _=l[m],y=p===f.length-1,b=d===0&&p===0?"":u,v=y?hn.lastBranch:hn.branch,w=m.trim()===""?"":m;let E=b+v+(w?" "+w:"");const C=m.trim()!=="";if(_&&typeof _=="object"&&a.has(_))o.push(E+(C?": ":E?" ":"")+"[Circular]");else if(_&&typeof _=="object"&&!Array.isArray(_)){o.push(E);const D=y?hn.empty:hn.line,$=b+D+" ";c(_,$,d+1)}else if(Array.isArray(_)){o.push(E+(C?": ":E?" ":"")+"[Array("+_.length+")]");const D=y?hn.empty:hn.line,$=b+D+" ";c(_,$,d+1)}else if(e){const D=typeof _=="function"?"[Function]":typeof _=="string"?'"'+String(_)+'"':String(_);E+=(C?": ":E?" ":"")+D,o.push(E)}else o.push(E)})}const h=Object.keys(s);if(h.length===0)return"(empty)";if(h.length===1&&h[0]!==void 0&&h[0].trim()===""&&typeof s[h[0]]=="string"){const l=h[0],u=hn.lastBranch,d=s[l],f=typeof d=="function"?"[Function]":typeof d=="string"?'"'+d+'"':String(d);return u+" "+f}return c(s),r+o.join(r)}function uh(s){let t=s.initState||{},e=s.reducer;if(s.enhancer)return s.enhancer(uh)({reducer:e,initState:t});const n=ih(t),r=o=>{t=e(t,o),n.set(t)},i=o=>{e=o,r({type:"INIT"})};return r({type:"INIT"}),{getState:()=>t,dispatch:r,subscribe:n.subscribe,replaceReducer:i}}function er(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 r(o,a=!1){return Pm(o)||Zc(o)||Wc(o)?{value:o,timestamp:kn()}:a&&Object.prototype.hasOwnProperty.call(o,"timestamp")?o:{...o,timestamp:kn()}}let i=r(s,!0);return{get:()=>{let o=!1;return(e>=0&&kn()>ae(i.timestamp,0)+e*1e3||n>=0&&kn()>n)&&(o=!0),o&&(i.value=void 0),i},set:o=>i=r(o,!1)}}class nr{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 r=(...i)=>{n?e.apply(n,i):e(...i),this.off(t,r)};return this.on(t,r),this}}const Zm=Js(()=>typeof window=="object"&&typeof document=="object");Js(()=>!Zm()),Js(()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null);const Qm=typeof window<"u";!!(tt.Worker&&tt.Blob&&tt.Promise&&tt.OffscreenCanvas&&tt.OffscreenCanvasRenderingContext2D&&tt.HTMLCanvasElement&&tt.HTMLCanvasElement.prototype.transferControlToOffscreen&&tt.URL&&tt.URL.createObjectURL);const tp=(()=>{if(!tt.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})(),fh=tt.crypto;fh?.subtle;function Fi(){try{return fh.randomUUID()}catch{let s=new Date().getTime();return"xxxxxxxx_xxxx_xxxx_yxxx_xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=(s+Math.random()*16)%16|0;return s=Math.floor(s/16),(t=="x"?e:e&3|8).toString(16)})}}function dh(s,t){return JSON.stringify(Rm(s))}const ep="\uFEFF";function np(s){return s.startsWith(ep)?s.slice(1):s}function sp(s){try{return{ok:!0,value:JSON.parse(np(s))}}catch{return{ok:!1}}}Js(sp,{createCache:()=>new zi({max:50}),cacheKeyResolver:s=>s});const Bi=10,mh=(s=0)=>t=>`\x1B[${t+s}m`,ph=(s=0)=>t=>`\x1B[${38+s};5;${t}m`,gh=(s=0)=>(t,e,n)=>`\x1B[${38+s};2;${t};${e};${n}m`,xt={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(xt.modifier);const rp=Object.keys(xt.color),ip=Object.keys(xt.bgColor);[...rp,...ip];function op(){const s=new Map;for(const[t,e]of Object.entries(xt)){for(const[n,r]of Object.entries(e))xt[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},e[n]=xt[n],s.set(r[0],r[1]);Object.defineProperty(xt,t,{value:e,enumerable:!1})}return Object.defineProperty(xt,"codes",{value:s,enumerable:!1}),xt.color.close="\x1B[39m",xt.bgColor.close="\x1B[49m",xt.color.ansi=mh(),xt.color.ansi256=ph(),xt.color.ansi16m=gh(),xt.bgColor.ansi=mh(Bi),xt.bgColor.ansi256=ph(Bi),xt.bgColor.ansi16m=gh(Bi),Object.defineProperties(xt,{rgbToAnsi256:{value(t,e,n){return t===e&&e===n?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(n/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[n]=e;n.length===3&&(n=[...n].map(i=>i+i).join(""));const r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:t=>xt.rgbToAnsi256(...xt.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let e,n,r;if(t>=232)e=((t-232)*10+8)/255,n=e,r=e;else{t-=16;const a=t%36;e=Math.floor(t/36)/5,n=Math.floor(a/6)/5,r=a%6/5}const i=Math.max(e,n,r)*2;if(i===0)return 30;let o=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(e));return i===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,e,n)=>xt.ansi256ToAnsi(xt.rgbToAnsi256(t,e,n)),enumerable:!1},hexToAnsi:{value:t=>xt.ansi256ToAnsi(xt.hexToAnsi256(t)),enumerable:!1}}),xt}const cp=op(),hp=0;new Set(cp.codes.values()).delete(hp);const Zn={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)"},lp=Array.from(Object.values(Zn));function up(s){const[t,e,n]=s.replace("rgb(","").replace(")","").split(",").map(Number);return .2126*t+.7152*e+.0722*n}Object.entries(Zn).map(([s,t])=>{const e=t;return{name:s,rgb:e,brightness:up(e)}}).sort((s,t)=>s.brightness-t.brightness);class ue{_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 color(${t}) type(${typeof t})`;if(t instanceof ue)this.setRGB(t.r,t.g,t.b,t.a);else if(typeof t=="number")this.setHEX(t);else if(typeof t=="string"){let n;if(n=/^(\w+)\(([^)]*)\)/.exec(t)){const r=n[2];let i;switch(n[1]){case"rgb":case"rgba":(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(r))?(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(r))?(this.r=K(parseFloat(i[1]),0,100)*255/100,this.g=K(parseFloat(i[2]),0,100)*255/100,this.b=K(parseFloat(i[3]),0,100)*255/100,this.a=i[4]?parseFloat(i[4]):1):ce(e);break;case"hsl":case"hsla":(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)%\s*,\s*(\d*\.?\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(r))?this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,i[4]?parseFloat(i[4]):1):ce(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(r))?this.setHSV(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,i[4]?parseFloat(i[4]):1):ce(e);break;default:ce(e)}}else if(n=/#([A-Fa-f0-9]+)/.exec(t)){const r=n[1],i=r.length;i===3?this.setRGB(parseInt(r.charAt(0),16),parseInt(r.charAt(1),16),parseInt(r.charAt(2),16),1):i===6||i===8?this.setHEX(parseInt(r,16)):ce(e)}else if(t&&t.length>0)try{this.setColorName(t)}catch{ce(e)}else ce(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):ce(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=K(Math.round(ae(t,this.r)),0,255)}get g(){return this._color.g}set g(t){this._color.g=K(Math.round(ae(t,this.g)),0,255)}get b(){return this._color.b}set b(t){this._color.b=K(Math.round(ae(t,this.b)),0,255)}get a(){return this._color.a}set a(t){this._color.a=K(ae(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},${Z(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 ue(this.color)}copy(t){return this.setColor(t.color),this}copySRGBToLinear(t){return this.r=$i(t.r),this.g=$i(t.g),this.b=$i(t.b),this}copyLinearToSRGB(t){return this.r=Yi(t.r),this.g=Yi(t.g),this.b=Yi(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,g:i,b:o}=this.color;return this.r=255-r,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=K(t,0,1);const{r:e,g:n,b:r,a:i}=this.color;return i==0?this.a=t:(this.r=e+(255-e)*t,this.g=n+(255-n)*t,this.b=r+(255-r)*t),this}darken(t){t=K(t,0,1);const{r:e,g:n,b:r,a:i}=this.color;return i==0?this.a=t:(this.r=e*(1-t),this.g=n*(1-t),this.b=r*(1-t)),this}lerp(t,e){e=K(e,0,1);const{r:n,g:r,b:i}=this.color;return this.r=n+(t.r-n)*e,this.g=r+(t.g-r)*e,this.b=i+(t.b-i)*e,this}lerpColors(t,e,n){return n=K(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 Ui.lerpColors(new ue(t),new ue(e),n).toString()}catch{return e}}static random(){return Ui.setHEX(Math.random()*16777215).toString()}static nextIndex=0;static next(t=ue.nextIndex){ue.nextIndex=t;const e=Object.keys(Zn),n=e.length;return Ui.set(Zn[e[ue.nextIndex++%n]]).toString()}setColorName(t){const e=Zn[t.toLowerCase()];return e!==void 0?this.set(e):t==="none"?this.a=0:(this.a=1,ce("Color.setColorName: Unknown color "+t)),this}setRGB(t,e,n,r=1){return this.r=t,this.g=e,this.b=n,this.a=r,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,r=1){const i=Qd(t,1),o=K(e,0,1),a=K(n,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=ji(h,c,i+.3333333333333333)*255,this.g=ji(h,c,i)*255,this.b=ji(h,c,i-.3333333333333333)*255}return this.a=r,this}getHSL(t){const e=this.r,n=this.g,r=this.b,i=Math.max(e,n,r)/255,o=Math.min(e,n,r)/255;let a,c;const h=(o+i)/2;if(o===i)a=0,c=0;else{const l=i-o;switch(c=h<=.5?l/(i+o):l/(2-i-o),i){case e:a=(n-r)/l+(n<r?6:0);break;case n:a=(r-e)/l+2;break;case r:default:a=(e-n)/l+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,n){const r=this.getHSL();return this.setHSL(r.h+t,r.s+e,r.l+n)}lerpHSL(t,e){const n=this.getHSL(),r=t.getHSL(),i=qs(n.h,r.h,e),o=qs(n.s,r.s,e),a=qs(n.l,r.l,e);return this.setHSL(i,o,a),this}setHSV(t,e,n,r=1){const i=K(t,0,1)*360,o=K(e,0,1),a=K(n,0,1),c=Math.floor(i/60)%6,h=i/60-Math.floor(i/60),l=a*(1-o),u=a*(1-h*o),d=a*(1-(1-h)*o),f=[[a,d,l],[u,a,l],[l,a,d],[l,u,a],[d,l,a],[a,l,u]][c];return this.r=f[0]*255,this.g=f[1]*255,this.b=f[2]*255,this.a=r,this}setHSB(t,e,n,r=1){this.setHSV(t,e,n,r)}getHSV(t){const{r:e,g:n,b:r,a:i}=this.color,o=Math.max(e,n,r),a=Math.min(e,n,r),c=o-a;let h;e===o?h=(n-r)/c:n===o?h=2+(r-e)/c:h=4+(e-n)/c,h/=6,h<0&&(h+=1);const l=c==0?0:h,u=o===0?0:c/o,d=o/255;return t&&t.setHSV(l,u,d,i),{h:l,s:u,v:d,a:i}}getHSB(t){const{h:e,s:n,v:r,a:i}=this.getHSV(t);return{h:e,s:n,b:r,a:i}}}const Ui=new ue;function $i(s){return s<.04045?s*.0773993808:Math.pow(s*.9478672986+.0521327014,2.4)}function Yi(s){return s<.0031308?s*12.92:1.055*Math.pow(s,.41666)-.055}function ji(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}function fp(s=window.location.href,t){try{return new URL(s,t)}catch{const e="(?<protocol>https?:)",n="(?<host>(?<hostname>[^/#?:]+)(?::(?<port>\\d+))?)",r="(?<pathname>(?:\\/[^/#?]+)*\\/?)",i="(?<search>(?:\\?[^#]*)?)",o="(?<hash>(?:#.*)?)",a=new RegExp(`^${e}//${n}${r}${i}${o}$`).exec(s);return{href:s,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 dp(s=window.location.href){const t=fp(s),e=t.href.indexOf(t.hash);return t.hash&&e>=0?t.href.substring(0,e):t.href}function mp(s,t){return s+t.replace(/^[&?]/,s.indexOf("?")>=0?"&":"?")}function pp(s){return"?"+Object.entries(s).map(([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`).join("&")}function gp(s){return"?"+[...s.entries()].map(t=>encodeURIComponent(t[0])+"="+encodeURIComponent(t[1]instanceof File?t[1].name:t[1])).join("&")}function yh(s,t){return function(){return s.apply(t,arguments)}}const{toString:yp}=Object.prototype,{getPrototypeOf:Xi}=Object,sr=(s=>t=>{const e=yp.call(t);return s[e]||(s[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),fe=s=>(s=s.toLowerCase(),t=>sr(t)===s),rr=s=>t=>typeof t===s,{isArray:On}=Array,Qn=rr("undefined");function bp(s){return s!==null&&!Qn(s)&&s.constructor!==null&&!Qn(s.constructor)&&ee(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const bh=fe("ArrayBuffer");function wp(s){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(s):t=s&&s.buffer&&bh(s.buffer),t}const vp=rr("string"),ee=rr("function"),wh=rr("number"),ir=s=>s!==null&&typeof s=="object",xp=s=>s===!0||s===!1,or=s=>{if(sr(s)!=="object")return!1;const t=Xi(s);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in s)&&!(Symbol.iterator in s)},Sp=fe("Date"),_p=fe("File"),Cp=fe("Blob"),Ep=fe("FileList"),Tp=s=>ir(s)&&ee(s.pipe),Pp=s=>{let t;return s&&(typeof FormData=="function"&&s instanceof FormData||ee(s.append)&&((t=sr(s))==="formdata"||t==="object"&&ee(s.toString)&&s.toString()==="[object FormData]"))},Ap=fe("URLSearchParams"),[Mp,kp,Ip,Dp]=["ReadableStream","Request","Response","Headers"].map(fe),Op=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ts(s,t,{allOwnKeys:e=!1}={}){if(s===null||typeof s>"u")return;let n,r;if(typeof s!="object"&&(s=[s]),On(s))for(n=0,r=s.length;n<r;n++)t.call(null,s[n],n,s);else{const i=e?Object.getOwnPropertyNames(s):Object.keys(s),o=i.length;let a;for(n=0;n<o;n++)a=i[n],t.call(null,s[a],a,s)}}function vh(s,t){t=t.toLowerCase();const e=Object.keys(s);let n=e.length,r;for(;n-- >0;)if(r=e[n],t===r.toLowerCase())return r;return null}const ln=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),xh=s=>!Qn(s)&&s!==ln;function Gi(){const{caseless:s}=xh(this)&&this||{},t={},e=(n,r)=>{const i=s&&vh(t,r)||r;or(t[i])&&or(n)?t[i]=Gi(t[i],n):or(n)?t[i]=Gi({},n):On(n)?t[i]=n.slice():t[i]=n};for(let n=0,r=arguments.length;n<r;n++)arguments[n]&&ts(arguments[n],e);return t}const Rp=(s,t,e,{allOwnKeys:n}={})=>(ts(t,(r,i)=>{e&&ee(r)?s[i]=yh(r,e):s[i]=r},{allOwnKeys:n}),s),Lp=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),zp=(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)},Np=(s,t,e,n)=>{let r,i,o;const a={};if(t=t||{},s==null)return t;do{for(r=Object.getOwnPropertyNames(s),i=r.length;i-- >0;)o=r[i],(!n||n(o,s,t))&&!a[o]&&(t[o]=s[o],a[o]=!0);s=e!==!1&&Xi(s)}while(s&&(!e||e(s,t))&&s!==Object.prototype);return t},Fp=(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},Bp=s=>{if(!s)return null;if(On(s))return s;let t=s.length;if(!wh(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=s[t];return e},Up=(s=>t=>s&&t instanceof s)(typeof Uint8Array<"u"&&Xi(Uint8Array)),$p=(s,t)=>{const e=(s&&s[Symbol.iterator]).call(s);let n;for(;(n=e.next())&&!n.done;){const r=n.value;t.call(s,r[0],r[1])}},Yp=(s,t)=>{let e;const n=[];for(;(e=s.exec(t))!==null;)n.push(e);return n},jp=fe("HTMLFormElement"),Xp=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,n){return e.toUpperCase()+n}),Sh=(({hasOwnProperty:s})=>(t,e)=>s.call(t,e))(Object.prototype),Gp=fe("RegExp"),_h=(s,t)=>{const e=Object.getOwnPropertyDescriptors(s),n={};ts(e,(r,i)=>{let o;(o=t(r,i,s))!==!1&&(n[i]=o||r)}),Object.defineProperties(s,n)},Vp=s=>{_h(s,(t,e)=>{if(ee(s)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const n=s[e];if(ee(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+"'")})}})},qp=(s,t)=>{const e={},n=r=>{r.forEach(i=>{e[i]=!0})};return On(s)?n(s):n(String(s).split(t)),e},Hp=()=>{},Wp=(s,t)=>s!=null&&Number.isFinite(s=+s)?s:t;function Jp(s){return!!(s&&ee(s.append)&&s[Symbol.toStringTag]==="FormData"&&s[Symbol.iterator])}const Kp=s=>{const t=new Array(10),e=(n,r)=>{if(ir(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[r]=n;const i=On(n)?[]:{};return ts(n,(o,a)=>{const c=e(o,r+1);!Qn(c)&&(i[a]=c)}),t[r]=void 0,i}}return n};return e(s,0)},Zp=fe("AsyncFunction"),Qp=s=>s&&(ir(s)||ee(s))&&ee(s.then)&&ee(s.catch),Ch=((s,t)=>s?setImmediate:t?((e,n)=>(ln.addEventListener("message",({source:r,data:i})=>{r===ln&&i===e&&n.length&&n.shift()()},!1),r=>{n.push(r),ln.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",ee(ln.postMessage)),tg=typeof queueMicrotask<"u"?queueMicrotask.bind(ln):typeof process<"u"&&process.nextTick||Ch,R={isArray:On,isArrayBuffer:bh,isBuffer:bp,isFormData:Pp,isArrayBufferView:wp,isString:vp,isNumber:wh,isBoolean:xp,isObject:ir,isPlainObject:or,isReadableStream:Mp,isRequest:kp,isResponse:Ip,isHeaders:Dp,isUndefined:Qn,isDate:Sp,isFile:_p,isBlob:Cp,isRegExp:Gp,isFunction:ee,isStream:Tp,isURLSearchParams:Ap,isTypedArray:Up,isFileList:Ep,forEach:ts,merge:Gi,extend:Rp,trim:Op,stripBOM:Lp,inherits:zp,toFlatObject:Np,kindOf:sr,kindOfTest:fe,endsWith:Fp,toArray:Bp,forEachEntry:$p,matchAll:Yp,isHTMLForm:jp,hasOwnProperty:Sh,hasOwnProp:Sh,reduceDescriptors:_h,freezeMethods:Vp,toObjectSet:qp,toCamelCase:Xp,noop:Hp,toFiniteNumber:Wp,findKey:vh,global:ln,isContextDefined:xh,isSpecCompliantForm:Jp,toJSONObject:Kp,isAsyncFn:Zp,isThenable:Qp,setImmediate:Ch,asap:tg};function it(s,t,e,n,r){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),r&&(this.response=r,this.status=r.status?r.status:null)}R.inherits(it,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:R.toJSONObject(this.config),code:this.code,status:this.status}}});const Eh=it.prototype,Th={};["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=>{Th[s]={value:s}}),Object.defineProperties(it,Th),Object.defineProperty(Eh,"isAxiosError",{value:!0}),it.from=(s,t,e,n,r,i)=>{const o=Object.create(Eh);return R.toFlatObject(s,o,function(a){return a!==Error.prototype},a=>a!=="isAxiosError"),it.call(o,s.message,t,e,n,r),o.cause=s,o.name=s.name,i&&Object.assign(o,i),o};const eg=null;function Vi(s){return R.isPlainObject(s)||R.isArray(s)}function Ph(s){return R.endsWith(s,"[]")?s.slice(0,-2):s}function Ah(s,t,e){return s?s.concat(t).map(function(n,r){return n=Ph(n),!e&&r?"["+n+"]":n}).join(e?".":""):t}function ng(s){return R.isArray(s)&&!s.some(Vi)}const sg=R.toFlatObject(R,{},null,function(s){return/^is[A-Z]/.test(s)});function ar(s,t,e){if(!R.isObject(s))throw new TypeError("target must be an object");t=t||new FormData,e=R.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,m){return!R.isUndefined(m[f])});const n=e.metaTokens,r=e.visitor||h,i=e.dots,o=e.indexes,a=(e.Blob||typeof Blob<"u"&&Blob)&&R.isSpecCompliantForm(t);if(!R.isFunction(r))throw new TypeError("visitor must be a function");function c(f){if(f===null)return"";if(R.isDate(f))return f.toISOString();if(!a&&R.isBlob(f))throw new it("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(f)||R.isTypedArray(f)?a&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function h(f,m,p){let _=f;if(f&&!p&&typeof f=="object"){if(R.endsWith(m,"{}"))m=n?m:m.slice(0,-2),f=JSON.stringify(f);else if(R.isArray(f)&&ng(f)||(R.isFileList(f)||R.endsWith(m,"[]"))&&(_=R.toArray(f)))return m=Ph(m),_.forEach(function(y,b){!(R.isUndefined(y)||y===null)&&t.append(o===!0?Ah([m],b,i):o===null?m:m+"[]",c(y))}),!1}return Vi(f)?!0:(t.append(Ah(p,m,i),c(f)),!1)}const l=[],u=Object.assign(sg,{defaultVisitor:h,convertValue:c,isVisitable:Vi});function d(f,m){if(!R.isUndefined(f)){if(l.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));l.push(f),R.forEach(f,function(p,_){(!(R.isUndefined(p)||p===null)&&r.call(t,p,R.isString(_)?_.trim():_,m,u))===!0&&d(p,m?m.concat(_):[_])}),l.pop()}}if(!R.isObject(s))throw new TypeError("data must be an object");return d(s),t}function Mh(s){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function qi(s,t){this._pairs=[],s&&ar(s,this,t)}const kh=qi.prototype;kh.append=function(s,t){this._pairs.push([s,t])},kh.toString=function(s){const t=s?function(e){return s.call(this,e,Mh)}:Mh;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function rg(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ih(s,t,e){if(!t)return s;const n=e&&e.encode||rg;R.isFunction(e)&&(e={serialize:e});const r=e&&e.serialize;let i;if(r?i=r(t,e):i=R.isURLSearchParams(t)?t.toString():new qi(t,e).toString(n),i){const o=s.indexOf("#");o!==-1&&(s=s.slice(0,o)),s+=(s.indexOf("?")===-1?"?":"&")+i}return s}class ig{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){R.forEach(this.handlers,function(e){e!==null&&t(e)})}}const Dh=ig,Oh={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},og=typeof URLSearchParams<"u"?URLSearchParams:qi,ag=typeof FormData<"u"?FormData:null,cg=typeof Blob<"u"?Blob:null,hg={isBrowser:!0,classes:{URLSearchParams:og,FormData:ag,Blob:cg},protocols:["http","https","file","blob","url","data"]},Hi=typeof window<"u"&&typeof document<"u",Wi=typeof navigator=="object"&&navigator||void 0,lg=Hi&&(!Wi||["ReactNative","NativeScript","NS"].indexOf(Wi.product)<0),ug=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),fg=Hi&&window.location.href||"http://localhost",dg=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Hi,hasStandardBrowserEnv:lg,hasStandardBrowserWebWorkerEnv:ug,navigator:Wi,origin:fg},Symbol.toStringTag,{value:"Module"})),qt={...dg,...hg};function mg(s,t){return ar(s,new qt.classes.URLSearchParams,Object.assign({visitor:function(e,n,r,i){return qt.isNode&&R.isBuffer(e)?(this.append(n,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function pg(s){return R.matchAll(/\w+|\[(\w*)]/g,s).map(t=>t[0]==="[]"?"":t[1]||t[0])}function gg(s){const t={},e=Object.keys(s);let n;const r=e.length;let i;for(n=0;n<r;n++)i=e[n],t[i]=s[i];return t}function Rh(s){function t(e,n,r,i){let o=e[i++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),c=i>=e.length;return o=!o&&R.isArray(r)?r.length:o,c?(R.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!a):((!r[o]||!R.isObject(r[o]))&&(r[o]=[]),t(e,n,r[o],i)&&R.isArray(r[o])&&(r[o]=gg(r[o])),!a)}if(R.isFormData(s)&&R.isFunction(s.entries)){const e={};return R.forEachEntry(s,(n,r)=>{t(pg(n),r,e,0)}),e}return null}function yg(s,t,e){if(R.isString(s))try{return(t||JSON.parse)(s),R.trim(s)}catch(n){if(n.name!=="SyntaxError")throw n}return(e||JSON.stringify)(s)}const Ji={transitional:Oh,adapter:["xhr","http","fetch"],transformRequest:[function(s,t){const e=t.getContentType()||"",n=e.indexOf("application/json")>-1,r=R.isObject(s);if(r&&R.isHTMLForm(s)&&(s=new FormData(s)),R.isFormData(s))return n?JSON.stringify(Rh(s)):s;if(R.isArrayBuffer(s)||R.isBuffer(s)||R.isStream(s)||R.isFile(s)||R.isBlob(s)||R.isReadableStream(s))return s;if(R.isArrayBufferView(s))return s.buffer;if(R.isURLSearchParams(s))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),s.toString();let i;if(r){if(e.indexOf("application/x-www-form-urlencoded")>-1)return mg(s,this.formSerializer).toString();if((i=R.isFileList(s))||e.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return ar(i?{"files[]":s}:s,o&&new o,this.formSerializer)}}return r||n?(t.setContentType("application/json",!1),yg(s)):s}],transformResponse:[function(s){const t=this.transitional||Ji.transitional,e=t&&t.forcedJSONParsing,n=this.responseType==="json";if(R.isResponse(s)||R.isReadableStream(s))return s;if(s&&R.isString(s)&&(e&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(s)}catch(i){if(r)throw i.name==="SyntaxError"?it.from(i,it.ERR_BAD_RESPONSE,this,null,this.response):i}}return s}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:qt.classes.FormData,Blob:qt.classes.Blob},validateStatus:function(s){return s>=200&&s<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};R.forEach(["delete","get","head","post","put","patch"],s=>{Ji.headers[s]={}});const Ki=Ji,bg=R.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"]),wg=s=>{const t={};let e,n,r;return s&&s.split(`
53
- `).forEach(function(i){r=i.indexOf(":"),e=i.substring(0,r).trim().toLowerCase(),n=i.substring(r+1).trim(),!(!e||t[e]&&bg[e])&&(e==="set-cookie"?t[e]?t[e].push(n):t[e]=[n]:t[e]=t[e]?t[e]+", "+n:n)}),t},Lh=Symbol("internals");function es(s){return s&&String(s).trim().toLowerCase()}function cr(s){return s===!1||s==null?s:R.isArray(s)?s.map(cr):String(s)}function vg(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 xg=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function Zi(s,t,e,n,r){if(R.isFunction(n))return n.call(this,t,e);if(r&&(t=e),!!R.isString(t)){if(R.isString(n))return t.indexOf(n)!==-1;if(R.isRegExp(n))return n.test(t)}}function Sg(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,n)=>e.toUpperCase()+n)}function _g(s,t){const e=R.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(s,n+e,{value:function(r,i,o){return this[n].call(this,t,r,i,o)},configurable:!0})})}class hr{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function i(a,c,h){const l=es(c);if(!l)throw new Error("header name must be a non-empty string");const u=R.findKey(r,l);(!u||r[u]===void 0||h===!0||h===void 0&&r[u]!==!1)&&(r[u||c]=cr(a))}const o=(a,c)=>R.forEach(a,(h,l)=>i(h,l,c));if(R.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(R.isString(t)&&(t=t.trim())&&!xg(t))o(wg(t),e);else if(R.isHeaders(t))for(const[a,c]of t.entries())i(c,a,n);else t!=null&&i(e,t,n);return this}get(t,e){if(t=es(t),t){const n=R.findKey(this,t);if(n){const r=this[n];if(!e)return r;if(e===!0)return vg(r);if(R.isFunction(e))return e.call(this,r,n);if(R.isRegExp(e))return e.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=es(t),t){const n=R.findKey(this,t);return!!(n&&this[n]!==void 0&&(!e||Zi(this,this[n],n,e)))}return!1}delete(t,e){const n=this;let r=!1;function i(o){if(o=es(o),o){const a=R.findKey(n,o);a&&(!e||Zi(n,n[a],a,e))&&(delete n[a],r=!0)}}return R.isArray(t)?t.forEach(i):i(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const i=e[n];(!t||Zi(this,this[i],i,t,!0))&&(delete this[i],r=!0)}return r}normalize(t){const e=this,n={};return R.forEach(this,(r,i)=>{const o=R.findKey(n,i);if(o){e[o]=cr(r),delete e[i];return}const a=t?Sg(i):String(i).trim();a!==i&&delete e[i],e[a]=cr(r),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return R.forEach(this,(n,r)=>{n!=null&&n!==!1&&(e[r]=t&&R.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(`
54
- `)}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(r=>n.set(r)),n}static accessor(t){const e=(this[Lh]=this[Lh]={accessors:{}}).accessors,n=this.prototype;function r(i){const o=es(i);e[o]||(_g(n,i),e[o]=!0)}return R.isArray(t)?t.forEach(r):r(t),this}}hr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),R.reduceDescriptors(hr.prototype,({value:s},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>s,set(n){this[e]=n}}}),R.freezeMethods(hr);const de=hr;function Qi(s,t){const e=this||Ki,n=t||e,r=de.from(n.headers);let i=n.data;return R.forEach(s,function(o){i=o.call(e,i,r.normalize(),t?t.status:void 0)}),r.normalize(),i}function zh(s){return!!(s&&s.__CANCEL__)}function Rn(s,t,e){it.call(this,s??"canceled",it.ERR_CANCELED,t,e),this.name="CanceledError"}R.inherits(Rn,it,{__CANCEL__:!0});function Nh(s,t,e){const n=e.config.validateStatus;!e.status||!n||n(e.status)?s(e):t(new it("Request failed with status code "+e.status,[it.ERR_BAD_REQUEST,it.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function Cg(s){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(s);return t&&t[1]||""}function Eg(s,t){s=s||10;const e=new Array(s),n=new Array(s);let r=0,i=0,o;return t=t!==void 0?t:1e3,function(a){const c=Date.now(),h=n[i];o||(o=c),e[r]=a,n[r]=c;let l=i,u=0;for(;l!==r;)u+=e[l++],l=l%s;if(r=(r+1)%s,r===i&&(i=(i+1)%s),c-o<t)return;const d=h&&c-h;return d?Math.round(u*1e3/d):void 0}}function Tg(s,t){let e=0,n=1e3/t,r,i;const o=(a,c=Date.now())=>{e=c,r=null,i&&(clearTimeout(i),i=null),s.apply(null,a)};return[(...a)=>{const c=Date.now(),h=c-e;h>=n?o(a,c):(r=a,i||(i=setTimeout(()=>{i=null,o(r)},n-h)))},()=>r&&o(r)]}const lr=(s,t,e=3)=>{let n=0;const r=Eg(50,250);return Tg(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,c=o-n,h=r(c),l=o<=a;n=o;const u={loaded:o,total:a,progress:a?o/a:void 0,bytes:c,rate:h||void 0,estimated:h&&a&&l?(a-o)/h:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};s(u)},e)},Fh=(s,t)=>{const e=s!=null;return[n=>t[0]({lengthComputable:e,total:s,loaded:n}),t[1]]},Bh=s=>(...t)=>R.asap(()=>s(...t)),Pg=qt.hasStandardBrowserEnv?((s,t)=>e=>(e=new URL(e,qt.origin),s.protocol===e.protocol&&s.host===e.host&&(t||s.port===e.port)))(new URL(qt.origin),qt.navigator&&/(msie|trident)/i.test(qt.navigator.userAgent)):()=>!0,Ag=qt.hasStandardBrowserEnv?{write(s,t,e,n,r,i){const o=[s+"="+encodeURIComponent(t)];R.isNumber(e)&&o.push("expires="+new Date(e).toGMTString()),R.isString(n)&&o.push("path="+n),R.isString(r)&&o.push("domain="+r),i===!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 Mg(s){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function kg(s,t){return t?s.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):s}function Uh(s,t,e){let n=!Mg(t);return s&&(n||e==!1)?kg(s,t):t}const $h=s=>s instanceof de?{...s}:s;function un(s,t){t=t||{};const e={};function n(h,l,u,d){return R.isPlainObject(h)&&R.isPlainObject(l)?R.merge.call({caseless:d},h,l):R.isPlainObject(l)?R.merge({},l):R.isArray(l)?l.slice():l}function r(h,l,u,d){if(R.isUndefined(l)){if(!R.isUndefined(h))return n(void 0,h,u,d)}else return n(h,l,u,d)}function i(h,l){if(!R.isUndefined(l))return n(void 0,l)}function o(h,l){if(R.isUndefined(l)){if(!R.isUndefined(h))return n(void 0,h)}else return n(void 0,l)}function a(h,l,u){if(u in t)return n(h,l);if(u in s)return n(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,l,u)=>r($h(h),$h(l),u,!0)};return R.forEach(Object.keys(Object.assign({},s,t)),function(h){const l=c[h]||r,u=l(s[h],t[h],h);R.isUndefined(u)&&l!==a||(e[h]=u)}),e}const Yh=s=>{const t=un({},s);let{data:e,withXSRFToken:n,xsrfHeaderName:r,xsrfCookieName:i,headers:o,auth:a}=t;t.headers=o=de.from(o),t.url=Ih(Uh(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 c;if(R.isFormData(e)){if(qt.hasStandardBrowserEnv||qt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){const[h,...l]=c?c.split(";").map(u=>u.trim()).filter(Boolean):[];o.setContentType([h||"multipart/form-data",...l].join("; "))}}if(qt.hasStandardBrowserEnv&&(n&&R.isFunction(n)&&(n=n(t)),n||n!==!1&&Pg(t.url))){const h=r&&i&&Ag.read(i);h&&o.set(r,h)}return t},Ig=typeof XMLHttpRequest<"u",Dg=Ig&&function(s){return new Promise(function(t,e){const n=Yh(s);let r=n.data;const i=de.from(n.headers).normalize();let{responseType:o,onUploadProgress:a,onDownloadProgress:c}=n,h,l,u,d,f;function m(){d&&d(),f&&f(),n.cancelToken&&n.cancelToken.unsubscribe(h),n.signal&&n.signal.removeEventListener("abort",h)}let p=new XMLHttpRequest;p.open(n.method.toUpperCase(),n.url,!0),p.timeout=n.timeout;function _(){if(!p)return;const b=de.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),v={data:!o||o==="text"||o==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:b,config:s,request:p};Nh(function(w){t(w),m()},function(w){e(w),m()},v),p=null}"onloadend"in p?p.onloadend=_:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(_)},p.onabort=function(){p&&(e(new it("Request aborted",it.ECONNABORTED,s,p)),p=null)},p.onerror=function(){e(new it("Network Error",it.ERR_NETWORK,s,p)),p=null},p.ontimeout=function(){let b=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const v=n.transitional||Oh;n.timeoutErrorMessage&&(b=n.timeoutErrorMessage),e(new it(b,v.clarifyTimeoutError?it.ETIMEDOUT:it.ECONNABORTED,s,p)),p=null},r===void 0&&i.setContentType(null),"setRequestHeader"in p&&R.forEach(i.toJSON(),function(b,v){p.setRequestHeader(v,b)}),R.isUndefined(n.withCredentials)||(p.withCredentials=!!n.withCredentials),o&&o!=="json"&&(p.responseType=n.responseType),c&&([u,f]=lr(c,!0),p.addEventListener("progress",u)),a&&p.upload&&([l,d]=lr(a),p.upload.addEventListener("progress",l),p.upload.addEventListener("loadend",d)),(n.cancelToken||n.signal)&&(h=b=>{p&&(e(!b||b.type?new Rn(null,s,p):b),p.abort(),p=null)},n.cancelToken&&n.cancelToken.subscribe(h),n.signal&&(n.signal.aborted?h():n.signal.addEventListener("abort",h)));const y=Cg(n.url);if(y&&qt.protocols.indexOf(y)===-1){e(new it("Unsupported protocol "+y+":",it.ERR_BAD_REQUEST,s));return}p.send(r||null)})},Og=(s,t)=>{const{length:e}=s=s?s.filter(Boolean):[];if(t||e){let n=new AbortController,r;const i=function(h){if(!r){r=!0,a();const l=h instanceof Error?h:this.reason;n.abort(l instanceof it?l:new Rn(l instanceof Error?l.message:l))}};let o=t&&setTimeout(()=>{o=null,i(new it(`timeout ${t} of ms exceeded`,it.ETIMEDOUT))},t);const a=()=>{s&&(o&&clearTimeout(o),o=null,s.forEach(h=>{h.unsubscribe?h.unsubscribe(i):h.removeEventListener("abort",i)}),s=null)};s.forEach(h=>h.addEventListener("abort",i));const{signal:c}=n;return c.unsubscribe=()=>R.asap(a),c}},Rg=Og,Lg=function*(s,t){let e=s.byteLength;if(!t||e<t){yield s;return}let n=0,r;for(;n<e;)r=n+t,yield s.slice(n,r),n=r},zg=async function*(s,t){for await(const e of Ng(s))yield*Lg(e,t)},Ng=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()}},jh=(s,t,e,n)=>{const r=zg(s,t);let i=0,o,a=c=>{o||(o=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:h,value:l}=await r.next();if(h){a(),c.close();return}let u=l.byteLength;if(e){let d=i+=u;e(d)}c.enqueue(new Uint8Array(l))}catch(h){throw a(h),h}},cancel(c){return a(c),r.return()}},{highWaterMark:2})},ur=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Xh=ur&&typeof ReadableStream=="function",Fg=ur&&(typeof TextEncoder=="function"?(s=>t=>s.encode(t))(new TextEncoder):async s=>new Uint8Array(await new Response(s).arrayBuffer())),Gh=(s,...t)=>{try{return!!s(...t)}catch{return!1}},Bg=Xh&&Gh(()=>{let s=!1;const t=new Request(qt.origin,{body:new ReadableStream,method:"POST",get duplex(){return s=!0,"half"}}).headers.has("Content-Type");return s&&!t}),Vh=64*1024,to=Xh&&Gh(()=>R.isReadableStream(new Response("").body)),fr={stream:to&&(s=>s.body)};ur&&(s=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!fr[t]&&(fr[t]=R.isFunction(s[t])?e=>e[t]():(e,n)=>{throw new it(`Response type '${t}' is not supported`,it.ERR_NOT_SUPPORT,n)})})})(new Response);const Ug=async s=>{if(s==null)return 0;if(R.isBlob(s))return s.size;if(R.isSpecCompliantForm(s))return(await new Request(qt.origin,{method:"POST",body:s}).arrayBuffer()).byteLength;if(R.isArrayBufferView(s)||R.isArrayBuffer(s))return s.byteLength;if(R.isURLSearchParams(s)&&(s=s+""),R.isString(s))return(await Fg(s)).byteLength},$g=async(s,t)=>R.toFiniteNumber(s.getContentLength())??Ug(t),Yg=ur&&(async s=>{let{url:t,method:e,data:n,signal:r,cancelToken:i,timeout:o,onDownloadProgress:a,onUploadProgress:c,responseType:h,headers:l,withCredentials:u="same-origin",fetchOptions:d}=Yh(s);h=h?(h+"").toLowerCase():"text";let f=Rg([r,i&&i.toAbortSignal()],o),m;const p=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let _;try{if(c&&Bg&&e!=="get"&&e!=="head"&&(_=await $g(l,n))!==0){let E=new Request(t,{method:"POST",body:n,duplex:"half"}),C;if(R.isFormData(n)&&(C=E.headers.get("content-type"))&&l.setContentType(C),E.body){const[D,$]=Fh(_,lr(Bh(c)));n=jh(E.body,Vh,D,$)}}R.isString(u)||(u=u?"include":"omit");const y="credentials"in Request.prototype;m=new Request(t,{...d,signal:f,method:e.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:y?u:void 0});let b=await fetch(m);const v=to&&(h==="stream"||h==="response");if(to&&(a||v&&p)){const E={};["status","statusText","headers"].forEach(O=>{E[O]=b[O]});const C=R.toFiniteNumber(b.headers.get("content-length")),[D,$]=a&&Fh(C,lr(Bh(a),!0))||[];b=new Response(jh(b.body,Vh,D,()=>{$&&$(),p&&p()}),E)}h=h||"text";let w=await fr[R.findKey(fr,h)||"text"](b,s);return!v&&p&&p(),await new Promise((E,C)=>{Nh(E,C,{data:w,headers:de.from(b.headers),status:b.status,statusText:b.statusText,config:s,request:m})})}catch(y){throw p&&p(),y&&y.name==="TypeError"&&/fetch/i.test(y.message)?Object.assign(new it("Network Error",it.ERR_NETWORK,s,m),{cause:y.cause||y}):it.from(y,y&&y.code,s,m)}}),eo={http:eg,xhr:Dg,fetch:Yg};R.forEach(eo,(s,t)=>{if(s){try{Object.defineProperty(s,"name",{value:t})}catch{}Object.defineProperty(s,"adapterName",{value:t})}});const qh=s=>`- ${s}`,jg=s=>R.isFunction(s)||s===null||s===!1,Hh={getAdapter:s=>{s=R.isArray(s)?s:[s];const{length:t}=s;let e,n;const r={};for(let i=0;i<t;i++){e=s[i];let o;if(n=e,!jg(e)&&(n=eo[(o=String(e)).toLowerCase()],n===void 0))throw new it(`Unknown adapter '${o}'`);if(n)break;r[o||"#"+i]=n}if(!n){const i=Object.entries(r).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 :
55
- `+i.map(qh).join(`
56
- `):" "+qh(i[0]):"as no adapter specified";throw new it("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n},adapters:eo};function no(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new Rn(null,s)}function Wh(s){return no(s),s.headers=de.from(s.headers),s.data=Qi.call(s,s.transformRequest),["post","put","patch"].indexOf(s.method)!==-1&&s.headers.setContentType("application/x-www-form-urlencoded",!1),Hh.getAdapter(s.adapter||Ki.adapter)(s).then(function(t){return no(s),t.data=Qi.call(s,s.transformResponse,t),t.headers=de.from(t.headers),t},function(t){return zh(t)||(no(s),t&&t.response&&(t.response.data=Qi.call(s,s.transformResponse,t.response),t.response.headers=de.from(t.response.headers))),Promise.reject(t)})}const Jh="1.8.4",dr={};["object","boolean","number","function","string","symbol"].forEach((s,t)=>{dr[s]=function(e){return typeof e===s||"a"+(t<1?"n ":" ")+s}});const Kh={};dr.transitional=function(s,t,e){function n(r,i){return"[Axios v"+Jh+"] Transitional option '"+r+"'"+i+(e?". "+e:"")}return(r,i,o)=>{if(s===!1)throw new it(n(i," has been removed"+(t?" in "+t:"")),it.ERR_DEPRECATED);return t&&!Kh[i]&&(Kh[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),s?s(r,i,o):!0}},dr.spelling=function(s){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${s}`),!0)};function Xg(s,t,e){if(typeof s!="object")throw new it("options must be an object",it.ERR_BAD_OPTION_VALUE);const n=Object.keys(s);let r=n.length;for(;r-- >0;){const i=n[r],o=t[i];if(o){const a=s[i],c=a===void 0||o(a,i,s);if(c!==!0)throw new it("option "+i+" must be "+c,it.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new it("Unknown option "+i,it.ERR_BAD_OPTION)}}const mr={assertOptions:Xg,validators:dr},be=mr.validators;class pr{constructor(t){this.defaults=t,this.interceptors={request:new Dh,response:new Dh}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const i=r.stack?r.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
57
- `+i):n.stack=i}catch{}}throw n}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=un(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:i}=e;n!==void 0&&mr.assertOptions(n,{silentJSONParsing:be.transitional(be.boolean),forcedJSONParsing:be.transitional(be.boolean),clarifyTimeoutError:be.transitional(be.boolean)},!1),r!=null&&(R.isFunction(r)?e.paramsSerializer={serialize:r}:mr.assertOptions(r,{encode:be.function,serialize:be.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),mr.assertOptions(e,{baseUrl:be.spelling("baseURL"),withXsrfToken:be.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=i&&R.merge(i.common,i[e.method]);i&&R.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),e.headers=de.concat(o,i);const a=[];let c=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(e)===!1||(c=c&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const h=[];this.interceptors.response.forEach(function(m){h.push(m.fulfilled,m.rejected)});let l,u=0,d;if(!c){const m=[Wh.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,h),d=m.length,l=Promise.resolve(e);u<d;)l=l.then(m[u++],m[u++]);return l}d=a.length;let f=e;for(u=0;u<d;){const m=a[u++],p=a[u++];try{f=m(f)}catch(_){p.call(this,_);break}}try{l=Wh.call(this,f)}catch(m){return Promise.reject(m)}for(u=0,d=h.length;u<d;)l=l.then(h[u++],h[u++]);return l}getUri(t){t=un(this.defaults,t);const e=Uh(t.baseURL,t.url,t.allowAbsoluteUrls);return Ih(e,t.params,t.paramsSerializer)}}R.forEach(["delete","get","head","options"],function(s){pr.prototype[s]=function(t,e){return this.request(un(e||{},{method:s,url:t,data:(e||{}).data}))}}),R.forEach(["post","put","patch"],function(s){function t(e){return function(n,r,i){return this.request(un(i||{},{method:s,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}pr.prototype[s]=t(),pr.prototype[s+"Form"]=t(!0)});const gr=pr;class so{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(r){e=r});const n=this;this.promise.then(r=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](r);n._listeners=null}),this.promise.then=r=>{let i;const o=new Promise(a=>{n.subscribe(a),i=a}).then(r);return o.cancel=function(){n.unsubscribe(i)},o},t(function(r,i,o){n.reason||(n.reason=new Rn(r,i,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 so(function(e){t=e}),cancel:t}}}const Gg=so;function Vg(s){return function(t){return s.apply(null,t)}}function qg(s){return R.isObject(s)&&s.isAxiosError===!0}const ro={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(ro).forEach(([s,t])=>{ro[t]=s});const Hg=ro;function Zh(s){const t=new gr(s),e=yh(gr.prototype.request,t);return R.extend(e,gr.prototype,t,{allOwnKeys:!0}),R.extend(e,t,null,{allOwnKeys:!0}),e.create=function(n){return Zh(un(s,n))},e}const Dt=Zh(Ki);Dt.Axios=gr,Dt.CanceledError=Rn,Dt.CancelToken=Gg,Dt.isCancel=zh,Dt.VERSION=Jh,Dt.toFormData=ar,Dt.AxiosError=it,Dt.Cancel=Dt.CanceledError,Dt.all=function(s){return Promise.all(s)},Dt.spread=Vg,Dt.isAxiosError=qg,Dt.mergeConfig=un,Dt.AxiosHeaders=de,Dt.formToJSON=s=>Rh(R.isHTMLForm(s)?new FormData(s):s),Dt.getAdapter=Hh.getAdapter,Dt.HttpStatusCode=Hg,Dt.default=Dt;const Wg=Dt;class Qh{instance;canceler;constructor(t){this.instance=Wg.create(t),this.canceler=new lh({cacheKeyResolver:e=>{const{method:n,url:r,params:i,data:o}=e;return dh({method:n,url:r,params:i,data:o})}}),this.instance.interceptors.request.use(e=>(this.canceler.set(e),t?.interceptor?.request?.(e),e),e=>(e.config&&this.canceler.delete(e.config),t?.interceptor?.requestError?.(e),Promise.reject(e))),this.instance.interceptors.response.use(e=>(this.canceler.delete(e.config),t?.interceptor?.response?.(e),e.status==200,Promise.resolve(e)),e=>(this.canceler.delete(e.config),t?.interceptor?.responseError?.(e),Promise.reject(e)))}request(t){const e=this.instance.request;return e({...t,signal:this.canceler.get(t)?.signal})}cancel(t){this.canceler.get(t)?.abort(),this.canceler.delete(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})}postFormData(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)}}new lh({cacheKeyResolver:s=>dh(s)});function Jg(s,t=(e,n)=>e<=n){const e=s.length;let n=Math.floor(e/2);for(;n>0;){for(let r=n;r<e;r++){const i=s[r];let o=r;for(;o>=n&&!t(s[o-n],i);)s[o]=s[o-n],o-=n;s[o]=i}n=Math.floor(n/2)}}function tl(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var el={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 r(y,b){var v=y[0],w=y[1],E=y[2],C=y[3];v+=(w&E|~w&C)+b[0]-680876936|0,v=(v<<7|v>>>25)+w|0,C+=(v&w|~v&E)+b[1]-389564586|0,C=(C<<12|C>>>20)+v|0,E+=(C&v|~C&w)+b[2]+606105819|0,E=(E<<17|E>>>15)+C|0,w+=(E&C|~E&v)+b[3]-1044525330|0,w=(w<<22|w>>>10)+E|0,v+=(w&E|~w&C)+b[4]-176418897|0,v=(v<<7|v>>>25)+w|0,C+=(v&w|~v&E)+b[5]+1200080426|0,C=(C<<12|C>>>20)+v|0,E+=(C&v|~C&w)+b[6]-1473231341|0,E=(E<<17|E>>>15)+C|0,w+=(E&C|~E&v)+b[7]-45705983|0,w=(w<<22|w>>>10)+E|0,v+=(w&E|~w&C)+b[8]+1770035416|0,v=(v<<7|v>>>25)+w|0,C+=(v&w|~v&E)+b[9]-1958414417|0,C=(C<<12|C>>>20)+v|0,E+=(C&v|~C&w)+b[10]-42063|0,E=(E<<17|E>>>15)+C|0,w+=(E&C|~E&v)+b[11]-1990404162|0,w=(w<<22|w>>>10)+E|0,v+=(w&E|~w&C)+b[12]+1804603682|0,v=(v<<7|v>>>25)+w|0,C+=(v&w|~v&E)+b[13]-40341101|0,C=(C<<12|C>>>20)+v|0,E+=(C&v|~C&w)+b[14]-1502002290|0,E=(E<<17|E>>>15)+C|0,w+=(E&C|~E&v)+b[15]+1236535329|0,w=(w<<22|w>>>10)+E|0,v+=(w&C|E&~C)+b[1]-165796510|0,v=(v<<5|v>>>27)+w|0,C+=(v&E|w&~E)+b[6]-1069501632|0,C=(C<<9|C>>>23)+v|0,E+=(C&w|v&~w)+b[11]+643717713|0,E=(E<<14|E>>>18)+C|0,w+=(E&v|C&~v)+b[0]-373897302|0,w=(w<<20|w>>>12)+E|0,v+=(w&C|E&~C)+b[5]-701558691|0,v=(v<<5|v>>>27)+w|0,C+=(v&E|w&~E)+b[10]+38016083|0,C=(C<<9|C>>>23)+v|0,E+=(C&w|v&~w)+b[15]-660478335|0,E=(E<<14|E>>>18)+C|0,w+=(E&v|C&~v)+b[4]-405537848|0,w=(w<<20|w>>>12)+E|0,v+=(w&C|E&~C)+b[9]+568446438|0,v=(v<<5|v>>>27)+w|0,C+=(v&E|w&~E)+b[14]-1019803690|0,C=(C<<9|C>>>23)+v|0,E+=(C&w|v&~w)+b[3]-187363961|0,E=(E<<14|E>>>18)+C|0,w+=(E&v|C&~v)+b[8]+1163531501|0,w=(w<<20|w>>>12)+E|0,v+=(w&C|E&~C)+b[13]-1444681467|0,v=(v<<5|v>>>27)+w|0,C+=(v&E|w&~E)+b[2]-51403784|0,C=(C<<9|C>>>23)+v|0,E+=(C&w|v&~w)+b[7]+1735328473|0,E=(E<<14|E>>>18)+C|0,w+=(E&v|C&~v)+b[12]-1926607734|0,w=(w<<20|w>>>12)+E|0,v+=(w^E^C)+b[5]-378558|0,v=(v<<4|v>>>28)+w|0,C+=(v^w^E)+b[8]-2022574463|0,C=(C<<11|C>>>21)+v|0,E+=(C^v^w)+b[11]+1839030562|0,E=(E<<16|E>>>16)+C|0,w+=(E^C^v)+b[14]-35309556|0,w=(w<<23|w>>>9)+E|0,v+=(w^E^C)+b[1]-1530992060|0,v=(v<<4|v>>>28)+w|0,C+=(v^w^E)+b[4]+1272893353|0,C=(C<<11|C>>>21)+v|0,E+=(C^v^w)+b[7]-155497632|0,E=(E<<16|E>>>16)+C|0,w+=(E^C^v)+b[10]-1094730640|0,w=(w<<23|w>>>9)+E|0,v+=(w^E^C)+b[13]+681279174|0,v=(v<<4|v>>>28)+w|0,C+=(v^w^E)+b[0]-358537222|0,C=(C<<11|C>>>21)+v|0,E+=(C^v^w)+b[3]-722521979|0,E=(E<<16|E>>>16)+C|0,w+=(E^C^v)+b[6]+76029189|0,w=(w<<23|w>>>9)+E|0,v+=(w^E^C)+b[9]-640364487|0,v=(v<<4|v>>>28)+w|0,C+=(v^w^E)+b[12]-421815835|0,C=(C<<11|C>>>21)+v|0,E+=(C^v^w)+b[15]+530742520|0,E=(E<<16|E>>>16)+C|0,w+=(E^C^v)+b[2]-995338651|0,w=(w<<23|w>>>9)+E|0,v+=(E^(w|~C))+b[0]-198630844|0,v=(v<<6|v>>>26)+w|0,C+=(w^(v|~E))+b[7]+1126891415|0,C=(C<<10|C>>>22)+v|0,E+=(v^(C|~w))+b[14]-1416354905|0,E=(E<<15|E>>>17)+C|0,w+=(C^(E|~v))+b[5]-57434055|0,w=(w<<21|w>>>11)+E|0,v+=(E^(w|~C))+b[12]+1700485571|0,v=(v<<6|v>>>26)+w|0,C+=(w^(v|~E))+b[3]-1894986606|0,C=(C<<10|C>>>22)+v|0,E+=(v^(C|~w))+b[10]-1051523|0,E=(E<<15|E>>>17)+C|0,w+=(C^(E|~v))+b[1]-2054922799|0,w=(w<<21|w>>>11)+E|0,v+=(E^(w|~C))+b[8]+1873313359|0,v=(v<<6|v>>>26)+w|0,C+=(w^(v|~E))+b[15]-30611744|0,C=(C<<10|C>>>22)+v|0,E+=(v^(C|~w))+b[6]-1560198380|0,E=(E<<15|E>>>17)+C|0,w+=(C^(E|~v))+b[13]+1309151649|0,w=(w<<21|w>>>11)+E|0,v+=(E^(w|~C))+b[4]-145523070|0,v=(v<<6|v>>>26)+w|0,C+=(w^(v|~E))+b[11]-1120210379|0,C=(C<<10|C>>>22)+v|0,E+=(v^(C|~w))+b[2]+718787259|0,E=(E<<15|E>>>17)+C|0,w+=(C^(E|~v))+b[9]-343485551|0,w=(w<<21|w>>>11)+E|0,y[0]=v+y[0]|0,y[1]=w+y[1]|0,y[2]=E+y[2]|0,y[3]=C+y[3]|0}function i(y){var b=[],v;for(v=0;v<64;v+=4)b[v>>2]=y.charCodeAt(v)+(y.charCodeAt(v+1)<<8)+(y.charCodeAt(v+2)<<16)+(y.charCodeAt(v+3)<<24);return b}function o(y){var b=[],v;for(v=0;v<64;v+=4)b[v>>2]=y[v]+(y[v+1]<<8)+(y[v+2]<<16)+(y[v+3]<<24);return b}function a(y){var b=y.length,v=[1732584193,-271733879,-1732584194,271733878],w,E,C,D,$,O;for(w=64;w<=b;w+=64)r(v,i(y.substring(w-64,w)));for(y=y.substring(w-64),E=y.length,C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=0;w<E;w+=1)C[w>>2]|=y.charCodeAt(w)<<(w%4<<3);if(C[w>>2]|=128<<(w%4<<3),w>55)for(r(v,C),w=0;w<16;w+=1)C[w]=0;return D=b*8,D=D.toString(16).match(/(.*?)(.{0,8})$/),$=parseInt(D[2],16),O=parseInt(D[1],16)||0,C[14]=$,C[15]=O,r(v,C),v}function c(y){var b=y.length,v=[1732584193,-271733879,-1732584194,271733878],w,E,C,D,$,O;for(w=64;w<=b;w+=64)r(v,o(y.subarray(w-64,w)));for(y=w-64<b?y.subarray(w-64):new Uint8Array(0),E=y.length,C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=0;w<E;w+=1)C[w>>2]|=y[w]<<(w%4<<3);if(C[w>>2]|=128<<(w%4<<3),w>55)for(r(v,C),w=0;w<16;w+=1)C[w]=0;return D=b*8,D=D.toString(16).match(/(.*?)(.{0,8})$/),$=parseInt(D[2],16),O=parseInt(D[1],16)||0,C[14]=$,C[15]=O,r(v,C),v}function h(y){var b="",v;for(v=0;v<4;v+=1)b+=n[y>>v*8+4&15]+n[y>>v*8&15];return b}function l(y){var b;for(b=0;b<y.length;b+=1)y[b]=h(y[b]);return y.join("")}l(a("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function y(b,v){return b=b|0||0,b<0?Math.max(b+v,0):Math.min(b,v)}ArrayBuffer.prototype.slice=function(b,v){var w=this.byteLength,E=y(b,w),C=w,D,$,O,U;return v!==e&&(C=y(v,w)),E>C?new ArrayBuffer(0):(D=C-E,$=new ArrayBuffer(D),O=new Uint8Array($),U=new Uint8Array(this,E,D),O.set(U),$)}}();function u(y){return/[\u0080-\uFFFF]/.test(y)&&(y=unescape(encodeURIComponent(y))),y}function d(y,b){var v=y.length,w=new ArrayBuffer(v),E=new Uint8Array(w),C;for(C=0;C<v;C+=1)E[C]=y.charCodeAt(C);return b?E:w}function f(y){return String.fromCharCode.apply(null,new Uint8Array(y))}function m(y,b,v){var w=new Uint8Array(y.byteLength+b.byteLength);return w.set(new Uint8Array(y)),w.set(new Uint8Array(b),y.byteLength),v?w:w.buffer}function p(y){var b=[],v=y.length,w;for(w=0;w<v-1;w+=2)b.push(parseInt(y.substr(w,2),16));return String.fromCharCode.apply(String,b)}function _(){this.reset()}return _.prototype.append=function(y){return this.appendBinary(u(y)),this},_.prototype.appendBinary=function(y){this._buff+=y,this._length+=y.length;var b=this._buff.length,v;for(v=64;v<=b;v+=64)r(this._hash,i(this._buff.substring(v-64,v)));return this._buff=this._buff.substring(v-64),this},_.prototype.end=function(y){var b=this._buff,v=b.length,w,E=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],C;for(w=0;w<v;w+=1)E[w>>2]|=b.charCodeAt(w)<<(w%4<<3);return this._finish(E,v),C=l(this._hash),y&&(C=p(C)),this.reset(),C},_.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},_.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},_.prototype.setState=function(y){return this._buff=y.buff,this._length=y.length,this._hash=y.hash,this},_.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},_.prototype._finish=function(y,b){var v=b,w,E,C;if(y[v>>2]|=128<<(v%4<<3),v>55)for(r(this._hash,y),v=0;v<16;v+=1)y[v]=0;w=this._length*8,w=w.toString(16).match(/(.*?)(.{0,8})$/),E=parseInt(w[2],16),C=parseInt(w[1],16)||0,y[14]=E,y[15]=C,r(this._hash,y)},_.hash=function(y,b){return _.hashBinary(u(y),b)},_.hashBinary=function(y,b){var v=a(y),w=l(v);return b?p(w):w},_.ArrayBuffer=function(){this.reset()},_.ArrayBuffer.prototype.append=function(y){var b=m(this._buff.buffer,y,!0),v=b.length,w;for(this._length+=y.byteLength,w=64;w<=v;w+=64)r(this._hash,o(b.subarray(w-64,w)));return this._buff=w-64<v?new Uint8Array(b.buffer.slice(w-64)):new Uint8Array(0),this},_.ArrayBuffer.prototype.end=function(y){var b=this._buff,v=b.length,w=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],E,C;for(E=0;E<v;E+=1)w[E>>2]|=b[E]<<(E%4<<3);return this._finish(w,v),C=l(this._hash),y&&(C=p(C)),this.reset(),C},_.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},_.ArrayBuffer.prototype.getState=function(){var y=_.prototype.getState.call(this);return y.buff=f(y.buff),y},_.ArrayBuffer.prototype.setState=function(y){return y.buff=d(y.buff,!0),_.prototype.setState.call(this,y)},_.ArrayBuffer.prototype.destroy=_.prototype.destroy,_.ArrayBuffer.prototype._finish=_.prototype._finish,_.ArrayBuffer.hash=function(y,b){var v=c(new Uint8Array(y)),w=l(v);return b?p(w):w},_})})(el);var Kg=el.exports;const Zg=tl(Kg),Qg=Qm&&window.File&&window.FileReader&&window.FileList&&window.Blob;function t0(s='script[type="text/js-worker"]'){return Array.prototype.map.call(document.querySelectorAll(s),t=>t.textContent)}const io=s=>new XMLSerializer().serializeToString(s),e0=(s,t="text/html")=>new DOMParser().parseFromString(s,t),oo=(s,t={mime:ye["image/svg+xml"],encode:Ns.utf8})=>Ti(io(s),t);async function ao(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",r=>{n.value=""},!1),new Promise((r,i)=>{n.addEventListener("change",o=>{e=Array.from(o.target.files||[]),e.length===0?i(new Error("Cancel")):r(e)},!1),window.addEventListener("focus",()=>{setTimeout(()=>{e.length===0&&i(new Error("Cancel"))},1e3)},{once:!0}),n.click()}).then(r=>(n.remove(),r)).catch(r=>{throw n.remove(),r})}function ns(s,t=ie.text,e){return new Promise((n,r)=>{const i=new FileReader;switch(i.addEventListener("progress",o=>{e?.(o.loaded,o.total)}),i.addEventListener("load",o=>{n(o.target?.result)}),i.addEventListener("error",o=>{r(o)}),t){case ie.dataURL:i.readAsDataURL(s);break;case ie.binaryString:i.readAsBinaryString(s);break;case ie.arraybuffer:i.readAsArrayBuffer(s);break;case ie.text:default:i.readAsText(s)}})}async function n0(s){const t=await ns(s,ie.arraybuffer);return qd(t)}function nl(s,t,e,n,r,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<n.size)nl(s,t,e,n,r,o,Math.min(o+r,n.size));else return s(e.end())}),a.addEventListener("error",c=>t(c)),a.readAsArrayBuffer(n.slice(i,o))}async function sl(s,t=1048576){return await new Promise((e,n)=>nl(e,n,new Zg.ArrayBuffer,s,t,0,Math.min(t,s.size)))}class s0{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 Qh({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 sl(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(()=>{um(this.time,1),this.onTime?.(cm(this.time))},1e3)}stopTimeCount(){this.timer&&(clearInterval(this.timer),this.timer=void 0)}}var rl={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
58
- * http://hammerjs.github.io/
78
+ **/function PC(){CC()}({}).NODE_ENV!=="production"&&PC();function AC(n){const[t,e]=H.useState(n),s=H.useRef(t),i=H.useRef(bc()),r=H.useCallback(o=>{e(a=>{const c=typeof o=="function"?o(a):o;return Object.is(a,c)?a:(s.current=c,i.current.emit(c),c)})},[]);return H.useMemo(()=>({getState:()=>s.current,setState:r,subscribe:o=>{ls(()=>o(s.current));const a=i.current.subscribe(c=>{ls(()=>o(c))});return()=>a()}}),[])}function MC(n){const t=Kp(n),e=bc();return{getState:()=>t.value,setState:i=>{const r=typeof i=="function"?i(t.value):i;Object.is(t.value,r)||(t.value=r,e.emit(r))},subscribe:i=>(ls(()=>i(t.value)),e.subscribe(r=>{ls(()=>i(r))}))}}function DC(n){const t=new po(n);return{getState:()=>t.value,setState:e=>{const s=t.value,i=typeof e=="function"?e(s):e;Object.is(s,i)||t.next(i)},subscribe:e=>{const s=t.subscribe(i=>{ls(()=>e(i))});return()=>s.unsubscribe()}}}function cu(n,t){let e=n;const s=bc();return{getState:()=>e,setState:i=>{const r=typeof i=="function"?i(e):i;Object.is(e,r)||t?.beforeChange&&!t.beforeChange(r)||(e=r,s.emit(e))},subscribe:i=>{ls(()=>i(e));const r=s.subscribe(o=>{ls(()=>i(o))});return()=>r()}}}function vg(n){const t=n.initState||{};let e=n.reducer;if(n.enhancer)return n.enhancer(vg)({reducer:e,initState:t});const s=cu(t),i=o=>{const a=e(s.getState(),o);s.setState(a)},r=o=>{e=o,i({type:Symbol()})};return i({type:Symbol()}),{getState:s.getState,dispatch:i,subscribe:s.subscribe,replaceReducer:r}}function RC(n,t=!0){const e=Object.keys(n);return(s={},i)=>{const r=t?{...s}:s;for(const o of e){const a=n[o](r[o]??{},i);if(a===void 0)throw new Error(`Reducer "${o}" returned undefined`);r[o]=a}return r}}function OC(...n){return t=>e=>{const s=t(e);let i=s.dispatch;const r={getState:s.getState,dispatch:i},o=n.map(a=>a(r));return i=Cw(...o)(i),s.dispatch=i,s}}function IC(n){const t=new po(void 0),e=new bn;let s=null,i=!1,r=!1;return{middleware(o){return i?a=>a:(i=!0,t.next(o.getState()),a=>c=>{const h=a(c);return t.next(o.getState()),e.next(c),h})},run(o,a){if(!i)throw new Error("EpicMiddleware should applyMiddleware() to store before");if(r)throw new Error("EpicMiddleware destroyed");return s||(s=o(e,t,{...n?.dependencies??{},dispatch:a.dispatch}).pipe(ep((c,h)=>(zw("[Epic Error]",c),h))).subscribe({next(c){a.dispatch(c)},error(c){console.error("[Epic Fatal Error]",c)}}),s)},destroy(){r=!0,s?.unsubscribe(),s=null,e.complete(),t.complete()}}}function kC(...n){return(t,e,s)=>yo(...n.map(i=>i(t,e,s)))}function LC(...n){return yh(t=>n.includes(t.type))}function VC(){return{middleware(n){return t=>e=>typeof e=="function"?e(n.dispatch,n.getState):t(e)}}}const NC=n=>{let t=0;return e=>s=>{wd.start(`--- ${++t}: action(${String(s.type)}) ---`),zn(`action: ${Xr(s)}`),zn(`old-state: ${Xr(n.getState())}`),e(s),zn(`new-state: ${Xr(n.getState())}`),wd.end()}},zC=n=>t=>e=>{try{t(e)}catch(s){throw zn(`Reducer错误报告: ${s}`),s}},FC=n=>t=>e=>{const s=`dispatch(${String(e.type)}) execute time`;xd.start(s),t(e),xd.end(s)};function BC(n="",t){const{OPERATION_DELIMITER:e="/",KEY_DELIMITER:s=",",KEY_VALUE_DELIMITER:i=":"}=t||{};return n.split(e).filter(r=>r!=="").reduce((r,o)=>{const[a,...c]=o.split(s);if(c.length===0){const[h,u]=a.split(i);r.push({type:h,payload:u!==void 0?decodeURIComponent(u):!0})}else{if(a.indexOf(i)!==-1)throw new Error(`"${a}" is invalid`);r.push(c.reduce((h,u)=>{const[l,f]=u.split(i);return h[l]=f!==void 0?decodeURIComponent(f):!0,h},{type:a}))}return r},[])}var hu={exports:{}},uu={};const er=i2(cT);var Xo={exports:{}},lu={};/**
79
+ * @license React
80
+ * use-sync-external-store-shim.production.js
59
81
  *
60
- * Copyright (c) 2016 Jorik Tangelder;
61
- * Licensed under the MIT license */(function(s){(function(t,e,n,r){var i=["","webkit","Moz","MS","ms","o"],o=e.createElement("div"),a="function",c=Math.round,h=Math.abs,l=Date.now;function u(S,P,M){return setTimeout(v(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!==r)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 m(S,P,M){var I="DEPRECATED METHOD: "+P+`
62
- `+M+` AT
63
- `;return function(){var F=new Error("get-stack-trace"),G=F&&F.stack?F.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",dt=t.console&&(t.console.warn||t.console.log);return dt&&dt.call(t.console,I,G),S.apply(this,arguments)}}var p;typeof Object.assign!="function"?p=function(P){if(P===r||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!==r&&F!==null)for(var G in F)F.hasOwnProperty(G)&&(M[G]=F[G])}return M}:p=Object.assign;var _=m(function(P,M,I){for(var F=Object.keys(M),G=0;G<F.length;)(!I||I&&P[F[G]]===r)&&(P[F[G]]=M[F[G]]),G++;return P},"extend","Use `assign`."),y=m(function(P,M){return _(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&&p(F,M)}function v(S,P){return function(){return S.apply(P,arguments)}}function w(S,P){return typeof S==a?S.apply(P&&P[0]||r,P):S}function E(S,P){return S===r?P:S}function C(S,P,M){f(U(P),function(I){S.addEventListener(I,M,!1)})}function D(S,P,M){f(U(P),function(I){S.removeEventListener(I,M,!1)})}function $(S,P){for(;S;){if(S==P)return!0;S=S.parentNode}return!1}function O(S,P){return S.indexOf(P)>-1}function U(S){return S.trim().split(/\s+/g)}function V(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 q(S){return Array.prototype.slice.call(S,0)}function ft(S,P,M){for(var I=[],F=[],G=0;G<S.length;){var dt=P?S[G][P]:S[G];V(F,dt)<0&&I.push(S[G]),F[G]=dt,G++}return M&&(P?I=I.sort(function(Vt,Kt){return Vt[P]>Kt[P]}):I=I.sort()),I}function pt(S,P){for(var M,I,F=P[0].toUpperCase()+P.slice(1),G=0;G<i.length;){if(M=i[G],I=M?M+F:P,I in S)return I;G++}return r}var zt=1;function wt(){return zt++}function It(S){var P=S.ownerDocument||S;return P.defaultView||P.parentWindow||t}var Xt=/mobile|tablet|ip(ad|hone|od)|android/i,Y="ontouchstart"in t,N=pt(t,"PointerEvent")!==r,A=Y&&Xt.test(navigator.userAgent),L="touch",H="pen",W="mouse",ht="kinect",mt=25,Q=1,Pt=2,at=4,Ct=8,Ue=1,Se=2,_e=4,pe=8,z=16,vt=Se|_e,Ot=pe|z,Ps=vt|Ot,Gr=["x","y"],rt=["clientX","clientY"];function Gt(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()}Gt.prototype={handler:function(){},init:function(){this.evEl&&C(this.element,this.evEl,this.domHandler),this.evTarget&&C(this.target,this.evTarget,this.domHandler),this.evWin&&C(It(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&D(this.element,this.evEl,this.domHandler),this.evTarget&&D(this.target,this.evTarget,this.domHandler),this.evWin&&D(It(this.element),this.evWin,this.domHandler)}};function Vr(S){var P,M=S.options.inputClass;return M?P=M:N?P=ct:A?P=Zr:Y?P=Ja:P=x,new P(S,qr)}function qr(S,P,M){var I=M.pointers.length,F=M.changedPointers.length,G=P&Q&&I-F===0,dt=P&(at|Ct)&&I-F===0;M.isFirst=!!G,M.isFinal=!!dt,G&&(S.session={}),M.eventType=P,Hr(S,M),S.emit("hammer.input",M),S.recognize(M),S.session.prevInput=M}function Hr(S,P){var M=S.session,I=P.pointers,F=I.length;M.firstInput||(M.firstInput=Jr(P)),F>1&&!M.firstMultiple?M.firstMultiple=Jr(P):F===1&&(M.firstMultiple=!1);var G=M.firstInput,dt=M.firstMultiple,$t=dt?dt.center:G.center,Vt=P.center=As(I);P.timeStamp=l(),P.deltaTime=P.timeStamp-G.timeStamp,P.angle=rn($t,Vt),P.distance=xn($t,Vt),Wr(M,P),P.offsetDirection=ks(P.deltaX,P.deltaY);var Kt=Ms(P.deltaTime,P.deltaX,P.deltaY);P.overallVelocityX=Kt.x,P.overallVelocityY=Kt.y,P.overallVelocity=h(Kt.x)>h(Kt.y)?Kt.x:Kt.y,P.scale=dt?Vn(dt.pointers,I):1,P.rotation=dt?Gn(dt.pointers,I):0,P.maxPointers=M.prevInput?P.pointers.length>M.prevInput.maxPointers?P.pointers.length:M.prevInput.maxPointers:P.pointers.length,qa(M,P);var Te=S.element;$(P.srcEvent.target,Te)&&(Te=P.srcEvent.target),P.target=Te}function Wr(S,P){var M=P.center,I=S.offsetDelta||{},F=S.prevDelta||{},G=S.prevInput||{};(P.eventType===Q||G.eventType===at)&&(F=S.prevDelta={x:G.deltaX||0,y:G.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 qa(S,P){var M=S.lastInterval||P,I=P.timeStamp-M.timeStamp,F,G,dt,$t;if(P.eventType!=Ct&&(I>mt||M.velocity===r)){var Vt=P.deltaX-M.deltaX,Kt=P.deltaY-M.deltaY,Te=Ms(I,Vt,Kt);G=Te.x,dt=Te.y,F=h(Te.x)>h(Te.y)?Te.x:Te.y,$t=ks(Vt,Kt),S.lastInterval=P}else F=M.velocity,G=M.velocityX,dt=M.velocityY,$t=M.direction;P.velocity=F,P.velocityX=G,P.velocityY=dt,P.direction=$t}function Jr(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:l(),pointers:P,center:As(P),deltaX:S.deltaX,deltaY:S.deltaY}}function As(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 Ms(S,P,M){return{x:P/S||0,y:M/S||0}}function ks(S,P){return S===P?Ue:h(S)>=h(P)?S<0?Se:_e:P<0?pe:z}function xn(S,P,M){M||(M=Gr);var I=P[M[0]]-S[M[0]],F=P[M[1]]-S[M[1]];return Math.sqrt(I*I+F*F)}function rn(S,P,M){M||(M=Gr);var I=P[M[0]]-S[M[0]],F=P[M[1]]-S[M[1]];return Math.atan2(F,I)*180/Math.PI}function Gn(S,P){return rn(P[1],P[0],rt)+rn(S[1],S[0],rt)}function Vn(S,P){return xn(P[0],P[1],rt)/xn(S[0],S[1],rt)}var Is={mousedown:Q,mousemove:Pt,mouseup:at},Kr="mousedown",Sn="mousemove mouseup";function x(){this.evEl=Kr,this.evWin=Sn,this.pressed=!1,Gt.apply(this,arguments)}b(x,Gt,{handler:function(P){var M=Is[P.type];M&Q&&P.button===0&&(this.pressed=!0),M&Pt&&P.which!==1&&(M=at),this.pressed&&(M&at&&(this.pressed=!1),this.callback(this.manager,M,{pointers:[P],changedPointers:[P],pointerType:W,srcEvent:P}))}});var k={pointerdown:Q,pointermove:Pt,pointerup:at,pointercancel:Ct,pointerout:Ct},B={2:L,3:H,4:W,5:ht},j="pointerdown",J="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(j="MSPointerDown",J="MSPointerMove MSPointerUp MSPointerCancel");function ct(){this.evEl=j,this.evWin=J,Gt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}b(ct,Gt,{handler:function(P){var M=this.store,I=!1,F=P.type.toLowerCase().replace("ms",""),G=k[F],dt=B[P.pointerType]||P.pointerType,$t=dt==L,Vt=V(M,P.pointerId,"pointerId");G&Q&&(P.button===0||$t)?Vt<0&&(M.push(P),Vt=M.length-1):G&(at|Ct)&&(I=!0),!(Vt<0)&&(M[Vt]=P,this.callback(this.manager,G,{pointers:M,changedPointers:[P],pointerType:dt,srcEvent:P}),I&&M.splice(Vt,1))}});var ot={touchstart:Q,touchmove:Pt,touchend:at,touchcancel:Ct},bt="touchstart",lt="touchstart touchmove touchend touchcancel";function Ce(){this.evTarget=bt,this.evWin=lt,this.started=!1,Gt.apply(this,arguments)}b(Ce,Gt,{handler:function(P){var M=ot[P.type];if(M===Q&&(this.started=!0),!!this.started){var I=_n.call(this,P,M);M&(at|Ct)&&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 _n(S,P){var M=q(S.touches),I=q(S.changedTouches);return P&(at|Ct)&&(M=ft(M.concat(I),"identifier",!0)),[M,I]}var Ha={touchstart:Q,touchmove:Pt,touchend:at,touchcancel:Ct},Wa="touchstart touchmove touchend touchcancel";function Zr(){this.evTarget=Wa,this.targetIds={},Gt.apply(this,arguments)}b(Zr,Gt,{handler:function(P){var M=Ha[P.type],I=q2.call(this,P,M);I&&this.callback(this.manager,M,{pointers:I[0],changedPointers:I[1],pointerType:L,srcEvent:P})}});function q2(S,P){var M=q(S.touches),I=this.targetIds;if(P&(Q|Pt)&&M.length===1)return I[M[0].identifier]=!0,[M,M];var F,G,dt=q(S.changedTouches),$t=[],Vt=this.target;if(G=M.filter(function(Kt){return $(Kt.target,Vt)}),P===Q)for(F=0;F<G.length;)I[G[F].identifier]=!0,F++;for(F=0;F<dt.length;)I[dt[F].identifier]&&$t.push(dt[F]),P&(at|Ct)&&delete I[dt[F].identifier],F++;if($t.length)return[ft(G.concat($t),"identifier",!0),$t]}var H2=2500,Uf=25;function Ja(){Gt.apply(this,arguments);var S=v(this.handler,this);this.touch=new Zr(this.manager,S),this.mouse=new x(this.manager,S),this.primaryTouch=null,this.lastTouches=[]}b(Ja,Gt,{handler:function(P,M,I){var F=I.pointerType==L,G=I.pointerType==W;if(!(G&&I.sourceCapabilities&&I.sourceCapabilities.firesTouchEvents)){if(F)W2.call(this,M,I);else if(G&&J2.call(this,I))return;this.callback(P,M,I)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function W2(S,P){S&Q?(this.primaryTouch=P.changedPointers[0].identifier,$f.call(this,P)):S&(at|Ct)&&$f.call(this,P)}function $f(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 G=I.indexOf(M);G>-1&&I.splice(G,1)};setTimeout(F,H2)}}function J2(S){for(var P=S.srcEvent.clientX,M=S.srcEvent.clientY,I=0;I<this.lastTouches.length;I++){var F=this.lastTouches[I],G=Math.abs(P-F.x),dt=Math.abs(M-F.y);if(G<=Uf&&dt<=Uf)return!0}return!1}var Yf=pt(o.style,"touchAction"),jf=Yf!==r,Xf="compute",Gf="auto",Ka="manipulation",Cn="none",Ds="pan-x",Os="pan-y",Qr=Z2();function Za(S,P){this.manager=S,this.set(P)}Za.prototype={set:function(S){S==Xf&&(S=this.compute()),jf&&this.manager.element.style&&Qr[S]&&(this.manager.element.style[Yf]=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()))}),K2(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=O(I,Cn)&&!Qr[Cn],G=O(I,Os)&&!Qr[Os],dt=O(I,Ds)&&!Qr[Ds];if(F){var $t=S.pointers.length===1,Vt=S.distance<2,Kt=S.deltaTime<250;if($t&&Vt&&Kt)return}if(!(dt&&G)&&(F||G&&M&vt||dt&&M&Ot))return this.preventSrc(P)},preventSrc:function(S){this.manager.session.prevented=!0,S.preventDefault()}};function K2(S){if(O(S,Cn))return Cn;var P=O(S,Ds),M=O(S,Os);return P&&M?Cn:P||M?P?Ds:Os:O(S,Ka)?Ka:Gf}function Z2(){if(!jf)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 ti=1,le=2,qn=4,on=8,$e=on,Rs=16,Ee=32;function Ye(S){this.options=p({},this.defaults,S||{}),this.id=wt(),this.manager=null,this.options.enable=E(this.options.enable,!0),this.state=ti,this.simultaneous={},this.requireFail=[]}Ye.prototype={defaults:{},set:function(S){return p(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=ei(S,this),P[S.id]||(P[S.id]=S,S.recognizeWith(this)),this},dropRecognizeWith:function(S){return d(S,"dropRecognizeWith",this)?this:(S=ei(S,this),delete this.simultaneous[S.id],this)},requireFailure:function(S){if(d(S,"requireFailure",this))return this;var P=this.requireFail;return S=ei(S,this),V(P,S)===-1&&(P.push(S),S.requireFailure(this)),this},dropRequireFailure:function(S){if(d(S,"dropRequireFailure",this))return this;S=ei(S,this);var P=V(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<on&&I(P.options.event+Vf(M)),I(P.options.event),S.additionalEvent&&I(S.additionalEvent),M>=on&&I(P.options.event+Vf(M))},tryEmit:function(S){if(this.canEmit())return this.emit(S);this.state=Ee},canEmit:function(){for(var S=0;S<this.requireFail.length;){if(!(this.requireFail[S].state&(Ee|ti)))return!1;S++}return!0},recognize:function(S){var P=p({},S);if(!w(this.options.enable,[this,P])){this.reset(),this.state=Ee;return}this.state&($e|Rs|Ee)&&(this.state=ti),this.state=this.process(P),this.state&(le|qn|on|Rs)&&this.tryEmit(P)},process:function(S){},getTouchAction:function(){},reset:function(){}};function Vf(S){return S&Rs?"cancel":S&on?"end":S&qn?"move":S&le?"start":""}function qf(S){return S==z?"down":S==pe?"up":S==Se?"left":S==_e?"right":""}function ei(S,P){var M=P.manager;return M?M.get(S):S}function ge(){Ye.apply(this,arguments)}b(ge,Ye,{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&(le|qn),F=this.attrTest(S);return I&&(M&Ct||!F)?P|Rs:I||F?M&at?P|on:P&le?P|qn:le:Ee}});function ni(){ge.apply(this,arguments),this.pX=null,this.pY=null}b(ni,ge,{defaults:{event:"pan",threshold:10,pointers:1,direction:Ps},getTouchAction:function(){var S=this.options.direction,P=[];return S&vt&&P.push(Os),S&Ot&&P.push(Ds),P},directionTest:function(S){var P=this.options,M=!0,I=S.distance,F=S.direction,G=S.deltaX,dt=S.deltaY;return F&P.direction||(P.direction&vt?(F=G===0?Ue:G<0?Se:_e,M=G!=this.pX,I=Math.abs(S.deltaX)):(F=dt===0?Ue:dt<0?pe:z,M=dt!=this.pY,I=Math.abs(S.deltaY))),S.direction=F,M&&I>P.threshold&&F&P.direction},attrTest:function(S){return ge.prototype.attrTest.call(this,S)&&(this.state&le||!(this.state&le)&&this.directionTest(S))},emit:function(S){this.pX=S.deltaX,this.pY=S.deltaY;var P=qf(S.direction);P&&(S.additionalEvent=this.options.event+P),this._super.emit.call(this,S)}});function Qa(){ge.apply(this,arguments)}b(Qa,ge,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Cn]},attrTest:function(S){return this._super.attrTest.call(this,S)&&(Math.abs(S.scale-1)>this.options.threshold||this.state&le)},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 tc(){Ye.apply(this,arguments),this._timer=null,this._input=null}b(tc,Ye,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Gf]},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&(at|Ct)&&!F)this.reset();else if(S.eventType&Q)this.reset(),this._timer=u(function(){this.state=$e,this.tryEmit()},P.time,this);else if(S.eventType&at)return $e;return Ee},reset:function(){clearTimeout(this._timer)},emit:function(S){this.state===$e&&(S&&S.eventType&at?this.manager.emit(this.options.event+"up",S):(this._input.timeStamp=l(),this.manager.emit(this.options.event,this._input)))}});function ec(){ge.apply(this,arguments)}b(ec,ge,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Cn]},attrTest:function(S){return this._super.attrTest.call(this,S)&&(Math.abs(S.rotation)>this.options.threshold||this.state&le)}});function nc(){ge.apply(this,arguments)}b(nc,ge,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:vt|Ot,pointers:1},getTouchAction:function(){return ni.prototype.getTouchAction.call(this)},attrTest:function(S){var P=this.options.direction,M;return P&(vt|Ot)?M=S.overallVelocity:P&vt?M=S.overallVelocityX:P&Ot&&(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&at},emit:function(S){var P=qf(S.offsetDirection);P&&this.manager.emit(this.options.event+P,S),this.manager.emit(this.options.event,S)}});function si(){Ye.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}b(si,Ye,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Ka]},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&Q&&this.count===0)return this.failTimeout();if(I&&F&&M){if(S.eventType!=at)return this.failTimeout();var G=this.pTime?S.timeStamp-this.pTime<P.interval:!0,dt=!this.pCenter||xn(this.pCenter,S.center)<P.posThreshold;this.pTime=S.timeStamp,this.pCenter=S.center,!dt||!G?this.count=1:this.count+=1,this._input=S;var $t=this.count%P.taps;if($t===0)return this.hasRequireFailures()?(this._timer=u(function(){this.state=$e,this.tryEmit()},P.interval,this),le):$e}return Ee},failTimeout:function(){return this._timer=u(function(){this.state=Ee},this.options.interval,this),Ee},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==$e&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function je(S,P){return P=P||{},P.recognizers=E(P.recognizers,je.defaults.preset),new sc(S,P)}je.VERSION="2.0.7",je.defaults={domEvents:!1,touchAction:Xf,enable:!0,inputTarget:null,inputClass:null,preset:[[ec,{enable:!1}],[Qa,{enable:!1},["rotate"]],[nc,{direction:vt}],[ni,{direction:vt},["swipe"]],[si],[si,{event:"doubletap",taps:2},["tap"]],[tc]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var Q2=1,Hf=2;function sc(S,P){this.options=p({},je.defaults,P||{}),this.options.inputTarget=this.options.inputTarget||S,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=S,this.input=Vr(this),this.touchAction=new Za(this,this.options.touchAction),Wf(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)}sc.prototype={set:function(S){return p(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?Hf:Q2},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&$e)&&(F=P.curRecognizer=null);for(var G=0;G<I.length;)M=I[G],P.stopped!==Hf&&(!F||M==F||M.canRecognizeWith(F))?M.recognize(S):M.reset(),!F&&M.state&(le|qn|on)&&(F=P.curRecognizer=M),G++}},get:function(S){if(S instanceof Ye)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=V(P,S);M!==-1&&(P.splice(M,1),this.touchAction.update())}return this},on:function(S,P){if(S!==r&&P!==r){var M=this.handlers;return f(U(S),function(I){M[I]=M[I]||[],M[I].push(P)}),this}},off:function(S,P){if(S!==r){var M=this.handlers;return f(U(S),function(I){P?M[I]&&M[I].splice(V(M[I],P),1):delete M[I]}),this}},emit:function(S,P){this.options.domEvents&&tx(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&&Wf(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function Wf(S,P){var M=S.element;if(M.style){var I;f(S.options.cssProps,function(F,G){I=pt(M.style,G),P?(S.oldCssProps[I]=M.style[I],M.style[I]=F):M.style[I]=S.oldCssProps[I]||""}),P||(S.oldCssProps={})}}function tx(S,P){var M=e.createEvent("Event");M.initEvent(S,!0,!0),M.gesture=P,P.target.dispatchEvent(M)}p(je,{INPUT_START:Q,INPUT_MOVE:Pt,INPUT_END:at,INPUT_CANCEL:Ct,STATE_POSSIBLE:ti,STATE_BEGAN:le,STATE_CHANGED:qn,STATE_ENDED:on,STATE_RECOGNIZED:$e,STATE_CANCELLED:Rs,STATE_FAILED:Ee,DIRECTION_NONE:Ue,DIRECTION_LEFT:Se,DIRECTION_RIGHT:_e,DIRECTION_UP:pe,DIRECTION_DOWN:z,DIRECTION_HORIZONTAL:vt,DIRECTION_VERTICAL:Ot,DIRECTION_ALL:Ps,Manager:sc,Input:Gt,TouchAction:Za,TouchInput:Zr,MouseInput:x,PointerEventInput:ct,TouchMouseInput:Ja,SingleTouchInput:Ce,Recognizer:Ye,AttrRecognizer:ge,Tap:si,Pan:ni,Swipe:nc,Pinch:Qa,Rotate:ec,Press:tc,on:C,off:D,each:f,merge:y,extend:_,assign:p,inherit:b,bindFn:v,prefixed:pt});var ex=typeof t<"u"?t:typeof self<"u"?self:{};ex.Hammer=je,typeof r=="function"&&r.amd?r(function(){return je}):s.exports?s.exports=je:t[n]=je})(window,document,"Hammer")})(rl);var r0=rl.exports;const At=tl(r0);var co=function(s,t){return co=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])},co(s,t)};function we(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");co(s,t);function e(){this.constructor=s}s.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function i0(s,t,e,n){function r(i){return i instanceof e?i:new e(function(o){o(i)})}return new(e||(e=Promise))(function(i,o){function a(l){try{h(n.next(l))}catch(u){o(u)}}function c(l){try{h(n.throw(l))}catch(u){o(u)}}function h(l){l.done?i(l.value):r(l.value).then(a,c)}h((n=n.apply(s,t||[])).next())})}function il(s,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,r,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(l){return c([h,l])}}function c(h){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,h[0]&&(e=0)),e;)try{if(n=1,r&&(i=h[0]&2?r.return:h[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,h[1])).done)return i;switch(r=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++,r=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(s,e)}catch(l){h=[6,l],r=0}finally{n=i=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}}function fn(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 Oe(s,t){var e=typeof Symbol=="function"&&s[Symbol.iterator];if(!e)return s;var n=e.call(s),r,i=[],o;try{for(;(t===void 0||t-- >0)&&!(r=n.next()).done;)i.push(r.value)}catch(a){o={error:a}}finally{try{r&&!r.done&&(e=n.return)&&e.call(n)}finally{if(o)throw o.error}}return i}function Ve(s,t,e){if(e||arguments.length===2)for(var n=0,r=t.length,i;n<r;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return s.concat(i||Array.prototype.slice.call(t))}function Ln(s){return this instanceof Ln?(this.v=s,this):new Ln(s)}function o0(s,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=e.apply(s,t||[]),r,i=[];return r=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),r[Symbol.asyncIterator]=function(){return this},r;function o(f){return function(m){return Promise.resolve(m).then(f,u)}}function a(f,m){n[f]&&(r[f]=function(p){return new Promise(function(_,y){i.push([f,p,_,y])>1||c(f,p)})},m&&(r[f]=m(r[f])))}function c(f,m){try{h(n[f](m))}catch(p){d(i[0][3],p)}}function h(f){f.value instanceof Ln?Promise.resolve(f.value.v).then(l,u):d(i[0][2],f)}function l(f){c("next",f)}function u(f){c("throw",f)}function d(f,m){f(m),i.shift(),i.length&&c(i[0][0],i[0][1])}}function a0(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 fn=="function"?fn(s):s[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(i){e[i]=s[i]&&function(o){return new Promise(function(a,c){o=s[i](o),r(a,c,o.done,o.value)})}}function r(i,o,a,c){Promise.resolve(c).then(function(h){i({value:h,done:a})},o)}}typeof SuppressedError=="function"&&SuppressedError;function gt(s){return typeof s=="function"}function ho(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 lo=ho(function(s){return function(e){s(this),this.message=e?e.length+` errors occurred during unsubscription:
64
- `+e.map(function(n,r){return r+1+") "+n.toString()}).join(`
65
- `):"",this.name="UnsubscriptionError",this.errors=e}});function ss(s,t){if(s){var e=s.indexOf(t);0<=e&&s.splice(e,1)}}var zn=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,r,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=fn(o),c=a.next();!c.done;c=a.next()){var h=c.value;h.remove(this)}}catch(p){t={error:p}}finally{try{c&&!c.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var l=this.initialTeardown;if(gt(l))try{l()}catch(p){i=p instanceof lo?p.errors:[p]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var d=fn(u),f=d.next();!f.done;f=d.next()){var m=f.value;try{cl(m)}catch(p){i=i??[],p instanceof lo?i=Ve(Ve([],Oe(i)),Oe(p.errors)):i.push(p)}}}catch(p){n={error:p}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}}if(i)throw new lo(i)}},s.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)cl(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)&&ss(e,t)},s.prototype.remove=function(t){var e=this._finalizers;e&&ss(e,t),t instanceof s&&t._removeParent(this)},s.EMPTY=function(){var t=new s;return t.closed=!0,t}(),s}(),ol=zn.EMPTY;function al(s){return s instanceof zn||s&&"closed"in s&&gt(s.remove)&&gt(s.add)&&gt(s.unsubscribe)}function cl(s){gt(s)?s():s.unsubscribe()}var hl={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},uo={setTimeout:function(s,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];var r=uo.delegate;return r?.setTimeout?r.setTimeout.apply(r,Ve([s,t],Oe(e))):setTimeout.apply(void 0,Ve([s,t],Oe(e)))},clearTimeout:function(s){var t=uo.delegate;return(t?.clearTimeout||clearTimeout)(s)},delegate:void 0};function ll(s){uo.setTimeout(function(){throw s})}function rs(){}function yr(s){s()}var fo=function(s){we(t,s);function t(e){var n=s.call(this)||this;return n.isStopped=!1,e?(n.destination=e,al(e)&&e.add(n)):n.destination=u0,n}return t.create=function(e,n,r){return new Nn(e,n,r)},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}(zn),c0=Function.prototype.bind;function mo(s,t){return c0.call(s,t)}var h0=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){br(n)}},s.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(n){br(n)}else br(t)},s.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){br(e)}},s}(),Nn=function(s){we(t,s);function t(e,n,r){var i=s.call(this)||this,o;if(gt(e)||!e)o={next:e??void 0,error:n??void 0,complete:r??void 0};else{var a;i&&hl.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return i.unsubscribe()},o={next:e.next&&mo(e.next,a),error:e.error&&mo(e.error,a),complete:e.complete&&mo(e.complete,a)}):o=e}return i.destination=new h0(o),i}return t}(fo);function br(s){ll(s)}function l0(s){throw s}var u0={closed:!0,next:rs,error:l0,complete:rs},po=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function dn(s){return s}function f0(s){return s.length===0?dn:s.length===1?s[0]:function(e){return s.reduce(function(n,r){return r(n)},e)}}var Mt=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 r=this,i=m0(t)?t:new Nn(t,e,n);return yr(function(){var o=r,a=o.operator,c=o.source;i.add(a?a.call(i,c):c?r._subscribe(i):r._trySubscribe(i))}),i},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=ul(e),new e(function(r,i){var o=new Nn({next:function(a){try{t(a)}catch(c){i(c),o.unsubscribe()}},error:i,complete:r});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[po]=function(){return this},s.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return f0(t)(this)},s.prototype.toPromise=function(t){var e=this;return t=ul(t),new t(function(n,r){var i;e.subscribe(function(o){return i=o},function(o){return r(o)},function(){return n(i)})})},s.create=function(t){return new s(t)},s}();function ul(s){var t;return(t=s??hl.Promise)!==null&&t!==void 0?t:Promise}function d0(s){return s&&gt(s.next)&&gt(s.error)&&gt(s.complete)}function m0(s){return s&&s instanceof fo||d0(s)&&al(s)}function p0(s){return gt(s?.lift)}function Zt(s){return function(t){if(p0(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 Rt(s,t,e,n,r){return new g0(s,t,e,n,r)}var g0=function(s){we(t,s);function t(e,n,r,i,o,a){var c=s.call(this,e)||this;return c.onFinalize=o,c.shouldUnsubscribe=a,c._next=n?function(h){try{n(h)}catch(l){e.error(l)}}:s.prototype._next,c._error=i?function(h){try{i(h)}catch(l){e.error(l)}finally{this.unsubscribe()}}:s.prototype._error,c._complete=r?function(){try{r()}catch(h){e.error(h)}finally{this.unsubscribe()}}:s.prototype._complete,c}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}(fo),y0=ho(function(s){return function(){s(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),qe=function(s){we(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 fl(this,this);return n.operator=e,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new y0},t.prototype.next=function(e){var n=this;yr(function(){var r,i;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var o=fn(n.currentObservers),a=o.next();!a.done;a=o.next()){var c=a.value;c.next(e)}}catch(h){r={error:h}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}}})},t.prototype.error=function(e){var n=this;yr(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=e;for(var r=n.observers;r.length;)r.shift().error(e)}})},t.prototype.complete=function(){var e=this;yr(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,r=this,i=r.hasError,o=r.isStopped,a=r.observers;return i||o?ol:(this.currentObservers=null,a.push(e),new zn(function(){n.currentObservers=null,ss(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var n=this,r=n.hasError,i=n.thrownError,o=n.isStopped;r?e.error(i):o&&e.complete()},t.prototype.asObservable=function(){var e=new Mt;return e.source=this,e},t.create=function(e,n){return new fl(e,n)},t}(Mt),fl=function(s){we(t,s);function t(e,n){var r=s.call(this)||this;return r.destination=e,r.source=n,r}return t.prototype.next=function(e){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.next)===null||r===void 0||r.call(n,e)},t.prototype.error=function(e){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.error)===null||r===void 0||r.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,r;return(r=(n=this.source)===null||n===void 0?void 0:n.subscribe(e))!==null&&r!==void 0?r:ol},t}(qe),dl=function(s){we(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,r=e.thrownError,i=e._value;if(n)throw r;return this._throwIfClosed(),i},t.prototype.next=function(e){s.prototype.next.call(this,this._value=e)},t}(qe),go={now:function(){return(go.delegate||Date).now()},delegate:void 0},b0=function(s){we(t,s);function t(e,n,r){e===void 0&&(e=1/0),n===void 0&&(n=1/0),r===void 0&&(r=go);var i=s.call(this)||this;return i._bufferSize=e,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,n),i}return t.prototype.next=function(e){var n=this,r=n.isStopped,i=n._buffer,o=n._infiniteTimeWindow,a=n._timestampProvider,c=n._windowTime;r||(i.push(e),!o&&i.push(a.now()+c)),this._trimBuffer(),s.prototype.next.call(this,e)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(e),r=this,i=r._infiniteTimeWindow,o=r._buffer,a=o.slice(),c=0;c<a.length&&!e.closed;c+=i?1:2)e.next(a[c]);return this._checkFinalizedStatuses(e),n},t.prototype._trimBuffer=function(){var e=this,n=e._bufferSize,r=e._timestampProvider,i=e._buffer,o=e._infiniteTimeWindow,a=(o?1:2)*n;if(n<1/0&&a<i.length&&i.splice(0,i.length-a),!o){for(var c=r.now(),h=0,l=1;l<i.length&&i[l]<=c;l+=2)h=l;h&&i.splice(0,h+1)}},t}(qe),w0=function(s){we(t,s);function t(e,n){return s.call(this)||this}return t.prototype.schedule=function(e,n){return this},t}(zn),wr={setInterval:function(s,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];var r=wr.delegate;return r?.setInterval?r.setInterval.apply(r,Ve([s,t],Oe(e))):setInterval.apply(void 0,Ve([s,t],Oe(e)))},clearInterval:function(s){var t=wr.delegate;return(t?.clearInterval||clearInterval)(s)},delegate:void 0},v0=function(s){we(t,s);function t(e,n){var r=s.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return t.prototype.schedule=function(e,n){var r;if(n===void 0&&(n=0),this.closed)return this;this.state=e;var i=this.id,o=this.scheduler;return i!=null&&(this.id=this.recycleAsyncId(o,i,n)),this.pending=!0,this.delay=n,this.id=(r=this.id)!==null&&r!==void 0?r:this.requestAsyncId(o,this.id,n),this},t.prototype.requestAsyncId=function(e,n,r){return r===void 0&&(r=0),wr.setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,n,r){if(r===void 0&&(r=0),r!=null&&this.delay===r&&this.pending===!1)return n;n!=null&&wr.clearInterval(n)},t.prototype.execute=function(e,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,n);if(r)return r;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,n){var r=!1,i;try{this.work(e)}catch(o){r=!0,i=o||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),i},t.prototype.unsubscribe=function(){if(!this.closed){var e=this,n=e.id,r=e.scheduler,i=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,ss(i,this),n!=null&&(this.id=this.recycleAsyncId(r,n,null)),this.delay=null,s.prototype.unsubscribe.call(this)}},t}(w0),ml=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=go.now,s}(),x0=function(s){we(t,s);function t(e,n){n===void 0&&(n=ml.now);var r=s.call(this,e,n)||this;return r.actions=[],r._active=!1,r}return t.prototype.flush=function(e){var n=this.actions;if(this._active){n.push(e);return}var r;this._active=!0;do if(r=e.execute(e.state,e.delay))break;while(e=n.shift());if(this._active=!1,r){for(;e=n.shift();)e.unsubscribe();throw r}},t}(ml),yo=new x0(v0),S0=yo,pl=new Mt(function(s){return s.complete()});function gl(s){return s&&gt(s.schedule)}function bo(s){return s[s.length-1]}function _0(s){return gt(bo(s))?s.pop():void 0}function is(s){return gl(bo(s))?s.pop():void 0}function C0(s,t){return typeof bo(s)=="number"?s.pop():t}var wo=function(s){return s&&typeof s.length=="number"&&typeof s!="function"};function yl(s){return gt(s?.then)}function bl(s){return gt(s[po])}function wl(s){return Symbol.asyncIterator&&gt(s?.[Symbol.asyncIterator])}function vl(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 E0(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var xl=E0();function Sl(s){return gt(s?.[xl])}function _l(s){return o0(this,arguments,function(){var e,n,r,i;return il(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,Ln(e.read())];case 3:return n=o.sent(),r=n.value,i=n.done,i?[4,Ln(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,Ln(r)];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 Cl(s){return gt(s?.getReader)}function Ft(s){if(s instanceof Mt)return s;if(s!=null){if(bl(s))return T0(s);if(wo(s))return P0(s);if(yl(s))return A0(s);if(wl(s))return El(s);if(Sl(s))return M0(s);if(Cl(s))return k0(s)}throw vl(s)}function T0(s){return new Mt(function(t){var e=s[po]();if(gt(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function P0(s){return new Mt(function(t){for(var e=0;e<s.length&&!t.closed;e++)t.next(s[e]);t.complete()})}function A0(s){return new Mt(function(t){s.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,ll)})}function M0(s){return new Mt(function(t){var e,n;try{for(var r=fn(s),i=r.next();!i.done;i=r.next()){var o=i.value;if(t.next(o),t.closed)return}}catch(a){e={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}t.complete()})}function El(s){return new Mt(function(t){I0(s,t).catch(function(e){return t.error(e)})})}function k0(s){return El(_l(s))}function I0(s,t){var e,n,r,i;return i0(this,void 0,void 0,function(){var o,a;return il(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),e=a0(s),c.label=1;case 1:return[4,e.next()];case 2:if(n=c.sent(),!!n.done)return[3,4];if(o=n.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(),r={error:a},[3,11];case 6:return c.trys.push([6,,9,10]),n&&!n.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(r)throw r.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function Re(s,t,e,n,r){n===void 0&&(n=0),r===void 0&&(r=!1);var i=t.schedule(function(){e(),r?s.add(this.schedule(null,n)):this.unsubscribe()},n);if(s.add(i),!r)return i}function Tl(s,t){return t===void 0&&(t=0),Zt(function(e,n){e.subscribe(Rt(n,function(r){return Re(n,s,function(){return n.next(r)},t)},function(){return Re(n,s,function(){return n.complete()},t)},function(r){return Re(n,s,function(){return n.error(r)},t)}))})}function vo(s,t){return t===void 0&&(t=0),Zt(function(e,n){n.add(s.schedule(function(){return e.subscribe(n)},t))})}function D0(s,t){return Ft(s).pipe(vo(t),Tl(t))}function O0(s,t){return Ft(s).pipe(vo(t),Tl(t))}function R0(s,t){return new Mt(function(e){var n=0;return t.schedule(function(){n===s.length?e.complete():(e.next(s[n++]),e.closed||this.schedule())})})}function L0(s,t){return new Mt(function(e){var n;return Re(e,t,function(){n=s[xl](),Re(e,t,function(){var r,i,o;try{r=n.next(),i=r.value,o=r.done}catch(a){e.error(a);return}o?e.complete():e.next(i)},0,!0)}),function(){return gt(n?.return)&&n.return()}})}function Pl(s,t){if(!s)throw new Error("Iterable cannot be null");return new Mt(function(e){Re(e,t,function(){var n=s[Symbol.asyncIterator]();Re(e,t,function(){n.next().then(function(r){r.done?e.complete():e.next(r.value)})},0,!0)})})}function z0(s,t){return Pl(_l(s),t)}function N0(s,t){if(s!=null){if(bl(s))return D0(s,t);if(wo(s))return R0(s,t);if(yl(s))return O0(s,t);if(wl(s))return Pl(s,t);if(Sl(s))return L0(s,t);if(Cl(s))return z0(s,t)}throw vl(s)}function os(s,t){return t?N0(s,t):Ft(s)}function F0(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];var e=is(s);return os(s,e)}var B0=ho(function(s){return function(){s(this),this.name="EmptyError",this.message="no elements in sequence"}});function U0(s,t){var e=typeof t=="object";return new Promise(function(n,r){var i=new Nn({next:function(o){n(o),i.unsubscribe()},error:r,complete:function(){e?n(t.defaultValue):r(new B0)}});s.subscribe(i)})}function $0(s){return s instanceof Date&&!isNaN(s)}function kt(s,t){return Zt(function(e,n){var r=0;e.subscribe(Rt(n,function(i){n.next(s.call(t,i,r++))}))})}var Y0=Array.isArray;function j0(s,t){return Y0(t)?s.apply(void 0,Ve([],Oe(t))):s(t)}function xo(s){return kt(function(t){return j0(s,t)})}var X0=Array.isArray,G0=Object.getPrototypeOf,V0=Object.prototype,q0=Object.keys;function H0(s){if(s.length===1){var t=s[0];if(X0(t))return{args:t,keys:null};if(W0(t)){var e=q0(t);return{args:e.map(function(n){return t[n]}),keys:e}}}return{args:s,keys:null}}function W0(s){return s&&typeof s=="object"&&G0(s)===V0}function J0(s,t){return s.reduce(function(e,n,r){return e[n]=t[r],e},{})}function K0(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];var e=is(s),n=_0(s),r=H0(s),i=r.args,o=r.keys;if(i.length===0)return os([],e);var a=new Mt(Z0(i,e,o?function(c){return J0(o,c)}:dn));return n?a.pipe(xo(n)):a}function Z0(s,t,e){return e===void 0&&(e=dn),function(n){Al(t,function(){for(var r=s.length,i=new Array(r),o=r,a=r,c=function(l){Al(t,function(){var u=os(s[l],t),d=!1;u.subscribe(Rt(n,function(f){i[l]=f,d||(d=!0,a--),a||n.next(e(i.slice()))},function(){--o||n.complete()}))},n)},h=0;h<r;h++)c(h)},n)}}function Al(s,t,e){s?Re(e,s,t):t()}function Q0(s,t,e,n,r,i,o,a){var c=[],h=0,l=0,u=!1,d=function(){u&&!c.length&&!h&&t.complete()},f=function(p){return h<n?m(p):c.push(p)},m=function(p){i&&t.next(p),h++;var _=!1;Ft(e(p,l++)).subscribe(Rt(t,function(y){r?.(y),i?f(y):t.next(y)},function(){_=!0},void 0,function(){if(_)try{h--;for(var y=function(){var b=c.shift();o?Re(t,o,function(){return m(b)}):m(b)};c.length&&h<n;)y();d()}catch(b){t.error(b)}}))};return s.subscribe(Rt(t,f,function(){u=!0,d()})),function(){a?.()}}function So(s,t,e){return e===void 0&&(e=1/0),gt(t)?So(function(n,r){return kt(function(i,o){return t(n,i,r,o)})(Ft(s(n,r)))},e):(typeof t=="number"&&(e=t),Zt(function(n,r){return Q0(n,r,s,e)}))}function Ml(s){return s===void 0&&(s=1/0),So(dn,s)}function ty(){return Ml(1)}function kl(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];return ty()(os(s,is(s)))}var ey=["addListener","removeListener"],ny=["addEventListener","removeEventListener"],sy=["on","off"];function _o(s,t,e,n){if(gt(e)&&(n=e,e=void 0),n)return _o(s,t,e).pipe(xo(n));var r=Oe(oy(s)?ny.map(function(a){return function(c){return s[a](t,c,e)}}):ry(s)?ey.map(Il(s,t)):iy(s)?sy.map(Il(s,t)):[],2),i=r[0],o=r[1];if(!i&&wo(s))return So(function(a){return _o(a,t,e)})(Ft(s));if(!i)throw new TypeError("Invalid event target");return new Mt(function(a){var c=function(){for(var h=[],l=0;l<arguments.length;l++)h[l]=arguments[l];return a.next(1<h.length?h:h[0])};return i(c),function(){return o(c)}})}function Il(s,t){return function(e){return function(n){return s[e](t,n)}}}function ry(s){return gt(s.addListener)&&gt(s.removeListener)}function iy(s){return gt(s.on)&&gt(s.off)}function oy(s){return gt(s.addEventListener)&&gt(s.removeEventListener)}function Tt(s,t,e){return e?Tt(s,t).pipe(xo(e)):new Mt(function(n){var r=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return n.next(o.length===1?o[0]:o)},i=s(r);return gt(t)?function(){return t(r,i)}:void 0})}function ay(s,t,e){s===void 0&&(s=0),e===void 0&&(e=S0);var n=-1;return t!=null&&(gl(t)?e=t:n=t),new Mt(function(r){var i=$0(s)?+s-e.now():s;i<0&&(i=0);var o=0;return e.schedule(function(){r.closed||(r.next(o++),0<=n?this.schedule(void 0,n):r.complete())},i)})}function Dl(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];var e=is(s),n=C0(s,1/0),r=s;return r.length?r.length===1?Ft(r[0]):Ml(n)(os(r,e)):pl}var cy=Array.isArray;function hy(s){return s.length===1&&cy(s[0])?s[0]:s}function Ol(s,t){return Zt(function(e,n){var r=0;e.subscribe(Rt(n,function(i){return s.call(t,i,r++)&&n.next(i)}))})}function vr(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];return s=hy(s),s.length===1?Ft(s[0]):new Mt(ly(s))}function ly(s){return function(t){for(var e=[],n=function(i){e.push(Ft(s[i]).subscribe(Rt(t,function(o){if(e){for(var a=0;a<e.length;a++)a!==i&&e[a].unsubscribe();e=null}t.next(o)})))},r=0;e&&!t.closed&&r<s.length;r++)n(r)}}function He(s,t){return t===void 0&&(t=dn),s=s??uy,Zt(function(e,n){var r,i=!0;e.subscribe(Rt(n,function(o){var a=t(o);(i||!s(r,a))&&(i=!1,r=a,n.next(o))}))})}function uy(s,t){return s===t}function Rl(s,t){return t?function(e){return e.pipe(Rl(function(n,r){return Ft(s(n,r)).pipe(kt(function(i,o){return t(n,i,r,o)}))}))}:Zt(function(e,n){var r=0,i=null,o=!1;e.subscribe(Rt(n,function(a){i||(i=Rt(n,void 0,function(){i=null,o&&n.complete()}),Ft(s(a,r++)).subscribe(i))},function(){o=!0,!i&&n.complete()}))})}function fy(s){s===void 0&&(s={});var t=s.connector,e=t===void 0?function(){return new qe}:t,n=s.resetOnError,r=n===void 0?!0:n,i=s.resetOnComplete,o=i===void 0?!0:i,a=s.resetOnRefCountZero,c=a===void 0?!0:a;return function(h){var l,u,d,f=0,m=!1,p=!1,_=function(){u?.unsubscribe(),u=void 0},y=function(){_(),l=d=void 0,m=p=!1},b=function(){var v=l;y(),v?.unsubscribe()};return Zt(function(v,w){f++,!p&&!m&&_();var E=d=d??e();w.add(function(){f--,f===0&&!p&&!m&&(u=Co(b,c))}),E.subscribe(w),!l&&f>0&&(l=new Nn({next:function(C){return E.next(C)},error:function(C){p=!0,_(),u=Co(y,r,C),E.error(C)},complete:function(){m=!0,_(),u=Co(y,o),E.complete()}}),Ft(v).subscribe(l))})(h)}}function Co(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 r=new Nn({next:function(){r.unsubscribe(),s()}});return Ft(t.apply(void 0,Ve([],Oe(e)))).subscribe(r)}}function dy(s,t,e){var n,r,i,o,a=!1;return s&&typeof s=="object"?(n=s.bufferSize,o=n===void 0?1/0:n,r=s.windowTime,t=r===void 0?1/0:r,i=s.refCount,a=i===void 0?!1:i,e=s.scheduler):o=s??1/0,fy({connector:function(){return new b0(o,t,e)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:a})}function mn(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];var e=is(s);return Zt(function(n,r){(e?kl(s,n,e):kl(s,n)).subscribe(r)})}function xr(s,t){return Zt(function(e,n){var r=null,i=0,o=!1,a=function(){return o&&!r&&n.complete()};e.subscribe(Rt(n,function(c){r?.unsubscribe();var h=0,l=i++;Ft(s(c,l)).subscribe(r=Rt(n,function(u){return n.next(t?t(c,u,l,h++):u)},function(){r=null,a()}))},function(){o=!0,a()}))})}function my(){return xr(dn)}function Eo(s){return Zt(function(t,e){Ft(s).subscribe(Rt(e,function(){return e.complete()},rs)),!e.closed&&t.subscribe(e)})}function pn(s,t,e){var n=gt(s)||t||e?{next:s,error:t,complete:e}:s;return n?Zt(function(r,i){var o;(o=n.subscribe)===null||o===void 0||o.call(n);var a=!0;r.subscribe(Rt(i,function(c){var h;(h=n.next)===null||h===void 0||h.call(n,c),i.next(c)},function(){var c;a=!1,(c=n.complete)===null||c===void 0||c.call(n),i.complete()},function(c){var h;a=!1,(h=n.error)===null||h===void 0||h.call(n,c),i.error(c)},function(){var c,h;a&&((c=n.unsubscribe)===null||c===void 0||c.call(n)),(h=n.finalize)===null||h===void 0||h.call(n)}))}):dn}function py(s,t){return Zt(function(e,n){var r=t??{},i=r.leading,o=i===void 0?!0:i,a=r.trailing,c=a===void 0?!1:a,h=!1,l=null,u=null,d=!1,f=function(){u?.unsubscribe(),u=null,c&&(_(),d&&n.complete())},m=function(){u=null,d&&n.complete()},p=function(y){return u=Ft(s(y)).subscribe(Rt(n,f,m))},_=function(){if(h){h=!1;var y=l;l=null,n.next(y),!d&&p(y)}};e.subscribe(Rt(n,function(y){h=!0,l=y,!(u&&!u.closed)&&(o?_():p(y))},function(){d=!0,!(c&&h&&u&&!u.closed)&&n.complete()}))})}function gy(s,t,e){t===void 0&&(t=yo);var n=ay(s,t);return py(function(){return n},e)}function yy(s,t){return Zt(function(e,n){var r=[],i=function(o){for(;0<r.length;)r.shift().error(o);n.error(o)};Ft(s).subscribe(Rt(n,function(o){var a=new qe;r.push(a);var c=new zn,h=function(){ss(r,a),a.complete(),c.unsubscribe()},l;try{l=Ft(t(o))}catch(u){i(u);return}n.next(a.asObservable()),c.add(l.subscribe(Rt(n,h,rs,i)))},rs)),e.subscribe(Rt(n,function(o){var a,c,h=r.slice();try{for(var l=fn(h),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&&(c=l.return)&&c.call(l)}finally{if(a)throw a.error}}},function(){for(;0<r.length;)r.shift().complete();n.complete()},i,function(){for(;0<r.length;)r.shift().unsubscribe()}))})}function by(s){return s.toElement?s.toElement:s.currentTarget?s.currentTarget:s.srcElement?s.srcElement:null}function yt(s,t,e,n=!1){const r=async i=>{await e(i)};try{s.addEventListener(t,r,n)}catch{s.attachEvent("on"+t,r)}return()=>{try{s.removeEventListener(t,r,n)}catch{s.detachEvent("on"+t,r)}}}function wy(s,t,e,n,r=!1){return yt(s||document.body,e,i=>{i.target===t&&n(i)},r)}function vy(s){s.replaceWith(s.cloneNode(!0))}function st(s,t,e=!1){return _o(s,t,{capture:e})}function xy(s){const t=Tt(e=>s.register(e),(e,n)=>{s.unregister?.(e,...n||[])},(...e)=>[...e]);return s.share?t.pipe(dy({bufferSize:s.bufferSize||1,refCount:!0})):t}function We(s){if(s.preventDefault){s.preventDefault();return}try{s.returnValue=!1}catch{}}function Ll(s){if(s.stopPropagation){s.stopPropagation();return}try{s.cancelBubble=!0}catch{}}const Sy=["click","dblclick","wheel","contextmenu","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave"],_y=["keydown","keyup","keypress"],Cy=["touchstart","touchend","touchcancel","touchmove"],Ey=["pointerdown","pointerup","pointercancel","pointermove"],Ty=["dragstart","drag","dragend","dragenter","dragover","dragleave","drop"],Py=["change"];function Sr(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);Sy.includes(s)?e=new MouseEvent(s,n):_y.includes(s)?e=new KeyboardEvent(s,n):Cy.includes(s)?e=new TouchEvent(s,n):Ey.includes(s)?e=new PointerEvent(s,n):Ty.includes(s)?e=new DragEvent(s,n):Py.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 To(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 Ay(s,t){const e=s.target,n=Sr(t);To(e,t,n)}function My(s){const t=s.target,e="click";if(!/(SELECT|INPUT|TEXTAREA)/i.test(t.tagName)){const n=Sr(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,To(t,e,n)}}function ky(s,t){const e=s.changedTouches[0];return Sr(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 Iy(s,t,e,n,r){const i=t/e;let o=0,a=0;switch(s){case"aspectFit":i>=1?(o=n,a=o/i,a>r&&(a=r,o=a*i)):(a=r,o=a*i,o>n&&(o=n,a=o/i));break;case"aspectFill":i>=1?(a=r,o=a*i):(o=n,a=o/i);break;case"widthFix":o=n,a=o/i;break;case"heightFix":a=r,o=a*i;break;case"scaleToFill":default:o=n,a=r;break}return{width:o,height:a}}function zl(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 Dy=s=>{const t=s.width,e=s.height,n=t*e*3,r=n+54,i=[66,77,r&255,r>>8&255,r>>16&255,r>>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,c=s.data;let h="";const l=t<<2;let u=e;const d=String.fromCharCode;do{const m=l*(u-1);let p="";for(let _=0;_<t;_++){const y=_<<2;p+=d(c[m+y+2])+d(c[m+y+1])+d(c[m+y])}for(let _=0;_<a;_++)p+=String.fromCharCode(0);h+=p}while(--u);function f(m){if(!window.btoa)throw"btoa undefined";let p="";if(typeof m=="string")p=m;else for(let _=0;_<m.length;_++)p+=String.fromCharCode(m[_]);return btoa(p)}return f(i.concat(o))+f(h)};function Oy(s){const{width:t,height:e}=s,n=document.createElement("canvas"),r=n.getContext("2d");return n.width=t,n.height=e,r.putImageData(s,0,0,0,0,t,e),n.toDataURL("image/png")}const Ry=(s,t,e)=>{const{width:n,height:r}=s,i=document.createElement("canvas"),o=i.getContext("2d");i.width=n,i.height=r,o.putImageData(s,0,0,0,0,n,r);const a=`image/${t?t.toLowerCase():"png"}`;i.toBlob(c=>{e?.(null,c)},a,1)};function Ly(s,t){return createImageBitmap(s,t)}function zy(s){const t=[],e=[],n=[];let r=0;for(let c=0,h=s.data.length;c<h;c+=4)t[r]=s.data[c],e[r]=s.data[c+1],n[r]=s.data[c+2],r+=1;const i=Po(t),o=Po(e),a=Po(n);return"rgb("+i+","+o+","+a+")"}function Po(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 r=0;for(let a=0;a<e.length;a++){r=0;for(let c=0;c<e.length;c++)e[a]===e[c]&&(r+=1),n[a]=r}const i=Math.max.apply(null,n);let o=0;for(;o<n.length;o++)if(n[o]===i)return;return e[o]}const Ny=s=>{const{data:t,width:e,height:n}=s,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;r[c]=t[(o*e+e-a-1)*4],r[c+1]=t[(o*e+e-a-1)*4+1],r[c+2]=t[(o*e+e-a-1)*4+2],r[c+3]=t[(o*e+e-a-1)*4+3]}return new ImageData(r,e,n)},Fy=s=>{const{data:t,width:e,height:n}=s,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;r[c]=t[((n-o-1)*e+a)*4],r[c+1]=t[((n-o-1)*e+a)*4+1],r[c+2]=t[((n-o-1)*e+a)*4+2],r[c+3]=t[((n-o-1)*e+a)*4+3]}return new ImageData(r,e,n)},By=s=>{const{data:t,width:e,height:n}=s,r=new Uint8ClampedArray(t.length);for(let o=0;o<e;o++)for(let a=0;a<n;a++){const c=(o*n+a)*4;r[c]=t[(a*e+e-o-1)*4],r[c+1]=t[(a*e+e-o-1)*4+1],r[c+2]=t[(a*e+e-o-1)*4+2],r[c+3]=t[(a*e+e-o-1)*4+3]}return new ImageData(r,n,e)},Uy=s=>{const{data:t,width:e,height:n}=s,r=new Uint8ClampedArray(t.length);for(let o=0;o<e;o++)for(let a=0;a<n;a++){const c=(o*n+a)*4;r[c]=t[((n-a-1)*e+o)*4],r[c+1]=t[((n-a-1)*e+o)*4+1],r[c+2]=t[((n-a-1)*e+o)*4+2],r[c+3]=t[((n-a-1)*e+o)*4+3]}return new ImageData(r,n,e)},$y=s=>{const{data:t,width:e,height:n}=s,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c]+t[c+1]+t[c+2])/3;r[c]=h,r[c+1]=h,r[c+2]=h,r[c+3]=t[c+3]}return new ImageData(r,e,n)},Yy=s=>{const{data:t,width:e,height:n}=s,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;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];r[c]=h,r[c+1]=h,r[c+2]=h,r[c+3]=t[c+3]}return new ImageData(r,e,n)},jy=s=>{const{data:t,width:e,height:n}=s,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,l=(t[c]+t[c+1]+t[c+2])/3>127?255:0;r[c]=l,r[c+1]=l,r[c+2]=l,r[c+3]=t[c+3]}return new ImageData(r,e,n)},Xy=s=>{const{data:t,width:e,height:n}=s,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;r[c]=255-t[c],r[c+1]=255-t[c+1],r[c+2]=255-t[c+2],r[c+3]=t[c+3]}return new ImageData(r,e,n)},Gy=s=>{const{data:t,width:e,height:n}=s,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;r[c]=t[c],r[c+1]=0,r[c+2]=0,r[c+3]=t[c+3]}return new ImageData(r,e,n)},Vy=s=>{const{data:t,width:e,height:n}=s,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;r[c]=0,r[c+1]=t[c+1],r[c+2]=0,r[c+3]=t[c+3]}return new ImageData(r,e,n)},qy=s=>{const{data:t,width:e,height:n}=s,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;r[c]=0,r[c+1]=0,r[c+2]=t[c+2],r[c+3]=t[c+3]}return new ImageData(r,e,n)},Hy=s=>{const{data:t,width:e,height:n}=s,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;r[c]=t[c],r[c+1]=t[c+1],r[c+2]=0,r[c+3]=t[c+3]}return new ImageData(r,e,n)},Wy=s=>{const{data:t,width:e,height:n}=s,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;r[c]=t[c],r[c+1]=0,r[c+2]=t[c+1],r[c+3]=t[c+3]}return new ImageData(r,e,n)},Jy=s=>{const{data:t,width:e,height:n}=s,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;r[c]=0,r[c+1]=t[c+1],r[c+2]=t[c+1],r[c+3]=t[c+3]}return new ImageData(r,e,n)},Ky=s=>{const{data:t,width:e,height:n}=s,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c+1]+t[c+2])/2;r[c]=t[c],r[c+1]=h,r[c+2]=h,r[c+3]=t[c+3]}return new ImageData(r,e,n)},Zy=s=>{const{data:t,width:e,height:n}=s,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c]+t[c+2])/2;r[c]=h,r[c+1]=t[c+1],r[c+2]=h,r[c+3]=t[c+3]}return new ImageData(r,e,n)},Qy=s=>{const{data:t,width:e,height:n}=s,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c]+t[c+1])/2;r[c]=h,r[c+1]=h,r[c+2]=t[c+2],r[c+3]=t[c+3]}return new ImageData(r,e,n)},t1=s=>Nl(s,[-1,-1,-1,-1,9,-1,-1,-1,-1]),e1=s=>Nl(s,[-1,-1,-1,-1,8,-1,-1,-1,-1]),n1=s=>{const{data:t,width:e,height:n}=s,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;r[c]=t[c],r[c+1]=t[c+1],r[c+2]=t[c+2],r[c+3]=255}return new ImageData(r,e,n)},s1=s=>{const{data:t,width:e,height:n}=s,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;if(t[c+3]===0)r[c]=255,r[c+1]=255,r[c+2]=255,r[c+3]=255;else{const h=Fl([t[c],t[c+1],t[c+2],t[c+3]],[255,255,255,255]);r[c]=h[0],r[c+1]=h[1],r[c+2]=h[2],r[c+3]=h[3]}}return new ImageData(r,e,n)};function r1(s,t,e,n,r,i=!1,o){const{data:a,width:c,height:h}=s;let l=r,u=n,d=t,f=e;if(l<0?l=0:l>c&&(l=c),u<0?u=0:u>h&&(u=h),d<1?d=1:d>c&&(d=c),f<1?f=1:f>h&&(f=h),l+d>c&&(d=c-l),u+f>h&&(f=h-u),i){const m=new Uint8ClampedArray(a.length);for(let _=0;_<h;_++)for(let y=0;y<c;y++){const b=(_*c+y)*4;y>=l&&y<=l+d&&_>=u&&_<=u+f?(m[b]=a[b],m[b+1]=a[b+1],m[b+2]=a[b+2],m[b+3]=a[b+3]):(m[b]=255,m[b+1]=255,m[b+2]=255,m[b+3]=o&&["JPG","JPEG"].includes(o.toUpperCase())?255:0)}return new ImageData(m,c,h)}else{const m=new Uint8ClampedArray(d*f*4);for(let _=u;_<=u+f;_++)for(let y=l;y<=l+d;y++){const b=((_-u)*d+y-l)*4,v=(_*c+y)*4;m[b]=a[v],m[b+1]=a[v+1],m[b+2]=a[v+2],m[b+3]=a[v+3]}return new ImageData(m,d,f)}}function i1(s,t,e,n){const{data:r,width:i,height:o}=s;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(r.length);for(let l=0;l<o;l++)for(let u=0;u<i;u++){const d=(l*i+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>i-a-1&&(l<a?f=Math.sqrt(Math.pow(u-(i-a),2)+Math.pow(a-l-1,2)):l>o-a-1&&(f=Math.sqrt(Math.pow(u-(i-a),2)+Math.pow(l-(o-a),2)))),Math.round(f)>a?(c[d]=255,c[d+1]=255,c[d+2]=255,c[d+3]=n||e.toUpperCase()==="PNG"?0:255):(c[d]=r[d],c[d+1]=r[d+1],c[d+2]=r[d+2],c[d+3]=n||e.toUpperCase()==="PNG"?r[d+3]:255)}return new ImageData(c,i,o)}function o1(s,t,e,n,r,i=1e4){const o=new Image;o.src=s;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,n,r),c.getImageData(0,0,n,r)}function a1(s,t){const{data:e,width:n,height:r}=s,i=new Uint8ClampedArray(e.length);for(let a=0;a<r;a++)for(let c=0;c<n;c++){const h=(a*n+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,n,r)}function c1(s,t,e=!1){const{data:n,width:r,height:i}=s,o=new Uint8ClampedArray(n.length);for(let c=0;c<i;c++)for(let h=0;h<r;h++){const l=(c*r+h)*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,r,i)}function h1(s,t,e,n){const{data:r,width:i,height:o}=s,{data:a,width:c,height:h}=t;let l=e,u=n;e+h>o&&(l=o-h),n+c>i&&(u=i-c);const d=new Uint8ClampedArray(r.length);for(let m=0;m<o;m++)for(let p=0;p<i;p++){const _=(m*i+p)*4;if(p<u||p>u+c||m<=l||m>=l+h)d[_]=r[_],d[_+1]=r[_+1],d[_+2]=r[_+2],d[_+3]=r[_+3];else{const y=(m*i+p-((l+1)*i+(m-(l+1))*(i-c))+c-u-1)*4,b=[a[y],a[y+1],a[y+2],a[y+3]],v=[r[_],r[_+1],r[_+2],r[_+3]],w=Fl(b,v);d[_]=w[0],d[_+1]=w[1],d[_+2]=w[2],d[_+3]=w[3]}}return new ImageData(d,i,o)}function l1(s,t,e,n,r,i=10){const{data:o,width:a,height:c}=s;let h=r,l=n,u=t,d=e;h<0?h=0:h>a&&(h=a),l<0?l=0:l>c&&(l=c),u<1?u=1:u>a&&(u=a),d<1?d=1:d>c&&(d=c),h+u>a&&(u=a-h),l+d>c&&(d=c-l);const f=new Uint8ClampedArray(o.length);for(let p=0;p<c;p++)for(let _=0;_<a;_++){const y=(p*a+_)*4;if(_>=h&&_<=h+u&&p>=l&&p<=l+d){const b=Math.floor((_-h)/i),v=Math.floor((p-l)/i);let w=Math.floor(i*(b+1)-i/2+h),E=Math.floor(i*(v+1)-i/2+l);w>a-1&&(w=a-1),E>c-1&&(E=c-1);const C=(E*a+w)*4;f[y]=o[C],f[y+1]=o[C+1],f[y+2]=o[C+2],f[y+3]=o[C+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,c)}function u1(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:r,height:i}=s,{data:o}=t,a=new Uint8ClampedArray(n.length),{backgroundColor:c,changeIntoColor:h}=e;for(let u=0;u<i;u++)for(let d=0;d<r;d++){const f=(u*r+d)*4,m=o[f],p=o[f+1],_=o[f+2],y=o[f+3];m===c.r&&p===c.g&&_===c.b&&y===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]=n[f],a[f+1]=n[f+1],a[f+2]=n[f+2],a[f+3]=n[f+3])}return new ImageData(a,r,i)}return s}function Nl(s,t){const{data:e,width:n,height:r}=s,i=new Uint8ClampedArray(e.length);for(let a=0;a<r;a++)for(let c=0;c<n;c++){const h=(a*n+c)*4;for(let l=0;l<3;l++){const u=h+l;c===0||c===n-1||a===0||a===r-1?i[u]=e[u]:i[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]}i[h+3]=e[h+3]}return new ImageData(i,n,r)}function Fl(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 r=e/255,i=n/255,o=Math.max(Math.min(Math.floor(s[0]*r+t[0]*i*(1-r)),255),0),a=Math.max(Math.min(Math.floor(s[1]*r+t[1]*i*(1-r)),255),0),c=Math.max(Math.min(Math.floor(s[2]*r+t[2]*i*(1-r)),255),0),h=Math.max(Math.min(Math.floor((r+i*(1-r))*255),255),0);return[o,a,c,h]}}return[255,255,255,255]}const Ao=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 r=0;r<n;r++)this.writeByte(t[r+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}}},Bl=function(){let s=0,t=0,e=0,n="";const r=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){n+=String.fromCharCode(r(o&63))};return{writeByte(o){for(s=s<<8|o&255,t+=8,e+=1;t>=6;)i(s>>>t-6),t-=6},flush(){if(t>0&&(i(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}}},Ul=function(s,t,e){const n=new Array(s*s),r=function(a){const c=a;let h=0,l=0;return{write(u,d){if(u>>>d)throw new Error("length over");for(;h+d>=8;)c.writeByte(255&(u<<h|l)),d-=8-h,u>>>=8-h,l=0,h=0;l=u<<h|l,h=h+d},flush(){h>0&&c.writeByte(l)}}},i=function(a){const c=1<<a,h=(1<<a)+1;let l=a+1;const u=o();for(let _=0;_<c;_++)u.add(String.fromCharCode(_));u.add(String.fromCharCode(c)),u.add(String.fromCharCode(h));const d=Ao(),f=r(d);f.write(c,l);let m=0,p=String.fromCharCode(n[m]);for(m+=1;m<n.length;){const _=String.fromCharCode(n[m]);m+=1,u.contains(p+_)?p=p+_:(f.write(u.indexOf(p),l),u.size()<4095&&(u.size()==1<<l&&(l+=1),u.add(p+_)),p=_)}return f.write(u.indexOf(p),l),f.write(h,l),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){n[c*s+a]=h},write(a){a.writeString("GIF87a"),a.writeShort(s),a.writeShort(s),a.writeByte(128),a.writeByte(0),a.writeByte(0),a.writeByte(Mn("0x"+t[1]+t[2])),a.writeByte(Mn("0x"+t[3]+t[4])),a.writeByte(Mn("0x"+t[5]+t[6])),a.writeByte(Mn("0x"+e[1]+e[2])),a.writeByte(Mn("0x"+e[3]+e[4])),a.writeByte(Mn("0x"+e[5]+e[6])),a.writeString(","),a.writeShort(0),a.writeShort(0),a.writeShort(s),a.writeShort(s),a.writeByte(0);const c=2,h=i(c);a.writeByte(c);let l=0;for(;h.length-l>255;)a.writeByte(255),a.writeBytes(h,l,255),l+=255;a.writeByte(h.length-l),a.writeBytes(h,l,h.length-l),a.writeByte(0),a.writeString(";")}}},$l=function(s,t,e,n){const r=Ul(s,t,e);for(let h=0;h<s;h++)for(let l=0;l<s;l++)r.setPixel(l,h,n(l,h));const i=Ao();r.write(i);const o=Bl(),a=i.toByteArray();for(let h=0,l=a.length;h<l;h++)o.writeByte(a[h]);o.flush();let c="";return c+="data:image/gif;base64,",c+=o,c},ne={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},as={M:0,L:1,H:2,Q:3},Je={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},Bt={glog:function(s){if(s<1)throw new Error("glog("+s+")");return Bt.LOG_TABLE[s]},gexp:function(s){for(;s<0;)s+=255;for(;s>=256;)s-=255;return Bt.EXP_TABLE[s]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(let s=0;s<8;s++)Bt.EXP_TABLE[s]=1<<s;for(let s=8;s<256;s++)Bt.EXP_TABLE[s]=Bt.EXP_TABLE[s-4]^Bt.EXP_TABLE[s-5]^Bt.EXP_TABLE[s-6]^Bt.EXP_TABLE[s-8];for(let s=0;s<255;s++)Bt.LOG_TABLE[Bt.EXP_TABLE[s]]=s;const St={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(;St.getBCHDigit(t)-St.getBCHDigit(St.G15)>=0;)t^=St.G15<<St.getBCHDigit(t)-St.getBCHDigit(St.G15);return(s<<10|t)^St.G15_MASK},getBCHTypeNumber:function(s){let t=s<<12;for(;St.getBCHDigit(t)-St.getBCHDigit(St.G18)>=0;)t^=St.G18<<St.getBCHDigit(t)-St.getBCHDigit(St.G18);return s<<12|t},getBCHDigit:function(s){let t=0;for(;s!=0;)t++,s>>>=1;return t},getPatternPosition:function(s){return St.PATTERN_POSITION_TABLE[s-1]},getMask:function(s,t,e){switch(s){case Je.PATTERN000:return(t+e)%2==0;case Je.PATTERN001:return t%2==0;case Je.PATTERN010:return e%3==0;case Je.PATTERN011:return(t+e)%3==0;case Je.PATTERN100:return(Math.floor(t/2)+Math.floor(e/3))%2==0;case Je.PATTERN101:return t*e%2+t*e%3==0;case Je.PATTERN110:return(t*e%2+t*e%3)%2==0;case Je.PATTERN111:return(t*e%3+(t+e)%2)%2==0;default:throw new Error("bad maskPattern:"+s)}},getErrorCorrectPolynomial:function(s){let t=new Fn([1],0);for(let e=0;e<s;e++)t=t.multiply(new Fn([1,Bt.gexp(e)],0));return t},getLengthInBits:function(s,t){if(1<=t&&t<10)switch(s){case ne.MODE_NUMBER:return 10;case ne.MODE_ALPHA_NUM:return 9;case ne.MODE_8BIT_BYTE:return 8;case ne.MODE_KANJI:return 8;default:throw new Error("mode:"+s)}else if(t<27)switch(s){case ne.MODE_NUMBER:return 12;case ne.MODE_ALPHA_NUM:return 11;case ne.MODE_8BIT_BYTE:return 16;case ne.MODE_KANJI:return 10;default:throw new Error("mode:"+s)}else if(t<41)switch(s){case ne.MODE_NUMBER:return 14;case ne.MODE_ALPHA_NUM:return 13;case ne.MODE_8BIT_BYTE:return 16;case ne.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 i=0;i<t;i++)for(let o=0;o<t;o++){let a=0;const c=s.isDark(i,o);for(let h=-1;h<=1;h++)if(!(i+h<0||t<=i+h))for(let l=-1;l<=1;l++)o+l<0||t<=o+l||h==0&&l==0||c==s.isDark(i+h,o+l)&&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;s.isDark(i,o)&&a++,s.isDark(i+1,o)&&a++,s.isDark(i,o+1)&&a++,s.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++)s.isDark(i,o)&&!s.isDark(i,o+1)&&s.isDark(i,o+2)&&s.isDark(i,o+3)&&s.isDark(i,o+4)&&!s.isDark(i,o+5)&&s.isDark(i,o+6)&&(e+=40);for(let i=0;i<t;i++)for(let o=0;o<t-6;o++)s.isDark(o,i)&&!s.isDark(o+1,i)&&s.isDark(o+2,i)&&s.isDark(o+3,i)&&s.isDark(o+4,i)&&!s.isDark(o+5,i)&&s.isDark(o+6,i)&&(e+=40);let n=0;for(let i=0;i<t;i++)for(let o=0;o<t;o++)s.isDark(o,i)&&n++;const r=Math.abs(100*n/t/t-50)/5;return e+=r*10,e}};class Fn{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 r=0;r<t.length-n;r++)this.num[r]=t[r+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 r=0;r<t.getLength();r++)e[n+r]^=Bt.gexp(Bt.glog(this.get(n))+Bt.glog(t.get(r)));return new Fn(e,0)}mod(t){if(this.getLength()-t.getLength()<0)return this;const e=Bt.glog(this.get(0))-Bt.glog(t.get(0)),n=new Array(this.getLength());for(let r=0;r<this.getLength();r++)n[r]=this.get(r);for(let r=0;r<t.getLength();r++)n[r]^=Bt.gexp(Bt.glog(t.get(r))+e);return new Fn(n,0).mod(t)}}class Le{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=Le.getRsBlockTable(t,e);if(n==null)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);const r=n.length/3,i=[];for(let o=0;o<r;o++){const a=n[o*3+0],c=n[o*3+1],h=n[o*3+2];for(let l=0;l<a;l++)i.push(new Le(c,h))}return i}static getRsBlockTable(t,e){switch(e){case as.L:return Le.RS_BLOCK_TABLE[(t-1)*4+0];case as.M:return Le.RS_BLOCK_TABLE[(t-1)*4+1];case as.Q:return Le.RS_BLOCK_TABLE[(t-1)*4+2];case as.H:return Le.RS_BLOCK_TABLE[(t-1)*4+3];default:return}}}class Yl{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 f1{mode;data;constructor(t){this.mode=ne.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 Ke{static PAD0=236;static PAD1=17;typeNumber;errorCorrectLevel;modules;moduleCount;dataCache;dataList;constructor(t,e){this.typeNumber=t,this.errorCorrectLevel=as[e],this.modules=[],this.moduleCount=0,this.dataCache=null,this.dataList=[]}addData(t){const e=new f1(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=Le.getRSBlocks(t,this.errorCorrectLevel),n=new Yl;let r=0;for(let i=0;i<e.length;i++)r+=e[i].dataCount;for(let i=0;i<this.dataList.length;i++){const o=this.dataList[i];n.put(o.mode,4),n.put(o.getLength(),St.getLengthInBits(o.mode,t)),o.write(n)}if(n.getLengthInBits()<=r*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 r=0;r<this.moduleCount;r++)this.modules[n][r]=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=Ke.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 r=-1;r<=7;r++)e+r<=-1||this.moduleCount<=e+r||(0<=n&&n<=6&&(r==0||r==6)||0<=r&&r<=6&&(n==0||n==6)||2<=n&&n<=4&&2<=r&&r<=4?this.modules[t+n][e+r]=!0:this.modules[t+n][e+r]=!1)}getBestMaskPattern(){let t=0,e=0;for(let n=0;n<8;n++){this.makeImpl(!0,n);const r=St.getLostPoint(this);(n==0||t>r)&&(t=r,e=n)}return e}createMovieClip(t,e,n){const r=t.createEmptyMovieClip(e,n),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]&&(r.beginFill(0,100),r.moveTo(h,a),r.lineTo(h+i,a),r.lineTo(h+i,a+i),r.lineTo(h,a+i),r.endFill())}}return r}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=St.getPatternPosition(this.typeNumber);for(let e=0;e<t.length;e++)for(let n=0;n<t.length;n++){const r=t[e],i=t[n];if(this.modules[r][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[r+o][i+a]=!0:this.modules[r+o][i+a]=!1}}setupTypeNumber(t){const e=St.getBCHTypeNumber(this.typeNumber);for(let n=0;n<18;n++){const r=!t&&(e>>n&1)==1;this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(let n=0;n<18;n++){const r=!t&&(e>>n&1)==1;this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}}setupTypeInfo(t,e){const n=this.errorCorrectLevel<<3|e,r=St.getBCHTypeInfo(n);for(let i=0;i<15;i++){const o=!t&&(r>>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&&(r>>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 n=-1,r=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[r][a-c]==null){let h=!1;o<t.length&&(h=(t[o]>>>i&1)==1),St.getMask(e,r,a-c)&&(h=!h),this.modules[r][a-c]=h,i--,i==-1&&(o++,i=7)}if(r+=n,r<0||this.moduleCount<=r){r-=n,n=-n;break}}}static createData(t,e,n){const r=Le.getRSBlocks(t,e),i=new Yl;for(let a=0;a<n.length;a++){const c=n[a];i.put(c.mode,4),i.put(c.getLength(),St.getLengthInBits(c.mode,t)),c.write(i)}let o=0;for(let a=0;a<r.length;a++)o+=r[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(Ke.PAD0,8),i.getLengthInBits()>=o*8));)i.put(Ke.PAD1,8);return Ke.createBytes(i,r)}static createBytes(t,e){let n=0,r=0,i=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;r=Math.max(r,d),i=Math.max(i,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 m=St.getErrorCorrectPolynomial(f),_=new Fn(o[u],m.getLength()-1).mod(m);a[u]=new Array(m.getLength()-1);for(let y=0;y<a[u].length;y++){const b=y+_.getLength()-a[u].length;a[u][y]=b>=0?_.get(b):0}}let c=0;for(let u=0;u<e.length;u++)c+=e[u].totalCount;const h=new Array(c);let l=0;for(let u=0;u<r;u++)for(let d=0;d<e.length;d++)u<o[d].length&&(h[l++]=o[d][u]);for(let u=0;u<i;u++)for(let d=0;d<e.length;d++)u<a[d].length&&(h[l++]=a[d][u]);return h}}const jl=Math.ceil,cs=Math.floor,Xl=Math.round;function d1(s,t){const e=Xc(s),n=t?.ecc||"H",r=t?.size||256,i=-1,o=t?.padding||0,a=t?.color||"#000000",c=t?.background||"#ffffff",h=new Ke(i,n);h.addData(e),h.make();const l=h.getModuleCount(),u=(r-o*2)/l,d=o,f=r-o;return $l(r,a,c,function(m,p){if(d<=m&&m<f&&d<=p&&p<f){const _=cs((m-d)/u),y=cs((p-d)/u);return h.isDark(y,_)?0:1}else return 1})}function m1(s,t){const e=t.x||0,n=t.y||0,r=Xc(s),i=t.ctx,o=t.ecc||"H",a=typeof t.size=="number"?cs(t.size):256,c=t.padding||0,h=-1,l=t.color||"#000000",u=t.background||"#ffffff",d=new Ke(h,o);d.addData(r),d.make();const f=d.getModuleCount(),m=(a-c*2)/f;i.fillStyle=u,i.fillRect(e,n,a,a);for(let p=0;p<f;p++)for(let _=0;_<f;_++){const y=jl((_+1)*m)-cs(_*m),b=jl((p+1)*m)-cs(p*m);i.fillStyle=d.isDark(p,_)?l:u,i.fillRect(e+Xl(_*m)+c,n+Xl(p*m)+c,y,b)}}function ut(s){return s*Math.PI/180}function Ut(s){return s*180/Math.PI}function Bn(s,t,e=0){return Math.sqrt(s*s+t*t+e*e)}function Ze(s,t,e,n){return Bn(e-s,n-t)}function se(s,t,e,n){let r=Math.atan2(n-t,e-s);return r<0&&(r+=Math.PI*2),r}function Qe(s,t){return{dx:Math.cos(s)*t,dy:Math.sin(s)*t}}function p1(s,t,e){if(typeof e=="number"){const n=Bn(s,t,e);return{x:s/=n,y:t/=n,z:e/=n}}else{const n=Bn(s,t);return{x:s/=n,y:t/=n}}}function g1(s,t,e,n,r=10){if(Math.abs(e-s)<r&&Math.abs(n-t)<r)return"no";const i=Ut(se(s,t,e,n));return i>=-135&&i<=-45?"up":i>45&&i<135?"down":i>=135&&i<=180||i>=-180&&i<-135?"left":"right"}class _r{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 _r(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=K(this.x,t.x,e.x),this.y=K(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=K(this.x,t,e),this.y=K(this.y,t,e),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(K(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 Gl.copy(this).projectOnVector(t),this.sub(Gl)}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(K(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}rotateAround(t,e){const n=Math.cos(e),r=Math.sin(e),i=this.x-t.x,o=this.y-t.y;return this.x=i*n-o*r+t.x,this.y=i*r+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 ve{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 ve(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,n=this.y,r=this.z,i=t.value;return this.x=i[0]*e+i[3]*n+i[6]*r,this.y=i[1]*e+i[4]*n+i[7]*r,this.z=i[2]*e+i[5]*n+i[8]*r,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,n=this.y,r=this.z,i=t.value,o=1/(i[3]*e+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*e+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*e+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*e+i[6]*n+i[10]*r+i[14])*o,this}transformDirection(t){const e=this.x,n=this.y,r=this.z,i=t.value;return this.x=i[0]*e+i[4]*n+i[8]*r,this.y=i[1]*e+i[5]*n+i[9]*r,this.z=i[2]*e+i[6]*n+i[10]*r,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=K(this.x,t.x,e.x),this.y=K(this.y,t.y,e.y),this.z=K(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=K(this.x,t,e),this.y=K(this.y,t,e),this.z=K(this.z,t,e),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(K(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,r=t.y,i=t.z,o=e.x,a=e.y,c=e.z;return this.x=r*c-i*a,this.y=i*o-n*c,this.z=n*a-r*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 ko.copy(this).projectOnVector(t),this.sub(ko)}projectOnPlane(t){return this.perpendOnVector(t)}reflect(t){return this.sub(ko.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(K(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return e*e+n*n+r*r}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(),r=this.setFromMatrix4Column(t,2).length();return this.x=e,this.y=n,this.z=r,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,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 Mo{x=0;y=0;z=0;w=1;constructor(t=0,e=0,n=0,r=1){this.x=t,this.y=e,this.z=n,this.w=r}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,r=1){return this.x=t,this.y=e,this.z=n,this.w=r,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 Mo(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,r=this.z,i=this.w,o=t.value;return this.x=o[0]*e+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*e+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*e+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*e+o[7]*n+o[11]*r+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,n,r,i;const c=t.value,h=c[0],l=c[4],u=c[8],d=c[1],f=c[5],m=c[9],p=c[2],_=c[6],y=c[10];if(Math.abs(l-d)<.01&&Math.abs(u-p)<.01&&Math.abs(m-_)<.01){if(Math.abs(l+d)<.1&&Math.abs(u+p)<.1&&Math.abs(m+_)<.1&&Math.abs(h+f+y-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;const v=(h+1)/2,w=(f+1)/2,E=(y+1)/2,C=(l+d)/4,D=(u+p)/4,$=(m+_)/4;return v>w&&v>E?v<.01?(n=0,r=.707106781,i=.707106781):(n=Math.sqrt(v),r=C/n,i=D/n):w>E?w<.01?(n=.707106781,r=0,i=.707106781):(r=Math.sqrt(w),n=C/r,i=$/r):E<.01?(n=.707106781,r=.707106781,i=0):(i=Math.sqrt(E),n=D/i,r=$/i),this.set(n,r,i,e),this}let b=Math.sqrt((_-m)*(_-m)+(u-p)*(u-p)+(d-l)*(d-l));return Math.abs(b)<.001&&(b=1),this.x=(_-m)/b,this.y=(u-p)/b,this.z=(d-l)/b,this.w=Math.acos((h+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=K(this.x,t.x,e.x),this.y=K(this.y,t.y,e.y),this.z=K(this.z,t.z,e.z),this.w=K(this.w,t.w,e.w),this}clampScalar(t,e){return this.x=K(this.x,t,e),this.y=K(this.y,t,e),this.z=K(this.z,t,e),this.w=K(this.w,t,e),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(K(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}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 Gl=new _r,ko=new ve,Vl=y1("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 y1(s,t=10){const e={},n=s.split(",");for(let r=0;r<n.length;r+=2){const i="&"+n[r+1]+";",o=parseInt(n[r],t);e[i]="&#"+o+";"}return e["\\xa0"]="&#160;",e}function Ht(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 Cr(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 b1(s){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[s]||t.start}function w1(s){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[s]||t.alphabetic}const hs={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 Er=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 i=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(e);i&&(n.setAttribute("stop-color",Ht("rgb({r},{g},{b})",{r:i[1],g:i[2],b:i[3]})),n.setAttribute("stop-opacity",i[4]))}else n.setAttribute("stop-color",e);this.__root.appendChild(n)}},Io=class{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}},ql=class rc{__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(hs);for(let e=0,n=t.length;e<n;e++){const r=t[e];this[r]=hs[r].canvas}}__getStyleState(){const t={},e=Object.keys(hs);for(let n=0,r=e.length;n<r;n++){const i=e[n];t[i]=this[i]}return t}__applyStyleState(t){const e=Object.keys(t);for(let n=0,r=e.length;n<r;n++){const i=e[n];this[i]=t[i]}}__createElement(t,e={},n=!1){const r=this.__document.createElementNS("http://www.w3.org/2000/svg",t),i=Object.keys(e);n&&(r.setAttribute("fill","none"),r.setAttribute("stroke","none"));for(let o=0;o<i.length;o++){const a=i[o];r.setAttribute(a,e[a])}return r}__applyStyleToCurrentElement(t){let e=this.__currentElement;const n=this.__currentElementsToStyle;n&&(e.setAttribute(t,""),e=n.element,n.children.forEach(i=>{i.setAttribute(t,"")}));const r=Object.keys(hs);for(let i=0;i<r.length;i++){const o=hs[r[i]],a=this[r[i]];if(o.apply){if(a instanceof Io){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,Ht("url(#{id})",{id:a.__root.getAttribute("id")}))}else if(a instanceof Er)e.setAttribute(o.apply,Ht("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,Ht("rgb({r},{g},{b})",{r:h[1],g:h[2],b:h[3]}));let l=parseFloat(h[4]);const u=this.globalAlpha;u!=null&&(l*=u),e.setAttribute(o.svgAttr+"-opacity",""+l)}}else{let c=o.svgAttr;if(r[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 r=Object.keys(Vl);for(let i=0,o=r.length;i<o;i++){const a=r[i],c=Vl[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 r=this.__createElement("g");e.appendChild(r),this.__currentElement=r}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(Ht("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(Ht("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(Ht("translate({x},{y})",{x:t,y:e}))}transform(t,e,n,r,i,o){this.__addTransform(Ht("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:n,d:r,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(Ht("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(Ht("L {x} {y}",this.__currentPosition)):this.__addPathCommand(Ht("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,n,r,i,o){this.__currentPosition={x:i,y:o},this.__addPathCommand(Ht("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:n,cp2y:r,x:i,y:o}))}quadraticCurveTo(t,e,n,r){this.__currentPosition={x:n,y:r},this.__addPathCommand(Ht("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:n,y:r}))}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,r,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===n&&e===r||i===0){this.lineTo(t,e);return}const c=this.normalize([o-t,a-e]),h=this.normalize([n-t,r-e]);if(c[0]*h[1]===c[1]*h[0]){this.lineTo(t,e);return}const l=c[0]*h[0]+c[1]*h[1],u=Math.acos(Math.abs(l)),d=this.normalize([c[0]+h[0],c[1]+h[1]]),f=i/Math.sin(u/2),m=t+f*d[0],p=e+f*d[1],_=[-c[1],c[0]],y=[h[1],-h[0]],b=function(E){const C=E[0];return E[1]>=0?Math.acos(C):-Math.acos(C)},v=b(_),w=b(y);this.lineTo(m+_[0]*i,p+_[1]*i),this.arc(m,p,i,v,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,n,r){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+n,e),this.lineTo(t+n,e+r),this.lineTo(t,e+r),this.lineTo(t,e),this.closePath()}fillRect(t,e,n,r){const i=this.__createElement("rect",{x:t,y:e,width:n,height:r},!0);this.__closestGroupOrSvg().appendChild(i),this.__currentElement=i,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,n,r){const i=this.__createElement("rect",{x:t,y:e,width:n,height:r},!0);this.__closestGroupOrSvg().appendChild(i),this.__currentElement=i,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),n=this.__rootSVG.childNodes[1],r=n.childNodes;for(let i=r.length-1;i>=0;i--)r[i]&&n.removeChild(r[i]);this.__currentElement=n,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,n,r){if(t===0&&e===0&&n===this.width&&r===this.height){this.__clearCanvas();return}const i=this.__closestGroupOrSvg(),o=this.__createElement("rect",{x:t,y:e,width:n,height:r,fill:"#FFFFFF"},!0);i.appendChild(o)}createLinearGradient(t,e,n,r){const i=this.__createElement("linearGradient",{id:Cr(this.__ids),x1:t+"px",x2:n+"px",y1:e+"px",y2:r+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(i),new Er(i,this)}createRadialGradient(t,e,n,r,i,o){const a=this.__createElement("radialGradient",{id:Cr(this.__ids),cx:r+"px",cy:i+"px",r:o+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(a),new Er(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,r){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:n,"text-anchor":b1(this.textAlign),"dominant-baseline":w1(this.textBaseline)},!0);a.appendChild(this.__document.createTextNode(t)),this.__currentElement=a,this.__applyStyleToCurrentElement(r),o.appendChild(this.__wrapTextLink(i,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,r,i,o){if(r===i)return;r=r%(2*Math.PI),i=i%(2*Math.PI),r===i&&(i=(i+2*Math.PI-.001*(o?-1:1))%(2*Math.PI));const a=t+n*Math.cos(i),c=e+n*Math.sin(i),h=t+n*Math.cos(r),l=e+n*Math.sin(r),u=o?0:1;let d=0,f=i-r;f<0&&(f+=2*Math.PI),o?d=f>Math.PI?0:1:d=f>Math.PI?1:0,this.lineTo(h,l),this.__addPathCommand(Ht("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:n,ry:n,xAxisRotation:0,largeArcFlag:d,sweepFlag:u,endX:a,endY:c})),this.__currentPosition={x:a,y:c}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),n=Cr(this.__ids),r=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",Ht("url(#{id})",{id:n})),t.appendChild(r),this.__currentElement=r}drawImage(...t){let e=t[0],n,r,i,o,a=0,c=0,h,l,u,d,f,m,p,_;if(t.length===3)n=t[1],r=t[2],h=e.width,l=e.height,i=h,o=l;else if(t.length===5)n=t[1],r=t[2],i=t[3],o=t[4],h=e.width,l=e.height;else if(t.length===9)a=t[1],c=t[2],h=t[3],l=t[4],n=t[5],r=t[6],i=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 b="translate("+n+", "+r+")";if(e instanceof rc){if(u=e.getSvg().cloneNode(!0),u.childNodes&&u.childNodes.length>1){for(d=u.childNodes[0];d.childNodes.length;)_=d.childNodes[0].getAttribute("id"),this.__ids[_]=_,this.__SVGdefs.appendChild(d.childNodes[0]);if(f=u.childNodes[1],f){const v=f.getAttribute("transform");let w;v?w=v+" "+b:w=b,f.setAttribute("transform",w),y.appendChild(f)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(m=this.__createElement("image"),m.setAttribute("width",i),m.setAttribute("height",o),m.setAttribute("preserveAspectRatio","none"),(a||c||h!==e.width||l!==e.height)&&(p=this.__document.createElement("canvas"),p.width=i,p.height=o,p.getContext("2d")?.drawImage(e,a,c,h,l,0,0,i,o),e=p),m.setAttribute("transform",b),m.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),y.appendChild(m))}createPattern(t,e){const n=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),r=Cr(this.__ids);let i;return n.setAttribute("id",r),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")),n.appendChild(i),this.__SVGdefs.appendChild(n)):t instanceof rc&&(n.setAttribute("width",""+t.width),n.setAttribute("height",""+t.height),n.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(n)),new Io(n,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}},Do=class{canvas;context;customContext;currentPath2D=new Path2D;path2Ds=[];currentMatrix=new DOMMatrix;hasSetCustomStrokeStyle=!1;hasSetCustomFillStyle=!1;constructor(t,e,n,r=!1){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),r&&(this.customContext=new ql({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,r){return this.context.fillRect(t,e,n,r),this.customContext&&this.customContext.fillRect(t,e,n,r),this}fillText(t,e,n,r){return this.hasSetCustomFillStyle=!1,this.context.fillText(t,e,n,r),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,r){return this.context.strokeText(t,e,n,r),this.customContext&&this.customContext.strokeText(t,e,n),this}strokeRect(t,e,n,r){return this.context.strokeRect(t,e,n,r),this.customContext&&this.customContext.strokeRect(t,e,n,r),this}measureText(t){return this.context.measureText(t)}clearRect(t=0,e=0,n=this.canvas.width,r=this.canvas.height){return this.context.clearRect(t,e,n,r),this.customContext&&this.customContext.clearRect(t,e,n,r),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,r=0){return this.translate(n,r),this.context.scale(t,e),this.customContext&&this.customContext.scale(t,e),this.currentMatrix.scale(t,e),this.translate(-n,-r),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,r,i,o){return this.context.arc(t,e,n,r,i,o),this.customContext&&this.customContext.arc(t,e,n,r,i,o?-1:1),this.currentPath2D.arc(t,e,n,r,i,o),this}arcTo(t,e,n,r,i){return this.context.arcTo(t,e,n,r,i),this.customContext&&this.customContext.arcTo(t,e,n,r,i),this.currentPath2D.arcTo(t,e,n,r,i),this}ellipse(t,e,n,r,i,o,a,c){return this.context.ellipse(t,e,n,r,i,o,a,c),this.currentPath2D.ellipse(t,e,n,r,i,o,a,c),this}quadraticCurveTo(t,e,n,r){return this.context.quadraticCurveTo(t,e,n,r),this.customContext&&this.customContext.quadraticCurveTo(t,e,n,r),this.currentPath2D.quadraticCurveTo(t,e,n,r),this}bezierCurveTo(t,e,n,r,i,o){return this.context.bezierCurveTo(t,e,n,r,i,o),this.customContext&&this.customContext.bezierCurveTo(t,e,n,r,i,o),this.currentPath2D.bezierCurveTo(t,e,n,r,i,o),this}rect(t,e,n,r){return this.context.rect(t,e,n,r),this.customContext&&this.customContext.rect(t,e,n,r),this.currentPath2D.rect(t,e,n,r),this}createLinearGradient(t,e,n,r,i){const o=this.context.createLinearGradient(t,e,n,r);return i&&Object.entries(i).forEach(([a,c])=>{o.addColorStop(parseFloat(a),c)}),o}createRadialGradient(t,e,n,r,i,o,a){const c=this.context.createRadialGradient(t,e,n,r,i,o);return a&&Object.entries(a).forEach(([h,l])=>{c.addColorStop(parseFloat(h),l)}),c}drawImage(t,...e){if(e.length===0)this.context.drawImage(t,0,0);else if(e.length===2){const n=e[0],r=e[1];this.context.drawImage(t,n,r)}else if(e.length===4){const n=e[0],r=e[1],i=e[2],o=e[3];this.context.drawImage(t,n,r,i,o)}else if(e.length===8){const n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],c=e[5],h=e[6],l=e[7];this.context.drawImage(t,n,r,i,o,a,c,h,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,r=this.canvas.height,i){return this.context.getImageData(t,e,n,r,i)}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}}},Oo=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=se(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),r=Math.max(this.x,this.toX),i=Math.max(this.y,this.toY);return{x:e,y:n,width:r-e,height:i-n}}else{const e=Math.sin(t),n=Math.cos(t),r=n*this.x-e*this.y,i=n*this.toX-e*this.toY,o=n*this.y+e*this.x,a=n*this.toY+e*this.toX;return{x:Math.min(r,i),y:Math.min(o,a),width:Math.max(r,i)-Math.min(r,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,n=this.y,r=t.toX,i=t.toY,o=this.toX-e,a=t.x-r;if(!o&&!a)return null;const c=(this.toY-n)/o,h=(t.y-i)/a;if(o){if(!a)return{x:r,y:c*(r-e)+n}}else return{x:e,y:h*(e-r)+i};const l=(-h*r+i+c*e-n)/(c-h),u=c*(l-e)+n;return isNaN(l)||isNaN(u)?null:{x:l,y:u}}};const v1=class extends Oo{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,r,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,n,r,i,o,a,c,!this.sweepFlag)}convert(t,e,n,r,i,o,a,c,h){const l=a/180*Math.PI,u=(t-n)/2,d=(e-r)/2,f=Math.cos(l)*u+Math.sin(l)*d,m=-Math.sin(l)*u+Math.cos(l)*d,p=f*f/(i*i)+m*m/(o*o);if(p>1){const V=Math.sqrt(p);throw i=V*i,o=V*o,new Error(`Radii are too small to build an arc. Correcting them to ${i}/${o}.`)}const _=Math.sqrt((i*i*o*o-i*i*m*m-o*o*f*f)/(i*i*m*m+o*o*f*f)),y=c!=h?1:-1,b=y*_*i*m/o,v=y*_*-o*f/i,w=(t+n)/2,E=(e+r)/2,C=Math.cos(l)*b-Math.sin(l)*v+w,D=Math.sin(l)*b+Math.cos(l)*v+E,$=(V,q,ft,pt)=>(V*pt>=q*ft?1:-1)*Math.acos((V*ft+q*pt)/(Math.sqrt(V*V+q*q)*Math.sqrt(ft*ft+pt*pt))),O=$(1,0,t-C,e-D)-l,U=$(t-C,e-D,n-C,r-D);return[C,D,i,o,l,O,O+U]}},x1=class extends Oo{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,r,i,o;for(let h=0;h<2;++h)n=h==0?this.x-2*this.cx+this.toX:this.y-2*this.cy+this.toY,r=h==0?-2*this.x+2*this.cx:-2*this.y+2*this.cy,i=h==0?this.x:this.y,Math.abs(n)>1e-12&&(o=-r/(2*n),0<o&&o<1&&[t,e][h].push(n*o*o+r*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}}},tn=class Ls extends Oo{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,r=(-e+Math.sqrt(e*e-4*t*n))/2/t,i=(-e-Math.sqrt(e*e-4*t*n))/2/t;const o=[this.y,this.toY],a=[this.x,this.toX];let c;const h=[];Math.abs(r)>1e12&&(r=.5),Math.abs(i)>1e12&&(i=.5),r>=0&&r<=1&&(c=this.interpolate(r),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),n=this.y-this.c1y,r=(-e+Math.sqrt(e*e-4*t*n))/2/t,i=(-e-Math.sqrt(e*e-4*t*n))/2/t,Math.abs(r)>1e12&&(r=.5),Math.abs(i)>1e12&&(i=.5),r>=0&&r<=1&&(c=this.interpolate(r),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 l=[],u=h.length;for(let m=0;m<u;m++){for(let p=m+1;p<u;p++)h[m].X===h[p].X&&h[m].Y===h[p].Y&&(p=++m);l.push({X:h[m].X,Y:h[m].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,r,i){const o=-3*e+9*n-9*r+3*i,a=t*o+6*e-12*n+6*r;return t*a-3*e+3*n}static bezlen(t,e,n,r,i,o,a,c,h=1){h=Math.max(0,Math.min(h,1));const l=h/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 m=0;m<12;m++){const p=l*u[m]+l,_=this.base3(p,t,n,i,a),y=this.base3(p,e,r,o,c);f+=d[m]*Math.sqrt(_*_+y*y)}return l*f}length(t=1){return Ls.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,r=this.c1x,i=this.c1y,o=this.c2x,a=this.c2y,c=this.toX,h=this.toY;if(t<0||Ls.bezlen(e,n,r,i,o,a,c,h)<t)return 0;const l=1;let u=l/2,d=l-u,f=Ls.bezlen(e,n,r,i,o,a,c,h,d);for(;Math.abs(f-t)>.01;)u/=2,d+=(f<t?1:-1)*u,f=Ls.bezlen(e,n,r,i,o,a,c,h,d);return d}getPointAtSegmentLength(t){const e=this.getTatLen(t),n=1-e,r=Math.pow(n,3),i=Math.pow(n,2),o=e*e,a=o*e,c=r*this.x+i*3*e*this.c1x+n*3*e*e*this.c2x+a*this.toX,h=r*this.y+i*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),m=n*this.x+e*this.c1x,p=n*this.y+e*this.c1y,_=n*this.c2x+e*this.toX,y=n*this.c2y+e*this.toY,b=90-Math.atan2(l-d,u-f)*180/Math.PI;return{x:c,y:h,m:{x:l,y:u},n:{x:d,y:f},start:{x:m,y:p},end:{x:_,y},alpha:b}}},ls=Math.PI*2;function Hl(s,t,e,n){const r=s*n-t*e<0?-1:1;let i=s*e+t*n;return i>1&&(i=1),i<-1&&(i=-1),r*Math.acos(i)}function S1(s,t,e,n,r,i,o,a,c,h){const l=h*(s-e)/2+c*(t-n)/2,u=-c*(s-e)/2+h*(t-n)/2,d=o*o,f=a*a,m=l*l,p=u*u;let _=d*f-d*p-f*m;_<0&&(_=0),_/=d*p+f*m,_=Math.sqrt(_)*(r===i?-1:1);const y=_*o/a*u,b=_*-a/o*l,v=h*y-c*b+(s+e)/2,w=c*y+h*b+(t+n)/2,E=(l-y)/o,C=(u-b)/a,D=(-l-y)/o,$=(-u-b)/a,O=Hl(1,0,E,C);let U=Hl(E,C,D,$);return i===0&&U>0&&(U-=ls),i===1&&U<0&&(U+=ls),[v,w,O,U]}function _1(s,t){const e=1.3333333333333333*Math.tan(t/4),n=Math.cos(s),r=Math.sin(s),i=Math.cos(s+t),o=Math.sin(s+t);return[n,r,n-r*e,r+n*e,i+o*e,o-i*e,i,o]}function Wl(s,t,e,n,r,i,o,a,c){const h=Math.sin(c*ls/360),l=Math.cos(c*ls/360),u=l*(s-e)/2+h*(t-n)/2,d=-h*(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 m=S1(s,t,e,n,r,i,o,a,h,l),p=[];let _=m[2],y=m[3];const b=Math.max(Math.ceil(Math.abs(y)/(ls/4)),1);y/=b;for(let v=0;v<b;v++)p.push(_1(_,y)),_+=y;return p.map(v=>{for(let w=0;w<v.length;w+=2){let E=v[w+0],C=v[w+1];E*=o,C*=a;const D=l*E-h*C,$=h*E+l*C;v[w+0]=D+m[0],v[w+1]=$+m[1]}return v})}function Ro(s,t,e,n,r,i){return[s/3+.6666666666666666*e,t/3+.6666666666666666*n,r/3+.6666666666666666*e,i/3+.6666666666666666*n,r,i]}function us(s,t,e,n){return[s,t,e,n,e,n]}const fs={a:7,c:6,s:4,q:4,t:2,m:2,l:2,h:1,v:1,z:0};class gn{static createSVGElement(t="path",e){const n=document.createElementNS.call(document,"http://www.w3.org/2000/svg",t);return e&&Ne(n,e),n}static createSvgPath(t,e){return this.createSVGElement("path",{d:t,id:e||Fi()})}static downloadFromSVGElement(t,e="shape"){return Ir(oo(t),`${e}.svg`)}static downloadFromSVGString(t,e="shape"){return Ir(Ti(t),`${e}.svg`)}static getSVGRawStringFromElement(t){return io(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 gn.isSVGPath(t)&&t.replace(/([mlhvzaqtcs])([^mlhvzaqtcs]*)/gi,(n,r,i)=>{let o=r.toLowerCase();const a=ki(i);for(o=="m"&&a.length>fs[o]&&(e.push([r,...a.splice(0,fs[o])]),o="l",r=r=="m"?"l":"L");a.length;){if(a.length<fs[o])throw new Error(`parseSVGPath substring:{ ${n} } command:{ ${r} } args:{ ${a} }`);e.push([r,...a.splice(0,fs[o])])}return o=="z"&&e.push([r]),""}),e}static absolutizeSVGPath(t){let e=0,n=0,r=0,i=0;return t.map(function(o){const a=o[0],c=a.toUpperCase();if(a!=c)switch(o[0]=c,a){case"a":o[6]+=r,o[7]+=i;break;case"v":o[1]+=i;break;case"h":o[1]+=r;break;default:for(let h=1;h<o.length;)o[h++]+=r,o[h++]+=i}switch(c){case"Z":r=e,i=n;break;case"H":r=o[1];break;case"V":i=o[1];break;case"M":r=e=o[1],i=n=o[2];break;default:r=o[o.length-2],i=o[o.length-1]}return o})}static relativeSVGPath(t){let e=0,n=0,r=0,i=0;return t.map(function(o){const a=o[0],c=a.toLowerCase();if(a!=c)switch(o[0]=c,a){case"A":o[6]-=r,o[7]-=i;break;case"V":o[1]-=i;break;case"H":o[1]-=r;break;default:for(let h=1;h<o.length;)o[h++]-=r,o[h++]-=i}switch(c){case"z":r=e,i=n;break;case"h":r+=o[1];break;case"v":i+=o[1];break;case"m":r+=o[1],i+=o[2],e+=o[1],n+=o[2];break;default:r+=o[o.length-2],i+=o[o.length-1]}return o})}static normalizeSVGPath(t){const e=[];let n=0,r=0,i=0,o=0,a=0,c=0,h=0,l=0,u;for(let d=0,f=t.length;d<f;d++){let m=t[d];const p=m[0];switch(p){case"M":n=m[1],r=m[2];break;case"A":const _=Wl(i,o,m[6],m[7],m[4],m[5],m[1],m[2],m[3]);if(!_.length)continue;_.forEach((v,w)=>{const[E,C,D,$,O,U,V,q]=v;m=["C",D,$,O,U,V,q],w<_.length-1&&e.push(m)});break;case"S":let y=i,b=o;(u=="C"||u=="S")&&(y+=y-h,b+=b-l),m=["C",y,b,m[1],m[2],m[3],m[4]];break;case"T":u=="Q"||u=="T"?(a=i*2-a,c=o*2-c):(a=i,c=o),m=["C",...Ro(i,o,a,c,m[1],m[2])];break;case"Q":a=m[1],c=m[2],m=["C",...Ro(i,o,m[1],m[2],m[3],m[4])];break;case"L":m=["C",...us(i,o,m[1],m[2])];break;case"H":m=["C",...us(i,o,m[1],o)];break;case"V":m=["C",...us(i,o,i,m[1])];break;case"Z":m=["C",...us(i,o,n,r)];break}u=p,i=m[m.length-2],o=m[m.length-1],m.length>4?(h=m[m.length-4],l=m[m.length-3]):(h=i,l=o),e.push(m)}return e}static catmullRom2bezier(t){const e=[];for(let n=0,r=t.length;r-2>n;n+=2){let i;n==0?i=[{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]}]:r-4==n?i=[{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]}]:i=[{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:i[1].x,y:i[1].y},{x:(-i[0].x+6*i[1].x+i[2].x)/6,y:(-i[0].y+6*i[1].y+i[2].y)/6},{x:(i[1].x+6*i[2].x-i[3].x)/6,y:(i[1].y+6*i[2].y-i[3].y)/6},{x:i[2].x,y:i[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],r;for(let i=0,o=t.length;i<o;i++){const a=t[i];switch(a[0]){case"M":n=["L",a[1],a[2]],e.push(a);break;case"Z":e.push(n);break;case"H":r=e[e.length-1]||["L",0,0],e.push(["L",a[1],r[r.length-1]]);break;case"V":r=e[e.length-1]||["L",0,0],e.push(["L",r[r.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,r=0,i=0;for(let o=0,a=t.length;o<a;o++){const c=t[o],h=e[c[0]];h&&(c[0]=h.to,n&&(n[0]===h.to?(r=2*Number(n[h.x+2])-Number(n[h.x]),i=2*Number(n[h.x+3])-Number(n[h.x+1])):(r=Number(n[n.length-2]),i=Number(n[n.length-1]))),c.splice(1,0,r,i)),n=c}return t}}let C1=class Xe{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(gn.parseSVGPath(t),e):t instanceof Xe?this.resetFromSVGPathData(t.toSVGPathData(),e):this.resetFromSVGPathData(t||[],e)}resetFromSVGPathData(t,e){this.normalizedLines=[];const n=gn.normalizeSVGPath(gn.absolutizeSVGPath(t));this.prevPathX=this.startPathX=0,this.prevPathY=this.startPathY=0;let r=!1;for(let i=0,o=n.length;i<o;i++){const a=n[i];if(a[0]=="M"){r||(r=!0,this.startPathX=a[1],this.startPathY=a[2]),this.prevPathX=a[1],this.prevPathY=a[2];continue}this.appendLine(new tn({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 Xe;e.prevPathX=e.startPathX=t[0]||0,e.prevPathY=e.startPathY=t[1]||0;for(let n=2,r=t.length;n+5<r;n+=6)e.appendLine(new tn({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 Xe;e.prevPathX=e.startPathX=t[0].x||0,e.prevPathY=e.startPathY=t[0].y||0;for(let n=0,r=t.length;n<r;n++)e.appendLine(t[n]);return e}appendLine(t){if(t instanceof v1){Wl(this.prevPathX,this.prevPathY,t.toX,t.toY,t.largeArcFlag,t.sweepFlag,t.rx,t.ry,t.xAxisRotate).forEach(h=>{const[l,u,d,f,m,p,_,y]=h;this.normalizedLines.push(new tn({x:this.prevPathX,y:this.prevPathY,c1x:d,c1y:f,c2x:m,c2y:p,toX:_,toY:y})),this.prevPathX=_,this.prevPathY=y});return}let e,n,r,i,o,a;t instanceof tn?(e=t.c1x,n=t.c1y,r=t.c2x,i=t.c2y,o=t.toX,a=t.toY):t instanceof x1?[e,n,r,i,o,a]=Ro(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,n,r,i,o,a]=us(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new tn({x:this.prevPathX,y:this.prevPathY,c1x:e,c1y:n,c2x:r,c2y:i,toX:o,toY:a})),this.prevPathX=o,this.prevPathY=a}toSVGPathData(){const{startPathX:t,startPathY:e,normalizedLines:n}=this.updateTransform(),r=[];r.push(["M",t,e]);for(let i=0,o=n.length;i<o;i++)r.push(...n[i].toSVGPathData());return r}toSVGPathD(){return gn.SVGPathDataToD(this.toSVGPathData())}toCanvasContext(t){const{startPathX:e,startPathY:n,normalizedLines:r}=this.updateTransform();t.beginPath(),t.moveTo(e,n),r.forEach(i=>{i.toCanvasContext(t)})}getBoundingClientRect(){const{normalizedLines:t}=this.updateTransform(),e=[],n=[];if(t.forEach(c=>{const h=c.getBoundingClientRect();e.push(h.x,h.x+h.width),n.push(h.y,h.y+h.height)}),e.length==0||n.length==0)return{x:0,y:0,width:0,height:0};const r=Math.min.apply(0,e),i=Math.min.apply(0,n),o=Math.max.apply(0,e),a=Math.max.apply(0,n);return{x:r,y:i,width:o-r,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 Yt;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 r=[];return this.normalizedLines.forEach(i=>{let o=i.x,a=i.y,c=i.c1x,h=i.c1y,l=i.c2x,u=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:l,y:u}=t.transformPoint({x:l,y:u}),{x:d,y:f}=t.transformPoint({x:d,y:f}),r.push(new tn({x:o,y:a,c1x:c,c1y:h,c2x:l,c2y:u,toX:d,toY:f}))}),{startPathX:e,startPathY:n,normalizedLines:r}}}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 r=e.length;for(let i=0;i<r;i++){const o=e[i],a=o.length();if(n+a>=t)return o.getPointAtSegmentLength(t-n);n+=a}return e[r-1].getPointAtSegmentLength(1)}interpolate(t){const{startPathX:e,startPathY:n,normalizedLines:r}=this.updateTransform(),i=r.length;if(i===0)return{x:e,y:n};if(i===1)return r[0].interpolate(t);{let o=t*i,a=r[0];if(o--,o>1)for(let c=1;c<i&&(a=r[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 n=this.getSubpathsAtLength(this,e,1);return t?this.getSubpathsAtLength(n,t):n}}getSubpathsAtLength(t,e,n){const{startPathX:r,startPathY:i,normalizedLines:o}=t.updateTransform();let a=null,c=0;const h=new Xe;h.prevPathX=h.startPathX=r,h.prevPathY=h.startPathY=i;for(let l=0,u=o.length;l<u;l++){const d=o[l],f=d.length();if(c+f>e&&!a){const m=d.getPointAtSegmentLength(e-c);if(h.appendLine(new tn({c1x:m.start.x,c1y:m.start.y,c2x:m.m.x,c2y:m.m.y,toX:m.x,toY:m.y})),n)return h;a=h,h.appendLine(new tn({c1x:m.n.x,c1y:m.n.y,c2x:m.end.x,c2y:m.end.y,toX:d.x,toY:d.y})),c+=f;continue}c+=f,h.appendLine(d)}return h}closestPoint(t,e){const n=this.getTotalLength();let r={x:t,y:e},i=0,o=1/0,a=8;for(let h=0;h<=n;h+=a){const l=this.getPointAtLength(h),u=Math.pow(Ze(l.x,l.y,t,e),2);u<o&&(r=l,i=h,o=u)}for(a/=2;a>.5;){const h=i-a,l=this.getPointAtLength(h),u=Math.pow(Ze(l.x,l.y,t,e),2),d=i+a,f=this.getPointAtLength(d),m=Math.pow(Ze(f.x,f.y,t,e),2);h>=0&&u<o?(r=l,i=h,o=u):d<=n&&m<o?(r=f,i=d,o=m):a/=2}const c=this.getPointAtLength(i+(i===n?-.1:.1));return{point:r,rotation:i>=n?se(c.x,c.y,r.x,r.y):se(r.x,r.y,c.x,c.y),distance:Math.sqrt(o)}}get polymorphPoints(){const{startPathX:t,startPathY:e,normalizedLines:n}=this.updateTransform();return[t,e].concat(n.reduce((r,i)=>r.concat([i.c1x,i.c1y,i.c2x,i.c2y,i.toX,i.toY]),[]))}perimeterPoints(){const t=this.polymorphPoints,e=t.length;let n=t[e-2],r=t[e-1],i=0;for(let o=0;o<e;o+=6)i+=Ze(t[o],t[o+1],n,r),n=t[o],r=t[o+1];return Math.floor(i)}expendFill(t){const e=this.polymorphPoints,n=e.length;let r=t-n;const i=Math.ceil(t/n),o=[];o.push(["M",e[0],e[1]]);let a=2;for(;a+5<=n-1;){const c=e[a++],h=e[a++],l=e[a++],u=e[a++],d=e[a++],f=e[a++];o.push(["C",c,h,l,u,d,f]);let m=0;for(;m<i&&r>0;)o.push(["C",d,f,d,f,d,f]),r-=6,m++}return o}static mixPoints(t,e,n){const r=t.length,i=new Array(r);for(let o=0;o<r;o++)i[o]=Z(t[o]+(e[o]-t[o])*n,6);return i}static getPathInterpolator(t,e){return n=>Math.abs(n-0)<Number.EPSILON?t:Math.abs(n-1)<Number.EPSILON?e:Xe.fromPolymorphPoints(Xe.mixPoints(new Xe({d:t}).polymorphPoints,new Xe({d:e}).polymorphPoints,n)).toSVGPathData()}};class ds{static _nextId=0;static nextId(){return ds._nextId++}}const X={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-X.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?X.Bounce.In(s*2)*.5:X.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 Jl(s){switch(s){case X.Quadratic.In:return X.Quadratic.Out;case X.Quadratic.Out:return X.Quadratic.In;case X.Quadratic.InOut:return X.Quadratic.InOut;case X.Cubic.In:return X.Cubic.Out;case X.Cubic.Out:return X.Cubic.In;case X.Cubic.InOut:return X.Cubic.InOut;case X.Quartic.In:return X.Quartic.Out;case X.Quartic.Out:return X.Quartic.In;case X.Quartic.InOut:return X.Quartic.InOut;case X.Quintic.In:return X.Quintic.Out;case X.Quintic.Out:return X.Quintic.In;case X.Quintic.InOut:return X.Quintic.InOut;case X.Sinusoidal.In:return X.Sinusoidal.Out;case X.Sinusoidal.Out:return X.Sinusoidal.In;case X.Sinusoidal.InOut:return X.Sinusoidal.InOut;case X.Exponential.In:return X.Exponential.Out;case X.Exponential.Out:return X.Exponential.In;case X.Exponential.InOut:return X.Exponential.InOut;case X.Circular.In:return X.Circular.Out;case X.Circular.Out:return X.Circular.In;case X.Circular.InOut:return X.Circular.InOut;case X.Elastic.In:return X.Elastic.Out;case X.Elastic.Out:return X.Elastic.In;case X.Elastic.InOut:return X.Elastic.InOut;case X.Back.In:return X.Back.Out;case X.Back.Out:return X.Back.In;case X.Back.InOut:return X.Back.InOut;case X.Bounce.In:return X.Bounce.Out;case X.Bounce.Out:return X.Bounce.In;case X.Bounce.InOut:return X.Bounce.InOut;default:return s}}const E1=4,T1=.001,P1=1e-7,A1=10,ms=11,Tr=1/(ms-1),M1=typeof Float32Array=="function";function Kl(s,t){return 1-3*t+3*s}function Zl(s,t){return 3*t-6*s}function Ql(s){return 3*s}function Pr(s,t,e){return((Kl(t,e)*s+Zl(t,e))*s+Ql(t))*s}function tu(s,t,e){return 3*Kl(t,e)*s*s+2*Zl(t,e)*s+Ql(t)}function k1(s,t,e,n,r){let i,o,a=0;do o=t+(e-t)/2,i=Pr(o,n,r)-s,i>0?e=o:t=o;while(Math.abs(i)>P1&&++a<A1);return o}function I1(s,t,e,n){for(let r=0;r<E1;++r){const i=tu(t,e,n);if(i===0)return t;const o=Pr(t,e,n)-s;t-=o/i}return t}function D1(s){return s}function Lo(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 D1;const r=M1?new Float32Array(ms):new Array(ms);for(let o=0;o<ms;++o)r[o]=Pr(o*Tr,s,e);function i(o){let a=0,c=1;const h=ms-1;for(;c!==h&&r[c]<=o;++c)a+=Tr;--c;const l=(o-r[c])/(r[c+1]-r[c]),u=a+l*Tr,d=tu(u,s,e);return d>=T1?I1(o,u,s,e):d===0?u:k1(o,a,a+Tr,s,e)}return o=>o===0||o===1?o:Pr(i(o),t,n)}function zo(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 eu(s){const[t,e,n,r]=zo(s);return[1-n,1-r,1-t,1-e]}function O1(s){return Lo(...zo(s))}function R1(s){return Lo(...eu(s))}const ze={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=ze.Utils.Factorial;return e(s)/e(t)/e(s-t)},CatmullRom:function(s,t,e,n,r){const i=(e-s)*.5,o=(n-t)*.5,a=r*r,c=r*a;return(2*t-2*e+i+o)*c+(-3*t+3*e-2*i-o)*a+i*r+t},QuadraticBezier:(s,t,e,n)=>{const r=1-n;return r*r*s+2*r*n*t+n*n*e},CubicBezier:(s,t,e,n,r)=>{const i=1-r;return i*i*i*s+3*i*i*r*t+3*i*r*r*e+r*r*r*n}},Linear:function(s,t){const e=s.length-1,n=e*t,r=Math.floor(n),i=ze.Utils.Linear;return t<0?i(s[0],s[1],n):t>1?i(s[e],s[e-1],e-n):i(s[r],s[r+1>e?e:r+1],n-r)},Bezier:function(s,t){let e=0;const n=s.length-1,r=Math.pow,i=ze.Utils.Bernstein;for(let o=0;o<=n;o++)e+=r(1-t,n-o)*r(t,o)*s[o]*i(n,o);return e},CatmullRom:function(s,t){const e=s.length-1;let n=e*t,r=Math.floor(n);const i=ze.Utils.CatmullRom;return s[0]===s[e]?(t<0&&(r=Math.floor(n=e*(1+t))),i(s[(r-1+e)%e],s[r],s[(r+1)%e],s[(r+2)%e],n-r)):t<0?s[0]-(i(s[0],s[0],s[1],s[1],-n)-s[0]):t>1?s[e]-(i(s[e],s[e],s[e-1],s[e-1],n-e)-s[e]):i(s[r?r-1:0],s[r],s[e<r+1?e:r+1],s[e<r+2?e:r+2],n-r)}};class nu{_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=Et(),e=!1){const n=Object.keys(this._tweens);for(let r=0;r<n.length;r++){const i=this._tweens[n[r]],o=!e;i&&i.update(t,o)===!1&&!e&&delete this._tweens[n[r]]}return!!Object.keys(this._tweens).length}}const he=new nu;class No{constructor(t,e=he){this._object=t,this._group=e}_id=ds.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=X.Linear.None;_interpolationFunction=ze.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=Et()){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,r){for(const i in n){const o=t[i],a=Array.isArray(o),c=a?"array":typeof o,h=!a&&Array.isArray(n[i]);if(!(c==="undefined"||c==="function")){if(h){let l=n[i];if(l.length===0)continue;l=l.map(this._handleRelativeValue.bind(this,o)),n[i]=[o].concat(l)}if((c==="object"||a)&&o&&!h){e[i]=a?[]:{};for(const l in o)e[i][l]=o[l];r[i]=a?[]:{},this._setupProperties(o,e[i],n[i],r[i])}else typeof e[i]>"u"&&(e[i]=o),a||(e[i]*=1),h?r[i]=n[i].slice().reverse():r[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=Et()){return this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStartTime=t,this._group&&this._group.remove(this),this)}resume(t=Et()){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=he){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=X.Linear.None){return this._easingFunction=t,this}interpolation(t=ze.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=Et(),e=!0){if(this._isPaused)return!0;let n,r;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),r=(t-this._startTime)/this._durationTime,r=this._durationTime===0||r>1?1:r;const o=this._easingFunction(r);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,o),this._onUpdateCallback&&this._onUpdateCallback(this._object,r),r===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,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,n,r){for(const i in n){if(e[i]===void 0)continue;const o=e[i]||0;let a=n[i];const c=Array.isArray(t[i]),h=Array.isArray(a);!c&&h?t[i]=this._interpolationFunction(a,r):typeof a=="object"&&a?this._updateProperties(t[i],o,a,r):(a=this._handleRelativeValue(o,a),typeof a=="number"&&(t[i]=o+(a-o)*r))}}_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 L1=ds.nextId,z1=he.getAll.bind(he),N1=he.removeAll.bind(he),F1=he.add.bind(he),B1=he.remove.bind(he),U1=he.update.bind(he),$1={now:Et,Sequence:ds,Easing:X,Interpolation:ze,Group:nu,Tween:No,nextId:L1,getAll:z1,removeAll:N1,add:F1,remove:B1,update:U1};class Fo{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=Et(),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=Et();t=e-this.oldTime,this.oldTime=e,this.elapsedTime+=t}return t}}class ps{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){Jg(this.tweens,(e,n)=>t?e.delay>n.delay:e.delay<=n.delay)}cloneTweens(t=this.tweens){const e=[];return t.forEach(n=>{const r={...n};delete r.tween,r.fromValues={...r.fromValues},r.toValues={...r.toValues},e.push(r)}),e}addTween(t,e,n){const r={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||X.Linear.None,interpolationFunction:n?.interpolationFunction||ze.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(r),this}cancelRequestAnimationCycle=()=>{};runTweens(t){this.cancelRequestAnimationCycle();const e=new Fo,n=this.frameDuration;return new Promise(r=>{this.onGroupStart?.(),this.cancelRequestAnimationCycle=Fm(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*n<=c).forEach(h=>{h.tween||(h.tween=new No({...h.fromValues}).to({...h.toValues},h.frames*n).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))*n>c?h.tween.update(a):(h.tween.isPlaying()&&h.tween.end(),Ii(t,h))})}const o=!!t.length;return o||(this.onGroupComplete?.(),r()),o})})}isPaused=!1;pausedClock=new Fo;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=Jl(n.easeFunction);const r={...n.toValues};n.toValues={...n.fromValues},n.fromValues={...r}}),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}}let Y1=class extends nr{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=Fi(),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=ki(e).reduce((n,r)=>n+r,0)}this.state=ih(this)}forceSetCXY(t,e){this.cX=t,this.cY=e,this.forceCXY=!0}shapeInit(){}initPathD(){if(!this.pathd){if(this.pathd=new C1,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(n=>{const r=n.originMatrix?n.originMatrix.clone():new Yt;r.translate(-t.x+n.x,-t.y+n.y),n.originMatrix=r});const e=this.originMatrix?this.originMatrix.clone():new Yt;e.translate(-t.x+this.x,-t.y+this.y),this.originMatrix=e}isPointInPath(t,e,n){if(n instanceof Do)return n.isPointInPath(new Path2D(this.toSVGPathD()),t,e);let r;try{r=new SVGPoint(t,e)}catch{r=n.createSVGPoint(),r.x=t,r.y=e}if(this.el instanceof SVGGeometryElement)return this.el.isPointInFill(r);{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,n){if(n instanceof Do)return n.isPointInStroke(new Path2D(this.toSVGPathD()),t,e);let r;try{r=new SVGPoint(t,e)}catch{r=n.createSVGPoint(),r.x=t,r.y=e}return this.el instanceof SVGGeometryElement?this.el.isPointInStroke(r):!1}clone(){return Im(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,r])=>[Nt(n),r]))):e&&(this.attrs[Nt(t)]=e)}getAttr(t,e){return this.attrs[t]||this.attrs[Nt(t)]||e}getAttrs(){return this.attrs}hasAttr(t){return!!this.attrs[t]||!!this.attrs[Nt(t)]}distance(t){return Ze(this.x,this.y,t.x,t.y)}rotateTo(t){this.degree=Ut(se(this.x,this.y,t.x,t.y))}followTo(t,e=3){this.rotateTo(t);const{dx:n,dy:r}=Qe(ut(this.degree),e);this.vx=n,this.vy=r,this.run()}followAccelerationTo(t,e=.05){this.rotateTo(t);const{dx:n,dy:r}=Qe(ut(this.degree),e);this.ax=n,this.ay=r,this.run()}checkCollision(t){}checkWall(t){}gravitateTo(t){const e=t.x-this.x,n=t.y-this.y,r=e*e+n*n,i=Math.sqrt(r),o=this.mass*t.mass/r,a=o*e/i,c=o*n/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=ae(t?.gravity,0);this.vy+=e;const n=ae(t?.friction,1);this.vx*=n,this.vy*=n,this.x+=this.vx,this.y+=this.vy}runEaseTo(t,e){const n=ae(e?.easing,.05),r=t.x-this.cX-this.x,i=t.y-this.cY-this.y;this.vx=r*n,this.vy=i*n,this.run(e)}runSpringTo(t,e){const n=ae(e?.spring,.03);(Array.isArray(t)?t:[t]).forEach(r=>{const i=r.x-this.cX-this.x,o=r.y-this.cY-this.y,a=i*n,c=o*n;this.vx+=a,this.vy+=c}),this.run({friction:.9,...e})}springMassTo(t,e){const n=ae(e?.springLength,100),r=ae(e?.spring,1e-4),i=t.x-this.x,o=t.y-this.y,a=Math.sqrt(i*i+o*o);if(a<n){const c=i*r,h=o*r;return this.vx+=c/this.mass,this.vy+=h/this.mass,t.vx-=c/t.mass,t.vy-=h/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(),r=Z(n.getTotalLength(),0);this.setAttr({strokeDasharray:`${r} ${r}`,strokeDashoffset:`${r}`});const i=e?.onUpdate,o=new ps({frameDuration:t});o.addTween({offset:r},{offset:0},Object.assign(e||{},{onUpdate:(a,c)=>{this.setAttr("strokeDashoffset",""+Z(a.offset,2)),i?.(a,c)}})),o.play()}};class j1 extends Y1{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}=me(ut(t),this.y,this.z))}rotateY(t){({x:this.x,y:this.z}=me(ut(t),this.x,this.z))}rotateZ(t){({x:this.x,y:this.y}=me(ut(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 Bn(this.x,this.y,this.z)}distance(t){const e=t.x-this.x,n=t.y-this.y,r=t.z-this.z;return Math.sqrt(e*e+n*n+r*r)}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,r=this.z;return{x:n*t.z-r*t.y,y:r*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 Ar=j1,gs=2e3,Bo=2001,su=[1,0,0,1],ru=[1,0,0,1,0,0],iu=[1,0,0,0,1,0,0,0,1],ou=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];class Uo{value;constructor(t=su){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,r=1){return this.m11=t,this.m21=e,this.m12=n,this.m22=r,this}identity(){return this.value=Array.from(su),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 Uo(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,r=e.value,i=this.value,o=n[0],a=n[2],c=n[1],h=n[3],l=r[0],u=r[2],d=r[1],f=r[3];return i[0]=o*l+a*d,i[2]=o*u+a*f,i[1]=c*l+h*d,i[3]=c*u+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 Mr{value;constructor(t=iu){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,r=0,i=1,o=0,a=0,c=0,h=1){const l=this.value;return l[0]=t,l[1]=r,l[2]=a,l[3]=e,l[4]=i,l[5]=c,l[6]=n,l[7]=o,l[8]=h,this}identity(){return this.value=Array.from(iu),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 Mr(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,r=e.value,i=this.value,o=n[0],a=n[3],c=n[6],h=n[1],l=n[4],u=n[7],d=n[2],f=n[5],m=n[8],p=r[0],_=r[3],y=r[6],b=r[1],v=r[4],w=r[7],E=r[2],C=r[5],D=r[8];return i[0]=o*p+a*b+c*E,i[3]=o*_+a*v+c*C,i[6]=o*y+a*w+c*D,i[1]=h*p+l*b+u*E,i[4]=h*_+l*v+u*C,i[7]=h*y+l*w+u*D,i[2]=d*p+f*b+m*E,i[5]=d*_+f*v+m*C,i[8]=d*y+f*w+m*D,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],r=t[2],i=t[3],o=t[4],a=t[5],c=t[6],h=t[7],l=t[8];return e*o*l-e*a*h-n*i*l+n*a*c+r*i*h-r*o*c}inverse(){const t=this.value,e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],c=t[6],h=t[7],l=t[8],u=l*o-a*h,d=a*c-l*i,f=h*i-o*c,m=e*u+n*d+r*f;if(m===0)return this.set(0,0,0,0,0,0,0,0,0);const p=1/m;return t[0]=u*p,t[1]=(r*h-l*n)*p,t[2]=(a*n-r*o)*p,t[3]=d*p,t[4]=(l*e-r*c)*p,t[5]=(r*i-a*e)*p,t[6]=f*p,t[7]=(n*c-h*e)*p,t[8]=(o*e-n*i)*p,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,r,i,o,a){const c=Math.cos(i),h=Math.sin(i);return this.set(n*c,n*h,-n*(c*o+h*a)+o+t,-r*h,r*c,-r*(-h*o+c*a)+a+e,0,0,1),this}scale(t,e){return this.premultiply(Yo.makeScale(t,e)),this}rotate(t){return this.premultiply(Yo.makeRotation(-t)),this}translate(t,e){return this.premultiply(Yo.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 Qt{value;is3dSpecial=!1;constructor(t=ou){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,r=0,i=0,o=1,a=0,c=0,h=0,l=0,u=1,d=0,f=0,m=0,p=0,_=1){const y=this.value;return y[0]=t,y[4]=e,y[8]=n,y[12]=r,y[1]=i,y[5]=o,y[9]=a,y[13]=c,y[2]=h,y[6]=l,y[10]=u,y[14]=d,y[3]=f,y[7]=m,y[11]=p,y[15]=_,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(ou),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 Qt(this.value)}static fromString(t){const e=new Qt,n=Uc("number",t);return n.length===16&&n.forEach((r,i)=>{r.fullMatch&&(e.value[i]=parseFloat(r.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:r,skewY:i,x:o,y:a}=this.split(),c=[e,i,r,n,o,a];return t?(t.value=c,t):new Yt(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=>Z(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),r=Ut(K(Math.asin(-this.m13),-1,1));let i=Ut(Math.atan2(this.m23,this.m33));Math.cos(ut(r))===0&&(i=Ut(Math.atan2(-this.m31,this.m22)));let o=Ut(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:i,degreeY:r,degreeZ:o,skewX:Ut(this.m14),skewY:Ut(this.m24),skewZ:Ut(this.m34),skewW:this.m44,perspective:this.m34?-(1/this.m34):0}}extractRotation(t){const e=this.value,n=t.value,r=1/$o.setFromMatrix4Column(t,0).length(),i=1/$o.setFromMatrix4Column(t,1).length(),o=1/$o.setFromMatrix4Column(t,2).length();return e[0]=n[0]*r,e[1]=n[1]*r,e[2]=n[2]*r,e[3]=0,e[4]=n[4]*i,e[5]=n[5]*i,e[6]=n[6]*i,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}lookAt(t,e,n){const r=this.value;return re.subVectors(t,e),re.lengthSq()===0&&(re.z=1),re.normalize(),en.crossVectors(n,re),en.lengthSq()===0&&(Math.abs(n.z)===1?re.x+=1e-4:re.z+=1e-4,re.normalize(),en.crossVectors(n,re)),en.normalize(),kr.crossVectors(re,en),r[0]=en.x,r[4]=kr.x,r[8]=re.x,r[1]=en.y,r[5]=kr.y,r[9]=re.y,r[2]=en.z,r[6]=kr.z,r[10]=re.z,this}multiplyMatrices(t,e){const n=t.value,r=e.value,i=this.value,o=n[0],a=n[4],c=n[8],h=n[12],l=n[1],u=n[5],d=n[9],f=n[13],m=n[2],p=n[6],_=n[10],y=n[14],b=n[3],v=n[7],w=n[11],E=n[15],C=r[0],D=r[4],$=r[8],O=r[12],U=r[1],V=r[5],q=r[9],ft=r[13],pt=r[2],zt=r[6],wt=r[10],It=r[14],Xt=r[3],Y=r[7],N=r[11],A=r[15];return i[0]=o*C+a*U+c*pt+h*Xt,i[4]=o*D+a*V+c*zt+h*Y,i[8]=o*$+a*q+c*wt+h*N,i[12]=o*O+a*ft+c*It+h*A,i[1]=l*C+u*U+d*pt+f*Xt,i[5]=l*D+u*V+d*zt+f*Y,i[9]=l*$+u*q+d*wt+f*N,i[13]=l*O+u*ft+d*It+f*A,i[2]=m*C+p*U+_*pt+y*Xt,i[6]=m*D+p*V+_*zt+y*Y,i[10]=m*$+p*q+_*wt+y*N,i[14]=m*O+p*ft+_*It+y*A,i[3]=b*C+v*U+w*pt+E*Xt,i[7]=b*D+v*V+w*zt+E*Y,i[11]=b*$+v*q+w*wt+E*N,i[15]=b*O+v*ft+w*It+E*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],n=t[4],r=t[8],i=t[12],o=t[1],a=t[5],c=t[9],h=t[13],l=t[2],u=t[6],d=t[10],f=t[14],m=t[3],p=t[7],_=t[11],y=t[15];return m*(+i*c*u-r*h*u-i*a*d+n*h*d+r*a*f-n*c*f)+p*(+e*c*f-e*h*d+i*o*d-r*o*f+r*h*l-i*c*l)+_*(+e*h*u-e*a*f-i*o*u+n*o*f+i*a*l-n*h*l)+y*(-r*a*l-e*c*u+e*a*d+r*o*u-n*o*d+n*c*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 r=this.value;return t instanceof ve?(r[12]=t.x,r[13]=t.y,r[14]=t.z):typeof t=="number"&&typeof e=="number"&&typeof n=="number"&&(r[12]=t,r[13]=e,r[14]=n),this}inverse(){const t=this.value,e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],c=t[6],h=t[7],l=t[8],u=t[9],d=t[10],f=t[11],m=t[12],p=t[13],_=t[14],y=t[15],b=u*_*h-p*d*h+p*c*f-a*_*f-u*c*y+a*d*y,v=m*d*h-l*_*h-m*c*f+o*_*f+l*c*y-o*d*y,w=l*p*h-m*u*h+m*a*f-o*p*f-l*a*y+o*u*y,E=m*u*c-l*p*c-m*a*d+o*p*d+l*a*_-o*u*_,C=e*b+n*v+r*w+i*E;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const D=1/C;return t[0]=b*D,t[1]=(p*d*i-u*_*i-p*r*f+n*_*f+u*r*y-n*d*y)*D,t[2]=(a*_*i-p*c*i+p*r*h-n*_*h-a*r*y+n*c*y)*D,t[3]=(u*c*i-a*d*i-u*r*h+n*d*h+a*r*f-n*c*f)*D,t[4]=v*D,t[5]=(l*_*i-m*d*i+m*r*f-e*_*f-l*r*y+e*d*y)*D,t[6]=(m*c*i-o*_*i-m*r*h+e*_*h+o*r*y-e*c*y)*D,t[7]=(o*d*i-l*c*i+l*r*h-e*d*h-o*r*f+e*c*f)*D,t[8]=w*D,t[9]=(m*u*i-l*p*i-m*n*f+e*p*f+l*n*y-e*u*y)*D,t[10]=(o*p*i-m*a*i+m*n*h-e*p*h-o*n*y+e*a*y)*D,t[11]=(l*a*i-o*u*i-l*n*h+e*u*h+o*n*f-e*a*f)*D,t[12]=E*D,t[13]=(l*p*r-m*u*r+m*n*d-e*p*d-l*n*_+e*u*_)*D,t[14]=(m*a*r-o*p*r-m*n*c+e*p*c+o*n*_-e*a*_)*D,t[15]=(o*u*r-l*a*r+l*n*c-e*u*c-o*n*d+e*a*d)*D,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],r=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,r))}makeTranslation(t,e,n){return t instanceof ve?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),r=Math.sin(e),i=1-n,o=t.x,a=t.y,c=t.z,h=i*o,l=i*a;return this.set(h*o+n,h*a-r*c,h*c+r*a,0,h*a+r*c,l*a+n,l*c-r*o,0,h*c-r*a,l*c+r*o,i*c*c+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,r,i,o){return this.set(1,n,i,0,t,1,o,0,e,r,1,0,0,0,0,1),this}makePerspective(t,e,n,r,i,o,a=gs){const c=this.value,h=2*i/(e-t),l=2*i/(n-r),u=(e+t)/(e-t),d=(n+r)/(n-r);let f,m;if(a===gs)f=-(o+i)/(o-i),m=-2*o*i/(o-i);else if(a===Bo)f=-o/(o-i),m=-o*i/(o-i);else throw new Error("Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=h,c[4]=0,c[8]=u,c[12]=0,c[1]=0,c[5]=l,c[9]=d,c[13]=0,c[2]=0,c[6]=0,c[10]=f,c[14]=m,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(t,e,n,r,i,o,a=gs){const c=this.value,h=1/(e-t),l=1/(n-r),u=1/(o-i),d=(e+t)*h,f=(n+r)*l;let m,p;if(a===gs)m=(o+i)*u,p=-2*u;else if(a===Bo)m=i*u,p=-1*u;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*l,c[9]=0,c[13]=-f,c[2]=0,c[6]=0,c[10]=p,c[14]=-m,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,n=0){return this.multiply(new Qt([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 Qt([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,r=t.y,i=t.z;return e[0]*=n,e[4]*=r,e[8]*=i,e[1]*=n,e[5]*=r,e[9]*=i,e[2]*=n,e[6]*=r,e[10]*=i,e[3]*=n,e[7]*=r,e[11]*=i,this}rotateX(t){const e=ut(t),n=Math.cos(e),r=Math.sin(e);return this.multiply(new Qt([1,0,0,0,0,n,r,0,0,-r,n,0,0,0,0,1]))}rotateY(t){const e=ut(t),n=Math.cos(e),r=Math.sin(e);return this.multiply(new Qt([n,0,-r,0,0,1,0,0,r,0,n,0,0,0,0,1]))}rotateZ(t){this.is3dSpecial=!0;const e=ut(t),n=Math.cos(e),r=Math.sin(e);return this.multiply(new Qt([n,r,0,0,-r,n,0,0,0,0,1,0,0,0,0,1]))}skew(t=0,e=0,n=0){return this.multiply(new Qt([1,0,0,ut(t),0,1,0,ut(e),0,0,1,ut(n),0,0,0,1]))}perspective(t){return this.multiply(new Qt([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,r=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=n+this.m32,c=r+this.m33,h=i+this.m34;i==0&&(i=1e-4),e/=i,n/=i,r/=i,h==0&&(h=1e-4),o/=h,a/=h,c/=h;const l=c-r;if(l==0)return{x:e,y:n,z:r,mass:i};const u=-r/l;return e+=u*(o-e),n+=u*(a-n),{x:e,y:n,z:r,mass:i}}project(t){const e=t.z;let n=t.x*this.m11+t.y*this.m21+e*this.m31+this.m41,r=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),n/=i,r/=i,i<0&&(n-=this.m41,r-=this.m42,n*=1/i,r*=1/i,n+=this.m41,r+=this.m42),{x:n,y:r,z:e,mass:i}}bounds(t,e,n,r){const i=new Ar({x:t,y:e}),o=new Ar({x:t+n,y:e}),a=new Ar({x:t+n,y:e+r}),c=new Ar({x:t,y:e+r});({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),l=Math.min(i.y,o.y,a.y,c.y),u=Math.max(i.x,o.x,a.x,c.x)-h,d=Math.max(i.y,o.y,a.y,c.y)-l;return{x:h,y:l,width:u,height:d}}}class Yt{value;_m13=0;_m23=0;_m33=1;matrix4;constructor(t=ru){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 Yt,n=Uc("number",t);return n.length===6&&n.forEach((r,i)=>{r.fullMatch&&(e.value[i]=parseFloat(r.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 Qt(e)}identity(){return this.value=Array.from(ru),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 Yt(this.value)}multiply(t){const e=this.clone(),n=t instanceof Yt?t:new Yt(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,r=this.m21,i=this.m22,o=this.m23,a=this.m31,c=this.m32,h=this.m33,l=h*i-o*c,u=-h*r+o*a,d=c*r-i*a;let f=t*l+e*u+n*d;return f?(f=1/f,this.m11=l*f,this.m12=(-h*e+n*c)*f,this.m13=(o*e-n*i)*f,this.m21=u*f,this.m22=(h*t-n*a)*f,this.m23=(-o*t+n*r)*f,this.m31=d*f,this.m32=(-c*t+e*a)*f,this.m33=(i*t-e*r)*f,this):null}adjugate(){const t=new Yt;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=Ut(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:Ut(Math.atan2(-this.m21,this.m22)),skewY:Ut(Math.atan2(this.m12,this.m11))}}getGroupCoords(t){const e=this.value[0],n=this.value[1],r=this.value[2],i=this.value[3],o=this.value[4],a=this.value[5],c=t.value[0],h=t.value[1],l=t.value[2],u=t.value[3],d=t.value[4],f=t.value[5],m=c*u,p=h*l,_=(l*n-e*u)/(p-m),y=(c*n-e*h)/(m-p),b=(l*i-r*u)/(p-m),v=(c*i-r*h)/(m-p),w=(l*(a-f)+u*(d-o))/(p-m),E=(c*(a-f)+h*(d-o))/(m-p),C=[_,y,b,v,w,E];return new Yt(C)}toString(t=6){return this.matrix4.is2D()?`matrix(${this.value.map(e=>Z(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 r=ut(t),i=Math.cos(r),o=Math.sin(r);return this.translate(e,n),this.multiply([i,o,-o,i,0,0]),this.translate(-e,-n),this.toMatrix4(),this}rotateTo(t,e=0,n=0){const{degree:r}=this.split();return this.rotate(t-r,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:r,degreeY:i,degreeZ:o}=this.matrix4.split();return this.rotate3d(t-r,e-i,n-o),this}scale(t,e=t,n=0,r=0){return this.translate(n,r),this.multiply([t,0,0,e,0,0]),this.translate(-n,-r),this.toMatrix4(),this}scaleTo(t,e=t,n=0,r=0){return this.scale(t/this.m11,e/this.m22,n,r)}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:r,scalarY:i,scalarZ:o}=this.matrix4.split();return this.scale3d(t/r,e/i,n/o),this}skew(t,e=t){return this.multiply([Math.cos(ut(e)),Math.sin(ut(e)),-Math.sin(ut(t)),Math.cos(ut(t)),0,0]),this.toMatrix4(),this}skewTo(t,e=t){const{skewX:n,skewY:r}=this.split();return this.skew(t-n,e-r)}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 en=new ve,kr=new ve,re=new ve,$o=new ve,Yo=new Mr;new Qt;function au(s){const t=new Yt;return s.replace(/([a-z0-9]+)\s*\(?\s*((-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)*[a-z%]*\s*,?\s*)+)\)?/gi,function(e,n,r){r.indexOf(",")>=0?r=r.split(/\s*,\s*/):r=r.split(/\s+/);const i=[];for(let o=0,a=r.length;o<a;o++)r[o].trim()&&i.push(parseFloat(""+r[o]));switch(n.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 Qt(i)),t.matrix4.toMatrix(t);break}return""}),t}function me(s,t,e){const n=new Yt;return n.rotate(Ut(s)),n.transformPoint({x:t,y:e})}function jo(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,r=typeof s?.scalarX=="number"?s?.scalarX:1,i=typeof s?.scalarY=="number"?s?.scalarY:1,o=ut(n),a=Math.cos(o),c=Math.sin(o),h=new DOMMatrix([a*r,c*r,-c*i,a*i,t,e]);return h.multiplySelf(new DOMMatrix(s?.originMatrix||"")),h}function X1(s,t){const e=new Path2D(s),n=new Path2D;return n.addPath(e,jo(t)),n}const cu={map:new Map,transform:function(s){if(tp)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 G1(s,t,e){const n=new OffscreenCanvas(s,t),r=n.getContext("2d");if(r)return e(r),n.transferToImageBitmap()}function V1(s,t,e){const n=s.createPattern(cu.transform(t),"no-repeat");if(n){const r=jo(e);n.setTransform(r),s.fillStyle=n}}const Xo=["","-webkit-","-moz-","-o-","-ms-"];function Go(s,t){const e=t.x||0,n=t.y||0,r=t.z||0;ws(s,"transform",`translate(${e}px, ${n}px) translateZ(${r}px)`)}function q1(s,t){const e=t?.easingFn||X.Linear.None,n=t?.duration||0,r=t?.delay||0,i=kn(),o=i+n;let a=0,c=0;const h=t.deltaX,l=t.deltaY;function u(){const d=kn();if(d>=o){Go(s,{x:h-a,y:l-c});return}const f=(d-i)/n,m=e(f),p=h*m,_=l*m;Go(s,{x:p-a,y:_-c}),a=p,c=_,Zs(u)}setTimeout(()=>{u()},r)}const H1=typeof HTMLElement=="object"?function(t){return t instanceof HTMLElement}:function(t){return t&&typeof t=="object"&&t.nodeType===1&&typeof t.nodeName=="string"};function hu(s){return window.URL.createObjectURL(s)}function W1(s){return window.URL.revokeObjectURL(s)}function Vo(s){let t=!1;function e(){/loaded|complete/.test(document.readyState)&&!t&&(o(),s(),t=!0)}const n=yt(document,"DOMContentLoaded",e),r=yt(window,"load",e),i=setInterval(e,100),o=()=>{clearInterval(i),n?.(),r?.()};return o}function lu(s){return yt(window,"beforeunload",t=>{s(t)})}async function J1(s,t=6e4){return new Promise((e,n)=>{const r=document.createElement("script");r.type="text/javascript",r.async=!1,r.onload=o=>{clearTimeout(i),e(o),r.onerror=r.onload=null},r.onerror=o=>{clearTimeout(i),n(o)},r.src=s;const i=setTimeout(()=>{n("Timeout!")},t);document.body.appendChild(r)})}function Ir(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 K1(s,t=document.getElementsByTagName("head")[0],e=6e4){return new Promise((n,r)=>{const i=document.createElement("link");i.setAttribute("type","text/css"),i.setAttribute("rel","stylesheet"),i.onload=a=>{clearTimeout(o),n(a),i.onerror=i.onload=null},i.onerror=a=>{clearTimeout(o),r(a)},i.setAttribute("href",s);const o=setTimeout(()=>{r("Timeout!")},e);t.appendChild(i)})}function Z1(){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(r=>{r.onload=()=>{e+=1,n()}})})}const uu=new Ni({max:1e3});async function fu(s,t=6e4){return new Promise((e,n)=>{const r=typeof s=="string"?s:hu(s),i=uu.get(r);if(i)return e(i);const o=setTimeout(()=>{n("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,l={width:c,height:h,aspectRatio:c/h,element:a,imageData:zl(a)};uu.set(r,l),e(l)},a.onerror=c=>{clearTimeout(o),n(c)},a.src=r})}async function du(s=ie.text,t=["*"]){const n=(await ao(t))[0],r=await ns(n,s);return{type:n.type,name:n.name,size:n.size,data:r}}async function Q1(s=["image/*"]){const e=(await ao(s))[0];if(!e.type.match(/image\/*/))return new Error("Not Image Type!");const n=await ns(e,ie.arraybuffer),r=Ti(n),i=await fu(r);return{type:e.type,name:e.name,size:e.size,data:n,width:i.width,height:i.height,aspectRatio:i.aspectRatio,imageData:i.imageData}}function tb(){return window.getSelection()?.toString()||""}function eb(s){document.getElementsByTagName("title")[0].innerText=s,document.title=s}function nb(s=200){"vibrate"in navigator?window.navigator.vibrate(s):console.error("Your device is not support vibrate on this browser.")}async function sb(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 rb(s=0,t=0){window.scrollTo(s,t)}function ib(){let s=qc,t=qc;return"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual",s=lu(()=>{window.history.scrollRestoration="auto"}),t=Vo(()=>{window.history.scrollRestoration="manual"})),()=>{s(),t()}}function ob(s){return/(html|body)/i.test(s.tagName)||s===document.documentElement}const ab=s=>s===document.activeElement&&(s.type||s.href);function qo(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}function cb(s){return s*qo()}function hb(s){return s.parentElement?parseFloat(getComputedStyle(s.parentElement).fontSize):qo()}const lb=s=>{let t=s;for(;t&&t.nodeType!==1;){const e=t.parentElement||s.parentNode;if(!e)break;t=e}return t},ub=s=>s.parentElement,Ho=(s,t=[])=>!s||s.parentElement===null&&s.parentNode===null?t:Ho(s.parentElement,t.concat([s]));function fb(s){const t=Ho(s);for(let e=0,n=t.length;e<n;e++)if(/(auto|scroll)/.test(bs(t[e],"overflow")+bs(t[e],"overflow-y")+bs(t[e],"overflow-x")))return t[e];return document.scrollingElement||document.documentElement}const db=(s,t)=>s.contains?s!=t&&s.contains(t):!!(s.compareDocumentPosition(t)&16),mb=s=>Array.prototype.slice.call(s.parentElement?.children).filter(t=>t!==s),pb=s=>s.nextElementSibling,gb=s=>s.previousElementSibling,yb=(s,t)=>s.closest(t),bb=s=>s.shadowRoot,ys=s=>s.tagName==="INPUT"||s instanceof HTMLInputElement,Wo=s=>s.tagName==="SELECT"||s instanceof HTMLSelectElement,wb=s=>s.tagName==="TEXTAREA"||s instanceof HTMLTextAreaElement,Jo=s=>ys(s)&&s.getAttribute("type")==="checkbox",Ko=s=>ys(s)&&s.getAttribute("type")==="radio",vb=s=>ys(s)&&s.getAttribute("type")==="text",xb=s=>ys(s)&&s.getAttribute("type")==="number";function Sb(s,t){if(Wo(s)){const e=s.options;for(let n=0,r=e.length;n<r;n++)e[n].selected=e[n].value==t}}function _b(s,t){if(Ko(s)){const e=document.getElementsByName(s.name);for(let n=0,r=e.length;n<r;n++){const i=e[n];i.checked=i.value==t}}}function Cb(s,t){Jo(s)&&(s.checked=t)}function Un(s,t,e="append"){typeof t=="string"?s[e](bu(t)):s[e](t)}function mu(s,t){if(typeof t=="string"){s.innerHTML=t;const e=vu(s);e!=s&&(s=e)}else Un(t,"replaceWith")}const pu=function(s){mu(s,"")},Eb=(s,t)=>{s.textContent=t},Tb=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},Pb=s=>s.remove();function Ab(s,t){bs(s,"display")=="none"&&t===void 0||t===!0?gu(s):yu(s)}function gu(s){$n(s,"display",s instanceof HTMLTableRowElement?"table-row":s instanceof HTMLTableCellElement?"table-cell":"block")}function yu(s){$n(s,"display","none")}function Zo(s,t,e="toggle"){const n=t.split(/[,\s]+/);if(s.classList)n.forEach(r=>{const i=r.trim();i!==""&&s.classList[e](i)});else{const r=s.className.split(/ +/);let i=!1;n.forEach(o=>{const a=o.trim();if(a!==""){const c=r.indexOf(a);switch(e){case"add":c===-1&&(r.push(a),i=!0);break;case"remove":c!==-1&&(r.splice(c,1),i=!0);break;case"toggle":c===-1?r.push(a):r.splice(c,1),i=!0;break}}}),i&&yn(s,"class",r.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}}function Mb(s,t){Zo(s,t,"add")}function kb(s,t){Zo(s,t,"remove")}function Ib(s,t){return new RegExp("(?:^|\\s+)"+t+"(?:\\s+|$)").test(s.className)}function bu(s,t=!1){const e=document.createElement("template");return e.innerHTML=s,t&&e.content.childNodes.forEach(n=>{const r=vu(n);r!=n&&e.content.replaceChild(r,n)}),e.content}function wu(s){return document.createElement.call(document,s)}function Db(s){return document.createElementNS("http://www.w3.org/1999/xhtml",s)}function Ob(s){return document.createTextNode.call(document,s)}function vu(s){return s.tagName=="SCRIPT"&&(s=xu(s)),s.querySelectorAll&&s.querySelectorAll("script").forEach(t=>{t.parentNode?.replaceChild(xu(t),t)}),s}function xu(s){const t=s.ownerDocument.createElement("script");t.text=s.text;const e=s.attributes;for(let n=0,r=e.length;n<r;n++)t.setAttribute(e[n].name,e[n].value);return t}function Rb(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 Lb(s){const t=new Proxy(window,{get(e,n,r){if(typeof n=="string"&&["open","location","document"].includes(n))throw new Error(`禁止访问 key: ${n}`);return n==="window"?t:Reflect.get(e,n,r)},set(e,n,r,i){return Reflect.set(e,n,r,i)}});new Function("window",`with(window) { ${s} }`)(t,null)}function zb(s){return s=s.replace(/<%=(.+?)%>/g,"`); \n echo( $1 ); \n echo(`").replace(/<%([\s\S]+?)%>/g,"`); \n $1 \n echo(`"),s="echo(`"+s+"`);",`(function parse(data){
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 bg;function jC(){if(bg)return lu;bg=1;var n=er;function t(l,f){return l===f&&(l!==0||1/l===1/f)||l!==l&&f!==f}var e=typeof Object.is=="function"?Object.is:t,s=n.useState,i=n.useEffect,r=n.useLayoutEffect,o=n.useDebugValue;function a(l,f){var d=f(),p=s({inst:{value:d,getSnapshot:f}}),m=p[0].inst,y=p[1];return r(function(){m.value=d,m.getSnapshot=f,c(m)&&y({inst:m})},[l,d,f]),i(function(){return c(m)&&y({inst:m}),l(function(){c(m)&&y({inst:m})})},[l]),o(d),d}function c(l){var f=l.getSnapshot;l=l.value;try{var d=f();return!e(l,d)}catch{return!0}}function h(l,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:a;return lu.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:u,lu}var fu={};/**
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 wg;function $C(){return wg||(wg=1,{}.NODE_ENV!=="production"&&function(){function n(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}function t(d,p){u||i.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 y=p();r(m,y)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),l=!0)}y=o({inst:{value:m,getSnapshot:p}});var g=y[0].inst,v=y[1];return c(function(){g.value=m,g.getSnapshot=p,e(g)&&v({inst:g})},[d,m,p]),a(function(){return e(g)&&v({inst:g}),d(function(){e(g)&&v({inst:g})})},[d]),h(m),m}function e(d){var p=d.getSnapshot;d=d.value;try{var m=p();return!r(d,m)}catch{return!0}}function s(d,p){return p()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=er,r=typeof Object.is=="function"?Object.is:n,o=i.useState,a=i.useEffect,c=i.useLayoutEffect,h=i.useDebugValue,u=!1,l=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?s:t;fu.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),fu}var xg;function Sg(){return xg||(xg=1,{}.NODE_ENV==="production"?Xo.exports=jC():Xo.exports=$C()),Xo.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 _g;function UC(){if(_g)return uu;_g=1;var n=er,t=Sg();function e(h,u){return h===u&&(h!==0||1/h===1/u)||h!==h&&u!==u}var s=typeof Object.is=="function"?Object.is:e,i=t.useSyncExternalStore,r=n.useRef,o=n.useEffect,a=n.useMemo,c=n.useDebugValue;return uu.useSyncExternalStoreWithSelector=function(h,u,l,f,d){var p=r(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function g(_){if(!v){if(v=!0,x=_,_=f(_),d!==void 0&&m.hasValue){var D=m.value;if(d(D,_))return b=D}return b=_}if(D=b,s(x,_))return D;var V=f(_);return d!==void 0&&d(D,V)?(x=_,D):(x=_,b=V)}var v=!1,x,b,E=l===void 0?null:l;return[function(){return g(u())},E===null?void 0:function(){return g(E())}]},[u,l,f,d]);var y=i(h,p[0],p[1]);return o(function(){m.hasValue=!0,m.value=y},[y]),c(y),y},uu}var du={};/**
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 Eg;function YC(){return Eg||(Eg=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=er,e=Sg(),s=typeof Object.is=="function"?Object.is:n,i=e.useSyncExternalStore,r=t.useRef,o=t.useEffect,a=t.useMemo,c=t.useDebugValue;du.useSyncExternalStoreWithSelector=function(h,u,l,f,d){var p=r(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function g(_){if(!v){if(v=!0,x=_,_=f(_),d!==void 0&&m.hasValue){var D=m.value;if(d(D,_))return b=D}return b=_}if(D=b,s(x,_))return D;var V=f(_);return d!==void 0&&d(D,V)?(x=_,D):(x=_,b=V)}var v=!1,x,b,E=l===void 0?null:l;return[function(){return g(u())},E===null?void 0:function(){return g(E())}]},[u,l,f,d]);var y=i(h,p[0],p[1]);return o(function(){m.hasValue=!0,m.value=y},[y]),c(y),y},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),du}({}).NODE_ENV==="production"?hu.exports=UC():hu.exports=YC();var GC=hu.exports;function XC(n){const t=H.createContext(null);function e({children:a}){return React.createElement(t.Provider,{value:n},a)}function s(){const a=H.useContext(t);if(!a)throw new ReferenceError("createReactAppStoreContext's hooks cannot be called outside of AppStoreProvider");return a}function i(a,c){const h=s(),u=l=>h.subscribe(()=>l());return a?GC.useSyncExternalStoreWithSelector(u,h.getState,h.getState,a,c):H.useSyncExternalStore(u,h.getState,h.getState)}function r(){const a=s();if(Fr(a))throw new Error("useSetAppState is only supported for StateStoreLike");return a.setState.bind(a)}function o(){const a=s();if(!Fr(a))throw new Error("useDispatch is only supported for ReduxStore");return a.dispatch.bind(a)}return{AppStoreProvider:e,useAppStore:s,useAppState:i,useSetAppState:r,useDispatch:o}}function WC(n){const e=H.useRef(bi(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[s,i]=H.useState(()=>e?n.value:n.defaultValue),r=e?n.value:s,o=H.useRef(r);o.current=r;const a=H.useRef(!1);H.useEffect(()=>{!a.current&&bi(n.value)!==e&&(a.current=!0,console.warn("[useReactControllableState] can't switch between controlled and uncontrolled mode."))},[n.value]);const c=H.useRef(n.beforeChange);c.current=n.beforeChange;const h=H.useRef(n.onChange);h.current=n.onChange;const u=H.useRef(0),l=H.useCallback(async f=>{const d=++u.current,p=typeof f=="function"?f(o.current):f;c.current&&!await c.current(p)||d===u.current&&(e||i(p),h.current?.(p))},[]);return[r,l]}var Tg=Symbol.for("immer-nothing"),Cg=Symbol.for("immer-draftable"),me=Symbol.for("immer-state"),HC={}.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 Ae(n,...t){if({}.NODE_ENV!=="production"){const e=HC[n],s=Es(e)?e.apply(null,t):e;throw new Error(`[Immer] ${s}`)}throw new Error(`[Immer] minified error nr: ${n}. Full error at: https://bit.ly/3cXEKWf`)}var Me=Object,ti=Me.getPrototypeOf,Wo="constructor",Ho="prototype",mu="configurable",qo="enumerable",Ko="writable",nr="value",Qn=n=>!!n&&!!n[me];function Pn(n){return n?Ag(n)||Qo(n)||!!n[Cg]||!!n[Wo]?.[Cg]||ta(n)||ea(n):!1}var qC=Me[Ho][Wo].toString(),Pg=new WeakMap;function Ag(n){if(!n||!gu(n))return!1;const t=ti(n);if(t===null||t===Me[Ho])return!0;const e=Me.hasOwnProperty.call(t,Wo)&&t[Wo];if(e===Object)return!0;if(!Es(e))return!1;let s=Pg.get(e);return s===void 0&&(s=Function.toString.call(e),Pg.set(e,s)),s===qC}function Jo(n,t,e=!0){sr(n)===0?(e?Reflect.ownKeys(n):Me.keys(n)).forEach(i=>{t(i,n[i],n)}):n.forEach((s,i)=>t(i,s,n))}function sr(n){const t=n[me];return t?t.type_:Qo(n)?1:ta(n)?2:ea(n)?3:0}var Mg=(n,t,e=sr(n))=>e===2?n.has(t):Me[Ho].hasOwnProperty.call(n,t),pu=(n,t,e=sr(n))=>e===2?n.get(t):n[t],Zo=(n,t,e,s=sr(n))=>{s===2?n.set(t,e):s===3?n.add(e):n[t]=e};function KC(n,t){return n===t?n!==0||1/n===1/t:n!==n&&t!==t}var Qo=Array.isArray,ta=n=>n instanceof Map,ea=n=>n instanceof Set,gu=n=>typeof n=="object",Es=n=>typeof n=="function",yu=n=>typeof n=="boolean";function JC(n){const t=+n;return Number.isInteger(t)&&String(t)===n}var An=n=>n.copy_||n.base_,vu=n=>n.modified_?n.copy_:n.base_;function bu(n,t){if(ta(n))return new Map(n);if(ea(n))return new Set(n);if(Qo(n))return Array[Ho].slice.call(n);const e=Ag(n);if(t===!0||t==="class_only"&&!e){const s=Me.getOwnPropertyDescriptors(n);delete s[me];let i=Reflect.ownKeys(s);for(let r=0;r<i.length;r++){const o=i[r],a=s[o];a[Ko]===!1&&(a[Ko]=!0,a[mu]=!0),(a.get||a.set)&&(s[o]={[mu]:!0,[Ko]:!0,[qo]:a[qo],[nr]:n[o]})}return Me.create(ti(n),s)}else{const s=ti(n);if(s!==null&&e)return{...n};const i=Me.create(s);return Me.assign(i,n)}}function ir(n,t=!1){return sa(n)||Qn(n)||!Pn(n)||(sr(n)>1&&Me.defineProperties(n,{set:na,add:na,clear:na,delete:na}),Me.freeze(n),t&&Jo(n,(e,s)=>{ir(s,!0)},!1)),n}function ZC(){Ae(2)}var na={[nr]:ZC};function sa(n){return n===null||!gu(n)?!0:Me.isFrozen(n)}var ia="MapSet",wu="Patches",Dg="ArrayMethods",Rg={};function Ts(n){const t=Rg[n];return t||Ae(0,n),t}var Og=n=>!!Rg[n],rr,Ig=()=>rr,QC=(n,t)=>({drafts_:[],parent_:n,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Og(ia)?Ts(ia):void 0,arrayMethodsPlugin_:Og(Dg)?Ts(Dg):void 0});function kg(n,t){t&&(n.patchPlugin_=Ts(wu),n.patches_=[],n.inversePatches_=[],n.patchListener_=t)}function xu(n){Su(n),n.drafts_.forEach(tP),n.drafts_=null}function Su(n){n===rr&&(rr=n.parent_)}var Lg=n=>rr=QC(rr,n);function tP(n){const t=n[me];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Vg(n,t){t.unfinalizedDrafts_=t.drafts_.length;const e=t.drafts_[0];if(n!==void 0&&n!==e){e[me].modified_&&(xu(t),Ae(4)),Pn(n)&&(n=Ng(t,n));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(e[me].base_,n,t)}else n=Ng(t,e);return eP(t,n,!0),xu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),n!==Tg?n:void 0}function Ng(n,t){if(sa(t))return t;const e=t[me];if(!e)return oa(t,n.handledSet_,n);if(!ra(e,n))return t;if(!e.modified_)return e.base_;if(!e.finalized_){const{callbacks_:s}=e;if(s)for(;s.length>0;)s.pop()(n);Bg(e,n)}return e.copy_}function eP(n,t,e=!1){!n.parent_&&n.immer_.autoFreeze_&&n.canAutoFreeze_&&ir(t,e)}function zg(n){n.finalized_=!0,n.scope_.unfinalizedDrafts_--}var ra=(n,t)=>n.scope_===t,nP=[];function Fg(n,t,e,s){const i=An(n),r=n.type_;if(s!==void 0&&pu(i,s,r)===t){Zo(i,s,e,r);return}if(!n.draftLocations_){const a=n.draftLocations_=new Map;Jo(i,(c,h)=>{if(Qn(h)){const u=a.get(h)||[];u.push(c),a.set(h,u)}})}const o=n.draftLocations_.get(t)??nP;for(const a of o)Zo(i,a,e,r)}function sP(n,t,e){n.callbacks_.push(function(i){const r=t;if(!r||!ra(r,i))return;i.mapSetPlugin_?.fixSetContents(r);const o=vu(r);Fg(n,r.draft_??r,o,e),Bg(r,i)})}function Bg(n,t){if(n.modified_&&!n.finalized_&&(n.type_===3||n.type_===1&&n.allIndicesReassigned_||(n.assigned_?.size??0)>0)){const{patchPlugin_:s}=t;if(s){const i=s.getPath(n);i&&s.generatePatches_(n,i,t)}zg(n)}}function iP(n,t,e){const{scope_:s}=n;if(Qn(e)){const i=e[me];ra(i,s)&&i.callbacks_.push(function(){ca(n);const o=vu(i);Fg(n,e,o,t)})}else Pn(e)&&n.callbacks_.push(function(){const r=An(n);n.type_===3?r.has(e)&&oa(e,s.handledSet_,s):pu(r,t,n.type_)===e&&s.drafts_.length>1&&(n.assigned_.get(t)??!1)===!0&&n.copy_&&oa(pu(n.copy_,t,n.type_),s.handledSet_,s)})}function oa(n,t,e){return!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||Qn(n)||t.has(n)||!Pn(n)||sa(n)||(t.add(n),Jo(n,(s,i)=>{if(Qn(i)){const r=i[me];if(ra(r,e)){const o=vu(r);Zo(n,s,o,n.type_),zg(r)}}else Pn(i)&&oa(i,t,e)})),n}function rP(n,t){const e=Qo(n),s={type_:e?1:0,scope_:t?t.scope_:Ig(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:n,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=s,r=aa;e&&(i=[s],r=or);const{revoke:o,proxy:a}=Proxy.revocable(i,r);return s.draft_=a,s.revoke_=o,[a,s]}var aa={get(n,t){if(t===me)return n;let e=n.scope_.arrayMethodsPlugin_;const s=n.type_===1&&typeof t=="string";if(s&&e?.isArrayOperationMethod(t))return e.createMethodInterceptor(n,t);const i=An(n);if(!Mg(i,t,n.type_))return oP(n,i,t);const r=i[t];if(n.finalized_||!Pn(r)||s&&n.operationMethod&&e?.isMutatingArrayMethod(n.operationMethod)&&JC(t))return r;if(r===_u(n.base_,t)){ca(n);const o=n.type_===1?+t:t,a=Tu(n.scope_,r,n,o);return n.copy_[o]=a}return r},has(n,t){return t in An(n)},ownKeys(n){return Reflect.ownKeys(An(n))},set(n,t,e){const s=jg(An(n),t);if(s?.set)return s.set.call(n.draft_,e),!0;if(!n.modified_){const i=_u(An(n),t),r=i?.[me];if(r&&r.base_===e)return n.copy_[t]=e,n.assigned_.set(t,!1),!0;if(KC(e,i)&&(e!==void 0||Mg(n.base_,t,n.type_)))return!0;ca(n),Eu(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),iP(n,t,e)),!0},deleteProperty(n,t){return ca(n),_u(n.base_,t)!==void 0||t in n.base_?(n.assigned_.set(t,!1),Eu(n)):n.assigned_.delete(t),n.copy_&&delete n.copy_[t],!0},getOwnPropertyDescriptor(n,t){const e=An(n),s=Reflect.getOwnPropertyDescriptor(e,t);return s&&{[Ko]:!0,[mu]:n.type_!==1||t!=="length",[qo]:s[qo],[nr]:e[t]}},defineProperty(){Ae(11)},getPrototypeOf(n){return ti(n.base_)},setPrototypeOf(){Ae(12)}},or={};for(let n in aa){let t=aa[n];or[n]=function(){const e=arguments;return e[0]=e[0][0],t.apply(this,e)}}or.deleteProperty=function(n,t){return{}.NODE_ENV!=="production"&&isNaN(parseInt(t))&&Ae(13),or.set.call(this,n,t,void 0)},or.set=function(n,t,e){return{}.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&Ae(14),aa.set.call(this,n[0],t,e,n[0])};function _u(n,t){const e=n[me];return(e?An(e):n)[t]}function oP(n,t,e){const s=jg(t,e);return s?nr in s?s[nr]:s.get?.call(n.draft_):void 0}function jg(n,t){if(!(t in n))return;let e=ti(n);for(;e;){const s=Object.getOwnPropertyDescriptor(e,t);if(s)return s;e=ti(e)}}function Eu(n){n.modified_||(n.modified_=!0,n.parent_&&Eu(n.parent_))}function ca(n){n.copy_||(n.assigned_=new Map,n.copy_=bu(n.base_,n.scope_.immer_.useStrictShallowCopy_))}var aP=class{constructor(n){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,e,s)=>{if(Es(t)&&!Es(e)){const r=e;e=t;const o=this;return function(c=r,...h){return o.produce(c,u=>e.call(this,u,...h))}}Es(e)||Ae(6),s!==void 0&&!Es(s)&&Ae(7);let i;if(Pn(t)){const r=Lg(this),o=Tu(r,t,void 0);let a=!0;try{i=e(o),a=!1}finally{a?xu(r):Su(r)}return kg(r,s),Vg(i,r)}else if(!t||!gu(t)){if(i=e(t),i===void 0&&(i=t),i===Tg&&(i=void 0),this.autoFreeze_&&ir(i,!0),s){const r=[],o=[];Ts(wu).generateReplacementPatches_(t,i,{patches_:r,inversePatches_:o}),s(r,o)}return i}else Ae(1,t)},this.produceWithPatches=(t,e)=>{if(Es(t))return(o,...a)=>this.produceWithPatches(o,c=>t(c,...a));let s,i;return[this.produce(t,e,(o,a)=>{s=o,i=a}),s,i]},yu(n?.autoFreeze)&&this.setAutoFreeze(n.autoFreeze),yu(n?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(n.useStrictShallowCopy),yu(n?.useStrictIteration)&&this.setUseStrictIteration(n.useStrictIteration)}createDraft(n){Pn(n)||Ae(8),Qn(n)&&(n=cP(n));const t=Lg(this),e=Tu(t,n,void 0);return e[me].isManual_=!0,Su(t),e}finishDraft(n,t){const e=n&&n[me];(!e||!e.isManual_)&&Ae(9);const{scope_:s}=e;return kg(s,t),Vg(void 0,s)}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 i=t[e];if(i.path.length===0&&i.op==="replace"){n=i.value;break}}e>-1&&(t=t.slice(e+1));const s=Ts(wu).applyPatches_;return Qn(n)?s(n,t):this.produce(n,i=>s(i,t))}};function Tu(n,t,e,s){const[i,r]=ta(t)?Ts(ia).proxyMap_(t,e):ea(t)?Ts(ia).proxySet_(t,e):rP(t,e);return(e?.scope_??Ig()).drafts_.push(i),r.callbacks_=e?.callbacks_??[],r.key_=s,e&&s!==void 0?sP(e,r,s):r.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(r);const{patchPlugin_:h}=c;r.modified_&&h&&h.generatePatches_(r,[],c)}),i}function cP(n){return Qn(n)||Ae(10,n),$g(n)}function $g(n){if(!Pn(n)||sa(n))return n;const t=n[me];let e,s=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,e=bu(n,t.scope_.immer_.useStrictShallowCopy_),s=t.scope_.immer_.shouldUseStrictIteration()}else e=bu(n,!0);return Jo(e,(i,r)=>{Zo(e,i,$g(r))},s),t&&(t.finalized_=!1),e}var hP=new aP,Ug=hP.produce;function uP(n){const[t,e]=H.useState(()=>ir(typeof n=="function"?n():n,!0));return[t,H.useCallback(s=>{e(typeof s=="function"?Ug(s):ir(s))},[])]}function lP(n,t,e){const s=H.useMemo(()=>Ug(n),[n]);return H.useReducer(s,t,e)}function fP(n){const[t,e]=H.useState({width:0,height:0});return H.useLayoutEffect(()=>{n.current&&e(()=>({width:n.current.offsetWidth,height:n.current.offsetHeight}))},[n]),t}function dP(n){const t=Symbol("AppStore");function e(){const c=zT(n.getState());n.subscribe(l=>{c.value=l});const h=mg();if(!h)throw new Error("provideAppStore must be called in setup()");const u={store:n,stateRef:c};h.appContext.provides[t]=u}function s(){const c=fg(t);if(!c)throw new ReferenceError("createVueAppStoreContext's hooks cannot be called before provideAppStore()");return c}function i(){const{store:c}=s();return c}function r(c){const{stateRef:h}=s();return c?yg(()=>c(h.value)):Jh(h)}function o(){const c=i();if(Fr(c))throw new Error("useSetAppState is only supported for StateStoreLike");return c.setState.bind(c)}function a(){const c=i();if(!Fr(c))throw new Error("useDispatch is only supported for ReduxStore");return c.dispatch.bind(c)}return{provideAppStore:e,useAppStore:i,useAppState:r,useSetAppState:o,useDispatch:a}}function mP(n){const t=n.value(),e=bi(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 s=Kp(e?t:n.defaultValue),i=yg(()=>e?n.value():s.value);let r=!1;gC(n.value,c=>{if(!r&&bi(c)!==e){r=!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(i.value):c;n.beforeChange&&!await n.beforeChange(u)||h===o&&(e||(s.value=u),n.onChange?.(u),await ng())}return[i,a]}let Cu=class{x;y;toX;toY;constructor(t){this.x=at(t?.x||0,2),this.y=at(t?.y||0,2),this.toX=at(t?.toX||0,2),this.toY=at(t?.toY||0,2)}toSVGPathData(){return[["L",this.toX,this.toY]]}toCanvasContext(t){t.lineTo(this.toX,this.toY)}getBoundingClientRect(t=2){const e=Pe(this.x,this.y,this.toX,this.toY);if(e===0){const s=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:s,y:i,width:r-s,height:o-i}}else{const s=Math.sin(e),i=Math.cos(e),r=i*this.x-s*this.y,o=i*this.toX-s*this.toY,a=i*this.y+s*this.x,c=i*this.toY+s*this.toX;return{x:at(Math.min(r,o),t),y:at(Math.min(a,c),t),width:at(Math.max(r,o)-Math.min(r,o),t),height:at(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,s=this.y,i=t.toX,r=t.toY,o=this.toX-e,a=t.x-i;if(!o&&!a)return null;const c=(this.toY-s)/o,h=(t.y-r)/a;if(o){if(!a)return{x:i,y:c*(i-e)+s}}else return{x:e,y:h*(e-i)+r};const u=(-h*i+r+c*e-s)/(c-h),l=c*(u-e)+s;return isNaN(u)||isNaN(l)?null:{x:u,y:l}}};class Pu extends Cu{rx;ry;xAxisRotate;largeArcFlag;sweepFlag;constructor(t){super(t),this.rx=at(t.rx,2),this.ry=at(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,s,i,r,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,s,i,r,o,a,c,!this.sweepFlag)}convert(t,e,s,i,r,o,a,c,h){const u=a/180*Math.PI,l=(t-s)/2,f=(e-i)/2,d=Math.cos(u)*l+Math.sin(u)*f,p=-Math.sin(u)*l+Math.cos(u)*f,m=d*d/(r*r)+p*p/(o*o);if(m>1){const U=Math.sqrt(m);throw r=U*r,o=U*o,new Error(`Radii are too small to build an arc. Correcting them to ${r}/${o}.`)}const y=Math.sqrt((r*r*o*o-r*r*p*p-o*o*d*d)/(r*r*p*p+o*o*d*d)),g=c!=h?1:-1,v=g*y*r*p/o,x=g*y*-o*d/r,b=(t+s)/2,E=(e+i)/2,_=Math.cos(u)*v-Math.sin(u)*x+b,D=Math.sin(u)*v+Math.cos(u)*x+E,V=(U,Y,st,it)=>(U*it>=Y*st?1:-1)*Math.acos((U*st+Y*it)/(Math.sqrt(U*U+Y*Y)*Math.sqrt(st*st+it*it))),O=V(1,0,t-_,e-D)-u,N=V(t-_,e-D,s-_,i-D);return[_,D,r,o,u,O,O+N]}}class pP extends Cu{cx;cy;isLineThrough;constructor(t){super(t),this.cx=at(t.cx,2),this.cy=at(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,s=this.cy*2-(this.y+this.toY)/2;t.quadraticCurveTo(e,s,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}getBoundingClientRect(t=2){const e=[this.x,this.toX],s=[this.y,this.toY];let i,r,o,a;for(let u=0;u<2;++u)i=u==0?this.x-2*this.cx+this.toX:this.y-2*this.cy+this.toY,r=u==0?-2*this.x+2*this.cx:-2*this.y+2*this.cy,o=u==0?this.x:this.y,Math.abs(i)>1e-12&&(a=-r/(2*i),0<a&&a<1&&[e,s][u].push(i*a*a+r*a+o));const c={x:Math.min(0,...e),y:Math.min(0,...s)},h={x:Math.max(0,...e),y:Math.max(0,...s)};return{x:at(c.x,t),y:at(c.y,t),width:at(h.x-c.x,t),height:at(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 gP=pP;class te extends Cu{c1x;c1y;c2x;c2y;constructor(t){super(t),this.c1x=at(t.c1x,2),this.c1y=at(t.c1y,2),this.c2x=at(t.c2x,2),this.c2y=at(t.c2y,2)}clone(){return new te({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),s=2*(this.c1x-this.x)-2*(this.c2x-this.c1x),i=this.x-this.c1x,r=(-s+Math.sqrt(s*s-4*e*i))/2/e,o=(-s-Math.sqrt(s*s-4*e*i))/2/e;const a=[this.y,this.toY],c=[this.x,this.toX];let h;const u=[];Math.abs(r)>1e12&&(r=.5),Math.abs(o)>1e12&&(o=.5),r>=0&&r<=1&&(h=this.interpolate(r),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),s=2*(this.c1y-this.y)-2*(this.c2y-this.c1y),i=this.y-this.c1y,r=(-s+Math.sqrt(s*s-4*e*i))/2/e,o=(-s-Math.sqrt(s*s-4*e*i))/2/e,Math.abs(r)>1e12&&(r=.5),Math.abs(o)>1e12&&(o=.5),r>=0&&r<=1&&(h=this.interpolate(r),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=[],f=u.length;for(let m=0;m<f;m++){for(let y=m+1;y<f;y++)u[m].X===u[y].X&&u[m].Y===u[y].Y&&(y=++m);l.push({X:u[m].X,Y:u[m].Y})}const d={x:Math.min(...c),y:Math.min(...a)},p={x:Math.max(...c),y:Math.max(...a)};return{x:at(d.x,t),y:at(d.y,t),width:at(p.x-d.x,t),height:at(p.y-d.y,t),dots:l}}static base3(t,e,s,i,r){const o=-3*e+9*s-9*i+3*r,a=t*o+6*e-12*s+6*i;return t*a-3*e+3*s}static bezlen(t,e,s,i,r,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],f=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let d=0;for(let p=0;p<12;p++){const m=u*l[p]+u,y=te.base3(m,t,s,r,a),g=te.base3(m,e,i,o,c);d+=f[p]*Math.sqrt(y*y+g*g)}return u*d}length(t=1){return te.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),s=1-e,i=Math.pow(s,3),r=Math.pow(s,2),o=e*e,a=o*e,c=i*this.x+r*3*e*this.c1x+s*3*e*e*this.c2x+a*this.toX,h=i*this.y+r*3*e*this.c1y+s*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),f=this.c1x+2*e*(this.c2x-this.c1x)+o*(this.toX-2*this.c2x+this.c1x),d=this.c1y+2*e*(this.c2y-this.c1y)+o*(this.toY-2*this.c2y+this.c1y),p=s*this.x+e*this.c1x,m=s*this.y+e*this.c1y,y=s*this.c2x+e*this.toX,g=s*this.c2y+e*this.toY,v=90-Math.atan2(u-f,l-d)*180/Math.PI;return{x:c,y:h,m:{x:u,y:l},n:{x:f,y:d},start:{x:p,y:m},end:{x:y,y:g},alpha:v}}getTatLen(t){const e=this.x,s=this.y,i=this.c1x,r=this.c1y,o=this.c2x,a=this.c2y,c=this.toX,h=this.toY;if(t<0||te.bezlen(e,s,i,r,o,a,c,h)<t)return 0;const u=1;let l=u/2,f=u-l,d=te.bezlen(e,s,i,r,o,a,c,h,f);for(;Math.abs(d-t)>.01;)l/=2,f+=(d<t?1:-1)*l,d=te.bezlen(e,s,i,r,o,a,c,h,f);return f}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 Yg extends wc{source;raw="";mode="text";tagname="";nodename="";textchunk="";entity="";quote="";attrs={};constructor(t){super(),this.source=t}parse(){const t=Vb(this.source);if(t===0){this.emit("finish");return}let e,s,i=ed(this.source,0);for(let r=1;r<t;r++)e=s,s=i,i=ed(this.source,r),this.raw+=s,s&&this.step(s,i,e);i&&this.step(i,void 0,s),this.emit("finish")}step(t,e,s){t==`
111
+ `&&this.emit("newline"),this.act(t,e,s)}act(t,e,s){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":dn("whitespace",t)?(this.textchunk+=Gg(this.entity),this.mode="text"):t==";"?(this.textchunk+=Gg(this.entity+t),this.mode="text"):this.entity+=t;break;case"special":if(s=="!"&&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(s=="]"&&t=="]"&&e==">"){this.mode="cdata end",this.textchunk=this.textchunk.slice(0,-1);break}t=="eof"&&(this.mode="cdata end",this.act(t,e,s)),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=="-"&&s=="-"&&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(!dn("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,s)}break;case"close tag name start":dn("whitespace",t)||(this.mode="close tag name",this.tagname="",this.nodename="",this.act(t,e,s));break;case"close tag name":if(dn("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(dn("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":dn("whitespace",t)||(this.mode="attr",this.nodename="",this.act(t,e,s));break;case"attr":if(dn("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(!dn("whitespace",t)){if(this.mode="attr value",this.quote="",t=="'"||t=='"'){this.quote=t;return}this.act(t,e,s)}break;case"attr value":if(dn("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&&s!="\\"&&(this.mode="attr start");break;default:this.attrs[this.nodename]+=t;break}break}}}function Gg(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 Xg=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Wg(n,t={}){var e=1,s=1;function i(B){var z=B.match(/\n/g);z&&(e+=z.length);var P=B.lastIndexOf(`
112
+ `);s=~P?B.length-P:s+B.length}function r(){var B={line:e,column:s};return function(z){return z.position=new o(B),p(),z}}function o(B){this.start=B,this.end={line:e,column:s},this.source=t.source}o.prototype.content=n;var a=[];function c(B){var z=new Error(t.source+":"+e+":"+s+": "+B);if(z.reason=B,z.filename=t.source,z.line=e,z.column=s,z.source=n,t.silent)a.push(z);else throw z}function h(){var B=f();return{type:"stylesheet",stylesheet:{source:t.source,rules:B,parsingErrors:a}}}function u(){return d(/^{\s*/)}function l(){return d(/^}/)}function f(){var B,z=[];for(p(),m(z);n.length&&n.charAt(0)!="}"&&(B=ct()||ht());)B!==!1&&(z.push(B),m(z));return z}function d(B){var z=B.exec(n);if(z){var P=z[0];return i(P),n=n.slice(P.length),z}}function p(){d(/^\s*/)}function m(B){var z;for(B=B||[];z=y();)z!==!1&&B.push(z);return B}function y(){var B=r();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 P=n.slice(2,z-2);return s+=2,i(P),n=n.slice(z),s+=2,B({type:"comment",comment:P})}}function g(){var B=d(/^([^{]+)/);if(B)return Mn(B[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 v(){var B=r(),z=d(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(z){if(z=Mn(z[0]),!d(/^:\s*/))return c("property missing ':'");var P=d(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/),I=B({type:"declaration",property:z.replace(Xg,""),value:P?Mn(P[0]).replace(Xg,""):""});return d(/^[;\s]*/),I}}function x(){var B=[];if(!u())return c("missing '{'");m(B);for(var z;z=v();)z!==!1&&(B.push(z),m(B));return l()?B:c("missing '}'")}function b(){for(var B,z=[],P=r();B=d(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)z.push(B[1]),d(/^,\s*/);if(z.length)return P({type:"keyframe",values:z,declarations:x()})}function E(){var B=r(),z=d(/^@([-\w]+)?keyframes\s*/);if(z){var P=z[1];if(z=d(/^([-\w]+)\s*/),!z)return c("@keyframes missing name");var I=z[1];if(!u())return c("@keyframes missing '{'");for(var G,X=m();G=b();)X.push(G),X=X.concat(m());return l()?B({type:"keyframes",name:I,vendor:P,keyframes:X}):c("@keyframes missing '}'")}}function _(){var B=r(),z=d(/^@supports *([^{]+)/);if(z){var P=Mn(z[1]);if(!u())return c("@supports missing '{'");var I=m().concat(f());return l()?B({type:"supports",supports:P,rules:I}):c("@supports missing '}'")}}function D(){var B=r(),z=d(/^@host\s*/);if(z){if(!u())return c("@host missing '{'");var P=m().concat(f());return l()?B({type:"host",rules:P}):c("@host missing '}'")}}function V(){var B=r(),z=d(/^@media *([^{]+)/);if(z){var P=Mn(z[1]);if(!u())return c("@media missing '{'");var I=m().concat(f());return l()?B({type:"media",media:P,rules:I}):c("@media missing '}'")}}function O(){var B=r(),z=d(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(z)return B({type:"custom-media",name:Mn(z[1]),media:Mn(z[2])})}function N(){var B=r(),z=d(/^@page */);if(z){var P=g()||[];if(!u())return c("@page missing '{'");for(var I=m(),G;G=v();)I.push(G),I=I.concat(m());return l()?B({type:"page",selectors:P,declarations:I}):c("@page missing '}'")}}function U(){var B=r(),z=d(/^@([-\w]+)?document *([^{]+)/);if(z){var P=Mn(z[1]),I=Mn(z[2]);if(!u())return c("@document missing '{'");var G=m().concat(f());return l()?B({type:"document",document:I,vendor:P,rules:G}):c("@document missing '}'")}}function Y(){var B=r(),z=d(/^@font-face\s*/);if(z){if(!u())return c("@font-face missing '{'");for(var P=m(),I;I=v();)P.push(I),P=P.concat(m());return l()?B({type:"font-face",declarations:P}):c("@font-face missing '}'")}}var st=et("import"),it=et("charset"),nt=et("namespace");function et(B){var z=new RegExp("^@"+B+"\\s*([^;]+);");return function(){var P=r(),I=d(z);if(I){var G={type:B};return G[B]=I[1].trim(),P(G)}}}function ct(){if(n[0]=="@")return E()||V()||O()||_()||st()||it()||nt()||U()||N()||D()||Y()}function ht(){var B=r(),z=g();return z?(m(),B({type:"rule",selectors:z,declarations:x()})):c("selector missing")}return Au(h())}function Mn(n){return n?n.replace(/^\s+|\s+$/g,""):""}function Au(n,t){var e=n&&typeof n.type=="string",s=e?n:t;for(var i in n){var r=n[i];Array.isArray(r)?r.forEach(function(o){Au(o,s)}):r&&typeof r=="object"&&Au(r,s)}return e&&Object.defineProperty(n,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),n}class Hg extends Yg{currentItem={};items=[];groups=[];globalStyles={};grad={};idtops={};text="";constructor(t){super(t),this.on("tag",(e,s)=>{switch(this.text="",this.currentItem={type:e},e){case"g":this.groups.push(this.currentItem);break}this.processAttrs(e,s)}),this.on("text",e=>{if(this.currentItem.type=="style"){try{const s=Wg(e);for(const i of s.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,s)=>{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),Du(this.currentItem.style,this.currentItem,Ru)}switch(this.processAttrs(e,s),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 s=[],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&&Du(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+Mu(parseFloat(e.x1),parseFloat(e.y1),parseFloat(e.x2),parseFloat(e.y2),parseFloat(e.x1)+100,parseFloat(e.y1))).toFixed(2),s=[this.grad.angle];for(let a=0,c=this.grad.stops.length;a<c;a++)i=this.grad.stops[a],a&&a!=c-1?s.push(i.color+":"+i.offset):s.push(i.color);this.idtops[this.grad.id]=s.join("-"),this.items.forEach(a=>{a.fillid==this.grad.id&&(a.fill=this.idtops[this.grad.id])});break;case"radialGradient":s=[];for(let a=0,c=this.grad.stops.length;a<c;a++)i=this.grad.stops[a],a&&a!=c-1?s.push(i.color+":"+i.offset):s.push(i.color);this.idtops[this.grad.id]=s.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(Ru.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"&&Du(o,this.currentItem,Ru),r==="transform"&&(this.currentItem.transform=o+(this.currentItem.transform||" ")),r==="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])}}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 Mu(n,t,e,s,i,r){if(typeof i>"u"||typeof r>"u"){const o=n-e,a=t-s;return!o&&!a?0:(180+Math.atan2(-a,-o)*180/Math.PI+360)%360}else return Mu(n,t,i,r)-Mu(e,s,i,r)}function Du(n,t,e){const s=(n+"").split(";"),i=/^\s+|\s+$/g;for(let r=0,o=s.length;r<o;r++){const a=s[r].split(":"),c=a[0].replace(i,"").replace(/[A-Z]/g,function(h){return"-"+h.toLowerCase()});(!e||e.includes(c))&&(t[c]=a[1].replace(i,""))}}const Ru=["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 pe{prevPathX=0;prevPathY=0;isUpdatedSVGPathData=!0;isUpdatedSVGPathD=!0;isUpdatedBoundingClientRect=!0;isUpdatedPolymorphPoints=!0;isUpdatedTotalLength=!0;normalizedLines=[];constructor(t){const e=typeof t=="string"?To(t):t||[],s=Rh(Co(e));for(let i=0,r=s.length;i<r;i++){const o=s[i];o[0]=="M"?(this.prevPathX=o[1],this.prevPathY=o[2]):this._appendLine(new te({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 Pu){Eo(this.prevPathX,this.prevPathY,t.toX,t.toY,t.largeArcFlag,t.sweepFlag,t.rx,t.ry,t.xAxisRotate).forEach(h=>{const[u,l,f,d,p,m,y,g]=h;this.normalizedLines.push(new te({x:this.prevPathX,y:this.prevPathY,c1x:f,c1y:d,c2x:p,c2y:m,toX:y,toY:g})),this.prevPathX=y,this.prevPathY=g});return}if(t instanceof te){this.normalizedLines.push(t.clone()),this.prevPathX=t.toX,this.prevPathY=t.toY;return}let e,s,i,r,o,a;t instanceof gP?[e,s,i,r,o,a]=zi(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,s,i,r,o,a]=ws(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new te({x:this.prevPathX,y:this.prevPathY,c1x:e,c1y:s,c2x:i,c2y:r,toX:o,toY:a})),this.prevPathX=o,this.prevPathY=a}static fromPolymorphPoints(t){const e=new pe,s=t.length;if(s){e.prevPathX=t[0],e.prevPathY=t[1];for(let i=2;i+5<s;i+=6)e._appendLine(new te({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 pe,s=t.length;if(s){e.prevPathX=t[0].x,e.prevPathY=t[0].y;for(let i=0;i<s;i++)e._appendLine(t[i])}return e}clone(){return pe.fromLines(this.normalizedLines)}cachedSVGPathData=[];toSVGPathData(){if(this.isUpdatedSVGPathData){const t=[];for(let e=0,s=this.normalizedLines.length;e<s;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=Dh(this.toSVGPathData()),this.isUpdatedSVGPathD=!1),this.cachedSVGPathD}toCanvasContext(t){t.beginPath();for(let e=0,s=this.normalizedLines.length;e<s;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=[],s=[];if(this.normalizedLines.forEach(i=>{const r=i.getBoundingClientRect(t);e.push(r.x,r.x+r.width),s.push(r.y,r.y+r.height)}),e.length==0||s.length==0)this.cachedBoundingClientRect={x:0,y:0,width:0,height:0};else{const i=Math.min(...e),r=Math.min(...s),o=Math.max(...e),a=Math.max(...s);this.cachedBoundingClientRect={x:at(i,t),y:at(r,t),width:at(o-i,t),height:at(a-r,t)}}this.isUpdatedBoundingClientRect=!1}return this.cachedBoundingClientRect}getBoundingClientRectCenter(t=2){const e=this.getBoundingClientRect(t);return{x:at(e.x+e.width*.5,t),y:at(e.y+e.height*.5,t)}}transform(t){let e;return t.m?e=t.m:(e=new ee,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():pe.fromLines(this.normalizedLines.map(s=>{let i=s.x,r=s.y,o=s.c1x,a=s.c1y,c=s.c2x,h=s.c2y,u=s.toX,l=s.toY;return{x:i,y:r}=e.transformPoint({x:i,y:r}),{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 te({x:i,y:r,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,s=0;const i=this.normalizedLines.length;for(let r=0;r<i;r++){const o=this.normalizedLines[r];if(s=o.length(),e+s>=t)return o.getPointAtSegmentLength(t-e);e+=s}return this.normalizedLines[i-1].getPointAtSegmentLength(s)}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 s=t*e,i=this.normalizedLines[0];if(s--,s>1)for(let r=1;r<e&&(i=this.normalizedLines[r],s>1);r++)s-=1;return i.interpolate(s)}}getSubPathD(t,e,s=1e-6){const i=this.getSubPathDAtLength(e,!0);return dc(s)(t,0)?i:i.getSubPathDAtLength(t,!1)}getSubPathDAtLength(t,e=!1){const s=new pe;let i=0,r=!1;for(let o=0,a=this.normalizedLines.length;o<a;o++){const c=this.normalizedLines[o];o==0&&(s.prevPathX=c.x,s.prevPathY=c.y);const h=c.length();if(i+h>t&&!r){r=!0;const u=c.getPointAtSegmentLength(t-i);if(s._appendLine(new te({x:s.prevPathX,y:s.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 s;s.normalizedLines=[],s._appendLine(new te({x:s.prevPathX,y:s.prevPathY,c1x:u.n.x,c1y:u.n.y,c2x:u.end.x,c2y:u.end.y,toX:c.toX,toY:c.toY})),i+=h;continue}s._appendLine(c),i+=h}return s}closestPoint(t,e){const s=this.getTotalLength();let i={x:t,y:e},r=0,o=1/0,a=8;for(let h=0;h<=s;h+=a){const u=this.getPointAtLength(h),l=(t-u.x)*(t-u.x)+(e-u.y)*(e-u.y);l<o&&(i=u,r=h,o=l)}for(a/=2;a>.5;){const h=r-a,u=this.getPointAtLength(h),l=(t-u.x)*(t-u.x)+(e-u.y)*(e-u.y),f=r+a,d=this.getPointAtLength(f),p=(t-d.x)*(t-d.x)+(e-d.y)*(e-d.y);h>=0&&l<o?(i=u,r=h,o=l):f<=s&&p<o?(i=d,r=f,o=p):a/=2}const c=this.getPointAtLength(r+(r===s?-.1:.1));return{point:i,rotation:r>=s?Pe(c.x,c.y,i.x,i.y):Pe(i.x,i.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,s)=>e.concat([s.c1x,s.c1y,s.c2x,s.c2y,s.toX,s.toY]),[]))}this.isUpdatedPolymorphPoints=!1}return[...this.cachedPolymorphPoints]}getPolymorphPointsPerimeter(){let t=0;const e=this.getPolymorphPoints(),s=e.length;if(s){let i=e[s-2],r=e[s-1];for(let o=0;o<s;o+=6)t+=Gn(e[o],e[o+1],i,r),i=e[o],r=e[o+1]}return Math.floor(t)}expendToPolymorphPoints(t){const e=t.length,s=this.getPolymorphPoints(),i=s.length;if(i){const r=[];let o=e-i;const a=Math.ceil(e/i);r.push(["M",s[0],s[1]]);let c=2;for(;c+5<=i-1;){const h=s[c++],u=s[c++],l=s[c++],f=s[c++],d=s[c++],p=s[c++];r.push(["C",h,u,l,f,d,p]);let m=0;for(;m<a&&o>0;)r.push(["C",d,p,d,p,d,p]),o-=6,m++}return new pe(r)}else return pe.fromPolymorphPoints(t)}static getInterpolator(t,e){return s=>{const i=dc(Number.EPSILON);return i(s,0)?t.clone():i(s,1)?e.clone():pe.fromPolymorphPoints(mw(t.getPolymorphPoints(),e.getPolymorphPoints(),s).map(r=>at(r,2)))}}}const qg=yP("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 yP(n,t=10){const e={},s=n.split(",");for(let i=0;i<s.length;i+=2){const r="&"+s[i+1]+";",o=parseInt(s[i],t);e[r]="&#"+o+";"}return e["\\xa0"]="&#160;",e}function ge(n,t){const e=Object.keys(t);for(let s=0;s<e.length;s++)n=n.replace(new RegExp("{"+e[s]+"}","gi"),""+t[e[s]]);return n}function ha(n){let t,e;if(!n)throw new Error("cannot create a random attribute name for an undefined object");const s="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=s[Math.floor(Math.random()*s.length)];while(n[t]);return t}function vP(n){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[n]||t.start}function bP(n){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[n]||t.alphabetic}const ar={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 Ou{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}addColorStop(t,e){const s=this.__ctx.__createElement("stop");if(s.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&&(s.setAttribute("stop-color",ge("rgb({r},{g},{b})",{r:r[1],g:r[2],b:r[3]})),s.setAttribute("stop-opacity",r[4]))}else s.setAttribute("stop-color",e);this.__root.appendChild(s)}}class Kg{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}}class ua{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:t,width:e=500,height:s=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=s||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(ar);for(let e=0,s=t.length;e<s;e++){const i=t[e];this[i]=ar[i].canvas}}__getStyleState(){const t={},e=Object.keys(ar);for(let s=0,i=e.length;s<i;s++){const r=e[s];t[r]=this[r]}return t}__applyStyleState(t){const e=Object.keys(t);for(let s=0,i=e.length;s<i;s++){const r=e[s];this[r]=t[r]}}__createElement(t,e={},s=!1){const i=this.__document.createElementNS("http://www.w3.org/2000/svg",t),r=Object.keys(e);s&&(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 s=this.__currentElementsToStyle;s&&(e.setAttribute(t,""),e=s.element,s.children.forEach(r=>{r.setAttribute(t,"")}));const i=Object.keys(ar);for(let r=0;r<i.length;r++){const o=ar[i[r]],a=this[i[r]];if(o.apply){if(a instanceof Kg){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,ge("url(#{id})",{id:a.__root.getAttribute("id")}))}else if(a instanceof Ou)e.setAttribute(o.apply,ge("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,ge("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(i[r]==="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 i=Object.keys(qg);for(let r=0,o=i.length;r<o;r++){const a=i[r],c=qg[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 i=this.__createElement("g");e.appendChild(i),this.__currentElement=i}let s=this.__currentElement.getAttribute("transform");s?s+=" ":s="",s+=t,this.__currentElement.setAttribute("transform",s)}scale(t,e){e===void 0&&(e=t),this.__addTransform(ge("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(ge("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(ge("translate({x},{y})",{x:t,y:e}))}transform(t,e,s,i,r,o){this.__addTransform(ge("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:s,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(ge("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(ge("L {x} {y}",this.__currentPosition)):this.__addPathCommand(ge("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,s,i,r,o){this.__currentPosition={x:r,y:o},this.__addPathCommand(ge("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:s,cp2y:i,x:r,y:o}))}quadraticCurveTo(t,e,s,i){this.__currentPosition={x:s,y:i},this.__addPathCommand(ge("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:s,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,s,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===s&&e===i||r===0){this.lineTo(t,e);return}const c=this.normalize([o-t,a-e]),h=this.normalize([s-t,i-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)),f=this.normalize([c[0]+h[0],c[1]+h[1]]),d=r/Math.sin(l/2),p=t+d*f[0],m=e+d*f[1],y=[-c[1],c[0]],g=[h[1],-h[0]],v=function(E){const _=E[0];return E[1]>=0?Math.acos(_):-Math.acos(_)},x=v(y),b=v(g);this.lineTo(p+y[0]*r,m+y[1]*r),this.arc(p,m,r,x,b)}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,s,i){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+s,e),this.lineTo(t+s,e+i),this.lineTo(t,e+i),this.lineTo(t,e),this.closePath()}fillRect(t,e,s,i){const r=this.__createElement("rect",{x:t,y:e,width:s,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,s,i){const r=this.__createElement("rect",{x:t,y:e,width:s,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),s=this.__rootSVG.childNodes[1],i=s.childNodes;for(let r=i.length-1;r>=0;r--)i[r]&&s.removeChild(i[r]);this.__currentElement=s,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,s,i){if(t===0&&e===0&&s===this.width&&i===this.height){this.__clearCanvas();return}const r=this.__closestGroupOrSvg(),o=this.__createElement("rect",{x:t,y:e,width:s,height:i,fill:"#FFFFFF"},!0);r.appendChild(o)}createLinearGradient(t,e,s,i){const r=this.__createElement("linearGradient",{id:ha(this.__ids),x1:t+"px",x2:s+"px",y1:e+"px",y2:i+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(r),new Ou(r,this)}createRadialGradient(t,e,s,i,r,o){const a=this.__createElement("radialGradient",{id:ha(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 Ou(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),s={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"&&(s.decoration="underline"),this.__fontHref&&(s.href=this.__fontHref),s}__wrapTextLink(t,e){if(t.href){const s=this.__createElement("a");return s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),s.appendChild(e),s}return e}__applyText(t,e,s,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:s,"text-anchor":vP(this.textAlign),"dominant-baseline":bP(this.textBaseline)},!0);a.appendChild(this.__document.createTextNode(t)),this.__currentElement=a,this.__applyStyleToCurrentElement(i),o.appendChild(this.__wrapTextLink(r,a))}fillText(t,e,s){this.__applyText(t,e,s,"fill")}strokeText(t,e,s){this.__applyText(t,e,s,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,s,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+s*Math.cos(r),c=e+s*Math.sin(r),h=t+s*Math.cos(i),u=e+s*Math.sin(i),l=o?0:1;let f=0,d=r-i;d<0&&(d+=2*Math.PI),o?f=d>Math.PI?0:1:f=d>Math.PI?1:0,this.lineTo(h,u),this.__addPathCommand(ge("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:s,ry:s,xAxisRotation:0,largeArcFlag:f,sweepFlag:l,endX:a,endY:c})),this.__currentPosition={x:a,y:c}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),s=ha(this.__ids),i=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",s),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",ge("url(#{id})",{id:s})),t.appendChild(i),this.__currentElement=i}drawImage(...t){let e=t[0],s,i,r,o,a=0,c=0,h,u,l,f,d,p,m,y;if(t.length===3)s=t[1],i=t[2],h=e.width,u=e.height,r=h,o=u;else if(t.length===5)s=t[1],i=t[2],r=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],s=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 g=this.__closestGroupOrSvg();this.__currentElement;const v="translate("+s+", "+i+")";if(e instanceof ua){if(l=e.getSvg().cloneNode(!0),l.childNodes&&l.childNodes.length>1){for(f=l.childNodes[0];f.childNodes.length;)y=f.childNodes[0].getAttribute("id"),this.__ids[y]=y,this.__SVGdefs.appendChild(f.childNodes[0]);if(d=l.childNodes[1],d){const x=d.getAttribute("transform");let b;x?b=x+" "+v:b=v,d.setAttribute("transform",b),g.appendChild(d)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(p=this.__createElement("image"),p.setAttribute("width",r),p.setAttribute("height",o),p.setAttribute("preserveAspectRatio","none"),(a||c||h!==e.width||u!==e.height)&&(m=this.__document.createElement("canvas"),m.width=r,m.height=o,m.getContext("2d")?.drawImage(e,a,c,h,u,0,0,r,o),e=m),p.setAttribute("transform",v),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 s=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),i=ha(this.__ids);let r;return s.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")),s.appendChild(r),this.__SVGdefs.appendChild(s)):t instanceof ua&&(s.setAttribute("width",""+t.width),s.setAttribute("height",""+t.height),s.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(s)),new Kg(s,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}}class Iu{canvas;context;customContext;enablePath2D=!1;currentPath2D=new Path2D;path2Ds=[];currentMatrix=new DOMMatrix;hasSetCustomStrokeStyle=!1;hasSetCustomFillStyle=!1;constructor(t,e,s,i=!1,r=!1){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),i&&(this.customContext=new ua({canvas:this.canvas,width:e||this.canvas.width,height:s||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,s,i){return this.context.fillRect(t,e,s,i),this.customContext&&this.customContext.fillRect(t,e,s,i),this}fillText(t,e,s,i){return this.hasSetCustomFillStyle=!1,this.context.fillText(t,e,s,i),this.customContext&&this.customContext.fillText(t,e,s),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,s,i){return this.context.strokeText(t,e,s,i),this.customContext&&this.customContext.strokeText(t,e,s),this}strokeRect(t,e,s,i){return this.context.strokeRect(t,e,s,i),this.customContext&&this.customContext.strokeRect(t,e,s,i),this}measureText(t){return this.context.measureText(t)}clearRect(t=0,e=0,s=this.canvas.width,i=this.canvas.height){return this.context.clearRect(t,e,s,i),this.customContext&&this.customContext.clearRect(t,e,s,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 s=new Path2D;s.addPath(t,e),this.currentPath2D=s}}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,s=0){return this.translate(e,s),this.context.rotate(t),this.customContext&&this.customContext.rotate(t),this.currentMatrix=this.currentMatrix.rotate(t),this.translate(-e,-s),this.changePath2D(),this}scale(t,e=t,s=0,i=0){return this.translate(s,i),this.context.scale(t,e),this.customContext&&this.customContext.scale(t,e),this.currentMatrix=this.currentMatrix.scale(t,e),this.translate(-s,-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,s,i,r,o){return this.context.arc(t,e,s,i,r,o),this.customContext&&this.customContext.arc(t,e,s,i,r,o?-1:1),this.enablePath2D&&this.currentPath2D.arc(t,e,s,i,r,o),this}arcTo(t,e,s,i,r){return this.context.arcTo(t,e,s,i,r),this.customContext&&this.customContext.arcTo(t,e,s,i,r),this.enablePath2D&&this.currentPath2D.arcTo(t,e,s,i,r),this}ellipse(t,e,s,i,r,o,a,c){return this.context.ellipse(t,e,s,i,r,o,a,c),this.enablePath2D&&this.currentPath2D.ellipse(t,e,s,i,r,o,a,c),this}quadraticCurveTo(t,e,s,i){return this.context.quadraticCurveTo(t,e,s,i),this.customContext&&this.customContext.quadraticCurveTo(t,e,s,i),this.enablePath2D&&this.currentPath2D.quadraticCurveTo(t,e,s,i),this}bezierCurveTo(t,e,s,i,r,o){return this.context.bezierCurveTo(t,e,s,i,r,o),this.customContext&&this.customContext.bezierCurveTo(t,e,s,i,r,o),this.enablePath2D&&this.currentPath2D.bezierCurveTo(t,e,s,i,r,o),this}rect(t,e,s,i){return this.context.rect(t,e,s,i),this.customContext&&this.customContext.rect(t,e,s,i),this.enablePath2D&&this.currentPath2D.rect(t,e,s,i),this}createLinearGradient(t,e,s,i,r){const o=this.context.createLinearGradient(t,e,s,i);return r&&Object.entries(r).forEach(([a,c])=>{o.addColorStop(parseFloat(a),c)}),o}createRadialGradient(t,e,s,i,r,o,a){const c=this.context.createRadialGradient(t,e,s,i,r,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 s=e[0],i=e[1];this.context.drawImage(t,s,i)}else if(e.length===4){const s=e[0],i=e[1],r=e[2],o=e[3];this.context.drawImage(t,s,i,r,o)}else if(e.length===8){const s=e[0],i=e[1],r=e[2],o=e[3],a=e[4],c=e[5],h=e[6],u=e[7];this.context.drawImage(t,s,i,r,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,s=this.canvas.width,i=this.canvas.height,r){return this.context.getImageData(t,e,s,i,r)}putImageData(t,e=0,s=0){return this.context.putImageData(t,e,s)}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 Bt=class Jf{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 bn;transformSubscription;isMouseIn=!1;isDragging=!1;m;el;constructor(t){this.id=Od(),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 s=this._x,i=this._y;(s!==t||i!==e)&&(this._x=t,this._y=e,this.transform$.next({dX:t-s,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 s=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/s,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 pe?this.initD:new pe(this.initD)):(!this.d||this.shouldUpdatePathD)&&(this.d=new pe(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 s=0,i=0;if(this.parent?.dDegree||this.parent?.dScaleX!==1||this.parent?.dScaleY!==1){const o=this.transformOrigin(!0);s=o.x,i=o.y}const r=new ee;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,s,i),(this.parent?.dScaleX!==1||this.parent?.dScaleY!==1)&&r.scale(this.parent?.dScaleX||1,this.parent?.dScaleY||1,s,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 Jf(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 s=0,i=0;if(this.parent&&!t){const r=this.parent.combo.getBoundingClientRectCenter(e);s=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);s=r.x,i=r.y}else s=this.initCenterX||0,i=this.initCenterY||0;return{x:s,y:i}}isPointInPath(t,e,s){if(t instanceof Iu)return t.isPointInPath(new Path2D(this.toSVGPathD()),e,s);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*s+r.e,y:r.b*e+r.d*s+r.f})}}return!1}isPointInStroke(t,e,s){if(t instanceof Iu)return t.isPointInStroke(new Path2D(this.toSVGPathD()),e,s);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*s+r.e,y:r.b*e+r.d*s+r.f})}}return!1}setStyle(t){Object.assign(this.style,t),this.shouldUpdateStyleInDraw=!0}setAttr(t,e){if(typeof t!="string")for(const s in t){const i=t[s];i&&i!=this.getAttr(s)&&(this.attrs[qt(s)]=i,this.shouldUpdateAttrsInDraw=!0)}else e&&e!=this.getAttr(t)&&(this.attrs[qt(t)]=e,this.shouldUpdateAttrsInDraw=!0)}getAttr(t,e){return this.attrs[t]||this.attrs[qt(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 s=t?.friction||1;this.vx*=s,this.vy*=s,this.move(this.vx,this.vy)}animateEaseTo(t,e){const s=e?.easing||.05,i=t.x-this.x,r=t.y-this.y;this.vx=i*s,this.vy=r*s,this.animate(e)}animateSpringTo(t,e){const s=e?.spring||.03;(Array.isArray(t)?t:[t]).forEach(i=>{const r=i.x-this.x,o=i.y-this.y,a=r*s,c=o*s;this.vx+=a,this.vy+=c}),this.animate({friction:.9,...e})}getSpringMassAlphaTo(t,e){const s=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<s){const c=r*i,h=o*i;return this.vx+=c/this.mass,this.vy+=h/this.mass,t.vx-=c/t.mass,t.vy-=h/t.mass,1-a/s}return 0}followTo(t,e=3){this.rotateTo(Jt(Pe(this.x,this.y,t.x,t.y)));const{dx:s,dy:i}=Xn(wt(this.degree),e);this.vx=s,this.vy=i,this.animate()}followAccelerationTo(t,e=.05){this.rotateTo(Jt(Pe(this.x,this.y,t.x,t.y)));const{dx:s,dy:i}=Xn(wt(this.degree),e);this.ax=s,this.ay=i,this.animate()}gravitateTo(t){const e=t.x-this.x,s=t.y-this.y,i=e*e+s*s,r=Math.sqrt(i),o=this.mass*t.mass/i,a=o*e/r,c=o*s/r;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,s=t.y-this.y,i=Math.sqrt(e*e+s*s),{x:r,y:o,width:a,height:c}=t.getBoundingClientRect(),{x:h,y:u}=t.getBoundingClientRectCenter(),{x:l,y:f,width:d,height:p}=this.getBoundingClientRect(),{x:m,y}=this.getBoundingClientRectCenter();if(i<Math.abs(h-r)+Math.abs(m-l)||i<Math.abs(u-o)+Math.abs(y-f)){const g=Math.atan2(s,e),v={x:0,y:0},x=Ge(-g,e,s),b=Ge(-g,this.vx,this.vy),E=Ge(-g,t.vx,t.vy),_=b.x-E.x;b.x=((this.mass-t.mass)*b.x+2*t.mass*E.x)/(this.mass+t.mass),E.x=_+b.x;const D=Math.abs(b.x)+Math.abs(E.x),V=this.ballRadius+t.ballRadius-Math.abs(v.x-x.x);v.x+=b.x/D*V,x.x+=E.x/D*V;const O=Ge(g,v.x,v.y),N=Ge(g,x.x,x.y);t.moveTo(this.x+N.x,this.y+N.y),this.moveTo(this.x+O.x,this.y+O.y);const U=Ge(g,b.x,b.y),Y=Ge(g,E.x,E.y);this.vx=U.x,this.vy=U.y,t.vx=Y.x,t.vy=Y.y}}checkWall(t){if(!t?.wall)return;const e=typeof t.wall.bounce=="number"?t.wall.bounce:-1,s=t.wall.x,i=t.wall.y,r=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>r?this.moveXTo(s-(a+h)):this.x+a+h<s&&this.moveXTo(r-a),this.y+c>o?this.moveYTo(i-(c+u)):this.y+c+u<i&&this.moveYTo(o-c)):(this.x+a+h>r?(this.moveXTo(r-(a+h)),this.vx*=e):this.x+a<s&&(this.moveXTo(s+(a+h)),this.vx*=e),this.y+c+u>o?(this.moveYTo(o-(c+u)),this.vy*=e):this.y+c<i&&(this.moveYTo(i+(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 s=this.getTotalLength(),i=t*s,r=e*s;return{subPathD:this.transformPathD().getSubPathD(i,r),point:this.getPointAtLength(r)}}strokeDashTween(t=1e3,e){const s=this.pathD().getTotalLength();this.setAttr({strokeDasharray:`${s} ${s}`,strokeDashoffset:`${s}`});const i=e?.onUpdate,r=new $i({frameDuration:t});r.addTween({offset:s},{offset:0},Object.assign(e||{},{onUpdate:(o,a)=>{this.setAttr("strokeDashoffset",""+at(o.offset,2)),i?.(o,a)}})),r.play()}static generateRosetta(t,e,s,i,r){if(r==0)throw new Error("no dividing by zero, please");const o=[],a=360/r;for(let c=0;c<r;c+=1){const h=a*c*Math.PI/180,u=t+2*s*Math.cos(h),l=e+2*s*Math.sin(h);o.push(new Pu({x:t,y:e,rx:s,ry:i,xAxisRotate:a*c,largeArcFlag:1,sweepFlag:1,toX:u,toY:l})),o.push(new Pu({x:u,y:l,rx:s,ry:i,xAxisRotate:a*c,largeArcFlag:1,sweepFlag:1,toX:t,toY:e}))}return new Jf({initD:pe.fromLines(o)})}};class Se{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,s=0,i=0,r=0;const o=new Hg(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),s=parseFloat(h.height),t.forceWidth){const p=e/s;i=t.forceWidth,r=i/p}else i=e,r=s;continue}if(h.type!="path"||!Mh(h.path))continue;const u={};for(const p in h)p==="type"||p==="path"||p==="transform"||(u[p]=h[p]);const l=Co(To(h.path)),f=[];let d=[];for(let p=0,m=l.length;p<m;p++){const y=l[p];d.push(y),y[0].toLowerCase()=="z"&&(f.push(d),d=[])}d.length&&f.push(d),f.forEach(p=>{const m=new Bt({attrs:u,initD:p});if(h.transform){const g=ny(h.transform).split();m.moveTo(g.x,g.y),m.rotateTo(g.degree),m.scaleTo(g.scaleX,g.scaleY)}this.addShape(m)})}i&&e&&r&&s&&this.comboScale(i/e,r/s,!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 s=e.clone();return e.parent&&(s.parent={...e.parent,combo:t}),s}),t}cloneShapeCombo(){return new Se(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,s=!1){s||(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(s=>{s.rotate(t)})}comboScale(t,e,s=!1){s||(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=[],s=[];if(this.shapes.forEach(c=>{const h=c.getBoundingClientRect(t);e.push(h.x,h.x+h.width),s.push(h.y,h.y+h.height)}),e.length==0||s.length==0)return{x:0,y:0,width:0,height:0};const i=Math.min(...e),r=Math.min(...s),o=Math.max(...e),a=Math.max(...s);return{x:at(i,t),y:at(r,t),width:at(o-i,t),height:at(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:at(e.x+e.width*.5,t),y:at(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 s in t){const i=t[s];i&&i!=this.getAttr(s)&&(this.attrs[qt(s)]=i)}this.shapes.forEach(s=>{s.setAttr(t)})}else e&&e!=this.getAttr(t)&&(this.attrs[qt(t)]=e,this.shapes.forEach(s=>{s.setAttr(t,e)}))}getAttr(t,e){return this.attrs[t]||this.attrs[qt(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,s=this.shapes.length;if(e<s)return t.expendTo(this);for(let i=s;i<e;i++){const r=t.shapes[i];this.addShape(new Bt({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 s=new $i({frameDuration:t}),i={},r={};this.shapes.forEach((o,a)=>{const c=o.pathD().getTotalLength();i[`offset_${a}`]=c,r[`offset_${a}`]=0,o.setAttr({strokeDasharray:`${c} ${c}`,strokeDashoffset:`${c}`})}),s.addTween(i,r,Object.assign(e||{},{onStart:()=>{e?.onGroupStart?.()},onUpdate:(o,a)=>{for(const c in o){const h=mc(c).number;this.shapes[h].setAttr("strokeDashoffset",""+at(o[c],2))}e?.onGroupUpdate?.()},onComplete:()=>{e?.onGroupComplete?.()}})),s.play();break}}}function wP(n,t,e=5){const s=dc(e);(!s(n.x,t.current.x)||!s(n.y,t.current.y))&&n.followTo(t.current)}function xP(n,t,e){n.drag&&n.drag.enable&&!n.isDragging&&n.animateEaseTo(t,e)}function SP(n,t){const e=[],s=n.length;for(let i=0;i<s;i++){const r=n[i];if(t?.springLength){const o=t?.springLength||100;r.isDragging||n.filter(a=>a.id!==r.id).forEach(a=>{const c=Pe(r.x,r.y,a.x,a.y);r.animateSpringTo({x:a.x-Math.cos(c)*o,y:a.y-Math.sin(c)*o},t)})}else t?.spring?i>0&&r.animateSpringTo(n[i-1],t):r.animate(t);if(t?.wall&&r.checkWall(t),t?.enableCollision||t?.enableGravityBetweenObjects||t?.enableSpringMassAlpha)for(let o=i+1;o<s;o++)t?.enableCollision&&r.checkCollision(n[o]),t?.enableGravityBetweenObjects&&r.gravitateTo(n[o]),t?.enableSpringMassAlpha&&e.push([r.x,r.y,n[o].x,n[o].y,r.getSpringMassAlphaTo(n[o],t)])}return e}function Jg(n){if(n.length<2)throw new Error("shapes个数必须大于等于2");const t=n.length-1,e=new Array(t);for(let i=0;i<t;i++){const r=n[i].transformPathD(),o=n[i+1].transformPathD(),a=r.getPolymorphPoints(),c=o.getPolymorphPoints(),h=a.length>=c.length?a:c;e[i]=pe.getInterpolator(r.expendToPolymorphPoints(h),o.expendToPolymorphPoints(h))}const s=new Bt({initD:""});return i=>{const r=at(t*i,6),o=Math.min(Math.floor(r),t-1),a=at(r-o,6);return s.pathD(e[o](a)),s.setAttr(n[o+1].attrs),s}}function _P(n){if(n.length<2)throw new Error("shapeCombos个数必须大于等于2");let t;const e=[];n.forEach(o=>{let a;o instanceof Se?(a=o,a.sort()):(a=new Se,a.addShape(o)),e.push(a),(!t||t.shapes.length<a.shapes.length)&&(t=a)});const s=[];e.forEach((o,a)=>{o!==t&&o.expendTo(t),o.shapes.forEach((c,h)=>{s[h]=s[h]||[],s[h][a]=c})});const i=[];s.forEach(o=>{i.push(Jg(o))});const r=new Se;return i.forEach(o=>{r.addShape(o(0))}),o=>(i.forEach(a=>{a(o)}),r)}function EP(n,t=6e3,e){const s=n.findIndex(a=>a instanceof Se)>=0?_P(n):Jg(n),i=s(0),r=e?.onUpdate,o=new $i({frameDuration:t});return o.addTween({t:0},{t:1},Object.assign(e||{},{onUpdate:(a,c)=>{r?.(a,c),s(a.t),e?.shapeOrCombo?.(i,a.t)}})),o.play(),i}class TP{PARENT_EL;SVG_EL=null;CANVAS_EL=null;ctx=null;rect={x:0,y:0,width:0,height:0};size$=new po(null);resizeSubscription;mpg=Ps();mouseSubscription;shapes=[];shapeTap$=new po(null);tapSubscription;lastMouseInShapeId="";draggingShapeId="";prevCursor="default";constructor(t=document.documentElement,e="canvas",s=!1){this.PARENT_EL=t,(e=="svg"||e=="canvas")&&uy(this.PARENT_EL),e=="svg"&&(this.SVG_EL=Hn("svg"),si(this.PARENT_EL,this.SVG_EL)),e=="canvas"&&(this.CANVAS_EL=my("canvas"),si(this.PARENT_EL,this.CANVAS_EL)),this.resizeSubscription=ll(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&&Fn(this.SVG_EL,{viewBox:`0 0 ${this.rect.width} ${this.rect.height}`,width:`${this.rect.width}`,height:`${this.rect.height}`}),this.CANVAS_EL&&(Fn(this.CANVAS_EL,{width:`${this.rect.width}`,height:`${this.rect.height}`}),this.ctx=new Iu(this.CANVAS_EL,this.rect.width,this.rect.height,s)),this.size$.next(i)}),this.mouseSubscription=Ny(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL,{createMousePoint:this.mpg}).subscribe(()=>{}),this.tapSubscription=Ty(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(s=>{s instanceof Se?e.push(...s.shapes):e.push(s)}),this.SVG_EL&&this.shapes.filter(s=>e.findIndex(i=>i.id==s.id)==-1).forEach(s=>{s.el&&(s.el.remove(),delete s.el)}),yw(this.shapes,e)}this.ctx&&this.ctx.clearRect(),this.lastMouseInShapeId="",this.mpg.current.isDown||(this.draggingShapeId="");for(const e of this.shapes){const{x:s,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,si(this.SVG_EL,e.el),Fn(e.el,{id:e.id})):(e.el=a||Ah(),si(this.SVG_EL,e.el),Fn(e.el,{id:e.id})),wp(e.el)&&Fn(e.el,{d:e.toSVGPathD()}),e.shouldUpdateSVGElInDraw=!1,e.shouldUpdateAttrsInDraw=!0,e.shouldUpdateStyleInDraw=!0,e.shouldUpdateMInDraw=!0}if(e.shouldUpdateAttrsInDraw&&(ud(e.attrs)||Fn(e.el,e.attrs),e.shouldUpdateAttrsInDraw=!1),e.shouldUpdateStyleInDraw&&(ud(e.style)||Us(e.el,e.style),e.shouldUpdateStyleInDraw=!1),e.shouldUpdateMInDraw||!e.m){const a=new ee;a.translate(e.x+(e.parent?.dX||0),e.y+(e.parent?.dY||0)),a.rotate(e.degree,s,i),a.scale(e.scaleX,e.scaleY,s,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),Fn(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(wt(e.degree),s,i),this.ctx.scale(e.scaleX,e.scaleY,s,i),e.parent?.dDegree&&this.ctx.rotate(wt(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,Am(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,s=t?.brushColor||"#000000";let i=!1;const r=ya(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL,{start:()=>{i=!1,this.ctx&&(this.ctx.save(),this.ctx.lineWidth=e,this.ctx.strokeStyle=s,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,s=t?.brushDensity||50,i=t?.brushColor||"#000000",r=new Be(i),o=r.r,a=r.g,c=r.b,h=ya(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),f=l.data;for(let d=0;d<s;d++){const p=Math.random()*Math.PI*2,m=Math.random()*e,y=u.current.x+Math.cos(p)*m|0,g=u.current.y+Math.sin(p)*m|0,v=(y+g*l.width)*4;f[v]=o,f[v+1]=a,f[v+2]=c,f[v+3]=255}this.ctx.putImageData(l)}});return()=>{h.unsubscribe()}}downloadSVG=()=>{this.SVG_EL&&xp(this.SVG_EL)}}class Cs extends Bt{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 Cs({...super.getBaseOptions(),lineLength:this.lineLength,startColor:this.startColor,endColor:this.endColor})}lineToAbsolutePoint(t){const e=Jt(Pe(this.x,this.y,t.x,t.y)),s=Gn(this.x,this.y,t.x,t.y);(e!=this.degree||s!=this.lineLength)&&(e!=this.degree&&this.rotateTo(e),s!=this.lineLength&&(this.lineLength=s),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],s=t.transformPathD().normalizedLines[0];return e.intersection(s)}}class ku extends Bt{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 ku({...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,s=this.cy*2-(0+this.toY)/2;t.quadraticCurveTo(e,s,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}}class la extends Bt{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 la({...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 s=1;s<=e-1;s++)t.push(["l",this.points[s].x-this.points[s-1].x,this.points[s].y-this.points[s-1].y]);t.push(["z"])}else{const s=(this.points[0].x+this.points[e-1].x)/2,i=(this.points[0].y+this.points[e-1].y)/2;let r=s,o=i;t.push(["m",r,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-r,this.points[a].y-o,c-r,h-o]),r=c,o=h}t.push(["q",this.points[e-1].x-r,this.points[e-1].y-o,s-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 s=1;s<=e-1;s++)t.lineTo(this.points[s].x,this.points[s].y);t.closePath()}else{const s=(this.points[0].x+this.points[e-1].x)/2,i=(this.points[0].y+this.points[e-1].y)/2;t.moveTo(s,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,s,i)}}isPointInShape(t){const e=this.points.length;let s=!1;const i=2e-10;for(let r=0,o=e-1;r<e;o=r,r++){const a=this.points[r].x,c=this.points[r].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),f=a+l*(t.y-c);if(f===t.x||Math.abs(f-t.x)<i)return!0;f>t.x&&(s=!s)}}return s}[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,s,i){const r=[];for(let o=0;o<i;o++){const a=o/i*2*Math.PI,{dx:c,dy:h}=Xn(a,s);r.push({x:t+c,y:e+h})}return new la({points:r})}}class Lu extends Se{length=100;constructor(t){super(t);const e=new Cs({drag:{followSibling:!0},lineLength:this.length});this.addShape(e);const s=new Cs({drag:{followSibling:!0},lineLength:20+Math.random()*20});this.addShape(s,{dX:90-Math.random()*40,dDegree:Math.random()*70});const i=new Cs({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 Lu(super.getBaseOptions())}}class ei extends Bt{ballRadius;constructor(t){super(t),this.ballRadius=t?.ballRadius||0}cloneShape(){return new ei({...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=Hn("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 Hs(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 s=t/e;this.scalar(s)}return this}clamp(t){const e=this.length();return e&&e>t&&this.scalar(t/e),this}cross(t){const e=this.x,s=this.y;return{x:s*t.x-e*t.y,y:e*t.y-s*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 Vu extends Bt{constructor(t){super(t)}cloneShape(){return new Vu({...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 ts extends Bt{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 ts({...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=Hn("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,s,i,r,o,a,c){const u=new te({x:t,y:e,c1x:s,c1y:i,c2x:r,c2y:o,toX:a,toY:c}).getBoundingClientRect();return new ts({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 Nu extends Bt{rx;ry;constructor(t){super(t),this.rx=t?.heartRx||10,this.ry=t?.heartRy||10}cloneShape(){return new Nu({...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 zu extends Bt{rx;ry;constructor(t){super(t),this.rx=t?.heartRx||50,this.ry=t?.heartRy||50}cloneShape(){return new zu({...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 Fu extends Bt{r;constructor(t){super(t),this.r=t?.starR||20}cloneShape(){return new Fu({...super.getBaseOptions(),starR:this.r})}toSVGPathData(){const t=[["m",0,-this.r]];for(let e=0;e<6;e+=1){const s=288+e*144,i=this.r*Math.cos(wt(s)),r=this.r*Math.sin(wt(s));t.push(["l",i,r])}return t}}class Bu extends Bt{constructor(t){super(t)}cloneShape(){return new Bu({...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 ju extends Bt{constructor(t){super(t)}cloneShape(){return new ju({...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 $u extends Bt{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 $u({...super.getBaseOptions()})}}class Uu extends Bt{rx;ry;constructor(t){super(t),this.rx=t?.rx||0,this.ry=t?.ry||0}cloneShape(){return new Uu({...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=Hn("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 Yu extends Se{showFlame;flame;ship;constructor(t){super(t),this.showFlame=typeof t?.showFlame=="boolean"?t?.showFlame:!0,this.flame=new Bt({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 Bt({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 Yu({...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 Gu extends Se{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 ts({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 s=new ei({drag:{followSibling:!0},ballRadius:2});this.addShape(s);const i=new ei({drag:{followSibling:!0},ballRadius:2});this.addShape(i,{dX:0+this.width})}cloneShapeCombo(){return new Gu({...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(wt(t.degree))*this.width,y:t.y+Math.sin(wt(t.degree))*this.width}}}class Xu extends Se{options;value$=new bn;subscription;constructor(t){super(t),this.options=t;const e=t?.sliderMin||0,s=t?.sliderMax||100,i=t?.sliderStep||1,r=pw(e,s,i),o=r(typeof t?.sliderDefaultValue=="number"?rt(t.sliderDefaultValue,e,s):e);this.value$.next(o);const a=o/(s-e),c=t?.sliderWidth||100,h=t?.sliderHeight||4,u=h*.5,l=h*2.5,f=t?.sliderBackgroundColor||"#f5f5f5",d=t?.sliderForegroundColor||"#5a82f0",p=new ts({rectWidth:c,rectHeight:h,rectBorderRadius:u,attrs:{fill:f},drag:{enable:!1}});this.addShape(p);const m=new ts({rectWidth:c*a,rectHeight:h,rectBorderRadius:u,attrs:{fill:d},drag:{enable:!1}});this.addShape(m);const y=new ei({x:c*a,y:u,ballRadius:l,attrs:{fill:d},drag:{enable:!0,alongPath:new pe([["m",0,0],["l",c,0]])}});this.addShape(y),this.subscription=y.transform$.subscribe(({dX:g})=>{console.log(g);const v=(y.x-p.x)/c;m.update({rectWidth:c*v}),this.value$.next(r(v*(s-e)+e))})}destroy(){super.destroy(),this.subscription.unsubscribe()}cloneShapeCombo(){return new Xu({...super.getBaseOptions(),...this.options})}}class cr extends Bt{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,s=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,s)-this.lineWidth;this.radius=Math.max(0,r-r*Math.sin(wt(i)))}else this.radius=Math.max(0,Math.min(e/2,s/2)-this.lineWidth);t.x||(this.x=e/2),t.y||(this.half?this.y=s-this.lineWidth-this.radius*Math.sin(wt(i)):this.y=s/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 cr({...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}=Xn(wt(this.startDegree),this.radius),{dx:s,dy:i}=Xn(wt(this.percentDegree),this.radius);return[["m",t,e],["a",this.radius,this.radius,0,Math.abs(this.percentDegree-this.startDegree)>=180?1:0,1,s-t,i-e]]}toCanvasContext(t){if(this.startColor&&this.endColor){let e;if(this.half){const s=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+s,-i,{0:this.startColor,1:this.endColor})}else{const s=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,s,-i,{0:this.startColor,1:this.endColor})}this.setAttr({stroke:e})}t.beginPath(),t.arc(0,0,this.radius,wt(this.startDegree),wt(this.percentDegree),!1)}}class Wu extends Se{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 cr({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 cr({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 Cs({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(wt(c))*r,dY:this.ringBg.y+Math.sin(wt(c))*r,dDegree:c})}}this.setPercent(t.percent||0)}cloneShapeCombo(){return new Wu({...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 ni extends Bt{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=mc(this.getAttr("fontSize"),10).number,s=mc(this.getAttr("fontWeight"),400).number,i=ni.measureText(this.text,e,s);this.width=i.width,this.height=i.height}cloneShape(){return new ni({...super.getBaseOptions(),text:this.text})}toSVGEl(){const t=Hn("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 s=this.getAttr("line-height","1.2em");e.forEach((i,r)=>{if(i.trim()){const o=Hn("tspan");o.setAttribute("x","0"),o.setAttribute("dy",r>0?s:"0"),o.innerHTML=i.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 s=t.measureText(this.text),r=(s.actualBoundingBoxAscent+s.actualBoundingBoxDescent)*parseFloat(this.getAttr("line-height","1.2em"));let o=0;e.forEach((a,c)=>{a.trim()&&(o+=c>0?r:0,t.fillText(a.trim(),0,o))})}}static measureText(t,e=12,s=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=s.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,s=12,i=400,r="..."){let o="";if(!t||e<s)return o;const a=t.split("");let c=r?ni.measureText(r,s,i).width:0;for(let h=0,u=a.length;h<u;h++)if(c+=ni.measureText(a[h],s,i).width,c>e){r&&(o+=r);break}else o+=a[h];return o}}class Hu extends Se{options;constructor(t){super(t),this.options=t;const{shapeCreator:e,width:s,height:i,x:r,y:o,particleCount:a,angle:c,spread:h,startVelocity:u,decay:l,gravity:f,drift:d,ticks:p,colors:m,scalar:y,flat:g}=Object.assign({shapeCreator:()=>new ts({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:px,scalar:1,flat:!1},t||{}),v=(_,D)=>{_.x=s*r,_.y=i*o,_.scaleX=y,_.scaleY=y;const V=m[D%m.length];_.setAttr({fill:V}),_.interactive=!1,_.wobble=Math.random()*10,_.wobbleSpeed=Math.min(.11,Math.random()*.1+.05),_.velocity=u*.5+Math.random()*u,_.angle2D=-x+(.5*b-Math.random()*b),_.tiltAngle=(Math.random()*(.75-.25)+.25)*Math.PI,_.tick=0,_.totalTicks=p,_.decay=l,_.drift=d,_.random=Math.random()+2,_.tiltSin=0,_.tiltCos=0,_.wobbleX=0,_.wobbleY=0,_.gravity=f*3,_.scalar=y,_.flat=g,_.color=new Be(V)},x=wt(c),b=wt(h);let E=a;for(;E;){const _=e();v(_,E),_.clone=(D=>()=>{const V=e();return v(V,D),V})(E),this.addShape(_),E--}}cloneShapeCombo(){return new Hu(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,s=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=Jt(Math.PI/10*t.wobble),t.scaleX=Math.abs(r-s)*.1,t.scaleY=Math.abs(o-i)*.1,t.tick<t.totalTicks}),this.shapes.length>0}}const CP={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?"下午":"晚上"}},PP={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]}]`}},es=new Ow;let fa="zh-cn";qu(PP),qu(CP);function qu(n,t){if(!n)return es.get(fa);let e;if(typeof n=="string"){const s=n.toLowerCase();if(es.get(s))e=s;else if(t)es.set(s,t),e=s;else return es.get(fa)}else{const{name:s}=n;es.set(s,n),e=s}return e&&(fa=e),es.get(e)||es.get(fa)}class AP extends wc{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=Od(),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=ld(e).reduce((s,i)=>s+i,0)}this.state=cu(this)}forceSetCXY(t,e){this.cX=t,this.cY=e,this.forceCXY=!0}shapeInit(){}initPathD(){if(!this.pathd){if(this.pathd=new $E,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(s=>{const i=s.originMatrix?s.originMatrix.clone():new ee;i.translate(-t.x+s.x,-t.y+s.y),s.originMatrix=i});const e=this.originMatrix?this.originMatrix.clone():new ee;e.translate(-t.x+this.x,-t.y+this.y),this.originMatrix=e}isPointInPath(t,e,s){if(s instanceof Ch)return s.isPointInPath(new Path2D(this.toSVGPathD()),t,e);let i;try{i=new SVGPoint(t,e)}catch{i=s.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,s){if(s instanceof Ch)return s.isPointInStroke(new Path2D(this.toSVGPathD()),t,e);let i;try{i=new SVGPoint(t,e)}catch{i=s.createSVGPoint(),i.x=t,i.y=e}return this.el instanceof SVGGeometryElement?this.el.isPointInStroke(i):!1}clone(){return iw(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(([s,i])=>[qt(s),i]))):e&&(this.attrs[qt(t)]=e)}getAttr(t,e){return this.attrs[t]||this.attrs[qt(t)]||e}getAttrs(){return this.attrs}hasAttr(t){return!!this.attrs[t]||!!this.attrs[qt(t)]}distance(t){return Gn(this.x,this.y,t.x,t.y)}rotateTo(t){this.degree=Jt(Pe(this.x,this.y,t.x,t.y))}followTo(t,e=3){this.rotateTo(t);const{dx:s,dy:i}=Xn(wt(this.degree),e);this.vx=s,this.vy=i,this.run()}followAccelerationTo(t,e=.05){this.rotateTo(t);const{dx:s,dy:i}=Xn(wt(this.degree),e);this.ax=s,this.ay=i,this.run()}checkCollision(t){}checkWall(t){}gravitateTo(t){const e=t.x-this.x,s=t.y-this.y,i=e*e+s*s,r=Math.sqrt(i),o=this.mass*t.mass/i,a=o*e/r,c=o*s/r;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=Oe(t?.gravity,0);this.vy+=e;const s=Oe(t?.friction,1);this.vx*=s,this.vy*=s,this.x+=this.vx,this.y+=this.vy}runEaseTo(t,e){const s=Oe(e?.easing,.05),i=t.x-this.cX-this.x,r=t.y-this.cY-this.y;this.vx=i*s,this.vy=r*s,this.run(e)}runSpringTo(t,e){const s=Oe(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*s,c=o*s;this.vx+=a,this.vy+=c}),this.run({friction:.9,...e})}springMassTo(t,e){const s=Oe(e?.springLength,100),i=Oe(e?.spring,1e-4),r=t.x-this.x,o=t.y-this.y,a=Math.sqrt(r*r+o*o);if(a<s){const c=r*i,h=o*i;return this.vx+=c/this.mass,this.vy+=h/this.mass,t.vx-=c/t.mass,t.vy-=h/t.mass,1-a/s}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 s=this.getTotalLength();return t.originD=this.initPathD().getSubpath(0,e*s),this.getPointAtLength(e*s)}strokeDashTween(t=1e3,e){const s=this.initPathD(),i=at(s.getTotalLength(),0);this.setAttr({strokeDasharray:`${i} ${i}`,strokeDashoffset:`${i}`});const r=e?.onUpdate,o=new $i({frameDuration:t});o.addTween({offset:i},{offset:0},Object.assign(e||{},{onUpdate:(a,c)=>{this.setAttr("strokeDashoffset",""+at(a.offset,2)),r?.(a,c)}})),o.play()}}class MP extends AP{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,s){this.cX=t,this.cY=e,this.cZ=s}rotateX(t){({x:this.y,y:this.z}=Ge(wt(t),this.y,this.z))}rotateY(t){({x:this.x,y:this.z}=Ge(wt(t),this.x,this.z))}rotateZ(t){({x:this.x,y:this.y}=Ge(wt(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 Hs(this.x,this.y,this.z)}distance(t){const e=t.x-this.x,s=t.y-this.y,i=t.z-this.z;return Math.sqrt(e*e+s*s+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 s=t/e;this.scalar(s)}return this}clamp(t){const e=this.length();return e&&e>t&&this.scalar(t/e),this}cross(t){const e=this.x,s=this.y,i=this.z;return{x:s*t.z-i*t.y,y:i*t.x-e*t.z,z:e*t.y-s*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 da=MP,hr=2e3,Ku=2001,Zg=[1,0,0,1],Qg=[1,0,0,1,0,0],ty=[1,0,0,0,1,0,0,0,1],ey=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];class Ju{value;constructor(t=Zg){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,s=0,i=1){return this.m11=t,this.m21=e,this.m12=s,this.m22=i,this}identity(){return this.value=Array.from(Zg),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 Ju(this.value)}fromArray(t,e=0){for(let s=0;s<4;s++)this.value[s]=t[s+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 s=t.value,i=e.value,r=this.value,o=s[0],a=s[2],c=s[1],h=s[3],u=i[0],l=i[2],f=i[1],d=i[3];return r[0]=o*u+a*f,r[2]=o*l+a*d,r[1]=c*u+h*f,r[3]=c*l+h*d,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 ma{value;constructor(t=ty){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,s=0,i=0,r=1,o=0,a=0,c=0,h=1){const u=this.value;return u[0]=t,u[1]=i,u[2]=a,u[3]=e,u[4]=r,u[5]=c,u[6]=s,u[7]=o,u[8]=h,this}identity(){return this.value=Array.from(ty),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 ma(this.value)}fromArray(t,e=0){for(let s=0;s<9;s++)this.value[s]=t[s+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,s){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),s.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 s=t.value,i=e.value,r=this.value,o=s[0],a=s[3],c=s[6],h=s[1],u=s[4],l=s[7],f=s[2],d=s[5],p=s[8],m=i[0],y=i[3],g=i[6],v=i[1],x=i[4],b=i[7],E=i[2],_=i[5],D=i[8];return r[0]=o*m+a*v+c*E,r[3]=o*y+a*x+c*_,r[6]=o*g+a*b+c*D,r[1]=h*m+u*v+l*E,r[4]=h*y+u*x+l*_,r[7]=h*g+u*b+l*D,r[2]=f*m+d*v+p*E,r[5]=f*y+d*x+p*_,r[8]=f*g+d*b+p*D,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],s=t[1],i=t[2],r=t[3],o=t[4],a=t[5],c=t[6],h=t[7],u=t[8];return e*o*u-e*a*h-s*r*u+s*a*c+i*r*h-i*o*c}inverse(){const t=this.value,e=t[0],s=t[1],i=t[2],r=t[3],o=t[4],a=t[5],c=t[6],h=t[7],u=t[8],l=u*o-a*h,f=a*c-u*r,d=h*r-o*c,p=e*l+s*f+i*d;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]=(i*h-u*s)*m,t[2]=(a*s-i*o)*m,t[3]=f*m,t[4]=(u*e-i*c)*m,t[5]=(i*r-a*e)*m,t[6]=d*m,t[7]=(s*c-h*e)*m,t[8]=(o*e-s*r)*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,s,i,r,o,a){const c=Math.cos(r),h=Math.sin(r);return this.set(s*c,s*h,-s*(c*o+h*a)+o+t,-i*h,i*c,-i*(-h*o+c*a)+a+e,0,0,1),this}scale(t,e){return this.premultiply(Qu.makeScale(t,e)),this}rotate(t){return this.premultiply(Qu.makeRotation(-t)),this}translate(t,e){return this.premultiply(Qu.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),s=Math.sin(t);return this.set(e,-s,0,s,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 _e{value;is3dSpecial=!1;constructor(t=ey){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,s=0,i=0,r=0,o=1,a=0,c=0,h=0,u=0,l=1,f=0,d=0,p=0,m=0,y=1){const g=this.value;return g[0]=t,g[4]=e,g[8]=s,g[12]=i,g[1]=r,g[5]=o,g[9]=a,g[13]=c,g[2]=h,g[6]=u,g[10]=l,g[14]=f,g[3]=d,g[7]=p,g[11]=m,g[15]=y,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(ey),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 _e(this.value)}static fromString(t){const e=new _e,s=td("number",t);return s.length===16&&s.forEach((i,r)=>{i.fullMatch&&(e.value[r]=parseFloat(i.fullMatch))}),e}fromArray(t,e=0){for(let s=0;s<16;s++)this.value[s]=t[s+e];return this}toArray(t=[],e=0){const s=this.value;return t[e]=s[0],t[e+1]=s[1],t[e+2]=s[2],t[e+3]=s[3],t[e+4]=s[4],t[e+5]=s[5],t[e+6]=s[6],t[e+7]=s[7],t[e+8]=s[8],t[e+9]=s[9],t[e+10]=s[10],t[e+11]=s[11],t[e+12]=s[12],t[e+13]=s[13],t[e+14]=s[14],t[e+15]=s[15],t}copyPosition(t){const e=this.value,s=t.value;return e[12]=s[12],e[13]=s[13],e[14]=s[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,s){return t.setFromMatrix4Column(this,0),e.setFromMatrix4Column(this,1),s.setFromMatrix4Column(this,2),this}makeBasis(t,e,s){return this.set(t.x,e.x,s.x,0,t.y,e.y,s.y,0,t.z,e.z,s.z,0,0,0,0,1),this}normalize(){return this.multiplyScalar(1/(this.m44||1e-4))}transformPoint(t){const e=t.z||1,s=t.w||1;return{x:t.x*this.m11+t.y*this.m21+e*this.m31+s*this.m41,y:t.x*this.m12+t.y*this.m22+e*this.m32+s*this.m42,z:t.x*this.m13+t.y*this.m23+e*this.m33+s*this.m43,w:t.x*this.m14+t.y*this.m24+e*this.m34+s*this.m44}}toMatrix(t){const{scalarX:e,scalarY:s,skewX:i,skewY:r,x:o,y:a}=this.split(),c=[e,r,i,s,o,a];return t?(t.value=c,t):new ee(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=>at(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),s=Math.sqrt(this.m31*this.m31+this.m32*this.m32+this.m33*this.m33),i=Jt(rt(Math.asin(-this.m13),-1,1));let r=Jt(Math.atan2(this.m23,this.m33));Math.cos(wt(i))===0&&(r=Jt(Math.atan2(-this.m31,this.m22)));let o=Jt(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:s,degreeX:r,degreeY:i,degreeZ:o,skewX:Jt(this.m14),skewY:Jt(this.m24),skewZ:Jt(this.m34),skewW:this.m44,perspective:this.m34?-(1/this.m34):0}}extractRotation(t){const e=this.value,s=t.value,i=1/Zu.setFromMatrix4Column(t,0).length(),r=1/Zu.setFromMatrix4Column(t,1).length(),o=1/Zu.setFromMatrix4Column(t,2).length();return e[0]=s[0]*i,e[1]=s[1]*i,e[2]=s[2]*i,e[3]=0,e[4]=s[4]*r,e[5]=s[5]*r,e[6]=s[6]*r,e[7]=0,e[8]=s[8]*o,e[9]=s[9]*o,e[10]=s[10]*o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}lookAt(t,e,s){const i=this.value;return De.subVectors(t,e),De.lengthSq()===0&&(De.z=1),De.normalize(),ns.crossVectors(s,De),ns.lengthSq()===0&&(Math.abs(s.z)===1?De.x+=1e-4:De.z+=1e-4,De.normalize(),ns.crossVectors(s,De)),ns.normalize(),pa.crossVectors(De,ns),i[0]=ns.x,i[4]=pa.x,i[8]=De.x,i[1]=ns.y,i[5]=pa.y,i[9]=De.y,i[2]=ns.z,i[6]=pa.z,i[10]=De.z,this}multiplyMatrices(t,e){const s=t.value,i=e.value,r=this.value,o=s[0],a=s[4],c=s[8],h=s[12],u=s[1],l=s[5],f=s[9],d=s[13],p=s[2],m=s[6],y=s[10],g=s[14],v=s[3],x=s[7],b=s[11],E=s[15],_=i[0],D=i[4],V=i[8],O=i[12],N=i[1],U=i[5],Y=i[9],st=i[13],it=i[2],nt=i[6],et=i[10],ct=i[14],ht=i[3],B=i[7],z=i[11],P=i[15];return r[0]=o*_+a*N+c*it+h*ht,r[4]=o*D+a*U+c*nt+h*B,r[8]=o*V+a*Y+c*et+h*z,r[12]=o*O+a*st+c*ct+h*P,r[1]=u*_+l*N+f*it+d*ht,r[5]=u*D+l*U+f*nt+d*B,r[9]=u*V+l*Y+f*et+d*z,r[13]=u*O+l*st+f*ct+d*P,r[2]=p*_+m*N+y*it+g*ht,r[6]=p*D+m*U+y*nt+g*B,r[10]=p*V+m*Y+y*et+g*z,r[14]=p*O+m*st+y*ct+g*P,r[3]=v*_+x*N+b*it+E*ht,r[7]=v*D+x*U+b*nt+E*B,r[11]=v*V+x*Y+b*et+E*z,r[15]=v*O+x*st+b*ct+E*P,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],s=t[4],i=t[8],r=t[12],o=t[1],a=t[5],c=t[9],h=t[13],u=t[2],l=t[6],f=t[10],d=t[14],p=t[3],m=t[7],y=t[11],g=t[15];return p*(+r*c*l-i*h*l-r*a*f+s*h*f+i*a*d-s*c*d)+m*(+e*c*d-e*h*f+r*o*f-i*o*d+i*h*u-r*c*u)+y*(+e*h*l-e*a*d-r*o*l+s*o*d+r*a*u-s*h*u)+g*(-i*a*u-e*c*l+e*a*f+i*o*l-s*o*f+s*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,s){const i=this.value;return t instanceof en?(i[12]=t.x,i[13]=t.y,i[14]=t.z):typeof t=="number"&&typeof e=="number"&&typeof s=="number"&&(i[12]=t,i[13]=e,i[14]=s),this}inverse(){const t=this.value,e=t[0],s=t[1],i=t[2],r=t[3],o=t[4],a=t[5],c=t[6],h=t[7],u=t[8],l=t[9],f=t[10],d=t[11],p=t[12],m=t[13],y=t[14],g=t[15],v=l*y*h-m*f*h+m*c*d-a*y*d-l*c*g+a*f*g,x=p*f*h-u*y*h-p*c*d+o*y*d+u*c*g-o*f*g,b=u*m*h-p*l*h+p*a*d-o*m*d-u*a*g+o*l*g,E=p*l*c-u*m*c-p*a*f+o*m*f+u*a*y-o*l*y,_=e*v+s*x+i*b+r*E;if(_===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const D=1/_;return t[0]=v*D,t[1]=(m*f*r-l*y*r-m*i*d+s*y*d+l*i*g-s*f*g)*D,t[2]=(a*y*r-m*c*r+m*i*h-s*y*h-a*i*g+s*c*g)*D,t[3]=(l*c*r-a*f*r-l*i*h+s*f*h+a*i*d-s*c*d)*D,t[4]=x*D,t[5]=(u*y*r-p*f*r+p*i*d-e*y*d-u*i*g+e*f*g)*D,t[6]=(p*c*r-o*y*r-p*i*h+e*y*h+o*i*g-e*c*g)*D,t[7]=(o*f*r-u*c*r+u*i*h-e*f*h-o*i*d+e*c*d)*D,t[8]=b*D,t[9]=(p*l*r-u*m*r-p*s*d+e*m*d+u*s*g-e*l*g)*D,t[10]=(o*m*r-p*a*r+p*s*h-e*m*h-o*s*g+e*a*g)*D,t[11]=(u*a*r-o*l*r-u*s*h+e*l*h+o*s*d-e*a*d)*D,t[12]=E*D,t[13]=(u*m*i-p*l*i+p*s*f-e*m*f-u*s*y+e*l*y)*D,t[14]=(p*a*i-o*m*i-p*s*c+e*m*c+o*s*y-e*a*y)*D,t[15]=(o*l*i-u*a*i+u*s*c-e*l*c-o*s*f+e*a*f)*D,this}getMaxScaleOnAxis(){const t=this.value,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],s=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,s,i))}makeTranslation(t,e,s){return t instanceof en?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,s,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),s=Math.sin(t);return this.set(1,0,0,0,0,e,-s,0,0,s,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),s=Math.sin(t);return this.set(e,0,s,0,0,1,0,0,-s,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),s=Math.sin(t);return this.set(e,-s,0,0,s,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const s=Math.cos(e),i=Math.sin(e),r=1-s,o=t.x,a=t.y,c=t.z,h=r*o,u=r*a;return this.set(h*o+s,h*a-i*c,h*c+i*a,0,h*a+i*c,u*a+s,u*c-i*o,0,h*c-i*a,u*c+i*o,r*c*c+s,0,0,0,0,1),this}makeScale(t,e,s){return this.set(t,0,0,0,0,e,0,0,0,0,s,0,0,0,0,1),this}makeShear(t,e,s,i,r,o){return this.set(1,s,r,0,t,1,o,0,e,i,1,0,0,0,0,1),this}makePerspective(t,e,s,i,r,o,a=hr){const c=this.value,h=2*r/(e-t),u=2*r/(s-i),l=(e+t)/(e-t),f=(s+i)/(s-i);let d,p;if(a===hr)d=-(o+r)/(o-r),p=-2*o*r/(o-r);else if(a===Ku)d=-o/(o-r),p=-o*r/(o-r);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]=f,c[13]=0,c[2]=0,c[6]=0,c[10]=d,c[14]=p,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(t,e,s,i,r,o,a=hr){const c=this.value,h=1/(e-t),u=1/(s-i),l=1/(o-r),f=(e+t)*h,d=(s+i)*u;let p,m;if(a===hr)p=(o+r)*l,m=-2*l;else if(a===Ku)p=r*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]=-f,c[1]=0,c[5]=2*u,c[9]=0,c[13]=-d,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,s=0){return this.multiply(new _e([1,0,0,0,0,1,0,0,0,0,1,0,t,e,s,1]))}scale(t=1,e=1,s=1){return this.multiply(new _e([t,0,0,0,0,e,0,0,0,0,s,0,0,0,0,1]))}scaleVector3(t){const e=this.value,s=t.x,i=t.y,r=t.z;return e[0]*=s,e[4]*=i,e[8]*=r,e[1]*=s,e[5]*=i,e[9]*=r,e[2]*=s,e[6]*=i,e[10]*=r,e[3]*=s,e[7]*=i,e[11]*=r,this}rotateX(t){const e=wt(t),s=Math.cos(e),i=Math.sin(e);return this.multiply(new _e([1,0,0,0,0,s,i,0,0,-i,s,0,0,0,0,1]))}rotateY(t){const e=wt(t),s=Math.cos(e),i=Math.sin(e);return this.multiply(new _e([s,0,-i,0,0,1,0,0,i,0,s,0,0,0,0,1]))}rotateZ(t){this.is3dSpecial=!0;const e=wt(t),s=Math.cos(e),i=Math.sin(e);return this.multiply(new _e([s,i,0,0,-i,s,0,0,0,0,1,0,0,0,0,1]))}skew(t=0,e=0,s=0){return this.multiply(new _e([1,0,0,wt(t),0,1,0,wt(e),0,0,1,wt(s),0,0,0,1]))}perspective(t){return this.multiply(new _e([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,s=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=s+this.m32,c=i+this.m33,h=r+this.m34;r==0&&(r=1e-4),e/=r,s/=r,i/=r,h==0&&(h=1e-4),o/=h,a/=h,c/=h;const u=c-i;if(u==0)return{x:e,y:s,z:i,mass:r};const l=-i/u;return e+=l*(o-e),s+=l*(a-s),{x:e,y:s,z:i,mass:r}}project(t){const e=t.z;let s=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),s/=r,i/=r,r<0&&(s-=this.m41,i-=this.m42,s*=1/r,i*=1/r,s+=this.m41,i+=this.m42),{x:s,y:i,z:e,mass:r}}bounds(t,e,s,i){const r=new da({x:t,y:e}),o=new da({x:t+s,y:e}),a=new da({x:t+s,y:e+i}),c=new da({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:c.x,y:c.y,z:c.z,mass:c.mass}=this.project(c);const h=Math.min(r.x,o.x,a.x,c.x),u=Math.min(r.y,o.y,a.y,c.y),l=Math.max(r.x,o.x,a.x,c.x)-h,f=Math.max(r.y,o.y,a.y,c.y)-u;return{x:h,y:u,width:l,height:f}}}class ee{value;_m13=0;_m23=0;_m33=1;matrix4;constructor(t=Qg){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 ee,s=td("number",t);return s.length===6&&s.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 _e(e)}identity(){return this.value=Array.from(Qg),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 ee(this.value)}multiply(t){const e=this.clone(),s=t instanceof ee?t:new ee(t);return this.m11=s.m11*e.m11+s.m12*e.m21+s.m13*e.m31,this.m12=s.m11*e.m12+s.m12*e.m22+s.m13*e.m32,this.m13=s.m11*e.m13+s.m12*e.m23+s.m13*e.m33,this.m21=s.m21*e.m11+s.m22*e.m21+s.m23*e.m31,this.m22=s.m21*e.m12+s.m22*e.m22+s.m23*e.m32,this.m23=s.m21*e.m13+s.m22*e.m23+s.m23*e.m33,this.m31=s.m31*e.m11+s.m32*e.m21+s.m33*e.m31,this.m32=s.m31*e.m12+s.m32*e.m22+s.m33*e.m32,this.m33=s.m31*e.m13+s.m32*e.m23+s.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,s=this.m13,i=this.m21,r=this.m22,o=this.m23,a=this.m31,c=this.m32,h=this.m33,u=h*r-o*c,l=-h*i+o*a,f=c*i-r*a;let d=t*u+e*l+s*f;return d?(d=1/d,this.m11=u*d,this.m12=(-h*e+s*c)*d,this.m13=(o*e-s*r)*d,this.m21=l*d,this.m22=(h*t-s*a)*d,this.m23=(-o*t+s*i)*d,this.m31=f*d,this.m32=(-c*t+e*a)*d,this.m33=(r*t-e*i)*d,this):null}adjugate(){const t=new ee;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=Jt(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:Jt(Math.atan2(-this.m21,this.m22)),skewY:Jt(Math.atan2(this.m12,this.m11))}}getGroupCoords(t){const e=this.value[0],s=this.value[1],i=this.value[2],r=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],f=t.value[4],d=t.value[5],p=c*l,m=h*u,y=(u*s-e*l)/(m-p),g=(c*s-e*h)/(p-m),v=(u*r-i*l)/(m-p),x=(c*r-i*h)/(p-m),b=(u*(a-d)+l*(f-o))/(m-p),E=(c*(a-d)+h*(f-o))/(p-m),_=[y,g,v,x,b,E];return new ee(_)}toString(t=6){return this.matrix4.is2D()?`matrix(${this.value.map(e=>at(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,s){return this.matrix4.translate(t,e,s),this.matrix4.toMatrix(this),this}translate3dTo(t,e,s){return this.translate3d(t-this.matrix4.m41,e-this.matrix4.m42,s-this.matrix4.m43),this}rotate(t,e=0,s=0){const i=wt(t),r=Math.cos(i),o=Math.sin(i);return this.translate(e,s),this.multiply([r,o,-o,r,0,0]),this.translate(-e,-s),this.toMatrix4(),this}rotateTo(t,e=0,s=0){const{degree:i}=this.split();return this.rotate(t-i,e,s),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,s){return this.matrix4.rotateX(t).rotateY(e).rotateZ(s),this.matrix4.toMatrix(this),this}rotate3dTo(t,e,s){const{degreeX:i,degreeY:r,degreeZ:o}=this.matrix4.split();return this.rotate3d(t-i,e-r,s-o),this}scale(t,e=t,s=0,i=0){return this.translate(s,i),this.multiply([t,0,0,e,0,0]),this.translate(-s,-i),this.toMatrix4(),this}scaleTo(t,e=t,s=0,i=0){return this.scale(t/this.m11,e/this.m22,s,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,s=t){return this.matrix4.scale(t,e,s),this.matrix4.toMatrix(this),this}scale3dTo(t,e=t,s=t){const{scalarX:i,scalarY:r,scalarZ:o}=this.matrix4.split();return this.scale3d(t/i,e/r,s/o),this}skew(t,e=t){return this.multiply([Math.cos(wt(e)),Math.sin(wt(e)),-Math.sin(wt(t)),Math.cos(wt(t)),0,0]),this.toMatrix4(),this}skewTo(t,e=t){const{skewX:s,skewY:i}=this.split();return this.skew(t-s,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,s){return this}skew3dTo(t,e,s){return this}perspective(t){return this.matrix4.perspective(t),this.matrix4.toMatrix(this),this}}const ns=new en,pa=new en,De=new en,Zu=new en,Qu=new ma;new _e;function ny(n){const t=new ee;return n.replace(/([a-z0-9]+)\s*\(?\s*((-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)*[a-z%]*\s*,?\s*)+)\)?/gi,function(e,s,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(s.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 _e(r)),t.matrix4.toMatrix(t);break}return""}),t}function Ge(n,t,e){const s=new ee;return s.rotate(Jt(n)),s.transformPoint({x:t,y:e})}function tl(n){const t=typeof n?.x=="number"?n?.x:0,e=typeof n?.y=="number"?n?.y:0,s=typeof n?.degree=="number"?n?.degree:0,i=typeof n?.scalarX=="number"?n?.scalarX:1,r=typeof n?.scalarY=="number"?n?.scalarY:1,o=wt(s),a=Math.cos(o),c=Math.sin(o),h=new DOMMatrix([a*i,c*i,-c*r,a*r,t,e]);return h.multiplySelf(new DOMMatrix(n?.originMatrix||"")),h}function DP(n,t){const e=new Path2D(n),s=new Path2D;return s.addPath(e,tl(t)),s}const sy={map:new Map,transform:function(n){if(ox)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 RP(n,t,e){const s=new OffscreenCanvas(n,t),i=s.getContext("2d");if(i)return e(i),s.transferToImageBitmap()}function OP(n,t,e){const s=n.createPattern(sy.transform(t),"no-repeat");if(s){const i=tl(e);s.setTransform(i),n.fillStyle=s}}const el=["","-webkit-","-moz-","-o-","-ms-"];function nl(n,t){const e=t.x||0,s=t.y||0,i=t.z||0;Mi(n,"transform",`translate(${e}px, ${s}px) translateZ(${i}px)`)}function IP(n,t){const e=t?.easingFn||q.Linear.None,s=t?.duration||0,i=t?.delay||0,r=Fs(),o=r+s;let a=0,c=0;const h=t.deltaX,u=t.deltaY;function l(){const f=Fs();if(f>=o){nl(n,{x:h-a,y:u-c});return}const d=(f-r)/s,p=e(d),m=h*p,y=u*p;nl(n,{x:m-a,y:y-c}),a=m,c=y,Hr(l)}setTimeout(()=>{l()},i)}const kP=typeof HTMLElement=="object"?function(t){return t instanceof HTMLElement}:function(t){return t&&typeof t=="object"&&t.nodeType===1&&typeof t.nodeName=="string"};function iy(n){return window.URL.createObjectURL(n)}function LP(n){return window.URL.revokeObjectURL(n)}function sl(n){let t=!1;function e(){/loaded|complete/.test(document.readyState)&&!t&&(o(),n(),t=!0)}const s=Ct(document,"DOMContentLoaded",e),i=Ct(window,"load",e),r=setInterval(e,100),o=()=>{clearInterval(r),s?.(),i?.()};return o}function ry(n){return Ct(window,"beforeunload",t=>{n(t)})}async function VP(n,t=6e4){return new Promise((e,s)=>{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),s(o)},i.src=n;const r=setTimeout(()=>{s("Timeout!")},t);document.body.appendChild(i)})}function il(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 NP(n,t=document.getElementsByTagName("head")[0],e=6e4){return new Promise((s,i)=>{const r=document.createElement("link");r.setAttribute("type","text/css"),r.setAttribute("rel","stylesheet"),r.onload=a=>{clearTimeout(o),s(a),r.onerror=r.onload=null},r.onerror=a=>{clearTimeout(o),i(a)},r.setAttribute("href",n);const o=setTimeout(()=>{i("Timeout!")},e);t.appendChild(r)})}function zP(){return new Promise(n=>{const t=Array.from(document.querySelectorAll("link[rel=stylesheet]"));let e=document.styleSheets.length||0;const s=()=>e>=t.length?(n(),!0):!1;s()||t.forEach(i=>{i.onload=()=>{e+=1,s()}})})}const oy=new gc({max:1e3});async function ay(n,t=6e4){return new Promise((e,s)=>{const i=typeof n=="string"?n:iy(n),r=oy.get(i);if(r)return e(r);const o=setTimeout(()=>{s("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:rp(a)};oy.set(i,u),e(u)},a.onerror=c=>{clearTimeout(o),s(c)},a.src=i})}async function cy(n=Re.text,t=["*"]){const s=(await Zc(t))[0],i=await Pi(s,n);return{type:s.type,name:s.name,size:s.size,data:i}}async function FP(n=["image/*"]){const e=(await Zc(n))[0];if(!e.type.match(/image\/*/))return new Error("Not Image Type!");const s=await Pi(e,Re.arraybuffer),i=hc(s),r=await ay(i);return{type:e.type,name:e.name,size:e.size,data:s,width:r.width,height:r.height,aspectRatio:r.aspectRatio,imageData:r.imageData}}function BP(){return window.getSelection()?.toString()||""}function jP(n){document.getElementsByTagName("title")[0].innerText=n,document.title=n}function $P(n=200){"vibrate"in navigator?window.navigator.vibrate(n):console.error("Your device is not support vibrate on this browser.")}async function UP(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 YP(n=0,t=0){window.scrollTo(n,t)}function GP(){let n=pd,t=pd;return"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual",n=ry(()=>{window.history.scrollRestoration="auto"}),t=sl(()=>{window.history.scrollRestoration="manual"})),()=>{n(),t()}}function XP(n){return/(html|body)/i.test(n.tagName)||n===document.documentElement}const WP=n=>n===document.activeElement&&(n.type||n.href);function rl(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}function HP(n){return n*rl()}function qP(n){return n.parentElement?parseFloat(getComputedStyle(n.parentElement).fontSize):rl()}const KP=n=>{let t=n;for(;t&&t.nodeType!==1;){const e=t.parentElement||n.parentNode;if(!e)break;t=e}return t},JP=n=>n.parentElement,ol=(n,t=[])=>!n||n.parentElement===null&&n.parentNode===null?t:ol(n.parentElement,t.concat([n]));function ZP(n){const t=ol(n);for(let e=0,s=t.length;e<s;e++)if(/(auto|scroll)/.test(Ai(t[e],"overflow")+Ai(t[e],"overflow-y")+Ai(t[e],"overflow-x")))return t[e];return document.scrollingElement||document.documentElement}const QP=(n,t)=>n.contains?n!=t&&n.contains(t):!!(n.compareDocumentPosition(t)&16),tA=n=>Array.prototype.slice.call(n.parentElement?.children).filter(t=>t!==n),eA=n=>n.nextElementSibling,nA=n=>n.previousElementSibling,sA=(n,t)=>n.closest(t),iA=n=>n.shadowRoot,ur=n=>n.tagName==="INPUT"||n instanceof HTMLInputElement,al=n=>n.tagName==="SELECT"||n instanceof HTMLSelectElement,rA=n=>n.tagName==="TEXTAREA"||n instanceof HTMLTextAreaElement,cl=n=>ur(n)&&n.getAttribute("type")==="checkbox",hl=n=>ur(n)&&n.getAttribute("type")==="radio",oA=n=>ur(n)&&n.getAttribute("type")==="text",aA=n=>ur(n)&&n.getAttribute("type")==="number";function cA(n,t){if(al(n)){const e=n.options;for(let s=0,i=e.length;s<i;s++)e[s].selected=e[s].value==t}}function hA(n,t){if(hl(n)){const e=document.getElementsByName(n.name);for(let s=0,i=e.length;s<i;s++){const r=e[s];r.checked=r.value==t}}}function uA(n,t){cl(n)&&(n.checked=t)}function si(n,t,e="append"){typeof t=="string"?n[e](dy(t)):n[e](t)}function hy(n,t){if(typeof t=="string"){n.innerHTML=t;const e=py(n);e!=n&&(n=e)}else si(t,"replaceWith")}const uy=function(n){hy(n,"")},lA=(n,t)=>{n.textContent=t},fA=n=>{if(n instanceof SVGElement)return"";let t=n.innerText;if(!t){const e=n.querySelector("slot")?.assignedNodes()||[];let s=0;for(;!t&&s<=e.length-1;)"innerText"in e[s]&&(t=e[s].innerText),s++}return t},dA=n=>n.remove();function mA(n,t){Ai(n,"display")=="none"&&t===void 0||t===!0?ly(n):fy(n)}function ly(n){Us(n,"display",n instanceof HTMLTableRowElement?"table-row":n instanceof HTMLTableCellElement?"table-cell":"block")}function fy(n){Us(n,"display","none")}function ul(n,t,e="toggle"){const s=t.split(/[,\s]+/);if(n.classList)s.forEach(i=>{const r=i.trim();r!==""&&n.classList[e](r)});else{const i=n.className.split(/ +/);let r=!1;s.forEach(o=>{const a=o.trim();if(a!==""){const c=i.indexOf(a);switch(e){case"add":c===-1&&(i.push(a),r=!0);break;case"remove":c!==-1&&(i.splice(c,1),r=!0);break;case"toggle":c===-1?i.push(a):i.splice(c,1),r=!0;break}}}),r&&ps(n,"class",i.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}}function pA(n,t){ul(n,t,"add")}function gA(n,t){ul(n,t,"remove")}function yA(n,t){return new RegExp("(?:^|\\s+)"+t+"(?:\\s+|$)").test(n.className)}function dy(n,t=!1){const e=document.createElement("template");return e.innerHTML=n,t&&e.content.childNodes.forEach(s=>{const i=py(s);i!=s&&e.content.replaceChild(i,s)}),e.content}function my(n){return document.createElement.call(document,n)}function vA(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function bA(n){return document.createTextNode.call(document,n)}function py(n){return n.tagName=="SCRIPT"&&(n=gy(n)),n.querySelectorAll&&n.querySelectorAll("script").forEach(t=>{t.parentNode?.replaceChild(gy(t),t)}),n}function gy(n){const t=n.ownerDocument.createElement("script");t.text=n.text;const e=n.attributes;for(let s=0,i=e.length;s<i;s++)t.setAttribute(e[s].name,e[s].value);return t}function wA(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 xA(n){const t=new Proxy(window,{get(e,s,i){if(typeof s=="string"&&["open","location","document"].includes(s))throw new Error(`禁止访问 key: ${s}`);return s==="window"?t:Reflect.get(e,s,i)},set(e,s,i,r){return Reflect.set(e,s,i,r)}});new Function("window",`with(window) { ${n} }`)(t,null)}function SA(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){
66
115
  let output = "";
67
116
  function echo(html){
68
117
  output += html;
69
118
  }
70
- ${s}
119
+ ${n}
71
120
  return output;
72
- })`}function Su(){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 _u(s,t){return new Promise((e,n)=>{const{method:r="GET",data:i={},multipartFormDataString:o="",boundary:a="",headers:c={},withCredentials:h=!1,responseType:l="json",timeout:u=3e4}=t||{},d=Su();d.timeout=u,d.responseType=l,d.onreadystatechange=function(b){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",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 v=Math.round(b.loaded*100/b.total);t?.progress?.(b,d,v)}},!1),d.addEventListener("error",b=>t?.error?.(b,d),!1),d.addEventListener("abort",b=>t?.abort?.(b,d),!1);const f=r.toUpperCase();Object.assign(c,{Accept:"*/*"});let m=!1,p=!1,_=!1;function y(){d.setRequestHeader("If-Modified-Since","Sat, 1 Jan 2000 00:00:00 GMT"),h&&(d.withCredentials=!0);for(const b in c)Nt(b).toLowerCase()=="content-type"&&c[b].toLowerCase()=="multipart/form-data"?(m=!0,d.setRequestHeader("Content-Type","multipart/form-data; boundary="+a)):(Nt(b).toLowerCase()=="content-type"&&(c[b].toLowerCase().indexOf("text/plain")>=0?p=!0:c[b].toLowerCase().indexOf("application/json")>=0&&(_=!0)),d.setRequestHeader(b,c[b]))}switch(f){case"GET":let b="";i instanceof FormData?b=gp(i):b=pp(i),d.open("GET",mp(s,b),!0),y(),d.send(null);break;default:d.open(f,s,!0),y(),m?d.sendAsBinary(o):_?d.send(JSON.stringify(i)):p?d.send(Object.entries(i).map(([v,w])=>`${v}=${w}`).join(`\r
73
- `)):d.send(Object.entries(i).map(([v,w])=>`${encodeURIComponent(v)}=${encodeURIComponent(w)}`).join("&"));break}})}async function Nb(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 r=0;r<s.elements.length;r++){const i=s.elements[r];if(!i.hasAttribute("name"))continue;const o=i.getAttribute("type");switch(i.nodeName.toUpperCase()==="INPUT"&&o?o.toUpperCase():""){case"FILE":const c=i;if(n)for(let u=0,d=c.files?.length||0;u<d;u++){const f=c.files?.[u];if(f){const m=await ns(f,ie.binaryString);e.push('Content-Disposition: form-data; name="'+c.name+'"; filename="'+f.name+`"\r
74
- Content-Type: `+f.type+`\r
75
- \r
76
- `+m+`\r
77
- `)}}break;case"RADIO":case"CHECKBOX":if(!i.checked)break;default:const l=i;n?e.push('Content-Disposition: form-data; name="'+l.name+`"\r
78
- \r
79
- `+l.value+`\r
80
- `):t.data[l.name]=l.value;break}}return t.multipartFormDataString="--"+t.boundary+`\r
81
- `+e.join("--"+t.boundary+`\r
82
- `)+"--"+t.boundary+`--\r
83
- `,t}function Cu(s){const t=[];for(let e=0,n=Xo.length;e<n;e++){const r=Nt(Xo[e]+s);t.push(r)}return t}function bs(s,t,e){const n=Ua(s);return n.props.style=n.props.style||{},t?n.props.style[t]||n.props.style[jc(t)]||n.props.style[Nt(t)]||"":n.props.style}function $n(s,t,e){Yr(s,n=>{n.props.style=n.props.style||{},typeof t=="string"&&e?n.props.style[t]=e:t instanceof Object&&Object.keys(t).forEach(r=>{n.props.style[r]=t[r]})}),$a()}function Qo(s,t=!1){const e={};if(!t)if(getComputedStyle){const n=getComputedStyle(s);for(let r=0,i=n.length;r<i;r++){const o=n[r];e[o]=n.getPropertyValue(o)}}else{const n=s.style||s.currentStyle;for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return s.style.cssText&&s.style.cssText.split(";").filter(n=>!!n).forEach(n=>{const[r,i]=n.split(":").map(o=>o.trim());r&&i&&(e[r]=i)}),e}function Fb(s,t){const e=Cu(t),n=e.length;let r="";for(let i=0;i<n;i++){const o=e[i];if(r=s[o]||"",r)return r}return r}function Bb(s,t,e){const n=Cu(t),r=n.length;let i="";for(let o=0;o<r;o++){const a=n[o];if(i="style"in s&&s.style[a]||"currentStyle"in s&&s.currentStyle[a]||"",i)return i}if(getComputedStyle){const o=getComputedStyle(s,e);for(let a=0;a<r;a++){const c=n[a];if(i=o.getPropertyValue(c).trim(),i)return i}}return i}function ws(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=>{ws(s,n,t[n])})}function ta(s,t){typeof t=="string"?s.style.removeProperty(Nt(t)):Object.keys(t).forEach(e=>{ta(s,e)})}function Eu(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 Ub{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 $b{propertyName;values=[];constructor(t){this.propertyName=t}add(t,e){this.values.push(new Ub(t,this.propertyName,e))}}async function Tu(){const s=[],t=document.querySelectorAll("style, link");for(let e=0,n=t.length;e<n;e++){const r=t[e];let i=r.innerHTML;switch(r.nodeName.toLowerCase()){case"style":break;case"link":i=await _u(r.href,{method:"GET",responseType:"text"});break}i=i.replace(/\/\/.+?(?=\n|\r|$)|\/\*[\s\S]+?\*\//g,"").replace(/@[^{};]*;|@[^{};]*\{[^}]*\}/g,"").replace(/[\\n\n]+(?<=[\\n\n]+)\s+/g,""),s.push(i)}return s}async function Yb(){const s={},t=await Tu();for(let e=0,n=t.length;e<n;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(),u=c[1].split(";");for(let d=0;d<u.length;d++)if(u[d].trim()!=""){const f=u[d].split(":"),m=f[0].trim().toLowerCase(),p=f[1];s[m]||(s[m]=new $b(m)),p&&s[m].add(h,p.trim())}}}return s}function Ne(s,t,e){if(t===void 0&&e===void 0)return ea(s);if(typeof t=="string"&&e===void 0)return Pu(s,t);typeof t=="object"?Yr(s,n=>{for(const r in t)r=="style"?$n(s,r,t[r]):Object.prototype.hasOwnProperty.call(t,r)&&(n.props[r]=""+t[r])}):typeof t=="string"&&typeof e=="string"&&(t=="style"?$n(s,t,e):Yr(s,n=>{n.props[t]=""+e})),$a()}function ea(s){const t={};for(let e=0,n=s.attributes,r=n.length;e<r;e++){const i=n[e];i.nodeName&&i.nodeValue&&(i.nodeName==="style"?t[i.nodeName]=Qo(s,!0):t[i.nodeName]=i.nodeValue)}return t}function Pu(s,t){return t==="style"?Qo(s,!0):s.getAttribute(Nt(t))}function yn(s,t,e){return s.setAttribute(Nt(t),""+e)}function jb(s,t){t.split(/[,\s]+/i).forEach(e=>{const n=Nt(e.trim());n!=""&&s.removeAttribute(n)})}function Au(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(r=>Number(r)));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 Xb(){return"ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0}function Gb(){return!!window.PointerEvent}function Vb(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 na(){return{x:0,y:0,isDown:!1}}function bn(){const s=na(),t=na();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 Dr(s=document.documentElement,t=!1){return st(s,"mousemove",t)}function Mu(s=document.documentElement,t=!1){return st(s,"mousedown",t)}function ku(s=document.documentElement,t=!1){return st(s,"mouseup",t)}function qb(s=document.documentElement,t=!1){return st(s,"mouseover",t)}function Hb(s=document.documentElement,t=!1){return st(s,"mouseout",t)}function Wb(s=document.documentElement,t=!1){return st(s,"mouseenter",t)}function Jb(s=document.documentElement,t=!1){return st(s,"mouseleave",t)}function Kb(s=document.documentElement,t=!1){return st(s,"click",t)}function Zb(s=document.documentElement,t=!1){return st(s,"dblclick",t)}function Qb(s=document.documentElement,t=!1){return st(s,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",t)}function tw(s=document.documentElement,t=!1){return st(s,"contextmenu",t)}function Iu(s=document.documentElement,t=!1){return st(s,"touchmove",t)}function Du(s=document.documentElement,t=!1){return st(s,"touchstart",t)}function Ou(s=document.documentElement,t=!1){return st(s,"touchend",t)}function Ru(s=document.documentElement,t=!1){return st(s,"touchcancel",t)}function sa(s=document.documentElement,t=!1){return st(s,"pointermove",t)}function ra(s=document.documentElement,t=!1){return st(s,"pointerdown",t)}function ia(s=document.documentElement,t=!1){return st(s,"pointerup",t)}function oa(s=document.documentElement,t=!1){return st(s,"pointercancel",t)}function ew(s=document.documentElement){const t=new At(s);return Tt(e=>{t.on("pan",e)},e=>{t.off("pan",e)})}function nw(s=document.documentElement){const t=new At(s);return Tt(e=>{t.on("panmove",e)},e=>{t.off("panmove",e)})}function sw(s=document.documentElement){const t=new At(s);return Tt(e=>{t.on("panstart",e)},e=>{t.off("panstart",e)})}function rw(s=document.documentElement){const t=new At(s);return Tt(e=>{t.on("panend",e)},e=>{t.off("panend",e)})}function iw(s=document.documentElement){const t=new At(s);return Tt(e=>{t.on("pancancel",e)},e=>{t.off("pancancel",e)})}function ow(s=document.documentElement){const t=new At(s);return Tt(e=>{t.on("panleft",e)},e=>{t.off("panleft",e)})}function aw(s=document.documentElement){const t=new At(s);return Tt(e=>{t.on("panright",e)},e=>{t.off("panright",e)})}function cw(s=document.documentElement){const t=new At(s);return Tt(e=>{t.on("panup",e)},e=>{t.off("panup",e)})}function hw(s=document.documentElement){const t=new At(s);return Tt(e=>{t.on("pandown",e)},e=>{t.off("pandown",e)})}function lw(s=document.documentElement){const t=new At(s);return Tt(e=>{t.on("pinch",e)},e=>{t.off("pinch",e)})}function uw(s=document.documentElement){const t=new At(s);return Tt(e=>{t.on("pinchin",e)},e=>{t.off("pinchin",e)})}function fw(s=document.documentElement){const t=new At(s);return Tt(e=>{t.on("pinchout",e)},e=>{t.off("pinchout",e)})}function dw(s=document.documentElement){const t=new At(s);return Tt(e=>{t.on("press",e)},e=>{t.off("press",e)})}function mw(s=document.documentElement){const t=new At(s);return Tt(e=>{t.on("rotate",e)},e=>{t.off("rotate",e)})}function pw(s=document.documentElement){const t=new At(s);return Tt(e=>{t.on("swipe",e)},e=>{t.off("swipe",e)})}function gw(s=document.documentElement){const t=new At(s);return Tt(e=>{t.on("swipeleft",e)},e=>{t.off("swipeleft",e)})}function yw(s=document.documentElement){const t=new At(s);return Tt(e=>{t.on("swiperight",e)},e=>{t.off("swiperight",e)})}function bw(s=document.documentElement){const t=new At(s);return Tt(e=>{t.on("swipeup",e)},e=>{t.off("swipeup",e)})}function ww(s=document.documentElement){const t=new At(s);return Tt(e=>{t.on("swipedown",e)},e=>{t.off("swipedown",e)})}function Lu(s=document.documentElement){const t=new At(s);return Tt(e=>{t.on("tap",e)},e=>{t.off("tap",e)})}function vw(s=document.documentElement){const t=new At(document.documentElement);return Tt(e=>{const n=r=>{!r.target||s==r.target||s.contains(r.target)||e(r)};return t.on("tap",n),n},(e,n)=>{t.off("tap",n)})}function xw(s=document.documentElement,t=!1){return st(s,"transitionstart",t)}function Sw(s=document.documentElement,t=!1){return Dl(st(s,"transitionend",t),st(s,"webkitTransitionEnd",t),st(s,"oTransitionEnd",t),st(s,"MSTransitionEnd",t))}function _w(s=document.documentElement,t=!1){return st(s,"animationstart",t)}function Cw(s=document.documentElement,t=!1){return st(s,"animationend",t)}function zu(s=document.documentElement,t=!1){return st(s,"drag",t)}function Nu(s=document.documentElement,t=!1){return st(s,"dragstart",t)}function Fu(s=document.documentElement,t=!1){return st(s,"dragend",t)}function Bu(s=document.documentElement,t=!1){return st(s,"drop",t)}function Uu(s=document.documentElement,t=!1){return st(s,"dragenter",t)}function $u(s=document.documentElement,t=!1){return st(s,"dragleave",t)}function Yu(s=document.documentElement,t=!1){return st(s,"dragover",t)}function ju(s=document.documentElement,t=!1){return st(s,"keydown",t)}function Xu(s=document.documentElement,t=!1){return st(s,"keyup",t)}function Ew(s=document.documentElement,t=!1){return st(s,"keypress",t)}function Tw(s=document.documentElement,t){const e=t?.useMousePoint||bn();return Dr(s).pipe(kt(n=>(e.setCurrent(Lt(n,s)),e)))}function Gu(s=document.documentElement,t){const e=t?.useMousePoint||bn();return Dr(s).pipe(yy(Mu(s).pipe(pn(n=>{e.setStart(Lt(n,s),!0),t?.start?.(n,e)})),()=>ku(s).pipe(pn(n=>{e.setCurrent(Lt(n,s),!1),t?.end?.(n,e)}))),my(),kt(n=>(e.setCurrent(Lt(n,s),!0),e)))}function Vu(s=document.documentElement,t){const e=t?.useMousePoint||bn();return Du(s).pipe(pn(n=>{const r=n.changedTouches[0];e.setStart(Lt(r,s),!0),t?.start?.(r,e)}),xr(()=>Iu(s).pipe(Eo(vr(Ou(s),Ru(s)).pipe(pn(n=>{const r=n.changedTouches[0];e.setCurrent(Lt(r,s),!1),t?.end?.(r,e)}))))),kt(n=>{const r=n.changedTouches[0];return e.setCurrent(Lt(r,s),!0),e}))}function Or(s=document.documentElement,t){const e=t?.useMousePoint||bn();return ra(s).pipe(pn(n=>{e.setStart(Lt(n,s),!0),t?.start?.(n,e)}),xr(()=>sa(s).pipe(Eo(vr(ia(s),oa(s)).pipe(pn(n=>{e.setCurrent(Lt(n,s),!1),t?.end?.(n,e)}))))),kt(n=>(e.setCurrent(Lt(n,s),!0),e)))}function Pw(s=document.documentElement,t){return vr(Gu(s,t),Vu(s,t))}function qu(s=document.documentElement,t){const e=t?.useMousePoint||bn();return Dl(Dr(s),ra(s)).pipe(Rl(n=>n instanceof PointerEvent?(e.setStart(Lt(n,s),!0),t?.start?.(n,e),sa(s).pipe(Eo(vr(ia(s),oa(s)).pipe(pn(r=>{e.setCurrent(Lt(r,s),!1),t?.end?.(r,e)}))))):n instanceof MouseEvent?F0(n):pl),kt(n=>(e.setCurrent(Lt(n,s),n instanceof PointerEvent),e)))}function Aw(s){return new Mt(t=>Or(s,{start:()=>{t.next(0)}}).subscribe(n=>{t.next(n.current.y-n.start.y)}).unsubscribe).pipe(He())}function Mw(s,t){yn(s,"draggable","true");const e=Nu(s,!0).subscribe(i=>{We(i),Ll(i);const o=i.dataTransfer;o&&(o.effectAllowed="move",o.setData("text/plain","some-data")),t?.onStart?.(i)}),n=zu(s).subscribe(i=>{We(i),t?.onDrag?.(i)}),r=Fu(s).subscribe(i=>{We(i),t?.onEnd?.(i)});return()=>{e.unsubscribe(),n.unsubscribe(),r.unsubscribe()}}function kw(s,t){const e=Uu(s).subscribe(o=>{We(o),t?.onEnter?.(o)}),n=Yu(s).subscribe(o=>{We(o);const a=o.dataTransfer;a&&(a.dropEffect="move"),t?.onOver?.(o)}),r=$u(s).subscribe(o=>{We(o),t?.onLeave?.(o)}),i=Bu(s).subscribe(o=>{We(o);const a=o.dataTransfer;if(!a){t?.onDrop?.(o,[]);return}t?.onDrop?.(o,[...a.files])});return()=>{e.unsubscribe(),n.unsubscribe(),r.unsubscribe(),i.unsubscribe()}}function Hu(s=10){return st(window,"scroll",!0).pipe(gy(s))}function Iw(){return st(document,"visibilitychange",!0).pipe(kt(()=>document.visibilityState==="visible"),He())}function Dw(){return st(window,"storage",!1)}function Ow(){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 Yn(){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 aa(){const{clientWidth:s,clientHeight:t,scrollLeft:e,scrollTop:n}=Yn();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}=Yn();return{width:s,height:t,scrollX:window.pageXOffset||e,scrollY:window.pageYOffset||n}}function ca(s){return s.getBoundingClientRect()}function Lw(s){return{x:s.offsetLeft,y:s.offsetTop,width:s.offsetWidth,height:s.offsetHeight}}function ha(s){const{top:t,left:e,width:n,height:r}=s.getBoundingClientRect(),{scrollLeft:i,scrollTop:o}=Yn();return{x:e+i,y:t+o,width:n,height:r}}function zw(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 Nw(){const{clientHeight:s,scrollTop:t,scrollHeight:e}=Yn(),n=e-s;return n<=0?0:t/n*100}function Fw(s){const t=aa(),e=ca(s);return e.bottom>=0&&e.top<=t.height&&e.right>=0&&e.left<=t.width}function Bw(s){if("center"in s){const t=s.center,e=ca(s.target);return{x:t.x-e.x,y:t.y-e.y}}return{x:s.clientX,y:s.clientY}}function la(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}=Yn();return{x:s.clientX+t,y:s.clientY+e}}function Lt(s,t){const e={x:0,y:0};if(t){const n=la(s),r=ha(t);e.x=K(n.x-r.x,0,r.width),e.y=K(n.y-r.y,0,r.height)}else{let n=0,r=0;if("currentTarget"in s&&s.currentTarget&&s.target&&s.currentTarget!=s.target){const i=s.currentTarget.getBoundingClientRect(),o=s.target.getBoundingClientRect();n=o.left-i.left,r=o.top-i.top}if("offsetX"in s)e.x=s.offsetX+n,e.y=s.offsetY+r;else{const i=la(s),o=ha(s.target);e.x=K(i.x-o.x+n,0,o.width),e.y=K(i.y-o.y+r,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 $w(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 Yw={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},jw={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 Xw(s){if(s.key)return s.key;if(s.keyCode)return s.keyCode;if(s.which)return s.which}function Wu(s,t){const e=t.ctrl||!1,n=t.shift||!1,r=t.alt||!1;return(e===s.metaKey||e===s.ctrlKey)&&n===s.shiftKey&&r===s.altKey&&t.keys.map(i=>i.toLowerCase()).includes(s.key.toLowerCase())}function Ju(s){return ju(s.target||document||window).pipe(Ol(t=>Wu(t,s)),kt(t=>{t.stopPropagation(),t.preventDefault()}))}function Gw(s){return Xu(s.target||document||window).pipe(Ol(t=>Wu(t,s)),kt(t=>{t.stopPropagation(),t.preventDefault()}))}function Ku(s={keys:["o"]},t=ie.text){return Ju(s).pipe(xr(async()=>await du(t)))}async function Vw(s={keys:["o"]},t=ie.text){return U0(Ku(s,t))}async function Zu(s,t){return new Promise(e=>{const n=new ResizeObserver(r=>{const i=s.getBoundingClientRect();t(i),e(()=>{n.unobserve(s)})});n.observe(s)})}function ua(s=document.documentElement,t){return new Mt(e=>{const n=s.getBoundingClientRect();let r=n.x,i=n.y,o=n.width,a=n.height;e.next(n);const c=new ResizeObserver(h=>{const l=s.getBoundingClientRect();(r!=l.x||i!=l.y||o!=l.width||a!=l.height)&&(r=l.x,i=l.y,o=l.width,a=l.height,e.next(l))});return c.observe(s,t),()=>{c.unobserve(s),c.disconnect()}})}function qw(){return st(window,"orientationchange"in window?"orientationchange":"resize").pipe(kt(s=>({width:s.target.innerWidth,height:s.target.innerHeight})),mn({width:window.innerWidth,height:window.innerHeight}))}function Hw(){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 r=t.x,i=t.y;t.x=e.x,t.y=e.y,t.dx=t.x-r,t.dy=t.y-i,t.dStartX=t.x-s.x,t.dStartY=t.y-s.y,t.isDown=typeof n=="boolean"?n:!1}}}function Ww(s=document.documentElement){const t=new nr,e=new At(s);let n=[];const r=Hw(),i=r.mousePoint,o=z=>{t.emit("mouseDown",z)},a=z=>{t.emit("mouseUp",z)},c=z=>{i.isDown||r.setCurrentMousePoint(Lt(z,s)),t.emit("mouseMove",z)},h=z=>{t.emit("mouseOver",z)},l=z=>{t.emit("mouseOut",z)},u=z=>{t.emit("mouseEnter",z)},d=z=>{t.emit("mouseLeave",z)},f=z=>{t.emit("mouseClick",z)},m=z=>{t.emit("mouseDoubleClick",z)},p=z=>{t.emit("mouseWheel",z)},_=z=>{t.emit("mouseContextMenu",z)},y=z=>{t.emit("touchStart",z)},b=z=>{t.emit("touchEnd",z)},v=z=>{t.emit("touchCancel",z)},w=z=>{const vt=z.changedTouches[0];i.isDown||r.setCurrentMousePoint(Lt(vt,s)),t.emit("touchMove",z)},E=z=>{t.emit("pointerDown",z)},C=z=>{t.emit("pointerUp",z)},D=z=>{t.emit("pointerCancel",z)},$=z=>{t.emit("pointerMove",z)},O=z=>{t.emit("pan",z)},U=z=>{t.emit("panStart",z)},V=z=>{t.emit("panMove",z)},q=z=>{t.emit("panEnd",z)},ft=z=>{t.emit("panCancel",z)},pt=z=>{t.emit("panLeft",z)},zt=z=>{t.emit("panRight",z)},wt=z=>{t.emit("panUp",z)},It=z=>{t.emit("panDown",z)},Xt=z=>{t.emit("pinch",z)},Y=z=>{t.emit("pinchin",z)},N=z=>{t.emit("pinchout",z)},A=z=>{t.emit("press",z)},L=z=>{t.emit("rotate",z)},H=z=>{t.emit("swipe",z)},W=z=>{t.emit("swipeLeft",z)},ht=z=>{t.emit("swipeRight",z)},mt=z=>{t.emit("swipeUp",z)},Q=z=>{t.emit("swipeDown",z)},Pt=z=>{t.emit("tap",z)},at=z=>{!z.target||s==z.target||s.contains(z.target)||t.emit("tapOutSide",z)},Ct=z=>{t.emit("transitionstart",z)},Ue=z=>{t.emit("transitionend",z)},Se=z=>{t.emit("animationstart",z)},_e=z=>{t.emit("animationend",z)};let pe={...s.getBoundingClientRect(),width:s.offsetWidth,height:s.offsetHeight};return{el:s,get rect(){return pe},mousePoint:i,eb:t,start:async function(){n.push(yt(s,"mousedown",o)),n.push(yt(s,"mouseup",a)),n.push(yt(s,"mousemove",c)),n.push(yt(s,"mouseover",h)),n.push(yt(s,"mouseout",l)),n.push(yt(s,"mouseenter",u)),n.push(yt(s,"mouseleave",d)),n.push(yt(s,"click",f)),n.push(yt(s,"dblclick",m)),n.push(yt(s,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",p)),n.push(yt(s,"contextmenu",_)),n.push(yt(s,"touchstart",y)),n.push(yt(s,"touchend",b)),n.push(yt(s,"touchcancel",v)),n.push(yt(s,"touchmove",w)),n.push(yt(s,"pointerdown",E)),n.push(yt(s,"pointerup",C)),n.push(yt(s,"pointercancel",D)),n.push(yt(s,"pointermove",$)),e.on("pan",O),e.on("panstart",U),e.on("panmove",V),e.on("panend",q),e.on("pancancel",ft),e.on("panleft",pt),e.on("panright",zt),e.on("panup",wt),e.on("pandown",It),e.on("pinch",Xt),e.on("pinchin",Y),e.on("pinchout",N),e.on("press",A),e.on("rotate",L),e.on("swipe",H),e.on("swipeleft",W),e.on("swiperight",ht),e.on("swipeup",mt),e.on("swipedown",Q),e.on("tap",Pt),n.push(yt(document,"pointerdown",at)),n.push(yt(s,"transitionstart",Ct)),n.push(yt(s,"transitionend",Ue)),n.push(yt(s,"animationstart",Se)),n.push(yt(s,"animationend",_e));const z=await Zu(s,vt=>{pe=vt,t.emit("resize",vt)});n.push(z),n.push(Qu(this,{start:vt=>{r.setStartMousePoint(Lt(vt,s),!0)},move:vt=>{r.setCurrentMousePoint(Lt(vt,s))},end:vt=>{r.setCurrentMousePoint(Lt(vt,s),!1)}}))},end:()=>{t.removeAllListeners(),n.forEach(z=>z()),n=[],e.off("pan",O),e.off("panstart",U),e.off("panmove",V),e.off("panend",q),e.off("pancancel",ft),e.off("panleft",pt),e.off("panright",zt),e.off("panup",wt),e.off("pandown",It),e.off("pinch",Xt),e.off("pinchin",Y),e.off("pinchout",N),e.off("press",A),e.off("rotate",L),e.off("swipe",H),e.off("swipeleft",W),e.off("swiperight",ht),e.off("swipeup",mt),e.off("swipedown",Q),e.off("tap",Pt)}}}function Qu(s,t){return tf(s,t)}function tf(s,t){const e=s.eb,n=o=>{e.on("pointerMove",i),e.on("pointerUp",r),e.on("pointerCancel",r),t?.start?.(o)},r=o=>{e.off("pointerMove",i),e.off("pointerUp",r),e.off("pointerCancel",r),t?.end?.(o)},i=o=>{t?.move?.(o)};return e.on("pointerDown",n),()=>e.off("pointerDown",n)}function Jw(s,t){const e=s.eb,n=o=>{document.addEventListener("mousemove",i,!1),document.addEventListener("mouseup",r,!1),t?.start?.(o)},r=o=>{document.removeEventListener("mousemove",i,!1),document.removeEventListener("mouseup",r,!1),t?.end?.(o)},i=o=>{t?.move?.(o)};return e.on("mouseDown",n),()=>e.off("mouseDown",n)}function Kw(s,t){const e=s.eb,n=o=>{e.on("touchMove",i),e.on("touchEnd",r),e.on("touchCancel",r);const a=o.changedTouches[0];t?.start?.(a)},r=o=>{e.off("touchMove",i),e.off("touchEnd",r),e.off("touchCancel",r);const a=o.changedTouches[0];t?.end?.(a)},i=o=>{const a=o.changedTouches[0];t?.move?.(a)};return e.on("touchStart",n),()=>e.off("touchStart",n)}let fa=class{x;y;toX;toY;constructor(t){this.x=Z(t?.x||0,2),this.y=Z(t?.y||0,2),this.toX=Z(t?.toX||0,2),this.toY=Z(t?.toY||0,2)}toSVGPathData(){return[["L",this.toX,this.toY]]}toCanvasContext(t){t.lineTo(this.toX,this.toY)}getBoundingClientRect(t=2){const e=se(this.x,this.y,this.toX,this.toY);if(e===0){const n=Math.min(this.x,this.toX),r=Math.min(this.y,this.toY),i=Math.max(this.x,this.toX),o=Math.max(this.y,this.toY);return{x:n,y:r,width:i-n,height:o-r}}else{const n=Math.sin(e),r=Math.cos(e),i=r*this.x-n*this.y,o=r*this.toX-n*this.toY,a=r*this.y+n*this.x,c=r*this.toY+n*this.toX;return{x:Z(Math.min(i,o),t),y:Z(Math.min(a,c),t),width:Z(Math.max(i,o)-Math.min(i,o),t),height:Z(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,n=this.y,r=t.toX,i=t.toY,o=this.toX-e,a=t.x-r;if(!o&&!a)return null;const c=(this.toY-n)/o,h=(t.y-i)/a;if(o){if(!a)return{x:r,y:c*(r-e)+n}}else return{x:e,y:h*(e-r)+i};const l=(-h*r+i+c*e-n)/(c-h),u=c*(l-e)+n;return isNaN(l)||isNaN(u)?null:{x:l,y:u}}};class da extends fa{rx;ry;xAxisRotate;largeArcFlag;sweepFlag;constructor(t){super(t),this.rx=Z(t.rx,2),this.ry=Z(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,r,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,n,r,i,o,a,c,!this.sweepFlag)}convert(t,e,n,r,i,o,a,c,h){const l=a/180*Math.PI,u=(t-n)/2,d=(e-r)/2,f=Math.cos(l)*u+Math.sin(l)*d,m=-Math.sin(l)*u+Math.cos(l)*d,p=f*f/(i*i)+m*m/(o*o);if(p>1){const V=Math.sqrt(p);throw i=V*i,o=V*o,new Error(`Radii are too small to build an arc. Correcting them to ${i}/${o}.`)}const _=Math.sqrt((i*i*o*o-i*i*m*m-o*o*f*f)/(i*i*m*m+o*o*f*f)),y=c!=h?1:-1,b=y*_*i*m/o,v=y*_*-o*f/i,w=(t+n)/2,E=(e+r)/2,C=Math.cos(l)*b-Math.sin(l)*v+w,D=Math.sin(l)*b+Math.cos(l)*v+E,$=(V,q,ft,pt)=>(V*pt>=q*ft?1:-1)*Math.acos((V*ft+q*pt)/(Math.sqrt(V*V+q*q)*Math.sqrt(ft*ft+pt*pt))),O=$(1,0,t-C,e-D)-l,U=$(t-C,e-D,n-C,r-D);return[C,D,i,o,l,O,O+U]}}class Zw extends fa{cx;cy;isLineThrough;constructor(t){super(t),this.cx=Z(t.cx,2),this.cy=Z(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 r,i,o,a;for(let l=0;l<2;++l)r=l==0?this.x-2*this.cx+this.toX:this.y-2*this.cy+this.toY,i=l==0?-2*this.x+2*this.cx:-2*this.y+2*this.cy,o=l==0?this.x:this.y,Math.abs(r)>1e-12&&(a=-i/(2*r),0<a&&a<1&&[e,n][l].push(r*a*a+i*a+o));const c={x:Math.min(0,...e),y:Math.min(0,...n)},h={x:Math.max(0,...e),y:Math.max(0,...n)};return{x:Z(c.x,t),y:Z(c.y,t),width:Z(h.x-c.x,t),height:Z(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 Qw=Zw;class jt extends fa{c1x;c1y;c2x;c2y;constructor(t){super(t),this.c1x=Z(t.c1x,2),this.c1y=Z(t.c1y,2),this.c2x=Z(t.c2x,2),this.c2y=Z(t.c2y,2)}clone(){return new jt({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),r=this.x-this.c1x,i=(-n+Math.sqrt(n*n-4*e*r))/2/e,o=(-n-Math.sqrt(n*n-4*e*r))/2/e;const a=[this.y,this.toY],c=[this.x,this.toX];let h;const l=[];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),l.push({X:h.x,Y:h.y})),o>=0&&o<=1&&(h=this.interpolate(o),c.push(h.x),a.push(h.y),l.push({X:h.x,Y:h.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),r=this.y-this.c1y,i=(-n+Math.sqrt(n*n-4*e*r))/2/e,o=(-n-Math.sqrt(n*n-4*e*r))/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),l.push({X:h.x,Y:h.y})),o>=0&&o<=1&&(h=this.interpolate(o),c.push(h.x),a.push(h.y),l.push({X:h.x,Y:h.y}));const u=[],d=l.length;for(let p=0;p<d;p++){for(let _=p+1;_<d;_++)l[p].X===l[_].X&&l[p].Y===l[_].Y&&(_=++p);u.push({X:l[p].X,Y:l[p].Y})}const f={x:Math.min(...c),y:Math.min(...a)},m={x:Math.max(...c),y:Math.max(...a)};return{x:Z(f.x,t),y:Z(f.y,t),width:Z(m.x-f.x,t),height:Z(m.y-f.y,t),dots:u}}static base3(t,e,n,r,i){const o=-3*e+9*n-9*r+3*i,a=t*o+6*e-12*n+6*r;return t*a-3*e+3*n}static bezlen(t,e,n,r,i,o,a,c,h=1){h=Math.max(0,Math.min(h,1));const l=h/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 m=0;m<12;m++){const p=l*u[m]+l,_=jt.base3(p,t,n,i,a),y=jt.base3(p,e,r,o,c);f+=d[m]*Math.sqrt(_*_+y*y)}return l*f}length(t=1){return jt.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,r=Math.pow(n,3),i=Math.pow(n,2),o=e*e,a=o*e,c=r*this.x+i*3*e*this.c1x+n*3*e*e*this.c2x+a*this.toX,h=r*this.y+i*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),m=n*this.x+e*this.c1x,p=n*this.y+e*this.c1y,_=n*this.c2x+e*this.toX,y=n*this.c2y+e*this.toY,b=90-Math.atan2(l-d,u-f)*180/Math.PI;return{x:c,y:h,m:{x:l,y:u},n:{x:d,y:f},start:{x:m,y:p},end:{x:_,y},alpha:b}}getTatLen(t){const e=this.x,n=this.y,r=this.c1x,i=this.c1y,o=this.c2x,a=this.c2y,c=this.toX,h=this.toY;if(t<0||jt.bezlen(e,n,r,i,o,a,c,h)<t)return 0;const l=1;let u=l/2,d=l-u,f=jt.bezlen(e,n,r,i,o,a,c,h,d);for(;Math.abs(f-t)>.01;)u/=2,d+=(f<t?1:-1)*u,f=jt.bezlen(e,n,r,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}}}const vs=Math.PI*2;function ef(s,t,e,n){const r=s*n-t*e<0?-1:1;let i=s*e+t*n;return i>1&&(i=1),i<-1&&(i=-1),r*Math.acos(i)}function tv(s,t,e,n,r,i,o,a,c,h){const l=h*(s-e)/2+c*(t-n)/2,u=-c*(s-e)/2+h*(t-n)/2,d=o*o,f=a*a,m=l*l,p=u*u;let _=d*f-d*p-f*m;_<0&&(_=0),_/=d*p+f*m,_=Math.sqrt(_)*(r===i?-1:1);const y=_*o/a*u,b=_*-a/o*l,v=h*y-c*b+(s+e)/2,w=c*y+h*b+(t+n)/2,E=(l-y)/o,C=(u-b)/a,D=(-l-y)/o,$=(-u-b)/a,O=ef(1,0,E,C);let U=ef(E,C,D,$);return i===0&&U>0&&(U-=vs),i===1&&U<0&&(U+=vs),[v,w,O,U]}function ev(s,t){const e=1.3333333333333333*Math.tan(t/4),n=Math.cos(s),r=Math.sin(s),i=Math.cos(s+t),o=Math.sin(s+t);return[n,r,n-r*e,r+n*e,i+o*e,o-i*e,i,o]}function nf(s,t,e,n,r,i,o,a,c){const h=Math.sin(c*vs/360),l=Math.cos(c*vs/360),u=l*(s-e)/2+h*(t-n)/2,d=-h*(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 m=tv(s,t,e,n,r,i,o,a,h,l),p=[];let _=m[2],y=m[3];const b=Math.max(Math.ceil(Math.abs(y)/(vs/4)),1);y/=b;for(let v=0;v<b;v++)p.push(ev(_,y)),_+=y;return p.map(v=>{for(let w=0;w<v.length;w+=2){let E=v[w+0],C=v[w+1];E*=o,C*=a;const D=l*E-h*C,$=h*E+l*C;v[w+0]=D+m[0],v[w+1]=$+m[1]}return v})}function ma(s,t,e,n,r,i){return[s/3+.6666666666666666*e,t/3+.6666666666666666*n,r/3+.6666666666666666*e,i/3+.6666666666666666*n,r,i]}function xs(s,t,e,n){return[s,t,e,n,e,n]}const Rr={a:7,c:6,s:4,q:4,t:2,m:2,l:2,h:1,v:1,z:0};function wn(s="path"){return document.createElementNS.call(document,"http://www.w3.org/2000/svg",s)}function sf(){return wn("path")}const nv=s=>s instanceof SVGElement&&s.tagName==="path";function sv(s,t="shape"){return Ir(oo(s),`${t}.svg`)}function rf(s){return typeof s!="string"?!1:(s=s.trim(),/^[mlhvzaqtcs]\s*[-+.0-9][^mlhvzaqtcs]+/i.test(s)&&/[\dz]$/i.test(s))}function rv(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 of(s){const t=[];return rf(s)&&s.replace(/([mlhvzaqtcs])([^mlhvzaqtcs]*)/gi,(e,n,r)=>{let i=n.toLowerCase();const o=ki(r);for(i=="m"&&o.length>Rr[i]&&(t.push([n,...o.splice(0,Rr[i])]),i="l",n=n=="m"?"l":"L");o.length;){if(o.length<Rr[i])throw new Error(`parseSVGPath substring:{ ${e} } command:{ ${n} } args:{ ${o} }`);t.push([n,...o.splice(0,Rr[i])])}return i=="z"&&t.push([n]),""}),t}function af(s){let t=0,e=0,n=0,r=0;return s.map(function(i){const o=i[0],a=o.toUpperCase();if(o!=a)switch(i[0]=a,o){case"a":i[6]+=n,i[7]+=r;break;case"v":i[1]+=r;break;case"h":i[1]+=n;break;default:for(let c=1;c<i.length;)i[c++]+=n,i[c++]+=r}switch(a){case"Z":n=t,r=e;break;case"H":n=i[1];break;case"V":r=i[1];break;case"M":n=t=i[1],r=e=i[2];break;default:n=i[i.length-2],r=i[i.length-1]}return i})}function iv(s){const t=[];let e=0,n=0,r=0,i=0,o=0,a=0,c=0,h=0,l;for(let u=0,d=s.length;u<d;u++){let f=s[u];const m=f[0];switch(m){case"M":e=f[1],n=f[2];break;case"A":const p=nf(r,i,f[6],f[7],f[4],f[5],f[1],f[2],f[3]);if(!p.length)continue;p.forEach((b,v)=>{const[w,E,C,D,$,O,U,V]=b;f=["C",C,D,$,O,U,V],v<p.length-1&&t.push(f)});break;case"S":let _=r,y=i;(l=="C"||l=="S")&&(_+=_-c,y+=y-h),f=["C",_,y,f[1],f[2],f[3],f[4]];break;case"T":l=="Q"||l=="T"?(o=r*2-o,a=i*2-a):(o=r,a=i),f=["C",...ma(r,i,o,a,f[1],f[2])];break;case"Q":o=f[1],a=f[2],f=["C",...ma(r,i,f[1],f[2],f[3],f[4])];break;case"L":f=["C",...xs(r,i,f[1],f[2])];break;case"H":f=["C",...xs(r,i,f[1],i)];break;case"V":f=["C",...xs(r,i,r,f[1])];break;case"Z":f=["C",...xs(r,i,e,n)];break}l=m,r=f[f.length-2],i=f[f.length-1],f.length>4?(c=f[f.length-4],h=f[f.length-3]):(c=r,h=i),t.push(f)}return t}class Ss{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"),r=document.createElement("source"),i=new MediaSource;i.addEventListener("sourceopen",()=>t(!0)),r.src=URL.createObjectURL(i),r.media="(min-width:10px)",n.append(r),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(()=>{Ss.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 pa extends nr{source;raw="";mode="text";tagname="";nodename="";textchunk="";entity="";quote="";attrs={};constructor(t){super(),this.source=t}parse(){const t=Ud(this.source);if(t===0){this.emit("finish");return}let e,n,r=$c(this.source,0);for(let i=1;i<t;i++)e=n,n=r,r=$c(this.source,i),this.raw+=n,n&&this.step(n,r,e);r&&this.step(r,void 0,n),this.emit("finish")}step(t,e,n){t==`
84
- `&&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":Me("whitespace",t)?(this.textchunk+=cf(this.entity),this.mode="text"):t==";"?(this.textchunk+=cf(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(!Me("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":Me("whitespace",t)||(this.mode="close tag name",this.tagname="",this.nodename="",this.act(t,e,n));break;case"close tag name":if(Me("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(Me("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":Me("whitespace",t)||(this.mode="attr",this.nodename="",this.act(t,e,n));break;case"attr":if(Me("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(!Me("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(Me("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 cf(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 hf=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function ga(s,t={}){var e=1,n=1;function r(Y){var N=Y.match(/\n/g);N&&(e+=N.length);var A=Y.lastIndexOf(`
85
- `);n=~A?Y.length-A:n+Y.length}function i(){var Y={line:e,column:n};return function(N){return N.position=new o(Y),m(),N}}function o(Y){this.start=Y,this.end={line:e,column:n},this.source=t.source}o.prototype.content=s;var a=[];function c(Y){var N=new Error(t.source+":"+e+":"+n+": "+Y);if(N.reason=Y,N.filename=t.source,N.line=e,N.column=n,N.source=s,t.silent)a.push(N);else throw N}function h(){var Y=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:Y,parsingErrors:a}}}function l(){return f(/^{\s*/)}function u(){return f(/^}/)}function d(){var Y,N=[];for(m(),p(N);s.length&&s.charAt(0)!="}"&&(Y=It()||Xt());)Y!==!1&&(N.push(Y),p(N));return N}function f(Y){var N=Y.exec(s);if(N){var A=N[0];return r(A),s=s.slice(A.length),N}}function m(){f(/^\s*/)}function p(Y){var N;for(Y=Y||[];N=_();)N!==!1&&Y.push(N);return Y}function _(){var Y=i();if(!(s.charAt(0)!="/"||s.charAt(1)!="*")){for(var N=2;s.charAt(N)!=""&&(s.charAt(N)!="*"||s.charAt(N+1)!="/");)++N;if(N+=2,s.charAt(N-1)==="")return c("End of comment missing");var A=s.slice(2,N-2);return n+=2,r(A),s=s.slice(N),n+=2,Y({type:"comment",comment:A})}}function y(){var Y=f(/^([^{]+)/);if(Y)return Fe(Y[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(N){return N.replace(/,/g,"‌")}).split(/\s*(?![^(]*\)),\s*/).map(function(N){return N.replace(/\u200C/g,",")})}function b(){var Y=i(),N=f(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(N){if(N=Fe(N[0]),!f(/^:\s*/))return c("property missing ':'");var A=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/),L=Y({type:"declaration",property:N.replace(hf,""),value:A?Fe(A[0]).replace(hf,""):""});return f(/^[;\s]*/),L}}function v(){var Y=[];if(!l())return c("missing '{'");p(Y);for(var N;N=b();)N!==!1&&(Y.push(N),p(Y));return u()?Y:c("missing '}'")}function w(){for(var Y,N=[],A=i();Y=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)N.push(Y[1]),f(/^,\s*/);if(N.length)return A({type:"keyframe",values:N,declarations:v()})}function E(){var Y=i(),N=f(/^@([-\w]+)?keyframes\s*/);if(N){var A=N[1];if(N=f(/^([-\w]+)\s*/),!N)return c("@keyframes missing name");var L=N[1];if(!l())return c("@keyframes missing '{'");for(var H,W=p();H=w();)W.push(H),W=W.concat(p());return u()?Y({type:"keyframes",name:L,vendor:A,keyframes:W}):c("@keyframes missing '}'")}}function C(){var Y=i(),N=f(/^@supports *([^{]+)/);if(N){var A=Fe(N[1]);if(!l())return c("@supports missing '{'");var L=p().concat(d());return u()?Y({type:"supports",supports:A,rules:L}):c("@supports missing '}'")}}function D(){var Y=i(),N=f(/^@host\s*/);if(N){if(!l())return c("@host missing '{'");var A=p().concat(d());return u()?Y({type:"host",rules:A}):c("@host missing '}'")}}function $(){var Y=i(),N=f(/^@media *([^{]+)/);if(N){var A=Fe(N[1]);if(!l())return c("@media missing '{'");var L=p().concat(d());return u()?Y({type:"media",media:A,rules:L}):c("@media missing '}'")}}function O(){var Y=i(),N=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(N)return Y({type:"custom-media",name:Fe(N[1]),media:Fe(N[2])})}function U(){var Y=i(),N=f(/^@page */);if(N){var A=y()||[];if(!l())return c("@page missing '{'");for(var L=p(),H;H=b();)L.push(H),L=L.concat(p());return u()?Y({type:"page",selectors:A,declarations:L}):c("@page missing '}'")}}function V(){var Y=i(),N=f(/^@([-\w]+)?document *([^{]+)/);if(N){var A=Fe(N[1]),L=Fe(N[2]);if(!l())return c("@document missing '{'");var H=p().concat(d());return u()?Y({type:"document",document:L,vendor:A,rules:H}):c("@document missing '}'")}}function q(){var Y=i(),N=f(/^@font-face\s*/);if(N){if(!l())return c("@font-face missing '{'");for(var A=p(),L;L=b();)A.push(L),A=A.concat(p());return u()?Y({type:"font-face",declarations:A}):c("@font-face missing '}'")}}var ft=wt("import"),pt=wt("charset"),zt=wt("namespace");function wt(Y){var N=new RegExp("^@"+Y+"\\s*([^;]+);");return function(){var A=i(),L=f(N);if(L){var H={type:Y};return H[Y]=L[1].trim(),A(H)}}}function It(){if(s[0]=="@")return E()||$()||O()||C()||ft()||pt()||zt()||V()||U()||D()||q()}function Xt(){var Y=i(),N=y();return N?(p(),Y({type:"rule",selectors:N,declarations:v()})):c("selector missing")}return ya(h())}function Fe(s){return s?s.replace(/^\s+|\s+$/g,""):""}function ya(s,t){var e=s&&typeof s.type=="string",n=e?s:t;for(var r in s){var i=s[r];Array.isArray(i)?i.forEach(function(o){ya(o,n)}):i&&typeof i=="object"&&ya(i,n)}return e&&Object.defineProperty(s,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),s}let ov=class extends pa{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=ga(e);for(const r of n.stylesheet.rules)for(const i of r.declarations)for(const o of r.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,n)=>{let r=this.groups.length;for(;r--;)if(this.groups[r]!=this.currentItem){let i="",o="";for(const a in this.groups[r])a=="transform"?i=this.groups[r].transform:a=="class"&&this.globalStyles["."+this.groups[r][a]]?o=this.globalStyles["."+this.groups[r][a]].join(";")+";"+o:a=="id"&&this.globalStyles["#"+this.groups[r][a]]?o=this.globalStyles["#"+this.groups[r][a]].join(";")+";"+o:typeof this.currentItem[a]>"u"&&(this.currentItem[a]=this.groups[r][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),wa(this.currentItem.style,this.currentItem,va)}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=[],r;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":r={},e.style&&wa(e.style,r),r.offset=r.offset||e.offset,r.color=r["stop-color"]||e["stop-color"],r.opacity=r["stop-opacity"]||e["stop-opacity"],~(r.offset+"").indexOf("%")?r.offset=parseFloat(r.offset):r.offset=parseFloat(r.offset)*100,r.offset=+r.offset.toFixed(2),this.grad.stops.push(r);break;case"linearGradient":this.grad.angle=(360+ba(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,c=this.grad.stops.length;a<c;a++)r=this.grad.stops[a],a&&a!=c-1?n.push(r.color+":"+r.offset):n.push(r.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,c=this.grad.stops.length;a<c;a++)r=this.grad.stops[a],a&&a!=c-1?n.push(r.color+":"+r.offset):n.push(r.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 i in e){const o=e[i];if(va.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"&&wa(o,this.currentItem,va),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 ba(s,t,e,n,r,i){if(typeof r>"u"||typeof i>"u"){const o=s-e,a=t-n;return!o&&!a?0:(180+Math.atan2(-a,-o)*180/Math.PI+360)%360}else return ba(s,t,r,i)-ba(e,n,r,i)}function wa(s,t,e){const n=(s+"").split(";"),r=/^\s+|\s+$/g;for(let i=0,o=n.length;i<o;i++){const a=n[i].split(":"),c=a[0].replace(r,"").replace(/[A-Z]/g,function(h){return"-"+h.toLowerCase()});(!e||e.includes(c))&&(t[c]=a[1].replace(r,""))}}const va=["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 Wt{prevPathX=0;prevPathY=0;isUpdatedSVGPathData=!0;isUpdatedSVGPathD=!0;isUpdatedBoundingClientRect=!0;isUpdatedPolymorphPoints=!0;isUpdatedTotalLength=!0;normalizedLines=[];constructor(t){const e=typeof t=="string"?of(t):t||[],n=iv(af(e));for(let r=0,i=n.length;r<i;r++){const o=n[r];o[0]=="M"?(this.prevPathX=o[1],this.prevPathY=o[2]):this._appendLine(new jt({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 da){nf(this.prevPathX,this.prevPathY,t.toX,t.toY,t.largeArcFlag,t.sweepFlag,t.rx,t.ry,t.xAxisRotate).forEach(h=>{const[l,u,d,f,m,p,_,y]=h;this.normalizedLines.push(new jt({x:this.prevPathX,y:this.prevPathY,c1x:d,c1y:f,c2x:m,c2y:p,toX:_,toY:y})),this.prevPathX=_,this.prevPathY=y});return}if(t instanceof jt){this.normalizedLines.push(t.clone()),this.prevPathX=t.toX,this.prevPathY=t.toY;return}let e,n,r,i,o,a;t instanceof Qw?[e,n,r,i,o,a]=ma(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,n,r,i,o,a]=xs(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new jt({x:this.prevPathX,y:this.prevPathY,c1x:e,c1y:n,c2x:r,c2y:i,toX:o,toY:a})),this.prevPathX=o,this.prevPathY=a}static fromPolymorphPoints(t){const e=new Wt,n=t.length;if(n){e.prevPathX=t[0],e.prevPathY=t[1];for(let r=2;r+5<n;r+=6)e._appendLine(new jt({x:e.prevPathX,y:e.prevPathY,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 Wt,n=t.length;if(n){e.prevPathX=t[0].x,e.prevPathY=t[0].y;for(let r=0;r<n;r++)e._appendLine(t[r])}return e}clone(){return Wt.fromLines(this.normalizedLines)}cachedSVGPathData=[];toSVGPathData(){if(this.isUpdatedSVGPathData){const t=[];for(let e=0,n=this.normalizedLines.length;e<n;e++){const r=this.normalizedLines[e];e==0&&t.push(["M",r.x,r.y]),t.push(...r.toSVGPathData())}this.cachedSVGPathData=t,this.isUpdatedSVGPathData=!1}return this.cachedSVGPathData}cachedSVGPathD="";toSVGPathD(){return this.isUpdatedSVGPathD&&(this.cachedSVGPathD=rv(this.toSVGPathData()),this.isUpdatedSVGPathD=!1),this.cachedSVGPathD}toCanvasContext(t){t.beginPath();for(let e=0,n=this.normalizedLines.length;e<n;e++){const r=this.normalizedLines[e];e==0&&t.moveTo(r.x,r.y),r.toCanvasContext(t)}}cachedBoundingClientRect={x:0,y:0,width:0,height:0};getBoundingClientRect(t=2){if(this.isUpdatedBoundingClientRect){const e=[],n=[];if(this.normalizedLines.forEach(r=>{const i=r.getBoundingClientRect(t);e.push(i.x,i.x+i.width),n.push(i.y,i.y+i.height)}),e.length==0||n.length==0)this.cachedBoundingClientRect={x:0,y:0,width:0,height:0};else{const r=Math.min(...e),i=Math.min(...n),o=Math.max(...e),a=Math.max(...n);this.cachedBoundingClientRect={x:Z(r,t),y:Z(i,t),width:Z(o-r,t),height:Z(a-i,t)}}this.isUpdatedBoundingClientRect=!1}return this.cachedBoundingClientRect}getBoundingClientRectCenter(t=2){const e=this.getBoundingClientRect(t);return{x:Z(e.x+e.width*.5,t),y:Z(e.y+e.height*.5,t)}}transform(t){let e;return t.m?e=t.m:(e=new Yt,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():Wt.fromLines(this.normalizedLines.map(n=>{let r=n.x,i=n.y,o=n.c1x,a=n.c1y,c=n.c2x,h=n.c2y,l=n.toX,u=n.toY;return{x:r,y:i}=e.transformPoint({x:r,y:i}),{x:o,y:a}=e.transformPoint({x:o,y:a}),{x:c,y:h}=e.transformPoint({x:c,y:h}),{x:l,y:u}=e.transformPoint({x:l,y:u}),new jt({x:r,y:i,c1x:o,c1y:a,c2x:c,c2y:h,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 r=this.normalizedLines.length;for(let i=0;i<r;i++){const o=this.normalizedLines[i];if(n=o.length(),e+n>=t)return o.getPointAtSegmentLength(t-e);e+=n}return this.normalizedLines[r-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,r=this.normalizedLines[0];if(n--,n>1)for(let i=1;i<e&&(r=this.normalizedLines[i],n>1);i++)n-=1;return r.interpolate(n)}}getSubPathD(t,e,n=1e-6){const r=this.getSubPathDAtLength(e,!0);return Ai(n)(t,0)?r:r.getSubPathDAtLength(t,!1)}getSubPathDAtLength(t,e=!1){const n=new Wt;let r=0,i=!1;for(let o=0,a=this.normalizedLines.length;o<a;o++){const c=this.normalizedLines[o];o==0&&(n.prevPathX=c.x,n.prevPathY=c.y);const h=c.length();if(r+h>t&&!i){i=!0;const l=c.getPointAtSegmentLength(t-r);if(n._appendLine(new jt({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 jt({x:n.prevPathX,y:n.prevPathY,c1x:l.n.x,c1y:l.n.y,c2x:l.end.x,c2y:l.end.y,toX:c.toX,toY:c.toY})),r+=h;continue}n._appendLine(c),r+=h}return n}closestPoint(t,e){const n=this.getTotalLength();let r={x:t,y:e},i=0,o=1/0,a=8;for(let h=0;h<=n;h+=a){const l=this.getPointAtLength(h),u=(t-l.x)*(t-l.x)+(e-l.y)*(e-l.y);u<o&&(r=l,i=h,o=u)}for(a/=2;a>.5;){const h=i-a,l=this.getPointAtLength(h),u=(t-l.x)*(t-l.x)+(e-l.y)*(e-l.y),d=i+a,f=this.getPointAtLength(d),m=(t-f.x)*(t-f.x)+(e-f.y)*(e-f.y);h>=0&&u<o?(r=l,i=h,o=u):d<=n&&m<o?(r=f,i=d,o=m):a/=2}const c=this.getPointAtLength(i+(i===n?-.1:.1));return{point:r,rotation:i>=n?se(c.x,c.y,r.x,r.y):se(r.x,r.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,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 r=e[n-2],i=e[n-1];for(let o=0;o<n;o+=6)t+=Ze(e[o],e[o+1],r,i),r=e[o],i=e[o+1]}return Math.floor(t)}expendToPolymorphPoints(t){const e=t.length,n=this.getPolymorphPoints(),r=n.length;if(r){const i=[];let o=e-r;const a=Math.ceil(e/r);i.push(["M",n[0],n[1]]);let c=2;for(;c+5<=r-1;){const h=n[c++],l=n[c++],u=n[c++],d=n[c++],f=n[c++],m=n[c++];i.push(["C",h,l,u,d,f,m]);let p=0;for(;p<a&&o>0;)i.push(["C",f,m,f,m,f,m]),o-=6,p++}return new Wt(i)}else return Wt.fromPolymorphPoints(t)}static getInterpolator(t,e){return n=>{const r=Ai(Number.EPSILON);return r(n,0)?t.clone():r(n,1)?e.clone():Wt.fromPolymorphPoints(tm(t.getPolymorphPoints(),e.getPolymorphPoints(),n).map(i=>Z(i,2)))}}}const lf=av("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 av(s,t=10){const e={},n=s.split(",");for(let r=0;r<n.length;r+=2){const i="&"+n[r+1]+";",o=parseInt(n[r],t);e[i]="&#"+o+";"}return e["\\xa0"]="&#160;",e}function Jt(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 Lr(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 cv(s){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[s]||t.start}function hv(s){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[s]||t.alphabetic}const _s={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 xa{__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 i=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(e);i&&(n.setAttribute("stop-color",Jt("rgb({r},{g},{b})",{r:i[1],g:i[2],b:i[3]})),n.setAttribute("stop-opacity",i[4]))}else n.setAttribute("stop-color",e);this.__root.appendChild(n)}}class uf{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}}class zr{__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(_s);for(let e=0,n=t.length;e<n;e++){const r=t[e];this[r]=_s[r].canvas}}__getStyleState(){const t={},e=Object.keys(_s);for(let n=0,r=e.length;n<r;n++){const i=e[n];t[i]=this[i]}return t}__applyStyleState(t){const e=Object.keys(t);for(let n=0,r=e.length;n<r;n++){const i=e[n];this[i]=t[i]}}__createElement(t,e={},n=!1){const r=this.__document.createElementNS("http://www.w3.org/2000/svg",t),i=Object.keys(e);n&&(r.setAttribute("fill","none"),r.setAttribute("stroke","none"));for(let o=0;o<i.length;o++){const a=i[o];r.setAttribute(a,e[a])}return r}__applyStyleToCurrentElement(t){let e=this.__currentElement;const n=this.__currentElementsToStyle;n&&(e.setAttribute(t,""),e=n.element,n.children.forEach(i=>{i.setAttribute(t,"")}));const r=Object.keys(_s);for(let i=0;i<r.length;i++){const o=_s[r[i]],a=this[r[i]];if(o.apply){if(a instanceof uf){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,Jt("url(#{id})",{id:a.__root.getAttribute("id")}))}else if(a instanceof xa)e.setAttribute(o.apply,Jt("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,Jt("rgb({r},{g},{b})",{r:h[1],g:h[2],b:h[3]}));let l=parseFloat(h[4]);const u=this.globalAlpha;u!=null&&(l*=u),e.setAttribute(o.svgAttr+"-opacity",""+l)}}else{let c=o.svgAttr;if(r[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 r=Object.keys(lf);for(let i=0,o=r.length;i<o;i++){const a=r[i],c=lf[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 r=this.__createElement("g");e.appendChild(r),this.__currentElement=r}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(Jt("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(Jt("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(Jt("translate({x},{y})",{x:t,y:e}))}transform(t,e,n,r,i,o){this.__addTransform(Jt("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:n,d:r,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(Jt("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(Jt("L {x} {y}",this.__currentPosition)):this.__addPathCommand(Jt("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,n,r,i,o){this.__currentPosition={x:i,y:o},this.__addPathCommand(Jt("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:n,cp2y:r,x:i,y:o}))}quadraticCurveTo(t,e,n,r){this.__currentPosition={x:n,y:r},this.__addPathCommand(Jt("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:n,y:r}))}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,r,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===n&&e===r||i===0){this.lineTo(t,e);return}const c=this.normalize([o-t,a-e]),h=this.normalize([n-t,r-e]);if(c[0]*h[1]===c[1]*h[0]){this.lineTo(t,e);return}const l=c[0]*h[0]+c[1]*h[1],u=Math.acos(Math.abs(l)),d=this.normalize([c[0]+h[0],c[1]+h[1]]),f=i/Math.sin(u/2),m=t+f*d[0],p=e+f*d[1],_=[-c[1],c[0]],y=[h[1],-h[0]],b=function(E){const C=E[0];return E[1]>=0?Math.acos(C):-Math.acos(C)},v=b(_),w=b(y);this.lineTo(m+_[0]*i,p+_[1]*i),this.arc(m,p,i,v,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,n,r){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+n,e),this.lineTo(t+n,e+r),this.lineTo(t,e+r),this.lineTo(t,e),this.closePath()}fillRect(t,e,n,r){const i=this.__createElement("rect",{x:t,y:e,width:n,height:r},!0);this.__closestGroupOrSvg().appendChild(i),this.__currentElement=i,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,n,r){const i=this.__createElement("rect",{x:t,y:e,width:n,height:r},!0);this.__closestGroupOrSvg().appendChild(i),this.__currentElement=i,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),n=this.__rootSVG.childNodes[1],r=n.childNodes;for(let i=r.length-1;i>=0;i--)r[i]&&n.removeChild(r[i]);this.__currentElement=n,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,n,r){if(t===0&&e===0&&n===this.width&&r===this.height){this.__clearCanvas();return}const i=this.__closestGroupOrSvg(),o=this.__createElement("rect",{x:t,y:e,width:n,height:r,fill:"#FFFFFF"},!0);i.appendChild(o)}createLinearGradient(t,e,n,r){const i=this.__createElement("linearGradient",{id:Lr(this.__ids),x1:t+"px",x2:n+"px",y1:e+"px",y2:r+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(i),new xa(i,this)}createRadialGradient(t,e,n,r,i,o){const a=this.__createElement("radialGradient",{id:Lr(this.__ids),cx:r+"px",cy:i+"px",r:o+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(a),new xa(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,r){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:n,"text-anchor":cv(this.textAlign),"dominant-baseline":hv(this.textBaseline)},!0);a.appendChild(this.__document.createTextNode(t)),this.__currentElement=a,this.__applyStyleToCurrentElement(r),o.appendChild(this.__wrapTextLink(i,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,r,i,o){if(r===i)return;r=r%(2*Math.PI),i=i%(2*Math.PI),r===i&&(i=(i+2*Math.PI-.001*(o?-1:1))%(2*Math.PI));const a=t+n*Math.cos(i),c=e+n*Math.sin(i),h=t+n*Math.cos(r),l=e+n*Math.sin(r),u=o?0:1;let d=0,f=i-r;f<0&&(f+=2*Math.PI),o?d=f>Math.PI?0:1:d=f>Math.PI?1:0,this.lineTo(h,l),this.__addPathCommand(Jt("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:n,ry:n,xAxisRotation:0,largeArcFlag:d,sweepFlag:u,endX:a,endY:c})),this.__currentPosition={x:a,y:c}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),n=Lr(this.__ids),r=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",Jt("url(#{id})",{id:n})),t.appendChild(r),this.__currentElement=r}drawImage(...t){let e=t[0],n,r,i,o,a=0,c=0,h,l,u,d,f,m,p,_;if(t.length===3)n=t[1],r=t[2],h=e.width,l=e.height,i=h,o=l;else if(t.length===5)n=t[1],r=t[2],i=t[3],o=t[4],h=e.width,l=e.height;else if(t.length===9)a=t[1],c=t[2],h=t[3],l=t[4],n=t[5],r=t[6],i=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 b="translate("+n+", "+r+")";if(e instanceof zr){if(u=e.getSvg().cloneNode(!0),u.childNodes&&u.childNodes.length>1){for(d=u.childNodes[0];d.childNodes.length;)_=d.childNodes[0].getAttribute("id"),this.__ids[_]=_,this.__SVGdefs.appendChild(d.childNodes[0]);if(f=u.childNodes[1],f){const v=f.getAttribute("transform");let w;v?w=v+" "+b:w=b,f.setAttribute("transform",w),y.appendChild(f)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(m=this.__createElement("image"),m.setAttribute("width",i),m.setAttribute("height",o),m.setAttribute("preserveAspectRatio","none"),(a||c||h!==e.width||l!==e.height)&&(p=this.__document.createElement("canvas"),p.width=i,p.height=o,p.getContext("2d")?.drawImage(e,a,c,h,l,0,0,i,o),e=p),m.setAttribute("transform",b),m.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),y.appendChild(m))}createPattern(t,e){const n=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),r=Lr(this.__ids);let i;return n.setAttribute("id",r),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")),n.appendChild(i),this.__SVGdefs.appendChild(n)):t instanceof zr&&(n.setAttribute("width",""+t.width),n.setAttribute("height",""+t.height),n.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(n)),new uf(n,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}}class Sa{canvas;context;customContext;enablePath2D=!1;currentPath2D=new Path2D;path2Ds=[];currentMatrix=new DOMMatrix;hasSetCustomStrokeStyle=!1;hasSetCustomFillStyle=!1;constructor(t,e,n,r=!1,i=!1){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),r&&(this.customContext=new zr({canvas:this.canvas,width:e||this.canvas.width,height:n||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,n,r){return this.context.fillRect(t,e,n,r),this.customContext&&this.customContext.fillRect(t,e,n,r),this}fillText(t,e,n,r){return this.hasSetCustomFillStyle=!1,this.context.fillText(t,e,n,r),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,r){return this.context.strokeText(t,e,n,r),this.customContext&&this.customContext.strokeText(t,e,n),this}strokeRect(t,e,n,r){return this.context.strokeRect(t,e,n,r),this.customContext&&this.customContext.strokeRect(t,e,n,r),this}measureText(t){return this.context.measureText(t)}clearRect(t=0,e=0,n=this.canvas.width,r=this.canvas.height){return this.context.clearRect(t,e,n,r),this.customContext&&this.customContext.clearRect(t,e,n,r),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,r=0){return this.translate(n,r),this.context.scale(t,e),this.customContext&&this.customContext.scale(t,e),this.currentMatrix=this.currentMatrix.scale(t,e),this.translate(-n,-r),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,r,i,o){return this.context.arc(t,e,n,r,i,o),this.customContext&&this.customContext.arc(t,e,n,r,i,o?-1:1),this.enablePath2D&&this.currentPath2D.arc(t,e,n,r,i,o),this}arcTo(t,e,n,r,i){return this.context.arcTo(t,e,n,r,i),this.customContext&&this.customContext.arcTo(t,e,n,r,i),this.enablePath2D&&this.currentPath2D.arcTo(t,e,n,r,i),this}ellipse(t,e,n,r,i,o,a,c){return this.context.ellipse(t,e,n,r,i,o,a,c),this.enablePath2D&&this.currentPath2D.ellipse(t,e,n,r,i,o,a,c),this}quadraticCurveTo(t,e,n,r){return this.context.quadraticCurveTo(t,e,n,r),this.customContext&&this.customContext.quadraticCurveTo(t,e,n,r),this.enablePath2D&&this.currentPath2D.quadraticCurveTo(t,e,n,r),this}bezierCurveTo(t,e,n,r,i,o){return this.context.bezierCurveTo(t,e,n,r,i,o),this.customContext&&this.customContext.bezierCurveTo(t,e,n,r,i,o),this.enablePath2D&&this.currentPath2D.bezierCurveTo(t,e,n,r,i,o),this}rect(t,e,n,r){return this.context.rect(t,e,n,r),this.customContext&&this.customContext.rect(t,e,n,r),this.enablePath2D&&this.currentPath2D.rect(t,e,n,r),this}createLinearGradient(t,e,n,r,i){const o=this.context.createLinearGradient(t,e,n,r);return i&&Object.entries(i).forEach(([a,c])=>{o.addColorStop(parseFloat(a),c)}),o}createRadialGradient(t,e,n,r,i,o,a){const c=this.context.createRadialGradient(t,e,n,r,i,o);return a&&Object.entries(a).forEach(([h,l])=>{c.addColorStop(parseFloat(h),l)}),c}drawImage(t,...e){if(e.length===0)this.context.drawImage(t,0,0);else if(e.length===2){const n=e[0],r=e[1];this.context.drawImage(t,n,r)}else if(e.length===4){const n=e[0],r=e[1],i=e[2],o=e[3];this.context.drawImage(t,n,r,i,o)}else if(e.length===8){const n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],c=e[5],h=e[6],l=e[7];this.context.drawImage(t,n,r,i,o,a,c,h,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,r=this.canvas.height,i){return this.context.getImageData(t,e,n,r,i)}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 _t{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 qe;transformSubscription;isMouseIn=!1;isDragging=!1;m;el;constructor(t){this.id=Fi(),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,r=this._y;(n!==t||r!==e)&&(this._x=t,this._y=e,this.transform$.next({dX:t-n,dY:e-r}))}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,r=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/r}))}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 Wt?this.initD:new Wt(this.initD)):(!this.d||this.shouldUpdatePathD)&&(this.d=new Wt(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,r=0;if(this.parent?.dDegree||this.parent?.dScaleX!==1||this.parent?.dScaleY!==1){const o=this.transformOrigin(!0);n=o.x,r=o.y}const i=new Yt;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,n,r),(this.parent?.dScaleX!==1||this.parent?.dScaleY!==1)&&i.scale(this.parent?.dScaleX||1,this.parent?.dScaleY||1,n,r),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 _t(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,r=0;if(this.parent&&!t){const i=this.parent.combo.getBoundingClientRectCenter(e);n=i.x-this.parent.dX,r=i.y-this.parent.dY}else if(typeof this.initCenterX>"u"&&typeof this.initCenterY>"u"){const i=this.getBoundingClientRectCenter(e);n=i.x,r=i.y}else n=this.initCenterX||0,r=this.initCenterY||0;return{x:n,y:r}}isPointInPath(t,e,n){if(t instanceof Sa)return t.isPointInPath(new Path2D(this.toSVGPathD()),e,n);if(this.el instanceof SVGGeometryElement){const r=this.el.getCTM();if(r){const i=r.inverse();return this.el.isPointInFill({x:i.a*e+i.c*n+i.e,y:i.b*e+i.d*n+i.f})}}return!1}isPointInStroke(t,e,n){if(t instanceof Sa)return t.isPointInStroke(new Path2D(this.toSVGPathD()),e,n);if(this.el instanceof SVGGeometryElement){const r=this.el.getCTM();if(r){const i=r.inverse();return this.el.isPointInStroke({x:i.a*e+i.c*n+i.e,y:i.b*e+i.d*n+i.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 r=t[n];r&&r!=this.getAttr(n)&&(this.attrs[Nt(n)]=r,this.shouldUpdateAttrsInDraw=!0)}else e&&e!=this.getAttr(t)&&(this.attrs[Nt(t)]=e,this.shouldUpdateAttrsInDraw=!0)}getAttr(t,e){return this.attrs[t]||this.attrs[Nt(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,r=t.x-this.x,i=t.y-this.y;this.vx=r*n,this.vy=i*n,this.animate(e)}animateSpringTo(t,e){const n=e?.spring||.03;(Array.isArray(t)?t:[t]).forEach(r=>{const i=r.x-this.x,o=r.y-this.y,a=i*n,c=o*n;this.vx+=a,this.vy+=c}),this.animate({friction:.9,...e})}getSpringMassAlphaTo(t,e){const n=e?.springLength||100,r=e?.spring||5e-4,i=t.x-this.x,o=t.y-this.y,a=Math.sqrt(i*i+o*o);if(a<n){const c=i*r,h=o*r;return this.vx+=c/this.mass,this.vy+=h/this.mass,t.vx-=c/t.mass,t.vy-=h/t.mass,1-a/n}return 0}followTo(t,e=3){this.rotateTo(Ut(se(this.x,this.y,t.x,t.y)));const{dx:n,dy:r}=Qe(ut(this.degree),e);this.vx=n,this.vy=r,this.animate()}followAccelerationTo(t,e=.05){this.rotateTo(Ut(se(this.x,this.y,t.x,t.y)));const{dx:n,dy:r}=Qe(ut(this.degree),e);this.ax=n,this.ay=r,this.animate()}gravitateTo(t){const e=t.x-this.x,n=t.y-this.y,r=e*e+n*n,i=Math.sqrt(r),o=this.mass*t.mass/r,a=o*e/i,c=o*n/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,n=t.y-this.y,r=Math.sqrt(e*e+n*n),{x:i,y:o,width:a,height:c}=t.getBoundingClientRect(),{x:h,y:l}=t.getBoundingClientRectCenter(),{x:u,y:d,width:f,height:m}=this.getBoundingClientRect(),{x:p,y:_}=this.getBoundingClientRectCenter();if(r<Math.abs(h-i)+Math.abs(p-u)||r<Math.abs(l-o)+Math.abs(_-d)){const y=Math.atan2(n,e),b={x:0,y:0},v=me(-y,e,n),w=me(-y,this.vx,this.vy),E=me(-y,t.vx,t.vy),C=w.x-E.x;w.x=((this.mass-t.mass)*w.x+2*t.mass*E.x)/(this.mass+t.mass),E.x=C+w.x;const D=Math.abs(w.x)+Math.abs(E.x),$=this.ballRadius+t.ballRadius-Math.abs(b.x-v.x);b.x+=w.x/D*$,v.x+=E.x/D*$;const O=me(y,b.x,b.y),U=me(y,v.x,v.y);t.moveTo(this.x+U.x,this.y+U.y),this.moveTo(this.x+O.x,this.y+O.y);const V=me(y,w.x,w.y),q=me(y,E.x,E.y);this.vx=V.x,this.vy=V.y,t.vx=q.x,t.vy=q.y}}checkWall(t){if(!t?.wall)return;const e=typeof t.wall.bounce=="number"?t.wall.bounce:-1,n=t.wall.x,r=t.wall.y,i=t.wall.x+t.wall.width,o=t.wall.y+t.wall.height,{x:a,y:c,width:h,height:l}=this.getBoundingClientRect();t.wall.cycle||!1?(this.x+a>i?this.moveXTo(n-(a+h)):this.x+a+h<n&&this.moveXTo(i-a),this.y+c>o?this.moveYTo(r-(c+l)):this.y+c+l<r&&this.moveYTo(o-c)):(this.x+a+h>i?(this.moveXTo(i-(a+h)),this.vx*=e):this.x+a<n&&(this.moveXTo(n+(a+h)),this.vx*=e),this.y+c+l>o?(this.moveYTo(o-(c+l)),this.vy*=e):this.y+c<r&&(this.moveYTo(r+(c+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(),r=t*n,i=e*n;return{subPathD:this.transformPathD().getSubPathD(r,i),point:this.getPointAtLength(i)}}strokeDashTween(t=1e3,e){const n=this.pathD().getTotalLength();this.setAttr({strokeDasharray:`${n} ${n}`,strokeDashoffset:`${n}`});const r=e?.onUpdate,i=new ps({frameDuration:t});i.addTween({offset:n},{offset:0},Object.assign(e||{},{onUpdate:(o,a)=>{this.setAttr("strokeDashoffset",""+Z(o.offset,2)),r?.(o,a)}})),i.play()}static generateRosetta(t,e,n,r,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,l=t+2*n*Math.cos(h),u=e+2*n*Math.sin(h);o.push(new da({x:t,y:e,rx:n,ry:r,xAxisRotate:a*c,largeArcFlag:1,sweepFlag:1,toX:l,toY:u})),o.push(new da({x:l,y:u,rx:n,ry:r,xAxisRotate:a*c,largeArcFlag:1,sweepFlag:1,toX:t,toY:e}))}return new _t({initD:Wt.fromLines(o)})}}class te{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,r=0,i=0;const o=new ov(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),n=parseFloat(h.height),t.forceWidth){const m=e/n;r=t.forceWidth,i=r/m}else r=e,i=n;continue}if(h.type!="path"||!rf(h.path))continue;const l={};for(const m in h)m==="type"||m==="path"||m==="transform"||(l[m]=h[m]);const u=af(of(h.path)),d=[];let f=[];for(let m=0,p=u.length;m<p;m++){const _=u[m];f.push(_),_[0].toLowerCase()=="z"&&(d.push(f),f=[])}f.length&&d.push(f),d.forEach(m=>{const p=new _t({attrs:l,initD:m});if(h.transform){const y=au(h.transform).split();p.moveTo(y.x,y.y),p.rotateTo(y.degree),p.scaleTo(y.scaleX,y.scaleY)}this.addShape(p)})}r&&e&&i&&n&&this.comboScale(r/e,i/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 te(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(r=>{r.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(r=>{r.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(c=>{const h=c.getBoundingClientRect(t);e.push(h.x,h.x+h.width),n.push(h.y,h.y+h.height)}),e.length==0||n.length==0)return{x:0,y:0,width:0,height:0};const r=Math.min(...e),i=Math.min(...n),o=Math.max(...e),a=Math.max(...n);return{x:Z(r,t),y:Z(i,t),width:Z(o-r,t),height:Z(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:Z(e.x+e.width*.5,t),y:Z(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 r=t[n];r&&r!=this.getAttr(n)&&(this.attrs[Nt(n)]=r)}this.shapes.forEach(n=>{n.setAttr(t)})}else e&&e!=this.getAttr(t)&&(this.attrs[Nt(t)]=e,this.shapes.forEach(n=>{n.setAttr(t,e)}))}getAttr(t,e){return this.attrs[t]||this.attrs[Nt(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 r=n;r<e;r++){const i=t.shapes[r];this.addShape(new _t({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 n=new ps({frameDuration:t}),r={},i={};this.shapes.forEach((o,a)=>{const c=o.pathD().getTotalLength();r[`offset_${a}`]=c,i[`offset_${a}`]=0,o.setAttr({strokeDasharray:`${c} ${c}`,strokeDashoffset:`${c}`})}),n.addTween(r,i,Object.assign(e||{},{onStart:()=>{e?.onGroupStart?.()},onUpdate:(o,a)=>{for(const c in o){const h=Mi(c).number;this.shapes[h].setAttr("strokeDashoffset",""+Z(o[c],2))}e?.onGroupUpdate?.()},onComplete:()=>{e?.onGroupComplete?.()}})),n.play();break}}}function lv(s,t,e=5){const n=Ai(e);(!n(s.x,t.current.x)||!n(s.y,t.current.y))&&s.followTo(t.current)}function uv(s,t,e){s.drag&&s.drag.enable&&!s.isDragging&&s.animateEaseTo(t,e)}function fv(s,t){const e=[],n=s.length;for(let r=0;r<n;r++){const i=s[r];if(t?.springLength){const o=t?.springLength||100;i.isDragging||s.filter(a=>a.id!==i.id).forEach(a=>{const c=se(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?r>0&&i.animateSpringTo(s[r-1],t):i.animate(t);if(t?.wall&&i.checkWall(t),t?.enableCollision||t?.enableGravityBetweenObjects||t?.enableSpringMassAlpha)for(let o=r+1;o<n;o++)t?.enableCollision&&i.checkCollision(s[o]),t?.enableGravityBetweenObjects&&i.gravitateTo(s[o]),t?.enableSpringMassAlpha&&e.push([i.x,i.y,s[o].x,s[o].y,i.getSpringMassAlphaTo(s[o],t)])}return e}function ff(s){if(s.length<2)throw new Error("shapes个数必须大于等于2");const t=s.length-1,e=new Array(t);for(let r=0;r<t;r++){const i=s[r].transformPathD(),o=s[r+1].transformPathD(),a=i.getPolymorphPoints(),c=o.getPolymorphPoints(),h=a.length>=c.length?a:c;e[r]=Wt.getInterpolator(i.expendToPolymorphPoints(h),o.expendToPolymorphPoints(h))}const n=new _t({initD:""});return r=>{const i=Z(t*r,6),o=Math.min(Math.floor(i),t-1),a=Z(i-o,6);return n.pathD(e[o](a)),n.setAttr(s[o+1].attrs),n}}function dv(s){if(s.length<2)throw new Error("shapeCombos个数必须大于等于2");let t;const e=[];s.forEach(o=>{let a;o instanceof te?(a=o,a.sort()):(a=new te,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((c,h)=>{n[h]=n[h]||[],n[h][a]=c})});const r=[];n.forEach(o=>{r.push(ff(o))});const i=new te;return r.forEach(o=>{i.addShape(o(0))}),o=>(r.forEach(a=>{a(o)}),i)}function mv(s,t=6e3,e){const n=s.findIndex(a=>a instanceof te)>=0?dv(s):ff(s),r=n(0),i=e?.onUpdate,o=new ps({frameDuration:t});return o.addTween({t:0},{t:1},Object.assign(e||{},{onUpdate:(a,c)=>{i?.(a,c),n(a.t),e?.shapeOrCombo?.(r,a.t)}})),o.play(),r}class pv{PARENT_EL;SVG_EL=null;CANVAS_EL=null;ctx=null;rect={x:0,y:0,width:0,height:0};size$=new dl(null);resizeSubscription;mpg=bn();mouseSubscription;shapes=[];shapeTap$=new dl(null);tapSubscription;lastMouseInShapeId="";draggingShapeId="";prevCursor="default";constructor(t=document.documentElement,e="canvas",n=!1){this.PARENT_EL=t,(e=="svg"||e=="canvas")&&pu(this.PARENT_EL),e=="svg"&&(this.SVG_EL=wn("svg"),Un(this.PARENT_EL,this.SVG_EL)),e=="canvas"&&(this.CANVAS_EL=wu("canvas"),Un(this.PARENT_EL,this.CANVAS_EL)),this.resizeSubscription=ua(this.PARENT_EL).subscribe(r=>{this.rect.x=r.x,this.rect.y=r.y,this.rect.width=r.width,this.rect.height=r.height,this.SVG_EL&&Ne(this.SVG_EL,{viewBox:`0 0 ${this.rect.width} ${this.rect.height}`,width:`${this.rect.width}`,height:`${this.rect.height}`}),this.CANVAS_EL&&(Ne(this.CANVAS_EL,{width:`${this.rect.width}`,height:`${this.rect.height}`}),this.ctx=new Sa(this.CANVAS_EL,this.rect.width,this.rect.height,n)),this.size$.next(r)}),this.mouseSubscription=qu(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL,{useMousePoint:this.mpg}).subscribe(()=>{}),this.tapSubscription=Lu(this.PARENT_EL).subscribe(r=>{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(n=>{n instanceof te?e.push(...n.shapes):e.push(n)}),this.SVG_EL&&this.shapes.filter(n=>e.findIndex(r=>r.id==n.id)==-1).forEach(n=>{n.el&&(n.el.remove(),delete n.el)}),sm(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:r}=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,Un(this.SVG_EL,e.el),Ne(e.el,{id:e.id})):(e.el=a||sf(),Un(this.SVG_EL,e.el),Ne(e.el,{id:e.id})),nv(e.el)&&Ne(e.el,{d:e.toSVGPathD()}),e.shouldUpdateSVGElInDraw=!1,e.shouldUpdateAttrsInDraw=!0,e.shouldUpdateStyleInDraw=!0,e.shouldUpdateMInDraw=!0}if(e.shouldUpdateAttrsInDraw&&(th(e.attrs)||Ne(e.el,e.attrs),e.shouldUpdateAttrsInDraw=!1),e.shouldUpdateStyleInDraw&&(th(e.style)||$n(e.el,e.style),e.shouldUpdateStyleInDraw=!1),e.shouldUpdateMInDraw||!e.m){const a=new Yt;a.translate(e.x+(e.parent?.dX||0),e.y+(e.parent?.dY||0)),a.rotate(e.degree,n,r),a.scale(e.scaleX,e.scaleY,n,r),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),Ne(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(ut(e.degree),n,r),this.ctx.scale(e.scaleX,e.scaleY,n,r),e.parent?.dDegree&&this.ctx.rotate(ut(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,Au(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,n=t?.brushColor||"#000000";let r=!1;const i=Or(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL,{start:()=>{r=!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&&(r?this.ctx.lineTo(o.current.x,o.current.y):(r=!0,this.ctx.moveTo(o.current.x,o.current.y)),this.ctx.stroke())});return()=>{i.unsubscribe()}}drawMouseMoveBrush(t){const e=t?.brushSize||10,n=t?.brushDensity||50,r=t?.brushColor||"#000000",i=new ue(r),o=i.r,a=i.g,c=i.b,h=Or(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 m=Math.random()*Math.PI*2,p=Math.random()*e,_=l.current.x+Math.cos(m)*p|0,y=l.current.y+Math.sin(m)*p|0,b=(_+y*u.width)*4;d[b]=o,d[b+1]=a,d[b+2]=c,d[b+3]=255}this.ctx.putImageData(u)}});return()=>{h.unsubscribe()}}downloadSVG=()=>{this.SVG_EL&&sv(this.SVG_EL)}}class vn extends _t{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 vn({...super.getBaseOptions(),lineLength:this.lineLength,startColor:this.startColor,endColor:this.endColor})}lineToAbsolutePoint(t){const e=Ut(se(this.x,this.y,t.x,t.y)),n=Ze(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 _a extends _t{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 _a({...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 Nr extends _t{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 Nr({...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,r=(this.points[0].y+this.points[e-1].y)/2;let i=n,o=r;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,n-i,r-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,r=(this.points[0].y+this.points[e-1].y)/2;t.moveTo(n,r);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,n,r)}}isPointInShape(t){const e=this.points.length;let n=!1;const r=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,l=this.points[o].y;if(a===t.x&&c===t.y||h===t.x&&l===t.y||t.y===c&&t.y===l)return!0;if(t.y>=c&&t.y<l||t.y<c&&t.y>=l){const u=(h-a)/(l-c),d=a+u*(t.y-c);if(d===t.x||Math.abs(d-t.x)<r)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,r){const i=[];for(let o=0;o<r;o++){const a=o/r*2*Math.PI,{dx:c,dy:h}=Qe(a,n);i.push({x:t+c,y:e+h})}return new Nr({points:i})}}class Ca extends te{length=100;constructor(t){super(t);const e=new vn({drag:{followSibling:!0},lineLength:this.length});this.addShape(e);const n=new vn({drag:{followSibling:!0},lineLength:20+Math.random()*20});this.addShape(n,{dX:90-Math.random()*40,dDegree:Math.random()*70});const r=new vn({drag:{followSibling:!0},lineLength:20+Math.random()*20});this.addShape(r,{dX:90-Math.random()*40,dDegree:-Math.random()*70}),this.comboRotate(-90,!0)}cloneShapeCombo(){return new Ca(super.getBaseOptions())}}class jn extends _t{ballRadius;constructor(t){super(t),this.ballRadius=t?.ballRadius||0}cloneShape(){return new jn({...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=wn("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 Bn(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 Ea extends _t{constructor(t){super(t)}cloneShape(){return new Ea({...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 nn extends _t{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 nn({...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=wn("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,r,i,o,a,c){const l=new jt({x:t,y:e,c1x:n,c1y:r,c2x:i,c2y:o,toX:a,toY:c}).getBoundingClientRect();return new nn({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 Ta extends _t{rx;ry;constructor(t){super(t),this.rx=t?.heartRx||10,this.ry=t?.heartRy||10}cloneShape(){return new Ta({...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 Pa extends _t{rx;ry;constructor(t){super(t),this.rx=t?.heartRx||50,this.ry=t?.heartRy||50}cloneShape(){return new Pa({...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 Aa extends _t{r;constructor(t){super(t),this.r=t?.starR||20}cloneShape(){return new Aa({...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,r=this.r*Math.cos(ut(n)),i=this.r*Math.sin(ut(n));t.push(["l",r,i])}return t}}class Ma extends _t{constructor(t){super(t)}cloneShape(){return new Ma({...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 ka extends _t{constructor(t){super(t)}cloneShape(){return new ka({...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 Ia extends _t{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 Ia({...super.getBaseOptions()})}}class Da extends _t{rx;ry;constructor(t){super(t),this.rx=t?.rx||0,this.ry=t?.ry||0}cloneShape(){return new Da({...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=wn("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 Oa extends te{showFlame;flame;ship;constructor(t){super(t),this.showFlame=typeof t?.showFlame=="boolean"?t?.showFlame:!0,this.flame=new _t({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 _t({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 Oa({...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 Ra extends te{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 nn({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 jn({drag:{followSibling:!0},ballRadius:2});this.addShape(n);const r=new jn({drag:{followSibling:!0},ballRadius:2});this.addShape(r,{dX:0+this.width})}cloneShapeCombo(){return new Ra({...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(ut(t.degree))*this.width,y:t.y+Math.sin(ut(t.degree))*this.width}}}class La extends te{options;value$=new qe;subscription;constructor(t){super(t),this.options=t;const e=t?.sliderMin||0,n=t?.sliderMax||100,r=t?.sliderStep||1,i=em(e,n,r),o=i(typeof t?.sliderDefaultValue=="number"?K(t.sliderDefaultValue,e,n):e);this.value$.next(o);const a=o/(n-e),c=t?.sliderWidth||100,h=t?.sliderHeight||4,l=h*.5,u=h*2.5,d=t?.sliderBackgroundColor||"#f5f5f5",f=t?.sliderForegroundColor||"#5a82f0",m=new nn({rectWidth:c,rectHeight:h,rectBorderRadius:l,attrs:{fill:d},drag:{enable:!1}});this.addShape(m);const p=new nn({rectWidth:c*a,rectHeight:h,rectBorderRadius:l,attrs:{fill:f},drag:{enable:!1}});this.addShape(p);const _=new jn({x:c*a,y:l,ballRadius:u,attrs:{fill:f},drag:{enable:!0,alongPath:new Wt([["m",0,0],["l",c,0]])}});this.addShape(_),this.subscription=_.transform$.subscribe(({dX:y})=>{console.log(y);const b=(_.x-m.x)/c;p.update({rectWidth:c*b}),this.value$.next(i(b*(n-e)+e))})}destroy(){super.destroy(),this.subscription.unsubscribe()}cloneShapeCombo(){return new La({...super.getBaseOptions(),...this.options})}}class Cs extends _t{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,r=(t.endDegree-t.startDegree-180)/2;if(t.radius)this.radius=t.radius;else if(this.half){const i=Math.min(e/2,n)-this.lineWidth;this.radius=Math.max(0,i-i*Math.sin(ut(r)))}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(ut(r)):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}=Qe(ut(this.startDegree),this.radius),{dx:n,dy:r}=Qe(ut(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,r-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),r=this.radius*Math.sin(Math.PI*this.percent);e=t.createLinearGradient(-this.radius,0,-this.radius+n,-r,{0:this.startColor,1:this.endColor})}else{const n=this.radius*Math.sin(2*Math.PI*this.percent),r=this.radius*Math.cos(2*Math.PI*this.percent);e=t.createLinearGradient(0,-this.radius,n,-r,{0:this.startColor,1:this.endColor})}this.setAttr({stroke:e})}t.beginPath(),t.arc(0,0,this.radius,ut(this.startDegree),ut(this.percentDegree),!1)}}class za extends te{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 i=this.ringBg.radius-20-17;for(let o=0;o<this.indicatorLineCount;o++){const a=new vn({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(ut(c))*i,dY:this.ringBg.y+Math.sin(ut(c))*i,dDegree:c})}}this.setPercent(t.percent||0)}cloneShapeCombo(){return new za({...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 Xn extends _t{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=Mi(this.getAttr("fontSize"),10).number,n=Mi(this.getAttr("fontWeight"),400).number,r=Xn.measureText(this.text,e,n);this.width=r.width,this.height=r.height}cloneShape(){return new Xn({...super.getBaseOptions(),text:this.text})}toSVGEl(){const t=wn("text");t.setAttribute("x","0"),t.setAttribute("y","0"),t.style.alignmentBaseline="middle";const e=this.text.split(`
86
- `);if(e.length<=1)t.innerHTML=this.text;else{const n=this.getAttr("line-height","1.2em");e.forEach((r,i)=>{if(r.trim()){const o=wn("tspan");o.setAttribute("x","0"),o.setAttribute("dy",i>0?n:"0"),o.innerHTML=r.trim(),o.style.alignmentBaseline="middle",t.append(o)}})}return t}toSVGPathData(){return[]}toCanvasContext(t){const e=this.text.split(`
87
- `);if(e.length<=1)t.fillText(this.text,0,0);else{const n=t.measureText(this.text),i=(n.actualBoundingBoxAscent+n.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,n=400){const r=document.createElement("span");r.style.visibility="hidden",r.style.margin="0",r.style.padding="0",r.style.inset="0",r.style.whiteSpace="nowrap",r.style.overflow="visible",r.style.fontSize=e+"px",r.style.fontWeight=n.toString(),r.innerText=t,document.body.appendChild(r);const i=r.offsetWidth,o=r.offsetHeight;return document.body.removeChild(r),{width:i,height:o}}static getFixedWidthText(t,e,n=12,r=400,i="..."){let o="";if(!t||e<n)return o;const a=t.split("");let c=i?Xn.measureText(i,n,r).width:0;for(let h=0,l=a.length;h<l;h++)if(c+=Xn.measureText(a[h],n,r).width,c>e){i&&(o+=i);break}else o+=a[h];return o}}class Na extends te{options;constructor(t){super(t),this.options=t;const{shapeCreator:e,width:n,height:r,x:i,y:o,particleCount:a,angle:c,spread:h,startVelocity:l,decay:u,gravity:d,drift:f,ticks:m,colors:p,scalar:_,flat:y}=Object.assign({shapeCreator:()=>new nn({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:lp,scalar:1,flat:!1},t||{}),b=(C,D)=>{C.x=n*i,C.y=r*o,C.scaleX=_,C.scaleY=_;const $=p[D%p.length];C.setAttr({fill:$}),C.interactive=!1,C.wobble=Math.random()*10,C.wobbleSpeed=Math.min(.11,Math.random()*.1+.05),C.velocity=l*.5+Math.random()*l,C.angle2D=-v+(.5*w-Math.random()*w),C.tiltAngle=(Math.random()*(.75-.25)+.25)*Math.PI,C.tick=0,C.totalTicks=m,C.decay=u,C.drift=f,C.random=Math.random()+2,C.tiltSin=0,C.tiltCos=0,C.wobbleX=0,C.wobbleY=0,C.gravity=d*3,C.scalar=_,C.flat=y,C.color=new ue($)},v=ut(c),w=ut(h);let E=a;for(;E;){const C=e();b(C,E),C.clone=(D=>()=>{const $=e();return b($,D),$})(E),this.addShape(C),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,r=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=Ut(Math.PI/10*t.wobble),t.scaleX=Math.abs(i-n)*.1,t.scaleY=Math.abs(o-r)*.1,t.tick<t.totalTicks}),this.shapes.length>0}}function df(s,t={attributes:!0,childList:!0,subtree:!0}){return new Mt(e=>{const n=new MutationObserver((r,i)=>{e.next(r)});return n.observe(s,t),()=>{n.disconnect()}})}function gv(s,t){return new Promise(e=>{new MutationObserver((r,i)=>{for(const o of r)o.type==="childList"&&o.addedNodes.forEach(a=>{a.isEqualNode(t)&&(i.disconnect(),e(!0))})}).observe(s,{childList:!0})})}function mf(s,t={root:null}){return new Mt(e=>{const n=new IntersectionObserver((r,i)=>{if(r.length){const o=r[r.length-1];o&&e.next(o)}},t);return n.observe(s),()=>{n.unobserve(s),n.disconnect()}})}function yv(s,t){return Hu().pipe(mn(null),kt(()=>{const{width:e,height:n}=t?.root?.getBoundingClientRect()||aa(),{top:r,left:i,right:o,bottom:a}=s.getBoundingClientRect();return(r>=0&&r<=n||a>=0&&a<=n)&&(i>=0&&i<=e||o>=0&&o<=e)}),He())}function bv(s,t){const e=typeof t?.threshold=="number"?t.threshold:.5;return mf(s,{threshold:e,root:t?.root}).pipe(kt(n=>n.isIntersecting&&n.intersectionRatio>=e),He())}let pf=!1;function wv(){pf||(pf=!0,Eu(`
121
+ })`}class lr{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"),s=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)",s.append(i),e.width="5",e.style.cssText="position: absolute; visibility: hidden;",document.documentElement.append(e),e.contentDocument?.body.append(s),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(()=>{lr.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 yy={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,s,i){var r=["","webkit","Moz","MS","ms","o"],o=e.createElement("div"),a="function",c=Math.round,h=Math.abs,u=Date.now;function l(C,A,M){return setTimeout(x(C,M),A)}function f(C,A,M){return Array.isArray(C)?(d(C,M[A],M),!0):!1}function d(C,A,M){var k;if(C)if(C.forEach)C.forEach(A,M);else if(C.length!==i)for(k=0;k<C.length;)A.call(M,C[k],k,C),k++;else for(k in C)C.hasOwnProperty(k)&&A.call(M,C[k],k,C)}function p(C,A,M){var k="DEPRECATED METHOD: "+A+`
126
+ `+M+` AT
127
+ `;return function(){var j=new Error("get-stack-trace"),K=j&&j.stack?j.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",xt=t.console&&(t.console.warn||t.console.log);return xt&&xt.call(t.console,k,K),C.apply(this,arguments)}}var m;typeof Object.assign!="function"?m=function(A){if(A===i||A===null)throw new TypeError("Cannot convert undefined or null to object");for(var M=Object(A),k=1;k<arguments.length;k++){var j=arguments[k];if(j!==i&&j!==null)for(var K in j)j.hasOwnProperty(K)&&(M[K]=j[K])}return M}:m=Object.assign;var y=p(function(A,M,k){for(var j=Object.keys(M),K=0;K<j.length;)(!k||k&&A[j[K]]===i)&&(A[j[K]]=M[j[K]]),K++;return A},"extend","Use `assign`."),g=p(function(A,M){return y(A,M,!0)},"merge","Use `assign`.");function v(C,A,M){var k=A.prototype,j;j=C.prototype=Object.create(k),j.constructor=C,j._super=k,M&&m(j,M)}function x(C,A){return function(){return C.apply(A,arguments)}}function b(C,A){return typeof C==a?C.apply(A&&A[0]||i,A):C}function E(C,A){return C===i?A:C}function _(C,A,M){d(N(A),function(k){C.addEventListener(k,M,!1)})}function D(C,A,M){d(N(A),function(k){C.removeEventListener(k,M,!1)})}function V(C,A){for(;C;){if(C==A)return!0;C=C.parentNode}return!1}function O(C,A){return C.indexOf(A)>-1}function N(C){return C.trim().split(/\s+/g)}function U(C,A,M){if(C.indexOf&&!M)return C.indexOf(A);for(var k=0;k<C.length;){if(M&&C[k][M]==A||!M&&C[k]===A)return k;k++}return-1}function Y(C){return Array.prototype.slice.call(C,0)}function st(C,A,M){for(var k=[],j=[],K=0;K<C.length;){var xt=A?C[K][A]:C[K];U(j,xt)<0&&k.push(C[K]),j[K]=xt,K++}return M&&(A?k=k.sort(function(re,be){return re[A]>be[A]}):k=k.sort()),k}function it(C,A){for(var M,k,j=A[0].toUpperCase()+A.slice(1),K=0;K<r.length;){if(M=r[K],k=M?M+j:A,k in C)return k;K++}return i}var nt=1;function et(){return nt++}function ct(C){var A=C.ownerDocument||C;return A.defaultView||A.parentWindow||t}var ht=/mobile|tablet|ip(ad|hone|od)|android/i,B="ontouchstart"in t,z=it(t,"PointerEvent")!==i,P=B&&ht.test(navigator.userAgent),I="touch",G="pen",X="mouse",dt="kinect",vt=25,J=1,Et=2,lt=4,Dt=8,In=1,hn=2,un=4,qe=8,F=16,Rt=hn|un,Gt=qe|F,Mr=Rt|Gt,Ha=["x","y"],mt=["clientX","clientY"];function ie(C,A){var M=this;this.manager=C,this.callback=A,this.element=C.element,this.target=C.options.inputTarget,this.domHandler=function(k){b(C.options.enable,[C])&&M.handler(k)},this.init()}ie.prototype={handler:function(){},init:function(){this.evEl&&_(this.element,this.evEl,this.domHandler),this.evTarget&&_(this.target,this.evTarget,this.domHandler),this.evWin&&_(ct(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&D(this.element,this.evEl,this.domHandler),this.evTarget&&D(this.target,this.evTarget,this.domHandler),this.evWin&&D(ct(this.element),this.evWin,this.domHandler)}};function qa(C){var A,M=C.options.inputClass;return M?A=M:z?A=yt:P?A=ec:B?A=$f:A=S,new A(C,Ka)}function Ka(C,A,M){var k=M.pointers.length,j=M.changedPointers.length,K=A&J&&k-j===0,xt=A&(lt|Dt)&&k-j===0;M.isFirst=!!K,M.isFinal=!!xt,K&&(C.session={}),M.eventType=A,Ja(C,M),C.emit("hammer.input",M),C.recognize(M),C.session.prevInput=M}function Ja(C,A){var M=C.session,k=A.pointers,j=k.length;M.firstInput||(M.firstInput=Qa(A)),j>1&&!M.firstMultiple?M.firstMultiple=Qa(A):j===1&&(M.firstMultiple=!1);var K=M.firstInput,xt=M.firstMultiple,Zt=xt?xt.center:K.center,re=A.center=Dr(k);A.timeStamp=u(),A.deltaTime=A.timeStamp-K.timeStamp,A.angle=as(Zt,re),A.distance=ks(Zt,re),Za(M,A),A.offsetDirection=Or(A.deltaX,A.deltaY);var be=Rr(A.deltaTime,A.deltaX,A.deltaY);A.overallVelocityX=be.x,A.overallVelocityY=be.y,A.overallVelocity=h(be.x)>h(be.y)?be.x:be.y,A.scale=xt?yi(xt.pointers,k):1,A.rotation=xt?gi(xt.pointers,k):0,A.maxPointers=M.prevInput?A.pointers.length>M.prevInput.maxPointers?A.pointers.length:M.prevInput.maxPointers:A.pointers.length,Ff(M,A);var fn=C.element;V(A.srcEvent.target,fn)&&(fn=A.srcEvent.target),A.target=fn}function Za(C,A){var M=A.center,k=C.offsetDelta||{},j=C.prevDelta||{},K=C.prevInput||{};(A.eventType===J||K.eventType===lt)&&(j=C.prevDelta={x:K.deltaX||0,y:K.deltaY||0},k=C.offsetDelta={x:M.x,y:M.y}),A.deltaX=j.x+(M.x-k.x),A.deltaY=j.y+(M.y-k.y)}function Ff(C,A){var M=C.lastInterval||A,k=A.timeStamp-M.timeStamp,j,K,xt,Zt;if(A.eventType!=Dt&&(k>vt||M.velocity===i)){var re=A.deltaX-M.deltaX,be=A.deltaY-M.deltaY,fn=Rr(k,re,be);K=fn.x,xt=fn.y,j=h(fn.x)>h(fn.y)?fn.x:fn.y,Zt=Or(re,be),C.lastInterval=A}else j=M.velocity,K=M.velocityX,xt=M.velocityY,Zt=M.direction;A.velocity=j,A.velocityX=K,A.velocityY=xt,A.direction=Zt}function Qa(C){for(var A=[],M=0;M<C.pointers.length;)A[M]={clientX:c(C.pointers[M].clientX),clientY:c(C.pointers[M].clientY)},M++;return{timeStamp:u(),pointers:A,center:Dr(A),deltaX:C.deltaX,deltaY:C.deltaY}}function Dr(C){var A=C.length;if(A===1)return{x:c(C[0].clientX),y:c(C[0].clientY)};for(var M=0,k=0,j=0;j<A;)M+=C[j].clientX,k+=C[j].clientY,j++;return{x:c(M/A),y:c(k/A)}}function Rr(C,A,M){return{x:A/C||0,y:M/C||0}}function Or(C,A){return C===A?In:h(C)>=h(A)?C<0?hn:un:A<0?qe:F}function ks(C,A,M){M||(M=Ha);var k=A[M[0]]-C[M[0]],j=A[M[1]]-C[M[1]];return Math.sqrt(k*k+j*j)}function as(C,A,M){M||(M=Ha);var k=A[M[0]]-C[M[0]],j=A[M[1]]-C[M[1]];return Math.atan2(j,k)*180/Math.PI}function gi(C,A){return as(A[1],A[0],mt)+as(C[1],C[0],mt)}function yi(C,A){return ks(A[0],A[1],mt)/ks(C[0],C[1],mt)}var Ir={mousedown:J,mousemove:Et,mouseup:lt},tc="mousedown",Ls="mousemove mouseup";function S(){this.evEl=tc,this.evWin=Ls,this.pressed=!1,ie.apply(this,arguments)}v(S,ie,{handler:function(A){var M=Ir[A.type];M&J&&A.button===0&&(this.pressed=!0),M&Et&&A.which!==1&&(M=lt),this.pressed&&(M&lt&&(this.pressed=!1),this.callback(this.manager,M,{pointers:[A],changedPointers:[A],pointerType:X,srcEvent:A}))}});var R={pointerdown:J,pointermove:Et,pointerup:lt,pointercancel:Dt,pointerout:Dt},$={2:I,3:G,4:X,5:dt},W="pointerdown",Q="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(W="MSPointerDown",Q="MSPointerMove MSPointerUp MSPointerCancel");function yt(){this.evEl=W,this.evWin=Q,ie.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}v(yt,ie,{handler:function(A){var M=this.store,k=!1,j=A.type.toLowerCase().replace("ms",""),K=R[j],xt=$[A.pointerType]||A.pointerType,Zt=xt==I,re=U(M,A.pointerId,"pointerId");K&J&&(A.button===0||Zt)?re<0&&(M.push(A),re=M.length-1):K&(lt|Dt)&&(k=!0),!(re<0)&&(M[re]=A,this.callback(this.manager,K,{pointers:M,changedPointers:[A],pointerType:xt,srcEvent:A}),k&&M.splice(re,1))}});var gt={touchstart:J,touchmove:Et,touchend:lt,touchcancel:Dt},Pt="touchstart",bt="touchstart touchmove touchend touchcancel";function Ke(){this.evTarget=Pt,this.evWin=bt,this.started=!1,ie.apply(this,arguments)}v(Ke,ie,{handler:function(A){var M=gt[A.type];if(M===J&&(this.started=!0),!!this.started){var k=cs.call(this,A,M);M&(lt|Dt)&&k[0].length-k[1].length===0&&(this.started=!1),this.callback(this.manager,M,{pointers:k[0],changedPointers:k[1],pointerType:I,srcEvent:A})}}});function cs(C,A){var M=Y(C.touches),k=Y(C.changedTouches);return A&(lt|Dt)&&(M=st(M.concat(k),"identifier",!0)),[M,k]}var Bf={touchstart:J,touchmove:Et,touchend:lt,touchcancel:Dt},jf="touchstart touchmove touchend touchcancel";function ec(){this.evTarget=jf,this.targetIds={},ie.apply(this,arguments)}v(ec,ie,{handler:function(A){var M=Bf[A.type],k=Xk.call(this,A,M);k&&this.callback(this.manager,M,{pointers:k[0],changedPointers:k[1],pointerType:I,srcEvent:A})}});function Xk(C,A){var M=Y(C.touches),k=this.targetIds;if(A&(J|Et)&&M.length===1)return k[M[0].identifier]=!0,[M,M];var j,K,xt=Y(C.changedTouches),Zt=[],re=this.target;if(K=M.filter(function(be){return V(be.target,re)}),A===J)for(j=0;j<K.length;)k[K[j].identifier]=!0,j++;for(j=0;j<xt.length;)k[xt[j].identifier]&&Zt.push(xt[j]),A&(lt|Dt)&&delete k[xt[j].identifier],j++;if(Zt.length)return[st(K.concat(Zt),"identifier",!0),Zt]}var Wk=2500,yb=25;function $f(){ie.apply(this,arguments);var C=x(this.handler,this);this.touch=new ec(this.manager,C),this.mouse=new S(this.manager,C),this.primaryTouch=null,this.lastTouches=[]}v($f,ie,{handler:function(A,M,k){var j=k.pointerType==I,K=k.pointerType==X;if(!(K&&k.sourceCapabilities&&k.sourceCapabilities.firesTouchEvents)){if(j)Hk.call(this,M,k);else if(K&&qk.call(this,k))return;this.callback(A,M,k)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function Hk(C,A){C&J?(this.primaryTouch=A.changedPointers[0].identifier,vb.call(this,A)):C&(lt|Dt)&&vb.call(this,A)}function vb(C){var A=C.changedPointers[0];if(A.identifier===this.primaryTouch){var M={x:A.clientX,y:A.clientY};this.lastTouches.push(M);var k=this.lastTouches,j=function(){var K=k.indexOf(M);K>-1&&k.splice(K,1)};setTimeout(j,Wk)}}function qk(C){for(var A=C.srcEvent.clientX,M=C.srcEvent.clientY,k=0;k<this.lastTouches.length;k++){var j=this.lastTouches[k],K=Math.abs(A-j.x),xt=Math.abs(M-j.y);if(K<=yb&&xt<=yb)return!0}return!1}var bb=it(o.style,"touchAction"),wb=bb!==i,xb="compute",Sb="auto",Uf="manipulation",Vs="none",kr="pan-x",Lr="pan-y",nc=Jk();function Yf(C,A){this.manager=C,this.set(A)}Yf.prototype={set:function(C){C==xb&&(C=this.compute()),wb&&this.manager.element.style&&nc[C]&&(this.manager.element.style[bb]=C),this.actions=C.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var C=[];return d(this.manager.recognizers,function(A){b(A.options.enable,[A])&&(C=C.concat(A.getTouchAction()))}),Kk(C.join(" "))},preventDefaults:function(C){var A=C.srcEvent,M=C.offsetDirection;if(this.manager.session.prevented){A.preventDefault();return}var k=this.actions,j=O(k,Vs)&&!nc[Vs],K=O(k,Lr)&&!nc[Lr],xt=O(k,kr)&&!nc[kr];if(j){var Zt=C.pointers.length===1,re=C.distance<2,be=C.deltaTime<250;if(Zt&&re&&be)return}if(!(xt&&K)&&(j||K&&M&Rt||xt&&M&Gt))return this.preventSrc(A)},preventSrc:function(C){this.manager.session.prevented=!0,C.preventDefault()}};function Kk(C){if(O(C,Vs))return Vs;var A=O(C,kr),M=O(C,Lr);return A&&M?Vs:A||M?A?kr:Lr:O(C,Uf)?Uf:Sb}function Jk(){if(!wb)return!1;var C={},A=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(M){C[M]=A?t.CSS.supports("touch-action",M):!0}),C}var sc=1,Fe=2,vi=4,hs=8,kn=hs,Vr=16,ln=32;function Ln(C){this.options=m({},this.defaults,C||{}),this.id=et(),this.manager=null,this.options.enable=E(this.options.enable,!0),this.state=sc,this.simultaneous={},this.requireFail=[]}Ln.prototype={defaults:{},set:function(C){return m(this.options,C),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(C){if(f(C,"recognizeWith",this))return this;var A=this.simultaneous;return C=ic(C,this),A[C.id]||(A[C.id]=C,C.recognizeWith(this)),this},dropRecognizeWith:function(C){return f(C,"dropRecognizeWith",this)?this:(C=ic(C,this),delete this.simultaneous[C.id],this)},requireFailure:function(C){if(f(C,"requireFailure",this))return this;var A=this.requireFail;return C=ic(C,this),U(A,C)===-1&&(A.push(C),C.requireFailure(this)),this},dropRequireFailure:function(C){if(f(C,"dropRequireFailure",this))return this;C=ic(C,this);var A=U(this.requireFail,C);return A>-1&&this.requireFail.splice(A,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(C){return!!this.simultaneous[C.id]},emit:function(C){var A=this,M=this.state;function k(j){A.manager.emit(j,C)}M<hs&&k(A.options.event+_b(M)),k(A.options.event),C.additionalEvent&&k(C.additionalEvent),M>=hs&&k(A.options.event+_b(M))},tryEmit:function(C){if(this.canEmit())return this.emit(C);this.state=ln},canEmit:function(){for(var C=0;C<this.requireFail.length;){if(!(this.requireFail[C].state&(ln|sc)))return!1;C++}return!0},recognize:function(C){var A=m({},C);if(!b(this.options.enable,[this,A])){this.reset(),this.state=ln;return}this.state&(kn|Vr|ln)&&(this.state=sc),this.state=this.process(A),this.state&(Fe|vi|hs|Vr)&&this.tryEmit(A)},process:function(C){},getTouchAction:function(){},reset:function(){}};function _b(C){return C&Vr?"cancel":C&hs?"end":C&vi?"move":C&Fe?"start":""}function Eb(C){return C==F?"down":C==qe?"up":C==hn?"left":C==un?"right":""}function ic(C,A){var M=A.manager;return M?M.get(C):C}function Je(){Ln.apply(this,arguments)}v(Je,Ln,{defaults:{pointers:1},attrTest:function(C){var A=this.options.pointers;return A===0||C.pointers.length===A},process:function(C){var A=this.state,M=C.eventType,k=A&(Fe|vi),j=this.attrTest(C);return k&&(M&Dt||!j)?A|Vr:k||j?M&lt?A|hs:A&Fe?A|vi:Fe:ln}});function rc(){Je.apply(this,arguments),this.pX=null,this.pY=null}v(rc,Je,{defaults:{event:"pan",threshold:10,pointers:1,direction:Mr},getTouchAction:function(){var C=this.options.direction,A=[];return C&Rt&&A.push(Lr),C&Gt&&A.push(kr),A},directionTest:function(C){var A=this.options,M=!0,k=C.distance,j=C.direction,K=C.deltaX,xt=C.deltaY;return j&A.direction||(A.direction&Rt?(j=K===0?In:K<0?hn:un,M=K!=this.pX,k=Math.abs(C.deltaX)):(j=xt===0?In:xt<0?qe:F,M=xt!=this.pY,k=Math.abs(C.deltaY))),C.direction=j,M&&k>A.threshold&&j&A.direction},attrTest:function(C){return Je.prototype.attrTest.call(this,C)&&(this.state&Fe||!(this.state&Fe)&&this.directionTest(C))},emit:function(C){this.pX=C.deltaX,this.pY=C.deltaY;var A=Eb(C.direction);A&&(C.additionalEvent=this.options.event+A),this._super.emit.call(this,C)}});function Gf(){Je.apply(this,arguments)}v(Gf,Je,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Vs]},attrTest:function(C){return this._super.attrTest.call(this,C)&&(Math.abs(C.scale-1)>this.options.threshold||this.state&Fe)},emit:function(C){if(C.scale!==1){var A=C.scale<1?"in":"out";C.additionalEvent=this.options.event+A}this._super.emit.call(this,C)}});function Xf(){Ln.apply(this,arguments),this._timer=null,this._input=null}v(Xf,Ln,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Sb]},process:function(C){var A=this.options,M=C.pointers.length===A.pointers,k=C.distance<A.threshold,j=C.deltaTime>A.time;if(this._input=C,!k||!M||C.eventType&(lt|Dt)&&!j)this.reset();else if(C.eventType&J)this.reset(),this._timer=l(function(){this.state=kn,this.tryEmit()},A.time,this);else if(C.eventType&lt)return kn;return ln},reset:function(){clearTimeout(this._timer)},emit:function(C){this.state===kn&&(C&&C.eventType&lt?this.manager.emit(this.options.event+"up",C):(this._input.timeStamp=u(),this.manager.emit(this.options.event,this._input)))}});function Wf(){Je.apply(this,arguments)}v(Wf,Je,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Vs]},attrTest:function(C){return this._super.attrTest.call(this,C)&&(Math.abs(C.rotation)>this.options.threshold||this.state&Fe)}});function Hf(){Je.apply(this,arguments)}v(Hf,Je,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Rt|Gt,pointers:1},getTouchAction:function(){return rc.prototype.getTouchAction.call(this)},attrTest:function(C){var A=this.options.direction,M;return A&(Rt|Gt)?M=C.overallVelocity:A&Rt?M=C.overallVelocityX:A&Gt&&(M=C.overallVelocityY),this._super.attrTest.call(this,C)&&A&C.offsetDirection&&C.distance>this.options.threshold&&C.maxPointers==this.options.pointers&&h(M)>this.options.velocity&&C.eventType&lt},emit:function(C){var A=Eb(C.offsetDirection);A&&this.manager.emit(this.options.event+A,C),this.manager.emit(this.options.event,C)}});function oc(){Ln.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}v(oc,Ln,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Uf]},process:function(C){var A=this.options,M=C.pointers.length===A.pointers,k=C.distance<A.threshold,j=C.deltaTime<A.time;if(this.reset(),C.eventType&J&&this.count===0)return this.failTimeout();if(k&&j&&M){if(C.eventType!=lt)return this.failTimeout();var K=this.pTime?C.timeStamp-this.pTime<A.interval:!0,xt=!this.pCenter||ks(this.pCenter,C.center)<A.posThreshold;this.pTime=C.timeStamp,this.pCenter=C.center,!xt||!K?this.count=1:this.count+=1,this._input=C;var Zt=this.count%A.taps;if(Zt===0)return this.hasRequireFailures()?(this._timer=l(function(){this.state=kn,this.tryEmit()},A.interval,this),Fe):kn}return ln},failTimeout:function(){return this._timer=l(function(){this.state=ln},this.options.interval,this),ln},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==kn&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function Vn(C,A){return A=A||{},A.recognizers=E(A.recognizers,Vn.defaults.preset),new qf(C,A)}Vn.VERSION="2.0.7",Vn.defaults={domEvents:!1,touchAction:xb,enable:!0,inputTarget:null,inputClass:null,preset:[[Wf,{enable:!1}],[Gf,{enable:!1},["rotate"]],[Hf,{direction:Rt}],[rc,{direction:Rt},["swipe"]],[oc],[oc,{event:"doubletap",taps:2},["tap"]],[Xf]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var Zk=1,Tb=2;function qf(C,A){this.options=m({},Vn.defaults,A||{}),this.options.inputTarget=this.options.inputTarget||C,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=C,this.input=qa(this),this.touchAction=new Yf(this,this.options.touchAction),Cb(this,!0),d(this.options.recognizers,function(M){var k=this.add(new M[0](M[1]));M[2]&&k.recognizeWith(M[2]),M[3]&&k.requireFailure(M[3])},this)}qf.prototype={set:function(C){return m(this.options,C),C.touchAction&&this.touchAction.update(),C.inputTarget&&(this.input.destroy(),this.input.target=C.inputTarget,this.input.init()),this},stop:function(C){this.session.stopped=C?Tb:Zk},recognize:function(C){var A=this.session;if(!A.stopped){this.touchAction.preventDefaults(C);var M,k=this.recognizers,j=A.curRecognizer;(!j||j&&j.state&kn)&&(j=A.curRecognizer=null);for(var K=0;K<k.length;)M=k[K],A.stopped!==Tb&&(!j||M==j||M.canRecognizeWith(j))?M.recognize(C):M.reset(),!j&&M.state&(Fe|vi|hs)&&(j=A.curRecognizer=M),K++}},get:function(C){if(C instanceof Ln)return C;for(var A=this.recognizers,M=0;M<A.length;M++)if(A[M].options.event==C)return A[M];return null},add:function(C){if(f(C,"add",this))return this;var A=this.get(C.options.event);return A&&this.remove(A),this.recognizers.push(C),C.manager=this,this.touchAction.update(),C},remove:function(C){if(f(C,"remove",this))return this;if(C=this.get(C),C){var A=this.recognizers,M=U(A,C);M!==-1&&(A.splice(M,1),this.touchAction.update())}return this},on:function(C,A){if(C!==i&&A!==i){var M=this.handlers;return d(N(C),function(k){M[k]=M[k]||[],M[k].push(A)}),this}},off:function(C,A){if(C!==i){var M=this.handlers;return d(N(C),function(k){A?M[k]&&M[k].splice(U(M[k],A),1):delete M[k]}),this}},emit:function(C,A){this.options.domEvents&&Qk(C,A);var M=this.handlers[C]&&this.handlers[C].slice();if(!(!M||!M.length)){A.type=C,A.preventDefault=function(){A.srcEvent.preventDefault()};for(var k=0;k<M.length;)M[k](A),k++}},destroy:function(){this.element&&Cb(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function Cb(C,A){var M=C.element;if(M.style){var k;d(C.options.cssProps,function(j,K){k=it(M.style,K),A?(C.oldCssProps[k]=M.style[k],M.style[k]=j):M.style[k]=C.oldCssProps[k]||""}),A||(C.oldCssProps={})}}function Qk(C,A){var M=e.createEvent("Event");M.initEvent(C,!0,!0),M.gesture=A,A.target.dispatchEvent(M)}m(Vn,{INPUT_START:J,INPUT_MOVE:Et,INPUT_END:lt,INPUT_CANCEL:Dt,STATE_POSSIBLE:sc,STATE_BEGAN:Fe,STATE_CHANGED:vi,STATE_ENDED:hs,STATE_RECOGNIZED:kn,STATE_CANCELLED:Vr,STATE_FAILED:ln,DIRECTION_NONE:In,DIRECTION_LEFT:hn,DIRECTION_RIGHT:un,DIRECTION_UP:qe,DIRECTION_DOWN:F,DIRECTION_HORIZONTAL:Rt,DIRECTION_VERTICAL:Gt,DIRECTION_ALL:Mr,Manager:qf,Input:ie,TouchAction:Yf,TouchInput:ec,MouseInput:S,PointerEventInput:yt,TouchMouseInput:$f,SingleTouchInput:Ke,Recognizer:Ln,AttrRecognizer:Je,Tap:oc,Pan:rc,Swipe:Hf,Pinch:Gf,Rotate:Wf,Press:Xf,on:_,off:D,each:d,merge:g,extend:y,assign:m,inherit:v,bindFn:x,prefixed:it});var t5=typeof t<"u"?t:typeof self<"u"?self:{};t5.Hammer=Vn,typeof i=="function"&&i.amd?i(function(){return Vn}):n.exports?n.exports=Vn:t[s]=Vn})(window,document,"Hammer")})(yy);var _A=yy.exports;const Ft=Kc(_A);async function vy(n,t){return new Promise(e=>{const s=new ResizeObserver(i=>{const r=n.getBoundingClientRect();t(r),e(()=>{s.unobserve(n)})});s.observe(n)})}function ll(n=document.documentElement,t){return new Nt(e=>{const s=n.getBoundingClientRect();let i=s.x,r=s.y,o=s.width,a=s.height;e.next(s);const c=new ResizeObserver(h=>{const u=n.getBoundingClientRect();(i!=u.x||r!=u.y||o!=u.width||a!=u.height)&&(i=u.x,r=u.y,o=u.width,a=u.height,e.next(u))});return c.observe(n,t),()=>{c.unobserve(n),c.disconnect()}})}function EA(){return ot(window,"orientationchange"in window?"orientationchange":"resize").pipe(zt(n=>({width:n.target.innerWidth,height:n.target.innerHeight})),vs({width:window.innerWidth,height:window.innerHeight}))}function TA(){return"ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0}function CA(){return!!window.PointerEvent}function PA(n,t){let e=document.createElement(n);t="on"+t;let s=t in e;return s||(e.setAttribute(t,"return;"),s=typeof e[t]=="function"),e=null,s}function fl(){return{x:0,y:0,isDown:!1}}function Ps(){const n=fl(),t=fl();return{start:n,current:t,setStart:function(e,s){n.x=e.x,n.y=e.y,n.isDown=typeof s=="boolean"?s:typeof e.isDown=="boolean"?e.isDown:!1,this.setCurrent(e,s)},setCurrent:(e,s)=>{t.x=e.x,t.y=e.y,t.isDown=typeof s=="boolean"?s:typeof e.isDown=="boolean"?e.isDown:!1}}}function ga(n=document.documentElement,t=!1){return ot(n,"mousemove",t)}function by(n=document.documentElement,t=!1){return ot(n,"mousedown",t)}function wy(n=document.documentElement,t=!1){return ot(n,"mouseup",t)}function AA(n=document.documentElement,t=!1){return ot(n,"mouseover",t)}function MA(n=document.documentElement,t=!1){return ot(n,"mouseout",t)}function DA(n=document.documentElement,t=!1){return ot(n,"mouseenter",t)}function RA(n=document.documentElement,t=!1){return ot(n,"mouseleave",t)}function OA(n=document.documentElement,t=!1){return ot(n,"click",t)}function IA(n=document.documentElement,t=!1){return ot(n,"dblclick",t)}function kA(n=document.documentElement,t=!1){return ot(n,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",t)}function LA(n=document.documentElement,t=!1){return ot(n,"contextmenu",t)}function xy(n=document.documentElement,t=!1){return ot(n,"touchmove",t)}function Sy(n=document.documentElement,t=!1){return ot(n,"touchstart",t)}function _y(n=document.documentElement,t=!1){return ot(n,"touchend",t)}function Ey(n=document.documentElement,t=!1){return ot(n,"touchcancel",t)}function dl(n=document.documentElement,t=!1){return ot(n,"pointermove",t)}function ml(n=document.documentElement,t=!1){return ot(n,"pointerdown",t)}function pl(n=document.documentElement,t=!1){return ot(n,"pointerup",t)}function gl(n=document.documentElement,t=!1){return ot(n,"pointercancel",t)}function VA(n=document.documentElement){const t=new Ft(n);return Lt(e=>{t.on("pan",e)},e=>{t.off("pan",e)})}function NA(n=document.documentElement){const t=new Ft(n);return Lt(e=>{t.on("panmove",e)},e=>{t.off("panmove",e)})}function zA(n=document.documentElement){const t=new Ft(n);return Lt(e=>{t.on("panstart",e)},e=>{t.off("panstart",e)})}function FA(n=document.documentElement){const t=new Ft(n);return Lt(e=>{t.on("panend",e)},e=>{t.off("panend",e)})}function BA(n=document.documentElement){const t=new Ft(n);return Lt(e=>{t.on("pancancel",e)},e=>{t.off("pancancel",e)})}function jA(n=document.documentElement){const t=new Ft(n);return Lt(e=>{t.on("panleft",e)},e=>{t.off("panleft",e)})}function $A(n=document.documentElement){const t=new Ft(n);return Lt(e=>{t.on("panright",e)},e=>{t.off("panright",e)})}function UA(n=document.documentElement){const t=new Ft(n);return Lt(e=>{t.on("panup",e)},e=>{t.off("panup",e)})}function YA(n=document.documentElement){const t=new Ft(n);return Lt(e=>{t.on("pandown",e)},e=>{t.off("pandown",e)})}function GA(n=document.documentElement){const t=new Ft(n);return Lt(e=>{t.on("pinch",e)},e=>{t.off("pinch",e)})}function XA(n=document.documentElement){const t=new Ft(n);return Lt(e=>{t.on("pinchin",e)},e=>{t.off("pinchin",e)})}function WA(n=document.documentElement){const t=new Ft(n);return Lt(e=>{t.on("pinchout",e)},e=>{t.off("pinchout",e)})}function HA(n=document.documentElement){const t=new Ft(n);return Lt(e=>{t.on("press",e)},e=>{t.off("press",e)})}function qA(n=document.documentElement){const t=new Ft(n);return Lt(e=>{t.on("rotate",e)},e=>{t.off("rotate",e)})}function KA(n=document.documentElement){const t=new Ft(n);return Lt(e=>{t.on("swipe",e)},e=>{t.off("swipe",e)})}function JA(n=document.documentElement){const t=new Ft(n);return Lt(e=>{t.on("swipeleft",e)},e=>{t.off("swipeleft",e)})}function ZA(n=document.documentElement){const t=new Ft(n);return Lt(e=>{t.on("swiperight",e)},e=>{t.off("swiperight",e)})}function QA(n=document.documentElement){const t=new Ft(n);return Lt(e=>{t.on("swipeup",e)},e=>{t.off("swipeup",e)})}function tM(n=document.documentElement){const t=new Ft(n);return Lt(e=>{t.on("swipedown",e)},e=>{t.off("swipedown",e)})}function Ty(n=document.documentElement){const t=new Ft(n);return Lt(e=>{t.on("tap",e)},e=>{t.off("tap",e)})}function eM(n=document.documentElement){const t=new Ft(document.documentElement);return Lt(e=>{const s=i=>{!i.target||n==i.target||n.contains(i.target)||e(i)};return t.on("tap",s),s},(e,s)=>{t.off("tap",s)})}function nM(n=document.documentElement,t=!1){return ot(n,"transitionstart",t)}function sM(n=document.documentElement,t=!1){return yo(ot(n,"transitionend",t),ot(n,"webkitTransitionEnd",t),ot(n,"oTransitionEnd",t),ot(n,"MSTransitionEnd",t))}function iM(n=document.documentElement,t=!1){return ot(n,"animationstart",t)}function rM(n=document.documentElement,t=!1){return ot(n,"animationend",t)}function Cy(n=document.documentElement,t=!1){return ot(n,"drag",t)}function Py(n=document.documentElement,t=!1){return ot(n,"dragstart",t)}function Ay(n=document.documentElement,t=!1){return ot(n,"dragend",t)}function My(n=document.documentElement,t=!1){return ot(n,"drop",t)}function Dy(n=document.documentElement,t=!1){return ot(n,"dragenter",t)}function Ry(n=document.documentElement,t=!1){return ot(n,"dragleave",t)}function Oy(n=document.documentElement,t=!1){return ot(n,"dragover",t)}function Iy(n=document.documentElement,t=!1){return ot(n,"keydown",t)}function ky(n=document.documentElement,t=!1){return ot(n,"keyup",t)}function oM(n=document.documentElement,t=!1){return ot(n,"keypress",t)}function aM(n,t=!1){return ot(n,"change",t)}function cM(n,t=!1){return ot(n,"submit",t)}function hM(n=10){return ot(window,"scroll",!0).pipe(A_(n))}function uM(){return ot(document,"visibilitychange",!0).pipe(zt(()=>document.visibilityState==="visible"),jn())}function lM(){return ot(window,"storage",!1)}function fM(){return yo(ot(window,"online",!1),ot(window,"offline",!1)).pipe(zt(()=>navigator.onLine),vs(navigator.onLine),jn(),sp({bufferSize:1,refCount:!0}))}function dM(n=document.documentElement,t){const e=t?.createMousePoint||Ps();return ga(n).pipe(zt(s=>(e.setCurrent(Wt(s,n)),e)))}function Ly(n=document.documentElement,t){const e=t?.createMousePoint||Ps();return ga(n).pipe(M_(by(n).pipe(bs(s=>{e.setStart(Wt(s,n),!0),t?.start?.(s,e)})),()=>wy(n).pipe(bs(s=>{e.setCurrent(Wt(s,n),!1),t?.end?.(s,e)}))),C_(),zt(s=>(e.setCurrent(Wt(s,n),!0),e)))}function Vy(n=document.documentElement,t){const e=t?.createMousePoint||Ps();return Sy(n).pipe(bs(s=>{const i=s.changedTouches[0];e.setStart(Wt(i,n),!0),t?.start?.(i,e)}),bo(()=>xy(n).pipe(bh(vo(_y(n),Ey(n)).pipe(bs(s=>{const i=s.changedTouches[0];e.setCurrent(Wt(i,n),!1),t?.end?.(i,e)}))))),zt(s=>{const i=s.changedTouches[0];return e.setCurrent(Wt(i,n),!0),e}))}function ya(n=document.documentElement,t){const e=t?.createMousePoint||Ps();return ml(n).pipe(bs(s=>{e.setStart(Wt(s,n),!0),t?.start?.(s,e)}),bo(()=>dl(n).pipe(bh(vo(pl(n),gl(n)).pipe(bs(s=>{e.setCurrent(Wt(s,n),!1),t?.end?.(s,e)}))))),zt(s=>(e.setCurrent(Wt(s,n),!0),e)))}function mM(n=document.documentElement,t){return vo(Ly(n,t),Vy(n,t))}function Ny(n=document.documentElement,t){const e=t?.createMousePoint||Ps();return yo(ga(n),ml(n)).pipe(np(s=>s instanceof PointerEvent?(e.setStart(Wt(s,n),!0),t?.start?.(s,e),dl(n).pipe(bh(vo(pl(n),gl(n)).pipe(bs(i=>{e.setCurrent(Wt(i,n),!1),t?.end?.(i,e)}))))):s instanceof MouseEvent?J2(s):zm),zt(s=>(e.setCurrent(Wt(s,n),s instanceof PointerEvent),e)))}function pM(n){return new Nt(t=>ya(n,{start:()=>{t.next(0)}}).subscribe(s=>{t.next(s.current.y-s.start.y)}).unsubscribe).pipe(jn())}function gM(n,t){ps(n,"draggable","true");const e=Py(n,!0).subscribe(r=>{$n(r),ip(r);const o=r.dataTransfer;o&&(o.effectAllowed="move",o.setData("text/plain","some-data")),t?.onStart?.(r)}),s=Cy(n).subscribe(r=>{$n(r),t?.onDrag?.(r)}),i=Ay(n).subscribe(r=>{$n(r),t?.onEnd?.(r)});return()=>{e.unsubscribe(),s.unsubscribe(),i.unsubscribe()}}function yM(n,t){const e=Dy(n).subscribe(o=>{$n(o),t?.onEnter?.(o)}),s=Oy(n).subscribe(o=>{$n(o);const a=o.dataTransfer;a&&(a.dropEffect="move"),t?.onOver?.(o)}),i=Ry(n).subscribe(o=>{$n(o),t?.onLeave?.(o)}),r=My(n).subscribe(o=>{$n(o);const a=o.dataTransfer;if(!a){t?.onDrop?.(o,[]);return}t?.onDrop?.(o,[...a.files])});return()=>{e.unsubscribe(),s.unsubscribe(),i.unsubscribe(),r.unsubscribe()}}function vM(){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 ii(){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 zy(){const{clientWidth:n,clientHeight:t,scrollLeft:e,scrollTop:s}=ii();return{width:window.innerWidth||n,height:window.innerHeight||t,x:window.pageXOffset||e,y:window.pageYOffset||s}}function bM(){const{scrollWidth:n,scrollHeight:t,scrollLeft:e,scrollTop:s}=ii();return{width:n,height:t,scrollX:window.pageXOffset||e,scrollY:window.pageYOffset||s}}function yl(n){return n.getBoundingClientRect()}function wM(n){return{x:n.offsetLeft,y:n.offsetTop,width:n.offsetWidth,height:n.offsetHeight}}function vl(n){const{top:t,left:e,width:s,height:i}=n.getBoundingClientRect(),{scrollLeft:r,scrollTop:o}=ii();return{x:e+r,y:t+o,width:s,height:i}}function xM(n){let t=n,e=0,s=0;for(;t!==null;)e+=t.offsetLeft,s+=t.offsetTop,t.offsetParent instanceof HTMLElement?t=t.offsetParent:t=null;return{x:e,y:s,width:n.offsetWidth,height:n.offsetHeight}}function SM(){const{clientHeight:n,scrollTop:t,scrollHeight:e}=ii(),s=e-n;return s<=0?0:t/s*100}function _M(n){const t=zy(),e=yl(n);return e.bottom>=0&&e.top<=t.height&&e.right>=0&&e.left<=t.width}function EM(n){if("center"in n){const t=n.center,e=yl(n.target);return{x:t.x-e.x,y:t.y-e.y}}return{x:n.clientX,y:n.clientY}}function bl(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}=ii();return{x:n.clientX+t,y:n.clientY+e}}function Wt(n,t){const e={x:0,y:0};if(t){const s=bl(n),i=vl(t);e.x=rt(s.x-i.x,0,i.width),e.y=rt(s.y-i.y,0,i.height)}else{let s=0,i=0;if("currentTarget"in n&&n.currentTarget&&n.target&&n.currentTarget!=n.target){const r=n.currentTarget.getBoundingClientRect(),o=n.target.getBoundingClientRect();s=o.left-r.left,i=o.top-r.top}if("offsetX"in n)e.x=n.offsetX+s,e.y=n.offsetY+i;else{const r=bl(n),o=vl(n.target);e.x=rt(r.x-o.x+s,0,o.width),e.y=rt(r.y-o.y+i,0,o.height)}}return e}function TM(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 CM(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 PM={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 AM(n){if(n.key)return n.key;if(n.keyCode)return n.keyCode;if(n.which)return n.which}function Fy(n,t){const e=t.ctrl||!1,s=t.shift||!1,i=t.alt||!1;return(e===n.metaKey||e===n.ctrlKey)&&s===n.shiftKey&&i===n.altKey&&t.keys.map(r=>r.toLowerCase()).includes(n.key.toLowerCase())}function By(n){return Iy(n.target||document||window).pipe(yh(t=>Fy(t,n)),zt(t=>{t.stopPropagation(),t.preventDefault()}))}function MM(n){return ky(n.target||document||window).pipe(yh(t=>Fy(t,n)),zt(t=>{t.stopPropagation(),t.preventDefault()}))}function jy(n={keys:["o"]},t=Re.text){return By(n).pipe(bo(async()=>await cy(t)))}async function DM(n={keys:["o"]},t=Re.text){return Q2(jy(n,t))}function RM(){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,s){n.x=e.x,n.y=e.y,n.isDown=typeof s=="boolean"?s:!1,this.setCurrentMousePoint(e,s)},setCurrentMousePoint:(e,s)=>{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-n.x,t.dStartY=t.y-n.y,t.isDown=typeof s=="boolean"?s:!1}}}function OM(n=document.documentElement){const t=new wc,e=new Ft(n);let s=[];const i=RM(),r=i.mousePoint,o=F=>{t.emit("mouseDown",F)},a=F=>{t.emit("mouseUp",F)},c=F=>{r.isDown||i.setCurrentMousePoint(Wt(F,n)),t.emit("mouseMove",F)},h=F=>{t.emit("mouseOver",F)},u=F=>{t.emit("mouseOut",F)},l=F=>{t.emit("mouseEnter",F)},f=F=>{t.emit("mouseLeave",F)},d=F=>{t.emit("mouseClick",F)},p=F=>{t.emit("mouseDoubleClick",F)},m=F=>{t.emit("mouseWheel",F)},y=F=>{t.emit("mouseContextMenu",F)},g=F=>{t.emit("touchStart",F)},v=F=>{t.emit("touchEnd",F)},x=F=>{t.emit("touchCancel",F)},b=F=>{const Rt=F.changedTouches[0];r.isDown||i.setCurrentMousePoint(Wt(Rt,n)),t.emit("touchMove",F)},E=F=>{t.emit("pointerDown",F)},_=F=>{t.emit("pointerUp",F)},D=F=>{t.emit("pointerCancel",F)},V=F=>{t.emit("pointerMove",F)},O=F=>{t.emit("pan",F)},N=F=>{t.emit("panStart",F)},U=F=>{t.emit("panMove",F)},Y=F=>{t.emit("panEnd",F)},st=F=>{t.emit("panCancel",F)},it=F=>{t.emit("panLeft",F)},nt=F=>{t.emit("panRight",F)},et=F=>{t.emit("panUp",F)},ct=F=>{t.emit("panDown",F)},ht=F=>{t.emit("pinch",F)},B=F=>{t.emit("pinchin",F)},z=F=>{t.emit("pinchout",F)},P=F=>{t.emit("press",F)},I=F=>{t.emit("rotate",F)},G=F=>{t.emit("swipe",F)},X=F=>{t.emit("swipeLeft",F)},dt=F=>{t.emit("swipeRight",F)},vt=F=>{t.emit("swipeUp",F)},J=F=>{t.emit("swipeDown",F)},Et=F=>{t.emit("tap",F)},lt=F=>{!F.target||n==F.target||n.contains(F.target)||t.emit("tapOutSide",F)},Dt=F=>{t.emit("transitionstart",F)},In=F=>{t.emit("transitionend",F)},hn=F=>{t.emit("animationstart",F)},un=F=>{t.emit("animationend",F)};let qe={...n.getBoundingClientRect(),width:n.offsetWidth,height:n.offsetHeight};return{el:n,get rect(){return qe},mousePoint:r,eb:t,start:async function(){s.push(Ct(n,"mousedown",o)),s.push(Ct(n,"mouseup",a)),s.push(Ct(n,"mousemove",c)),s.push(Ct(n,"mouseover",h)),s.push(Ct(n,"mouseout",u)),s.push(Ct(n,"mouseenter",l)),s.push(Ct(n,"mouseleave",f)),s.push(Ct(n,"click",d)),s.push(Ct(n,"dblclick",p)),s.push(Ct(n,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",m)),s.push(Ct(n,"contextmenu",y)),s.push(Ct(n,"touchstart",g)),s.push(Ct(n,"touchend",v)),s.push(Ct(n,"touchcancel",x)),s.push(Ct(n,"touchmove",b)),s.push(Ct(n,"pointerdown",E)),s.push(Ct(n,"pointerup",_)),s.push(Ct(n,"pointercancel",D)),s.push(Ct(n,"pointermove",V)),e.on("pan",O),e.on("panstart",N),e.on("panmove",U),e.on("panend",Y),e.on("pancancel",st),e.on("panleft",it),e.on("panright",nt),e.on("panup",et),e.on("pandown",ct),e.on("pinch",ht),e.on("pinchin",B),e.on("pinchout",z),e.on("press",P),e.on("rotate",I),e.on("swipe",G),e.on("swipeleft",X),e.on("swiperight",dt),e.on("swipeup",vt),e.on("swipedown",J),e.on("tap",Et),s.push(Ct(document,"pointerdown",lt)),s.push(Ct(n,"transitionstart",Dt)),s.push(Ct(n,"transitionend",In)),s.push(Ct(n,"animationstart",hn)),s.push(Ct(n,"animationend",un));const F=await vy(n,Rt=>{qe=Rt,t.emit("resize",Rt)});s.push(F),s.push($y(this,{start:Rt=>{i.setStartMousePoint(Wt(Rt,n),!0)},move:Rt=>{i.setCurrentMousePoint(Wt(Rt,n))},end:Rt=>{i.setCurrentMousePoint(Wt(Rt,n),!1)}}))},end:()=>{t.removeAllListeners(),s.forEach(F=>F()),s=[],e.off("pan",O),e.off("panstart",N),e.off("panmove",U),e.off("panend",Y),e.off("pancancel",st),e.off("panleft",it),e.off("panright",nt),e.off("panup",et),e.off("pandown",ct),e.off("pinch",ht),e.off("pinchin",B),e.off("pinchout",z),e.off("press",P),e.off("rotate",I),e.off("swipe",G),e.off("swipeleft",X),e.off("swiperight",dt),e.off("swipeup",vt),e.off("swipedown",J),e.off("tap",Et)}}}function $y(n,t){return Uy(n,t)}function Uy(n,t){const e=n.eb,s=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",s),()=>e.off("pointerDown",s)}function IM(n,t){const e=n.eb,s=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",s),()=>e.off("mouseDown",s)}function kM(n,t){const e=n.eb,s=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",s),()=>e.off("touchStart",s)}function LM(n,t,e){if(typeof t=="string"&&(t=sd(t)),(typeof t=="string"||t===void 0)&&e===void 0){const s=Object.assign({},n.dataset);return Object.keys(s).forEach(i=>{if(s[i]?.startsWith("[")||s[i]?.startsWith("{"))try{s[i]=JSON.parse(s[i]||"")}catch{}}),typeof t=="string"?s[t]:s}else{let s={};typeof t=="object"?s=t:typeof t=="string"&&(s[t]=e),Object.entries(s).forEach(([i,r])=>{r?n.dataset[i]=r instanceof Object?JSON.stringify(r):r:delete n.dataset[i]})}}function VM(n,t){t.split(/[,\s]+/).forEach(e=>{e.trim()!=""&&delete n.dataset[e.trim()]})}function Yy(n,t={attributes:!0,childList:!0,subtree:!0}){return new Nt(e=>{const s=new MutationObserver((i,r)=>{e.next(i)});return s.observe(n,t),()=>{s.disconnect()}})}function NM(n,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(n,{childList:!0})})}function Gy(n,t={root:null}){return new Nt(e=>{const s=new IntersectionObserver((i,r)=>{if(i.length){const o=i[i.length-1];o&&e.next(o)}},t);return s.observe(n),()=>{s.unobserve(n),s.disconnect()}})}function zM(n,t){const e=t?.threshold??.5;return Gy(n,{threshold:e,root:t?.root}).pipe(zt(s=>s.isIntersecting&&s.intersectionRatio>=e),jn())}function wl(n,t){const e=typeof n=="string"?n:n.toString(),s=()=>{try{const a=window.sessionStorage.getItem(e);if(a)return JSON.parse(a)}catch{}},i=a=>{try{typeof a.value<"u"?window.sessionStorage.setItem(e,JSON.stringify(a)):window.sessionStorage.removeItem(e)}catch{}};return{get:()=>{const{get:a}=lo(s(),t);return a().value},set:a=>{const{set:c}=lo(s(),t),h=c(a);i(h)}}}function FM(){window.sessionStorage.clear()}function Xy(){return Yy(document).pipe(zt(()=>location),vs(location))}function BM(){return Xy().pipe(zt(n=>n.href),vs(location.href),jn())}function jM(){return ot(window,"hashchange").pipe(zt(n=>n.target.location.hash.replace("#","")),vs(window.location.hash.replace("#","")),jn())}function Wy(n="current"){return ot(window,"popstate").pipe(zt(t=>t.state||{}),zt(t=>({...t,[n]:t[n]||window.location.pathname+window.location.search+window.location.hash})),jn((t,e)=>t[n]===e[n]))}function $M(n={nameInState:"current",alreadyPushState:!0}){const t=n.nameInState,e=typeof n.alreadyPushState=="boolean"?n.alreadyPushState:!0,{get:s,set:i}=wl("fe-route-history"),r=s()||[],{get:o,set:a}=wl("fe-route-history-index"),c=o();let h=typeof c=="number"?c:r.length-1;function u(g){return r.findIndex(x=>x[t]===g[t])}const l={currentIndex:h};function f(g){g=rt(g,-1,r.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=r[g]?.[t],h=g,l.currentIndex=h,a(h)}f(h);function d(g){r.push(g),i(r),f(r.length-1)}function p(g,v){const x={...v,[t]:g};window.history.pushState(x,"",g),d(x)}function m(g,v=e){const x=u(g);if(x<0){h>=0&&(r.splice(h+1),i(r)),v?d(g):p(g[t],g);return}x!=h&&f(x)}const y=Wy().subscribe(g=>{m(g,!0)});return{history:r,route:l,navigate:(g,v)=>{m({...v,[t]:g},e)},go(g){window.history.go(g)},back(){window.history.back()},forward(){window.history.forward()},destroy:()=>{y.unsubscribe()}}}function Hy(n="(prefers-color-scheme: dark)"){const t=window.matchMedia(n);return ot(t,"change").pipe(zt(e=>e.matches),vs(t.matches),jn())}let qy=!1;function UM(){qy||(qy=!0,Tm(`
88
128
  :root {
89
129
  --sat:env(safe-area-inset-top, 0px);
90
130
  --sar:env(safe-area-inset-right, 0px);
@@ -97,9 +137,30 @@ Content-Type: `+f.type+`\r
97
137
  --sab:env(safe-area-inset-bottom, 0px);
98
138
  --sal:env(safe-area-inset-left, 0px);
99
139
  }
100
- `))}wv();function vv(){return ua(document.documentElement).pipe(vo(yo),kt(()=>{const s=getComputedStyle(document.documentElement);return{bottom:s.getPropertyValue("--sab"),top:s.getPropertyValue("--sat"),right:s.getPropertyValue("--sar"),left:s.getPropertyValue("--sal")}}))}function xv(s={enableHighAccuracy:!0,timeout:5e3,maximumAge:0}){return new Mt(t=>{if(!("geolocation"in navigator))return t.error("navigator.geolocation is not available.");let e;return new Promise((n,r)=>{navigator.geolocation.getCurrentPosition(i=>{t.next({longitude:i.coords.longitude,latitude:i.coords.latitude}),n()},i=>{r(i)})}).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 gf(s="(prefers-color-scheme: dark)"){const t=window.matchMedia(s);return st(t,"change").pipe(kt(e=>e.matches),mn(t.matches),He())}function Fa(s,t){const e=typeof s=="string"?s:s.toString(),n=()=>{try{const a=window.sessionStorage.getItem(e);if(a)return uc(a)}catch{}},r=a=>{try{typeof a.value<"u"?window.sessionStorage.setItem(e,lc(a)):window.sessionStorage.removeItem(e)}catch{}};return{get:()=>{const{get:a}=er(n(),t);return a().value},set:a=>{const{set:c}=er(n(),t),h=c(a);r(h)}}}function Sv(){window.sessionStorage.clear()}function yf(){return df(document).pipe(kt(()=>location),mn(location))}function _v(){return yf().pipe(kt(s=>s.href),mn(location.href),He())}function Cv(){return st(window,"hashchange").pipe(kt(s=>s.target.location.hash.replace("#","")),mn(window.location.hash.replace("#","")),He())}function bf(s="current"){return st(window,"popstate").pipe(kt(t=>t.state||{}),kt(t=>({...t,[s]:t[s]||window.location.pathname+window.location.search+window.location.hash})),He((t,e)=>t[s]===e[s]))}function Ev(s={nameInState:"current",alreadyPushState:!0}){const t=s.nameInState,e=typeof s.alreadyPushState=="boolean"?s.alreadyPushState:!0,{get:n,set:r}=Fa("fe-route-history"),i=n()||[],{get:o,set:a}=Fa("fe-route-history-index"),c=o();let h=typeof c=="number"?c:i.length-1;function l(y){return i.findIndex(v=>v[t]===y[t])}const u={currentIndex:h};function d(y){y=K(y,-1,i.length-1),h<0?(u.direction="keep",u.delta=0):(y<h?u.direction="backward":y>h?u.direction="forward":u.direction="keep",u.delta=y-h),u.from=u.to,u.to=i[y]?.[t],h=y,u.currentIndex=h,a(h)}d(h);function f(y){i.push(y),r(i),d(i.length-1)}function m(y,b){const v={...b,[t]:y};window.history.pushState(v,"",y),f(v)}function p(y,b=e){const v=l(y);if(v<0){h>=0&&(i.splice(h+1),r(i)),b?f(y):m(y[t],y);return}v!=h&&d(v)}const _=bf().subscribe(y=>{p(y,!0)});return{history:i,route:u,navigate:(y,b)=>{p({...b,[t]:y},e)},go(y){window.history.go(y)},back(){window.history.back()},forward(){window.history.forward()},destroy:()=>{_.unsubscribe()}}}function Tv(s,t,e){if(typeof t=="string"&&(t=jc(t)),(typeof t=="string"||t===void 0)&&e===void 0){const n=Object.assign({},s.dataset);return Object.keys(n).forEach(r=>{if(n[r]?.startsWith("[")||n[r]?.startsWith("{"))try{n[r]=JSON.parse(n[r]||"")}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(([r,i])=>{i?s.dataset[r]=i instanceof Object?JSON.stringify(i):i:delete s.dataset[r]})}}function Pv(s,t){t.split(/[,\s]+/).forEach(e=>{e.trim()!=""&&delete s.dataset[e.trim()]})}function wf(s,t){const e=typeof s=="string"?s:s.toString(),n=()=>{try{const a=window.localStorage.getItem(e);if(a)return uc(a)}catch{}},r=a=>{try{typeof a.value<"u"?window.localStorage.setItem(e,lc(a)):window.localStorage.removeItem(e)}catch{}};return{get:()=>{const{get:a}=er(n(),t);return a().value},set:a=>{const{set:c}=er(n(),t),h=c(a);r(h)}}}function Av(){window.localStorage.clear()}const Mv=["dark","light"],{get:vf,set:xf}=wf(ii("theme")),Sf=new qe,kv=Sf.pipe(mn(void 0));function _f(s){switch(s){case"dark":document.documentElement.classList.add("dark"),yn(document.documentElement,"data-theme","dark");break;case"light":default:document.documentElement.classList.remove("dark"),yn(document.documentElement,"data-theme","light");break}}function Cf(s){return xf(s),_f(s),Sf.next(s),s}function Iv(){return Cf(vf()=="dark"?"light":"dark")}function Dv(){return K0([kv,gf("(prefers-color-scheme: dark)")]).pipe(kt(([s,t])=>s||(s=vf(),s||(s=t?"dark":"light",xf(s)),_f(s),s)))}function et(s,t=""){return getComputedStyle(document.documentElement).getPropertyValue(s)||t}function Ov(s,t){document.documentElement.style.setProperty(s,t)}function Rv(s){return{foregroundCommon:et("--yz-foreground-common","#ffffff"),foregroundBorderCommon:et("--yz-foreground-border-common","#e6e6e6"),panelCommon:et("--yz-panel-common","#f5f5f5"),panelBorderCommon:et("--yz-panel-border-common","#b3b3b3"),gapCommon:et("--yz-gap-common","#cccccc"),placeholderCommon:et("--yz-placeholder-common","#8f8f8f"),fontCommon:et("--yz-font-common","#333333"),fontSecondaryCommon:et("--yz-font-secondary-common","#666666"),fontTertiaryCommon:et("--yz-font-tertiary-common","#999999"),foregroundReverse:et("--yz-foreground-reverse","#ffffff"),foregroundBorderReverse:et("--yz-foreground-border-reverse","#e6e6e6"),panelReverse:et("--yz-panel-reverse","#f5f5f5"),panelBorderReverse:et("--yz-panel-border-reverse","#b3b3b3"),gapReverse:et("--yz-gap-reverse","#cccccc"),placeholderReverse:et("--yz-placeholder-reverse","#8f8f8f"),fontReverse:et("--yz-font-reverse","#333333"),fontSecondaryReverse:et("--yz-font-secondary-reverse","#666666"),fontTertiaryReverse:et("--yz-font-tertiary-reverse","#999999"),blueCommon:et("--yz-xg-blue","#5a82f0"),bluePanelCommon:et("--yz-xg-blue-panel","#e6f0ff"),bluePanelBorderCommon:et("--yz-xg-blue-panel-border","#a0b4f0"),blueGradientCommon:et("--yz-xg-blue-gradient","#66b3ff"),redCommon:et("--yz-xg-red","#fa503c"),redPanelCommon:et("--yz-xg-red-panel","#fff5f5"),redPanelBorderCommon:et("--yz-xg-red-panel-border","#fac8c8"),redGradientCommon:et("--yz-xg-red-gradient","#fa8c78"),greenCommon:et("--yz-xg-green","#00be5a"),greenGradientCommon:et("--yz-xg-green-gradient","#00e678"),yellowCommon:et("--yz-xg-yellow","#fa8c00"),yellowGradientCommon:et("--yz-xg-yellow-gradient","#ffb400"),newenergyCommon:et("--yz-xg-newenergy","#64c896"),newenergyPanelCommon:et("--yz-xg-newenergy-panel","#ebfaf2"),primaryPattern:et(`--yz-pattern-${s}-primary`,"#5a82f0"),secondaryPattern:et(`--yz-pattern-${s}-secondary`,"#e6f0ff"),gradientPattern:et(`--yz-pattern-${s}-gradient`,"#66b3ff"),foregroundPattern:et(`--yz-pattern-${s}-foreground`,"#ffffff"),foregroundBorderPattern:et(`--yz-pattern-${s}-foreground-border`,"#e6e6e6"),panelPattern:et(`--yz-pattern-${s}-panel`,"#f5f5f5"),panelBorderPattern:et(`--yz-pattern-${s}-panel-border`,"#b3b3b3"),gapPattern:et(`--yz-pattern-${s}-gap`,"#cccccc"),placeholderPattern:et(`--yz-pattern-${s}-placeholder`,"#8f8f8f"),fontPattern:et(`--yz-pattern-${s}-font`,"#333333"),fontSecondaryPattern:et(`--yz-pattern-${s}-font-secondary`,"#666666"),fontTertiaryPattern:et(`--yz-pattern-${s}-font-tertiary`,"#999999")}}function Lv(s,t){let e=t?.value||"";if(!e){const i=`; ${document.cookie}`.split(`; ${s}=`).pop()?.split(";").shift();i&&(e=decodeURIComponent(i))}const n=()=>e,r=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=s+"="+encodeURIComponent(e)+o+a+c;if(t?.days){const l="; expires="+new Date(Date.now()+t.days*864e5).toUTCString();h+=l}document.cookie=h}};return r(e),{get:n,set:r}}function zv(){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=",r=location.pathname.split("/");for(document.cookie=n+"/";r.length>0;)document.cookie=n+r.join("/"),r.pop();e.shift()}}}function Nv(s,t){let e;return s.objectStoreNames.contains(t)||(e=s.createObjectStore(t,{keyPath:"id"})),e}function Fv(s,t=1,e){return new Promise((n,r)=>{let i;const o=window.indexedDB.open(s,t);o.onerror=()=>{r("无法使用IndexDB!")},o.onsuccess=a=>{i=a.target.result,Nv(i,e),n(i)}})}function Bv(s,t,e={id:1,name:"xxx"}){return new Promise((n,r)=>{const i=s.transaction([t],"readwrite");i.objectStore(t).add(e),i.oncomplete=a=>{n(a)},i.onerror=a=>{r(a)}})}const Uv={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?"下午":"晚上"}},$v={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]}]`}},sn=new qm;let Fr="zh-cn";Ba($v),Ba(Uv);function Ba(s,t){if(!s)return sn.get(Fr);let e;if(typeof s=="string"){const n=s.toLowerCase();if(sn.get(n))e=n;else if(t)sn.set(n,t),e=n;else return sn.get(Fr)}else{const{name:n}=s;sn.set(n,s),e=n}return e&&(Fr=e),sn.get(e)||sn.get(Fr)}function Ef(s,t={},e=[]){return typeof s=="string"?{tag:s,props:t,children:typeof e=="string"?e:e.filter(n=>typeof n!="boolean")}:s(t)}function Br(s){const t=Ef(s.tagName,ea(s),Array.from(s.children).map(e=>Br(e)));return t.el=s,t}function Be(s,t=document.documentElement){if(typeof s=="string"){const n=document.createTextNode(s);return t.appendChild(n),n}if(s.el)return s.el;const e=s.tag=="path"?sf():document.createElement(s.tag);if(s.props)for(const[n,r]of Object.entries(s.props))n.startsWith("on")?e.addEventListener(n.slice(2).toLowerCase(),r):n==="style"?ws(e,r):yn(e,n,r);return t.appendChild(e),s.el=e,s.children&&(typeof s.children=="string"?Be(s.children,e):s.children.forEach(n=>{Be(n,e)})),e}function Es(s,t){typeof s=="string"||!s.el||(Array.isArray(s.children)&&s.children.forEach(e=>{s.el&&Es(e,s.el)}),t.removeChild(s.el))}function Ur(s,t,e){if(!s.el||!t.el)return;e=e||s.el.parentElement||document.body||document.documentElement;const n=s.props.key,r=t.props.key;if(s.tag!==t.tag||s.el!==t.el||(r||n)&&r!==n){e.replaceChild(Be(t,e),s.el);return}const i=t.el=s.el,o=s.props,a=t.props;for(const l in o)l in a||(l.startsWith("on")?i.removeEventListener(l.slice(2).toLowerCase(),o[l]):i.removeAttribute(l));for(const l in a){const u=o[l],d=a[l];if(d!=u)if(l.startsWith("on")){const f=l.slice(2).toLowerCase();i.removeEventListener(f,u),i.addEventListener(f,d)}else if(l==="style"){for(const f in u)f in d||ta(i,f);ws(i,d)}else yn(i,l,d)}const c=s.children||[],h=t.children||[];if(typeof h=="string")i.innerHTML="",Be(h,i);else if(typeof c=="string")i.innerHTML="",h.forEach(l=>{Be(l,i)});else{const l=Math.min(c.length,h.length);for(let u=0;u<l;u++)Ur(c[u],h[u],i);h.length>c.length?h.slice(c.length).forEach(u=>{Be(u,i)}):h.length<c.length&&c.slice(h.length).forEach(u=>{Es(u,i)})}}function Tf(s=document.documentElement,t,e){t.el?!e||!e.el?(Es(t,s),Be(t,s)):Ur(e,t,s):(e&&Es(e,s),Be(t,s))}const $r=new Map;function Ua(s,t=$r){let e=t.get(s);return e||(e=Br(s),t.set(s,e),e)}function Yr(s,t,e=$r){const n=Ua(s,e);n.alternate||(n.alternate=Br(s),In(n.alternate.props,n.props,!0)),t(n.alternate)}function Pf(s=$r){const t=Array.from(s.entries());for(const[e,n]of t){const r=n.alternate;r&&(Ur(n,r),n.props=r.props,n.alternate=void 0)}}function $a(s=$r){jm(()=>Pf(s),50)}function Yv(){const s=new Map;let t=null;const e=new Set;let n=!1;function r(l){const u=t,d=u.stateIndex;u.states[d]===void 0&&(u.states[d]=l);function f(m){let p;typeof m=="function"?p=m(u.states[d]):p=m,u.states[d]!==p&&(u.states[d]=p,o(u))}return u.stateIndex++,[u.states[d],f]}function i(l,u){const d=t,f=d.effectIndex,m=d.effects[f]||{};if(!u||!m.deps||u.some((_,y)=>_!==m.deps[y])){m.cleanup&&m.cleanup();const _=l();d.effects[f]={deps:u?[...u]:[],cleanup:_}}d.effectIndex++}function o(l){e.add({component:l.component,props:l.props,container:l.container}),n||(n=!0,setTimeout(a,0))}function a(){const l=Array.from(e);e.clear(),l.forEach(({component:u,props:d,container:f})=>{c(u,f,d)}),n=!1}function c(l,u,d={}){let f=s.get(u);f?f.props=d:(f={component:l,props:d,states:[],stateIndex:0,effects:[],effectIndex:0,children:[],mounted:!1,container:u,vnode:void 0},s.set(u,f)),t=f,f.stateIndex=0,f.effectIndex=0;const m=l(d);return Tf(u,m,f.vnode),f.vnode=m,f.mounted=!0,t=null,f}function h(l){l.effects.forEach(u=>{u.cleanup&&u.cleanup()}),l.children&&l.children.forEach(u=>h(u)),l.container&&"innerHTML"in l.container&&(l.container.innerHTML=""),s.delete(l.container)}return{useState:r,useEffect:i,render:c,unmount:h,scheduleRender:o}}function Af(){let s;function t(d){s=d,d(),s=null}class e{subscribers=new Set;add(){s&&!this.subscribers.has(s)&&this.subscribers.add(s)}notify(){this.subscribers.forEach(f=>f())}}const n=new WeakMap;function r(d,f){let m=n.get(d);m||(m=new Map,n.set(d,m));let p=m.get(f);return p||(p=new e,m.set(f,p)),p}function i(d,f,m=o){if(!Array.isArray(d))return;const p=Array.prototype,_=Object.create(p);["push","pop","shift","unshift","splice","sort","reverse"].forEach(y=>{_[y]=function(...b){return["push","unshift","splice"].includes(y)&&(y==="splice"?b.slice(2):b).forEach((w,E)=>{cn(w)&&(b[E]=m(w)),f.add()}),p[y].apply(this,b),this.slice()}}),Object.setPrototypeOf(d,_),d.forEach((y,b)=>{cn(y)&&(d[b]=m(y)),f.add()})}function o(d){return Object.keys(d).forEach(f=>{const m=r(d,f);let p=d[f];Object.defineProperty(d,f,{configurable:!0,enumerable:!0,get(){return cn(p)&&(Array.isArray(p)?i(p,m,o):o(p)),m.add(),p},set(_){p!==_&&(p=_,m.notify())}})}),d}function a(d){return o({value:d})}const c=h;function h(d){if(!cn(d))return d;const f={get(p,_,y){let b=Reflect.get(p,_,y);const v=r(p,_);if(cn(b)&&!("isYZProxy"in b)){const w=h(b);Array.isArray(b)&&(w.YZProxyArrayDep=v),b=w}return v.add(),b},set(p,_,y,b){const v=Reflect.get(p,_,b),w=Reflect.set(p,_,y,b);if(_=="YZProxyArrayDep")return w;if(v!==y){let E;Array.isArray(p)?E=p.YZProxyArrayDep:E=r(p,_),E.notify()}return w},deleteProperty(p,_){if(!(_ in p))return!1;let b=typeof _=="symbol"?void 0:p[_];cn(b)&&(b=Array.isArray(b)?[...b]:{...b});const v=Reflect.deleteProperty(p,_);if(v){let w;Array.isArray(p)?w=p.YZProxyArrayDep:w=r(p,_),w.notify()}return v},has(p,_){return _==="isYZProxy"||_ in p}};return new Proxy(d,f)}function l(d,f){const m=h(d);return u(m,f),m}function u(d,f){f.childNodes.forEach(m=>{switch(m.nodeType){case 1:const p=m;[...p.attributes].forEach(v=>{const w=v.name,E=v.value;if(w==="v-model")if(Ko(p)){const C=p;t(()=>{C.checked=Ie(d,E)==C.value}),C.addEventListener("change",D=>{Ri(d,E,D.target.value)})}else if(Jo(p)){const C=p;t(()=>{C.checked=Gc(Ie(d,E),C.value)}),C.addEventListener("change",D=>{const $=D.target,O=$.value;$.checked?im(Ie(d,E),O):Ii(Ie(d,E),O)})}else if(Wo(p)){const C=p;t(()=>{C.value=Ie(d,E)}),C.addEventListener("change",D=>{Ri(d,E,D.target.value)})}else{const C=p;t(()=>{C.value=Ie(d,E)});const D=$=>{Ri(d,E,$.target.value)};C.addEventListener("input",D)}else w==="v-text"?t(()=>{p.innerText=Ie(d,E)}):w==="v-html"&&t(()=>{p.innerHTML=Ie(d,E)})}),p.childNodes.length>0&&u(d,p);break;case 3:const _=m.textContent||"",y=/\{\{\s*([^{}\s]+)\s*\}\}/g,b=y.exec(_);b&&b[1]&&t(()=>{m.textContent=_.replace(y,Ie(d,b[1]))});break}})}return{watchEffect:t,reactiveVue2:o,ref:a,reactiveVue3:h,reactive:c,mvvm:l}}const jv=Af();function Mf(s,t,e){return new WebSocket(s)}function Xv(s){return`${s}eventbus/${jd(3)}/${Yc(8)}/websocket`}class xe{static CONNECTING=WebSocket.CONNECTING;static OPEN=WebSocket.OPEN;static CLOSING=WebSocket.CLOSING;static CLOSED=WebSocket.CLOSED;url;socketCreatorProtocols;socketCreatorOptions;socketCreator;socket;state=xe.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||Mf,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=xe.CLOSING,this.socket?.close()}_connect(){this.socket?.readyState===xe.CONNECTING||this.socket?.readyState===xe.OPEN||(this.state=xe.CONNECTING,this.socket=this.socketCreator(this.url,this.socketCreatorProtocols,this.socketCreatorOptions),this.socket.onopen=()=>{tr(`(${this.url}) onopen`),this.state=xe.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:r}=t;tr(`(${this.url}) onclose: code(${e}) reason(${n}) wasClean(${r})`),this.state=xe.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),dm(this.reconnectAttempts++)))},this.socket.onerror=t=>{tr(`(${this.url}) onerror: ${t}`),this.onerror?.(t)},this.socket.onmessage=t=>{if(tr(`(${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(r){e=[JSON.stringify({type:"err",failureCode:"fe-json-parse-error",failureType:r.toString(),message:n})]}e.forEach(r=>{const i=JSON.parse(r);if(i.body&&Object.prototype.hasOwnProperty.call(i.body,"requestid")){const o=this.waitings[i.body.requestid];o?o.resolve?.(i.body):ce(`(${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?ce(`(${this.url}) onmessage: unhandle ArrayBuffer`):t.data instanceof Blob&&ce(`(${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===xe.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:In(n,this.socketCreatorOptions.headers,!1)})),this.listeners[t].push(e)}unregister(t,e,n={}){const r=this.listeners[t];if(r){const i=r.indexOf(e);i!=-1&&(r.splice(i,1),r.length===0&&(this._send({type:"unregister",address:t,headers:In(n,this.socketCreatorOptions.headers,!1)}),delete this.listeners[t]))}}publish(t,e,n={}){this._send({type:"publish",address:t,headers:In(n,this.socketCreatorOptions.headers,!1),body:e})}async send(t,e,n={},r=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:In(n,this.socketCreatorOptions.headers,!1),body:{requestid:i.requestid,...e}}),setTimeout(()=>{c(`(${this.url}) send(${i.requestid}: ${Km(e)}) Timeout!`)},r)});return delete this.waitings[i.requestid],o}}function jr(){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 Gv(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 Xr(){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 Vv(){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 qv(){return(navigator.browserLanguage||navigator.language).toLowerCase()}function Hv(){return Intl.DateTimeFormat().resolvedOptions().timeZone.toLowerCase()}function Wv(){return Xr()=="safari"}function Ya(){return jr()==="ios"}function kf(){return jr()==="macos"}function Jv(){return Ya()|kf()}function If(){return jr()==="android"}function Kv(){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 Zv(){return Ya()||If()}function Df(){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 r=s.indexOf("rv:");return parseInt(s.substring(r+3,s.indexOf(".",r)),10)}const n=s.indexOf("Edge/");return n>0?parseInt(s.substring(n+5,s.indexOf(".",n)),10):-1}const Qv=Df()!==-1,t2=document.documentMode?document.documentMode===9:!1,e2=document.documentMode?document.documentMode===10:!1,n2=document.documentMode?document.documentMode===11:!1;function Of(){return Xr()==="wechat"}function Rf(){return Xr()==="ali"}function s2(){return Of()&&navigator.userAgent.match(/miniprogram/i)||window.__wxjs_environment==="miniprogram"}function r2(){return Rf()&&navigator.userAgent.match(/miniprogram/i)}function i2(s=750){const t=document.documentElement,e=window.top===window.self?window.devicePixelRatio:1;t.dataset.dpr=e;let n=100;const r=function(){t.style.height=window.innerHeight+"px";const i=t.clientWidth;t.dataset.width=i,t.dataset.layout=i>s?"pc":"mobile",t.dataset.rem=n=Math.min(100,Math.round(100*(i/s))),t.style.fontSize=n+"px"};r(),window.rem2px=function(i){return parseFloat(i)*n},window.px2rem=function(i){return parseFloat(i)/n},window.addEventListener&&window.addEventListener("orientationchange"in window?"orientationchange":"resize",r,!1)}class o2 extends pa{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=ga(e);for(const r of n.stylesheet.rules)for(const i of r.declarations)for(const o of r.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,n)=>{let r=this.groups.length;for(;r--;)if(this.groups[r]!=this.currentItem){let i="",o="";for(const a in this.groups[r])a=="transform"?i=this.groups[r].transform:a=="class"&&this.globalStyles["."+this.groups[r][a]]?o=this.globalStyles["."+this.groups[r][a]].join(";")+";"+o:a=="id"&&this.globalStyles["#"+this.groups[r][a]]?o=this.globalStyles["#"+this.groups[r][a]].join(";")+";"+o:typeof this.currentItem[a]>"u"&&(this.currentItem[a]=this.groups[r][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),Xa(this.currentItem.style,this.currentItem,Ga)}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=[],r;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":r={},e.style&&Xa(e.style,r),r.offset=r.offset||e.offset,r.color=r["stop-color"]||e["stop-color"],r.opacity=r["stop-opacity"]||e["stop-opacity"],~(r.offset+"").indexOf("%")?r.offset=parseFloat(r.offset):r.offset=parseFloat(r.offset)*100,r.offset=+r.offset.toFixed(2),this.grad.stops.push(r);break;case"linearGradient":this.grad.angle=(360+ja(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,c=this.grad.stops.length;a<c;a++)r=this.grad.stops[a],a&&a!=c-1?n.push(r.color+":"+r.offset):n.push(r.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,c=this.grad.stops.length;a<c;a++)r=this.grad.stops[a],a&&a!=c-1?n.push(r.color+":"+r.offset):n.push(r.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 i in e){const o=e[i];if(Ga.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"&&Xa(o,this.currentItem,Ga),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 ja(s,t,e,n,r,i){if(typeof r>"u"||typeof i>"u"){const o=s-e,a=t-n;return!o&&!a?0:(180+Math.atan2(-a,-o)*180/Math.PI+360)%360}else return ja(s,t,r,i)-ja(e,n,r,i)}function Xa(s,t,e){const n=(s+"").split(";"),r=/^\s+|\s+$/g;for(let i=0,o=n.length;i<o;i++){const a=n[i].split(":"),c=a[0].replace(r,"").replace(/[A-Z]/g,function(h){return"-"+h.toLowerCase()});(!e||e.includes(c))&&(t[c]=a[1].replace(r,""))}}const Ga=["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 a2{localVideoUtil;remoteVideoUtil;localPeerConnection=null;remotePeerConnection=null;constructor(t,e){this.localVideoUtil=new Ss(t),this.remoteVideoUtil=new Ss(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 r=void 0,i=new RTCPeerConnection(r);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(r);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(n[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,n=t.candidate;if(e&&n){const r=new RTCIceCandidate(n),i=this.getOtherPeer(e);i&&(i.addIceCandidate(r).then(()=>{this.handleConnectionSuccess(e)}).catch(o=>{this.handleConnectionFailure(e,o)}),this.trace(`${this.getPeerName(e)} ICE candidate:
140
+ `))}UM();function YM(){return ll(document.documentElement).pipe(dh(uh),zt(()=>{const n=getComputedStyle(document.documentElement);return{bottom:n.getPropertyValue("--sab"),top:n.getPropertyValue("--sat"),right:n.getPropertyValue("--sar"),left:n.getPropertyValue("--sal")}}))}function GM(n={enableHighAccuracy:!0,timeout:5e3,maximumAge:0}){return new Nt(t=>{if(!("geolocation"in navigator))return t.error("navigator.geolocation is not available.");let e;return new Promise((s,i)=>{navigator.geolocation.getCurrentPosition(r=>{t.next({longitude:r.coords.longitude,latitude:r.coords.latitude}),s()},r=>{i(r)})}).then(()=>{e=navigator.geolocation.watchPosition(s=>{t.next({longitude:s.coords.longitude,latitude:s.coords.latitude})},s=>{t.error(s)},n)}).catch(s=>{t.error(s)}),()=>{typeof e=="number"&&navigator.geolocation.clearWatch(e)}})}function Ky(n,t={},e=[]){return typeof n=="string"?{tag:n,props:t,children:typeof e=="string"?e:e.filter(s=>typeof s!="boolean")}:n(t)}function va(n){const t=Ky(n.tagName,eh(n),Array.from(n.children).map(e=>va(e)));return t.el=n,t}function Dn(n,t=document.documentElement){if(typeof n=="string"){const s=document.createTextNode(n);return t.appendChild(s),s}if(n.el)return n.el;const e=n.tag=="path"?Ah():document.createElement(n.tag);if(n.props)for(const[s,i]of Object.entries(n.props))s.startsWith("on")?e.addEventListener(s.slice(2).toLowerCase(),i):s==="style"?Mi(e,i):ps(e,s,i);return t.appendChild(e),n.el=e,n.children&&(typeof n.children=="string"?Dn(n.children,e):n.children.forEach(s=>{Dn(s,e)})),e}function fr(n,t){typeof n=="string"||!n.el||(Array.isArray(n.children)&&n.children.forEach(e=>{n.el&&fr(e,n.el)}),t.removeChild(n.el))}function ba(n,t,e){if(!n.el||!t.el)return;e=e||n.el.parentElement||document.body||document.documentElement;const s=n.props.key,i=t.props.key;if(n.tag!==t.tag||n.el!==t.el||(i||s)&&i!==s){e.replaceChild(Dn(t,e),n.el);return}const r=t.el=n.el,o=n.props,a=t.props;for(const u in o)u in a||(u.startsWith("on")?r.removeEventListener(u.slice(2).toLowerCase(),o[u]):r.removeAttribute(u));for(const u in a){const l=o[u],f=a[u];if(f!=l)if(u.startsWith("on")){const d=u.slice(2).toLowerCase();r.removeEventListener(d,l),r.addEventListener(d,f)}else if(u==="style"){for(const d in l)d in f||th(r,d);Mi(r,f)}else ps(r,u,f)}const c=n.children||[],h=t.children||[];if(typeof h=="string")r.innerHTML="",Dn(h,r);else if(typeof c=="string")r.innerHTML="",h.forEach(u=>{Dn(u,r)});else{const u=Math.min(c.length,h.length);for(let l=0;l<u;l++)ba(c[l],h[l],r);h.length>c.length?h.slice(c.length).forEach(l=>{Dn(l,r)}):h.length<c.length&&c.slice(h.length).forEach(l=>{fr(l,r)})}}function Jy(n=document.documentElement,t,e){t.el?!e||!e.el?(fr(t,n),Dn(t,n)):ba(e,t,n):(e&&fr(e,n),Dn(t,n))}const wa=new Map;function xl(n,t=wa){let e=t.get(n);return e||(e=va(n),t.set(n,e),e)}function xa(n,t,e=wa){const s=xl(n,e);s.alternate||(s.alternate=va(n),zs(s.alternate.props,s.props,!0)),t(s.alternate)}function Zy(n=wa){const t=Array.from(n.entries());for(const[e,s]of t){const i=s.alternate;i&&(ba(s,i),s.props=i.props,s.alternate=void 0)}}function Sl(n=wa){Gw(()=>Zy(n),50)}function XM(){const n=new Map;let t=null;const e=new Set;let s=!1;function i(p){const m=t,y=m.stateIndex;y in m.states||(m.states[y]=p);function g(v){let x;typeof v=="function"?x=v(m.states[y]):x=v,m.states[y]!==x&&(m.states[y]=x,u(m))}return m.stateIndex++,[m.states[y],g]}function r(p){const[m,y]=i({current:p});return m}function o(p,m){const y=t,g=y.effectIndex;y.pendingEffects||(y.pendingEffects=[]),y.pendingEffects.push({effect:p,deps:m,idx:g}),y.effectIndex++}function a(p){p.pendingEffects&&(p.pendingEffects.forEach(({effect:m,deps:y,idx:g})=>{const v=p.effects[g];if(!y||!v||!v.deps||y.length!==v.deps.length||y.some((b,E)=>b!==v.deps[E])){v.cleanup?.();const b=m();if(b instanceof Promise)throw new Error("useEffect callback must not return Promise");p.effects[g]={deps:y?[...y]:void 0,cleanup:b}}}),p.pendingEffects=[])}function c(p){const m=r(p);return m.current=p,h((...y)=>m.current(...y),[])}function h(p,m){const y=t,g=y.callbackIndex,v=y.callbacks[g]||{fn:p,deps:void 0};return(!m||!v.deps||m.length!==v.deps.length||m.some((b,E)=>b!==v.deps[E]))&&(v.fn=p,v.deps=m?[...m]:void 0),y.callbacks[g]=v,y.callbackIndex++,v.fn}function u(p){e.add(p),s||(s=!0,setTimeout(l,0))}function l(){for(;e.size;){const p=[...e];e.clear(),p.forEach(m=>{f(m.component,m.container,m.props)})}s=!1}function f(p,m,y={}){let g=n.get(m);!g||g.component!==p?(g={component:p,props:y,states:[],stateIndex:0,effects:[],effectIndex:0,pendingEffects:[],callbacks:[],callbackIndex:0,children:[],mounted:!1,container:m,vnode:void 0},n.set(m,g)):g.props=y,t=g,g.stateIndex=0,g.effectIndex=0,g.callbackIndex=0;const v=p(y);return Jy(m,v,g.vnode),g.vnode=v,g.mounted=!0,t=null,a(g),g}function d(p){p.effects.forEach(m=>m.cleanup?.()),p.children&&p.children.forEach(d),p.container&&"innerHTML"in p.container&&(p.container.innerHTML=""),n.delete(p.container)}return{useState:i,useRef:r,useEffect:o,useEffectEvent:c,useCallback:h,render:f,unmount:d,scheduleRender:u}}function Qy(){let n;function t(f){n=f,f(),n=null}class e{subscribers=new Set;add(){n&&!this.subscribers.has(n)&&this.subscribers.add(n)}notify(){this.subscribers.forEach(d=>d())}}const s=new WeakMap;function i(f,d){let p=s.get(f);p||(p=new Map,s.set(f,p));let m=p.get(d);return m||(m=new e,p.set(d,m)),m}function r(f,d,p=o){if(!Array.isArray(f))return;const m=Array.prototype,y=Object.create(m);["push","pop","shift","unshift","splice","sort","reverse"].forEach(g=>{y[g]=function(...v){return["push","unshift","splice"].includes(g)&&(g==="splice"?v.slice(2):v).forEach((b,E)=>{us(b)&&(v[E]=p(b)),d.add()}),m[g].apply(this,v),this.slice()}}),Object.setPrototypeOf(f,y),f.forEach((g,v)=>{us(g)&&(f[v]=p(g)),d.add()})}function o(f){return Object.keys(f).forEach(d=>{const p=i(f,d);let m=f[d];Object.defineProperty(f,d,{configurable:!0,enumerable:!0,get(){return us(m)&&(Array.isArray(m)?r(m,p,o):o(m)),p.add(),m},set(y){m!==y&&(m=y,p.notify())}})}),f}function a(f){return o({value:f})}const c=h;function h(f){if(!us(f))return f;const d={get(m,y,g){let v=Reflect.get(m,y,g);const x=i(m,y);if(us(v)&&!("isYZProxy"in v)){const b=h(v);Array.isArray(v)&&(b.YZProxyArrayDep=x),v=b}return x.add(),v},set(m,y,g,v){const x=Reflect.get(m,y,v),b=Reflect.set(m,y,g,v);if(y=="YZProxyArrayDep")return b;if(x!==g){let E;Array.isArray(m)?E=m.YZProxyArrayDep:E=i(m,y),E.notify()}return b},deleteProperty(m,y){if(!(y in m))return!1;let v=typeof y=="symbol"?void 0:m[y];us(v)&&(v=Array.isArray(v)?[...v]:{...v});const x=Reflect.deleteProperty(m,y);if(x){let b;Array.isArray(m)?b=m.YZProxyArrayDep:b=i(m,y),b.notify()}return x},has(m,y){return y==="isYZProxy"||y in m}};return new Proxy(f,d)}function u(f,d){const p=h(f);return l(p,d),p}function l(f,d){d.childNodes.forEach(p=>{switch(p.nodeType){case 1:const m=p;[...m.attributes].forEach(x=>{const b=x.name,E=x.value;if(b==="v-model")if(hl(m)){const _=m;t(()=>{_.checked=mn(f,E)==_.value}),_.addEventListener("change",D=>{lc(f,E,D.target.value)})}else if(cl(m)){const _=m;t(()=>{_.checked=fd(mn(f,E),_.value)}),_.addEventListener("change",D=>{const V=D.target,O=V.value;V.checked?vw(mn(f,E),O):dd(mn(f,E),O)})}else if(al(m)){const _=m;t(()=>{_.value=mn(f,E)}),_.addEventListener("change",D=>{lc(f,E,D.target.value)})}else{const _=m;t(()=>{_.value=mn(f,E)});const D=V=>{lc(f,E,V.target.value)};_.addEventListener("input",D)}else b==="v-text"?t(()=>{m.innerText=mn(f,E)}):b==="v-html"&&t(()=>{m.innerHTML=mn(f,E)})}),m.childNodes.length>0&&l(f,m);break;case 3:const y=p.textContent||"",g=/\{\{\s*([^{}\s]+)\s*\}\}/g,v=g.exec(y);v&&v[1]&&t(()=>{p.textContent=y.replace(g,mn(f,v[1]))});break}})}return{watchEffect:t,reactiveVue2:o,ref:a,reactiveVue3:h,reactive:c,mvvm:u}}const WM=Qy();var _l={exports:{}},dr={};/**
141
+ * @license React
142
+ * react-jsx-runtime.production.js
143
+ *
144
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
145
+ *
146
+ * This source code is licensed under the MIT license found in the
147
+ * LICENSE file in the root directory of this source tree.
148
+ */var t0;function HM(){if(t0)return dr;t0=1;var n=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function e(s,i,r){var o=null;if(r!==void 0&&(o=""+r),i.key!==void 0&&(o=""+i.key),"key"in i){r={};for(var a in i)a!=="key"&&(r[a]=i[a])}else r=i;return i=r.ref,{$$typeof:n,type:s,key:o,ref:i!==void 0?i:null,props:r}}return dr.Fragment=t,dr.jsx=e,dr.jsxs=e,dr}var mr={};/**
149
+ * @license React
150
+ * react-jsx-runtime.development.js
151
+ *
152
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
153
+ *
154
+ * This source code is licensed under the MIT license found in the
155
+ * LICENSE file in the root directory of this source tree.
156
+ */var e0;function qM(){return e0||(e0=1,{}.NODE_ENV!=="production"&&function(){function n(P){if(P==null)return null;if(typeof P=="function")return P.$$typeof===U?null:P.displayName||P.name||null;if(typeof P=="string")return P;switch(P){case y:return"Fragment";case v:return"Profiler";case g:return"StrictMode";case _:return"Suspense";case D:return"SuspenseList";case N:return"Activity"}if(typeof P=="object")switch(typeof P.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),P.$$typeof){case m:return"Portal";case b:return P.displayName||"Context";case x:return(P._context.displayName||"Context")+".Consumer";case E:var I=P.render;return P=P.displayName,P||(P=I.displayName||I.name||"",P=P!==""?"ForwardRef("+P+")":"ForwardRef"),P;case V:return I=P.displayName||null,I!==null?I:n(P.type)||"Memo";case O:I=P._payload,P=P._init;try{return n(P(I))}catch{}}return null}function t(P){return""+P}function e(P){try{t(P);var I=!1}catch{I=!0}if(I){I=console;var G=I.error,X=typeof Symbol=="function"&&Symbol.toStringTag&&P[Symbol.toStringTag]||P.constructor.name||"Object";return G.call(I,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",X),t(P)}}function s(P){if(P===y)return"<>";if(typeof P=="object"&&P!==null&&P.$$typeof===O)return"<...>";try{var I=n(P);return I?"<"+I+">":"<...>"}catch{return"<...>"}}function i(){var P=Y.A;return P===null?null:P.getOwner()}function r(){return Error("react-stack-top-frame")}function o(P){if(st.call(P,"key")){var I=Object.getOwnPropertyDescriptor(P,"key").get;if(I&&I.isReactWarning)return!1}return P.key!==void 0}function a(P,I){function G(){et||(et=!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)",I))}G.isReactWarning=!0,Object.defineProperty(P,"key",{get:G,configurable:!0})}function c(){var P=n(this.type);return ct[P]||(ct[P]=!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.")),P=this.props.ref,P!==void 0?P:null}function h(P,I,G,X,dt,vt){var J=G.ref;return P={$$typeof:p,type:P,key:I,props:G,_owner:X},(J!==void 0?J:null)!==null?Object.defineProperty(P,"ref",{enumerable:!1,get:c}):Object.defineProperty(P,"ref",{enumerable:!1,value:null}),P._store={},Object.defineProperty(P._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(P,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(P,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:dt}),Object.defineProperty(P,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:vt}),Object.freeze&&(Object.freeze(P.props),Object.freeze(P)),P}function u(P,I,G,X,dt,vt){var J=I.children;if(J!==void 0)if(X)if(it(J)){for(X=0;X<J.length;X++)l(J[X]);Object.freeze&&Object.freeze(J)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else l(J);if(st.call(I,"key")){J=n(P);var Et=Object.keys(I).filter(function(Dt){return Dt!=="key"});X=0<Et.length?"{key: someKey, "+Et.join(": ..., ")+": ...}":"{key: someKey}",z[J+X]||(Et=0<Et.length?"{"+Et.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
157
+ let props = %s;
158
+ <%s {...props} />
159
+ React keys must be passed directly to JSX without using spread:
160
+ let props = %s;
161
+ <%s key={someKey} {...props} />`,X,J,Et,J),z[J+X]=!0)}if(J=null,G!==void 0&&(e(G),J=""+G),o(I)&&(e(I.key),J=""+I.key),"key"in I){G={};for(var lt in I)lt!=="key"&&(G[lt]=I[lt])}else G=I;return J&&a(G,typeof P=="function"?P.displayName||P.name||"Unknown":P),h(P,J,G,i(),dt,vt)}function l(P){f(P)?P._store&&(P._store.validated=1):typeof P=="object"&&P!==null&&P.$$typeof===O&&(P._payload.status==="fulfilled"?f(P._payload.value)&&P._payload.value._store&&(P._payload.value._store.validated=1):P._store&&(P._store.validated=1))}function f(P){return typeof P=="object"&&P!==null&&P.$$typeof===p}var d=er,p=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),b=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),U=Symbol.for("react.client.reference"),Y=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,st=Object.prototype.hasOwnProperty,it=Array.isArray,nt=console.createTask?console.createTask:function(){return null};d={react_stack_bottom_frame:function(P){return P()}};var et,ct={},ht=d.react_stack_bottom_frame.bind(d,r)(),B=nt(s(r)),z={};mr.Fragment=y,mr.jsx=function(P,I,G){var X=1e4>Y.recentlyCreatedOwnerStacks++;return u(P,I,G,!1,X?Error("react-stack-top-frame"):ht,X?nt(s(P)):B)},mr.jsxs=function(P,I,G){var X=1e4>Y.recentlyCreatedOwnerStacks++;return u(P,I,G,!0,X?Error("react-stack-top-frame"):ht,X?nt(s(P)):B)}}()),mr}({}).NODE_ENV==="production"?_l.exports=HM():_l.exports=qM();var El=_l.exports;function Tl(n,t){n.indexOf(t)===-1&&n.push(t)}function Sa(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}const sn=(n,t,e)=>e>t?t:e<n?n:e;function Cl(n,t){return t?`${n}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:n}let ri=()=>{},Rn=()=>{};typeof process<"u"&&{}.NODE_ENV!=="production"&&(ri=(n,t,e)=>{!n&&typeof console<"u"&&console.warn(Cl(t,e))},Rn=(n,t,e)=>{if(!n)throw new Error(Cl(t,e))});const ss={},n0=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n),s0=n=>typeof n=="object"&&n!==null,i0=n=>/^0[^.\s]+$/u.test(n);function r0(n){let t;return()=>(t===void 0&&(t=n()),t)}const Ne=n=>n,pr=(...n)=>n.reduce((t,e)=>s=>e(t(s))),gr=(n,t,e)=>{const s=t-n;return s?(e-n)/s:1};class Pl{constructor(){this.subscriptions=[]}add(t){return Tl(this.subscriptions,t),()=>Sa(this.subscriptions,t)}notify(t,e,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,e,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(t,e,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ee=n=>n*1e3,ze=n=>n/1e3,o0=(n,t)=>t?n*(1e3/t):0,a0=new Set;function c0(n,t,e){n||a0.has(t)||(console.warn(Cl(t,e)),a0.add(t))}const h0=(n,t,e)=>(((1-3*e+3*t)*n+(3*e-6*t))*n+3*t)*n,KM=1e-7,JM=12;function ZM(n,t,e,s,i){let r,o,a=0;do o=t+(e-t)/2,r=h0(o,s,i)-n,r>0?e=o:t=o;while(Math.abs(r)>KM&&++a<JM);return o}function yr(n,t,e,s){if(n===t&&e===s)return Ne;const i=r=>ZM(r,0,1,n,e);return r=>r===0||r===1?r:h0(i(r),t,s)}const u0=n=>t=>t<=.5?n(2*t)/2:(2-n(2*(1-t)))/2,l0=n=>t=>1-n(1-t),f0=yr(.33,1.53,.69,.99),Al=l0(f0),d0=u0(Al),m0=n=>n>=1?1:(n*=2)<1?.5*Al(n):.5*(2-Math.pow(2,-10*(n-1))),Ml=n=>1-Math.sin(Math.acos(n)),p0=l0(Ml),g0=u0(Ml),QM=yr(.42,0,1,1),tD=yr(0,0,.58,1),y0=yr(.42,0,.58,1),eD=n=>Array.isArray(n)&&typeof n[0]!="number",v0=n=>Array.isArray(n)&&typeof n[0]=="number",b0={linear:Ne,easeIn:QM,easeInOut:y0,easeOut:tD,circIn:Ml,circInOut:g0,circOut:p0,backIn:Al,backInOut:d0,backOut:f0,anticipate:m0},nD=n=>typeof n=="string",w0=n=>{if(v0(n)){Rn(n.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,e,s,i]=n;return yr(t,e,s,i)}else if(nD(n))return Rn(b0[n]!==void 0,`Invalid easing type '${n}'`,"invalid-easing-type"),b0[n];return n},x0=H.createContext({}),S0=H.createContext({strict:!1}),_0=H.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"}),_a=H.createContext({}),Ea=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function sD(n){let t=new Set,e=new Set,s=!1,i=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(h){r.has(h)&&(c.schedule(h),n()),h(o)}const c={schedule:(h,u=!1,l=!1)=>{const d=l&&s?t:e;return u&&r.add(h),d.add(h),h},cancel:h=>{e.delete(h),r.delete(h)},process:h=>{if(o=h,s){i=!0;return}s=!0;const u=t;t=e,e=u,t.forEach(a),t.clear(),s=!1,i&&(i=!1,c.process(h))}};return c}const iD=40;function E0(n,t){let e=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>e=!0,o=Ea.reduce((x,b)=>(x[b]=sD(r),x),{}),{setup:a,read:c,resolveKeyframes:h,preUpdate:u,update:l,preRender:f,render:d,postRender:p}=o,m=()=>{const x=ss.useManualTiming,b=x?i.timestamp:performance.now();e=!1,x||(i.delta=s?1e3/60:Math.max(Math.min(b-i.timestamp,iD),1)),i.timestamp=b,i.isProcessing=!0,a.process(i),c.process(i),h.process(i),u.process(i),l.process(i),f.process(i),d.process(i),p.process(i),i.isProcessing=!1,e&&t&&(s=!1,n(m))},y=()=>{e=!0,s=!0,i.isProcessing||n(m)};return{schedule:Ea.reduce((x,b)=>{const E=o[b];return x[b]=(_,D=!1,V=!1)=>(e||y(),E.schedule(_,D,V)),x},{}),cancel:x=>{for(let b=0;b<Ea.length;b++)o[Ea[b]].cancel(x)},state:i,steps:o}}const{schedule:At,cancel:is,state:ne,steps:Dl}=E0(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ne,!0);let Ta;function rD(){Ta=void 0}const ye={now:()=>(Ta===void 0&&ye.set(ne.isProcessing||ss.useManualTiming?ne.timestamp:performance.now()),Ta),set:n=>{Ta=n,queueMicrotask(rD)}},T0=n=>t=>typeof t=="string"&&t.startsWith(n),C0=T0("--"),oD=T0("var(--"),Rl=n=>oD(n)?aD.test(n.split("/*")[0].trim()):!1,aD=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function P0(n){return typeof n!="string"?!1:n.split("/*")[0].includes("var(--")}const oi={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},vr={...oi,transform:n=>sn(0,1,n)},Ca={...oi,default:1},br=n=>Math.round(n*1e5)/1e5,Ol=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function cD(n){return n==null}const hD=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Il=(n,t)=>e=>!!(typeof e=="string"&&hD.test(e)&&e.startsWith(n)||t&&!cD(e)&&Object.prototype.hasOwnProperty.call(e,t)),A0=(n,t,e)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(Ol);return{[n]:parseFloat(i),[t]:parseFloat(r),[e]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},uD=n=>sn(0,255,n),kl={...oi,transform:n=>Math.round(uD(n))},As={test:Il("rgb","red"),parse:A0("red","green","blue"),transform:({red:n,green:t,blue:e,alpha:s=1})=>"rgba("+kl.transform(n)+", "+kl.transform(t)+", "+kl.transform(e)+", "+br(vr.transform(s))+")"};function lD(n){let t="",e="",s="",i="";return n.length>5?(t=n.substring(1,3),e=n.substring(3,5),s=n.substring(5,7),i=n.substring(7,9)):(t=n.substring(1,2),e=n.substring(2,3),s=n.substring(3,4),i=n.substring(4,5),t+=t,e+=e,s+=s,i+=i),{red:parseInt(t,16),green:parseInt(e,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Ll={test:Il("#"),parse:lD,transform:As.transform},wr=n=>({test:t=>typeof t=="string"&&t.endsWith(n)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${n}`}),On=wr("deg"),rn=wr("%"),Z=wr("px"),fD=wr("vh"),dD=wr("vw"),M0=(()=>({...rn,parse:n=>rn.parse(n)/100,transform:n=>rn.transform(n*100)}))(),ai={test:Il("hsl","hue"),parse:A0("hue","saturation","lightness"),transform:({hue:n,saturation:t,lightness:e,alpha:s=1})=>"hsla("+Math.round(n)+", "+rn.transform(br(t))+", "+rn.transform(br(e))+", "+br(vr.transform(s))+")"},Yt={test:n=>As.test(n)||Ll.test(n)||ai.test(n),parse:n=>As.test(n)?As.parse(n):ai.test(n)?ai.parse(n):Ll.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?As.transform(n):ai.transform(n),getAnimatableNone:n=>{const t=Yt.parse(n);return t.alpha=0,Yt.transform(t)}},mD=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function pD(n){return isNaN(n)&&typeof n=="string"&&(n.match(Ol)?.length||0)+(n.match(mD)?.length||0)>0}const D0="number",R0="color",gD="var",yD="var(",O0="${}",vD=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ci(n){const t=n.toString(),e=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=t.replace(vD,c=>(Yt.test(c)?(s.color.push(r),i.push(R0),e.push(Yt.parse(c))):c.startsWith(yD)?(s.var.push(r),i.push(gD),e.push(c)):(s.number.push(r),i.push(D0),e.push(parseFloat(c))),++r,O0)).split(O0);return{values:e,split:a,indexes:s,types:i}}function bD(n){return ci(n).values}function I0({split:n,types:t}){const e=n.length;return s=>{let i="";for(let r=0;r<e;r++)if(i+=n[r],s[r]!==void 0){const o=t[r];o===D0?i+=br(s[r]):o===R0?i+=Yt.transform(s[r]):i+=s[r]}return i}}function wD(n){return I0(ci(n))}const xD=n=>typeof n=="number"?0:Yt.test(n)?Yt.getAnimatableNone(n):n,SD=(n,t)=>typeof n=="number"?t?.trim().endsWith("/")?n:0:xD(n);function _D(n){const t=ci(n);return I0(t)(t.values.map((s,i)=>SD(s,t.split[i])))}const Xe={test:pD,parse:bD,createTransformer:wD,getAnimatableNone:_D};function Vl(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)*(.6666666666666666-e)*6:n}function ED({hue:n,saturation:t,lightness:e,alpha:s}){n/=360,t/=100,e/=100;let i=0,r=0,o=0;if(!t)i=r=o=e;else{const a=e<.5?e*(1+t):e+t-e*t,c=2*e-a;i=Vl(c,a,n+.3333333333333333),r=Vl(c,a,n),o=Vl(c,a,n-.3333333333333333)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function Pa(n,t){return e=>e>0?t:n}const Mt=(n,t,e)=>n+(t-n)*e,Nl=(n,t,e)=>{const s=n*n,i=e*(t*t-s)+s;return i<0?0:Math.sqrt(i)},TD=[Ll,As,ai],CD=n=>TD.find(t=>t.test(n));function k0(n){const t=CD(n);if(ri(!!t,`'${n}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let e=t.parse(n);return t===ai&&(e=ED(e)),e}const L0=(n,t)=>{const e=k0(n),s=k0(t);if(!e||!s)return Pa(n,t);const i={...e};return r=>(i.red=Nl(e.red,s.red,r),i.green=Nl(e.green,s.green,r),i.blue=Nl(e.blue,s.blue,r),i.alpha=Mt(e.alpha,s.alpha,r),As.transform(i))},zl=new Set(["none","hidden"]);function PD(n,t){return zl.has(n)?e=>e<=0?n:t:e=>e>=1?t:n}function AD(n,t){return e=>Mt(n,t,e)}function Fl(n){return typeof n=="number"?AD:typeof n=="string"?Rl(n)?Pa:Yt.test(n)?L0:RD:Array.isArray(n)?V0:typeof n=="object"?Yt.test(n)?L0:MD:Pa}function V0(n,t){const e=[...n],s=e.length,i=n.map((r,o)=>Fl(r)(r,t[o]));return r=>{for(let o=0;o<s;o++)e[o]=i[o](r);return e}}function MD(n,t){const e={...n,...t},s={};for(const i in e)n[i]!==void 0&&t[i]!==void 0&&(s[i]=Fl(n[i])(n[i],t[i]));return i=>{for(const r in s)e[r]=s[r](i);return e}}function DD(n,t){const e=[],s={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const r=t.types[i],o=n.indexes[r][s[r]],a=n.values[o]??0;e[i]=a,s[r]++}return e}const RD=(n,t)=>{const e=Xe.createTransformer(t),s=ci(n),i=ci(t);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?zl.has(n)&&!i.values.length||zl.has(t)&&!s.values.length?PD(n,t):pr(V0(DD(s,i),i.values),e):(ri(!0,`Complex values '${n}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Pa(n,t))};function N0(n,t,e){return typeof n=="number"&&typeof t=="number"&&typeof e=="number"?Mt(n,t,e):Fl(n)(n,t)}const OD=n=>{const t=({timestamp:e})=>n(e);return{start:(e=!0)=>At.update(t,e),stop:()=>is(t),now:()=>ne.isProcessing?ne.timestamp:ye.now()}},z0=(n,t,e=10)=>{let s="";const i=Math.max(Math.round(t/e),2);for(let r=0;r<i;r++)s+=Math.round(n(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Aa=2e4;function Bl(n){let t=0;const e=50;let s=n.next(t);for(;!s.done&&t<Aa;)t+=e,s=n.next(t);return t>=Aa?1/0:t}function ID(n,t=100,e){const s=e({...n,keyframes:[0,t]}),i=Math.min(Bl(s),Aa);return{type:"keyframes",ease:r=>s.next(i*r).value/t,duration:ze(i)}}const Vt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function jl(n,t){return n*Math.sqrt(1-t*t)}const kD=12;function LD(n,t,e){let s=e;for(let i=1;i<kD;i++)s=s-n(s)/t(s);return s}const $l=.001;function VD({duration:n=Vt.duration,bounce:t=Vt.bounce,velocity:e=Vt.velocity,mass:s=Vt.mass}){let i,r;ri(n<=Ee(Vt.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=sn(Vt.minDamping,Vt.maxDamping,o),n=sn(Vt.minDuration,Vt.maxDuration,ze(n)),o<1?(i=h=>{const u=h*o,l=u*n,f=u-e,d=jl(h,o),p=Math.exp(-l);return $l-f/d*p},r=h=>{const l=h*o*n,f=l*e+e,d=Math.pow(o,2)*Math.pow(h,2)*n,p=Math.exp(-l),m=jl(Math.pow(h,2),o);return(-i(h)+$l>0?-1:1)*((f-d)*p)/m}):(i=h=>{const u=Math.exp(-h*n),l=(h-e)*n+1;return-$l+u*l},r=h=>{const u=Math.exp(-h*n),l=(e-h)*(n*n);return u*l});const a=5/n,c=LD(i,r,a);if(n=Ee(n),isNaN(c))return{stiffness:Vt.stiffness,damping:Vt.damping,duration:n};{const h=Math.pow(c,2)*s;return{stiffness:h,damping:o*2*Math.sqrt(s*h),duration:n}}}const ND=["duration","bounce"],zD=["stiffness","damping","mass"];function F0(n,t){return t.some(e=>n[e]!==void 0)}function FD(n){let t={velocity:Vt.velocity,stiffness:Vt.stiffness,damping:Vt.damping,mass:Vt.mass,isResolvedFromDuration:!1,...n};if(!F0(n,zD)&&F0(n,ND))if(t.velocity=0,n.visualDuration){const e=n.visualDuration,s=2*Math.PI/(e*1.2),i=s*s,r=2*sn(.05,1,1-(n.bounce||0))*Math.sqrt(i);t={...t,mass:Vt.mass,stiffness:i,damping:r}}else{const e=VD({...n,velocity:0});t={...t,...e,mass:Vt.mass},t.isResolvedFromDuration=!0}return t}function Ma(n=Vt.visualDuration,t=Vt.bounce){const e=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:t}:n;let{restSpeed:s,restDelta:i}=e;const r=e.keyframes[0],o=e.keyframes[e.keyframes.length-1],a={done:!1,value:r},{stiffness:c,damping:h,mass:u,duration:l,velocity:f,isResolvedFromDuration:d}=FD({...e,velocity:-ze(e.velocity||0)}),p=f||0,m=h/(2*Math.sqrt(c*u)),y=o-r,g=ze(Math.sqrt(c/u)),v=Math.abs(y)<5;s||(s=v?Vt.restSpeed.granular:Vt.restSpeed.default),i||(i=v?Vt.restDelta.granular:Vt.restDelta.default);let x,b,E,_,D,V;if(m<1)E=jl(g,m),_=(p+m*g*y)/E,x=N=>{const U=Math.exp(-m*g*N);return o-U*(_*Math.sin(E*N)+y*Math.cos(E*N))},D=m*g*_+y*E,V=m*g*y-_*E,b=N=>Math.exp(-m*g*N)*(D*Math.sin(E*N)+V*Math.cos(E*N));else if(m===1){x=U=>o-Math.exp(-g*U)*(y+(p+g*y)*U);const N=p+g*y;b=U=>Math.exp(-g*U)*(g*N*U-p)}else{const N=g*Math.sqrt(m*m-1);x=it=>{const nt=Math.exp(-m*g*it),et=Math.min(N*it,300);return o-nt*((p+m*g*y)*Math.sinh(et)+N*y*Math.cosh(et))/N};const U=(p+m*g*y)/N,Y=m*g*U-y*N,st=m*g*y-U*N;b=it=>{const nt=Math.exp(-m*g*it),et=Math.min(N*it,300);return nt*(Y*Math.sinh(et)+st*Math.cosh(et))}}const O={calculatedDuration:d&&l||null,velocity:N=>Ee(b(N)),next:N=>{if(!d&&m<1){const Y=Math.exp(-m*g*N),st=Math.sin(E*N),it=Math.cos(E*N),nt=o-Y*(_*st+y*it),et=Ee(Y*(D*st+V*it));return a.done=Math.abs(et)<=s&&Math.abs(o-nt)<=i,a.value=a.done?o:nt,a}const U=x(N);if(d)a.done=N>=l;else{const Y=Ee(b(N));a.done=Math.abs(Y)<=s&&Math.abs(o-U)<=i}return a.value=a.done?o:U,a},toString:()=>{const N=Math.min(Bl(O),Aa),U=z0(Y=>O.next(N*Y).value,N,30);return N+"ms "+U},toTransition:()=>{}};return O}Ma.applyToOptions=n=>{const t=ID(n,100,Ma);return n.ease=t.ease,n.duration=Ee(t.duration),n.type="keyframes",n};const BD=5;function B0(n,t,e){const s=Math.max(t-BD,0);return o0(e-n(s),t-s)}function Ul({keyframes:n,velocity:t=0,power:e=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:c,restDelta:h=.5,restSpeed:u}){const l=n[0],f={done:!1,value:l},d=V=>a!==void 0&&V<a||c!==void 0&&V>c,p=V=>a===void 0?c:c===void 0||Math.abs(a-V)<Math.abs(c-V)?a:c;let m=e*t;const y=l+m,g=o===void 0?y:o(y);g!==y&&(m=g-l);const v=V=>-m*Math.exp(-V/s),x=V=>g+v(V),b=V=>{const O=v(V),N=x(V);f.done=Math.abs(O)<=h,f.value=f.done?g:N};let E,_;const D=V=>{d(f.value)&&(E=V,_=Ma({keyframes:[f.value,p(f.value)],velocity:B0(x,V,f.value),damping:i,stiffness:r,restDelta:h,restSpeed:u}))};return D(0),{calculatedDuration:null,next:V=>{let O=!1;return!_&&E===void 0&&(O=!0,b(V),D(V)),E!==void 0&&V>=E?_.next(V-E):(!O&&b(V),f)}}}function jD(n,t,e){const s=[],i=e||ss.mix||N0,r=n.length-1;for(let o=0;o<r;o++){let a=i(n[o],n[o+1]);if(t){const c=Array.isArray(t)?t[o]||Ne:t;a=pr(c,a)}s.push(a)}return s}function $D(n,t,{clamp:e=!0,ease:s,mixer:i}={}){const r=n.length;if(Rn(r===t.length,"Both input and output ranges must be the same length","range-length"),r===1)return()=>t[0];if(r===2&&t[0]===t[1])return()=>t[1];const o=n[0]===n[1];n[0]>n[r-1]&&(n=[...n].reverse(),t=[...t].reverse());const a=jD(t,s,i),c=a.length,h=u=>{if(o&&u<n[0])return t[0];let l=0;if(c>1)for(;l<n.length-2&&!(u<n[l+1]);l++);const f=gr(n[l],n[l+1],u);return a[l](f)};return e?u=>h(sn(n[0],n[r-1],u)):h}function UD(n,t){const e=n[n.length-1];for(let s=1;s<=t;s++){const i=gr(0,t,s);n.push(Mt(e,1,i))}}function YD(n){const t=[0];return UD(t,n.length-1),t}function GD(n,t){return n.map(e=>e*t)}function XD(n,t){return n.map(()=>t||y0).splice(0,n.length-1)}function hi({duration:n=300,keyframes:t,times:e,ease:s="easeInOut"}){const i=eD(s)?s.map(w0):w0(s),r={done:!1,value:t[0]},o=GD(e&&e.length===t.length?e:YD(t),n),a=$D(o,t,{ease:Array.isArray(i)?i:XD(t,i)});return{calculatedDuration:n,next:c=>(r.value=a(c),r.done=c>=n,r)}}const WD=n=>n!==null;function Da(n,{repeat:t,repeatType:e="loop"},s,i=1){const r=n.filter(WD),a=i<0||t&&e!=="loop"&&t%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const HD={decay:Ul,inertia:Ul,tween:hi,keyframes:hi,spring:Ma};function j0(n){typeof n.type=="string"&&(n.type=HD[n.type])}class Yl{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const qD=n=>n/100;class Ra extends Yl{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:e}=this.options;e&&e.updatedAt!==ye.now()&&this.tick(ye.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;j0(t);const{type:e=hi,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=t;let{keyframes:a}=t;const c=e||hi;({}).NODE_ENV!=="production"&&c!==hi&&Rn(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==hi&&typeof a[0]!="number"&&(this.mixKeyframes=pr(qD,N0(a[0],a[1])),a=[0,100]);const h=c({...t,keyframes:a});r==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-o})),h.calculatedDuration===null&&(h.calculatedDuration=Bl(h));const{calculatedDuration:u}=h;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=h}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return s.next(0);const{delay:h=0,keyframes:u,repeat:l,repeatType:f,repeatDelay:d,type:p,onUpdate:m,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-h*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let x=this.currentTime,b=s;if(l){const V=Math.min(this.currentTime,i)/a;let O=Math.floor(V),N=V%1;!N&&V>=1&&(N=1),N===1&&O--,O=Math.min(O,l+1),!!(O%2)&&(f==="reverse"?(N=1-N,d&&(N-=d/a)):f==="mirror"&&(b=o)),x=sn(0,1,N)*a}let E;v?(this.delayState.value=u[0],E=this.delayState):E=b.next(x),r&&!v&&(E.value=r(E.value));let{done:_}=E;!v&&c!==null&&(_=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return D&&p!==Ul&&(E.value=Da(u,this.options,y,this.speed)),m&&m(E.value),D&&this.finish(),E}then(t,e){return this.finished.then(t,e)}get duration(){return ze(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ze(t)}get time(){return ze(this.currentTime)}set time(t){t=Ee(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const e=this.generator.next(t).value;return B0(s=>this.generator.next(s).value,t,e)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(ye.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=ze(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=OD,startTime:e}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=e??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ye.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function KD(n){for(let t=1;t<n.length;t++)n[t]??(n[t]=n[t-1])}const Ms=n=>n*180/Math.PI,Gl=n=>{const t=Ms(Math.atan2(n[1],n[0]));return Xl(t)},JD={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:n=>(Math.abs(n[0])+Math.abs(n[3]))/2,rotate:Gl,rotateZ:Gl,skewX:n=>Ms(Math.atan(n[1])),skewY:n=>Ms(Math.atan(n[2])),skew:n=>(Math.abs(n[1])+Math.abs(n[2]))/2},Xl=n=>(n=n%360,n<0&&(n+=360),n),$0=Gl,U0=n=>Math.sqrt(n[0]*n[0]+n[1]*n[1]),Y0=n=>Math.sqrt(n[4]*n[4]+n[5]*n[5]),ZD={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:U0,scaleY:Y0,scale:n=>(U0(n)+Y0(n))/2,rotateX:n=>Xl(Ms(Math.atan2(n[6],n[5]))),rotateY:n=>Xl(Ms(Math.atan2(-n[2],n[0]))),rotateZ:$0,rotate:$0,skewX:n=>Ms(Math.atan(n[4])),skewY:n=>Ms(Math.atan(n[1])),skew:n=>(Math.abs(n[1])+Math.abs(n[4]))/2};function Wl(n){return n.includes("scale")?1:0}function Hl(n,t){if(!n||n==="none")return Wl(t);const e=n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(e)s=ZD,i=e;else{const a=n.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=JD,i=a}if(!i)return Wl(t);const r=s[t],o=i[1].split(",").map(tR);return typeof r=="function"?r(o):o[r]}const QD=(n,t)=>{const{transform:e="none"}=getComputedStyle(n);return Hl(e,t)};function tR(n){return parseFloat(n.trim())}const ui=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],li=(()=>new Set([...ui,"pathRotation"]))(),G0=n=>n===oi||n===Z,eR=new Set(["x","y","z"]),nR=ui.filter(n=>!eR.has(n));function sR(n){const t=[];return nR.forEach(e=>{const s=n.getValue(e);s!==void 0&&(t.push([e,s.get()]),s.set(e.startsWith("scale")?1:0))}),t}const rs={width:({x:n},{paddingLeft:t="0",paddingRight:e="0",boxSizing:s})=>{const i=n.max-n.min;return s==="border-box"?i:i-parseFloat(t)-parseFloat(e)},height:({y:n},{paddingTop:t="0",paddingBottom:e="0",boxSizing:s})=>{const i=n.max-n.min;return s==="border-box"?i:i-parseFloat(t)-parseFloat(e)},top:(n,{top:t})=>parseFloat(t),left:(n,{left:t})=>parseFloat(t),bottom:({y:n},{top:t})=>parseFloat(t)+(n.max-n.min),right:({x:n},{left:t})=>parseFloat(t)+(n.max-n.min),x:(n,{transform:t})=>Hl(t,"x"),y:(n,{transform:t})=>Hl(t,"y")};rs.translateX=rs.x,rs.translateY=rs.y;const Ds=new Set;let ql=!1,Kl=!1,Jl=!1;function X0(){if(Kl){const n=Array.from(Ds).filter(s=>s.needsMeasurement),t=new Set(n.map(s=>s.element)),e=new Map;t.forEach(s=>{const i=sR(s);i.length&&(e.set(s,i),s.render())}),n.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const i=e.get(s);i&&i.forEach(([r,o])=>{s.getValue(r)?.set(o)})}),n.forEach(s=>s.measureEndState()),n.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Kl=!1,ql=!1,Ds.forEach(n=>n.complete(Jl)),Ds.clear()}function W0(){Ds.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(Kl=!0)})}function iR(){Jl=!0,W0(),X0(),Jl=!1}class Zl{constructor(t,e,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Ds.add(this),ql||(ql=!0,At.read(W0),At.resolveKeyframes(X0))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:s,motionValue:i}=this;if(t[0]===null){const r=i?.get(),o=t[t.length-1];if(r!==void 0)t[0]=r;else if(s&&e){const a=s.readValue(e,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),i&&r===void 0&&i.set(t[0])}KD(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ds.delete(this)}cancel(){this.state==="scheduled"&&(Ds.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const rR=n=>n.startsWith("--");function H0(n,t,e){rR(t)?n.style.setProperty(t,e):n.style[t]=e}const oR={};function q0(n,t){const e=r0(n);return()=>oR[t]??e()}const aR=q0(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),K0=q0(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),xr=([n,t,e,s])=>`cubic-bezier(${n}, ${t}, ${e}, ${s})`,J0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:xr([0,.65,.55,1]),circOut:xr([.55,0,1,.45]),backIn:xr([.31,.01,.66,-.59]),backOut:xr([.33,1.53,.69,.99])};function Z0(n,t){if(n)return typeof n=="function"?K0()?z0(n,t):"ease-out":v0(n)?xr(n):Array.isArray(n)?n.map(e=>Z0(e,t)||J0.easeOut):J0[n]}function cR(n,t,e,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:c}={},h=void 0){const u={[t]:e};c&&(u.offset=c);const l=Z0(a,i);Array.isArray(l)&&(u.easing=l);const f={delay:s,duration:i,easing:Array.isArray(l)?"linear":l,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return h&&(f.pseudoElement=h),n.animate(u,f)}function Q0(n){return typeof n=="function"&&"applyToOptions"in n}function hR({type:n,...t}){return Q0(n)&&K0()?n.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class t1 extends Yl{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=t,Rn(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const h=hR(t);this.animation=cR(e,s,i,h,r),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const u=Da(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),H0(e,s,u),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ze(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ze(t)}get time(){return ze(Number(this.animation.currentTime)||0)}set time(t){const e=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ee(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:e,rangeEnd:s,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&aR()?(this.animation.timeline=t,e&&(this.animation.rangeStart=e),s&&(this.animation.rangeEnd=s),Ne):i(this)}}const e1={anticipate:m0,backInOut:d0,circInOut:g0};function uR(n){return n in e1}function lR(n){typeof n.ease=="string"&&uR(n.ease)&&(n.ease=e1[n.ease])}const Ql=10;class fR extends t1{constructor(t){lR(t),j0(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!e)return;if(t!==void 0){e.set(t);return}const a=new Ra({...o,autoplay:!1}),c=Math.max(Ql,ye.now()-this.startTime),h=sn(0,Ql,c-Ql),u=a.sample(c).value,{name:l}=this.options;r&&l&&H0(r,l,u),e.setWithVelocity(a.sample(Math.max(0,c-h)).value,u,h),a.stop()}}const n1=(n,t)=>t==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(Xe.test(n)||n==="0")&&!n.startsWith("url("));function dR(n){const t=n[0];if(n.length===1)return!0;for(let e=0;e<n.length;e++)if(n[e]!==t)return!0}function mR(n,t,e,s){const i=n[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const r=n[n.length-1],o=n1(i,t),a=n1(r,t);return ri(o===a,`You are trying to animate ${t} from "${i}" to "${r}". "${o?r:i}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:dR(n)||(e==="spring"||Q0(e))&&s}function tf(n){n.duration=0,n.type="keyframes"}const s1=new Set(["opacity","clipPath","filter","transform"]),pR=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function gR(n){for(let t=0;t<n.length;t++)if(typeof n[t]=="string"&&pR.test(n[t]))return!0;return!1}const yR=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),vR=r0(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function bR(n){const{motionValue:t,name:e,repeatDelay:s,repeatType:i,damping:r,type:o,keyframes:a}=n;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:h,transformTemplate:u}=t.owner.getProps();return vR()&&e&&(s1.has(e)||yR.has(e)&&gR(a))&&(e!=="transform"||!u)&&!h&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const wR=40;class xR extends Yl{constructor({autoplay:t=!0,delay:e=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:c,motionValue:h,element:u,...l}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ye.now();const f={autoplay:t,delay:e,type:s,repeat:i,repeatDelay:r,repeatType:o,name:c,motionValue:h,element:u,...l},d=u?.KeyframeResolver||Zl;this.keyframeResolver=new d(a,(p,m,y)=>this.onKeyframesResolved(p,m,f,!y),c,h,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:c,isHandoff:h,onUpdate:u}=s;this.resolvedAt=ye.now();let l=!0;mR(t,r,o,a)||(l=!1,(ss.instantAnimations||!c)&&u?.(Da(t,s,e)),t[0]=t[t.length-1],tf(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>wR?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:e,...s,keyframes:t},p=l&&!h&&bR(d),m=d.motionValue?.owner?.current;let y;if(p)try{y=new fR({...d,element:m})}catch{y=new Ra(d)}else y=new Ra(d);y.finished.then(()=>{this.notifyFinished()}).catch(Ne),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),iR()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function i1(n,t,e,s=0,i=1){const r=Array.from(n).sort((h,u)=>h.sortNodePosition(u)).indexOf(t),o=n.size,a=(o-1)*s;return typeof e=="function"?e(r,o):i===1?r*s:a-r*s}const r1=30,SR=n=>!isNaN(parseFloat(n));class _R{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=ye.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=ye.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=SR(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return{}.NODE_ENV!=="production"&&c0(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Pl);const s=this.events[t].add(e);return t==="change"?()=>{s(),At.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,s){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ye.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>r1)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,r1);return o0(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function fi(n,t){return new _R(n,t)}function o1(n,t){if(n?.inherit&&t){const{inherit:e,...s}=n;return{...t,...s}}return n}function ef(n,t){const e=n?.[t]??n?.default??n;return e!==n?o1(e,n):e}const ER={type:"spring",stiffness:500,damping:25,restSpeed:10},TR=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),CR={type:"keyframes",duration:.8},PR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},AR=(n,{keyframes:t})=>t.length>2?CR:li.has(n)?n.startsWith("scale")?TR(t[1]):ER:PR,MR=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function DR(n){for(const t in n)if(!MR.has(t))return!0;return!1}const nf=(n,t,e,s={},i,r)=>o=>{const a=ef(s,n)||{},c=a.delay||s.delay||0;let{elapsed:h=0}=s;h=h-Ee(c);const u={keyframes:Array.isArray(e)?e:[null,e],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-h,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:n,motionValue:t,element:r?void 0:i};DR(a)||Object.assign(u,AR(n,u)),u.duration&&(u.duration=Ee(u.duration)),u.repeatDelay&&(u.repeatDelay=Ee(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let l=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(tf(u),u.delay===0&&(l=!0)),(ss.instantAnimations||ss.skipAnimations||i?.shouldSkipAnimations||a.skipAnimations)&&(l=!0,tf(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,l&&!r&&t.get()!==void 0){const f=Da(u.keyframes,a);if(f!==void 0){At.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new Ra(u):new xR(u)},RR=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function OR(n){const t=RR.exec(n);if(!t)return[,];const[,e,s,i]=t;return[`--${e??s}`,i]}const IR=4;function a1(n,t,e=1){Rn(e<=IR,`Max CSS variable fallback depth detected in property "${n}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=OR(n);if(!s)return;const r=window.getComputedStyle(t).getPropertyValue(s);if(r){const o=r.trim();return n0(o)?parseFloat(o):o}return Rl(i)?a1(i,t,e+1):i}function c1(n){const t=[{},{}];return n?.values.forEach((e,s)=>{t[0][s]=e.get(),t[1][s]=e.getVelocity()}),t}function sf(n,t,e,s){if(typeof t=="function"){const[i,r]=c1(s);t=t(e!==void 0?e:n.custom,i,r)}if(typeof t=="string"&&(t=n.variants&&n.variants[t]),typeof t=="function"){const[i,r]=c1(s);t=t(e!==void 0?e:n.custom,i,r)}return t}function Rs(n,t,e){const s=n.getProps();return sf(s,t,e!==void 0?e:s.custom,n)}const h1=new Set(["width","height","top","left","right","bottom",...ui]),rf=n=>Array.isArray(n);function kR(n,t,e){n.hasValue(t)?n.getValue(t).set(e):n.addValue(t,fi(e))}function LR(n){return rf(n)?n[n.length-1]||0:n}function VR(n,t){const e=Rs(n,t);let{transitionEnd:s={},transition:i={},...r}=e||{};r={...r,...s};for(const o in r){const a=LR(r[o]);kR(n,o,a)}}const se=n=>!!(n&&n.getVelocity);function NR(n){return!!(se(n)&&n.add)}function of(n,t){const e=n.getValue("willChange");if(NR(e))return e.add(t);if(!e&&ss.WillChange){const s=new ss.WillChange("auto");n.addValue("willChange",s),s.add(t)}}function af(n){return n.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const u1="data-"+af("framerAppearId");function l1(n){return n.props[u1]}function zR({protectedKeys:n,needsAnimating:t},e){const s=n.hasOwnProperty(e)&&t[e]!==!0;return t[e]=!1,s}function f1(n,t,{delay:e=0,transitionOverride:s,type:i}={}){let{transition:r,transitionEnd:o,...a}=t;const c=n.getDefaultTransition();r=r?o1(r,c):c;const h=r?.reduceMotion,u=r?.skipAnimations;s&&(r=s);const l=[],f=i&&n.animationState&&n.animationState.getState()[i],d=r?.path;d&&d.animateVisualElement(n,a,r,e,l);for(const p in a){const m=n.getValue(p,n.latestValues[p]??null),y=a[p];if(y===void 0||f&&zR(f,p))continue;const g={delay:e,...ef(r||{},p)};u&&(g.skipAnimations=!0);const v=m.get();if(v!==void 0&&!m.isAnimating()&&!Array.isArray(y)&&y===v&&!g.velocity){At.update(()=>m.set(y));continue}let x=!1;if(window.MotionHandoffAnimation){const _=l1(n);if(_){const D=window.MotionHandoffAnimation(_,p,At);D!==null&&(g.startTime=D,x=!0)}}of(n,p);const b=h??n.shouldReduceMotion;m.start(nf(p,m,y,b&&h1.has(p)?{type:!1}:g,n,x));const E=m.animation;E&&l.push(E)}if(o){const p=()=>At.update(()=>{o&&VR(n,o)});l.length?Promise.all(l).then(p):p()}return l}function cf(n,t,e={}){const s=Rs(n,t,e.type==="exit"?n.presenceContext?.custom:void 0);let{transition:i=n.getDefaultTransition()||{}}=s||{};e.transitionOverride&&(i=e.transitionOverride);const r=s?()=>Promise.all(f1(n,s,e)):()=>Promise.resolve(),o=n.variantChildren&&n.variantChildren.size?(c=0)=>{const{delayChildren:h=0,staggerChildren:u,staggerDirection:l}=i;return FR(n,t,c,h,u,l,e)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,h]=a==="beforeChildren"?[r,o]:[o,r];return c().then(()=>h())}else return Promise.all([r(),o(e.delay)])}function FR(n,t,e=0,s=0,i=0,r=1,o){const a=[];for(const c of n.variantChildren)c.notify("AnimationStart",t),a.push(cf(c,t,{...o,delay:e+(typeof s=="function"?0:s)+i1(n.variantChildren,c,s,i,r)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function BR(n,t,e={}){n.notify("AnimationStart",t);let s;if(Array.isArray(t)){const i=t.map(r=>cf(n,r,e));s=Promise.all(i)}else if(typeof t=="string")s=cf(n,t,e);else{const i=typeof t=="function"?Rs(n,t,e.custom):t;s=Promise.all(f1(n,i,e))}return s.then(()=>{n.notify("AnimationComplete",t)})}const jR={test:n=>n==="auto",parse:n=>n},d1=n=>t=>t.test(n),m1=[oi,Z,rn,On,dD,fD,jR],p1=n=>m1.find(d1(n));function $R(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||i0(n):!0}const UR=new Set(["brightness","contrast","saturate","opacity"]);function YR(n){const[t,e]=n.slice(0,-1).split("(");if(t==="drop-shadow")return n;const[s]=e.match(Ol)||[];if(!s)return n;const i=e.replace(s,"");let r=UR.has(t)?1:0;return s!==e&&(r*=100),t+"("+r+i+")"}const GR=/\b([a-z-]*)\(.*?\)/gu,hf={...Xe,getAnimatableNone:n=>{const t=n.match(GR);return t?t.map(YR).join(" "):n}},uf={...Xe,getAnimatableNone:n=>{const t=Xe.parse(n);return Xe.createTransformer(n)(t.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},g1={...oi,transform:Math.round},Oa={borderWidth:Z,borderTopWidth:Z,borderRightWidth:Z,borderBottomWidth:Z,borderLeftWidth:Z,borderRadius:Z,borderTopLeftRadius:Z,borderTopRightRadius:Z,borderBottomRightRadius:Z,borderBottomLeftRadius:Z,width:Z,maxWidth:Z,height:Z,maxHeight:Z,top:Z,right:Z,bottom:Z,left:Z,inset:Z,insetBlock:Z,insetBlockStart:Z,insetBlockEnd:Z,insetInline:Z,insetInlineStart:Z,insetInlineEnd:Z,padding:Z,paddingTop:Z,paddingRight:Z,paddingBottom:Z,paddingLeft:Z,paddingBlock:Z,paddingBlockStart:Z,paddingBlockEnd:Z,paddingInline:Z,paddingInlineStart:Z,paddingInlineEnd:Z,margin:Z,marginTop:Z,marginRight:Z,marginBottom:Z,marginLeft:Z,marginBlock:Z,marginBlockStart:Z,marginBlockEnd:Z,marginInline:Z,marginInlineStart:Z,marginInlineEnd:Z,fontSize:Z,backgroundPositionX:Z,backgroundPositionY:Z,...{rotate:On,pathRotation:On,rotateX:On,rotateY:On,rotateZ:On,scale:Ca,scaleX:Ca,scaleY:Ca,scaleZ:Ca,skew:On,skewX:On,skewY:On,distance:Z,translateX:Z,translateY:Z,translateZ:Z,x:Z,y:Z,z:Z,perspective:Z,transformPerspective:Z,opacity:vr,originX:M0,originY:M0,originZ:Z},zIndex:g1,fillOpacity:vr,strokeOpacity:vr,numOctaves:g1},XR={...Oa,color:Yt,backgroundColor:Yt,outlineColor:Yt,fill:Yt,stroke:Yt,borderColor:Yt,borderTopColor:Yt,borderRightColor:Yt,borderBottomColor:Yt,borderLeftColor:Yt,filter:hf,WebkitFilter:hf,mask:uf,WebkitMask:uf},y1=n=>XR[n],WR=new Set([hf,uf]);function v1(n,t){let e=y1(n);return WR.has(e)||(e=Xe),e.getAnimatableNone?e.getAnimatableNone(t):void 0}const HR=new Set(["auto","none","0"]);function qR(n,t,e){let s=0,i;for(;s<n.length&&!i;){const r=n[s];typeof r=="string"&&!HR.has(r)&&ci(r).values.length&&(i=n[s]),s++}if(i&&e)for(const r of t)n[r]=v1(e,i)}class KR extends Zl{constructor(t,e,s,i,r){super(t,e,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:s}=this;if(!e||!e.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let l=t[u];if(typeof l=="string"&&(l=l.trim(),Rl(l))){const f=a1(l,e.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!h1.has(s)||t.length!==2)return;const[i,r]=t,o=p1(i),a=p1(r),c=P0(i),h=P0(r);if(c!==h&&rs[s]){this.needsMeasurement=!0;return}if(o!==a)if(G0(o)&&G0(a))for(let u=0;u<t.length;u++){const l=t[u];typeof l=="string"&&(t[u]=parseFloat(l))}else rs[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,s=[];for(let i=0;i<t.length;i++)(t[i]===null||$R(t[i]))&&s.push(i);s.length&&qR(t,s,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=rs[s](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];i!==void 0&&t.getValue(s,i).jump(i,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const i=t.getValue(e);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=rs[e](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,c])=>{t.getValue(a).set(c)}),this.resolveNoneKeyframes()}}function b1(n,t,e){if(n==null)return[];if(n instanceof EventTarget)return[n];if(typeof n=="string"){let s=document;t&&(s=t.current);const i=e?.[n]??s.querySelectorAll(n);return i?Array.from(i):[]}return Array.from(n).filter(s=>s!=null)}const lf=(n,t)=>t&&typeof n=="number"?t.transform(n):n;function JR(n){return s0(n)&&"offsetHeight"in n&&!("ownerSVGElement"in n)}const{schedule:ff,cancel:h5}=E0(queueMicrotask,!1),We={x:!1,y:!1};function w1(){return We.x||We.y}function ZR(n){return n==="x"||n==="y"?We[n]?null:(We[n]=!0,()=>{We[n]=!1}):We.x||We.y?null:(We.x=We.y=!0,()=>{We.x=We.y=!1})}function x1(n,t){const e=b1(n),s=new AbortController,i={passive:!0,...t,signal:s.signal};return[e,i,()=>s.abort()]}function QR(n){return!(n.pointerType==="touch"||w1())}function t3(n,t,e={}){const[s,i,r]=x1(n,e);return s.forEach(o=>{let a=!1,c=!1,h;const u=()=>{o.removeEventListener("pointerleave",p)},l=y=>{h&&(h(y),h=void 0),u()},f=y=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),c&&(c=!1,l(y))},d=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},p=y=>{if(y.pointerType!=="touch"){if(a){c=!0;return}l(y)}},m=y=>{if(!QR(y))return;c=!1;const g=t(o,y);typeof g=="function"&&(h=g,o.addEventListener("pointerleave",p,i))};o.addEventListener("pointerenter",m,i),o.addEventListener("pointerdown",d,i)}),r}const S1=(n,t)=>t?n===t?!0:S1(n,t.parentElement):!1,df=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1,e3=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function n3(n){return e3.has(n.tagName)||n.isContentEditable===!0}const s3=new Set(["INPUT","SELECT","TEXTAREA"]);function i3(n){return s3.has(n.tagName)||n.isContentEditable===!0}const Ia=new WeakSet;function _1(n){return t=>{t.key==="Enter"&&n(t)}}function mf(n,t){n.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const r3=(n,t)=>{const e=n.currentTarget;if(!e)return;const s=_1(()=>{if(Ia.has(e))return;mf(e,"down");const i=_1(()=>{mf(e,"up")}),r=()=>mf(e,"cancel");e.addEventListener("keyup",i,t),e.addEventListener("blur",r,t)});e.addEventListener("keydown",s,t),e.addEventListener("blur",()=>e.removeEventListener("keydown",s),t)};function E1(n){return df(n)&&!w1()}const T1=new WeakSet;function o3(n,t,e={}){const[s,i,r]=x1(n,e),o=a=>{const c=a.currentTarget;if(!E1(a)||T1.has(a))return;Ia.add(c),e.stopPropagation&&T1.add(a);const h=t(c,a),u={...i,capture:!0},l=(p,m)=>{window.removeEventListener("pointerup",f,u),window.removeEventListener("pointercancel",d,u),Ia.has(c)&&Ia.delete(c),E1(p)&&typeof h=="function"&&h(p,{success:m})},f=p=>{l(p,c===window||c===document||e.useGlobalTarget||S1(c,p.target))},d=p=>{l(p,!1)};window.addEventListener("pointerup",f,u),window.addEventListener("pointercancel",d,u)};return s.forEach(a=>{(e.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),JR(a)&&(a.addEventListener("focus",h=>r3(h,i)),!n3(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function pf(n){return s0(n)&&"ownerSVGElement"in n}const ka=new WeakMap;let La;const C1=(n,t,e)=>(s,i)=>i&&i[0]?i[0][n+"Size"]:pf(s)&&"getBBox"in s?s.getBBox()[t]:s[e],a3=C1("inline","width","offsetWidth"),c3=C1("block","height","offsetHeight");function h3({target:n,borderBoxSize:t}){ka.get(n)?.forEach(e=>{e(n,{get width(){return a3(n,t)},get height(){return c3(n,t)}})})}function u3(n){n.forEach(h3)}function l3(){typeof ResizeObserver>"u"||(La=new ResizeObserver(u3))}function f3(n,t){La||l3();const e=b1(n);return e.forEach(s=>{let i=ka.get(s);i||(i=new Set,ka.set(s,i)),i.add(t),La?.observe(s)}),()=>{e.forEach(s=>{const i=ka.get(s);i?.delete(t),i?.size||La?.unobserve(s)})}}const Va=new Set;let di;function d3(){di=()=>{const n={get width(){return window.innerWidth},get height(){return window.innerHeight}};Va.forEach(t=>t(n))},window.addEventListener("resize",di)}function m3(n){return Va.add(n),di||d3(),()=>{Va.delete(n),!Va.size&&typeof di=="function"&&(window.removeEventListener("resize",di),di=void 0)}}function P1(n,t){return typeof n=="function"?m3(n):f3(n,t)}function p3(n){return pf(n)&&n.tagName==="svg"}const g3=[...m1,Yt,Xe],y3=n=>g3.find(d1(n)),A1=()=>({translate:0,scale:1,origin:0,originPoint:0}),mi=()=>({x:A1(),y:A1()}),M1=()=>({min:0,max:0}),Ht=()=>({x:M1(),y:M1()}),v3=new WeakMap;function Na(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}function Sr(n){return typeof n=="string"||Array.isArray(n)}const gf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],yf=["initial",...gf];function za(n){return Na(n.animate)||yf.some(t=>Sr(n[t]))}function D1(n){return!!(za(n)||n.variants)}function b3(n,t,e){for(const s in t){const i=t[s],r=e[s];if(se(i))n.addValue(s,i);else if(se(r))n.addValue(s,fi(i,{owner:n}));else if(r!==i)if(n.hasValue(s)){const o=n.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=n.getStaticValue(s);n.addValue(s,fi(o!==void 0?o:i,{owner:n}))}}for(const s in e)t[s]===void 0&&n.removeValue(s);return t}const vf={current:null},R1={current:!1},w3=typeof window<"u";function x3(){if(R1.current=!0,!!w3)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),t=()=>vf.current=n.matches;n.addEventListener("change",t),t()}else vf.current=!1}const O1=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Fa={};function I1(n){Fa=n}function S3(){return Fa}class _3{scrapeMotionValuesFromProps(t,e,s){return{}}constructor({parent:t,props:e,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:o,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Zl,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=ye.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,At.render(this.render,!1,!0))};const{latestValues:h,renderState:u}=a;this.latestValues=h,this.baseTarget={...h},this.initialValues=e.initial?{...h}:{},this.renderState=u,this.parent=t,this.props=e,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=za(e),this.isVariantNode=D1(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:l,...f}=this.scrapeMotionValuesFromProps(e,{},this);for(const d in f){const p=f[d];h[d]!==void 0&&se(p)&&p.set(h[d])}}mount(t){if(this.hasBeenMounted)for(const e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=t,v3.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,s)=>this.bindToMotionValue(s,e)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(R1.current||x3(),this.shouldReduceMotion=vf.current),{}.NODE_ENV!=="production"&&c0(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),is(this.notifyUpdate),is(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&s1.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:c,ease:h,duration:u}=e.accelerate,l=new t1({element:this.current,name:t,keyframes:a,times:c,ease:h,duration:Ee(u)}),f=o(l);this.valueSubscriptions.set(t,()=>{f(),l.cancel()});return}const s=li.has(t);s&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&At.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),r&&r()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Fa){const e=Fa[t];if(!e)continue;const{isEnabled:s,Feature:i}=e;if(!this.features[t]&&i&&s(this.props)&&(this.features[t]=new i(this)),this.features[t]){const r=this.features[t];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ht()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let s=0;s<O1.length;s++){const i=O1[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=t[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=b3(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const s=this.values.get(t);e!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&e!==void 0&&(s=fi(e===null?void 0:e,{owner:this}),this.addValue(t,s)),s}readValue(t,e){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(n0(s)||i0(s))?s=parseFloat(s):!y3(s)&&Xe.test(e)&&(s=v1(t,e)),this.setBaseTarget(t,se(s)?s.get():s)),se(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let s;if(typeof e=="string"||typeof e=="object"){const r=sf(this.props,e,this.presenceContext?.custom);r&&(s=r[t])}if(e&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!se(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,e){return this.events[t]||(this.events[t]=new Pl),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){ff.render(this.render)}}class k1 extends _3{constructor(){super(...arguments),this.KeyframeResolver=KR}sortInstanceNodePosition(t,e){return t.compareDocumentPosition(e)&2?1:-1}getBaseTargetFromProps(t,e){const s=t.style;return s?s[e]:void 0}removeValueFromRenderState(t,{vars:e,style:s}){delete e[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;se(t)&&(this.childSubscription=t.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}class os{constructor(t){this.isMounted=!1,this.node=t}update(){}}function L1({top:n,left:t,right:e,bottom:s}){return{x:{min:t,max:e},y:{min:n,max:s}}}function E3({x:n,y:t}){return{top:t.min,right:n.max,bottom:t.max,left:n.min}}function T3(n,t){if(!t)return n;const e=t({x:n.left,y:n.top}),s=t({x:n.right,y:n.bottom});return{top:e.y,left:e.x,bottom:s.y,right:s.x}}function bf(n){return n===void 0||n===1}function wf({scale:n,scaleX:t,scaleY:e}){return!bf(n)||!bf(t)||!bf(e)}function Os(n){return wf(n)||V1(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function V1(n){return N1(n.x)||N1(n.y)}function N1(n){return n&&n!=="0%"}function Ba(n,t,e){const s=n-e,i=t*s;return e+i}function z1(n,t,e,s,i){return i!==void 0&&(n=Ba(n,i,s)),Ba(n,e,s)+t}function xf(n,t=0,e=1,s,i){n.min=z1(n.min,t,e,s,i),n.max=z1(n.max,t,e,s,i)}function F1(n,{x:t,y:e}){xf(n.x,t.translate,t.scale,t.originPoint),xf(n.y,e.translate,e.scale,e.originPoint)}const B1=.999999999999,j1=1.0000000000001;function C3(n,t,e,s=!1){const i=e.length;if(!i)return;t.x=t.y=1;let r,o;for(let a=0;a<i;a++){r=e[a],o=r.projectionDelta;const{visualElement:c}=r.options;c&&c.props.style&&c.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(on(n.x,-r.scroll.offset.x),on(n.y,-r.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,F1(n,o)),s&&Os(r.latestValues)&&ja(n,r.latestValues,r.layout?.layoutBox))}t.x<j1&&t.x>B1&&(t.x=1),t.y<j1&&t.y>B1&&(t.y=1)}function on(n,t){n.min+=t,n.max+=t}function $1(n,t,e,s,i=.5){const r=Mt(n.min,n.max,i);xf(n,t,e,r,s)}function U1(n,t){return typeof n=="string"?parseFloat(n)/100*(t.max-t.min):n}function ja(n,t,e){const s=e??n;$1(n.x,U1(t.x,s.x),t.scaleX,t.scale,t.originX),$1(n.y,U1(t.y,s.y),t.scaleY,t.scale,t.originY)}function Y1(n,t){return L1(T3(n.getBoundingClientRect(),t))}function P3(n,t,e){const s=Y1(n,e),{scroll:i}=t;return i&&(on(s.x,i.offset.x),on(s.y,i.offset.y)),s}const A3={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},M3=ui.length;function D3(n,t,e){let s="",i=!0;for(let o=0;o<M3;o++){const a=ui[o],c=n[a];if(c===void 0)continue;let h=!0;if(typeof c=="number")h=c===(a.startsWith("scale")?1:0);else{const u=parseFloat(c);h=a.startsWith("scale")?u===1:u===0}if(!h||e){const u=lf(c,Oa[a]);if(!h){i=!1;const l=A3[a]||a;s+=`${l}(${u}) `}e&&(t[a]=u)}}const r=n.pathRotation;return r&&(i=!1,s+=`rotate(${lf(r,Oa.pathRotation)}) `),s=s.trim(),e?s=e(t,i?"":s):i&&(s="none"),s}function Sf(n,t,e){const{style:s,vars:i,transformOrigin:r}=n;let o=!1,a=!1;for(const c in t){const h=t[c];if(li.has(c)){o=!0;continue}else if(C0(c)){i[c]=h;continue}else{const u=lf(h,Oa[c]);c.startsWith("origin")?(a=!0,r[c]=u):s[c]=u}}if(t.transform||(o||e?s.transform=D3(t,n.transform,e):s.transform&&(s.transform="none")),a){const{originX:c="50%",originY:h="50%",originZ:u=0}=r;s.transformOrigin=`${c} ${h} ${u}`}}function G1(n,{style:t,vars:e},s,i){const r=n.style;let o;for(o in t)r[o]=t[o];i?.applyProjectionStyles(r,s);for(o in e)r.setProperty(o,e[o])}function X1(n,t){return t.max===t.min?0:n/(t.max-t.min)*100}const _r={correct:(n,t)=>{if(!t.target)return n;if(typeof n=="string")if(Z.test(n))n=parseFloat(n);else return n;const e=X1(n,t.target.x),s=X1(n,t.target.y);return`${e}% ${s}%`}},R3={correct:(n,{treeScale:t,projectionDelta:e})=>{const s=n,i=Xe.parse(n);if(i.length>5)return s;const r=Xe.createTransformer(n),o=typeof i[0]!="number"?1:0,a=e.x.scale*t.x,c=e.y.scale*t.y;i[0+o]/=a,i[1+o]/=c;const h=Mt(a,c,.5);return typeof i[2+o]=="number"&&(i[2+o]/=h),typeof i[3+o]=="number"&&(i[3+o]/=h),r(i)}},_f={borderRadius:{..._r,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:_r,borderTopRightRadius:_r,borderBottomLeftRadius:_r,borderBottomRightRadius:_r,boxShadow:R3};function W1(n,{layout:t,layoutId:e}){return li.has(n)||n.startsWith("origin")||(t||e!==void 0)&&(!!_f[n]||n==="opacity")}function Ef(n,t,e){const s=n.style,i=t?.style,r={};if(!s)return r;for(const o in s)(se(s[o])||i&&se(i[o])||W1(o,n)||e?.getValue(o)?.liveStyle!==void 0)&&(r[o]=s[o]);return r}function O3(n){return window.getComputedStyle(n)}class I3 extends k1{constructor(){super(...arguments),this.type="html",this.renderInstance=G1}readValueFromInstance(t,e){if(li.has(e))return this.projection?.isProjecting?Wl(e):QD(t,e);{const s=O3(t),i=(C0(e)?s.getPropertyValue(e):s[e])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:e}){return Y1(t,e)}build(t,e,s){Sf(t,e,s.transformTemplate)}scrapeMotionValuesFromProps(t,e,s){return Ef(t,e,s)}}const k3={offset:"stroke-dashoffset",array:"stroke-dasharray"},L3={offset:"strokeDashoffset",array:"strokeDasharray"};function V3(n,t,e=1,s=0,i=!0){n.pathLength=1;const r=i?k3:L3;n[r.offset]=`${-s}`,n[r.array]=`${t} ${e}`}const N3=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function H1(n,{attrX:t,attrY:e,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},c,h,u){if(Sf(n,a,h),c){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:l,style:f}=n;l.transform&&(f.transform=l.transform,delete l.transform),(f.transform||l.transformOrigin)&&(f.transformOrigin=l.transformOrigin??"50% 50%",delete l.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete l.transformBox);for(const d of N3)l[d]!==void 0&&(f[d]=l[d],delete l[d]);t!==void 0&&(l.x=t),e!==void 0&&(l.y=e),s!==void 0&&(l.scale=s),i!==void 0&&V3(l,i,r,o,!1)}const q1=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),K1=n=>typeof n=="string"&&n.toLowerCase()==="svg";function z3(n,t,e,s){G1(n,t,void 0,s);for(const i in t.attrs)n.setAttribute(q1.has(i)?i:af(i),t.attrs[i])}function J1(n,t,e){const s=Ef(n,t,e);for(const i in n)if(se(n[i])||se(t[i])){const r=ui.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=n[i]}return s}class F3 extends k1{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ht}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(li.has(e)){const s=y1(e);return s&&s.default||0}return e=q1.has(e)?e:af(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,s){return J1(t,e,s)}build(t,e,s){H1(t,e,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,e,s,i){z3(t,e,s,i)}mount(t){this.isSVGTag=K1(t.tagName),super.mount(t)}}const B3=yf.length;function Z1(n){if(!n)return;if(!n.isControllingVariants){const e=n.parent?Z1(n.parent)||{}:{};return n.props.initial!==void 0&&(e.initial=n.props.initial),e}const t={};for(let e=0;e<B3;e++){const s=yf[e],i=n.props[s];(Sr(i)||i===!1)&&(t[s]=i)}return t}function Q1(n,t){if(!Array.isArray(t))return!1;const e=t.length;if(e!==n.length)return!1;for(let s=0;s<e;s++)if(t[s]!==n[s])return!1;return!0}const j3=[...gf].reverse(),$3=gf.length;function U3(n){return t=>Promise.all(t.map(({animation:e,options:s})=>BR(n,e,s)))}function Y3(n){let t=U3(n),e=tv(),s=!0,i=!1;const r=h=>(u,l)=>{const f=Rs(n,l,h==="exit"?n.presenceContext?.custom:void 0);if(f){const{transition:d,transitionEnd:p,...m}=f;u={...u,...m,...p}}return u};function o(h){t=h(n)}function a(h){const{props:u}=n,l=Z1(n.parent)||{},f=[],d=new Set;let p={},m=1/0;for(let g=0;g<$3;g++){const v=j3[g],x=e[v],b=u[v]!==void 0?u[v]:l[v],E=Sr(b),_=v===h?x.isActive:null;_===!1&&(m=g);let D=b===l[v]&&b!==u[v]&&E;if(D&&(s||i)&&n.manuallyAnimateOnMount&&(D=!1),x.protectedKeys={...p},!x.isActive&&_===null||!b&&!x.prevProp||Na(b)||typeof b=="boolean")continue;if(v==="exit"&&x.isActive&&_!==!0){x.prevResolvedValues&&(p={...p,...x.prevResolvedValues});continue}const V=G3(x.prevProp,b);let O=V||v===h&&x.isActive&&!D&&E||g>m&&E,N=!1;const U=Array.isArray(b)?b:[b];let Y=U.reduce(r(v),{});_===!1&&(Y={});const{prevResolvedValues:st={}}=x,it={...st,...Y},nt=ht=>{O=!0,d.has(ht)&&(N=!0,d.delete(ht)),x.needsAnimating[ht]=!0;const B=n.getValue(ht);B&&(B.liveStyle=!1)};for(const ht in it){const B=Y[ht],z=st[ht];if(p.hasOwnProperty(ht))continue;let P=!1;rf(B)&&rf(z)?P=!Q1(B,z)||V:P=B!==z,P?B!=null?nt(ht):d.add(ht):B!==void 0&&d.has(ht)?nt(ht):x.protectedKeys[ht]=!0}x.prevProp=b,x.prevResolvedValues=Y,x.isActive&&(p={...p,...Y}),(s||i)&&n.blockInitialAnimation&&(O=!1);const et=D&&V;O&&(!et||N)&&f.push(...U.map(ht=>{const B={type:v};if(typeof ht=="string"&&(s||i)&&!et&&n.manuallyAnimateOnMount&&n.parent){const{parent:z}=n,P=Rs(z,ht);if(z.enteringChildren&&P){const{delayChildren:I}=P.transition||{};B.delay=i1(z.enteringChildren,n,I)}}return{animation:ht,options:B}}))}if(d.size){const g={};if(typeof u.initial!="boolean"){const v=Rs(n,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(g.transition=v.transition)}d.forEach(v=>{const x=n.getBaseTarget(v),b=n.getValue(v);b&&(b.liveStyle=!0),g[v]=x??null}),f.push({animation:g})}let y=!!f.length;return s&&(u.initial===!1||u.initial===u.animate)&&!n.manuallyAnimateOnMount&&(y=!1),s=!1,i=!1,y?t(f):Promise.resolve()}function c(h,u){if(e[h].isActive===u)return Promise.resolve();n.variantChildren?.forEach(f=>f.animationState?.setActive(h,u)),e[h].isActive=u;const l=a(h);for(const f in e)e[f].protectedKeys={};return l}return{animateChanges:a,setActive:c,setAnimateFunction:o,getState:()=>e,reset:()=>{e=tv(),i=!0}}}function G3(n,t){return typeof t=="string"?t!==n:Array.isArray(t)?!Q1(t,n):!1}function Is(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function tv(){return{animate:Is(!0),whileInView:Is(),whileHover:Is(),whileTap:Is(),whileDrag:Is(),whileFocus:Is(),exit:Is()}}function Tf(n,t){n.min=t.min,n.max=t.max}function He(n,t){Tf(n.x,t.x),Tf(n.y,t.y)}function ev(n,t){n.translate=t.translate,n.scale=t.scale,n.originPoint=t.originPoint,n.origin=t.origin}const nv=1e-4,X3=1-nv,W3=1+nv,sv=.01,H3=0-sv,q3=0+sv;function ve(n){return n.max-n.min}function K3(n,t,e){return Math.abs(n-t)<=e}function iv(n,t,e,s=.5){n.origin=s,n.originPoint=Mt(t.min,t.max,n.origin),n.scale=ve(e)/ve(t),n.translate=Mt(e.min,e.max,n.origin)-n.originPoint,(n.scale>=X3&&n.scale<=W3||isNaN(n.scale))&&(n.scale=1),(n.translate>=H3&&n.translate<=q3||isNaN(n.translate))&&(n.translate=0)}function Er(n,t,e,s){iv(n.x,t.x,e.x,s?s.originX:void 0),iv(n.y,t.y,e.y,s?s.originY:void 0)}function rv(n,t,e,s=0){const i=s?Mt(e.min,e.max,s):e.min;n.min=i+t.min,n.max=n.min+ve(t)}function J3(n,t,e,s){rv(n.x,t.x,e.x,s?.x),rv(n.y,t.y,e.y,s?.y)}function ov(n,t,e,s=0){const i=s?Mt(e.min,e.max,s):e.min;n.min=t.min-i,n.max=n.min+ve(t)}function $a(n,t,e,s){ov(n.x,t.x,e.x,s?.x),ov(n.y,t.y,e.y,s?.y)}function av(n,t,e,s,i){return n-=t,n=Ba(n,1/e,s),i!==void 0&&(n=Ba(n,1/i,s)),n}function Z3(n,t=0,e=1,s=.5,i,r=n,o=n){if(rn.test(t)&&(t=parseFloat(t),t=Mt(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=Mt(r.min,r.max,s);n===r&&(a-=t),n.min=av(n.min,t,e,a,i),n.max=av(n.max,t,e,a,i)}function cv(n,t,[e,s,i],r,o){Z3(n,t[e],t[s],t[i],t.scale,r,o)}const Q3=["x","scaleX","originX"],tO=["y","scaleY","originY"];function hv(n,t,e,s){cv(n.x,t,Q3,e?e.x:void 0,s?s.x:void 0),cv(n.y,t,tO,e?e.y:void 0,s?s.y:void 0)}function uv(n){return n.translate===0&&n.scale===1}function lv(n){return uv(n.x)&&uv(n.y)}function fv(n,t){return n.min===t.min&&n.max===t.max}function eO(n,t){return fv(n.x,t.x)&&fv(n.y,t.y)}function dv(n,t){return Math.round(n.min)===Math.round(t.min)&&Math.round(n.max)===Math.round(t.max)}function mv(n,t){return dv(n.x,t.x)&&dv(n.y,t.y)}function pv(n){return ve(n.x)/ve(n.y)}function gv(n,t){return n.translate===t.translate&&n.scale===t.scale&&n.originPoint===t.originPoint}function an(n){return[n("x"),n("y")]}function nO(n,t,e){let s="";const i=n.x.translate/t.x,r=n.y.translate/t.y,o=e?.z||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),e){const{transformPerspective:h,rotate:u,pathRotation:l,rotateX:f,rotateY:d,skewX:p,skewY:m}=e;h&&(s=`perspective(${h}px) ${s}`),u&&(s+=`rotate(${u}deg) `),l&&(s+=`rotate(${l}deg) `),f&&(s+=`rotateX(${f}deg) `),d&&(s+=`rotateY(${d}deg) `),p&&(s+=`skewX(${p}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=n.x.scale*t.x,c=n.y.scale*t.y;return(a!==1||c!==1)&&(s+=`scale(${a}, ${c})`),s||"none"}const yv=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],sO=yv.length,vv=n=>typeof n=="string"?parseFloat(n):n,bv=n=>typeof n=="number"||Z.test(n);function iO(n,t,e,s,i,r){i?(n.opacity=Mt(0,e.opacity??1,rO(s)),n.opacityExit=Mt(t.opacity??1,0,oO(s))):r&&(n.opacity=Mt(t.opacity??1,e.opacity??1,s));for(let o=0;o<sO;o++){const a=yv[o];let c=wv(t,a),h=wv(e,a);if(c===void 0&&h===void 0)continue;c||(c=0),h||(h=0),c===0||h===0||bv(c)===bv(h)?(n[a]=Math.max(Mt(vv(c),vv(h),s),0),(rn.test(h)||rn.test(c))&&(n[a]+="%")):n[a]=h}(t.rotate||e.rotate)&&(n.rotate=Mt(t.rotate||0,e.rotate||0,s))}function wv(n,t){return n[t]!==void 0?n[t]:n.borderRadius}const rO=xv(0,.5,p0),oO=xv(.5,.95,Ne);function xv(n,t,e){return s=>s<n?0:s>t?1:e(gr(n,t,s))}function aO(n,t,e){const s=se(n)?n:fi(n);return s.start(nf("",s,t,e)),s.animation}function Tr(n,t,e,s={passive:!0}){return n.addEventListener(t,e,s),()=>n.removeEventListener(t,e,s)}const cO=(n,t)=>n.depth-t.depth;class hO{constructor(){this.children=[],this.isDirty=!1}add(t){Tl(this.children,t),this.isDirty=!0}remove(t){Sa(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(cO),this.isDirty=!1,this.children.forEach(t)}}function uO(n,t){const e=ye.now(),s=({timestamp:i})=>{const r=i-e;r>=t&&(is(s),n(r-t))};return At.setup(s,!0),()=>is(s)}function Ua(n){return se(n)?n.get():n}class lO{constructor(){this.members=[]}add(t){Tl(this.members,t);for(let e=this.members.length-1;e>=0;e--){const s=this.members[e];if(s===t||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(Sa(this.members,s),s.unmount())}t.scheduleRender()}remove(t){if(Sa(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(t){for(let e=this.members.indexOf(t)-1;e>=0;e--){const s=this.members[e];if(s.isPresent!==!1&&s.instance?.isConnected!==!1)return this.promote(s),!0}return!1}promote(t,e){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=s.options,{layoutDependency:r}=t.options;(i===void 0||i!==r)&&(t.resumeFrom=s,e&&(s.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Ya={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Cf=["","X","Y","Z"],fO=1e3;let dO=0;function Pf(n,t,e,s){const{latestValues:i}=t;i[n]&&(e[n]=i[n],t.setStaticValue(n,0),s&&(s[n]=0))}function Sv(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:t}=n.options;if(!t)return;const e=l1(t);if(window.MotionHasOptimisedAnimation(e,"transform")){const{layout:i,layoutId:r}=n.options;window.MotionCancelOptimisedAnimation(e,"transform",At,!(i||r))}const{parent:s}=n;s&&!s.hasCheckedOptimisedAppear&&Sv(s)}function _v({attachResizeListener:n,defaultParent:t,measureScroll:e,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=t?.()){this.id=dO++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(gO),this.nodes.forEach(SO),this.nodes.forEach(_O),this.nodes.forEach(yO)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new hO)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Pl),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const c=this.eventHandlers.get(o);c&&c.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=pf(o)&&!p3(o),this.instance=o;const{layoutId:a,layout:c,visualElement:h}=this.options;if(h&&!h.current&&h.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),n){let u,l=0;const f=()=>this.root.updateBlockedByResize=!1;At.read(()=>{l=window.innerWidth}),n(o,()=>{const d=window.innerWidth;d!==l&&(l=d,this.root.updateBlockedByResize=!0,u&&u(),u=uO(f,250),Ya.hasAnimatedSinceResize&&(Ya.hasAnimatedSinceResize=!1,this.nodes.forEach(Cv)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&h&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:l,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||h.getDefaultTransition()||AO,{onLayoutAnimationStart:m,onLayoutAnimationComplete:y}=h.getProps(),g=!this.targetLayout||!mv(this.targetLayout,d),v=!l&&f;if(this.options.layoutRoot||this.resumeFrom||v||l&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...ef(p,"layout"),onPlay:m,onComplete:y};(h.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,v,x.path)}else l||Cv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),is(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(EO),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Sv(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const l=this.path[u];l.shouldResetTransform=!0,(typeof l.latestValues.x=="string"||typeof l.latestValues.y=="string")&&(l.isLayoutDirty=!0),l.updateScroll("snapshot"),l.options.layoutRoot&&l.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(bO),this.nodes.forEach(Ev);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Tv);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(wO),this.nodes.forEach(xO),this.nodes.forEach(mO),this.nodes.forEach(pO)):this.nodes.forEach(Tv),this.clearAllSnapshots();const a=ye.now();ne.delta=sn(0,16.666666666666668,a-ne.timestamp),ne.timestamp=a,ne.isProcessing=!0,Dl.update.process(ne),Dl.preRender.process(ne),Dl.render.process(ne),ne.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ff.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(vO),this.sharedNodes.forEach(TO)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,At.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){At.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ve(this.snapshot.measuredBox.x)&&!ve(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Ht()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const c=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:e(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!lv(this.projectionDelta),c=this.getTransformTemplate(),h=c?c(this.latestValues,""):void 0,u=h!==this.prevTransformTemplateValue;o&&this.instance&&(a||Os(this.latestValues)||u)&&(i(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return o&&(c=this.removeTransform(c)),MO(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return Ht();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(DO))){const{scroll:h}=this.root;h&&(on(a.x,h.offset.x),on(a.y,h.offset.y))}return a}removeElementScroll(o){const a=Ht();if(He(a,o),this.scroll?.wasRoot)return a;for(let c=0;c<this.path.length;c++){const h=this.path[c],{scroll:u,options:l}=h;h!==this.root&&u&&l.layoutScroll&&(u.wasRoot&&He(a,o),on(a.x,u.offset.x),on(a.y,u.offset.y))}return a}applyTransform(o,a=!1,c){const h=c||Ht();He(h,o);for(let u=0;u<this.path.length;u++){const l=this.path[u];!a&&l.options.layoutScroll&&l.scroll&&l!==l.root&&(on(h.x,-l.scroll.offset.x),on(h.y,-l.scroll.offset.y)),Os(l.latestValues)&&ja(h,l.latestValues,l.layout?.layoutBox)}return Os(this.latestValues)&&ja(h,this.latestValues,this.layout?.layoutBox),h}removeTransform(o){const a=Ht();He(a,o);for(let c=0;c<this.path.length;c++){const h=this.path[c];if(!Os(h.latestValues))continue;let u;h.instance&&(wf(h.latestValues)&&h.updateSnapshot(),u=Ht(),He(u,h.measurePageBox())),hv(a,h.latestValues,h.snapshot?.layoutBox,u)}return Os(this.latestValues)&&hv(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ne.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:l}=this.options;if(!this.layout||!(u||l))return;this.resolvedRelativeTargetAt=ne.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ht(),this.targetWithTransforms=Ht()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),J3(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):He(this.target,this.layout.layoutBox),F1(this.target,this.targetDelta)):He(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||wf(this.parent.latestValues)||V1(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ht(),this.relativeTargetOrigin=Ht(),$a(this.relativeTargetOrigin,a,c,this.options.layoutAnchor||void 0),He(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===ne.timestamp&&(c=!1),c)return;const{layout:h,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||u))return;He(this.layoutCorrected,this.layout.layoutBox);const l=this.treeScale.x,f=this.treeScale.y;C3(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Ht());const{target:d}=o;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ev(this.prevProjectionDelta.x,this.projectionDelta.x),ev(this.prevProjectionDelta.y,this.projectionDelta.y)),Er(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==l||this.treeScale.y!==f||!gv(this.projectionDelta.x,this.prevProjectionDelta.x)||!gv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=mi(),this.projectionDelta=mi(),this.projectionDeltaWithTransform=mi()}setAnimationOrigin(o,a=!1,c){const h=this.snapshot,u=h?h.latestValues:{},l={...this.latestValues},f=mi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=Ht(),p=h?h.source:void 0,m=this.layout?this.layout.source:void 0,y=p!==m,g=this.getStack(),v=!g||g.members.length<=1,x=!!(y&&!v&&this.options.crossfade===!0&&!this.path.some(PO));this.animationProgress=0;let b;const E=c?.interpolateProjection(o);this.mixTargetDelta=_=>{const D=_/1e3,V=E?.(D);V?(f.x.translate=V.x,f.x.scale=Mt(o.x.scale,1,D),f.x.origin=o.x.origin,f.x.originPoint=o.x.originPoint,f.y.translate=V.y,f.y.scale=Mt(o.y.scale,1,D),f.y.origin=o.y.origin,f.y.originPoint=o.y.originPoint):(Pv(f.x,o.x,D),Pv(f.y,o.y,D)),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($a(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),CO(this.relativeTarget,this.relativeTargetOrigin,d,D),b&&eO(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Ht()),He(b,this.relativeTarget)),y&&(this.animationValues=l,iO(l,u,this.latestValues,D,x,v)),V&&V.rotate!==void 0&&(this.animationValues||(this.animationValues=l),this.animationValues.pathRotation=V.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=D},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(is(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=At.update(()=>{Ya.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=fi(0)),this.motionValue.jump(0,!1),this.currentAnimation=aO(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(fO),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:h,latestValues:u}=o;if(!(!a||!c||!h)){if(this!==o&&this.layout&&h&&Ov(this.options.animationType,this.layout.layoutBox,h.layoutBox)){c=this.target||Ht();const l=ve(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+l;const f=ve(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+f}He(a,c),ja(a,u),Er(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new lO),this.sharedNodes.get(o).add(a);const h=a.options.initialPromotionConfig;a.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const h=this.getStack();h&&h.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const h={};c.z&&Pf("z",o,h,this.animationValues);for(let u=0;u<Cf.length;u++)Pf(`rotate${Cf[u]}`,o,h,this.animationValues),Pf(`skew${Cf[u]}`,o,h,this.animationValues);o.render();for(const u in h)o.setStaticValue(u,h[u]),this.animationValues&&(this.animationValues[u]=h[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Ua(a?.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Ua(a?.pointerEvents)||""),this.hasProjected&&!Os(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=h.animationValues||h.latestValues;this.applyTransformsToTarget();let l=nO(this.projectionDeltaWithTransform,this.treeScale,u);c&&(l=c(u,l)),o.transform=l;const{x:f,y:d}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,h.animationValues?o.opacity=h===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=h===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const p in _f){if(u[p]===void 0)continue;const{correct:m,applyTo:y,isCSSVariable:g}=_f[p],v=l==="none"?u[p]:m(u[p],h);if(y){const x=y.length;for(let b=0;b<x;b++)o[y[b]]=v}else g?this.options.visualElement.renderState.vars[p]=v:o[p]=v}this.options.layoutId&&(o.pointerEvents=h===this?Ua(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(Ev),this.root.sharedNodes.clear()}}}function mO(n){n.updateLayout()}function pO(n){const t=n.resumeFrom?.snapshot||n.snapshot;if(n.isLead()&&n.layout&&t&&n.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:s}=n.layout,{animationType:i}=n.options,r=t.source!==n.layout.source;if(i==="size")an(u=>{const l=r?t.measuredBox[u]:t.layoutBox[u],f=ve(l);l.min=e[u].min,l.max=l.min+f});else if(i==="x"||i==="y"){const u=i==="x"?"y":"x";Tf(r?t.measuredBox[u]:t.layoutBox[u],e[u])}else Ov(i,t.layoutBox,e)&&an(u=>{const l=r?t.measuredBox[u]:t.layoutBox[u],f=ve(e[u]);l.max=l.min+f,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[u].max=n.relativeTarget[u].min+f)});const o=mi();Er(o,e,t.layoutBox);const a=mi();r?Er(a,n.applyTransform(s,!0),t.measuredBox):Er(a,e,t.layoutBox);const c=!lv(o);let h=!1;if(!n.resumeFrom){const u=n.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:l,layout:f}=u;if(l&&f){const d=n.options.layoutAnchor||void 0,p=Ht();$a(p,t.layoutBox,l.layoutBox,d);const m=Ht();$a(m,e,f.layoutBox,d),mv(p,m)||(h=!0),u.options.layoutRoot&&(n.relativeTarget=m,n.relativeTargetOrigin=p,n.relativeParent=u)}}}n.notifyListeners("didUpdate",{layout:e,snapshot:t,delta:a,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:h})}else if(n.isLead()){const{onExitComplete:e}=n.options;e&&e()}n.options.transition=void 0}function gO(n){n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function yO(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function vO(n){n.clearSnapshot()}function Ev(n){n.clearMeasurements()}function bO(n){n.isLayoutDirty=!0,n.updateLayout()}function Tv(n){n.isLayoutDirty=!1}function wO(n){n.isAnimationBlocked&&n.layout&&!n.isLayoutDirty&&(n.snapshot=n.layout,n.isLayoutDirty=!0)}function xO(n){const{visualElement:t}=n.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),n.resetTransform()}function Cv(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function SO(n){n.resolveTargetDelta()}function _O(n){n.calcProjection()}function EO(n){n.resetSkewAndRotation()}function TO(n){n.removeLeadSnapshot()}function Pv(n,t,e){n.translate=Mt(t.translate,0,e),n.scale=Mt(t.scale,1,e),n.origin=t.origin,n.originPoint=t.originPoint}function Av(n,t,e,s){n.min=Mt(t.min,e.min,s),n.max=Mt(t.max,e.max,s)}function CO(n,t,e,s){Av(n.x,t.x,e.x,s),Av(n.y,t.y,e.y,s)}function PO(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const AO={duration:.45,ease:[.4,0,.1,1]},Mv=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),Dv=Mv("applewebkit/")&&!Mv("chrome/")?Math.round:Ne;function Rv(n){n.min=Dv(n.min),n.max=Dv(n.max)}function MO(n){Rv(n.x),Rv(n.y)}function Ov(n,t,e){return n==="position"||n==="preserve-aspect"&&!K3(pv(t),pv(e),.2)}function DO(n){return n!==n.root&&n.scroll?.wasRoot}const RO=_v({attachResizeListener:(n,t)=>Tr(n,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Af={current:void 0},Iv=_v({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Af.current){const n=new RO({});n.mount(window),n.setOptions({layoutScroll:!0}),Af.current=n}return Af.current},resetTransform:(n,t)=>{n.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"});function OO(n,t){if(za(n)){const{initial:e,animate:s}=n;return{initial:e===!1||Sr(e)?e:void 0,animate:Sr(s)?s:void 0}}return n.inherit!==!1?t:{}}function IO(n){const{initial:t,animate:e}=OO(n,H.useContext(_a));return H.useMemo(()=>({initial:t,animate:e}),[kv(t),kv(e)])}function kv(n){return Array.isArray(n)?n.join(" "):n}const Mf=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Lv(n,t,e){for(const s in t)!se(t[s])&&!W1(s,e)&&(n[s]=t[s])}function kO({transformTemplate:n},t){return H.useMemo(()=>{const e=Mf();return Sf(e,t,n),Object.assign({},e.vars,e.style)},[t])}function LO(n,t){const e=n.style||{},s={};return Lv(s,e,n),Object.assign(s,kO(n,t)),s}function VO(n,t){const e={},s=LO(n,t);return n.drag&&n.dragListener!==!1&&(e.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(e.tabIndex=0),e.style=s,e}const Vv=()=>({...Mf(),attrs:{}});function NO(n,t,e,s){const i=H.useMemo(()=>{const r=Vv();return H1(r,t,K1(s),n.transformTemplate,n.style),{...r.attrs,style:{...r.style}}},[t]);if(n.style){const r={};Lv(r,n.style,n),i.style={...r,...i.style}}return i}const zO=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Ga(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||zO.has(n)}let Nv=n=>!Ga(n);function FO(n){typeof n=="function"&&(Nv=t=>t.startsWith("on")?!Ga(t):n(t))}try{const n="@emotion/is-prop-valid";FO(require(n).default)}catch{}function BO(n,t,e){const s={};for(const i in n)i==="values"&&typeof n.values=="object"||se(n[i])||(Nv(i)||e===!0&&Ga(i)||!t&&!Ga(i)||n.draggable&&i.startsWith("onDrag"))&&(s[i]=n[i]);return s}const jO=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Df(n){return typeof n!="string"||n.includes("-")?!1:!!(jO.indexOf(n)>-1||/[A-Z]/u.test(n))}function $O(n,t,e,{latestValues:s},i,r=!1,o){const c=(o??Df(n)?NO:VO)(t,s,i,n),h=BO(t,typeof n=="string",r),u=n!==H.Fragment?{...h,...c,ref:e}:{},{children:l}=t,f=H.useMemo(()=>se(l)?l.get():l,[l]);return H.createElement(n,{...u,children:f})}const Rf=H.createContext(null);function UO(n){const t=H.useRef(null);return t.current===null&&(t.current=n()),t.current}function YO({scrapeMotionValuesFromProps:n,createRenderState:t},e,s,i){return{latestValues:GO(e,s,i,n),renderState:t()}}function GO(n,t,e,s){const i={},r=s(n,{});for(const f in r)i[f]=Ua(r[f]);let{initial:o,animate:a}=n;const c=za(n),h=D1(n);t&&h&&!c&&n.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let u=e?e.initial===!1:!1;u=u||o===!1;const l=u?a:o;if(l&&typeof l!="boolean"&&!Na(l)){const f=Array.isArray(l)?l:[l];for(let d=0;d<f.length;d++){const p=sf(n,f[d]);if(p){const{transitionEnd:m,transition:y,...g}=p;for(const v in g){let x=g[v];if(Array.isArray(x)){const b=u?x.length-1:0;x=x[b]}x!==null&&(i[v]=x)}for(const v in m)i[v]=m[v]}}}return i}const zv=n=>(t,e)=>{const s=H.useContext(_a),i=H.useContext(Rf),r=()=>YO(n,t,s,i);return e?r():UO(r)},XO=zv({scrapeMotionValuesFromProps:Ef,createRenderState:Mf}),WO=zv({scrapeMotionValuesFromProps:J1,createRenderState:Vv}),Fv={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Bv=!1;function HO(){if(Bv)return;const n={};for(const t in Fv)n[t]={isEnabled:e=>Fv[t].some(s=>!!e[s])};I1(n),Bv=!0}function jv(){return HO(),S3()}function qO(n){const t=jv();for(const e in n)t[e]={...t[e],...n[e]};I1(t)}const KO=Symbol.for("motionComponentSymbol");function JO(n,t,e){const s=H.useRef(e);H.useInsertionEffect(()=>{s.current=e});const i=H.useRef(null);return H.useCallback(r=>{r&&n.onMount?.(r),t&&(r?t.mount(r):t.unmount());const o=s.current;if(typeof o=="function")if(r){const a=o(r);typeof a=="function"&&(i.current=a)}else i.current?(i.current(),i.current=null):o(r);else o&&(o.current=r)},[t])}const $v=H.createContext({});function pi(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}const ZO=typeof window<"u"?H.useLayoutEffect:H.useEffect;function QO(n,t,e,s,i,r){const{visualElement:o}=H.useContext(_a),a=H.useContext(S0),c=H.useContext(Rf),h=H.useContext(_0),u=h.reducedMotion,l=h.skipAnimations,f=H.useRef(null),d=H.useRef(!1);s=s||a.renderer,!f.current&&s&&(f.current=s(n,{visualState:t,parent:o,props:e,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:l,isSVG:r}),d.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const p=f.current,m=H.useContext($v);p&&!p.projection&&i&&(p.type==="html"||p.type==="svg")&&tI(f.current,e,i,m);const y=H.useRef(!1);H.useInsertionEffect(()=>{p&&y.current&&p.update(e,c)});const g=e[u1],v=H.useRef(!!g&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return ZO(()=>{d.current=!0,p&&(y.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),v.current&&p.animationState&&p.animationState.animateChanges())}),H.useEffect(()=>{p&&(!v.current&&p.animationState&&p.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),v.current=!1),p.enteringChildren=void 0)}),p}function tI(n,t,e,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:c,layoutRoot:h,layoutAnchor:u,layoutCrossfade:l}=t;n.projection=new e(n.latestValues,t["data-framer-portal-id"]?void 0:Uv(n.parent)),n.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&pi(a),visualElement:n,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:l,layoutScroll:c,layoutRoot:h,layoutAnchor:u})}function Uv(n){if(n)return n.options.allowProjection!==!1?n.projection:Uv(n.parent)}function eI(n,{forwardMotionProps:t=!1,type:e}={},s,i){s&&qO(s);const r=e?e==="svg":Df(n),o=r?WO:XO;function a(h,u){let l;const f={...H.useContext(_0),...h,layoutId:nI(h)},{isStatic:d}=f,p=IO(h),m=o(h,d);if(!d&&typeof window<"u"){sI(f,s);const y=iI(f);l=y.MeasureLayout,p.visualElement=QO(n,m,f,i,y.ProjectionNode,r)}return El.jsxs(_a.Provider,{value:p,children:[l&&p.visualElement?El.jsx(l,{visualElement:p.visualElement,...f}):null,$O(n,h,JO(m,p.visualElement,u),m,d,t,r)]})}a.displayName=`motion.${typeof n=="string"?n:`create(${n.displayName??n.name??""})`}`;const c=H.forwardRef(a);return c[KO]=n,c}function nI({layoutId:n}){const t=H.useContext(x0).id;return t&&n!==void 0?t+"-"+n:n}function sI(n,t){const e=H.useContext(S0).strict;if({}.NODE_ENV!=="production"&&t&&e){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?ri(!1,s,"lazy-strict-mode"):Rn(!1,s,"lazy-strict-mode")}}function iI(n){const t=jv(),{drag:e,layout:s}=t;if(!e&&!s)return{};const i={...e,...s};return{MeasureLayout:e?.isEnabled(n)||s?.isEnabled(n)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}const rI=(n,t)=>t.isSVG??Df(n)?new F3(t):new I3(t,{allowProjection:n!==H.Fragment});class oI extends os{constructor(t){super(t),t.animationState||(t.animationState=Y3(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Na(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let aI=0;class cI extends os{constructor(){super(...arguments),this.id=aI++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;if(t&&s===!1){if(this.isExitComplete){const{initial:r,custom:o}=this.node.getProps();if(typeof r=="string"||typeof r=="object"&&r!==null&&!Array.isArray(r)){const a=Rs(this.node,r,o);if(a){const{transition:c,transitionEnd:h,...u}=a;for(const l in u)this.node.getValue(l)?.jump(u[l])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>{this.isExitComplete=!0,e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const hI={animation:{Feature:oI},exit:{Feature:cI}};function Cr(n){return{point:{x:n.pageX,y:n.pageY}}}const uI=n=>t=>df(t)&&n(t,Cr(t));function Pr(n,t,e,s){return Tr(n,t,uI(e),s)}const Yv=({current:n})=>n?n.ownerDocument.defaultView:null,Gv=(n,t)=>Math.abs(n-t);function lI(n,t){const e=Gv(n.x,t.x),s=Gv(n.y,t.y);return Math.sqrt(e**2+s**2)}const Xv=new Set(["auto","scroll"]);class Wv{constructor(t,e,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Xa(this.lastRawMoveEventInfo,this.transformPagePoint));const p=Of(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,y=lI(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!y)return;const{point:g}=p,{timestamp:v}=ne;this.history.push({...g,timestamp:v});const{onStart:x,onMove:b}=this.handlers;m||(x&&x(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,p)},this.handlePointerMove=(p,m)=>{this.lastMoveEvent=p,this.lastRawMoveEventInfo=m,this.lastMoveEventInfo=Xa(m,this.transformPagePoint),At.update(this.updatePoint,!0)},this.handlePointerUp=(p,m)=>{this.end();const{onEnd:y,onSessionEnd:g,resumeAnimation:v}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Of(p.type==="pointercancel"?this.lastMoveEventInfo:Xa(m,this.transformPagePoint),this.history);this.startEvent&&y&&y(p,x),g&&g(p,x)},!df(t))return;this.dragSnapToOrigin=r,this.handlers=e,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=i||window;const c=Cr(t),h=Xa(c,this.transformPagePoint),{point:u}=h,{timestamp:l}=ne;this.history=[{...u,timestamp:l}];const{onSessionStart:f}=e;f&&f(t,Of(h,this.history));const d={passive:!0,capture:!0};this.removeListeners=pr(Pr(this.contextWindow,"pointermove",this.handlePointerMove,d),Pr(this.contextWindow,"pointerup",this.handlePointerUp,d),Pr(this.contextWindow,"pointercancel",this.handlePointerUp,d)),a&&this.startScrollTracking(a)}startScrollTracking(t){let e=t.parentElement;for(;e;){const s=getComputedStyle(e);(Xv.has(s.overflowX)||Xv.has(s.overflowY))&&this.scrollPositions.set(e,{x:e.scrollLeft,y:e.scrollTop}),e=e.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const e=this.scrollPositions.get(t);if(!e)return;const s=t===window,i=s?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},r={x:i.x-e.x,y:i.y-e.y};r.x===0&&r.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(t,i),At.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),is(this.updatePoint)}}function Xa(n,t){return t?{point:t(n.point)}:n}function Hv(n,t){return{x:n.x-t.x,y:n.y-t.y}}function Of({point:n},t){return{point:n,delta:Hv(n,qv(t)),offset:Hv(n,fI(t)),velocity:dI(t,.1)}}function fI(n){return n[0]}function qv(n){return n[n.length-1]}function dI(n,t){if(n.length<2)return{x:0,y:0};let e=n.length-1,s=null;const i=qv(n);for(;e>=0&&(s=n[e],!(i.timestamp-s.timestamp>Ee(t)));)e--;if(!s)return{x:0,y:0};s===n[0]&&n.length>2&&i.timestamp-s.timestamp>Ee(t)*2&&(s=n[1]);const r=ze(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function mI(n,{min:t,max:e},s){return t!==void 0&&n<t?n=s?Mt(t,n,s.min):Math.max(n,t):e!==void 0&&n>e&&(n=s?Mt(e,n,s.max):Math.min(n,e)),n}function Kv(n,t,e){return{min:t!==void 0?n.min+t:void 0,max:e!==void 0?n.max+e-(n.max-n.min):void 0}}function pI(n,{top:t,left:e,bottom:s,right:i}){return{x:Kv(n.x,e,i),y:Kv(n.y,t,s)}}function Jv(n,t){let e=t.min-n.min,s=t.max-n.max;return t.max-t.min<n.max-n.min&&([e,s]=[s,e]),{min:e,max:s}}function gI(n,t){return{x:Jv(n.x,t.x),y:Jv(n.y,t.y)}}function yI(n,t){let e=.5;const s=ve(n),i=ve(t);return i>s?e=gr(t.min,t.max-s,n.min):s>i&&(e=gr(n.min,n.max-i,t.min)),sn(0,1,e)}function vI(n,t){const e={};return t.min!==void 0&&(e.min=t.min-n.min),t.max!==void 0&&(e.max=t.max-n.min),e}const If=.35;function bI(n=If){return n===!1?n=0:n===!0&&(n=If),{x:Zv(n,"left","right"),y:Zv(n,"top","bottom")}}function Zv(n,t,e){return{min:Qv(n,t),max:Qv(n,e)}}function Qv(n,t){return typeof n=="number"?n:n[t]||0}const wI=new WeakMap;class xI{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ht(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:e=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=l=>{e&&this.snapToCursor(Cr(l).point),this.stopAnimation()},o=(l,f)=>{const{drag:d,dragPropagation:p,onDragStart:m}=this.getProps();if(d&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ZR(d),!this.openDragLock))return;this.latestPointerEvent=l,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),an(g=>{let v=this.getAxisMotionValue(g).get()||0;if(rn.test(v)){const{projection:x}=this.visualElement;if(x&&x.layout){const b=x.layout.layoutBox[g];b&&(v=ve(b)*(parseFloat(v)/100))}}this.originPoint[g]=v}),m&&At.update(()=>m(l,f),!1,!0),of(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(l,f)=>{this.latestPointerEvent=l,this.latestPanInfo=f;const{dragPropagation:d,dragDirectionLock:p,onDirectionLock:m,onDrag:y}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:g}=f;if(p&&this.currentDirection===null){this.currentDirection=_I(g),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,g),this.updateAxis("y",f.point,g),this.visualElement.render(),y&&At.update(()=>y(l,f),!1,!0)},c=(l,f)=>{this.latestPointerEvent=l,this.latestPanInfo=f,this.stop(l,f),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>{const{dragSnapToOrigin:l}=this.getProps();(l||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new Wv(t,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:c,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:s,contextWindow:Yv(this.visualElement),element:this.visualElement.current})}stop(t,e){const s=t||this.latestPointerEvent,i=e||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!s)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&At.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,e,s){const{drag:i}=this.getProps();if(!s||!Wa(t,i,this.currentDirection))return;const r=this.getAxisMotionValue(t);let o=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(o=mI(o,this.constraints[t],this.elastic[t])),r.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&pi(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=pI(s.layoutBox,t):this.constraints=!1,this.elastic=bI(e),i!==this.constraints&&!pi(t)&&s&&this.constraints&&!this.hasMutatedConstraints&&an(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=vI(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!pi(t))return!1;const s=t.current;Rn(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const r=P3(s,i.root,this.visualElement.getTransformPagePoint());let o=gI(i.layout.layoutBox,r);if(e){const a=e(E3(o));this.hasMutatedConstraints=!!a,a&&(o=L1(a))}return o}startAnimation(t){const{drag:e,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},h=an(u=>{if(!Wa(u,e,this.currentDirection))return;let l=c&&c[u]||{};(o===!0||o===u)&&(l={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:s?t[u]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...l};return this.startAxisValueAnimation(u,p)});return Promise.all(h).then(a)}startAxisValueAnimation(t,e){const s=this.getAxisMotionValue(t);return of(this.visualElement,t),s.start(nf(t,s,0,e,this.visualElement,!1))}stopAnimation(){an(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps()[e];return i||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){an(e=>{const{drag:s}=this.getProps();if(!Wa(e,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(e);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[e],c=r.get()||0;r.set(t[e]-Mt(o,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:s}=this.visualElement;if(!pi(e)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};an(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const c=a.get();i[o]=yI({min:c,max:c},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),an(o=>{if(!Wa(o,t,null))return;const a=this.getAxisMotionValue(o),{min:c,max:h}=this.constraints[o];a.set(Mt(c,h,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;wI.set(this.visualElement,this);const t=this.visualElement.current,e=Pr(t,"pointerdown",h=>{const{drag:u,dragListener:l=!0}=this.getProps(),f=h.target,d=f!==t&&i3(f);u&&l&&!d&&this.start(h)});let s;const i=()=>{const{dragConstraints:h}=this.getProps();pi(h)&&h.current&&(this.constraints=this.resolveRefConstraints(),s||(s=SI(t,h.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,o=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),At.read(i);const a=Tr(window,"resize",()=>this.scalePositionWithinConstraints()),c=r.addEventListener("didUpdate",({delta:h,hasLayoutChanged:u})=>{this.isDragging&&u&&(an(l=>{const f=this.getAxisMotionValue(l);f&&(this.originPoint[l]+=h[l].translate,f.set(f.get()+h[l].translate))}),this.visualElement.render())});return()=>{a(),e(),o(),c&&c(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=If,dragMomentum:a=!0}=t;return{...t,drag:e,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function tb(n){let t=!0;return()=>{if(t){t=!1;return}n()}}function SI(n,t,e){const s=P1(n,tb(e)),i=P1(t,tb(e));return()=>{s(),i()}}function Wa(n,t,e){return(t===!0||t===n)&&(e===null||e===n)}function _I(n,t=10){let e=null;return Math.abs(n.y)>t?e="y":Math.abs(n.x)>t&&(e="x"),e}class EI extends os{constructor(t){super(t),this.removeGroupControls=Ne,this.removeListeners=Ne,this.controls=new xI(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ne}update(){const{dragControls:t}=this.node.getProps(),{dragControls:e}=this.node.prevProps||{};t!==e&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const kf=n=>(t,e)=>{n&&At.update(()=>n(t,e),!1,!0)};class TI extends os{constructor(){super(...arguments),this.removePointerDownListener=Ne}onPointerDown(t){this.session=new Wv(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Yv(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:kf(t),onStart:kf(e),onMove:kf(s),onEnd:(r,o)=>{delete this.session,i&&At.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=Pr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function CI(n=!0){const t=H.useContext(Rf);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:s,register:i}=t,r=H.useId();H.useEffect(()=>{if(n)return i(r)},[n]);const o=H.useCallback(()=>n&&s&&s(r),[r,s,n]);return!e&&s?[!1,o]:[!0]}let Lf=!1;class PI extends H.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=t;r&&(e.group&&e.group.add(r),s&&s.register&&i&&s.register(r),Lf&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Ya.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:s,drag:i,isPresent:r}=this.props,{projection:o}=s;return o&&(o.isPresent=r,t.layoutDependency!==e&&o.setOptions({...o.options,layoutDependency:e}),Lf=!0,i||t.layoutDependency!==e||e===void 0||t.isPresent!==r?o.willUpdate():this.safeToRemove(),t.isPresent!==r&&(r?o.promote():o.relegate()||At.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:e}=this.props,{projection:s}=t;s&&(s.options.layoutAnchor=e,s.root.didUpdate(),ff.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:s}=this.props,{projection:i}=t;Lf=!0,i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function eb(n){const[t,e]=CI(),s=H.useContext(x0);return El.jsx(PI,{...n,layoutGroup:s,switchLayoutGroup:H.useContext($v),isPresent:t,safeToRemove:e})}const AI={pan:{Feature:TI},drag:{Feature:EI,ProjectionNode:Iv,MeasureLayout:eb}};function nb(n,t,e){const{props:s}=n;n.animationState&&s.whileHover&&n.animationState.setActive("whileHover",e==="Start");const i="onHover"+e,r=s[i];r&&At.postRender(()=>r(t,Cr(t)))}class MI extends os{mount(){const{current:t}=this.node;t&&(this.unmount=t3(t,(e,s)=>(nb(this.node,s,"Start"),i=>nb(this.node,i,"End"))))}unmount(){}}class DI extends os{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=pr(Tr(this.node.current,"focus",()=>this.onFocus()),Tr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function sb(n,t,e){const{props:s}=n;if(n.current instanceof HTMLButtonElement&&n.current.disabled)return;n.animationState&&s.whileTap&&n.animationState.setActive("whileTap",e==="Start");const i="onTap"+(e==="End"?"":e),r=s[i];r&&At.postRender(()=>r(t,Cr(t)))}class RI extends os{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:e,propagate:s}=this.node.props;this.unmount=o3(t,(i,r)=>(sb(this.node,r,"Start"),(o,{success:a})=>sb(this.node,o,a?"End":"Cancel")),{useGlobalTarget:e,stopPropagation:s?.tap===!1})}unmount(){}}const Vf=new WeakMap,Nf=new WeakMap,OI=n=>{const t=Vf.get(n.target);t&&t(n)},II=n=>{n.forEach(OI)};function kI({root:n,...t}){const e=n||document;Nf.has(e)||Nf.set(e,{});const s=Nf.get(e),i=JSON.stringify(t);return s[i]||(s[i]=new IntersectionObserver(II,{root:n,...t})),s[i]}function LI(n,t,e){const s=kI(t);return Vf.set(n,e),s.observe(n),()=>{Vf.delete(n),s.unobserve(n)}}const VI={some:0,all:1};class NI extends os{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:e,margin:s,amount:i="some",once:r}=t,o={root:e?e.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:VI[i]},a=c=>{const{isIntersecting:h}=c;if(this.isInView===h||(this.isInView=h,r&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:u,onViewportLeave:l}=this.node.getProps(),f=h?u:l;f&&f(c)};this.stopObserver=LI(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(zI(t,e))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function zI({viewport:n={}},{viewport:t={}}={}){return e=>n[e]!==t[e]}const FI={...hI,...{inView:{Feature:NI},tap:{Feature:RI},focus:{Feature:DI},hover:{Feature:MI}},...AI,...{layout:{ProjectionNode:Iv,MeasureLayout:eb}}};function ib(n,t){return eI(n,t,FI,rI)}const BI=ib("div"),jI=ib("svg"),$I={rest:{scale:1},hover:{scale:1.1},pressed:{scale:.95}},UI={rest:{rotate:0},hover:{rotate:360,transition:{duration:.4}}},YI=({onClick:n})=>React.createElement(BI,{style:GI,onClick:n,variants:$I,initial:"rest",whileHover:"hover",whileTap:"pressed"},React.createElement(jI,{width:"16",height:"16",xmlns:"http://www.w3.org/2000/svg",variants:UI},React.createElement("path",{d:"M12.8 5.1541V2.5a.7.7 0 0 1 1.4 0v5a.7.7 0 0 1-.7.7h-5a.7.7 0 0 1 0-1.4h3.573c-.7005-1.8367-2.4886-3.1-4.5308-3.1C4.8665 3.7 2.7 5.85 2.7 8.5s2.1665 4.8 4.8422 4.8c1.3035 0 2.523-.512 3.426-1.4079a.7.7 0 0 1 .986.9938C10.7915 14.0396 9.2186 14.7 7.5422 14.7 4.0957 14.7 1.3 11.9257 1.3 8.5s2.7957-6.2 6.2422-6.2c2.1801 0 4.137 1.1192 5.2578 2.8541z",fill:"#ffffff",fillRule:"nonzero",style:XI}))),GI={padding:"5px",border:"1px dotted var(--yz-foreground)",borderRadius:"5px",width:"20px",height:"20px",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer"},XI={fill:"var(--yz-foreground)"};function rb(n,t,e){return new WebSocket(n)}function WI(n){return`${n}eventbus/${Fb(3)}/${nd(8)}/websocket`}class cn{static CONNECTING=WebSocket.CONNECTING;static OPEN=WebSocket.OPEN;static CLOSING=WebSocket.CLOSING;static CLOSED=WebSocket.CLOSED;url;socketCreatorProtocols;socketCreatorOptions;socketCreator;socket;state=cn.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||rb,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=cn.CLOSING,this.socket?.close()}_connect(){this.socket?.readyState===cn.CONNECTING||this.socket?.readyState===cn.OPEN||(this.state=cn.CONNECTING,this.socket=this.socketCreator(this.url,this.socketCreatorProtocols,this.socketCreatorOptions),this.socket.onopen=()=>{zn(`(${this.url}) onopen`),this.state=cn.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:s,wasClean:i}=t;zn(`(${this.url}) onclose: code(${e}) reason(${s}) wasClean(${i})`),this.state=cn.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),Pw(this.reconnectAttempts++)))},this.socket.onerror=t=>{zn(`(${this.url}) onerror: ${t}`),this.onerror?.(t)},this.socket.onmessage=t=>{if(zn(`(${this.url}) onmessage: { type: ${t.type}, data: ${t.data} }`),typeof t.data=="string"){let e;const s=t.data.substring(1);try{e=JSON.parse(s)}catch(i){e=[JSON.stringify({type:"err",failureCode:"fe-json-parse-error",failureType:i.toString(),message:s})]}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):Ie(`(${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?Ie(`(${this.url}) onmessage: unhandle ArrayBuffer`):t.data instanceof Blob&&Ie(`(${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===cn.OPEN?this.socket.send(JSON.stringify([JSON.stringify(t)])):(this.messageQueue.push(t),this._connect())}ping(){this._send({type:"ping"})}register(t,e,s={}){this.listeners[t]||(this.listeners[t]=[],this._send({type:"register",address:t,headers:zs(s,this.socketCreatorOptions.headers,!1)})),this.listeners[t].push(e)}unregister(t,e,s={}){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:zs(s,this.socketCreatorOptions.headers,!1)}),delete this.listeners[t]))}}publish(t,e,s={}){this._send({type:"publish",address:t,headers:zs(s,this.socketCreatorOptions.headers,!1),body:e})}async send(t,e,s={},i=3e4){this.requestid++;const r=this.waitings[this.requestid]={requestid:this.requestid},o=await new Promise((a,c)=>{r.resolve=a,this._send({type:"send",address:t,headers:zs(s,this.socketCreatorOptions.headers,!1),body:{requestid:r.requestid,...e}}),setTimeout(()=>{c(`(${this.url}) send(${r.requestid}: ${Xr(e)}) Timeout!`)},i)});return delete this.waitings[r.requestid],o}}function HI(n=750){const t=document.documentElement,e=window.top===window.self?window.devicePixelRatio:1;t.dataset.dpr=e;let s=100;const i=function(){t.style.height=window.innerHeight+"px";const r=t.clientWidth;t.dataset.width=r,t.dataset.layout=r>n?"pc":"mobile",t.dataset.rem=s=Math.min(100,Math.round(100*(r/n))),t.style.fontSize=s+"px"};i(),window.rem2px=function(r){return parseFloat(r)*s},window.px2rem=function(r){return parseFloat(r)/s},window.addEventListener&&window.addEventListener("orientationchange"in window?"orientationchange":"resize",i,!1)}class qI{localVideoUtil;remoteVideoUtil;localPeerConnection=null;remotePeerConnection=null;constructor(t,e){this.localVideoUtil=new lr(t),this.remoteVideoUtil=new lr(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(s=>{this.localVideoUtil.setSrcObject(s),t(s)}).catch(s=>{this.trace(`navigator.getUserMedia error: ${s}.`),e(s)})})}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(),s=t.getAudioTracks();e.length>0&&this.trace(`Using video device: ${e[0].label}.`),s.length>0&&this.trace(`Using audio device: ${s[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(s[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,s=t.candidate;if(e&&s){const i=new RTCIceCandidate(s),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:
101
162
  ${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:
102
163
  ${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:
103
164
  ${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:
104
- ${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 c2{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 Lf=[],zf={};function Va(s){Lf.push(s)}function h2(s,t=!1){const e=dp();if(zf[e])return;wx.error(i=>{console.log(i.errMsg||JSON.stringify(i))}),wx.ready(()=>{Lf.forEach(i=>i())});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"],r=["wx-open-launch-app","wx-open-launch-app","wx-open-subscribe","wx-open-audio"];wx.config(Object.assign(s,{debug:t,jsApiList:n,openTagList:r})),zf[e]=!0}function l2(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 u2(s){Va(function(){wx.updateAppMessageShareData(s)})}function f2(s){Va(function(){wx.updateTimelineShareData(s)})}function d2(s){wx.chooseImage(s)}function m2(s){wx.previewImage(s)}function p2(s){wx.uploadImage(s)}function g2(s){wx.downloadImage(s)}function y2(s){wx.getLocalImgData(s)}function b2(){wx.startRecord()}function w2(s){wx.stopRecord(s)}function v2(s){wx.onVoiceRecordEnd(s)}function x2(s){wx.playVoice(s)}function S2(s){wx.pauseVoice(s)}function _2(s){wx.stopVoice(s)}function C2(s){wx.onVoicePlayEnd(s)}function E2(s){wx.uploadVoice(s)}function T2(s){wx.downloadVoice(s)}function P2(s){wx.translateVoice(s)}function A2(s){wx.getNetworkType(s)}function M2(s){wx.openLocation(s)}function k2(s){wx.getLocation(s)}function I2(s){wx.scanQRCode(s)}function D2(s,t,e){function n(){WeixinJSBridge.invoke("getBrandWCPayRequest",s,function(r){r.err_msg=="get_brand_wcpay_request:ok"?t():e(r.err_msg)})}typeof WeixinJSBridge>"u"?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",n,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",n),document.attachEvent("onWeixinJSBridgeReady",n)):n()}function O2(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 R2(s){window.AlipayJSBridge?s&&s():document.addEventListener("AlipayJSBridgeReady",s,!1)}function Ts(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 L2(s,t,e){ap.tradePay(Object.assign(s,{}),function(n){let r="未知错误";switch(n.resultCode){case 9e3:return r="订单支付成功",t?.(r);case 8e3:r="正在处理中";break;case 4e3:r="订单支付失败";break;case 6001:r="用户中途取消";break;case 6002:r="网络连接出错";break;case 99:r="用户点击忘记密码导致快捷界面退出(only iOS)";break}e?.(r)})}function z2(s,t,e){ap.scan(Object.assign(s,{fail:n=>{e?.(Ts(n))}}),function(n){t?.(n.code)})}function N2(s,t,e){ap.getLocation(Object.assign(s,{fail:n=>{e?.(Ts(n))}}),function(n){t?.(n)})}function F2(s,t,e){ap.openLocation(Object.assign(s,{fail:n=>{e?.(Ts(n))}}),function(){t?.()})}function B2(s,t,e){ap.chooseImage(Object.assign(s,{fail:n=>{e?.(Ts(n,"chooseImage"))}}),function(n){t?.(n)})}function U2(s,t,e){ap.previewImage(Object.assign(s,{fail:n=>{e?.(Ts(n))}}),function(){t?.()})}class $2{map;constructor(t,e=120.619585,n=31.299379,r=18){this.map=new T.Map(t),this.map.centerAndZoom(new T.LngLat(e,n),r)}}class Y2{static;store;eb;axios;ns;constructor(t={}){this.static=t.static||{};const e=t.store?.state||{};this.store=uh({reducer:t.store?.reducer||(()=>e),initState:e,enhancer:t.store?.enhancer}),this.eb=new nr,this.axios=new Qh({baseURL:t.axios?.baseURL,timeout:t.axios?.timeout,headers:t.axios?.headers,responseType:t.axios?.responseType,responseEncoding:t.axios?.responseEncoding,interceptor:t.axios?.interceptor}),this.ns=new $m({concurrency:1})}}class j2{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,r,i)=>{const o={type:"js_error",msg:t,file:e,row:n,col:r,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 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(){Vo(()=>{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[r,i]=n,a=document.elementsFromPoint(r,i)[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:om()});console.error(e),this.reportUrl&&navigator.sendBeacon(this.reportUrl,e)}}function Nf(){return document.querySelector('meta[name="app-version"]')?.getAttribute("content")}async function Ff(){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 Bf(){window.confirm("系统已更新,是否立即刷新页面?")&&window.location.reload()}async function X2(){try{const s=Nf(),t=await Ff();s&&t&&s!==t&&Bf()}catch(s){console.error("版本检测失败:",s)}}function G2(s){const t=s?.message||s?.reason?.message||"";return t.includes("Loading chunk")||t.includes("ChunkLoadError")||t.includes("Failed to fetch dynamically imported module")}function V2(){const s="app_chunk_reload_once";sessionStorage.getItem(s)?console.error("刷新后仍然失败,请提示用户手动刷新或联系管理员"):(sessionStorage.setItem(s,"1"),alert("系统资源已更新,正在为您刷新页面"),window.location.reload())}return g.ArrowShape=Ea,g.BallShape=jn,g.BezierEasing=Lo,g.CSSToJSEasing=O1,g.Clock=Fo,g.CommonKeyCode=Yw,g.ConfettiShapeCombo=Na,g.Context=Y2,g.CrossShape=Ia,g.CurveShape=_a,g.CustomCanvasContext=ql,g.CustomCanvasGradient=Er,g.CustomCanvasPattern=Io,g.DOMParse=pa,g.DOMSVGUtil=gn,g.DOMVideo=Ss,g.DrawContext=pv,g.Easing=X,g.EllipseShape=Da,g.FileUpload=s0,g.FoxShape=Ma,g.HeartShape=Ta,g.HeartVariantShape=Pa,g.Interpolation=ze,g.Key=jw,g.LineShape=vn,g.Ls=sn,g.Matrix=Yt,g.Matrix2=Uo,g.Matrix3=Mr,g.Matrix4=Qt,g.PointsShape=Nr,g.QRCode=Ke,g.RabbitShape=ka,g.RectShape=nn,g.RingIndicatorShapeCombo=za,g.RingShape=Cs,g.SVGParse=o2,g.SVGParsedPathArgsLength=fs,g.SegmentShapeCombo=Ra,g.Shape=_t,g.ShapeCombo=te,g.ShipShapeCombo=Oa,g.SliderShapeCombo=La,g.StarShape=Aa,g.THEME_NAMES=Mv,g.TWEEN=$1,g.TextShape=Xn,g.Timeline=ps,g.TreeShapeCombo=Ca,g.Tween=No,g.Vector2=_r,g.Vector3=ve,g.Vector4=Mo,g.WebGLCoordinateSystem=gs,g.WebGLRenderer=c2,g.WebGPUCoordinateSystem=Bo,g.WebMonitor=j2,g.WebRTCClient=a2,g.WebSocketClient=xe,g.YZCanvasContext=Do,g.addClass=Mb,g.addWatermark=h1,g.addWxJsReadyFnBeforeConfig=Va,g.ajax=_u,g.aliJsChooseImage=B2,g.aliJsGetLocation=N2,g.aliJsOpenLocation=F2,g.aliJsPreviewImage=U2,g.aliJsReady=R2,g.aliJsScan=z2,g.aliJsTradePay=L2,g.angle=se,g.animate=q1,g.animateShapes=fv,g.animationEnd$=Cw,g.animationStart$=_w,g.atomReadAttribute=Pu,g.atomReadAttributes=ea,g.atomReadStyle=Bb,g.atomReadStyles=Qo,g.atomRemoveAttribute=jb,g.atomRemoveDataset=Pv,g.atomRemoveStyle=ta,g.atomWriteAttribute=yn,g.atomWriteStyle=ws,g.base64EncodeOutputStream=Bl,g.bitmapMapper=cu,g.blobToImageData=Ly,g.byteArrayOutputStream=Ao,g.changeBrightness=a1,g.changeCheckboxChecked=Cb,g.changeDiaphaneity=c1,g.changeRadioChecked=_b,g.changeSelected=Sb,g.changeSize=o1,g.checkVersion=X2,g.checkWxJsApi=l2,g.clearCookies=zv,g.clearLocalStorage=Av,g.clearSessionStorage=Sv,g.closeLog=oh,g.closest=yb,g.compileTemplate=zb,g.computeImageDisplayRect=Iy,g.containsChild=db,g.createDefaultMousePoint=na,g.createElement=wu,g.createElementNS=Db,g.createEvent=Sr,g.createFragment=bu,g.createFromEventPattern=xy,g.createIndexDB=Fv,g.createMiniReact=Yv,g.createMiniVue=Af,g.createObjectURL=hu,g.createTextNode=Ob,g.createWebSocket=Mf,g.createXMLHttpRequest=Su,g.cssAttrsToCanvasAttrs=Au,g.dispatchClickFromEvent=My,g.dispatchEvent=To,g.dispatchEventFromEvent=Ay,g.distance=Ze,g.domPrefixes=Xo,g.domToBlob=oo,g.domToString=io,g.drag$=zu,g.dragEnd$=Fu,g.dragEnter$=Uu,g.dragLeave$=$u,g.dragOver$=Yu,g.dragStart$=Nu,g.drawBitmapInCanvas=V1,g.drawQRCodeToCanvas=m1,g.drop$=Bu,g.easeNameToCubicBezier=zo,g.empty=pu,g.fetchLatestVersionFromHtml=Ff,g.flipSideToSide=Ny,g.flipUpsideDown=Fy,g.followMouseShape=lv,g.getBitmapFromCanvas=G1,g.getBrowserClient=Xr,g.getBrowserClientVersion=Vv,g.getBrowserLanguage=qv,g.getCSSVar=et,g.getCurrentVersion=Nf,g.getDOMMatrix=jo,g.getDirection=g1,g.getDocumentElement=Yn,g.getElementPositionInPage=ha,g.getElementPositionInPage2=zw,g.getElementPositionInViewport=ca,g.getEmSize=hb,g.getEventCurrentTarget=by,g.getFileMD5Hash=sl,g.getFileMimeFromFileInBrowser=n0,g.getFormSubmitData=Nb,g.getImageData=zl,g.getImageDataByAIData=u1,g.getImageMainColor=zy,g.getInnerText=Tb,g.getInternetExplorerVersion=Df,g.getKeyCode=Xw,g.getMouseButton=$w,g.getMousePositionInElement=Lt,g.getMousePositionInPage=la,g.getMousePositionInViewport=Bw,g.getOperatingSystem=jr,g.getOperatingSystemVersion=Gv,g.getPage=Rw,g.getRelativeBoundingClientRect=Lw,g.getRemSize=qo,g.getRules=Yb,g.getScrollWheelDelta=Uw,g.getSelectedText=tb,g.getStyle=bs,g.getStyleSheets=Tu,g.getTheme$=Dv,g.getThemeColors=Rv,g.getTimeZone=Hv,g.getVNode=Ua,g.getVerticalScrollTopPercentInPage=Nw,g.getVertxRegisterBaseUrl=Xv,g.getViewport=aa,g.getWindow=Ow,g.gifImage=Ul,g.h=Ef,g.hFromEl=Br,g.handleChunkLoadError=V2,g.hasClass=Ib,g.hideEl=yu,g.html=mu,g.iframePostMessage=Rb,g.imageDataToBitmap=Dy,g.imageDataToBlob=Ry,g.imageDataToDataURL=Oy,g.injectStyle=Eu,g.injectWxJsConfig=h2,g.insert=Un,g.isActiveEl=ab,g.isAliBrowser=Rf,g.isAliMiniProgram=r2,g.isAndroid=If,g.isAppleDevice=Jv,g.isBadAndroid=Kv,g.isBrowserSupportFileAPI=Qg,g.isChunkLoadError=G2,g.isElement=H1,g.isIE=Qv,g.isIE10=e2,g.isIE11=n2,g.isIE9=t2,g.isIOS=Ya,g.isInViewport=Fw,g.isInput=ys,g.isInputCheckbox=Jo,g.isInputNumber=xb,g.isInputRadio=Ko,g.isInputText=vb,g.isMacOS=kf,g.isMobile=Zv,g.isRootEl=ob,g.isSafari=Wv,g.isSelect=Wo,g.isSupportEvent=Vb,g.isSupportPointer=Gb,g.isSupportTouch=Xb,g.isTextArea=wb,g.isWxBrowser=Of,g.isWxMiniProgram=s2,g.jpgToPng=n1,g.keyDown$=ju,g.keyPress$=Ew,g.keyUp$=Xu,g.leftRotate=By,g.length=Bn,g.mapTDTJSSDK=$2,g.marginSharpen=e1,g.miniVue=jv,g.mosaic=l1,g.mountVNode=Be,g.mouseClick$=Kb,g.mouseContextMenu$=tw,g.mouseDoubleClick$=Zb,g.mouseDown$=Mu,g.mouseEnter$=Wb,g.mouseLeave$=Jb,g.mouseMove$=Dr,g.mouseOut$=Hb,g.mouseOver$=qb,g.mouseUp$=ku,g.mouseWheel$=Qb,g.nearestElement=lb,g.nextElementSibling=pb,g.normalizePoint=p1,g.onBeforeUnload=lu,g.onDocumentReady=Vo,g.openLog=Gm,g.outputGifBase64=$l,g.outputQRCodeBase64=d1,g.pan$=ew,g.panCancel$=iw,g.panDown$=hw,g.panEnd$=rw,g.panLeft$=ow,g.panMove$=nw,g.panRight$=aw,g.panStart$=sw,g.panUp$=cw,g.parent=ub,g.parents=Ho,g.parseCSS=ga,g.parseTransformToMatrix=au,g.patchVNode=Ur,g.pinch$=lw,g.pinchIn$=uw,g.pinchOut$=fw,g.pngToJpg=s1,g.pointerCancel$=oa,g.pointerDown$=ra,g.pointerMove$=sa,g.pointerUp$=ia,g.polar=Qe,g.polymorphTween=mv,g.press$=dw,g.preventDefault=We,g.previousElementSibling=gb,g.querySelectorAllToStringArray=t0,g.radiusClip=i1,g.readFileInBrowser=ns,g.readStyleFromStyles=Fb,g.rectClip=r1,g.rem2px=cb,g.remove=Pb,g.removeAllEventListeners=vy,g.removeClass=kb,g.renderVNode=Tf,g.reverseCSSToJSEasing=R1,g.reverseEaseNameToCubicBezier=eu,g.reverseEasing=Jl,g.revokeObjectURL=W1,g.rightRotate=Uy,g.rotate$=mw,g.rotatePoint=me,g.runInSandbox=Lb,g.scheduleVNodeAsap=$a,g.scheduleVNodeImmediately=Pf,g.scrollParent=fb,g.scrollTo=rb,g.selectFileInBrowser=ao,g.setCSSVar=Ov,g.setLogUploadFn=Vm,g.setManualScroll=ib,g.setRem=i2,g.setStyle=$n,g.setTheme=Cf,g.setWindowTitle=eb,g.shadowRoot=bb,g.sharpen=t1,g.showEl=gu,g.showUpdateDialog=Bf,g.siblings=mb,g.simulateEventFromTouch=ky,g.stopPropagation=Ll,g.storage$=Dw,g.stringToDom=e0,g.swipe$=pw,g.swipeDown$=ww,g.swipeLeft$=gw,g.swipeRight$=yw,g.swipeUp$=bw,g.tap$=Lu,g.tapOutSide$=vw,g.targetToAfterDropShape=uv,g.text=Eb,g.toBlackAndWhite=jy,g.toBlue=qy,g.toBlueAndGreen=Jy,g.toBlueAndGrey=Qy,g.toDegree=Ut,g.toGreen=Vy,g.toGreenAndGrey=Zy,g.toGrey=$y,g.toGrey2=Yy,g.toOpposite=Xy,g.toRadian=ut,g.toRed=Gy,g.toRedAndBlue=Wy,g.toRedAndGreen=Hy,g.toRedAndGrey=Ky,g.toggleClass=Zo,g.toggleElDisplay=Ab,g.toggleTheme=Iv,g.touchCancel$=Ru,g.touchEnd$=Ou,g.touchMove$=Iu,g.touchStart$=Du,g.transform=Go,g.transformPath2D=X1,g.transitionEnd$=Sw,g.transitionStart$=xw,g.unmountVNode=Es,g.updateVNode=Yr,g.useAttribute=Ne,g.useClickA=Ir,g.useClipboard=sb,g.useCompatableDownMovePoint$=Pw,g.useCookie=Lv,g.useCoords$=xv,g.useDataset=Tv,g.useDocumentVisible$=Iw,g.useDraggable=Mw,g.useDrop=kw,g.useElementEventBus=Ww,g.useEvent$=st,g.useEventListener=yt,g.useFeRoute=Ev,g.useHashChange$=Cv,g.useHotKeyDown$=Ju,g.useHotKeyFile=Vw,g.useHotKeyFile$=Ku,g.useHotKeyUp$=Gw,g.useIntersection$=mf,g.useLoadImage=fu,g.useLoadLink=K1,g.useLoadScript=J1,g.useLocalStorage=wf,g.useLocale=Ba,g.useLocation$=yf,g.useMatchMedia$=gf,g.useMouseAndPointerDownMovePoint$=qu,g.useMouseDownMovePoint$=Gu,g.useMouseMovePoint$=Tw,g.useMousePoint=bn,g.useMutation$=df,g.useParentEventListener=wy,g.usePointerDownMovePoint$=Or,g.usePopStateChange$=bf,g.usePressDownMove=Qu,g.usePressDownMoveWithMouse=Jw,g.usePressDownMoveWithPointer=tf,g.usePressDownMoveWithTouch=Kw,g.usePull$=Aw,g.useResize=Zu,g.useResize$=ua,g.useSafeArea$=vv,g.useScroll$=Hu,g.useSelectFile=du,g.useSelectFileImage=Q1,g.useSessionStorage=Fa,g.useTouchDownMovePoint$=Vu,g.useUrlChange$=_v,g.useVisible$=bv,g.useVisibleSimple$=yv,g.useWindowResize$=qw,g.vibrate=nb,g.waitElementAddedInDOM=gv,g.waitForStyleSheetsLoaded=Z1,g.writeToIndexDB=Bv,g.wxJsChooseImage=d2,g.wxJsDownloadImage=g2,g.wxJsDownloadVoice=T2,g.wxJsGetLocalImgData=y2,g.wxJsGetLocation=k2,g.wxJsGetNetworkType=A2,g.wxJsLogin=O2,g.wxJsOnVoicePlayEnd=C2,g.wxJsOnVoiceRecordEnd=v2,g.wxJsOpenLocation=M2,g.wxJsPauseVoice=S2,g.wxJsPay=D2,g.wxJsPlayVoice=x2,g.wxJsPreviewImage=m2,g.wxJsScanQRCode=I2,g.wxJsStartRecord=b2,g.wxJsStopRecord=w2,g.wxJsStopVoice=_2,g.wxJsTranslateVoice=P2,g.wxJsUpdateAppMessageShareData=u2,g.wxJsUpdateTimelineShareData=f2,g.wxJsUploadImage=p2,g.wxJsUploadVoice=E2,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"}),g}({});
165
+ ${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 s=this.getPeerName(t);this.trace(`${s} ${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 s=document.createElement("div");s.innerHTML=`<div>${e}, ${t}</div>`,document.getElementById("trace")?.appendChild(s)}getOtherPeer(t){return t===this.localPeerConnection?this.remotePeerConnection:this.localPeerConnection}getPeerName(t){return t===this.localPeerConnection?"localPeerConnection":"remotePeerConnection"}}class KI{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 ob=[],ab={};function zf(n){ob.push(n)}function JI(n,t=!1){const e=vx();if(ab[e])return;wx.error(r=>{console.log(r.errMsg||JSON.stringify(r))}),wx.ready(()=>{ob.forEach(r=>r())});const s=["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(n,{debug:t,jsApiList:s,openTagList:i})),ab[e]=!0}function ZI(n){return new Promise((t,e)=>{wx.checkJsApi({jsApiList:[n],success:function(s){s.checkResult[n]?t(!0):e(!1)},fail:function(){e(!1)}})})}function QI(n){zf(function(){wx.updateAppMessageShareData(n)})}function tk(n){zf(function(){wx.updateTimelineShareData(n)})}function ek(n){wx.chooseImage(n)}function nk(n){wx.previewImage(n)}function sk(n){wx.uploadImage(n)}function ik(n){wx.downloadImage(n)}function rk(n){wx.getLocalImgData(n)}function ok(){wx.startRecord()}function ak(n){wx.stopRecord(n)}function ck(n){wx.onVoiceRecordEnd(n)}function hk(n){wx.playVoice(n)}function uk(n){wx.pauseVoice(n)}function lk(n){wx.stopVoice(n)}function fk(n){wx.onVoicePlayEnd(n)}function dk(n){wx.uploadVoice(n)}function mk(n){wx.downloadVoice(n)}function pk(n){wx.translateVoice(n)}function gk(n){wx.getNetworkType(n)}function yk(n){wx.openLocation(n)}function vk(n){wx.getLocation(n)}function bk(n){wx.scanQRCode(n)}function wk(n,t,e){function s(){WeixinJSBridge.invoke("getBrandWCPayRequest",n,function(i){i.err_msg=="get_brand_wcpay_request:ok"?t():e(i.err_msg)})}typeof WeixinJSBridge>"u"?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",s,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",s),document.attachEvent("onWeixinJSBridgeReady",s)):s()}function xk(n,t,e="snsapi_userinfo",s=""){return`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${n}&redirect_uri=${encodeURIComponent(t)}&response_type=code&scope=${e}&state=${s}#wechat_redirect`}function Sk(n){window.AlipayJSBridge?n&&n():document.addEventListener("AlipayJSBridgeReady",n,!1)}function Ar(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 _k(n,t,e){ap.tradePay(Object.assign(n,{}),function(s){let i="未知错误";switch(s.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 Ek(n,t,e){ap.scan(Object.assign(n,{fail:s=>{e?.(Ar(s))}}),function(s){t?.(s.code)})}function Tk(n,t,e){ap.getLocation(Object.assign(n,{fail:s=>{e?.(Ar(s))}}),function(s){t?.(s)})}function Ck(n,t,e){ap.openLocation(Object.assign(n,{fail:s=>{e?.(Ar(s))}}),function(){t?.()})}function Pk(n,t,e){ap.chooseImage(Object.assign(n,{fail:s=>{e?.(Ar(s,"chooseImage"))}}),function(s){t?.(s)})}function Ak(n,t,e){ap.previewImage(Object.assign(n,{fail:s=>{e?.(Ar(s))}}),function(){t?.()})}class Mk{map;constructor(t,e=120.619585,s=31.299379,i=18){this.map=new T.Map(t),this.map.centerAndZoom(new T.LngLat(e,s),i)}}class Dk{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,s,i,r)=>{const o={type:"js_error",msg:t,file:e,row:s,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 s={type:"resource_error",filename:e.src||e.href,tagName:e.tagName};this.report(s)}},!0)}listenPromiseError(){window.addEventListener("unhandledrejection",t=>{const e={type:"promise_error",reason:t.reason};this.report(e)})}listenWhiteScreenError(){sl(()=>{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(s=>{const[i,r]=s,a=document.elementsFromPoint(i,r)[0];(a?.tagName==="BODY"||a?.tagName==="HTML")&&e++}),e>=t.length*.8){const s={type:"whitescreen_error",reason:"检测到白屏!"};this.report(s)}},3e3)})}report(t){const e=JSON.stringify({...t,appId:this.appId,time:bw()});console.error(e),this.reportUrl&&navigator.sendBeacon(this.reportUrl,e)}}function cb(){return document.querySelector('meta[name="app-version"]')?.getAttribute("content")}async function hb(){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 ub(){window.confirm("系统已更新,是否立即刷新页面?")&&window.location.reload()}async function Rk(){try{const n=cb(),t=await hb();n&&t&&n!==t&&ub()}catch(n){console.error("版本检测失败:",n)}}function Ok(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 Ik(){const n="app_chunk_reload_once";sessionStorage.getItem(n)?console.error("刷新后仍然失败,请提示用户手动刷新或联系管理员"):(sessionStorage.setItem(n,"1"),alert("系统资源已更新,正在为您刷新页面"),window.location.reload())}function lb(n,t){const e=typeof n=="string"?n:n.toString(),s=()=>{try{const a=window.localStorage.getItem(e);if(a)return JSON.parse(a)}catch{}},i=a=>{try{typeof a.value<"u"?window.localStorage.setItem(e,JSON.stringify(a)):window.localStorage.removeItem(e)}catch{}};return{get:()=>{const{get:a}=lo(s(),t);return a().value},set:a=>{const{set:c}=lo(s(),t),h=c(a);i(h)}}}function kk(){window.localStorage.clear()}function Lk(n,t){let e=t?.value||"";if(!e){const r=`; ${document.cookie}`.split(`; ${n}=`).pop()?.split(";").shift();r&&(e=decodeURIComponent(r))}const s=()=>e,i=r=>{if(e=r,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 i(e),{get:s,set:i}}function Vk(){const n=document.cookie.split("; ");for(let t=0;t<n.length;t++){const e=window.location.hostname.split(".");for(;e.length>0;){const s=encodeURIComponent(n[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=s+"/";i.length>0;)document.cookie=s+i.join("/"),i.pop();e.shift()}}}function Nk(n,t){let e;return n.objectStoreNames.contains(t)||(e=n.createObjectStore(t,{keyPath:"id"})),e}function zk(n,t=1,e){return new Promise((s,i)=>{let r;const o=window.indexedDB.open(n,t);o.onerror=()=>{i("无法使用IndexDB!")},o.onsuccess=a=>{r=a.target.result,Nk(r,e),s(r)}})}function Fk(n,t,e={id:1,name:"xxx"}){return new Promise((s,i)=>{const r=n.transaction([t],"readwrite");r.objectStore(t).add(e),r.oncomplete=a=>{s(a)},r.onerror=a=>{i(a)}})}const Bk=["dark","light"],{get:fb,set:db}=lb("theme"),mb=new bn,jk=mb.pipe(vs(void 0));function pb(n){switch(n){case"dark":document.documentElement.classList.add("dark"),ps(document.documentElement,"data-theme","dark");break;case"light":default:document.documentElement.classList.remove("dark"),ps(document.documentElement,"data-theme","light");break}}function gb(n){return db(n),pb(n),mb.next(n),n}function $k(){return gb(fb()=="dark"?"light":"dark")}function Uk(){return u_([jk,Hy("(prefers-color-scheme: dark)")]).pipe(zt(([n,t])=>n||(n=fb(),n||(n=t?"dark":"light",db(n)),pb(n),n)))}function ut(n,t=""){return getComputedStyle(document.documentElement).getPropertyValue(n)||t}function Yk(n,t){document.documentElement.style.setProperty(n,t)}function Gk(n){return{backgroundCommon:ut("--yz-background-common","#ffffff"),backgroundBorderCommon:ut("--yz-background-border-common","#e6e6e6"),panelCommon:ut("--yz-panel-common","#f5f5f5"),panelBorderCommon:ut("--yz-panel-border-common","#b3b3b3"),gapCommon:ut("--yz-gap-common","#cccccc"),placeholderCommon:ut("--yz-placeholder-common","#8f8f8f"),fontCommon:ut("--yz-font-common","#333333"),fontSecondaryCommon:ut("--yz-font-secondary-common","#666666"),fontTertiaryCommon:ut("--yz-font-tertiary-common","#999999"),backgroundReverse:ut("--yz-background-reverse","#ffffff"),backgroundBorderReverse:ut("--yz-background-border-reverse","#e6e6e6"),panelReverse:ut("--yz-panel-reverse","#f5f5f5"),panelBorderReverse:ut("--yz-panel-border-reverse","#b3b3b3"),gapReverse:ut("--yz-gap-reverse","#cccccc"),placeholderReverse:ut("--yz-placeholder-reverse","#8f8f8f"),fontReverse:ut("--yz-font-reverse","#333333"),fontSecondaryReverse:ut("--yz-font-secondary-reverse","#666666"),fontTertiaryReverse:ut("--yz-font-tertiary-reverse","#999999"),blueCommon:ut("--yz-xg-blue","#5a82f0"),bluePanelCommon:ut("--yz-xg-blue-panel","#e6f0ff"),bluePanelBorderCommon:ut("--yz-xg-blue-panel-border","#a0b4f0"),blueGradientCommon:ut("--yz-xg-blue-gradient","#66b3ff"),redCommon:ut("--yz-xg-red","#fa503c"),redPanelCommon:ut("--yz-xg-red-panel","#fff5f5"),redPanelBorderCommon:ut("--yz-xg-red-panel-border","#fac8c8"),redGradientCommon:ut("--yz-xg-red-gradient","#fa8c78"),greenCommon:ut("--yz-xg-green","#00be5a"),greenGradientCommon:ut("--yz-xg-green-gradient","#00e678"),yellowCommon:ut("--yz-xg-yellow","#fa8c00"),yellowGradientCommon:ut("--yz-xg-yellow-gradient","#ffb400"),newenergyCommon:ut("--yz-xg-newenergy","#64c896"),newenergyPanelCommon:ut("--yz-xg-newenergy-panel","#ebfaf2"),primaryPattern:ut(`--yz-pattern-${n}-primary`,"#5a82f0"),secondaryPattern:ut(`--yz-pattern-${n}-secondary`,"#e6f0ff"),gradientPattern:ut(`--yz-pattern-${n}-gradient`,"#66b3ff"),backgroundPattern:ut(`--yz-pattern-${n}-background`,"#ffffff"),backgroundBorderPattern:ut(`--yz-pattern-${n}-background-border`,"#e6e6e6"),panelPattern:ut(`--yz-pattern-${n}-panel`,"#f5f5f5"),panelBorderPattern:ut(`--yz-pattern-${n}-panel-border`,"#b3b3b3"),gapPattern:ut(`--yz-pattern-${n}-gap`,"#cccccc"),placeholderPattern:ut(`--yz-pattern-${n}-placeholder`,"#8f8f8f"),fontPattern:ut(`--yz-pattern-${n}-font`,"#333333"),fontSecondaryPattern:ut(`--yz-pattern-${n}-font-secondary`,"#666666"),fontTertiaryPattern:ut(`--yz-pattern-${n}-font-tertiary`,"#999999")}}return w.ArrowShape=Vu,w.BallShape=ei,w.BezierEasing=Oh,w.CSSToJSEasing=JE,w.Clock=Lh,w.CommonKeyCode=PM,w.ConfettiShapeCombo=Hu,w.CrossShape=$u,w.CurveShape=ku,w.CustomCanvasContext=yp,w.CustomCanvasGradient=_o,w.CustomCanvasPattern=Th,w.DOMParse=Yg,w.DOMVideo=lr,w.DrawContext=TP,w.Easing=q,w.EllipseShape=Uu,w.FileUpload=u2,w.FoxShape=Bu,w.HeartShape=Nu,w.HeartVariantShape=zu,w.Interpolation=Sn,w.LineShape=Cs,w.Ls=es,w.Matrix=ee,w.Matrix2=Ju,w.Matrix3=ma,w.Matrix4=_e,w.PointsShape=la,w.QRCode=Yn,w.RabbitShape=ju,w.RectShape=ts,w.Refresh=YI,w.RingIndicatorShapeCombo=Wu,w.RingShape=cr,w.SVGParse=Hg,w.SVGParsedPathArgsLength=Fi,w.SVGPathDataToD=Dh,w.SegmentShapeCombo=Gu,w.Shape=Bt,w.ShapeCombo=Se,w.ShipShapeCombo=Yu,w.SliderShapeCombo=Xu,w.StarShape=Fu,w.THEME=Bk,w.TWEEN=rT,w.TextShape=ni,w.Timeline=$i,w.TreeShapeCombo=Lu,w.Tween=kh,w.Vector2=xo,w.Vector3=en,w.Vector4=_h,w.WebGLCoordinateSystem=hr,w.WebGLRenderer=KI,w.WebGPUCoordinateSystem=Ku,w.WebMonitor=Dk,w.WebRTCClient=qI,w.WebSocketClient=cn,w.YZCanvasContext=Ch,w.a2c=Eo,w.a2c2=bp,w.absolutizeSVGPath=Co,w.addClass=pA,w.addWatermark=xE,w.addWxJsReadyFnBeforeConfig=zf,w.ajax=_m,w.aliJsChooseImage=Pk,w.aliJsGetLocation=Tk,w.aliJsOpenLocation=Ck,w.aliJsPreviewImage=Ak,w.aliJsReady=Sk,w.aliJsScan=Ek,w.aliJsTradePay=_k,w.angle=Pe,w.animate=IP,w.animateShapes=SP,w.animationEnd$=rM,w.animationStart$=iM,w.applyMiddleware=OC,w.atomReadAttribute=Pm,w.atomReadAttributes=eh,w.atomReadStyle=d2,w.atomReadStyles=Qc,w.atomRemoveAttribute=y2,w.atomRemoveDataset=VM,w.atomRemoveStyle=th,w.atomWriteAttribute=ps,w.atomWriteStyle=Mi,w.attribute=Fn,w.base64EncodeOutputStream=hp,w.bitmapMapper=sy,w.blobToImageData=W_,w.byteArrayOutputStream=Sh,w.catmullRom2bezier=FE,w.changeBrightness=bE,w.changeCheckboxChecked=uA,w.changeDiaphaneity=wE,w.changeRadioChecked=hA,w.changeSelected=cA,w.changeSize=vE,w.checkVersion=Rk,w.checkWxJsApi=ZI,w.clearCookies=Vk,w.clearLocalStorage=kk,w.clearSessionStorage=FM,w.clickA=il,w.clipboard=UP,w.closeLog=bd,w.closest=sA,w.combineEpics=kC,w.combineReducers=RC,w.compatableDownMovePoint$=mM,w.compileTemplate=SA,w.computeImageDisplayRect=U_,w.containsChild=QP,w.coords$=GM,w.createCookie=Lk,w.createDefaultMousePoint=fl,w.createDraggable=gM,w.createDrop=yM,w.createElement=my,w.createElementEventBus=OM,w.createElementNS=vA,w.createEpicMiddleware=IC,w.createEvent=wo,w.createEventListener=Ct,w.createEventListener$=ot,w.createFeRoute=$M,w.createFragment=dy,w.createFromEventPattern$=I_,w.createIndexDB=zk,w.createLocalStorage=lb,w.createMiniReact=XM,w.createMiniVue=Qy,w.createMousePoint=Ps,w.createObjectURL=iy,w.createOnlineStatus$=fM,w.createParentEventListener=R_,w.createReactAppStoreContext=XC,w.createReduxStore=vg,w.createSVGElement=Hn,w.createSessionStorage=wl,w.createStorage$=lM,w.createSvgPath=Ah,w.createTextNode=bA,w.createThunkMiddleware=VC,w.createVueAppStoreContext=dP,w.createWebSocket=rb,w.createXMLHttpRequest=Sm,w.cssAttrsToCanvasAttrs=Am,w.dataset=LM,w.dispatchClickFromEvent=j_,w.dispatchEvent=wh,w.dispatchEventFromEvent=B_,w.distance=Gn,w.documentVisible$=uM,w.domPrefixes=el,w.domToBlob=bm,w.domToString=Jc,w.downloadFromSVGElement=xp,w.downloadFromSVGString=VE,w.drag$=Cy,w.dragEnd$=Ay,w.dragEnter$=Dy,w.dragLeave$=Ry,w.dragOver$=Oy,w.dragStart$=Py,w.drawBitmapInCanvas=OP,w.drawQRCodeToCanvas=CE,w.drop$=My,w.easeNameToCubicBezier=Ih,w.elValueChange$=aM,w.empty=uy,w.exceptionLoggerMiddleware=zC,w.executeTimeLoggerMiddleware=FC,w.fetchLatestVersionFromHtml=hb,w.flipSideToSide=q_,w.flipUpsideDown=K_,w.followMouseShape=wP,w.formSubmit$=cM,w.getBitmapFromCanvas=RP,w.getCSSVar=ut,w.getCurrentVersion=cb,w.getDOMMatrix=tl,w.getDirection=AE,w.getDocumentElement=ii,w.getElementPositionInPage=vl,w.getElementPositionInPage2=xM,w.getElementPositionInViewport=yl,w.getEmSize=qP,w.getEventCurrentTarget=D_,w.getFileMD5Hash=xm,w.getFileMimeFromFileInBrowser=h2,w.getFormSubmitData=l2,w.getImageData=rp,w.getImageDataByAIData=_E,w.getImageMainColor=H_,w.getInnerText=fA,w.getKeyCode=AM,w.getMouseButton=CM,w.getMousePositionInElement=Wt,w.getMousePositionInPage=bl,w.getMousePositionInViewport=EM,w.getPage=bM,w.getRelativeBoundingClientRect=wM,w.getRemSize=rl,w.getRules=g2,w.getSVGRawStringFromElement=NE,w.getScrollWheelDelta=TM,w.getSelectedText=BP,w.getStyle=Ai,w.getStyleSheets=Cm,w.getTheme$=Uk,w.getThemeColors=Gk,w.getVNode=xl,w.getVerticalScrollTopPercentInPage=SM,w.getVertxRegisterBaseUrl=WI,w.getViewport=zy,w.getWindow=vM,w.gifImage=up,w.h=Ky,w.hFromEl=va,w.handleChunkLoadError=Ik,w.hasClass=yA,w.hashChange$=jM,w.hideEl=fy,w.hotKeyDown$=By,w.hotKeyFile=DM,w.hotKeyFile$=jy,w.hotKeyUp$=MM,w.html=hy,w.iframePostMessage=wA,w.imageDataToBitmap=Y_,w.imageDataToBlob=X_,w.imageDataToDataURL=G_,w.injectStyle=Tm,w.injectWxJsConfig=JI,w.insert=si,w.intersection$=Gy,w.isActiveEl=WP,w.isChunkLoadError=Ok,w.isElement=kP,w.isInViewport=_M,w.isInput=ur,w.isInputCheckbox=cl,w.isInputNumber=aA,w.isInputRadio=hl,w.isInputText=oA,w.isRootEl=XP,w.isSVGElementPath=wp,w.isSVGPath=Mh,w.isSelect=al,w.isSupportEvent=PA,w.isSupportPointer=CA,w.isSupportTouch=TA,w.isTextArea=rA,w.jpgToPng=mE,w.keyDown$=Iy,w.keyPress$=oM,w.keyUp$=ky,w.l2c=ws,w.leftRotate=J_,w.length=Hs,w.loadImage=ay,w.loadLink=NP,w.loadScript=VP,w.location$=Xy,w.longhandSVGPath=jE,w.mapTDTJSSDK=Mk,w.marginSharpen=dE,w.matchMedia$=Hy,w.miniVue=WM,w.mosaic=SE,w.mountVNode=Dn,w.mouseAndPointerDownMovePoint$=Ny,w.mouseClick$=OA,w.mouseContextMenu$=LA,w.mouseDoubleClick$=IA,w.mouseDown$=by,w.mouseDownMovePoint$=Ly,w.mouseEnter$=DA,w.mouseLeave$=RA,w.mouseMove$=ga,w.mouseMovePoint$=dM,w.mouseOut$=MA,w.mouseOver$=AA,w.mouseUp$=wy,w.mouseWheel$=kA,w.mutation$=Yy,w.nearestElement=KP,w.nextElementSibling=eA,w.normalizePoint=PE,w.normalizeSVGPath=Rh,w.ofType=LC,w.onBeforeUnload=ry,w.onDocumentReady=sl,w.openLog=Vw,w.operationParser=BC,w.outputGifBase64=lp,w.outputQRCodeBase64=TE,w.pan$=VA,w.panCancel$=BA,w.panDown$=YA,w.panEnd$=FA,w.panLeft$=jA,w.panMove$=NA,w.panRight$=$A,w.panStart$=zA,w.panUp$=UA,w.parent=JP,w.parents=ol,w.parseCSS=Wg,w.parseSVGPath=To,w.parseTransformToMatrix=ny,w.patchVNode=ba,w.pinch$=GA,w.pinchIn$=XA,w.pinchOut$=WA,w.pngToJpg=pE,w.pointerCancel$=gl,w.pointerDown$=ml,w.pointerDownMovePoint$=ya,w.pointerMove$=dl,w.pointerUp$=pl,w.polar=Xn,w.polymorphTween=EP,w.popStateChange$=Wy,w.press$=HA,w.pressDownMove=$y,w.pressDownMoveWithMouse=IM,w.pressDownMoveWithPointer=Uy,w.pressDownMoveWithTouch=kM,w.preventDefault=$n,w.previousElementSibling=nA,w.pull$=pM,w.q2c=zi,w.querySelectorAllToStringArray=a2,w.radiusClip=yE,w.rawState=cu,w.readFileInBrowser=Pi,w.readStyleFromStyles=f2,w.rectClip=gE,w.relativeSVGPath=zE,w.rem2px=HP,w.remove=dA,w.removeAllEventListeners=O_,w.removeClass=gA,w.renderVNode=Jy,w.resize=vy,w.resize$=ll,w.reverseCSSToJSEasing=ZE,w.reverseEaseNameToCubicBezier=Pp,w.reverseEasing=Sp,w.revokeObjectURL=LP,w.rightRotate=Z_,w.rotate$=qA,w.rotatePoint=Ge,w.runInSandbox=xA,w.rxState=DC,w.safeArea$=YM,w.scheduleVNodeAsap=Sl,w.scheduleVNodeImmediately=Zy,w.scroll$=hM,w.scrollParent=ZP,w.scrollTo=YP,w.selectFile=cy,w.selectFileImage=FP,w.selectFileInBrowser=Zc,w.setCSSVar=Yk,w.setLogUploadFn=Nw,w.setManualScroll=GP,w.setRem=HI,w.setStyle=Us,w.setTheme=gb,w.setWindowTitle=jP,w.shadowRoot=iA,w.sharpen=fE,w.showEl=ly,w.showUpdateDialog=ub,w.siblings=tA,w.simulateEventFromTouch=$_,w.stateLoggerMiddleware=NC,w.stopPropagation=ip,w.stringToDom=c2,w.swipe$=KA,w.swipeDown$=tM,w.swipeLeft$=JA,w.swipeRight$=ZA,w.swipeUp$=QA,w.tap$=Ty,w.tapOutSide$=eM,w.targetToAfterDropShape=xP,w.text=lA,w.toBlackAndWhite=eE,w.toBlue=rE,w.toBlueAndGreen=cE,w.toBlueAndGrey=lE,w.toDegree=Jt,w.toGreen=iE,w.toGreenAndGrey=uE,w.toGrey=Q_,w.toGrey2=tE,w.toOpposite=nE,w.toRadian=wt,w.toRed=sE,w.toRedAndBlue=aE,w.toRedAndGreen=oE,w.toRedAndGrey=hE,w.toggleClass=ul,w.toggleElDisplay=mA,w.toggleTheme=$k,w.touchCancel$=Ey,w.touchDownMovePoint$=Vy,w.touchEnd$=_y,w.touchMove$=xy,w.touchStart$=Sy,w.transform=nl,w.transformPath2D=DP,w.transitionEnd$=sM,w.transitionStart$=nM,w.unmountVNode=fr,w.updateVNode=xa,w.urlChange$=BM,w.useDimensions=fP,w.useImmer=uP,w.useImmerReducer=lP,w.useLocale=qu,w.useReactControllableState=WC,w.useReactState=AC,w.useVueControllableState=mP,w.useVueState=MC,w.useWindowResize$=EA,w.vibrate=$P,w.visible$=zM,w.waitElementAddedInDOM=NM,w.waitForStyleSheetsLoaded=zP,w.writeToIndexDB=Fk,w.wxJsChooseImage=ek,w.wxJsDownloadImage=ik,w.wxJsDownloadVoice=mk,w.wxJsGetLocalImgData=rk,w.wxJsGetLocation=vk,w.wxJsGetNetworkType=gk,w.wxJsLogin=xk,w.wxJsOnVoicePlayEnd=fk,w.wxJsOnVoiceRecordEnd=ck,w.wxJsOpenLocation=yk,w.wxJsPauseVoice=uk,w.wxJsPay=wk,w.wxJsPlayVoice=hk,w.wxJsPreviewImage=nk,w.wxJsScanQRCode=bk,w.wxJsStartRecord=ok,w.wxJsStopRecord=ak,w.wxJsStopVoice=lk,w.wxJsTranslateVoice=pk,w.wxJsUpdateAppMessageShareData=QI,w.wxJsUpdateTimelineShareData=tk,w.wxJsUploadImage=sk,w.wxJsUploadVoice=dk,w.zvhToLSVGPath=BE,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"}),w}({});
105
166
  //# sourceMappingURL=zyzgroup_core_web.iife.js.map