@anker-in/headless-ui 1.0.14 → 1.0.16

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 (125) hide show
  1. package/dist/cjs/biz-components/AccordionCards/index.js +1 -1
  2. package/dist/cjs/biz-components/AccordionCards/index.js.map +2 -2
  3. package/dist/cjs/biz-components/AiuiProvider/index.js +1 -1
  4. package/dist/cjs/biz-components/AiuiProvider/index.js.map +3 -3
  5. package/dist/cjs/biz-components/Category/index.js +1 -1
  6. package/dist/cjs/biz-components/Category/index.js.map +2 -2
  7. package/dist/cjs/biz-components/CreativeModule/index.js +1 -1
  8. package/dist/cjs/biz-components/CreativeModule/index.js.map +2 -2
  9. package/dist/cjs/biz-components/Evaluate/index.js +1 -1
  10. package/dist/cjs/biz-components/Evaluate/index.js.map +2 -2
  11. package/dist/cjs/biz-components/Faq/Faq.js +1 -1
  12. package/dist/cjs/biz-components/Faq/Faq.js.map +1 -1
  13. package/dist/cjs/biz-components/Graphic/index.js +1 -1
  14. package/dist/cjs/biz-components/Graphic/index.js.map +2 -2
  15. package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.js +1 -1
  16. package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.js.map +2 -2
  17. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
  18. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js.map +2 -2
  19. package/dist/cjs/biz-components/MediaPlayerMulti/index.js +1 -1
  20. package/dist/cjs/biz-components/MediaPlayerMulti/index.js.map +2 -2
  21. package/dist/cjs/biz-components/MemberEquity/index.js +2 -2
  22. package/dist/cjs/biz-components/MemberEquity/index.js.map +2 -2
  23. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  24. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
  25. package/dist/cjs/biz-components/ShelfDisplay/index.d.ts +1 -64
  26. package/dist/cjs/biz-components/ShelfDisplay/index.js +1 -5
  27. package/dist/cjs/biz-components/ShelfDisplay/index.js.map +3 -3
  28. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.d.ts +74 -0
  29. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.js +1 -1
  30. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.js.map +2 -2
  31. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.d.ts +8 -0
  32. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js +10 -0
  33. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js.map +7 -0
  34. package/dist/cjs/biz-components/Slogan/index.js +1 -1
  35. package/dist/cjs/biz-components/Slogan/index.js.map +2 -2
  36. package/dist/cjs/biz-components/SwiperBox/index.js +1 -1
  37. package/dist/cjs/biz-components/SwiperBox/index.js.map +3 -3
  38. package/dist/cjs/biz-components/SwiperBox/types.d.ts +1 -0
  39. package/dist/cjs/biz-components/SwiperBox/types.js +1 -1
  40. package/dist/cjs/biz-components/SwiperBox/types.js.map +1 -1
  41. package/dist/cjs/biz-components/Tabs/Tabs.js +1 -1
  42. package/dist/cjs/biz-components/Tabs/Tabs.js.map +3 -3
  43. package/dist/cjs/biz-components/Tabs/types.d.ts +4 -1
  44. package/dist/cjs/biz-components/Tabs/types.js +1 -1
  45. package/dist/cjs/biz-components/Tabs/types.js.map +1 -1
  46. package/dist/cjs/biz-components/TextModal/index.js +1 -1
  47. package/dist/cjs/biz-components/TextModal/index.js.map +2 -2
  48. package/dist/cjs/biz-components/Title/index.js +1 -1
  49. package/dist/cjs/biz-components/Title/index.js.map +2 -2
  50. package/dist/cjs/biz-components/VideoModal/YouTubePlayer.js +1 -1
  51. package/dist/cjs/biz-components/VideoModal/YouTubePlayer.js.map +2 -2
  52. package/dist/cjs/biz-components/VideoModal/index.js +1 -1
  53. package/dist/cjs/biz-components/VideoModal/index.js.map +2 -2
  54. package/dist/cjs/biz-components/WhyChoose/WhyChoose.js +1 -1
  55. package/dist/cjs/biz-components/WhyChoose/WhyChoose.js.map +2 -2
  56. package/dist/cjs/components/button.d.ts +1 -0
  57. package/dist/cjs/components/button.js +1 -1
  58. package/dist/cjs/components/button.js.map +3 -3
  59. package/dist/cjs/components/tabs.js +1 -1
  60. package/dist/cjs/components/tabs.js.map +3 -3
  61. package/dist/cjs/stories/graphic.stories.d.ts +1 -1
  62. package/dist/cjs/stories/shelfDisplay.stories.d.ts +1 -1
  63. package/dist/esm/biz-components/AccordionCards/index.js +1 -1
  64. package/dist/esm/biz-components/AccordionCards/index.js.map +2 -2
  65. package/dist/esm/biz-components/AiuiProvider/index.js +1 -1
  66. package/dist/esm/biz-components/AiuiProvider/index.js.map +3 -3
  67. package/dist/esm/biz-components/Category/index.js +1 -1
  68. package/dist/esm/biz-components/Category/index.js.map +2 -2
  69. package/dist/esm/biz-components/CreativeModule/index.js +1 -1
  70. package/dist/esm/biz-components/CreativeModule/index.js.map +2 -2
  71. package/dist/esm/biz-components/Evaluate/index.js +1 -1
  72. package/dist/esm/biz-components/Evaluate/index.js.map +2 -2
  73. package/dist/esm/biz-components/Faq/Faq.js +1 -1
  74. package/dist/esm/biz-components/Faq/Faq.js.map +1 -1
  75. package/dist/esm/biz-components/Graphic/index.js +1 -1
  76. package/dist/esm/biz-components/Graphic/index.js.map +2 -2
  77. package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.js +1 -1
  78. package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.js.map +2 -2
  79. package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
  80. package/dist/esm/biz-components/HeroBanner/HeroBanner.js.map +2 -2
  81. package/dist/esm/biz-components/MediaPlayerMulti/index.js +1 -1
  82. package/dist/esm/biz-components/MediaPlayerMulti/index.js.map +2 -2
  83. package/dist/esm/biz-components/MemberEquity/index.js +2 -2
  84. package/dist/esm/biz-components/MemberEquity/index.js.map +2 -2
  85. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  86. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
  87. package/dist/esm/biz-components/ShelfDisplay/index.d.ts +1 -64
  88. package/dist/esm/biz-components/ShelfDisplay/index.js +1 -5
  89. package/dist/esm/biz-components/ShelfDisplay/index.js.map +3 -3
  90. package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.d.ts +74 -0
  91. package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.js +1 -1
  92. package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.js.map +2 -2
  93. package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.d.ts +8 -0
  94. package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js +10 -0
  95. package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js.map +7 -0
  96. package/dist/esm/biz-components/Slogan/index.js +1 -1
  97. package/dist/esm/biz-components/Slogan/index.js.map +2 -2
  98. package/dist/esm/biz-components/SwiperBox/index.js +1 -1
  99. package/dist/esm/biz-components/SwiperBox/index.js.map +3 -3
  100. package/dist/esm/biz-components/SwiperBox/types.d.ts +1 -0
  101. package/dist/esm/biz-components/SwiperBox/types.js.map +1 -1
  102. package/dist/esm/biz-components/Tabs/Tabs.js +1 -1
  103. package/dist/esm/biz-components/Tabs/Tabs.js.map +3 -3
  104. package/dist/esm/biz-components/Tabs/types.d.ts +4 -1
  105. package/dist/esm/biz-components/TextModal/index.js +1 -1
  106. package/dist/esm/biz-components/TextModal/index.js.map +2 -2
  107. package/dist/esm/biz-components/Title/index.js +1 -1
  108. package/dist/esm/biz-components/Title/index.js.map +2 -2
  109. package/dist/esm/biz-components/VideoModal/YouTubePlayer.js +1 -1
  110. package/dist/esm/biz-components/VideoModal/YouTubePlayer.js.map +2 -2
  111. package/dist/esm/biz-components/VideoModal/index.js +1 -1
  112. package/dist/esm/biz-components/VideoModal/index.js.map +2 -2
  113. package/dist/esm/biz-components/WhyChoose/WhyChoose.js +1 -1
  114. package/dist/esm/biz-components/WhyChoose/WhyChoose.js.map +2 -2
  115. package/dist/esm/components/button.d.ts +1 -0
  116. package/dist/esm/components/button.js +1 -1
  117. package/dist/esm/components/button.js.map +3 -3
  118. package/dist/esm/components/tabs.js +1 -1
  119. package/dist/esm/components/tabs.js.map +3 -3
  120. package/dist/esm/stories/graphic.stories.d.ts +1 -1
  121. package/dist/esm/stories/shelfDisplay.stories.d.ts +1 -1
  122. package/dist/tokens/base.css +6 -0
  123. package/package.json +1 -1
  124. package/style.css +7 -4
  125. package/tailwind.config.js +2 -0
