pb-sxp-ui 1.20.10 → 1.20.11

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/index.js CHANGED
@@ -645,6 +645,7 @@ const DEFAULT_TAG = 'FOR U';
645
645
  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 }) => {
646
646
  var _a, _b, _c, _d, _e;
647
647
  const [rtcList, setRtcList] = useState([]);
648
+ const [firstRtcList, setFirstRtcList] = useState([]);
648
649
  const [tagList, setTagList] = useState([]);
649
650
  const [loading, setLoading] = useState(true);
650
651
  const [curReqInfo, setCurReqInfo] = useState({ rtc: '', requestId: '' });
@@ -676,6 +677,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
676
677
  const [chatlabsId, setChatlabsId] = useState();
677
678
  const finalPageData = useMemo(() => pageData !== null && pageData !== void 0 ? pageData : data, [pageData, data]);
678
679
  const pixelPvStatusRef = useRef(false);
680
+ const isDiyPage = useMemo(() => {
681
+ var _a, _b, _c;
682
+ 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);
683
+ }, [isDiyH5, finalPageData]);
679
684
  useEffect(() => {
680
685
  var _a, _b;
681
686
  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);
@@ -781,7 +786,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
781
786
  };
782
787
  // bff API 请求方法
783
788
  const bffFetch = useCallback((path, options, isBota = true) => {
784
- var _a;
789
+ var _a, _b;
785
790
  if (!bffDataSource)
786
791
  return;
787
792
  const url = bffDataSource.url;
@@ -794,8 +799,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
794
799
  val.split('=')[0];
795
800
  val.split('=')[1];
796
801
  });
802
+ options.body = Object.assign(Object.assign({}, options.body), { productUserId: fakeUserId });
797
803
  return window
798
- .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
804
+ .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
799
805
  ? JSON.stringify({
800
806
  body: btoa(encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))))
801
807
  })
@@ -1080,8 +1086,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1080
1086
  }, [bffDataSource]);
1081
1087
  // 获取推荐视频数据
1082
1088
  const getRecommendVideos = useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
1083
- var _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
1084
- 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' }));
1089
+ var _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
1090
+ 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' }));
1085
1091
  if (channel) {
1086
1092
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(channel) });
1087
1093
  }
@@ -1094,9 +1100,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1094
1100
  if (val)
1095
1101
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
1096
1102
  }
1103
+ 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);
1097
1104
  if (isEditor) {
1098
1105
  let pageNum = 1;
1099
- 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] }));
1106
+ 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 }));
1100
1107
  if (!(query === null || query === void 0 ? void 0 : query.channel) || isInit.current) {
1101
1108
  return undefined;
1102
1109
  }
@@ -1104,19 +1111,24 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1104
1111
  let list = [];
1105
1112
  let result = null;
1106
1113
  const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
1107
- var _v, _w, _x, _y, _z, _0;
1114
+ var _y, _z, _0, _1, _2, _3;
1108
1115
  query.pageNum = pageNum;
1109
- result = yield (bffFetchAdmin === null || bffFetchAdmin === void 0 ? void 0 : bffFetchAdmin('recommend/direct_page', { method: 'POST', body: query }));
1116
+ result = isDiyH5
1117
+ ? yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v3/recommend/direct/page/view', { method: 'POST', body: query }))
1118
+ : yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('recommend/direct_page', { method: 'POST', body: query }));
1110
1119
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
1111
1120
  return undefined;
1112
1121
  }
1113
1122
  setLoading(false);
1114
- 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 : []);
1123
+ 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 : []);
1115
1124
  if ((rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) === 0) {
1116
1125
  setRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
1117
1126
  setCacheRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
1127
+ if (isDiyPage) {
1128
+ setFirstRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
1129
+ }
1118
1130
  }
1119
- 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));
1131
+ 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));
1120
1132
  if (isNotNullList) {
1121
1133
  pageNum = pageNum + 1;
1122
1134
  yield recurveRecList(query);
@@ -1124,42 +1136,61 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1124
1136
  });
1125
1137
  yield recurveRecList(query);
1126
1138
  if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
1127
- 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 });
1139
+ 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 });
1128
1140
  return Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list });
1129
1141
  }
1130
1142
  if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
1131
- 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 });
1143
+ 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 }));
1132
1144
  }
1133
- const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/list', {
1134
- method: 'POST',
1135
- body: query
1136
- }));
1145
+ const result = isDiy
1146
+ ? yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v3/recommend/direct/page/view', { method: 'POST', body: query }))
1147
+ : yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/list', {
1148
+ method: 'POST',
1149
+ body: query
1150
+ }));
1137
1151
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
1138
1152
  return undefined;
1139
1153
  }
1140
1154
  if (!(query === null || query === void 0 ? void 0 : query.hashTag))
1141
1155
  setCurReqInfo({ rtc: result.data.rtc, requestId: result.data.requestId });
1142
1156
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor) {
1143
- 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));
1157
+ 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));
1144
1158
  if (!isNotNullList) {
1145
1159
  setIsNoMoreData(true);
1146
1160
  }
1147
1161
  }
1148
1162
  let list = [];
1149
- 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 : []);
1163
+ 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 : []);
1150
1164
  return Object.assign(Object.assign({}, result.data), { recList: list });
1151
- }), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList, channel, chatlabsId, bffFetchAdmin]);
1165
+ }), [
1166
+ bffFetch,
1167
+ utmVal,
1168
+ maxSize,
1169
+ defaultSize,
1170
+ channelQueryList,
1171
+ channel,
1172
+ chatlabsId,
1173
+ bffFetchAdmin,
1174
+ isDiyPage,
1175
+ finalPageData,
1176
+ isDiyH5
1177
+ ]);
1152
1178
  const loadVideos = useCallback((pageNum) => __awaiter(void 0, void 0, void 0, function* () {
1153
- var _1, _2, _3, _4;
1179
+ var _4, _5, _6, _7;
1154
1180
  if (rtcList.length <= 0) {
1155
1181
  return;
1156
1182
  }
1183
+ if (isDiyPage && (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) > 0) {
1184
+ setRtcList(rtcList.concat(firstRtcList));
1185
+ setCacheRtcList(cacheRtcList.concat(firstRtcList));
1186
+ return;
1187
+ }
1157
1188
  const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
1158
- 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 })));
1189
+ 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 })));
1159
1190
  setRtcList(rtcList.concat(getFilterRecList(data)));
