@tarojs/components 3.5.7 → 3.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/taro-button-core.cjs.entry.js +5 -0
  3. package/dist/cjs/taro-components.cjs.js +1 -1
  4. package/dist/cjs/taro-movable-area-core.cjs.entry.js +1 -1
  5. package/dist/cjs/taro-movable-view-core.cjs.entry.js +18 -43
  6. package/dist/cjs/taro-swiper-core_2.cjs.entry.js +5 -0
  7. package/dist/cjs/taro-video-control_3.cjs.entry.js +98 -181
  8. package/dist/collection/components/button/button.js +11 -0
  9. package/dist/collection/components/movable-area/area.css +2 -2
  10. package/dist/collection/components/movable-area/movable-view.js +18 -33
  11. package/dist/collection/components/swiper/swiper.js +23 -0
  12. package/dist/collection/components/video/video-control.js +22 -39
  13. package/dist/collection/components/video/video-danmu.js +39 -52
  14. package/dist/collection/components/video/video.js +37 -60
  15. package/dist/esm/loader.js +1 -1
  16. package/dist/esm/taro-button-core.entry.js +5 -0
  17. package/dist/esm/taro-components.js +1 -1
  18. package/dist/esm/taro-movable-area-core.entry.js +1 -1
  19. package/dist/esm/taro-movable-view-core.entry.js +18 -43
  20. package/dist/esm/taro-swiper-core_2.entry.js +5 -0
  21. package/dist/esm/taro-video-control_3.entry.js +98 -181
  22. package/dist/esm-es5/loader.js +1 -1
  23. package/dist/esm-es5/taro-button-core.entry.js +1 -1
  24. package/dist/esm-es5/taro-components.js +1 -1
  25. package/dist/esm-es5/taro-movable-area-core.entry.js +1 -1
  26. package/dist/esm-es5/taro-movable-view-core.entry.js +1 -1
  27. package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
  28. package/dist/esm-es5/taro-video-control_3.entry.js +55 -55
  29. package/dist/taro-components/p-0380841f.system.js +1 -1
  30. package/dist/taro-components/{p-a94524c9.system.entry.js → p-06b9d39c.system.entry.js} +1 -1
  31. package/dist/taro-components/{p-63a0c6b0.entry.js → p-34178401.entry.js} +1 -1
  32. package/dist/taro-components/p-3549b6d2.entry.js +1 -0
  33. package/dist/taro-components/p-4262d1b6.entry.js +1 -0
  34. package/dist/taro-components/{p-f8b9c4b0.entry.js → p-42630f45.entry.js} +1 -1
  35. package/dist/taro-components/{p-f81a74bb.system.entry.js → p-4c1a7cae.system.entry.js} +81 -81
  36. package/dist/taro-components/{p-3744e978.entry.js → p-99d17a1a.entry.js} +52 -52
  37. package/dist/taro-components/{p-13f0b11f.system.entry.js → p-a5496bf5.system.entry.js} +1 -1
  38. package/dist/taro-components/p-f40e1218.system.entry.js +1 -0
  39. package/dist/taro-components/{p-1c775a11.system.entry.js → p-f5f1c3b7.system.entry.js} +1 -1
  40. package/dist/taro-components/taro-components.esm.js +1 -1
  41. package/dist/types/components/button/button.d.ts +1 -0
  42. package/dist/types/components/swiper/swiper.d.ts +4 -0
  43. package/dist/types/components.d.ts +8 -0
  44. package/package.json +15 -12
  45. package/types/Ad.d.ts +20 -21
  46. package/types/AnimationVideo.d.ts +62 -0
  47. package/types/AnimationView.d.ts +45 -0
  48. package/types/ArCamera.d.ts +50 -0
  49. package/types/Audio.d.ts +5 -5
  50. package/types/AwemeData.d.ts +43 -0
  51. package/types/Button.d.ts +67 -70
  52. package/types/Camera.d.ts +15 -16
  53. package/types/Canvas.d.ts +22 -27
  54. package/types/Checkbox.d.ts +7 -7
  55. package/types/CommentDetail.d.ts +72 -0
  56. package/types/CommentList.d.ts +128 -0
  57. package/types/ContactButton.d.ts +53 -0
  58. package/types/CoverImage.d.ts +15 -15
  59. package/types/CoverView.d.ts +5 -5
  60. package/types/FollowSwan.d.ts +28 -0
  61. package/types/Form.d.ts +10 -10
  62. package/types/Image.d.ts +20 -20
  63. package/types/InlinePaymentPanel.d.ts +58 -0
  64. package/types/Input.d.ts +23 -21
  65. package/types/Lifestyle.d.ts +26 -0
  66. package/types/Like.d.ts +107 -0
  67. package/types/LivePlayer.d.ts +31 -25
  68. package/types/LivePusher.d.ts +5 -5
  69. package/types/Login.d.ts +45 -0
  70. package/types/Lottie.d.ts +113 -0
  71. package/types/Map.d.ts +66 -71
  72. package/types/MovableView.d.ts +5 -14
  73. package/types/NativeSlot.d.ts +32 -0
  74. package/types/Navigator.d.ts +10 -10
  75. package/types/OpenData.d.ts +5 -5
  76. package/types/PageContainer.d.ts +7 -10
  77. package/types/PageMeta.d.ts +14 -14
  78. package/types/Picker.d.ts +1 -5
  79. package/types/PickerView.d.ts +11 -21
  80. package/types/Progress.d.ts +5 -5
  81. package/types/RadioGroup.d.ts +5 -5
  82. package/types/RichText.d.ts +17 -17
  83. package/types/RtcRoom.d.ts +104 -0
  84. package/types/RtcRoomItem.d.ts +26 -0
  85. package/types/ScrollView.d.ts +46 -30
  86. package/types/Slider.d.ts +10 -10
  87. package/types/Slot.d.ts +1 -1
  88. package/types/Swiper.d.ts +31 -19
  89. package/types/Switch.d.ts +5 -5
  90. package/types/TabItem.d.ts +35 -0
  91. package/types/Tabs.d.ts +58 -0
  92. package/types/Textarea.d.ts +32 -32
  93. package/types/Video.d.ts +120 -111
  94. package/types/View.d.ts +20 -13
  95. package/types/VoipRoom.d.ts +5 -5
  96. package/types/WebView.d.ts +11 -5
  97. package/types/index.vue3.d.ts +267 -259
  98. package/dist/taro-components/p-6800ac6f.entry.js +0 -1
  99. package/dist/taro-components/p-7f93fa08.entry.js +0 -1
  100. package/dist/taro-components/p-9e1572c5.system.entry.js +0 -1
@@ -98,25 +98,6 @@ const screenFn = (function () {
98
98
  })();
99
99
  const isHls = url => /\.(m3u8)($|\?)/i.test(url);
100
100
 
