pb-sxp-ui 1.20.13 → 1.20.14

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 +248 -172
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +248 -172
  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 +248 -172
  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 +10 -8
  14. package/es/core/components/SxpPageRender/LikeButton/index.js +20 -18
  15. package/es/core/components/SxpPageRender/PictureGroup/index.d.ts +5 -0
  16. package/es/core/components/SxpPageRender/PictureGroup/index.js +39 -13
  17. package/es/core/components/SxpPageRender/VideoWidget/index.js +33 -46
  18. package/es/core/components/SxpPageRender/WaterFall/index.js +4 -3
  19. package/es/core/components/SxpPageRender/index.js +56 -40
  20. package/es/core/context/SxpDataSourceProvider.d.ts +5 -12
  21. package/es/core/context/SxpDataSourceProvider.js +81 -38
  22. package/es/core/hooks/useEventReport.js +6 -5
  23. package/lib/core/components/DiyPortalPreview/VideoWidget.js +10 -8
  24. package/lib/core/components/SxpPageRender/LikeButton/index.js +20 -18
  25. package/lib/core/components/SxpPageRender/PictureGroup/index.d.ts +5 -0
  26. package/lib/core/components/SxpPageRender/PictureGroup/index.js +38 -12
  27. package/lib/core/components/SxpPageRender/VideoWidget/index.js +33 -46
  28. package/lib/core/components/SxpPageRender/WaterFall/index.js +4 -3
  29. package/lib/core/components/SxpPageRender/index.js +56 -40
  30. package/lib/core/context/SxpDataSourceProvider.d.ts +5 -12
  31. package/lib/core/context/SxpDataSourceProvider.js +81 -38
  32. package/lib/core/hooks/useEventReport.js +6 -5
  33. package/package.json +1 -1
package/dist/pb-ui.js CHANGED
@@ -660,6 +660,7 @@
660
660
  const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, consentHeight, consentWidth, isOpenConsent = false, isEditor = false, utmParameter, channelQueryList, data, dataList, isDiyH5, onUpdateSchema, onUpdateChannel }) => {
661
661
  var _a, _b, _c, _d, _e;
662
662
  const [rtcList, setRtcList] = React.useState([]);
663
+ const [firstRtcList, setFirstRtcList] = React.useState([]);
663
664
  const [tagList, setTagList] = React.useState([]);
664
665
  const [loading, setLoading] = React.useState(true);
665
666
  const [curReqInfo, setCurReqInfo] = React.useState({ rtc: '', requestId: '' });
@@ -691,6 +692,10 @@
691
692
  const [chatlabsId, setChatlabsId] = React.useState();
692
693
  const finalPageData = React.useMemo(() => pageData !== null && pageData !== void 0 ? pageData : data, [pageData, data]);
693
694
  const pixelPvStatusRef = React.useRef(false);
695
+ const isDiyPage = React.useMemo(() => {
696
+ var _a, _b, _c;
697
+ return isDiyH5 && !((_c = (_b = (_a = finalPageData === null || finalPageData === void 0 ? void 0 : finalPageData.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf) === null || _b === void 0 ? void 0 : _b.globalConfig) === null || _c === void 0 ? void 0 : _c.enablePreview);
698
+ }, [isDiyH5, finalPageData]);
694
699
  React.useEffect(() => {
695
700
  var _a, _b;
696
701
  setGlobalConfig((_b = (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf) === null || _b === void 0 ? void 0 : _b.globalConfig);
@@ -796,7 +801,7 @@
796
801
  };
797
802
  // bff API 请求方法
798
803
  const bffFetch = React.useCallback((path, options, isBota = true) => {
799
- var _a;
804
+ var _a, _b;
800
805
  if (!bffDataSource)
801
806
  return;
802
807
  const url = bffDataSource.url;
@@ -809,8 +814,9 @@
809
814
  val.split('=')[0];
810
815
  val.split('=')[1];
811
816
  });
817
+ options.body = Object.assign(Object.assign({}, options.body), { productUserId: fakeUserId });
812
818
  return window
813
- .fetch(`${url}/api/${path}`, Object.assign({ headers: Object.assign({ 'Content-Type': 'application/json', 'x-user-id': fakeUserId }, bffDataSource.headers), method: options.method, body: options.type === 'beacon' && isBota
819
+ .fetch(`${url}/api/${path}`, Object.assign({ headers: Object.assign({ 'Content-Type': 'application/json', 'x-user-id': fakeUserId, 'tenant-id': (_b = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _b === void 0 ? void 0 : _b['x-app-id'] }, bffDataSource.headers), method: options.method, body: options.type === 'beacon' && isBota
814
820
  ? JSON.stringify({
815
821
  body: btoa(encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))))
816
822
  })
@@ -1095,8 +1101,8 @@
1095
1101
  }, [bffDataSource]);
1096
1102
  // 获取推荐视频数据
1097
1103
  const getRecommendVideos = React.useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
1098
- var _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
1099
- query = Object.assign(Object.assign({ maxSize: (_f = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _f !== void 0 ? _f : maxSize, defaultSize: (_g = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _g !== void 0 ? _g : defaultSize, hashTag: query === null || query === void 0 ? void 0 : query.hashTag, traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo, themeTag: query === null || query === void 0 ? void 0 : query.themeTag, pageNum: query === null || query === void 0 ? void 0 : query.pageNum, contentFilter: query === null || query === void 0 ? void 0 : query.contentFilter, productFilter: query === null || query === void 0 ? void 0 : query.productFilter }, (chatlabsId && { chatlabsId })), (isDiyH5 && { type: 'story' }));
1104
+ var _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
1105
+ query = Object.assign(Object.assign({ maxSize: (_f = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _f !== void 0 ? _f : maxSize, defaultSize: (_g = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _g !== void 0 ? _g : defaultSize, hashTag: query === null || query === void 0 ? void 0 : query.hashTag, traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo, themeTag: query === null || query === void 0 ? void 0 : query.themeTag, pageNum: query === null || query === void 0 ? void 0 : query.pageNum, contentFilter: query === null || query === void 0 ? void 0 : query.contentFilter, productFilter: query === null || query === void 0 ? void 0 : query.productFilter }, (chatlabsId && { chatlabsId })), (isDiyPage && { type: 'story' }));
1100
1106
  if (channel) {
1101
1107
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(channel) });
1102
1108
  }
@@ -1109,9 +1115,10 @@
1109
1115
  if (val)
1110
1116
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
1111
1117
  }
1118
+ const isDiy = isDiyH5 && ((_o = (_m = (_l = finalPageData === null || finalPageData === void 0 ? void 0 : finalPageData.data) === null || _l === void 0 ? void 0 : _l.sxpPageConf) === null || _m === void 0 ? void 0 : _m.globalConfig) === null || _o === void 0 ? void 0 : _o.enablePreview);
1112
1119
  if (isEditor) {
1113
1120
  let pageNum = 1;
1114
- query = Object.assign(Object.assign(Object.assign({}, query), { directPage: true, level: 1 }), (!utmVal && channelQueryList && (channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList.length) > 0 && { channel: channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList[0] }));
1121
+ query = Object.assign(Object.assign(Object.assign(Object.assign({}, query), { directPage: true, level: 1 }), (!utmVal && channelQueryList && (channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList.length) > 0 && { channel: channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList[0] })), (isDiy && { maxRecs: query === null || query === void 0 ? void 0 : query.maxSize }));
1115
1122
  if (!(query === null || query === void 0 ? void 0 : query.channel) || isInit.current) {
1116
1123
  return undefined;
1117
1124
  }
@@ -1119,19 +1126,24 @@
1119
1126
  let list = [];
1120
1127
  let result = null;
1121
1128
  const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
1122
- var _v, _w, _x, _y, _z, _0;
1129
+ var _y, _z, _0, _1, _2, _3;
1123
1130
  query.pageNum = pageNum;
1124
- result = yield (bffFetchAdmin === null || bffFetchAdmin === void 0 ? void 0 : bffFetchAdmin('recommend/direct_page', { method: 'POST', body: query }));
1131
+ result = isDiyH5
1132
+ ? yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v3/recommend/direct/page/view', { method: 'POST', body: query }))
1133
+ : yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('recommend/direct_page', { method: 'POST', body: query }));
1125
1134
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
1126
1135
  return undefined;
1127
1136
  }
1128
1137
  setLoading(false);
1129
- list = list.concat((_y = (_x = (_w = (_v = result === null || result === void 0 ? void 0 : result.data) === null || _v === void 0 ? void 0 : _v.recList) === null || _w === void 0 ? void 0 : _w.filter) === null || _x === void 0 ? void 0 : _x.call(_w, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _y !== void 0 ? _y : []);
1138
+ list = list.concat((_1 = (_0 = (_z = (_y = result === null || result === void 0 ? void 0 : result.data) === null || _y === void 0 ? void 0 : _y.recList) === null || _z === void 0 ? void 0 : _z.filter) === null || _0 === void 0 ? void 0 : _0.call(_z, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _1 !== void 0 ? _1 : []);
1130
1139
  if ((rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) === 0) {
1131
1140
  setRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
1132
1141
  setCacheRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
1142
+ if (isDiyPage) {
1143
+ setFirstRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
1144
+ }
1133
1145
  }
1134
- const isNotNullList = (_0 = (_z = result === null || result === void 0 ? void 0 : result.data) === null || _z === void 0 ? void 0 : _z.recList) === null || _0 === void 0 ? void 0 : _0.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
1146
+ const isNotNullList = (_3 = (_2 = result === null || result === void 0 ? void 0 : result.data) === null || _2 === void 0 ? void 0 : _2.recList) === null || _3 === void 0 ? void 0 : _3.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
1135
1147
  if (isNotNullList) {
1136
1148
  pageNum = pageNum + 1;
1137
1149
  yield recurveRecList(query);
@@ -1139,42 +1151,61 @@
1139
1151
  });
1140
1152
  yield recurveRecList(query);
1141
1153
  if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
1142
- setCurReqInfo({ rtc: (_l = result === null || result === void 0 ? void 0 : result.data) === null || _l === void 0 ? void 0 : _l.rtc, requestId: (_m = result === null || result === void 0 ? void 0 : result.data) === null || _m === void 0 ? void 0 : _m.requestId });
1154
+ setCurReqInfo({ rtc: (_p = result === null || result === void 0 ? void 0 : result.data) === null || _p === void 0 ? void 0 : _p.rtc, requestId: (_q = result === null || result === void 0 ? void 0 : result.data) === null || _q === void 0 ? void 0 : _q.requestId });
1143
1155
  return Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list });
1144
1156
  }
1145
1157
  if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
1146
- query = Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (_o = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _o !== void 0 ? _o : 1 });
1158
+ query = Object.assign(Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (_r = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _r !== void 0 ? _r : 1 }), (isDiy && { maxRecs: query === null || query === void 0 ? void 0 : query.maxSize }));
1147
1159
  }
1148
- const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/list', {
1149
- method: 'POST',
1150
- body: query
1151
- }));
1160
+ const result = isDiy
1161
+ ? yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v3/recommend/direct/page/view', { method: 'POST', body: query }))
1162
+ : yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/list', {
1163
+ method: 'POST',
1164
+ body: query
1165
+ }));
1152
1166
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
1153
1167
  return undefined;
