pb-sxp-ui 1.16.15 → 1.16.17

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 +235 -162
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +235 -162
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.cjs +6 -6
  6. package/dist/index.min.cjs.map +1 -1
  7. package/dist/index.min.js +6 -6
  8. package/dist/index.min.js.map +1 -1
  9. package/dist/pb-ui.js +235 -162
  10. package/dist/pb-ui.js.map +1 -1
  11. package/dist/pb-ui.min.js +6 -6
  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 +17 -15
  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 +32 -45
  18. package/es/core/components/SxpPageRender/WaterFall/index.js +4 -3
  19. package/es/core/components/SxpPageRender/index.js +53 -37
  20. package/es/core/context/SxpDataSourceProvider.d.ts +1 -0
  21. package/es/core/context/SxpDataSourceProvider.js +70 -33
  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 +17 -15
  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 +32 -45
  28. package/lib/core/components/SxpPageRender/WaterFall/index.js +4 -3
  29. package/lib/core/components/SxpPageRender/index.js +53 -37
  30. package/lib/core/context/SxpDataSourceProvider.d.ts +1 -0
  31. package/lib/core/context/SxpDataSourceProvider.js +70 -33
  32. package/lib/core/hooks/useEventReport.js +6 -5
  33. package/package.json +1 -1
package/dist/pb-ui.js CHANGED
@@ -637,6 +637,7 @@
637
637
  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 }) => {
638
638
  var _a, _b, _c, _d, _e;
639
639
  const [rtcList, setRtcList] = React.useState([]);
640
+ const [firstRtcList, setFirstRtcList] = React.useState([]);
640
641
  const [tagList, setTagList] = React.useState([]);
641
642
  const [loading, setLoading] = React.useState(true);
642
643
  const [curReqInfo, setCurReqInfo] = React.useState({ rtc: '', requestId: '' });
@@ -743,6 +744,7 @@
743
744
  val.split('=')[0];
744
745
  val.split('=')[1];
745
746
  });
747
+ options.body = Object.assign(Object.assign({}, options.body), { tenant_id: fakeUserId });
746
748
  return window
747
749
  .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
748
750
  ? JSON.stringify({
@@ -776,18 +778,18 @@
776
778
  set(value) {
777
779
  // 继续正常设置 src
778
780
  originalSrcDescriptor.set.call(this, value);
779
- img.onload = function () {
780
- // 检查是否是目标 URL
781
- if (value.includes('https://www.facebook.com/privacy_sandbox/pixel/register/trigger/')) {
782
- // 解析 URL 参数
783
- const url = new URL(value);
784
- const params = Object.fromEntries(url.searchParams.entries());
785
- bffCollectEvent({
786
- eventName: params === null || params === void 0 ? void 0 : params.ev,
787
- eventSource: 'Meta Pixel'
788
- });
789
- }
790
- };
781
+ // img.onload = function () {
782
+ // 检查是否是目标 URL
783
+ if (value.includes('https://www.facebook.com/privacy_sandbox/pixel/register/trigger/')) {
784
+ // 解析 URL 参数
785
+ const url = new URL(value);
786
+ const params = Object.fromEntries(url.searchParams.entries());
787
+ bffCollectEvent({
788
+ eventName: params === null || params === void 0 ? void 0 : params.ev,
789
+ eventSource: 'Meta Pixel'
790
+ });
791
+ // }
792
+ }
791
793
  },
792
794
  get() {
793
795
  return originalSrcDescriptor.get.call(this);
@@ -827,25 +829,23 @@
827
829
  var _a, _b;
828
830
  try {
829
831
  const parsedData = yield parseBeaconData(data);
830
- if (success) {
831
- // 使用你的自定义上报方法
832
- if (urlString.includes('https://tr.snapchat.com/p')) {
833
- (_b = (_a = parsedData === null || parsedData === void 0 ? void 0 : parsedData.req) === null || _a === void 0 ? void 0 : _a.forEach) === null || _b === void 0 ? void 0 : _b.call(_a, (item) => {
834
- var _a, _b;
835
- if ((_a = item === null || item === void 0 ? void 0 : item.t) === null || _a === void 0 ? void 0 : _a.ev) {
836
- bffCollectEvent({
837
- eventName: (_b = item === null || item === void 0 ? void 0 : item.t) === null || _b === void 0 ? void 0 : _b.ev,
838
- eventSource: 'Snapchat Pixel'
839
- });
840
- }
841
- });
842
- }
843
- else if (urlString.includes('https://analytics.tiktok.com/api/v2/pixel') && (parsedData === null || parsedData === void 0 ? void 0 : parsedData.event)) {
844
- bffCollectEvent({
845
- eventName: parsedData.event,
846
- eventSource: 'TikTok Pixel'
847
- });
848
- }
832
+ // 使用你的自定义上报方法
833
+ if (urlString.includes('https://tr.snapchat.com/p')) {
834
+ (_b = (_a = parsedData === null || parsedData === void 0 ? void 0 : parsedData.req) === null || _a === void 0 ? void 0 : _a.forEach) === null || _b === void 0 ? void 0 : _b.call(_a, (item) => {
835
+ var _a, _b;
836
+ if ((_a = item === null || item === void 0 ? void 0 : item.t) === null || _a === void 0 ? void 0 : _a.ev) {
837
+ bffCollectEvent({
838
+ eventName: (_b = item === null || item === void 0 ? void 0 : item.t) === null || _b === void 0 ? void 0 : _b.ev,
839
+ eventSource: 'Snapchat Pixel'
840
+ });
841
+ }
842
+ });
843
+ }
844
+ else if (urlString.includes('https://analytics.tiktok.com/api/v2/pixel') && (parsedData === null || parsedData === void 0 ? void 0 : parsedData.event)) {
845
+ bffCollectEvent({
846
+ eventName: parsedData.event,
847
+ eventSource: 'TikTok Pixel'
848
+ });
849
849
  }
850
850
  }
851
851
  catch (error) {
@@ -867,6 +867,7 @@
867
867
  window.fetch = function (input, init) {
868
868
  var arguments_1 = arguments;
869
869
  return __awaiter(this, void 0, void 0, function* () {
870
+ var _a;
870
871
  // 安全获取 URL 字符串
871
872
  let url;
872
873
  try {
@@ -887,17 +888,39 @@
887
888
  // 检查是否是 GA4 收集端点
888
889
  try {
889
890
  // 1. 先执行原始请求
890
- const response = yield _originalFetch.apply(this, arguments_1);
891
+ const response = _originalFetch.apply(this, arguments_1);
891
892
  // 2. 检查请求是否成功 (HTTP 200-299)
892
893
  // 安全解析 URL
893
894
  const urlObj = new URL(url);
894
895
  const params = Object.fromEntries(urlObj.searchParams.entries());
896
+ const body = (_a = arguments_1[1]) === null || _a === void 0 ? void 0 : _a.body;
895
897
  if (params === null || params === void 0 ? void 0 : params.en) {
896
898
  bffCollectEvent({
897
899
  eventName: params === null || params === void 0 ? void 0 : params.en,
898
900
  eventSource: 'Google Analytics'
899
901
  });
900
902
  }
903
+ else if (body) {
904
+ function extractAllEnValuesSplit(queryString) {
905
+ if (typeof queryString !== 'string') {
906
+ return [];
907
+ }
908
+ const matches = [];
909
+ const regex = /en=([^&\r\n]*)/g;
910
+ let match;
911
+ while ((match = regex.exec(queryString)) !== null) {
912
+ matches.push(decodeURIComponent(match[1]));
913
+ }
914
+ return matches;
915
+ }
916
+ const enValues = extractAllEnValuesSplit(body);
917
+ enValues === null || enValues === void 0 ? void 0 : enValues.forEach((en) => {
918
+ bffCollectEvent({
919
+ eventName: en,
920
+ eventSource: 'Google Analytics'
921
+ });
922
+ });
923
+ }
901
924
  return response;
902
925
  }
903
926
  catch (error) {
@@ -967,6 +990,9 @@
967
990
  if ((rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) === 0) {
968
991
  setRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
969
992
  setCacheRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
993
+ if (isDiyH5) {
994
+ setFirstRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
995
+ }
970
996
  }
971
997
  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));
972
998
  if (isNotNullList) {
@@ -1006,12 +1032,17 @@
1006
1032
  if (rtcList.length <= 0) {
1007
1033
  return;
1008
1034
  }
1035
+ if (isDiyH5 && (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) > 0) {
1036
+ setRtcList(rtcList.concat(firstRtcList));
1037
+ setCacheRtcList(cacheRtcList.concat(firstRtcList));
1038
+ return;
1039
+ }
1009
1040
  const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
1010
1041
  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 })));
1011
1042
  setRtcList(rtcList.concat(getFilterRecList(data)));
1012
1043
  setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
1013
1044
  return data;
1014
- }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
1045
+ }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList, isDiyH5, firstRtcList]);
1015
1046
  const refreshFeSession = React.useCallback((enableReSid, event) => {
1016
1047
  var _a, _b, _c, _d, _e;
1017
1048
  let expire = false;
@@ -1238,7 +1269,7 @@
1238
1269
  }
1239
1270
  }), [bffFetch, utmVal]);
