pb-sxp-ui 1.0.33 → 1.0.35

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 (46) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +111 -111
  3. package/dist/index.cjs +449 -104
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.css +6 -1
  6. package/dist/index.js +448 -104
  7. package/dist/index.js.map +1 -1
  8. package/dist/index.min.cjs +3 -3
  9. package/dist/index.min.cjs.map +1 -1
  10. package/dist/index.min.js +3 -3
  11. package/dist/index.min.js.map +1 -1
  12. package/dist/pb-ui.js +452 -108
  13. package/dist/pb-ui.js.map +1 -1
  14. package/dist/pb-ui.min.js +3 -3
  15. package/dist/pb-ui.min.js.map +1 -1
  16. package/es/core/components/DiyPortalPreview/PictureGroup.d.ts +13 -0
  17. package/es/core/components/DiyPortalPreview/PictureGroup.js +11 -0
  18. package/es/core/components/DiyPortalPreview/VideoWidget.d.ts +15 -0
  19. package/es/core/components/DiyPortalPreview/VideoWidget.js +236 -0
  20. package/es/core/components/DiyPortalPreview/index.d.ts +6 -0
  21. package/es/core/components/DiyPortalPreview/index.js +112 -0
  22. package/es/core/components/SxpPageRender/VideoWidget/index.js +55 -56
  23. package/es/core/components/SxpPageRender/WaterFall/index.js +1 -1
  24. package/es/core/components/SxpPageRender/index.js +7 -7
  25. package/es/core/context/SxpDataSourceProvider.js +1 -1
  26. package/es/core/hooks/useEventReport.js +4 -4
  27. package/es/index.d.ts +1 -0
  28. package/es/index.js +1 -0
  29. package/es/materials/sxp/popup/CommodityDetail/index.js +10 -10
  30. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +10 -10
  31. package/lib/core/components/DiyPortalPreview/PictureGroup.d.ts +13 -0
  32. package/lib/core/components/DiyPortalPreview/PictureGroup.js +14 -0
  33. package/lib/core/components/DiyPortalPreview/VideoWidget.d.ts +15 -0
  34. package/lib/core/components/DiyPortalPreview/VideoWidget.js +239 -0
  35. package/lib/core/components/DiyPortalPreview/index.d.ts +6 -0
  36. package/lib/core/components/DiyPortalPreview/index.js +115 -0
  37. package/lib/core/components/SxpPageRender/VideoWidget/index.js +55 -56
  38. package/lib/core/components/SxpPageRender/WaterFall/index.js +1 -1
  39. package/lib/core/components/SxpPageRender/index.js +7 -7
  40. package/lib/core/context/SxpDataSourceProvider.js +1 -1
  41. package/lib/core/hooks/useEventReport.js +4 -4
  42. package/lib/index.d.ts +1 -0
  43. package/lib/index.js +3 -1
  44. package/lib/materials/sxp/popup/CommodityDetail/index.js +10 -10
  45. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +10 -10
  46. package/package.json +115 -114
package/dist/index.cjs CHANGED
@@ -10,6 +10,7 @@ var qs = require('qs');
10
10
  var css = require('@emotion/css');
11
11
  var proComponents = require('@ant-design/pro-components');
12
12
  var ReactDOM = require('react-dom');
13
+ var Hls = require('hls.js');
13
14
  var EventEmitter = require('eventemitter3');
14
15
 
15
16
  function _interopNamespaceDefault(e) {
@@ -577,7 +578,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
577
578
  fromKName = 'imagePage';
578
579
  }
579
580
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
580
- eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '', relatedContentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', relatedProductId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_m = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _m !== void 0 ? _m : '', fromKName })
581
+ eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '', contentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_m = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _m !== void 0 ? _m : '', fromKName })
581
582
  });
582
583
  }, [bffEventReport, isFromHashtag]);
