@anker-in/headless-ui 1.0.26-alpha.1763521763904 → 1.0.26-alpha.1763550831017

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 (69) hide show
  1. package/dist/cjs/biz-components/AplusDesc/index.js +1 -1
  2. package/dist/cjs/biz-components/AplusDesc/index.js.map +3 -3
  3. package/dist/cjs/biz-components/Category/SwiperCategory.js +1 -1
  4. package/dist/cjs/biz-components/Category/SwiperCategory.js.map +3 -3
  5. package/dist/cjs/biz-components/Features/index.js +1 -1
  6. package/dist/cjs/biz-components/Features/index.js.map +3 -3
  7. package/dist/cjs/biz-components/GiftBox/index.js +1 -1
  8. package/dist/cjs/biz-components/GiftBox/index.js.map +3 -3
  9. package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingMethod.js +1 -1
  10. package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingMethod.js.map +2 -2
  11. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +1 -1
  12. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +2 -2
  13. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +1 -1
  14. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +3 -3
  15. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js +1 -1
  16. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js.map +3 -3
  17. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
  18. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +2 -2
  19. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
  20. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +2 -2
  21. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js +1 -1
  22. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js.map +1 -1
  23. package/dist/cjs/biz-components/MediaPlayerSticky/index.js +1 -1
  24. package/dist/cjs/biz-components/MediaPlayerSticky/index.js.map +3 -3
  25. package/dist/cjs/biz-components/SelectStore/index.js +1 -1
  26. package/dist/cjs/biz-components/SelectStore/index.js.map +3 -3
  27. package/dist/cjs/biz-components/Spacer/index.js +1 -1
  28. package/dist/cjs/biz-components/Spacer/index.js.map +3 -3
  29. package/dist/cjs/biz-components/SwiperBox/index.js +1 -1
  30. package/dist/cjs/biz-components/SwiperBox/index.js.map +3 -3
  31. package/dist/cjs/biz-components/Title/index.js +1 -1
  32. package/dist/cjs/biz-components/Title/index.js.map +2 -2
  33. package/dist/cjs/components/picture.js +1 -1
  34. package/dist/cjs/components/picture.js.map +2 -2
  35. package/dist/esm/biz-components/AplusDesc/index.js +1 -1
  36. package/dist/esm/biz-components/AplusDesc/index.js.map +3 -3
  37. package/dist/esm/biz-components/Category/SwiperCategory.js +1 -1
  38. package/dist/esm/biz-components/Category/SwiperCategory.js.map +3 -3
  39. package/dist/esm/biz-components/Features/index.js +1 -1
  40. package/dist/esm/biz-components/Features/index.js.map +3 -3
  41. package/dist/esm/biz-components/GiftBox/index.js +1 -1
  42. package/dist/esm/biz-components/GiftBox/index.js.map +3 -3
  43. package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingMethod.js +1 -1
  44. package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingMethod.js.map +2 -2
  45. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +1 -1
  46. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +2 -2
  47. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +1 -1
  48. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +3 -3
  49. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js +1 -1
  50. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js.map +3 -3
  51. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
  52. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +2 -2
  53. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
  54. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +2 -2
  55. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js +1 -1
  56. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js.map +1 -1
  57. package/dist/esm/biz-components/MediaPlayerSticky/index.js +1 -1
  58. package/dist/esm/biz-components/MediaPlayerSticky/index.js.map +3 -3
  59. package/dist/esm/biz-components/SelectStore/index.js +1 -1
  60. package/dist/esm/biz-components/SelectStore/index.js.map +3 -3
  61. package/dist/esm/biz-components/Spacer/index.js +1 -1
  62. package/dist/esm/biz-components/Spacer/index.js.map +3 -3
  63. package/dist/esm/biz-components/SwiperBox/index.js +1 -1
  64. package/dist/esm/biz-components/SwiperBox/index.js.map +3 -3
  65. package/dist/esm/biz-components/Title/index.js +1 -1
  66. package/dist/esm/biz-components/Title/index.js.map +2 -2
  67. package/dist/esm/components/picture.js +1 -1
  68. package/dist/esm/components/picture.js.map +2 -2
  69. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var i=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var k=Object.prototype.hasOwnProperty;var f=(l,t)=>{for(var m in t)i(l,m,{get:t[m],enumerable:!0})},N=(l,t,m,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of n(t))!k.call(l,o)&&o!==m&&i(l,o,{get:()=>t[o],enumerable:!(a=u(t,o))||a.enumerable});return l};var b=l=>N(i({},"__esModule",{value:!0}),l);var y={};f(y,{default:()=>I});module.exports=b(y);var e=require("react/jsx-runtime"),p=require("../../helpers/utils.js"),g=require("../../shared/Styles.js"),s=require("../../components/index.js");const v=l=>{const{data:t,className:m}=l,{title:a,img:o,mobileImg:r,list:x}=t;return(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)("div",{className:"w-full",children:[(0,e.jsxs)("div",{className:"flex desktop:items-center desktop:justify-between desktop:flex-row flex-col w-full",children:[(0,e.jsx)("div",{className:" desktop:w-[600px] lg-desktop:w-[800px]",children:a&&(0,e.jsx)(s.Text,{html:a,className:"desktop:text-[16px] lg-desktop:text-[18px] text-[14px] font-bold leading-[1.2]"})}),(0,e.jsxs)("div",{children:[o?.url&&(0,e.jsx)(s.Picture,{className:"w-[464px] rounded-2xl hidden desktop:block",imgClassName:"",source:t?.img?.url,alt:t?.img?.alt||""}),r?.url&&(0,e.jsx)(s.Picture,{className:"w-[224px] rounded-2xl block desktop:hidden",imgClassName:"",source:t?.mobileImg?.url,alt:t?.mobileImg?.alt||""})]})]}),(0,e.jsx)("div",{className:"mt-[24px] grid tablet:grid-cols-2 desktop:grid-cols-3 grid-cols-1 gap-[16px]",children:x.map((d,c)=>(0,e.jsxs)("div",{className:"relative",children:[(0,e.jsx)(s.Picture,{className:" rounded-2xl",imgClassName:"",source:d?.img?.url,alt:d?.img?.alt||""}),(0,e.jsxs)("div",{className:(0,p.cn)("text-info-primary absolute bottom-[16px] left-[16px] flex flex-col desktop:bottom-[24px] desktop:left-[24px] lg-desktop:bottom-[32px] lg-desktop:left-[32px]",{"aiui-dark":d.theme==="dark"}),children:[(0,e.jsx)(s.Text,{html:d?.title,className:" lg-desktop:text-[24px] text-[20px] font-bold leading-[1.2]"}),(0,e.jsx)(s.Text,{html:d?.desc,className:" lg-desktop:text-[16px] text-[14px] font-bold leading-[1.4]"})]})]},c))})]})})};var I=(0,g.withLayout)(v);