1240
1271
  const ctaEvent = React.useCallback((eventInfo, rec, product, position) => {
1241
- 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;
1272
+ 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;
1242
1273
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
1243
1274
  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);
1244
1275
  let fromKName = '';
@@ -1256,7 +1287,7 @@
1256
1287
  }
1257
1288
  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;
1258
1289
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1259
- 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 })
1290
+ 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 })
1260
1291
  });
1261
1292
  }, [bffEventReport, isFromHashtag]);
1262
1293
  const h5EnterLink = React.useCallback(() => {
@@ -1358,6 +1389,9 @@
1358
1389
  }
1359
1390
  setRtcList(list);
1360
1391
  setCacheRtcList(list);
1392
+ if (isDiyH5) {
1393
+ setFirstRtcList(list);
1394
+ }
1361
1395
  bffGetTagList(curData !== null && curData !== void 0 ? curData : finalPageData);
1362
1396
  if (channel) {
1363
1397
  const item = list === null || list === void 0 ? void 0 : list[0];
@@ -1393,6 +1427,9 @@
1393
1427
  }
1394
1428
  setRtcList(list);
1395
1429
  setCacheRtcList(list);
1430
+ if (isDiyH5) {
1431
+ setFirstRtcList(list);
1432
+ }
1396
1433
  }
1397
1434
  })
1398
1435
  .finally(() => {
@@ -1456,7 +1493,8 @@
1456
1493
  refreshFeSession,
1457
1494
  getAccount,
1458
1495
  accountSonsent,
1459
- isDiyH5
1496
+ isDiyH5,
1497
+ firstRtcList
1460
1498
  } }, 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({
1461
1499
  rtcList,
1462
1500
  mutateLike: bffMutateLike,
@@ -1917,14 +1955,14 @@
1917
1955
  * @Author: binruan@chatlabs.com
1918
1956
  * @Date: 2024-03-12 10:59:06
1919
1957
  * @LastEditors: binruan@chatlabs.com
1920
- * @LastEditTime: 2024-11-28 11:17:16
1958
+ * @LastEditTime: 2025-05-09 15:30:59
1921
1959
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
1922
1960
  *
1923
1961
  */
1924
1962
  function useEventReport() {
1925
1963
  const { bffEventReport, popupDetailData, isFromHashtag, eventTimeList, setEventTimeList } = useSxpDataSource();
1926
1964
  const jumpToWeb = React.useCallback((e, data, product, cta, position, traceInfo) => {
1927
- 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;
1965
+ 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;
1928
1966
  const i = eventTimeList === null || eventTimeList === void 0 ? void 0 : eventTimeList.findIndex((item) => item.target === (e === null || e === void 0 ? void 0 : e.target));
1929
1967
  if (i !== -1) {
1930
1968
  return;
@@ -1957,11 +1995,11 @@
1957
1995
  contentFormat = 'image';
1958
1996
  }
1959
1997
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1960
- 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 }))
1998
+ 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 }))
1961
1999
  });
