pb-sxp-ui 1.0.36 → 1.0.38

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 (44) hide show
  1. package/dist/index.cjs +106 -447
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +1 -6
  4. package/dist/index.js +106 -446
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.cjs +3 -3
  7. package/dist/index.min.cjs.map +1 -1
  8. package/dist/index.min.js +3 -3
  9. package/dist/index.min.js.map +1 -1
  10. package/dist/pb-ui.js +110 -450
  11. package/dist/pb-ui.js.map +1 -1
  12. package/dist/pb-ui.min.js +3 -3
  13. package/dist/pb-ui.min.js.map +1 -1
  14. package/es/core/components/SxpPageRender/VideoWidget/index.js +63 -58
  15. package/es/core/components/SxpPageRender/WaterFall/index.js +1 -1
  16. package/es/core/components/SxpPageRender/index.js +7 -7
  17. package/es/core/context/SxpDataSourceProvider.js +1 -1
  18. package/es/core/hooks/useEventReport.js +4 -4
  19. package/es/index.d.ts +0 -1
  20. package/es/index.js +0 -1
  21. package/es/materials/sxp/popup/CommodityDetail/index.js +6 -6
  22. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +9 -9
  23. package/lib/core/components/SxpPageRender/VideoWidget/index.js +63 -58
  24. package/lib/core/components/SxpPageRender/WaterFall/index.js +1 -1
  25. package/lib/core/components/SxpPageRender/index.js +7 -7
  26. package/lib/core/context/SxpDataSourceProvider.js +1 -1
  27. package/lib/core/hooks/useEventReport.js +4 -4
  28. package/lib/index.d.ts +0 -1
  29. package/lib/index.js +1 -3
  30. package/lib/materials/sxp/popup/CommodityDetail/index.js +6 -6
  31. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +9 -9
  32. package/package.json +1 -2
  33. package/es/core/components/DiyPortalPreview/PictureGroup.d.ts +0 -13
  34. package/es/core/components/DiyPortalPreview/PictureGroup.js +0 -11
  35. package/es/core/components/DiyPortalPreview/VideoWidget.d.ts +0 -15
  36. package/es/core/components/DiyPortalPreview/VideoWidget.js +0 -236
  37. package/es/core/components/DiyPortalPreview/index.d.ts +0 -6
  38. package/es/core/components/DiyPortalPreview/index.js +0 -112
  39. package/lib/core/components/DiyPortalPreview/PictureGroup.d.ts +0 -13
  40. package/lib/core/components/DiyPortalPreview/PictureGroup.js +0 -14
  41. package/lib/core/components/DiyPortalPreview/VideoWidget.d.ts +0 -15
  42. package/lib/core/components/DiyPortalPreview/VideoWidget.js +0 -239
  43. package/lib/core/components/DiyPortalPreview/index.d.ts +0 -6
  44. package/lib/core/components/DiyPortalPreview/index.js +0 -115
package/dist/pb-ui.js CHANGED
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash'), require('uuid'), require('pako'), require('react'), require('qs'), require('@emotion/css'), require('@ant-design/pro-components'), require('react-dom'), require('hls.js'), require('eventemitter3')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'lodash', 'uuid', 'pako', 'react', 'qs', '@emotion/css', '@ant-design/pro-components', 'react-dom', 'hls.js', 'eventemitter3'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PUI = {}, global.lodash, global.uuid$1, global.pako, global.React, global.qs, global.css, global.proComponents, global.ReactDOM, global.Hls, global.EventEmitter));
5
- })(this, (function (exports, lodash, uuid$1, pako, React, qs, css, proComponents, ReactDOM, Hls, EventEmitter) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash'), require('uuid'), require('pako'), require('react'), require('qs'), require('@emotion/css'), require('@ant-design/pro-components'), require('react-dom'), require('eventemitter3')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'lodash', 'uuid', 'pako', 'react', 'qs', '@emotion/css', '@ant-design/pro-components', 'react-dom', 'eventemitter3'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PUI = {}, global.lodash, global.uuid$1, global.pako, global.React, global.qs, global.css, global.proComponents, global.ReactDOM, global.EventEmitter));
5
+ })(this, (function (exports, lodash, uuid$1, pako, React, qs, css, proComponents, ReactDOM, EventEmitter) { 'use strict';
6
6
 
7
7
  function _interopNamespaceDefault(e) {
8
8
  var n = Object.create(null);
@@ -569,7 +569,7 @@
569
569
  fromKName = 'imagePage';
570
570
  }
571
571
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
572
- 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 })
572
+ 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 })
573
573
  });
574
574
  }, [bffEventReport, isFromHashtag]);
575
575
  React.useEffect(() => {
@@ -856,7 +856,7 @@
856
856
  React.createElement(DataSourceProvider$1, { isSsr: isSsr, enable: enableDataSource }, children)));
857
857
  });
858
858
 
859
- var index$2 = /*#__PURE__*/Object.freeze({
859
+ var index$1 = /*#__PURE__*/Object.freeze({
860
860
  __proto__: null,
861
861
  EditorCore: EditorCore
862
862
  });
@@ -8142,8 +8142,8 @@
8142
8142
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
8143
8143
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
8144
8144
  position: position + '',
8145
- 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 : '',
8146
- ctatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
8145
+ 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 : '',
8146
+ relatedCtatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
8147
8147
  traceInfo: (_p = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _p !== void 0 ? _p : ''
8148
8148
  }
8149
8149
  });
