motionary 10.9.0 → 11.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (406) hide show
  1. package/AGENTS.md +1 -1
  2. package/CHANGELOG.md +32 -0
  3. package/README.md +119 -74
  4. package/README_ja.md +4 -4
  5. package/README_zh.md +4 -4
  6. package/dist/chunks/{anim-image-CnZDYmtv.js → anim-image-Btw3j5Qb.js} +2 -2
  7. package/dist/chunks/{anim-image-CnZDYmtv.js.map → anim-image-Btw3j5Qb.js.map} +1 -1
  8. package/dist/chunks/{anim-image-D1JZ7wOU.cjs → anim-image-DVv_vtbG.cjs} +2 -2
  9. package/dist/chunks/{anim-image-D1JZ7wOU.cjs.map → anim-image-DVv_vtbG.cjs.map} +1 -1
  10. package/dist/chunks/{three-scene-DibsZUID.js → gl-scene-BDA6FlGQ.js} +5 -11
  11. package/dist/chunks/gl-scene-BDA6FlGQ.js.map +1 -0
  12. package/dist/chunks/{three-scene-BFZnZuqp.cjs → gl-scene-SO5UU93S.cjs} +3 -10
  13. package/dist/chunks/gl-scene-SO5UU93S.cjs.map +1 -0
  14. package/dist/chunks/{keyframes-uYSI-do7.cjs → keyframes-4rb2WShh.cjs} +2 -2
  15. package/dist/chunks/{keyframes-uYSI-do7.cjs.map → keyframes-4rb2WShh.cjs.map} +1 -1
  16. package/dist/chunks/{keyframes-CLoYRGjR.js → keyframes-C9poRyzF.js} +2 -2
  17. package/dist/chunks/{keyframes-CLoYRGjR.js.map → keyframes-C9poRyzF.js.map} +1 -1
  18. package/dist/chunks/{lottie-player-UJHOl-8L.js → lottie-player-CPdwHhqe.js} +2 -2
  19. package/dist/chunks/{lottie-player-UJHOl-8L.js.map → lottie-player-CPdwHhqe.js.map} +1 -1
  20. package/dist/chunks/{lottie-player-Mcpt1H5w.cjs → lottie-player-DD1pnLN2.cjs} +2 -2
  21. package/dist/chunks/{lottie-player-Mcpt1H5w.cjs.map → lottie-player-DD1pnLN2.cjs.map} +1 -1
  22. package/dist/chunks/{physics-playground-BxnQyZ_V.cjs → physics-playground-B00t13Nz.cjs} +2 -2
  23. package/dist/chunks/{physics-playground-BxnQyZ_V.cjs.map → physics-playground-B00t13Nz.cjs.map} +1 -1
  24. package/dist/chunks/{physics-playground-B19qANJs.js → physics-playground-CluT_Nj9.js} +2 -2
  25. package/dist/chunks/{physics-playground-B19qANJs.js.map → physics-playground-CluT_Nj9.js.map} +1 -1
  26. package/dist/chunks/{registry-RJYrdUTF.js → registry-W7pXOwju.js} +3 -3
  27. package/dist/chunks/{registry-RJYrdUTF.js.map → registry-W7pXOwju.js.map} +1 -1
  28. package/dist/chunks/{registry-xGDPpmX2.cjs → registry-uaO8pDKn.cjs} +3 -3
  29. package/dist/chunks/{registry-xGDPpmX2.cjs.map → registry-uaO8pDKn.cjs.map} +1 -1
  30. package/dist/chunks/{runtime-link-GD9ayzxH.cjs → runtime-link-Bz3rGMsh.cjs} +2 -2
  31. package/dist/chunks/{runtime-link-GD9ayzxH.cjs.map → runtime-link-Bz3rGMsh.cjs.map} +1 -1
  32. package/dist/chunks/{runtime-link-CQyKFwE1.js → runtime-link-CP3qaRja.js} +2 -2
  33. package/dist/chunks/{runtime-link-CQyKFwE1.js.map → runtime-link-CP3qaRja.js.map} +1 -1
  34. package/dist/chunks/{scroll-scene-C-6sdMtR.cjs → scroll-scene-CeIosbEs.cjs} +3 -3
  35. package/dist/chunks/{scroll-scene-C-6sdMtR.cjs.map → scroll-scene-CeIosbEs.cjs.map} +1 -1
  36. package/dist/chunks/{scroll-scene-DtAaP0Aa.js → scroll-scene-eHhGcoDQ.js} +3 -3
  37. package/dist/chunks/{scroll-scene-DtAaP0Aa.js.map → scroll-scene-eHhGcoDQ.js.map} +1 -1
  38. package/dist/chunks/{ticker-C4VkAL4Y.js → ticker-D0qF_rV_.js} +2 -2
  39. package/dist/chunks/{ticker-C4VkAL4Y.js.map → ticker-D0qF_rV_.js.map} +1 -1
  40. package/dist/chunks/{ticker-DJuzcy1_.cjs → ticker-nshSbZ-Q.cjs} +2 -2
  41. package/dist/chunks/{ticker-DJuzcy1_.cjs.map → ticker-nshSbZ-Q.cjs.map} +1 -1
  42. package/dist/chunks/{tween-BHbiOBWO.cjs → tween-Df87h-1G.cjs} +2 -2
  43. package/dist/chunks/{tween-BHbiOBWO.cjs.map → tween-Df87h-1G.cjs.map} +1 -1
  44. package/dist/chunks/{tween-CrnzMeOU.js → tween-WepVA7id.js} +2 -2
  45. package/dist/chunks/{tween-CrnzMeOU.js.map → tween-WepVA7id.js.map} +1 -1
  46. package/dist/chunks/{worker-canvas-Bkwd1euX.js → worker-canvas-BZNHRLcu.js} +50 -3
  47. package/dist/chunks/worker-canvas-BZNHRLcu.js.map +1 -0
  48. package/dist/chunks/{worker-canvas-Ckc3R2Ye.cjs → worker-canvas-DW3VgtxO.cjs} +50 -2
  49. package/dist/chunks/worker-canvas-DW3VgtxO.cjs.map +1 -0
  50. package/dist/components/dotlottie.cjs +3 -3
  51. package/dist/components/dotlottie.d.cts +2 -1
  52. package/dist/components/dotlottie.d.ts +2 -1
  53. package/dist/components/dotlottie.js +3 -3
  54. package/dist/components/fx-perf.cjs +10 -5
  55. package/dist/components/fx-perf.cjs.map +1 -1
  56. package/dist/components/fx-perf.d.cts +6 -1
  57. package/dist/components/fx-perf.d.ts +6 -1
  58. package/dist/components/fx-perf.js +11 -6
  59. package/dist/components/fx-perf.js.map +1 -1
  60. package/dist/components/fx2.d.cts +6 -1
  61. package/dist/components/fx2.d.ts +6 -1
  62. package/dist/components/gl-model.cjs +3 -3
  63. package/dist/components/gl-model.d.cts +1 -1
  64. package/dist/components/gl-model.d.ts +1 -1
  65. package/dist/components/gl-model.js +3 -3
  66. package/dist/components/snap-carousel.cjs +2 -2
  67. package/dist/components/snap-carousel.js +2 -2
  68. package/dist/components/widgets.cjs +9 -9
  69. package/dist/components/widgets.cjs.map +1 -1
  70. package/dist/components/widgets.d.cts +10 -9
  71. package/dist/components/widgets.d.ts +10 -9
  72. package/dist/components/widgets.js +12 -12
  73. package/dist/components/widgets.js.map +1 -1
  74. package/dist/llms-full.txt +301 -312
  75. package/dist/llms.txt +3 -4
  76. package/dist/manifest.json +271 -299
  77. package/dist/runtime/drag-snap.cjs +1 -1
  78. package/dist/runtime/drag-snap.js +1 -1
  79. package/dist/runtime/format-apng.cjs +4 -4
  80. package/dist/runtime/format-apng.js +4 -4
  81. package/dist/runtime/format-css.cjs +4 -4
  82. package/dist/runtime/format-css.js +4 -4
  83. package/dist/runtime/format-gif.cjs +4 -4
  84. package/dist/runtime/format-gif.js +4 -4
  85. package/dist/runtime/format-gltf.cjs +1 -1
  86. package/dist/runtime/format-gltf.js +1 -1
  87. package/dist/runtime/format-motion.cjs +4 -4
  88. package/dist/runtime/format-motion.js +4 -4
  89. package/dist/runtime/format-obj.cjs +1 -1
  90. package/dist/runtime/format-obj.js +1 -1
  91. package/dist/runtime/format-scene.cjs +1 -1
  92. package/dist/runtime/format-scene.js +1 -1
  93. package/dist/runtime/format-sprite.cjs +3 -3
  94. package/dist/runtime/format-sprite.js +3 -3
  95. package/dist/runtime/format-svg.cjs +3 -3
  96. package/dist/runtime/format-svg.js +3 -3
  97. package/dist/runtime/format-webp.cjs +4 -4
  98. package/dist/runtime/format-webp.js +4 -4
  99. package/dist/runtime/gl.cjs +1 -1
  100. package/dist/runtime/gl.js +1 -1
  101. package/dist/runtime/gltf-anim.cjs +1 -1
  102. package/dist/runtime/gltf-anim.js +1 -1
  103. package/dist/runtime/gltf-decoders.cjs +1 -1
  104. package/dist/runtime/gltf-decoders.js +1 -1
  105. package/dist/runtime/lottie-state.cjs +1 -1
  106. package/dist/runtime/lottie-state.js +1 -1
  107. package/dist/runtime/physics.cjs +1 -1
  108. package/dist/runtime/physics.js +1 -1
  109. package/dist/runtime/scroll.cjs +2 -2
  110. package/dist/runtime/scroll.js +2 -2
  111. package/dist/runtime/smooth.cjs +1 -1
  112. package/dist/runtime/smooth.js +1 -1
  113. package/dist/runtime/text.cjs +1 -1
  114. package/dist/runtime/text.js +1 -1
  115. package/dist/runtime/vector.cjs +66 -17
  116. package/dist/runtime/vector.cjs.map +1 -1
  117. package/dist/runtime/vector.d.cts +30 -6
  118. package/dist/runtime/vector.d.ts +30 -6
  119. package/dist/runtime/vector.iife.js +1 -1
  120. package/dist/runtime/vector.iife.js.map +1 -1
  121. package/dist/runtime/vector.js +65 -18
  122. package/dist/runtime/vector.js.map +1 -1
  123. package/dist/runtime.cjs +3 -3
  124. package/dist/runtime.d.cts +2 -2
  125. package/dist/runtime.d.ts +2 -2
  126. package/dist/runtime.iife.js +1 -1
  127. package/dist/runtime.iife.js.map +1 -1
  128. package/dist/runtime.js +5 -5
  129. package/dist/widgets/dotlottie.cjs +3 -3
  130. package/dist/widgets/dotlottie.js +3 -3
  131. package/dist/widgets/gl-model.cjs +3 -3
  132. package/dist/widgets/gl-model.js +3 -3
  133. package/dist/widgets/gl-scene.cjs +3 -3
  134. package/dist/widgets/gl-scene.js +3 -3
  135. package/dist/widgets/install-button.cjs.map +1 -1
  136. package/dist/widgets/install-button.js.map +1 -1
  137. package/dist/widgets/lottie-player.cjs +3 -3
  138. package/dist/widgets/lottie-player.js +3 -3
  139. package/dist/widgets/motion-inspector.cjs +1 -1
  140. package/dist/widgets/motion-inspector.js +1 -1
  141. package/dist/widgets/physics-playground.cjs +3 -3
  142. package/dist/widgets/physics-playground.js +3 -3
  143. package/dist/widgets/plugin-card.cjs +2 -2
  144. package/dist/widgets/plugin-card.js +2 -2
  145. package/dist/widgets/scroll-scene.cjs +3 -3
  146. package/dist/widgets/scroll-scene.js +3 -3
  147. package/dist/widgets/smooth-scroll.cjs +2 -2
  148. package/dist/widgets/smooth-scroll.js +2 -2
  149. package/dist/widgets/snap-carousel.cjs +2 -2
  150. package/dist/widgets/snap-carousel.js +2 -2
  151. package/dist/widgets/text-splitter.cjs +2 -2
  152. package/dist/widgets/text-splitter.js +2 -2
  153. package/dist/widgets/worker-canvas.cjs +1 -1
  154. package/dist/widgets/worker-canvas.js +1 -1
  155. package/dist/widgets.umd.js +1 -1
  156. package/dist/widgets.umd.js.map +1 -1
  157. package/docs/ROADMAP.md +44 -4
  158. package/docs/architecture.md +78 -0
  159. package/docs/compat-matrix.md +340 -0
  160. package/docs/components/README.md +1 -5
  161. package/docs/components/usa-accordion.md +1 -1
  162. package/docs/components/usa-acrylic.md +1 -1
  163. package/docs/components/usa-add-to-cart.md +1 -1
  164. package/docs/components/usa-ambient.md +1 -1
  165. package/docs/components/usa-anim-icon.md +1 -1
  166. package/docs/components/usa-audio.md +1 -1
  167. package/docs/components/usa-aurora.md +1 -1
  168. package/docs/components/usa-auto-animate.md +1 -1
  169. package/docs/components/usa-auto-skeleton.md +1 -1
  170. package/docs/components/usa-avatar-stack.md +1 -1
  171. package/docs/components/usa-back-to-top.md +1 -1
  172. package/docs/components/usa-badge-wall.md +1 -1
  173. package/docs/components/usa-badge.md +1 -1
  174. package/docs/components/usa-bar-chart.md +1 -1
  175. package/docs/components/usa-bg-generator.md +1 -1
  176. package/docs/components/usa-blobs.md +1 -1
  177. package/docs/components/usa-bottom-sheet.md +1 -1
  178. package/docs/components/usa-button.md +1 -1
  179. package/docs/components/usa-card-stack.md +1 -1
  180. package/docs/components/usa-card.md +1 -1
  181. package/docs/components/usa-carousel-3d.md +1 -1
  182. package/docs/components/usa-carousel.md +1 -1
  183. package/docs/components/usa-cart-drawer.md +1 -1
  184. package/docs/components/usa-chapter-nav.md +1 -1
  185. package/docs/components/usa-chat-composer.md +1 -1
  186. package/docs/components/usa-check.md +1 -1
  187. package/docs/components/usa-checkbox.md +1 -1
  188. package/docs/components/usa-click.md +1 -1
  189. package/docs/components/usa-clock-control.md +1 -1
  190. package/docs/components/usa-code-export.md +1 -1
  191. package/docs/components/usa-color-picker.md +1 -1
  192. package/docs/components/usa-command-palette.md +1 -1
  193. package/docs/components/usa-compare.md +1 -1
  194. package/docs/components/usa-countdown.md +1 -1
  195. package/docs/components/usa-counter.md +1 -1
  196. package/docs/components/usa-cube-gallery.md +1 -1
  197. package/docs/components/usa-cube.md +1 -1
  198. package/docs/components/usa-cursor.md +1 -1
  199. package/docs/components/usa-date-picker.md +1 -1
  200. package/docs/components/usa-depth.md +1 -1
  201. package/docs/components/usa-dialog.md +1 -1
  202. package/docs/components/usa-disclosure.md +1 -1
  203. package/docs/components/usa-distort.md +1 -1
  204. package/docs/components/usa-dock.md +1 -1
  205. package/docs/components/usa-dot-network.md +1 -1
  206. package/docs/components/usa-dotlottie.md +6 -6
  207. package/docs/components/usa-double-tap.md +1 -1
  208. package/docs/components/usa-draggable.md +1 -1
  209. package/docs/components/usa-draw.md +1 -1
  210. package/docs/components/usa-drawer.md +1 -1
  211. package/docs/components/usa-equalizer.md +1 -1
  212. package/docs/components/usa-fab.md +1 -1
  213. package/docs/components/usa-festival-banner.md +1 -1
  214. package/docs/components/usa-field.md +1 -1
  215. package/docs/components/usa-file-drop.md +1 -1
  216. package/docs/components/usa-fullpage.md +1 -1
  217. package/docs/components/usa-fx.md +1 -1
  218. package/docs/components/usa-gauge.md +1 -1
  219. package/docs/components/usa-gen-art.md +1 -1
  220. package/docs/components/usa-gesture-fx.md +1 -1
  221. package/docs/components/usa-gesture-sticker.md +1 -1
  222. package/docs/components/usa-gl-model.md +7 -7
  223. package/docs/components/usa-gl-scene.md +10 -10
  224. package/docs/components/usa-glitch.md +1 -1
  225. package/docs/components/usa-globe.md +1 -1
  226. package/docs/components/usa-gpu-particles.md +1 -1
  227. package/docs/components/usa-gradient-text.md +1 -1
  228. package/docs/components/usa-grain.md +1 -1
  229. package/docs/components/usa-grid-glow.md +1 -1
  230. package/docs/components/usa-gyro-card.md +1 -1
  231. package/docs/components/usa-handwriting.md +1 -1
  232. package/docs/components/usa-hero-video.md +1 -1
  233. package/docs/components/usa-hold.md +1 -1
  234. package/docs/components/usa-hud-panel.md +1 -1
  235. package/docs/components/usa-hydrate.md +1 -1
  236. package/docs/components/usa-icon-morph.md +1 -1
  237. package/docs/components/usa-install-button.md +3 -3
  238. package/docs/components/usa-kanban.md +1 -1
  239. package/docs/components/usa-keyframe-editor.md +1 -1
  240. package/docs/components/usa-kpi.md +1 -1
  241. package/docs/components/usa-leaderboard.md +1 -1
  242. package/docs/components/usa-like.md +1 -1
  243. package/docs/components/usa-liquid-nav.md +1 -1
  244. package/docs/components/usa-liquid.md +1 -1
  245. package/docs/components/usa-loading-bar.md +1 -1
  246. package/docs/components/usa-location-card.md +1 -1
  247. package/docs/components/usa-lottie-icon.md +1 -1
  248. package/docs/components/usa-lottie-player.md +5 -5
  249. package/docs/components/usa-lottie.md +1 -1
  250. package/docs/components/usa-lyrics.md +1 -1
  251. package/docs/components/usa-magnetic.md +1 -1
  252. package/docs/components/usa-marquee.md +1 -1
  253. package/docs/components/usa-mask-reveal.md +1 -1
  254. package/docs/components/usa-masonry-flow.md +1 -1
  255. package/docs/components/usa-masonry.md +1 -1
  256. package/docs/components/usa-menu-toggle.md +1 -1
  257. package/docs/components/usa-menu.md +1 -1
  258. package/docs/components/usa-message-list.md +1 -1
  259. package/docs/components/usa-milestones.md +1 -1
  260. package/docs/components/usa-modal.md +1 -1
  261. package/docs/components/usa-morph.md +1 -1
  262. package/docs/components/usa-motion-inspector.md +1 -1
  263. package/docs/components/usa-motion-prefs.md +1 -1
  264. package/docs/components/usa-motion-prompt.md +1 -1
  265. package/docs/components/usa-motion-spec.md +1 -1
  266. package/docs/components/usa-motion-switch.md +1 -1
  267. package/docs/components/usa-motion-theme.md +1 -1
  268. package/docs/components/usa-motion.md +1 -1
  269. package/docs/components/usa-music-player.md +1 -1
  270. package/docs/components/usa-native-preview.md +1 -1
  271. package/docs/components/usa-nav-morph.md +1 -1
  272. package/docs/components/usa-navbar.md +1 -1
  273. package/docs/components/usa-notification-bell.md +1 -1
  274. package/docs/components/usa-odometer.md +1 -1
  275. package/docs/components/usa-organic-card.md +1 -1
  276. package/docs/components/usa-otp.md +1 -1
  277. package/docs/components/usa-overscroll.md +1 -1
  278. package/docs/components/usa-pack.md +1 -1
  279. package/docs/components/usa-pagination.md +1 -1
  280. package/docs/components/usa-panorama.md +1 -1
  281. package/docs/components/usa-parallax-layers.md +1 -1
  282. package/docs/components/usa-particles.md +1 -1
  283. package/docs/components/usa-pause-all.md +1 -1
  284. package/docs/components/usa-perf-monitor.md +1 -1
  285. package/docs/components/usa-physics-playground.md +6 -6
  286. package/docs/components/usa-pinch-zoom.md +1 -1
  287. package/docs/components/usa-player.md +1 -1
  288. package/docs/components/usa-plugin-card.md +4 -4
  289. package/docs/components/usa-plugin-store.md +1 -1
  290. package/docs/components/usa-popover.md +1 -1
  291. package/docs/components/usa-post-fx.md +1 -1
  292. package/docs/components/usa-presence.md +1 -1
  293. package/docs/components/usa-press.md +1 -1
  294. package/docs/components/usa-prize-wheel.md +1 -1
  295. package/docs/components/usa-product-gallery.md +1 -1
  296. package/docs/components/usa-progress-ring.md +1 -1
  297. package/docs/components/usa-progress.md +1 -1
  298. package/docs/components/usa-prop-panel.md +1 -1
  299. package/docs/components/usa-pull-cord.md +1 -1
  300. package/docs/components/usa-pull-refresh.md +1 -1
  301. package/docs/components/usa-radar.md +1 -1
  302. package/docs/components/usa-reactions.md +1 -1
  303. package/docs/components/usa-red-envelope.md +1 -1
  304. package/docs/components/usa-retro-button.md +1 -1
  305. package/docs/components/usa-reveal.md +1 -1
  306. package/docs/components/usa-ripple.md +1 -1
  307. package/docs/components/usa-rive.md +3 -3
  308. package/docs/components/usa-route-transition.md +1 -1
  309. package/docs/components/usa-scene.md +1 -1
  310. package/docs/components/usa-scramble.md +1 -1
  311. package/docs/components/usa-scroll-highlight.md +1 -1
  312. package/docs/components/usa-scroll-progress.md +1 -1
  313. package/docs/components/usa-scroll-ring.md +1 -1
  314. package/docs/components/usa-scroll-scene.md +5 -5
  315. package/docs/components/usa-scrolly.md +1 -1
  316. package/docs/components/usa-segmented.md +1 -1
  317. package/docs/components/usa-shader-backdrop.md +1 -1
  318. package/docs/components/usa-shader.md +1 -1
  319. package/docs/components/usa-sheet.md +1 -1
  320. package/docs/components/usa-shimmer-text.md +1 -1
  321. package/docs/components/usa-shortcut.md +1 -1
  322. package/docs/components/usa-skeleton-reveal.md +1 -1
  323. package/docs/components/usa-skeleton.md +1 -1
  324. package/docs/components/usa-sketch-chart.md +1 -1
  325. package/docs/components/usa-slider.md +1 -1
  326. package/docs/components/usa-smooth-scroll.md +5 -5
  327. package/docs/components/usa-snap-carousel.md +5 -5
  328. package/docs/components/usa-sparkline.md +1 -1
  329. package/docs/components/usa-spatial-card.md +1 -1
  330. package/docs/components/usa-spinner.md +1 -1
  331. package/docs/components/usa-splash.md +1 -1
  332. package/docs/components/usa-split-text.md +1 -1
  333. package/docs/components/usa-spotlight.md +1 -1
  334. package/docs/components/usa-spring.md +1 -1
  335. package/docs/components/usa-stagger.md +1 -1
  336. package/docs/components/usa-star-rating.md +1 -1
  337. package/docs/components/usa-stepper.md +1 -1
  338. package/docs/components/usa-sticky-stack.md +1 -1
  339. package/docs/components/usa-sticky-wall.md +1 -1
  340. package/docs/components/usa-stories.md +1 -1
  341. package/docs/components/usa-story.md +1 -1
  342. package/docs/components/usa-suggestion-chips.md +1 -1
  343. package/docs/components/usa-swipe-deck.md +1 -1
  344. package/docs/components/usa-swipeable.md +1 -1
  345. package/docs/components/usa-switch.md +1 -1
  346. package/docs/components/usa-tab-bar.md +1 -1
  347. package/docs/components/usa-tabs.md +1 -1
  348. package/docs/components/usa-terminal.md +1 -1
  349. package/docs/components/usa-text-rotate.md +1 -1
  350. package/docs/components/usa-text-splitter.md +5 -5
  351. package/docs/components/usa-theme-surface.md +1 -1
  352. package/docs/components/usa-theme-switcher.md +1 -1
  353. package/docs/components/usa-tilt.md +1 -1
  354. package/docs/components/usa-timeline.md +1 -1
  355. package/docs/components/usa-tip.md +1 -1
  356. package/docs/components/usa-toast-stack.md +1 -1
  357. package/docs/components/usa-toaster.md +1 -1
  358. package/docs/components/usa-token-editor.md +1 -1
  359. package/docs/components/usa-typewriter.md +1 -1
  360. package/docs/components/usa-upload-progress.md +1 -1
  361. package/docs/components/usa-video-card.md +1 -1
  362. package/docs/components/usa-view-switch.md +1 -1
  363. package/docs/components/usa-voice-button.md +1 -1
  364. package/docs/components/usa-volume-knob.md +1 -1
  365. package/docs/components/usa-water-ripple.md +1 -1
  366. package/docs/components/usa-wave-text.md +1 -1
  367. package/docs/components/usa-weather-card.md +1 -1
  368. package/docs/components/usa-worker-canvas.md +1 -1
  369. package/docs/components/usa-xp-bar.md +1 -1
  370. package/docs/components.md +49 -49
  371. package/docs/deprecations.md +2 -0
  372. package/docs/entry-points.md +1 -2
  373. package/docs/runtime/core.md +2 -2
  374. package/docs/runtime/drag-snap.md +3 -3
  375. package/docs/runtime/format-apng.md +3 -3
  376. package/docs/runtime/format-css.md +3 -3
  377. package/docs/runtime/format-gif.md +3 -3
  378. package/docs/runtime/format-gltf.md +3 -3
  379. package/docs/runtime/format-motion.md +3 -3
  380. package/docs/runtime/format-obj.md +3 -3
  381. package/docs/runtime/format-scene.md +3 -3
  382. package/docs/runtime/format-sprite.md +3 -3
  383. package/docs/runtime/format-svg.md +3 -3
  384. package/docs/runtime/format-webp.md +3 -3
  385. package/docs/runtime/gl.md +3 -3
  386. package/docs/runtime/gltf-anim.md +3 -3
  387. package/docs/runtime/gltf-decoders.md +3 -3
  388. package/docs/runtime/lottie-state.md +3 -3
  389. package/docs/runtime/physics.md +3 -3
  390. package/docs/runtime/scroll.md +3 -3
  391. package/docs/runtime/smooth.md +3 -3
  392. package/docs/runtime/text.md +3 -3
  393. package/docs/runtime/vector.md +3 -3
  394. package/docs/upgrading-11.md +2 -2
  395. package/package.json +1 -11
  396. package/dist/chunks/three-scene-BFZnZuqp.cjs.map +0 -1
  397. package/dist/chunks/three-scene-DibsZUID.js.map +0 -1
  398. package/dist/chunks/worker-canvas-Bkwd1euX.js.map +0 -1
  399. package/dist/chunks/worker-canvas-Ckc3R2Ye.cjs.map +0 -1
  400. package/dist/widgets/three-scene.cjs +0 -11
  401. package/dist/widgets/three-scene.cjs.map +0 -1
  402. package/dist/widgets/three-scene.d.cts +0 -2
  403. package/dist/widgets/three-scene.d.ts +0 -2
  404. package/dist/widgets/three-scene.js +0 -5
  405. package/dist/widgets/three-scene.js.map +0 -1
  406. package/docs/components/usa-three-scene.md +0 -20
