@tarojs/components 3.5.7 → 3.6.0-canary.1
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.
- package/README.md +1 -1
- package/dist/cjs/helper-db78e01a.js +2 -0
- package/dist/cjs/helper-db78e01a.js.map +1 -0
- package/dist/cjs/hls-67cbc62d.js +27624 -0
- package/dist/cjs/hls-67cbc62d.js.map +1 -0
- package/dist/cjs/index-47a1959e.js +2 -0
- package/dist/cjs/index-47a1959e.js.map +1 -0
- package/dist/cjs/{index-7c61bee9.js → index-9174e0b1.js} +477 -234
- package/dist/cjs/index-9174e0b1.js.map +1 -0
- package/dist/cjs/index-f9d21cc5.js +2 -0
- package/dist/cjs/index-f9d21cc5.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/intersection-observer-dc4cfcef.js +2 -0
- package/dist/cjs/intersection-observer-dc4cfcef.js.map +1 -0
- package/dist/cjs/loader.cjs.js +5 -3
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/taro-ad-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-ad-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-ad-custom-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-ad-custom-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-audio-core.cjs.entry.js +5 -2
- package/dist/cjs/taro-audio-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-block-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-block-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-button-core.cjs.entry.js +7 -2
- package/dist/cjs/taro-button-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-camera-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-camera-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-canvas-core.cjs.entry.js +6 -3
- package/dist/cjs/taro-canvas-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-checkbox-core_2.cjs.entry.js +15 -9
- package/dist/cjs/taro-checkbox-core_2.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-components.cjs.js +5 -3
- package/dist/cjs/taro-components.cjs.js.map +1 -0
- package/dist/cjs/taro-cover-image-core.cjs.entry.js +7 -4
- package/dist/cjs/taro-cover-image-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-cover-view-core.cjs.entry.js +7 -3
- package/dist/cjs/taro-cover-view-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-custom-wrapper-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-custom-wrapper-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-editor-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-editor-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-form-core.cjs.entry.js +34 -39
- package/dist/cjs/taro-form-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-functional-page-navigator-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-functional-page-navigator-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-icon-core.cjs.entry.js +6 -2
- package/dist/cjs/taro-icon-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-image-core.cjs.entry.js +7 -4
- package/dist/cjs/taro-image-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-input-core.cjs.entry.js +29 -14
- package/dist/cjs/taro-input-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-keyboard-accessory-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-keyboard-accessory-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-label-core.cjs.entry.js +5 -2
- package/dist/cjs/taro-label-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-live-player-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-live-player-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-live-pusher-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-live-pusher-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-map-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-map-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-match-media-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-match-media-core.cjs.entry.js.map +1 -0
- package/dist/cjs/{taro-movable-view-core.cjs.entry.js → taro-movable-area-core_2.cjs.entry.js} +187 -97
- package/dist/cjs/taro-movable-area-core_2.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-navigation-bar-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-navigation-bar-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-navigator-core.cjs.entry.js +6 -2
- package/dist/cjs/taro-navigator-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-official-account-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-official-account-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-open-data-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-open-data-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-page-container-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-page-container-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-page-meta-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-page-meta-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-picker-core_2.cjs.entry.js +31 -15
- package/dist/cjs/taro-picker-core_2.cjs.entry.js.map +1 -0
- package/dist/cjs/{taro-picker-view-core.cjs.entry.js → taro-picker-view-column-core_2.cjs.entry.js} +101 -6
- package/dist/cjs/taro-picker-view-column-core_2.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-progress-core.cjs.entry.js +7 -5
- package/dist/cjs/taro-progress-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-pull-to-refresh.cjs.entry.js +10 -8
- package/dist/cjs/taro-pull-to-refresh.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-radio-core_2.cjs.entry.js +15 -9
- package/dist/cjs/taro-radio-core_2.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-rich-text-core.cjs.entry.js +5 -2
- package/dist/cjs/taro-rich-text-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-root-portal-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-root-portal-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-scroll-view-core.cjs.entry.js +28 -22
- package/dist/cjs/taro-scroll-view-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-share-element-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-share-element-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-slider-core.cjs.entry.js +37 -40
- package/dist/cjs/taro-slider-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-slot-core.cjs.entry.js +4 -7
- package/dist/cjs/taro-slot-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js +46 -72
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-switch-core.cjs.entry.js +12 -8
- package/dist/cjs/taro-switch-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-tabbar.cjs.entry.js +12 -4
- package/dist/cjs/taro-tabbar.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-text-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-text-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-textarea-core.cjs.entry.js +21 -10
- package/dist/cjs/taro-textarea-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-video-control_3.cjs.entry.js +218 -27943
- package/dist/cjs/taro-video-control_3.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-view-core.cjs.entry.js +7 -3
- package/dist/cjs/taro-view-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-voip-room-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-voip-room-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-web-view-core.cjs.entry.js +5 -2
- package/dist/cjs/taro-web-view-core.cjs.entry.js.map +1 -0
- package/dist/collection/collection-manifest.json +16 -4
- package/dist/collection/components/ad/ad.js +2 -1
- package/dist/collection/components/ad/ad.js.map +1 -0
- package/dist/collection/components/ad-custom/ad-custom.js +2 -1
- package/dist/collection/components/ad-custom/ad-custom.js.map +1 -0
- package/dist/collection/components/audio/audio.js +199 -190
- package/dist/collection/components/audio/audio.js.map +1 -0
- package/dist/collection/components/block/block.js +2 -2
- package/dist/collection/components/block/block.js.map +1 -0
- package/dist/collection/components/button/button.js +224 -211
- package/dist/collection/components/button/button.js.map +1 -0
- package/dist/collection/components/camera/camera.js +2 -1
- package/dist/collection/components/camera/camera.js.map +1 -0
- package/dist/collection/components/canvas/canvas.js +67 -58
- package/dist/collection/components/canvas/canvas.js.map +1 -0
- package/dist/collection/components/checkbox/checkbox-group.js +50 -42
- package/dist/collection/components/checkbox/checkbox-group.js.map +1 -0
- package/dist/collection/components/checkbox/checkbox.js +175 -162
- package/dist/collection/components/checkbox/checkbox.js.map +1 -0
- package/dist/collection/components/cover-image/cover-image.js +83 -74
- package/dist/collection/components/cover-image/cover-image.js.map +1 -0
- package/dist/collection/components/cover-view/cover-view.js +131 -118
- package/dist/collection/components/cover-view/cover-view.js.map +1 -0
- package/dist/collection/components/custom-wrapper/custom-wrapper.js +2 -2
- package/dist/collection/components/custom-wrapper/custom-wrapper.js.map +1 -0
- package/dist/collection/components/editor/editor.js +2 -1
- package/dist/collection/components/editor/editor.js.map +1 -0
- package/dist/collection/components/form/form.js +66 -74
- package/dist/collection/components/form/form.js.map +1 -0
- package/dist/collection/components/functional-page-navigator/functional-page-navigator.js +2 -1
- package/dist/collection/components/functional-page-navigator/functional-page-navigator.js.map +1 -0
- package/dist/collection/components/icon/icon.js +61 -56
- package/dist/collection/components/icon/icon.js.map +1 -0
- package/dist/collection/components/image/image.js +125 -113
- package/dist/collection/components/image/image.js.map +1 -0
- package/dist/collection/components/input/input.js +336 -296
- package/dist/collection/components/input/input.js.map +1 -0
- package/dist/collection/components/keyboard-accessory/keyboard-accessory.js +2 -1
- package/dist/collection/components/keyboard-accessory/keyboard-accessory.js.map +1 -0
- package/dist/collection/components/label/label.js +27 -22
- package/dist/collection/components/label/label.js.map +1 -0
- package/dist/collection/components/live-player/live-player.js +2 -1
- package/dist/collection/components/live-player/live-player.js.map +1 -0
- package/dist/collection/components/live-pusher/live-pusher.js +2 -1
- package/dist/collection/components/live-pusher/live-pusher.js.map +1 -0
- package/dist/collection/components/map/map.js +2 -1
- package/dist/collection/components/map/map.js.map +1 -0
- package/dist/collection/components/match-media/match-media.js +2 -1
- package/dist/collection/components/match-media/match-media.js.map +1 -0
- package/dist/collection/components/movable-area/area.css +2 -2
- package/dist/collection/components/movable-area/movable-area.js +34 -26
- package/dist/collection/components/movable-area/movable-area.js.map +1 -0
- package/dist/collection/components/movable-area/movable-view.js +415 -457
- package/dist/collection/components/movable-area/movable-view.js.map +1 -0
- package/dist/collection/components/navigation-bar/navigation-bar.js +2 -1
- package/dist/collection/components/navigation-bar/navigation-bar.js.map +1 -0
- package/dist/collection/components/navigator/navigator.js +158 -145
- package/dist/collection/components/navigator/navigator.js.map +1 -0
- package/dist/collection/components/official-account/official-account.js +2 -1
- package/dist/collection/components/official-account/official-account.js.map +1 -0
- package/dist/collection/components/open-data/open-data.js +2 -1
- package/dist/collection/components/open-data/open-data.js.map +1 -0
- package/dist/collection/components/page-container/page-container.js +2 -1
- package/dist/collection/components/page-container/page-container.js.map +1 -0
- package/dist/collection/components/page-meta/page-meta.js +2 -1
- package/dist/collection/components/page-meta/page-meta.js.map +1 -0
- package/dist/collection/components/picker/constant.js +1 -0
- package/dist/collection/components/picker/constant.js.map +1 -0
- package/dist/collection/components/picker/picker-group.js +240 -176
- package/dist/collection/components/picker/picker-group.js.map +1 -0
- package/dist/collection/components/picker/picker.js +261 -257
- package/dist/collection/components/picker/picker.js.map +1 -0
- package/dist/collection/components/picker/utils.js +1 -0
- package/dist/collection/components/picker/utils.js.map +1 -0
- package/dist/collection/components/picker-view/picker-view-column.js +158 -147
- package/dist/collection/components/picker-view/picker-view-column.js.map +1 -0
- package/dist/collection/components/picker-view/picker-view.js +171 -159
- package/dist/collection/components/picker-view/picker-view.js.map +1 -0
- package/dist/collection/components/progress/progress.js +153 -157
- package/dist/collection/components/progress/progress.js.map +1 -0
- package/dist/collection/components/pull-to-refresh/pull-to-refresh.js +121 -114
- package/dist/collection/components/pull-to-refresh/pull-to-refresh.js.map +1 -0
- package/dist/collection/components/radio/radio-group.js +50 -43
- package/dist/collection/components/radio/radio-group.js.map +1 -0
- package/dist/collection/components/radio/radio.js +152 -144
- package/dist/collection/components/radio/radio.js.map +1 -0
- package/dist/collection/components/rich-text/rich-text.js +27 -23
- package/dist/collection/components/rich-text/rich-text.js.map +1 -0
- package/dist/collection/components/root-portal/root-portal.js +2 -1
- package/dist/collection/components/root-portal/root-portal.js.map +1 -0
- package/dist/collection/components/scroll-view/scroll-view.js +242 -220
- package/dist/collection/components/scroll-view/scroll-view.js.map +1 -0
- package/dist/collection/components/share-element/share-element.js +2 -1
- package/dist/collection/components/share-element/share-element.js.map +1 -0
- package/dist/collection/components/slider/slider.js +279 -283
- package/dist/collection/components/slider/slider.js.map +1 -0
- package/dist/collection/components/slot/slot.js +2 -5
- package/dist/collection/components/slot/slot.js.map +1 -0
- package/dist/collection/components/swiper/swiper-item.js +26 -21
- package/dist/collection/components/swiper/swiper-item.js.map +1 -0
- package/dist/collection/components/swiper/swiper.js +346 -368
- package/dist/collection/components/swiper/swiper.js.map +1 -0
- package/dist/collection/components/switch/switch.js +153 -139
- package/dist/collection/components/switch/switch.js.map +1 -0
- package/dist/collection/components/tabbar/tabbar-item.js +2 -6
- package/dist/collection/components/tabbar/tabbar-item.js.map +1 -0
- package/dist/collection/components/tabbar/tabbar.js +86 -70
- package/dist/collection/components/tabbar/tabbar.js.map +1 -0
- package/dist/collection/components/text/text.js +35 -30
- package/dist/collection/components/text/text.js.map +1 -0
- package/dist/collection/components/textarea/textarea.js +262 -227
- package/dist/collection/components/textarea/textarea.js.map +1 -0
- package/dist/collection/components/video/utils.js +1 -0
- package/dist/collection/components/video/utils.js.map +1 -0
- package/dist/collection/components/video/video-control.js +274 -286
- package/dist/collection/components/video/video-control.js.map +1 -0
- package/dist/collection/components/video/video-danmu.js +111 -118
- package/dist/collection/components/video/video-danmu.js.map +1 -0
- package/dist/collection/components/video/video.js +769 -834
- package/dist/collection/components/video/video.js.map +1 -0
- package/dist/collection/components/view/view.js +131 -118
- package/dist/collection/components/view/view.js.map +1 -0
- package/dist/collection/components/voip-room/voip-room.js +2 -1
- package/dist/collection/components/voip-room/voip-room.js.map +1 -0
- package/dist/collection/components/web-view/web-view.js +68 -57
- package/dist/collection/components/web-view/web-view.js.map +1 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/utils/helper.js +1 -0
- package/dist/collection/utils/helper.js.map +1 -0
- package/dist/collection/utils/index.js +1 -0
- package/dist/collection/utils/index.js.map +1 -0
- package/dist/collection/utils/style.js +1 -0
- package/dist/collection/utils/style.js.map +1 -0
- package/dist/collection/utils/url.js +1 -0
- package/dist/collection/utils/url.js.map +1 -0
- package/dist/esm/helper-3d0ecf0f.js +2 -0
- package/dist/esm/helper-3d0ecf0f.js.map +1 -0
- package/dist/esm/hls-221423a1.js +27622 -0
- package/dist/esm/hls-221423a1.js.map +1 -0
- package/dist/esm/index-1d8e8acd.js +2 -0
- package/dist/esm/index-1d8e8acd.js.map +1 -0
- package/dist/esm/{index-8809c729.js → index-5d881caf.js} +477 -234
- package/dist/esm/index-5d881caf.js.map +1 -0
- package/dist/esm/index-cad8203e.js +2 -0
- package/dist/esm/index-cad8203e.js.map +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/intersection-observer-8e4c7135.js +2 -0
- package/dist/esm/intersection-observer-8e4c7135.js.map +1 -0
- package/dist/esm/loader.js +5 -3
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/taro-ad-core.entry.js +4 -2
- package/dist/esm/taro-ad-core.entry.js.map +1 -0
- package/dist/esm/taro-ad-custom-core.entry.js +4 -2
- package/dist/esm/taro-ad-custom-core.entry.js.map +1 -0
- package/dist/esm/taro-audio-core.entry.js +5 -2
- package/dist/esm/taro-audio-core.entry.js.map +1 -0
- package/dist/esm/taro-block-core.entry.js +4 -2
- package/dist/esm/taro-block-core.entry.js.map +1 -0
- package/dist/esm/taro-button-core.entry.js +7 -2
- package/dist/esm/taro-button-core.entry.js.map +1 -0
- package/dist/esm/taro-camera-core.entry.js +4 -2
- package/dist/esm/taro-camera-core.entry.js.map +1 -0
- package/dist/esm/taro-canvas-core.entry.js +6 -3
- package/dist/esm/taro-canvas-core.entry.js.map +1 -0
- package/dist/esm/taro-checkbox-core_2.entry.js +15 -9
- package/dist/esm/taro-checkbox-core_2.entry.js.map +1 -0
- package/dist/esm/taro-components.js +5 -3
- package/dist/esm/taro-components.js.map +1 -0
- package/dist/esm/taro-cover-image-core.entry.js +7 -4
- package/dist/esm/taro-cover-image-core.entry.js.map +1 -0
- package/dist/esm/taro-cover-view-core.entry.js +7 -3
- package/dist/esm/taro-cover-view-core.entry.js.map +1 -0
- package/dist/esm/taro-custom-wrapper-core.entry.js +4 -2
- package/dist/esm/taro-custom-wrapper-core.entry.js.map +1 -0
- package/dist/esm/taro-editor-core.entry.js +4 -2
- package/dist/esm/taro-editor-core.entry.js.map +1 -0
- package/dist/esm/taro-form-core.entry.js +34 -39
- package/dist/esm/taro-form-core.entry.js.map +1 -0
- package/dist/esm/taro-functional-page-navigator-core.entry.js +4 -2
- package/dist/esm/taro-functional-page-navigator-core.entry.js.map +1 -0
- package/dist/esm/taro-icon-core.entry.js +6 -2
- package/dist/esm/taro-icon-core.entry.js.map +1 -0
- package/dist/esm/taro-image-core.entry.js +7 -4
- package/dist/esm/taro-image-core.entry.js.map +1 -0
- package/dist/esm/taro-input-core.entry.js +29 -14
- package/dist/esm/taro-input-core.entry.js.map +1 -0
- package/dist/esm/taro-keyboard-accessory-core.entry.js +4 -2
- package/dist/esm/taro-keyboard-accessory-core.entry.js.map +1 -0
- package/dist/esm/taro-label-core.entry.js +5 -2
- package/dist/esm/taro-label-core.entry.js.map +1 -0
- package/dist/esm/taro-live-player-core.entry.js +4 -2
- package/dist/esm/taro-live-player-core.entry.js.map +1 -0
- package/dist/esm/taro-live-pusher-core.entry.js +4 -2
- package/dist/esm/taro-live-pusher-core.entry.js.map +1 -0
- package/dist/esm/taro-map-core.entry.js +4 -2
- package/dist/esm/taro-map-core.entry.js.map +1 -0
- package/dist/esm/taro-match-media-core.entry.js +4 -2
- package/dist/esm/taro-match-media-core.entry.js.map +1 -0
- package/dist/esm/{taro-movable-view-core.entry.js → taro-movable-area-core_2.entry.js} +187 -98
- package/dist/esm/taro-movable-area-core_2.entry.js.map +1 -0
- package/dist/esm/taro-navigation-bar-core.entry.js +4 -2
- package/dist/esm/taro-navigation-bar-core.entry.js.map +1 -0
- package/dist/esm/taro-navigator-core.entry.js +6 -2
- package/dist/esm/taro-navigator-core.entry.js.map +1 -0
- package/dist/esm/taro-official-account-core.entry.js +4 -2
- package/dist/esm/taro-official-account-core.entry.js.map +1 -0
- package/dist/esm/taro-open-data-core.entry.js +4 -2
- package/dist/esm/taro-open-data-core.entry.js.map +1 -0
- package/dist/esm/taro-page-container-core.entry.js +4 -2
- package/dist/esm/taro-page-container-core.entry.js.map +1 -0
- package/dist/esm/taro-page-meta-core.entry.js +4 -2
- package/dist/esm/taro-page-meta-core.entry.js.map +1 -0
- package/dist/esm/taro-picker-core_2.entry.js +31 -15
- package/dist/esm/taro-picker-core_2.entry.js.map +1 -0
- package/dist/esm/{taro-picker-view-core.entry.js → taro-picker-view-column-core_2.entry.js} +97 -3
- package/dist/esm/taro-picker-view-column-core_2.entry.js.map +1 -0
- package/dist/esm/taro-progress-core.entry.js +7 -5
- package/dist/esm/taro-progress-core.entry.js.map +1 -0
- package/dist/esm/taro-pull-to-refresh.entry.js +10 -8
- package/dist/esm/taro-pull-to-refresh.entry.js.map +1 -0
- package/dist/esm/taro-radio-core_2.entry.js +15 -9
- package/dist/esm/taro-radio-core_2.entry.js.map +1 -0
- package/dist/esm/taro-rich-text-core.entry.js +5 -2
- package/dist/esm/taro-rich-text-core.entry.js.map +1 -0
- package/dist/esm/taro-root-portal-core.entry.js +4 -2
- package/dist/esm/taro-root-portal-core.entry.js.map +1 -0
- package/dist/esm/taro-scroll-view-core.entry.js +28 -22
- package/dist/esm/taro-scroll-view-core.entry.js.map +1 -0
- package/dist/esm/taro-share-element-core.entry.js +4 -2
- package/dist/esm/taro-share-element-core.entry.js.map +1 -0
- package/dist/esm/taro-slider-core.entry.js +37 -40
- package/dist/esm/taro-slider-core.entry.js.map +1 -0
- package/dist/esm/taro-slot-core.entry.js +4 -7
- package/dist/esm/taro-slot-core.entry.js.map +1 -0
- package/dist/esm/taro-swiper-core_2.entry.js +46 -72
- package/dist/esm/taro-swiper-core_2.entry.js.map +1 -0
- package/dist/esm/taro-switch-core.entry.js +12 -8
- package/dist/esm/taro-switch-core.entry.js.map +1 -0
- package/dist/esm/taro-tabbar.entry.js +12 -4
- package/dist/esm/taro-tabbar.entry.js.map +1 -0
- package/dist/esm/taro-text-core.entry.js +4 -2
- package/dist/esm/taro-text-core.entry.js.map +1 -0
- package/dist/esm/taro-textarea-core.entry.js +21 -10
- package/dist/esm/taro-textarea-core.entry.js.map +1 -0
- package/dist/esm/taro-video-control_3.entry.js +213 -27938
- package/dist/esm/taro-video-control_3.entry.js.map +1 -0
- package/dist/esm/taro-view-core.entry.js +7 -3
- package/dist/esm/taro-view-core.entry.js.map +1 -0
- package/dist/esm/taro-voip-room-core.entry.js +4 -2
- package/dist/esm/taro-voip-room-core.entry.js.map +1 -0
- package/dist/esm/taro-web-view-core.entry.js +5 -2
- package/dist/esm/taro-web-view-core.entry.js.map +1 -0
- package/dist/esm-es5/helper-3d0ecf0f.js +2 -1
- package/dist/esm-es5/helper-3d0ecf0f.js.map +1 -0
- package/dist/esm-es5/hls-221423a1.js +366 -0
- package/dist/esm-es5/hls-221423a1.js.map +1 -0
- package/dist/esm-es5/index-1d8e8acd.js +2 -1
- package/dist/esm-es5/index-1d8e8acd.js.map +1 -0
- package/dist/esm-es5/index-5d881caf.js +3 -0
- package/dist/esm-es5/index-5d881caf.js.map +1 -0
- package/dist/esm-es5/index-cad8203e.js +2 -1
- package/dist/esm-es5/index-cad8203e.js.map +1 -0
- package/dist/esm-es5/index.js +2 -0
- package/dist/esm-es5/index.js.map +1 -0
- package/dist/esm-es5/intersection-observer-8e4c7135.js +2 -1
- package/dist/esm-es5/intersection-observer-8e4c7135.js.map +1 -0
- package/dist/esm-es5/loader.js +2 -1
- package/dist/esm-es5/loader.js.map +1 -0
- package/dist/esm-es5/taro-ad-core.entry.js +2 -1
- package/dist/esm-es5/taro-ad-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-ad-custom-core.entry.js +2 -1
- package/dist/esm-es5/taro-ad-custom-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-audio-core.entry.js +2 -1
- package/dist/esm-es5/taro-audio-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-block-core.entry.js +2 -1
- package/dist/esm-es5/taro-block-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-button-core.entry.js +2 -1
- package/dist/esm-es5/taro-button-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-camera-core.entry.js +2 -1
- package/dist/esm-es5/taro-camera-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-canvas-core.entry.js +2 -1
- package/dist/esm-es5/taro-canvas-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-checkbox-core_2.entry.js +2 -1
- package/dist/esm-es5/taro-checkbox-core_2.entry.js.map +1 -0
- package/dist/esm-es5/taro-components.js +2 -1
- package/dist/esm-es5/taro-components.js.map +1 -0
- package/dist/esm-es5/taro-cover-image-core.entry.js +2 -1
- package/dist/esm-es5/taro-cover-image-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-cover-view-core.entry.js +2 -1
- package/dist/esm-es5/taro-cover-view-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-custom-wrapper-core.entry.js +2 -1
- package/dist/esm-es5/taro-custom-wrapper-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-editor-core.entry.js +2 -1
- package/dist/esm-es5/taro-editor-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-form-core.entry.js +2 -1
- package/dist/esm-es5/taro-form-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-functional-page-navigator-core.entry.js +2 -1
- package/dist/esm-es5/taro-functional-page-navigator-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-icon-core.entry.js +2 -1
- package/dist/esm-es5/taro-icon-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-image-core.entry.js +2 -1
- package/dist/esm-es5/taro-image-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-input-core.entry.js +2 -1
- package/dist/esm-es5/taro-input-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-keyboard-accessory-core.entry.js +2 -1
- package/dist/esm-es5/taro-keyboard-accessory-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-label-core.entry.js +2 -1
- package/dist/esm-es5/taro-label-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-live-player-core.entry.js +2 -1
- package/dist/esm-es5/taro-live-player-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-live-pusher-core.entry.js +2 -1
- package/dist/esm-es5/taro-live-pusher-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-map-core.entry.js +2 -1
- package/dist/esm-es5/taro-map-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-match-media-core.entry.js +2 -1
- package/dist/esm-es5/taro-match-media-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-movable-area-core_2.entry.js +2 -0
- package/dist/esm-es5/taro-movable-area-core_2.entry.js.map +1 -0
- package/dist/esm-es5/taro-navigation-bar-core.entry.js +2 -1
- package/dist/esm-es5/taro-navigation-bar-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-navigator-core.entry.js +2 -1
- package/dist/esm-es5/taro-navigator-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-official-account-core.entry.js +2 -1
- package/dist/esm-es5/taro-official-account-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-open-data-core.entry.js +2 -1
- package/dist/esm-es5/taro-open-data-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-page-container-core.entry.js +2 -1
- package/dist/esm-es5/taro-page-container-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-page-meta-core.entry.js +2 -1
- package/dist/esm-es5/taro-page-meta-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-picker-core_2.entry.js +2 -1
- package/dist/esm-es5/taro-picker-core_2.entry.js.map +1 -0
- package/dist/esm-es5/taro-picker-view-column-core_2.entry.js +2 -0
- package/dist/esm-es5/taro-picker-view-column-core_2.entry.js.map +1 -0
- package/dist/esm-es5/taro-progress-core.entry.js +2 -1
- package/dist/esm-es5/taro-progress-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-pull-to-refresh.entry.js +2 -1
- package/dist/esm-es5/taro-pull-to-refresh.entry.js.map +1 -0
- package/dist/esm-es5/taro-radio-core_2.entry.js +2 -1
- package/dist/esm-es5/taro-radio-core_2.entry.js.map +1 -0
- package/dist/esm-es5/taro-rich-text-core.entry.js +2 -1
- package/dist/esm-es5/taro-rich-text-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-root-portal-core.entry.js +2 -1
- package/dist/esm-es5/taro-root-portal-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-scroll-view-core.entry.js +2 -1
- package/dist/esm-es5/taro-scroll-view-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-share-element-core.entry.js +2 -1
- package/dist/esm-es5/taro-share-element-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-slider-core.entry.js +2 -1
- package/dist/esm-es5/taro-slider-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-slot-core.entry.js +2 -1
- package/dist/esm-es5/taro-slot-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-swiper-core_2.entry.js +2 -1
- package/dist/esm-es5/taro-swiper-core_2.entry.js.map +1 -0
- package/dist/esm-es5/taro-switch-core.entry.js +2 -1
- package/dist/esm-es5/taro-switch-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-tabbar.entry.js +2 -1
- package/dist/esm-es5/taro-tabbar.entry.js.map +1 -0
- package/dist/esm-es5/taro-text-core.entry.js +2 -1
- package/dist/esm-es5/taro-text-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-textarea-core.entry.js +2 -1
- package/dist/esm-es5/taro-textarea-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-video-control_3.entry.js +2 -365
- package/dist/esm-es5/taro-video-control_3.entry.js.map +1 -0
- package/dist/esm-es5/taro-view-core.entry.js +2 -1
- package/dist/esm-es5/taro-view-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-voip-room-core.entry.js +2 -1
- package/dist/esm-es5/taro-voip-room-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-web-view-core.entry.js +2 -1
- package/dist/esm-es5/taro-web-view-core.entry.js.map +1 -0
- package/{dist-h5/react/components → dist/react/component-lib}/index.js +1 -1
- package/{dist-h5/react/components → dist/react/component-lib}/input.js +5 -5
- package/{dist-h5/react/utils → dist/react/component-lib}/reactify-wc.js +10 -20
- package/dist/react/components.js +65 -0
- package/dist/react/helper.js +13 -0
- package/{dist-h5 → dist}/react/index.js +0 -0
- package/dist/react/react-component-lib/index.js +2 -0
- package/dist/react/react-component-lib/interfaces.js +1 -0
- package/dist/react/react-component-lib/utils/attachProps.js +107 -0
- package/dist/react/react-component-lib/utils/case.js +10 -0
- package/dist/react/react-component-lib/utils/dev.js +12 -0
- package/dist/taro-components/index.esm.js +2 -0
- package/dist/taro-components/index.esm.js.map +1 -0
- package/dist/taro-components/p-001ef419.system.entry.js +2 -0
- package/dist/taro-components/p-001ef419.system.entry.js.map +1 -0
- package/dist/taro-components/p-01dc54a5.entry.js +2 -0
- package/dist/taro-components/p-01dc54a5.entry.js.map +1 -0
- package/dist/taro-components/p-0382d7d0.system.entry.js +2 -0
- package/dist/taro-components/p-0382d7d0.system.entry.js.map +1 -0
- package/dist/taro-components/{p-a94524c9.system.entry.js → p-057159bc.system.entry.js} +2 -1
- package/dist/taro-components/p-057159bc.system.entry.js.map +1 -0
- package/dist/taro-components/p-0a896bc7.entry.js +2 -0
- package/dist/taro-components/p-0a896bc7.entry.js.map +1 -0
- package/dist/taro-components/p-0b38e6c7.system.entry.js +2 -0
- package/dist/taro-components/p-0b38e6c7.system.entry.js.map +1 -0
- package/dist/taro-components/p-0d36ef6b.entry.js +2 -0
- package/dist/taro-components/p-0d36ef6b.entry.js.map +1 -0
- package/dist/taro-components/p-0ee6a068.entry.js +2 -0
- package/dist/taro-components/p-0ee6a068.entry.js.map +1 -0
- package/dist/taro-components/p-12e4b019.entry.js +2 -0
- package/dist/taro-components/p-12e4b019.entry.js.map +1 -0
- package/dist/taro-components/p-15dced71.system.entry.js +2 -0
- package/dist/taro-components/p-15dced71.system.entry.js.map +1 -0
- package/dist/taro-components/p-15e45ed6.system.js +2 -1
- package/dist/taro-components/p-15e45ed6.system.js.map +1 -0
- package/dist/taro-components/{p-f81a74bb.system.entry.js → p-1743a04b.system.js} +82 -81
- package/dist/taro-components/p-1743a04b.system.js.map +1 -0
- package/dist/taro-components/p-17657dca.entry.js +2 -0
- package/dist/taro-components/p-17657dca.entry.js.map +1 -0
- package/dist/taro-components/p-1b2556e2.system.entry.js +2 -0
- package/dist/taro-components/p-1b2556e2.system.entry.js.map +1 -0
- package/dist/taro-components/p-1b64d2a2.entry.js +2 -0
- package/dist/taro-components/p-1b64d2a2.entry.js.map +1 -0
- package/dist/taro-components/p-1bd3d09b.system.entry.js +2 -0
- package/dist/taro-components/p-1bd3d09b.system.entry.js.map +1 -0
- package/dist/taro-components/p-1cb76199.entry.js +2 -0
- package/dist/taro-components/p-1cb76199.entry.js.map +1 -0
- package/dist/taro-components/{p-13f0b11f.system.entry.js → p-1cd1c507.system.entry.js} +2 -1
- package/dist/taro-components/p-1cd1c507.system.entry.js.map +1 -0
- package/dist/taro-components/p-1e436d5b.entry.js +2 -0
- package/dist/taro-components/p-1e436d5b.entry.js.map +1 -0
- package/dist/taro-components/p-2096bc5f.entry.js +2 -0
- package/dist/taro-components/p-2096bc5f.entry.js.map +1 -0
- package/dist/taro-components/p-20ec6387.entry.js +2 -0
- package/dist/taro-components/p-20ec6387.entry.js.map +1 -0
- package/dist/taro-components/{p-c5fd5c7f.system.entry.js → p-21b77a13.system.entry.js} +2 -1
- package/dist/taro-components/p-21b77a13.system.entry.js.map +1 -0
- package/dist/taro-components/p-2243a376.entry.js +2 -0
- package/dist/taro-components/p-2243a376.entry.js.map +1 -0
- package/dist/taro-components/p-22f9f9fa.entry.js +2 -0
- package/dist/taro-components/p-22f9f9fa.entry.js.map +1 -0
- package/dist/taro-components/p-29f04296.entry.js +2 -0
- package/dist/taro-components/p-29f04296.entry.js.map +1 -0
- package/dist/taro-components/{p-3e11c8cc.system.entry.js → p-301a8b85.system.entry.js} +2 -1
- package/dist/taro-components/p-301a8b85.system.entry.js.map +1 -0
- package/dist/taro-components/p-3b1d2d37.system.js +2 -1
- package/dist/taro-components/p-3b1d2d37.system.js.map +1 -0
- package/dist/taro-components/p-3b9a1125.entry.js +2 -0
- package/dist/taro-components/p-3b9a1125.entry.js.map +1 -0
- package/dist/taro-components/p-3c256e0e.entry.js +2 -0
- package/dist/taro-components/p-3c256e0e.entry.js.map +1 -0
- package/dist/taro-components/p-3e6b29c6.entry.js +2 -0
- package/dist/taro-components/p-3e6b29c6.entry.js.map +1 -0
- package/dist/taro-components/{p-a63fbc50.system.entry.js → p-439a3349.system.entry.js} +2 -1
- package/dist/taro-components/p-439a3349.system.entry.js.map +1 -0
- package/dist/taro-components/p-447386b2.system.entry.js +2 -0
- package/dist/taro-components/p-447386b2.system.entry.js.map +1 -0
- package/dist/taro-components/{p-d075934f.system.entry.js → p-45b6ea0c.system.entry.js} +2 -1
- package/dist/taro-components/p-45b6ea0c.system.entry.js.map +1 -0
- package/dist/taro-components/p-49a6cae4.system.entry.js +2 -0
- package/dist/taro-components/p-49a6cae4.system.entry.js.map +1 -0
- package/dist/taro-components/p-4b05e003.entry.js +2 -0
- package/dist/taro-components/p-4b05e003.entry.js.map +1 -0
- package/dist/taro-components/{p-692d986d.system.entry.js → p-4b27df71.system.entry.js} +2 -1
- package/dist/taro-components/p-4b27df71.system.entry.js.map +1 -0
- package/dist/taro-components/p-4b71c926.entry.js +2 -0
- package/dist/taro-components/p-4b71c926.entry.js.map +1 -0
- package/dist/taro-components/{p-f7c80795.system.entry.js → p-4fbb8b4c.system.entry.js} +2 -1
- package/dist/taro-components/p-4fbb8b4c.system.entry.js.map +1 -0
- package/dist/taro-components/p-50ea2036.system.js +2 -1
- package/dist/taro-components/p-50ea2036.system.js.map +1 -0
- package/dist/taro-components/p-55519002.entry.js +2 -0
- package/dist/taro-components/p-55519002.entry.js.map +1 -0
- package/dist/taro-components/p-570222e2.entry.js +2 -0
- package/dist/taro-components/p-570222e2.entry.js.map +1 -0
- package/dist/taro-components/p-5746d7ce.js +2 -1
- package/dist/taro-components/p-5746d7ce.js.map +1 -0
- package/dist/taro-components/{p-6ad59489.system.entry.js → p-580a72d1.system.entry.js} +2 -1
- package/dist/taro-components/p-580a72d1.system.entry.js.map +1 -0
- package/dist/taro-components/{p-93eed5d7.system.entry.js → p-59418be7.system.entry.js} +2 -1
- package/dist/taro-components/p-59418be7.system.entry.js.map +1 -0
- package/dist/taro-components/p-59e02aca.system.entry.js +2 -0
- package/dist/taro-components/p-59e02aca.system.entry.js.map +1 -0
- package/dist/taro-components/p-5b552407.entry.js +2 -0
- package/dist/taro-components/p-5b552407.entry.js.map +1 -0
- package/dist/taro-components/p-5bfefd19.js +3 -0
- package/dist/taro-components/p-5bfefd19.js.map +1 -0
- package/dist/taro-components/p-61f225ef.system.js +2 -1
- package/dist/taro-components/p-61f225ef.system.js.map +1 -0
- package/dist/taro-components/p-663d1bb9.system.js +2 -1
- package/dist/taro-components/p-663d1bb9.system.js.map +1 -0
- package/dist/taro-components/p-6a96da58.js +2 -1
- package/dist/taro-components/p-6a96da58.js.map +1 -0
- package/dist/taro-components/p-6af8be19.entry.js +2 -0
- package/dist/taro-components/p-6af8be19.entry.js.map +1 -0
- package/dist/taro-components/p-6ea2995b.entry.js +2 -0
- package/dist/taro-components/p-6ea2995b.entry.js.map +1 -0
- package/dist/taro-components/p-6f8af69f.entry.js +2 -0
- package/dist/taro-components/p-6f8af69f.entry.js.map +1 -0
- package/dist/taro-components/{p-f4ea8a56.system.entry.js → p-701b0286.system.entry.js} +2 -1
- package/dist/taro-components/p-701b0286.system.entry.js.map +1 -0
- package/dist/taro-components/p-72f327e1.js +2 -1
- package/dist/taro-components/p-72f327e1.js.map +1 -0
- package/dist/taro-components/p-72f626ab.system.entry.js +2 -0
- package/dist/taro-components/p-72f626ab.system.entry.js.map +1 -0
- package/dist/taro-components/p-755be847.system.entry.js +2 -0
- package/dist/taro-components/p-755be847.system.entry.js.map +1 -0
- package/dist/taro-components/p-76724e58.js +3 -2
- package/dist/taro-components/p-76724e58.js.map +1 -0
- package/dist/taro-components/p-7baff0b4.entry.js +2 -0
- package/dist/taro-components/p-7baff0b4.entry.js.map +1 -0
- package/dist/taro-components/p-8231e748.entry.js +2 -0
- package/dist/taro-components/p-8231e748.entry.js.map +1 -0
- package/dist/taro-components/{p-07294134.system.entry.js → p-8a3620a6.system.entry.js} +2 -1
- package/dist/taro-components/p-8a3620a6.system.entry.js.map +1 -0
- package/dist/taro-components/p-8a8f286f.system.js +3 -0
- package/dist/taro-components/p-8a8f286f.system.js.map +1 -0
- package/dist/taro-components/{p-7e960ac3.system.entry.js → p-8bec95d4.system.entry.js} +2 -1
- package/dist/taro-components/p-8bec95d4.system.entry.js.map +1 -0
- package/dist/taro-components/{p-e671c8c5.system.entry.js → p-8c8fe164.system.entry.js} +2 -1
- package/dist/taro-components/p-8c8fe164.system.entry.js.map +1 -0
- package/dist/taro-components/p-93cc7adc.entry.js +2 -0
- package/dist/taro-components/p-93cc7adc.entry.js.map +1 -0
- package/dist/taro-components/p-946c0799.system.entry.js +2 -0
- package/dist/taro-components/p-946c0799.system.entry.js.map +1 -0
- package/dist/taro-components/p-96a784f1.entry.js +2 -0
- package/dist/taro-components/p-96a784f1.entry.js.map +1 -0
- package/dist/taro-components/p-99bbe34a.system.entry.js +2 -0
- package/dist/taro-components/p-99bbe34a.system.entry.js.map +1 -0
- package/dist/taro-components/p-9e20c25c.entry.js +2 -0
- package/dist/taro-components/p-9e20c25c.entry.js.map +1 -0
- package/dist/taro-components/{p-075458e5.system.entry.js → p-9f1ca602.system.entry.js} +2 -1
- package/dist/taro-components/p-9f1ca602.system.entry.js.map +1 -0
- package/dist/taro-components/p-a1ace8c7.system.entry.js +2 -0
- package/dist/taro-components/p-a1ace8c7.system.entry.js.map +1 -0
- package/dist/taro-components/p-a29509fa.system.entry.js +2 -0
- package/dist/taro-components/p-a29509fa.system.entry.js.map +1 -0
- package/dist/taro-components/p-a2aab820.entry.js +2 -0
- package/dist/taro-components/p-a2aab820.entry.js.map +1 -0
- package/dist/taro-components/{p-d4da725f.system.entry.js → p-a6f2dc54.system.entry.js} +2 -1
- package/dist/taro-components/p-a6f2dc54.system.entry.js.map +1 -0
- package/dist/taro-components/p-ab105c26.entry.js +2 -0
- package/dist/taro-components/p-ab105c26.entry.js.map +1 -0
- package/dist/taro-components/{p-c93bb915.system.entry.js → p-b04a56bd.system.entry.js} +2 -1
- package/dist/taro-components/p-b04a56bd.system.entry.js.map +1 -0
- package/dist/taro-components/p-b10cb428.entry.js +2 -0
- package/dist/taro-components/p-b10cb428.entry.js.map +1 -0
- package/dist/taro-components/p-b4ec48c3.entry.js +2 -0
- package/dist/taro-components/p-b4ec48c3.entry.js.map +1 -0
- package/dist/taro-components/{p-d6662ab3.system.entry.js → p-b500c116.system.entry.js} +2 -1
- package/dist/taro-components/p-b500c116.system.entry.js.map +1 -0
- package/dist/taro-components/p-b832f4e8.entry.js +2 -0
- package/dist/taro-components/p-b832f4e8.entry.js.map +1 -0
- package/dist/taro-components/p-b88a55b4.system.entry.js +2 -0
- package/dist/taro-components/p-b88a55b4.system.entry.js.map +1 -0
- package/dist/taro-components/p-b90926cc.entry.js +2 -0
- package/dist/taro-components/p-b90926cc.entry.js.map +1 -0
- package/dist/taro-components/p-ba743573.entry.js +2 -0
- package/dist/taro-components/p-ba743573.entry.js.map +1 -0
- package/dist/taro-components/p-be3f5ac0.entry.js +2 -0
- package/dist/taro-components/p-be3f5ac0.entry.js.map +1 -0
- package/dist/taro-components/p-beea63a7.entry.js +2 -0
- package/dist/taro-components/p-beea63a7.entry.js.map +1 -0
- package/dist/taro-components/{p-b7681c76.system.entry.js → p-c0e3c822.system.entry.js} +2 -1
- package/dist/taro-components/p-c0e3c822.system.entry.js.map +1 -0
- package/dist/taro-components/p-c3acf0ea.system.entry.js +2 -0
- package/dist/taro-components/p-c3acf0ea.system.entry.js.map +1 -0
- package/dist/taro-components/p-c3bb8fa6.entry.js +2 -0
- package/dist/taro-components/p-c3bb8fa6.entry.js.map +1 -0
- package/dist/taro-components/{p-733cc64a.system.entry.js → p-c4cf58af.system.entry.js} +2 -1
- package/dist/taro-components/p-c4cf58af.system.entry.js.map +1 -0
- package/dist/taro-components/{p-b11aaf69.system.entry.js → p-c5c331bf.system.entry.js} +2 -1
- package/dist/taro-components/p-c5c331bf.system.entry.js.map +1 -0
- package/dist/taro-components/p-cb17d8bd.system.js +2 -0
- package/dist/taro-components/p-cb17d8bd.system.js.map +1 -0
- package/dist/taro-components/{p-fc9f4fd7.system.entry.js → p-cbe2436d.system.entry.js} +2 -1
- package/dist/taro-components/p-cbe2436d.system.entry.js.map +1 -0
- package/dist/taro-components/p-cd6a7eea.entry.js +2 -0
- package/dist/taro-components/p-cd6a7eea.entry.js.map +1 -0
- package/dist/taro-components/p-d4b6f19e.system.entry.js +2 -0
- package/dist/taro-components/p-d4b6f19e.system.entry.js.map +1 -0
- package/dist/taro-components/p-d5234e7e.js +366 -0
- package/dist/taro-components/p-d5234e7e.js.map +1 -0
- package/dist/taro-components/p-d5579efa.system.entry.js +2 -0
- package/dist/taro-components/p-d5579efa.system.entry.js.map +1 -0
- package/dist/taro-components/p-d619f198.system.entry.js +2 -0
- package/dist/taro-components/p-d619f198.system.entry.js.map +1 -0
- package/dist/taro-components/p-d7ab3e23.system.entry.js +2 -0
- package/dist/taro-components/p-d7ab3e23.system.entry.js.map +1 -0
- package/dist/taro-components/p-d7f4b10f.entry.js +2 -0
- package/dist/taro-components/p-d7f4b10f.entry.js.map +1 -0
- package/dist/taro-components/p-d85b216d.entry.js +2 -0
- package/dist/taro-components/p-d85b216d.entry.js.map +1 -0
- package/dist/taro-components/p-dcb48fd9.system.entry.js +2 -0
- package/dist/taro-components/p-dcb48fd9.system.entry.js.map +1 -0
- package/dist/taro-components/p-de762042.entry.js +2 -0
- package/dist/taro-components/p-de762042.entry.js.map +1 -0
- package/dist/taro-components/p-df862d0c.entry.js +2 -0
- package/dist/taro-components/p-df862d0c.entry.js.map +1 -0
- package/dist/taro-components/p-e0d6b00b.entry.js +2 -0
- package/dist/taro-components/p-e0d6b00b.entry.js.map +1 -0
- package/dist/taro-components/p-e4f1cc50.entry.js +2 -0
- package/dist/taro-components/p-e4f1cc50.entry.js.map +1 -0
- package/dist/taro-components/p-e59f999e.entry.js +2 -0
- package/dist/taro-components/p-e59f999e.entry.js.map +1 -0
- package/dist/taro-components/p-e7239faa.system.entry.js +2 -0
- package/dist/taro-components/p-e7239faa.system.entry.js.map +1 -0
- package/dist/taro-components/p-e98c07c3.system.entry.js +2 -0
- package/dist/taro-components/p-e98c07c3.system.entry.js.map +1 -0
- package/dist/taro-components/p-e9abe3e2.entry.js +2 -0
- package/dist/taro-components/p-e9abe3e2.entry.js.map +1 -0
- package/dist/taro-components/p-eddd00e9.system.entry.js +2 -0
- package/dist/taro-components/p-eddd00e9.system.entry.js.map +1 -0
- package/dist/taro-components/p-ef029c30.system.entry.js +2 -0
- package/dist/taro-components/p-ef029c30.system.entry.js.map +1 -0
- package/dist/taro-components/{p-8e2b048e.system.entry.js → p-f0d0160d.system.entry.js} +2 -1
- package/dist/taro-components/p-f0d0160d.system.entry.js.map +1 -0
- package/dist/taro-components/{p-f2803c2e.system.entry.js → p-f2c75971.system.entry.js} +2 -1
- package/dist/taro-components/p-f2c75971.system.entry.js.map +1 -0
- package/dist/taro-components/p-ffc44634.entry.js +2 -0
- package/dist/taro-components/p-ffc44634.entry.js.map +1 -0
- package/dist/taro-components/taro-components.esm.js +2 -1
- package/dist/taro-components/taro-components.esm.js.map +1 -0
- package/dist/taro-components/taro-components.js +2 -1
- package/dist/types/components/checkbox/checkbox.d.ts +2 -2
- package/dist/types/components/cover-image/cover-image.d.ts +1 -1
- package/dist/types/components/form/form.d.ts +4 -7
- package/dist/types/components/image/image.d.ts +1 -1
- package/dist/types/components/input/input.d.ts +4 -3
- package/dist/types/components/movable-area/movable-view.d.ts +3 -3
- package/dist/types/components/progress/progress.d.ts +1 -1
- package/dist/types/components/radio/radio.d.ts +2 -2
- package/dist/types/components/scroll-view/scroll-view.d.ts +1 -1
- package/dist/types/components/slider/slider.d.ts +3 -4
- package/dist/types/components/slot/slot.d.ts +0 -1
- package/dist/types/components/textarea/textarea.d.ts +1 -0
- package/dist/types/components/video/utils.d.ts +1 -1
- package/dist/types/components.d.ts +183 -70
- package/dist/types/stencil-public-runtime.d.ts +20 -4
- package/{dist-h5/vue/components/index.js → dist/vue2/component-lib/components.js} +0 -0
- package/{dist-h5/vue → dist/vue2/component-lib}/createComponent.js +0 -0
- package/{dist-h5/vue → dist/vue2/component-lib}/createFormsComponent.js +0 -0
- package/{dist-h5/vue/components → dist/vue2/component-lib}/icon.js +2 -2
- package/{dist-h5/vue/components → dist/vue2/component-lib}/image.js +2 -2
- package/{dist-h5/vue → dist/vue2/component-lib}/index.js +4 -3
- package/{dist-h5/vue → dist/vue2/component-lib}/mixins/listeners.js +0 -0
- package/{dist-h5/vue → dist/vue2/component-lib}/mixins/refs.js +0 -0
- package/{dist-h5/vue/components → dist/vue2/component-lib}/picker.js +2 -2
- package/{dist-h5/vue/components → dist/vue2/component-lib}/scroll-view.js +2 -2
- package/{dist-h5/vue/components → dist/vue2/component-lib}/text.js +2 -2
- package/dist/vue2/components.js +490 -0
- package/dist/vue2/index.js +26 -0
- package/dist/vue2/vue-component-lib/utils.js +45 -0
- package/{dist-h5/vue3 → dist/vue3/component-lib}/createComponent.js +1 -1
- package/{dist-h5/vue3 → dist/vue3/component-lib}/createFormsComponent.js +0 -0
- package/{dist-h5/vue3 → dist/vue3/component-lib}/forwardRef.js +0 -0
- package/{dist-h5/vue3/components → dist/vue3/component-lib}/icon.js +2 -2
- package/{dist-h5/vue3/components → dist/vue3/component-lib}/image.js +2 -2
- package/{dist-h5/vue3/components → dist/vue3/component-lib}/index.js +2 -2
- package/{dist-h5/vue3/components → dist/vue3/component-lib}/scroll-view.js +2 -2
- package/{dist-h5/vue3/components → dist/vue3/component-lib}/text.js +2 -2
- package/dist/vue3/components.js +64 -0
- package/{dist-h5 → dist}/vue3/index.js +0 -0
- package/dist/vue3/vue-component-lib/utils.js +201 -0
- package/loader/package.json +1 -0
- package/package.json +23 -23
- package/types/Ad.d.ts +20 -21
- package/types/Audio.d.ts +5 -5
- package/types/Button.d.ts +67 -70
- package/types/Camera.d.ts +15 -16
- package/types/Canvas.d.ts +22 -27
- package/types/Checkbox.d.ts +7 -7
- package/types/CoverImage.d.ts +15 -15
- package/types/CoverView.d.ts +5 -5
- package/types/Form.d.ts +10 -10
- package/types/Image.d.ts +20 -20
- package/types/Input.d.ts +26 -24
- package/types/LivePlayer.d.ts +31 -25
- package/types/LivePusher.d.ts +5 -5
- package/types/Map.d.ts +66 -71
- package/types/MovableView.d.ts +5 -14
- package/types/Navigator.d.ts +10 -10
- package/types/OpenData.d.ts +5 -5
- package/types/PageContainer.d.ts +7 -10
- package/types/PageMeta.d.ts +14 -14
- package/types/Picker.d.ts +1 -5
- package/types/PickerView.d.ts +11 -21
- package/types/Progress.d.ts +5 -5
- package/types/RadioGroup.d.ts +5 -5
- package/types/RichText.d.ts +17 -17
- package/types/ScrollView.d.ts +46 -30
- package/types/Slider.d.ts +10 -10
- package/types/Swiper.d.ts +20 -20
- package/types/Switch.d.ts +5 -5
- package/types/Textarea.d.ts +32 -32
- package/types/Video.d.ts +119 -108
- package/types/View.d.ts +21 -15
- package/types/VoipRoom.d.ts +5 -5
- package/types/WebView.d.ts +11 -5
- package/dist/cjs/taro-movable-area-core.cjs.entry.js +0 -157
- package/dist/cjs/taro-picker-view-column-core.cjs.entry.js +0 -95
- package/dist/esm/taro-movable-area-core.entry.js +0 -153
- package/dist/esm/taro-picker-view-column-core.entry.js +0 -91
- package/dist/esm-es5/index-8809c729.js +0 -1
- package/dist/esm-es5/taro-movable-area-core.entry.js +0 -1
- package/dist/esm-es5/taro-movable-view-core.entry.js +0 -1
- package/dist/esm-es5/taro-picker-view-column-core.entry.js +0 -1
- package/dist/esm-es5/taro-picker-view-core.entry.js +0 -1
- package/dist/taro-components/p-028e2728.entry.js +0 -1
- package/dist/taro-components/p-0380841f.system.js +0 -1
- package/dist/taro-components/p-059912fd.js +0 -1
- package/dist/taro-components/p-06178a0c.entry.js +0 -1
- package/dist/taro-components/p-06e6864b.system.entry.js +0 -1
- package/dist/taro-components/p-10c47df8.system.entry.js +0 -1
- package/dist/taro-components/p-1c775a11.system.entry.js +0 -1
- package/dist/taro-components/p-232ebfae.system.entry.js +0 -1
- package/dist/taro-components/p-25df0ce9.entry.js +0 -1
- package/dist/taro-components/p-27126803.system.entry.js +0 -1
- package/dist/taro-components/p-275d883f.system.entry.js +0 -1
- package/dist/taro-components/p-27c80869.system.entry.js +0 -1
- package/dist/taro-components/p-2ec47545.entry.js +0 -1
- package/dist/taro-components/p-3255f11f.system.entry.js +0 -1
- package/dist/taro-components/p-362998cf.entry.js +0 -1
- package/dist/taro-components/p-3744e978.entry.js +0 -365
- package/dist/taro-components/p-3c6090fd.entry.js +0 -1
- package/dist/taro-components/p-44398c17.system.entry.js +0 -1
- package/dist/taro-components/p-44cbb351.system.js +0 -1
- package/dist/taro-components/p-4ada10aa.entry.js +0 -1
- package/dist/taro-components/p-4cf436f9.entry.js +0 -1
- package/dist/taro-components/p-4d826fb7.entry.js +0 -1
- package/dist/taro-components/p-55266a1f.entry.js +0 -1
- package/dist/taro-components/p-56c86512.entry.js +0 -1
- package/dist/taro-components/p-5733124c.entry.js +0 -1
- package/dist/taro-components/p-57a2a441.entry.js +0 -1
- package/dist/taro-components/p-59d93770.entry.js +0 -1
- package/dist/taro-components/p-5a2305e7.entry.js +0 -1
- package/dist/taro-components/p-5a374cb9.entry.js +0 -1
- package/dist/taro-components/p-5c87902f.system.entry.js +0 -1
- package/dist/taro-components/p-5e223bab.system.entry.js +0 -1
- package/dist/taro-components/p-5f18259d.system.entry.js +0 -1
- package/dist/taro-components/p-62fc514e.entry.js +0 -1
- package/dist/taro-components/p-63a0c6b0.entry.js +0 -1
- package/dist/taro-components/p-64447f5a.system.entry.js +0 -1
- package/dist/taro-components/p-67222d90.system.entry.js +0 -1
- package/dist/taro-components/p-6800ac6f.entry.js +0 -1
- package/dist/taro-components/p-6aa557f0.entry.js +0 -1
- package/dist/taro-components/p-72f858e4.entry.js +0 -1
- package/dist/taro-components/p-7374537f.entry.js +0 -1
- package/dist/taro-components/p-7407013d.entry.js +0 -1
- package/dist/taro-components/p-7d329ab0.entry.js +0 -1
- package/dist/taro-components/p-7f93fa08.entry.js +0 -1
- package/dist/taro-components/p-82661d45.system.entry.js +0 -1
- package/dist/taro-components/p-8475421b.system.entry.js +0 -1
- package/dist/taro-components/p-8788dc46.system.entry.js +0 -1
- package/dist/taro-components/p-886571e5.entry.js +0 -1
- package/dist/taro-components/p-888fac99.entry.js +0 -1
- package/dist/taro-components/p-8aea3de3.entry.js +0 -1
- package/dist/taro-components/p-8c8be53b.entry.js +0 -1
- package/dist/taro-components/p-8cf86f31.system.entry.js +0 -1
- package/dist/taro-components/p-9234cc1d.entry.js +0 -1
- package/dist/taro-components/p-92699438.entry.js +0 -1
- package/dist/taro-components/p-9a0e70b1.entry.js +0 -1
- package/dist/taro-components/p-9afbb423.system.entry.js +0 -1
- package/dist/taro-components/p-9b39a940.entry.js +0 -1
- package/dist/taro-components/p-9e1572c5.system.entry.js +0 -1
- package/dist/taro-components/p-ab1256fe.entry.js +0 -1
- package/dist/taro-components/p-ad6ad7e3.system.entry.js +0 -1
- package/dist/taro-components/p-afbcd093.entry.js +0 -1
- package/dist/taro-components/p-b1ae9401.entry.js +0 -1
- package/dist/taro-components/p-b2800ccd.entry.js +0 -1
- package/dist/taro-components/p-b3b677fc.entry.js +0 -1
- package/dist/taro-components/p-b3d961f9.system.entry.js +0 -1
- package/dist/taro-components/p-b60820b4.entry.js +0 -1
- package/dist/taro-components/p-b7639674.entry.js +0 -1
- package/dist/taro-components/p-b7ac0b7f.system.entry.js +0 -1
- package/dist/taro-components/p-b9903f15.system.entry.js +0 -1
- package/dist/taro-components/p-bd706d39.entry.js +0 -1
- package/dist/taro-components/p-c92bafb6.system.entry.js +0 -1
- package/dist/taro-components/p-cf048af9.entry.js +0 -1
- package/dist/taro-components/p-d5f3080c.entry.js +0 -1
- package/dist/taro-components/p-df3b544a.system.entry.js +0 -1
- package/dist/taro-components/p-dff55efd.entry.js +0 -1
- package/dist/taro-components/p-eec00033.entry.js +0 -1
- package/dist/taro-components/p-eeed74e3.system.entry.js +0 -1
- package/dist/taro-components/p-ef006b23.entry.js +0 -1
- package/dist/taro-components/p-f8b9c4b0.entry.js +0 -1
- package/dist/taro-components/p-fa2a9bab.entry.js +0 -1
- package/dist/taro-components/p-fec6ac36.entry.js +0 -1
- package/dist/taro-components/p-ff84986d.entry.js +0 -1
- package/dist/taro-components/p-ffefd74f.entry.js +0 -1
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
(function(){if(typeof window!=="object"){return}if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype){if(!("isIntersecting"in window.IntersectionObserverEntry.prototype)){Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}})}return}var t=window.document;function i(t){this.time=t.time;this.target=t.target;this.rootBounds=t.rootBounds;this.boundingClientRect=t.boundingClientRect;this.intersectionRect=t.intersectionRect||f();this.isIntersecting=!!t.intersectionRect;var i=this.boundingClientRect;var n=i.width*i.height;var r=this.intersectionRect;var e=r.width*r.height;if(n){this.intersectionRatio=Number((e/n).toFixed(4))}else{this.intersectionRatio=this.isIntersecting?1:0}}function n(t,i){var n=i||{};if(typeof t!="function"){throw new Error("callback must be a function")}if(n.root&&n.root.nodeType!=1){throw new Error("root must be an Element")}this._checkForIntersections=e(this._checkForIntersections.bind(this),this.THROTTLE_TIMEOUT);this._callback=t;this._observationTargets=[];this._queuedEntries=[];this._rootMarginValues=this._parseRootMargin(n.rootMargin);this.thresholds=this._initThresholds(n.threshold);this.root=n.root||null;this.rootMargin=this._rootMarginValues.map((function(t){return t.value+t.unit})).join(" ")}n.prototype.THROTTLE_TIMEOUT=100;n.prototype.POLL_INTERVAL=null;n.prototype.USE_MUTATION_OBSERVER=true;n.prototype.observe=function(t){var i=this._observationTargets.some((function(i){return i.element==t}));if(i){return}if(!(t&&t.nodeType==1)){throw new Error("target must be an Element")}this._registerInstance();this._observationTargets.push({element:t,entry:null});this._monitorIntersections();this._checkForIntersections()};n.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter((function(i){return i.element!=t}));if(!this._observationTargets.length){this._unmonitorIntersections();this._unregisterInstance()}};n.prototype.disconnect=function(){this._observationTargets=[];this._unmonitorIntersections();this._unregisterInstance()};n.prototype.takeRecords=function(){var t=this._queuedEntries.slice();this._queuedEntries=[];return t};n.prototype._initThresholds=function(t){var i=t||[0];if(!Array.isArray(i))i=[i];return i.sort().filter((function(t,i,n){if(typeof t!="number"||isNaN(t)||t<0||t>1){throw new Error("threshold must be a number between 0 and 1 inclusively")}return t!==n[i-1]}))};n.prototype._parseRootMargin=function(t){var i=t||"0px";var n=i.split(/\s+/).map((function(t){var i=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!i){throw new Error("rootMargin must be specified in pixels or percent")}return{value:parseFloat(i[1]),unit:i[2]}}));n[1]=n[1]||n[0];n[2]=n[2]||n[0];n[3]=n[3]||n[1];return n};n.prototype._monitorIntersections=function(){if(!this._monitoringIntersections){this._monitoringIntersections=true;if(this.POLL_INTERVAL){this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL)}else{s(window,"resize",this._checkForIntersections,true);s(t,"scroll",this._checkForIntersections,true);if(this.USE_MUTATION_OBSERVER&&"MutationObserver"in window){this._domObserver=new MutationObserver(this._checkForIntersections);this._domObserver.observe(t,{attributes:true,childList:true,characterData:true,subtree:true})}}}};n.prototype._unmonitorIntersections=function(){if(this._monitoringIntersections){this._monitoringIntersections=false;clearInterval(this._monitoringInterval);this._monitoringInterval=null;o(window,"resize",this._checkForIntersections,true);o(t,"scroll",this._checkForIntersections,true);if(this._domObserver){this._domObserver.disconnect();this._domObserver=null}}};n.prototype._checkForIntersections=function(){var t=this._rootIsInDom();var n=t?this._getRootRect():f();this._observationTargets.forEach((function(e){var s=e.element;var o=u(s);var h=this._rootContainsTarget(s);var f=e.entry;var a=t&&h&&this._computeTargetAndRootIntersection(s,n);var c=e.entry=new i({time:r(),target:s,boundingClientRect:o,rootBounds:n,intersectionRect:a});if(!f){this._queuedEntries.push(c)}else if(t&&h){if(this._hasCrossedThreshold(f,c)){this._queuedEntries.push(c)}}else{if(f&&f.isIntersecting){this._queuedEntries.push(c)}}}),this);if(this._queuedEntries.length){this._callback(this.takeRecords(),this)}};n.prototype._computeTargetAndRootIntersection=function(i,n){if(window.getComputedStyle(i).display=="none")return;var r=u(i);var e=r;var s=c(i);var o=false;while(!o){var f=null;var a=s.nodeType==1?window.getComputedStyle(s):{};if(a.display=="none")return;if(s==this.root||s==t){o=true;f=n}else{if(s!=t.body&&s!=t.documentElement&&a.overflow!="visible"){f=u(s)}}if(f){e=h(f,e);if(!e)break}s=c(s)}return e};n.prototype._getRootRect=function(){var i;if(this.root){i=u(this.root)}else{var n=t.documentElement;var r=t.body;i={top:0,left:0,right:n.clientWidth||r.clientWidth,width:n.clientWidth||r.clientWidth,bottom:n.clientHeight||r.clientHeight,height:n.clientHeight||r.clientHeight}}return this._expandRectByRootMargin(i)};n.prototype._expandRectByRootMargin=function(t){var i=this._rootMarginValues.map((function(i,n){return i.unit=="px"?i.value:i.value*(n%2?t.width:t.height)/100}));var n={top:t.top-i[0],right:t.right+i[1],bottom:t.bottom+i[2],left:t.left-i[3]};n.width=n.right-n.left;n.height=n.bottom-n.top;return n};n.prototype._hasCrossedThreshold=function(t,i){var n=t&&t.isIntersecting?t.intersectionRatio||0:-1;var r=i.isIntersecting?i.intersectionRatio||0:-1;if(n===r)return;for(var e=0;e<this.thresholds.length;e++){var s=this.thresholds[e];if(s==n||s==r||s<n!==s<r){return true}}};n.prototype._rootIsInDom=function(){return!this.root||a(t,this.root)};n.prototype._rootContainsTarget=function(i){return a(this.root||t,i)};n.prototype._registerInstance=function(){};n.prototype._unregisterInstance=function(){};function r(){return window.performance&&performance.now&&performance.now()}function e(t,i){var n=null;return function(){if(!n){n=setTimeout((function(){t();n=null}),i)}}}function s(t,i,n,r){if(typeof t.addEventListener=="function"){t.addEventListener(i,n,r||false)}else if(typeof t.attachEvent=="function"){t.attachEvent("on"+i,n)}}function o(t,i,n,r){if(typeof t.removeEventListener=="function"){t.removeEventListener(i,n,r||false)}else if(typeof t.detatchEvent=="function"){t.detatchEvent("on"+i,n)}}function h(t,i){var n=Math.max(t.top,i.top);var r=Math.min(t.bottom,i.bottom);var e=Math.max(t.left,i.left);var s=Math.min(t.right,i.right);var o=s-e;var h=r-n;return o>=0&&h>=0&&{top:n,bottom:r,left:e,right:s,width:o,height:h}}function u(t){var i;try{i=t.getBoundingClientRect()}catch(t){}if(!i)return f();if(!(i.width&&i.height)){i={top:i.top,right:i.right,bottom:i.bottom,left:i.left,width:i.right-i.left,height:i.bottom-i.top}}return i}function f(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function a(t,i){var n=i;while(n){if(n==t)return true;n=c(n)}return false}function c(t){var i=t.parentNode;if(i&&i.nodeType==11&&i.host){return i.host}if(i&&i.assignedSlot){return i.assignedSlot.parentNode}return i}window.IntersectionObserver=n;window.IntersectionObserverEntry=i})();
|
|
2
|
+
//# sourceMappingURL=p-72f327e1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../node_modules/.pnpm/registry.npmjs.org+intersection-observer@0.7.0/node_modules/intersection-observer/intersection-observer.js"],"names":["window","IntersectionObserverEntry","prototype","Object","defineProperty","get","this","intersectionRatio","document","entry","time","target","rootBounds","boundingClientRect","intersectionRect","getEmptyRect","isIntersecting","targetRect","targetArea","width","height","intersectionArea","Number","toFixed","IntersectionObserver","callback","opt_options","options","Error","root","nodeType","_checkForIntersections","throttle","bind","THROTTLE_TIMEOUT","_callback","_observationTargets","_queuedEntries","_rootMarginValues","_parseRootMargin","rootMargin","thresholds","_initThresholds","threshold","map","margin","value","unit","join","POLL_INTERVAL","USE_MUTATION_OBSERVER","observe","isTargetAlreadyObserved","some","item","element","_registerInstance","push","_monitorIntersections","unobserve","filter","length","_unmonitorIntersections","_unregisterInstance","disconnect","takeRecords","records","slice","opt_threshold","Array","isArray","sort","t","i","a","isNaN","opt_rootMargin","marginString","margins","split","parts","exec","parseFloat","_monitoringIntersections","_monitoringInterval","setInterval","addEvent","_domObserver","MutationObserver","attributes","childList","characterData","subtree","clearInterval","removeEvent","rootIsInDom","_rootIsInDom","rootRect","_getRootRect","forEach","getBoundingClientRect","rootContainsTarget","_rootContainsTarget","oldEntry","_computeTargetAndRootIntersection","newEntry","now","_hasCrossedThreshold","getComputedStyle","display","parent","getParentNode","atRoot","parentRect","parentComputedStyle","body","documentElement","overflow","computeRectIntersection","html","top","left","right","clientWidth","bottom","clientHeight","_expandRectByRootMargin","rect","newRect","oldRatio","newRatio","containsDeep","performance","fn","timeout","timer","setTimeout","node","event","opt_useCapture","addEventListener","attachEvent","removeEventListener","detatchEvent","rect1","rect2","Math","max","min","el","err","child","parentNode","host","assignedSlot"],"mappings":"CAQC,WAID,UAAWA,SAAW,SAAU,CAC9B,OAKF,GAAI,yBAA0BA,QAC1B,8BAA+BA,QAC/B,sBAAuBA,OAAOC,0BAA0BC,UAAW,CAIrE,KAAM,mBAAoBF,OAAOC,0BAA0BC,WAAY,CACrEC,OAAOC,eAAeJ,OAAOC,0BAA0BC,UACrD,iBAAkB,CAClBG,IAAK,WACH,OAAOC,KAAKC,kBAAoB,KAItC,OAOF,IAAIC,EAAWR,OAAOQ,SAkBtB,SAASP,EAA0BQ,GACjCH,KAAKI,KAAOD,EAAMC,KAClBJ,KAAKK,OAASF,EAAME,OACpBL,KAAKM,WAAaH,EAAMG,WACxBN,KAAKO,mBAAqBJ,EAAMI,mBAChCP,KAAKQ,iBAAmBL,EAAMK,kBAAoBC,IAClDT,KAAKU,iBAAmBP,EAAMK,iBAG9B,IAAIG,EAAaX,KAAKO,mBACtB,IAAIK,EAAaD,EAAWE,MAAQF,EAAWG,OAC/C,IAAIN,EAAmBR,KAAKQ,iBAC5B,IAAIO,EAAmBP,EAAiBK,MAAQL,EAAiBM,OAGjE,GAAIF,EAAY,CAGdZ,KAAKC,kBAAoBe,QAAQD,EAAmBH,GAAYK,QAAQ,QACnE,CAELjB,KAAKC,kBAAoBD,KAAKU,eAAiB,EAAI,GAcvD,SAASQ,EAAqBC,EAAUC,GAEtC,IAAIC,EAAUD,GAAe,GAE7B,UAAWD,GAAY,WAAY,CACjC,MAAM,IAAIG,MAAM,+BAGlB,GAAID,EAAQE,MAAQF,EAAQE,KAAKC,UAAY,EAAG,CAC9C,MAAM,IAAI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AOd,EAAM,CACX,GAAIA,GAAQ3B,EAAQ,OAAO,KAE3B2B,EAAO1B,EAAc0B,GAEvB,OAAO,MAUT,SAAS1B,EAAc0B,GACrB,IAAI3B,EAAS2B,EAAKe,WAElB,GAAI1C,GAAUA,EAAOhF,UAAY,IAAMgF,EAAO2C,KAAM,CAElD,OAAO3C,EAAO2C,KAGhB,GAAI3C,GAAUA,EAAO4C,aAAc,CAEjC,OAAO5C,EAAO4C,aAAaF,WAG7B,OAAO1C,EAKT9G,OAAOwB,qBAAuBA,EAC9BxB,OAAOC,0BAA4BA,GA1tBnC","sourcesContent":["/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE.\n *\n * https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document\n *\n */\n(function() {\n'use strict';\n\n// Exit early if we're not running in a browser.\nif (typeof window !== 'object') {\n return;\n}\n\n// Exit early if all IntersectionObserver and IntersectionObserverEntry\n// features are natively supported.\nif ('IntersectionObserver' in window &&\n 'IntersectionObserverEntry' in window &&\n 'intersectionRatio' in window.IntersectionObserverEntry.prototype) {\n\n // Minimal polyfill for Edge 15's lack of `isIntersecting`\n // See: https://github.com/w3c/IntersectionObserver/issues/211\n if (!('isIntersecting' in window.IntersectionObserverEntry.prototype)) {\n Object.defineProperty(window.IntersectionObserverEntry.prototype,\n 'isIntersecting', {\n get: function () {\n return this.intersectionRatio > 0;\n }\n });\n }\n return;\n}\n\n\n/**\n * A local reference to the document.\n */\nvar document = window.document;\n\n\n/**\n * An IntersectionObserver registry. This registry exists to hold a strong\n * reference to IntersectionObserver instances currently observing a target\n * element. Without this registry, instances without another reference may be\n * garbage collected.\n */\nvar registry = [];\n\n\n/**\n * Creates the global IntersectionObserverEntry constructor.\n * https://w3c.github.io/IntersectionObserver/#intersection-observer-entry\n * @param {Object} entry A dictionary of instance properties.\n * @constructor\n */\nfunction IntersectionObserverEntry(entry) {\n this.time = entry.time;\n this.target = entry.target;\n this.rootBounds = entry.rootBounds;\n this.boundingClientRect = entry.boundingClientRect;\n this.intersectionRect = entry.intersectionRect || getEmptyRect();\n this.isIntersecting = !!entry.intersectionRect;\n\n // Calculates the intersection ratio.\n var targetRect = this.boundingClientRect;\n var targetArea = targetRect.width * targetRect.height;\n var intersectionRect = this.intersectionRect;\n var intersectionArea = intersectionRect.width * intersectionRect.height;\n\n // Sets intersection ratio.\n if (targetArea) {\n // Round the intersection ratio to avoid floating point math issues:\n // https://github.com/w3c/IntersectionObserver/issues/324\n this.intersectionRatio = Number((intersectionArea / targetArea).toFixed(4));\n } else {\n // If area is zero and is intersecting, sets to 1, otherwise to 0\n this.intersectionRatio = this.isIntersecting ? 1 : 0;\n }\n}\n\n\n/**\n * Creates the global IntersectionObserver constructor.\n * https://w3c.github.io/IntersectionObserver/#intersection-observer-interface\n * @param {Function} callback The function to be invoked after intersection\n * changes have queued. The function is not invoked if the queue has\n * been emptied by calling the `takeRecords` method.\n * @param {Object=} opt_options Optional configuration options.\n * @constructor\n */\nfunction IntersectionObserver(callback, opt_options) {\n\n var options = opt_options || {};\n\n if (typeof callback != 'function') {\n throw new Error('callback must be a function');\n }\n\n if (options.root && options.root.nodeType != 1) {\n throw new Error('root must be an Element');\n }\n\n // Binds and throttles `this._checkForIntersections`.\n this._checkForIntersections = throttle(\n this._checkForIntersections.bind(this), this.THROTTLE_TIMEOUT);\n\n // Private properties.\n this._callback = callback;\n this._observationTargets = [];\n this._queuedEntries = [];\n this._rootMarginValues = this._parseRootMargin(options.rootMargin);\n\n // Public properties.\n this.thresholds = this._initThresholds(options.threshold);\n this.root = options.root || null;\n this.rootMargin = this._rootMarginValues.map(function(margin) {\n return margin.value + margin.unit;\n }).join(' ');\n}\n\n\n/**\n * The minimum interval within which the document will be checked for\n * intersection changes.\n */\nIntersectionObserver.prototype.THROTTLE_TIMEOUT = 100;\n\n\n/**\n * The frequency in which the polyfill polls for intersection changes.\n * this can be updated on a per instance basis and must be set prior to\n * calling `observe` on the first target.\n */\nIntersectionObserver.prototype.POLL_INTERVAL = null;\n\n/**\n * Use a mutation observer on the root element\n * to detect intersection changes.\n */\nIntersectionObserver.prototype.USE_MUTATION_OBSERVER = true;\n\n\n/**\n * Starts observing a target element for intersection changes based on\n * the thresholds values.\n * @param {Element} target The DOM element to observe.\n */\nIntersectionObserver.prototype.observe = function(target) {\n var isTargetAlreadyObserved = this._observationTargets.some(function(item) {\n return item.element == target;\n });\n\n if (isTargetAlreadyObserved) {\n return;\n }\n\n if (!(target && target.nodeType == 1)) {\n throw new Error('target must be an Element');\n }\n\n this._registerInstance();\n this._observationTargets.push({element: target, entry: null});\n this._monitorIntersections();\n this._checkForIntersections();\n};\n\n\n/**\n * Stops observing a target element for intersection changes.\n * @param {Element} target The DOM element to observe.\n */\nIntersectionObserver.prototype.unobserve = function(target) {\n this._observationTargets =\n this._observationTargets.filter(function(item) {\n\n return item.element != target;\n });\n if (!this._observationTargets.length) {\n this._unmonitorIntersections();\n this._unregisterInstance();\n }\n};\n\n\n/**\n * Stops observing all target elements for intersection changes.\n */\nIntersectionObserver.prototype.disconnect = function() {\n this._observationTargets = [];\n this._unmonitorIntersections();\n this._unregisterInstance();\n};\n\n\n/**\n * Returns any queue entries that have not yet been reported to the\n * callback and clears the queue. This can be used in conjunction with the\n * callback to obtain the absolute most up-to-date intersection information.\n * @return {Array} The currently queued entries.\n */\nIntersectionObserver.prototype.takeRecords = function() {\n var records = this._queuedEntries.slice();\n this._queuedEntries = [];\n return records;\n};\n\n\n/**\n * Accepts the threshold value from the user configuration object and\n * returns a sorted array of unique threshold values. If a value is not\n * between 0 and 1 and error is thrown.\n * @private\n * @param {Array|number=} opt_threshold An optional threshold value or\n * a list of threshold values, defaulting to [0].\n * @return {Array} A sorted list of unique and valid threshold values.\n */\nIntersectionObserver.prototype._initThresholds = function(opt_threshold) {\n var threshold = opt_threshold || [0];\n if (!Array.isArray(threshold)) threshold = [threshold];\n\n return threshold.sort().filter(function(t, i, a) {\n if (typeof t != 'number' || isNaN(t) || t < 0 || t > 1) {\n throw new Error('threshold must be a number between 0 and 1 inclusively');\n }\n return t !== a[i - 1];\n });\n};\n\n\n/**\n * Accepts the rootMargin value from the user configuration object\n * and returns an array of the four margin values as an object containing\n * the value and unit properties. If any of the values are not properly\n * formatted or use a unit other than px or %, and error is thrown.\n * @private\n * @param {string=} opt_rootMargin An optional rootMargin value,\n * defaulting to '0px'.\n * @return {Array<Object>} An array of margin objects with the keys\n * value and unit.\n */\nIntersectionObserver.prototype._parseRootMargin = function(opt_rootMargin) {\n var marginString = opt_rootMargin || '0px';\n var margins = marginString.split(/\\s+/).map(function(margin) {\n var parts = /^(-?\\d*\\.?\\d+)(px|%)$/.exec(margin);\n if (!parts) {\n throw new Error('rootMargin must be specified in pixels or percent');\n }\n return {value: parseFloat(parts[1]), unit: parts[2]};\n });\n\n // Handles shorthand.\n margins[1] = margins[1] || margins[0];\n margins[2] = margins[2] || margins[0];\n margins[3] = margins[3] || margins[1];\n\n return margins;\n};\n\n\n/**\n * Starts polling for intersection changes if the polling is not already\n * happening, and if the page's visibility state is visible.\n * @private\n */\nIntersectionObserver.prototype._monitorIntersections = function() {\n if (!this._monitoringIntersections) {\n this._monitoringIntersections = true;\n\n // If a poll interval is set, use polling instead of listening to\n // resize and scroll events or DOM mutations.\n if (this.POLL_INTERVAL) {\n this._monitoringInterval = setInterval(\n this._checkForIntersections, this.POLL_INTERVAL);\n }\n else {\n addEvent(window, 'resize', this._checkForIntersections, true);\n addEvent(document, 'scroll', this._checkForIntersections, true);\n\n if (this.USE_MUTATION_OBSERVER && 'MutationObserver' in window) {\n this._domObserver = new MutationObserver(this._checkForIntersections);\n this._domObserver.observe(document, {\n attributes: true,\n childList: true,\n characterData: true,\n subtree: true\n });\n }\n }\n }\n};\n\n\n/**\n * Stops polling for intersection changes.\n * @private\n */\nIntersectionObserver.prototype._unmonitorIntersections = function() {\n if (this._monitoringIntersections) {\n this._monitoringIntersections = false;\n\n clearInterval(this._monitoringInterval);\n this._monitoringInterval = null;\n\n removeEvent(window, 'resize', this._checkForIntersections, true);\n removeEvent(document, 'scroll', this._checkForIntersections, true);\n\n if (this._domObserver) {\n this._domObserver.disconnect();\n this._domObserver = null;\n }\n }\n};\n\n\n/**\n * Scans each observation target for intersection changes and adds them\n * to the internal entries queue. If new entries are found, it\n * schedules the callback to be invoked.\n * @private\n */\nIntersectionObserver.prototype._checkForIntersections = function() {\n var rootIsInDom = this._rootIsInDom();\n var rootRect = rootIsInDom ? this._getRootRect() : getEmptyRect();\n\n this._observationTargets.forEach(function(item) {\n var target = item.element;\n var targetRect = getBoundingClientRect(target);\n var rootContainsTarget = this._rootContainsTarget(target);\n var oldEntry = item.entry;\n var intersectionRect = rootIsInDom && rootContainsTarget &&\n this._computeTargetAndRootIntersection(target, rootRect);\n\n var newEntry = item.entry = new IntersectionObserverEntry({\n time: now(),\n target: target,\n boundingClientRect: targetRect,\n rootBounds: rootRect,\n intersectionRect: intersectionRect\n });\n\n if (!oldEntry) {\n this._queuedEntries.push(newEntry);\n } else if (rootIsInDom && rootContainsTarget) {\n // If the new entry intersection ratio has crossed any of the\n // thresholds, add a new entry.\n if (this._hasCrossedThreshold(oldEntry, newEntry)) {\n this._queuedEntries.push(newEntry);\n }\n } else {\n // If the root is not in the DOM or target is not contained within\n // root but the previous entry for this target had an intersection,\n // add a new record indicating removal.\n if (oldEntry && oldEntry.isIntersecting) {\n this._queuedEntries.push(newEntry);\n }\n }\n }, this);\n\n if (this._queuedEntries.length) {\n this._callback(this.takeRecords(), this);\n }\n};\n\n\n/**\n * Accepts a target and root rect computes the intersection between then\n * following the algorithm in the spec.\n * TODO(philipwalton): at this time clip-path is not considered.\n * https://w3c.github.io/IntersectionObserver/#calculate-intersection-rect-algo\n * @param {Element} target The target DOM element\n * @param {Object} rootRect The bounding rect of the root after being\n * expanded by the rootMargin value.\n * @return {?Object} The final intersection rect object or undefined if no\n * intersection is found.\n * @private\n */\nIntersectionObserver.prototype._computeTargetAndRootIntersection =\n function(target, rootRect) {\n\n // If the element isn't displayed, an intersection can't happen.\n if (window.getComputedStyle(target).display == 'none') return;\n\n var targetRect = getBoundingClientRect(target);\n var intersectionRect = targetRect;\n var parent = getParentNode(target);\n var atRoot = false;\n\n while (!atRoot) {\n var parentRect = null;\n var parentComputedStyle = parent.nodeType == 1 ?\n window.getComputedStyle(parent) : {};\n\n // If the parent isn't displayed, an intersection can't happen.\n if (parentComputedStyle.display == 'none') return;\n\n if (parent == this.root || parent == document) {\n atRoot = true;\n parentRect = rootRect;\n } else {\n // If the element has a non-visible overflow, and it's not the <body>\n // or <html> element, update the intersection rect.\n // Note: <body> and <html> cannot be clipped to a rect that's not also\n // the document rect, so no need to compute a new intersection.\n if (parent != document.body &&\n parent != document.documentElement &&\n parentComputedStyle.overflow != 'visible') {\n parentRect = getBoundingClientRect(parent);\n }\n }\n\n // If either of the above conditionals set a new parentRect,\n // calculate new intersection data.\n if (parentRect) {\n intersectionRect = computeRectIntersection(parentRect, intersectionRect);\n\n if (!intersectionRect) break;\n }\n parent = getParentNode(parent);\n }\n return intersectionRect;\n};\n\n\n/**\n * Returns the root rect after being expanded by the rootMargin value.\n * @return {Object} The expanded root rect.\n * @private\n */\nIntersectionObserver.prototype._getRootRect = function() {\n var rootRect;\n if (this.root) {\n rootRect = getBoundingClientRect(this.root);\n } else {\n // Use <html>/<body> instead of window since scroll bars affect size.\n var html = document.documentElement;\n var body = document.body;\n rootRect = {\n top: 0,\n left: 0,\n right: html.clientWidth || body.clientWidth,\n width: html.clientWidth || body.clientWidth,\n bottom: html.clientHeight || body.clientHeight,\n height: html.clientHeight || body.clientHeight\n };\n }\n return this._expandRectByRootMargin(rootRect);\n};\n\n\n/**\n * Accepts a rect and expands it by the rootMargin value.\n * @param {Object} rect The rect object to expand.\n * @return {Object} The expanded rect.\n * @private\n */\nIntersectionObserver.prototype._expandRectByRootMargin = function(rect) {\n var margins = this._rootMarginValues.map(function(margin, i) {\n return margin.unit == 'px' ? margin.value :\n margin.value * (i % 2 ? rect.width : rect.height) / 100;\n });\n var newRect = {\n top: rect.top - margins[0],\n right: rect.right + margins[1],\n bottom: rect.bottom + margins[2],\n left: rect.left - margins[3]\n };\n newRect.width = newRect.right - newRect.left;\n newRect.height = newRect.bottom - newRect.top;\n\n return newRect;\n};\n\n\n/**\n * Accepts an old and new entry and returns true if at least one of the\n * threshold values has been crossed.\n * @param {?IntersectionObserverEntry} oldEntry The previous entry for a\n * particular target element or null if no previous entry exists.\n * @param {IntersectionObserverEntry} newEntry The current entry for a\n * particular target element.\n * @return {boolean} Returns true if a any threshold has been crossed.\n * @private\n */\nIntersectionObserver.prototype._hasCrossedThreshold =\n function(oldEntry, newEntry) {\n\n // To make comparing easier, an entry that has a ratio of 0\n // but does not actually intersect is given a value of -1\n var oldRatio = oldEntry && oldEntry.isIntersecting ?\n oldEntry.intersectionRatio || 0 : -1;\n var newRatio = newEntry.isIntersecting ?\n newEntry.intersectionRatio || 0 : -1;\n\n // Ignore unchanged ratios\n if (oldRatio === newRatio) return;\n\n for (var i = 0; i < this.thresholds.length; i++) {\n var threshold = this.thresholds[i];\n\n // Return true if an entry matches a threshold or if the new ratio\n // and the old ratio are on the opposite sides of a threshold.\n if (threshold == oldRatio || threshold == newRatio ||\n threshold < oldRatio !== threshold < newRatio) {\n return true;\n }\n }\n};\n\n\n/**\n * Returns whether or not the root element is an element and is in the DOM.\n * @return {boolean} True if the root element is an element and is in the DOM.\n * @private\n */\nIntersectionObserver.prototype._rootIsInDom = function() {\n return !this.root || containsDeep(document, this.root);\n};\n\n\n/**\n * Returns whether or not the target element is a child of root.\n * @param {Element} target The target element to check.\n * @return {boolean} True if the target element is a child of root.\n * @private\n */\nIntersectionObserver.prototype._rootContainsTarget = function(target) {\n return containsDeep(this.root || document, target);\n};\n\n\n/**\n * Adds the instance to the global IntersectionObserver registry if it isn't\n * already present.\n * @private\n */\nIntersectionObserver.prototype._registerInstance = function() {\n if (registry.indexOf(this) < 0) {\n registry.push(this);\n }\n};\n\n\n/**\n * Removes the instance from the global IntersectionObserver registry.\n * @private\n */\nIntersectionObserver.prototype._unregisterInstance = function() {\n var index = registry.indexOf(this);\n if (index != -1) registry.splice(index, 1);\n};\n\n\n/**\n * Returns the result of the performance.now() method or null in browsers\n * that don't support the API.\n * @return {number} The elapsed time since the page was requested.\n */\nfunction now() {\n return window.performance && performance.now && performance.now();\n}\n\n\n/**\n * Throttles a function and delays its execution, so it's only called at most\n * once within a given time period.\n * @param {Function} fn The function to throttle.\n * @param {number} timeout The amount of time that must pass before the\n * function can be called again.\n * @return {Function} The throttled function.\n */\nfunction throttle(fn, timeout) {\n var timer = null;\n return function () {\n if (!timer) {\n timer = setTimeout(function() {\n fn();\n timer = null;\n }, timeout);\n }\n };\n}\n\n\n/**\n * Adds an event handler to a DOM node ensuring cross-browser compatibility.\n * @param {Node} node The DOM node to add the event handler to.\n * @param {string} event The event name.\n * @param {Function} fn The event handler to add.\n * @param {boolean} opt_useCapture Optionally adds the even to the capture\n * phase. Note: this only works in modern browsers.\n */\nfunction addEvent(node, event, fn, opt_useCapture) {\n if (typeof node.addEventListener == 'function') {\n node.addEventListener(event, fn, opt_useCapture || false);\n }\n else if (typeof node.attachEvent == 'function') {\n node.attachEvent('on' + event, fn);\n }\n}\n\n\n/**\n * Removes a previously added event handler from a DOM node.\n * @param {Node} node The DOM node to remove the event handler from.\n * @param {string} event The event name.\n * @param {Function} fn The event handler to remove.\n * @param {boolean} opt_useCapture If the event handler was added with this\n * flag set to true, it should be set to true here in order to remove it.\n */\nfunction removeEvent(node, event, fn, opt_useCapture) {\n if (typeof node.removeEventListener == 'function') {\n node.removeEventListener(event, fn, opt_useCapture || false);\n }\n else if (typeof node.detatchEvent == 'function') {\n node.detatchEvent('on' + event, fn);\n }\n}\n\n\n/**\n * Returns the intersection between two rect objects.\n * @param {Object} rect1 The first rect.\n * @param {Object} rect2 The second rect.\n * @return {?Object} The intersection rect or undefined if no intersection\n * is found.\n */\nfunction computeRectIntersection(rect1, rect2) {\n var top = Math.max(rect1.top, rect2.top);\n var bottom = Math.min(rect1.bottom, rect2.bottom);\n var left = Math.max(rect1.left, rect2.left);\n var right = Math.min(rect1.right, rect2.right);\n var width = right - left;\n var height = bottom - top;\n\n return (width >= 0 && height >= 0) && {\n top: top,\n bottom: bottom,\n left: left,\n right: right,\n width: width,\n height: height\n };\n}\n\n\n/**\n * Shims the native getBoundingClientRect for compatibility with older IE.\n * @param {Element} el The element whose bounding rect to get.\n * @return {Object} The (possibly shimmed) rect of the element.\n */\nfunction getBoundingClientRect(el) {\n var rect;\n\n try {\n rect = el.getBoundingClientRect();\n } catch (err) {\n // Ignore Windows 7 IE11 \"Unspecified error\"\n // https://github.com/w3c/IntersectionObserver/pull/205\n }\n\n if (!rect) return getEmptyRect();\n\n // Older IE\n if (!(rect.width && rect.height)) {\n rect = {\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n left: rect.left,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n };\n }\n return rect;\n}\n\n\n/**\n * Returns an empty rect object. An empty rect is returned when an element\n * is not in the DOM.\n * @return {Object} The empty rect.\n */\nfunction getEmptyRect() {\n return {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n width: 0,\n height: 0\n };\n}\n\n/**\n * Checks to see if a parent element contains a child element (including inside\n * shadow DOM).\n * @param {Node} parent The parent element.\n * @param {Node} child The child element.\n * @return {boolean} True if the parent node contains the child node.\n */\nfunction containsDeep(parent, child) {\n var node = child;\n while (node) {\n if (node == parent) return true;\n\n node = getParentNode(node);\n }\n return false;\n}\n\n\n/**\n * Gets the parent node of an element or its host element if the parent node\n * is a shadow root.\n * @param {Node} node The node whose parent to get.\n * @return {Node|null} The parent node or null if no parent exists.\n */\nfunction getParentNode(node) {\n var parent = node.parentNode;\n\n if (parent && parent.nodeType == 11 && parent.host) {\n // If the parent is a shadow root, return the host element.\n return parent.host;\n }\n\n if (parent && parent.assignedSlot) {\n // If the parent is distributed in a <slot>, return the parent of a slot.\n return parent.assignedSlot.parentNode;\n }\n\n return parent;\n}\n\n\n// Exposes the constructors globally.\nwindow.IntersectionObserver = IntersectionObserver;\nwindow.IntersectionObserverEntry = IntersectionObserverEntry;\n\n}());\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
System.register(["./p-8a8f286f.system.js"],(function(e){"use strict";var t,i,r,n,o;return{setters:[function(e){t=e.r;i=e.c;r=e.h;n=e.H;o=e.g}],execute:function(){var a=e("taro_radio_core",function(){function e(e){var r=this;t(this,e);this.onChange=i(this,"radiochange",7);this.handleClick=function(e){e.stopPropagation();if(r.disabled)return;if(!r.checked)r.checked=true};this.name=undefined;this.value="";this.id=undefined;this.checked=false;this.disabled=false;this.nativeProps={};this.isWillLoadCalled=false}e.prototype.watchChecked=function(e){if(!this.isWillLoadCalled)return;e&&this.onChange.emit({value:this.value})};e.prototype.watchId=function(e){if(!this.isWillLoadCalled)return;if(e)this.inputEl.setAttribute("id",e)};e.prototype.componentDidRender=function(){this.id&&this.el.removeAttribute("id")};e.prototype.componentWillLoad=function(){this.isWillLoadCalled=true};e.prototype.render=function(){var e=this;var t=this,i=t.checked,o=t.name,a=t.value,u=t.disabled,c=t.nativeProps;return r(n,{className:"weui-cells_checkbox",onClick:this.handleClick},r("input",Object.assign({ref:function(t){if(!t)return;e.inputEl=t;if(e.id)t.setAttribute("id",e.id)},type:"radio",name:o,value:a,class:"weui-check",checked:i,disabled:u,onChange:function(e){return e.stopPropagation()}},c)),r("i",{class:"weui-icon-checked"}),r("slot",null))};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{checked:["watchChecked"],id:["watchId"]}},enumerable:false,configurable:true});return e}());var u=e("taro_radio_group_core",function(){function e(e){t(this,e);this.onChange=i(this,"change",7);this.uniqueName=Date.now().toString(36);this.name=undefined}e.prototype.function=function(e){e.stopPropagation();if(e.target.tagName!=="TARO-RADIO-CORE")return;var t=e.target;if(t.checked){var i=this.el.querySelectorAll("taro-radio-core");i.forEach((function(e){if(e!==t){e.checked=false}}));this.value=e.detail.value;this.onChange.emit({value:this.value})}};e.prototype.componentDidLoad=function(){var e=this;var t=this.el.querySelectorAll("taro-radio-core");t.forEach((function(t){t.setAttribute("name",e.name||e.uniqueName)}));Object.defineProperty(this.el,"value",{get:function(){if(!e.value){var t=e.el.querySelectorAll("taro-radio-core");e.value=e.getValues(t)}return e.value},configurable:true})};e.prototype.getValues=function(e){var t="";Array.from(e).forEach((function(e){var i=e.querySelector("input");if(i===null||i===void 0?void 0:i.checked){t=i.value||""}}));return t};e.prototype.render=function(){return r(n,{class:"weui-cells_radiogroup"})};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return e}())}}}));
|
|
2
|
+
//# sourceMappingURL=p-72f626ab.system.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["src/components/radio/radio.tsx","src/components/radio/radio-group.tsx"],"names":["Radio","exports","this","handleClick","e","stopPropagation","_this","disabled","checked","class_1","prototype","watchChecked","newVal","isWillLoadCalled","onChange","emit","value","watchId","inputEl","setAttribute","componentDidRender","id","el","removeAttribute","componentWillLoad","render","_a","name","nativeProps","h","Host","className","onClick","Object","assign","ref","dom","type","class","RadioGroup","uniqueName","Date","now","toString","class_2","function","target","tagName","childList","querySelectorAll","forEach","element","detail","componentDidLoad","defineProperty","get","childList_1","getValues","configurable","val","Array","from","checkbox","querySelector"],"mappings":"sKAKaA,EAAKC,EAAA,kBAAA,oFAsChBC,KAAAC,YAAc,SAACC,GACbA,EAAEC,kBACF,GAAIC,EAAKC,SAAU,OACnB,IAAKD,EAAKE,QAASF,EAAKE,QAAU,qCAtCpB,kCAEkC,oBACtB,uBACN,yBAEM,MAK5BC,EAAAC,UAAAC,aAAA,SAAcC,GACZ,IAAKV,KAAKW,iBAAkB,OAC5BD,GAAUV,KAAKY,SAASC,KAAK,CAAEC,MAAOd,KAAKc,SAI7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d,KAAKY,SAASC,KAAK,CACjBC,MAAOd,KAAKc,UAKlB4B,EAAAlC,UAAA2C,iBAAA,WAAA,IAAA/C,EAAAJ,KACE,IAAM8C,EAAY9C,KAAKoB,GAAG2B,iBAAiB,mBAE3CD,EAAUE,SAAQ,SAACC,GACjBA,EAAQhC,aAAa,OAAQb,EAAKqB,MAAQrB,EAAKkC,eAGjDP,OAAOqB,eAAepD,KAAKoB,GAAI,QAAS,CACtCiC,IAAK,WACH,IAAKjD,EAAKU,MAAO,CACf,IAAMwC,EAAYlD,EAAKgB,GAAG2B,iBAAiB,mBAC3C3C,EAAKU,MAAQV,EAAKmD,UAAUD,GAE9B,OAAOlD,EAAKU,OAEd0C,aAAc,QAIlBd,EAAAlC,UAAA+C,UAAA,SAAWT,GACT,IAAIW,EAAM,GACVC,MAAMC,KAAKb,GACRE,SAAQ,SAAAC,GACP,IAAMW,EAAoCX,EAAQY,cAAc,SAChE,GAAID,IAAQ,MAARA,SAAQ,OAAA,EAARA,EAAUtD,QAAS,CACrBmD,EAAMG,EAAS9C,OAAS,OAG9B,OAAO2C,GAGTf,EAAAlC,UAAAe,OAAA,WACE,OACEI,EAACC,EAAI,CAACQ,MAAM,gJArEK","sourcesContent":["import { Component, h, ComponentInterface, Prop, Event, EventEmitter, Host, Watch, Element, State } from '@stencil/core'\n\n@Component({\n tag: 'taro-radio-core'\n})\nexport class Radio implements ComponentInterface {\n private inputEl: HTMLInputElement\n @Prop() name: string\n @Prop() value = ''\n @Prop({ mutable: true }) id: string\n @Prop({ mutable: true, reflect: true }) checked = false\n @Prop() disabled: boolean = false\n @Prop() nativeProps = {}\n\n @State() isWillLoadCalled = false\n\n @Element() el: HTMLElement\n\n @Watch('checked')\n watchChecked (newVal) {\n if (!this.isWillLoadCalled) return\n newVal && this.onChange.emit({ value: this.value })\n }\n\n @Watch('id')\n watchId (newVal) {\n if (!this.isWillLoadCalled) return\n if (newVal) this.inputEl.setAttribute('id', newVal)\n }\n\n @Event({\n eventName: 'radiochange'\n })\n onChange: EventEmitter\n\n componentDidRender () {\n this.id && this.el.removeAttribute('id')\n }\n\n componentWillLoad () {\n this.isWillLoadCalled = true\n }\n\n handleClick = (e: Event) => {\n e.stopPropagation()\n if (this.disabled) return\n if (!this.checked) this.checked = true\n }\n\n render () {\n const { checked, name, value, disabled, nativeProps } = this\n\n return (\n <Host\n className='weui-cells_checkbox'\n onClick={this.handleClick}\n >\n <input\n ref={dom => {\n if (!dom) return\n this.inputEl = dom\n if (this.id) dom.setAttribute('id', this.id)\n }}\n type='radio'\n name={name}\n value={value}\n class='weui-check'\n checked={checked}\n disabled={disabled}\n onChange={e => e.stopPropagation()}\n {...nativeProps}\n />\n <i class='weui-icon-checked' />\n <slot />\n </Host>\n )\n }\n}\n","import { Component, h, ComponentInterface, Host, Prop, Event, EventEmitter, Listen, Element } from '@stencil/core'\n\n@Component({\n tag: 'taro-radio-group-core'\n})\nexport class RadioGroup implements ComponentInterface {\n private uniqueName = Date.now().toString(36)\n private value: string\n\n @Prop() name\n\n @Element() el: HTMLElement\n\n @Event({\n eventName: 'change'\n })\n onChange: EventEmitter\n\n @Listen('radiochange')\n function (e: CustomEvent<{ value: string }>) {\n e.stopPropagation()\n if ((e.target as Element).tagName !== 'TARO-RADIO-CORE') return\n\n const target = e.target as HTMLTaroRadioCoreElement\n if (target.checked) {\n const childList = this.el.querySelectorAll('taro-radio-core')\n\n childList.forEach(element => {\n if (element !== target) {\n element.checked = false\n }\n })\n\n this.value = e.detail.value\n\n this.onChange.emit({\n value: this.value\n })\n }\n }\n\n componentDidLoad () {\n const childList = this.el.querySelectorAll('taro-radio-core')\n\n childList.forEach((element) => {\n element.setAttribute('name', this.name || this.uniqueName)\n })\n\n Object.defineProperty(this.el, 'value', {\n get: () => {\n if (!this.value) {\n const childList = this.el.querySelectorAll('taro-radio-core')\n this.value = this.getValues(childList)\n }\n return this.value\n },\n configurable: true\n })\n }\n\n getValues (childList: NodeListOf<HTMLTaroRadioCoreElement>) {\n let val = ''\n Array.from(childList)\n .forEach(element => {\n const checkbox: HTMLInputElement | null = element.querySelector('input')\n if (checkbox?.checked) {\n val = checkbox.value || ''\n }\n })\n return val\n }\n\n render () {\n return (\n <Host class='weui-cells_radiogroup' />\n )\n }\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,i,r){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,n){function s(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r["throw"](e))}catch(e){n(e)}}function l(e){e.done?i(e.value):o(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(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},r,o,n,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,o&&(n=s[0]&2?o["return"]:s[0]?o["throw"]||((n=o["return"])&&n.call(o),0):o.next)&&!(n=n.call(o,s[1])).done)return n;if(o=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;o=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(n=i.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){i.label=s[1];break}if(s[0]===6&&i.label<n[1]){i.label=n[1];n=s;break}if(n&&i.label<n[2]){i.label=n[2];i.ops.push(s);break}if(n[2])i.ops.pop();i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e];o=0}finally{r=n=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,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))};System.register(["./p-8a8f286f.system.js","./p-61f225ef.system.js","./p-663d1bb9.system.js"],(function(e,t){"use strict";var i,r,o,n,s,a,l;return{setters:[function(e){i=e.r;r=e.h;o=e.H;n=e.g;s=e.c},function(e){a=e.c},function(e){l=e.t}],execute:function(){var u=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 c=function(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))};var d=function(e){return Math.max(-1,Math.min(e,1))};var h="default";var g=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 o=t.length;var n={};for(;r<o;r++){e=t[r];if(e&&e[1]in document){for(r=0;r<e.length;r++){n[t[0][r]]=e[r]}return n}}if(!n[t[0][0]]){h="iOS";for(r=0;r<i.length;r++){n[t[0][r]]=i[r]}}return n}();var f=function(e){return/\.(m3u8)($|\?)/i.test(e)};var p=e("taro_video_control",function(){function e(e){var t=this;i(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=u(e);return[2]}))}))};e.prototype.render=function(){var e=this;var t=this,i=t.controls,n=t.currentTime,s=t.duration,a=t.isPlaying,l=t.pauseFunc,c=t.playFunc,d=t.showPlayBtn,h=t.showProgress;var g=u(s);var f;if(!d){f=null}else if(a){f=r("div",{class:"taro-video-control-button taro-video-control-button-pause",onClick:l})}else{f=r("div",{class:"taro-video-control-button taro-video-control-button-play",onClick:c})}return r(o,{class:"taro-video-bar taro-video-bar-full"},i&&r("div",{class:"taro-video-controls"},f,h&&r("div",{class:"taro-video-current-time",ref:function(t){return e.currentTimeRef=t}},u(n)),h&&r("div",{class:"taro-video-progress-container",onClick:this.onClickProgress},r("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}},r("div",{class:"taro-video-progress-buffered",style:{width:"100%"}}),r("div",{class:"taro-video-ball",ref:function(t){return e.progressBallRef=t},onTouchStart:this.onDragProgressBallStart,style:{left:"".concat(g?this.currentTime/s*100:0,"%")}},r("div",{class:"taro-video-inner"})))),h&&r("div",{class:"taro-video-duration"},g)),r("slot",null))};Object.defineProperty(e.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return e}());var A='.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,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAGAGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDAgNzkuMTYwNDUxLCAyMDE3LzA1LzA2LTAxOjA4OjIxICAgICAgICAiPiA8c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IuI9cBJ4WKiartJf9nWV/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/qAVcCdzi1vgZOBZ4PWvNGAG6wgYCW0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BJOYTVJFQcVY3wCFeKUjVGyYfQWB00+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 v=e("taro_video_core",function(){function e(e){var r=this;i(this,e);this.onPlay=s(this,"play",7);this.onPause=s(this,"pause",7);this.onEnded=s(this,"ended",7);this.onTimeUpdate=s(this,"timeupdate",7);this.onError=s(this,"error",7);this.onFullScreenChange=s(this,"fullscreenchange",7);this.onProgress=s(this,"progress",7);this.onLoadedMetaData=s(this,"loadedmetadata",7);this.currentTime=0;this.isDraggingProgress=false;this.gestureType="none";this.analyzeGesture=function(e){var t;var i={type:"none"};var o=e.touches[0].screenX;var n=e.touches[0].screenY;var s=o-r.lastTouchScreenX;var a=n-r.lastTouchScreenY;var l=r.isFullScreen?r.vslideGestureInFullscreen:r.vslideGesture;if(r.gestureType==="none"){var u=c(s,a);if(u<10)return i;if(Math.abs(a)>=Math.abs(s)){if(l){r.gestureType="adjustVolume";r.lastVolume=r.videoRef.volume}else{return i}}else if(Math.abs(a)<Math.abs(s)){if(r.enableProgressGesture){r.gestureType="adjustProgress";r.lastPercentage=r.currentTime/((t=r.duration)!==null&&t!==void 0?t:r._duration)}else{return i}}}i.type=r.gestureType;i.dataX=d(s/200);i.dataY=d(a/200);return i};this.loadNativePlayer=function(){var e,t;if(r.videoRef){r.videoRef.src=r.src;(t=(e=r.videoRef).load)===null||t===void 0?void 0:t.call(e)}};this.init=function(){var e=r,i=e.src,o=e.videoRef;if(f(i)){t.import("./p-1743a04b.system.js").then((function(e){return e.h})).then((function(e){var t=e.default;r.HLS=t;if(t.isSupported()){if(r.hls){r.hls.destroy()}r.hls=new t;r.hls.loadSource(i);r.hls.attachMedia(o);r.hls.on(t.Events.MANIFEST_PARSED,(function(){r.autoplay&&r.play()}));r.hls.on(t.Events.ERROR,(function(e,t){r.handleError(t)}))}else if(o.canPlayType("application/vnd.apple.mpegurl")){r.loadNativePlayer()}else{console.error("该浏览器不支持 HLS 播放")}}))}else{r.loadNativePlayer()}};this.handlePlay=function(){r.isPlaying=true;r.isFirst=false;r.controlsRef.toggleVisibility(true);r.onPlay.emit()};this.handlePause=function(){r.isPlaying=false;r.controlsRef.toggleVisibility(true);r.onPause.emit()};this.handleEnded=function(){r.isFirst=true;r.pause();r.controlsRef.toggleVisibility();r.onEnded.emit()};this.handleTimeUpdate=l((function(e){return __awaiter(r,void 0,void 0,(function(){var t,i,r,o;return __generator(this,(function(n){switch(n.label){case 0:this.currentTime=this.videoRef.currentTime;r=this.duration||this._duration;return[4,this.controlsRef.getIsDraggingProgressBall()];case 1:o=n.sent();if(this.controls&&this.showProgress){if(!o&&!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 t,i;if(r.hls){switch(e.type){case r.HLS.ErrorTypes.NETWORK_ERROR:r.onError.emit({errMsg:e.response});r.hls.startLoad();break;case r.HLS.ErrorTypes.MEDIA_ERROR:r.onError.emit({errMsg:e.reason||"媒体错误,请重试"});r.hls.recoverMediaError();break}}else{r.onError.emit({errMsg:(i=(t=e.target)===null||t===void 0?void 0:t.error)===null||i===void 0?void 0:i.message})}};this.handleDurationChange=function(){r._duration=r.videoRef.duration};this.handleProgress=function(){r.onProgress.emit()};this.handleLoadedMetaData=function(e){var t=e.target;r.onLoadedMetaData.emit({width:t.videoWidth,height:t.videoHeight,duration:t.duration})};this._play=function(){return r.videoRef.play()};this._pause=function(){return r.videoRef.pause()};this._stop=function(){r.videoRef.pause();r._seek(0)};this._seek=function(e){r.videoRef.currentTime=e};this.onTouchStartContainer=function(e){r.lastTouchScreenX=e.touches[0].screenX;r.lastTouchScreenY=e.touches[0].screenY};this.onClickContainer=function(){if(r.enablePlayGesture){var e=Date.now();if(e-r.lastClickedTime<300){r.isPlaying?r.pause():r.play()}r.lastClickedTime=e}r.controlsRef.toggleVisibility()};this.onClickFullScreenBtn=function(e){e.stopPropagation();r.toggleFullScreen()};this.handleFullScreenChange=function(e){var t=(new Date).getTime();if(!e.detail&&r.isFullScreen&&!document[g.fullscreenElement]&&t-r.fullScreenTimestamp>100){r.toggleFullScreen(false)}};this.toggleFullScreen=function(e){if(e===void 0){e=!r.isFullScreen}r.isFullScreen=e;r.controlsRef.toggleVisibility(true);r.fullScreenTimestamp=(new Date).getTime();r.onFullScreenChange.emit({fullScreen:r.isFullScreen,direction:"vertical"});if(r.isFullScreen&&!document[g.fullscreenElement]){setTimeout((function(){r.videoRef[g.requestFullscreen]({navigationUI:"auto"})}),0)}};this.toggleMute=function(e){e.stopPropagation();r.videoRef.muted=!r.isMute;r.controlsRef.toggleVisibility(true);r.isMute=!r.isMute};this.toggleDanmu=function(e){e.stopPropagation();r.controlsRef.toggleVisibility(true);r._enableDanmu=!r._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(g.fullscreenchange,this.handleFullScreenChange)}if(this.videoRef&&h==="iOS"){this.videoRef.addEventListener("webkitendfullscreen",this.handleFullScreenChange)}};e.prototype.componentDidRender=function(){};e.prototype.disconnectedCallback=function(){if(document.removeEventListener){document.removeEventListener(g.fullscreenchange,this.handleFullScreenChange)}if(this.videoRef&&h==="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(o){switch(o.label){case 0:if(this.lastTouchScreenX===undefined||this.lastTouchScreenY===undefined)return[2];return[4,this.controlsRef.getIsDraggingProgressBall()];case 1:if(o.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(u(this.nextPercentage*r)," / ").concat(u(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,n=t.autoplay,s=t.loop,l=t.muted,c=t.poster,d=t.objectFit,h=t.isFirst,g=t.isMute,f=t.isFullScreen,p=t.showCenterPlayBtn,A=t.isPlaying,v=t._enableDanmu,m=t.showMuteBtn,b=t.danmuBtn,y=t.showFullscreenBtn,w=t.nativeProps;var E=this.duration||this._duration;var T=u(E);return r(o,{class:a("taro-video-container",{"taro-video-type-fullscreen":f}),onTouchStart:this.onTouchStartContainer,onClick:this.onClickContainer},r("video",Object.assign({class:"taro-video-video",style:{"object-fit":d},ref:function(t){if(t){e.videoRef=t}},autoplay:n,loop:s,muted:l,poster:i?c: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},w),"暂时不支持播放该视频"),r("taro-video-danmu",{ref:function(t){if(t){e.danmuRef=t}},enable:v}),h&&p&&!A&&r("div",{class:"taro-video-cover"},r("div",{class:"taro-video-cover-play-button",onClick:function(){return e.play()}}),r("p",{class:"taro-video-cover-duration"},T)),r("taro-video-control",{ref:function(t){if(t){e.controlsRef=t}},controls:i,currentTime:this.currentTime,duration:E,isPlaying:this.isPlaying,pauseFunc:this._pause,playFunc:this._play,seekFunc:this._seek,showPlayBtn:this.showPlayBtn,showProgress:this.showProgress},m&&r("div",{class:a("taro-video-mute",{"taro-video-type-mute":g}),onClick:this.toggleMute}),b&&r("div",{class:a("taro-video-danmu-button",{"taro-video-danmu-button-active":v}),onClick:this.toggleDanmu},"弹幕"),y&&r("div",{class:a("taro-video-fullscreen",{"taro-video-type-fullscreen":f}),onClick:this.onClickFullScreenBtn})),r("div",{class:"taro-video-toast taro-video-toast-volume",ref:function(t){if(t){e.toastVolumeRef=t}}},r("div",{class:"taro-video-toast-title"},"音量"),r("div",{class:"taro-video-toast-icon"}),r("div",{class:"taro-video-toast-value"},r("div",{class:"taro-video-toast-value-content",ref:function(t){if(t){e.toastVolumeBarRef=t}}},r("div",{class:"taro-video-toast-volume-grids"},Array(10).fill(1).map((function(){return r("div",{class:"taro-video-toast-volume-grids-item"})})))))),r("div",{class:"taro-video-toast taro-video-toast-progress",ref:function(t){if(t){e.toastProgressRef=t}}},r("div",{class:"taro-video-toast-title",ref:function(t){if(t){e.toastProgressTitleRef=t}}})))};Object.defineProperty(e.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{enableDanmu:["watchEnableDanmu"],src:["watchSrc"]}},enumerable:false,configurable:true});return e}());v.style=A;var m=e("taro_video_danmu",function(){function e(e){i(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,o;return __generator(this,(function(n){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;o=this.danmuList;if(i.length!==o.length){r=true}else{r=i.some((function(e){var t=e.key;return o.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 r(o,{class:"taro-video-danmu"},this.danmuList.map((function(t){var i=t.text,o=t.color,n=t.bottom,s=t.key;return r("p",{class:"taro-video-danmu-item",key:s,style:{color:o,bottom:n},ref:function(t){if(t){e.danmuElList.push(t)}}},i)})))};return e}())}}}));
|
|
2
|
+
//# sourceMappingURL=p-755be847.system.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["src/components/video/utils.ts","src/components/video/video-control.tsx","src/components/video/style/index.scss?tag=taro-video-core","src/components/video/video.tsx","src/components/video/video-danmu.tsx"],"names":["formatTime","time","sec","Math","round","min","concat","calcDist","x","y","sqrt","pow","normalizeNumber","number","max","scene","screenFn","val","fnMap","defaultIOSMap","i","l","length","ret","document","isHls","url","test","VideoControl","exports","this","visible","isDraggingProgressBall","percentage","progressDimensions","left","width","calcPercentage","pageX","pos","_this","onDragProgressBallStart","hideControlsTimer","clearTimeout","onClickProgress","e","stopPropagation","seekFunc","duration","toggleVisibility","class_1","prototype","onDocumentTouchMove","touchX","touches","setProgressBall","setCurrentTime","onDocumentTouchEnd","progressBallRef","style","nextVisible","undefined","isPlaying","setTimeout","el","visibility","getIsDraggingProgressBall","currentTimeRef","innerHTML","render","_c","controls","currentTime","pauseFunc","playFunc","showPlayBtn","showProgress","formattedDuration","playBtn","h","class","onClick","Host","ref","dom","rect","getBoundingClientRect","onTouchStart","indexCss","Video","isDraggingProgress","gestureType","analyzeGesture","obj","type","nowX","screenX","nowY","screenY","distX","lastTouchScreenX","distY","lastTouchScreenY","enableVslideGesture","isFullScreen","vslideGestureInFullscreen","vslideGesture","dist","abs","lastVolume","videoRef","volume","enableProgressGesture","lastPercentage","_a","_duration","dataX","dataY","loadNativePlayer","src","_b","load","call","init","module","import","then","n","Hls","default","HLS","isSupported","hls","destroy","loadSource","attachMedia","on","Events","MANIFEST_PARSED","autoplay","play","ERROR","_","data","handleError","canPlayType","console","error","handlePlay","isFirst","controlsRef","onPlay","emit","handlePause","onPause","handleEnded","pause","onEnded","handleTimeUpdate","throttle","__awaiter","isControlDragging","sent","danmuRef","tick","onTimeUpdate","target","seek","ErrorTypes","NETWORK_ERROR","onError","errMsg","response","startLoad","MEDIA_ERROR","reason","recoverMediaError","message","handleDurationChange","handleProgress","onProgress","handleLoadedMetaData","onLoadedMetaData","videoWidth","height","videoHeight","_play","_pause","_stop","_seek","position","onTouchStartContainer","onClickContainer","enablePlayGesture","now","Date","lastClickedTime","onClickFullScreenBtn","toggleFullScreen","handleFullScreenChange","timestamp","getTime","detail","fullscreenElement","fullScreenTimestamp","onFullScreenChange","fullScreen","direction","requestFullscreen","navigationUI","toggleMute","muted","isMute","toggleDanmu","_enableDanmu","class_2","componentWillLoad","enableDanmu","componentDidLoad","initialTime","sendDanmu","danmuList","addEventListener","fullscreenchange","componentDidRender","disconnectedCallback","removeEventListener","watchEnableDanmu","newVal","watchSrc","gestureObj","toastVolumeRef","nextVolume","toastVolumeBarRef","nextPercentage","toastProgressTitleRef","toastProgressRef","stop","requestFullScreen","exitFullScreen","loop","poster","objectFit","showCenterPlayBtn","showMuteBtn","danmuBtn","showFullscreenBtn","nativeProps","durationTime","classNames","taro-video-type-fullscreen","Object","assign","object-fit","playsinline","webkit-playsinline","onDurationChange","enable","taro-video-type-mute","taro-video-danmu-button-active","Array","fill","map","VideoDanmu","list","danmuElList","class_3","ensureProperties","danmu","clonedDanmu","key","random","bottom","isArray","__spreadArray","newDanmuList","filter","shouldUpdate","oldDanmuList","some","every","componentDidUpdate","requestAnimationFrame","splice","forEach","webkitTransform","transform","text","color","push"],"mappings":"26DAAO,IAAMA,EAAa,SAACC,GACzB,IAAKA,EAAM,MAAO,GAClB,IAAMC,EAAMC,KAAKC,MAAMH,EAAO,IAC9B,IAAMI,EAAMF,KAAKC,OAAOH,EAAOC,GAAO,IACtC,MAAO,GAAAI,OAAGD,EAAM,GAAK,IAAAC,OAAID,GAAQA,EAAG,KAAAC,OAAIJ,EAAM,GAAK,IAAAI,OAAIJ,GAAQA,IAG1D,IAAMK,EAAW,SAACC,EAAWC,GAClC,OAAON,KAAKO,KAAKP,KAAKQ,IAAIH,EAAG,GAAKL,KAAKQ,I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mB,SAAQ,SAAAhB,GAClBA,EAAMjN,MAAMxB,KAAO,IACnByO,EAAMjN,MAAMkO,gBAAkB,oBAC9BjB,EAAMjN,MAAMmO,UAAY,8BAMhCpB,EAAAvN,UAAAkB,OAAA,WAAA,IAAA7B,EAAAV,KACE,IAAKA,KAAKmO,OAAQ,MAAO,GAEzB,OACElL,EAACG,EAAI,CAACF,MAAM,oBACTlD,KAAK+L,UAAUyC,KAAI,SAAChM,OAAEyN,EAAIzN,EAAAyN,KAAEC,EAAK1N,EAAA0N,MAAEhB,EAAM1M,EAAA0M,OAAEF,EAAGxM,EAAAwM,IAAE,OAC/C/L,EAAA,IAAA,CACEC,MAAM,wBACN8L,IAAKA,EACLnN,MAAO,CACLqO,MAAKA,EACLhB,OAAMA,GAER7L,IAAK,SAAAA,GACH,GAAIA,EAAK,CACP3C,EAAKiO,YAAYwB,KAAK9M,MAIzB4M,iBAlGU","sourcesContent":["export const formatTime = (time?: number): string => {\r\n if (!time) return ''\r\n const sec = Math.round(time % 60)\r\n const min = Math.round((time - sec) / 60)\r\n return `${min < 10 ? `0${min}` : min}:${sec < 10 ? `0${sec}` : sec}`\r\n}\r\n\r\nexport const calcDist = (x: number, y: number): number => {\r\n return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2))\r\n}\r\n\r\nexport const normalizeNumber = (number: number): number => {\r\n return Math.max(-1, Math.min(number, 1))\r\n}\r\n\r\nexport let scene = 'default'\r\n\r\nexport const screenFn = (function () {\r\n let val\r\n const fnMap = [\r\n [\r\n 'requestFullscreen',\r\n 'exitFullscreen',\r\n 'fullscreenElement',\r\n 'fullscreenEnabled',\r\n 'fullscreenchange',\r\n 'fullscreenerror'\r\n ],\r\n // New WebKit\r\n [\r\n 'webkitRequestFullscreen',\r\n 'webkitExitFullscreen',\r\n 'webkitFullscreenElement',\r\n 'webkitFullscreenEnabled',\r\n 'webkitfullscreenchange',\r\n 'webkitfullscreenerror'\r\n ],\r\n // Old WebKit\r\n [\r\n 'webkitRequestFullScreen',\r\n 'webkitCancelFullScreen',\r\n 'webkitCurrentFullScreenElement',\r\n 'webkitCancelFullScreen',\r\n 'webkitfullscreenchange',\r\n 'webkitfullscreenerror'\r\n ],\r\n [\r\n 'mozRequestFullScreen',\r\n 'mozCancelFullScreen',\r\n 'mozFullScreenElement',\r\n 'mozFullScreenEnabled',\r\n 'mozfullscreenchange',\r\n 'mozfullscreenerror'\r\n ],\r\n [\r\n 'msRequestFullscreen',\r\n 'msExitFullscreen',\r\n 'msFullscreenElement',\r\n 'msFullscreenEnabled',\r\n 'MSFullscreenChange',\r\n 'MSFullscreenError'\r\n ]\r\n ]\r\n var defaultIOSMap = [\r\n 'webkitEnterFullscreen',\r\n 'webkitExitFullscreen',\r\n 'webkitCurrentFullScreenElement',\r\n 'webkitSupportsFullscreen',\r\n 'fullscreenchange',\r\n 'fullscreenerror'\r\n ]\r\n let i = 0\r\n const l = fnMap.length\r\n const ret: Record<string, any> = {}\r\n // This for loop essentially checks the current document object for the property/methods above.\r\n for (; i < l; i++) {\r\n val = fnMap[i]\r\n if (val && val[1] in document) {\r\n for (i = 0; i < val.length; i++) {\r\n ret[fnMap[0][i]] = val[i]\r\n }\r\n return ret\r\n }\r\n }\r\n if (!ret[fnMap[0][0]]) {\r\n scene = 'iOS'\r\n // when there is no any APIs be set.\r\n\r\n // In IOS, there is no 'webkitEnterFullscreen' property `in document` but video can use it for fullscreen.\r\n // ref: https://developer.apple.com/documentation/webkitjs/htmlvideoelement/1633500-webkitenterfullscreen\r\n for (i = 0; i < defaultIOSMap.length; i++) {\r\n ret[fnMap[0][i]] = defaultIOSMap[i]\r\n }\r\n }\r\n // If it doesn't find any of them, this whole function returns {}\r\n // and the fn variable is set to this returned value.\r\n return ret\r\n})()\r\n\r\nexport const isHls = url => /\\.(m3u8)($|\\?)/i.test(url)\r\n","import { Component, h, ComponentInterface, Prop, Host, Element, Listen, Method } from '@stencil/core'\nimport { formatTime } from './utils'\n\n@Component({\n tag: 'taro-video-control'\n})\nexport class VideoControl implements ComponentInterface {\n private currentTimeRef: HTMLDivElement\n private progressBallRef: HTMLDivElement\n private visible = false\n private isDraggingProgressBall = false\n private hideControlsTimer: ReturnType<typeof setTimeout>\n private percentage = 0\n private progressDimensions = {\n left: 0,\n width: 0\n }\n\n @Element() el: HTMLElement\n\n @Prop() controls: boolean\n @Prop() currentTime: number\n @Prop() duration: number\n @Prop() isPlaying: boolean\n @Prop() pauseFunc: () => void\n @Prop() playFunc: () => void\n @Prop() seekFunc: (position: number) => void\n @Prop() showPlayBtn: boolean\n @Prop() showProgress: boolean\n\n @Listen('touchmove', {\n target: 'document'\n })\n onDocumentTouchMove (e: TouchEvent) {\n if (!this.isDraggingProgressBall) return\n const touchX = e.touches[0].pageX\n this.percentage = this.calcPercentage(touchX)\n this.setProgressBall(this.percentage)\n this.setCurrentTime(this.percentage * this.duration)\n }\n\n @Listen('touchend', {\n target: 'document'\n })\n @Listen('touchcancel', {\n target: 'document'\n })\n onDocumentTouchEnd () {\n if (!this.isDraggingProgressBall) return\n\n this.isDraggingProgressBall = false\n this.seekFunc(this.percentage * this.duration)\n this.toggleVisibility(true)\n }\n\n @Method()\n async setProgressBall (percentage: number) {\n if (this.progressBallRef) {\n this.progressBallRef.style.left = `${percentage * 100}%`\n }\n }\n\n @Method()\n async toggleVisibility (nextVisible?: boolean) {\n const visible = nextVisible === undefined ? !this.visible : nextVisible\n if (visible) {\n this.hideControlsTimer && clearTimeout(this.hideControlsTimer)\n if (this.isPlaying) {\n this.hideControlsTimer = setTimeout(() => {\n this.toggleVisibility(false)\n }, 2000)\n }\n this.el.style.visibility = 'visible'\n } else {\n this.el.style.visibility = 'hidden'\n }\n this.visible = !!visible\n }\n\n @Method()\n async getIsDraggingProgressBall () {\n return this.isDraggingProgressBall\n }\n\n @Method()\n async setCurrentTime (time: number) {\n this.currentTimeRef.innerHTML = formatTime(time)\n }\n\n calcPercentage = (pageX: number): number => {\n let pos = pageX - this.progressDimensions.left\n pos = Math.max(pos, 0)\n pos = Math.min(pos, this.progressDimensions.width)\n return pos / this.progressDimensions.width\n }\n\n onDragProgressBallStart = () => {\n this.isDraggingProgressBall = true\n this.hideControlsTimer && clearTimeout(this.hideControlsTimer)\n }\n\n onClickProgress = (e: MouseEvent) => {\n e.stopPropagation()\n\n const percentage = this.calcPercentage(e.pageX)\n this.seekFunc(percentage * this.duration)\n this.toggleVisibility(true)\n }\n\n render () {\n const {\n controls,\n currentTime,\n duration,\n isPlaying,\n pauseFunc,\n playFunc,\n showPlayBtn,\n showProgress\n } = this\n\n const formattedDuration = formatTime(duration)\n let playBtn\n\n if (!showPlayBtn) {\n playBtn = null\n } else if (isPlaying) {\n playBtn = <div class='taro-video-control-button taro-video-control-button-pause' onClick={pauseFunc} />\n } else {\n playBtn = <div class='taro-video-control-button taro-video-control-button-play' onClick={playFunc} />\n }\n\n return (\n <Host class='taro-video-bar taro-video-bar-full'>\n {controls && (\n <div class='taro-video-controls'>\n {playBtn}\n {showProgress && (\n <div class='taro-video-current-time' ref={dom => (this.currentTimeRef = dom as HTMLDivElement)}>\n {formatTime(currentTime)}\n </div>\n )}\n {showProgress && (\n <div class='taro-video-progress-container' onClick={this.onClickProgress}>\n <div\n class='taro-video-progress'\n ref={ref => {\n if (!ref) return\n const rect = ref.getBoundingClientRect()\n this.progressDimensions.left = rect.left\n this.progressDimensions.width = rect.width\n }}>\n <div class='taro-video-progress-buffered' style={{ width: '100%' }} />\n <div\n class='taro-video-ball'\n ref={dom => (this.progressBallRef = dom as HTMLDivElement)}\n onTouchStart={this.onDragProgressBallStart}\n style={{\n left: `${formattedDuration ? (this.currentTime / duration) * 100 : 0}%`\n }}\n >\n <div class='taro-video-inner' />\n </div>\n </div>\n </div>\n )}\n {showProgress && <div class='taro-video-duration'>{formattedDuration}</div>}\n </div>\n )}\n <slot />\n </Host>\n )\n }\n}\n","@charset \"UTF-8\";\n\n.taro-video {\n display: inline-block;\n overflow: hidden;\n position: relative;\n width: 100%;\n height: 225px;\n line-height: 0;\n}\n\n.taro-video[hidden] {\n display: none;\n}\n\n.taro-video-container {\n display: inline-block;\n\n // NOTE: video 元素父节点设置该属性会导致 iOS 元素层级问题 https://stackoverflow.com/questions/49653475/video-and-z-index-inside-scaled-element-some-divs-disappear\n // overflow: hidden;\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: #000;\n object-position: inherit;\n}\n\n.taro-video-container.taro-video-type-fullscreen {\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n z-index: 999;\n}\n\n.taro-video-container.taro-video-type-fullscreen.taro-video-type-rotate-left {\n transform: translate(-50%, -50%) rotate(-90deg);\n}\n\n.taro-video-container.taro-video-type-fullscreen.taro-video-type-rotate-right {\n transform: translate(-50%, -50%) rotate(90deg);\n}\n\n.taro-video-video {\n width: 100%;\n height: 100%;\n object-position: inherit;\n}\n\n.taro-video-cover {\n display: flex;\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n z-index: 1;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n background-color: rgb(1 1 1 / 50%);\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -webkit-box-pack: center;\n -webkit-box-align: center;\n}\n\n.taro-video-cover-play-button {\n width: 40px;\n height: 40px;\n background-repeat: no-repeat;\n background-position: 50% 50%;\n background-size: 50%;\n}\n\n.taro-video-cover-duration {\n margin-top: 10px;\n line-height: 1;\n font-size: 16px;\n color: #fff;\n}\n\n.taro-video-bar {\n display: flex;\n visibility: hidden;\n overflow: hidden;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 1;\n align-items: center;\n padding: 0 10px;\n height: 44px;\n background-color: rgb(0 0 0 / 50%);\n -webkit-box-align: center;\n}\n\n.taro-video-bar.taro-video-bar-full {\n left: 0;\n}\n\n.taro-video-controls {\n display: flex;\n -webkit-box-flex: 1;\n flex-grow: 1;\n margin: 0 8.5px;\n}\n\n.taro-video-control-button {\n box-sizing: content-box;\n margin-left: -8.5px;\n padding: 14.5px 12.5px;\n width: 13px;\n height: 15px;\n}\n\n.taro-video-control-button::after {\n display: block;\n width: 100%;\n height: 100%;\n background-repeat: no-repeat;\n background-position: 50% 50%;\n background-size: 100%;\n content: \"\";\n}\n\n.taro-video-control-button.taro-video-control-button-play::after,\n.taro-video-cover-play-button {\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAeCAYAAAAy2w7YAAAAAXNSR0IArs4c6QAAAWhJREFUSA1j+P///0cgBoHjQGzCQCsAtgJB/AMy5wCxGNXtQ9iBwvoA5BUCMQvVLEQxHpNzDSjkRhXLMM3GKrIeKKpEkYVYjcUu+AMo3ALE3GRZiN1MvKKPgbIRJFuG10j8koeA0gZEW4jfLIKyf4EqpgOxMEELCRpFnIJ3QGU5QMyM00LizCFa1SWgSkeslhFtBGkKVwGVy6FYSJp+klR/A6quB2JOkIWMIK0oNlOf8xBoZDE9LAI7nYn6HsBq4l96WHQEaLUpAyiOaASeAM2NgvuPBpaACt82IEYtfKls0UagecpwXyAzqGTRdaA57sjmYrAptAjUsCkGYlYMg9EFyLQI1IiZB8Ti6Obh5JNh0QmgHlOcBuKSIMGi50C18UDMiMssvOJEWPQLqKYbiHnxGkRIkoBF24DyaoTMIEoeh0W3geI+RBlArCI0iz4D+RVAzEasfqLVAQ19AcSg5LoYiKWI1kiiQgCMBLnEEcfDSgAAAABJRU5ErkJggg==\");\n}\n\n.taro-video-control-button.taro-video-control-button-pause::after {\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAgCAYAAAAffCjxAAAAAXNSR0IArs4c6QAAAFlJREFUSA3tksEKACAIQ7X//5zq98wOgQayum8QaGweHhMzG/6OujzKAymn+0LMqivu1XznWmX8/echTIyMyAgTwA72iIwwAexgj8gIE8CO3aMRbDPMaEy5BRGaKcZv8YxRAAAAAElFTkSuQmCC\");\n}\n\n.taro-video-current-time,\n.taro-video-duration {\n margin-top: 15px;\n margin-bottom: 14.5px;\n height: 14.5px;\n line-height: 14.5px;\n font-size: 12px;\n color: #cbcbcb;\n}\n\n.taro-video-progress-container {\n position: relative;\n flex-grow: 2;\n -webkit-box-flex: 2;\n}\n\n.taro-video-progress {\n position: relative;\n margin: 21px 12px;\n height: 2px;\n background-color: hsl(0deg 0% 100% / 40%);\n}\n\n.taro-video-progress-buffered {\n position: absolute;\n left: 0;\n top: 0;\n width: 0;\n height: 100%;\n background-color: hsl(0deg 0% 100% / 80%);\n transition: width 0.1s;\n}\n\n.taro-video-ball {\n position: absolute;\n left: 0;\n top: -21px;\n box-sizing: content-box;\n margin-left: -22px;\n padding: 14px;\n width: 16px;\n height: 16px;\n}\n\n.taro-video-inner {\n border-radius: 50%;\n width: 100%;\n height: 100%;\n background-color: #fff;\n}\n\n.taro-video-danmu-button {\n margin: 0 8.5px;\n padding: 2px 10px;\n border: 1px solid #fff;\n border-radius: 5px;\n line-height: 1;\n font-size: 13px;\n color: #fff;\n white-space: nowrap;\n}\n\n.taro-video-danmu-button.taro-video-danmu-button-active {\n border-color: #48c23d;\n color: #48c23d;\n}\n\n.taro-video-fullscreen,\n.taro-video-mute {\n box-sizing: content-box;\n padding: 8.5px;\n width: 17px;\n height: 17px;\n background-repeat: no-repeat;\n background-position: 50% 50%;\n background-size: 50%;\n}\n\n.taro-video-fullscreen {\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAhUlEQVRYR+2WSwrAMAhEnZO3PfmULLooGEFTiIXJ2s/kRY2wzQeb85sE9CRA8jSzY1YfAFzhJBnU1AVgxH2dSiArCnD9QgGzRNnOech48SRABHoSyFb5in3PSbhyo6yvCPQkEM3u7BsPe/0FIvBfAh/vhKmVbO9SWun1qk/PSVi9TcVPBG6R1YIhgWwNpQAAAABJRU5ErkJggg==\");\n}\n\n.taro-video-fullscreen.taro-video-type-fullscreen {\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCA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6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5PmxYVAAACLklEQVRYhc2XP2sVQRRHz40hKoqaQgVBCy1EozFlGiVFxMLGh4piYWEh+hkEP4YKAVFEEFTyughaCH6DqIVpAhYWEgIxoJE8cywyi5tNHu/tJmvyg2WZO3dmzt47/zZUtoJ6Nhsg09YDiYhKDzACTAFNYH9lEpUq80TdrT5wpV5n/ZV9KoGoo+pXV2uyKkipOaLuUceAt8DhUvQd1FsCYhR4ChzaSIBMHSOi7lOfsByFWiCgEBH1GHAF2JlMPcBt4GC3HUYEaj9wF3gVEVPtfNVTwAXgWX7CDKq/1piAZTSZBmim8qJ6sQ3EgDqb/L7kU3MH2NHtl3dQX3r3Ak21UYAYAj4A/cl0JB+RF+uMRj4iQ+p8zt7KYFLdXKHuRi0gacBhV6a6pd5bA6KRNagFJPU9qv5u47toLmW1HnoR8Q5oAK1CVQu4FBHj/wUkaXsb+4pzpVaQFPqXrN7Be4Fx9VztIOr1BLEtmX4A94E/qdwHTKjDWYM6lu81dSlnn3V570BtuLxaMs2rZ/IgYxsBovaoPwsQA4VoFWEm8ql5DiysNyURsQTMpOIMcDYiPhd8xoGr/FtNC2G6FKXD6ihwGdiVHMoeeh8jYlA9ANwE3kTEp3bO6vE03qOONzR1r/q4RGrquaFFxFxE3ALOA9+6jExpdb180y55AhirhaRTatq0GXEzL8+ZIuI9cBJ4WKiartJf9nWV/mty7UfUafW7erpqRGI9EBuprffvu9n6C1KOmsqwI5A1AAAAAElFTkSuQmCC\");\n}\n\n.taro-video-danmu {\n overflow: visible;\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n margin-top: 14px;\n margin-bottom: 44px;\n width: 100%;\n line-height: 14px;\n font-size: 14px;\n}\n\n.taro-video-danmu-item {\n position: absolute;\n left: 100%;\n line-height: 1;\n color: #fff;\n white-space: nowrap;\n transform: translateX(0);\n transition-property: left, transform;\n transition-duration: 3s;\n transition-timing-function: linear;\n}\n\n.taro-video-toast {\n display: block;\n visibility: hidden;\n position: absolute;\n left: 50%;\n top: 50%;\n border-radius: 5px;\n background-color: hsl(0deg 0% 100% / 80%);\n pointer-events: none;\n color: #000;\n transform: translate(-50%, -50%);\n}\n\n.taro-video-toast.taro-video-toast-volume {\n display: block;\n width: 100px;\n height: 100px;\n}\n\n.taro-video-toast-volume .taro-video-toast-title {\n display: block;\n margin-top: 10px;\n width: 100%;\n line-height: 16px;\n text-align: center;\n font-size: 12px;\n}\n\n.taro-video-toast-volume .taro-video-toast-icon {\n display: block;\n margin-left: 25%;\n width: 50%;\n height: 50%;\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAFhklEQVR4Xu2aeaxfQxTHP1VBES0NIQitWtpaaxeCUkQtaYVa0tiClAq1ExIiQTVppaWxt8RWSa2tWkJQRGgtQaSIpUKEpG0ssbbk28yV2+mZO/e9e3vvu/e98897mZnfzPl+75mZs0wvurn06ub46SGgxwLqZaA3sB/wO/A+8G/V6tS5BU4BJgJbO9DvAMOB36okoQ4CNgAeBEYbQK8Bbm4zAdsBc4EdAyA/APZoKwHHAA8DG2UA/AnYrG0ErAVcD1yXA9gfQJ8c40obsqbPgH7AY8CROTVuFQFD3X7fJid4DWsNAWOAGZ0w58YTsDZwKzChA189PbTRBGwKzAYO6iT4srbAMHfTfAksjulS1iG4JzAH2Dy2YKS/qAVcCdzi1vgZOBZ4PWvNGAG6wgYCW0IwctzNmf06BcEXtYABwOeA4otEfgEOdnGGqV6IAAUopwM6zDYuAVjeKYpYwCjgCWOhH513+b2lhE+Avrj89NPyalzyuCIE6EN9BfQ1dHoPOAD40+9LE6D/5aoqSqtLsgiQC60DTiHzfGCFoaSsQAexZdlTgEuyCDgLuK8u5G7dEAHyKN8CBrtxLwDHAX8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I1BCQg9dJESYq8LnbrCBAR8t50Lig6i0krCRBoVWhVlt45wkBrCRBuRZyPuAguxIPe9lXqhpd9DcZMXOvdkPF0Xu/8dohNUmZ/1QQkuitXr+d4fryuFx3jywQYm6suAqSX8vLTXKJDt4QqO6rtLYspXWZ/nQQkOJTAUJZGIav19q9MvKvN1RUIWKMAY5P3EBBjqO393d4C/gMVHwRQlpx21QAAAABJRU5ErkJggg==\");\n background-repeat: no-repeat;\n background-position: 50% 50%;\n background-size: 50%;\n fill: #000;\n}\n\n.taro-video-toast-volume .taro-video-toast-value {\n margin-left: 10px;\n margin-top: 5px;\n width: 80px;\n height: 5px;\n}\n\n.taro-video-toast-volume .taro-video-toast-value > .taro-video-toast-value-content {\n overflow: hidden;\n}\n\n.taro-video-toast-volume-grids {\n width: 80px;\n height: 5px;\n}\n\n.taro-video-toast-volume-grids-item {\n float: left;\n width: 7.1px;\n height: 5px;\n background-color: #000;\n}\n\n.taro-video-toast-volume-grids-item:not(:first-child) {\n margin-left: 1px;\n}\n\n.taro-video-toast.taro-video-toast-progress {\n padding: 6px;\n background-color: rgb(0 0 0 / 80%);\n line-height: 18px;\n font-size: 14px;\n color: #fff;\n}\n","import { Component, h, ComponentInterface, Prop, State, Event, EventEmitter, Host, Watch, Listen, Element, Method } from '@stencil/core'\nimport classNames from 'classnames'\n\nimport { throttle } from '../../utils'\nimport {\n formatTime,\n calcDist,\n normalizeNumber,\n screenFn,\n isHls,\n scene\n} from './utils'\n\nimport type HLS from 'hls.js'\n\n@Component({\n tag: 'taro-video-core',\n styleUrl: './style/index.scss'\n})\nexport class Video implements ComponentInterface {\n private videoRef: HTMLVideoElement\n private controlsRef: HTMLTaroVideoControlElement\n private danmuRef: HTMLTaroVideoDanmuElement\n private toastProgressRef: HTMLDivElement\n private toastProgressTitleRef: HTMLDivElement\n private toastVolumeRef: HTMLDivElement\n private toastVolumeBarRef: HTMLDivElement\n private currentTime = 0\n private lastClickedTime: number\n private lastTouchScreenX: number | undefined\n private lastTouchScreenY: number | undefined\n private isDraggingProgress = false\n private lastVolume: number\n private lastPercentage: number\n private nextPercentage: number\n private gestureType = 'none'\n private HLS: typeof HLS\n private hls: HLS\n\n @Element() el: HTMLTaroVideoCoreElement\n\n /**\n * 要播放视频的资源地址\n */\n @Prop() src: string\n\n /**\n * 指定视频时长\n */\n @Prop() duration: number\n\n /**\n * 是否显示默认播放控件(播放/暂停按钮、播放进度、时间)\n */\n @Prop() controls = true\n\n /**\n * 是否自动播放\n */\n @Prop() autoplay = false\n\n /**\n * 是否循环播放\n */\n @Prop() loop = false\n\n /**\n * 是否静音播放\n */\n @Prop() muted = false\n\n /**\n * 指定视频初始播放位置\n */\n @Prop() initialTime = 0\n\n /**\n * 视频封面的图片网络资源地址或云文件ID(2.3.0)。若 controls 属性值为 false 则设置 poster 无效\n */\n @Prop() poster: string\n\n /**\n * 当视频大小与 video 容器大小不一致时,视频的表现形式\n */\n @Prop() objectFit: 'contain' | 'fill' | 'cover' = 'contain'\n\n /**\n * 若不设置,宽度大于 240 时才会显示\n */\n @Prop() showProgress = true\n\n /**\n * 是否显示全屏按钮\n */\n @Prop() showFullscreenBtn = true\n\n /**\n * 是否显示视频底部控制栏的播放按钮\n */\n @Prop() showPlayBtn = true\n\n /**\n * 是否显示视频中间的播放按钮\n */\n @Prop() showCenterPlayBtn = true\n\n /**\n * 是否显示静音按钮\n */\n @Prop() showMuteBtn = false\n\n /**\n * 弹幕列表\n */\n @Prop() danmuList: []\n\n /**\n * 是否显示弹幕按钮\n */\n @Prop() danmuBtn = false\n\n /**\n * 是否展示弹幕\n */\n @Prop() enableDanmu = false\n\n /**\n * 是否开启播放手势,即双击切换播放/暂停\n */\n @Prop() enablePlayGesture = false\n\n /**\n * 是否开启控制进度的手势\n */\n @Prop() enableProgressGesture = true\n\n /**\n * 在非全屏模式下,是否开启亮度与音量调节手势\n */\n @Prop() vslideGesture = false\n\n /**\n * 在全屏模式下,是否开启亮度与音量调节手势\n */\n @Prop() vslideGestureInFullscreen = true\n\n @Prop() nativeProps = {}\n\n @State() _duration: number\n @State() _enableDanmu = false\n @State() isPlaying = false\n @State() isFirst = true\n @State() isFullScreen = false\n @State() fullScreenTimestamp = new Date().getTime()\n @State() isMute = false\n\n @Event({\n eventName: 'play'\n }) onPlay: EventEmitter\n\n @Event({\n eventName: 'pause'\n }) onPause: EventEmitter\n\n @Event({\n eventName: 'ended'\n }) onEnded: EventEmitter\n\n @Event({\n eventName: 'timeupdate'\n }) onTimeUpdate: EventEmitter\n\n @Event({\n eventName: 'error'\n }) onError: EventEmitter\n\n @Event({\n eventName: 'fullscreenchange'\n }) onFullScreenChange: EventEmitter\n\n @Event({\n eventName: 'progress'\n }) onProgress: EventEmitter\n\n @Event({\n eventName: 'loadedmetadata'\n }) onLoadedMetaData: EventEmitter\n\n componentWillLoad () {\n this._enableDanmu = this.enableDanmu\n }\n\n componentDidLoad () {\n this.init()\n if (this.initialTime) {\n this.videoRef.currentTime = this.initialTime\n }\n // 目前只支持 danmuList 初始化弹幕列表,还未支持更新弹幕列表\n this.danmuRef.sendDanmu?.(this.danmuList)\n\n if (document.addEventListener) {\n document.addEventListener(screenFn.fullscreenchange, this.handleFullScreenChange)\n }\n if (this.videoRef && scene === 'iOS') {\n // NOTE: iOS 场景下 fullscreenchange 并不会在退出全屏状态下触发,仅 webkitpresentationmodechanged 与 webkitendfullscreen 可替代\n this.videoRef.addEventListener('webkitendfullscreen', this.handleFullScreenChange)\n }\n }\n\n componentDidRender () {\n }\n\n disconnectedCallback () {\n if (document.removeEventListener) {\n document.removeEventListener(screenFn.fullscreenchange, this.handleFullScreenChange)\n }\n if (this.videoRef && scene === 'iOS') {\n this.videoRef.removeEventListener('webkitendfullscreen', this.handleFullScreenChange)\n }\n }\n\n @Watch('enableDanmu')\n watchEnableDanmu (newVal) {\n this._enableDanmu = newVal\n }\n\n @Watch('src')\n watchSrc () {\n this.init()\n }\n\n analyzeGesture = (e: TouchEvent) => {\n const obj: {\n type: string\n dataX?: number\n dataY?: number\n } = {\n type: 'none'\n }\n const nowX = e.touches[0].screenX\n const nowY = e.touches[0].screenY\n const distX = nowX - (this.lastTouchScreenX as number)\n const distY = nowY - (this.lastTouchScreenY as number)\n const enableVslideGesture = this.isFullScreen ? this.vslideGestureInFullscreen : this.vslideGesture\n\n if (this.gestureType === 'none') {\n // 两点间距离\n const dist = calcDist(distX, distY)\n\n // 没有移动\n if (dist < 10) return obj\n\n if (Math.abs(distY) >= Math.abs(distX)) {\n // 垂直方向移动:调整音量\n if (enableVslideGesture) {\n this.gestureType = 'adjustVolume'\n this.lastVolume = this.videoRef.volume\n } else {\n return obj\n }\n } else if (Math.abs(distY) < Math.abs(distX)) {\n // 水平方向移动:调整进度\n if (this.enableProgressGesture) {\n this.gestureType = 'adjustProgress'\n this.lastPercentage = this.currentTime / (this.duration ?? this._duration)\n } else {\n return obj\n }\n }\n }\n obj.type = this.gestureType\n obj.dataX = normalizeNumber(distX / 200)\n obj.dataY = normalizeNumber(distY / 200)\n return obj\n }\n\n @Listen('touchmove', {\n target: 'document'\n })\n async onDocumentTouchMove (e: TouchEvent) {\n if (this.lastTouchScreenX === undefined || this.lastTouchScreenY === undefined) return\n if (await this.controlsRef.getIsDraggingProgressBall()) return\n\n const gestureObj = this.analyzeGesture(e)\n if (gestureObj.type === 'adjustVolume') {\n this.toastVolumeRef.style.visibility = 'visible'\n const nextVolume = Math.max(Math.min(this.lastVolume - gestureObj.dataY!, 1), 0)\n this.videoRef.volume = nextVolume\n this.toastVolumeBarRef.style.width = `${nextVolume * 100}%`\n } else if (gestureObj.type === 'adjustProgress') {\n this.isDraggingProgress = true\n this.nextPercentage = Math.max(Math.min(this.lastPercentage + (gestureObj.dataX || 0), 1), 0)\n if (this.controls && this.showProgress) {\n this.controlsRef.setProgressBall(this.nextPercentage)\n this.controlsRef.toggleVisibility(true)\n }\n const duration = this.duration || this._duration\n this.toastProgressTitleRef.innerHTML = `${formatTime(this.nextPercentage * duration)} / ${formatTime(duration)}`\n this.toastProgressRef.style.visibility = 'visible'\n }\n }\n\n @Listen('touchend', {\n target: 'document'\n })\n @Listen('touchcancel', {\n target: 'document'\n })\n onDocumentTouchEnd () {\n if (this.gestureType === 'adjustVolume') {\n this.toastVolumeRef.style.visibility = 'hidden'\n } else if (this.gestureType === 'adjustProgress') {\n this.toastProgressRef.style.visibility = 'hidden'\n }\n\n if (this.isDraggingProgress) {\n this.isDraggingProgress = false\n this.seek(this.nextPercentage * (this.duration ?? this._duration))\n }\n\n this.gestureType = 'none'\n this.lastTouchScreenX = undefined\n this.lastTouchScreenY = undefined\n }\n\n loadNativePlayer = () => {\n if (this.videoRef) {\n this.videoRef.src = this.src\n this.videoRef.load?.()\n }\n }\n\n init = () => {\n const { src, videoRef } = this\n\n\n if (isHls(src)) {\n import('hls.js').then(e => {\n const Hls = e.default\n this.HLS = Hls\n if (Hls.isSupported()) {\n if (this.hls) {\n this.hls.destroy()\n }\n this.hls = new Hls()\n this.hls.loadSource(src)\n this.hls.attachMedia(videoRef)\n this.hls.on(Hls.Events.MANIFEST_PARSED, () => {\n this.autoplay && this.play()\n })\n this.hls.on(Hls.Events.ERROR, (_, data) => {\n this.handleError(data)\n })\n } else if (videoRef.canPlayType('application/vnd.apple.mpegurl')) {\n this.loadNativePlayer()\n } else {\n console.error('该浏览器不支持 HLS 播放')\n }\n })\n } else {\n this.loadNativePlayer()\n }\n }\n\n handlePlay = () => {\n this.isPlaying = true\n this.isFirst = false\n this.controlsRef.toggleVisibility(true)\n this.onPlay.emit()\n }\n\n handlePause = () => {\n this.isPlaying = false\n this.controlsRef.toggleVisibility(true)\n this.onPause.emit()\n }\n\n handleEnded = () => {\n this.isFirst = true\n this.pause()\n this.controlsRef.toggleVisibility()\n this.onEnded.emit()\n }\n\n handleTimeUpdate = throttle(async e => {\n this.currentTime = this.videoRef.currentTime\n const duration = this.duration || this._duration\n\n const isControlDragging = await this.controlsRef.getIsDraggingProgressBall()\n if (this.controls && this.showProgress) {\n if (!isControlDragging && !this.isDraggingProgress) {\n this.controlsRef.setProgressBall(this.currentTime / duration)\n this.controlsRef.setCurrentTime(this.currentTime)\n }\n }\n\n this.danmuRef.tick(this.currentTime)\n\n this.onTimeUpdate.emit({\n duration: e.target?.duration,\n currentTime: e.target?.currentTime\n })\n\n if (this.duration) {\n if (this.currentTime >= this.duration) {\n this.seek(0)\n this.handleEnded()\n }\n }\n }, 250)\n\n handleError = e => {\n if (this.hls) {\n switch (e.type) {\n case this.HLS.ErrorTypes.NETWORK_ERROR:\n // try to recover network error\n this.onError.emit({ errMsg: e.response })\n this.hls.startLoad()\n break\n case this.HLS.ErrorTypes.MEDIA_ERROR:\n this.onError.emit({ errMsg: e.reason || '媒体错误,请重试' })\n this.hls.recoverMediaError()\n break\n default:\n break\n }\n } else {\n this.onError.emit({\n errMsg: e.target?.error?.message,\n })\n }\n }\n\n handleDurationChange = () => {\n this._duration = this.videoRef.duration\n }\n\n handleProgress = () => {\n this.onProgress.emit()\n }\n\n handleLoadedMetaData = (e: Event) => {\n const target = e.target as HTMLVideoElement\n this.onLoadedMetaData.emit({\n width: target.videoWidth,\n height: target.videoHeight,\n duration: target.duration\n })\n }\n\n /** 播放视频 */\n @Method()\n async play () {\n this._play()\n }\n\n _play = () => this.videoRef.play()\n\n /** 暂停视频 */\n @Method()\n async pause () {\n this._pause()\n }\n\n _pause = () => this.videoRef.pause()\n\n /** 停止视频 */\n @Method()\n async stop () {\n this._stop()\n }\n\n _stop = () => {\n this.videoRef.pause()\n this._seek(0)\n }\n\n /** 跳转到指定位置 */\n @Method()\n async seek (position: number) {\n this._seek(position)\n }\n\n _seek = (position: number) => {\n this.videoRef.currentTime = position\n }\n\n /** 进入全屏。若有自定义内容需在全屏时展示,需将内容节点放置到 video 节点内。 */\n @Method()\n async requestFullScreen () {\n this.toggleFullScreen(true)\n }\n\n /** 退出全屏 */\n @Method()\n async exitFullScreen () {\n this.toggleFullScreen(false)\n }\n\n onTouchStartContainer = (e: TouchEvent) => {\n this.lastTouchScreenX = e.touches[0].screenX\n this.lastTouchScreenY = e.touches[0].screenY\n }\n\n onClickContainer = () => {\n if (this.enablePlayGesture) {\n const now = Date.now()\n if (now - this.lastClickedTime < 300) {\n // 双击\n this.isPlaying ? this.pause() : this.play()\n }\n this.lastClickedTime = now\n }\n this.controlsRef.toggleVisibility()\n }\n\n onClickFullScreenBtn = (e: MouseEvent) => {\n e.stopPropagation()\n this.toggleFullScreen()\n }\n\n handleFullScreenChange = e => {\n // 全屏后,\"退出\"走的是浏览器事件,在此同步状态\n const timestamp = new Date().getTime()\n if (!e.detail && this.isFullScreen && !document[screenFn.fullscreenElement] && timestamp - this.fullScreenTimestamp > 100) {\n this.toggleFullScreen(false)\n }\n }\n\n toggleFullScreen = (isFullScreen = !this.isFullScreen) => {\n this.isFullScreen = isFullScreen // this.videoRef?.['webkitDisplayingFullscreen']\n this.controlsRef.toggleVisibility(true)\n this.fullScreenTimestamp = new Date().getTime()\n this.onFullScreenChange.emit({\n fullScreen: this.isFullScreen,\n direction: 'vertical'\n })\n if (this.isFullScreen && !document[screenFn.fullscreenElement]) {\n setTimeout(() => {\n this.videoRef[screenFn.requestFullscreen]({ navigationUI: 'auto' })\n }, 0)\n }\n }\n\n toggleMute = (e: MouseEvent) => {\n e.stopPropagation()\n this.videoRef.muted = !this.isMute\n this.controlsRef.toggleVisibility(true)\n this.isMute = !this.isMute\n }\n\n toggleDanmu = (e: MouseEvent) => {\n e.stopPropagation()\n this.controlsRef.toggleVisibility(true)\n this._enableDanmu = !this._enableDanmu\n }\n\n render () {\n const {\n controls,\n autoplay,\n loop,\n muted,\n poster,\n objectFit,\n isFirst,\n isMute,\n isFullScreen,\n showCenterPlayBtn,\n isPlaying,\n _enableDanmu,\n showMuteBtn,\n danmuBtn,\n showFullscreenBtn,\n nativeProps\n } = this\n const duration = this.duration || this._duration\n const durationTime = formatTime(duration)\n\n return (\n <Host\n class={classNames('taro-video-container', {\n 'taro-video-type-fullscreen': isFullScreen\n })}\n onTouchStart={this.onTouchStartContainer}\n onClick={this.onClickContainer}\n >\n <video\n class='taro-video-video'\n style={{\n 'object-fit': objectFit\n }}\n ref={dom => {\n if (dom) {\n this.videoRef = dom as HTMLVideoElement\n }\n }}\n autoplay={autoplay}\n loop={loop}\n muted={muted}\n poster={controls ? poster : undefined}\n playsinline\n webkit-playsinline\n onPlay={this.handlePlay}\n onPause={this.handlePause}\n onEnded={this.handleEnded}\n onTimeUpdate={this.handleTimeUpdate}\n onError={this.handleError}\n onDurationChange={this.handleDurationChange}\n onProgress={this.handleProgress}\n onLoadedMetaData={this.handleLoadedMetaData}\n {...nativeProps}\n >\n 暂时不支持播放该视频\n </video>\n\n <taro-video-danmu\n ref={dom => {\n if (dom) {\n this.danmuRef = dom as HTMLTaroVideoDanmuElement\n }\n }}\n enable={_enableDanmu}\n />\n\n {isFirst && showCenterPlayBtn && !isPlaying && (\n <div class='taro-video-cover'>\n <div class='taro-video-cover-play-button' onClick={() => this.play()} />\n <p class='taro-video-cover-duration'>{durationTime}</p>\n </div>\n )}\n\n <taro-video-control\n ref={dom => {\n if (dom) {\n this.controlsRef = dom\n }\n }}\n controls={controls}\n currentTime={this.currentTime}\n duration={duration}\n isPlaying={this.isPlaying}\n pauseFunc={this._pause}\n playFunc={this._play}\n seekFunc={this._seek}\n showPlayBtn={this.showPlayBtn}\n showProgress={this.showProgress}\n >\n {showMuteBtn && (\n <div\n class={classNames('taro-video-mute', {\n 'taro-video-type-mute': isMute\n })}\n onClick={this.toggleMute}\n />\n )}\n {danmuBtn && (\n <div\n class={classNames('taro-video-danmu-button', {\n 'taro-video-danmu-button-active': _enableDanmu\n })}\n onClick={this.toggleDanmu}>\n 弹幕\n </div>\n )}\n {showFullscreenBtn && (\n <div\n class={classNames('taro-video-fullscreen', {\n 'taro-video-type-fullscreen': isFullScreen\n })}\n onClick={this.onClickFullScreenBtn}\n />\n )}\n </taro-video-control>\n\n <div class='taro-video-toast taro-video-toast-volume' ref={dom => {\n if (dom) {\n this.toastVolumeRef = dom\n }\n }}>\n <div class='taro-video-toast-title'>音量</div>\n <div class='taro-video-toast-icon' />\n <div class='taro-video-toast-value'>\n <div class='taro-video-toast-value-content' ref={dom => {\n if (dom) {\n this.toastVolumeBarRef = dom\n }\n }}>\n <div class='taro-video-toast-volume-grids'>\n {Array(10).fill(1).map(() => (\n <div class='taro-video-toast-volume-grids-item' />\n ))}\n </div>\n </div>\n </div>\n </div>\n\n <div class='taro-video-toast taro-video-toast-progress' ref={dom => {\n if (dom) {\n this.toastProgressRef = dom\n }\n }}>\n <div class='taro-video-toast-title' ref={dom => {\n if (dom) {\n this.toastProgressTitleRef = dom\n }\n }} />\n </div>\n </Host>\n )\n }\n}\n","import { Component, h, ComponentInterface, Prop, State, Host, Method } from '@stencil/core'\n\nexport interface Danmu {\n text: string\n color: string\n time: number,\n key: number,\n bottom: string\n}\n\n@Component({\n tag: 'taro-video-danmu'\n})\nexport class VideoDanmu implements ComponentInterface {\n private list: Danmu[] = []\n private danmuElList: HTMLParagraphElement[] = []\n private currentTime = 0\n\n @Prop() enable = false\n\n @State() danmuList: Danmu[] = []\n\n ensureProperties (danmu: Partial<Danmu>): Danmu {\n const clonedDanmu = { ...danmu } as Danmu\n if (!('time' in danmu)) {\n clonedDanmu.time = this.currentTime\n }\n clonedDanmu.key = Math.random()\n clonedDanmu.bottom = `${Math.random() * 90 + 5}%`\n return clonedDanmu\n }\n\n @Method()\n async sendDanmu (danmuList: Partial<Danmu> | Partial<Danmu>[] = []) {\n if (Array.isArray(danmuList)) {\n this.list = [\n ...this.list,\n ...danmuList.map(danmu => this.ensureProperties(danmu))\n ]\n } else {\n const danmu = danmuList\n this.list = [\n ...this.list,\n { ...this.ensureProperties(danmu) }\n ]\n }\n }\n\n @Method()\n async tick (currentTime: number) {\n this.currentTime = currentTime\n\n if (!this.enable) return\n\n const danmuList = this.list\n\n /**\n * @todo 这个判断对拖拽进度的处理不严谨\n */\n const newDanmuList = danmuList.filter(({ time }) => {\n return currentTime - time < 4 && currentTime > time\n })\n let shouldUpdate = false\n const oldDanmuList = this.danmuList\n\n if (newDanmuList.length !== oldDanmuList.length) {\n shouldUpdate = true\n } else {\n shouldUpdate = newDanmuList.some(({ key }) => {\n return oldDanmuList.every((danmu) => {\n return key !== danmu.key\n })\n })\n }\n if (shouldUpdate) {\n this.danmuList = newDanmuList\n }\n }\n\n componentDidUpdate () {\n requestAnimationFrame(() => {\n setTimeout(() => {\n const danmuElList = this.danmuElList.splice(0)\n danmuElList.forEach(danmu => {\n danmu.style.left = '0'\n danmu.style.webkitTransform = 'translateX(-100%)'\n danmu.style.transform = 'translateX(-100%)'\n })\n })\n })\n }\n\n render () {\n if (!this.enable) return ''\n\n return (\n <Host class='taro-video-danmu'>\n {this.danmuList.map(({ text, color, bottom, key }) => (\n <p\n class='taro-video-danmu-item'\n key={key}\n style={{\n color,\n bottom\n }}\n ref={ref => {\n if (ref) {\n this.danmuElList.push(ref)\n }\n }}\n >\n {text}\n </p>\n ))}\n </Host>\n )\n }\n}\n"]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
var e="undefined"
|
|
1
|
+
var e=typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e["default"]:e}function r(e,n,r){return r={path:n,exports:{},require:function(e,n){return i()}},e(r,r.exports),r.exports}function i(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var o=r((function(e){
|
|
2
2
|
/*!
|
|
3
3
|
Copyright (c) 2018 Jed Watson.
|
|
4
4
|
Licensed under the MIT License (MIT), see
|
|
5
5
|
http://jedwatson.github.io/classnames
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
(function(){var n={}.hasOwnProperty;function r(){var e=[];for(var i=0;i<arguments.length;i++){var o=arguments[i];if(!o)continue;var f=typeof o;if(f==="string"||f==="number"){e.push(o)}else if(Array.isArray(o)){if(o.length){var t=r.apply(null,o);if(t){e.push(t)}}}else if(f==="object"){if(o.toString===Object.prototype.toString){for(var u in o){if(n.call(o,u)&&o[u]){e.push(u)}}}else{e.push(o.toString())}}}return e.join(" ")}if(e.exports){r.default=r;e.exports=r}else{window.classNames=r}})()}));export{r as a,e as b,o as c,n as g};
|
|
8
|
+
//# sourceMappingURL=p-76724e58.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../node_modules/.pnpm/registry.npmjs.org+classnames@2.3.1/node_modules/classnames/index.js"],"names":["hasOwn","hasOwnProperty","classNames","classes","i","arguments","length","arg","argType","push","Array","isArray","inner","apply","toString","Object","prototype","key","call","join","module","exports","default","window"],"mappings":";;;;;;CAOC,WAGA,IAAIA,EAAS,GAAGC,eAEhB,SAASC,IACR,IAAIC,EAAU,GAEd,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAC1C,IAAIG,EAAMF,UAAUD,GACpB,IAAKG,EAAK,SAEV,IAAIC,SAAiBD,EAErB,GAAIC,IAAY,UAAYA,IAAY,SAAU,CACjDL,EAAQM,KAAKF,QACP,GAAIG,MAAMC,QAAQJ,GAAM,CAC9B,GAAIA,EAAID,OAAQ,CACf,IAAIM,EAAQV,EAAWW,MAAM,KAAMN,GACnC,GAAIK,EAAO,CACVT,EAAQM,KAAKG,UAGT,GAAIJ,IAAY,SAAU,CAChC,GAAID,EAAIO,WAAaC,OAAOC,UAAUF,SAAU,CAC/C,IAAK,IAAIG,KAAOV,EAAK,CACpB,GAAIP,EAAOkB,KAAKX,EAAKU,IAAQV,EAAIU,GAAM,CACtCd,EAAQM,KAAKQ,SAGT,CACNd,EAAQM,KAAKF,EAAIO,cAKpB,OAAOX,EAAQgB,KAAK,KAGrB,GAAqCC,EAAOC,QAAS,CACpDnB,EAAWoB,QAAUpB,EACrBkB,EAAAC,QAAiBnB,MAMX,CACNqB,OAAOrB,WAAaA,IAhDtB","sourcesContent":["/*!\n Copyright (c) 2018 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString === Object.prototype.toString) {\n\t\t\t\t\tfor (var key in arg) {\n\t\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as o,c as t,h as r,H as e,g as a}from"./p-5bfefd19.js";import{c as i}from"./p-76724e58.js";const n='taro-button-core{display:block;overflow:hidden;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;margin-left:auto;margin-right:auto;padding-left:14px;padding-right:14px;border-width:0;border-radius:5px;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;background-color:#f8f8f8;line-height:2.55555556;text-decoration:none;text-align:center;font-size:18px;color:#000;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}taro-button-core:focus{outline:0}taro-button-core:not([disabled]):active{background-color:#dedede;color:rgba(0, 0, 0, 0.6)}taro-button-core::after{position:absolute;left:0;top:0;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid rgba(0, 0, 0, 0.2);border-radius:10px;width:200%;height:200%;content:" ";-webkit-transform:scale(0.5);transform:scale(0.5);-webkit-transform-origin:0 0;transform-origin:0 0}taro-button-core+taro-button-core{margin-top:15px}taro-button-core[type=default]{background-color:#f8f8f8;color:#000}taro-button-core[type=default]:not([disabled]):visited{color:#000}taro-button-core[type=default]:not([disabled]):active{background-color:#dedede;color:rgba(0, 0, 0, 0.6)}taro-button-core[size=mini]{display:inline-block;padding:0 1.32em;width:auto;line-height:2.3;font-size:13px}taro-button-core[plain],taro-button-core[plain][type=default],taro-button-core[plain][type=primary]{border-width:1px;background-color:transparent}taro-button-core[disabled]{color:rgba(255, 255, 255, 0.6)}taro-button-core[disabled][type=default]{background-color:#f7f7f7;color:rgba(0, 0, 0, 0.3)}taro-button-core[disabled][type=primary]{background-color:#9ed99d}taro-button-core[disabled][type=warn]{background-color:#ec8b89}taro-button-core[loading] .weui-loading{margin:-0.2em 0.34em 0 0}taro-button-core[loading][type=primary],taro-button-core[loading][type=warn]{color:rgba(255, 255, 255, 0.6)}taro-button-core[loading][type=primary]{background-color:#179b16}taro-button-core[loading][type=warn]{background-color:#ce3c39}taro-button-core[plain][type=primary]{border:1px solid #1aad19;color:#1aad19}taro-button-core[plain][type=primary]:not([disabled]):active{border-color:rgba(26, 173, 25, 0.6);background-color:transparent;color:rgba(26, 173, 25, 0.6)}taro-button-core[plain][type=primary]::after{border-width:0}taro-button-core[plain],taro-button-core[plain][type=default]{border:1px solid #353535;color:#353535}taro-button-core[plain]:not([disabled]):active,taro-button-core[plain][type=default]:not([disabled]):active{border-color:rgba(53, 53, 53, 0.6);background-color:transparent;color:rgba(53, 53, 53, 0.6)}taro-button-core[plain]::after,taro-button-core[plain][type=default]::after{border-width:0}taro-button-core[type=primary]{background-color:#1aad19;color:#fff}taro-button-core[type=primary]:not([disabled]):visited{color:#fff}taro-button-core[type=primary]:not([disabled]):active{background-color:#179b16;color:rgba(255, 255, 255, 0.6)}taro-button-core[type=warn]{background-color:#e64340;color:#fff}taro-button-core[type=warn]:not([disabled]):visited{color:#fff}taro-button-core[type=warn]:not([disabled]):active{background-color:#ce3c39;color:rgba(255, 255, 255, 0.6)}taro-button-core[plain][disabled]{border:1px solid rgba(0, 0, 0, 0.2);background-color:#f7f7f7;color:rgba(0, 0, 0, 0.3)}taro-button-core[plain][disabled][type=primary]{border:1px solid rgba(0, 0, 0, 0.2);background-color:#f7f7f7;color:rgba(0, 0, 0, 0.3)}';const b=class{constructor(r){o(this,r);this.onSubmit=t(this,"tarobuttonsubmit",7);this.onReset=t(this,"tarobuttonreset",7);this.disabled=undefined;this.hoverClass="button-hover";this.type="";this.hoverStartTime=20;this.hoverStayTime=70;this.size=undefined;this.plain=undefined;this.loading=false;this.formType=null;this.hover=false;this.touch=false}onTouchStart(){if(this.disabled){return}this.touch=true;if(this.hoverClass&&!this.disabled){setTimeout((()=>{if(this.touch){this.hover=true}}),this.hoverStartTime)}}onTouchEnd(){if(this.disabled){return}this.touch=false;if(this.hoverClass&&!this.disabled){setTimeout((()=>{if(!this.touch){this.hover=false}}),this.hoverStayTime)}if(this.formType==="submit"){this.onSubmit.emit()}else if(this.formType==="reset"){this.onReset.emit()}}render(){const{disabled:o,hoverClass:t,type:a,size:n,plain:b,loading:d,hover:c}=this;const l=i({[`${t}`]:c&&!o});return r(e,{class:l,type:a,plain:b,loading:d,size:n,disabled:o},d&&r("i",{class:"weui-loading"}),r("slot",null))}get el(){return a(this)}};b.style=n;export{b as taro_button_core};
|
|
2
|
+
//# sourceMappingURL=p-7baff0b4.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["src/components/button/style/index.scss?tag=taro-button-core","src/components/button/button.tsx"],"names":["indexCss","Button","[object Object]","this","disabled","touch","hoverClass","setTimeout","hover","hoverStartTime","hoverStayTime","formType","onSubmit","emit","onReset","type","size","plain","loading","cls","classNames","h","Host","class"],"mappings":"oGAAA,MAAMA,EAAW,i2GCOJC,EAAM,2JAEI,yBACN,uBACU,sBACD,yDAGN,oBAC6C,gBAI9C,iBACA,MAWjBC,eACE,GAAIC,KAAKC,SAAU,CACjB,OAGFD,KAAKE,MAAQ,KACb,GAAIF,KAAKG,aAAeH,KAAKC,SAAU,CACrCG,YAAW,KACT,GAAIJ,KAAKE,MAAO,CACdF,KAAKK,MAAQ,QAEdL,KAAKM,iBAKZP,aACE,GAAIC,KAAKC,SAAU,CACjB,OAGFD,KAAKE,MAAQ,MACb,GAAIF,KAAKG,aAAeH,KAAKC,SAAU,CACrCG,YAAW,KACT,IAAKJ,KAAKE,MAAO,CACfF,KAAKK,MAAQ,SAEdL,KAAKO,eAGV,GAAIP,KAAKQ,WAAa,SAAU,CAC9BR,KAAKS,SAASC,YACT,GAAIV,KAAKQ,WAAa,QAAS,CACpCR,KAAKW,QAAQD,QAIjBX,SACE,MAAME,SACJA,EAAQE,WACRA,EAAUS,KACVA,EAAIC,KACJA,EAAIC,MACJA,EAAKC,QACLA,EAAOV,MACPA,GACEL,KAEJ,MAAMgB,EAAMC,EAAW,CACrBlB,CAAC,GAAGI,KAAeE,IAAUJ,IAG/B,OACEiB,EAACC,EAAI,CACHC,MAAOJ,EACPJ,KAAMA,EACNE,MAAOA,EACPC,QAASA,EACTF,KAAMA,EACNZ,SAAUA,GAETc,GAAWG,EAAA,IAAA,CAAGE,MAAM,iBACrBF,EAAA,OAAA","sourcesContent":["$weuiBtnHeight: 46px;\n$weuiBtnFontSize: 18px;\n$weuiBtnFontColor: #fff;\n$weuiBtnActiveFontColor: rgb(255 255 255 / 60%);\n$weuiBtnDisabledFontColor: rgb(255 255 255 / 60%);\n$weuiBtnBorderRadius: 5px;\n$weuiBtnDefaultGap: 15px;\n\n// Button Mini\n$weuiBtnMiniFontSize: 13px;\n$weuiBtnMiniHeight: 2.3;\n\n// Button Default\n$weuiBtnDefaultFontColor: #000;\n$weuiBtnDefaultActiveFontColor: rgb(0 0 0 / 60%);\n$weuiBtnDefaultDisabledFontColor: rgb(0 0 0 / 30%);\n$weuiBtnDefaultBg: #f8f8f8;\n$weuiBtnDefaultActiveBg: #dedede;\n$weuiBtnDefaultDisabledBg: #f7f7f7;\n\n// Button Primary\n$weuiBtnPrimaryBg: #1aad19;\n$weuiBtnPrimaryActiveBg: #179b16;\n$weuiBtnPrimaryDisabledBg: #9ed99d;\n\n// Button Warn\n$weuiBtnWarnBg: #e64340;\n$weuiBtnWarnActiveBg: #ce3c39;\n$weuiBtnWarnDisabledBg: #ec8b89;\n\n// Button Plain Primary\n$weuiBtnPlainPrimaryColor: rgb(26 173 25 / 100%);\n$weuiBtnPlainPrimaryBorderColor: rgb(26 173 25 / 100%);\n$weuiBtnPlainPrimaryActiveColor: rgb(26 173 25 / 60%);\n$weuiBtnPlainPrimaryActiveBorderColor: rgb(26 173 25 / 60%);\n\n// Button Plain Default\n$weuiBtnPlainDefaultColor: rgb(53 53 53 / 100%);\n$weuiBtnPlainDefaultBorderColor: rgb(53 53 53 / 100%);\n$weuiBtnPlainDefaultActiveColor: rgb(53 53 53 / 60%);\n$weuiBtnPlainDefaultActiveBorderColor: rgb(53 53 53 / 60%);\n\ntaro-button-core {\n display: block;\n overflow: hidden;\n position: relative;\n box-sizing: border-box;\n margin-left: auto;\n margin-right: auto;\n padding-left: 14px;\n padding-right: 14px;\n border-width: 0;\n border-radius: $weuiBtnBorderRadius;\n width: 100%;\n appearance: none;\n outline: 0;\n background-color: $weuiBtnDefaultBg;\n line-height: 2.55555556;\n text-decoration: none;\n text-align: center;\n font-size: $weuiBtnFontSize;\n color: $weuiBtnDefaultFontColor;\n -webkit-tap-highlight-color: rgb(0 0 0 / 0%);\n\n &:focus {\n outline: 0;\n }\n\n &:not([disabled]):active {\n background-color: $weuiBtnDefaultActiveBg;\n color: $weuiBtnDefaultActiveFontColor;\n }\n\n &::after {\n position: absolute;\n left: 0;\n top: 0;\n box-sizing: border-box;\n border: 1px solid rgb(0 0 0 / 20%);\n border-radius: $weuiBtnBorderRadius * 2;\n width: 200%;\n height: 200%;\n content: \" \";\n transform: scale(0.5);\n transform-origin: 0 0;\n }\n\n & + & {\n margin-top: $weuiBtnDefaultGap;\n }\n\n &[type=\"default\"] {\n background-color: $weuiBtnDefaultBg;\n color: $weuiBtnDefaultFontColor;\n\n &:not([disabled]):visited {\n color: $weuiBtnDefaultFontColor;\n }\n\n &:not([disabled]):active {\n background-color: $weuiBtnDefaultActiveBg;\n color: $weuiBtnDefaultActiveFontColor;\n }\n }\n\n &[size=\"mini\"] {\n display: inline-block;\n padding: 0 1.32em;\n width: auto;\n line-height: $weuiBtnMiniHeight;\n font-size: $weuiBtnMiniFontSize;\n }\n\n &[plain],\n &[plain][type=\"default\"],\n &[plain][type=\"primary\"] {\n border-width: 1px;\n background-color: transparent;\n }\n\n &[disabled] {\n color: $weuiBtnDisabledFontColor;\n\n &[type=\"default\"] {\n background-color: $weuiBtnDefaultDisabledBg;\n color: $weuiBtnDefaultDisabledFontColor;\n }\n\n &[type=\"primary\"] {\n background-color: $weuiBtnPrimaryDisabledBg;\n }\n\n &[type=\"warn\"] {\n background-color: $weuiBtnWarnDisabledBg;\n }\n }\n\n &[loading] {\n .weui-loading {\n margin: -0.2em 0.34em 0 0;\n }\n\n &[type=\"primary\"],\n &[type=\"warn\"] {\n color: $weuiBtnActiveFontColor;\n }\n\n &[type=\"primary\"] {\n background-color: $weuiBtnPrimaryActiveBg;\n }\n\n &[type=\"warn\"] {\n background-color: $weuiBtnWarnActiveBg;\n }\n }\n\n &[plain][type=\"primary\"] {\n border: 1px solid $weuiBtnPlainPrimaryBorderColor;\n color: $weuiBtnPlainPrimaryColor;\n\n &:not([disabled]):active {\n border-color: $weuiBtnPlainPrimaryActiveBorderColor;\n background-color: transparent;\n color: $weuiBtnPlainPrimaryActiveColor;\n }\n\n &::after {\n border-width: 0;\n }\n }\n\n &[plain],\n &[plain][type=\"default\"] {\n border: 1px solid $weuiBtnPlainDefaultBorderColor;\n color: $weuiBtnPlainDefaultColor;\n\n &:not([disabled]):active {\n border-color: $weuiBtnPlainDefaultActiveBorderColor;\n background-color: transparent;\n color: $weuiBtnPlainDefaultActiveColor;\n }\n\n &::after {\n border-width: 0;\n }\n }\n\n &[type=\"primary\"] {\n background-color: $weuiBtnPrimaryBg;\n color: #fff;\n\n &:not([disabled]):visited {\n color: $weuiBtnFontColor;\n }\n\n &:not([disabled]):active {\n background-color: $weuiBtnPrimaryActiveBg;\n color: $weuiBtnActiveFontColor;\n }\n }\n\n &[type=\"warn\"] {\n background-color: $weuiBtnWarnBg;\n color: #fff;\n\n &:not([disabled]):visited {\n color: $weuiBtnFontColor;\n }\n\n &:not([disabled]):active {\n background-color: $weuiBtnWarnActiveBg;\n color: $weuiBtnActiveFontColor;\n }\n }\n\n &[plain][disabled] {\n border: 1px solid rgb(0 0 0 / 20%);\n background-color: #f7f7f7;\n color: rgb(0 0 0 / 30%);\n }\n\n &[plain][disabled][type=\"primary\"] {\n border: 1px solid rgb(0 0 0 / 20%);\n background-color: #f7f7f7;\n color: rgb(0 0 0 / 30%);\n }\n}\n","import { Component, h, Prop, State, ComponentInterface, Event, EventEmitter, Listen, Element, Host } from '@stencil/core'\nimport classNames from 'classnames'\n\n@Component({\n tag: 'taro-button-core',\n styleUrl: './style/index.scss'\n})\nexport class Button implements ComponentInterface {\n @Prop() disabled: boolean\n @Prop() hoverClass = 'button-hover'\n @Prop() type = ''\n @Prop() hoverStartTime = 20\n @Prop() hoverStayTime = 70\n @Prop() size: string\n @Prop() plain: boolean\n @Prop() loading = false\n @Prop({ reflect: true }) formType: 'submit' | 'reset' | null = null\n\n @Element() el: HTMLElement\n\n @State() hover = false\n @State() touch = false\n\n @Event({\n eventName: 'tarobuttonsubmit'\n }) onSubmit: EventEmitter\n\n @Event({\n eventName: 'tarobuttonreset'\n }) onReset: EventEmitter\n\n @Listen('touchstart')\n onTouchStart () {\n if (this.disabled) {\n return\n }\n\n this.touch = true\n if (this.hoverClass && !this.disabled) {\n setTimeout(() => {\n if (this.touch) {\n this.hover = true\n }\n }, this.hoverStartTime)\n }\n }\n\n @Listen('touchend')\n onTouchEnd () {\n if (this.disabled) {\n return\n }\n\n this.touch = false\n if (this.hoverClass && !this.disabled) {\n setTimeout(() => {\n if (!this.touch) {\n this.hover = false\n }\n }, this.hoverStayTime)\n }\n\n if (this.formType === 'submit') {\n this.onSubmit.emit()\n } else if (this.formType === 'reset') {\n this.onReset.emit()\n }\n }\n\n render () {\n const {\n disabled,\n hoverClass,\n type,\n size,\n plain,\n loading,\n hover\n } = this\n\n const cls = classNames({\n [`${hoverClass}`]: hover && !disabled\n })\n\n return (\n <Host\n class={cls}\n type={type}\n plain={plain}\n loading={loading}\n size={size}\n disabled={disabled}\n >\n {loading && <i class='weui-loading' />}\n <slot />\n </Host>\n )\n }\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,h as s,g as i,H as h,c as e}from"./p-5bfefd19.js";const o="taro-movable-area-core{display:block;position:relative;width:10px;height:10px}";const n=class{constructor(s){t(this,s);this.views=[];this.scaleLength=0;this.viewsChanged=()=>{this.views=[];const t=this.element.querySelectorAll("taro-movable-view-core");Array.from(t).forEach((t=>{this.views.push(t)}));this.updateArea()};this.handleTouchStart=t=>{const s=t.touches;if(!s||s.length<=1){return}const i={width:s[1].pageX-s[0].pageX,height:s[1].pageY-s[0].pageY};this.scaleLength=Math.sqrt(i.width*i.width+i.height*i.height);if(this.scaleArea){return}const h=(t,s)=>{const i=(t,s)=>{if(!(t=t.parentNode)){return false}return(!(t instanceof HTMLElement)||t!==document.body)&&(t===s||t===s.element||t.element===s||i(t,s))};for(let h=0;h<s.length;h++){const e=s[h];if(t===e["element"]||i(t,e)){return e}}};const e=h(s[0].target,this.views);const o=h(s[1].target,this.views);this.scaleTarget=e&&e===o?e:undefined};this.handleTouchMove=t=>{const s=t.touches;if(!s||s.length<=1){return}t.preventDefault();const i={width:s[1].pageX-s[0].pageX,height:s[1].pageY-s[0].pageY};if(this.scaleLength>0){this.updateScale(Math.sqrt(i.width*i.width+i.height*i.height)/this.scaleLength)}};this.handleTouchEnd=t=>{var s,i;if(t.touches&&t.touches.length||!t.changedTouches){return}this.scaleLength=0;if(this.scaleArea){this.views.forEach((t=>{var s;(s=t["endScale"])===null||s===void 0?void 0:s.call(t)}))}else{(i=(s=this.scaleTarget)===null||s===void 0?void 0:s["endScale"])===null||i===void 0?void 0:i.call(s)}this.scaleTarget=undefined};this.updateScale=t=>{var s,i;if(!t||t===1){return}if(this.scaleArea){this.views.forEach((s=>{var i;(i=s["setScale"])===null||i===void 0?void 0:i.call(s,t)}))}else{(i=(s=this.scaleTarget)===null||s===void 0?void 0:s["setScale"])===null||i===void 0?void 0:i.call(s,t)}};this.updateArea=()=>{const t=window.getComputedStyle(this.element);const s=this.element.getBoundingClientRect();const i=["Left","Right"].map((s=>parseFloat(t["border"+s+"Width"])+parseFloat(t["padding"+s])));const h=["Top","Bottom"].map((s=>parseFloat(t["border"+s+"Width"])+parseFloat(t["padding"+s])));this.views.forEach((t=>{var e;(e=t["setParent"])===null||e===void 0?void 0:e.call(t,{element:this.element,area:{height:s.height-h[0]-h[1],width:s.width-i[0]-i[1]}})}))};this.scaleArea=undefined}connectedCallback(){this.observer=new MutationObserver((t=>{t.forEach((t=>{var s,i;if(t.attributeName==="class"||t.attributeName==="style"){const t=this.element.offsetWidth;const h=this.element.offsetHeight;if(t!==((s=this.offset)===null||s===void 0?void 0:s.width)||h!==((i=this.offset)===null||i===void 0?void 0:i.height)){this.updateArea()}this.offset={width:t,height:h}}}))}));this.observer.observe(this.element,{attributes:true})}disconnectedCallback(){var t;(t=this.observer)===null||t===void 0?void 0:t.disconnect()}componentDidLoad(){this.viewsChanged()}render(){return s(h,{onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd})}get element(){return i(this)}};n.style=o;const r="taro-movable-view-core{display:inline-block;position:absolute;left:0;top:0;width:10px;height:10px}";const a=class{constructor(s){t(this,s);this.onChange=e(this,"change",7);this.onScale=e(this,"scale",7);this.onHTouchMove=e(this,"htouchmove",7);this.onVTouchMove=e(this,"vtouchmove",7);this.translateX=0;this.translateY=0;this.origin={x:0,y:0};this.area={width:0,height:0};this.originScale=1;this.currentScale=1;this.width=0;this.height=0;this.minX=0;this.minY=0;this.maxX=0;this.maxY=0;this.baseX=0;this.baseY=0;this.offset={x:0,y:0};this.scaleOffset={x:0,y:0};this.getLimitXY=(t,s)=>{let i=false;t>this.maxX?(t=this.maxX,i=true):t<this.minX&&(t=this.minX,i=true);s>this.maxY?(s=this.maxY,i=true):s<this.minY&&(s=this.minY,i=true);return{x:t,y:s,outOfBounds:i}};this.animationTo=(t,s,i,h,e,o,n)=>{if(this.animation){this.setTransform(t,s,i,h,e,o);n===null||n===void 0?void 0:n()}else{this.setTransform(t,s,i,h,e,o)}};this.setTransform=(t,s,i,h,e,o)=>{t=Number(t.toFixed(1));s=Number(s.toFixed(1));i=Number((i!==null&&i!==void 0?i:this.currentScale).toFixed(3));if(!this.outOfBounds){const i=this.getLimitXY(t,s);t=i.x;s=i.y}const n=(t,s)=>+((1e3*t-1e3*s)/1e3).toFixed(1);const r=n(t,this.scaleOffset.x);const a=n(s,this.scaleOffset.y);if(this.translateX!==t||this.translateY!==s){!e&&this.onChange.emit({x:r,y:a,source:h})}if(i!==this.currentScale){o&&this.onScale.emit({scale:i,x:r,y:a})}const c=`translateX(${t}px) translateY(${s}px) translateZ(0px) scale(${i})`;this.element.style.transform=c;this.element.style.webkitTransform=c;this.translateX=t;this.translateY=s;this.currentScale=i};this.updateOffset=()=>{const t=(s,i)=>{if(s===i||!s.offsetParent){return{left:0,top:0}}const h=t(s.offsetParent,i);return{left:s.offsetLeft+h.left,top:s.offsetTop+h.top}};if(!this.parent){return}const s=t(this.element,this.parent);this.offset.x=s.left;this.offset.y=s.top};this.updateScaleOffset=(t=this.currentScale)=>{const s=this.element.getBoundingClientRect();this.height=s.height/this.currentScale;this.width=s.width/this.currentScale;this.scaleOffset.x=(this.width*t-this.width)/2;this.scaleOffset.y=(this.height*t-this.height)/2};this.updateBoundary=()=>{const t=0-this.offset.x+this.scaleOffset.x;const s=this.area.width-this.width-this.offset.x-this.scaleOffset.x;this.minX=Math.min(t,s);this.maxX=Math.max(t,s);const i=0-this.offset.y+this.scaleOffset.y;const h=this.area.height-this.height-this.offset.y-this.scaleOffset.y;this.minY=Math.min(i,h);this.maxY=Math.max(i,h)};this.updateScale=(t,s,i)=>{if(!this.scale){return}const h=this.adjustScale(t);this.updateScaleOffset(h);this.updateBoundary();const{x:e,y:o}=this.getLimitXY(this.translateX,this.translateY);if(s){this.animationTo(e,o,h,"",true,true,i)}else if(!this.updating){this.updating=true;requestAnimationFrame((()=>{this.setTransform(e,o,h,"",true,true);this.updating=false}))}};this.setOriginScale=t=>{this.originScale=t};this.adjustScale=t=>Math.min(10,this.scaleMax,Math.max(.5,this.scaleMin,t));this.handleTouchStart=t=>{const s=t.touches;if(this.disabled||s.length>1||!this.element){return}const i=s[0];this.touching=true;this.firstMoveFireEvent=false;this.origin.x=i.screenX;this.origin.y=i.screenY;this.baseX=this.translateX;this.baseY=this.translateY;this.element.style.willChange="transform"};this.handleTouchMove=t=>{const s=t.touches;if(this.disabled||!this.element||this.scaling||!this.touching||s.length>1){return}t.preventDefault();const i=s[0];const h=i.screenX-this.origin.x;const e=i.screenY-this.origin.y;this.setTransform(this.xMove?h+this.baseX:0,this.yMove?e+this.baseY:0);if(!this.firstMoveFireEvent){this.firstMoveFireEvent=true;const s=Math.abs(h)>Math.abs(e)?this.onHTouchMove:this.onVTouchMove;s.emit({originalEvent:t,bubbles:false,capturePhase:false,composed:true,extraFields:{touches:t.touches||{},changedTouches:t.changedTouches||{}}})}};this.handleTouchEnd=t=>{const s=t.changedTouches[0];if(this.disabled||!this.touching||!s){return}this.touching=false;const i=s.screenX-this.origin.x;const h=s.screenY-this.origin.y;this.setTransform(this.xMove?i+this.baseX:0,this.yMove?h+this.baseY:0)};this.x=0;this.y=0;this.direction="none";this.outOfBounds=false;this.inertia=false;this.friction=2;this.damping=20;this.disabled=false;this.scale=false;this.scaleMin=.5;this.scaleMax=10;this.scaleValue=1;this.animation=true}watchX(t){this.setTransform(parseFloat(`${t||0}`),this.translateY)}watchY(t){this.setTransform(this.translateX,parseFloat(`${t||0}`))}watchScaleMinOrMax(){if(!this.scale)return false;this.updateScale(this.currentScale,true);this.setOriginScale(this.currentScale)}watchScaleValue(t){if(!this.scale){return false}this.updateScale(t,true);this.setOriginScale(t);return t}async setParent({element:t,area:s}){const i=this.scale?this.scaleValue:1;this.area=s;this.parent=t;this.updateOffset();this.updateScaleOffset(i);this.updateBoundary();this.setTransform(Number(this.x)+this.scaleOffset.x,Number(this.y)+this.scaleOffset.y,i,"",true);this.setOriginScale(i)}async endScale(){this.scaling=false;this.setOriginScale(this.currentScale)}async setScale(t){if(!this.scale){return}this.scaling=true;this.updateScale(t*this.originScale)}connectedCallback(){this.observer=new MutationObserver((t=>{t.forEach((t=>{const s=t.attributeName;if(s&&["class","style"].includes(s)){const i=t.oldValue;const h=t.target.getAttribute(s);if(i===h){return}const e=t=>t===null||t===void 0?void 0:t.split(";").filter((t=>!["transform","will-change"].find((s=>t.trim().startsWith(s))))).join(";");if(s==="style"&&e(h)===e(i)){return}this.updateOffset();this.updateScaleOffset();this.updateBoundary();this.setTransform(this.translateX,this.translateY)}}))}));this.observer.observe(this.element,{attributes:true,attributeOldValue:true})}disconnectedCallback(){var t;(t=this.observer)===null||t===void 0?void 0:t.disconnect()}componentDidLoad(){this.element.style.transformOrigin="center";this.xMove=["horizontal","all"].includes(this.direction);this.yMove=["vertical","all"].includes(this.direction);if(this.friction<=0){this.friction=2}if(this.x||this.y){const t=parseFloat(`${this.x||0}`);const s=parseFloat(`${this.y||0}`);this.setTransform(t,s)}}render(){return s(h,{onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd})}get element(){return i(this)}static get watchers(){return{x:["watchX"],y:["watchY"],scaleMin:["watchScaleMinOrMax"],scaleMax:["watchScaleMinOrMax"],scaleValue:["watchScaleValue"]}}};a.style=r;export{n as taro_movable_area_core,a as taro_movable_view_core};
|
|
2
|
+
//# sourceMappingURL=p-8231e748.entry.js.map
|