@@ -8167,8 +8167,8 @@
8167
8167
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
8168
8168
  contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
8169
8169
  position: position + '',
8170
- contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
8171
- ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
8170
+ relatedContentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
8171
+ relatedCtatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
8172
8172
  traceInfo: product === null || product === void 0 ? void 0 : product.traceInfo,
8173
8173
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
8174
8174
  eventSubject: 'productView',
@@ -8331,7 +8331,7 @@
8331
8331
  var FormatImage$1 = React.memo(FormatImage);
8332
8332
 
8333
8333
  const CommodityDetail$1 = (_a) => {
8334
- var _b, _c, _d, _e, _f, _g, _h, _j, _k;
8334
+ var _b, _c, _d, _e, _f, _g, _h, _j;
8335
8335
  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"]);
8336
8336
  const { sxpParameter } = useSxpDataSource();
8337
8337
  const { popupDetailData, bffEventReport, isPreview, waterFallData } = useSxpDataSource();
@@ -8372,7 +8372,7 @@
8372
8372
  return '$7,000';
8373
8373
  }
8374
8374
  }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8375
- const width = isPreview ? 375 : (_f = style === null || style === void 0 ? void 0 : style.width) !== null && _f !== void 0 ? _f : window.innerWidth;
8375
+ const width = isPreview ? 375 : window.innerWidth;
8376
8376
  const renderContent = ({ isPost }) => {
8377
8377
  var _a, _b, _c;
8378
8378
  return (React.createElement("div", null,
@@ -8392,7 +8392,7 @@
8392
8392
  };
8393
8393
  return (React.createElement("div", { className: 'pb-commondity' },
8394
8394
  React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
8395
- 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: {
8395
+ 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: {
8396
8396
  clickable: true,
8397
8397
  bulletActiveClass: 'swipe-item-active-bullet',
8398
8398
  clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
@@ -8400,7 +8400,7 @@
8400
8400
  : 'commondityDetail-swiper-clickable-center'
8401
8401
  }, loop: true, autoplay: {
8402
8402
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
8403
- } }, (_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.map((src) => {
8403
+ } }, (_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.map((src) => {
8404
8404
  return (React.createElement(SwiperSlide, { key: src },
8405
8405
  React.createElement("div", { style: {
8406
8406
  overflow: 'hidden',
@@ -8409,7 +8409,7 @@
8409
8409
  } },
8410
8410
  React.createElement(FormatImage$1, { style: { height: '100%', width: '100%', objectFit: 'cover', display: 'block' }, src: src }))));
8411
8411
  }))),
8412
- !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css.css({
8412
+ !((_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.length) && (React.createElement("div", { className: css.css({
8413
8413
  position: 'relative',
8414
8414
  height: 0,
8415
8415
  width: '100%',
@@ -8422,7 +8422,7 @@
8422
8422
  top: 0,
8423
8423
  objectFit: 'cover',
8424
8424
  width: '100%'
8425
- }), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: '' }))),
8425
+ }), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
8426
8426
  React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
8427
8427
  renderBtn(),
8428
8428
  React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) },
@@ -8782,7 +8782,7 @@
8782
8782
  ];
8783
8783
 
8784
8784
  const CommodityDetailDiroNew$1 = (_a) => {
8785
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
8785
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
8786
8786
  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"]);
8787
8787
  React.useState(true);
8788
8788
  const { sxpParameter } = useSxpDataSource();
@@ -8830,7 +8830,7 @@
8830
8830
  return '£102,300.00';
8831
8831
  }
8832
8832
  }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8833
- const width = isPreview ? 375 : (_f = style === null || style === void 0 ? void 0 : style.width) !== null && _f !== void 0 ? _f : window.innerWidth;
8833
+ const width = isPreview ? 375 : window.innerWidth;
8834
8834
  const productInfoText = ({ isPost }) => {
8835
8835
  return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
8836
8836
  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) ||
@@ -8839,7 +8839,7 @@ Made in Italy` })));
8839
8839
  };
8840
8840
  return (React.createElement("div", { className: 'pb-commondityDiroNew' },
8841
8841
  React.createElement("div", Object.assign({ ref: scrollRef, className: css.css(Object.assign({}, style)) }, props),
8842
- 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: {
8842
+ 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: {
8843
8843
  clickable: true,
8844
8844
  bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
8845
8845
  clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
@@ -8847,7 +8847,7 @@ Made in Italy` })));
8847
8847
  : 'commondityDiroNew-swiper-clickable-center'
8848
8848
  }, loop: true, autoplay: {
8849
8849
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
8850
- } }, (_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.map((src) => {
8850
+ } }, (_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.map((src) => {
8851
8851
  return (React.createElement(SwiperSlide, { key: src },
8852
8852
  React.createElement("div", { style: {
8853
8853
  overflow: 'hidden',
@@ -8856,7 +8856,7 @@ Made in Italy` })));
8856
8856
  } },
8857
8857
  React.createElement(FormatImage$1, { style: { height: '100%', width: '100%', objectFit: 'cover', display: 'block' }, src: src }))));
8858
8858
  }))),
8859
- !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css.css({
8859
+ !((_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.length) && (React.createElement("div", { className: css.css({
8860
8860
  position: 'relative',
8861
8861
  height: 0,
8862
8862
  width: '100%',
@@ -8869,16 +8869,16 @@ Made in Italy` })));
8869
8869
  top: 0,
8870
8870
  objectFit: 'cover',
8871
8871
  width: '100%'
8872
- }), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: '' }))),
8872
+ }), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
8873
8873
  React.createElement("div", { className: 'pb-commondityDiroNew-content' },
8874
8874
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
8875
8875
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
8876
- 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'),
8876
+ 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'),
8877
8877
  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')),
8878
8878
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right' },
8879
8879
  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),