@@ -137,7 +137,8 @@ declare class Timeline extends Playable {
137
137
  * - keyframes: bezier easing per dimension, hold keyframes, v4 (`e`) and v5+
138
138
  * (`s` only) files;
139
139
  * - **dotLottie** (`.lottie`): zip (stored + deflate via the native
140
- * `DecompressionStream`), `manifest.json` v1 / v2, several animations,
140
+ * `DecompressionStream`; 11.0: entry-count / size / ratio limits enforced
141
+ * while inflating — `ZipLimits`, `ZIP_LIMITS`), `manifest.json` v1 / v2, several animations,
141
142
  * embedded images.
142
143
  *
143
144
  * 10.8: **text layers** (system / web fonts by family + style, justification,
@@ -252,9 +253,29 @@ interface ZipEntry {
252
253
  name: string;
253
254
  method: Num;
254
255
  data: Uint8Array;
256
+ size: Num;
255
257
  }
258
+ /**
259
+ * 11.0: limits for reading untrusted zip / `.lottie` archives (zip-bomb protection). Enforced while inflating —
260
+ * declared sizes are never trusted; inflating stops as soon as a limit is crossed.
261
+ */
262
+ interface ZipLimits {
263
+ /** Max entries in the archive (default 1000). */
264
+ maxEntries?: Num;
265
+ /** Max uncompressed bytes of one entry (default 32 MB). */
266
+ maxEntryBytes?: Num;
267
+ /** Max uncompressed bytes of the whole archive (default 64 MB). */
268
+ maxTotalBytes?: Num;
269
+ /** Max uncompressed / compressed ratio of an entry once it is past 1 MB (default 100). */
270
+ maxRatio?: Num;
271
+ }
272
+ declare const ZIP_LIMITS: Readonly<Required<ZipLimits>>;
256
273
  /** Read a zip archive's entries (central directory; stored + deflate). Pure; inflating uses `DecompressionStream`. */
257
- declare function unzipEntries(input: ArrayBuffer | Uint8Array): ZipEntry[];
274
+ declare function unzipEntries(input: ArrayBuffer | Uint8Array, limits?: ZipLimits): ZipEntry[];
275
+ /** Inflate one entry, counting the real output against `limits`; `used` is shared across one archive. */
276
+ declare function inflateEntry(e: ZipEntry, limits?: ZipLimits, used?: {
277
+ total: number;
278
+ }): Promise<Uint8Array>;
258
279
  interface DotLottie {
259
280
  manifest: any;
260
281
  animations: Record<string, LottieAnimation>;
@@ -263,8 +284,10 @@ interface DotLottie {
263
284
  themes: Record<string, unknown>;
264
285
  stateMachines: Record<string, unknown>;
265
286
  }
266
- /** Unpack a `.lottie` (dotLottie v1 or v2). */
267
- declare function parseDotLottie(input: ArrayBuffer | Uint8Array): Promise<DotLottie>;
287
+ /** Unpack a `.lottie` (dotLottie v1 or v2). 11.0: `limits` (zip-bomb protection, safe defaults in `ZIP_LIMITS`). */
288
+ declare function parseDotLottie(input: ArrayBuffer | Uint8Array, o?: {
289
+ limits?: ZipLimits;
290
+ }): Promise<DotLottie>;
268
291
  /** Decode the images an animation references (embedded data URIs, dotLottie images, or URLs relative to `base`). */
269
292
  declare function loadLottieImages(anim: LottieAnimation, o?: {
270
293
  files?: Record<string, Uint8Array>;
@@ -274,6 +297,7 @@ declare function loadLottieImages(anim: LottieAnimation, o?: {
274
297
  declare function loadLottie(src: string | ArrayBuffer | Uint8Array, o?: {
275
298
  animation?: string;
276
299
  base?: string;
300
+ limits?: ZipLimits;
277
301
  }): Promise<{
278
302
  animation: LottieAnimation;
279
303
  images: Record<string, CanvasImageSource>;
@@ -318,5 +342,5 @@ interface VectorApi {
318
342
  /** The module object for `use(vector)`. */
319
343
  declare const vector: RuntimeModule<VectorApi>;
320
344
 
321
- export { evalExpression, inspectLottie, loadLottie, loadLottieImages, lottiePlayer, parseDotLottie, propValue, renderLottieFrame, transformAt, trimContours, unzipEntries, vector };
322
- export type { DotLottie, LottieAnimation, LottieLayer, LottiePlayer, LottiePlayerOptions, LottieProp, LottieReport, RenderOptions, VectorApi, ZipEntry };
345
+ export { ZIP_LIMITS, evalExpression, inflateEntry, inspectLottie, loadLottie, loadLottieImages, lottiePlayer, parseDotLottie, propValue, renderLottieFrame, transformAt, trimContours, unzipEntries, vector };
346
+ export type { DotLottie, LottieAnimation, LottieLayer, LottiePlayer, LottiePlayerOptions, LottieProp, LottieReport, RenderOptions, VectorApi, ZipEntry, ZipLimits };
@@ -137,7 +137,8 @@ declare class Timeline extends Playable {
137
137
  * - keyframes: bezier easing per dimension, hold keyframes, v4 (`e`) and v5+
138
138
  * (`s` only) files;
139
139
  * - **dotLottie** (`.lottie`): zip (stored + deflate via the native
140
- * `DecompressionStream`), `manifest.json` v1 / v2, several animations,
140
+ * `DecompressionStream`; 11.0: entry-count / size / ratio limits enforced
141
+ * while inflating — `ZipLimits`, `ZIP_LIMITS`), `manifest.json` v1 / v2, several animations,
141
142
  * embedded images.
142
143
  *
143
144
  * 10.8: **text layers** (system / web fonts by family + style, justification,
@@ -252,9 +253,29 @@ interface ZipEntry {
252
253
  name: string;
253
254
  method: Num;
254
255
  data: Uint8Array;
256
+ size: Num;
255
257
  }
258
+ /**
259
+ * 11.0: limits for reading untrusted zip / `.lottie` archives (zip-bomb protection). Enforced while inflating —
260
+ * declared sizes are never trusted; inflating stops as soon as a limit is crossed.
261
+ */
262
+ interface ZipLimits {
263
+ /** Max entries in the archive (default 1000). */
264
+ maxEntries?: Num;
265
+ /** Max uncompressed bytes of one entry (default 32 MB). */
266
+ maxEntryBytes?: Num;
267
+ /** Max uncompressed bytes of the whole archive (default 64 MB). */
268
+ maxTotalBytes?: Num;
269
+ /** Max uncompressed / compressed ratio of an entry once it is past 1 MB (default 100). */
270
+ maxRatio?: Num;
271
+ }
272
+ declare const ZIP_LIMITS: Readonly<Required<ZipLimits>>;
256
273
  /** Read a zip archive's entries (central directory; stored + deflate). Pure; inflating uses `DecompressionStream`. */
257
- declare function unzipEntries(input: ArrayBuffer | Uint8Array): ZipEntry[];
274
+ declare function unzipEntries(input: ArrayBuffer | Uint8Array, limits?: ZipLimits): ZipEntry[];
275
+ /** Inflate one entry, counting the real output against `limits`; `used` is shared across one archive. */
276
+ declare function inflateEntry(e: ZipEntry, limits?: ZipLimits, used?: {
277
+ total: number;
278
+ }): Promise<Uint8Array>;
258
279
  interface DotLottie {
259
280
  manifest: any;
260
281
  animations: Record<string, LottieAnimation>;
@@ -263,8 +284,10 @@ interface DotLottie {
263
284
  themes: Record<string, unknown>;
264
285
  stateMachines: Record<string, unknown>;
265
286
  }
266
- /** Unpack a `.lottie` (dotLottie v1 or v2). */
267
- declare function parseDotLottie(input: ArrayBuffer | Uint8Array): Promise<DotLottie>;
287
+ /** Unpack a `.lottie` (dotLottie v1 or v2). 11.0: `limits` (zip-bomb protection, safe defaults in `ZIP_LIMITS`). */
288
+ declare function parseDotLottie(input: ArrayBuffer | Uint8Array, o?: {
289
+ limits?: ZipLimits;
290
+ }): Promise<DotLottie>;
268
291
  /** Decode the images an animation references (embedded data URIs, dotLottie images, or URLs relative to `base`). */
269
292
  declare function loadLottieImages(anim: LottieAnimation, o?: {
270
293
  files?: Record<string, Uint8Array>;
@@ -274,6 +297,7 @@ declare function loadLottieImages(anim: LottieAnimation, o?: {
274
297
  declare function loadLottie(src: string | ArrayBuffer | Uint8Array, o?: {
275
298
  animation?: string;
276
299
  base?: string;
300
+ limits?: ZipLimits;
277
301
  }): Promise<{
278
302
  animation: LottieAnimation;
279
303
  images: Record<string, CanvasImageSource>;
@@ -318,5 +342,5 @@ interface VectorApi {
318
342
  /** The module object for `use(vector)`. */
319
343
  declare const vector: RuntimeModule<VectorApi>;
320
344
 
321
- export { evalExpression, inspectLottie, loadLottie, loadLottieImages, lottiePlayer, parseDotLottie, propValue, renderLottieFrame, transformAt, trimContours, unzipEntries, vector };
322
- export type { DotLottie, LottieAnimation, LottieLayer, LottiePlayer, LottiePlayerOptions, LottieProp, LottieReport, RenderOptions, VectorApi, ZipEntry };
345
+ export { ZIP_LIMITS, evalExpression, inflateEntry, inspectLottie, loadLottie, loadLottieImages, lottiePlayer, parseDotLottie, propValue, renderLottieFrame, transformAt, trimContours, unzipEntries, vector };
346
+ export type { DotLottie, LottieAnimation, LottieLayer, LottiePlayer, LottiePlayerOptions, LottieProp, LottieReport, RenderOptions, VectorApi, ZipEntry, ZipLimits };
@@ -1,2 +1,2 @@
1
- !function(t,e,n){"use strict";const r=new Set(["time","value","thisComp","thisLayer","thisProperty","Math","wiggle","loopOut","loopIn","loopOutDuration","loopInDuration","linear","ease","easeIn","easeOut","clamp","valueAtTime","framesToTime","timeToFrames","degreesToRadians","radiansToDegrees","add","sub","mul","div","length","true","false","$bm_rt","index"]);function s(t){const e=function(t){const e=[],n=/\s*(?:(\/\/[^\n]*|\/\*[\s\S]*?\*\/)|(\d+\.?\d*(?:e[+-]?\d+)?|\.\d+)|("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')|([A-Za-z_$][\w$]*)|(===|!==|==|!=|<=|>=|&&|\|\||[-+*/%()[\],.;=<>!?:{}]))/gy;let r,s=0;for(;s<t.length&&(n.lastIndex=s,r=n.exec(t));){if(s=n.lastIndex,r[1])continue;const t=r[2]||r[3]||r[4]||r[5];t&&e.push(r[2]?"#"+t:r[3]?'"'+r[3].slice(1,-1):t)}if(t.slice(s).trim())throw new Error("expr: unexpected "+t.slice(s,s+10));return e}(t);let n=0;const s=()=>e[n],o=()=>e[n++],a=t=>{if(e[n]!==t)throw new Error(`expr: expected ${t} got ${e[n]}`);n++},i=new Set,c=()=>{let t=(()=>{const t=o();if(void 0===t)throw new Error("expr: unexpected end");if("#"===t[0])return["n",+t.slice(1)];if('"'===t[0])return["s",t.slice(1)];if("("===t){const t=y();return a(")"),t}if("["===t){const t=[];for(;"]"!==s();)t.push(y()),","===s()&&o();return a("]"),["arr",t]}if(/^[A-Za-z_$]/.test(t)){if(!r.has(t)&&!i.has(t))throw new Error("expr: unsupported "+t);return["id",t]}throw new Error("expr: unexpected "+t)})();for(;;)if("."===s())o(),t=["get",t,["s",o()]];else if("["===s())o(),t=["get",t,y()],a("]");else{if("("!==s())return t;{o();const e=[];for(;")"!==s();)e.push(y()),","===s()&&o();a(")"),t=["call",t,e]}}},l=()=>"-"===s()||"+"===s()||"!"===s()?["un",o(),l()]:c(),f=(t,e)=>()=>{let n=e();for(;t.includes(s());)n=["bin",o(),n,e()];return n},h=f(["*","/","%"],l),u=f(["+","-"],h),p=f(["<",">","<=",">="],u),m=f(["==","!=","===","!=="],p),d=f(["&&"],m),g=f(["||"],d),y=()=>{const t=g();if("?"!==s())return t;o();const e=y();return a(":"),["if",t,e,y()]},w=[];for(;n<e.length;)if(";"!==s())if(["var","let","const"].includes(s())){o();const t=o();i.add(t),a("="),w.push(["set",t,y()])}else if(/^[A-Za-z_$]/.test(s()||"")&&"="===e[n+1]){const t=o();o(),i.add(t),w.push(["set",t,y()])}else w.push(y());else o();if(!w.length)throw new Error("expr: empty");return["prog",w]}const o=Array.isArray,a=(t,e,n)=>o(t)&&o(e)?Array.from({length:Math.max(t.length,e.length)},(r,s)=>n(t[s]??0,e[s]??0)):o(t)?t.map(t=>n(t,e)):o(e)?e.map(e=>n(t,e)):n(t,e),i=(t,e)=>"string"==typeof t||"string"==typeof e?String(t)+String(e):a(t,e,(t,e)=>t+e),c=(t,e)=>a(t,e,(t,e)=>t-e),l=(t,e)=>a(t,e,(t,e)=>t*e),f=(t,e)=>a(t,e,(t,e)=>t/e),h=t=>{const e=43758.5453*Math.sin(127.1*t+311.7);return 2*(e-Math.floor(e))-1},u=t=>{const e=Math.floor(t),n=t-e,r=n*n*(3-2*n);return h(e)*(1-r)+h(e+1)*r};function p(t,e){const[n,r,s,o,a]=e;let f,h,u=0,p=1;e.length>=5?(u=r,p=s,f=o,h=a):(f=r,h=s);const m=p===u?n>=p?1:0:Math.min(1,Math.max(0,(n-u)/(p-u)));return((t,e,n)=>i(t,l(c(e,t),n)))(f,h,t(p<u?1-m:m))}function m(t,e,n="cycle",r=0,s=0){const o=t.keys,a=t.time*t.fr;if(o.length<2)return t.value;const f=o[0],h=o[o.length-1];let u=e&&r>0?o[Math.max(0,o.length-1-r)]:f,p=e?h:r>0?o[Math.min(o.length-1,r)]:h;if(s>0&&(e?u=h-s*t.fr:p=f+s*t.fr),e?a<=p:a>=u)return t.value;const m=p-u||1;if("continue"===n){const n=e?p:u,r=t.at(n),s=e?c(r,t.at(n-1)):c(t.at(n+1),r);return i(r,l(s,a-n))}const d=e?a-p:u-a,g=Math.floor(d/m),y=d-g*m;if("pingpong"===n)return t.at(e?g%2?u+y:p-y:g%2?p-y:u+y);const w=t.at(e?u+y:p-y);return"offset"===n?i(w,l(c(t.at(p),t.at(u)),e?g+1:-(g+1))):w}function d(t,e){const n={},r=e.fr,s={Math:Math,thisComp:{frameDuration:1/r},thisLayer:{},thisProperty:{value:e.value},index:1,true:!0,false:!1,wiggle:(t,n,r=1,s=.5,a=e.time)=>{const i=n=>{let o=0,i=1,c=t,l=0;for(let t=0;t<Math.max(1,r);t++)o+=i*u(a*c+13.7*e.seed+101.3*n),l+=i,i*=s,c*=2;return o/l};return o(e.value)?e.value.map((t,e)=>t+(o(n)?n[e]??0:n)*i(e)):e.value+n*i(0)},loopOut:(t,n)=>m(e,!0,t,n),loopIn:(t,n)=>m(e,!1,t,n),loopOutDuration:(t,n)=>m(e,!0,t,0,n),loopInDuration:(t,n)=>m(e,!1,t,0,n),linear:(...t)=>p(t=>t,t),ease:(...t)=>p(t=>t*t*(3-2*t),t),easeIn:(...t)=>p(t=>t*t,t),easeOut:(...t)=>p(t=>1-(1-t)*(1-t),t),clamp:(t,e,n)=>a(a(t,e,Math.max),n,Math.min),valueAtTime:t=>e.at(t*r),framesToTime:t=>t/r,timeToFrames:(t=e.time)=>t*r,degreesToRadians:t=>t*Math.PI/180,radiansToDegrees:t=>180*t/Math.PI,add:i,sub:c,mul:l,div:f,length:(t,e)=>{const n=void 0===e?t:c(t,e);return o(n)?Math.hypot(...n):Math.abs(n)}},h=t=>{switch(t[0]){case"n":case"s":return t[1];case"arr":return t[1].map(h);case"id":{const r=t[1];return r in n?n[r]:"time"===r?e.time:"value"===r?e.value:s[r]}case"get":{const e=h(t[1]),n=h(t[2]);if(null==e||"string"==typeof n&&/^(__proto__|constructor|prototype)$/.test(n))throw new Error("expr: bad member");if(e===Math&&"string"==typeof n&&!(n in Math))throw new Error("expr: Math."+n);return e[n]}case"call":{const e=h(t[1]);if("function"!=typeof e)throw new Error("expr: not a function");return e(...t[2].map(h))}case"un":{const e=h(t[2]);return"-"===t[1]?l(e,-1):"!"===t[1]?!e:e}case"bin":{const e=h(t[2]),n=h(t[3]);switch(t[1]){case"+":return i(e,n);case"-":return c(e,n);case"*":return l(e,n);case"/":return f(e,n);case"%":return a(e,n,(t,e)=>t%e);case"<":return e<n;case">":return e>n;case"<=":return e<=n;case">=":return e>=n;case"==":case"===":return e===n;case"!=":case"!==":return e!==n;case"&&":return e&&n;default:return e||n}}case"if":return h(t[1])?h(t[2]):h(t[3]);case"set":return n[t[1]]=h(t[2]);default:{let e;for(const n of t[1])e=h(n);return"$bm_rt"in n?n.$bm_rt:e}}};return h(t)}const g=new Map;function y(t){if(!g.has(t)){let e=null;try{e=s(t)}catch{e=null}g.set(t,e)}return g.get(t)}function w(t,e,n,r,s){if(s<=0)return 0;if(s>=1)return 1;let o=s;for(let e=0;e<8;e++){const e=3*t*o*(1-o)**2+3*n*o*o*(1-o)+o**3-s,r=3*t*(1-o)**2+6*(n-t)*o*(1-o)+3*(1-n)*o*o;if(Math.abs(e)<1e-5)break;if(Math.abs(r)<1e-6)break;o-=e/r}return o=Math.min(1,Math.max(0,o)),3*e*o*(1-o)**2+3*r*o*o*(1-o)+o**3}const v=(t,e,n)=>Array.isArray(t)?t[Math.min(e,t.length-1)]??n:t??n,b=(t,e,n)=>"number"==typeof t?t+(e-t)*(Array.isArray(n)?n[0]:n):Array.isArray(t)?t.map((t,r)=>"number"==typeof t?t+((e?.[r]??t)-t)*(Array.isArray(n)?v(n,r,0):n):b(t,e?.[r],n)):t&&"object"==typeof t&&t.v?{c:t.c,v:b(t.v,e.v,n),i:b(t.i,e.i,n),o:b(t.o,e.o,n)}:t;let x=30;const M=t=>Array.from(t).reduce((t,e)=>(31*t+e.charCodeAt(0))%9973,7),k=t=>!!(t.a||Array.isArray(t.k)&&t.k.length&&"object"==typeof t.k[0]&&"t"in t.k[0]);function A(t,e,n){const r="string"==typeof t.x?y(t.x):null;if(!r)return n;try{const s=d(r,{time:e/x,value:n,fr:x,at:e=>S(t,e),keys:k(t)?t.k.map(t=>t.t):[],seed:M(t.x)});return void 0===s||"number"==typeof s&&!isFinite(s)?n:s}catch{return n}}function T(t,e,n){return t?A(t,e,S(t,e)):n}function S(t,e){if(!(t.a||Array.isArray(t.k)&&t.k.length&&"object"==typeof t.k[0]&&"t"in t.k[0]))return t.k;const n=t.k;if(e<=n[0].t)return $(n[0].s);for(let t=0;t<n.length-1;t++){const r=n[t],s=n[t+1];if(e>=s.t)continue;const o=$(r.s),a=$(void 0!==r.e?r.e:s.s);if(1===r.h||void 0===a)return o;const i=(e-r.t)/(s.t-r.t||1),c=Array.isArray(o)?o.length:1,l=Array.from({length:c},(t,e)=>w(v(r.o?.x,e,0),v(r.o?.y,e,0),v(r.i?.x,e,1),v(r.i?.y,e,1),i));if(r.to&&r.ti&&Array.isArray(o)&&(r.to.some(Boolean)||r.ti.some(Boolean))){const t=l[0],e=1-t;return o.map((n,s)=>e*e*e*n+3*e*e*t*(n+(r.to[s]||0))+3*e*t*t*(a[s]+(r.ti[s]||0))+t*t*t*a[s])}return b(o,a,c>1?l:l[0])}const r=n[n.length-1];return $(void 0!==r.s?r.s:n[n.length-2]?.e)}const $=t=>Array.isArray(t)&&1===t.length&&"object"==typeof t[0]?t[0]:t,E=[1,0,0,1,0,0],O=(t,e)=>[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]],I=(t,e,n)=>[t[0]*e+t[2]*n+t[4],t[1]*e+t[3]*n+t[5]],j=Math.PI/180;function L(t,e){if(!t)return{m:E,o:1};const n=T(t.a,e,[0,0])||[0,0];let r;r=t.p?.s?[T(t.p.x,e,0),T(t.p.y,e,0)]:T(t.p,e,[0,0])||[0,0];const s=T(t.s,e,[100,100])||[100,100],o=T(t.r??t.rz,e,0)||0,a=T(t.sk,e,0)||0,i=T(t.sa,e,0)||0;let c=[1,0,0,1,r[0],r[1]];if(o&&(c=O(c,[Math.cos(o*j),Math.sin(o*j),-Math.sin(o*j),Math.cos(o*j),0,0])),a){const t=Math.cos(i*j),e=Math.sin(i*j),n=Math.tan(-a*j);c=O(c,O([t,-e,e,t,0,0],O([1,0,n,1,0,0],[t,e,-e,t,0,0])))}c=O(c,[s[0]/100,0,0,(s[1]??s[0])/100,0,0]),c=O(c,[1,0,0,1,-n[0],-(n[1]||0)]);return{m:c,o:(T(t.o,e,100)??100)/100}}const P=.5519150244935105;function D(t,e){switch(t.ty){case"sh":{const n=T(t.ks,e);if(!n?.v?.length)return[];const r=[n.v[0][0],n.v[0][1]],s=n.v.length;for(let t=1;t<s+(n.c?1:0);t++){const e=n.v[(t-1)%s],o=n.v[t%s],a=n.o[(t-1)%s]||[0,0],i=n.i[t%s]||[0,0];r.push(e[0]+a[0],e[1]+a[1],o[0]+i[0],o[1]+i[1],o[0],o[1])}return[{pts:r,closed:!!n.c}]}case"rc":{const[n,r]=T(t.p,e,[0,0]),[s,o]=T(t.s,e,[0,0]),a=Math.min(T(t.r,e,0)||0,s/2,o/2),i=n-s/2,c=r-o/2;if(!a)return[{pts:[i+s,c,i+s,c,i+s,c+o,i+s,c+o,i+s,c+o,i,c+o,i,c+o,i,c+o,i,c,i,c,i,c,i+s,c],closed:!0}];const l=a*P;return[{pts:[i+s-a,c,i+s-a+l,c,i+s,c+a-l,i+s,c+a,i+s,c+a,i+s,c+o-a,i+s,c+o-a,i+s,c+o-a+l,i+s-a+l,c+o,i+s-a,c+o,i+s-a,c+o,i+a,c+o,i+a,c+o,i+a-l,c+o,i,c+o-a+l,i,c+o-a,i,c+o-a,i,c+a,i,c+a,i,c+a-l,i+a-l,c,i+a,c,i+a,c,i+s-a,c],closed:!0}]}case"el":{const[n,r]=T(t.p,e,[0,0]),[s,o]=T(t.s,e,[0,0]),a=s/2,i=o/2,c=a*P,l=i*P;return[{pts:[n,r-i,n+c,r-i,n+a,r-l,n+a,r,n+a,r+l,n+c,r+i,n,r+i,n-c,r+i,n-a,r+l,n-a,r,n-a,r-l,n-c,r-i,n,r-i],closed:!0}]}case"sr":{const[n,r]=T(t.p,e,[0,0]),s=Math.round(T(t.pt,e,5)),o=(T(t.r,e,0)||0)*j,a=T(t.or,e,50),i=1===t.sy?T(t.ir,e,25):a,c=1===t.sy?2*s:s,l=[];for(let e=0;e<=c;e++){const s=o-Math.PI/2+2*e*Math.PI/c,f=1===t.sy&&e%2?i:a,h=n+Math.cos(s)*f,u=r+Math.sin(s)*f;e?l.push(l[l.length-2],l[l.length-1],h,u,h,u):l.push(h,u)}return[{pts:l,closed:!0}]}}return[]}const U=(t,e)=>{const n=t.pts.slice();for(let t=0;t<n.length;t+=2)[n[t],n[t+1]]=I(e,n[t],n[t+1]);return{pts:n,closed:t.closed}};function C(t){const e=[t.pts[0],t.pts[1]];for(let n=2;n<t.pts.length;n+=6){const r=t.pts[n-2],s=t.pts[n-1],[o,a,i,c,l,f]=t.pts.slice(n,n+6),h=o===r&&a===s&&i===l&&c===f?1:16;for(let t=1;t<=h;t++){const n=t/h,u=1-n;e.push(u*u*u*r+3*u*u*n*o+3*u*n*n*i+n*n*n*l,u*u*u*s+3*u*u*n*a+3*u*n*n*c+n*n*n*f)}}return e}const R=t=>{let e=0;for(let n=2;n<t.length;n+=2)e+=Math.hypot(t[n]-t[n-2],t[n+1]-t[n-1]);return e};function z(t,e,n){const r=[];let s=0;for(let o=2;o<t.length;o+=2){const a=t[o-2],i=t[o-1],c=t[o],l=t[o+1],f=Math.hypot(c-a,l-i),h=Math.max(e,s),u=Math.min(n,s+f);if(u>h&&f){const t=(h-s)/f,e=(u-s)/f,n=a+(c-a)*t,o=i+(l-i)*t,p=a+(c-a)*e,m=i+(l-i)*e;r.length||r.push(n,o),r.push(n,o,p,m,p,m)}s+=f}return r.length?[{pts:r,closed:!1}]:[]}function F(t,e,n,r,s){let o=e/100,a=n/100;o>a&&([o,a]=[a,o]);const i=(r%360+360)%360/360;if(a-o>=1)return t;if(a-o<=0)return[];const c=t.map(C),l=c.map(R);if(2===s){const t=l.reduce((t,e)=>t+e,0),e=[];let n=0;return c.forEach((r,s)=>{const c=(o+i)%1*t,f=c+(a-o)*t;for(const s of[0,1])e.push(...z(r,c-n+s*-t,f-n+s*-t));n+=l[s]}),e}return c.flatMap((t,e)=>((t,e,n,r)=>{n+=i,r+=i;const s=[];for(const o of[-1,0,1])s.push(...z(t,(n+o)*e,(r+o)*e));return s})(t,l[e],o,a))}function _(t){const e=new Path2D;for(const n of t){e.moveTo(n.pts[0],n.pts[1]);for(let t=2;t<n.pts.length;t+=6)e.bezierCurveTo(n.pts[t],n.pts[t+1],n.pts[t+2],n.pts[t+3],n.pts[t+4],n.pts[t+5]);n.closed&&e.closePath()}return e}const N=(t,e=1)=>{if(!t)return"transparent";const n=t.some(t=>t>1),r=t.map(t=>Math.round(255*Math.min(1,Math.max(0,n?t/255:t))));return`rgba(${r[0]},${r[1]},${r[2]},${Math.max(0,Math.min(1,(t[3]??1)*e))})`};function J(t,e,n,r,s){const o=t.find(t=>"tr"===t.ty),{m:a,o:i}=L(o,e),c=O(n,a),l=r*i,f=[],h=[];for(const n of t)if(!n.hd)if("gr"===n.ty){const t=[];f.push(...J(n.it||[],e,c,l,t)),h.push(...t)}else if("sh"===n.ty||"rc"===n.ty||"el"===n.ty||"sr"===n.ty)f.push({c:D(n,e).map(t=>U(t,c))});else if("tm"===n.ty){const t=T(n.s,e,0),r=T(n.e,e,100),s=T(n.o,e,0);if(2===n.m){const e=F(f.flatMap(t=>t.c),t,r,s,2);f.forEach((t,n)=>t.c=n?[]:e)}else f.forEach(e=>e.c=F(e.c,t,r,s,1))}else"fl"===n.ty||"gf"===n.ty?h.push({kind:"fill",it:n,shapes:f.slice(),m:c,o:l}):"st"!==n.ty&&"gs"!==n.ty||h.push({kind:"stroke",it:n,shapes:f.slice(),m:c,o:l});return s.push(...h.reverse()),f}function B(t,e,n){const r=e.it,s=e.shapes.flatMap(t=>t.c);if(!s.length)return;const o=T(r.o,n,100)/100*e.o;let a;if("gf"===r.ty||"gs"===r.ty){const s=I(e.m,...T(r.s,n,[0,0])),o=I(e.m,...T(r.e,n,[0,0])),i=2===r.t?t.createRadialGradient(s[0],s[1],0,s[0],s[1],Math.hypot(o[0]-s[0],o[1]-s[1])):t.createLinearGradient(s[0],s[1],o[0],o[1]),c=r.g?.p||0,l=T(r.g?.k,n,[])||[],f=l.length>=4*c+2?l.slice(4*c):null;for(let t=0;t<c;t++){let e=1;if(f){let n=1,r=1/0;for(let e=0;e+1<f.length;e+=2){const s=Math.abs(f[e]-l[4*t]);s<r&&([r,n]=[s,f[e+1]])}e=n}i.addColorStop(Math.min(1,Math.max(0,l[4*t])),N([l[4*t+1],l[4*t+2],l[4*t+3],e]))}a=i}else a=N(T(r.c,n,[0,0,0]));t.save(),t.globalAlpha*=Math.max(0,Math.min(1,o));const i=_(s);if("fill"===e.kind)t.fillStyle=a,t.fill(i,2===r.r?"evenodd":"nonzero");else{const s=Math.sqrt(Math.abs(e.m[0]*e.m[3]-e.m[1]*e.m[2]))||1;if(t.strokeStyle=a,t.lineWidth=T(r.w,n,1)*s,t.lineCap=["butt","round","square"][(r.lc||2)-1]||"round",t.lineJoin=["miter","round","bevel"][(r.lj||2)-1]||"round",t.miterLimit=r.ml||4,r.d?.length){const e=r.d.filter(t=>"d"===t.n||"g"===t.n).map(t=>T(t.v,n,0)*s),o=r.d.find(t=>"o"===t.n);e.length&&e.some(t=>t>0)&&t.setLineDash(e.length%2?[...e,...e]:e),o&&(t.lineDashOffset=-T(o.v,n,0)*s)}t.stroke(i)}t.restore()}const W=(t,e)=>{const n=globalThis,r="function"==typeof n.OffscreenCanvas?new n.OffscreenCanvas(t,e):Object.assign(document.createElement("canvas"),{width:t,height:e});return{c:r,x:r.getContext("2d")}},q=(t,e)=>(e-(t.st||0))/(t.sr||1);function V(t,e,n,r=0){const s=L(t.ks,q(t,n)).m;if(void 0===t.parent||r>50)return s;const o=e.find(e=>e.ind===t.parent);return o?O(V(o,e,n,r+1),s):s}function Z(t,e,n,r,s,o){const a=(t.masksProperties||[]).filter(t=>"n"!==t.mode);if(!a.length)return;const{c:i,x:c}=W(s,o);c.setTransform(r.getTransform()),a.forEach((t,r)=>{const a=T(t.pt,e);if(!a?.v)return;const i=_(D({ty:"sh",ks:{k:a}},e).map(t=>U(t,n))),l=(T(t.o,e,100)??100)/100;c.save(),c.fillStyle=`rgba(0,0,0,${l})`;const f=t.mode;if(t.inv){const t=new Path2D;t.rect(-1e5,-1e5,2e5,2e5),t.addPath(i),c.globalCompositeOperation="s"===f?"destination-out":"i"===f?"destination-in":"source-over",c.fill(t,"evenodd")}else c.globalCompositeOperation="s"===f?"destination-out":"i"===f&&r?"destination-in":"source-over","s"!==f||r||(c.save(),c.setTransform(1,0,0,1,0,0),c.globalCompositeOperation="source-over",c.fillRect(0,0,s,o),c.restore(),c.globalCompositeOperation="destination-out"),c.fill(i);c.restore()}),r.save(),r.setTransform(1,0,0,1,0,0),r.globalCompositeOperation="destination-in",r.drawImage(i,0,0),r.restore()}function G(t,e,n,r,s,o,a,i,c=0){if(!(c>16))for(let l=n.length-1;l>=0;l--){const f=n[l];if(f.td||f.hd||3===f.ty||r<f.ip||r>=f.op)continue;const h=f.tt?n[l-1]:void 0,u=!!(h||f.masksProperties&&f.masksProperties.length)?W(a,i):null,p=u?u.x:t;p.save(),p.setTransform(t.getTransform());const m=O(o,V(f,n,r)),d=q(f,r);if(p.globalAlpha*=L(f.ks,d).o,4===f.ty){const t=[];J(f.shapes||[],d,m,1,t);for(const e of t)B(p,e,d)}else if(5===f.ty)H(p,e,f,d,m);else if(1===f.ty)p.transform(m[0],m[1],m[2],m[3],m[4],m[5]),p.fillStyle=f.sc||"#000",p.fillRect(0,0,f.sw||0,f.sh||0);else if(2===f.ty){const t=s.images?.[f.refId||""];t&&(p.transform(m[0],m[1],m[2],m[3],m[4],m[5]),p.drawImage(t,0,0))}else if(0===f.ty){const t=e.assets?.find(t=>t.id===f.refId);if(t?.layers){let n=d;f.tm&&(n=T(f.tm,r,0)*e.fr),p.save(),p.transform(m[0],m[1],m[2],m[3],m[4],m[5]),f.w&&f.h&&(p.beginPath(),p.rect(0,0,f.w,f.h),p.clip()),G(p,e,t.layers,n,s,E,a,i,c+1),p.restore()}}if(f.masksProperties?.length&&Z(f,d,m,p,a,i),p.restore(),u){if(h){const n=W(a,i);n.x.setTransform(t.getTransform());const l={...h,td:0};G(n.x,e,[l],r,s,o,a,i,c+1),u.x.save(),u.x.setTransform(1,0,0,1,0,0),u.x.globalCompositeOperation=2===f.tt||4===f.tt?"destination-out":"destination-in",u.x.drawImage(n.c,0,0),u.x.restore()}t.save(),t.setTransform(1,0,0,1,0,0),t.drawImage(u.c,0,0),t.restore()}}}function H(t,e,n,r,s){const o=function(t,e){const n=t.t?.d;let r=n?.k?.[0]?.s;for(const t of n?.k||[])t.t<=e&&(r=t.s);return r&&"string"==typeof n.x&&(r={...r,t:String(A({k:r.t,x:n.x},e,r.t))}),r}(n,r);if(!o)return;t.transform(s[0],s[1],s[2],s[3],s[4],s[5]);const a=e.fonts?.list?.find(t=>t.fName===o.f),i=(a?.fStyle||o.f||"").toLowerCase(),c=/black|heavy/.test(i)?900:/extra ?bold/.test(i)?800:/semi ?bold|demi/.test(i)?600:/bold/.test(i)?700:/medium/.test(i)?500:/light/.test(i)?300:/thin/.test(i)?100:400;t.font=`${/italic|oblique/.test(i)?"italic ":""}${c} ${o.s}px ${a?.fFamily?`"${a.fFamily}", `:""}sans-serif`,t.textAlign=1===o.j?"right":2===o.j?"center":"left",t.textBaseline="alphabetic","letterSpacing"in t&&(t.letterSpacing=(o.tr||0)*o.s/1e3+"px");const l=o.lh||1.2*o.s;let f=String(o.t??"").split(/\r\n|\r|\n|\u0003/),h=0,u=0;if(o.sz){const e=o.sz[0],[n,r]=o.ps||[0,0];f=f.flatMap(n=>{const r=[];let s="";for(const o of n.split(" ")){const n=s?s+" "+o:o;s&&t.measureText(n).width>e?(r.push(s),s=o):s=n}return r.concat(s)}),h=n+(1===o.j?e:2===o.j?e/2:0),u=r+o.s}const p=o.fc?N(o.fc):null,m=o.sc&&o.sw?N(o.sc):null;f.forEach((e,n)=>{const r=u+n*l,s=()=>p&&(t.fillStyle=p,t.fillText(e,h,r)),a=()=>m&&(t.strokeStyle=m,t.lineWidth=o.sw,t.lineJoin="round",t.strokeText(e,h,r));o.of?(s(),a()):(a(),s())})}function K(t,e,n,r={}){const s=r.width??t.canvas.width,o=r.height??t.canvas.height;x=e.fr||30,t.save(),t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,s,o),r.background&&(t.fillStyle=r.background,t.fillRect(0,0,s,o));const a=s/e.w,i=o/e.h,c="cover"===r.fit?Math.max(a,i):Math.min(a,i);"fill"===r.fit?t.setTransform(a,0,0,i,0,0):t.setTransform(c,0,0,c,(s-e.w*c)/2,(o-e.h*c)/2),t.beginPath(),t.rect(0,0,e.w,e.h),t.clip(),G(t,e,e.layers,n,r,E,s,o),t.restore()}function Q(t){const e=new Set,n=t=>t?.forEach(t=>{"gr"===t.ty&&n(t.it),"mm"===t.ty&&e.add("merge paths"),"rp"===t.ty&&e.add("repeaters"),"rd"===t.ty&&e.add("round corners"),"pb"===t.ty&&e.add("pucker / bloat"),"tw"===t.ty&&e.add("twist")}),r=t=>t.forEach(t=>{t.ddd&&e.add("3D layers"),t.ef?.length&&e.add("effects"),5===t.ty&&t.t?.a?.length&&e.add("text animators (range selectors)"),3!==t.tt&&4!==t.tt||e.add("luma mattes (approximated by alpha)"),JSON.stringify([t.ks,t.t,t.shapes],(t,n)=>("x"!==t||"string"!=typeof n||y(n)||e.add("expressions outside the supported subset"),n)),n(t.shapes||[])});return r(t.layers),t.assets?.forEach(t=>t.layers&&r(t.layers)),t.chars?.length&&e.add("glyph outlines (chars): drawn with system fonts"),{layers:t.layers.length,unsupported:[...e]}}function X(t){const e=t instanceof Uint8Array?t:new Uint8Array(t),n=new DataView(e.buffer,e.byteOffset,e.byteLength);let r=e.length-22;for(;r>=0&&101010256!==n.getUint32(r,!0);)r--;if(r<0)throw new Error("[motionary] vector: not a zip / .lottie file");const s=n.getUint16(r+10,!0);let o=n.getUint32(r+16,!0);const a=[];for(let t=0;t<s&&33639248===n.getUint32(o,!0);t++){const t=n.getUint16(o+10,!0),r=n.getUint32(o+20,!0),s=n.getUint16(o+28,!0),i=n.getUint16(o+30,!0),c=n.getUint16(o+32,!0),l=n.getUint32(o+42,!0),f=(new TextDecoder).decode(e.subarray(o+46,o+46+s)),h=l+30+n.getUint16(l+26,!0)+n.getUint16(l+28,!0);a.push({name:f,method:t,data:e.subarray(h,h+r)}),o+=46+s+i+c}return a}async function Y(t){const e=X(t),n={};await Promise.all(e.filter(t=>!t.name.endsWith("/")).map(async t=>n[t.name.replace(/^\.?\//,"")]=await async function(t){if(0===t.method)return t.data;if(8!==t.method)throw new Error(`[motionary] vector: zip method ${t.method} unsupported (${t.name})`);const e=globalThis.DecompressionStream;if(!e)throw new Error("[motionary] vector: DecompressionStream is missing — cannot inflate .lottie entries here");const n=new Response(t.data).body.pipeThrough(new e("deflate-raw"));return new Uint8Array(await new Response(n).arrayBuffer())}(t)));const r=new TextDecoder,s=n["manifest.json"]?(o="manifest.json",JSON.parse(r.decode(n[o]))):{animations:[]};var o;const a={},i={},c={},l={};for(const[t,e]of Object.entries(n)){const n=/^(animations|a)\/(.+)\.json$/.exec(t);n?a[n[2]]=JSON.parse(r.decode(e)):/^(images|i)\//.test(t)?i[t.replace(/^(images|i)\//,"")]=e:/^(themes|t)\/(.+)\.json$/.test(t)?c[t.replace(/^(themes|t)\/|\.json$/g,"")]=JSON.parse(r.decode(e)):/^(states|s)\/(.+)\.json$/.test(t)&&(l[t.replace(/^(states|s)\/|\.json$/g,"")]=JSON.parse(r.decode(e)))}return{manifest:s,animations:a,images:i,themes:c,stateMachines:l}}async function tt(t,e={}){const n={};return await Promise.all((t.assets||[]).filter(t=>t.p&&!t.layers).map(async t=>{let r=null;if(t.p.startsWith("data:"))r=await(await fetch(t.p)).blob();else{const n=Object.keys(e.files||{}).find(e=>e.endsWith("/"+t.p)||e===t.p);n?r=new Blob([e.files[n]],{type:/\.jpe?g$/i.test(n)?"image/jpeg":/\.webp$/i.test(n)?"image/webp":"image/png"}):e.base&&(r=await(await fetch(new URL((t.u||"")+t.p,e.base).href)).blob())}r&&(n[t.id]=await createImageBitmap(r))})),n}async function et(t,e={}){let n;const r=e.base||("string"==typeof t&&"undefined"!=typeof location?new URL(t,location.href).href:void 0);if("string"==typeof t){const e=await fetch(t);if(!e.ok)throw new Error(`[motionary] vector: could not load ${t} (${e.status})`);n=new Uint8Array(await e.arrayBuffer())}else n=t instanceof Uint8Array?t:new Uint8Array(t);if(80===n[0]&&75===n[1]){const t=await Y(n),r=Object.keys(t.animations),s=e.animation||t.manifest.activeAnimationId||t.manifest.animations?.[0]?.id||r[0],o=t.animations[s]||t.animations[r[0]];if(!o)throw new Error("[motionary] vector: the .lottie file has no animations");const a={};for(const[e,n]of Object.entries(t.images))a[e]=n;return{animation:o,images:await tt(o,{files:a}),dotLottie:t}}const s=JSON.parse((new TextDecoder).decode(n));return{animation:s,images:await tt(s,{base:r}),dotLottie:null}}class nt extends n.Playable{constructor(t,e,n){super({repeat:!0===n.loop||void 0===n.loop?-1:"number"==typeof n.loop?n.loop:0,yoyo:!!n.bounce}),this.canvas=t,this.animation=e,this.o=n,this.frame=0,this.markers={},this.timeScale=n.speed||1;const r=t.getContext("2d");if(!r)throw new Error("[motionary] vector: no 2D canvas context");this.ctx=r;for(const t of e.markers||[])this.markers[t.cm]=[t.tm,t.tm+t.dr];this.seg=[e.ip,e.op],this.setSegment(n.segment||null),this.goToFrame(this.seg[0]),!1!==n.autoplay&&this.play()}get totalFrames(){return this.seg[1]-this.seg[0]}get duration(){return this.totalFrames/this.animation.fr*1e3}setSegment(t){this.seg=t?"string"==typeof t?this.markers[t]||[this.animation.ip,this.animation.op]:t:[this.animation.ip,this.animation.op]}goToFrame(t){this.frame=t,K(this.ctx,this.animation,t,this.o)}renderLocal(t){const e=Math.min(this.seg[0]+t/1e3*this.animation.fr,this.seg[1]-.001);Math.abs(e-this.frame)<.01||this.goToFrame(e)}}function rt(t,e,n={}){return new nt(t,e,n)}function st(t,e,n=0,r=30){const s=y(t);try{return s?d(s,{time:n,value:e,fr:r,at:()=>e,keys:[],seed:M(t)}):void 0}catch{return}}const ot={id:"vector",version:e.RUNTIME_VERSION,requires:["core"],api:{evalExpression:st,loadLottie:et,parseDotLottie:Y,unzipEntries:X,lottiePlayer:rt,renderLottieFrame:K,inspectLottie:Q,propValue:T,transformAt:L,trimContours:F,loadLottieImages:tt}};e.register(ot),t.evalExpression=st,t.inspectLottie=Q,t.loadLottie=et,t.loadLottieImages=tt,t.lottiePlayer=rt,t.parseDotLottie=Y,t.propValue=T,t.renderLottieFrame=K,t.transformAt=L,t.trimContours=F,t.unzipEntries=X,t.vector=ot}(this.MotionaryRuntime=this.MotionaryRuntime||{},MotionaryRuntime,MotionaryRuntime);
1
+ !function(t,e,n){"use strict";const r=new Set(["time","value","thisComp","thisLayer","thisProperty","Math","wiggle","loopOut","loopIn","loopOutDuration","loopInDuration","linear","ease","easeIn","easeOut","clamp","valueAtTime","framesToTime","timeToFrames","degreesToRadians","radiansToDegrees","add","sub","mul","div","length","true","false","$bm_rt","index"]);function s(t){const e=function(t){const e=[],n=/\s*(?:(\/\/[^\n]*|\/\*[\s\S]*?\*\/)|(\d+\.?\d*(?:e[+-]?\d+)?|\.\d+)|("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')|([A-Za-z_$][\w$]*)|(===|!==|==|!=|<=|>=|&&|\|\||[-+*/%()[\],.;=<>!?:{}]))/gy;let r,s=0;for(;s<t.length&&(n.lastIndex=s,r=n.exec(t));){if(s=n.lastIndex,r[1])continue;const t=r[2]||r[3]||r[4]||r[5];t&&e.push(r[2]?"#"+t:r[3]?'"'+r[3].slice(1,-1):t)}if(t.slice(s).trim())throw new Error("expr: unexpected "+t.slice(s,s+10));return e}(t);let n=0;const s=()=>e[n],o=()=>e[n++],a=t=>{if(e[n]!==t)throw new Error(`expr: expected ${t} got ${e[n]}`);n++},i=new Set,c=()=>{let t=(()=>{const t=o();if(void 0===t)throw new Error("expr: unexpected end");if("#"===t[0])return["n",+t.slice(1)];if('"'===t[0])return["s",t.slice(1)];if("("===t){const t=y();return a(")"),t}if("["===t){const t=[];for(;"]"!==s();)t.push(y()),","===s()&&o();return a("]"),["arr",t]}if(/^[A-Za-z_$]/.test(t)){if(!r.has(t)&&!i.has(t))throw new Error("expr: unsupported "+t);return["id",t]}throw new Error("expr: unexpected "+t)})();for(;;)if("."===s())o(),t=["get",t,["s",o()]];else if("["===s())o(),t=["get",t,y()],a("]");else{if("("!==s())return t;{o();const e=[];for(;")"!==s();)e.push(y()),","===s()&&o();a(")"),t=["call",t,e]}}},l=()=>"-"===s()||"+"===s()||"!"===s()?["un",o(),l()]:c(),f=(t,e)=>()=>{let n=e();for(;t.includes(s());)n=["bin",o(),n,e()];return n},h=f(["*","/","%"],l),u=f(["+","-"],h),m=f(["<",">","<=",">="],u),p=f(["==","!=","===","!=="],m),d=f(["&&"],p),g=f(["||"],d),y=()=>{const t=g();if("?"!==s())return t;o();const e=y();return a(":"),["if",t,e,y()]},w=[];for(;n<e.length;)if(";"!==s())if(["var","let","const"].includes(s())){o();const t=o();i.add(t),a("="),w.push(["set",t,y()])}else if(/^[A-Za-z_$]/.test(s()||"")&&"="===e[n+1]){const t=o();o(),i.add(t),w.push(["set",t,y()])}else w.push(y());else o();if(!w.length)throw new Error("expr: empty");return["prog",w]}const o=Array.isArray,a=(t,e,n)=>o(t)&&o(e)?Array.from({length:Math.max(t.length,e.length)},(r,s)=>n(t[s]??0,e[s]??0)):o(t)?t.map(t=>n(t,e)):o(e)?e.map(e=>n(t,e)):n(t,e),i=(t,e)=>"string"==typeof t||"string"==typeof e?String(t)+String(e):a(t,e,(t,e)=>t+e),c=(t,e)=>a(t,e,(t,e)=>t-e),l=(t,e)=>a(t,e,(t,e)=>t*e),f=(t,e)=>a(t,e,(t,e)=>t/e),h=t=>{const e=43758.5453*Math.sin(127.1*t+311.7);return 2*(e-Math.floor(e))-1},u=t=>{const e=Math.floor(t),n=t-e,r=n*n*(3-2*n);return h(e)*(1-r)+h(e+1)*r};function m(t,e){const[n,r,s,o,a]=e;let f,h,u=0,m=1;e.length>=5?(u=r,m=s,f=o,h=a):(f=r,h=s);const p=m===u?n>=m?1:0:Math.min(1,Math.max(0,(n-u)/(m-u)));return((t,e,n)=>i(t,l(c(e,t),n)))(f,h,t(m<u?1-p:p))}function p(t,e,n="cycle",r=0,s=0){const o=t.keys,a=t.time*t.fr;if(o.length<2)return t.value;const f=o[0],h=o[o.length-1];let u=e&&r>0?o[Math.max(0,o.length-1-r)]:f,m=e?h:r>0?o[Math.min(o.length-1,r)]:h;if(s>0&&(e?u=h-s*t.fr:m=f+s*t.fr),e?a<=m:a>=u)return t.value;const p=m-u||1;if("continue"===n){const n=e?m:u,r=t.at(n),s=e?c(r,t.at(n-1)):c(t.at(n+1),r);return i(r,l(s,a-n))}const d=e?a-m:u-a,g=Math.floor(d/p),y=d-g*p;if("pingpong"===n)return t.at(e?g%2?u+y:m-y:g%2?m-y:u+y);const w=t.at(e?u+y:m-y);return"offset"===n?i(w,l(c(t.at(m),t.at(u)),e?g+1:-(g+1))):w}function d(t,e){const n={},r=e.fr,s={Math:Math,thisComp:{frameDuration:1/r},thisLayer:{},thisProperty:{value:e.value},index:1,true:!0,false:!1,wiggle:(t,n,r=1,s=.5,a=e.time)=>{const i=n=>{let o=0,i=1,c=t,l=0;for(let t=0;t<Math.max(1,r);t++)o+=i*u(a*c+13.7*e.seed+101.3*n),l+=i,i*=s,c*=2;return o/l};return o(e.value)?e.value.map((t,e)=>t+(o(n)?n[e]??0:n)*i(e)):e.value+n*i(0)},loopOut:(t,n)=>p(e,!0,t,n),loopIn:(t,n)=>p(e,!1,t,n),loopOutDuration:(t,n)=>p(e,!0,t,0,n),loopInDuration:(t,n)=>p(e,!1,t,0,n),linear:(...t)=>m(t=>t,t),ease:(...t)=>m(t=>t*t*(3-2*t),t),easeIn:(...t)=>m(t=>t*t,t),easeOut:(...t)=>m(t=>1-(1-t)*(1-t),t),clamp:(t,e,n)=>a(a(t,e,Math.max),n,Math.min),valueAtTime:t=>e.at(t*r),framesToTime:t=>t/r,timeToFrames:(t=e.time)=>t*r,degreesToRadians:t=>t*Math.PI/180,radiansToDegrees:t=>180*t/Math.PI,add:i,sub:c,mul:l,div:f,length:(t,e)=>{const n=void 0===e?t:c(t,e);return o(n)?Math.hypot(...n):Math.abs(n)}},h=t=>{switch(t[0]){case"n":case"s":return t[1];case"arr":return t[1].map(h);case"id":{const r=t[1];return r in n?n[r]:"time"===r?e.time:"value"===r?e.value:s[r]}case"get":{const e=h(t[1]),n=h(t[2]);if(null==e||"string"==typeof n&&/^(__proto__|constructor|prototype)$/.test(n))throw new Error("expr: bad member");if(e===Math&&"string"==typeof n&&!(n in Math))throw new Error("expr: Math."+n);return e[n]}case"call":{const e=h(t[1]);if("function"!=typeof e)throw new Error("expr: not a function");return e(...t[2].map(h))}case"un":{const e=h(t[2]);return"-"===t[1]?l(e,-1):"!"===t[1]?!e:e}case"bin":{const e=h(t[2]),n=h(t[3]);switch(t[1]){case"+":return i(e,n);case"-":return c(e,n);case"*":return l(e,n);case"/":return f(e,n);case"%":return a(e,n,(t,e)=>t%e);case"<":return e<n;case">":return e>n;case"<=":return e<=n;case">=":return e>=n;case"==":case"===":return e===n;case"!=":case"!==":return e!==n;case"&&":return e&&n;default:return e||n}}case"if":return h(t[1])?h(t[2]):h(t[3]);case"set":return n[t[1]]=h(t[2]);default:{let e;for(const n of t[1])e=h(n);return"$bm_rt"in n?n.$bm_rt:e}}};return h(t)}const g=new Map;function y(t){if(!g.has(t)){let e=null;try{e=s(t)}catch{e=null}g.set(t,e)}return g.get(t)}function w(t,e,n,r,s){if(s<=0)return 0;if(s>=1)return 1;let o=s;for(let e=0;e<8;e++){const e=3*t*o*(1-o)**2+3*n*o*o*(1-o)+o**3-s,r=3*t*(1-o)**2+6*(n-t)*o*(1-o)+3*(1-n)*o*o;if(Math.abs(e)<1e-5)break;if(Math.abs(r)<1e-6)break;o-=e/r}return o=Math.min(1,Math.max(0,o)),3*e*o*(1-o)**2+3*r*o*o*(1-o)+o**3}const x=(t,e,n)=>Array.isArray(t)?t[Math.min(e,t.length-1)]??n:t??n,v=(t,e,n)=>"number"==typeof t?t+(e-t)*(Array.isArray(n)?n[0]:n):Array.isArray(t)?t.map((t,r)=>"number"==typeof t?t+((e?.[r]??t)-t)*(Array.isArray(n)?x(n,r,0):n):v(t,e?.[r],n)):t&&"object"==typeof t&&t.v?{c:t.c,v:v(t.v,e.v,n),i:v(t.i,e.i,n),o:v(t.o,e.o,n)}:t;let b=30;const M=t=>Array.from(t).reduce((t,e)=>(31*t+e.charCodeAt(0))%9973,7),k=t=>!!(t.a||Array.isArray(t.k)&&t.k.length&&"object"==typeof t.k[0]&&"t"in t.k[0]);function T(t,e,n){const r="string"==typeof t.x?y(t.x):null;if(!r)return n;try{const s=d(r,{time:e/b,value:n,fr:b,at:e=>$(t,e),keys:k(t)?t.k.map(t=>t.t):[],seed:M(t.x)});return void 0===s||"number"==typeof s&&!isFinite(s)?n:s}catch{return n}}function E(t,e,n){return t?T(t,e,$(t,e)):n}function $(t,e){if(!(t.a||Array.isArray(t.k)&&t.k.length&&"object"==typeof t.k[0]&&"t"in t.k[0]))return t.k;const n=t.k;if(e<=n[0].t)return A(n[0].s);for(let t=0;t<n.length-1;t++){const r=n[t],s=n[t+1];if(e>=s.t)continue;const o=A(r.s),a=A(void 0!==r.e?r.e:s.s);if(1===r.h||void 0===a)return o;const i=(e-r.t)/(s.t-r.t||1),c=Array.isArray(o)?o.length:1,l=Array.from({length:c},(t,e)=>w(x(r.o?.x,e,0),x(r.o?.y,e,0),x(r.i?.x,e,1),x(r.i?.y,e,1),i));if(r.to&&r.ti&&Array.isArray(o)&&(r.to.some(Boolean)||r.ti.some(Boolean))){const t=l[0],e=1-t;return o.map((n,s)=>e*e*e*n+3*e*e*t*(n+(r.to[s]||0))+3*e*t*t*(a[s]+(r.ti[s]||0))+t*t*t*a[s])}return v(o,a,c>1?l:l[0])}const r=n[n.length-1];return A(void 0!==r.s?r.s:n[n.length-2]?.e)}const A=t=>Array.isArray(t)&&1===t.length&&"object"==typeof t[0]?t[0]:t,S=[1,0,0,1,0,0],I=(t,e)=>[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]],O=(t,e,n)=>[t[0]*e+t[2]*n+t[4],t[1]*e+t[3]*n+t[5]],L=Math.PI/180;function j(t,e){if(!t)return{m:S,o:1};const n=E(t.a,e,[0,0])||[0,0];let r;r=t.p?.s?[E(t.p.x,e,0),E(t.p.y,e,0)]:E(t.p,e,[0,0])||[0,0];const s=E(t.s,e,[100,100])||[100,100],o=E(t.r??t.rz,e,0)||0,a=E(t.sk,e,0)||0,i=E(t.sa,e,0)||0;let c=[1,0,0,1,r[0],r[1]];if(o&&(c=I(c,[Math.cos(o*L),Math.sin(o*L),-Math.sin(o*L),Math.cos(o*L),0,0])),a){const t=Math.cos(i*L),e=Math.sin(i*L),n=Math.tan(-a*L);c=I(c,I([t,-e,e,t,0,0],I([1,0,n,1,0,0],[t,e,-e,t,0,0])))}c=I(c,[s[0]/100,0,0,(s[1]??s[0])/100,0,0]),c=I(c,[1,0,0,1,-n[0],-(n[1]||0)]);return{m:c,o:(E(t.o,e,100)??100)/100}}const P=.5519150244935105;function U(t,e){switch(t.ty){case"sh":{const n=E(t.ks,e);if(!n?.v?.length)return[];const r=[n.v[0][0],n.v[0][1]],s=n.v.length;for(let t=1;t<s+(n.c?1:0);t++){const e=n.v[(t-1)%s],o=n.v[t%s],a=n.o[(t-1)%s]||[0,0],i=n.i[t%s]||[0,0];r.push(e[0]+a[0],e[1]+a[1],o[0]+i[0],o[1]+i[1],o[0],o[1])}return[{pts:r,closed:!!n.c}]}case"rc":{const[n,r]=E(t.p,e,[0,0]),[s,o]=E(t.s,e,[0,0]),a=Math.min(E(t.r,e,0)||0,s/2,o/2),i=n-s/2,c=r-o/2;if(!a)return[{pts:[i+s,c,i+s,c,i+s,c+o,i+s,c+o,i+s,c+o,i,c+o,i,c+o,i,c+o,i,c,i,c,i,c,i+s,c],closed:!0}];const l=a*P;return[{pts:[i+s-a,c,i+s-a+l,c,i+s,c+a-l,i+s,c+a,i+s,c+a,i+s,c+o-a,i+s,c+o-a,i+s,c+o-a+l,i+s-a+l,c+o,i+s-a,c+o,i+s-a,c+o,i+a,c+o,i+a,c+o,i+a-l,c+o,i,c+o-a+l,i,c+o-a,i,c+o-a,i,c+a,i,c+a,i,c+a-l,i+a-l,c,i+a,c,i+a,c,i+s-a,c],closed:!0}]}case"el":{const[n,r]=E(t.p,e,[0,0]),[s,o]=E(t.s,e,[0,0]),a=s/2,i=o/2,c=a*P,l=i*P;return[{pts:[n,r-i,n+c,r-i,n+a,r-l,n+a,r,n+a,r+l,n+c,r+i,n,r+i,n-c,r+i,n-a,r+l,n-a,r,n-a,r-l,n-c,r-i,n,r-i],closed:!0}]}case"sr":{const[n,r]=E(t.p,e,[0,0]),s=Math.round(E(t.pt,e,5)),o=(E(t.r,e,0)||0)*L,a=E(t.or,e,50),i=1===t.sy?E(t.ir,e,25):a,c=1===t.sy?2*s:s,l=[];for(let e=0;e<=c;e++){const s=o-Math.PI/2+2*e*Math.PI/c,f=1===t.sy&&e%2?i:a,h=n+Math.cos(s)*f,u=r+Math.sin(s)*f;e?l.push(l[l.length-2],l[l.length-1],h,u,h,u):l.push(h,u)}return[{pts:l,closed:!0}]}}return[]}const D=(t,e)=>{const n=t.pts.slice();for(let t=0;t<n.length;t+=2)[n[t],n[t+1]]=O(e,n[t],n[t+1]);return{pts:n,closed:t.closed}};function R(t){const e=[t.pts[0],t.pts[1]];for(let n=2;n<t.pts.length;n+=6){const r=t.pts[n-2],s=t.pts[n-1],[o,a,i,c,l,f]=t.pts.slice(n,n+6),h=o===r&&a===s&&i===l&&c===f?1:16;for(let t=1;t<=h;t++){const n=t/h,u=1-n;e.push(u*u*u*r+3*u*u*n*o+3*u*n*n*i+n*n*n*l,u*u*u*s+3*u*u*n*a+3*u*n*n*c+n*n*n*f)}}return e}const C=t=>{let e=0;for(let n=2;n<t.length;n+=2)e+=Math.hypot(t[n]-t[n-2],t[n+1]-t[n-1]);return e};function B(t,e,n){const r=[];let s=0;for(let o=2;o<t.length;o+=2){const a=t[o-2],i=t[o-1],c=t[o],l=t[o+1],f=Math.hypot(c-a,l-i),h=Math.max(e,s),u=Math.min(n,s+f);if(u>h&&f){const t=(h-s)/f,e=(u-s)/f,n=a+(c-a)*t,o=i+(l-i)*t,m=a+(c-a)*e,p=i+(l-i)*e;r.length||r.push(n,o),r.push(n,o,m,p,m,p)}s+=f}return r.length?[{pts:r,closed:!1}]:[]}function z(t,e,n,r,s){let o=e/100,a=n/100;o>a&&([o,a]=[a,o]);const i=(r%360+360)%360/360;if(a-o>=1)return t;if(a-o<=0)return[];const c=t.map(R),l=c.map(C);if(2===s){const t=l.reduce((t,e)=>t+e,0),e=[];let n=0;return c.forEach((r,s)=>{const c=(o+i)%1*t,f=c+(a-o)*t;for(const s of[0,1])e.push(...B(r,c-n+s*-t,f-n+s*-t));n+=l[s]}),e}return c.flatMap((t,e)=>((t,e,n,r)=>{n+=i,r+=i;const s=[];for(const o of[-1,0,1])s.push(...B(t,(n+o)*e,(r+o)*e));return s})(t,l[e],o,a))}function F(t){const e=new Path2D;for(const n of t){e.moveTo(n.pts[0],n.pts[1]);for(let t=2;t<n.pts.length;t+=6)e.bezierCurveTo(n.pts[t],n.pts[t+1],n.pts[t+2],n.pts[t+3],n.pts[t+4],n.pts[t+5]);n.closed&&e.closePath()}return e}const _=(t,e=1)=>{if(!t)return"transparent";const n=t.some(t=>t>1),r=t.map(t=>Math.round(255*Math.min(1,Math.max(0,n?t/255:t))));return`rgba(${r[0]},${r[1]},${r[2]},${Math.max(0,Math.min(1,(t[3]??1)*e))})`};function N(t,e,n,r,s){const o=t.find(t=>"tr"===t.ty),{m:a,o:i}=j(o,e),c=I(n,a),l=r*i,f=[],h=[];for(const n of t)if(!n.hd)if("gr"===n.ty){const t=[];f.push(...N(n.it||[],e,c,l,t)),h.push(...t)}else if("sh"===n.ty||"rc"===n.ty||"el"===n.ty||"sr"===n.ty)f.push({c:U(n,e).map(t=>D(t,c))});else if("tm"===n.ty){const t=E(n.s,e,0),r=E(n.e,e,100),s=E(n.o,e,0);if(2===n.m){const e=z(f.flatMap(t=>t.c),t,r,s,2);f.forEach((t,n)=>t.c=n?[]:e)}else f.forEach(e=>e.c=z(e.c,t,r,s,1))}else"fl"===n.ty||"gf"===n.ty?h.push({kind:"fill",it:n,shapes:f.slice(),m:c,o:l}):"st"!==n.ty&&"gs"!==n.ty||h.push({kind:"stroke",it:n,shapes:f.slice(),m:c,o:l});return s.push(...h.reverse()),f}function J(t,e,n){const r=e.it,s=e.shapes.flatMap(t=>t.c);if(!s.length)return;const o=E(r.o,n,100)/100*e.o;let a;if("gf"===r.ty||"gs"===r.ty){const s=O(e.m,...E(r.s,n,[0,0])),o=O(e.m,...E(r.e,n,[0,0])),i=2===r.t?t.createRadialGradient(s[0],s[1],0,s[0],s[1],Math.hypot(o[0]-s[0],o[1]-s[1])):t.createLinearGradient(s[0],s[1],o[0],o[1]),c=r.g?.p||0,l=E(r.g?.k,n,[])||[],f=l.length>=4*c+2?l.slice(4*c):null;for(let t=0;t<c;t++){let e=1;if(f){let n=1,r=1/0;for(let e=0;e+1<f.length;e+=2){const s=Math.abs(f[e]-l[4*t]);s<r&&([r,n]=[s,f[e+1]])}e=n}i.addColorStop(Math.min(1,Math.max(0,l[4*t])),_([l[4*t+1],l[4*t+2],l[4*t+3],e]))}a=i}else a=_(E(r.c,n,[0,0,0]));t.save(),t.globalAlpha*=Math.max(0,Math.min(1,o));const i=F(s);if("fill"===e.kind)t.fillStyle=a,t.fill(i,2===r.r?"evenodd":"nonzero");else{const s=Math.sqrt(Math.abs(e.m[0]*e.m[3]-e.m[1]*e.m[2]))||1;if(t.strokeStyle=a,t.lineWidth=E(r.w,n,1)*s,t.lineCap=["butt","round","square"][(r.lc||2)-1]||"round",t.lineJoin=["miter","round","bevel"][(r.lj||2)-1]||"round",t.miterLimit=r.ml||4,r.d?.length){const e=r.d.filter(t=>"d"===t.n||"g"===t.n).map(t=>E(t.v,n,0)*s),o=r.d.find(t=>"o"===t.n);e.length&&e.some(t=>t>0)&&t.setLineDash(e.length%2?[...e,...e]:e),o&&(t.lineDashOffset=-E(o.v,n,0)*s)}t.stroke(i)}t.restore()}const W=(t,e)=>{const n=globalThis,r="function"==typeof n.OffscreenCanvas?new n.OffscreenCanvas(t,e):Object.assign(document.createElement("canvas"),{width:t,height:e});return{c:r,x:r.getContext("2d")}},Z=(t,e)=>(e-(t.st||0))/(t.sr||1);function q(t,e,n,r=0){const s=j(t.ks,Z(t,n)).m;if(void 0===t.parent||r>50)return s;const o=e.find(e=>e.ind===t.parent);return o?I(q(o,e,n,r+1),s):s}function V(t,e,n,r,s,o){const a=(t.masksProperties||[]).filter(t=>"n"!==t.mode);if(!a.length)return;const{c:i,x:c}=W(s,o);c.setTransform(r.getTransform()),a.forEach((t,r)=>{const a=E(t.pt,e);if(!a?.v)return;const i=F(U({ty:"sh",ks:{k:a}},e).map(t=>D(t,n))),l=(E(t.o,e,100)??100)/100;c.save(),c.fillStyle=`rgba(0,0,0,${l})`;const f=t.mode;if(t.inv){const t=new Path2D;t.rect(-1e5,-1e5,2e5,2e5),t.addPath(i),c.globalCompositeOperation="s"===f?"destination-out":"i"===f?"destination-in":"source-over",c.fill(t,"evenodd")}else c.globalCompositeOperation="s"===f?"destination-out":"i"===f&&r?"destination-in":"source-over","s"!==f||r||(c.save(),c.setTransform(1,0,0,1,0,0),c.globalCompositeOperation="source-over",c.fillRect(0,0,s,o),c.restore(),c.globalCompositeOperation="destination-out"),c.fill(i);c.restore()}),r.save(),r.setTransform(1,0,0,1,0,0),r.globalCompositeOperation="destination-in",r.drawImage(i,0,0),r.restore()}function G(t,e,n,r,s,o,a,i,c=0){if(!(c>16))for(let l=n.length-1;l>=0;l--){const f=n[l];if(f.td||f.hd||3===f.ty||r<f.ip||r>=f.op)continue;const h=f.tt?n[l-1]:void 0,u=!!(h||f.masksProperties&&f.masksProperties.length)?W(a,i):null,m=u?u.x:t;m.save(),m.setTransform(t.getTransform());const p=I(o,q(f,n,r)),d=Z(f,r);if(m.globalAlpha*=j(f.ks,d).o,4===f.ty){const t=[];N(f.shapes||[],d,p,1,t);for(const e of t)J(m,e,d)}else if(5===f.ty)H(m,e,f,d,p);else if(1===f.ty)m.transform(p[0],p[1],p[2],p[3],p[4],p[5]),m.fillStyle=f.sc||"#000",m.fillRect(0,0,f.sw||0,f.sh||0);else if(2===f.ty){const t=s.images?.[f.refId||""];t&&(m.transform(p[0],p[1],p[2],p[3],p[4],p[5]),m.drawImage(t,0,0))}else if(0===f.ty){const t=e.assets?.find(t=>t.id===f.refId);if(t?.layers){let n=d;f.tm&&(n=E(f.tm,r,0)*e.fr),m.save(),m.transform(p[0],p[1],p[2],p[3],p[4],p[5]),f.w&&f.h&&(m.beginPath(),m.rect(0,0,f.w,f.h),m.clip()),G(m,e,t.layers,n,s,S,a,i,c+1),m.restore()}}if(f.masksProperties?.length&&V(f,d,p,m,a,i),m.restore(),u){if(h){const n=W(a,i);n.x.setTransform(t.getTransform());const l={...h,td:0};G(n.x,e,[l],r,s,o,a,i,c+1),u.x.save(),u.x.setTransform(1,0,0,1,0,0),u.x.globalCompositeOperation=2===f.tt||4===f.tt?"destination-out":"destination-in",u.x.drawImage(n.c,0,0),u.x.restore()}t.save(),t.setTransform(1,0,0,1,0,0),t.drawImage(u.c,0,0),t.restore()}}}function H(t,e,n,r,s){const o=function(t,e){const n=t.t?.d;let r=n?.k?.[0]?.s;for(const t of n?.k||[])t.t<=e&&(r=t.s);return r&&"string"==typeof n.x&&(r={...r,t:String(T({k:r.t,x:n.x},e,r.t))}),r}(n,r);if(!o)return;t.transform(s[0],s[1],s[2],s[3],s[4],s[5]);const a=e.fonts?.list?.find(t=>t.fName===o.f),i=(a?.fStyle||o.f||"").toLowerCase(),c=/black|heavy/.test(i)?900:/extra ?bold/.test(i)?800:/semi ?bold|demi/.test(i)?600:/bold/.test(i)?700:/medium/.test(i)?500:/light/.test(i)?300:/thin/.test(i)?100:400;t.font=`${/italic|oblique/.test(i)?"italic ":""}${c} ${o.s}px ${a?.fFamily?`"${a.fFamily}", `:""}sans-serif`,t.textAlign=1===o.j?"right":2===o.j?"center":"left",t.textBaseline="alphabetic","letterSpacing"in t&&(t.letterSpacing=(o.tr||0)*o.s/1e3+"px");const l=o.lh||1.2*o.s;let f=String(o.t??"").split(/\r\n|\r|\n|\u0003/),h=0,u=0;if(o.sz){const e=o.sz[0],[n,r]=o.ps||[0,0];f=f.flatMap(n=>{const r=[];let s="";for(const o of n.split(" ")){const n=s?s+" "+o:o;s&&t.measureText(n).width>e?(r.push(s),s=o):s=n}return r.concat(s)}),h=n+(1===o.j?e:2===o.j?e/2:0),u=r+o.s}const m=o.fc?_(o.fc):null,p=o.sc&&o.sw?_(o.sc):null;f.forEach((e,n)=>{const r=u+n*l,s=()=>m&&(t.fillStyle=m,t.fillText(e,h,r)),a=()=>p&&(t.strokeStyle=p,t.lineWidth=o.sw,t.lineJoin="round",t.strokeText(e,h,r));o.of?(s(),a()):(a(),s())})}function K(t,e,n,r={}){const s=r.width??t.canvas.width,o=r.height??t.canvas.height;b=e.fr||30,t.save(),t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,s,o),r.background&&(t.fillStyle=r.background,t.fillRect(0,0,s,o));const a=s/e.w,i=o/e.h,c="cover"===r.fit?Math.max(a,i):Math.min(a,i);"fill"===r.fit?t.setTransform(a,0,0,i,0,0):t.setTransform(c,0,0,c,(s-e.w*c)/2,(o-e.h*c)/2),t.beginPath(),t.rect(0,0,e.w,e.h),t.clip(),G(t,e,e.layers,n,r,S,s,o),t.restore()}function Q(t){const e=new Set,n=t=>t?.forEach(t=>{"gr"===t.ty&&n(t.it),"mm"===t.ty&&e.add("merge paths"),"rp"===t.ty&&e.add("repeaters"),"rd"===t.ty&&e.add("round corners"),"pb"===t.ty&&e.add("pucker / bloat"),"tw"===t.ty&&e.add("twist")}),r=t=>t.forEach(t=>{t.ddd&&e.add("3D layers"),t.ef?.length&&e.add("effects"),5===t.ty&&t.t?.a?.length&&e.add("text animators (range selectors)"),3!==t.tt&&4!==t.tt||e.add("luma mattes (approximated by alpha)"),JSON.stringify([t.ks,t.t,t.shapes],(t,n)=>("x"!==t||"string"!=typeof n||y(n)||e.add("expressions outside the supported subset"),n)),n(t.shapes||[])});return r(t.layers),t.assets?.forEach(t=>t.layers&&r(t.layers)),t.chars?.length&&e.add("glyph outlines (chars): drawn with system fonts"),{layers:t.layers.length,unsupported:[...e]}}const X={maxEntries:1e3,maxEntryBytes:32<<20,maxTotalBytes:64<<20,maxRatio:100},Y=t=>new Error(`[motionary] vector: zip limit exceeded — ${t} (see ZipLimits)`);function tt(t,e={}){const n={...X,...e},r=t instanceof Uint8Array?t:new Uint8Array(t),s=new DataView(r.buffer,r.byteOffset,r.byteLength);let o=r.length-22;for(;o>=0&&101010256!==s.getUint32(o,!0);)o--;if(o<0)throw new Error("[motionary] vector: not a zip / .lottie file");const a=s.getUint16(o+10,!0);if(a>n.maxEntries)throw Y(`${a} entries > maxEntries ${n.maxEntries}`);let i=s.getUint32(o+16,!0);const c=[];for(let t=0;t<a&&i+46<=r.length&&33639248===s.getUint32(i,!0);t++){const t=s.getUint16(i+10,!0),e=s.getUint32(i+20,!0),o=s.getUint32(i+24,!0),a=s.getUint16(i+28,!0),l=s.getUint16(i+30,!0),f=s.getUint16(i+32,!0),h=s.getUint32(i+42,!0),u=(new TextDecoder).decode(r.subarray(i+46,i+46+a));if(o>n.maxEntryBytes)throw Y(`${u}: ${o} bytes > maxEntryBytes ${n.maxEntryBytes}`);if(h+30>r.length)throw new Error("[motionary] vector: corrupt zip ("+u+")");const m=h+30+s.getUint16(h+26,!0)+s.getUint16(h+28,!0);c.push({name:u,method:t,size:o,data:r.subarray(m,m+e)}),i+=46+a+l+f}return c}async function et(t,e={},n={total:0}){const r={...X,...e},s=e=>{if(e>r.maxEntryBytes)throw Y(`${t.name}: > maxEntryBytes ${r.maxEntryBytes}`);if(n.total+e>r.maxTotalBytes)throw Y(`archive > maxTotalBytes ${r.maxTotalBytes}`);if(e>1<<20&&e>Math.max(1,t.data.length)*r.maxRatio)throw Y(`${t.name}: compression ratio > maxRatio ${r.maxRatio}`)};if(0===t.method)return s(t.data.length),n.total+=t.data.length,t.data;if(8!==t.method)throw new Error(`[motionary] vector: zip method ${t.method} unsupported (${t.name})`);const o=globalThis.DecompressionStream;if(!o)throw new Error("[motionary] vector: DecompressionStream is missing — cannot inflate .lottie entries here");const a=new Response(t.data).body.pipeThrough(new o("deflate-raw")).getReader(),i=[];let c=0;for(;;){const{done:t,value:e}=await a.read();if(t)break;c+=e.length;try{s(c)}catch(t){throw a.cancel().catch(()=>{}),t}i.push(e)}n.total+=c;const l=new Uint8Array(c);let f=0;for(const t of i)l.set(t,(f+=t.length)-t.length);return l}async function nt(t,e={}){const n=tt(t,e.limits),r={},s={total:0};for(const t of n)t.name.endsWith("/")||(r[t.name.replace(/^\.?\//,"")]=await et(t,e.limits,s));const o=new TextDecoder,a=r["manifest.json"]?(i="manifest.json",JSON.parse(o.decode(r[i]))):{animations:[]};var i;const c={},l={},f={},h={};for(const[t,e]of Object.entries(r)){const n=/^(animations|a)\/(.+)\.json$/.exec(t);n?c[n[2]]=JSON.parse(o.decode(e)):/^(images|i)\//.test(t)?l[t.replace(/^(images|i)\//,"")]=e:/^(themes|t)\/(.+)\.json$/.test(t)?f[t.replace(/^(themes|t)\/|\.json$/g,"")]=JSON.parse(o.decode(e)):/^(states|s)\/(.+)\.json$/.test(t)&&(h[t.replace(/^(states|s)\/|\.json$/g,"")]=JSON.parse(o.decode(e)))}return{manifest:a,animations:c,images:l,themes:f,stateMachines:h}}async function rt(t,e={}){const n={};return await Promise.all((t.assets||[]).filter(t=>t.p&&!t.layers).map(async t=>{let r=null;if(t.p.startsWith("data:"))r=await(await fetch(t.p)).blob();else{const n=Object.keys(e.files||{}).find(e=>e.endsWith("/"+t.p)||e===t.p);n?r=new Blob([e.files[n]],{type:/\.jpe?g$/i.test(n)?"image/jpeg":/\.webp$/i.test(n)?"image/webp":"image/png"}):e.base&&(r=await(await fetch(new URL((t.u||"")+t.p,e.base).href)).blob())}r&&(n[t.id]=await createImageBitmap(r))})),n}async function st(t,e={}){let n;const r=e.base||("string"==typeof t&&"undefined"!=typeof location?new URL(t,location.href).href:void 0);if("string"==typeof t){const e=await fetch(t);if(!e.ok)throw new Error(`[motionary] vector: could not load ${t} (${e.status})`);n=new Uint8Array(await e.arrayBuffer())}else n=t instanceof Uint8Array?t:new Uint8Array(t);if(80===n[0]&&75===n[1]){const t=await nt(n,{limits:e.limits}),r=Object.keys(t.animations),s=e.animation||t.manifest.activeAnimationId||t.manifest.animations?.[0]?.id||r[0],o=t.animations[s]||t.animations[r[0]];if(!o)throw new Error("[motionary] vector: the .lottie file has no animations");const a={};for(const[e,n]of Object.entries(t.images))a[e]=n;return{animation:o,images:await rt(o,{files:a}),dotLottie:t}}const s=JSON.parse((new TextDecoder).decode(n));return{animation:s,images:await rt(s,{base:r}),dotLottie:null}}class ot extends n.Playable{constructor(t,e,n){super({repeat:!0===n.loop||void 0===n.loop?-1:"number"==typeof n.loop?n.loop:0,yoyo:!!n.bounce}),this.canvas=t,this.animation=e,this.o=n,this.frame=0,this.markers={},this.timeScale=n.speed||1;const r=t.getContext("2d");if(!r)throw new Error("[motionary] vector: no 2D canvas context");this.ctx=r;for(const t of e.markers||[])this.markers[t.cm]=[t.tm,t.tm+t.dr];this.seg=[e.ip,e.op],this.setSegment(n.segment||null),this.goToFrame(this.seg[0]),!1!==n.autoplay&&this.play()}get totalFrames(){return this.seg[1]-this.seg[0]}get duration(){return this.totalFrames/this.animation.fr*1e3}setSegment(t){this.seg=t?"string"==typeof t?this.markers[t]||[this.animation.ip,this.animation.op]:t:[this.animation.ip,this.animation.op]}goToFrame(t){this.frame=t,K(this.ctx,this.animation,t,this.o)}renderLocal(t){const e=Math.min(this.seg[0]+t/1e3*this.animation.fr,this.seg[1]-.001);Math.abs(e-this.frame)<.01||this.goToFrame(e)}}function at(t,e,n={}){return new ot(t,e,n)}function it(t,e,n=0,r=30){const s=y(t);try{return s?d(s,{time:n,value:e,fr:r,at:()=>e,keys:[],seed:M(t)}):void 0}catch{return}}const ct={id:"vector",version:e.RUNTIME_VERSION,requires:["core"],api:{evalExpression:it,loadLottie:st,parseDotLottie:nt,unzipEntries:tt,lottiePlayer:at,renderLottieFrame:K,inspectLottie:Q,propValue:E,transformAt:j,trimContours:z,loadLottieImages:rt}};e.register(ct),t.ZIP_LIMITS=X,t.evalExpression=it,t.inflateEntry=et,t.inspectLottie=Q,t.loadLottie=st,t.loadLottieImages=rt,t.lottiePlayer=at,t.parseDotLottie=nt,t.propValue=E,t.renderLottieFrame=K,t.transformAt=j,t.trimContours=z,t.unzipEntries=tt,t.vector=ct}(this.MotionaryRuntime=this.MotionaryRuntime||{},MotionaryRuntime,MotionaryRuntime);
2
2
  //# sourceMappingURL=vector.iife.js.map