583
584
  React.useEffect(() => {
@@ -864,7 +865,7 @@ const EditorCore = React.forwardRef(({ children, resolver, isSsr, schema, enable
864
865
  React.createElement(DataSourceProvider$1, { isSsr: isSsr, enable: enableDataSource }, children)));
865
866
  });
866
867
 
867
- var index$1 = /*#__PURE__*/Object.freeze({
868
+ var index$2 = /*#__PURE__*/Object.freeze({
868
869
  __proto__: null,
869
870
  EditorCore: EditorCore
870
871
  });
@@ -8150,8 +8151,8 @@ function useEventReport() {
8150
8151
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
8151
8152
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
8152
8153
  position: position + '',
8153
- relatedContentId: (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.itemId) !== null && _m !== void 0 ? _m : '',
8154
- relatedCtatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
8154
+ contentId: (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.itemId) !== null && _m !== void 0 ? _m : '',
8155
+ ctatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
8155
8156
  traceInfo: (_p = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _p !== void 0 ? _p : ''
8156
8157
  }
8157
8158
  });
@@ -8175,8 +8176,8 @@ function useEventReport() {
8175
8176
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
8176
8177
  contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
8177
8178
  position: position + '',
8178
- relatedContentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
8179
- relatedCtatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
8179
+ contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
8180
+ ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
8180
8181
  traceInfo: product === null || product === void 0 ? void 0 : product.traceInfo,
8181
8182
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
8182
8183
  eventSubject: 'productView',
@@ -8339,7 +8340,7 @@ const FormatImage = React.forwardRef((props, ref) => {
8339
8340
  var FormatImage$1 = React.memo(FormatImage);
8340
8341
 
8341
8342
  const CommodityDetail$1 = (_a) => {
8342
- var _b, _c, _d, _e, _f, _g, _h, _j;
8343
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k;
8343
8344
  var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle", "index"]);
8344
8345
  const { sxpParameter } = useSxpDataSource();
8345
8346
  const { popupDetailData, bffEventReport, isPreview, waterFallData } = useSxpDataSource();
@@ -8380,7 +8381,7 @@ const CommodityDetail$1 = (_a) => {
8380
8381
  return '$7,000';
8381
8382
  }
8382
8383
  }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8383
- const width = isPreview ? 375 : window.innerWidth;
8384
+ const width = isPreview ? 375 : (_f = style === null || style === void 0 ? void 0 : style.width) !== null && _f !== void 0 ? _f : window.innerWidth;
8384
8385
  const renderContent = ({ isPost }) => {
8385
8386
  var _a, _b, _c;
8386
8387
  return (React.createElement("div", null,
@@ -8388,10 +8389,10 @@ const CommodityDetail$1 = (_a) => {
8388
8389
  React.createElement("div", { className: 'pb-commondity-content-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.title) }, (_b = product === null || product === void 0 ? void 0 : product.title) !== null && _b !== void 0 ? _b : 'Pendant in Yellow Gold with Diamonds, Medium'),
8389
8390
  React.createElement("div", { className: 'pb-commondity-content-price', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price) }, priceText),
8390
8391
  React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
8391
- React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
8392
- bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
8393
- collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
8394
- necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
8392
+ React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
8393
+ bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
8394
+ collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
8395
+ necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
8395
8396
  18-karat gold, this necklace is embellished with hand-set diamonds.`, maxStr: 79, className: 'pb-commondity-content-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info }))));
8396
8397
  };
8397
8398
  const renderBtn = () => {
@@ -8400,7 +8401,7 @@ const CommodityDetail$1 = (_a) => {
8400
8401
  };
8401
8402
  return (React.createElement("div", { className: 'pb-commondity' },
8402
8403
  React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
8403
- product && ((_f = product === null || product === void 0 ? void 0 : product.homePage) === null || _f === void 0 ? void 0 : _f.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
8404
+ product && ((_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
8404
8405
  clickable: true,
8405
8406
  bulletActiveClass: 'swipe-item-active-bullet',
8406
8407
  clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
@@ -8408,7 +8409,7 @@ const CommodityDetail$1 = (_a) => {
8408
8409
  : 'commondityDetail-swiper-clickable-center'
8409
8410
  }, loop: true, autoplay: {
8410
8411
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
8411
- } }, (_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.map((src) => {
8412
+ } }, (_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.map((src) => {
8412
8413
  return (React.createElement(SwiperSlide, { key: src },
8413
8414
  React.createElement("div", { style: {
8414
8415
  overflow: 'hidden',
@@ -8417,7 +8418,7 @@ const CommodityDetail$1 = (_a) => {
8417
8418
  } },
8418
8419
  React.createElement(FormatImage$1, { style: { height: '100%', width: '100%', objectFit: 'cover', display: 'block' }, src: src }))));
8419
8420
  }))),
8420
- !((_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.length) && (React.createElement("div", { className: css.css({
8421
+ !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css.css({
8421
8422
  position: 'relative',
8422
8423
  height: 0,
8423
8424
  width: '100%',
@@ -8430,7 +8431,7 @@ const CommodityDetail$1 = (_a) => {
8430
8431
  top: 0,
8431
8432
  objectFit: 'cover',
8432
8433
  width: '100%'
8433
- }), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
8434
+ }), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: '' }))),
8434
8435
  React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
8435
8436
  renderBtn(),
8436
8437
  React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) },
@@ -8790,7 +8791,7 @@ var settingRender$2 = [
8790
8791
  ];
8791
8792
 
8792
8793
  const CommodityDetailDiroNew$1 = (_a) => {
8793
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
8794
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
8794
8795
  var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index"]);
8795
8796
  React.useState(true);
8796
8797
  const { sxpParameter } = useSxpDataSource();
@@ -8838,16 +8839,16 @@ const CommodityDetailDiroNew$1 = (_a) => {
8838
8839
  return '£102,300.00';
8839
8840
  }
8840
8841
  }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8841
- const width = isPreview ? 375 : window.innerWidth;
8842
+ const width = isPreview ? 375 : (_f = style === null || style === void 0 ? void 0 : style.width) !== null && _f !== void 0 ? _f : window.innerWidth;
8842
8843
  const productInfoText = ({ isPost }) => {
8843
8844
  return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
8844
8845
  React.createElement(ExpandableText$1, { isPost: isPost, onClick: () => setShowModal(true), className: 'pb-commondityDiroNew-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (product === null || product === void 0 ? void 0 : product.info) ||
8845
- `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
8846
+ `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
8846
8847
  Made in Italy` })));
8847
8848
  };
8848
8849
  return (React.createElement("div", { className: 'pb-commondityDiroNew' },
8849
8850
  React.createElement("div", Object.assign({ ref: scrollRef, className: css.css(Object.assign({}, style)) }, props),
8850
- product && ((_f = product === null || product === void 0 ? void 0 : product.homePage) === null || _f === void 0 ? void 0 : _f.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
8851
+ product && ((_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
8851
8852
  clickable: true,
8852
8853
  bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
8853
8854
  clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
@@ -8855,7 +8856,7 @@ Made in Italy` })));
8855
8856
  : 'commondityDiroNew-swiper-clickable-center'
8856
8857
  }, loop: true, autoplay: {
8857
8858
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
8858
- } }, (_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.map((src) => {
8859
+ } }, (_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.map((src) => {
8859
8860
  return (React.createElement(SwiperSlide, { key: src },
8860
8861
  React.createElement("div", { style: {
8861
8862
  overflow: 'hidden',
@@ -8864,7 +8865,7 @@ Made in Italy` })));
8864
8865
  } },
8865
8866
  React.createElement(FormatImage$1, { style: { height: '100%', width: '100%', objectFit: 'cover', display: 'block' }, src: src }))));
8866
8867
  }))),