1160
1191
  setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
1161
1192
  return data;
1162
- }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
1193
+ }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList, isDiyPage, firstRtcList]);
1163
1194
  const refreshFeSession = useCallback((enableReSid, event) => {
1164
1195
  var _a, _b, _c, _d, _e;
1165
1196
  let expire = false;
@@ -1190,8 +1221,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1190
1221
  // 用户信息都是公共的
1191
1222
  if (!userInfo) {
1192
1223
  userInfo = {
1193
- // productUserId: fakeUserId, // 后端逻辑会从请求头获取,所以不需要传
1194
- // tpChannelId: 'H5' // 后端处理
1224
+ productUserId: fakeUserId // 后端逻辑会从请求头获取,所以不需要传
1225
+ // tpChannelId: 'H5' // 后端处理
1195
1226
  };
1196
1227
  }
1197
1228
  const sessionID = storeAndLoadFeSessionId();
@@ -1225,7 +1256,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1225
1256
  layoutVariantId,
1226
1257
  globalConfig,
1227
1258
  playbookType,
1228
- bffDataSource
1259
+ bffDataSource,
1260
+ fakeUserId
1229
1261
  ]);
1230
1262
  const getEventParamsByJson = useCallback((_a) => {
1231
1263
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
@@ -1411,38 +1443,40 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1411
1443
  }
1412
1444
  }, [bffFetch, enableReportEvent, enabledMetaConversionApi, globalConfig, bffDataSource, getEventParamsByJson]);
1413
1445
  const bffMutateLike = useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
1446
+ body = Object.assign(Object.assign({}, body), { productUserId: fakeUserId });
1414
1447
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/like', { method: 'POST', body }));
1415
1448
  return res === null || res === void 0 ? void 0 : res.success;
1416
- }), [bffFetch]);
1449
+ }), [bffFetch, fakeUserId]);
1417
1450
  const bffMutateUnlike = useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
1451
+ body = Object.assign(Object.assign({}, body), { productUserId: fakeUserId });
1418
1452
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/unlike', { method: 'POST', body }));
1419
1453
  return res === null || res === void 0 ? void 0 : res.success;
1420
- }), [bffFetch]);
1454
+ }), [bffFetch, fakeUserId]);
1421
1455
  const bffSubmitForm = useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
1422
1456
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/customform', { method: 'POST', body }));
1423
1457
  return res === null || res === void 0 ? void 0 : res.success;
1424
1458
  }), [bffFetch]);
1425
1459
  // 获取 Tag
1426
1460
  const bffGetTagList = useCallback((data) => __awaiter(void 0, void 0, void 0, function* () {
1427
- var _5, _6, _7, _8, _9, _10, _11, _12;
1428
- 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);
1461
+ var _8, _9, _10, _11, _12, _13, _14, _15;
1462
+ 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);
1429
1463
  if (!utmVal || !isShowTag)
1430
1464
  return;
1431
1465
  try {
1432
- const val = (_10 = (_9 = (_8 = splitUrlParams(utmVal)) === null || _8 === void 0 ? void 0 : _8.filter((val) => {
1466
+ const val = (_13 = (_12 = (_11 = splitUrlParams(utmVal)) === null || _11 === void 0 ? void 0 : _11.filter((val) => {
1433
1467
  var _a, _b;
1434
1468
  const key = val.split('=')[0];
1435
1469
  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);
1436
- })) === null || _9 === void 0 ? void 0 : _9.join('&')) !== null && _10 !== void 0 ? _10 : '';
1470
+ })) === null || _12 === void 0 ? void 0 : _12.join('&')) !== null && _13 !== void 0 ? _13 : '';
1437
1471
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
1438
- 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 : []);
1472
+ 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 : []);
1439
1473
  }
1440
1474
  catch (e) {
1441
1475
  console.log('e', e);
1442
1476
  }
1443
1477
  }), [bffFetch, utmVal]);
1444
1478
  const ctaEvent = useCallback((eventInfo, rec, product, position, ctaActionType, targetUrl, contentType) => {
1445
- 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;
1479
+ 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;
1446
1480
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
1447
1481
  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);
1448
1482
  let fromKName = '';
@@ -1460,7 +1494,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1460
1494
  }
1461
1495
  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;
1462
1496
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1463
- 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 })
1497
+ 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 })
1464
1498
  });
1465
1499
  }, [bffEventReport, isFromHashtag]);
1466
1500
  const h5EnterLink = useCallback(() => {
@@ -1484,10 +1518,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1484
1518
  });
1485
1519
  }, [bffEventReport]);
1486
1520
  const getAccount = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
1487
- var _13, _14;
1521
+ var _16, _17;
1488
1522
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/account', { method: 'GET' }));
1489
- setChatlabsId((_13 = res === null || res === void 0 ? void 0 : res.data) === null || _13 === void 0 ? void 0 : _13.chatLabsId);
1490
- return ((_14 = res === null || res === void 0 ? void 0 : res.data) === null || _14 === void 0 ? void 0 : _14.consentResult) === 'true';
1523
+ setChatlabsId((_16 = res === null || res === void 0 ? void 0 : res.data) === null || _16 === void 0 ? void 0 : _16.chatLabsId);
1524
+ return ((_17 = res === null || res === void 0 ? void 0 : res.data) === null || _17 === void 0 ? void 0 : _17.consentResult) === 'true';
1491
1525
  }), [bffFetch]);