1154
1168
  }
1155
1169
  if (!(query === null || query === void 0 ? void 0 : query.hashTag))
1156
1170
  setCurReqInfo({ rtc: result.data.rtc, requestId: result.data.requestId });
1157
1171
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor) {
1158
- const isNotNullList = (_q = (_p = result === null || result === void 0 ? void 0 : result.data) === null || _p === void 0 ? void 0 : _p.recList) === null || _q === void 0 ? void 0 : _q.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
1172
+ const isNotNullList = (_t = (_s = result === null || result === void 0 ? void 0 : result.data) === null || _s === void 0 ? void 0 : _s.recList) === null || _t === void 0 ? void 0 : _t.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
1159
1173
  if (!isNotNullList) {
1160
1174
  setIsNoMoreData(true);
1161
1175
  }
1162
1176
  }
1163
1177
  let list = [];
1164
- list = list.concat((_u = (_t = (_s = (_r = result === null || result === void 0 ? void 0 : result.data) === null || _r === void 0 ? void 0 : _r.recList) === null || _s === void 0 ? void 0 : _s.filter) === null || _t === void 0 ? void 0 : _t.call(_s, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _u !== void 0 ? _u : []);
1178
+ list = list.concat((_x = (_w = (_v = (_u = result === null || result === void 0 ? void 0 : result.data) === null || _u === void 0 ? void 0 : _u.recList) === null || _v === void 0 ? void 0 : _v.filter) === null || _w === void 0 ? void 0 : _w.call(_v, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _x !== void 0 ? _x : []);
1165
1179
  return Object.assign(Object.assign({}, result.data), { recList: list });
1166
- }), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList, channel, chatlabsId, bffFetchAdmin]);
1180
+ }), [
1181
+ bffFetch,
1182
+ utmVal,
1183
+ maxSize,
1184
+ defaultSize,
1185
+ channelQueryList,
1186
+ channel,
1187
+ chatlabsId,
1188
+ bffFetchAdmin,
1189
+ isDiyPage,
1190
+ finalPageData,
1191
+ isDiyH5
1192
+ ]);
1167
1193
  const loadVideos = React.useCallback((pageNum) => __awaiter(void 0, void 0, void 0, function* () {
1168
- var _1, _2, _3, _4;
1194
+ var _4, _5, _6, _7;
1169
1195
  if (rtcList.length <= 0) {
1170
1196
  return;
1171
1197
  }
1198
+ if (isDiyPage && (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) > 0) {
1199
+ setRtcList(rtcList.concat(firstRtcList));
1200
+ setCacheRtcList(cacheRtcList.concat(firstRtcList));
1201
+ return;
1202
+ }
1172
1203
  const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
1173
- const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_1 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _1 === void 0 ? void 0 : _1.itemId) && { productFilter: [(_2 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _2 === void 0 ? void 0 : _2.itemId] })), (((_3 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _3 === void 0 ? void 0 : _3.itemId) && { contentFilter: [(_4 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _4 === void 0 ? void 0 : _4.itemId] })), { themeTag: themeTag.current }), ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor && { pageNum })));
1204
+ const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_4 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _4 === void 0 ? void 0 : _4.itemId) && { productFilter: [(_5 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _5 === void 0 ? void 0 : _5.itemId] })), (((_6 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _6 === void 0 ? void 0 : _6.itemId) && { contentFilter: [(_7 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _7 === void 0 ? void 0 : _7.itemId] })), { themeTag: themeTag.current }), ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor && { pageNum })));
1174
1205
  setRtcList(rtcList.concat(getFilterRecList(data)));
1175
1206
  setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
1176
1207
  return data;
1177
- }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
1208
+ }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList, isDiyPage, firstRtcList]);
1178
1209
  const refreshFeSession = React.useCallback((enableReSid, event) => {
1179
1210
  var _a, _b, _c, _d, _e;
1180
1211
  let expire = false;
@@ -1205,8 +1236,8 @@
1205
1236
  // 用户信息都是公共的
1206
1237
  if (!userInfo) {
1207
1238
  userInfo = {
1208
- // productUserId: fakeUserId, // 后端逻辑会从请求头获取,所以不需要传
1209
- // tpChannelId: 'H5' // 后端处理
1239
+ productUserId: fakeUserId // 后端逻辑会从请求头获取,所以不需要传
1240
+ // tpChannelId: 'H5' // 后端处理
1210
1241
  };
1211
1242
  }
1212
1243
  const sessionID = storeAndLoadFeSessionId();
@@ -1240,7 +1271,8 @@
1240
1271
  layoutVariantId,
1241
1272
  globalConfig,
1242
1273
  playbookType,
1243
- bffDataSource
1274
+ bffDataSource,
1275
+ fakeUserId
1244
1276
  ]);
1245
1277
  const getEventParamsByJson = React.useCallback((_a) => {
1246
1278
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
@@ -1427,38 +1459,40 @@
1427
1459
  }
1428
1460
  }, [bffFetch, enableReportEvent, enabledMetaConversionApi, globalConfig, bffDataSource, getEventParamsByJson]);
1429
1461
  const bffMutateLike = React.useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
1462
+ body = Object.assign(Object.assign({}, body), { productUserId: fakeUserId });
1430
1463
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/like', { method: 'POST', body }));
1431
1464
  return res === null || res === void 0 ? void 0 : res.success;
1432
- }), [bffFetch]);
1465
+ }), [bffFetch, fakeUserId]);
1433
1466
  const bffMutateUnlike = React.useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
1467
+ body = Object.assign(Object.assign({}, body), { productUserId: fakeUserId });
1434
1468
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/unlike', { method: 'POST', body }));
1435
1469
  return res === null || res === void 0 ? void 0 : res.success;
1436
- }), [bffFetch]);
1470
+ }), [bffFetch, fakeUserId]);
1437
1471
  const bffSubmitForm = React.useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
1438
1472
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/customform', { method: 'POST', body }));
1439
1473
  return res === null || res === void 0 ? void 0 : res.success;
1440
1474
  }), [bffFetch]);
1441
1475
  // 获取 Tag
