cloudcommerce 0.6.1 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/package.json +1 -1
  3. package/packages/api/package.json +1 -1
  4. package/packages/apps/correios/package.json +1 -1
  5. package/packages/apps/custom-payment/package.json +1 -1
  6. package/packages/apps/custom-shipping/package.json +1 -1
  7. package/packages/apps/datafrete/package.json +1 -1
  8. package/packages/apps/discounts/package.json +1 -1
  9. package/packages/apps/emails/package.json +1 -1
  10. package/packages/apps/fb-conversions/package.json +1 -1
  11. package/packages/apps/frenet/package.json +1 -1
  12. package/packages/apps/galaxpay/package.json +1 -1
  13. package/packages/apps/google-analytics/package.json +1 -1
  14. package/packages/apps/infinitepay/package.json +1 -1
  15. package/packages/apps/jadlog/package.json +1 -1
  16. package/packages/apps/loyalty-points/package.json +1 -1
  17. package/packages/apps/melhor-envio/package.json +1 -1
  18. package/packages/apps/mercadopago/package.json +1 -1
  19. package/packages/apps/pagarme/package.json +1 -1
  20. package/packages/apps/paghiper/package.json +1 -1
  21. package/packages/apps/pix/package.json +1 -1
  22. package/packages/apps/tiny-erp/package.json +1 -1
  23. package/packages/apps/webhooks/package.json +1 -1
  24. package/packages/cli/package.json +1 -1
  25. package/packages/config/package.json +1 -1
  26. package/packages/emails/package.json +1 -1
  27. package/packages/events/package.json +1 -1
  28. package/packages/firebase/package.json +1 -1
  29. package/packages/i18n/package.json +1 -1
  30. package/packages/modules/package.json +1 -1
  31. package/packages/passport/package.json +1 -1
  32. package/packages/ssr/package.json +1 -1
  33. package/packages/storefront/dist/client/_astro/ShopHeader.d36e6752.js +1 -0
  34. package/packages/storefront/dist/client/fallback/index.html +1 -1
  35. package/packages/storefront/dist/client/sw.js +1 -1
  36. package/packages/storefront/dist/server/chunks/pages/{all.e0f284c9.mjs → all.42c985c2.mjs} +4 -1
  37. package/packages/storefront/dist/server/chunks/{prerender.9f6cbb00.mjs → prerender.6899569d.mjs} +0 -0
  38. package/packages/storefront/dist/server/entry.mjs +3 -3
  39. package/packages/storefront/package.json +1 -1
  40. package/packages/storefront/src/lib/state/use-storage.ts +10 -1
  41. package/packages/types/package.json +1 -1
  42. package/packages/storefront/dist/client/_astro/ShopHeader.0a6766ac.js +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.6.2](https://github.com/ecomplus/cloud-commerce/compare/v0.6.1...v0.6.2) (2023-02-19)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **storefront:** Fix state `useStorage` to prevent _localStorage is not defined_ ([94b5f6a](https://github.com/ecomplus/cloud-commerce/commit/94b5f6a31b3b6d0acaefd0879ef54b2bc5b37f6c))
11
+
5
12
  ### [0.6.1](https://github.com/ecomplus/cloud-commerce/compare/v0.6.0...v0.6.1) (2023-02-19)
6
13
 
7
14
  ## [0.6.0](https://github.com/ecomplus/cloud-commerce/compare/v0.5.0...v0.6.0) (2023-02-19)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cloudcommerce",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "Open fair-code headless commerce platform: API-first, microservices based, event driven and cloud native",
6
6
  "main": "packages/api/lib/index.js",
7
7
  "author": "E-Com Club Softwares para E-commerce <ti@e-com.club>",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/api",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce APIs client/adapter",
6
6
  "main": "lib/api.js",
7
7
  "types": "lib/api.d.ts",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-correios",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app for Correios shipping calculation",
6
6
  "main": "lib/correios.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-custom-payment",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app for simple custom payment methods",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-custom-shipping",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app for custom shipping methods",
6
6
  "main": "lib/custom-shipping.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-datafrete",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Datafrete shipping gateway ",
6
6
  "main": "lib/datafrete.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-discounts",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app for complex discount rules",
6
6
  "main": "lib/discounts.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-emails",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce default transactional email app",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-fb-conversions",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app to send carts/orders to Facebook Conversions API",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-frenet",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app for Frenet shipping calculation",
6
6
  "main": "lib/frenet.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-galaxpay",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Galax Pay for recurring payments",
6
6
  "main": "lib/galaxpay.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-google-analytics",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app to send carts/orders events to GA Measurement Protocol",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-infinitepay",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate InfinitePay",
6
6
  "main": "lib/infinitepay.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-jadlog",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app for Jadlog shipping calculation",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-loyalty-points",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app to handle simple loyalty points programs",
6
6
  "main": "lib/loyalty-points.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-melhor-envio",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Melhor Envio",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-mercadopago",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Mercado Pago",
6
6
  "main": "lib/mercadopago.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-pagarme",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Pagar.me",
6
6
  "main": "lib/pagarme.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-paghiper",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate PagHiper",
6
6
  "main": "lib/paghiper.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-pix",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Pix API (Bacen)",
6
6
  "main": "lib/pix.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-tiny-erp",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app for Tiny ERP",
6
6
  "main": "lib/tiny-erp.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-webhooks",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app for general order webhooks",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/cli",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce CLI tools",
6
6
  "bin": {
7
7
  "cloudcommerce": "./bin/run.mjs"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/config",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce base config",
6
6
  "main": "lib/config.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/emails",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/events",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app events",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/firebase",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce on Firebase",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/i18n",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce i18n",
6
6
  "main": "lib/all.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/modules",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce modules API",
6
6
  "main": "lib/index.cjs",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/passport",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce customers authentication (passport) API",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/ssr",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce storefront SSR",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -0,0 +1 @@
1
+ import{c as ne,u as re,p as ie,b as le}from"./index.a500792d.js";import{j as k,c as b,q as C,u as Z,d as L,s as ce,_ as P,r as U,o as c,k as $,w as M,a as p,n as x,e as l,p as V,b as I,a3 as ue,g as B,h as q,l as de,t as E,F as z,C as H,f as me,a4 as he,a5 as pe,a6 as fe}from"./_plugin-vue_export-helper.6da04e63.js";import{w as _e}from"./runtime-dom.esm-bundler.acde10ec.js";import{_ as ge}from"./preload-helper.101896b7.js";import{i as ye}from"./idle-callback.889bf0ea.js";const we=e=>{if(e){if(e.display_name)return e.display_name;if(e.name&&e.name.given_name)return e.name.given_name}return""},be=we,ve=e=>{const{header:s,canSetStyles:t,canCreateHeightDiv:a,isShownOnScrollDown:n}={canSetStyles:!0,canCreateHeightDiv:!0,...e},{ready:r,start:o}=ne(100,{controls:!0,immediate:!1}),i=k(0),u=k(0);let f;const{y:S}=re(document),m=b(()=>r.value&&S.value>u.value*1.2),h=k("none");C(m,async y=>{t&&(s.value.style.position=y?"sticky":null),f&&(f.style.height=y?`${i.value}px`:null),y?(await ie(300),h.value="opacity var(--transition-slow), transform var(--transition)"):(o(),h.value="none")});const A=k(!1);return C(S,(y,d)=>{A.value=y>0&&y<d}),Z(()=>{const y=()=>{i.value=s.value.offsetHeight,u.value=i.value+window.pageYOffset+s.value.getBoundingClientRect().top,o()},d=s.value.getElementsByTagName("IMG");let w=!0;for(let _=0;_<d.length;_++){const T=d[_];(!T.complete||T.naturalHeight===0)&&(w=!1,T.onload=y)}w&&y(),window.addEventListener("resize",le(y,300)),t&&(s.value.style.willChange="transform",C([m,A],([_,T])=>{let j=null,K=null;_&&(!T||n)&&(j="0",K="translateY(-100%)"),s.value.style.opacity=j,s.value.style.transform=K}),C(h,_=>{s.value.style.transition=_})),a&&(f=document.createElement("div"),s.value.parentElement.insertBefore(f,s.value))}),{staticHeight:i,staticY:u,isSticky:m,isScrollUp:A,transition:h}},Se=e=>e.filter(({slug:s,parent:t})=>s&&!t),ke=(e,s)=>e.filter(({slug:t,parent:a})=>t&&a?a._id===s._id||a.slug&&a.slug===s.slug:!1),xe=e=>{const{header:s}=e,{isSticky:t,staticHeight:a,staticY:n}=ve({header:s}),r=b(()=>t.value?s.value.offsetHeight:n.value),o=Se(e.categories),i=m=>ke(e.categories,m),u=m=>({...m,subcategories:i(m).map(h=>u(h))}),f=o.map(u),S=k(!1);return{isSticky:t,staticHeight:a,staticY:n,positionY:r,mainCategories:o,getSubcategories:i,getCategoryTree:u,categoryTrees:f,isSidenavOpen:S}},Te=L({__name:"Drawer",props:{modelValue:{type:Boolean,default:!1},placement:{default:"start"},position:{default:"fixed"},hasCloseButton:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(e,{expose:s,emit:t}){s();const a=e,n=()=>t("update:modelValue",!1),r=k(null),o=h=>{r.value?.contains(h.target)||n()},i=h=>{h.key==="Escape"&&n()};C(ce(a,"modelValue"),async h=>{h?(document.body.style.overflow="hidden",setTimeout(()=>{document.addEventListener("click",o,{passive:!0}),document.addEventListener("keydown",i,{passive:!0})},500)):(document.body.style.overflow=null,document.removeEventListener("click",o),document.removeEventListener("keydown",i))});const u=b(()=>{switch(a.placement){case"start":return"left";case"end":return"right";case"top":return"up";default:return"down"}}),f=b(()=>a.position==="fixed"),S=b(()=>a.placement==="start"||a.placement==="end"),m={props:a,emit:t,close:n,drawer:r,outsideClickListener:o,escClickListener:i,slideTo:u,isFixed:f,isPlacementX:S};return Object.defineProperty(m,"__isScriptSetup",{enumerable:!1,value:!0}),m}}),Ce=["open","data-drawer"],Oe={class:"relative h-full"},Ee=["onClick"],Ae=l("i",{class:"i-close text-base-400 text-3xl"},null,-1),Ne={key:0,class:"fixed top-0 left-0 w-screen h-screen bg-black/50 z-40","data-drawer-backdrop":""};function Ie(e,s,t,a,n,r){const o=U("Fade");return c(),$(o,{slide:a.slideTo,speed:"slow","is-floating":""},{default:M(()=>[t.modelValue?(c(),p("dialog",{key:0,ref:"drawer",class:x(["w-screen max-w-sm shadow p-0 m-0 z-50",[t.position,a.isFixed?`top-0 left-0 ${a.isPlacementX?"h-screen":""}`:null]]),open:t.modelValue,"data-drawer":t.placement},[l("div",Oe,[t.hasCloseButton?(c(),p("button",{key:0,type:"button","aria-label":"Fechar",onClick:_e(a.close,["prevent"]),class:x(["absolute top-2",t.placement==="end"?"left-2":"right-2"]),"data-drawer-close":""},[V(e.$slots,"close",{},()=>[Ae])],10,Ee)):I("",!0),V(e.$slots,"default")]),(c(),$(ue,{to:"#teleported-top"},[B(o,null,{default:M(()=>[t.modelValue?(c(),p("div",Ne)):I("",!0)]),_:1})]))],10,Ce)):I("",!0)]),_:3},8,["slide"])}const $e=P(Te,[["render",Ie]]);globalThis.__apiCache||(globalThis.__apiCache={});const N={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0};class G extends Error{constructor(s,t,a,n=!1){t?(super(t.statusText),this.data=t.data,this.statusCode=t.status):super(a||"Request error"),this.config=s,this.response=t,this.isTimeout=n}}const Le={middleware(e){const s={...e.headers};if(!e.isNoAuth)if(e.accessToken)s.Authorization=`Bearer ${e.accessToken}`;else{const r=e.authenticationId||N.ECOM_AUTHENTICATION_ID,o=e.apiKey||N.ECOM_API_KEY;if(r&&o){const i=`${r}:${o}`,u=typeof Buffer=="function"?Buffer.from(i).toString("base64"):btoa(i);s.Authorization=`Basic ${u}`}}let t=e.baseUrl||N.API_BASE_URL||"https://ecomplus.io/v2";const{endpoint:a,params:n}=e;if(a!=="login"&&a!=="authenticate"&&a!=="ask-auth-callback"&&a!=="check-username"){const r=e.storeId||N.ECOM_STORE_ID;if(!r)throw new Error("`storeId` must be set in config or `ECOM_STORE_ID` env var");t+=`/:${r}`;const o=e.lang||N.ECOM_LANG;o&&(t+=`,lang:${o}`)}if(t+=`/${a}`,n){if(typeof n=="string")t+=`?${n}`;else if(typeof n=="object"){const r=new URLSearchParams;Object.keys(n).forEach(o=>{const i=n[o];Array.isArray(i)?i.forEach(u=>{r.append(o,u)}):r.append(o,i)}),t+=`?${r.toString()}`}}return{url:t,headers:s}}},g=async(e,s=0)=>{const{url:t,headers:a}=Le.middleware(e),{method:n="get",timeout:r=2e4,maxRetries:o=3,cacheMaxAge:i=6e5}=e,u=n==="get"&&(e.canCache||e.canCache===void 0&&N.SSR);let f;if(u){f=`${t}${JSON.stringify(a)}`;const w=globalThis.__apiCache[f];if(w&&Date.now()-w.timestamp<=i)return{...w.res,config:e}}const S=e.body||e.data;let m;S&&(m=JSON.stringify(S),a["Content-Type"]="application/json",a["Content-Length"]=m.length.toString());const h=new AbortController;let A=!1;const y=setTimeout(()=>{h.abort(),A=!0},r);let d;try{d=await(e.fetch||fetch)(t,{method:n,headers:a,body:m,signal:h.signal})}catch(w){throw new G(e,d,w.message,A)}if(clearTimeout(y),d){if(d.ok){const _={...d,data:await d.json()};return u&&f&&(globalThis.__apiCache[f]={timestamp:Date.now(),res:_}),{..._,config:e}}const{status:w}=d;if(o<s&&(w===429||w>=500)){const _=d.headers.get("retry-after");return new Promise((T,j)=>{setTimeout(()=>{g(e,s+1).then(T).catch(j)},_&&parseInt(_,10)||5e3)})}}try{d.data=await d?.json()}catch{}throw new G(e,d)},Pe=(e,s)=>g({...s,endpoint:e}),Ve=(e,s,t)=>g({...t,method:"post",endpoint:e,body:s}),Be=(e,s,t)=>g({...t,method:"put",endpoint:e,body:s}),De=(e,s,t)=>g({...t,method:"patch",endpoint:e,body:s}),ee=(e,s)=>g({...s,method:"delete",endpoint:e});g.get=Pe;g.post=Ve;g.put=Be;g.patch=De;g.del=ee;g.delete=ee;const je=(e,s,t=globalThis.localStorage)=>{if(!t)return q(s);let a;const n=t.getItem(e);if(n)try{a=JSON.parse(n)}catch{a=null,t.removeItem(e)}const r=q(a||s);return C(r,()=>{t.setItem(e,JSON.stringify(r))}),r},te="SESSION",R={customer:{display_name:"",main_email:""},auth:null},v=je(te,R),Y=b(()=>{const{auth:e}=v;return e&&new Date(e.expires).getTime()-Date.now()>1e3*10}),ae=b(()=>v.customer),F=b(()=>be(ae.value)),W=b({get(){return ae.value.main_email},set(e){v.customer.main_email=e}});let O;const Me=b(()=>Y.value||!!O?.currentUser?.emailVerified),se=()=>{v.auth=R.auth,v.customer=R.customer,localStorage.removeItem(te),O.signOut()},oe=async()=>{const e=await O.currentUser.getIdToken(),{domain:s}=window.storefront.settings;try{const t=await fetch(`https://${s}/api/passport/token`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`}});v.auth=await t.json()}catch(t){console.error(t)}},ze=async()=>(Y.value||await oe(),v.auth.access_token),He=async()=>{const e=await ze(),{data:s}=await g.get(`customers/${v.auth.customer_id}`,{accessToken:e});return v.customer=s,s};let X=!1;const Re=(e=!window.location.pathname.startsWith("/app/"))=>{if(X)return;X=!0;const s=()=>ge(()=>import("./firebase-app.7ce2ebb1.js"),[]).then(({getAuth:t,onAuthStateChanged:a,isSignInWithEmailLink:n,signInWithEmailLink:r})=>{if(O=t(),a(O,async o=>{if(o){if(o.displayName&&!F.value&&(v.customer.display_name=o.displayName),o.email&&(!W.value||o.emailVerified)&&(v.customer.main_email=o.email),o.emailVerified){const i=o.email!==W.value;(i||!Y.value)&&(await oe(),(i||!F.value)&&await He())}}else se()}),n(O,window.location.href)){const i=new URLSearchParams(window.location.search).get("email");i&&r(O,i,window.location.href).then(()=>window.localStorage.removeItem("emailForSignIn")).catch(console.error)}}).catch(console.error);e?ye(s):s()},{settings:Q,context:Lt}=globalThis.storefront,Fe=["whatsapp","instagram","facebook","twitter","youtube","tiktok","pinterest"],J={};Fe.forEach(e=>{Q[e]&&(J[e]=Q[e])});let D;D=navigator.userAgent,document.body?document.body.offsetWidth:window.screen.width;D.includes("Safari")&&D.includes("Chrome");const Ue=/iPad|iPhone|iPod/.test(D)&&!window.MSStream,Ye=Ue||/Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(D),Je=L({__name:"SocialNetworkIcon",props:{as:{default:"i"},network:null},setup(e,{expose:s}){s();const t=e,a=b(()=>{switch(t.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";default:return""}}),n={props:t,iconClassName:a};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}});function Ke(e,s,t,a,n,r){return c(),$(de(t.as),{class:x(a.iconClassName)},null,8,["class"])}const qe=P(Je,[["render",Ke]]),Ge=L({__name:"SocialNetworkLink",props:{network:null,href:null,message:null},setup(e,{expose:s}){s();const t=e,a=b(()=>{let r=t.href||J[t.network];if(t.network==="whatsapp"){const o=r.replace(/[^+\d]/g,"");r=`https://${Ye?"api":"web"}.whatsapp.com/send?phone=`+encodeURIComponent(o.charAt(0)==="+"?o:`+55${o}`),t.message&&(r+=`&text=${encodeURIComponent(t.message)}`)}return r}),n={props:t,fixedHref:a,SocialNetworkIcon:qe};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}});function We(e,s,t,a,n,r){const o=U("ALink");return c(),$(o,{href:a.fixedHref},{default:M(()=>[V(e.$slots,"default",{},()=>[B(a.SocialNetworkIcon,{network:t.network},null,8,["network"]),V(e.$slots,"append")])]),_:3},8,["href"])}const Xe=P(Ge,[["render",We]]),Qe=L({__name:"ShopSidenavCategory",props:{categoryTree:null},setup(e,{expose:s}){s();const t=k(!1),a=k(!0);C(t,r=>{r?setTimeout(()=>{a.value=!1},25):a.value=!0});const n={isOpen:t,isFaded:a};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}}),Ze={class:"text-lg text-base-800"},et=["src"],tt=["href"],at=["href"],st=["src"],ot={class:"inline"};function nt(e,s,t,a,n,r){const o=U("ShopSidenavCategory",!0);return c(),p("li",Ze,[t.categoryTree.subcategories.length?(c(),p("details",{key:0,class:"bg-white overflow-y-auto overflow-x-hidden z-10 open:absolute open:top-0 open:left-0 open:w-full open:h-full",onToggle:s[0]||(s[0]=i=>a.isOpen=!a.isOpen)},[l("summary",{class:x(["cursor-pointer list-none px-6 py-3 active:bg-base-100 transition-colors",a.isOpen?"bg-base-100":null])},[l("i",{class:x(a.isOpen?"i-arrow-left text-lg":"i-arrow-right float-right mb-0 mt-1 text-xl text-base-500")},null,2),!a.isOpen&&t.categoryTree.icon?(c(),p("img",{key:0,loading:"lazy",src:t.categoryTree.icon.url,class:"w-auto h-5 inline mr-3"},null,8,et)):I("",!0),l("h3",{class:x(["inline",a.isOpen?"ml-4 text-base":null])},E(t.categoryTree.name),3)],2),l("ul",{class:x(["mt-2 transition-opacity",a.isFaded?"opacity-20":"opacity-100"]),tabindex:"-1"},[(c(!0),p(z,null,H(t.categoryTree.subcategories,i=>(c(),$(o,{key:i._id,"category-tree":i},null,8,["category-tree"]))),128)),l("li",null,[l("a",{href:`/${t.categoryTree.slug}`,class:"block px-6 py-3 text-base underline active:bg-base-200"},E("Ver toda a categoria $1".replace("$1",t.categoryTree.name)),9,tt)])],2)],32)):(c(),p("a",{key:1,href:`/${t.categoryTree.slug}`,class:"block px-6 py-3 active:bg-base-200"},[!a.isOpen&&t.categoryTree.icon?(c(),p("img",{key:0,loading:"lazy",src:t.categoryTree.icon.url,class:"w-auto h-5 inline mr-3"},null,8,st)):I("",!0),l("h3",ot,E(t.categoryTree.name),1)],8,at))])}const rt=P(Qe,[["render",nt]]),it=L({__name:"ShopSidenav",props:{categoryTrees:null},setup(e,{expose:s}){s(),Z(()=>Re());const t={get customerName(){return F},get isLogged(){return Me},get logout(){return se},get socialNetworks(){return J},SocialNetworkLink:Xe,ShopSidenavCategory:rt};return Object.defineProperty(t,"__isScriptSetup",{enumerable:!1,value:!0}),t}}),lt={class:"flex flex-col h-full"},ct={class:"py-4 grow"},ut={class:"relative h-full"},dt={class:"text-base"},mt={class:"flex items-center px-2 py-4 bg-base-100"},ht={href:"/app/account",class:"p-2 grow flex items-center gap-3"},pt=l("i",{class:"i-account text-4xl text-base-500 m-0"},null,-1),ft={class:"leading-tight"},_t=l("small",{class:"block lowercase font-semibold text-primary"},E("Meus pedidos")+", "+E("Minha conta"),-1),gt=l("span",{class:"text-base-600"},E("Sair"),-1),yt=l("i",{class:"i-logout text-lg ml-1"},null,-1),wt=[gt,yt],bt={class:"flex gap-3 p-4 bg-base-200 text-xl text-base-700"};function vt(e,s,t,a,n,r){return c(),p("aside",lt,[l("nav",ct,[l("ul",ut,[(c(!0),p(z,null,H(t.categoryTrees,o=>(c(),$(a.ShopSidenavCategory,{key:o._id,"category-tree":o},null,8,["category-tree"]))),128))])]),l("footer",dt,[l("div",mt,[l("a",ht,[pt,l("span",ft,[me(E(`Olá ${a.customerName||"Visitante"}`)+" ",1),_t])]),a.isLogged?(c(),p("button",{key:0,onClick:s[0]||(s[0]=(...o)=>a.logout&&a.logout(...o)),class:"p-2 text-right text-base-800"},wt)):I("",!0)]),l("ul",bt,[(c(!0),p(z,null,H(a.socialNetworks,(o,i)=>(c(),p("li",{key:i},[B(a.SocialNetworkLink,{network:i,class:"p-1 active:text-primary"},null,8,["network"])]))),128))])])])}const St=P(it,[["render",vt]]),kt=L({__name:"ShopHeader",props:{categories:null},setup(e,{expose:s}){s();const t=e,a=k(null),{isSticky:n,positionY:r,categoryTrees:o,isSidenavOpen:i}=xe({...t,header:a}),u={props:t,header:a,isSticky:n,positionY:r,categoryTrees:o,isSidenavOpen:i,Drawer:$e,ShopSidenav:St};return Object.defineProperty(u,"__isScriptSetup",{enumerable:!1,value:!0}),u}}),xt={class:"container lg:max-w-7xl mx-auto px-1 lg:pl-3 grid grid-flow-col grid-cols-3 justify-between items-center md:grid-cols-none md:auto-cols-max"},Tt={class:"md:hidden"},Ct=pe('<nav class="hidden md:block"></nav><div class="px-2 flex justify-end items-center gap-3 lg:gap-4 text-base-800"><button aria-label="Buscar produtos"><i class="i-search w-7 h-7 hover:text-primary hover:scale-110 active:scale-125"></i></button><button class="hidden sm:block" aria-label="Minha conta"><i class="i-account w-7 h-7 hover:text-primary hover:scale-110 active:scale-125"></i></button><button aria-label="Abrir carrinho"><i class="i-shopping-cart w-7 h-7 hover:text-primary hover:scale-110 active:scale-125"></i></button></div>',2);function Ot(e,s,t,a,n,r){return c(),p("header",{ref:"header",class:x(["top-0 z-50 transition-colors",[a.isSticky&&!a.isSidenavOpen?"bg-white/80":"bg-white",a.isSticky?"backdrop-blur-md shadow py-2 md:py-3":"py-3 sm:py-4 md:py-5"]])},[l("div",xt,[l("div",Tt,[l("button",{class:"px-2 my-1","aria-label":"Abrir/fechar menu",onClick:s[0]||(s[0]=o=>a.isSidenavOpen=!a.isSidenavOpen)},[l("i",{class:x(["text-base-500 text-3xl",a.isSidenavOpen?"i-close":"i-menu"])},null,2)])]),V(e.$slots,"logo"),Ct]),B(a.Drawer,{modelValue:a.isSidenavOpen,"onUpdate:modelValue":s[1]||(s[1]=o=>a.isSidenavOpen=o),"has-close-button":!1,position:"absolute",class:"mt-3 -z-1",style:he({height:`calc(100vh - ${a.positionY}px + .5rem)`})},{default:M(()=>[B(a.ShopSidenav,fe({class:"bg-white pt-6"},{categoryTrees:a.categoryTrees}),null,16)]),_:1},8,["modelValue","style"])],2)}const Pt=P(kt,[["render",Ot]]);export{Pt as default};
@@ -57,7 +57,7 @@ window.storefront = {"settings":{"domain":"ecom2-002.web.app","name":"My Shop","
57
57
  <astro-island uid="27Suhl" component-url="/_astro/PitchBar.457658a3.js" component-export="default" renderer-url="/_astro/client.b854166f.js" props="{&quot;slides&quot;:[1,&quot;[[0,{\&quot;href\&quot;:[0,\&quot;/promotion\&quot;],\&quot;html\&quot;:[0,\&quot;Aproveite nossos descontos de até 50%!\&quot;]}],[0,{\&quot;href\&quot;:[0,\&quot;\&quot;],\&quot;html\&quot;:[0,\&quot;&lt;b&gt;Frete grátis&lt;/b&gt; &lt;d-md&gt;para todo Brasil&lt;/d-md&gt; a partir de {free_shipping_from_value}\&quot;]}]]&quot;]}" ssr="" client="idle" opts="{&quot;name&quot;:&quot;PitchBar&quot;,&quot;value&quot;:true}" await-children=""><div class="bg-base-100 relative z-1"><div class="container md:w-2/3 mx-auto px-3 py-1"><div data-carousel><ul data-carousel-wrapper><!--[--><!--[--><li><a href="/promotion" target="_blank" rel="noopener" class="inline-block px-8 hover:underline"><!--[--><span class="prose text-sm text-base-800">Aproveite nossos descontos de até 50%!</span><!--]--></a></li><li><span href class="inline-block px-8"><span class="prose text-sm text-base-800"><b>Frete grátis</b> <d-md>para todo Brasil</d-md> a partir de R$ 150,00</span></span></li><!--]--><!--]--></ul><!--[--><div style="" class="text-xl leading-none text-base-400"><button type="button" aria-label="Anterior" data-carousel-control="previous" class="pr-2 bg-base-100 hover:text-base-700"><!--[--><i class="i-chevron-left m-0"></i><!--]--></button><button type="button" aria-label="Próximo" data-carousel-control="next" class="pl-2 bg-base-100 hover:text-base-700"><!--[--><i class="i-chevron-right m-0"></i><!--]--></button></div><!--]--></div></div></div></astro-island>
58
58
 
59
59
 
60
- <astro-island uid="1nUgFU" component-url="/_astro/ShopHeader.0a6766ac.js" component-export="default" renderer-url="/_astro/client.b854166f.js" props="{&quot;categories&quot;:[1,&quot;[[0,{\&quot;_id\&quot;:[0,\&quot;5c6ffa18c626be23430d4f4e\&quot;],\&quot;name\&quot;:[0,\&quot;Monitores\&quot;],\&quot;slug\&quot;:[0,\&quot;monitores\&quot;],\&quot;icon\&quot;:[0,{\&quot;url\&quot;:[0,\&quot;https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/@1567007322374-rect836.png\&quot;]}],\&quot;updated_at\&quot;:[0,\&quot;2019-08-28T15:51:06.863Z\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-08-28T15:51:06.863Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c6ffa2ac626be23430d4f50\&quot;],\&quot;name\&quot;:[0,\&quot;Monitores Gamer\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c6ffa18c626be23430d4f4e\&quot;],\&quot;name\&quot;:[0,\&quot;Monitores\&quot;],\&quot;slug\&quot;:[0,\&quot;monitores\&quot;]}],\&quot;slug\&quot;:[0,\&quot;monitores-gamer\&quot;],\&quot;updated_at\&quot;:[0,\&quot;2021-07-15T23:29:10.192Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c6ffa45c626be23430d4f52\&quot;],\&quot;name\&quot;:[0,\&quot;Monitores Convencionais\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c6ffa18c626be23430d4f4e\&quot;],\&quot;name\&quot;:[0,\&quot;Monitores\&quot;],\&quot;slug\&quot;:[0,\&quot;monitores\&quot;]}],\&quot;slug\&quot;:[0,\&quot;monitores-convencionais\&quot;],\&quot;updated_at\&quot;:[0,\&quot;2021-08-17T18:42:54.920Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c6ffa5bc626be23430d4f54\&quot;],\&quot;name\&quot;:[0,\&quot;Monitores TV\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c6ffa18c626be23430d4f4e\&quot;],\&quot;name\&quot;:[0,\&quot;Monitores\&quot;],\&quot;slug\&quot;:[0,\&quot;monitores\&quot;]}],\&quot;slug\&quot;:[0,\&quot;monitores-tv\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-02-22T13:34:19.659Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c6ffa6ec626be23430d4f56\&quot;],\&quot;name\&quot;:[0,\&quot;Notebooks\&quot;],\&quot;slug\&quot;:[0,\&quot;notebooks\&quot;],\&quot;icon\&quot;:[0,{\&quot;url\&quot;:[0,\&quot;https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/@1567007351112-comp.png\&quot;]}],\&quot;updated_at\&quot;:[0,\&quot;2019-08-28T15:51:51.039Z\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-08-28T15:51:51.039Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c6ffa8cc626be23430d4f58\&quot;],\&quot;name\&quot;:[0,\&quot;Notebooks gamers\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c6ffa6ec626be23430d4f56\&quot;],\&quot;name\&quot;:[0,\&quot;Notebooks\&quot;],\&quot;slug\&quot;:[0,\&quot;notebooks\&quot;]}],\&quot;slug\&quot;:[0,\&quot;notebooks-gamers\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-02-22T13:35:08.093Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c6ffab6c626be23430d4f5c\&quot;],\&quot;name\&quot;:[0,\&quot;MacBook\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5d5714045753286eadbbdc77\&quot;],\&quot;name\&quot;:[0,\&quot;Ultrabook\&quot;],\&quot;slug\&quot;:[0,\&quot;ultrabook\&quot;]}],\&quot;slug\&quot;:[0,\&quot;macbook\&quot;],\&quot;icon\&quot;:[0,{\&quot;url\&quot;:[0,\&quot;https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/@1566932713325-macbook.jfif\&quot;],\&quot;size\&quot;:[0,\&quot;233x216\&quot;],\&quot;alt\&quot;:[0,\&quot;macbook\&quot;]}],\&quot;updated_at\&quot;:[0,\&quot;2019-08-27T19:07:35.157Z\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-08-27T19:07:35.157Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c7009bec626be23430d4f80\&quot;],\&quot;name\&quot;:[0,\&quot;Periféricos\&quot;],\&quot;slug\&quot;:[0,\&quot;perifericos\&quot;],\&quot;icon\&quot;:[0,{\&quot;url\&quot;:[0,\&quot;https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/@1567007328003-keyb.png\&quot;]}],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c701cb1c626be23430d4fe9\&quot;],\&quot;name\&quot;:[0,\&quot;Físicos\&quot;],\&quot;slug\&quot;:[0,\&quot;fisicos\&quot;]}],\&quot;updated_at\&quot;:[0,\&quot;2020-09-04T21:48:44.261Z\&quot;],\&quot;created_at\&quot;:[0,\&quot;2020-09-04T21:48:44.261Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c7009fdc626be23430d4f82\&quot;],\&quot;name\&quot;:[0,\&quot;Teclados\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c7009bec626be23430d4f80\&quot;],\&quot;name\&quot;:[0,\&quot;Periféricos\&quot;],\&quot;slug\&quot;:[0,\&quot;perifericos\&quot;]}],\&quot;slug\&quot;:[0,\&quot;teclados\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-02-22T14:41:01.323Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c700a11c626be23430d4f84\&quot;],\&quot;name\&quot;:[0,\&quot;Mouses\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c7009bec626be23430d4f80\&quot;],\&quot;name\&quot;:[0,\&quot;Periféricos\&quot;],\&quot;slug\&quot;:[0,\&quot;perifericos\&quot;]}],\&quot;slug\&quot;:[0,\&quot;mouses\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-02-22T14:41:21.566Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c700a37c626be23430d4f86\&quot;],\&quot;name\&quot;:[0,\&quot;Caixas de Som\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c7009bec626be23430d4f80\&quot;],\&quot;name\&quot;:[0,\&quot;Periféricos\&quot;],\&quot;slug\&quot;:[0,\&quot;perifericos\&quot;]}],\&quot;slug\&quot;:[0,\&quot;caixas-de-som\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-02-22T14:41:59.607Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c700a53c626be23430d4f88\&quot;],\&quot;name\&quot;:[0,\&quot;Headset\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c7009bec626be23430d4f80\&quot;],\&quot;name\&quot;:[0,\&quot;Periféricos\&quot;],\&quot;slug\&quot;:[0,\&quot;perifericos\&quot;]}],\&quot;slug\&quot;:[0,\&quot;headset\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-02-22T14:42:27.608Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c700a6bc626be23430d4f8a\&quot;],\&quot;name\&quot;:[0,\&quot;Cadeira Gamer\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c7009bec626be23430d4f80\&quot;],\&quot;name\&quot;:[0,\&quot;Periféricos\&quot;],\&quot;slug\&quot;:[0,\&quot;perifericos\&quot;]}],\&quot;slug\&quot;:[0,\&quot;cadeira-gamer\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-02-22T14:42:51.330Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c700a9cc626be23430d4f8c\&quot;],\&quot;name\&quot;:[0,\&quot;Smartphones\&quot;],\&quot;slug\&quot;:[0,\&quot;smartphones\&quot;],\&quot;icon\&quot;:[0,{\&quot;url\&quot;:[0,\&quot;https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/@1567007321218-smartphone.png\&quot;]}],\&quot;updated_at\&quot;:[0,\&quot;2019-08-28T15:52:17.995Z\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-08-28T15:52:17.995Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c701c9ec626be23430d4fe7\&quot;],\&quot;name\&quot;:[0,\&quot;Jogo\&quot;],\&quot;slug\&quot;:[0,\&quot;jogos/\&quot;],\&quot;icon\&quot;:[0,{\&quot;url\&quot;:[0,\&quot;https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/@1567007332353-game.png\&quot;]}],\&quot;updated_at\&quot;:[0,\&quot;2020-07-24T19:14:01.592Z\&quot;],\&quot;created_at\&quot;:[0,\&quot;2020-07-24T19:14:01.592Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c701cb1c626be23430d4fe9\&quot;],\&quot;name\&quot;:[0,\&quot;Físicos\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c701c9ec626be23430d4fe7\&quot;],\&quot;name\&quot;:[0,\&quot;Jogo\&quot;],\&quot;slug\&quot;:[0,\&quot;jogos/\&quot;]}],\&quot;slug\&quot;:[0,\&quot;fisicos\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-02-22T16:00:49.671Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c701cc6c626be23430d4feb\&quot;],\&quot;name\&quot;:[0,\&quot;Digitais\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c701c9ec626be23430d4fe7\&quot;],\&quot;name\&quot;:[0,\&quot;Jogo\&quot;],\&quot;slug\&quot;:[0,\&quot;jogos/\&quot;]}],\&quot;slug\&quot;:[0,\&quot;digitais\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-02-22T16:01:10.358Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c701ce2c626be23430d4fed\&quot;],\&quot;name\&quot;:[0,\&quot;Usados\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c701c9ec626be23430d4fe7\&quot;],\&quot;name\&quot;:[0,\&quot;Jogo\&quot;],\&quot;slug\&quot;:[0,\&quot;jogos/\&quot;]}],\&quot;slug\&quot;:[0,\&quot;usados\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-02-22T16:01:38.850Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5ceecb3f887ef430f1f70c88\&quot;],\&quot;name\&quot;:[0,\&quot;Promoções\&quot;],\&quot;slug\&quot;:[0,\&quot;promocoes\&quot;],\&quot;icon\&quot;:[0,{\&quot;url\&quot;:[0,\&quot;https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/@1567007326827-mony.png\&quot;]}],\&quot;updated_at\&quot;:[0,\&quot;2019-08-28T15:52:41.385Z\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-08-28T15:52:41.385Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5d5714045753286eadbbdc77\&quot;],\&quot;name\&quot;:[0,\&quot;Ultrabook\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c6ffa6ec626be23430d4f56\&quot;],\&quot;name\&quot;:[0,\&quot;Notebooks\&quot;],\&quot;slug\&quot;:[0,\&quot;notebooks\&quot;]}],\&quot;slug\&quot;:[0,\&quot;ultrabook\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-08-16T20:37:24.811Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5f70f1417430f92180f5ba66\&quot;],\&quot;name\&quot;:[0,\&quot;Brasileiro\&quot;],\&quot;created_at\&quot;:[0,\&quot;2020-09-27T20:08:33.202Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5fb2b13b69274c73fcd6a051\&quot;],\&quot;name\&quot;:[0,\&quot;smartwatch\&quot;],\&quot;created_at\&quot;:[0,\&quot;2020-11-16T17:04:59.320Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;60199592d6981740b4a030f4\&quot;],\&quot;name\&quot;:[0,\&quot;São Paulo\&quot;],\&quot;slug\&quot;:[0,\&quot;sao-paulo\&quot;],\&quot;updated_at\&quot;:[0,\&quot;2021-08-17T18:43:10.174Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;61de099d0c7c72722502397b\&quot;],\&quot;name\&quot;:[0,\&quot;MacBook Pro\&quot;],\&quot;created_at\&quot;:[0,\&quot;2022-01-11T22:50:05.070Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;61de12450c7c727225025299\&quot;],\&quot;name\&quot;:[0,\&quot;Mac Stop\&quot;],\&quot;created_at\&quot;:[0,\&quot;2022-01-11T23:27:01.790Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;6227a90a7963422eee367aaa\&quot;],\&quot;name\&quot;:[0,\&quot;capinhas\&quot;],\&quot;created_at\&quot;:[0,\&quot;2022-03-08T19:05:46.688Z\&quot;]}]]&quot;]}" ssr="" client="load" opts="{&quot;name&quot;:&quot;ShopHeader&quot;,&quot;value&quot;:true}" await-children=""><header class="top-0 z-50 transition-colors bg-white py-3 sm:py-4 md:py-5"><div class="container lg:max-w-7xl mx-auto px-1 lg:pl-3 grid grid-flow-col grid-cols-3 justify-between items-center md:grid-cols-none md:auto-cols-max"><div class="md:hidden"><button class="px-2 my-1" aria-label="Abrir/fechar menu"><i class="i-menu text-base-500 text-3xl"></i></button></div><!--[--><astro-slot name="logo">
60
+ <astro-island uid="1nUgFU" component-url="/_astro/ShopHeader.d36e6752.js" component-export="default" renderer-url="/_astro/client.b854166f.js" props="{&quot;categories&quot;:[1,&quot;[[0,{\&quot;_id\&quot;:[0,\&quot;5c6ffa18c626be23430d4f4e\&quot;],\&quot;name\&quot;:[0,\&quot;Monitores\&quot;],\&quot;slug\&quot;:[0,\&quot;monitores\&quot;],\&quot;icon\&quot;:[0,{\&quot;url\&quot;:[0,\&quot;https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/@1567007322374-rect836.png\&quot;]}],\&quot;updated_at\&quot;:[0,\&quot;2019-08-28T15:51:06.863Z\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-08-28T15:51:06.863Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c6ffa2ac626be23430d4f50\&quot;],\&quot;name\&quot;:[0,\&quot;Monitores Gamer\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c6ffa18c626be23430d4f4e\&quot;],\&quot;name\&quot;:[0,\&quot;Monitores\&quot;],\&quot;slug\&quot;:[0,\&quot;monitores\&quot;]}],\&quot;slug\&quot;:[0,\&quot;monitores-gamer\&quot;],\&quot;updated_at\&quot;:[0,\&quot;2021-07-15T23:29:10.192Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c6ffa45c626be23430d4f52\&quot;],\&quot;name\&quot;:[0,\&quot;Monitores Convencionais\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c6ffa18c626be23430d4f4e\&quot;],\&quot;name\&quot;:[0,\&quot;Monitores\&quot;],\&quot;slug\&quot;:[0,\&quot;monitores\&quot;]}],\&quot;slug\&quot;:[0,\&quot;monitores-convencionais\&quot;],\&quot;updated_at\&quot;:[0,\&quot;2021-08-17T18:42:54.920Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c6ffa5bc626be23430d4f54\&quot;],\&quot;name\&quot;:[0,\&quot;Monitores TV\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c6ffa18c626be23430d4f4e\&quot;],\&quot;name\&quot;:[0,\&quot;Monitores\&quot;],\&quot;slug\&quot;:[0,\&quot;monitores\&quot;]}],\&quot;slug\&quot;:[0,\&quot;monitores-tv\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-02-22T13:34:19.659Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c6ffa6ec626be23430d4f56\&quot;],\&quot;name\&quot;:[0,\&quot;Notebooks\&quot;],\&quot;slug\&quot;:[0,\&quot;notebooks\&quot;],\&quot;icon\&quot;:[0,{\&quot;url\&quot;:[0,\&quot;https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/@1567007351112-comp.png\&quot;]}],\&quot;updated_at\&quot;:[0,\&quot;2019-08-28T15:51:51.039Z\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-08-28T15:51:51.039Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c6ffa8cc626be23430d4f58\&quot;],\&quot;name\&quot;:[0,\&quot;Notebooks gamers\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c6ffa6ec626be23430d4f56\&quot;],\&quot;name\&quot;:[0,\&quot;Notebooks\&quot;],\&quot;slug\&quot;:[0,\&quot;notebooks\&quot;]}],\&quot;slug\&quot;:[0,\&quot;notebooks-gamers\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-02-22T13:35:08.093Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c6ffab6c626be23430d4f5c\&quot;],\&quot;name\&quot;:[0,\&quot;MacBook\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5d5714045753286eadbbdc77\&quot;],\&quot;name\&quot;:[0,\&quot;Ultrabook\&quot;],\&quot;slug\&quot;:[0,\&quot;ultrabook\&quot;]}],\&quot;slug\&quot;:[0,\&quot;macbook\&quot;],\&quot;icon\&quot;:[0,{\&quot;url\&quot;:[0,\&quot;https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/@1566932713325-macbook.jfif\&quot;],\&quot;size\&quot;:[0,\&quot;233x216\&quot;],\&quot;alt\&quot;:[0,\&quot;macbook\&quot;]}],\&quot;updated_at\&quot;:[0,\&quot;2019-08-27T19:07:35.157Z\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-08-27T19:07:35.157Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c7009bec626be23430d4f80\&quot;],\&quot;name\&quot;:[0,\&quot;Periféricos\&quot;],\&quot;slug\&quot;:[0,\&quot;perifericos\&quot;],\&quot;icon\&quot;:[0,{\&quot;url\&quot;:[0,\&quot;https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/@1567007328003-keyb.png\&quot;]}],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c701cb1c626be23430d4fe9\&quot;],\&quot;name\&quot;:[0,\&quot;Físicos\&quot;],\&quot;slug\&quot;:[0,\&quot;fisicos\&quot;]}],\&quot;updated_at\&quot;:[0,\&quot;2020-09-04T21:48:44.261Z\&quot;],\&quot;created_at\&quot;:[0,\&quot;2020-09-04T21:48:44.261Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c7009fdc626be23430d4f82\&quot;],\&quot;name\&quot;:[0,\&quot;Teclados\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c7009bec626be23430d4f80\&quot;],\&quot;name\&quot;:[0,\&quot;Periféricos\&quot;],\&quot;slug\&quot;:[0,\&quot;perifericos\&quot;]}],\&quot;slug\&quot;:[0,\&quot;teclados\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-02-22T14:41:01.323Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c700a11c626be23430d4f84\&quot;],\&quot;name\&quot;:[0,\&quot;Mouses\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c7009bec626be23430d4f80\&quot;],\&quot;name\&quot;:[0,\&quot;Periféricos\&quot;],\&quot;slug\&quot;:[0,\&quot;perifericos\&quot;]}],\&quot;slug\&quot;:[0,\&quot;mouses\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-02-22T14:41:21.566Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c700a37c626be23430d4f86\&quot;],\&quot;name\&quot;:[0,\&quot;Caixas de Som\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c7009bec626be23430d4f80\&quot;],\&quot;name\&quot;:[0,\&quot;Periféricos\&quot;],\&quot;slug\&quot;:[0,\&quot;perifericos\&quot;]}],\&quot;slug\&quot;:[0,\&quot;caixas-de-som\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-02-22T14:41:59.607Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c700a53c626be23430d4f88\&quot;],\&quot;name\&quot;:[0,\&quot;Headset\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c7009bec626be23430d4f80\&quot;],\&quot;name\&quot;:[0,\&quot;Periféricos\&quot;],\&quot;slug\&quot;:[0,\&quot;perifericos\&quot;]}],\&quot;slug\&quot;:[0,\&quot;headset\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-02-22T14:42:27.608Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c700a6bc626be23430d4f8a\&quot;],\&quot;name\&quot;:[0,\&quot;Cadeira Gamer\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c7009bec626be23430d4f80\&quot;],\&quot;name\&quot;:[0,\&quot;Periféricos\&quot;],\&quot;slug\&quot;:[0,\&quot;perifericos\&quot;]}],\&quot;slug\&quot;:[0,\&quot;cadeira-gamer\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-02-22T14:42:51.330Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c700a9cc626be23430d4f8c\&quot;],\&quot;name\&quot;:[0,\&quot;Smartphones\&quot;],\&quot;slug\&quot;:[0,\&quot;smartphones\&quot;],\&quot;icon\&quot;:[0,{\&quot;url\&quot;:[0,\&quot;https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/@1567007321218-smartphone.png\&quot;]}],\&quot;updated_at\&quot;:[0,\&quot;2019-08-28T15:52:17.995Z\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-08-28T15:52:17.995Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c701c9ec626be23430d4fe7\&quot;],\&quot;name\&quot;:[0,\&quot;Jogo\&quot;],\&quot;slug\&quot;:[0,\&quot;jogos/\&quot;],\&quot;icon\&quot;:[0,{\&quot;url\&quot;:[0,\&quot;https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/@1567007332353-game.png\&quot;]}],\&quot;updated_at\&quot;:[0,\&quot;2020-07-24T19:14:01.592Z\&quot;],\&quot;created_at\&quot;:[0,\&quot;2020-07-24T19:14:01.592Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c701cb1c626be23430d4fe9\&quot;],\&quot;name\&quot;:[0,\&quot;Físicos\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c701c9ec626be23430d4fe7\&quot;],\&quot;name\&quot;:[0,\&quot;Jogo\&quot;],\&quot;slug\&quot;:[0,\&quot;jogos/\&quot;]}],\&quot;slug\&quot;:[0,\&quot;fisicos\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-02-22T16:00:49.671Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c701cc6c626be23430d4feb\&quot;],\&quot;name\&quot;:[0,\&quot;Digitais\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c701c9ec626be23430d4fe7\&quot;],\&quot;name\&quot;:[0,\&quot;Jogo\&quot;],\&quot;slug\&quot;:[0,\&quot;jogos/\&quot;]}],\&quot;slug\&quot;:[0,\&quot;digitais\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-02-22T16:01:10.358Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5c701ce2c626be23430d4fed\&quot;],\&quot;name\&quot;:[0,\&quot;Usados\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c701c9ec626be23430d4fe7\&quot;],\&quot;name\&quot;:[0,\&quot;Jogo\&quot;],\&quot;slug\&quot;:[0,\&quot;jogos/\&quot;]}],\&quot;slug\&quot;:[0,\&quot;usados\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-02-22T16:01:38.850Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5ceecb3f887ef430f1f70c88\&quot;],\&quot;name\&quot;:[0,\&quot;Promoções\&quot;],\&quot;slug\&quot;:[0,\&quot;promocoes\&quot;],\&quot;icon\&quot;:[0,{\&quot;url\&quot;:[0,\&quot;https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/@1567007326827-mony.png\&quot;]}],\&quot;updated_at\&quot;:[0,\&quot;2019-08-28T15:52:41.385Z\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-08-28T15:52:41.385Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5d5714045753286eadbbdc77\&quot;],\&quot;name\&quot;:[0,\&quot;Ultrabook\&quot;],\&quot;parent\&quot;:[0,{\&quot;_id\&quot;:[0,\&quot;5c6ffa6ec626be23430d4f56\&quot;],\&quot;name\&quot;:[0,\&quot;Notebooks\&quot;],\&quot;slug\&quot;:[0,\&quot;notebooks\&quot;]}],\&quot;slug\&quot;:[0,\&quot;ultrabook\&quot;],\&quot;created_at\&quot;:[0,\&quot;2019-08-16T20:37:24.811Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5f70f1417430f92180f5ba66\&quot;],\&quot;name\&quot;:[0,\&quot;Brasileiro\&quot;],\&quot;created_at\&quot;:[0,\&quot;2020-09-27T20:08:33.202Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;5fb2b13b69274c73fcd6a051\&quot;],\&quot;name\&quot;:[0,\&quot;smartwatch\&quot;],\&quot;created_at\&quot;:[0,\&quot;2020-11-16T17:04:59.320Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;60199592d6981740b4a030f4\&quot;],\&quot;name\&quot;:[0,\&quot;São Paulo\&quot;],\&quot;slug\&quot;:[0,\&quot;sao-paulo\&quot;],\&quot;updated_at\&quot;:[0,\&quot;2021-08-17T18:43:10.174Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;61de099d0c7c72722502397b\&quot;],\&quot;name\&quot;:[0,\&quot;MacBook Pro\&quot;],\&quot;created_at\&quot;:[0,\&quot;2022-01-11T22:50:05.070Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;61de12450c7c727225025299\&quot;],\&quot;name\&quot;:[0,\&quot;Mac Stop\&quot;],\&quot;created_at\&quot;:[0,\&quot;2022-01-11T23:27:01.790Z\&quot;]}],[0,{\&quot;_id\&quot;:[0,\&quot;6227a90a7963422eee367aaa\&quot;],\&quot;name\&quot;:[0,\&quot;capinhas\&quot;],\&quot;created_at\&quot;:[0,\&quot;2022-03-08T19:05:46.688Z\&quot;]}]]&quot;]}" ssr="" client="load" opts="{&quot;name&quot;:&quot;ShopHeader&quot;,&quot;value&quot;:true}" await-children=""><header class="top-0 z-50 transition-colors bg-white py-3 sm:py-4 md:py-5"><div class="container lg:max-w-7xl mx-auto px-1 lg:pl-3 grid grid-flow-col grid-cols-3 justify-between items-center md:grid-cols-none md:auto-cols-max"><div class="md:hidden"><button class="px-2 my-1" aria-label="Abrir/fechar menu"><i class="i-menu text-base-500 text-3xl"></i></button></div><!--[--><astro-slot name="logo">
61
61
  <a href="/">
62
62
  <h2><picture>
63
63
  <source type="image/avif" srcset="/_image?f=avif&#38;w=300&#38;h=117&#38;ar=2.570281124497992&#38;href=%2Fimg%2Fuploads%2Flogo.webp 300w" sizes="150px"><source type="image/webp" srcset="/_image?f=webp&#38;w=300&#38;h=117&#38;ar=2.570281124497992&#38;href=%2Fimg%2Fuploads%2Flogo.webp 300w" sizes="150px">
@@ -1 +1 @@
1
- if(!self.define){let e,s={};const r=(r,n)=>(r=new URL(r+".js",n).href,s[r]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=r,e.onload=s,document.head.appendChild(e)}else e=r,importScripts(r),s()})).then((()=>{let e=s[r];if(!e)throw new Error(`Module ${r} didn’t register its module`);return e})));self.define=(n,i)=>{const o=e||("document"in self?document.currentScript.src:"")||location.href;if(s[o])return;let a={};const l=e=>r(e,o),u={module:{uri:o},exports:a,require:l};s[o]=Promise.all(n.map((e=>u[e]||l(e)))).then((e=>(i(...e),a)))}}define(["./workbox-e2ee76b5"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"_astro/_...slug_.6721f699.css",revision:null},{url:"_astro/_plugin-vue_export-helper.6da04e63.js",revision:null},{url:"_astro/client.b854166f.js",revision:null},{url:"_astro/firebase-app.7ce2ebb1.js",revision:null},{url:"_astro/format-money.6f464cee.js",revision:null},{url:"_astro/hoisted.721ad75d.js",revision:null},{url:"_astro/idle-callback.889bf0ea.js",revision:null},{url:"_astro/index.0c833781.css",revision:null},{url:"_astro/index.a500792d.js",revision:null},{url:"_astro/modules-info.80ae4e30.js",revision:null},{url:"_astro/PitchBar.457658a3.js",revision:null},{url:"_astro/preload-helper.101896b7.js",revision:null},{url:"_astro/Prices.a1302bf9.js",revision:null},{url:"_astro/ProductCard.1a45764a.js",revision:null},{url:"_astro/runtime-dom.esm-bundler.acde10ec.js",revision:null},{url:"_astro/server.60de185d.css",revision:null},{url:"_astro/session-utm.72684b84.js",revision:null},{url:"_astro/ShopHeader.0a6766ac.js",revision:null},{url:"_astro/workbox-window.prod.es5.295a6886.js",revision:null},{url:"img/uploads/large-icon.png",revision:"0b35db516cfa7475b1c2f8c081e8d54d"},{url:"manifest.webmanifest",revision:"6a858866b0560997f368e27ab5418e15"}],{ignoreURLParametersMatching:[/.*/]}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/404"))),e.registerRoute(/^\/$/,new e.NetworkFirst,"GET"),e.registerRoute(/\/((?!(?:admin|assets|img)(\/|$))[^.]+)(\.(?!js|css|xml|txt|png|jpg|jpeg|webp|avif|svg|gif)[^.]+)*$/,new e.NetworkFirst({cacheName:"pages",plugins:[new e.ExpirationPlugin({maxEntries:50,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^\/assets\//,new e.StaleWhileRevalidate({cacheName:"assets",plugins:[]}),"GET"),e.registerRoute(/^\/_image$/,new e.StaleWhileRevalidate({cacheName:"sharp-images",plugins:[new e.ExpirationPlugin({maxEntries:50,maxAgeSeconds:2592e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^\/img\/uploads\/.*\.(?:png|jpg|jpeg|webp|avif|svg|gif)$/,new e.StaleWhileRevalidate({cacheName:"cms-images",plugins:[new e.ExpirationPlugin({maxEntries:20,maxAgeSeconds:2592e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^https:\/\/ecomplus\.io/,new e.NetworkFirst({cacheName:"store-api",plugins:[new e.ExpirationPlugin({maxEntries:50,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^https:\/\/(((\w+\.)?ecoms\d)|(ecom[\w-]+(\.\w+)*\.digitaloceanspaces))\.com.*\/imgs\/normal\//,new e.CacheFirst({cacheName:"product-thumbnails",plugins:[new e.ExpirationPlugin({maxEntries:100,maxAgeSeconds:2592e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^https:\/\/(((\w+\.)?ecoms\d)|(ecom[\w-]+(\.\w+)*\.digitaloceanspaces))\.com.*\/imgs\/big\//,new e.CacheFirst({cacheName:"product-pictures",plugins:[new e.ExpirationPlugin({maxEntries:10,maxAgeSeconds:604800,purgeOnQuotaError:!0})]}),"GET")}));
1
+ if(!self.define){let e,s={};const r=(r,n)=>(r=new URL(r+".js",n).href,s[r]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=r,e.onload=s,document.head.appendChild(e)}else e=r,importScripts(r),s()})).then((()=>{let e=s[r];if(!e)throw new Error(`Module ${r} didn’t register its module`);return e})));self.define=(n,i)=>{const o=e||("document"in self?document.currentScript.src:"")||location.href;if(s[o])return;let a={};const l=e=>r(e,o),u={module:{uri:o},exports:a,require:l};s[o]=Promise.all(n.map((e=>u[e]||l(e)))).then((e=>(i(...e),a)))}}define(["./workbox-e2ee76b5"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"_astro/_...slug_.6721f699.css",revision:null},{url:"_astro/_plugin-vue_export-helper.6da04e63.js",revision:null},{url:"_astro/client.b854166f.js",revision:null},{url:"_astro/firebase-app.7ce2ebb1.js",revision:null},{url:"_astro/format-money.6f464cee.js",revision:null},{url:"_astro/hoisted.721ad75d.js",revision:null},{url:"_astro/idle-callback.889bf0ea.js",revision:null},{url:"_astro/index.0c833781.css",revision:null},{url:"_astro/index.a500792d.js",revision:null},{url:"_astro/modules-info.80ae4e30.js",revision:null},{url:"_astro/PitchBar.457658a3.js",revision:null},{url:"_astro/preload-helper.101896b7.js",revision:null},{url:"_astro/Prices.a1302bf9.js",revision:null},{url:"_astro/ProductCard.1a45764a.js",revision:null},{url:"_astro/runtime-dom.esm-bundler.acde10ec.js",revision:null},{url:"_astro/server.60de185d.css",revision:null},{url:"_astro/session-utm.72684b84.js",revision:null},{url:"_astro/ShopHeader.d36e6752.js",revision:null},{url:"_astro/workbox-window.prod.es5.295a6886.js",revision:null},{url:"img/uploads/large-icon.png",revision:"0b35db516cfa7475b1c2f8c081e8d54d"},{url:"manifest.webmanifest",revision:"6a858866b0560997f368e27ab5418e15"}],{ignoreURLParametersMatching:[/.*/]}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/404"))),e.registerRoute(/^\/$/,new e.NetworkFirst,"GET"),e.registerRoute(/\/((?!(?:admin|assets|img)(\/|$))[^.]+)(\.(?!js|css|xml|txt|png|jpg|jpeg|webp|avif|svg|gif)[^.]+)*$/,new e.NetworkFirst({cacheName:"pages",plugins:[new e.ExpirationPlugin({maxEntries:50,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^\/assets\//,new e.StaleWhileRevalidate({cacheName:"assets",plugins:[]}),"GET"),e.registerRoute(/^\/_image$/,new e.StaleWhileRevalidate({cacheName:"sharp-images",plugins:[new e.ExpirationPlugin({maxEntries:50,maxAgeSeconds:2592e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^\/img\/uploads\/.*\.(?:png|jpg|jpeg|webp|avif|svg|gif)$/,new e.StaleWhileRevalidate({cacheName:"cms-images",plugins:[new e.ExpirationPlugin({maxEntries:20,maxAgeSeconds:2592e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^https:\/\/ecomplus\.io/,new e.NetworkFirst({cacheName:"store-api",plugins:[new e.ExpirationPlugin({maxEntries:50,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^https:\/\/(((\w+\.)?ecoms\d)|(ecom[\w-]+(\.\w+)*\.digitaloceanspaces))\.com.*\/imgs\/normal\//,new e.CacheFirst({cacheName:"product-thumbnails",plugins:[new e.ExpirationPlugin({maxEntries:100,maxAgeSeconds:2592e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^https:\/\/(((\w+\.)?ecoms\d)|(ecom[\w-]+(\.\w+)*\.digitaloceanspaces))\.com.*\/imgs\/big\//,new e.CacheFirst({cacheName:"product-pictures",plugins:[new e.ExpirationPlugin({maxEntries:10,maxAgeSeconds:604800,purgeOnQuotaError:!0})]}),"GET")}));
@@ -1654,7 +1654,10 @@ _sfc_main$7.setup = (props, ctx) => {
1654
1654
  };
1655
1655
  const Drawer = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["ssrRender", _sfc_ssrRender$7]]);
