cloudcommerce 0.22.1 → 0.22.2

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 (164) hide show
  1. package/.editorconfig +13 -0
  2. package/.gitmodules +3 -0
  3. package/.vscode/settings.json +2 -1
  4. package/CHANGELOG.md +13 -0
  5. package/ecomplus-stores/barra-doce/.devcontainer/devcontainer.json +30 -0
  6. package/ecomplus-stores/barra-doce/.editorconfig +13 -0
  7. package/ecomplus-stores/barra-doce/.eslintrc.cjs +3 -0
  8. package/ecomplus-stores/barra-doce/.firebaserc +5 -0
  9. package/ecomplus-stores/barra-doce/.github/build-and-deploy +1 -0
  10. package/ecomplus-stores/barra-doce/.github/renovate.json +5 -0
  11. package/ecomplus-stores/barra-doce/.github/workflows/build-and-deploy.yml +36 -0
  12. package/ecomplus-stores/barra-doce/.github/workflows/calibreapp-image-actions.yml +23 -0
  13. package/ecomplus-stores/barra-doce/.gitpod.yml +12 -0
  14. package/ecomplus-stores/barra-doce/.nvmrc +1 -0
  15. package/ecomplus-stores/barra-doce/.vscode/extensions.json +8 -0
  16. package/ecomplus-stores/barra-doce/.vscode/launch.json +11 -0
  17. package/ecomplus-stores/barra-doce/.vscode/settings.json +10 -0
  18. package/ecomplus-stores/barra-doce/LICENSE.md +230 -0
  19. package/ecomplus-stores/barra-doce/README.md +31 -0
  20. package/ecomplus-stores/barra-doce/SETUP.md +117 -0
  21. package/ecomplus-stores/{iluminim/README.pt-BR.md → barra-doce/SETUP.pt-BR.md} +5 -1
  22. package/ecomplus-stores/barra-doce/functions/config.json +3 -0
  23. package/ecomplus-stores/barra-doce/functions/example.env +10 -0
  24. package/ecomplus-stores/barra-doce/functions/many/index.js +14 -0
  25. package/ecomplus-stores/barra-doce/functions/many/package.json +22 -0
  26. package/ecomplus-stores/barra-doce/functions/ssr/.eslintrc.cjs +6 -0
  27. package/ecomplus-stores/barra-doce/functions/ssr/astro.config.mjs +4 -0
  28. package/ecomplus-stores/barra-doce/functions/ssr/content/blog/.gitkeep +0 -0
  29. package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/.gitkeep +0 -0
  30. package/ecomplus-stores/barra-doce/functions/ssr/content/layout.json +37 -0
  31. package/ecomplus-stores/barra-doce/functions/ssr/content/pages/home.json +33 -0
  32. package/ecomplus-stores/barra-doce/functions/ssr/content/settings.json +48 -0
  33. package/ecomplus-stores/barra-doce/functions/ssr/index.js +18 -0
  34. package/ecomplus-stores/barra-doce/functions/ssr/package.json +31 -0
  35. package/ecomplus-stores/barra-doce/functions/ssr/public/admin/.gitkeep +2 -0
  36. package/ecomplus-stores/barra-doce/functions/ssr/public/assets/.gitkeep +2 -0
  37. package/ecomplus-stores/barra-doce/functions/ssr/public/img/icon.png +0 -0
  38. package/ecomplus-stores/barra-doce/functions/ssr/public/img/large-icon.png +0 -0
  39. package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/banner-forma-decora.jpg +0 -0
  40. package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/banner2.webp +0 -0
  41. package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/ecom-icon.png +0 -0
  42. package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/headphone.webp +0 -0
  43. package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/logo-barradoce.webp +0 -0
  44. package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/logo.png +0 -0
  45. package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/og-image.png +0 -0
  46. package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/passion.webp +0 -0
  47. package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/rect8589.png +0 -0
  48. package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/rect859.png +0 -0
  49. package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/rect89.webp +0 -0
  50. package/ecomplus-stores/barra-doce/functions/ssr/public/robots.txt +8 -0
  51. package/ecomplus-stores/barra-doce/functions/ssr/scripts/build.sh +14 -0
  52. package/ecomplus-stores/barra-doce/functions/ssr/src/assets/style.css +65 -0
  53. package/ecomplus-stores/barra-doce/functions/ssr/src/components/AccountMenu.vue +104 -0
  54. package/ecomplus-stores/barra-doce/functions/ssr/src/components/Banner.vue +64 -0
  55. package/ecomplus-stores/barra-doce/functions/ssr/src/components/BannersGrid.astro +25 -0
  56. package/ecomplus-stores/barra-doce/functions/ssr/src/components/CartSidebar.vue +35 -0
  57. package/ecomplus-stores/barra-doce/functions/ssr/src/components/HeroSlider.vue +51 -0
  58. package/ecomplus-stores/barra-doce/functions/ssr/src/components/PitchBar.vue +53 -0
  59. package/ecomplus-stores/barra-doce/functions/ssr/src/components/Prices.vue +96 -0
  60. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductCard.vue +117 -0
  61. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductShelf.vue +60 -0
  62. package/ecomplus-stores/barra-doce/functions/ssr/src/components/SearchModal.vue +6 -0
  63. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeader.vue +136 -0
  64. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeaderMenu.vue +58 -0
  65. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeaderSubmenu.vue +88 -0
  66. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopSidenav.vue +61 -0
  67. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopSidenavCategory.vue +80 -0
  68. package/ecomplus-stores/barra-doce/functions/ssr/src/env.d.ts +13 -0
  69. package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/Base.astro +15 -0
  70. package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/Checkout.astro +0 -0
  71. package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/PageHeader.astro +38 -0
  72. package/ecomplus-stores/barra-doce/functions/ssr/src/main/Fallback.astro +10 -0
  73. package/ecomplus-stores/barra-doce/functions/ssr/src/main/Home.astro +29 -0
  74. package/ecomplus-stores/barra-doce/functions/ssr/src/main/Sections.astro +29 -0
  75. package/ecomplus-stores/barra-doce/functions/ssr/src/main/Wildcard.astro +18 -0
  76. package/ecomplus-stores/barra-doce/functions/ssr/src/pages/[...slug].astro +40 -0
  77. package/ecomplus-stores/barra-doce/functions/ssr/src/pages/_vue.ts +3 -0
  78. package/ecomplus-stores/barra-doce/functions/ssr/src/pages/app/account.astro +0 -0
  79. package/ecomplus-stores/barra-doce/functions/ssr/src/pages/app/index.astro +0 -0
  80. package/ecomplus-stores/barra-doce/functions/ssr/src/pages/fallback.astro +25 -0
  81. package/ecomplus-stores/barra-doce/functions/ssr/src/pages/index.astro +35 -0
  82. package/ecomplus-stores/barra-doce/functions/ssr/src/scripts/InlineScripts.astro +10 -0
  83. package/ecomplus-stores/barra-doce/functions/ssr/tailwind.config.cjs +19 -0
  84. package/ecomplus-stores/barra-doce/functions/ssr/tsconfig.json +12 -0
  85. package/ecomplus-stores/barra-doce/functions/ssr/uno.config.cjs +5 -0
  86. package/ecomplus-stores/barra-doce/functions/with-apps/index.js +12 -0
  87. package/ecomplus-stores/barra-doce/functions/with-apps/package.json +22 -0
  88. package/ecomplus-stores/barra-doce/package.json +28 -0
  89. package/ecomplus-stores/barra-doce/scripts/install.sh +14 -0
  90. package/ecomplus-stores/iluminim/.editorconfig +13 -0
  91. package/ecomplus-stores/iluminim/README.md +11 -93
  92. package/ecomplus-stores/iluminim/SETUP.md +117 -0
  93. package/ecomplus-stores/iluminim/SETUP.pt-BR.md +117 -0
  94. package/ecomplus-stores/iluminim/functions/many/package.json +3 -3
  95. package/ecomplus-stores/iluminim/functions/ssr/package.json +6 -6
  96. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeaderSubmenu.vue +1 -1
  97. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopSidenav.vue +2 -2
  98. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopSidenavCategory.vue +4 -2
  99. package/ecomplus-stores/iluminim/functions/ssr/src/layouts/PageHeader.astro +6 -1
  100. package/ecomplus-stores/iluminim/functions/with-apps/package.json +3 -3
  101. package/ecomplus-stores/iluminim/package.json +1 -1
  102. package/package.json +1 -1
  103. package/packages/api/package.json +1 -1
  104. package/packages/apps/affilate-program/package.json +1 -1
  105. package/packages/apps/correios/package.json +1 -1
  106. package/packages/apps/custom-payment/package.json +1 -1
  107. package/packages/apps/custom-shipping/package.json +1 -1
  108. package/packages/apps/datafrete/package.json +1 -1
  109. package/packages/apps/discounts/package.json +1 -1
  110. package/packages/apps/emails/package.json +1 -1
  111. package/packages/apps/fb-conversions/package.json +1 -1
  112. package/packages/apps/flash-courier/package.json +1 -1
  113. package/packages/apps/frenet/package.json +1 -1
  114. package/packages/apps/galaxpay/package.json +1 -1
  115. package/packages/apps/google-analytics/package.json +1 -1
  116. package/packages/apps/jadlog/package.json +1 -1
  117. package/packages/apps/loyalty-points/package.json +1 -1
  118. package/packages/apps/melhor-envio/package.json +1 -1
  119. package/packages/apps/mercadopago/package.json +1 -1
  120. package/packages/apps/pagarme/package.json +1 -1
  121. package/packages/apps/paghiper/package.json +1 -1
  122. package/packages/apps/pix/package.json +1 -1
  123. package/packages/apps/tiny-erp/package.json +1 -1
  124. package/packages/apps/webhooks/package.json +1 -1
  125. package/packages/cli/package.json +1 -1
  126. package/packages/config/package.json +1 -1
  127. package/packages/emails/package.json +1 -1
  128. package/packages/events/package.json +1 -1
  129. package/packages/feeds/package.json +1 -1
  130. package/packages/firebase/package.json +1 -1
  131. package/packages/i18n/package.json +1 -1
  132. package/packages/modules/package.json +1 -1
  133. package/packages/passport/package.json +1 -1
  134. package/packages/ssr/package.json +1 -1
  135. package/packages/storefront/dist/client/_astro/HeroSlider.cea1f361.js +1 -0
  136. package/packages/storefront/dist/client/_astro/{ProductShelf.9e290480.js → ProductShelf.35614736.js} +1 -1
  137. package/packages/storefront/dist/client/_astro/ShopHeader.dbe9c1f1.js +4 -0
  138. package/packages/storefront/dist/client/_astro/{_...slug_.2f4f6929.css → _...slug_.c13e0486.css} +1 -1
  139. package/packages/storefront/dist/client/sw.js +1 -1
  140. package/packages/storefront/dist/server/chunks/{_...d496b072.mjs → _...fac94758.mjs} +2 -2
  141. package/packages/storefront/dist/server/chunks/{account@_@astro.1b311a3d.mjs → account@_@astro.460623ee.mjs} +1 -1
  142. package/packages/storefront/dist/server/chunks/{endpoint@_@js.631ff6c5.mjs → endpoint@_@js.35380ea5.mjs} +2 -2
  143. package/packages/storefront/dist/server/chunks/{fallback@_@astro.12cf85ba.mjs → fallback@_@astro.dbc26d2d.mjs} +2 -2
  144. package/packages/storefront/dist/server/chunks/{index@_@astro.a20d91aa.mjs → index@_@astro.c91e679e.mjs} +2 -2
  145. package/packages/storefront/dist/server/chunks/{index@_@astro.69eb5e8a.mjs → index@_@astro.fec107b9.mjs} +2 -2
  146. package/packages/storefront/dist/server/chunks/pages/{_...slug_.astro.c93fc36d.mjs → _...slug_.astro.2e2d4770.mjs} +80 -38
  147. package/packages/storefront/dist/server/chunks/pages/{endpoint.js.630b1212.mjs → endpoint.js.6f0f4ede.mjs} +1 -1
  148. package/packages/storefront/dist/server/chunks/pages/{fallback.astro.58c7e581.mjs → fallback.astro.fc8bc7e7.mjs} +1 -1
  149. package/packages/storefront/dist/server/chunks/pages/{index.astro.6efe85be.mjs → index.astro.03adcc55.mjs} +5 -5
  150. package/packages/storefront/dist/server/entry.mjs +8 -8
  151. package/packages/storefront/dist/server/renderers.mjs +1 -1
  152. package/packages/storefront/package.json +1 -1
  153. package/packages/storefront/src/lib/$storefront.d.ts +1 -0
  154. package/packages/storefront/src/lib/components/SharedData.astro +13 -0
  155. package/packages/storefront/src/lib/composables/use-prices.ts +1 -1
  156. package/packages/storefront/src/lib/composables/use-shop-header-submenu.ts +10 -1
  157. package/packages/storefront/src/lib/composables/use-shop-header.ts +13 -13
  158. package/packages/storefront/src/lib/layouts/BaseHead.astro +1 -1
  159. package/packages/storefront/src/lib/layouts/use-page-header.ts +14 -2
  160. package/packages/storefront/src/lib/ssr-context.ts +1 -0
  161. package/packages/types/package.json +1 -1
  162. package/pnpm-workspace.yaml +2 -0
  163. package/packages/storefront/dist/client/_astro/HeroSlider.0890631f.js +0 -1
  164. package/packages/storefront/dist/client/_astro/ShopHeader.82ae97a5.js +0 -4