1962
2000
  }, [bffEventReport, popupDetailData, isFromHashtag, eventTimeList]);
1963
2001
  const productView = React.useCallback((data, product, cta, viewTime, position) => {
1964
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
2002
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
1965
2003
  let fromKName = '';
1966
2004
  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))) {
1967
2005
  fromKName = 'pdpPage';
@@ -1980,8 +2018,9 @@
1980
2018
  contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
1981
2019
  position: position + '',
1982
2020
  contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
2021
+ 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 : '',
1983
2022
  ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
1984
- 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 : '',
2023
+ 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 : '',
1985
2024
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
1986
2025
  eventSubject: 'productView',
1987
2026
  eventDescription: 'User browsed the product'
@@ -15796,7 +15835,7 @@ Made in Italy` })));
15796
15835
  * @Author: binruan@chatlabs.com
15797
15836
  * @Date: 2024-01-10 10:58:24
15798
15837
  * @LastEditors: binruan@chatlabs.com
15799
- * @LastEditTime: 2025-02-28 10:00:31
15838
+ * @LastEditTime: 2025-05-09 15:30:41
15800
15839
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
15801
15840
  *
15802
15841
  */
@@ -15834,7 +15873,7 @@ Made in Italy` })));
15834
15873
  }
15835
15874
  }, [waterFallData]);
15836
15875
  const reportTagsView = React.useCallback(() => {
15837
- var _a, _b, _c, _d, _e, _f;
15876
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
15838
15877
  const rec = recData === null || recData === void 0 ? void 0 : recData.rec;
15839
15878
  if (!rec)
15840
15879
  return;
@@ -15854,9 +15893,10 @@ Made in Italy` })));
15854
15893
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
15855
15894
  eventInfo: {
15856
15895
  contentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
15896
+ 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 : '',
15857
15897
  position: cacheActiveIndex + '',
15858
- contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
15859
- traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
15898
+ contentTags: JSON.stringify((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.tags),
15899
+ traceInfo: (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.traceInfo,
15860
15900
  hashTags: JSON.stringify([recData === null || recData === void 0 ? void 0 : recData.hashTag]),
15861
15901
  fromKName,
15862
15902
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
@@ -17938,7 +17978,7 @@ Made in Italy` })));
17938
17978
  const likeIcon = useIconLink(defaultLikeIconPath$2);
17939
17979
  const unlikeIcon = useIconLink(defaultUnLikeIconPath$2);
17940
17980
  const handleClick = lodash.debounce(() => __awaiter(void 0, void 0, void 0, function* () {
17941
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
17981
+ 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;
17942
17982
  if (state) {
17943
17983
  // 先设置状态
17944
17984
  setState(false);
@@ -17948,11 +17988,12 @@ Made in Italy` })));
17948
17988
  eventSubject: 'favoriteContentCanceled',
17949
17989
  eventDescription: 'This content was unfavorite by the user',
17950
17990
  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 : '',
17951
- 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 : '',
17952
- 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 : []),
17991
+ 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 : '',
17992
+ 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 : '',
17993
+ 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 : []),
17953
17994
  position: position + '',
17954
- contentFormat: ((_m = recData === null || recData === void 0 ? void 0 : recData.video) === null || _m === void 0 ? void 0 : _m.url) ? 'video' : 'image',
17955
- traceInfo: (_o = recData === null || recData === void 0 ? void 0 : recData.video) === null || _o === void 0 ? void 0 : _o.traceInfo
17995
+ contentFormat: ((_q = recData === null || recData === void 0 ? void 0 : recData.video) === null || _q === void 0 ? void 0 : _q.url) ? 'video' : 'image',
17996
+ traceInfo: (_r = recData === null || recData === void 0 ? void 0 : recData.video) === null || _r === void 0 ? void 0 : _r.traceInfo
17956
17997
  }
17957
17998
  });
17958
17999
  // 如果接口调用失败,则回滚状态
@@ -17960,40 +18001,41 @@ Made in Italy` })));
17960
18001
  setState(true);
17961
18002
  }
17962
18003
  else {
17963
- const nRtcList = (_p = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18004
+ const nRtcList = (_s = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
17964
18005
  if (index === position) {
17965
18006
  item.isCollected = false;
17966
18007
  }
17967
18008
  return item;
17968
- })) !== null && _p !== void 0 ? _p : [];
18009
+ })) !== null && _s !== void 0 ? _s : [];
17969
18010
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
17970
18011
  }
17971
18012
  }
