@vunk/plus 1.13.1 → 1.14.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 (533) hide show
  1. package/ant/_util/BaseInput.d.ts +56 -0
  2. package/ant/_util/BaseInputInner.d.ts +65 -0
  3. package/ant/_util/BaseMixin.d.ts +7 -0
  4. package/ant/_util/EventInterface.d.ts +18 -0
  5. package/ant/_util/KeyCode.d.ts +436 -0
  6. package/ant/_util/Portal.d.ts +14 -0
  7. package/ant/_util/PortalWrapper.d.ts +41 -0
  8. package/ant/_util/canUseDom.d.ts +2 -0
  9. package/ant/_util/classNames.d.ts +2 -0
  10. package/ant/_util/collapseMotion.d.ts +3 -0
  11. package/ant/_util/colors.d.ts +13 -0
  12. package/ant/_util/copy-to-clipboard/index.d.ts +8 -0
  13. package/ant/_util/copy-to-clipboard/toggle-selection.d.ts +2 -0
  14. package/ant/_util/createContext.d.ts +5 -0
  15. package/ant/_util/createRef.d.ts +10 -0
  16. package/ant/_util/cssinjs/Cache.d.ts +11 -0
  17. package/ant/_util/cssinjs/Keyframes.d.ts +9 -0
  18. package/ant/_util/cssinjs/StyleContext.d.ts +508 -0
  19. package/ant/_util/cssinjs/hooks/useCacheToken.d.ts +40 -0
  20. package/ant/_util/cssinjs/hooks/useGlobalCache.d.ts +3 -0
  21. package/ant/_util/cssinjs/hooks/useHMR.d.ts +3 -0
  22. package/ant/_util/cssinjs/hooks/useStyleRegister/cacheMapUtil.d.ts +14 -0
  23. package/ant/_util/cssinjs/hooks/useStyleRegister/index.d.ts +68 -0
  24. package/ant/_util/cssinjs/index.d.ts +195 -0
  25. package/ant/_util/cssinjs/linters/contentQuotesLinter.d.ts +3 -0
  26. package/ant/_util/cssinjs/linters/hashedAnimationLinter.d.ts +3 -0
  27. package/ant/_util/cssinjs/linters/index.d.ts +6 -0
  28. package/ant/_util/cssinjs/linters/interface.d.ts +8 -0
  29. package/ant/_util/cssinjs/linters/legacyNotSelectorLinter.d.ts +3 -0
  30. package/ant/_util/cssinjs/linters/logicalPropertiesLinter.d.ts +3 -0
  31. package/ant/_util/cssinjs/linters/parentSelectorLinter.d.ts +3 -0
  32. package/ant/_util/cssinjs/linters/utils.d.ts +2 -0
  33. package/ant/_util/cssinjs/theme/Theme.d.ts +11 -0
  34. package/ant/_util/cssinjs/theme/ThemeCache.d.ts +20 -0
  35. package/ant/_util/cssinjs/theme/createTheme.d.ts +6 -0
  36. package/ant/_util/cssinjs/theme/index.d.ts +4 -0
  37. package/ant/_util/cssinjs/theme/interface.d.ts +2 -0
  38. package/ant/_util/cssinjs/transformers/interface.d.ts +4 -0
  39. package/ant/_util/cssinjs/transformers/legacyLogicalProperties.d.ts +12 -0
  40. package/ant/_util/cssinjs/transformers/px2rem.d.ts +20 -0
  41. package/ant/_util/cssinjs/util.d.ts +8 -0
  42. package/ant/_util/firstNotUndefined.d.ts +2 -0
  43. package/ant/_util/gapSize.d.ts +3 -0
  44. package/ant/_util/getScrollBarSize.d.ts +5 -0
  45. package/ant/_util/hooks/_vueuse/resolveUnref.d.ts +5 -0
  46. package/ant/_util/hooks/_vueuse/types.d.ts +114 -0
  47. package/ant/_util/hooks/_vueuse/unrefElement.d.ts +13 -0
  48. package/ant/_util/hooks/useBreakpoint.d.ts +4 -0
  49. package/ant/_util/hooks/useFlexGapSupport.d.ts +2 -0
  50. package/ant/_util/hooks/useMergedState.d.ts +7 -0
  51. package/ant/_util/hooks/useRefs.d.ts +7 -0
  52. package/ant/_util/hooks/useScrollLocker.d.ts +6 -0
  53. package/ant/_util/hooks/useState.d.ts +2 -0
  54. package/ant/_util/isValid.d.ts +2 -0
  55. package/ant/_util/omit.d.ts +2 -0
  56. package/ant/_util/pickAttrs.d.ts +11 -0
  57. package/ant/_util/placements.d.ts +65 -0
  58. package/ant/_util/props-util/index.d.ts +33 -0
  59. package/ant/_util/props-util/initDefaultProps.d.ts +6 -0
  60. package/ant/_util/raf.d.ts +5 -0
  61. package/ant/_util/responsiveObserve.d.ts +21 -0
  62. package/ant/_util/setStyle.d.ts +12 -0
  63. package/ant/_util/statusUtils.d.ts +6 -0
  64. package/ant/_util/styleChecker.d.ts +4 -0
  65. package/ant/_util/transButton.d.ts +34 -0
  66. package/ant/_util/transition.d.ts +18 -0
  67. package/ant/_util/type.d.ts +62 -0
  68. package/ant/_util/util.d.ts +18 -0
  69. package/ant/_util/vnode.d.ts +11 -0
  70. package/ant/_util/vue-types/index.d.ts +12 -0
  71. package/ant/_util/warning.d.ts +6 -0
  72. package/ant/_util/wave/WaveEffect.d.ts +6 -0
  73. package/ant/_util/wave/index.d.ts +13 -0
  74. package/ant/_util/wave/style.d.ts +6 -0
  75. package/ant/_util/wave/useWave.d.ts +4 -0
  76. package/ant/_util/wave/util.d.ts +3 -0
  77. package/ant/button/LoadingIcon.d.ts +12 -0
  78. package/ant/button/button-group.d.ts +33 -0
  79. package/ant/button/button.d.ts +112 -0
  80. package/ant/button/buttonTypes.d.ts +58 -0
  81. package/ant/button/index.d.ts +12 -0
  82. package/ant/button/style/group.d.ts +4 -0
  83. package/ant/button/style/index.d.ts +10 -0
  84. package/ant/calendar/style/index.d.ts +21 -0
  85. package/ant/config-provider/DisabledContext.d.ts +4 -0
  86. package/ant/config-provider/SizeContext.d.ts +4 -0
  87. package/ant/config-provider/context.d.ts +208 -0
  88. package/ant/config-provider/cssVariables.d.ts +3 -0
  89. package/ant/config-provider/hooks/useConfigInject.d.ts +37 -0
  90. package/ant/config-provider/hooks/useTheme.d.ts +3 -0
  91. package/ant/config-provider/index.d.ts +290 -0
  92. package/ant/config-provider/renderEmpty.d.ts +8 -0
  93. package/ant/config-provider/style/index.d.ts +3 -0
  94. package/ant/date-picker/style/index.d.ts +35 -0
  95. package/ant/empty/empty.d.ts +2 -0
  96. package/ant/empty/index.d.ts +86 -0
  97. package/ant/empty/simple.d.ts +2 -0
  98. package/ant/empty/style/index.d.ts +5 -0
  99. package/ant/flex/index.d.ts +142 -0
  100. package/ant/flex/interface.d.ts +36 -0
  101. package/ant/flex/style/index.d.ts +29 -0
  102. package/ant/flex/utils.d.ts +6 -0
  103. package/ant/form/ErrorList.d.ts +21 -0
  104. package/ant/form/Form.d.ts +772 -0
  105. package/ant/form/FormItem.d.ts +191 -0
  106. package/ant/form/FormItemContext.d.ts +32 -0
  107. package/ant/form/FormItemInput.d.ts +44 -0
  108. package/ant/form/FormItemLabel.d.ts +19 -0
  109. package/ant/form/context.d.ts +35 -0
  110. package/ant/form/index.d.ts +16 -0
  111. package/ant/form/interface.d.ts +171 -0
  112. package/ant/form/style/explain.d.ts +4 -0
  113. package/ant/form/style/index.d.ts +7 -0
  114. package/ant/form/useForm.d.ts +45 -0
  115. package/ant/form/utils/asyncUtil.d.ts +2 -0
  116. package/ant/form/utils/messages.d.ts +47 -0
  117. package/ant/form/utils/typeUtil.d.ts +1 -0
  118. package/ant/form/utils/useDebounce.d.ts +2 -0
  119. package/ant/form/utils/validateUtil.d.ts +6 -0
  120. package/ant/form/utils/valueUtil.d.ts +15 -0
  121. package/ant/grid/Col.d.ts +116 -0
  122. package/ant/grid/Row.d.ts +77 -0
  123. package/ant/grid/context.d.ts +11 -0
  124. package/ant/grid/index.d.ts +10 -0
  125. package/ant/grid/style/index.d.ts +2 -0
  126. package/ant/image/PreviewGroup.d.ts +37 -0
  127. package/ant/image/index.d.ts +71 -0
  128. package/ant/image/style/index.d.ts +21 -0
  129. package/ant/index.cjs +203 -0
  130. package/ant/index.d.ts +27 -0
  131. package/ant/index.mjs +20993 -0
  132. package/ant/input/ClearableLabeledInput.d.ts +151 -0
  133. package/ant/input/Group.d.ts +24 -0
  134. package/ant/input/Input.d.ts +191 -0
  135. package/ant/input/Password.d.ts +217 -0
  136. package/ant/input/ResizableTextArea.d.ts +215 -0
  137. package/ant/input/Search.d.ts +195 -0
  138. package/ant/input/TextArea.d.ts +217 -0
  139. package/ant/input/calculateNodeHeight.d.ts +9 -0
  140. package/ant/input/index.d.ts +15 -0
  141. package/ant/input/inputProps.d.ts +207 -0
  142. package/ant/input/style/index.d.ts +30 -0
  143. package/ant/input/util.d.ts +2 -0
  144. package/ant/locale/LocaleReceiver.d.ts +35 -0
  145. package/ant/locale/en_US.d.ts +3 -0
  146. package/ant/locale/index.d.ts +91 -0
  147. package/ant/locale-provider/LocaleReceiver.d.ts +3 -0
  148. package/ant/locale-provider/index.d.ts +3 -0
  149. package/ant/modal/locale.d.ts +7 -0
  150. package/ant/modal/style/index.d.ts +32 -0
  151. package/ant/progress/Circle.d.ts +168 -0
  152. package/ant/progress/Line.d.ts +205 -0
  153. package/ant/progress/Steps.d.ts +168 -0
  154. package/ant/progress/index.d.ts +204 -0
  155. package/ant/progress/progress.d.ts +117 -0
  156. package/ant/progress/props.d.ts +79 -0
  157. package/ant/progress/style/index.d.ts +4 -0
  158. package/ant/progress/utils.d.ts +13 -0
  159. package/ant/space/Compact.d.ts +119 -0
  160. package/ant/space/style/compact.d.ts +8 -0
  161. package/ant/space/style/index.d.ts +5 -0
  162. package/ant/style/compact-item-vertical.d.ts +4 -0
  163. package/ant/style/compact-item.d.ts +18 -0
  164. package/ant/style/index.d.ts +13 -0
  165. package/ant/style/motion/collapse.d.ts +4 -0
  166. package/ant/style/motion/fade.d.ts +7 -0
  167. package/ant/style/motion/index.d.ts +6 -0
  168. package/ant/style/motion/motion.d.ts +2 -0
  169. package/ant/style/motion/move.d.ts +15 -0
  170. package/ant/style/motion/slide.d.ts +15 -0
  171. package/ant/style/motion/zoom.d.ts +19 -0
  172. package/ant/style/operationUnit.d.ts +3 -0
  173. package/ant/style/placementArrow.d.ts +19 -0
  174. package/ant/style/presetColor.d.ts +16 -0
  175. package/ant/style/roundedArrow.d.ts +2 -0
  176. package/ant/theme/index.d.ts +23 -0
  177. package/ant/theme/interface/alias.d.ts +115 -0
  178. package/ant/theme/interface/components.d.ts +32 -0
  179. package/ant/theme/interface/index.d.ts +13 -0
  180. package/ant/theme/interface/maps/colors.d.ts +350 -0
  181. package/ant/theme/interface/maps/font.d.ts +44 -0
  182. package/ant/theme/interface/maps/index.d.ts +17 -0
  183. package/ant/theme/interface/maps/size.d.ts +63 -0
  184. package/ant/theme/interface/maps/style.d.ts +37 -0
  185. package/ant/theme/interface/presetColors.d.ts +8 -0
  186. package/ant/theme/interface/seeds.d.ts +163 -0
  187. package/ant/theme/internal.d.ts +49 -0
  188. package/ant/theme/themes/ColorMap.d.ts +15 -0
  189. package/ant/theme/themes/compact/genCompactSizeMapToken.d.ts +2 -0
  190. package/ant/theme/themes/compact/index.d.ts +4 -0
  191. package/ant/theme/themes/dark/colorAlgorithm.d.ts +2 -0
  192. package/ant/theme/themes/dark/colors.d.ts +3 -0
  193. package/ant/theme/themes/dark/index.d.ts +4 -0
  194. package/ant/theme/themes/default/colorAlgorithm.d.ts +2 -0
  195. package/ant/theme/themes/default/colors.d.ts +3 -0
  196. package/ant/theme/themes/default/index.d.ts +2 -0
  197. package/ant/theme/themes/seed.d.ts +4 -0
  198. package/ant/theme/themes/shared/genColorMapToken.d.ts +8 -0
  199. package/ant/theme/themes/shared/genCommonMapToken.d.ts +2 -0
  200. package/ant/theme/themes/shared/genControlHeight.d.ts +3 -0
  201. package/ant/theme/themes/shared/genFontMapToken.d.ts +3 -0
  202. package/ant/theme/themes/shared/genFontSizes.d.ts +4 -0
  203. package/ant/theme/themes/shared/genRadius.d.ts +3 -0
  204. package/ant/theme/themes/shared/genSizeMapToken.d.ts +2 -0
  205. package/ant/theme/util/alias.d.ts +12 -0
  206. package/ant/theme/util/genComponentStyleHook.d.ts +26 -0
  207. package/ant/theme/util/getAlphaColor.d.ts +2 -0
  208. package/ant/theme/util/statistic.d.ts +18 -0
  209. package/ant/tooltip/Tooltip.d.ts +228 -0
  210. package/ant/tooltip/abstractTooltipProps.d.ts +73 -0
  211. package/ant/tooltip/index.d.ts +245 -0
  212. package/ant/tooltip/style/index.d.ts +8 -0
  213. package/ant/tooltip/util.d.ts +6 -0
  214. package/ant/typography/Base.d.ts +200 -0
  215. package/ant/typography/Editable.d.ts +49 -0
  216. package/ant/typography/Link.d.ts +51 -0
  217. package/ant/typography/Paragraph.d.ts +51 -0
  218. package/ant/typography/Text.d.ts +51 -0
  219. package/ant/typography/Title.d.ts +48 -0
  220. package/ant/typography/Typography.d.ts +24 -0
  221. package/ant/typography/index.d.ts +17 -0
  222. package/ant/typography/style/index.d.ts +9 -0
  223. package/ant/typography/style/mixins.d.ts +9 -0
  224. package/ant/typography/util.d.ts +11 -0
  225. package/ant/upload/Dragger.d.ts +393 -0
  226. package/ant/upload/Upload.d.ts +396 -0
  227. package/ant/upload/UploadList/ListItem.d.ts +339 -0
  228. package/ant/upload/UploadList/index.d.ts +232 -0
  229. package/ant/upload/index.d.ts +1460 -0
  230. package/ant/upload/interface.d.ts +355 -0
  231. package/ant/upload/style/dragger.d.ts +4 -0
  232. package/ant/upload/style/index.d.ts +10 -0
  233. package/ant/upload/style/list.d.ts +4 -0
  234. package/ant/upload/style/motion.d.ts +4 -0
  235. package/ant/upload/style/picture.d.ts +5 -0
  236. package/ant/upload/style/rtl.d.ts +4 -0
  237. package/ant/upload/utils.d.ts +8 -0
  238. package/ant/vc-align/Align.d.ts +45 -0
  239. package/ant/vc-align/hooks/useBuffer.d.ts +3 -0
  240. package/ant/vc-align/interface.d.ts +56 -0
  241. package/ant/vc-align/util.d.ts +4 -0
  242. package/ant/vc-dialog/Content.d.ts +181 -0
  243. package/ant/vc-dialog/Dialog.d.ts +169 -0
  244. package/ant/vc-dialog/DialogWrap.d.ts +165 -0
  245. package/ant/vc-dialog/IDialogPropTypes.d.ts +79 -0
  246. package/ant/vc-dialog/Mask.d.ts +14 -0
  247. package/ant/vc-dialog/index.d.ts +4 -0
  248. package/ant/vc-dialog/util.d.ts +6 -0
  249. package/ant/vc-image/index.d.ts +3 -0
  250. package/ant/vc-image/src/Image.d.ts +114 -0
  251. package/ant/vc-image/src/Preview.d.ts +292 -0
  252. package/ant/vc-image/src/PreviewGroup.d.ts +79 -0
  253. package/ant/vc-image/src/getFixScaleEleTransPosition.d.ts +16 -0
  254. package/ant/vc-image/src/hooks/useFrameSetState.d.ts +3 -0
  255. package/ant/vc-input/BaseInput.d.ts +97 -0
  256. package/ant/vc-input/Input.d.ts +192 -0
  257. package/ant/vc-input/inputProps.d.ts +169 -0
  258. package/ant/vc-input/utils/commonUtils.d.ts +8 -0
  259. package/ant/vc-progress/index.d.ts +5 -0
  260. package/ant/vc-progress/src/Circle.d.ts +41 -0
  261. package/ant/vc-progress/src/Line.d.ts +40 -0
  262. package/ant/vc-progress/src/common.d.ts +5 -0
  263. package/ant/vc-progress/src/index.d.ts +86 -0
  264. package/ant/vc-progress/src/types.d.ts +25 -0
  265. package/ant/vc-resize-observer/index.d.ts +25 -0
  266. package/ant/vc-tooltip/index.d.ts +2 -0
  267. package/ant/vc-tooltip/src/Content.d.ts +17 -0
  268. package/ant/vc-tooltip/src/Tooltip.d.ts +141 -0
  269. package/ant/vc-tooltip/src/placements.d.ts +111 -0
  270. package/ant/vc-trigger/Popup/Mask.d.ts +14 -0
  271. package/ant/vc-trigger/Popup/MobilePopupInner.d.ts +103 -0
  272. package/ant/vc-trigger/Popup/PopupInner.d.ts +98 -0
  273. package/ant/vc-trigger/Popup/index.d.ts +104 -0
  274. package/ant/vc-trigger/Popup/interface.d.ts +151 -0
  275. package/ant/vc-trigger/Popup/useStretchStyle.d.ts +4 -0
  276. package/ant/vc-trigger/Popup/useVisibleStatus.d.ts +15 -0
  277. package/ant/vc-trigger/Trigger.d.ts +282 -0
  278. package/ant/vc-trigger/context.d.ts +11 -0
  279. package/ant/vc-trigger/index.d.ts +6 -0
  280. package/ant/vc-trigger/interface.d.ts +175 -0
  281. package/ant/vc-trigger/utils/alignUtil.d.ts +3 -0
  282. package/ant/vc-trigger/utils/motionUtil.d.ts +12 -0
  283. package/ant/vc-upload/AjaxUploader.d.ts +108 -0
  284. package/ant/vc-upload/Upload.d.ts +108 -0
  285. package/ant/vc-upload/attr-accept.d.ts +3 -0
  286. package/ant/vc-upload/index.d.ts +4 -0
  287. package/ant/vc-upload/interface.d.ts +79 -0
  288. package/ant/vc-upload/request.d.ts +4 -0
  289. package/ant/vc-upload/traverseFileTree.d.ts +14 -0
  290. package/ant/vc-upload/uid.d.ts +1 -0
  291. package/ant/vc-util/Dom/contains.d.ts +1 -0
  292. package/ant/vc-util/Dom/css.d.ts +22 -0
  293. package/ant/vc-util/Dom/dynamicCSS.d.ts +20 -0
  294. package/ant/vc-util/Dom/isVisible.d.ts +2 -0
  295. package/ant/vc-util/Dom/scrollLocker.d.ts +12 -0
  296. package/ant/vc-util/devWarning.d.ts +4 -0
  297. package/ant/vc-util/get.d.ts +1 -0
  298. package/ant/vc-util/set.d.ts +1 -0
  299. package/ant/vc-util/warning.d.ts +7 -0
  300. package/ant/version/index.d.ts +2 -0
  301. package/antx/_util/__tests__/warning.test.d.ts +1 -0
  302. package/antx/_util/cssinjs/Cache.d.ts +11 -0
  303. package/antx/_util/cssinjs/Keyframes.d.ts +9 -0
  304. package/antx/_util/cssinjs/StyleContext.d.ts +508 -0
  305. package/antx/_util/cssinjs/hooks/useCSSVarRegister.d.ts +20 -0
  306. package/antx/_util/cssinjs/hooks/useCacheToken.d.ts +40 -0
  307. package/antx/_util/cssinjs/hooks/useGlobalCache.d.ts +6 -0
  308. package/antx/_util/cssinjs/hooks/useHMR.d.ts +3 -0
  309. package/antx/_util/cssinjs/hooks/useStyleRegister/cacheMapUtil.d.ts +14 -0
  310. package/antx/_util/cssinjs/hooks/useStyleRegister/index.d.ts +69 -0
  311. package/antx/_util/cssinjs/index.d.ts +197 -0
  312. package/antx/_util/cssinjs/linters/contentQuotesLinter.d.ts +3 -0
  313. package/antx/_util/cssinjs/linters/hashedAnimationLinter.d.ts +3 -0
  314. package/antx/_util/cssinjs/linters/index.d.ts +6 -0
  315. package/antx/_util/cssinjs/linters/interface.d.ts +8 -0
  316. package/antx/_util/cssinjs/linters/legacyNotSelectorLinter.d.ts +3 -0
  317. package/antx/_util/cssinjs/linters/logicalPropertiesLinter.d.ts +3 -0
  318. package/antx/_util/cssinjs/linters/parentSelectorLinter.d.ts +3 -0
  319. package/antx/_util/cssinjs/linters/utils.d.ts +2 -0
  320. package/antx/_util/cssinjs/theme/Theme.d.ts +11 -0
  321. package/antx/_util/cssinjs/theme/ThemeCache.d.ts +20 -0
  322. package/antx/_util/cssinjs/theme/createTheme.d.ts +6 -0
  323. package/antx/_util/cssinjs/theme/index.d.ts +4 -0
  324. package/antx/_util/cssinjs/theme/interface.d.ts +2 -0
  325. package/antx/_util/cssinjs/transformers/interface.d.ts +4 -0
  326. package/antx/_util/cssinjs/transformers/legacyLogicalProperties.d.ts +12 -0
  327. package/antx/_util/cssinjs/transformers/px2rem.d.ts +20 -0
  328. package/antx/_util/cssinjs/util.d.ts +28 -0
  329. package/antx/_util/cssinjs-utils/_util/hooks/useUniqueMemo.d.ts +5 -0
  330. package/antx/_util/cssinjs-utils/hooks/useCSP.d.ts +8 -0
  331. package/antx/_util/cssinjs-utils/hooks/usePrefix.d.ts +11 -0
  332. package/antx/_util/cssinjs-utils/hooks/useToken.d.ts +21 -0
  333. package/antx/_util/cssinjs-utils/index.d.ts +6 -0
  334. package/antx/_util/cssinjs-utils/interface/components.d.ts +10 -0
  335. package/antx/_util/cssinjs-utils/interface/index.d.ts +3 -0
  336. package/antx/_util/cssinjs-utils/util/calc/CSSCalculator.d.ts +15 -0
  337. package/antx/_util/cssinjs-utils/util/calc/NumCalculator.d.ts +11 -0
  338. package/antx/_util/cssinjs-utils/util/calc/calculator.d.ts +30 -0
  339. package/antx/_util/cssinjs-utils/util/calc/index.d.ts +5 -0
  340. package/antx/_util/cssinjs-utils/util/genStyleUtils.d.ts +116 -0
  341. package/antx/_util/cssinjs-utils/util/getCompVarPrefix.d.ts +2 -0
  342. package/antx/_util/cssinjs-utils/util/getComponentToken.d.ts +9 -0
  343. package/antx/_util/cssinjs-utils/util/getDefaultComponentToken.d.ts +5 -0
  344. package/antx/_util/cssinjs-utils/util/maxmin.d.ts +8 -0
  345. package/antx/_util/cssinjs-utils/util/statistic.d.ts +20 -0
  346. package/antx/_util/getScrollBarSize.d.ts +5 -0
  347. package/antx/_util/getValue.d.ts +2 -0
  348. package/antx/_util/hooks/use-event-callback.d.ts +1 -0
  349. package/antx/_util/hooks/use-state.d.ts +2 -0
  350. package/antx/_util/hooks/use-x-component-config.d.ts +4 -0
  351. package/antx/_util/hooks/useMergedState.d.ts +7 -0
  352. package/antx/_util/motion.d.ts +3 -0
  353. package/antx/_util/pick-attrs.d.ts +11 -0
  354. package/antx/_util/setStyle.d.ts +12 -0
  355. package/antx/_util/transition.d.ts +29 -0
  356. package/antx/_util/type.d.ts +62 -0
  357. package/antx/_util/warning.d.ts +47 -0
  358. package/antx/attachments/Attachments.vue.d.ts +16 -0
  359. package/antx/attachments/DropArea.vue.d.ts +4 -0
  360. package/antx/attachments/FileList/AudioIcon.vue.d.ts +3 -0
  361. package/antx/attachments/FileList/FileList.vue.d.ts +4 -0
  362. package/antx/attachments/FileList/FileListCard.vue.d.ts +6 -0
  363. package/antx/attachments/FileList/Progress.vue.d.ts +103 -0
  364. package/antx/attachments/FileList/VideoIcon.vue.d.ts +3 -0
  365. package/antx/attachments/FileList/index.d.ts +3 -0
  366. package/antx/attachments/PlaceholderUploader.vue.d.ts +6 -0
  367. package/antx/attachments/SilentUploader.vue.d.ts +6 -0
  368. package/antx/attachments/constants.d.ts +9 -0
  369. package/antx/attachments/context.d.ts +21 -0
  370. package/antx/attachments/index.d.ts +26 -0
  371. package/antx/attachments/interface.d.ts +130 -0
  372. package/antx/attachments/style/fileCard.d.ts +4 -0
  373. package/antx/attachments/style/index.d.ts +9 -0
  374. package/antx/attachments/util.d.ts +3 -0
  375. package/antx/components.d.ts +4 -0
  376. package/antx/hooks.d.ts +8 -0
  377. package/antx/index.cjs +78 -0
  378. package/antx/index.d.ts +10 -0
  379. package/antx/index.mjs +6015 -0
  380. package/antx/sender/Sender.vue.d.ts +48 -0
  381. package/antx/sender/SenderHeader.vue.d.ts +13 -0
  382. package/antx/sender/StopLoading.vue.d.ts +6 -0
  383. package/antx/sender/components/ActionButton/context.d.ts +21 -0
  384. package/antx/sender/components/ActionButton/index.vue.d.ts +13 -0
  385. package/antx/sender/components/ClearButton.vue.d.ts +4 -0
  386. package/antx/sender/components/LoadingButton.vue.d.ts +4 -0
  387. package/antx/sender/components/SendButton.vue.d.ts +4 -0
  388. package/antx/sender/components/SpeechButton/RecordingIcon.vue.d.ts +4 -0
  389. package/antx/sender/components/SpeechButton/index.vue.d.ts +4 -0
  390. package/antx/sender/context.d.ts +21 -0
  391. package/antx/sender/index.d.ts +82 -0
  392. package/antx/sender/interface.d.ts +145 -0
  393. package/antx/sender/style/header.d.ts +4 -0
  394. package/antx/sender/style/index.d.ts +9 -0
  395. package/antx/sender/useSpeech.d.ts +16 -0
  396. package/antx/theme/components.d.ts +8 -0
  397. package/antx/theme/cssinjs-utils.d.ts +14 -0
  398. package/antx/theme/genStyleUtils.d.ts +27 -0
  399. package/antx/theme/index.d.ts +2 -0
  400. package/antx/theme/patch-antd.d.ts +28 -0
  401. package/antx/theme/useToken.d.ts +19 -0
  402. package/antx/transition-collapse/TransitionCollapse.vue.d.ts +17 -0
  403. package/antx/transition-collapse/index.d.ts +6 -0
  404. package/antx/transition-collapse/style/index.d.ts +6 -0
  405. package/antx/type-utility.d.ts +1 -0
  406. package/antx/use-x-agent/index.d.ts +4 -0
  407. package/antx/use-x-agent/use-x-agent.d.ts +34 -0
  408. package/antx/use-x-chat/index.d.ts +4 -0
  409. package/antx/use-x-chat/use-x-chat.d.ts +54 -0
  410. package/antx/use-x-chat/useSyncState.d.ts +4 -0
  411. package/antx/version/index.d.ts +2 -0
  412. package/antx/x-provider/context.d.ts +84 -0
  413. package/antx/x-provider/hooks/use-x-provider-context.d.ts +9 -0
  414. package/antx/x-provider/index.d.ts +5 -0
  415. package/antx/x-provider/index.vue.d.ts +13 -0
  416. package/antx/x-request/index.d.ts +6 -0
  417. package/antx/x-request/x-fetch.d.ts +18 -0
  418. package/antx/x-request/x-request.d.ts +89 -0
  419. package/antx/x-stream/index.d.ts +4 -0
  420. package/antx/x-stream/x-stream.d.ts +32 -0
  421. package/components/agent-chat-provider/index.cjs +1 -1
  422. package/components/agent-chat-provider/index.mjs +1 -3
  423. package/components/agent-chat-provider/src/index.vue.d.ts +3 -3
  424. package/components/agent-chat-provider/src/types.d.ts +1 -1
  425. package/components/agent-chat-provider/src/use.d.ts +2 -2
  426. package/components/avatar/index.mjs +2 -2
  427. package/components/avatar/src/index.vue.d.ts +2 -121
  428. package/components/broadcasting-markdown/index.cjs +3 -3
  429. package/components/broadcasting-markdown/index.mjs +2 -5
  430. package/components/broadcasting-markdown/src/ctx.d.ts +2 -2
  431. package/components/broadcasting-markdown/src/howler-speech.vue.d.ts +6 -6
  432. package/components/broadcasting-markdown/src/index.vue.d.ts +33 -33
  433. package/components/broadcasting-markdown/src/paragraph.vue.d.ts +1 -1
  434. package/components/broadcasting-markdown/src/use.d.ts +1 -1
  435. package/components/bubble-list/index.cjs +1 -1
  436. package/components/bubble-list/index.mjs +5 -5
  437. package/components/bubble-list/src/core/index.vue.d.ts +7 -7
  438. package/components/bubble-list/src/ctx.d.ts +2 -2
  439. package/components/bubble-list/src/index.vue.d.ts +5 -4
  440. package/components/bubble-templates/index.mjs +2 -2
  441. package/components/chat-independent/index.mjs +4 -4
  442. package/components/chat-independent/src/index.vue.d.ts +1 -1
  443. package/components/drawer/index.mjs +1 -1
  444. package/components/drawer/src/ctx.d.ts +37 -31
  445. package/components/drawer/src/index.vue.d.ts +87 -77
  446. package/components/lottie-animation/index.mjs +2 -2
  447. package/components/lottie-animation/src/index.vue.d.ts +1 -1
  448. package/components/metahuman-broadcasting/index.mjs +2 -2
  449. package/components/metahuman-broadcasting/src/ctx.d.ts +2 -2
  450. package/components/metahuman-broadcasting/src/index.vue.d.ts +4 -4
  451. package/components/monaco-editor/index.cjs +1 -1
  452. package/components/monaco-editor/index.mjs +52 -48
  453. package/components/monaco-editor/src/ctx.d.ts +3 -3
  454. package/components/monaco-editor/src/index.vue.d.ts +5 -5
  455. package/components/pixi-frame/index.cjs +1 -1
  456. package/components/pixi-frame/index.mjs +25 -25
  457. package/components/pixi-frame/src/apng.vue.d.ts +10 -10
  458. package/components/pixi-frame/src/bitmap-generator.vue.d.ts +7 -7
  459. package/components/pixi-frame/src/bitmap.vue.d.ts +12 -12
  460. package/components/pixi-frame/src/buffer-image.vue.d.ts +13 -13
  461. package/components/pixi-frame/src/core.vue.d.ts +12 -12
  462. package/components/pixi-frame/src/ctx.d.ts +5 -5
  463. package/components/pixi-frame/src/index.vue.d.ts +81 -81
  464. package/components/pixi-frame/src/video.vue.d.ts +10 -10
  465. package/components/recorder-button/index.cjs +1 -1
  466. package/components/recorder-button/index.mjs +75 -75
  467. package/components/recorder-button/src/ctx.d.ts +3 -3
  468. package/components/recorder-button/src/index.vue.d.ts +114 -197
  469. package/components/routes-menu-content/index.cjs +1 -1
  470. package/components/routes-menu-content/index.mjs +12 -12
  471. package/components/routes-menu-content/src/ctx.d.ts +1 -1
  472. package/components/routes-menu-content/src/index.vue.d.ts +58 -99
  473. package/components/routes-menu-content/src/item/core/ctx.d.ts +1 -1
  474. package/components/routes-menu-content/src/item/core/index.vue.d.ts +40 -81
  475. package/components/routes-menu-content/src/item/index.vue.d.ts +56 -97
  476. package/components/scrollbar/index.mjs +4 -4
  477. package/components/scrollbar/src/index.vue.d.ts +35 -34
  478. package/components/scrollbar/src/util.d.ts +1 -1
  479. package/components/sender/index.cjs +1 -1
  480. package/components/sender/index.mjs +7 -7
  481. package/components/sender/src/SenderHeader.vue.d.ts +2 -2
  482. package/components/sender/src/ctx.d.ts +9 -9
  483. package/components/sender/src/index.vue.d.ts +28 -28
  484. package/components/speech-button/index.cjs +1 -1
  485. package/components/speech-button/index.mjs +1 -1
  486. package/components/speech-button/src/ctx.d.ts +1 -1
  487. package/components/speech-button/src/index.vue.d.ts +3 -3
  488. package/components/table-columns/src/ctx.d.ts +2 -2
  489. package/components/table-columns/src/el-ctx.d.ts +2 -2
  490. package/components/table-columns/src/index.vue.d.ts +6 -6
  491. package/components/table-columns/src/types.d.ts +3 -4
  492. package/components/tables-v1/index.cjs +1 -1
  493. package/components/tables-v1/index.mjs +3 -3
  494. package/components/tables-v1/src/ctx.d.ts +69 -74
  495. package/components/tables-v1/src/el-ctx.d.ts +24 -24
  496. package/components/tables-v1/src/index.vue.d.ts +54 -313
  497. package/components/tables-v1-checkbox/index.cjs +31 -35
  498. package/components/tables-v1-checkbox/index.mjs +1239 -1042
  499. package/components/tables-v1-checkbox/src/ctx.d.ts +68 -73
  500. package/components/tables-v1-checkbox/src/index.vue.d.ts +274 -542
  501. package/components/text/index.mjs +3 -3
  502. package/components/text/src/ctx.d.ts +39 -246
  503. package/components/text/src/index.vue.d.ts +98 -509
  504. package/components/thinking/index.mjs +5 -5
  505. package/components/thinking/src/ctx.d.ts +3 -3
  506. package/components/thinking/src/index.vue.d.ts +8 -8
  507. package/components/typing-markdown/index.mjs +2 -2
  508. package/components/typing-markdown/src/ctx.d.ts +3 -3
  509. package/components/typing-markdown/src/index.vue.d.ts +6 -6
  510. package/components/vditor/index.cjs +1 -1
  511. package/components/vditor/index.mjs +2 -2
  512. package/components/vditor/src/ctx.d.ts +2 -2
  513. package/components/vditor/src/handle-fullscreen.vue.d.ts +3 -3
  514. package/components/vditor/src/handle-value.vue.d.ts +3 -3
  515. package/components/vditor/src/index.vue.d.ts +10 -10
  516. package/components/xgplayer/index.mjs +5 -5
  517. package/composables/recorder/index.cjs +1 -1
  518. package/composables/recorder/index.mjs +3214 -3099
  519. package/element/bubble/index.cjs +2 -2
  520. package/element/bubble/index.mjs +57 -57
  521. package/element/index.css +1 -1
  522. package/element/thinking/index.cjs +1 -1
  523. package/element/thinking/index.mjs +63 -69
  524. package/icons/end/index.cjs +1 -1
  525. package/icons/end/index.mjs +3 -3
  526. package/icons/keyboard/index.cjs +1 -1
  527. package/icons/keyboard/index.mjs +3 -3
  528. package/icons/start/index.cjs +1 -1
  529. package/icons/start/index.mjs +3 -3
  530. package/icons/voice/index.cjs +1 -1
  531. package/icons/voice/index.mjs +3 -3
  532. package/index.css +1 -1
  533. package/package.json +11 -1
