@tarojs/components 3.6.0-canary.9 → 3.6.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 (1272) hide show
  1. package/dist/cjs/index-dfd8638f.js +40 -0
  2. package/dist/cjs/index-dfd8638f.js.map +1 -0
  3. package/dist/cjs/index-e1b469cd.js +2066 -0
  4. package/dist/cjs/index-e1b469cd.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +4 -3
  6. package/dist/cjs/loader.cjs.js.map +1 -1
  7. package/dist/cjs/taro-ad-core.cjs.entry.js +1 -1
  8. package/dist/cjs/taro-ad-custom-core.cjs.entry.js +1 -1
  9. package/dist/cjs/taro-animation-video-core.cjs.entry.js +1 -1
  10. package/dist/cjs/taro-animation-view-core.cjs.entry.js +1 -1
  11. package/dist/cjs/taro-ar-camera-core.cjs.entry.js +1 -1
  12. package/dist/cjs/taro-audio-core.cjs.entry.js +1 -1
  13. package/dist/cjs/taro-aweme-data-core.cjs.entry.js +1 -1
  14. package/dist/cjs/taro-block-core.cjs.entry.js +1 -1
  15. package/dist/cjs/taro-button-core.cjs.entry.js +1 -1
  16. package/dist/cjs/taro-camera-core.cjs.entry.js +1 -1
  17. package/dist/cjs/taro-canvas-core.cjs.entry.js +1 -1
  18. package/dist/cjs/taro-checkbox-core_2.cjs.entry.js +1 -1
  19. package/dist/cjs/taro-comment-detail-core.cjs.entry.js +1 -1
  20. package/dist/cjs/taro-comment-list-core.cjs.entry.js +1 -1
  21. package/dist/cjs/taro-components.cjs.js +7 -3
  22. package/dist/cjs/taro-components.cjs.js.map +1 -1
  23. package/dist/cjs/taro-contact-button-core.cjs.entry.js +1 -1
  24. package/dist/cjs/taro-cover-image-core.cjs.entry.js +1 -1
  25. package/dist/cjs/taro-cover-view-core.cjs.entry.js +1 -1
  26. package/dist/cjs/taro-custom-wrapper-core.cjs.entry.js +1 -1
  27. package/dist/cjs/taro-editor-core.cjs.entry.js +1 -1
  28. package/dist/cjs/taro-follow-swan-core.cjs.entry.js +1 -1
  29. package/dist/cjs/taro-form-core.cjs.entry.js +1 -1
  30. package/dist/cjs/taro-functional-page-navigator-core.cjs.entry.js +1 -1
  31. package/dist/cjs/taro-icon-core.cjs.entry.js +1 -1
  32. package/dist/cjs/taro-image-core.cjs.entry.js +1 -1
  33. package/dist/cjs/taro-inline-payment-panel-core.cjs.entry.js +1 -1
  34. package/dist/cjs/taro-input-core.cjs.entry.js +1 -1
  35. package/dist/cjs/taro-keyboard-accessory-core.cjs.entry.js +1 -1
  36. package/dist/cjs/taro-label-core.cjs.entry.js +1 -1
  37. package/dist/cjs/taro-lifestyle-core.cjs.entry.js +1 -1
  38. package/dist/cjs/taro-like-core.cjs.entry.js +1 -1
  39. package/dist/cjs/taro-live-player-core.cjs.entry.js +1 -1
  40. package/dist/cjs/taro-live-pusher-core.cjs.entry.js +1 -1
  41. package/dist/cjs/taro-login-core.cjs.entry.js +1 -1
  42. package/dist/cjs/taro-lottie-core.cjs.entry.js +1 -1
  43. package/dist/cjs/taro-map-core.cjs.entry.js +1 -1
  44. package/dist/cjs/taro-match-media-core.cjs.entry.js +1 -1
  45. package/dist/cjs/taro-movable-area-core_2.cjs.entry.js +1 -1
  46. package/dist/cjs/taro-native-slot-core.cjs.entry.js +1 -1
  47. package/dist/cjs/taro-navigation-bar-core.cjs.entry.js +1 -1
  48. package/dist/cjs/taro-navigator-core.cjs.entry.js +1 -1
  49. package/dist/cjs/taro-official-account-core.cjs.entry.js +1 -1
  50. package/dist/cjs/taro-open-data-core.cjs.entry.js +1 -1
  51. package/dist/cjs/taro-page-container-core.cjs.entry.js +1 -1
  52. package/dist/cjs/taro-page-meta-core.cjs.entry.js +1 -1
  53. package/dist/cjs/taro-picker-core_2.cjs.entry.js +1 -1
  54. package/dist/cjs/taro-picker-view-column-core_2.cjs.entry.js +2 -2
  55. package/dist/cjs/taro-progress-core.cjs.entry.js +1 -1
  56. package/dist/cjs/taro-pull-to-refresh.cjs.entry.js +1 -1
  57. package/dist/cjs/taro-radio-core_2.cjs.entry.js +1 -1
  58. package/dist/cjs/taro-rich-text-core.cjs.entry.js +1 -1
  59. package/dist/cjs/taro-root-portal-core.cjs.entry.js +1 -1
  60. package/dist/cjs/taro-rtc-room-core.cjs.entry.js +1 -1
  61. package/dist/cjs/taro-rtc-room-item-core.cjs.entry.js +1 -1
  62. package/dist/cjs/taro-scroll-view-core.cjs.entry.js +2 -2
  63. package/dist/cjs/taro-share-element-core.cjs.entry.js +1 -1
  64. package/dist/cjs/taro-slider-core.cjs.entry.js +1 -1
  65. package/dist/cjs/taro-slot-core.cjs.entry.js +1 -1
  66. package/dist/cjs/taro-swiper-core_2.cjs.entry.js +49 -8
  67. package/dist/cjs/taro-swiper-core_2.cjs.entry.js.map +1 -1
  68. package/dist/cjs/taro-switch-core.cjs.entry.js +1 -1
  69. package/dist/cjs/taro-tab-item-core.cjs.entry.js +1 -1
  70. package/dist/cjs/taro-tabbar.cjs.entry.js +18 -20
  71. package/dist/cjs/taro-tabbar.cjs.entry.js.map +1 -1
  72. package/dist/cjs/taro-tabs-core.cjs.entry.js +1 -1
  73. package/dist/cjs/taro-text-core.cjs.entry.js +1 -1
  74. package/dist/cjs/taro-textarea-core.cjs.entry.js +1 -1
  75. package/dist/cjs/taro-video-control_3.cjs.entry.js +6 -2
  76. package/dist/cjs/taro-video-control_3.cjs.entry.js.map +1 -1
  77. package/dist/cjs/taro-view-core.cjs.entry.js +1 -1
  78. package/dist/cjs/taro-voip-room-core.cjs.entry.js +1 -1
  79. package/dist/cjs/taro-web-view-core.cjs.entry.js +1 -1
  80. package/dist/collection/collection-manifest.json +2 -2
  81. package/dist/collection/components/swiper/swiper-item.js +37 -1
  82. package/dist/collection/components/swiper/swiper-item.js.map +1 -1
  83. package/dist/collection/components/swiper/swiper.js +12 -5
  84. package/dist/collection/components/swiper/swiper.js.map +1 -1
  85. package/dist/collection/components/tabbar/tabbar-item.js +7 -1
  86. package/dist/collection/components/tabbar/tabbar-item.js.map +1 -1
  87. package/dist/collection/components/tabbar/tabbar.js +4 -17
  88. package/dist/collection/components/tabbar/tabbar.js.map +1 -1
  89. package/dist/collection/components/video/video.js +23 -0
  90. package/dist/collection/components/video/video.js.map +1 -1
  91. package/dist/collection/utils/index.js +3 -0
  92. package/dist/collection/utils/index.js.map +1 -1
  93. package/dist/components/helper.js +15 -0
  94. package/dist/components/helper.js.map +1 -0
  95. package/dist/components/hls.js +27622 -0
  96. package/dist/components/hls.js.map +1 -0
  97. package/dist/components/index.d.ts +106 -0
  98. package/dist/components/index.js +79 -0
  99. package/dist/components/index.js.map +1 -0
  100. package/dist/components/index2.js +78 -0
  101. package/dist/components/index2.js.map +1 -0
  102. package/dist/components/index3.js +36 -0
  103. package/dist/components/index3.js.map +1 -0
  104. package/dist/components/intersection-observer.js +728 -0
  105. package/dist/components/intersection-observer.js.map +1 -0
  106. package/dist/components/picker-group.js +220 -0
  107. package/dist/components/picker-group.js.map +1 -0
  108. package/dist/components/taro-ad-core.d.ts +11 -0
  109. package/dist/components/taro-ad-core.js +35 -0
  110. package/dist/components/taro-ad-core.js.map +1 -0
  111. package/dist/components/taro-ad-custom-core.d.ts +11 -0
  112. package/dist/components/taro-ad-custom-core.js +35 -0
  113. package/dist/components/taro-ad-custom-core.js.map +1 -0
  114. package/dist/components/taro-animation-video-core.d.ts +11 -0
  115. package/dist/components/taro-animation-video-core.js +35 -0
  116. package/dist/components/taro-animation-video-core.js.map +1 -0
  117. package/dist/components/taro-animation-view-core.d.ts +11 -0
  118. package/dist/components/taro-animation-view-core.js +35 -0
  119. package/dist/components/taro-animation-view-core.js.map +1 -0
  120. package/dist/components/taro-ar-camera-core.d.ts +11 -0
  121. package/dist/components/taro-ar-camera-core.js +35 -0
  122. package/dist/components/taro-ar-camera-core.js.map +1 -0
  123. package/dist/components/taro-audio-core.d.ts +11 -0
  124. package/dist/components/taro-audio-core.js +80 -0
  125. package/dist/components/taro-audio-core.js.map +1 -0
  126. package/dist/components/taro-aweme-data-core.d.ts +11 -0
  127. package/dist/components/taro-aweme-data-core.js +35 -0
  128. package/dist/components/taro-aweme-data-core.js.map +1 -0
  129. package/dist/components/taro-block-core.d.ts +11 -0
  130. package/dist/components/taro-block-core.js +31 -0
  131. package/dist/components/taro-block-core.js.map +1 -0
  132. package/dist/components/taro-button-core.d.ts +11 -0
  133. package/dist/components/taro-button-core.js +102 -0
  134. package/dist/components/taro-button-core.js.map +1 -0
  135. package/dist/components/taro-camera-core.d.ts +11 -0
  136. package/dist/components/taro-camera-core.js +35 -0
  137. package/dist/components/taro-camera-core.js.map +1 -0
  138. package/dist/components/taro-canvas-core.d.ts +11 -0
  139. package/dist/components/taro-canvas-core.js +57 -0
  140. package/dist/components/taro-canvas-core.js.map +1 -0
  141. package/dist/components/taro-checkbox-core.d.ts +11 -0
  142. package/dist/components/taro-checkbox-core.js +81 -0
  143. package/dist/components/taro-checkbox-core.js.map +1 -0
  144. package/dist/components/taro-checkbox-group-core.d.ts +11 -0
  145. package/dist/components/taro-checkbox-group-core.js +71 -0
  146. package/dist/components/taro-checkbox-group-core.js.map +1 -0
  147. package/dist/components/taro-comment-detail-core.d.ts +11 -0
  148. package/dist/components/taro-comment-detail-core.js +35 -0
  149. package/dist/components/taro-comment-detail-core.js.map +1 -0
  150. package/dist/components/taro-comment-list-core.d.ts +11 -0
  151. package/dist/components/taro-comment-list-core.js +35 -0
  152. package/dist/components/taro-comment-list-core.js.map +1 -0
  153. package/dist/components/taro-contact-button-core.d.ts +11 -0
  154. package/dist/components/taro-contact-button-core.js +35 -0
  155. package/dist/components/taro-contact-button-core.js.map +1 -0
  156. package/dist/components/taro-cover-image-core.d.ts +11 -0
  157. package/dist/components/taro-cover-image-core.js +52 -0
  158. package/dist/components/taro-cover-image-core.js.map +1 -0
  159. package/dist/components/taro-cover-view-core.d.ts +11 -0
  160. package/dist/components/taro-cover-view-core.js +89 -0
  161. package/dist/components/taro-cover-view-core.js.map +1 -0
  162. package/dist/components/taro-custom-wrapper-core.d.ts +11 -0
  163. package/dist/components/taro-custom-wrapper-core.js +31 -0
  164. package/dist/components/taro-custom-wrapper-core.js.map +1 -0
  165. package/dist/components/taro-editor-core.d.ts +11 -0
  166. package/dist/components/taro-editor-core.js +35 -0
  167. package/dist/components/taro-editor-core.js.map +1 -0
  168. package/dist/components/taro-follow-swan-core.d.ts +11 -0
  169. package/dist/components/taro-follow-swan-core.js +35 -0
  170. package/dist/components/taro-follow-swan-core.js.map +1 -0
  171. package/dist/components/taro-form-core.d.ts +11 -0
  172. package/dist/components/taro-form-core.js +140 -0
  173. package/dist/components/taro-form-core.js.map +1 -0
  174. package/dist/components/taro-functional-page-navigator-core.d.ts +11 -0
  175. package/dist/components/taro-functional-page-navigator-core.js +35 -0
  176. package/dist/components/taro-functional-page-navigator-core.js.map +1 -0
  177. package/dist/components/taro-icon-core.d.ts +11 -0
  178. package/dist/components/taro-icon-core.js +48 -0
  179. package/dist/components/taro-icon-core.js.map +1 -0
  180. package/dist/components/taro-image-core.d.ts +11 -0
  181. package/dist/components/taro-image-core.js +81 -0
  182. package/dist/components/taro-image-core.js.map +1 -0
  183. package/dist/components/taro-inline-payment-panel-core.d.ts +11 -0
  184. package/dist/components/taro-inline-payment-panel-core.js +35 -0
  185. package/dist/components/taro-inline-payment-panel-core.js.map +1 -0
  186. package/dist/components/taro-input-core.d.ts +11 -0
  187. package/dist/components/taro-input-core.js +246 -0
  188. package/dist/components/taro-input-core.js.map +1 -0
  189. package/dist/components/taro-keyboard-accessory-core.d.ts +11 -0
  190. package/dist/components/taro-keyboard-accessory-core.js +35 -0
  191. package/dist/components/taro-keyboard-accessory-core.js.map +1 -0
  192. package/dist/components/taro-label-core.d.ts +11 -0
  193. package/dist/components/taro-label-core.js +34 -0
  194. package/dist/components/taro-label-core.js.map +1 -0
  195. package/dist/components/taro-lifestyle-core.d.ts +11 -0
  196. package/dist/components/taro-lifestyle-core.js +35 -0
  197. package/dist/components/taro-lifestyle-core.js.map +1 -0
  198. package/dist/components/taro-like-core.d.ts +11 -0
  199. package/dist/components/taro-like-core.js +35 -0
  200. package/dist/components/taro-like-core.js.map +1 -0
  201. package/dist/components/taro-live-player-core.d.ts +11 -0
  202. package/dist/components/taro-live-player-core.js +35 -0
  203. package/dist/components/taro-live-player-core.js.map +1 -0
  204. package/dist/components/taro-live-pusher-core.d.ts +11 -0
  205. package/dist/components/taro-live-pusher-core.js +35 -0
  206. package/dist/components/taro-live-pusher-core.js.map +1 -0
  207. package/dist/components/taro-login-core.d.ts +11 -0
  208. package/dist/components/taro-login-core.js +35 -0
  209. package/dist/components/taro-login-core.js.map +1 -0
  210. package/dist/components/taro-lottie-core.d.ts +11 -0
  211. package/dist/components/taro-lottie-core.js +35 -0
  212. package/dist/components/taro-lottie-core.js.map +1 -0
  213. package/dist/components/taro-map-core.d.ts +11 -0
  214. package/dist/components/taro-map-core.js +35 -0
  215. package/dist/components/taro-map-core.js.map +1 -0
  216. package/dist/components/taro-match-media-core.d.ts +11 -0
  217. package/dist/components/taro-match-media-core.js +35 -0
  218. package/dist/components/taro-match-media-core.js.map +1 -0
  219. package/dist/components/taro-movable-area-core.d.ts +11 -0
  220. package/dist/components/taro-movable-area-core.js +175 -0
  221. package/dist/components/taro-movable-area-core.js.map +1 -0
  222. package/dist/components/taro-movable-view-core.d.ts +11 -0
  223. package/dist/components/taro-movable-view-core.js +361 -0
  224. package/dist/components/taro-movable-view-core.js.map +1 -0
  225. package/dist/components/taro-native-slot-core.d.ts +11 -0
  226. package/dist/components/taro-native-slot-core.js +35 -0
  227. package/dist/components/taro-native-slot-core.js.map +1 -0
  228. package/dist/components/taro-navigation-bar-core.d.ts +11 -0
  229. package/dist/components/taro-navigation-bar-core.js +35 -0
  230. package/dist/components/taro-navigation-bar-core.js.map +1 -0
  231. package/dist/components/taro-navigator-core.d.ts +11 -0
  232. package/dist/components/taro-navigator-core.js +96 -0
  233. package/dist/components/taro-navigator-core.js.map +1 -0
  234. package/dist/components/taro-official-account-core.d.ts +11 -0
  235. package/dist/components/taro-official-account-core.js +35 -0
  236. package/dist/components/taro-official-account-core.js.map +1 -0
  237. package/dist/components/taro-open-data-core.d.ts +11 -0
  238. package/dist/components/taro-open-data-core.js +35 -0
  239. package/dist/components/taro-open-data-core.js.map +1 -0
  240. package/dist/components/taro-page-container-core.d.ts +11 -0
  241. package/dist/components/taro-page-container-core.js +35 -0
  242. package/dist/components/taro-page-container-core.js.map +1 -0
  243. package/dist/components/taro-page-meta-core.d.ts +11 -0
  244. package/dist/components/taro-page-meta-core.js +35 -0
  245. package/dist/components/taro-page-meta-core.js.map +1 -0
  246. package/dist/components/taro-picker-core.d.ts +11 -0
  247. package/dist/components/taro-picker-core.js +538 -0
  248. package/dist/components/taro-picker-core.js.map +1 -0
  249. package/dist/components/taro-picker-group.d.ts +11 -0
  250. package/dist/components/taro-picker-group.js +8 -0
  251. package/dist/components/taro-picker-group.js.map +1 -0
  252. package/dist/components/taro-picker-view-column-core.d.ts +11 -0
  253. package/dist/components/taro-picker-view-column-core.js +115 -0
  254. package/dist/components/taro-picker-view-column-core.js.map +1 -0
  255. package/dist/components/taro-picker-view-core.d.ts +11 -0
  256. package/dist/components/taro-picker-view-core.js +114 -0
  257. package/dist/components/taro-picker-view-core.js.map +1 -0
  258. package/dist/components/taro-progress-core.d.ts +11 -0
  259. package/dist/components/taro-progress-core.js +62 -0
  260. package/dist/components/taro-progress-core.js.map +1 -0
  261. package/dist/components/taro-pull-to-refresh.d.ts +11 -0
  262. package/dist/components/taro-pull-to-refresh.js +284 -0
  263. package/dist/components/taro-pull-to-refresh.js.map +1 -0
  264. package/dist/components/taro-radio-core.d.ts +11 -0
  265. package/dist/components/taro-radio-core.js +83 -0
  266. package/dist/components/taro-radio-core.js.map +1 -0
  267. package/dist/components/taro-radio-group-core.d.ts +11 -0
  268. package/dist/components/taro-radio-group-core.js +82 -0
  269. package/dist/components/taro-radio-group-core.js.map +1 -0
  270. package/dist/components/taro-rich-text-core.d.ts +11 -0
  271. package/dist/components/taro-rich-text-core.js +86 -0
  272. package/dist/components/taro-rich-text-core.js.map +1 -0
  273. package/dist/components/taro-root-portal-core.d.ts +11 -0
  274. package/dist/components/taro-root-portal-core.js +35 -0
  275. package/dist/components/taro-root-portal-core.js.map +1 -0
  276. package/dist/components/taro-rtc-room-core.d.ts +11 -0
  277. package/dist/components/taro-rtc-room-core.js +35 -0
  278. package/dist/components/taro-rtc-room-core.js.map +1 -0
  279. package/dist/components/taro-rtc-room-item-core.d.ts +11 -0
  280. package/dist/components/taro-rtc-room-item-core.js +35 -0
  281. package/dist/components/taro-rtc-room-item-core.js.map +1 -0
  282. package/dist/components/taro-scroll-view-core.d.ts +11 -0
  283. package/dist/components/taro-scroll-view-core.js +184 -0
  284. package/dist/components/taro-scroll-view-core.js.map +1 -0
  285. package/dist/components/taro-share-element-core.d.ts +11 -0
  286. package/dist/components/taro-share-element-core.js +35 -0
  287. package/dist/components/taro-share-element-core.js.map +1 -0
  288. package/dist/components/taro-slider-core.d.ts +11 -0
  289. package/dist/components/taro-slider-core.js +196 -0
  290. package/dist/components/taro-slider-core.js.map +1 -0
  291. package/dist/components/taro-slot-core.d.ts +11 -0
  292. package/dist/components/taro-slot-core.js +35 -0
  293. package/dist/components/taro-slot-core.js.map +1 -0
  294. package/dist/components/taro-swiper-core.d.ts +11 -0
  295. package/dist/components/taro-swiper-core.js +10172 -0
  296. package/dist/components/taro-swiper-core.js.map +1 -0
  297. package/dist/components/taro-swiper-item-core.d.ts +11 -0
  298. package/dist/components/taro-swiper-item-core.js +70 -0
  299. package/dist/components/taro-swiper-item-core.js.map +1 -0
  300. package/dist/components/taro-switch-core.d.ts +11 -0
  301. package/dist/components/taro-switch-core.js +87 -0
  302. package/dist/components/taro-switch-core.js.map +1 -0
  303. package/dist/components/taro-tab-item-core.d.ts +11 -0
  304. package/dist/components/taro-tab-item-core.js +35 -0
  305. package/dist/components/taro-tab-item-core.js.map +1 -0
  306. package/dist/components/taro-tabbar.d.ts +11 -0
  307. package/dist/components/taro-tabbar.js +455 -0
  308. package/dist/components/taro-tabbar.js.map +1 -0
  309. package/dist/components/taro-tabs-core.d.ts +11 -0
  310. package/dist/components/taro-tabs-core.js +35 -0
  311. package/dist/components/taro-tabs-core.js.map +1 -0
  312. package/dist/components/taro-text-core.d.ts +11 -0
  313. package/dist/components/taro-text-core.js +41 -0
  314. package/dist/components/taro-text-core.js.map +1 -0
  315. package/dist/components/taro-textarea-core.d.ts +11 -0
  316. package/dist/components/taro-textarea-core.js +164 -0
  317. package/dist/components/taro-textarea-core.js.map +1 -0
  318. package/dist/components/taro-video-control.d.ts +11 -0
  319. package/dist/components/taro-video-control.js +8 -0
  320. package/dist/components/taro-video-control.js.map +1 -0
  321. package/dist/components/taro-video-core.d.ts +11 -0
  322. package/dist/components/taro-video-core.js +490 -0
  323. package/dist/components/taro-video-core.js.map +1 -0
  324. package/dist/components/taro-video-danmu.d.ts +11 -0
  325. package/dist/components/taro-video-danmu.js +8 -0
  326. package/dist/components/taro-video-danmu.js.map +1 -0
  327. package/dist/components/taro-view-core.d.ts +11 -0
  328. package/dist/components/taro-view-core.js +101 -0
  329. package/dist/components/taro-view-core.js.map +1 -0
  330. package/dist/components/taro-voip-room-core.d.ts +11 -0
  331. package/dist/components/taro-voip-room-core.js +35 -0
  332. package/dist/components/taro-voip-room-core.js.map +1 -0
  333. package/dist/components/taro-web-view-core.d.ts +11 -0
  334. package/dist/components/taro-web-view-core.js +46 -0
  335. package/dist/components/taro-web-view-core.js.map +1 -0
  336. package/dist/components/video-control.js +233 -0
  337. package/dist/components/video-control.js.map +1 -0
  338. package/dist/components/video-danmu.js +110 -0
  339. package/dist/components/video-danmu.js.map +1 -0
  340. package/dist/esm/index-c948674f.js +2037 -0
  341. package/dist/esm/index-c948674f.js.map +1 -0
  342. package/dist/esm/index-d1b03e47.js +36 -0
  343. package/dist/esm/index-d1b03e47.js.map +1 -0
  344. package/dist/esm/loader.js +4 -3
  345. package/dist/esm/loader.js.map +1 -1
  346. package/dist/esm/polyfills/css-shim.js +1 -1
  347. package/dist/esm/taro-ad-core.entry.js +1 -1
  348. package/dist/esm/taro-ad-custom-core.entry.js +1 -1
  349. package/dist/esm/taro-animation-video-core.entry.js +1 -1
  350. package/dist/esm/taro-animation-view-core.entry.js +1 -1
  351. package/dist/esm/taro-ar-camera-core.entry.js +1 -1
  352. package/dist/esm/taro-audio-core.entry.js +1 -1
  353. package/dist/esm/taro-aweme-data-core.entry.js +1 -1
  354. package/dist/esm/taro-block-core.entry.js +1 -1
  355. package/dist/esm/taro-button-core.entry.js +1 -1
  356. package/dist/esm/taro-camera-core.entry.js +1 -1
  357. package/dist/esm/taro-canvas-core.entry.js +1 -1
  358. package/dist/esm/taro-checkbox-core_2.entry.js +1 -1
  359. package/dist/esm/taro-comment-detail-core.entry.js +1 -1
  360. package/dist/esm/taro-comment-list-core.entry.js +1 -1
  361. package/dist/esm/taro-components.js +4 -3
  362. package/dist/esm/taro-components.js.map +1 -1
  363. package/dist/esm/taro-contact-button-core.entry.js +1 -1
  364. package/dist/esm/taro-cover-image-core.entry.js +1 -1
  365. package/dist/esm/taro-cover-view-core.entry.js +1 -1
  366. package/dist/esm/taro-custom-wrapper-core.entry.js +1 -1
  367. package/dist/esm/taro-editor-core.entry.js +1 -1
  368. package/dist/esm/taro-follow-swan-core.entry.js +1 -1
  369. package/dist/esm/taro-form-core.entry.js +1 -1
  370. package/dist/esm/taro-functional-page-navigator-core.entry.js +1 -1
  371. package/dist/esm/taro-icon-core.entry.js +1 -1
  372. package/dist/esm/taro-image-core.entry.js +1 -1
  373. package/dist/esm/taro-inline-payment-panel-core.entry.js +1 -1
  374. package/dist/esm/taro-input-core.entry.js +1 -1
  375. package/dist/esm/taro-keyboard-accessory-core.entry.js +1 -1
  376. package/dist/esm/taro-label-core.entry.js +1 -1
  377. package/dist/esm/taro-lifestyle-core.entry.js +1 -1
  378. package/dist/esm/taro-like-core.entry.js +1 -1
  379. package/dist/esm/taro-live-player-core.entry.js +1 -1
  380. package/dist/esm/taro-live-pusher-core.entry.js +1 -1
  381. package/dist/esm/taro-login-core.entry.js +1 -1
  382. package/dist/esm/taro-lottie-core.entry.js +1 -1
  383. package/dist/esm/taro-map-core.entry.js +1 -1
  384. package/dist/esm/taro-match-media-core.entry.js +1 -1
  385. package/dist/esm/taro-movable-area-core_2.entry.js +1 -1
  386. package/dist/esm/taro-native-slot-core.entry.js +1 -1
  387. package/dist/esm/taro-navigation-bar-core.entry.js +1 -1
  388. package/dist/esm/taro-navigator-core.entry.js +1 -1
  389. package/dist/esm/taro-official-account-core.entry.js +1 -1
  390. package/dist/esm/taro-open-data-core.entry.js +1 -1
  391. package/dist/esm/taro-page-container-core.entry.js +1 -1
  392. package/dist/esm/taro-page-meta-core.entry.js +1 -1
  393. package/dist/esm/taro-picker-core_2.entry.js +1 -1
  394. package/dist/esm/taro-picker-view-column-core_2.entry.js +2 -2
  395. package/dist/esm/taro-progress-core.entry.js +1 -1
  396. package/dist/esm/taro-pull-to-refresh.entry.js +1 -1
  397. package/dist/esm/taro-radio-core_2.entry.js +1 -1
  398. package/dist/esm/taro-rich-text-core.entry.js +1 -1
  399. package/dist/esm/taro-root-portal-core.entry.js +1 -1
  400. package/dist/esm/taro-rtc-room-core.entry.js +1 -1
  401. package/dist/esm/taro-rtc-room-item-core.entry.js +1 -1
  402. package/dist/esm/taro-scroll-view-core.entry.js +2 -2
  403. package/dist/esm/taro-share-element-core.entry.js +1 -1
  404. package/dist/esm/taro-slider-core.entry.js +1 -1
  405. package/dist/esm/taro-slot-core.entry.js +1 -1
  406. package/dist/esm/taro-swiper-core_2.entry.js +49 -8
  407. package/dist/esm/taro-swiper-core_2.entry.js.map +1 -1
  408. package/dist/esm/taro-switch-core.entry.js +1 -1
  409. package/dist/esm/taro-tab-item-core.entry.js +1 -1
  410. package/dist/esm/taro-tabbar.entry.js +16 -18
  411. package/dist/esm/taro-tabbar.entry.js.map +1 -1
  412. package/dist/esm/taro-tabs-core.entry.js +1 -1
  413. package/dist/esm/taro-text-core.entry.js +1 -1
  414. package/dist/esm/taro-textarea-core.entry.js +1 -1
  415. package/dist/esm/taro-video-control_3.entry.js +6 -2
  416. package/dist/esm/taro-video-control_3.entry.js.map +1 -1
  417. package/dist/esm/taro-view-core.entry.js +1 -1
  418. package/dist/esm/taro-voip-room-core.entry.js +1 -1
  419. package/dist/esm/taro-web-view-core.entry.js +1 -1
  420. package/dist/esm-es5/helper-3d0ecf0f.js.map +1 -1
  421. package/dist/esm-es5/hls-221423a1.js.map +1 -1
  422. package/dist/esm-es5/index-1d8e8acd.js.map +1 -1
  423. package/dist/esm-es5/index-c948674f.js +3 -0
  424. package/dist/esm-es5/index-c948674f.js.map +1 -0
  425. package/dist/esm-es5/index-d1b03e47.js +2 -0
  426. package/dist/esm-es5/index-d1b03e47.js.map +1 -0
  427. package/dist/esm-es5/index.js.map +1 -1
  428. package/dist/esm-es5/intersection-observer-8e4c7135.js.map +1 -1
  429. package/dist/esm-es5/loader.js +1 -1
  430. package/dist/esm-es5/loader.js.map +1 -1
  431. package/dist/esm-es5/taro-ad-core.entry.js +1 -1
  432. package/dist/esm-es5/taro-ad-core.entry.js.map +1 -1
  433. package/dist/esm-es5/taro-ad-custom-core.entry.js +1 -1
  434. package/dist/esm-es5/taro-ad-custom-core.entry.js.map +1 -1
  435. package/dist/esm-es5/taro-animation-video-core.entry.js +1 -1
  436. package/dist/esm-es5/taro-animation-video-core.entry.js.map +1 -1
  437. package/dist/esm-es5/taro-animation-view-core.entry.js +1 -1
  438. package/dist/esm-es5/taro-animation-view-core.entry.js.map +1 -1
  439. package/dist/esm-es5/taro-ar-camera-core.entry.js +1 -1
  440. package/dist/esm-es5/taro-ar-camera-core.entry.js.map +1 -1
  441. package/dist/esm-es5/taro-audio-core.entry.js +1 -1
  442. package/dist/esm-es5/taro-audio-core.entry.js.map +1 -1
  443. package/dist/esm-es5/taro-aweme-data-core.entry.js +1 -1
  444. package/dist/esm-es5/taro-aweme-data-core.entry.js.map +1 -1
  445. package/dist/esm-es5/taro-block-core.entry.js +1 -1
  446. package/dist/esm-es5/taro-block-core.entry.js.map +1 -1
  447. package/dist/esm-es5/taro-button-core.entry.js +1 -1
  448. package/dist/esm-es5/taro-button-core.entry.js.map +1 -1
  449. package/dist/esm-es5/taro-camera-core.entry.js +1 -1
  450. package/dist/esm-es5/taro-camera-core.entry.js.map +1 -1
  451. package/dist/esm-es5/taro-canvas-core.entry.js +1 -1
  452. package/dist/esm-es5/taro-canvas-core.entry.js.map +1 -1
  453. package/dist/esm-es5/taro-checkbox-core_2.entry.js +1 -1
  454. package/dist/esm-es5/taro-checkbox-core_2.entry.js.map +1 -1
  455. package/dist/esm-es5/taro-comment-detail-core.entry.js +1 -1
  456. package/dist/esm-es5/taro-comment-detail-core.entry.js.map +1 -1
  457. package/dist/esm-es5/taro-comment-list-core.entry.js +1 -1
  458. package/dist/esm-es5/taro-comment-list-core.entry.js.map +1 -1
  459. package/dist/esm-es5/taro-components.js +1 -1
  460. package/dist/esm-es5/taro-components.js.map +1 -1
  461. package/dist/esm-es5/taro-contact-button-core.entry.js +1 -1
  462. package/dist/esm-es5/taro-contact-button-core.entry.js.map +1 -1
  463. package/dist/esm-es5/taro-cover-image-core.entry.js +1 -1
  464. package/dist/esm-es5/taro-cover-image-core.entry.js.map +1 -1
  465. package/dist/esm-es5/taro-cover-view-core.entry.js +1 -1
  466. package/dist/esm-es5/taro-cover-view-core.entry.js.map +1 -1
  467. package/dist/esm-es5/taro-custom-wrapper-core.entry.js +1 -1
  468. package/dist/esm-es5/taro-custom-wrapper-core.entry.js.map +1 -1
  469. package/dist/esm-es5/taro-editor-core.entry.js +1 -1
  470. package/dist/esm-es5/taro-editor-core.entry.js.map +1 -1
  471. package/dist/esm-es5/taro-follow-swan-core.entry.js +1 -1
  472. package/dist/esm-es5/taro-follow-swan-core.entry.js.map +1 -1
  473. package/dist/esm-es5/taro-form-core.entry.js +1 -1
  474. package/dist/esm-es5/taro-form-core.entry.js.map +1 -1
  475. package/dist/esm-es5/taro-functional-page-navigator-core.entry.js +1 -1
  476. package/dist/esm-es5/taro-functional-page-navigator-core.entry.js.map +1 -1
  477. package/dist/esm-es5/taro-icon-core.entry.js +1 -1
  478. package/dist/esm-es5/taro-icon-core.entry.js.map +1 -1
  479. package/dist/esm-es5/taro-image-core.entry.js +1 -1
  480. package/dist/esm-es5/taro-image-core.entry.js.map +1 -1
  481. package/dist/esm-es5/taro-inline-payment-panel-core.entry.js +1 -1
  482. package/dist/esm-es5/taro-inline-payment-panel-core.entry.js.map +1 -1
  483. package/dist/esm-es5/taro-input-core.entry.js +1 -1
  484. package/dist/esm-es5/taro-input-core.entry.js.map +1 -1
  485. package/dist/esm-es5/taro-keyboard-accessory-core.entry.js +1 -1
  486. package/dist/esm-es5/taro-keyboard-accessory-core.entry.js.map +1 -1
  487. package/dist/esm-es5/taro-label-core.entry.js +1 -1
  488. package/dist/esm-es5/taro-label-core.entry.js.map +1 -1
  489. package/dist/esm-es5/taro-lifestyle-core.entry.js +1 -1
  490. package/dist/esm-es5/taro-lifestyle-core.entry.js.map +1 -1
  491. package/dist/esm-es5/taro-like-core.entry.js +1 -1
  492. package/dist/esm-es5/taro-like-core.entry.js.map +1 -1
  493. package/dist/esm-es5/taro-live-player-core.entry.js +1 -1
  494. package/dist/esm-es5/taro-live-player-core.entry.js.map +1 -1
  495. package/dist/esm-es5/taro-live-pusher-core.entry.js +1 -1
  496. package/dist/esm-es5/taro-live-pusher-core.entry.js.map +1 -1
  497. package/dist/esm-es5/taro-login-core.entry.js +1 -1
  498. package/dist/esm-es5/taro-login-core.entry.js.map +1 -1
  499. package/dist/esm-es5/taro-lottie-core.entry.js +1 -1
  500. package/dist/esm-es5/taro-lottie-core.entry.js.map +1 -1
  501. package/dist/esm-es5/taro-map-core.entry.js +1 -1
  502. package/dist/esm-es5/taro-map-core.entry.js.map +1 -1
  503. package/dist/esm-es5/taro-match-media-core.entry.js +1 -1
  504. package/dist/esm-es5/taro-match-media-core.entry.js.map +1 -1
  505. package/dist/esm-es5/taro-movable-area-core_2.entry.js +1 -1
  506. package/dist/esm-es5/taro-movable-area-core_2.entry.js.map +1 -1
  507. package/dist/esm-es5/taro-native-slot-core.entry.js +1 -1
  508. package/dist/esm-es5/taro-native-slot-core.entry.js.map +1 -1
  509. package/dist/esm-es5/taro-navigation-bar-core.entry.js +1 -1
  510. package/dist/esm-es5/taro-navigation-bar-core.entry.js.map +1 -1
  511. package/dist/esm-es5/taro-navigator-core.entry.js +1 -1
  512. package/dist/esm-es5/taro-navigator-core.entry.js.map +1 -1
  513. package/dist/esm-es5/taro-official-account-core.entry.js +1 -1
  514. package/dist/esm-es5/taro-official-account-core.entry.js.map +1 -1
  515. package/dist/esm-es5/taro-open-data-core.entry.js +1 -1
  516. package/dist/esm-es5/taro-open-data-core.entry.js.map +1 -1
  517. package/dist/esm-es5/taro-page-container-core.entry.js +1 -1
  518. package/dist/esm-es5/taro-page-container-core.entry.js.map +1 -1
  519. package/dist/esm-es5/taro-page-meta-core.entry.js +1 -1
  520. package/dist/esm-es5/taro-page-meta-core.entry.js.map +1 -1
  521. package/dist/esm-es5/taro-picker-core_2.entry.js +1 -1
  522. package/dist/esm-es5/taro-picker-core_2.entry.js.map +1 -1
  523. package/dist/esm-es5/taro-picker-view-column-core_2.entry.js +1 -1
  524. package/dist/esm-es5/taro-picker-view-column-core_2.entry.js.map +1 -1
  525. package/dist/esm-es5/taro-progress-core.entry.js +1 -1
  526. package/dist/esm-es5/taro-progress-core.entry.js.map +1 -1
  527. package/dist/esm-es5/taro-pull-to-refresh.entry.js +1 -1
  528. package/dist/esm-es5/taro-pull-to-refresh.entry.js.map +1 -1
  529. package/dist/esm-es5/taro-radio-core_2.entry.js +1 -1
  530. package/dist/esm-es5/taro-radio-core_2.entry.js.map +1 -1
  531. package/dist/esm-es5/taro-rich-text-core.entry.js +1 -1
  532. package/dist/esm-es5/taro-rich-text-core.entry.js.map +1 -1
  533. package/dist/esm-es5/taro-root-portal-core.entry.js +1 -1
  534. package/dist/esm-es5/taro-root-portal-core.entry.js.map +1 -1
  535. package/dist/esm-es5/taro-rtc-room-core.entry.js +1 -1
  536. package/dist/esm-es5/taro-rtc-room-core.entry.js.map +1 -1
  537. package/dist/esm-es5/taro-rtc-room-item-core.entry.js +1 -1
  538. package/dist/esm-es5/taro-rtc-room-item-core.entry.js.map +1 -1
  539. package/dist/esm-es5/taro-scroll-view-core.entry.js +1 -1
  540. package/dist/esm-es5/taro-scroll-view-core.entry.js.map +1 -1
  541. package/dist/esm-es5/taro-share-element-core.entry.js +1 -1
  542. package/dist/esm-es5/taro-share-element-core.entry.js.map +1 -1
  543. package/dist/esm-es5/taro-slider-core.entry.js +1 -1
  544. package/dist/esm-es5/taro-slider-core.entry.js.map +1 -1
  545. package/dist/esm-es5/taro-slot-core.entry.js +1 -1
  546. package/dist/esm-es5/taro-slot-core.entry.js.map +1 -1
  547. package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
  548. package/dist/esm-es5/taro-swiper-core_2.entry.js.map +1 -1
  549. package/dist/esm-es5/taro-switch-core.entry.js +1 -1
  550. package/dist/esm-es5/taro-switch-core.entry.js.map +1 -1
  551. package/dist/esm-es5/taro-tab-item-core.entry.js +1 -1
  552. package/dist/esm-es5/taro-tab-item-core.entry.js.map +1 -1
  553. package/dist/esm-es5/taro-tabbar.entry.js +1 -1
  554. package/dist/esm-es5/taro-tabbar.entry.js.map +1 -1
  555. package/dist/esm-es5/taro-tabs-core.entry.js +1 -1
  556. package/dist/esm-es5/taro-tabs-core.entry.js.map +1 -1
  557. package/dist/esm-es5/taro-text-core.entry.js +1 -1
  558. package/dist/esm-es5/taro-text-core.entry.js.map +1 -1
  559. package/dist/esm-es5/taro-textarea-core.entry.js +1 -1
  560. package/dist/esm-es5/taro-textarea-core.entry.js.map +1 -1
  561. package/dist/esm-es5/taro-video-control_3.entry.js +1 -1
  562. package/dist/esm-es5/taro-video-control_3.entry.js.map +1 -1
  563. package/dist/esm-es5/taro-view-core.entry.js +1 -1
  564. package/dist/esm-es5/taro-view-core.entry.js.map +1 -1
  565. package/dist/esm-es5/taro-voip-room-core.entry.js +1 -1
  566. package/dist/esm-es5/taro-voip-room-core.entry.js.map +1 -1
  567. package/dist/esm-es5/taro-web-view-core.entry.js +1 -1
  568. package/dist/esm-es5/taro-web-view-core.entry.js.map +1 -1
  569. package/dist/taro-components/index.esm.js.map +1 -1
  570. package/dist/taro-components/p-020bcd8c.entry.js +2 -0
  571. package/dist/taro-components/p-020bcd8c.entry.js.map +1 -0
  572. package/dist/taro-components/p-03d4de13.entry.js +2 -0
  573. package/dist/taro-components/p-03d4de13.entry.js.map +1 -0
  574. package/dist/taro-components/p-05f3f84a.entry.js +2 -0
  575. package/dist/taro-components/p-05f3f84a.entry.js.map +1 -0
  576. package/dist/taro-components/p-087bf23a.system.entry.js +2 -0
  577. package/dist/taro-components/p-087bf23a.system.entry.js.map +1 -0
  578. package/dist/taro-components/p-0895120a.system.entry.js +2 -0
  579. package/dist/taro-components/p-0895120a.system.entry.js.map +1 -0
  580. package/dist/taro-components/p-08bb8dfc.system.entry.js +2 -0
  581. package/dist/taro-components/p-08bb8dfc.system.entry.js.map +1 -0
  582. package/dist/taro-components/p-09db02e6.entry.js +2 -0
  583. package/dist/taro-components/p-09db02e6.entry.js.map +1 -0
  584. package/dist/taro-components/p-0a165ad3.system.entry.js +2 -0
  585. package/dist/taro-components/p-0a165ad3.system.entry.js.map +1 -0
  586. package/dist/taro-components/p-0a9b984e.system.entry.js +2 -0
  587. package/dist/taro-components/p-0a9b984e.system.entry.js.map +1 -0
  588. package/dist/taro-components/p-0accc602.entry.js +2 -0
  589. package/dist/taro-components/p-0accc602.entry.js.map +1 -0
  590. package/dist/taro-components/p-0faf45d5.entry.js +2 -0
  591. package/dist/taro-components/p-0faf45d5.entry.js.map +1 -0
  592. package/dist/taro-components/p-10be7fb5.system.entry.js +2 -0
  593. package/dist/taro-components/p-10be7fb5.system.entry.js.map +1 -0
  594. package/dist/taro-components/p-15e45ed6.system.js.map +1 -1
  595. package/dist/taro-components/p-17302fe9.system.entry.js +2 -0
  596. package/dist/taro-components/p-17302fe9.system.entry.js.map +1 -0
  597. package/dist/taro-components/p-1743a04b.system.js.map +1 -1
  598. package/dist/taro-components/p-1941d333.system.entry.js +2 -0
  599. package/dist/taro-components/p-1941d333.system.entry.js.map +1 -0
  600. package/dist/taro-components/p-19e87e18.entry.js +2 -0
  601. package/dist/taro-components/p-19e87e18.entry.js.map +1 -0
  602. package/dist/taro-components/p-1a0e1932.system.js +3 -0
  603. package/dist/taro-components/p-1a0e1932.system.js.map +1 -0
  604. package/dist/taro-components/p-1c320250.system.entry.js +2 -0
  605. package/dist/taro-components/p-1c320250.system.entry.js.map +1 -0
  606. package/dist/taro-components/p-1c446c65.system.js +2 -0
  607. package/dist/taro-components/p-1c446c65.system.js.map +1 -0
  608. package/dist/taro-components/p-2024e133.system.entry.js +2 -0
  609. package/dist/taro-components/p-2024e133.system.entry.js.map +1 -0
  610. package/dist/taro-components/p-2049bdc4.entry.js +2 -0
  611. package/dist/taro-components/p-2049bdc4.entry.js.map +1 -0
  612. package/dist/taro-components/p-2357313b.entry.js +2 -0
  613. package/dist/taro-components/p-2357313b.entry.js.map +1 -0
  614. package/dist/taro-components/p-24c2fd23.entry.js +2 -0
  615. package/dist/taro-components/p-24c2fd23.entry.js.map +1 -0
  616. package/dist/taro-components/p-26889f3c.system.entry.js +2 -0
  617. package/dist/taro-components/p-26889f3c.system.entry.js.map +1 -0
  618. package/dist/taro-components/p-281278cf.entry.js +2 -0
  619. package/dist/taro-components/p-281278cf.entry.js.map +1 -0
  620. package/dist/taro-components/p-30f32fa2.system.entry.js +2 -0
  621. package/dist/taro-components/p-30f32fa2.system.entry.js.map +1 -0
  622. package/dist/taro-components/p-30fe0e81.system.entry.js +2 -0
  623. package/dist/taro-components/p-30fe0e81.system.entry.js.map +1 -0
  624. package/dist/taro-components/p-33223303.system.entry.js +2 -0
  625. package/dist/taro-components/p-33223303.system.entry.js.map +1 -0
  626. package/dist/taro-components/p-386ae2b2.entry.js +2 -0
  627. package/dist/taro-components/p-386ae2b2.entry.js.map +1 -0
  628. package/dist/taro-components/p-3b1d2d37.system.js.map +1 -1
  629. package/dist/taro-components/p-3bce88d9.entry.js +2 -0
  630. package/dist/taro-components/p-3bce88d9.entry.js.map +1 -0
  631. package/dist/taro-components/p-3f07f3d3.entry.js +2 -0
  632. package/dist/taro-components/p-3f07f3d3.entry.js.map +1 -0
  633. package/dist/taro-components/p-4086e546.system.entry.js +2 -0
  634. package/dist/taro-components/p-4086e546.system.entry.js.map +1 -0
  635. package/dist/taro-components/p-4190e20b.system.entry.js +2 -0
  636. package/dist/taro-components/p-4190e20b.system.entry.js.map +1 -0
  637. package/dist/taro-components/p-4263c9d9.entry.js +2 -0
  638. package/dist/taro-components/p-4263c9d9.entry.js.map +1 -0
  639. package/dist/taro-components/p-46244579.system.entry.js +2 -0
  640. package/dist/taro-components/p-46244579.system.entry.js.map +1 -0
  641. package/dist/taro-components/p-4915fdc1.system.entry.js +2 -0
  642. package/dist/taro-components/p-4915fdc1.system.entry.js.map +1 -0
  643. package/dist/taro-components/p-4a462c95.entry.js +2 -0
  644. package/dist/taro-components/p-4a462c95.entry.js.map +1 -0
  645. package/dist/taro-components/p-4bc85eb7.entry.js +2 -0
  646. package/dist/taro-components/p-4bc85eb7.entry.js.map +1 -0
  647. package/dist/taro-components/p-4d0da795.system.entry.js +2 -0
  648. package/dist/taro-components/p-4d0da795.system.entry.js.map +1 -0
  649. package/dist/taro-components/p-50ea2036.system.js.map +1 -1
  650. package/dist/taro-components/p-518146fd.system.entry.js +2 -0
  651. package/dist/taro-components/p-518146fd.system.entry.js.map +1 -0
  652. package/dist/taro-components/p-51b6fc09.system.entry.js +2 -0
  653. package/dist/taro-components/p-51b6fc09.system.entry.js.map +1 -0
  654. package/dist/taro-components/p-51caa3f3.entry.js +2 -0
  655. package/dist/taro-components/p-51caa3f3.entry.js.map +1 -0
  656. package/dist/taro-components/p-5208792d.entry.js +2 -0
  657. package/dist/taro-components/p-5208792d.entry.js.map +1 -0
  658. package/dist/taro-components/p-56da1da3.system.entry.js +2 -0
  659. package/dist/taro-components/p-56da1da3.system.entry.js.map +1 -0
  660. package/dist/taro-components/p-58877ef2.system.entry.js +2 -0
  661. package/dist/taro-components/p-58877ef2.system.entry.js.map +1 -0
  662. package/dist/taro-components/p-59590806.system.entry.js +2 -0
  663. package/dist/taro-components/p-59590806.system.entry.js.map +1 -0
  664. package/dist/taro-components/p-5beca045.system.entry.js +2 -0
  665. package/dist/taro-components/p-5beca045.system.entry.js.map +1 -0
  666. package/dist/taro-components/p-5d3acf86.entry.js +2 -0
  667. package/dist/taro-components/p-5d3acf86.entry.js.map +1 -0
  668. package/dist/taro-components/p-5f3c65f0.entry.js +2 -0
  669. package/dist/taro-components/p-5f3c65f0.entry.js.map +1 -0
  670. package/dist/taro-components/p-603ceecd.entry.js +2 -0
  671. package/dist/taro-components/p-603ceecd.entry.js.map +1 -0
  672. package/dist/taro-components/p-61f225ef.system.js.map +1 -1
  673. package/dist/taro-components/p-623b3eb6.system.entry.js +2 -0
  674. package/dist/taro-components/p-623b3eb6.system.entry.js.map +1 -0
  675. package/dist/taro-components/p-651586f8.system.entry.js +2 -0
  676. package/dist/taro-components/p-651586f8.system.entry.js.map +1 -0
  677. package/dist/taro-components/p-663e27a0.entry.js +2 -0
  678. package/dist/taro-components/p-663e27a0.entry.js.map +1 -0
  679. package/dist/taro-components/p-66b07ac0.entry.js +2 -0
  680. package/dist/taro-components/p-66b07ac0.entry.js.map +1 -0
  681. package/dist/taro-components/p-67c3a0ba.entry.js +2 -0
  682. package/dist/taro-components/p-67c3a0ba.entry.js.map +1 -0
  683. package/dist/taro-components/p-69f6784d.system.entry.js +2 -0
  684. package/dist/taro-components/p-69f6784d.system.entry.js.map +1 -0
  685. package/dist/taro-components/p-69fa7272.system.entry.js +2 -0
  686. package/dist/taro-components/p-69fa7272.system.entry.js.map +1 -0
  687. package/dist/taro-components/p-6a96da58.js.map +1 -1
  688. package/dist/taro-components/p-6bb1fdf2.entry.js +2 -0
  689. package/dist/taro-components/p-6bb1fdf2.entry.js.map +1 -0
  690. package/dist/taro-components/p-6dae898a.system.entry.js +2 -0
  691. package/dist/taro-components/p-6dae898a.system.entry.js.map +1 -0
  692. package/dist/taro-components/p-6de64a4b.system.entry.js +2 -0
  693. package/dist/taro-components/p-6de64a4b.system.entry.js.map +1 -0
  694. package/dist/taro-components/p-6f048097.system.entry.js +2 -0
  695. package/dist/taro-components/p-6f048097.system.entry.js.map +1 -0
  696. package/dist/taro-components/p-6f214fc3.system.entry.js +2 -0
  697. package/dist/taro-components/p-6f214fc3.system.entry.js.map +1 -0
  698. package/dist/taro-components/p-71155a2c.entry.js +2 -0
  699. package/dist/taro-components/p-71155a2c.entry.js.map +1 -0
  700. package/dist/taro-components/p-72f327e1.js.map +1 -1
  701. package/dist/taro-components/p-736053bb.system.entry.js +2 -0
  702. package/dist/taro-components/p-736053bb.system.entry.js.map +1 -0
  703. package/dist/taro-components/p-74bf8246.system.entry.js +2 -0
  704. package/dist/taro-components/p-74bf8246.system.entry.js.map +1 -0
  705. package/dist/taro-components/p-76724e58.js.map +1 -1
  706. package/dist/taro-components/p-76e6fbff.entry.js +2 -0
  707. package/dist/taro-components/p-76e6fbff.entry.js.map +1 -0
  708. package/dist/taro-components/p-780870eb.entry.js +2 -0
  709. package/dist/taro-components/p-780870eb.entry.js.map +1 -0
  710. package/dist/taro-components/p-78c30850.system.entry.js +2 -0
  711. package/dist/taro-components/p-78c30850.system.entry.js.map +1 -0
  712. package/dist/taro-components/p-78e3ebb9.js +3 -0
  713. package/dist/taro-components/p-78e3ebb9.js.map +1 -0
  714. package/dist/taro-components/p-7a2f11dc.entry.js +2 -0
  715. package/dist/taro-components/p-7a2f11dc.entry.js.map +1 -0
  716. package/dist/taro-components/p-7c1fec76.entry.js +2 -0
  717. package/dist/taro-components/p-7c1fec76.entry.js.map +1 -0
  718. package/dist/taro-components/p-7c6f0d5c.entry.js +2 -0
  719. package/dist/taro-components/p-7c6f0d5c.entry.js.map +1 -0
  720. package/dist/taro-components/p-7dd9c8da.system.entry.js +2 -0
  721. package/dist/taro-components/p-7dd9c8da.system.entry.js.map +1 -0
  722. package/dist/taro-components/p-8027e1c6.system.entry.js +2 -0
  723. package/dist/taro-components/p-8027e1c6.system.entry.js.map +1 -0
  724. package/dist/taro-components/p-828bd091.entry.js +2 -0
  725. package/dist/taro-components/p-828bd091.entry.js.map +1 -0
  726. package/dist/taro-components/p-8425ff09.entry.js +2 -0
  727. package/dist/taro-components/p-8425ff09.entry.js.map +1 -0
  728. package/dist/taro-components/p-8594d1e5.entry.js +2 -0
  729. package/dist/taro-components/p-8594d1e5.entry.js.map +1 -0
  730. package/dist/taro-components/p-8625c29c.entry.js +2 -0
  731. package/dist/taro-components/p-8625c29c.entry.js.map +1 -0
  732. package/dist/taro-components/p-88d64daa.system.entry.js +2 -0
  733. package/dist/taro-components/p-88d64daa.system.entry.js.map +1 -0
  734. package/dist/taro-components/p-88fbacdb.entry.js +2 -0
  735. package/dist/taro-components/p-88fbacdb.entry.js.map +1 -0
  736. package/dist/taro-components/p-895cd7c9.system.entry.js +2 -0
  737. package/dist/taro-components/p-895cd7c9.system.entry.js.map +1 -0
  738. package/dist/taro-components/p-8d2101be.system.entry.js +2 -0
  739. package/dist/taro-components/p-8d2101be.system.entry.js.map +1 -0
  740. package/dist/taro-components/p-8e5cc8fe.system.entry.js +2 -0
  741. package/dist/taro-components/p-8e5cc8fe.system.entry.js.map +1 -0
  742. package/dist/taro-components/p-908ddbb0.entry.js +2 -0
  743. package/dist/taro-components/p-908ddbb0.entry.js.map +1 -0
  744. package/dist/taro-components/p-91f8cd40.entry.js +2 -0
  745. package/dist/taro-components/p-91f8cd40.entry.js.map +1 -0
  746. package/dist/taro-components/p-93ccd68a.entry.js +2 -0
  747. package/dist/taro-components/p-93ccd68a.entry.js.map +1 -0
  748. package/dist/taro-components/p-955fbcfa.entry.js +2 -0
  749. package/dist/taro-components/p-955fbcfa.entry.js.map +1 -0
  750. package/dist/taro-components/p-95f70aea.system.entry.js +2 -0
  751. package/dist/taro-components/p-95f70aea.system.entry.js.map +1 -0
  752. package/dist/taro-components/p-97782cdd.system.entry.js +2 -0
  753. package/dist/taro-components/p-97782cdd.system.entry.js.map +1 -0
  754. package/dist/taro-components/p-982e431d.entry.js +2 -0
  755. package/dist/taro-components/p-982e431d.entry.js.map +1 -0
  756. package/dist/taro-components/p-9d4fa0d3.system.entry.js +2 -0
  757. package/dist/taro-components/p-9d4fa0d3.system.entry.js.map +1 -0
  758. package/dist/taro-components/p-a23a21e1.entry.js +2 -0
  759. package/dist/taro-components/p-a23a21e1.entry.js.map +1 -0
  760. package/dist/taro-components/p-a7789ed6.entry.js +2 -0
  761. package/dist/taro-components/p-a7789ed6.entry.js.map +1 -0
  762. package/dist/taro-components/p-adc37a00.entry.js +2 -0
  763. package/dist/taro-components/p-adc37a00.entry.js.map +1 -0
  764. package/dist/taro-components/p-ae3f1ed4.system.entry.js +2 -0
  765. package/dist/taro-components/p-ae3f1ed4.system.entry.js.map +1 -0
  766. package/dist/taro-components/p-b1249ebb.system.entry.js +2 -0
  767. package/dist/taro-components/p-b1249ebb.system.entry.js.map +1 -0
  768. package/dist/taro-components/p-b1c972e2.system.entry.js +2 -0
  769. package/dist/taro-components/p-b1c972e2.system.entry.js.map +1 -0
  770. package/dist/taro-components/p-b2bb02d7.system.entry.js +2 -0
  771. package/dist/taro-components/p-b2bb02d7.system.entry.js.map +1 -0
  772. package/dist/taro-components/p-b313c11a.entry.js +2 -0
  773. package/dist/taro-components/p-b313c11a.entry.js.map +1 -0
  774. package/dist/taro-components/p-b39b973e.entry.js +2 -0
  775. package/dist/taro-components/p-b39b973e.entry.js.map +1 -0
  776. package/dist/taro-components/p-b4419d86.entry.js +2 -0
  777. package/dist/taro-components/p-b4419d86.entry.js.map +1 -0
  778. package/dist/taro-components/p-b8ba5d0a.entry.js +2 -0
  779. package/dist/taro-components/p-b8ba5d0a.entry.js.map +1 -0
  780. package/dist/taro-components/p-bac3deb0.system.entry.js +2 -0
  781. package/dist/taro-components/p-bac3deb0.system.entry.js.map +1 -0
  782. package/dist/taro-components/p-bba8c3a7.system.entry.js +2 -0
  783. package/dist/taro-components/p-bba8c3a7.system.entry.js.map +1 -0
  784. package/dist/taro-components/p-bd5177d3.system.js +2 -0
  785. package/dist/taro-components/p-bd5177d3.system.js.map +1 -0
  786. package/dist/taro-components/p-c0bb8610.entry.js +2 -0
  787. package/dist/taro-components/p-c0bb8610.entry.js.map +1 -0
  788. package/dist/taro-components/p-c1c0e16d.entry.js +2 -0
  789. package/dist/taro-components/p-c1c0e16d.entry.js.map +1 -0
  790. package/dist/taro-components/p-c2ac8f08.entry.js +2 -0
  791. package/dist/taro-components/p-c2ac8f08.entry.js.map +1 -0
  792. package/dist/taro-components/p-c33733b3.system.entry.js +2 -0
  793. package/dist/taro-components/p-c33733b3.system.entry.js.map +1 -0
  794. package/dist/taro-components/p-c3e98fdf.entry.js +2 -0
  795. package/dist/taro-components/p-c3e98fdf.entry.js.map +1 -0
  796. package/dist/taro-components/p-c4fdb669.system.entry.js +2 -0
  797. package/dist/taro-components/p-c4fdb669.system.entry.js.map +1 -0
  798. package/dist/taro-components/p-c50087fd.entry.js +2 -0
  799. package/dist/taro-components/p-c50087fd.entry.js.map +1 -0
  800. package/dist/taro-components/p-c586a796.system.entry.js +2 -0
  801. package/dist/taro-components/p-c586a796.system.entry.js.map +1 -0
  802. package/dist/taro-components/p-c6e6dab1.system.entry.js +2 -0
  803. package/dist/taro-components/p-c6e6dab1.system.entry.js.map +1 -0
  804. package/dist/taro-components/p-c70dd956.system.entry.js +2 -0
  805. package/dist/taro-components/p-c70dd956.system.entry.js.map +1 -0
  806. package/dist/taro-components/p-d1d19ce9.entry.js +2 -0
  807. package/dist/taro-components/p-d1d19ce9.entry.js.map +1 -0
  808. package/dist/taro-components/p-d3c7f87d.js +2 -0
  809. package/dist/taro-components/p-d3c7f87d.js.map +1 -0
  810. package/dist/taro-components/p-d5234e7e.js.map +1 -1
  811. package/dist/taro-components/p-d562aae3.entry.js +2 -0
  812. package/dist/taro-components/p-d562aae3.entry.js.map +1 -0
  813. package/dist/taro-components/p-d61d3394.entry.js +2 -0
  814. package/dist/taro-components/p-d61d3394.entry.js.map +1 -0
  815. package/dist/taro-components/p-d621d190.entry.js +2 -0
  816. package/dist/taro-components/p-d621d190.entry.js.map +1 -0
  817. package/dist/taro-components/p-d8c8c63f.entry.js +2 -0
  818. package/dist/taro-components/p-d8c8c63f.entry.js.map +1 -0
  819. package/dist/taro-components/p-da5cdbf5.system.entry.js +2 -0
  820. package/dist/taro-components/p-da5cdbf5.system.entry.js.map +1 -0
  821. package/dist/taro-components/p-de2d8e2e.system.entry.js +2 -0
  822. package/dist/taro-components/p-de2d8e2e.system.entry.js.map +1 -0
  823. package/dist/taro-components/p-de356b29.system.entry.js +2 -0
  824. package/dist/taro-components/p-de356b29.system.entry.js.map +1 -0
  825. package/dist/taro-components/p-e0e4a403.entry.js +2 -0
  826. package/dist/taro-components/p-e0e4a403.entry.js.map +1 -0
  827. package/dist/taro-components/p-e3f8265d.system.entry.js +2 -0
  828. package/dist/taro-components/p-e3f8265d.system.entry.js.map +1 -0
  829. package/dist/taro-components/p-e53feb03.system.entry.js +2 -0
  830. package/dist/taro-components/p-e53feb03.system.entry.js.map +1 -0
  831. package/dist/taro-components/p-e67165fd.entry.js +2 -0
  832. package/dist/taro-components/p-e67165fd.entry.js.map +1 -0
  833. package/dist/taro-components/p-eb2a7609.entry.js +2 -0
  834. package/dist/taro-components/p-eb2a7609.entry.js.map +1 -0
  835. package/dist/taro-components/p-eb9adf17.entry.js +2 -0
  836. package/dist/taro-components/p-eb9adf17.entry.js.map +1 -0
  837. package/dist/taro-components/p-ef4c1fd4.entry.js +2 -0
  838. package/dist/taro-components/p-ef4c1fd4.entry.js.map +1 -0
  839. package/dist/taro-components/p-ef7e7d73.system.entry.js +2 -0
  840. package/dist/taro-components/p-ef7e7d73.system.entry.js.map +1 -0
  841. package/dist/taro-components/p-efa51030.system.entry.js +2 -0
  842. package/dist/taro-components/p-efa51030.system.entry.js.map +1 -0
  843. package/dist/taro-components/p-efe31b23.entry.js +2 -0
  844. package/dist/taro-components/p-efe31b23.entry.js.map +1 -0
  845. package/dist/taro-components/p-f034fb11.system.entry.js +2 -0
  846. package/dist/taro-components/p-f034fb11.system.entry.js.map +1 -0
  847. package/dist/taro-components/p-f499c0a0.system.entry.js +2 -0
  848. package/dist/taro-components/p-f499c0a0.system.entry.js.map +1 -0
  849. package/dist/taro-components/p-f88f0f55.entry.js +2 -0
  850. package/dist/taro-components/p-f88f0f55.entry.js.map +1 -0
  851. package/dist/taro-components/p-f9ac515e.system.entry.js +2 -0
  852. package/dist/taro-components/p-f9ac515e.system.entry.js.map +1 -0
  853. package/dist/taro-components/p-fa36fe8e.system.entry.js +2 -0
  854. package/dist/taro-components/p-fa36fe8e.system.entry.js.map +1 -0
  855. package/dist/taro-components/p-fcdac6ec.system.entry.js +2 -0
  856. package/dist/taro-components/p-fcdac6ec.system.entry.js.map +1 -0
  857. package/dist/taro-components/p-fda82bc1.entry.js +2 -0
  858. package/dist/taro-components/p-fda82bc1.entry.js.map +1 -0
  859. package/dist/taro-components/p-fec6746d.entry.js +2 -0
  860. package/dist/taro-components/p-fec6746d.entry.js.map +1 -0
  861. package/dist/taro-components/taro-components.esm.js +1 -1
  862. package/dist/taro-components/taro-components.esm.js.map +1 -1
  863. package/dist/taro-components/taro-components.js +1 -1
  864. package/dist/types/components/icon/icon.d.ts +1 -1
  865. package/dist/types/components/image/image.d.ts +1 -1
  866. package/dist/types/components/picker/picker.d.ts +3 -3
  867. package/dist/types/components/rich-text/rich-text.d.ts +3 -3
  868. package/dist/types/components/swiper/swiper-item.d.ts +2 -0
  869. package/dist/types/components/swiper/swiper.d.ts +1 -0
  870. package/dist/types/components/tabbar/tabbar-item.d.ts +2 -1
  871. package/dist/types/components.d.ts +21 -0
  872. package/dist/types/stencil-public-runtime.d.ts +59 -3
  873. package/dist/types/utils/index.d.ts +1 -0
  874. package/lib/react/components.d.ts +82 -0
  875. package/lib/react/components.js +85 -0
  876. package/lib/react/components.js.map +1 -0
  877. package/lib/react/helper.d.ts +10 -0
  878. package/lib/react/helper.js +7 -0
  879. package/lib/react/helper.js.map +1 -0
  880. package/lib/react/index.d.ts +1 -0
  881. package/lib/react/index.js +2 -0
  882. package/lib/react/index.js.map +1 -0
  883. package/lib/react/interfaces-4f837811.d.ts +30 -0
  884. package/lib/react/react-component-lib/createComponent.d.ts +10 -0
  885. package/lib/react/react-component-lib/createComponent.js +70 -0
  886. package/lib/react/react-component-lib/createComponent.js.map +1 -0
  887. package/lib/react/react-component-lib/createOverlayComponent.d.ts +21 -0
  888. package/lib/react/react-component-lib/createOverlayComponent.js +91 -0
  889. package/lib/react/react-component-lib/createOverlayComponent.js.map +1 -0
  890. package/lib/react/react-component-lib/index.d.ts +2 -0
  891. package/lib/react/react-component-lib/index.js +3 -0
  892. package/lib/react/react-component-lib/index.js.map +1 -0
  893. package/lib/react/react-component-lib/utils/attachProps.d.ts +13 -0
  894. package/lib/react/react-component-lib/utils/attachProps.js +101 -0
  895. package/lib/react/react-component-lib/utils/attachProps.js.map +1 -0
  896. package/lib/react/react-component-lib/utils/case.d.ts +3 -0
  897. package/lib/react/react-component-lib/utils/case.js +9 -0
  898. package/lib/react/react-component-lib/utils/case.js.map +1 -0
  899. package/lib/react/react-component-lib/utils/index.d.ts +11 -0
  900. package/lib/react/react-component-lib/utils/index.js +37 -0
  901. package/lib/react/react-component-lib/utils/index.js.map +1 -0
  902. package/lib/vue2/components.d.ts +353 -0
  903. package/lib/vue2/components.js +621 -0
  904. package/lib/vue2/components.js.map +1 -0
  905. package/lib/vue2/index.d.ts +3 -0
  906. package/lib/vue2/index.js +21 -0
  907. package/lib/vue2/index.js.map +1 -0
  908. package/lib/vue2/vue-component-lib/utils.d.ts +6 -0
  909. package/lib/vue2/vue-component-lib/utils.js +32 -0
  910. package/lib/vue2/vue-component-lib/utils.js.map +1 -0
  911. package/lib/vue3/components.d.ts +82 -0
  912. package/lib/vue3/components.js +386 -0
  913. package/lib/vue3/components.js.map +1 -0
  914. package/lib/vue3/index.d.ts +3 -0
  915. package/lib/vue3/index.js +15 -0
  916. package/lib/vue3/index.js.map +1 -0
  917. package/lib/vue3/vue-component-lib/utils.d.ts +21 -0
  918. package/lib/vue3/vue-component-lib/utils.js +163 -0
  919. package/lib/vue3/vue-component-lib/utils.js.map +1 -0
  920. package/loader/index.d.ts +9 -0
  921. package/package.json +11 -9
  922. package/types/ChannelLive.d.ts +22 -0
  923. package/types/CoverImage.d.ts +4 -4
  924. package/types/CoverView.d.ts +2 -2
  925. package/types/Form.d.ts +6 -0
  926. package/types/Input.d.ts +11 -6
  927. package/types/LivePusher.d.ts +39 -0
  928. package/types/Map.d.ts +6 -0
  929. package/types/MovableArea.d.ts +2 -2
  930. package/types/Radio.d.ts +6 -6
  931. package/types/RadioGroup.d.ts +2 -2
  932. package/types/ScrollView.d.ts +1 -1
  933. package/types/ShareElement.d.ts +0 -5
  934. package/types/Swiper.d.ts +2 -2
  935. package/types/Textarea.d.ts +22 -28
  936. package/types/Video.d.ts +13 -9
  937. package/types/VoipRoom.d.ts +6 -0
  938. package/types/index.d.ts +1 -0
  939. package/types/index.vue3.d.ts +4 -4
  940. package/dist/cjs/index-47a1959e.js +0 -36
  941. package/dist/cjs/index-47a1959e.js.map +0 -1
  942. package/dist/cjs/index-9174e0b1.js +0 -1957
  943. package/dist/cjs/index-9174e0b1.js.map +0 -1
  944. package/dist/esm/index-5d881caf.js +0 -1929
  945. package/dist/esm/index-5d881caf.js.map +0 -1
  946. package/dist/esm/index-cad8203e.js +0 -33
  947. package/dist/esm/index-cad8203e.js.map +0 -1
  948. package/dist/esm-es5/index-5d881caf.js +0 -3
  949. package/dist/esm-es5/index-5d881caf.js.map +0 -1
  950. package/dist/esm-es5/index-cad8203e.js +0 -2
  951. package/dist/esm-es5/index-cad8203e.js.map +0 -1
  952. package/dist/react/component-lib/index.js +0 -74
  953. package/dist/react/component-lib/input.js +0 -17
  954. package/dist/react/component-lib/reactify-wc.js +0 -206
  955. package/dist/react/components.js +0 -82
  956. package/dist/react/helper.js +0 -8
  957. package/dist/react/index.js +0 -1
  958. package/dist/react/react-component-lib/createComponent.js +0 -99
  959. package/dist/react/react-component-lib/createOverlayComponent.js +0 -178
  960. package/dist/react/react-component-lib/index.js +0 -2
  961. package/dist/react/react-component-lib/interfaces.js +0 -0
  962. package/dist/react/react-component-lib/utils/attachProps.js +0 -98
  963. package/dist/react/react-component-lib/utils/case.js +0 -10
  964. package/dist/react/react-component-lib/utils/dev.js +0 -12
  965. package/dist/react/react-component-lib/utils/index.js +0 -37
  966. package/dist/taro-components/p-001ef419.system.entry.js +0 -2
  967. package/dist/taro-components/p-001ef419.system.entry.js.map +0 -1
  968. package/dist/taro-components/p-01dc54a5.entry.js +0 -2
  969. package/dist/taro-components/p-01dc54a5.entry.js.map +0 -1
  970. package/dist/taro-components/p-0382d7d0.system.entry.js +0 -2
  971. package/dist/taro-components/p-0382d7d0.system.entry.js.map +0 -1
  972. package/dist/taro-components/p-0a896bc7.entry.js +0 -2
  973. package/dist/taro-components/p-0a896bc7.entry.js.map +0 -1
  974. package/dist/taro-components/p-0b38e6c7.system.entry.js +0 -2
  975. package/dist/taro-components/p-0b38e6c7.system.entry.js.map +0 -1
  976. package/dist/taro-components/p-0be383a9.system.entry.js +0 -2
  977. package/dist/taro-components/p-0be383a9.system.entry.js.map +0 -1
  978. package/dist/taro-components/p-0d36ef6b.entry.js +0 -2
  979. package/dist/taro-components/p-0d36ef6b.entry.js.map +0 -1
  980. package/dist/taro-components/p-0ee6a068.entry.js +0 -2
  981. package/dist/taro-components/p-0ee6a068.entry.js.map +0 -1
  982. package/dist/taro-components/p-12e4b019.entry.js +0 -2
  983. package/dist/taro-components/p-12e4b019.entry.js.map +0 -1
  984. package/dist/taro-components/p-15dced71.system.entry.js +0 -2
  985. package/dist/taro-components/p-15dced71.system.entry.js.map +0 -1
  986. package/dist/taro-components/p-17657dca.entry.js +0 -2
  987. package/dist/taro-components/p-17657dca.entry.js.map +0 -1
  988. package/dist/taro-components/p-186ad7ff.entry.js +0 -2
  989. package/dist/taro-components/p-186ad7ff.entry.js.map +0 -1
  990. package/dist/taro-components/p-19afe402.entry.js +0 -2
  991. package/dist/taro-components/p-19afe402.entry.js.map +0 -1
  992. package/dist/taro-components/p-1a47133c.system.entry.js +0 -2
  993. package/dist/taro-components/p-1a47133c.system.entry.js.map +0 -1
  994. package/dist/taro-components/p-1ad0aa95.system.entry.js +0 -2
  995. package/dist/taro-components/p-1ad0aa95.system.entry.js.map +0 -1
  996. package/dist/taro-components/p-1b1420c9.system.entry.js +0 -2
  997. package/dist/taro-components/p-1b1420c9.system.entry.js.map +0 -1
  998. package/dist/taro-components/p-1b2556e2.system.entry.js +0 -2
  999. package/dist/taro-components/p-1b2556e2.system.entry.js.map +0 -1
  1000. package/dist/taro-components/p-1b64d2a2.entry.js +0 -2
  1001. package/dist/taro-components/p-1b64d2a2.entry.js.map +0 -1
  1002. package/dist/taro-components/p-1bd3d09b.system.entry.js +0 -2
  1003. package/dist/taro-components/p-1bd3d09b.system.entry.js.map +0 -1
  1004. package/dist/taro-components/p-1cb76199.entry.js +0 -2
  1005. package/dist/taro-components/p-1cb76199.entry.js.map +0 -1
  1006. package/dist/taro-components/p-2096bc5f.entry.js +0 -2
  1007. package/dist/taro-components/p-2096bc5f.entry.js.map +0 -1
  1008. package/dist/taro-components/p-20ec6387.entry.js +0 -2
  1009. package/dist/taro-components/p-20ec6387.entry.js.map +0 -1
  1010. package/dist/taro-components/p-21b77a13.system.entry.js +0 -2
  1011. package/dist/taro-components/p-21b77a13.system.entry.js.map +0 -1
  1012. package/dist/taro-components/p-2243a376.entry.js +0 -2
  1013. package/dist/taro-components/p-2243a376.entry.js.map +0 -1
  1014. package/dist/taro-components/p-281a2bcf.entry.js +0 -2
  1015. package/dist/taro-components/p-281a2bcf.entry.js.map +0 -1
  1016. package/dist/taro-components/p-28dade4f.entry.js +0 -2
  1017. package/dist/taro-components/p-28dade4f.entry.js.map +0 -1
  1018. package/dist/taro-components/p-29f04296.entry.js +0 -2
  1019. package/dist/taro-components/p-29f04296.entry.js.map +0 -1
  1020. package/dist/taro-components/p-301a8b85.system.entry.js +0 -2
  1021. package/dist/taro-components/p-301a8b85.system.entry.js.map +0 -1
  1022. package/dist/taro-components/p-31e10d77.system.entry.js +0 -2
  1023. package/dist/taro-components/p-31e10d77.system.entry.js.map +0 -1
  1024. package/dist/taro-components/p-36c64ed0.system.entry.js +0 -2
  1025. package/dist/taro-components/p-36c64ed0.system.entry.js.map +0 -1
  1026. package/dist/taro-components/p-37d71e63.entry.js +0 -2
  1027. package/dist/taro-components/p-37d71e63.entry.js.map +0 -1
  1028. package/dist/taro-components/p-386b9de8.entry.js +0 -2
  1029. package/dist/taro-components/p-386b9de8.entry.js.map +0 -1
  1030. package/dist/taro-components/p-3b9a1125.entry.js +0 -2
  1031. package/dist/taro-components/p-3b9a1125.entry.js.map +0 -1
  1032. package/dist/taro-components/p-3c256e0e.entry.js +0 -2
  1033. package/dist/taro-components/p-3c256e0e.entry.js.map +0 -1
  1034. package/dist/taro-components/p-3e6b29c6.entry.js +0 -2
  1035. package/dist/taro-components/p-3e6b29c6.entry.js.map +0 -1
  1036. package/dist/taro-components/p-427a2872.entry.js +0 -2
  1037. package/dist/taro-components/p-427a2872.entry.js.map +0 -1
  1038. package/dist/taro-components/p-439a3349.system.entry.js +0 -2
  1039. package/dist/taro-components/p-439a3349.system.entry.js.map +0 -1
  1040. package/dist/taro-components/p-447386b2.system.entry.js +0 -2
  1041. package/dist/taro-components/p-447386b2.system.entry.js.map +0 -1
  1042. package/dist/taro-components/p-45b6ea0c.system.entry.js +0 -2
  1043. package/dist/taro-components/p-45b6ea0c.system.entry.js.map +0 -1
  1044. package/dist/taro-components/p-49a6cae4.system.entry.js +0 -2
  1045. package/dist/taro-components/p-49a6cae4.system.entry.js.map +0 -1
  1046. package/dist/taro-components/p-4b05e003.entry.js +0 -2
  1047. package/dist/taro-components/p-4b05e003.entry.js.map +0 -1
  1048. package/dist/taro-components/p-4b27df71.system.entry.js +0 -2
  1049. package/dist/taro-components/p-4b27df71.system.entry.js.map +0 -1
  1050. package/dist/taro-components/p-4b71c926.entry.js +0 -2
  1051. package/dist/taro-components/p-4b71c926.entry.js.map +0 -1
  1052. package/dist/taro-components/p-4fbb8b4c.system.entry.js +0 -2
  1053. package/dist/taro-components/p-4fbb8b4c.system.entry.js.map +0 -1
  1054. package/dist/taro-components/p-51040638.entry.js +0 -2
  1055. package/dist/taro-components/p-51040638.entry.js.map +0 -1
  1056. package/dist/taro-components/p-55519002.entry.js +0 -2
  1057. package/dist/taro-components/p-55519002.entry.js.map +0 -1
  1058. package/dist/taro-components/p-570222e2.entry.js +0 -2
  1059. package/dist/taro-components/p-570222e2.entry.js.map +0 -1
  1060. package/dist/taro-components/p-5746d7ce.js +0 -2
  1061. package/dist/taro-components/p-5746d7ce.js.map +0 -1
  1062. package/dist/taro-components/p-580a72d1.system.entry.js +0 -2
  1063. package/dist/taro-components/p-580a72d1.system.entry.js.map +0 -1
  1064. package/dist/taro-components/p-59418be7.system.entry.js +0 -2
  1065. package/dist/taro-components/p-59418be7.system.entry.js.map +0 -1
  1066. package/dist/taro-components/p-59e02aca.system.entry.js +0 -2
  1067. package/dist/taro-components/p-59e02aca.system.entry.js.map +0 -1
  1068. package/dist/taro-components/p-5b552407.entry.js +0 -2
  1069. package/dist/taro-components/p-5b552407.entry.js.map +0 -1
  1070. package/dist/taro-components/p-5bd1c1a1.entry.js +0 -2
  1071. package/dist/taro-components/p-5bd1c1a1.entry.js.map +0 -1
  1072. package/dist/taro-components/p-5bfefd19.js +0 -3
  1073. package/dist/taro-components/p-5bfefd19.js.map +0 -1
  1074. package/dist/taro-components/p-62d750a7.entry.js +0 -2
  1075. package/dist/taro-components/p-62d750a7.entry.js.map +0 -1
  1076. package/dist/taro-components/p-632f9a72.system.entry.js +0 -2
  1077. package/dist/taro-components/p-632f9a72.system.entry.js.map +0 -1
  1078. package/dist/taro-components/p-65971d99.entry.js +0 -2
  1079. package/dist/taro-components/p-65971d99.entry.js.map +0 -1
  1080. package/dist/taro-components/p-663d1bb9.system.js +0 -2
  1081. package/dist/taro-components/p-663d1bb9.system.js.map +0 -1
  1082. package/dist/taro-components/p-6831f7b1.system.entry.js +0 -2
  1083. package/dist/taro-components/p-6831f7b1.system.entry.js.map +0 -1
  1084. package/dist/taro-components/p-6af8be19.entry.js +0 -2
  1085. package/dist/taro-components/p-6af8be19.entry.js.map +0 -1
  1086. package/dist/taro-components/p-6c622fa2.system.entry.js +0 -2
  1087. package/dist/taro-components/p-6c622fa2.system.entry.js.map +0 -1
  1088. package/dist/taro-components/p-6cd941bc.entry.js +0 -2
  1089. package/dist/taro-components/p-6cd941bc.entry.js.map +0 -1
  1090. package/dist/taro-components/p-6ea2995b.entry.js +0 -2
  1091. package/dist/taro-components/p-6ea2995b.entry.js.map +0 -1
  1092. package/dist/taro-components/p-6f8af69f.entry.js +0 -2
  1093. package/dist/taro-components/p-6f8af69f.entry.js.map +0 -1
  1094. package/dist/taro-components/p-701b0286.system.entry.js +0 -2
  1095. package/dist/taro-components/p-701b0286.system.entry.js.map +0 -1
  1096. package/dist/taro-components/p-70defa84.entry.js +0 -2
  1097. package/dist/taro-components/p-70defa84.entry.js.map +0 -1
  1098. package/dist/taro-components/p-72f626ab.system.entry.js +0 -2
  1099. package/dist/taro-components/p-72f626ab.system.entry.js.map +0 -1
  1100. package/dist/taro-components/p-73106bc9.entry.js +0 -2
  1101. package/dist/taro-components/p-73106bc9.entry.js.map +0 -1
  1102. package/dist/taro-components/p-755be847.system.entry.js +0 -2
  1103. package/dist/taro-components/p-755be847.system.entry.js.map +0 -1
  1104. package/dist/taro-components/p-7afc274a.entry.js +0 -2
  1105. package/dist/taro-components/p-7afc274a.entry.js.map +0 -1
  1106. package/dist/taro-components/p-7bafbe22.entry.js +0 -2
  1107. package/dist/taro-components/p-7bafbe22.entry.js.map +0 -1
  1108. package/dist/taro-components/p-7e7a1e62.entry.js +0 -2
  1109. package/dist/taro-components/p-7e7a1e62.entry.js.map +0 -1
  1110. package/dist/taro-components/p-8231e748.entry.js +0 -2
  1111. package/dist/taro-components/p-8231e748.entry.js.map +0 -1
  1112. package/dist/taro-components/p-876edf66.entry.js +0 -2
  1113. package/dist/taro-components/p-876edf66.entry.js.map +0 -1
  1114. package/dist/taro-components/p-898aba38.system.entry.js +0 -2
  1115. package/dist/taro-components/p-898aba38.system.entry.js.map +0 -1
  1116. package/dist/taro-components/p-8a3620a6.system.entry.js +0 -2
  1117. package/dist/taro-components/p-8a3620a6.system.entry.js.map +0 -1
  1118. package/dist/taro-components/p-8a8f286f.system.js +0 -3
  1119. package/dist/taro-components/p-8a8f286f.system.js.map +0 -1
  1120. package/dist/taro-components/p-8bec95d4.system.entry.js +0 -2
  1121. package/dist/taro-components/p-8bec95d4.system.entry.js.map +0 -1
  1122. package/dist/taro-components/p-8c8fe164.system.entry.js +0 -2
  1123. package/dist/taro-components/p-8c8fe164.system.entry.js.map +0 -1
  1124. package/dist/taro-components/p-93cc7adc.entry.js +0 -2
  1125. package/dist/taro-components/p-93cc7adc.entry.js.map +0 -1
  1126. package/dist/taro-components/p-96a784f1.entry.js +0 -2
  1127. package/dist/taro-components/p-96a784f1.entry.js.map +0 -1
  1128. package/dist/taro-components/p-98901e99.system.entry.js +0 -2
  1129. package/dist/taro-components/p-98901e99.system.entry.js.map +0 -1
  1130. package/dist/taro-components/p-99bbe34a.system.entry.js +0 -2
  1131. package/dist/taro-components/p-99bbe34a.system.entry.js.map +0 -1
  1132. package/dist/taro-components/p-9e20c25c.entry.js +0 -2
  1133. package/dist/taro-components/p-9e20c25c.entry.js.map +0 -1
  1134. package/dist/taro-components/p-9f1ca602.system.entry.js +0 -2
  1135. package/dist/taro-components/p-9f1ca602.system.entry.js.map +0 -1
  1136. package/dist/taro-components/p-9f780103.system.entry.js +0 -2
  1137. package/dist/taro-components/p-9f780103.system.entry.js.map +0 -1
  1138. package/dist/taro-components/p-a1ace8c7.system.entry.js +0 -2
  1139. package/dist/taro-components/p-a1ace8c7.system.entry.js.map +0 -1
  1140. package/dist/taro-components/p-a29509fa.system.entry.js +0 -2
  1141. package/dist/taro-components/p-a29509fa.system.entry.js.map +0 -1
  1142. package/dist/taro-components/p-a4961ddd.entry.js +0 -2
  1143. package/dist/taro-components/p-a4961ddd.entry.js.map +0 -1
  1144. package/dist/taro-components/p-a6f2dc54.system.entry.js +0 -2
  1145. package/dist/taro-components/p-a6f2dc54.system.entry.js.map +0 -1
  1146. package/dist/taro-components/p-ab105c26.entry.js +0 -2
  1147. package/dist/taro-components/p-ab105c26.entry.js.map +0 -1
  1148. package/dist/taro-components/p-ad25cc91.system.entry.js +0 -2
  1149. package/dist/taro-components/p-ad25cc91.system.entry.js.map +0 -1
  1150. package/dist/taro-components/p-b04a56bd.system.entry.js +0 -2
  1151. package/dist/taro-components/p-b04a56bd.system.entry.js.map +0 -1
  1152. package/dist/taro-components/p-b10cb428.entry.js +0 -2
  1153. package/dist/taro-components/p-b10cb428.entry.js.map +0 -1
  1154. package/dist/taro-components/p-b4cccb3e.system.entry.js +0 -2
  1155. package/dist/taro-components/p-b4cccb3e.system.entry.js.map +0 -1
  1156. package/dist/taro-components/p-b4ec48c3.entry.js +0 -2
  1157. package/dist/taro-components/p-b4ec48c3.entry.js.map +0 -1
  1158. package/dist/taro-components/p-b500c116.system.entry.js +0 -2
  1159. package/dist/taro-components/p-b500c116.system.entry.js.map +0 -1
  1160. package/dist/taro-components/p-b6733e23.system.entry.js +0 -2
  1161. package/dist/taro-components/p-b6733e23.system.entry.js.map +0 -1
  1162. package/dist/taro-components/p-b832f4e8.entry.js +0 -2
  1163. package/dist/taro-components/p-b832f4e8.entry.js.map +0 -1
  1164. package/dist/taro-components/p-b88a55b4.system.entry.js +0 -2
  1165. package/dist/taro-components/p-b88a55b4.system.entry.js.map +0 -1
  1166. package/dist/taro-components/p-b90926cc.entry.js +0 -2
  1167. package/dist/taro-components/p-b90926cc.entry.js.map +0 -1
  1168. package/dist/taro-components/p-ba743573.entry.js +0 -2
  1169. package/dist/taro-components/p-ba743573.entry.js.map +0 -1
  1170. package/dist/taro-components/p-be3f5ac0.entry.js +0 -2
  1171. package/dist/taro-components/p-be3f5ac0.entry.js.map +0 -1
  1172. package/dist/taro-components/p-beea63a7.entry.js +0 -2
  1173. package/dist/taro-components/p-beea63a7.entry.js.map +0 -1
  1174. package/dist/taro-components/p-c0e3c822.system.entry.js +0 -2
  1175. package/dist/taro-components/p-c0e3c822.system.entry.js.map +0 -1
  1176. package/dist/taro-components/p-c3bb8fa6.entry.js +0 -2
  1177. package/dist/taro-components/p-c3bb8fa6.entry.js.map +0 -1
  1178. package/dist/taro-components/p-c43fe342.system.entry.js +0 -2
  1179. package/dist/taro-components/p-c43fe342.system.entry.js.map +0 -1
  1180. package/dist/taro-components/p-c4cf58af.system.entry.js +0 -2
  1181. package/dist/taro-components/p-c4cf58af.system.entry.js.map +0 -1
  1182. package/dist/taro-components/p-c5c331bf.system.entry.js +0 -2
  1183. package/dist/taro-components/p-c5c331bf.system.entry.js.map +0 -1
  1184. package/dist/taro-components/p-cb17d8bd.system.js +0 -2
  1185. package/dist/taro-components/p-cb17d8bd.system.js.map +0 -1
  1186. package/dist/taro-components/p-cbe2436d.system.entry.js +0 -2
  1187. package/dist/taro-components/p-cbe2436d.system.entry.js.map +0 -1
  1188. package/dist/taro-components/p-cd6a7eea.entry.js +0 -2
  1189. package/dist/taro-components/p-cd6a7eea.entry.js.map +0 -1
  1190. package/dist/taro-components/p-d388c097.entry.js +0 -2
  1191. package/dist/taro-components/p-d388c097.entry.js.map +0 -1
  1192. package/dist/taro-components/p-d4b6f19e.system.entry.js +0 -2
  1193. package/dist/taro-components/p-d4b6f19e.system.entry.js.map +0 -1
  1194. package/dist/taro-components/p-d619f198.system.entry.js +0 -2
  1195. package/dist/taro-components/p-d619f198.system.entry.js.map +0 -1
  1196. package/dist/taro-components/p-d6441fd8.entry.js +0 -2
  1197. package/dist/taro-components/p-d6441fd8.entry.js.map +0 -1
  1198. package/dist/taro-components/p-d7ab3e23.system.entry.js +0 -2
  1199. package/dist/taro-components/p-d7ab3e23.system.entry.js.map +0 -1
  1200. package/dist/taro-components/p-d7f4b10f.entry.js +0 -2
  1201. package/dist/taro-components/p-d7f4b10f.entry.js.map +0 -1
  1202. package/dist/taro-components/p-d85b216d.entry.js +0 -2
  1203. package/dist/taro-components/p-d85b216d.entry.js.map +0 -1
  1204. package/dist/taro-components/p-dcb48fd9.system.entry.js +0 -2
  1205. package/dist/taro-components/p-dcb48fd9.system.entry.js.map +0 -1
  1206. package/dist/taro-components/p-dcfb7d97.system.entry.js +0 -2
  1207. package/dist/taro-components/p-dcfb7d97.system.entry.js.map +0 -1
  1208. package/dist/taro-components/p-de762042.entry.js +0 -2
  1209. package/dist/taro-components/p-de762042.entry.js.map +0 -1
  1210. package/dist/taro-components/p-df862d0c.entry.js +0 -2
  1211. package/dist/taro-components/p-df862d0c.entry.js.map +0 -1
  1212. package/dist/taro-components/p-e0d6b00b.entry.js +0 -2
  1213. package/dist/taro-components/p-e0d6b00b.entry.js.map +0 -1
  1214. package/dist/taro-components/p-e4f1cc50.entry.js +0 -2
  1215. package/dist/taro-components/p-e4f1cc50.entry.js.map +0 -1
  1216. package/dist/taro-components/p-e5607803.system.entry.js +0 -2
  1217. package/dist/taro-components/p-e5607803.system.entry.js.map +0 -1
  1218. package/dist/taro-components/p-e59f999e.entry.js +0 -2
  1219. package/dist/taro-components/p-e59f999e.entry.js.map +0 -1
  1220. package/dist/taro-components/p-e7239faa.system.entry.js +0 -2
  1221. package/dist/taro-components/p-e7239faa.system.entry.js.map +0 -1
  1222. package/dist/taro-components/p-e7965c55.system.entry.js +0 -2
  1223. package/dist/taro-components/p-e7965c55.system.entry.js.map +0 -1
  1224. package/dist/taro-components/p-e98c07c3.system.entry.js +0 -2
  1225. package/dist/taro-components/p-e98c07c3.system.entry.js.map +0 -1
  1226. package/dist/taro-components/p-eddd00e9.system.entry.js +0 -2
  1227. package/dist/taro-components/p-eddd00e9.system.entry.js.map +0 -1
  1228. package/dist/taro-components/p-ef029c30.system.entry.js +0 -2
  1229. package/dist/taro-components/p-ef029c30.system.entry.js.map +0 -1
  1230. package/dist/taro-components/p-f00ee372.system.entry.js +0 -2
  1231. package/dist/taro-components/p-f00ee372.system.entry.js.map +0 -1
  1232. package/dist/taro-components/p-f0d0160d.system.entry.js +0 -2
  1233. package/dist/taro-components/p-f0d0160d.system.entry.js.map +0 -1
  1234. package/dist/taro-components/p-f120c272.entry.js +0 -2
  1235. package/dist/taro-components/p-f120c272.entry.js.map +0 -1
  1236. package/dist/taro-components/p-f2c75971.system.entry.js +0 -2
  1237. package/dist/taro-components/p-f2c75971.system.entry.js.map +0 -1
  1238. package/dist/taro-components/p-f81d14ad.entry.js +0 -2
  1239. package/dist/taro-components/p-f81d14ad.entry.js.map +0 -1
  1240. package/dist/taro-components/p-fae28cc1.system.entry.js +0 -2
  1241. package/dist/taro-components/p-fae28cc1.system.entry.js.map +0 -1
  1242. package/dist/taro-components/p-fb843ff2.system.entry.js +0 -2
  1243. package/dist/taro-components/p-fb843ff2.system.entry.js.map +0 -1
  1244. package/dist/taro-components/p-fc0fbcce.system.entry.js +0 -2
  1245. package/dist/taro-components/p-fc0fbcce.system.entry.js.map +0 -1
  1246. package/dist/taro-components/p-ffc44634.entry.js +0 -2
  1247. package/dist/taro-components/p-ffc44634.entry.js.map +0 -1
  1248. package/dist/vue2/component-lib/components.js +0 -71
  1249. package/dist/vue2/component-lib/createComponent.js +0 -21
  1250. package/dist/vue2/component-lib/createFormsComponent.js +0 -53
  1251. package/dist/vue2/component-lib/icon.js +0 -19
  1252. package/dist/vue2/component-lib/image.js +0 -20
  1253. package/dist/vue2/component-lib/index.js +0 -28
  1254. package/dist/vue2/component-lib/mixins/listeners.js +0 -14
  1255. package/dist/vue2/component-lib/mixins/refs.js +0 -44
  1256. package/dist/vue2/component-lib/picker.js +0 -40
  1257. package/dist/vue2/component-lib/scroll-view.js +0 -32
  1258. package/dist/vue2/component-lib/text.js +0 -20
  1259. package/dist/vue2/components.js +0 -542
  1260. package/dist/vue2/index.js +0 -22
  1261. package/dist/vue2/vue-component-lib/utils.js +0 -40
  1262. package/dist/vue3/component-lib/createComponent.js +0 -23
  1263. package/dist/vue3/component-lib/createFormsComponent.js +0 -43
  1264. package/dist/vue3/component-lib/forwardRef.js +0 -9
  1265. package/dist/vue3/component-lib/icon.js +0 -21
  1266. package/dist/vue3/component-lib/image.js +0 -22
  1267. package/dist/vue3/component-lib/index.js +0 -76
  1268. package/dist/vue3/component-lib/scroll-view.js +0 -28
  1269. package/dist/vue3/component-lib/text.js +0 -22
  1270. package/dist/vue3/components.js +0 -80
  1271. package/dist/vue3/index.js +0 -17
  1272. package/dist/vue3/vue-component-lib/utils.js +0 -175