17972
18013
  else {
17973
18014
  setState(true);
17974
- const result = (_q = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData) })))) !== null && _q !== void 0 ? _q : false;
18015
+ const result = (_t = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData) })))) !== null && _t !== void 0 ? _t : false;
17975
18016
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
17976
18017
  eventInfo: {
17977
18018
  eventSubject: 'favoriteContent',
17978
18019
  eventDescription: 'This content was favorite by the user',
17979
- 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 : '',
17980
- 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 : '',
17981
- 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 : []),
18020
+ contentId: (_v = (_u = recData === null || recData === void 0 ? void 0 : recData.video) === null || _u === void 0 ? void 0 : _u.itemId) !== null && _v !== void 0 ? _v : '',
18021
+ sceneId: (_y = (_x = (_w = recData === null || recData === void 0 ? void 0 : recData.video) === null || _w === void 0 ? void 0 : _w.scene) === null || _x === void 0 ? void 0 : _x.sceneId) !== null && _y !== void 0 ? _y : '',
18022
+ contentName: (_0 = (_z = recData === null || recData === void 0 ? void 0 : recData.video) === null || _z === void 0 ? void 0 : _z.title) !== null && _0 !== void 0 ? _0 : '',
18023
+ contentTags: JSON.stringify((_2 = (_1 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _1 === void 0 ? void 0 : _1.tags) !== null && _2 !== void 0 ? _2 : []),
17982
18024
  position: position + '',
17983
- contentFormat: ((_x = recData === null || recData === void 0 ? void 0 : recData.video) === null || _x === void 0 ? void 0 : _x.url) ? 'video' : 'image',
17984
- traceInfo: (_y = recData === null || recData === void 0 ? void 0 : recData.video) === null || _y === void 0 ? void 0 : _y.traceInfo
18025
+ contentFormat: ((_3 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _3 === void 0 ? void 0 : _3.url) ? 'video' : 'image',
18026
+ traceInfo: (_4 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _4 === void 0 ? void 0 : _4.traceInfo
17985
18027
  }
17986
18028
  });
17987
18029
  if (!result) {
17988
18030
  setState(false);
17989
18031
  }
17990
18032
  else {
17991
- const nRtcList = (_z = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18033
+ const nRtcList = (_5 = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
17992
18034
  if (index === position) {
17993
18035
  item.isCollected = true;
17994
18036
  }
17995
18037
  return item;
17996
- })) !== null && _z !== void 0 ? _z : [];
18038
+ })) !== null && _5 !== void 0 ? _5 : [];
17997
18039
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
17998
18040
  }
17999
18041
  }
@@ -18030,7 +18072,7 @@ Made in Italy` })));
18030
18072
  const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activeIndex, videoPostConfig, videoPlayIcon, loopPlay, swiperRef }, ref) => {
18031
18073
  var _a, _b;
18032
18074
  const [isPauseVideo, setIsPauseVideo] = React.useState(false);
18033
- const { bffEventReport, sxpParameter, waterFallData, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
18075
+ const { bffEventReport, sxpParameter, firstRtcList, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
18034
18076
  const videoStartTime = React.useRef(0);
18035
18077
  const [isLoadFinish, setIsLoadFinish] = React.useState(false);
18036
18078
  const { isActive } = useSwiperSlide();
@@ -18096,6 +18138,23 @@ Made in Italy` })));
18096
18138
  return;
18097
18139
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
18098
18140
  }, [videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18141
+ const handleEnd = () => {
18142
+ var _a, _b, _c, _d, _e, _f;
18143
+ if (!videoRef.current)
18144
+ return;
18145
+ if (isDiyH5) {
18146
+ (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.pause();
18147
+ if (!loopPlayRef.current)
18148
+ return;
18149
+ if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
18150
+ 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;
18151
+ (_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);
18152
+ }
18153
+ }
18154
+ else {
18155
+ (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.play();
18156
+ }
18157
+ };
18099
18158
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
18100
18159
  const handlePlaying = React.useCallback(() => {
18101
18160
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
@@ -18104,7 +18163,7 @@ Made in Italy` })));
18104
18163
  setIsLoadFinish(true);
18105
18164
  }, []);
18106
18165
  const handleStartPlay = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
18107
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
18166
+ var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
18108
18167
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
18109
18168
  return;
18110
18169
  setIsPauseVideo(false);
@@ -18115,16 +18174,11 @@ Made in Italy` })));
18115
18174
  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);
18116
18175
  const playType = (isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) ? '0' : '1';
18117
18176
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
18118
- 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) + '' }))
18177
+ 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) + '' }))
18119
18178
  });
18120
18179
  isFirstPlayRef.current = false;
18121
18180
  }
18122
18181
  }), [bffEventReport, data, index, isFirstPlayRef, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18123
- const setCurrentTimeByStartTime = React.useCallback(() => {
18124
- if (isDiyH5) {
18125
- videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
18126
- }
18127
- }, []);
18128
18182
  const handLoadeddata = React.useCallback(() => {
18129
18183
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || firstFrameSrc || !blur)
18130
18184
  return;
@@ -18149,13 +18203,12 @@ Made in Italy` })));
18149
18203
  const handleLoadedmetadata = React.useCallback(() => {
18150
18204
  if (!videoRef.current)
18151
18205
  return;
18152
- setCurrentTimeByStartTime();
18153
18206
  loadedTimeRef.current = new Date();
18154
18207
  handleStartPlay();
18155
18208
  handLoadeddata();
18156
18209
  }, [videoRef.current, handLoadeddata, handleStartPlay]);
18157
18210
  const handleClickVideo = React.useCallback((type) => () => {
18158
- var _a, _b, _c, _d, _e, _f;
18211
+ var _a, _b, _c, _d, _e;
18159
18212
  if (!videoRef.current)
18160
18213
  return;
18161
18214
  if (!isLoadFinish)
@@ -18176,20 +18229,17 @@ Made in Italy` })));
18176
18229
  break;
18177
18230
  default:
18178
18231
  if (isPause) {
18179
- 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)) {
18180
- videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
18181
- }
18182
- (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.play();
18232
+ (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.play();
18183
18233
  }
18184
18234
  else {
18185
- (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.pause();
18235
+ (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.pause();
18186
18236
  }
18187
18237
  setIsPauseVideo(!isPause);
18188
18238
  break;
18189
18239
  }
18190
18240
  }, [isLoadFinish, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18191
18241
  const handlePause = React.useCallback(() => {
18192
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
18242
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
18193
18243
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
18194
18244
  return;
18195
18245
  if (activeIndex !== index)
@@ -18205,14 +18255,15 @@ Made in Italy` })));
18205
18255
  eventSubject: 'playOverVideo',
18206
18256
  eventDescription: 'User finished playing the video',
18207
18257
  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 : '',
18208
- 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 : '',
18258
+ 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 : '',
18259
+ 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 : '',
18209
18260
  endTime: videoCurrentTime,
18210
18261
  videoDuration,
18211
18262
  playDuration,
18212
- 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 : []),
18263
+ 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 : []),
18213
18264
  position: index + '',
18214
18265
  contentFormat: 'video',
18215
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
18266
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
18216
18267
  }
18217
18268
  });
18218
18269
  }
@@ -18220,27 +18271,8 @@ Made in Italy` })));
18220
18271
  const handleWaiting = React.useCallback(() => {
18221
18272
  setWaiting(true);
18222
18273
  }, []);