@@ -1,9 +1,9 @@
1
- import { watchPausable as g } from "@vueuse/core";
2
- import { editor as h } from "monaco-editor";
3
- import { defineComponent as b, ref as p, computed as v, onMounted as O, nextTick as m, watchEffect as y, onBeforeUnmount as V, createElementBlock as M, openBlock as S, normalizeStyle as k } from "vue";
4
- import { bindPropsFactory as E, onEmitsFactory as x } from "@vunk/core/shared/utils-vue";
1
+ import { watchPausable as h } from "@vueuse/core";
2
+ import { editor as b } from "monaco-editor";
3
+ import { defineComponent as v, ref as p, computed as O, onMounted as V, nextTick as y, watchEffect as _, onBeforeUnmount as M, openBlock as S, createElementBlock as k, normalizeStyle as E } from "vue";
4
+ import { bindPropsFactory as H, onEmitsFactory as x } from "@vunk/core/shared/utils-vue";
5
5
  import { _ as z } from "../_plugin-vue_export-helper-CHgC5LLL.mjs";
6
- const i = {
6
+ const c = {
7
7
  modelValue: {
8
8
  type: String,
9
9
  default: ""
@@ -20,85 +20,89 @@ const i = {
20
20
  type: Boolean,
21
21
  default: !1
22
22
  }
23
- }, C = E(i), c = {
23
+ }, B = H(c), s = {
24
24
  "update:modelValue": null,
25
- load: (t) => !0
26
- }, H = x(c), F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
25
+ load: (e) => !0
26
+ }, C = x(s), L = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
27
27
  __proto__: null,
28
- createBindProps: C,
29
- createOnEmits: H,
30
- emits: c,
31
- props: i
32
- }, Symbol.toStringTag, { value: "Module" })), j = b({
28
+ createBindProps: B,
29
+ createOnEmits: C,
30
+ emits: s,
31
+ props: c
32
+ }, Symbol.toStringTag, { value: "Module" })), j = v({
33
33
  name: "VkMonacoEditor",
34
- props: i,
35
- emits: c,
36
- setup(t, { emit: r }) {
37
- const n = p(), o = p(""), s = v(() => {
38
- if (!(!t.autoHeight || !o.value))
34
+ props: c,
35
+ emits: s,
36
+ setup(e, { emit: r }) {
37
+ const n = p(), o = p(""), u = O(() => {
38
+ if (!(!e.autoHeight || !o.value))
39
39
  return {
40
40
  height: o.value
41
41
  };
42
42
  });
43
- return O(() => {
44
- const e = h.create(n.value, t.defaultOptions);
45
- r("load", e);
46
- function u() {
47
- if (!t.autoHeight)
43
+ return V(() => {
44
+ const i = {
45
+ ...e.defaultOptions
46
+ };
47
+ e.autoHeight && (i.scrollBeyondLastLine = !1);
48
+ const t = b.create(n.value, i);
49
+ r("load", t);
50
+ function d() {
51
+ if (!e.autoHeight)
48
52
  return;
49
- const a = `${Math.ceil(e.getContentHeight())}px`;
50
- o.value !== a && (o.value = a, m(() => {
51
- e.layout();
53
+ const a = `${Math.ceil(t.getContentHeight())}px`;
54
+ o.value !== a && (o.value = a, y(() => {
55
+ t.layout();
52
56
  }));
53
57
  }
54
- const d = g(
55
- () => t.modelValue,
58
+ const f = h(
59
+ () => e.modelValue,
56
60
  (a) => {
57
- e.setValue(a);
61
+ t.setValue(a);
58
62
  },
59
63
  {
60
64
  immediate: !0
61
65
  }
62
66
  );
63
- e.onDidChangeModelContent(() => {
64
- d.pause(), r("update:modelValue", e.getValue()), m(() => {
65
- d.resume();
67
+ t.onDidChangeModelContent(() => {
68
+ f.pause(), r("update:modelValue", t.getValue()), y(() => {
69
+ f.resume();
66
70
  });
67
71
  });
68
- const _ = e.onDidContentSizeChange(u);
69
- y(u), y(() => {
70
- e.updateOptions({
71
- readOnly: t.readOnly
72
+ const g = t.onDidContentSizeChange(d);
73
+ _(d), _(() => {
74
+ t.updateOptions({
75
+ readOnly: e.readOnly
72
76
  });
73
77
  });
74
- const f = new ResizeObserver(() => {
75
- e.layout();
78
+ const m = new ResizeObserver(() => {
79
+ t.layout();
76
80
  });
77
- f.observe(n.value), V(() => {
78
- _.dispose(), f.disconnect(), e.dispose();
81
+ m.observe(n.value), M(() => {
82
+ g.dispose(), m.disconnect(), t.dispose();
79
83
  });
80
84
  }), {
81
85
  editorNode: n,
82
- editorStyle: s
86
+ editorStyle: u
83
87
  };
84
88
  }
85
89
  });
86
- function B(t, r, n, o, s, e) {
87
- return S(), M("div", {
90
+ function $(e, r, n, o, u, i) {
91
+ return S(), k("div", {
88
92
  ref: "editorNode",
89
93
  class: "vk-monaco-editor",
90
- style: k(t.editorStyle)
94
+ style: E(e.editorStyle)
91
95
  }, null, 4);
92
96
  }
93
- const l = /* @__PURE__ */ z(j, [["render", B]]), N = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
97
+ const l = /* @__PURE__ */ z(j, [["render", $]]), N = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
94
98
  __proto__: null
95
99
  }, Symbol.toStringTag, { value: "Module" }));
96
- l.install = (t) => {
97
- t.component(l.name || "VkMonacoEditor", l);
100
+ l.install = (e) => {
101
+ e.component(l.name || "VkMonacoEditor", l);
98
102
  };
99
103
  export {
100
104
  l as VkMonacoEditor,
101
- F as _VkMonacoEditorCtx,
105
+ L as _VkMonacoEditorCtx,
102
106
  N as __VkMonacoEditor,
103
107
  l as default
104
108
  };
@@ -18,12 +18,12 @@ export declare const props: {
18
18
  default: boolean;
19
19
  };
20
20
  };
21
- export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"modelValue", keyof T2> | Extract<"readOnly", keyof T2> | Extract<"defaultOptions", keyof T2> | Extract<"autoHeight", keyof T2>)[]>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"modelValue", keyof T2>, KE> | Exclude<Extract<"readOnly", keyof T2>, KE> | Exclude<Extract<"defaultOptions", keyof T2>, KE> | Exclude<Extract<"autoHeight", keyof T2>, KE> : Extract<"modelValue", keyof T2> | Extract<"readOnly", keyof T2> | Extract<"defaultOptions", keyof T2> | Extract<"autoHeight", keyof T2>]: { [k in Extract<"modelValue", keyof T2> | Extract<"readOnly", keyof T2> | Extract<"defaultOptions", keyof T2> | Extract<"autoHeight", keyof T2>]: T2[k]; }[P]; }>;
21
+ export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"readOnly", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"defaultOptions", keyof T2> | Extract<"autoHeight", keyof T2>)[]>(propsArg: T2, excludes?: EX) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"readOnly", keyof T2>, KE> | Exclude<Extract<"modelValue", keyof T2>, KE> | Exclude<Extract<"defaultOptions", keyof T2>, KE> | Exclude<Extract<"autoHeight", keyof T2>, KE> : Extract<"readOnly", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"defaultOptions", keyof T2> | Extract<"autoHeight", keyof T2>]: { [k in Extract<"readOnly", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"defaultOptions", keyof T2> | Extract<"autoHeight", keyof T2>]: T2[k]; }[P]; }>;
22
22
  export declare const emits: {
23
- 'update:modelValue': null;
23
+ 'update:modelValue': any;
24
24
  load: (_editor: editor.IStandaloneCodeEditor) => boolean;
25
25
  };
26
- export declare const createOnEmits: <T2 extends import("@vunk/core").AnyFunc, EX extends ("load" | "update:modelValue")[]>(emit: T2, excludes?: EX | undefined) => { [P in EX extends (infer KE)[] ? Exclude<"load", KE> | Exclude<"update:modelValue", KE> : "load" | "update:modelValue"]: {
26
+ export declare const createOnEmits: <T2 extends import("@vunk/core").AnyFunc, EX extends ("load" | "update:modelValue")[]>(emit: T2, excludes?: EX) => { [P in EX extends (infer KE)[] ? Exclude<"load", KE> | Exclude<"update:modelValue", KE> : "load" | "update:modelValue"]: {
27
27
  'update:modelValue': (...e: import("@vunk/core").RestParameters<T2>) => void;
28
28
  load: (...e: import("@vunk/core").RestParameters<T2>) => void;
29
29
  }[P]; };
@@ -23,9 +23,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
23
23
  editorNode: Ref<HTMLDivElement, HTMLDivElement>;
24
24
  editorStyle: import("vue").ComputedRef<{
25
25
  height: string;
26
- } | undefined>;
26
+ }>;
27
27
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
28
- 'update:modelValue': null;
28
+ 'update:modelValue': any;
29
29
  load: (_editor: mEditor.IStandaloneCodeEditor) => boolean;
30
30
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
31
31
  modelValue: {
@@ -45,11 +45,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
45
45
  default: boolean;
46
46
  };
47
47
  }>> & Readonly<{
48
- onLoad?: ((_editor: mEditor.IStandaloneCodeEditor) => any) | undefined;
49
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
48
+ onLoad?: (_editor: mEditor.IStandaloneCodeEditor) => any;
49
+ "onUpdate:modelValue"?: (...args: any) => any;
50
50
  }>, {
51
- modelValue: string;
52
51
  readOnly: boolean;
52
+ modelValue: string;
53
53
  defaultOptions: mEditor.IStandaloneEditorConstructionOptions;
54
54
  autoHeight: boolean;
55
55
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),m=require("@vunk/shared/enum"),j=require("@vunk/shared/promise"),I=require("pixi.js"),W=require("@vunk/shared/object"),H=require("@vunk/core/composables"),ae=require("../_plugin-vue_export-helper-BHFhmbuH.js");function se(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var z={exports:{}},ie=z.exports,X;function ue(){return X||(X=1,(function(l,S){(function(r,f){l.exports=f()})(ie,function(){return(function(t){var r={};function f(c){if(r[c])return r[c].exports;var g=r[c]={exports:{},id:c,loaded:!1};return t[c].call(g.exports,g,g.exports,f),g.loaded=!0,g.exports}return f.m=t,f.c=r,f.p="",f(0)})([(function(t,r,f){Object.defineProperty(r,"__esModule",{value:!0}),r.isNotPNG=a,r.isNotAPNG=u,r.default=s;var c=f(1),g=w(c),y=f(2);function w(d){return d&&d.__esModule?d:{default:d}}var e=new Error("Not a PNG"),n=new Error("Not an animated PNG");function a(d){return d===e}function u(d){return d===n}var i=new Uint8Array([137,80,78,71,13,10,26,10]);function s(d){var _=new Uint8Array(d);if(Array.prototype.some.call(i,function(L,C){return L!==_[C]}))return e;var p=!1;if(b(_,function(L){return!(p=L==="acTL")}),!p)return n;var x=[],E=[],N=null,F=null,O=0,R=new y.APNG;if(b(_,function(L,C,A,U){var D=new DataView(C.buffer);switch(L){case"IHDR":N=C.subarray(A+8,A+8+U),R.width=D.getUint32(A+8),R.height=D.getUint32(A+12);break;case"acTL":R.numPlays=D.getUint32(A+8+4);break;case"fcTL":F&&(R.frames.push(F),O++),F=new y.Frame,F.width=D.getUint32(A+8+4),F.height=D.getUint32(A+8+8),F.left=D.getUint32(A+8+12),F.top=D.getUint32(A+8+16);var ne=D.getUint16(A+8+20),K=D.getUint16(A+8+22);K===0&&(K=100),F.delay=1e3*ne/K,F.delay<=10&&(F.delay=100),R.playTime+=F.delay,F.disposeOp=D.getUint8(A+8+24),F.blendOp=D.getUint8(A+8+25),F.dataParts=[],O===0&&F.disposeOp===2&&(F.disposeOp=1);break;case"fdAT":F&&F.dataParts.push(C.subarray(A+8+4,A+8+U));break;case"IDAT":F&&F.dataParts.push(C.subarray(A+8,A+8+U));break;case"IEND":E.push(k(C,A,12+U));break;default:x.push(k(C,A,12+U))}}),F&&R.frames.push(F),R.frames.length==0)return n;var V=new Blob(x),G=new Blob(E);return R.frames.forEach(function(L){var C=[];C.push(i),N.set(h(L.width),0),N.set(h(L.height),4),C.push(T("IHDR",N)),C.push(V),L.dataParts.forEach(function(A){return C.push(T("IDAT",A))}),C.push(G),L.imageData=new Blob(C,{type:"image/png"}),delete L.dataParts,C=null}),R}function b(d,_){var p=new DataView(d.buffer),x=8,E=void 0,N=void 0,F=void 0;do N=p.getUint32(x),E=v(d,x+4,4),F=_(E,d,x,N),x+=12+N;while(F!==!1&&E!="IEND"&&x<d.length)}function v(d,_,p){var x=Array.prototype.slice.call(d.subarray(_,_+p));return String.fromCharCode.apply(String,x)}function P(d){for(var _=new Uint8Array(d.length),p=0;p<d.length;p++)_[p]=d.charCodeAt(p);return _}function k(d,_,p){var x=new Uint8Array(p);return x.set(d.subarray(_,_+p)),x}var T=function(_,p){var x=_.length+p.length,E=new Uint8Array(x+8),N=new DataView(E.buffer);N.setUint32(0,p.length),E.set(P(_),4),E.set(p,8);var F=(0,g.default)(E,4,x);return N.setUint32(x+4,F),E},h=function(_){return new Uint8Array([_>>>24&255,_>>>16&255,_>>>8&255,_&255])}}),(function(t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(w){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:w.length-e,a=-1,u=e,i=e+n;u<i;u++)a=a>>>8^f[(a^w[u])&255];return a^-1};for(var f=new Uint32Array(256),c=0;c<256;c++){for(var g=c,y=0;y<8;y++)g=(g&1)!==0?3988292384^g>>>1:g>>>1;f[c]=g}}),(function(t,r,f){Object.defineProperty(r,"__esModule",{value:!0}),r.Frame=r.APNG=void 0;var c=(function(){function n(a,u){for(var i=0;i<u.length;i++){var s=u[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(a,s.key,s)}}return function(a,u,i){return u&&n(a.prototype,u),i&&n(a,i),a}})(),g=f(3),y=w(g);function w(n){return n&&n.__esModule?n:{default:n}}function e(n,a){if(!(n instanceof a))throw new TypeError("Cannot call a class as a function")}r.APNG=(function(){function n(){e(this,n),this.width=0,this.height=0,this.numPlays=0,this.playTime=0,this.frames=[]}return c(n,[{key:"createImages",value:function(){return Promise.all(this.frames.map(function(u){return u.createImage()}))}},{key:"getPlayer",value:function(u){var i=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.createImages().then(function(){return new y.default(i,u,s)})}}]),n})(),r.Frame=(function(){function n(){e(this,n),this.left=0,this.top=0,this.width=0,this.height=0,this.delay=0,this.disposeOp=0,this.blendOp=0,this.imageData=null,this.imageElement=null}return c(n,[{key:"createImage",value:function(){var u=this;return this.imageElement?Promise.resolve():new Promise(function(i,s){var b=URL.createObjectURL(u.imageData);u.imageElement=document.createElement("img"),u.imageElement.onload=function(){URL.revokeObjectURL(b),i()},u.imageElement.onerror=function(){URL.revokeObjectURL(b),u.imageElement=null,s(new Error("Image creation error"))},u.imageElement.src=b})}}]),n})()}),(function(t,r,f){Object.defineProperty(r,"__esModule",{value:!0});var c=(function(){function i(s,b){for(var v=0;v<b.length;v++){var P=b[v];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(s,P.key,P)}}return function(s,b,v){return b&&i(s.prototype,b),v&&i(s,v),s}})(),g=f(4),y=w(g);function w(i){return i&&i.__esModule?i:{default:i}}function e(i,s){if(!(i instanceof s))throw new TypeError("Cannot call a class as a function")}function n(i,s){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:i}function a(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(i,s):i.__proto__=s)}var u=(function(i){a(s,i);function s(b,v,P){e(this,s);var k=n(this,(s.__proto__||Object.getPrototypeOf(s)).call(this));return k.playbackRate=1,k._currentFrameNumber=0,k._ended=!1,k._paused=!0,k._numPlays=0,k._rafId=null,k._apng=b,k.context=v,k.stop(),P&&k.play(),k}return c(s,[{key:"renderNextFrame",value:function(){this._currentFrameNumber=(this._currentFrameNumber+1)%this._apng.frames.length,this._currentFrameNumber===this._apng.frames.length-1&&(this._numPlays++,this._apng.numPlays!==0&&this._numPlays>=this._apng.numPlays&&(this._ended=!0,this._paused=!0)),this._prevFrame&&this._prevFrame.disposeOp==1?this.context.clearRect(this._prevFrame.left,this._prevFrame.top,this._prevFrame.width,this._prevFrame.height):this._prevFrame&&this._prevFrame.disposeOp==2&&this.context.putImageData(this._prevFrameData,this._prevFrame.left,this._prevFrame.top);var v=this.currentFrame;this._prevFrame=v,this._prevFrameData=null,v.disposeOp==2&&(this._prevFrameData=this.context.getImageData(v.left,v.top,v.width,v.height)),v.blendOp==0&&this.context.clearRect(v.left,v.top,v.width,v.height),this.context.drawImage(v.imageElement,v.left,v.top),this.emit("frame",this._currentFrameNumber),this._ended&&this.emit("end")}},{key:"play",value:function(){var v=this;this._rafId&&cancelAnimationFrame(this._rafId),this.emit("play"),this._ended&&this.stop(),this._paused=!1;var P=performance.now()+this.currentFrame.delay/this.playbackRate,k=function T(h){if(!(v._ended||v._paused)){if(h>=P){for(;h-P>=v._apng.playTime/v.playbackRate;)P+=v._apng.playTime/v.playbackRate,v._numPlays++;do v.renderNextFrame(),P+=v.currentFrame.delay/v.playbackRate;while(!v._ended&&!v._paused&&h>P)}v._rafId=requestAnimationFrame(T)}};this._rafId=requestAnimationFrame(k)}},{key:"pause",value:function(){this._paused||(this._rafId&&(cancelAnimationFrame(this._rafId),this._rafId=null),this.emit("pause"),this._paused=!0)}},{key:"stop",value:function(){this._rafId&&(cancelAnimationFrame(this._rafId),this._rafId=null),this.emit("stop"),this._numPlays=0,this._ended=!1,this._paused=!0,this._currentFrameNumber=-1,this.context.clearRect(0,0,this._apng.width,this._apng.height),this.renderNextFrame()}},{key:"currentFrameNumber",get:function(){return this._currentFrameNumber}},{key:"currentFrame",get:function(){return this._apng.frames[this._currentFrameNumber]}},{key:"paused",get:function(){return this._paused}},{key:"ended",get:function(){return this._ended}}]),s})(y.default);r.default=u}),(function(t,r){function f(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}t.exports=f,f.EventEmitter=f,f.prototype._events=void 0,f.prototype._maxListeners=void 0,f.defaultMaxListeners=10,f.prototype.setMaxListeners=function(e){if(!g(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},f.prototype.emit=function(e){var n,a,u,i,s,b;if(this._events||(this._events={}),e==="error"&&(!this._events.error||y(this._events.error)&&!this._events.error.length)){if(n=arguments[1],n instanceof Error)throw n;var v=new Error('Uncaught, unspecified "error" event. ('+n+")");throw v.context=n,v}if(a=this._events[e],w(a))return!1;if(c(a))switch(arguments.length){case 1:a.call(this);break;case 2:a.call(this,arguments[1]);break;case 3:a.call(this,arguments[1],arguments[2]);break;default:i=Array.prototype.slice.call(arguments,1),a.apply(this,i)}else if(y(a))for(i=Array.prototype.slice.call(arguments,1),b=a.slice(),u=b.length,s=0;s<u;s++)b[s].apply(this,i);return!0},f.prototype.addListener=function(e,n){var a;if(!c(n))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,c(n.listener)?n.listener:n),this._events[e]?y(this._events[e])?this._events[e].push(n):this._events[e]=[this._events[e],n]:this._events[e]=n,y(this._events[e])&&!this._events[e].warned&&(w(this._maxListeners)?a=f.defaultMaxListeners:a=this._maxListeners,a&&a>0&&this._events[e].length>a&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),typeof console.trace=="function"&&console.trace())),this},f.prototype.on=f.prototype.addListener,f.prototype.once=function(e,n){if(!c(n))throw TypeError("listener must be a function");var a=!1;function u(){this.removeListener(e,u),a||(a=!0,n.apply(this,arguments))}return u.listener=n,this.on(e,u),this},f.prototype.removeListener=function(e,n){var a,u,i,s;if(!c(n))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=this._events[e],i=a.length,u=-1,a===n||c(a.listener)&&a.listener===n)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,n);else if(y(a)){for(s=i;s-- >0;)if(a[s]===n||a[s].listener&&a[s].listener===n){u=s;break}if(u<0)return this;a.length===1?(a.length=0,delete this._events[e]):a.splice(u,1),this._events.removeListener&&this.emit("removeListener",e,n)}return this},f.prototype.removeAllListeners=function(e){var n,a;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[e]&&delete this._events[e],this;if(arguments.length===0){for(n in this._events)n!=="removeListener"&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events={},this}if(a=this._events[e],c(a))this.removeListener(e,a);else if(a)for(;a.length;)this.removeListener(e,a[a.length-1]);return delete this._events[e],this},f.prototype.listeners=function(e){var n;return!this._events||!this._events[e]?n=[]:c(this._events[e])?n=[this._events[e]]:n=this._events[e].slice(),n},f.prototype.listenerCount=function(e){if(this._events){var n=this._events[e];if(c(n))return 1;if(n)return n.length}return 0},f.listenerCount=function(e,n){return e.listenerCount(n)};function c(e){return typeof e=="function"}function g(e){return typeof e=="number"}function y(e){return typeof e=="object"&&e!==null}function w(e){return e===void 0}})])})})(z)),z.exports}var oe=ue();const le=se(oe),B={url:{type:String,requierd:!1},data:{type:Array,default:()=>[]},loop:{type:Boolean,default:!1},status:{type:String,default:m.TickerStatus.pending},frameRate:{type:Number,default:25},label:{type:String,default:""},resize:{type:Function,default:void 0},prerender:{type:Boolean,default:!1},visible:{type:Boolean,default:!0}},$={"update:status":null,"update:data":null,setData:null},J=Symbol("appInjectKey");function ce(){const l=new I.Application,S=new j.Deferred,t={whenDef:S,when:()=>S.promise};return o.provide(J,{application:l,context:t}),{application:l,context:t}}function Y(){const l=o.inject(J);if(!l)throw new Error("Pixi app not provided");return l}function M(l){const S=l.autoResize??!0,t=l.resize??y,{application:r,context:f}=Y(),c=new I.Sprite;r.stage.addChild(c),o.watchEffect(()=>{c.visible=l.visible??!0}),o.watchEffect(()=>{l.label&&(c.label=l.label)}),S&&f.when().then(w=>{c.texture&&(g(),w.renderer.on("resize",g))});function g(){if(!r.renderer?.screen)return;const w=c.texture._meta;t({application:r,sprite:c,meta:w})}o.onBeforeUnmount(()=>{r.renderer.off("resize",g),r.stage.removeChild(c)});function y(){const w=r.screen.width/c.texture.width,e=r.screen.height/c.texture.height,n=Math.min(w,e);c.scale.set(n),c.x=(r.screen.width-c.width)/2,c.y=(r.screen.height-c.height)/2}return{sprite:c,resizeSprite:g,application:r}}const Q=o.defineComponent({__name:"apng",props:{...B,url:{type:String,required:!0}},emits:$,setup(l,{emit:S}){const t=l,r=S,f=o.useId(),c=p=>`${f}-apng-frame-${p}`,{sprite:g,resizeSprite:y}=M(t),w=o.ref([]),e=o.ref(0),n=o.ref(!1),a=o.ref(""),u=new Map;let i=null,s=null,b=null;o.onMounted(()=>P(t.url));function v(p,x){return s||(s=document.createElement("canvas"),b=s.getContext("2d",{willReadFrequently:!0})),(s.width!==p||s.height!==x)&&(s.width=p,s.height=x),{canvas:s,ctx:b}}async function P(p){try{a.value="",n.value=!1,await _();const x=await fetch(p);if(!x.ok)throw new Error(`加载APNG失败: ${x.status}`);const E=await x.arrayBuffer(),N=le(E);if(N instanceof Error)throw new TypeError(`APNG解析失败: ${N.message}`);const{canvas:F,ctx:O}=v(N.width,N.height),R=N.frames.map(async(V,G)=>{O.clearRect(0,0,F.width,F.height),await V.createImage();const L=V.imageElement;O.drawImage(L,V.left,V.top);const C=O.getImageData(0,0,F.width,F.height),A=c(G);u.set(A,void 0),O.putImageData(C,0,0);const U=F.toDataURL();I.Assets.add({alias:A,src:U});const D=await I.Assets.load(A);return u.set(A,D),G===0&&(g.texture=D,y()),A});w.value=await Promise.all(R),n.value=!0}catch(x){console.error("加载APNG失败:",x),a.value=x instanceof Error?x.message:"加载APNG失败",r("update:status",m.TickerStatus.stopped)}}function k(){i===null&&(i=window.setInterval(()=>{if(w.value.length===0||t.status!==m.TickerStatus.playing)return;const p=u.get(c(e.value));if(p){const x=e.value-1;x>=0&&!t.loop&&Promise.resolve().then(()=>j.sleep(500)).then(()=>{I.Assets.unload(c(x)),u.delete(c(x))}),g.texture=p,y(),e.value=t.loop?(e.value+1)%w.value.length:e.value+1}else t.loop||r("update:status",m.TickerStatus.paused)},1e3/t.frameRate))}function T(){!n.value||w.value.length<=1||(r("update:status",m.TickerStatus.playing),k())}function h(){i!==null&&(clearInterval(i),i=null),r("update:status",m.TickerStatus.paused)}function d(){i!==null&&(clearInterval(i),i=null),e.value=0;const p=u.get(c(0));p&&(g.texture=p,y()),r("update:status",m.TickerStatus.stopped)}async function _(){i!==null&&(clearInterval(i),i=null);const p=[];for(const[x,E]of u)E&&E!==I.Texture.EMPTY&&p.push(I.Assets.unload(x));await Promise.all(p),u.clear(),w.value=[],e.value=0,n.value=!1,a.value="",s&&(s.width=0,s.height=0)}return o.watchEffect(()=>{switch(t.status){case m.TickerStatus.play:T();break;case m.TickerStatus.pause:h();break;case m.TickerStatus.stop:d();break}}),o.onBeforeUnmount(async()=>{await _(),s=null,b=null}),(p,x)=>o.renderSlot(p.$slots,"default")}}),pe=o.defineComponent({__name:"bitmap-generator",props:{...W.pickObject(B,{excludes:["loop"]}),generator:{type:Object,required:!0}},emits:{"update:status":null,load:l=>l},setup(l,{emit:S}){const t=l,r=S,{sprite:f,resizeSprite:c,application:g}=M(t),y=new I.Texture({dynamic:!0});f.texture=y;function w(i){y.source.destroy();const s=new I.ImageSource({resource:i});y.source=s,y.update(),c()}r("load",{application:g,sprite:f}),o.watch(()=>t.status,i=>{i===m.TickerStatus.play&&n(),i===m.TickerStatus.pause&&a(),i===m.TickerStatus.stop&&u()},{immediate:!0});function e(){t.status===m.TickerStatus.playing&&t.generator.next().then(({value:i,done:s})=>{if(s)return r("update:status",m.TickerStatus.stopped);w(i)})}function n(){g.ticker.minFPS=t.frameRate,g.ticker.maxFPS=t.frameRate,r("update:status",m.TickerStatus.playing),g.ticker.add(e)}function a(){g.ticker.remove(e),r("update:status",m.TickerStatus.paused)}function u(){g.ticker.remove(e),r("update:status",m.TickerStatus.stopped)}return o.onBeforeUnmount(()=>{u(),y.destroy()}),(i,s)=>o.renderSlot(i.$slots,"default")}}),Z=o.defineComponent({__name:"bitmap",props:{...W.pickObject(B,{excludes:["loop"]}),data:{type:void 0,required:!0},frameIndex:{type:Number}},emits:{...$,load:l=>l,"update:frameIndex":null,notFound:l=>!0},setup(l,{emit:S}){const t=l,r=S,{sprite:f,resizeSprite:c,application:g}=M(t),y=new I.Texture({dynamic:!0});f.texture=y;function w(h){y.source?.resource?.close(),y.source?.destroy();const d=new I.ImageSource({resource:h});y.source=d,y.update(),c()}r("load",{application:g,sprite:f});const e=H.useModelComputed({default:0,key:"frameIndex"},t,r),n=o.ref(-1);function a(h){h<=n.value||(n.value=h,j.sleep(0).then(()=>{r("setData",{k:h,v:null})}))}let u=null,i=0,s=0,b=0;function v(){if(u!==null)return;i=performance.now(),b=i,s=0;function h(){const _=performance.now(),p=1e3/t.frameRate,x=_-i;if(x>=p){i=_-x%p,d(),s++;const E=_-b;if(E>=1e3){const N=Math.round(s*1e3/E);console.log(`[Bitmap] FPS: ${N}`),s=0,b=_}}t.status===m.TickerStatus.playing?u=requestAnimationFrame(h):u=null}function d(){if(t.data.length===0||t.status!==m.TickerStatus.playing)return;const _=t.data[e.value];if(_){const p=e.value-1;p>=0&&a(p),w(_),e.value=e.value+1}else console.warn(`Bitmap for index ${e.value} not found. Ensure the data is loaded.`),r("notFound",e.value)}u=requestAnimationFrame(h)}o.watchEffect(()=>{t.prerender&&e.value===0&&t.data.length>0&&t.data[0]&&w(t.data[0])}),o.watch(()=>t.status,h=>{h===m.TickerStatus.play&&P(),h===m.TickerStatus.pause&&k(),h===m.TickerStatus.stop&&T()},{immediate:!0});function P(){t.data.length>0?(r("update:status",m.TickerStatus.playing),v()):r("update:status",m.TickerStatus.stopped)}function k(){r("update:status",m.TickerStatus.paused)}function T(){r("update:status",m.TickerStatus.stopped),u!==null&&(cancelAnimationFrame(u),u=null),r("update:data",[]),e.value=0,n.value=-1}return o.onBeforeUnmount(()=>{T(),y.destroy()}),(h,d)=>o.renderSlot(h.$slots,"default")}}),fe=o.defineComponent({__name:"buffer-image",props:{...W.pickObject(B,{excludes:["loop"]}),data:{type:Array,required:!0},format:{type:String,default:"rgba8unorm"},frameIndex:{type:Number},height:{type:Number,required:!0},width:{type:Number,required:!0}},emits:{...$,load:l=>l,"update:frameIndex":null,notFound:l=>!0},setup(l,{emit:S}){const t=l,r=S,{sprite:f,resizeSprite:c,application:g}=M(t),y=new I.Texture({dynamic:!0});f.texture=y;function w(h){y.source?.destroy();const d=new I.BufferImageSource({resource:h,height:t.height,width:t.width,format:t.format});y.source=d,y.update(),c()}r("load",{application:g,sprite:f});const e=H.useModelComputed({default:0,key:"frameIndex"},t,r),n=o.ref(-1);function a(h){h<=n.value||(n.value=h,j.sleep(0).then(()=>{r("setData",{k:h,v:null})}))}let u=null,i=0,s=0,b=0;function v(){if(u!==null)return;i=performance.now(),b=i,s=0;function h(){const _=performance.now(),p=1e3/t.frameRate,x=_-i;if(x>=p){i=_-x%p,d(),s++;const E=_-b;if(E>=1e3){const N=Math.round(s*1e3/E);console.log(`[Bitmap] FPS: ${N}`),s=0,b=_}}t.status===m.TickerStatus.playing?u=requestAnimationFrame(h):u=null}function d(){if(t.data.length===0||t.status!==m.TickerStatus.playing)return;const _=t.data[e.value];if(_){const p=e.value-1;p>=0&&a(p),w(_),e.value=e.value+1}else console.warn(`Bitmap for index ${e.value} not found. Ensure the data is loaded.`),r("notFound",e.value)}u=requestAnimationFrame(h)}o.watchEffect(()=>{t.prerender&&e.value===0&&t.data.length>0&&t.data[0]&&w(t.data[0])}),o.watch(()=>t.status,h=>{h===m.TickerStatus.play&&P(),h===m.TickerStatus.pause&&k(),h===m.TickerStatus.stop&&T()},{immediate:!0});function P(){t.data.length>0?(r("update:status",m.TickerStatus.playing),v()):r("update:status",m.TickerStatus.stopped)}function k(){r("update:status",m.TickerStatus.paused)}function T(){r("update:status",m.TickerStatus.stopped),u!==null&&(cancelAnimationFrame(u),u=null),r("update:data",[]),e.value=0,n.value=-1}return o.onBeforeUnmount(()=>{T(),y.destroy()}),(h,d)=>o.renderSlot(h.$slots,"default")}}),de=o.defineComponent({__name:"core",props:{...B,data:{type:void 0,required:!0},frameIndex:{type:Number}},emits:{...$,load:l=>l,"update:frameIndex":null,notFound:l=>!0},setup(l,{emit:S}){const t=l,r=S,f=o.useId(),c=T=>`${f}-${T}`,{sprite:g,resizeSprite:y,application:w}=M(t),e=new Map,n=o.ref(0),a=o.computed(()=>t.data.slice(n.value));o.watchEffect(()=>{for(const T in a.value){const h=+T+n.value,d=`${f}-${h}`,_=typeof a.value[T]=="string"?a.value[T]:a.value[T]?.src;_&&(e.has(d)||(I.Assets.add({alias:d,src:_,loadParser:"loadTextures"}),e.set(d,void 0),I.Assets.load(d).then(p=>{p._meta=a.value[T],e.set(d,p),t.prerender&&h===0&&(g.texture=p,y())})))}}),r("load",{application:w,sprite:g});const u=H.useModelComputed({default:0,key:"frameIndex"},t,r);let i=null,s=0;function b(){if(i!==null)return;s=performance.now();function T(){const d=performance.now(),_=1e3/t.frameRate,p=d-s;p>=_&&(s=d-p%_,h()),t.status===m.TickerStatus.playing?i=requestAnimationFrame(T):i=null}function h(){if(t.data.length===0||t.status!==m.TickerStatus.playing)return;const d=e.get(c(u.value));if(d){const _=g.texture,p=u.value-1;_&&p>=0&&!t.loop&&Promise.resolve(j.sleep(500)).then(()=>I.Assets.unload(c(p))).then(()=>{e.set(c(p),void 0),r("setData",{k:p,v:""}),n.value=p}),g.texture=d,y(),u.value=t.loop?(u.value+1)%t.data.length:u.value+1}else console.warn(`Texture for index ${u.value} not found. Ensure the texture is loaded.`),r("notFound",u.value),t.loop||r("update:status",m.TickerStatus.paused)}i=requestAnimationFrame(T)}o.watch(()=>t.status,T=>{T===m.TickerStatus.play&&v(),T===m.TickerStatus.pause&&P(),T===m.TickerStatus.stop&&k()},{immediate:!0});function v(){t.data.length>0?(r("update:status",m.TickerStatus.playing),b()):r("update:status",m.TickerStatus.stopped)}function P(){r("update:status",m.TickerStatus.paused)}function k(){r("update:status",m.TickerStatus.stopped),i!==null&&(cancelAnimationFrame(i),i=null),r("update:data",[]),e.clear(),u.value=0}return o.onBeforeUnmount(()=>{Array.from(e.entries()).forEach(([h,d])=>{d&&I.Assets.unload(h)}),k()}),(T,h)=>o.renderSlot(T.$slots,"default")}}),ee=o.defineComponent({__name:"provider",setup(l){return ce(),(S,t)=>o.renderSlot(S.$slots,"default")}}),te=o.defineComponent({__name:"video",props:{...B,url:{type:String,required:!0}},emits:$,setup(l,{emit:S}){const t=l,r=S,f=o.useId(),c=()=>`${f}-video`,{sprite:g,resizeSprite:y}=M(t),w=o.ref(),e=o.computed(()=>{if(w.value?.source&&w.value.source.resource){const k=w.value.source.resource;if(k instanceof HTMLVideoElement)return k}return null}),n=H.useDeferred(),a=o.ref("");n.promise.then(()=>{t.status===m.TickerStatus.play&&b()}),o.watchEffect(()=>{e.value&&(e.value.loop=t.loop)}),o.onMounted(()=>u(t.url));async function u(k){try{a.value="";const T=c();I.Assets.cache.has(T)&&await I.Assets.unload(T),I.Assets.add({alias:T,src:k});const h=await I.Assets.load(T);return w.value=h,g.texture=h,e.value&&(e.value.loop=t.loop,e.value.muted=!0,e.value.crossOrigin="anonymous",i(e.value),n.resolve()),y(),h}catch(T){return console.error("加载视频纹理失败:",T),a.value="视频加载失败",null}}function i(k){k.addEventListener("play",()=>{t.status!==m.TickerStatus.playing&&r("update:status",m.TickerStatus.playing)}),k.addEventListener("pause",()=>{t.status!==m.TickerStatus.paused&&r("update:status",m.TickerStatus.paused)}),k.addEventListener("ended",()=>{t.loop?(k.currentTime=0,k.play()):r("update:status",m.TickerStatus.stopped)}),k.addEventListener("error",T=>{const h=k.error;let d="视频播放失败";if(h)switch(h.code){case h.MEDIA_ERR_ABORTED:d="视频播放被中止";break;case h.MEDIA_ERR_NETWORK:d="网络错误导致视频播放失败";break;case h.MEDIA_ERR_DECODE:d="视频解码失败";break;case h.MEDIA_ERR_SRC_NOT_SUPPORTED:d="不支持的视频格式";break}console.error("视频播放错误:",d,T),a.value=d,r("update:status",m.TickerStatus.stopped)})}async function s(){if(w.value){const k=c();w.value.destroy(!0),w.value=void 0,I.Assets.cache.has(k)&&await I.Assets.unload(k)}a.value=""}o.watchEffect(()=>{t.status===m.TickerStatus.play&&b(),t.status===m.TickerStatus.pause&&v(),t.status===m.TickerStatus.stop&&P()}),o.onBeforeUnmount(()=>{s()});function b(){e.value&&e.value.play().catch(k=>{console.error("视频播放失败:",k),a.value="视频播放失败"})}function v(){e.value?.pause()}function P(){e.value&&(e.value.pause(),e.value.currentTime=0),r("update:status",m.TickerStatus.stopped)}return(k,T)=>o.renderSlot(k.$slots,"default")}}),re=o.defineComponent({__name:"view",props:{defaultOptions:{type:Object,default:()=>({})}},setup(l){const S=l,{application:t,context:r}=Y(),f=o.ref();return o.onMounted(async()=>{await t.init({resizeTo:f.value,...S.defaultOptions}),r.whenDef.resolve(t),f.value.appendChild(t.canvas)}),(c,g)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"appRef",ref:f,class:"vk-pixi-frame"},null,512))}}),me=o.defineComponent({name:"VkPixiFrame",components:{ApngComp:Q,ProviderComp:ee,ViewComp:re,VideoComp:te,Bitmap:Z},props:B,emits:$,setup(l){const S=o.computed(()=>{if(!l.url)return!1;const r=l.url.toLowerCase();return r.includes(".png")&&!r.includes(".mp4")&&!r.includes(".webm")}),t=o.computed(()=>{if(!l.url)return!1;const r=l.url.toLowerCase();return r.includes(".mp4")||r.includes(".webm")||r.includes(".mov")});return{isApng:S,isVideo:t}}});function he(l,S,t,r,f,c){const g=o.resolveComponent("ViewComp"),y=o.resolveComponent("ApngComp"),w=o.resolveComponent("VideoComp"),e=o.resolveComponent("Bitmap"),n=o.resolveComponent("ProviderComp");return o.openBlock(),o.createBlock(n,null,{default:o.withCtx(()=>[o.createVNode(g),l.isApng&&l.url?(o.openBlock(),o.createBlock(y,{key:0,url:l.url,loop:l.loop,status:l.status,"onUpdate:status":S[0]||(S[0]=a=>l.$emit("update:status",a))},null,8,["url","loop","status"])):l.isVideo&&l.url?(o.openBlock(),o.createBlock(w,{key:1,url:l.url,loop:l.loop,status:l.status,"onUpdate:status":S[1]||(S[1]=a=>l.$emit("update:status",a))},null,8,["url","loop","status"])):(o.openBlock(),o.createBlock(e,{key:2,data:l.data,loop:l.loop,status:l.status,onSetData:S[2]||(S[2]=a=>l.$emit("setData",a)),"onUpdate:status":S[3]||(S[3]=a=>l.$emit("update:status",a))},null,8,["data","loop","status"]))]),_:1})}const q=ae._export_sfc(me,[["render",he]]),ve=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));q.install=l=>{l.component(q.name||"VkPixiFrame",q)};Object.defineProperty(exports,"TickerStatus",{enumerable:!0,get:()=>m.TickerStatus});exports.VkPixiFrame=q;exports.VkPixiFrameApng=Q;exports.VkPixiFrameBitmap=Z;exports.VkPixiFrameBitmapGenerator=pe;exports.VkPixiFrameBufferImage=fe;exports.VkPixiFrameCore=de;exports.VkPixiFrameProvider=ee;exports.VkPixiFrameVideo=te;exports.VkPixiFrameView=re;exports.__VkPixiFrame=ve;exports.default=q;exports.usePixiApp=Y;exports.useSprite=M;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),m=require("@vunk/shared/enum"),j=require("@vunk/shared/promise"),I=require("pixi.js"),W=require("@vunk/shared/object"),H=require("@vunk/core/composables"),ae=require("../_plugin-vue_export-helper-BHFhmbuH.js");function se(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var z={exports:{}},ie=z.exports,X;function ue(){return X||(X=1,(function(l,S){(function(r,f){l.exports=f()})(ie,function(){return(function(t){var r={};function f(c){if(r[c])return r[c].exports;var g=r[c]={exports:{},id:c,loaded:!1};return t[c].call(g.exports,g,g.exports,f),g.loaded=!0,g.exports}return f.m=t,f.c=r,f.p="",f(0)})([(function(t,r,f){Object.defineProperty(r,"__esModule",{value:!0}),r.isNotPNG=a,r.isNotAPNG=u,r.default=s;var c=f(1),g=w(c),y=f(2);function w(d){return d&&d.__esModule?d:{default:d}}var e=new Error("Not a PNG"),n=new Error("Not an animated PNG");function a(d){return d===e}function u(d){return d===n}var i=new Uint8Array([137,80,78,71,13,10,26,10]);function s(d){var _=new Uint8Array(d);if(Array.prototype.some.call(i,function(L,C){return L!==_[C]}))return e;var p=!1;if(b(_,function(L){return!(p=L==="acTL")}),!p)return n;var x=[],E=[],N=null,F=null,O=0,R=new y.APNG;if(b(_,function(L,C,A,U){var D=new DataView(C.buffer);switch(L){case"IHDR":N=C.subarray(A+8,A+8+U),R.width=D.getUint32(A+8),R.height=D.getUint32(A+12);break;case"acTL":R.numPlays=D.getUint32(A+8+4);break;case"fcTL":F&&(R.frames.push(F),O++),F=new y.Frame,F.width=D.getUint32(A+8+4),F.height=D.getUint32(A+8+8),F.left=D.getUint32(A+8+12),F.top=D.getUint32(A+8+16);var ne=D.getUint16(A+8+20),K=D.getUint16(A+8+22);K===0&&(K=100),F.delay=1e3*ne/K,F.delay<=10&&(F.delay=100),R.playTime+=F.delay,F.disposeOp=D.getUint8(A+8+24),F.blendOp=D.getUint8(A+8+25),F.dataParts=[],O===0&&F.disposeOp===2&&(F.disposeOp=1);break;case"fdAT":F&&F.dataParts.push(C.subarray(A+8+4,A+8+U));break;case"IDAT":F&&F.dataParts.push(C.subarray(A+8,A+8+U));break;case"IEND":E.push(k(C,A,12+U));break;default:x.push(k(C,A,12+U))}}),F&&R.frames.push(F),R.frames.length==0)return n;var M=new Blob(x),G=new Blob(E);return R.frames.forEach(function(L){var C=[];C.push(i),N.set(h(L.width),0),N.set(h(L.height),4),C.push(T("IHDR",N)),C.push(M),L.dataParts.forEach(function(A){return C.push(T("IDAT",A))}),C.push(G),L.imageData=new Blob(C,{type:"image/png"}),delete L.dataParts,C=null}),R}function b(d,_){var p=new DataView(d.buffer),x=8,E=void 0,N=void 0,F=void 0;do N=p.getUint32(x),E=v(d,x+4,4),F=_(E,d,x,N),x+=12+N;while(F!==!1&&E!="IEND"&&x<d.length)}function v(d,_,p){var x=Array.prototype.slice.call(d.subarray(_,_+p));return String.fromCharCode.apply(String,x)}function P(d){for(var _=new Uint8Array(d.length),p=0;p<d.length;p++)_[p]=d.charCodeAt(p);return _}function k(d,_,p){var x=new Uint8Array(p);return x.set(d.subarray(_,_+p)),x}var T=function(_,p){var x=_.length+p.length,E=new Uint8Array(x+8),N=new DataView(E.buffer);N.setUint32(0,p.length),E.set(P(_),4),E.set(p,8);var F=(0,g.default)(E,4,x);return N.setUint32(x+4,F),E},h=function(_){return new Uint8Array([_>>>24&255,_>>>16&255,_>>>8&255,_&255])}}),(function(t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(w){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:w.length-e,a=-1,u=e,i=e+n;u<i;u++)a=a>>>8^f[(a^w[u])&255];return a^-1};for(var f=new Uint32Array(256),c=0;c<256;c++){for(var g=c,y=0;y<8;y++)g=(g&1)!==0?3988292384^g>>>1:g>>>1;f[c]=g}}),(function(t,r,f){Object.defineProperty(r,"__esModule",{value:!0}),r.Frame=r.APNG=void 0;var c=(function(){function n(a,u){for(var i=0;i<u.length;i++){var s=u[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(a,s.key,s)}}return function(a,u,i){return u&&n(a.prototype,u),i&&n(a,i),a}})(),g=f(3),y=w(g);function w(n){return n&&n.__esModule?n:{default:n}}function e(n,a){if(!(n instanceof a))throw new TypeError("Cannot call a class as a function")}r.APNG=(function(){function n(){e(this,n),this.width=0,this.height=0,this.numPlays=0,this.playTime=0,this.frames=[]}return c(n,[{key:"createImages",value:function(){return Promise.all(this.frames.map(function(u){return u.createImage()}))}},{key:"getPlayer",value:function(u){var i=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.createImages().then(function(){return new y.default(i,u,s)})}}]),n})(),r.Frame=(function(){function n(){e(this,n),this.left=0,this.top=0,this.width=0,this.height=0,this.delay=0,this.disposeOp=0,this.blendOp=0,this.imageData=null,this.imageElement=null}return c(n,[{key:"createImage",value:function(){var u=this;return this.imageElement?Promise.resolve():new Promise(function(i,s){var b=URL.createObjectURL(u.imageData);u.imageElement=document.createElement("img"),u.imageElement.onload=function(){URL.revokeObjectURL(b),i()},u.imageElement.onerror=function(){URL.revokeObjectURL(b),u.imageElement=null,s(new Error("Image creation error"))},u.imageElement.src=b})}}]),n})()}),(function(t,r,f){Object.defineProperty(r,"__esModule",{value:!0});var c=(function(){function i(s,b){for(var v=0;v<b.length;v++){var P=b[v];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(s,P.key,P)}}return function(s,b,v){return b&&i(s.prototype,b),v&&i(s,v),s}})(),g=f(4),y=w(g);function w(i){return i&&i.__esModule?i:{default:i}}function e(i,s){if(!(i instanceof s))throw new TypeError("Cannot call a class as a function")}function n(i,s){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:i}function a(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(i,s):i.__proto__=s)}var u=(function(i){a(s,i);function s(b,v,P){e(this,s);var k=n(this,(s.__proto__||Object.getPrototypeOf(s)).call(this));return k.playbackRate=1,k._currentFrameNumber=0,k._ended=!1,k._paused=!0,k._numPlays=0,k._rafId=null,k._apng=b,k.context=v,k.stop(),P&&k.play(),k}return c(s,[{key:"renderNextFrame",value:function(){this._currentFrameNumber=(this._currentFrameNumber+1)%this._apng.frames.length,this._currentFrameNumber===this._apng.frames.length-1&&(this._numPlays++,this._apng.numPlays!==0&&this._numPlays>=this._apng.numPlays&&(this._ended=!0,this._paused=!0)),this._prevFrame&&this._prevFrame.disposeOp==1?this.context.clearRect(this._prevFrame.left,this._prevFrame.top,this._prevFrame.width,this._prevFrame.height):this._prevFrame&&this._prevFrame.disposeOp==2&&this.context.putImageData(this._prevFrameData,this._prevFrame.left,this._prevFrame.top);var v=this.currentFrame;this._prevFrame=v,this._prevFrameData=null,v.disposeOp==2&&(this._prevFrameData=this.context.getImageData(v.left,v.top,v.width,v.height)),v.blendOp==0&&this.context.clearRect(v.left,v.top,v.width,v.height),this.context.drawImage(v.imageElement,v.left,v.top),this.emit("frame",this._currentFrameNumber),this._ended&&this.emit("end")}},{key:"play",value:function(){var v=this;this._rafId&&cancelAnimationFrame(this._rafId),this.emit("play"),this._ended&&this.stop(),this._paused=!1;var P=performance.now()+this.currentFrame.delay/this.playbackRate,k=function T(h){if(!(v._ended||v._paused)){if(h>=P){for(;h-P>=v._apng.playTime/v.playbackRate;)P+=v._apng.playTime/v.playbackRate,v._numPlays++;do v.renderNextFrame(),P+=v.currentFrame.delay/v.playbackRate;while(!v._ended&&!v._paused&&h>P)}v._rafId=requestAnimationFrame(T)}};this._rafId=requestAnimationFrame(k)}},{key:"pause",value:function(){this._paused||(this._rafId&&(cancelAnimationFrame(this._rafId),this._rafId=null),this.emit("pause"),this._paused=!0)}},{key:"stop",value:function(){this._rafId&&(cancelAnimationFrame(this._rafId),this._rafId=null),this.emit("stop"),this._numPlays=0,this._ended=!1,this._paused=!0,this._currentFrameNumber=-1,this.context.clearRect(0,0,this._apng.width,this._apng.height),this.renderNextFrame()}},{key:"currentFrameNumber",get:function(){return this._currentFrameNumber}},{key:"currentFrame",get:function(){return this._apng.frames[this._currentFrameNumber]}},{key:"paused",get:function(){return this._paused}},{key:"ended",get:function(){return this._ended}}]),s})(y.default);r.default=u}),(function(t,r){function f(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}t.exports=f,f.EventEmitter=f,f.prototype._events=void 0,f.prototype._maxListeners=void 0,f.defaultMaxListeners=10,f.prototype.setMaxListeners=function(e){if(!g(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},f.prototype.emit=function(e){var n,a,u,i,s,b;if(this._events||(this._events={}),e==="error"&&(!this._events.error||y(this._events.error)&&!this._events.error.length)){if(n=arguments[1],n instanceof Error)throw n;var v=new Error('Uncaught, unspecified "error" event. ('+n+")");throw v.context=n,v}if(a=this._events[e],w(a))return!1;if(c(a))switch(arguments.length){case 1:a.call(this);break;case 2:a.call(this,arguments[1]);break;case 3:a.call(this,arguments[1],arguments[2]);break;default:i=Array.prototype.slice.call(arguments,1),a.apply(this,i)}else if(y(a))for(i=Array.prototype.slice.call(arguments,1),b=a.slice(),u=b.length,s=0;s<u;s++)b[s].apply(this,i);return!0},f.prototype.addListener=function(e,n){var a;if(!c(n))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,c(n.listener)?n.listener:n),this._events[e]?y(this._events[e])?this._events[e].push(n):this._events[e]=[this._events[e],n]:this._events[e]=n,y(this._events[e])&&!this._events[e].warned&&(w(this._maxListeners)?a=f.defaultMaxListeners:a=this._maxListeners,a&&a>0&&this._events[e].length>a&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),typeof console.trace=="function"&&console.trace())),this},f.prototype.on=f.prototype.addListener,f.prototype.once=function(e,n){if(!c(n))throw TypeError("listener must be a function");var a=!1;function u(){this.removeListener(e,u),a||(a=!0,n.apply(this,arguments))}return u.listener=n,this.on(e,u),this},f.prototype.removeListener=function(e,n){var a,u,i,s;if(!c(n))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=this._events[e],i=a.length,u=-1,a===n||c(a.listener)&&a.listener===n)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,n);else if(y(a)){for(s=i;s-- >0;)if(a[s]===n||a[s].listener&&a[s].listener===n){u=s;break}if(u<0)return this;a.length===1?(a.length=0,delete this._events[e]):a.splice(u,1),this._events.removeListener&&this.emit("removeListener",e,n)}return this},f.prototype.removeAllListeners=function(e){var n,a;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[e]&&delete this._events[e],this;if(arguments.length===0){for(n in this._events)n!=="removeListener"&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events={},this}if(a=this._events[e],c(a))this.removeListener(e,a);else if(a)for(;a.length;)this.removeListener(e,a[a.length-1]);return delete this._events[e],this},f.prototype.listeners=function(e){var n;return!this._events||!this._events[e]?n=[]:c(this._events[e])?n=[this._events[e]]:n=this._events[e].slice(),n},f.prototype.listenerCount=function(e){if(this._events){var n=this._events[e];if(c(n))return 1;if(n)return n.length}return 0},f.listenerCount=function(e,n){return e.listenerCount(n)};function c(e){return typeof e=="function"}function g(e){return typeof e=="number"}function y(e){return typeof e=="object"&&e!==null}function w(e){return e===void 0}})])})})(z)),z.exports}var oe=ue();const le=se(oe),B={url:{type:String,requierd:!1},data:{type:Array,default:()=>[]},loop:{type:Boolean,default:!1},status:{type:String,default:m.TickerStatus.pending},frameRate:{type:Number,default:25},label:{type:String,default:""},resize:{type:Function,default:void 0},prerender:{type:Boolean,default:!1},visible:{type:Boolean,default:!0}},V={"update:status":null,"update:data":null,setData:null},J=Symbol("appInjectKey");function ce(){const l=new I.Application,S=new j.Deferred,t={whenDef:S,when:()=>S.promise};return o.provide(J,{application:l,context:t}),{application:l,context:t}}function Y(){const l=o.inject(J);if(!l)throw new Error("Pixi app not provided");return l}function $(l){const S=l.autoResize??!0,t=l.resize??y,{application:r,context:f}=Y(),c=new I.Sprite;r.stage.addChild(c),o.watchEffect(()=>{c.visible=l.visible??!0}),o.watchEffect(()=>{l.label&&(c.label=l.label)}),S&&f.when().then(w=>{c.texture&&(g(),w.renderer.on("resize",g))});function g(){if(!r.renderer?.screen)return;const w=c.texture._meta;t({application:r,sprite:c,meta:w})}o.onBeforeUnmount(()=>{r.renderer.off("resize",g),r.stage.removeChild(c)});function y(){const w=r.screen.width/c.texture.width,e=r.screen.height/c.texture.height,n=Math.min(w,e);c.scale.set(n),c.x=(r.screen.width-c.width)/2,c.y=(r.screen.height-c.height)/2}return{sprite:c,resizeSprite:g,application:r}}const Q=o.defineComponent({__name:"apng",props:{...B,url:{type:String,required:!0}},emits:V,setup(l,{emit:S}){const t=l,r=S,f=o.useId(),c=p=>`${f}-apng-frame-${p}`,{sprite:g,resizeSprite:y}=$(t),w=o.ref([]),e=o.ref(0),n=o.ref(!1),a=o.ref(""),u=new Map;let i=null,s=null,b=null;o.onMounted(()=>P(t.url));function v(p,x){return s||(s=document.createElement("canvas"),b=s.getContext("2d",{willReadFrequently:!0})),(s.width!==p||s.height!==x)&&(s.width=p,s.height=x),{canvas:s,ctx:b}}async function P(p){try{a.value="",n.value=!1,await _();const x=await fetch(p);if(!x.ok)throw new Error(`加载APNG失败: ${x.status}`);const E=await x.arrayBuffer(),N=le(E);if(N instanceof Error)throw new TypeError(`APNG解析失败: ${N.message}`);const{canvas:F,ctx:O}=v(N.width,N.height),R=N.frames.map(async(M,G)=>{O.clearRect(0,0,F.width,F.height),await M.createImage();const L=M.imageElement;O.drawImage(L,M.left,M.top);const C=O.getImageData(0,0,F.width,F.height),A=c(G);u.set(A,void 0),O.putImageData(C,0,0);const U=F.toDataURL();I.Assets.add({alias:A,src:U});const D=await I.Assets.load(A);return u.set(A,D),G===0&&(g.texture=D,y()),A});w.value=await Promise.all(R),n.value=!0}catch(x){console.error("加载APNG失败:",x),a.value=x instanceof Error?x.message:"加载APNG失败",r("update:status",m.TickerStatus.stopped)}}function k(){i===null&&(i=window.setInterval(()=>{if(w.value.length===0||t.status!==m.TickerStatus.playing)return;const p=u.get(c(e.value));if(p){const x=e.value-1;x>=0&&!t.loop&&Promise.resolve().then(()=>j.sleep(500)).then(()=>{I.Assets.unload(c(x)),u.delete(c(x))}),g.texture=p,y(),e.value=t.loop?(e.value+1)%w.value.length:e.value+1}else t.loop||r("update:status",m.TickerStatus.paused)},1e3/t.frameRate))}function T(){!n.value||w.value.length<=1||(r("update:status",m.TickerStatus.playing),k())}function h(){i!==null&&(clearInterval(i),i=null),r("update:status",m.TickerStatus.paused)}function d(){i!==null&&(clearInterval(i),i=null),e.value=0;const p=u.get(c(0));p&&(g.texture=p,y()),r("update:status",m.TickerStatus.stopped)}async function _(){i!==null&&(clearInterval(i),i=null);const p=[];for(const[x,E]of u)E&&E!==I.Texture.EMPTY&&p.push(I.Assets.unload(x));await Promise.all(p),u.clear(),w.value=[],e.value=0,n.value=!1,a.value="",s&&(s.width=0,s.height=0)}return o.watchEffect(()=>{switch(t.status){case m.TickerStatus.play:T();break;case m.TickerStatus.pause:h();break;case m.TickerStatus.stop:d();break}}),o.onBeforeUnmount(async()=>{await _(),s=null,b=null}),(p,x)=>o.renderSlot(p.$slots,"default")}}),pe=o.defineComponent({__name:"bitmap-generator",props:{...W.pickObject(B,{excludes:["loop"]}),generator:{type:Object,required:!0}},emits:{"update:status":null,load:l=>l},setup(l,{emit:S}){const t=l,r=S,{sprite:f,resizeSprite:c,application:g}=$(t),y=new I.Texture({dynamic:!0});f.texture=y;function w(i){y.source.destroy();const s=new I.ImageSource({resource:i});y.source=s,y.update(),c()}r("load",{application:g,sprite:f}),o.watch(()=>t.status,i=>{i===m.TickerStatus.play&&n(),i===m.TickerStatus.pause&&a(),i===m.TickerStatus.stop&&u()},{immediate:!0});function e(){t.status===m.TickerStatus.playing&&t.generator.next().then(({value:i,done:s})=>{if(s)return r("update:status",m.TickerStatus.stopped);w(i)})}function n(){g.ticker.minFPS=t.frameRate,g.ticker.maxFPS=t.frameRate,r("update:status",m.TickerStatus.playing),g.ticker.add(e)}function a(){g.ticker.remove(e),r("update:status",m.TickerStatus.paused)}function u(){g.ticker.remove(e),r("update:status",m.TickerStatus.stopped)}return o.onBeforeUnmount(()=>{u(),y.destroy()}),(i,s)=>o.renderSlot(i.$slots,"default")}}),Z=o.defineComponent({__name:"bitmap",props:{...W.pickObject(B,{excludes:["loop"]}),data:{type:void 0,required:!0},frameIndex:{type:Number}},emits:{...V,load:l=>l,"update:frameIndex":null,notFound:l=>!0},setup(l,{emit:S}){const t=l,r=S,{sprite:f,resizeSprite:c,application:g}=$(t),y=new I.Texture({dynamic:!0});f.texture=y;function w(h){y.source?.resource?.close(),y.source?.destroy();const d=new I.ImageSource({resource:h});y.source=d,y.update(),c()}r("load",{application:g,sprite:f});const e=H.useModelComputed({default:0,key:"frameIndex"},t,r),n=o.ref(-1);function a(h){h<=n.value||(n.value=h,j.sleep(0).then(()=>{r("setData",{k:h,v:null})}))}let u=null,i=0,s=0,b=0;function v(){if(u!==null)return;i=performance.now(),b=i,s=0;function h(){const _=performance.now(),p=1e3/t.frameRate,x=_-i;if(x>=p){i=_-x%p,d(),s++;const E=_-b;if(E>=1e3){const N=Math.round(s*1e3/E);console.log(`[Bitmap] FPS: ${N}`),s=0,b=_}}t.status===m.TickerStatus.playing?u=requestAnimationFrame(h):u=null}function d(){if(t.data.length===0||t.status!==m.TickerStatus.playing)return;const _=t.data[e.value];if(_){const p=e.value-1;p>=0&&a(p),w(_),e.value=e.value+1}else console.warn(`Bitmap for index ${e.value} not found. Ensure the data is loaded.`),r("notFound",e.value)}u=requestAnimationFrame(h)}o.watchEffect(()=>{t.prerender&&e.value===0&&t.data.length>0&&t.data[0]&&w(t.data[0])}),o.watch(()=>t.status,h=>{h===m.TickerStatus.play&&P(),h===m.TickerStatus.pause&&k(),h===m.TickerStatus.stop&&T()},{immediate:!0});function P(){t.data.length>0?(r("update:status",m.TickerStatus.playing),v()):r("update:status",m.TickerStatus.stopped)}function k(){r("update:status",m.TickerStatus.paused)}function T(){r("update:status",m.TickerStatus.stopped),u!==null&&(cancelAnimationFrame(u),u=null),r("update:data",[]),e.value=0,n.value=-1}return o.onBeforeUnmount(()=>{T(),y.destroy()}),(h,d)=>o.renderSlot(h.$slots,"default")}}),fe=o.defineComponent({__name:"buffer-image",props:{...W.pickObject(B,{excludes:["loop"]}),data:{type:Array,required:!0},format:{type:String,default:"rgba8unorm"},frameIndex:{type:Number},height:{type:Number,required:!0},width:{type:Number,required:!0}},emits:{...V,load:l=>l,"update:frameIndex":null,notFound:l=>!0},setup(l,{emit:S}){const t=l,r=S,{sprite:f,resizeSprite:c,application:g}=$(t),y=new I.Texture({dynamic:!0});f.texture=y;function w(h){y.source?.destroy();const d=new I.BufferImageSource({resource:h,height:t.height,width:t.width,format:t.format});y.source=d,y.update(),c()}r("load",{application:g,sprite:f});const e=H.useModelComputed({default:0,key:"frameIndex"},t,r),n=o.ref(-1);function a(h){h<=n.value||(n.value=h,j.sleep(0).then(()=>{r("setData",{k:h,v:null})}))}let u=null,i=0,s=0,b=0;function v(){if(u!==null)return;i=performance.now(),b=i,s=0;function h(){const _=performance.now(),p=1e3/t.frameRate,x=_-i;if(x>=p){i=_-x%p,d(),s++;const E=_-b;if(E>=1e3){const N=Math.round(s*1e3/E);console.log(`[Bitmap] FPS: ${N}`),s=0,b=_}}t.status===m.TickerStatus.playing?u=requestAnimationFrame(h):u=null}function d(){if(t.data.length===0||t.status!==m.TickerStatus.playing)return;const _=t.data[e.value];if(_){const p=e.value-1;p>=0&&a(p),w(_),e.value=e.value+1}else console.warn(`Bitmap for index ${e.value} not found. Ensure the data is loaded.`),r("notFound",e.value)}u=requestAnimationFrame(h)}o.watchEffect(()=>{t.prerender&&e.value===0&&t.data.length>0&&t.data[0]&&w(t.data[0])}),o.watch(()=>t.status,h=>{h===m.TickerStatus.play&&P(),h===m.TickerStatus.pause&&k(),h===m.TickerStatus.stop&&T()},{immediate:!0});function P(){t.data.length>0?(r("update:status",m.TickerStatus.playing),v()):r("update:status",m.TickerStatus.stopped)}function k(){r("update:status",m.TickerStatus.paused)}function T(){r("update:status",m.TickerStatus.stopped),u!==null&&(cancelAnimationFrame(u),u=null),r("update:data",[]),e.value=0,n.value=-1}return o.onBeforeUnmount(()=>{T(),y.destroy()}),(h,d)=>o.renderSlot(h.$slots,"default")}}),de=o.defineComponent({__name:"core",props:{...B,data:{type:void 0,required:!0},frameIndex:{type:Number}},emits:{...V,load:l=>l,"update:frameIndex":null,notFound:l=>!0},setup(l,{emit:S}){const t=l,r=S,f=o.useId(),c=T=>`${f}-${T}`,{sprite:g,resizeSprite:y,application:w}=$(t),e=new Map,n=o.ref(0),a=o.computed(()=>t.data.slice(n.value));o.watchEffect(()=>{for(const T in a.value){const h=+T+n.value,d=`${f}-${h}`,_=typeof a.value[T]=="string"?a.value[T]:a.value[T]?.src;_&&(e.has(d)||(I.Assets.add({alias:d,src:_,loadParser:"loadTextures"}),e.set(d,void 0),I.Assets.load(d).then(p=>{p._meta=a.value[T],e.set(d,p),t.prerender&&h===0&&(g.texture=p,y())})))}}),r("load",{application:w,sprite:g});const u=H.useModelComputed({default:0,key:"frameIndex"},t,r);let i=null,s=0;function b(){if(i!==null)return;s=performance.now();function T(){const d=performance.now(),_=1e3/t.frameRate,p=d-s;p>=_&&(s=d-p%_,h()),t.status===m.TickerStatus.playing?i=requestAnimationFrame(T):i=null}function h(){if(t.data.length===0||t.status!==m.TickerStatus.playing)return;const d=e.get(c(u.value));if(d){const _=g.texture,p=u.value-1;_&&p>=0&&!t.loop&&Promise.resolve(j.sleep(500)).then(()=>I.Assets.unload(c(p))).then(()=>{e.set(c(p),void 0),r("setData",{k:p,v:""}),n.value=p}),g.texture=d,y(),u.value=t.loop?(u.value+1)%t.data.length:u.value+1}else console.warn(`Texture for index ${u.value} not found. Ensure the texture is loaded.`),r("notFound",u.value),t.loop||r("update:status",m.TickerStatus.paused)}i=requestAnimationFrame(T)}o.watch(()=>t.status,T=>{T===m.TickerStatus.play&&v(),T===m.TickerStatus.pause&&P(),T===m.TickerStatus.stop&&k()},{immediate:!0});function v(){t.data.length>0?(r("update:status",m.TickerStatus.playing),b()):r("update:status",m.TickerStatus.stopped)}function P(){r("update:status",m.TickerStatus.paused)}function k(){r("update:status",m.TickerStatus.stopped),i!==null&&(cancelAnimationFrame(i),i=null),r("update:data",[]),e.clear(),u.value=0}return o.onBeforeUnmount(()=>{Array.from(e.entries()).forEach(([h,d])=>{d&&I.Assets.unload(h)}),k()}),(T,h)=>o.renderSlot(T.$slots,"default")}}),ee=o.defineComponent({__name:"provider",setup(l){return ce(),(S,t)=>o.renderSlot(S.$slots,"default")}}),te=o.defineComponent({__name:"video",props:{...B,url:{type:String,required:!0}},emits:V,setup(l,{emit:S}){const t=l,r=S,f=o.useId(),c=()=>`${f}-video`,{sprite:g,resizeSprite:y}=$(t),w=o.ref(),e=o.computed(()=>{if(w.value?.source&&w.value.source.resource){const k=w.value.source.resource;if(k instanceof HTMLVideoElement)return k}return null}),n=H.useDeferred(),a=o.ref("");n.promise.then(()=>{t.status===m.TickerStatus.play&&b()}),o.watchEffect(()=>{e.value&&(e.value.loop=t.loop)}),o.onMounted(()=>u(t.url));async function u(k){try{a.value="";const T=c();I.Assets.cache.has(T)&&await I.Assets.unload(T),I.Assets.add({alias:T,src:k});const h=await I.Assets.load(T);return w.value=h,g.texture=h,e.value&&(e.value.loop=t.loop,e.value.muted=!0,e.value.crossOrigin="anonymous",i(e.value),n.resolve()),y(),h}catch(T){return console.error("加载视频纹理失败:",T),a.value="视频加载失败",null}}function i(k){k.addEventListener("play",()=>{t.status!==m.TickerStatus.playing&&r("update:status",m.TickerStatus.playing)}),k.addEventListener("pause",()=>{t.status!==m.TickerStatus.paused&&r("update:status",m.TickerStatus.paused)}),k.addEventListener("ended",()=>{t.loop?(k.currentTime=0,k.play()):r("update:status",m.TickerStatus.stopped)}),k.addEventListener("error",T=>{const h=k.error;let d="视频播放失败";if(h)switch(h.code){case h.MEDIA_ERR_ABORTED:d="视频播放被中止";break;case h.MEDIA_ERR_NETWORK:d="网络错误导致视频播放失败";break;case h.MEDIA_ERR_DECODE:d="视频解码失败";break;case h.MEDIA_ERR_SRC_NOT_SUPPORTED:d="不支持的视频格式";break}console.error("视频播放错误:",d,T),a.value=d,r("update:status",m.TickerStatus.stopped)})}async function s(){if(w.value){const k=c();w.value.destroy(!0),w.value=void 0,I.Assets.cache.has(k)&&await I.Assets.unload(k)}a.value=""}o.watchEffect(()=>{t.status===m.TickerStatus.play&&b(),t.status===m.TickerStatus.pause&&v(),t.status===m.TickerStatus.stop&&P()}),o.onBeforeUnmount(()=>{s()});function b(){e.value&&e.value.play().catch(k=>{console.error("视频播放失败:",k),a.value="视频播放失败"})}function v(){e.value?.pause()}function P(){e.value&&(e.value.pause(),e.value.currentTime=0),r("update:status",m.TickerStatus.stopped)}return(k,T)=>o.renderSlot(k.$slots,"default")}}),re=o.defineComponent({__name:"view",props:{defaultOptions:{type:Object,default:()=>({})}},setup(l){const S=l,{application:t,context:r}=Y(),f=o.ref();return o.onMounted(async()=>{await t.init({resizeTo:f.value,...S.defaultOptions}),r.whenDef.resolve(t),f.value.appendChild(t.canvas)}),(c,g)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"appRef",ref:f,class:"vk-pixi-frame"},null,512))}}),me=o.defineComponent({name:"VkPixiFrame",components:{ApngComp:Q,ProviderComp:ee,ViewComp:re,VideoComp:te,Bitmap:Z},props:B,emits:V,setup(l){const S=o.computed(()=>{if(!l.url)return!1;const r=l.url.toLowerCase();return r.includes(".png")&&!r.includes(".mp4")&&!r.includes(".webm")}),t=o.computed(()=>{if(!l.url)return!1;const r=l.url.toLowerCase();return r.includes(".mp4")||r.includes(".webm")||r.includes(".mov")});return{isApng:S,isVideo:t}}});function he(l,S,t,r,f,c){const g=o.resolveComponent("ViewComp"),y=o.resolveComponent("ApngComp"),w=o.resolveComponent("VideoComp"),e=o.resolveComponent("Bitmap"),n=o.resolveComponent("ProviderComp");return o.openBlock(),o.createBlock(n,null,{default:o.withCtx(()=>[o.createVNode(g),l.isApng&&l.url?(o.openBlock(),o.createBlock(y,{key:0,url:l.url,loop:l.loop,status:l.status,"onUpdate:status":S[0]||(S[0]=a=>l.$emit("update:status",a))},null,8,["url","loop","status"])):l.isVideo&&l.url?(o.openBlock(),o.createBlock(w,{key:1,url:l.url,loop:l.loop,status:l.status,"onUpdate:status":S[1]||(S[1]=a=>l.$emit("update:status",a))},null,8,["url","loop","status"])):(o.openBlock(),o.createBlock(e,{key:2,data:l.data,loop:l.loop,status:l.status,onSetData:S[2]||(S[2]=a=>l.$emit("setData",a)),"onUpdate:status":S[3]||(S[3]=a=>l.$emit("update:status",a))},null,8,["data","loop","status"]))]),_:1})}const q=ae._export_sfc(me,[["render",he]]),ve=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));q.install=l=>{l.component(q.name||"VkPixiFrame",q)};Object.defineProperty(exports,"TickerStatus",{enumerable:!0,get:()=>m.TickerStatus});exports.VkPixiFrame=q;exports.VkPixiFrameApng=Q;exports.VkPixiFrameBitmap=Z;exports.VkPixiFrameBitmapGenerator=pe;exports.VkPixiFrameBufferImage=fe;exports.VkPixiFrameCore=de;exports.VkPixiFrameProvider=ee;exports.VkPixiFrameVideo=te;exports.VkPixiFrameView=re;exports.__VkPixiFrame=ve;exports.default=q;exports.usePixiApp=Y;exports.useSprite=$;
@@ -1,4 +1,4 @@
1
- import { inject as fe, provide as de, watchEffect as B, onBeforeUnmount as S, defineComponent as C, useId as ne, ref as U, onMounted as ae, renderSlot as V, watch as Q, computed as J, createElementBlock as me, openBlock as H, resolveComponent as K, createBlock as Y, withCtx as he, createVNode as ve } from "vue";
1
+ import { inject as fe, provide as de, watchEffect as $, onBeforeUnmount as S, defineComponent as C, useId as ne, ref as U, onMounted as ae, renderSlot as V, watch as Q, computed as J, openBlock as H, createElementBlock as me, resolveComponent as K, createBlock as Y, withCtx as he, createVNode as ve } from "vue";
2
2
  import { TickerStatus as m } from "@vunk/shared/enum";