@@ -1 +1 @@
1
- if(!self.define){let e,s={};const r=(r,n)=>(r=new URL(r+".js",n).href,s[r]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=r,e.onload=s,document.head.appendChild(e)}else e=r,importScripts(r),s()})).then((()=>{let e=s[r];if(!e)throw new Error(`Module ${r} didn’t register its module`);return e})));self.define=(n,i)=>{const o=e||("document"in self?document.currentScript.src:"")||location.href;if(s[o])return;let a={};const l=e=>r(e,o),t={module:{uri:o},exports:a,require:l};s[o]=Promise.all(n.map((e=>t[e]||l(e)))).then((e=>(i(...e),a)))}}define(["./workbox-5e0bf4e4"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"_astro/_...slug_.2f4f6929.css",revision:null},{url:"_astro/_plugin-vue_export-helper.4cb7dd76.js",revision:null},{url:"_astro/api.4984c5be.js",revision:null},{url:"_astro/Carousel.62c97a79.js",revision:null},{url:"_astro/client.0fb6b44e.js",revision:null},{url:"_astro/firebase-app.84207480.js",revision:null},{url:"_astro/HeroSlider.0890631f.js",revision:null},{url:"_astro/hoisted.572313d6.js",revision:null},{url:"_astro/img.abbe849f.js",revision:null},{url:"_astro/index.b93f3d06.js",revision:null},{url:"_astro/PitchBar.ed85833a.js",revision:null},{url:"_astro/preload-helper.cf010ec4.js",revision:null},{url:"_astro/ProductShelf.9e290480.js",revision:null},{url:"_astro/session-utm.744b0db3.js",revision:null},{url:"_astro/ShopHeader.82ae97a5.js",revision:null},{url:"_astro/workbox-window.prod.es5.a7b12eab.js",revision:null},{url:"manifest.webmanifest",revision:"138b9c9f495fe815bcec626365e9372e"}],{ignoreURLParametersMatching:[/.*/]}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/404"))),e.registerRoute(/^\/$/,new e.NetworkFirst,"GET"),e.registerRoute(/\/((?!(?:admin|assets|img)(\/|$))[^.]+)(\.(?!js|css|xml|txt|png|jpg|jpeg|webp|avif|svg|gif)[^.]+)*$/,new e.NetworkFirst({cacheName:"pages",plugins:[new e.ExpirationPlugin({maxEntries:50,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^\/assets\//,new e.StaleWhileRevalidate({cacheName:"assets",plugins:[]}),"GET"),e.registerRoute(/^\/_image$/,new e.StaleWhileRevalidate({cacheName:"optim-images",plugins:[new e.ExpirationPlugin({maxEntries:50,maxAgeSeconds:2592e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^\/img\/uploads\/.*\.(?:png|jpg|jpeg|webp|avif|svg|gif)$/,new e.StaleWhileRevalidate({cacheName:"cms-images",plugins:[new e.ExpirationPlugin({maxEntries:20,maxAgeSeconds:2592e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^https:\/\/ecomplus\.io/,new e.NetworkFirst({cacheName:"store-api",plugins:[new e.ExpirationPlugin({maxEntries:50,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^https:\/\/(((\w+\.)?ecoms\d)|(ecom[\w-]+(\.\w+)*\.digitaloceanspaces))\.com.*\/imgs\/normal\//,new e.CacheFirst({cacheName:"product-thumbnails",plugins:[new e.ExpirationPlugin({maxEntries:100,maxAgeSeconds:2592e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^https:\/\/(((\w+\.)?ecoms\d)|(ecom[\w-]+(\.\w+)*\.digitaloceanspaces))\.com.*\/imgs\/big\//,new e.CacheFirst({cacheName:"product-pictures",plugins:[new e.ExpirationPlugin({maxEntries:10,maxAgeSeconds:604800,purgeOnQuotaError:!0})]}),"GET")}));
1
+ if(!self.define){let e,s={};const r=(r,n)=>(r=new URL(r+".js",n).href,s[r]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=r,e.onload=s,document.head.appendChild(e)}else e=r,importScripts(r),s()})).then((()=>{let e=s[r];if(!e)throw new Error(`Module ${r} didn’t register its module`);return e})));self.define=(n,i)=>{const o=e||("document"in self?document.currentScript.src:"")||location.href;if(s[o])return;let a={};const l=e=>r(e,o),t={module:{uri:o},exports:a,require:l};s[o]=Promise.all(n.map((e=>t[e]||l(e)))).then((e=>(i(...e),a)))}}define(["./workbox-5e0bf4e4"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"_astro/_...slug_.c13e0486.css",revision:null},{url:"_astro/_plugin-vue_export-helper.4cb7dd76.js",revision:null},{url:"_astro/api.4984c5be.js",revision:null},{url:"_astro/Carousel.62c97a79.js",revision:null},{url:"_astro/client.0fb6b44e.js",revision:null},{url:"_astro/firebase-app.84207480.js",revision:null},{url:"_astro/HeroSlider.cea1f361.js",revision:null},{url:"_astro/hoisted.572313d6.js",revision:null},{url:"_astro/img.abbe849f.js",revision:null},{url:"_astro/index.b93f3d06.js",revision:null},{url:"_astro/PitchBar.ed85833a.js",revision:null},{url:"_astro/preload-helper.cf010ec4.js",revision:null},{url:"_astro/ProductShelf.35614736.js",revision:null},{url:"_astro/session-utm.744b0db3.js",revision:null},{url:"_astro/ShopHeader.dbe9c1f1.js",revision:null},{url:"_astro/workbox-window.prod.es5.a7b12eab.js",revision:null},{url:"manifest.webmanifest",revision:"138b9c9f495fe815bcec626365e9372e"}],{ignoreURLParametersMatching:[/.*/]}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/404"))),e.registerRoute(/^\/$/,new e.NetworkFirst,"GET"),e.registerRoute(/\/((?!(?:admin|assets|img)(\/|$))[^.]+)(\.(?!js|css|xml|txt|png|jpg|jpeg|webp|avif|svg|gif)[^.]+)*$/,new e.NetworkFirst({cacheName:"pages",plugins:[new e.ExpirationPlugin({maxEntries:50,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^\/assets\//,new e.StaleWhileRevalidate({cacheName:"assets",plugins:[]}),"GET"),e.registerRoute(/^\/_image$/,new e.StaleWhileRevalidate({cacheName:"optim-images",plugins:[new e.ExpirationPlugin({maxEntries:50,maxAgeSeconds:2592e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^\/img\/uploads\/.*\.(?:png|jpg|jpeg|webp|avif|svg|gif)$/,new e.StaleWhileRevalidate({cacheName:"cms-images",plugins:[new e.ExpirationPlugin({maxEntries:20,maxAgeSeconds:2592e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^https:\/\/ecomplus\.io/,new e.NetworkFirst({cacheName:"store-api",plugins:[new e.ExpirationPlugin({maxEntries:50,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^https:\/\/(((\w+\.)?ecoms\d)|(ecom[\w-]+(\.\w+)*\.digitaloceanspaces))\.com.*\/imgs\/normal\//,new e.CacheFirst({cacheName:"product-thumbnails",plugins:[new e.ExpirationPlugin({maxEntries:100,maxAgeSeconds:2592e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^https:\/\/(((\w+\.)?ecoms\d)|(ecom[\w-]+(\.\w+)*\.digitaloceanspaces))\.com.*\/imgs\/big\//,new e.CacheFirst({cacheName:"product-pictures",plugins:[new e.ExpirationPlugin({maxEntries:10,maxAgeSeconds:604800,purgeOnQuotaError:!0})]}),"GET")}));
@@ -14,7 +14,7 @@ import 'html-escaper';
14
14
  import 'vue';