1656
1656
 
1657
- const useStorage = (key, initialValue, storage = localStorage) => {
1657
+ const useStorage = (key, initialValue, storage = globalThis.localStorage) => {
1658
+ if (!storage) {
1659
+ return reactive(initialValue);
1660
+ }
1658
1661
  let persistedValue;
1659
1662
  const sessionJson = storage.getItem(key);
1660
1663
  if (sessionJson) {
@@ -14,8 +14,8 @@ import enableDestroy from 'server-destroy';
14
14
  import { defineComponent, useCssVars, unref, computed, useSSRContext, mergeProps, h as h$2, createSSRApp } from 'vue';
15
15
  import { ssrRenderSlotInner, ssrRenderAttrs, ssrRenderSlot, renderToString } from 'vue/server-renderer';
16
16
  import { i18n, formatMoney } from '@ecomplus/utils';
17
- /* empty css */import { _ as _export_sfc, a as _page0, b as _page1, c as _page3, d as _page4, e as _page5 } from './chunks/pages/all.e0f284c9.mjs';
18
- import { _ as _page2 } from './chunks/prerender.9f6cbb00.mjs';
17
+ /* empty css */import { _ as _export_sfc, a as _page0, b as _page1, c as _page3, d as _page4, e as _page5 } from './chunks/pages/all.42c985c2.mjs';
18
+ import { _ as _page2 } from './chunks/prerender.6899569d.mjs';
19
19
  import 'path-to-regexp';
20
20
  import 'tls';
21
21
  import 'mime';
@@ -3380,7 +3380,7 @@ const _renderer1 = {
3380
3380
  const pageMap = new Map([["../../node_modules/.pnpm/@astrojs+image@0.14.1_astro@2.0.10+sharp@0.31.3/node_modules/@astrojs/image/dist/endpoint.js", _page0],["src/pages/index.astro", _page1],["src/pages/fallback.astro", _page2],["src/pages/app/index.astro", _page3],["src/pages/app/account.astro", _page4],["src/pages/[...slug].astro", _page5],]);
3381
3381
  const renderers = [Object.assign({"name":"astro:jsx","serverEntrypoint":"astro/jsx/server.js","jsxImportSource":"astro"}, { ssr: server_default }),Object.assign({"name":"@astrojs/vue","clientEntrypoint":"@astrojs/vue/client.js","serverEntrypoint":"@astrojs/vue/server.js"}, { ssr: _renderer1 }),];
3382
3382
 
3383
- const _manifest = Object.assign(deserializeManifest({"adapterName":"@astrojs/node","routes":[{"file":"fallback/index.html","links":[],"scripts":[],"routeData":{"route":"/fallback","type":"page","pattern":"^\\/fallback\\/?$","segments":[[{"content":"fallback","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/fallback.astro","pathname":"/fallback","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"routeData":{"type":"endpoint","route":"/_image","pattern":"^\\/_image$","segments":[[{"content":"_image","dynamic":false,"spread":false}]],"params":[],"component":"../../node_modules/.pnpm/@astrojs+image@0.14.1_astro@2.0.10+sharp@0.31.3/node_modules/@astrojs/image/dist/endpoint.js","pathname":"/_image","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":["_astro/_...slug_.6721f699.css","_astro/index.0c833781.css"],"scripts":[{"type":"external","value":"_astro/hoisted.721ad75d.js"}],"routeData":{"route":"/","type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"routeData":{"route":"/app","type":"page","pattern":"^\\/app\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/index.astro","pathname":"/app","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"routeData":{"route":"/app/account","type":"page","pattern":"^\\/app\\/account\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}],[{"content":"account","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/account.astro","pathname":"/app/account","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":["_astro/_...slug_.6721f699.css"],"scripts":[{"type":"external","value":"_astro/hoisted.721ad75d.js"}],"routeData":{"route":"/[...slug]","type":"page","pattern":"^(?:\\/(.*?))?\\/?$","segments":[[{"content":"...slug","dynamic":true,"spread":true}]],"params":["...slug"],"component":"src/pages/[...slug].astro","_meta":{"trailingSlash":"ignore"}}}],"site":"https://ecom2-002.web.app","base":"/","markdown":{"drafts":false,"syntaxHighlight":"shiki","shikiConfig":{"langs":[],"theme":"github-dark","wrap":false},"remarkPlugins":[],"rehypePlugins":[],"remarkRehype":{},"gfm":true,"smartypants":true,"contentDir":"file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/content/"},"pageMap":null,"propagation":[["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseHead.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseStateJson.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseBody.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/Base.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/scripts/InlineScripts.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Base.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/node_modules/@astrojs/image/components/Image.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/node_modules/@astrojs/image/components/Picture.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/ssr/Picture.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/PagesHeader.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Pages.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/main/Home.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/index.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/app/index.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/app/account.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/main/Wildcard.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/[...slug].astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/main/Fallback.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/fallback.astro","in-tree"]],"renderers":[],"entryModules":{"\u0000@astrojs-ssr-virtual-entry":"_@astrojs-ssr-virtual-entry.mjs","~/components/Prices.vue":"_astro/Prices.a1302bf9.js","@@sf/components/ProductCard.vue":"_astro/ProductCard.1a45764a.js","@astrojs/vue/client.js":"_astro/client.b854166f.js","~/components/PitchBar.vue":"_astro/PitchBar.457658a3.js","/home/leo/code/ecomplus/cloud-commerce/node_modules/workbox-window/build/workbox-window.prod.es5.mjs":"_astro/workbox-window.prod.es5.295a6886.js","/astro/hoisted.js?q=0":"_astro/hoisted.721ad75d.js","~/components/ShopHeader.vue":"_astro/ShopHeader.0a6766ac.js","/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/scripts/firebase-app.ts":"_astro/firebase-app.7ce2ebb1.js","astro:scripts/before-hydration.js":""},"assets":["/_astro/index.0c833781.css","/_astro/server.60de185d.css","/_astro/_...slug_.6721f699.css","/manifest.webmanifest","/robots.txt","/sw.js","/workbox-e2ee76b5.js","/_astro/PitchBar.457658a3.js","/_astro/Prices.a1302bf9.js","/_astro/ProductCard.1a45764a.js","/_astro/ShopHeader.0a6766ac.js","/_astro/_plugin-vue_export-helper.6da04e63.js","/_astro/client.b854166f.js","/_astro/firebase-app.7ce2ebb1.js","/_astro/format-money.6f464cee.js","/_astro/hoisted.721ad75d.js","/_astro/idle-callback.889bf0ea.js","/_astro/index.a500792d.js","/_astro/modules-info.80ae4e30.js","/_astro/preload-helper.101896b7.js","/_astro/runtime-dom.esm-bundler.acde10ec.js","/_astro/session-utm.72684b84.js","/_astro/workbox-window.prod.es5.295a6886.js","/admin/config.json","/assets/cms-preview.css","/assets/cms.css","/assets/cvv.png","/assets/img-placeholder.png","/assets/payments.png","/assets/ssl-safe.png","/img/icon.png","/img/large-icon.png","/img/uploads/banner1.png","/img/uploads/banner2.png","/img/uploads/banner2.webp","/img/uploads/favicon.png","/img/uploads/headless.png","/img/uploads/headphone.png","/img/uploads/headphone.webp","/img/uploads/icon.png","/img/uploads/large-icon.png","/img/uploads/logo.png","/img/uploads/logo.webp","/img/uploads/og-image.png","/img/uploads/passion.png","/img/uploads/passion.webp","/img/uploads/pwa-reliable.png","/img/uploads/rect8589.png","/img/uploads/rect859.png","/img/uploads/rect89.png","/img/uploads/rect89.webp","/img/uploads/ssl-safe.png","/assets/icons/bootstrap-icons/font/storefront-icons.woff2","/assets/icons/feather-icons/font/storefront-icons.woff2","/assets/icons/font-awesome/font/storefront-icons.woff2","/assets/icons/line-awesome/font/storefront-icons.woff2","/assets/icons/tabler-icons/font/storefront-icons.woff2","/fallback/index.html"]}), {
3383
+ const _manifest = Object.assign(deserializeManifest({"adapterName":"@astrojs/node","routes":[{"file":"fallback/index.html","links":[],"scripts":[],"routeData":{"route":"/fallback","type":"page","pattern":"^\\/fallback\\/?$","segments":[[{"content":"fallback","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/fallback.astro","pathname":"/fallback","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"routeData":{"type":"endpoint","route":"/_image","pattern":"^\\/_image$","segments":[[{"content":"_image","dynamic":false,"spread":false}]],"params":[],"component":"../../node_modules/.pnpm/@astrojs+image@0.14.1_astro@2.0.10+sharp@0.31.3/node_modules/@astrojs/image/dist/endpoint.js","pathname":"/_image","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":["_astro/_...slug_.6721f699.css","_astro/index.0c833781.css"],"scripts":[{"type":"external","value":"_astro/hoisted.721ad75d.js"}],"routeData":{"route":"/","type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"routeData":{"route":"/app","type":"page","pattern":"^\\/app\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/index.astro","pathname":"/app","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"routeData":{"route":"/app/account","type":"page","pattern":"^\\/app\\/account\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}],[{"content":"account","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/account.astro","pathname":"/app/account","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":["_astro/_...slug_.6721f699.css"],"scripts":[{"type":"external","value":"_astro/hoisted.721ad75d.js"}],"routeData":{"route":"/[...slug]","type":"page","pattern":"^(?:\\/(.*?))?\\/?$","segments":[[{"content":"...slug","dynamic":true,"spread":true}]],"params":["...slug"],"component":"src/pages/[...slug].astro","_meta":{"trailingSlash":"ignore"}}}],"site":"https://ecom2-002.web.app","base":"/","markdown":{"drafts":false,"syntaxHighlight":"shiki","shikiConfig":{"langs":[],"theme":"github-dark","wrap":false},"remarkPlugins":[],"rehypePlugins":[],"remarkRehype":{},"gfm":true,"smartypants":true,"contentDir":"file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/content/"},"pageMap":null,"propagation":[["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseHead.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseStateJson.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseBody.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/Base.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/scripts/InlineScripts.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Base.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/node_modules/@astrojs/image/components/Image.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/node_modules/@astrojs/image/components/Picture.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/ssr/Picture.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/PagesHeader.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Pages.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/main/Home.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/index.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/app/index.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/app/account.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/main/Wildcard.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/[...slug].astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/main/Fallback.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/fallback.astro","in-tree"]],"renderers":[],"entryModules":{"\u0000@astrojs-ssr-virtual-entry":"_@astrojs-ssr-virtual-entry.mjs","~/components/Prices.vue":"_astro/Prices.a1302bf9.js","~/components/PitchBar.vue":"_astro/PitchBar.457658a3.js","@@sf/components/ProductCard.vue":"_astro/ProductCard.1a45764a.js","/astro/hoisted.js?q=0":"_astro/hoisted.721ad75d.js","/home/leo/code/ecomplus/cloud-commerce/node_modules/workbox-window/build/workbox-window.prod.es5.mjs":"_astro/workbox-window.prod.es5.295a6886.js","@astrojs/vue/client.js":"_astro/client.b854166f.js","~/components/ShopHeader.vue":"_astro/ShopHeader.d36e6752.js","/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/scripts/firebase-app.ts":"_astro/firebase-app.7ce2ebb1.js","astro:scripts/before-hydration.js":""},"assets":["/_astro/index.0c833781.css","/_astro/server.60de185d.css","/_astro/_...slug_.6721f699.css","/manifest.webmanifest","/robots.txt","/sw.js","/workbox-e2ee76b5.js","/_astro/PitchBar.457658a3.js","/_astro/Prices.a1302bf9.js","/_astro/ProductCard.1a45764a.js","/_astro/ShopHeader.d36e6752.js","/_astro/_plugin-vue_export-helper.6da04e63.js","/_astro/client.b854166f.js","/_astro/firebase-app.7ce2ebb1.js","/_astro/format-money.6f464cee.js","/_astro/hoisted.721ad75d.js","/_astro/idle-callback.889bf0ea.js","/_astro/index.a500792d.js","/_astro/modules-info.80ae4e30.js","/_astro/preload-helper.101896b7.js","/_astro/runtime-dom.esm-bundler.acde10ec.js","/_astro/session-utm.72684b84.js","/_astro/workbox-window.prod.es5.295a6886.js","/admin/config.json","/assets/cms-preview.css","/assets/cms.css","/assets/cvv.png","/assets/img-placeholder.png","/assets/payments.png","/assets/ssl-safe.png","/img/icon.png","/img/large-icon.png","/img/uploads/banner1.png","/img/uploads/banner2.png","/img/uploads/banner2.webp","/img/uploads/favicon.png","/img/uploads/headless.png","/img/uploads/headphone.png","/img/uploads/headphone.webp","/img/uploads/icon.png","/img/uploads/large-icon.png","/img/uploads/logo.png","/img/uploads/logo.webp","/img/uploads/og-image.png","/img/uploads/passion.png","/img/uploads/passion.webp","/img/uploads/pwa-reliable.png","/img/uploads/rect8589.png","/img/uploads/rect859.png","/img/uploads/rect89.png","/img/uploads/rect89.webp","/img/uploads/ssl-safe.png","/assets/icons/bootstrap-icons/font/storefront-icons.woff2","/assets/icons/feather-icons/font/storefront-icons.woff2","/assets/icons/font-awesome/font/storefront-icons.woff2","/assets/icons/tabler-icons/font/storefront-icons.woff2","/assets/icons/line-awesome/font/storefront-icons.woff2","/fallback/index.html"]}), {
3384
3384
  pageMap: pageMap,
3385
3385
  renderers: renderers
3386
3386
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/storefront",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce storefront with Astro",
6
6
  "main": "src/index.js",
7
7
  "repository": {
@@ -1,6 +1,13 @@
1
1
  import { reactive, watch } from 'vue';
2
2
 
3
- export default <T extends {}>(key: string, initialValue: T, storage = localStorage) => {
3
+ const useStorage = <T extends {}>(
4
+ key: string,
5
+ initialValue: T,
6
+ storage = globalThis.localStorage,
7
+ ) => {
8
+ if (!storage) {
9
+ return reactive<T>(initialValue);
10
+ }
4
11
  let persistedValue: T | undefined | null;
5
12
  const sessionJson = storage.getItem(key);
6
13
  if (sessionJson) {
@@ -17,3 +24,5 @@ export default <T extends {}>(key: string, initialValue: T, storage = localStora
17
24
  });
18
25
  return state;
19
26
  };
27
+
28
+ export default useStorage;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/types",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce reusable type definitions",
6
6
  "main": "index.ts",
7
7
  "repository": {
@@ -1 +0,0 @@
1
- import{c as oe,u as ne,p as re,b as ie}from"./index.a500792d.js";import{j as k,c as v,q as C,u as Q,d as L,s as le,_ as P,r as U,o as c,k as $,w as M,a as p,n as x,e as l,p as V,b as I,a3 as ce,g as B,h as ue,l as de,t as E,F as z,C as H,f as me,a4 as he,a5 as pe,a6 as fe}from"./_plugin-vue_export-helper.6da04e63.js";import{w as _e}from"./runtime-dom.esm-bundler.acde10ec.js";import{_ as ge}from"./preload-helper.101896b7.js";import{i as ye}from"./idle-callback.889bf0ea.js";const we=e=>{if(e){if(e.display_name)return e.display_name;if(e.name&&e.name.given_name)return e.name.given_name}return""},ve=we,be=e=>{const{header:s,canSetStyles:t,canCreateHeightDiv:a,isShownOnScrollDown:n}={canSetStyles:!0,canCreateHeightDiv:!0,...e},{ready:r,start:o}=oe(100,{controls:!0,immediate:!1}),i=k(0),u=k(0);let f;const{y:S}=ne(document),m=v(()=>r.value&&S.value>u.value*1.2),h=k("none");C(m,async y=>{t&&(s.value.style.position=y?"sticky":null),f&&(f.style.height=y?`${i.value}px`:null),y?(await re(300),h.value="opacity var(--transition-slow), transform var(--transition)"):(o(),h.value="none")});const A=k(!1);return C(S,(y,d)=>{A.value=y>0&&y<d}),Q(()=>{const y=()=>{i.value=s.value.offsetHeight,u.value=i.value+window.pageYOffset+s.value.getBoundingClientRect().top,o()},d=s.value.getElementsByTagName("IMG");let w=!0;for(let _=0;_<d.length;_++){const T=d[_];(!T.complete||T.naturalHeight===0)&&(w=!1,T.onload=y)}w&&y(),window.addEventListener("resize",ie(y,300)),t&&(s.value.style.willChange="transform",C([m,A],([_,T])=>{let j=null,K=null;_&&(!T||n)&&(j="0",K="translateY(-100%)"),s.value.style.opacity=j,s.value.style.transform=K}),C(h,_=>{s.value.style.transition=_})),a&&(f=document.createElement("div"),s.value.parentElement.insertBefore(f,s.value))}),{staticHeight:i,staticY:u,isSticky:m,isScrollUp:A,transition:h}},Se=e=>e.filter(({slug:s,parent:t})=>s&&!t),ke=(e,s)=>e.filter(({slug:t,parent:a})=>t&&a?a._id===s._id||a.slug&&a.slug===s.slug:!1),xe=e=>{const{header:s}=e,{isSticky:t,staticHeight:a,staticY:n}=be({header:s}),r=v(()=>t.value?s.value.offsetHeight:n.value),o=Se(e.categories),i=m=>ke(e.categories,m),u=m=>({...m,subcategories:i(m).map(h=>u(h))}),f=o.map(u),S=k(!1);return{isSticky:t,staticHeight:a,staticY:n,positionY:r,mainCategories:o,getSubcategories:i,getCategoryTree:u,categoryTrees:f,isSidenavOpen:S}},Te=L({__name:"Drawer",props:{modelValue:{type:Boolean,default:!1},placement:{default:"start"},position:{default:"fixed"},hasCloseButton:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(e,{expose:s,emit:t}){s();const a=e,n=()=>t("update:modelValue",!1),r=k(null),o=h=>{r.value?.contains(h.target)||n()},i=h=>{h.key==="Escape"&&n()};C(le(a,"modelValue"),async h=>{h?(document.body.style.overflow="hidden",setTimeout(()=>{document.addEventListener("click",o,{passive:!0}),document.addEventListener("keydown",i,{passive:!0})},500)):(document.body.style.overflow=null,document.removeEventListener("click",o),document.removeEventListener("keydown",i))});const u=v(()=>{switch(a.placement){case"start":return"left";case"end":return"right";case"top":return"up";default:return"down"}}),f=v(()=>a.position==="fixed"),S=v(()=>a.placement==="start"||a.placement==="end"),m={props:a,emit:t,close:n,drawer:r,outsideClickListener:o,escClickListener:i,slideTo:u,isFixed:f,isPlacementX:S};return Object.defineProperty(m,"__isScriptSetup",{enumerable:!1,value:!0}),m}}),Ce=["open","data-drawer"],Oe={class:"relative h-full"},Ee=["onClick"],Ae=l("i",{class:"i-close text-base-400 text-3xl"},null,-1),Ne={key:0,class:"fixed top-0 left-0 w-screen h-screen bg-black/50 z-40","data-drawer-backdrop":""};function Ie(e,s,t,a,n,r){const o=U("Fade");return c(),$(o,{slide:a.slideTo,speed:"slow","is-floating":""},{default:M(()=>[t.modelValue?(c(),p("dialog",{key:0,ref:"drawer",class:x(["w-screen max-w-sm shadow p-0 m-0 z-50",[t.position,a.isFixed?`top-0 left-0 ${a.isPlacementX?"h-screen":""}`:null]]),open:t.modelValue,"data-drawer":t.placement},[l("div",Oe,[t.hasCloseButton?(c(),p("button",{key:0,type:"button","aria-label":"Fechar",onClick:_e(a.close,["prevent"]),class:x(["absolute top-2",t.placement==="end"?"left-2":"right-2"]),"data-drawer-close":""},[V(e.$slots,"close",{},()=>[Ae])],10,Ee)):I("",!0),V(e.$slots,"default")]),(c(),$(ce,{to:"#teleported-top"},[B(o,null,{default:M(()=>[t.modelValue?(c(),p("div",Ne)):I("",!0)]),_:1})]))],10,Ce)):I("",!0)]),_:3},8,["slide"])}const $e=P(Te,[["render",Ie]]);globalThis.__apiCache||(globalThis.__apiCache={});const N={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0};class q extends Error{constructor(s,t,a,n=!1){t?(super(t.statusText),this.data=t.data,this.statusCode=t.status):super(a||"Request error"),this.config=s,this.response=t,this.isTimeout=n}}const Le={middleware(e){const s={...e.headers};if(!e.isNoAuth)if(e.accessToken)s.Authorization=`Bearer ${e.accessToken}`;else{const r=e.authenticationId||N.ECOM_AUTHENTICATION_ID,o=e.apiKey||N.ECOM_API_KEY;if(r&&o){const i=`${r}:${o}`,u=typeof Buffer=="function"?Buffer.from(i).toString("base64"):btoa(i);s.Authorization=`Basic ${u}`}}let t=e.baseUrl||N.API_BASE_URL||"https://ecomplus.io/v2";const{endpoint:a,params:n}=e;if(a!=="login"&&a!=="authenticate"&&a!=="ask-auth-callback"&&a!=="check-username"){const r=e.storeId||N.ECOM_STORE_ID;if(!r)throw new Error("`storeId` must be set in config or `ECOM_STORE_ID` env var");t+=`/:${r}`;const o=e.lang||N.ECOM_LANG;o&&(t+=`,lang:${o}`)}if(t+=`/${a}`,n){if(typeof n=="string")t+=`?${n}`;else if(typeof n=="object"){const r=new URLSearchParams;Object.keys(n).forEach(o=>{const i=n[o];Array.isArray(i)?i.forEach(u=>{r.append(o,u)}):r.append(o,i)}),t+=`?${r.toString()}`}}return{url:t,headers:s}}},g=async(e,s=0)=>{const{url:t,headers:a}=Le.middleware(e),{method:n="get",timeout:r=2e4,maxRetries:o=3,cacheMaxAge:i=6e5}=e,u=n==="get"&&(e.canCache||e.canCache===void 0&&N.SSR);let f;if(u){f=`${t}${JSON.stringify(a)}`;const w=globalThis.__apiCache[f];if(w&&Date.now()-w.timestamp<=i)return{...w.res,config:e}}const S=e.body||e.data;let m;S&&(m=JSON.stringify(S),a["Content-Type"]="application/json",a["Content-Length"]=m.length.toString());const h=new AbortController;let A=!1;const y=setTimeout(()=>{h.abort(),A=!0},r);let d;try{d=await(e.fetch||fetch)(t,{method:n,headers:a,body:m,signal:h.signal})}catch(w){throw new q(e,d,w.message,A)}if(clearTimeout(y),d){if(d.ok){const _={...d,data:await d.json()};return u&&f&&(globalThis.__apiCache[f]={timestamp:Date.now(),res:_}),{..._,config:e}}const{status:w}=d;if(o<s&&(w===429||w>=500)){const _=d.headers.get("retry-after");return new Promise((T,j)=>{setTimeout(()=>{g(e,s+1).then(T).catch(j)},_&&parseInt(_,10)||5e3)})}}try{d.data=await d?.json()}catch{}throw new q(e,d)},Pe=(e,s)=>g({...s,endpoint:e}),Ve=(e,s,t)=>g({...t,method:"post",endpoint:e,body:s}),Be=(e,s,t)=>g({...t,method:"put",endpoint:e,body:s}),De=(e,s,t)=>g({...t,method:"patch",endpoint:e,body:s}),Z=(e,s)=>g({...s,method:"delete",endpoint:e});g.get=Pe;g.post=Ve;g.put=Be;g.patch=De;g.del=Z;g.delete=Z;const je=(e,s,t=localStorage)=>{let a;const n=t.getItem(e);if(n)try{a=JSON.parse(n)}catch{a=null,t.removeItem(e)}const r=ue(a||s);return C(r,()=>{t.setItem(e,JSON.stringify(r))}),r},ee="SESSION",R={customer:{display_name:"",main_email:""},auth:null},b=je(ee,R),Y=v(()=>{const{auth:e}=b;return e&&new Date(e.expires).getTime()-Date.now()>1e3*10}),te=v(()=>b.customer),F=v(()=>ve(te.value)),G=v({get(){return te.value.main_email},set(e){b.customer.main_email=e}});let O;const Me=v(()=>Y.value||!!O?.currentUser?.emailVerified),ae=()=>{b.auth=R.auth,b.customer=R.customer,localStorage.removeItem(ee),O.signOut()},se=async()=>{const e=await O.currentUser.getIdToken(),{domain:s}=window.storefront.settings;try{const t=await fetch(`https://${s}/api/passport/token`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`}});b.auth=await t.json()}catch(t){console.error(t)}},ze=async()=>(Y.value||await se(),b.auth.access_token),He=async()=>{const e=await ze(),{data:s}=await g.get(`customers/${b.auth.customer_id}`,{accessToken:e});return b.customer=s,s};let W=!1;const Re=(e=!window.location.pathname.startsWith("/app/"))=>{if(W)return;W=!0;const s=()=>ge(()=>import("./firebase-app.7ce2ebb1.js"),[]).then(({getAuth:t,onAuthStateChanged:a,isSignInWithEmailLink:n,signInWithEmailLink:r})=>{if(O=t(),a(O,async o=>{if(o){if(o.displayName&&!F.value&&(b.customer.display_name=o.displayName),o.email&&(!G.value||o.emailVerified)&&(b.customer.main_email=o.email),o.emailVerified){const i=o.email!==G.value;(i||!Y.value)&&(await se(),(i||!F.value)&&await He())}}else ae()}),n(O,window.location.href)){const i=new URLSearchParams(window.location.search).get("email");i&&r(O,i,window.location.href).then(()=>window.localStorage.removeItem("emailForSignIn")).catch(console.error)}}).catch(console.error);e?ye(s):s()},{settings:X,context:Lt}=globalThis.storefront,Fe=["whatsapp","instagram","facebook","twitter","youtube","tiktok","pinterest"],J={};Fe.forEach(e=>{X[e]&&(J[e]=X[e])});let D;D=navigator.userAgent,document.body?document.body.offsetWidth:window.screen.width;D.includes("Safari")&&D.includes("Chrome");const Ue=/iPad|iPhone|iPod/.test(D)&&!window.MSStream,Ye=Ue||/Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(D),Je=L({__name:"SocialNetworkIcon",props:{as:{default:"i"},network:null},setup(e,{expose:s}){s();const t=e,a=v(()=>{switch(t.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";default:return""}}),n={props:t,iconClassName:a};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}});function Ke(e,s,t,a,n,r){return c(),$(de(t.as),{class:x(a.iconClassName)},null,8,["class"])}const qe=P(Je,[["render",Ke]]),Ge=L({__name:"SocialNetworkLink",props:{network:null,href:null,message:null},setup(e,{expose:s}){s();const t=e,a=v(()=>{let r=t.href||J[t.network];if(t.network==="whatsapp"){const o=r.replace(/[^+\d]/g,"");r=`https://${Ye?"api":"web"}.whatsapp.com/send?phone=`+encodeURIComponent(o.charAt(0)==="+"?o:`+55${o}`),t.message&&(r+=`&text=${encodeURIComponent(t.message)}`)}return r}),n={props:t,fixedHref:a,SocialNetworkIcon:qe};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}});function We(e,s,t,a,n,r){const o=U("ALink");return c(),$(o,{href:a.fixedHref},{default:M(()=>[V(e.$slots,"default",{},()=>[B(a.SocialNetworkIcon,{network:t.network},null,8,["network"]),V(e.$slots,"append")])]),_:3},8,["href"])}const Xe=P(Ge,[["render",We]]),Qe=L({__name:"ShopSidenavCategory",props:{categoryTree:null},setup(e,{expose:s}){s();const t=k(!1),a=k(!0);C(t,r=>{r?setTimeout(()=>{a.value=!1},25):a.value=!0});const n={isOpen:t,isFaded:a};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}}),Ze={class:"text-lg text-base-800"},et=["src"],tt=["href"],at=["href"],st=["src"],ot={class:"inline"};function nt(e,s,t,a,n,r){const o=U("ShopSidenavCategory",!0);return c(),p("li",Ze,[t.categoryTree.subcategories.length?(c(),p("details",{key:0,class:"bg-white overflow-y-auto overflow-x-hidden z-10 open:absolute open:top-0 open:left-0 open:w-full open:h-full",onToggle:s[0]||(s[0]=i=>a.isOpen=!a.isOpen)},[l("summary",{class:x(["cursor-pointer list-none px-6 py-3 active:bg-base-100 transition-colors",a.isOpen?"bg-base-100":null])},[l("i",{class:x(a.isOpen?"i-arrow-left text-lg":"i-arrow-right float-right mb-0 mt-1 text-xl text-base-500")},null,2),!a.isOpen&&t.categoryTree.icon?(c(),p("img",{key:0,loading:"lazy",src:t.categoryTree.icon.url,class:"w-auto h-5 inline mr-3"},null,8,et)):I("",!0),l("h3",{class:x(["inline",a.isOpen?"ml-4 text-base":null])},E(t.categoryTree.name),3)],2),l("ul",{class:x(["mt-2 transition-opacity",a.isFaded?"opacity-20":"opacity-100"]),tabindex:"-1"},[(c(!0),p(z,null,H(t.categoryTree.subcategories,i=>(c(),$(o,{key:i._id,"category-tree":i},null,8,["category-tree"]))),128)),l("li",null,[l("a",{href:`/${t.categoryTree.slug}`,class:"block px-6 py-3 text-base underline active:bg-base-200"},E("Ver toda a categoria $1".replace("$1",t.categoryTree.name)),9,tt)])],2)],32)):(c(),p("a",{key:1,href:`/${t.categoryTree.slug}`,class:"block px-6 py-3 active:bg-base-200"},[!a.isOpen&&t.categoryTree.icon?(c(),p("img",{key:0,loading:"lazy",src:t.categoryTree.icon.url,class:"w-auto h-5 inline mr-3"},null,8,st)):I("",!0),l("h3",ot,E(t.categoryTree.name),1)],8,at))])}const rt=P(Qe,[["render",nt]]),it=L({__name:"ShopSidenav",props:{categoryTrees:null},setup(e,{expose:s}){s(),Q(()=>Re());const t={get customerName(){return F},get isLogged(){return Me},get logout(){return ae},get socialNetworks(){return J},SocialNetworkLink:Xe,ShopSidenavCategory:rt};return Object.defineProperty(t,"__isScriptSetup",{enumerable:!1,value:!0}),t}}),lt={class:"flex flex-col h-full"},ct={class:"py-4 grow"},ut={class:"relative h-full"},dt={class:"text-base"},mt={class:"flex items-center px-2 py-4 bg-base-100"},ht={href:"/app/account",class:"p-2 grow flex items-center gap-3"},pt=l("i",{class:"i-account text-4xl text-base-500 m-0"},null,-1),ft={class:"leading-tight"},_t=l("small",{class:"block lowercase font-semibold text-primary"},E("Meus pedidos")+", "+E("Minha conta"),-1),gt=l("span",{class:"text-base-600"},E("Sair"),-1),yt=l("i",{class:"i-logout text-lg ml-1"},null,-1),wt=[gt,yt],vt={class:"flex gap-3 p-4 bg-base-200 text-xl text-base-700"};function bt(e,s,t,a,n,r){return c(),p("aside",lt,[l("nav",ct,[l("ul",ut,[(c(!0),p(z,null,H(t.categoryTrees,o=>(c(),$(a.ShopSidenavCategory,{key:o._id,"category-tree":o},null,8,["category-tree"]))),128))])]),l("footer",dt,[l("div",mt,[l("a",ht,[pt,l("span",ft,[me(E(`Olá ${a.customerName||"Visitante"}`)+" ",1),_t])]),a.isLogged?(c(),p("button",{key:0,onClick:s[0]||(s[0]=(...o)=>a.logout&&a.logout(...o)),class:"p-2 text-right text-base-800"},wt)):I("",!0)]),l("ul",vt,[(c(!0),p(z,null,H(a.socialNetworks,(o,i)=>(c(),p("li",{key:i},[B(a.SocialNetworkLink,{network:i,class:"p-1 active:text-primary"},null,8,["network"])]))),128))])])])}const St=P(it,[["render",bt]]),kt=L({__name:"ShopHeader",props:{categories:null},setup(e,{expose:s}){s();const t=e,a=k(null),{isSticky:n,positionY:r,categoryTrees:o,isSidenavOpen:i}=xe({...t,header:a}),u={props:t,header:a,isSticky:n,positionY:r,categoryTrees:o,isSidenavOpen:i,Drawer:$e,ShopSidenav:St};return Object.defineProperty(u,"__isScriptSetup",{enumerable:!1,value:!0}),u}}),xt={class:"container lg:max-w-7xl mx-auto px-1 lg:pl-3 grid grid-flow-col grid-cols-3 justify-between items-center md:grid-cols-none md:auto-cols-max"},Tt={class:"md:hidden"},Ct=pe('<nav class="hidden md:block"></nav><div class="px-2 flex justify-end items-center gap-3 lg:gap-4 text-base-800"><button aria-label="Buscar produtos"><i class="i-search w-7 h-7 hover:text-primary hover:scale-110 active:scale-125"></i></button><button class="hidden sm:block" aria-label="Minha conta"><i class="i-account w-7 h-7 hover:text-primary hover:scale-110 active:scale-125"></i></button><button aria-label="Abrir carrinho"><i class="i-shopping-cart w-7 h-7 hover:text-primary hover:scale-110 active:scale-125"></i></button></div>',2);function Ot(e,s,t,a,n,r){return c(),p("header",{ref:"header",class:x(["top-0 z-50 transition-colors",[a.isSticky&&!a.isSidenavOpen?"bg-white/80":"bg-white",a.isSticky?"backdrop-blur-md shadow py-2 md:py-3":"py-3 sm:py-4 md:py-5"]])},[l("div",xt,[l("div",Tt,[l("button",{class:"px-2 my-1","aria-label":"Abrir/fechar menu",onClick:s[0]||(s[0]=o=>a.isSidenavOpen=!a.isSidenavOpen)},[l("i",{class:x(["text-base-500 text-3xl",a.isSidenavOpen?"i-close":"i-menu"])},null,2)])]),V(e.$slots,"logo"),Ct]),B(a.Drawer,{modelValue:a.isSidenavOpen,"onUpdate:modelValue":s[1]||(s[1]=o=>a.isSidenavOpen=o),"has-close-button":!1,position:"absolute",class:"mt-3 -z-1",style:he({height:`calc(100vh - ${a.positionY}px + .5rem)`})},{default:M(()=>[B(a.ShopSidenav,fe({class:"bg-white pt-6"},{categoryTrees:a.categoryTrees}),null,16)]),_:1},8,["modelValue","style"])],2)}const Pt=P(kt,[["render",Ot]]);export{Pt as default};