8880
- 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 : '税费'))),
8881
- (!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')),
8880
+ 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 : '税费'))),
8881
+ (!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')),
8882
8882
  productInfoText({ isPost }))),
8883
8883
  React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false }))));
8884
8884
  };
@@ -11786,7 +11786,7 @@ Made in Italy` })));
11786
11786
  }
11787
11787
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
11788
11788
  eventInfo: {
11789
- contentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
11789
+ relatedContentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
11790
11790
  position: cacheActiveIndex + '',
11791
11791
  contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
11792
11792
  traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
@@ -11919,14 +11919,14 @@ Made in Italy` })));
11919
11919
  Prompt: Prompt
11920
11920
  });
11921
11921
 
11922
- const defaultUnLikeIconPath$1 = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
11923
- const defaultLikeIconPath$1 = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
11922
+ const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
11923
+ const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
11924
11924
  const LikeButton = (_a) => {
11925
11925
  var { active, activeIcon, unActicveIcon, recData, position } = _a, props = __rest(_a, ["active", "activeIcon", "unActicveIcon", "recData", "position"]);
11926
11926
  const { mutateLike, mutateUnlike, bffEventReport } = useSxpDataSource();
11927
11927
  const [state, setState] = React.useState(active);
11928
- const likeIcon = useIconLink(defaultLikeIconPath$1);
11929
- const unlikeIcon = useIconLink(defaultUnLikeIconPath$1);
11928
+ const likeIcon = useIconLink(defaultLikeIconPath);
11929
+ const unlikeIcon = useIconLink(defaultUnLikeIconPath);
11930
11930
  const handleClick = lodash.debounce(() => __awaiter(void 0, void 0, void 0, function* () {
11931
11931
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
11932
11932
  if (state) {
@@ -11982,7 +11982,7 @@ Made in Italy` })));
11982
11982
  SXP_EVENT_TYPE["PAGE_DID_HIDE"] = "pageDidHide";
11983
11983
  })(SXP_EVENT_TYPE || (SXP_EVENT_TYPE = {}));
11984
11984
 
11985
- const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPostConfig }) => {
11985
+ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostConfig }) => {
11986
11986
  const [isPauseVideo, setIsPauseVideo] = React.useState(false);
11987
11987
  const videoRef = React.useRef(null);
11988
11988
  const { bffEventReport, sxpParameter, waterFallData, openHashtag } = useSxpDataSource();
@@ -11992,12 +11992,13 @@ Made in Italy` })));
11992
11992
  const { isActive } = useSwiperSlide();
11993
11993
  const canvasRef = React.useRef(null);
11994
11994
  const [firstFrameSrc, setFirstFrameSrc] = React.useState('');
11995
+ const videoId = `pb-video-${index}`;
11995
11996
  React.useEffect(() => {
11996
11997
  if (!videoRef.current)
11997
11998
  return;
11998
- videoRef.current.muted = muted;
11999
+ videoRef.current.muted(muted);
11999
12000
  }, [muted]);
12000
- const handleVideoStart = React.useCallback(() => {
12001
+ const handleEnded = React.useCallback(() => {
12001
12002
  var _a;
12002
12003
  (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
12003
12004
  }, []);
@@ -12006,10 +12007,10 @@ Made in Italy` })));
12006
12007
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
12007
12008
  setIsPauseVideo(false);
12008
12009
  const item = data[index];
12009
- if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration)) {
12010
- videoStartTime.current = ((_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.currentTime) || 0;
12011
- const videoDuration = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.duration) !== null && _d !== void 0 ? _d : 0).toFixed(2);
12012
- const videoCurrentTime = ((_f = (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.currentTime) !== null && _f !== void 0 ? _f : 0).toFixed(2);
12010
+ if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration())) {
12011
+ videoStartTime.current = ((_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.currentTime()) || 0;
12012
+ const videoDuration = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.duration()) !== null && _d !== void 0 ? _d : 0).toFixed(2);
12013
+ const videoCurrentTime = ((_f = (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.currentTime()) !== null && _f !== void 0 ? _f : 0).toFixed(2);
12013
12014
  const playType = isFirstPlay ? '0' : '1';
12014
12015
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
12015
12016
  eventInfo: {
@@ -12029,14 +12030,14 @@ Made in Italy` })));
12029
12030
  setIsFirstPlay(false);
12030
12031
  }
12031
12032
  }, [bffEventReport, data, index, isFirstPlay]);