15
15
  import 'vue/server-renderer';
16
16
  import '@ecomplus/utils';
17
- import './pages/_...slug_.astro.c93fc36d.mjs';
17
+ import './pages/_...slug_.astro.2e2d4770.mjs';
18
18
  import 'node:fs/promises';
19
19
  import 'node:path';
20
20
  import 'node:url';
@@ -29,6 +29,6 @@ import '@cloudcommerce/config';
29
29
  /* empty css */import '@vueuse/core';
30
30
  import '@headlessui/vue';
31
31
 
32
- const page = () => import('./pages/_...slug_.astro.c93fc36d.mjs').then(n => n.k);
32
+ const page = () => import('./pages/_...slug_.astro.2e2d4770.mjs').then(n => n.k);
33
33
 
34
34
  export { page };
@@ -14,7 +14,7 @@ import 'html-escaper';
14
14
  import 'vue';
15
15
  import 'vue/server-renderer';
16
16
  import '@ecomplus/utils';
17
- import './pages/_...slug_.astro.c93fc36d.mjs';
17
+ import './pages/_...slug_.astro.2e2d4770.mjs';
18
18
  import 'node:fs/promises';
19
19
  import 'node:path';
20
20
  import 'node:url';
@@ -14,7 +14,7 @@ import 'html-escaper';
14
14
  import 'vue';
15
15
  import 'vue/server-renderer';
16
16
  import '@ecomplus/utils';
17
- import './pages/_...slug_.astro.c93fc36d.mjs';
17
+ import './pages/_...slug_.astro.2e2d4770.mjs';
18
18
  import 'node:fs/promises';
19
19
  import 'node:path';
20
20
  import 'node:url';
@@ -29,6 +29,6 @@ import '@cloudcommerce/config';
29
29
  /* empty css */import '@vueuse/core';
30
30
  import '@headlessui/vue';
31
31
 
32
- const page = () => import('./pages/endpoint.js.630b1212.mjs').then(n => n.e);
32
+ const page = () => import('./pages/endpoint.js.6f0f4ede.mjs').then(n => n.e);
33
33
 
34
34
  export { page };
@@ -14,7 +14,7 @@ import 'html-escaper';
14
14
  import 'vue';
15
15
  import 'vue/server-renderer';
16
16
  import '@ecomplus/utils';
17
- import './pages/_...slug_.astro.c93fc36d.mjs';
17
+ import './pages/_...slug_.astro.2e2d4770.mjs';
18
18
  import 'node:fs/promises';
19
19
  import 'node:path';
20
20
  import 'node:url';
@@ -29,6 +29,6 @@ import '@cloudcommerce/config';
29
29
  /* empty css */import '@vueuse/core';
30
30
  import '@headlessui/vue';
31
31
 
32
- const page = () => import('./pages/fallback.astro.58c7e581.mjs');
32
+ const page = () => import('./pages/fallback.astro.fc8bc7e7.mjs');
33
33
 
34
34
  export { page };
@@ -14,7 +14,7 @@ import 'html-escaper';
14
14
  import 'vue';
15
15
  import 'vue/server-renderer';
16
16
  import '@ecomplus/utils';
17
- import './pages/_...slug_.astro.c93fc36d.mjs';
17
+ import './pages/_...slug_.astro.2e2d4770.mjs';
18
18
  import 'node:fs/promises';
19
19
  import 'node:path';
20
20
  import 'node:url';
@@ -29,6 +29,6 @@ import '@cloudcommerce/config';
29
29
  /* empty css */import '@vueuse/core';
30
30
  import '@headlessui/vue';
31
31
 
32
- const page = () => import('./pages/index.astro.6efe85be.mjs').then(n => n.a);
32
+ const page = () => import('./pages/index.astro.03adcc55.mjs').then(n => n.a);
33
33
 
34
34
  export { page };
@@ -14,7 +14,7 @@ import 'html-escaper';
14
14
  import 'vue';
15
15
  import 'vue/server-renderer';
16
16
  import '@ecomplus/utils';
17
- import './pages/_...slug_.astro.c93fc36d.mjs';
17
+ import './pages/_...slug_.astro.2e2d4770.mjs';
18
18
  import 'node:fs/promises';
19
19
  import 'node:path';
20
20
  import 'node:url';
@@ -29,6 +29,6 @@ import '@cloudcommerce/config';
29
29
  /* empty css */import '@vueuse/core';
30
30
  import '@headlessui/vue';
31
31
 
32
- const page = () => import('./pages/index.astro.6efe85be.mjs').then(n => n.i);
32
+ const page = () => import('./pages/index.astro.03adcc55.mjs').then(n => n.i);
33
33
 
34
34
  export { page };
@@ -274,7 +274,8 @@ if (!globalThis.$storefront) {
274
274
  settings: {},
275
275
  onLoad(callback) {
276
276
  emitter.on("load", callback);
277
- }
277
+ },
278
+ data: {}
278
279
  };
279
280
  }
