pb-sxp-ui 1.20.11 → 1.20.12

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 (33) hide show
  1. package/dist/index.cjs +175 -251
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +175 -251
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.cjs +7 -7
  6. package/dist/index.min.cjs.map +1 -1
  7. package/dist/index.min.js +7 -7
  8. package/dist/index.min.js.map +1 -1
  9. package/dist/pb-ui.js +175 -251
  10. package/dist/pb-ui.js.map +1 -1
  11. package/dist/pb-ui.min.js +7 -7
  12. package/dist/pb-ui.min.js.map +1 -1
  13. package/es/core/components/DiyPortalPreview/VideoWidget.js +8 -10
  14. package/es/core/components/SxpPageRender/LikeButton/index.js +18 -20
  15. package/es/core/components/SxpPageRender/PictureGroup/index.d.ts +0 -5
  16. package/es/core/components/SxpPageRender/PictureGroup/index.js +13 -39
  17. package/es/core/components/SxpPageRender/VideoWidget/index.js +46 -33
  18. package/es/core/components/SxpPageRender/WaterFall/index.js +3 -4
  19. package/es/core/components/SxpPageRender/index.js +40 -56
  20. package/es/core/context/SxpDataSourceProvider.d.ts +12 -5
  21. package/es/core/context/SxpDataSourceProvider.js +41 -84
  22. package/es/core/hooks/useEventReport.js +5 -6
  23. package/lib/core/components/DiyPortalPreview/VideoWidget.js +8 -10
  24. package/lib/core/components/SxpPageRender/LikeButton/index.js +18 -20
  25. package/lib/core/components/SxpPageRender/PictureGroup/index.d.ts +0 -5
  26. package/lib/core/components/SxpPageRender/PictureGroup/index.js +12 -38
  27. package/lib/core/components/SxpPageRender/VideoWidget/index.js +46 -33
  28. package/lib/core/components/SxpPageRender/WaterFall/index.js +3 -4
  29. package/lib/core/components/SxpPageRender/index.js +40 -56
  30. package/lib/core/context/SxpDataSourceProvider.d.ts +12 -5
  31. package/lib/core/context/SxpDataSourceProvider.js +41 -84
  32. package/lib/core/hooks/useEventReport.js +5 -6
  33. package/package.json +1 -1
@@ -4,50 +4,24 @@ const tslib_1 = require("tslib");
4
4
  const react_1 = tslib_1.__importStar(require("react"));
5
5
  const modules_1 = require("swiper/modules");
6
6
  const react_2 = require("swiper/react");
7
- const css_1 = require("@emotion/css");
8
7
  const Picture_1 = tslib_1.__importDefault(require("./Picture"));
9
8
  const hooks_1 = require("../../../../core/hooks");
9
+ const css_1 = require("@emotion/css");
10
10
  const event_1 = tslib_1.__importStar(require("../../../../core/utils/event"));
11
11
  const tool_1 = require("../../../../core/utils/tool");