1442
1476
  const bffGetTagList = React.useCallback((data) => __awaiter(void 0, void 0, void 0, function* () {
1443
- var _5, _6, _7, _8, _9, _10, _11, _12;
1444
- const isShowTag = !!((_7 = (_6 = (_5 = data === null || data === void 0 ? void 0 : data.data) === null || _5 === void 0 ? void 0 : _5.sxpPageConf) === null || _6 === void 0 ? void 0 : _6.globalConfig) === null || _7 === void 0 ? void 0 : _7.isShowTag);
1477
+ var _8, _9, _10, _11, _12, _13, _14, _15;
1478
+ const isShowTag = !!((_10 = (_9 = (_8 = data === null || data === void 0 ? void 0 : data.data) === null || _8 === void 0 ? void 0 : _8.sxpPageConf) === null || _9 === void 0 ? void 0 : _9.globalConfig) === null || _10 === void 0 ? void 0 : _10.isShowTag);
1445
1479
  if (!utmVal || !isShowTag)
1446
1480
  return;
1447
1481
  try {
1448
- const val = (_10 = (_9 = (_8 = splitUrlParams(utmVal)) === null || _8 === void 0 ? void 0 : _8.filter((val) => {
1482
+ const val = (_13 = (_12 = (_11 = splitUrlParams(utmVal)) === null || _11 === void 0 ? void 0 : _11.filter((val) => {
1449
1483
  var _a, _b;
1450
1484
  const key = val.split('=')[0];
1451
1485
  return (_b = ((_a = utmParameter === null || utmParameter === void 0 ? void 0 : utmParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
1452
- })) === null || _9 === void 0 ? void 0 : _9.join('&')) !== null && _10 !== void 0 ? _10 : '';
1486
+ })) === null || _12 === void 0 ? void 0 : _12.join('&')) !== null && _13 !== void 0 ? _13 : '';
1453
1487
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
1454
- setTagList((_12 = (_11 = result === null || result === void 0 ? void 0 : result.data) === null || _11 === void 0 ? void 0 : _11.tags) !== null && _12 !== void 0 ? _12 : []);
1488
+ setTagList((_15 = (_14 = result === null || result === void 0 ? void 0 : result.data) === null || _14 === void 0 ? void 0 : _14.tags) !== null && _15 !== void 0 ? _15 : []);
1455
1489
  }
1456
1490
  catch (e) {
1457
1491
  console.log('e', e);
1458
1492
  }
1459
1493
  }), [bffFetch, utmVal]);
1460
1494
  const ctaEvent = React.useCallback((eventInfo, rec, product, position, ctaActionType, targetUrl, contentType) => {
1461
- 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;
1495
+ 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;
1462
1496
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
1463
1497
  const isProd = ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) || (((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProducts) && ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProducts) === null || _d === void 0 ? void 0 : _d.length) > 0);
1464
1498
  let fromKName = '';
@@ -1476,7 +1510,7 @@
1476
1510
  }
1477
1511
  const contentTags = (_p = (_m = (_h = product === null || product === void 0 ? void 0 : product.tags) !== null && _h !== void 0 ? _h : (_l = (_k = (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : (_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.tags) !== null && _p !== void 0 ? _p : (_q = rec === null || rec === void 0 ? void 0 : rec.product) === null || _q === void 0 ? void 0 : _q.tags;
1478
1512
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1479
- eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_r = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _r !== void 0 ? _r : '', ctaName: (_s = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _s !== void 0 ? _s : '', contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_u = (_t = rec === null || rec === void 0 ? void 0 : rec.video) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_10 = (_7 = (_2 = (_y = (_v = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _v !== void 0 ? _v : (_x = (_w = rec === null || rec === void 0 ? void 0 : rec.video) === null || _w === void 0 ? void 0 : _w.bindCta) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : (_1 = (_0 = (_z = rec === null || rec === void 0 ? void 0 : rec.video) === null || _z === void 0 ? void 0 : _z.bindProduct) === null || _0 === void 0 ? void 0 : _0.bindCta) === null || _1 === void 0 ? void 0 : _1.traceInfo) !== null && _2 !== void 0 ? _2 : (_6 = (_5 = (_4 = (_3 = rec === null || rec === void 0 ? void 0 : rec.video) === null || _3 === void 0 ? void 0 : _3.bindProducts) === null || _4 === void 0 ? void 0 : _4[0]) === null || _5 === void 0 ? void 0 : _5.bindCta) === null || _6 === void 0 ? void 0 : _6.traceInfo) !== null && _7 !== void 0 ? _7 : (_9 = (_8 = rec === null || rec === void 0 ? void 0 : rec.product) === null || _8 === void 0 ? void 0 : _8.bindCta) === null || _9 === void 0 ? void 0 : _9.traceInfo) !== null && _10 !== void 0 ? _10 : '', fromKName, fromKPage: (_11 = location === null || location === void 0 ? void 0 : location.href) !== null && _11 !== void 0 ? _11 : '', contentFormat })
1513
+ eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_r = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _r !== void 0 ? _r : '', ctaName: (_s = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _s !== void 0 ? _s : '', contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_u = (_t = rec === null || rec === void 0 ? void 0 : rec.video) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '', sceneId: (_x = (_w = (_v = rec === null || rec === void 0 ? void 0 : rec.video) === null || _v === void 0 ? void 0 : _v.scene) === null || _w === void 0 ? void 0 : _w.sceneId) !== null && _x !== void 0 ? _x : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_13 = (_10 = (_5 = (_1 = (_y = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _y !== void 0 ? _y : (_0 = (_z = rec === null || rec === void 0 ? void 0 : rec.video) === null || _z === void 0 ? void 0 : _z.bindCta) === null || _0 === void 0 ? void 0 : _0.traceInfo) !== null && _1 !== void 0 ? _1 : (_4 = (_3 = (_2 = rec === null || rec === void 0 ? void 0 : rec.video) === null || _2 === void 0 ? void 0 : _2.bindProduct) === null || _3 === void 0 ? void 0 : _3.bindCta) === null || _4 === void 0 ? void 0 : _4.traceInfo) !== null && _5 !== void 0 ? _5 : (_9 = (_8 = (_7 = (_6 = rec === null || rec === void 0 ? void 0 : rec.video) === null || _6 === void 0 ? void 0 : _6.bindProducts) === null || _7 === void 0 ? void 0 : _7[0]) === null || _8 === void 0 ? void 0 : _8.bindCta) === null || _9 === void 0 ? void 0 : _9.traceInfo) !== null && _10 !== void 0 ? _10 : (_12 = (_11 = rec === null || rec === void 0 ? void 0 : rec.product) === null || _11 === void 0 ? void 0 : _11.bindCta) === null || _12 === void 0 ? void 0 : _12.traceInfo) !== null && _13 !== void 0 ? _13 : '', fromKName, fromKPage: (_14 = location === null || location === void 0 ? void 0 : location.href) !== null && _14 !== void 0 ? _14 : '', contentFormat })
1480
1514
  });
1481
1515
  }, [bffEventReport, isFromHashtag]);
1482
1516
  const h5EnterLink = React.useCallback(() => {
@@ -1500,10 +1534,10 @@
1500
1534
  });
1501
1535
  }, [bffEventReport]);
1502
1536
  const getAccount = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
1503
- var _13, _14;
1537
+ var _16, _17;
1504
1538
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/account', { method: 'GET' }));
1505
- setChatlabsId((_13 = res === null || res === void 0 ? void 0 : res.data) === null || _13 === void 0 ? void 0 : _13.chatLabsId);
1506
- return ((_14 = res === null || res === void 0 ? void 0 : res.data) === null || _14 === void 0 ? void 0 : _14.consentResult) === 'true';
1539
+ setChatlabsId((_16 = res === null || res === void 0 ? void 0 : res.data) === null || _16 === void 0 ? void 0 : _16.chatLabsId);
1540
+ return ((_17 = res === null || res === void 0 ? void 0 : res.data) === null || _17 === void 0 ? void 0 : _17.consentResult) === 'true';
1507
1541
  }), [bffFetch]);
1508
1542
  const accountSonsent = React.useCallback((consentResult) => __awaiter(void 0, void 0, void 0, function* () {
1509
1543
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/account/consent', {
@@ -1567,6 +1601,9 @@
1567
1601
  }
1568
1602
  setRtcList(list);
1569
1603
  setCacheRtcList(list);
1604
+ if (isDiyPage) {
1605
+ setFirstRtcList(list);
1606
+ }
1570
1607
  bffGetTagList(curData !== null && curData !== void 0 ? curData : finalPageData);
1571
1608
  if (channel) {
1572
1609
  const item = list === null || list === void 0 ? void 0 : list[0];
@@ -1586,7 +1623,7 @@
1586
1623
  });
1587
1624
  setLoading(false);
1588
1625
  });
1589
- }, [isShowConsent, channel]);
1626
+ }, [isShowConsent, channel, isDiyPage]);
1590
1627
  // cms预览
1591
1628
  React.useEffect(() => {
1592
1629
  if (!isPreview)
@@ -1602,12 +1639,15 @@
1602
1639
  }
1603
1640
  setRtcList(list);
1604
1641
  setCacheRtcList(list);
1642
+ if (isDiyPage) {
1643
+ setFirstRtcList(list);
1644
+ }
1605
1645
  }
1606
1646
  })
1607
1647
  .finally(() => {
1608
1648
  setLoading(false);
1609
1649
  });
1610
- }, [getRecommendVideos, bffGetTagList, channel]);
1650
+ }, [getRecommendVideos, bffGetTagList, channel, isDiyPage]);
1611
1651
  const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif', appDomain);