@@ -1,2 +1,2 @@
1
- import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-5d881caf.js";var indexCss="taro-switch-core{display:inline-block;width:52px;height:32px}taro-switch-core .weui-switch{display:block;width:100%;height:100%}";var Switch=function(){function e(e){var t=this;registerInstance(this,e);this.onChange=createEvent(this,"change",7);this.switchChange=function(e){e.stopPropagation();var i=e.target.checked;t.isChecked=i;t.onChange.emit({value:i})};this.type="switch";this.checked=false;this.color="#04BE02";this.name=undefined;this.disabled=false;this.nativeProps={};this.isChecked=undefined;this.isWillLoadCalled=false}e.prototype.function=function(e,t){if(!this.isWillLoadCalled)return;if(e!==t)this.isChecked=e};e.prototype.componentWillLoad=function(){this.isWillLoadCalled=true;this.isChecked=this.checked};e.prototype.componentDidLoad=function(){var e=this;Object.defineProperty(this.el,"value",{get:function(){return e.isChecked},configurable:true})};e.prototype.render=function(){var e=this,t=e.type,i=e.color,n=e.isChecked,s=e.name,r=e.disabled,c=e.nativeProps;var o=n?{borderColor:i||"04BE02",backgroundColor:i||"04BE02"}:{};return h("input",Object.assign({type:"checkbox",class:"weui-".concat(t),style:o,checked:n,name:s,disabled:r,onChange:this.switchChange},c))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{checked:["function"]}},enumerable:false,configurable:true});return e}();Switch.style=indexCss;export{Switch as taro_switch_core};
1
+ import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-c948674f.js";var indexCss="taro-switch-core{display:inline-block;width:52px;height:32px}taro-switch-core .weui-switch{display:block;width:100%;height:100%}";var Switch=function(){function e(e){var t=this;registerInstance(this,e);this.onChange=createEvent(this,"change",7);this.switchChange=function(e){e.stopPropagation();var i=e.target.checked;t.isChecked=i;t.onChange.emit({value:i})};this.type="switch";this.checked=false;this.color="#04BE02";this.name=undefined;this.disabled=false;this.nativeProps={};this.isChecked=undefined;this.isWillLoadCalled=false}e.prototype.function=function(e,t){if(!this.isWillLoadCalled)return;if(e!==t)this.isChecked=e};e.prototype.componentWillLoad=function(){this.isWillLoadCalled=true;this.isChecked=this.checked};e.prototype.componentDidLoad=function(){var e=this;Object.defineProperty(this.el,"value",{get:function(){return e.isChecked},configurable:true})};e.prototype.render=function(){var e=this,t=e.type,i=e.color,n=e.isChecked,s=e.name,r=e.disabled,c=e.nativeProps;var o=n?{borderColor:i||"04BE02",backgroundColor:i||"04BE02"}:{};return h("input",Object.assign({type:"checkbox",class:"weui-".concat(t),style:o,checked:n,name:s,disabled:r,onChange:this.switchChange},c))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{checked:["function"]}},enumerable:false,configurable:true});return e}();Switch.style=indexCss;export{Switch as taro_switch_core};
2
2
  //# sourceMappingURL=taro-switch-core.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["src/components/switch/style/index.scss?tag=taro-switch-core","src/components/switch/switch.tsx"],"names":["indexCss","Switch","this","switchChange","e","stopPropagation","value","target","checked","_this","isChecked","onChange","emit","prototype","function","newVal","oldVal","isWillLoadCalled","componentWillLoad","componentDidLoad","Object","defineProperty","el","get","configurable","render","_a","type","color","name","disabled","nativeProps","style","borderColor","backgroundColor","h","assign","class","concat"],"mappings":"0FAAA,IAAMA,SAAW,uICMJC,OAAM,wGAoCjBC,KAAAC,aAAe,SAAAC,GACbA,EAAEC,kBACF,IAAMC,EAAQF,EAAEG,OAAOC,QACvBC,EAAKC,UAAYJ,EACjBG,EAAKE,SAASC,KAAK,CACjBN,MAAKA,eAxCM,sBACG,iBACF,4CAEG,uBACG,kDAGM,MAK5BL,EAAAY,UAAAC,SAAA,SAAUC,EAAiBC,GACzB,IAAKd,KAAKe,iBAAkB,OAC5B,GAAIF,IAAWC,EAAQd,KAAKQ,UAAYK,GAQ1Cd,EAAAY,UAAAK,kBAAA,WACEhB,KAAKe,iBAAmB,KACxBf,KAAKQ,UAAYR,KAAKM,SAGxBP,EAAAY,UAAAM,iBAAA,WAAA,IAAAV,EAAAP,KACEkB,OAAOC,eAAenB,KAAKoB,GAAI,QAAS,CACtCC,IAAK,WAAM,OAAAd,EAAKC,WAChBc,aAAc,QAalBvB,EAAAY,UAAAY,OAAA,WACQ,IAAAC,EAOFxB,KANFyB,EAAID,EAAAC,KACJC,EAAKF,EAAAE,MACLlB,EAASgB,EAAAhB,UACTmB,EAAIH,EAAAG,KACJC,EAAQJ,EAAAI,SACRC,EAAWL,EAAAK,YAGb,IAAMC,EAAQtB,EACV,CACAuB,YAAaL,GAAS,SACtBM,gBAAiBN,GAAS,UAE1B,GAEJ,OACEO,EAAA,QAAAf,OAAAgB,OAAA,CACET,KAAK,WACLU,MAAO,QAAAC,OAAQX,GACfK,MAAOA,EACPxB,QAASE,EACTmB,KAAMA,EACNC,SAAUA,EACVnB,SAAUT,KAAKC,cACX4B,yPAvEO","sourcesContent":["taro-switch-core {\n display: inline-block;\n width: 52px;\n height: 32px;\n\n .weui-switch {\n display: block;\n width: 100%;\n height: 100%;\n }\n}\n","import { Component, h, ComponentInterface, Prop, State, Event, EventEmitter, Watch, Element } from '@stencil/core'\n\n@Component({\n tag: 'taro-switch-core',\n styleUrl: './style/index.scss'\n})\nexport class Switch implements ComponentInterface {\n @Prop() type = 'switch'\n @Prop() checked = false\n @Prop() color = '#04BE02'\n @Prop() name: string\n @Prop() disabled = false\n @Prop() nativeProps = {}\n\n @State() isChecked: boolean\n @State() isWillLoadCalled = false\n\n @Element() el: HTMLElement\n\n @Watch('checked')\n function (newVal: boolean, oldVal: boolean) {\n if (!this.isWillLoadCalled) return\n if (newVal !== oldVal) this.isChecked = newVal\n }\n\n @Event({\n eventName: 'change'\n })\n onChange: EventEmitter\n\n componentWillLoad () {\n this.isWillLoadCalled = true\n this.isChecked = this.checked\n }\n\n componentDidLoad () {\n Object.defineProperty(this.el, 'value', {\n get: () => this.isChecked,\n configurable: true\n })\n }\n\n switchChange = e => {\n e.stopPropagation()\n const value = e.target.checked\n this.isChecked = value\n this.onChange.emit({\n value\n })\n }\n\n render () {\n const {\n type,\n color,\n isChecked,\n name,\n disabled,\n nativeProps\n } = this\n\n const style = isChecked\n ? {\n borderColor: color || '04BE02',\n backgroundColor: color || '04BE02'\n }\n : {}\n\n return (\n <input\n type='checkbox'\n class={`weui-${type}`}\n style={style}\n checked={isChecked}\n name={name}\n disabled={disabled}\n onChange={this.switchChange}\n {...nativeProps}\n />\n )\n }\n}\n"]}