12
- const PictureGroup = (0, react_1.forwardRef)(({ imgUrls, data, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig, swiperRef }, ref) => {
12
+ const PictureGroup = ({ imgUrls, width, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig }) => {
13
13
  var _a, _b;
14
14
  const { isActive } = (0, react_2.useSwiperSlide)();
15
- const { firstRtcList, openHashtag, isDiyH5 } = (0, hooks_1.useSxpDataSource)();
15
+ const { sxpParameter, openHashtag } = (0, hooks_1.useSxpDataSource)();
16
16
  const [isLoad, setIsLoad] = (0, react_1.useState)(false);
17
17
  const [imgInfo, setImgInfo] = (0, react_1.useState)();
18
18
  const [swiperActiveIndex, setSwiperActiveIndex] = (0, react_1.useState)(0);
19
- const imgsSwiperRef = (0, react_1.useRef)();
19
+ const swiperRef = (0, react_1.useRef)();
20
20
  const isFirstPlayRef = (0, react_1.useRef)(true);
21
- const loopPlayRef = (0, react_1.useRef)(true);
22
21
  const initTime = new Date();
23
- (0, react_1.useImperativeHandle)(ref, () => {
24
- return {
25
- setLoopPlay(v) {
26
- loopPlayRef.current = v;
27
- }
28
- };
29
- });
30
- (0, react_1.useEffect)(() => {
31
- let timerId;
32
- if (isLoad && isActive && isDiyH5) {
33
- timerId = setTimeout(() => {
34
- var _a, _b, _c, _d;
35
- if (!loopPlayRef.current)
36
- return;
37
- if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
38
- const i = (_b = (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper) === null || _b === void 0 ? void 0 : _b.activeIndex;
39
- (_d = (_c = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _c === void 0 ? void 0 : _c.swiper) === null || _d === void 0 ? void 0 : _d.slideTo(i + 1);
40
- }
41
- }, 3000);
42
- }
43
- return () => {
44
- if (timerId)
45
- clearTimeout(timerId);
46
- };
47
- }, [isLoad, isActive, isDiyH5, index, swiperRef, firstRtcList]);
48
22
  (0, react_1.useEffect)(() => {
49
23
  if (isLoad && isActive) {
50
- (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.start();
24
+ (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.start();
51
25
  if (openHashtag) {
52
26
  onViewImageEndEvent(rec);
53
27
  }
@@ -57,7 +31,7 @@ const PictureGroup = (0, react_1.forwardRef)(({ imgUrls, data, height, rec, inde
57
31
  }
58
32
  }
59
33
  else {
60
- (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.stop();
34
+ (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.stop();
61
35
  }
62
36
  }, [rec, isActive, onViewImageEndEvent, openHashtag, index, onViewImageStartEvent, isLoad, imgInfo]);
63
37
  const showFirstImageFn = (0, react_1.useCallback)((e) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
@@ -81,13 +55,13 @@ const PictureGroup = (0, react_1.forwardRef)(({ imgUrls, data, height, rec, inde
81
55
  };
82
56
  }, [isActive, imgInfo]);
83
57
  const handleMouseEnter = (0, react_1.useCallback)(() => {
84
- if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
85
- imgsSwiperRef.current.swiper.autoplay.stop();
58
+ if (swiperRef.current && swiperRef.current.swiper && isAlly) {
59
+ swiperRef.current.swiper.autoplay.stop();
86
60
  }
87
61
  }, []);
88
62
  const handleMouseLeave = (0, react_1.useCallback)(() => {
89
- if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
90
- imgsSwiperRef.current.swiper.autoplay.start();
63
+ if (swiperRef.current && swiperRef.current.swiper && isAlly) {
64
+ swiperRef.current.swiper.autoplay.start();
91
65
  }
92
66
  }, []);
93
67
  const handleSlideChange = (0, react_1.useCallback)((swiper) => {
@@ -108,7 +82,7 @@ const PictureGroup = (0, react_1.forwardRef)(({ imgUrls, data, height, rec, inde
108
82
  enabled: true
109
83
  }
110
84
  }
111
- : {}), { loop: true, ref: imgsSwiperRef, onSlideChange: handleSlideChange, className: (0, css_1.css)(Object.assign(Object.assign({ '.swiper-pagination': {
85
+ : {}), { loop: true, ref: swiperRef, onSlideChange: handleSlideChange, className: (0, css_1.css)(Object.assign(Object.assign({ '.swiper-pagination': {
112
86
  bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0,
113
87
  fontSize: '14px'
114
88
  } }, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor) && {
@@ -125,5 +99,5 @@ const PictureGroup = (0, react_1.forwardRef)(({ imgUrls, data, height, rec, inde
125
99
  return (react_1.default.createElement(react_2.SwiperSlide, { key: srcKey, "aria-hidden": srcKey !== swiperActiveIndex },
126
100
  react_1.default.createElement(Picture_1.default, { src: !isLoad && srcKey > 0 ? '' : url, height: height, imgUrlsPostConfig: imgUrlsPostConfig, onShowFirstImage: showFirstImageFn })));
127
101
  }))));
128
- });
102
+ };
129
103
  exports.default = (0, react_1.memo)(PictureGroup);
@@ -12,7 +12,7 @@ const event_1 = tslib_1.__importStar(require("../../../../core/utils/event"));
12
12
  const VideoWidget = (0, react_1.forwardRef)(({ rec, index, height, data, muted, activeIndex, videoPostConfig, videoPlayIcon, loopPlay, swiperRef, visibleHeight }, ref) => {
13
13
  var _a, _b;
14
14
  const [isPauseVideo, setIsPauseVideo] = (0, react_1.useState)(false);
15
- const { bffEventReport, sxpParameter, firstRtcList, openHashtag, bffFbReport, isDiyH5 } = (0, hooks_1.useSxpDataSource)();
15
+ const { bffEventReport, sxpParameter, waterFallData, openHashtag, bffFbReport, isDiyH5 } = (0, hooks_1.useSxpDataSource)();
16
16
  const videoStartTime = (0, react_1.useRef)(0);
17
17
  const [isLoadFinish, setIsLoadFinish] = (0, react_1.useState)(false);
18
18
  const { isActive } = (0, react_2.useSwiperSlide)();
@@ -29,7 +29,7 @@ const VideoWidget = (0, react_1.forwardRef)(({ rec, index, height, data, muted,
29
29
  const loopPlayRef = (0, react_1.useRef)(loopPlay);
30
30
  const scene = rec.video.scene;
31
31
  const videoUrl = (scene === null || scene === void 0 ? void 0 : scene.mediaUrl) || ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url);
32
- const videoCover = (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.cover;
32
+ const videoCover = (scene === null || scene === void 0 ? void 0 : scene.mediaUrl) ? scene === null || scene === void 0 ? void 0 : scene.cover : (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.cover;
33
33
  const videoPoster = videoCover || (sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image);
34
34
  (0, react_1.useImperativeHandle)(ref, () => {
35
35
  return {
@@ -78,23 +78,6 @@ const VideoWidget = (0, react_1.forwardRef)(({ rec, index, height, data, muted,
78
78
  return;
79
79
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
80
80
  }, [videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
81
- const handleEnd = () => {
82
- var _a, _b, _c, _d, _e, _f;
83
- if (!videoRef.current)
84
- return;
85
- if (isDiyH5) {
86
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.pause();
87
- if (!loopPlayRef.current)
88
- return;
89
- if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
90
- const i = (_c = (_b = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _b === void 0 ? void 0 : _b.swiper) === null || _c === void 0 ? void 0 : _c.activeIndex;
91
- (_e = (_d = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _d === void 0 ? void 0 : _d.swiper) === null || _e === void 0 ? void 0 : _e.slideTo(i + 1);
92
- }
93
- }
94
- else {
95
- (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.play();
96
- }
97
- };
98
81
  const PAUSE_ICON = (0, useIconLink_1.useIconLink)('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
99
82
  const handlePlaying = (0, react_1.useCallback)(() => {
100
83
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
@@ -103,7 +86,7 @@ const VideoWidget = (0, react_1.forwardRef)(({ rec, index, height, data, muted,
103
86
  setIsLoadFinish(true);
104
87
  }, []);
105
88
  const handleStartPlay = (0, react_1.useCallback)(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
106
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
89
+ var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
107
90
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
108
91
  return;
109
92
  setIsPauseVideo(false);
@@ -114,11 +97,16 @@ const VideoWidget = (0, react_1.forwardRef)(({ rec, index, height, data, muted,
114
97
  const videoCurrentTime = ((_h = (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.currentTime) !== null && _h !== void 0 ? _h : 0).toFixed(2);
115
98
  const playType = (isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) ? '0' : '1';
116
99
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
117
- eventInfo: Object.assign({ eventSubject: 'playVideo', eventDescription: 'User played the video', contentId: (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.itemId) !== null && _k !== void 0 ? _k : '', sceneId: (_o = (_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.scene) === null || _m === void 0 ? void 0 : _m.sceneId) !== null && _o !== void 0 ? _o : '', contentName: (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.title) !== null && _q !== void 0 ? _q : '', playType, startTime: videoCurrentTime, videoDuration, contentTags: JSON.stringify((_s = (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.tags) !== null && _s !== void 0 ? _s : []), position: index + '', contentFormat: 'video', traceInfo: (_t = item === null || item === void 0 ? void 0 : item.video) === null || _t === void 0 ? void 0 : _t.traceInfo }, ((isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) && { loadTime: (loadedTimeRef === null || loadedTimeRef === void 0 ? void 0 : loadedTimeRef.current) - (initTimeRef === null || initTimeRef === void 0 ? void 0 : initTimeRef.current) + '' }))
100
+ eventInfo: Object.assign({ eventSubject: 'playVideo', eventDescription: 'User played the video', contentId: (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.itemId) !== null && _k !== void 0 ? _k : '', contentName: (_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.title) !== null && _m !== void 0 ? _m : '', playType, startTime: videoCurrentTime, videoDuration, contentTags: JSON.stringify((_p = (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.tags) !== null && _p !== void 0 ? _p : []), position: index + '', contentFormat: 'video', traceInfo: (_q = item === null || item === void 0 ? void 0 : item.video) === null || _q === void 0 ? void 0 : _q.traceInfo }, ((isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) && { loadTime: (loadedTimeRef === null || loadedTimeRef === void 0 ? void 0 : loadedTimeRef.current) - (initTimeRef === null || initTimeRef === void 0 ? void 0 : initTimeRef.current) + '' }))
118
101
  });
119
102
  isFirstPlayRef.current = false;
120
103
  }
121
104
  }), [bffEventReport, data, index, isFirstPlayRef, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
105
+ const setCurrentTimeByStartTime = (0, react_1.useCallback)(() => {
106
+ if (isDiyH5) {
107
+ videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
108
+ }
109
+ }, []);
122
110
  const handLoadeddata = (0, react_1.useCallback)(() => {
123
111
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || firstFrameSrc || !blur)
124
112
  return;
@@ -143,12 +131,13 @@ const VideoWidget = (0, react_1.forwardRef)(({ rec, index, height, data, muted,
143
131
  const handleLoadedmetadata = (0, react_1.useCallback)(() => {
144
132
  if (!videoRef.current)
145
133
  return;
134
+ setCurrentTimeByStartTime();
146
135
  loadedTimeRef.current = new Date();
147
136
  handleStartPlay();
148
137
  handLoadeddata();
149
138
  }, [videoRef.current, handLoadeddata, handleStartPlay]);
150
139
  const handleClickVideo = (0, react_1.useCallback)((type) => () => {
151
- var _a, _b, _c, _d, _e;
140
+ var _a, _b, _c, _d, _e, _f;
152
141
  if (!videoRef.current)
153
142
  return;
154
143
  if (!isLoadFinish)
@@ -169,17 +158,20 @@ const VideoWidget = (0, react_1.forwardRef)(({ rec, index, height, data, muted,
169
158
  break;
170
159
  default:
171
160
  if (isPause) {
172
- (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.play();
161
+ if (isDiyH5 && Math.round((_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.currentTime) >= (scene === null || scene === void 0 ? void 0 : scene.endTime)) {
162
+ videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
163
+ }
164
+ (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.play();
173
165
  }
174
166
  else {
175
- (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.pause();
167
+ (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.pause();
176
168
  }
177
169
  setIsPauseVideo(!isPause);
178
170
  break;
179
171
  }
180
172
  }, [isLoadFinish, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
181
173
  const handlePause = (0, react_1.useCallback)(() => {
182
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
174
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
183
175
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
184
176
  return;
185
177
  if (activeIndex !== index)
@@ -195,15 +187,14 @@ const VideoWidget = (0, react_1.forwardRef)(({ rec, index, height, data, muted,
195
187
  eventSubject: 'playOverVideo',
196
188
  eventDescription: 'User finished playing the video',
197
189
  contentId: (_h = (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
198
- sceneId: (_l = (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.scene) === null || _k === void 0 ? void 0 : _k.sceneId) !== null && _l !== void 0 ? _l : '',
199
- contentName: (_o = (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.title) !== null && _o !== void 0 ? _o : '',
190
+ contentName: (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
200
191
  endTime: videoCurrentTime,
201
192
  videoDuration,
202
193
  playDuration,
203
- contentTags: JSON.stringify((_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.tags) !== null && _q !== void 0 ? _q : []),
194
+ contentTags: JSON.stringify((_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
204
195
  position: index + '',
205
196
  contentFormat: 'video',
206
- traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
197
+ traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
207
198
  }
208
199
  });
209
200
  }
@@ -211,8 +202,27 @@ const VideoWidget = (0, react_1.forwardRef)(({ rec, index, height, data, muted,
211
202
  const handleWaiting = (0, react_1.useCallback)(() => {
212
203
  setWaiting(true);
213
204
  }, []);
205
+ const handleTimeUpload = () => {
206
+ if (!videoRef.current || !isDiyH5)
207
+ return;
208
+ setTimeout(() => {
209
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
210
+ if (Math.round((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.currentTime) >= ((_b = scene === null || scene === void 0 ? void 0 : scene.endTime) !== null && _b !== void 0 ? _b : 0)) {
211
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
212
+ if (!loopPlayRef.current)
213
+ return;
214
+ if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) {
215
+ (_e = (_d = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _d === void 0 ? void 0 : _d.swiper) === null || _e === void 0 ? void 0 : _e.slideTo(0);
216
+ }
217
+ else {
218
+ const i = (_g = (_f = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _f === void 0 ? void 0 : _f.swiper) === null || _g === void 0 ? void 0 : _g.activeIndex;
219
+ (_j = (_h = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _h === void 0 ? void 0 : _h.swiper) === null || _j === void 0 ? void 0 : _j.slideTo(i + 1);
220
+ }
221
+ }
222
+ });
223
+ };
214
224
  (0, react_1.useEffect)(() => {
215
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
225
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
216
226
  if (!isActive)
217
227
  return;
218
228
  const videoSrc = videoUrl;
@@ -233,6 +243,7 @@ const VideoWidget = (0, react_1.forwardRef)(({ rec, index, height, data, muted,
233
243
  hls === null || hls === void 0 ? void 0 : hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
234
244
  hls === null || hls === void 0 ? void 0 : hls.on(Hls.Events.MANIFEST_PARSED, function () {
235
245
  var _a;
246
+ setCurrentTimeByStartTime();
236
247
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
237
248
  });
238
249
  }
@@ -246,11 +257,12 @@ const VideoWidget = (0, react_1.forwardRef)(({ rec, index, height, data, muted,
246
257
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.addEventListener('play', handleStartPlay);
247
258
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.addEventListener('playing', handlePlaying);
248
259
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.addEventListener('pause', handlePause);
249
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handleEnd);
260
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handlePlay);
250
261
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
251
262
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
263
+ (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.addEventListener('timeupdate', handleTimeUpload);
252
264
  return () => {
253
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
265
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
254
266
  const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
255
267
  if (!isPause)
256
268
  handlePause();
@@ -262,9 +274,10 @@ const VideoWidget = (0, react_1.forwardRef)(({ rec, index, height, data, muted,
262
274
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('play', handleStartPlay);
263
275
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('playing', handlePlaying);
264
276
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('pause', handlePause);
265
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handleEnd);
277
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handlePlay);
266
278
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('canplay', handlePlay);
267
279
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.removeEventListener('waiting', handleWaiting);
280
+ (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.removeEventListener('timeupdate', handleTimeUpload);
268
281
  };
269
282
  }, [isActive]);
270
283
  (0, react_1.useEffect)(() => {
@@ -44,7 +44,7 @@ const WaterFall = (props) => {
44
44
  }
45
45
  }, [waterFallData]);
46
46
  const reportTagsView = (0, react_1.useCallback)(() => {
47
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
47
+ var _a, _b, _c, _d, _e, _f;
48
48
  const rec = recData === null || recData === void 0 ? void 0 : recData.rec;
49
49
  if (!rec)
50
50
  return;
@@ -64,10 +64,9 @@ const WaterFall = (props) => {
64
64
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
65
65
  eventInfo: {
66
66
  contentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
67
- sceneId: (_g = (_f = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.scene) === null || _f === void 0 ? void 0 : _f.sceneId) !== null && _g !== void 0 ? _g : '',
68
67
  position: cacheActiveIndex + '',
69
- contentTags: JSON.stringify((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.tags),
70
- traceInfo: (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.traceInfo,
68
+ contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
69
+ traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
71
70
  hashTags: JSON.stringify([recData === null || recData === void 0 ? void 0 : recData.hashTag]),
72
71
  fromKName,
73
72
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
@@ -48,7 +48,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
48
48
  const [pageNum, setPageNum] = (0, react_1.useState)(2);
49
49
  const [isShowCookieSetting, setIsShowCookieSetting] = (0, react_1.useState)(false);
50
50
  const videoWidgetRef = (0, react_1.useRef)(null);
51
- const pictureGroupRef = (0, react_1.useRef)(null);
52
51
  const fbcRef = (0, react_1.useRef)('');
53
52
  const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview, isEditor, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, isNoMoreData, channel, refreshFeSession, isDiyH5, pixelPvStatusRef } = (0, hooks_1.useSxpDataSource)();
54
53
  const { backMainFeed, productView, jumpToWeb } = (0, useEventReport_1.useEventReport)();
@@ -98,7 +97,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
98
97
  (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
99
98
  }, [data, ctaType, swiperRef]);
100
99
  const handleSessionCompleted = (0, react_1.useCallback)((fk) => {
101
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6;
100
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
102
101
  const item = data === null || data === void 0 ? void 0 : data[activeIndex];
103
102
  let fromKName = '';
104
103
  if (popupDetailData && (((_b = (_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
@@ -125,23 +124,22 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
125
124
  eventSubject: 'sessionCompleted',
126
125
  eventDescription: 'Session completed',
127
126
  contentId: (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.itemId,
128
- sceneId: (_q = (_p = (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.scene) === null || _p === void 0 ? void 0 : _p.sceneId) !== null && _q !== void 0 ? _q : '',
129
- productId: (_r = item === null || item === void 0 ? void 0 : item.product) === null || _r === void 0 ? void 0 : _r.itemId,
127
+ productId: (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.itemId,
130
128
  position: activeIndex + '',
131
129
  fromKName: fk || fromKName,
132
130
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
133
- ctatId: (_u = (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.bindCta) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '',
134
- traceInfo: (_y = (_w = (_v = item === null || item === void 0 ? void 0 : item.video) === null || _v === void 0 ? void 0 : _v.traceInfo) !== null && _w !== void 0 ? _w : (_x = item === null || item === void 0 ? void 0 : item.product) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : ''
131
+ ctatId: (_r = (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.bindCta) === null || _q === void 0 ? void 0 : _q.itemId) !== null && _r !== void 0 ? _r : '',
132
+ traceInfo: (_v = (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.traceInfo) !== null && _t !== void 0 ? _t : (_u = item === null || item === void 0 ? void 0 : item.product) === null || _u === void 0 ? void 0 : _u.traceInfo) !== null && _v !== void 0 ? _v : ''
135
133
  }
136
134
  });
137
- const isPostType = ((_z = item === null || item === void 0 ? void 0 : item.video) === null || _z === void 0 ? void 0 : _z.url) || ((_1 = (_0 = item === null || item === void 0 ? void 0 : item.video) === null || _0 === void 0 ? void 0 : _0.imgUrls) === null || _1 === void 0 ? void 0 : _1.length);
135
+ const isPostType = ((_w = item === null || item === void 0 ? void 0 : item.video) === null || _w === void 0 ? void 0 : _w.url) || ((_y = (_x = item === null || item === void 0 ? void 0 : item.video) === null || _x === void 0 ? void 0 : _x.imgUrls) === null || _y === void 0 ? void 0 : _y.length);
138
136
  if (!popupDetailData) {
139
137
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
140
138
  eventName: 'ExitFeed',
141
- product: isPostType ? (_2 = item === null || item === void 0 ? void 0 : item.video) === null || _2 === void 0 ? void 0 : _2.bindProducts : (item === null || item === void 0 ? void 0 : item.product) ? [item === null || item === void 0 ? void 0 : item.product] : [],
139
+ product: isPostType ? (_z = item === null || item === void 0 ? void 0 : item.video) === null || _z === void 0 ? void 0 : _z.bindProducts : (item === null || item === void 0 ? void 0 : item.product) ? [item === null || item === void 0 ? void 0 : item.product] : [],
142
140
  rec: item,
143
141
  position: activeIndex,
144
- content_id: isPostType ? (_4 = (_3 = item === null || item === void 0 ? void 0 : item.video) === null || _3 === void 0 ? void 0 : _3.itemId) !== null && _4 !== void 0 ? _4 : '' : (_6 = (_5 = item === null || item === void 0 ? void 0 : item.product) === null || _5 === void 0 ? void 0 : _5.itemId) !== null && _6 !== void 0 ? _6 : '',
142
+ content_id: isPostType ? (_1 = (_0 = item === null || item === void 0 ? void 0 : item.video) === null || _0 === void 0 ? void 0 : _0.itemId) !== null && _1 !== void 0 ? _1 : '' : (_3 = (_2 = item === null || item === void 0 ? void 0 : item.product) === null || _2 === void 0 ? void 0 : _2.itemId) !== null && _3 !== void 0 ? _3 : '',
145
143
  view_time: new Date() - viewTime.current
146
144
  });
147
145
  }
@@ -198,9 +196,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
198
196
  refreshFeSession
199
197
  ]);
200
198
  const handleSessionExpire = (0, react_1.useCallback)((0, lodash_1.debounce)(() => {
201
- var _a, _b;
199
+ var _a;
202
200
  (_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
203
- (_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
204
201
  refreshFeSession === null || refreshFeSession === void 0 ? void 0 : refreshFeSession(false, handleSessionCompleted);
205
202
  }, 1000), [handleSessionCompleted, refreshFeSession]);
206
203
  (0, react_1.useEffect)(() => {
@@ -271,18 +268,18 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
271
268
  return null;
272
269
  }, [globalConfig, activeIndex, visList]);
273
270
  const renderContent = (0, react_1.useCallback)((rec, index) => {
274
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
271
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
275
272
  if (rec === 'organic menu') {
276
273
  return (react_1.default.createElement(MultiPosts_1.default, Object.assign({ recData: data === null || data === void 0 ? void 0 : data[1] }, (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props, (_f = (_e = (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.item) === null || _f === void 0 ? void 0 : _f.event)));
277
274
  }
278
- if (((_h = (_g = rec.video) === null || _g === void 0 ? void 0 : _g.scene) === null || _h === void 0 ? void 0 : _h.mediaUrl) || ((_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.url)) {
275
+ if ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.url) {
279
276
  return (react_1.default.createElement(VideoWidget_1.default, Object.assign({ key: isReload }, (activeIndex === index && { ref: videoWidgetRef }), { rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, videoPlayIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPlayIcon, loopPlay: true, swiperRef: swiperRef, visibleHeight: visibleHeight })));
280
277
  }
281
- if ((_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.imgUrls) {
282
- return (react_1.default.createElement(PictureGroup_1.default, Object.assign({ data: data }, (activeIndex === index && { ref: pictureGroupRef }), { key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, imgUrls: rec === null || rec === void 0 ? void 0 : rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onViewImageEndEvent: handleViewImageStartEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost, swiperRef: swiperRef })));
278
+ if ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.imgUrls) {
279
+ return (react_1.default.createElement(PictureGroup_1.default, { key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, imgUrls: rec === null || rec === void 0 ? void 0 : rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onViewImageEndEvent: handleViewImageStartEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
283
280
  }
284
- if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_l = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _l === void 0 ? void 0 : _l.length) > 0) {
285
- return (_m = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _m === void 0 ? void 0 : _m.map((value, idx) => {
281
+ if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_j = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _j === void 0 ? void 0 : _j.length) > 0) {
282
+ return (_k = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _k === void 0 ? void 0 : _k.map((value, idx) => {
286
283
  var _a, _b, _c, _d, _e, _f, _g, _h;
287
284
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
288
285
  const Component = (0, withBindDataSource_1.default)(t);
@@ -321,7 +318,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
321
318
  };
322
319
  }, [isShowMore]);
323
320
  const renderBottom = (0, react_1.useCallback)((rec, index) => {
324
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
321
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
325
322
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
326
323
  let cta = null;
327
324
  if ((_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) {
@@ -330,27 +327,24 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
330
327
  else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
331
328
  cta = '商品CTA';
332
329
  }
333
- else if (tempMap && ((_d = Object.keys(tempMap)) === null || _d === void 0 ? void 0 : _d.includes('服务CTA')) && ((_f = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta) === null || _f === void 0 ? void 0 : _f.itemId)) {
334
- cta = '服务CTA';
335
- }
336
330
  else {
337
- cta = (_h = (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.bindCta) === null || _h === void 0 ? void 0 : _h.itemId;
331
+ cta = (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId;
338
332
  }
339
333
  const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
340
334
  const isNineProduct = (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.nineProductEnable) &&
341
335
  index === ((rtcList === null || rtcList === void 0 ? void 0 : rtcList[0]) === 'organic menu' ? 1 : 0) &&
342
- ((_j = ['MultiCommodity', 'MultiCommodityDiro', 'MultiCommodityDiroNew']) === null || _j === void 0 ? void 0 : _j.includes((_k = value === null || value === void 0 ? void 0 : value.item) === null || _k === void 0 ? void 0 : _k.type));
336
+ ((_f = ['MultiCommodity', 'MultiCommodityDiro', 'MultiCommodityDiroNew']) === null || _f === void 0 ? void 0 : _f.includes((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.type));
343
337
  return (react_1.default.createElement(react_1.default.Fragment, null,
344
338
  isNineProduct && (react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, isNineProduct: isNineProduct })),
345
- ((_l = rec === null || rec === void 0 ? void 0 : rec.video) === null || _l === void 0 ? void 0 : _l.title) && !isShowMore && react_1.default.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
346
- react_1.default.createElement("div", { className: 'clc-sxp-bottom', style: { marginBottom: `${(_m = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _m !== void 0 ? _m : 40}px` } },
339
+ ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.title) && !isShowMore && react_1.default.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
340
+ react_1.default.createElement("div", { className: 'clc-sxp-bottom', style: { marginBottom: `${(_j = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _j !== void 0 ? _j : 40}px` } },
347
341
  react_1.default.createElement(Nudge_1.default, { nudge: nudge }),
348
342
  ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)) && !isNineProduct ? (react_1.default.createElement("div", { className: 'clc-sxp-bottom-card' },
349
343
  react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, includesCtaType: [] }))) : null,
350
344
  react_1.default.createElement("div", { style: { display: 'flex', flexDirection: 'column' } },
351
- react_1.default.createElement(ExpandableText_1.default, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_p = (_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.title) !== null && _p !== void 0 ? _p : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }), onChange: onExpandableChange }),
345
+ react_1.default.createElement(ExpandableText_1.default, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.title) !== null && _l !== void 0 ? _l : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }), onChange: onExpandableChange }),
352
346
  react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex }),
353
- react_1.default.createElement(Hashtag_1.default, { index: activeIndex, tags: (_r = (_q = rec === null || rec === void 0 ? void 0 : rec.video) === null || _q === void 0 ? void 0 : _q.hashTags) !== null && _r !== void 0 ? _r : [], itemId: (_s = rec === null || rec === void 0 ? void 0 : rec.video) === null || _s === void 0 ? void 0 : _s.itemId, itemType: ((_t = rec === null || rec === void 0 ? void 0 : rec.video) === null || _t === void 0 ? void 0 : _t.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle, hashTagRightMargin: containerWidth - (hashTagRightMargin !== null && hashTagRightMargin !== void 0 ? hashTagRightMargin : 0) }))),
347
+ react_1.default.createElement(Hashtag_1.default, { index: activeIndex, tags: (_o = (_m = rec === null || rec === void 0 ? void 0 : rec.video) === null || _m === void 0 ? void 0 : _m.hashTags) !== null && _o !== void 0 ? _o : [], itemId: (_p = rec === null || rec === void 0 ? void 0 : rec.video) === null || _p === void 0 ? void 0 : _p.itemId, itemType: ((_q = rec === null || rec === void 0 ? void 0 : rec.video) === null || _q === void 0 ? void 0 : _q.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle, hashTagRightMargin: containerWidth - (hashTagRightMargin !== null && hashTagRightMargin !== void 0 ? hashTagRightMargin : 0) }))),
354
348
  react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
355
349
  }
356
350
  return null;
@@ -392,7 +386,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
392
386
  return null;
393
387
  }, [globalConfig, waterFallData, bottomHeight]);
394
388
  const handleViewImageStartEnd = (item) => {
395
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
389
+ var _a, _b, _c, _d, _e, _f;
396
390
  if (!((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.url) && ((_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.imgUrls)) {
397
391
  const endTime = Date.now();
398
392
  const duration = viewImageStartTime.current === 0 ? 0 : (endTime - viewImageStartTime.current) / 1000;
@@ -401,11 +395,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
401
395
  eventSubject: 'viewImageCarouselEnd',
402
396
  eventDescription: 'User end view the image carousel',
403
397
  contentId: (_d = (_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
404
- sceneId: (_g = (_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.scene) === null || _f === void 0 ? void 0 : _f.sceneId) !== null && _g !== void 0 ? _g : '',
405
- contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
398
+ contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
406
399
  imageEndTime: `${endTime}`,
407
400
  playDuration: `${duration}`,
408
- contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
401
+ contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
409
402
  position: activeIndex + '',
410
403
  contentFormat: 'image',
411
404
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo
@@ -414,7 +407,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
414
407
  }
415
408
  };
416
409
  const handleSlideSkip = (item, position) => {
417
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
410
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
418
411
  if (isPreview || waterFallData)
419
412
  return;
420
413
  const t = new Date() - curTime.current;
@@ -440,8 +433,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
440
433
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
441
434
  position: position + '',
442
435
  contentId: (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.itemId) !== null && _t !== void 0 ? _t : '',
443
- sceneId: (_w = (_v = (_u = item === null || item === void 0 ? void 0 : item.video) === null || _u === void 0 ? void 0 : _u.scene) === null || _v === void 0 ? void 0 : _v.sceneId) !== null && _w !== void 0 ? _w : '',
444
- traceInfo: (_0 = (_y = (_x = item === null || item === void 0 ? void 0 : item.video) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : (_z = item === null || item === void 0 ? void 0 : item.product) === null || _z === void 0 ? void 0 : _z.traceInfo) !== null && _0 !== void 0 ? _0 : '',
436
+ traceInfo: (_x = (_v = (_u = item === null || item === void 0 ? void 0 : item.video) === null || _u === void 0 ? void 0 : _u.traceInfo) !== null && _v !== void 0 ? _v : (_w = item === null || item === void 0 ? void 0 : item.product) === null || _w === void 0 ? void 0 : _w.traceInfo) !== null && _x !== void 0 ? _x : '',
445
437
  contentFormat
446
438
  }
447
439
  });
@@ -451,7 +443,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
451
443
  }
452
444
  };
453
445
  const handleScrollEvent = (swiper) => {
454
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16;
446
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10;
455
447
  const item = data[swiper.previousIndex];
456
448
  const activeItem = data[swiper.activeIndex];
457
449
  if (!item)
@@ -484,12 +476,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
484
476
  eventSubject: 'scrollDown',
485
477
  eventDescription: 'User scroll down',
486
478
  contentId: (_u = (_t = item === null || item === void 0 ? void 0 : item.video) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '',
487
- sceneId: (_x = (_w = (_v = item === null || item === void 0 ? void 0 : item.video) === null || _v === void 0 ? void 0 : _v.scene) === null || _w === void 0 ? void 0 : _w.sceneId) !== null && _x !== void 0 ? _x : '',
488
- productId: (_z = (_y = item === null || item === void 0 ? void 0 : item.product) === null || _y === void 0 ? void 0 : _y.itemId) !== null && _z !== void 0 ? _z : '',
479
+ productId: (_w = (_v = item === null || item === void 0 ? void 0 : item.product) === null || _v === void 0 ? void 0 : _v.itemId) !== null && _w !== void 0 ? _w : '',
489
480
  requestId: null,
490
- traceInfo: (_3 = (_1 = (_0 = item === null || item === void 0 ? void 0 : item.video) === null || _0 === void 0 ? void 0 : _0.traceInfo) !== null && _1 !== void 0 ? _1 : (_2 = item === null || item === void 0 ? void 0 : item.product) === null || _2 === void 0 ? void 0 : _2.traceInfo) !== null && _3 !== void 0 ? _3 : '',
481
+ traceInfo: (_0 = (_y = (_x = item === null || item === void 0 ? void 0 : item.video) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : (_z = item === null || item === void 0 ? void 0 : item.product) === null || _z === void 0 ? void 0 : _z.traceInfo) !== null && _0 !== void 0 ? _0 : '',
491
482
  contentFormat,
492
- position: ((_4 = swiper.previousIndex) !== null && _4 !== void 0 ? _4 : 0) + ''
483
+ position: ((_1 = swiper.previousIndex) !== null && _1 !== void 0 ? _1 : 0) + ''
493
484
  }
494
485
  });
495
486
  handleViewImageStartEnd(item);
@@ -501,13 +492,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
501
492
  eventInfo: {
502
493
  eventSubject: 'scrollUp',
503
494
  eventDescription: 'User scroll up',
504
- contentId: (_6 = (_5 = item === null || item === void 0 ? void 0 : item.video) === null || _5 === void 0 ? void 0 : _5.itemId) !== null && _6 !== void 0 ? _6 : '',
505
- sceneId: (_9 = (_8 = (_7 = item === null || item === void 0 ? void 0 : item.video) === null || _7 === void 0 ? void 0 : _7.scene) === null || _8 === void 0 ? void 0 : _8.sceneId) !== null && _9 !== void 0 ? _9 : '',
506
- productId: (_11 = (_10 = item.product) === null || _10 === void 0 ? void 0 : _10.itemId) !== null && _11 !== void 0 ? _11 : '',
495
+ contentId: (_3 = (_2 = item === null || item === void 0 ? void 0 : item.video) === null || _2 === void 0 ? void 0 : _2.itemId) !== null && _3 !== void 0 ? _3 : '',
496
+ productId: (_5 = (_4 = item.product) === null || _4 === void 0 ? void 0 : _4.itemId) !== null && _5 !== void 0 ? _5 : '',
507
497
  requestId: null,
508
- traceInfo: (_15 = (_13 = (_12 = item === null || item === void 0 ? void 0 : item.video) === null || _12 === void 0 ? void 0 : _12.traceInfo) !== null && _13 !== void 0 ? _13 : (_14 = item === null || item === void 0 ? void 0 : item.product) === null || _14 === void 0 ? void 0 : _14.traceInfo) !== null && _15 !== void 0 ? _15 : '',
498
+ traceInfo: (_9 = (_7 = (_6 = item === null || item === void 0 ? void 0 : item.video) === null || _6 === void 0 ? void 0 : _6.traceInfo) !== null && _7 !== void 0 ? _7 : (_8 = item === null || item === void 0 ? void 0 : item.product) === null || _8 === void 0 ? void 0 : _8.traceInfo) !== null && _9 !== void 0 ? _9 : '',
509
499
  contentFormat,
510
- position: ((_16 = swiper.previousIndex) !== null && _16 !== void 0 ? _16 : 0) + ''
500
+ position: ((_10 = swiper.previousIndex) !== null && _10 !== void 0 ? _10 : 0) + ''
511
501
  }
512
502
  });
513
503
  handleViewImageStartEnd(item);
@@ -604,7 +594,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
604
594
  };
605
595
  }, [globalConfig, bffEventReport, data, activeIndex]);
606
596
  const handleViewImageStartEvent = (activeIndex, imgInfo, enableCapi) => {
607
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
597
+ var _a, _b, _c, _d, _e, _f, _g, _h;
608
598
  const item = data[activeIndex];
609
599
  if (!((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.url) && ((_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.imgUrls)) {
610
600
  const startTime = Date.now();
@@ -614,10 +604,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
614
604
  eventSubject: 'viewImageCarouselStart',
615
605
  eventDescription: 'User start view the image carousel',
616
606
  contentId: (_d = (_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
617
- sceneId: (_g = (_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.scene) === null || _f === void 0 ? void 0 : _f.sceneId) !== null && _g !== void 0 ? _g : '',
618
- contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
607
+ contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
619
608
  imageStartTime: `${startTime}`,
620
- contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
609
+ contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
621
610
  position: activeIndex + '',
622
611
  contentFormat: 'image',
623
612
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo,
@@ -627,13 +616,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
627
616
  if (enableCapi) {
628
617
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
629
618
  eventName: 'ViewContent',
630
- product: (_k = item === null || item === void 0 ? void 0 : item.video) === null || _k === void 0 ? void 0 : _k.bindProducts,
619
+ product: (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.bindProducts,
631
620
  rec: item,
632
621
  position: activeIndex
633
622
  });
634
623
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
635
624
  eventName: 'PageView',
636
- product: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.bindProducts,
625
+ product: (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.bindProducts,
637
626
  rec: item,
638
627
  position: activeIndex
639
628
  });
@@ -731,19 +720,14 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
731
720
  swiperRef.current.swiper.allowTouchMove = true;
732
721
  }, 500);
733
722
  }, onActiveIndexChange: (swiper) => {
734
- var _a, _b;
735
723
  setActiveIndex(swiper.activeIndex);
736
724
  if (openHashtag)
737
725
  return;
738
726
  handleScrollEvent(swiper);
739
- if (waterFallData || isEditor)
727
+ if (waterFallData || isEditor || isDiyH5)
740
728
  return;
741
729
  if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
742
730
  if (!isLoadMore) {
743
- if (isDiyH5) {
744
- (_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
745
- (_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
746
- }
747
731
  setIsLoadMore(true);
748
732
  loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(pageNum).then((res) => {
749
733
  var _a;