1612
1652
  return (React.createElement(SxpDataSourceContext.Provider, { value: {
1613
1653
  rtcList,
@@ -1665,7 +1705,8 @@
1665
1705
  refreshFeSession,
1666
1706
  getAccount,
1667
1707
  accountSonsent,
1668
- isDiyH5,
1708
+ isDiyH5: isDiyPage,
1709
+ firstRtcList,
1669
1710
  pixelPvStatusRef
1670
1711
  } }, isShowConsent ? (React.createElement(Consent$4, Object.assign({}, (_e = (_d = (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.item) === null || _e === void 0 ? void 0 : _e.props))) : (render({
1671
1712
  rtcList,
@@ -2127,14 +2168,14 @@
2127
2168
  * @Author: binruan@chatlabs.com
2128
2169
  * @Date: 2024-03-12 10:59:06
2129
2170
  * @LastEditors: binruan@chatlabs.com
2130
- * @LastEditTime: 2024-11-28 11:17:16
2171
+ * @LastEditTime: 2025-05-09 15:30:59
2131
2172
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
2132
2173
  *
2133
2174
  */
2134
2175
  function useEventReport() {
2135
2176
  const { bffEventReport, popupDetailData, isFromHashtag, eventTimeList, setEventTimeList } = useSxpDataSource();
2136
2177
  const jumpToWeb = React.useCallback((e, data, product, cta, position, traceInfo) => {
2137
- 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;
2178
+ 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;
2138
2179
  const i = eventTimeList === null || eventTimeList === void 0 ? void 0 : eventTimeList.findIndex((item) => item.target === (e === null || e === void 0 ? void 0 : e.target));
2139
2180
  if (i !== -1) {
2140
2181
  return;
@@ -2167,11 +2208,11 @@
2167
2208
  contentFormat = 'image';
2168
2209
  }
2169
2210
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
2170
- eventInfo: Object.assign({ eventSubject: 'jumpToWeb', eventDescription: 'User jumped to website', productId: (_v = product === null || product === void 0 ? void 0 : product.itemId) !== null && _v !== void 0 ? _v : '', productName: (_w = product === null || product === void 0 ? void 0 : product.title) !== null && _w !== void 0 ? _w : '', price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0', productCollection: (_x = product === null || product === void 0 ? void 0 : product.collection) !== null && _x !== void 0 ? _x : '', fromKName, fromKPage: location === null || location === void 0 ? void 0 : location.href, contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.itemId) !== null && _z !== void 0 ? _z : '', ctatId: (_0 = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _0 !== void 0 ? _0 : '', traceInfo: (_13 = (_10 = (_8 = (_4 = (_1 = traceInfo !== null && traceInfo !== void 0 ? traceInfo : product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _1 !== void 0 ? _1 : (_3 = (_2 = data === null || data === void 0 ? void 0 : data.video) === null || _2 === void 0 ? void 0 : _2.bindProduct) === null || _3 === void 0 ? void 0 : _3.traceInfo) !== null && _4 !== void 0 ? _4 : (_7 = (_6 = (_5 = data === null || data === void 0 ? void 0 : data.video) === null || _5 === void 0 ? void 0 : _5.bindProducts) === null || _6 === void 0 ? void 0 : _6[0]) === null || _7 === void 0 ? void 0 : _7.traceInfo) !== null && _8 !== void 0 ? _8 : (_9 = data === null || data === void 0 ? void 0 : data.product) === null || _9 === void 0 ? void 0 : _9.traceInfo) !== null && _10 !== void 0 ? _10 : (_12 = (_11 = data === null || data === void 0 ? void 0 : data.video) === null || _11 === void 0 ? void 0 : _11.bindCta) === null || _12 === void 0 ? void 0 : _12.traceInfo) !== null && _13 !== void 0 ? _13 : '' }, (contentFormat && { contentFormat }))
2211
+ eventInfo: Object.assign({ eventSubject: 'jumpToWeb', eventDescription: 'User jumped to website', productId: (_v = product === null || product === void 0 ? void 0 : product.itemId) !== null && _v !== void 0 ? _v : '', productName: (_w = product === null || product === void 0 ? void 0 : product.title) !== null && _w !== void 0 ? _w : '', price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0', productCollection: (_x = product === null || product === void 0 ? void 0 : product.collection) !== null && _x !== void 0 ? _x : '', fromKName, fromKPage: location === null || location === void 0 ? void 0 : location.href, contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.itemId) !== null && _z !== void 0 ? _z : '', sceneId: (_2 = (_1 = (_0 = data === null || data === void 0 ? void 0 : data.video) === null || _0 === void 0 ? void 0 : _0.scene) === null || _1 === void 0 ? void 0 : _1.sceneId) !== null && _2 !== void 0 ? _2 : '', ctatId: (_3 = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _3 !== void 0 ? _3 : '', traceInfo: (_16 = (_13 = (_11 = (_7 = (_4 = traceInfo !== null && traceInfo !== void 0 ? traceInfo : product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _4 !== void 0 ? _4 : (_6 = (_5 = data === null || data === void 0 ? void 0 : data.video) === null || _5 === void 0 ? void 0 : _5.bindProduct) === null || _6 === void 0 ? void 0 : _6.traceInfo) !== null && _7 !== void 0 ? _7 : (_10 = (_9 = (_8 = data === null || data === void 0 ? void 0 : data.video) === null || _8 === void 0 ? void 0 : _8.bindProducts) === null || _9 === void 0 ? void 0 : _9[0]) === null || _10 === void 0 ? void 0 : _10.traceInfo) !== null && _11 !== void 0 ? _11 : (_12 = data === null || data === void 0 ? void 0 : data.product) === null || _12 === void 0 ? void 0 : _12.traceInfo) !== null && _13 !== void 0 ? _13 : (_15 = (_14 = data === null || data === void 0 ? void 0 : data.video) === null || _14 === void 0 ? void 0 : _14.bindCta) === null || _15 === void 0 ? void 0 : _15.traceInfo) !== null && _16 !== void 0 ? _16 : '' }, (contentFormat && { contentFormat }))
2171
2212
  });
2172
2213
  }, [bffEventReport, popupDetailData, isFromHashtag, eventTimeList]);
2173
2214
  const productView = React.useCallback((data, product, cta, viewTime, position) => {
2174
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
2215
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
2175
2216
  let fromKName = '';
2176
2217
  if (popupDetailData && (((_b = (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
2177
2218
  fromKName = 'pdpPage';
@@ -2190,8 +2231,9 @@
2190
2231
  contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
2191
2232
  position: position + '',
2192
2233
  contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
2234
+ sceneId: (_g = (_f = (_e = data === null || data === void 0 ? void 0 : data.video) === null || _e === void 0 ? void 0 : _e.scene) === null || _f === void 0 ? void 0 : _f.sceneId) !== null && _g !== void 0 ? _g : '',
2193
2235
  ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
2194
- traceInfo: (_p = (_m = (_h = (_e = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _e !== void 0 ? _e : (_g = (_f = data === null || data === void 0 ? void 0 : data.video) === null || _f === void 0 ? void 0 : _f.bindProduct) === null || _g === void 0 ? void 0 : _g.traceInfo) !== null && _h !== void 0 ? _h : (_l = (_k = (_j = data === null || data === void 0 ? void 0 : data.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.traceInfo) !== null && _m !== void 0 ? _m : (_o = data === null || data === void 0 ? void 0 : data.product) === null || _o === void 0 ? void 0 : _o.traceInfo) !== null && _p !== void 0 ? _p : '',
2236
+ traceInfo: (_s = (_q = (_l = (_h = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _h !== void 0 ? _h : (_k = (_j = data === null || data === void 0 ? void 0 : data.video) === null || _j === void 0 ? void 0 : _j.bindProduct) === null || _k === void 0 ? void 0 : _k.traceInfo) !== null && _l !== void 0 ? _l : (_p = (_o = (_m = data === null || data === void 0 ? void 0 : data.video) === null || _m === void 0 ? void 0 : _m.bindProducts) === null || _o === void 0 ? void 0 : _o[0]) === null || _p === void 0 ? void 0 : _p.traceInfo) !== null && _q !== void 0 ? _q : (_r = data === null || data === void 0 ? void 0 : data.product) === null || _r === void 0 ? void 0 : _r.traceInfo) !== null && _s !== void 0 ? _s : '',
2195
2237
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
2196
2238
  eventSubject: 'productView',
2197
2239
  eventDescription: 'User browsed the product'
@@ -16235,7 +16277,7 @@ Made in Italy` })));
16235
16277
  * @Author: binruan@chatlabs.com
16236
16278
  * @Date: 2024-01-10 10:58:24
16237
16279
  * @LastEditors: binruan@chatlabs.com
16238
- * @LastEditTime: 2025-02-28 10:00:31
16280
+ * @LastEditTime: 2025-05-09 15:30:41
16239
16281
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
16240
16282
  *
16241
16283
  */
@@ -16273,7 +16315,7 @@ Made in Italy` })));
16273
16315
  }
16274
16316
  }, [waterFallData]);
16275
16317
  const reportTagsView = React.useCallback(() => {
16276
- var _a, _b, _c, _d, _e, _f;
16318
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
16277
16319
  const rec = recData === null || recData === void 0 ? void 0 : recData.rec;
16278
16320
  if (!rec)
16279
16321
  return;
@@ -16293,9 +16335,10 @@ Made in Italy` })));
16293
16335
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
16294
16336
  eventInfo: {
16295
16337
  contentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
16338
+ 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 : '',
16296
16339
  position: cacheActiveIndex + '',
16297
- contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
16298
- traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
16340
+ contentTags: JSON.stringify((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.tags),
16341
+ traceInfo: (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.traceInfo,
16299
16342
  hashTags: JSON.stringify([recData === null || recData === void 0 ? void 0 : recData.hashTag]),
16300
16343
  fromKName,
16301
16344
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
@@ -18402,21 +18445,22 @@ Made in Italy` })));
18402
18445
  const likeIcon = useIconLink(defaultLikeIconPath$2);
18403
18446
  const unlikeIcon = useIconLink(defaultUnLikeIconPath$2);
18404
18447
  const handleClick = lodash.debounce(() => __awaiter(void 0, void 0, void 0, function* () {
18405
- var _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;
18448
+ var _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;
18406
18449
  if (state) {
18407
18450
  // 先设置状态
18408
18451
  setState(false);
18409
- const result = (_e = (yield (mutateUnlike === null || mutateUnlike === void 0 ? void 0 : mutateUnlike({ videoItemId: (_d = (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '' })))) !== null && _e !== void 0 ? _e : false;
18452
+ const result = (_e = (yield (mutateUnlike === null || mutateUnlike === void 0 ? void 0 : mutateUnlike({ itemId: (_d = (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '' })))) !== null && _e !== void 0 ? _e : false;
18410
18453
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
18411
18454
  eventInfo: {
18412
18455
  eventSubject: 'favoriteContentCanceled',
18413
18456
  eventDescription: 'This content was unfavorite by the user',
18414
18457
  contentId: (_g = (_f = recData === null || recData === void 0 ? void 0 : recData.video) === null || _f === void 0 ? void 0 : _f.itemId) !== null && _g !== void 0 ? _g : '',
18415
- contentName: (_j = (_h = recData === null || recData === void 0 ? void 0 : recData.video) === null || _h === void 0 ? void 0 : _h.title) !== null && _j !== void 0 ? _j : '',
18416
- contentTags: JSON.stringify((_l = (_k = recData === null || recData === void 0 ? void 0 : recData.video) === null || _k === void 0 ? void 0 : _k.tags) !== null && _l !== void 0 ? _l : []),
18458
+ sceneId: (_k = (_j = (_h = recData === null || recData === void 0 ? void 0 : recData.video) === null || _h === void 0 ? void 0 : _h.scene) === null || _j === void 0 ? void 0 : _j.sceneId) !== null && _k !== void 0 ? _k : '',
18459
+ contentName: (_m = (_l = recData === null || recData === void 0 ? void 0 : recData.video) === null || _l === void 0 ? void 0 : _l.title) !== null && _m !== void 0 ? _m : '',
18460
+ contentTags: JSON.stringify((_p = (_o = recData === null || recData === void 0 ? void 0 : recData.video) === null || _o === void 0 ? void 0 : _o.tags) !== null && _p !== void 0 ? _p : []),
18417
18461
  position: position + '',
18418
- contentFormat: ((_m = recData === null || recData === void 0 ? void 0 : recData.video) === null || _m === void 0 ? void 0 : _m.url) ? 'video' : 'image',
18419
- traceInfo: (_o = recData === null || recData === void 0 ? void 0 : recData.video) === null || _o === void 0 ? void 0 : _o.traceInfo
18462
+ contentFormat: ((_q = recData === null || recData === void 0 ? void 0 : recData.video) === null || _q === void 0 ? void 0 : _q.url) ? 'video' : 'image',
18463
+ traceInfo: (_r = recData === null || recData === void 0 ? void 0 : recData.video) === null || _r === void 0 ? void 0 : _r.traceInfo
18420
18464
  }
18421
18465
  });
18422
18466
  // 如果接口调用失败,则回滚状态
@@ -18424,48 +18468,49 @@ Made in Italy` })));
18424
18468
  setState(true);
18425
18469
  }
18426
18470
  else {
18427
- const nRtcList = (_p = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18471
+ const nRtcList = (_s = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18428
18472
  if (index === position) {
18429
18473
  item.isCollected = false;
18430
18474
  }
18431
18475
  return item;
18432
- })) !== null && _p !== void 0 ? _p : [];
18476
+ })) !== null && _s !== void 0 ? _s : [];
18433
18477
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
18434
18478
  }
18435
18479
  }
18436
18480
  else {
18437
18481
  setState(true);
18438
- const result = (_q = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData) })))) !== null && _q !== void 0 ? _q : false;
18482
+ const result = (_v = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData), itemId: (_u = (_t = recData === null || recData === void 0 ? void 0 : recData.video) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '' })))) !== null && _v !== void 0 ? _v : false;
18439
18483
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
18440
18484
  eventInfo: {
18441
18485
  eventSubject: 'favoriteContent',
18442
18486
  eventDescription: 'This content was favorite by the user',
18443
- contentId: (_s = (_r = recData === null || recData === void 0 ? void 0 : recData.video) === null || _r === void 0 ? void 0 : _r.itemId) !== null && _s !== void 0 ? _s : '',
18444
- contentName: (_u = (_t = recData === null || recData === void 0 ? void 0 : recData.video) === null || _t === void 0 ? void 0 : _t.title) !== null && _u !== void 0 ? _u : '',
18445
- contentTags: JSON.stringify((_w = (_v = recData === null || recData === void 0 ? void 0 : recData.video) === null || _v === void 0 ? void 0 : _v.tags) !== null && _w !== void 0 ? _w : []),
18487
+ contentId: (_x = (_w = recData === null || recData === void 0 ? void 0 : recData.video) === null || _w === void 0 ? void 0 : _w.itemId) !== null && _x !== void 0 ? _x : '',
18488
+ sceneId: (_0 = (_z = (_y = recData === null || recData === void 0 ? void 0 : recData.video) === null || _y === void 0 ? void 0 : _y.scene) === null || _z === void 0 ? void 0 : _z.sceneId) !== null && _0 !== void 0 ? _0 : '',
18489
+ contentName: (_2 = (_1 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _1 === void 0 ? void 0 : _1.title) !== null && _2 !== void 0 ? _2 : '',
18490
+ contentTags: JSON.stringify((_4 = (_3 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _3 === void 0 ? void 0 : _3.tags) !== null && _4 !== void 0 ? _4 : []),
18446
18491
  position: position + '',
18447
- contentFormat: ((_x = recData === null || recData === void 0 ? void 0 : recData.video) === null || _x === void 0 ? void 0 : _x.url) ? 'video' : 'image',
18448
- traceInfo: (_y = recData === null || recData === void 0 ? void 0 : recData.video) === null || _y === void 0 ? void 0 : _y.traceInfo
18492
+ contentFormat: ((_5 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _5 === void 0 ? void 0 : _5.url) ? 'video' : 'image',
18493
+ traceInfo: (_6 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _6 === void 0 ? void 0 : _6.traceInfo
18449
18494
  }
18450
18495
  });
18451
18496
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
18452
18497
  eventName: 'Engagement',
18453
- product: (_z = recData === null || recData === void 0 ? void 0 : recData.video) === null || _z === void 0 ? void 0 : _z.bindProducts,
18498
+ product: (_7 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _7 === void 0 ? void 0 : _7.bindProducts,
18454
18499
  rec: recData,
18455
18500
  position,
18456
- content_id: (_1 = (_0 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _0 === void 0 ? void 0 : _0.itemId) !== null && _1 !== void 0 ? _1 : '',
18501
+ content_id: (_9 = (_8 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _8 === void 0 ? void 0 : _8.itemId) !== null && _9 !== void 0 ? _9 : '',
18457
18502
  engagement_type: 'like'
18458
18503
  });
18459
18504
  if (!result) {
18460
18505
  setState(false);
18461
18506
  }
18462
18507
  else {
18463
- const nRtcList = (_2 = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18508
+ const nRtcList = (_10 = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18464
18509
  if (index === position) {
18465
18510
  item.isCollected = true;
18466
18511
  }
18467
18512
  return item;
18468
- })) !== null && _2 !== void 0 ? _2 : [];
18513
+ })) !== null && _10 !== void 0 ? _10 : [];
18469
18514
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
18470
18515
  }
18471
18516
  }
@@ -18502,7 +18547,7 @@ Made in Italy` })));
18502
18547
  const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activeIndex, videoPostConfig, videoPlayIcon, loopPlay, swiperRef, visibleHeight }, ref) => {
18503
18548
  var _a, _b;
18504
18549
  const [isPauseVideo, setIsPauseVideo] = React.useState(false);
18505
- const { bffEventReport, sxpParameter, waterFallData, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
18550
+ const { bffEventReport, sxpParameter, firstRtcList, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
18506
18551
  const videoStartTime = React.useRef(0);
18507
18552
  const [isLoadFinish, setIsLoadFinish] = React.useState(false);
18508
18553
  const { isActive } = useSwiperSlide();
@@ -18519,7 +18564,7 @@ Made in Italy` })));
18519
18564
  const loopPlayRef = React.useRef(loopPlay);
18520
18565
  const scene = rec.video.scene;
18521
18566
  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);
18522
- 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;
18567
+ const videoCover = (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.cover;
18523
18568
  const videoPoster = videoCover || (sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image);
18524
18569
  React.useImperativeHandle(ref, () => {
18525
18570
  return {
@@ -18568,6 +18613,23 @@ Made in Italy` })));
18568
18613
  return;
18569
18614
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
18570
18615
  }, [videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18616
+ const handleEnd = () => {
18617
+ var _a, _b, _c, _d, _e, _f;
18618
+ if (!videoRef.current)
18619
+ return;
18620
+ if (isDiyH5) {
18621
+ (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.pause();
18622
+ if (!loopPlayRef.current)
18623
+ return;
18624
+ if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
18625
+ 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;
18626
+ (_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);
18627
+ }
18628
+ }
18629
+ else {
18630
+ (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.play();
18631
+ }
18632
+ };
18571
18633
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
18572
18634
  const handlePlaying = React.useCallback(() => {
18573
18635
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
@@ -18576,7 +18638,7 @@ Made in Italy` })));
18576
18638
  setIsLoadFinish(true);
18577
18639
  }, []);
18578
18640
  const handleStartPlay = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
18579
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
18641
+ var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
18580
18642
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
18581
18643
  return;
18582
18644
  setIsPauseVideo(false);
@@ -18587,16 +18649,11 @@ Made in Italy` })));
18587
18649
  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);
18588
18650
  const playType = (isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) ? '0' : '1';
18589
18651
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
18590
- 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) + '' }))
18652
+ 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) + '' }))
18591
18653
  });