8867
- !((_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.length) && (React.createElement("div", { className: css.css({
8868
+ !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css.css({
8868
8869
  position: 'relative',
8869
8870
  height: 0,
8870
8871
  width: '100%',
@@ -8877,16 +8878,16 @@ Made in Italy` })));
8877
8878
  top: 0,
8878
8879
  objectFit: 'cover',
8879
8880
  width: '100%'
8880
- }), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
8881
+ }), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: '' }))),
8881
8882
  React.createElement("div", { className: 'pb-commondityDiroNew-content' },
8882
8883
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
8883
8884
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
8884
- React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title }, (_k = product === null || product === void 0 ? void 0 : product.title) !== null && _k !== void 0 ? _k : 'Large Dior Toujours Bag'),
8885
+ React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title }, (_l = product === null || product === void 0 ? void 0 : product.title) !== null && _l !== void 0 ? _l : 'Large Dior Toujours Bag'),
8885
8886
  React.createElement("div", { className: 'pb-commondityDiroNew-content-collection', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === ''), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection }, (product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage Calfskin')),
8886
8887
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right' },
8887
8888
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price }, priceText),
8888
- React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo }, (_l = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _l !== void 0 ? _l : '税费'))),
8889
- (!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle }, (_m = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _m !== void 0 ? _m : 'Shop now')),
8889
+ React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo }, (_m = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _m !== void 0 ? _m : '税费'))),
8890
+ (!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle }, (_o = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _o !== void 0 ? _o : 'Shop now')),
8890
8891
  productInfoText({ isPost }))),
8891
8892
  React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false }))));
8892
8893
  };
@@ -11794,7 +11795,7 @@ const WaterFall = (props) => {
11794
11795
  }
11795
11796
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
11796
11797
  eventInfo: {
11797
- relatedContentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
11798
+ contentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
11798
11799
  position: cacheActiveIndex + '',
11799
11800
  contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
11800
11801
  traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
@@ -11927,14 +11928,14 @@ var _materials_ = /*#__PURE__*/Object.freeze({
11927
11928
  Prompt: Prompt
11928
11929
  });
11929
11930
 
11930
- const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
11931
- const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
11931
+ const defaultUnLikeIconPath$1 = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
11932
+ const defaultLikeIconPath$1 = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
11932
11933
  const LikeButton = (_a) => {
11933
11934
  var { active, activeIcon, unActicveIcon, recData, position } = _a, props = __rest(_a, ["active", "activeIcon", "unActicveIcon", "recData", "position"]);
11934
11935
  const { mutateLike, mutateUnlike, bffEventReport } = useSxpDataSource();
11935
11936
  const [state, setState] = React.useState(active);
11936
- const likeIcon = useIconLink(defaultLikeIconPath);
11937
- const unlikeIcon = useIconLink(defaultUnLikeIconPath);
11937
+ const likeIcon = useIconLink(defaultLikeIconPath$1);
11938
+ const unlikeIcon = useIconLink(defaultUnLikeIconPath$1);
11938
11939
  const handleClick = lodash.debounce(() => __awaiter(void 0, void 0, void 0, function* () {
11939
11940
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
11940
11941
  if (state) {
@@ -11990,7 +11991,7 @@ var SXP_EVENT_TYPE;
11990
11991
  SXP_EVENT_TYPE["PAGE_DID_HIDE"] = "pageDidHide";
11991
11992
  })(SXP_EVENT_TYPE || (SXP_EVENT_TYPE = {}));
11992
11993
 
11993
- const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostConfig }) => {
11994
+ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPostConfig }) => {
11994
11995
  const [isPauseVideo, setIsPauseVideo] = React.useState(false);
11995
11996
  const videoRef = React.useRef(null);
11996
11997
  const { bffEventReport, sxpParameter, waterFallData, openHashtag } = useSxpDataSource();
@@ -12000,13 +12001,12 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
12000
12001
  const { isActive } = useSwiperSlide();
12001
12002
  const canvasRef = React.useRef(null);
12002
12003
  const [firstFrameSrc, setFirstFrameSrc] = React.useState('');
12003
- const videoId = `pb-video-${index}`;
12004
12004
  React.useEffect(() => {
12005
12005
  if (!videoRef.current)
12006
12006
  return;
12007
- videoRef.current.muted(muted);
12007
+ videoRef.current.muted = muted;
12008
12008
  }, [muted]);
12009
- const handleEnded = React.useCallback(() => {
12009
+ const handleVideoStart = React.useCallback(() => {
12010
12010
  var _a;
12011
12011
  (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
12012
12012
  }, []);
@@ -12015,10 +12015,10 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
12015
12015
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
12016
12016
  setIsPauseVideo(false);
12017
12017
  const item = data[index];
12018
- if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration())) {
12019
- videoStartTime.current = ((_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.currentTime()) || 0;
12020
- const videoDuration = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.duration()) !== null && _d !== void 0 ? _d : 0).toFixed(2);
12021
- const videoCurrentTime = ((_f = (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.currentTime()) !== null && _f !== void 0 ? _f : 0).toFixed(2);
12018
+ if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration)) {
12019
+ videoStartTime.current = ((_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.currentTime) || 0;
12020
+ const videoDuration = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.duration) !== null && _d !== void 0 ? _d : 0).toFixed(2);
12021
+ const videoCurrentTime = ((_f = (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.currentTime) !== null && _f !== void 0 ? _f : 0).toFixed(2);
12022
12022
  const playType = isFirstPlay ? '0' : '1';
12023
12023
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
12024
12024
  eventInfo: {
@@ -12038,14 +12038,14 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
12038
12038
  setIsFirstPlay(false);
12039
12039
  }
12040
12040
  }, [bffEventReport, data, index, isFirstPlay]);
12041
- const handleCanplay = React.useCallback(() => {
12041
+ const handleLoadedMetadata = React.useCallback(() => {
12042
12042
  setIsLoadFinish(true);
12043
12043
  }, []);
12044
12044
  const handleClickVideo = React.useCallback((type) => () => {
12045
12045
  var _a, _b, _c, _d, _e;
12046
12046
  if (!isLoadFinish)
12047
12047
  return;
12048
- const isPause = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.paused();
12048
+ const isPause = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
12049
12049
  switch (type) {
12050
12050
  case 'start':
12051
12051
  if (!isPause)
@@ -12070,13 +12070,13 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
12070
12070
  break;
12071
12071
  }
12072
12072
  }, [isLoadFinish]);
12073
- const handlePause = React.useCallback(() => {
12073
+ const onPause = React.useCallback(() => {
12074
12074
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
12075
12075
  const item = data[index];
12076
- const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration()) !== null && _b !== void 0 ? _b : 0).toFixed(2);
12077
- const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime()) !== null && _d !== void 0 ? _d : 0).toFixed(2);
12078
- if ((_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.duration()) {
12079
- const playDuration = (((_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.currentTime()) - videoStartTime.current).toFixed(2);
12076
+ const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
12077
+ const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
12078
+ if ((_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.duration) {
12079
+ const playDuration = (((_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.currentTime) - videoStartTime.current).toFixed(2);
12080
12080
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
12081
12081
  eventInfo: {
12082
12082
  eventSubject: 'playOverVideo',
@@ -12108,10 +12108,9 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
12108
12108
  return ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || firstFrameSrc;
12109
12109
  }, [firstFrameSrc, rec]);
12110
12110
  const handLoadeddata = React.useCallback(() => {
12111
- const videoDomRef = document.getElementById(`${videoId}_html5_api`);
12112
- if (!canvasRef || !videoDomRef || !canvasRef.current)
12111
+ if (!canvasRef || !videoRef || !videoRef.current || !canvasRef.current)
12113
12112
  return;
12114
- const video = videoDomRef;
12113
+ const video = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current;
12115
12114
  const canvas = canvasRef === null || canvasRef === void 0 ? void 0 : canvasRef.current;
12116
12115
  const ctx = canvas.getContext('2d');
12117
12116
  const targetWidth = window === null || window === void 0 ? void 0 : window.innerWidth;
@@ -12122,35 +12121,43 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
12122
12121
  setFirstFrameSrc(canvas.toDataURL());
12123
12122
  }, []);
12124
12123
  React.useEffect(() => {
12125
- var _a, _b, _c, _d, _e, _f;
12126
- if (videoRef.current)
12124
+ var _a, _b, _c, _d;
12125
+ if (!videoRef.current)
12127
12126
  return;
12128
12127
  setIsPauseVideo(false);
12129
- const videoSrc = rec.video.url;
12130
- if (videoSrc && typeof TCPlayer === 'function') {
12131
- videoRef.current = TCPlayer(videoId, {
12132
- sources: [
12133
- {
12134
- src: videoSrc // 播放地址
12135
- }
12136
- ],
12137
- licenseUrl: 'https://license.vod2.myqcloud.com/license/v2/1325816236_1/v_cube.license', // license 地址,参考准备工作部分,在视立方控制台申请 license 后可获得 licenseUrl
12138
- controls: false,
12139
- autoplay: false,
12140
- loop: false,
12141
- muted: true,
12142
- preload: 'meta',
12143
- posterImage: false,
12144
- bigPlayButton: true
12145
- });
12128
+ if (!videoRef.current.src) {
12129
+ const videoSrc = rec.video.url;
12130
+ if (videoSrc.includes('.m3u8')) {
12131
+ if (Hls.isSupported()) {
12132
+ const hls = new Hls();
12133
+ hls.loadSource(videoSrc);
12134
+ hls.attachMedia(videoRef.current);
12135
+ }
12136
+ else if (videoRef.current.canPlayType('application/vnd.apple.mpegurl')) {
12137
+ videoRef.current.src = videoSrc;
12138
+ }
12139
+ else {
12140
+ videoRef.current.src = videoSrc;
12141
+ }
12142
+ }
12143
+ else {
12144
+ videoRef.current.src = videoSrc;
12145
+ }
12146
+ videoRef.current.setAttribute('x5-playsinline', 'true');
12147
+ videoRef.current.setAttribute('webkit-playsinline', 'true');
12146
12148
  }
12147
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.on('loadedmetadata', handleCanplay);
12148
- (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.on('canplay', handleCanplay);
12149
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.on('playing', handlePlaying);
12150
- (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.on('loadeddata', handLoadeddata);
12151
- (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.on('pause', handlePause);
12152
- (_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.on('ended', handleEnded);
12153
- }, [handleCanplay, handlePlaying, rec.video, handLoadeddata, index, handlePause, handleEnded, videoId]);
12149
+ (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('loadedmetadata', handleLoadedMetadata);
12150
+ (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.addEventListener('canplay', handleLoadedMetadata);
12151
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.addEventListener('playing', handlePlaying);
12152
+ (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.addEventListener('loadeddata', handLoadeddata);
12153
+ return () => {
12154
+ var _a, _b, _c, _d;
12155
+ (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('loadedmetadata', handleLoadedMetadata);
12156
+ (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('canplay', handleLoadedMetadata);
12157
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('playing', handlePlaying);
12158
+ (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('loadeddata', handLoadeddata);
12159
+ };
12160
+ }, [handleLoadedMetadata, handlePlaying, rec.video, handLoadeddata]);
12154
12161
  React.useEffect(() => {
12155
12162
  var _a;
12156
12163
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || !isLoadFinish)
@@ -12236,31 +12243,23 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
12236
12243
  right: 0
12237
12244
  } },
12238
12245
  React.createElement("div", { style: { position: 'relative', width: '100%', height: '100%' } },
12239
- React.createElement("video", { id: `pb-video-${index}`, playsInline: true, crossOrigin: 'anonymous', style: {
12246
+ React.createElement("video", { id: `pb-video-${index}`, className: 'clc-pb-video', ref: videoRef, crossOrigin: 'anonymous', muted: true, controls: false, playsInline: true, preload: 'auto', onPause: onPause, onEnded: handleVideoStart, style: {
12240
12247
  width: '100%',
12241
12248
  height: '100%',
12242
- objectFit: 'contain',
12243
- backgroundColor: 'transparent',
12244
- pointerEvents: 'none'
12249
+ objectFit: 'contain'
12245
12250
  } }),
12246
12251
  React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON }))),
12247
- renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec.video.itemId, style: {
12252
+ renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: {
12248
12253
  position: 'relative',
12249
12254
  width: '100%',
12250
12255
  height,
12251
12256
  overflow: 'hidden'
12252
- }, onClick: handleClickVideo() },
12253
- React.createElement("video", { id: `pb-video-${index}`, playsInline: true, crossOrigin: 'anonymous', style: {
12254
- backgroundColor: 'transparent',
12255
- width: '100%',
12256
- height: '100%',
12257
- objectFit: 'cover',
12258
- pointerEvents: 'none'
12259
- } }),
12257
+ } },
12258
+ React.createElement("video", { id: `pb-video-${index}`, className: 'clc-pb-video', ref: videoRef, crossOrigin: 'anonymous', muted: true, controls: false, playsInline: true, preload: 'auto', onPause: onPause, onEnded: handleVideoStart }),
12260
12259
  renderPoster,
12261
12260
  React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON })))));
12262
12261
  };
12263
- var VideoWidget$1 = React.memo(VideoWidget);
12262
+ var VideoWidget$3 = React.memo(VideoWidget$2);
12264
12263
 
12265
12264
  /*
12266
12265
  * @Author: binruan@chatlabs.com
@@ -12359,7 +12358,7 @@ const Picture = (props) => {
12359
12358
  * @LastEditTime: 2024-04-18 19:56:22
12360
12359
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\PictureGroup\index.tsx
12361
12360
  */
12362
- const PictureGroup = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent, imgUrlsPostConfig }) => {
12361
+ const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent, imgUrlsPostConfig }) => {
12363
12362
  var _a;
12364
12363
  const ref = React.useRef();
12365
12364
  const { isActive } = useSwiperSlide();
@@ -12388,7 +12387,7 @@ const PictureGroup = ({ imgUrls, width, height, rec, index, onReportViewImageEnd
12388
12387
  React.createElement(Picture, { src: url, height: height, imgUrlsPostConfig: imgUrlsPostConfig })));
12389
12388
  })));
12390
12389
  };
12391
- var PictureGroup$1 = React.memo(PictureGroup);
12390
+ var PictureGroup$3 = React.memo(PictureGroup$2);
12392
12391
 
12393
12392
  /*
12394
12393
  * @Author: binruan@chatlabs.com
@@ -12567,7 +12566,7 @@ const Nudge = ({ nudge }) => {
12567
12566
  * @Author: binruan@chatlabs.com
12568
12567
  * @Date: 2024-01-15 19:03:09
12569
12568
  * @LastEditors: binruan@chatlabs.com
12570
- * @LastEditTime: 2024-04-18 19:27:03
12569
+ * @LastEditTime: 2024-04-23 15:48:32
12571
12570
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12572
12571
  *
12573
12572
  */
@@ -12649,8 +12648,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12649
12648
  // sessionDuration: Math.floor(((new Date() as any) - curTime) / 1000) + '',
12650
12649
  // eventSubject: 'sessionCompleted',
12651
12650
  // eventDescription: 'Session completed',
12652
- // relatedContentId: item?.video?.itemId,
12653
- // relatedProductId: item?.product?.itemId,
12651
+ // contentId: item?.video?.itemId,
12652
+ // productId: item?.product?.itemId,
12654
12653
  // position: item?.position
12655
12654
  // }
12656
12655
  // });
@@ -12694,12 +12693,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12694
12693
  sessionDuration: Math.floor((new Date() - curTime.current) / 1000) + '',
12695
12694
  eventSubject: 'sessionCompleted',
12696
12695
  eventDescription: 'Session completed',
12697
- relatedContentId: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.itemId,
12698
- relatedProductId: (_m = item === null || item === void 0 ? void 0 : item.product) === null || _m === void 0 ? void 0 : _m.itemId,
12696
+ contentId: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.itemId,
12697
+ productId: (_m = item === null || item === void 0 ? void 0 : item.product) === null || _m === void 0 ? void 0 : _m.itemId,
12699
12698
  position: activeIndex + '',
12700
12699
  fromKName,
12701
12700
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
12702
- relatedCtatId: (_q = (_p = (_o = item.video) === null || _o === void 0 ? void 0 : _o.bindCta) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : ''
12701
+ ctatId: (_q = (_p = (_o = item.video) === null || _o === void 0 ? void 0 : _o.bindCta) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : ''
12703
12702
  }
12704
12703
  });
12705
12704
  }
@@ -12728,10 +12727,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12728
12727
  const renderContent = React.useCallback((rec, index) => {
12729
12728
  var _a, _b, _c, _d;
12730
12729
  if ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.url) {
12731
- return (React.createElement(VideoWidget$1, { rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost }));
12730
+ return (React.createElement(VideoWidget$3, { rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost }));
12732
12731
  }
12733
12732
  if ((_b = rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
12734
- return (React.createElement(PictureGroup$1, { key: rec.video.itemId, imgUrls: rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onReportViewImageEnd: handleReportViewImageEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
12733
+ return (React.createElement(PictureGroup$3, { key: rec.video.itemId, imgUrls: rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onReportViewImageEnd: handleReportViewImageEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
12735
12734
  }
12736
12735
  if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _c === void 0 ? void 0 : _c.length) > 0) {
12737
12736
  return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, idx) => {
@@ -12833,8 +12832,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12833
12832
  eventInfo: {
12834
12833
  eventSubject: 'scrollDown',
12835
12834
  eventDescription: 'User scroll down',
12836
- relatedContentId: (_b = (_a = item.video) === null || _a === void 0 ? void 0 : _a.itemId) !== null && _b !== void 0 ? _b : '',
12837
- relatedProductId: (_d = (_c = item.product) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
12835
+ contentId: (_b = (_a = item.video) === null || _a === void 0 ? void 0 : _a.itemId) !== null && _b !== void 0 ? _b : '',
12836
+ productId: (_d = (_c = item.product) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
12838
12837
  requestId: null
12839
12838
  }
12840
12839
  });
@@ -12846,8 +12845,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12846
12845
  eventInfo: {
12847
12846
  eventSubject: 'scrollUp',
12848
12847
  eventDescription: 'User scroll up',
12849
- relatedContentId: (_f = (_e = item.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
12850
- relatedProductId: (_h = (_g = item.product) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
12848
+ contentId: (_f = (_e = item.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
12849
+ productId: (_h = (_g = item.product) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
12851
12850
  requestId: null
12852
12851
  }
12853
12852
  });
@@ -12970,6 +12969,351 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12970
12969
  React.createElement(WaterFall$1, Object.assign({}, (_g = (_f = (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.item) === null || _g === void 0 ? void 0 : _g.props))));
12971
12970
  };
12972
12971
 
12972
+ const PictureGroup = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index }) => {
12973
+ return (React.createElement(Swiper, { defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: { clickable: true, bulletActiveClass: 'swipe-item-active-bullet' }, height: height, style: { width }, loop: true, autoplay: false }, imgUrls === null || imgUrls === void 0 ? void 0 : imgUrls.map((url) => {
12974
+ return (React.createElement(SwiperSlide, { key: url },
12975
+ React.createElement(Picture, { src: url, height: height, imgUrlsPostConfig: imgUrlsPostConfig })));
12976
+ })));
12977
+ };
12978
+ var PictureGroup$1 = React.memo(PictureGroup);
12979
+
12980
+ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostConfig, width }) => {
12981
+ const [isPauseVideo, setIsPauseVideo] = React.useState(false);
12982
+ const videoRef = React.useRef(null);
12983
+ const { bffEventReport, sxpParameter, waterFallData, openHashtag } = useSxpDataSource();
12984
+ const videoStartTime = React.useRef(0);
12985
+ const [isLoadFinish, setIsLoadFinish] = React.useState(false);
12986
+ const [isFirstPlay, setIsFirstPlay] = React.useState(true);
12987
+ const canvasRef = React.useRef(null);
12988
+ const [firstFrameSrc, setFirstFrameSrc] = React.useState('');
12989
+ React.useEffect(() => {
12990
+ if (!videoRef.current)
12991
+ return;
12992
+ videoRef.current.muted = muted;
12993
+ }, [muted]);
12994
+ const handleVideoStart = React.useCallback(() => {
12995
+ var _a;
12996
+ (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
12997
+ }, []);
12998
+ const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
12999
+ const handlePlaying = React.useCallback(() => {
13000
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
13001
+ setIsPauseVideo(false);
13002
+ const item = data[index];
13003
+ if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration)) {
13004
+ videoStartTime.current = ((_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.currentTime) || 0;
13005
+ const videoDuration = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.duration) !== null && _d !== void 0 ? _d : 0).toFixed(2);
13006
+ const videoCurrentTime = ((_f = (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.currentTime) !== null && _f !== void 0 ? _f : 0).toFixed(2);
13007
+ const playType = isFirstPlay ? '0' : '1';
13008
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
13009
+ eventInfo: {
13010
+ eventSubject: 'playVideo',
13011
+ eventDescription: 'User played the video',
13012
+ contentId: (_h = (_g = item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
13013
+ contentName: (_k = (_j = item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
13014
+ playType,
13015
+ startTime: videoCurrentTime,
13016
+ videoDuration,
13017
+ contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
13018
+ position: index + '',
13019
+ contentFormat: 'video',
13020
+ traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
13021
+ }
13022
+ });
13023
+ setIsFirstPlay(false);
13024
+ }
13025
+ }, [bffEventReport, data, index, isFirstPlay]);
13026
+ const handleLoadedMetadata = React.useCallback(() => {
13027
+ setIsLoadFinish(true);
13028
+ }, []);
13029
+ const handleClickVideo = React.useCallback((type) => () => {
13030
+ var _a, _b, _c, _d, _e;
13031
+ if (!isLoadFinish)
13032
+ return;
13033
+ const isPause = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
13034
+ switch (type) {
13035
+ case 'start':
13036
+ if (!isPause)
13037
+ return;
13038
+ (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.play();
13039
+ setIsPauseVideo(false);
13040
+ break;
13041
+ case 'pause':
13042
+ if (isPause)
13043
+ return;
13044
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
13045
+ setIsPauseVideo(true);
13046
+ break;
13047
+ default:
13048
+ if (isPause) {
13049
+ (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.play();
13050
+ }
13051
+ else {
13052
+ (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.pause();
13053
+ }
13054
+ setIsPauseVideo(!isPause);
13055
+ break;
13056
+ }
13057
+ }, [isLoadFinish]);
13058
+ const onPause = React.useCallback(() => {
13059
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
13060
+ const item = data[index];
13061
+ const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
13062
+ const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
13063
+ if ((_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.duration) {
13064
+ const playDuration = (((_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.currentTime) - videoStartTime.current).toFixed(2);
13065
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
13066
+ eventInfo: {
13067
+ eventSubject: 'playOverVideo',
13068
+ eventDescription: 'User finished playing the video',
13069
+ contentId: (_h = (_g = item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
13070
+ contentName: (_k = (_j = item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
13071
+ endTime: videoCurrentTime,
13072
+ videoDuration,
13073
+ playDuration,
13074
+ contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
13075
+ position: index + '',
13076
+ contentFormat: 'video',
13077
+ traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
13078
+ }
13079
+ });
13080
+ }
13081
+ }, [data, index, bffEventReport]);
13082
+ const blur = React.useMemo(() => {
13083
+ return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2';
13084
+ }, [videoPostConfig]);
13085
+ const translateY = React.useMemo(() => {
13086
+ var _a;
13087
+ return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2'
13088
+ ? `translateY(-${50 + ((_a = videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.offsetTop) !== null && _a !== void 0 ? _a : 0)}%) translate3d(0px, 0px, 0px)`
13089
+ : 'translateY(-50%)';
13090
+ }, [videoPostConfig]);
13091
+ const blurBgSrc = React.useMemo(() => {
13092
+ var _a;
13093
+ return ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || firstFrameSrc;
13094
+ }, [firstFrameSrc, rec]);
13095
+ const handLoadeddata = React.useCallback(() => {
13096
+ if (!canvasRef || !videoRef || !videoRef.current || !canvasRef.current)
13097
+ return;
13098
+ const video = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current;
13099
+ const canvas = canvasRef === null || canvasRef === void 0 ? void 0 : canvasRef.current;
13100
+ const ctx = canvas.getContext('2d');
13101
+ const targetWidth = window === null || window === void 0 ? void 0 : window.innerWidth;
13102
+ const targetHeight = window === null || window === void 0 ? void 0 : window.innerHeight;
13103
+ canvas.height = targetHeight;
13104
+ canvas.width = targetWidth;
13105
+ ctx === null || ctx === void 0 ? void 0 : ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
13106
+ setFirstFrameSrc(canvas.toDataURL());
13107
+ }, []);
13108
+ React.useEffect(() => {
13109
+ var _a, _b, _c, _d;
13110
+ if (!videoRef.current)
13111
+ return;
13112
+ setIsPauseVideo(false);
13113
+ if (!videoRef.current.src) {
13114
+ const videoSrc = rec.video.url;
13115
+ if (videoSrc.includes('.m3u8')) {
13116
+ if (Hls.isSupported()) {
13117
+ const hls = new Hls();
13118
+ hls.loadSource(videoSrc);
13119
+ hls.attachMedia(videoRef.current);
13120
+ }
13121
+ else if (videoRef.current.canPlayType('application/vnd.apple.mpegurl')) {
13122
+ videoRef.current.src = videoSrc;
13123
+ }
13124
+ else {
13125
+ videoRef.current.src = videoSrc;
13126
+ }
13127
+ }
13128
+ else {
13129
+ videoRef.current.src = videoSrc;
13130
+ }
13131
+ videoRef.current.setAttribute('x5-playsinline', 'true');
13132
+ videoRef.current.setAttribute('webkit-playsinline', 'true');
13133
+ }
13134
+ (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('loadedmetadata', handleLoadedMetadata);
13135
+ (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.addEventListener('canplay', handleLoadedMetadata);
13136
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.addEventListener('playing', handlePlaying);
13137
+ (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.addEventListener('loadeddata', handLoadeddata);
13138
+ return () => {
13139
+ var _a, _b, _c, _d;
13140
+ (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('loadedmetadata', handleLoadedMetadata);
13141
+ (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('canplay', handleLoadedMetadata);
13142
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('playing', handlePlaying);
13143
+ (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('loadeddata', handLoadeddata);
13144
+ };
13145
+ }, [handleLoadedMetadata, handlePlaying, rec.video, handLoadeddata]);
13146
+ const renderPoster = React.useMemo(() => {
13147
+ if (!(sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image) || isLoadFinish) {
13148
+ return null;
13149
+ }
13150
+ return (React.createElement("img", { style: { position: 'absolute', left: 0, top: 0, width: '100%', height: '100%', objectFit: 'cover' }, src: sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image }));
13151
+ }, [isLoadFinish, sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image]);
13152
+ React.useEffect(() => {
13153
+ const handleBeforeUnload = () => {
13154
+ var _a, _b;
13155
+ if (activeIndex === index && ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) && ((_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.src) && !isPauseVideo) {
13156
+ handleClickVideo('pause')();
13157
+ }
13158
+ };
13159
+ window.addEventListener('beforeunload', handleBeforeUnload);
13160
+ return () => {
13161
+ window.removeEventListener('beforeunload', handleBeforeUnload);
13162
+ };
13163
+ }, [activeIndex, index, rec, videoRef, handleClickVideo, isPauseVideo]);
13164
+ const blurStyle = React.useMemo(() => {
13165
+ return blur
13166
+ ? {
13167
+ filter: 'blur(10px)',
13168
+ transform: 'translate3d(0px, 0px, 0px) scale(1.2)'
13169
+ }
13170
+ : {};
13171
+ }, [blur]);
13172
+ if (!rec.video) {
13173
+ return null;
13174
+ }
13175
+ return (React.createElement(React.Fragment, null, blur ? (React.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: {
13176
+ position: 'relative',
13177
+ width,
13178
+ height,
13179
+ overflow: 'hidden'
13180
+ } },
13181
+ React.createElement(FormatImage$1, { src: blurBgSrc, style: Object.assign({ height,
13182
+ width, objectFit: 'cover' }, blurStyle) }),
13183
+ React.createElement("canvas", { ref: canvasRef, style: { display: 'none' } }),
13184
+ React.createElement("div", { style: {
13185
+ position: 'absolute',
13186
+ width,
13187
+ height,
13188
+ top: '50%',
13189
+ transform: translateY,
13190
+ left: 0,
13191
+ right: 0
13192
+ } },
13193
+ React.createElement("div", { style: { position: 'relative', width, height: '100%' } },
13194
+ React.createElement("video", { id: `pb-video-${index}`, className: 'clc-pb-video', ref: videoRef, crossOrigin: 'anonymous', muted: true, controls: false, playsInline: true, preload: 'auto', onPause: onPause, onEnded: handleVideoStart, style: {
13195
+ width: '100%',
13196
+ height,
13197
+ objectFit: 'contain'
13198
+ } }),
13199
+ React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON }))),
13200
+ renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: {
13201
+ position: 'relative',
13202
+ width,
13203
+ height,
13204
+ overflow: 'hidden'
13205
+ } },
13206
+ React.createElement("video", { id: `pb-video-${index}`, className: 'clc-pb-video', ref: videoRef, crossOrigin: 'anonymous', muted: true, controls: false, playsInline: true, preload: 'auto', onPause: onPause, onEnded: handleVideoStart }),
13207
+ renderPoster,
13208
+ React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON })))));
13209
+ };
13210
+ var VideoWidget$1 = React.memo(VideoWidget);
13211
+
13212
+ const RESOLVER$1 = {};
13213
+ Object.values(_materials_).forEach((v) => {
13214
+ RESOLVER$1[v.extend.type] = v;
13215
+ });
13216
+ const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
13217
+ const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
13218
+ const DiyPortalPreview = ({ data, globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle, containerHeight = 664, containerWidth = 375, appDomain }) => {
13219
+ const height = React.useMemo(() => {
13220
+ return (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo) ? containerHeight - 45 : containerHeight;
13221
+ }, [globalConfig, containerHeight]);
13222
+ const renderContent = (rec, index) => {
13223
+ var _a, _b, _c, _d;
13224
+ if ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.url) {
13225
+ return (React.createElement(VideoWidget$1, { rec: rec, index: index, muted: true, width: containerWidth, data: data !== null && data !== void 0 ? data : [], height: height, activeIndex: index, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost }));
13226
+ }
13227
+ if ((_b = rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
13228
+ return (React.createElement(PictureGroup$1, { key: rec.video.itemId, imgUrls: rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
13229
+ }
13230
+ if (rec.product) {
13231
+ if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _c === void 0 ? void 0 : _c.length) > 0) {
13232
+ return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, idx) => {
13233
+ var _a, _b, _c, _d, _e, _f, _g, _h;
13234
+ const t = RESOLVER$1[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
13235
+ const Component = withBindDataSource(t);
13236
+ const defaulSetting = (_b = t === null || t === void 0 ? void 0 : t.extend) === null || _b === void 0 ? void 0 : _b.defaulSetting;
13237
+ return (React.createElement(Component, Object.assign({ key: `${index}${idx}`, textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.textStyle), bindDatas: (_e = (_d = value === null || value === void 0 ? void 0 : value.item) === null || _d === void 0 ? void 0 : _d.bindDatas) !== null && _e !== void 0 ? _e : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.props, { event: ((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.event) || {},
13238
+ // schema={schema}
13239
+ id: value === null || value === void 0 ? void 0 : value.id,
13240
+ // viewTime={viewTime.current}
13241
+ rec: rec, isPost: true, tipText: tipText, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_h = value === null || value === void 0 ? void 0 : value.item) === null || _h === void 0 ? void 0 : _h.style), { width: containerWidth, height, overflow: 'auto' }), index: index })));
13242
+ });
13243
+ }
13244
+ }
13245
+ };
13246
+ const renderLogo = React.useMemo(() => {
13247
+ if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
13248
+ return (React.createElement("div", { className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } },
13249
+ React.createElement("img", { src: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl, alt: 'logo' })));
13250
+ }
13251
+ return null;
13252
+ }, [globalConfig]);
13253
+ const renderBottom = (rec, index) => {
13254
+ var _a, _b, _c, _d, _e, _f, _g;
13255
+ if (rec.video) {
13256
+ return (React.createElement(React.Fragment, null,
13257
+ ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.title) && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
13258
+ React.createElement("div", { className: 'clc-sxp-bottom' },
13259
+ React.createElement(Nudge, { nudge: nudge }),
13260
+ React.createElement("div", { className: 'clc-sxp-bottom-card' },
13261
+ React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1 })),
13262
+ React.createElement("div", null,
13263
+ 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: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', 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' }) })),
13264
+ React.createElement(Hashtag$1, { index: index, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))));
13265
+ }
13266
+ return null;
13267
+ };
13268
+ const likeIcon = useIconLink(defaultLikeIconPath, appDomain);
13269
+ const unlikeIcon = useIconLink(defaultUnLikeIconPath, appDomain);
13270
+ const renderLikeButton = (rec, index) => {
13271
+ var _a, _b, _c, _d;
13272
+ if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
13273
+ return;
13274
+ let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconY) !== null && _a !== void 0 ? _a : 400;
13275
+ if (top < 40) {
13276
+ top += 40;
13277
+ }
13278
+ if (rec.video) {
13279
+ return (React.createElement(LikeButton$1, { key: rec.position, activeIcon: (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIcon) !== null && _b !== void 0 ? _b : likeIcon, unActicveIcon: (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unlikeIcon) !== null && _c !== void 0 ? _c : unlikeIcon, position: index, active: rec.isCollected, recData: rec, className: 'clc-sxp-like-button', style: {
13280
+ top,
13281
+ right: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconX) !== null && _d !== void 0 ? _d : 0
13282
+ } }));
13283
+ }
13284
+ return null;
13285
+ };
13286
+ const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png', appDomain);
13287
+ const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png', appDomain);
13288
+ const renderView = (rec, index) => {
13289
+ var _a, _b, _c, _d;
13290
+ return (React.createElement("div", { style: { position: 'relative' } },
13291
+ renderLogo,
13292
+ React.createElement(ToggleButton$1, { style: {
13293
+ position: 'absolute',
13294
+ right: (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _a !== void 0 ? _a : 0,
13295
+ visibility: ((_c = (_b = data === null || data === void 0 ? void 0 : data[index]) === null || _b === void 0 ? void 0 : _b.video) === null || _c === void 0 ? void 0 : _c.url) ? 'visible' : 'hidden',
13296
+ bottom: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _d !== void 0 ? _d : 23,
13297
+ zIndex: 999
13298
+ }, defaultValue: true, activeIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon : mutedIcon, unactiveIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon : unmutedIcon }),
13299
+ renderContent(rec, index),
13300
+ renderBottom(rec, index),
13301
+ renderLikeButton(rec, index)));
13302
+ };
13303
+ return (React.createElement("div", { style: {
13304
+ width: '100%',
13305
+ height: containerHeight,
13306
+ display: 'flex',
13307
+ boxSizing: 'border-box',
13308
+ gap: 16,
13309
+ pointerEvents: 'none',
13310
+ userSelect: 'none'
13311
+ } }, data === null || data === void 0 ? void 0 : data.map((rec, index) => {
13312
+ return renderView(rec, index);
13313
+ })));
13314
+ };
13315
+ var index$1 = React.memo(DiyPortalPreview);
13316
+
12973
13317
  /*
12974
13318
  * @Author: binruan@chatlabs.com
12975
13319
  * @Date: 2023-10-31 10:56:01
@@ -13110,12 +13454,13 @@ function useEditorDataProvider() {
13110
13454
  * @FilePath: \pb-sxp-ui\src\index.ts
13111
13455
  */
13112
13456
 
13457
+ exports.DiyPortalPreview = index$1;
13113
13458
  exports.EditorDataProvider = EditorDataProvider;
13114
13459
  exports.Modal = Modal$1;
13115
13460
  exports.SxpDataSourceProvider = SxpDataSourceProvider$1;
13116
13461
  exports.SxpPageCore = index;
13117
13462
  exports.SxpPageRender = SxpPageRender;
13118
- exports.core = index$1;
13463
+ exports.core = index$2;
13119
13464
  exports.default = Pagebuilder;
13120
13465
  exports.defaultSetting = defaultSetting;
13121
13466
  exports.materials = _materials_;