cloudcommerce 2.0.8 → 2.1.0

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 (214) hide show
  1. package/.husky/pre-commit +4 -0
  2. package/.vscode/settings.json +7 -2
  3. package/CHANGELOG.md +24 -0
  4. package/LICENSE +21 -0
  5. package/action.yml +43 -3
  6. package/ecomplus-stores/barra-doce/.github/workflows/build-and-deploy.yml +1 -0
  7. package/ecomplus-stores/barra-doce/.husky/pre-commit +4 -0
  8. package/ecomplus-stores/barra-doce/.vscode/settings.json +7 -1
  9. package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
  10. package/ecomplus-stores/barra-doce/functions/ssr/.staged.eslintrc.cjs +6 -0
  11. package/ecomplus-stores/barra-doce/functions/ssr/package.json +8 -7
  12. package/ecomplus-stores/barra-doce/functions/ssr/src/components/AccountMenu.vue +4 -1
  13. package/ecomplus-stores/barra-doce/functions/ssr/src/components/AccountPage.vue +6 -3
  14. package/ecomplus-stores/barra-doce/functions/ssr/src/components/Banner.vue +2 -1
  15. package/ecomplus-stores/barra-doce/functions/ssr/src/components/BlogPosts.vue +8 -2
  16. package/ecomplus-stores/barra-doce/functions/ssr/src/components/Breadcrumbs.vue +4 -1
  17. package/ecomplus-stores/barra-doce/functions/ssr/src/components/CartItem.vue +4 -3
  18. package/ecomplus-stores/barra-doce/functions/ssr/src/components/CartSidebar.vue +1 -1
  19. package/ecomplus-stores/barra-doce/functions/ssr/src/components/CheckoutPage.vue +2 -2
  20. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ContentEntry.vue +1 -1
  21. package/ecomplus-stores/barra-doce/functions/ssr/src/components/FooterStamps.vue +8 -6
  22. package/ecomplus-stores/barra-doce/functions/ssr/src/components/HeroSlider.vue +7 -3
  23. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ImagesGallery.vue +13 -11
  24. package/ecomplus-stores/barra-doce/functions/ssr/src/components/LoginForm.vue +1 -1
  25. package/ecomplus-stores/barra-doce/functions/ssr/src/components/PitchBar.vue +5 -2
  26. package/ecomplus-stores/barra-doce/functions/ssr/src/components/Prices.vue +1 -1
  27. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductCard.vue +13 -13
  28. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductDetails.vue +1 -1
  29. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductShelf.vue +9 -6
  30. package/ecomplus-stores/barra-doce/functions/ssr/src/components/SearchModal.vue +1 -1
  31. package/ecomplus-stores/barra-doce/functions/ssr/src/components/SearchShowcase.vue +8 -9
  32. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopFooter.vue +15 -6
  33. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeader.vue +11 -15
  34. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeaderMenu.vue +6 -3
  35. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeaderSubmenu.vue +7 -4
  36. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopSidenav.vue +5 -2
  37. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopSidenavCategory.vue +3 -2
  38. package/ecomplus-stores/barra-doce/functions/ssr/src/components/SkuSelector.vue +8 -5
  39. package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/PageFooter.astro +1 -2
  40. package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/PageHeader.astro +2 -1
  41. package/ecomplus-stores/barra-doce/functions/ssr/src/main/Fallback.astro +3 -3
  42. package/ecomplus-stores/barra-doce/functions/ssr/src/main/Main.astro +2 -2
  43. package/ecomplus-stores/barra-doce/functions/ssr/src/pages/[...slug].astro +13 -5
  44. package/ecomplus-stores/barra-doce/functions/ssr/src/scripts/InlineScripts.astro +8 -8
  45. package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
  46. package/ecomplus-stores/barra-doce/package.json +10 -3
  47. package/ecomplus-stores/barra-doce/tailwind.config.cjs +5 -0
  48. package/ecomplus-stores/tia-sonia/.vscode/settings.json +7 -1
  49. package/package.json +13 -8
  50. package/packages/__skeleton/package.json +1 -1
  51. package/packages/api/lib/api.js +1 -1
  52. package/packages/api/lib/api.js.map +1 -1
  53. package/packages/api/package.json +2 -2
  54. package/packages/api/src/api.ts +1 -1
  55. package/packages/apps/affiliate-program/package.json +2 -2
  56. package/packages/apps/correios/package.json +2 -2
  57. package/packages/apps/custom-payment/package.json +2 -2
  58. package/packages/apps/custom-shipping/package.json +2 -2
  59. package/packages/apps/datafrete/package.json +2 -2
  60. package/packages/apps/discounts/package.json +2 -2
  61. package/packages/apps/emails/package.json +2 -2
  62. package/packages/apps/fb-conversions/package.json +2 -2
  63. package/packages/apps/flash-courier/package.json +2 -2
  64. package/packages/apps/frenet/package.json +2 -2
  65. package/packages/apps/galaxpay/package.json +2 -2
  66. package/packages/apps/google-analytics/package.json +2 -2
  67. package/packages/apps/jadlog/package.json +2 -2
  68. package/packages/apps/loyalty-points/package.json +2 -2
  69. package/packages/apps/mandae/package.json +2 -2
  70. package/packages/apps/melhor-envio/package.json +2 -2
  71. package/packages/apps/mercadopago/package.json +2 -2
  72. package/packages/apps/pagarme/package.json +2 -2
  73. package/packages/apps/pagarme-v5/package.json +2 -2
  74. package/packages/apps/paghiper/package.json +2 -2
  75. package/packages/apps/pix/package.json +2 -2
  76. package/packages/apps/tiny-erp/package.json +2 -2
  77. package/packages/apps/webhooks/package.json +2 -2
  78. package/packages/cli/ci/bunny-config-base.sh +169 -0
  79. package/packages/cli/ci/bunny-prepare-ab.sh +164 -0
  80. package/packages/cli/config/firebase.json +13 -0
  81. package/packages/cli/lib/cli.js +17 -3
  82. package/packages/cli/package.json +3 -2
  83. package/packages/cli/src/cli.ts +17 -7
  84. package/packages/config/package.json +2 -2
  85. package/packages/emails/package.json +2 -2
  86. package/packages/eslint/base.eslintrc.cjs +3 -2
  87. package/packages/eslint/package.json +5 -4
  88. package/packages/eslint/storefront.eslintrc.cjs +17 -2
  89. package/packages/eslint/storefront.staged.eslintrc.cjs +9 -0
  90. package/packages/events/package.json +2 -2
  91. package/packages/feeds/package.json +2 -2
  92. package/packages/firebase/package.json +3 -3
  93. package/packages/i18n/package.json +2 -2
  94. package/packages/modules/package.json +2 -2
  95. package/packages/passport/package.json +2 -2
  96. package/packages/ssr/package.json +6 -6
  97. package/packages/storefront/dist/client/_astro/{AccountPage.sfdU6Ju1.js → AccountPage.9BlGHXT3.js} +1 -1
  98. package/packages/storefront/dist/client/_astro/CartSidebar.55UgTcV0.js +1 -0
  99. package/packages/storefront/dist/client/_astro/{HeroSlider.GWgaYE3A.js → HeroSlider.XZb2xsyV.js} +1 -1
  100. package/packages/storefront/dist/client/_astro/{PitchBar._m4Oyh26.js → PitchBar.Nr7T3S3T.js} +1 -1
  101. package/packages/storefront/dist/client/_astro/{Prices.ij-wiXyI.js → Prices.Ye-m2HTo.js} +1 -1
  102. package/packages/storefront/dist/client/_astro/ProductDetails.ENLKdSz_.js +7 -0
  103. package/packages/storefront/dist/client/_astro/ProductShelf.CNf5JDrU.js +1 -0
  104. package/packages/storefront/dist/client/_astro/ProductShelf.lCBJky3e.js +1 -0
  105. package/packages/storefront/dist/client/_astro/{QuantitySelector.BLGwL_-E.js → QuantitySelector.tumfWDjC.js} +1 -1
  106. package/packages/storefront/dist/client/_astro/{SearchModal.3j8PYOg4.js → SearchModal.4osqtafp.js} +1 -1
  107. package/packages/storefront/dist/client/_astro/{SearchShowcase.na8UFES5.js → SearchShowcase.hg6TWrz3.js} +1 -1
  108. package/packages/storefront/dist/client/_astro/ShopHeader.xLMeJpqV.js +7 -0
  109. package/packages/storefront/dist/client/_astro/{_plugin-vue_export-helper.zwYIxbLv.js → _plugin-vue_export-helper.SO-0jCqa.js} +2 -2
  110. package/packages/storefront/dist/client/_astro/{_slug_.gHu56-HX.css → _slug_.r344YGqG.css} +1 -1
  111. package/packages/storefront/dist/client/_astro/client.ZhEmw4hZ.js +1 -0
  112. package/packages/storefront/dist/client/_astro/{customer-session.zys3PDaD.js → customer-session.hXdZh5Ii.js} +1 -1
  113. package/packages/storefront/dist/client/_astro/{format-money.85X7Tchr.js → format-money.iK5LGydz.js} +1 -1
  114. package/packages/storefront/dist/client/_astro/{grid-title.tJFKNjnT.js → grid-title.vGKBy72g.js} +1 -1
  115. package/packages/storefront/dist/client/_astro/{hoisted.J3ui9KfA.js → hoisted.HGTzAuTI.js} +1 -1
  116. package/packages/storefront/dist/client/_astro/{hoisted.3l9XzKQq.js → hoisted.J15ErMtK.js} +1 -1
  117. package/packages/storefront/dist/client/_astro/hoisted.KYhwGfsv.js +1 -0
  118. package/packages/storefront/dist/client/_astro/{i18n.vH3oaO8m.js → i18n.Lxnz1oF-.js} +1 -1
  119. package/packages/storefront/dist/client/_astro/{img.PXVYiEi4.js → img.WnsidxCx.js} +1 -1
  120. package/packages/storefront/dist/client/_astro/{index._z3KfWlu.js → index.R7A-Pg5V.js} +1 -1
  121. package/packages/storefront/dist/client/_astro/{index.ZVw4Qnet.js → index.q6KIyKlJ.js} +1 -1
  122. package/packages/storefront/dist/client/_astro/{modules-info.39sWCsAH.js → modules-info.tVRhvxNm.js} +1 -1
  123. package/packages/storefront/dist/client/_astro/name.urFqJ5yn.js +1 -0
  124. package/packages/storefront/dist/client/_astro/runtime-core.esm-bundler.XTSAdOlw.js +13 -0
  125. package/packages/storefront/dist/client/_astro/{shopping-cart.bLFDGb3i.js → shopping-cart.ZdSCrjS6.js} +1 -1
  126. package/packages/storefront/dist/client/_astro/{use-analytics.qryUNUh7.js → use-analytics.tCrQbW8O.js} +1 -1
  127. package/packages/storefront/dist/client/_astro/{use-product-card.h3dJsLOD.js → use-product-card.-9TsgDDW.js} +1 -1
  128. package/packages/storefront/dist/client/_astro/use-text-value.XE_A2nDM.js +4 -0
  129. package/packages/storefront/dist/server/chunks/{CartSidebar_8VAKl-jR.mjs → CartSidebar_7UWmGIF6.mjs} +5 -5
  130. package/packages/storefront/dist/server/chunks/{SearchModal_7debttOi.mjs → SearchModal_MNdcYMws.mjs} +4 -4
  131. package/packages/storefront/dist/server/chunks/{_.._D6rq0cLa.mjs → _.._h5R83hoK.mjs} +1 -1
  132. package/packages/storefront/dist/server/chunks/{_page__WXDIwV7g.mjs → _page__lWVlZyRe.mjs} +1 -1
  133. package/packages/storefront/dist/server/chunks/{account_DOT2RzND.mjs → account_jmelxnlw.mjs} +1 -1
  134. package/packages/storefront/dist/server/chunks/astro/{assets-service_gJYJeEDH.mjs → assets-service_xNulQtBO.mjs} +1 -1
  135. package/packages/storefront/dist/server/chunks/{astro_H-6uiAAG.mjs → astro_tggR3S_9.mjs} +2 -2
  136. package/packages/storefront/dist/server/chunks/{index_eXlHIU83.mjs → index_e3ytAL8v.mjs} +1 -1
  137. package/packages/storefront/dist/server/chunks/{node_-eQO2yOn.mjs → node_kUJIRL0c.mjs} +1 -1
  138. package/packages/storefront/dist/server/chunks/pages/{__fI3NeWvy.mjs → __wihn0dYD.mjs} +864 -856
  139. package/packages/storefront/dist/server/chunks/pages/{_page__Piz8geXW.mjs → _page__Sb1eYhpz.mjs} +2 -2
  140. package/packages/storefront/dist/server/chunks/pages/{account_6pD7OYw-.mjs → account_-mULVQUB.mjs} +2 -2
  141. package/packages/storefront/dist/server/chunks/pages/{index_2F5yi6YO.mjs → index_mQXYNYRg.mjs} +4 -4
  142. package/packages/storefront/dist/server/chunks/pages/{node_-Buhxl8v.mjs → node_-qe5LuQh.mjs} +3 -3
  143. package/packages/storefront/dist/server/chunks/pages/{~fallback_okEL1qQ3.mjs → ~fallback_ad_xyGHU.mjs} +4 -4
  144. package/packages/storefront/dist/server/chunks/~fallback_EZqiEAFE.mjs +6 -0
  145. package/packages/storefront/dist/server/entry.mjs +376 -307
  146. package/packages/storefront/dist/server/manifest_RrmXPEuL.mjs +196 -0
  147. package/packages/storefront/dist/server/renderers.mjs +1 -1
  148. package/packages/storefront/package.json +9 -8
  149. package/packages/storefront/src/lib/components/BannerPictures.astro +7 -6
  150. package/packages/storefront/src/lib/components/CarouselControl.vue +2 -2
  151. package/packages/storefront/src/lib/components/ContentClearfix.vue +1 -1
  152. package/packages/storefront/src/lib/components/Drawer.vue +2 -2
  153. package/packages/storefront/src/lib/components/Picture.astro +2 -2
  154. package/packages/storefront/src/lib/components/QuantitySelectorControl.vue +2 -2
  155. package/packages/storefront/src/lib/components/ViewTransitions.astro +1 -0
  156. package/packages/storefront/src/lib/layouts/BaseBody.astro +3 -3
  157. package/packages/storefront/src/lib/layouts/BaseHead.astro +29 -29
  158. package/packages/test-base/package.json +2 -2
  159. package/packages/types/package.json +2 -2
  160. package/tailwind.config.cjs +5 -0
  161. package/LICENSE.md +0 -230
  162. package/packages/storefront/dist/client/_astro/CartSidebar.1fFe2RGR.js +0 -1
  163. package/packages/storefront/dist/client/_astro/ProductDetails.WXj4miM3.js +0 -7
  164. package/packages/storefront/dist/client/_astro/ProductShelf.GkYOYehE.js +0 -1
  165. package/packages/storefront/dist/client/_astro/ProductShelf.I8ZQzwkT.js +0 -1
  166. package/packages/storefront/dist/client/_astro/ShopHeader.27oTzgGP.js +0 -7
  167. package/packages/storefront/dist/client/_astro/client.guyl5T6O.js +0 -1
  168. package/packages/storefront/dist/client/_astro/ecom-icon_12falx.png +0 -0
  169. package/packages/storefront/dist/client/_astro/ecom-icon_15pqnO.png +0 -0
  170. package/packages/storefront/dist/client/_astro/ecom-icon_t3guw.png +0 -0
  171. package/packages/storefront/dist/client/_astro/headphone_T2Jjc.avif +0 -0
  172. package/packages/storefront/dist/client/_astro/headphone_Z1CG18r.webp +0 -0
  173. package/packages/storefront/dist/client/_astro/hoisted.X6EeZJCY.js +0 -1
  174. package/packages/storefront/dist/client/_astro/logo_1UBsBq.webp +0 -0
  175. package/packages/storefront/dist/client/_astro/logo_Z1K5PE9.png +0 -0
  176. package/packages/storefront/dist/client/_astro/logo_Z1KIIl1.avif +0 -0
  177. package/packages/storefront/dist/client/_astro/name.LjTu3VQY.js +0 -1
  178. package/packages/storefront/dist/client/_astro/passion_LHbe9.webp +0 -0
  179. package/packages/storefront/dist/client/_astro/passion_Z23MeUb.avif +0 -0
  180. package/packages/storefront/dist/client/_astro/rect8589_1TtOHY.png +0 -0
  181. package/packages/storefront/dist/client/_astro/rect8589_1f5opX.webp +0 -0
  182. package/packages/storefront/dist/client/_astro/rect8589_IUskt.webp +0 -0
  183. package/packages/storefront/dist/client/_astro/rect8589_Uxfdf.png +0 -0
  184. package/packages/storefront/dist/client/_astro/rect8589_Z15uApA.png +0 -0
  185. package/packages/storefront/dist/client/_astro/rect8589_Z1Ap1Im.avif +0 -0
  186. package/packages/storefront/dist/client/_astro/rect8589_Z1JT1HB.webp +0 -0
  187. package/packages/storefront/dist/client/_astro/rect8589_ZY9mtN.avif +0 -0
  188. package/packages/storefront/dist/client/_astro/rect8589_tMFW0.avif +0 -0
  189. package/packages/storefront/dist/client/_astro/rect859_1TgQXS.avif +0 -0
  190. package/packages/storefront/dist/client/_astro/rect859_2Nm1z.avif +0 -0
  191. package/packages/storefront/dist/client/_astro/rect859_DIqwR.png +0 -0
  192. package/packages/storefront/dist/client/_astro/rect859_Z1IKDb2.png +0 -0
  193. package/packages/storefront/dist/client/_astro/rect859_Z29FI4V.webp +0 -0
  194. package/packages/storefront/dist/client/_astro/rect859_Z2kFHGk.avif +0 -0
  195. package/packages/storefront/dist/client/_astro/rect859_ZkpPFI.webp +0 -0
  196. package/packages/storefront/dist/client/_astro/rect859_jXzBi.png +0 -0
  197. package/packages/storefront/dist/client/_astro/rect859_x1l16.webp +0 -0
  198. package/packages/storefront/dist/client/_astro/rect89_1TSfW7.avif +0 -0
  199. package/packages/storefront/dist/client/_astro/rect89_Z1re32x.webp +0 -0
  200. package/packages/storefront/dist/client/_astro/runtime-core.esm-bundler.arxvxBux.js +0 -13
  201. package/packages/storefront/dist/client/_astro/use-text-value.dpiQwgOv.js +0 -4
  202. package/packages/storefront/dist/client/app/account/index.html +0 -56
  203. package/packages/storefront/dist/client/app/index.html +0 -96
  204. package/packages/storefront/dist/client/blog/1/index.html +0 -82
  205. package/packages/storefront/dist/client/index.html +0 -122
  206. package/packages/storefront/dist/client/macbook-apple-pro-15.4-intel-core-i7-2.6ghz-ram-16gb-ssd-512gb-mr972ll/a-prata/index.html +0 -89
  207. package/packages/storefront/dist/client/mouse-gamer-corsair-optico-harpoon-rgb-ch-9301011-na/index.html +0 -89
  208. package/packages/storefront/dist/client/p/contato/index.html +0 -86
  209. package/packages/storefront/dist/client/p/terms/index.html +0 -97
  210. package/packages/storefront/dist/client/posts/3/index.html +0 -97
  211. package/packages/storefront/dist/client/posts/4/index.html +0 -97
  212. package/packages/storefront/dist/client/~fallback/index.html +0 -97
  213. package/packages/storefront/dist/server/chunks/~fallback_M-xiy2GE.mjs +0 -6
  214. package/packages/storefront/dist/server/manifest_oV2meNKS.mjs +0 -196