1492
1526
  const accountSonsent = useCallback((consentResult) => __awaiter(void 0, void 0, void 0, function* () {
1493
1527
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/account/consent', {
@@ -1551,6 +1585,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1551
1585
  }
1552
1586
  setRtcList(list);
1553
1587
  setCacheRtcList(list);
1588
+ if (isDiyPage) {
1589
+ setFirstRtcList(list);
1590
+ }
1554
1591
  bffGetTagList(curData !== null && curData !== void 0 ? curData : finalPageData);
1555
1592
  if (channel) {
1556
1593
  const item = list === null || list === void 0 ? void 0 : list[0];
@@ -1570,7 +1607,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1570
1607
  });
1571
1608
  setLoading(false);
1572
1609
  });
1573
- }, [isShowConsent, channel]);
1610
+ }, [isShowConsent, channel, isDiyPage]);
1574
1611
  // cms预览
1575
1612
  useEffect(() => {
1576
1613
  if (!isPreview)
@@ -1586,12 +1623,15 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1586
1623
  }
1587
1624
  setRtcList(list);
1588
1625
  setCacheRtcList(list);
1626
+ if (isDiyPage) {
1627
+ setFirstRtcList(list);
1628
+ }
1589
1629
  }
1590
1630
  })
1591
1631
  .finally(() => {
1592
1632
  setLoading(false);
1593
1633
  });
1594
- }, [getRecommendVideos, bffGetTagList, channel]);
1634
+ }, [getRecommendVideos, bffGetTagList, channel, isDiyPage]);
1595
1635
  const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif', appDomain);
1596
1636
  return (React.createElement(SxpDataSourceContext.Provider, { value: {
1597
1637
  rtcList,
@@ -1649,7 +1689,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1649
1689
  refreshFeSession,
1650
1690
  getAccount,
1651
1691
  accountSonsent,
1652
- isDiyH5,
1692
+ isDiyH5: isDiyPage,
1693
+ firstRtcList,
1653
1694
  pixelPvStatusRef
1654
1695
  } }, 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({
1655
1696
  rtcList,
@@ -2111,14 +2152,14 @@ var settingRender$f = [
2111
2152
  * @Author: binruan@chatlabs.com
2112
2153
  * @Date: 2024-03-12 10:59:06
2113
2154
  * @LastEditors: binruan@chatlabs.com
2114
- * @LastEditTime: 2024-11-28 11:17:16
2155
+ * @LastEditTime: 2025-05-09 15:30:59
2115
2156
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
2116
2157
  *
2117
2158
  */
2118
2159
  function useEventReport() {
2119
2160
  const { bffEventReport, popupDetailData, isFromHashtag, eventTimeList, setEventTimeList } = useSxpDataSource();
2120
2161
  const jumpToWeb = useCallback((e, data, product, cta, position, traceInfo) => {
2121
- 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;
2162
+ 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;
2122
2163
  const i = eventTimeList === null || eventTimeList === void 0 ? void 0 : eventTimeList.findIndex((item) => item.target === (e === null || e === void 0 ? void 0 : e.target));
2123
2164
  if (i !== -1) {
2124
2165
  return;
@@ -2151,11 +2192,11 @@ function useEventReport() {
2151
2192
  contentFormat = 'image';
2152
2193
  }
2153
2194
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
2154
- 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 }))
2195
+ 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 }))
2155
2196
  });
2156
2197
  }, [bffEventReport, popupDetailData, isFromHashtag, eventTimeList]);
2157
2198
  const productView = useCallback((data, product, cta, viewTime, position) => {
2158
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
2199
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
2159
2200
  let fromKName = '';
2160
2201
  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))) {
2161
2202
  fromKName = 'pdpPage';
@@ -2174,8 +2215,9 @@ function useEventReport() {
2174
2215
  contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
2175
2216
  position: position + '',
2176
2217
  contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
2218
+ 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 : '',
2177
2219
  ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
2178
- 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 : '',
2220
+ 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 : '',
2179
2221
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
2180
2222
  eventSubject: 'productView',
2181
2223
  eventDescription: 'User browsed the product'
@@ -16219,7 +16261,7 @@ function WaterfallList(_a) {
16219
16261
  * @Author: binruan@chatlabs.com
16220
16262
  * @Date: 2024-01-10 10:58:24
16221
16263
  * @LastEditors: binruan@chatlabs.com
16222
- * @LastEditTime: 2025-02-28 10:00:31
16264
+ * @LastEditTime: 2025-05-09 15:30:41
16223
16265
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
16224
16266
  *
16225
16267
  */
@@ -16257,7 +16299,7 @@ const WaterFall = (props) => {
16257
16299
  }
16258
16300
  }, [waterFallData]);
16259
16301
  const reportTagsView = useCallback(() => {
16260
- var _a, _b, _c, _d, _e, _f;
16302
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
16261
16303
  const rec = recData === null || recData === void 0 ? void 0 : recData.rec;
16262
16304
  if (!rec)
16263
16305
  return;
@@ -16277,9 +16319,10 @@ const WaterFall = (props) => {
16277
16319
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
16278
16320
  eventInfo: {
16279
16321
  contentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
16322
+ 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 : '',
16280
16323
  position: cacheActiveIndex + '',
16281
- contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
16282
- traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
16324
+ contentTags: JSON.stringify((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.tags),
16325
+ traceInfo: (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.traceInfo,
16283
16326
  hashTags: JSON.stringify([recData === null || recData === void 0 ? void 0 : recData.hashTag]),
16284
16327
  fromKName,
16285
16328
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
@@ -18386,21 +18429,22 @@ const LikeButton = (_a) => {
18386
18429
  const likeIcon = useIconLink(defaultLikeIconPath$2);
18387
18430
  const unlikeIcon = useIconLink(defaultUnLikeIconPath$2);
18388
18431
  const handleClick = debounce(() => __awaiter(void 0, void 0, void 0, function* () {
18389
- 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;
18432
+ 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;
18390
18433
  if (state) {
18391
18434
  // 先设置状态
18392
18435
  setState(false);
18393
- 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;
18436
+ 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;
18394
18437
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
18395
18438
  eventInfo: {
18396
18439
  eventSubject: 'favoriteContentCanceled',
18397
18440
  eventDescription: 'This content was unfavorite by the user',
18398
18441
  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 : '',
18399
- 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 : '',
18400
- 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 : []),
18442
+ 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 : '',
18443
+ 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 : '',
18444
+ 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 : []),
18401
18445
  position: position + '',
18402
- contentFormat: ((_m = recData === null || recData === void 0 ? void 0 : recData.video) === null || _m === void 0 ? void 0 : _m.url) ? 'video' : 'image',
18403
- traceInfo: (_o = recData === null || recData === void 0 ? void 0 : recData.video) === null || _o === void 0 ? void 0 : _o.traceInfo
18446
+ contentFormat: ((_q = recData === null || recData === void 0 ? void 0 : recData.video) === null || _q === void 0 ? void 0 : _q.url) ? 'video' : 'image',
18447
+ traceInfo: (_r = recData === null || recData === void 0 ? void 0 : recData.video) === null || _r === void 0 ? void 0 : _r.traceInfo
18404
18448
  }
18405
18449
  });
18406
18450
  // 如果接口调用失败,则回滚状态
@@ -18408,48 +18452,49 @@ const LikeButton = (_a) => {
18408
18452
  setState(true);
18409
18453
  }
18410
18454
  else {
18411
- const nRtcList = (_p = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18455
+ const nRtcList = (_s = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18412
18456
  if (index === position) {
18413
18457
  item.isCollected = false;
18414
18458
  }
18415
18459
  return item;
18416
- })) !== null && _p !== void 0 ? _p : [];
18460
+ })) !== null && _s !== void 0 ? _s : [];
18417
18461
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
18418
18462
  }
18419
18463
  }
18420
18464
  else {
18421
18465
  setState(true);
18422
- const result = (_q = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData) })))) !== null && _q !== void 0 ? _q : false;
18466
+ 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;
18423
18467
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
18424
18468
  eventInfo: {
18425
18469
  eventSubject: 'favoriteContent',
18426
18470
  eventDescription: 'This content was favorite by the user',
18427
- 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 : '',
18428
- 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 : '',
18429
- 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 : []),
18471
+ 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 : '',
18472
+ 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 : '',
18473
+ 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 : '',
18474
+ 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 : []),
18430
18475
  position: position + '',