1
+ {"version":3,"names":["indexCss","Switch","this","switchChange","e","stopPropagation","value","target","checked","_this","isChecked","onChange","emit","prototype","function","newVal","oldVal","isWillLoadCalled","componentWillLoad","componentDidLoad","Object","defineProperty","el","get","configurable","render","_a","type","color","name","disabled","nativeProps","style","borderColor","backgroundColor","h","assign","class","concat"],"sources":["src/components/switch/style/index.scss?tag=taro-switch-core","src/components/switch/switch.tsx"],"sourcesContent":["taro-switch-core {\n display: inline-block;\n width: 52px;\n height: 32px;\n\n .weui-switch {\n display: block;\n width: 100%;\n height: 100%;\n }\n}\n","import { Component, h, ComponentInterface, Prop, State, Event, EventEmitter, Watch, Element } from '@stencil/core'\n\n@Component({\n tag: 'taro-switch-core',\n styleUrl: './style/index.scss'\n})\nexport class Switch implements ComponentInterface {\n @Prop() type = 'switch'\n @Prop() checked = false\n @Prop() color = '#04BE02'\n @Prop() name: string\n @Prop() disabled = false\n @Prop() nativeProps = {}\n\n @State() isChecked: boolean\n @State() isWillLoadCalled = false\n\n @Element() el: HTMLElement\n\n @Watch('checked')\n function (newVal: boolean, oldVal: boolean) {\n if (!this.isWillLoadCalled) return\n if (newVal !== oldVal) this.isChecked = newVal\n }\n\n @Event({\n eventName: 'change'\n })\n onChange: EventEmitter\n\n componentWillLoad () {\n this.isWillLoadCalled = true\n this.isChecked = this.checked\n }\n\n componentDidLoad () {\n Object.defineProperty(this.el, 'value', {\n get: () => this.isChecked,\n configurable: true\n })\n }\n\n switchChange = e => {\n e.stopPropagation()\n const value = e.target.checked\n this.isChecked = value\n this.onChange.emit({\n value\n })\n }\n\n render () {\n const {\n type,\n color,\n isChecked,\n name,\n disabled,\n nativeProps\n } = this\n\n const style = isChecked\n ? {\n borderColor: color || '04BE02',\n backgroundColor: color || '04BE02'\n }\n : {}\n\n return (\n <input\n type='checkbox'\n class={`weui-${type}`}\n style={style}\n checked={isChecked}\n name={name}\n disabled={disabled}\n onChange={this.switchChange}\n {...nativeProps}\n />\n )\n }\n}\n"],"mappings":"0FAAA,IAAMA,SAAW,mI,ICMJC,OAAM,W,6FAoCjBC,KAAAC,aAAe,SAAAC,GACbA,EAAEC,kBACF,IAAMC,EAAQF,EAAEG,OAAOC,QACvBC,EAAKC,UAAYJ,EACjBG,EAAKE,SAASC,KAAK,CACjBN,MAAKA,G,YAxCM,S,aACG,M,WACF,U,kCAEG,M,iBACG,G,+CAGM,K,CAK5BL,EAAAY,UAAAC,SAAA,SAAUC,EAAiBC,GACzB,IAAKd,KAAKe,iBAAkB,OAC5B,GAAIF,IAAWC,EAAQd,KAAKQ,UAAYK,C,EAQ1Cd,EAAAY,UAAAK,kBAAA,WACEhB,KAAKe,iBAAmB,KACxBf,KAAKQ,UAAYR,KAAKM,O,EAGxBP,EAAAY,UAAAM,iBAAA,eAAAV,EAAAP,KACEkB,OAAOC,eAAenB,KAAKoB,GAAI,QAAS,CACtCC,IAAK,WAAM,OAAAd,EAAKC,SAAL,EACXc,aAAc,M,EAalBvB,EAAAY,UAAAY,OAAA,WACQ,IAAAC,EAOFxB,KANFyB,EAAID,EAAAC,KACJC,EAAKF,EAAAE,MACLlB,EAASgB,EAAAhB,UACTmB,EAAIH,EAAAG,KACJC,EAAQJ,EAAAI,SACRC,EAAWL,EAAAK,YAGb,IAAMC,EAAQtB,EACV,CACAuB,YAAaL,GAAS,SACtBM,gBAAiBN,GAAS,UAE1B,GAEJ,OACEO,EAAA,QAAAf,OAAAgB,OAAA,CACET,KAAK,WACLU,MAAO,QAAAC,OAAQX,GACfK,MAAOA,EACPxB,QAASE,EACTmB,KAAMA,EACNC,SAAUA,EACVnB,SAAUT,KAAKC,cACX4B,G,sPAvEO,G"}
@@ -1,2 +1,2 @@
1
- import{r as registerInstance,h,H as Host}from"./index-5d881caf.js";import{n as notSupport}from"./helper-3d0ecf0f.js";import"@tarojs/taro";var TabItem=function(){function t(t){registerInstance(this,t)}t.prototype.componentDidLoad=function(){notSupport("TabItem",this)};t.prototype.render=function(){return h(Host,null)};return t}();export{TabItem as taro_tab_item_core};
1
+ import{r as registerInstance,h,H as Host}from"./index-c948674f.js";import{n as notSupport}from"./helper-3d0ecf0f.js";import"@tarojs/taro";var TabItem=function(){function t(t){registerInstance(this,t)}t.prototype.componentDidLoad=function(){notSupport("TabItem",this)};t.prototype.render=function(){return h(Host,null)};return t}();export{TabItem as taro_tab_item_core};
2
2
  //# sourceMappingURL=taro-tab-item-core.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["src/components/tabs/tab-item.tsx"],"names":["TabItem","prototype","componentDidLoad","notSupport","this","render","h","Host"],"mappings":"8IAOaA,QAAO,kDAClBA,EAAAC,UAAAC,iBAAA,WACEC,WAAW,UAAWC,OAGxBJ,EAAAC,UAAAI,OAAA,WACE,OACEC,EAACC,KAAI,gBAPS","sourcesContent":["import { Component, ComponentInterface, h, Host } from '@stencil/core'\n\nimport { notSupport } from '../../utils'\n\n@Component({\n tag: 'taro-tab-item-core'\n})\nexport class TabItem implements ComponentInterface {\n componentDidLoad () {\n notSupport('TabItem', this)\n }\n\n render () {\n return (\n <Host />\n )\n }\n}\n"]}