1
+ "use strict";"use client";var i=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var N=Object.prototype.hasOwnProperty;var b=(l,e)=>{for(var s in e)i(l,s,{get:e[s],enumerable:!0})},v=(l,e,s,p)=>{if(e&&typeof e=="object"||typeof e=="function")for(let m of k(e))!N.call(l,m)&&m!==s&&i(l,m,{get:()=>e[m],enumerable:!(p=f(e,m))||p.enumerable});return l};var I=l=>v(i({},"__esModule",{value:!0}),l);var D={};b(D,{default:()=>A});module.exports=I(D);var t=require("react/jsx-runtime"),d=require("../../helpers/utils.js"),r=require("../../shared/Styles.js"),o=require("../../components/index.js"),c=require("../../hooks/useExposure.js"),n=require("react");const y="image",h="aplus_desc",w=({index:l,item:e})=>{const s=(0,n.useRef)(null);return(0,c.useExposure)(s,{componentType:y,componentName:h,position:l+1,componentTitle:e.title,componentDescription:e.desc}),(0,t.jsxs)("div",{ref:s,className:"relative",children:[(0,t.jsx)(o.Picture,{className:" rounded-2xl",imgClassName:"",source:e?.img?.url,alt:e?.img?.alt||""}),(0,t.jsxs)("div",{className:(0,d.cn)("text-info-primary absolute bottom-[16px] left-[16px] flex flex-col desktop:bottom-[24px] desktop:left-[24px] lg-desktop:bottom-[32px] lg-desktop:left-[32px]",{"aiui-dark":e.theme==="dark"}),children:[(0,t.jsx)(o.Text,{html:e?.title,className:" lg-desktop:text-[24px] text-[20px] font-bold leading-[1.2]"}),(0,t.jsx)(o.Text,{html:e?.desc,className:" lg-desktop:text-[16px] text-[14px] font-bold leading-[1.4]"})]})]})},T=l=>{const{data:e,className:s}=l,{title:p,img:m,mobileImg:g,list:x}=e;return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex desktop:items-center desktop:justify-between desktop:flex-row flex-col w-full",children:[(0,t.jsx)("div",{className:" desktop:w-[600px] lg-desktop:w-[800px]",children:p&&(0,t.jsx)(o.Text,{html:p,className:"desktop:text-[16px] lg-desktop:text-[18px] text-[14px] font-bold leading-[1.2]"})}),(0,t.jsxs)("div",{children:[m?.url&&(0,t.jsx)(o.Picture,{className:"w-[464px] rounded-2xl hidden desktop:block",imgClassName:"",source:e?.img?.url,alt:e?.img?.alt||""}),g?.url&&(0,t.jsx)(o.Picture,{className:"w-[224px] rounded-2xl block desktop:hidden",imgClassName:"",source:e?.mobileImg?.url,alt:e?.mobileImg?.alt||""})]})]}),(0,t.jsx)("div",{className:"mt-[24px] grid tablet:grid-cols-2 desktop:grid-cols-3 grid-cols-1 gap-[16px]",children:x.map((u,a)=>(0,t.jsx)(w,{index:a,item:u},a))})]})})};var A=(0,r.withLayout)(T);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/AplusDesc/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text } from '../../components/index.js'\n\n\ntype AplusItem = {\n img: Img\n mobileImg: Img\n title: string\n desc: string\n theme: 'light' | 'dark'\n}\n\ntype AplusDescType = {\n data: {\n title: string\n img: Img\n mobileImg: Img\n list: AplusItem[]\n }\n className?: string\n}\n\nconst AplusDesc = (props: AplusDescType) => {\n const { data, className } = props\n const { title, img , mobileImg,list} = data\n\n return (\n <>\n <div className='w-full'>\n <div className='flex desktop:items-center desktop:justify-between desktop:flex-row flex-col w-full'>\n <div className=' desktop:w-[600px] lg-desktop:w-[800px]'>\n {title && (\n <Text\n html={title}\n className=\"desktop:text-[16px] lg-desktop:text-[18px] text-[14px] font-bold leading-[1.2]\"\n />\n )}\n </div>\n <div>\n {img?.url && (\n <Picture\n className=\"w-[464px] rounded-2xl hidden desktop:block\"\n imgClassName=\"\"\n source={data?.img?.url}\n alt={data?.img?.alt || ''}\n />\n )}\n {mobileImg?.url && (\n <Picture\n className=\"w-[224px] rounded-2xl block desktop:hidden\"\n imgClassName=\"\"\n source={data?.mobileImg?.url}\n alt={data?.mobileImg?.alt || ''}\n />\n )}\n </div>\n </div>\n <div className='mt-[24px] grid tablet:grid-cols-2 desktop:grid-cols-3 grid-cols-1 gap-[16px]'>\n {list.map((item,ind)=>(\n <div key={ind} className='relative'>\n <Picture\n className=\" rounded-2xl\"\n imgClassName=\"\"\n source={item?.img?.url}\n alt={item?.img?.alt || ''}\n />\n <div className={cn(\n 'text-info-primary absolute bottom-[16px] left-[16px] flex flex-col desktop:bottom-[24px] desktop:left-[24px] lg-desktop:bottom-[32px] lg-desktop:left-[32px]',\n {\n 'aiui-dark': item.theme === 'dark',\n }\n )}>\n <Text html={item?.title} className=\" lg-desktop:text-[24px] text-[20px] font-bold leading-[1.2]\" />\n <Text html={item?.desc} className=\" lg-desktop:text-[16px] text-[14px] font-bold leading-[1.4]\" />\n </div>\n </div>\n ))}\n </div>\n </div>\n </>\n )\n}\n\nexport default withLayout(AplusDesc)\n"],
5
- "mappings": "sbAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA8BI,IAAAI,EAAA,6BA7BJC,EAAmB,kCAEnBC,EAA2B,kCAC3BC,EAA8B,qCAqB9B,MAAMC,EAAaC,GAAyB,CAC1C,KAAM,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAIF,EACtB,CAAE,MAAAG,EAAO,IAAAC,EAAM,UAAAC,EAAU,KAAAC,CAAI,EAAIL,EAEvC,SACE,mBACE,oBAAC,OAAI,UAAU,SACb,qBAAC,OAAI,UAAU,qFACX,oBAAC,OAAI,UAAU,0CACV,SAAAE,MACD,OAAC,QACG,KAAMA,EACN,UAAU,iFACd,EAEJ,KACA,QAAC,OACI,UAAAC,GAAK,QACN,OAAC,WACG,UAAU,6CACV,aAAa,GACb,OAAQH,GAAM,KAAK,IACnB,IAAKA,GAAM,KAAK,KAAO,GAC3B,EAEHI,GAAW,QACR,OAAC,WACG,UAAU,6CACV,aAAa,GACb,OAAQJ,GAAM,WAAW,IACzB,IAAKA,GAAM,WAAW,KAAO,GACjC,GAEJ,GACJ,KACA,OAAC,OAAI,UAAU,+EACV,SAAAK,EAAK,IAAI,CAACC,EAAKC,OACZ,QAAC,OAAc,UAAU,WACrB,oBAAC,WACG,UAAU,eACV,aAAa,GACb,OAAQD,GAAM,KAAK,IACnB,IAAKA,GAAM,KAAK,KAAO,GAC3B,KACA,QAAC,OAAI,aAAW,MACZ,+JACA,CACI,YAAaA,EAAK,QAAU,MAChC,CACJ,EACI,oBAAC,QAAK,KAAMA,GAAM,MAAO,UAAU,8DAA8D,KACjG,OAAC,QAAK,KAAMA,GAAM,KAAM,UAAU,8DAA8D,GACpG,IAfMC,CAgBV,CACH,EACL,GACF,EACF,CAEJ,EAEA,IAAOf,KAAQ,cAAWM,CAAS",
6
- "names": ["AplusDesc_exports", "__export", "AplusDesc_default", "__toCommonJS", "import_jsx_runtime", "import_utils", "import_Styles", "import_components", "AplusDesc", "props", "data", "className", "title", "img", "mobileImg", "list", "item", "ind"]
4
+ "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text } from '../../components/index.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { useRef } from 'react'\n\ntype AplusItem = {\n img: Img\n mobileImg: Img\n title: string\n desc: string\n theme: 'light' | 'dark'\n}\n\ntype AplusDescType = {\n data: {\n title: string\n img: Img\n mobileImg: Img\n list: AplusItem[]\n }\n className?: string\n}\n\nconst componentType = 'image'\nconst componentName = 'aplus_desc'\n\nconst Item = ({ index, item }: { index: number; item: AplusItem }) => {\n const ref = useRef<HTMLDivElement>(null)\n\n useExposure(ref, {\n componentType: componentType,\n componentName: componentName,\n position: index + 1,\n componentTitle: item.title,\n componentDescription: item.desc,\n })\n \n return (\n <div ref={ref} className=\"relative\">\n <Picture className=\" rounded-2xl\" imgClassName=\"\" source={item?.img?.url} alt={item?.img?.alt || ''} />\n <div\n className={cn(\n 'text-info-primary absolute bottom-[16px] left-[16px] flex flex-col desktop:bottom-[24px] desktop:left-[24px] lg-desktop:bottom-[32px] lg-desktop:left-[32px]',\n {\n 'aiui-dark': item.theme === 'dark',\n }\n )}\n >\n <Text html={item?.title} className=\" lg-desktop:text-[24px] text-[20px] font-bold leading-[1.2]\" />\n <Text html={item?.desc} className=\" lg-desktop:text-[16px] text-[14px] font-bold leading-[1.4]\" />\n </div>\n </div>\n )\n}\n\nconst AplusDesc = (props: AplusDescType) => {\n const { data, className } = props\n const { title, img, mobileImg, list } = data\n\n return (\n <>\n <div className=\"w-full\">\n <div className=\"flex desktop:items-center desktop:justify-between desktop:flex-row flex-col w-full\">\n <div className=\" desktop:w-[600px] lg-desktop:w-[800px]\">\n {title && (\n <Text\n html={title}\n className=\"desktop:text-[16px] lg-desktop:text-[18px] text-[14px] font-bold leading-[1.2]\"\n />\n )}\n </div>\n <div>\n {img?.url && (\n <Picture\n className=\"w-[464px] rounded-2xl hidden desktop:block\"\n imgClassName=\"\"\n source={data?.img?.url}\n alt={data?.img?.alt || ''}\n />\n )}\n {mobileImg?.url && (\n <Picture\n className=\"w-[224px] rounded-2xl block desktop:hidden\"\n imgClassName=\"\"\n source={data?.mobileImg?.url}\n alt={data?.mobileImg?.alt || ''}\n />\n )}\n </div>\n </div>\n <div className=\"mt-[24px] grid tablet:grid-cols-2 desktop:grid-cols-3 grid-cols-1 gap-[16px]\">\n {list.map((item, index) => (\n <Item key={index} index={index} item={item} />\n ))}\n </div>\n </div>\n </>\n )\n}\n\nexport default withLayout(AplusDesc)\n"],
5
+ "mappings": "sbAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA0CM,IAAAI,EAAA,6BAzCNC,EAAmB,kCAEnBC,EAA2B,kCAC3BC,EAA8B,qCAC9BC,EAA4B,sCAC5BC,EAAuB,iBAoBvB,MAAMC,EAAgB,QAChBC,EAAgB,aAEhBC,EAAO,CAAC,CAAE,MAAAC,EAAO,KAAAC,CAAK,IAA0C,CACpE,MAAMC,KAAM,UAAuB,IAAI,EAEvC,wBAAYA,EAAK,CACf,cAAeL,EACf,cAAeC,EACf,SAAUE,EAAQ,EAClB,eAAgBC,EAAK,MACrB,qBAAsBA,EAAK,IAC7B,CAAC,KAGC,QAAC,OAAI,IAAKC,EAAK,UAAU,WACvB,oBAAC,WAAQ,UAAU,eAAe,aAAa,GAAG,OAAQD,GAAM,KAAK,IAAK,IAAKA,GAAM,KAAK,KAAO,GAAI,KACrG,QAAC,OACC,aAAW,MACT,+JACA,CACE,YAAaA,EAAK,QAAU,MAC9B,CACF,EAEA,oBAAC,QAAK,KAAMA,GAAM,MAAO,UAAU,8DAA8D,KACjG,OAAC,QAAK,KAAMA,GAAM,KAAM,UAAU,8DAA8D,GAClG,GACF,CAEJ,EAEME,EAAaC,GAAyB,CAC1C,KAAM,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAIF,EACtB,CAAE,MAAAG,EAAO,IAAAC,EAAK,UAAAC,EAAW,KAAAC,CAAK,EAAIL,EAExC,SACE,mBACE,oBAAC,OAAI,UAAU,SACb,qBAAC,OAAI,UAAU,qFACb,oBAAC,OAAI,UAAU,0CACZ,SAAAE,MACC,OAAC,QACC,KAAMA,EACN,UAAU,iFACZ,EAEJ,KACA,QAAC,OACE,UAAAC,GAAK,QACJ,OAAC,WACC,UAAU,6CACV,aAAa,GACb,OAAQH,GAAM,KAAK,IACnB,IAAKA,GAAM,KAAK,KAAO,GACzB,EAEDI,GAAW,QACV,OAAC,WACC,UAAU,6CACV,aAAa,GACb,OAAQJ,GAAM,WAAW,IACzB,IAAKA,GAAM,WAAW,KAAO,GAC/B,GAEJ,GACF,KACA,OAAC,OAAI,UAAU,+EACZ,SAAAK,EAAK,IAAI,CAACT,EAAMD,OACf,OAACD,EAAA,CAAiB,MAAOC,EAAO,KAAMC,GAA3BD,CAAiC,CAC7C,EACH,GACF,EACF,CAEJ,EAEA,IAAOX,KAAQ,cAAWc,CAAS",
6
+ "names": ["AplusDesc_exports", "__export", "AplusDesc_default", "__toCommonJS", "import_jsx_runtime", "import_utils", "import_Styles", "import_components", "import_useExposure", "import_react", "componentType", "componentName", "Item", "index", "item", "ref", "AplusDesc", "props", "data", "className", "title", "img", "mobileImg", "list"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var w=Object.create;var a=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var P=(e,i)=>{for(var r in i)a(e,r,{get:i[r],enumerable:!0})},d=(e,i,r,l)=>{if(i&&typeof i=="object"||typeof i=="function")for(let o of u(i))!g.call(e,o)&&o!==r&&a(e,o,{get:()=>i[o],enumerable:!(l=m(i,o))||l.enumerable});return e};var M=(e,i,r)=>(r=e!=null?w(S(e)):{},d(i||!e||!e.__esModule?a(r,"default",{value:e,enumerable:!0}):r,e)),y=e=>d(a({},"__esModule",{value:!0}),e);var h={};P(h,{default:()=>B});module.exports=y(h);var t=require("react/jsx-runtime"),c=M(require("react")),n=require("swiper/react"),s=require("swiper/modules"),x=require("swiper/css"),k=require("swiper/css/pagination");const f=c.default.forwardRef(({data:e,Slide:i,id:r,pagination:l})=>(0,t.jsx)(n.Swiper,{freeMode:!0,mousewheel:{forceToAxis:!0},pagination:{clickable:!0,dynamicBullets:!1},className:"!overflow-visible",modules:[s.FreeMode,s.Mousewheel,s.Pagination],breakpoints:{0:{spaceBetween:16,freeMode:!1,slidesPerView:1,slidesPerGroup:1},376:{spaceBetween:16,freeMode:!1,slidesPerView:1,slidesPerGroup:1},767:{spaceBetween:16,freeMode:!1,slidesPerView:4,slidesPerGroup:4},1441:{spaceBetween:16,freeMode:!1,slidesPerView:Math.min(6,e?.list?.length),slidesPerGroup:Math.min(6,e?.list?.length)}},children:e?.list?.map((o,p)=>(0,t.jsx)(n.SwiperSlide,{className:"!h-[unset]",children:(0,t.jsx)(i,{data:o,configuration:{...e?.configuration,index:p}})},r+"SwiperSlide"+p))}));f.displayName="SwiperBox";var B=f;
1
+ "use strict";"use client";var m=Object.create;var a=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var M=(e,i)=>{for(var r in i)a(e,r,{get:i[r],enumerable:!0})},d=(e,i,r,l)=>{if(i&&typeof i=="object"||typeof i=="function")for(let o of S(i))!P.call(e,o)&&o!==r&&a(e,o,{get:()=>i[o],enumerable:!(l=u(i,o))||l.enumerable});return e};var y=(e,i,r)=>(r=e!=null?m(g(e)):{},d(i||!e||!e.__esModule?a(r,"default",{value:e,enumerable:!0}):r,e)),B=e=>d(a({},"__esModule",{value:!0}),e);var b={};M(b,{default:()=>h});module.exports=B(b);var t=require("react/jsx-runtime"),c=y(require("react")),n=require("swiper/react"),s=require("swiper/modules"),k=require("swiper/css"),G=require("swiper/css/pagination");const f=c.default.forwardRef(({data:e,Slide:i,id:r,pagination:l},o)=>(0,t.jsx)(n.Swiper,{freeMode:!0,mousewheel:{forceToAxis:!0},pagination:{clickable:!0,dynamicBullets:!1},className:"!overflow-visible",modules:[s.FreeMode,s.Mousewheel,s.Pagination],breakpoints:{0:{spaceBetween:16,freeMode:!1,slidesPerView:1,slidesPerGroup:1},376:{spaceBetween:16,freeMode:!1,slidesPerView:1,slidesPerGroup:1},767:{spaceBetween:16,freeMode:!1,slidesPerView:4,slidesPerGroup:4},1441:{spaceBetween:16,freeMode:!1,slidesPerView:Math.min(6,e?.list?.length),slidesPerGroup:Math.min(6,e?.list?.length)}},children:e?.list?.map((w,p)=>(0,t.jsx)(n.SwiperSlide,{className:"!h-[unset]",children:(0,t.jsx)(i,{data:w,configuration:{...e?.configuration,index:p}})},r+"SwiperSlide"+p))}));f.displayName="SwiperBox";var h=f;
2
2
  //# sourceMappingURL=SwiperCategory.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Category/SwiperCategory.tsx"],
4
- "sourcesContent": ["'use client'\nimport React from 'react'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Pagination, FreeMode, Mousewheel } from 'swiper/modules'\nimport 'swiper/css'\nimport 'swiper/css/pagination' // \u5206\u9875\u5668\u6837\u5F0F\n\nexport interface SwiperBoxProps {\n data: {\n list: any[]\n configuration?: any\n }\n pagination?: any\n id: string\n className?: string\n breakpoints?: Record<number, Object>\n Slide: React.ComponentType<{ data: any; configuration?: any }>\n}\n\nconst SwiperBox = React.forwardRef<HTMLDivElement, SwiperBoxProps>(({ data, Slide, id, pagination }) => {\n return (\n <Swiper\n freeMode={true}\n mousewheel={{\n forceToAxis: true,\n }}\n pagination={{\n clickable: true,\n dynamicBullets: false,\n }}\n className=\"!overflow-visible\"\n modules={[FreeMode, Mousewheel, Pagination]}\n breakpoints={{\n 0: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 1,\n slidesPerGroup: 1,\n },\n 376: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 1,\n slidesPerGroup: 1,\n },\n 767: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n slidesPerGroup: 4,\n },\n 1441: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: Math.min(6, data?.list?.length),\n slidesPerGroup: Math.min(6, data?.list?.length),\n },\n }}\n >\n {data?.list?.map((item, jIndex) => (\n <SwiperSlide key={id + 'SwiperSlide' + jIndex} className=\"!h-[unset]\">\n <Slide data={item} configuration={{...data?.configuration, index: jIndex}} />\n </SwiperSlide>\n ))}\n </Swiper>\n )\n})\n\nSwiperBox.displayName = 'SwiperBox'\n\nexport default SwiperBox\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA6DU,IAAAI,EAAA,6BA5DVC,EAAkB,oBAClBA,EAAoC,wBACpCC,EAAiD,0BACjDC,EAAO,sBACPC,EAAO,iCAcP,MAAMC,EAAY,EAAAC,QAAM,WAA2C,CAAC,CAAE,KAAAC,EAAM,MAAAC,EAAO,GAAAC,EAAI,WAAAC,CAAW,OAE9F,OAAC,UACC,SAAU,GACV,WAAY,CACV,YAAa,EACf,EACA,WAAY,CACV,UAAW,GACX,eAAgB,EAClB,EACA,UAAU,oBACV,QAAS,CAAC,WAAU,aAAY,YAAU,EAC1C,YAAa,CACX,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAe,EACf,eAAgB,CAClB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,EACf,eAAgB,CAClB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,EACf,eAAgB,CAClB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,KAAK,IAAI,EAAGH,GAAM,MAAM,MAAM,EAC7C,eAAgB,KAAK,IAAI,EAAGA,GAAM,MAAM,MAAM,CAChD,CACF,EAEC,SAAAA,GAAM,MAAM,IAAI,CAACI,EAAMC,OACtB,OAAC,eAA8C,UAAU,aACvD,mBAACJ,EAAA,CAAM,KAAMG,EAAM,cAAe,CAAC,GAAGJ,GAAM,cAAe,MAAOK,CAAM,EAAG,GAD3DH,EAAK,cAAgBG,CAEvC,CACD,EACH,CAEH,EAEDP,EAAU,YAAc,YAExB,IAAOP,EAAQO",
6
- "names": ["SwiperCategory_exports", "__export", "SwiperCategory_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_modules", "import_css", "import_pagination", "SwiperBox", "React", "data", "Slide", "id", "pagination", "item", "jIndex"]
4
+ "sourcesContent": ["'use client'\nimport React from 'react'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Pagination, FreeMode, Mousewheel } from 'swiper/modules'\nimport 'swiper/css'\nimport 'swiper/css/pagination' // \u5206\u9875\u5668\u6837\u5F0F\n\nexport interface SwiperBoxProps {\n data: {\n list: any[]\n configuration?: any\n }\n pagination?: any\n id: string\n className?: string\n breakpoints?: Record<number, Object>\n Slide: React.ComponentType<{ data: any; configuration?: any }>\n}\n\nconst SwiperBox = React.forwardRef<HTMLDivElement, SwiperBoxProps>(({ data, Slide, id, pagination }, ref) => {\n return (\n <Swiper\n freeMode={true}\n mousewheel={{\n forceToAxis: true,\n }}\n pagination={{\n clickable: true,\n dynamicBullets: false,\n }}\n className=\"!overflow-visible\"\n modules={[FreeMode, Mousewheel, Pagination]}\n breakpoints={{\n 0: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 1,\n slidesPerGroup: 1,\n },\n 376: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 1,\n slidesPerGroup: 1,\n },\n 767: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n slidesPerGroup: 4,\n },\n 1441: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: Math.min(6, data?.list?.length),\n slidesPerGroup: Math.min(6, data?.list?.length),\n },\n }}\n >\n {data?.list?.map((item, jIndex) => (\n <SwiperSlide key={id + 'SwiperSlide' + jIndex} className=\"!h-[unset]\">\n <Slide data={item} configuration={{ ...data?.configuration, index: jIndex }} />\n </SwiperSlide>\n ))}\n </Swiper>\n )\n})\n\nSwiperBox.displayName = 'SwiperBox'\n\nexport default SwiperBox\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA6DU,IAAAI,EAAA,6BA5DVC,EAAkB,oBAClBA,EAAoC,wBACpCC,EAAiD,0BACjDC,EAAO,sBACPC,EAAO,iCAcP,MAAMC,EAAY,EAAAC,QAAM,WAA2C,CAAC,CAAE,KAAAC,EAAM,MAAAC,EAAO,GAAAC,EAAI,WAAAC,CAAW,EAAGC,OAEjG,OAAC,UACC,SAAU,GACV,WAAY,CACV,YAAa,EACf,EACA,WAAY,CACV,UAAW,GACX,eAAgB,EAClB,EACA,UAAU,oBACV,QAAS,CAAC,WAAU,aAAY,YAAU,EAC1C,YAAa,CACX,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAe,EACf,eAAgB,CAClB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,EACf,eAAgB,CAClB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,EACf,eAAgB,CAClB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,KAAK,IAAI,EAAGJ,GAAM,MAAM,MAAM,EAC7C,eAAgB,KAAK,IAAI,EAAGA,GAAM,MAAM,MAAM,CAChD,CACF,EAEC,SAAAA,GAAM,MAAM,IAAI,CAACK,EAAMC,OACtB,OAAC,eAA8C,UAAU,aACvD,mBAACL,EAAA,CAAM,KAAMI,EAAM,cAAe,CAAE,GAAGL,GAAM,cAAe,MAAOM,CAAO,EAAG,GAD7DJ,EAAK,cAAgBI,CAEvC,CACD,EACH,CAEH,EAEDR,EAAU,YAAc,YAExB,IAAOP,EAAQO",
6
+ "names": ["SwiperCategory_exports", "__export", "SwiperCategory_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_modules", "import_css", "import_pagination", "SwiperBox", "React", "data", "Slide", "id", "pagination", "ref", "item", "jIndex"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var d=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var m=(s,l)=>{for(var p in l)d(s,p,{get:l[p],enumerable:!0})},c=(s,l,p,o)=>{if(l&&typeof l=="object"||typeof l=="function")for(let e of n(l))!g.call(s,e)&&e!==p&&d(s,e,{get:()=>l[e],enumerable:!(o=x(l,e))||o.enumerable});return s};var k=s=>c(d({},"__esModule",{value:!0}),s);var v={};m(v,{default:()=>u});module.exports=k(v);var t=require("react/jsx-runtime"),N=require("../../helpers/utils.js"),w=require("../SwiperBox/index.js"),r=require("../../shared/Styles.js"),a=require("../../components/index.js");const b=s=>{const{data:l,className:p}=s,{list:o}=l;return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"",children:[l?.title&&(0,t.jsx)("div",{className:"pb-[24px] desktop:w-[800px]",children:(0,t.jsx)(a.Text,{html:l?.title,className:" desktop:!text-[32px] line-clamp-3 lg-desktop:text-lg desktop:text-base !text-[24px] [&_*_strong]:!font-bold !leading-[1.2]"})}),l?.img?.url&&(0,t.jsx)(a.Picture,{className:"aspect-[1664/560] rounded-2xl md-tablet:hidden",imgClassName:"",source:l?.img?.url,alt:l?.img?.alt||""}),l?.mobileImg?.url&&(0,t.jsx)(a.Picture,{className:"aspect-[358/360] rounded-2xl tablet:hidden",imgClassName:"",source:l?.mobileImg?.url,alt:l?.mobileImg?.alt||""}),(0,t.jsx)("div",{className:"",children:(0,t.jsx)("div",{className:"flex flex-col gap-4",children:o.map((e,i)=>(0,t.jsxs)("div",{className:`desktop:flex pt-[64px] gap-4 tablet:gap-8 laptop:gap-[64px] ${i%2===0?"laptop:flex-row-reverse":""}`,children:[(0,t.jsxs)("div",{className:"flex flex-col flex-shrink-0 justify-center desktop:w-[500px] lg-desktop:w-[640px]",children:[(0,t.jsx)(a.Text,{html:e?.title,className:"graphic-title line-clamp-3 desktop:text-base desktop:text-[32px] text-[24px] [&_*_strong]:!font-bold leading-[1.2]"}),(0,t.jsx)(a.Text,{html:e?.description,className:"graphic-title pt-[4px] desktop:pt-[8px] lg-desktop:text-lg desktop:text-base lg-desktop:text-[18px] desktop:text-[16px] text-[14px] [&_*_strong]:!font-bold leading-[1.2]"}),e?.numberOne&&(0,t.jsxs)("div",{className:"desktop:pt-[48px] pt-[24px] flex desktop:flex-col flex-row desktop:gap-[48px] gap-[24px]",children:[(0,t.jsxs)("div",{className:"",children:[(0,t.jsx)(a.Text,{style:{background:"var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))",backgroundClip:"text",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",color:"transparent"},html:e?.numberOne,className:"graphic-title line-clamp-3 desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]"}),(0,t.jsx)(a.Text,{html:e?.textOne,className:"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{style:{background:"var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))",backgroundClip:"text",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",color:"transparent"},html:e?.numberTwo,className:"graphic-title line-clamp-3 desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]"}),(0,t.jsx)(a.Text,{html:e?.textTwo,className:"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]"})]})]}),e?.icon?.url&&(0,t.jsx)("div",{className:"pt-[24px] desktop:pt-[24px] lg-desktop:pt-[48px]",children:(0,t.jsx)(a.Picture,{className:"w-[358px] desktop:w-[368px] lg-desktop:w-[488px]",source:e?.icon?.url,alt:e?.icon?.alt||""})})]}),(0,t.jsx)("div",{className:"aspect-[964/560] md-tablet:hidden rounded-2xl overflow-hidden pt-[24px] laptop:pt-[32px] desktop:pt-[0px]",children:(0,t.jsx)(a.Picture,{className:"w-full h-full object-cover ",source:e?.img?.url,alt:e?.img?.alt||""})}),(0,t.jsx)("div",{className:"aspect-[358/360] tablet:hidden rounded-2xl overflow-hidden mt-[24px]",children:(0,t.jsx)(a.Picture,{className:"w-full h-full object-cover",source:e?.mobileImg?.url,alt:e?.mobileImg?.alt||""})})]},i))})})]})})};var u=(0,r.withLayout)(b);
1
+ "use strict";"use client";var i=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var u=(p,t)=>{for(var o in t)i(p,o,{get:t[o],enumerable:!0})},k=(p,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of c(t))!g.call(p,s)&&s!==o&&i(p,s,{get:()=>t[s],enumerable:!(a=m(t,s))||a.enumerable});return p};var b=p=>k(i({},"__esModule",{value:!0}),p);var y={};u(y,{default:()=>w});module.exports=b(y);var e=require("react/jsx-runtime"),I=require("../../helpers/utils.js"),F=require("../SwiperBox/index.js"),n=require("../../hooks/useExposure.js"),d=require("../../shared/Styles.js"),l=require("../../components/index.js"),x=require("react");const f="image",v="features",N=({index:p,item:t})=>{const o=(0,x.useRef)(null);return(0,n.useExposure)(o,{componentType:f,componentName:v,position:p+1,componentTitle:t.title,componentDescription:t.description}),(0,e.jsxs)("div",{className:`desktop:flex pt-[64px] gap-4 tablet:gap-8 laptop:gap-[64px] ${p%2===0?"laptop:flex-row-reverse":""}`,ref:o,children:[(0,e.jsxs)("div",{className:"flex flex-col flex-shrink-0 justify-center desktop:w-[500px] lg-desktop:w-[640px]",children:[(0,e.jsx)(l.Text,{html:t?.title,className:"graphic-title line-clamp-3 desktop:text-base desktop:text-[32px] text-[24px] [&_*_strong]:!font-bold leading-[1.2]"}),(0,e.jsx)(l.Text,{html:t?.description,className:"graphic-title pt-[4px] desktop:pt-[8px] lg-desktop:text-lg desktop:text-base lg-desktop:text-[18px] desktop:text-[16px] text-[14px] [&_*_strong]:!font-bold leading-[1.2]"}),t?.numberOne&&(0,e.jsxs)("div",{className:"desktop:pt-[48px] pt-[24px] flex desktop:flex-col flex-row desktop:gap-[48px] gap-[24px]",children:[(0,e.jsxs)("div",{className:"",children:[(0,e.jsx)(l.Text,{style:{background:"var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))",backgroundClip:"text",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",color:"transparent"},html:t?.numberOne,className:"graphic-title line-clamp-3 desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]"}),(0,e.jsx)(l.Text,{html:t?.textOne,className:"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]"})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)(l.Text,{style:{background:"var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))",backgroundClip:"text",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",color:"transparent"},html:t?.numberTwo,className:"graphic-title line-clamp-3 desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]"}),(0,e.jsx)(l.Text,{html:t?.textTwo,className:"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]"})]})]}),t?.icon?.url&&(0,e.jsx)("div",{className:"pt-[24px] desktop:pt-[24px] lg-desktop:pt-[48px]",children:(0,e.jsx)(l.Picture,{className:"w-[358px] desktop:w-[368px] lg-desktop:w-[488px]",source:t?.icon?.url,alt:t?.icon?.alt||""})})]}),(0,e.jsx)("div",{className:"aspect-[964/560] md-tablet:hidden rounded-2xl overflow-hidden pt-[24px] laptop:pt-[32px] desktop:pt-[0px]",children:(0,e.jsx)(l.Picture,{className:"w-full h-full object-cover ",source:t?.img?.url,alt:t?.img?.alt||""})}),(0,e.jsx)("div",{className:"aspect-[358/360] tablet:hidden rounded-2xl overflow-hidden mt-[24px]",children:(0,e.jsx)(l.Picture,{className:"w-full h-full object-cover",source:t?.mobileImg?.url,alt:t?.mobileImg?.alt||""})})]})},h=p=>{const{data:t,className:o}=p,{list:a}=t;return(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)("div",{className:"",children:[t?.title&&(0,e.jsx)("div",{className:"pb-[24px] desktop:w-[800px]",children:(0,e.jsx)(l.Text,{html:t?.title,className:" desktop:!text-[32px] line-clamp-3 lg-desktop:text-lg desktop:text-base !text-[24px] [&_*_strong]:!font-bold !leading-[1.2]"})}),t?.img?.url&&(0,e.jsx)(l.Picture,{className:"aspect-[1664/560] rounded-2xl md-tablet:hidden",imgClassName:"",source:t?.img?.url,alt:t?.img?.alt||""}),t?.mobileImg?.url&&(0,e.jsx)(l.Picture,{className:"aspect-[358/360] rounded-2xl tablet:hidden",imgClassName:"",source:t?.mobileImg?.url,alt:t?.mobileImg?.alt||""}),(0,e.jsx)("div",{className:"flex flex-col gap-4",children:a.map((s,r)=>(0,e.jsx)(N,{index:r,item:s},r))})]})})};var w=(0,d.withLayout)(h);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Features/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text } from '../../components/index.js'\n\nexport type FeaturesDataType = {\n img: Img\n mobileImg: Img\n title: string\n description: string\n numberOne: string\n textOne: string\n numberTwo: string\n textTwo: string\n icon: Img\n}\n\ntype FeaturesType = {\n data: {\n title: string\n img: Img\n mobileImg: Img\n list: FeaturesDataType[]\n }\n className?: string\n}\n\nconst Features = (props: FeaturesType) => {\n const { data, className } = props\n const { list } = data\n\n return (\n <>\n <div className=''>\n {data?.title && (\n <div className='pb-[24px] desktop:w-[800px]'>\n <Text\n html={data?.title}\n className=\" desktop:!text-[32px] line-clamp-3 lg-desktop:text-lg desktop:text-base !text-[24px] [&_*_strong]:!font-bold !leading-[1.2]\"\n />\n </div>\n )}\n\n {data?.img?.url && (\n <Picture\n className=\"aspect-[1664/560] rounded-2xl md-tablet:hidden\"\n imgClassName=\"\"\n source={data?.img?.url}\n alt={data?.img?.alt || ''}\n />\n )}\n {data?.mobileImg?.url && (\n <Picture\n className=\"aspect-[358/360] rounded-2xl tablet:hidden\"\n imgClassName=\"\"\n source={data?.mobileImg?.url}\n alt={data?.mobileImg?.alt || ''}\n />\n )}\n <div className=''>\n <div className='flex flex-col gap-4'>\n {list.map((item, index) => (\n <div key={index} className={`desktop:flex pt-[64px] gap-4 tablet:gap-8 laptop:gap-[64px] ${index % 2 === 0 ? 'laptop:flex-row-reverse' : ''}`}>\n <div className='flex flex-col flex-shrink-0 justify-center desktop:w-[500px] lg-desktop:w-[640px]'>\n <Text\n html={item?.title}\n className=\"graphic-title line-clamp-3 desktop:text-base desktop:text-[32px] text-[24px] [&_*_strong]:!font-bold leading-[1.2]\"\n />\n <Text\n html={item?.description}\n className=\"graphic-title pt-[4px] desktop:pt-[8px] lg-desktop:text-lg desktop:text-base lg-desktop:text-[18px] desktop:text-[16px] text-[14px] [&_*_strong]:!font-bold leading-[1.2]\"\n />\n {/* \u6E10\u53D8\u8272 */}\n {item?.numberOne && \n <div className='desktop:pt-[48px] pt-[24px] flex desktop:flex-col flex-row desktop:gap-[48px] gap-[24px]'>\n <div className=''>\n <Text\n style={{\n background: 'var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))',\n backgroundClip: 'text',\n WebkitBackgroundClip: 'text',\n WebkitTextFillColor: 'transparent',\n color: 'transparent', // \u5EFA\u8BAE\u52A0\u4E0A\uFF0C\u517C\u5BB9\u90E8\u5206\u6D4F\u89C8\u5668\n }}\n html={item?.numberOne}\n className=\"graphic-title line-clamp-3 desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]\"\n />\n <Text\n html={item?.textOne}\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]\"\n />\n </div>\n <div>\n <Text\n style={{\n background: 'var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))',\n backgroundClip: 'text',\n WebkitBackgroundClip: 'text',\n WebkitTextFillColor: 'transparent',\n color: 'transparent', // \u5EFA\u8BAE\u52A0\u4E0A\uFF0C\u517C\u5BB9\u90E8\u5206\u6D4F\u89C8\u5668\n }}\n html={item?.numberTwo}\n className=\"graphic-title line-clamp-3 desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]\"\n />\n <Text\n html={item?.textTwo}\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]\"\n />\n </div>\n \n \n </div>\n }\n {item?.icon?.url && \n <div className='pt-[24px] desktop:pt-[24px] lg-desktop:pt-[48px]'><Picture className='w-[358px] desktop:w-[368px] lg-desktop:w-[488px]' source={item?.icon?.url} alt={item?.icon?.alt || ''} /></div>\n }\n </div>\n <div className='aspect-[964/560] md-tablet:hidden rounded-2xl overflow-hidden pt-[24px] laptop:pt-[32px] desktop:pt-[0px]'>\n <Picture className='w-full h-full object-cover ' source={item?.img?.url} alt={item?.img?.alt || ''} />\n </div>\n <div className='aspect-[358/360] tablet:hidden rounded-2xl overflow-hidden mt-[24px]'>\n <Picture className='w-full h-full object-cover' source={item?.mobileImg?.url} alt={item?.mobileImg?.alt || ''} />\n </div>\n </div>\n ))}\n </div>\n </div>\n </div>\n </>\n )\n}\n\nexport default withLayout(Features)\n"],
5
- "mappings": "sbAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAkCI,IAAAI,EAAA,6BAjCJC,EAAmB,kCACnBC,EAAsB,iCAEtBC,EAA2B,kCAC3BC,EAA8B,qCAwB9B,MAAMC,EAAYC,GAAwB,CACxC,KAAM,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAIF,EACtB,CAAE,KAAAG,CAAK,EAAIF,EAEjB,SACE,mBACE,oBAAC,OAAI,UAAU,GACZ,UAAAA,GAAM,UACH,OAAC,OAAI,UAAU,8BACf,mBAAC,QACG,KAAMA,GAAM,MACZ,UAAU,8HACd,EACA,EAGHA,GAAM,KAAK,QACR,OAAC,WACG,UAAU,iDACV,aAAa,GACb,OAAQA,GAAM,KAAK,IACnB,IAAKA,GAAM,KAAK,KAAO,GAC3B,EAEHA,GAAM,WAAW,QACd,OAAC,WACG,UAAU,6CACV,aAAa,GACb,OAAQA,GAAM,WAAW,IACzB,IAAKA,GAAM,WAAW,KAAO,GACjC,KAEJ,OAAC,OAAI,UAAU,GACf,mBAAC,OAAI,UAAU,sBACV,SAAAE,EAAK,IAAI,CAACC,EAAMC,OACb,QAAC,OAAgB,UAAW,+DAA+DA,EAAQ,IAAM,EAAI,0BAA4B,EAAE,GACvI,qBAAC,OAAI,UAAU,oFACX,oBAAC,QACG,KAAMD,GAAM,MACZ,UAAU,qHACd,KACA,OAAC,QACG,KAAMA,GAAM,YACZ,UAAU,4KACd,EAECA,GAAM,cACP,QAAC,OAAI,UAAU,2FACX,qBAAC,OAAI,UAAU,GACX,oBAAC,QACD,MAAO,CACH,WAAY,6DACZ,eAAgB,OAChB,qBAAsB,OACtB,oBAAqB,cACrB,MAAO,aACX,EACA,KAAMA,GAAM,UACZ,UAAU,mHACd,KACA,OAAC,QACG,KAAMA,GAAM,QACZ,UAAU,wIACd,GACA,KACA,QAAC,OACG,oBAAC,QACG,MAAO,CACH,WAAY,6DACZ,eAAgB,OAChB,qBAAsB,OACtB,oBAAqB,cACrB,MAAO,aACX,EACA,KAAMA,GAAM,UACZ,UAAU,mHACd,KACA,OAAC,QACG,KAAMA,GAAM,QACZ,UAAU,wIACd,GACJ,GAGJ,EAECA,GAAM,MAAM,QACb,OAAC,OAAI,UAAU,mDAAmD,mBAAC,WAAQ,UAAU,mDAAmD,OAAQA,GAAM,MAAM,IAAK,IAAKA,GAAM,MAAM,KAAO,GAAI,EAAE,GAEnM,KACA,OAAC,OAAI,UAAU,4GACX,mBAAC,WAAQ,UAAU,8BAA8B,OAAQA,GAAM,KAAK,IAAK,IAAKA,GAAM,KAAK,KAAO,GAAI,EACxG,KACA,OAAC,OAAI,UAAU,uEACX,mBAAC,WAAQ,UAAU,6BAA6B,OAAQA,GAAM,WAAW,IAAK,IAAKA,GAAM,WAAW,KAAO,GAAI,EACnH,IA5DMC,CA6DV,CACH,EACL,EACA,GACF,EACF,CAEJ,EAEA,IAAOb,KAAQ,cAAWO,CAAQ",
6
- "names": ["Features_exports", "__export", "Features_default", "__toCommonJS", "import_jsx_runtime", "import_utils", "import_SwiperBox", "import_Styles", "import_components", "Features", "props", "data", "className", "list", "item", "index"]
4
+ "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text } from '../../components/index.js'\nimport { useRef } from 'react'\n\nexport type FeaturesDataType = {\n img: Img\n mobileImg: Img\n title: string\n description: string\n numberOne: string\n textOne: string\n numberTwo: string\n textTwo: string\n icon: Img\n}\n\ntype FeaturesType = {\n data: {\n title: string\n img: Img\n mobileImg: Img\n list: FeaturesDataType[]\n }\n className?: string\n}\n\nconst componentType = 'image'\nconst componentName = 'features'\n\nconst Item = ({ index, item }: { index: number; item: FeaturesDataType }) => {\n const ref = useRef<HTMLDivElement>(null)\n\n useExposure(ref, {\n componentType: componentType,\n componentName: componentName,\n position: index + 1,\n componentTitle: item.title,\n componentDescription: item.description,\n })\n\n return (\n <div\n className={`desktop:flex pt-[64px] gap-4 tablet:gap-8 laptop:gap-[64px] ${index % 2 === 0 ? 'laptop:flex-row-reverse' : ''}`}\n ref={ref}\n >\n <div className=\"flex flex-col flex-shrink-0 justify-center desktop:w-[500px] lg-desktop:w-[640px]\">\n <Text\n html={item?.title}\n className=\"graphic-title line-clamp-3 desktop:text-base desktop:text-[32px] text-[24px] [&_*_strong]:!font-bold leading-[1.2]\"\n />\n <Text\n html={item?.description}\n className=\"graphic-title pt-[4px] desktop:pt-[8px] lg-desktop:text-lg desktop:text-base lg-desktop:text-[18px] desktop:text-[16px] text-[14px] [&_*_strong]:!font-bold leading-[1.2]\"\n />\n {/* \u6E10\u53D8\u8272 */}\n {item?.numberOne && (\n <div className=\"desktop:pt-[48px] pt-[24px] flex desktop:flex-col flex-row desktop:gap-[48px] gap-[24px]\">\n <div className=\"\">\n <Text\n style={{\n background: 'var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))',\n backgroundClip: 'text',\n WebkitBackgroundClip: 'text',\n WebkitTextFillColor: 'transparent',\n color: 'transparent', // \u5EFA\u8BAE\u52A0\u4E0A\uFF0C\u517C\u5BB9\u90E8\u5206\u6D4F\u89C8\u5668\n }}\n html={item?.numberOne}\n className=\"graphic-title line-clamp-3 desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]\"\n />\n <Text\n html={item?.textOne}\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]\"\n />\n </div>\n <div>\n <Text\n style={{\n background: 'var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))',\n backgroundClip: 'text',\n WebkitBackgroundClip: 'text',\n WebkitTextFillColor: 'transparent',\n color: 'transparent', // \u5EFA\u8BAE\u52A0\u4E0A\uFF0C\u517C\u5BB9\u90E8\u5206\u6D4F\u89C8\u5668\n }}\n html={item?.numberTwo}\n className=\"graphic-title line-clamp-3 desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]\"\n />\n <Text\n html={item?.textTwo}\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]\"\n />\n </div>\n </div>\n )}\n {item?.icon?.url && (\n <div className=\"pt-[24px] desktop:pt-[24px] lg-desktop:pt-[48px]\">\n <Picture\n className=\"w-[358px] desktop:w-[368px] lg-desktop:w-[488px]\"\n source={item?.icon?.url}\n alt={item?.icon?.alt || ''}\n />\n </div>\n )}\n </div>\n <div className=\"aspect-[964/560] md-tablet:hidden rounded-2xl overflow-hidden pt-[24px] laptop:pt-[32px] desktop:pt-[0px]\">\n <Picture className=\"w-full h-full object-cover \" source={item?.img?.url} alt={item?.img?.alt || ''} />\n </div>\n <div className=\"aspect-[358/360] tablet:hidden rounded-2xl overflow-hidden mt-[24px]\">\n <Picture\n className=\"w-full h-full object-cover\"\n source={item?.mobileImg?.url}\n alt={item?.mobileImg?.alt || ''}\n />\n </div>\n </div>\n )\n}\n\nconst Features = (props: FeaturesType) => {\n const { data, className } = props\n const { list } = data\n\n return (\n <>\n <div className=\"\">\n {data?.title && (\n <div className=\"pb-[24px] desktop:w-[800px]\">\n <Text\n html={data?.title}\n className=\" desktop:!text-[32px] line-clamp-3 lg-desktop:text-lg desktop:text-base !text-[24px] [&_*_strong]:!font-bold !leading-[1.2]\"\n />\n </div>\n )}\n\n {data?.img?.url && (\n <Picture\n className=\"aspect-[1664/560] rounded-2xl md-tablet:hidden\"\n imgClassName=\"\"\n source={data?.img?.url}\n alt={data?.img?.alt || ''}\n />\n )}\n {data?.mobileImg?.url && (\n <Picture\n className=\"aspect-[358/360] rounded-2xl tablet:hidden\"\n imgClassName=\"\"\n source={data?.mobileImg?.url}\n alt={data?.mobileImg?.alt || ''}\n />\n )}\n <div className=\"flex flex-col gap-4\">\n {list.map((item, index) => (\n <Item key={index} index={index} item={item} />\n ))}\n </div>\n </div>\n </>\n )\n}\n\nexport default withLayout(Features)\n"],
5
+ "mappings": "sbAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAmDQ,IAAAI,EAAA,6BAlDRC,EAAmB,kCACnBC,EAAsB,iCACtBC,EAA4B,sCAE5BC,EAA2B,kCAC3BC,EAA8B,qCAC9BC,EAAuB,iBAwBvB,MAAMC,EAAgB,QAChBC,EAAgB,WAEhBC,EAAO,CAAC,CAAE,MAAAC,EAAO,KAAAC,CAAK,IAAiD,CAC3E,MAAMC,KAAM,UAAuB,IAAI,EAEvC,wBAAYA,EAAK,CACf,cAAeL,EACf,cAAeC,EACf,SAAUE,EAAQ,EAClB,eAAgBC,EAAK,MACrB,qBAAsBA,EAAK,WAC7B,CAAC,KAGC,QAAC,OACC,UAAW,+DAA+DD,EAAQ,IAAM,EAAI,0BAA4B,EAAE,GAC1H,IAAKE,EAEL,qBAAC,OAAI,UAAU,oFACb,oBAAC,QACC,KAAMD,GAAM,MACZ,UAAU,qHACZ,KACA,OAAC,QACC,KAAMA,GAAM,YACZ,UAAU,4KACZ,EAECA,GAAM,cACL,QAAC,OAAI,UAAU,2FACb,qBAAC,OAAI,UAAU,GACb,oBAAC,QACC,MAAO,CACL,WAAY,6DACZ,eAAgB,OAChB,qBAAsB,OACtB,oBAAqB,cACrB,MAAO,aACT,EACA,KAAMA,GAAM,UACZ,UAAU,mHACZ,KACA,OAAC,QACC,KAAMA,GAAM,QACZ,UAAU,wIACZ,GACF,KACA,QAAC,OACC,oBAAC,QACC,MAAO,CACL,WAAY,6DACZ,eAAgB,OAChB,qBAAsB,OACtB,oBAAqB,cACrB,MAAO,aACT,EACA,KAAMA,GAAM,UACZ,UAAU,mHACZ,KACA,OAAC,QACC,KAAMA,GAAM,QACZ,UAAU,wIACZ,GACF,GACF,EAEDA,GAAM,MAAM,QACX,OAAC,OAAI,UAAU,mDACb,mBAAC,WACC,UAAU,mDACV,OAAQA,GAAM,MAAM,IACpB,IAAKA,GAAM,MAAM,KAAO,GAC1B,EACF,GAEJ,KACA,OAAC,OAAI,UAAU,4GACb,mBAAC,WAAQ,UAAU,8BAA8B,OAAQA,GAAM,KAAK,IAAK,IAAKA,GAAM,KAAK,KAAO,GAAI,EACtG,KACA,OAAC,OAAI,UAAU,uEACb,mBAAC,WACC,UAAU,6BACV,OAAQA,GAAM,WAAW,IACzB,IAAKA,GAAM,WAAW,KAAO,GAC/B,EACF,GACF,CAEJ,EAEME,EAAYC,GAAwB,CACxC,KAAM,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAIF,EACtB,CAAE,KAAAG,CAAK,EAAIF,EAEjB,SACE,mBACE,oBAAC,OAAI,UAAU,GACZ,UAAAA,GAAM,UACL,OAAC,OAAI,UAAU,8BACb,mBAAC,QACC,KAAMA,GAAM,MACZ,UAAU,8HACZ,EACF,EAGDA,GAAM,KAAK,QACV,OAAC,WACC,UAAU,iDACV,aAAa,GACb,OAAQA,GAAM,KAAK,IACnB,IAAKA,GAAM,KAAK,KAAO,GACzB,EAEDA,GAAM,WAAW,QAChB,OAAC,WACC,UAAU,6CACV,aAAa,GACb,OAAQA,GAAM,WAAW,IACzB,IAAKA,GAAM,WAAW,KAAO,GAC/B,KAEF,OAAC,OAAI,UAAU,sBACZ,SAAAE,EAAK,IAAI,CAACN,EAAMD,OACf,OAACD,EAAA,CAAiB,MAAOC,EAAO,KAAMC,GAA3BD,CAAiC,CAC7C,EACH,GACF,EACF,CAEJ,EAEA,IAAOZ,KAAQ,cAAWe,CAAQ",
6
+ "names": ["Features_exports", "__export", "Features_default", "__toCommonJS", "import_jsx_runtime", "import_utils", "import_SwiperBox", "import_useExposure", "import_Styles", "import_components", "import_react", "componentType", "componentName", "Item", "index", "item", "ref", "Features", "props", "data", "className", "list"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var p=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var x=(e,l)=>{for(var o in l)p(e,o,{get:l[o],enumerable:!0})},f=(e,l,o,i)=>{if(l&&typeof l=="object"||typeof l=="function")for(let t of g(l))!c.call(e,t)&&t!==o&&p(e,t,{get:()=>l[t],enumerable:!(i=d(l,t))||i.enumerable});return e};var n=e=>f(p({},"__esModule",{value:!0}),e);var N={};x(N,{default:()=>y});module.exports=n(N);var a=require("react/jsx-runtime"),v=require("../../helpers/utils.js"),B=require("../SwiperBox/index.js"),m=require("../../shared/Styles.js"),s=require("../../components/index.js");const u=e=>{const{data:l,className:o}=e,{list:i}=l;return(0,a.jsx)("div",{className:"w-full bg-[#EAEAEC] rounded-2xl",children:(0,a.jsx)("div",{className:"grid grid-cols-2 gap-3 laptop:gap-4 tablet:grid-cols-4 laptop:grid-cols-3 desktop:grid-cols-5 lg-desktop:grid-cols-6",children:i.map((t,r)=>(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center laptop:p-[20px] p-[12px]",children:[(0,a.jsxs)("div",{children:[t?.img?.url&&(0,a.jsx)(s.Picture,{className:"aspect-[194/194] l-tablet:hidden",imgClassName:"",source:t?.img?.url,alt:t?.img?.alt||""}),t?.mobileImg?.url&&(0,a.jsx)(s.Picture,{className:"aspect-[120/120] laptop:hidden",imgClassName:"",source:t?.mobileImg?.url,alt:t?.mobileImg?.alt||""})]}),(0,a.jsx)(s.Text,{html:t?.title,className:"text-[14px] font-bold leading-[1.4] laptop:text-[18px]"})]},r))})})};var y=(0,m.withLayout)(u);
1
+ "use strict";"use client";var s=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var x=(e,t)=>{for(var l in t)s(e,l,{get:t[l],enumerable:!0})},u=(e,t,l,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of d(t))!f.call(e,i)&&i!==l&&s(e,i,{get:()=>t[i],enumerable:!(a=g(t,i))||a.enumerable});return e};var y=e=>u(s({},"__esModule",{value:!0}),e);var B={};x(B,{default:()=>I});module.exports=y(B);var o=require("react/jsx-runtime"),E=require("../../helpers/utils.js"),k=require("../SwiperBox/index.js"),r=require("../../shared/Styles.js"),p=require("../../components/index.js"),c=require("../../hooks/useExposure.js"),n=require("react");const N="image",b="gift_box",T=({index:e,item:t})=>{const l=(0,n.useRef)(null);return(0,c.useExposure)(l,{componentType:N,componentName:b,position:e+1,componentTitle:t.title}),(0,o.jsxs)("div",{className:"flex flex-col items-center justify-center laptop:p-[20px] p-[12px]",children:[(0,o.jsxs)("div",{children:[t?.img?.url&&(0,o.jsx)(p.Picture,{className:"aspect-[194/194] l-tablet:hidden",imgClassName:"",source:t?.img?.url,alt:t?.img?.alt||""}),t?.mobileImg?.url&&(0,o.jsx)(p.Picture,{className:"aspect-[120/120] laptop:hidden",imgClassName:"",source:t?.mobileImg?.url,alt:t?.mobileImg?.alt||""})]}),(0,o.jsx)(p.Text,{html:t?.title,className:"text-[14px] font-bold leading-[1.4] laptop:text-[18px]"})]},e)},v=e=>{const{data:t,className:l}=e,{list:a}=t;return(0,o.jsx)("div",{className:"w-full bg-[#EAEAEC] rounded-2xl",children:(0,o.jsx)("div",{className:"grid grid-cols-2 gap-3 laptop:gap-4 tablet:grid-cols-4 laptop:grid-cols-3 desktop:grid-cols-5 lg-desktop:grid-cols-6",children:a.map((i,m)=>(0,o.jsx)(T,{index:m,item:i},m))})})};var I=(0,r.withLayout)(v);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/GiftBox/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text } from '../../components/index.js'\n\nexport type GiftBoxDataType = {\n img: Img\n mobileImg: Img\n title: string\n}\n\ntype GiftBoxType = {\n data: {\n list: GiftBoxDataType[]\n }\n className?: string\n}\n\nconst GiftBox = (props: GiftBoxType) => {\n const { data, className } = props\n const { list } = data\n\n return (\n <div className=\"w-full bg-[#EAEAEC] rounded-2xl\">\n <div className=\"grid grid-cols-2 gap-3 laptop:gap-4 tablet:grid-cols-4 laptop:grid-cols-3 desktop:grid-cols-5 lg-desktop:grid-cols-6\">\n {list.map((item, index) => (\n <div key={index} className=\"flex flex-col items-center justify-center laptop:p-[20px] p-[12px]\">\n <div>\n {item?.img?.url && (\n <Picture\n className=\"aspect-[194/194] l-tablet:hidden\"\n imgClassName=\"\"\n source={item?.img?.url}\n alt={item?.img?.alt || ''}\n />\n )}\n {item?.mobileImg?.url && (\n <Picture\n className=\"aspect-[120/120] laptop:hidden\"\n imgClassName=\"\"\n source={item?.mobileImg?.url}\n alt={item?.mobileImg?.alt || ''}\n />\n )}\n </div>\n <Text html={item?.title} className=\"text-[14px] font-bold leading-[1.4] laptop:text-[18px]\" />\n </div>\n ))}\n </div>\n </div>\n )\n}\n\nexport default withLayout(GiftBox)\n"],
5
- "mappings": "sbAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA6BY,IAAAI,EAAA,6BA5BZC,EAAmB,kCACnBC,EAAsB,iCAEtBC,EAA2B,kCAC3BC,EAA8B,qCAe9B,MAAMC,EAAWC,GAAuB,CACtC,KAAM,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAIF,EACtB,CAAE,KAAAG,CAAK,EAAIF,EAEjB,SACE,OAAC,OAAI,UAAU,kCACb,mBAAC,OAAI,UAAU,uHACZ,SAAAE,EAAK,IAAI,CAACC,EAAMC,OACf,QAAC,OAAgB,UAAU,qEACzB,qBAAC,OACE,UAAAD,GAAM,KAAK,QACV,OAAC,WACC,UAAU,mCACV,aAAa,GACb,OAAQA,GAAM,KAAK,IACnB,IAAKA,GAAM,KAAK,KAAO,GACzB,EAEDA,GAAM,WAAW,QAChB,OAAC,WACC,UAAU,iCACV,aAAa,GACb,OAAQA,GAAM,WAAW,IACzB,IAAKA,GAAM,WAAW,KAAO,GAC/B,GAEJ,KACA,OAAC,QAAK,KAAMA,GAAM,MAAO,UAAU,yDAAyD,IAnBpFC,CAoBV,CACD,EACH,EACF,CAEJ,EAEA,IAAOb,KAAQ,cAAWO,CAAO",
6
- "names": ["GiftBox_exports", "__export", "GiftBox_default", "__toCommonJS", "import_jsx_runtime", "import_utils", "import_SwiperBox", "import_Styles", "import_components", "GiftBox", "props", "data", "className", "list", "item", "index"]
4
+ "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text } from '../../components/index.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { useRef } from 'react'\n\nexport type GiftBoxDataType = {\n img: Img\n mobileImg: Img\n title: string\n}\n\ntype GiftBoxType = {\n data: {\n list: GiftBoxDataType[]\n }\n className?: string\n}\n\nconst componentType = 'image'\nconst componentName = 'gift_box'\n\nconst Item = ({ index, item }: { index: number; item: GiftBoxDataType }) => {\n const ref = useRef<HTMLDivElement>(null)\n\n useExposure(ref, {\n componentType: componentType,\n componentName: componentName,\n position: index + 1,\n componentTitle: item.title,\n })\n return (\n <div key={index} className=\"flex flex-col items-center justify-center laptop:p-[20px] p-[12px]\">\n <div>\n {item?.img?.url && (\n <Picture\n className=\"aspect-[194/194] l-tablet:hidden\"\n imgClassName=\"\"\n source={item?.img?.url}\n alt={item?.img?.alt || ''}\n />\n )}\n {item?.mobileImg?.url && (\n <Picture\n className=\"aspect-[120/120] laptop:hidden\"\n imgClassName=\"\"\n source={item?.mobileImg?.url}\n alt={item?.mobileImg?.alt || ''}\n />\n )}\n </div>\n <Text html={item?.title} className=\"text-[14px] font-bold leading-[1.4] laptop:text-[18px]\" />\n </div>\n )\n}\n\nconst GiftBox = (props: GiftBoxType) => {\n const { data, className } = props\n const { list } = data\n\n return (\n <div className=\"w-full bg-[#EAEAEC] rounded-2xl\">\n <div className=\"grid grid-cols-2 gap-3 laptop:gap-4 tablet:grid-cols-4 laptop:grid-cols-3 desktop:grid-cols-5 lg-desktop:grid-cols-6\">\n {list.map((item, index) => (\n <Item key={index} index={index} item={item} />\n ))}\n </div>\n </div>\n )\n}\n\nexport default withLayout(GiftBox)\n"],
5
+ "mappings": "sbAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAoCM,IAAAI,EAAA,6BAnCNC,EAAmB,kCACnBC,EAAsB,iCAEtBC,EAA2B,kCAC3BC,EAA8B,qCAC9BC,EAA4B,sCAC5BC,EAAuB,iBAevB,MAAMC,EAAgB,QAChBC,EAAgB,WAEhBC,EAAO,CAAC,CAAE,MAAAC,EAAO,KAAAC,CAAK,IAAgD,CAC1E,MAAMC,KAAM,UAAuB,IAAI,EAEvC,wBAAYA,EAAK,CACf,cAAeL,EACf,cAAeC,EACf,SAAUE,EAAQ,EAClB,eAAgBC,EAAK,KACvB,CAAC,KAEC,QAAC,OAAgB,UAAU,qEACzB,qBAAC,OACE,UAAAA,GAAM,KAAK,QACV,OAAC,WACC,UAAU,mCACV,aAAa,GACb,OAAQA,GAAM,KAAK,IACnB,IAAKA,GAAM,KAAK,KAAO,GACzB,EAEDA,GAAM,WAAW,QAChB,OAAC,WACC,UAAU,iCACV,aAAa,GACb,OAAQA,GAAM,WAAW,IACzB,IAAKA,GAAM,WAAW,KAAO,GAC/B,GAEJ,KACA,OAAC,QAAK,KAAMA,GAAM,MAAO,UAAU,yDAAyD,IAnBpFD,CAoBV,CAEJ,EAEMG,EAAWC,GAAuB,CACtC,KAAM,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAIF,EACtB,CAAE,KAAAG,CAAK,EAAIF,EAEjB,SACE,OAAC,OAAI,UAAU,kCACb,mBAAC,OAAI,UAAU,uHACZ,SAAAE,EAAK,IAAI,CAACN,EAAMD,OACf,OAACD,EAAA,CAAiB,MAAOC,EAAO,KAAMC,GAA3BD,CAAiC,CAC7C,EACH,EACF,CAEJ,EAEA,IAAOZ,KAAQ,cAAWe,CAAO",
6
+ "names": ["GiftBox_exports", "__export", "GiftBox_default", "__toCommonJS", "import_jsx_runtime", "import_utils", "import_SwiperBox", "import_Styles", "import_components", "import_useExposure", "import_react", "componentType", "componentName", "Item", "index", "item", "ref", "GiftBox", "props", "data", "className", "list"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var d=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var N=(e,t)=>{for(var a in t)d(e,a,{get:t[a],enumerable:!0})},E=(e,t,a,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of y(t))!h.call(e,r)&&r!==a&&d(e,r,{get:()=>t[r],enumerable:!(l=v(t,r))||l.enumerable});return e};var k=e=>E(d({},"__esModule",{value:!0}),e);var D={};N(D,{default:()=>C});module.exports=k(D);var o=require("react/jsx-runtime"),x=require("../../utils/index.js"),s=require("../../../AiuiProvider/index.js"),n=require("../../../../components/index.js"),p=require("../../../../helpers/index.js"),m=require("./type.js");const w=({item:e,index:t,active:a,toggleShipping:l,currencyCode:r,metafields:c,className:b=""})=>{const{trackingData:u,locale:f="us"}=(0,s.useAiuiContext)(),g=u?.common?.copywriting;return(0,o.jsxs)("div",{role:"button",tabIndex:0,onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&l(e,t)},className:(0,p.cn)("relative flex cursor-pointer gap-[16px] overflow-hidden rounded-xl laptop:rounded-2xl border-[2px] border-[#E8E8E8] p-4 laptop:py-5 text-[#1F2021]",{"cursor-not-allowed opacity-60":e.disabled,"border-brand":a},b),onClick:()=>l(e,t),children:[(0,o.jsxs)("div",{className:"relative",children:[(0,o.jsx)(n.Text,{className:(0,p.cn)("text-[14px] font-bold leading-[1.4] laptop:text-[16px] lg-desktop:text-[18px]",{}),as:"p",html:e.title}),(0,o.jsx)(n.Text,{className:(0,p.cn)("mt-[8px] text-[12px] font-bold leading-[1.4] text-[#6D6D6F] laptop:text-[14px]",{}),as:"p",html:e.subtitle})]}),(0,o.jsx)(n.Text,{className:(0,p.cn)("relative text-xl font-bold h-fit my-auto",{}),as:"p",html:e.price?(0,x.formatPrice)({amount:e.price,currencyCode:r,locale:f,removeTrailingZeros:!0}):g?.free}),e.mode!==m.ShippingMethodMode.FREE&&(0,o.jsx)("div",{className:(0,p.cn)("absolute -right-[1px] -top-[1px] rounded-bl-[8px] rounded-tr-[8px] bg-brand px-[8px] py-[3px] text-[12px] font-bold leading-[1.4] text-white"),children:c?.memberOnly})]})};var C=w;
1
+ "use strict";var i=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var N=(e,t)=>{for(var a in t)i(e,a,{get:t[a],enumerable:!0})},w=(e,t,a,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of v(t))!h.call(e,r)&&r!==a&&i(e,r,{get:()=>t[r],enumerable:!(n=y(t,r))||n.enumerable});return e};var E=e=>w(i({},"__esModule",{value:!0}),e);var D={};N(D,{default:()=>C});module.exports=E(D);var o=require("react/jsx-runtime"),x=require("../../utils/index.js"),s=require("../../../AiuiProvider/index.js"),l=require("../../../../components/index.js"),p=require("../../../../helpers/index.js"),m=require("./type.js");const k=({item:e,index:t,active:a,toggleShipping:n,currencyCode:r,metafields:c,className:b=""})=>{const{trackingData:u,locale:f="us"}=(0,s.useAiuiContext)(),g=u?.common?.copywriting;return(0,o.jsxs)("div",{role:"button",tabIndex:0,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&n(e,t)},className:(0,p.cn)("relative flex cursor-pointer gap-[16px] justify-between overflow-hidden rounded-xl laptop:rounded-2xl border-[2px] border-[#E8E8E8] p-4 laptop:py-5 text-[#1F2021]",{"cursor-not-allowed opacity-60":e.disabled,"border-brand":a},b),onClick:()=>n(e,t),children:[(0,o.jsxs)("div",{className:"relative",children:[(0,o.jsx)(l.Text,{className:(0,p.cn)("text-[14px] font-bold leading-[1.4] laptop:text-[16px] lg-desktop:text-[18px]",{}),as:"p",html:e.title}),(0,o.jsx)(l.Text,{className:(0,p.cn)("mt-[8px] text-[12px] font-bold leading-[1.4] text-[#6D6D6F] laptop:text-[14px]",{}),as:"p",html:e.subtitle})]}),(0,o.jsx)(l.Text,{className:(0,p.cn)("relative text-xl font-bold h-fit my-auto",{}),as:"p",html:e.price?(0,x.formatPrice)({amount:e.price,currencyCode:r,locale:f,removeTrailingZeros:!0}):g?.free}),e.mode!==m.ShippingMethodMode.FREE&&(0,o.jsx)("div",{className:(0,p.cn)("absolute -right-[1px] -top-[1px] rounded-bl-[8px] rounded-tr-[8px] bg-brand px-[8px] py-[3px] text-[12px] font-bold leading-[1.4] text-white"),children:c?.memberOnly})]})};var C=k;
2
2
  //# sourceMappingURL=ShippingMethod.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/biz-components/Listing/components/PaidShipping/ShippingMethod.tsx"],
4
- "sourcesContent": ["import { formatPrice } from '../../utils/index.js'\nimport { useAiuiContext } from '../../../AiuiProvider/index.js'\nimport { Text } from '../../../../components/index.js'\nimport { cn } from '../../../../helpers/index.js'\nimport { ShippingMethodMode } from './type.js'\n\nconst ShippingMethod = ({\n item,\n index,\n active,\n toggleShipping,\n currencyCode,\n metafields,\n className = '',\n}: {\n item: any\n index: number\n active: boolean\n toggleShipping: (item: any, index: number) => void\n currencyCode: string\n metafields: any\n className?: string\n}) => {\n const { trackingData, locale = 'us' } = useAiuiContext()\n const shopCommon = trackingData?.common?.copywriting\n\n return (\n <div\n role=\"button\"\n tabIndex={0}\n onKeyDown={e => {\n if (e.key === 'Enter' || e.key === ' ') {\n toggleShipping(item, index)\n }\n }}\n className={cn(\n 'relative flex cursor-pointer gap-[16px] overflow-hidden rounded-xl laptop:rounded-2xl border-[2px] border-[#E8E8E8] p-4 laptop:py-5 text-[#1F2021]',\n {\n 'cursor-not-allowed opacity-60': item.disabled,\n 'border-brand': active,\n },\n className\n )}\n onClick={() => toggleShipping(item, index)}\n >\n <div className=\"relative\">\n <Text\n className={cn('text-[14px] font-bold leading-[1.4] laptop:text-[16px] lg-desktop:text-[18px]', {})}\n as=\"p\"\n html={item.title}\n />\n <Text\n className={cn('mt-[8px] text-[12px] font-bold leading-[1.4] text-[#6D6D6F] laptop:text-[14px]', {})}\n as=\"p\"\n html={item.subtitle}\n />\n </div>\n\n <Text\n className={cn('relative text-xl font-bold h-fit my-auto', {})}\n as=\"p\"\n html={\n item.price\n ? formatPrice({\n amount: item.price,\n currencyCode,\n locale,\n removeTrailingZeros: true,\n })\n : shopCommon?.free\n }\n />\n {item.mode !== ShippingMethodMode.FREE && (\n <div\n className={cn(\n 'absolute -right-[1px] -top-[1px] rounded-bl-[8px] rounded-tr-[8px] bg-brand px-[8px] py-[3px] text-[12px] font-bold leading-[1.4] text-white'\n )}\n >\n {metafields?.memberOnly}\n </div>\n )}\n </div>\n )\n}\n\nexport default ShippingMethod"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA6CM,IAAAI,EAAA,6BA7CNC,EAA4B,gCAC5BC,EAA+B,0CAC/BC,EAAqB,2CACrBC,EAAmB,wCACnBC,EAAmC,qBAEnC,MAAMC,EAAiB,CAAC,CACtB,KAAAC,EACA,MAAAC,EACA,OAAAC,EACA,eAAAC,EACA,aAAAC,EACA,WAAAC,EACA,UAAAC,EAAY,EACd,IAQM,CACJ,KAAM,CAAE,aAAAC,EAAc,OAAAC,EAAS,IAAK,KAAI,kBAAe,EACjDC,EAAaF,GAAc,QAAQ,YAEzC,SACE,QAAC,OACC,KAAK,SACL,SAAU,EACV,UAAWG,GAAK,EACVA,EAAE,MAAQ,SAAWA,EAAE,MAAQ,MACjCP,EAAeH,EAAMC,CAAK,CAE9B,EACA,aAAW,MACT,qJACA,CACE,gCAAiCD,EAAK,SACtC,eAAgBE,CAClB,EACAI,CACF,EACA,QAAS,IAAMH,EAAeH,EAAMC,CAAK,EAEzC,qBAAC,OAAI,UAAU,WACb,oBAAC,QACC,aAAW,MAAG,gFAAiF,CAAC,CAAC,EACjG,GAAG,IACH,KAAMD,EAAK,MACb,KACA,OAAC,QACC,aAAW,MAAG,iFAAkF,CAAC,CAAC,EAClG,GAAG,IACH,KAAMA,EAAK,SACb,GACF,KAEA,OAAC,QACC,aAAW,MAAG,2CAA4C,CAAC,CAAC,EAC5D,GAAG,IACH,KACEA,EAAK,SACD,eAAY,CACV,OAAQA,EAAK,MACb,aAAAI,EACA,OAAAI,EACA,oBAAqB,EACvB,CAAC,EACDC,GAAY,KAEpB,EACCT,EAAK,OAAS,qBAAmB,SAChC,OAAC,OACC,aAAW,MACT,8IACF,EAEC,SAAAK,GAAY,WACf,GAEJ,CAEJ,EAEA,IAAOd,EAAQQ",
4
+ "sourcesContent": ["import { formatPrice } from '../../utils/index.js'\nimport { useAiuiContext } from '../../../AiuiProvider/index.js'\nimport { Text } from '../../../../components/index.js'\nimport { cn } from '../../../../helpers/index.js'\nimport { ShippingMethodMode } from './type.js'\n\nconst ShippingMethod = ({\n item,\n index,\n active,\n toggleShipping,\n currencyCode,\n metafields,\n className = '',\n}: {\n item: any\n index: number\n active: boolean\n toggleShipping: (item: any, index: number) => void\n currencyCode: string\n metafields: any\n className?: string\n}) => {\n const { trackingData, locale = 'us' } = useAiuiContext()\n const shopCommon = trackingData?.common?.copywriting\n\n return (\n <div\n role=\"button\"\n tabIndex={0}\n onKeyDown={e => {\n if (e.key === 'Enter' || e.key === ' ') {\n toggleShipping(item, index)\n }\n }}\n className={cn(\n 'relative flex cursor-pointer gap-[16px] justify-between overflow-hidden rounded-xl laptop:rounded-2xl border-[2px] border-[#E8E8E8] p-4 laptop:py-5 text-[#1F2021]',\n {\n 'cursor-not-allowed opacity-60': item.disabled,\n 'border-brand': active,\n },\n className\n )}\n onClick={() => toggleShipping(item, index)}\n >\n <div className=\"relative\">\n <Text\n className={cn('text-[14px] font-bold leading-[1.4] laptop:text-[16px] lg-desktop:text-[18px]', {})}\n as=\"p\"\n html={item.title}\n />\n <Text\n className={cn('mt-[8px] text-[12px] font-bold leading-[1.4] text-[#6D6D6F] laptop:text-[14px]', {})}\n as=\"p\"\n html={item.subtitle}\n />\n </div>\n\n <Text\n className={cn('relative text-xl font-bold h-fit my-auto', {})}\n as=\"p\"\n html={\n item.price\n ? formatPrice({\n amount: item.price,\n currencyCode,\n locale,\n removeTrailingZeros: true,\n })\n : shopCommon?.free\n }\n />\n {item.mode !== ShippingMethodMode.FREE && (\n <div\n className={cn(\n 'absolute -right-[1px] -top-[1px] rounded-bl-[8px] rounded-tr-[8px] bg-brand px-[8px] py-[3px] text-[12px] font-bold leading-[1.4] text-white'\n )}\n >\n {metafields?.memberOnly}\n </div>\n )}\n </div>\n )\n}\n\nexport default ShippingMethod"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA6CM,IAAAI,EAAA,6BA7CNC,EAA4B,gCAC5BC,EAA+B,0CAC/BC,EAAqB,2CACrBC,EAAmB,wCACnBC,EAAmC,qBAEnC,MAAMC,EAAiB,CAAC,CACtB,KAAAC,EACA,MAAAC,EACA,OAAAC,EACA,eAAAC,EACA,aAAAC,EACA,WAAAC,EACA,UAAAC,EAAY,EACd,IAQM,CACJ,KAAM,CAAE,aAAAC,EAAc,OAAAC,EAAS,IAAK,KAAI,kBAAe,EACjDC,EAAaF,GAAc,QAAQ,YAEzC,SACE,QAAC,OACC,KAAK,SACL,SAAU,EACV,UAAWG,GAAK,EACVA,EAAE,MAAQ,SAAWA,EAAE,MAAQ,MACjCP,EAAeH,EAAMC,CAAK,CAE9B,EACA,aAAW,MACT,sKACA,CACE,gCAAiCD,EAAK,SACtC,eAAgBE,CAClB,EACAI,CACF,EACA,QAAS,IAAMH,EAAeH,EAAMC,CAAK,EAEzC,qBAAC,OAAI,UAAU,WACb,oBAAC,QACC,aAAW,MAAG,gFAAiF,CAAC,CAAC,EACjG,GAAG,IACH,KAAMD,EAAK,MACb,KACA,OAAC,QACC,aAAW,MAAG,iFAAkF,CAAC,CAAC,EAClG,GAAG,IACH,KAAMA,EAAK,SACb,GACF,KAEA,OAAC,QACC,aAAW,MAAG,2CAA4C,CAAC,CAAC,EAC5D,GAAG,IACH,KACEA,EAAK,SACD,eAAY,CACV,OAAQA,EAAK,MACb,aAAAI,EACA,OAAAI,EACA,oBAAqB,EACvB,CAAC,EACDC,GAAY,KAEpB,EACCT,EAAK,OAAS,qBAAmB,SAChC,OAAC,OACC,aAAW,MACT,8IACF,EAEC,SAAAK,GAAY,WACf,GAEJ,CAEJ,EAEA,IAAOd,EAAQQ",
6
6
  "names": ["ShippingMethod_exports", "__export", "ShippingMethod_default", "__toCommonJS", "import_jsx_runtime", "import_utils", "import_AiuiProvider", "import_components", "import_helpers", "import_type", "ShippingMethod", "item", "index", "active", "toggleShipping", "currencyCode", "metafields", "className", "trackingData", "locale", "shopCommon", "e"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var v=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var T=Object.prototype.hasOwnProperty;var E=(a,l)=>{for(var r in l)v(a,r,{get:l[r],enumerable:!0})},D=(a,l,r,c)=>{if(l&&typeof l=="object"||typeof l=="function")for(let o of C(l))!T.call(a,o)&&o!==r&&v(a,o,{get:()=>l[o],enumerable:!(c=N(l,o))||c.enumerable});return a};var H=a=>D(v({},"__esModule",{value:!0}),a);var _={};E(_,{default:()=>L});module.exports=H(_);var e=require("react/jsx-runtime"),i=require("../../../../../../components"),s=require("@radix-ui/react-tabs"),n=require("react"),x=require("../../../../../../helpers"),b=require("../../../../BizProductProvider.js"),k=require("../../../../../../shared/Styles.js"),w=require("../../../../../../shared/track.js");const P=()=>{const{product:a,variant:l}=(0,b.useBizProductContext)(),[r,c]=(0,n.useState)(!1),o=(0,n.useMemo)(()=>a?.payload?.components?.find(t=>t.componentKey==="ProductHighlight")?.data||{},[a?.payload]),[p,g]=(0,n.useState)(o?.ksp?.[0]),d=(0,n.useCallback)(t=>{(0,w.gaTrack)({event:"ga4Event",event_name:"lp_button",event_parameters:{page_group:`Product Detail Page${l.sku}`,position:o?.title||"",button_name:t||o?.view||""}})},[o?.title,o?.view,l.sku]);return(0,e.jsxs)("div",{className:"ipc-product-detail-highlight",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[o?.title&&(0,e.jsx)(i.Text,{size:3,className:"font-bold leading-[1.2]",html:o?.title}),(0,e.jsxs)(i.Dialog,{open:r,onOpenChange:c,children:[(0,e.jsx)(i.DialogTrigger,{asChild:!0,children:(0,e.jsx)(i.Button,{variant:"link",className:"font-bold !p-0 text-base",onClick:()=>d(),children:o?.view})}),(0,e.jsx)(I,{ksp:o?.ksp||[],clickActiveKspItem:p,gaTrackEvent:d})]})]}),(0,e.jsx)("div",{className:"flex flex-wrap gap-4 mt-3 lg-desktop:mt-4",children:o?.ksp?.map(t=>(0,e.jsx)("div",{className:"product-highlight-item px-4 h-[36px] leading-[36px] lg-desktop:h-[38px] lg-desktop:leading-[38px] cursor-pointer hover:bg-[#EAEAEC] rounded-full bg-[#F5F5F7]",children:(0,e.jsx)(i.Text,{size:3,onClick:()=>{g(t),c(!0),d(t?.title)},className:"font-bold text-[#1D1D1F] text-[14px] lg-desktop:text-[16px] break-all line-clamp-1 overflow-hidden",html:t?.title})},t?.title))})]})},I=({ksp:a,clickActiveKspItem:l,gaTrackEvent:r})=>{const c=(0,n.useRef)([]),o=(0,n.useRef)(null),[p,g]=(0,n.useState)(null),d=(0,n.useCallback)(t=>{const m=a.findIndex(f=>f.title===t?.title),u=c.current[m];if(u&&o.current){const f=o.current,h=u,y=h.offsetLeft-f.offsetWidth/2+h.offsetWidth/2;f.scrollTo({left:y,behavior:"smooth"})}},[l,a]);return(0,n.useEffect)(()=>{l&&(g(l),setTimeout(()=>{d(p)},100))},[l,d]),(0,e.jsx)(i.DialogContent,{className:"tablet:max-w-[896px] rounded-xl tablet:rounded-2xl [&_.dialog-close-icon]:size-4 [&_.dialog-close-icon]:laptop:size-6 max-w-[326px] mx-auto w-full border-none overflow-hidden p-0",children:(0,e.jsxs)(s.Root,{defaultValue:p?.title,className:"w-full overflow-hidden",children:[a?.map(t=>(0,e.jsx)(s.Content,{value:t.title,children:(0,e.jsx)(i.Picture,{source:`${t?.mobileImg}, ${t?.img} 767`,className:"w-full h-[304px] desktop:h-[480px]",alt:t.img.alt,imgClassName:"object-cover h-full"})},t.title)),(0,e.jsxs)("div",{className:"py-4 desktop:py-6 w-full overflow-visible",children:[(0,e.jsx)("div",{ref:o,style:{scrollbarWidth:"none",msOverflowStyle:"none"},className:"px-4 desktop:px-6 overflow-x-auto",children:(0,e.jsx)("div",{className:"w-fit rounded-full bg-[#EAEAEC]",children:(0,e.jsx)(s.List,{className:"flex p-1 w-max",children:a?.map?.((t,m)=>(0,e.jsx)(s.Trigger,{ref:u=>{u&&(c.current[m]=u)},className:(0,x.cn)("lg-desktop:px-7 shrink-0 h-[38px] leading-[38px] rounded-full px-5",t.title===p?.title&&"bg-white"),onClick:()=>{d(t),g(t),r(t?.title)},value:t.title,children:(0,e.jsx)(i.Text,{html:t.title,className:"font-bold text-[14px] leading-[1.2]"})},m))})})}),(0,e.jsx)("div",{className:"mt-4 px-4 desktop:px-6",children:a.map(t=>(0,e.jsx)(s.Content,{value:t.title,className:"font-bold text-base desktop:text-[18px]",children:t.description}))})]})]})})};var L=(0,k.withLayout)(P);
1
+ "use strict";var v=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var T=Object.prototype.hasOwnProperty;var E=(a,l)=>{for(var r in l)v(a,r,{get:l[r],enumerable:!0})},D=(a,l,r,p)=>{if(l&&typeof l=="object"||typeof l=="function")for(let o of C(l))!T.call(a,o)&&o!==r&&v(a,o,{get:()=>l[o],enumerable:!(p=N(l,o))||p.enumerable});return a};var H=a=>D(v({},"__esModule",{value:!0}),a);var _={};E(_,{default:()=>L});module.exports=H(_);var e=require("react/jsx-runtime"),i=require("../../../../../../components"),s=require("@radix-ui/react-tabs"),n=require("react"),h=require("../../../../../../helpers"),k=require("../../../../BizProductProvider.js"),b=require("../../../../../../shared/Styles.js"),w=require("../../../../../../shared/track.js");const P=()=>{const{product:a,variant:l}=(0,k.useBizProductContext)(),[r,p]=(0,n.useState)(!1),o=(0,n.useMemo)(()=>a?.payload?.components?.find(t=>t.componentKey==="ProductHighlight")?.data||{},[a?.payload]),[u,f]=(0,n.useState)(o?.ksp?.[0]),c=(0,n.useCallback)(t=>{(0,w.gaTrack)({event:"ga4Event",event_name:"lp_button",event_parameters:{page_group:`Product Detail Page${l.sku}`,position:o?.title||"",button_name:t||o?.view||""}})},[o?.title,o?.view,l.sku]);return(0,e.jsxs)("div",{className:"ipc-product-detail-highlight",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[o?.title&&(0,e.jsx)(i.Text,{size:3,className:"font-bold leading-[1.2]",html:o?.title}),(0,e.jsxs)(i.Dialog,{open:r,onOpenChange:p,children:[(0,e.jsx)(i.DialogTrigger,{asChild:!0,children:(0,e.jsx)(i.Button,{variant:"link",className:"font-bold !p-0 text-base",onClick:()=>c(),children:o?.view})}),(0,e.jsx)(I,{ksp:o?.ksp||[],clickActiveKspItem:u,gaTrackEvent:c})]})]}),(0,e.jsx)("div",{className:"flex flex-wrap gap-4 mt-3 lg-desktop:mt-4",children:o?.ksp?.map(t=>(0,e.jsx)("div",{className:"product-highlight-item px-4 h-[36px] leading-[36px] lg-desktop:h-[38px] lg-desktop:leading-[38px] cursor-pointer hover:bg-[#EAEAEC] rounded-full bg-[#F5F5F7]",children:(0,e.jsx)(i.Text,{size:3,onClick:()=>{f(t),p(!0),c(t?.title)},className:"font-bold text-[#1D1D1F] text-[14px] lg-desktop:text-[16px] break-all line-clamp-1 overflow-hidden",html:t?.title})},t?.title))})]})},I=({ksp:a,clickActiveKspItem:l,gaTrackEvent:r})=>{const p=(0,n.useRef)([]),o=(0,n.useRef)(null),[u,f]=(0,n.useState)(null),c=(0,n.useCallback)(t=>{const d=a.findIndex(m=>m.title===t?.title),g=p.current[d];if(g&&o.current){const m=o.current,x=g,y=x.offsetLeft-m.offsetWidth/2+x.offsetWidth/2;m.scrollTo({left:y,behavior:"smooth"})}},[l,a]);return(0,n.useEffect)(()=>{l&&(f(l),setTimeout(()=>{c(u)},100))},[l,c]),(0,e.jsx)(i.DialogContent,{className:"tablet:max-w-[896px] rounded-xl tablet:rounded-2xl [&_.dialog-close-icon]:size-4 [&_.dialog-close-icon]:laptop:size-6 max-w-[326px] mx-auto w-full border-none overflow-hidden p-0",children:(0,e.jsxs)(s.Root,{defaultValue:u?.title,className:"w-full overflow-hidden",children:[a?.map(t=>(0,e.jsx)(s.Content,{value:t.title,children:(0,e.jsx)(i.Picture,{source:`${t?.mobileImg}, ${t?.img} 767`,className:"w-full h-[304px] desktop:h-[480px]",alt:t.img.alt,imgClassName:"object-cover h-full"})},t.title)),(0,e.jsxs)("div",{className:"py-4 desktop:py-6 w-full overflow-visible",children:[(0,e.jsx)("div",{ref:o,style:{scrollbarWidth:"none",msOverflowStyle:"none"},className:"px-4 desktop:px-6 overflow-x-auto",children:(0,e.jsx)("div",{className:"w-fit rounded-full bg-[#EAEAEC]",children:(0,e.jsx)(s.List,{className:"flex p-1 w-max",children:a?.map((t,d)=>(0,e.jsx)(s.Trigger,{ref:g=>{g&&(p.current[d]=g)},className:(0,h.cn)("lg-desktop:px-7 shrink-0 h-[38px] leading-[38px] rounded-full px-5",t.title===u?.title&&"bg-white"),onClick:()=>{c(t),f(t),r(t?.title)},value:t.title,children:(0,e.jsx)(i.Text,{html:t.title,className:"font-bold text-[14px] leading-[1.2]"})},d))})})}),(0,e.jsx)("div",{className:"mt-4 px-4 desktop:px-6",children:a?.map((t,d)=>(0,e.jsx)(s.Content,{value:t.title,className:"font-bold text-[14px] desktop:text-[18px]",children:t.description},d+t.title))})]})]})})};var L=(0,b.withLayout)(P);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../../src/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.tsx"],
4
- "sourcesContent": ["import type { HighlightProps } from '../types'\nimport { Text, Picture, Button, Heading, Dialog, DialogContent, DialogTrigger } from '../../../../../../components'\nimport { Content, List, Root, Trigger } from '@radix-ui/react-tabs'\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react'\nimport { cn } from '../../../../../../helpers'\nimport { useBizProductContext } from '../../../../BizProductProvider.js'\nimport { withLayout } from '../../../../../../shared/Styles.js'\nimport { gaTrack } from '../../../../../../shared/track.js'\n\nconst ProductHighlight = () => {\n const { product, variant } = useBizProductContext()\n const [open, setOpen] = useState(false)\n\n const productHighlightData = useMemo(() => {\n return product?.payload?.components?.find((item: any) => item.componentKey === 'ProductHighlight')?.data || {}\n }, [product?.payload])\n\n const [activeKspItem, setActiveKspItem] = useState(productHighlightData?.ksp?.[0])\n\n const gaTrackEvent = useCallback(\n (buttonName?: string) => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'lp_button',\n event_parameters: {\n page_group: `Product Detail Page${variant.sku}`,\n position: productHighlightData?.title || '',\n button_name: buttonName || productHighlightData?.view || '',\n },\n })\n },\n [productHighlightData?.title, productHighlightData?.view, variant.sku]\n )\n\n return (\n <div className=\"ipc-product-detail-highlight\">\n <div className=\"flex items-center justify-between\">\n {productHighlightData?.title && (\n <Text size={3} className=\"font-bold leading-[1.2]\" html={productHighlightData?.title} />\n )}\n <Dialog open={open} onOpenChange={setOpen}>\n <DialogTrigger asChild>\n <Button variant=\"link\" className=\"font-bold !p-0 text-base\" onClick={() => gaTrackEvent()}>\n {productHighlightData?.view}\n </Button>\n </DialogTrigger>\n <ProductHighlightModal\n ksp={productHighlightData?.ksp || []}\n clickActiveKspItem={activeKspItem}\n gaTrackEvent={gaTrackEvent}\n />\n </Dialog>\n </div>\n <div className=\"flex flex-wrap gap-4 mt-3 lg-desktop:mt-4\">\n {productHighlightData?.ksp?.map((item: any) => (\n <div\n key={item?.title}\n className=\"product-highlight-item px-4 h-[36px] leading-[36px] lg-desktop:h-[38px] lg-desktop:leading-[38px] cursor-pointer hover:bg-[#EAEAEC] rounded-full bg-[#F5F5F7]\"\n >\n <Text\n size={3}\n onClick={() => {\n setActiveKspItem(item)\n setOpen(true)\n gaTrackEvent(item?.title)\n }}\n className=\"font-bold text-[#1D1D1F] text-[14px] lg-desktop:text-[16px] break-all line-clamp-1 overflow-hidden\"\n html={item?.title}\n />\n </div>\n ))}\n </div>\n </div>\n )\n}\n\nconst ProductHighlightModal = ({\n ksp,\n clickActiveKspItem,\n gaTrackEvent,\n}: {\n ksp: any[]\n clickActiveKspItem: any\n gaTrackEvent: (buttonName: string) => void\n}) => {\n const highlightRef = useRef<HTMLButtonElement[]>([])\n const scrollContainerRef = useRef<HTMLDivElement>(null)\n const [activeKspItem, setActiveKspItem] = useState<any>(null)\n\n const autoScrollToActiveItem = useCallback(\n (activeKspItem: any) => {\n const curIndex = ksp.findIndex(item => item.title === activeKspItem?.title)\n const curRef = highlightRef.current[curIndex]\n\n if (curRef && scrollContainerRef.current) {\n const container = scrollContainerRef.current\n const button = curRef\n const scrollLeft = button.offsetLeft - container.offsetWidth / 2 + button.offsetWidth / 2\n\n container.scrollTo({\n left: scrollLeft,\n behavior: 'smooth',\n })\n }\n },\n [clickActiveKspItem, ksp]\n )\n\n useEffect(() => {\n if (!clickActiveKspItem) return\n setActiveKspItem(clickActiveKspItem)\n\n // \u5EF6\u8FDF\u6267\u884C\uFF0C\u7B49\u5F85 Dialog \u548C\u5185\u90E8\u5143\u7D20\u5B8C\u5168\u6E32\u67D3\n setTimeout(() => {\n autoScrollToActiveItem(activeKspItem)\n }, 100)\n }, [clickActiveKspItem, autoScrollToActiveItem])\n\n return (\n <DialogContent className=\"tablet:max-w-[896px] rounded-xl tablet:rounded-2xl [&_.dialog-close-icon]:size-4 [&_.dialog-close-icon]:laptop:size-6 max-w-[326px] mx-auto w-full border-none overflow-hidden p-0\">\n <Root defaultValue={activeKspItem?.title} className=\"w-full overflow-hidden\">\n {ksp?.map(item => (\n <Content value={item.title} key={item.title}>\n <Picture\n source={`${item?.mobileImg}, ${item?.img} 767`}\n className=\"w-full h-[304px] desktop:h-[480px]\"\n alt={item.img.alt}\n imgClassName=\"object-cover h-full\"\n />\n </Content>\n ))}\n <div className=\"py-4 desktop:py-6 w-full overflow-visible\">\n <div\n ref={scrollContainerRef}\n style={{\n scrollbarWidth: 'none',\n msOverflowStyle: 'none',\n }}\n className=\"px-4 desktop:px-6 overflow-x-auto\"\n >\n <div className=\"w-fit rounded-full bg-[#EAEAEC]\">\n <List className=\"flex p-1 w-max\">\n {ksp?.map?.((item: any, index: number) => (\n <Trigger\n ref={el => {\n if (el) {\n highlightRef.current[index] = el\n }\n }}\n className={cn(\n 'lg-desktop:px-7 shrink-0 h-[38px] leading-[38px] rounded-full px-5',\n item.title === activeKspItem?.title && 'bg-white'\n )}\n onClick={() => {\n autoScrollToActiveItem(item)\n setActiveKspItem(item)\n gaTrackEvent(item?.title)\n }}\n key={index}\n value={item.title}\n >\n <Text html={item.title} className=\"font-bold text-[14px] leading-[1.2]\" />\n </Trigger>\n ))}\n </List>\n </div>\n </div>\n <div className=\"mt-4 px-4 desktop:px-6\">\n {ksp.map(item => (\n <Content value={item.title} className=\"font-bold text-base desktop:text-[18px]\">\n {item.description}\n </Content>\n ))}\n </div>\n </div>\n </Root>\n </DialogContent>\n )\n}\n\nexport default withLayout(ProductHighlight)\n"],
5
- "mappings": "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",
4
+ "sourcesContent": ["import type { HighlightProps } from '../types'\nimport { Text, Picture, Button, Heading, Dialog, DialogContent, DialogTrigger } from '../../../../../../components'\nimport { Content, List, Root, Trigger } from '@radix-ui/react-tabs'\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react'\nimport { cn } from '../../../../../../helpers'\nimport { useBizProductContext } from '../../../../BizProductProvider.js'\nimport { withLayout } from '../../../../../../shared/Styles.js'\nimport { gaTrack } from '../../../../../../shared/track.js'\n\nconst ProductHighlight = () => {\n const { product, variant } = useBizProductContext()\n const [open, setOpen] = useState(false)\n\n const productHighlightData = useMemo(() => {\n return product?.payload?.components?.find((item: any) => item.componentKey === 'ProductHighlight')?.data || {}\n }, [product?.payload])\n\n const [activeKspItem, setActiveKspItem] = useState(productHighlightData?.ksp?.[0])\n\n const gaTrackEvent = useCallback(\n (buttonName?: string) => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'lp_button',\n event_parameters: {\n page_group: `Product Detail Page${variant.sku}`,\n position: productHighlightData?.title || '',\n button_name: buttonName || productHighlightData?.view || '',\n },\n })\n },\n [productHighlightData?.title, productHighlightData?.view, variant.sku]\n )\n\n return (\n <div className=\"ipc-product-detail-highlight\">\n <div className=\"flex items-center justify-between\">\n {productHighlightData?.title && (\n <Text size={3} className=\"font-bold leading-[1.2]\" html={productHighlightData?.title} />\n )}\n <Dialog open={open} onOpenChange={setOpen}>\n <DialogTrigger asChild>\n <Button variant=\"link\" className=\"font-bold !p-0 text-base\" onClick={() => gaTrackEvent()}>\n {productHighlightData?.view}\n </Button>\n </DialogTrigger>\n <ProductHighlightModal\n ksp={productHighlightData?.ksp || []}\n clickActiveKspItem={activeKspItem}\n gaTrackEvent={gaTrackEvent}\n />\n </Dialog>\n </div>\n <div className=\"flex flex-wrap gap-4 mt-3 lg-desktop:mt-4\">\n {productHighlightData?.ksp?.map((item: any) => (\n <div\n key={item?.title}\n className=\"product-highlight-item px-4 h-[36px] leading-[36px] lg-desktop:h-[38px] lg-desktop:leading-[38px] cursor-pointer hover:bg-[#EAEAEC] rounded-full bg-[#F5F5F7]\"\n >\n <Text\n size={3}\n onClick={() => {\n setActiveKspItem(item)\n setOpen(true)\n gaTrackEvent(item?.title)\n }}\n className=\"font-bold text-[#1D1D1F] text-[14px] lg-desktop:text-[16px] break-all line-clamp-1 overflow-hidden\"\n html={item?.title}\n />\n </div>\n ))}\n </div>\n </div>\n )\n}\n\nconst ProductHighlightModal = ({\n ksp,\n clickActiveKspItem,\n gaTrackEvent,\n}: {\n ksp: any[]\n clickActiveKspItem: any\n gaTrackEvent: (buttonName: string) => void\n}) => {\n const highlightRef = useRef<HTMLButtonElement[]>([])\n const scrollContainerRef = useRef<HTMLDivElement>(null)\n const [activeKspItem, setActiveKspItem] = useState<any>(null)\n\n const autoScrollToActiveItem = useCallback(\n (activeKspItem: any) => {\n const curIndex = ksp.findIndex(item => item.title === activeKspItem?.title)\n const curRef = highlightRef.current[curIndex]\n\n if (curRef && scrollContainerRef.current) {\n const container = scrollContainerRef.current\n const button = curRef\n const scrollLeft = button.offsetLeft - container.offsetWidth / 2 + button.offsetWidth / 2\n\n container.scrollTo({\n left: scrollLeft,\n behavior: 'smooth',\n })\n }\n },\n [clickActiveKspItem, ksp]\n )\n\n useEffect(() => {\n if (!clickActiveKspItem) return\n setActiveKspItem(clickActiveKspItem)\n\n // \u5EF6\u8FDF\u6267\u884C\uFF0C\u7B49\u5F85 Dialog \u548C\u5185\u90E8\u5143\u7D20\u5B8C\u5168\u6E32\u67D3\n setTimeout(() => {\n autoScrollToActiveItem(activeKspItem)\n }, 100)\n }, [clickActiveKspItem, autoScrollToActiveItem])\n\n return (\n <DialogContent className=\"tablet:max-w-[896px] rounded-xl tablet:rounded-2xl [&_.dialog-close-icon]:size-4 [&_.dialog-close-icon]:laptop:size-6 max-w-[326px] mx-auto w-full border-none overflow-hidden p-0\">\n <Root defaultValue={activeKspItem?.title} className=\"w-full overflow-hidden\">\n {ksp?.map(item => (\n <Content value={item.title} key={item.title}>\n <Picture\n source={`${item?.mobileImg}, ${item?.img} 767`}\n className=\"w-full h-[304px] desktop:h-[480px]\"\n alt={item.img.alt}\n imgClassName=\"object-cover h-full\"\n />\n </Content>\n ))}\n <div className=\"py-4 desktop:py-6 w-full overflow-visible\">\n <div\n ref={scrollContainerRef}\n style={{\n scrollbarWidth: 'none',\n msOverflowStyle: 'none',\n }}\n className=\"px-4 desktop:px-6 overflow-x-auto\"\n >\n <div className=\"w-fit rounded-full bg-[#EAEAEC]\">\n <List className=\"flex p-1 w-max\">\n {ksp?.map((item, index) => (\n <Trigger\n ref={el => {\n if (el) {\n highlightRef.current[index] = el\n }\n }}\n className={cn(\n 'lg-desktop:px-7 shrink-0 h-[38px] leading-[38px] rounded-full px-5',\n item.title === activeKspItem?.title && 'bg-white'\n )}\n onClick={() => {\n autoScrollToActiveItem(item)\n setActiveKspItem(item)\n gaTrackEvent(item?.title)\n }}\n key={index}\n value={item.title}\n >\n <Text html={item.title} className=\"font-bold text-[14px] leading-[1.2]\" />\n </Trigger>\n ))}\n </List>\n </div>\n </div>\n <div className=\"mt-4 px-4 desktop:px-6\">\n {ksp?.map((item, index) => (\n <Content value={item.title} key={index + item.title} className=\"font-bold text-[14px] desktop:text-[18px]\">\n {item.description}\n </Content>\n ))}\n </div>\n </div>\n </Root>\n </DialogContent>\n )\n}\n\nexport default withLayout(ProductHighlight)\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAsCU,IAAAI,EAAA,6BArCVC,EAAqF,wCACrFC,EAA6C,gCAC7CC,EAAkE,iBAClEC,EAAmB,qCACnBC,EAAqC,6CACrCC,EAA2B,8CAC3BC,EAAwB,6CAExB,MAAMC,EAAmB,IAAM,CAC7B,KAAM,CAAE,QAAAC,EAAS,QAAAC,CAAQ,KAAI,wBAAqB,EAC5C,CAACC,EAAMC,CAAO,KAAI,YAAS,EAAK,EAEhCC,KAAuB,WAAQ,IAC5BJ,GAAS,SAAS,YAAY,KAAMK,GAAcA,EAAK,eAAiB,kBAAkB,GAAG,MAAQ,CAAC,EAC5G,CAACL,GAAS,OAAO,CAAC,EAEf,CAACM,EAAeC,CAAgB,KAAI,YAASH,GAAsB,MAAM,CAAC,CAAC,EAE3EI,KAAe,eAClBC,GAAwB,IACvB,WAAQ,CACN,MAAO,WACP,WAAY,YACZ,iBAAkB,CAChB,WAAY,sBAAsBR,EAAQ,GAAG,GAC7C,SAAUG,GAAsB,OAAS,GACzC,YAAaK,GAAcL,GAAsB,MAAQ,EAC3D,CACF,CAAC,CACH,EACA,CAACA,GAAsB,MAAOA,GAAsB,KAAMH,EAAQ,GAAG,CACvE,EAEA,SACE,QAAC,OAAI,UAAU,+BACb,qBAAC,OAAI,UAAU,oCACZ,UAAAG,GAAsB,UACrB,OAAC,QAAK,KAAM,EAAG,UAAU,0BAA0B,KAAMA,GAAsB,MAAO,KAExF,QAAC,UAAO,KAAMF,EAAM,aAAcC,EAChC,oBAAC,iBAAc,QAAO,GACpB,mBAAC,UAAO,QAAQ,OAAO,UAAU,2BAA2B,QAAS,IAAMK,EAAa,EACrF,SAAAJ,GAAsB,KACzB,EACF,KACA,OAACM,EAAA,CACC,IAAKN,GAAsB,KAAO,CAAC,EACnC,mBAAoBE,EACpB,aAAcE,EAChB,GACF,GACF,KACA,OAAC,OAAI,UAAU,4CACZ,SAAAJ,GAAsB,KAAK,IAAKC,MAC/B,OAAC,OAEC,UAAU,gKAEV,mBAAC,QACC,KAAM,EACN,QAAS,IAAM,CACbE,EAAiBF,CAAI,EACrBF,EAAQ,EAAI,EACZK,EAAaH,GAAM,KAAK,CAC1B,EACA,UAAU,qGACV,KAAMA,GAAM,MACd,GAZKA,GAAM,KAab,CACD,EACH,GACF,CAEJ,EAEMK,EAAwB,CAAC,CAC7B,IAAAC,EACA,mBAAAC,EACA,aAAAJ,CACF,IAIM,CACJ,MAAMK,KAAe,UAA4B,CAAC,CAAC,EAC7CC,KAAqB,UAAuB,IAAI,EAChD,CAACR,EAAeC,CAAgB,KAAI,YAAc,IAAI,EAEtDQ,KAAyB,eAC5BT,GAAuB,CACtB,MAAMU,EAAWL,EAAI,UAAUN,GAAQA,EAAK,QAAUC,GAAe,KAAK,EACpEW,EAASJ,EAAa,QAAQG,CAAQ,EAE5C,GAAIC,GAAUH,EAAmB,QAAS,CACxC,MAAMI,EAAYJ,EAAmB,QAC/BK,EAASF,EACTG,EAAaD,EAAO,WAAaD,EAAU,YAAc,EAAIC,EAAO,YAAc,EAExFD,EAAU,SAAS,CACjB,KAAME,EACN,SAAU,QACZ,CAAC,CACH,CACF,EACA,CAACR,EAAoBD,CAAG,CAC1B,EAEA,sBAAU,IAAM,CACTC,IACLL,EAAiBK,CAAkB,EAGnC,WAAW,IAAM,CACfG,EAAuBT,CAAa,CACtC,EAAG,GAAG,EACR,EAAG,CAACM,EAAoBG,CAAsB,CAAC,KAG7C,OAAC,iBAAc,UAAU,qLACvB,oBAAC,QAAK,aAAcT,GAAe,MAAO,UAAU,yBACjD,UAAAK,GAAK,IAAIN,MACR,OAAC,WAAQ,MAAOA,EAAK,MACnB,mBAAC,WACC,OAAQ,GAAGA,GAAM,SAAS,KAAKA,GAAM,GAAG,OACxC,UAAU,qCACV,IAAKA,EAAK,IAAI,IACd,aAAa,sBACf,GAN+BA,EAAK,KAOtC,CACD,KACD,QAAC,OAAI,UAAU,4CACb,oBAAC,OACC,IAAKS,EACL,MAAO,CACL,eAAgB,OAChB,gBAAiB,MACnB,EACA,UAAU,oCAEV,mBAAC,OAAI,UAAU,kCACb,mBAAC,QAAK,UAAU,iBACb,SAAAH,GAAK,IAAI,CAACN,EAAMgB,OACf,OAAC,WACC,IAAKC,GAAM,CACLA,IACFT,EAAa,QAAQQ,CAAK,EAAIC,EAElC,EACA,aAAW,MACT,qEACAjB,EAAK,QAAUC,GAAe,OAAS,UACzC,EACA,QAAS,IAAM,CACbS,EAAuBV,CAAI,EAC3BE,EAAiBF,CAAI,EACrBG,EAAaH,GAAM,KAAK,CAC1B,EAEA,MAAOA,EAAK,MAEZ,mBAAC,QAAK,KAAMA,EAAK,MAAO,UAAU,sCAAsC,GAHnEgB,CAIP,CACD,EACH,EACF,EACF,KACA,OAAC,OAAI,UAAU,yBACZ,SAAAV,GAAK,IAAI,CAACN,EAAMgB,OACf,OAAC,WAAQ,MAAOhB,EAAK,MAAgC,UAAU,4CAC5D,SAAAA,EAAK,aADyBgB,EAAQhB,EAAK,KAE9C,CACD,EACH,GACF,GACF,EACF,CAEJ,EAEA,IAAOhB,KAAQ,cAAWU,CAAgB",
6
6
  "names": ["ProductHighlight_exports", "__export", "ProductHighlight_default", "__toCommonJS", "import_jsx_runtime", "import_components", "import_react_tabs", "import_react", "import_helpers", "import_BizProductProvider", "import_Styles", "import_track", "ProductHighlight", "product", "variant", "open", "setOpen", "productHighlightData", "item", "activeKspItem", "setActiveKspItem", "gaTrackEvent", "buttonName", "ProductHighlightModal", "ksp", "clickActiveKspItem", "highlightRef", "scrollContainerRef", "autoScrollToActiveItem", "curIndex", "curRef", "container", "button", "scrollLeft", "index", "el"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var E=Object.create;var m=Object.defineProperty;var D=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var G=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var I=(o,a)=>{for(var i in a)m(o,i,{get:a[i],enumerable:!0})},g=(o,a,i,p)=>{if(a&&typeof a=="object"||typeof a=="function")for(let l of h(a))!w.call(o,l)&&l!==i&&m(o,l,{get:()=>a[l],enumerable:!(p=D(a,l))||p.enumerable});return o};var k=(o,a,i)=>(i=o!=null?E(G(o)):{},g(a||!o||!o.__esModule?m(i,"default",{value:o,enumerable:!0}):i,o)),P=o=>g(m({},"__esModule",{value:!0}),o);var L={};I(L,{default:()=>z});module.exports=P(L);var e=require("react/jsx-runtime"),n=require("react"),t=require("../../../../../../components"),b=require("../../../../BizProductProvider"),v=k(require("./Select")),N=require("../../../../../AiuiProvider/index.js"),C=require("../../../../utils"),y=require("./ShopifyColorOption");const T=()=>{const{locale:o="us"}=(0,N.useAiuiContext)(),{compareData:a,product:i}=(0,b.useBizProductContext)(),[p,l]=(0,n.useState)();(0,n.useEffect)(()=>{l(a?.availableCompareList[0]?.handle)},[a?.availableCompareList]);const x=[a?.currentProductCompareData?.product,a?.availableCompareList.find(r=>r.handle===p)?.product].filter(Boolean);return a?.specificationKeys?(0,e.jsxs)(t.Dialog,{children:[(0,e.jsx)(t.DialogTrigger,{children:(0,e.jsx)("button",{className:"text-base leading-[1.4] font-bold",children:"Compare"})}),(0,e.jsxs)(t.DialogContent,{overlayClassName:"z-[100]",className:"max-h-[80vh] rounded-box z-[110] px-4 [&_.dialog-close-icon]:size-4 [&_.dialog-close-icon]:laptop:size-6 [&_.dialog-close-icon]:text-[#6D6D6F] gap-0 overflow-hidden overflow-y-auto laptop:w-[896px] max-w-[90vw] laptop:px-8 !py-0 [&_.dialog-close-button]:focus:!ring-0",children:[(0,e.jsx)(t.DialogHeader,{className:"border-b laptop:pt-4 pt-4 pb-2 laptop:pb-3 border-[#E8E8E8]",children:(0,e.jsx)(t.DialogTitle,{className:"text-sm text-[#6D6D6F]",children:"Compare"})}),(0,e.jsxs)(t.Grid,{className:"grid-cols-3 laptop:gap-8 laptop:py-8 py-6",children:[(0,e.jsx)(t.GridItem,{span:1}),x.map((r,d)=>(0,e.jsx)(t.GridItem,{span:1,className:"flex items-center",children:(0,e.jsx)("img",{src:r.images[0].url,alt:r.title,className:"h-[200px] w-[200px]",role:"presentation"})},d))]}),(0,e.jsxs)(t.Grid,{className:"gap-[40px] grid-cols-3 items-center gap-[40px] border-b border-[#E8E8E8] py-[24px]",children:[(0,e.jsx)(t.GridItem,{span:1,children:(0,e.jsx)("div",{className:"text-[16px] font-bold text-[#595959]",children:"Product"})}),(0,e.jsx)(t.GridItem,{span:1,children:(0,e.jsx)(t.Text,{as:"div",className:"flex h-[38px] w-full items-center rounded-[2px] border border-[#E8E8E8] px-[12px] text-[16px] font-bold",html:a.currentProductCompareData?.shortName||i.title})}),p&&(0,e.jsx)(t.GridItem,{span:1,children:(0,e.jsx)(v.default,{value:p,onChange:r=>{l(r)},list:a.options})})]}),(0,e.jsxs)(t.Grid,{className:"gap-[40px] grid-cols-3 items-center gap-[40px] border-b border-[#E8E8E8] py-[24px]",children:[(0,e.jsx)(t.GridItem,{span:1,children:(0,e.jsx)("div",{className:"text-[16px] font-bold text-[#595959]",children:"Basic Information"})}),x.map((r,d)=>{const c=r.variants[0],f=r.options?.find(s=>["color","colour","couleur"].find(u=>s.name.toLowerCase().includes(u)))?.values.map(s=>s.label);return(0,e.jsx)(t.GridItem,{span:1,className:"flex h-full",children:(0,e.jsxs)("div",{className:"flex flex-col gap-[8px]",children:[c.price.amount<9999999&&(0,e.jsxs)("div",{className:"flex items-center gap-[8px]",children:[(0,e.jsx)("div",{className:"text-[16px] font-semibold text-[#595959]",children:"Price:"}),(0,e.jsx)("div",{className:"flex items-center gap-[6px]",children:(0,e.jsx)("span",{className:"text-[16px] font-bold",children:(0,C.formatPrice)({locale:o,amount:c.price.amount,currencyCode:c.price.currencyCode})})})]}),f?.length&&(0,e.jsxs)("div",{className:"flex items-center gap-[8px]",children:[(0,e.jsx)("div",{className:"text-[16px] font-semibold text-[#595959]",children:"Color:"}),(0,e.jsx)("div",{className:"flex items-center gap-[16px]",children:f.map(s=>(0,e.jsx)(y.ShopifyColorOption,{label:s,className:"h-[16px] w-[16px]"},s))})]})]})},d)})]}),(0,e.jsx)(t.Grid,{className:"gap-[40px] grid-cols-12 items-center gap-[40px] border-b border-[#E8E8E8]",children:a.specificationKeys?.map(r=>(0,e.jsxs)(t.GridItem,{span:12,className:"grid grid-cols-3 items-center gap-[40px] border-b border-[#E8E8E8] py-[24px]",children:[(0,e.jsx)("div",{className:"text-[16px] font-bold text-[#595959]",children:r}),x.map((d,c)=>{let s=d.metafields?.global?.specifications?.find(u=>u?.key===r)?.value||"";switch(s.trim().toLowerCase()){case"true":s="\u2714\uFE0F";break;case"false":s="\u274C";break;default:break}return(0,e.jsx)("div",{className:"flex items-center",children:(0,e.jsx)("div",{className:"text-[16px] font-semibold text-[#595959]",children:s})},c)})]},r))})]})]}):null};var z=T;
1
+ "use strict";var D=Object.create;var m=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var G=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty;var k=(o,r)=>{for(var a in r)m(o,a,{get:r[a],enumerable:!0})},v=(o,r,a,d)=>{if(r&&typeof r=="object"||typeof r=="function")for(let l of G(r))!I.call(o,l)&&l!==a&&m(o,l,{get:()=>r[l],enumerable:!(d=h(r,l))||d.enumerable});return o};var P=(o,r,a)=>(a=o!=null?D(w(o)):{},v(r||!o||!o.__esModule?m(a,"default",{value:o,enumerable:!0}):a,o)),T=o=>v(m({},"__esModule",{value:!0}),o);var H={};k(H,{default:()=>L});module.exports=T(H);var e=require("react/jsx-runtime"),n=require("react"),t=require("../../../../../../components"),b=require("../../../../BizProductProvider"),N=P(require("./Select")),y=require("../../../../../AiuiProvider/index.js"),C=require("../../../../utils"),E=require("./ShopifyColorOption");const z=()=>{const{locale:o="us",copyWriting:r}=(0,y.useAiuiContext)(),{compareData:a,product:d}=(0,b.useBizProductContext)(),[l,u]=(0,n.useState)();(0,n.useEffect)(()=>{u(a?.availableCompareList[0]?.handle)},[a?.availableCompareList]);const x=[a?.currentProductCompareData?.product,a?.availableCompareList.find(i=>i.handle===l)?.product].filter(Boolean);return a?.specificationKeys?(0,e.jsxs)(t.Dialog,{children:[(0,e.jsx)(t.DialogTrigger,{className:"text-base leading-[1.4] font-bold",children:r?.compare}),(0,e.jsxs)(t.DialogContent,{overlayClassName:"z-[100]",className:"max-h-[80vh] rounded-box z-[110] px-4 [&_.dialog-close-icon]:size-4 [&_.dialog-close-icon]:laptop:size-6 [&_.dialog-close-icon]:text-[#6D6D6F] gap-0 overflow-hidden overflow-y-auto laptop:w-[896px] max-w-[90vw] laptop:px-8 !py-0 [&_.dialog-close-button]:focus:!ring-0",children:[(0,e.jsx)(t.DialogHeader,{className:"border-b laptop:pt-4 pt-4 pb-2 laptop:pb-3 border-[#E8E8E8]",children:(0,e.jsx)(t.DialogTitle,{className:"text-sm text-[#6D6D6F]",children:r?.compare})}),(0,e.jsxs)(t.Grid,{className:"grid-cols-3 laptop:gap-8 laptop:py-8 py-6",children:[(0,e.jsx)(t.GridItem,{span:1}),x.map((i,p)=>(0,e.jsx)(t.GridItem,{span:1,className:"flex items-center",children:(0,e.jsx)("img",{src:i.images[0].url,alt:i.title,className:"h-[200px] w-[200px]",role:"presentation"})},p))]}),(0,e.jsxs)(t.Grid,{className:"gap-[40px] grid-cols-3 items-center gap-[40px] border-b border-[#E8E8E8] py-[24px]",children:[(0,e.jsx)(t.GridItem,{span:1,children:(0,e.jsx)("div",{className:"text-[16px] font-bold text-[#595959]",children:"Product"})}),(0,e.jsx)(t.GridItem,{span:1,children:(0,e.jsx)(t.Text,{as:"div",className:"flex h-[38px] w-full items-center rounded-[2px] border border-[#E8E8E8] px-[12px] text-[16px] font-bold",html:a.currentProductCompareData?.shortName||d.title})}),l&&(0,e.jsx)(t.GridItem,{span:1,children:(0,e.jsx)(N.default,{value:l,onChange:i=>{u(i)},list:a.options})})]}),(0,e.jsxs)(t.Grid,{className:"gap-[40px] grid-cols-3 items-center gap-[40px] border-b border-[#E8E8E8] py-[24px]",children:[(0,e.jsx)(t.GridItem,{span:1,children:(0,e.jsx)("div",{className:"text-[16px] font-bold text-[#595959]",children:"Basic Information"})}),x.map((i,p)=>{const c=i.variants[0],f=i.options?.find(s=>["color","colour","couleur"].find(g=>s.name.toLowerCase().includes(g)))?.values.map(s=>s.label);return(0,e.jsx)(t.GridItem,{span:1,className:"flex h-full",children:(0,e.jsxs)("div",{className:"flex flex-col gap-[8px]",children:[c.price.amount<9999999&&(0,e.jsxs)("div",{className:"flex items-center gap-[8px]",children:[(0,e.jsx)("div",{className:"text-[16px] font-semibold text-[#595959]",children:"Price:"}),(0,e.jsx)("div",{className:"flex items-center gap-[6px]",children:(0,e.jsx)("span",{className:"text-[16px] font-bold",children:(0,C.formatPrice)({locale:o,amount:c.price.amount,currencyCode:c.price.currencyCode})})})]}),f?.length&&(0,e.jsxs)("div",{className:"flex items-center gap-[8px]",children:[(0,e.jsx)("div",{className:"text-[16px] font-semibold text-[#595959]",children:"Color:"}),(0,e.jsx)("div",{className:"flex items-center gap-[16px]",children:f.map(s=>(0,e.jsx)(E.ShopifyColorOption,{label:s,className:"h-[16px] w-[16px]"},s))})]})]})},p)})]}),(0,e.jsx)(t.Grid,{className:"gap-[40px] grid-cols-12 items-center gap-[40px] border-b border-[#E8E8E8]",children:a.specificationKeys?.map(i=>(0,e.jsxs)(t.GridItem,{span:12,className:"grid grid-cols-3 items-center gap-[40px] border-b border-[#E8E8E8] py-[24px]",children:[(0,e.jsx)("div",{className:"text-[16px] font-bold text-[#595959]",children:i}),x.map((p,c)=>{let s=p.metafields?.global?.specifications?.find(g=>g?.key===i)?.value||"";switch(s.trim().toLowerCase()){case"true":s="\u2714\uFE0F";break;case"false":s="\u274C";break;default:break}return(0,e.jsx)("div",{className:"flex items-center",children:(0,e.jsx)("div",{className:"text-[16px] font-semibold text-[#595959]",children:s})},c)})]},i))})]})]}):null};var L=z;
2
2
  //# sourceMappingURL=CompareModal.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../../src/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.tsx"],
4
- "sourcesContent": ["import { useEffect, useState } from 'react'\nimport {\n Dialog,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogTitle,\n Grid,\n GridItem,\n Text,\n} from '../../../../../../components'\nimport { useBizProductContext } from '../../../../BizProductProvider'\nimport type { CompareItem } from '../../../../types'\nimport Select from './Select'\nimport { useAiuiContext } from '../../../../../AiuiProvider/index.js'\nimport { formatPrice } from '../../../../utils'\nimport { ShopifyColorOption } from './ShopifyColorOption'\n\nconst CompareModal = () => {\n const { locale = 'us' } = useAiuiContext()\n const { compareData, product } = useBizProductContext()\n const [selectedProductHandle, setSelectedProductHandle] = useState<string>()\n\n useEffect(() => {\n setSelectedProductHandle(compareData?.availableCompareList[0]?.handle)\n }, [compareData?.availableCompareList])\n\n const products = [\n compareData?.currentProductCompareData!?.product,\n compareData?.availableCompareList.find(product => product.handle === selectedProductHandle)?.product,\n ].filter(Boolean) as CompareItem['product'][]\n\n if (!compareData?.specificationKeys) return null\n\n return (\n <Dialog>\n <DialogTrigger>\n <button className=\"text-base leading-[1.4] font-bold\">Compare</button>\n </DialogTrigger>\n <DialogContent\n overlayClassName=\"z-[100]\"\n className=\"max-h-[80vh] rounded-box z-[110] px-4 [&_.dialog-close-icon]:size-4 [&_.dialog-close-icon]:laptop:size-6 [&_.dialog-close-icon]:text-[#6D6D6F] gap-0 overflow-hidden overflow-y-auto laptop:w-[896px] max-w-[90vw] laptop:px-8 !py-0 [&_.dialog-close-button]:focus:!ring-0\"\n >\n <DialogHeader className=\"border-b laptop:pt-4 pt-4 pb-2 laptop:pb-3 border-[#E8E8E8]\">\n <DialogTitle className=\"text-sm text-[#6D6D6F]\">Compare</DialogTitle>\n </DialogHeader>\n <Grid className=\"grid-cols-3 laptop:gap-8 laptop:py-8 py-6\">\n <GridItem span={1} />\n {products.map((product, productIndex) => {\n return (\n <GridItem key={productIndex} span={1} className=\"flex items-center\">\n <img\n src={product.images[0].url}\n alt={product.title}\n className=\"h-[200px] w-[200px]\"\n role=\"presentation\"\n />\n </GridItem>\n )\n })}\n </Grid>\n <Grid className=\"gap-[40px] grid-cols-3 items-center gap-[40px] border-b border-[#E8E8E8] py-[24px]\">\n <GridItem span={1}>\n <div className=\"text-[16px] font-bold text-[#595959]\">Product</div>\n </GridItem>\n <GridItem span={1}>\n <Text\n as=\"div\"\n className=\"flex h-[38px] w-full items-center rounded-[2px] border border-[#E8E8E8] px-[12px] text-[16px] font-bold\"\n html={compareData.currentProductCompareData?.shortName || product.title}\n ></Text>\n </GridItem>\n {selectedProductHandle && (\n <GridItem span={1}>\n <Select\n value={selectedProductHandle}\n onChange={value => {\n setSelectedProductHandle(value)\n }}\n list={compareData.options!}\n />\n </GridItem>\n )}\n </Grid>\n <Grid className=\"gap-[40px] grid-cols-3 items-center gap-[40px] border-b border-[#E8E8E8] py-[24px]\">\n <GridItem span={1}>\n <div className=\"text-[16px] font-bold text-[#595959]\">Basic Information</div>\n </GridItem>\n {products.map((product, productIndex) => {\n const variant = product.variants[0]\n const colors = product.options\n ?.find(option =>\n ['color', 'colour', 'couleur'].find(predicate => option.name.toLowerCase().includes(predicate))\n )\n ?.values.map(value => value.label)\n return (\n <GridItem span={1} key={productIndex} className=\"flex h-full\">\n {/* Price with original price */}\n <div className=\"flex flex-col gap-[8px]\">\n {variant.price.amount < 9999999 && (\n <div className=\"flex items-center gap-[8px]\">\n <div className=\"text-[16px] font-semibold text-[#595959]\">Price:</div>\n <div className=\"flex items-center gap-[6px]\">\n <span className=\"text-[16px] font-bold\">\n {formatPrice({\n locale,\n amount: variant.price.amount,\n currencyCode: variant.price.currencyCode,\n })}\n </span>\n\n {/* {Number(coupon?.fixed_value) > 0 && (\n <span className='font-semibold text-[#999999] line-through'>\n {formatPrice({\n locale,\n amount: variant.price.amount,\n currencyCode: variant.price.currencyCode,\n })}\n </span>\n )} */}\n </div>\n </div>\n )}\n {colors?.length && (\n <div className=\"flex items-center gap-[8px]\">\n <div className=\"text-[16px] font-semibold text-[#595959]\">Color:</div>\n <div className=\"flex items-center gap-[16px]\">\n {colors.map(label => (\n <ShopifyColorOption key={label} label={label} className=\"h-[16px] w-[16px]\" />\n ))}\n </div>\n </div>\n )}\n </div>\n </GridItem>\n )\n })}\n </Grid>\n <Grid className=\"gap-[40px] grid-cols-12 items-center gap-[40px] border-b border-[#E8E8E8]\">\n {compareData.specificationKeys?.map((key: string) => {\n return (\n <GridItem\n span={12}\n className=\"grid grid-cols-3 items-center gap-[40px] border-b border-[#E8E8E8] py-[24px]\"\n key={key}\n >\n {/* Detail value */}\n <div className=\"text-[16px] font-bold text-[#595959]\">{key}</div>\n {/* Product Values */}\n {products.map((product, productIndex) => {\n const value =\n product.metafields?.global?.specifications?.find(\n (specification: { key: string }) => specification?.key === key\n )?.value || ''\n let text = value\n switch (text.trim().toLowerCase()) {\n case 'true':\n text = '\u2714\uFE0F'\n break\n case 'false':\n text = '\u274C'\n break\n default:\n break\n }\n return (\n <div key={productIndex} className=\"flex items-center\">\n {/* Other details */}\n <div className=\"text-[16px] font-semibold text-[#595959]\">{text}</div>\n </div>\n )\n })}\n </GridItem>\n )\n })}\n </Grid>\n </DialogContent>\n </Dialog>\n )\n}\n\nexport default CompareModal\n"],
5
- "mappings": "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",
6
- "names": ["CompareModal_exports", "__export", "CompareModal_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_BizProductProvider", "import_Select", "import_AiuiProvider", "import_utils", "import_ShopifyColorOption", "CompareModal", "locale", "compareData", "product", "selectedProductHandle", "setSelectedProductHandle", "products", "productIndex", "Select", "value", "variant", "colors", "option", "predicate", "label", "key", "text", "specification"]
4
+ "sourcesContent": ["import { useEffect, useState } from 'react'\nimport {\n Dialog,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogTitle,\n Grid,\n GridItem,\n Text,\n} from '../../../../../../components'\nimport { useBizProductContext } from '../../../../BizProductProvider'\nimport type { CompareItem } from '../../../../types'\nimport Select from './Select'\nimport { useAiuiContext } from '../../../../../AiuiProvider/index.js'\nimport { formatPrice } from '../../../../utils'\nimport { ShopifyColorOption } from './ShopifyColorOption'\n\nconst CompareModal = () => {\n const { locale = 'us', copyWriting } = useAiuiContext()\n const { compareData, product } = useBizProductContext()\n const [selectedProductHandle, setSelectedProductHandle] = useState<string>()\n\n useEffect(() => {\n setSelectedProductHandle(compareData?.availableCompareList[0]?.handle)\n }, [compareData?.availableCompareList])\n\n const products = [\n compareData?.currentProductCompareData!?.product,\n compareData?.availableCompareList.find(product => product.handle === selectedProductHandle)?.product,\n ].filter(Boolean) as CompareItem['product'][]\n\n if (!compareData?.specificationKeys) return null\n\n return (\n <Dialog>\n <DialogTrigger className=\"text-base leading-[1.4] font-bold\">{copyWriting?.compare}</DialogTrigger>\n <DialogContent\n overlayClassName=\"z-[100]\"\n className=\"max-h-[80vh] rounded-box z-[110] px-4 [&_.dialog-close-icon]:size-4 [&_.dialog-close-icon]:laptop:size-6 [&_.dialog-close-icon]:text-[#6D6D6F] gap-0 overflow-hidden overflow-y-auto laptop:w-[896px] max-w-[90vw] laptop:px-8 !py-0 [&_.dialog-close-button]:focus:!ring-0\"\n >\n <DialogHeader className=\"border-b laptop:pt-4 pt-4 pb-2 laptop:pb-3 border-[#E8E8E8]\">\n <DialogTitle className=\"text-sm text-[#6D6D6F]\">{copyWriting?.compare}</DialogTitle>\n </DialogHeader>\n <Grid className=\"grid-cols-3 laptop:gap-8 laptop:py-8 py-6\">\n <GridItem span={1} />\n {products.map((product, productIndex) => {\n return (\n <GridItem key={productIndex} span={1} className=\"flex items-center\">\n <img\n src={product.images[0].url}\n alt={product.title}\n className=\"h-[200px] w-[200px]\"\n role=\"presentation\"\n />\n </GridItem>\n )\n })}\n </Grid>\n <Grid className=\"gap-[40px] grid-cols-3 items-center gap-[40px] border-b border-[#E8E8E8] py-[24px]\">\n <GridItem span={1}>\n <div className=\"text-[16px] font-bold text-[#595959]\">Product</div>\n </GridItem>\n <GridItem span={1}>\n <Text\n as=\"div\"\n className=\"flex h-[38px] w-full items-center rounded-[2px] border border-[#E8E8E8] px-[12px] text-[16px] font-bold\"\n html={compareData.currentProductCompareData?.shortName || product.title}\n ></Text>\n </GridItem>\n {selectedProductHandle && (\n <GridItem span={1}>\n <Select\n value={selectedProductHandle}\n onChange={value => {\n setSelectedProductHandle(value)\n }}\n list={compareData.options!}\n />\n </GridItem>\n )}\n </Grid>\n <Grid className=\"gap-[40px] grid-cols-3 items-center gap-[40px] border-b border-[#E8E8E8] py-[24px]\">\n <GridItem span={1}>\n <div className=\"text-[16px] font-bold text-[#595959]\">Basic Information</div>\n </GridItem>\n {products.map((product, productIndex) => {\n const variant = product.variants[0]\n const colors = product.options\n ?.find(option =>\n ['color', 'colour', 'couleur'].find(predicate => option.name.toLowerCase().includes(predicate))\n )\n ?.values.map(value => value.label)\n return (\n <GridItem span={1} key={productIndex} className=\"flex h-full\">\n {/* Price with original price */}\n <div className=\"flex flex-col gap-[8px]\">\n {variant.price.amount < 9999999 && (\n <div className=\"flex items-center gap-[8px]\">\n <div className=\"text-[16px] font-semibold text-[#595959]\">Price:</div>\n <div className=\"flex items-center gap-[6px]\">\n <span className=\"text-[16px] font-bold\">\n {formatPrice({\n locale,\n amount: variant.price.amount,\n currencyCode: variant.price.currencyCode,\n })}\n </span>\n\n {/* {Number(coupon?.fixed_value) > 0 && (\n <span className='font-semibold text-[#999999] line-through'>\n {formatPrice({\n locale,\n amount: variant.price.amount,\n currencyCode: variant.price.currencyCode,\n })}\n </span>\n )} */}\n </div>\n </div>\n )}\n {colors?.length && (\n <div className=\"flex items-center gap-[8px]\">\n <div className=\"text-[16px] font-semibold text-[#595959]\">Color:</div>\n <div className=\"flex items-center gap-[16px]\">\n {colors.map(label => (\n <ShopifyColorOption key={label} label={label} className=\"h-[16px] w-[16px]\" />\n ))}\n </div>\n </div>\n )}\n </div>\n </GridItem>\n )\n })}\n </Grid>\n <Grid className=\"gap-[40px] grid-cols-12 items-center gap-[40px] border-b border-[#E8E8E8]\">\n {compareData.specificationKeys?.map((key: string) => {\n return (\n <GridItem\n span={12}\n className=\"grid grid-cols-3 items-center gap-[40px] border-b border-[#E8E8E8] py-[24px]\"\n key={key}\n >\n {/* Detail value */}\n <div className=\"text-[16px] font-bold text-[#595959]\">{key}</div>\n {/* Product Values */}\n {products.map((product, productIndex) => {\n const value =\n product.metafields?.global?.specifications?.find(\n (specification: { key: string }) => specification?.key === key\n )?.value || ''\n let text = value\n switch (text.trim().toLowerCase()) {\n case 'true':\n text = '\u2714\uFE0F'\n break\n case 'false':\n text = '\u274C'\n break\n default:\n break\n }\n return (\n <div key={productIndex} className=\"flex items-center\">\n {/* Other details */}\n <div className=\"text-[16px] font-semibold text-[#595959]\">{text}</div>\n </div>\n )\n })}\n </GridItem>\n )\n })}\n </Grid>\n </DialogContent>\n </Dialog>\n )\n}\n\nexport default CompareModal\n"],
5
+ "mappings": "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",
6
+ "names": ["CompareModal_exports", "__export", "CompareModal_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_BizProductProvider", "import_Select", "import_AiuiProvider", "import_utils", "import_ShopifyColorOption", "CompareModal", "locale", "copyWriting", "compareData", "product", "selectedProductHandle", "setSelectedProductHandle", "products", "productIndex", "Select", "value", "variant", "colors", "option", "predicate", "label", "key", "text", "specification"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var i=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var n=(a,t)=>{for(var l in t)i(a,l,{get:t[l],enumerable:!0})},m=(a,t,l,p)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of c(t))!d.call(a,s)&&s!==l&&i(a,s,{get:()=>t[s],enumerable:!(p=g(t,s))||p.enumerable});return a};var x=a=>m(i({},"__esModule",{value:!0}),a);var D={};n(D,{SpecsModal:()=>b});module.exports=x(D);var e=require("react/jsx-runtime"),o=require("../../../../../../components"),r=require("../../../../BizProductProvider");const b=()=>{const{product:a}=(0,r.useBizProductContext)();return(0,e.jsxs)(o.Dialog,{children:[(0,e.jsx)(o.DialogTrigger,{children:(0,e.jsx)("button",{className:"text-base leading-[1.4] font-bold",children:"Specs"})}),(0,e.jsxs)(o.DialogContent,{overlayClassName:"z-[100]",className:"max-h-[80vh] rounded-box z-[110] px-4 [&_.dialog-close-icon]:size-4 [&_.dialog-close-icon]:laptop:size-6 [&_.dialog-close-icon]:text-[#6D6D6F] gap-0 overflow-hidden overflow-y-auto laptop:w-[896px] max-w-[90vw] laptop:px-8 !py-0 [&_.dialog-close-button]:focus:!ring-0",children:[(0,e.jsx)(o.DialogHeader,{className:"border-b laptop:pt-4 pt-4 pb-2 laptop:pb-3 border-[#E8E8E8]",children:(0,e.jsx)(o.DialogTitle,{className:"text-sm text-[#6D6D6F]",children:"Specs"})}),(0,e.jsx)(o.Grid,{className:"laptop:gap-8 laptop:py-8 py-6",children:a.metafields?.global?.specifications?.map(({key:t,value:l})=>(0,e.jsxs)(o.GridItem,{span:6,className:"flex flex-col gap-1",children:[(0,e.jsx)(o.Text,{className:"text-[16px] font-bold",children:t}),(0,e.jsx)(o.Text,{className:"text-[16px] font-bold text-[#86868C]",html:l?.trim().toLowerCase()==="true"?"\u2714\uFE0F":l?.trim().toLowerCase()==="false"?"\u274C":l})]}))})]})]})};
1
+ "use strict";var p=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var m=(a,e)=>{for(var l in e)p(a,l,{get:e[l],enumerable:!0})},x=(a,e,l,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of n(e))!d.call(a,s)&&s!==l&&p(a,s,{get:()=>e[s],enumerable:!(i=g(e,s))||i.enumerable});return a};var f=a=>x(p({},"__esModule",{value:!0}),a);var b={};m(b,{SpecsModal:()=>D});module.exports=f(b);var t=require("react/jsx-runtime"),r=require("../../../../../AiuiProvider/index.js"),o=require("../../../../../../components"),c=require("../../../../BizProductProvider");const D=()=>{const{product:a}=(0,c.useBizProductContext)(),{copyWriting:e}=(0,r.useAiuiContext)();return(0,t.jsxs)(o.Dialog,{children:[(0,t.jsx)(o.DialogTrigger,{className:"text-base leading-[1.4] font-bold",children:e?.specs}),(0,t.jsxs)(o.DialogContent,{overlayClassName:"z-[100]",className:"max-h-[80vh] rounded-box z-[110] px-4 [&_.dialog-close-icon]:size-4 [&_.dialog-close-icon]:laptop:size-6 [&_.dialog-close-icon]:text-[#6D6D6F] gap-0 overflow-hidden overflow-y-auto laptop:w-[896px] max-w-[90vw] laptop:px-8 !py-0 [&_.dialog-close-button]:focus:!ring-0",children:[(0,t.jsx)(o.DialogHeader,{className:"border-b laptop:pt-4 pt-4 pb-2 laptop:pb-3 border-[#E8E8E8]",children:(0,t.jsx)(o.DialogTitle,{className:"text-sm text-[#6D6D6F]",children:e?.specs})}),(0,t.jsx)(o.Grid,{className:"laptop:gap-8 laptop:py-8 py-6",children:a.metafields?.global?.specifications?.map(({key:l,value:i})=>(0,t.jsxs)(o.GridItem,{span:6,className:"flex flex-col gap-1",children:[(0,t.jsx)(o.Text,{className:"text-[16px] font-bold",children:l}),(0,t.jsx)(o.Text,{className:"text-[16px] font-bold text-[#86868C]",html:i?.trim().toLowerCase()==="true"?"\u2714\uFE0F":i?.trim().toLowerCase()==="false"?"\u274C":i})]},l))})]})]})};
2
2
  //# sourceMappingURL=SpecsModal.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../../src/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.tsx"],
4
- "sourcesContent": ["import {\n Dialog,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogTitle,\n Grid,\n GridItem,\n Text,\n} from '../../../../../../components'\nimport { useBizProductContext } from '../../../../BizProductProvider'\n\nexport const SpecsModal = () => {\n const { product } = useBizProductContext()\n\n return (\n <Dialog>\n <DialogTrigger>\n <button className=\"text-base leading-[1.4] font-bold\">Specs</button>\n </DialogTrigger>\n <DialogContent\n overlayClassName=\"z-[100]\"\n className=\"max-h-[80vh] rounded-box z-[110] px-4 [&_.dialog-close-icon]:size-4 [&_.dialog-close-icon]:laptop:size-6 [&_.dialog-close-icon]:text-[#6D6D6F] gap-0 overflow-hidden overflow-y-auto laptop:w-[896px] max-w-[90vw] laptop:px-8 !py-0 [&_.dialog-close-button]:focus:!ring-0\"\n >\n <DialogHeader className=\"border-b laptop:pt-4 pt-4 pb-2 laptop:pb-3 border-[#E8E8E8]\">\n <DialogTitle className=\"text-sm text-[#6D6D6F]\">Specs</DialogTitle>\n </DialogHeader>\n <Grid className=\"laptop:gap-8 laptop:py-8 py-6\">\n {product.metafields?.global?.specifications?.map(({ key, value }: { key: string; value: string }) => (\n <GridItem span={6} className=\"flex flex-col gap-1\">\n <Text className=\"text-[16px] font-bold\">{key}</Text>\n <Text\n className=\"text-[16px] font-bold text-[#86868C]\"\n html={\n value?.trim().toLowerCase() === 'true' ? '\u2714\uFE0F' : value?.trim().toLowerCase() === 'false' ? '\u274C' : value\n }\n />\n </GridItem>\n ))}\n </Grid>\n </DialogContent>\n </Dialog>\n )\n}\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,IAAA,eAAAC,EAAAH,GAkBQ,IAAAI,EAAA,6BAlBRC,EASO,wCACPC,EAAqC,0CAE9B,MAAMJ,EAAa,IAAM,CAC9B,KAAM,CAAE,QAAAK,CAAQ,KAAI,wBAAqB,EAEzC,SACE,QAAC,UACC,oBAAC,iBACC,mBAAC,UAAO,UAAU,oCAAoC,iBAAK,EAC7D,KACA,QAAC,iBACC,iBAAiB,UACjB,UAAU,8QAEV,oBAAC,gBAAa,UAAU,8DACtB,mBAAC,eAAY,UAAU,yBAAyB,iBAAK,EACvD,KACA,OAAC,QAAK,UAAU,gCACb,SAAAA,EAAQ,YAAY,QAAQ,gBAAgB,IAAI,CAAC,CAAE,IAAAC,EAAK,MAAAC,CAAM,OAC7D,QAAC,YAAS,KAAM,EAAG,UAAU,sBAC3B,oBAAC,QAAK,UAAU,wBAAyB,SAAAD,EAAI,KAC7C,OAAC,QACC,UAAU,uCACV,KACEC,GAAO,KAAK,EAAE,YAAY,IAAM,OAAS,eAAOA,GAAO,KAAK,EAAE,YAAY,IAAM,QAAU,SAAMA,EAEpG,GACF,CACD,EACH,GACF,GACF,CAEJ",
6
- "names": ["SpecsModal_exports", "__export", "SpecsModal", "__toCommonJS", "import_jsx_runtime", "import_components", "import_BizProductProvider", "product", "key", "value"]
4
+ "sourcesContent": ["import { useAiuiContext } from '../../../../../AiuiProvider/index.js'\nimport {\n Dialog,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogTitle,\n Grid,\n GridItem,\n Text,\n} from '../../../../../../components'\nimport { useBizProductContext } from '../../../../BizProductProvider'\n\nexport const SpecsModal = () => {\n const { product } = useBizProductContext()\n const { copyWriting } = useAiuiContext()\n\n return (\n <Dialog>\n <DialogTrigger className=\"text-base leading-[1.4] font-bold\">{copyWriting?.specs}</DialogTrigger>\n <DialogContent\n overlayClassName=\"z-[100]\"\n className=\"max-h-[80vh] rounded-box z-[110] px-4 [&_.dialog-close-icon]:size-4 [&_.dialog-close-icon]:laptop:size-6 [&_.dialog-close-icon]:text-[#6D6D6F] gap-0 overflow-hidden overflow-y-auto laptop:w-[896px] max-w-[90vw] laptop:px-8 !py-0 [&_.dialog-close-button]:focus:!ring-0\"\n >\n <DialogHeader className=\"border-b laptop:pt-4 pt-4 pb-2 laptop:pb-3 border-[#E8E8E8]\">\n <DialogTitle className=\"text-sm text-[#6D6D6F]\">{copyWriting?.specs}</DialogTitle>\n </DialogHeader>\n <Grid className=\"laptop:gap-8 laptop:py-8 py-6\">\n {product.metafields?.global?.specifications?.map(({ key, value }: { key: string; value: string }) => (\n <GridItem span={6} key={key} className=\"flex flex-col gap-1\">\n <Text className=\"text-[16px] font-bold\">{key}</Text>\n <Text\n className=\"text-[16px] font-bold text-[#86868C]\"\n html={\n value?.trim().toLowerCase() === 'true' ? '\u2714\uFE0F' : value?.trim().toLowerCase() === 'false' ? '\u274C' : value\n }\n />\n </GridItem>\n ))}\n </Grid>\n </DialogContent>\n </Dialog>\n )\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,IAAA,eAAAC,EAAAH,GAmBM,IAAAI,EAAA,6BAnBNC,EAA+B,gDAC/BC,EASO,wCACPC,EAAqC,0CAE9B,MAAML,EAAa,IAAM,CAC9B,KAAM,CAAE,QAAAM,CAAQ,KAAI,wBAAqB,EACnC,CAAE,YAAAC,CAAY,KAAI,kBAAe,EAEvC,SACE,QAAC,UACC,oBAAC,iBAAc,UAAU,oCAAqC,SAAAA,GAAa,MAAM,KACjF,QAAC,iBACC,iBAAiB,UACjB,UAAU,8QAEV,oBAAC,gBAAa,UAAU,8DACtB,mBAAC,eAAY,UAAU,yBAA0B,SAAAA,GAAa,MAAM,EACtE,KACA,OAAC,QAAK,UAAU,gCACb,SAAAD,EAAQ,YAAY,QAAQ,gBAAgB,IAAI,CAAC,CAAE,IAAAE,EAAK,MAAAC,CAAM,OAC7D,QAAC,YAAS,KAAM,EAAa,UAAU,sBACrC,oBAAC,QAAK,UAAU,wBAAyB,SAAAD,EAAI,KAC7C,OAAC,QACC,UAAU,uCACV,KACEC,GAAO,KAAK,EAAE,YAAY,IAAM,OAAS,eAAOA,GAAO,KAAK,EAAE,YAAY,IAAM,QAAU,SAAMA,EAEpG,IAPsBD,CAQxB,CACD,EACH,GACF,GACF,CAEJ",
6
+ "names": ["SpecsModal_exports", "__export", "SpecsModal", "__toCommonJS", "import_jsx_runtime", "import_AiuiProvider", "import_components", "import_BizProductProvider", "product", "copyWriting", "key", "value"]
7
7
  }