18223
- const handleTimeUpload = () => {
18224
- if (!videoRef.current || !isDiyH5)
18225
- return;
18226
- setTimeout(() => {
18227
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
18228
- 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)) {
18229
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
18230
- if (!loopPlayRef.current)
18231
- return;
18232
- if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) {
18233
- (_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);
18234
- }
18235
- else {
18236
- 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;
18237
- (_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);
18238
- }
18239
- }
18240
- });
18241
- };
18242
18274
  React.useEffect(() => {
18243
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18275
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18244
18276
  if (!isActive)
18245
18277
  return;
18246
18278
  const videoSrc = videoUrl;
@@ -18261,7 +18293,6 @@ Made in Italy` })));
18261
18293
  hls === null || hls === void 0 ? void 0 : hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
18262
18294
  hls === null || hls === void 0 ? void 0 : hls.on(Hls.Events.MANIFEST_PARSED, function () {
18263
18295
  var _a;
18264
- setCurrentTimeByStartTime();
18265
18296
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
18266
18297
  });
18267
18298
  }
@@ -18275,12 +18306,11 @@ Made in Italy` })));
18275
18306
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.addEventListener('play', handleStartPlay);
18276
18307
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.addEventListener('playing', handlePlaying);
18277
18308
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.addEventListener('pause', handlePause);
18278
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handlePlay);
18309
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handleEnd);
18279
18310
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
18280
18311
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
18281
- (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.addEventListener('timeupdate', handleTimeUpload);
18282
18312
  return () => {
18283
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18313
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18284
18314
  const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
18285
18315
  if (!isPause)
18286
18316
  handlePause();
@@ -18292,10 +18322,9 @@ Made in Italy` })));
18292
18322
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('play', handleStartPlay);
18293
18323
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('playing', handlePlaying);
18294
18324
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('pause', handlePause);
18295
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handlePlay);
18325
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handleEnd);
18296
18326
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('canplay', handlePlay);
18297
18327
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.removeEventListener('waiting', handleWaiting);
18298
- (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.removeEventListener('timeupdate', handleTimeUpload);
18299
18328
  };
18300
18329
  }, [isActive]);
18301
18330
  React.useEffect(() => {
@@ -18506,19 +18535,45 @@ Made in Italy` })));
18506
18535
  }, onLoad: onShowFirstImage }))));
18507
18536
  };
18508
18537
 
18509
- const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig }) => {
18538
+ const PictureGroup$4 = React.forwardRef(({ imgUrls, data, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig, swiperRef }, ref) => {
18510
18539
  var _a, _b;
18511
18540
  const { isActive } = useSwiperSlide();
18512
- const { sxpParameter, openHashtag } = useSxpDataSource();
18541
+ const { firstRtcList, openHashtag, isDiyH5 } = useSxpDataSource();
18513
18542
  const [isLoad, setIsLoad] = React.useState(false);
18514
18543
  const [imgInfo, setImgInfo] = React.useState();
18515
18544
  const [swiperActiveIndex, setSwiperActiveIndex] = React.useState(0);
18516
- const swiperRef = React.useRef();
18545
+ const imgsSwiperRef = React.useRef();
18517
18546
  const isFirstPlayRef = React.useRef(true);
18547
+ const loopPlayRef = React.useRef(true);
18518
18548
  const initTime = new Date();
18549
+ React.useImperativeHandle(ref, () => {
18550
+ return {
18551
+ setLoopPlay(v) {
18552
+ loopPlayRef.current = v;
18553
+ }
18554
+ };
18555
+ });
18556
+ React.useEffect(() => {
18557
+ let timerId;
18558
+ if (isLoad && isActive && isDiyH5) {
18559
+ timerId = setTimeout(() => {
18560
+ var _a, _b, _c, _d;
18561
+ if (!loopPlayRef.current)
18562
+ return;
18563
+ if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
18564
+ 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;
18565
+ (_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);
18566
+ }
18567
+ }, 3000);
18568
+ }
18569
+ return () => {
18570
+ if (timerId)
18571
+ clearTimeout(timerId);
18572
+ };
18573
+ }, [isLoad, isActive, isDiyH5, index, swiperRef, firstRtcList]);
18519
18574
  React.useEffect(() => {
18520
18575
  if (isLoad && isActive) {
18521
- (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.start();
18576
+ (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.start();
18522
18577
  if (openHashtag) {
18523
18578
  onViewImageEndEvent(rec);
18524
18579
  }
@@ -18528,7 +18583,7 @@ Made in Italy` })));
18528
18583
  }
18529
18584
  }
18530
18585
  else {
18531
- (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.stop();
18586
+ (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.stop();
18532
18587
  }
18533
18588
  }, [rec, isActive, onViewImageEndEvent, openHashtag, index, onViewImageStartEvent, isLoad, imgInfo]);
18534
18589
  const showFirstImageFn = React.useCallback((e) => __awaiter(void 0, void 0, void 0, function* () {
@@ -18555,13 +18610,13 @@ Made in Italy` })));
18555
18610
  };
18556
18611
  }, [isActive, imgInfo]);