18431
- contentFormat: ((_x = recData === null || recData === void 0 ? void 0 : recData.video) === null || _x === void 0 ? void 0 : _x.url) ? 'video' : 'image',
18432
- traceInfo: (_y = recData === null || recData === void 0 ? void 0 : recData.video) === null || _y === void 0 ? void 0 : _y.traceInfo
18476
+ contentFormat: ((_5 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _5 === void 0 ? void 0 : _5.url) ? 'video' : 'image',
18477
+ traceInfo: (_6 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _6 === void 0 ? void 0 : _6.traceInfo
18433
18478
  }
18434
18479
  });
18435
18480
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
18436
18481
  eventName: 'Engagement',
18437
- product: (_z = recData === null || recData === void 0 ? void 0 : recData.video) === null || _z === void 0 ? void 0 : _z.bindProducts,
18482
+ product: (_7 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _7 === void 0 ? void 0 : _7.bindProducts,
18438
18483
  rec: recData,
18439
18484
  position,
18440
- 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 : '',
18485
+ 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 : '',
18441
18486
  engagement_type: 'like'
18442
18487
  });
18443
18488
  if (!result) {
18444
18489
  setState(false);
18445
18490
  }
18446
18491
  else {
18447
- const nRtcList = (_2 = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18492
+ const nRtcList = (_10 = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18448
18493
  if (index === position) {
18449
18494
  item.isCollected = true;
18450
18495
  }
18451
18496
  return item;
18452
- })) !== null && _2 !== void 0 ? _2 : [];
18497
+ })) !== null && _10 !== void 0 ? _10 : [];
18453
18498
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
18454
18499
  }
18455
18500
  }
@@ -18486,7 +18531,7 @@ const mountVideoPlayerAtNode = (() => {
18486
18531
  const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex, videoPostConfig, videoPlayIcon, loopPlay, swiperRef, visibleHeight }, ref) => {
18487
18532
  var _a, _b;
18488
18533
  const [isPauseVideo, setIsPauseVideo] = useState(false);
18489
- const { bffEventReport, sxpParameter, waterFallData, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
18534
+ const { bffEventReport, sxpParameter, firstRtcList, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
18490
18535
  const videoStartTime = useRef(0);
18491
18536
  const [isLoadFinish, setIsLoadFinish] = useState(false);
18492
18537
  const { isActive } = useSwiperSlide();
@@ -18503,7 +18548,7 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18503
18548
  const loopPlayRef = useRef(loopPlay);
18504
18549
  const scene = rec.video.scene;
18505
18550
  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);
18506
- 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;
18551
+ const videoCover = (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.cover;
18507
18552
  const videoPoster = videoCover || (sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image);
18508
18553
  useImperativeHandle(ref, () => {
18509
18554
  return {
@@ -18552,6 +18597,23 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18552
18597
  return;
18553
18598
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
18554
18599
  }, [videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18600
+ const handleEnd = () => {
18601
+ var _a, _b, _c, _d, _e, _f;
18602
+ if (!videoRef.current)
18603
+ return;
18604
+ if (isDiyH5) {
18605
+ (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.pause();
18606
+ if (!loopPlayRef.current)
18607
+ return;
18608
+ if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
18609
+ 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;
18610
+ (_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);
18611
+ }
18612
+ }
18613
+ else {
18614
+ (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.play();
18615
+ }
18616
+ };
18555
18617
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
18556
18618
  const handlePlaying = useCallback(() => {
18557
18619
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
@@ -18560,7 +18622,7 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18560
18622
  setIsLoadFinish(true);
18561
18623
  }, []);
18562
18624
  const handleStartPlay = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
18563
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
18625
+ var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
18564
18626
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
18565
18627
  return;
18566
18628
  setIsPauseVideo(false);
@@ -18571,16 +18633,11 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18571
18633
  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);
18572
18634
  const playType = (isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) ? '0' : '1';
18573
18635
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
18574
- 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) + '' }))
18636
+ 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) + '' }))
18575
18637
  });