package/LICENSE.md DELETED
@@ -1,230 +0,0 @@
1
- “Commons Clause” License Condition v1.0
2
-
3
- The Software is provided to you by the Licensor under the
4
- License, as defined below, subject to the following condition.
5
-
6
- Without limiting other conditions in the License, the grant
7
- of rights under the License will not include, and the License
8
- does not grant to you, the right to Sell the Software.
9
-
10
- For purposes of the foregoing, “Sell” means practicing any or
11
- all of the rights granted to you under the License to provide
12
- to third parties, for a fee or other consideration (including
13
- without limitation fees for hosting or consulting/ support
14
- services related to the Software), a product or service whose
15
- value derives, entirely or substantially, from the functionality
16
- of the Software. Any license notice or attribution required by
17
- the License must also include this Commons Clause License
18
- Condition notice.
19
-
20
- Software: E-Com Plus Open Cloud Commerce
21
-
22
- License: Apache 2.0 with Commons Clause
23
-
24
- Licensor: E-Com Club Softwares para E-commerce
25
-
26
-
27
- ---------------------------------------------------------------------
28
-
29
-
30
- Apache License
31
- Version 2.0, January 2004
32
- http://www.apache.org/licenses/
33
-
34
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
35
-
36
- 1. Definitions.
37
-
38
- "License" shall mean the terms and conditions for use, reproduction,
39
- and distribution as defined by Sections 1 through 9 of this document.
40
-
41
- "Licensor" shall mean the copyright owner or entity authorized by
42
- the copyright owner that is granting the License.
43
-
44
- "Legal Entity" shall mean the union of the acting entity and all
45
- other entities that control, are controlled by, or are under common
46
- control with that entity. For the purposes of this definition,
47
- "control" means (i) the power, direct or indirect, to cause the
48
- direction or management of such entity, whether by contract or
49
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
50
- outstanding shares, or (iii) beneficial ownership of such entity.
51
-
52
- "You" (or "Your") shall mean an individual or Legal Entity
53
- exercising permissions granted by this License.
54
-
55
- "Source" form shall mean the preferred form for making modifications,
56
- including but not limited to software source code, documentation
57
- source, and configuration files.
58
-
59
- "Object" form shall mean any form resulting from mechanical
60
- transformation or translation of a Source form, including but
61
- not limited to compiled object code, generated documentation,
62
- and conversions to other media types.
63
-
64
- "Work" shall mean the work of authorship, whether in Source or
65
- Object form, made available under the License, as indicated by a
66
- copyright notice that is included in or attached to the work
67
- (an example is provided in the Appendix below).
68
-
69
- "Derivative Works" shall mean any work, whether in Source or Object
70
- form, that is based on (or derived from) the Work and for which the
71
- editorial revisions, annotations, elaborations, or other modifications
72
- represent, as a whole, an original work of authorship. For the purposes
73
- of this License, Derivative Works shall not include works that remain
74
- separable from, or merely link (or bind by name) to the interfaces of,
75
- the Work and Derivative Works thereof.
76
-
77
- "Contribution" shall mean any work of authorship, including
78
- the original version of the Work and any modifications or additions
79
- to that Work or Derivative Works thereof, that is intentionally
80
- submitted to Licensor for inclusion in the Work by the copyright owner
81
- or by an individual or Legal Entity authorized to submit on behalf of
82
- the copyright owner. For the purposes of this definition, "submitted"
83
- means any form of electronic, verbal, or written communication sent
84
- to the Licensor or its representatives, including but not limited to
85
- communication on electronic mailing lists, source code control systems,
86
- and issue tracking systems that are managed by, or on behalf of, the
87
- Licensor for the purpose of discussing and improving the Work, but
88
- excluding communication that is conspicuously marked or otherwise
89
- designated in writing by the copyright owner as "Not a Contribution."
90
-
91
- "Contributor" shall mean Licensor and any individual or Legal Entity
92
- on behalf of whom a Contribution has been received by Licensor and
93
- subsequently incorporated within the Work.
94
-
95
- 2. Grant of Copyright License. Subject to the terms and conditions of
96
- this License, each Contributor hereby grants to You a perpetual,
97
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
98
- copyright license to reproduce, prepare Derivative Works of,
99
- publicly display, publicly perform, sublicense, and distribute the
100
- Work and such Derivative Works in Source or Object form.
101
-
102
- 3. Grant of Patent License. Subject to the terms and conditions of
103
- this License, each Contributor hereby grants to You a perpetual,
104
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
105
- (except as stated in this section) patent license to make, have made,
106
- use, offer to sell, sell, import, and otherwise transfer the Work,
107
- where such license applies only to those patent claims licensable
108
- by such Contributor that are necessarily infringed by their
109
- Contribution(s) alone or by combination of their Contribution(s)
110
- with the Work to which such Contribution(s) was submitted. If You
111
- institute patent litigation against any entity (including a
112
- cross-claim or counterclaim in a lawsuit) alleging that the Work
113
- or a Contribution incorporated within the Work constitutes direct
114
- or contributory patent infringement, then any patent licenses
115
- granted to You under this License for that Work shall terminate
116
- as of the date such litigation is filed.
117
-
118
- 4. Redistribution. You may reproduce and distribute copies of the
119
- Work or Derivative Works thereof in any medium, with or without
120
- modifications, and in Source or Object form, provided that You
121
- meet the following conditions:
122
-
123
- (a) You must give any other recipients of the Work or
124
- Derivative Works a copy of this License; and
125
-
126
- (b) You must cause any modified files to carry prominent notices
127
- stating that You changed the files; and
128
-
129
- (c) You must retain, in the Source form of any Derivative Works
130
- that You distribute, all copyright, patent, trademark, and
131
- attribution notices from the Source form of the Work,
132
- excluding those notices that do not pertain to any part of
133
- the Derivative Works; and
134
-
135
- (d) If the Work includes a "NOTICE" text file as part of its
136
- distribution, then any Derivative Works that You distribute must
137
- include a readable copy of the attribution notices contained
138
- within such NOTICE file, excluding those notices that do not
139
- pertain to any part of the Derivative Works, in at least one
140
- of the following places: within a NOTICE text file distributed
141
- as part of the Derivative Works; within the Source form or
142
- documentation, if provided along with the Derivative Works; or,
143
- within a display generated by the Derivative Works, if and
144
- wherever such third-party notices normally appear. The contents
145
- of the NOTICE file are for informational purposes only and
146
- do not modify the License. You may add Your own attribution
147
- notices within Derivative Works that You distribute, alongside
148
- or as an addendum to the NOTICE text from the Work, provided
149
- that such additional attribution notices cannot be construed
150
- as modifying the License.
151
-
152
- You may add Your own copyright statement to Your modifications and
153
- may provide additional or different license terms and conditions
154
- for use, reproduction, or distribution of Your modifications, or
155
- for any such Derivative Works as a whole, provided Your use,
156
- reproduction, and distribution of the Work otherwise complies with
157
- the conditions stated in this License.
158
-
159
- 5. Submission of Contributions. Unless You explicitly state otherwise,
160
- any Contribution intentionally submitted for inclusion in the Work
161
- by You to the Licensor shall be under the terms and conditions of
162
- this License, without any additional terms or conditions.
163
- Notwithstanding the above, nothing herein shall supersede or modify
164
- the terms of any separate license agreement you may have executed
165
- with Licensor regarding such Contributions.
166
-
167
- 6. Trademarks. This License does not grant permission to use the trade
168
- names, trademarks, service marks, or product names of the Licensor,
169
- except as required for reasonable and customary use in describing the
170
- origin of the Work and reproducing the content of the NOTICE file.
171
-
172
- 7. Disclaimer of Warranty. Unless required by applicable law or
173
- agreed to in writing, Licensor provides the Work (and each
174
- Contributor provides its Contributions) on an "AS IS" BASIS,
175
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
176
- implied, including, without limitation, any warranties or conditions
177
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
178
- PARTICULAR PURPOSE. You are solely responsible for determining the
179
- appropriateness of using or redistributing the Work and assume any
180
- risks associated with Your exercise of permissions under this License.
181
-
182
- 8. Limitation of Liability. In no event and under no legal theory,
183
- whether in tort (including negligence), contract, or otherwise,
184
- unless required by applicable law (such as deliberate and grossly
185
- negligent acts) or agreed to in writing, shall any Contributor be
186
- liable to You for damages, including any direct, indirect, special,
187
- incidental, or consequential damages of any character arising as a
188
- result of this License or out of the use or inability to use the
189
- Work (including but not limited to damages for loss of goodwill,
190
- work stoppage, computer failure or malfunction, or any and all
191
- other commercial damages or losses), even if such Contributor
192
- has been advised of the possibility of such damages.
193
-
194
- 9. Accepting Warranty or Additional Liability. While redistributing
195
- the Work or Derivative Works thereof, You may choose to offer,
196
- and charge a fee for, acceptance of support, warranty, indemnity,
197
- or other liability obligations and/or rights consistent with this
198
- License. However, in accepting such obligations, You may act only
199
- on Your own behalf and on Your sole responsibility, not on behalf
200
- of any other Contributor, and only if You agree to indemnify,
201
- defend, and hold each Contributor harmless for any liability
202
- incurred by, or claims asserted against, such Contributor by reason
203
- of your accepting any such warranty or additional liability.
204
-
205
- END OF TERMS AND CONDITIONS
206
-
207
- APPENDIX: How to apply the Apache License to your work.
208
-
209
- To apply the Apache License to your work, attach the following
210
- boilerplate notice, with the fields enclosed by brackets "[]"
211
- replaced with your own identifying information. (Don't include
212
- the brackets!) The text should be enclosed in the appropriate
213
- comment syntax for the file format. We also recommend that a
214
- file or class name and description of purpose be included on the
215
- same "printed page" as the copyright notice for easier
216
- identification within third-party archives.
217
-
218
- Copyright 2021 E-Com Club Softwares para E-commerce
219
-
220
- Licensed under the Apache License, Version 2.0 (the "License");
221
- you may not use this file except in compliance with the License.
222
- You may obtain a copy of the License at
223
-
224
- http://www.apache.org/licenses/LICENSE-2.0
225
-
226
- Unless required by applicable law or agreed to in writing, software
227
- distributed under the License is distributed on an "AS IS" BASIS,
228
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
229
- See the License for the specific language governing permissions and
230
- limitations under the License.
@@ -1 +0,0 @@
1
- import{_ as b,w as x}from"./_plugin-vue_export-helper.zwYIxbLv.js";import{f as C}from"./modules-info.39sWCsAH.js";import{p as I,r as S,s as w,t as V}from"./shopping-cart.bLFDGb3i.js";import{Q as P,C as F}from"./QuantitySelector.BLGwL_-E.js";import{P as v}from"./Prices.ij-wiXyI.js";import{c as p,d as y,M as f,N as i,O as m,U as d,V as k,$ as j,Q as h,P as o,R as t,S as g,X as N,Y as z}from"./runtime-core.esm-bundler.arxvxBux.js";import{g as A}from"./name.LjTu3VQY.js";import{g as L}from"./img.PXVYiEi4.js";import"./afetch.5c8VmT0-.js";import"./sf-utils.Z4H-dRBJ.js";import"./format-money.85X7Tchr.js";import"./price.Easct8WC.js";import"./customer-session.zys3PDaD.js";import"./index.ZVw4Qnet.js";import"./i18n.vH3oaO8m.js";const q=a=>{const s=p(()=>!a.item&&a.product?I(a.product):null),r=p(()=>a.item||s.value),e=p(()=>A(r.value)),n=p(()=>{const{slug:l}=r.value;return typeof l=="string"?`/${l}`:null}),u=p(()=>{if(r.value.picture)return L(r.value.picture,void 0,a.pictureSize||"small")}),c=p(()=>r.value.final_price||r.value.price);return{cartItem:r,title:e,link:n,image:u,finalPrice:c}},B=y({__name:"CartItem",props:{item:{},product:{},pictureSize:{}},setup(a,{expose:s}){s();const r=a,{cartItem:e,title:n,link:u,image:c,finalPrice:l}=q(r),_={props:r,cartItem:e,title:n,link:u,image:c,finalPrice:l,get removeCartItem(){return S},QuantitySelector:P,Prices:v};return Object.defineProperty(_,"__isScriptSetup",{enumerable:!1,value:!0}),_}}),Q={class:"relative bg-white shadow-sm"},E={class:"text-base-700 group-hover:text-base-900 flex-auto py-2 text-sm group-hover:underline"},M=t("span",{class:"border-3 text-danger-800 border-danger-700/30 flex h-5 w-5 flex-col justify-center rounded-full text-sm leading-none"},[t("i",{class:"i-close mx-auto my-0"})],-1),O=[M],R={class:"border-base-100 flex items-center justify-between border-t-2"},U={class:"border-base-100 border-r-2"};function D(a,s,r,e,n,u){const c=f("AImg"),l=f("ALink");return i(),m("article",Q,[d(l,{href:e.link,class:"group flex items-center gap-5 p-4"},{default:k(()=>[e.image?(i(),j(c,{key:0,picture:e.image,alt:e.title,class:"h-20 w-20 object-cover"},null,8,["picture","alt"])):h("",!0),t("p",E,o(e.title),1)]),_:1},8,["href"]),e.cartItem._id?(i(),m("button",{key:0,onClick:s[0]||(s[0]=x(_=>e.removeCartItem(e.cartItem._id),["stop"])),class:"absolute right-0 top-0 p-2 opacity-70 hover:opacity-100","aria-label":"Remover"},O)):h("",!0),t("div",R,[t("div",U,[d(e.QuantitySelector,{modelValue:e.cartItem.quantity,"onUpdate:modelValue":s[1]||(s[1]=_=>e.cartItem.quantity=_),min:e.cartItem.min_quantity,max:e.cartItem.max_quantity},null,8,["modelValue","min","max"])]),d(e.Prices,{"base-price":e.cartItem.base_price,price:e.finalPrice,"has-cashback":!1,"has-price-options":!1,class:"px-4 py-2.5 text-right text-[95%]"},null,8,["base-price","price"])])])}const T=b(B,[["render",D]]),X=y({__name:"CartSidebar",emits:["close"],setup(a,{expose:s,emit:r}){s();const n={emit:r,get freeShippingFromValue(){return C},get shoppingCart(){return w},get totalItems(){return V},CheckoutLink:F,Prices:v,CartItem:T};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}}),Y={class:"flex h-screen flex-col bg-white"},G={class:"z-10 flex items-center justify-end gap-3 px-6 py-4 shadow ring-1 ring-black/5"},H=t("span",{class:"text-base-600 text-right text-base font-medium"},o("Meu carrinho de compras"),-1),J={class:"min-w-[3rem] text-right"},K={class:"ui-badge-pill-lg"},W={class:"bg-base-50 grow overflow-y-auto"},Z={key:0,class:"text-center text-sm"},$={key:0,class:"secondary-subtle p-3"},ee=t("strong",{class:"lowercase"},o("Frete grátis"),-1),te={key:1,class:"bg-success-50 text-success-800 p-3"},re=t("i",{class:"text-success-900 i-check mr-1"},null,-1),se={class:"px-4 pb-2 pt-4"},ae={class:"z-10 px-5 pb-3 pt-4 ring-2 ring-black/5"},oe={class:"grid grid-cols-5 items-center gap-3 text-right"},ie=t("div",{class:"col-span-2"},o("Subtotal"),-1),ne=t("i",{class:"i-check mr-2"},null,-1),ce=t("i",{class:"i-arrow-right mr-1 rotate-180"},null,-1);function le(a,s,r,e,n,u){return i(),m("aside",Y,[t("header",G,[H,t("span",J,[t("span",K,o(e.totalItems),1)])]),t("article",W,[e.freeShippingFromValue?(i(),m("div",Z,[e.freeShippingFromValue>e.shoppingCart.subtotal?(i(),m("div",$,[g(o("Adicione $1 para ganhar".replace("$1",a.$money(e.freeShippingFromValue-e.shoppingCart.subtotal)))+" ",1),ee])):(i(),m("div",te,[re,g(" "+o("Frete grátis a partir de")+" "+o(a.$money(e.freeShippingFromValue)),1)]))])):h("",!0),t("ul",se,[(i(!0),m(N,null,z(e.shoppingCart.items,(c,l)=>(i(),m("li",{key:l},[d(e.CartItem,{item:c,class:"mb-3"},null,8,["item"])]))),128))])]),t("footer",ae,[t("div",oe,[ie,d(e.Prices,{price:e.shoppingCart.subtotal,class:"col-span-3 text-lg"},null,8,["price"])]),d(e.CheckoutLink,{to:"checkout",class:"ui-btn-lg ui-btn-primary my-2.5 w-full text-right"},{default:k(()=>[ne,g(" "+o("Finalizar compra"))]),_:1}),t("a",{href:"#",onClick:s[0]||(s[0]=x(c=>e.emit("close"),["prevent"])),class:"ui-link text-base-500 hover:text-base-700 text-sm"},[ce,g(" "+o("Continuar comprando"))])])])}const Se=b(X,[["render",le]]);export{Se as default};
@@ -1,7 +0,0 @@
1
- import{_ as D,w as Q}from"./_plugin-vue_export-helper.zwYIxbLv.js";import{u as Z}from"./index._z3KfWlu.js";import{a as J}from"./shopping-cart.bLFDGb3i.js";import{u as K}from"./use-product-card.h3dJsLOD.js";import{C as W,Q as $}from"./QuantitySelector.BLGwL_-E.js";import{P as tt}from"./Prices.ij-wiXyI.js";import{_ as G}from"./customer-session.zys3PDaD.js";import{u as et}from"./sf-utils.Z4H-dRBJ.js";import{d as R,a as C,M as I,N as u,O as f,$ as P,V as z,Q as b,R as v,X as k,T as V,U as w,Y as A,a7 as F,L as ot,r as L,w as T,a6 as M,c as H,S as B,P as S,a8 as rt,H as it,Z as at}from"./runtime-core.esm-bundler.arxvxBux.js";import{g as nt}from"./img-sizes.gxAI9JNh.js";import"./index.ZVw4Qnet.js";import{g as st}from"./grid-title.tJFKNjnT.js";import"./price.Easct8WC.js";import"./use-analytics.qryUNUh7.js";import"./afetch.5c8VmT0-.js";import"./name.LjTu3VQY.js";import"./i18n.vH3oaO8m.js";import"./img.PXVYiEi4.js";import"./modules-info.39sWCsAH.js";import"./format-money.85X7Tchr.js";const q=(a,s,l)=>{if(typeof a!="object"||a===null)return[];let t=[];if(typeof a=="object"&&a!==null)if(Array.isArray(a))a.length&&(a[0].specifications?a.forEach(e=>{t=t.concat(q(e,s,l))}):a[0].text&&(t=a));else{const{specifications:e}=a;if(e)for(const n in e)e[n]&&n===s&&(t=e[s]);if(t&&!t.length&&Array.isArray(l)&&l.length){let n,d;return l&&(d=l.find(r=>r.grid_id===s))&&d.options&&(n=d.options.map(r=>{let i;return r.colors&&r.colors.length?i=r.colors[0]:i=r.option_id,{text:r.text,value:i}})),q(n,s)}}return t},X=q,lt=(a,s,l,t=", ")=>{let e=X(a,s,l);if(e.length){let n=e[0].text;for(let d=1;d<e.length;d++)n+=t+e[d].text;return n}return null},Y=lt,ct=(a,s,l,t)=>{const e=X(a,l,t);for(let n=0;n<e.length;n++)if(e[n].text===s)return e[n].value},dt=ct,ut=(a,s,l,t)=>{let e={};return a&&Array.isArray(a.variations)&&a.variations.forEach(n=>{if(l&&n.quantity<=0)return;let d=n.specifications,r=i=>Y(n,i,t);if(d){if(s){for(let i in s)if(s.hasOwnProperty(i)&&(!d[i]||r(i)!==s[i]))return}for(let i in d)if(d.hasOwnProperty(i)){let m=r(i);if(!e.hasOwnProperty(i))e[i]=[];else if(e[i].indexOf(m)!==-1)continue;e[i].push(m)}}}),e},j=ut,mt=R({__name:"ImagesGallery",props:{pictures:{}},setup(a,{expose:s}){s();const l=C(0),t=C("");let e;const n=C(!1),r={activeIndex:l,psId:t,get lightbox(){return e},set lightbox(i){e=i},isLoadingLightbox:n,zoom:i=>{if(t.value=`ps-${et()}`,!e&&!n.value){n.value=!0;const m="photoswipe-style";Promise.all([G(()=>import("./photoswipe-lightbox.esm.dZBqKD9u.js"),__vite__mapDeps([])),G(()=>import("./photoswipe.esm.Ylh9TGkz.js"),__vite__mapDeps([])),!document.getElementById(m)&&G(()=>import("./photoswipe.0V7m2jWu.js"),__vite__mapDeps([]))]).then(([{default:o},{default:c},h])=>{if(h){const{default:y}=h,p=document.createElement("style");p.id=m,p.textContent=y,document.head.appendChild(p)}e=new o({gallery:`#${t.value} > div`,children:"a",pswpModule:c,showAnimationDuration:300,hideAnimationDuration:300}),e.init(),e.loadAndOpen(i),n.value=!1})}},get getImgSizes(){return nt}};return Object.defineProperty(r,"__isScriptSetup",{enumerable:!1,value:!0}),r}}),ft={class:"-mx-4 flex w-screen gap-3 sm:mx-0 sm:w-full md:h-[525px] 2xl:gap-5"},gt=["onClick"],pt=v("span",{class:"absolute bottom-0 block h-2 w-full bg-gradient-to-b from-transparent to-white"},null,-1),ht={class:"relative aspect-square h-full grow md:aspect-auto"},_t={key:0,class:"i-arrow-path bg-base-200 absolute left-1/2 top-1/2 -ml-7 -mt-7 h-14 w-14 animate-spin","aria-label":"Carregando"},vt={key:1,class:"mt-2 flex justify-center gap-1.5 md:hidden"},yt=["aria-label","onClick"];function bt(a,s,l,t,e,n){const d=I("AImg"),r=I("CarouselControl"),i=I("Carousel"),m=I("ALink");return u(),f("div",ft,[l.pictures.length>1?(u(),P(i,{key:0,axis:"y",class:"group hidden w-[300px] shrink-0 md:block"},{controls:z(()=>[v("span",null,[l.pictures.length>6?(u(),P(r,{key:0,class:"hover:bg-primary-300/60 text-primary !bottom-3 !left-1/2 -ml-5 h-10 w-10 rounded-full bg-white/60 text-xl opacity-0 shadow-sm ring-1 ring-black/5 group-hover:opacity-90"})):b("",!0),pt])]),default:z(()=>[(u(!0),f(k,null,A(Math.ceil(l.pictures.length/2),o=>(u(),f("li",{key:o,class:V(["grid w-full grid-cols-2 gap-3 px-1 pb-3",o===1&&"pt-1"])},[(u(!0),f(k,null,A([1,2].map(c=>(o-1)*2+(c-1)),c=>(u(),f(k,{key:`${o}-${c}`},[c<l.pictures.length?(u(),f("button",{key:0,class:"bg-secondary-100 block rounded md:h-[175px]",onClick:h=>t.activeIndex=c},[w(d,{picture:l.pictures[c],class:V(["ring-secondary/10 h-full w-full rounded border-2 object-cover opacity-90 transition-colors",c===t.activeIndex?"border-secondary/50 ring-4 cursor-auto":"border-transparent hover:border-primary hover:ring-4 hover:ring-primary/20"])},null,8,["picture","class"])],8,gt)):b("",!0)],64))),128))],2))),128))]),_:1})):b("",!0),v("div",ht,[w(i,{as:"div",index:t.activeIndex,"onUpdate:index":s[1]||(s[1]=o=>t.activeIndex=o),class:V(["text-base-600 [&_i]:i-arrow-right mx-auto h-full w-full max-w-[525px] [&>*]:h-full [&_i]:mx-2 [&_i]:text-2xl",t.isLoadingLightbox&&"opacity-80"]),id:t.psId},{default:z(()=>[s[0]||(F(-1),s[0]=(u(!0),f(k,null,A(l.pictures,(o,c)=>(u(),P(m,{key:`big-${c}`,href:o.zoom?.size&&o.zoom.url,"data-pswp-width":t.getImgSizes(o.zoom||"").width,"data-pswp-height":t.getImgSizes(o.zoom||"").height,target:"_blank",rel:"noreferrer",class:V(["shrink-0 basis-full",o.zoom?.size&&"cursor-zoom-in"]),onClick:Q(()=>o.zoom?.size&&t.zoom(c),["prevent"])},{default:z(()=>[w(d,{picture:o,"preferred-size":"big",class:"h-full w-full rounded object-cover",fetchpriority:c===0?"high":"low",loading:c===0?"eager":"lazy"},null,8,["picture","fetchpriority","loading"])]),_:2},1032,["href","data-pswp-width","data-pswp-height","class","onClick"]))),128)),F(1),s[0])]),_:1},8,["index","class","id"]),t.isLoadingLightbox?(u(),f("i",_t)):b("",!0),l.pictures.length>1?(u(),f("ul",vt,[(u(!0),f(k,null,A(l.pictures.length,o=>(u(),f("li",{key:`d-${o}`},[v("button",{class:V(["bg-base-700 block h-1.5 w-3 rounded-full",t.activeIndex!==o-1&&"opacity-40"]),"aria-label":`Imagem ${o}`,onClick:c=>t.activeIndex=o-1},null,10,yt)]))),128))])):b("",!0)])])}const xt=D(mt,[["render",bt]]),kt=a=>{const s=ot(a.grids||globalThis.$storefront.data.grids||[]);s.length||window.addEventListener("storefront:data:data",()=>{globalThis.$storefront.data.grids?.forEach(o=>s.push(o))},{once:!0});const l=L({}),t=L({});T(M(a,"variations"),()=>{Object.assign(t,j(a,void 0,!0));const o=j(a);Object.keys(o).forEach(c=>{t[c]?l[c]=t[c]:delete l[c]})},{immediate:!0});const e=H(()=>Object.keys(l)),n=L({}),d=C(),r=({optionText:o,gridId:c,gridIndex:h})=>{n[c]=o;const y={};for(let g=0;g<=h;g++){const _=e[g];n[_]&&(y[_]=n[_])}const p=j(a,y,!0);for(let g=h+1;g<e.value.length;g++){const _=e[g],O=p[_];t[_]=O,n[_]&&!O.includes(n[_])&&delete n[_]}const x=a.variations.slice(0);for(let g=0;g<x.length;g++){const _=x[g],{specifications:O}=_,N=Object.keys(O);for(let E=0;E<N.length;E++){const U=N[E];if(n[U]!==Y(_,U)){x.splice(g,1),g-=1;break}}}d.value=x[0]?._id||null};return T(M(a,"variationId"),o=>{if(!o||o===d.value)return;const c=a.variations.find(x=>x._id===o);if(!c){d.value=null;return}const{specifications:h}=c,y=Object.keys(h),p=(x=0)=>{const g=y[x];if(y[x]&&h[g]&&h[g].length===1){const _=h[g][0].text;l[g].find(O=>O===_)&&(r({optionText:_,gridId:g,gridIndex:e.value.indexOf(g)}),p(x+1))}};p()},{immediate:!0}),{grids:s,variationsGrids:l,activeVariationsGrids:t,selectOption:r,selectedOptions:n,variationId:d,getGridTitle:o=>st(o,s),getColorOptionBg:o=>{const c=o.split(",").map(h=>dt(a.variations,h.trim(),"colors"));return c.length>1?`background:linear-gradient(to right bottom, ${c[0]} 50%, ${c[1]} 50%)`:`background:${c[0]}`}}},wt=R({__name:"SkuSelector",props:{variations:{},variationId:{},grids:{}},emits:["update:variationId"],setup(a,{expose:s,emit:l}){s();const t=a,e=l,{variationsGrids:n,activeVariationsGrids:d,selectOption:r,selectedOptions:i,variationId:m,getGridTitle:o,getColorOptionBg:c}=kt(t);T(m,y=>{e("update:variationId",y)});const h={props:t,emit:e,variationsGrids:n,activeVariationsGrids:d,selectOption:r,selectedOptions:i,variationId:m,getGridTitle:o,getColorOptionBg:c};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),St={class:"text-base-700 text-sm font-medium"},Ct={key:0,class:"text-base-800"},Ot={key:0,class:"mt-2 flex gap-2"},Vt=["onClick"];function zt(a,s,l,t,e,n){return u(),f("div",null,[(u(!0),f(k,null,A(t.variationsGrids,(d,r)=>(u(),f("div",{key:r,class:"mt-3"},[v("span",St,[B(S(t.getGridTitle(r))+": ",1),t.selectedOptions[r]?(u(),f("strong",Ct,S(t.selectedOptions[r]),1)):b("",!0)]),d.length<7?(u(),f("ul",Ot,[(u(!0),f(k,null,A(d,(i,m)=>(u(),f("li",{key:`${r}-${m}`},[v("button",{class:V(["ring-primary/60 rounded border",[t.selectedOptions[r]===i?"border-primary ring-2":null,r==="colors"?"h-9 w-9 text-[0px]":"px-2.5 py-2 leading-none",t.activeVariationsGrids[r].includes(i)?"text-primary-950 bg-primary-100 border-primary-400":"text-primary-600 bg-primary-200 border-primary-300"]]),style:rt(r==="colors"?t.getColorOptionBg(i):void 0),onClick:o=>t.selectOption({optionText:i,gridId:r,gridIndex:m})},S(i),15,Vt)]))),128))])):b("",!0)]))),128))])}const At=D(wt,[["render",zt]]),It=R({__name:"ProductDetails",props:{product:{default:()=>globalThis.$storefront.apiContext?.doc}},setup(a,{expose:s}){s();const l=a,{product:t,title:e,isActive:n}=K(l),d=C(t.min_quantity||1),r=Z("history"),i=C(!1),m=C(null);T(m,p=>{p&&(r.var=p,i.value=!1)}),it(()=>{T(r,({var:p})=>{typeof p=="string"&&p&&(m.value=p)},{immediate:!0})});const o=H(()=>!!(!t.variations?.length||m.value)),c=p=>(o.value?i.value=!1:(p&&p.preventDefault(),i.value=!0),!i.value),y={props:l,product:t,title:e,isActive:n,quantity:d,params:r,hasSkuSelectionAlert:i,variationId:m,isSkuSelected:o,checkVariation:c,addToCart:()=>{c()&&J(t,m.value?m.value:void 0)},CheckoutLink:W,QuantitySelector:$,Prices:tt,ImagesGallery:xt,SkuSelector:At};return Object.defineProperty(y,"__isScriptSetup",{enumerable:!1,value:!0}),y}}),Pt={class:"ui-section relative grid grid-cols-1 items-start gap-5 md:gap-4 lg:grid-cols-4 2xl:gap-6"},Tt={class:"w-full lg:col-span-3"},Et={class:"lg:sticky-header:translate-y-14 top-0 py-4 transition-transform lg:sticky"},Gt={class:"ui-text-brand text-secondary-900 text-lg"},Lt={key:0,class:"mt-5"},jt={key:0,class:"ui-alert inline-block"},Bt=v("i",{class:"i-arrow-right ml-1 -rotate-90"},null,-1),qt={class:"mt-5 flex flex-wrap items-center gap-x-4 gap-y-2 md:flex-nowrap lg:mt-4 lg:flex-wrap"},Dt=v("i",{class:"i-chevron-double-right mr-1"},null,-1),Rt=["data-tooltip"],Nt={class:"w-full lg:col-span-3"};function Ut(a,s,l,t,e,n){const d=I("Fade");return u(),f("section",Pt,[v("div",Tt,[t.product.pictures?.length?(u(),P(t.ImagesGallery,{key:0,pictures:t.product.pictures},null,8,["pictures"])):b("",!0)]),v("div",Et,[v("h1",Gt,S(t.title),1),t.isActive?(u(),f("div",Lt,[w(t.Prices,{product:t.product,"is-big":"","is-literal":""},null,8,["product"]),t.product.variations?(u(),P(t.SkuSelector,{key:0,variations:t.product.variations,"variation-id":t.variationId,"onUpdate:variationId":s[0]||(s[0]=r=>t.variationId=r),class:"my-4"},null,8,["variations","variation-id"])):b("",!0),w(d,{slide:"down"},{default:z(()=>[t.hasSkuSelectionAlert?(u(),f("div",jt,[B(S("Por favor selecione uma opção em cada campo acima")+" "),Bt])):b("",!0)]),_:1}),v("div",qt,[w(t.QuantitySelector,{modelValue:t.quantity,"onUpdate:modelValue":s[1]||(s[1]=r=>t.quantity=r),min:t.product.min_quantity,max:t.product.quantity,class:"border-base-100 rounded md:mr-5 lg:mb-2 lg:mr-auto lg:border-2"},null,8,["modelValue","min","max"]),w(t.CheckoutLink,{class:"ui-btn-lg ui-btn-primary grow text-center",to:"checkout","cart-item":{product_id:t.product._id,quantity:t.quantity,variation_id:t.variationId||void 0},"data-tooltip":t.isSkuSelected?null:"Escolha os detalhes do produto para comprar",onClick:t.checkVariation},{default:z(()=>[Dt,B(" "+S("Comprar"))]),_:1},8,["cart-item","data-tooltip"]),v("button",{class:"ui-btn-lg ui-btn-contrast grow",onClick:Q(t.addToCart,["prevent"]),"data-tooltip":t.isSkuSelected?null:"Escolha os detalhes do produto para comprar"},S("Adicionar ao carrinho"),8,Rt)])])):b("",!0)]),v("div",Nt,[at(a.$slots,"description")])])}const ce=D(It,[["render",Ut]]);export{ce as default};
2
- function __vite__mapDeps(indexes) {
3
- if (!__vite__mapDeps.viteFileDeps) {
4
- __vite__mapDeps.viteFileDeps = []
5
- }
6
- return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
7
- }
@@ -1 +0,0 @@
1
- import{_ as I,w as N,v as R}from"./_plugin-vue_export-helper.zwYIxbLv.js";import{b as V,c as j}from"./index._z3KfWlu.js";import{b as A}from"./customer-session.zys3PDaD.js";import{c as B,u as M}from"./use-product-card.h3dJsLOD.js";import{g as O}from"./index.ZVw4Qnet.js";import{a as p,L as D,d as L,M as P,N as r,O as d,U as m,V as b,$ as S,Q as C,R as v,S as y,P as x,a0 as T,T as w,ah as Q,Z as z,W as E,X as G,Y as H}from"./runtime-core.esm-bundler.arxvxBux.js";import{u as q}from"./sf-utils.Z4H-dRBJ.js";import{a as F}from"./shopping-cart.bLFDGb3i.js";import{P as U}from"./Prices.ij-wiXyI.js";const Ce="Acima de",we="Marcas",Pe="Categorias",Se="Desconto",Ae="Maior preço",Ie="Menor preço",Le="Nome",W="Produtos relacionados",Te="Lançamentos",Ne="Relevância",Re="Vendas",Ve="Até",X=t=>{const s=p(t.title||""),n=p(t.titleLink||""),e=p(!1);let _=null;const u=p(null),i=D(t.products||[]);return t.products||(e.value=!0,_=(async()=>{const f=t.limit||24;let g=`offset=${t.page?(t.page-1)*f:0}&limit=${f}`;if(t.sort&&(g+=`&sort=${t.sort}`),t.isRelatedProducts){const{apiContext:o}=globalThis.$storefront;o?.resource==="products"&&(g=`like=${o.doc._id}`,!s.value&&s.value!==null&&(s.value=W))}else{let o=t.searchQuery||"",a;if(t.collectionId){try{const{data:c}=await A.get(`collections/${t.collectionId}`);a=c}catch(c){console.error(c),u.value=c}const h=a?.products;Array.isArray(h)&&h.length&&(o+=`&_id=${h.slice(0,60).join(",")}`),!s.value&&s.value!==null&&a?.name&&(s.value=a?.name)}g+=o}try{const{data:o}=await A.get(`search/v1?${g}`);if(t.isShuffle){let a=o.result.filter(k=>k.available&&B(k)).length,h,c;for(;a;)c=Math.floor(Math.random()*a--),h=o.result[a],o.result[a]=o.result[c],o.result[c]=h}o.result.forEach(a=>i.push(a))}catch(o){console.error(o),u.value=o}e.value=!1})()),{title:s,titleLink:n,isFetching:e,fetching:_,fetchError:u,products:i}},Y=L({__name:"ProductCard",props:{product:{},productId:{},listName:{},listId:{},headingTag:{default:"h3"}},setup(t,{expose:s}){s();const n=t,{product:e,title:_,link:u,images:i,isInStock:f,isActive:l,discountPercentage:g,hasVariations:o}=M(n),a=p(null),h=V(a),c=p(!1);O(h,()=>{c.value=!0});const k={props:n,product:e,title:_,link:u,images:i,isInStock:f,isActive:l,discountPercentage:g,hasVariations:o,card:a,isHovered:h,wasHoveredOnce:c,get addProductToCart(){return F},Prices:U};return Object.defineProperty(k,"__isScriptSetup",{enumerable:!1,value:!0}),k}}),Z=["data-sku"],J={class:"aspect-square p-2 transition-transform motion-safe:group-hover:scale-110"},K={class:"relative h-full w-full overflow-hidden rounded bg-white group-hover:rounded-none"},$={key:0,class:"text-xs text-opacity-70"},ee={key:1,class:"from-base-50/20 to-base-100 h-full w-full bg-gradient-to-br"},te={key:0,class:"uno-bm03rg"},oe={class:"relative z-10 flex grow flex-col justify-between p-4"},se={class:"pt-2"},ae={key:0},re={key:1,class:"ui-badge bg-warning-100 text-warning-700"},ne=v("span",{class:"bg-on-primary text-primary mr-1 inline-block h-4 w-4 rounded-full text-center text-base leading-none opacity-80"}," + ",-1);function ie(t,s,n,e,_,u){const i=P("AImg"),f=P("ALink");return r(),d("article",{ref:"card","data-sku":e.product.sku,class:"group relative mx-auto h-full max-w-[350px] px-0.5 py-3 hover:z-[1]"},[m(f,{href:e.link,class:"flex h-full flex-col overflow-hidden rounded bg-white ring-black/5 group-hover:shadow group-hover:ring-1"},{default:b(()=>[v("div",J,[v("div",K,[e.images?.length?(r(),d("span",$,[m(i,{picture:e.images[0],alt:e.title,class:"absolute left-0 top-0 block h-full w-full object-cover"},null,8,["picture","alt"]),e.images[1]&&e.wasHoveredOnce?(r(),S(i,{key:0,picture:e.images[1],alt:e.title,class:"absolute left-0 top-0 z-10 block h-full w-full object-cover text-transparent opacity-0 transition-opacity group-hover:opacity-100 motion-safe:duration-300"},null,8,["picture","alt"])):C("",!0)])):(r(),d("div",ee))])]),e.discountPercentage?(r(),d("span",te,[y(" -"),v("strong",null,x(e.discountPercentage),1),y("% ")])):C("",!0),v("div",oe,[(r(),S(T(n.headingTag),{class:w(["ui-link line-clamp-2 no-underline",[e.isActive?"text-base-700":"text-base-500",e.link?"group-hover:text-primary group-hover:underline":null]])},{default:b(()=>[y(x(e.title),1)]),_:1},8,["class"])),v("div",se,[e.isActive?(r(),d("div",ae,[m(e.Prices,{product:e.product},null,8,["product"])])):(r(),d("span",re,x(e.isInStock?"Inativo":"Sem estoque"),1))]),e.isActive&&!e.hasVariations?(r(),d("button",{key:0,class:"uno-3suct9 ui-btn-sm ui-btn-primary",onClick:s[0]||(s[0]=N(l=>e.addProductToCart(e.product),["stop","prevent"]))},[ne,y(" "+x("Adicionar ao carrinho"))])):C("",!0)])]),_:1},8,["href"])],8,Z)}const le=I(Y,[["render",ie]]),ce=L({__name:"ProductShelf",props:{isGrid:{type:Boolean},collectionId:{},searchQuery:{},sort:{},title:{},titleLink:{},isShuffle:{type:Boolean},limit:{},page:{},products:{},isRelatedProducts:{type:Boolean}},async setup(t,{expose:s}){s();const n=t,[e,_]=j(),{title:u,titleLink:i,fetching:f,products:l}=X(n),g=u.value||`Shelf ${q()}`,o={props:n,DefineCarouselControl:e,ReuseCarouselControl:_,title:u,titleLink:i,fetching:f,products:l,listName:g,ProductCard:le};return Object.defineProperty(o,"__isScriptSetup",{enumerable:!1,value:!0}),o}}),de={class:"ui-section"},ue={key:0,class:"mx-auto mb-4 max-w-prose text-center"},fe={class:"ui-text-brand text-3xl"};function he(t,s,n,e,_,u){const i=P("ALink"),f=P("CarouselControl");return r(),d("section",de,[e.title?(r(),d("div",ue,[v("h2",fe,[m(i,{href:e.titleLink,class:w(e.titleLink?"ui-link":"text-base-700")},{default:b(()=>[y(x(e.title),1)]),_:1},8,["href","class"])])])):C("",!0),(r(),S(T(n.isGrid?"ul":"Carousel"),{class:w(["group/shelf",n.isGrid&&"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4"])},Q({default:b(()=>[(r(!0),d(G,null,H(e.products,l=>(r(),d("li",{key:l._id,class:"shrink-0 basis-1/2 md:basis-1/3 lg:basis-1/4"},[m(e.ProductCard,{product:l,"list-name":e.listName},null,8,["product","list-name"])]))),128))]),_:2},[n.isGrid?void 0:{name:"controls",fn:b(()=>[m(e.DefineCarouselControl,null,{default:b(({isPrev:l})=>[E(m(f,{class:w(["uno-c36cp5",l?"!-left-4":"!-right-4"]),"is-prev":l},null,8,["class","is-prev"]),[[R,e.products.length>2]])]),_:1}),m(e.ReuseCarouselControl,{"is-prev":!0}),m(e.ReuseCarouselControl)]),key:"0"}]),1032,["class"])),z(t.$slots,"append")])}const je=I(ce,[["render",he]]);export{je as P,Pe as a,Ve as b,Ce as c,Ne as d,Re as e,Ie as f,Ae as g,Se as h,we as i,Te as j,Le as k};
@@ -1 +0,0 @@
1
- import{P as j}from"./ProductShelf.GkYOYehE.js";import"./_plugin-vue_export-helper.zwYIxbLv.js";import"./runtime-core.esm-bundler.arxvxBux.js";import"./index._z3KfWlu.js";import"./index.ZVw4Qnet.js";import"./customer-session.zys3PDaD.js";import"./sf-utils.Z4H-dRBJ.js";import"./use-product-card.h3dJsLOD.js";import"./use-analytics.qryUNUh7.js";import"./shopping-cart.bLFDGb3i.js";import"./price.Easct8WC.js";import"./afetch.5c8VmT0-.js";import"./name.LjTu3VQY.js";import"./i18n.vH3oaO8m.js";import"./img.PXVYiEi4.js";import"./Prices.ij-wiXyI.js";import"./modules-info.39sWCsAH.js";import"./format-money.85X7Tchr.js";export{j as default};
@@ -1,7 +0,0 @@
1
- import{e as Ee,a as Ae,d as Le,l as $e,_ as ke}from"./customer-session.zys3PDaD.js";import{_ as G,w as he,v as Xe,a as Je}from"./_plugin-vue_export-helper.zwYIxbLv.js";import{b as se,d as et,g as tt,e as be}from"./sf-utils.Z4H-dRBJ.js";import{t as nt}from"./shopping-cart.bLFDGb3i.js";import{a as at,o as ot}from"./index._z3KfWlu.js";import{j as rt,h as lt,p as st,u as it,g as we}from"./index.ZVw4Qnet.js";import{a as S,c as I,w as ae,H as re,d as D,E as ee,N as b,O as C,Z as oe,$ as R,T as $,a0 as ut,M as Y,V as T,U as E,R as d,Q as H,P as L,X as V,Y as z,S as Q,aa as le,k as W,a4 as ie,a5 as ve,a9 as _e,a3 as Ne,a2 as Re,a7 as Pe,a1 as Me,a8 as ct,ae as dt,W as Te,ad as Ie,af as Oe}from"./runtime-core.esm-bundler.arxvxBux.js";import{k as ue,m as pt,n as ft,s as de,b as pe,o as p,w as Fe,a as De,h as Be,t as He,u as te,i as X,A as ne,d as Z,e as Ue,l as Ve,N as fe,p as vt,g as mt,f as gt,c as U,j as A,v as ht,q as j,_ as je,O as bt,r as ye,P as J,x as ge,D as _t}from"./use-text-value.dpiQwgOv.js";import"./price.Easct8WC.js";const yt=n=>{const{header:a,canSetStyles:o,canCreateHeightDiv:e,isShownOnScrollDown:t,isShownOnMobile:r}={canSetStyles:!0,canCreateHeightDiv:!0,...n},{ready:s,start:u}=rt(100,{controls:!0,immediate:!1}),i=S(0),c=S(0);let l;const x=r||!se&&!et,{y:_}=x?at(document):{y:S(0)},m=S(0);lt(_,h=>{m.value=h},{debounce:se?100:50,maxWait:se?800:400});const k=I(()=>s.value&&m.value>c.value*1.2),f=S("none");ae(k,async h=>{o&&a.value&&(a.value.style.position=h?"fixed":"",a.value.style.width=h?"100vw":""),l&&(l.style.height=h?`${i.value}px`:""),h?(await st(300),f.value="opacity var(--transition-slow), transform var(--transition)"):(u(),f.value="none")});const y=S(!1);return ae(m,(h,P)=>{y.value=h>0&&h<P}),re(()=>{if(!a.value)throw new Error("<header> (props.header) not set");const h=()=>{const M=a.value;i.value=M.offsetHeight,c.value=i.value+window.scrollY+M.getBoundingClientRect().top,u()},P=a.value.getElementsByTagName("IMG");let g=!0;for(let M=0;M<P.length;M++){const v=P[M];(!v.complete||v.naturalHeight===0)&&(g=!1,v.onload=h)}g&&h(),window.addEventListener("resize",it(h,300)),o&&(a.value.style.willChange="transform",ae([k,y],([M,v])=>{let w="",O="";M&&(!v||t)&&(w="0",O="translateY(-100%)");const N=a.value;N.style.opacity=w,N.style.transform=O;const q=M&&!w?"add":"remove";document.body.classList[q]("StickyHeader")}),ae(f,M=>{a.value.style.transition=M})),e&&(l=document.createElement("div"),a.value.parentElement?.insertBefore(l,a.value))}),{staticHeight:i,staticY:c,isSticky:k,isScrollUp:y,transition:f}},St=(n,a)=>{const o=n.filter(({name:e,slug:t,parent:r})=>e&&t&&!r);return a?.length&&o.sort((e,t)=>{const r=a.indexOf(e.slug),s=a.indexOf(t.slug);return r>-1?s===-1||r<s?-1:1:s>-1?1:0}),o},xt=(n,a,o=!1)=>{const e=n.filter(({name:t,slug:r,parent:s})=>t&&r&&s?s._id&&s._id===a._id||s.slug&&s.slug===a.slug:!1);return o&&e.sort((t,r)=>t.name<r.name?-1:1),e},kt=n=>{const{header:a,searchInput:o,categories:e=globalThis.$storefront.data.categories||[],menuCategorySlugs:t,menuRandomCategories:r=7,isAlphabeticalSortSubmenu:s}=n,{isSticky:u,staticHeight:i,staticY:c}=yt({header:a}),l=I(()=>u.value?a.value?.offsetHeight:c.value),x=St(e,t),_=F=>xt(e,F,!!s),m=F=>({...F,subcategories:_(F).map(B=>m(B))}),k=x.map(m);let f=0;const y=k.filter(({slug:F})=>t?.includes(F)?!0:f<r?(f+=1,!0):!1),h=S(!1),P=S(!1);we(h,()=>{P.value=!0});const g=S(""),M=/^\/s\/?/.test(window.location.pathname);let v;if(M){const{pathname:F,search:B}=window.location;v=new URLSearchParams(B).get("q"),!v&&F.startsWith("/s/")&&(v=decodeURIComponent(F.split("/")[2]))}typeof v=="string"&&(g.value=v);const w=I(()=>g.value&&g.value.length>=2&&g.value!==v?g.value:""),O=F=>{if(F.preventDefault(),h.value&&g.value){window.location.href=tt(g.value);return}h.value=!h.value,h.value&&o&&setTimeout(()=>{if(!o.value)return;const{length:B}=g.value;o.value.setSelectionRange(B,B),o.value.focus()},50)},N=S(!1),q=S(!1);we(N,()=>{q.value=!0});const ce=S(0);return{isSticky:u,staticHeight:i,staticY:c,positionY:l,mainCategories:x,getSubcategories:_,getCategoryTree:m,categoryTrees:k,inlineMenuTrees:y,isSearchOpen:h,isSearchOpenOnce:P,searchTerm:g,quickSearchTerm:w,toggleSearch:O,isCartOpen:N,isCartOpenOnce:q,cartTotalItems:ce,handleOnMounted:()=>{ae(nt,(F,B)=>{typeof B=="number"&&(B<F?N.value=!0:B&&!F&&(N.value=!1)),ce.value=F},{immediate:!0})}}},wt=D({__name:"AccountLink",props:{to:{},accountUrl:{default:globalThis.$storefront?.settings.accountUrl||"/app/account"},returnUrl:{},isSignUp:{type:Boolean}},setup(n,{expose:a}){a();const o=n,e=S("");globalThis.location?.href&&ee(()=>{e.value=globalThis.location.href});const t=I(()=>{let s=o.accountUrl;const u=o.returnUrl||e.value;if(!o.to)return o.isSignUp?s+="?sign_up&":s+="?",u?`${s}return_url=${u}`:s;const{settings:i}=globalThis.$storefront;return o.to==="orders"&&i.ordersUrl?i.ordersUrl:o.to==="favorites"&&i.favoritesUrl?i.favoritesUrl:`${s}/${o.to}`}),r={props:o,locationUrl:e,href:t};return Object.defineProperty(r,"__isScriptSetup",{enumerable:!1,value:!0}),r}}),Pt=["href"];function Mt(n,a,o,e,t,r){return b(),C("a",{href:e.href},[oe(n.$slots,"default")],8,Pt)}const qe=G(wt,[["render",Mt]]),Tt=D({__name:"SocialNetworkIcon",props:{as:{default:"i"},network:{}},setup(n,{expose:a}){a();const o=n,e=I(()=>{switch(o.network){case"facebook":return"i-facebook";case"instagram":return"i-instagram";case"whatsapp":return"i-whatsapp";case"youtube":return"i-youtube";case"pinterest":return"i-pinterest";case"tiktok":return"i-tiktok";case"twitter":return"i-twitter";case"threads":return"i-threads";default:return""}}),t={props:o,iconClassName:e};return Object.defineProperty(t,"__isScriptSetup",{enumerable:!1,value:!0}),t}});function It(n,a,o,e,t,r){return b(),R(ut(o.as),{class:$(e.iconClassName)},null,8,["class"])}const Ot=G(Tt,[["render",It]]),Ct=D({__name:"SocialNetworkLink",props:{network:{},href:{},message:{}},setup(n,{expose:a}){a();const o=n,e=I(()=>{let r=o.href||be[o.network]||"";if(o.network==="whatsapp"){const s=r.replace(/[^+\d]/g,"");r=`https://${se?"api":"web"}.whatsapp.com/send?phone=`+encodeURIComponent(s.charAt(0)==="+"?s:`+55${s}`),o.message&&(r+=`&text=${encodeURIComponent(o.message)}`)}return r}),t={props:o,fixedHref:e,SocialNetworkIcon:Ot};return Object.defineProperty(t,"__isScriptSetup",{enumerable:!1,value:!0}),t}});function Et(n,a,o,e,t,r){const s=Y("ALink");return b(),R(s,{href:e.fixedHref},{default:T(()=>[oe(n.$slots,"default",{},()=>[E(e.SocialNetworkIcon,{network:o.network},null,8,["network"]),oe(n.$slots,"append")])]),_:3},8,["href"])}const Ke=G(Ct,[["render",Et]]),At=D({__name:"ShopSidenavCategory",props:{categoryTree:{}},setup(n,{expose:a}){a();const o=S(!1),e=S(!0);ae(o,r=>{r?setTimeout(()=>{e.value=!1},25):e.value=!0});const t={isOpen:o,isFaded:e};return Object.defineProperty(t,"__isScriptSetup",{enumerable:!1,value:!0}),t}}),Lt={class:"text-base-800 text-lg"},$t=["href"],Nt=["href"],Rt={class:"inline"};function Ft(n,a,o,e,t,r){const s=Y("AImg"),u=Y("ShopSidenavCategory",!0);return b(),C("li",Lt,[o.categoryTree.subcategories.length?(b(),C("details",{key:0,class:"z-10 overflow-y-auto overflow-x-hidden bg-white open:absolute open:left-0 open:top-0 open:h-full open:w-full",onToggle:a[0]||(a[0]=i=>e.isOpen=!e.isOpen)},[d("summary",{class:$(["active:bg-base-100 cursor-pointer list-none px-6 py-3 transition-colors",e.isOpen?"bg-base-100":null])},[d("i",{class:$(e.isOpen?"i-arrow-right rotate-180 text-lg":"i-arrow-right float-right mb-0 mt-1 text-xl text-base-500")},null,2),!e.isOpen&&o.categoryTree.icon?(b(),R(s,{key:0,picture:o.categoryTree.icon,alt:o.categoryTree.name,class:"mr-3 inline h-5 w-auto"},null,8,["picture","alt"])):H("",!0),d("h3",{class:$(["inline",e.isOpen?"ml-4 text-base":null])},L(o.categoryTree.name),3)],2),d("ul",{class:$(["mt-2 transition-opacity",e.isFaded?"opacity-20":"opacity-100"]),tabindex:"-1"},[(b(!0),C(V,null,z(o.categoryTree.subcategories,(i,c)=>(b(),R(u,{key:c,"category-tree":i},null,8,["category-tree"]))),128)),d("li",null,[d("a",{href:`/${o.categoryTree.slug}`,class:"active:bg-base-200 block px-6 py-3 text-base underline"},L("Ver toda a categoria $1".replace("$1",o.categoryTree.name)),9,$t)])],2)],32)):(b(),C("a",{key:1,href:`/${o.categoryTree.slug}`,class:"active:bg-base-200 block px-6 py-3"},[!e.isOpen&&o.categoryTree.icon?(b(),R(s,{key:0,picture:o.categoryTree.icon,alt:o.categoryTree.name,class:"mr-3 inline h-5 w-auto"},null,8,["picture","alt"])):H("",!0),d("h3",Rt,L(o.categoryTree.name),1)],8,Nt))])}const Dt=G(At,[["render",Ft]]),Bt=D({__name:"ShopSidenav",props:{categoryTrees:{}},setup(n,{expose:a}){a(),re(()=>Ee());const o={get customerName(){return Ae},get isLogged(){return Le},get logout(){return $e},get socialNetworks(){return be},AccountLink:qe,SocialNetworkLink:Ke,ShopSidenavCategory:Dt};return Object.defineProperty(o,"__isScriptSetup",{enumerable:!1,value:!0}),o}}),Ht={class:"flex h-full flex-col bg-white"},Ut={class:"grow py-4"},Vt={class:"relative h-full"},jt={class:"text-base"},qt={class:"bg-base-100 flex items-center px-2 py-4"},Kt=d("i",{class:"i-user-circle text-base-500 m-0 text-4xl"},null,-1),zt={class:"leading-tight"},Wt=d("small",{class:"text-primary block font-semibold lowercase"},L("Meus pedidos")+", "+L("Minha conta"),-1),Yt=d("span",{class:"text-base-600"},L("Sair"),-1),Gt=d("i",{class:"i-arrow-right-on-rectangle ml-1 text-lg"},null,-1),Qt=[Yt,Gt],Zt={class:"bg-base-200 text-base-700 flex gap-3 p-4 text-xl"};function Xt(n,a,o,e,t,r){return b(),C("aside",Ht,[d("nav",Ut,[d("ul",Vt,[(b(!0),C(V,null,z(o.categoryTrees,(s,u)=>(b(),R(e.ShopSidenavCategory,{key:u,"category-tree":s},null,8,["category-tree"]))),128))])]),d("footer",jt,[d("div",qt,[E(e.AccountLink,{class:"flex grow items-center gap-3 p-2"},{default:T(()=>[Kt,d("span",zt,[Q(L(`Olá ${e.customerName||"Visitante"}`)+" ",1),Wt])]),_:1}),e.isLogged?(b(),C("button",{key:0,onClick:a[0]||(a[0]=(...s)=>e.logout&&e.logout(...s)),class:"text-base-800 p-2 text-right"},Qt)):H("",!0)]),d("ul",Zt,[(b(!0),C(V,null,z(e.socialNetworks,(s,u)=>(b(),C("li",{key:u},[E(e.SocialNetworkLink,{network:u,class:"active:text-primary p-1"},null,8,["network"])]))),128))])])])}const Jt=G(Bt,[["render",Xt]]);function en({container:n,accept:a,walk:o,enabled:e}){le(()=>{let t=n.value;if(!t||e!==void 0&&!e.value)return;let r=ue(n);if(!r)return;let s=Object.assign(i=>a(i),{acceptNode:a}),u=r.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,s,!1);for(;u.nextNode();)o(u.currentNode)})}function tn(n,a,o,e){pt.isServer||le(t=>{n=n??window,n.addEventListener(a,o,e),t(()=>n.removeEventListener(a,o,e))})}var K=(n=>(n[n.Forwards=0]="Forwards",n[n.Backwards=1]="Backwards",n))(K||{});function ze(){let n=S(0);return ft("keydown",a=>{a.key==="Tab"&&(n.value=a.shiftKey?1:0)}),n}function nn({defaultContainers:n=[],portals:a,mainTreeNodeRef:o}={}){let e=S(null),t=ue(e);function r(){var s,u,i;let c=[];for(let l of n)l!==null&&(l instanceof HTMLElement?c.push(l):"value"in l&&l.value instanceof HTMLElement&&c.push(l.value));if(a!=null&&a.value)for(let l of a.value)c.push(l);for(let l of(s=t?.querySelectorAll("html > *, body > *"))!=null?s:[])l!==document.body&&l!==document.head&&l instanceof HTMLElement&&l.id!=="headlessui-portal-root"&&(l.contains(p(e))||l.contains((i=(u=p(e))==null?void 0:u.getRootNode())==null?void 0:i.host)||c.some(x=>l.contains(x))||c.push(l));return c}return{resolveContainers:r,contains(s){return r().some(u=>u.contains(s))},mainTreeNodeRef:e,MainTreeNode(){return o!=null?null:W(pe,{features:de.Hidden,ref:e})}}}let Ce=Symbol("PortalParentContext");function an(){let n=ie(Ce,null),a=S([]);function o(r){return a.value.push(r),n&&n.register(r),()=>e(r)}function e(r){let s=a.value.indexOf(r);s!==-1&&a.value.splice(s,1),n&&n.unregister(r)}let t={register:o,unregister:e,portals:a};return[a,D({name:"PortalWrapper",setup(r,{slots:s}){return ve(Ce,t),()=>{var u;return(u=s.default)==null?void 0:u.call(s)}}})]}var on=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(on||{}),rn=(n=>(n[n.Pointer=0]="Pointer",n[n.Other=1]="Other",n))(rn||{});function ln(n){requestAnimationFrame(()=>requestAnimationFrame(n))}let We=Symbol("MenuContext");function me(n){let a=ie(We,null);if(a===null){let o=new Error(`<${n} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,me),o}return a}let sn=D({name:"Menu",props:{as:{type:[Object,String],default:"template"}},setup(n,{slots:a,attrs:o}){let e=S(1),t=S(null),r=S(null),s=S([]),u=S(""),i=S(null),c=S(1);function l(_=m=>m){let m=i.value!==null?s.value[i.value]:null,k=bt(_(s.value.slice()),y=>p(y.dataRef.domRef)),f=m?k.indexOf(m):null;return f===-1&&(f=null),{items:k,activeItemIndex:f}}let x={menuState:e,buttonRef:t,itemsRef:r,items:s,searchQuery:u,activeItemIndex:i,activationTrigger:c,closeMenu:()=>{e.value=1,i.value=null},openMenu:()=>e.value=0,goToItem(_,m,k){let f=l(),y=gt(_===U.Specific?{focus:U.Specific,id:m}:{focus:_},{resolveItems:()=>f.items,resolveActiveIndex:()=>f.activeItemIndex,resolveId:h=>h.id,resolveDisabled:h=>h.dataRef.disabled});u.value="",i.value=y,c.value=k??1,s.value=f.items},search(_){let m=u.value!==""?0:1;u.value+=_.toLowerCase();let k=(i.value!==null?s.value.slice(i.value+m).concat(s.value.slice(0,i.value+m)):s.value).find(y=>y.dataRef.textValue.startsWith(u.value)&&!y.dataRef.disabled),f=k?s.value.indexOf(k):-1;f===-1||f===i.value||(i.value=f,c.value=1)},clearSearch(){u.value=""},registerItem(_,m){let k=l(f=>[...f,{id:_,dataRef:m}]);s.value=k.items,i.value=k.activeItemIndex,c.value=1},unregisterItem(_){let m=l(k=>{let f=k.findIndex(y=>y.id===_);return f!==-1&&k.splice(f,1),k});s.value=m.items,i.value=m.activeItemIndex,c.value=1}};return Fe([t,r],(_,m)=>{var k;x.closeMenu(),De(m,Be.Loose)||(_.preventDefault(),(k=p(t))==null||k.focus())},I(()=>e.value===0)),ve(We,x),He(I(()=>te(e.value,{0:X.Open,1:X.Closed}))),()=>{let _={open:e.value===0,close:x.closeMenu};return ne({ourProps:{},theirProps:n,slot:_,slots:a,attrs:o,name:"Menu"})}}}),un=D({name:"MenuButton",props:{disabled:{type:Boolean,default:!1},as:{type:[Object,String],default:"button"},id:{type:String,default:()=>`headlessui-menu-button-${Z()}`}},setup(n,{attrs:a,slots:o,expose:e}){let t=me("MenuButton");e({el:t.buttonRef,$el:t.buttonRef});function r(c){switch(c.key){case A.Space:case A.Enter:case A.ArrowDown:c.preventDefault(),c.stopPropagation(),t.openMenu(),ee(()=>{var l;(l=p(t.itemsRef))==null||l.focus({preventScroll:!0}),t.goToItem(U.First)});break;case A.ArrowUp:c.preventDefault(),c.stopPropagation(),t.openMenu(),ee(()=>{var l;(l=p(t.itemsRef))==null||l.focus({preventScroll:!0}),t.goToItem(U.Last)});break}}function s(c){switch(c.key){case A.Space:c.preventDefault();break}}function u(c){n.disabled||(t.menuState.value===0?(t.closeMenu(),ee(()=>{var l;return(l=p(t.buttonRef))==null?void 0:l.focus({preventScroll:!0})})):(c.preventDefault(),t.openMenu(),ln(()=>{var l;return(l=p(t.itemsRef))==null?void 0:l.focus({preventScroll:!0})})))}let i=Ue(I(()=>({as:n.as,type:a.type})),t.buttonRef);return()=>{var c;let l={open:t.menuState.value===0},{id:x,..._}=n,m={ref:t.buttonRef,id:x,type:i.value,"aria-haspopup":"menu","aria-controls":(c=p(t.itemsRef))==null?void 0:c.id,"aria-expanded":t.menuState.value===0,onKeydown:r,onKeyup:s,onClick:u};return ne({ourProps:m,theirProps:_,slot:l,attrs:a,slots:o,name:"MenuButton"})}}}),cn=D({name:"MenuItems",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:()=>`headlessui-menu-items-${Z()}`}},setup(n,{attrs:a,slots:o,expose:e}){let t=me("MenuItems"),r=S(null);e({el:t.itemsRef,$el:t.itemsRef}),en({container:I(()=>p(t.itemsRef)),enabled:I(()=>t.menuState.value===0),accept(l){return l.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:l.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(l){l.setAttribute("role","none")}});function s(l){var x;switch(r.value&&clearTimeout(r.value),l.key){case A.Space:if(t.searchQuery.value!=="")return l.preventDefault(),l.stopPropagation(),t.search(l.key);case A.Enter:if(l.preventDefault(),l.stopPropagation(),t.activeItemIndex.value!==null){let _=t.items.value[t.activeItemIndex.value];(x=p(_.dataRef.domRef))==null||x.click()}t.closeMenu(),je(p(t.buttonRef));break;case A.ArrowDown:return l.preventDefault(),l.stopPropagation(),t.goToItem(U.Next);case A.ArrowUp:return l.preventDefault(),l.stopPropagation(),t.goToItem(U.Previous);case A.Home:case A.PageUp:return l.preventDefault(),l.stopPropagation(),t.goToItem(U.First);case A.End:case A.PageDown:return l.preventDefault(),l.stopPropagation(),t.goToItem(U.Last);case A.Escape:l.preventDefault(),l.stopPropagation(),t.closeMenu(),ee(()=>{var _;return(_=p(t.buttonRef))==null?void 0:_.focus({preventScroll:!0})});break;case A.Tab:l.preventDefault(),l.stopPropagation(),t.closeMenu(),ee(()=>ht(p(t.buttonRef),l.shiftKey?j.Previous:j.Next));break;default:l.key.length===1&&(t.search(l.key),r.value=setTimeout(()=>t.clearSearch(),350));break}}function u(l){switch(l.key){case A.Space:l.preventDefault();break}}let i=Ve(),c=I(()=>i!==null?(i.value&X.Open)===X.Open:t.menuState.value===0);return()=>{var l,x;let _={open:t.menuState.value===0},{id:m,...k}=n,f={"aria-activedescendant":t.activeItemIndex.value===null||(l=t.items.value[t.activeItemIndex.value])==null?void 0:l.id,"aria-labelledby":(x=p(t.buttonRef))==null?void 0:x.id,id:m,onKeydown:s,onKeyup:u,role:"menu",tabIndex:0,ref:t.itemsRef};return ne({ourProps:f,theirProps:k,slot:_,attrs:a,slots:o,features:fe.RenderStrategy|fe.Static,visible:c.value,name:"MenuItems"})}}}),dn=D({name:"MenuItem",inheritAttrs:!1,props:{as:{type:[Object,String],default:"template"},disabled:{type:Boolean,default:!1},id:{type:String,default:()=>`headlessui-menu-item-${Z()}`}},setup(n,{slots:a,attrs:o,expose:e}){let t=me("MenuItem"),r=S(null);e({el:r,$el:r});let s=I(()=>t.activeItemIndex.value!==null?t.items.value[t.activeItemIndex.value].id===n.id:!1),u=vt(r),i=I(()=>({disabled:n.disabled,get textValue(){return u()},domRef:r}));re(()=>t.registerItem(n.id,i)),_e(()=>t.unregisterItem(n.id)),le(()=>{t.menuState.value===0&&s.value&&t.activationTrigger.value!==0&&ee(()=>{var f,y;return(y=(f=p(r))==null?void 0:f.scrollIntoView)==null?void 0:y.call(f,{block:"nearest"})})});function c(f){if(n.disabled)return f.preventDefault();t.closeMenu(),je(p(t.buttonRef))}function l(){if(n.disabled)return t.goToItem(U.Nothing);t.goToItem(U.Specific,n.id)}let x=mt();function _(f){x.update(f)}function m(f){x.wasMoved(f)&&(n.disabled||s.value||t.goToItem(U.Specific,n.id,0))}function k(f){x.wasMoved(f)&&(n.disabled||s.value&&t.goToItem(U.Nothing))}return()=>{let{disabled:f}=n,y={active:s.value,disabled:f,close:t.closeMenu},{id:h,...P}=n;return ne({ourProps:{id:h,ref:r,role:"menuitem",tabIndex:f===!0?void 0:-1,"aria-disabled":f===!0?!0:void 0,disabled:void 0,onClick:c,onFocus:l,onPointerenter:_,onMouseenter:_,onPointermove:m,onMousemove:m,onPointerleave:k,onMouseleave:k},theirProps:{...o,...P},slot:y,attrs:o,slots:a,name:"MenuItem"})}}});var pn=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(pn||{});let Ye=Symbol("PopoverContext");function Se(n){let a=ie(Ye,null);if(a===null){let o=new Error(`<${n} /> is missing a parent <${Ze.name} /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,Se),o}return a}let fn=Symbol("PopoverGroupContext");function Ge(){return ie(fn,null)}let Qe=Symbol("PopoverPanelContext");function vn(){return ie(Qe,null)}let Ze=D({name:"Popover",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"}},setup(n,{slots:a,attrs:o,expose:e}){var t;let r=S(null);e({el:r,$el:r});let s=S(1),u=S(null),i=S(null),c=S(null),l=S(null),x=I(()=>ue(r)),_=I(()=>{var v,w;if(!p(u)||!p(l))return!1;for(let B of document.querySelectorAll("body > *"))if(Number(B?.contains(p(u)))^Number(B?.contains(p(l))))return!0;let O=ye(),N=O.indexOf(p(u)),q=(N+O.length-1)%O.length,ce=(N+1)%O.length,xe=O[q],F=O[ce];return!((v=p(l))!=null&&v.contains(xe))&&!((w=p(l))!=null&&w.contains(F))}),m={popoverState:s,buttonId:S(null),panelId:S(null),panel:l,button:u,isPortalled:_,beforePanelSentinel:i,afterPanelSentinel:c,togglePopover(){s.value=te(s.value,{0:1,1:0})},closePopover(){s.value!==1&&(s.value=1)},close(v){m.closePopover();let w=v?v instanceof HTMLElement?v:v.value instanceof HTMLElement?p(v):p(m.button):p(m.button);w?.focus()}};ve(Ye,m),He(I(()=>te(s.value,{0:X.Open,1:X.Closed})));let k={buttonId:m.buttonId,panelId:m.panelId,close(){m.closePopover()}},f=Ge(),y=f?.registerPopover,[h,P]=an(),g=nn({mainTreeNodeRef:f?.mainTreeNodeRef,portals:h,defaultContainers:[u,l]});function M(){var v,w,O,N;return(N=f?.isFocusWithinPopoverGroup())!=null?N:((v=x.value)==null?void 0:v.activeElement)&&(((w=p(u))==null?void 0:w.contains(x.value.activeElement))||((O=p(l))==null?void 0:O.contains(x.value.activeElement)))}return le(()=>y?.(k)),tn((t=x.value)==null?void 0:t.defaultView,"focus",v=>{var w,O;v.target!==window&&v.target instanceof HTMLElement&&s.value===0&&(M()||u&&l&&(g.contains(v.target)||(w=p(m.beforePanelSentinel))!=null&&w.contains(v.target)||(O=p(m.afterPanelSentinel))!=null&&O.contains(v.target)||m.closePopover()))},!0),Fe(g.resolveContainers,(v,w)=>{var O;m.closePopover(),De(w,Be.Loose)||(v.preventDefault(),(O=p(u))==null||O.focus())},I(()=>s.value===0)),()=>{let v={open:s.value===0,close:m.close};return W(V,[W(P,{},()=>ne({theirProps:{...n,...o},ourProps:{ref:r},slot:v,slots:a,attrs:o,name:"Popover"})),W(g.MainTreeNode)])}}}),mn=D({name:"PopoverButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`headlessui-popover-button-${Z()}`}},inheritAttrs:!1,setup(n,{attrs:a,slots:o,expose:e}){let t=Se("PopoverButton"),r=I(()=>ue(t.button));e({el:t.button,$el:t.button}),re(()=>{t.buttonId.value=n.id}),_e(()=>{t.buttonId.value=null});let s=Ge(),u=s?.closeOthers,i=vn(),c=I(()=>i===null?!1:i.value===t.panelId.value),l=S(null),x=`headlessui-focus-sentinel-${Z()}`;c.value||le(()=>{t.button.value=p(l)});let _=Ue(I(()=>({as:n.as,type:a.type})),l);function m(g){var M,v,w,O,N;if(c.value){if(t.popoverState.value===1)return;switch(g.key){case A.Space:case A.Enter:g.preventDefault(),(v=(M=g.target).click)==null||v.call(M),t.closePopover(),(w=p(t.button))==null||w.focus();break}}else switch(g.key){case A.Space:case A.Enter:g.preventDefault(),g.stopPropagation(),t.popoverState.value===1&&u?.(t.buttonId.value),t.togglePopover();break;case A.Escape:if(t.popoverState.value!==0)return u?.(t.buttonId.value);if(!p(t.button)||(O=r.value)!=null&&O.activeElement&&!((N=p(t.button))!=null&&N.contains(r.value.activeElement)))return;g.preventDefault(),g.stopPropagation(),t.closePopover();break}}function k(g){c.value||g.key===A.Space&&g.preventDefault()}function f(g){var M,v;n.disabled||(c.value?(t.closePopover(),(M=p(t.button))==null||M.focus()):(g.preventDefault(),g.stopPropagation(),t.popoverState.value===1&&u?.(t.buttonId.value),t.togglePopover(),(v=p(t.button))==null||v.focus()))}function y(g){g.preventDefault(),g.stopPropagation()}let h=ze();function P(){let g=p(t.panel);if(!g)return;function M(){te(h.value,{[K.Forwards]:()=>J(g,j.First),[K.Backwards]:()=>J(g,j.Last)})===ge.Error&&J(ye().filter(v=>v.dataset.headlessuiFocusGuard!=="true"),te(h.value,{[K.Forwards]:j.Next,[K.Backwards]:j.Previous}),{relativeTo:p(t.button)})}M()}return()=>{let g=t.popoverState.value===0,M={open:g},{id:v,...w}=n,O=c.value?{ref:l,type:_.value,onKeydown:m,onClick:f}:{ref:l,id:v,type:_.value,"aria-expanded":t.popoverState.value===0,"aria-controls":p(t.panel)?t.panelId.value:void 0,disabled:n.disabled?!0:void 0,onKeydown:m,onKeyup:k,onClick:f,onMousedown:y};return W(V,[ne({ourProps:O,theirProps:{...a,...w},slot:M,attrs:a,slots:o,name:"PopoverButton"}),g&&!c.value&&t.isPortalled.value&&W(pe,{id:x,features:de.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:P})])}}}),gn=D({name:"PopoverPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},focus:{type:Boolean,default:!1},id:{type:String,default:()=>`headlessui-popover-panel-${Z()}`}},inheritAttrs:!1,setup(n,{attrs:a,slots:o,expose:e}){let{focus:t}=n,r=Se("PopoverPanel"),s=I(()=>ue(r.panel)),u=`headlessui-focus-sentinel-before-${Z()}`,i=`headlessui-focus-sentinel-after-${Z()}`;e({el:r.panel,$el:r.panel}),re(()=>{r.panelId.value=n.id}),_e(()=>{r.panelId.value=null}),ve(Qe,r.panelId),le(()=>{var y,h;if(!t||r.popoverState.value!==0||!r.panel)return;let P=(y=s.value)==null?void 0:y.activeElement;(h=p(r.panel))!=null&&h.contains(P)||J(p(r.panel),j.First)});let c=Ve(),l=I(()=>c!==null?(c.value&X.Open)===X.Open:r.popoverState.value===0);function x(y){var h,P;switch(y.key){case A.Escape:if(r.popoverState.value!==0||!p(r.panel)||s.value&&!((h=p(r.panel))!=null&&h.contains(s.value.activeElement)))return;y.preventDefault(),y.stopPropagation(),r.closePopover(),(P=p(r.button))==null||P.focus();break}}function _(y){var h,P,g,M,v;let w=y.relatedTarget;w&&p(r.panel)&&((h=p(r.panel))!=null&&h.contains(w)||(r.closePopover(),((g=(P=p(r.beforePanelSentinel))==null?void 0:P.contains)!=null&&g.call(P,w)||(v=(M=p(r.afterPanelSentinel))==null?void 0:M.contains)!=null&&v.call(M,w))&&w.focus({preventScroll:!0})))}let m=ze();function k(){let y=p(r.panel);if(!y)return;function h(){te(m.value,{[K.Forwards]:()=>{var P;J(y,j.First)===ge.Error&&((P=p(r.afterPanelSentinel))==null||P.focus())},[K.Backwards]:()=>{var P;(P=p(r.button))==null||P.focus({preventScroll:!0})}})}h()}function f(){let y=p(r.panel);if(!y)return;function h(){te(m.value,{[K.Forwards]:()=>{let P=p(r.button),g=p(r.panel);if(!P)return;let M=ye(),v=M.indexOf(P),w=M.slice(0,v+1),O=[...M.slice(v+1),...w];for(let N of O.slice())if(N.dataset.headlessuiFocusGuard==="true"||g!=null&&g.contains(N)){let q=O.indexOf(N);q!==-1&&O.splice(q,1)}J(O,j.First,{sorted:!1})},[K.Backwards]:()=>{var P;J(y,j.Previous)===ge.Error&&((P=p(r.button))==null||P.focus())}})}h()}return()=>{let y={open:r.popoverState.value===0,close:r.close},{id:h,focus:P,...g}=n,M={ref:r.panel,id:h,onKeydown:x,onFocusout:t&&r.popoverState.value===0?_:void 0,tabIndex:-1};return ne({ourProps:M,theirProps:{...a,...g},attrs:a,slot:y,slots:{...o,default:(...v)=>{var w;return[W(V,[l.value&&r.isPortalled.value&&W(pe,{id:u,ref:r.beforePanelSentinel,features:de.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:k}),(w=o.default)==null?void 0:w.call(o,...v),l.value&&r.isPortalled.value&&W(pe,{id:i,ref:r.afterPanelSentinel,features:de.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:f})])]}},features:fe.RenderStrategy|fe.Static,visible:l.value,name:"PopoverPanel"})}}});const hn=n=>{const a=I(()=>{const i=n.categoryTree.pictures?.[0];if(i&&!i.alt)return{alt:n.categoryTree.name,...i}}),o=I(()=>n.categoryTree.subcategories.filter(({subcategories:i})=>i.length)),e=I(()=>{let i=o.value.length;return a.value&&(i+=1),o.value.length<n.categoryTree.subcategories.length&&(i+=1),i}),t=I(()=>(n.megaMenuMaxCols||7)>=e.value),r=I(()=>t.value?n.categoryTree.subcategories.filter(({subcategories:i})=>!i.length):n.categoryTree.subcategories),s=I(()=>t.value?n.categoryTree.subcategories.filter(({subcategories:i})=>i.length):n.categoryTree.subcategories),u=I(()=>t.value?e.value:a.value?2:1);return{categoryPicture:a,isMegaMenu:t,subcategoryLinks:r,subcategoryCols:s,countMenuCols:u}},bn=D({__name:"ShopHeaderSubmenu",props:{categoryTree:{},megaMenuMaxCols:{}},setup(n,{expose:a}){a();const o=n,{categoryPicture:e,subcategoryLinks:t,subcategoryCols:r,countMenuCols:s}=hn(o),u=S(null),i=S(null);ot(u,()=>i.value?.click());const c={props:o,categoryPicture:e,subcategoryLinks:t,subcategoryCols:r,countMenuCols:s,panel:u,close:i,get Popover(){return Ze},get PopoverButton(){return mn},get PopoverPanel(){return gn}};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}}),_n=["href"],yn={class:"relative",ref:"panel"},Sn={class:"flex w-full gap-6"},xn={key:0,class:"flex-1"},kn=["href"],wn=["href"],Pn={class:"text-base-600 mb-1.5 mt-1 text-sm"},Mn=["href"],Tn=["href"],In=["onClick"];function On(n,a,o,e,t,r){const s=Y("AImg"),u=Y("Fade");return b(),R(e.Popover,null,{default:T(({open:i})=>[d("a",{href:`/${o.categoryTree.slug}`,role:"button"},[E(e.PopoverButton,{class:"outline-none"},{default:T(()=>[oe(n.$slots,"button",Re(Ne({open:i})))]),_:2},1024)],8,_n),d("div",yn,[E(u,null,{default:T(()=>[E(e.PopoverPanel,{class:$(["text-base-700 absolute left-1/2 top-3 z-50 -translate-x-1/2 !transform rounded bg-white px-6 py-4 text-base shadow",e.countMenuCols===1?"w-60":e.countMenuCols===2?`w-screen ${e.categoryPicture?"max-w-lg":"max-w-sm"}`:e.countMenuCols===3?`w-screen ${e.categoryPicture?"max-w-xl":"max-w-md"}`:e.countMenuCols<6?"w-screen max-w-3xl":"w-screen max-w-5xl"])},{default:T(({close:c})=>[d("div",Sn,[e.subcategoryLinks.length?(b(),C("ul",xn,[(b(!0),C(V,null,z(e.subcategoryLinks,(l,x)=>(b(),C("li",{key:`link-${x}`,class:$(e.subcategoryLinks.length>10?"text-sm mb-1":"mb-2")},[d("a",{href:`/${l.slug}`,class:"hover:text-primary"},[d("h3",null,L(l.name),1)],8,kn)],2))),128))])):H("",!0),(b(!0),C(V,null,z(e.subcategoryCols,(l,x)=>(b(),C("div",{key:x,class:"flex-1"},[d("a",{href:`/${l.slug}`,class:"hover:text-primary"},[d("h3",null,L(l.name),1)],8,wn),d("ul",Pn,[(b(!0),C(V,null,z(l.subcategories,(_,m)=>(b(),C("li",{key:`${x}-${m}`,class:"mb-0.5"},[d("a",{href:`/${_.slug}`,class:"hover:text-primary hover:underline"},[d("h3",null,L(_.name),1)],8,Mn)]))),128))])]))),128)),e.categoryPicture?(b(),C("div",{key:1,class:$(e.countMenuCols===2?"basis-1/2":e.countMenuCols<5?"basis-2/5":"basis-1/3")},[E(s,{picture:e.categoryPicture,class:"ml-auto rounded"},null,8,["picture"])],2)):H("",!0)]),d("a",{href:`/${o.categoryTree.slug}`,class:"text-base-600 mt-1 block text-xs leading-snug underline"},L("Ver toda a categoria $1".replace("$1",o.categoryTree.name)),9,Tn),d("button",{ref:"close",onClick:he(c,["stop"]),class:"hidden"},null,8,In)]),_:1},8,["class"])]),_:1})],512)]),_:3})}const Cn=G(bn,[["render",On]]),En=D({__name:"ShopHeaderMenu",props:{inlineMenuTrees:{}},setup(n,{expose:a}){a();const o=n,e=I(()=>!!o.inlineMenuTrees.find(({subcategories:r})=>!r.length)),t={props:o,hasOneLevelSubcategories:e,ShopHeaderSubmenu:Cn};return Object.defineProperty(t,"__isScriptSetup",{enumerable:!1,value:!0}),t}}),An={class:"hover:text-primary group"},Ln=["href"],$n={class:"inline"};function Nn(n,a,o,e,t,r){return b(),C("nav",null,[d("ul",{class:$(["text-base-700 flex gap-4 xl:gap-5",o.inlineMenuTrees.length<7?"text-base":"text-sm"])},[(b(!0),C(V,null,z(o.inlineMenuTrees,(s,u)=>(b(),C("li",{key:u},[s.subcategories.length?(b(),R(e.ShopHeaderSubmenu,{key:0,"category-tree":s},{button:T(({open:i})=>[d("span",An,[d("h3",{class:$(["inline group-hover:underline",[o.inlineMenuTrees.length<7?"decoration-2":null,i?"underline":null]])},L(s.name),3),e.hasOneLevelSubcategories?(b(),C("i",{key:0,class:$(["i-chevron-right text-base-400 group-hover:text-primary-subtle ml-1 transition-transform",i?"-rotate-90":"rotate-90"])},null,2)):H("",!0)])]),_:2},1032,["category-tree"])):(b(),C("a",{key:1,href:`/${s.slug}`,class:$(["hover:text-primary hover:underline",o.inlineMenuTrees.length<7?"decoration-2":null])},[d("h3",$n,L(s.name),1)],10,Ln))]))),128))],2)])}const Rn=G(En,[["render",Nn]]),Fn=D({__name:"AccountMenu",setup(n,{expose:a}){a();const o={get Menu(){return sn},get MenuButton(){return un},get MenuItems(){return cn},get MenuItem(){return dn},get socialNetworks(){return be},get customerName(){return Ae},get initializeFirebaseAuth(){return Ee},get isLogged(){return Le},get logout(){return $e},AccountLink:qe,SocialNetworkLink:Ke};return Object.defineProperty(o,"__isScriptSetup",{enumerable:!1,value:!0}),o}}),Dn={key:0},Bn={class:"text-base-600 p-3"},Hn={class:"list-none"},Un=d("i",{class:"i-heart mr-1"},null,-1),Vn={class:"text-base-500 flex justify-center gap-2 p-2 text-base"},jn=d("span",{class:"text-base-600"},L("Sair"),-1),qn=d("i",{class:"i-arrow-right-on-rectangle ml-1 text-lg"},null,-1),Kn=[jn,qn];function zn(n,a,o,e,t,r){const s=Y("ALink"),u=Y("Fade");return b(),R(e.Menu,{as:"div",class:"text-base-800 relative text-center text-sm"},{default:T(({open:i})=>[i?(b(),C("div",Dn,[a[0]||(Pe(-1),a[0]=d("span",null,[Q(L(e.initializeFirebaseAuth()),1)]),Pe(1),a[0])])):H("",!0),E(e.AccountLink,{role:"button",onClick:a[1]||(a[1]=he(()=>{},["prevent"]))},{default:T(()=>[E(e.MenuButton,{class:"outline-none","aria-label":"Minha conta"},{default:T(()=>[oe(n.$slots,"button",Re(Ne({open:i})))]),_:2},1024)]),_:2},1024),E(u,null,{default:T(()=>[E(e.MenuItems,{class:"divide-base-100 absolute -right-8 mt-2 w-56 divide-y rounded bg-white shadow ring-1 ring-black/5 focus:outline-none"},{default:T(()=>[d("div",Bn,[Q(L(`Olá ${e.customerName||"Visitante"}`)+" ",1),E(e.AccountLink,{role:"button",class:"ui-btn-sm ui-btn-primary my-1 block"},{default:T(()=>[Q(L("Acessar minha conta"))]),_:1}),e.isLogged?H("",!0):(b(),R(e.AccountLink,{key:0,"is-sign-up":"",class:"ui-link block"},{default:T(()=>[Q(L("Criar uma conta"))]),_:1}))]),d("ul",Hn,[E(e.MenuItem,{as:"li"},{default:T(({active:c})=>[E(e.AccountLink,{to:"orders",class:$(["block p-2",c?"bg-primary-100 text-primary":null])},{default:T(()=>[Q(L("Meus pedidos"))]),_:2},1032,["class"])]),_:1}),E(e.MenuItem,{as:"li"},{default:T(({active:c})=>[E(e.AccountLink,{to:"favorites",class:$(["block p-2",c?"bg-primary-100 text-primary":null])},{default:T(()=>[Un,Q(" "+L("Meus favoritos"))]),_:2},1032,["class"])]),_:1}),(b(!0),C(V,null,z(n.$settings.serviceLinks,({title:c,href:l},x)=>(b(),R(e.MenuItem,{as:"li",key:`s-${x}`},{default:T(({active:_})=>[E(s,{href:l,class:$(["block p-2",_?"bg-primary-100 text-primary":null])},{default:T(()=>[Q(L(c),1)]),_:2},1032,["href","class"])]),_:2},1024))),128)),E(e.MenuItem,{as:"li"},{default:T(()=>[d("div",Vn,[(b(!0),C(V,null,z(e.socialNetworks,(c,l)=>(b(),C("span",{key:l},[E(e.SocialNetworkLink,{network:l,class:"hover:text-primary p-1"},null,8,["network"])]))),128))])]),_:1}),e.isLogged?(b(),R(e.MenuItem,{key:0,as:"li"},{default:T(()=>[d("button",{onClick:a[2]||(a[2]=(...c)=>e.logout&&e.logout(...c)),class:"text-base-800 p-2 text-right"},Kn)]),_:1})):H("",!0)])]),_:1})]),_:1})]),_:3})}const Wn=G(Fn,[["render",zn]]),Yn=D({__name:"ShopHeader",props:{searchInput:{},categories:{},menuCategorySlugs:{},menuRandomCategories:{},isAlphabeticalSortSubmenu:{type:Boolean}},setup(n,{expose:a}){a();const o=Oe(()=>ke(()=>import("./SearchModal.3j8PYOg4.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]))),e=Oe(()=>ke(()=>import("./CartSidebar.1fFe2RGR.js"),__vite__mapDeps([19,1,2,17,9,3,18,8,7,5,6,20,16,10,11,15]))),t=n,r=S(null),s=S(null),{isSticky:u,positionY:i,categoryTrees:c,inlineMenuTrees:l,isSearchOpen:x,isSearchOpenOnce:_,searchTerm:m,quickSearchTerm:k,toggleSearch:f,isCartOpen:y,isCartOpenOnce:h,cartTotalItems:P,handleOnMounted:g}=kt({...t,header:r,searchInput:s}),M=S(!1),v=S(!1);re(()=>{v.value=!0,g()});const w={SearchModal:o,CartSidebar:e,props:t,header:r,searchInput:s,isSticky:u,positionY:i,categoryTrees:c,inlineMenuTrees:l,isSearchOpen:x,isSearchOpenOnce:_,searchTerm:m,quickSearchTerm:k,toggleSearch:f,isCartOpen:y,isCartOpenOnce:h,cartTotalItems:P,handleOnMounted:g,isSidenavOpen:M,isMounted:v,get isMobile(){return se},Drawer:_t,ShopSidenav:Jt,ShopHeaderMenu:Rn,AccountMenu:Wn};return Object.defineProperty(w,"__isScriptSetup",{enumerable:!1,value:!0}),w}}),Gn={class:"mx-auto flex w-screen grid-flow-col grid-cols-3 items-center justify-between px-1 sm:pl-2 sm:pr-2.5 md:grid lg:w-[calc(100vw-1rem)] lg:auto-cols-max lg:grid-cols-none lg:px-1 xl:max-w-[82rem] 2xl:max-w-[85rem]"},Qn={class:"basis-1/4 lg:hidden"},Zn={class:"text-base-800 flex basis-1/4 items-center justify-end gap-3 px-2 lg:gap-4"},Xn={action:"/s",method:"get",class:"relative"},Jn=d("label",{for:"HeaderSearch",class:"sr-only"},L("Buscar produtos"),-1),ea={class:"absolute -right-0.5 -top-2.5 flex items-stretch"},ta=d("div",{class:"hidden w-12 bg-gradient-to-r from-transparent to-white sm:block"},null,-1),na=["placeholder"],aa=["href"],oa=d("i",{class:"i-shopping-bag group-hover:text-primary h-7 w-7 group-hover:scale-110 group-active:scale-125"},null,-1),ra={key:0,class:"ui-badge-pill-sm absolute -right-1.5 -top-1"},la={class:"container mx-auto"},sa={class:"h-full bg-white"};function ia(n,a,o,e,t,r){const s=Y("Fade"),u=Y("Skeleton");return b(),C("header",{ref:"header",class:$(["relative top-0 z-50 transition-colors",[e.isSticky&&!e.isSidenavOpen?"bg-white/80":"bg-white",e.isSticky?"py-2 shadow backdrop-blur-md md:py-3":"py-3 sm:py-4 md:py-5"]])},[d("div",Gn,[d("div",Qn,[d("button",{class:"my-1 px-2","aria-label":"Abrir/fechar menu",onClick:a[0]||(a[0]=i=>e.isSidenavOpen=!e.isSidenavOpen)},[d("i",{class:$(["text-3xl transition-colors",[e.isSidenavOpen?"i-close":"i-bars-3-bottom-left",e.isMounted?"text-base-500":"text-base-400 animate-pulse"]])},null,2)])]),oe(n.$slots,"logo"),e.isMobile?H("",!0):(b(),R(e.ShopHeaderMenu,Me({key:0},{inlineMenuTrees:e.inlineMenuTrees},{class:"hidden lg:block"}),null,16)),d("div",Zn,[d("form",Xn,[Jn,E(s,null,{default:T(()=>[Te(d("div",ea,[ta,Te(d("input",{ref:"searchInput",type:"search",id:"HeaderSearch",name:"q","onUpdate:modelValue":a[1]||(a[1]=i=>e.searchTerm=i),class:"to-primary-50 border-primary/20 border-1 w-72 max-w-md bg-gradient-to-r from-white py-3 pl-5 pr-12 text-base ring-0 md:w-screen",placeholder:"Buscar produtos ..."},null,8,na),[[Je,e.searchTerm,void 0,{trim:!0}]])],512),[[Xe,e.isSearchOpen]])]),_:1}),d("button",{type:"submit","aria-label":"Buscar produtos",onClick:a[2]||(a[2]=(...i)=>e.toggleSearch&&e.toggleSearch(...i))},[d("i",{class:$(["i-magnifying-glass hover:text-primary h-7 w-7 hover:scale-110 active:scale-125",e.isSearchOpen&&"text-primary-600 -translate-x-2"])},null,2)])]),e.isMobile?H("",!0):(b(),R(e.AccountMenu,{key:0,class:"hidden sm:block"},{button:T(({open:i})=>[d("i",{class:$(["i-user-circle hover:text-primary h-7 w-7 hover:scale-110 active:scale-125",i?"text-black scale-110":null])},null,2)]),_:1})),d("a",{href:n.$settings.cartUrl||"/app/","aria-label":"Abrir carrinho",onClick:a[3]||(a[3]=he(i=>e.isCartOpen=!e.isCartOpen,["prevent"])),class:"group relative",role:"button"},[oa,e.cartTotalItems?(b(),C("span",ra,L(e.cartTotalItems),1)):H("",!0)],8,aa)])]),E(e.Drawer,{modelValue:e.isSidenavOpen,"onUpdate:modelValue":a[4]||(a[4]=i=>e.isSidenavOpen=i),"has-close-button":!1,position:"absolute",class:$(e.isSticky?"mt-2 md:mt-3":"mt-3 sm:mt-4 md:mt-5"),style:ct({height:`calc(100vh - ${e.positionY}px + .5rem)`,maxHeight:`calc(100dvh - ${e.positionY}px + .5rem)`})},{default:T(()=>[E(e.ShopSidenav,Me({class:"pt-6"},{categoryTrees:e.categoryTrees}),null,16)]),_:1},8,["modelValue","class","style"]),E(e.Drawer,{modelValue:e.isSearchOpen,"onUpdate:modelValue":a[5]||(a[5]=i=>e.isSearchOpen=i),"is-hidden":!e.quickSearchTerm,"has-close-button":!1,"anchor-el":e.searchInput?.parentElement,position:"absolute",placement:"top",animation:"scale","max-width":"55rem",class:$(["bg-transparent lg:mt-12",e.isSticky?"mt-2 md:mt-3":"mt-3 sm:mt-4 md:mt-5"])},{default:T(()=>[(b(),R(Ie,null,{fallback:T(()=>[d("div",la,[E(u,{class:"p-6","is-large":"","is-bold":""})])]),default:T(()=>[e.isSearchOpenOnce?(b(),R(e.SearchModal,{key:0,term:e.quickSearchTerm},null,8,["term"])):H("",!0)]),_:1}))]),_:1},8,["modelValue","is-hidden","anchor-el","class"]),e.isMounted?(b(),R(dt,{key:0,to:"#teleported-overlap"},[E(e.Drawer,{modelValue:e.isCartOpen,"onUpdate:modelValue":a[7]||(a[7]=i=>e.isCartOpen=i),placement:"end","backdrop-target":"#teleported-overlap",class:"shadow"},{default:T(()=>[(b(),R(Ie,null,{fallback:T(()=>[d("div",sa,[E(u,{class:"px-6 pt-16","is-bold":""})])]),default:T(()=>[e.isCartOpenOnce?(b(),R(e.CartSidebar,{key:0,onClose:a[6]||(a[6]=i=>e.isCartOpen=!1)})):H("",!0)]),_:1}))]),_:1},8,["modelValue"])])):H("",!0)],2)}const ba=G(Yn,[["render",ia]]);export{ba as default};
2
- function __vite__mapDeps(indexes) {
3
- if (!__vite__mapDeps.viteFileDeps) {
4
- __vite__mapDeps.viteFileDeps = ["_astro/SearchModal.3j8PYOg4.js","_astro/_plugin-vue_export-helper.zwYIxbLv.js","_astro/runtime-core.esm-bundler.arxvxBux.js","_astro/sf-utils.Z4H-dRBJ.js","_astro/use-analytics.qryUNUh7.js","_astro/customer-session.zys3PDaD.js","_astro/index.ZVw4Qnet.js","_astro/shopping-cart.bLFDGb3i.js","_astro/price.Easct8WC.js","_astro/afetch.5c8VmT0-.js","_astro/name.LjTu3VQY.js","_astro/i18n.vH3oaO8m.js","_astro/ProductShelf.GkYOYehE.js","_astro/index._z3KfWlu.js","_astro/use-product-card.h3dJsLOD.js","_astro/img.PXVYiEi4.js","_astro/Prices.ij-wiXyI.js","_astro/modules-info.39sWCsAH.js","_astro/format-money.85X7Tchr.js","_astro/CartSidebar.1fFe2RGR.js","_astro/QuantitySelector.BLGwL_-E.js"]
5
- }
6
- return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
7
- }
@@ -1 +0,0 @@
1
- import{_ as B,T as ne,c as ae,d as oe}from"./_plugin-vue_export-helper.zwYIxbLv.js";import{d as C,c,N as y,$ as z,V as A,Z as b,a0 as G,O as R,a2 as J,a3 as ee,R as S,T as v,a4 as se,a as L,w as k,a6 as K,H as ie,E as le,ac as ue,a5 as ce,Q as Z,k as $,ad as de}from"./runtime-core.esm-bundler.arxvxBux.js";import{g as fe}from"./img.PXVYiEi4.js";import{u as me}from"./index.ZVw4Qnet.js";import{g as ve}from"./img-sizes.gxAI9JNh.js";import{i as pe}from"./i18n.vH3oaO8m.js";import{f as ge}from"./format-money.85X7Tchr.js";import{a as he,b as ye}from"./index._z3KfWlu.js";import"./price.Easct8WC.js";const _e=C({__name:"Fade",props:{speed:{default:"default"},slide:{},isFloating:{type:Boolean,default:!1},isLeaveTo:{type:Boolean,default:!0},isEnterFrom:{type:Boolean,default:!0}},setup(r,{expose:a}){a();const e=r,t=c(()=>e.speed==="default"?"var(--transition, .2s linear)":`var(--transition-${e.speed}, .4s linear)`),s=c(()=>{switch(e.slide){case"down":return"translate3d(0, -100%, 0)";case"left":return"translate3d(-100%, 0, 0)";case"right":return"translate3d(100%, 0, 0)";case"up":return"translate3d(0, 100%, 0)";default:return"none"}}),i=c(()=>s.value!=="none"?.1:0),u=c(()=>e.isEnterFrom?i.value:1),g=c(()=>e.isLeaveTo?i.value:1),P=c(()=>e.isEnterFrom?s.value:"none"),f=c(()=>e.isLeaveTo?s.value:"none"),l=c(()=>e.slide==="down"||e.slide==="up"),_=c(()=>e.isFloating?null:l.value?0:"auto"),T=c(()=>e.isFloating?null:e.slide&&!l.value?0:"auto"),m=c(()=>e.isEnterFrom?_.value:"auto"),w=c(()=>e.isEnterFrom?T.value:"auto"),x=c(()=>{let n="opacity";return s.value!=="none"&&(n+=", transform"),_.value===0&&(n+=", height"),T.value===0&&(n+=", width"),n}),p={props:e,duration:t,transform:s,opacity:i,enterFromOpacity:u,leaveToOpacity:g,enterFromTransform:P,leaveToTransform:f,isSlideY:l,height:_,width:T,enterFromHeight:m,enterFromWidth:w,willChange:x,setInitialStyles:n=>{n.style.setProperty("--fade-will-change",x.value),n.style.setProperty("--fade-duration",t.value),n.style.setProperty("--fade-enter-opacity",String(u.value)),n.style.setProperty("--fade-enter-transform",String(P.value)),n.style.setProperty("--fade-enter-height",String(m.value)),n.style.setProperty("--fade-enter-width",String(w.value)),n.style.setProperty("--fade-leave-opacity",String(g.value)),n.style.setProperty("--fade-leave-transform",String(f.value))},onEnter:n=>{if(e.slide&&!e.isFloating&&e.isEnterFrom){l.value?(n.style.width=getComputedStyle(n).width,n.style.height="auto"):(n.style.width="auto",n.style.height=getComputedStyle(n).height),n.style.position="absolute",n.style.visibility="hidden";const{width:h,height:N}=getComputedStyle(n);n.style.width=l.value?"":"0",n.style.height=l.value?"0":"",n.style.position="",n.style.visibility="",getComputedStyle(n)[l.value?"height":"width"],requestAnimationFrame(()=>{l.value?n.style.height=N:n.style.width=h})}},onAfterEnter:n=>{e.slide&&!e.isFloating&&e.isEnterFrom&&(n.style[l.value?"height":"width"]="")},onLeave:n=>{if(e.slide&&!e.isFloating&&e.isLeaveTo){l.value?n.style.height=getComputedStyle(n).height:n.style.width=getComputedStyle(n).width;const h=l.value?"height":"width";getComputedStyle(n)[h],requestAnimationFrame(()=>{n.style[h]="0"})}}};return Object.defineProperty(p,"__isScriptSetup",{enumerable:!1,value:!0}),p}});function xe(r,a,e,t,s,i){return y(),z(ne,{name:"sf-fade",onBeforeEnter:t.setInitialStyles,onEnter:t.onEnter,onBeforeLeave:t.setInitialStyles,onAfterEnter:t.onAfterEnter,onLeave:t.onLeave},{default:A(()=>[b(r.$slots,"default")]),_:3},8,["onBeforeEnter","onEnter","onBeforeLeave","onAfterEnter","onLeave"])}const Se=B(_e,[["render",xe]]),we=C({__name:"ALink",props:{href:{},target:{}},setup(r,{expose:a}){a();const e=r,t=c(()=>{if(e.href){if(e.target)return e.target;if(e.href.startsWith("http")){const i=globalThis.$storefront.settings.domain||window.location.host;return e.href.startsWith(`https://${i}`)?void 0:"_blank"}}}),s={props:e,linkTarget:t};return Object.defineProperty(s,"__isScriptSetup",{enumerable:!1,value:!0}),s}});function be(r,a,e,t,s,i){return y(),z(G(e.href?"a":"span"),{href:e.href,target:t.linkTarget,rel:t.linkTarget==="_blank"?"noopener":void 0},{default:A(()=>[b(r.$slots,"default")]),_:3},8,["href","target","rel"])}const Ce=B(we,[["render",be]]),Pe=C({__name:"AImg",props:{picture:{},loading:{default:"lazy"},decoding:{},alt:{},preferredSize:{}},setup(r,{expose:a}){a();const e=r,t=c(()=>e.picture.url?e.picture:fe(e.picture,void 0,e.preferredSize)||{}),s=c(()=>ve(t.value)),i=c(()=>({src:t.value.url,alt:t.value.alt||e.alt,width:s.value.width||void 0,height:s.value.height||void 0,loading:e.loading,decoding:e.decoding||(s.value.height?"async":void 0)})),u={props:e,image:t,dimensions:s,attrs:i};return Object.defineProperty(u,"__isScriptSetup",{enumerable:!1,value:!0}),u}});function Te(r,a,e,t,s,i){return y(),R("img",J(ee(t.attrs)),null,16)}const Ee=B(Pe,[["render",Te]]),q="bg-gray-200 rounded-md dark:bg-gray-700",Le=C({__name:"Skeleton",props:{isBold:{type:Boolean},isLarge:{type:Boolean}},setup(r,{expose:a}){a();const e=r,t=c(()=>`${q} ${e.isBold?"h-8 mb-6":"h-2.5 mb-4"}`),s=c(()=>`${q} ${e.isBold?"h-5 mb-4":"h-2 mb-2.5"}`),i={props:e,rowClassName:q,firstRowClassName:t,nextRowsClassName:s};return Object.defineProperty(i,"__isScriptSetup",{enumerable:!1,value:!0}),i}}),Be=S("span",{class:"sr-only"},"Loading...",-1);function Fe(r,a,e,t,s,i){return y(),R("div",{role:"status",class:v(["animate-pulse",e.isLarge?"max-w-4xl":"max-w-sm"])},[S("div",{class:v([t.firstRowClassName,e.isLarge?"w-96":"w-48"])},null,2),S("div",{class:v([t.nextRowsClassName,e.isLarge?"max-w-[680px]":"max-w-[340px]"])},null,2),S("div",{class:v(t.nextRowsClassName)},null,2),S("div",{class:v([t.nextRowsClassName,e.isLarge?"max-w-[660px]":"max-w-[330px]"])},null,2),S("div",{class:v([t.nextRowsClassName,e.isLarge?"max-w-[600px]":"max-w-[300px]"])},null,2),S("div",{class:v([t.nextRowsClassName,e.isLarge?"max-w-[720px]":"max-w-[360px]"])},null,2),Be],2)}const ke=B(Le,[["render",Fe]]),ze=(r,a=1)=>Number.isInteger(r)?`${r}%`:`${r.toFixed(a)}%`,Ae=r=>{r.use({install:(a,e)=>{a.config.globalProperties.$t=(t,s)=>pe(t,s||e?.lang),a.config.globalProperties.$money=ge,a.config.globalProperties.$percentage=ze,a.config.globalProperties.$settings=globalThis.$storefront.settings,a.config.globalProperties.$apiContext=globalThis.$storefront.apiContext}}),r.component("Fade",Se),r.component("ALink",Ce),r.component("AImg",Ee),r.component("Skeleton",ke)},Ie=C({__name:"CarouselControl",props:{isPrev:{type:Boolean,default:!1}},setup(r,{expose:a}){a();const{axis:e,changeSlide:t}=se(D),i={axis:e,changeSlide:t,isX:e==="x"};return Object.defineProperty(i,"__isScriptSetup",{enumerable:!1,value:!0}),i}}),Ne=["aria-label","data-carousel-control"];function Oe(r,a,e,t,s,i){return y(),R("button",{type:"button","aria-label":e.isPrev?"Anterior":"Próximo",onClick:a[0]||(a[0]=u=>t.changeSlide(e.isPrev?-1:1)),class:v(["group absolute z-[11]",t.isX?`${e.isPrev?"left-0":"right-0"} top-0`:`${e.isPrev?"top-0":"bottom-0"} left-0`]),"data-carousel-control":e.isPrev?"previous":"next"},[b(r.$slots,"default",{},()=>[S("i",{class:v(["i-chevron-right m-0",{"group-active:translate-x-1":t.isX&&!e.isPrev,"rotate-180 group-active:-translate-x-1":t.isX&&e.isPrev,"rotate-90 group-active:translate-y-1":!t.isX&&!e.isPrev,"-rotate-90 group-active:-translate-y-1":!t.isX&&e.isPrev}])},null,2)])],10,Ne)}const te=B(Ie,[["render",Oe]]),D=Symbol("carousel"),$e=C({__name:"Carousel",props:{as:{default:"ul"},index:{default:0},autoplay:{},axis:{default:"x"},hasControls:{type:Boolean},wrapperKey:{}},emits:["update:index"],setup(r,{expose:a,emit:e}){a();const t=r,s=e,i=L(0);k(K(t,"index"),o=>{if(o!==i.value){const d=o-i.value;h(d,!1)}},{immediate:!0}),k(i,(o,d)=>{o!==d&&s("update:index",o)});const u=L(null),{[t.axis]:g,isScrolling:P,arrivedState:f}=he(u),l=t.axis==="x",_=c(()=>l?f.left:f.top),T=c(()=>l?f.right:f.bottom),m=L([]),w=L(0),x=L(0),H=()=>{u.value&&(l?(w.value=u.value.scrollWidth,x.value=u.value.offsetWidth):(w.value=u.value.scrollHeight,x.value=u.value.offsetHeight))},j=()=>{if(!u.value)return;let o=[...u.value.children];o.length===1&&o[0].tagName.endsWith("SLOT")&&(o=[...o[0].children]),m.value=o.map(d=>({offset:l?d.offsetLeft:d.offsetTop,size:l?d.offsetWidth:d.offsetHeight}))},X=o=>{let d=i.value+o;if(d>=m.value.length)return 0;d<0&&(d=m.value.length+d);const{offset:F,size:E}=m.value[d]||{};return E?F:0},I=()=>{const o=m.value.findIndex(d=>Math.abs(d.offset-g.value)<=5);o>-1&&(i.value=o||0)};let p;const n=()=>{t.autoplay&&(clearTimeout(p),p=setTimeout(()=>{h(1)},t.autoplay))},h=(o,d=!0)=>{if(m.value.length<2)return;let F=-1;if(g.value+x.value>=w.value)F=0;else{if(d&&(o===1||o===-1)){let E=0,Y=0;for(let M=i.value;M<m.value.length;M++){const{size:V}=m.value[M]||{};if(V&&(E+=1,Y+=V,Y+V*.75>=x.value))break}E&&(o=o>0?E:-E)}F=X(o)}u.value?.scrollTo({[l?"left":"top"]:F,behavior:"smooth"}),n()};k(P,o=>{o?clearTimeout(p):(I(),n())});const N=L(null),Q=ye(N);k(Q,o=>{o?clearTimeout(p):n()});const O=()=>{u.value&&(H(),j(),I())},W=me(()=>{u.value&&(l?u.value.scrollLeft=0:u.value.scrollTop=0,O())},400);ie(()=>{O(),le(()=>{u.value&&[...u.value.children].forEach(o=>{o.setAttribute("tabindex","0")})}),n(),window.addEventListener("resize",W)}),k(K(t,"wrapperKey"),O),ue(()=>{window.removeEventListener("resize",W),clearTimeout(p)}),ce(D,{autoplay:K(t,"autoplay"),axis:t.axis,changeSlide:h,isBoundStart:_,isBoundEnd:T});const U={carouselKey:D,props:t,emit:s,activeIndex:i,wrapper:u,currentPos:g,isScrolling:P,arrivedState:f,isX:l,isBoundStart:_,isBoundEnd:T,slideSizes:m,wrapperScrollSize:w,wrapperVisibleSize:x,calcWrapperSize:H,calcSlidesSize:j,calcNextOffset:X,calcCurrentIndex:I,get autoplayTimer(){return p},set autoplayTimer(o){p=o},restartAutoplay:n,changeSlide:h,carousel:N,isHovered:Q,calcOnInit:O,onResize:W,CarouselControl:te};return Object.defineProperty(U,"__isScriptSetup",{enumerable:!1,value:!0}),U}});function Re(r,a,e,t,s,i){return y(),R("div",{ref:"carousel",class:v(`relative ${t.isX?"":"overflow-hidden"}`),"data-carousel":""},[(y(),z(G(e.as),{ref:"wrapper",class:v(["m-0 flex snap-mandatory list-none scroll-smooth p-0 [&>*]:snap-start [&>*]:outline-none",t.isX?"snap-x overflow-y-hidden overflow-x-scroll":"h-full flex-col snap-y overflow-x-hidden overflow-y-scroll"]),style:{"scrollbar-width":"none","-webkit-overflow-scrolling":"touch","-ms-overflow-style":"none"},"data-carousel-wrapper":""},{default:A(()=>[b(r.$slots,"default")]),_:3},8,["class"])),b(r.$slots,"controls",J(ee({changeSlide:t.changeSlide,isBoundStart:t.isBoundStart,isBoundEnd:t.isBoundEnd,activeIndex:t.activeIndex})),()=>[t.slideSizes.length>1||e.hasControls?(y(),z(t.CarouselControl,{key:0,"is-prev":""},{default:A(()=>[b(r.$slots,"previous")]),_:3})):Z("",!0),t.slideSizes.length>1||e.hasControls?(y(),z(t.CarouselControl,{key:1},{default:A(()=>[b(r.$slots,"next")]),_:3})):Z("",!0)])],2)}const He=B($e,[["render",Re]]),re=r=>{Ae(r),r.component("Carousel",He),r.component("CarouselControl",te)},je=Object.freeze(Object.defineProperty({__proto__:null,default:re},Symbol.toStringTag,{value:"Module"})),Xe=async r=>{"default"in je&&await re(r)},We=C({props:{value:String,name:String,hydrate:{type:Boolean,default:!0}},setup({name:r,value:a,hydrate:e}){if(!a)return()=>null;let t=e?"astro-slot":"astro-static-slot";return()=>$(t,{name:r,innerHTML:a})}}),Je=r=>async(a,e,t,{client:s})=>{if(!r.hasAttribute("ssr"))return;const i=a.name?`${a.name} Host`:void 0,u={};for(const[l,_]of Object.entries(t))u[l]=()=>$(We,{value:_,name:l==="default"?void 0:l});const g=s!=="only",f=(g?ae:oe)({name:i,render(){let l=$(a,e,u);return Me(a.setup)&&(l=$(de,null,l)),l}});await Xe(f),f.mount(r,g),r.addEventListener("astro:unmount",()=>f.unmount(),{once:!0})};function Me(r){const a=r?.constructor;return a&&a.name==="AsyncFunction"}export{Je as default};
@@ -1 +0,0 @@
1
- import"./hoisted.J3ui9KfA.js";import"./afetch.5c8VmT0-.js";import"./use-analytics.qryUNUh7.js";import"./customer-session.zys3PDaD.js";import"./sf-utils.Z4H-dRBJ.js";import"./index.ZVw4Qnet.js";import"./runtime-core.esm-bundler.arxvxBux.js";import"./shopping-cart.bLFDGb3i.js";import"./price.Easct8WC.js";import"./name.LjTu3VQY.js";import"./i18n.vH3oaO8m.js";const t=window.location.search.includes("status=404")?"404Msg":"5xxMsg";document.getElementById(t).style.display="block";document.getElementById("loadingMsg").style.display="none";
@@ -1 +0,0 @@
1
- import{_ as t}from"./runtime-core.esm-bundler.arxvxBux.js";import{i as n}from"./i18n.vH3oaO8m.js";const r=(e,i=t.get("lang"))=>i&&e.i18n&&e.i18n[i]?e.i18n[i]:e.name||e.title||n(e.i18n,i)||"",a=r;export{a as g};