@@ -0,0 +1,10 @@
1
+ "use strict";var A=Object.create;var f=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var V=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var G=(e,t)=>{for(var n in t)f(e,n,{get:t[n],enumerable:!0})},F=(e,t,n,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of R(t))!q.call(e,o)&&o!==n&&f(e,o,{get:()=>t[o],enumerable:!(c=E(t,o))||c.enumerable});return e};var D=(e,t,n)=>(n=e!=null?A(V(e)):{},F(t||!e||!e.__esModule?f(n,"default",{value:e,enumerable:!0}):n,e)),J=e=>F(f({},"__esModule",{value:!0}),e);var Q={};G(Q,{ShelfDisplayHorizontalItem:()=>M,ShelfDisplayWrapItem:()=>K});module.exports=J(Q);var l=require("react/jsx-runtime"),I=require("../AiuiProvider/index.js"),T=require("./shelfDisplay.js"),k=D(require("../../components/picture.js")),P=D(require("../../components/badge.js")),m=require("../../helpers/utils.js"),$=require("../../components/text.js"),b=D(require("../../components/button.js")),j=require("../../shared/track.js"),O=require("../../shared/trackUrlRef.js"),z=require("../../components/heading.js");const H="image",L="product_shelf",U=999999999e-2,K=({data:e,configuration:t})=>{const{isDisplayBackImage:n=!1,itemShape:c}=t||{},{locale:o="us",copyWriting:w}=(0,I.useAiuiContext)(),g=(i,s,r)=>t?.event?.primaryButton?.(i,s+1,r),S=(i,s,r)=>t?.event?.secondaryButton?.(i,s+1,r),a=e?.variants?.find(i=>i?.sku===e?.sku)||e?.variants?.[0]||{},_=!a?.availableForSale&&a?.price?.amount===U,N=t?.isShowTag,v=t?.isShowOriginalPrice,d=a?.coupons?.[0],{price:B,basePrice:C}=(0,T.formatVariantPrice)({locale:o,amount:v&&d?d.variant_price4wscode:a.price,baseAmount:v&&d?a.price:0,currencyCode:e?.price?.currencyCode||"USD"}),y=()=>{const i=e?.sku,s=e?.variants;return s?.find(u=>u?.sku===i)?.image?.url||s?.[0]?.image?.url||""},p=e?.custom_name||e?.title,h=e?.custom_description||e?.description,x=()=>(0,l.jsxs)(l.Fragment,{children:[N?(0,l.jsx)("div",{className:"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden",children:e?.tags?.filter?.(i=>i?.startsWith?.("CLtag"))?.map?.(i=>i?.replace?.("CLtag:",""))?.slice?.(0,2)?.map?.((i,s)=>(0,l.jsx)(P.default,{children:i},s))}):null,p?(0,l.jsx)(z.Heading,{as:"h3",title:p||"",size:2,className:"shelf-display-product-title mb-1 line-clamp-2",html:p||""}):null,h?(0,l.jsx)($.Text,{size:2,className:"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 shelf-display-product-description line-clamp-1 h-5 text-sm",html:h||""}):null,(0,l.jsx)("div",{className:"mb-2 mt-5 flex items-center",children:_?(0,l.jsx)("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:w?.soldOutText}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"final-price tablet:text-2xl text-info-primary text-xl font-bold",children:a?.availableForSale&&B||""}),(0,l.jsx)("div",{className:"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through",children:a?.availableForSale&&C||""})]})}),(0,l.jsxs)("div",{className:(0,m.cn)("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2",t.direction==="vertical"?"flex-col":""),children:[t?.secondaryButton?(0,l.jsx)(b.default,{variant:"secondary",onClick:()=>S(e,t?.index,t),className:`
2
+ ${t.direction==="vertical"?"w-full":""}
3
+ `,children:t?.secondaryButton||""}):null,t?.primaryButton?(0,l.jsx)(b.default,{variant:"primary",onClick:()=>g(e,t?.index,t),className:`
4
+ ${t.direction==="vertical"?"w-full":""}
5
+ `,children:t?.primaryButton||""}):null]})]});return(0,l.jsx)("div",{className:(0,m.cn)("bg-container-secondary-1 tablet:hover:bg-info-white box-border w-full cursor-pointer overflow-hidden duration-300",c==="round"?"rounded-2xl":"rounded-none","lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]","laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative","md-tablet:h-[360px]"),children:n?(0,l.jsx)("div",{className:"absolute inset-0 box-border overflow-hidden",children:(0,l.jsxs)("div",{className:"relative inset-0 size-full",children:[(0,l.jsx)(k.default,{source:y(),alt:"",className:"flex h-full justify-center object-cover [&_img]:w-auto"}),(0,l.jsx)("div",{className:"desktop:p-6 absolute inset-x-0 bottom-0 box-border overflow-hidden p-4",children:x()})]})}):(0,l.jsxs)("div",{className:"desktop:p-6 absolute inset-0 box-border flex flex-col justify-between overflow-hidden p-4",children:[(0,l.jsx)("div",{className:(0,m.cn)("lg-desktop:mb-3 lg-desktop:h-[195px] relative mb-2 inline-block h-[140px] w-full flex-1 overflow-hidden"),children:(0,l.jsx)("a",{"aria-label":p,target:t?.target,href:(0,O.trackUrlRef)(`${o==="us"||!o?"":`/${o}`}/products/${e?.handle}`,`${H}_${L}`),onClick:()=>{(0,j.gaTrack)({event:"ga4Event",event_name:"select_item",event_parameters:{page_group:"Home Page",item_list_name:"Home_Page_Bundle",items:[{item_id:e?.sku||a?.sku,item_name:e?.name,item_variant:a?.name,price:a?.price,index:t?.index+1}]}})},children:(0,l.jsx)(k.default,{source:y(),alt:"",className:"flex h-full justify-center object-cover [&_img]:w-auto"})})}),x()]})},e?.id||e?.handle)},M=({data:e,configuration:t})=>{const{itemShape:n,itemLength:c}=t||{},{locale:o="us",copyWriting:w}=(0,I.useAiuiContext)(),g=(s,r,u)=>t?.event?.primaryButton?.(s,r+1,u),S=(s,r,u)=>t?.event?.secondaryButton?.(s,r+1,u),a=e?.variants?.find(s=>s?.sku===e?.sku)||e?.variants?.[0]||{},_=!a?.availableForSale&&a?.price?.amount===U,N=t?.isShowTag,v=t?.isShowOriginalPrice,d=a?.coupons?.[0],{price:B,basePrice:C}=(0,T.formatVariantPrice)({locale:o,amount:v&&d?d.variant_price4wscode:a.price,baseAmount:v&&d?a.price:0,currencyCode:e?.price?.currencyCode||"USD"}),y=()=>{const s=e?.sku,r=e?.variants;return r?.find(W=>W?.sku===s)?.image?.url||r?.[0]?.image?.url||""},p=e?.custom_name||e?.title,h=e?.custom_description||e?.description,x=()=>c>=2?{boxItem:"lg-desktop:max-w-[401px] desktop:max-w-[292px] max-w-full",imgItem:"m-tablet:m-auto lg-desktop:max-w-[330px] lg-desktop:max-h-[330px] desktop:max-w-[260px] desktop:max-h-[260px] max-w-[138px] max-h-[138px]",wrap:"lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[480] desktop:aspect-w-[648] desktop:aspect-h-[380] laptop:aspect-w-[440] laptop:aspect-h-[356] tablet:aspect-w-[346] tablet:aspect-h-[360] md-tablet:w-full"}:{boxItem:"lg-desktop:max-w-[401px] desktop:max-w-[292px] laptop:max-w-[289px] max-w-[262px]",imgItem:"md-tablet:m-auto lg-desktop:max-w-[450px] lg-desktop:max-h-[450px] desktop:max-w-[332px] desktop:max-h-[332px] max-w-[312px] max-h-[312px]",wrap:"lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[480] desktop:aspect-w-[1312] desktop:aspect-h-[380] laptop:aspect-w-[896] laptop:aspect-h-[356] tablet:aspect-w-[704] tablet:aspect-h-[360] md-tablet:w-full"},i=()=>c>=2?"flex flex-col justify-between desktop:gap-12 desktop:flex-row desktop:justify-center desktop:items-center":"flex justify-center items-center gap-6 md-tablet:flex-col";return(0,l.jsx)("div",{className:(0,m.cn)(x().wrap,n==="round"?"rounded-2xl":"rounded-none","bg-container-secondary-1 tablet:hover:bg-info-white duration-300 gap-6","box-border w-full cursor-pointer overflow-hidden relative md-tablet:h-[360px]"),children:(0,l.jsxs)("div",{className:(0,m.cn)(i(),"desktop:p-6 absolute inset-0 box-border overflow-hidden p-4"),children:[(0,l.jsx)("div",{className:(0,m.cn)(x().imgItem,"relative overflow-hidden desktop:mb-0 mb-1"),children:(0,l.jsx)("a",{"aria-label":p,target:t?.target,href:(0,O.trackUrlRef)(`${o==="us"||!o?"":`/${o}`}/products/${e?.handle}`,`${H}_${L}`),onClick:()=>{(0,j.gaTrack)({event:"ga4Event",event_name:"select_item",event_parameters:{page_group:"Home Page",item_list_name:"Home_Page_Bundle",items:[{item_id:e?.sku||a?.sku,item_name:e?.name,item_variant:a?.name,price:a?.price,index:t?.index+1}]}})},children:(0,l.jsx)(k.default,{source:y(),alt:"",className:"flex h-full justify-center object-cover [&_img]:w-auto"})})}),(0,l.jsxs)("div",{className:(0,m.cn)("flex flex-col justify-center items-start",x().boxItem),children:[N?(0,l.jsx)("div",{className:"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden",children:e?.tags?.filter?.(s=>s?.startsWith?.("CLtag"))?.map?.(s=>s?.replace?.("CLtag:",""))?.slice?.(0,2)?.map?.((s,r)=>(0,l.jsx)(P.default,{children:s},r))}):null,p?(0,l.jsx)(z.Heading,{as:"h3",title:p||"",size:2,className:"shelf-display-product-title mb-1 line-clamp-2",html:p||""}):null,h?(0,l.jsx)($.Text,{size:2,className:"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 shelf-display-product-description line-clamp-1 h-5 text-sm",html:h||""}):null,(0,l.jsx)("div",{className:"mb-2 mt-5 flex items-center",children:_?(0,l.jsx)("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:w?.soldOutText}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"final-price tablet:text-2xl text-info-primary text-xl font-bold",children:a?.availableForSale&&B||""}),(0,l.jsx)("div",{className:"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through",children:a?.availableForSale&&C||""})]})}),(0,l.jsxs)("div",{className:(0,m.cn)("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2",t.direction==="vertical"?"flex-col":""),children:[t?.secondaryButton?(0,l.jsx)(b.default,{variant:"secondary",onClick:()=>S(e,t?.index,t),className:`
6
+ ${t.direction==="vertical"?"w-full":""}
7
+ `,children:t?.secondaryButton||""}):null,t?.primaryButton?(0,l.jsx)(b.default,{variant:"primary",onClick:()=>g(e,t?.index,t),className:`
8
+ ${t.direction==="vertical"?"w-full":""}
9
+ `,children:t?.primaryButton||""}):null]})]})]})},e?.id||e?.handle)};
10
+ //# sourceMappingURL=shelfDisplayItem.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/ShelfDisplay/shelfDisplayItem.tsx"],
4
+ "sourcesContent": ["import { useAiuiContext } from '../AiuiProvider/index.js'\nimport { formatVariantPrice } from './shelfDisplay.js'\nimport Picture from '../../components/picture.js'\nimport Badge from '../../components/badge.js'\nimport { cn } from '../../helpers/utils.js'\nimport { Text } from '../../components/text.js'\nimport Button from '../../components/button.js'\nimport { gaTrack } from '../../shared/track.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { Heading } from '../../components/heading.js'\nimport type { ShelfDisplayItem, ShelfDisplayType } from './shelfDisplay.js'\n\nconst componentType = 'image'\nconst componentName = 'product_shelf'\n\nconst SOLD_OUT_PRICE = 9999999.99\n\nexport const ShelfDisplayWrapItem = ({ data, configuration }: { data: any; configuration?: any }) => {\n const { isDisplayBackImage = false, itemShape } = configuration || {}\n const { locale = 'us', copyWriting } = useAiuiContext()\n\n const onPrimaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.primaryButton?.(params, index + 1, data)\n\n const onSecondaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.secondaryButton?.(params, index + 1, data)\n\n const variant = data?.variants?.find((item: any) => item?.sku === data?.sku) || data?.variants?.[0] || {}\n\n const isSoldOut = !variant?.availableForSale && variant?.price?.amount === SOLD_OUT_PRICE\n const isShowTag = configuration?.isShowTag\n const isShowOriginalPrice = configuration?.isShowOriginalPrice\n\n // active \u7684 \u901A\u7528\u6298\u6263\n const coupon = variant?.coupons?.[0]\n\n const { price, basePrice } = formatVariantPrice({\n locale: locale,\n amount: isShowOriginalPrice && coupon ? coupon.variant_price4wscode : variant.price,\n baseAmount: isShowOriginalPrice && coupon ? variant.price : 0,\n currencyCode: data?.price?.currencyCode || 'USD',\n })\n\n const handleUrl = () => {\n const sku = data?.sku\n const skuArray = data?.variants\n const findSku = skuArray?.find((item: any) => item?.sku === sku)\n return findSku?.image?.url || skuArray?.[0]?.image?.url || ''\n }\n\n const displayTitle = data?.custom_name || data?.title\n const displayDescription = data?.custom_description || data?.description\n\n const bottomContent = () => {\n return (\n <>\n {isShowTag ? (\n <div className=\"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden\">\n {data?.tags\n ?.filter?.((item: any) => item?.startsWith?.('CLtag'))\n ?.map?.((item: any) => item?.replace?.('CLtag:', ''))\n ?.slice?.(0, 2)\n ?.map?.((item: any, index: number) => <Badge key={index}>{item}</Badge>)}\n </div>\n ) : null}\n {displayTitle ? (\n <Heading\n as=\"h3\"\n title={displayTitle || ''}\n size={2}\n className=\"shelf-display-product-title mb-1 line-clamp-2\"\n html={displayTitle || ''}\n />\n ) : null}\n {displayDescription ? (\n <Text\n size={2}\n className=\"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 shelf-display-product-description line-clamp-1 h-5 text-sm\"\n html={displayDescription || ''}\n />\n ) : null}\n <div className=\"mb-2 mt-5 flex items-center\">\n {isSoldOut ? (\n <div className=\"tablet:text-2xl text-info-primary text-xl font-bold\">{copyWriting?.soldOutText}</div>\n ) : (\n <>\n <div className=\"final-price tablet:text-2xl text-info-primary text-xl font-bold\">\n {variant?.availableForSale ? price || '' : ''}\n </div>\n <div className=\"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through\">\n {variant?.availableForSale ? basePrice || '' : ''}\n </div>\n </>\n )}\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div\n className={cn(\n 'shelf-flex-button-group',\n 'lg-desktop:gap-3 flex items-center gap-2',\n configuration.direction === 'vertical' ? 'flex-col' : ''\n )}\n >\n {configuration?.secondaryButton ? (\n <Button\n variant=\"secondary\"\n onClick={() => onSecondaryButton(data, configuration?.index, configuration)}\n className={`\n ${configuration.direction === 'vertical' ? 'w-full' : ''}\n `}\n >\n {configuration?.secondaryButton || ''}\n </Button>\n ) : null}\n {configuration?.primaryButton ? (\n <Button\n variant=\"primary\"\n onClick={() => onPrimaryButton(data, configuration?.index, configuration)}\n className={`\n ${configuration.direction === 'vertical' ? 'w-full' : ''}\n `}\n >\n {configuration?.primaryButton || ''}\n </Button>\n ) : null}\n </div>\n </>\n )\n }\n\n return (\n <div\n key={data?.id || data?.handle}\n className={cn(\n 'bg-container-secondary-1 tablet:hover:bg-info-white box-border w-full cursor-pointer overflow-hidden duration-300',\n itemShape === 'round' ? 'rounded-2xl' : 'rounded-none',\n 'lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]',\n 'laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative',\n 'md-tablet:h-[360px]'\n )}\n >\n {isDisplayBackImage ? (\n <div className=\"absolute inset-0 box-border overflow-hidden\">\n <div className=\"relative inset-0 size-full\">\n <Picture source={handleUrl()} alt=\"\" className=\"flex h-full justify-center object-cover [&_img]:w-auto\" />\n <div className=\"desktop:p-6 absolute inset-x-0 bottom-0 box-border overflow-hidden p-4\">\n {bottomContent()}\n </div>\n </div>\n </div>\n ) : (\n <div className=\"desktop:p-6 absolute inset-0 box-border flex flex-col justify-between overflow-hidden p-4\">\n <div\n className={cn(\n 'lg-desktop:mb-3 lg-desktop:h-[195px] relative mb-2 inline-block h-[140px] w-full flex-1 overflow-hidden'\n )}\n >\n <a\n aria-label={displayTitle}\n target={configuration?.target}\n href={trackUrlRef(\n `${locale === 'us' || !locale ? '' : `/${locale}`}/products/${data?.handle}`,\n `${componentType}_${componentName}`\n )}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'select_item',\n event_parameters: {\n page_group: 'Home Page',\n item_list_name: 'Home_Page_Bundle',\n items: [\n {\n item_id: data?.sku || variant?.sku,\n item_name: data?.name,\n item_variant: variant?.name,\n price: variant?.price,\n index: configuration?.index + 1,\n },\n ],\n },\n })\n }}\n >\n <Picture source={handleUrl()} alt=\"\" className=\"flex h-full justify-center object-cover [&_img]:w-auto\" />\n </a>\n </div>\n {bottomContent()}\n </div>\n )}\n </div>\n )\n}\n\nexport const ShelfDisplayHorizontalItem = ({ data, configuration }: { data: any; configuration?: any }) => {\n const { itemShape, itemLength } = configuration || {}\n const { locale = 'us', copyWriting } = useAiuiContext()\n\n const onPrimaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.primaryButton?.(params, index + 1, data)\n\n const onSecondaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.secondaryButton?.(params, index + 1, data)\n\n const variant = data?.variants?.find((item: any) => item?.sku === data?.sku) || data?.variants?.[0] || {}\n\n const isSoldOut = !variant?.availableForSale && variant?.price?.amount === SOLD_OUT_PRICE\n const isShowTag = configuration?.isShowTag\n const isShowOriginalPrice = configuration?.isShowOriginalPrice\n\n // active \u7684 \u901A\u7528\u6298\u6263\n const coupon = variant?.coupons?.[0]\n\n const { price, basePrice } = formatVariantPrice({\n locale: locale,\n amount: isShowOriginalPrice && coupon ? coupon.variant_price4wscode : variant.price,\n baseAmount: isShowOriginalPrice && coupon ? variant.price : 0,\n currencyCode: data?.price?.currencyCode || 'USD',\n })\n\n const handleUrl = () => {\n const sku = data?.sku\n const skuArray = data?.variants\n const findSku = skuArray?.find((item: any) => item?.sku === sku)\n return findSku?.image?.url || skuArray?.[0]?.image?.url || ''\n }\n\n const displayTitle = data?.custom_name || data?.title\n const displayDescription = data?.custom_description || data?.description\n\n const showSizeClass = (): {\n boxItem: string \n imgItem: string\n wrap: string\n } => {\n if (itemLength >= 2) {\n return {\n boxItem: 'lg-desktop:max-w-[401px] desktop:max-w-[292px] max-w-full',\n imgItem:\n 'm-tablet:m-auto lg-desktop:max-w-[330px] lg-desktop:max-h-[330px] desktop:max-w-[260px] desktop:max-h-[260px] max-w-[138px] max-h-[138px]',\n wrap: 'lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[480] desktop:aspect-w-[648] desktop:aspect-h-[380] laptop:aspect-w-[440] laptop:aspect-h-[356] tablet:aspect-w-[346] tablet:aspect-h-[360] md-tablet:w-full',\n }\n }\n return {\n boxItem: 'lg-desktop:max-w-[401px] desktop:max-w-[292px] laptop:max-w-[289px] max-w-[262px]',\n imgItem:\n 'md-tablet:m-auto lg-desktop:max-w-[450px] lg-desktop:max-h-[450px] desktop:max-w-[332px] desktop:max-h-[332px] max-w-[312px] max-h-[312px]',\n wrap: 'lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[480] desktop:aspect-w-[1312] desktop:aspect-h-[380] laptop:aspect-w-[896] laptop:aspect-h-[356] tablet:aspect-w-[704] tablet:aspect-h-[360] md-tablet:w-full',\n }\n }\n \n const handleWrapClass = () => {\n if (itemLength >= 2) {\n return 'flex flex-col justify-between desktop:gap-12 desktop:flex-row desktop:justify-center desktop:items-center'\n }\n return 'flex justify-center items-center gap-6 md-tablet:flex-col'\n }\n\n return (\n <div\n key={data?.id || data?.handle}\n className={cn(\n showSizeClass().wrap,\n itemShape === 'round' ? 'rounded-2xl' : 'rounded-none',\n 'bg-container-secondary-1 tablet:hover:bg-info-white duration-300 gap-6',\n 'box-border w-full cursor-pointer overflow-hidden relative md-tablet:h-[360px]'\n )}\n >\n <div className={cn(handleWrapClass(), 'desktop:p-6 absolute inset-0 box-border overflow-hidden p-4')}>\n <div className={cn(showSizeClass().imgItem, 'relative overflow-hidden desktop:mb-0 mb-1')}>\n <a\n aria-label={displayTitle}\n target={configuration?.target}\n href={trackUrlRef(\n `${locale === 'us' || !locale ? '' : `/${locale}`}/products/${data?.handle}`,\n `${componentType}_${componentName}`\n )}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'select_item',\n event_parameters: {\n page_group: 'Home Page',\n item_list_name: 'Home_Page_Bundle',\n items: [\n {\n item_id: data?.sku || variant?.sku,\n item_name: data?.name,\n item_variant: variant?.name,\n price: variant?.price,\n index: configuration?.index + 1,\n },\n ],\n },\n })\n }}\n >\n <Picture source={handleUrl()} alt=\"\" className=\"flex h-full justify-center object-cover [&_img]:w-auto\" />\n </a>\n </div>\n <div className={cn('flex flex-col justify-center items-start', showSizeClass().boxItem)}>\n {isShowTag ? (\n <div className=\"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden\">\n {data?.tags\n ?.filter?.((item: any) => item?.startsWith?.('CLtag'))\n ?.map?.((item: any) => item?.replace?.('CLtag:', ''))\n ?.slice?.(0, 2)\n ?.map?.((item: any, index: number) => <Badge key={index}>{item}</Badge>)}\n </div>\n ) : null}\n {displayTitle ? (\n <Heading\n as=\"h3\"\n title={displayTitle || ''}\n size={2}\n className=\"shelf-display-product-title mb-1 line-clamp-2\"\n html={displayTitle || ''}\n />\n ) : null}\n {displayDescription ? (\n <Text\n size={2}\n className=\"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 shelf-display-product-description line-clamp-1 h-5 text-sm\"\n html={displayDescription || ''}\n />\n ) : null}\n <div className=\"mb-2 mt-5 flex items-center\">\n {isSoldOut ? (\n <div className=\"tablet:text-2xl text-info-primary text-xl font-bold\">{copyWriting?.soldOutText}</div>\n ) : (\n <>\n <div className=\"final-price tablet:text-2xl text-info-primary text-xl font-bold\">\n {variant?.availableForSale ? price || '' : ''}\n </div>\n <div className=\"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through\">\n {variant?.availableForSale ? basePrice || '' : ''}\n </div>\n </>\n )}\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div\n className={cn(\n 'shelf-flex-button-group',\n 'lg-desktop:gap-3 flex items-center gap-2',\n configuration.direction === 'vertical' ? 'flex-col' : ''\n )}\n >\n {configuration?.secondaryButton ? (\n <Button\n variant=\"secondary\"\n onClick={() => onSecondaryButton(data, configuration?.index, configuration)}\n className={`\n ${configuration.direction === 'vertical' ? 'w-full' : ''}\n `}\n >\n {configuration?.secondaryButton || ''}\n </Button>\n ) : null}\n {configuration?.primaryButton ? (\n <Button\n variant=\"primary\"\n onClick={() => onPrimaryButton(data, configuration?.index, configuration)}\n className={`\n ${configuration.direction === 'vertical' ? 'w-full' : ''}\n `}\n >\n {configuration?.primaryButton || ''}\n </Button>\n ) : null}\n </div>\n </div>\n </div>\n </div>\n )\n}\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gCAAAE,EAAA,yBAAAC,IAAA,eAAAC,EAAAJ,GA8DoD,IAAAK,EAAA,6BA9DpDC,EAA+B,oCAC/BC,EAAmC,6BACnCC,EAAoB,0CACpBC,EAAkB,wCAClBC,EAAmB,kCACnBC,EAAqB,oCACrBC,EAAmB,yCACnBC,EAAwB,iCACxBC,EAA4B,uCAC5BC,EAAwB,uCAGxB,MAAMC,EAAgB,QAChBC,EAAgB,gBAEhBC,EAAiB,aAEVf,EAAuB,CAAC,CAAE,KAAAgB,EAAM,cAAAC,CAAc,IAA0C,CACnG,KAAM,CAAE,mBAAAC,EAAqB,GAAO,UAAAC,CAAU,EAAIF,GAAiB,CAAC,EAC9D,CAAE,OAAAG,EAAS,KAAM,YAAAC,CAAY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,MAAOA,CAAa,EACxE,UAAW;AAAA,gBACXA,EAAc,YAAc,WAAa,SAAW,EAAE;AAAA,cAGrD,SAAAA,GAAe,eAAiB,GACnC,EACE,MACN,GACF,GACF,GAhHKD,GAAM,IAAMA,GAAM,MAiHzB,CAEJ",
6
+ "names": ["shelfDisplayItem_exports", "__export", "ShelfDisplayHorizontalItem", "ShelfDisplayWrapItem", "__toCommonJS", "import_jsx_runtime", "import_AiuiProvider", "import_shelfDisplay", "import_picture", "import_badge", "import_utils", "import_text", "import_button", "import_track", "import_trackUrlRef", "import_heading", "componentType", "componentName", "SOLD_OUT_PRICE", "data", "configuration", "isDisplayBackImage", "itemShape", "locale", "copyWriting", "onPrimaryButton", "params", "index", "onSecondaryButton", "variant", "item", "isSoldOut", "isShowTag", "isShowOriginalPrice", "coupon", "price", "basePrice", "handleUrl", "sku", "skuArray", "displayTitle", "displayDescription", "bottomContent", "Badge", "Button", "Picture", "itemLength", "showSizeClass", "handleWrapClass"]
7
+ }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var W=Object.create;var h=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var Z=Object.getOwnPropertyNames;var tt=Object.getPrototypeOf,et=Object.prototype.hasOwnProperty;var rt=(t,r)=>{for(var n in r)h(t,n,{get:r[n],enumerable:!0})},D=(t,r,n,l)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of Z(r))!et.call(t,o)&&o!==n&&h(t,o,{get:()=>r[o],enumerable:!(l=X(r,o))||l.enumerable});return t};var nt=(t,r,n)=>(n=t!=null?W(tt(t)):{},D(r||!t||!t.__esModule?h(n,"default",{value:t,enumerable:!0}):n,t)),ot=t=>D(h({},"__esModule",{value:!0}),t);var it={};rt(it,{componentName:()=>F,componentType:()=>A,default:()=>lt});module.exports=ot(it);var s=require("react/jsx-runtime"),e=nt(require("react")),ct=require("@gsap/react"),g=require("gsap"),k=require("gsap/dist/SplitText"),v=require("gsap/dist/ScrollTrigger"),u=require("../../helpers/utils.js"),w=require("../../components/index.js"),j=require("../../shared/Styles.js"),C=require("react-intersection-observer"),V=require("../../hooks/useExposure.js");const A="copy",F="brand_slogan";function st(t=[],r=3){const n=[];for(let l=0;l<t.length;l+=r)n.push(t.slice(l,l+r));return n}const P=e.default.forwardRef(({data:t,className:r=""},n)=>{const{title:l,features:o=[],featureChunkSize:I=3}=t,[y,M]=e.default.useState(0),[U,T]=e.default.useState(!0),b=(0,e.useRef)(null),E=(0,e.useRef)(null),S=(0,e.useRef)(null),d=st(o,I),R=d.length,p=o.length>I,Y=p?[...d,d[0]]:d,H=40;(0,e.useImperativeHandle)(n,()=>b.current);const{ref:_,inView:L}=(0,C.useInView)();(0,V.useExposure)(b,{componentType:A,componentName:F,componentTitle:l}),e.default.useEffect(()=>{if(!p)return;const i=setInterval(()=>{M(a=>a+1),T(!0)},3e3);return()=>clearInterval(i)},[R,p]),e.default.useEffect(()=>{if(p)if(y===R){const i=setTimeout(()=>{T(!1),M(0)},500);return()=>clearTimeout(i)}else T(!0)},[y,R,p]);const f=(0,e.useRef)(null),$=(0,e.useRef)(null),x=(0,e.useRef)(null);return(0,e.useEffect)(()=>{g.gsap.registerPlugin(v.ScrollTrigger,k.SplitText);function i(){if(!f.current)return;x.current=new k.SplitText(f.current,{type:"words",wordsClass:"word"});const a=f.current?.clientHeight||100,m=x.current.words;g.gsap.set(m,{opacity:0}),E.current=v.ScrollTrigger.create({trigger:f.current,start:"bottom bottom-=4%",end:`bottom+=${a*1.5}px bottom-=4%`,scrub:!0,onUpdate:c=>{const q=c.progress,G=m.length,B=1/G,z=.5;m.forEach((J,K)=>{const O=K/G*(1-z),Q=B*(1+z);let N=(q-O)/Q;N=Math.max(0,Math.min(N,1)),g.gsap.set(J,{opacity:N})})}}),o&&o.length>0&&(S.current=v.ScrollTrigger.create({trigger:$.current,start:`bottom+=${a*2}px bottom-=6%`,end:`bottom+=${a*2+100}px bottom-=6%`,onUpdate:c=>{g.gsap.set($.current,{opacity:c.progress})}}))}return L&&i(),setTimeout(()=>{i()},1e3),()=>{x.current&&x.current.revert(),E.current&&E.current.kill(),S.current&&S.current.kill()}},[L]),(0,s.jsx)("div",{ref:_,children:(0,s.jsxs)("div",{ref:b,className:(0,u.cn)("slogan-container laptop:flex-row laptop:items-end laptop:justify-between text-info-primary flex h-auto w-full flex-col items-start justify-center gap-[24px] text-center",r),children:[(0,s.jsx)(w.Heading,{ref:f,as:"h2",size:2,weight:"bold",align:"left",className:(0,u.cn)("slogan-title laptop:text-[40px] desktop:text-[48px] lg-desktop:text-[64px] text-[40px] !leading-none"),html:l}),o&&o.length>0&&(0,s.jsx)("div",{className:(0,u.cn)("relative w-full max-w-[500px] overflow-hidden",`tablet:h-[${H}px]`),children:(0,s.jsx)("div",{className:(0,u.cn)(["flex flex-col",U?"transition-transform duration-500 ease-[cubic-bezier(.4,0,.2,1)]":"!transition-none"]),style:{transform:`translateY(-${y*H}px)`},children:Y.map((i,a)=>(0,s.jsx)("div",{className:(0,u.cn)("laptop:justify-end flex w-full flex-row items-stretch gap-3 overflow-hidden",`tablet:h-[${H}px]`),children:i.map((m,c)=>(0,s.jsxs)(e.default.Fragment,{children:[c>0&&(0,s.jsx)("div",{className:"slogan-feature-divider w-px self-stretch bg-[#E4E5E6]"}),(0,s.jsx)(w.Text,{size:3,align:"left",as:"p",className:"slogan-feature-text laptop:text-[14px] line-clamp-3 text-[12px] leading-[1.4]",html:m.title})]},c))},a))})})]})})});P.displayName="Slogan";var lt=(0,j.withLayout)(P);
1
+ "use strict";"use client";var W=Object.create;var h=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var Z=Object.getOwnPropertyNames;var tt=Object.getPrototypeOf,et=Object.prototype.hasOwnProperty;var rt=(t,r)=>{for(var n in r)h(t,n,{get:r[n],enumerable:!0})},D=(t,r,n,l)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of Z(r))!et.call(t,o)&&o!==n&&h(t,o,{get:()=>r[o],enumerable:!(l=X(r,o))||l.enumerable});return t};var nt=(t,r,n)=>(n=t!=null?W(tt(t)):{},D(r||!t||!t.__esModule?h(n,"default",{value:t,enumerable:!0}):n,t)),ot=t=>D(h({},"__esModule",{value:!0}),t);var it={};rt(it,{componentName:()=>F,componentType:()=>A,default:()=>lt});module.exports=ot(it);var s=require("react/jsx-runtime"),e=nt(require("react")),ct=require("@gsap/react"),g=require("gsap"),k=require("gsap/dist/SplitText"),v=require("gsap/dist/ScrollTrigger"),u=require("../../helpers/utils.js"),w=require("../../components/index.js"),j=require("../../shared/Styles.js"),C=require("react-intersection-observer"),V=require("../../hooks/useExposure.js");const A="copy",F="brand_slogan";function st(t=[],r=3){const n=[];for(let l=0;l<t.length;l+=r)n.push(t.slice(l,l+r));return n}const P=e.default.forwardRef(({data:t,className:r=""},n)=>{const{title:l,features:o=[],featureChunkSize:I=3}=t,[y,M]=e.default.useState(0),[U,T]=e.default.useState(!0),b=(0,e.useRef)(null),E=(0,e.useRef)(null),S=(0,e.useRef)(null),d=st(o,I),R=d.length,p=o.length>I,Y=p?[...d,d[0]]:d,H=40;(0,e.useImperativeHandle)(n,()=>b.current);const{ref:_,inView:L}=(0,C.useInView)();(0,V.useExposure)(b,{componentType:A,componentName:F,componentTitle:l}),e.default.useEffect(()=>{if(!p)return;const i=setInterval(()=>{M(a=>a+1),T(!0)},3e3);return()=>clearInterval(i)},[R,p]),e.default.useEffect(()=>{if(p)if(y===R){const i=setTimeout(()=>{T(!1),M(0)},500);return()=>clearTimeout(i)}else T(!0)},[y,R,p]);const f=(0,e.useRef)(null),$=(0,e.useRef)(null),x=(0,e.useRef)(null);return(0,e.useEffect)(()=>{g.gsap.registerPlugin(v.ScrollTrigger,k.SplitText);function i(){if(!f.current)return;x.current=new k.SplitText(f.current,{type:"words",wordsClass:"word"});const a=f.current?.clientHeight||100,m=x.current.words;g.gsap.set(m,{opacity:0}),E.current=v.ScrollTrigger.create({trigger:f.current,start:"bottom bottom-=4%",end:`bottom+=${a*1.5}px bottom-=4%`,scrub:!0,onUpdate:c=>{const q=c.progress,G=m.length,B=1/G,z=.5;m.forEach((J,K)=>{const O=K/G*(1-z),Q=B*(1+z);let N=(q-O)/Q;N=Math.max(0,Math.min(N,1)),g.gsap.set(J,{opacity:N})})}}),o&&o.length>0&&(S.current=v.ScrollTrigger.create({trigger:$.current,start:`bottom+=${a*2}px bottom-=6%`,end:`bottom+=${a*2+100}px bottom-=6%`,onUpdate:c=>{g.gsap.set($.current,{opacity:c.progress})}}))}return L&&i(),()=>{x.current&&x.current.revert(),E.current&&E.current.kill(),S.current&&S.current.kill()}},[L]),(0,s.jsx)("div",{ref:_,children:(0,s.jsxs)("div",{ref:b,className:(0,u.cn)("slogan-container laptop:flex-row laptop:items-end laptop:justify-between text-info-primary flex h-auto w-full flex-col items-start justify-center gap-[24px] text-center",r),children:[(0,s.jsx)(w.Heading,{ref:f,as:"h2",size:2,weight:"bold",align:"left",className:(0,u.cn)("slogan-title laptop:text-[40px] desktop:text-[48px] lg-desktop:text-[64px] text-[40px] !leading-none"),html:l}),o&&o.length>0&&(0,s.jsx)("div",{className:(0,u.cn)("relative w-full max-w-[500px] overflow-hidden",`tablet:h-[${H}px]`),children:(0,s.jsx)("div",{className:(0,u.cn)(["flex flex-col",U?"transition-transform duration-500 ease-[cubic-bezier(.4,0,.2,1)]":"!transition-none"]),style:{transform:`translateY(-${y*H}px)`},children:Y.map((i,a)=>(0,s.jsx)("div",{className:(0,u.cn)("laptop:justify-end flex w-full flex-row items-stretch gap-3 overflow-hidden",`tablet:h-[${H}px]`),children:i.map((m,c)=>(0,s.jsxs)(e.default.Fragment,{children:[c>0&&(0,s.jsx)("div",{className:"slogan-feature-divider w-px self-stretch bg-[#E4E5E6]"}),(0,s.jsx)(w.Text,{size:3,align:"left",as:"p",className:"slogan-feature-text laptop:text-[14px] line-clamp-3 text-[12px] leading-[1.4]",html:m.title})]},c))},a))})})]})})});P.displayName="Slogan";var lt=(0,j.withLayout)(P);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Slogan/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef, useEffect } from 'react'\nimport { useGSAP } from '@gsap/react'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading, Text } from '../../components/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { SloganProps } from './types.js'\nimport { useInView } from 'react-intersection-observer'\nimport { useExposure } from '../../hooks/useExposure.js'\n\nexport const componentType = 'copy'\nexport const componentName = 'brand_slogan'\n\nfunction chunkArray(array: { title: string }[] = [], size: number = 3) {\n const result = []\n for (let i = 0; i < array.length; i += size) {\n result.push(array.slice(i, i + size))\n }\n return result\n}\n\nconst Slogan = React.forwardRef<HTMLDivElement, SloganProps>(({ data, className = '' }, ref) => {\n const { title, features = [], featureChunkSize = 3 } = data\n const [groupIndex, setGroupIndex] = React.useState(0)\n const [isTransitioning, setIsTransitioning] = React.useState(true)\n const innerRef = useRef<HTMLDivElement>(null)\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n const featuresTriggerRef = useRef<ScrollTrigger | null>(null)\n const featuresGroups = chunkArray(features, featureChunkSize)\n const totalGroups = featuresGroups.length\n const needCarousel = features.length > featureChunkSize\n const displayGroups = needCarousel ? [...featuresGroups, featuresGroups[0]] : featuresGroups\n const groupHeight = 40\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n const { ref: inViewRef, inView } = useInView()\n\n useExposure(innerRef, {\n componentType,\n componentName,\n componentTitle: title,\n })\n\n // \u53EA\u5728\u9700\u8981\u8F6E\u64AD\u65F6\u542F\u7528\u5B9A\u65F6\u5668\n React.useEffect(() => {\n if (!needCarousel) return\n const timer = setInterval(() => {\n setGroupIndex(i => i + 1)\n setIsTransitioning(true)\n }, 3000)\n return () => clearInterval(timer)\n }, [totalGroups, needCarousel])\n\n // \u53EA\u5728\u9700\u8981\u8F6E\u64AD\u65F6\u5904\u7406\u65E0\u7F1D\u8DF3\u8F6C\n React.useEffect(() => {\n if (!needCarousel) return\n if (groupIndex === totalGroups) {\n const handle = setTimeout(() => {\n setIsTransitioning(false)\n setGroupIndex(0)\n }, 500) // 500ms\u7B49\u4E8E\u52A8\u753B\u65F6\u957F\n return () => clearTimeout(handle)\n } else {\n setIsTransitioning(true)\n }\n }, [groupIndex, totalGroups, needCarousel])\n\n // \u6807\u9898\u52A8\u753B\u903B\u8F91\u4FDD\u6301\u4E0D\u53D8\n const titleRef = useRef<HTMLHeadingElement>(null)\n const featuresRef = useRef<HTMLDivElement>(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n\n useEffect(() => {\n gsap.registerPlugin(ScrollTrigger, SplitText)\n\n function gsapResize() {\n if (!titleRef.current) return\n splitTextInstance.current = new SplitText(titleRef.current, {\n type: 'words',\n wordsClass: 'word',\n })\n const height = titleRef.current?.clientHeight || 100\n\n const words = splitTextInstance.current.words\n gsap.set(words, { opacity: 0 })\n scrollTriggerRef.current = ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom-=4%',\n end: `bottom+=${height * 1.5}px bottom-=4%`,\n scrub: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n const total = words.length\n const interval = 1 / total\n const overlap = 0.5\n words.forEach((word: any, i: number) => {\n const start = (i / total) * (1 - overlap)\n const width = interval * (1 + overlap)\n let opacity = (progress - start) / width\n opacity = Math.max(0, Math.min(opacity, 1))\n gsap.set(word, { opacity })\n })\n },\n })\n\n if (features && features.length > 0) {\n featuresTriggerRef.current = ScrollTrigger.create({\n trigger: featuresRef.current,\n start: `bottom+=${height * 2}px bottom-=6%`,\n end: `bottom+=${height * 2 + 100}px bottom-=6%`,\n onUpdate: (self: any) => {\n gsap.set(featuresRef.current, { opacity: self.progress })\n },\n })\n }\n }\n\n if (inView) {\n gsapResize()\n }\n\n setTimeout(() => {\n gsapResize()\n }, 1000)\n return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n // ScrollTrigger.getAll().forEach((t: any) => t.kill())\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n featuresTriggerRef.current && featuresTriggerRef.current.kill()\n }\n }, [inView])\n\n return (\n <div ref={inViewRef}>\n <div\n ref={innerRef}\n className={cn(\n 'slogan-container laptop:flex-row laptop:items-end laptop:justify-between text-info-primary flex h-auto w-full flex-col items-start justify-center gap-[24px] text-center',\n className\n )}\n >\n <Heading\n ref={titleRef}\n as=\"h2\"\n size={2}\n weight={'bold'}\n align={'left'}\n className={cn(\n 'slogan-title laptop:text-[40px] desktop:text-[48px] lg-desktop:text-[64px] text-[40px] !leading-none'\n )}\n html={title}\n />\n {features && features.length > 0 && (\n <div className={cn('relative w-full max-w-[500px] overflow-hidden', `tablet:h-[${groupHeight}px]`)}>\n <div\n className={cn([\n 'flex flex-col',\n isTransitioning\n ? 'transition-transform duration-500 ease-[cubic-bezier(.4,0,.2,1)]'\n : '!transition-none',\n ])}\n style={{\n transform: `translateY(-${groupIndex * groupHeight}px)`,\n }}\n >\n {displayGroups.map((group, idx) => (\n <div\n className={cn(\n 'laptop:justify-end flex w-full flex-row items-stretch gap-3 overflow-hidden',\n `tablet:h-[${groupHeight}px]`\n )}\n key={idx}\n >\n {group.map((feature, index) => (\n <React.Fragment key={index}>\n {index > 0 && <div className=\"slogan-feature-divider w-px self-stretch bg-[#E4E5E6]\" />}\n <Text\n size={3}\n align=\"left\"\n as=\"p\"\n className=\"slogan-feature-text laptop:text-[14px] line-clamp-3 text-[12px] leading-[1.4]\"\n html={feature.title}\n />\n </React.Fragment>\n ))}\n </div>\n ))}\n </div>\n </div>\n )}\n </div>\n </div>\n )\n})\n\nSlogan.displayName = 'Slogan'\n\nexport default withLayout(Slogan)\n"],
5
- "mappings": "8kBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,mBAAAE,EAAA,kBAAAC,EAAA,YAAAC,KAA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AAM,EACN,MAAM,OACN,GAAG,IACH,UAAU,gFACV,KAAMD,EAAQ,MAChB,IARmBC,CASrB,CACD,GAbIF,CAcP,CACD,EACH,EACF,GAEJ,EACF,CAEJ,CAAC,EAEDxC,EAAO,YAAc,SAErB,IAAOjB,MAAQ,cAAWiB,CAAM",
4
+ "sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef, useEffect } from 'react'\nimport { useGSAP } from '@gsap/react'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading, Text } from '../../components/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { SloganProps } from './types.js'\nimport { useInView } from 'react-intersection-observer'\nimport { useExposure } from '../../hooks/useExposure.js'\n\nexport const componentType = 'copy'\nexport const componentName = 'brand_slogan'\n\nfunction chunkArray(array: { title: string }[] = [], size: number = 3) {\n const result = []\n for (let i = 0; i < array.length; i += size) {\n result.push(array.slice(i, i + size))\n }\n return result\n}\n\nconst Slogan = React.forwardRef<HTMLDivElement, SloganProps>(({ data, className = '' }, ref) => {\n const { title, features = [], featureChunkSize = 3 } = data\n const [groupIndex, setGroupIndex] = React.useState(0)\n const [isTransitioning, setIsTransitioning] = React.useState(true)\n const innerRef = useRef<HTMLDivElement>(null)\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n const featuresTriggerRef = useRef<ScrollTrigger | null>(null)\n const featuresGroups = chunkArray(features, featureChunkSize)\n const totalGroups = featuresGroups.length\n const needCarousel = features.length > featureChunkSize\n const displayGroups = needCarousel ? [...featuresGroups, featuresGroups[0]] : featuresGroups\n const groupHeight = 40\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n const { ref: inViewRef, inView } = useInView()\n\n useExposure(innerRef, {\n componentType,\n componentName,\n componentTitle: title,\n })\n\n // \u53EA\u5728\u9700\u8981\u8F6E\u64AD\u65F6\u542F\u7528\u5B9A\u65F6\u5668\n React.useEffect(() => {\n if (!needCarousel) return\n const timer = setInterval(() => {\n setGroupIndex(i => i + 1)\n setIsTransitioning(true)\n }, 3000)\n return () => clearInterval(timer)\n }, [totalGroups, needCarousel])\n\n // \u53EA\u5728\u9700\u8981\u8F6E\u64AD\u65F6\u5904\u7406\u65E0\u7F1D\u8DF3\u8F6C\n React.useEffect(() => {\n if (!needCarousel) return\n if (groupIndex === totalGroups) {\n const handle = setTimeout(() => {\n setIsTransitioning(false)\n setGroupIndex(0)\n }, 500) // 500ms\u7B49\u4E8E\u52A8\u753B\u65F6\u957F\n return () => clearTimeout(handle)\n } else {\n setIsTransitioning(true)\n }\n }, [groupIndex, totalGroups, needCarousel])\n\n // \u6807\u9898\u52A8\u753B\u903B\u8F91\u4FDD\u6301\u4E0D\u53D8\n const titleRef = useRef<HTMLHeadingElement>(null)\n const featuresRef = useRef<HTMLDivElement>(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n\n useEffect(() => {\n gsap.registerPlugin(ScrollTrigger, SplitText)\n\n function gsapResize() {\n if (!titleRef.current) return\n splitTextInstance.current = new SplitText(titleRef.current, {\n type: 'words',\n wordsClass: 'word',\n })\n const height = titleRef.current?.clientHeight || 100\n\n const words = splitTextInstance.current.words\n gsap.set(words, { opacity: 0 })\n scrollTriggerRef.current = ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom-=4%',\n end: `bottom+=${height * 1.5}px bottom-=4%`,\n scrub: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n const total = words.length\n const interval = 1 / total\n const overlap = 0.5\n words.forEach((word: any, i: number) => {\n const start = (i / total) * (1 - overlap)\n const width = interval * (1 + overlap)\n let opacity = (progress - start) / width\n opacity = Math.max(0, Math.min(opacity, 1))\n gsap.set(word, { opacity })\n })\n },\n })\n\n if (features && features.length > 0) {\n featuresTriggerRef.current = ScrollTrigger.create({\n trigger: featuresRef.current,\n start: `bottom+=${height * 2}px bottom-=6%`,\n end: `bottom+=${height * 2 + 100}px bottom-=6%`,\n onUpdate: (self: any) => {\n gsap.set(featuresRef.current, { opacity: self.progress })\n },\n })\n }\n }\n\n if (inView) {\n gsapResize()\n }\n\n return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n // ScrollTrigger.getAll().forEach((t: any) => t.kill())\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n featuresTriggerRef.current && featuresTriggerRef.current.kill()\n }\n }, [inView])\n\n return (\n <div ref={inViewRef}>\n <div\n ref={innerRef}\n className={cn(\n 'slogan-container laptop:flex-row laptop:items-end laptop:justify-between text-info-primary flex h-auto w-full flex-col items-start justify-center gap-[24px] text-center',\n className\n )}\n >\n <Heading\n ref={titleRef}\n as=\"h2\"\n size={2}\n weight={'bold'}\n align={'left'}\n className={cn(\n 'slogan-title laptop:text-[40px] desktop:text-[48px] lg-desktop:text-[64px] text-[40px] !leading-none'\n )}\n html={title}\n />\n {features && features.length > 0 && (\n <div className={cn('relative w-full max-w-[500px] overflow-hidden', `tablet:h-[${groupHeight}px]`)}>\n <div\n className={cn([\n 'flex flex-col',\n isTransitioning\n ? 'transition-transform duration-500 ease-[cubic-bezier(.4,0,.2,1)]'\n : '!transition-none',\n ])}\n style={{\n transform: `translateY(-${groupIndex * groupHeight}px)`,\n }}\n >\n {displayGroups.map((group, idx) => (\n <div\n className={cn(\n 'laptop:justify-end flex w-full flex-row items-stretch gap-3 overflow-hidden',\n `tablet:h-[${groupHeight}px]`\n )}\n key={idx}\n >\n {group.map((feature, index) => (\n <React.Fragment key={index}>\n {index > 0 && <div className=\"slogan-feature-divider w-px self-stretch bg-[#E4E5E6]\" />}\n <Text\n size={3}\n align=\"left\"\n as=\"p\"\n className=\"slogan-feature-text laptop:text-[14px] line-clamp-3 text-[12px] leading-[1.4]\"\n html={feature.title}\n />\n </React.Fragment>\n ))}\n </div>\n ))}\n </div>\n </div>\n )}\n </div>\n </div>\n )\n})\n\nSlogan.displayName = 'Slogan'\n\nexport default withLayout(Slogan)\n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,MAAK,OAAC,OAAI,UAAU,wDAAwD,KACrF,OAAC,QACC,KAAM,EACN,MAAM,OACN,GAAG,IACH,UAAU,gFACV,KAAMD,EAAQ,MAChB,IARmBC,CASrB,CACD,GAbIF,CAcP,CACD,EACH,EACF,GAEJ,EACF,CAEJ,CAAC,EAEDxC,EAAO,YAAc,SAErB,IAAOjB,MAAQ,cAAWiB,CAAM",
6
6
  "names": ["Slogan_exports", "__export", "componentName", "componentType", "Slogan_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_gsap", "import_SplitText", "import_ScrollTrigger", "import_utils", "import_components", "import_Styles", "import_react_intersection_observer", "import_useExposure", "chunkArray", "array", "size", "result", "i", "Slogan", "React", "data", "className", "ref", "title", "features", "featureChunkSize", "groupIndex", "setGroupIndex", "isTransitioning", "setIsTransitioning", "innerRef", "scrollTriggerRef", "featuresTriggerRef", "featuresGroups", "totalGroups", "needCarousel", "displayGroups", "groupHeight", "inViewRef", "inView", "timer", "handle", "titleRef", "featuresRef", "splitTextInstance", "gsapResize", "height", "words", "self", "progress", "total", "interval", "overlap", "word", "start", "width", "opacity", "group", "idx", "feature", "index"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var g=Object.create;var l=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var M=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty;var P=(e,r)=>{for(var o in r)l(e,o,{get:r[o],enumerable:!0})},m=(e,r,o,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of B(r))!E.call(e,i)&&i!==o&&l(e,i,{get:()=>r[i],enumerable:!(n=x(r,i))||n.enumerable});return e};var v=(e,r,o)=>(o=e!=null?g(M(e)):{},m(r||!e||!e.__esModule?l(o,"default",{value:e,enumerable:!0}):o,e)),y=e=>m(l({},"__esModule",{value:!0}),e);var b={};P(b,{default:()=>N});module.exports=y(b);var f=require("react/jsx-runtime"),t=v(require("react")),c=require("../../helpers/utils.js"),w=require("swiper/react"),s=require("swiper/modules");const u=t.default.forwardRef(({data:e,breakpoints:r,Slide:o,className:n,id:i})=>{const[h,d]=(0,t.useState)(!0),[V,S]=(0,t.useState)(!1);return(0,f.jsx)(w.Swiper,{className:(0,c.cn)(n),navigation:{nextEl:`.${i}-custom-swiper-button-next`,prevEl:`.${i}-custom-swiper-button-prev`},onProgress:p=>{d(p.isBeginning),S(p.isEnd)},modules:[s.Navigation,s.FreeMode,s.Mousewheel],freeMode:!0,mousewheel:{forceToAxis:!0},breakpoints:r||{0:{spaceBetween:12,slidesPerView:1,freeMode:!1},374:{spaceBetween:12,slidesPerView:1.2,freeMode:!1},768:{spaceBetween:16,slidesPerView:2,freeMode:!1}},children:e?.list?.map((p,a)=>(0,f.jsx)(w.SwiperSlide,{className:"!flex !h-[unset]",children:(0,f.jsx)(o,{data:p,configuration:e?.configuration?{...e?.configuration,index:a}:{index:a},jIndex:a})},i+"SwiperSlide"+a))})});u.displayName="SwiperBox";var N=u;
1
+ "use strict";"use client";var x=Object.create;var l=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var E=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var v=(e,r)=>{for(var o in r)l(e,o,{get:r[o],enumerable:!0})},u=(e,r,o,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of M(r))!P.call(e,i)&&i!==o&&l(e,i,{get:()=>r[i],enumerable:!(n=B(r,i))||n.enumerable});return e};var y=(e,r,o)=>(o=e!=null?x(E(e)):{},u(r||!e||!e.__esModule?l(o,"default",{value:e,enumerable:!0}):o,e)),N=e=>u(l({},"__esModule",{value:!0}),e);var h={};v(h,{default:()=>b});module.exports=N(h);var f=require("react/jsx-runtime"),t=y(require("react")),m=require("../../helpers/utils.js"),w=require("swiper/react"),s=require("swiper/modules");const c=t.default.forwardRef(({data:e,breakpoints:r,Slide:o,className:n,id:i,itemClassName:d})=>{const[V,S]=(0,t.useState)(!0),[k,g]=(0,t.useState)(!1);return(0,f.jsx)(w.Swiper,{className:(0,m.cn)(n),navigation:{nextEl:`.${i}-custom-swiper-button-next`,prevEl:`.${i}-custom-swiper-button-prev`},onProgress:p=>{S(p.isBeginning),g(p.isEnd)},modules:[s.Navigation,s.FreeMode,s.Mousewheel],freeMode:!0,mousewheel:{forceToAxis:!0},breakpoints:r||{0:{spaceBetween:12,slidesPerView:1,freeMode:!1},374:{spaceBetween:12,slidesPerView:1.2,freeMode:!1},768:{spaceBetween:16,slidesPerView:2,freeMode:!1}},children:e?.list?.map((p,a)=>(0,f.jsx)(w.SwiperSlide,{className:(0,m.cn)("!flex !h-[unset]",d),children:(0,f.jsx)(o,{data:p,configuration:e?.configuration?{...e?.configuration,index:a}:{index:a},jIndex:a})},i+"SwiperSlide"+a))})});c.displayName="SwiperBox";var b=c;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/SwiperBox/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useState } from 'react'\nimport { cn } from '../../helpers/utils.js'\n// import 'swiper/css'\n// import 'swiper/css/free-mode'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Navigation, FreeMode, Mousewheel } from 'swiper/modules'\nimport type { SwiperBoxProps } from './types.js'\n\nconst SwiperBox = React.forwardRef<HTMLDivElement, SwiperBoxProps>(({ data, breakpoints, Slide, className, id }) => {\n const [isStart, setStart] = useState(true)\n const [isEnd, setEnd] = useState(false)\n\n return (\n <Swiper\n className={cn(className)}\n navigation={{\n nextEl: `.${id}-custom-swiper-button-next`,\n prevEl: `.${id}-custom-swiper-button-prev`,\n }}\n onProgress={swiper => {\n setStart(swiper.isBeginning)\n setEnd(swiper.isEnd)\n }}\n modules={[Navigation, FreeMode, Mousewheel]}\n freeMode={true}\n mousewheel={{\n forceToAxis: true,\n }}\n breakpoints={\n breakpoints || {\n 0: {\n spaceBetween: 12,\n slidesPerView: 1,\n freeMode: false,\n },\n 374: {\n spaceBetween: 12,\n slidesPerView: 1.2,\n freeMode: false,\n },\n 768: {\n spaceBetween: 16,\n slidesPerView: 2,\n freeMode: false,\n },\n }\n }\n >\n {data?.list?.map((item, jIndex) => (\n <SwiperSlide key={id + 'SwiperSlide' + jIndex} className=\"!flex !h-[unset]\">\n <Slide\n data={item}\n configuration={data?.configuration ? { ...data?.configuration, index: jIndex } : { index: jIndex }}\n jIndex={jIndex}\n />\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,GAmDU,IAAAI,EAAA,6BAlDVC,EAAgC,oBAChCC,EAAmB,kCAGnBD,EAAoC,wBACpCE,EAAiD,0BAGjD,MAAMC,EAAY,EAAAC,QAAM,WAA2C,CAAC,CAAE,KAAAC,EAAM,YAAAC,EAAa,MAAAC,EAAO,UAAAC,EAAW,GAAAC,CAAG,IAAM,CAClH,KAAM,CAACC,EAASC,CAAQ,KAAI,YAAS,EAAI,EACnC,CAACC,EAAOC,CAAM,KAAI,YAAS,EAAK,EAEtC,SACE,OAAC,UACC,aAAW,MAAGL,CAAS,EACvB,WAAY,CACV,OAAQ,IAAIC,CAAE,6BACd,OAAQ,IAAIA,CAAE,4BAChB,EACA,WAAYK,GAAU,CACpBH,EAASG,EAAO,WAAW,EAC3BD,EAAOC,EAAO,KAAK,CACrB,EACA,QAAS,CAAC,aAAY,WAAU,YAAU,EAC1C,SAAU,GACV,WAAY,CACV,YAAa,EACf,EACA,YACER,GAAe,CACb,EAAG,CACD,aAAc,GACd,cAAe,EACf,SAAU,EACZ,EACA,IAAK,CACH,aAAc,GACd,cAAe,IACf,SAAU,EACZ,EACA,IAAK,CACH,aAAc,GACd,cAAe,EACf,SAAU,EACZ,CACF,EAGD,SAAAD,GAAM,MAAM,IAAI,CAACU,EAAMC,OACtB,OAAC,eAA8C,UAAU,mBACvD,mBAACT,EAAA,CACC,KAAMQ,EACN,cAAeV,GAAM,cAAgB,CAAE,GAAGA,GAAM,cAAe,MAAOW,CAAO,EAAI,CAAE,MAAOA,CAAO,EACjG,OAAQA,EACV,GALgBP,EAAK,cAAgBO,CAMvC,CACD,EACH,CAEJ,CAAC,EAEDb,EAAU,YAAc,YAExB,IAAON,EAAQM",
6
- "names": ["SwiperBox_exports", "__export", "SwiperBox_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_modules", "SwiperBox", "React", "data", "breakpoints", "Slide", "className", "id", "isStart", "setStart", "isEnd", "setEnd", "swiper", "item", "jIndex"]
4
+ "sourcesContent": ["'use client'\nimport React, { useState } from 'react'\nimport { cn } from '../../helpers/utils.js'\n// import 'swiper/css'\n// import 'swiper/css/free-mode'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Navigation, FreeMode, Mousewheel } from 'swiper/modules'\nimport type { SwiperBoxProps } from './types.js'\n\nconst SwiperBox = React.forwardRef<HTMLDivElement, SwiperBoxProps>(({ data, breakpoints, Slide, className, id, itemClassName }) => {\n const [isStart, setStart] = useState(true)\n const [isEnd, setEnd] = useState(false)\n\n return (\n <Swiper\n className={cn(className)}\n navigation={{\n nextEl: `.${id}-custom-swiper-button-next`,\n prevEl: `.${id}-custom-swiper-button-prev`,\n }}\n onProgress={swiper => {\n setStart(swiper.isBeginning)\n setEnd(swiper.isEnd)\n }}\n modules={[Navigation, FreeMode, Mousewheel]}\n freeMode={true}\n mousewheel={{\n forceToAxis: true,\n }}\n breakpoints={\n breakpoints || {\n 0: {\n spaceBetween: 12,\n slidesPerView: 1,\n freeMode: false,\n },\n 374: {\n spaceBetween: 12,\n slidesPerView: 1.2,\n freeMode: false,\n },\n 768: {\n spaceBetween: 16,\n slidesPerView: 2,\n freeMode: false,\n },\n }\n }\n >\n {data?.list?.map((item, jIndex) => (\n <SwiperSlide key={id + 'SwiperSlide' + jIndex} className={cn('!flex !h-[unset]', itemClassName)}>\n <Slide\n data={item}\n configuration={data?.configuration ? { ...data?.configuration, index: jIndex } : { index: jIndex }}\n jIndex={jIndex}\n />\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,GAmDU,IAAAI,EAAA,6BAlDVC,EAAgC,oBAChCC,EAAmB,kCAGnBD,EAAoC,wBACpCE,EAAiD,0BAGjD,MAAMC,EAAY,EAAAC,QAAM,WAA2C,CAAC,CAAE,KAAAC,EAAM,YAAAC,EAAa,MAAAC,EAAO,UAAAC,EAAW,GAAAC,EAAI,cAAAC,CAAc,IAAM,CACjI,KAAM,CAACC,EAASC,CAAQ,KAAI,YAAS,EAAI,EACnC,CAACC,EAAOC,CAAM,KAAI,YAAS,EAAK,EAEtC,SACE,OAAC,UACC,aAAW,MAAGN,CAAS,EACvB,WAAY,CACV,OAAQ,IAAIC,CAAE,6BACd,OAAQ,IAAIA,CAAE,4BAChB,EACA,WAAYM,GAAU,CACpBH,EAASG,EAAO,WAAW,EAC3BD,EAAOC,EAAO,KAAK,CACrB,EACA,QAAS,CAAC,aAAY,WAAU,YAAU,EAC1C,SAAU,GACV,WAAY,CACV,YAAa,EACf,EACA,YACET,GAAe,CACb,EAAG,CACD,aAAc,GACd,cAAe,EACf,SAAU,EACZ,EACA,IAAK,CACH,aAAc,GACd,cAAe,IACf,SAAU,EACZ,EACA,IAAK,CACH,aAAc,GACd,cAAe,EACf,SAAU,EACZ,CACF,EAGD,SAAAD,GAAM,MAAM,IAAI,CAACW,EAAMC,OACtB,OAAC,eAA8C,aAAW,MAAG,mBAAoBP,CAAa,EAC5F,mBAACH,EAAA,CACC,KAAMS,EACN,cAAeX,GAAM,cAAgB,CAAE,GAAGA,GAAM,cAAe,MAAOY,CAAO,EAAI,CAAE,MAAOA,CAAO,EACjG,OAAQA,EACV,GALgBR,EAAK,cAAgBQ,CAMvC,CACD,EACH,CAEJ,CAAC,EAEDd,EAAU,YAAc,YAExB,IAAON,EAAQM",
6
+ "names": ["SwiperBox_exports", "__export", "SwiperBox_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_modules", "SwiperBox", "React", "data", "breakpoints", "Slide", "className", "id", "itemClassName", "isStart", "setStart", "isEnd", "setEnd", "swiper", "item", "jIndex"]
7
7
  }
@@ -7,6 +7,7 @@ export interface SwiperBoxProps {
7
7
  };
8
8
  id: string;
9
9
  className?: string;
10
+ itemClassName?: string;
10
11
  breakpoints?: Record<number, Object>;
11
12
  Slide: React.ComponentType<{
12
13
  data: any;
@@ -1,2 +1,2 @@
1
- "use strict";var o=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var m=(e,n,t,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of c(n))!d.call(e,a)&&a!==t&&o(e,a,{get:()=>n[a],enumerable:!(i=r(n,a))||i.enumerable});return e};var p=e=>m(o({},"__esModule",{value:!0}),e);var s={};module.exports=p(s);var b=require("react");
1
+ "use strict";var t=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var d=(e,n,o,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of s(n))!c.call(e,a)&&a!==o&&t(e,a,{get:()=>n[a],enumerable:!(i=r(n,a))||i.enumerable});return e};var m=e=>d(t({},"__esModule",{value:!0}),e);var p={};module.exports=m(p);var y=require("react");
2
2
  //# sourceMappingURL=types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/SwiperBox/types.ts"],
4
- "sourcesContent": ["import React from 'react'\n\nexport interface SwiperBoxProps {\n data: {\n list: any[]\n configuration?: any\n onVideoPlayBtnClick?: (jIndex: number) => void\n }\n id: string\n className?: string\n breakpoints?: Record<number, Object>\n Slide: React.ComponentType<{ data: any; configuration?: any; jIndex?: number }>\n}\n"],
4
+ "sourcesContent": ["import React from 'react'\n\nexport interface SwiperBoxProps {\n data: {\n list: any[]\n configuration?: any\n onVideoPlayBtnClick?: (jIndex: number) => void\n }\n id: string\n className?: string\n itemClassName?: string\n breakpoints?: Record<number, Object>\n Slide: React.ComponentType<{ data: any; configuration?: any; jIndex?: number }>\n}\n"],
5
5
  "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD,GAAA,IAAAE,EAAkB",
6
6
  "names": ["types_exports", "__toCommonJS", "import_react"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var P=Object.create;var l=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty;var D=(e,i)=>{for(var s in i)l(e,s,{get:i[s],enumerable:!0})},b=(e,i,s,m)=>{if(i&&typeof i=="object"||typeof i=="function")for(let t of q(i))!B.call(e,t)&&t!==s&&l(e,t,{get:()=>i[t],enumerable:!(m=L(i,t))||m.enumerable});return e};var o=(e,i,s)=>(s=e!=null?P(w(e)):{},b(i||!e||!e.__esModule?l(s,"default",{value:e,enumerable:!0}):s,e)),G=e=>b(l({},"__esModule",{value:!0}),e);var A={};D(A,{default:()=>R});module.exports=G(A);var r=require("react/jsx-runtime"),n=require("../../shared/Styles.js"),c=o(require("../../components/tabs.js")),f=require("../../helpers/index.js"),u=o(require("react")),d=o(require("../ShelfDisplay/index.js")),y=o(require("../AccordionCards/index.js")),N=o(require("../Faq/index.js")),k=o(require("../MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js")),g=o(require("../Title/index.js"));const M=u.default.forwardRef(({data:e,className:i},s)=>{const{theme:m,shape:t,align:h,tabs:p,sectionTitle:T}=e,v=a=>a?.blockType==="ipc-shelfdisplay"?(0,r.jsx)(d.default,{data:a}):a?.blockType==="ipc-multiLayoutGraphicBlock"?(0,r.jsx)(k.default,{data:a}):a?.blockType==="ipc-accordioncards"?(0,r.jsx)(y.default,{data:a}):a?.blockType==="ipc-faq"?(0,r.jsx)(N.default,{data:a}):null;return(0,r.jsxs)("section",{ref:s,className:(0,f.cn)(m==="dark"?"aiui-dark":"",i),children:[T&&(0,r.jsx)(g.default,{className:"section-title",data:{title:T}}),(0,r.jsxs)(c.Tabs,{shape:t,align:h,defaultValue:p[0].tabName,children:[(0,r.jsx)(c.TabsList,{className:"tabs-list",children:p.map(a=>(0,r.jsx)(c.TabsTrigger,{value:a.tabName,className:"tabs-trigger",children:a.tabName},a.tabName))}),p.map(a=>(0,r.jsx)(c.TabsContent,{value:a.tabName,className:"tabs-content",children:a.tabContent?.[0]?v(a.tabContent?.[0]):null},a.tabName))]})]})});var R=(0,n.withLayout)(M);
1
+ "use strict";"use client";var L=Object.create;var l=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty;var D=(e,i)=>{for(var s in i)l(e,s,{get:i[s],enumerable:!0})},b=(e,i,s,m)=>{if(i&&typeof i=="object"||typeof i=="function")for(let o of q(i))!B.call(e,o)&&o!==s&&l(e,o,{get:()=>i[o],enumerable:!(m=G(i,o))||m.enumerable});return e};var t=(e,i,s)=>(s=e!=null?L(w(e)):{},b(i||!e||!e.__esModule?l(s,"default",{value:e,enumerable:!0}):s,e)),M=e=>b(l({},"__esModule",{value:!0}),e);var E={};D(E,{default:()=>A});module.exports=M(E);var r=require("react/jsx-runtime"),f=require("../../shared/Styles.js"),p=t(require("../../components/tabs.js")),u=require("../../helpers/index.js"),n=t(require("react")),d=t(require("../ShelfDisplay/index.js")),y=t(require("../AccordionCards/index.js")),k=t(require("../Faq/index.js")),N=t(require("../MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js")),h=t(require("../Title/index.js")),g=t(require("../Graphic/index.js"));const R=n.default.forwardRef(({data:e,className:i},s)=>{const{theme:m,shape:o,align:v,tabs:c,sectionTitle:T}=e,P=a=>a?.blockType==="ipc-shelfdisplay"?(0,r.jsx)(d.default,{data:a}):a?.blockType==="ipc-multiLayoutGraphicBlock"?(0,r.jsx)(N.default,{data:a}):a?.blockType==="ipc-accordioncards"?(0,r.jsx)(y.default,{data:a}):a?.blockType==="ipc-faq"?(0,r.jsx)(k.default,{data:a}):a?.blockType==="ipc-graphic"?(0,r.jsx)(g.default,{data:a}):null;return(0,r.jsxs)("section",{ref:s,className:(0,u.cn)(m==="dark"?"aiui-dark":"",i),children:[T&&(0,r.jsx)(h.default,{className:"section-title",data:{title:T}}),(0,r.jsxs)(p.Tabs,{shape:o,align:v,defaultValue:c[0].tabName,children:[(0,r.jsx)(p.TabsList,{className:"tabs-list",children:c.map(a=>(0,r.jsx)(p.TabsTrigger,{value:a.tabName,className:"tabs-trigger",children:a.tabName},a.tabName))}),c.map(a=>(0,r.jsx)(p.TabsContent,{value:a.tabName,className:"tabs-content",children:a.tabContent?.[0]?P(a.tabContent?.[0]):null},a.tabName))]})]})});var A=(0,f.withLayout)(R);
2
2
  //# sourceMappingURL=Tabs.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Tabs/Tabs.tsx"],
4
- "sourcesContent": ["'use client'\nimport { withLayout } from '../../shared/Styles.js'\nimport * as TabsPrimitive from '../../components/tabs.js'\nimport { cn } from '../../helpers/index.js'\nimport type { TabsProps } from './types.js'\nimport React from 'react'\nimport ShelfDisplay from '../ShelfDisplay/index.js'\nimport AccordionCards from '../AccordionCards/index.js'\nimport Faq from '../Faq/index.js'\nimport MultiLayoutGraphicBlock from '../MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js'\nimport Title from '../Title/index.js'\n\nconst Tabs = React.forwardRef<HTMLDivElement, TabsProps>(({ data, className }, forwardedRef) => {\n const { theme, shape, align, tabs, sectionTitle } = data\n\n const renderTabContent = (tabContent: TabsProps['data']['tabs'][number]['tabContent'][number]) => {\n if (tabContent?.blockType === 'ipc-shelfdisplay') {\n return <ShelfDisplay data={tabContent} />\n } else if (tabContent?.blockType === 'ipc-multiLayoutGraphicBlock') {\n return <MultiLayoutGraphicBlock data={tabContent} />\n } else if (tabContent?.blockType === 'ipc-accordioncards') {\n return <AccordionCards data={tabContent} />\n } else if (tabContent?.blockType === 'ipc-faq') {\n return <Faq data={tabContent} />\n } else {\n return null\n }\n }\n\n return (\n <section ref={forwardedRef} className={cn(theme === 'dark' ? 'aiui-dark' : '', className)}>\n {sectionTitle && <Title className=\"section-title\" data={{ title: sectionTitle }} />}\n <TabsPrimitive.Tabs shape={shape} align={align} defaultValue={tabs[0].tabName}>\n <TabsPrimitive.TabsList className=\"tabs-list\">\n {tabs.map(tab => (\n <TabsPrimitive.TabsTrigger key={tab.tabName} value={tab.tabName} className=\"tabs-trigger\">\n {tab.tabName}\n </TabsPrimitive.TabsTrigger>\n ))}\n </TabsPrimitive.TabsList>\n {tabs.map(tab => (\n <TabsPrimitive.TabsContent key={tab.tabName} value={tab.tabName} className=\"tabs-content\">\n {tab.tabContent?.[0] ? renderTabContent(tab.tabContent?.[0]) : null}\n </TabsPrimitive.TabsContent>\n ))}\n </TabsPrimitive.Tabs>\n </section>\n )\n})\n\nexport default withLayout(Tabs)\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAiBa,IAAAI,EAAA,6BAhBbC,EAA2B,kCAC3BC,EAA+B,uCAC/BC,EAAmB,kCAEnBC,EAAkB,oBAClBC,EAAyB,uCACzBC,EAA2B,yCAC3BC,EAAgB,8BAChBC,EAAoC,oEACpCC,EAAkB,gCAElB,MAAMC,EAAO,EAAAC,QAAM,WAAsC,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAGC,IAAiB,CAC9F,KAAM,CAAE,MAAAC,EAAO,MAAAC,EAAO,MAAAC,EAAO,KAAAC,EAAM,aAAAC,CAAa,EAAIP,EAE9CQ,EAAoBC,GACpBA,GAAY,YAAc,sBACrB,OAAC,EAAAC,QAAA,CAAa,KAAMD,EAAY,EAC9BA,GAAY,YAAc,iCAC5B,OAAC,EAAAE,QAAA,CAAwB,KAAMF,EAAY,EACzCA,GAAY,YAAc,wBAC5B,OAAC,EAAAG,QAAA,CAAe,KAAMH,EAAY,EAChCA,GAAY,YAAc,aAC5B,OAAC,EAAAI,QAAA,CAAI,KAAMJ,EAAY,EAEvB,KAIX,SACE,QAAC,WAAQ,IAAKP,EAAc,aAAW,MAAGC,IAAU,OAAS,YAAc,GAAIF,CAAS,EACrF,UAAAM,MAAgB,OAAC,EAAAO,QAAA,CAAM,UAAU,gBAAgB,KAAM,CAAE,MAAOP,CAAa,EAAG,KACjF,QAACjB,EAAc,KAAd,CAAmB,MAAOc,EAAO,MAAOC,EAAO,aAAcC,EAAK,CAAC,EAAE,QACpE,oBAAChB,EAAc,SAAd,CAAuB,UAAU,YAC/B,SAAAgB,EAAK,IAAIS,MACR,OAACzB,EAAc,YAAd,CAA4C,MAAOyB,EAAI,QAAS,UAAU,eACxE,SAAAA,EAAI,SADyBA,EAAI,OAEpC,CACD,EACH,EACCT,EAAK,IAAIS,MACR,OAACzB,EAAc,YAAd,CAA4C,MAAOyB,EAAI,QAAS,UAAU,eACxE,SAAAA,EAAI,aAAa,CAAC,EAAIP,EAAiBO,EAAI,aAAa,CAAC,CAAC,EAAI,MADjCA,EAAI,OAEpC,CACD,GACH,GACF,CAEJ,CAAC,EAED,IAAO7B,KAAQ,cAAWY,CAAI",
6
- "names": ["Tabs_exports", "__export", "Tabs_default", "__toCommonJS", "import_jsx_runtime", "import_Styles", "TabsPrimitive", "import_helpers", "import_react", "import_ShelfDisplay", "import_AccordionCards", "import_Faq", "import_MultiLayoutGraphicBlock", "import_Title", "Tabs", "React", "data", "className", "forwardedRef", "theme", "shape", "align", "tabs", "sectionTitle", "renderTabContent", "tabContent", "ShelfDisplay", "MultiLayoutGraphicBlock", "AccordionCards", "Faq", "Title", "tab"]
4
+ "sourcesContent": ["'use client'\nimport { withLayout } from '../../shared/Styles.js'\nimport * as TabsPrimitive from '../../components/tabs.js'\nimport { cn } from '../../helpers/index.js'\nimport type { TabsProps } from './types.js'\nimport React from 'react'\nimport ShelfDisplay from '../ShelfDisplay/index.js'\nimport AccordionCards from '../AccordionCards/index.js'\nimport Faq from '../Faq/index.js'\nimport MultiLayoutGraphicBlock from '../MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js'\nimport Title from '../Title/index.js'\nimport Graphic from '../Graphic/index.js'\n\nconst Tabs = React.forwardRef<HTMLDivElement, TabsProps>(({ data, className }, forwardedRef) => {\n const { theme, shape, align, tabs, sectionTitle } = data\n\n const renderTabContent = (tabContent: TabsProps['data']['tabs'][number]['tabContent'][number]) => {\n if (tabContent?.blockType === 'ipc-shelfdisplay') {\n return <ShelfDisplay data={tabContent} />\n } else if (tabContent?.blockType === 'ipc-multiLayoutGraphicBlock') {\n return <MultiLayoutGraphicBlock data={tabContent} />\n } else if (tabContent?.blockType === 'ipc-accordioncards') {\n return <AccordionCards data={tabContent} />\n } else if (tabContent?.blockType === 'ipc-faq') {\n return <Faq data={tabContent} />\n } else if (tabContent?.blockType === 'ipc-graphic') {\n return <Graphic data={tabContent} />\n } else {\n return null\n }\n }\n\n return (\n <section ref={forwardedRef} className={cn(theme === 'dark' ? 'aiui-dark' : '', className)}>\n {sectionTitle && <Title className=\"section-title\" data={{ title: sectionTitle }} />}\n <TabsPrimitive.Tabs shape={shape} align={align} defaultValue={tabs[0].tabName}>\n <TabsPrimitive.TabsList className=\"tabs-list\">\n {tabs.map(tab => (\n <TabsPrimitive.TabsTrigger key={tab.tabName} value={tab.tabName} className=\"tabs-trigger\">\n {tab.tabName}\n </TabsPrimitive.TabsTrigger>\n ))}\n </TabsPrimitive.TabsList>\n {tabs.map(tab => (\n <TabsPrimitive.TabsContent key={tab.tabName} value={tab.tabName} className=\"tabs-content\">\n {tab.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AAU,YAC/B,SAAAiB,EAAK,IAAIU,MACR,OAAC3B,EAAc,YAAd,CAA4C,MAAO2B,EAAI,QAAS,UAAU,eACxE,SAAAA,EAAI,SADyBA,EAAI,OAEpC,CACD,EACH,EACCV,EAAK,IAAIU,MACR,OAAC3B,EAAc,YAAd,CAA4C,MAAO2B,EAAI,QAAS,UAAU,eACxE,SAAAA,EAAI,aAAa,CAAC,EAAIR,EAAiBQ,EAAI,aAAa,CAAC,CAAC,EAAI,MADjCA,EAAI,OAEpC,CACD,GACH,GACF,CAEJ,CAAC,EAED,IAAO/B,KAAQ,cAAWa,CAAI",
6
+ "names": ["Tabs_exports", "__export", "Tabs_default", "__toCommonJS", "import_jsx_runtime", "import_Styles", "TabsPrimitive", "import_helpers", "import_react", "import_ShelfDisplay", "import_AccordionCards", "import_Faq", "import_MultiLayoutGraphicBlock", "import_Title", "import_Graphic", "Tabs", "React", "data", "className", "forwardedRef", "theme", "shape", "align", "tabs", "sectionTitle", "renderTabContent", "tabContent", "ShelfDisplay", "MultiLayoutGraphicBlock", "AccordionCards", "Faq", "Graphic", "Title", "tab"]
7
7
  }
@@ -1,8 +1,9 @@
1
1
  import type { Align, Shape, Theme } from '../../types/props.js';
2
2
  import type { MultiLayoutGraphicBlockProps } from '../MultiLayoutGraphicBlock/types.js';
3
- import type { ShelfDisplayProps } from '../ShelfDisplay/index.js';
3
+ import type { ShelfDisplayProps } from '../ShelfDisplay/shelfDisplay.js';
4
4
  import type { AccordionCardsType } from '../AccordionCards/index.js';
5
5
  import type { FaqProps } from '../Faq/types.js';
6
+ import type { GraphicProps } from '../Graphic/index.js';
6
7
  export type TabsProps = {
7
8
  data: {
8
9
  sectionTitle?: string;
@@ -19,6 +20,8 @@ export type TabsProps = {
19
20
  blockType: 'ipc-accordioncards';
20
21
  })[] | (FaqProps['data'] & {
21
22
  blockType: 'ipc-faq';
23
+ })[] | (GraphicProps['data'] & {
24
+ blockType: 'ipc-graphic';
22
25
  })[];
23
26
  }[];
24
27
  };
@@ -1,2 +1,2 @@
1
- "use strict";var e=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var l=(a,p,i,t)=>{if(p&&typeof p=="object"||typeof p=="function")for(let o of s(p))!c.call(a,o)&&o!==i&&e(a,o,{get:()=>p[o],enumerable:!(t=r(p,o))||t.enumerable});return a};var y=a=>l(e({},"__esModule",{value:!0}),a);var d={};module.exports=y(d);
1
+ "use strict";var r=Object.defineProperty;var e=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var l=(a,p,t,i)=>{if(p&&typeof p=="object"||typeof p=="function")for(let o of s(p))!c.call(a,o)&&o!==t&&r(a,o,{get:()=>p[o],enumerable:!(i=e(p,o))||i.enumerable});return a};var y=a=>l(r({},"__esModule",{value:!0}),a);var h={};module.exports=y(h);
2
2
  //# sourceMappingURL=types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Tabs/types.ts"],
4
- "sourcesContent": ["import type { Align, Shape, Theme } from '../../types/props.js'\nimport type { MultiLayoutGraphicBlockProps } from '../MultiLayoutGraphicBlock/types.js'\nimport type { ShelfDisplayProps } from '../ShelfDisplay/index.js'\nimport type { AccordionCardsType } from '../AccordionCards/index.js'\nimport type { FaqProps } from '../Faq/types.js'\n\nexport type TabsProps = {\n data: {\n sectionTitle?: string\n theme: Theme\n shape: Shape\n align: Align\n tabs: {\n tabName: string\n tabContent:\n | (ShelfDisplayProps['data'] & { blockType: 'ipc-shelfdisplay' })[]\n | (MultiLayoutGraphicBlockProps['data'] & { blockType: 'ipc-multiLayoutGraphicBlock' })[]\n | (AccordionCardsType['data'] & { blockType: 'ipc-accordioncards' })[]\n | (FaqProps['data'] & { blockType: 'ipc-faq' })[]\n }[]\n }\n className?: string\n}\n"],
4
+ "sourcesContent": ["import type { Align, Shape, Theme } from '../../types/props.js'\nimport type { MultiLayoutGraphicBlockProps } from '../MultiLayoutGraphicBlock/types.js'\nimport type { ShelfDisplayProps } from '../ShelfDisplay/shelfDisplay.js'\nimport type { AccordionCardsType } from '../AccordionCards/index.js'\nimport type { FaqProps } from '../Faq/types.js'\nimport type { GraphicProps } from '../Graphic/index.js'\n\nexport type TabsProps = {\n data: {\n sectionTitle?: string\n theme: Theme\n shape: Shape\n align: Align\n tabs: {\n tabName: string\n tabContent:\n | (ShelfDisplayProps['data'] & { blockType: 'ipc-shelfdisplay' })[]\n | (MultiLayoutGraphicBlockProps['data'] & { blockType: 'ipc-multiLayoutGraphicBlock' })[]\n | (AccordionCardsType['data'] & { blockType: 'ipc-accordioncards' })[]\n | (FaqProps['data'] & { blockType: 'ipc-faq' })[]\n | (GraphicProps['data'] & { blockType: 'ipc-graphic' })[]\n }[]\n }\n className?: string\n}\n"],
5
5
  "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
6
  "names": ["types_exports", "__toCommonJS"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var p=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var r=Object.prototype.hasOwnProperty;var g=(o,e)=>{for(var l in e)p(o,l,{get:e[l],enumerable:!0})},b=(o,e,l,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of d(e))!r.call(o,s)&&s!==l&&p(o,s,{get:()=>e[s],enumerable:!(a=m(e,s))||a.enumerable});return o};var c=o=>b(p({},"__esModule",{value:!0}),o);var v={};g(v,{TextModal:()=>n});module.exports=c(v);var t=require("react/jsx-runtime"),x=require("../../components/dialog.js"),i=require("../../components/index.js"),C=require("../../helpers/index.js");const n=o=>{const{textVisible:e,extension:l,onCloseModal:a}=o;return(0,t.jsx)(x.Dialog,{open:e,onOpenChange:()=>a(),children:(0,t.jsx)(x.DialogContent,{className:" tablet:max-h-[535px] tablet:max-w-[896px] md-tablet:h-[490px] md-tablet:w-[358px] tablet:rounded-2xl mx-auto rounded-lg border-none bg-white p-0 [&_button]:hidden",children:(0,t.jsxs)("div",{className:" relative",children:[(0,t.jsx)(i.Picture,{source:`${l?.textPcImg?.url||""} , ${l?.textMobileImg?.url||""} 767`,className:" w-full",imgClassName:" object-cover"}),(0,t.jsx)("div",{className:" tablet:inset-x-[32px] tablet:top-[32px] absolute inset-x-[16px] top-[16px]",children:(0,t.jsxs)("div",{className:"flex items-center justify-between text-white",children:[(0,t.jsx)(i.Text,{html:l?.textTitle,className:"tablet:text-[24px] text-[20px] font-bold leading-[1.2]"}),(0,t.jsx)("div",{onClick:()=>a(),className:" cursor-pointer",children:(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:(0,t.jsx)("g",{"clip-path":"url(#clip0_2548_10038)",children:(0,t.jsx)("path",{d:"M5.63545 6.13604C6.02592 5.74546 6.65913 5.74551 7.04966 6.13604L11.9994 11.0858L16.9492 6.13604C17.3397 5.74552 17.9729 5.74546 18.3634 6.13604C18.7538 6.52659 18.7538 7.15972 18.3634 7.55025L13.4136 12.5L18.3634 17.4497C18.7538 17.8403 18.7538 18.4734 18.3634 18.864C17.9729 19.2545 17.3397 19.2545 16.9492 18.864L11.9994 13.9142L7.04966 18.864C6.65913 19.2545 6.02592 19.2545 5.63545 18.864C5.24501 18.4734 5.24502 17.8403 5.63545 17.4497L10.5852 12.5L5.63545 7.55025C5.24502 7.15972 5.24501 6.52658 5.63545 6.13604Z",fill:"white"})})})})]})}),(0,t.jsxs)("div",{className:"tablet:p-[32px] p-[16px] text-[#1D1D1F]",children:[(0,t.jsx)(i.Text,{html:l?.text,className:" tablet:text-[24px] text-[20px] font-bold leading-[1.2]"}),(0,t.jsx)("br",{}),(0,t.jsx)(i.Text,{html:l?.textDesc,className:"tablet:leading-[1.2] pt-1 text-[16px] font-bold leading-[1.4]"})]})]})})})};
1
+ "use strict";var x=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var r=Object.prototype.hasOwnProperty;var g=(o,e)=>{for(var l in e)x(o,l,{get:e[l],enumerable:!0})},b=(o,e,l,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of m(e))!r.call(o,s)&&s!==l&&x(o,s,{get:()=>e[s],enumerable:!(i=p(e,s))||i.enumerable});return o};var c=o=>b(x({},"__esModule",{value:!0}),o);var h={};g(h,{TextModal:()=>d});module.exports=c(h);var t=require("react/jsx-runtime"),n=require("../../components/dialog.js"),a=require("../../components/index.js"),v=require("../../helpers/index.js");const d=o=>{const{textVisible:e,extension:l,onCloseModal:i}=o;return(0,t.jsx)(n.Dialog,{open:e,onOpenChange:()=>i(),children:(0,t.jsx)(n.DialogContent,{className:" tablet:max-h-[535px] tablet:max-w-[896px] md-tablet:h-[490px] md-tablet:w-[358px] tablet:rounded-2xl mx-auto rounded-lg border-none bg-white p-0 [&_button]:hidden",children:(0,t.jsxs)("div",{className:"tablet:rounded-2xl overflow-hidden rounded-lg",children:[(0,t.jsx)("div",{className:"min-h-[260px] w-full",children:(0,t.jsx)(a.Picture,{source:`${l?.textPcImg?.url||""} , ${l?.textMobileImg?.url||""} 767`,className:"size-full",imgClassName:"w-full h-full object-cover"})}),(0,t.jsx)("div",{className:"tablet:inset-x-8 tablet:top-8 absolute inset-x-4 top-4",children:(0,t.jsx)(a.Text,{html:l?.textTitle,className:"tablet:text-[24px] text-[20px] font-bold leading-[1.2]"})}),(0,t.jsx)("div",{onClick:()=>i(),className:"absolute right-4 top-4 cursor-pointer",children:(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:(0,t.jsx)("g",{"clip-path":"url(#clip0_2548_10038)",children:(0,t.jsx)("path",{d:"M5.63545 6.13604C6.02592 5.74546 6.65913 5.74551 7.04966 6.13604L11.9994 11.0858L16.9492 6.13604C17.3397 5.74552 17.9729 5.74546 18.3634 6.13604C18.7538 6.52659 18.7538 7.15972 18.3634 7.55025L13.4136 12.5L18.3634 17.4497C18.7538 17.8403 18.7538 18.4734 18.3634 18.864C17.9729 19.2545 17.3397 19.2545 16.9492 18.864L11.9994 13.9142L7.04966 18.864C6.65913 19.2545 6.02592 19.2545 5.63545 18.864C5.24501 18.4734 5.24502 17.8403 5.63545 17.4497L10.5852 12.5L5.63545 7.55025C5.24502 7.15972 5.24501 6.52658 5.63545 6.13604Z",fill:"white"})})})}),(0,t.jsxs)("div",{className:"tablet:p-8 p-4 text-[#1D1D1F]",children:[(0,t.jsx)(a.Text,{html:l?.text,className:" tablet:text-2xl text-xl font-bold leading-[1.2]"}),(0,t.jsx)("br",{}),(0,t.jsx)(a.Text,{html:l?.textDesc,className:"tablet:leading-[1.2] pt-1 text-base font-bold leading-[1.4]"})]})]})})})};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/TextModal/index.tsx"],
4
- "sourcesContent": ["import type { Media } from '../../types/props.js'\nimport { Dialog, DialogContent } from '../../components/dialog.js'\nimport { Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport type { Img } from '../../types/props.js'\n\nexport type TextModalType = {\n textVisible: boolean\n extension?: {\n textPcImg: Img\n textMobileImg: Img\n textTitle: string\n text: string\n textDesc: string\n }\n onCloseModal: () => void\n}\n\nconst TextModal = (props: TextModalType) => {\n const { textVisible, extension, onCloseModal } = props\n\n return (\n <Dialog open={textVisible} onOpenChange={() => onCloseModal()}>\n <DialogContent className=\" tablet:max-h-[535px] tablet:max-w-[896px] md-tablet:h-[490px] md-tablet:w-[358px] tablet:rounded-2xl mx-auto rounded-lg border-none bg-white p-0 [&_button]:hidden\">\n <div className=\" relative\">\n <Picture\n source={`${extension?.textPcImg?.url || ''} , ${extension?.textMobileImg?.url || ''} 767`}\n className=\" w-full\"\n imgClassName=\" object-cover\"\n />\n <div className=\" tablet:inset-x-[32px] tablet:top-[32px] absolute inset-x-[16px] top-[16px]\">\n <div className=\"flex items-center justify-between text-white\">\n <Text html={extension?.textTitle} className=\"tablet:text-[24px] text-[20px] font-bold leading-[1.2]\" />\n <div onClick={() => onCloseModal()} className=\" cursor-pointer\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"25\" viewBox=\"0 0 24 25\" fill=\"none\">\n <g clip-path=\"url(#clip0_2548_10038)\">\n <path\n d=\"M5.63545 6.13604C6.02592 5.74546 6.65913 5.74551 7.04966 6.13604L11.9994 11.0858L16.9492 6.13604C17.3397 5.74552 17.9729 5.74546 18.3634 6.13604C18.7538 6.52659 18.7538 7.15972 18.3634 7.55025L13.4136 12.5L18.3634 17.4497C18.7538 17.8403 18.7538 18.4734 18.3634 18.864C17.9729 19.2545 17.3397 19.2545 16.9492 18.864L11.9994 13.9142L7.04966 18.864C6.65913 19.2545 6.02592 19.2545 5.63545 18.864C5.24501 18.4734 5.24502 17.8403 5.63545 17.4497L10.5852 12.5L5.63545 7.55025C5.24502 7.15972 5.24501 6.52658 5.63545 6.13604Z\"\n fill=\"white\"\n />\n </g>\n </svg>\n </div>\n </div>\n </div>\n <div className=\"tablet:p-[32px] p-[16px] text-[#1D1D1F]\">\n <Text html={extension?.text} className=\" tablet:text-[24px] text-[20px] font-bold leading-[1.2]\" />\n <br />\n <Text\n html={extension?.textDesc}\n className=\"tablet:leading-[1.2] pt-1 text-[16px] font-bold leading-[1.4]\"\n />\n </div>\n </div>\n </DialogContent>\n </Dialog>\n )\n}\n\nexport { TextModal }\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,eAAAE,IAAA,eAAAC,EAAAH,GAyBU,IAAAI,EAAA,6BAxBVC,EAAsC,sCACtCC,EAA8B,qCAC9BC,EAAmB,kCAenB,MAAML,EAAaM,GAAyB,CAC1C,KAAM,CAAE,YAAAC,EAAa,UAAAC,EAAW,aAAAC,CAAa,EAAIH,EAEjD,SACE,OAAC,UAAO,KAAMC,EAAa,aAAc,IAAME,EAAa,EAC1D,mBAAC,iBAAc,UAAU,sKACvB,oBAAC,OAAI,UAAU,YACb,oBAAC,WACC,OAAQ,GAAGD,GAAW,WAAW,KAAO,EAAE,MAAMA,GAAW,eAAe,KAAO,EAAE,OACnF,UAAU,UACV,aAAa,gBACf,KACA,OAAC,OAAI,UAAU,8EACb,oBAAC,OAAI,UAAU,+CACb,oBAAC,QAAK,KAAMA,GAAW,UAAW,UAAU,yDAAyD,KACrG,OAAC,OAAI,QAAS,IAAMC,EAAa,EAAG,UAAU,kBAC5C,mBAAC,OAAI,MAAM,6BAA6B,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OACtF,mBAAC,KAAE,YAAU,yBACX,mBAAC,QACC,EAAE,0gBACF,KAAK,QACP,EACF,EACF,EACF,GACF,EACF,KACA,QAAC,OAAI,UAAU,0CACb,oBAAC,QAAK,KAAMD,GAAW,KAAM,UAAU,0DAA0D,KACjG,OAAC,OAAG,KACJ,OAAC,QACC,KAAMA,GAAW,SACjB,UAAU,gEACZ,GACF,GACF,EACF,EACF,CAEJ",
4
+ "sourcesContent": ["import type { Media } from '../../types/props.js'\nimport { Dialog, DialogContent } from '../../components/dialog.js'\nimport { Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport type { Img } from '../../types/props.js'\n\nexport type TextModalType = {\n textVisible: boolean\n extension?: {\n textPcImg: Img\n textMobileImg: Img\n textTitle: string\n text: string\n textDesc: string\n }\n onCloseModal: () => void\n}\n\nconst TextModal = (props: TextModalType) => {\n const { textVisible, extension, onCloseModal } = props\n\n return (\n <Dialog open={textVisible} onOpenChange={() => onCloseModal()}>\n <DialogContent className=\" tablet:max-h-[535px] tablet:max-w-[896px] md-tablet:h-[490px] md-tablet:w-[358px] tablet:rounded-2xl mx-auto rounded-lg border-none bg-white p-0 [&_button]:hidden\">\n <div className=\"tablet:rounded-2xl overflow-hidden rounded-lg\">\n <div className=\"min-h-[260px] w-full\">\n <Picture\n source={`${extension?.textPcImg?.url || ''} , ${extension?.textMobileImg?.url || ''} 767`}\n className=\"size-full\"\n imgClassName=\"w-full h-full object-cover\"\n />\n </div>\n <div className=\"tablet:inset-x-8 tablet:top-8 absolute inset-x-4 top-4\">\n <Text html={extension?.textTitle} className=\"tablet:text-[24px] text-[20px] font-bold leading-[1.2]\" />\n </div>\n <div onClick={() => onCloseModal()} className=\"absolute right-4 top-4 cursor-pointer\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"25\" viewBox=\"0 0 24 25\" fill=\"none\">\n <g clip-path=\"url(#clip0_2548_10038)\">\n <path\n d=\"M5.63545 6.13604C6.02592 5.74546 6.65913 5.74551 7.04966 6.13604L11.9994 11.0858L16.9492 6.13604C17.3397 5.74552 17.9729 5.74546 18.3634 6.13604C18.7538 6.52659 18.7538 7.15972 18.3634 7.55025L13.4136 12.5L18.3634 17.4497C18.7538 17.8403 18.7538 18.4734 18.3634 18.864C17.9729 19.2545 17.3397 19.2545 16.9492 18.864L11.9994 13.9142L7.04966 18.864C6.65913 19.2545 6.02592 19.2545 5.63545 18.864C5.24501 18.4734 5.24502 17.8403 5.63545 17.4497L10.5852 12.5L5.63545 7.55025C5.24502 7.15972 5.24501 6.52658 5.63545 6.13604Z\"\n fill=\"white\"\n />\n </g>\n </svg>\n </div>\n <div className=\"tablet:p-8 p-4 text-[#1D1D1F]\">\n <Text html={extension?.text} className=\" tablet:text-2xl text-xl font-bold leading-[1.2]\" />\n <br />\n <Text html={extension?.textDesc} className=\"tablet:leading-[1.2] pt-1 text-base font-bold leading-[1.4]\" />\n </div>\n </div>\n </DialogContent>\n </Dialog>\n )\n}\n\nexport { TextModal }\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,eAAAE,IAAA,eAAAC,EAAAH,GA0BY,IAAAI,EAAA,6BAzBZC,EAAsC,sCACtCC,EAA8B,qCAC9BC,EAAmB,kCAenB,MAAML,EAAaM,GAAyB,CAC1C,KAAM,CAAE,YAAAC,EAAa,UAAAC,EAAW,aAAAC,CAAa,EAAIH,EAEjD,SACE,OAAC,UAAO,KAAMC,EAAa,aAAc,IAAME,EAAa,EAC1D,mBAAC,iBAAc,UAAU,sKACvB,oBAAC,OAAI,UAAU,gDACb,oBAAC,OAAI,UAAU,uBACb,mBAAC,WACC,OAAQ,GAAGD,GAAW,WAAW,KAAO,EAAE,MAAMA,GAAW,eAAe,KAAO,EAAE,OACnF,UAAU,YACV,aAAa,6BACf,EACF,KACA,OAAC,OAAI,UAAU,yDACb,mBAAC,QAAK,KAAMA,GAAW,UAAW,UAAU,yDAAyD,EACvG,KACA,OAAC,OAAI,QAAS,IAAMC,EAAa,EAAG,UAAU,wCAC5C,mBAAC,OAAI,MAAM,6BAA6B,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OACtF,mBAAC,KAAE,YAAU,yBACX,mBAAC,QACC,EAAE,0gBACF,KAAK,QACP,EACF,EACF,EACF,KACA,QAAC,OAAI,UAAU,gCACb,oBAAC,QAAK,KAAMD,GAAW,KAAM,UAAU,mDAAmD,KAC1F,OAAC,OAAG,KACJ,OAAC,QAAK,KAAMA,GAAW,SAAU,UAAU,8DAA8D,GAC3G,GACF,EACF,EACF,CAEJ",
6
6
  "names": ["TextModal_exports", "__export", "TextModal", "__toCommonJS", "import_jsx_runtime", "import_dialog", "import_components", "import_helpers", "props", "textVisible", "extension", "onCloseModal"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var _=Object.create;var c=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var G=Object.getPrototypeOf,J=Object.prototype.hasOwnProperty;var K=(t,e)=>{for(var n in e)c(t,n,{get:e[n],enumerable:!0})},b=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of A(e))!J.call(t,o)&&o!==n&&c(t,o,{get:()=>e[o],enumerable:!(s=q(e,o))||s.enumerable});return t};var O=(t,e,n)=>(n=t!=null?_(G(t)):{},b(e||!t||!t.__esModule?c(n,"default",{value:t,enumerable:!0}):n,t)),Q=t=>b(c({},"__esModule",{value:!0}),t);var X={};K(X,{default:()=>W});module.exports=Q(X);var i=require("react/jsx-runtime"),r=O(require("react")),m=require("gsap"),h=require("gsap/dist/SplitText"),w=require("gsap/dist/ScrollTrigger"),x=require("../../helpers/utils.js"),E=require("../../components/index.js"),M=require("../../shared/Styles.js"),N=require("../../hooks/useExposure.js"),D=require("../../shared/trackUrlRef.js"),S=require("react-intersection-observer");const L="link",R="title",H=r.default.forwardRef(({data:t,className:e},n)=>{const{title:s,caption:o,theme:v,extensions:p}=t,u=(0,r.useRef)(null),l=(0,r.useRef)(null),a=(0,r.useRef)(null),f=(0,r.useRef)(null),{ref:I,inView:T}=(0,S.useInView)();return(0,r.useImperativeHandle)(n,()=>u.current),(0,N.useExposure)(u,{componentType:L,componentName:R,componentTitle:t?.title}),(0,r.useEffect)(()=>{m.gsap.registerPlugin(h.SplitText,w.ScrollTrigger);function P(){if(!l.current)return;const V=l.current?.clientHeight||80;a.current=new h.SplitText(l.current,{type:"words",wordsClass:"word"});const d=a.current.words;m.gsap.set(d,{opacity:0}),f.current=w.ScrollTrigger.create({trigger:l.current,start:"bottom bottom-=4%",end:`bottom+=${V*1.5+60}px bottom-=4%`,scrub:!0,onUpdate:$=>{const z=$.progress,k=d.length,U=1/k,y=.5;d.forEach((j,B)=>{const C=B/k*(1-y),F=U*(1+y);let g=(z-C)/F;g=Math.max(0,Math.min(g,1)),m.gsap.set(j,{opacity:g})})}})}return T&&P(),()=>{a.current&&a.current.revert(),f.current&&f.current.kill()}},[T]),(s||o)&&(0,i.jsxs)("div",{className:"mb-6 flex items-end justify-between overflow-hidden",ref:u,children:[(0,i.jsx)("div",{ref:I,className:(0,x.cn)("space-y-4 flex-1",e,{"aiui-dark":v==="dark"}),children:(0,i.jsx)(E.Heading,{ref:l,as:"h2",size:4,html:o||s})}),p?.textLink&&(0,i.jsxs)("a",{className:(0,x.cn)({"aiui-dark":v==="dark"},"flex items-center text-base font-[700] leading-[1.4] text-[#777] transition-all duration-[0.4s] hover:text-[#1D1D1F]"),href:(0,D.trackUrlRef)(p?.link,`${L}_${R}`),children:[p?.textLink,(0,i.jsx)("svg",{width:"24",height:"24",className:"mb-[3px]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:(0,i.jsx)("path",{className:"transition-all duration-[0.4s]",d:"M10.5 8L14.5 12L10.5 16",stroke:"#777","stroke-width":"1.5","stroke-linecap":"round"})})]})]})});H.displayName="Title";var W=(0,M.withLayout)(H);
1
+ "use strict";"use client";var _=Object.create;var c=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var G=Object.getPrototypeOf,J=Object.prototype.hasOwnProperty;var K=(t,e)=>{for(var n in e)c(t,n,{get:e[n],enumerable:!0})},R=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of A(e))!J.call(t,o)&&o!==n&&c(t,o,{get:()=>e[o],enumerable:!(s=q(e,o))||s.enumerable});return t};var O=(t,e,n)=>(n=t!=null?_(G(t)):{},R(e||!t||!t.__esModule?c(n,"default",{value:t,enumerable:!0}):n,t)),Q=t=>R(c({},"__esModule",{value:!0}),t);var X={};K(X,{default:()=>W});module.exports=Q(X);var i=require("react/jsx-runtime"),r=O(require("react")),m=require("gsap"),x=require("gsap/dist/SplitText"),v=require("gsap/dist/ScrollTrigger"),T=require("../../helpers/utils.js"),E=require("../../components/index.js"),M=require("../../shared/Styles.js"),N=require("../../hooks/useExposure.js"),$=require("../../shared/trackUrlRef.js"),D=require("react-intersection-observer");const h="link",w="title",H=r.default.forwardRef(({data:t,className:e},n)=>{const{title:s,caption:o,theme:k,extensions:p}=t,u=(0,r.useRef)(null),l=(0,r.useRef)(null),a=(0,r.useRef)(null),f=(0,r.useRef)(null),{ref:S,inView:y}=(0,D.useInView)();return(0,r.useImperativeHandle)(n,()=>u.current),(0,N.useExposure)(u,{componentType:h,componentName:w,componentTitle:t?.title}),(0,r.useEffect)(()=>{m.gsap.registerPlugin(x.SplitText,v.ScrollTrigger);function I(){if(!l.current)return;const P=l.current?.clientHeight||80;a.current=new x.SplitText(l.current,{type:"words",wordsClass:"word"});const d=a.current.words;m.gsap.set(d,{opacity:0}),f.current=v.ScrollTrigger.create({trigger:l.current,start:"bottom bottom-=4%",end:`bottom+=${P*1.5+60}px bottom-=4%`,scrub:!0,onUpdate:V=>{const z=V.progress,b=d.length,U=1/b,L=.5;d.forEach((j,B)=>{const C=B/b*(1-L),F=U*(1+L);let g=(z-C)/F;g=Math.max(0,Math.min(g,1)),m.gsap.set(j,{opacity:g})})}})}return y&&I(),()=>{a.current&&a.current.revert(),f.current&&f.current.kill()}},[y]),(s||o)&&(0,i.jsxs)("div",{className:"mb-6 flex items-end justify-between overflow-hidden title-box",ref:u,children:[(0,i.jsx)("div",{ref:S,className:(0,T.cn)("space-y-4 flex-1",e,{"aiui-dark":k==="dark"}),children:(0,i.jsx)(E.Heading,{ref:l,as:"h1",size:4,html:o||s})}),p?.textLink&&(0,i.jsxs)("a",{className:(0,T.cn)({"aiui-dark":k==="dark"},"flex items-center text-base font-[700] leading-[1.4] text-[#777] transition-all duration-[0.4s] hover:text-[#1D1D1F]"),href:(0,$.trackUrlRef)(p?.link,`${h}_${w}`),"data-headless-type-name":`${h}#${w}`,"data-headless-title-desc-button":`${s}#${o}`,children:[p?.textLink,(0,i.jsx)("svg",{width:"24",height:"24",className:"mb-[3px]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:(0,i.jsx)("path",{className:"transition-all duration-[0.4s]",d:"M10.5 8L14.5 12L10.5 16",stroke:"#777","stroke-width":"1.5","stroke-linecap":"round"})})]})]})});H.displayName="Title";var W=(0,M.withLayout)(H);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Title/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useEffect, useRef, useImperativeHandle } from 'react'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading } from '../../components/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { TitleProps } from './types.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { useInView } from 'react-intersection-observer'\n\nconst componentType = 'link'\nconst componentName = 'title'\n\nconst Title = React.forwardRef<HTMLDivElement, TitleProps>(({ data, className }, ref) => {\n const { title, caption, theme, extensions } = data\n const innerRef = useRef<HTMLDivElement>(null)\n const titleRef = useRef<HTMLHeadingElement>(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n\n const { ref: inViewRef, inView } = useInView()\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n useExposure(innerRef, {\n componentType,\n componentName,\n componentTitle: data?.title,\n })\n\n useEffect(() => {\n gsap.registerPlugin(SplitText, ScrollTrigger)\n function gsapResize() {\n if (!titleRef.current) return\n const height = titleRef.current?.clientHeight || 80\n splitTextInstance.current = new SplitText(titleRef.current, {\n type: 'words',\n wordsClass: 'word',\n })\n const words = splitTextInstance.current.words\n gsap.set(words, { opacity: 0 })\n scrollTriggerRef.current = ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom-=4%',\n end: `bottom+=${height * 1.5 + 60}px bottom-=4%`,\n scrub: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n const total = words.length\n const interval = 1 / total\n const overlap = 0.5\n words.forEach((word: any, i: number) => {\n const start = (i / total) * (1 - overlap)\n const width = interval * (1 + overlap)\n let opacity = (progress - start) / width\n opacity = Math.max(0, Math.min(opacity, 1))\n gsap.set(word, { opacity })\n })\n },\n })\n }\n\n if (inView) {\n gsapResize()\n }\n\n return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n // ScrollTrigger.getAll().forEach((t: { kill: () => any }) => t.kill())\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n }\n }, [inView])\n\n return (\n (title || caption) && (\n <div className=\"mb-6 flex items-end justify-between overflow-hidden\" ref={innerRef}>\n <div ref={inViewRef} className={cn('space-y-4 flex-1', className, { 'aiui-dark': theme === 'dark' })}>\n <Heading ref={titleRef} as=\"h2\" size={4} html={caption || title} />\n </div>\n {extensions?.textLink && (\n <a\n className={cn(\n { 'aiui-dark': theme === 'dark' },\n 'flex items-center text-base font-[700] leading-[1.4] text-[#777] transition-all duration-[0.4s] hover:text-[#1D1D1F]'\n )}\n href={trackUrlRef(extensions?.link, `${componentType}_${componentName}`)}\n >\n {extensions?.textLink}\n <svg\n width=\"24\"\n height=\"24\"\n className=\"mb-[3px]\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n >\n <path\n className=\"transition-all duration-[0.4s]\"\n d=\"M10.5 8L14.5 12L10.5 16\"\n stroke=\"#777\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n ></path>\n </svg>\n </a>\n )}\n </div>\n )\n )\n})\n\nTitle.displayName = 'Title'\n\nexport default withLayout(Title)\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAgFU,IAAAI,EAAA,6BA/EVC,EAA8D,oBAC9DC,EAAqB,gBACrBC,EAA0B,+BAC1BC,EAA8B,mCAC9BC,EAAmB,kCACnBC,EAAwB,qCACxBC,EAA2B,kCAE3BC,EAA4B,sCAC5BC,EAA4B,uCAC5BC,EAA0B,uCAE1B,MAAMC,EAAgB,OAChBC,EAAgB,QAEhBC,EAAQ,EAAAC,QAAM,WAAuC,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAGC,IAAQ,CACvF,KAAM,CAAE,M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EAAiB,SAAWA,EAAiB,QAAQ,KAAK,CAC5D,CACF,EAAG,CAACE,CAAM,CAAC,GAGRT,GAASC,OACR,QAAC,OAAI,UAAU,sDAAsD,IAAKG,EACxE,oBAAC,OAAI,IAAKI,EAAW,aAAW,MAAG,mBAAoBV,EAAW,CAAE,YAAaI,IAAU,MAAO,CAAC,EACjG,mBAAC,WAAQ,IAAKG,EAAU,GAAG,KAAK,KAAM,EAAG,KAAMJ,GAAWD,EAAO,EACnE,EACCG,GAAY,aACX,QAAC,KACC,aAAW,MACT,CAAE,YAAaD,IAAU,MAAO,EAChC,sHACF,EACA,QAAM,eAAYC,GAAY,KAAM,GAAGV,CAAa,IAAIC,CAAa,EAAE,EAEtE,UAAAS,GAAY,YACb,OAAC,OACC,MAAM,KACN,OAAO,KACP,UAAU,WACV,MAAM,6BACN,QAAQ,YACR,KAAK,OAEL,mBAAC,QACC,UAAU,iCACV,EAAE,0BACF,OAAO,OACP,eAAa,MACb,iBAAe,QAChB,EACH,GACF,GAEJ,CAGN,CAAC,EAEDR,EAAM,YAAc,QAEpB,IAAOf,KAAQ,cAAWe,CAAK",
4
+ "sourcesContent": ["'use client'\nimport React, { useEffect, useRef, useImperativeHandle } from 'react'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading } from '../../components/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { TitleProps } from './types.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { useInView } from 'react-intersection-observer'\n\nconst componentType = 'link'\nconst componentName = 'title'\n\nconst Title = React.forwardRef<HTMLDivElement, TitleProps>(({ data, className }, ref) => {\n const { title, caption, theme, extensions } = data\n const innerRef = useRef<HTMLDivElement>(null)\n const titleRef = useRef<HTMLHeadingElement>(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n\n const { ref: inViewRef, inView } = useInView()\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n useExposure(innerRef, {\n componentType,\n componentName,\n componentTitle: data?.title,\n })\n\n useEffect(() => {\n gsap.registerPlugin(SplitText, ScrollTrigger)\n function gsapResize() {\n if (!titleRef.current) return\n const height = titleRef.current?.clientHeight || 80\n splitTextInstance.current = new SplitText(titleRef.current, {\n type: 'words',\n wordsClass: 'word',\n })\n const words = splitTextInstance.current.words\n gsap.set(words, { opacity: 0 })\n scrollTriggerRef.current = ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom-=4%',\n end: `bottom+=${height * 1.5 + 60}px bottom-=4%`,\n scrub: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n const total = words.length\n const interval = 1 / total\n const overlap = 0.5\n words.forEach((word: any, i: number) => {\n const start = (i / total) * (1 - overlap)\n const width = interval * (1 + overlap)\n let opacity = (progress - start) / width\n opacity = Math.max(0, Math.min(opacity, 1))\n gsap.set(word, { opacity })\n })\n },\n })\n }\n\n if (inView) {\n gsapResize()\n }\n\n return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n // ScrollTrigger.getAll().forEach((t: { kill: () => any }) => t.kill())\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n }\n }, [inView])\n\n return (\n (title || caption) && (\n <div className=\"mb-6 flex items-end justify-between overflow-hidden title-box\" ref={innerRef}>\n <div ref={inViewRef} className={cn('space-y-4 flex-1', className, { 'aiui-dark': theme === 'dark' })}>\n <Heading ref={titleRef} as=\"h1\" size={4} html={caption || title} />\n </div>\n {extensions?.textLink && (\n <a\n className={cn(\n { 'aiui-dark': theme === 'dark' },\n 'flex items-center text-base font-[700] leading-[1.4] text-[#777] transition-all duration-[0.4s] hover:text-[#1D1D1F]'\n )}\n href={trackUrlRef(extensions?.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${caption}`}\n >\n {extensions?.textLink}\n <svg\n width=\"24\"\n height=\"24\"\n className=\"mb-[3px]\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n >\n <path\n className=\"transition-all duration-[0.4s]\"\n d=\"M10.5 8L14.5 12L10.5 16\"\n stroke=\"#777\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n ></path>\n </svg>\n </a>\n )}\n </div>\n )\n )\n})\n\nTitle.displayName = 'Title'\n\nexport default withLayout(Title)\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAgFU,IAAAI,EAAA,6BA/EVC,EAA8D,oBAC9DC,EAAqB,gBACrBC,EAA0B,+BAC1BC,EAA8B,mCAC9BC,EAAmB,kCACnBC,EAAwB,qCACxBC,EAA2B,kCAE3BC,EAA4B,sCAC5BC,EAA4B,uCAC5BC,EAA0B,uCAE1B,MAAMC,EAAgB,OAChBC,EAAgB,QAEhBC,EAAQ,EAAAC,QAAM,WAAuC,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAGC,IAAQ,CACvF,KAAM,CAAE,MAAAC,EAAO,QAAAC,EAAS,MAAAC,EAAO,WAAAC,CAAW,EAAIN,EACxCO,KAAW,UAAuB,IAAI,EACtCC,KAAW,UAA2B,IAAI,EAC1CC,KAAoB,UAAyB,IAAI,EACjDC,KAAmB,UAA6B,IAAI,EAEpD,CAAE,IAAKC,EAAW,OAAAC,CAAO,KAAI,aAAU,EAE7C,gCAAoBV,EAAK,IAAMK,EAAS,OAAyB,KAEjE,eAAYA,EAAU,CACpB,cAAAX,EACA,cAAAC,EACA,eAAgBG,GAAM,KACxB,CAAC,KAED,aAAU,IAAM,CACd,OAAK,eAAe,YAAW,eAAa,EAC5C,SAASa,GAAa,CACpB,GAAI,CAACL,EAAS,QAAS,OACvB,MAAMM,EAASN,EAAS,SAAS,cAA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C,CAAa,GAC1D,kCAAiC,GAAGM,CAAK,IAAIC,CAAO,GAEnD,UAAAE,GAAY,YACb,OAAC,OACC,MAAM,KACN,OAAO,KACP,UAAU,WACV,MAAM,6BACN,QAAQ,YACR,KAAK,OAEL,mBAAC,QACC,UAAU,iCACV,EAAE,0BACF,OAAO,OACP,eAAa,MACb,iBAAe,QAChB,EACH,GACF,GAEJ,CAGN,CAAC,EAEDR,EAAM,YAAc,QAEpB,IAAOf,KAAQ,cAAWe,CAAK",
6
6
  "names": ["Title_exports", "__export", "Title_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_gsap", "import_SplitText", "import_ScrollTrigger", "import_utils", "import_components", "import_Styles", "import_useExposure", "import_trackUrlRef", "import_react_intersection_observer", "componentType", "componentName", "Title", "React", "data", "className", "ref", "title", "caption", "theme", "extensions", "innerRef", "titleRef", "splitTextInstance", "scrollTriggerRef", "inViewRef", "inView", "gsapResize", "height", "words", "self", "progress", "total", "interval", "overlap", "word", "i", "start", "width", "opacity"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var n=Object.create;var t=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var c=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty;var g=(e,r)=>{for(var l in r)t(e,l,{get:r[l],enumerable:!0})},i=(e,r,l,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of f(r))!d.call(e,o)&&o!==l&&t(e,o,{get:()=>r[o],enumerable:!(a=p(r,o))||a.enumerable});return e};var h=(e,r,l)=>(l=e!=null?n(c(e)):{},i(r||!e||!e.__esModule?t(l,"default",{value:e,enumerable:!0}):l,e)),y=e=>i(t({},"__esModule",{value:!0}),e);var v={};g(v,{YouTubePlayer:()=>b});module.exports=y(v);var m=require("react/jsx-runtime"),u=require("../../helpers/utils.js"),s=h(require("react-youtube"));function b({youTubeId:e,className:r}){return e?(0,m.jsx)(s.default,{className:(0,u.cn)("relative size-full",r),videoId:e,opts:{playerVars:{autoplay:1,rel:0,mute:1},width:"100%",height:"100%"}}):null}
1
+ "use strict";var d=Object.create;var t=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var f=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var c=(e,o)=>{for(var r in o)t(e,r,{get:o[r],enumerable:!0})},u=(e,o,r,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let l of p(o))!h.call(e,l)&&l!==r&&t(e,l,{get:()=>o[l],enumerable:!(i=m(o,l))||i.enumerable});return e};var g=(e,o,r)=>(r=e!=null?d(f(e)):{},u(o||!e||!e.__esModule?t(r,"default",{value:e,enumerable:!0}):r,e)),v=e=>u(t({},"__esModule",{value:!0}),e);var b={};c(b,{YouTubePlayer:()=>y});module.exports=v(b);var s=require("react/jsx-runtime"),a=require("../../helpers/utils.js"),n=g(require("react-youtube"));function y({youTubeId:e,className:o}){return e?(0,s.jsx)(n.default,{className:(0,a.cn)("relative size-full overflow-hidden rounded-2xl",o),videoId:e,opts:{playerVars:{autoplay:1,rel:0,mute:1},width:"100%",height:"100%"}}):null}
2
2
  //# sourceMappingURL=YouTubePlayer.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/VideoModal/YouTubePlayer.tsx"],
4
- "sourcesContent": ["import { cn } from '../../helpers/utils.js'\nimport YouTube from 'react-youtube'\n\nexport function YouTubePlayer({ youTubeId, className }: { youTubeId?: string; className?: string }) {\n // const onReady = event => {\n // // event.target.playVideo();\n // }\n\n return youTubeId ? (\n <YouTube\n className={cn('relative size-full', className)}\n videoId={youTubeId}\n opts={{\n playerVars: { autoplay: 1, rel: 0, mute: 1 },\n width: '100%',\n height: '100%',\n }}\n />\n ) : null\n}\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,GASI,IAAAI,EAAA,6BATJC,EAAmB,kCACnBC,EAAoB,4BAEb,SAASJ,EAAc,CAAE,UAAAK,EAAW,UAAAC,CAAU,EAA+C,CAKlG,OAAOD,KACL,OAAC,EAAAE,QAAA,CACC,aAAW,MAAG,qBAAsBD,CAAS,EAC7C,QAASD,EACT,KAAM,CACJ,WAAY,CAAE,SAAU,EAAG,IAAK,EAAG,KAAM,CAAE,EAC3C,MAAO,OACP,OAAQ,MACV,EACF,EACE,IACN",
4
+ "sourcesContent": ["import { cn } from '../../helpers/utils.js'\nimport YouTube from 'react-youtube'\n\nexport function YouTubePlayer({ youTubeId, className }: { youTubeId?: string; className?: string }) {\n // const onReady = event => {\n // // event.target.playVideo();\n // }\n\n return youTubeId ? (\n <YouTube\n className={cn('relative size-full overflow-hidden rounded-2xl', className)}\n videoId={youTubeId}\n opts={{\n playerVars: { autoplay: 1, rel: 0, mute: 1 },\n width: '100%',\n height: '100%',\n }}\n />\n ) : null\n}\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,GASI,IAAAI,EAAA,6BATJC,EAAmB,kCACnBC,EAAoB,4BAEb,SAASJ,EAAc,CAAE,UAAAK,EAAW,UAAAC,CAAU,EAA+C,CAKlG,OAAOD,KACL,OAAC,EAAAE,QAAA,CACC,aAAW,MAAG,iDAAkDD,CAAS,EACzE,QAASD,EACT,KAAM,CACJ,WAAY,CAAE,SAAU,EAAG,IAAK,EAAG,KAAM,CAAE,EAC3C,MAAO,OACP,OAAQ,MACV,EACF,EACE,IACN",
6
6
  "names": ["YouTubePlayer_exports", "__export", "YouTubePlayer", "__toCommonJS", "import_jsx_runtime", "import_utils", "import_react_youtube", "youTubeId", "className", "YouTube"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var n=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var c=(e,o)=>{for(var r in o)n(e,r,{get:o[r],enumerable:!0})},g=(e,o,r,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let l of u(o))!b.call(e,l)&&l!==r&&n(e,l,{get:()=>o[l],enumerable:!(i=p(o,l))||i.enumerable});return e};var h=e=>g(n({},"__esModule",{value:!0}),e);var m={};c(m,{VideoModal:()=>d});module.exports=h(m);var t=require("react/jsx-runtime"),a=require("../../components/dialog.js"),s=require("../VideoModal/YouTubePlayer.js");const d=e=>{const{visible:o,youTubeId:r,videoUrl:i,onCloseModal:l}=e;return(0,t.jsx)(a.Dialog,{open:o,onOpenChange:()=>l(),children:(0,t.jsxs)(a.DialogContent,{className:"max-h-3/4 h-3/4 w-4/5 max-w-[1200px] border-none bg-transparent p-0 [&_button]:hidden",children:[r?(0,t.jsx)(s.YouTubePlayer,{youTubeId:r}):null,i?(0,t.jsx)("video",{className:"size-full object-cover",src:i,muted:!0,loop:!0,autoPlay:!0,controls:!0}):null,(0,t.jsx)("div",{onClick:()=>l(),className:"tablet:size-8 tablet:-right-8 tablet:-top-8 absolute -right-6 -top-6 size-6 cursor-pointer overflow-hidden text-white",children:(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon",className:"HomeCharger_closeWrap__Z7aBo",children:(0,t.jsx)("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"})})})]})})};
1
+ "use strict";var n=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var c=(e,o)=>{for(var r in o)n(e,r,{get:o[r],enumerable:!0})},g=(e,o,r,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let l of u(o))!b.call(e,l)&&l!==r&&n(e,l,{get:()=>o[l],enumerable:!(i=p(o,l))||i.enumerable});return e};var h=e=>g(n({},"__esModule",{value:!0}),e);var v={};c(v,{VideoModal:()=>d});module.exports=h(v);var t=require("react/jsx-runtime"),a=require("../../components/dialog.js"),s=require("../VideoModal/YouTubePlayer.js");const d=e=>{const{visible:o,youTubeId:r,videoUrl:i,onCloseModal:l}=e;return(0,t.jsx)(a.Dialog,{open:o,onOpenChange:()=>l(),children:(0,t.jsxs)(a.DialogContent,{className:"max-h-3/4 h-3/4 w-4/5 max-w-[1200px] border-none bg-transparent p-0 [&_button]:hidden",children:[r?(0,t.jsx)(s.YouTubePlayer,{youTubeId:r}):null,i?(0,t.jsx)("video",{className:"size-full object-cover rounded-2xl overflow-hidden",src:i,muted:!0,loop:!0,autoPlay:!0,controls:!0}):null,(0,t.jsx)("div",{onClick:()=>l(),className:"tablet:size-8 tablet:-right-8 tablet:-top-8 absolute -right-6 -top-6 size-6 cursor-pointer overflow-hidden text-white",children:(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon",className:"HomeCharger_closeWrap__Z7aBo",children:(0,t.jsx)("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"})})})]})})};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/VideoModal/index.tsx"],
4
- "sourcesContent": ["import type { Media } from '../../types/props.js'\nimport { Dialog, DialogContent } from '../../components/dialog.js'\nimport { YouTubePlayer } from '../VideoModal/YouTubePlayer.js'\n\nexport type VideoModalType = {\n visible: boolean\n youTubeId?: string\n videoUrl?: string\n onCloseModal: () => void\n}\n\nconst VideoModal = (props: VideoModalType) => {\n const { visible, youTubeId, videoUrl, onCloseModal } = props\n\n return (\n <Dialog open={visible} onOpenChange={() => onCloseModal()}>\n <DialogContent className=\"max-h-3/4 h-3/4 w-4/5 max-w-[1200px] border-none bg-transparent p-0 [&_button]:hidden\">\n {youTubeId ? <YouTubePlayer youTubeId={youTubeId} /> : null}\n {videoUrl ? <video className=\"size-full object-cover\" src={videoUrl} muted loop autoPlay controls /> : null}\n <div\n onClick={() => onCloseModal()}\n className=\"tablet:size-8 tablet:-right-8 tablet:-top-8 absolute -right-6 -top-6 size-6 cursor-pointer overflow-hidden text-white\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n aria-hidden=\"true\"\n data-slot=\"icon\"\n className=\"HomeCharger_closeWrap__Z7aBo\"\n >\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18 18 6M6 6l12 12\"></path>\n </svg>\n </div>\n </DialogContent>\n </Dialog>\n )\n}\n\nexport { VideoModal }\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,IAAA,eAAAC,EAAAH,GAgBM,IAAAI,EAAA,6BAfNC,EAAsC,sCACtCC,EAA8B,0CAS9B,MAAMJ,EAAcK,GAA0B,CAC5C,KAAM,CAAE,QAAAC,EAAS,UAAAC,EAAW,SAAAC,EAAU,aAAAC,CAAa,EAAIJ,EAEvD,SACE,OAAC,UAAO,KAAMC,EAAS,aAAc,IAAMG,EAAa,EACtD,oBAAC,iBAAc,UAAU,wFACtB,UAAAF,KAAY,OAAC,iBAAc,UAAWA,EAAW,EAAK,KACtDC,KAAW,OAAC,SAAM,UAAU,yBAAyB,IAAKA,EAAU,MAAK,GAAC,KAAI,GAAC,SAAQ,GAAC,SAAQ,GAAC,EAAK,QACvG,OAAC,OACC,QAAS,IAAMC,EAAa,EAC5B,UAAU,wHAEV,mBAAC,OACC,MAAM,6BACN,KAAK,OACL,QAAQ,YACR,eAAa,MACb,OAAO,eACP,cAAY,OACZ,YAAU,OACV,UAAU,+BAEV,mBAAC,QAAK,iBAAe,QAAQ,kBAAgB,QAAQ,EAAE,uBAAuB,EAChF,EACF,GACF,EACF,CAEJ",
4
+ "sourcesContent": ["import type { Media } from '../../types/props.js'\nimport { Dialog, DialogContent } from '../../components/dialog.js'\nimport { YouTubePlayer } from '../VideoModal/YouTubePlayer.js'\n\nexport type VideoModalType = {\n visible: boolean\n youTubeId?: string\n videoUrl?: string\n onCloseModal: () => void\n}\n\nconst VideoModal = (props: VideoModalType) => {\n const { visible, youTubeId, videoUrl, onCloseModal } = props\n\n return (\n <Dialog open={visible} onOpenChange={() => onCloseModal()}>\n <DialogContent className=\"max-h-3/4 h-3/4 w-4/5 max-w-[1200px] border-none bg-transparent p-0 [&_button]:hidden\">\n {youTubeId ? <YouTubePlayer youTubeId={youTubeId} /> : null}\n {videoUrl ? <video className=\"size-full object-cover rounded-2xl overflow-hidden\" src={videoUrl} muted loop autoPlay controls /> : null}\n <div\n onClick={() => onCloseModal()}\n className=\"tablet:size-8 tablet:-right-8 tablet:-top-8 absolute -right-6 -top-6 size-6 cursor-pointer overflow-hidden text-white\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n aria-hidden=\"true\"\n data-slot=\"icon\"\n className=\"HomeCharger_closeWrap__Z7aBo\"\n >\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18 18 6M6 6l12 12\"></path>\n </svg>\n </div>\n </DialogContent>\n </Dialog>\n )\n}\n\nexport { VideoModal }\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,IAAA,eAAAC,EAAAH,GAgBM,IAAAI,EAAA,6BAfNC,EAAsC,sCACtCC,EAA8B,0CAS9B,MAAMJ,EAAcK,GAA0B,CAC5C,KAAM,CAAE,QAAAC,EAAS,UAAAC,EAAW,SAAAC,EAAU,aAAAC,CAAa,EAAIJ,EAEvD,SACE,OAAC,UAAO,KAAMC,EAAS,aAAc,IAAMG,EAAa,EACtD,oBAAC,iBAAc,UAAU,wFACtB,UAAAF,KAAY,OAAC,iBAAc,UAAWA,EAAW,EAAK,KACtDC,KAAW,OAAC,SAAM,UAAU,qDAAqD,IAAKA,EAAU,MAAK,GAAC,KAAI,GAAC,SAAQ,GAAC,SAAQ,GAAC,EAAK,QACnI,OAAC,OACC,QAAS,IAAMC,EAAa,EAC5B,UAAU,wHAEV,mBAAC,OACC,MAAM,6BACN,KAAK,OACL,QAAQ,YACR,eAAa,MACb,OAAO,eACP,cAAY,OACZ,YAAU,OACV,UAAU,+BAEV,mBAAC,QAAK,iBAAe,QAAQ,kBAAgB,QAAQ,EAAE,uBAAuB,EAChF,EACF,GACF,EACF,CAEJ",
6
6
  "names": ["VideoModal_exports", "__export", "VideoModal", "__toCommonJS", "import_jsx_runtime", "import_dialog", "import_YouTubePlayer", "props", "visible", "youTubeId", "videoUrl", "onCloseModal"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var x=Object.create;var a=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty;var P=(e,s)=>{for(var i in s)a(e,i,{get:s[i],enumerable:!0})},m=(e,s,i,r)=>{if(s&&typeof s=="object"||typeof s=="function")for(let l of v(s))!N.call(e,l)&&l!==i&&a(e,l,{get:()=>s[l],enumerable:!(r=u(s,l))||r.enumerable});return e};var n=(e,s,i)=>(i=e!=null?x(y(e)):{},m(s||!e||!e.__esModule?a(i,"default",{value:e,enumerable:!0}):i,e)),b=e=>m(a({},"__esModule",{value:!0}),e);var B={};P(B,{WhyChooseItem:()=>d,default:()=>C});module.exports=b(B);var t=require("react/jsx-runtime"),o=n(require("react")),p=require("../../components/index.js"),h=require("../../helpers/index.js"),w=require("../../shared/Styles.js"),f=n(require("../SwiperBox/index.js"));const c=o.default.forwardRef(({data:e,className:s},i)=>{const r=(0,o.useRef)(null);return(0,o.useImperativeHandle)(i,()=>r.current),(0,t.jsx)("div",{ref:r,className:(0,h.cn)(s),children:(0,t.jsx)(f.default,{className:"!overflow-visible [&_.swiper-wrapper]:flex",data:{list:e?.productData||[],configuration:{shape:"card",isTab:!0}},Slide:d,breakpoints:{0:{slidesPerView:1,spaceBetween:12},374:{slidesPerView:1.2,spaceBetween:12},768:{slidesPerView:2.3,spaceBetween:16},1025:{slidesPerView:4,spaceBetween:16},1440:{slidesPerView:4,spaceBetween:16},1920:{slidesPerView:4,spaceBetween:16}},id:""})})});c.displayName="WhyChoose";const d=({data:e})=>(0,t.jsxs)("div",{className:" laptop:p-[24px] laptop:shrink box-border w-full shrink-0 rounded-[16px] bg-[#EAEAEC] p-[16px]",children:[(0,t.jsx)(p.Picture,{source:e.img.url,className:"w-[36px]"}),(0,t.jsxs)("div",{className:"py-[16px]",children:[(0,t.jsx)(p.Text,{html:e?.title,className:"line-clamp-2 overflow-hidden text-ellipsis text-[20px] font-bold leading-[1.2]"}),(0,t.jsx)("div",{className:"mt-[8px]",children:(0,t.jsx)(p.Text,{html:e?.desc,className:"line-clamp-2 overflow-hidden text-ellipsis text-[14px] font-bold leading-[1.2]"})})]})]});d.displayName="WhyChooseItem";var C=(0,w.withLayout)(c);
1
+ "use strict";"use client";var x=Object.create;var a=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty;var C=(e,s)=>{for(var i in s)a(e,i,{get:s[i],enumerable:!0})},d=(e,s,i,l)=>{if(s&&typeof s=="object"||typeof s=="function")for(let r of v(s))!N.call(e,r)&&r!==i&&a(e,r,{get:()=>s[r],enumerable:!(l=u(s,r))||l.enumerable});return e};var n=(e,s,i)=>(i=e!=null?x(y(e)):{},d(s||!e||!e.__esModule?a(i,"default",{value:e,enumerable:!0}):i,e)),P=e=>d(a({},"__esModule",{value:!0}),e);var B={};C(B,{WhyChooseItem:()=>m,default:()=>b});module.exports=P(B);var o=require("react/jsx-runtime"),t=n(require("react")),p=require("../../components/index.js"),h=require("../../helpers/index.js"),w=require("../../shared/Styles.js"),f=n(require("../SwiperBox/index.js"));const c=t.default.forwardRef(({data:e,className:s},i)=>{const l=(0,t.useRef)(null);return(0,t.useImperativeHandle)(i,()=>l.current),(0,o.jsx)("div",{ref:l,className:(0,h.cn)(s),children:(0,o.jsx)(f.default,{className:"!overflow-visible [&_.swiper-wrapper]:flex",data:{list:e?.productData||[],configuration:{shape:"card",isTab:!0}},Slide:m,breakpoints:{0:{slidesPerView:1,spaceBetween:12},374:{slidesPerView:1.2,spaceBetween:12},768:{slidesPerView:2.3,spaceBetween:16},1025:{slidesPerView:4,spaceBetween:16},1440:{slidesPerView:4,spaceBetween:16},1920:{slidesPerView:4,spaceBetween:16}},id:""})})});c.displayName="WhyChoose";const m=({data:e})=>(0,o.jsxs)("div",{className:"whyChooseBlock laptop:p-[24px] laptop:shrink box-border w-full shrink-0 rounded-[16px] bg-[#EAEAEC] p-[16px]",children:[(0,o.jsx)(p.Picture,{source:e.img.url,className:"w-[36px]"}),(0,o.jsxs)("div",{className:"mt-[16px]",children:[(0,o.jsx)(p.Text,{html:e?.title,className:"line-clamp-2 overflow-hidden text-ellipsis text-[20px] font-bold leading-[1.2]"}),(0,o.jsx)("div",{className:"mt-[8px]",children:(0,o.jsx)(p.Text,{html:e?.desc,className:"line-clamp-2 overflow-hidden text-ellipsis text-[14px] font-bold leading-[1.2]"})})]})]});m.displayName="WhyChooseItem";var b=(0,w.withLayout)(c);
2
2
  //# sourceMappingURL=WhyChoose.js.map