18592
18654
  isFirstPlayRef.current = false;
18593
18655
  }
18594
18656
  }), [bffEventReport, data, index, isFirstPlayRef, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18595
- const setCurrentTimeByStartTime = React.useCallback(() => {
18596
- if (isDiyH5) {
18597
- videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
18598
- }
18599
- }, []);
18600
18657
  const handLoadeddata = React.useCallback(() => {
18601
18658
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || firstFrameSrc || !blur)
18602
18659
  return;
@@ -18621,13 +18678,12 @@ Made in Italy` })));
18621
18678
  const handleLoadedmetadata = React.useCallback(() => {
18622
18679
  if (!videoRef.current)
18623
18680
  return;
18624
- setCurrentTimeByStartTime();
18625
18681
  loadedTimeRef.current = new Date();
18626
18682
  handleStartPlay();
18627
18683
  handLoadeddata();
18628
18684
  }, [videoRef.current, handLoadeddata, handleStartPlay]);
18629
18685
  const handleClickVideo = React.useCallback((type) => () => {
18630
- var _a, _b, _c, _d, _e, _f;
18686
+ var _a, _b, _c, _d, _e;
18631
18687
  if (!videoRef.current)
18632
18688
  return;
18633
18689
  if (!isLoadFinish)
@@ -18648,20 +18704,17 @@ Made in Italy` })));
18648
18704
  break;