1
+ {"version":3,"names":["TabItem","prototype","componentDidLoad","notSupport","this","render","h","Host"],"sources":["src/components/tabs/tab-item.tsx"],"sourcesContent":["import { Component, ComponentInterface, h, Host } from '@stencil/core'\n\nimport { notSupport } from '../../utils'\n\n@Component({\n tag: 'taro-tab-item-core'\n})\nexport class TabItem implements ComponentInterface {\n componentDidLoad () {\n notSupport('TabItem', this)\n }\n\n render () {\n return (\n <Host />\n )\n }\n}\n"],"mappings":"8IAOaA,QAAO,W,uCAClBA,EAAAC,UAAAC,iBAAA,WACEC,WAAW,UAAWC,K,EAGxBJ,EAAAC,UAAAI,OAAA,WACE,OACEC,EAACC,KAAI,K,WAPS,U"}
@@ -1,2 +1,2 @@
1
- var __spreadArray=this&&this.__spreadArray||function(e,a,t){if(t||arguments.length===2)for(var r=0,o=a.length,n;r<o;r++){if(n||!(r in a)){if(!n)n=Array.prototype.slice.call(a,0,r);n[r]=a[r]}}return e.concat(n||Array.prototype.slice.call(a))};import{h,r as registerInstance,c as createEvent,H as Host,g as getElement}from"./index-5d881caf.js";import Taro from"@tarojs/taro";import{c as classnames}from"./index-1d8e8acd.js";var splitUrl=function(e){var a=e||"";var t;var r={path:null,query:null,fragment:null};t=a.indexOf("#");if(t>-1){r.fragment=a.substring(t+1);a=a.substring(0,t)}t=a.indexOf("?");if(t>-1){r.query=a.substring(t+1);a=a.substring(0,t)}r.path=a;return r};var addLeadingSlash=function(e){if(e===void 0){e=""}return e.charAt(0)==="/"?e:"/"+e};var hasBasename=function(e,a){if(e===void 0){e=""}if(a===void 0){a=""}return new RegExp("^"+a+"(\\/|\\?|#|$)","i").test(e)||e===a};var stripBasename=function(e,a){if(e===void 0){e=""}if(a===void 0){a=""}return hasBasename(e,a)?e.substring(a.length):e};var stripSuffix=function(e,a){if(e===void 0){e=""}if(a===void 0){a=""}return e.includes(a)?e.substring(0,e.length-a.length):e};function isAbsolute(e){return e.charAt(0)==="/"}function spliceOne(e,a){for(var t=a,r=t+1,o=e.length;r<o;t+=1,r+=1){e[t]=e[r]}e.pop()}function resolvePathname(e,a){if(a===undefined)a="";var t=e&&e.split("/")||[];var r=a&&a.split("/")||[];var o=e&&isAbsolute(e);var n=a&&isAbsolute(a);var i=o||n;if(e&&isAbsolute(e)){r=t}else if(t.length){r.pop();r=r.concat(t)}if(!r.length)return"/";var s;if(r.length){var l=r[r.length-1];s=l==="."||l===".."||l===""}else{s=false}var d=0;for(var b=r.length;b>=0;b--){var h=r[b];if(h==="."){spliceOne(r,b)}else if(h===".."){spliceOne(r,b);d++}else if(d){spliceOne(r,b);d--}}if(!i)for(;d--;d)r.unshift("..");if(i&&r[0]!==""&&(!r[0]||!isAbsolute(r[0])))r.unshift("");var c=r.join("/");if(s&&c.substr(-1)!=="/")c+="/";return c}var TabbarItem=function(e){var a=e.index,t=e.isSelected,r=t===void 0?false:t,o=e.textColor,n=e.iconPath,i=e.badgeText,s=e.showRedDot,l=s===void 0?false:s,d=e.text,b=e.onSelect;var c=classnames("weui-tabbar__item",{"weui-bar__item_on":r});var f={position:"absolute",top:"-2px",right:"-13px"};var u={position:"absolute",top:"0",right:"-6px"};function v(){b(a)}return h("a",{key:a,href:"javascript:;",class:c,onClick:v},h("span",{style:{display:"inline-block",position:"relative"}},h("img",{src:n,alt:"",class:"weui-tabbar__icon"}),!!i&&h("span",{class:"weui-badge taro-tabbar-badge",style:f},i),l&&h("span",{class:"weui-badge weui-badge_dot",style:u})),h("p",{class:"weui-tabbar__label",style:{color:o}},d))};var indexCss="html,body{height:100%}#app{height:100%}.taro-tabbar__border-white::before{border-top-color:#fff !important}.taro-tabbar__container{display:-ms-flexbox;display:flex;overflow:hidden;-ms-flex-direction:column;flex-direction:column;height:100%}.taro-tabbar__panel{overflow:auto;position:relative;-ms-flex:1;flex:1;-webkit-overflow-scrolling:auto}.taro-tabbar__tabbar{position:relative;width:100%;height:50px;-webkit-transition:bottom 0.2s, top 0.2s;transition:bottom 0.2s, top 0.2s}.taro-tabbar__tabbar-top{top:0}.taro-tabbar__tabbar-bottom{bottom:0;margin-bottom:constant(safe-area-inset-bottom);margin-bottom:env(safe-area-inset-bottom)}.taro-tabbar__tabbar-hide{display:none}.taro-tabbar__tabbar-slideout{top:-52px;-ms-flex:0 0;flex:0 0}.taro-tabbar__panel+.taro-tabbar__tabbar-slideout{top:auto;bottom:-52px}";var STATUS_SHOW=0;var STATUS_HIDE=1;var STATUS_SLIDEOUT=2;var basicTabBarClassName="taro-tabbar__tabbar";var hideTabBarClassName="taro-tabbar__tabbar-hide";var hideTabBarWithAnimationClassName="taro-tabbar__tabbar-slideout";var Tabbar=function(){function e(e){var a=this;registerInstance(this,e);this.onLongPress=createEvent(this,"longpress",7);this.homePage="";this.customRoutes=[];this.tabbarPos="bottom";this.getOriginUrl=function(e){var t=a.customRoutes.filter((function(a){var t=a[1];var r=splitUrl(t).path;var o=splitUrl(e).path;return r===o}));return stripSuffix(t.length?t[0][0]:e,".html")};this.getSelectedIndex=function(e){var t=-1;a.list.forEach((function(a,r){var o=a.pagePath;var n=splitUrl(e).path;var i=splitUrl(o).path;if(n===i){t=r}}));return t};this.switchTab=function(e){a.selectedIndex=e;Taro.switchTab({url:a.list[e].pagePath})};this.switchTabHandler=function(e){var t=e.url,r=e.successHandler,o=e.errorHandler;var n=a.getOriginUrl(a.getCurrentUrl()||a.homePage);var i=resolvePathname(t,n);var s=a.getSelectedIndex(i);if(s>-1){a.switchTab(s);r({errMsg:"switchTab:ok"})}else{o({errMsg:'switchTab:fail page "'.concat(i,'" is not found')})}};this.routerChangeHandler=function(e){var t;var r=(t=e===null||e===void 0?void 0:e.toLocation)===null||t===void 0?void 0:t.path;var o;if(typeof r==="string"){var n=a.conf.basename||"/";o=stripBasename(addLeadingSlash(r||a.homePage),n)||"/"}else{o=a.getCurrentUrl()}a.selectedIndex=a.getSelectedIndex(a.getOriginUrl(o))};this.setTabBarBadgeHandler=function(e){var t=e.index,r=e.text,o=e.successHandler,n=e.errorHandler;var i=__spreadArray([],a.list,true);if(t in i){i[t].showRedDot=false;i[t].badgeText=r;o({errMsg:"setTabBarBadge:ok"})}else{n({errMsg:"setTabBarBadge:fail tabbar item not found"})}a.list=i};this.removeTabBarBadgeHandler=function(e){var t=e.index,r=e.successHandler,o=e.errorHandler;var n=__spreadArray([],a.list,true);if(t in n){n[t].badgeText=null;n[t].badgeText=null;r({errMsg:"removeTabBarBadge:ok"})}else{o({errMsg:"removeTabBarBadge:fail tabbar item not found"})}a.list=n};this.showTabBarRedDotHandler=function(e){var t=e.index,r=e.successHandler,o=e.errorHandler;var n=__spreadArray([],a.list,true);if(t in n){n[t].badgeText=null;n[t].showRedDot=true;r({errMsg:"showTabBarRedDot:ok"})}else{o({errMsg:"showTabBarRedDot:fail tabbar item not found"})}a.list=n};this.hideTabBarRedDotHandler=function(e){var t=e.index,r=e.successHandler,o=e.errorHandler;var n=__spreadArray([],a.list,true);if(t in n){n[t].showRedDot=false;r({errMsg:"hideTabBarRedDot:ok"})}else{o({errMsg:"hideTabBarRedDot:fail tabbar item not found"})}a.list=n};this.showTabBarHandler=function(e){var t=e.successHandler;a.status=STATUS_SHOW;t({errMsg:"showTabBar:ok"})};this.hideTabBarHandler=function(e){var t=e.animation,r=e.successHandler;a.status=t?STATUS_SLIDEOUT:STATUS_HIDE;r({errMsg:"hideTabBar:ok"})};this.setTabBarStyleHandler=function(e){var t=e.color,r=e.selectedColor,o=e.backgroundColor,n=e.borderStyle,i=e.successHandler;if(o)a.backgroundColor=o;if(n)a.borderStyle=n;if(t)a.color=t;if(r)a.selectedColor=r;i({errMsg:"setTabBarStyle:ok"})};this.setTabBarItemHandler=function(e){var t=e.index,r=e.iconPath,o=e.selectedIconPath,n=e.text,i=e.successHandler,s=e.errorHandler;var l=__spreadArray([],a.list,true);if(t in l){if(r)l[t].iconPath=r;if(o)l[t].selectedIconPath=o;if(n)l[t].text=n;i({errMsg:"setTabBarItem:ok"})}else{s({errMsg:"setTabBarItem:fail tabbar item not found"})}a.list=l};this.conf=undefined;this.list=undefined;this.borderStyle=undefined;this.backgroundColor=undefined;this.color=undefined;this.selectedColor=undefined;this.selectedIndex=-1;this.status=STATUS_SHOW;var t=this.conf.list;var r=this.conf.customRoutes;if(Object.prototype.toString.call(t)!=="[object Array]"||t.length<2||t.length>5){throw new Error("tabBar 配置错误")}this.homePage=addLeadingSlash(this.conf.homePage);var o=function(e){var a;var t=r[e];e=addLeadingSlash(e);if(typeof t==="string"){n.customRoutes.push([e,addLeadingSlash(t)])}else if((t===null||t===void 0?void 0:t.length)>0){(a=n.customRoutes).push.apply(a,t.map((function(a){return[e,addLeadingSlash(a)]})))}};var n=this;for(var i in r){o(i)}t.forEach((function(e){if(e.pagePath.indexOf("/")!==0){e.pagePath="/"+e.pagePath}}));this.list=t;this.borderStyle=this.conf.borderStyle;this.backgroundColor=this.conf.backgroundColor;this.color=this.conf.color;this.selectedColor=this.conf.selectedColor}e.prototype.getCurrentUrl=function(){var e=this.conf.mode;var a=this.conf.basename||"/";var t;if(e==="hash"){var r=window.location.href;var o=r.indexOf("#");t=o===-1?"":r.substring(o+1)}else{t=location.pathname}var n=addLeadingSlash(stripBasename(t,a));return decodeURI(n==="/"?this.homePage:n)};e.prototype.bindEvent=function(){Taro.eventCenter.on("__taroRouterChange",this.routerChangeHandler);Taro.eventCenter.on("__taroSwitchTab",this.switchTabHandler);Taro.eventCenter.on("__taroSetTabBarBadge",this.setTabBarBadgeHandler);Taro.eventCenter.on("__taroRemoveTabBarBadge",this.removeTabBarBadgeHandler);Taro.eventCenter.on("__taroShowTabBarRedDotHandler",this.showTabBarRedDotHandler);Taro.eventCenter.on("__taroHideTabBarRedDotHandler",this.hideTabBarRedDotHandler);Taro.eventCenter.on("__taroShowTabBar",this.showTabBarHandler);Taro.eventCenter.on("__taroHideTabBar",this.hideTabBarHandler);Taro.eventCenter.on("__taroSetTabBarStyle",this.setTabBarStyleHandler);Taro.eventCenter.on("__taroSetTabBarItem",this.setTabBarItemHandler)};e.prototype.removeEvent=function(){Taro.eventCenter.off("__taroRouterChange",this.routerChangeHandler);Taro.eventCenter.off("__taroSwitchTab",this.switchTabHandler);Taro.eventCenter.off("__taroSetTabBarBadge",this.setTabBarBadgeHandler);Taro.eventCenter.off("__taroRemoveTabBarBadge",this.removeTabBarBadgeHandler);Taro.eventCenter.off("__taroShowTabBarRedDotHandler",this.showTabBarRedDotHandler);Taro.eventCenter.off("__taroHideTabBarRedDotHandler",this.hideTabBarRedDotHandler);Taro.eventCenter.off("__taroShowTabBar",this.showTabBarHandler);Taro.eventCenter.off("__taroHideTabBar",this.hideTabBarHandler);Taro.eventCenter.off("__taroSetTabBarStyle",this.setTabBarStyleHandler);Taro.eventCenter.off("__taroSetTabBarItem",this.setTabBarItemHandler)};e.prototype.componentDidLoad=function(){this.tabbarPos=this.tabbar.nextElementSibling?"top":"bottom";this.bindEvent();this.routerChangeHandler()};e.prototype.disconnectedCallback=function(){this.removeEvent()};e.prototype.render=function(){var e,a;var t=this;var r=this.tabbarPos,o=r===void 0?"bottom":r;var n=this.status;var i=classnames("weui-tabbar",(e={},e["taro-tabbar__border-".concat(this.borderStyle||"black")]=true,e));var s=this.selectedIndex===-1||n===STATUS_HIDE;var l=n===STATUS_SLIDEOUT;return h(Host,{class:classnames(basicTabBarClassName,"".concat(basicTabBarClassName,"-").concat(o),(a={},a[hideTabBarClassName]=s,a[hideTabBarWithAnimationClassName]=l,a))},h("div",{class:i,style:{backgroundColor:this.backgroundColor||"",height:"inherit"}},this.list.map((function(e,a){var r=t.selectedIndex===a;var o;var n;if(r){o=t.selectedColor||"";n=e.selectedIconPath}else{o=t.color||"";n=e.iconPath}return h(TabbarItem,{index:a,onSelect:t.switchTab.bind(t),isSelected:r,textColor:o,iconPath:n,text:e.text,badgeText:e.badgeText,showRedDot:e.showRedDot})}))))};Object.defineProperty(e.prototype,"tabbar",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Tabbar.style=indexCss;export{Tabbar as taro_tabbar};
1
+ var __spreadArray=this&&this.__spreadArray||function(e,t,a){if(a||arguments.length===2)for(var r=0,o=t.length,n;r<o;r++){if(n||!(r in t)){if(!n)n=Array.prototype.slice.call(t,0,r);n[r]=t[r]}}return e.concat(n||Array.prototype.slice.call(t))};import{h,r as registerInstance,c as createEvent,H as Host,g as getElement}from"./index-c948674f.js";import Taro from"@tarojs/taro";import{c as classnames}from"./index-1d8e8acd.js";import{i as isVisible}from"./index-d1b03e47.js";var splitUrl=function(e){var t=e||"";var a;var r={path:null,query:null,fragment:null};a=t.indexOf("#");if(a>-1){r.fragment=t.substring(a+1);t=t.substring(0,a)}a=t.indexOf("?");if(a>-1){r.query=t.substring(a+1);t=t.substring(0,a)}r.path=t;return r};var addLeadingSlash=function(e){if(e===void 0){e=""}return e.charAt(0)==="/"?e:"/"+e};var hasBasename=function(e,t){if(e===void 0){e=""}if(t===void 0){t=""}return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)||e===t};var stripBasename=function(e,t){if(e===void 0){e=""}if(t===void 0){t=""}return hasBasename(e,t)?e.substring(t.length):e};var stripSuffix=function(e,t){if(e===void 0){e=""}if(t===void 0){t=""}return e.includes(t)?e.substring(0,e.length-t.length):e};var getCurrentPage=function(e,t){if(e===void 0){e="hash"}if(t===void 0){t="/"}var a=e==="hash"?location.hash.slice(1).split("?")[0]:location.pathname;return addLeadingSlash(stripBasename(a,t))};function isAbsolute(e){return e.charAt(0)==="/"}function spliceOne(e,t){for(var a=t,r=a+1,o=e.length;r<o;a+=1,r+=1){e[a]=e[r]}e.pop()}function resolvePathname(e,t){if(t===undefined)t="";var a=e&&e.split("/")||[];var r=t&&t.split("/")||[];var o=e&&isAbsolute(e);var n=t&&isAbsolute(t);var i=o||n;if(e&&isAbsolute(e)){r=a}else if(a.length){r.pop();r=r.concat(a)}if(!r.length)return"/";var s;if(r.length){var l=r[r.length-1];s=l==="."||l===".."||l===""}else{s=false}var d=0;for(var b=r.length;b>=0;b--){var h=r[b];if(h==="."){spliceOne(r,b)}else if(h===".."){spliceOne(r,b);d++}else if(d){spliceOne(r,b);d--}}if(!i)for(;d--;d)r.unshift("..");if(i&&r[0]!==""&&(!r[0]||!isAbsolute(r[0])))r.unshift("");var c=r.join("/");if(s&&c.substr(-1)!=="/")c+="/";return c}var TabbarItem=function(e){var t=e.index,a=e.isSelected,r=a===void 0?false:a,o=e.textColor,n=e.iconPath,i=e.badgeText,s=e.showRedDot,l=s===void 0?false:s,d=e.pagePath,b=e.text,c=e.onSelect;var f=classnames("weui-tabbar__item",{"weui-bar__item_on":r});var u={position:"absolute",top:"-2px",right:"-13px"};var v={position:"absolute",top:"0",right:"-6px"};function g(){var e=Taro.getCurrentPages().shift();if(typeof(e===null||e===void 0?void 0:e.onTabItemTap)==="function"&&isVisible(this)){e.onTabItemTap({index:t,pagePath:d,text:b})}c(t)}return h("a",{key:t,href:"javascript:;",class:f,onClick:g},h("span",{style:{display:"inline-block",position:"relative"}},h("img",{src:n,alt:"",class:"weui-tabbar__icon"}),!!i&&h("span",{class:"weui-badge taro-tabbar-badge",style:u},i),l&&h("span",{class:"weui-badge weui-badge_dot",style:v})),h("p",{class:"weui-tabbar__label",style:{color:o}},b))};var indexCss="html,body{height:100%}#app{height:100%}.taro-tabbar__border-white::before{border-top-color:#fff !important}.taro-tabbar__container{display:-ms-flexbox;display:flex;overflow:hidden;-ms-flex-direction:column;flex-direction:column;height:100%}.taro-tabbar__panel{overflow:auto;position:relative;-ms-flex:1;flex:1;-webkit-overflow-scrolling:auto}.taro-tabbar__tabbar{position:relative;width:100%;height:50px;-webkit-transition:bottom 0.2s, top 0.2s;transition:bottom 0.2s, top 0.2s}.taro-tabbar__tabbar-top{top:0}.taro-tabbar__tabbar-bottom{bottom:0;margin-bottom:constant(safe-area-inset-bottom);margin-bottom:env(safe-area-inset-bottom)}.taro-tabbar__tabbar-hide{display:none}.taro-tabbar__tabbar-slideout{top:-52px;-ms-flex:0 0;flex:0 0}.taro-tabbar__panel+.taro-tabbar__tabbar-slideout{top:auto;bottom:-52px}";var STATUS_SHOW=0;var STATUS_HIDE=1;var STATUS_SLIDEOUT=2;var basicTabBarClassName="taro-tabbar__tabbar";var hideTabBarClassName="taro-tabbar__tabbar-hide";var hideTabBarWithAnimationClassName="taro-tabbar__tabbar-slideout";var Tabbar=function(){function e(e){var t=this;registerInstance(this,e);this.onLongPress=createEvent(this,"longpress",7);this.homePage="";this.customRoutes=[];this.tabbarPos="bottom";this.getOriginUrl=function(e){var a=t.customRoutes.filter((function(t){var a=t[1];var r=splitUrl(a).path;var o=splitUrl(e).path;return r===o}));return stripSuffix(a.length?a[0][0]:e,".html")};this.getSelectedIndex=function(e){var a=-1;t.list.forEach((function(t,r){var o=t.pagePath;var n=splitUrl(e).path;var i=splitUrl(o).path;if(n===i){a=r}}));return a};this.switchTab=function(e){t.selectedIndex=e;Taro.switchTab({url:t.list[e].pagePath})};this.switchTabHandler=function(e){var a=e.url,r=e.successHandler,o=e.errorHandler;var n=t.getOriginUrl(t.getCurrentUrl()||t.homePage);var i=resolvePathname(a,n);var s=t.getSelectedIndex(i);if(s>-1){t.switchTab(s);r({errMsg:"switchTab:ok"})}else{o({errMsg:'switchTab:fail page "'.concat(i,'" is not found')})}};this.routerChangeHandler=function(e){var a;var r=(a=e===null||e===void 0?void 0:e.toLocation)===null||a===void 0?void 0:a.path;var o;if(typeof r==="string"){var n=t.conf.basename||"/";o=stripBasename(addLeadingSlash(r||t.homePage),n)||"/"}else{o=t.getCurrentUrl()}t.selectedIndex=t.getSelectedIndex(t.getOriginUrl(o))};this.setTabBarBadgeHandler=function(e){var a=e.index,r=e.text,o=e.successHandler,n=e.errorHandler;var i=__spreadArray([],t.list,true);if(a in i){i[a].showRedDot=false;i[a].badgeText=r;o({errMsg:"setTabBarBadge:ok"})}else{n({errMsg:"setTabBarBadge:fail tabbar item not found"})}t.list=i};this.removeTabBarBadgeHandler=function(e){var a=e.index,r=e.successHandler,o=e.errorHandler;var n=__spreadArray([],t.list,true);if(a in n){n[a].badgeText=null;n[a].badgeText=null;r({errMsg:"removeTabBarBadge:ok"})}else{o({errMsg:"removeTabBarBadge:fail tabbar item not found"})}t.list=n};this.showTabBarRedDotHandler=function(e){var a=e.index,r=e.successHandler,o=e.errorHandler;var n=__spreadArray([],t.list,true);if(a in n){n[a].badgeText=null;n[a].showRedDot=true;r({errMsg:"showTabBarRedDot:ok"})}else{o({errMsg:"showTabBarRedDot:fail tabbar item not found"})}t.list=n};this.hideTabBarRedDotHandler=function(e){var a=e.index,r=e.successHandler,o=e.errorHandler;var n=__spreadArray([],t.list,true);if(a in n){n[a].showRedDot=false;r({errMsg:"hideTabBarRedDot:ok"})}else{o({errMsg:"hideTabBarRedDot:fail tabbar item not found"})}t.list=n};this.showTabBarHandler=function(e){var a=e.successHandler;t.status=STATUS_SHOW;a({errMsg:"showTabBar:ok"})};this.hideTabBarHandler=function(e){var a=e.animation,r=e.successHandler;t.status=a?STATUS_SLIDEOUT:STATUS_HIDE;r({errMsg:"hideTabBar:ok"})};this.setTabBarStyleHandler=function(e){var a=e.color,r=e.selectedColor,o=e.backgroundColor,n=e.borderStyle,i=e.successHandler;if(o)t.backgroundColor=o;if(n)t.borderStyle=n;if(a)t.color=a;if(r)t.selectedColor=r;i({errMsg:"setTabBarStyle:ok"})};this.setTabBarItemHandler=function(e){var a=e.index,r=e.iconPath,o=e.selectedIconPath,n=e.text,i=e.successHandler,s=e.errorHandler;var l=__spreadArray([],t.list,true);if(a in l){if(r)l[a].iconPath=r;if(o)l[a].selectedIconPath=o;if(n)l[a].text=n;i({errMsg:"setTabBarItem:ok"})}else{s({errMsg:"setTabBarItem:fail tabbar item not found"})}t.list=l};this.conf=undefined;this.list=undefined;this.borderStyle=undefined;this.backgroundColor=undefined;this.color=undefined;this.selectedColor=undefined;this.selectedIndex=-1;this.status=STATUS_SHOW;var a=this.conf.list;var r=this.conf.customRoutes;if(Object.prototype.toString.call(a)!=="[object Array]"||a.length<2||a.length>5){throw new Error("tabBar 配置错误")}this.homePage=addLeadingSlash(this.conf.homePage);var o=function(e){var t;var a=r[e];e=addLeadingSlash(e);if(typeof a==="string"){n.customRoutes.push([e,addLeadingSlash(a)])}else if((a===null||a===void 0?void 0:a.length)>0){(t=n.customRoutes).push.apply(t,a.map((function(t){return[e,addLeadingSlash(t)]})))}};var n=this;for(var i in r){o(i)}a.forEach((function(e){if(e.pagePath.indexOf("/")!==0){e.pagePath="/"+e.pagePath}}));this.list=a;this.borderStyle=this.conf.borderStyle;this.backgroundColor=this.conf.backgroundColor;this.color=this.conf.color;this.selectedColor=this.conf.selectedColor}e.prototype.getCurrentUrl=function(){var e=getCurrentPage(this.conf.mode,this.conf.basename);return decodeURI(e==="/"?this.homePage:e)};e.prototype.bindEvent=function(){Taro.eventCenter.on("__taroRouterChange",this.routerChangeHandler);Taro.eventCenter.on("__taroSwitchTab",this.switchTabHandler);Taro.eventCenter.on("__taroSetTabBarBadge",this.setTabBarBadgeHandler);Taro.eventCenter.on("__taroRemoveTabBarBadge",this.removeTabBarBadgeHandler);Taro.eventCenter.on("__taroShowTabBarRedDotHandler",this.showTabBarRedDotHandler);Taro.eventCenter.on("__taroHideTabBarRedDotHandler",this.hideTabBarRedDotHandler);Taro.eventCenter.on("__taroShowTabBar",this.showTabBarHandler);Taro.eventCenter.on("__taroHideTabBar",this.hideTabBarHandler);Taro.eventCenter.on("__taroSetTabBarStyle",this.setTabBarStyleHandler);Taro.eventCenter.on("__taroSetTabBarItem",this.setTabBarItemHandler)};e.prototype.removeEvent=function(){Taro.eventCenter.off("__taroRouterChange",this.routerChangeHandler);Taro.eventCenter.off("__taroSwitchTab",this.switchTabHandler);Taro.eventCenter.off("__taroSetTabBarBadge",this.setTabBarBadgeHandler);Taro.eventCenter.off("__taroRemoveTabBarBadge",this.removeTabBarBadgeHandler);Taro.eventCenter.off("__taroShowTabBarRedDotHandler",this.showTabBarRedDotHandler);Taro.eventCenter.off("__taroHideTabBarRedDotHandler",this.hideTabBarRedDotHandler);Taro.eventCenter.off("__taroShowTabBar",this.showTabBarHandler);Taro.eventCenter.off("__taroHideTabBar",this.hideTabBarHandler);Taro.eventCenter.off("__taroSetTabBarStyle",this.setTabBarStyleHandler);Taro.eventCenter.off("__taroSetTabBarItem",this.setTabBarItemHandler)};e.prototype.componentDidLoad=function(){this.tabbarPos=this.tabbar.nextElementSibling?"top":"bottom";this.bindEvent();this.routerChangeHandler()};e.prototype.disconnectedCallback=function(){this.removeEvent()};e.prototype.render=function(){var e,t;var a=this;var r=this.tabbarPos,o=r===void 0?"bottom":r;var n=this.status;var i=classnames("weui-tabbar",(e={},e["taro-tabbar__border-".concat(this.borderStyle||"black")]=true,e));var s=this.selectedIndex===-1||n===STATUS_HIDE;var l=n===STATUS_SLIDEOUT;return h(Host,{class:classnames(basicTabBarClassName,"".concat(basicTabBarClassName,"-").concat(o),(t={},t[hideTabBarClassName]=s,t[hideTabBarWithAnimationClassName]=l,t))},h("div",{class:i,style:{backgroundColor:this.backgroundColor||"",height:"inherit"}},this.list.map((function(e,t){var r=a.selectedIndex===t;var o;var n;if(r){o=a.selectedColor||"";n=e.selectedIconPath}else{o=a.color||"";n=e.iconPath}return h(TabbarItem,{index:t,onSelect:a.switchTab.bind(a),isSelected:r,textColor:o,iconPath:n,pagePath:e.pagePath,text:e.text,badgeText:e.badgeText,showRedDot:e.showRedDot})}))))};Object.defineProperty(e.prototype,"tabbar",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Tabbar.style=indexCss;export{Tabbar as taro_tabbar};
2
2
  //# sourceMappingURL=taro-tabbar.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["src/utils/url.ts","../taro-router/dist/utils/index.js","../../node_modules/.pnpm/registry.npmjs.org+resolve-pathname@3.0.0/node_modules/resolve-pathname/esm/resolve-pathname.js","src/components/tabbar/tabbar-item.tsx","src/components/tabbar/style/index.scss?tag=taro-tabbar","src/components/tabbar/tabbar.tsx"],"names":["splitUrl","_url","url","pos","res","path","query","fragment","indexOf","substring","addLeadingSlash","charAt","hasBasename","prefix","RegExp","test","stripBasename","length","stripSuffix","suffix","includes","isAbsolute","pathname","spliceOne","list","index","i","k","n","pop","resolvePathname","to","from","undefined","toParts","split","fromParts","isToAbs","isFromAbs","mustEndAbs","concat","hasTrailingSlash","last","up","part","unshift","result","join","substr","TabbarItem","_b","_c","isSelected","textColor","iconPath","badgeText","_d","showRedDot","text","onSelect","className","classNames","weui-bar__item_on","badgeStyle","position","top","right","dotStyle","onClick","h","key","href","class","style","display","src","alt","color","indexCss","STATUS_SHOW","STATUS_HIDE","STATUS_SLIDEOUT","basicTabBarClassName","hideTabBarClassName","hideTabBarWithAnimationClassName","Tabbar","hostRef","_this","this","homePage","customRoutes","tabbarPos","getOriginUrl","customRoute","filter","customUrl","pathA","pathB","getSelectedIndex","foundIndex","forEach","idx","pagePath","switchTab","selectedIndex","Taro","switchTabHandler","successHandler","errorHandler","currentUrl","getCurrentUrl","nextTab","errMsg","routerChangeHandler","options","_a","toLocation","currentPage","routerBasename","conf","basename","setTabBarBadgeHandler","__spreadArray","removeTabBarBadgeHandler","showTabBarRedDotHandler","hideTabBarRedDotHandler","showTabBarHandler","status","hideTabBarHandler","animation","setTabBarStyleHandler","selectedColor","backgroundColor","borderStyle","setTabBarItemHandler","selectedIconPath","Object","prototype","toString","call","Error","this_1","push","apply","map","p","item","routerMode","mode","window","location","hashIndex","processedUrl","decodeURI","bindEvent","eventCenter","on","removeEvent","off","componentDidLoad","tabbar","nextElementSibling","disconnectedCallback","render","containerCls","shouldHideTabBar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AAK3F,UAChBE,WAAYyF,EAAKzF,qJAzUd","sourcesContent":["export const normalizePath = url => {\n let _isRelative\n let _leadingParents = ''\n let _parent, _pos\n\n // handle relative paths\n if (url.charAt(0) !== '/') {\n _isRelative = true\n url = '/' + url\n }\n\n // handle relative files (as opposed to directories)\n if (url.substring(-3) === '/..' || url.slice(-2) === '/.') {\n url += '/'\n }\n\n // resolve simples\n url = url.replace(/(\\/(\\.\\/)+)|(\\/\\.$)/g, '/').replace(/\\/{2,}/g, '/')\n\n // remember leading parents\n if (_isRelative) {\n _leadingParents = url.substring(1).match(/^(\\.\\.\\/)+/) || ''\n if (_leadingParents) {\n _leadingParents = _leadingParents[0]\n }\n }\n\n // resolve parents\n while (true) {\n _parent = url.search(/\\/\\.\\.(\\/|$)/)\n if (_parent === -1) {\n // no more ../ to resolve\n break\n } else if (_parent === 0) {\n // top level cannot be relative, skip it\n url = url.substring(3)\n continue\n }\n\n _pos = url.substring(0, _parent).lastIndexOf('/')\n if (_pos === -1) {\n _pos = _parent\n }\n url = url.substring(0, _pos) + url.substring(_parent + 3)\n }\n\n // revert to relative\n if (_isRelative) {\n url = _leadingParents + url.substring(1)\n }\n\n return url\n}\n\nexport const splitUrl = _url => {\n let url = _url || ''\n let pos\n const res = {\n path: null,\n query: null,\n fragment: null\n }\n\n pos = url.indexOf('#')\n if (pos > -1) {\n res.fragment = url.substring(pos + 1)\n url = url.substring(0, pos)\n }\n\n pos = url.indexOf('?')\n if (pos > -1) {\n res.query = url.substring(pos + 1)\n url = url.substring(0, pos)\n }\n\n res.path = url\n\n return res\n}\n","// export const removeLeadingSlash = (str = '') => str.replace(/^\\.?\\//, '')\n// export const removeTrailingSearch = (str = '') => str.replace(/\\?[\\s\\S]*$/, '')\nexport const addLeadingSlash = (url = '') => (url.charAt(0) === '/' ? url : '/' + url);\nexport const hasBasename = (path = '', prefix = '') => new RegExp('^' + prefix + '(\\\\/|\\\\?|#|$)', 'i').test(path) || path === prefix;\nexport const stripBasename = (path = '', prefix = '') => hasBasename(path, prefix) ? path.substring(prefix.length) : path;\nexport const stripTrailing = (str = '') => str.replace(/[?#][\\s\\S]*$/, '');\nexport const stripSuffix = (path = '', suffix = '') => path.includes(suffix) ? path.substring(0, path.length - suffix.length) : path;\nexport const getHomePage = (path = '', basename = '', customRoutes = {}, entryPagePath = '') => {\n var _a;\n const routePath = addLeadingSlash(stripBasename(path, basename));\n const alias = ((_a = Object.entries(customRoutes).find(([key]) => key === routePath)) === null || _a === void 0 ? void 0 : _a[1]) || routePath;\n return entryPagePath || (typeof alias === 'string' ? alias : alias[0]) || basename;\n};\nclass RoutesAlias {\n constructor() {\n this.conf = [];\n this.getConfig = (url = '') => {\n const customRoute = this.conf.filter((arr) => {\n return arr.includes(url);\n });\n return customRoute[0];\n };\n this.getOrigin = (url = '') => {\n var _a;\n return ((_a = this.getConfig(url)) === null || _a === void 0 ? void 0 : _a[0]) || url;\n };\n this.getAlias = (url = '') => {\n var _a;\n return ((_a = this.getConfig(url)) === null || _a === void 0 ? void 0 : _a[1]) || url;\n };\n this.getAll = (url = '') => {\n return this.conf\n .filter((arr) => arr.includes(url))\n .reduceRight((p, a) => {\n p.unshift(a[1]);\n return p;\n }, []);\n };\n }\n set(customRoutes = {}) {\n for (let key in customRoutes) {\n const path = customRoutes[key];\n key = addLeadingSlash(key);\n if (typeof path === 'string') {\n this.conf.push([key, addLeadingSlash(path)]);\n }\n else if ((path === null || path === void 0 ? void 0 : path.length) > 0) {\n this.conf.push(...path.map(p => [key, addLeadingSlash(p)]));\n }\n }\n }\n}\nexport const routesAlias = new RoutesAlias();\n","function isAbsolute(pathname) {\n return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n list[i] = list[k];\n }\n\n list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to, from) {\n if (from === undefined) from = '';\n\n var toParts = (to && to.split('/')) || [];\n var fromParts = (from && from.split('/')) || [];\n\n var isToAbs = to && isAbsolute(to);\n var isFromAbs = from && isAbsolute(from);\n var mustEndAbs = isToAbs || isFromAbs;\n\n if (to && isAbsolute(to)) {\n // to is absolute\n fromParts = toParts;\n } else if (toParts.length) {\n // to is relative, drop the filename\n fromParts.pop();\n fromParts = fromParts.concat(toParts);\n }\n\n if (!fromParts.length) return '/';\n\n var hasTrailingSlash;\n if (fromParts.length) {\n var last = fromParts[fromParts.length - 1];\n hasTrailingSlash = last === '.' || last === '..' || last === '';\n } else {\n hasTrailingSlash = false;\n }\n\n var up = 0;\n for (var i = fromParts.length; i >= 0; i--) {\n var part = fromParts[i];\n\n if (part === '.') {\n spliceOne(fromParts, i);\n } else if (part === '..') {\n spliceOne(fromParts, i);\n up++;\n } else if (up) {\n spliceOne(fromParts, i);\n up--;\n }\n }\n\n if (!mustEndAbs) for (; up--; up) fromParts.unshift('..');\n\n if (\n mustEndAbs &&\n fromParts[0] !== '' &&\n (!fromParts[0] || !isAbsolute(fromParts[0]))\n )\n fromParts.unshift('');\n\n var result = fromParts.join('/');\n\n if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n\n return result;\n}\n\nexport default resolvePathname;\n","import classNames from 'classnames'\nimport { FunctionalComponent, h } from '@stencil/core'\n\ntype TabbarItemProps = {\n index: number\n isSelected?: boolean\n textColor?: string\n badgeText?: string\n iconPath: string\n showRedDot?: boolean\n text?: string\n onSelect: (index: number) => void\n}\n\nexport const TabbarItem: FunctionalComponent<TabbarItemProps> = ({\n index,\n isSelected = false,\n textColor,\n iconPath,\n badgeText,\n showRedDot = false,\n text,\n onSelect\n}) => {\n const className = classNames('weui-tabbar__item', {\n 'weui-bar__item_on': isSelected\n })\n const badgeStyle = {\n position: 'absolute',\n top: '-2px',\n right: '-13px'\n }\n const dotStyle = {\n position: 'absolute',\n top: '0',\n right: '-6px'\n }\n\n function onClick () {\n onSelect(index)\n }\n\n return (\n <a key={index} href='javascript:;' class={className} onClick={onClick}>\n <span style={{ display: 'inline-block', position: 'relative' }}>\n <img src={iconPath} alt='' class='weui-tabbar__icon' />\n {!!badgeText && (\n <span\n class='weui-badge taro-tabbar-badge'\n style={badgeStyle}>\n {badgeText}\n </span>\n )}\n {showRedDot && (\n <span\n class='weui-badge weui-badge_dot'\n style={dotStyle}\n />\n )}\n </span>\n <p class='weui-tabbar__label' style={{ color: textColor }}>\n {text}\n </p>\n </a>\n )\n}\n","html,\nbody {\n height: 100%;\n}\n\n#app {\n height: 100%;\n}\n\n.taro-tabbar {\n &__border {\n &-white {\n &::before {\n border-top-color: #fff !important;\n }\n }\n }\n\n &__container {\n display: flex;\n overflow: hidden;\n flex-direction: column;\n height: 100%;\n }\n\n &__panel {\n overflow: auto;\n position: relative;\n flex: 1;\n -webkit-overflow-scrolling: auto;\n }\n\n &__tabbar {\n position: relative;\n width: 100%;\n height: 50px;\n transition: bottom 0.2s, top 0.2s;\n\n &-top {\n top: 0;\n }\n\n &-bottom {\n bottom: 0;\n margin-bottom: constant(safe-area-inset-bottom);\n margin-bottom: env(safe-area-inset-bottom);\n }\n\n &-hide {\n display: none;\n }\n\n &-slideout {\n top: -52px;\n flex: 0 0;\n }\n }\n\n &__panel + &__tabbar-slideout {\n top: auto;\n bottom: -52px;\n }\n}\n","import { Component, Prop, h, ComponentInterface, Host, State, Event, EventEmitter, Element } from '@stencil/core'\nimport Taro from '@tarojs/taro'\nimport { addLeadingSlash, stripBasename, stripSuffix } from '@tarojs/router/dist/utils'\nimport { IH5RouterConfig } from '@tarojs/taro/types/compile'\nimport classNames from 'classnames'\nimport resolvePathname from 'resolve-pathname'\n\nimport { splitUrl } from '../../utils'\nimport { TabbarItem } from './tabbar-item'\n\nconst STATUS_SHOW = 0\nconst STATUS_HIDE = 1\nconst STATUS_SLIDEOUT = 2\n\nconst basicTabBarClassName = 'taro-tabbar__tabbar'\nconst hideTabBarClassName = 'taro-tabbar__tabbar-hide'\nconst hideTabBarWithAnimationClassName = 'taro-tabbar__tabbar-slideout'\n\ninterface RouterHandler {\n index: string\n text: string\n url: string\n successHandler: Function\n errorHandler: Function\n animation?: boolean\n}\n\nexport interface Conf {\n color: string\n selectedColor: string\n backgroundColor: string\n borderStyle?: 'black' | 'white'\n list: TabbarList[]\n position?: 'bottom' | 'top'\n custom: boolean\n customRoutes: Record<string, string | string[]>\n mode: IH5RouterConfig['mode']\n basename: string\n homePage: string\n currentPagename: string\n}\n\ninterface TabbarList {\n pagePath: string\n text: string\n iconPath?: string\n selectedIconPath?: string\n badgeText?: string\n showRedDot?: boolean\n}\n\n@Component({\n tag: 'taro-tabbar',\n styleUrl: './style/index.scss'\n})\nexport class Tabbar implements ComponentInterface {\n private homePage = ''\n\n private customRoutes: Array<string[]> = []\n\n private tabbarPos: 'top' | 'bottom' = 'bottom'\n\n @Prop() conf: Conf\n\n @State() list: TabbarList[]\n\n @State() borderStyle: Conf['borderStyle']\n\n @State() backgroundColor: Conf['backgroundColor']\n\n @State() color: Conf['color']\n\n @State() selectedColor: Conf['selectedColor']\n\n @State() selectedIndex = -1\n\n @State() status: 0 | 1 | 2 = STATUS_SHOW\n\n @Event({\n eventName: 'longpress'\n }) onLongPress: EventEmitter\n\n @Element() tabbar: HTMLDivElement\n\n constructor () {\n const list = this.conf.list\n const customRoutes = this.conf.customRoutes\n if (\n Object.prototype.toString.call(list) !== '[object Array]' ||\n list.length < 2 ||\n list.length > 5\n ) {\n throw new Error('tabBar 配置错误')\n }\n\n this.homePage = addLeadingSlash(this.conf.homePage)\n for (let key in customRoutes) {\n const path = customRoutes[key]\n key = addLeadingSlash(key)\n if (typeof path === 'string') {\n this.customRoutes.push([key, addLeadingSlash(path)])\n } else if (path?.length > 0) {\n this.customRoutes.push(...path.map(p => [key, addLeadingSlash(p)]))\n }\n }\n\n list.forEach(item => {\n if (item.pagePath.indexOf('/') !== 0) {\n item.pagePath = '/' + item.pagePath\n }\n })\n\n this.list = list\n this.borderStyle = this.conf.borderStyle\n this.backgroundColor = this.conf.backgroundColor\n this.color = this.conf.color\n this.selectedColor = this.conf.selectedColor\n }\n\n getCurrentUrl () {\n const routerMode = this.conf.mode\n const routerBasename = this.conf.basename || '/'\n let url\n if (routerMode === 'hash') {\n const href = window.location.href\n const hashIndex = href.indexOf('#')\n url = hashIndex === -1\n ? ''\n : href.substring(hashIndex + 1)\n } else {\n url = location.pathname\n }\n const processedUrl = addLeadingSlash(stripBasename(url, routerBasename))\n return decodeURI(processedUrl === '/' ? this.homePage : processedUrl)\n }\n\n getOriginUrl = (url: string) => {\n const customRoute = this.customRoutes.filter(([, customUrl]) => {\n const pathA = splitUrl(customUrl).path\n const pathB = splitUrl(url).path\n return pathA === pathB\n })\n return stripSuffix(customRoute.length ? customRoute[0][0] : url, '.html')\n }\n\n getSelectedIndex = (url: string) => {\n let foundIndex = -1\n this.list.forEach(({ pagePath }, idx) => {\n const pathA = splitUrl(url).path\n const pathB = splitUrl(pagePath).path\n if (pathA === pathB) {\n foundIndex = idx\n }\n })\n return foundIndex\n }\n\n switchTab = (index: number) => {\n this.selectedIndex = index\n Taro.switchTab({\n url: this.list[index].pagePath\n })\n }\n\n switchTabHandler = ({ url, successHandler, errorHandler }: RouterHandler) => {\n const currentUrl = this.getOriginUrl(this.getCurrentUrl() || this.homePage)\n const nextTab = resolvePathname(url, currentUrl)\n const foundIndex = this.getSelectedIndex(nextTab)\n\n if (foundIndex > -1) {\n this.switchTab(foundIndex)\n successHandler({\n errMsg: 'switchTab:ok'\n })\n } else {\n errorHandler({\n errMsg: `switchTab:fail page \"${nextTab}\" is not found`\n })\n }\n }\n\n routerChangeHandler = (options?) => {\n const to = options?.toLocation?.path\n let currentPage\n\n if (typeof to === 'string') {\n const routerBasename = this.conf.basename || '/'\n currentPage = stripBasename(addLeadingSlash(to || this.homePage), routerBasename) || '/'\n } else {\n currentPage = this.getCurrentUrl()\n }\n\n this.selectedIndex = this.getSelectedIndex(this.getOriginUrl(currentPage))\n }\n\n setTabBarBadgeHandler = ({ index, text, successHandler, errorHandler }: RouterHandler) => {\n const list = [...this.list]\n if (index in list) {\n list[index].showRedDot = false\n list[index].badgeText = text\n successHandler({\n errMsg: 'setTabBarBadge:ok'\n })\n } else {\n errorHandler({\n errMsg: 'setTabBarBadge:fail tabbar item not found'\n })\n }\n\n this.list = list\n }\n\n removeTabBarBadgeHandler = ({ index, successHandler, errorHandler }: RouterHandler) => {\n const list = [...this.list]\n if (index in list) {\n list[index].badgeText = null\n list[index].badgeText = null\n successHandler({\n errMsg: 'removeTabBarBadge:ok'\n })\n } else {\n errorHandler({\n errMsg: 'removeTabBarBadge:fail tabbar item not found'\n })\n }\n\n this.list = list\n }\n\n showTabBarRedDotHandler = ({ index, successHandler, errorHandler }: RouterHandler) => {\n const list = [...this.list]\n if (index in list) {\n list[index].badgeText = null\n list[index].showRedDot = true\n successHandler({\n errMsg: 'showTabBarRedDot:ok'\n })\n } else {\n errorHandler({\n errMsg: 'showTabBarRedDot:fail tabbar item not found'\n })\n }\n\n this.list = list\n }\n\n hideTabBarRedDotHandler = ({ index, successHandler, errorHandler }: RouterHandler) => {\n const list = [...this.list]\n if (index in list) {\n list[index].showRedDot = false\n successHandler({\n errMsg: 'hideTabBarRedDot:ok'\n })\n } else {\n errorHandler({\n errMsg: 'hideTabBarRedDot:fail tabbar item not found'\n })\n }\n\n this.list = list\n }\n\n showTabBarHandler = ({ successHandler }) => {\n this.status = STATUS_SHOW\n successHandler({\n errMsg: 'showTabBar:ok'\n })\n }\n\n hideTabBarHandler = ({ animation, successHandler }) => {\n this.status = animation ? STATUS_SLIDEOUT : STATUS_HIDE\n successHandler({\n errMsg: 'hideTabBar:ok'\n })\n }\n\n setTabBarStyleHandler = ({ color, selectedColor, backgroundColor, borderStyle, successHandler }) => {\n if (backgroundColor) this.backgroundColor = backgroundColor\n if (borderStyle) this.borderStyle = borderStyle\n if (color) this.color = color\n if (selectedColor) this.selectedColor = selectedColor\n successHandler({\n errMsg: 'setTabBarStyle:ok'\n })\n }\n\n setTabBarItemHandler = ({ index, iconPath, selectedIconPath, text, successHandler, errorHandler }) => {\n const list = [...this.list]\n if (index in list) {\n if (iconPath) list[index].iconPath = iconPath\n if (selectedIconPath) list[index].selectedIconPath = selectedIconPath\n if (text) list[index].text = text\n successHandler({\n errMsg: 'setTabBarItem:ok'\n })\n } else {\n errorHandler({\n errMsg: 'setTabBarItem:fail tabbar item not found'\n })\n }\n\n this.list = list\n }\n\n bindEvent () {\n Taro.eventCenter.on('__taroRouterChange', this.routerChangeHandler)\n Taro.eventCenter.on('__taroSwitchTab', this.switchTabHandler)\n Taro.eventCenter.on('__taroSetTabBarBadge', this.setTabBarBadgeHandler)\n Taro.eventCenter.on('__taroRemoveTabBarBadge', this.removeTabBarBadgeHandler)\n Taro.eventCenter.on('__taroShowTabBarRedDotHandler', this.showTabBarRedDotHandler)\n Taro.eventCenter.on('__taroHideTabBarRedDotHandler', this.hideTabBarRedDotHandler)\n Taro.eventCenter.on('__taroShowTabBar', this.showTabBarHandler)\n Taro.eventCenter.on('__taroHideTabBar', this.hideTabBarHandler)\n Taro.eventCenter.on('__taroSetTabBarStyle', this.setTabBarStyleHandler)\n Taro.eventCenter.on('__taroSetTabBarItem', this.setTabBarItemHandler)\n }\n\n removeEvent () {\n Taro.eventCenter.off('__taroRouterChange', this.routerChangeHandler)\n Taro.eventCenter.off('__taroSwitchTab', this.switchTabHandler)\n Taro.eventCenter.off('__taroSetTabBarBadge', this.setTabBarBadgeHandler)\n Taro.eventCenter.off('__taroRemoveTabBarBadge', this.removeTabBarBadgeHandler)\n Taro.eventCenter.off('__taroShowTabBarRedDotHandler', this.showTabBarRedDotHandler)\n Taro.eventCenter.off('__taroHideTabBarRedDotHandler', this.hideTabBarRedDotHandler)\n Taro.eventCenter.off('__taroShowTabBar', this.showTabBarHandler)\n Taro.eventCenter.off('__taroHideTabBar', this.hideTabBarHandler)\n Taro.eventCenter.off('__taroSetTabBarStyle', this.setTabBarStyleHandler)\n Taro.eventCenter.off('__taroSetTabBarItem', this.setTabBarItemHandler)\n }\n\n componentDidLoad () {\n this.tabbarPos = this.tabbar.nextElementSibling ? 'top' : 'bottom'\n this.bindEvent()\n this.routerChangeHandler()\n }\n\n disconnectedCallback () {\n this.removeEvent()\n }\n\n render () {\n const { tabbarPos = 'bottom' } = this\n const status = this.status\n const containerCls = classNames('weui-tabbar', {\n [`taro-tabbar__border-${this.borderStyle || 'black'}`]: true\n })\n const shouldHideTabBar = this.selectedIndex === -1 || status === STATUS_HIDE\n const shouldSlideout = status === STATUS_SLIDEOUT\n\n return (\n <Host\n class={classNames(\n basicTabBarClassName,\n `${basicTabBarClassName}-${tabbarPos}`, {\n [hideTabBarClassName]: shouldHideTabBar,\n [hideTabBarWithAnimationClassName]: shouldSlideout\n })} >\n <div\n class={containerCls}\n style={{\n backgroundColor: this.backgroundColor || '',\n height: 'inherit'\n }}\n >\n {this.list.map((item, index) => {\n const isSelected = this.selectedIndex === index\n let textColor\n let iconPath\n if (isSelected) {\n textColor = this.selectedColor || ''\n iconPath = item.selectedIconPath\n } else {\n textColor = this.color || ''\n iconPath = item.iconPath\n }\n return (\n <TabbarItem\n index={index}\n onSelect={this.switchTab.bind(this)}\n isSelected={isSelected}\n textColor={textColor}\n iconPath={iconPath}\n text={item.text}\n badgeText={item.badgeText}\n showRedDot={item.showRedDot}\n />\n )\n })}\n </div>\n </Host>\n )\n }\n}\n"]}
1
+ {"version":3,"names":["splitUrl","_url","url","pos","res","path","query","fragment","indexOf","substring","addLeadingSlash","charAt","hasBasename","prefix","RegExp","test","stripBasename","length","stripSuffix","suffix","includes","getCurrentPage","routerMode","basename","pagePath","location","hash","slice","split","pathname","isAbsolute","spliceOne","list","index","i","k","n","pop","resolvePathname","to","from","undefined","toParts","fromParts","isToAbs","isFromAbs","mustEndAbs","concat","hasTrailingSlash","last","up","part","unshift","result","join","substr","TabbarItem","_b","_c","isSelected","textColor","iconPath","badgeText","_d","showRedDot","text","onSelect","className","classNames","badgeStyle","position","top","right","dotStyle","onClick","page","Taro","getCurrentPages","shift","onTabItemTap","isVisible","this","h","key","href","class","style","display","src","alt","color","indexCss","STATUS_SHOW","STATUS_HIDE","STATUS_SLIDEOUT","basicTabBarClassName","hideTabBarClassName","hideTabBarWithAnimationClassName","Tabbar","hostRef","_this","homePage","customRoutes","tabbarPos","getOriginUrl","customRoute","filter","customUrl","pathA","pathB","getSelectedIndex","foundIndex","forEach","idx","switchTab","selectedIndex","switchTabHandler","successHandler","errorHandler","currentUrl","getCurrentUrl","nextTab","errMsg","routerChangeHandler","options","_a","toLocation","currentPage","routerBasename","conf","setTabBarBadgeHandler","__spreadArray","removeTabBarBadgeHandler","showTabBarRedDotHandler","hideTabBarRedDotHandler","showTabBarHandler","status","hideTabBarHandler","animation","setTabBarStyleHandler","selectedColor","backgroundColor","borderStyle","setTabBarItemHandler","selectedIconPath","Object","prototype","toString","call","Error","this_1","push","apply","map","p","item","routePath","mode","decodeURI","bindEvent","eventCenter","on","removeEvent","off","componentDidLoad","tabbar","nextElementSibling","disconnectedCallback","render","containerCls","shouldHideTabBar","shouldSlideout","Host","height","bind"],"sources":["src/utils/url.ts","../taro-router/dist/utils/index.js","../../node_modules/.pnpm/registry.npmjs.org+resolve-pathname@3.0.0/node_modules/resolve-pathname/esm/resolve-pathname.js","src/components/tabbar/tabbar-item.tsx","src/components/tabbar/style/index.scss?tag=taro-tabbar","src/components/tabbar/tabbar.tsx"],"sourcesContent":["export const normalizePath = url => {\n let _isRelative\n let _leadingParents = ''\n let _parent, _pos\n\n // handle relative paths\n if (url.charAt(0) !== '/') {\n _isRelative = true\n url = '/' + url\n }\n\n // handle relative files (as opposed to directories)\n if (url.substring(-3) === '/..' || url.slice(-2) === '/.') {\n url += '/'\n }\n\n // resolve simples\n url = url.replace(/(\\/(\\.\\/)+)|(\\/\\.$)/g, '/').replace(/\\/{2,}/g, '/')\n\n // remember leading parents\n if (_isRelative) {\n _leadingParents = url.substring(1).match(/^(\\.\\.\\/)+/) || ''\n if (_leadingParents) {\n _leadingParents = _leadingParents[0]\n }\n }\n\n // resolve parents\n while (true) {\n _parent = url.search(/\\/\\.\\.(\\/|$)/)\n if (_parent === -1) {\n // no more ../ to resolve\n break\n } else if (_parent === 0) {\n // top level cannot be relative, skip it\n url = url.substring(3)\n continue\n }\n\n _pos = url.substring(0, _parent).lastIndexOf('/')\n if (_pos === -1) {\n _pos = _parent\n }\n url = url.substring(0, _pos) + url.substring(_parent + 3)\n }\n\n // revert to relative\n if (_isRelative) {\n url = _leadingParents + url.substring(1)\n }\n\n return url\n}\n\nexport const splitUrl = _url => {\n let url = _url || ''\n let pos\n const res = {\n path: null,\n query: null,\n fragment: null\n }\n\n pos = url.indexOf('#')\n if (pos > -1) {\n res.fragment = url.substring(pos + 1)\n url = url.substring(0, pos)\n }\n\n pos = url.indexOf('?')\n if (pos > -1) {\n res.query = url.substring(pos + 1)\n url = url.substring(0, pos)\n }\n\n res.path = url\n\n return res\n}\n","// export const removeLeadingSlash = (str = '') => str.replace(/^\\.?\\//, '')\n// export const removeTrailingSearch = (str = '') => str.replace(/\\?[\\s\\S]*$/, '')\nexport const addLeadingSlash = (url = '') => (url.charAt(0) === '/' ? url : '/' + url);\nexport const hasBasename = (path = '', prefix = '') => new RegExp('^' + prefix + '(\\\\/|\\\\?|#|$)', 'i').test(path) || path === prefix;\nexport const stripBasename = (path = '', prefix = '') => hasBasename(path, prefix) ? path.substring(prefix.length) : path;\nexport const stripTrailing = (str = '') => str.replace(/[?#][\\s\\S]*$/, '');\nexport const stripSuffix = (path = '', suffix = '') => path.includes(suffix) ? path.substring(0, path.length - suffix.length) : path;\nexport const getHomePage = (path = '', basename = '', customRoutes = {}, entryPagePath = '') => {\n var _a;\n const routePath = addLeadingSlash(stripBasename(path, basename));\n const alias = ((_a = Object.entries(customRoutes).find(([key]) => key === routePath)) === null || _a === void 0 ? void 0 : _a[1]) || routePath;\n return entryPagePath || (typeof alias === 'string' ? alias : alias[0]) || basename;\n};\nexport const getCurrentPage = (routerMode = 'hash', basename = '/') => {\n const pagePath = routerMode === 'hash'\n ? location.hash.slice(1).split('?')[0]\n : location.pathname;\n return addLeadingSlash(stripBasename(pagePath, basename));\n};\nclass RoutesAlias {\n constructor() {\n this.conf = [];\n this.getConfig = (url = '') => {\n const customRoute = this.conf.filter((arr) => {\n return arr.includes(url);\n });\n return customRoute[0];\n };\n this.getOrigin = (url = '') => {\n var _a;\n return ((_a = this.getConfig(url)) === null || _a === void 0 ? void 0 : _a[0]) || url;\n };\n this.getAlias = (url = '') => {\n var _a;\n return ((_a = this.getConfig(url)) === null || _a === void 0 ? void 0 : _a[1]) || url;\n };\n this.getAll = (url = '') => {\n return this.conf\n .filter((arr) => arr.includes(url))\n .reduceRight((p, a) => {\n p.unshift(a[1]);\n return p;\n }, []);\n };\n }\n set(customRoutes = {}) {\n for (let key in customRoutes) {\n const path = customRoutes[key];\n key = addLeadingSlash(key);\n if (typeof path === 'string') {\n this.conf.push([key, addLeadingSlash(path)]);\n }\n else if ((path === null || path === void 0 ? void 0 : path.length) > 0) {\n this.conf.push(...path.map(p => [key, addLeadingSlash(p)]));\n }\n }\n }\n}\nexport const routesAlias = new RoutesAlias();\n","function isAbsolute(pathname) {\n return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n list[i] = list[k];\n }\n\n list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to, from) {\n if (from === undefined) from = '';\n\n var toParts = (to && to.split('/')) || [];\n var fromParts = (from && from.split('/')) || [];\n\n var isToAbs = to && isAbsolute(to);\n var isFromAbs = from && isAbsolute(from);\n var mustEndAbs = isToAbs || isFromAbs;\n\n if (to && isAbsolute(to)) {\n // to is absolute\n fromParts = toParts;\n } else if (toParts.length) {\n // to is relative, drop the filename\n fromParts.pop();\n fromParts = fromParts.concat(toParts);\n }\n\n if (!fromParts.length) return '/';\n\n var hasTrailingSlash;\n if (fromParts.length) {\n var last = fromParts[fromParts.length - 1];\n hasTrailingSlash = last === '.' || last === '..' || last === '';\n } else {\n hasTrailingSlash = false;\n }\n\n var up = 0;\n for (var i = fromParts.length; i >= 0; i--) {\n var part = fromParts[i];\n\n if (part === '.') {\n spliceOne(fromParts, i);\n } else if (part === '..') {\n spliceOne(fromParts, i);\n up++;\n } else if (up) {\n spliceOne(fromParts, i);\n up--;\n }\n }\n\n if (!mustEndAbs) for (; up--; up) fromParts.unshift('..');\n\n if (\n mustEndAbs &&\n fromParts[0] !== '' &&\n (!fromParts[0] || !isAbsolute(fromParts[0]))\n )\n fromParts.unshift('');\n\n var result = fromParts.join('/');\n\n if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n\n return result;\n}\n\nexport default resolvePathname;\n","import classNames from 'classnames'\nimport { FunctionalComponent, h } from '@stencil/core'\nimport Taro from '@tarojs/taro'\n\nimport { isVisible } from '../../utils'\n\ntype TabbarItemProps = {\n index: number\n isSelected?: boolean\n textColor?: string\n badgeText?: string\n iconPath: string\n showRedDot?: boolean\n pagePath?: string\n text?: string\n onSelect: (index: number) => void\n}\n\nexport const TabbarItem: FunctionalComponent<TabbarItemProps> = ({\n index,\n isSelected = false,\n textColor,\n iconPath,\n badgeText,\n showRedDot = false,\n pagePath,\n text,\n onSelect\n}) => {\n const className = classNames('weui-tabbar__item', {\n 'weui-bar__item_on': isSelected\n })\n const badgeStyle = {\n position: 'absolute',\n top: '-2px',\n right: '-13px'\n }\n const dotStyle = {\n position: 'absolute',\n top: '0',\n right: '-6px'\n }\n\n function onClick () {\n const page = Taro.getCurrentPages().shift()\n if (typeof page?.onTabItemTap === 'function' && isVisible(this)) {\n page.onTabItemTap({ index, pagePath, text })\n }\n onSelect(index)\n }\n\n return (\n <a key={index} href='javascript:;' class={className} onClick={onClick}>\n <span style={{ display: 'inline-block', position: 'relative' }}>\n <img src={iconPath} alt='' class='weui-tabbar__icon' />\n {!!badgeText && (\n <span\n class='weui-badge taro-tabbar-badge'\n style={badgeStyle}>\n {badgeText}\n </span>\n )}\n {showRedDot && (\n <span\n class='weui-badge weui-badge_dot'\n style={dotStyle}\n />\n )}\n </span>\n <p class='weui-tabbar__label' style={{ color: textColor }}>\n {text}\n </p>\n </a>\n )\n}\n","html,\nbody {\n height: 100%;\n}\n\n#app {\n height: 100%;\n}\n\n.taro-tabbar {\n &__border {\n &-white {\n &::before {\n border-top-color: #fff !important;\n }\n }\n }\n\n &__container {\n display: flex;\n overflow: hidden;\n flex-direction: column;\n height: 100%;\n }\n\n &__panel {\n overflow: auto;\n position: relative;\n flex: 1;\n -webkit-overflow-scrolling: auto;\n }\n\n &__tabbar {\n position: relative;\n width: 100%;\n height: 50px;\n transition: bottom 0.2s, top 0.2s;\n\n &-top {\n top: 0;\n }\n\n &-bottom {\n bottom: 0;\n margin-bottom: constant(safe-area-inset-bottom);\n margin-bottom: env(safe-area-inset-bottom);\n }\n\n &-hide {\n display: none;\n }\n\n &-slideout {\n top: -52px;\n flex: 0 0;\n }\n }\n\n &__panel + &__tabbar-slideout {\n top: auto;\n bottom: -52px;\n }\n}\n","import { Component, Prop, h, ComponentInterface, Host, State, Event, EventEmitter, Element } from '@stencil/core'\nimport Taro from '@tarojs/taro'\nimport { addLeadingSlash, getCurrentPage, stripBasename, stripSuffix } from '@tarojs/router/dist/utils'\nimport { IH5RouterConfig } from '@tarojs/taro/types/compile'\nimport classNames from 'classnames'\nimport resolvePathname from 'resolve-pathname'\n\nimport { splitUrl } from '../../utils'\nimport { TabbarItem } from './tabbar-item'\n\nconst STATUS_SHOW = 0\nconst STATUS_HIDE = 1\nconst STATUS_SLIDEOUT = 2\n\nconst basicTabBarClassName = 'taro-tabbar__tabbar'\nconst hideTabBarClassName = 'taro-tabbar__tabbar-hide'\nconst hideTabBarWithAnimationClassName = 'taro-tabbar__tabbar-slideout'\n\ninterface RouterHandler {\n index: string\n text: string\n url: string\n successHandler: Function\n errorHandler: Function\n animation?: boolean\n}\n\nexport interface Conf {\n color: string\n selectedColor: string\n backgroundColor: string\n borderStyle?: 'black' | 'white'\n list: TabbarList[]\n position?: 'bottom' | 'top'\n custom: boolean\n customRoutes: Record<string, string | string[]>\n mode: IH5RouterConfig['mode']\n basename: string\n homePage: string\n currentPagename: string\n}\n\ninterface TabbarList {\n pagePath: string\n text: string\n iconPath?: string\n selectedIconPath?: string\n badgeText?: string\n showRedDot?: boolean\n}\n\n@Component({\n tag: 'taro-tabbar',\n styleUrl: './style/index.scss'\n})\nexport class Tabbar implements ComponentInterface {\n private homePage = ''\n\n private customRoutes: Array<string[]> = []\n\n private tabbarPos: 'top' | 'bottom' = 'bottom'\n\n @Prop() conf: Conf\n\n @State() list: TabbarList[]\n\n @State() borderStyle: Conf['borderStyle']\n\n @State() backgroundColor: Conf['backgroundColor']\n\n @State() color: Conf['color']\n\n @State() selectedColor: Conf['selectedColor']\n\n @State() selectedIndex = -1\n\n @State() status: 0 | 1 | 2 = STATUS_SHOW\n\n @Event({\n eventName: 'longpress'\n }) onLongPress: EventEmitter\n\n @Element() tabbar: HTMLDivElement\n\n constructor () {\n const list = this.conf.list\n const customRoutes = this.conf.customRoutes\n if (\n Object.prototype.toString.call(list) !== '[object Array]' ||\n list.length < 2 ||\n list.length > 5\n ) {\n throw new Error('tabBar 配置错误')\n }\n\n this.homePage = addLeadingSlash(this.conf.homePage)\n for (let key in customRoutes) {\n const path = customRoutes[key]\n key = addLeadingSlash(key)\n if (typeof path === 'string') {\n this.customRoutes.push([key, addLeadingSlash(path)])\n } else if (path?.length > 0) {\n this.customRoutes.push(...path.map(p => [key, addLeadingSlash(p)]))\n }\n }\n\n list.forEach(item => {\n if (item.pagePath.indexOf('/') !== 0) {\n item.pagePath = '/' + item.pagePath\n }\n })\n\n this.list = list\n this.borderStyle = this.conf.borderStyle\n this.backgroundColor = this.conf.backgroundColor\n this.color = this.conf.color\n this.selectedColor = this.conf.selectedColor\n }\n\n getCurrentUrl () {\n const routePath = getCurrentPage(this.conf.mode, this.conf.basename)\n return decodeURI(routePath === '/' ? this.homePage : routePath)\n }\n\n getOriginUrl = (url: string) => {\n const customRoute = this.customRoutes.filter(([, customUrl]) => {\n const pathA = splitUrl(customUrl).path\n const pathB = splitUrl(url).path\n return pathA === pathB\n })\n return stripSuffix(customRoute.length ? customRoute[0][0] : url, '.html')\n }\n\n getSelectedIndex = (url: string) => {\n let foundIndex = -1\n this.list.forEach(({ pagePath }, idx) => {\n const pathA = splitUrl(url).path\n const pathB = splitUrl(pagePath).path\n if (pathA === pathB) {\n foundIndex = idx\n }\n })\n return foundIndex\n }\n\n switchTab = (index: number) => {\n this.selectedIndex = index\n Taro.switchTab({\n url: this.list[index].pagePath\n })\n }\n\n switchTabHandler = ({ url, successHandler, errorHandler }: RouterHandler) => {\n const currentUrl = this.getOriginUrl(this.getCurrentUrl() || this.homePage)\n const nextTab = resolvePathname(url, currentUrl)\n const foundIndex = this.getSelectedIndex(nextTab)\n\n if (foundIndex > -1) {\n this.switchTab(foundIndex)\n successHandler({\n errMsg: 'switchTab:ok'\n })\n } else {\n errorHandler({\n errMsg: `switchTab:fail page \"${nextTab}\" is not found`\n })\n }\n }\n\n routerChangeHandler = (options?) => {\n const to = options?.toLocation?.path\n let currentPage\n\n if (typeof to === 'string') {\n const routerBasename = this.conf.basename || '/'\n currentPage = stripBasename(addLeadingSlash(to || this.homePage), routerBasename) || '/'\n } else {\n currentPage = this.getCurrentUrl()\n }\n\n this.selectedIndex = this.getSelectedIndex(this.getOriginUrl(currentPage))\n }\n\n setTabBarBadgeHandler = ({ index, text, successHandler, errorHandler }: RouterHandler) => {\n const list = [...this.list]\n if (index in list) {\n list[index].showRedDot = false\n list[index].badgeText = text\n successHandler({\n errMsg: 'setTabBarBadge:ok'\n })\n } else {\n errorHandler({\n errMsg: 'setTabBarBadge:fail tabbar item not found'\n })\n }\n\n this.list = list\n }\n\n removeTabBarBadgeHandler = ({ index, successHandler, errorHandler }: RouterHandler) => {\n const list = [...this.list]\n if (index in list) {\n list[index].badgeText = null\n list[index].badgeText = null\n successHandler({\n errMsg: 'removeTabBarBadge:ok'\n })\n } else {\n errorHandler({\n errMsg: 'removeTabBarBadge:fail tabbar item not found'\n })\n }\n\n this.list = list\n }\n\n showTabBarRedDotHandler = ({ index, successHandler, errorHandler }: RouterHandler) => {\n const list = [...this.list]\n if (index in list) {\n list[index].badgeText = null\n list[index].showRedDot = true\n successHandler({\n errMsg: 'showTabBarRedDot:ok'\n })\n } else {\n errorHandler({\n errMsg: 'showTabBarRedDot:fail tabbar item not found'\n })\n }\n\n this.list = list\n }\n\n hideTabBarRedDotHandler = ({ index, successHandler, errorHandler }: RouterHandler) => {\n const list = [...this.list]\n if (index in list) {\n list[index].showRedDot = false\n successHandler({\n errMsg: 'hideTabBarRedDot:ok'\n })\n } else {\n errorHandler({\n errMsg: 'hideTabBarRedDot:fail tabbar item not found'\n })\n }\n\n this.list = list\n }\n\n showTabBarHandler = ({ successHandler }) => {\n this.status = STATUS_SHOW\n successHandler({\n errMsg: 'showTabBar:ok'\n })\n }\n\n hideTabBarHandler = ({ animation, successHandler }) => {\n this.status = animation ? STATUS_SLIDEOUT : STATUS_HIDE\n successHandler({\n errMsg: 'hideTabBar:ok'\n })\n }\n\n setTabBarStyleHandler = ({ color, selectedColor, backgroundColor, borderStyle, successHandler }) => {\n if (backgroundColor) this.backgroundColor = backgroundColor\n if (borderStyle) this.borderStyle = borderStyle\n if (color) this.color = color\n if (selectedColor) this.selectedColor = selectedColor\n successHandler({\n errMsg: 'setTabBarStyle:ok'\n })\n }\n\n setTabBarItemHandler = ({ index, iconPath, selectedIconPath, text, successHandler, errorHandler }) => {\n const list = [...this.list]\n if (index in list) {\n if (iconPath) list[index].iconPath = iconPath\n if (selectedIconPath) list[index].selectedIconPath = selectedIconPath\n if (text) list[index].text = text\n successHandler({\n errMsg: 'setTabBarItem:ok'\n })\n } else {\n errorHandler({\n errMsg: 'setTabBarItem:fail tabbar item not found'\n })\n }\n\n this.list = list\n }\n\n bindEvent () {\n Taro.eventCenter.on('__taroRouterChange', this.routerChangeHandler)\n Taro.eventCenter.on('__taroSwitchTab', this.switchTabHandler)\n Taro.eventCenter.on('__taroSetTabBarBadge', this.setTabBarBadgeHandler)\n Taro.eventCenter.on('__taroRemoveTabBarBadge', this.removeTabBarBadgeHandler)\n Taro.eventCenter.on('__taroShowTabBarRedDotHandler', this.showTabBarRedDotHandler)\n Taro.eventCenter.on('__taroHideTabBarRedDotHandler', this.hideTabBarRedDotHandler)\n Taro.eventCenter.on('__taroShowTabBar', this.showTabBarHandler)\n Taro.eventCenter.on('__taroHideTabBar', this.hideTabBarHandler)\n Taro.eventCenter.on('__taroSetTabBarStyle', this.setTabBarStyleHandler)\n Taro.eventCenter.on('__taroSetTabBarItem', this.setTabBarItemHandler)\n }\n\n removeEvent () {\n Taro.eventCenter.off('__taroRouterChange', this.routerChangeHandler)\n Taro.eventCenter.off('__taroSwitchTab', this.switchTabHandler)\n Taro.eventCenter.off('__taroSetTabBarBadge', this.setTabBarBadgeHandler)\n Taro.eventCenter.off('__taroRemoveTabBarBadge', this.removeTabBarBadgeHandler)\n Taro.eventCenter.off('__taroShowTabBarRedDotHandler', this.showTabBarRedDotHandler)\n Taro.eventCenter.off('__taroHideTabBarRedDotHandler', this.hideTabBarRedDotHandler)\n Taro.eventCenter.off('__taroShowTabBar', this.showTabBarHandler)\n Taro.eventCenter.off('__taroHideTabBar', this.hideTabBarHandler)\n Taro.eventCenter.off('__taroSetTabBarStyle', this.setTabBarStyleHandler)\n Taro.eventCenter.off('__taroSetTabBarItem', this.setTabBarItemHandler)\n }\n\n componentDidLoad () {\n this.tabbarPos = this.tabbar.nextElementSibling ? 'top' : 'bottom'\n this.bindEvent()\n this.routerChangeHandler()\n }\n\n disconnectedCallback () {\n this.removeEvent()\n }\n\n render () {\n const { tabbarPos = 'bottom' } = this\n const status = this.status\n const containerCls = classNames('weui-tabbar', {\n [`taro-tabbar__border-${this.borderStyle || 'black'}`]: true\n })\n const shouldHideTabBar = this.selectedIndex === -1 || status === STATUS_HIDE\n const shouldSlideout = status === STATUS_SLIDEOUT\n\n return (\n <Host\n class={classNames(\n basicTabBarClassName,\n `${basicTabBarClassName}-${tabbarPos}`, {\n [hideTabBarClassName]: shouldHideTabBar,\n [hideTabBarWithAnimationClassName]: shouldSlideout\n })} >\n <div\n class={containerCls}\n style={{\n backgroundColor: this.backgroundColor || '',\n height: 'inherit'\n }}\n >\n {this.list.map((item, index) => {\n const isSelected = this.selectedIndex === index\n let textColor\n let iconPath\n if (isSelected) {\n textColor = this.selectedColor || ''\n iconPath = item.selectedIconPath\n } else {\n textColor = this.color || ''\n iconPath = item.iconPath\n }\n return (\n <TabbarItem\n index={index}\n onSelect={this.switchTab.bind(this)}\n isSelected={isSelected}\n textColor={textColor}\n iconPath={iconPath}\n pagePath={item.pagePath}\n text={item.text}\n badgeText={item.badgeText}\n showRedDot={item.showRedDot}\n />\n )\n })}\n </div>\n </Host>\n )\n }\n}\n"],"mappings":"sdAsDO,IAAMA,SAAW,SAAAC,GACtB,IAAIC,EAAMD,GAAQ,GAClB,IAAIE,EACJ,IAAMC,EAAM,CACVC,KAAM,KACNC,MAAO,KACPC,SAAU,MAGZJ,EAAMD,EAAIM,QAAQ,KAClB,GAAIL,GAAO,EAAG,CACZC,EAAIG,SAAWL,EAAIO,UAAUN,EAAM,GACnCD,EAAMA,EAAIO,UAAU,EAAGN,E,CAGzBA,EAAMD,EAAIM,QAAQ,KAClB,GAAIL,GAAO,EAAG,CACZC,EAAIE,MAAQJ,EAAIO,UAAUN,EAAM,GAChCD,EAAMA,EAAIO,UAAU,EAAGN,E,CAGzBC,EAAIC,KAAOH,EAEX,OAAOE,CACT,EC5EO,IAAMM,gBAAkB,SAACR,GAAA,GAAAA,SAAA,GAAAA,EAAA,EAAQ,QAAMA,EAAIS,OAAO,KAAO,IAAMT,EAAM,IAAMA,CAA1C,EACjC,IAAMU,YAAc,SAACP,EAAWQ,GAAX,GAAAR,SAAA,GAAAA,EAAA,EAAS,CAAE,GAAA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AAQA,EAC5B,IAAMyE,EAASvD,KAAKuD,OACpB,IAAMiC,EAAerG,WAAW,eAAaX,EAAA,GAC3CA,EAAC,uBAAAV,OAAuBkC,KAAK6D,aAAe,UAAY,K,IAE1D,IAAM4B,EAAmBzF,KAAKkC,iBAAmB,GAAKqB,IAAW3C,YACjE,IAAM8E,EAAiBnC,IAAW1C,gBAElC,OACEZ,EAAC0F,KAAI,CACHvF,MAAOjB,WACL2B,qBACA,GAAAhD,OAAGgD,qBAAoB,KAAAhD,OAAIwD,IAAW7C,EAAA,GACpCA,EAACsC,qBAAsB0E,EACvBhH,EAACuC,kCAAmC0E,E,KAExCzF,EAAA,OACEG,MAAOoF,EACPnF,MAAO,CACLuD,gBAAiB5D,KAAK4D,iBAAmB,GACzCgC,OAAQ,YAGT5F,KAAKjD,KAAKyH,KAAI,SAACE,EAAM1H,GACpB,IAAM0B,EAAayC,EAAKe,gBAAkBlF,EAC1C,IAAI2B,EACJ,IAAIC,EACJ,GAAIF,EAAY,CACdC,EAAYwC,EAAKwC,eAAiB,GAClC/E,EAAW8F,EAAKX,gB,KACX,CACLpF,EAAYwC,EAAKV,OAAS,GAC1B7B,EAAW8F,EAAK9F,Q,CAElB,OACEqB,EAAC1B,WAAU,CACTvB,MAAOA,EACPiC,SAAUkC,EAAKc,UAAU4D,KAAK1E,GAC9BzC,WAAYA,EACZC,UAAWA,EACXC,SAAUA,EACVrC,SAAUmI,EAAKnI,SACfyC,KAAM0F,EAAK1F,KACXH,UAAW6F,EAAK7F,UAChBE,WAAY2F,EAAK3F,Y,yIA9Td,G"}
@@ -1,2 +1,2 @@
1
- import{r as registerInstance,h,H as Host}from"./index-5d881caf.js";import{n as notSupport}from"./helper-3d0ecf0f.js";import"@tarojs/taro";var Tabs=function(){function t(t){registerInstance(this,t)}t.prototype.componentDidLoad=function(){notSupport("Tabs",this)};t.prototype.render=function(){return h(Host,null)};return t}();export{Tabs as taro_tabs_core};
1
+ import{r as registerInstance,h,H as Host}from"./index-c948674f.js";import{n as notSupport}from"./helper-3d0ecf0f.js";import"@tarojs/taro";var Tabs=function(){function t(t){registerInstance(this,t)}t.prototype.componentDidLoad=function(){notSupport("Tabs",this)};t.prototype.render=function(){return h(Host,null)};return t}();export{Tabs as taro_tabs_core};
2
2
  //# sourceMappingURL=taro-tabs-core.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["src/components/tabs/tabs.tsx"],"names":["Tabs","prototype","componentDidLoad","notSupport","this","render","h","Host"],"mappings":"8IAOaA,KAAI,kDACfA,EAAAC,UAAAC,iBAAA,WACEC,WAAW,OAAQC,OAGrBJ,EAAAC,UAAAI,OAAA,WACE,OACEC,EAACC,KAAI,gBAPM","sourcesContent":["import { Component, ComponentInterface, h, Host } from '@stencil/core'\n\nimport { notSupport } from '../../utils'\n\n@Component({\n tag: 'taro-tabs-core'\n})\nexport class Tabs implements ComponentInterface {\n componentDidLoad () {\n notSupport('Tabs', this)\n }\n\n render () {\n return (\n <Host />\n )\n }\n}\n"]}
1
+ {"version":3,"names":["Tabs","prototype","componentDidLoad","notSupport","this","render","h","Host"],"sources":["src/components/tabs/tabs.tsx"],"sourcesContent":["import { Component, ComponentInterface, h, Host } from '@stencil/core'\n\nimport { notSupport } from '../../utils'\n\n@Component({\n tag: 'taro-tabs-core'\n})\nexport class Tabs implements ComponentInterface {\n componentDidLoad () {\n notSupport('Tabs', this)\n }\n\n render () {\n return (\n <Host />\n )\n }\n}\n"],"mappings":"8IAOaA,KAAI,W,uCACfA,EAAAC,UAAAC,iBAAA,WACEC,WAAW,OAAQC,K,EAGrBJ,EAAAC,UAAAI,OAAA,WACE,OACEC,EAACC,KAAI,K,WAPM,U"}
@@ -1,2 +1,2 @@
1
- import{r as registerInstance,h,H as Host}from"./index-5d881caf.js";import{c as classnames}from"./index-1d8e8acd.js";var indexCss="taro-text-core{display:inline;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:pre-wrap}.taro-text__selectable{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}";var Text=function(){function e(e){registerInstance(this,e);this.selectable=false}e.prototype.render=function(){var e=classnames({"taro-text__selectable":this.selectable});return h(Host,{class:e},h("slot",null))};return e}();Text.style=indexCss;export{Text as taro_text_core};
1
+ import{r as registerInstance,h,H as Host}from"./index-c948674f.js";import{c as classnames}from"./index-1d8e8acd.js";var indexCss="taro-text-core{display:inline;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:pre-wrap}.taro-text__selectable{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}";var Text=function(){function e(e){registerInstance(this,e);this.selectable=false}e.prototype.render=function(){var e=classnames({"taro-text__selectable":this.selectable});return h(Host,{class:e},h("slot",null))};return e}();Text.style=indexCss;export{Text as taro_text_core};
2
2
  //# sourceMappingURL=taro-text-core.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["src/components/text/style/index.scss?tag=taro-text-core","src/components/text/text.tsx"],"names":["indexCss","Text","prototype","render","cls","classNames","taro-text__selectable","this","selectable","h","Host","class"],"mappings":"oHAAA,IAAMA,SAAW,2PCOJC,KAAI,kEACM,MAErBA,EAAAC,UAAAC,OAAA,WACE,IAAMC,EAAMC,WAAW,CACrBC,wBAAyBC,KAAKC,aAEhC,OACEC,EAACC,KAAI,CAACC,MAAOP,GACXK,EAAA,OAAA,iBATS","sourcesContent":["taro-text-core {\n display: inline;\n user-select: none;\n white-space: pre-wrap;\n}\n\n.taro-text__selectable {\n user-select: text;\n}\n","import { Component, Prop, h, ComponentInterface, Host } from '@stencil/core'\nimport classNames from 'classnames'\n\n@Component({\n tag: 'taro-text-core',\n styleUrl: './style/index.scss'\n})\nexport class Text implements ComponentInterface {\n @Prop() selectable = false\n\n render () {\n const cls = classNames({\n 'taro-text__selectable': this.selectable\n })\n return (\n <Host class={cls}>\n <slot></slot>\n </Host>\n )\n }\n}\n"]}
1
+ {"version":3,"names":["indexCss","Text","prototype","render","cls","classNames","this","selectable","h","Host","class"],"sources":["src/components/text/style/index.scss?tag=taro-text-core","src/components/text/text.tsx"],"sourcesContent":["taro-text-core {\n display: inline;\n user-select: none;\n white-space: pre-wrap;\n}\n\n.taro-text__selectable {\n user-select: text;\n}\n","import { Component, Prop, h, ComponentInterface, Host } from '@stencil/core'\nimport classNames from 'classnames'\n\n@Component({\n tag: 'taro-text-core',\n styleUrl: './style/index.scss'\n})\nexport class Text implements ComponentInterface {\n @Prop() selectable = false\n\n render () {\n const cls = classNames({\n 'taro-text__selectable': this.selectable\n })\n return (\n <Host class={cls}>\n <slot></slot>\n </Host>\n )\n }\n}\n"],"mappings":"oHAAA,IAAMA,SAAW,uP,ICOJC,KAAI,W,uDACM,K,CAErBA,EAAAC,UAAAC,OAAA,WACE,IAAMC,EAAMC,WAAW,CACrB,wBAAyBC,KAAKC,aAEhC,OACEC,EAACC,KAAI,CAACC,MAAON,GACXI,EAAA,a,WATS,G"}
@@ -1,2 +1,2 @@
1
- import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-5d881caf.js";var indexCss="taro-textarea-core{display:block;width:300px}taro-textarea-core .auto-height{height:auto}.taro-textarea{display:block;position:relative;border:0;width:100%;height:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:auto;line-height:1.5}.taro-textarea:focus{outline:none}";function fixControlledValue(e){return e!==null&&e!==void 0?e:""}var Textarea=function(){function e(e){var t=this;registerInstance(this,e);this.onInput=createEvent(this,"input",7);this.onFocus=createEvent(this,"focus",7);this.onBlur=createEvent(this,"blur",7);this.onChange=createEvent(this,"change",7);this.onLineChange=createEvent(this,"linechange",7);this.handleInput=function(e){e.stopPropagation();t.handleLineChange();var n=e.target.value||"";t.onInput.emit({value:n,cursor:n.length})};this.handleFocus=function(e){e.stopPropagation();t.onFocus.emit({value:e.target.value})};this.handleBlur=function(e){e.stopPropagation();t.onBlur.emit({value:e.target.value})};this.handleChange=function(e){e.stopPropagation();t.onChange.emit({value:e.target.value})};this.handleLineChange=function(){var e=t.getNumberOfLines();if(e!==t.line){t.line=e;t.onLineChange.emit({height:t.textareaRef.clientHeight,lineCount:t.line})}};this.calculateContentHeight=function(e,t){var n=e.style.height,a=e.offsetHeight,i=e.scrollHeight,o=e.style.overflow,r=e.style.minHeight||null;if(a>=i){e.style.minHeight=0;e.style.height=a+t+"px";e.style.overflow="hidden";if(i<e.scrollHeight){while(e.offsetHeight>=e.scrollHeight){e.style.height=(a-=t)+"px"}while(e.offsetHeight<e.scrollHeight){e.style.height=a+++"px"}e.style.height=n;e.style.overflow=o;e.style.minHeight=r;return a}}else{return i}};this.getNumberOfLines=function(){var e=t.textareaRef,n=window.getComputedStyle?window.getComputedStyle(e):e.style,a=parseInt(n.lineHeight,10),i=t.calculateContentHeight(e,a),o=Math.floor(i/a);return o};this.value=undefined;this.placeholder=undefined;this.disabled=false;this.maxlength=140;this.autoFocus=false;this.autoHeight=false;this.name=undefined;this.nativeProps={};this.line=1}e.prototype.focus=function(){this.textareaRef.focus()};e.prototype.componentDidLoad=function(){var e=this;Object.defineProperty(this.el,"value",{get:function(){return e.textareaRef.value},set:function(t){return e.value=t},configurable:true});this.autoFocus&&this.textareaRef.focus()};e.prototype.render=function(){var e=this;var t=this,n=t.value,a=t.placeholder,i=t.disabled,o=t.maxlength,r=t.autoFocus,l=t.autoHeight,s=t.name,u=t.nativeProps,c=t.handleInput,g=t.handleFocus,f=t.handleBlur,d=t.handleChange;var p={};if(l){p.rows=this.line}return h("textarea",Object.assign({ref:function(t){if(t){e.textareaRef=t}},class:"taro-textarea ".concat(l?"auto-height":""),value:fixControlledValue(n),placeholder:a,name:s,disabled:i,maxlength:o,autofocus:r,onInput:c,onFocus:g,onBlur:f,onChange:d},u,p))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Textarea.style=indexCss;export{Textarea as taro_textarea_core};
1
+ import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-c948674f.js";var indexCss="taro-textarea-core{display:block;width:300px}taro-textarea-core .auto-height{height:auto}.taro-textarea{display:block;position:relative;border:0;width:100%;height:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:auto;line-height:1.5}.taro-textarea:focus{outline:none}";function fixControlledValue(e){return e!==null&&e!==void 0?e:""}var Textarea=function(){function e(e){var t=this;registerInstance(this,e);this.onInput=createEvent(this,"input",7);this.onFocus=createEvent(this,"focus",7);this.onBlur=createEvent(this,"blur",7);this.onChange=createEvent(this,"change",7);this.onLineChange=createEvent(this,"linechange",7);this.handleInput=function(e){e.stopPropagation();t.handleLineChange();var n=e.target.value||"";t.onInput.emit({value:n,cursor:n.length})};this.handleFocus=function(e){e.stopPropagation();t.onFocus.emit({value:e.target.value})};this.handleBlur=function(e){e.stopPropagation();t.onBlur.emit({value:e.target.value})};this.handleChange=function(e){e.stopPropagation();t.onChange.emit({value:e.target.value})};this.handleLineChange=function(){var e=t.getNumberOfLines();if(e!==t.line){t.line=e;t.onLineChange.emit({height:t.textareaRef.clientHeight,lineCount:t.line})}};this.calculateContentHeight=function(e,t){var n=e.style.height,a=e.offsetHeight,i=e.scrollHeight,o=e.style.overflow,r=e.style.minHeight||null;if(a>=i){e.style.minHeight=0;e.style.height=a+t+"px";e.style.overflow="hidden";if(i<e.scrollHeight){while(e.offsetHeight>=e.scrollHeight){e.style.height=(a-=t)+"px"}while(e.offsetHeight<e.scrollHeight){e.style.height=a+++"px"}e.style.height=n;e.style.overflow=o;e.style.minHeight=r;return a}}else{return i}};this.getNumberOfLines=function(){var e=t.textareaRef,n=window.getComputedStyle?window.getComputedStyle(e):e.style,a=parseInt(n.lineHeight,10),i=t.calculateContentHeight(e,a),o=Math.floor(i/a);return o};this.value=undefined;this.placeholder=undefined;this.disabled=false;this.maxlength=140;this.autoFocus=false;this.autoHeight=false;this.name=undefined;this.nativeProps={};this.line=1}e.prototype.focus=function(){this.textareaRef.focus()};e.prototype.componentDidLoad=function(){var e=this;Object.defineProperty(this.el,"value",{get:function(){return e.textareaRef.value},set:function(t){return e.value=t},configurable:true});this.autoFocus&&this.textareaRef.focus()};e.prototype.render=function(){var e=this;var t=this,n=t.value,a=t.placeholder,i=t.disabled,o=t.maxlength,r=t.autoFocus,l=t.autoHeight,s=t.name,u=t.nativeProps,c=t.handleInput,g=t.handleFocus,f=t.handleBlur,p=t.handleChange;var d={};if(l){d.rows=this.line}return h("textarea",Object.assign({ref:function(t){if(t){e.textareaRef=t}},class:"taro-textarea ".concat(l?"auto-height":""),value:fixControlledValue(n),placeholder:a,name:s,disabled:i,maxlength:o,autofocus:r,onInput:c,onFocus:g,onBlur:f,onChange:p},u,d))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Textarea.style=indexCss;export{Textarea as taro_textarea_core};
2
2
  //# sourceMappingURL=taro-textarea-core.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["src/components/textarea/style/index.scss?tag=taro-textarea-core","src/components/textarea/textarea.tsx"],"names":["indexCss","fixControlledValue","value","Textarea","this","handleInput","e","stopPropagation","_this","handleLineChange","target","onInput","emit","cursor","length","handleFocus","onFocus","handleBlur","onBlur","handleChange","onChange","line","getNumberOfLines","onLineChange","height","textareaRef","clientHeight","lineCount","calculateContentHeight","ta","scanAmount","origHeight","style","offsetHeight","scrollHeight","overflow","originMinHeight","minHeight","window","getComputedStyle","taLineHeight","parseInt","lineHeight","taHeight","numberOfLines","Math","floor","prototype","focus","componentDidLoad","Object","defineProperty","el","get","set","configurable","autoFocus","render","_a","placeholder","disabled","maxlength","autoHeight","name","nativeProps","otherProps","rows","h","assign","ref","input","class","concat","autofocus"],"mappings":"0FAAA,IAAMA,SAAW,ySCGjB,SAASC,mBAAmBC,GAC1B,OAAOA,IAAK,MAALA,SAAK,EAALA,EAAS,OAOLC,SAAQ,oRAsDnBC,KAAAC,YAAc,SAACC,GACbA,EAAEC,kBACFC,EAAKC,mBACL,IAAMP,EAAQI,EAAEI,OAAOR,OAAS,GAChCM,EAAKG,QAAQC,KAAK,CAChBV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textarea-core {\n display: block;\n width: 300px;\n}\n\ntaro-textarea-core .auto-height {\n height: auto;\n}\n\n.taro-textarea {\n &:focus {\n outline: none;\n }\n\n display: block;\n position: relative;\n border: 0;\n width: 100%;\n height: inherit;\n appearance: none;\n cursor: auto;\n line-height: 1.5;\n}\n","import { Component, h, ComponentInterface, Prop, State, Event, EventEmitter, Element, Method } from '@stencil/core'\nimport { TaroEvent } from '../../../types'\n\nfunction fixControlledValue(value?: string) {\n return value ?? ''\n}\n\n@Component({\n tag: 'taro-textarea-core',\n styleUrl: './style/index.scss'\n})\nexport class Textarea implements ComponentInterface {\n private textareaRef: HTMLTextAreaElement\n\n @Element() el: HTMLElement\n\n @Prop({ mutable: true }) value: string\n @Prop() placeholder: string\n @Prop() disabled = false\n @Prop() maxlength = 140\n @Prop() autoFocus = false\n @Prop() autoHeight = false\n @Prop() name: string\n @Prop() nativeProps = {}\n @State() line = 1\n\n @Event({\n eventName: 'input'\n })\n onInput: EventEmitter\n\n @Event({\n eventName: 'focus'\n })\n onFocus: EventEmitter\n\n @Event({\n eventName: 'blur'\n })\n onBlur: EventEmitter\n\n @Event({\n eventName: 'change'\n })\n onChange: EventEmitter\n\n @Event({\n eventName: 'linechange' // 必须全小写\n })\n onLineChange: EventEmitter\n\n @Method()\n focus() {\n this.textareaRef.focus()\n }\n\n componentDidLoad() {\n Object.defineProperty(this.el, 'value', {\n get: () => this.textareaRef.value,\n set: value => (this.value = value),\n configurable: true\n })\n this.autoFocus && this.textareaRef.focus()\n }\n\n handleInput = (e: TaroEvent<HTMLInputElement>) => {\n e.stopPropagation()\n this.handleLineChange()\n const value = e.target.value || ''\n this.onInput.emit({\n value,\n cursor: value.length\n })\n }\n\n handleFocus = (e: TaroEvent<HTMLInputElement> & FocusEvent) => {\n e.stopPropagation()\n this.onFocus.emit({\n value: e.target.value\n })\n }\n\n handleBlur = (e: TaroEvent<HTMLInputElement> & FocusEvent) => {\n e.stopPropagation()\n this.onBlur.emit({\n value: e.target.value\n })\n }\n\n handleChange = (e: TaroEvent<HTMLInputElement>) => {\n e.stopPropagation()\n this.onChange.emit({\n value: e.target.value\n })\n }\n\n handleLineChange = () => {\n const line = this.getNumberOfLines()\n if (line !== this.line) {\n this.line = line\n this.onLineChange.emit({\n height: this.textareaRef.clientHeight,\n lineCount: this.line\n })\n }\n }\n\n calculateContentHeight = (ta, scanAmount) => {\n let origHeight = ta.style.height,\n height = ta.offsetHeight,\n scrollHeight = ta.scrollHeight,\n overflow = ta.style.overflow,\n originMinHeight = ta.style.minHeight || null\n\n /// only bother if the ta is bigger than content\n if (height >= scrollHeight) {\n ta.style.minHeight = 0\n /// check that our browser supports changing dimension\n /// calculations mid-way through a function call...\n ta.style.height = height + scanAmount + 'px'\n /// because the scrollbar can cause calculation problems\n ta.style.overflow = 'hidden'\n /// by checking that scrollHeight has updated\n if (scrollHeight < ta.scrollHeight) {\n /// now try and scan the ta's height downwards\n /// until scrollHeight becomes larger than height\n while (ta.offsetHeight >= ta.scrollHeight) {\n ta.style.height = (height -= scanAmount) + 'px'\n }\n /// be more specific to get the exact height\n while (ta.offsetHeight < ta.scrollHeight) {\n ta.style.height = height++ + 'px'\n }\n /// reset the ta back to it's original height\n ta.style.height = origHeight\n /// put the overflow back\n ta.style.overflow = overflow\n ta.style.minHeight = originMinHeight\n return height\n }\n } else {\n return scrollHeight\n }\n }\n\n getNumberOfLines = () => {\n const ta = this.textareaRef,\n style = window.getComputedStyle ? window.getComputedStyle(ta) : ta.style,\n // This will get the line-height only if it is set in the css,\n // otherwise it's \"normal\"\n taLineHeight = parseInt(style.lineHeight, 10),\n // Get the scroll height of the textarea\n taHeight = this.calculateContentHeight(ta, taLineHeight),\n // calculate the number of lines\n numberOfLines = Math.floor(taHeight / taLineHeight)\n\n return numberOfLines\n }\n\n render() {\n const {\n value,\n placeholder,\n disabled,\n maxlength,\n autoFocus,\n autoHeight,\n name,\n nativeProps,\n handleInput,\n handleFocus,\n handleBlur,\n handleChange\n } = this\n\n const otherProps: {\n [props: string]: any\n } = {}\n\n if (autoHeight) {\n otherProps.rows = this.line\n }\n\n return (\n <textarea\n ref={input => {\n if (input) {\n this.textareaRef = input\n }\n }}\n class={`taro-textarea ${autoHeight ? 'auto-height' : ''}`}\n value={fixControlledValue(value)}\n placeholder={placeholder}\n name={name}\n disabled={disabled}\n maxlength={maxlength}\n autofocus={autoFocus}\n onInput={handleInput}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onChange={handleChange}\n {...nativeProps}\n {...otherProps}\n />\n )\n }\n}\n"]}
1
+ {"version":3,"names":["indexCss","fixControlledValue","value","Textarea","this","handleInput","e","stopPropagation","_this","handleLineChange","target","onInput","emit","cursor","length","handleFocus","onFocus","handleBlur","onBlur","handleChange","onChange","line","getNumberOfLines","onLineChange","height","textareaRef","clientHeight","lineCount","calculateContentHeight","ta","scanAmount","origHeight","style","offsetHeight","scrollHeight","overflow","originMinHeight","minHeight","window","getComputedStyle","taLineHeight","parseInt","lineHeight","taHeight","numberOfLines","Math","floor","prototype","focus","componentDidLoad","Object","defineProperty","el","get","set","configurable","autoFocus","render","_a","placeholder","disabled","maxlength","autoHeight","name","nativeProps","otherProps","rows","h","assign","ref","input","class","concat","autofocus"],"sources":["src/components/textarea/style/index.scss?tag=taro-textarea-core","src/components/textarea/textarea.tsx"],"sourcesContent":["taro-textarea-core {\n display: block;\n width: 300px;\n}\n\ntaro-textarea-core .auto-height {\n height: auto;\n}\n\n.taro-textarea {\n &:focus {\n outline: none;\n }\n\n display: block;\n position: relative;\n border: 0;\n width: 100%;\n height: inherit;\n appearance: none;\n cursor: auto;\n line-height: 1.5;\n}\n","import { Component, h, ComponentInterface, Prop, State, Event, EventEmitter, Element, Method } from '@stencil/core'\nimport { TaroEvent } from '../../../types'\n\nfunction fixControlledValue(value?: string) {\n return value ?? ''\n}\n\n@Component({\n tag: 'taro-textarea-core',\n styleUrl: './style/index.scss'\n})\nexport class Textarea implements ComponentInterface {\n private textareaRef: HTMLTextAreaElement\n\n @Element() el: HTMLElement\n\n @Prop({ mutable: true }) value: string\n @Prop() placeholder: string\n @Prop() disabled = false\n @Prop() maxlength = 140\n @Prop() autoFocus = false\n @Prop() autoHeight = false\n @Prop() name: string\n @Prop() nativeProps = {}\n @State() line = 1\n\n @Event({\n eventName: 'input'\n })\n onInput: EventEmitter\n\n @Event({\n eventName: 'focus'\n })\n onFocus: EventEmitter\n\n @Event({\n eventName: 'blur'\n })\n onBlur: EventEmitter\n\n @Event({\n eventName: 'change'\n })\n onChange: EventEmitter\n\n @Event({\n eventName: 'linechange' // 必须全小写\n })\n onLineChange: EventEmitter\n\n @Method()\n focus() {\n this.textareaRef.focus()\n }\n\n componentDidLoad() {\n Object.defineProperty(this.el, 'value', {\n get: () => this.textareaRef.value,\n set: value => (this.value = value),\n configurable: true\n })\n this.autoFocus && this.textareaRef.focus()\n }\n\n handleInput = (e: TaroEvent<HTMLInputElement>) => {\n e.stopPropagation()\n this.handleLineChange()\n const value = e.target.value || ''\n this.onInput.emit({\n value,\n cursor: value.length\n })\n }\n\n handleFocus = (e: TaroEvent<HTMLInputElement> & FocusEvent) => {\n e.stopPropagation()\n this.onFocus.emit({\n value: e.target.value\n })\n }\n\n handleBlur = (e: TaroEvent<HTMLInputElement> & FocusEvent) => {\n e.stopPropagation()\n this.onBlur.emit({\n value: e.target.value\n })\n }\n\n handleChange = (e: TaroEvent<HTMLInputElement>) => {\n e.stopPropagation()\n this.onChange.emit({\n value: e.target.value\n })\n }\n\n handleLineChange = () => {\n const line = this.getNumberOfLines()\n if (line !== this.line) {\n this.line = line\n this.onLineChange.emit({\n height: this.textareaRef.clientHeight,\n lineCount: this.line\n })\n }\n }\n\n calculateContentHeight = (ta, scanAmount) => {\n let origHeight = ta.style.height,\n height = ta.offsetHeight,\n scrollHeight = ta.scrollHeight,\n overflow = ta.style.overflow,\n originMinHeight = ta.style.minHeight || null\n\n /// only bother if the ta is bigger than content\n if (height >= scrollHeight) {\n ta.style.minHeight = 0\n /// check that our browser supports changing dimension\n /// calculations mid-way through a function call...\n ta.style.height = height + scanAmount + 'px'\n /// because the scrollbar can cause calculation problems\n ta.style.overflow = 'hidden'\n /// by checking that scrollHeight has updated\n if (scrollHeight < ta.scrollHeight) {\n /// now try and scan the ta's height downwards\n /// until scrollHeight becomes larger than height\n while (ta.offsetHeight >= ta.scrollHeight) {\n ta.style.height = (height -= scanAmount) + 'px'\n }\n /// be more specific to get the exact height\n while (ta.offsetHeight < ta.scrollHeight) {\n ta.style.height = height++ + 'px'\n }\n /// reset the ta back to it's original height\n ta.style.height = origHeight\n /// put the overflow back\n ta.style.overflow = overflow\n ta.style.minHeight = originMinHeight\n return height\n }\n } else {\n return scrollHeight\n }\n }\n\n getNumberOfLines = () => {\n const ta = this.textareaRef,\n style = window.getComputedStyle ? window.getComputedStyle(ta) : ta.style,\n // This will get the line-height only if it is set in the css,\n // otherwise it's \"normal\"\n taLineHeight = parseInt(style.lineHeight, 10),\n // Get the scroll height of the textarea\n taHeight = this.calculateContentHeight(ta, taLineHeight),\n // calculate the number of lines\n numberOfLines = Math.floor(taHeight / taLineHeight)\n\n return numberOfLines\n }\n\n render() {\n const {\n value,\n placeholder,\n disabled,\n maxlength,\n autoFocus,\n autoHeight,\n name,\n nativeProps,\n handleInput,\n handleFocus,\n handleBlur,\n handleChange\n } = this\n\n const otherProps: {\n [props: string]: any\n } = {}\n\n if (autoHeight) {\n otherProps.rows = this.line\n }\n\n return (\n <textarea\n ref={input => {\n if (input) {\n this.textareaRef = input\n }\n }}\n class={`taro-textarea ${autoHeight ? 'auto-height' : ''}`}\n value={fixControlledValue(value)}\n placeholder={placeholder}\n name={name}\n disabled={disabled}\n maxlength={maxlength}\n autofocus={autoFocus}\n onInput={handleInput}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onChange={handleChange}\n {...nativeProps}\n {...otherProps}\n />\n )\n }\n}\n"],"mappings":"0FAAA,IAAMA,SAAW,ySCGjB,SAASC,mBAAmBC,GAC1B,OAAOA,IAAK,MAALA,SAAK,EA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BAAAC,OAAiBV,EAAa,cAAgB,IACrD5D,MAAOD,mBAAmBC,GAC1ByD,YAAaA,EACbI,KAAMA,EACNH,SAAUA,EACVC,UAAWA,EACXY,UAAWjB,EACX7C,QAASN,EACTW,QAASD,EACTG,OAAQD,EACRG,SAAUD,GACN6C,EACAC,G,gIA/LS,G"}
@@ -1,2 +1,2 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,i,r){function n(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r["throw"](e))}catch(e){o(e)}}function l(e){e.done?i(e.value):n(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,n,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(i)try{if(r=1,n&&(o=s[0]&2?n["return"]:s[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;if(n=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;n=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(s[0]===6&&i.label<o[1]){i.label=o[1];o=s;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(s);break}if(o[2])i.ops.pop();i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e];n=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var r=0,n=t.length,o;r<n;r++){if(o||!(r in t)){if(!o)o=Array.prototype.slice.call(t,0,r);o[r]=t[r]}}return e.concat(o||Array.prototype.slice.call(t))};import{r as registerInstance,h,H as Host,g as getElement,c as createEvent}from"./index-5d881caf.js";import{c as classnames}from"./index-1d8e8acd.js";import{t as throttle}from"./index-cad8203e.js";var formatTime=function(e){if(!e)return"";var t=Math.round(e%60);var i=Math.round((e-t)/60);return"".concat(i<10?"0".concat(i):i,":").concat(t<10?"0".concat(t):t)};var calcDist=function(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))};var normalizeNumber=function(e){return Math.max(-1,Math.min(e,1))};var scene="default";var screenFn=function(){var e;var t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]];var i=["webkitEnterFullscreen","webkitExitFullscreen","webkitCurrentFullScreenElement","webkitSupportsFullscreen","fullscreenchange","fullscreenerror"];var r=0;var n=t.length;var o={};for(;r<n;r++){e=t[r];if(e&&e[1]in document){for(r=0;r<e.length;r++){o[t[0][r]]=e[r]}return o}}if(!o[t[0][0]]){scene="iOS";for(r=0;r<i.length;r++){o[t[0][r]]=i[r]}}return o}();var isHls=function(e){return/\.(m3u8)($|\?)/i.test(e)};var VideoControl=function(){function e(e){var t=this;registerInstance(this,e);this.visible=false;this.isDraggingProgressBall=false;this.percentage=0;this.progressDimensions={left:0,width:0};this.calcPercentage=function(e){var i=e-t.progressDimensions.left;i=Math.max(i,0);i=Math.min(i,t.progressDimensions.width);return i/t.progressDimensions.width};this.onDragProgressBallStart=function(){t.isDraggingProgressBall=true;t.hideControlsTimer&&clearTimeout(t.hideControlsTimer)};this.onClickProgress=function(e){e.stopPropagation();var i=t.calcPercentage(e.pageX);t.seekFunc(i*t.duration);t.toggleVisibility(true)};this.controls=undefined;this.currentTime=undefined;this.duration=undefined;this.isPlaying=undefined;this.pauseFunc=undefined;this.playFunc=undefined;this.seekFunc=undefined;this.showPlayBtn=undefined;this.showProgress=undefined}e.prototype.onDocumentTouchMove=function(e){if(!this.isDraggingProgressBall)return;var t=e.touches[0].pageX;this.percentage=this.calcPercentage(t);this.setProgressBall(this.percentage);this.setCurrentTime(this.percentage*this.duration)};e.prototype.onDocumentTouchEnd=function(){if(!this.isDraggingProgressBall)return;this.isDraggingProgressBall=false;this.seekFunc(this.percentage*this.duration);this.toggleVisibility(true)};e.prototype.setProgressBall=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.progressBallRef){this.progressBallRef.style.left="".concat(e*100,"%")}return[2]}))}))};e.prototype.toggleVisibility=function(e){return __awaiter(this,void 0,void 0,(function(){var t;var i=this;return __generator(this,(function(r){t=e===undefined?!this.visible:e;if(t){this.hideControlsTimer&&clearTimeout(this.hideControlsTimer);if(this.isPlaying){this.hideControlsTimer=setTimeout((function(){i.toggleVisibility(false)}),2e3)}this.el.style.visibility="visible"}else{this.el.style.visibility="hidden"}this.visible=!!t;return[2]}))}))};e.prototype.getIsDraggingProgressBall=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.isDraggingProgressBall]}))}))};e.prototype.setCurrentTime=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.currentTimeRef.innerHTML=formatTime(e);return[2]}))}))};e.prototype.render=function(){var e=this;var t=this,i=t.controls,r=t.currentTime,n=t.duration,o=t.isPlaying,s=t.pauseFunc,a=t.playFunc,l=t.showPlayBtn,u=t.showProgress;var c=formatTime(n);var d;if(!l){d=null}else if(o){d=h("div",{class:"taro-video-control-button taro-video-control-button-pause",onClick:s})}else{d=h("div",{class:"taro-video-control-button taro-video-control-button-play",onClick:a})}return h(Host,{class:"taro-video-bar taro-video-bar-full"},i&&h("div",{class:"taro-video-controls"},d,u&&h("div",{class:"taro-video-current-time",ref:function(t){return e.currentTimeRef=t}},formatTime(r)),u&&h("div",{class:"taro-video-progress-container",onClick:this.onClickProgress},h("div",{class:"taro-video-progress",ref:function(t){if(!t)return;var i=t.getBoundingClientRect();e.progressDimensions.left=i.left;e.progressDimensions.width=i.width}},h("div",{class:"taro-video-progress-buffered",style:{width:"100%"}}),h("div",{class:"taro-video-ball",ref:function(t){return e.progressBallRef=t},onTouchStart:this.onDragProgressBallStart,style:{left:"".concat(c?this.currentTime/n*100:0,"%")}},h("div",{class:"taro-video-inner"})))),u&&h("div",{class:"taro-video-duration"},c)),h("slot",null))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();var indexCss='.taro-video{display:inline-block;overflow:hidden;position:relative;width:100%;height:225px;line-height:0}.taro-video[hidden]{display:none}.taro-video-container{display:inline-block;position:absolute;left:0;top:0;width:100%;height:100%;background-color:#000;-o-object-position:inherit;object-position:inherit}.taro-video-container.taro-video-type-fullscreen{position:fixed;left:0;right:0;top:0;bottom:0;z-index:999}.taro-video-container.taro-video-type-fullscreen.taro-video-type-rotate-left{-webkit-transform:translate(-50%, -50%) rotate(-90deg);transform:translate(-50%, -50%) rotate(-90deg)}.taro-video-container.taro-video-type-fullscreen.taro-video-type-rotate-right{-webkit-transform:translate(-50%, -50%) rotate(90deg);transform:translate(-50%, -50%) rotate(90deg)}.taro-video-video{width:100%;height:100%;-o-object-position:inherit;object-position:inherit}.taro-video-cover{display:-ms-flexbox;display:flex;position:absolute;left:0;top:0;bottom:0;z-index:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;width:100%;background-color:rgba(1, 1, 1, 0.5);-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-pack:center;-webkit-box-align:center}.taro-video-cover-play-button{width:40px;height:40px;background-repeat:no-repeat;background-position:50% 50%;background-size:50%}.taro-video-cover-duration{margin-top:10px;line-height:1;font-size:16px;color:#fff}.taro-video-bar{display:-ms-flexbox;display:flex;visibility:hidden;overflow:hidden;position:absolute;right:0;bottom:0;z-index:1;-ms-flex-align:center;align-items:center;padding:0 10px;height:44px;background-color:rgba(0, 0, 0, 0.5);-webkit-box-align:center}.taro-video-bar.taro-video-bar-full{left:0}.taro-video-controls{display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;margin:0 8.5px}.taro-video-control-button{-webkit-box-sizing:content-box;box-sizing:content-box;margin-left:-8.5px;padding:14.5px 12.5px;width:13px;height:15px}.taro-video-control-button::after{display:block;width:100%;height:100%;background-repeat:no-repeat;background-position:50% 50%;background-size:100%;content:""}.taro-video-control-button.taro-video-control-button-play::after,.taro-video-cover-play-button{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAeCAYAAAAy2w7YAAAAAXNSR0IArs4c6QAAAWhJREFUSA1j+P///0cgBoHjQGzCQCsAtgJB/AMy5wCxGNXtQ9iBwvoA5BUCMQvVLEQxHpNzDSjkRhXLMM3GKrIeKKpEkYVYjcUu+AMo3ALE3GRZiN1MvKKPgbIRJFuG10j8koeA0gZEW4jfLIKyf4EqpgOxMEELCRpFnIJ3QGU5QMyM00LizCFa1SWgSkeslhFtBGkKVwGVy6FYSJp+klR/A6quB2JOkIWMIK0oNlOf8xBoZDE9LAI7nYn6HsBq4l96WHQEaLUpAyiOaASeAM2NgvuPBpaACt82IEYtfKls0UagecpwXyAzqGTRdaA57sjmYrAptAjUsCkGYlYMg9EFyLQI1IiZB8Ti6Obh5JNh0QmgHlOcBuKSIMGi50C18UDMiMssvOJEWPQLqKYbiHnxGkRIkoBF24DyaoTMIEoeh0W3geI+RBlArCI0iz4D+RVAzEasfqLVAQ19AcSg5LoYiKWI1kiiQgCMBLnEEcfDSgAAAABJRU5ErkJggg==")}.taro-video-control-button.taro-video-control-button-pause::after{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAgCAYAAAAffCjxAAAAAXNSR0IArs4c6QAAAFlJREFUSA3tksEKACAIQ7X//5zq98wOgQayum8QaGweHhMzG/6OujzKAymn+0LMqivu1XznWmX8/echTIyMyAgTwA72iIwwAexgj8gIE8CO3aMRbDPMaEy5BRGaKcZv8YxRAAAAAElFTkSuQmCC")}.taro-video-current-time,.taro-video-duration{margin-top:15px;margin-bottom:14.5px;height:14.5px;line-height:14.5px;font-size:12px;color:#cbcbcb}.taro-video-progress-container{position:relative;-ms-flex-positive:2;flex-grow:2;-webkit-box-flex:2}.taro-video-progress{position:relative;margin:21px 12px;height:2px;background-color:rgba(255, 255, 255, 0.4)}.taro-video-progress-buffered{position:absolute;left:0;top:0;width:0;height:100%;background-color:rgba(255, 255, 255, 0.8);-webkit-transition:width 0.1s;transition:width 0.1s}.taro-video-ball{position:absolute;left:0;top:-21px;-webkit-box-sizing:content-box;box-sizing:content-box;margin-left:-22px;padding:14px;width:16px;height:16px}.taro-video-inner{border-radius:50%;width:100%;height:100%;background-color:#fff}.taro-video-danmu-button{margin:0 8.5px;padding:2px 10px;border:1px solid #fff;border-radius:5px;line-height:1;font-size:13px;color:#fff;white-space:nowrap}.taro-video-danmu-button.taro-video-danmu-button-active{border-color:#48c23d;color:#48c23d}.taro-video-fullscreen,.taro-video-mute{-webkit-box-sizing:content-box;box-sizing:content-box;padding:8.5px;width:17px;height:17px;background-repeat:no-repeat;background-position:50% 50%;background-size:50%}.taro-video-fullscreen{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAhUlEQVRYR+2WSwrAMAhEnZO3PfmULLooGEFTiIXJ2s/kRY2wzQeb85sE9CRA8jSzY1YfAFzhJBnU1AVgxH2dSiArCnD9QgGzRNnOech48SRABHoSyFb5in3PSbhyo6yvCPQkEM3u7BsPe/0FIvBfAh/vhKmVbO9SWun1qk/PSVi9TcVPBG6R1YIhgWwNpQAAAABJRU5ErkJggg==")}.taro-video-fullscreen.taro-video-type-fullscreen{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABPUlEQVRYR+2Xu0pDURBF1/ZLxNcHKNiIlfhA7C0UBSEE8RNEBNFPUEQEEbGxFiSSSrCwEHsf5E/ccsSUuWfUhKQ40947+y42Z8+ZK/pcinzf9hhwD1xJ2q/qsb0JHAOzkl5y+lGAGnCWICQtZgAS6DxQk3TeLYA6cAo0JSXxjmW7CcwBdUkJurKiDhSA4kBvHbA9CqwBQx2O7BSw8ssU3ALPFRF4knT3nQLbr8B4LjLBOdAAFgJaLUkjbYC9n+zm+i4kXWbmwCqwnRMCHiXthuZAQOzPrxSA4kBxYDAcsH0EzATCfCLpJjOINoCtgFZabg7bk7AFDAeaGpKWgitZTu5N0kQbYBmYrujo9mX0CVxL+gidAdu9vY5zXhWA4sAgOND3X7NJ4AHYCaxkB8B62gslvecSFpoDOZH/PP8Cnt7hIaM5xCEAAAAASUVORK5CYII=")}.taro-video-mute{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAGAGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDAgNzkuMTYwNDUxLCAyMDE3LzA1LzA2LTAxOjA4OjIxICAgICAgICAiPiA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ZIuI9cBJ4WKiartJf9nWV/mty7UfUafW7erpqRGI9EBuprffvu9n6C1KOmsqwI5A1AAAAAElFTkSuQmCC")}.taro-video-danmu{overflow:visible;position:absolute;left:0;top:0;bottom:0;margin-top:14px;margin-bottom:44px;width:100%;line-height:14px;font-size:14px}.taro-video-danmu-item{position:absolute;left:100%;line-height:1;color:#fff;white-space:nowrap;-webkit-transform:translateX(0);transform:translateX(0);-webkit-transition-property:left, -webkit-transform;transition-property:left, -webkit-transform;transition-property:left, transform;transition-property:left, transform, -webkit-transform;-webkit-transition-duration:3s;transition-duration:3s;-webkit-transition-timing-function:linear;transition-timing-function:linear}.taro-video-toast{display:block;visibility:hidden;position:absolute;left:50%;top:50%;border-radius:5px;background-color:rgba(255, 255, 255, 0.8);pointer-events:none;color:#000;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.taro-video-toast.taro-video-toast-volume{display:block;width:100px;height:100px}.taro-video-toast-volume .taro-video-toast-title{display:block;margin-top:10px;width:100%;line-height:16px;text-align:center;font-size:12px}.taro-video-toast-volume .taro-video-toast-icon{display:block;margin-left:25%;width:50%;height:50%;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAFhklEQVR4Xu2aeaxfQxTHP1VBES0NIQitWtpaaxeCUkQtaYVa0tiClAq1ExIiQTVppaWxt8RWSa2tWkJQRGgtQaSIpUKEpG0ssbbk28yV2+mZO/e9e3vvu/e98897mZnfzPl+75mZs0wvurn06ub46SGgxwLqZaA3sB/wO/A+8G/V6tS5BU4BJgJbO9DvAMOB36okoQ4CNgAeBEYbQK8Bbm4zAdsBc4EdAyA/APZoKwHHAA8DG2UA/AnYrG0ErAVcD1yXA9gfQJ8c40obsqbPgH7AY8CROTVuFQFD3X7fJid4DWsNAWOAGZ0w58YTsDZwKzChA189PbTRBGwKzAYO6iT4srbAMHfTfAksjulS1iG4JzAH2Dy2YKS/qAVcCdzi1vgZOBZ4PWvNGAG6wgYC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pSBJOYTVJFQcVY3wCFeKUjVGyYfQWB00+5bEVBECrNS+qsOKBpVHNCVWHs+LS7H5PV5pOu9v0+OKEOAXR39w1e1C7wM6AkJ1eLmkRcrpRQiQrqobXO5S3vL3/4kBKMsCknV0k+iasVLUMV3UX5SAPGtED8EOT+L9YENnCasUIXNO2goChFWHqAIRyxXN4qI1BCQg9dJESYq8LnbrCBAR8t50Lig6i0krCRBoVWhVlt45wkBrCRBuRZyPuAguxIPe9lXqhpd9DcZMXOvdkPF0Xu/8dohNUmZ/1QQkuitXr+d4fryuFx3jywQYm6suAqSX8vLTXKJDt4QqO6rtLYspXWZ/nQQkOJTAUJZGIav19q9MvKvN1RUIWKMAY5P3EBBjqO393d4C/gMVHwRQlpx21QAAAABJRU5ErkJggg==");background-repeat:no-repeat;background-position:50% 50%;background-size:50%;fill:#000}.taro-video-toast-volume .taro-video-toast-value{margin-left:10px;margin-top:5px;width:80px;height:5px}.taro-video-toast-volume .taro-video-toast-value>.taro-video-toast-value-content{overflow:hidden}.taro-video-toast-volume-grids{width:80px;height:5px}.taro-video-toast-volume-grids-item{float:left;width:7.1px;height:5px;background-color:#000}.taro-video-toast-volume-grids-item:not(:first-child){margin-left:1px}.taro-video-toast.taro-video-toast-progress{padding:6px;background-color:rgba(0, 0, 0, 0.8);line-height:18px;font-size:14px;color:#fff}';var Video=function(){function e(e){var t=this;registerInstance(this,e);this.onPlay=createEvent(this,"play",7);this.onPause=createEvent(this,"pause",7);this.onEnded=createEvent(this,"ended",7);this.onTimeUpdate=createEvent(this,"timeupdate",7);this.onError=createEvent(this,"error",7);this.onFullScreenChange=createEvent(this,"fullscreenchange",7);this.onProgress=createEvent(this,"progress",7);this.onLoadedMetaData=createEvent(this,"loadedmetadata",7);this.currentTime=0;this.isDraggingProgress=false;this.gestureType="none";this.analyzeGesture=function(e){var i;var r={type:"none"};var n=e.touches[0].screenX;var o=e.touches[0].screenY;var s=n-t.lastTouchScreenX;var a=o-t.lastTouchScreenY;var l=t.isFullScreen?t.vslideGestureInFullscreen:t.vslideGesture;if(t.gestureType==="none"){var u=calcDist(s,a);if(u<10)return r;if(Math.abs(a)>=Math.abs(s)){if(l){t.gestureType="adjustVolume";t.lastVolume=t.videoRef.volume}else{return r}}else if(Math.abs(a)<Math.abs(s)){if(t.enableProgressGesture){t.gestureType="adjustProgress";t.lastPercentage=t.currentTime/((i=t.duration)!==null&&i!==void 0?i:t._duration)}else{return r}}}r.type=t.gestureType;r.dataX=normalizeNumber(s/200);r.dataY=normalizeNumber(a/200);return r};this.loadNativePlayer=function(){var e,i;if(t.videoRef){t.videoRef.src=t.src;(i=(e=t.videoRef).load)===null||i===void 0?void 0:i.call(e)}};this.init=function(){var e=t,i=e.src,r=e.videoRef;if(isHls(i)){import("./hls-221423a1.js").then((function(e){return e.h})).then((function(e){var n=e.default;t.HLS=n;if(n.isSupported()){if(t.hls){t.hls.destroy()}t.hls=new n;t.hls.loadSource(i);t.hls.attachMedia(r);t.hls.on(n.Events.MANIFEST_PARSED,(function(){t.autoplay&&t.play()}));t.hls.on(n.Events.ERROR,(function(e,i){t.handleError(i)}))}else if(r.canPlayType("application/vnd.apple.mpegurl")){t.loadNativePlayer()}else{console.error("该浏览器不支持 HLS 播放")}}))}else{t.loadNativePlayer()}};this.handlePlay=function(){t.isPlaying=true;t.isFirst=false;t.controlsRef.toggleVisibility(true);t.onPlay.emit()};this.handlePause=function(){t.isPlaying=false;t.controlsRef.toggleVisibility(true);t.onPause.emit()};this.handleEnded=function(){t.isFirst=true;t.pause();t.controlsRef.toggleVisibility();t.onEnded.emit()};this.handleTimeUpdate=throttle((function(e){return __awaiter(t,void 0,void 0,(function(){var t,i,r,n;return __generator(this,(function(o){switch(o.label){case 0:this.currentTime=this.videoRef.currentTime;r=this.duration||this._duration;return[4,this.controlsRef.getIsDraggingProgressBall()];case 1:n=o.sent();if(this.controls&&this.showProgress){if(!n&&!this.isDraggingProgress){this.controlsRef.setProgressBall(this.currentTime/r);this.controlsRef.setCurrentTime(this.currentTime)}}this.danmuRef.tick(this.currentTime);this.onTimeUpdate.emit({duration:(t=e.target)===null||t===void 0?void 0:t.duration,currentTime:(i=e.target)===null||i===void 0?void 0:i.currentTime});if(this.duration){if(this.currentTime>=this.duration){this.seek(0);this.handleEnded()}}return[2]}}))}))}),250);this.handleError=function(e){var i,r;if(t.hls){switch(e.type){case t.HLS.ErrorTypes.NETWORK_ERROR:t.onError.emit({errMsg:e.response});t.hls.startLoad();break;case t.HLS.ErrorTypes.MEDIA_ERROR:t.onError.emit({errMsg:e.reason||"媒体错误,请重试"});t.hls.recoverMediaError();break}}else{t.onError.emit({errMsg:(r=(i=e.target)===null||i===void 0?void 0:i.error)===null||r===void 0?void 0:r.message})}};this.handleDurationChange=function(){t._duration=t.videoRef.duration};this.handleProgress=function(){t.onProgress.emit()};this.handleLoadedMetaData=function(e){var i=e.target;t.onLoadedMetaData.emit({width:i.videoWidth,height:i.videoHeight,duration:i.duration})};this._play=function(){return t.videoRef.play()};this._pause=function(){return t.videoRef.pause()};this._stop=function(){t.videoRef.pause();t._seek(0)};this._seek=function(e){t.videoRef.currentTime=e};this.onTouchStartContainer=function(e){t.lastTouchScreenX=e.touches[0].screenX;t.lastTouchScreenY=e.touches[0].screenY};this.onClickContainer=function(){if(t.enablePlayGesture){var e=Date.now();if(e-t.lastClickedTime<300){t.isPlaying?t.pause():t.play()}t.lastClickedTime=e}t.controlsRef.toggleVisibility()};this.onClickFullScreenBtn=function(e){e.stopPropagation();t.toggleFullScreen()};this.handleFullScreenChange=function(e){var i=(new Date).getTime();if(!e.detail&&t.isFullScreen&&!document[screenFn.fullscreenElement]&&i-t.fullScreenTimestamp>100){t.toggleFullScreen(false)}};this.toggleFullScreen=function(e){if(e===void 0){e=!t.isFullScreen}t.isFullScreen=e;t.controlsRef.toggleVisibility(true);t.fullScreenTimestamp=(new Date).getTime();t.onFullScreenChange.emit({fullScreen:t.isFullScreen,direction:"vertical"});if(t.isFullScreen&&!document[screenFn.fullscreenElement]){setTimeout((function(){t.videoRef[screenFn.requestFullscreen]({navigationUI:"auto"})}),0)}};this.toggleMute=function(e){e.stopPropagation();t.videoRef.muted=!t.isMute;t.controlsRef.toggleVisibility(true);t.isMute=!t.isMute};this.toggleDanmu=function(e){e.stopPropagation();t.controlsRef.toggleVisibility(true);t._enableDanmu=!t._enableDanmu};this.src=undefined;this.duration=undefined;this.controls=true;this.autoplay=false;this.loop=false;this.muted=false;this.initialTime=0;this.poster=undefined;this.objectFit="contain";this.showProgress=true;this.showFullscreenBtn=true;this.showPlayBtn=true;this.showCenterPlayBtn=true;this.showMuteBtn=false;this.danmuList=undefined;this.danmuBtn=false;this.enableDanmu=false;this.enablePlayGesture=false;this.enableProgressGesture=true;this.vslideGesture=false;this.vslideGestureInFullscreen=true;this.nativeProps={};this._duration=undefined;this._enableDanmu=false;this.isPlaying=false;this.isFirst=true;this.isFullScreen=false;this.fullScreenTimestamp=(new Date).getTime();this.isMute=false}e.prototype.componentWillLoad=function(){this._enableDanmu=this.enableDanmu};e.prototype.componentDidLoad=function(){var e,t;this.init();if(this.initialTime){this.videoRef.currentTime=this.initialTime}(t=(e=this.danmuRef).sendDanmu)===null||t===void 0?void 0:t.call(e,this.danmuList);if(document.addEventListener){document.addEventListener(screenFn.fullscreenchange,this.handleFullScreenChange)}if(this.videoRef&&scene==="iOS"){this.videoRef.addEventListener("webkitendfullscreen",this.handleFullScreenChange)}};e.prototype.componentDidRender=function(){};e.prototype.disconnectedCallback=function(){if(document.removeEventListener){document.removeEventListener(screenFn.fullscreenchange,this.handleFullScreenChange)}if(this.videoRef&&scene==="iOS"){this.videoRef.removeEventListener("webkitendfullscreen",this.handleFullScreenChange)}};e.prototype.watchEnableDanmu=function(e){this._enableDanmu=e};e.prototype.watchSrc=function(){this.init()};e.prototype.onDocumentTouchMove=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,r;return __generator(this,(function(n){switch(n.label){case 0:if(this.lastTouchScreenX===undefined||this.lastTouchScreenY===undefined)return[2];return[4,this.controlsRef.getIsDraggingProgressBall()];case 1:if(n.sent())return[2];t=this.analyzeGesture(e);if(t.type==="adjustVolume"){this.toastVolumeRef.style.visibility="visible";i=Math.max(Math.min(this.lastVolume-t.dataY,1),0);this.videoRef.volume=i;this.toastVolumeBarRef.style.width="".concat(i*100,"%")}else if(t.type==="adjustProgress"){this.isDraggingProgress=true;this.nextPercentage=Math.max(Math.min(this.lastPercentage+(t.dataX||0),1),0);if(this.controls&&this.showProgress){this.controlsRef.setProgressBall(this.nextPercentage);this.controlsRef.toggleVisibility(true)}r=this.duration||this._duration;this.toastProgressTitleRef.innerHTML="".concat(formatTime(this.nextPercentage*r)," / ").concat(formatTime(r));this.toastProgressRef.style.visibility="visible"}return[2]}}))}))};e.prototype.onDocumentTouchEnd=function(){var e;if(this.gestureType==="adjustVolume"){this.toastVolumeRef.style.visibility="hidden"}else if(this.gestureType==="adjustProgress"){this.toastProgressRef.style.visibility="hidden"}if(this.isDraggingProgress){this.isDraggingProgress=false;this.seek(this.nextPercentage*((e=this.duration)!==null&&e!==void 0?e:this._duration))}this.gestureType="none";this.lastTouchScreenX=undefined;this.lastTouchScreenY=undefined};e.prototype.play=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this._play();return[2]}))}))};e.prototype.pause=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this._pause();return[2]}))}))};e.prototype.stop=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this._stop();return[2]}))}))};e.prototype.seek=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this._seek(e);return[2]}))}))};e.prototype.requestFullScreen=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.toggleFullScreen(true);return[2]}))}))};e.prototype.exitFullScreen=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.toggleFullScreen(false);return[2]}))}))};e.prototype.render=function(){var e=this;var t=this,i=t.controls,r=t.autoplay,n=t.loop,o=t.muted,s=t.poster,a=t.objectFit,l=t.isFirst,u=t.isMute,c=t.isFullScreen,d=t.showCenterPlayBtn,g=t.isPlaying,f=t._enableDanmu,p=t.showMuteBtn,A=t.danmuBtn,v=t.showFullscreenBtn,m=t.nativeProps;var b=this.duration||this._duration;var y=formatTime(b);return h(Host,{class:classnames("taro-video-container",{"taro-video-type-fullscreen":c}),onTouchStart:this.onTouchStartContainer,onClick:this.onClickContainer},h("video",Object.assign({class:"taro-video-video",style:{"object-fit":a},ref:function(t){if(t){e.videoRef=t}},autoplay:r,loop:n,muted:o,poster:i?s:undefined,playsinline:true,"webkit-playsinline":true,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onTimeUpdate:this.handleTimeUpdate,onError:this.handleError,onDurationChange:this.handleDurationChange,onProgress:this.handleProgress,onLoadedMetaData:this.handleLoadedMetaData},m),"暂时不支持播放该视频"),h("taro-video-danmu",{ref:function(t){if(t){e.danmuRef=t}},enable:f}),l&&d&&!g&&h("div",{class:"taro-video-cover"},h("div",{class:"taro-video-cover-play-button",onClick:function(){return e.play()}}),h("p",{class:"taro-video-cover-duration"},y)),h("taro-video-control",{ref:function(t){if(t){e.controlsRef=t}},controls:i,currentTime:this.currentTime,duration:b,isPlaying:this.isPlaying,pauseFunc:this._pause,playFunc:this._play,seekFunc:this._seek,showPlayBtn:this.showPlayBtn,showProgress:this.showProgress},p&&h("div",{class:classnames("taro-video-mute",{"taro-video-type-mute":u}),onClick:this.toggleMute}),A&&h("div",{class:classnames("taro-video-danmu-button",{"taro-video-danmu-button-active":f}),onClick:this.toggleDanmu},"弹幕"),v&&h("div",{class:classnames("taro-video-fullscreen",{"taro-video-type-fullscreen":c}),onClick:this.onClickFullScreenBtn})),h("div",{class:"taro-video-toast taro-video-toast-volume",ref:function(t){if(t){e.toastVolumeRef=t}}},h("div",{class:"taro-video-toast-title"},"音量"),h("div",{class:"taro-video-toast-icon"}),h("div",{class:"taro-video-toast-value"},h("div",{class:"taro-video-toast-value-content",ref:function(t){if(t){e.toastVolumeBarRef=t}}},h("div",{class:"taro-video-toast-volume-grids"},Array(10).fill(1).map((function(){return h("div",{class:"taro-video-toast-volume-grids-item"})})))))),h("div",{class:"taro-video-toast taro-video-toast-progress",ref:function(t){if(t){e.toastProgressRef=t}}},h("div",{class:"taro-video-toast-title",ref:function(t){if(t){e.toastProgressTitleRef=t}}})))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{enableDanmu:["watchEnableDanmu"],src:["watchSrc"]}},enumerable:false,configurable:true});return e}();Video.style=indexCss;var VideoDanmu=function(){function e(e){registerInstance(this,e);this.list=[];this.danmuElList=[];this.currentTime=0;this.enable=false;this.danmuList=[]}e.prototype.ensureProperties=function(e){var t=Object.assign({},e);if(!("time"in e)){t.time=this.currentTime}t.key=Math.random();t.bottom="".concat(Math.random()*90+5,"%");return t};e.prototype.sendDanmu=function(e){if(e===void 0){e=[]}return __awaiter(this,void 0,void 0,(function(){var t;var i=this;return __generator(this,(function(r){if(Array.isArray(e)){this.list=__spreadArray(__spreadArray([],this.list,true),e.map((function(e){return i.ensureProperties(e)})),true)}else{t=e;this.list=__spreadArray(__spreadArray([],this.list,true),[Object.assign({},this.ensureProperties(t))],false)}return[2]}))}))};e.prototype.tick=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,r,n;return __generator(this,(function(o){this.currentTime=e;if(!this.enable)return[2];t=this.list;i=t.filter((function(t){var i=t.time;return e-i<4&&e>i}));r=false;n=this.danmuList;if(i.length!==n.length){r=true}else{r=i.some((function(e){var t=e.key;return n.every((function(e){return t!==e.key}))}))}if(r){this.danmuList=i}return[2]}))}))};e.prototype.componentDidUpdate=function(){var e=this;requestAnimationFrame((function(){setTimeout((function(){var t=e.danmuElList.splice(0);t.forEach((function(e){e.style.left="0";e.style.webkitTransform="translateX(-100%)";e.style.transform="translateX(-100%)"}))}))}))};e.prototype.render=function(){var e=this;if(!this.enable)return"";return h(Host,{class:"taro-video-danmu"},this.danmuList.map((function(t){var i=t.text,r=t.color,n=t.bottom,o=t.key;return h("p",{class:"taro-video-danmu-item",key:o,style:{color:r,bottom:n},ref:function(t){if(t){e.danmuElList.push(t)}}},i)})))};return e}();export{VideoControl as taro_video_control,Video as taro_video_core,VideoDanmu as taro_video_danmu};
1
+ var __awaiter=this&&this.__awaiter||function(e,t,i,r){function n(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r["throw"](e))}catch(e){o(e)}}function l(e){e.done?i(e.value):n(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,n,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(r)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(i=0)),i)try{if(r=1,n&&(o=a[0]&2?n["return"]:a[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;if(n=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;n=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(a[0]===6&&i.label<o[1]){i.label=o[1];o=a;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(a);break}if(o[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];n=0}finally{r=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var r=0,n=t.length,o;r<n;r++){if(o||!(r in t)){if(!o)o=Array.prototype.slice.call(t,0,r);o[r]=t[r]}}return e.concat(o||Array.prototype.slice.call(t))};import{r as registerInstance,h,H as Host,g as getElement,c as createEvent}from"./index-c948674f.js";import{c as classnames}from"./index-1d8e8acd.js";import{t as throttle}from"./index-d1b03e47.js";var formatTime=function(e){if(!e)return"";var t=Math.round(e%60);var i=Math.round((e-t)/60);return"".concat(i<10?"0".concat(i):i,":").concat(t<10?"0".concat(t):t)};var calcDist=function(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))};var normalizeNumber=function(e){return Math.max(-1,Math.min(e,1))};var scene="default";var screenFn=function(){var e;var t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]];var i=["webkitEnterFullscreen","webkitExitFullscreen","webkitCurrentFullScreenElement","webkitSupportsFullscreen","fullscreenchange","fullscreenerror"];var r=0;var n=t.length;var o={};for(;r<n;r++){e=t[r];if(e&&e[1]in document){for(r=0;r<e.length;r++){o[t[0][r]]=e[r]}return o}}if(!o[t[0][0]]){scene="iOS";for(r=0;r<i.length;r++){o[t[0][r]]=i[r]}}return o}();var isHls=function(e){return/\.(m3u8)($|\?)/i.test(e)};var VideoControl=function(){function e(e){var t=this;registerInstance(this,e);this.visible=false;this.isDraggingProgressBall=false;this.percentage=0;this.progressDimensions={left:0,width:0};this.calcPercentage=function(e){var i=e-t.progressDimensions.left;i=Math.max(i,0);i=Math.min(i,t.progressDimensions.width);return i/t.progressDimensions.width};this.onDragProgressBallStart=function(){t.isDraggingProgressBall=true;t.hideControlsTimer&&clearTimeout(t.hideControlsTimer)};this.onClickProgress=function(e){e.stopPropagation();var i=t.calcPercentage(e.pageX);t.seekFunc(i*t.duration);t.toggleVisibility(true)};this.controls=undefined;this.currentTime=undefined;this.duration=undefined;this.isPlaying=undefined;this.pauseFunc=undefined;this.playFunc=undefined;this.seekFunc=undefined;this.showPlayBtn=undefined;this.showProgress=undefined}e.prototype.onDocumentTouchMove=function(e){if(!this.isDraggingProgressBall)return;var t=e.touches[0].pageX;this.percentage=this.calcPercentage(t);this.setProgressBall(this.percentage);this.setCurrentTime(this.percentage*this.duration)};e.prototype.onDocumentTouchEnd=function(){if(!this.isDraggingProgressBall)return;this.isDraggingProgressBall=false;this.seekFunc(this.percentage*this.duration);this.toggleVisibility(true)};e.prototype.setProgressBall=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.progressBallRef){this.progressBallRef.style.left="".concat(e*100,"%")}return[2]}))}))};e.prototype.toggleVisibility=function(e){return __awaiter(this,void 0,void 0,(function(){var t;var i=this;return __generator(this,(function(r){t=e===undefined?!this.visible:e;if(t){this.hideControlsTimer&&clearTimeout(this.hideControlsTimer);if(this.isPlaying){this.hideControlsTimer=setTimeout((function(){i.toggleVisibility(false)}),2e3)}this.el.style.visibility="visible"}else{this.el.style.visibility="hidden"}this.visible=!!t;return[2]}))}))};e.prototype.getIsDraggingProgressBall=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.isDraggingProgressBall]}))}))};e.prototype.setCurrentTime=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.currentTimeRef.innerHTML=formatTime(e);return[2]}))}))};e.prototype.render=function(){var e=this;var t=this,i=t.controls,r=t.currentTime,n=t.duration,o=t.isPlaying,s=t.pauseFunc,a=t.playFunc,l=t.showPlayBtn,u=t.showProgress;var c=formatTime(n);var d;if(!l){d=null}else if(o){d=h("div",{class:"taro-video-control-button taro-video-control-button-pause",onClick:s})}else{d=h("div",{class:"taro-video-control-button taro-video-control-button-play",onClick:a})}return h(Host,{class:"taro-video-bar taro-video-bar-full"},i&&h("div",{class:"taro-video-controls"},d,u&&h("div",{class:"taro-video-current-time",ref:function(t){return e.currentTimeRef=t}},formatTime(r)),u&&h("div",{class:"taro-video-progress-container",onClick:this.onClickProgress},h("div",{class:"taro-video-progress",ref:function(t){if(!t)return;var i=t.getBoundingClientRect();e.progressDimensions.left=i.left;e.progressDimensions.width=i.width}},h("div",{class:"taro-video-progress-buffered",style:{width:"100%"}}),h("div",{class:"taro-video-ball",ref:function(t){return e.progressBallRef=t},onTouchStart:this.onDragProgressBallStart,style:{left:"".concat(c?this.currentTime/n*100:0,"%")}},h("div",{class:"taro-video-inner"})))),u&&h("div",{class:"taro-video-duration"},c)),h("slot",null))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();var indexCss='.taro-video{display:inline-block;overflow:hidden;position:relative;width:100%;height:225px;line-height:0}.taro-video[hidden]{display:none}.taro-video-container{display:inline-block;position:absolute;left:0;top:0;width:100%;height:100%;background-color:#000;-o-object-position:inherit;object-position:inherit}.taro-video-container.taro-video-type-fullscreen{position:fixed;left:0;right:0;top:0;bottom:0;z-index:999}.taro-video-container.taro-video-type-fullscreen.taro-video-type-rotate-left{-webkit-transform:translate(-50%, -50%) rotate(-90deg);transform:translate(-50%, -50%) rotate(-90deg)}.taro-video-container.taro-video-type-fullscreen.taro-video-type-rotate-right{-webkit-transform:translate(-50%, -50%) rotate(90deg);transform:translate(-50%, -50%) rotate(90deg)}.taro-video-video{width:100%;height:100%;-o-object-position:inherit;object-position:inherit}.taro-video-cover{display:-ms-flexbox;display:flex;position:absolute;left:0;top:0;bottom:0;z-index:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;width:100%;background-color:rgba(1, 1, 1, 0.5);-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-pack:center;-webkit-box-align:center}.taro-video-cover-play-button{width:40px;height:40px;background-repeat:no-repeat;background-position:50% 50%;background-size:50%}.taro-video-cover-duration{margin-top:10px;line-height:1;font-size:16px;color:#fff}.taro-video-bar{display:-ms-flexbox;display:flex;visibility:hidden;overflow:hidden;position:absolute;right:0;bottom:0;z-index:1;-ms-flex-align:center;align-items:center;padding:0 10px;height:44px;background-color:rgba(0, 0, 0, 0.5);-webkit-box-align:center}.taro-video-bar.taro-video-bar-full{left:0}.taro-video-controls{display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;margin:0 8.5px}.taro-video-control-button{-webkit-box-sizing:content-box;box-sizing:content-box;margin-left:-8.5px;padding:14.5px 12.5px;width:13px;height:15px}.taro-video-control-button::after{display:block;width:100%;height:100%;background-repeat:no-repeat;background-position:50% 50%;background-size:100%;content:""}.taro-video-control-button.taro-video-control-button-play::after,.taro-video-cover-play-button{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAeCAYAAAAy2w7YAAAAAXNSR0IArs4c6QAAAWhJREFUSA1j+P///0cgBoHjQGzCQCsAtgJB/AMy5wCxGNXtQ9iBwvoA5BUCMQvVLEQxHpNzDSjkRhXLMM3GKrIeKKpEkYVYjcUu+AMo3ALE3GRZiN1MvKKPgbIRJFuG10j8koeA0gZEW4jfLIKyf4EqpgOxMEELCRpFnIJ3QGU5QMyM00LizCFa1SWgSkeslhFtBGkKVwGVy6FYSJp+klR/A6quB2JOkIWMIK0oNlOf8xBoZDE9LAI7nYn6HsBq4l96WHQEaLUpAyiOaASeAM2NgvuPBpaACt82IEYtfKls0UagecpwXyAzqGTRdaA57sjmYrAptAjUsCkGYlYMg9EFyLQI1IiZB8Ti6Obh5JNh0QmgHlOcBuKSIMGi50C18UDMiMssvOJEWPQLqKYbiHnxGkRIkoBF24DyaoTMIEoeh0W3geI+RBlArCI0iz4D+RVAzEasfqLVAQ19AcSg5LoYiKWI1kiiQgCMBLnEEcfDSgAAAABJRU5ErkJggg==")}.taro-video-control-button.taro-video-control-button-pause::after{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAgCAYAAAAffCjxAAAAAXNSR0IArs4c6QAAAFlJREFUSA3tksEKACAIQ7X//5zq98wOgQayum8QaGweHhMzG/6OujzKAymn+0LMqivu1XznWmX8/echTIyMyAgTwA72iIwwAexgj8gIE8CO3aMRbDPMaEy5BRGaKcZv8YxRAAAAAElFTkSuQmCC")}.taro-video-current-time,.taro-video-duration{margin-top:15px;margin-bottom:14.5px;height:14.5px;line-height:14.5px;font-size:12px;color:#cbcbcb}.taro-video-progress-container{position:relative;-ms-flex-positive:2;flex-grow:2;-webkit-box-flex:2}.taro-video-progress{position:relative;margin:21px 12px;height:2px;background-color:rgba(255, 255, 255, 0.4)}.taro-video-progress-buffered{position:absolute;left:0;top:0;width:0;height:100%;background-color:rgba(255, 255, 255, 0.8);-webkit-transition:width 0.1s;transition:width 0.1s}.taro-video-ball{position:absolute;left:0;top:-21px;-webkit-box-sizing:content-box;box-sizing:content-box;margin-left:-22px;padding:14px;width:16px;height:16px}.taro-video-inner{border-radius:50%;width:100%;height:100%;background-color:#fff}.taro-video-danmu-button{margin:0 8.5px;padding:2px 10px;border:1px solid #fff;border-radius:5px;line-height:1;font-size:13px;color:#fff;white-space:nowrap}.taro-video-danmu-button.taro-video-danmu-button-active{border-color:#48c23d;color:#48c23d}.taro-video-fullscreen,.taro-video-mute{-webkit-box-sizing:content-box;box-sizing:content-box;padding:8.5px;width:17px;height:17px;background-repeat:no-repeat;background-position:50% 50%;background-size:50%}.taro-video-fullscreen{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAhUlEQVRYR+2WSwrAMAhEnZO3PfmULLooGEFTiIXJ2s/kRY2wzQeb85sE9CRA8jSzY1YfAFzhJBnU1AVgxH2dSiArCnD9QgGzRNnOech48SRABHoSyFb5in3PSbhyo6yvCPQkEM3u7BsPe/0FIvBfAh/vhKmVbO9SWun1qk/PSVi9TcVPBG6R1YIhgWwNpQAAAABJRU5ErkJggg==")}.taro-video-fullscreen.taro-video-type-fullscreen{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABPUlEQVRYR+2Xu0pDURBF1/ZLxNcHKNiIlfhA7C0UBSEE8RNEBNFPUEQEEbGxFiSSSrCwEHsf5E/ccsSUuWfUhKQ40947+y42Z8+ZK/pcinzf9hhwD1xJ2q/qsb0JHAOzkl5y+lGAGnCWICQtZgAS6DxQk3TeLYA6cAo0JSXxjmW7CcwBdUkJurKiDhSA4kBvHbA9CqwBQx2O7BSw8ssU3ALPFRF4knT3nQLbr8B4LjLBOdAAFgJaLUkjbYC9n+zm+i4kXWbmwCqwnRMCHiXthuZAQOzPrxSA4kBxYDAcsH0EzATCfCLpJjOINoCtgFZabg7bk7AFDAeaGpKWgitZTu5N0kQbYBmYrujo9mX0CVxL+gidAdu9vY5zXhWA4sAgOND3X7NJ4AHYCaxkB8B62gslvecSFpoDOZH/PP8Cnt7hIaM5xCEAAAAASUVORK5CYII=")}.taro-video-mute{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAGAGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDAgNzkuMTYwNDUxLCAyMDE3LzA1LzA2LTAxOjA4OjIxICA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2/BHHCm5puWKiKmgdtAnz+rvaxO5mNygEvHaZ5BfADuARvAaWBpP4DGFBHfgBngFzClTrUKkCDeA+9S837rAEnbqb7VFcCpVJ/oCmCw959aB1AfAROpudYqgDoOLKRmPyLelAF8bcD4pPoMeAtcB34AT4uDBqXXwFG8XXUU/72MIuK1OgE8Bs6l7mEvo8up7lN1Ge0n9aK6VHMFZvJTr9S3CiALaCQhqZOSvegMIAvu2UVSWpigLC1fbQ0gm6in7qpfLCQbhwGIYcyPQ53/G3YO8BtUtd35bvKcVwAAAABJRU5ErkJggg==")}.taro-video-mute.taro-video-type-mute{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAgCAYAAAB3j6rJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGAGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDAgNzkuMTYwNDUxLCAyMDE3LzA1LzA2LTAxOjA4OjIxICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9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atq0GXEzL8+ZIuI9cBJ4WKiartJf9nWV/mty7UfUafW7erpqRGI9EBuprffvu9n6C1KOmsqwI5A1AAAAAElFTkSuQmCC")}.taro-video-danmu{overflow:visible;position:absolute;left:0;top:0;bottom:0;margin-top:14px;margin-bottom:44px;width:100%;line-height:14px;font-size:14px}.taro-video-danmu-item{position:absolute;left:100%;line-height:1;color:#fff;white-space:nowrap;-webkit-transform:translateX(0);transform:translateX(0);-webkit-transition-property:left, -webkit-transform;transition-property:left, -webkit-transform;transition-property:left, transform;transition-property:left, transform, -webkit-transform;-webkit-transition-duration:3s;transition-duration:3s;-webkit-transition-timing-function:linear;transition-timing-function:linear}.taro-video-toast{display:block;visibility:hidden;position:absolute;left:50%;top:50%;border-radius:5px;background-color:rgba(255, 255, 255, 0.8);pointer-events:none;color:#000;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.taro-video-toast.taro-video-toast-volume{display:block;width:100px;height:100px}.taro-video-toast-volume .taro-video-toast-title{display:block;margin-top:10px;width:100%;line-height:16px;text-align:center;font-size:12px}.taro-video-toast-volume .taro-video-toast-icon{display:block;margin-left:25%;width:50%;height:50%;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAFhklEQVR4Xu2aeaxfQxTHP1VBES0NIQitWtpaaxeCUkQtaYVa0tiClAq1ExIiQTVppaWxt8RWSa2tWkJQRGgtQaSIpUKEpG0ssbbk28yV2+mZO/e9e3vvu/e98897mZnfzPl+75mZs0wvurn06ub46SGgxwLqZaA3sB/wO/A+8G/V6tS5BU4BJgJbO9DvAMOB36okoQ4CNgAeBEYbQK8Bbm4zAdsBc4EdAyA/APZoKwHHAA8DG2UA/AnYrG0ErAVcD1yXA9gfQJ8c40obsqbPgH7AY8CROTVuFQFD3X7fJid4DWsNAWOAGZ0w58YTsDZwKzChA189PbTRBGwKzAYO6iT4srbAMHfTfAksjulS1iG4JzAH2Dy2YKS/qAVcCdzi1vgZOBZ4PW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sfqziq8Xp4pSBJOYTVJFQcVY3wCFeKUjVGyYfQWB00+5bEVBECrNS+qsOKBpVHNCVWHs+LS7H5PV5pOu9v0+OKEOAXR39w1e1C7wM6AkJ1eLmkRcrpRQiQrqobXO5S3vL3/4kBKMsCknV0k+iasVLUMV3UX5SAPGtED8EOT+L9YENnCasUIXNO2goChFWHqAIRyxXN4qI1BCQg9dJESYq8LnbrCBAR8t50Lig6i0krCRBoVWhVlt45wkBrCRBuRZyPuAguxIPe9lXqhpd9DcZMXOvdkPF0Xu/8dohNUmZ/1QQkuitXr+d4fryuFx3jywQYm6suAqSX8vLTXKJDt4QqO6rtLYspXWZ/nQQkOJTAUJZGIav19q9MvKvN1RUIWKMAY5P3EBBjqO393d4C/gMVHwRQlpx21QAAAABJRU5ErkJggg==");background-repeat:no-repeat;background-position:50% 50%;background-size:50%;fill:#000}.taro-video-toast-volume .taro-video-toast-value{margin-left:10px;margin-top:5px;width:80px;height:5px}.taro-video-toast-volume .taro-video-toast-value>.taro-video-toast-value-content{overflow:hidden}.taro-video-toast-volume-grids{width:80px;height:5px}.taro-video-toast-volume-grids-item{float:left;width:7.1px;height:5px;background-color:#000}.taro-video-toast-volume-grids-item:not(:first-child){margin-left:1px}.taro-video-toast.taro-video-toast-progress{padding:6px;background-color:rgba(0, 0, 0, 0.8);line-height:18px;font-size:14px;color:#fff}';var Video=function(){function e(e){var t=this;registerInstance(this,e);this.onPlay=createEvent(this,"play",7);this.onPause=createEvent(this,"pause",7);this.onEnded=createEvent(this,"ended",7);this.onTimeUpdate=createEvent(this,"timeupdate",7);this.onError=createEvent(this,"error",7);this.onFullScreenChange=createEvent(this,"fullscreenchange",7);this.onProgress=createEvent(this,"progress",7);this.onLoadedMetaData=createEvent(this,"loadedmetadata",7);this.currentTime=0;this.isDraggingProgress=false;this.gestureType="none";this.analyzeGesture=function(e){var i;var r={type:"none"};var n=e.touches[0].screenX;var o=e.touches[0].screenY;var s=n-t.lastTouchScreenX;var a=o-t.lastTouchScreenY;var l=t.isFullScreen?t.vslideGestureInFullscreen:t.vslideGesture;if(t.gestureType==="none"){var u=calcDist(s,a);if(u<10)return r;if(Math.abs(a)>=Math.abs(s)){if(l){t.gestureType="adjustVolume";t.lastVolume=t.videoRef.volume}else{return r}}else if(Math.abs(a)<Math.abs(s)){if(t.enableProgressGesture){t.gestureType="adjustProgress";t.lastPercentage=t.currentTime/((i=t.duration)!==null&&i!==void 0?i:t._duration)}else{return r}}}r.type=t.gestureType;r.dataX=normalizeNumber(s/200);r.dataY=normalizeNumber(a/200);return r};this.loadNativePlayer=function(){var e,i;if(t.videoRef){t.videoRef.src=t.src;(i=(e=t.videoRef).load)===null||i===void 0?void 0:i.call(e)}};this.init=function(){var e=t,i=e.src,r=e.videoRef;if(isHls(i)){import("./hls-221423a1.js").then((function(e){return e.h})).then((function(e){var n=e.default;t.HLS=n;if(n.isSupported()){if(t.hls){t.hls.destroy()}t.hls=new n;t.hls.loadSource(i);t.hls.attachMedia(r);t.hls.on(n.Events.MANIFEST_PARSED,(function(){t.autoplay&&t.play()}));t.hls.on(n.Events.ERROR,(function(e,i){t.handleError(i)}))}else if(r.canPlayType("application/vnd.apple.mpegurl")){t.loadNativePlayer()}else{console.error("该浏览器不支持 HLS 播放")}}))}else{t.loadNativePlayer()}};this.handlePlay=function(){t.isPlaying=true;t.isFirst=false;t.controlsRef.toggleVisibility(true);t.onPlay.emit()};this.handlePause=function(){t.isPlaying=false;t.controlsRef.toggleVisibility(true);t.onPause.emit()};this.handleEnded=function(){t.isFirst=true;t.pause();t.controlsRef.toggleVisibility();t.onEnded.emit()};this.handleTimeUpdate=throttle((function(e){return __awaiter(t,void 0,void 0,(function(){var t,i,r,n;return __generator(this,(function(o){switch(o.label){case 0:this.currentTime=this.videoRef.currentTime;r=this.duration||this._duration;return[4,this.controlsRef.getIsDraggingProgressBall()];case 1:n=o.sent();if(this.controls&&this.showProgress){if(!n&&!this.isDraggingProgress){this.controlsRef.setProgressBall(this.currentTime/r);this.controlsRef.setCurrentTime(this.currentTime)}}this.danmuRef.tick(this.currentTime);this.onTimeUpdate.emit({duration:(t=e.target)===null||t===void 0?void 0:t.duration,currentTime:(i=e.target)===null||i===void 0?void 0:i.currentTime});if(this.duration){if(this.currentTime>=this.duration){this.seek(0);this.handleEnded()}}return[2]}}))}))}),250);this.handleError=function(e){var i,r;if(t.hls){switch(e.type){case t.HLS.ErrorTypes.NETWORK_ERROR:t.onError.emit({errMsg:e.response});t.hls.startLoad();break;case t.HLS.ErrorTypes.MEDIA_ERROR:t.onError.emit({errMsg:e.reason||"媒体错误,请重试"});t.hls.recoverMediaError();break}}else{t.onError.emit({errMsg:(r=(i=e.target)===null||i===void 0?void 0:i.error)===null||r===void 0?void 0:r.message})}};this.handleDurationChange=function(){t._duration=t.videoRef.duration};this.handleProgress=function(){t.onProgress.emit()};this.handleLoadedMetaData=function(e){var i=e.target;t.onLoadedMetaData.emit({width:i.videoWidth,height:i.videoHeight,duration:i.duration})};this._play=function(){return t.videoRef.play()};this._pause=function(){return t.videoRef.pause()};this._stop=function(){t.videoRef.pause();t._seek(0)};this._seek=function(e){t.videoRef.currentTime=e};this.onTouchStartContainer=function(e){t.lastTouchScreenX=e.touches[0].screenX;t.lastTouchScreenY=e.touches[0].screenY};this.onClickContainer=function(){if(t.enablePlayGesture){var e=Date.now();if(e-t.lastClickedTime<300){t.isPlaying?t.pause():t.play()}t.lastClickedTime=e}t.controlsRef.toggleVisibility()};this.onClickFullScreenBtn=function(e){e.stopPropagation();t.toggleFullScreen()};this.handleFullScreenChange=function(e){var i=(new Date).getTime();if(!e.detail&&t.isFullScreen&&!document[screenFn.fullscreenElement]&&i-t.fullScreenTimestamp>100){t.toggleFullScreen(false)}};this.toggleFullScreen=function(e){if(e===void 0){e=!t.isFullScreen}t.isFullScreen=e;t.controlsRef.toggleVisibility(true);t.fullScreenTimestamp=(new Date).getTime();t.onFullScreenChange.emit({fullScreen:t.isFullScreen,direction:"vertical"});if(t.isFullScreen&&!document[screenFn.fullscreenElement]){setTimeout((function(){t.videoRef[screenFn.requestFullscreen]({navigationUI:"auto"})}),0)}};this.toggleMute=function(e){e.stopPropagation();t.videoRef.muted=!t.isMute;t.controlsRef.toggleVisibility(true);t.isMute=!t.isMute};this.toggleDanmu=function(e){e.stopPropagation();t.controlsRef.toggleVisibility(true);t._enableDanmu=!t._enableDanmu};this.src=undefined;this.duration=undefined;this.controls=true;this.autoplay=false;this.loop=false;this.muted=false;this.initialTime=0;this.poster=undefined;this.objectFit="contain";this.showProgress=true;this.showFullscreenBtn=true;this.showPlayBtn=true;this.showCenterPlayBtn=true;this.showMuteBtn=false;this.danmuList=undefined;this.danmuBtn=false;this.enableDanmu=false;this.enablePlayGesture=false;this.enableProgressGesture=true;this.vslideGesture=false;this.vslideGestureInFullscreen=true;this.nativeProps={};this._duration=undefined;this._enableDanmu=false;this.isPlaying=false;this.isFirst=true;this.isFullScreen=false;this.fullScreenTimestamp=(new Date).getTime();this.isMute=false}e.prototype.componentWillLoad=function(){this._enableDanmu=this.enableDanmu};e.prototype.componentDidLoad=function(){var e,t;this.init();if(this.initialTime){this.videoRef.currentTime=this.initialTime}(t=(e=this.danmuRef).sendDanmu)===null||t===void 0?void 0:t.call(e,this.danmuList);if(document.addEventListener){document.addEventListener(screenFn.fullscreenchange,this.handleFullScreenChange)}if(this.videoRef&&scene==="iOS"){this.videoRef.addEventListener("webkitendfullscreen",this.handleFullScreenChange)}};e.prototype.componentDidRender=function(){};e.prototype.disconnectedCallback=function(){if(document.removeEventListener){document.removeEventListener(screenFn.fullscreenchange,this.handleFullScreenChange)}if(this.videoRef&&scene==="iOS"){this.videoRef.removeEventListener("webkitendfullscreen",this.handleFullScreenChange)}};e.prototype.watchEnableDanmu=function(e){this._enableDanmu=e};e.prototype.watchSrc=function(){this.init()};e.prototype.onDocumentTouchMove=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,r;return __generator(this,(function(n){switch(n.label){case 0:if(this.lastTouchScreenX===undefined||this.lastTouchScreenY===undefined)return[2];return[4,this.controlsRef.getIsDraggingProgressBall()];case 1:if(n.sent())return[2];t=this.analyzeGesture(e);if(t.type==="adjustVolume"){this.toastVolumeRef.style.visibility="visible";i=Math.max(Math.min(this.lastVolume-t.dataY,1),0);this.videoRef.volume=i;this.toastVolumeBarRef.style.width="".concat(i*100,"%")}else if(t.type==="adjustProgress"){this.isDraggingProgress=true;this.nextPercentage=Math.max(Math.min(this.lastPercentage+(t.dataX||0),1),0);if(this.controls&&this.showProgress){this.controlsRef.setProgressBall(this.nextPercentage);this.controlsRef.toggleVisibility(true)}r=this.duration||this._duration;this.toastProgressTitleRef.innerHTML="".concat(formatTime(this.nextPercentage*r)," / ").concat(formatTime(r));this.toastProgressRef.style.visibility="visible"}return[2]}}))}))};e.prototype.onDocumentTouchEnd=function(){var e;if(this.gestureType==="adjustVolume"){this.toastVolumeRef.style.visibility="hidden"}else if(this.gestureType==="adjustProgress"){this.toastProgressRef.style.visibility="hidden"}if(this.isDraggingProgress){this.isDraggingProgress=false;this.seek(this.nextPercentage*((e=this.duration)!==null&&e!==void 0?e:this._duration))}this.gestureType="none";this.lastTouchScreenX=undefined;this.lastTouchScreenY=undefined};e.prototype.getHlsObject=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.hls]}))}))};e.prototype.play=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this._play();return[2]}))}))};e.prototype.pause=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this._pause();return[2]}))}))};e.prototype.stop=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this._stop();return[2]}))}))};e.prototype.seek=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this._seek(e);return[2]}))}))};e.prototype.requestFullScreen=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.toggleFullScreen(true);return[2]}))}))};e.prototype.exitFullScreen=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.toggleFullScreen(false);return[2]}))}))};e.prototype.render=function(){var e=this;var t=this,i=t.controls,r=t.autoplay,n=t.loop,o=t.muted,s=t.poster,a=t.objectFit,l=t.isFirst,u=t.isMute,c=t.isFullScreen,d=t.showCenterPlayBtn,g=t.isPlaying,f=t._enableDanmu,p=t.showMuteBtn,A=t.danmuBtn,v=t.showFullscreenBtn,m=t.nativeProps;var b=this.duration||this._duration;var y=formatTime(b);return h(Host,{class:classnames("taro-video-container",{"taro-video-type-fullscreen":c}),onTouchStart:this.onTouchStartContainer,onClick:this.onClickContainer},h("video",Object.assign({class:"taro-video-video",style:{"object-fit":a},ref:function(t){if(t){e.videoRef=t}},autoplay:r,loop:n,muted:o,poster:i?s:undefined,playsinline:true,"webkit-playsinline":true,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onTimeUpdate:this.handleTimeUpdate,onError:this.handleError,onDurationChange:this.handleDurationChange,onProgress:this.handleProgress,onLoadedMetaData:this.handleLoadedMetaData},m),"暂时不支持播放该视频"),h("taro-video-danmu",{ref:function(t){if(t){e.danmuRef=t}},enable:f}),l&&d&&!g&&h("div",{class:"taro-video-cover"},h("div",{class:"taro-video-cover-play-button",onClick:function(){return e.play()}}),h("p",{class:"taro-video-cover-duration"},y)),h("taro-video-control",{ref:function(t){if(t){e.controlsRef=t}},controls:i,currentTime:this.currentTime,duration:b,isPlaying:this.isPlaying,pauseFunc:this._pause,playFunc:this._play,seekFunc:this._seek,showPlayBtn:this.showPlayBtn,showProgress:this.showProgress},p&&h("div",{class:classnames("taro-video-mute",{"taro-video-type-mute":u}),onClick:this.toggleMute}),A&&h("div",{class:classnames("taro-video-danmu-button",{"taro-video-danmu-button-active":f}),onClick:this.toggleDanmu},"弹幕"),v&&h("div",{class:classnames("taro-video-fullscreen",{"taro-video-type-fullscreen":c}),onClick:this.onClickFullScreenBtn})),h("div",{class:"taro-video-toast taro-video-toast-volume",ref:function(t){if(t){e.toastVolumeRef=t}}},h("div",{class:"taro-video-toast-title"},"音量"),h("div",{class:"taro-video-toast-icon"}),h("div",{class:"taro-video-toast-value"},h("div",{class:"taro-video-toast-value-content",ref:function(t){if(t){e.toastVolumeBarRef=t}}},h("div",{class:"taro-video-toast-volume-grids"},Array(10).fill(1).map((function(){return h("div",{class:"taro-video-toast-volume-grids-item"})})))))),h("div",{class:"taro-video-toast taro-video-toast-progress",ref:function(t){if(t){e.toastProgressRef=t}}},h("div",{class:"taro-video-toast-title",ref:function(t){if(t){e.toastProgressTitleRef=t}}})))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{enableDanmu:["watchEnableDanmu"],src:["watchSrc"]}},enumerable:false,configurable:true});return e}();Video.style=indexCss;var VideoDanmu=function(){function e(e){registerInstance(this,e);this.list=[];this.danmuElList=[];this.currentTime=0;this.enable=false;this.danmuList=[]}e.prototype.ensureProperties=function(e){var t=Object.assign({},e);if(!("time"in e)){t.time=this.currentTime}t.key=Math.random();t.bottom="".concat(Math.random()*90+5,"%");return t};e.prototype.sendDanmu=function(e){if(e===void 0){e=[]}return __awaiter(this,void 0,void 0,(function(){var t;var i=this;return __generator(this,(function(r){if(Array.isArray(e)){this.list=__spreadArray(__spreadArray([],this.list,true),e.map((function(e){return i.ensureProperties(e)})),true)}else{t=e;this.list=__spreadArray(__spreadArray([],this.list,true),[Object.assign({},this.ensureProperties(t))],false)}return[2]}))}))};e.prototype.tick=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,r,n;return __generator(this,(function(o){this.currentTime=e;if(!this.enable)return[2];t=this.list;i=t.filter((function(t){var i=t.time;return e-i<4&&e>i}));r=false;n=this.danmuList;if(i.length!==n.length){r=true}else{r=i.some((function(e){var t=e.key;return n.every((function(e){return t!==e.key}))}))}if(r){this.danmuList=i}return[2]}))}))};e.prototype.componentDidUpdate=function(){var e=this;requestAnimationFrame((function(){setTimeout((function(){var t=e.danmuElList.splice(0);t.forEach((function(e){e.style.left="0";e.style.webkitTransform="translateX(-100%)";e.style.transform="translateX(-100%)"}))}))}))};e.prototype.render=function(){var e=this;if(!this.enable)return"";return h(Host,{class:"taro-video-danmu"},this.danmuList.map((function(t){var i=t.text,r=t.color,n=t.bottom,o=t.key;return h("p",{class:"taro-video-danmu-item",key:o,style:{color:r,bottom:n},ref:function(t){if(t){e.danmuElList.push(t)}}},i)})))};return e}();export{VideoControl as taro_video_control,Video as taro_video_core,VideoDanmu as taro_video_danmu};
2
2
  //# sourceMappingURL=taro-video-control_3.entry.js.map