280
281
  const setResponseCache = (Astro, maxAge, sMaxAge) => {
@@ -404,13 +405,13 @@ const loadRouteContext = async (Astro, {
404
405
 
405
406
  const pwaInfo = {"pwaInDevEnvironment":false,"webManifest":{"href":"/manifest.webmanifest","useCredentials":false,"linkTag":"<link rel=\"manifest\" href=\"/manifest.webmanifest\">"}};
406
407
 
407
- var __freeze$1 = Object.freeze;
408
- var __defProp$1 = Object.defineProperty;
409
- var __template$1 = (cooked, raw) => __freeze$1(__defProp$1(cooked, "raw", { value: __freeze$1(raw || cooked.slice()) }));
410
- var _a$1;
411
- const $$Astro$8 = createAstro("https://ecom2-demo.web.app");
408
+ var __freeze$2 = Object.freeze;
409
+ var __defProp$2 = Object.defineProperty;
410
+ var __template$2 = (cooked, raw) => __freeze$2(__defProp$2(cooked, "raw", { value: __freeze$2(raw || cooked.slice()) }));
411
+ var _a$2;
412
+ const $$Astro$9 = createAstro("https://ecom2-demo.web.app");
412
413
  const $$BaseHead = createComponent(async ($$result, $$props, $$slots) => {
413
- const Astro2 = $$result.createAstro($$Astro$8, $$props, $$slots);
414
+ const Astro2 = $$result.createAstro($$Astro$9, $$props, $$slots);
414
415
  Astro2.self = $$BaseHead;
415
416
  const deployRand = ({}).DEPLOY_RAND || "_";
416
417
  const getIconUrl = (size) => {
@@ -461,7 +462,7 @@ window.ECOM_LANG = '${lang}';
461
462
  window.ECOM_CURRENCY = '${currency}';
462
463
  window.ECOM_CURRENCY_SYMBOL = '${currencySymbol}';
463
464
  window.ECOM_COUNTRY_CODE = '${countryCode}';
464
- window.$storefront = ${JSON.stringify({ settings })};`;
465
+ window.$storefront = ${JSON.stringify({ settings, data: {} })};`;
465
466
  if (apiContext.error) {
466
467
  const { message, statusCode } = apiContext.error;
467
468
  const url = Astro2.url.pathname;
@@ -511,7 +512,7 @@ window.$isCmsPreview = true;`;
511
512
  url: `https://${domain}/`,
512
513
  logo: `https://${domain}${settings.logo}`
513
514
  });
514
- return renderTemplate(_a$1 || (_a$1 = __template$1(['<meta charset="UTF-8">\n<meta name="viewport" content="width=device-width">\n<meta name="theme-color"', '>\n<link rel="icon" type="image/png"', ' sizes="32x32">\n', "\n<title>", '</title>\n<meta name="description"', '>\n<meta name="author"', '>\n<meta name="generator"', '>\n<link rel="canonical"', ">\n", '\n<meta name="apple-mobile-web-app-capable" content="yes">\n<meta name="apple-mobile-web-app-status-bar-style" content="default">\n<meta property="og:site_name"', '>\n<meta property="og:url"', '>\n<meta property="og:title"', '>\n<meta property="og:description"', '>\n<meta property="og:type" content="website">\n<meta property="og:locale"', ">\n", "\n", '\n<meta name="twitter:card" content="summary">\n', '\n<meta name="ecom-store-id"', ">\n\n", "\n", "\n\n<script>", '<\/script>\n<script type="application/ld+json">', "<\/script>"])), addAttribute(primaryColor, "content"), addAttribute(favicon, "href"), shortcutIcon && renderTemplate`<link rel="icon" type="image/png"${addAttribute(shortcutIcon, "href")} sizes="192x192">`, title, addAttribute(description, "content"), addAttribute(settings.name, "content"), addAttribute(Astro2.generator, "content"), addAttribute(canonicalUrl, "href"), shortcutIcon && renderTemplate`<link rel="apple-touch-icon"${addAttribute(shortcutIcon, "href")}>`, addAttribute(settings.name, "content"), addAttribute(canonicalUrl, "content"), addAttribute(title, "content"), addAttribute(description, "content"), addAttribute(ogLocale, "content"), ogImage && renderTemplate`<meta property="og:image"${addAttribute(ogImage, "content")}>`, metatagsContent?.fb_app_id && renderTemplate`<meta property="fb:app_id"${addAttribute(metatagsContent.fb_app_id, "content")}>`, metatagsContent?.twitter_username && renderTemplate`<meta name="twitter:site"${addAttribute(metatagsContent.twitter_username, "content")}>`, addAttribute(String(storeId), "content"), pwaInfo && renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`${unescapeHTML(pwaInfo.webManifest.linkTag)}` })}`, !pwaInfo && !false && renderTemplate`<link rel="manifest" href="/manifest.webmanifest">`, unescapeHTML(inlineClientJS), unescapeHTML(inlineJSONLd));
515
+ return renderTemplate(_a$2 || (_a$2 = __template$2(['<meta charset="UTF-8">\n<meta name="viewport" content="width=device-width">\n<meta name="theme-color"', '>\n<link rel="icon" type="image/png"', ' sizes="32x32">\n', "\n<title>", '</title>\n<meta name="description"', '>\n<meta name="author"', '>\n<meta name="generator"', '>\n<link rel="canonical"', ">\n", '\n<meta name="apple-mobile-web-app-capable" content="yes">\n<meta name="apple-mobile-web-app-status-bar-style" content="default">\n<meta property="og:site_name"', '>\n<meta property="og:url"', '>\n<meta property="og:title"', '>\n<meta property="og:description"', '>\n<meta property="og:type" content="website">\n<meta property="og:locale"', ">\n", "\n", '\n<meta name="twitter:card" content="summary">\n', '\n<meta name="ecom-store-id"', ">\n\n", "\n", "\n\n<script>", '<\/script>\n<script type="application/ld+json">', "<\/script>"])), addAttribute(primaryColor, "content"), addAttribute(favicon, "href"), shortcutIcon && renderTemplate`<link rel="icon" type="image/png"${addAttribute(shortcutIcon, "href")} sizes="192x192">`, title, addAttribute(description, "content"), addAttribute(settings.name, "content"), addAttribute(Astro2.generator, "content"), addAttribute(canonicalUrl, "href"), shortcutIcon && renderTemplate`<link rel="apple-touch-icon"${addAttribute(shortcutIcon, "href")}>`, addAttribute(settings.name, "content"), addAttribute(canonicalUrl, "content"), addAttribute(title, "content"), addAttribute(description, "content"), addAttribute(ogLocale, "content"), ogImage && renderTemplate`<meta property="og:image"${addAttribute(ogImage, "content")}>`, metatagsContent?.fb_app_id && renderTemplate`<meta property="fb:app_id"${addAttribute(metatagsContent.fb_app_id, "content")}>`, metatagsContent?.twitter_username && renderTemplate`<meta name="twitter:site"${addAttribute(metatagsContent.twitter_username, "content")}>`, addAttribute(String(storeId), "content"), pwaInfo && renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`${unescapeHTML(pwaInfo.webManifest.linkTag)}` })}`, !pwaInfo && !false && renderTemplate`<link rel="manifest" href="/manifest.webmanifest">`, unescapeHTML(inlineClientJS), unescapeHTML(inlineJSONLd));
515
516
  }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseHead.astro", void 0);
516
517
 
517
518
  function isRemoteImage(src) {
@@ -600,7 +601,7 @@ async function getImage(transform) {
600
601
  }
601
602
  let loader = (_a = globalThis.astroImage) == null ? void 0 : _a.loader;
602
603
  if (!loader) {
603
- const { default: mod } = await import('./endpoint.js.630b1212.mjs').then(n => n.s).catch(() => {
604
+ const { default: mod } = await import('./endpoint.js.6f0f4ede.mjs').then(n => n.s).catch(() => {
604
605
  throw new Error(
605
606
  "[@astrojs/image] Builtin image loader not found. (Did you remember to add the integration to your Astro config?)"
606
607
  );
@@ -828,9 +829,9 @@ const useSSRPicture = async (params) => {
828
829
  };
829
830
  };
830
831
 
831
- const $$Astro$7 = createAstro("https://ecom2-demo.web.app");
832
+ const $$Astro$8 = createAstro("https://ecom2-demo.web.app");
832
833
  const $$Picture = createComponent(async ($$result, $$props, $$slots) => {
833
- const Astro2 = $$result.createAstro($$Astro$7, $$props, $$slots);
834
+ const Astro2 = $$result.createAstro($$Astro$8, $$props, $$slots);
834
835
  Astro2.self = $$Picture;
835
836
  const deployRand = ({}).DEPLOY_RAND;
836
837
  const versionSuffix = ({}).BUILD_OUTPUT !== "static" && deployRand ? `&V=${deployRand}` : "";
@@ -872,9 +873,9 @@ const $$Picture = createComponent(async ($$result, $$props, $$slots) => {
872
873
  </picture>`;
873
874
  }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/components/Picture.astro", void 0);
874
875
 
875
- const $$Astro$6 = createAstro("https://ecom2-demo.web.app");
876
+ const $$Astro$7 = createAstro("https://ecom2-demo.web.app");
876
877
  const $$BaseBody = createComponent(async ($$result, $$props, $$slots) => {
877
- const Astro2 = $$result.createAstro($$Astro$6, $$props, $$slots);
878
+ const Astro2 = $$result.createAstro($$Astro$7, $$props, $$slots);
878
879
  Astro2.self = $$BaseBody;
879
880
  const { settings } = Astro2.locals.routeContext;
880
881
  return renderTemplate`${maybeRenderHead()}<body>
@@ -887,9 +888,9 @@ const $$BaseBody = createComponent(async ($$result, $$props, $$slots) => {
887
888
  </body>`;
888
889
  }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseBody.astro", void 0);
889
890
 
890
- const $$Astro$5 = createAstro("https://ecom2-demo.web.app");
891
+ const $$Astro$6 = createAstro("https://ecom2-demo.web.app");
891
892
  const $$Base$1 = createComponent(async ($$result, $$props, $$slots) => {
892
- const Astro2 = $$result.createAstro($$Astro$5, $$props, $$slots);
893
+ const Astro2 = $$result.createAstro($$Astro$6, $$props, $$slots);
893
894
  Astro2.self = $$Base$1;
894
895
  const { getContent } = Astro2.locals.routeContext;
895
896
  const { custom_code: customCodeContent } = await getContent("layout");
@@ -907,20 +908,20 @@ ${renderComponent($$result, "BaseBody", $$BaseBody, {}, { "default": ($$result2)
907
908
  ` })}`;
908
909
  }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/Base.astro", void 0);
909
910
 
910
- var __freeze = Object.freeze;
911
- var __defProp = Object.defineProperty;
912
- var __template = (cooked, raw) => __freeze(__defProp(cooked, "raw", { value: __freeze(raw || cooked.slice()) }));
913
- var _a;
914
- const $$Astro$4 = createAstro("https://ecom2-demo.web.app");
911
+ var __freeze$1 = Object.freeze;
912
+ var __defProp$1 = Object.defineProperty;
913
+ var __template$1 = (cooked, raw) => __freeze$1(__defProp$1(cooked, "raw", { value: __freeze$1(raw || cooked.slice()) }));
914
+ var _a$1;
915
+ const $$Astro$5 = createAstro("https://ecom2-demo.web.app");
915
916
  const $$InlineScripts = createComponent(async ($$result, $$props, $$slots) => {
916
- const Astro2 = $$result.createAstro($$Astro$4, $$props, $$slots);
917
+ const Astro2 = $$result.createAstro($$Astro$5, $$props, $$slots);
917
918
  Astro2.self = $$InlineScripts;
918
- return renderTemplate(_a || (_a = __template(['<script>\n window.$firebaseConfig = {\n apiKey: "AIzaSyCnvm7QrPKzSBrUi09Z3zTgjDST0t4Yikg",\n authDomain: "ecom2-demo.firebaseapp.com",\n projectId: "ecom2-demo",\n storageBucket: "ecom2-demo.appspot.com",\n messagingSenderId: "70369627313",\n appId: "1:70369627313:web:06634033b9c6208fe7e690"\n };\n<\/script>'])));
919
+ return renderTemplate(_a$1 || (_a$1 = __template$1(['<script>\n window.$firebaseConfig = {\n apiKey: "AIzaSyCnvm7QrPKzSBrUi09Z3zTgjDST0t4Yikg",\n authDomain: "ecom2-demo.firebaseapp.com",\n projectId: "ecom2-demo",\n storageBucket: "ecom2-demo.appspot.com",\n messagingSenderId: "70369627313",\n appId: "1:70369627313:web:06634033b9c6208fe7e690"\n };\n<\/script>'])));
919
920
  }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/scripts/InlineScripts.astro", void 0);
920
921
 
921
- const $$Astro$3 = createAstro("https://ecom2-demo.web.app");
922
+ const $$Astro$4 = createAstro("https://ecom2-demo.web.app");
922
923
  const $$Base = createComponent(async ($$result, $$props, $$slots) => {
923
- const Astro2 = $$result.createAstro($$Astro$3, $$props, $$slots);
924
+ const Astro2 = $$result.createAstro($$Astro$4, $$props, $$slots);
924
925
  Astro2.self = $$Base;
925
926
  return renderTemplate`${renderComponent($$result, "SfBase", $$Base$1, {}, { "base-head": ($$result2) => renderTemplate`${renderComponent($$result2, "Fragment", Fragment, { "slot": "base-head" }, { "default": ($$result3) => renderTemplate`
926
927
  ${renderSlot($$result3, $$slots["base-head"])}
@@ -1054,7 +1055,7 @@ const usePitchBar = (props) => {
1054
1055
  };
1055
1056
  };
1056
1057
 
1057
- const usePageHeader = async ({ routeContext }) => {
1058
+ const usePageHeader = async ({ routeContext, listedCategoryFields }) => {
1058
1059
  const { apiState, getContent } = routeContext;
1059
1060
  const layoutContent = await getContent("layout");
1060
1061
  const {
@@ -1065,7 +1066,18 @@ const usePageHeader = async ({ routeContext }) => {
1065
1066
  let { categories } = apiState;
1066
1067
  if (!categories) {
1067
1068
  try {
1068
- categories = (await api.get("categories")).data.result;
1069
+ categories = (await api.get("categories", {
1070
+ fields: listedCategoryFields || [
1071
+ "name",
1072
+ "slug",
1073
+ "parent.name",
1074
+ "parent.slug",
1075
+ "icon.url",
1076
+ "icon.size",
1077
+ "pictures.0.url",
1078
+ "pictures.0.size"
1079
+ ]
1080
+ })).data.result;
1069
1081
  } catch (err) {
1070
1082
  categories = [];
1071
1083
  console.error(err);
@@ -1084,6 +1096,21 @@ const usePageHeader = async ({ routeContext }) => {
1084
1096
  };
1085
1097
  };
1086
1098
 
1099
+ var __freeze = Object.freeze;
1100
+ var __defProp = Object.defineProperty;
1101
+ var __template = (cooked, raw) => __freeze(__defProp(cooked, "raw", { value: __freeze(raw || cooked.slice()) }));
1102
+ var _a;
1103
+ const $$Astro$3 = createAstro("https://ecom2-demo.web.app");
1104
+ const $$SharedData = createComponent(async ($$result, $$props, $$slots) => {
1105
+ const Astro2 = $$result.createAstro($$Astro$3, $$props, $$slots);
1106
+ Astro2.self = $$SharedData;
1107
+ const { field, value } = Astro2.props;
1108
+ global.$storefront.data[field] = value;
1109
+ let inlineClientJS = `
1110
+ window.$storefront.data['${field}'] = ${JSON.stringify(value)};`;
1111
+ return renderTemplate(_a || (_a = __template(["<script>", "<\/script>"])), unescapeHTML(inlineClientJS));
1112
+ }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/components/SharedData.astro", void 0);
1113
+
1087
1114
  const carouselKey = Symbol("carousel");
1088
1115
 
1089
1116
  const _sfc_main$e = /* @__PURE__ */ defineComponent({
@@ -1683,7 +1710,7 @@ const filterMainCategories = (categories, featuredSlugs) => {
1683
1710
  const filterSubcategories = (categories, parentCategory, isAlphabeticalSort = false) => {
1684
1711
  const subcategories = categories.filter(({ name, slug, parent }) => {
1685
1712
  if (name && slug && parent) {
1686
- return parent._id === parentCategory._id || parent.slug && parent.slug === parentCategory.slug;
1713
+ return parent._id && parent._id === parentCategory._id || parent.slug && parent.slug === parentCategory.slug;
1687
1714
  }
1688
1715
  return false;
1689
1716
  });
@@ -1698,7 +1725,7 @@ const filterSubcategories = (categories, parentCategory, isAlphabeticalSort = fa
1698
1725
  };
1699
1726
  const useShopHeader = ({
1700
1727
  header,
1701
- categories,
1728
+ categories = globalThis.$storefront.data.categories || [],
1702
1729
  menuCategorySlugs,
1703
1730
  menuRandomCategories = 7,
1704
1731
  isAlphabeticalSortSubmenu
@@ -2180,15 +2207,16 @@ function _sfc_ssrRender$7(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2180
2207
  if (!$setup.isOpen && $props.categoryTree.icon) {
2181
2208
  _push(ssrRenderComponent(_component_AImg, {
2182
2209
  picture: $props.categoryTree.icon,
2210
+ alt: $props.categoryTree.name,
2183
2211
  class: "w-auto h-5 inline mr-3"
2184
2212
  }, null, _parent));
2185
2213
  } else {
2186
2214
  _push(`<!---->`);
2187
2215
  }
2188
2216
  _push(`<h3 class="${ssrRenderClass([$setup.isOpen ? "ml-4 text-base" : null, "inline"])}">${ssrInterpolate($props.categoryTree.name)}</h3></summary><ul class="${ssrRenderClass([$setup.isFaded ? "opacity-20" : "opacity-100", "mt-2 transition-opacity"])}" tabindex="-1"><!--[-->`);
2189
- ssrRenderList($props.categoryTree.subcategories, (subcategoryTree) => {
2217
+ ssrRenderList($props.categoryTree.subcategories, (subcategoryTree, i) => {
2190
2218
  _push(ssrRenderComponent(_component_ShopSidenavCategory, {
2191
- key: subcategoryTree._id,
2219
+ key: i,
2192
2220
  "category-tree": subcategoryTree
2193
2221
  }, null, _parent));
2194
2222
  });
@@ -2198,6 +2226,7 @@ function _sfc_ssrRender$7(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2198
2226
  if (!$setup.isOpen && $props.categoryTree.icon) {
2199
2227
  _push(ssrRenderComponent(_component_AImg, {
2200
2228
  picture: $props.categoryTree.icon,
2229
+ alt: $props.categoryTree.name,
2201
2230
  class: "w-auto h-5 inline mr-3"
2202
2231
  }, null, _parent));
2203
2232
  } else {
@@ -2238,9 +2267,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2238
2267
  });
2239
2268
  function _sfc_ssrRender$6(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
2240
2269
  _push(`<aside${ssrRenderAttrs(mergeProps({ class: "flex flex-col h-full" }, _attrs))}><nav class="py-4 grow"><ul class="relative h-full"><!--[-->`);
2241
- ssrRenderList($props.categoryTrees, (categoryTree) => {
2270
+ ssrRenderList($props.categoryTrees, (categoryTree, i) => {
2242
2271
  _push(ssrRenderComponent($setup["ShopSidenavCategory"], {
2243
- key: categoryTree._id,
2272
+ key: i,
2244
2273
  "category-tree": categoryTree
2245
2274
  }, null, _parent));
2246
2275
  });
@@ -2286,7 +2315,16 @@ _sfc_main$6.setup = (props, ctx) => {
2286
2315
  const ShopSidenav = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["ssrRender", _sfc_ssrRender$6]]);
2287
2316
 
2288
2317
  const useShopHeaderSubmenu = (props) => {
2289
- const categoryPicture = computed(() => props.categoryTree.pictures?.[0]);
2318
+ const categoryPicture = computed(() => {
2319
+ const picture = props.categoryTree.pictures?.[0];
2320
+ if (picture && !picture.alt) {
2321
+ return {
2322
+ alt: props.categoryTree.name,
2323
+ ...picture
2324
+ };
2325
+ }
2326
+ return void 0;
2327
+ });
2290
2328
  const subcategoriesWithChild = computed(() => {
2291
2329
  return props.categoryTree.subcategories.filter(({ subcategories }) => subcategories.length);
2292
2330
  });
@@ -2429,7 +2467,7 @@ function _sfc_ssrRender$5(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2429
2467
  ])) : createCommentVNode("", true),
2430
2468
  (openBlock(true), createBlock(Fragment$1, null, renderList($setup.subcategoryCols, (subcategory, i) => {
2431
2469
  return openBlock(), createBlock("div", {
2432
- key: subcategory._id,
2470
+ key: i,
2433
2471
  class: "flex-1"
2434
2472
  }, [
2435
2473
  createVNode("a", {
@@ -2501,7 +2539,7 @@ function _sfc_ssrRender$5(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2501
2539
  ])) : createCommentVNode("", true),
2502
2540
  (openBlock(true), createBlock(Fragment$1, null, renderList($setup.subcategoryCols, (subcategory, i) => {
2503
2541
  return openBlock(), createBlock("div", {
2504
- key: subcategory._id,
2542
+ key: i,
2505
2543
  class: "flex-1"
2506
2544
  }, [
2507
2545
  createVNode("a", {
@@ -2586,7 +2624,7 @@ function _sfc_ssrRender$5(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2586
2624
  ])) : createCommentVNode("", true),
2587
2625
  (openBlock(true), createBlock(Fragment$1, null, renderList($setup.subcategoryCols, (subcategory, i) => {
2588
2626
  return openBlock(), createBlock("div", {
2589
- key: subcategory._id,
2627
+ key: i,
2590
2628
  class: "flex-1"
2591
2629
  }, [
2592
2630
  createVNode("a", {
@@ -3543,11 +3581,15 @@ const $$PageHeader = createComponent(async ($$result, $$props, $$slots) => {
3543
3581
  const { routeContext } = Astro2.locals;
3544
3582
  const { settings, isHomepage } = routeContext;
3545
3583
  const LogoHeading = isHomepage ? "h1" : "h2";
3546
- const { pitchBar, shopHeader } = await usePageHeader({ routeContext });
3584
+ const {
3585
+ pitchBar,
3586
+ shopHeader: { categories, ...shopHeader }
3587
+ } = await usePageHeader({ routeContext });
3547
3588
  return renderTemplate`${renderSlot($$result, $$slots["pitch-bar"], renderTemplate`
3548
3589
  ${pitchBar.slides.length > 1 && renderTemplate`${renderComponent($$result, "PitchBar", PitchBar, { ...pitchBar, "client:idle": true, "client:component-hydration": "idle", "client:component-path": "~/components/PitchBar.vue", "client:component-export": "default" })}`}
3549
3590
  ${pitchBar.slides.length === 1 && renderTemplate`${renderComponent($$result, "PitchBar", PitchBar, { ...pitchBar })}`}
3550
3591
 
3592
+ ${renderComponent($$result, "SharedData", $$SharedData, { "field": "categories", "value": categories?.map(({ _id, ...c }) => c) })}
3551
3593
  ${renderComponent($$result, "ShopHeader", ShopHeader, { ...shopHeader, "client:load": true, "client:component-hydration": "load", "client:component-path": "~/components/ShopHeader.vue", "client:component-export": "default" }, { "logo": ($$result2) => renderTemplate`${renderComponent($$result2, "Fragment", Fragment, { "slot": "logo" }, { "default": ($$result3) => renderTemplate`
3552
3594
  ${maybeRenderHead()}<a href="/">
3553
3595
  ${renderComponent($$result3, "LogoHeading", LogoHeading, {}, { "logo-picture": ($$result4) => renderTemplate`${renderComponent($$result4, "Picture", $$Picture, { "slot": "logo-picture", "src": settings.logo, "alt": settings.name, "widths": [300], "fetchpriority": "high", "loading": "eager", "class": "hover:drop-shadow-sm max-w-[150px] mx-auto" })}` })}
@@ -1,6 +1,6 @@
1
1
  import mime from 'mime';
2
2
  import sharp$1 from 'sharp';
3
- import { B as BaseSSRService, i as isOutputFormatSupportsAlpha } from './_...slug_.astro.c93fc36d.mjs';
3
+ import { B as BaseSSRService, i as isOutputFormatSupportsAlpha } from './_...slug_.astro.2e2d4770.mjs';
4
4
 
5
5
  class SharpService extends BaseSSRService {
6
6
  async transform(inputBuffer, transform) {
@@ -1,5 +1,5 @@
1
1
  import { c as createAstro, a as createComponent, r as renderTemplate, m as maybeRenderHead, d as addAttribute, b as renderComponent } from '../astro.e0968ba7.mjs';
2
- import { l as loadRouteContext, $ as $$BaseHead, a as $$PageHeader, b as $$Base } from './_...slug_.astro.c93fc36d.mjs';
2
+ import { l as loadRouteContext, $ as $$BaseHead, a as $$PageHeader, b as $$Base } from './_...slug_.astro.2e2d4770.mjs';
3
3
  import 'path-to-regexp';
4
4
  import 'cookie';
5
5
  import '@astrojs/internal-helpers/path';
@@ -1,5 +1,5 @@
1
1
  import { c as createAstro, a as createComponent, r as renderTemplate, b as renderComponent, m as maybeRenderHead, d as addAttribute, u as unescapeHTML, F as Fragment$1 } from '../astro.e0968ba7.mjs';
2
- import { c as $$Picture, p as parseShippingPhrase, _ as _export_sfc, C as Carousel, d as CarouselControl, e as availableExtraDiscount, f as installmentsOption, g as discountOption, h as loyaltyPointsPrograms, j as addProductToCart, l as loadRouteContext, $ as $$BaseHead, a as $$PageHeader, b as $$Base } from './_...slug_.astro.c93fc36d.mjs';
2
+ import { c as $$Picture, p as parseShippingPhrase, _ as _export_sfc, C as Carousel, d as CarouselControl, e as availableExtraDiscount, f as installmentsOption, g as discountOption, h as loyaltyPointsPrograms, j as addProductToCart, l as loadRouteContext, $ as $$BaseHead, a as $$PageHeader, b as $$Base } from './_...slug_.astro.2e2d4770.mjs';
3
3
  import { ref, shallowReactive, computed, useSSRContext, defineComponent, mergeProps, createVNode, resolveDynamicComponent, withCtx, renderSlot, createTextVNode, toDisplayString, withDirectives, vShow, openBlock, createBlock, Fragment, renderList, resolveComponent, createCommentVNode, withModifiers, withAsyncContext } from 'vue';
4
4
  import api from '@cloudcommerce/api';
5
5
  import { inStock, price, name, img, onPromotion } from '@ecomplus/utils';
@@ -288,11 +288,11 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
288
288
  });
289
289
  function _sfc_ssrRender$4(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
290
290
  _push(`<div${ssrRenderAttrs(mergeProps({
291
- class: ["mx-auto overflow-x-hidden", $setup.hasHeader ? "grid grid-cols-1 md:grid-cols-2 items-center" : null]
291
+ class: ["mx-auto overflow-x-hidden", $setup.hasHeader ? "grid grid-cols-1 sm:grid-cols-2 items-center" : null]
292
292
  }, _attrs))}>`);
293
293
  ssrRenderVNode(_push, createVNode(resolveDynamicComponent($props.href ? "a-link" : "span"), {
294
294
  href: $props.href,
295
- class: $setup.hasHeader ? "basis-1/2 grow-0 md:order-last" : null
295
+ class: $setup.hasHeader ? "sm:order-last [&_img]:max-w-full sm:[&_img]:max-w-none [&_img]:aspect-video sm:[&_img]:aspect-[2.5] [&_img]:object-cover" : "[&_img]:max-w-full"
296
296
  }, {
297
297
  default: withCtx((_, _push2, _parent2, _scopeId) => {
298
298
  if (_push2) {
@@ -306,7 +306,7 @@ function _sfc_ssrRender$4(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
306
306
  _: 3
307
307
  }), _parent);
308
308
  if ($setup.hasHeader) {
309
- _push(`<div class="basis-1/2 grow-0 p-12 xl:ps-32 mb-3 md:mb-0">`);
309
+ _push(`<div class="p-12 xl:ps-32 mb-3 sm:mb-0">`);
310
310
  if ($setup.parsedTitle) {
311
311
  ssrRenderVNode(_push, createVNode(resolveDynamicComponent($props.headingTag), { class: "ui-title mt-1" }, {
312
312
  default: withCtx((_, _push2, _parent2, _scopeId) => {
@@ -641,7 +641,7 @@ const usePrices = (props) => {
641
641
  return 1;
642
642
  }
643
643
  const minInstallment = installmentsObject.value.min_installment || 5;
644
- const maxInstallmentsNumber = Math.round(salePrice.value / minInstallment);
644
+ const maxInstallmentsNumber = Math.floor(salePrice.value / minInstallment);
645
645
  return Math.min(maxInstallmentsNumber, installmentsObject.value.max_number);
646
646
  });
647
647
  const monthlyInterest = computed(() => {
@@ -26,7 +26,7 @@ import 'html-escaper';
26
26
  import 'vue';
27
27
  import 'vue/server-renderer';
28
28
  import '@ecomplus/utils';
29
- import './chunks/pages/_...slug_.astro.c93fc36d.mjs';
29
+ import './chunks/pages/_...slug_.astro.2e2d4770.mjs';
30
30
  import 'node:fs/promises';
31
31
  import 'node:path';
32
32
  import 'node:url';
@@ -2825,13 +2825,13 @@ const adapter = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
2825
2825
  start
2826
2826
  }, Symbol.toStringTag, { value: 'Module' }));
2827
2827
 
2828
- const _page0 = () => import('./chunks/endpoint@_@js.631ff6c5.mjs');
2829
- const _page1 = () => import('./chunks/index@_@astro.69eb5e8a.mjs');
2830
- const _page2 = () => import('./chunks/fallback@_@astro.12cf85ba.mjs');
2831
- const _page3 = () => import('./chunks/index@_@astro.a20d91aa.mjs');
2832
- const _page4 = () => import('./chunks/account@_@astro.1b311a3d.mjs');
2833
- const _page5 = () => import('./chunks/_...d496b072.mjs');const pageMap = new Map([["../../node_modules/.pnpm/@astrojs+image@0.17.2_astro@2.9.2_sharp@0.32.4/node_modules/@astrojs/image/dist/endpoint.js", _page0],["src/pages/index.astro", _page1],["src/pages/fallback.astro", _page2],["src/pages/app/index.astro", _page3],["src/pages/app/account.astro", _page4],["src/pages/[...slug].astro", _page5]]);
2834
- const _manifest = Object.assign(deserializeManifest({"adapterName":"@astrojs/node","routes":[{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"type":"endpoint","route":"/_image","pattern":"^\\/_image$","segments":[[{"content":"_image","dynamic":false,"spread":false}]],"params":[],"component":"../../node_modules/.pnpm/@astrojs+image@0.17.2_astro@2.9.2_sharp@0.32.4/node_modules/@astrojs/image/dist/endpoint.js","pathname":"/_image","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.572313d6.js"}],"styles":[{"type":"external","src":"/_astro/_...slug_.2f4f6929.css"}],"routeData":{"route":"/","type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.572313d6.js"}],"styles":[{"type":"external","src":"/_astro/_...slug_.2f4f6929.css"}],"routeData":{"route":"/fallback","type":"page","pattern":"^\\/fallback\\/?$","segments":[[{"content":"fallback","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/fallback.astro","pathname":"/fallback","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/app","type":"page","pattern":"^\\/app\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/index.astro","pathname":"/app","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/app/account","type":"page","pattern":"^\\/app\\/account\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}],[{"content":"account","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/account.astro","pathname":"/app/account","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.572313d6.js"}],"styles":[{"type":"external","src":"/_astro/_...slug_.2f4f6929.css"}],"routeData":{"route":"/[...slug]","type":"page","pattern":"^(?:\\/(.*?))?\\/?$","segments":[[{"content":"...slug","dynamic":true,"spread":true}]],"params":["...slug"],"component":"src/pages/[...slug].astro","prerender":false,"_meta":{"trailingSlash":"ignore"}}}],"site":"https://ecom2-demo.web.app","base":"/","compressHTML":false,"markdown":{"drafts":false,"syntaxHighlight":"shiki","shikiConfig":{"langs":[],"theme":"github-dark","wrap":false},"remarkPlugins":[],"rehypePlugins":[],"remarkRehype":{},"gfm":true,"smartypants":true},"componentMetadata":[["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/[...slug].astro",{"propagation":"none","containsHead":true}],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/fallback.astro",{"propagation":"none","containsHead":true}],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/index.astro",{"propagation":"none","containsHead":true}]],"renderers":[],"clientDirectives":[["idle","(()=>{var i=t=>{let e=async()=>{await(await t())()};\"requestIdleCallback\"in window?window.requestIdleCallback(e):setTimeout(e,200)};(self.Astro||(self.Astro={})).idle=i;window.dispatchEvent(new Event(\"astro:idle\"));})();"],["load","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).load=e;window.dispatchEvent(new Event(\"astro:load\"));})();"],["media","(()=>{var s=(i,t)=>{let a=async()=>{await(await i())()};if(t.value){let e=matchMedia(t.value);e.matches?a():e.addEventListener(\"change\",a,{once:!0})}};(self.Astro||(self.Astro={})).media=s;window.dispatchEvent(new Event(\"astro:media\"));})();"],["only","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).only=e;window.dispatchEvent(new Event(\"astro:only\"));})();"],["visible","(()=>{var r=(i,c,n)=>{let s=async()=>{await(await i())()},t=new IntersectionObserver(e=>{for(let o of e)if(o.isIntersecting){t.disconnect(),s();break}});for(let e of n.children)t.observe(e)};(self.Astro||(self.Astro={})).visible=r;window.dispatchEvent(new Event(\"astro:visible\"));})();"]],"entryModules":{"\u0000@astrojs-ssr-virtual-entry":"_@astrojs-ssr-virtual-entry.mjs","\u0000@astro-renderers":"renderers.mjs","\u0000empty-middleware":"_empty-middleware.mjs","/src/pages/app/account.astro":"chunks/pages/account.astro.0003ca94.mjs","/src/pages/fallback.astro":"chunks/pages/fallback.astro.58c7e581.mjs","\u0000@astro-page:../../node_modules/.pnpm/@astrojs+image@0.17.2_astro@2.9.2_sharp@0.32.4/node_modules/@astrojs/image/dist/endpoint@_@js":"chunks/endpoint@_@js.631ff6c5.mjs","\u0000@astro-page:src/pages/index@_@astro":"chunks/index@_@astro.69eb5e8a.mjs","\u0000@astro-page:src/pages/fallback@_@astro":"chunks/fallback@_@astro.12cf85ba.mjs","\u0000@astro-page:src/pages/app/index@_@astro":"chunks/index@_@astro.a20d91aa.mjs","\u0000@astro-page:src/pages/app/account@_@astro":"chunks/account@_@astro.1b311a3d.mjs","\u0000@astro-page:src/pages/[...slug]@_@astro":"chunks/_...d496b072.mjs","/astro/hoisted.js?q=0":"_astro/hoisted.572313d6.js","~/components/PitchBar.vue":"_astro/PitchBar.ed85833a.js","~/components/HeroSlider.vue":"_astro/HeroSlider.0890631f.js","~/components/ProductShelf.vue":"_astro/ProductShelf.9e290480.js","/home/leo/code/ecomplus/cloud-commerce/node_modules/workbox-window/build/workbox-window.prod.es5.mjs":"_astro/workbox-window.prod.es5.a7b12eab.js","@astrojs/vue/client.js":"_astro/client.0fb6b44e.js","~/components/ShopHeader.vue":"_astro/ShopHeader.82ae97a5.js","/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/scripts/firebase-app.ts":"_astro/firebase-app.84207480.js","astro:scripts/before-hydration.js":""},"assets":["/_astro/_...slug_.2f4f6929.css","/manifest.webmanifest","/robots.txt","/sw.js","/workbox-5e0bf4e4.js","/_astro/Carousel.62c97a79.js","/_astro/HeroSlider.0890631f.js","/_astro/PitchBar.ed85833a.js","/_astro/ProductShelf.9e290480.js","/_astro/ShopHeader.82ae97a5.js","/_astro/_plugin-vue_export-helper.4cb7dd76.js","/_astro/api.4984c5be.js","/_astro/client.0fb6b44e.js","/_astro/firebase-app.84207480.js","/_astro/hoisted.572313d6.js","/_astro/img.abbe849f.js","/_astro/index.b93f3d06.js","/_astro/preload-helper.cf010ec4.js","/_astro/session-utm.744b0db3.js","/_astro/workbox-window.prod.es5.a7b12eab.js","/img/icon.png","/img/large-icon.png","/img/uploads/banner2.webp","/img/uploads/ecom-icon.png","/img/uploads/headphone.webp","/img/uploads/logo.png","/img/uploads/og-image.png","/img/uploads/passion.webp","/img/uploads/rect8589.png","/img/uploads/rect859.png","/img/uploads/rect89.webp"]}), {
2828
+ const _page0 = () => import('./chunks/endpoint@_@js.35380ea5.mjs');
2829
+ const _page1 = () => import('./chunks/index@_@astro.fec107b9.mjs');
2830
+ const _page2 = () => import('./chunks/fallback@_@astro.dbc26d2d.mjs');
2831
+ const _page3 = () => import('./chunks/index@_@astro.c91e679e.mjs');
2832
+ const _page4 = () => import('./chunks/account@_@astro.460623ee.mjs');
2833
+ const _page5 = () => import('./chunks/_...fac94758.mjs');const pageMap = new Map([["../../node_modules/.pnpm/@astrojs+image@0.17.2_astro@2.9.2_sharp@0.32.4/node_modules/@astrojs/image/dist/endpoint.js", _page0],["src/pages/index.astro", _page1],["src/pages/fallback.astro", _page2],["src/pages/app/index.astro", _page3],["src/pages/app/account.astro", _page4],["src/pages/[...slug].astro", _page5]]);
2834
+ const _manifest = Object.assign(deserializeManifest({"adapterName":"@astrojs/node","routes":[{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"type":"endpoint","route":"/_image","pattern":"^\\/_image$","segments":[[{"content":"_image","dynamic":false,"spread":false}]],"params":[],"component":"../../node_modules/.pnpm/@astrojs+image@0.17.2_astro@2.9.2_sharp@0.32.4/node_modules/@astrojs/image/dist/endpoint.js","pathname":"/_image","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.572313d6.js"}],"styles":[{"type":"external","src":"/_astro/_...slug_.c13e0486.css"}],"routeData":{"route":"/","type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.572313d6.js"}],"styles":[{"type":"external","src":"/_astro/_...slug_.c13e0486.css"}],"routeData":{"route":"/fallback","type":"page","pattern":"^\\/fallback\\/?$","segments":[[{"content":"fallback","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/fallback.astro","pathname":"/fallback","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/app","type":"page","pattern":"^\\/app\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/index.astro","pathname":"/app","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/app/account","type":"page","pattern":"^\\/app\\/account\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}],[{"content":"account","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/account.astro","pathname":"/app/account","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.572313d6.js"}],"styles":[{"type":"external","src":"/_astro/_...slug_.c13e0486.css"}],"routeData":{"route":"/[...slug]","type":"page","pattern":"^(?:\\/(.*?))?\\/?$","segments":[[{"content":"...slug","dynamic":true,"spread":true}]],"params":["...slug"],"component":"src/pages/[...slug].astro","prerender":false,"_meta":{"trailingSlash":"ignore"}}}],"site":"https://ecom2-demo.web.app","base":"/","compressHTML":false,"markdown":{"drafts":false,"syntaxHighlight":"shiki","shikiConfig":{"langs":[],"theme":"github-dark","wrap":false},"remarkPlugins":[],"rehypePlugins":[],"remarkRehype":{},"gfm":true,"smartypants":true},"componentMetadata":[["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/[...slug].astro",{"propagation":"none","containsHead":true}],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/fallback.astro",{"propagation":"none","containsHead":true}],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/index.astro",{"propagation":"none","containsHead":true}]],"renderers":[],"clientDirectives":[["idle","(()=>{var i=t=>{let e=async()=>{await(await t())()};\"requestIdleCallback\"in window?window.requestIdleCallback(e):setTimeout(e,200)};(self.Astro||(self.Astro={})).idle=i;window.dispatchEvent(new Event(\"astro:idle\"));})();"],["load","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).load=e;window.dispatchEvent(new Event(\"astro:load\"));})();"],["media","(()=>{var s=(i,t)=>{let a=async()=>{await(await i())()};if(t.value){let e=matchMedia(t.value);e.matches?a():e.addEventListener(\"change\",a,{once:!0})}};(self.Astro||(self.Astro={})).media=s;window.dispatchEvent(new Event(\"astro:media\"));})();"],["only","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).only=e;window.dispatchEvent(new Event(\"astro:only\"));})();"],["visible","(()=>{var r=(i,c,n)=>{let s=async()=>{await(await i())()},t=new IntersectionObserver(e=>{for(let o of e)if(o.isIntersecting){t.disconnect(),s();break}});for(let e of n.children)t.observe(e)};(self.Astro||(self.Astro={})).visible=r;window.dispatchEvent(new Event(\"astro:visible\"));})();"]],"entryModules":{"\u0000@astrojs-ssr-virtual-entry":"_@astrojs-ssr-virtual-entry.mjs","\u0000@astro-renderers":"renderers.mjs","\u0000empty-middleware":"_empty-middleware.mjs","/src/pages/app/account.astro":"chunks/pages/account.astro.0003ca94.mjs","/src/pages/fallback.astro":"chunks/pages/fallback.astro.fc8bc7e7.mjs","\u0000@astro-page:../../node_modules/.pnpm/@astrojs+image@0.17.2_astro@2.9.2_sharp@0.32.4/node_modules/@astrojs/image/dist/endpoint@_@js":"chunks/endpoint@_@js.35380ea5.mjs","\u0000@astro-page:src/pages/index@_@astro":"chunks/index@_@astro.fec107b9.mjs","\u0000@astro-page:src/pages/fallback@_@astro":"chunks/fallback@_@astro.dbc26d2d.mjs","\u0000@astro-page:src/pages/app/index@_@astro":"chunks/index@_@astro.c91e679e.mjs","\u0000@astro-page:src/pages/app/account@_@astro":"chunks/account@_@astro.460623ee.mjs","\u0000@astro-page:src/pages/[...slug]@_@astro":"chunks/_...fac94758.mjs","~/components/PitchBar.vue":"_astro/PitchBar.ed85833a.js","@astrojs/vue/client.js":"_astro/client.0fb6b44e.js","~/components/ProductShelf.vue":"_astro/ProductShelf.35614736.js","~/components/HeroSlider.vue":"_astro/HeroSlider.cea1f361.js","/astro/hoisted.js?q=0":"_astro/hoisted.572313d6.js","/home/leo/code/ecomplus/cloud-commerce/node_modules/workbox-window/build/workbox-window.prod.es5.mjs":"_astro/workbox-window.prod.es5.a7b12eab.js","~/components/ShopHeader.vue":"_astro/ShopHeader.dbe9c1f1.js","/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/scripts/firebase-app.ts":"_astro/firebase-app.84207480.js","astro:scripts/before-hydration.js":""},"assets":["/_astro/_...slug_.c13e0486.css","/manifest.webmanifest","/robots.txt","/sw.js","/workbox-5e0bf4e4.js","/_astro/Carousel.62c97a79.js","/_astro/HeroSlider.cea1f361.js","/_astro/PitchBar.ed85833a.js","/_astro/ProductShelf.35614736.js","/_astro/ShopHeader.dbe9c1f1.js","/_astro/_plugin-vue_export-helper.4cb7dd76.js","/_astro/api.4984c5be.js","/_astro/client.0fb6b44e.js","/_astro/firebase-app.84207480.js","/_astro/hoisted.572313d6.js","/_astro/img.abbe849f.js","/_astro/index.b93f3d06.js","/_astro/preload-helper.cf010ec4.js","/_astro/session-utm.744b0db3.js","/_astro/workbox-window.prod.es5.a7b12eab.js","/img/icon.png","/img/large-icon.png","/img/uploads/banner2.webp","/img/uploads/ecom-icon.png","/img/uploads/headphone.webp","/img/uploads/logo.png","/img/uploads/og-image.png","/img/uploads/passion.webp","/img/uploads/rect8589.png","/img/uploads/rect859.png","/img/uploads/rect89.webp"]}), {
2835
2835
  pageMap,
2836
2836
  renderers,
2837
2837
  });
@@ -2,7 +2,7 @@ import { h as server_default } from './chunks/astro.e0968ba7.mjs';
2
2
  import { useSSRContext, defineComponent, computed, mergeProps, h, createSSRApp } from 'vue';
3
3
  import { ssrRenderSlotInner, ssrRenderAttrs, ssrRenderSlot, renderToString } from 'vue/server-renderer';
4
4
  import { img, imgSizes, i18n, formatMoney } from '@ecomplus/utils';
5
- import { _ as _export_sfc } from './chunks/pages/_...slug_.astro.c93fc36d.mjs';
5
+ import { _ as _export_sfc } from './chunks/pages/_...slug_.astro.2e2d4770.mjs';
6
6
  import 'path-to-regexp';
7
7
  import 'cookie';
8
8
  import '@astrojs/internal-helpers/path';
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/storefront",
3
3
  "type": "module",
4
- "version": "0.22.1",
4
+ "version": "0.22.2",
5
5
  "description": "E-Com Plus Cloud Commerce storefront with Astro",
6
6
  "bin": {
7
7
  "storefront": "./scripts/build-prod.sh"
@@ -25,4 +25,5 @@ export type $Storefront = {
25
25
  doc: CollectionSet,
26
26
  timestamp: number,
27
27
  },
28
+ data: Record<string, any>,
28
29
  };
@@ -0,0 +1,13 @@
1
+ ---
2
+ export interface Props {
3
+ field: string;
4
+ value: any;
5
+ }
6
+
7
+ const { field, value } = Astro.props;
8
+ global.$storefront.data[field] = value;
9
+ let inlineClientJS = `
10
+ window.$storefront.data['${field}'] = ${JSON.stringify(value)};`;
11
+ ---
12
+
13
+ <script is:inline set:html={inlineClientJS} />
@@ -88,7 +88,7 @@ const usePrices = (props: Props) => {
88
88
  return 1;
89
89
  }
90
90
  const minInstallment = installmentsObject.value.min_installment || 5;
91
- const maxInstallmentsNumber = Math.round(salePrice.value / minInstallment);
91
+ const maxInstallmentsNumber = Math.floor(salePrice.value / minInstallment);
92
92
  return Math.min(maxInstallmentsNumber, installmentsObject.value.max_number);
93
93
  });
94
94
  const monthlyInterest = computed(() => {