12032
- const handleLoadedMetadata = React.useCallback(() => {
12033
+ const handleCanplay = React.useCallback(() => {
12033
12034
  setIsLoadFinish(true);
12034
12035
  }, []);
12035
12036
  const handleClickVideo = React.useCallback((type) => () => {
12036
12037
  var _a, _b, _c, _d, _e;
12037
12038
  if (!isLoadFinish)
12038
12039
  return;
12039
- const isPause = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
12040
+ const isPause = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.paused();
12040
12041
  switch (type) {
12041
12042
  case 'start':
12042
12043
  if (!isPause)
@@ -12061,13 +12062,13 @@ Made in Italy` })));
12061
12062
  break;
12062
12063
  }
12063
12064
  }, [isLoadFinish]);
12064
- const onPause = React.useCallback(() => {
12065
+ const handlePause = React.useCallback(() => {
12065
12066
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
12066
12067
  const item = data[index];
12067
- const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
12068
- const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
12069
- if ((_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.duration) {
12070
- const playDuration = (((_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.currentTime) - videoStartTime.current).toFixed(2);
12068
+ const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration()) !== null && _b !== void 0 ? _b : 0).toFixed(2);
12069
+ const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime()) !== null && _d !== void 0 ? _d : 0).toFixed(2);
12070
+ if ((_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.duration()) {
12071
+ const playDuration = (((_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.currentTime()) - videoStartTime.current).toFixed(2);
12071
12072
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
12072
12073
  eventInfo: {
12073
12074
  eventSubject: 'playOverVideo',
@@ -12099,9 +12100,10 @@ Made in Italy` })));
12099
12100
  return ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || firstFrameSrc;
12100
12101
  }, [firstFrameSrc, rec]);
12101
12102
  const handLoadeddata = React.useCallback(() => {
12102
- if (!canvasRef || !videoRef || !videoRef.current || !canvasRef.current)
12103
+ const videoDomRef = document.getElementById(`${videoId}_html5_api`);
12104
+ if (!canvasRef || !videoDomRef || !canvasRef.current)
12103
12105
  return;
12104
- const video = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current;
12106
+ const video = videoDomRef;
12105
12107
  const canvas = canvasRef === null || canvasRef === void 0 ? void 0 : canvasRef.current;
12106
12108
  const ctx = canvas.getContext('2d');
12107
12109
  const targetWidth = window === null || window === void 0 ? void 0 : window.innerWidth;
@@ -12112,47 +12114,43 @@ Made in Italy` })));
12112
12114
  setFirstFrameSrc(canvas.toDataURL());
12113
12115
  }, []);
12114
12116
  React.useEffect(() => {
12115
- var _a, _b, _c, _d;
12116
- if (!videoRef.current)
12117
- return;
12117
+ var _a, _b, _c, _d, _e, _f;
12118
12118
  setIsPauseVideo(false);
12119
- if (!videoRef.current.src) {
12120
- const videoSrc = rec.video.url;
12121
- if (videoSrc.includes('.m3u8')) {
12122
- if (Hls.isSupported()) {
12123
- const hls = new Hls();
12124
- hls.loadSource(videoSrc);
12125
- hls.attachMedia(videoRef.current);
12126
- hls.on(Hls.Events.MANIFEST_PARSED, function () {
12127
- var _a;
12128
- (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
12129
- });
12130
- }
12131
- else if (videoRef.current.canPlayType('application/vnd.apple.mpegurl')) {
12132
- videoRef.current.src = videoSrc;
12133
- }
12134
- else {
12135
- videoRef.current.src = videoSrc;
12136
- }
12137
- }
12138
- else {
12139
- videoRef.current.src = videoSrc;
12140
- }
12141
- videoRef.current.setAttribute('x5-playsinline', 'true');
12142
- videoRef.current.setAttribute('webkit-playsinline', 'true');
12119
+ const videoSrc = rec.video.url;
12120
+ if (videoSrc && typeof TCPlayer === 'function') {
12121
+ videoRef.current = TCPlayer(videoId, {
12122
+ sources: [
12123
+ {
12124
+ src: videoSrc // 播放地址
12125
+ }
12126
+ ],
12127
+ licenseUrl: 'https://license.vod2.myqcloud.com/license/v2/1325816236_1/v_cube.license', // license 地址,参考准备工作部分,在视立方控制台申请 license 后可获得 licenseUrl
12128
+ controls: false,
12129
+ autoplay: false,
12130
+ loop: false,
12131
+ muted: true,
12132
+ preload: 'auto',
12133
+ posterImage: false,
12134
+ bigPlayButton: true
12135
+ });
12143
12136
  }
12144
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('loadedmetadata', handleLoadedMetadata);
12145
- (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.addEventListener('canplay', handleLoadedMetadata);
12146
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.addEventListener('playing', handlePlaying);
12147
- (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.addEventListener('loadeddata', handLoadeddata);
12137
+ (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.on('loadedmetadata', handleCanplay);
12138
+ (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.on('canplay', handleCanplay);
12139
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.on('playing', handlePlaying);
12140
+ (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.on('loadeddata', handLoadeddata);
12141
+ (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.on('pause', handlePause);
12142
+ (_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.on('ended', handleEnded);
12148
12143
  return () => {
12149
- var _a, _b, _c, _d;
12150
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('loadedmetadata', handleLoadedMetadata);
12151
- (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('canplay', handleLoadedMetadata);
12152
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('playing', handlePlaying);
12153
- (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('loadeddata', handLoadeddata);
12144
+ var _a, _b, _c, _d, _e, _f;
12145
+ (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.off('loadedmetadata', handleCanplay);
12146
+ (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.off('canplay', handleCanplay);
12147
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.off('playing', handlePlaying);
12148
+ (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.off('loadeddata', handLoadeddata);
12149
+ (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.off('pause', handlePause);
12150
+ (_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.off('ended', handleEnded);
12151
+ videoRef.current.dispose();
12154
12152
  };
12155
- }, [handleLoadedMetadata, handlePlaying, rec.video, handLoadeddata]);
12153
+ }, []);
12156
12154
  React.useEffect(() => {
12157
12155
  var _a;
12158
12156
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || !isLoadFinish)
@@ -12238,23 +12236,31 @@ Made in Italy` })));
12238
12236
  right: 0