18576
18638
  isFirstPlayRef.current = false;
18577
18639
  }
18578
18640
  }), [bffEventReport, data, index, isFirstPlayRef, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18579
- const setCurrentTimeByStartTime = useCallback(() => {
18580
- if (isDiyH5) {
18581
- videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
18582
- }
18583
- }, []);
18584
18641
  const handLoadeddata = useCallback(() => {
18585
18642
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || firstFrameSrc || !blur)
18586
18643
  return;
@@ -18605,13 +18662,12 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18605
18662
  const handleLoadedmetadata = useCallback(() => {
18606
18663
  if (!videoRef.current)
18607
18664
  return;
18608
- setCurrentTimeByStartTime();
18609
18665
  loadedTimeRef.current = new Date();
18610
18666
  handleStartPlay();
18611
18667
  handLoadeddata();
18612
18668
  }, [videoRef.current, handLoadeddata, handleStartPlay]);
18613
18669
  const handleClickVideo = useCallback((type) => () => {
18614
- var _a, _b, _c, _d, _e, _f;
18670
+ var _a, _b, _c, _d, _e;
18615
18671
  if (!videoRef.current)
18616
18672
  return;
18617
18673
  if (!isLoadFinish)
@@ -18632,20 +18688,17 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18632
18688
  break;
18633
18689
  default:
18634
18690
  if (isPause) {
18635
- 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)) {
18636
- videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
18637
- }
18638
- (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.play();
18691
+ (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.play();
18639
18692
  }
18640
18693
  else {
18641
- (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.pause();
18694
+ (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.pause();
18642
18695
  }
18643
18696
  setIsPauseVideo(!isPause);
18644
18697
  break;
18645
18698
  }
18646
18699
  }, [isLoadFinish, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18647
18700
  const handlePause = useCallback(() => {
18648
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
18701
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
18649
18702
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
18650
18703
  return;
18651
18704
  if (activeIndex !== index)
@@ -18661,14 +18714,15 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18661
18714
  eventSubject: 'playOverVideo',
18662
18715
  eventDescription: 'User finished playing the video',
18663
18716
  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 : '',
18664
- 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 : '',
18717
+ 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 : '',
18718
+ 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 : '',
18665
18719
  endTime: videoCurrentTime,
18666
18720
  videoDuration,
18667
18721
  playDuration,
18668
- 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 : []),
18722
+ 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 : []),
18669
18723
  position: index + '',
18670
18724
  contentFormat: 'video',
18671
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
18725
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
18672
18726
  }
18673
18727
  });
18674
18728
  }
@@ -18676,27 +18730,8 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18676
18730
  const handleWaiting = useCallback(() => {
18677
18731
  setWaiting(true);
18678
18732
  }, []);
18679
- const handleTimeUpload = () => {
18680
- if (!videoRef.current || !isDiyH5)
18681
- return;
18682
- setTimeout(() => {
18683
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
18684
- 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)) {
18685
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
18686
- if (!loopPlayRef.current)
18687
- return;
18688
- if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) {
18689
- (_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);
18690
- }
18691
- else {
18692
- 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;
18693
- (_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);
18694
- }
18695
- }
18696
- });
18697
- };
18698
18733
  useEffect(() => {
18699
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18734
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18700
18735
  if (!isActive)
18701
18736
  return;
18702
18737
  const videoSrc = videoUrl;
@@ -18717,7 +18752,6 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18717
18752
  hls === null || hls === void 0 ? void 0 : hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
18718
18753
  hls === null || hls === void 0 ? void 0 : hls.on(Hls.Events.MANIFEST_PARSED, function () {
18719
18754
  var _a;
18720
- setCurrentTimeByStartTime();
18721
18755
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
18722
18756
  });
18723
18757
  }
@@ -18731,12 +18765,11 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18731
18765
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.addEventListener('play', handleStartPlay);
18732
18766
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.addEventListener('playing', handlePlaying);
18733
18767
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.addEventListener('pause', handlePause);
18734
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handlePlay);
18768
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handleEnd);
18735
18769
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
18736
18770
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
18737
- (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.addEventListener('timeupdate', handleTimeUpload);
18738
18771
  return () => {
18739
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18772
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18740
18773
  const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
18741
18774
  if (!isPause)
18742
18775
  handlePause();
@@ -18748,10 +18781,9 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18748
18781
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('play', handleStartPlay);
18749
18782
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('playing', handlePlaying);
18750
18783
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('pause', handlePause);
18751
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handlePlay);
18784
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handleEnd);
18752
18785
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('canplay', handlePlay);
18753
18786
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.removeEventListener('waiting', handleWaiting);
18754
- (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.removeEventListener('timeupdate', handleTimeUpload);
18755
18787
  };
18756
18788
  }, [isActive]);
18757
18789
  useEffect(() => {
@@ -18966,19 +18998,45 @@ const Picture = (props) => {
18966
18998
  }, onLoad: onShowFirstImage }))));
18967
18999
  };
18968
19000
 