18557
18612
  const handleMouseEnter = React.useCallback(() => {
18558
- if (swiperRef.current && swiperRef.current.swiper && isAlly) {
18559
- swiperRef.current.swiper.autoplay.stop();
18613
+ if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
18614
+ imgsSwiperRef.current.swiper.autoplay.stop();
18560
18615
  }
18561
18616
  }, []);
18562
18617
  const handleMouseLeave = React.useCallback(() => {
18563
- if (swiperRef.current && swiperRef.current.swiper && isAlly) {
18564
- swiperRef.current.swiper.autoplay.start();
18618
+ if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
18619
+ imgsSwiperRef.current.swiper.autoplay.start();
18565
18620
  }
18566
18621
  }, []);
18567
18622
  const handleSlideChange = React.useCallback((swiper) => {
@@ -18582,7 +18637,7 @@ Made in Italy` })));
18582
18637
  enabled: true
18583
18638
  }
18584
18639
  }
18585
- : {}), { loop: true, ref: swiperRef, onSlideChange: handleSlideChange, className: css.css(Object.assign(Object.assign({ '.swiper-pagination': {
18640
+ : {}), { loop: true, ref: imgsSwiperRef, onSlideChange: handleSlideChange, className: css.css(Object.assign(Object.assign({ '.swiper-pagination': {
18586
18641
  bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0,
18587
18642
  fontSize: '14px'
18588
18643
  } }, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor) && {
@@ -18599,7 +18654,7 @@ Made in Italy` })));
18599
18654
  return (React.createElement(SwiperSlide, { key: srcKey, "aria-hidden": srcKey !== swiperActiveIndex },
18600
18655
  React.createElement(Picture, { src: !isLoad && srcKey > 0 ? '' : url, height: height, imgUrlsPostConfig: imgUrlsPostConfig, onShowFirstImage: showFirstImageFn })));
18601
18656
  }))));
18602
- };
18657
+ });
18603
18658
  var PictureGroup$5 = React.memo(PictureGroup$4);
18604
18659
 
18605
18660
  /*
@@ -18879,7 +18934,7 @@ Made in Italy` })));
18879
18934
  * @Author: binruan@chatlabs.com
18880
18935
  * @Date: 2024-03-20 10:27:31
18881
18936
  * @LastEditors: binruan@chatlabs.com
18882
- * @LastEditTime: 2025-05-09 15:51:40
18937
+ * @LastEditTime: 2025-05-12 14:26:15
18883
18938
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
18884
18939
  *
18885
18940
  */
@@ -18899,6 +18954,7 @@ Made in Italy` })));
18899
18954
  const skipLinkRef = React.useRef(false);
18900
18955
  const [pageNum, setPageNum] = React.useState(2);
18901
18956
  const videoWidgetRef = React.useRef(null);
18957
+ const pictureGroupRef = React.useRef(null);
18902
18958
  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 } = useSxpDataSource();
18903
18959
  const { backMainFeed, productView, jumpToWeb } = useEventReport();
18904
18960
  const isShowFingerTip = React.useMemo(() => {
@@ -18946,7 +19002,7 @@ Made in Italy` })));
18946
19002
  (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
18947
19003
  }, [data, ctaType, swiperRef]);
18948
19004
  const handleSessionCompleted = React.useCallback((fk) => {
18949
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
19005
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
18950
19006
  const item = data === null || data === void 0 ? void 0 : data[activeIndex];
18951
19007
  let fromKName = '';
18952
19008
  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))) {
@@ -18973,12 +19029,13 @@ Made in Italy` })));
18973
19029
  eventSubject: 'sessionCompleted',
18974
19030
  eventDescription: 'Session completed',
18975
19031
  contentId: (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.itemId,
18976
- productId: (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.itemId,
19032
+ 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 : '',
19033
+ productId: (_r = item === null || item === void 0 ? void 0 : item.product) === null || _r === void 0 ? void 0 : _r.itemId,
18977
19034
  position: activeIndex + '',
18978
19035
  fromKName: fk || fromKName,
18979
19036
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
18980
- 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 : '',
18981
- 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 : ''
19037
+ 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 : '',
19038
+ 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 : ''
18982
19039
  }
18983
19040
  });
18984
19041
  }, [data, bffEventReport, activeIndex, popupDetailData, tempMap, isFromHashtag, curTime]);
@@ -19037,8 +19094,9 @@ Made in Italy` })));
19037
19094
  refreshFeSession
19038
19095
  ]);
19039
19096
  const handleSessionExpire = React.useCallback(lodash.debounce(() => {
19040
- var _a;
19097
+ var _a, _b;
19041
19098
  (_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
19099
+ (_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
19042
19100
  refreshFeSession === null || refreshFeSession === void 0 ? void 0 : refreshFeSession(false, handleSessionCompleted);
19043
19101
  }, 1000), [handleSessionCompleted, refreshFeSession]);
19044
19102
  React.useEffect(() => {
@@ -19108,18 +19166,18 @@ Made in Italy` })));
19108
19166
  return null;
19109
19167
  }, [globalConfig, activeIndex, visList]);
19110
19168
  const renderContent = React.useCallback((rec, index) => {
19111
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
19169
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
19112
19170
  if (rec === 'organic menu') {
19113
19171
  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)));
19114
19172
  }
19115
- if ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.url) {
19173
+ 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)) {
19116
19174
  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 })));
19117
19175
  }
19118
- if ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.imgUrls) {
19119
- 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 }));
19176
+ if ((_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.imgUrls) {
19177
+ 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 })));
19120
19178
  }
19121
- 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) {
19122
- return (_k = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _k === void 0 ? void 0 : _k.map((value, idx) => {
19179
+ 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) {
19180
+ return (_m = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _m === void 0 ? void 0 : _m.map((value, idx) => {
19123
19181
  var _a, _b, _c, _d, _e, _f, _g, _h;
19124
19182
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
19125
19183
  const Component = withBindDataSource(t);
@@ -19157,7 +19215,7 @@ Made in Italy` })));
19157
19215
  };