18649
18705
  default:
18650
18706
  if (isPause) {
18651
- 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)) {
18652
- videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
18653
- }
18654
- (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.play();
18707
+ (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.play();
18655
18708
  }
18656
18709
  else {
18657
- (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.pause();
18710
+ (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.pause();
18658
18711
  }
18659
18712
  setIsPauseVideo(!isPause);
18660
18713
  break;
18661
18714
  }
18662
18715
  }, [isLoadFinish, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18663
18716
  const handlePause = React.useCallback(() => {
18664
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
18717
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
18665
18718
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
18666
18719
  return;
18667
18720
  if (activeIndex !== index)
@@ -18677,14 +18730,15 @@ Made in Italy` })));
18677
18730
  eventSubject: 'playOverVideo',
18678
18731
  eventDescription: 'User finished playing the video',
18679
18732
  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 : '',
18680
- 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 : '',
18733
+ 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 : '',
18734
+ 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 : '',
18681
18735
  endTime: videoCurrentTime,
18682
18736
  videoDuration,
18683
18737
  playDuration,
18684
- 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 : []),
18738
+ 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 : []),
18685
18739
  position: index + '',
18686
18740
  contentFormat: 'video',
18687
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
18741
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
18688
18742
  }
18689
18743
  });
18690
18744
  }
@@ -18692,27 +18746,8 @@ Made in Italy` })));
18692
18746
  const handleWaiting = React.useCallback(() => {
18693
18747
  setWaiting(true);
18694
18748
  }, []);
18695
- const handleTimeUpload = () => {
18696
- if (!videoRef.current || !isDiyH5)
18697
- return;
18698
- setTimeout(() => {
18699
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
18700
- 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)) {
18701
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
18702
- if (!loopPlayRef.current)
18703
- return;
18704
- if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) {
18705
- (_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);
18706
- }
18707
- else {
18708
- 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;
18709
- (_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);
18710
- }
18711
- }
18712
- });
18713
- };
18714
18749
  React.useEffect(() => {
18715
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18750
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18716
18751
  if (!isActive)
18717
18752
  return;
18718
18753
  const videoSrc = videoUrl;
@@ -18733,7 +18768,6 @@ Made in Italy` })));
18733
18768
  hls === null || hls === void 0 ? void 0 : hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
18734
18769
  hls === null || hls === void 0 ? void 0 : hls.on(Hls.Events.MANIFEST_PARSED, function () {
18735
18770
  var _a;
18736
- setCurrentTimeByStartTime();
18737
18771
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
18738
18772
  });
18739
18773
  }
@@ -18747,12 +18781,11 @@ Made in Italy` })));
18747
18781
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.addEventListener('play', handleStartPlay);
18748
18782
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.addEventListener('playing', handlePlaying);
18749
18783
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.addEventListener('pause', handlePause);
18750
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handlePlay);
18784
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handleEnd);
18751
18785
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
18752
18786
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
18753
- (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.addEventListener('timeupdate', handleTimeUpload);
18754
18787
  return () => {
18755
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18788
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18756
18789
  const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
18757
18790
  if (!isPause)
18758
18791
  handlePause();
@@ -18764,10 +18797,9 @@ Made in Italy` })));
18764
18797
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('play', handleStartPlay);
18765
18798
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('playing', handlePlaying);
18766
18799
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('pause', handlePause);
18767
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handlePlay);
18800
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handleEnd);
18768
18801
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('canplay', handlePlay);
18769
18802
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.removeEventListener('waiting', handleWaiting);
18770
- (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.removeEventListener('timeupdate', handleTimeUpload);
18771
18803
  };
18772
18804
  }, [isActive]);
18773
18805
  React.useEffect(() => {
@@ -18982,19 +19014,45 @@ Made in Italy` })));
18982
19014
  }, onLoad: onShowFirstImage }))));
18983
19015
  };
18984
19016
 
18985
- const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig }) => {
19017
+ const PictureGroup$4 = React.forwardRef(({ imgUrls, data, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig, swiperRef }, ref) => {
18986
19018
  var _a, _b;
18987
19019
  const { isActive } = useSwiperSlide();
18988
- const { sxpParameter, openHashtag } = useSxpDataSource();
19020
+ const { firstRtcList, openHashtag, isDiyH5 } = useSxpDataSource();
18989
19021
  const [isLoad, setIsLoad] = React.useState(false);
18990
19022
  const [imgInfo, setImgInfo] = React.useState();
18991
19023
  const [swiperActiveIndex, setSwiperActiveIndex] = React.useState(0);
18992
- const swiperRef = React.useRef();
19024
+ const imgsSwiperRef = React.useRef();
18993
19025
  const isFirstPlayRef = React.useRef(true);
19026
+ const loopPlayRef = React.useRef(true);
18994
19027
  const initTime = new Date();
19028
+ React.useImperativeHandle(ref, () => {
19029
+ return {
19030
+ setLoopPlay(v) {
19031
+ loopPlayRef.current = v;
19032
+ }
19033
+ };
19034
+ });
19035
+ React.useEffect(() => {
19036
+ let timerId;
19037
+ if (isLoad && isActive && isDiyH5) {
19038
+ timerId = setTimeout(() => {
19039
+ var _a, _b, _c, _d;
19040
+ if (!loopPlayRef.current)
19041
+ return;
19042
+ if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
19043
+ 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;
19044
+ (_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);
19045
+ }
19046
+ }, 3000);
19047
+ }
19048
+ return () => {
19049
+ if (timerId)
19050
+ clearTimeout(timerId);
19051
+ };
19052
+ }, [isLoad, isActive, isDiyH5, index, swiperRef, firstRtcList]);
18995
19053
  React.useEffect(() => {
18996
19054
  if (isLoad && isActive) {
18997
- (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.start();
19055
+ (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.start();
18998
19056
  if (openHashtag) {
18999
19057
  onViewImageEndEvent(rec);
19000
19058
  }
@@ -19004,7 +19062,7 @@ Made in Italy` })));
19004
19062
  }
19005
19063
  }
19006
19064
  else {
19007
- (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.stop();
19065
+ (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.stop();
19008
19066
  }
19009
19067
  }, [rec, isActive, onViewImageEndEvent, openHashtag, index, onViewImageStartEvent, isLoad, imgInfo]);
19010
19068
  const showFirstImageFn = React.useCallback((e) => __awaiter(void 0, void 0, void 0, function* () {
@@ -19031,13 +19089,13 @@ Made in Italy` })));
19031
19089
  };
19032
19090
  }, [isActive, imgInfo]);