18969
- const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig }) => {
19001
+ const PictureGroup$4 = forwardRef(({ imgUrls, data, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig, swiperRef }, ref) => {
18970
19002
  var _a, _b;
18971
19003
  const { isActive } = useSwiperSlide();
18972
- const { sxpParameter, openHashtag } = useSxpDataSource();
19004
+ const { firstRtcList, openHashtag, isDiyH5 } = useSxpDataSource();
18973
19005
  const [isLoad, setIsLoad] = useState(false);
18974
19006
  const [imgInfo, setImgInfo] = useState();
18975
19007
  const [swiperActiveIndex, setSwiperActiveIndex] = useState(0);
18976
- const swiperRef = useRef();
19008
+ const imgsSwiperRef = useRef();
18977
19009
  const isFirstPlayRef = useRef(true);
19010
+ const loopPlayRef = useRef(true);
18978
19011
  const initTime = new Date();
19012
+ useImperativeHandle(ref, () => {
19013
+ return {
19014
+ setLoopPlay(v) {
19015
+ loopPlayRef.current = v;
19016
+ }
19017
+ };
19018
+ });
19019
+ useEffect(() => {
19020
+ let timerId;
19021
+ if (isLoad && isActive && isDiyH5) {
19022
+ timerId = setTimeout(() => {
19023
+ var _a, _b, _c, _d;
19024
+ if (!loopPlayRef.current)
19025
+ return;
19026
+ if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
19027
+ 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;
19028
+ (_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);
19029
+ }
19030
+ }, 3000);
19031
+ }
19032
+ return () => {
19033
+ if (timerId)
19034
+ clearTimeout(timerId);
19035
+ };
19036
+ }, [isLoad, isActive, isDiyH5, index, swiperRef, firstRtcList]);
18979
19037
  useEffect(() => {
18980
19038
  if (isLoad && isActive) {
18981
- (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.start();
19039
+ (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.start();
18982
19040
  if (openHashtag) {
18983
19041
  onViewImageEndEvent(rec);
18984
19042
  }
@@ -18988,7 +19046,7 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
18988
19046
  }
18989
19047
  }
18990
19048
  else {
18991
- (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.stop();
19049
+ (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.stop();
18992
19050
  }
18993
19051
  }, [rec, isActive, onViewImageEndEvent, openHashtag, index, onViewImageStartEvent, isLoad, imgInfo]);
18994
19052
  const showFirstImageFn = useCallback((e) => __awaiter(void 0, void 0, void 0, function* () {
@@ -19015,13 +19073,13 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
19015
19073
  };
19016
19074
  }, [isActive, imgInfo]);
19017
19075
  const handleMouseEnter = useCallback(() => {
19018
- if (swiperRef.current && swiperRef.current.swiper && isAlly) {
19019
- swiperRef.current.swiper.autoplay.stop();
19076
+ if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
19077
+ imgsSwiperRef.current.swiper.autoplay.stop();
19020
19078
  }
19021
19079
  }, []);
19022
19080
  const handleMouseLeave = useCallback(() => {
19023
- if (swiperRef.current && swiperRef.current.swiper && isAlly) {
19024
- swiperRef.current.swiper.autoplay.start();
19081
+ if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
19082
+ imgsSwiperRef.current.swiper.autoplay.start();
19025
19083
  }
19026
19084
  }, []);
19027
19085
  const handleSlideChange = useCallback((swiper) => {
@@ -19042,7 +19100,7 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
19042
19100
  enabled: true
19043
19101
  }
19044
19102
  }
19045
- : {}), { loop: true, ref: swiperRef, onSlideChange: handleSlideChange, className: css(Object.assign(Object.assign({ '.swiper-pagination': {
19103
+ : {}), { loop: true, ref: imgsSwiperRef, onSlideChange: handleSlideChange, className: css(Object.assign(Object.assign({ '.swiper-pagination': {
19046
19104
  bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0,
19047
19105
  fontSize: '14px'
19048
19106
  } }, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor) && {
@@ -19059,7 +19117,7 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
19059
19117
  return (React.createElement(SwiperSlide, { key: srcKey, "aria-hidden": srcKey !== swiperActiveIndex },
19060
19118
  React.createElement(Picture, { src: !isLoad && srcKey > 0 ? '' : url, height: height, imgUrlsPostConfig: imgUrlsPostConfig, onShowFirstImage: showFirstImageFn })));
19061
19119
  }))));
19062
- };
19120
+ });
19063
19121
  var PictureGroup$5 = memo(PictureGroup$4);
19064
19122
 
19065
19123
  /*
@@ -19351,7 +19409,7 @@ var NavBack$1 = memo(NavBack);
19351
19409
  * @Author: binruan@chatlabs.com
19352
19410
  * @Date: 2024-03-20 10:27:31
19353
19411
  * @LastEditors: binruan@chatlabs.com
19354
- * @LastEditTime: 2025-05-09 15:51:40
19412
+ * @LastEditTime: 2025-05-12 14:26:15
19355
19413
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
19356
19414
  *
19357
19415
  */
@@ -19372,6 +19430,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19372
19430
  const [pageNum, setPageNum] = useState(2);
19373
19431
  useState(false);
19374
19432
  const videoWidgetRef = useRef(null);
19433
+ const pictureGroupRef = useRef(null);
19375
19434
  const fbcRef = useRef('');
19376
19435
  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();
19377
19436
  const { backMainFeed, productView, jumpToWeb } = useEventReport();
@@ -19421,7 +19480,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19421
19480
  (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
19422
19481
  }, [data, ctaType, swiperRef]);
19423
19482
  const handleSessionCompleted = useCallback((fk) => {
19424
- 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;
19483
+ 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;
19425
19484
  const item = data === null || data === void 0 ? void 0 : data[activeIndex];
19426
19485
  let fromKName = '';
19427
19486
  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))) {
@@ -19448,22 +19507,23 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19448
19507
  eventSubject: 'sessionCompleted',
19449
19508
  eventDescription: 'Session completed',
19450
19509
  contentId: (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.itemId,
19451
- productId: (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.itemId,
19510
+ 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 : '',
19511
+ productId: (_r = item === null || item === void 0 ? void 0 : item.product) === null || _r === void 0 ? void 0 : _r.itemId,
19452
19512
  position: activeIndex + '',
19453
19513
  fromKName: fk || fromKName,
19454
19514
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
19455
- 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 : '',
19456
- 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 : ''
19515
+ 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 : '',
19516
+ 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 : ''
19457
19517
  }
19458
19518
  });
19459
- 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);
19519
+ 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);
19460
19520
  if (!popupDetailData) {
19461
19521
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19462
19522
  eventName: 'ExitFeed',
19463
- 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] : [],
19523
+ 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] : [],
19464
19524
  rec: item,
