@gem-sdk/components 19.1.0-dev.5 → 19.1.0-dev.7

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 (203) hide show
  1. package/dist/cjs/accordion/next.js +1 -1
  2. package/dist/cjs/article/components/ArticleContent.js +2 -2
  3. package/dist/cjs/article/components/ArticleExcerpt.js +1 -1
  4. package/dist/cjs/article/components/ArticleList.js +1 -1
  5. package/dist/cjs/article/index.js +1 -1
  6. package/dist/cjs/article/next.js +1 -1
  7. package/dist/cjs/breadcrumb/next.js +1 -1
  8. package/dist/cjs/button/next.js +1 -1
  9. package/dist/cjs/carousel/next.js +1 -1
  10. package/dist/cjs/carousel-v3/next.js +1 -1
  11. package/dist/cjs/cart/components/CartList.js +1 -1
  12. package/dist/cjs/cart/index.js +1 -1
  13. package/dist/cjs/cart/next.js +1 -1
  14. package/dist/cjs/code/next.js +1 -1
  15. package/dist/cjs/collection/next.js +1 -1
  16. package/dist/cjs/common/const.js +1 -1
  17. package/dist/cjs/countdown-timer/next.js +1 -1
  18. package/dist/cjs/coupon/next.js +1 -1
  19. package/dist/cjs/dialog/index.js +1 -1
  20. package/dist/cjs/dialog/next.js +1 -1
  21. package/dist/cjs/estimate-delivery/next.js +1 -1
  22. package/dist/cjs/form/next.js +1 -1
  23. package/dist/cjs/grid/components/section/Section.js +1 -1
  24. package/dist/cjs/grid/index.js +1 -1
  25. package/dist/cjs/header/components/kind/basic/index.js +1 -1
  26. package/dist/cjs/header/components/kind/modern/index.js +1 -1
  27. package/dist/cjs/header/index.js +1 -1
  28. package/dist/cjs/header/next.js +1 -1
  29. package/dist/cjs/hero-banner/components/HeroBannerItem.js +1 -1
  30. package/dist/cjs/hero-banner/index.js +1 -1
  31. package/dist/cjs/hero-banner/next.js +1 -1
  32. package/dist/cjs/icon/next.js +1 -1
  33. package/dist/cjs/icon-list/next.js +1 -1
  34. package/dist/cjs/icon-list-hoz/next.js +1 -1
  35. package/dist/cjs/icon-list-v2/next.js +1 -1
  36. package/dist/cjs/image/common/const.js +1 -1
  37. package/dist/cjs/image/common/helpers.js +2 -2
  38. package/dist/cjs/image-comparison/next.js +1 -1
  39. package/dist/cjs/image-detection/next.js +1 -1
  40. package/dist/cjs/input/next.js +1 -1
  41. package/dist/cjs/line/next.js +1 -1
  42. package/dist/cjs/link/next.js +1 -1
  43. package/dist/cjs/marquee/next.js +1 -1
  44. package/dist/cjs/menu/next.js +1 -1
  45. package/dist/cjs/modal/next.js +1 -1
  46. package/dist/cjs/pagination/next.js +1 -1
  47. package/dist/cjs/post-purchase/advanced-list/next.js +1 -1
  48. package/dist/cjs/post-purchase/button/next.js +1 -1
  49. package/dist/cjs/post-purchase/buyer-consent/next.js +1 -1
  50. package/dist/cjs/post-purchase/callout-banner/components/CalloutBox.js +1 -1
  51. package/dist/cjs/post-purchase/callout-banner/index.js +1 -1
  52. package/dist/cjs/post-purchase/callout-banner/next.js +1 -1
  53. package/dist/cjs/post-purchase/countdown-timer/next.js +1 -1
  54. package/dist/cjs/post-purchase/image/next.js +1 -1
  55. package/dist/cjs/post-purchase/line/next.js +1 -1
  56. package/dist/cjs/post-purchase/link/next.js +1 -1
  57. package/dist/cjs/post-purchase/product/components/product-image/FeatureImage.js +1 -1
  58. package/dist/cjs/post-purchase/product/components/product-image/carousel-post-purchase/Arrow.js +1 -1
  59. package/dist/cjs/post-purchase/product/components/product-image/carousel-post-purchase/CarouselWrapperPostPurchase.js +1 -1
  60. package/dist/cjs/post-purchase/product/components/product-image/layouts/OnlyGalleryImage.js +1 -1
  61. package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOffer.js +1 -1
  62. package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOfferItem.js +1 -1
  63. package/dist/cjs/post-purchase/product/hooks/useNavigationCarouselPostPurchase.js +1 -1
  64. package/dist/cjs/post-purchase/product/index.js +1 -1
  65. package/dist/cjs/post-purchase/product/next.js +1 -1
  66. package/dist/cjs/post-purchase/text/next.js +1 -1
  67. package/dist/cjs/product/components/product-badge/ProductBadge.js +1 -1
  68. package/dist/cjs/product/components/product-badge/ProductBadge.liquid.js +18 -18
  69. package/dist/cjs/product/components/product-badge/utils/injectBadgeStateExtras.js +1 -0
  70. package/dist/cjs/product/components/product-badge/utils/renderBadgeLiquid.js +5 -5
  71. package/dist/cjs/product/components/product-discount-tag/ProductDiscountTag.js +1 -1
  72. package/dist/cjs/product/components/product-images-v3/ProductImagesV3.liquid.js +13 -13
  73. package/dist/cjs/product/components/product-images-v3/ProductImagesV3Embla.liquid.js +10 -10
  74. package/dist/cjs/product/components/product-list/ProductList.js +1 -1
  75. package/dist/cjs/product/components/product-list-v3/ProductList.js +1 -1
  76. package/dist/cjs/product/components/product-list-v3/common/helpers.js +1 -1
  77. package/dist/cjs/product/components/product-list-v3/constants/index.js +1 -0
  78. package/dist/cjs/product/components/product-list-v3/hooks/useCollectionQuery.js +1 -0
  79. package/dist/cjs/product/components/product-list-v3/hooks/useMainRelatedProductQuery.js +1 -0
  80. package/dist/cjs/product/components/product-list-v3/hooks/useProductRelatedQuery.js +1 -0
  81. package/dist/cjs/product/components/product-list-v3/hooks/useProductsQuery.js +1 -0
  82. package/dist/cjs/product/components/product-list-v3/hooks/useRelatedProductIDAssigned.js +1 -0
  83. package/dist/cjs/product/components/product-quick-view/ProductQuickView.js +1 -1
  84. package/dist/cjs/product/components/product-wrap/Product.js +1 -1
  85. package/dist/cjs/product/components/product-wrap/hook/useProductQuery.js +1 -0
  86. package/dist/cjs/product/components/product-wrap/hook/useProductSetting.js +1 -1
  87. package/dist/cjs/product/index.js +1 -1
  88. package/dist/cjs/product/next.js +1 -1
  89. package/dist/cjs/radio/next.js +1 -1
  90. package/dist/cjs/select/next.js +1 -1
  91. package/dist/cjs/shop-pay-installment/next.js +1 -1
  92. package/dist/cjs/sticky/hooks/useSticky.js +1 -1
  93. package/dist/cjs/sticky/index.js +1 -1
  94. package/dist/cjs/sticky/next.js +1 -1
  95. package/dist/cjs/stock-counter/next.js +1 -1
  96. package/dist/cjs/tab/next.js +1 -1
  97. package/dist/cjs/textarea/next.js +1 -1
  98. package/dist/cjs/third-party/next.js +1 -1
  99. package/dist/cjs/third-party-instant/next.js +1 -1
  100. package/dist/cjs/third-party-slot/next.js +1 -1
  101. package/dist/cjs/video/next.js +1 -1
  102. package/dist/esm/accordion/next.js +1 -1
  103. package/dist/esm/article/components/ArticleContent.js +2 -2
  104. package/dist/esm/article/components/ArticleExcerpt.js +1 -1
  105. package/dist/esm/article/components/ArticleList.js +1 -1
  106. package/dist/esm/article/index.js +1 -1
  107. package/dist/esm/article/next.js +1 -1
  108. package/dist/esm/breadcrumb/next.js +1 -1
  109. package/dist/esm/button/next.js +1 -1
  110. package/dist/esm/carousel/next.js +1 -1
  111. package/dist/esm/carousel-v3/next.js +1 -1
  112. package/dist/esm/cart/components/CartList.js +1 -1
  113. package/dist/esm/cart/index.js +1 -1
  114. package/dist/esm/cart/next.js +1 -1
  115. package/dist/esm/code/next.js +1 -1
  116. package/dist/esm/collection/next.js +1 -1
  117. package/dist/esm/common/const.js +1 -1
  118. package/dist/esm/countdown-timer/next.js +1 -1
  119. package/dist/esm/coupon/next.js +1 -1
  120. package/dist/esm/dialog/index.js +1 -1
  121. package/dist/esm/dialog/next.js +1 -1
  122. package/dist/esm/estimate-delivery/next.js +1 -1
  123. package/dist/esm/form/next.js +1 -1
  124. package/dist/esm/grid/components/section/Section.js +1 -1
  125. package/dist/esm/grid/index.js +1 -1
  126. package/dist/esm/header/components/kind/basic/index.js +1 -1
  127. package/dist/esm/header/components/kind/modern/index.js +1 -1
  128. package/dist/esm/header/index.js +1 -1
  129. package/dist/esm/header/next.js +1 -1
  130. package/dist/esm/hero-banner/components/HeroBannerItem.js +1 -1
  131. package/dist/esm/hero-banner/index.js +1 -1
  132. package/dist/esm/hero-banner/next.js +1 -1
  133. package/dist/esm/icon/next.js +1 -1
  134. package/dist/esm/icon-list/next.js +1 -1
  135. package/dist/esm/icon-list-hoz/next.js +1 -1
  136. package/dist/esm/icon-list-v2/next.js +1 -1
  137. package/dist/esm/image/common/const.js +1 -1
  138. package/dist/esm/image/common/helpers.js +2 -2
  139. package/dist/esm/image-comparison/next.js +1 -1
  140. package/dist/esm/image-detection/next.js +1 -1
  141. package/dist/esm/input/next.js +1 -1
  142. package/dist/esm/line/next.js +1 -1
  143. package/dist/esm/link/next.js +1 -1
  144. package/dist/esm/marquee/next.js +1 -1
  145. package/dist/esm/menu/next.js +1 -1
  146. package/dist/esm/modal/next.js +1 -1
  147. package/dist/esm/pagination/next.js +1 -1
  148. package/dist/esm/post-purchase/advanced-list/next.js +1 -1
  149. package/dist/esm/post-purchase/button/next.js +1 -1
  150. package/dist/esm/post-purchase/buyer-consent/next.js +1 -1
  151. package/dist/esm/post-purchase/callout-banner/components/CalloutBox.js +1 -1
  152. package/dist/esm/post-purchase/callout-banner/index.js +1 -1
  153. package/dist/esm/post-purchase/callout-banner/next.js +1 -1
  154. package/dist/esm/post-purchase/countdown-timer/next.js +1 -1
  155. package/dist/esm/post-purchase/image/next.js +1 -1
  156. package/dist/esm/post-purchase/line/next.js +1 -1
  157. package/dist/esm/post-purchase/link/next.js +1 -1
  158. package/dist/esm/post-purchase/product/components/product-image/FeatureImage.js +1 -1
  159. package/dist/esm/post-purchase/product/components/product-image/carousel-post-purchase/Arrow.js +1 -1
  160. package/dist/esm/post-purchase/product/components/product-image/carousel-post-purchase/CarouselWrapperPostPurchase.js +1 -1
  161. package/dist/esm/post-purchase/product/components/product-image/layouts/OnlyGalleryImage.js +1 -1
  162. package/dist/esm/post-purchase/product/components/product-offer/components/ProductOffer.js +1 -1
  163. package/dist/esm/post-purchase/product/components/product-offer/components/ProductOfferItem.js +1 -1
  164. package/dist/esm/post-purchase/product/hooks/useNavigationCarouselPostPurchase.js +1 -1
  165. package/dist/esm/post-purchase/product/index.js +1 -1
  166. package/dist/esm/post-purchase/product/next.js +1 -1
  167. package/dist/esm/post-purchase/text/next.js +1 -1
  168. package/dist/esm/product/components/product-badge/ProductBadge.js +1 -1
  169. package/dist/esm/product/components/product-badge/ProductBadge.liquid.js +15 -15
  170. package/dist/esm/product/components/product-badge/utils/injectBadgeStateExtras.js +1 -0
  171. package/dist/esm/product/components/product-badge/utils/renderBadgeLiquid.js +1 -1
  172. package/dist/esm/product/components/product-discount-tag/ProductDiscountTag.js +1 -1
  173. package/dist/esm/product/components/product-images-v3/ProductImagesV3.liquid.js +12 -12
  174. package/dist/esm/product/components/product-images-v3/ProductImagesV3Embla.liquid.js +12 -12
  175. package/dist/esm/product/components/product-list/ProductList.js +1 -1
  176. package/dist/esm/product/components/product-list-v3/ProductList.js +1 -1
  177. package/dist/esm/product/components/product-list-v3/common/helpers.js +1 -1
  178. package/dist/esm/product/components/product-list-v3/constants/index.js +1 -0
  179. package/dist/esm/product/components/product-list-v3/hooks/useCollectionQuery.js +1 -0
  180. package/dist/esm/product/components/product-list-v3/hooks/useMainRelatedProductQuery.js +1 -0
  181. package/dist/esm/product/components/product-list-v3/hooks/useProductRelatedQuery.js +1 -0
  182. package/dist/esm/product/components/product-list-v3/hooks/useProductsQuery.js +1 -0
  183. package/dist/esm/product/components/product-list-v3/hooks/useRelatedProductIDAssigned.js +1 -0
  184. package/dist/esm/product/components/product-quick-view/ProductQuickView.js +1 -1
  185. package/dist/esm/product/components/product-wrap/Product.js +1 -1
  186. package/dist/esm/product/components/product-wrap/hook/useProductQuery.js +1 -0
  187. package/dist/esm/product/components/product-wrap/hook/useProductSetting.js +1 -1
  188. package/dist/esm/product/index.js +1 -1
  189. package/dist/esm/product/next.js +1 -1
  190. package/dist/esm/radio/next.js +1 -1
  191. package/dist/esm/select/next.js +1 -1
  192. package/dist/esm/shop-pay-installment/next.js +1 -1
  193. package/dist/esm/sticky/hooks/useSticky.js +1 -1
  194. package/dist/esm/sticky/index.js +1 -1
  195. package/dist/esm/sticky/next.js +1 -1
  196. package/dist/esm/stock-counter/next.js +1 -1
  197. package/dist/esm/tab/next.js +1 -1
  198. package/dist/esm/textarea/next.js +1 -1
  199. package/dist/esm/third-party/next.js +1 -1
  200. package/dist/esm/third-party-instant/next.js +1 -1
  201. package/dist/esm/third-party-slot/next.js +1 -1
  202. package/dist/esm/video/next.js +1 -1
  203. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import{getCornerCSSFromGlobal as e,getAspectRatioGlobalSize as t,hasTranslatedLiquid as i,makeStyleResponsive as r,DEVICES as l,getResponsiveValueByScreen as a,cloneDeep as s}from"@gem-sdk/core";import{getDynamicSourceLocales as o,createSettingId as n}from"../../helpers.js";import{Image as g}from"../settings/configs/translate.js";import{REGEX_IS_NON_RESIZABLE_IMAGE as c}from"./const.js";let d=t=>{let i={...t},r=!0;return i&&Object.keys(i??{}).forEach(e=>{if("bblr"===e||"bbrr"===e||"btlr"===e||"btrr"===e){let t=i[e]??{};"0px"!==t&&(r=!1)}}),r?e(i):{}},u=({styles:e,setting:i})=>{let{srcSet:r,image:l}=i??{},{customAspectRadio:a,shape:s}=e??{},o={desktop:m({device:"desktop",aspect:e?.aspectRatio,auto:i?.isAdaptive?r?.desktop:l,custom:a}),tablet:m({device:"tablet",aspect:e?.aspectRatio,auto:i?.isAdaptive?r?.tablet:l,custom:a}),mobile:m({device:"mobile",aspect:e?.aspectRatio,auto:i?.isAdaptive?r?.mobile:l,custom:a})};return s?t(s):o},m=({device:e,aspect:t,custom:i,auto:r})=>{let l=t?.[e];return"auto"===l?r?.height?`${r.width}/${r.height}`:void 0:"custom"===l?i?.[e]?.height?`${i?.[e]?.width}/${i?.[e]?.height}`:void 0:l},f=({layout:e,isDisableObjectFit:t})=>t?{}:r("objf",e),p=({isDisableAspectStyle:e,aspectRatio:t,objectFits:i,width:r,height:a})=>{if(e)return{};let s={};return l.forEach(e=>{let l=`--objf${"desktop"!==e?`-${e}`:""}`,o=i?.[l]||i?.["--objf"];if(t?.[e]==="auto"&&"contain"===o){s[e]="auto";return}s[e]=t?.[e]!=="auto"&&t?.[e]?t[e]:`${r}/${a}`}),s},h=e=>JSON.stringify(e||{}).replace(/"/g,"&quot;"),b=(e,t)=>`<svg width="${e}" height="${t}" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
1
+ import{getCornerCSSFromGlobal as e,getAspectRatioGlobalSize as t,hasTranslatedLiquid as i,makeStyleResponsive as r,DEVICES as l,getResponsiveValueByScreen as a,cloneDeep as s}from"@gem-sdk/core";import{getDynamicSourceLocales as o,createSettingId as n}from"../../helpers.js";import{Image as g}from"../settings/configs/translate.js";import{REGEX_IS_NON_RESIZABLE_IMAGE as c,REGEX_IS_NON_RESIZABLE_IMAGE_BY_QUERY as d}from"./const.js";let u=t=>{let i={...t},r=!0;return i&&Object.keys(i??{}).forEach(e=>{if("bblr"===e||"bbrr"===e||"btlr"===e||"btrr"===e){let t=i[e]??{};"0px"!==t&&(r=!1)}}),r?e(i):{}},m=({styles:e,setting:i})=>{let{srcSet:r,image:l}=i??{},{customAspectRadio:a,shape:s}=e??{},o={desktop:f({device:"desktop",aspect:e?.aspectRatio,auto:i?.isAdaptive?r?.desktop:l,custom:a}),tablet:f({device:"tablet",aspect:e?.aspectRatio,auto:i?.isAdaptive?r?.tablet:l,custom:a}),mobile:f({device:"mobile",aspect:e?.aspectRatio,auto:i?.isAdaptive?r?.mobile:l,custom:a})};return s?t(s):o},f=({device:e,aspect:t,custom:i,auto:r})=>{let l=t?.[e];return"auto"===l?r?.height?`${r.width}/${r.height}`:void 0:"custom"===l?i?.[e]?.height?`${i?.[e]?.width}/${i?.[e]?.height}`:void 0:l},p=({layout:e,isDisableObjectFit:t})=>t?{}:r("objf",e),h=({isDisableAspectStyle:e,aspectRatio:t,objectFits:i,width:r,height:a})=>{if(e)return{};let s={};return l.forEach(e=>{let l=`--objf${"desktop"!==e?`-${e}`:""}`,o=i?.[l]||i?.["--objf"];if(t?.[e]==="auto"&&"contain"===o){s[e]="auto";return}s[e]=t?.[e]!=="auto"&&t?.[e]?t[e]:`${r}/${a}`}),s},b=e=>JSON.stringify(e||{}).replace(/"/g,"&quot;"),A=(e,t)=>`<svg width="${e}" height="${t}" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
2
2
  <defs>
3
3
  <linearGradient id="g-${e}-${t}">
4
4
  <stop stop-color="rgba(51, 51, 51, 0)" offset="20%" />
@@ -9,4 +9,4 @@ import{getCornerCSSFromGlobal as e,getAspectRatioGlobalSize as t,hasTranslatedLi
9
9
  <rect width="${e}" height="${t}" fill="rgba(51, 51, 51, 0)" />
10
10
  <rect id="r" width="${e}" height="${t}" fill="url(#g-${e}-${t})" />
11
11
  <animate xlink:href="#r" attributeName="x" from="-${e}" to="${e}" dur="1s" repeatCount="indefinite" />
12
- </svg>`,A=e=>"undefined"==typeof window?Buffer.from(e).toString("base64"):window.btoa(e),w=(e,t)=>`data:image/svg+xml;base64,${A(b(e,t))}`,$="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=",_="https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",S={DEFAULT_SIZES:"100vw",DEFAULT_ALT:"Alt image",DEFAULT_SRC:"https://cdn.shopify.com/s/files/1/2005/9307/files/placeholder-1.png?v=1751355990",DEFAULT_WIDTH_PROPS:800,DEFAULT_HEIGHT_PROPS:533},E=e=>{let{srcSet:t,fallbackImg:i}=e;return{getDeviceSource:e=>{let{isLiquid:r}=e??{},l=C(t?.desktop,"desktop",!r)||i||_,a=C(t?.tablet,"tablet",!r)||C(t?.desktop,"tablet",!r)||i||_,s=C(t?.mobile,"mobile",!r)||C(t?.tablet,"mobile",!r)||C(t?.desktop,"mobile",!r)||i||_;return{srcTablet:a,srcMobile:s,srcDesktop:l}}}},x=({setting:e,uid:t,pageContext:i})=>{if(!e||!g)return{};let r=s(e);for(let e in r.srcSet){let l=r.srcSet[e];if(l&&l.src){let r=o({val:l.src,uid:t,settingId:g?.srcSet?.id?`${g.srcSet.id}_${e}_src`:"",pageContext:i??{}});l.src=String(r)}}let l=o({val:r.alt,uid:t,settingId:n({id:g?.alt?.id}),pageContext:i??{}});r.alt=String(l);let a=o({val:r.title,uid:t,settingId:n({id:g?.title?.id}),pageContext:i??{}});return r.title=String(a),r},I=(e,t,i)=>e?v(e,t):y(i),k=e=>c.test(e),v=(e,t)=>{let i=N(e);return k(e)?"FILE_CONTENT"==t?`{{ '${i}' | file_url }} 768w, {{ '${i}' | file_url }} 1024w, {{ '${i}' | file_url }} 1440w`:`{{ '${e}' | asset_url }} 768w, {{ '${e}' | asset_url }} 1024w, {{ '${e}' | asset_url }} 1440w`:"FILE_CONTENT"==t?`{{ '${i}' | file_img_url: '768x' }} 768w, {{ '${i}' | file_img_url: '1024x' }} 1024w, {{ '${i}' | file_img_url: 'master' }} 1440w`:`{{ '${e}' | asset_img_url: '768x' }} 768w, {{ '${e}' | asset_img_url: '1024x' }} 1024w, {{ '${e}' | asset_img_url: 'master' }} 1440w`},y=e=>e,C=(e,t,r)=>{if(e?.metafieldDefinitionKey)return F(e?.metafieldDefinitionKey);let l=e?.backupFilePath??e?.src??"";if(r)l=e?.src||"";else{let t=e?.src??"";if(i(t))return t;if(e?.backupFileKey){let t=R(e.backupFileKey,e?.src??"");"THEME"!==e.storage&&e.storage?"FILE_CONTENT"===e.storage&&(l=`{{ "${N(t)}" | file_url }}`):l=`{{ "${t}" | asset_url }}`}}if(t&&l?.includes("cdn.shopify")&&!k(l))switch(t){case"tablet":l=l?.includes("?")?`${l}&width=1024`:`${l}?width=1024`;break;case"mobile":l=l?.includes("?")?`${l}&width=768`:`${l}?width=768`}return l},F=e=>`{{${e} | file_url}}`,N=e=>e.replace(/\.jpeg|\.jfif/g,".jpg"),R=(e,t)=>{let i=t?.match(/\/files\/([^\/]+\.(jpg|jpeg|gif|png|webp|svg))/)?.[1];return i&&i!=e?i:e};function T(e,t){let i=j({str:e,reg:/_(pico|icon|thumb|small|compact|medium|large|grande|original|1024x1024|2048x2048|master)+\./g,newString:"."});if(k(i))return i;let r=j({str:i,reg:/\.jpg|\.png|\.jpeg/g,newString:t,isAdd:!0});return r}let j=e=>{let t=e.str,i=e.str.match(e.reg)?.length;if(i){let r,l=1;for(;null!==(r=e.reg.exec(e.str));){if(l===i){let i=e.reg.lastIndex,l=i-r[0].length;e.isAdd&&(e.newString="_"+e.newString+r),t=t.slice(0,l)+e.newString+t.slice(i,t.length)}l++}}return t},L=(e,t)=>{let i=H(),r=t?.[i]||"auto";if("auto"===r||r.includes("%"))return e;let l=Number(r.replace("px",""));return l>e?e:Number(r.replace("px",""))},D=e=>{let{itemWidthParam:t,imageWidthSetting:i,qualityType:r,qualityPercent:l}=e,s=H(),o=L(t,i),n=a(r,s,"finest"),g=a(l,s,100);switch(n){case"finest":default:return"auto";case"high":return Math.round(1.5*o)||1;case"medium":return Math.round(o)||1;case"custom":return Math.round(o*(Number(g)/100))||1}},W=e=>{let t={desktop:"100%",tablet:"100%",mobile:"100%"};return l.forEach(i=>{let r=a(e,i)?.width||"100%";t[i]=r}),t},O=e=>{let t={desktop:"100%",tablet:"100%",mobile:"100%"};return l.forEach(i=>{let r=a(e,i)?.width||"100%";t[i]=r}),t},B=e=>{let t=document.querySelectorAll(`.gem-slider-item-${e}.gp-gallery-image-item`),i=0;return t.forEach(e=>{e.offsetWidth>i&&(i=e.offsetWidth)}),i},K=e=>{let t=document.querySelectorAll(`.gem-slider-item-${e}.gp-ft-image-item`),i=0;return t.forEach(e=>{e.offsetWidth>i&&(i=e.offsetWidth)}),i},P=e=>{let{shapeByLayout:t,qualityType:i,qualityPercent:r,builderPropUID:l}=e,a=document.querySelectorAll(`.gem-slider-item-${l}.gp-gallery-image-item`),s=O(t),o=B(l);a.forEach(e=>{G({item:e,settingWidth:s,width:o,qualityType:i,qualityPercent:r})})},U=e=>{let{ftShape:t,qualityType:i,qualityPercent:r,builderPropUID:l}=e,a=document.querySelectorAll(`.gem-slider-item-${l}.gp-ft-image-item`),s=W(t),o=K(l);a.forEach(e=>{G({item:e,settingWidth:s,width:o,qualityType:i,qualityPercent:r})})},G=e=>{let{item:t,settingWidth:i,width:r,qualityType:l,qualityPercent:a}=e,s=H(),o=t.querySelector("img");if(o){let e=D({itemWidthParam:r,imageWidthSetting:i,qualityType:l,qualityPercent:a}),t=o.getAttribute("base-src");if(!t)return;let n=M(e,t),g=q(t,n,s);o.setAttribute("srcset",g)}},M=(e,t)=>"auto"===e?t:T(t,`${e}x`),q=(e,t,i)=>`${"mobile"===i&&e!==t?t:T(e,"768x")} 767w, ${"tablet"===i&&e!==t?t:T(e,"1024x")} 1023w, ${"desktop"===i&&e!==t?t:T(e,"1920x")} 1440w`,H=()=>window.innerWidth<768?"mobile":window.innerWidth>=768&&window.innerWidth<1025?"tablet":"desktop";export{_ as FALLBACK_IMAGE,$ as IMAGE_PLACEHOLDER,S as NEXT_IMAGE_CONFIG,m as composeAspectRatio,w as createBlurDataURL,E as getAdaptiveImageData,u as getAspectRatio,p as getAspectRatioNextImage,H as getCurrentDevice,C as getImageSrc,D as getImageWidthFollowByQuality,R as getNewBackupFileKey,f as getResponsiveObjectFit,x as getSettingTranslatedImageAndSeo,I as getSrcSet,U as handleSetSrcForFeatureProductImage,P as handleSetSrcForProductImageList,k as isCannotResizeImage,d as overwriteDefaultRadius,N as replaceBackupFileKeyFileContent,T as resizeImage,h as safeStringify,b as shimmer,A as toBase64};
12
+ </svg>`,w=e=>"undefined"==typeof window?Buffer.from(e).toString("base64"):window.btoa(e),$=(e,t)=>`data:image/svg+xml;base64,${w(A(e,t))}`,_="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=",S="https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",E={DEFAULT_SIZES:"100vw",DEFAULT_ALT:"Alt image",DEFAULT_SRC:"https://cdn.shopify.com/s/files/1/2005/9307/files/placeholder-1.png?v=1751355990",DEFAULT_WIDTH_PROPS:800,DEFAULT_HEIGHT_PROPS:533},x=e=>{let{srcSet:t,fallbackImg:i}=e;return{getDeviceSource:e=>{let{isLiquid:r}=e??{},l=R(t?.desktop,"desktop",!r)||i||S,a=R(t?.tablet,"tablet",!r)||R(t?.desktop,"tablet",!r)||i||S,s=R(t?.mobile,"mobile",!r)||R(t?.tablet,"mobile",!r)||R(t?.desktop,"mobile",!r)||i||S;return{srcTablet:a,srcMobile:s,srcDesktop:l}}}},I=({setting:e,uid:t,pageContext:i})=>{if(!e||!g)return{};let r=s(e);for(let e in r.srcSet){let l=r.srcSet[e];if(l&&l.src){let r=o({val:l.src,uid:t,settingId:g?.srcSet?.id?`${g.srcSet.id}_${e}_src`:"",pageContext:i??{}});l.src=String(r)}}let l=o({val:r.alt,uid:t,settingId:n({id:g?.alt?.id}),pageContext:i??{}});r.alt=String(l);let a=o({val:r.title,uid:t,settingId:n({id:g?.title?.id}),pageContext:i??{}});return r.title=String(a),r},k=(e,t,i)=>e?C(e,t):F(i),v=e=>c.test(e),y=e=>d.test(e),C=(e,t)=>{let i=T(e);return v(e)?"FILE_CONTENT"==t?`{{ '${i}' | file_url }} 768w, {{ '${i}' | file_url }} 1024w, {{ '${i}' | file_url }} 1440w`:`{{ '${e}' | asset_url }} 768w, {{ '${e}' | asset_url }} 1024w, {{ '${e}' | asset_url }} 1440w`:"FILE_CONTENT"==t?`{{ '${i}' | file_img_url: '768x' }} 768w, {{ '${i}' | file_img_url: '1024x' }} 1024w, {{ '${i}' | file_img_url: 'master' }} 1440w`:`{{ '${e}' | asset_img_url: '768x' }} 768w, {{ '${e}' | asset_img_url: '1024x' }} 1024w, {{ '${e}' | asset_img_url: 'master' }} 1440w`},F=e=>e,R=(e,t,r)=>{if(e?.metafieldDefinitionKey)return N(e?.metafieldDefinitionKey);let l=e?.backupFilePath??e?.src??"";if(r)l=e?.src||"";else{let t=e?.src??"";if(i(t))return t;if(e?.backupFileKey){let t=j(e.backupFileKey,e?.src??"");"THEME"!==e.storage&&e.storage?"FILE_CONTENT"===e.storage&&(l=`{{ "${T(t)}" | file_url }}`):l=`{{ "${t}" | asset_url }}`}}if(t&&l?.includes("cdn.shopify")&&!y(l))switch(t){case"tablet":l=l?.includes("?")?`${l}&width=1024`:`${l}?width=1024`;break;case"mobile":l=l?.includes("?")?`${l}&width=768`:`${l}?width=768`}return l},N=e=>`{{${e} | file_url}}`,T=e=>e.replace(/\.jpeg|\.jfif/g,".jpg"),j=(e,t)=>{let i=t?.match(/\/files\/([^\/]+\.(jpg|jpeg|gif|png|webp|svg))/)?.[1];return i&&i!=e?i:e};function L(e,t){let i=D({str:e,reg:/_(pico|icon|thumb|small|compact|medium|large|grande|original|1024x1024|2048x2048|master)+\./g,newString:"."});if(v(i))return i;let r=D({str:i,reg:/\.jpg|\.png|\.jpeg/g,newString:t,isAdd:!0});return r}let D=e=>{let t=e.str,i=e.str.match(e.reg)?.length;if(i){let r,l=1;for(;null!==(r=e.reg.exec(e.str));){if(l===i){let i=e.reg.lastIndex,l=i-r[0].length;e.isAdd&&(e.newString="_"+e.newString+r),t=t.slice(0,l)+e.newString+t.slice(i,t.length)}l++}}return t},W=(e,t)=>{let i=z(),r=t?.[i]||"auto";if("auto"===r||r.includes("%"))return e;let l=Number(r.replace("px",""));return l>e?e:Number(r.replace("px",""))},O=e=>{let{itemWidthParam:t,imageWidthSetting:i,qualityType:r,qualityPercent:l}=e,s=z(),o=W(t,i),n=a(r,s,"finest"),g=a(l,s,100);switch(n){case"finest":default:return"auto";case"high":return Math.round(1.5*o)||1;case"medium":return Math.round(o)||1;case"custom":return Math.round(o*(Number(g)/100))||1}},B=e=>{let t={desktop:"100%",tablet:"100%",mobile:"100%"};return l.forEach(i=>{let r=a(e,i)?.width||"100%";t[i]=r}),t},K=e=>{let t={desktop:"100%",tablet:"100%",mobile:"100%"};return l.forEach(i=>{let r=a(e,i)?.width||"100%";t[i]=r}),t},P=e=>{let t=document.querySelectorAll(`.gem-slider-item-${e}.gp-gallery-image-item`),i=0;return t.forEach(e=>{e.offsetWidth>i&&(i=e.offsetWidth)}),i},U=e=>{let t=document.querySelectorAll(`.gem-slider-item-${e}.gp-ft-image-item`),i=0;return t.forEach(e=>{e.offsetWidth>i&&(i=e.offsetWidth)}),i},G=e=>{let{shapeByLayout:t,qualityType:i,qualityPercent:r,builderPropUID:l}=e,a=document.querySelectorAll(`.gem-slider-item-${l}.gp-gallery-image-item`),s=K(t),o=P(l);a.forEach(e=>{q({item:e,settingWidth:s,width:o,qualityType:i,qualityPercent:r})})},M=e=>{let{ftShape:t,qualityType:i,qualityPercent:r,builderPropUID:l}=e,a=document.querySelectorAll(`.gem-slider-item-${l}.gp-ft-image-item`),s=B(t),o=U(l);a.forEach(e=>{q({item:e,settingWidth:s,width:o,qualityType:i,qualityPercent:r})})},q=e=>{let{item:t,settingWidth:i,width:r,qualityType:l,qualityPercent:a}=e,s=z(),o=t.querySelector("img");if(o){let e=O({itemWidthParam:r,imageWidthSetting:i,qualityType:l,qualityPercent:a}),t=o.getAttribute("base-src");if(!t)return;let n=H(e,t),g=Q(t,n,s);o.setAttribute("srcset",g)}},H=(e,t)=>"auto"===e?t:L(t,`${e}x`),Q=(e,t,i)=>`${"mobile"===i&&e!==t?t:L(e,"768x")} 767w, ${"tablet"===i&&e!==t?t:L(e,"1024x")} 1023w, ${"desktop"===i&&e!==t?t:L(e,"1920x")} 1440w`,z=()=>window.innerWidth<768?"mobile":window.innerWidth>=768&&window.innerWidth<1025?"tablet":"desktop";export{S as FALLBACK_IMAGE,_ as IMAGE_PLACEHOLDER,E as NEXT_IMAGE_CONFIG,f as composeAspectRatio,$ as createBlurDataURL,x as getAdaptiveImageData,m as getAspectRatio,h as getAspectRatioNextImage,z as getCurrentDevice,R as getImageSrc,O as getImageWidthFollowByQuality,j as getNewBackupFileKey,p as getResponsiveObjectFit,I as getSettingTranslatedImageAndSeo,k as getSrcSet,M as handleSetSrcForFeatureProductImage,G as handleSetSrcForProductImageList,v as isCannotResizeImage,y as isCannotResizeImageByQuery,u as overwriteDefaultRadius,T as replaceBackupFileKeyFileContent,L as resizeImage,b as safeStringify,A as shimmer,w as toBase64};
@@ -1 +1 @@
1
- import o from"next/dynamic";import m from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let r=o(()=>import("./components/ImageComparison.js"),{loading:m});var t={ImageComparison:r};export{t as default};
1
+ import o from"next/dynamic";import m from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../common/const.js";let r=o(()=>import("./components/ImageComparison.js"),{loading:m});var t={ImageComparison:r};export{t as default};
@@ -1 +1 @@
1
- import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let e=o(()=>import("./components/ImageDetection.js"),{loading:t});var m={ImageDetection:e};export{m as default};
1
+ import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../common/const.js";let m=o(()=>import("./components/ImageDetection.js"),{loading:t});var e={ImageDetection:m};export{e as default};
@@ -1 +1 @@
1
- import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let m=o(()=>import("./components/Input.js"),{loading:t});var r={Input:m};export{r as default};
1
+ import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../common/const.js";let m=o(()=>import("./components/Input.js"),{loading:t});var r={Input:m};export{r as default};
@@ -1 +1 @@
1
- import o from"next/dynamic";import m from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let t=o(()=>import("./components/Line.js"),{loading:m});var r={Line:t};export{r as default};
1
+ import o from"next/dynamic";import m from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../common/const.js";let t=o(()=>import("./components/Line.js"),{loading:m});var r={Line:t};export{r as default};
@@ -1 +1 @@
1
- import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let m=o(()=>import("./components/next-link/index.js"),{loading:t});var n={Link:m};export{n as default};
1
+ import o from"next/dynamic";import m from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../common/const.js";let t=o(()=>import("./components/next-link/index.js"),{loading:m});var n={Link:t};export{n as default};
@@ -1 +1 @@
1
- import o from"next/dynamic";import e from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let m=o(()=>import("./components/Marquee.js"),{loading:e}),t=o(()=>import("./components/MarqueeItem.js"),{loading:e});var r={Marquee:m,MarqueeItem:t};export{r as default};
1
+ import o from"next/dynamic";import m from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../common/const.js";let t=o(()=>import("./components/Marquee.js"),{loading:m}),e=o(()=>import("./components/MarqueeItem.js"),{loading:m});var r={Marquee:t,MarqueeItem:e};export{r as default};
@@ -1 +1 @@
1
- import o from"next/dynamic";import m from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let t=o(()=>import("./components/Menu.js"),{loading:m});var r={Menu:t};export{r as default};
1
+ import o from"next/dynamic";import m from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../common/const.js";let t=o(()=>import("./components/Menu.js"),{loading:m});var r={Menu:t};export{r as default};
@@ -1 +1 @@
1
- import o from"next/dynamic";import m from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let t=o(()=>import("./components/Modal.js"),{loading:m});var r={Modal:t};export{r as default};
1
+ import o from"next/dynamic";import m from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../common/const.js";let t=o(()=>import("./components/Modal.js"),{loading:m});var r={Modal:t};export{r as default};
@@ -1 +1 @@
1
- import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let m=o(()=>import("./components/Pagination.js"),{loading:t});var i={Pagination:m};export{i as default};
1
+ import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../common/const.js";let m=o(()=>import("./components/Pagination.js"),{loading:t});var n={Pagination:m};export{n as default};
@@ -1 +1 @@
1
- import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let e=o(()=>import("./components/AdvancedListPostPurchase.js"),{loading:t}),m=o(()=>import("./components/PostPurchaseAdvancedListItem.js"),{loading:t});var r={PostPurchaseAdvancedList:e,PostPurchaseAdvancedListItem:m};export{r as default};
1
+ import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../../common/const.js";let m=o(()=>import("./components/AdvancedListPostPurchase.js"),{loading:t}),s=o(()=>import("./components/PostPurchaseAdvancedListItem.js"),{loading:t});var e={PostPurchaseAdvancedList:m,PostPurchaseAdvancedListItem:s};export{e as default};
@@ -1 +1 @@
1
- import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let m=o(()=>import("./components/Button.js"),{loading:t});var r={PostPurchaseButton:m};export{r as default};
1
+ import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../../common/const.js";let m=o(()=>import("./components/Button.js"),{loading:t});var r={PostPurchaseButton:m};export{r as default};
@@ -1 +1 @@
1
- import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let r=o(()=>import("./components/BuyerConsent.js"),{loading:t});var e={PostPurchaseBuyerConsent:r};export{e as default};
1
+ import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../../common/const.js";let m=o(()=>import("./components/BuyerConsent.js"),{loading:t});var r={PostPurchaseBuyerConsent:m};export{r as default};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as o}from"react/jsx-runtime";import{createClass as m,createStyle as r}from"@gem-sdk/system";import"react";import"@gem-sdk/core";import t from"../../../grid/components/row/Row.js";import{getCalloutBoxWrapperClasses as e}from"../common/classes.js";import{getCalloutBoxContainerStyles as s}from"../common/styles.js";let i=i=>{let{styles:l}=i,c=m(e(l)),p=r(s(l));return o("div",{className:c,style:p,children:o(t,{...i})})};export{i as default};
2
+ import{jsx as o}from"react/jsx-runtime";import{createClass as m,createStyle as r}from"@gem-sdk/system";import"react";import"@gem-sdk/core";import"../../../common/const.js";import t from"../../../grid/components/row/Row.js";import{getCalloutBoxWrapperClasses as s}from"../common/classes.js";import{getCalloutBoxContainerStyles as e}from"../common/styles.js";let i=i=>{let{styles:c}=i,l=m(s(c)),p=r(e(c));return o("div",{className:l,style:p,children:o(t,{...i})})};export{i as default};
@@ -1 +1 @@
1
- import"react/jsx-runtime";import"@gem-sdk/system";import"react";import"@gem-sdk/core";import"next/head";import"next/image";import"next/link";import"react-youtube";import"./common/styles.js";import t from"./settings/CalloutBox.js";import o from"./settings/CalloutText.js";let e={PostPurchaseCalloutBox:t,PostPurchaseCalloutText:o};export{e as postPurchaseCalloutBoxSetting};
1
+ import"react/jsx-runtime";import"@gem-sdk/system";import"react";import"@gem-sdk/core";import"../../common/const.js";import"next/head";import"next/image";import"next/link";import"react-youtube";import"./common/styles.js";import t from"./settings/CalloutBox.js";import o from"./settings/CalloutText.js";let e={PostPurchaseCalloutBox:t,PostPurchaseCalloutText:o};export{e as postPurchaseCalloutBoxSetting};
@@ -1 +1 @@
1
- import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let m=o(()=>import("./components/CalloutBox.js"),{loading:t}),r=o(()=>import("./components/CalloutText.js"),{loading:t});var e={PostPurchaseCalloutBox:m,PostPurchaseCalloutText:r};export{e as default};
1
+ import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../../common/const.js";let m=o(()=>import("./components/CalloutBox.js"),{loading:t}),r=o(()=>import("./components/CalloutText.js"),{loading:t});var n={PostPurchaseCalloutBox:m,PostPurchaseCalloutText:r};export{n as default};
@@ -1 +1 @@
1
- import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let r=o(()=>import("./components/PostPurchaseCountdownTimer.js"),{loading:t});var m={PostPurchaseCountdownTimer:r};export{m as default};
1
+ import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../../common/const.js";let m=o(()=>import("./components/PostPurchaseCountdownTimer.js"),{loading:t});var r={PostPurchaseCountdownTimer:m};export{r as default};
@@ -1 +1 @@
1
- import o from"next/dynamic";import m from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let t=o(()=>import("./components/Image.js"),{loading:m});var r={PostPurchaseImage:t};export{r as default};
1
+ import o from"next/dynamic";import m from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../../common/const.js";let t=o(()=>import("./components/Image.js"),{loading:m});var r={PostPurchaseImage:t};export{r as default};
@@ -1 +1 @@
1
- import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let r=o(()=>import("./components/PostPurchaseLine.js"),{loading:t});var e={PostPurchaseLine:r};export{e as default};
1
+ import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../../common/const.js";let m=o(()=>import("./components/PostPurchaseLine.js"),{loading:t});var r={PostPurchaseLine:m};export{r as default};
@@ -1 +1 @@
1
- import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let r=o(()=>import("./components/PostPurchaseLink.js"),{loading:t});var m={PostPurchaseLink:r};export{m as default};
1
+ import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../../common/const.js";let m=o(()=>import("./components/PostPurchaseLink.js"),{loading:t});var r={PostPurchaseLink:m};export{r as default};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as e}from"react/jsx-runtime";import t from"./ImageListCarousel.js";import{createStyle as o}from"@gem-sdk/system";import{useFeatureImagePostPurchase as r}from"../../hooks/useFeatureImagePostPurchase.js";import{useSlideCarousel as s}from"../../hooks/useSlideCarousel.js";import{getFeatureImageStyle as i}from"../../common/styles.js";let m=m=>{let{styles:a,setting:l,gallery:n}=m,u={...l,...a},{ftNavigation:c="none",ftSpacing:p="xtight",layoutType:d,ftAspectRatio:g,ftObjectFit:f,ftWidth:j}=u,{idxActive:h}=r({gallery:n}),{itemSlideList:v}=s({layoutType:d}),x=o(i({ftWidth:j}));return e("div",{style:x,children:e(t,{...m,productImages:n,aspectRatio:g,objectFit:f,spacing:p,navigation:c,vertical:!1,border:"none",itemPerSlide:v,idxActive:h})})};export{m as default};
2
+ import{jsx as e}from"react/jsx-runtime";import t from"./ImageListCarousel.js";import{createStyle as o}from"@gem-sdk/system";import{useFeatureImagePostPurchase as r}from"../../hooks/useFeatureImagePostPurchase.js";import{useSlideCarousel as s}from"../../hooks/useSlideCarousel.js";import{getFeatureImageStyle as i}from"../../common/styles.js";let m=m=>{let{styles:a,setting:u,gallery:l}=m,n={...u,...a},{ftNavigation:p="none",ftSpacing:c="xtight",layoutType:d,ftAspectRatio:g,ftObjectFit:f,ftWidth:j}=n,{idxActive:h}=r({gallery:l}),{itemSlideList:v}=s({layoutType:d}),x=o(i({ftWidth:j}));return e("div",{style:x,children:e(t,{...m,productImages:l,aspectRatio:g,objectFit:f,spacing:c,navigation:p,vertical:!1,border:"none",itemPerSlide:v,idxActive:h,type:"feature-image"})})};export{m as default};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as o}from"react/jsx-runtime";import{createClass as r}from"@gem-sdk/system";import{useNavigationCarouselPostPurchase as s}from"../../../hooks/useNavigationCarouselPostPurchase.js";import{getNavigationClass as e}from"../../../common/classes.js";let t=t=>{let{type:m,navigation:a,vertical:i,hidden:l=!1}=t,{imgSrc:n,handleClick:c,disabled:u}=s({type:m,vertical:i}),p=r(e());return"none"===a||l?null:o("button",{className:p,disabled:u,onClick:c,children:o("img",{src:n,alt:`gp-arrow-${m}`})})};export{t as ArrowPostPurchase};
2
+ import{jsx as o}from"react/jsx-runtime";import{createClass as r}from"@gem-sdk/system";import{useNavigationCarouselPostPurchase as s}from"../../../hooks/useNavigationCarouselPostPurchase.js";import{getNavigationClass as e}from"../../../common/classes.js";let t=t=>{let{type:m,navigation:a,vertical:i,hidden:l=!1,carouselType:n,productImages:c}=t,{imgSrc:u,handleClick:p,disabled:d}=s({type:m,vertical:i,productImages:c,carouselType:n}),f=r(e());return"none"===a||l?null:o("button",{className:f,disabled:d,onClick:p,children:o("img",{src:u,alt:`gp-arrow-${m}`})})};export{t as ArrowPostPurchase};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useEffect as r}from"react";import{postPurchaseSpacing as t}from"../../../../common/helper.js";import{createClass as m,createStyle as s}from"@gem-sdk/system";import{ArrowPostPurchase as i}from"./Arrow.js";import{CarouselPostPurchase as a}from"./CarouselPostPurchase.js";import{useCarousel as n}from"../../../hooks/useCarousel.js";import{getImageListClass as p}from"../../../common/classes.js";import{getImageListStyle as c}from"../../../common/styles.js";let l=({styles:l,setting:u,productImages:d,objectFit:f="cover",aspectRatio:h,itemPerSlide:j=1,spacing:v,navigation:g="none",vertical:y=!1,border:P="none",idxActive:x})=>{let b={...l,...u},{layoutType:C}=b||{},{setMoveToIdx:k,setMaxIdx:w}=n(),N=t[v||"none"]??"0px",R="one-col"===C,A=m(p()),F=s(c({gap:N,vertical:y}));return r(()=>{let e=d.length-Number(j||0);w(e)},[d.length,j,w]),r(()=>{(x||0===x)&&1===j&&k(x)},[x,j,k]),e("div",{className:A,style:F,children:[o(i,{type:"prev",navigation:g,vertical:y,hidden:R}),o(a,{productImages:d,itemPerRow:j,border:P,aspectRatio:h,objectFit:f,vertical:y}),o(i,{type:"next",navigation:g,vertical:y,hidden:R})]})};export{l as CarouselWrapperPostPurchase};
2
+ import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useEffect as r}from"react";import{postPurchaseSpacing as t}from"../../../../common/helper.js";import{createClass as m,createStyle as s}from"@gem-sdk/system";import{ArrowPostPurchase as a}from"./Arrow.js";import{CarouselPostPurchase as i}from"./CarouselPostPurchase.js";import{useCarousel as p}from"../../../hooks/useCarousel.js";import{getImageListClass as c}from"../../../common/classes.js";import{getImageListStyle as n}from"../../../common/styles.js";let l=({styles:l,setting:u,productImages:d,objectFit:f="cover",aspectRatio:g,itemPerSlide:h=1,spacing:j,navigation:v="none",vertical:y=!1,border:P="none",idxActive:x,type:b})=>{let C={...l,...u},{layoutType:I}=C||{},{setMoveToIdx:k,setMaxIdx:w}=p(),N=t[j||"none"]??"0px",R="one-col"===I,T=m(c()),A=s(n({gap:N,vertical:y}));return r(()=>{let e=d.length-Number(h||0);w(e)},[d.length,h,w]),r(()=>{(x||0===x)&&1===h&&k(x)},[x,h,k]),e("div",{className:T,style:A,children:[o(a,{type:"prev",productImages:d,navigation:v,carouselType:b,vertical:y,hidden:R}),o(i,{productImages:d,itemPerRow:h,border:P,aspectRatio:g,objectFit:f,vertical:y}),o(a,{type:"next",productImages:d,navigation:v,carouselType:b,vertical:y,hidden:R})]})};export{l as CarouselWrapperPostPurchase};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as e}from"react/jsx-runtime";import t from"../ImageListGrid.js";import i from"../ImageListCarousel.js";import{createClass as r}from"@gem-sdk/system";import{useProductImagePostPurchase as o}from"../../../hooks/useProductImagePostPurchase.js";import{getOnlyFeatureLayoutClass as m}from"../../../common/classes.js";let a=a=>{let{setting:s,styles:l,gallery:c}=a,p={...s,...l},{isImageListCarousel:d}=o({imageList:c,setting:s}),g=r(m());return e("div",{className:g,children:d?e(i,{...a,productImages:c,aspectRatio:p?.ilAspectRatio,objectFit:p.ilObjectFit,spacing:p.ilSpacing,navigation:p?.ilNavigation,vertical:p?.layoutType!=="bottom-center",border:p?.ilBorder,itemPerSlide:p?.ilItemPerSlide}):e(t,{...a,productImages:c})})};export{a as default};
2
+ import{jsx as e}from"react/jsx-runtime";import t from"../ImageListGrid.js";import i from"../ImageListCarousel.js";import{createClass as r}from"@gem-sdk/system";import{useProductImagePostPurchase as o}from"../../../hooks/useProductImagePostPurchase.js";import{getOnlyFeatureLayoutClass as m}from"../../../common/classes.js";let s=s=>{let{setting:a,styles:l,gallery:c}=s,p={...a,...l},{isImageListCarousel:g}=o({imageList:c,setting:a}),d=r(m());return e("div",{className:d,children:g?e(i,{...s,productImages:c,aspectRatio:p?.ilAspectRatio,objectFit:p.ilObjectFit,spacing:p.ilSpacing,navigation:p?.ilNavigation,vertical:p?.layoutType!=="bottom-center",border:p?.ilBorder,itemPerSlide:p?.ilItemPerSlide,type:"images-list"}):e(t,{...s,productImages:c})})};export{s as default};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as o,Fragment as t}from"react/jsx-runtime";import{createElement as e}from"react";import r from"../../../../../common/components/Loading.js";import"@gem-sdk/core";import{getProductOfferContainerClasses as m,getProductOfferWrapperClasses as s}from"../common/classes.js";import{createClass as a,createStyle as c}from"@gem-sdk/system";import{getWrapperStyles as d,getContainerStyles as i}from"../common/styles.js";import{useProductOfferData as l}from"../hooks/useProductOfferData.js";import{ProductOfferItem as n}from"./ProductOfferItem.js";let f=f=>{let{styles:p,builderAttrs:u,builderProps:h,setting:P}=f,{isLoading:j,productSortedById:y,totalProduct:g}=l(),k=a({...m(h?.uid)}),v=a({...s()}),x=c({...d(p)}),O=c({...i(P)});return o(t,{children:j?o(r,{}):y?.length?o("div",{...u,className:k,style:O,children:o("div",{className:v,style:x,children:y?.map((o,t)=>e(n,{...f,product:o,index:t,key:t,totalProduct:g}))})}):o("div",{children:"You haven't set up a product yet. Please go back to the sales funnel details to add a product."})})};export{f as default};
2
+ import{jsx as o,Fragment as t}from"react/jsx-runtime";import{createElement as e}from"react";import r from"../../../../../common/components/Loading.js";import"@gem-sdk/core";import"../../../../../common/const.js";import{getProductOfferContainerClasses as m,getProductOfferWrapperClasses as s}from"../common/classes.js";import{createClass as c,createStyle as a}from"@gem-sdk/system";import{getWrapperStyles as d,getContainerStyles as i}from"../common/styles.js";import{useProductOfferData as l}from"../hooks/useProductOfferData.js";import{ProductOfferItem as n}from"./ProductOfferItem.js";let p=p=>{let{styles:f,builderAttrs:u,builderProps:h,setting:j}=p,{isLoading:P,productSortedById:y,totalProduct:g}=l(),k=c({...m(h?.uid)}),v=c({...s()}),x=a({...d(f)}),O=a({...i(j)});return o(t,{children:P?o(r,{}):y?.length?o("div",{...u,className:k,style:O,children:o("div",{className:v,style:x,children:y?.map((o,t)=>e(n,{...p,product:o,index:t,key:t,totalProduct:g}))})}):o("div",{children:"You haven't set up a product yet. Please go back to the sales funnel details to add a product."})})};export{p as default};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as r}from"react/jsx-runtime";import{useRenderMode as e,isEmptyChildren as t,ProductProvider as o}from"@gem-sdk/core";import{useRef as i}from"react";import m from"../../../../../grid/components/row/Row.js";import s from"../../../../../grid/components/ChildrenDroppable.js";import{createAttr as n,createClass as d}from"@gem-sdk/system";import{getProductOfferAttrs as c}from"../common/attrs.js";import{getProductOfferItemClasses as l}from"../common/classes.js";import{ProductOfferSubscriptionPresenceProvider as a}from"../context/PrdOfferSubscriptionPresenceContext.js";let f=f=>{let{product:p,setting:u,builderProps:h,children:j,index:b,totalProduct:g,builderAttrs:y,styles:x}=f,{isEditMode:I}=e(),{variantSelected:O,productOfferLayout:k,layout:v,...P}=u??{};Object.keys(v||{}).forEach(r=>{k?.[r]==="2col"&&v?.[r]&&(v[r].display="fill")});let w=O?.[p?.baseID??""]?.variantId,C=n({...c(p,h?.uid)}),D=d({...l(b,u,g)}),R=i(null),A=r("div",{ref:R,...I&&C,children:r(m,{builderAttrs:y,setting:{...P,layout:v},styles:x,children:t(j)?r(s,{}):j})});return r("div",{className:D,children:r(o,{product:p,readOnly:!0,initialVariantId:w??"Latest",uid:h?.uid,children:r(a,{containerRef:R,children:A})})},`uid-${p?.id}`)};export{f as ProductOfferItem};
2
+ import{jsx as r}from"react/jsx-runtime";import{useRenderMode as t,isEmptyChildren as e,ProductProvider as o}from"@gem-sdk/core";import{useRef as i}from"react";import"../../../../../common/const.js";import m from"../../../../../grid/components/row/Row.js";import s from"../../../../../grid/components/ChildrenDroppable.js";import{createAttr as n,createClass as c}from"@gem-sdk/system";import{getProductOfferAttrs as d}from"../common/attrs.js";import{getProductOfferItemClasses as l}from"../common/classes.js";import{ProductOfferSubscriptionPresenceProvider as a}from"../context/PrdOfferSubscriptionPresenceContext.js";let f=f=>{let{product:p,setting:u,builderProps:j,children:h,index:b,totalProduct:g,builderAttrs:y,styles:x}=f,{isEditMode:I}=t(),{variantSelected:O,productOfferLayout:k,layout:v,...P}=u??{};Object.keys(v||{}).forEach(r=>{k?.[r]==="2col"&&v?.[r]&&(v[r].display="fill")});let w=O?.[p?.baseID??""]?.variantId,C=n({...d(p,j?.uid)}),D=c({...l(b,u,g)}),R=i(null),A=r("div",{ref:R,...I&&C,children:r(m,{builderAttrs:y,setting:{...P,layout:v},styles:x,children:e(h)?r(s,{}):h})});return r("div",{className:D,children:r(o,{product:p,readOnly:!0,initialVariantId:w??"Latest",uid:j?.uid,children:r(a,{containerRef:R,children:A})})},`uid-${p?.id}`)};export{f as ProductOfferItem};
@@ -1 +1 @@
1
- import{useMemo as e}from"react";import{BUTTON_URL_MAP_POST_PURCHASE as r}from"../constants/index.js";import{useCarousel as t}from"./useCarousel.js";let o=o=>{let{moveToIdx:a,maxIdx:i,setMoveToIdx:n}=t(),{type:s,vertical:l}=o,u="next"==s?a>=i:0===a,m=e(()=>r[s][l?"vertical":"horizontal"][u?"disabled":"enabled"],[s,l,u]);return{imgSrc:m,handleClick:()=>{if("next"===s){n(a+1);return}n(a-1)},disabled:u}};export{o as useNavigationCarouselPostPurchase};
1
+ import{useMemo as e}from"react";import{BUTTON_URL_MAP_POST_PURCHASE as t}from"../constants/index.js";import{useCarousel as r}from"./useCarousel.js";import{useProductStore as o}from"@gem-sdk/core";let a=a=>{let{moveToIdx:s,maxIdx:i,setMoveToIdx:l}=r(),m=o(e=>e.setProductFeaturedImage),{type:u,vertical:n}=a,c="next"==u?s>=i:0===s,d=e(()=>t[u][n?"vertical":"horizontal"][c?"disabled":"enabled"],[u,n,c]);return{imgSrc:d,handleClick:()=>{let e="next"===u?s+1:s-1;if(l(e),"feature-image"===a.carouselType){let t=a.productImages?.[e];t&&m(t)}},disabled:c}};export{a as useNavigationCarouselPostPurchase};
@@ -1 +1 @@
1
- import"react/jsx-runtime";import"@gem-sdk/core";import"@gem-sdk/system";import"react";import"./components/product-subscription/types.js";import"./constants/index.js";import"./components/product-variant/components/variants/VariantItem.js";import"next/link";import"next/head";import"next/image";import"react-youtube";import"./components/product-subscription/components/OneTimePurchaseTooltip.js";import"../image/components/Img.js";import t from"./settings/product-title/ProductTitle.js";import o from"./settings/product-description/ProductDescription.js";import r from"./settings/product-price/ProductPrice.js";import s from"./settings/product-variants/ProductVariant.js";import i from"./settings/accept-button/index.js";import e from"./settings/product-quantity/index.js";import c from"./settings/product-offer/index.js";import n from"./settings/product-price-breakdown/index.js";import p from"./settings/product-discount-tag/ProductDiscountTag.js";import u from"./settings/product-subscription/index.js";import m from"./settings/product-image/ProductImages.js";let P={PostPurchaseProductTitle:t,PostPurchaseProductDescription:o,PostPurchaseProductPrice:r,PostPurchaseProductVariants:s,PostPurchaseAcceptButton:i,PostPurchaseProductQuantity:e,PostPurchaseProductPriceBreakdown:n,PostPurchaseProductOffer:c,PostPurchaseProductDiscountTag:p,PostPurchaseProductImages:m,PostPurchaseProductSubscription:u};export{P as postPurchaseProductSetting};
1
+ import"react/jsx-runtime";import"@gem-sdk/core";import"@gem-sdk/system";import"react";import"./components/product-subscription/types.js";import"./constants/index.js";import"./components/product-variant/components/variants/VariantItem.js";import"next/link";import"../../common/const.js";import"next/head";import"next/image";import"react-youtube";import"./components/product-subscription/components/OneTimePurchaseTooltip.js";import"../image/components/Img.js";import t from"./settings/product-title/ProductTitle.js";import o from"./settings/product-description/ProductDescription.js";import r from"./settings/product-price/ProductPrice.js";import s from"./settings/product-variants/ProductVariant.js";import i from"./settings/accept-button/index.js";import e from"./settings/product-quantity/index.js";import c from"./settings/product-offer/index.js";import n from"./settings/product-price-breakdown/index.js";import p from"./settings/product-discount-tag/ProductDiscountTag.js";import u from"./settings/product-subscription/index.js";import m from"./settings/product-image/ProductImages.js";let P={PostPurchaseProductTitle:t,PostPurchaseProductDescription:o,PostPurchaseProductPrice:r,PostPurchaseProductVariants:s,PostPurchaseAcceptButton:i,PostPurchaseProductQuantity:e,PostPurchaseProductPriceBreakdown:n,PostPurchaseProductOffer:c,PostPurchaseProductDiscountTag:p,PostPurchaseProductImages:m,PostPurchaseProductSubscription:u};export{P as postPurchaseProductSetting};
@@ -1 +1 @@
1
- import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let n=o(()=>import("./components/ProductTitle.js"),{loading:t}),r=o(()=>import("./components/ProductDescription.js"),{ssr:!1,loading:t}),i=o(()=>import("./components/ProductPrice.js"),{loading:t}),c=o(()=>import("./components/product-variant/components/ProductVariant.js"),{loading:t}),p=o(()=>import("./components/AcceptButton.js"),{loading:t}),m=o(()=>import("./components/ProductQuantity.js"),{loading:t}),s=o(()=>import("./components/product-subscription/ProductSubscription.js"),{loading:t}),e=o(()=>import("./components/ProductPriceBreakdown.js"),{loading:t}),d=o(()=>import("./components/product-offer/components/ProductOffer.js"),{loading:t}),a=o(()=>import("./components/ProductDiscountTag.js"),{loading:t}),u=o(()=>import("./components/product-image/index.js"),{loading:t});var g={PostPurchaseProductTitle:n,PostPurchaseProductDescription:r,PostPurchaseProductPrice:i,PostPurchaseProductVariants:c,PostPurchaseAcceptButton:p,PostPurchaseProductQuantity:m,PostPurchaseProductPriceBreakdown:e,PostPurchaseProductOffer:d,PostPurchaseProductDiscountTag:a,PostPurchaseProductImages:u,PostPurchaseProductSubscription:s};export{g as default};
1
+ import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../../common/const.js";let n=o(()=>import("./components/ProductTitle.js"),{loading:t}),r=o(()=>import("./components/ProductDescription.js"),{ssr:!1,loading:t}),i=o(()=>import("./components/ProductPrice.js"),{loading:t}),c=o(()=>import("./components/product-variant/components/ProductVariant.js"),{loading:t}),m=o(()=>import("./components/AcceptButton.js"),{loading:t}),p=o(()=>import("./components/ProductQuantity.js"),{loading:t}),s=o(()=>import("./components/product-subscription/ProductSubscription.js"),{loading:t}),e=o(()=>import("./components/ProductPriceBreakdown.js"),{loading:t}),d=o(()=>import("./components/product-offer/components/ProductOffer.js"),{loading:t}),a=o(()=>import("./components/ProductDiscountTag.js"),{loading:t}),u=o(()=>import("./components/product-image/index.js"),{loading:t});var g={PostPurchaseProductTitle:n,PostPurchaseProductDescription:r,PostPurchaseProductPrice:i,PostPurchaseProductVariants:c,PostPurchaseAcceptButton:m,PostPurchaseProductQuantity:p,PostPurchaseProductPriceBreakdown:e,PostPurchaseProductOffer:d,PostPurchaseProductDiscountTag:a,PostPurchaseProductImages:u,PostPurchaseProductSubscription:s};export{g as default};
@@ -1 +1 @@
1
- import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let m=o(()=>import("./components/Text.js"),{loading:t}),e=o(()=>import("./components/Text.js"),{loading:t});var r={PostPurchaseText:m,PostPurchaseHeading:e};export{r as default};
1
+ import o from"next/dynamic";import t from"../../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../../common/const.js";let m=o(()=>import("./components/Text.js"),{loading:t}),r=o(()=>import("./components/Text.js"),{loading:t});var e={PostPurchaseText:m,PostPurchaseHeading:r};export{e as default};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsxs as e,jsx as s}from"react/jsx-runtime";import{useI18nStore as m,useProduct as o,useCurrentVariant as t,useMoneyFormat as r,useCurrentDevice as i,useProductBundleDiscount as l,useEditorMode as a,useRenderMode as c,usePageType as n,useSafeGetProductListSettings as d,filterToolbarPreview as p}from"@gem-sdk/core";import{getBadgeContent as h,getIsNoDiscountState as y}from"./utils/common.js";import"./constants.js";import f from"../../../common/components/NoDataState.js";import N from"../../../common/components/TooltipHover.js";import{createClass as j,createStyle as u,createAttr as g,If as v}from"@gem-sdk/system";import{getEditTooltipAttrs as T,getSubWrapperAttrs as k,getContainerAttrs as x,getTextContentAttrs as C,getImageAttr as H}from"./common/attrs.js";import{getContainerClasses as S,getWrapperClasses as b,getSubWrapperClass as w,getTextContainerClasses as A,getTextWrapperClasses as B,getTextContentClasses as D,getImageContainerClasses as I,getImageClasses as M}from"./common/classes.js";import{getContainerStyle as P,getSubWrapperStyle as q,getContentStyleInternal as z,getTextBadgeWrapperStyles as E,getTextContentStyle as F,getImageContainerStyles as G}from"./common/styles.js";let J=J=>{let{t:K}=m(),{setting:L,styles:O,children:Q,builderAttrs:R,...U}=J,V=o(),W=t(),{moneyFormat:X}=r(),Y=i(),{useProductCompareAtPrice:Z}=l(),$=U?.["bundle-item"],_=a(),{isEditMode:ee}=c(),es="STATIC"===n(),{settings:em}=d(),eo=em?.sameHeight,et=h({detail:V,currentVariant:W,bundleItem:$,useProductCompareAtPrice:Z},L?.displayContent,X),er=y({props:J,product:V,currentVariant:W,moneyFormat:X,useProductCompareAtPrice:Z}),ei=j({...S({mode:_,isInstant:es,product:V,currentVariant:W,props:J,isSameHeightInProductList:eo})}),el=u({...P(J)}),ea=g({...T(J,ee)}),ec=j({...b(J)}),en=j({...w(J,Y)}),ed=u({...q({props:J,product:V,currentVariant:W,isEditMode:ee})}),ep=g({...k(J,V)}),eh=z(J),ey=j({...A()}),ef=g({...x(J)}),eN=j({...B()}),ej=u({...E({setting:L,styles:O})}),eu=j({...D(O)}),eg=u({...F({setting:L,styles:O})}),ev=g({...C()}),eT=j({...I()}),ek=u({...G({setting:L,styles:O})}),ex=j({...M()}),eC=g({...H({setting:L})});return V?e("div",{...ef,style:el,className:ei,children:[v(ee&&er,s(N,{...ea,children:s(f,{...R,elementType:"secondary",description:K("No discount"),rawMode:!0})}),s("div",{className:ec,children:e("div",{...ep,className:en,style:ed,children:[s("style",{children:eh}),v(L?.shape!=="image",s("div",{className:ey,children:s("div",{className:eN,style:ej,children:s("pre",{...ev,className:eu,style:eg,children:et})})}),s("div",{className:eT,style:ek,children:s("img",{...eC,className:ex,alt:""})}))]})})),p(Q,!0)]}):null};export{J as default};
2
+ import{jsxs as e,jsx as s}from"react/jsx-runtime";import{useI18nStore as m,useProduct as o,useCurrentVariant as t,useMoneyFormat as r,useCurrentDevice as i,useProductBundleDiscount as l,useEditorMode as c,useRenderMode as a,usePageType as n,useSafeGetProductListSettings as d,filterToolbarPreview as p}from"@gem-sdk/core";import{getBadgeContent as h,getIsNoDiscountState as y}from"./utils/common.js";import"./constants.js";import f from"../../../common/components/NoDataState.js";import N from"../../../common/components/TooltipHover.js";import"../../../common/const.js";import{createClass as j,createStyle as u,createAttr as g,If as v}from"@gem-sdk/system";import{getEditTooltipAttrs as T,getSubWrapperAttrs as k,getContainerAttrs as x,getTextContentAttrs as C,getImageAttr as H}from"./common/attrs.js";import{getContainerClasses as S,getWrapperClasses as b,getSubWrapperClass as w,getTextContainerClasses as A,getTextWrapperClasses as B,getTextContentClasses as D,getImageContainerClasses as I,getImageClasses as M}from"./common/classes.js";import{getContainerStyle as P,getSubWrapperStyle as q,getContentStyleInternal as z,getTextBadgeWrapperStyles as E,getTextContentStyle as F,getImageContainerStyles as G}from"./common/styles.js";let J=J=>{let{t:K}=m(),{setting:L,styles:O,children:Q,builderAttrs:R,...U}=J,V=o(),W=t(),{moneyFormat:X}=r(),Y=i(),{useProductCompareAtPrice:Z}=l(),$=U?.["bundle-item"],_=c(),{isEditMode:ee}=a(),es="STATIC"===n(),{settings:em}=d(),eo=em?.sameHeight,et=h({detail:V,currentVariant:W,bundleItem:$,useProductCompareAtPrice:Z},L?.displayContent,X),er=y({props:J,product:V,currentVariant:W,moneyFormat:X,useProductCompareAtPrice:Z}),ei=j({...S({mode:_,isInstant:es,product:V,currentVariant:W,props:J,isSameHeightInProductList:eo})}),el=u({...P(J)}),ec=g({...T(J,ee)}),ea=j({...b(J)}),en=j({...w(J,Y)}),ed=u({...q({props:J,product:V,currentVariant:W,isEditMode:ee})}),ep=g({...k(J,V)}),eh=z(J),ey=j({...A()}),ef=g({...x(J)}),eN=j({...B()}),ej=u({...E({setting:L,styles:O})}),eu=j({...D(O)}),eg=u({...F({setting:L,styles:O})}),ev=g({...C()}),eT=j({...I()}),ek=u({...G({setting:L,styles:O})}),ex=j({...M()}),eC=g({...H({setting:L})});return V?e("div",{...ef,style:el,className:ei,children:[v(ee&&er,s(N,{...ec,children:s(f,{...R,elementType:"secondary",description:K("No discount"),rawMode:!0})}),s("div",{className:ea,children:e("div",{...ep,className:en,style:ed,children:[s("style",{children:eh}),v(L?.shape!=="image",s("div",{className:ey,children:s("div",{className:eN,style:ej,children:s("pre",{...ev,className:eu,style:eg,children:et})})}),s("div",{className:eT,style:ek,children:s("img",{...eC,className:ex,alt:""})}))]})})),p(Q,!0)]}):null};export{J as default};
@@ -1,14 +1,14 @@
1
- import{sanitizeLiquid as e,dataStringify as t,RenderIf as s,template as i,isLocalEnv as r,baseAssetURL as a}from"@gem-sdk/core";import{getDynamicSourceLocales as o,getSettingPreloadData as c}from"../../../helpers.js";import{generateBadgeContent as n}from"./utils/generateLiquidContent.js";import{renderBadgeInFirstTime as p}from"./utils/renderBadgeLiquid.js";import{createClass as d,createStyle as l,createAttr as u,createStateOrContext as m}from"@gem-sdk/system";import{IS_LIQUID as g}from"./constants.js";import{getContainerStyle as y,getSubWrapperStyle as $,getContentStyleInternal as v,getTextBadgeWrapperStyles as f,getTextContentStyle as j,getImageContainerStyles as P}from"./common/styles.js";import{getContainerClasses as S,getWrapperClasses as D,getSubWrapperClass as V,getTextContainerClasses as b,getTextWrapperClasses as h,getTextContentClasses as C,getImageContainerClasses as I,getImageClasses as L}from"./common/classes.js";import{getSubWrapperAttrs as T,getContainerAttrs as k,getTextContentAttrs as q,getImageAttr as A}from"./common/attrs.js";import{checkDiscountContentProductBadge as E}from"./utils/common.js";import{ProductBadge as K}from"../../settings/product-badge/configs/translate.js";let N=N=>{let{styles:_,setting:B,builderProps:O,pageContext:Q}=N,w=B?.shape!=="image",G=w&&B?.displayContent?.trim()==="",H=E(B?.displayContent),J=d({...S({isInstant:!1,props:N})}),x=l({...y(N,g)}),M=d({...D(N)}),R=d({...V(N)}),Y=l({...$({props:N})}),z=u({...T(N)}),F=v(N),U=d({...b()}),W=u({...k(N)}),X=d({...h()}),Z=l({...f({setting:B,styles:_})}),ee=d({...C(_)}),et=l({...j({setting:B,styles:_})}),es=u({...q()}),ei=d({...I()}),er=l({...P({setting:B,styles:_})}),ea=d({...L()}),eo=u({...A({setting:B})}),ec=m({minPrice:"{{ minPriceValue | replace: '\"', '\\\"' | escape }}",variantIDs:'{{ product.variants | map: "id" | json | escape }}',variantInventoryQuantities:'{{ product.variants | map: "inventory_quantity" | json | escape }}',amountDiscount:"{{amountDiscountValue | replace: '\"', '\\\"' | escape }}",percentDiscount:"{{percentDiscountValue}}",price:"{{price}}",displayTrigger:JSON.parse(JSON.stringify(B?.displayTrigger).replaceAll("'","&#039;")),uid:N.builderProps?.uid,productCreatedAt:'{{product.created_at | date: "%Y-%m-%d" }}',productTags:"{{ product.tags | join: \",\" | replace: '\"', '\\\"' | escape }}",isTextBadge:w,isSettingSameHeightProductList:"{{ isSettingSameHeightProductList }}"}),{displayContent:en}=B??{},ep=o({val:en?.trim(),uid:O?.uid,settingId:K?.displayContent?.id,isLiquid:!0,pageContext:Q});return i`
1
+ import{sanitizeLiquid as t,RenderIf as e,template as s,isLocalEnv as i,baseAssetURL as r}from"@gem-sdk/core";import{getDynamicSourceLocales as a,getSettingPreloadData as o}from"../../../helpers.js";import{generateBadgeContent as n}from"./utils/generateLiquidContent.js";import{renderBadgeInFirstTime as c}from"./utils/renderBadgeLiquid.js";import{createClass as d,createStyle as p,createAttr as l,createStateOrContext as m}from"@gem-sdk/system";import{IS_LIQUID as u}from"./constants.js";import{getContainerStyle as g,getSubWrapperStyle as y,getContentStyleInternal as $,getTextBadgeWrapperStyles as v,getTextContentStyle as f,getImageContainerStyles as j}from"./common/styles.js";import{getContainerClasses as P,getWrapperClasses as S,getSubWrapperClass as D,getTextContainerClasses as V,getTextWrapperClasses as b,getTextContentClasses as h,getImageContainerClasses as C,getImageClasses as E}from"./common/classes.js";import{getSubWrapperAttrs as I,getContainerAttrs as L,getTextContentAttrs as k,getImageAttr as q}from"./common/attrs.js";import{checkDiscountContentProductBadge as B}from"./utils/common.js";import{injectBadgeStateExtras as K}from"./utils/injectBadgeStateExtras.js";import{ProductBadge as T}from"../../settings/product-badge/configs/translate.js";let _=_=>{let{styles:A,setting:N,builderProps:Q,pageContext:w}=_,x=N?.shape!=="image",G=x&&N?.displayContent?.trim()==="",H=B(N?.displayContent),O=d({...P({isInstant:!1,props:_})}),J=p({...g(_,u)}),M=d({...S(_)}),R=d({...D(_)}),Y=p({...y({props:_})}),z=l({...I(_)}),F=$(_),U=d({...V()}),W=l({...L(_)}),X=d({...b()}),Z=p({...v({setting:N,styles:A})}),tt=d({...h(A)}),te=p({...f({setting:N,styles:A})}),ts=l({...k()}),ti=d({...C()}),tr=p({...j({setting:N,styles:A})}),ta=d({...E()}),to=l({...q({setting:N})}),tn=m({minPrice:"{{ minPriceValue | escape }}",variantIDs:"{{ product.variants | map: 'id' | json | escape }}",variantInventoryQuantities:"{{ product.variants | map: 'inventory_quantity' | json | escape }}",amountDiscount:"{{ amountDiscountValue | escape }}",percentDiscount:"{{percentDiscountValue}}",price:"{{price}}",displayTrigger:N?.displayTrigger??[],uid:_.builderProps?.uid,productCreatedAt:"{{ product.created_at | date: '%Y-%m-%d' }}",isTextBadge:x,isSettingSameHeightProductList:"{{ isSettingSameHeightProductList }}"}),tc=K(JSON.stringify(tn)),{displayContent:td}=N??{},tp=a({val:td?.trim(),uid:Q?.uid,settingId:T?.displayContent?.id,isLiquid:!0,pageContext:w});return s`
2
2
  {% if product %}
3
- ${n(ep,Q?.isPreviewing)}
4
- ${p(B?.displayTrigger,!G,H)}
3
+ ${n(tp,w?.isPreviewing)}
4
+ ${c(N?.displayTrigger,!G,H)}
5
5
  <gp-product-badge
6
6
  ${{...W}}
7
- class="${J} {{ className }}"
8
- style="${x}"
9
- data-display-content="${Q?.isPreviewing?ep:e(`{{${ep}}}`)}"
7
+ class="${O} {{ className }}"
8
+ style="${J}"
9
+ data-display-content="${w?.isPreviewing?tp:t(`{{${tp}}}`)}"
10
10
  >
11
- <script gp-data type="application/json">${t(ec)}</script>
11
+ <script gp-data type="application/json">${tc}</script>
12
12
  <div class="${M}">
13
13
  <div
14
14
  ${{...z}}
@@ -16,24 +16,24 @@ import{sanitizeLiquid as e,dataStringify as t,RenderIf as s,template as i,isLoca
16
16
  style="${Y}"
17
17
  >
18
18
  <style>${F}</style>
19
- ${s(w,i`
19
+ ${e(x,s`
20
20
  <div class="${U}">
21
21
  <div
22
22
  class="${X}"
23
23
  style="${Z}"
24
24
  >
25
25
  <pre
26
- ${{...es}}
27
- class="${ee}"
28
- style="${et}"
26
+ ${{...ts}}
27
+ class="${tt}"
28
+ style="${te}"
29
29
  >{{ content | replace: percentDiscountKey, percentDiscountValue | replace: amountDiscountKey, amountDiscountValue | replace: inventoryQuantityKey, inventoryQuantityValue | replace: minPriceKey, minPriceValue }}</pre>
30
30
  </div>
31
- </div>`,i`<div class="${ei}" style="${er}">
32
- <img ${{...eo}} class="${ea}" alt="" />
31
+ </div>`,s`<div class="${ti}" style="${tr}">
32
+ <img ${{...to}} class="${ta}" alt="" />
33
33
  </div>`)}
34
34
  </div>
35
35
  </div>
36
36
  </gp-product-badge>
37
- ${s(r,`<script ${c('class="gps-link" delay',"src")}="{{ 'gp-product-badge-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${c('class="gps-link" delay',"src")}="${a}/assets-v2/gp-product-badge-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
37
+ ${e(i,`<script ${o('class="gps-link" delay',"src")}="{{ 'gp-product-badge-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${o('class="gps-link" delay',"src")}="${r}/assets-v2/gp-product-badge-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
38
38
  {% endif %}
39
- `};export{N as default};
39
+ `};export{_ as default};
@@ -0,0 +1 @@
1
+ let t=t=>{let e=t.slice(0,-1);return`${e},"productTags":{{ product.tags | json }}}`};export{t as injectBadgeStateExtras};
@@ -133,7 +133,7 @@ import{CompareType as e}from"../types.js";let i=i=>i===e.ABOVE?0:i===e.BELOW?2:1
133
133
  {% assign conditionTriggers = conditionTriggers | append: "," | append: false %}
134
134
  {% endif %}
135
135
 
136
- `},c=e=>{let{searchTag:i}=e,n=i.map(e=>e.replaceAll("'","&#039;")).join(", ");return`
136
+ `},c=e=>{let{searchTag:i}=e,n=i.map(e=>e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll("'","&#39;").replaceAll('"',"&quot;")).join(", ");return`
137
137
  {% assign productTags = product.tags | escape %}
138
138
  {% assign searchTag = '${n}' %}
139
139
  {% for tag in productTags %}
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useI18nStore as s,makeStyleResponsive as o}from"@gem-sdk/core";import i from"../../../common/components/NoDataState.js";import l from"../../../common/components/TooltipHover.js";import r from"../../../text/components/Text.js";import{createStyle as d,createClass as m,If as n}from"@gem-sdk/system";import{getWrapperTextStyle as a,getContainerStyle as p}from"./common/styles.js";import{getWrapperTextClass as c,getContainerClass as u,getRootClass as x}from"./common/classes.js";import{useGpDiscountTag as f}from"./hooks/useGpDiscountTag.js";let g=({setting:g,styles:y,builderProps:h,...b})=>{let{customContent:j}=g??{},N=b["bundle-item"],{textAlign:v}=y??{},{t:T}=s(),{mode:k,product:w,salePrice:A,priceSave:D,currentProductId:F,unitCustomDisplay:S,shouldPlaceholderNoDiscount:$}=f({setting:g,styles:y,builderProps:h,...b});if($)return e(l,{enable:!0,text:T("Not be displayed when published"),position:"bottom",width:"205px",children:e(i,{builderAttrs:h?.builderData,elementType:"secondary",description:T("No discount"),rawMode:!0,customClass:"!gp-p-[5px]"})});let q=d(a(y)),C=d(p(y)),I=m(c(y)),E=m(u()),G=m(x({mode:k,salePrice:A,priceSave:D,bundleItem:N}));return e("div",{className:G,style:{...o("ta",v)},id:`shopify-text-element-${h?.uid}`,"data-id":h?.uid,"data-product-id":F,"gp-data-hidden":"false",children:n(!w," ",e("div",{className:E,style:C,children:e("div",{className:I,style:q,children:t("div",{className:"gp-flex gp-break-all",children:[e(r,{styles:y,setting:{...g,text:j?.prefix?.replaceAll(" ","&nbsp;"),options:{useState:!0,uniqueId:`${h?.uid}-prefix`},excludeFlex:!0}}),e(r,{styles:y,setting:{...g,text:S,options:{isCannotEditing:!0},excludeFlex:!0}}),e(r,{styles:y,setting:{...g,text:j?.suffix?.replaceAll(" ","&nbsp;"),excludeFlex:!0,options:{useState:!0,uniqueId:`${h?.uid}-suffix`}}})]})})}))})};export{g as default};
2
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useI18nStore as s,makeStyleResponsive as o}from"@gem-sdk/core";import i from"../../../common/components/NoDataState.js";import l from"../../../common/components/TooltipHover.js";import"../../../common/const.js";import r from"../../../text/components/Text.js";import{createStyle as m,createClass as n,If as d}from"@gem-sdk/system";import{getWrapperTextStyle as a,getContainerStyle as p}from"./common/styles.js";import{getWrapperTextClass as c,getContainerClass as u,getRootClass as x}from"./common/classes.js";import{useGpDiscountTag as f}from"./hooks/useGpDiscountTag.js";let g=({setting:g,styles:y,builderProps:h,...b})=>{let{customContent:j}=g??{},N=b["bundle-item"],{textAlign:v}=y??{},{t:T}=s(),{mode:k,product:w,salePrice:A,priceSave:D,currentProductId:F,unitCustomDisplay:S,shouldPlaceholderNoDiscount:$}=f({setting:g,styles:y,builderProps:h,...b});if($)return e(l,{enable:!0,text:T("Not be displayed when published"),position:"bottom",width:"205px",children:e(i,{builderAttrs:h?.builderData,elementType:"secondary",description:T("No discount"),rawMode:!0,customClass:"!gp-p-[5px]"})});let q=m(a(y)),C=m(p(y)),I=n(c(y)),E=n(u()),G=n(x({mode:k,salePrice:A,priceSave:D,bundleItem:N}));return e("div",{className:G,style:{...o("ta",v)},id:`shopify-text-element-${h?.uid}`,"data-id":h?.uid,"data-product-id":F,"gp-data-hidden":"false",children:d(!w," ",e("div",{className:E,style:C,children:e("div",{className:I,style:q,children:t("div",{className:"gp-flex gp-break-all",children:[e(r,{styles:y,setting:{...g,text:j?.prefix?.replaceAll(" ","&nbsp;"),options:{useState:!0,uniqueId:`${h?.uid}-prefix`},excludeFlex:!0}}),e(r,{styles:y,setting:{...g,text:S,options:{isCannotEditing:!0},excludeFlex:!0}}),e(r,{styles:y,setting:{...g,text:j?.suffix?.replaceAll(" ","&nbsp;"),excludeFlex:!0,options:{useState:!0,uniqueId:`${h?.uid}-suffix`}}})]})})}))})};export{g as default};
@@ -1,18 +1,18 @@
1
- import{isLocalEnv as e,baseAssetURL as o,template as r,WrapRenderChildren as t,RenderChildren as s}from"@gem-sdk/core";import{getConditionRenderGalleryImages as i,getStyleInsideLayout as a,setDefaultWhenUndefineSetting as p}from"./common/common.js";import l from"./components/feature-gallery/FeatureImageWithGallery.liquid.js";import d from"./components/gallery-carousel/GalleryCarousel.liquid.js";import m from"./components/gallery-grid/GalleryGrid.liquid.js";import{filterPageContext as c,getSettingPreloadData as u}from"../../../helpers.js";import{getShapeByLayout as n,sizeSettingDefaultForNewLayout as g}from"./common/productGallery.js";import{getProductImagesClassName as f}from"./composables/getProductImagesClassName.js";import{getProductImagesStyles as y}from"./composables/getProductImagesStyles.js";import{createAttr as $,LiquidIf as h,createClass as v,If as j,Liquid as S}from"@gem-sdk/system";import{getBorderActiveCss as F}from"./common/getBorderActiveCss.js";import{getStyleOfObject as I}from"../../helpers/function.js";let C=C=>{let P=p(C),{setting:G,styles:D,builderProps:b,style:z}=P,{rawChildren:O,pageContext:_}=C,N={...G,...D},A=`
1
+ import{isLocalEnv as e,baseAssetURL as o,template as i,WrapRenderChildren as t,RenderChildren as r}from"@gem-sdk/core";import{getConditionRenderGalleryImages as s,getStyleInsideLayout as a,setDefaultWhenUndefineSetting as l}from"./common/common.js";import p from"./components/feature-gallery/FeatureImageWithGallery.liquid.js";import d from"./components/gallery-carousel/GalleryCarousel.liquid.js";import m from"./components/gallery-grid/GalleryGrid.liquid.js";import{filterPageContext as n,getSettingPreloadData as c}from"../../../helpers.js";import{getShapeByLayout as u,sizeSettingDefaultForNewLayout as g}from"./common/productGallery.js";import{getProductImagesClassName as f}from"./composables/getProductImagesClassName.js";import{getProductImagesStyles as y}from"./composables/getProductImagesStyles.js";import{createAttr as $,LiquidIf as h,createClass as j,If as v,Liquid as S}from"@gem-sdk/system";import{getBorderActiveCss as F}from"./common/getBorderActiveCss.js";import{getStyleOfObject as I}from"../../helpers/function.js";let C=C=>{let P=l(C),{setting:G,styles:D,builderProps:b,style:z}=P,{rawChildren:O,pageContext:_}=C,N={...G,...D},A=`
2
2
  {
3
3
  "id":${JSON.stringify(b?.uid)},
4
- "pageContext": ${JSON.stringify(c(_))},
4
+ "pageContext": ${JSON.stringify(n(_))},
5
5
  "setting":${JSON.stringify(G)},
6
6
  "styles":${JSON.stringify(D)},
7
7
  "productUrl":{{product.url | json }},
8
- "product":{{ product | json }},
8
+ "product":{% if product %}{"id":{{ product.id | json }},"handle":{{ product.handle | json }},"media":{{ product.media | json }}}{% else %}null{% endif %},
9
9
  "collectionUrl": {{ collection.url | json }},
10
- "collection": {{ collection | json }}
10
+ "collection": {% if collection %}{"handle":{{ collection.handle | json }}}{% else %}null{% endif %}
11
11
  }
12
- `,B=$({"section-id":"{{section.id}}","data-id":`${b?.uid}`}),{isOnlyFeatureAllDevices:U,isRenderGalleryGrid:k}=i(N?.position,G?.type),q=k?{}:$({"data-only-image":h("product.media.size > 1","false","true")}),{wrapperClasses:E,productImagesGalleryClasses:J}=f(C),w=v({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),T=v({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:x,wrapContainerStyleOnlyOneImage:L,galleryImageStyle:M}=y(N),R=n({shape:N.shape,shapeForBottom:N.shapeForBottom,shapeFor1Col:N.shapeFor1Col,shapeFor2Col:N.shapeFor2Col,shapeForFtOnly:N.shapeForFtOnly,shapeForInsideBottom:N.shapeForInsideBottom??g,shapeForInside:N.shapeForInside??g},N.position),V=a(N.position,R,N?.spacing),W=()=>r`
13
- ${t({uid:b?.uid||"",customProps:O?.[0].customProps},O?.map(e=>{if(e)return r`${s({...e,isInsideProductImage:!0,imageData:{imageShape:D?.ftShape,imageAlign:D?.align,imageLayout:D?.position},dotData:{dotSize:G?.ftDotSize,dotGapToCarousel:G?.ftDotGapToCarousel,dotStyle:G?.ftDotStyle}})}`}))}
14
- `;return r`
15
- ${j(G?.borderActive?.border!=="none",h("product.media.size > 1",`<style>${F({settings:N,uid:b?.uid,type:"Liquid"})}</style>`),"")}
12
+ `,B=$({"section-id":"{{section.id}}","data-id":`${b?.uid}`}),{isOnlyFeatureAllDevices:U,isRenderGalleryGrid:k}=s(N?.position,G?.type),q=k?{}:$({"data-only-image":h("product.media.size > 1","false","true")}),{wrapperClasses:E,productImagesGalleryClasses:J}=f(C),w=j({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),T=j({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:x,wrapContainerStyleOnlyOneImage:L,galleryImageStyle:M}=y(N),R=u({shape:N.shape,shapeForBottom:N.shapeForBottom,shapeFor1Col:N.shapeFor1Col,shapeFor2Col:N.shapeFor2Col,shapeForFtOnly:N.shapeForFtOnly,shapeForInsideBottom:N.shapeForInsideBottom??g,shapeForInside:N.shapeForInside??g},N.position),V=a(N.position,R,N?.spacing),W=()=>i`
13
+ ${t({uid:b?.uid||"",customProps:O?.[0].customProps},O?.map(e=>{if(e)return i`${r({...e,isInsideProductImage:!0,imageData:{imageShape:D?.ftShape,imageAlign:D?.align,imageLayout:D?.position},dotData:{dotSize:G?.ftDotSize,dotGapToCarousel:G?.ftDotGapToCarousel,dotStyle:G?.ftDotStyle}})}`}))}
14
+ `;return i`
15
+ ${v(G?.borderActive?.border!=="none",h("product.media.size > 1",`<style>${F({settings:N,uid:b?.uid,type:"Liquid"})}</style>`),"")}
16
16
  ${S(`
17
17
  {% assign featured_image = product.featured_image %}
18
18
  ${h("variant != null and variant.featured_image != null","{% assign featured_image = variant.featured_image %}")}
@@ -27,18 +27,18 @@ import{isLocalEnv as e,baseAssetURL as o,template as r,WrapRenderChildren as t,R
27
27
  class="${h("product.media.size > 1",`${w}`,`${T}`)}"
28
28
  style="${h("product.media.size > 1",I(x),I(L))}"
29
29
  >
30
- ${l({builderPropUID:`gp-carousel-${b?.uid}`,...N,children:W(),pageContext:_})}
31
- ${j(!U,r`
30
+ ${p({builderPropUID:`gp-carousel-${b?.uid}`,...N,children:W(),pageContext:_})}
31
+ ${v(!U,i`
32
32
  <div
33
33
  class="${J}"
34
34
  style="${I(M)}"
35
35
  ${{...q}}
36
36
  >
37
37
  ${h("product.media.size > 1",d({builderPropUID:`gp-gallery-${b?.uid}`,...N,pageContext:_}))}
38
- ${j(k,m({builderPropUID:b?.uid,wrapperStyle:{...V},children:W(),...N,pageContext:_}))}
38
+ ${v(k,m({builderPropUID:b?.uid,wrapperStyle:{...V},children:W(),...N,pageContext:_}))}
39
39
  </div>
40
40
  `)}
41
41
  </div>
42
42
  </gp-product-images-v3>
43
- ${j(e,`<script ${u('class="gps-link" delay',"src")}="{{ 'gp-product-images-v3-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${u('class="gps-link" delay',"src")}="${o}/assets-v2/gp-product-images-v3-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
43
+ ${v(e,`<script ${c('class="gps-link" delay',"src")}="{{ 'gp-product-images-v3-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${c('class="gps-link" delay',"src")}="${o}/assets-v2/gp-product-images-v3-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
44
44
  `};export{C as default};
@@ -1,19 +1,19 @@
1
- import{isLocalEnv as e,baseAssetURL as o,template as r,WrapRenderChildren as s,RenderChildren as t}from"@gem-sdk/core";import{getConditionRenderGalleryImages as i,getStyleInsideLayout as a,setDefaultWhenUndefineSetting as p}from"./common/common.js";import l from"./components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js";import d from"./components/gallery-carousel/GalleryCarouselEmbla.liquid.js";import m from"./components/gallery-grid/GalleryGrid.liquid.js";import{filterPageContext as c,getSettingPreloadData as u}from"../../../helpers.js";import{getShapeByLayout as n,sizeSettingDefaultForNewLayout as g}from"./common/productGallery.js";import{getProductImagesClassName as f}from"./composables/getProductImagesClassName.js";import{getProductImagesStyles as $}from"./composables/getProductImagesStyles.js";import{createAttr as y,LiquidIf as h,createClass as v,If as S,Liquid as j}from"@gem-sdk/system";import{getBorderActiveCss as F}from"./common/getBorderActiveCss.js";import{getStyleOfObject as I}from"../../helpers/function.js";let C=C=>{let P=p(C),{setting:b,styles:G,builderProps:D,style:z}=P,{rawChildren:O,pageContext:_}=C,E={...b,...G},N=`
1
+ import{isLocalEnv as e,baseAssetURL as o,template as s,WrapRenderChildren as r,RenderChildren as i}from"@gem-sdk/core";import{getConditionRenderGalleryImages as t,getStyleInsideLayout as a,setDefaultWhenUndefineSetting as l}from"./common/common.js";import p from"./components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js";import d from"./components/gallery-carousel/GalleryCarouselEmbla.liquid.js";import m from"./components/gallery-grid/GalleryGrid.liquid.js";import{filterPageContext as c,getSettingPreloadData as n}from"../../../helpers.js";import{getShapeByLayout as u,sizeSettingDefaultForNewLayout as g}from"./common/productGallery.js";import{getProductImagesClassName as f}from"./composables/getProductImagesClassName.js";import{getProductImagesStyles as $}from"./composables/getProductImagesStyles.js";import{createAttr as y,LiquidIf as h,createClass as v,If as j,Liquid as S}from"@gem-sdk/system";import{getBorderActiveCss as F}from"./common/getBorderActiveCss.js";import{getStyleOfObject as I}from"../../helpers/function.js";let C=C=>{let P=l(C),{setting:b,styles:G,builderProps:D,style:z}=P,{rawChildren:O,pageContext:_}=C,E={...b,...G},N=`
2
2
  {
3
3
  "id":${JSON.stringify(D?.uid)},
4
4
  "pageContext": ${JSON.stringify(c(_))},
5
5
  "setting":${JSON.stringify(b)},
6
6
  "styles":${JSON.stringify(G)},
7
7
  "productUrl":{{product.url | json | escape}},
8
- "product":{{product | json | escape}},
8
+ "product":{% if product %}{"id":{{ product.id | json | escape }},"handle":{{ product.handle | json | escape }},"media":{{ product.media | json | escape }}}{% else %}null{% endif %},
9
9
  "collectionUrl": {{ collection.url | json | escape }},
10
- "collection": {{ collection | json | escape}}
10
+ "collection": {% if collection %}{"handle":{{ collection.handle | json | escape }}}{% else %}null{% endif %}
11
11
  }
12
- `,A=y({"section-id":"{{section.id}}","data-id":`${D?.uid}`}),{isOnlyFeatureAllDevices:B,isRenderGalleryGrid:U}=i(E?.position,b?.type),k=U?{}:y({"data-only-image":h("product.media.size > 1","false","true")}),{wrapperClasses:q,productImagesGalleryClasses:J}=f(C),w=v({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),T=v({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:x,wrapContainerStyleOnlyOneImage:L,galleryImageStyle:M}=$(E),R=n({shape:E.shape,shapeForBottom:E.shapeForBottom,shapeFor1Col:E.shapeFor1Col,shapeFor2Col:E.shapeFor2Col,shapeForFtOnly:E.shapeForFtOnly,shapeForInsideBottom:E.shapeForInsideBottom??g,shapeForInside:E.shapeForInside??g},E.position),V=a(E.position,R,E?.spacing),W=()=>r`
13
- ${s({uid:D?.uid||"",customProps:O?.[0].customProps},O?.map(e=>{if(e)return r`${t({...e,isInsideProductImage:!0,imageData:{imageShape:G?.ftShape,imageAlign:G?.align,imageLayout:G?.position},dotData:{dotSize:b?.ftDotSize,dotGapToCarousel:b?.ftDotGapToCarousel,dotStyle:b?.ftDotStyle}})}`}))}
14
- `;return r`
15
- ${S(b?.borderActive?.border!=="none",h("product.media.size > 1",`<style>${F({settings:E,uid:D?.uid,type:"Liquid"})}</style>`),"")}
16
- ${j(`
12
+ `,A=y({"section-id":"{{section.id}}","data-id":`${D?.uid}`}),{isOnlyFeatureAllDevices:B,isRenderGalleryGrid:U}=t(E?.position,b?.type),k=U?{}:y({"data-only-image":h("product.media.size > 1","false","true")}),{wrapperClasses:q,productImagesGalleryClasses:J}=f(C),w=v({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),T=v({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:x,wrapContainerStyleOnlyOneImage:L,galleryImageStyle:M}=$(E),R=u({shape:E.shape,shapeForBottom:E.shapeForBottom,shapeFor1Col:E.shapeFor1Col,shapeFor2Col:E.shapeFor2Col,shapeForFtOnly:E.shapeForFtOnly,shapeForInsideBottom:E.shapeForInsideBottom??g,shapeForInside:E.shapeForInside??g},E.position),V=a(E.position,R,E?.spacing),W=()=>s`
13
+ ${r({uid:D?.uid||"",customProps:O?.[0].customProps},O?.map(e=>{if(e)return s`${i({...e,isInsideProductImage:!0,imageData:{imageShape:G?.ftShape,imageAlign:G?.align,imageLayout:G?.position},dotData:{dotSize:b?.ftDotSize,dotGapToCarousel:b?.ftDotGapToCarousel,dotStyle:b?.ftDotStyle}})}`}))}
14
+ `;return s`
15
+ ${j(b?.borderActive?.border!=="none",h("product.media.size > 1",`<style>${F({settings:E,uid:D?.uid,type:"Liquid"})}</style>`),"")}
16
+ ${S(`
17
17
  {% assign featured_image = product.featured_image %}
18
18
  ${h("variant != null and variant.featured_image != null","{% assign featured_image = variant.featured_image %}")}
19
19
  `)}
@@ -27,18 +27,18 @@ import{isLocalEnv as e,baseAssetURL as o,template as r,WrapRenderChildren as s,R
27
27
  class="${h("product.media.size > 1",`${w}`,`${T}`)}"
28
28
  style="${h("product.media.size > 1",I(x),I(L))}"
29
29
  >
30
- ${l({builderPropUID:`gp-carousel-${D?.uid}`,...E,children:W(),pageContext:_})}
31
- ${S(!B,r`
30
+ ${p({builderPropUID:`gp-carousel-${D?.uid}`,...E,children:W(),pageContext:_})}
31
+ ${j(!B,s`
32
32
  <div
33
33
  class="${J}"
34
34
  style="${I(M)}"
35
35
  ${{...k}}
36
36
  >
37
37
  ${h("product.media.size > 1",d({builderPropUID:`gp-gallery-${D?.uid}`,...E,pageContext:_}))}
38
- ${S(U,m({builderPropUID:D?.uid,wrapperStyle:{...V},children:W(),...E,pageContext:_}))}
38
+ ${j(U,m({builderPropUID:D?.uid,wrapperStyle:{...V},children:W(),...E,pageContext:_}))}
39
39
  </div>
40
40
  `)}
41
41
  </div>
42
42
  </gp-product-images-v3>
43
- ${S(e,`<script ${u('class="gps-link" delay',"src")}="{{ 'gp-product-images-v3-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${u('class="gps-link" delay',"src")}="${o}/assets-v2/gp-product-images-v3-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
43
+ ${j(e,`<script ${n('class="gps-link" delay',"src")}="{{ 'gp-product-images-v3-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${n('class="gps-link" delay',"src")}="${o}/assets-v2/gp-product-images-v3-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
44
44
  `};export{C as default};
@@ -1 +1 @@
1
- import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import o from"next/dynamic";import d from"../../../common/components/Loading.js";import{useState as a,useMemo as l,useEffect as i}from"react";import{useRenderMode as c,useCurrentDevice as s,usePageType as n,usePageStore as u,useFetchHandle as m,hasPublicStoreFrontData as g,createStoreFrontFetcher as h,useProductQuery as p,useProductsQueryAll as f,useProductsQuery as P,PICKED_PRODUCT_STATUSES as b,useCollectionQuery as k,flattenConnection as I,ProductListProvider as T,filterToolbarPreview as v}from"@gem-sdk/core";import y from"../SalePageProductListWarning.js";import O from"next/head";import w from"./ProductListGridLayout.js";import S from"./ProductListCarouselLayout.js";import{getStyle as C}from"./common/styles.js";import{If as E}from"@gem-sdk/system";import{getClass as N}from"./common/classes.js";import{getData as L}from"./common/helpers.js";import{getPropertyByDevice as W}from"../../../dialog/common/helpers.js";let j=o(()=>import("../ProductNotFound.js"),{loading:d}),x=o=>{let{children:x,styles:G,builderProps:M,setting:B,builderAttrs:A}=o,{isRelatedProduct:H,productSetting:Q}=L(o),z=Q.relatedTag&&Q.relatedTag[0],{isEditMode:D,isPreviewSharePageMode:F}=c(),R=s(),$=n(),_=u(e=>e.dynamicProduct),V=u(e=>e.dynamicCollection),[q,U]=a(1),[J,K]=a(!0),[X,Y]=a(),[Z,ee]=a(!1),et="GP_FUNNEL_PAGE"===$;"GP_COLLECTION"==$&&(Q.productSrc="DynamicCollection",Q.collectionId=V?.collectionId??"latest");let er=Q?.productSrc??"Collection",eo=_?.productId&&_?.productId!==Q.relatedProductId?_?.productId:Q.relatedProductId,ed=m(),ea=u(e=>e.publicStoreFrontData),el=l(()=>g(ea)?h(ea):ed,[ea]),{data:ei}=p(H&&eo?eo:void 0,{revalidateOnMount:D||F},el),ec=Q.relatedTag&&"tags"===Q.relatedTag[0]&&(!ei?.tags||ei?.tags.length===0),es=Q.relatedTag&&"collection"===Q.relatedTag[0]&&(!ei?.collections?.edges||ei?.collections.edges.length===0),en=Q.relatedTag&&"vendor"===Q.relatedTag[0]&&!ei?.vendor,eu=f(X,{revalidateOnMount:D||F},el),em=D||F,eg=P("PickProduct"===er?Q?.productIds:void 0,{revalidateOnMount:em},{defaultSelectedProductCount:Q?.numOfSelectedProducts,selectedStatus:em&&Q?.productIds?.length?b:void 0}),eh=l(()=>({id:Q?.collectionId??"latest",numberOfProducts:B?.numberOfProducts??4,orderBy:B?.orderBy}),[Q?.collectionId,Number(B?.numberOfProducts),B?.orderBy]),ep=k("PickProduct"!==er?eh:void 0,{revalidateOnMount:em});i(()=>{if(H&&ei&&Q.relatedTag&&"recommended-product"!==Q.relatedType){let e;switch(ee(!1),Q.hasRelatedExclude&&(e=Q?.relatedExclude&&Q.relatedExclude.split(",").map(e=>e.trim())),Q.relatedTag[0]){case"vendor":Y({first:B?.numberOfProducts,where:{vendor:Q.relatedTag&&"vendor"===Q.relatedTag[0]?ei?.vendor:"",idNEQ:ei.id}});break;case"collection":{let t=ei?.collections?.edges.map(e=>e.node?.id);if(!t||t?.length===0){ee(!0);break}Y(e&&e.length>0?{first:B?.numberOfProducts,where:{idNEQ:ei.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t},{titleNotIn:e}]}]}}:{first:B?.numberOfProducts,where:{idNEQ:ei.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t}]}]}});break}case"tags":if(!ei.tags||0===ei.tags.length){ee(!0);break}Y(e&&e.length>0?{first:B?.numberOfProducts,where:{idNEQ:ei.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ei.tags},{nameNotIn:e}]}]}}:{first:B?.numberOfProducts,where:{idNEQ:ei.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ei.tags}]}]}})}}},[ei,Q.relatedType,Q.relatedTag,B?.numberOfProducts,Q.relatedExclude,Q.hasRelatedExclude,H]);let ef="PickProduct"===er?eg.isValidating:ep.isValidating,eP="PickProduct"===er?eg.isLoading:ep.isLoading,eb="PickProduct"===er?eg.error:ep.error,ek=ep.data?.collections?.edges?.[0]?.node,eI="PickProduct"===er?I(eg.data?.products):I(ek?.products),eT=eu?.data?.products?I(eu?.data?.products):void 0,ev=H&&eT?eT:"PickProduct"===er&&Q?.productIds?.length?Q?.productIds?.map(e=>eI?.find(t=>t?.baseID===e)).filter(Boolean)??eI:"PickProduct"!==er?eI:eI.filter((e,t)=>t<(Q?.numOfSelectedProducts??4)),ey=l(()=>Z&&H&&D||!ev.length&&!eP&&J&&D,[J,eP,Z,H,D,ev.length]),eO=l(()=>!ev||Z&&H,[Z,H,ev]),ew=l(()=>{if(!B?.sameHeight)return[];let e=0,t=Math.ceil((ev?.length??0)/+(B?.slidesToShow?.[R]??1));return Array.from(Array(ev?.length??0)).map((r,o)=>(o>=+(B?.slidesToShow?.[R]??1)*(e+1)&&++e,{gridRow:`${1+q*e}/${q+1+q*e}`,marginBottom:e+1<t?W(G?.horizontalGutter,R):void 0}))},[B?.sameHeight,B?.slidesToShow,q,ev?.length,R,G?.horizontalGutter]),eS=l(()=>ef||eP||eb||!ev||Z&&H,[eb,eP,Z,H,ef,ev]);i(()=>{eS||setTimeout(()=>{let{builderData:e}=M??{},t=e?.childrens?.[0];if(!t)return;let r=document.querySelector(`[data-id=${t}] div`);r&&U(r.childElementCount||1)},D?0:500)},[M,eS,D]);let eC=l(()=>({collection:ek,products:ev,settings:{loop:B?.loop??{desktop:!1},scrollMode:B?.scrollMode??{desktop:"snap"},slidesToShow:B?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:G?.layout,dot:B?.dot,dotStyle:B?.dotStyle,arrow:B?.arrow,controlOverContent:B?.controlOverContent,sameHeight:B?.sameHeight},styles:{horizontalGutter:G?.horizontalGutter,verticalGutter:G?.verticalGutter,fullWidth:G?.fullWidth,spacing:G?.spacing,width:G?.width,height:G?.height}}),[ek,ev,B,G]);if(M?.isPreview&&et)return e(t,{});if(ey)return e(t,{children:E(J,e(j,{builderAttrs:A,collectionHandle:ek?.handle,productSrc:er,onClose:()=>K(!1),children:x,relatedTagString:z,assignProductNoTags:ec||es||en,noAssignedProduct:!eo}))});let{productListWrapStyle:eE,productListContentStyle:eN,productListWrapAlignStyle:eL}=C(o),{productListWrapClass:eW}=N(o);return r("div",{...A,className:eW,style:eE,children:[!!G?.preloadBgImage&&r(O,{children:[!!G.backgroundImage?.desktop?.image?.src&&e("link",{rel:"preload",href:G.backgroundImage.desktop.image.src,as:"image"}),!!G.backgroundImage?.tablet?.image?.src&&e("link",{rel:"preload",href:G.backgroundImage?.tablet?.image?.src,as:"image"}),!!G.backgroundImage?.mobile?.image?.src&&e("link",{rel:"preload",href:G.backgroundImage?.mobile?.image?.src,as:"image"})]}),ef||eP?e(d,{}):eb?r("div",{children:["Error: ",eb?.message]}):eO?e("div",{children:"Products not found"}):e(T,{...eC,children:e("div",{className:"gp-flex gp-w-full",style:eL,children:r("div",{style:eN,children:[et&&e(y,{}),e(t,{children:E(G?.layout==="grid",e(w,{...o,productSortedById:ev,generateGridRowArray:ew}),e(S,{...o,productSortedById:ev}))})]})})}),v(x,!0)]})};export{x as default};
1
+ import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import r from"next/dynamic";import d from"../../../common/components/Loading.js";import{useState as l,useMemo as i,useEffect as a}from"react";import{useRenderMode as c,useCurrentDevice as s,usePageType as n,usePageStore as u,useFetchHandle as m,hasPublicStoreFrontData as g,createStoreFrontFetcher as h,useProductQuery as p,useProductsQueryAll as f,useProductsQuery as P,PICKED_PRODUCT_STATUSES as b,useCollectionQuery as k,flattenConnection as I,ProductListProvider as T,filterToolbarPreview as v}from"@gem-sdk/core";import{PRODUCT_LIST_PRODUCT_SOURCE as y}from"../../../common/const.js";import O from"../SalePageProductListWarning.js";import S from"next/head";import C from"./ProductListGridLayout.js";import E from"./ProductListCarouselLayout.js";import{getStyle as N}from"./common/styles.js";import{If as w}from"@gem-sdk/system";import{getClass as L}from"./common/classes.js";import{getData as j}from"./common/helpers.js";import{getPropertyByDevice as W}from"../../../dialog/common/helpers.js";let x=r(()=>import("../ProductNotFound.js"),{loading:d}),G=r=>{let{children:G,styles:M,builderProps:B,setting:A,builderAttrs:D}=r,{isRelatedProduct:H,productSetting:Q}=j(r),z=Q.relatedTag&&Q.relatedTag[0],{isEditMode:F,isPreviewSharePageMode:R}=c(),$=s(),_=n(),V=u(e=>e.dynamicProduct),q=u(e=>e.dynamicCollection),[U,J]=l(1),[K,X]=l(!0),[Y,Z]=l(),[ee,et]=l(!1),eo="GP_FUNNEL_PAGE"===_;"GP_COLLECTION"!=_||[y.Collection,y.DynamicCollection].includes(Q?.productSrc)||(Q.productSrc=y.DynamicCollection);let er=Q?.productSrc??y.Collection;er===y.DynamicCollection&&(Q.collectionId=q?.collectionId||"latest");let ed=V?.productId&&V?.productId!==Q.relatedProductId?V?.productId:Q.relatedProductId,el=m(),ei=u(e=>e.publicStoreFrontData),ea=i(()=>g(ei)?h(ei):el,[ei]),{data:ec}=p(H&&ed?ed:void 0,{revalidateOnMount:F||R},ea),es=Q.relatedTag&&"tags"===Q.relatedTag[0]&&(!ec?.tags||ec?.tags.length===0),en=Q.relatedTag&&"collection"===Q.relatedTag[0]&&(!ec?.collections?.edges||ec?.collections.edges.length===0),eu=Q.relatedTag&&"vendor"===Q.relatedTag[0]&&!ec?.vendor,em=f(Y,{revalidateOnMount:F||R},ea),eg=F||R,eh=P(er===y.PickProduct?Q?.productIds:void 0,{revalidateOnMount:eg},{defaultSelectedProductCount:Q?.numOfSelectedProducts,selectedStatus:eg&&Q?.productIds?.length?b:void 0}),ep=i(()=>({id:Q?.collectionId??"latest",numberOfProducts:A?.numberOfProducts??4,orderBy:A?.orderBy}),[Q?.collectionId,Number(A?.numberOfProducts),A?.orderBy]),ef=k(er!==y.PickProduct?ep:void 0,{revalidateOnMount:eg});a(()=>{if(H&&ec&&Q.relatedTag&&"recommended-product"!==Q.relatedType){let e;switch(et(!1),Q.hasRelatedExclude&&(e=Q?.relatedExclude&&Q.relatedExclude.split(",").map(e=>e.trim())),Q.relatedTag[0]){case"vendor":Z({first:A?.numberOfProducts,vendor:Q.relatedTag&&"vendor"===Q.relatedTag[0]?ec?.vendor:"",idNEQ:ec.id});break;case"collection":{let t=ec?.collections?.edges.map(e=>e.node?.id);if(!t||t?.length===0){et(!0);break}Z(e&&e.length>0?{first:A?.numberOfProducts,idNEQ:ec.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t},{titleNotIn:e}]}]}:{first:A?.numberOfProducts,idNEQ:ec.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t}]}]});break}case"tags":if(!ec.tags||0===ec.tags.length){et(!0);break}Z(e&&e.length>0?{first:A?.numberOfProducts,idNEQ:ec.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ec.tags},{nameNotIn:e}]}]}:{first:A?.numberOfProducts,idNEQ:ec.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ec.tags}]}]})}}},[ec,Q.relatedType,Q.relatedTag,A?.numberOfProducts,Q.relatedExclude,Q.hasRelatedExclude,H]);let eP=er===y.PickProduct?eh.isValidating:ef.isValidating,eb=er===y.PickProduct?eh.isLoading:ef.isLoading,ek=er===y.PickProduct?eh.error:ef.error,eI=ef.data?.collections?.edges?.[0]?.node,eT=er===y.PickProduct?I(eh.data?.products):I(eI?.products),ev=em?.data?.products?I(em?.data?.products):void 0,ey=H&&ev?ev:er===y.PickProduct&&Q?.productIds?.length?Q?.productIds?.map(e=>eT?.find(t=>t?.baseID===e)).filter(Boolean)??eT:er!==y.PickProduct?eT:eT.filter((e,t)=>t<(Q?.numOfSelectedProducts??4)),eO=i(()=>ee&&H&&F||!ey.length&&!eb&&K&&F,[K,eb,ee,H,F,ey.length]),eS=i(()=>!ey||ee&&H,[ee,H,ey]),eC=i(()=>{if(!A?.sameHeight)return[];let e=0,t=Math.ceil((ey?.length??0)/+(A?.slidesToShow?.[$]??1));return Array.from(Array(ey?.length??0)).map((o,r)=>(r>=+(A?.slidesToShow?.[$]??1)*(e+1)&&++e,{gridRow:`${1+U*e}/${U+1+U*e}`,marginBottom:e+1<t?W(M?.horizontalGutter,$):void 0}))},[A?.sameHeight,A?.slidesToShow,U,ey?.length,$,M?.horizontalGutter]),eE=i(()=>eP||eb||ek||!ey||ee&&H,[ek,eb,ee,H,eP,ey]);a(()=>{eE||setTimeout(()=>{let{builderData:e}=B??{},t=e?.childrens?.[0];if(!t)return;let o=document.querySelector(`[data-id=${t}] div`);o&&J(o.childElementCount||1)},F?0:500)},[B,eE,F]);let eN=i(()=>({collection:eI,products:ey,settings:{loop:A?.loop??{desktop:!1},scrollMode:A?.scrollMode??{desktop:"snap"},slidesToShow:A?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:M?.layout,dot:A?.dot,dotStyle:A?.dotStyle,arrow:A?.arrow,controlOverContent:A?.controlOverContent,sameHeight:A?.sameHeight},styles:{horizontalGutter:M?.horizontalGutter,verticalGutter:M?.verticalGutter,fullWidth:M?.fullWidth,spacing:M?.spacing,width:M?.width,height:M?.height}}),[eI,ey,A,M]);if(B?.isPreview&&eo)return e(t,{});if(eO)return e(t,{children:w(K,e(x,{builderAttrs:D,collectionHandle:eI?.handle,productSrc:er,onClose:()=>X(!1),children:G,relatedTagString:z,assignProductNoTags:es||en||eu,noAssignedProduct:!ed}))});let{productListWrapStyle:ew,productListContentStyle:eL,productListWrapAlignStyle:ej}=N(r),{productListWrapClass:eW}=L(r);return o("div",{...D,className:eW,style:ew,children:[!!M?.preloadBgImage&&o(S,{children:[!!M.backgroundImage?.desktop?.image?.src&&e("link",{rel:"preload",href:M.backgroundImage.desktop.image.src,as:"image"}),!!M.backgroundImage?.tablet?.image?.src&&e("link",{rel:"preload",href:M.backgroundImage?.tablet?.image?.src,as:"image"}),!!M.backgroundImage?.mobile?.image?.src&&e("link",{rel:"preload",href:M.backgroundImage?.mobile?.image?.src,as:"image"})]}),eP||eb?e(d,{}):ek?o("div",{children:["Error: ",ek?.message]}):eS?e("div",{children:"Products not found"}):e(T,{...eN,children:e("div",{className:"gp-flex gp-w-full",style:ej,children:o("div",{style:eL,children:[eo&&e(O,{}),e(t,{children:w(M?.layout==="grid",e(C,{...r,productSortedById:ey,generateGridRowArray:eC}),e(E,{...r,productSortedById:ey}))})]})})}),v(G,!0)]})};export{G as default};