19158
19216
  }, [isShowMore]);
19159
19217
  const renderBottom = React.useCallback((rec, index) => {
19160
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
19218
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
19161
19219
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
19162
19220
  let cta = null;
19163
19221
  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) {
@@ -19166,24 +19224,27 @@ Made in Italy` })));
19166
19224
  else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
19167
19225
  cta = '商品CTA';
19168
19226
  }
19227
+ 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)) {
19228
+ cta = '服务CTA';
19229
+ }
19169
19230
  else {
19170
- 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;
19231
+ 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;
19171
19232
  }
19172
19233
  const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
19173
19234
  const isNineProduct = (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.nineProductEnable) &&
19174
19235
  index === ((rtcList === null || rtcList === void 0 ? void 0 : rtcList[0]) === 'organic menu' ? 2 : 1) &&
19175
- ((_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));
19236
+ ((_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));
19176
19237
  return (React.createElement(React.Fragment, null,
19177
19238
  isNineProduct && (React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, value: value, isNineProduct: isNineProduct })),
19178
- ((_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' }),
19179
- 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` } },
19239
+ ((_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' }),
19240
+ 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` } },
19180
19241
  React.createElement(Nudge, { nudge: nudge }),
19181
19242
  ((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' },
19182
19243
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, value: value }))) : null,
19183
19244
  React.createElement("div", null,
19184
- 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 }),
19245
+ 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 }),
19185
19246
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex, value: value }),
19186
- 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) }))),
19247
+ 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) }))),
19187
19248
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex, value: value })));
19188
19249
  }
19189
19250
  return null;
@@ -19222,7 +19283,7 @@ Made in Italy` })));
19222
19283
  return null;
19223
19284
  }, [globalConfig, waterFallData]);
19224
19285
  const handleViewImageStartEnd = (item) => {
19225
- var _a, _b, _c, _d, _e, _f;
19286
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
19226
19287
  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)) {
19227
19288
  const endTime = Date.now();
19228
19289
  const duration = viewImageStartTime.current === 0 ? 0 : (endTime - viewImageStartTime.current) / 1000;
@@ -19231,10 +19292,11 @@ Made in Italy` })));
19231
19292
  eventSubject: 'viewImageCarouselEnd',
19232
19293
  eventDescription: 'User end view the image carousel',
19233
19294
  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 : '',
19234
- contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
19295
+ 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 : '',
19296
+ contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
19235
19297
  imageEndTime: `${endTime}`,
19236
19298
  playDuration: `${duration}`,
19237
- contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
19299
+ contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
19238
19300
  position: activeIndex + '',
19239
19301
  contentFormat: 'image',
19240
19302
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo
@@ -19243,7 +19305,7 @@ Made in Italy` })));
19243
19305
  }
19244
19306
  };
19245
19307
  const handleSlideSkip = (item, position) => {
19246
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
19308
+ 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;
19247
19309
  if (isPreview || waterFallData)
19248
19310
  return;
19249
19311
  const t = new Date() - curTime.current;
@@ -19269,7 +19331,8 @@ Made in Italy` })));
19269
19331
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
19270
19332
  position: position + '',
19271
19333
  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 : '',
19272
- 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 : '',
19334
+ 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 : '',
19335
+ 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 : '',
19273
19336
  contentFormat
19274
19337
  }
19275
19338
  });
@@ -19279,7 +19342,7 @@ Made in Italy` })));
19279
19342
  }
19280
19343
  };
19281
19344
  const handleScrollEvent = (swiper) => {
19282
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
19345
+ 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;
19283
19346
  const item = data[swiper.previousIndex];
19284
19347
  if (!item)
19285
19348
  return;
@@ -19296,11 +19359,12 @@ Made in Italy` })));
19296
19359
  eventSubject: 'scrollDown',
19297
19360
  eventDescription: 'User scroll down',
19298
19361
  contentId: (_e = (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.itemId) !== null && _e !== void 0 ? _e : '',
19299
- productId: (_g = (_f = item === null || item === void 0 ? void 0 : item.product) === null || _f === void 0 ? void 0 : _f.itemId) !== null && _g !== void 0 ? _g : '',
19362
+ sceneId: (_h = (_g = (_f = item === null || item === void 0 ? void 0 : item.video) === null || _f === void 0 ? void 0 : _f.scene) === null || _g === void 0 ? void 0 : _g.sceneId) !== null && _h !== void 0 ? _h : '',
19363
+ productId: (_k = (_j = item === null || item === void 0 ? void 0 : item.product) === null || _j === void 0 ? void 0 : _j.itemId) !== null && _k !== void 0 ? _k : '',
19300
19364
  requestId: null,
19301
- traceInfo: (_l = (_j = (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.traceInfo) !== null && _j !== void 0 ? _j : (_k = item === null || item === void 0 ? void 0 : item.product) === null || _k === void 0 ? void 0 : _k.traceInfo) !== null && _l !== void 0 ? _l : '',
19365
+ traceInfo: (_p = (_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.traceInfo) !== null && _m !== void 0 ? _m : (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.traceInfo) !== null && _p !== void 0 ? _p : '',
19302
19366
  contentFormat,
19303
- position: ((_m = swiper.previousIndex) !== null && _m !== void 0 ? _m : 0) + ''
19367
+ position: ((_q = swiper.previousIndex) !== null && _q !== void 0 ? _q : 0) + ''
19304
19368
  }
19305
19369
  });
19306
19370
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -19312,12 +19376,13 @@ Made in Italy` })));
19312
19376
  eventInfo: {
19313
19377
  eventSubject: 'scrollUp',
19314
19378
  eventDescription: 'User scroll up',
19315
- contentId: (_p = (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.itemId) !== null && _p !== void 0 ? _p : '',
19316
- productId: (_r = (_q = item.product) === null || _q === void 0 ? void 0 : _q.itemId) !== null && _r !== void 0 ? _r : '',
19379
+ contentId: (_s = (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.itemId) !== null && _s !== void 0 ? _s : '',
19380
+ sceneId: (_v = (_u = (_t = item === null || item === void 0 ? void 0 : item.video) === null || _t === void 0 ? void 0 : _t.scene) === null || _u === void 0 ? void 0 : _u.sceneId) !== null && _v !== void 0 ? _v : '',
19381
+ productId: (_x = (_w = item.product) === null || _w === void 0 ? void 0 : _w.itemId) !== null && _x !== void 0 ? _x : '',
19317
19382
  requestId: null,
19318
- 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 : '',
19383
+ traceInfo: (_1 = (_z = (_y = item === null || item === void 0 ? void 0 : item.video) === null || _y === void 0 ? void 0 : _y.traceInfo) !== null && _z !== void 0 ? _z : (_0 = item === null || item === void 0 ? void 0 : item.product) === null || _0 === void 0 ? void 0 : _0.traceInfo) !== null && _1 !== void 0 ? _1 : '',
19319
19384
  contentFormat,
19320
- position: ((_w = swiper.previousIndex) !== null && _w !== void 0 ? _w : 0) + ''
19385
+ position: ((_2 = swiper.previousIndex) !== null && _2 !== void 0 ? _2 : 0) + ''
19321
19386
  }
19322
19387
  });