19465
19525
  position: activeIndex,
19466
- 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 : '',
19526
+ 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 : '',
19467
19527
  view_time: new Date() - viewTime.current
19468
19528
  });
19469
19529
  }
@@ -19523,8 +19583,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19523
19583
  refreshFeSession
19524
19584
  ]);
19525
19585
  const handleSessionExpire = useCallback(debounce(() => {
19526
- var _a;
19586
+ var _a, _b;
19527
19587
  (_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
19588
+ (_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
19528
19589
  refreshFeSession === null || refreshFeSession === void 0 ? void 0 : refreshFeSession(false, handleSessionCompleted);
19529
19590
  }, 1000), [handleSessionCompleted, refreshFeSession]);
19530
19591
  useEffect(() => {
@@ -19595,18 +19656,18 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19595
19656
  return null;
19596
19657
  }, [globalConfig, activeIndex, visList]);
19597
19658
  const renderContent = useCallback((rec, index) => {
19598
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
19659
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
19599
19660
  if (rec === 'organic menu') {
19600
19661
  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)));
19601
19662
  }
19602
- if ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.url) {
19663
+ 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)) {
19603
19664
  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 })));
19604
19665
  }
19605
- if ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.imgUrls) {
19606
- 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 }));
19666
+ if ((_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.imgUrls) {
19667
+ 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 })));
19607
19668
  }
19608
- 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) {
19609
- return (_k = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _k === void 0 ? void 0 : _k.map((value, idx) => {
19669
+ 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) {
19670
+ return (_m = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _m === void 0 ? void 0 : _m.map((value, idx) => {
19610
19671
  var _a, _b, _c, _d, _e, _f, _g, _h;
19611
19672
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
19612
19673
  const Component = withBindDataSource(t);
@@ -19645,7 +19706,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19645
19706
  };
19646
19707
  }, [isShowMore]);
19647
19708
  const renderBottom = useCallback((rec, index) => {
19648
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
19709
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
19649
19710
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
19650
19711
  let cta = null;
19651
19712
  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) {
@@ -19654,24 +19715,27 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19654
19715
  else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
19655
19716
  cta = '商品CTA';
19656
19717
  }
19718
+ 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)) {
19719
+ cta = '服务CTA';
19720
+ }
19657
19721
  else {
19658
- 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;
19722
+ 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;
19659
19723
  }
19660
19724
  const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
19661
19725
  const isNineProduct = (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.nineProductEnable) &&
19662
19726
  index === ((rtcList === null || rtcList === void 0 ? void 0 : rtcList[0]) === 'organic menu' ? 1 : 0) &&
19663
- ((_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));
19727
+ ((_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));
19664
19728
  return (React.createElement(React.Fragment, null,
19665
19729
  isNineProduct && (React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, isNineProduct: isNineProduct })),
19666
- ((_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' }),
19667
- 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` } },
19730
+ ((_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' }),
19731
+ 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` } },
19668
19732
  React.createElement(Nudge, { nudge: nudge }),
19669
19733
  ((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' },
19670
19734
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, includesCtaType: [] }))) : null,
19671
19735
  React.createElement("div", { style: { display: 'flex', flexDirection: 'column' } },
19672
- 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 }),
19736
+ 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 }),
19673
19737
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex }),
19674
- 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) }))),
19738
+ 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) }))),
19675
19739
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
19676
19740
  }
19677
19741
  return null;
@@ -19713,7 +19777,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19713
19777
  return null;
19714
19778
  }, [globalConfig, waterFallData, bottomHeight]);
19715
19779
  const handleViewImageStartEnd = (item) => {
19716
- var _a, _b, _c, _d, _e, _f;
19780
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
19717
19781
  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)) {
19718
19782
  const endTime = Date.now();
19719
19783
  const duration = viewImageStartTime.current === 0 ? 0 : (endTime - viewImageStartTime.current) / 1000;
@@ -19722,10 +19786,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19722
19786
  eventSubject: 'viewImageCarouselEnd',
19723
19787
  eventDescription: 'User end view the image carousel',
19724
19788
  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 : '',
19725
- contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
19789
+ 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 : '',
19790
+ contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
19726
19791
  imageEndTime: `${endTime}`,
19727
19792
  playDuration: `${duration}`,
19728
- contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
19793
+ contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
19729
19794
  position: activeIndex + '',
19730
19795
  contentFormat: 'image',
19731
19796
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo
@@ -19734,7 +19799,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19734
19799
  }
19735
19800
  };
19736
19801
  const handleSlideSkip = (item, position) => {
19737
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
19802
+ 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;
19738
19803
  if (isPreview || waterFallData)
19739
19804
  return;
19740
19805
  const t = new Date() - curTime.current;
@@ -19760,7 +19825,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19760
19825
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
19761
19826
  position: position + '',
19762
19827
  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 : '',
19763
- 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 : '',
19828
+ 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 : '',
19829
+ 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 : '',
19764
19830
  contentFormat
19765
19831
  }
19766
19832
  });
@@ -19770,7 +19836,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19770
19836
  }
19771
19837
  };
