PageSourceSearch

https://verezza.vercel.app/assets/layout-QJnO1Ktw.js

js verezza.vercel.app collected 2026-10-03 07:59:35 UTC 17,691 bytes, 1 lines download raw bytes

1import{r as a,u as J,j as e}from"./components-CPfWjrLL.js";import{c as K,e as Se,u as Z,f as Q,s as Y,g as Ne,i as Ce,h as ye}from"./ProductCarousel-Fhkt0BYI.js";import{u as X}from"./ProductContext-C0P-vhFw.js";import{u as ee}from"./Cart-CtXZQpe9.js";import{u as M}from"./useTranslation-aKUY2yzC.js";import{M as ve}from"./ModalCart-CZzxrM03.js";import{u as Ie}from"./authStatus-XBfBDUX3.js";function Le({isOpen:m,onClose:p}){const{t:o}=M(),[n,S]=a.useState("COP"),{cartItems:d,setCartItems:F,webUrl:N,updateCart:$,subtotal:E}=ee(),{products:w}=X(),b=J();a.useEffect(()=>{const c=localStorage.getItem("selectedCurrencySymbol");c&&S(c)},[]);const f=b.state==="submitting",i=async(c,r)=>{try{const l=new FormData;l.append("lineItemId",c),l.append("quantity",r.toString()),b.submit(l,{method:"POST",action:"/api/cart/updateCartItem"})}catch(l){console.error("Error al actualizar la cantidad del artículo en el carrito:",l)}},u=c=>{try{const r=new FormData;r.append("lineItemId",c),b.submit(r,{method:"POST",action:"/api/cart/removeCartItem"});const l=d.filter(x=>x.id!==c);F(l),$(),window.dispatchEvent(new Event("cartUpdated"))}catch(r){console.error("Error al eliminar el artículo del carrito:",r)}},D=()=>{N&&(window.location.href=N)},C=c=>w.find(r=>r.id===c);return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`overlay-bag ${m?"open":""}`,onClick:p}),e.jsx("div",{className:`BagContainer ${m?"open":""}`,children:e.jsxs("div",{className:"BagWrapper",children:[e.jsxs("div",{className:"BagHeader",children:[e.jsx("h2",{className:"BagTitle title-primary",children:o("bag.title")}),e.jsx("button",{className:"BagClose",title:"Close",onClick:p,children:K()})]}),e.jsx("div",{className:"BagContent",children:d&&d.length>0?d.map(c=>{var l,x,h,j;const r=C(c.productId);return r?e.jsxs("div",{className:"bagItem",children:[e.jsx("picture",{className:"bagItemImage",children:e.jsx("img",{src:(j=(h=(x=(l=r.images)==null?void 0:l.edges)==null?void 0:x[0])==null?void 0:h.node)==null?void 0:j.url,alt:r.title})}),e.jsxs("div",{className:"itemDetails",children:[e.jsx("a",{href:`/products/${r.handle}`,children:r.title}),e.jsx("section",{"aria-label":"price",className:"bagPriceIrem",children:e.jsx("div",{className:"priceWrapper",children:e.jsx("p",{className:"productPrice",children:f?e.jsx("span",{children:"0"}):e.jsxs(e.Fragment,{children:[r.variants.nodes[0].compareAtPrice&&e.jsx("span",{className:"ProductPriceDiscount",children:parseFloat(r.variants.nodes[0].compareAtPrice.amount).toLocaleString(n==="USD"?"en-US":n==="COP"?"es-CO":"es-ES",{style:"currency",currency:r.variants.nodes[0].compareAtPrice.currencyCode,minimumFractionDigits:0})}),e.jsx("span",{children:parseFloat(r.priceRange.minVariantPrice.amount).toLocaleString(n==="USD"?"en-US":n==="COP"?"es-CO":"es-ES",{style:"currency",currency:r.priceRange.minVariantPrice.currencyCode,minimumFractionDigits:0})})]})})})}),e.jsx("div",{className:"itemVariants",children:e.jsxs("p",{children:[o("bag.size_title"),": ",c.title]})}),e.jsxs("div",{className:"itemQuantity",children:[e.jsx("button",{className:"quantity-button btn-primary",onClick:()=>i(c.id,c.quantity-1),disabled:f,children:e.jsx("span",{children:"-"})}),e.jsx("span",{children:c.quantity}),e.jsx("button",{className:"quantity-button btn-primary",onClick:()=>i(c.id,c.quantity+1),disabled:f,children:e.jsx("span",{children:"+"})})]})]}),e.jsx("button",{className:"removeItem btn-primary",onClick:()=>u(c.id),disabled:f,children:Se()})]},c.id):null}):e.jsx("div",{className:"bagEmpty",children:e.jsx("p",{children:o("bag.bag_empty")})})}),d&&d.length>0&&e.jsx("footer",{className:"BagFooter",children:e.jsxs("div",{className:"BagFooterWrapper",children:[e.jsxs("p",{children:[e.jsx("span",{children:o("bag.subtotal")}),f?e.jsx("span",{children:"0"}):e.jsx("span",{children:d.reduce((c,r)=>{var x;const l=((x=C(r.productId))==null?void 0:x.priceRange.minVariantPrice.amount)||r.price.amount;return c+r.quantity*parseFloat(l)},0).toLocaleString(n==="USD"?"en-US":n==="COP"?"es-CO":"es-ES",{style:"currency",currency:n,minimumFractionDigits:0})})]}),e.jsx("button",{className:"btn-secondary",onClick:D,children:o("bag.buy_now")})]})})]})})]})}const G=({isDropdownOpen:m})=>{const p=Ie(),o=J(),n=o.state==="submitting",S=()=>{o.submit(null,{method:"post",action:"/api/logOutCustomer",encType:"application/json"})};return m?e.jsx("div",{className:"customerDropdownContainer",children:p?e.jsxs("ul",{className:"customerDropdownContent",children:[e.jsx("li",{className:"customerDropdownItem",children:e.jsx("a",{href:"/account/orders",children:e.jsx("span",{children:"MIS PEDIDOS"})})}),e.jsx("li",{className:"customerDropdownItem",children:e.jsx("button",{className:"customerDropdownLogout",onClick:S,disabled:n,children:e.jsx("span",{children:"CERRAR SESIÓN"})})})]}):e.jsxs("ul",{className:"customerDropdownContent",children:[e.jsx("li",{className:"customerDropdownItem",children:e.jsx("a",{href:"/account/auth/login",children:e.jsx("span",{children:"INICIAR SESIÓN"})})}),e.jsx("li",{className:"customerDropdownItem",children:e.jsx("a",{href:"/account/auth/register",children:e.jsx("span",{children:"REGISTRARSE"})})})]})}):e.jsx(e.Fragment,{})};function Pe(){const{updateCart:m,getTotalQuantity:p}
1=ee(),[o,n]=a.useState(!1),[S,d]=a.useState(!1),[F,N]=a.useState(""),[$,E]=a.useState([]),{products:w}=X(),[b,f]=a.useState(!1),[i,u]=a.useState("COP"),[D,C]=a.useState(!1),[c,r]=a.useState(null),[l,x]=a.useState(""),[h,j]=a.useState(""),[U,R]=a.useState(""),[se,ae]=a.useState(0),[re,te]=a.useState(0),[ce,ne]=a.useState([]),[le,ie]=a.useState(""),[oe,de]=a.useState([]),[ue,he]=a.useState(""),[T,me]=a.useState(!1);a.useEffect(()=>(window.addEventListener("cartUpdated",m),()=>{window.removeEventListener("cartUpdated",m)}),[m]);const{t:s}=M(),pe=()=>{n(!o)},A=()=>{n(!1)},H=()=>{d(!S),N("")},W=()=>{d(!1),N("")};a.useEffect(()=>{const t=()=>{W()};return window.addEventListener("scroll",t),()=>{window.removeEventListener("scroll",t)}},[]);const je=t=>{const y=t.target.value.toLowerCase();N(y);const v=y.split(" ").filter(g=>g.length>0),I=w.filter(g=>{var O,B;if(!g)return!1;const L=((O=g.title)==null?void 0:O.toLowerCase())||"",P=((B=g.productType)==null?void 0:B.toLowerCase())||"",k=`${L} ${P}`;return v.every(_=>k.includes(_))});E(I)},q=()=>{f(!b)},xe=()=>{f(!1)},ge=t=>{var y,v,I,g,L,P,k,O,B,_,V;C(!0),r(t.title),x(t.id),j(t.title),R(t.productType||"Sin categoría"),ae(((g=(I=(v=(y=t.variants)==null?void 0:y.nodes)==null?void 0:v[0])==null?void 0:I.price)==null?void 0:g.amount)||0),te(((O=(k=(P=(L=t.variants)==null?void 0:L.nodes)==null?void 0:P[0])==null?void 0:k.compareAtPrice)==null?void 0:O.amount)||null),ne(((B=t.variants)==null?void 0:B.nodes)||[]),ie(t.description||""),de(((V=(_=t.images)==null?void 0:_.edges)==null?void 0:V.map(({node:fe})=>fe))||[]),he(t.handle||"")},be=()=>{C(!1)};a.useEffect(()=>{let t=localStorage.getItem("selectedCurrencySymbol");t&&u(t)},[]);const z=()=>{me(!T)};return e.jsxs("header",{className:"navbar",children:[e.jsx("nav",{className:"NavBarContainer",children:e.jsxs("div",{className:"NavBar1",children:[e.jsx("h1",{className:"title-primary",children:e.jsx("a",{href:"/",children:"VEREZZA"})}),e.jsx("div",{className:"NavBar1-2",children:e.jsxs("ul",{className:"NavbarListWrapper",children:[e.jsx("li",{children:e.jsx("a",{href:"/products",children:s("navbar.shop")})}),e.jsx("li",{children:e.jsx("a",{href:`/products?category=${s("products.blouses")}`,children:s("navbar.blouses")})}),e.jsx("li",{children:e.jsx("a",{href:`/products?category=${s("products.dresses")}`,children:s("navbar.dresses")})}),e.jsx("li",{children:e.jsx("a",{href:`/products?category=${s("products.sets")}`,children:s("navbar.sets")})}),e.jsx("li",{children:e.jsx("a",{href:`/products?category=${s("products.complements")}`,children:s("navbar.complements")})}),e.jsx("li",{children:e.jsx("a",{href:"/atelier",children:s("navbar.atelier")})}),e.jsx("li",{children:e.jsx("a",{href:"/our-brand",className:"strongLink",children:s("navbar.our_brand")})})]})}),e.jsxs("div",{className:"NavBar1-3",children:[e.jsxs("div",{className:"CustomerContainer",children:[e.jsx("button",{className:"accoutHeader","aria-label":"Usuario",onClick:z,children:Z()}),e.jsx(G,{isDropdownOpen:T})]}),e.jsxs("button",{className:"CartHeader","aria-label":"Bolsa de compras",onClick:q,children:[Q(),p()>0&&e.jsx("span",{className:"cart-count",children:p()})]}),e.jsx("button",{className:"BTNSearch","aria-label":"Buscar",onClick:H,children:Y()}),e.jsxs("button",{className:"hamburgerMenu",onClick:pe,"aria-label":"Menu",children:[e.jsx("span",{className:"bar bar1"}),e.jsx("span",{className:"bar bar2"}),e.jsx("span",{className:"bar bar3"})]})]})]})}),e.jsx("div",{className:`overlay-sidebar ${o?"open":""}`,onClick:A}),e.jsx("div",{className:`sidebar ${o?"open":""}`,children:e.jsxs("div",{className:"sidebarWrapper",children:[e.jsxs("div",{className:"sidebarHeader",children:[e.jsx("a",{className:"title-primary",href:"/",children:"VEREZZA"}),e.jsx("button",{className:"closeSidebar",onClick:A,"aria-label":"Cerrar menu",children:K()})]}),e.jsxs("div",{className:"sidebarContent",children:[e.jsxs("div",{className:"sidebarBody",children:[e.jsx("span",{children:s("sidebar.sidebar_title")}),e.jsxs("ul",{className:"sidebarList",children:[e.jsx("li",{children:e.jsx("a",{href:"/products",children:s("sidebar.shop")})}),e.jsx("li",{children:e.jsx("a",{href:`/products?category=${s("products.blouses")}`,children:s("sidebar.blouses")})}),e.jsx("li",{children:e.jsx("a",{href:`/products?category=${s("products.jackets")}`,children:s("sidebar.jackets")})}),e.jsx("li",{children:e.jsx("a",{href:`/products?category=${s("products.pants")}`,children:s("sidebar.pants")})}),e.jsx("li",{children:e.jsx("a",{href:`/products?category=${s("products.dresses")}`,children:s("sidebar.dresses")})}),e.jsx("li",{children:e.jsx("a",{href:`/products?category=${s("products.sets")}`,children:s("sidebar.sets")})}),e.jsx("li",{children:e.jsx("a",{href:`/products?category=${s("products.skirts")}`,children:s("sidebar.skirts")})}),e.jsx("li",{children:e.jsx("a",{href:`/products?category=${s("products.complements")}`,children:s("sidebar.complements")})}),e.jsx("li",{children:e.jsx("a",{href:"/atelier",children:s("sidebar.atelier")})}),e.jsx("li",{children:e.jsx("a",{href:"/our-brand",className:"strongLink",children:s("sidebar.our_brand")})})]})]}),e.jsxs("div",{className:"sidebarBody",children:[e.jsx("span",{children:s("sidebar.user")}),e.jsxs("ul",{className:"sidebarList sidebarListOthers",children:[e.jsx("li",{children:e.jsxs("a",{href:"/account/auth/login",children:[e.jsx("strong",{children:s("sidebar.login")})," / ",e.jsx("strong",{children:s("sidebar.create_account")}
1)]})}),e.jsx("li",{children:e.jsx("a",{href:"/terms-of-use",children:s("sidebar.terms_of_use")})}),e.jsx("li",{children:e.jsx("a",{href:"/returns-refunds",children:s("sidebar.returns")})})]})]})]})]})}),e.jsx("div",{className:"NavBarMobileContainer",children:e.jsxs("ul",{className:"NavBarMobileList",children:[e.jsx("li",{children:e.jsxs("button",{className:"CartHeader","aria-label":"Bolsa de compras",onClick:q,children:[Q(),p()>0&&e.jsx("span",{className:"cart-count",children:p()})]})}),e.jsxs("li",{className:"NavBarMobileItem dropdown",children:[e.jsx("button",{"aria-label":"Usuario",onClick:z,children:Z()}),e.jsx(G,{isDropdownOpen:T})]}),e.jsx("li",{children:e.jsx("button",{onClick:H,"aria-label":"Buscar",children:Y()})})]})}),e.jsx("div",{className:`searchOverlay ${S?"open":""}`,onClick:W}),e.jsxs("div",{className:`SearhContainer ${S?"open":""}`,children:[e.jsx("input",{className:"SearchInput",id:"SearchInput",type:"search",placeholder:s("navbar.navbar_search.placeholder"),value:F,onChange:je}),F&&e.jsx("ul",{className:"SearchResults",children:$.map((t,y)=>{var v,I,g,L,P,k;return e.jsxs("li",{className:"searhResultWrapper",onClick:()=>ge(t),children:[e.jsx("picture",{className:"ResultImg",children:e.jsx("img",{src:(g=(I=(v=t.images)==null?void 0:v.edges[0])==null?void 0:I.node)==null?void 0:g.url,alt:t.title,width:50,height:50,loading:"lazy",decoding:"async"})}),e.jsxs("div",{className:"resultDetails",children:[e.jsx("span",{children:t.title}),e.jsxs("p",{children:[t.variants.nodes[0].compareAtPrice&&e.jsxs("span",{className:"ProductPriceDiscount",children:[parseFloat(t.variants.nodes[0].compareAtPrice.amount).toLocaleString(i==="USD"?"en-US":i==="COP"?"es-CO":"es-ES",{style:"currency",currency:i,minimumFractionDigits:0})," ",i]}),e.jsxs("span",{children:[parseFloat((k=(P=(L=t.variants)==null?void 0:L.nodes)==null?void 0:P[0])==null?void 0:k.price.amount).toLocaleString(i==="USD"?"en-US":i==="COP"?"es-CO":"es-ES",{style:"currency",currency:i,minimumFractionDigits:0})," ",i]})]})]})]},`${t.id}-${y}`)})})]}),e.jsx(Le,{isOpen:b,onClose:xe}
1),D&&e.jsx(ve,{isOpen:D,onClose:be,selectedProduct:c,productId:l,productName:h,productCategory:U,productPrice:se,productDiscountPrice:re,productSizes:ce,productDescription:le,productImages:oe,productHandle:ue})]})}function ke(){const[m,p]=a.useState(!1),[o,n]=a.useState(""),[S,d]=a.useState(""),[F,N]=a.useState(!1),[$,E]=a.useState(""),[w,b]=a.useState(!1),[f,i]=a.useState(""),{t:u,i18n:D}=M(),C=new Date().getFullYear();a.useEffect(()=>{n(localStorage.getItem("selectedCurrency")||""),d(localStorage.getItem("selectedCurrencySymbol")||""),E(localStorage.getItem("selectedLocation")||""),i(localStorage.getItem("selectedLanguage")||"")},[]);const c=()=>{p(!m),N(!1),b(!1)},r=(h,j)=>{n(h),d(j),p(!1),localStorage.setItem("selectedCurrency",h),localStorage.setItem("selectedCurrencySymbol",j),window.location.reload()};a.useEffect(()=>{if(typeof window<"u"){const h=localStorage.getItem("selectedCurrencySymbol"),j=localStorage.getItem("selectedCurrency"),U=localStorage.getItem("selectedLanguage");h&&j&&U&&(d(h),n(j),i(U));const R=localStorage.getItem("selectedLocation");R&&E(R)}},[]);const l=()=>{b(!w),N(!1),p(!1)},x=h=>{i(h),b(!1),localStorage.setItem("selectedLanguage",h);const j=h==="Español"?"es":"en";D.changeLanguage(j),document.documentElement.lang=j,window.location.href=window.location.pathname};return e.jsx("footer",{className:"Footer",children:e.jsxs("div",{className:"FooterContainer",children:[e.jsxs("div",{className:"FooterHeader",children:[e.jsxs("div",{className:"footerSelectorWrapper",children:[e.jsxs("div",{className:"FooterSelector CurrencySelector",children:[e.jsx("h3",{children:u("footer.currency.title")}),e.jsxs("div",{className:`customSelect ${m?"open":""}`,children:[e.jsx("div",{className:"selectHeader",onClick:c,children:e.jsxs("div",{className:"currencyWrapper",children:[e.jsxs("div",{className:"currencyDetails",children:[e.jsx("span",{children:o||u("footer.currency.placeholder")}),e.jsx("span",{children:S||""})]}),e.jsx("span",{className:"arrow"})]})}),e.jsxs("ul",{className:"optionsList",children:[e.jsxs("li",{className:"option",onClick:()=>r("Pesos Colombianos","COP"),children:[e.jsx("span",{children:"Pesos Colombianos"}),e.jsx("span",{children:"COP"})]}),e.jsxs("li",{className:"option",onClick:()=>r("US Dollars","USD"),children:[e.jsx("span",{children:"US Dollars"}),e.jsx("span",{children:"USD"})]}),e.jsxs("li",{className:"option",onClick:()=>r("Euros","EUR"),children:[e.jsx("span",{children:"Euros"}),e.jsx("span",{children:"EUR"})]})]})]})]}),e.jsxs("div",{className:"FooterSelector LanguajeSelector",children:[e.jsx("h3",{children:u("footer.language.title")}),e.jsxs("div",{className:`customSelect ${w?"open":""}`,children:[e.jsx("div",{className:"selectHeader",onClick:l,children:e.jsxs("div",{className:"currencyWrapper",children:[e.jsx("div",{className:"currencyDetails",children:e.jsx("span",{children:f||u("footer.language.placeholder")})}),e.jsx("span",{className:"arrow"})]})}),e.jsxs("ul",{className:"optionsList",children:[e.jsx("li",{className:"option",onClick:()=>x("Español"),children:e.jsx("span",{children:"Español"})}),e.jsx("li",{className:"option",onClick:()=>x("English"),children:e.jsx("span",{children:"English"})})]})]})]})]}),e.jsxs("div",{className:"FooterInfoWrapper",children:[e.jsxs("div",{className:"FooterInfo",children:[e.jsx("h3",{children:u("footer.info.title")}),e.jsxs("ul",{className:"FooterInfoList",children:[e.jsx("li",{className:"FooterInfoItem",children:e.jsx("a",{href:"/atelier",children:e.jsx("span",{children:u("footer.info.links.atelier")})})}),e.jsx("li",{className:"FooterInfoItem",children:e.jsx("a",{href:"/our-brand",children:e.jsx("span",{children:u("footer.info.links.our_brand")})})}),e.jsx("li",{className:"FooterInfoItem",children:e.jsx("a",{href:"/terms-of-use",children:e.jsx("span",{children:u("footer.info.links.terms_of_use")})})}),e.jsx("li",{className:"FooterInfoItem",children:e.jsx("a",{href:"/returns-refunds",children:e.jsx("span",{children:u("footer.info.links.returns")})})})]})]}),e.jsxs("div",{className:"FooterSocial",children:[e.jsx("h3",{children:u("footer.social.follow_us")}),e.jsxs("ul",{className:"FooterSocialList",children:[e.jsx("li",{className:"FooterSocialItem",children:e.jsx("a",{href:"",target:"_blank","aria-label":"Facebook",children:Ne()})}),e.jsx("li",{className:"FooterSocialItem",children:e.jsx("a",{href:"",target:"_blank","aria-label":"Instagram",children:Ce()})}),e.jsx("li",{className:"FooterSocialItem",children:e.jsx("a",{href:"",target:"_blank","aria-label":"TikTok",children:ye()})})]})]})]})]}),e.jsx("div",{className:"FooterBottom",children:e.jsx("a",{className:"title-primary",href:"https://kevinjp.dev",target:"_blank",children:e.jsxs("span",{children:["© ",C," Verezza - Developed by KevinJp"]})})})]})})}const Ue=({children:m})=>e.jsxs(e.Fragment,{children:[e.jsx(Pe,{}),e.jsx("main",{className:"ContainerMain",children:m}),e.jsx(ke,{})]});
1export{Ue as L};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.