19323
19388
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -19343,7 +19408,7 @@ Made in Italy` })));
19343
19408
  }
19344
19409
  }, [openHashtag, data, activeIndex]);
19345
19410
  const handleViewImageStartEvent = (activeIndex, imgInfo, enableCapi) => {
19346
- var _a, _b, _c, _d, _e, _f, _g, _h;
19411
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
19347
19412
  const item = data[activeIndex];
19348
19413
  // 如果是图片集则上报事件
19349
19414
  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)) {
@@ -19354,9 +19419,10 @@ Made in Italy` })));
19354
19419
  eventSubject: 'viewImageCarouselStart',
19355
19420
  eventDescription: 'User start view the image carousel',
19356
19421
  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 : '',
19357
- contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
19422
+ 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 : '',
19423
+ contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
19358
19424
  imageStartTime: `${startTime}`,
19359
- contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
19425
+ contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
19360
19426
  position: activeIndex + '',
19361
19427
  contentFormat: 'image',
19362
19428
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo,
@@ -19366,11 +19432,11 @@ Made in Italy` })));
19366
19432
  if (enableCapi) {
19367
19433
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19368
19434
  eventName: 'ViewContent',
19369
- product: (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.bindProduct
19435
+ product: (_k = item === null || item === void 0 ? void 0 : item.video) === null || _k === void 0 ? void 0 : _k.bindProduct
19370
19436
  });
19371
19437
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19372
19438
  eventName: 'PageView',
19373
- product: (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.bindProduct
19439
+ product: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.bindProduct
19374
19440
  });
19375
19441
  }
19376
19442
  }
@@ -19462,15 +19528,20 @@ Made in Italy` })));
19462
19528
  swiperRef.current.swiper.allowTouchMove = true;
19463
19529
  }, 500);
19464
19530
  }, onActiveIndexChange: (swiper) => {
19531
+ var _a, _b;
19465
19532
  setActiveIndex(swiper.activeIndex);
19466
19533
  if (openHashtag)
19467
19534
  return;
19468
19535
  // 处理上滑下滑事件
19469
19536
  handleScrollEvent(swiper);
19470
- if (waterFallData || isEditor || isDiyH5)
19537
+ if (waterFallData || isEditor)
19471
19538
  return;
19472
19539
  if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
19473
19540
  if (!isLoadMore) {
19541
+ if (isDiyH5) {
19542
+ (_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
19543
+ (_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
19544
+ }
19474
19545
  setIsLoadMore(true);
19475
19546
  loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(pageNum).then((res) => {
19476
19547
  var _a;
@@ -19523,7 +19594,7 @@ Made in Italy` })));
19523
19594
  }, []);
19524
19595
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
19525
19596
  const handlePlaying = React.useCallback(() => {
19526
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
19597
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
19527
19598
  setIsPauseVideo(false);
19528
19599
  const item = data[index];
19529
19600
  if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration)) {
@@ -19536,14 +19607,15 @@ Made in Italy` })));
19536
19607
  eventSubject: 'playVideo',
19537
19608
  eventDescription: 'User played the video',
19538
19609
  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 : '',
19539
- 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 : '',
19610
+ 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 : '',
19611
+ 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 : '',
19540
19612
  playType,
19541
19613
  startTime: videoCurrentTime,
19542
19614
  videoDuration,
19543
- 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 : []),
19615
+ 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 : []),
19544
19616
  position: index + '',
19545
19617
  contentFormat: 'video',
19546
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
19618
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
19547
19619
  }
19548
19620
  });
19549
19621
  setIsFirstPlay(false);
@@ -19582,7 +19654,7 @@ Made in Italy` })));
19582
19654
  }
19583
19655
  }, [isLoadFinish]);
19584
19656
  const onPause = React.useCallback(() => {
19585
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
19657
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
19586
19658
  const item = data[index];
19587
19659
  const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
19588
19660
  const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
@@ -19593,14 +19665,15 @@ Made in Italy` })));
19593
19665
  eventSubject: 'playOverVideo',
19594
19666
  eventDescription: 'User finished playing the video',
19595
19667
  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 : '',
19596
- 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 : '',
19668
+ 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 : '',
19669
+ 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 : '',
19597
19670
  endTime: videoCurrentTime,
19598
19671
  videoDuration,
19599
19672
  playDuration,
19600
- 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 : []),
19673
+ 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 : []),
19601
19674
  position: index + '',
19602
19675
  contentFormat: 'video',
19603
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
19676
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
19604
19677
  }
19605
19678
  });
19606
19679
  }