12239
12237
  } },
12240
12238
  React.createElement("div", { style: { position: 'relative', width: '100%', height: '100%' } },
12241
- 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: {
12239
+ React.createElement("video", { id: `pb-video-${index}`, playsInline: true, crossOrigin: 'anonymous', style: {
12242
12240
  width: '100%',
12243
12241
  height: '100%',
12244
- objectFit: 'contain'
12242
+ objectFit: 'contain',
12243
+ backgroundColor: 'transparent',
12244
+ pointerEvents: 'none'
12245
12245
  } }),
12246
12246
  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, onClick: handleClickVideo(), style: {
12247
+ renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec.video.itemId, style: {
12248
12248
  position: 'relative',
12249
12249
  width: '100%',
12250
12250
  height,
12251
12251
  overflow: 'hidden'
12252
- } },
12253
- 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 }),
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
+ } }),
12254
12260
  renderPoster,
12255
12261
  React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON })))));
12256
12262
  };
12257
- var VideoWidget$3 = React.memo(VideoWidget$2);
12263
+ var VideoWidget$1 = React.memo(VideoWidget);
12258
12264
 
12259
12265
  /*
12260
12266
  * @Author: binruan@chatlabs.com
@@ -12353,7 +12359,7 @@ Made in Italy` })));
12353
12359
  * @LastEditTime: 2024-04-18 19:56:22
12354
12360
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\PictureGroup\index.tsx
12355
12361
  */
12356
- const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent, imgUrlsPostConfig }) => {
12362
+ const PictureGroup = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent, imgUrlsPostConfig }) => {
12357
12363
  var _a;
12358
12364
  const ref = React.useRef();
12359
12365
  const { isActive } = useSwiperSlide();
@@ -12382,7 +12388,7 @@ Made in Italy` })));
12382
12388
  React.createElement(Picture, { src: url, height: height, imgUrlsPostConfig: imgUrlsPostConfig })));
12383
12389
  })));
12384
12390
  };
12385
- var PictureGroup$3 = React.memo(PictureGroup$2);
12391
+ var PictureGroup$1 = React.memo(PictureGroup);
12386
12392
 
12387
12393
  /*
12388
12394
  * @Author: binruan@chatlabs.com
@@ -12561,7 +12567,7 @@ Made in Italy` })));
12561
12567
  * @Author: binruan@chatlabs.com
12562
12568
  * @Date: 2024-01-15 19:03:09
12563
12569
  * @LastEditors: binruan@chatlabs.com
12564
- * @LastEditTime: 2024-04-23 15:48:32
12570
+ * @LastEditTime: 2024-04-18 19:27:03
12565
12571
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12566
12572
  *
12567
12573
  */
@@ -12643,8 +12649,8 @@ Made in Italy` })));
12643
12649
  // sessionDuration: Math.floor(((new Date() as any) - curTime) / 1000) + '',
12644
12650
  // eventSubject: 'sessionCompleted',
12645
12651
  // eventDescription: 'Session completed',
12646
- // contentId: item?.video?.itemId,
12647
- // productId: item?.product?.itemId,
12652
+ // relatedContentId: item?.video?.itemId,
12653
+ // relatedProductId: item?.product?.itemId,
12648
12654
  // position: item?.position
12649
12655
  // }
12650
12656
  // });
@@ -12688,12 +12694,12 @@ Made in Italy` })));
12688
12694
  sessionDuration: Math.floor((new Date() - curTime.current) / 1000) + '',
12689
12695
  eventSubject: 'sessionCompleted',
12690
12696
  eventDescription: 'Session completed',
12691
- contentId: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.itemId,
12692
- productId: (_m = item === null || item === void 0 ? void 0 : item.product) === null || _m === void 0 ? void 0 : _m.itemId,
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,
12693
12699
  position: activeIndex + '',
12694
12700
  fromKName,
12695
12701
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
12696
- 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 : ''
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 : ''
12697
12703
  }
12698
12704
  });
12699
12705
  }
@@ -12722,10 +12728,10 @@ Made in Italy` })));
12722
12728
  const renderContent = React.useCallback((rec, index) => {
12723
12729
  var _a, _b, _c, _d;
12724
12730
  if ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.url) {
12725
- 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 }));
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 }));
12726
12732
  }
12727
12733
  if ((_b = rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
12728
- 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 }));
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 }));
12729
12735
  }
12730
12736
  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) {
12731
12737
  return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, idx) => {
@@ -12827,8 +12833,8 @@ Made in Italy` })));
12827
12833
  eventInfo: {
12828
12834
  eventSubject: 'scrollDown',
12829
12835
  eventDescription: 'User scroll down',
12830
- contentId: (_b = (_a = item.video) === null || _a === void 0 ? void 0 : _a.itemId) !== null && _b !== void 0 ? _b : '',
12831
- productId: (_d = (_c = item.product) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
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 : '',
12832
12838
  requestId: null
12833
12839
  }
12834
12840
  });