19772
19838
  const handleScrollEvent = (swiper) => {
19773
- 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;
19839
+ 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;
19774
19840
  const item = data[swiper.previousIndex];
19775
19841
  const activeItem = data[swiper.activeIndex];
19776
19842
  if (!item)
@@ -19803,11 +19869,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19803
19869
  eventSubject: 'scrollDown',
19804
19870
  eventDescription: 'User scroll down',
19805
19871
  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 : '',
19806
- 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 : '',
19872
+ 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 : '',
19873
+ 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 : '',
19807
19874
  requestId: null,
19808
- 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 : '',
19875
+ 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 : '',
19809
19876
  contentFormat,
19810
- position: ((_1 = swiper.previousIndex) !== null && _1 !== void 0 ? _1 : 0) + ''
19877
+ position: ((_4 = swiper.previousIndex) !== null && _4 !== void 0 ? _4 : 0) + ''
19811
19878
  }
19812
19879
  });
19813
19880
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -19820,12 +19887,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19820
19887
  eventInfo: {
19821
19888
  eventSubject: 'scrollUp',
19822
19889
  eventDescription: 'User scroll up',
19823
- 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 : '',
19824
- productId: (_5 = (_4 = item.product) === null || _4 === void 0 ? void 0 : _4.itemId) !== null && _5 !== void 0 ? _5 : '',
19890
+ 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 : '',
19891
+ 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 : '',
19892
+ productId: (_11 = (_10 = item.product) === null || _10 === void 0 ? void 0 : _10.itemId) !== null && _11 !== void 0 ? _11 : '',
19825
19893
  requestId: null,
19826
- 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 : '',
19894
+ 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 : '',
19827
19895
  contentFormat,
19828
- position: ((_10 = swiper.previousIndex) !== null && _10 !== void 0 ? _10 : 0) + ''
19896
+ position: ((_16 = swiper.previousIndex) !== null && _16 !== void 0 ? _16 : 0) + ''
19829
19897
  }
19830
19898
  });
19831
19899
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -19925,7 +19993,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19925
19993
  };
19926
19994
  }, [globalConfig, bffEventReport, data, activeIndex]);
19927
19995
  const handleViewImageStartEvent = (activeIndex, imgInfo, enableCapi) => {
19928
- var _a, _b, _c, _d, _e, _f, _g, _h;
19996
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
19929
19997
  const item = data[activeIndex];
19930
19998
  // 如果是图片集则上报事件
19931
19999
  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)) {
@@ -19936,9 +20004,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19936
20004
  eventSubject: 'viewImageCarouselStart',
19937
20005
  eventDescription: 'User start view the image carousel',
19938
20006
  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 : '',
19939
- contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
20007
+ 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 : '',
20008
+ contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
19940
20009
  imageStartTime: `${startTime}`,
19941
- contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
20010
+ contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
19942
20011
  position: activeIndex + '',
19943
20012
  contentFormat: 'image',
19944
20013
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo,
@@ -19948,13 +20017,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19948
20017
  if (enableCapi) {
19949
20018
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19950
20019
  eventName: 'ViewContent',
19951
- product: (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.bindProducts,
20020
+ product: (_k = item === null || item === void 0 ? void 0 : item.video) === null || _k === void 0 ? void 0 : _k.bindProducts,
19952
20021
  rec: item,
19953
20022
  position: activeIndex
19954
20023
  });
19955
20024
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19956
20025
  eventName: 'PageView',
19957
- product: (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.bindProducts,
20026
+ product: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.bindProducts,
19958
20027
  rec: item,
19959
20028
  position: activeIndex
19960
20029
  });
@@ -20052,15 +20121,20 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
20052
20121
  swiperRef.current.swiper.allowTouchMove = true;
20053
20122
  }, 500);
20054
20123
  }, onActiveIndexChange: (swiper) => {
20124
+ var _a, _b;
20055
20125
  setActiveIndex(swiper.activeIndex);
20056
20126
  if (openHashtag)
20057
20127
  return;
20058
20128
  // 处理上滑下滑事件
20059
20129
  handleScrollEvent(swiper);
20060
- if (waterFallData || isEditor || isDiyH5)
20130
+ if (waterFallData || isEditor)
20061
20131
  return;
20062
20132
  if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
20063
20133
  if (!isLoadMore) {
20134
+ if (isDiyH5) {
20135
+ (_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
20136
+ (_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
20137
+ }
20064
20138
  setIsLoadMore(true);
20065
20139
  loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(pageNum).then((res) => {
20066
20140
  var _a;
@@ -20133,7 +20207,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
20133
20207
  }, []);
20134
20208
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
20135
20209
  const handlePlaying = useCallback(() => {
20136
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
20210
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
20137
20211
  setIsPauseVideo(false);
20138
20212
  const item = data[index];
20139
20213
  if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration)) {
@@ -20146,14 +20220,15 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
20146
20220
  eventSubject: 'playVideo',
20147
20221
  eventDescription: 'User played the video',
20148
20222
  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 : '',
20149
- 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 : '',
20223
+ 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 : '',
20224
+ 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 : '',
20150
20225
  playType,
20151
20226
  startTime: videoCurrentTime,
20152
20227
  videoDuration,
20153
- 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 : []),
20228
+ 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 : []),
20154
20229
  position: index + '',
20155
20230
  contentFormat: 'video',
20156
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
20231
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
20157
20232
  }
20158
20233
  });
20159
20234
  setIsFirstPlay(false);
@@ -20192,7 +20267,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
20192
20267
  }
20193
20268
  }, [isLoadFinish]);
20194
20269
  const onPause = useCallback(() => {
20195
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
20270
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
20196
20271
  const item = data[index];
20197
20272
  const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
20198
20273
  const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
@@ -20203,14 +20278,15 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
20203
20278
  eventSubject: 'playOverVideo',
20204
20279
  eventDescription: 'User finished playing the video',
20205
20280
  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 : '',
20206
- 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 : '',
20281
+ 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 : '',
20282
+ 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 : '',
20207
20283
  endTime: videoCurrentTime,
20208
20284
  videoDuration,
20209
20285
  playDuration,
20210
- 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 : []),
20286
+ 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 : []),
20211
20287
  position: index + '',
20212
20288
  contentFormat: 'video',
20213
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
20289
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
20214
20290
  }
20215
20291
  });
20216
20292
  }