19033
19091
  const handleMouseEnter = React.useCallback(() => {
19034
- if (swiperRef.current && swiperRef.current.swiper && isAlly) {
19035
- swiperRef.current.swiper.autoplay.stop();
19092
+ if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
19093
+ imgsSwiperRef.current.swiper.autoplay.stop();
19036
19094
  }
19037
19095
  }, []);
19038
19096
  const handleMouseLeave = React.useCallback(() => {
19039
- if (swiperRef.current && swiperRef.current.swiper && isAlly) {
19040
- swiperRef.current.swiper.autoplay.start();
19097
+ if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
19098
+ imgsSwiperRef.current.swiper.autoplay.start();
19041
19099
  }
19042
19100
  }, []);
19043
19101
  const handleSlideChange = React.useCallback((swiper) => {
@@ -19058,7 +19116,7 @@ Made in Italy` })));
19058
19116
  enabled: true
19059
19117
  }
19060
19118
  }
19061
- : {}), { loop: true, ref: swiperRef, onSlideChange: handleSlideChange, className: css.css(Object.assign(Object.assign({ '.swiper-pagination': {
19119
+ : {}), { loop: true, ref: imgsSwiperRef, onSlideChange: handleSlideChange, className: css.css(Object.assign(Object.assign({ '.swiper-pagination': {
19062
19120
  bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0,
19063
19121
  fontSize: '14px'
19064
19122
  } }, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor) && {
@@ -19075,7 +19133,7 @@ Made in Italy` })));
19075
19133
  return (React.createElement(SwiperSlide, { key: srcKey, "aria-hidden": srcKey !== swiperActiveIndex },
19076
19134
  React.createElement(Picture, { src: !isLoad && srcKey > 0 ? '' : url, height: height, imgUrlsPostConfig: imgUrlsPostConfig, onShowFirstImage: showFirstImageFn })));
19077
19135
  }))));
19078
- };
19136
+ });
19079
19137
  var PictureGroup$5 = React.memo(PictureGroup$4);
19080
19138
 
19081
19139
  /*
@@ -19367,7 +19425,7 @@ Made in Italy` })));
19367
19425
  * @Author: binruan@chatlabs.com
19368
19426
  * @Date: 2024-03-20 10:27:31
19369
19427
  * @LastEditors: binruan@chatlabs.com
19370
- * @LastEditTime: 2025-05-09 15:51:40
19428
+ * @LastEditTime: 2025-05-12 14:26:15
19371
19429
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
19372
19430
  *
19373
19431
  */
@@ -19388,6 +19446,7 @@ Made in Italy` })));
19388
19446
  const [pageNum, setPageNum] = React.useState(2);
19389
19447
  React.useState(false);
19390
19448
  const videoWidgetRef = React.useRef(null);
19449
+ const pictureGroupRef = React.useRef(null);
19391
19450
  const fbcRef = React.useRef('');
19392
19451
  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 } = useSxpDataSource();
19393
19452
  const { backMainFeed, productView, jumpToWeb } = useEventReport();
@@ -19437,7 +19496,7 @@ Made in Italy` })));
19437
19496
  (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
19438
19497
  }, [data, ctaType, swiperRef]);
19439
19498
  const handleSessionCompleted = React.useCallback((fk) => {
19440
- 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;
19499
+ 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;
19441
19500
  const item = data === null || data === void 0 ? void 0 : data[activeIndex];
19442
19501
  let fromKName = '';
19443
19502
  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))) {
@@ -19464,22 +19523,23 @@ Made in Italy` })));
19464
19523
  eventSubject: 'sessionCompleted',
19465
19524
  eventDescription: 'Session completed',
19466
19525
  contentId: (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.itemId,
19467
- productId: (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.itemId,
19526
+ 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 : '',
19527
+ productId: (_r = item === null || item === void 0 ? void 0 : item.product) === null || _r === void 0 ? void 0 : _r.itemId,
19468
19528
  position: activeIndex + '',
19469
19529
  fromKName: fk || fromKName,
19470
19530
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
19471
- 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 : '',
19472
- 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 : ''
19531
+ 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 : '',
19532
+ 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 : ''
19473
19533
  }
19474
19534
  });
19475
- 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);
19535
+ 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);
19476
19536
  if (!popupDetailData) {
19477
19537
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19478
19538
  eventName: 'ExitFeed',
19479
- 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] : [],
19539
+ 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] : [],
19480
19540
  rec: item,
19481
19541
  position: activeIndex,
19482
- 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 : '',
19542
+ 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 : '',
19483
19543
  view_time: new Date() - viewTime.current
19484
19544
  });
19485
19545
  }
@@ -19539,8 +19599,9 @@ Made in Italy` })));
19539
19599
  refreshFeSession
19540
19600
  ]);
19541
19601
  const handleSessionExpire = React.useCallback(lodash.debounce(() => {
19542
- var _a;
19602
+ var _a, _b;
19543
19603
  (_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
19604
+ (_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
19544
19605
  refreshFeSession === null || refreshFeSession === void 0 ? void 0 : refreshFeSession(false, handleSessionCompleted);
19545
19606
  }, 1000), [handleSessionCompleted, refreshFeSession]);
19546
19607
  React.useEffect(() => {
@@ -19611,18 +19672,18 @@ Made in Italy` })));
19611
19672
  return null;
19612
19673
  }, [globalConfig, activeIndex, visList]);
19613
19674
  const renderContent = React.useCallback((rec, index) => {
19614
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
19675
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
19615
19676
  if (rec === 'organic menu') {
19616
19677
  return (React.createElement(MultiPosts$2, 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)));
19617
19678
  }
19618
- if ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.url) {
19679
+ 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)) {
19619
19680
  return (React.createElement(VideoWidget$5, 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 })));
19620
19681
  }
19621
- if ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.imgUrls) {
19622
- return (React.createElement(PictureGroup$5, { 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 }));
19682
+ if ((_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.imgUrls) {
19683
+ return (React.createElement(PictureGroup$5, 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 })));
19623
19684
  }
19624
- 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) {
19625
- return (_k = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _k === void 0 ? void 0 : _k.map((value, idx) => {
19685
+ 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) {
19686
+ return (_m = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _m === void 0 ? void 0 : _m.map((value, idx) => {
19626
19687
  var _a, _b, _c, _d, _e, _f, _g, _h;
19627
19688
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
19628
19689
  const Component = withBindDataSource(t);
@@ -19661,7 +19722,7 @@ Made in Italy` })));
19661
19722
  };
19662
19723
  }, [isShowMore]);
19663
19724
  const renderBottom = React.useCallback((rec, index) => {
19664
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
19725
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
19665
19726
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
19666
19727
  let cta = null;
19667
19728
  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) {
@@ -19670,24 +19731,27 @@ Made in Italy` })));
19670
19731
  else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
19671
19732
  cta = '商品CTA';
19672
19733
  }
19734
+ 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)) {
19735
+ cta = '服务CTA';
19736
+ }
19673
19737
  else {
19674
- 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;
19738
+ 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;
19675
19739
  }
19676
19740
  const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
19677
19741
  const isNineProduct = (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.nineProductEnable) &&
19678
19742
  index === ((rtcList === null || rtcList === void 0 ? void 0 : rtcList[0]) === 'organic menu' ? 1 : 0) &&
19679
- ((_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));
19743
+ ((_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));
19680
19744
  return (React.createElement(React.Fragment, null,
19681
19745
  isNineProduct && (React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, isNineProduct: isNineProduct })),
19682
- ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
19683
- React.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` } },
19746
+ ((_l = rec === null || rec === void 0 ? void 0 : rec.video) === null || _l === void 0 ? void 0 : _l.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
19747
+ React.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` } },
19684
19748
  React.createElement(Nudge, { nudge: nudge }),
19685
19749
  ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)) && !isNineProduct ? (React.createElement("div", { className: 'clc-sxp-bottom-card' },
19686
19750
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, includesCtaType: [] }))) : null,
19687
19751
  React.createElement("div", { style: { display: 'flex', flexDirection: 'column' } },
19688
- React.createElement(ExpandableText$1, { 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 }),
19752
+ React.createElement(ExpandableText$1, { 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 }),
19689
19753
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex }),
19690
- React.createElement(Hashtag$1, { 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) }))),
19754
+ React.createElement(Hashtag$1, { 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) }))),
19691
19755
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
19692
19756
  }
19693
19757
  return null;
@@ -19729,7 +19793,7 @@ Made in Italy` })));
19729
19793
  return null;