@@ -12840,8 +12846,8 @@ Made in Italy` })));
12840
12846
  eventInfo: {
12841
12847
  eventSubject: 'scrollUp',
12842
12848
  eventDescription: 'User scroll up',
12843
- contentId: (_f = (_e = item.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
12844
- productId: (_h = (_g = item.product) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
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 : '',
12845
12851
  requestId: null
12846
12852
  }
12847
12853
  });
@@ -12964,351 +12970,6 @@ Made in Italy` })));
12964
12970
  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))));
12965
12971
  };
12966
12972
 
12967
- const PictureGroup = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index }) => {
12968
- 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) => {
12969
- return (React.createElement(SwiperSlide, { key: url },
12970
- React.createElement(Picture, { src: url, height: height, imgUrlsPostConfig: imgUrlsPostConfig })));
12971
- })));
12972
- };
12973
- var PictureGroup$1 = React.memo(PictureGroup);
12974
-
12975
- const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostConfig, width }) => {
12976
- const [isPauseVideo, setIsPauseVideo] = React.useState(false);
12977
- const videoRef = React.useRef(null);
12978
- const { bffEventReport, sxpParameter, waterFallData, openHashtag } = useSxpDataSource();
12979
- const videoStartTime = React.useRef(0);
12980
- const [isLoadFinish, setIsLoadFinish] = React.useState(false);
12981
- const [isFirstPlay, setIsFirstPlay] = React.useState(true);
12982
- const canvasRef = React.useRef(null);
12983
- const [firstFrameSrc, setFirstFrameSrc] = React.useState('');
12984
- React.useEffect(() => {
12985
- if (!videoRef.current)
12986
- return;
12987
- videoRef.current.muted = muted;
12988
- }, [muted]);
12989
- const handleVideoStart = React.useCallback(() => {
12990
- var _a;
12991
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
12992
- }, []);
12993
- const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
12994
- const handlePlaying = React.useCallback(() => {
12995
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
12996
- setIsPauseVideo(false);
12997
- const item = data[index];
12998
- if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration)) {
12999
- videoStartTime.current = ((_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.currentTime) || 0;
13000
- const videoDuration = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.duration) !== null && _d !== void 0 ? _d : 0).toFixed(2);
13001
- const videoCurrentTime = ((_f = (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.currentTime) !== null && _f !== void 0 ? _f : 0).toFixed(2);
13002
- const playType = isFirstPlay ? '0' : '1';
13003
- bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
13004
- eventInfo: {
13005
- eventSubject: 'playVideo',
13006
- eventDescription: 'User played the video',
13007
- contentId: (_h = (_g = item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
13008
- contentName: (_k = (_j = item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
13009
- playType,
13010
- startTime: videoCurrentTime,
13011
- videoDuration,
13012
- contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
13013
- position: index + '',
13014
- contentFormat: 'video',
13015
- traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
13016
- }
13017
- });
13018
- setIsFirstPlay(false);
13019
- }
13020
- }, [bffEventReport, data, index, isFirstPlay]);
13021
- const handleLoadedMetadata = React.useCallback(() => {
13022
- setIsLoadFinish(true);
13023
- }, []);
13024
- const handleClickVideo = React.useCallback((type) => () => {
13025
- var _a, _b, _c, _d, _e;
13026
- if (!isLoadFinish)
13027
- return;
13028
- const isPause = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
13029
- switch (type) {
13030
- case 'start':
13031
- if (!isPause)
13032
- return;
13033
- (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.play();
13034
- setIsPauseVideo(false);
13035
- break;
13036
- case 'pause':
13037
- if (isPause)
13038
- return;
13039
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
13040
- setIsPauseVideo(true);
13041
- break;
13042
- default:
13043
- if (isPause) {
13044
- (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.play();
13045
- }
13046
- else {
13047
- (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.pause();
13048
- }
13049
- setIsPauseVideo(!isPause);
13050
- break;
13051
- }
13052
- }, [isLoadFinish]);
13053
- const onPause = React.useCallback(() => {
13054
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
13055
- const item = data[index];
13056
- const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
13057
- const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
13058
- if ((_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.duration) {
13059
- const playDuration = (((_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.currentTime) - videoStartTime.current).toFixed(2);
13060
- bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
13061
- eventInfo: {
13062
- eventSubject: 'playOverVideo',
13063
- eventDescription: 'User finished playing the video',
13064
- contentId: (_h = (_g = item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
13065
- contentName: (_k = (_j = item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
13066
- endTime: videoCurrentTime,
13067
- videoDuration,
13068
- playDuration,
13069
- contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
13070
- position: index + '',
13071
- contentFormat: 'video',
13072
- traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
13073
- }
13074
- });
13075
- }
13076
- }, [data, index, bffEventReport]);
13077
- const blur = React.useMemo(() => {
13078
- return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2';
13079
- }, [videoPostConfig]);
13080
- const translateY = React.useMemo(() => {
13081
- var _a;
13082
- return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2'
13083
- ? `translateY(-${50 + ((_a = videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.offsetTop) !== null && _a !== void 0 ? _a : 0)}%) translate3d(0px, 0px, 0px)`
13084
- : 'translateY(-50%)';
13085
- }, [videoPostConfig]);
13086
- const blurBgSrc = React.useMemo(() => {
13087
- var _a;
13088
- return ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || firstFrameSrc;
13089
- }, [firstFrameSrc, rec]);
13090
- const handLoadeddata = React.useCallback(() => {
13091
- if (!canvasRef || !videoRef || !videoRef.current || !canvasRef.current)
13092
- return;
13093
- const video = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current;
13094
- const canvas = canvasRef === null || canvasRef === void 0 ? void 0 : canvasRef.current;
13095
- const ctx = canvas.getContext('2d');
13096
- const targetWidth = window === null || window === void 0 ? void 0 : window.innerWidth;
13097
- const targetHeight = window === null || window === void 0 ? void 0 : window.innerHeight;
13098
- canvas.height = targetHeight;
13099
- canvas.width = targetWidth;
13100
- ctx === null || ctx === void 0 ? void 0 : ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
13101
- setFirstFrameSrc(canvas.toDataURL());
13102
- }, []);
13103
- React.useEffect(() => {
13104
- var _a, _b, _c, _d;
13105
- if (!videoRef.current)
13106
- return;
13107
- setIsPauseVideo(false);
13108
- if (!videoRef.current.src) {
13109
- const videoSrc = rec.video.url;
13110
- if (videoSrc.includes('.m3u8')) {
13111
- if (Hls.isSupported()) {
13112
- const hls = new Hls();
13113
- hls.loadSource(videoSrc);
13114
- hls.attachMedia(videoRef.current);
13115
- }
13116
- else if (videoRef.current.canPlayType('application/vnd.apple.mpegurl')) {
13117
- videoRef.current.src = videoSrc;
13118
- }
13119
- else {
13120
- videoRef.current.src = videoSrc;
13121
- }
13122
- }
13123
- else {
13124
- videoRef.current.src = videoSrc;
13125
- }
13126
- videoRef.current.setAttribute('x5-playsinline', 'true');
13127
- videoRef.current.setAttribute('webkit-playsinline', 'true');
13128
- }
13129
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('loadedmetadata', handleLoadedMetadata);
13130
- (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.addEventListener('canplay', handleLoadedMetadata);
13131
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.addEventListener('playing', handlePlaying);
13132
- (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.addEventListener('loadeddata', handLoadeddata);
13133
- return () => {
13134
- var _a, _b, _c, _d;
13135
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('loadedmetadata', handleLoadedMetadata);
13136
- (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('canplay', handleLoadedMetadata);
13137
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('playing', handlePlaying);
13138
- (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('loadeddata', handLoadeddata);
13139
- };
13140
- }, [handleLoadedMetadata, handlePlaying, rec.video, handLoadeddata]);
13141
- const renderPoster = React.useMemo(() => {
13142
- if (!(sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image) || isLoadFinish) {
13143
- return null;
13144
- }
13145
- 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 }));
13146
- }, [isLoadFinish, sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image]);
13147
- React.useEffect(() => {
13148
- const handleBeforeUnload = () => {
13149
- var _a, _b;
13150
- 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) {
13151
- handleClickVideo('pause')();
13152
- }
13153
- };
13154
- window.addEventListener('beforeunload', handleBeforeUnload);
13155
- return () => {
13156
- window.removeEventListener('beforeunload', handleBeforeUnload);
13157
- };
13158
- }, [activeIndex, index, rec, videoRef, handleClickVideo, isPauseVideo]);
13159
- const blurStyle = React.useMemo(() => {
13160
- return blur
13161
- ? {
13162
- filter: 'blur(10px)',
13163
- transform: 'translate3d(0px, 0px, 0px) scale(1.2)'
13164
- }
13165
- : {};
13166
- }, [blur]);
13167
- if (!rec.video) {
13168
- return null;
13169
- }
13170
- return (React.createElement(React.Fragment, null, blur ? (React.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: {
13171
- position: 'relative',
13172
- width,
13173
- height,
13174
- overflow: 'hidden'
13175
- } },
13176
- React.createElement(FormatImage$1, { src: blurBgSrc, style: Object.assign({ height,
13177
- width, objectFit: 'cover' }, blurStyle) }),
13178
- React.createElement("canvas", { ref: canvasRef, style: { display: 'none' } }),
13179
- React.createElement("div", { style: {
13180
- position: 'absolute',
13181
- width,
13182
- height,
13183
- top: '50%',
13184
- transform: translateY,
13185
- left: 0,
13186
- right: 0
13187
- } },
13188
- React.createElement("div", { style: { position: 'relative', width, height: '100%' } },
13189
- 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: {
13190
- width: '100%',
13191
- height,
13192
- objectFit: 'contain'
13193
- } }),
13194
- React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON }))),
13195
- renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: {
13196
- position: 'relative',
13197
- width,
13198
- height,
13199
- overflow: 'hidden'
13200
- } },
13201
- 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 }),
13202
- renderPoster,
13203
- React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON })))));
13204
- };
13205
- var VideoWidget$1 = React.memo(VideoWidget);
13206
-
13207
- const RESOLVER$1 = {};
13208
- Object.values(_materials_).forEach((v) => {
13209
- RESOLVER$1[v.extend.type] = v;
13210
- });
13211
- const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
13212
- const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
13213
- const DiyPortalPreview = ({ data, globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle, containerHeight = 664, containerWidth = 375, appDomain }) => {
13214
- const height = React.useMemo(() => {
13215
- return (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo) ? containerHeight - 45 : containerHeight;
13216
- }, [globalConfig, containerHeight]);
13217
- const renderContent = (rec, index) => {
13218
- var _a, _b, _c, _d;
13219
- if ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.url) {
13220
- 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 }));
13221
- }
13222
- if ((_b = rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
13223
- 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 }));
13224
- }
13225
- if (rec.product) {
13226
- 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) {
13227
- return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, idx) => {
13228
- var _a, _b, _c, _d, _e, _f, _g, _h;
13229
- const t = RESOLVER$1[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
13230
- const Component = withBindDataSource(t);
13231
- const defaulSetting = (_b = t === null || t === void 0 ? void 0 : t.extend) === null || _b === void 0 ? void 0 : _b.defaulSetting;
13232
- 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) || {},
13233
- // schema={schema}
13234
- id: value === null || value === void 0 ? void 0 : value.id,
13235
- // viewTime={viewTime.current}
13236
- 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 })));
13237
- });
13238
- }
13239
- }
13240
- };
13241
- const renderLogo = React.useMemo(() => {
13242
- if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
13243
- return (React.createElement("div", { className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } },
13244
- React.createElement("img", { src: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl, alt: 'logo' })));
13245
- }
13246
- return null;
13247
- }, [globalConfig]);
13248
- const renderBottom = (rec, index) => {
13249
- var _a, _b, _c, _d, _e, _f, _g;
13250
- if (rec.video) {
13251
- return (React.createElement(React.Fragment, null,
13252
- ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.title) && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
13253
- React.createElement("div", { className: 'clc-sxp-bottom' },
13254
- React.createElement(Nudge, { nudge: nudge }),
13255
- React.createElement("div", { className: 'clc-sxp-bottom-card' },
13256
- React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1 })),
13257
- React.createElement("div", null,
13258
- 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' }) })),
13259
- 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 }))));
13260
- }
13261
- return null;
13262
- };
13263
- const likeIcon = useIconLink(defaultLikeIconPath, appDomain);
13264
- const unlikeIcon = useIconLink(defaultUnLikeIconPath, appDomain);
13265
- const renderLikeButton = (rec, index) => {
13266
- var _a, _b, _c, _d;
13267
- if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
13268
- return;
13269
- let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconY) !== null && _a !== void 0 ? _a : 400;
13270
- if (top < 40) {
13271
- top += 40;
13272
- }
13273
- if (rec.video) {
13274
- 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: {
13275
- top,
13276
- right: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconX) !== null && _d !== void 0 ? _d : 0
13277
- } }));
13278
- }
13279
- return null;
13280
- };
13281
- const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png', appDomain);
13282
- const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png', appDomain);
13283
- const renderView = (rec, index) => {
13284
- var _a, _b, _c, _d;
13285
- return (React.createElement("div", { style: { position: 'relative' } },
13286
- renderLogo,
13287
- React.createElement(ToggleButton$1, { style: {
13288
- position: 'absolute',
13289
- right: (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _a !== void 0 ? _a : 0,
13290
- 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',
13291
- bottom: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _d !== void 0 ? _d : 23,
13292
- zIndex: 999
13293
- }, 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 }),
13294
- renderContent(rec, index),
13295
- renderBottom(rec, index),
13296
- renderLikeButton(rec, index)));
13297
- };
13298
- return (React.createElement("div", { style: {
13299
- width: '100%',
13300
- height: containerHeight,
13301
- display: 'flex',
13302
- boxSizing: 'border-box',
13303
- gap: 16,
13304
- pointerEvents: 'none',
13305
- userSelect: 'none'
13306
- } }, data === null || data === void 0 ? void 0 : data.map((rec, index) => {
13307
- return renderView(rec, index);
13308
- })));
13309
- };
13310
- var index$1 = React.memo(DiyPortalPreview);
13311
-
13312
12973
  /*
13313
12974
  * @Author: binruan@chatlabs.com
13314
12975
  * @Date: 2023-10-31 10:56:01
@@ -13449,13 +13110,12 @@ Made in Italy` })));
13449
13110
  * @FilePath: \pb-sxp-ui\src\index.ts
13450
13111
  */
13451
13112
 
13452
- exports.DiyPortalPreview = index$1;
13453
13113
  exports.EditorDataProvider = EditorDataProvider;
13454
13114
  exports.Modal = Modal$1;
13455
13115
  exports.SxpDataSourceProvider = SxpDataSourceProvider$1;
13456
13116
  exports.SxpPageCore = index;
13457
13117
  exports.SxpPageRender = SxpPageRender;
13458
- exports.core = index$2;
13118
+ exports.core = index$1;
13459
13119
  exports.default = Pagebuilder;
13460
13120
  exports.defaultSetting = defaultSetting;
13461
13121
  exports.materials = _materials_;