3
3
  import { TickerStatus as Ye } from "@vunk/shared/enum";
4
4
  import { Deferred as ge, sleep as Z } from "@vunk/shared/promise";
@@ -64,32 +64,32 @@ function Pe() {
64
64
  return !(c = T === "acTL");
65
65
  }), !c)
66
66
  return n;
67
- var x = [], I = [], N = null, k = null, M = 0, O = new _.APNG();
68
- if (b(g, function(T, D, E, $) {
67
+ var x = [], I = [], N = null, k = null, B = 0, O = new _.APNG();
68
+ if (b(g, function(T, D, E, M) {
69
69
  var L = new DataView(D.buffer);
70
70
  switch (T) {
71
71
  case "IHDR":
72
- N = D.subarray(E + 8, E + 8 + $), O.width = L.getUint32(E + 8), O.height = L.getUint32(E + 12);
72
+ N = D.subarray(E + 8, E + 8 + M), O.width = L.getUint32(E + 8), O.height = L.getUint32(E + 12);
73
73
  break;
74
74
  case "acTL":
75
75
  O.numPlays = L.getUint32(E + 8 + 4);
76
76
  break;
77
77
  case "fcTL":
78
- k && (O.frames.push(k), M++), k = new _.Frame(), k.width = L.getUint32(E + 8 + 4), k.height = L.getUint32(E + 8 + 8), k.left = L.getUint32(E + 8 + 12), k.top = L.getUint32(E + 8 + 16);
78
+ k && (O.frames.push(k), B++), k = new _.Frame(), k.width = L.getUint32(E + 8 + 4), k.height = L.getUint32(E + 8 + 8), k.left = L.getUint32(E + 8 + 12), k.top = L.getUint32(E + 8 + 16);
79
79
  var pe = L.getUint16(E + 8 + 20), te = L.getUint16(E + 8 + 22);
80
- te === 0 && (te = 100), k.delay = 1e3 * pe / te, k.delay <= 10 && (k.delay = 100), O.playTime += k.delay, k.disposeOp = L.getUint8(E + 8 + 24), k.blendOp = L.getUint8(E + 8 + 25), k.dataParts = [], M === 0 && k.disposeOp === 2 && (k.disposeOp = 1);
80
+ te === 0 && (te = 100), k.delay = 1e3 * pe / te, k.delay <= 10 && (k.delay = 100), O.playTime += k.delay, k.disposeOp = L.getUint8(E + 8 + 24), k.blendOp = L.getUint8(E + 8 + 25), k.dataParts = [], B === 0 && k.disposeOp === 2 && (k.disposeOp = 1);
81
81
  break;
82
82
  case "fdAT":
83
- k && k.dataParts.push(D.subarray(E + 8 + 4, E + 8 + $));
83
+ k && k.dataParts.push(D.subarray(E + 8 + 4, E + 8 + M));
84
84
  break;
85
85
  case "IDAT":
86
- k && k.dataParts.push(D.subarray(E + 8, E + 8 + $));
86
+ k && k.dataParts.push(D.subarray(E + 8, E + 8 + M));
87
87
  break;
88
88
  case "IEND":
89
- I.push(y(D, E, 12 + $));
89
+ I.push(y(D, E, 12 + M));
90
90
  break;
91
91
  default:
92
- x.push(y(D, E, 12 + $));
92
+ x.push(y(D, E, 12 + M));
93
93
  }
94
94
  }), k && O.frames.push(k), O.frames.length == 0)
95
95
  return n;
@@ -525,9 +525,9 @@ function ce() {
525
525
  }
526
526
  function z(o) {
527
527
  const P = o.autoResize ?? !0, t = o.resize ?? _, { application: r, context: p } = ce(), l = new ye();
528
- r.stage.addChild(l), B(() => {
528
+ r.stage.addChild(l), $(() => {
529
529
  l.visible = o.visible ?? !0;
530
- }), B(() => {
530
+ }), $(() => {
531
531
  o.label && (l.label = o.label);
532
532
  }), P && p.when().then((w) => {
533
533
  l.texture && (v(), w.renderer.on("resize", v));
@@ -583,14 +583,14 @@ const Ne = /* @__PURE__ */ C({
583
583
  const I = await x.arrayBuffer(), N = Ee(I);
584
584
  if (N instanceof Error)
585
585
  throw new TypeError(`APNG解析失败: ${N.message}`);
586
- const { canvas: k, ctx: M } = h(N.width, N.height), O = N.frames.map(async (G, W) => {
587
- M.clearRect(0, 0, k.width, k.height), await G.createImage();
586
+ const { canvas: k, ctx: B } = h(N.width, N.height), O = N.frames.map(async (G, W) => {
587
+ B.clearRect(0, 0, k.width, k.height), await G.createImage();
588
588
  const T = G.imageElement;
589
- M.drawImage(T, G.left, G.top);
590
- const D = M.getImageData(0, 0, k.width, k.height), E = l(W);
591
- u.set(E, void 0), M.putImageData(D, 0, 0);
592
- const $ = k.toDataURL();
593
- R.add({ alias: E, src: $ });
589
+ B.drawImage(T, G.left, G.top);
590
+ const D = B.getImageData(0, 0, k.width, k.height), E = l(W);
591
+ u.set(E, void 0), B.putImageData(D, 0, 0);
592
+ const M = k.toDataURL();
593
+ R.add({ alias: E, src: M });
594
594
  const L = await R.load(E);
595
595
  return u.set(E, L), W === 0 && (v.texture = L, _()), E;
596
596
  });
@@ -633,7 +633,7 @@ const Ne = /* @__PURE__ */ C({
633
633
  I && I !== ee.EMPTY && c.push(R.unload(x));
634
634
  await Promise.all(c), u.clear(), w.value = [], e.value = 0, n.value = !1, a.value = "", s && (s.width = 0, s.height = 0);
635
635
  }
636
- return B(() => {
636
+ return $(() => {
637
637
  switch (t.status) {
638
638
  case m.play:
639
639
  F();
@@ -781,7 +781,7 @@ const Ne = /* @__PURE__ */ C({
781
781
  }
782
782
  u = requestAnimationFrame(d);
783
783
  }
784
- B(() => {
784
+ $(() => {
785
785
  t.prerender && e.value === 0 && t.data.length > 0 && t.data[0] && w(t.data[0]);
786
786
  }), Q(() => t.status, (d) => {
787
787
  d === m.play && A(), d === m.pause && y(), d === m.stop && F();
@@ -897,7 +897,7 @@ const Ne = /* @__PURE__ */ C({
897
897
  }
898
898
  u = requestAnimationFrame(d);
899
899
  }
900
- B(() => {
900
+ $(() => {
901
901
  t.prerender && e.value === 0 && t.data.length > 0 && t.data[0] && w(t.data[0]);
902
902
  }), Q(() => t.status, (d) => {
903
903
  d === m.play && A(), d === m.pause && y(), d === m.stop && F();
@@ -935,7 +935,7 @@ const Ne = /* @__PURE__ */ C({
935
935
  },
936
936
  setup(o, { emit: P }) {
937
937
  const t = o, r = P, p = ne(), l = (F) => `${p}-${F}`, { sprite: v, resizeSprite: _, application: w } = z(t), e = /* @__PURE__ */ new Map(), n = U(0), a = J(() => t.data.slice(n.value));
938
- B(() => {
938
+ $(() => {
939
939
  for (const F in a.value) {
940
940
  const d = +F + n.value, f = `${p}-${d}`, g = typeof a.value[F] == "string" ? a.value[F] : a.value[F]?.src;
941
941
  g && (e.has(f) || (R.add({
@@ -1033,7 +1033,7 @@ const Ne = /* @__PURE__ */ C({
1033
1033
  }), n = be(), a = U("");
1034
1034
  n.promise.then(() => {
1035
1035
  t.status === m.play && b();
1036
- }), B(() => {
1036
+ }), $(() => {
1037
1037
  e.value && (e.value.loop = t.loop);
1038
1038
  }), ae(() => u(t.url));
1039
1039
  async function u(y) {
@@ -1082,7 +1082,7 @@ const Ne = /* @__PURE__ */ C({
1082
1082
  }
1083
1083
  a.value = "";
1084
1084
  }
1085
- B(() => {
1085
+ $(() => {
1086
1086
  t.status === m.play && b(), t.status === m.pause && h(), t.status === m.stop && A();
1087
1087
  }), S(() => {
1088
1088
  s();
@@ -10,7 +10,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
10
10
  };
11
11
  data: {
12
12
  type: import("vue").PropType<any[]>;
13
- default: () => never[];
13
+ default: () => any[];
14
14
  };
15
15
  loop: {
16
16
  type: BooleanConstructor;
@@ -30,7 +30,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
30
30
  };
31
31
  resize: {
32
32
  type: import("vue").PropType<import("./types").Resize>;
33
- default: undefined;
33
+ default: any;
34
34
  };
35
35
  prerender: {
36
36
  type: BooleanConstructor;
@@ -41,9 +41,9 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
41
41
  default: boolean;
42
42
  };
43
43
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
44
- "update:status": (...args: any[]) => void;
45
- setData: (...args: any[]) => void;
46
- "update:data": (...args: any[]) => void;
44
+ "update:status": ((...args: unknown[]) => void) & ((...args: any[]) => void);
45
+ setData: ((...args: unknown[]) => void) & ((...args: any[]) => void);
46
+ "update:data": ((...args: unknown[]) => void) & ((...args: any[]) => void);
47
47
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
48
48
  url: {
49
49
  type: StringConstructor;
@@ -51,7 +51,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
51
51
  };
52
52
  data: {
53
53
  type: import("vue").PropType<any[]>;
54
- default: () => never[];
54
+ default: () => any[];
55
55
  };
56
56
  loop: {
57
57
  type: BooleanConstructor;
@@ -71,7 +71,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
71
71
  };
72
72
  resize: {
73
73
  type: import("vue").PropType<import("./types").Resize>;
74
- default: undefined;
74
+ default: any;
75
75
  };
76
76
  prerender: {
77
77
  type: BooleanConstructor;
@@ -82,9 +82,9 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
82
82
  default: boolean;
83
83
  };
84
84
  }>> & Readonly<{
85
- "onUpdate:status"?: ((...args: any[]) => any) | undefined;
86
- onSetData?: ((...args: any[]) => any) | undefined;
87
- "onUpdate:data"?: ((...args: any[]) => any) | undefined;
85
+ "onUpdate:status"?: (...args: any[]) => any;
86
+ onSetData?: (...args: any[]) => any;
87
+ "onUpdate:data"?: (...args: any[]) => any;
88
88
  }>, {
89
89
  data: any[];
90
90
  resize: import("./types").Resize;
@@ -12,11 +12,11 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
12
12
  };
13
13
  data: {
14
14
  type: PropType<any[]>;
15
- default: () => never[];
15
+ default: () => any[];
16
16
  };
17
17
  resize: {
18
18
  type: PropType<import("./types").Resize>;
19
- default: undefined;
19
+ default: any;
20
20
  };
21
21
  visible: {
22
22
  type: BooleanConstructor;
@@ -44,7 +44,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
44
44
  };
45
45
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
46
46
  load: (e: LoadEvent) => void;
47
- "update:status": (...args: any[]) => void;
47
+ "update:status": ((...args: unknown[]) => void) & ((...args: any[]) => void);
48
48
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
49
49
  generator: {
50
50
  type: PropType<AsyncGenerator<ImageBitmap>>;
@@ -52,11 +52,11 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
52
52
  };
53
53
  data: {
54
54
  type: PropType<any[]>;
55
- default: () => never[];
55
+ default: () => any[];
56
56
  };
57
57
  resize: {
58
58
  type: PropType<import("./types").Resize>;
59
- default: undefined;
59
+ default: any;
60
60
  };
61
61
  visible: {
62
62
  type: BooleanConstructor;
@@ -83,8 +83,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
83
83
  default: number;
84
84
  };
85
85
  }>> & Readonly<{
86
- onLoad?: ((e: LoadEvent) => any) | undefined;
87
- "onUpdate:status"?: ((...args: any[]) => any) | undefined;
86
+ onLoad?: (e: LoadEvent) => any;
87
+ "onUpdate:status"?: (...args: any[]) => any;
88
88
  }>, {
89
89
  data: any[];
90
90
  resize: import("./types").Resize;
@@ -15,7 +15,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
15
15
  };
16
16
  resize: {
17
17
  type: PropType<import("./types").Resize>;
18
- default: undefined;
18
+ default: any;
19
19
  };
20
20
  visible: {
21
21
  type: BooleanConstructor;
@@ -43,10 +43,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
43
43
  };
44
44
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
45
45
  load: (e: LoadEvent) => void;
46
- "update:status": (...args: any[]) => void;
47
- setData: (...args: any[]) => void;
48
- "update:data": (...args: any[]) => void;
49
- "update:frameIndex": (...args: any[]) => void;
46
+ "update:status": ((...args: unknown[]) => void) & ((...args: any[]) => void);
47
+ setData: ((...args: unknown[]) => void) & ((...args: any[]) => void);
48
+ "update:data": ((...args: unknown[]) => void) & ((...args: any[]) => void);
49
+ "update:frameIndex": ((...args: unknown[]) => void) & ((...args: any[]) => void);
50
50
  notFound: (_index: number) => void;
51
51
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
52
52
  data: {
@@ -58,7 +58,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
58
58
  };
59
59
  resize: {
60
60
  type: PropType<import("./types").Resize>;
61
- default: undefined;
61
+ default: any;
62
62
  };
63
63
  visible: {
64
64
  type: BooleanConstructor;
@@ -85,12 +85,12 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
85
85
  default: number;
86
86
  };
87
87
  }>> & Readonly<{
88
- onLoad?: ((e: LoadEvent) => any) | undefined;
89
- "onUpdate:status"?: ((...args: any[]) => any) | undefined;
90
- onSetData?: ((...args: any[]) => any) | undefined;
91
- "onUpdate:data"?: ((...args: any[]) => any) | undefined;
92
- "onUpdate:frameIndex"?: ((...args: any[]) => any) | undefined;
93
- onNotFound?: ((_index: number) => any) | undefined;
88
+ onLoad?: (e: LoadEvent) => any;
89
+ "onUpdate:status"?: (...args: any[]) => any;
90
+ onSetData?: (...args: any[]) => any;
91
+ "onUpdate:data"?: (...args: any[]) => any;
92
+ "onUpdate:frameIndex"?: (...args: any[]) => any;
93
+ onNotFound?: (_index: number) => any;
94
94
  }>, {
95
95
  resize: import("./types").Resize;
96
96
  visible: boolean;