101
- var __awaiter$2 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
102
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
103
- return new (P || (P = Promise))(function (resolve, reject) {
104
- function fulfilled(value) { try {
105
- step(generator.next(value));
106
- }
107
- catch (e) {
108
- reject(e);
109
- } }
110
- function rejected(value) { try {
111
- step(generator["throw"](value));
112
- }
113
- catch (e) {
114
- reject(e);
115
- } }
116
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
117
- step((generator = generator.apply(thisArg, _arguments || [])).next());
118
- });
119
- };
120
101
  let VideoControl = class {
121
102
  constructor(hostRef) {
122
103
  registerInstance(this, hostRef);
@@ -159,40 +140,32 @@ let VideoControl = class {
159
140
  this.seekFunc(this.percentage * this.duration);
160
141
  this.toggleVisibility(true);
161
142
  }
162
- setProgressBall(percentage) {
163
- return __awaiter$2(this, void 0, void 0, function* () {
164
- if (this.progressBallRef) {
165
- this.progressBallRef.style.left = `${percentage * 100}%`;
166
- }
167
- });
143
+ async setProgressBall(percentage) {
144
+ if (this.progressBallRef) {
145
+ this.progressBallRef.style.left = `${percentage * 100}%`;
146
+ }
168
147
  }
169
- toggleVisibility(nextVisible) {
170
- return __awaiter$2(this, void 0, void 0, function* () {
171
- const visible = nextVisible === undefined ? !this.visible : nextVisible;
172
- if (visible) {
173
- this.hideControlsTimer && clearTimeout(this.hideControlsTimer);
174
- if (this.isPlaying) {
175
- this.hideControlsTimer = setTimeout(() => {
176
- this.toggleVisibility(false);
177
- }, 2000);
178
- }
179
- this.el.style.visibility = 'visible';
180
- }
181
- else {
182
- this.el.style.visibility = 'hidden';
148
+ async toggleVisibility(nextVisible) {
149
+ const visible = nextVisible === undefined ? !this.visible : nextVisible;
150
+ if (visible) {
151
+ this.hideControlsTimer && clearTimeout(this.hideControlsTimer);
152
+ if (this.isPlaying) {
153
+ this.hideControlsTimer = setTimeout(() => {
154
+ this.toggleVisibility(false);
155
+ }, 2000);
183
156
  }
184
- this.visible = !!visible;
185
- });
157
+ this.el.style.visibility = 'visible';
158
+ }
159
+ else {
160
+ this.el.style.visibility = 'hidden';
161
+ }
162
+ this.visible = !!visible;
186
163
  }
187
- getIsDraggingProgressBall() {
188
- return __awaiter$2(this, void 0, void 0, function* () {
189
- return this.isDraggingProgressBall;
190
- });
164
+ async getIsDraggingProgressBall() {
165
+ return this.isDraggingProgressBall;
191
166
  }
192
- setCurrentTime(time) {
193
- return __awaiter$2(this, void 0, void 0, function* () {
194
- this.currentTimeRef.innerHTML = formatTime(time);
195
- });
167
+ async setCurrentTime(time) {
168
+ this.currentTimeRef.innerHTML = formatTime(time);
196
169
  }
197
170
  render() {
198
171
  const { controls, currentTime, duration, isPlaying, pauseFunc, playFunc, showPlayBtn, showProgress } = this;
@@ -27835,25 +27808,6 @@ const Hls = /*@__PURE__*/getDefaultExportFromCjs(hls);
27835
27808
 
27836
27809
  const indexCss = ".taro-video{display:inline-block;overflow:hidden;position:relative;width:100%;height:225px;line-height:0}.taro-video[hidden]{display:none}.taro-video-container{display:inline-block;position:absolute;left:0;top:0;width:100%;height:100%;background-color:#000;-o-object-position:inherit;object-position:inherit}.taro-video-container.taro-video-type-fullscreen{position:fixed;left:0;right:0;top:0;bottom:0;z-index:999}.taro-video-container.taro-video-type-fullscreen.taro-video-type-rotate-left{-webkit-transform:translate(-50%, -50%) rotate(-90deg);transform:translate(-50%, -50%) rotate(-90deg)}.taro-video-container.taro-video-type-fullscreen.taro-video-type-rotate-right{-webkit-transform:translate(-50%, -50%) rotate(90deg);transform:translate(-50%, -50%) rotate(90deg)}.taro-video-video{width:100%;height:100%;-o-object-position:inherit;object-position:inherit}.taro-video-cover{display:-ms-flexbox;display:flex;position:absolute;left:0;top:0;bottom:0;z-index:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;width:100%;background-color:rgba(1, 1, 1, 0.5);-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-pack:center;-webkit-box-align:center}.taro-video-cover-play-button{width:40px;height:40px;background-repeat:no-repeat;background-position:50% 50%;background-size:50%}.taro-video-cover-duration{margin-top:10px;line-height:1;font-size:16px;color:#fff}.taro-video-bar{display:-ms-flexbox;display:flex;visibility:hidden;overflow:hidden;position:absolute;right:0;bottom:0;z-index:1;-ms-flex-align:center;align-items:center;padding:0 10px;height:44px;background-color:rgba(0, 0, 0, 0.5);-webkit-box-align:center}.taro-video-bar.taro-video-bar-full{left:0}.taro-video-controls{display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;margin:0 8.5px}.taro-video-control-button{-webkit-box-sizing:content-box;box-sizing:content-box;margin-left:-8.5px;padding:14.5px 12.5px;width:13px;height:15px}.taro-video-control-button::after{display:block;width:100%;height:100%;background-repeat:no-repeat;background-position:50% 50%;background-size:100%;content:\"\"}.taro-video-control-button.taro-video-control-button-play::after,.taro-video-cover-play-button{background-image:url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAeCAYAAAAy2w7YAAAAAXNSR0IArs4c6QAAAWhJREFUSA1j+P///0cgBoHjQGzCQCsAtgJB/AMy5wCxGNXtQ9iBwvoA5BUCMQvVLEQxHpNzDSjkRhXLMM3GKrIeKKpEkYVYjcUu+AMo3ALE3GRZiN1MvKKPgbIRJFuG10j8koeA0gZEW4jfLIKyf4EqpgOxMEELCRpFnIJ3QGU5QMyM00LizCFa1SWgSkeslhFtBGkKVwGVy6FYSJp+klR/A6quB2JOkIWMIK0oNlOf8xBoZDE9LAI7nYn6HsBq4l96WHQEaLUpAyiOaASeAM2NgvuPBpaACt82IEYtfKls0UagecpwXyAzqGTRdaA57sjmYrAptAjUsCkGYlYMg9EFyLQI1IiZB8Ti6Obh5JNh0QmgHlOcBuKSIMGi50C18UDMiMssvOJEWPQLqKYbiHnxGkRIkoBF24DyaoTMIEoeh0W3geI+RBlArCI0iz4D+RVAzEasfqLVAQ19AcSg5LoYiKWI1kiiQgCMBLnEEcfDSgAAAABJRU5ErkJggg==\")}.taro-video-control-button.taro-video-control-button-pause::after{background-image:url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAgCAYAAAAffCjxAAAAAXNSR0IArs4c6QAAAFlJREFUSA3tksEKACAIQ7X//5zq98wOgQayum8QaGweHhMzG/6OujzKAymn+0LMqivu1XznWmX8/echTIyMyAgTwA72iIwwAexgj8gIE8CO3aMRbDPMaEy5BRGaKcZv8YxRAAAAAElFTkSuQmCC\")}.taro-video-current-time,.taro-video-duration{margin-top:15px;margin-bottom:14.5px;height:14.5px;line-height:14.5px;font-size:12px;color:#cbcbcb}.taro-video-progress-container{position:relative;-ms-flex-positive:2;flex-grow:2;-webkit-box-flex:2}.taro-video-progress{position:relative;margin:21px 12px;height:2px;background-color:rgba(255, 255, 255, 0.4)}.taro-video-progress-buffered{position:absolute;left:0;top:0;width:0;height:100%;background-color:rgba(255, 255, 255, 0.8);-webkit-transition:width 0.1s;transition:width 0.1s}.taro-video-ball{position:absolute;left:0;top:-21px;-webkit-box-sizing:content-box;box-sizing:content-box;margin-left:-22px;padding:14px;width:16px;height:16px}.taro-video-inner{border-radius:50%;width:100%;height:100%;background-color:#fff}.taro-video-danmu-button{margin:0 8.5px;padding:2px 10px;border:1px solid #fff;border-radius:5px;line-height:1;font-size:13px;color:#fff;white-space:nowrap}.taro-video-danmu-button.taro-video-danmu-button-active{border-color:#48c23d;color:#48c23d}.taro-video-fullscreen,.taro-video-mute{-webkit-box-sizing:content-box;box-sizing:content-box;padding:8.5px;width:17px;height:17px;background-repeat:no-repeat;background-position:50% 50%;background-size:50%}.taro-video-fullscreen{background-image:url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAhUlEQVRYR+2WSwrAMAhEnZO3PfmULLooGEFTiIXJ2s/kRY2wzQeb85sE9CRA8jSzY1YfAFzhJBnU1AVgxH2dSiArCnD9QgGzRNnOech48SRABHoSyFb5in3PSbhyo6yvCPQkEM3u7BsPe/0FIvBfAh/vhKmVbO9SWun1qk/PSVi9TcVPBG6R1YIhgWwNpQAAAABJRU5ErkJggg==\")}.taro-video-fullscreen.taro-video-type-fullscreen{background-image:url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABPUlEQVRYR+2X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1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5PmxYVAAACLklEQVRYhc2XP2sVQRRHz40hKoqaQgVBCy1EozFlGiVFxMLGh4piYWEh+hkEP4YKAVFEEFTyughaCH6DqIVpAhYWEgIxoJE8cywyi5tNHu/tJmvyg2WZO3dmzt47/zZUtoJ6Nhsg09YDiYhKDzACTAFNYH9lEpUq80TdrT5wpV5n/ZV9KoGoo+pXV2uyKkipOaLuUceAt8DhUvQd1FsCYhR4ChzaSIBMHSOi7lOfsByFWiCgEBH1GHAF2JlMPcBt4GC3HUYEaj9wF3gVEVPtfNVTwAXgWX7CDKq/1piAZTSZBmim8qJ6sQ3EgDqb/L7kU3MH2NHtl3dQX3r3Ak21UYAYAj4A/cl0JB+RF+uMRj4iQ+p8zt7KYFLdXKHuRi0gacBhV6a6pd5bA6KRNagFJPU9qv5u47toLmW1HnoR8Q5oAK1CVQu4FBHj/wUkaXsb+4pzpVaQFPqXrN7Be4Fx9VztIOr1BLEtmX4A94E/qdwHTKjDWYM6lu81dSlnn3V570BtuLxaMs2rZ/IgYxsBovaoPwsQA4VoFWEm8ql5DiysNyURsQTMpOIMcDYiPhd8xoGr/FtNC2G6FKXD6ihwGdiVHMoeeh8jYlA9ANwE3kTEp3bO6vE03qOONzR1r/q4RGrquaFFxFxE3ALOA9+6jExpdb180y55AhirhaRTatq0GXEzL8+ZIuI9cBJ4WKiartJf9nWV/mty7UfUafW7erpqRGI9EBuprffvu9n6C1KOmsqwI5A1AAAAAElFTkSuQmCC\")}.taro-video-danmu{overflow:visible;position:absolute;left:0;top:0;bottom:0;margin-top:14px;margin-bottom:44px;width:100%;line-height:14px;font-size:14px}.taro-video-danmu-item{position:absolute;left:100%;line-height:1;color:#fff;white-space:nowrap;-webkit-transform:translateX(0);transform:translateX(0);-webkit-transition-property:left, -webkit-transform;transition-property:left, -webkit-transform;transition-property:left, transform;transition-property:left, transform, -webkit-transform;-webkit-transition-duration:3s;transition-duration:3s;-webkit-transition-timing-function:linear;transition-timing-function:linear}.taro-video-toast{display:block;visibility:hidden;position:absolute;left:50%;top:50%;border-radius:5px;background-color:rgba(255, 255, 255, 0.8);pointer-events:none;color:#000;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.taro-video-toast.taro-video-toast-volume{display:block;width:100px;height:100px}.taro-video-toast-volume .taro-video-toast-title{display:block;margin-top:10px;width:100%;line-height:16px;text-align:center;font-size:12px}.taro-video-toast-volume .taro-video-toast-icon{display:block;margin-left:25%;width:50%;height:50%;background-image:url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAFhklEQVR4Xu2aeaxfQxTHP1VBES0NIQitWtpaaxeCUkQtaYVa0tiClAq1ExIiQTVppaWxt8RWSa2tWkJQRGgtQaSIpUKEpG0ssbbk28yV2+mZO/e9e3vvu/e98897mZnfzPl+75mZs0wvurn06ub46SGgxwLqZaA3sB/wO/A+8G/V6tS5BU4BJgJbO9DvAMOB36okoQ4CNgAeBEYbQK8Bbm4zAdsBc4EdAyA/APZoKwHHAA8DG2UA/AnYrG0ErAVcD1yXA9gfQJ8c40obsqbPgH7AY8CROTVuFQFD3X7fJid4DWsNAWOAGZ0w58YTsDZwKzChA189PbTRBGwKzAYO6iT4srbAMHfTfAksjulS1iG4JzAH2Dy2YKS/qAVcCdzi1vgZOBZ4PWvNGAG6wgYCW0IwctzNmf06BcEXtYABwOeA4otEfgEOdnGGqV6IAAUopwM6zDYuAVjeKYpYwCjgCWOhH513+b2lhE+Avrj89NPyalzyuCIE6EN9BfQ1dHoPOAD40+9LE6D/5aoqSqtLsgiQC60DTiHzfGCFoaSsQAexZdlTgEuyCDgLuK8u5G7dEAHyKN8CBrtxLwDHAX8Z+l4N3GS0L3db4aN0X5opmc+2XZQAfb2LPd2eciG1lUSRJZ9qYHkZONwiYAjwSc3gs24BXWWWfzEV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OvdkPF0Xu/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}";
27837
27810
 
27838
- var __awaiter$1 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
27839
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27840
- return new (P || (P = Promise))(function (resolve, reject) {
27841
- function fulfilled(value) { try {
27842
- step(generator.next(value));
27843
- }
27844
- catch (e) {
27845
- reject(e);
27846
- } }
27847
- function rejected(value) { try {
27848
- step(generator["throw"](value));
27849
- }
27850
- catch (e) {
27851
- reject(e);
27852
- } }
27853
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
27854
- step((generator = generator.apply(thisArg, _arguments || [])).next());
27855
- });
27856
- };
27857
27811
  let Video = class {
27858
27812
  constructor(hostRef) {
27859
27813
  registerInstance(this, hostRef);
@@ -28036,11 +27990,11 @@ let Video = class {
28036
27990
  this.controlsRef.toggleVisibility();
28037
27991
  this.onEnded.emit();
28038
27992
  };
28039
- this.handleTimeUpdate = throttle((e) => __awaiter$1(this, void 0, void 0, function* () {
27993
+ this.handleTimeUpdate = throttle(async (e) => {
28040
27994
  var _a, _b;
28041
27995
  this.currentTime = this.videoRef.currentTime;
28042
27996
  const duration = this.duration || this._duration;
28043
- const isControlDragging = yield this.controlsRef.getIsDraggingProgressBall();
27997
+ const isControlDragging = await this.controlsRef.getIsDraggingProgressBall();
28044
27998
  if (this.controls && this.showProgress) {
28045
27999
  if (!isControlDragging && !this.isDraggingProgress) {
28046
28000
  this.controlsRef.setProgressBall(this.currentTime / duration);
@@ -28058,7 +28012,7 @@ let Video = class {
28058
28012
  this.handleEnded();
28059
28013
  }
28060
28014
  }
28061
- }), 250);
28015
+ }, 250);
28062
28016
  this.handleError = e => {
28063
28017
  var _a, _b;
28064
28018
  if (this.hls) {
@@ -28189,31 +28143,29 @@ let Video = class {
28189
28143
  watchSrc() {
28190
28144
  this.init();
28191
28145
  }
28192
- onDocumentTouchMove(e) {
28193
- return __awaiter$1(this, void 0, void 0, function* () {
28194
- if (this.lastTouchScreenX === undefined || this.lastTouchScreenY === undefined)
28195
- return;
28196
- if (yield this.controlsRef.getIsDraggingProgressBall())
28197
- return;
28198
- const gestureObj = this.analyzeGesture(e);
28199
- if (gestureObj.type === 'adjustVolume') {
28200
- this.toastVolumeRef.style.visibility = 'visible';
28201
- const nextVolume = Math.max(Math.min(this.lastVolume - gestureObj.dataY, 1), 0);
28202
- this.videoRef.volume = nextVolume;
28203
- this.toastVolumeBarRef.style.width = `${nextVolume * 100}%`;
28204
- }
28205
- else if (gestureObj.type === 'adjustProgress') {
28206
- this.isDraggingProgress = true;
28207
- this.nextPercentage = Math.max(Math.min(this.lastPercentage + gestureObj.dataX, 1), 0);
28208
- if (this.controls && this.showProgress) {
28209
- this.controlsRef.setProgressBall(this.nextPercentage);
28210
- this.controlsRef.toggleVisibility(true);
28211
- }
28212
- const duration = this.duration || this._duration;
28213
- this.toastProgressTitleRef.innerHTML = `${formatTime(this.nextPercentage * duration)} / ${formatTime(duration)}`;
28214
- this.toastProgressRef.style.visibility = 'visible';
28146
+ async onDocumentTouchMove(e) {
28147
+ if (this.lastTouchScreenX === undefined || this.lastTouchScreenY === undefined)
28148
+ return;
28149
+ if (await this.controlsRef.getIsDraggingProgressBall())
28150
+ return;
28151
+ const gestureObj = this.analyzeGesture(e);
28152
+ if (gestureObj.type === 'adjustVolume') {
28153
+ this.toastVolumeRef.style.visibility = 'visible';
28154
+ const nextVolume = Math.max(Math.min(this.lastVolume - gestureObj.dataY, 1), 0);
28155
+ this.videoRef.volume = nextVolume;
28156
+ this.toastVolumeBarRef.style.width = `${nextVolume * 100}%`;
28157
+ }
28158
+ else if (gestureObj.type === 'adjustProgress') {
28159
+ this.isDraggingProgress = true;
28160
+ this.nextPercentage = Math.max(Math.min(this.lastPercentage + gestureObj.dataX, 1), 0);
28161
+ if (this.controls && this.showProgress) {
28162
+ this.controlsRef.setProgressBall(this.nextPercentage);
28163
+ this.controlsRef.toggleVisibility(true);
28215
28164
  }
28216
- });
28165
+ const duration = this.duration || this._duration;
28166
+ this.toastProgressTitleRef.innerHTML = `${formatTime(this.nextPercentage * duration)} / ${formatTime(duration)}`;
28167
+ this.toastProgressRef.style.visibility = 'visible';
28168
+ }
28217
28169
  }
28218
28170
  onDocumentTouchEnd() {
28219
28171
  var _a;
@@ -28232,40 +28184,28 @@ let Video = class {
28232
28184
  this.lastTouchScreenY = undefined;
28233
28185
  }
28234
28186
  /** 播放视频 */
28235
- play() {
28236
- return __awaiter$1(this, void 0, void 0, function* () {
28237
- this._play();
28238
- });
28187
+ async play() {
28188
+ this._play();
28239
28189
  }
28240
28190
  /** 暂停视频 */
28241
- pause() {
28242
- return __awaiter$1(this, void 0, void 0, function* () {
28243
- this._pause();
28244
- });
28191
+ async pause() {
28192
+ this._pause();
28245
28193
  }
28246
28194
  /** 停止视频 */
28247
- stop() {
28248
- return __awaiter$1(this, void 0, void 0, function* () {
28249
- this._stop();
28250
- });
28195
+ async stop() {
28196
+ this._stop();
28251
28197
  }
28252
28198
  /** 跳转到指定位置 */
28253
- seek(position) {
28254
- return __awaiter$1(this, void 0, void 0, function* () {
28255
- this._seek(position);
28256
- });
28199
+ async seek(position) {
28200
+ this._seek(position);
28257
28201
  }
28258
28202
  /** 进入全屏。若有自定义内容需在全屏时展示,需将内容节点放置到 video 节点内。 */
28259
- requestFullScreen() {
28260
- return __awaiter$1(this, void 0, void 0, function* () {
28261
- this.toggleFullScreen(true);
28262
- });
28203
+ async requestFullScreen() {
28204
+ this.toggleFullScreen(true);
28263
28205
  }
28264
28206
  /** 退出全屏 */
28265
- exitFullScreen() {
28266
- return __awaiter$1(this, void 0, void 0, function* () {
28267
- this.toggleFullScreen(false);
28268
- });
28207
+ async exitFullScreen() {
28208
+ this.toggleFullScreen(false);
28269
28209
  }
28270
28210
  render() {
28271
28211
  const { controls, autoplay, loop, muted, poster, objectFit, isFirst, isMute, isFullScreen, showCenterPlayBtn, isPlaying, _enableDanmu, showMuteBtn, danmuBtn, showFullscreenBtn, nativeProps } = this;
@@ -28319,25 +28259,6 @@ let Video = class {
28319
28259
  };
28320
28260
  Video.style = indexCss;
28321
28261
 
28322
- var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
28323
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
28324
- return new (P || (P = Promise))(function (resolve, reject) {
28325
- function fulfilled(value) { try {
28326
- step(generator.next(value));
28327
- }
28328
- catch (e) {
28329
- reject(e);
28330
- } }
28331
- function rejected(value) { try {
28332
- step(generator["throw"](value));
28333
- }
28334
- catch (e) {
28335
- reject(e);
28336
- } }
28337
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
28338
- step((generator = generator.apply(thisArg, _arguments || [])).next());
28339
- });
28340
- };
28341
28262
  let VideoDanmu = class {
28342
28263
  constructor(hostRef) {
28343
28264
  registerInstance(this, hostRef);
@@ -28356,51 +28277,47 @@ let VideoDanmu = class {
28356
28277
  clonedDanmu.bottom = `${Math.random() * 90 + 5}%`;
28357
28278
  return clonedDanmu;
28358
28279
  }
28359
- sendDanmu(danmuList = []) {
28360
- return __awaiter(this, void 0, void 0, function* () {
28361
- if (Array.isArray(danmuList)) {
28362
- this.list = [
28363
- ...this.list,
28364
- ...danmuList.map(danmu => this.ensureProperties(danmu))
28365
- ];
28366
- }
28367
- else {
28368
- const danmu = danmuList;
28369
- this.list = [
28370
- ...this.list,
28371
- Object.assign({}, this.ensureProperties(danmu))
28372
- ];
28373
- }
28374
- });
28280
+ async sendDanmu(danmuList = []) {
28281
+ if (Array.isArray(danmuList)) {
28282
+ this.list = [
28283
+ ...this.list,
28284
+ ...danmuList.map(danmu => this.ensureProperties(danmu))
28285
+ ];
28286
+ }
28287
+ else {
28288
+ const danmu = danmuList;
28289
+ this.list = [
28290
+ ...this.list,
28291
+ Object.assign({}, this.ensureProperties(danmu))
28292
+ ];
28293
+ }
28375
28294
  }
28376
- tick(currentTime) {
28377
- return __awaiter(this, void 0, void 0, function* () {
28378
- this.currentTime = currentTime;
28379
- if (!this.enable)
28380
- return;
28381
- const danmuList = this.list;
28382
- /**
28383
- * @todo 这个判断对拖拽进度的处理不严谨
28384
- */
28385
- const newDanmuList = danmuList.filter(({ time }) => {
28386
- return currentTime - time < 4 && currentTime > time;
28387
- });
28388
- let shouldUpdate = false;
28389
- const oldDanmuList = this.danmuList;
28390
- if (newDanmuList.length !== oldDanmuList.length) {
28391
- shouldUpdate = true;
28392
- }
28393
- else {
28394
- shouldUpdate = newDanmuList.some(({ key }) => {
28395
- return oldDanmuList.every((danmu) => {
28396
- return key !== danmu.key;
28397
- });
28398
- });
28399
- }
28400
- if (shouldUpdate) {
28401
- this.danmuList = newDanmuList;
28402
- }
28295
+ async tick(currentTime) {
28296
+ this.currentTime = currentTime;
28297
+ if (!this.enable)
28298
+ return;
28299
+ const danmuList = this.list;
28300
+ /**
28301
+ * @todo 这个判断对拖拽进度的处理不严谨
28302
+ */
28303
+ const newDanmuList = danmuList.filter(({ time }) => {
28304
+ return currentTime - time < 4 && currentTime > time;
28403
28305
  });
28306
+ let shouldUpdate = false;
28307
+ const oldDanmuList = this.danmuList;
28308
+ if (newDanmuList.length !== oldDanmuList.length) {
28309
+ shouldUpdate = true;
28310
+ }
28311
+ else {
28312
+ shouldUpdate = newDanmuList.some(({ key }) => {
28313
+ return oldDanmuList.every((danmu) => {
28314
+ return key !== danmu.key;
28315
+ });
28316
+ });
28317
+ }
28318
+ if (shouldUpdate) {
28319
+ this.danmuList = newDanmuList;
28320
+ }
28404
28321
  }
28405
28322
  componentDidUpdate() {
28406
28323
  requestAnimationFrame(() => {
@@ -1 +1 @@
1
- import{p as promiseResolve,b as bootstrapLazy}from"./index-8809c729.js";var patchEsm=function(){return promiseResolve()};var defineCustomElements=function(o,e){if(typeof window==="undefined")return Promise.resolve();return patchEsm().then((function(){return bootstrapLazy([["taro-checkbox-core_2",[[4,"taro-checkbox-core",{name:[1],value:[1],color:[1],id:[1025],checked:[4],disabled:[4],nativeProps:[16],isWillLoadCalled:[32]}],[0,"taro-checkbox-group-core",{name:[8]},[[0,"checkboxchange","function"]]]]],["taro-radio-core_2",[[4,"taro-radio-core",{name:[1],value:[1],id:[1025],checked:[1028],disabled:[4],nativeProps:[16],isWillLoadCalled:[32]}],[0,"taro-radio-group-core",{name:[8]},[[0,"radiochange","function"]]]]],["taro-swiper-core_2",[[4,"taro-swiper-core",{indicatorDots:[4,"indicator-dots"],indicatorColor:[1,"indicator-color"],indicatorActiveColor:[1,"indicator-active-color"],autoplay:[4],current:[2],interval:[2],duration:[2],circular:[4],vertical:[4],previousMargin:[1,"previous-margin"],nextMargin:[1,"next-margin"],displayMultipleItems:[2,"display-multiple-items"],full:[4],swiperWrapper:[32],swiper:[32],isWillLoadCalled:[32],observer:[32],observerFirst:[32],observerLast:[32]}],[0,"taro-swiper-item-core",{itemId:[1,"item-id"]}]]],["taro-ad-core",[[0,"taro-ad-core"]]],["taro-ad-custom-core",[[0,"taro-ad-custom-core"]]],["taro-audio-core",[[0,"taro-audio-core",{src:[1],controls:[4],autoplay:[4],loop:[4],muted:[4],nativeProps:[16]}]]],["taro-block-core",[[0,"taro-block-core"]]],["taro-button-core",[[4,"taro-button-core",{disabled:[4],hoverClass:[1,"hover-class"],type:[1],hoverStartTime:[2,"hover-start-time"],hoverStayTime:[2,"hover-stay-time"],size:[1],plain:[4],loading:[4],formType:[1,"form-type"],hover:[32],touch:[32]},[[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]]]],["taro-camera-core",[[0,"taro-camera-core"]]],["taro-canvas-core",[[0,"taro-canvas-core",{canvasId:[1,"canvas-id"],nativeProps:[16]}]]],["taro-cover-image-core",[[0,"taro-cover-image-core",{src:[1],nativeProps:[16]}]]],["taro-cover-view-core",[[4,"taro-cover-view-core",{animation:[1],hoverClass:[1,"hover-class"],hoverStartTime:[2,"hover-start-time"],hoverStayTime:[2,"hover-stay-time"],hover:[32],touch:[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["taro-custom-wrapper-core",[[0,"taro-custom-wrapper-core"]]],["taro-editor-core",[[0,"taro-editor-core"]]],["taro-form-core",[[4,"taro-form-core",{slotParent:[32]},[[0,"tarobuttonsubmit","onButtonSubmit"],[0,"tarobuttonreset","onButtonReset"]]]]],["taro-functional-page-navigator-core",[[0,"taro-functional-page-navigator-core"]]],["taro-icon-core",[[0,"taro-icon-core",{type:[1],size:[8],color:[1]}]]],["taro-image-core",[[0,"taro-image-core",{src:[1],mode:[1],lazyLoad:[4,"lazy-load"],nativeProps:[16],aspectFillMode:[32]}]]],["taro-input-core",[[0,"taro-input-core",{value:[1],type:[1],password:[4],placeholder:[1],disabled:[4],maxlength:[2],autoFocus:[4,"auto-focus"],confirmType:[1,"confirm-type"],name:[1],nativeProps:[16]}]]],["taro-keyboard-accessory-core",[[0,"taro-keyboard-accessory-core"]]],["taro-label-core",[[4,"taro-label-core",{for:[1]}]]],["taro-live-player-core",[[0,"taro-live-player-core"]]],["taro-live-pusher-core",[[0,"taro-live-pusher-core"]]],["taro-map-core",[[0,"taro-map-core"]]],["taro-match-media-core",[[0,"taro-match-media-core"]]],["taro-movable-area-core",[[0,"taro-movable-area-core",{scaleArea:[4,"scale-area"]}]]],["taro-movable-view-core",[[0,"taro-movable-view-core",{x:[8],y:[8],direction:[1],outOfBounds:[4,"out-of-bounds"],inertia:[4],friction:[2],damping:[2],disabled:[4],scale:[4],scaleMin:[2,"scale-min"],scaleMax:[2,"scale-max"],scaleValue:[2,"scale-value"],animation:[4],setParent:[64],endScale:[64],setScale:[64]}]]],["taro-navigation-bar-core",[[0,"taro-navigation-bar-core"]]],["taro-navigator-core",[[0,"taro-navigator-core",{hoverClass:[1,"hover-class"],url:[1],openType:[1,"open-type"],isHover:[4,"is-hover"],delta:[2]},[[0,"click","onClick"]]]]],["taro-official-account-core",[[0,"taro-official-account-core"]]],["taro-open-data-core",[[0,"taro-open-data-core"]]],["taro-page-container-core",[[0,"taro-page-container-core"]]],["taro-page-meta-core",[[0,"taro-page-meta-core"]]],["taro-picker-view-column-core",[[0,"taro-picker-view-column-core",{col:[1],initialPosition:[1,"initial-position"],paddingVertical:[2,"padding-vertical"],isInit:[32],isMove:[32]},[[1,"scroll","onScroll"],[1,"mouseup","onMouseEnd"],[1,"mouseout","onMouseEnd"],[1,"mouseleave","onMouseEnd"],[1,"touchend","onTouchEnd"]]]]],["taro-picker-view-core",[[4,"taro-picker-view-core",{indicatorStyle:[1,"indicator-style"],indicatorClass:[1,"indicator-class"],value:[16],maskStyle:[1,"mask-style"],maskClass:[1,"mask-class"]},[[0,"onselect","onSelect"],[0,"onselectstart","onSelectStart"],[0,"onselectend","onPickerColEnd"]]]]],["taro-progress-core",[[0,"taro-progress-core",{percent:[2],showInfo:[4,"show-info"],borderRadius:[8,"border-radius"],fontSize:[8,"font-size"],strokeWidth:[8,"stroke-width"],activeColor:[1,"active-color"],backgroundColor:[1,"background-color"],active:[4]}]]],["taro-pull-to-refresh",[[4,"taro-pull-to-refresh",{prefixCls:[1,"prefix-cls"],distanceToRefresh:[2,"distance-to-refresh"],damping:[2],indicator:[16],currSt:[32],dragOnEdge:[32]}]]],["taro-rich-text-core",[[0,"taro-rich-text-core",{nodes:[1]}]]],["taro-root-portal-core",[[0,"taro-root-portal-core"]]],["taro-scroll-view-core",[[4,"taro-scroll-view-core",{scrollX:[4,"scroll-x"],scrollY:[4,"scroll-y"],upperThreshold:[8,"upper-threshold"],lowerThreshold:[8,"lower-threshold"],mpScrollTop:[8,"scroll-top"],mpScrollLeft:[8,"scroll-left"],mpScrollIntoView:[1,"scroll-into-view"],scrollWithAnimation:[4,"scroll-with-animation"]}]]],["taro-share-element-core",[[0,"taro-share-element-core"]]],["taro-slider-core",[[0,"taro-slider-core",{min:[2],max:[2],step:[2],disabled:[4],value:[1026],activeColor:[1,"active-color"],backgroundColor:[1,"background-color"],blockSize:[2,"block-size"],blockColor:[1,"block-color"],showValue:[4,"show-value"],name:[1],val:[32],totalWidth:[32],touching:[32],ogX:[32],touchId:[32],percent:[32],ogPercent:[32],isWillLoadCalled:[32]}]]],["taro-slot-core",[[0,"taro-slot-core"]]],["taro-switch-core",[[0,"taro-switch-core",{type:[1],checked:[4],color:[1],name:[1],disabled:[4],nativeProps:[16],isChecked:[32],isWillLoadCalled:[32]}]]],["taro-tabbar",[[0,"taro-tabbar",{conf:[16],list:[32],borderStyle:[32],backgroundColor:[32],color:[32],selectedColor:[32],selectedIndex:[32],status:[32]}]]],["taro-text-core",[[4,"taro-text-core",{selectable:[4]}]]],["taro-textarea-core",[[0,"taro-textarea-core",{value:[1],placeholder:[1],disabled:[4],maxlength:[2],autoFocus:[4,"auto-focus"],autoHeight:[4,"auto-height"],name:[1],nativeProps:[16],line:[32]}]]],["taro-view-core",[[4,"taro-view-core",{animation:[1],hoverClass:[1,"hover-class"],hoverStartTime:[2,"hover-start-time"],hoverStayTime:[2,"hover-stay-time"],hover:[32],touch:[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["taro-voip-room-core",[[0,"taro-voip-room-core"]]],["taro-web-view-core",[[0,"taro-web-view-core",{src:[1]}]]],["taro-picker-core_2",[[4,"taro-picker-core",{mode:[1],disabled:[4],range:[16],rangeKey:[1,"range-key"],value:[8],start:[1],end:[1],fields:[1],name:[1],pickerValue:[32],height:[32],hidden:[32],fadeOut:[32],isWillLoadCalled:[32]}],[0,"taro-picker-group",{mode:[1],range:[16],rangeKey:[1,"range-key"],height:[2],columnId:[1,"column-id"],updateHeight:[16],onColumnChange:[16],updateDay:[16],startY:[32],preY:[32],hadMove:[32],touchEnd:[32],isMove:[32]},[[1,"mousedown","onMouseDown"],[1,"mousemove","onMouseMove"],[1,"mouseup","onMouseMoveEnd"],[1,"mouseleave","onMouseMoveEnd"],[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["taro-video-control_3",[[0,"taro-video-core",{src:[1],duration:[2],controls:[4],autoplay:[4],loop:[4],muted:[4],initialTime:[2,"initial-time"],poster:[1],objectFit:[1,"object-fit"],showProgress:[4,"show-progress"],showFullscreenBtn:[4,"show-fullscreen-btn"],showPlayBtn:[4,"show-play-btn"],showCenterPlayBtn:[4,"show-center-play-btn"],showMuteBtn:[4,"show-mute-btn"],danmuList:[16],danmuBtn:[4,"danmu-btn"],enableDanmu:[4,"enable-danmu"],enablePlayGesture:[4,"enable-play-gesture"],enableProgressGesture:[4,"enable-progress-gesture"],vslideGesture:[4,"vslide-gesture"],vslideGestureInFullscreen:[4,"vslide-gesture-in-fullscreen"],nativeProps:[16],_duration:[32],_enableDanmu:[32],isPlaying:[32],isFirst:[32],isFullScreen:[32],fullScreenTimestamp:[32],isMute:[32],play:[64],pause:[64],stop:[64],seek:[64],requestFullScreen:[64],exitFullScreen:[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[4,"taro-video-control",{controls:[4],currentTime:[2,"current-time"],duration:[2],isPlaying:[4,"is-playing"],pauseFunc:[16],playFunc:[16],seekFunc:[16],showPlayBtn:[4,"show-play-btn"],showProgress:[4,"show-progress"],setProgressBall:[64],toggleVisibility:[64],getIsDraggingProgressBall:[64],setCurrentTime:[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[0,"taro-video-danmu",{enable:[4],danmuList:[32],sendDanmu:[64],tick:[64]}]]]],e)}))};export{defineCustomElements};
1
+ import{p as promiseResolve,b as bootstrapLazy}from"./index-8809c729.js";var patchEsm=function(){return promiseResolve()};var defineCustomElements=function(o,e){if(typeof window==="undefined")return Promise.resolve();return patchEsm().then((function(){return bootstrapLazy([["taro-checkbox-core_2",[[4,"taro-checkbox-core",{name:[1],value:[1],color:[1],id:[1025],checked:[4],disabled:[4],nativeProps:[16],isWillLoadCalled:[32]}],[0,"taro-checkbox-group-core",{name:[8]},[[0,"checkboxchange","function"]]]]],["taro-radio-core_2",[[4,"taro-radio-core",{name:[1],value:[1],id:[1025],checked:[1028],disabled:[4],nativeProps:[16],isWillLoadCalled:[32]}],[0,"taro-radio-group-core",{name:[8]},[[0,"radiochange","function"]]]]],["taro-swiper-core_2",[[4,"taro-swiper-core",{indicatorDots:[4,"indicator-dots"],indicatorColor:[1,"indicator-color"],indicatorActiveColor:[1,"indicator-active-color"],autoplay:[4],current:[2],interval:[2],duration:[2],circular:[4],vertical:[4],previousMargin:[1,"previous-margin"],nextMargin:[1,"next-margin"],displayMultipleItems:[2,"display-multiple-items"],full:[4],zoom:[4],swiperWrapper:[32],swiper:[32],isWillLoadCalled:[32],observer:[32],observerFirst:[32],observerLast:[32]}],[0,"taro-swiper-item-core",{itemId:[1,"item-id"]}]]],["taro-ad-core",[[0,"taro-ad-core"]]],["taro-ad-custom-core",[[0,"taro-ad-custom-core"]]],["taro-audio-core",[[0,"taro-audio-core",{src:[1],controls:[4],autoplay:[4],loop:[4],muted:[4],nativeProps:[16]}]]],["taro-block-core",[[0,"taro-block-core"]]],["taro-button-core",[[4,"taro-button-core",{disabled:[4],hoverClass:[1,"hover-class"],type:[1],hoverStartTime:[2,"hover-start-time"],hoverStayTime:[2,"hover-stay-time"],size:[1],plain:[4],loading:[4],formType:[1,"form-type"],hover:[32],touch:[32]},[[0,"click","onClick"],[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]]]],["taro-camera-core",[[0,"taro-camera-core"]]],["taro-canvas-core",[[0,"taro-canvas-core",{canvasId:[1,"canvas-id"],nativeProps:[16]}]]],["taro-cover-image-core",[[0,"taro-cover-image-core",{src:[1],nativeProps:[16]}]]],["taro-cover-view-core",[[4,"taro-cover-view-core",{animation:[1],hoverClass:[1,"hover-class"],hoverStartTime:[2,"hover-start-time"],hoverStayTime:[2,"hover-stay-time"],hover:[32],touch:[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["taro-custom-wrapper-core",[[0,"taro-custom-wrapper-core"]]],["taro-editor-core",[[0,"taro-editor-core"]]],["taro-form-core",[[4,"taro-form-core",{slotParent:[32]},[[0,"tarobuttonsubmit","onButtonSubmit"],[0,"tarobuttonreset","onButtonReset"]]]]],["taro-functional-page-navigator-core",[[0,"taro-functional-page-navigator-core"]]],["taro-icon-core",[[0,"taro-icon-core",{type:[1],size:[8],color:[1]}]]],["taro-image-core",[[0,"taro-image-core",{src:[1],mode:[1],lazyLoad:[4,"lazy-load"],nativeProps:[16],aspectFillMode:[32]}]]],["taro-input-core",[[0,"taro-input-core",{value:[1],type:[1],password:[4],placeholder:[1],disabled:[4],maxlength:[2],autoFocus:[4,"auto-focus"],confirmType:[1,"confirm-type"],name:[1],nativeProps:[16]}]]],["taro-keyboard-accessory-core",[[0,"taro-keyboard-accessory-core"]]],["taro-label-core",[[4,"taro-label-core",{for:[1]}]]],["taro-live-player-core",[[0,"taro-live-player-core"]]],["taro-live-pusher-core",[[0,"taro-live-pusher-core"]]],["taro-map-core",[[0,"taro-map-core"]]],["taro-match-media-core",[[0,"taro-match-media-core"]]],["taro-movable-area-core",[[0,"taro-movable-area-core",{scaleArea:[4,"scale-area"]}]]],["taro-movable-view-core",[[0,"taro-movable-view-core",{x:[8],y:[8],direction:[1],outOfBounds:[4,"out-of-bounds"],inertia:[4],friction:[2],damping:[2],disabled:[4],scale:[4],scaleMin:[2,"scale-min"],scaleMax:[2,"scale-max"],scaleValue:[2,"scale-value"],animation:[4],setParent:[64],endScale:[64],setScale:[64]}]]],["taro-navigation-bar-core",[[0,"taro-navigation-bar-core"]]],["taro-navigator-core",[[0,"taro-navigator-core",{hoverClass:[1,"hover-class"],url:[1],openType:[1,"open-type"],isHover:[4,"is-hover"],delta:[2]},[[0,"click","onClick"]]]]],["taro-official-account-core",[[0,"taro-official-account-core"]]],["taro-open-data-core",[[0,"taro-open-data-core"]]],["taro-page-container-core",[[0,"taro-page-container-core"]]],["taro-page-meta-core",[[0,"taro-page-meta-core"]]],["taro-picker-view-column-core",[[0,"taro-picker-view-column-core",{col:[1],initialPosition:[1,"initial-position"],paddingVertical:[2,"padding-vertical"],isInit:[32],isMove:[32]},[[1,"scroll","onScroll"],[1,"mouseup","onMouseEnd"],[1,"mouseout","onMouseEnd"],[1,"mouseleave","onMouseEnd"],[1,"touchend","onTouchEnd"]]]]],["taro-picker-view-core",[[4,"taro-picker-view-core",{indicatorStyle:[1,"indicator-style"],indicatorClass:[1,"indicator-class"],value:[16],maskStyle:[1,"mask-style"],maskClass:[1,"mask-class"]},[[0,"onselect","onSelect"],[0,"onselectstart","onSelectStart"],[0,"onselectend","onPickerColEnd"]]]]],["taro-progress-core",[[0,"taro-progress-core",{percent:[2],showInfo:[4,"show-info"],borderRadius:[8,"border-radius"],fontSize:[8,"font-size"],strokeWidth:[8,"stroke-width"],activeColor:[1,"active-color"],backgroundColor:[1,"background-color"],active:[4]}]]],["taro-pull-to-refresh",[[4,"taro-pull-to-refresh",{prefixCls:[1,"prefix-cls"],distanceToRefresh:[2,"distance-to-refresh"],damping:[2],indicator:[16],currSt:[32],dragOnEdge:[32]}]]],["taro-rich-text-core",[[0,"taro-rich-text-core",{nodes:[1]}]]],["taro-root-portal-core",[[0,"taro-root-portal-core"]]],["taro-scroll-view-core",[[4,"taro-scroll-view-core",{scrollX:[4,"scroll-x"],scrollY:[4,"scroll-y"],upperThreshold:[8,"upper-threshold"],lowerThreshold:[8,"lower-threshold"],mpScrollTop:[8,"scroll-top"],mpScrollLeft:[8,"scroll-left"],mpScrollIntoView:[1,"scroll-into-view"],scrollWithAnimation:[4,"scroll-with-animation"]}]]],["taro-share-element-core",[[0,"taro-share-element-core"]]],["taro-slider-core",[[0,"taro-slider-core",{min:[2],max:[2],step:[2],disabled:[4],value:[1026],activeColor:[1,"active-color"],backgroundColor:[1,"background-color"],blockSize:[2,"block-size"],blockColor:[1,"block-color"],showValue:[4,"show-value"],name:[1],val:[32],totalWidth:[32],touching:[32],ogX:[32],touchId:[32],percent:[32],ogPercent:[32],isWillLoadCalled:[32]}]]],["taro-slot-core",[[0,"taro-slot-core"]]],["taro-switch-core",[[0,"taro-switch-core",{type:[1],checked:[4],color:[1],name:[1],disabled:[4],nativeProps:[16],isChecked:[32],isWillLoadCalled:[32]}]]],["taro-tabbar",[[0,"taro-tabbar",{conf:[16],list:[32],borderStyle:[32],backgroundColor:[32],color:[32],selectedColor:[32],selectedIndex:[32],status:[32]}]]],["taro-text-core",[[4,"taro-text-core",{selectable:[4]}]]],["taro-textarea-core",[[0,"taro-textarea-core",{value:[1],placeholder:[1],disabled:[4],maxlength:[2],autoFocus:[4,"auto-focus"],autoHeight:[4,"auto-height"],name:[1],nativeProps:[16],line:[32]}]]],["taro-view-core",[[4,"taro-view-core",{animation:[1],hoverClass:[1,"hover-class"],hoverStartTime:[2,"hover-start-time"],hoverStayTime:[2,"hover-stay-time"],hover:[32],touch:[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["taro-voip-room-core",[[0,"taro-voip-room-core"]]],["taro-web-view-core",[[0,"taro-web-view-core",{src:[1]}]]],["taro-picker-core_2",[[4,"taro-picker-core",{mode:[1],disabled:[4],range:[16],rangeKey:[1,"range-key"],value:[8],start:[1],end:[1],fields:[1],name:[1],pickerValue:[32],height:[32],hidden:[32],fadeOut:[32],isWillLoadCalled:[32]}],[0,"taro-picker-group",{mode:[1],range:[16],rangeKey:[1,"range-key"],height:[2],columnId:[1,"column-id"],updateHeight:[16],onColumnChange:[16],updateDay:[16],startY:[32],preY:[32],hadMove:[32],touchEnd:[32],isMove:[32]},[[1,"mousedown","onMouseDown"],[1,"mousemove","onMouseMove"],[1,"mouseup","onMouseMoveEnd"],[1,"mouseleave","onMouseMoveEnd"],[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["taro-video-control_3",[[0,"taro-video-core",{src:[1],duration:[2],controls:[4],autoplay:[4],loop:[4],muted:[4],initialTime:[2,"initial-time"],poster:[1],objectFit:[1,"object-fit"],showProgress:[4,"show-progress"],showFullscreenBtn:[4,"show-fullscreen-btn"],showPlayBtn:[4,"show-play-btn"],showCenterPlayBtn:[4,"show-center-play-btn"],showMuteBtn:[4,"show-mute-btn"],danmuList:[16],danmuBtn:[4,"danmu-btn"],enableDanmu:[4,"enable-danmu"],enablePlayGesture:[4,"enable-play-gesture"],enableProgressGesture:[4,"enable-progress-gesture"],vslideGesture:[4,"vslide-gesture"],vslideGestureInFullscreen:[4,"vslide-gesture-in-fullscreen"],nativeProps:[16],_duration:[32],_enableDanmu:[32],isPlaying:[32],isFirst:[32],isFullScreen:[32],fullScreenTimestamp:[32],isMute:[32],play:[64],pause:[64],stop:[64],seek:[64],requestFullScreen:[64],exitFullScreen:[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[4,"taro-video-control",{controls:[4],currentTime:[2,"current-time"],duration:[2],isPlaying:[4,"is-playing"],pauseFunc:[16],playFunc:[16],seekFunc:[16],showPlayBtn:[4,"show-play-btn"],showProgress:[4,"show-progress"],setProgressBall:[64],toggleVisibility:[64],getIsDraggingProgressBall:[64],setCurrentTime:[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[0,"taro-video-danmu",{enable:[4],danmuList:[32],sendDanmu:[64],tick:[64]}]]]],e)}))};export{defineCustomElements};
@@ -1 +1 @@
1
- import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-8809c729.js";import{c as classnames}from"./index-1d8e8acd.js";var indexCss='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)}';var Button=function(){function o(o){registerInstance(this,o);this.onSubmit=createEvent(this,"tarobuttonsubmit",7);this.onReset=createEvent(this,"tarobuttonreset",7);this.hoverClass="button-hover";this.type="";this.hoverStartTime=20;this.hoverStayTime=70;this.loading=false;this.formType=null;this.hover=false;this.touch=false}o.prototype.onTouchStart=function(){var o=this;if(this.disabled){return}this.touch=true;if(this.hoverClass&&!this.disabled){setTimeout((function(){if(o.touch){o.hover=true}}),this.hoverStartTime)}};o.prototype.onTouchEnd=function(){var o=this;if(this.disabled){return}this.touch=false;if(this.hoverClass&&!this.disabled){setTimeout((function(){if(!o.touch){o.hover=false}}),this.hoverStayTime)}if(this.formType==="submit"){this.onSubmit.emit()}else if(this.formType==="reset"){this.onReset.emit()}};o.prototype.render=function(){var o;var t=this,r=t.disabled,e=t.hoverClass,a=t.type,i=t.size,n=t.plain,c=t.loading,l=t.hover;var d=classnames((o={},o[""+e]=l&&!r,o));return h(Host,{class:d,type:a,plain:n,loading:c,size:i,disabled:r},c&&h("i",{class:"weui-loading"}),h("slot",null))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return o}();Button.style=indexCss;export{Button as taro_button_core};
1
+ import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-8809c729.js";import{c as classnames}from"./index-1d8e8acd.js";var indexCss='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)}';var Button=function(){function o(o){registerInstance(this,o);this.onSubmit=createEvent(this,"tarobuttonsubmit",7);this.onReset=createEvent(this,"tarobuttonreset",7);this.hoverClass="button-hover";this.type="";this.hoverStartTime=20;this.hoverStayTime=70;this.loading=false;this.formType=null;this.hover=false;this.touch=false}o.prototype.onClick=function(o){if(this.disabled){o.stopPropagation()}};o.prototype.onTouchStart=function(){var o=this;if(this.disabled){return}this.touch=true;if(this.hoverClass&&!this.disabled){setTimeout((function(){if(o.touch){o.hover=true}}),this.hoverStartTime)}};o.prototype.onTouchEnd=function(){var o=this;if(this.disabled){return}this.touch=false;if(this.hoverClass&&!this.disabled){setTimeout((function(){if(!o.touch){o.hover=false}}),this.hoverStayTime)}if(this.formType==="submit"){this.onSubmit.emit()}else if(this.formType==="reset"){this.onReset.emit()}};o.prototype.render=function(){var o;var t=this,r=t.disabled,e=t.hoverClass,a=t.type,i=t.size,n=t.plain,c=t.loading,l=t.hover;var d=classnames((o={},o[""+e]=l&&!r,o));return h(Host,{class:d,type:a,plain:n,loading:c,size:i,disabled:r},c&&h("i",{class:"weui-loading"}),h("slot",null))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return o}();Button.style=indexCss;export{Button as taro_button_core};
@@ -1 +1 @@
1
- import{p as promiseResolve,b as bootstrapLazy}from"./index-8809c729.js";var patchBrowser=function(){var o=import.meta.url;var e={};if(o!==""){e.resourcesUrl=new URL(".",o).href}return promiseResolve(e)};patchBrowser().then((function(o){return bootstrapLazy([["taro-checkbox-core_2",[[4,"taro-checkbox-core",{name:[1],value:[1],color:[1],id:[1025],checked:[4],disabled:[4],nativeProps:[16],isWillLoadCalled:[32]}],[0,"taro-checkbox-group-core",{name:[8]},[[0,"checkboxchange","function"]]]]],["taro-radio-core_2",[[4,"taro-radio-core",{name:[1],value:[1],id:[1025],checked:[1028],disabled:[4],nativeProps:[16],isWillLoadCalled:[32]}],[0,"taro-radio-group-core",{name:[8]},[[0,"radiochange","function"]]]]],["taro-swiper-core_2",[[4,"taro-swiper-core",{indicatorDots:[4,"indicator-dots"],indicatorColor:[1,"indicator-color"],indicatorActiveColor:[1,"indicator-active-color"],autoplay:[4],current:[2],interval:[2],duration:[2],circular:[4],vertical:[4],previousMargin:[1,"previous-margin"],nextMargin:[1,"next-margin"],displayMultipleItems:[2,"display-multiple-items"],full:[4],swiperWrapper:[32],swiper:[32],isWillLoadCalled:[32],observer:[32],observerFirst:[32],observerLast:[32]}],[0,"taro-swiper-item-core",{itemId:[1,"item-id"]}]]],["taro-ad-core",[[0,"taro-ad-core"]]],["taro-ad-custom-core",[[0,"taro-ad-custom-core"]]],["taro-audio-core",[[0,"taro-audio-core",{src:[1],controls:[4],autoplay:[4],loop:[4],muted:[4],nativeProps:[16]}]]],["taro-block-core",[[0,"taro-block-core"]]],["taro-button-core",[[4,"taro-button-core",{disabled:[4],hoverClass:[1,"hover-class"],type:[1],hoverStartTime:[2,"hover-start-time"],hoverStayTime:[2,"hover-stay-time"],size:[1],plain:[4],loading:[4],formType:[1,"form-type"],hover:[32],touch:[32]},[[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]]]],["taro-camera-core",[[0,"taro-camera-core"]]],["taro-canvas-core",[[0,"taro-canvas-core",{canvasId:[1,"canvas-id"],nativeProps:[16]}]]],["taro-cover-image-core",[[0,"taro-cover-image-core",{src:[1],nativeProps:[16]}]]],["taro-cover-view-core",[[4,"taro-cover-view-core",{animation:[1],hoverClass:[1,"hover-class"],hoverStartTime:[2,"hover-start-time"],hoverStayTime:[2,"hover-stay-time"],hover:[32],touch:[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["taro-custom-wrapper-core",[[0,"taro-custom-wrapper-core"]]],["taro-editor-core",[[0,"taro-editor-core"]]],["taro-form-core",[[4,"taro-form-core",{slotParent:[32]},[[0,"tarobuttonsubmit","onButtonSubmit"],[0,"tarobuttonreset","onButtonReset"]]]]],["taro-functional-page-navigator-core",[[0,"taro-functional-page-navigator-core"]]],["taro-icon-core",[[0,"taro-icon-core",{type:[1],size:[8],color:[1]}]]],["taro-image-core",[[0,"taro-image-core",{src:[1],mode:[1],lazyLoad:[4,"lazy-load"],nativeProps:[16],aspectFillMode:[32]}]]],["taro-input-core",[[0,"taro-input-core",{value:[1],type:[1],password:[4],placeholder:[1],disabled:[4],maxlength:[2],autoFocus:[4,"auto-focus"],confirmType:[1,"confirm-type"],name:[1],nativeProps:[16]}]]],["taro-keyboard-accessory-core",[[0,"taro-keyboard-accessory-core"]]],["taro-label-core",[[4,"taro-label-core",{for:[1]}]]],["taro-live-player-core",[[0,"taro-live-player-core"]]],["taro-live-pusher-core",[[0,"taro-live-pusher-core"]]],["taro-map-core",[[0,"taro-map-core"]]],["taro-match-media-core",[[0,"taro-match-media-core"]]],["taro-movable-area-core",[[0,"taro-movable-area-core",{scaleArea:[4,"scale-area"]}]]],["taro-movable-view-core",[[0,"taro-movable-view-core",{x:[8],y:[8],direction:[1],outOfBounds:[4,"out-of-bounds"],inertia:[4],friction:[2],damping:[2],disabled:[4],scale:[4],scaleMin:[2,"scale-min"],scaleMax:[2,"scale-max"],scaleValue:[2,"scale-value"],animation:[4],setParent:[64],endScale:[64],setScale:[64]}]]],["taro-navigation-bar-core",[[0,"taro-navigation-bar-core"]]],["taro-navigator-core",[[0,"taro-navigator-core",{hoverClass:[1,"hover-class"],url:[1],openType:[1,"open-type"],isHover:[4,"is-hover"],delta:[2]},[[0,"click","onClick"]]]]],["taro-official-account-core",[[0,"taro-official-account-core"]]],["taro-open-data-core",[[0,"taro-open-data-core"]]],["taro-page-container-core",[[0,"taro-page-container-core"]]],["taro-page-meta-core",[[0,"taro-page-meta-core"]]],["taro-picker-view-column-core",[[0,"taro-picker-view-column-core",{col:[1],initialPosition:[1,"initial-position"],paddingVertical:[2,"padding-vertical"],isInit:[32],isMove:[32]},[[1,"scroll","onScroll"],[1,"mouseup","onMouseEnd"],[1,"mouseout","onMouseEnd"],[1,"mouseleave","onMouseEnd"],[1,"touchend","onTouchEnd"]]]]],["taro-picker-view-core",[[4,"taro-picker-view-core",{indicatorStyle:[1,"indicator-style"],indicatorClass:[1,"indicator-class"],value:[16],maskStyle:[1,"mask-style"],maskClass:[1,"mask-class"]},[[0,"onselect","onSelect"],[0,"onselectstart","onSelectStart"],[0,"onselectend","onPickerColEnd"]]]]],["taro-progress-core",[[0,"taro-progress-core",{percent:[2],showInfo:[4,"show-info"],borderRadius:[8,"border-radius"],fontSize:[8,"font-size"],strokeWidth:[8,"stroke-width"],activeColor:[1,"active-color"],backgroundColor:[1,"background-color"],active:[4]}]]],["taro-pull-to-refresh",[[4,"taro-pull-to-refresh",{prefixCls:[1,"prefix-cls"],distanceToRefresh:[2,"distance-to-refresh"],damping:[2],indicator:[16],currSt:[32],dragOnEdge:[32]}]]],["taro-rich-text-core",[[0,"taro-rich-text-core",{nodes:[1]}]]],["taro-root-portal-core",[[0,"taro-root-portal-core"]]],["taro-scroll-view-core",[[4,"taro-scroll-view-core",{scrollX:[4,"scroll-x"],scrollY:[4,"scroll-y"],upperThreshold:[8,"upper-threshold"],lowerThreshold:[8,"lower-threshold"],mpScrollTop:[8,"scroll-top"],mpScrollLeft:[8,"scroll-left"],mpScrollIntoView:[1,"scroll-into-view"],scrollWithAnimation:[4,"scroll-with-animation"]}]]],["taro-share-element-core",[[0,"taro-share-element-core"]]],["taro-slider-core",[[0,"taro-slider-core",{min:[2],max:[2],step:[2],disabled:[4],value:[1026],activeColor:[1,"active-color"],backgroundColor:[1,"background-color"],blockSize:[2,"block-size"],blockColor:[1,"block-color"],showValue:[4,"show-value"],name:[1],val:[32],totalWidth:[32],touching:[32],ogX:[32],touchId:[32],percent:[32],ogPercent:[32],isWillLoadCalled:[32]}]]],["taro-slot-core",[[0,"taro-slot-core"]]],["taro-switch-core",[[0,"taro-switch-core",{type:[1],checked:[4],color:[1],name:[1],disabled:[4],nativeProps:[16],isChecked:[32],isWillLoadCalled:[32]}]]],["taro-tabbar",[[0,"taro-tabbar",{conf:[16],list:[32],borderStyle:[32],backgroundColor:[32],color:[32],selectedColor:[32],selectedIndex:[32],status:[32]}]]],["taro-text-core",[[4,"taro-text-core",{selectable:[4]}]]],["taro-textarea-core",[[0,"taro-textarea-core",{value:[1],placeholder:[1],disabled:[4],maxlength:[2],autoFocus:[4,"auto-focus"],autoHeight:[4,"auto-height"],name:[1],nativeProps:[16],line:[32]}]]],["taro-view-core",[[4,"taro-view-core",{animation:[1],hoverClass:[1,"hover-class"],hoverStartTime:[2,"hover-start-time"],hoverStayTime:[2,"hover-stay-time"],hover:[32],touch:[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["taro-voip-room-core",[[0,"taro-voip-room-core"]]],["taro-web-view-core",[[0,"taro-web-view-core",{src:[1]}]]],["taro-picker-core_2",[[4,"taro-picker-core",{mode:[1],disabled:[4],range:[16],rangeKey:[1,"range-key"],value:[8],start:[1],end:[1],fields:[1],name:[1],pickerValue:[32],height:[32],hidden:[32],fadeOut:[32],isWillLoadCalled:[32]}],[0,"taro-picker-group",{mode:[1],range:[16],rangeKey:[1,"range-key"],height:[2],columnId:[1,"column-id"],updateHeight:[16],onColumnChange:[16],updateDay:[16],startY:[32],preY:[32],hadMove:[32],touchEnd:[32],isMove:[32]},[[1,"mousedown","onMouseDown"],[1,"mousemove","onMouseMove"],[1,"mouseup","onMouseMoveEnd"],[1,"mouseleave","onMouseMoveEnd"],[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["taro-video-control_3",[[0,"taro-video-core",{src:[1],duration:[2],controls:[4],autoplay:[4],loop:[4],muted:[4],initialTime:[2,"initial-time"],poster:[1],objectFit:[1,"object-fit"],showProgress:[4,"show-progress"],showFullscreenBtn:[4,"show-fullscreen-btn"],showPlayBtn:[4,"show-play-btn"],showCenterPlayBtn:[4,"show-center-play-btn"],showMuteBtn:[4,"show-mute-btn"],danmuList:[16],danmuBtn:[4,"danmu-btn"],enableDanmu:[4,"enable-danmu"],enablePlayGesture:[4,"enable-play-gesture"],enableProgressGesture:[4,"enable-progress-gesture"],vslideGesture:[4,"vslide-gesture"],vslideGestureInFullscreen:[4,"vslide-gesture-in-fullscreen"],nativeProps:[16],_duration:[32],_enableDanmu:[32],isPlaying:[32],isFirst:[32],isFullScreen:[32],fullScreenTimestamp:[32],isMute:[32],play:[64],pause:[64],stop:[64],seek:[64],requestFullScreen:[64],exitFullScreen:[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[4,"taro-video-control",{controls:[4],currentTime:[2,"current-time"],duration:[2],isPlaying:[4,"is-playing"],pauseFunc:[16],playFunc:[16],seekFunc:[16],showPlayBtn:[4,"show-play-btn"],showProgress:[4,"show-progress"],setProgressBall:[64],toggleVisibility:[64],getIsDraggingProgressBall:[64],setCurrentTime:[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[0,"taro-video-danmu",{enable:[4],danmuList:[32],sendDanmu:[64],tick:[64]}]]]],o)}));
1
+ import{p as promiseResolve,b as bootstrapLazy}from"./index-8809c729.js";var patchBrowser=function(){var o=import.meta.url;var e={};if(o!==""){e.resourcesUrl=new URL(".",o).href}return promiseResolve(e)};patchBrowser().then((function(o){return bootstrapLazy([["taro-checkbox-core_2",[[4,"taro-checkbox-core",{name:[1],value:[1],color:[1],id:[1025],checked:[4],disabled:[4],nativeProps:[16],isWillLoadCalled:[32]}],[0,"taro-checkbox-group-core",{name:[8]},[[0,"checkboxchange","function"]]]]],["taro-radio-core_2",[[4,"taro-radio-core",{name:[1],value:[1],id:[1025],checked:[1028],disabled:[4],nativeProps:[16],isWillLoadCalled:[32]}],[0,"taro-radio-group-core",{name:[8]},[[0,"radiochange","function"]]]]],["taro-swiper-core_2",[[4,"taro-swiper-core",{indicatorDots:[4,"indicator-dots"],indicatorColor:[1,"indicator-color"],indicatorActiveColor:[1,"indicator-active-color"],autoplay:[4],current:[2],interval:[2],duration:[2],circular:[4],vertical:[4],previousMargin:[1,"previous-margin"],nextMargin:[1,"next-margin"],displayMultipleItems:[2,"display-multiple-items"],full:[4],zoom:[4],swiperWrapper:[32],swiper:[32],isWillLoadCalled:[32],observer:[32],observerFirst:[32],observerLast:[32]}],[0,"taro-swiper-item-core",{itemId:[1,"item-id"]}]]],["taro-ad-core",[[0,"taro-ad-core"]]],["taro-ad-custom-core",[[0,"taro-ad-custom-core"]]],["taro-audio-core",[[0,"taro-audio-core",{src:[1],controls:[4],autoplay:[4],loop:[4],muted:[4],nativeProps:[16]}]]],["taro-block-core",[[0,"taro-block-core"]]],["taro-button-core",[[4,"taro-button-core",{disabled:[4],hoverClass:[1,"hover-class"],type:[1],hoverStartTime:[2,"hover-start-time"],hoverStayTime:[2,"hover-stay-time"],size:[1],plain:[4],loading:[4],formType:[1,"form-type"],hover:[32],touch:[32]},[[0,"click","onClick"],[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]]]],["taro-camera-core",[[0,"taro-camera-core"]]],["taro-canvas-core",[[0,"taro-canvas-core",{canvasId:[1,"canvas-id"],nativeProps:[16]}]]],["taro-cover-image-core",[[0,"taro-cover-image-core",{src:[1],nativeProps:[16]}]]],["taro-cover-view-core",[[4,"taro-cover-view-core",{animation:[1],hoverClass:[1,"hover-class"],hoverStartTime:[2,"hover-start-time"],hoverStayTime:[2,"hover-stay-time"],hover:[32],touch:[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["taro-custom-wrapper-core",[[0,"taro-custom-wrapper-core"]]],["taro-editor-core",[[0,"taro-editor-core"]]],["taro-form-core",[[4,"taro-form-core",{slotParent:[32]},[[0,"tarobuttonsubmit","onButtonSubmit"],[0,"tarobuttonreset","onButtonReset"]]]]],["taro-functional-page-navigator-core",[[0,"taro-functional-page-navigator-core"]]],["taro-icon-core",[[0,"taro-icon-core",{type:[1],size:[8],color:[1]}]]],["taro-image-core",[[0,"taro-image-core",{src:[1],mode:[1],lazyLoad:[4,"lazy-load"],nativeProps:[16],aspectFillMode:[32]}]]],["taro-input-core",[[0,"taro-input-core",{value:[1],type:[1],password:[4],placeholder:[1],disabled:[4],maxlength:[2],autoFocus:[4,"auto-focus"],confirmType:[1,"confirm-type"],name:[1],nativeProps:[16]}]]],["taro-keyboard-accessory-core",[[0,"taro-keyboard-accessory-core"]]],["taro-label-core",[[4,"taro-label-core",{for:[1]}]]],["taro-live-player-core",[[0,"taro-live-player-core"]]],["taro-live-pusher-core",[[0,"taro-live-pusher-core"]]],["taro-map-core",[[0,"taro-map-core"]]],["taro-match-media-core",[[0,"taro-match-media-core"]]],["taro-movable-area-core",[[0,"taro-movable-area-core",{scaleArea:[4,"scale-area"]}]]],["taro-movable-view-core",[[0,"taro-movable-view-core",{x:[8],y:[8],direction:[1],outOfBounds:[4,"out-of-bounds"],inertia:[4],friction:[2],damping:[2],disabled:[4],scale:[4],scaleMin:[2,"scale-min"],scaleMax:[2,"scale-max"],scaleValue:[2,"scale-value"],animation:[4],setParent:[64],endScale:[64],setScale:[64]}]]],["taro-navigation-bar-core",[[0,"taro-navigation-bar-core"]]],["taro-navigator-core",[[0,"taro-navigator-core",{hoverClass:[1,"hover-class"],url:[1],openType:[1,"open-type"],isHover:[4,"is-hover"],delta:[2]},[[0,"click","onClick"]]]]],["taro-official-account-core",[[0,"taro-official-account-core"]]],["taro-open-data-core",[[0,"taro-open-data-core"]]],["taro-page-container-core",[[0,"taro-page-container-core"]]],["taro-page-meta-core",[[0,"taro-page-meta-core"]]],["taro-picker-view-column-core",[[0,"taro-picker-view-column-core",{col:[1],initialPosition:[1,"initial-position"],paddingVertical:[2,"padding-vertical"],isInit:[32],isMove:[32]},[[1,"scroll","onScroll"],[1,"mouseup","onMouseEnd"],[1,"mouseout","onMouseEnd"],[1,"mouseleave","onMouseEnd"],[1,"touchend","onTouchEnd"]]]]],["taro-picker-view-core",[[4,"taro-picker-view-core",{indicatorStyle:[1,"indicator-style"],indicatorClass:[1,"indicator-class"],value:[16],maskStyle:[1,"mask-style"],maskClass:[1,"mask-class"]},[[0,"onselect","onSelect"],[0,"onselectstart","onSelectStart"],[0,"onselectend","onPickerColEnd"]]]]],["taro-progress-core",[[0,"taro-progress-core",{percent:[2],showInfo:[4,"show-info"],borderRadius:[8,"border-radius"],fontSize:[8,"font-size"],strokeWidth:[8,"stroke-width"],activeColor:[1,"active-color"],backgroundColor:[1,"background-color"],active:[4]}]]],["taro-pull-to-refresh",[[4,"taro-pull-to-refresh",{prefixCls:[1,"prefix-cls"],distanceToRefresh:[2,"distance-to-refresh"],damping:[2],indicator:[16],currSt:[32],dragOnEdge:[32]}]]],["taro-rich-text-core",[[0,"taro-rich-text-core",{nodes:[1]}]]],["taro-root-portal-core",[[0,"taro-root-portal-core"]]],["taro-scroll-view-core",[[4,"taro-scroll-view-core",{scrollX:[4,"scroll-x"],scrollY:[4,"scroll-y"],upperThreshold:[8,"upper-threshold"],lowerThreshold:[8,"lower-threshold"],mpScrollTop:[8,"scroll-top"],mpScrollLeft:[8,"scroll-left"],mpScrollIntoView:[1,"scroll-into-view"],scrollWithAnimation:[4,"scroll-with-animation"]}]]],["taro-share-element-core",[[0,"taro-share-element-core"]]],["taro-slider-core",[[0,"taro-slider-core",{min:[2],max:[2],step:[2],disabled:[4],value:[1026],activeColor:[1,"active-color"],backgroundColor:[1,"background-color"],blockSize:[2,"block-size"],blockColor:[1,"block-color"],showValue:[4,"show-value"],name:[1],val:[32],totalWidth:[32],touching:[32],ogX:[32],touchId:[32],percent:[32],ogPercent:[32],isWillLoadCalled:[32]}]]],["taro-slot-core",[[0,"taro-slot-core"]]],["taro-switch-core",[[0,"taro-switch-core",{type:[1],checked:[4],color:[1],name:[1],disabled:[4],nativeProps:[16],isChecked:[32],isWillLoadCalled:[32]}]]],["taro-tabbar",[[0,"taro-tabbar",{conf:[16],list:[32],borderStyle:[32],backgroundColor:[32],color:[32],selectedColor:[32],selectedIndex:[32],status:[32]}]]],["taro-text-core",[[4,"taro-text-core",{selectable:[4]}]]],["taro-textarea-core",[[0,"taro-textarea-core",{value:[1],placeholder:[1],disabled:[4],maxlength:[2],autoFocus:[4,"auto-focus"],autoHeight:[4,"auto-height"],name:[1],nativeProps:[16],line:[32]}]]],["taro-view-core",[[4,"taro-view-core",{animation:[1],hoverClass:[1,"hover-class"],hoverStartTime:[2,"hover-start-time"],hoverStayTime:[2,"hover-stay-time"],hover:[32],touch:[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["taro-voip-room-core",[[0,"taro-voip-room-core"]]],["taro-web-view-core",[[0,"taro-web-view-core",{src:[1]}]]],["taro-picker-core_2",[[4,"taro-picker-core",{mode:[1],disabled:[4],range:[16],rangeKey:[1,"range-key"],value:[8],start:[1],end:[1],fields:[1],name:[1],pickerValue:[32],height:[32],hidden:[32],fadeOut:[32],isWillLoadCalled:[32]}],[0,"taro-picker-group",{mode:[1],range:[16],rangeKey:[1,"range-key"],height:[2],columnId:[1,"column-id"],updateHeight:[16],onColumnChange:[16],updateDay:[16],startY:[32],preY:[32],hadMove:[32],touchEnd:[32],isMove:[32]},[[1,"mousedown","onMouseDown"],[1,"mousemove","onMouseMove"],[1,"mouseup","onMouseMoveEnd"],[1,"mouseleave","onMouseMoveEnd"],[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["taro-video-control_3",[[0,"taro-video-core",{src:[1],duration:[2],controls:[4],autoplay:[4],loop:[4],muted:[4],initialTime:[2,"initial-time"],poster:[1],objectFit:[1,"object-fit"],showProgress:[4,"show-progress"],showFullscreenBtn:[4,"show-fullscreen-btn"],showPlayBtn:[4,"show-play-btn"],showCenterPlayBtn:[4,"show-center-play-btn"],showMuteBtn:[4,"show-mute-btn"],danmuList:[16],danmuBtn:[4,"danmu-btn"],enableDanmu:[4,"enable-danmu"],enablePlayGesture:[4,"enable-play-gesture"],enableProgressGesture:[4,"enable-progress-gesture"],vslideGesture:[4,"vslide-gesture"],vslideGestureInFullscreen:[4,"vslide-gesture-in-fullscreen"],nativeProps:[16],_duration:[32],_enableDanmu:[32],isPlaying:[32],isFirst:[32],isFullScreen:[32],fullScreenTimestamp:[32],isMute:[32],play:[64],pause:[64],stop:[64],seek:[64],requestFullScreen:[64],exitFullScreen:[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[4,"taro-video-control",{controls:[4],currentTime:[2,"current-time"],duration:[2],isPlaying:[4,"is-playing"],pauseFunc:[16],playFunc:[16],seekFunc:[16],showPlayBtn:[4,"show-play-btn"],showProgress:[4,"show-progress"],setProgressBall:[64],toggleVisibility:[64],getIsDraggingProgressBall:[64],setCurrentTime:[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[0,"taro-video-danmu",{enable:[4],danmuList:[32],sendDanmu:[64],tick:[64]}]]]],o)}));
@@ -1 +1 @@
1
- import{r as registerInstance,h,g as getElement,H as Host}from"./index-8809c729.js";var areaCss="taro-movable-area-core{display:block;height:10px;width:10px;position:relative}";var MovableArea=function(){function e(e){var t=this;registerInstance(this,e);this.views=[];this.scaleLength=0;this.viewsChanged=function(){t.views=[];var e=t.element.querySelectorAll("taro-movable-view-core");Array.from(e).forEach((function(e){t.views.push(e)}));t.updateArea()};this.handleTouchStart=function(e){var a=e.touches;if(!a||a.length<=1){return}var n={width:a[1].pageX-a[0].pageX,height:a[1].pageY-a[0].pageY};t.scaleLength=Math.sqrt(n.width*n.width+n.height*n.height);if(t.scaleArea){return}var r=function(e,t){var a=function(e,t){if(!(e=e.parentNode)){return false}return(!(e instanceof HTMLElement)||e!==document.body)&&(e===t||e===t.element||e.element===t||a(e,t))};for(var n=0;n<t.length;n++){var r=t[n];if(e===r["element"]||a(e,r)){return r}}};var i=r(a[0].target,t.views);var o=r(a[1].target,t.views);t.scaleTarget=i&&i===o?i:undefined};this.handleTouchMove=function(e){var a=e.touches;if(!a||a.length<=1){return}e.preventDefault();var n={width:a[1].pageX-a[0].pageX,height:a[1].pageY-a[0].pageY};if(t.scaleLength>0){t.updateScale(Math.sqrt(n.width*n.width+n.height*n.height)/t.scaleLength)}};this.handleTouchEnd=function(e){var a,n;if(e.touches&&e.touches.length||!e.changedTouches){return}t.scaleLength=0;if(t.scaleArea){t.views.forEach((function(e){var t;(t=e["endScale"])===null||t===void 0?void 0:t.call(e)}))}else{(n=(a=t.scaleTarget)===null||a===void 0?void 0:a["endScale"])===null||n===void 0?void 0:n.call(a)}t.scaleTarget=undefined};this.updateScale=function(e){var a,n;if(!e||e===1){return}if(t.scaleArea){t.views.forEach((function(t){var a;(a=t["setScale"])===null||a===void 0?void 0:a.call(t,e)}))}else{(n=(a=t.scaleTarget)===null||a===void 0?void 0:a["setScale"])===null||n===void 0?void 0:n.call(a,e)}};this.updateArea=function(){var e=window.getComputedStyle(t.element);var a=t.element.getBoundingClientRect();var n=["Left","Right"].map((function(t){return parseFloat(e["border"+t+"Width"])+parseFloat(e["padding"+t])}));var r=["Top","Bottom"].map((function(t){return parseFloat(e["border"+t+"Width"])+parseFloat(e["padding"+t])}));t.views.forEach((function(e){var i;(i=e["setParent"])===null||i===void 0?void 0:i.call(e,{element:t.element,area:{height:a.height-r[0]-r[1],width:a.width-n[0]-n[1]}})}))}}e.prototype.connectedCallback=function(){var e=this;this.observer=new MutationObserver((function(t){t.forEach((function(t){var a,n;if(t.attributeName==="class"||t.attributeName==="style"){var r=e.element.offsetWidth;var i=e.element.offsetHeight;if(r!==((a=e.offset)===null||a===void 0?void 0:a.width)||i!==((n=e.offset)===null||n===void 0?void 0:n.height)){e.updateArea()}e.offset={width:r,height:i}}}))}));this.observer.observe(this.element,{attributes:true})};e.prototype.disconnectedCallback=function(){var e;(e=this.observer)===null||e===void 0?void 0:e.disconnect()};e.prototype.componentDidLoad=function(){this.viewsChanged()};e.prototype.render=function(){return h(Host,{onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd})};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();MovableArea.style=areaCss;export{MovableArea as taro_movable_area_core};
1
+ import{r as registerInstance,h,g as getElement,H as Host}from"./index-8809c729.js";var areaCss="taro-movable-area-core{display:block;position:relative;width:10px;height:10px}";var MovableArea=function(){function e(e){var t=this;registerInstance(this,e);this.views=[];this.scaleLength=0;this.viewsChanged=function(){t.views=[];var e=t.element.querySelectorAll("taro-movable-view-core");Array.from(e).forEach((function(e){t.views.push(e)}));t.updateArea()};this.handleTouchStart=function(e){var a=e.touches;if(!a||a.length<=1){return}var n={width:a[1].pageX-a[0].pageX,height:a[1].pageY-a[0].pageY};t.scaleLength=Math.sqrt(n.width*n.width+n.height*n.height);if(t.scaleArea){return}var r=function(e,t){var a=function(e,t){if(!(e=e.parentNode)){return false}return(!(e instanceof HTMLElement)||e!==document.body)&&(e===t||e===t.element||e.element===t||a(e,t))};for(var n=0;n<t.length;n++){var r=t[n];if(e===r["element"]||a(e,r)){return r}}};var i=r(a[0].target,t.views);var o=r(a[1].target,t.views);t.scaleTarget=i&&i===o?i:undefined};this.handleTouchMove=function(e){var a=e.touches;if(!a||a.length<=1){return}e.preventDefault();var n={width:a[1].pageX-a[0].pageX,height:a[1].pageY-a[0].pageY};if(t.scaleLength>0){t.updateScale(Math.sqrt(n.width*n.width+n.height*n.height)/t.scaleLength)}};this.handleTouchEnd=function(e){var a,n;if(e.touches&&e.touches.length||!e.changedTouches){return}t.scaleLength=0;if(t.scaleArea){t.views.forEach((function(e){var t;(t=e["endScale"])===null||t===void 0?void 0:t.call(e)}))}else{(n=(a=t.scaleTarget)===null||a===void 0?void 0:a["endScale"])===null||n===void 0?void 0:n.call(a)}t.scaleTarget=undefined};this.updateScale=function(e){var a,n;if(!e||e===1){return}if(t.scaleArea){t.views.forEach((function(t){var a;(a=t["setScale"])===null||a===void 0?void 0:a.call(t,e)}))}else{(n=(a=t.scaleTarget)===null||a===void 0?void 0:a["setScale"])===null||n===void 0?void 0:n.call(a,e)}};this.updateArea=function(){var e=window.getComputedStyle(t.element);var a=t.element.getBoundingClientRect();var n=["Left","Right"].map((function(t){return parseFloat(e["border"+t+"Width"])+parseFloat(e["padding"+t])}));var r=["Top","Bottom"].map((function(t){return parseFloat(e["border"+t+"Width"])+parseFloat(e["padding"+t])}));t.views.forEach((function(e){var i;(i=e["setParent"])===null||i===void 0?void 0:i.call(e,{element:t.element,area:{height:a.height-r[0]-r[1],width:a.width-n[0]-n[1]}})}))}}e.prototype.connectedCallback=function(){var e=this;this.observer=new MutationObserver((function(t){t.forEach((function(t){var a,n;if(t.attributeName==="class"||t.attributeName==="style"){var r=e.element.offsetWidth;var i=e.element.offsetHeight;if(r!==((a=e.offset)===null||a===void 0?void 0:a.width)||i!==((n=e.offset)===null||n===void 0?void 0:n.height)){e.updateArea()}e.offset={width:r,height:i}}}))}));this.observer.observe(this.element,{attributes:true})};e.prototype.disconnectedCallback=function(){var e;(e=this.observer)===null||e===void 0?void 0:e.disconnect()};e.prototype.componentDidLoad=function(){this.viewsChanged()};e.prototype.render=function(){return h(Host,{onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd})};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();MovableArea.style=areaCss;export{MovableArea as taro_movable_area_core};
@@ -1 +1 @@
1
- var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},a,i,r,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(t){return function(e){return c([t,e])}}function c(s){if(a)throw new TypeError("Generator is already executing.");while(n)try{if(a=1,i&&(r=s[0]&2?i["return"]:s[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;if(i=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){n.label=s[1];break}if(s[0]===6&&n.label<r[1]){n.label=r[1];r=s;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(s);break}if(r[2])n.ops.pop();n.trys.pop();continue}s=e.call(t,n)}catch(t){s=[6,t];i=0}finally{a=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,g as getElement,H as Host}from"./index-8809c729.js";var viewCss="taro-movable-view-core{display:inline-block;position:absolute;left:0;top:0;width:10px;height:10px}";var __awaiter=undefined&&undefined.__awaiter||function(t,e,n,a){function i(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,r){function s(t){try{c(a.next(t))}catch(t){r(t)}}function o(t){try{c(a["throw"](t))}catch(t){r(t)}}function c(t){t.done?n(t.value):i(t.value).then(s,o)}c((a=a.apply(t,e||[])).next())}))};var MovableView=function(){function t(t){var e=this;registerInstance(this,t);this.onChange=createEvent(this,"change",7);this.onScale=createEvent(this,"scale",7);this.onHTouchMove=createEvent(this,"htouchmove",7);this.onVTouchMove=createEvent(this,"vtouchmove",7);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;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=function(t,n){var a=false;t>e.maxX?(t=e.maxX,a=true):t<e.minX&&(t=e.minX,a=true);n>e.maxY?(n=e.maxY,a=true):n<e.minY&&(n=e.minY,a=true);return{x:t,y:n,outOfBounds:a}};this.animationTo=function(t,n,a,i,r,s,o){if(e.animation){e.setTransform(t,n,a,i,r,s);o===null||o===void 0?void 0:o()}else{e.setTransform(t,n,a,i,r,s)}};this.setTransform=function(t,n,a,i,r,s){t=Number(t.toFixed(1));n=Number(n.toFixed(1));a=Number((a!==null&&a!==void 0?a:e.currentScale).toFixed(3));if(!e.outOfBounds){var o=e.getLimitXY(t,n);t=o.x;n=o.y}var c=function(t,e){return+((1e3*t-1e3*e)/1e3).toFixed(1)};var l=c(t,e.scaleOffset.x);var u=c(n,e.scaleOffset.y);if(e.translateX!==t||e.translateY!==n){!r&&e.onChange.emit({x:l,y:u,source:i})}if(a!==e.currentScale){s&&e.onScale.emit({scale:a,x:l,y:u})}var h="translateX("+t+"px) translateY("+n+"px) translateZ(0px) scale("+a+")";e.element.style.transform=h;e.element.style.webkitTransform=h;e.translateX=t;e.translateY=n;e.currentScale=a};this.updateOffset=function(){var t=function(e,n){if(e===n||!e.offsetParent){return{left:0,top:0}}var a=t(e.offsetParent,n);return{left:e.offsetLeft+a.left,top:e.offsetTop+a.top}};if(!e.parent){return}var n=t(e.element,e.parent);e.offset.x=n.left;e.offset.y=n.top};this.updateScaleOffset=function(t){if(t===void 0){t=e.currentScale}var n=e.element.getBoundingClientRect();e.height=n.height/e.currentScale;e.width=n.width/e.currentScale;e.scaleOffset.x=(e.width*t-e.width)/2;e.scaleOffset.y=(e.height*t-e.height)/2};this.updateBoundary=function(){var t=0-e.offset.x+e.scaleOffset.x;var n=e.area.width-e.width-e.offset.x-e.scaleOffset.x;e.minX=Math.min(t,n);e.maxX=Math.max(t,n);var a=0-e.offset.y+e.scaleOffset.y;var i=e.area.height-e.height-e.offset.y-e.scaleOffset.y;e.minY=Math.min(a,i);e.maxY=Math.max(a,i)};this.updateScale=function(t,n,a){if(!e.scale){return}var i=e.adjustScale(t);e.updateScaleOffset(i);e.updateBoundary();var r=e.getLimitXY(e.translateX,e.translateY),s=r.x,o=r.y;if(n){e.animationTo(s,o,i,"",true,true,a)}else if(!e.updating){e.updating=true;requestAnimationFrame((function(){e.setTransform(s,o,i,"",true,true);e.updating=false}))}};this.setOriginScale=function(t){e.originScale=t};this.adjustScale=function(t){return Math.min(10,e.scaleMax,Math.max(.5,e.scaleMin,t))};this.handleTouchStart=function(t){var n=t.touches;if(e.disabled||n.length>1||!e.element){return}var a=n[0];e.touching=true;e.firstMoveFireEvent=false;e.origin.x=a.screenX;e.origin.y=a.screenY;e.baseX=e.translateX;e.baseY=e.translateY;e.element.style.willChange="transform"};this.handleTouchMove=function(t){var n=t.touches;if(e.disabled||!e.element||e.scaling||!e.touching||n.length>1){return}t.preventDefault();var a=n[0];var i=a.screenX-e.origin.x;var r=a.screenY-e.origin.y;e.setTransform(e.xMove?i+e.baseX:0,e.yMove?r+e.baseY:0);if(!e.firstMoveFireEvent){e.firstMoveFireEvent=true;var s=Math.abs(i)>Math.abs(r)?e.onHTouchMove:e.onVTouchMove;s.emit({originalEvent:t,bubbles:false,capturePhase:false,composed:true,extraFields:{touches:t.touches||{},changedTouches:t.changedTouches||{}}})}};this.handleTouchEnd=function(t){var n=t.changedTouches[0];if(e.disabled||!e.touching||!n){return}e.touching=false;var a=n.screenX-e.origin.x;var i=n.screenY-e.origin.y;e.setTransform(e.xMove?a+e.baseX:0,e.yMove?i+e.baseY:0)}}t.prototype.watchX=function(t){this.setTransform(parseFloat(""+(t||0)),this.translateY)};t.prototype.watchY=function(t){this.setTransform(this.translateX,parseFloat(""+(t||0)))};t.prototype.watchScaleMinOrMax=function(){if(!this.scale)return false;this.updateScale(this.currentScale,true);this.setOriginScale(this.currentScale)};t.prototype.watchScaleValue=function(t){if(!this.scale){return false}this.updateScale(t,true);this.setOriginScale(t);return t};t.prototype.setParent=function(t){var e=t.element,n=t.area;return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(a){t=this.scale?this.scaleValue:1;this.area=n;this.parent=e;this.updateOffset();this.updateScaleOffset(t);this.updateBoundary();this.setTransform(Number(this.x)+this.scaleOffset.x,Number(this.y)+this.scaleOffset.y,t,"",true);this.setOriginScale(t);return[2]}))}))};t.prototype.endScale=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.scaling=false;this.setOriginScale(this.currentScale);return[2]}))}))};t.prototype.setScale=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.scale){return[2]}this.scaling=true;this.updateScale(t*this.originScale);return[2]}))}))};t.prototype.connectedCallback=function(){var t=this;this.observer=new MutationObserver((function(e){e.forEach((function(e){var n=e.attributeName;if(n&&["class","style"].includes(n)){var a=e.oldValue;var i=e.target.getAttribute(n);if(a===i){return}var r=function(t){return t===null||t===void 0?void 0:t.split(";").filter((function(t){return!["transform","will-change"].find((function(e){return t.trim().startsWith(e)}))})).join(";")};if(n==="style"&&r(i)===r(a)){return}t.updateOffset();t.updateScaleOffset();t.updateBoundary();t.setTransform(t.translateX,t.translateY)}}))}));this.observer.observe(this.element,{attributes:true,attributeOldValue:true})};t.prototype.disconnectedCallback=function(){var t;(t=this.observer)===null||t===void 0?void 0:t.disconnect()};t.prototype.componentDidLoad=function(){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){var t=parseFloat(""+(this.x||0));var e=parseFloat(""+(this.y||0));this.setTransform(t,e)}};t.prototype.render=function(){return h(Host,{onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd})};Object.defineProperty(t.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{x:["watchX"],y:["watchY"],scaleMin:["watchScaleMinOrMax"],scaleMax:["watchScaleMinOrMax"],scaleValue:["watchScaleValue"]}},enumerable:false,configurable:true});return t}();MovableView.style=viewCss;export{MovableView as taro_movable_view_core};
1
+ var __awaiter=this&&this.__awaiter||function(t,e,a,n){function i(t){return t instanceof a?t:new a((function(e){e(t)}))}return new(a||(a=Promise))((function(a,r){function s(t){try{c(n.next(t))}catch(t){r(t)}}function o(t){try{c(n["throw"](t))}catch(t){r(t)}}function c(t){t.done?a(t.value):i(t.value).then(s,o)}c((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var a={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(t){return function(e){return c([t,e])}}function c(s){if(n)throw new TypeError("Generator is already executing.");while(a)try{if(n=1,i&&(r=s[0]&2?i["return"]:s[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;if(i=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:a.label++;return{value:s[1],done:false};case 5:a.label++;i=s[1];s=[0];continue;case 7:s=a.ops.pop();a.trys.pop();continue;default:if(!(r=a.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){a=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){a.label=s[1];break}if(s[0]===6&&a.label<r[1]){a.label=r[1];r=s;break}if(r&&a.label<r[2]){a.label=r[2];a.ops.push(s);break}if(r[2])a.ops.pop();a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t];i=0}finally{n=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,g as getElement,H as Host}from"./index-8809c729.js";var viewCss="taro-movable-view-core{display:inline-block;position:absolute;left:0;top:0;width:10px;height:10px}";var MovableView=function(){function t(t){var e=this;registerInstance(this,t);this.onChange=createEvent(this,"change",7);this.onScale=createEvent(this,"scale",7);this.onHTouchMove=createEvent(this,"htouchmove",7);this.onVTouchMove=createEvent(this,"vtouchmove",7);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;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=function(t,a){var n=false;t>e.maxX?(t=e.maxX,n=true):t<e.minX&&(t=e.minX,n=true);a>e.maxY?(a=e.maxY,n=true):a<e.minY&&(a=e.minY,n=true);return{x:t,y:a,outOfBounds:n}};this.animationTo=function(t,a,n,i,r,s,o){if(e.animation){e.setTransform(t,a,n,i,r,s);o===null||o===void 0?void 0:o()}else{e.setTransform(t,a,n,i,r,s)}};this.setTransform=function(t,a,n,i,r,s){t=Number(t.toFixed(1));a=Number(a.toFixed(1));n=Number((n!==null&&n!==void 0?n:e.currentScale).toFixed(3));if(!e.outOfBounds){var o=e.getLimitXY(t,a);t=o.x;a=o.y}var c=function(t,e){return+((1e3*t-1e3*e)/1e3).toFixed(1)};var l=c(t,e.scaleOffset.x);var u=c(a,e.scaleOffset.y);if(e.translateX!==t||e.translateY!==a){!r&&e.onChange.emit({x:l,y:u,source:i})}if(n!==e.currentScale){s&&e.onScale.emit({scale:n,x:l,y:u})}var h="translateX("+t+"px) translateY("+a+"px) translateZ(0px) scale("+n+")";e.element.style.transform=h;e.element.style.webkitTransform=h;e.translateX=t;e.translateY=a;e.currentScale=n};this.updateOffset=function(){var t=function(e,a){if(e===a||!e.offsetParent){return{left:0,top:0}}var n=t(e.offsetParent,a);return{left:e.offsetLeft+n.left,top:e.offsetTop+n.top}};if(!e.parent){return}var a=t(e.element,e.parent);e.offset.x=a.left;e.offset.y=a.top};this.updateScaleOffset=function(t){if(t===void 0){t=e.currentScale}var a=e.element.getBoundingClientRect();e.height=a.height/e.currentScale;e.width=a.width/e.currentScale;e.scaleOffset.x=(e.width*t-e.width)/2;e.scaleOffset.y=(e.height*t-e.height)/2};this.updateBoundary=function(){var t=0-e.offset.x+e.scaleOffset.x;var a=e.area.width-e.width-e.offset.x-e.scaleOffset.x;e.minX=Math.min(t,a);e.maxX=Math.max(t,a);var n=0-e.offset.y+e.scaleOffset.y;var i=e.area.height-e.height-e.offset.y-e.scaleOffset.y;e.minY=Math.min(n,i);e.maxY=Math.max(n,i)};this.updateScale=function(t,a,n){if(!e.scale){return}var i=e.adjustScale(t);e.updateScaleOffset(i);e.updateBoundary();var r=e.getLimitXY(e.translateX,e.translateY),s=r.x,o=r.y;if(a){e.animationTo(s,o,i,"",true,true,n)}else if(!e.updating){e.updating=true;requestAnimationFrame((function(){e.setTransform(s,o,i,"",true,true);e.updating=false}))}};this.setOriginScale=function(t){e.originScale=t};this.adjustScale=function(t){return Math.min(10,e.scaleMax,Math.max(.5,e.scaleMin,t))};this.handleTouchStart=function(t){var a=t.touches;if(e.disabled||a.length>1||!e.element){return}var n=a[0];e.touching=true;e.firstMoveFireEvent=false;e.origin.x=n.screenX;e.origin.y=n.screenY;e.baseX=e.translateX;e.baseY=e.translateY;e.element.style.willChange="transform"};this.handleTouchMove=function(t){var a=t.touches;if(e.disabled||!e.element||e.scaling||!e.touching||a.length>1){return}t.preventDefault();var n=a[0];var i=n.screenX-e.origin.x;var r=n.screenY-e.origin.y;e.setTransform(e.xMove?i+e.baseX:0,e.yMove?r+e.baseY:0);if(!e.firstMoveFireEvent){e.firstMoveFireEvent=true;var s=Math.abs(i)>Math.abs(r)?e.onHTouchMove:e.onVTouchMove;s.emit({originalEvent:t,bubbles:false,capturePhase:false,composed:true,extraFields:{touches:t.touches||{},changedTouches:t.changedTouches||{}}})}};this.handleTouchEnd=function(t){var a=t.changedTouches[0];if(e.disabled||!e.touching||!a){return}e.touching=false;var n=a.screenX-e.origin.x;var i=a.screenY-e.origin.y;e.setTransform(e.xMove?n+e.baseX:0,e.yMove?i+e.baseY:0)}}t.prototype.watchX=function(t){this.setTransform(parseFloat(""+(t||0)),this.translateY)};t.prototype.watchY=function(t){this.setTransform(this.translateX,parseFloat(""+(t||0)))};t.prototype.watchScaleMinOrMax=function(){if(!this.scale)return false;this.updateScale(this.currentScale,true);this.setOriginScale(this.currentScale)};t.prototype.watchScaleValue=function(t){if(!this.scale){return false}this.updateScale(t,true);this.setOriginScale(t);return t};t.prototype.setParent=function(t){var e=t.element,a=t.area;return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){t=this.scale?this.scaleValue:1;this.area=a;this.parent=e;this.updateOffset();this.updateScaleOffset(t);this.updateBoundary();this.setTransform(Number(this.x)+this.scaleOffset.x,Number(this.y)+this.scaleOffset.y,t,"",true);this.setOriginScale(t);return[2]}))}))};t.prototype.endScale=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.scaling=false;this.setOriginScale(this.currentScale);return[2]}))}))};t.prototype.setScale=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.scale){return[2]}this.scaling=true;this.updateScale(t*this.originScale);return[2]}))}))};t.prototype.connectedCallback=function(){var t=this;this.observer=new MutationObserver((function(e){e.forEach((function(e){var a=e.attributeName;if(a&&["class","style"].includes(a)){var n=e.oldValue;var i=e.target.getAttribute(a);if(n===i){return}var r=function(t){return t===null||t===void 0?void 0:t.split(";").filter((function(t){return!["transform","will-change"].find((function(e){return t.trim().startsWith(e)}))})).join(";")};if(a==="style"&&r(i)===r(n)){return}t.updateOffset();t.updateScaleOffset();t.updateBoundary();t.setTransform(t.translateX,t.translateY)}}))}));this.observer.observe(this.element,{attributes:true,attributeOldValue:true})};t.prototype.disconnectedCallback=function(){var t;(t=this.observer)===null||t===void 0?void 0:t.disconnect()};t.prototype.componentDidLoad=function(){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){var t=parseFloat(""+(this.x||0));var e=parseFloat(""+(this.y||0));this.setTransform(t,e)}};t.prototype.render=function(){return h(Host,{onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd})};Object.defineProperty(t.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{x:["watchX"],y:["watchY"],scaleMin:["watchScaleMinOrMax"],scaleMax:["watchScaleMinOrMax"],scaleValue:["watchScaleValue"]}},enumerable:false,configurable:true});return t}();MovableView.style=viewCss;export{MovableView as taro_movable_view_core};