19730
19794
  }, [globalConfig, waterFallData, bottomHeight]);
19731
19795
  const handleViewImageStartEnd = (item) => {
19732
- var _a, _b, _c, _d, _e, _f;
19796
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
19733
19797
  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)) {
19734
19798
  const endTime = Date.now();
19735
19799
  const duration = viewImageStartTime.current === 0 ? 0 : (endTime - viewImageStartTime.current) / 1000;
@@ -19738,10 +19802,11 @@ Made in Italy` })));
19738
19802
  eventSubject: 'viewImageCarouselEnd',
19739
19803
  eventDescription: 'User end view the image carousel',
19740
19804
  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 : '',
19741
- contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
19805
+ 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 : '',
19806
+ contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
19742
19807
  imageEndTime: `${endTime}`,
19743
19808
  playDuration: `${duration}`,
19744
- contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
19809
+ contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
19745
19810
  position: activeIndex + '',
19746
19811
  contentFormat: 'image',
19747
19812
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo
@@ -19750,7 +19815,7 @@ Made in Italy` })));
19750
19815
  }
19751
19816
  };
19752
19817
  const handleSlideSkip = (item, position) => {
19753
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
19818
+ 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;
19754
19819
  if (isPreview || waterFallData)
19755
19820
  return;
19756
19821
  const t = new Date() - curTime.current;
@@ -19776,7 +19841,8 @@ Made in Italy` })));
19776
19841
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
19777
19842
  position: position + '',
19778
19843
  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 : '',
19779
- 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 : '',
19844
+ 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 : '',
19845
+ 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 : '',
19780
19846
  contentFormat
19781
19847
  }
19782
19848
  });
@@ -19786,7 +19852,7 @@ Made in Italy` })));
19786
19852
  }
19787
19853
  };
19788
19854
  const handleScrollEvent = (swiper) => {
19789
- 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;
19855
+ 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;
19790
19856
  const item = data[swiper.previousIndex];
19791
19857
  const activeItem = data[swiper.activeIndex];
19792
19858
  if (!item)
@@ -19819,11 +19885,12 @@ Made in Italy` })));
19819
19885
  eventSubject: 'scrollDown',
19820
19886
  eventDescription: 'User scroll down',
19821
19887
  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 : '',
19822
- 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 : '',
19888
+ 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 : '',
19889
+ 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 : '',
19823
19890
  requestId: null,
19824
- 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 : '',
19891
+ 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 : '',
19825
19892
  contentFormat,
19826
- position: ((_1 = swiper.previousIndex) !== null && _1 !== void 0 ? _1 : 0) + ''
19893
+ position: ((_4 = swiper.previousIndex) !== null && _4 !== void 0 ? _4 : 0) + ''
19827
19894
  }
19828
19895
  });
19829
19896
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -19836,12 +19903,13 @@ Made in Italy` })));
19836
19903
  eventInfo: {
19837
19904
  eventSubject: 'scrollUp',
19838
19905
  eventDescription: 'User scroll up',
19839
- 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 : '',
19840
- productId: (_5 = (_4 = item.product) === null || _4 === void 0 ? void 0 : _4.itemId) !== null && _5 !== void 0 ? _5 : '',
19906
+ 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 : '',
19907
+ 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 : '',
19908
+ productId: (_11 = (_10 = item.product) === null || _10 === void 0 ? void 0 : _10.itemId) !== null && _11 !== void 0 ? _11 : '',
19841
19909
  requestId: null,
19842
- 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 : '',
19910
+ 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 : '',
19843
19911
  contentFormat,
19844
- position: ((_10 = swiper.previousIndex) !== null && _10 !== void 0 ? _10 : 0) + ''
19912
+ position: ((_16 = swiper.previousIndex) !== null && _16 !== void 0 ? _16 : 0) + ''
19845
19913
  }
19846
19914
  });
19847
19915
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -19941,7 +20009,7 @@ Made in Italy` })));
19941
20009
  };
19942
20010
  }, [globalConfig, bffEventReport, data, activeIndex]);
19943
20011
  const handleViewImageStartEvent = (activeIndex, imgInfo, enableCapi) => {
19944
- var _a, _b, _c, _d, _e, _f, _g, _h;
20012
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
19945
20013
  const item = data[activeIndex];
19946
20014
  // 如果是图片集则上报事件
19947
20015
  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)) {
@@ -19952,9 +20020,10 @@ Made in Italy` })));
19952
20020
  eventSubject: 'viewImageCarouselStart',
19953
20021
  eventDescription: 'User start view the image carousel',
19954
20022
  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 : '',
19955
- contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
20023
+ 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 : '',
20024
+ contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
19956
20025
  imageStartTime: `${startTime}`,
19957
- contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
20026
+ contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
19958
20027
  position: activeIndex + '',
19959
20028
  contentFormat: 'image',
19960
20029
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo,
@@ -19964,13 +20033,13 @@ Made in Italy` })));
19964
20033
  if (enableCapi) {
19965
20034
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19966
20035
  eventName: 'ViewContent',
19967
- product: (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.bindProducts,
20036
+ product: (_k = item === null || item === void 0 ? void 0 : item.video) === null || _k === void 0 ? void 0 : _k.bindProducts,
19968
20037
  rec: item,
19969
20038
  position: activeIndex
19970
20039
  });
19971
20040
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19972
20041
  eventName: 'PageView',
19973
- product: (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.bindProducts,
20042
+ product: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.bindProducts,
19974
20043
  rec: item,
19975
20044
  position: activeIndex
19976
20045
  });
@@ -20068,15 +20137,20 @@ Made in Italy` })));
20068
20137
  swiperRef.current.swiper.allowTouchMove = true;
20069
20138
  }, 500);
20070
20139
  }, onActiveIndexChange: (swiper) => {
20140
+ var _a, _b;
20071
20141
  setActiveIndex(swiper.activeIndex);
20072
20142
  if (openHashtag)
20073
20143
  return;
20074
20144
  // 处理上滑下滑事件
20075
20145
  handleScrollEvent(swiper);
20076
- if (waterFallData || isEditor || isDiyH5)
20146
+ if (waterFallData || isEditor)
20077
20147
  return;
20078
20148
  if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
20079
20149
  if (!isLoadMore) {
20150
+ if (isDiyH5) {
20151
+ (_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
20152
+ (_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
20153
+ }
20080
20154
  setIsLoadMore(true);
20081
20155
  loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(pageNum).then((res) => {
20082
20156
  var _a;
@@ -20149,7 +20223,7 @@ Made in Italy` })));
20149
20223
  }, []);
20150
20224
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
20151
20225
  const handlePlaying = React.useCallback(() => {
20152
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
20226
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
20153
20227
  setIsPauseVideo(false);
20154
20228
  const item = data[index];
20155
20229
  if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration)) {
@@ -20162,14 +20236,15 @@ Made in Italy` })));
20162
20236
  eventSubject: 'playVideo',
20163
20237
  eventDescription: 'User played the video',
20164
20238
  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 : '',
20165
- 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 : '',
20239
+ 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 : '',
20240
+ 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 : '',
20166
20241
  playType,
20167
20242
  startTime: videoCurrentTime,
20168
20243
  videoDuration,
20169
- 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 : []),
20244
+ 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 : []),
20170
20245
  position: index + '',
20171
20246
  contentFormat: 'video',
20172
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
20247
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
20173
20248
  }
20174
20249
  });
20175
20250
  setIsFirstPlay(false);
@@ -20208,7 +20283,7 @@ Made in Italy` })));
20208
20283
  }
20209
20284
  }, [isLoadFinish]);
20210
20285
  const onPause = React.useCallback(() => {
20211
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
20286
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
20212
20287
  const item = data[index];
20213
20288
  const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
20214
20289
  const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
@@ -20219,14 +20294,15 @@ Made in Italy` })));
20219
20294
  eventSubject: 'playOverVideo',
20220
20295
  eventDescription: 'User finished playing the video',
20221
20296
  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 : '',
20222
- 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 : '',
20297
+ 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 : '',
20298
+ 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 : '',
20223
20299
  endTime: videoCurrentTime,
20224
20300
  videoDuration,
20225
20301
  playDuration,
20226
- 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 : []),
20302
+ 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 : []),
20227
20303
  position: index + '',
20228
20304
  contentFormat: 'video',
20229
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
20305
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
20230
20306
  }
20231
20307
  });
20232
20308
  }