@soma-vertical-web/multi-lib 1.0.17 → 1.0.18

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.
package/index.js CHANGED
@@ -1,21 +1,21 @@
1
- "use strict";var hm=Object.defineProperty;var _m=(e,t,n)=>t in e?hm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var cn=(e,t,n)=>_m(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),g=require("react"),T=require("./index-4tOP7lCS.js"),et=require("idb-keyval"),Ct=require("zustand"),Wr=require("js-cookie"),d=require("@soma-vertical-web/core-components"),yt=require("axios"),Gr=require("@date-fns/tz"),gm=require("jose"),Tt=require("@soma-vertical-web/foundations"),ps=require("react-dom"),Ze=require("draft-js"),xa=require("react-intersection-observer"),fs=g.createContext({}),ym=({data:e,children:t})=>r.jsx(fs.Provider,{value:{tags:e==null?void 0:e.config},children:t}),ht=()=>{const{tags:e}=g.useContext(fs),t=g.useCallback(n=>{var c,l,u,m;const s=(l=(c=e==null?void 0:e.commercial)==null?void 0:c.items)==null?void 0:l.find(f=>{var p;return(p=n??[])==null?void 0:p.find(h=>h.id===f.key)}),o=(m=(u=e==null?void 0:e.institucional)==null?void 0:u.items)==null?void 0:m.find(f=>{var p;return(p=n??[])==null?void 0:p.find(h=>h.id===f.key)}),a=e==null?void 0:e.flagPdp,i=(n==null?void 0:n.find(f=>{var p;return f.id===((p=e==null?void 0:e.flagGoldenPdp)==null?void 0:p.key)}))&&(e==null?void 0:e.flagGoldenPdp);return{commercial:s,institucional:o,flagPdp:a,flagGoldenPdp:i}},[e]);return{tags:e,getAvailableProductTag:t}},va=({gridScrollBack:e})=>{g.useEffect(()=>{typeof window<"u"&&(e!=null&&e.refer)&&sessionStorage.setItem(e==null?void 0:e.refer,"true")},[])},ba=g.createContext({}),xm=({children:e,gridScrollBack:t})=>{const n=g.useRef(null);return va({gridScrollBack:t}),r.jsx(ba.Provider,{value:{sizesContainerRef:n},children:e})},ja=()=>{const e=g.useContext(ba);if(e===void 0)throw new Error("useContext(PDPContext) must be used within a PDPProvider");return e},ut=({event:e,data:t})=>{const n=(window==null?void 0:window.dataLayer)||[];t.ecommerce&&n.push({ecommerce:null}),n.push({...e&&{event:`custom_${e}`},...t})},Ce={configs:{PLP_FILTERS:[{key:"",label:"",eventLabel:"",order:0}],currency:"BRL",categoryOff:"bazar",storeUrl:"https://www.example.com",MAIN_IMAGE:"1",NAME_SPLIT_SYMBOL:"-",VENDOR_CODE:""},productEvents:(e,t)=>{const{event:n,commonData:s,customData:o,promotionInfo:a,itemList:i,outsideEcommerceData:c}=e,{availableSizes:l,sizes:u,price:m}=s,f={...n==="view_item"?{currency:Ce.configs.currency,value:m,grade_disponivel:l??(u?Ca(u):"")}:{},...n==="add_to_wishlist"||n==="remove_from_wishlist"?{value:m,currency:Ce.configs.currency}:{}},p=ln({data:s,customData:{...o,...i,...a},configs:Ce.configs});ut({event:n,data:{...c,ecommerce:{...i,...f,items:[p]}}}),typeof t=="function"&&t(p,f)},productListEvent:e=>{const{commonData:{products:t},promotionInfo:n,itemList:s,outsideEcommerceData:o,customData:a}=e;if(t.length===0)return;const i=t.map(({node:c},l)=>ln({data:{...c},customData:{...n,index:l,...a!=null&&a.item_list_name?{item_list_name:a==null?void 0:a.item_list_name}:s},configs:Ce.configs}));ut({event:"view_item_list",data:{...o,ecommerce:{...a!=null&&a.item_list_name?{item_list_name:a==null?void 0:a.item_list_name}:s,items:i}}})},skuEvents:e=>{const{event:t,commonData:{products:n},customData:s,supportData:{selectedSkus:o,price:a},promotionInfo:i,itemList:c,outsideEcommerceData:l}=e;let u=0;const m=n.map(f=>{var y,x,b,C,j,v,P,S,E;const p=o==null?void 0:o.find(I=>(f.productId??f.id)===I.productId);let h={...i,...c};if(p){const I=Ea(),A=Pa(I,p);A&&(h={...h,...A}),t==="add_to_cart"&&(i||c)&&Kr({persistedData:I,type:"add",sku:(p==null?void 0:p.id)??(p==null?void 0:p.sku),newData:{promotionInfo:i,itemList:c}}),t==="remove_from_cart"&&Kr({persistedData:I,type:"remove",sku:(p==null?void 0:p.id)??(p==null?void 0:p.sku)})}u+=f.price??((b=(x=(y=p==null?void 0:p.offers)==null?void 0:y.offers)==null?void 0:x[0])==null?void 0:b.price)??0;const _=(p==null?void 0:p.size)??T.getColorAndSizeFromSkuName((p==null?void 0:p.skuName)??(p==null?void 0:p.name)??((C=f.itemOffered)==null?void 0:C.skuName),Ce.configs.NAME_SPLIT_SYMBOL).size;return ln({data:f,customData:{...s,...h??{...i,...c},item_sku:(p==null?void 0:p.id)??(p==null?void 0:p.sku)??((j=f.itemOffered)==null?void 0:j.sku),quantity:(s==null?void 0:s.quantity)??f.quantity??1,item_variant2:_,seller_id:(p==null?void 0:p.sellerId)??(p==null?void 0:p.seller)??((E=(S=(P=(v=p==null?void 0:p.offers)==null?void 0:v.offers)==null?void 0:P[0])==null?void 0:S.seller)==null?void 0:E.identifier)??f.seller},configs:Ce.configs})});ut({event:t,data:{...l,ecommerce:{value:a??u,currency:Ce.configs.currency,items:m}}})},filterEvent:e=>{var i;const{commonData:t,customData:n,outsideEcommerceData:s}=e,o={},a={};Array.isArray(t==null?void 0:t.selectedFacets)&&((i=t==null?void 0:t.selectedFacets)!=null&&i.length)&&((t==null?void 0:t.selectedFacets).forEach(({key:c,value:l})=>{var f;const u=((f=Ce.configs.PLP_FILTERS.find(p=>p.key===c))==null?void 0:f.eventLabel)??c,m=(o==null?void 0:o[u])||[];u==="price_range"&&l.replace(":","-"),o[u]=[...m,l]}),Object.keys(o).forEach(c=>a[c]=o[c].join(", "))),ut({event:"filter",data:{...s,...a,...n}})},viewCartEvent:e=>{var m,f,p,h,_,y,x,b,C,j;const{commonData:t,outsideEcommerceData:n}=e,{cartStore:s}=t;if(!s)return;const o=window.localStorage.getItem("persistedCartEventsData"),a=o?JSON.parse(o):{},i=s.items.map(v=>{const{promotionInfo:P,itemList:S}=a[v.id]??{};return ln({data:{...v,price:v.price/100,listPrice:v.listPrice/100},customData:{...P,...S,item_sku:v.id??v.itemOffered.sku,quantity:v.quantity??1},configs:Ce.configs})}),c=(((m=s.totalizers.find(v=>v.name==="Total dos Itens"))==null?void 0:m.value)??0)/100,l=(((f=s.totalizers.find(v=>v.name==="Total dos Descontos"))==null?void 0:f.value)??0)/100,u=((p=s.marketingData)==null?void 0:p.utmiCampaign)===Ce.configs.VENDOR_CODE?(h=s.marketingData)==null?void 0:h.utmCampaign:(y=String((_=s.openTextField)==null?void 0:_.value))==null?void 0:y.split(" - ")[0];ut({event:"view_cart",data:{...n,ecommerce:{currency:Ce.configs.currency,value:c+l,total_discount:Math.abs(l),cep_preenchido:!!((b=(x=s.shippingData)==null?void 0:x.address)!=null&&b.postalCode),...u?{seller_coupon_name:u}:{},...((C=s.marketingData)==null?void 0:C.coupon)&&{sale_coupon_name:(j=s.marketingData)==null?void 0:j.coupon},subtotal:c,items:i}}})},readyEvents:e=>{const{event:t,readyData:n}=e;ut({event:t,data:{...n}})}},Ca=e=>e.reduce((t,n)=>(n.available&&t.push(n.value),t),[]).toString(),vm=e=>{const t=e.length;return{...e&&e.length>0?{item_category:e[0].includes(Ce.configs.categoryOff)?"Bazar":"Coleção",...e[1]?{item_category2:e[1]}:{},...t>2?{item_category3:e[t-1]}:{}}:{}}},ln=({data:e,customData:t,configs:n})=>({...bm(e,n==null?void 0:n.MAIN_IMAGE),...jm(e),...Cm(e),...Sm(e),...t}),Sa=()=>{var e,t;return document?((t=(e=window.document.head.querySelector('meta[name="category"]'))==null?void 0:e.getAttribute("content"))==null?void 0:t.split("_"))??[]:[]},Ea=()=>{const e=window.localStorage.getItem("persistedCartEventsData");return e?JSON.parse(e):null},Pa=(e,t)=>e==null?void 0:e[t],Kr=({persistedData:e,type:t,sku:n,newData:s})=>{if(!e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({[n]:s}));return}if(e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({...e,[n]:s}));return}e&&t==="remove"&&(delete e[n],window.localStorage.setItem("persistedCartEventsData",JSON.stringify(e)))},bm=(e,t="1")=>{var a,i,c,l,u,m,f,p,h,_,y;const n=e.productReference??e.gtin??e.productRefId,s=e.image??((i=(a=e.items)==null?void 0:a[0])==null?void 0:i.images)??((c=e.itemOffered)==null?void 0:c.image),o=s==null?void 0:s.find(x=>x.alternateName===t||x.imageLabel===t||x.keywords===t);return{item_id:e.productId??((l=e.isVariantOf)==null?void 0:l.productGroupID)??((u=e.isVariationOf)==null?void 0:u.productGroupID)??((f=(m=e.itemOffered)==null?void 0:m.isVariationOf)==null?void 0:f.productGroupID),item_ref:/_\d$/.test(n)?n.slice(0,-2):n,item_name:e.productTitle??e.productName??e.name??T.splitNameAndSizeFromFullName((p=e.itemOffered)==null?void 0:p.name,Ce.configs.NAME_SPLIT_SYMBOL).name,item_brand:((h=e.brand)==null?void 0:h.brandName)??((_=e.brand)==null?void 0:_.name)??e.brand??((y=e.itemOffered)==null?void 0:y.brand.name),item_url:`${Ce.configs.storeUrl}${e.linkText}/p`,item_image:(o==null?void 0:o.url)??(o==null?void 0:o.imageUrl)}},Js=e=>Array.isArray(e)?e.reduce((t,n)=>(n.length>t.length&&(t=n),t),""):e,jm=e=>{var u,m;const{categories:t,categoriesIds:n}=e,s=t??((u=e.itemOffered)==null?void 0:u.categories),o=n??((m=e.itemOffered)==null?void 0:m.categoriesIds),a=Js(s),i=Js(o),c=a.slice(1,-1).split("/"),l=i.slice(1,-1).split("/");return{item_category:c[0].toLowerCase().includes(Ce.configs.categoryOff)?"Bazar":"Coleção",...c[1]&&{item_category2:c[1]},...c.length>2&&{item_category3:c[c.length-1]},item_category_id:l[l.length-1],...l.length>1&&{item_parent_category_id:l[l.length-2]}}},Cm=e=>{var o,a,i,c,l,u;const t=((o=e.itemOffered)==null?void 0:o.skuName)??((c=(i=(a=e.isVariantOf)==null?void 0:a.hasVariant)==null?void 0:i[0])==null?void 0:c.name)??((u=(l=e.items)==null?void 0:l[0])==null?void 0:u.name),{color:n,size:s}=T.getColorAndSizeFromSkuName(t,Ce.configs.NAME_SPLIT_SYMBOL);return{item_variant:n,...e.itemOffered&&{item_variant2:s}}},Sm=e=>{var l,u;const{price:t,listPrice:n,installments:s}=e,o=t??((l=e.offers)==null?void 0:l.lowPrice)??0,a=n??((u=e.offers)==null?void 0:u.highPrice)??0,i=a?a-o:0,c=i%1===0?i:Number(i.toFixed(2));return{...t&&{price:o??a},...a&&{list_price:a,discount:c},...s&&{installments:s==null?void 0:s.count,installment_value:s==null?void 0:s.value},item_currency:Ce.configs.currency}},Na=()=>{const[e,t]=Sa(),[n,s]=e.split("-"),o=n.includes("shop")||n.includes("sale")?n:"";return{page_category:o&&s?s:"",page_departament:o,id:t,name:e}},Em=Object.freeze(Object.defineProperty({__proto__:null,eventsFunctions:Ce,findDataInPersistedData:Pa,getAvailablesSizes:Ca,getCategories:vm,getPageCategoryAndDepartmentFromSlug:Na,getPersistedData:Ea,getProductListInfoFromHead:Sa,pushDatalayer:ut,updatePersistedData:Kr},Symbol.toStringTag,{value:"Module"})),Ia=g.createContext({}),Pm=({children:e,evtFunctionsConfigs:t})=>{const n=g.useRef({}),s=g.useRef(null),o=g.useRef(null),a=g.useRef({}),i=g.useRef({trigger:!1,index:0}),c=({functionKey:m,data:f,callBack:p,timeout:h=100})=>{window.dataLayer||(window.dataLayer=[]),Ce.configs=t;try{typeof Ce[m]=="function"&&setTimeout(()=>{var _;f.promotionInfo=n.current,(_=o.current)!=null&&_.item_list_name&&(f.itemList=o.current),Ce[m](f,p)},h)}catch(_){ut({event:"error_event",data:{error_message:(_==null?void 0:_.message)??_}})}},l=({content:m})=>{c({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:m.replace("::",":")}}})},u=({updatePromotionRef:m,promotion:f,index:p})=>{m&&(n.current={...f}),c({functionKey:"readyEvents",data:{event:"select_promotion",readyData:{ecommerce:{...f,...p!==void 0&&{index:p}}}}})};return r.jsx(Ia.Provider,{value:{sendDataLayerEvent:c,triggerSelectItemEventRef:i,promotionEventRef:n,currentLocalRef:s,itemListRef:o,cartProductsFullDataRef:a,handleSelectContent:l,handleSelectPromotionEvent:u},children:e})},oe=()=>g.useContext(Ia),wa=g.createContext({}),Nm=({children:e,productData:t,isKit:n,PDP_INFO:s,NAME_SPLIT_SYMBOL:o,TEXTURE_IMAGE:a})=>{var M,U;const{sendDataLayerEvent:i,triggerSelectItemEventRef:c}=oe(),{productId:l,productName:u,items:m,items:[{images:f,Videos:p}],description:h,["Composição"]:_="",productReference:y,categories:[x]}=t,{getAvailableProductTag:b}=ht(),C=b(Object.entries(t.clusterHighlights).map(F=>({id:F[0],name:F[1]}))),j=x.slice(1,-1).split("/"),{installments:v,price:P,listPrice:S,sizes:E,allSizesAvailable:I}=T.getSkuInfos({items:m,NAME_SPLIT_SYMBOL:o}),A=T.getThumbImage({images:f,TEXTURE_IMAGE:a}),L=[{label:`${s.product.description}`,value:"description",content:h},{label:`${s.product.materiais}`,value:"composition",content:_}],O=((U=T.getColorAndSizeFromSkuName((M=t.items)==null?void 0:M[0].name,o))==null?void 0:U.color)??t["Cores Filtráveis"][0]??"",D=()=>({commonData:{...t,sizes:E,price:P,listPrice:S,installments:v},customData:{installments:v==null?void 0:v.count,installment_value:Number(v==null?void 0:v.value).toFixed(2)}}),Q=({sku:F,size:Y})=>{const{commonData:G,customData:H}=D();i({functionKey:"productEvents",data:{event:"view_item",commonData:G,customData:{...H,...F&&{item_sku:F},...Y&&{item_variant2:Y}}}})};return g.useEffect(()=>{if(c.current.trigger){const{commonData:F,customData:Y}=D();i({functionKey:"productEvents",data:{event:"select_item",commonData:F,customData:{...Y,index:c.current.index}}}),c.current.trigger=!1}Q({})},[]),r.jsx(wa.Provider,{value:{productData:t,productId:l,productName:u,productReference:y,tag:C,items:m,sizes:E,allSizesAvailable:I,installments:v,price:P,listPrice:S,thumbImage:A,images:f,video:p[0],descriptionContent:L,breadcrumbList:j,isKit:n,colorName:O,handleViewItemEvent:Q},children:e})},Oe=()=>{const e=g.useContext(wa);if(e===void 0)throw new Error("useContext(PDPDataContext) must be used within a PDPDataProvider");return e},Im=()=>{const[e,t]=g.useState(null);return[e,async s=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(s),t(s),!0}catch(o){return console.warn("Copy failed",o),t(null),!1}}]},Ra=()=>{g.useEffect(()=>{const e=t=>{t.preventDefault()};return document.addEventListener("gesturestart",e),document.addEventListener("gesturechange",e),document.addEventListener("dblclick",e),document.addEventListener("wheel",t=>{t.ctrlKey&&e(t)}),()=>{document.removeEventListener("gesturestart",e),document.removeEventListener("gesturechange",e),document.removeEventListener("dblclick",e),document.removeEventListener("wheel",e)}},[])},wm=typeof window>"u",Rm=(e,t)=>{const[n,s]=g.useState(()=>{if(wm)return null;const a=localStorage.getItem(e);return a===null?t:JSON.parse(a||"{}")});return g.useEffect(()=>{const a=i=>{i.storageArea===localStorage&&i.key===e&&s(JSON.parse(i.newValue))};return window.addEventListener("storage",a),()=>{window.removeEventListener("storage",a)}},[e,t]),[n,a=>{s(i=>{const c=typeof a=="function"?a(i):a;return localStorage.setItem(e,JSON.stringify(c)),c})}]};function hs(e,t,n){const[s,o]=g.useState(!1),{threshold:a}=n||{};return g.useEffect(()=>{if(!e.current)return()=>null;let i=null;const c=new IntersectionObserver(([l])=>{if(n!=null&&n.delay){i&&clearTimeout(i),i=setTimeout(()=>{o(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},n.delay);return}o(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},{threshold:a||1});return c.observe(e.current),()=>{c.disconnect()}},[e]),s}const kn=({callback:e,onEnterViewportOnce:t,options:n})=>{const s=g.useRef(null);return g.useEffect(()=>{const o=s.current;if(!o)return;const a=new IntersectionObserver(([i])=>{i.isIntersecting&&typeof e=="function"&&(e(),t&&(a.unobserve(o),a.disconnect()))},n);return a.observe(o),()=>{t&&a.unobserve(o),a.disconnect()}},[e,t,n]),{element:s}},Aa=({defaultScale:e=1,maxScale:t=3})=>{const n=g.useRef(null),s=g.useRef(null),[o,a]=g.useState(e),i=g.useRef(0),c=g.useRef({x:0,y:0}),l=g.useRef({x:0,y:0}),u=()=>{if(!s.current||!n.current)return{minX:0,maxX:0,minY:0,maxY:0};const h=n.current.getBoundingClientRect(),_=s.current.children[0].getBoundingClientRect(),y=_.width,x=_.height,b=Math.min(0,(h.width-y)/2),C=Math.max(0,(y-h.width)/2),j=Math.min(0,(h.height-x)/2),v=Math.max(0,(x-h.height)/2);return{minX:b,maxX:C,minY:j,maxY:v}},m=(h,_,y)=>{if(s.current){const x=s.current.children[0];x&&requestAnimationFrame(()=>{x.style.transform=`translate(calc(-50% + ${h}px), calc(-50% + ${_}px)) scale(${y})`})}},f=g.useCallback(h=>{const{minX:_,maxX:y,minY:x,maxY:b}=u(),{x:C,y:j}=l.current,v=Math.max(_,Math.min(y,C)),P=Math.max(x,Math.min(b,j));if(h.touches.length>1){const S=h.touches[0],E=h.touches[1],I=S.pageX-E.pageX,A=S.pageY-E.pageY;i.current=Math.sqrt(I*I+A*A),c.current={x:(S.pageX+E.pageX)/2,y:(S.pageY+E.pageY)/2}}else h.touches.length===1&&(c.current={x:h.touches[0].pageX-v,y:h.touches[0].pageY-P})},[o,l]),p=g.useCallback(h=>{if(!s.current||!n.current)return;const{minX:_,maxX:y,minY:x,maxY:b}=u();if(h.touches.length>1){h.preventDefault();const C=h.touches[0],j=h.touches[1],v=C.pageX-j.pageX,P=C.pageY-j.pageY,S=Math.sqrt(v*v+P*P);if(!i.current){i.current=S;return}const E=S/i.current,I=Math.max(1,Math.min(t,o*E));if(o===I)return;a(I);const A=(C.pageX+j.pageX)/2,L=(C.pageY+j.pageY)/2;let O=A-c.current.x,D=L-c.current.y;O=Math.max(_,Math.min(y,O)),D=Math.max(x,Math.min(b,D)),l.current={x:O,y:D},i.current=S,m(O,D,I)}else if(h.touches.length===1){const C=h.touches[0].pageX,j=h.touches[0].pageY;let v=C-c.current.x,P=j-c.current.y;v=Math.max(_,Math.min(y,v)),P=Math.max(x,Math.min(b,P)),l.current={x:v,y:P},m(v,P,o)}},[t,o]);return g.useEffect(()=>(document.addEventListener("touchstart",f),document.addEventListener("touchmove",p,{passive:!1}),()=>{document.removeEventListener("touchstart",f),document.removeEventListener("touchmove",p)}),[p,f]),{containerRef:n,imgRef:s,scale:o}},Am={attachment:"ATTACHMENT",specification:"SPECIFICATION",attribute:"ATTRIBUTE"},qe=Promise.resolve(!1),Xr={id:"",isOpen:!1,items:[],loading:!1,marketingData:null,messages:[],openTextField:{},paymentData:null,shippingData:null,totalizers:[],itemMetadata:[],recentlyAddedProducts:[],addCoupon:()=>qe,addItem:()=>qe,addSellerCode:()=>qe,addMarketingData:()=>qe,emptyCart:()=>({}),removeItem:()=>qe,setIsOpen:()=>({}),shipping:()=>qe,shippingUpdate:()=>qe,toggleServiceToProduct:()=>qe,updateItemQuantity:()=>qe,insertProfileEmail:()=>qe,setRecentlyAddedProducts:()=>({})},_s=e=>e===0,Ta=(e,t)=>{if(!e||e.length===0)return[];let n="";const s=[],o=e.match(/\d+/g)??[];for(const a of o){const i=t[Number(a)];i&&(n+=(n?"/":"")+i,s.push(n))}return s},La=(e,t)=>{const{availability:n,additionalInfo:{brandName:s},bundleItems:o,id:a,uniqueId:i,detailUrl:c,ean:l,imageUrl:u,name:m,listPrice:f,quantity:p,price:h,priceDefinition:_,productCategories:y,productCategoryIds:x,productId:b,refId:C,seller:j,referenceId:v,offerings:P,productRefId:S,skuName:E,sellingPrice:I}=e;return{availability:n,bundleItems:o,referenceId:v,productRefId:S,id:a,ean:l,uniqueId:i,itemOffered:{additionalProperty:[],brand:{name:s},categories:Ta(x,y),categoriesIds:x,gtin:C,image:[{alternateName:(t==null?void 0:t.MAIN_IMAGE)??"1",url:u}],name:m,isVariationOf:{name:m,productGroupID:b},sku:a,slug:c,skuName:E},listPrice:f,quantity:p,offerings:P,price:h,priceDefinition:_,sellingPrice:I,seller:j}},Oa=(e,t)=>{const n=e.map(s=>({id:s.uniqueId,quantity:s.quantity,seller:s.seller}));return Array.isArray(t)?[...n,...t]:[...n,t]},ka=(e,t)=>{const n=e.find(s=>s.id===t);if(n){const s=e.map((o,a)=>{var i,c;return{id:((i=o.itemOffered)==null?void 0:i.sku)??"",index:a,quantity:(n==null?void 0:n.id)===((c=o.itemOffered)==null?void 0:c.sku)?0:o.quantity,seller:o.seller??""}});return{updateItems:s,filterItems:s.filter(o=>o.id!==t)}}return{updateItems:[],filterItems:[]}},Da=(e,t,n)=>e.filter(s=>s.availability!=="withoutStock"&&s.availability!=="https://schema.org/OutOfStock").map((s,o)=>{var a,i;return s.id===t?{id:s.id,index:o,quantity:n,seller:s.seller,sku:((a=s.itemOffered)==null?void 0:a.sku)??""}:{id:s.id,index:o,quantity:s.quantity,seller:s.seller,sku:((i=s.itemOffered)==null?void 0:i.sku)??""}}),Yr=(e,t)=>e.filter(n=>n.availability!=="withoutStock").findIndex(({id:n})=>n===t),Tm=(e,t)=>{var n;return Array.isArray(e)?(((n=e==null?void 0:e.find(s=>{var o;return((o=s==null?void 0:s.id)==null?void 0:o.toLowerCase())===t}))==null?void 0:n.value)??0)/100:0},Lm=e=>{const t=e.reduce((o,a)=>{const i=_s(a.price)?0:a.quantity;return o+i},0),n=e.reduce((o,a)=>o+a.price*a.quantity,0),s=e.reduce((o,a)=>o+a.listPrice*a.quantity,0);return{totalItems:t,total:n,subTotal:s}},Om=e=>Array.isArray(e)?e.filter(t=>t.availability!=="withoutStock").reduce((t,n)=>t+(_s(n==null?void 0:n.price)?0:n.quantity),0):0,Ma=(e,t)=>{const{items:n,orderFormId:s,...o}=e;return{...o,id:s,items:Array.isArray(n)?n.map(a=>La(a,t)):[]}},$a=(e,t)=>{const n=e.find(s=>s.id===t);return n?n.availability==="unavailableItemFulfillment":!1},km=(e,t)=>{const n=e.sku,s=e.isVariantOf.hasVariant.find(o=>o.sku===n);return s?s.name.split(t)[1]:"--"},wt=(e,t,n=!1)=>!e&&t!==""?{code:300,value:t,statusOk:n}:e===t?{code:200,value:t,statusOk:n}:{code:400,value:t,statusOk:n},Dm=(e,t)=>{const n=new Set;return[e,...t].filter(s=>!n.has(s)&&n.add(s),n)},za=(e,t)=>t&&Array.isArray(t)&&t.find(s=>s.id===e)?Promise.resolve(e):Promise.resolve(!1),Fa=(e,t)=>t?Promise.resolve(e[t]):Promise.resolve(!1),Ba=async e=>{try{const t=await e();if(typeof t!="boolean")return t}catch(t){console.error(`[Error orderForm]: ${t}`)}return!1},Ua=(e,t)=>{if(t!==-1){const n=Number(e);return n?n+1:1}return e??1},Ha=(e,t)=>Array.isArray(e)?e.filter(n=>t==null?void 0:t.some(s=>s.id===n.id)):[],qa=async(e,t)=>e.then(n=>[...n??[],...t??[]]),Te=async(e,t,n,s)=>{const{priority:o="auto",body:a}=t;return fetch(e,{headers:{"Content-Type":"application/json"},priority:o,method:"POST",body:JSON.stringify(a)}).then(async i=>{const c=await i.json();return n?c:Ma(c,s)})},Va=(e,t,n)=>({notifications:[...e.notifications,{id:Date.now(),message:t,callback:n}]}),Wa=e=>[...Array.isArray(e)?e:[e],"faststore"],Ga=e=>{const t=e.get("utm_source")||gt("utm_source"),n=e.get("utm_campaign")||gt("utm_campaign"),s=e.get("utm_medium")||gt("utm_medium"),o=e.get("utmi_cp")||gt("utmi_cp"),a=e.get("utmi_pc")||gt("utmi_pc"),i=e.get("utmi_p")||gt("utmi_p");return{...t&&{utmSource:t},...s&&{utmMedium:s},...n&&{utmCampaign:n},...o&&{utmiCampaign:o},...a&&{utmiPart:a},...i&&{utmipage:i}}},gt=e=>{if(!e||typeof window>"u")return;const t=window.location.href;e=e.replace(/[[\]]/g,"\\$&");const n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)"),s=n.exec(t);return s?s[2]?decodeURIComponent(s[2].replace(/\+/g," ")):"":null},Ka=(e,t,n="BR")=>{const s=t,o={country:n,addressType:"",postalCode:e||null,city:"",state:"",street:"",number:"",neighborhood:"",complement:"",reference:"",geoCoordinates:[]};if(s){const a=typeof s=="object"&&"latitude"in s?s.latitude:null,i=typeof s=="object"&&"longitude"in s?s.longitude:null;o.geoCoordinates=typeof a=="number"&&typeof i=="number"?{latitude:a,longitude:i}:null}return[o]},Mm=Object.freeze(Object.defineProperty({__proto__:null,VALUE_REFERENCES:Am,addItemOrder:Oa,addNotification:Va,createItemOrder:La,createNewAddress:Ka,fetchCartAPI:Te,findItemIndex:Yr,findOptions:Ha,findTotalizerValue:Tm,getCategories:Ta,getCode:wt,getQuantity:Ua,getRemoveId:za,getSize:km,getTotalItems:Om,getTotalizer:Lm,getUrlParameter:gt,getValue:Fa,initialState:Xr,isGift:_s,marketingTagsBuilder:Wa,mergeOptionsPromise:qa,mountMarketingData:Ga,orderFormValues:Ma,promiseDefault:qe,removeQuantity:ka,updateItemSellerExternal:$a,updateOrderFormPromise:Ba,updateQuantity:Da,wishlistArray:Dm},Symbol.toStringTag,{value:"Module"})),$m=()=>{const e=async(h,_)=>Te("/api/checkout/order-form/coupon",{body:{orderFormId:h,coupon:_}}),t=async(h,_,y={},x)=>{if(x)if(_){const b=_.includes(" - ")?_.split(" - ")[0]:_,C=await Te("/api/checkout/order-form/seller-code",{body:{orderFormId:h,sellerCode:b}},!0);return C instanceof Object&&y.name in C&&C[y.status]===!0?Te("/api/checkout/order-form/attachments",{body:{orderFormId:h,sellerCode:b,sellerName:C[y.name]}}).then(v=>({...v,openTextField:{...(v==null?void 0:v.openTextField)??{},statusOk:!0}})):Promise.resolve({paymentData:null,openTextField:{statusOk:!1,value:b}})}else return Te("/api/checkout/order-form/attachments",{body:{orderFormId:h,sellerCode:"",sellerName:""}})},n=async(h,_)=>Te("/api/checkout/order-form/attachments/marketing-data",{body:{orderFormId:h,marketingData:_}}),s=async(h,_,y)=>Te("/api/checkout/order-form/items",{body:{orderFormId:h,orderItems:Oa(_,y)}}),o=async(h,_,y,x=!1)=>Te("/api/checkout/order-form/offerings",{body:{id:_,itemIndex:y,orderFormId:h,remove:x}}),a=async h=>Te("/api/checkout/order-form/items/remove-all",{body:{orderFormId:h}}),i=async(h,_="low")=>Te("/api/checkout/order-form",{priority:_,body:{orderFormId:h??""}}),c=async(h,_)=>Te("/api/checkout/order-form/profile",{body:{orderFormId:h,email:_}}),l=async(h,_,y)=>{const x=ka(_,y);return Te("/api/checkout/order-form/items/update",{body:{orderItems:x.updateItems,orderFormId:h}})},u=async(h,_,y,x,b,C,j)=>{var S,E;const v=j?{startDateUtc:(S=C==null?void 0:C.deliveryWindow)==null?void 0:S.startDate,endDateUtc:(E=C==null?void 0:C.deliveryWindow)==null?void 0:E.endDate}:null,P={logisticsInfo:Array.from({length:x},(I,A)=>({itemIndex:A,selectedDeliveryChannel:(C==null?void 0:C.deliveryChannel)||null,selectedSla:(C==null?void 0:C.deliveryMethod)||null,deliveryWindow:v})),selectedAddresses:b,clearAddressIfPostalCodeNotFound:!0};return Te("/api/checkout/order-form/shipping",{body:{...P,orderFormId:h,country:y,postalCode:_}})},m=async(h,_,y)=>Te("/api/checkout/order-form/shipping/update",{body:{orderFormId:h,options:_,selectedAddresses:y}}),f=async(h,_,y,x)=>{const b=Da(_,y,x);return Te("/api/checkout/order-form/items/update",{body:{orderFormId:h,orderItems:b}})};return{addCoupon:e,addItem:s,addSellerCode:t,addMarketingData:n,giftItem:o,emptyCart:a,getOrderForm:i,insertProfileEmail:c,removeItem:l,shipping:u,shippingUpdate:m,updateItemQuantity:async(h,_,y,x,b)=>f(h,_,y,x).then(C=>C&&Array.isArray(C.items)?$a(C.items,y)?f(h,_,y,b):C:!1)}},Qr="soma::cart",Ut="soma::options",vt=Ct.create((e,t)=>{const n=$m(),s=async(o,a,i)=>{e({loading:!0});const c=await Ba(o);if(typeof c!="boolean"){e({...c});const l=await qa(et.get(Ut),i);return et.set(Ut,l),Fa(c,a).finally(()=>e({loading:!1,options:l}))}return qe};if(typeof window<"u"){const o=async a=>{if(a){const i=await et.get(Ut).then(u=>Ha(u,a.items));et.set(Qr,a),et.set(Ut,i),e({...a,options:i});const c=new URLSearchParams(window.location.search),l=c.get("utm_campaign")||c.get("utmi_campaign")||"";l&&s(()=>n.addSellerCode(t().id,l.toUpperCase()),"openTextField")}};return et.get(Qr).then(a=>n.getOrderForm(a?a.id:"").then(o)),{...Xr,addCoupon:async a=>s(()=>n.addCoupon(t().id,a),"marketingData"),addItem:(a,i)=>{s(()=>n.addItem(t().id,t().items,a),"items",i)},addSellerCode:async(a,i)=>s(()=>n.addSellerCode(t().id,a,i,t().isOpen),"openTextField"),addMarketingData:async a=>s(()=>n.addMarketingData(t().id,a),"marketingData"),emptyCart:()=>{s(()=>n.emptyCart(t().id))},removeItem:async a=>{const i=await s(()=>n.removeItem(t().id,t().items,a),"items");return za(a,i)},shipping:async(a,i="BR")=>s(()=>n.shipping(t().id,a??"",i,t().items.length,Ka(a??"",null,i)),"shippingData"),shippingUpdate:async a=>s(()=>{var i;return n.shippingUpdate(t().id,a,(i=t().shippingData)==null?void 0:i.selectedAddresses)},"shippingData"),toggleServiceToProduct:async(a,i,c)=>s(()=>n.giftItem(t().id,a,i,c),"items"),updateItemQuantity:async(a,i,c)=>{const{id:l,items:u}=t();return s(()=>{var m;return n.updateItemQuantity(l,u,a,i,((m=u.find(f=>f.id===a))==null?void 0:m.quantity)??1)},"items",c?[c]:void 0)},insertProfileEmail:async a=>s(()=>n.insertProfileEmail(t().id,a),"clientProfileData"),setIsOpen:a=>e({isOpen:a})}}return Xr}),zm=()=>vt(e=>e),Xa=Ct.create(e=>({notifications:[],actions:{addNotification:(t,n)=>e(s=>Va(s,t,n)),removeNotification:t=>e(n=>({notifications:n.notifications.filter(s=>s.id!==t)}))}})),gs=()=>Xa(e=>e.notifications),ys=()=>Xa(e=>e.actions),Fm=Object.freeze(Object.defineProperty({__proto__:null,KEY_INDEXED_OPTIONS:Ut,KEY_INDEXED_STORE:Qr,useCartStore:vt,useGetCartStoreState:zm,useGetNotificationActions:ys,useGetNotificationsStore:gs},Symbol.toStringTag,{value:"Module"})),Bm=6e3,Ya=g.createContext({}),Qa=({children:e,...t})=>{const{items:n}=vt(),[s,o]=g.useState([]),a=g.useRef(null),i=g.useMemo(()=>Array.isArray(s)&&s.length>0?s.map(c=>n.find(l=>l.id===c.id)).filter(c=>c!==void 0):[],[n,s]);return g.useEffect(()=>{s.length&&(clearTimeout(a.current??0),a.current=setTimeout(()=>{o([])},Bm))},[s]),r.jsx(Ya.Provider,{value:g.useMemo(()=>({...t,setRecentlyAdded:o,recentlyAddedProducts:i}),[t,o,i]),children:e})},Qt=()=>{const e=g.useContext(Ya);if(e===void 0)throw new Error("useUIContext must be used within a UIProvider");return e};class Za{constructor(){cn(this,"events",{});cn(this,"prevData",{})}subscribe(t,n){return this.events[t]||(this.events[t]=[]),this.events[t].push(n),()=>{this.events[t]=this.events[t].filter(s=>s!==n)}}publish(t,n){this.events[t]&&this.events[t].forEach(s=>{this.prevData[t]=n,s(n)})}}const Ja=g.createContext({}),Um=({children:e,headerConfigs:t,pathname:n,...s})=>{const[o,a]=g.useState(!0),[i,c]=g.useState(!1),l=n==="/",u=g.useRef(new Za),m=h=>h?{headerVariant:t.home_default_variant,bannerVariant:t.home_default_variant,position:t.home_default_position}:{headerVariant:t.default_variant,bannerVariant:t.default_variant,position:t.default_position},f=m(l),p=g.useRef(f);return g.useEffect(()=>{var y;const h=((y=new URLSearchParams(window.location.search))==null?void 0:y.toString())??"";(h.includes("utm_")||h.includes("gclid"))&&(Wr.get("lastMedias")||Wr.set("lastMedias",`${h}`,{expires:1/24}));const _=()=>{const x=typeof(window==null?void 0:window.navigator)>"u"?"":navigator==null?void 0:navigator.userAgent,b=window.innerWidth<1024||!!x.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i);i||c(!0),o!==b&&(a(b),c(!0))};return i||_(),window.addEventListener("resize",_,{passive:!0}),()=>window.removeEventListener("resize",_)},[o,i]),g.useEffect(()=>{const h=m(l);u.current.publish("header:change_variant",h.headerVariant),u.current.publish("header:change_position",h.position),p.current=h},[l]),r.jsx(Ja.Provider,{value:{isMobile:o,mediatorRef:u,currentHeaderConfigsRef:p,deviceValidated:i,...s},children:r.jsx(Qa,{children:e})})},ne=()=>g.useContext(Ja),ei=g.createContext({}),Hm=({children:e,...t})=>r.jsx(ei.Provider,{value:{...t},children:e}),ce=()=>g.useContext(ei),St=(e,t)=>Ct.create(n=>{const s=()=>n({value:e});return t&&t instanceof Set&&t.add(s),{value:e,actions:{setValue:o=>n({value:o}),reset:s}}}),Kt={category:null,menuMobileIsOpen:!1,searchModalIsOpen:!1,userMenuIsOpen:!1},Zt=new Set,qm=()=>{Zt.forEach(e=>{e()})},ti=Ct.create((e,t)=>{const n=()=>e({value:Kt.category});return Zt.add(n),{value:Kt.category,actions:{reset:n,setValue:s=>e(()=>({value:s})),updateValue:s=>{t().value!==s&&e({value:s})}}}}),ni=()=>ti(e=>e.value),Jt=()=>ti(e=>e.actions),ri=St(Kt.menuMobileIsOpen,Zt),si=()=>ri(e=>e.value),oi=()=>ri(e=>e.actions),ai=St(Kt.searchModalIsOpen,Zt),ii=()=>ai(e=>e.value),Dn=()=>ai(e=>e.actions),ci=St(Kt.userMenuIsOpen,Zt),xs=()=>ci(e=>e.value),vs=()=>ci(e=>e.actions),Vm=Object.freeze(Object.defineProperty({__proto__:null,resetAllHeaderStores:qm,useActionsHeaderCategory:Jt,useActionsMenuMobileIsOpen:oi,useActionsSearchModalIsOpen:Dn,useActionsUserMenuIsOpen:vs,useGetHeaderCategoryStore:ni,useGetMenuMobileIsOpen:si,useGetSearchModalIsOpen:ii,useGetUserMenuIsOpen:xs},Symbol.toStringTag,{value:"Module"})),kt={selectedSkuInfo:{productId:"",name:"",size:"",sku:"",sellerId:"",sellerName:"",available:!1,quantity:1},openLetMeKnow:!1,openMeasurements:!1,showBottomNavigation:!1,showNotify:!1},Mt=new Set,Wm=()=>{Mt.forEach(e=>{e()})},li=Ct.create(e=>{const t=()=>e({value:kt.selectedSkuInfo});return Mt.add(t),{value:kt.selectedSkuInfo,actions:{setValue:n=>e(s=>({value:{...s,...n}})),reset:t}}}),en=()=>li(e=>e.value),ui=()=>li(e=>e.actions),di=St(kt.openLetMeKnow,Mt),Gm=()=>di(e=>e.value),Km=()=>di(e=>e.actions),mi=St(kt.showNotify,Mt),pi=()=>mi(e=>e.value),bs=()=>mi(e=>e.actions),fi=St(kt.showBottomNavigation,Mt),Xm=()=>fi(e=>e.value),Ym=()=>fi(e=>e.actions),hi=St(kt.openMeasurements,Mt),_i=()=>hi(e=>e.value),gi=()=>hi(e=>e.actions),Qm=Object.freeze(Object.defineProperty({__proto__:null,resetAllPDPStores:Wm,useActionsPDPOpenLetMeKnow:Km,useActionsPDPOpenMeasurements:gi,useActionsPDPSelectedSkuInfo:ui,useActionsPDPShowBottomNavigation:Ym,useActionsPDPShowNotify:bs,useGetPDPOpenLetMeKnow:Gm,useGetPDPOpenMeasurements:_i,useGetPDPSelectedSkuInfo:en,useGetPDPShowBottomNavigation:Xm,useGetPDPShowNotify:pi},Symbol.toStringTag,{value:"Module"})),eo={feedback:{active:!1,action:"add"},list:[]},js=Ct.create((e,t)=>({value:eo,actions:{reset:()=>e({value:eo}),setValue:s=>e(()=>({value:s})),toggleProduct:s=>e(o=>o.value.list.includes(s)?{value:{feedback:{active:!0,action:"remove"},list:o.value.list.filter(a=>a!==s)}}:{value:{feedback:{active:!0,action:"add"},list:[...o.value.list,s]}}),updateList:s=>e(o=>({value:{...o.value,list:s}})),resetFeedback:()=>e(s=>({value:{...s.value,feedback:{active:!1,action:""}}}))}})),$t=()=>js(e=>e.value.list),Cs=()=>js(e=>e.value.feedback),Et=()=>js(e=>e.actions),Zm=Object.freeze(Object.defineProperty({__proto__:null,useActionsWishlistStore:Et,useGetWishlistFeedbackStore:Cs,useGetWishlistStore:$t},Symbol.toStringTag,{value:"Module"})),yi=g.createContext({}),Jm=({children:e,headerData:t,...n})=>{var m,f;const s=g.useRef(null),o=g.useRef(null),a=g.useRef(null),i=g.useRef(null),c=g.useRef(null),{mediatorRef:l,currentHeaderConfigsRef:u}=ne();return(m=l.current)==null||m.subscribe("header:change_variant",p=>{var b,C,j;if(p&&u.current&&(u.current.bannerVariant=p),!s.current)return;const _=document.body.scrollTop>0,y=s.current.getAttribute("data-interactiveVariant"),x=_?y:p??((b=u.current)==null?void 0:b.bannerVariant)??"default";x!==((C=u.current)==null?void 0:C.headerVariant)&&(s.current.setAttribute("data-bottomdivider",String(_)),s.current.setAttribute("data-variant",String(x)),(j=l.current)==null||j.publish("herobanner:change_controllers_variant",x),u.current&&(u.current.headerVariant=x))}),(f=l.current)==null||f.subscribe("header:change_position",p=>{s.current&&(s.current.style.position=p)}),g.useEffect(()=>{const p=new AbortController,h=d.helpers.throttle(()=>{var y;return(y=l.current)==null?void 0:y.publish("header:change_variant",null)},200);document.body.addEventListener("scroll",h,{passive:!0,signal:p.signal});const _=y=>{var b;(b=y.target.closest("a"))==null||b.blur()};return s.current&&(s.current.addEventListener("click",_,{signal:p.signal}),s.current.addEventListener("touchend",_,{signal:p.signal})),()=>{p.abort()}},[]),r.jsx(yi.Provider,{value:{headerData:t,structureRef:o,rootRef:s,tipbarRef:a,userMenuMobileRef:i,userMenuDesktopRef:c,...n},children:e})},Ee=()=>g.useContext(yi),xi=g.createContext({}),vi=({children:e,...t})=>r.jsx(xi.Provider,{value:g.useMemo(()=>t,[t]),children:e}),Ss=()=>{const e=g.useContext(xi);if(e===void 0)throw new Error("useMenuMobileContext must be used within a MenuMobileProvider");return e},ep=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},tp=(e,t,n)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const s=t.getBoundingClientRect(),o=e.getBoundingClientRect(),a=e!=null&&e.parentElement?ep(e==null?void 0:e.parentElement):0;return{left:s.left+s.width/2-(o.width+a),top:s.top+s.height+n}},bi=g.createContext({}),ji=({children:e,delay:t=600,gap:n=20,...s})=>{const[o,a]=g.useState(!1),i=g.useRef(null),[c,l]=g.useState(!1),[u,m]=g.useState({left:0,top:0}),f=g.useCallback(()=>{l(!0),typeof window<"u"&&(i.current=window.setTimeout(()=>{a(!1),l(!1)},t))},[l,a,t]);return g.useEffect(()=>{if(typeof window>"u")return;const p=window.document.querySelector("#cart-button"),h=window.document.querySelector("#add-to-cart--tooltip");if(p&&h){const{left:_,top:y}=tp(h,p,n??0);m({left:_,top:y}),l(!1)}},[n,o]),r.jsx(bi.Provider,{value:g.useMemo(()=>({...s,...u,handleClose:f,isLeaving:c,isOpen:o,setIsOpen:a,setIsLeaving:l}),[s,u,f,c,o,a,l]),children:e})},Pt=()=>{const e=g.useContext(bi);if(e===void 0)throw new Error("useAddToCartContext must be used within a AddToCartProvider");return e},Ci=g.createContext({}),np=({children:e,SELLER_CODE_VALIDATION_KEYS:t,CARTPROVIDER_MESSAGE_PRODUCT_REMOVE:n,data:s,...o})=>{var re,le,se,ie;const a=vt(),{setRecentlyAdded:i}=Qt(),c=g.useRef(""),l=gs(),{addNotification:u,removeNotification:m}=ys(),[f,p]=g.useState(null),{addCoupon:h,addItem:_,addSellerCode:y,addMarketingData:x,emptyCart:b,isOpen:C,removeItem:j,shipping:v,shippingUpdate:P,toggleServiceToProduct:S,updateItemQuantity:E}=a;g.useEffect(()=>{(async()=>{var w,W;if(!a.id||!((W=(w=s==null?void 0:s.promotion)==null?void 0:w.promotionCart)!=null&&W.idPromotion))return;const J=await fetch("/api/buywin",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({orderFormId:a.id,promotionId:s.promotion.promotionCart.idPromotion,web:(s==null?void 0:s.promotion.promotionCart.versionAPI)==="Original"})}).then(ae=>ae.json());p(J)})()},[a.id,a.items.length,s==null?void 0:s.versionId,(le=(re=s==null?void 0:s.promotion)==null?void 0:re.promotionCart)==null?void 0:le.idPromotion,(ie=(se=s==null?void 0:s.promotion)==null?void 0:se.promotionCart)==null?void 0:ie.versionAPI]),g.useEffect(()=>{const $=Wr.get("lastMedias");if(a.id&&$&&c.current!==$){c.current=$;const J=new URLSearchParams($),w=Ga(J);x(w)}},[a,x]);const I=g.useCallback(async($,J)=>(J==="coupon"?h($):y($,t??{})).then(W=>{if(typeof W!="boolean"&&W instanceof Object){if(J==="seller"&&"value"in W){const{statusOk:ae,value:he}=W,N=String(he??"").split(" - ");return wt((N==null?void 0:N[0])??"",$,!!ae)}return wt(String(W.coupon),$,!0)}return wt("","")}).catch(()=>Promise.resolve({code:400})),[h,y]),A=g.useCallback(($,J,w)=>{const{id:W}=$;E(W,J,w)},[E]),L=g.useCallback(($,J,w=!1)=>{if(!$)return;const{id:W}=$,ae=Yr(a.items,W);if(ae!==-1&&!w){const he=Number(a.items[ae].quantity),N=a.items[ae]?he+1:1;A($,N,J)}else _({id:W,quantity:($==null?void 0:$.quantity)??1,seller:$.seller});C||i(he=>[...he,$])},[_,A,a.items,C,i]),O=g.useCallback(($,J)=>{if(!$||!Array.isArray($))return;i(W=>[...W,...$]);const w=$.map(W=>{const{id:ae,quantity:he,seller:N}=W,R=Yr(a.items,ae),Ne=Ua(he??1,R);return{id:ae,quantity:Ne,seller:N}});_(w,J)},[_,a.items,i]),D=g.useCallback(async($,J,w)=>$?j($).then(()=>(u(J??`${n}`,w),wt($,$))):Promise.resolve(wt("","Product id required")),[u,j]),Q=g.useCallback(()=>{a.items.length>0&&b()},[b,a.items]),M=g.useCallback(($,J="BRA")=>v($,J),[v]),U=g.useCallback($=>{$&&P($)},[P]),F=g.useCallback(async($,J,w=!1)=>{const W=a.items.findIndex(he=>he.uniqueId===$);return a.items[W]&&W>=0?S(J,W,w):!1},[a.items,S]),Y=g.useCallback(async($,J)=>E($,J).then(w=>{if(Array.isArray(w)){const W=w.find(ae=>ae.id===$);if(W&&(W==null?void 0:W.quantity)<J)return String(W.quantity)}return!1}),[E]),G=g.useCallback(async()=>{await x({...a.marketingData,coupon:""})},[x,a.marketingData]),H=g.useCallback(async()=>{await x({...a.marketingData,utmiCampaign:"",utmCampaign:"",utmSource:"",utmMedium:""})},[x,a.marketingData]),Z=g.useCallback(async()=>{await v("","BRA")},[v]);return r.jsx(Ci.Provider,{value:g.useMemo(()=>({...o,data:s,addCouponSeller:I,addToCart:L,addItemsToCart:O,cartStore:a,notifications:l,clearCart:Q,addNotification:u,isOpen:a.isOpen,removeNotification:m,removeToCart:D,setIsOpen:a.setIsOpen,shipping:M,shippingUpdateOption:U,toggleGiftItemCart:F,updateItemQuantity:Y,removeCoupon:G,removeSellerCode:H,removeCEP:Z,promotionRules:f,setPromotionRules:p}),[o,s,I,L,O,l,Q,u,a,m,D,M,U,F,Y,G,H,Z,f,p]),children:e})},ve=()=>{const e=g.useContext(Ci);if(e===void 0)throw new Error("useCartContext must be used within a CartProvider");return e},Si=g.createContext({}),Es=({children:e,fetch:t})=>{const n=g.useRef(!0),[s,o]=g.useState(null),[a,i]=g.useState(!1);return g.useEffect(()=>{(async()=>{n.current=!0;try{const l=await t();if(!l.ok)throw new Error("Failed to fetch data");const u=await l.json();o(u.data),n.current=!1}catch{n.current=!0,i(!0)}})()},[t]),r.jsx(Si.Provider,{value:g.useMemo(()=>({data:s,isLoading:n.current??!1,isError:a}),[s,a,n]),children:e})},Ps=()=>{const e=g.useContext(Si);if(e===void 0)throw new Error("useProductsContext must be used within a useRootContext");return e},Ei=g.createContext({}),Ns=({children:e,sort:t,state:n,count:s,collectionId:o,brand:a,searchParams:i,ITEMS_PER_PAGE:c})=>{const l=g.useMemo(()=>{var u;return o?[{key:"productclusterids",value:o.toString()}]:a?[{key:"brand",value:a}]:(u=n.base)!=null&&u.length?n.base.slice(1).split("/").map((m,f)=>({key:`category-${f+1}`,value:m})):[]},[n.base,o]);return r.jsx(Ei.Provider,{value:g.useMemo(()=>({state:{...n,facets:[...l,...n.facets??[]]},sort:t,count:s??c,searchParams:i}),[l,s,t,n,i]),children:e})},ze=()=>{const e=g.useContext(Ei);if(e===void 0)throw new Error("useSearchContext must be used within a SearchProvider");return e},Pi=g.createContext({}),rp=({children:e,...t})=>r.jsx(Pi.Provider,{value:t,children:e}),De=()=>{const e=g.useContext(Pi);if(e===void 0)throw new Error("usePLPConstants must be used within a PLPConstantsProvider");return e},Ni=g.createContext({}),sp=({children:e,selectedFacets:t})=>{const{data:n,...s}=Ps(),{router:o}=ce(),{searchParams:a,PLP_SORT_DEFAULT:i}=De(),c=g.useCallback((p,h)=>{if(h){if(p.key.toLocaleLowerCase()==="price"){const _=h.getAll("facets");h.delete("facets"),_.forEach(y=>{const[x]=y.split("/");x!==p.key&&h.append("facets",y)})}h.set("page","1"),h.append("facets",`${p.key}/${p.value}`),o.push(`?${h.toString()}`)}},[o]),l=g.useCallback(()=>{const p=new URLSearchParams;p.set("sort",i),p.set("page","1"),o.push(`?${p.toString()}`)},[o]),u=g.useCallback((p,h)=>{if(!h||!h.has&&!h.has("facets"))return;const _=h.getAll("facets");h.delete("facets"),h.set("page","1"),_.forEach(y=>{const[x,b]=y.split("/");(x!==p.key||b!==p.value)&&h.append("facets",y)}),o.push(`?${h.toString()}`)},[o]),m=g.useCallback(p=>{const h=a?new URLSearchParams(a):new URLSearchParams;for(const[,_]of h.entries()){const[y,x]=_.split("/");if(y===p.key&&x===p.value)return u(p,h)}return c(p,h)},[c,u,a]),f=g.useCallback(p=>{const h=a?new URLSearchParams(a):new URLSearchParams;h.set("sort",p.replace("_",":")),o.push(`?${h.toString()}`)},[o,a]);return r.jsx(Ni.Provider,{value:g.useMemo(()=>({...s,breadcrumb:n&&"breadcrumb"in n?n==null?void 0:n.breadcrumb:[],deleteAllFacets:l,facets:n&&"facets"in n?n==null?void 0:n.facets:[],selectedFacets:t,onToggleFacet:m,onSort:f,searchParams:a}),[n,l,f,m,s,t,a]),children:e})},Ii=({children:e,forceUpdate:t})=>{const{state:n}=ze();return r.jsx(Es,{fetch:()=>fetch("/api/search/facets",{method:"POST",body:JSON.stringify({...n,forceUpdate:t}),priority:"low"}),children:r.jsx(sp,{selectedFacets:(n==null?void 0:n.facets)??[],children:e})})},wi=()=>{const e=g.useContext(Ni);if(e===void 0)throw new Error("useFacetsContext must be used within a FacetsProvider");return e},Bt={placeholder:"Ordernar por",options:{score_desc:"Mais Relevantes",orders_desc:"Mais Vendidos",price_desc:"Maior Preço",price_asc:"Menor Preço",release_desc:"Novidades",discount_desc:"Maior Desconto",name_asc:"De A a Z"}},op={nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"0",count:0,total:0},ap="Imagem do produto",to=1,ip="Sair",cp=e=>e.exit,no=({ICONS:e,storeConfig:t})=>[{icon:e.person,label:"Minha conta",href:`${t.secureSubdomain}/api/io/account#/profile`,needToBeAuth:!1,deviceShown:"both"},{icon:e.delivery_truck,label:"Meus pedidos",href:`${t.secureSubdomain}/api/io/account#/orders`,needToBeAuth:!1,deviceShown:"both"},{icon:e.favorite_false,label:t.wishlistConfig.label,href:t.wishlistConfig.path,needToBeAuth:!1,deviceShown:"mobile"},{icon:e.help,label:t.termsConfig.label,href:t.termsConfig.path,needToBeAuth:!1,deviceShown:"mobile"}],lp=(e,t)=>{const n=(t??"").split("@")[0];return e?`Olá${n.length?", ":" "}${n}!`:"Olá!"},up=e=>"Seja bem vindo!",dp="Marque a caixa para aceitar os termos de política de privacidade.",mp="Algumas informações estão incorretas ou não foram preenchidas",pp="Enviar",Ri=g.createContext({}),fp=({children:e})=>{const{data:t,...n}=Ps(),[s,o]=g.useState(0),{sendDataLayerEvent:a}=oe();return g.useEffect(()=>{if(t&&"pagination"in t&&t.products.length>0){a({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:t.products}}});const i=t.pagination.count;i&&Number.isInteger(i)&&o(i)}},[t,a,o]),r.jsx(Ri.Provider,{value:g.useMemo(()=>({...n,products:t&&"products"in t?t==null?void 0:t.products:[],pagination:t&&"pagination"in t?t==null?void 0:t.pagination:op,total:s}),[t,n,s]),children:e})},Is=({children:e,query:t,forceUpdate:n})=>{const{count:s,state:o}=ze(),a={...o,count:s};return r.jsx(Es,{fetch:()=>fetch("/api/search/product",{method:"POST",body:JSON.stringify({...a,query:t,forceUpdate:n,facets:o.facets??[]})}),children:r.jsx(fp,{children:e})})},tn=()=>{const e=g.useContext(Ri);if(e===void 0)throw new Error("useProductsContext must be used within a ProductsProvider");return e},Ai=g.createContext({}),hp=({children:e,slug:t,searchParams:n,collectionId:s,brand:o,itemsPerPage:a=24,PLP_SORT_DEFAULT:i})=>{const{pathname:c}=ce(),l=g.useRef(""),[u,m]=g.useState(!1),f=g.useMemo(()=>{const h=new URL(c,"http://localhost"),_=(n==null?void 0:n.getAll("facets"))??[],y=(n==null?void 0:n.get("page"))??"1",x=(n==null?void 0:n.get("sort"))??(s?"":i);return h.searchParams.set("page",String(y)),h.searchParams.set("sort",String(x)),n!=null&&n.get("query")?(h.searchParams.set("query",n.get("query")),h):(h.searchParams.set("base",Array.isArray(t)?t.join("/"):t),h.searchParams.set("facets",_.join(",")),h)},[s,c,n,t]),p=g.useMemo(()=>{if(Array.isArray(n==null?void 0:n.getAll("facets")))return T.parseSearchState(f,n.getAll("facets")??[""]);const h=(n==null?void 0:n.getAll("facets"))??[];return T.parseSearchState(f,h)},[f,n]);return g.useEffect(()=>{l.current!==c&&(l.current=c,window.document.body.scrollTo(0,0))},[c]),r.jsx(Ai.Provider,{value:g.useMemo(()=>({openFilters:u,setOpenFilters:m}),[u,m]),children:r.jsx(Ns,{ITEMS_PER_PAGE:a,searchParams:n??new URLSearchParams,state:g.useMemo(()=>({...p}),[p]),collectionId:s,brand:o,children:e})})},ws=()=>{const e=g.useContext(Ai);if(e===void 0)throw new Error("usePLPContext must be used within a PLPProvider");return e},wn=(e,t)=>{if(e===t)return!0;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:e.every((o,a)=>wn(o,t[a]));if(Array.isArray(t))return!1;const n=Object.keys(e),s=Object.keys(t);return n.length!==s.length?!1:n.every(o=>Object.prototype.hasOwnProperty.call(t,o)&&wn(e[o],t[o]))},Ti=(e,t,n="page")=>Object.keys(t).some(s=>s===n?!1:!wn(t[s],e[s])),Zr=async e=>{const t=await fetch("/api/search/product",{method:"POST",body:JSON.stringify(e),priority:"high"});if(!t.ok)throw new Error("[FAILED TO FETCH DATA]");const n=await t.json();return n==null?void 0:n.data},Li=()=>({node:{sku:"",gtin:"",name:"...",description:"",releaseDate:"",slug:"",video:null,categories:[],categoryId:"",categoriesIds:[],id:"skeleton",brand:{name:""},seo:{title:"",description:"",canonical:""},cluster:{generals:[],highlights:[]},availability:{status:!0},breadcrumbList:{itemListElement:[]},image:[{alternateName:"1",url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=",keywords:"1"},{alternateName:"10",url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottgAAAABJRU5ErkJggg==",keywords:"10"}],offers:{lowPrice:1,highPrice:0,offers:[{availability:"true",listPrice:0,price:0,priceValidUntil:"",priceCurrency:"BRL",itemCondition:"",quantity:1,seller:{identifier:"1"}}],priceCurrency:"BRL"},isVariantOf:{productGroupID:"",hasVariant:[{additionalProperty:[{name:"Tamanho",value:"...",valueReference:"SPECIFICATION",propertyID:""}],name:"...",offers:{offers:[{availability:"https://schema.org/InStock",listPrice:0,price:0,quantity:1,seller:{identifier:"1"}}]},sku:"1",slug:"1",productId:"1"}],name:"",additionalProperty:[],skuVariants:null},installments:{count:2,value:1}}}),Oi=(e,t,n,s=24)=>{const o=new Set,a=[];if(!Array.isArray(e)||e.length===0)return{taken:o,placedBanners:a};const i=t*s*n;for(const c of e){let l=Number(c.position_grid),u=!1;for(;l<i;){const m=l%n;if(m+c.columns>n){l+=n-m;continue}if(!Array.from({length:c.columns}).some((h,_)=>o.has(l+_))){for(let h=0;h<c.columns;h++)o.add(l+h);a.push(l),u=!0;break}l++}u||console.info(`[PLP INFINITE FAILED BANNER POSITION]: pos=${c.position_grid}, cols=${c.columns}`)}return{taken:o,placedBanners:a}},Jr=(e,t,n,s=24)=>{const{placedBanners:o,taken:a}=Oi(e??[],t,n),i=[];let c=0;try{for(;i.length<t*s;)a.has(c)||i.push(c),c++;return{banners:o,products:i}}catch(l){console.info(`[PLP INFINITE FAILED TO GEN POSITIONS]: page=${t}`,l)}return{banners:[],products:i}},Pn=(e,t,n=24)=>Array.from({length:e},(s,o)=>{const a=o+1;return{loading:e===a,page:a,pagination:t!=null&&t.products.length&&e===a?t==null?void 0:t.pagination:Rs(),products:t!=null&&t.products.length&&e===a?t==null?void 0:t.products:Array.from({length:n},()=>Li())}}),ki=(e,t)=>[...e,{loading:!1,page:t,pagination:Rs(),products:[]}],Rs=()=>({nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"1",count:1,total:1}),_p=(e,t,n,s,o)=>{const a=e[e.length-1],i=(a==null?void 0:a.products.length)??o,c=(e.length-1)*o+i-1,l=n[c];return t.filter((u,m)=>{const f=s[m];return f<=l||o>i&&f>l})},Di=(e,t)=>{const n=new Map;for(const o of e){const a=Math.floor(o/t);n.has(a)||n.set(a,[]),n.get(a).push(o)}const s=[];for(const[,o]of n){const a=o[Math.floor(Math.random()*o.length)];s.push(a)}return s},Mi=(e,t)=>{if(!e)return[];const n=e.map((s,o)=>s.video&&s.video!==""?o:null).filter(s=>s);return Di(n,t)},$i=e=>Array.isArray(e)?e.map((t,n)=>({href:`/${e.slice(0,n+1).join("/")}`,name:t})):[],gp=Object.freeze(Object.defineProperty({__proto__:null,createBreadcrumb:$i,createPage:ki,createPages:Pn,createPagination:Rs,createProduct:Li,deepEqual:wn,fetchPage:Zr,getBanners:Oi,getPositions:Jr,getProductsWithVideo:Mi,getRandomVideoPerRow:Di,getVisibleBanners:_p,hasStateChangedExceptPage:Ti},Symbol.toStringTag,{value:"Module"})),yp=50,xp=Ct.create((e,t)=>{const n=i=>Math.min(i,yp),s=async(i,c)=>{const l=n(i.page);try{const u=await Zr({...i,page:l});o(l,m=>c?c(m,u):{...m,...u})}catch(u){console.error(`[PDC - SCROLL INFINITE FAILED TO FETCH PAGE ${l}]: ${u}`),o(l,m=>({...m,loading:!1}))}},o=(i,c)=>{e({load:!0,pages:t().pages.map(l=>l.page===i?c(l):l)})},a=async(i,c)=>{await s(i,(l,u)=>(typeof c=="function"&&c(u),{...l,...u,loading:!0}))};return{banners:[],load:!1,pages:[],total:0,positions:[],products:[],createPages:async(i,c,l,u)=>{var f,p,h;const m=n(Number(i==null?void 0:i.page));e({...c,pages:Pn(m,void 0,u)});try{const _=await Zr({...i,page:m});if(_){if(!_.products.length&&((f=_==null?void 0:_.pagination)==null?void 0:f.total)<m){a({...i,page:(p=_==null?void 0:_.pagination)==null?void 0:p.total},l),e({pages:Pn((h=_==null?void 0:_.pagination)==null?void 0:h.total)});return}typeof l=="function"&&l(_),e({load:!0,pages:Pn(m,_),total:Number(_.pagination.count)})}}catch(_){console.error(`[PDC - SCROLL INFINITE TO CREATE PAGES]: page ${m} ${_}`)}},addPage:(i,c,l)=>{const{pages:u}=t(),m=n(i==null?void 0:i.page);u.some(f=>f.page===m)||(e({...c,pages:ki(u,m)}),a(i,l))},updateProducts:(i,c)=>{const l=t().pages.find(u=>u.page===n(i==null?void 0:i.page));l!=null&&l.loading||a(i,c)}}}),vp=(e,t,n,s=0)=>{if(!e.length)return[];let o=0;const a=[];for(let i=0;i<e.length;i+=n){const c=e.slice(i,i+n),l=c.findIndex(u=>{var m;return(m=u.node)==null?void 0:m.video});for(let u=0;u<c.length;u++){const m=i+u,f=s+m,p=t.find(_=>_.position_grid===f+1),h=f+o+1;p&&(o+=p.columns),a.push({position:h,canPlayVideo:u===l})}}return a},zi=(e,t,n)=>{const s=(t-1)*n,o=t*n;return e>=s&&e<=o},Mn=e=>{var t;return(t=e==null?void 0:e.map(n=>({disable:T.disableSKU(n),size:T.getSKUName(n),skuID:"sku"in n&&n.sku})))==null?void 0:t.filter(n=>n.disable)},bp=Object.freeze(Object.defineProperty({__proto__:null,createGridPosAndVideo:vp,getSkusNotify:Mn,isPositionInCurrentPage:zi},Symbol.toStringTag,{value:"Module"})),Fi=({isMobile:e,ICONS:t,NOTIFY_INFO:n})=>r.jsxs(r.Fragment,{children:[r.jsx(d.Modal.Controls,{navigation:e?"top":"middle",isMobile:e??!1,children:!e&&r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),r.jsx(d.Button,{"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})}),r.jsx(d.Modal.Title,{navigation:e?"top":"middle",title:n.title})]});Fi.displayName="Notify.Controls";const Qe={"notify--header-modifier":"_notify--header-modifier_xlomp_1","notify--container":"_notify--container_xlomp_4","notify--form":"_notify--form_xlomp_20","notify--status":"_notify--status_xlomp_36","notify--status--success":"_notify--status--success_xlomp_50","notify--status--error":"_notify--status--error_xlomp_50","notify--modal--body":"_notify--modal--body_xlomp_99","notify--loading":"_notify--loading_xlomp_102","notify--selector":"_notify--selector_xlomp_122","notify--selector--header":"_notify--selector--header_xlomp_138","modal-modifier":"_modal-modifier_xlomp_168"};function Bi(e){const n=decodeURIComponent(window.document.cookie).split(";");for(const s of n){const[o,a]=s.trim().split("=");if(o===e)return a}}function As(e,t,n={}){const o={...{path:"/",expires:new Date(Date.now()+36e5)},...n};let a=`${encodeURIComponent(e)}=${encodeURIComponent(t??"")}`;for(const i in o)o[i]!==void 0&&(a+=`; ${i}`,i==="expires"?a+=`=${o[i].toUTCString()}`:typeof o[i]=="boolean"?a+=`; ${o[i]?"true":"false"}`:a+=`=${o[i]}`);window.document.cookie=a}var Ui={CUSTOM_VIEW_CART:{name:"custom_view_cart",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","total_discount","subtotal","items"]},ADD_TO_WISHLIST:{name:"add_to_wishlist",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","items"]},ADD_TO_CART:{name:"add_to_cart",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","items"]},REMOVE_FROM_CART:{name:"remove_from_cart",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","items"]},ADD_COUPON:{name:"add_coupon",destinations:["DataLayer"],requiredParams:["brand","region","coupon","coupon_message","seller_cod_name"]},SEARCH:{name:"search",destinations:["DataLayer"],requiredParams:["brand","search_term","search_found","search_quantity"]},SEARCH_ZIPCODE:{name:"search_zipcode",destinations:["DataLayer"],requiredParams:["brand","region","shippings","zipcode","flag_pickup"]},VIEW_PROMOTION:{name:"view_promotion",destinations:["DataLayer"],requiredParams:["brand","region","currency","promotion_name","creative_slot","creative_name","items"]},SELECT_PROMOTION:{name:"select_promotion",destinations:["DataLayer"],requiredParams:["brand","region","currency","promotion_name","creative_slot","creative_name","items"]},SELECT_CONTENT:{name:"select_content",destinations:["DataLayer"],requiredParams:["brand","content_type"]},SELECT_ITEM:{name:"select_item",destinations:["DataLayer"],requiredParams:["brand","region","items","line_items"]},VIEW_ITEM:{name:"view_item",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","available_grid","items"]},VIEW_ITEM_LIST:{name:"view_item_list",destinations:["DataLayer"],requiredParams:["region","brand","line_items","items"]},BEGIN_CHECKOUT:{name:"begin_checkout",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","total_discount","subtotal","items"]},CUSTOM_BEGIN_CHECKOUT:{name:"custom_begin_checkout",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","total_discount","subtotal","items"]},AUTH_ACTION:{name:"auth_action",requiredParams:["region"]},ADD_PERSONAL_INFO:{name:"add_personal_info",destinations:["DataLayer"],requiredParams:["brand","pre_filled","line_items","currency","value","total_discount","subtotal"]},CUSTOM_ADD_SHIPPING_INFO:{name:"add_shipping_info",destinations:["DataLayer"],requiredParams:["brand","pre_filled","shipping","shipping_tier","line_items","currency","value","total_discount","subtotal","items"]},CUSTOM_ADD_PAYMENT_INFO:{name:"add_payment_info",destinations:["DataLayer"],requiredParams:["brand","pre_filled","line_items","currency","value","total_discount","payment_type","subtotal","items"]},ORDER_REVIEWED:{name:"order_reviewed",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","total_discount","subtotal","payment_type"]},PURCHASE:{name:"purchase",destinations:["DataLayer"],requiredParams:["brand","shipping_tier","line_items","currency","value","shipping","transaction_id","total_discount","payment_type","seller_cod_name","subtotal","coupon","items"]},CUSTOM_PURCHASE:{name:"custom_purchase",destinations:["DataLayer"],requiredParams:["brand","shipping_tier","line_items","currency","value","shipping","transaction_id","total_discount","payment_type","seller_cod_name","subtotal","coupon","items"]},CUSTOM_USER_INFO:{name:"custom_user_info",destinations:["DataLayer"],requiredParams:["user_info"]},NOTIFY_ME:{name:"notify_me",destinations:["DataLayer"],requiredParams:["brand","line_items","size","item_ref"]}};function jp(e,t,n){const s=t.window,o=Object.assign({},t);if(delete o.window,s){s.dataLayer=s.dataLayer||[],s.dataLayer.push({event:e,ecommerce:o});return}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:e,ecommerce:o})}function Cp(e,t,n){console.log(`%c[DT - ${n}] EVENTO DISPARADO:%c `,`background: ${t}; color: white; font-weight: bold; padding: 2px 4px; border-radius: 3px;`,"color: #fff;",e||"")}var Hi=[["vale","vale crédito"],["pagaleve","pix"],["pix parcel","pix parcelado"],["pix","pix"],["apple","apple pay"],["google","google pay"],["boleto","boleto"],["paypal","paypal"],["cred","cartão"],["visa","cartão"],["master","cartão"],["amex","cartão"],["elo","cartão"],["hiper","cartão"],["diner","cartão"],["deb","cartão"]];function Sp(e,t,n){Cp({id:e,custom_data:t},"#00c851",n)}var Ep={DataLayer:jp,Dito:Sp};async function Pp(e,t){const n=Ui[e];n&&await Promise.allSettled(n.destinations.map(async s=>{try{await Ep[s](e.toLowerCase(),t,s)}catch(o){console.error(`[DT] Failed to send ${e} to ${s}:`,o)}}))}async function Np(e){try{return await(await fetch(`/api/catalog_system/pub/products/search?fq=productId:${e}`)).json()}catch(t){console.log("[DT] Erro ao buscar dados do produto",t)}}function Ip(e){try{const{pathname:t}=new URL(e,window.location.origin);return/\/p\/?$/.test(t)}catch{return!1}}function qi(e){if(!e)return null;const t=(()=>{try{return new URL(e,location.origin).pathname}catch{return e.split("?")[0]}})(),n=decodeURIComponent(t).match(/(\d+-\d+)(?=\/p|$)/);return n?n[1].replace("-","_"):null}async function wp(e){const t=qi(e);if(!t)return console.error("Não foi possível extrair o RefId da URL"),null;try{const n=await fetch(`/api/catalog_system/pub/products/search?fq=alternateIds_RefId:${t}`);if(!n.ok)throw new Error(`Erro na API: ${n.status}`);const s=await n.json();return(s==null?void 0:s[0])||null}catch(n){return console.error("Erro ao buscar dados do produto:",n),null}}function Vi(e,t){var n,s,o,a;const i=(s=(n=e==null?void 0:e.shippingData)==null?void 0:n.logisticsInfo)==null?void 0:s.find(l=>l.itemId===t.id),c=(o=i==null?void 0:i.slas)==null?void 0:o.find(l=>l.id===i.selectedSla);return(a=c==null?void 0:c.pickupStoreInfo)!=null&&a.friendlyName?`retirada em loja: ${c.pickupStoreInfo.friendlyName}`:c!=null&&c.name?`Receba em casa: ${c.name}`:null}async function Wi(e){var t,n;const s=await Np(e.productId||e.productID||e.item_group_id);return s.length&&(n=(t=s[0].items.find(o=>o.name===e.skuName))==null?void 0:t.itemId)!=null?n:null}function $n(e){return e.discount||e.discount===0?e.discount:parseFloat(Math.max(e.listPrice-e.sellingPrice,0).toFixed(2))/100||0}function bt(e){const t=[()=>{var n;return((n=e==null?void 0:e.productCategories)==null?void 0:n[39])==="BAZAR"?"Sale":"Coleção"},()=>e.item_category||e.category,()=>e.categories[0]];for(const n of t){const s=n();if(s!=null)return s}return null}function nn(e){const t=[()=>Object.values((e==null?void 0:e.productCategories)||{}).pop(),()=>Object.values((e==null?void 0:e.categories)||{}).pop(),()=>{var n,s,o,a,i;return(i=(a=(o=(s=(n=e==null?void 0:e.category)==null?void 0:n.split)==null?void 0:s.call(n,">"))==null?void 0:o[1])==null?void 0:a.trim)==null?void 0:i.call(a)},()=>e.item_category2];for(const n of t){const s=n();if(s!=null)return s}return null}function Gi(e){var t;const n=((t=e==null?void 0:e.additionalInfo)==null?void 0:t.tags)||(e==null?void 0:e.tags);return Array.isArray(n)&&n.length?n.join(","):null}var Rp={farm:"farmrio","farm etc":"farmetc","farm rio":"farmrio"};function ro(e){if(!e)return null;const t=e.toLowerCase().trim();return Rp[t]||null}function st(e){var t;let n=[];if(Array.isArray(e)&&e.every(a=>typeof a=="string"))n=e;else if(Array.isArray(e))n=e.map(a=>{var i;return((i=a.additionalInfo)==null?void 0:i.brandName)||a.brand});else if(typeof e=="object"&&e!==null&&"brand"in e)n=[((t=e.additionalInfo)==null?void 0:t.brandName)||e.brand];else return typeof e=="string"?ro(e):null;const s=n.map(ro).filter(a=>a!==null),o=[...new Set(s)].sort();return o.length>0?o.join("_"):null}function Ap(e){var t;if(!e.orderForm&&!((t=e.orderForm.items)!=null&&t.length))return null;const n=e.orderForm.items;return st(n)}function Tp(e){var t;const{item:n}=e;return st(((t=n==null?void 0:n.additionalInfo)==null?void 0:t.brandName)||n.brand||n.item_brand)}function Lp(e,t){if(e!=null&&e.brand)return st(e.brand)||e.brand||null;switch(t){case"CUSTOM_VIEW_CART":case"ADD_COUPON":case"ADD_PERSONAL_INFO":case"CUSTOM_ADD_SHIPPING_INFO":case"CUSTOM_ADD_PAYMENT_INFO":case"BEGIN_CHECKOUT":case"CUSTOM_BEGIN_CHECKOUT":case"SEARCH_ZIPCODE":case"ORDER_REVIEWED":case"PURCHASE":case"CUSTOM_PURCHASE":return Ap(e);case"ADD_TO_CART":case"REMOVE_FROM_CART":return Tp(e);default:return null}}async function Op(e){var t;const n=((t=e.orderForm)==null?void 0:t.items)||[];return n.length?await Promise.all(n.map(async s=>{var o,a,i;return{item_id:s.productId,item_category2:nn(s),item_category4:Gi(s),item_shipping_tier:Vi(e.orderForm,s),price:parseFloat((s.price/100).toFixed(2))||0,quantity:s.quantity||1,item_ref:s.refId||null,item_brand:st((o=s.additionalInfo)==null?void 0:o.brandName)||((a=s.additionalInfo)==null?void 0:a.brandName)||null,item_sku:await Wi(s)||s.id||null,item_name:s.name||s.id||null,item_category:bt(s)||null,item_variant:s.skuName.split(/[-/]/)[0].trim(),item_variant2:((i=s.skuName.split(/[-/]/).pop())==null?void 0:i.trim())||"",discount:$n(s)}})):[]}async function kp(e,t){var n,s,o;const{item:a,orderForm:i}=e;return[{index:0,quantity:1,item_id:a.productId||a.item_group_id||a.sku||null,item_category2:nn(a),item_category4:Gi(a),item_shipping_tier:t==="REMOVE_FROM_CART"?Vi(i,a):null,price:a.listPrice||parseFloat((a.price/100).toFixed(2))||0,item_ref:a.refId||a.item_ref||(a==null?void 0:a.additionalProperty.find(c=>c.name==="RefId").value)||null,item_brand:((n=a.additionalInfo)==null?void 0:n.brandName)||a.item_brand||a.brand.name||null,item_sku:a.sku||a.id||a.item_id||await Wi(a)||null,item_name:a.name||a.item_name||null,item_category:bt(a)||null,item_variant:(a.skuName||a.item_variant||a.name).split(/[-/]/)[0].trim()||null,item_variant2:a.size||((s=a==null?void 0:a.itemAttributes)==null?void 0:s.size)||((o=(a.skuName||a.name).split(/[-/]/).pop())==null?void 0:o.trim())||null,discount:$n(a),item_list_name:bt(a)||null,item_url:a.item_url||null}]}async function Dp(e){return((e==null?void 0:e.list)||[]).map(t=>{var n,s,o,a;return{price:((n=t==null?void 0:t.price)==null?void 0:n.list)||(t==null?void 0:t.price)||((s=t==null?void 0:t.offers)==null?void 0:s.lowPrice)||0,quantity:1,item_ref:(t==null?void 0:t.ref)||(t==null?void 0:t.item_ref)||(t==null?void 0:t.additionalProperty.find(i=>i.name==="RefId").value)||null,index:typeof(e==null?void 0:e.index)=="number"?e.index:null,item_brand:st((o=t==null?void 0:t.brand)==null?void 0:o.name)||st(e.brand)||st(t==null?void 0:t.item_brand)||null,item_name:(t==null?void 0:t.productName)||(t==null?void 0:t.alternateName)||(t==null?void 0:t.item_name)||null,item_category:bt(t)||null,item_variant:((a=t==null?void 0:t.name)==null?void 0:a.split("-")[0].trim())||(t==null?void 0:t.item_variant)||null,item_category2:nn(t)||null,item_id:(t==null?void 0:t.productID)||(t==null?void 0:t.productId)||(t==null?void 0:t.item_id)||null,discount:$n(t)||null,item_list_name:(e==null?void 0:e.itemListName)||bt(t)||null}})}async function Mp(e){var t,n,s;const{item:o}=e;return[{price:e.value||0,quantity:1,item_ref:o.ref||o.additionalProperty.find(a=>a.name==="RefId").value||null,item_brand:st(o.brand.name)||st(e.brand)||null,item_name:o.productName||o.alternateName||null,item_category:bt(o)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-")[0].trim())||null,item_category2:nn(o)||((s=(n=o==null?void 0:o.category)==null?void 0:n.split(">")[1])==null?void 0:s.trim())||null,item_id:(o==null?void 0:o.productID)||(o==null?void 0:o.productId)||o.item_group_id||null,discount:$n(o)||null,item_sku:(o==null?void 0:o.sku)||(o==null?void 0:o.productId)||null,item_url:o.url||o.item_url||null,seller_id:o.seller||null}]}async function $p(e){var t;if(!Ip(e==null?void 0:e.bannerUrl))return[];const s=await wp(e==null?void 0:e.bannerUrl),o=s==null?void 0:s.items[0];return{price:(o==null?void 0:o.sellers[0].commertialOffer.Price)||0,quantity:1,item_ref:qi(e==null?void 0:e.bannerUrl),item_brand:st(s.brand)||null,item_name:(s==null?void 0:s.productName)||(s==null?void 0:s.alternateName)||(s==null?void 0:s.item_name)||null,item_category:bt(s)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-").pop().trim())||null,item_category2:nn(s)||null,item_id:(s==null?void 0:s.productId)||null,discount:(o==null?void 0:o.sellers[0].commertialOffer.ListPrice)-(o==null?void 0:o.sellers[0].commertialOffer.Price)||null}}function zp(e,t){if(e!=null&&e.items)return e.items;switch(t){case"CUSTOM_VIEW_CART":case"BEGIN_CHECKOUT":case"CUSTOM_BEGIN_CHECKOUT":case"CUSTOM_ADD_SHIPPING_INFO":case"CUSTOM_ADD_PAYMENT_INFO":case"PURCHASE":case"CUSTOM_PURCHASE":return Op(e);case"ADD_TO_CART":case"ADD_TO_WISHLIST":case"REMOVE_FROM_CART":return kp(e,t);case"SELECT_ITEM":case"VIEW_ITEM_LIST":return Dp(e);case"VIEW_ITEM":return Mp(e);case"VIEW_PROMOTION":case"SELECT_PROMOTION":return $p(e);default:return null}}function Fp(e){var t,n,s;if(!e.orderForm)return null;const o=((t=e.orderForm.paymentData)==null?void 0:t.payments)||[],a=((n=e.orderForm.paymentData)==null?void 0:n.paymentSystems)||[];if(!o.length||!a.length)return null;const i=o.find(f=>f==null?void 0:f.paymentSystem)||o[0],c=String((i==null?void 0:i.paymentSystem)||"").trim();if(!c)return null;const l=a.find(f=>String(f.id)===c),u=((s=l==null?void 0:l.name)==null?void 0:s.toLowerCase())||"",m=Hi.find(([f])=>u.includes(f));return m?m[1]:null}function Bp(e){var t,n,s,o;if(!e.orderForm)return null;const a=((t=e.orderForm.paymentData)==null?void 0:t.transactions)||[];if(!a.length)return null;const i=((n=a[0])==null?void 0:n.payments)||[];if(!i.length)return null;const c=((o=(s=i[0])==null?void 0:s.paymentSystemName)==null?void 0:o.toLowerCase())||"",l=Hi.find(([u])=>c.includes(u));return l?l[1]:null}function Up(e,t){if(e!=null&&e.paymentType)return e.paymentType;switch(t){case"ORDER_REVIEWED":case"CUSTOM_ADD_PAYMENT_INFO":return Fp(e);case"PURCHASE":case"CUSTOM_PURCHASE":return Bp(e);default:return null}}var Hp={brand:Lp,items:zp,payment_type:Up,user_info:async(e,t)=>{var n;const o=(n={animale:{store:"https://www.animale.com.br",checkout:"https://secure.animale.com.br"},farm:{store:"https://lojafarm.myvtex.com"},mariafilo:{store:"https://mariafilo.myvtex.com",checkout:"https://secure.mariafilo.com.br"},crisbarros:{store:"https://lojacrisbarros.myvtex.com",checkout:"https://secure.lojacrisbarros.com.br"},lojaoffpremium:{store:"https://lojaoffpremium.myvtex.com",checkout:"https://secure.lojaoffpremium.com.br"}}[e.account||"https://www.animale.com.br"])==null?void 0:n[e.platform||"store"];if(!o)return null;try{const a=`${o}/_v/user-info`;return await(await fetch(a,{method:"POST",body:JSON.stringify({email:e.userEmail})})).json()}catch{return null}},content_type:(e,t)=>"regiao".concat(":"+e.category).concat(e.subcategory?":"+e.subcategory:"").concat(":"+e.componentName)||null,region:(e,t)=>e.region||null,line_items:(e,t)=>e!=null&&e.lineItems?e.lineItems:e!=null&&e.item?[e.item.productId||e.item.productID||e.item.item_id]:e!=null&&e.list?e.list.map(n=>n.productID):(e.orderForm.items||[]).map(n=>n.productId).join(","),currency:(e,t)=>{var n,s,o,a;return e!=null&&e.currency?e.currency:e!=null&&e.bannerUrl?"BRL":e!=null&&e.item?((s=(n=e.item)==null?void 0:n.offers)==null?void 0:s.priceCurrency)||"BRL":((a=(o=e.orderForm)==null?void 0:o.storePreferencesData)==null?void 0:a.currencyCode)||null},value:(e,t)=>{var n;return e!=null&&e.value?e.value:e.item?e.item.price:((n=e.orderForm)==null?void 0:n.value)!=null?e.orderForm.value/100:null},total_discount:(e,t)=>{var n,s;const a=(((n=e.orderForm)==null?void 0:n.totalizers)||((s=e.orderForm)==null?void 0:s.totals)||[]).find(i=>i.id==="Discounts");return a?Math.abs(a.value)/100:0},subtotal:(e,t)=>{var n,s;return(((n=e.orderForm)==null?void 0:n.totalizers)||((s=e.orderForm)==null?void 0:s.totals)||[]).filter(i=>i.id==="Items").reduce((i,c)=>i+(c.value||0),0)/100||0},coupon_message:(e,t)=>{var n;if(e.couponMessage)return e.couponMessage;const s=((n=e.orderForm)==null?void 0:n.messages)||[];if(s.length===0)return null;const o=s.filter(a=>a.text.toLowerCase().includes("cupom"));return o.length===0?null:o.map(a=>a.text).join(" | ")},seller_cod_name:(e,t)=>e.appliedSellerCodName||(e==null?void 0:e.orderForm.marketingData.utmiCampaign)||null,coupon:(e,t)=>{var n,s;return e.appliedCoupon||((s=(n=e==null?void 0:e.orderForm)==null?void 0:n.marketingData)==null?void 0:s.coupon)||null},pre_filled:(e,t)=>!!e.preFilled,search_term:(e,t)=>e.searchTerm||null,search_found:(e,t)=>!!e.searchFound,search_quantity:(e,t)=>e.searchQuantity||0,promotion_name:(e,t)=>e.promotionName||null,creative_name:(e,t)=>e.creativeName||null,creative_slot:(e,t)=>e.creativeSlot||null,zipcode:(e,t)=>e.zipCode||null,size:(e,t)=>e.size||null,item_ref:(e,t)=>e.itemRef||null,flag_pickup:(e,t)=>{var n;const s=e.orderForm;return s?(((n=s.shippingData)==null?void 0:n.logisticsInfo)||[]).some(i=>{var c;return(c=i.slas)==null?void 0:c.some(l=>l.deliveryChannel==="pickup-in-point")}):null},shippings:(e,t)=>{const n=e.orderForm;if(!n)return null;const s={};for(const a of n.shippingData.logisticsInfo){const i=n.items[a.itemIndex];if(i)for(const c of a.slas){const l=c.name;s[l]||(s[l]={shipping_tier:c.name,delivery_time:parseInt(c.shippingEstimate),shipping:parseFloat((c.price/100).toFixed(1)),line_items:[]}),s[l].line_items.push(i.id)}}return Object.values(s).map(a=>({shipping:a.shipping,shipping_tier:a.shipping_tier,delivery_time:a.delivery_time,line_items:a.line_items.join(",")}))||null},shipping:(e,t)=>{var n,s,o;return((o=(s=(n=e==null?void 0:e.orderForm)==null?void 0:n.shippingData)==null?void 0:s.logisticsInfo)!=null?o:[]).reduce((i,c)=>{var l,u;const m=(l=c.slas)==null?void 0:l.find(f=>f.id===c.selectedSla);return i+((u=m==null?void 0:m.price)!=null?u:0)},0)},shipping_tier:(e,t)=>{var n,s,o,a;const c=((o=(s=(n=e==null?void 0:e.orderForm)==null?void 0:n.shippingData)==null?void 0:s.logisticsInfo)!=null?o:[]).find(p=>p.selectedSla);if(!c)return null;const l=(a=c.slas)==null?void 0:a.find(p=>p.id===c.selectedSla);if(!l)return null;const{deliveryChannel:u,name:m,pickupStoreInfo:f}=l;return u==="pickup-in-point"?`retirada em loja${f!=null&&f.friendlyName?`: ${f.friendlyName}`:""}`:u==="delivery"?`receba em casa${m?`: ${m}`:""}`:null},transaction_id:(e,t)=>{var n,s;return((s=(n=e.orderForm)==null?void 0:n.orderGroup)==null?void 0:s.toString())||null},available_grid:(e,t)=>e.availableGrid||null};async function qp(e={},t){const n=Ui[t];return n?Object.fromEntries(await Promise.all(n.requiredParams.map(async o=>{const a=Hp[o];return typeof a!="function"?(console.error(`[DT] Missing paramGetter for param: ${o}`),[o,null]):[o,await a(e,t)]}))):void 0}async function Vp(e,t={}){try{const n=await qp(t,e);return await Pp(e,Object.assign({},n,{window:t.window}))}catch(n){return console.error(`[DT] Error tracking event ${e}:`,n)}}const Wp=({accountName:e=""})=>{const{sendDataLayerEvent:t}=oe(),{user:n}=zt(),{cartStore:s}=ve();return g.useEffect(()=>{if(!n)return;(async()=>{const{userId:a,email:i,firstName:c,lastName:l,phone:u,homePhone:m,postalCode:f,street:p,number:h,city:_,gender:y}=n,x=new TextEncoder().encode(a),b=await crypto.subtle.digest("SHA-256",x),j=Array.from(new Uint8Array(b)).map(v=>v.toString(16).padStart(2,"0")).join("");i&&Vp("CUSTOM_USER_INFO",{userEmail:i,platform:"store",account:e}),t({functionKey:"readyEvents",data:{readyData:{user_id:j,email:i,first_name:c,last_name:l,phone:u||m,zip:f,street:p,street_number:h,city:_,gender:y,orderform_id:s==null?void 0:s.id}}})})()},[n,s.id]),null},Ki=g.createContext({amount:null,boxes:null,toExpire:null,loading:!0,logout:()=>null,getCurrentCredits:()=>({credits:0,cashback:0})}),Gp=({children:e,AUTH_TOKEN_COOKIE:t,accountName:n})=>{var f;const{shipping:s,cartStore:o}=ve(),[a,i]=g.useState({amount:null,boxes:null,toExpire:null,loading:!0}),c=g.useCallback(async()=>{try{await fetch("/api/user",{priority:"low"}).then(p=>p.json()).then(p=>{const{userCredits:h,..._}=p,{wishlist:y,...x}=_;i({amount:h==null?void 0:h.amount,boxes:h==null?void 0:h.boxes,toExpire:h==null?void 0:h.toExpire,user:x,loading:!1,wishlist:(typeof y=="string"?y.split(","):y)??[]})})}catch(p){console.error("my credits request",p),i({...a,loading:!1})}},[i]),l=g.useCallback(()=>{As(t),c()},[c]),u=g.useCallback(()=>a.boxes?a.boxes.reduce((p,h)=>h.gift_card_box.refid==="C1643"?(p.cashback+=h.amount,p):(p.credits+=h.amount,p),{cashback:0,credits:0}):{cashback:0,credits:0},[a]),m=g.useCallback(async()=>{var p,h,_;if((p=a.user)!=null&&p.postalCode&&(o!=null&&o.id)&&!(o!=null&&o.loading)&&!((_=(h=o==null?void 0:o.shippingData)==null?void 0:h.address)!=null&&_.postalCode))try{await s(a.user.postalCode)}catch(y){console.error("Error auto-filling CEP:",y)}},[(f=a.user)==null?void 0:f.postalCode]);return g.useEffect(()=>{c()},[c]),g.useEffect(()=>{m()},[m]),r.jsxs(Ki.Provider,{value:g.useMemo(()=>({...a,getCurrentCredits:u,logout:l}),[a,u,l]),children:[r.jsx(Wp,{accountName:n}),e]})},zt=()=>{const e=g.useContext(Ki);if(e===void 0)throw new Error("useContext(SessionContext) must be used within a SessionProvider");return e},Xi=({color:e,delay:t=3e3,sku:n,setStatus:s,setIsLoading:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i})=>{const c=g.useRef(null),[l,u]=g.useState(null),{sendDataLayerEvent:m}=oe(),{user:f}=zt(),p=f!=null&&f.firstName?`${f==null?void 0:f.firstName} ${f==null?void 0:f.lastName}`:"";return r.jsx("div",{className:Qe["notify--form"],children:r.jsxs("form",{action:"POST",onSubmit:async h=>{var x;h.preventDefault();const _=h.currentTarget,y=((x=_.querySelector("input"))==null?void 0:x.value)??"";fetch("/api/aviseme",{method:"POST",body:JSON.stringify({userName:p,email:y,sku:n==null?void 0:n.skuID})}).then(b=>s(b.ok)).finally(()=>{o(!1),_.reset(),m({functionKey:"readyEvents",data:{event:"notify_me",readyData:{size:n==null?void 0:n.size,item_id:n==null?void 0:n.skuID,color:e}}}),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{var b;(b=document.body)==null||b.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0})),u(!0),s(null)},t)})},children:[r.jsx(d.TextField.Structure,{input:r.jsx(d.TextField.Input,{feedback:typeof l=="boolean"&&l?"error":"none",type:"email",label:i.email_placeholder,mode:"over-label",variant:"outlined",sizeVariant:"large",onChange:h=>u(!h.target.validity.valid),required:!0}),supportText:typeof l=="boolean"&&l?r.jsx(d.TextField.SupportText,{text:a.messages.invalid_email,feedback:"error"}):r.jsx(r.Fragment,{})}),r.jsx(d.Button,{disabled:!(l===!1||!n)||!n,type:"submit",size:"large",children:i.button})]})})};Xi.displayName="Notify.Form";const Yi=({isLoading:e=!1})=>r.jsx("div",{className:Qe["notify--loading"],"data-loading":e,children:r.jsx(d.Spinner,{})});Yi.displayName="Notify.Loading";const Ts={"product-variation-list--list":"_product-variation-list--list_e0he8_1","product-variation-list--title":"_product-variation-list--title_e0he8_10","product-variation-list":"_product-variation-list_e0he8_1"},Qi=({children:e,...t})=>r.jsx("div",{...t,className:Ts["product-variation-list--list"],children:e});Qi.displayName="ProductVariationList.List";const Zi=({fill:e="#1352C7",src:t="",type:n="size",text:s,...o})=>{const{nextimage:a}=ce();return n==="size"?r.jsxs(d.ToggleSize.Wrapper,{...o,size:"large",variation:"ghost",children:[r.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-size"}),r.jsx(d.ToggleSize.Text,{children:s})]}):r.jsxs(d.ToggleStyle.Wrapper,{...o,size:"small",title:"wrapper-texture",children:[r.jsx(d.ToggleStyle.DisabledAdornment,{title:"disabled-adornment-texture"}),n==="color"?r.jsx(d.ToggleStyle.Color,{background:e,title:"color"}):r.jsx(d.ToggleStyle.Texture,{title:"texture",children:r.jsx(a,{alt:s??"image",height:40,src:t,width:40})})]})};Zi.displayName="ProductVariationList.Option";const Ji=({children:e,...t})=>r.jsx("div",{className:Ts["product-variation-list"],...t,children:e});Ji.displayName="ProductVariationList.Root";const ec=({children:e,title:t,...n})=>r.jsxs("div",{...n,className:Ts["product-variation-list--title"],children:[t?r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.SectionWrapper,{children:r.jsx("p",{children:t})})}):r.jsx(r.Fragment,{}),e]});ec.displayName="ProductVariationList.Title";const Je={List:Qi,Option:Zi,Title:ec,Root:Ji},Kp=(e,t)=>{if(!e||!t)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(s=>e[s]===t[s])},tc=({children:e,label:t="",skus:n,sku:s,setSku:o})=>r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Qe["notify--selector--header"],children:e}),r.jsxs(Je.Root,{className:Qe["notify--selector"],children:[r.jsx(Je.Title,{title:t}),r.jsx(Je.List,{children:Array.isArray(n)&&n.map((a,i)=>{const c=Kp(s,a);return r.jsx(Je.Option,{active:c,onClick:()=>o(c?null:a),text:String(a.size),type:"size"},i)})})]})]});tc.displayName="Notify.Selector";const so=({type:e,icon:t,title:n,subtitle:s})=>r.jsx("div",{className:Qe[`notify--status--${e}`],children:r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:t,size:"large"})},children:r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("h2",{children:n}),r.jsx("h3",{children:s})]})})}),nc=({status:e,ICONS:t,PRODUCT_CARD_TEXTS:n})=>r.jsxs("div",{className:Qe["notify--status"],"data-status":e,children:[r.jsx(so,{...n.success,icon:t.check_circle,type:"success"}),r.jsx(so,{...n.error,icon:t.alert_circle,type:"error"})]});nc.displayName="Notify.Status";const Ls=({color:e,open:t,setVisible:n,skus:s,sku:o,setSku:a,ICONS:i,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l,PRODUCT_CARD_TEXTS:u,Z_INDEX_WAR:m})=>{const[f,p]=g.useState(!1),[h,_]=g.useState(null),{isMobile:y}=ne();return r.jsxs(d.Modal.Root,{isMobile:y??!1,isOpen:t,setIsOpen:n,variant:y?"sideBottom":"sideLeft",style:{zIndex:m.modal},className:Qe["modal-modifier"],children:[r.jsx(d.Modal.Header,{navigation:"top",className:Qe["notify--header-modifier"],children:r.jsx(Fi,{isMobile:y??!1,ICONS:i,NOTIFY_INFO:l})}),r.jsxs(d.Modal.Body,{className:Qe["notify--modal--body"],children:[r.jsxs("div",{className:Qe["notify--container"],children:[r.jsxs(tc,{label:l.selector_label,sku:o,skus:s,setSku:a,children:[r.jsx("p",{children:l.subtitle}),r.jsx("span",{children:l.description})]}),r.jsx(Xi,{delay:4e3,sku:o,setStatus:_,setIsLoading:p,color:e,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l}),r.jsx(Yi,{isLoading:f}),r.jsx("div",{className:Qe["notify--selector--header"],children:r.jsx("span",{children:l.legal})})]}),r.jsx(nc,{status:h,ICONS:i,PRODUCT_CARD_TEXTS:u})]})]})};Ls.displayName="Notify";const zn=({skus:e,ICONS:t,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:a,...i})=>{const c=Mn(e??[]);return r.jsx(Ls,{skus:c,ICONS:t,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:a,...i})};zn.displayName="PDC.Notification";const rc=g.createContext({}),sc=({banners:e,children:t})=>{const{searchParams:n,ITEMS_PER_PAGE:s,ICONS:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l}=De(),{router:u}=ce(),{sendDataLayerEvent:m}=oe(),{isMobile:f}=ne(),{state:p}=ze(),{addPage:h,createPages:_,updateProducts:y,...x}=xp(),b=f?8:16,C=f?2:4,j=g.useRef(!1),v=g.useRef(p),[P,S]=g.useState(!1),[E,I]=g.useState(null),[A,L]=g.useState([]),O=g.useCallback(F=>{F&&"pagination"in F&&m({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:F.products}}})},[m]),D=g.useCallback(F=>{if(F.pagination.nextPage===!0){const Y=F.page+1,G=Jr(e,Y,C,s);h({...p,page:Y},G,O)}},[h,e,O,C,s,p]),Q=g.useCallback(F=>{F.loading===!1&&y({...p,page:F.page},O)},[O,y,p]),M=g.useCallback(F=>{const Y=new URLSearchParams(n);F.page!==Number(Y.get("page")??1)&&(Y.set("page",String(F.page)),u.replace(`?${Y.toString()}`,{scroll:!1}))},[u,n]),U=g.useCallback((F,Y)=>{const G=Y?Mn([Y]):null;L(F),I(G!=null&&G.length?G[0]:null),S(!0)},[]);return g.useEffect(()=>{const F=!j.current,Y=Ti(v.current,p),G=Jr(e,p.page,C);F?_(p,G,O,s):Y&&(_(p,G,O,s),v.current=p),j.current=!0},[e,_,O,C,s,p]),r.jsxs(rc.Provider,{value:g.useMemo(()=>({...x,addPage:h,addNewPage:D,createPages:_,gap:b,columns:C,handleNotify:U,updatePage:Q,updateProducts:y,updateParamPage:M}),[h,D,_,U,b,C,x,Q,y,M]),children:[t,r.jsx(zn,{open:P,sku:E,skus:A,setSku:I,setVisible:S,ICONS:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l})]})},ct=()=>{const e=g.useContext(rc);if(e===void 0)throw new Error("PLPInfiniteScrollContext must be used within a ScrollInfiniteProvider");return e},oc=g.createContext({gridBanners:void 0,banners:[]}),Xp=({children:e,data:t,device:n,SectionZone:s,COMMON_PAGE_COLUMN_GAP_PDC:o})=>{const{isMobile:a}=ne(),i=(t==null?void 0:t.sections.filter(f=>f.name!=="List Product Banners"))??[],c=i.slice(0,to),l=i.slice(to,i.length),u=t==null?void 0:t.sections.find(f=>f.name==="List Product Banners"),m=g.useMemo(()=>{var f,p;return((p=(f=u==null?void 0:u.data)==null?void 0:f.banners)==null?void 0:p.map(h=>({...h.banner,columns:h.bannerWidth,position_grid:h.bannerPosition})))??[]},[u]);return a&&n==="mobile"||!a&&n==="desktop"?r.jsxs(oc.Provider,{value:{gridBanners:u,banners:m},children:[r.jsx(s,{data:c??[]}),r.jsxs(d.Utils.Column,{gap:o,className:d.helpers.classNameConcat("utils-column-modifier"),children:[e,r.jsx(s,{data:l??[]})]})]}):r.jsx(r.Fragment,{})},Fn=()=>{const e=g.useContext(oc);return e===void 0&&console.error("Needs PLPContentContext on parent component"),e},ac=g.createContext({}),ic=({children:e,filters:t,PLP_FILTERS:n,...s})=>{var a;const o=(a=t.facets)==null?void 0:a.filter(i=>n.find(c=>c.key===i.key));return r.jsx(ac.Provider,{value:g.useMemo(()=>({...s,filters:{...t,facets:o}}),[t,o,s]),children:e})},Ft=()=>{const e=g.useContext(ac);if(e===void 0)throw new Error("useFilterContext must be used within a FilterProvider");return e},cc=g.createContext({product:void 0}),Yp=({children:e,data:t,productId:n,COMMON_PAGE_COLUMN_GAP:s,SectionZone:o})=>r.jsxs(cc.Provider,{value:{productId:n},children:[e,r.jsx(d.Utils.Column,{gap:s,className:d.helpers.classNameConcat("utils-column-modifier"),children:r.jsx(o,{data:(t==null?void 0:t.sections)??[]})})]}),lc=()=>{const e=g.useContext(cc);return e||console.error("use this hook only inside PDPContentProvider hierarchy"),e},Qp=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase().trim();function Zp(e,t=1e3){let n=!1;return(...s)=>{n||(e(...s),n=!0,setTimeout(()=>{n=!1},t))}}function Jp(e,t=1e3){let n;return(...s)=>{clearTimeout(n),n=setTimeout(()=>{e(...s)},t)}}const uc=(e,t)=>t.getTime()>e.getTime()?Math.abs(t.getTime()-e.getTime()):0,Ht=(e,t)=>Math.floor(t==="days"?e/(1e3*60*60*24):t==="hours"?e%(1e3*60*60*24)/(1e3*60*60):t==="minutes"?e%(1e3*60*60)/(1e3*60):e%(1e3*60)/1e3),ef=e=>{const t=gm.decodeJwt(e??"");return{email:t.sub,userId:t.userId}},tf=["name","email","phone","date","cpf","cep"],oo={email:/\S+@\S+\.\S+/,name:new RegExp("^\\p{L}+( \\p{L}+)*$","u"),phone:/^\d{10,11}|\(\d{2}\)\s?\d{4,5}-\d{4}$/,date:/^\d{6,8}|^\d{2}\/\d{2}\/\d{2,4}$/,cep:/^\d{5}[-]?\d{3}$/,cpf:/^\d{11}|\d{3}\.\d{3}\.?\d{3,5}\-[\d]{2}$/},dc=({type:e,input:t,required:n=!1})=>{if(typeof t!="string"||!n&&t===""||!oo[e])return!0;const s=t.trim();return oo[e].test(s)},nf=e=>{const t=/\/(\d+)-\d+-\d+\/(.+?)\./,n=typeof e=="string"?e.match(t):null;return n?n[2].replace(/-/g," "):ap},rf=Object.freeze(Object.defineProperty({__proto__:null,FieldTypes:tf,debounce:Jp,getAltTextFromUrl:nf,getAuthenticatedUser:ef,getCookie:Bi,getDaysHoursMinutesSeconds:Ht,getMilliSeconds:uc,removeAccentsAndReplaceSpaces:Qp,setCookie:As,throttle:Zp,validateInput:dc},Symbol.toStringTag,{value:"Module"})),sf=({fields:e})=>{const t={};return{mountedFields:(e==null?void 0:e.reduce((s,o)=>(t[o.master_data_field]="none",{...s,[o.master_data_field]:o}),{}))??{},mountedInputsStatus:t}},of=({formData:e,mountedFields:t,inputsStatus:n,hasTermsAndConditions:s,checkboxRef:o,setFormStatus:a})=>{let i=!1,c=!1;const l={...n};return s&&!o.current&&(a("unchecked"),i=!0),e.forEach((u,m)=>{var h;if(m==="terms-and-conditions")return;const f=(h=t[m])==null?void 0:h.required;if(f&&!u){l[m]="required",i=!0;return}dc({type:t[m].type,input:u,required:f})||(l[m]="error",c=!0),typeof u=="string"&&e.set(m,u.toString().trim())}),{hasEmptyFields:i,hasErrors:c,inputStatusToUpdate:l}},mc=g.createContext({}),pc=({children:e,masterDataEmailField:t,fields:n,variant:s,CONSTANTS:{MASTER_DATA_ENTITY:o,NEWSLETTER_CONFIGS:a}})=>{const{sendDataLayerEvent:i}=oe(),c=a.hasTermsAndConditions,{mountedFields:l,mountedInputsStatus:u}=g.useMemo(()=>sf({fields:n}),[n]),m=g.useRef(!1),[f,p]=g.useState("idle"),[h,_]=g.useState(u),y=async({searchFields:S,entity:E})=>{const I=await yt.post("/api/master-data/search",{body:{masterDataEntity:E,searchFields:S,headers:{"REST-Range":"resources=0-49"}}});return console.info(I),I.data},x=async({documentId:S,fieldsToBeUpdated:E,entity:I})=>(await yt.post("/api/master-data/update",{dataEntityName:I,documentId:S,fieldsToBeUpdated:E})).status,b=g.useCallback(async({payload:S,response:E},I,A)=>{var M;const{email:L,...O}=S,[D]=await y({searchFields:{[I]:L},entity:A??o.newsletter}),Q=Array.isArray(D)?(M=D[0])==null?void 0:M.id:void 0;return D&&await x({documentId:Q,fieldsToBeUpdated:O,entity:A??o.newsletter})!==204?{...E,status:"error"}:{...E,status:"success"}},[]),C=g.useCallback(async({formData:S},E,I)=>{const A={status:"idle",inputsStatus:{}},L={};S.forEach((O,D)=>{L[D]=O});try{const D=(await yt.post("/api/master-data",{body:{payload:L,masterDataEntity:E??o.newsletter}})).data;return(D==null?void 0:D.Message)==="duplicated entry"?b({payload:L,response:A},I,E):D!=null&&D.Id?{...A,status:"success"}:{...A,status:"error"}}catch(O){return console.error("error",O),{...A,status:"error"}}},[b]),j=g.useCallback(async(S,E,I)=>{S.preventDefault();const A=new FormData(S.target);if(A.append("acceptedTerms",m.current?"true":"false"),m.current){const O=new Gr.TZDate(new Date,"America/Sao_Paulo").toISOString();A.append("termsAcceptedAt",O)}E&&Object.keys(E).forEach(O=>{A.append(O,E[O])});const L=await C({formData:A},I??"",t);L&&(p(L==null?void 0:L.status),_(L.inputsStatus),L.status==="success"&&i({functionKey:"readyEvents",data:{event:"generate_lead"}}))},[t,C,p,_,i]),v=g.useCallback(S=>{const E=new FormData(S.currentTarget.parentElement),{hasEmptyFields:I,hasErrors:A,inputStatusToUpdate:L}=of({formData:E,mountedFields:l,inputsStatus:h,hasTermsAndConditions:c,checkboxRef:m,setFormStatus:p});if(_(L),I||A){S.preventDefault();return}p("loading")},[l,h,c,m]),P=g.useCallback(()=>{p("idle"),_(u)},[u]);return r.jsx(mc.Provider,{value:g.useMemo(()=>({formStatus:f,handleSubmit:j,setFormStatus:p,inputsStatus:h,setInputsStatus:_,hasTermsAndConditions:c,handleClickToSubmit:v,checkboxRef:m,masterDataEmailField:t,fields:n,variant:s,resetNewsletter:P}),[f,j,p,h,_,v,c,m,t,n,s,P]),children:e})},Os=()=>{const e=g.useContext(mc);if(e===void 0)throw new Error("useNewsletterContext must be used within a NewsletterProvider");return e},fc=g.createContext({}),hc=({children:e,data:t})=>{const[n,s]=g.useState(),[o,a]=g.useState(),i=g.useCallback(u=>{const m=t.filter(f=>f.cidade===u);s(m)},[t]),c=g.useCallback(u=>{a(u)},[]),l=g.useCallback(()=>{a("")},[]);return r.jsx(fc.Provider,{value:g.useMemo(()=>({clearSelectedStore:l,data:t,handleSelectCity:i,handleSelectStore:c,selectedCity:n,selectedStore:o}),[l,t,i,c,n,o]),children:e})},Bn=()=>{const e=g.useContext(fc);if(e===void 0)throw new Error("useLPStoreContext must be used within a LPStoreProvider");return e},_c={contexts:{addToCart:{hook:Pt,provider:ji},cart:{hook:ve,provider:np},cms:{FlagsAndTags:{context:fs,hook:ht,provider:ym}},newsletter:{hook:Os,provider:pc},events:{hook:oe,provider:Pm},global:{hook:ne,provider:Um,mediator:Za},header:{hook:Ee,provider:Jm},menuMobile:{hook:Ss,provider:vi},next:{hook:ce,provider:Hm},pdp:{provider:xm},PDPContent:{provider:Yp,hook:lc},plp:{provider:hp,hook:ws},plpFilter:{hook:Ft,provider:ic},PLPContent:{provider:Xp,hook:Fn},plpInfinite:{provider:sc,hook:ct},pdpdata:{provider:Nm},searchFacets:{hook:wi,provider:Ii},searchProducts:{hook:tn,provider:Is},searchRoot:{hook:Ps,provider:Es},searchSearch:{hook:ze,provider:Ns},session:{hook:zt,provider:Gp},ui:{hook:Qt,provider:Qa},lpStore:{hook:Bn,provider:hc}},hooks:{useBackPDC:va,useClipboard:Im,useDisableZoom:Ra,useLocalStorage:Rm,useOnScreen:hs,useSentinel:kn,useTouchZoomPan:Aa},stores:{cart:Fm,header:Vm,pdp:Qm,wishlist:Zm}},af={cart:Mm,events:Em,plp:gp,product:T.productHelpers,utils:rf},ks={helpers:af},He={"add-to-cart--card":"_add-to-cart--card_4v41y_1","add-to-cart--card--content":"_add-to-cart--card--content_4v41y_7","add-to-cart--card--name":"_add-to-cart--card--name_4v41y_16","add-to-cart--card--price-quantity":"_add-to-cart--card--price-quantity_4v41y_46","add-to-cart--card--style-size":"_add-to-cart--card--style-size_4v41y_53","add-to-cart--content":"_add-to-cart--content_4v41y_71","add-to-cart--content--title":"_add-to-cart--content--title_4v41y_78","add-to-cart--footer":"_add-to-cart--footer_4v41y_102","add-to-cart--footer--total":"_add-to-cart--footer--total_4v41y_108","add-to-cart--items":"_add-to-cart--items_4v41y_148","add-to-cart--tooltip":"_add-to-cart--tooltip_4v41y_198","add-to-cart__modal":"_add-to-cart__modal_4v41y_211"},gc=({brand:e,className:t,name:n,...s})=>r.jsxs("div",{...s,className:d.helpers.classNameConcat(He["add-to-cart--card--name"],t),children:[r.jsx(d.Tag,{style:{textTransform:"uppercase"},size:"small",variant:"quaternary",title:e,children:e}),r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:r.jsx("p",{className:"typography-style-body-md",children:n})})})]});gc.displayName="AddToCart.Card.Name";const yc=({className:e,listPrice:t,price:n,quantity:s,productId:o,...a})=>{const i=T.formatPriceToCurrency(n/100),c=T.formatPriceToCurrency(t/100);return r.jsx("div",{...a,className:d.helpers.classNameConcat(He["add-to-cart--card--price-quantity"],e),children:r.jsx(d.ProductInfo.Root,{size:"small",layout:"vertical",children:r.jsx(d.ProductInfo.Wrapper,{size:"small",layout:"vertical",children:r.jsx(d.ProductInfo.ValuesWrapper,{children:n!==t?r.jsxs(r.Fragment,{children:[r.jsx(d.ProductInfo.Price,{label:"originalPrice",value:i,size:"small"},"price-list"),r.jsx(d.ProductInfo.Price,{label:"discountPrice",value:c,size:"small"},"price-low")]}):r.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:c,size:"small"},"price-low")})})})})};yc.displayName="AddToCart.Card.PriceQuantity";const cf="_skeleton_12b79_1",lf={skeleton:cf},xc=({style:e})=>r.jsx("div",{style:e,className:lf.skeleton}),uf="_image_1y08u_1",df={image:uf},mf=({alt:e,className:t,objectFit:n,...s})=>{const{nextimage:o}=ce();return r.jsx(o,{quality:90,...s,alt:e??"",className:d.helpers.classNameConcat(df.image,t),"data-object-fit":n??"cover"})},pf=({videoRef:e,...t})=>r.jsx("video",{...t,ref:e,children:r.jsx("track",{kind:"captions"})}),Ie={Image:mf,Video:pf},vc=({className:e,productGroupID:t,size:n,texture:s,...o})=>{const{CONSTANTS:{TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:i}}=Pt(),[c,l]=g.useState(s??"");return g.useEffect(()=>{c||fetch("/api/catalog/product/info",{method:"POST",priority:"low",body:JSON.stringify({ids:[t]})}).then(u=>u.json()).then(u=>{const m=u.data[0].items[0];if(m){const f=m.images.find(p=>a.includes(p.imageLabel));f!=null&&f.imageUrl?l(f.imageUrl):l(m.images[0].imageUrl)}}).catch(u=>{console.error(u)})},[c,t]),r.jsxs("div",{...o,className:d.helpers.classNameConcat(He["add-to-cart--card--style-size"],e),children:[r.jsx(d.ToggleStyle.Wrapper,{size:"x-small",style:i,children:r.jsx(d.ToggleStyle.Texture,{children:c?r.jsx(Ie.Image,{alt:"",src:c??"",width:164,height:164,style:i}):r.jsx(xc,{})})}),r.jsx(d.Utils.Divider,{direction:"vertical",size:"medium",style:{height:24}}),n&&r.jsxs(d.ToggleSize.Wrapper,{size:"small",title:"wrapper-texture",children:[r.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),r.jsx(d.ToggleSize.Text,{children:n})]})]})};vc.displayName="AddToCart.Card.StyleSize";const{helpers:ff}=ks,bc=({className:e,item:t,texture:n,...s})=>{const{itemOffered:{name:o,brand:a,skuName:i,isVariationOf:{productGroupID:c}},quantity:l,price:u,sellingPrice:m}=t,{CONSTANTS:{NAME_SPLIT_SYMBOL:f}}=Pt(),{size:p}=ff.product.getColorAndSizeFromSkuName(i??o,f);return r.jsxs("div",{...s,className:d.helpers.classNameConcat(He["add-to-cart--card--content"],e),children:[r.jsx(gc,{brand:a.name,name:o}),r.jsx(yc,{price:u,listPrice:m,quantity:l,productId:t.id}),r.jsx(vc,{size:p,texture:n,productGroupID:c})]})};bc.displayName="AddToCart.Card.Content";const jc=({image:e,thumbnail:t=!1})=>r.jsx(Ie.Image,{alt:e.alternateName??"image","data-thumbnail":t,height:t?152:120,src:e.url,width:t?152:94});jc.displayName="AddToCart.Card";const Cc=({className:e,item:t,texture:n,thumbnail:s,...o})=>{const{itemOffered:{image:[a]}}=t,i=T.updatedResizedImg(a.url,{width:200,height:300});return r.jsxs("div",{...o,className:d.helpers.classNameConcat(He["add-to-cart--card"],e),children:[r.jsx(jc,{image:{alternateName:a.alternateName||"Produto",url:i||""},thumbnail:s}),!s&&r.jsx(bc,{item:t,texture:n})]})};Cc.displayName="AddToCart.Card";const Sc=({className:e,children:t,title:n,...s})=>r.jsxs("div",{...s,className:d.helpers.classNameConcat(He["add-to-cart--content"],e),children:[r.jsx("div",{className:He["add-to-cart--content--title"],children:n&&r.jsx("h2",{children:n})}),t,r.jsx(xt.Footer,{})]});Sc.displayName="AddToCart.Layout.Content";const Ec=({className:e,...t})=>{var h,_;const{isMobile:n,handleClose:s,CONSTANTS:{ADD_TO_CART:o}}=Pt(),{cartStore:{totalizers:a},setIsOpen:i}=ve(),c=(h=a.find(y=>y.id==="Discounts"))==null?void 0:h.value,l=((_=a.find(y=>y.id==="Items"))==null?void 0:_.value)??0,u=a.find(y=>y.id==="Shipping"),f=(l-Math.abs(c??0)+((u==null?void 0:u.value)??0))/100,p=T.formatPriceToCurrency(f??0);return r.jsxs("div",{...t,className:d.helpers.classNameConcat(He["add-to-cart--footer"],e),children:[r.jsxs("div",{className:He["add-to-cart--footer--total"],children:[r.jsx("span",{children:"Subtotal:"}),r.jsx("span",{children:p})]}),r.jsx(d.Button,{size:"medium",variant:"primary","data-close":!0,onClick:()=>i(!0),children:o.footer.bag}),n?r.jsx(d.Button,{"data-close":!0,size:"medium",variant:"tertiary",children:o.footer.keep_buying}):r.jsx(d.Button,{onClick:()=>s(),size:"medium",variant:"tertiary",children:o.footer.keep_buying})]})};Ec.displayName="AddToCart.Layout.Footer";const Pc=({children:e,className:t,thumbnail:n=!1,...s})=>{const{cartStore:{options:o}}=ve(),{recentlyAddedProducts:a}=Qt(),i=a.length>3?4:a.length;return r.jsxs("div",{...s,className:He["add-to-cart--items"],"data-thumbnail":n,children:[Array.isArray(a)&&a.filter((c,l)=>l<i).map(c=>{var u;const l=(u=o==null?void 0:o.find(m=>m.id===c.itemOffered.isVariationOf.productGroupID))==null?void 0:u.texture;return r.jsx(xt.Card,{item:c,thumbnail:n,texture:l},c.itemOffered.sku)}),e]})};Pc.displayName="AddToCart.Layout.Items";const Nc=({children:e,Z_INDEX_WAR:t})=>{const{isOpen:n,setIsOpen:s}=Pt(),{isMobile:o}=ne();return r.jsxs(d.Modal.Root,{"data-modal":"add-to-cart--modal",className:He["add-to-cart__modal"],isMobile:o??!1,isOpen:n,setIsOpen:s,variant:"sideBottom",style:{zIndex:t.modal},children:[r.jsx(d.Modal.Header,{navigation:"top",children:r.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0})}),r.jsx(d.Modal.Body,{children:e})]})};Nc.displayName="AddToCart.Modal";const hf=({children:e})=>{const{count:t,handleClose:n,setIsOpen:s}=Pt(),o=g.useRef(t);return g.useEffect(()=>{t>o.current&&s(!0),t<o.current&&o.current>=1&&n(),o.current=t},[t,n,s]),r.jsx(r.Fragment,{children:e})},Ic=({children:e,component:t,CONSTANTS:n,...s})=>{const{recentlyAddedProducts:o}=Qt(),{isMobile:a}=ne(),i=o.length>3?4:o.length;return r.jsx(ji,{...s,count:i,isMobile:a,CONSTANTS:n,children:r.jsx(hf,{children:a?r.jsxs(r.Fragment,{children:[r.jsx(xt.Modal,{Z_INDEX_WAR:n.Z_INDEX_WAR,children:t}),e]}):r.jsx(xt.Tooltip,{component:t,style:{width:350},Z_INDEX_WAR:n.Z_INDEX_WAR,children:e})})})};Ic.displayName="AddToCart.Root";const wc=({children:e,component:t,Z_INDEX_WAR:n,...s})=>{const{contentRef:o,left:a,isLeaving:i,target:c,isOpen:l,top:u}=Pt();return r.jsx(d.Tooltip.Root,{arrow:"top-right",component:r.jsx("div",{...s,ref:o,children:t}),id:"add-to-cart--tooltip",className:He["add-to-cart--tooltip"],style:{zIndex:n.modal},isLeaving:i,isOpen:l,left:a,size:"medium",position:"top",top:u,children:r.jsx("div",{className:He["add-to-cart--tooltip"],ref:c,children:e})})};wc.displayName="AddToCart.Tooltip";const xt={Card:Cc,Content:Sc,Footer:Ec,Items:Pc,Modal:Nc,Root:Ic,Tooltip:wc},Ds=({title:e,...t})=>{const{recentlyAddedProducts:n}=Qt(),{isMobile:s}=ne(),o=n.length>3?4:n.length,a=n.length>(o??1),i=n.length>1;return r.jsx(xt.Root,{isMobile:s,count:n.length,component:r.jsx(xt.Content,{title:e,children:r.jsx(xt.Items,{thumbnail:i,children:a&&r.jsx(d.Badge.Count,{count:n.length-o,size:"medium",variant:"secondary"})})}),...t})};Ds.displayName="AddToCart";const ao={"backtotop-btn":"_backtotop-btn_1shb6_1","card-modifier":"_card-modifier_1shb6_27"},_f=({children:e,className:t,classNameButton:n,adornment:s,iconPosition:o,scrollToOptions:a,style:i,...c})=>{const l={top:(a==null?void 0:a.top)??0,left:(a==null?void 0:a.left)??0,behavior:(a==null?void 0:a.behavior)??"smooth"},m=o&&s?{flexDirection:{top:"column",bottom:"column-reverse",left:"row",right:"row-reverse"}[o]}:{},f=()=>{window&&window.document.body.scrollTo({...l})};return r.jsx(d.Card,{...c,shadow:!0,padding:"small",className:d.helpers.classNameConcat(ao["card-modifier"],t),style:{...i,padding:0},children:r.jsxs("button",{className:d.helpers.classNameConcat(ao["backtotop-btn"],n),onClick:f,style:{...m},"data-orientation":o,children:[s,e]})})},gf="_container_1sy8s_16",mt={"carousel-container":"_carousel-container_1sy8s_1","add-cart-container":"_add-cart-container_1sy8s_8",container:gf,"add-itens-to-cart-container":"_add-itens-to-cart-container_1sy8s_38","add-itens-to-cart-container-values":"_add-itens-to-cart-container-values_1sy8s_45","add-itens-to-cart-qty-products":"_add-itens-to-cart-qty-products_1sy8s_50","add-itens-to-cart-total":"_add-itens-to-cart-total_1sy8s_60","add-button":"_add-button_1sy8s_70"},yf=({selectedProducts:e,handleAddAllToCart:t,CONSTANTS:n})=>{const s=Object.values(e.products).length;return r.jsxs("div",{className:mt["add-itens-to-cart-container"],children:[r.jsxs("div",{className:mt["add-itens-to-cart-container-values"],children:[r.jsx("div",{className:mt["add-itens-to-cart-qty-products"],children:r.jsx("span",{children:s===0?n.BUY_PACKAGE.group_cart.select_all_product:`${s} ${s===1?n.BUY_PACKAGE.group_cart.select_product:n.BUY_PACKAGE.group_cart.select_product+"s"}`})}),r.jsx("div",{className:mt["add-itens-to-cart-total"],children:r.jsx("span",{children:T.freightParsePrice({valueInCents:e.totalPrice*100,hasFree:!1,freeTaxMessage:n.FREIGHT_CALCULATION.messages.free_tax})})})]}),r.jsx(d.Button,{onClick:t,className:mt["add-button"],size:"large",disabled:s===0,variant:"primary",children:n.BUY_BUTTON_LABELS.add_to_cart})]})},xf=e=>e.reduce((t,n)=>{var o;const s=t.find(a=>a.node.id===n.node.id);if(!s)return[...t,n];if((o=s==null?void 0:s.node.isVariantOf)!=null&&o.hasVariant){const a=s.node.isVariantOf.hasVariant,i=n.node.isVariantOf.hasVariant;a&&i&&(s.node.isVariantOf.hasVariant=[...a,...i])}return t},[]),vf=({selectedProduct:e,productId:t,prevState:n,mainSellerId:s})=>{const{products:o,totalPrice:a}=n;try{if(!e){const{[t]:u,...m}=o;return{...n,totalPrice:a-u.price,products:m}}const i=T.getValidOffer(e.offers.offers,s);if(!i)return n;const c=i.seller.identifier,l=i.price;if(o[t]){const{price:u}=o[t];return o[t]={...o[t],price:l,id:e.sku,seller:c},{totalPrice:a+l-u,products:{...o}}}return{totalPrice:a+l,products:{...o,[t]:{id:e.sku,price:l,seller:c,productId:t}}}}catch(i){return console.error("Error handling SKU selection:",i),n}},Rc=g.createContext({}),bf=({children:e,item:t,index:n,shelfTitle:s,...o})=>{const[a,i]=g.useState(null),c=g.useRef(null),l=g.useRef({availableSkus:[],priceInfo:{price:0,listPrice:0}}),{sendDataLayerEvent:u,itemListRef:m}=oe(),f=y=>{u({functionKey:"productEvents",data:{commonData:{...t,availableSizes:l.current.availableSkus,...l.current.priceInfo},customData:{index:n+1},event:y}})},p=()=>{f("add_to_wishlist")},h=()=>{u({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...t,...l.current.priceInfo}]},supportData:{selectedSku:a,selectedSkus:[a]},customData:{index:n}}})},_=()=>{s&&(m.current={item_list_name:s}),f("select_item")};return r.jsx(Rc.Provider,{value:g.useMemo(()=>({...o,index:n,item:t,element:c,selectedSku:a,setSelectedSku:i,eventDataRef:l,sendAddToWishlistEvent:p,sendSelectItemEvent:_,sendAddToCartEvent:h}),[o,t,c,a]),children:e})},Xe=()=>{const e=g.useContext(Rc);if(e===void 0)throw new Error("useProductCardContext must be used within a ProductCardProvider");return e},Re={"product-card--actions":"_product-card--actions_bndjh_1","product-card--actions--group":"_product-card--actions--group_bndjh_9","product-card--actions--selectors":"_product-card--actions--selectors_bndjh_21","product-card--body":"_product-card--body_bndjh_33","product-card--header":"_product-card--header_bndjh_47","product-card--footer":"_product-card--footer_bndjh_67","product-card--image":"_product-card--image_bndjh_90","product-card--image--container":"_product-card--image--container_bndjh_97","product-card--outstock":"_product-card--outstock_bndjh_133","product-card--price":"_product-card--price_bndjh_155","product-card--title":"_product-card--title_bndjh_177","product-card--title--tag":"_product-card--title--tag_bndjh_183","product-card--title--content":"_product-card--title--content_bndjh_200","product-card--selectors--size":"_product-card--selectors--size_bndjh_240","product-card--selectors--size--button":"_product-card--selectors--size--button_bndjh_266","product-card--selectors--size--skus":"_product-card--selectors--size--skus_bndjh_275","product-card--selectors--style":"_product-card--selectors--style_bndjh_289","product-card--selectors--style--more":"_product-card--selectors--style--more_bndjh_299","product-card--video":"_product-card--video_bndjh_316","product-card--wrapper":"_product-card--wrapper_bndjh_342"},Ac=({callback:e,children:t,className:n,data:s,isKit:o,...a})=>{const{item:{availability:{status:i},image:c}}=Xe();return i?r.jsxs("div",{...a,className:d.helpers.classNameConcat(Re["product-card--actions"],n),children:[r.jsxs(pe.Wrapper,{type:"actions--group",children:[r.jsx(pe.Price,{}),r.jsx("div",{className:Re["product-card--actions--selectors"],children:!o&&r.jsx(pe.StyleSelector,{data:s,images:c,callback:e})})]}),t]}):null};Ac.displayName="ProductCard.Actions";const Tc=({className:e,isKit:t,...n})=>{const{addToCart:s}=ve(),{isMobile:o=!1,selectedSku:a,outStock:i,item:c,sendAddToCartEvent:l,CONSTANTS:u}=Xe(),m=()=>{var h;if(!a)return;const p=T.getValidOffer(a.offers.offers,u.StoreConfig_MainSellerId);p&&s({id:a==null?void 0:a.sku,quantity:1,seller:p.seller.identifier},{id:c.id,texture:(h=c==null?void 0:c.image.find(_=>u.TEXTURE_IMAGE.includes(_.alternateName)))==null?void 0:h.url}),l()},f=a?u.BUY_BUTTON_LABELS.add_to_cart:u.BUY_BUTTON_LABELS.select_size;return r.jsx(d.Button,{...n,className:d.helpers.classNameConcat(e,"buy-button"),disabled:!t&&!a&&!i,size:o?"medium":"large",variant:i?"secondary":"primary",onClick:i?n.onClick:m,children:i?"Avise-me quando chegar":f})};Tc.displayName="ProductCard.Actions.BuyButton";const jf={"snackbar-modifier":"_snackbar-modifier_1va2l_1"},Lt=({size:e,adornment:t,title:n,subtitle:s,supportChildren:o,className:a,Z_INDEX_WAR:i,...c})=>r.jsxs(d.SnackBar.Structure,{...c,size:e,className:d.helpers.classNameConcat(jf["snackbar-modifier"],a),width:360,style:{zIndex:i.snackbar},children:[r.jsx(d.SnackBar.Content,{adornment:t,title:n,subtitle:s}),o&&r.jsx(d.SnackBar.Support,{children:o})]});Lt.displayName="SnackBar";const Wt={"wishlist--snack":"_wishlist--snack_3qi1o_9","wishlist--snack--actions":"_wishlist--snack--actions_3qi1o_25","wishlist-grid":"_wishlist-grid_3qi1o_31","wishlist-grid--container":"_wishlist-grid--container_3qi1o_39","pdc-empty-modifier":"_pdc-empty-modifier_3qi1o_49"};var es={exports:{}},Le={};Le._=Le._interop_require_default=Cf;function Cf(e){return e&&e.__esModule?e:{default:e}}var un={exports:{}},tr={},io;function Lc(){return io||(io=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}t(e,{assign:function(){return a},searchParamsToUrlQuery:function(){return n},urlQueryToSearchParams:function(){return o}});function n(i){const c={};return i.forEach((l,u)=>{typeof c[u]>"u"?c[u]=l:Array.isArray(c[u])?c[u].push(l):c[u]=[c[u],l]}),c}function s(i){return typeof i=="string"||typeof i=="number"&&!isNaN(i)||typeof i=="boolean"?String(i):""}function o(i){const c=new URLSearchParams;return Object.entries(i).forEach(l=>{let[u,m]=l;Array.isArray(m)?m.forEach(f=>c.append(u,s(f))):c.set(u,s(m))}),c}function a(i){for(var c=arguments.length,l=new Array(c>1?c-1:0),u=1;u<c;u++)l[u-1]=arguments[u];return l.forEach(m=>{Array.from(m.keys()).forEach(f=>i.delete(f)),m.forEach((f,p)=>i.append(p,f))}),i}}(tr)),tr}var nr={},Dt={};function Oc(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Oc=function(s){return s?n:t})(e)}Dt._=Dt._interop_require_wildcard=Sf;function Sf(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Oc(t);if(n&&n.has(e))return n.get(e);var s={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(s,a,i):s[a]=e[a]}return s.default=e,n&&n.set(e,s),s}var co;function kc(){return co||(co=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var m in u)Object.defineProperty(l,m,{enumerable:!0,get:u[m]})}t(e,{formatUrl:function(){return a},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}});const s=Dt._(Lc()),o=/https?|ftp|gopher|file/;function a(l){let{auth:u,hostname:m}=l,f=l.protocol||"",p=l.pathname||"",h=l.hash||"",_=l.query||"",y=!1;u=u?encodeURIComponent(u).replace(/%3A/i,":")+"@":"",l.host?y=u+l.host:m&&(y=u+(~m.indexOf(":")?"["+m+"]":m),l.port&&(y+=":"+l.port)),_&&typeof _=="object"&&(_=String(s.urlQueryToSearchParams(_)));let x=l.search||_&&"?"+_||"";return f&&!f.endsWith(":")&&(f+=":"),l.slashes||(!f||o.test(f))&&y!==!1?(y="//"+(y||""),p&&p[0]!=="/"&&(p="/"+p)):y||(y=""),h&&h[0]!=="#"&&(h="#"+h),x&&x[0]!=="?"&&(x="?"+x),p=p.replace(/[?#]/g,encodeURIComponent),x=x.replace("#","%23"),""+f+y+p+x+h}const i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(l){return process.env.NODE_ENV==="development"&&l!==null&&typeof l=="object"&&Object.keys(l).forEach(u=>{i.includes(u)||console.warn("Unknown key passed via urlObject into url.format: "+u)}),a(l)}}(nr)),nr}var rr={},lo;function Ef(){return lo||(lo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"omit",{enumerable:!0,get:function(){return t}});function t(n,s){const o={};return Object.keys(n).forEach(a=>{s.includes(a)||(o[a]=n[a])}),o}}(rr)),rr}var sr={},uo;function Un(){return uo||(uo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(v,P){for(var S in P)Object.defineProperty(v,S,{enumerable:!0,get:P[S]})}t(e,{DecodeError:function(){return _},MiddlewareNotFoundError:function(){return C},MissingStaticPage:function(){return b},NormalizeError:function(){return y},PageNotFoundError:function(){return x},SP:function(){return p},ST:function(){return h},WEB_VITALS:function(){return n},execOnce:function(){return s},getDisplayName:function(){return l},getLocationOrigin:function(){return i},getURL:function(){return c},isAbsoluteUrl:function(){return a},isResSent:function(){return u},loadGetInitialProps:function(){return f},normalizeRepeatedSlashes:function(){return m},stringifyError:function(){return j}});const n=["CLS","FCP","FID","INP","LCP","TTFB"];function s(v){let P=!1,S;return function(){for(var E=arguments.length,I=new Array(E),A=0;A<E;A++)I[A]=arguments[A];return P||(P=!0,S=v(...I)),S}}const o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,a=v=>o.test(v);function i(){const{protocol:v,hostname:P,port:S}=window.location;return v+"//"+P+(S?":"+S:"")}function c(){const{href:v}=window.location,P=i();return v.substring(P.length)}function l(v){return typeof v=="string"?v:v.displayName||v.name||"Unknown"}function u(v){return v.finished||v.headersSent}function m(v){const P=v.split("?");return P[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(P[1]?"?"+P.slice(1).join("?"):"")}async function f(v,P){if(process.env.NODE_ENV!=="production"){var S;if((S=v.prototype)!=null&&S.getInitialProps){const A='"'+l(v)+'.getInitialProps()" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.';throw new Error(A)}}const E=P.res||P.ctx&&P.ctx.res;if(!v.getInitialProps)return P.ctx&&P.Component?{pageProps:await f(P.Component,P.ctx)}:{};const I=await v.getInitialProps(P);if(E&&u(E))return I;if(!I){const A='"'+l(v)+'.getInitialProps()" should resolve to an object. But found "'+I+'" instead.';throw new Error(A)}return process.env.NODE_ENV!=="production"&&Object.keys(I).length===0&&!P.ctx&&console.warn(""+l(v)+" returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps"),I}const p=typeof performance<"u",h=p&&["mark","measure","getEntriesByName"].every(v=>typeof performance[v]=="function");class _ extends Error{}class y extends Error{}class x extends Error{constructor(P){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+P}}class b extends Error{constructor(P,S){super(),this.message="Failed to load static file for page: "+P+" "+S}}class C extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function j(v){return JSON.stringify({message:v.message,stack:v.stack})}}(sr)),sr}var dn={exports:{}},or={},mo;function Dc(){return mo||(mo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"removeTrailingSlash",{enumerable:!0,get:function(){return t}});function t(n){return n.replace(/\/$/,"")||"/"}}(or)),or}var ar={},po;function Ms(){return po||(po=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"parsePath",{enumerable:!0,get:function(){return t}});function t(n){const s=n.indexOf("#"),o=n.indexOf("?"),a=o>-1&&(s<0||o<s);return a||s>-1?{pathname:n.substring(0,a?o:s),query:a?n.substring(o,s>-1?s:void 0):"",hash:s>-1?n.slice(s):""}:{pathname:n,query:"",hash:""}}}(ar)),ar}var fo;function Hn(){return fo||(fo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return o}});const n=Dc(),s=Ms(),o=a=>{if(!a.startsWith("/")||process.env.__NEXT_MANUAL_TRAILING_SLASH)return a;const{pathname:i,query:c,hash:l}=(0,s.parsePath)(a);return process.env.__NEXT_TRAILING_SLASH?/\.[^/]+\/?$/.test(i)?""+(0,n.removeTrailingSlash)(i)+c+l:i.endsWith("/")?""+i+c+l:i+"/"+c+l:""+(0,n.removeTrailingSlash)(i)+c+l};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(dn,dn.exports)),dn.exports}var ir={},mn={exports:{}},cr={},ho;function Mc(){return ho||(ho=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"pathHasPrefix",{enumerable:!0,get:function(){return n}});const t=Ms();function n(s,o){if(typeof s!="string")return!1;const{pathname:a}=(0,t.parsePath)(s);return a===o||a.startsWith(o+"/")}}(cr)),cr}var _o;function Pf(){return _o||(_o=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return o}});const n=Mc(),s=process.env.__NEXT_ROUTER_BASEPATH||"";function o(a){return(0,n.pathHasPrefix)(a,s)}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(mn,mn.exports)),mn.exports}var go;function $c(){return go||(go=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isLocalURL",{enumerable:!0,get:function(){return s}});const t=Un(),n=Pf();function s(o){if(!(0,t.isAbsoluteUrl)(o))return!0;try{const a=(0,t.getLocationOrigin)(),i=new URL(o,a);return i.origin===a&&(0,n.hasBasePath)(i.pathname)}catch{return!1}}}(ir)),ir}var lr={},ur={},yo;function Nf(){return yo||(yo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getSortedRoutes",{enumerable:!0,get:function(){return n}});class t{insert(o){this._insert(o.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(o){o===void 0&&(o="/");const a=[...this.children.keys()].sort();this.slugName!==null&&a.splice(a.indexOf("[]"),1),this.restSlugName!==null&&a.splice(a.indexOf("[...]"),1),this.optionalRestSlugName!==null&&a.splice(a.indexOf("[[...]]"),1);const i=a.map(c=>this.children.get(c)._smoosh(""+o+c+"/")).reduce((c,l)=>[...c,...l],[]);if(this.slugName!==null&&i.push(...this.children.get("[]")._smoosh(o+"["+this.slugName+"]/")),!this.placeholder){const c=o==="/"?"/":o.slice(0,-1);if(this.optionalRestSlugName!=null)throw new Error('You cannot define a route with the same specificity as a optional catch-all route ("'+c+'" and "'+c+"[[..."+this.optionalRestSlugName+']]").');i.unshift(c)}return this.restSlugName!==null&&i.push(...this.children.get("[...]")._smoosh(o+"[..."+this.restSlugName+"]/")),this.optionalRestSlugName!==null&&i.push(...this.children.get("[[...]]")._smoosh(o+"[[..."+this.optionalRestSlugName+"]]/")),i}_insert(o,a,i){if(o.length===0){this.placeholder=!1;return}if(i)throw new Error("Catch-all must be the last part of the URL.");let c=o[0];if(c.startsWith("[")&&c.endsWith("]")){let m=function(f,p){if(f!==null&&f!==p)throw new Error("You cannot use different slug names for the same dynamic path ('"+f+"' !== '"+p+"').");a.forEach(h=>{if(h===p)throw new Error('You cannot have the same slug name "'+p+'" repeat within a single dynamic path');if(h.replace(/\W/g,"")===c.replace(/\W/g,""))throw new Error('You cannot have the slug names "'+h+'" and "'+p+'" differ only by non-word symbols within a single dynamic path')}),a.push(p)},l=c.slice(1,-1),u=!1;if(l.startsWith("[")&&l.endsWith("]")&&(l=l.slice(1,-1),u=!0),l.startsWith("...")&&(l=l.substring(3),i=!0),l.startsWith("[")||l.endsWith("]"))throw new Error("Segment names may not start or end with extra brackets ('"+l+"').");if(l.startsWith("."))throw new Error("Segment names may not start with erroneous periods ('"+l+"').");if(i)if(u){if(this.restSlugName!=null)throw new Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+o[0]+'" ).');m(this.optionalRestSlugName,l),this.optionalRestSlugName=l,c="[[...]]"}else{if(this.optionalRestSlugName!=null)throw new Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+o[0]+'").');m(this.restSlugName,l),this.restSlugName=l,c="[...]"}else{if(u)throw new Error('Optional route parameters are not yet supported ("'+o[0]+'").');m(this.slugName,l),this.slugName=l,c="[]"}}this.children.has(c)||this.children.set(c,new t),this.children.get(c)._insert(o.slice(1),a,i)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function n(s){const o=new t;return s.forEach(a=>o.insert(a)),o.smoosh()}}(ur)),ur}var dr={},mr={},pr={},fr={},xo;function If(){return xo||(xo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ensureLeadingSlash",{enumerable:!0,get:function(){return t}});function t(n){return n.startsWith("/")?n:"/"+n}}(fr)),fr}var hr={},vo;function wf(){return vo||(vo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}t(e,{DEFAULT_SEGMENT_KEY:function(){return o},PAGE_SEGMENT_KEY:function(){return s},isGroupSegment:function(){return n}});function n(a){return a[0]==="("&&a.endsWith(")")}const s="__PAGE__",o="__DEFAULT__"}(hr)),hr}var bo;function Rf(){return bo||(bo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}t(e,{normalizeAppPath:function(){return o},normalizeRscURL:function(){return a}});const n=If(),s=wf();function o(i){return(0,n.ensureLeadingSlash)(i.split("/").reduce((c,l,u,m)=>!l||(0,s.isGroupSegment)(l)||l[0]==="@"||(l==="page"||l==="route")&&u===m.length-1?c:c+"/"+l,""))}function a(i){return i.replace(/\.rsc($|\?)/,"$1")}}(pr)),pr}var jo;function zc(){return jo||(jo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}t(e,{INTERCEPTION_ROUTE_MARKERS:function(){return s},extractInterceptionRouteInformation:function(){return a},isInterceptionRouteAppPath:function(){return o}});const n=Rf(),s=["(..)(..)","(.)","(..)","(...)"];function o(i){return i.split("/").find(c=>s.find(l=>c.startsWith(l)))!==void 0}function a(i){let c,l,u;for(const m of i.split("/"))if(l=s.find(f=>m.startsWith(f)),l){[c,u]=i.split(l,2);break}if(!c||!l||!u)throw new Error(`Invalid interception route: ${i}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`);switch(c=(0,n.normalizeAppPath)(c),l){case"(.)":c==="/"?u=`/${u}`:u=c+"/"+u;break;case"(..)":if(c==="/")throw new Error(`Invalid interception route: ${i}. Cannot use (..) marker at the root level, use (.) instead.`);u=c.split("/").slice(0,-1).concat(u).join("/");break;case"(...)":u="/"+u;break;case"(..)(..)":const m=c.split("/");if(m.length<=2)throw new Error(`Invalid interception route: ${i}. Cannot use (..)(..) marker at the root level or one level up.`);u=m.slice(0,-2).concat(u).join("/");break;default:throw new Error("Invariant: unexpected marker")}return{interceptingRoute:c,interceptedRoute:u}}}(mr)),mr}var Co;function Af(){return Co||(Co=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isDynamicRoute",{enumerable:!0,get:function(){return s}});const t=zc(),n=/\/\[[^/]+?\](?=\/|$)/;function s(o){return(0,t.isInterceptionRouteAppPath)(o)&&(o=(0,t.extractInterceptionRouteInformation)(o).interceptedRoute),n.test(o)}}(dr)),dr}var So;function Tf(){return So||(So=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(o,a){for(var i in a)Object.defineProperty(o,i,{enumerable:!0,get:a[i]})}t(e,{getSortedRoutes:function(){return n.getSortedRoutes},isDynamicRoute:function(){return s.isDynamicRoute}});const n=Nf(),s=Af()}(lr)),lr}var _r={},gr={},Eo;function Lf(){return Eo||(Eo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getRouteMatcher",{enumerable:!0,get:function(){return n}});const t=Un();function n(s){let{re:o,groups:a}=s;return i=>{const c=o.exec(i);if(!c)return!1;const l=m=>{try{return decodeURIComponent(m)}catch{throw new t.DecodeError("failed to decode param")}},u={};return Object.keys(a).forEach(m=>{const f=a[m],p=c[f.pos];p!==void 0&&(u[m]=~p.indexOf("/")?p.split("/").map(h=>l(h)):f.repeat?[l(p)]:l(p))}),u}}}(gr)),gr}var yr={},xr={},Po;function Of(){return Po||(Po=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(q,K){for(var _e in K)Object.defineProperty(q,_e,{enumerable:!0,get:K[_e]})}t(e,{ACTION_SUFFIX:function(){return l},APP_DIR_ALIAS:function(){return O},CACHE_ONE_YEAR:function(){return v},DOT_NEXT_ALIAS:function(){return A},ESLINT_DEFAULT_DIRS:function(){return ae},GSP_NO_RETURNED_VALUE:function(){return se},GSSP_COMPONENT_MEMBER_ERROR:function(){return J},GSSP_NO_RETURNED_VALUE:function(){return ie},INSTRUMENTATION_HOOK_FILENAME:function(){return E},MIDDLEWARE_FILENAME:function(){return P},MIDDLEWARE_LOCATION_REGEXP:function(){return S},NEXT_BODY_SUFFIX:function(){return f},NEXT_CACHE_IMPLICIT_TAG_ID:function(){return j},NEXT_CACHE_REVALIDATED_TAGS_HEADER:function(){return _},NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER:function(){return y},NEXT_CACHE_SOFT_TAGS_HEADER:function(){return h},NEXT_CACHE_SOFT_TAG_MAX_LENGTH:function(){return C},NEXT_CACHE_TAGS_HEADER:function(){return p},NEXT_CACHE_TAG_MAX_ITEMS:function(){return x},NEXT_CACHE_TAG_MAX_LENGTH:function(){return b},NEXT_DATA_SUFFIX:function(){return u},NEXT_INTERCEPTION_MARKER_PREFIX:function(){return s},NEXT_META_SUFFIX:function(){return m},NEXT_QUERY_PARAM_PREFIX:function(){return n},NON_STANDARD_NODE_ENV:function(){return w},PAGES_DIR_ALIAS:function(){return I},PRERENDER_REVALIDATE_HEADER:function(){return o},PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER:function(){return a},PUBLIC_DIR_MIDDLEWARE_CONFLICT:function(){return Y},ROOT_DIR_ALIAS:function(){return L},RSC_ACTION_CLIENT_WRAPPER_ALIAS:function(){return F},RSC_ACTION_ENCRYPTION_ALIAS:function(){return U},RSC_ACTION_PROXY_ALIAS:function(){return M},RSC_ACTION_VALIDATE_ALIAS:function(){return Q},RSC_MOD_REF_PROXY_ALIAS:function(){return D},RSC_PREFETCH_SUFFIX:function(){return i},RSC_SUFFIX:function(){return c},SERVER_PROPS_EXPORT_ERROR:function(){return le},SERVER_PROPS_GET_INIT_PROPS_CONFLICT:function(){return H},SERVER_PROPS_SSG_CONFLICT:function(){return Z},SERVER_RUNTIME:function(){return he},SSG_FALLBACK_EXPORT_ERROR:function(){return W},SSG_GET_INITIAL_PROPS_CONFLICT:function(){return G},STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR:function(){return re},UNSTABLE_REVALIDATE_RENAME_ERROR:function(){return $},WEBPACK_LAYERS:function(){return R},WEBPACK_RESOURCE_QUERIES:function(){return Ne}});const n="nxtP",s="nxtI",o="x-prerender-revalidate",a="x-prerender-revalidate-if-generated",i=".prefetch.rsc",c=".rsc",l=".action",u=".json",m=".meta",f=".body",p="x-next-cache-tags",h="x-next-cache-soft-tags",_="x-next-revalidated-tags",y="x-next-revalidate-tag-token",x=128,b=256,C=1024,j="_N_T_",v=31536e3,P="middleware",S=`(?:src/)?${P}`,E="instrumentation",I="private-next-pages",A="private-dot-next",L="private-next-root-dir",O="private-next-app-dir",D="private-next-rsc-mod-ref-proxy",Q="private-next-rsc-action-validate",M="private-next-rsc-server-reference",U="private-next-rsc-action-encryption",F="private-next-rsc-action-client-wrapper",Y="You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict",G="You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps",H="You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.",Z="You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps",re="can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props",le="pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export",se="Your `getStaticProps` function did not return an object. Did you forget to add a `return`?",ie="Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?",$="The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.",J="can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member",w='You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env',W="Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export",ae=["app","pages","components","lib","src"],he={edge:"edge",experimentalEdge:"experimental-edge",nodejs:"nodejs"},N={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",api:"api",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser",appMetadataRoute:"app-metadata-route",appRouteHandler:"app-route-handler"},R={...N,GROUP:{serverOnly:[N.reactServerComponents,N.actionBrowser,N.appMetadataRoute,N.appRouteHandler,N.instrument],clientOnly:[N.serverSideRendering,N.appPagesBrowser],nonClientServerTarget:[N.middleware,N.api],app:[N.reactServerComponents,N.actionBrowser,N.appMetadataRoute,N.appRouteHandler,N.serverSideRendering,N.appPagesBrowser,N.shared,N.instrument]}},Ne={edgeSSREntry:"__next_edge_ssr_entry__",metadata:"__next_metadata__",metadataRoute:"__next_metadata_route__",metadataImageMeta:"__next_metadata_image_meta__"}}(xr)),xr}var vr={},No;function kf(){return No||(No=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"escapeStringRegexp",{enumerable:!0,get:function(){return s}});const t=/[|\\{}()[\]^$+*?.-]/,n=/[|\\{}()[\]^$+*?.-]/g;function s(o){return t.test(o)?o.replace(n,"\\$&"):o}}(vr)),vr}var Io;function Df(){return Io||(Io=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(_,y){for(var x in y)Object.defineProperty(_,x,{enumerable:!0,get:y[x]})}t(e,{getNamedMiddlewareRegex:function(){return h},getNamedRouteRegex:function(){return p},getRouteRegex:function(){return l},parseParameter:function(){return i}});const n=Of(),s=zc(),o=kf(),a=Dc();function i(_){const y=_.startsWith("[")&&_.endsWith("]");y&&(_=_.slice(1,-1));const x=_.startsWith("...");return x&&(_=_.slice(3)),{key:_,repeat:x,optional:y}}function c(_){const y=(0,a.removeTrailingSlash)(_).slice(1).split("/"),x={};let b=1;return{parameterizedRoute:y.map(C=>{const j=s.INTERCEPTION_ROUTE_MARKERS.find(P=>C.startsWith(P)),v=C.match(/\[((?:\[.*\])|.+)\]/);if(j&&v){const{key:P,optional:S,repeat:E}=i(v[1]);return x[P]={pos:b++,repeat:E,optional:S},"/"+(0,o.escapeStringRegexp)(j)+"([^/]+?)"}else if(v){const{key:P,repeat:S,optional:E}=i(v[1]);return x[P]={pos:b++,repeat:S,optional:E},S?E?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}else return"/"+(0,o.escapeStringRegexp)(C)}).join(""),groups:x}}function l(_){const{parameterizedRoute:y,groups:x}=c(_);return{re:new RegExp("^"+y+"(?:/)?$"),groups:x}}function u(){let _=0;return()=>{let y="",x=++_;for(;x>0;)y+=String.fromCharCode(97+(x-1)%26),x=Math.floor((x-1)/26);return y}}function m(_){let{interceptionMarker:y,getSafeRouteKey:x,segment:b,routeKeys:C,keyPrefix:j}=_;const{key:v,optional:P,repeat:S}=i(b);let E=v.replace(/\W/g,"");j&&(E=""+j+E);let I=!1;(E.length===0||E.length>30)&&(I=!0),isNaN(parseInt(E.slice(0,1)))||(I=!0),I&&(E=x()),j?C[E]=""+j+v:C[E]=v;const A=y?(0,o.escapeStringRegexp)(y):"";return S?P?"(?:/"+A+"(?<"+E+">.+?))?":"/"+A+"(?<"+E+">.+?)":"/"+A+"(?<"+E+">[^/]+?)"}function f(_,y){const x=(0,a.removeTrailingSlash)(_).slice(1).split("/"),b=u(),C={};return{namedParameterizedRoute:x.map(j=>{const v=s.INTERCEPTION_ROUTE_MARKERS.some(S=>j.startsWith(S)),P=j.match(/\[((?:\[.*\])|.+)\]/);if(v&&P){const[S]=j.split(P[0]);return m({getSafeRouteKey:b,interceptionMarker:S,segment:P[1],routeKeys:C,keyPrefix:y?n.NEXT_INTERCEPTION_MARKER_PREFIX:void 0})}else return P?m({getSafeRouteKey:b,segment:P[1],routeKeys:C,keyPrefix:y?n.NEXT_QUERY_PARAM_PREFIX:void 0}):"/"+(0,o.escapeStringRegexp)(j)}).join(""),routeKeys:C}}function p(_,y){const x=f(_,y);return{...l(_),namedRegex:"^"+x.namedParameterizedRoute+"(?:/)?$",routeKeys:x.routeKeys}}function h(_,y){const{parameterizedRoute:x}=c(_),{catchAll:b=!0}=y;if(x==="/")return{namedRegex:"^/"+(b?".*":"")+"$"};const{namedParameterizedRoute:C}=f(_,!1);let j=b?"(?:(/.*)?)":"";return{namedRegex:"^"+C+j+"$"}}}(yr)),yr}var wo;function Mf(){return wo||(wo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"interpolateAs",{enumerable:!0,get:function(){return s}});const t=Lf(),n=Df();function s(o,a,i){let c="";const l=(0,n.getRouteRegex)(o),u=l.groups,m=(a!==o?(0,t.getRouteMatcher)(l)(a):"")||i;c=o;const f=Object.keys(u);return f.every(p=>{let h=m[p]||"";const{repeat:_,optional:y}=u[p];let x="["+(_?"...":"")+p+"]";return y&&(x=(h?"":"/")+"["+x+"]"),_&&!Array.isArray(h)&&(h=[h]),(y||p in m)&&(c=c.replace(x,_?h.map(b=>encodeURIComponent(b)).join("/"):encodeURIComponent(h))||"/")})||(c=""),{params:f,result:c}}}(_r)),_r}var Ro;function $f(){return Ro||(Ro=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return m}});const n=Lc(),s=kc(),o=Ef(),a=Un(),i=Hn(),c=$c(),l=Tf(),u=Mf();function m(f,p,h){let _,y=typeof p=="string"?p:(0,s.formatWithValidation)(p);const x=y.match(/^[a-zA-Z]{1,}:\/\//),b=x?y.slice(x[0].length):y;if((b.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+y+"' passed to next/router in page: '"+f.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");const j=(0,a.normalizeRepeatedSlashes)(b);y=(x?x[0]:"")+j}if(!(0,c.isLocalURL)(y))return h?[y]:y;try{_=new URL(y.startsWith("#")?f.asPath:f.pathname,"http://n")}catch{_=new URL("/","http://n")}try{const j=new URL(y,_);j.pathname=(0,i.normalizePathTrailingSlash)(j.pathname);let v="";if((0,l.isDynamicRoute)(j.pathname)&&j.searchParams&&h){const S=(0,n.searchParamsToUrlQuery)(j.searchParams),{result:E,params:I}=(0,u.interpolateAs)(j.pathname,j.pathname,S);E&&(v=(0,s.formatWithValidation)({pathname:E,hash:j.hash,query:(0,o.omit)(S,I)}))}const P=j.origin===_.origin?j.href.slice(j.origin.length):j.href;return h?[P,v||P]:P}catch{return h?[y]:y}}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(un,un.exports)),un.exports}var pn={exports:{}},br={},jr={},Ao;function Fc(){return Ao||(Ao=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addPathPrefix",{enumerable:!0,get:function(){return n}});const t=Ms();function n(s,o){if(!s.startsWith("/")||!o)return s;const{pathname:a,query:i,hash:c}=(0,t.parsePath)(s);return""+o+a+i+c}}(jr)),jr}var To;function zf(){return To||(To=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addLocale",{enumerable:!0,get:function(){return s}});const t=Fc(),n=Mc();function s(o,a,i,c){if(!a||a===i)return o;const l=o.toLowerCase();return!c&&((0,n.pathHasPrefix)(l,"/api")||(0,n.pathHasPrefix)(l,"/"+a.toLowerCase()))?o:(0,t.addPathPrefix)(o,"/"+a)}}(br)),br}var Lo;function Ff(){return Lo||(Lo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return s}});const n=Hn(),s=function(o){for(var a=arguments.length,i=new Array(a>1?a-1:0),c=1;c<a;c++)i[c-1]=arguments[c];return process.env.__NEXT_I18N_SUPPORT?(0,n.normalizePathTrailingSlash)(zf().addLocale(o,...i)):o};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(pn,pn.exports)),pn.exports}var Cr={},Oo;function Bc(){return Oo||(Oo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RouterContext",{enumerable:!0,get:function(){return s}});const s=Le._(g).default.createContext(null);process.env.NODE_ENV!=="production"&&(s.displayName="RouterContext")}(Cr)),Cr}var Sr={},ko;function Bf(){return ko||(ko=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(u,m){for(var f in m)Object.defineProperty(u,f,{enumerable:!0,get:m[f]})}t(e,{AppRouterContext:function(){return o},GlobalLayoutRouterContext:function(){return i},LayoutRouterContext:function(){return a},MissingSlotContext:function(){return l},TemplateContext:function(){return c}});const s=Le._(g),o=s.default.createContext(null),a=s.default.createContext(null),i=s.default.createContext(null),c=s.default.createContext(null);process.env.NODE_ENV!=="production"&&(o.displayName="AppRouterContext",a.displayName="LayoutRouterContext",i.displayName="GlobalLayoutRouterContext",c.displayName="TemplateContext");const l=s.default.createContext(new Set)}(Sr)),Sr}var fn={exports:{}},hn={exports:{}},Do;function Uc(){return Do||(Do=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}n(t,{cancelIdleCallback:function(){return o},requestIdleCallback:function(){return s}});const s=typeof self<"u"&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(a){let i=Date.now();return self.setTimeout(function(){a({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-i))}})},1)},o=typeof self<"u"&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(a){return clearTimeout(a)};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(hn,hn.exports)),hn.exports}var Mo;function Uf(){return Mo||(Mo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return u}});const n=g,s=Uc(),o=typeof IntersectionObserver=="function",a=new Map,i=[];function c(m){const f={root:m.root||null,margin:m.rootMargin||""},p=i.find(x=>x.root===f.root&&x.margin===f.margin);let h;if(p&&(h=a.get(p),h))return h;const _=new Map,y=new IntersectionObserver(x=>{x.forEach(b=>{const C=_.get(b.target),j=b.isIntersecting||b.intersectionRatio>0;C&&j&&C(j)})},m);return h={id:f,observer:y,elements:_},i.push(f),a.set(f,h),h}function l(m,f,p){const{id:h,observer:_,elements:y}=c(p);return y.set(m,f),_.observe(m),function(){if(y.delete(m),_.unobserve(m),y.size===0){_.disconnect(),a.delete(h);const b=i.findIndex(C=>C.root===h.root&&C.margin===h.margin);b>-1&&i.splice(b,1)}}}function u(m){let{rootRef:f,rootMargin:p,disabled:h}=m;const _=h||!o,[y,x]=(0,n.useState)(!1),b=(0,n.useRef)(null),C=(0,n.useCallback)(v=>{b.current=v},[]);(0,n.useEffect)(()=>{if(o){if(_||y)return;const v=b.current;if(v&&v.tagName)return l(v,S=>S&&x(S),{root:f==null?void 0:f.current,rootMargin:p})}else if(!y){const v=(0,s.requestIdleCallback)(()=>x(!0));return()=>(0,s.cancelIdleCallback)(v)}},[_,p,f,y,b.current]);const j=(0,n.useCallback)(()=>{x(!1)},[]);return[C,y,j]}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(fn,fn.exports)),fn.exports}var _n={exports:{}},gn={exports:{}},Er={},$o;function Hf(){return $o||($o=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"normalizeLocalePath",{enumerable:!0,get:function(){return t}});function t(n,s){let o;const a=n.split("/");return(s||[]).some(i=>a[1]&&a[1].toLowerCase()===i.toLowerCase()?(o=i,a.splice(1,1),n=a.join("/")||"/",!0):!1),{pathname:n,detectedLocale:o}}}(Er)),Er}var zo;function qf(){return zo||(zo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return n}});const n=(s,o)=>process.env.__NEXT_I18N_SUPPORT?Hf().normalizeLocalePath(s,o):{pathname:s,detectedLocale:void 0};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(gn,gn.exports)),gn.exports}var yn={exports:{}},Pr={},Fo;function Vf(){return Fo||(Fo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"detectDomainLocale",{enumerable:!0,get:function(){return t}});function t(n,s,o){if(n){o&&(o=o.toLowerCase());for(const c of n){var a,i;const l=(a=c.domain)==null?void 0:a.split(":",1)[0].toLowerCase();if(s===l||o===c.defaultLocale.toLowerCase()||(i=c.locales)!=null&&i.some(u=>u.toLowerCase()===o))return c}}}}(Pr)),Pr}var Bo;function Wf(){return Bo||(Bo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"detectDomainLocale",{enumerable:!0,get:function(){return n}});const n=function(){for(var s=arguments.length,o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];if(process.env.__NEXT_I18N_SUPPORT)return Vf().detectDomainLocale(...o)};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(yn,yn.exports)),yn.exports}var Uo;function Gf(){return Uo||(Uo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return o}});const n=Hn(),s=process.env.__NEXT_ROUTER_BASEPATH||"";function o(a,i,c,l){if(process.env.__NEXT_I18N_SUPPORT){const u=qf().normalizeLocalePath,m=Wf().detectDomainLocale,f=i||u(a,c).detectedLocale,p=m(l,void 0,f);if(p){const h="http"+(p.http?"":"s")+"://",_=f===p.defaultLocale?"":"/"+f;return""+h+p.domain+(0,n.normalizePathTrailingSlash)(""+s+_+a)}return!1}else return!1}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(_n,_n.exports)),_n.exports}var xn={exports:{}},Ho;function Kf(){return Ho||(Ho=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return a}});const n=Fc(),s=Hn(),o=process.env.__NEXT_ROUTER_BASEPATH||"";function a(i,c){return(0,s.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH&&!c?i:(0,n.addPathPrefix)(i,o))}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(xn,xn.exports)),xn.exports}var vn={exports:{}},qo;function Xf(){return qo||(qo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(h,_){for(var y in _)Object.defineProperty(h,y,{enumerable:!0,get:_[y]})}n(t,{ACTION_FAST_REFRESH:function(){return l},ACTION_NAVIGATE:function(){return o},ACTION_PREFETCH:function(){return c},ACTION_REFRESH:function(){return s},ACTION_RESTORE:function(){return a},ACTION_SERVER_ACTION:function(){return u},ACTION_SERVER_PATCH:function(){return i},PrefetchCacheEntryStatus:function(){return f},PrefetchKind:function(){return m},isThenable:function(){return p}});const s="refresh",o="navigate",a="restore",i="server-patch",c="prefetch",l="fast-refresh",u="server-action";var m;(function(h){h.AUTO="auto",h.FULL="full",h.TEMPORARY="temporary"})(m||(m={}));var f;(function(h){h.fresh="fresh",h.reusable="reusable",h.expired="expired",h.stale="stale"})(f||(f={}));function p(h){return h&&(typeof h=="object"||typeof h=="function")&&typeof h.then=="function"}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(vn,vn.exports)),vn.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return S}});const n=Le,s=r,o=n._(g),a=$f(),i=$c(),c=kc(),l=Un(),u=Ff(),m=Bc(),f=Bf(),p=Uf(),h=Gf(),_=Kf(),y=Xf(),x=new Set;function b(E,I,A,L,O,D){if(typeof window>"u"||!D&&!(0,i.isLocalURL)(I))return;if(!L.bypassPrefetchedCheck){const M=typeof L.locale<"u"?L.locale:"locale"in E?E.locale:void 0,U=I+"%"+A+"%"+M;if(x.has(U))return;x.add(U)}(async()=>D?E.prefetch(I,O):E.prefetch(I,A,L))().catch(M=>{if(process.env.NODE_ENV!=="production")throw M})}function C(E){const A=E.currentTarget.getAttribute("target");return A&&A!=="_self"||E.metaKey||E.ctrlKey||E.shiftKey||E.altKey||E.nativeEvent&&E.nativeEvent.which===2}function j(E,I,A,L,O,D,Q,M,U){const{nodeName:F}=E.currentTarget;if(F.toUpperCase()==="A"&&(C(E)||!U&&!(0,i.isLocalURL)(A)))return;E.preventDefault();const G=()=>{const H=Q??!0;"beforePopState"in I?I[O?"replace":"push"](A,L,{shallow:D,locale:M,scroll:H}):I[O?"replace":"push"](L||A,{scroll:H})};U?o.default.startTransition(G):G()}function v(E){return typeof E=="string"?E:(0,c.formatUrl)(E)}const S=o.default.forwardRef(function(I,A){let L;const{href:O,as:D,children:Q,prefetch:M=null,passHref:U,replace:F,shallow:Y,scroll:G,locale:H,onClick:Z,onMouseEnter:re,onTouchStart:le,legacyBehavior:se=!1,...ie}=I;L=Q,se&&(typeof L=="string"||typeof L=="number")&&(L=(0,s.jsx)("a",{children:L}));const $=o.default.useContext(m.RouterContext),J=o.default.useContext(f.AppRouterContext),w=$??J,W=!$,ae=M!==!1,he=M===null?y.PrefetchKind.AUTO:y.PrefetchKind.FULL;if(process.env.NODE_ENV!=="production"){let z=function(B){return new Error("Failed prop type: The prop `"+B.key+"` expects a "+B.expected+" in `<Link>`, but got `"+B.actual+"` instead."+(typeof window<"u"?`
2
- Open your browser's console to view the Component stack trace.`:""))};Object.keys({href:!0}).forEach(B=>{if(B==="href"&&(I[B]==null||typeof I[B]!="string"&&typeof I[B]!="object"))throw z({key:B,expected:"`string` or `object`",actual:I[B]===null?"null":typeof I[B]})}),Object.keys({as:!0,replace:!0,scroll:!0,shallow:!0,passHref:!0,prefetch:!0,locale:!0,onClick:!0,onMouseEnter:!0,onTouchStart:!0,legacyBehavior:!0}).forEach(B=>{const ee=typeof I[B];if(B==="as"){if(I[B]&&ee!=="string"&&ee!=="object")throw z({key:B,expected:"`string` or `object`",actual:ee})}else if(B==="locale"){if(I[B]&&ee!=="string")throw z({key:B,expected:"`string`",actual:ee})}else if(B==="onClick"||B==="onMouseEnter"||B==="onTouchStart"){if(I[B]&&ee!=="function")throw z({key:B,expected:"`function`",actual:ee})}else if((B==="replace"||B==="scroll"||B==="shallow"||B==="passHref"||B==="prefetch"||B==="legacyBehavior")&&I[B]!=null&&ee!=="boolean")throw z({key:B,expected:"`boolean`",actual:ee})});const k=o.default.useRef(!1);I.prefetch&&!k.current&&!W&&(k.current=!0,console.warn("Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://nextjs.org/docs/messages/prefetch-true-deprecated"))}if(process.env.NODE_ENV!=="production"&&W&&!D){let z;if(typeof O=="string"?z=O:typeof O=="object"&&typeof O.pathname=="string"&&(z=O.pathname),z&&z.split("/").some(ye=>ye.startsWith("[")&&ye.endsWith("]")))throw new Error("Dynamic href `"+z+"` found in <Link> while using the `/app` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href")}const{href:N,as:R}=o.default.useMemo(()=>{if(!$){const ye=v(O);return{href:ye,as:D?v(D):ye}}const[z,me]=(0,a.resolveHref)($,O,!0);return{href:z,as:D?(0,a.resolveHref)($,D):me||z}},[$,O,D]),Ne=o.default.useRef(N),q=o.default.useRef(R);let K;if(se)if(process.env.NODE_ENV==="development"){Z&&console.warn('"onClick" was passed to <Link> with `href` of `'+O+'` but "legacyBehavior" was set. The legacy behavior requires onClick be set on the child of next/link'),re&&console.warn('"onMouseEnter" was passed to <Link> with `href` of `'+O+'` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link');try{K=o.default.Children.only(L)}catch{throw L?new Error("Multiple children were passed to <Link> with `href` of `"+O+"` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children"+(typeof window<"u"?`
3
- Open your browser's console to view the Component stack trace.`:"")):new Error("No children were passed to <Link> with `href` of `"+O+"` but one child is required https://nextjs.org/docs/messages/link-no-children")}}else K=o.default.Children.only(L);else if(process.env.NODE_ENV==="development"&&(L==null?void 0:L.type)==="a")throw new Error(`Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.
4
- Learn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor`);const _e=se?K&&typeof K=="object"&&K.ref:A,[we,be,ge]=(0,p.useIntersection)({rootMargin:"200px"}),Ae=o.default.useCallback(z=>{(q.current!==R||Ne.current!==N)&&(ge(),q.current=R,Ne.current=N),we(z),_e&&(typeof _e=="function"?_e(z):typeof _e=="object"&&(_e.current=z))},[R,_e,N,ge,we]);o.default.useEffect(()=>{process.env.NODE_ENV==="production"&&w&&(!be||!ae||b(w,N,R,{locale:H},{kind:he},W))},[R,N,be,H,ae,$==null?void 0:$.locale,w,W,he]);const je={ref:Ae,onClick(z){if(process.env.NODE_ENV!=="production"&&!z)throw new Error('Component rendered inside next/link has to pass click event to "onClick" prop.');!se&&typeof Z=="function"&&Z(z),se&&K.props&&typeof K.props.onClick=="function"&&K.props.onClick(z),w&&(z.defaultPrevented||j(z,w,N,R,F,Y,G,H,W))},onMouseEnter(z){!se&&typeof re=="function"&&re(z),se&&K.props&&typeof K.props.onMouseEnter=="function"&&K.props.onMouseEnter(z),w&&((!ae||process.env.NODE_ENV==="development")&&W||b(w,N,R,{locale:H,priority:!0,bypassPrefetchedCheck:!0},{kind:he},W))},onTouchStart:process.env.__NEXT_LINK_NO_TOUCH_START?void 0:function(me){!se&&typeof le=="function"&&le(me),se&&K.props&&typeof K.props.onTouchStart=="function"&&K.props.onTouchStart(me),w&&(!ae&&W||b(w,N,R,{locale:H,priority:!0,bypassPrefetchedCheck:!0},{kind:he},W))}};if((0,l.isAbsoluteUrl)(R))je.href=R;else if(!se||U||K.type==="a"&&!("href"in K.props)){const z=typeof H<"u"?H:$==null?void 0:$.locale,me=($==null?void 0:$.isLocaleDomain)&&(0,h.getDomainLocale)(R,z,$==null?void 0:$.locales,$==null?void 0:$.domainLocales);je.href=me||(0,_.addBasePath)((0,u.addLocale)(R,z,$==null?void 0:$.defaultLocale))}return se?o.default.cloneElement(K,je):(0,s.jsx)("a",{...ie,...je,children:L})});(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(es,es.exports);var Yf=es.exports,Qf=Yf;const Me=T.getDefaultExportFromCjs(Qf),Zf="_link_w24h0_1",Jf="_wrapper_w24h0_98",eh="_text_w24h0_106",Nr={link:Zf,wrapper:Jf,text:eh},$e=({children:e,adornments:t,className:n,disableUnderline:s,href:o,mode:a,size:i,title:c,onClick:l,disablePadding:u,...m})=>{const f=d.helpers.ValidateProp({fieldTypes:Tt.SizesSmallExtended,property:i,fallback:"medium"}),p=d.helpers.ValidateProp({fieldTypes:Tt.Mode,property:a,fallback:"default"});return r.jsx(Me,{...m,className:d.helpers.classNameConcat(Nr.link,n),href:o&&o.length>0?o:"#","data-size":f,"data-variant":p,title:c||"NextLink","data-disable-underline":s??!1,"data-disable-padding":u??!0,children:r.jsxs("div",{className:Nr.wrapper,onClick:l,children:[t==null?void 0:t.start,r.jsx("p",{className:Nr.text,"data-size":f,children:e}),t==null?void 0:t.end]})})},th=({ICONS:e})=>{const{resetFeedback:t}=Et();return r.jsxs("div",{className:Wt["wishlist--snack--actions"],children:[r.jsx($e,{href:"/favoritos",children:"Ver Favoritos"}),r.jsx(d.Button,{variant:"tertiary",size:"small",onClick:t,adornment:{start:r.jsx(d.Icon,{name:e.close})}})]})},$s=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:n})=>{const s=Cs(),{resetFeedback:o}=Et(),a=g.useRef(null);return g.useEffect(()=>{a.current&&clearTimeout(a.current),s&&(a.current=setTimeout(()=>{o()},5e3))},[s,o]),(s==null?void 0:s.active)&&r.jsx(Lt,{Z_INDEX_WAR:n,className:Wt["wishlist--snack"],"data-action":s.action,title:s.action==="add"?e.messages.add:e.messages.remove,supportChildren:r.jsx(th,{ICONS:t}),size:"medium"})};$s.displayName="WishList.Feedback";const zs={"product-list--banner":"_product-list--banner_sfibj_1","product-list--card":"_product-list--card_sfibj_30","product-list":"_product-list_sfibj_1"},Hc=({className:e,children:t,columns:n=1,isMobile:s=!1,gap:o=8,position_grid:a,totalColumns:i=4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,...l})=>{const u=g.useMemo(()=>n%i===0?"initial":s||n<2?c:c.split("/").reverse().join("/"),[n,i,s]);return r.jsx("div",{...l,className:d.helpers.classNameConcat(zs["product-list--banner"],e),style:{aspectRatio:u,maxWidth:`${n/i*100}%`,order:a,padding:o/2},children:t})};Hc.displayName="ProductList.Banner";const qc=({isKit:e,parent:t,productId:n,setNotify:s,CONSTANTS:o})=>{const{router:a}=ce(),i=g.useRef(!1),c=g.useRef(null),[l,u]=g.useState([]),m=y=>a.push(y??""),f=new Map,p=async y=>{try{if(f.has(y)){u(f.get(y));return}const x=await fetch("/api/catalog/product/similars",{method:"POST",body:JSON.stringify({productId:y,filterTexture:o.TEXTURE_IMAGE}),priority:"low"});if(!x.ok)throw new Error("Erro ao buscar similares.");const b=await x.json();f.set(y,b),u(b)}catch(x){console.error(x)}},h=g.useCallback(y=>{!n||!y||(typeof p=="function"&&p(n),i.current=!0)},[n]),_=g.useCallback((y,x)=>{if(!y.isIntersecting){o.PLP_INFINITE_SCROLL&&c.current&&(clearTimeout(c.current),c.current=null);return}if(y.intersectionRatio>=x.threshold&&!i.current){if(o.PLP_INFINITE_SCROLL){c.current=setTimeout(()=>{h(!0)},o.PLP_PRODUCT_SIMILAR_DELAY);return}h(!0)}},[h]);return g.useEffect(()=>{if(e||!t.current)return;const y={root:null,threshold:.1},x=new IntersectionObserver(([b])=>{_(b,y)},y);return x.observe(t.current),()=>{c.current&&clearTimeout(c.current),x.disconnect()}},[_,t,e]),r.jsx(pe.Actions,{...l,callback:m,isKit:e,children:!e&&r.jsx(pe.SizeSelector,{setNotify:s,PLP_SIZE_ORDER:o.PLP_SIZE_ORDER})})};qc.displayName="ProductList.Card.Actions";const Vc=({className:e,children:t,gap:n=32,item:s,isMobile:o,order:a,tag:i,hasMaxWidth:c=!0,index:l,setSkuSelected:u,showVideo:m,CONSTANTS:f,...p})=>{const h=g.useRef(null),{availability:{status:_}}=s,y=g.useCallback((b,C)=>{var j;typeof u=="function"&&u((j=b.isVariantOf)==null?void 0:j.hasVariant,C)},[u]),x=s.name.substring(0,4).toLowerCase()==="kit ";return r.jsxs("div",{...p,className:d.helpers.classNameConcat(zs["product-list--card"],e),"data-mobile":o,"data-order":a,ref:h,style:{...c&&{maxWidth:o?"50%":"25%"},order:a,padding:n/2},children:[r.jsxs(pe.Root,{item:s,isMobile:o,index:l,size:o?"small":"medium",order:a,outStock:!_,CONSTANTS:f,children:[r.jsx(pe.Header,{product:s,tag:i==null?void 0:i.commercial}),r.jsx(pe.Media,{showVideo:m,hasPriority:!0}),r.jsxs(pe.Wrapper,{type:"body",children:[r.jsx(pe.Title,{tag:i==null?void 0:i.institucional}),r.jsx(qc,{productId:s.isVariantOf.productGroupID,parent:h,setNotify:y,isKit:x,CONSTANTS:f}),!x&&r.jsx(pe.OutStock,{callback:y})]}),r.jsx(pe.Wrapper,{type:"footer",children:_&&r.jsx(pe.BuyButton,{isKit:x})})]}),t]})};Vc.displayName="ProductList.Card";const Wc=({children:e,className:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(zs["product-list"],t),children:e});Wc.displayName="ProductList.Grid";const ot={Banner:Hc,Card:Vc,Root:Wc,helpers:bp},nh="_pdc_alo7z_1",Ke={"pdc--empty":"_pdc--empty_alo7z_1","pdc--grid":"_pdc--grid_alo7z_17","pdc--grid--content":"_pdc--grid--content_alo7z_26","pdc--infinite":"_pdc--infinite_alo7z_41","pdc--infinite--loader":"_pdc--infinite--loader_alo7z_44","pdc--infinite--loader--page":"_pdc--infinite--loader--page_alo7z_54","pdc--infinite--card--disabled":"_pdc--infinite--card--disabled_alo7z_58","pdc--infinite--next-page":"_pdc--infinite--next-page_alo7z_91","pdc--infinite--next-page--card":"_pdc--infinite--next-page--card_alo7z_101","pdc--infinite--next-page--spinner":"_pdc--infinite--next-page--spinner_alo7z_111","pdc--pagination":"_pdc--pagination_alo7z_118",pdc:nh},Fs=({className:e,ICONS:t,PLP_NOT_RESULT:n})=>{const{router:s}=ce(),{isMobile:o}=ne(),a=()=>{s.push(n==null?void 0:n.link)};return r.jsxs("div",{className:d.helpers.classNameConcat(Ke["pdc--empty"],e),children:[r.jsxs(d.TextStructure.DivWrapper,{className:Ke["pdc--empty-wrapper"],children:[r.jsx("span",{className:o?"typography-style-body-md":"typography-style-heading-sm",children:n.title}),r.jsx("p",{className:o?"typography-style-body-xs":"typography-style-body-sm",children:n.subtitle})]}),r.jsx(d.Button,{adornment:{end:r.jsx(d.Icon,{name:t.arrow_right})},className:"typography-style-body-sm-strong",onClick:()=>a(),variant:"tertiary",children:r.jsx("b",{children:n.text})})]})};Fs.displayName="PDC.Empty";const qn=e=>r.jsx("div",{...e,className:Ke["pdc--infinite--next-page"],children:r.jsx(d.Spinner,{className:Ke["pdc--infinite--next-page--spinner"]})});qn.displayName="PDC.Spinner";function Gc({CONSTANTS:e}){const{sendDataLayerEvent:t}=oe(),{isMobile:n}=ne(),{getAvailableProductTag:s}=ht(),[o,a]=g.useState([]),[i,c]=g.useState(!0),l=$t(),u=l.join(","),m=n?16:32;return g.useEffect(()=>{const f=async()=>{l.length?await fetch("/api/wishlist/products",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({productIds:l})}).then(p=>p.json()).then(p=>{a(p),t({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:p}}})}).catch(p=>console.error(p)):a([]),c(!1)};if(l.length){f();return}if(l.length===0&&o.length===0){c(!1);return}a([]),c(!1)},[u]),r.jsx("section",{className:Wt["wishlist-grid"],children:r.jsxs("div",{className:Wt["wishlist-grid--container"],children:[i&&r.jsx(qn,{}),!l.length&&!(o!=null&&o.length)&&!i&&r.jsx(Fs,{className:Wt["pdc-empty-modifier"],ICONS:e.ICONS,PLP_NOT_RESULT:e.WISHLIST_NOT_RESULT}),r.jsx(ot.Root,{children:Array.isArray(o)&&o.map((f,p)=>{const h=f.node.cluster.highlights||[],_=s(h);return r.jsx(ot.Card,{gap:m,isMobile:n??!1,item:f.node,tag:_,index:p,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,MAIN_IMAGE:e.MAIN_IMAGE,PLP_GRID_SCROLL_BACK:e.PLP_GRID_SCROLL_BACK,PLP_INFINITE_SCROLL:e.PLP_INFINITE_SCROLL,PLP_SIZE_ORDER:e.PLP_SIZE_ORDER,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:e.PLP_SHOW_VIDEO_ON_PRODUCT_CARD,PLP_PRODUCT_SIMILAR_DELAY:e.PLP_PRODUCT_SIMILAR_DELAY,PRODUCT_CARD_IMAGE_ASPECT_RATIO:e.PRODUCT_CARD_IMAGE_ASPECT_RATIO,PRODUCT_CARD_TEXTS:e.PRODUCT_CARD_TEXTS,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:e.PRODUCT_CARD_TOP_WISHLIST_TOGGLE,PRODUCT_IMAGE_DIMENSIONS:e.PRODUCT_IMAGE_DIMENSIONS,SECOND_IMAGE:e.SECOND_IMAGE,StoreConfig_MainSellerId:e.StoreConfig_MainSellerId,TEXTURE_IMAGE:e.TEXTURE_IMAGE,Z_INDEX_WAR:e.Z_INDEX_WAR,ICONS:e.ICONS}},f.node.sku)})})]})})}Gc.displayName="Wishlist.Grid";const rh=e=>e.map(t=>{var n;return(n=t.isVariantOf)==null?void 0:n.productGroupID})??[],Kc=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:n})=>{const s=zt(),o=$t(),a=Cs(),{updateList:i}=Et();return g.useEffect(()=>{var l,u;a.active&&et.set("fs::wishlist",o);const c=async()=>{var m;await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:o,docId:(m=s==null?void 0:s.user)==null?void 0:m.id})}).catch(f=>{console.error("Error updating wishlist:",f)})};a.active&&((l=s.user)!=null&&l.id)&&o.length!==((u=s.wishlist)==null?void 0:u.length)&&c()},[a,s,o]),g.useEffect(()=>{var u;const c=async()=>{const m=await et.get("fs::wishlist");m&&(m==null?void 0:m.length)!==o.length&&i(m)},l=async()=>{var h;const m=await et.get("fs::wishlist")??[],f=s.wishlist?typeof s.wishlist[0]=="object"?rh(s.wishlist):s.wishlist:[],p=[...new Set([...m,...f])];i(p),et.set("fs::wishlist",o),f.length!==p.length&&await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:p,docId:(h=s.user)==null?void 0:h.id})}).catch(_=>{console.error("Error updating wishlist:",_)})};if((u=s.user)!=null&&u.id){l();return}c()},[s,i,o]),r.jsx($s,{ICONS:t,Z_INDEX_WAR:n,WISHLIST_INFO:e})};Kc.displayName="Wishlist.Init";const Xc=({product:e,priceInfo:t,size:n="medium",style:s,ICONS:o})=>{const{sendDataLayerEvent:a,currentLocalRef:i}=oe(),c=$t(),{toggleProduct:l}=Et(),{isVariantOf:{productGroupID:u}}=e;return r.jsx(d.Button,{adornment:{start:r.jsx(d.Icon,{size:n,name:c.includes(u)?o.favorite_true:o.favorite_false})},onClick:()=>{l(u),a({functionKey:"productEvents",data:{event:c.includes(u)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:i.current},commonData:{...e,...t}}})},style:{...s,border:"none"},variant:"tertiary"})};Xc.displayName="WishList.Toggle";const Yc={Feedback:$s,Toggle:Xc,Grid:Gc,Init:Kc},Qc=({product:e,tag:t,size:n="small"})=>{const{CONSTANTS:s}=Xe(),{tags:o}=ht(),a=e.offers.offers[0],i=T.getDiscountPercent(a.listPrice,a.price),c=o==null?void 0:o.flagDiscount;return r.jsxs(pe.Wrapper,{type:"header",style:{zIndex:s.Z_INDEX_WAR.product_card_header},children:[i>0&&!t&&(c==null?void 0:c.enableTag)&&r.jsxs(d.Tag,{title:`${i}% ${c==null?void 0:c.tagText}`,variant:"quaternary",size:"small",style:{background:c==null?void 0:c.tagColor,color:c==null?void 0:c.tagTextColor},children:[i,"% ",c==null?void 0:c.tagText]}),t?r.jsx(d.Tag,{title:t.value,adornment:{start:t.enableIcon&&t.icon?r.jsx(d.Icon,{name:t.icon,size:"small",style:{color:t.iconColor}}):null},size:n,variant:"quaternary",style:{background:t.tagColor,color:t.textColor},children:t.value}):null,s.PRODUCT_CARD_TOP_WISHLIST_TOGGLE&&r.jsx(Yc.Toggle,{product:e,priceInfo:{price:a.price,listPrice:a.listPrice},variant:"card",ICONS:s.ICONS})]})};Qc.displayName="ProductCard.Actions.Header";const Zc=({className:e,children:t,hasPriority:n=!1,showVideo:s=!1,...o})=>{const{element:a,index:i,item:{image:c,slug:l,video:u},sendSelectItemEvent:m,order:f,CONSTANTS:p}=Xe(),h=T.getFirstImages({images:c,label:{first:p.MAIN_IMAGE,second:p.SECOND_IMAGE}});return r.jsxs("div",{...o,className:d.helpers.classNameConcat(Re["product-card--image"],e),ref:a,style:{aspectRatio:p.PRODUCT_CARD_IMAGE_ASPECT_RATIO},children:[r.jsx(Me,{href:`/${l}/p`,onClick:m,onMouseUp:_=>{_.button===1&&m(),p.PLP_INFINITE_SCROLL&&sessionStorage.setItem(p.PLP_GRID_SCROLL_BACK.order,String(f))},children:r.jsx("div",{className:Re["product-card--image--container"],children:Array.isArray(h)&&h.map(({url:_,alternateName:y},x)=>g.createElement(Ie.Image,{...p.PRODUCT_IMAGE_DIMENSIONS.product_card,style:p.PRODUCT_IMAGE_DIMENSIONS.product_card,alt:y??"product image",key:x,...n&&{priority:x===0&&i<4},objectFit:"cover",src:_}))})}),p.PLP_SHOW_VIDEO_ON_PRODUCT_CARD&&s&&u&&r.jsx(pe.Video,{url:u,poster:h[0].url}),t]})};Zc.displayName="ProductCard.Media.Media";const Jc=({className:e,callback:t,children:n,...s})=>{const{isMobile:o,item:a,CONSTANTS:{PRODUCT_CARD_TEXTS:i}}=Xe(),{availability:{status:c}}=a;return c?null:r.jsxs("div",{...s,className:d.helpers.classNameConcat(Re["product-card--outstock"],e),children:[r.jsx(d.Tag,{size:"small",variant:"secondary",title:i.disabled,children:i.disabled}),r.jsx(d.Button,{className:d.helpers.classNameConcat(e,"buy-button"),size:o?"medium":"large",variant:"quaternary",onClick:()=>{typeof t=="function"&&t(a)},children:i.notify})]})};Jc.displayName="ProductCard.OutStock";const el=({children:e,className:t="",index:n,isMobile:s=!1,item:o,size:a,order:i,outStock:c,shelfTitle:l,CONSTANTS:u,...m})=>r.jsx(bf,{item:o,isMobile:s,outStock:c,order:i,size:a,index:n,shelfTitle:l,CONSTANTS:u,children:r.jsx("div",{...m,className:d.helpers.classNameConcat(Re["product-card--wrapper"],t),"data-size":a,children:e})});el.displayName="ProductCard.Root";const tl=({disabled:e,label:t,size:n,value:s,onClick:o,...a})=>r.jsxs(d.ToggleSize.Wrapper,{...a,disabled:!1,outOfStock:e,size:n,onClick:o,children:[r.jsx(d.ToggleSize.DisabledAdornment,{}),r.jsx(d.ToggleSize.Text,{children:t})]});tl.displayName="ProductCard.SizeSelector.Item";const nl=({active:e=!1,callback:t,selectedSku:n=null,item:s,setNotify:o})=>{const{item:a,isMobile:i,setSelectedSku:c,eventDataRef:l}=Xe();s.productId=a.id;const u=T.disableSKU(s),m=T.getSKUName(s,"tamanho");!u&&!l.current.availableSkus.includes(m)&&l.current.availableSkus.push(m);const f=g.useCallback(h=>{const _=n===h?null:h;typeof c=="function"&&c(_),typeof t=="function"&&t(_)},[t,c,n]),p=g.useCallback(()=>{if(u&&typeof o=="function"){o(a,s);return}f(s)},[s,o,f,u,a]);return r.jsx(tl,{active:e,disabled:u,label:m,onClick:()=>p(),size:i?"x-small":"small",value:s})};nl.displayName="ProductCard.SizeSelector.SkuItem";const rl=({items:e,getLabel:t,PLP_SIZE_ORDER:n})=>Array.isArray(e)?[...e].sort((s,o)=>{const a=t(s).toUpperCase(),i=t(o).toUpperCase(),c=n.indexOf(a)-n.indexOf(i);return c!==0?c:a.localeCompare(i,"pt-BR")}):[],sl=({callback:e,className:t="",children:n,setNotify:s,PLP_SIZE_ORDER:o,...a})=>{const{isMobile:i,item:{isVariantOf:{hasVariant:c}},selectedSku:l}=Xe(),u=g.useMemo(()=>Array.isArray(c)?rl({items:c,getLabel:m=>T.getSKUName(m,"tamanho"),PLP_SIZE_ORDER:o}):[],[c]);return r.jsxs("div",{...a,className:d.helpers.classNameConcat(Re["product-card--selectors--size"],t),"data-mobile":i,children:[r.jsx("div",{className:Re["product-card--selectors--size--skus"],children:u.map((m,f)=>r.jsx(nl,{active:l===m,callback:e,item:m,selectedSku:l,setNotify:s},`size--${f}--${m.sku}`))}),r.jsx("div",{className:Re["product-card--selectors--size--button"],children:n})]})};sl.displayName="ProductCard.SizeSelector";const ts=({alt:e="",callback:t,more:n,total:s=4,src:o,url:a,...i})=>r.jsxs(d.ToggleStyle.Wrapper,{...i,onClick:()=>{typeof t=="function"&&t(a)},children:[r.jsx(d.ToggleStyle.DisabledAdornment,{}),r.jsxs(d.ToggleStyle.Texture,{children:[o&&r.jsx(Ie.Image,{alt:e??o,src:o,height:34,width:34}),n&&r.jsx(d.TextStructure.DivWrapper,{className:Re["product-card--selectors--style--more"],children:r.jsxs("p",{children:["+ ",s]})})]})]}),sh=({children:e,callback:t,data:n,total:s=4,size:o,...a})=>{const{index:i}=Xe(),{triggerSelectItemEventRef:c}=oe();return r.jsxs("div",{...a,children:[e,Array.isArray(n)&&n.slice(0,s).map((l,u)=>r.jsx(ts,{callback:m=>{c.current.trigger=!0,c.current.index=i,typeof t=="function"&&t(m)},src:(l==null?void 0:l.textureImage)??"",alt:l==null?void 0:l.textureAlt,url:l==null?void 0:l.slug,size:o},u)),Array.isArray(n)&&(n==null?void 0:n.length)>s&&r.jsx(ts,{size:o,total:n.length-s,more:!0})]})},ol=({callback:e,className:t,data:n,images:s=[],findTexture:o,...a})=>{const{CONSTANTS:i}=Xe(),c=o||i.TEXTURE_IMAGE,l=s==null?void 0:s.find(u=>c.includes(u.alternateName));return r.jsx(sh,{...a,callback:e,className:d.helpers.classNameConcat(Re["product-card--selectors--style"],t),data:n,size:"x-small",children:l&&r.jsx(ts,{active:!0,size:"x-small",src:l.url})})};ol.displayName="ProductCard.StyleSelector";const al=({className:e,hasDecimal:t,...n})=>{const{isMobile:s,item:{offers:{lowPrice:o,highPrice:a},installments:{count:i,value:c}},eventDataRef:l}=Xe();l.current.priceInfo={price:o,listPrice:a};const u=T.formatPriceToCurrency(a,t),m=T.formatPriceToCurrency(o,t),f=T.formatPriceToCurrency(c??0),p=s?"horizontal":"stacked";return r.jsx("div",{...n,className:d.helpers.classNameConcat(Re["product-card--price"],e),"data-mobile":s,children:r.jsx(d.ProductInfo.Root,{size:"small",layout:p,children:r.jsxs(d.ProductInfo.Wrapper,{size:"small",layout:p,children:[r.jsx(d.ProductInfo.ValuesWrapper,{children:m!==u?r.jsxs(r.Fragment,{children:[r.jsx(d.ProductInfo.Price,{label:"originalPrice",value:u,size:"small"}),r.jsx(d.ProductInfo.Price,{label:"discountPrice",value:m,size:"small"})]}):r.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:m,size:"small"})}),i&&i>1&&c?r.jsx(d.ProductInfo.Price,{label:"installment",value:`${i}x ${f}`,size:"small"}):null]})})})};al.displayName="ProductCard.Price";const il=({tag:e,className:t})=>{const{item:{name:n}}=Xe();return r.jsxs("div",{className:d.helpers.classNameConcat(Re["product-card--title"],t),children:[r.jsx("div",{className:Re["product-card--title--tag"],children:e?r.jsx(d.Tag,{size:"small",title:e.value,variant:"quaternary",adornment:{start:e.enableIcon&&e.icon?r.jsx(d.Icon,{name:e.icon,style:{color:e.iconColor}}):null},style:{background:e.tagColor,color:e.textColor},children:e.value}):r.jsx("div",{})}),r.jsx("div",{className:Re["product-card--title--content"],children:n&&r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h3",{children:n})})})})]})};il.displayName="ProductCard.Title";const cl=({className:e,url:t,poster:n,...s})=>{const{element:o}=Xe();return g.useEffect(()=>{if(!(o!=null&&o.current))return;const a=o.current,i=a.querySelector("video");if(i){const c=new IntersectionObserver(m=>{m.forEach(f=>{T.setVideoPlay(f.isIntersecting,i,t)})},{root:null,rootMargin:"0px",threshold:.5}),l=()=>{i.setAttribute("data-loaded","true")},u=()=>{a&&(c.observe(a),i.addEventListener("loadeddata",l))};return document.readyState==="complete"?u():window.addEventListener("load",u),()=>{c.disconnect(),window.removeEventListener("load",u)}}return()=>null},[t,o]),r.jsx("div",{...s,className:d.helpers.classNameConcat(Re["product-card--video"],e),children:t&&r.jsx(Ie.Video,{autoPlay:!1,muted:!0,loop:!0,preload:"none",playsInline:!0,poster:n})})};cl.displayName="ProductCard.Media.Video";const ll=({children:e,className:t,type:n,...s})=>r.jsx("div",{...s,className:d.helpers.classNameConcat(Re[`product-card--${n}`],t),children:e});ll.displayName="ProductCard.Wrapper";const pe={Actions:Ac,BuyButton:Tc,Header:Qc,Media:Zc,Root:el,OutStock:Jc,Price:al,SizeSelector:sl,StyleSelector:ol,Title:il,Video:cl,Wrapper:ll},oh="_carousel_rzsga_1",ah="_shelf__container_rzsga_14",ih="_shelf_without_carousel_rzsga_34",ch="_card_container_rzsga_55",At={carousel:oh,"custom-controllers":"_custom-controllers_rzsga_5",shelf__container:ah,"controllers-arrows-bullets":"_controllers-arrows-bullets_rzsga_23",shelf_without_carousel:ih,card_container:ch},Vo=({title:e})=>r.jsx("div",{className:At.shelf__container,children:e&&r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("h2",{className:d.helpers.classNameConcat("typography-style-body-md",T.responsive["responsive-mobile-flex"]),children:e}),r.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-md",T.responsive["responsive-desktop-flex"]),children:e})]})})}),lh=({children:e,ICONS:t,itemsPerPage:n,title:s})=>{const{isMobile:o}=ne(),a=n[o?"mobile":"desktop"],{initialize:i,controller:c,itemsStyles:l,pagination:u}=d.Carousel.useCarousel({itemsPerPage:a,gap:10,loop:!0,direction:"row"}),m=g.Children.toArray(e).length;return o||m>=4?r.jsxs(d.Carousel.Root,{innerRef:p=>{i(p)},className:At.carousel,children:[r.jsxs("div",{className:At["custom-controllers"],children:[s&&r.jsx(Vo,{title:s}),a<m&&r.jsxs(d.Carousel.Controller,{className:At["controllers-arrows-bullets"],children:[r.jsxs(d.Carousel.Arrows,{children:[r.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:r.jsx(d.Icon,{name:t.arrow_left})}}),r.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:r.jsx(d.Icon,{name:t.arrow_right})}})]}),!o&&a>2&&r.jsx(d.Carousel.Bullets,{page:u.currentPage,total:u.totalPages,onBulletClick:p=>c==null?void 0:c.navigateTo(p)})]})]}),r.jsx(d.Carousel.Body,{children:g.Children.map(e,(p,h)=>r.jsx(d.Carousel.Item,{style:{...l,overflow:"hidden"},children:p},`${s}_${h}`))})]}):r.jsxs(r.Fragment,{children:[s&&r.jsx(Vo,{title:s}),r.jsx("div",{className:At.shelf_without_carousel,children:e})]})},ul=({className:e,item:t,isMobile:n,size:s,shelfTitle:o,...a})=>{const i=g.useRef(null),{getAvailableProductTag:c}=ht(),{availability:{status:l}}=t,u=f=>{const p=f.filter(h=>!a.CONSTANTS.TEXTURE_IMAGE.includes(h.keywords));return n?p.splice(0,2):p},m=c(t.cluster.highlights);return r.jsx("div",{ref:i,className:At.card_container,children:r.jsxs(pe.Root,{...a,item:{...t,image:u(t.image)},isMobile:n,size:n?"small":"medium",outStock:!l,shelfTitle:o,children:[r.jsx(pe.Header,{product:t,tag:m==null?void 0:m.commercial}),r.jsx(pe.Media,{}),r.jsxs(pe.Wrapper,{type:"body",children:[r.jsx(pe.Title,{tag:m==null?void 0:m.institucional}),r.jsx(pe.Actions,{})]}),r.jsx(pe.Wrapper,{type:"footer"})]})})};ul.displayName="ProductList.Card";const Xt={Shelf:lh,Card:ul},dl=({CONSTANTS:e,inView:t,products:n,innerRef:s})=>{const o=g.useMemo(()=>xf(n),[n]),{isMobile:a}=ne(),{addItemsToCart:i}=ve(),{sendDataLayerEvent:c}=oe(),{getAvailableProductTag:l}=ht(),[u,m]=g.useState({totalPrice:0,products:{}}),f=()=>{const h=Object.values(u.products);i(h),c({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:h.map(_=>{const y=o.find(x=>x.node.id===_.productId);return y==null?void 0:y.node})},supportData:{selectedSkus:h,price:u.totalPrice}}})},p=({selectedProduct:h,productId:_})=>{const y=vf({selectedProduct:h,productId:_,prevState:u,mainSellerId:e.StoreConfig_MainSellerId});m(y)};return g.useEffect(()=>{if(!t||o.length===0)return;const h=e.BUY_PACKAGE.header.title;c({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o},customData:{item_list_name:h},outsideEcommerceData:{item_list_name:h}}})},[t]),r.jsxs("div",{className:mt.container,ref:s,children:[r.jsx("div",{className:mt["carousel-container"],style:{width:o.length<=3?"max-content":"75%"},children:r.jsx(Xt.Shelf,{title:e.BUY_PACKAGE.header.title,itemsPerPage:{desktop:3,mobile:o.length>=3?2.2:o.length},ICONS:e.ICONS,children:Array.isArray(o)&&o.map(({node:h},_)=>{var b,C,j;const y=l(h.cluster.highlights),{availability:{status:x}}=h;return x?r.jsxs(pe.Root,{item:{...h,image:ks.helpers.product.getFirstImages({images:h.image,label:{first:e.MAIN_IMAGE,second:e.SECOND_IMAGE}})},isMobile:a,size:"medium",index:_,shelfTitle:e.BUY_PACKAGE.header.title,CONSTANTS:e,children:[r.jsx(pe.Header,{product:h,tag:y.commercial}),r.jsx(pe.Media,{}),r.jsxs(pe.Wrapper,{type:"body",children:[r.jsx(pe.Title,{tag:{value:(b=y.institucional)==null?void 0:b.value,enableIcon:(C=y.institucional)==null?void 0:C.enableIcon,icon:(j=y.institucional)==null?void 0:j.icon}}),r.jsx(pe.Actions,{children:r.jsx(pe.SizeSelector,{callback:v=>p({selectedProduct:v,productId:h.id}),PLP_SIZE_ORDER:e.PLP_SIZE_ORDER})})]})]},h.id):null})})}),r.jsx("div",{className:mt["add-cart-container"],children:r.jsx(yf,{handleAddAllToCart:f,selectedProducts:u,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,BUY_PACKAGE:e.BUY_PACKAGE,FREIGHT_CALCULATION:e.FREIGHT_CALCULATION}})})]})},Bs={"btn-login":"_btn-login_yas63_12","btn-header":"_btn-header_yas63_22","header-animation":"_header-animation_yas63_35"},Us=({id:e})=>{const{setIsOpen:t,cartStore:{items:n}}=ve(),{handleSelectContent:s}=oe(),{CONSTANTS:o}=Ee(),a=n.reduce((i,c)=>i+(c.quantity??0),0);return r.jsx(d.Header.SupportItem,{onClick:()=>{t(!0),s({content:"header:minicart"})},id:e,children:r.jsxs(d.Badge.AutoPositioner,{children:[r.jsx(d.Badge.Count,{count:a,size:"medium",variant:"primary",style:{backgroundColor:"black",display:a>0?"flex":"none"}}),r.jsx(d.Icon,{name:o.header.ICONS.bag,size:"medium"})]})})};Us.displayName="Header.Bag";const rn=({children:e,href:t,...n})=>t&&t!=="#"?r.jsx(Me,{href:t.startsWith("/")?t:`/${t}`,...n,children:e}):e,ml=()=>{const{headerData:e}=Ee(),{handleSelectContent:t}=oe(),{reset:n,updateValue:s}=Jt(),o=a=>{a?s(a):n()};return r.jsx(d.Header.Categories,{children:Array.isArray(e.categories)&&e.categories.map((a,i)=>r.jsx(rn,{href:a.link,onMouseEnter:()=>o(a.submenuId),onFocus:()=>o(a.submenuId),children:r.jsx(d.Header.CategoryItem,{className:Bs["btn-header"],value:a.submenuId??null,adornment:{start:r.jsx(d.Icon,{name:a.iconStart}),end:r.jsx(d.Icon,{name:a.iconEnd})},style:{textWrap:"nowrap",gap:"0"},onClick:()=>{t({content:`header:${a.label}`})},children:a.label})},`category-${a.label}-${i}`))})};ml.displayName="Header.Categories";function uh(){const{handleSelectContent:e}=oe(),{CONSTANTS:t}=Ee(),{setValue:n}=Dn();return r.jsx(d.Header.SupportItem,{onClick:()=>{n(!0),e({content:"header:search"})},children:r.jsx(d.Icon,{name:t.header.ICONS.search,size:"medium"})})}const dh={"menu-subcategories-container":"_menu-subcategories-container_a93cr_1"},mh={"observer-wrapper":"_observer-wrapper_r43gk_1"},Vn=({children:e,eventData:t,observerOptions:n,callBackWhenVisible:s,stopOnIntersection:o=!0,className:a,...i})=>{const c=g.useRef(null),l=hs(c,o,n),{sendDataLayerEvent:u}=oe();return g.useEffect(()=>{l&&(typeof s=="function"&&s(),t&&u({...t}))},[l]),r.jsx("div",{...i,ref:c,className:d.helpers.classNameConcat(mh["observer-wrapper"],a),children:e})},pl=({thumbnails:e,category:t,isMobile:n=!0,callBack:s})=>{const{handleSelectPromotionEvent:o}=oe(),a=50/e.length;return r.jsx("div",{className:dh["menu-subcategories-container"],children:e.map((i,c)=>{const l=n?i.srcMobile:i.srcDesk;if(!l)return null;const u={creative_name:"banner-menu",creative_slot:`banner-menu:${t}:${c+1}`,promotion_id:l,promotion_name:i.promotion_name};return r.jsx(Vn,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...u}}}},observerOptions:{delay:1e3},children:r.jsxs(Me,{href:i.link??"#",onClick:()=>{typeof s=="function"&&s(),o({updatePromotionRef:!0,promotion:u})},children:[r.jsx(Ie.Image,{src:l,alt:i.label??l,width:500,height:500,sizes:`(max-width: 768px) 100vw, (max-width: 1023px) 75vw, ${a}vw`}),i.label&&r.jsx("p",{children:i.label})]})},`thumb-${i.label}-${c}`)})})};pl.displayName="Menu.Thumbnail";const ns={"menu-desktop":"_menu-desktop_1b799_1","menu-categories":"_menu-categories_1b799_12"},fl=({children:e,dividerOnRight:t=!0,subMenu:n,...s})=>{var l;const{router:o}=ce(),{reset:a}=Jt(),{handleSelectContent:i}=oe(),{CONSTANTS:c}=Ee();return r.jsxs("div",{...s,className:ns["menu-categories"],children:[(l=n==null?void 0:n.subCategories)==null?void 0:l.map((u,m)=>{var h,_,y,x;const f=u.listCollapseDesk&&!((h=u.see_all)!=null&&h.link)?{expandAfterRowsQty:u.rowsToShowDesk}:{},p=u.listCollapseDesk&&!((_=u.see_all)!=null&&_.link)?{expansivesAdornments:{open:c.header.ICONS.add,close:c.header.ICONS.minus},expansivesLabels:{open:c.header.COMPONENT_LIST.listExpandLabel,close:c.header.COMPONENT_LIST.listCollapseLabel},iconSize:"x-small"}:{adornment:{end:r.jsx(d.Icon,{name:c.header.ICONS.arrow_right,size:"small"})}};return r.jsxs(d.ComponentList.Structure,{children:[r.jsx(rn,{href:u.linkLabel,title:u.label,onClick:()=>{u.linkLabel&&(a(),i({content:`menu:${u.label??""}:${n.label??""}`}))},children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h2",{children:u.label})})})}),r.jsx(d.ComponentList.List,{columns:1,...f,className:ns["submenu-categories"],children:(y=u.items)==null?void 0:y.map((b,C)=>r.jsx(d.ComponentList.ListItem,{id:`list-item-${b.label}-${C}`,children:r.jsx($e,{href:b.link??"#",size:"x-small",title:b.label??"",disableUnderline:!0,disablePadding:!0,onClick:()=>{a(),i({content:`menu:${u.label??""}:${b.label??""}:${n.label??""}`})},children:b.label})},`list-item-${b.label}-${C}`))}),((x=u.see_all)==null?void 0:x.link)&&r.jsx(d.ComponentList.Support,{...p,size:"small",onClick:()=>{var b;(b=u.see_all)!=null&&b.link&&(a(),i({content:`menu:${u.label??""}:${n.label}`}),o.push(u.see_all.link))},children:u.see_all.link&&u.see_all.label})]},`list-${u.label}-${m}`)}),t&&r.jsx(d.Utils.Divider,{size:"small",direction:"vertical"})]})};fl.displayName="Menu.Categories";const hl=({children:e,dividerOnBottom:t=!0,...n})=>{const{CONSTANTS:s}=Ee();return r.jsxs(r.Fragment,{children:[r.jsx("div",{...n,className:ns["menu-desktop"],style:{...n.style,justifyContent:s.header.ALIGNMENT_MENU},children:e}),t&&r.jsx(d.Utils.Divider,{size:"small"})]})};hl.displayName="Menu.MenuRoot";const Ir={Root:hl,Categories:fl,Thumbnail:pl},_l=()=>{const{headerData:e,CONSTANTS:t}=Ee(),n=ni(),{reset:s}=Jt();return r.jsx(d.Header.SubMenu,{className:"header-desktop-submenu",children:Array.isArray(e.subMenus)&&e.subMenus.map((o,a)=>{const{thumbnails:i,label:c,id:l}=o,u=l===n,m=i==null?void 0:i.some(f=>!!f.srcDesk);return r.jsxs(Ir.Root,{id:l,style:u?{display:"flex",zIndex:t.header.Z_INDEX_WAR.menu_desktop}:{display:"none"},dividerOnBottom:u,children:[r.jsx(Ir.Categories,{dividerOnRight:!!m,subMenu:o}),Array.isArray(i)&&r.jsx(Ir.Thumbnail,{thumbnails:i,isMobile:!1,category:c,callBack:s})]},`submenu-${l}-${a}`)})})};_l.displayName="Header.SubMenu";const gl=()=>{const{handleSelectContent:e}=oe(),{CONSTANTS:t}=Ee();return r.jsx(Me,{href:"/favoritos",children:r.jsx(d.Header.SupportItem,{onClick:()=>e({content:"header:wishlist"}),children:r.jsx(d.Icon,{name:t.header.ICONS.favorite_false,size:"medium"})})})};gl.displayName="Header.WishList";const ph="_root_im5yf_125",Ve={"user-menu--credits":"_user-menu--credits_im5yf_1","user-menu--content":"_user-menu--content_im5yf_10","user-menu--login":"_user-menu--login_im5yf_30","user-menu--login--content":"_user-menu--login--content_im5yf_37","user-menu--menu":"_user-menu--menu_im5yf_64","user-menu--tooltip":"_user-menu--tooltip_im5yf_92","tooltip-modifier":"_tooltip-modifier_im5yf_103","modal-controls-modifier":"_modal-controls-modifier_im5yf_108","modal-header-modifier":"_modal-header-modifier_im5yf_116",root:ph},yl=({className:e,children:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(Ve["user-menu--content"],e),children:t});yl.displayName="UserMenu.Content";var xl=(e=>(e.Account="account",e))(xl||{});const vl=({className:e,cashBack:t,credits:n,link:s,total:o,...a})=>{const i=t?T.formatPriceToCurrency(t):void 0,c=n?T.formatPriceToCurrency(n):void 0,l=o?T.formatPriceToCurrency(o):void 0;return r.jsx(d.Credits.Account,{...a,className:d.helpers.classNameConcat(Ve["user-menu--credits"],e),icon:"wallet",showIcon:!0,cashBackValue:i,creditsValue:c,linkMore:s,totalValue:l,type:xl.Account})};vl.displayName="UserMenu.Credits";const bl=({className:e,children:t,description:n,text:s,...o})=>{const{isMobile:a}=ne();return r.jsx("div",{...o,className:d.helpers.classNameConcat(Ve["user-menu--login"],e),"data-mobile":a,children:r.jsxs("div",{className:Ve["user-menu--login--content"],children:[r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:[r.jsx("h3",{className:"typography-style-body-lg-strong",children:s}),r.jsx("p",{children:n})]})}),t]})})};bl.displayName="UserMenu.Login";const jl=({className:e,isLogged:t,onLogoutClick:n,ICONS:s,storeConfig:o,isMobile:a})=>{const i=a?no:no({ICONS:s,storeConfig:o}).filter(c=>c.deviceShown==="both"||c.deviceShown===(a?"mobile":"desktop"));return r.jsxs("ul",{className:d.helpers.classNameConcat(Ve["user-menu--menu"],e),children:[Array.isArray(i)&&i.map((c,l)=>r.jsx("li",{children:r.jsx($e,{href:c.href??"#",size:"small",disableUnderline:!0,adornments:{start:r.jsx(d.Icon,{name:c.icon??"delete"})},children:c.label})},l)),t?r.jsx("li",{children:r.jsx($e,{href:`${o.secureSubdomain}/api/vtexid/pub/logout?scope=mariafilo&returnUrl=${encodeURIComponent(`${o.storeUrl}`)}`,size:"small",disableUnderline:!0,onClick:n,adornments:{start:r.jsx(d.Icon,{name:cp(s)})},children:ip})}):r.jsx(r.Fragment,{})]})};jl.displayName="UserMenu.Menu";const Cl=e=>{const t=g.useRef(null),n=g.useCallback(a=>{t.current&&!t.current.contains(a.target)&&e()},[e]),s=g.useCallback(a=>{t.current&&!t.current.contains(a.target)&&e()},[e]),o=g.useCallback(a=>{a.key==="Escape"&&e()},[e]);return g.useEffect(()=>(document.addEventListener("mousedown",n),document.addEventListener("keydown",o),document.addEventListener("touchstart",s),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("keydown",o),document.removeEventListener("touchstart",s)}),[n,o,s]),{ref:t}},fh=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},hh=(e,t,n)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const{height:s,left:o,top:a,width:i}=t.getBoundingClientRect(),c=e.getBoundingClientRect(),l=e!=null&&e.parentElement?fh(e==null?void 0:e.parentElement):0;return{left:o+i/2-(c.width+l*2),top:a+s+n}},Sl=g.createContext({}),_h=({children:e,delay:t=600,gap:n=20,isOpen:s,setIsOpen:o,target:a,...i})=>{const c=g.useRef(null),[l,u]=g.useState(!1),[m,f]=g.useState({left:0,top:0}),{ref:p}=Cl(()=>{u(!0),typeof window<"u"&&(c.current=window.setTimeout(()=>{o(!1),u(!1)},t))});return g.useEffect(()=>{if(a&&(p!=null&&p.current)){const{left:h,top:_}=hh(p.current,a,n??0);f({left:h,top:_}),u(!1)}},[n,s,a,p]),r.jsx(Sl.Provider,{value:g.useMemo(()=>({...i,...m,contentRef:p,isLeaving:l,isOpen:s,setIsOpen:o,setIsLeaving:u,target:a}),[i,m,p,l,s,o,u,a]),children:e})},El=()=>{const e=g.useContext(Sl);if(e===void 0)throw new Error("useUserMenuContext must be used within a UserMenuProvider");return e},Pl=({children:e,isMobile:t=!1,Z_INDEX_WAR:n})=>{const{isOpen:s,setIsOpen:o}=El();return r.jsxs(d.Modal.Root,{"data-user":"user-menu--modal",isMobile:t??!1,isOpen:s,setIsOpen:o,variant:"sideBottom",className:Ve["modal-root-modifier"],style:{zIndex:n.user_menu_mobile},children:[r.jsx(d.Modal.Header,{navigation:"top",className:Ve["modal-header-modifier"],children:r.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0,className:Ve["modal-controls-modifier"]})}),r.jsx(d.Modal.Body,{children:e})]})};Pl.displayName="UserMenu.Modal";const Nl=({children:e,component:t,Z_INDEX_WAR:n,isMobile:s,...o})=>r.jsx(_h,{...o,className:Ve.root,children:s?r.jsxs(r.Fragment,{children:[r.jsx(dt.Modal,{Z_INDEX_WAR:n,children:t}),e]}):r.jsx(dt.Tooltip,{component:t,style:{width:304,zIndex:n.user_menu},Z_INDEX_WAR:n,children:e})});Nl.displayName="UserMenu.Root";const Il=({children:e,component:t,Z_INDEX_WAR:n,...s})=>{const{contentRef:o,left:a,isLeaving:i,isOpen:c,top:l}=El();return r.jsx(d.Tooltip.Root,{arrow:"top-right",component:r.jsx("div",{...s,ref:o,children:t}),className:d.helpers.classNameConcat(Ve["user-menu--tooltip"],Ve["tooltip-modifier"]),isLeaving:i,isOpen:c,left:a,size:"medium",position:"top",top:l,style:{zIndex:n.user_menu},children:r.jsx("div",{className:Ve["user-menu--tooltip"],children:e})})};Il.displayName="UserMenu.Tooltip";const dt={Credits:vl,Content:yl,Login:bl,Menu:jl,Modal:Pl,Root:Nl,Tooltip:Il},Wn=({children:e,isOpen:t,setIsOpen:n,desktopUserMenuTarget:s,mobileUserMenuTarget:o,storeConfig:a})=>{var h,_,y;const{isMobile:i}=ne(),{CONSTANTS:c}=Ee(),l=zt(),u=()=>{window.location.href=`${a.secureSubdomain}/api/io/login?returnUrl=${encodeURIComponent(`${window.location.href}`)}`},m=!!((h=l.user)!=null&&h.userId),{cashback:f,credits:p}=g.useMemo(()=>{var x,b;return{credits:((x=l==null?void 0:l.getCurrentCredits())==null?void 0:x.credits)??0,cashback:((b=l==null?void 0:l.getCurrentCredits())==null?void 0:b.cashback)??0}},[l]);return r.jsx(dt.Root,{component:r.jsxs(dt.Content,{children:[r.jsx(dt.Login,{description:up(m),text:lp(m,((_=l==null?void 0:l.user)==null?void 0:_.firstName)??((y=l==null?void 0:l.user)==null?void 0:y.email)),children:!m&&r.jsx(d.Button,{id:"conta",size:"medium",variant:"quaternary",onClick:()=>u(),children:c.header.MENU_INFO.login.button_text})}),p+f&&m?r.jsx(dt.Credits,{credits:p,cashBack:f,link:`${a.secureSubdomain}/account#/meus-creditos`,total:p+f}):r.jsx(r.Fragment,{}),r.jsx(d.Utils.Divider,{}),r.jsx(dt.Menu,{ICONS:c.header.ICONS,storeConfig:a,isLogged:m,className:T.responsive["responsive-desktop-flex"],onLogoutClick:()=>l.logout()}),r.jsx(dt.Menu,{ICONS:c.header.ICONS,storeConfig:a,isMobile:!0,isLogged:m,className:T.responsive["responsive-mobile-flex"],onLogoutClick:()=>l.logout()})]}),isOpen:t,isMobile:i,setIsOpen:n,target:i?o:s,Z_INDEX_WAR:c.header.Z_INDEX_WAR,children:e})};Wn.displayName="UserMenu";const wl=({storeConfig:e})=>{const{CONSTANTS:t}=Ee(),{handleSelectContent:n}=oe(),{reset:s}=Jt(),{setValue:o}=vs(),a=xs(),i=g.useRef(null);return r.jsxs(r.Fragment,{children:[r.jsxs(d.Header.Wrapper,{className:"header-desktop-wrapper",children:[r.jsx(d.Header.Logo,{style:{width:"100%"},children:r.jsx(Me,{href:"/",onMouseEnter:s,children:r.jsx(d.Icon,{name:t.header.ICONS.logo,onClick:()=>{n({content:"header:logo"})}})})}),r.jsx(ml,{}),r.jsxs(d.Header.Support,{onMouseEnter:s,style:{justifyContent:"flex-end"},children:[r.jsx(uh,{}),r.jsx(Wn,{isOpen:a,setIsOpen:o,desktopUserMenuTarget:i.current,storeConfig:e,children:r.jsx(d.Header.SupportItem,{onClick:()=>{o(!0),n({content:"header:user_menu"})},className:Bs["btn-login"],innerRef:i,children:r.jsx(d.Icon,{name:t.header.ICONS.person,size:"medium"})})}),r.jsx(gl,{}),r.jsx(Us,{id:"cart-button"})]})]}),r.jsx(_l,{})]})};wl.displayName="Header.HeaderDesktopWrapper";const Fe={"menu--banners":"_menu--banners_j3ev9_1","menu--banners--item":"_menu--banners--item_j3ev9_6","menu--banners--item--text":"_menu--banners--item--text_j3ev9_17","menu--banners--list":"_menu--banners--list_j3ev9_21","menu--dummy-close":"_menu--dummy-close_j3ev9_46","menu--body":"_menu--body_j3ev9_54","menu--categories":"_menu--categories_j3ev9_67","menu--categories--title":"_menu--categories--title_j3ev9_80","menu--step":"_menu--step_j3ev9_92","menu--sub-category":"_menu--sub-category_j3ev9_108","menu--sub-category--item":"_menu--sub-category--item_j3ev9_115","menu--sub-category--list":"_menu--sub-category--list_j3ev9_121"},Rl=({children:e,mobileBannerAlt:t,mobileBannerSrc:n,textColor:s,submenuId:o,label:a,...i})=>r.jsx("button",{...i,className:Fe["menu--banners--item"],children:n?r.jsxs(d.Banner.Container,{children:[r.jsx(d.Banner.ImageWrapper,{children:r.jsx(Ie.Image,{alt:t??n,height:128,src:n,width:343,unoptimized:!0})}),r.jsx(d.Banner.Slot,{verticalAlignment:"end",horizontalAlignment:"center",children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:Fe["menu--banners--item--text"],children:r.jsx("h2",{className:"typography-style-body-xs",style:s?{color:s}:{},children:e})})})})]}):r.jsx("h2",{...i,children:e})});Rl.displayName="Menu.Mobile.Category";const Al=({label:e,...t})=>{const{CONSTANTS:n}=Ee();return r.jsx(d.Button,{...t,adornment:{end:r.jsx(d.Icon,{name:n.header.ICONS.arrow_right,size:"medium"})},mode:"inverse",size:"medium",variant:"primary",children:e})};Al.displayName="Menu.Mobile.Body.Category";const Tl=({subCategory:e,submenuLabel:t,onHandleOut:n,...s})=>r.jsx("div",{...s,className:Fe["menu--sub-category--list"],children:Array.isArray(e==null?void 0:e.items)&&(e==null?void 0:e.items.map((o,a)=>r.jsx($e,{disableUnderline:!0,disablePadding:!1,href:o.link??"#",onClick:()=>n(o.label,t),size:"medium",title:o.label??"",children:o.label},a)))});Tl.displayName="Menu.Mobile.List";const Ll=({current:e,onHandleOut:t})=>{var n;return e?r.jsx("div",{className:Fe["menu--sub-category"],children:Array.isArray(e==null?void 0:e.subCategories)&&((n=e==null?void 0:e.subCategories)==null?void 0:n.map((s,o)=>r.jsxs("div",{className:Fe["menu--sub-category--item"],children:[r.jsx(Gt.Title,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id}),r.jsx(Gt.List,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id})]},o)))}):r.jsx(r.Fragment,{})};Ll.displayName="Menu.Mobile.Body.SubCategory";const Ol=({subCategory:e,submenuLabel:t,onHandleOut:n,...s})=>{var c;const{router:o}=ce(),{handleSelectContent:a}=oe(),{CONSTANTS:i}=Ee();return r.jsxs("div",{...s,className:Fe["menu--categories--title"],children:[r.jsx(rn,{href:e==null?void 0:e.linkLabel,title:e==null?void 0:e.linkLabel,onClick:()=>{a({content:`menu:${e.label??""}:${t}`})},children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h2",{className:"typography-style-body-md",children:e==null?void 0:e.label})})})}),((c=e==null?void 0:e.see_all)==null?void 0:c.link)&&r.jsx(d.ComponentList.Support,{adornment:{end:r.jsx(d.Icon,{name:i.header.ICONS.arrow_right,size:"small"})},size:"small",onClick:()=>{var l;n(e.label,t),(l=e==null?void 0:e.see_all)!=null&&l.link&&o.push(e.see_all.link)},children:e.see_all.label})]})};Ol.displayName="Menu.Mobile";const Gt={Banner:Rl,Category:Al,List:Tl,SubCategory:Ll,Title:Ol},kl=g.createContext({}),gh=({children:e})=>{const[t,n]=g.useState(null),s=g.useCallback(()=>{n(null)},[]),o=a=>{a!==t&&n(a)};return r.jsx(kl.Provider,{value:{currentCategory:t,setCurrentCategory:n,handleCloseMenu:s,handleChangeSubMenuOpened:o},children:e})},Dl=()=>g.useContext(kl),Ml=e=>{const{router:t}=ce(),{headerData:n}=Ee(),{handleSelectContent:s}=oe(),{currentCategory:o,setCurrentCategory:a}=Dl(),i=g.useRef(null),c=()=>{if(i.current){const h=i.current;h&&(a(null),h==null||h.click())}},l=(h,_)=>{s({content:`menu:${h}`}),t.push(_),c()},u=(h,_)=>{s({content:`menu:${h}:${_}`}),c()},m=Array.isArray(n==null?void 0:n.categories)?n==null?void 0:n.categories:[],f=Array.isArray(n==null?void 0:n.subMenus)?n==null?void 0:n.subMenus:[],p=h=>{h.submenuId?a(h.submenuId):l(h.label,h.link)};return r.jsxs("div",{...e,className:Fe["menu--body"],style:{transform:`translate3d(calc(-100% * ${o?1:0}), 0px, 0px)`},children:[r.jsx("button",{className:Fe["menu--dummy-close"],ref:i,"data-close":!0}),r.jsxs("div",{className:Fe["menu--step"],"data-active":"true",children:[r.jsx("div",{className:Fe["menu--banners"],children:r.jsx("div",{className:Fe["menu--banners--list"],children:m.map((h,_)=>g.createElement(Gt.Banner,{...h,key:_,onClick:()=>l(h.label,h.link)},h.mobileBannerAlt))})}),r.jsx("div",{className:Fe["menu--categories"],children:m.map((h,_)=>r.jsx(Gt.Category,{label:h.label,onClick:()=>p(h)},_))})]}),r.jsx("div",{className:Fe["menu--step"],"data-active":!!o,children:r.jsx(Gt.SubCategory,{current:f.find(h=>h.id===o),onHandleOut:u})})]})};Ml.displayName="Menu.Mobile.Body";const yh={"menu--header":"_menu--header_1ozdf_1"},$l=()=>{var o;const{headerData:e}=Ee(),{currentCategory:t,setCurrentCategory:n}=Dl(),s=(o=e==null?void 0:e.categories)==null?void 0:o.find(a=>a.submenuId===t);return r.jsxs("div",{className:yh["menu--header"],children:[r.jsx(d.Button,{"data-out":!s,iconNameStart:"arrow-left",mode:"inverse",onClick:()=>n(null)}),s&&r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{alignContent:"center",children:r.jsx("h2",{className:"typography-style-body-lg",children:s==null?void 0:s.label})})}),r.jsx(d.Button,{iconNameStart:"close","data-close":!0,"data-only":!s,mode:"inverse",onClick:()=>n(null)})]})};$l.displayName="Menu.Mobile.Header";var rs={exports:{}};function xh(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var wr={},Rr={},Wo;function vh(){return Wo||(Wo=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"LoadableContext",{enumerable:!0,get:function(){return s}});const s=Le._(g).default.createContext(null);process.env.NODE_ENV!=="production"&&(s.displayName="LoadableContext")}(Rr)),Rr}var Go;function bh(){return Go||(Go=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return h}});const n=Le._(g),s=vh();function o(_){return _&&_.default?_.default:_}const a=[],i=[];let c=!1;function l(_){let y=_(),x={loading:!0,loaded:null,error:null};return x.promise=y.then(b=>(x.loading=!1,x.loaded=b,b)).catch(b=>{throw x.loading=!1,x.error=b,b}),x}function u(_,y){let x=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},y),b=null;function C(){if(!b){const P=new m(_,x);b={getCurrentValue:P.getCurrentValue.bind(P),subscribe:P.subscribe.bind(P),retry:P.retry.bind(P),promise:P.promise.bind(P)}}return b.promise()}if(typeof window>"u"&&a.push(C),!c&&typeof window<"u"){const P=x.webpack&&typeof xh.resolveWeak=="function"?x.webpack():x.modules;P&&i.push(S=>{for(const E of P)if(S.includes(E))return C()})}function j(){C();const P=n.default.useContext(s.LoadableContext);P&&Array.isArray(x.modules)&&x.modules.forEach(S=>{P(S)})}function v(P,S){j();const E=n.default.useSyncExternalStore(b.subscribe,b.getCurrentValue,b.getCurrentValue);return n.default.useImperativeHandle(S,()=>({retry:b.retry}),[]),n.default.useMemo(()=>E.loading||E.error?n.default.createElement(x.loading,{isLoading:E.loading,pastDelay:E.pastDelay,timedOut:E.timedOut,error:E.error,retry:b.retry}):E.loaded?n.default.createElement(o(E.loaded),P):null,[P,E])}return v.preload=()=>C(),v.displayName="LoadableComponent",n.default.forwardRef(v)}class m{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};const{_res:y,_opts:x}=this;y.loading&&(typeof x.delay=="number"&&(x.delay===0?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},x.delay)),typeof x.timeout=="number"&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},x.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(b=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(y){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...y},this._callbacks.forEach(x=>x())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(y){return this._callbacks.add(y),()=>{this._callbacks.delete(y)}}constructor(y,x){this._loadFn=y,this._opts=x,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function f(_){return u(l,_)}function p(_,y){let x=[];for(;_.length;){let b=_.pop();x.push(b(y))}return Promise.all(x).then(()=>{if(_.length)return p(_,y)})}f.preloadAll=()=>new Promise((_,y)=>{p(a).then(_,y)}),f.preloadReady=_=>(_===void 0&&(_=[]),new Promise(y=>{const x=()=>(c=!0,y());p(i,_).then(x,x)})),typeof window<"u"&&(window.__NEXT_PRELOADREADY=f.preloadReady);const h=f}(wr)),wr}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(m,f){for(var p in f)Object.defineProperty(m,p,{enumerable:!0,get:f[p]})}n(t,{default:function(){return u},noSSR:function(){return l}});const s=Le,o=r,a=s._(bh()),i=typeof window>"u";function c(m){return{default:(m==null?void 0:m.default)||m}}function l(m,f){if(delete f.webpack,delete f.modules,!i)return m(f);const p=f.loading;return()=>(0,o.jsx)(p,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}function u(m,f){let p=a.default,h={loading:x=>{let{error:b,isLoading:C,pastDelay:j}=x;if(!j)return null;if(process.env.NODE_ENV!=="production"){if(C)return null;if(b)return(0,o.jsxs)("p",{children:[b.message,(0,o.jsx)("br",{}),b.stack]})}return null}};m instanceof Promise?h.loader=()=>m:typeof m=="function"?h.loader=m:typeof m=="object"&&(h={...h,...m}),h={...h,...f};const _=h.loader,y=()=>_!=null?_().then(c):Promise.resolve(c(()=>null));return h.loadableGenerated&&(h={...h,...h.loadableGenerated},delete h.loadableGenerated),typeof h.ssr=="boolean"&&!h.ssr?(delete h.webpack,delete h.modules,l(p,h)):p({...h,loader:y})}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(rs,rs.exports);var jh=rs.exports,Ch=jh;const zl=T.getDefaultExportFromCjs(Ch),Rn={"modal-modifier":"_modal-modifier_10zw4_1","menu--navigation-bar":"_menu--navigation-bar_10zw4_15","menu--root":"_menu--root_10zw4_26"},Fl=({children:e})=>{const{menuIsOpen:t,setMenuIsOpen:n}=Ss(),{CONSTANTS:s}=Ee();return r.jsxs(d.Modal.RootWithoutPortal,{className:d.helpers.classNameConcat(Rn["modal-modifier"],"menu-mobile-root"),isOpen:t,setIsOpen:n,variant:"sideRight",style:{bottom:"unset",overflowY:"hidden",position:"fixed",top:0,zIndex:s.header.Z_INDEX_WAR.menu_mobile},children:[r.jsx($l,{}),r.jsx(d.Modal.Body,{className:Rn["menu--root"],children:e})]})};Fl.displayName="Menu.MenuRoot";const Sh=zl(()=>Promise.resolve(Fl),{ssr:!1}),Bl=({children:e,last:t=!1,...n})=>r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{...n,"data-close":!0,size:"small",variant:"tertiary",children:e}),!t&&r.jsx(d.Utils.Divider,{direction:"vertical",size:"small",className:Rn.divider})]});Bl.displayName="Menu.NavigationBarItem";const Ul=()=>{const{setUserMenuIsOpen:e}=Ss(),{handleSelectContent:t}=oe(),{CONSTANTS:n}=Ee(),{router:s}=ce(),o=[{iconNameStart:n.header.ICONS.person,onClick:()=>{e(!0),t({content:"menu:user_menu"})},text:n.header.MENU_INFO.login.button_text},{iconNameStart:n.header.MENU_INFO.bag.button_icon,onClick:()=>{t({content:"menu:wishlist"}),s.push("/favoritos")},text:n.header.MENU_INFO.bag.button_text},{last:!0,iconNameStart:n.header.MENU_INFO.store.button_icon,onClick:()=>{t({content:"menu:store"}),s.push("/institucional/lojas")},text:n.header.MENU_INFO.store.button_text}];return r.jsx(d.Card,{id:"menu-navigationbar",shadow:!0,className:Rn["menu--navigation-bar"],style:{zIndex:n.header.Z_INDEX_WAR.menu_mobile_navigation_bar},children:Array.isArray(o)&&o.map((a,i)=>g.createElement(Bl,{...a,key:i},a.text))})};Ul.displayName="Menu.NavigationBar";const Ar={Body:Ml,NavigationBar:Ul,Root:Sh},Hl=({storeConfig:e})=>{const t=g.useRef(null),{CONSTANTS:n}=Ee(),{MENU_NAVIGATION_BAR_ALLOWED:s,ICONS:o}=n.header,{handleSelectContent:a}=oe(),{setValue:i}=Dn(),{setValue:c}=oi(),{setValue:l}=vs(),u=xs(),m=si(),{isMobile:f}=ne();return r.jsxs(r.Fragment,{children:[r.jsxs(d.Header.Wrapper,{className:"header-mobile-wrapper",children:[r.jsx(d.Header.Logo,{style:{width:"100%"},children:r.jsx(Me,{href:"/",children:r.jsx(d.Icon,{name:o.logo,size:"x-large",onClick:()=>{a({content:"header:logo"})}})})}),r.jsxs(d.Header.Support,{children:[r.jsx(d.Header.SupportItem,{onClick:()=>{i(!0),a({content:"header:search"})},children:r.jsx(d.Icon,{name:o.search,size:"medium"})}),r.jsx(Us,{}),r.jsxs(d.Header.SupportItem,{onClick:()=>c(!0),children:[r.jsx("span",{ref:t}),r.jsx(d.Icon,{name:o.menu,size:"medium"})]})]})]}),f&&r.jsx(vi,{menuIsOpen:m,setMenuIsOpen:c,userMenuIsOpen:m,setUserMenuIsOpen:l,children:r.jsx(Wn,{storeConfig:e,isOpen:u,setIsOpen:l,mobileUserMenuTarget:t==null?void 0:t.current,children:r.jsxs(Ar.Root,{children:[r.jsx(Ar.Body,{}),s?r.jsx(Ar.NavigationBar,{}):r.jsx(r.Fragment,{})]})})})]})};Hl.displayName="Header.HeaderMobileWrapper";const Eh=g.createContext({}),Ph=({children:e})=>{const{sendDataLayerEvent:t}=oe(),{cartStore:n,isOpen:s}=ve();g.useEffect(()=>{s&&t({functionKey:"viewCartEvent",data:{commonData:{cartStore:n}}})},[s]),g.useEffect(()=>{var a,i,c;if(n.id&&!((i=(a=n.marketingData)==null?void 0:a.marketingTags)!=null&&i.includes("faststore"))){const{id:l}=n;yt.post("/api/checkout/order-form/attachments/marketing-data",{orderFormId:l,marketingData:{...n==null?void 0:n.marketingData,marketingTags:Wa(((c=n.marketingData)==null?void 0:c.marketingTags)??[])}}).catch(u=>{console.error(u)})}},[n]);const o=({cartItem:a,oldQuantity:i,newQuantity:c})=>{t({functionKey:"skuEvents",data:{event:i>c?"remove_from_cart":"add_to_cart",commonData:{products:[{...a,price:a.price/100,listPrice:a.listPrice/100}]},customData:{quantity:c},supportData:{selectedSkus:[a]}}})};return r.jsx(Eh.Provider,{value:{handleUpdateItemQuantityEvent:o},children:e})},Nh="var(--color-background-brand-primary-lighter)",Ih="_fadeInOut_1l5ow_1",wh="_fadeOut_1l5ow_1",te={brandPrimaryLighter:Nh,"mc--cashback":"_mc--cashback_1l5ow_1","mc--cashback--positive":"_mc--cashback--positive_1l5ow_21","mc--cashback--alert":"_mc--cashback--alert_1l5ow_24","mc--container--actions":"_mc--container--actions_1l5ow_28","mc--container--actions--secondary":"_mc--container--actions--secondary_1l5ow_36","mc-container-actions--toggle-size-modifier":"_mc-container-actions--toggle-size-modifier_1l5ow_55","mc--footer":"_mc--footer_1l5ow_63","mc--footer--actions":"_mc--footer--actions_1l5ow_72","mc--footer--actions-button":"_mc--footer--actions-button_1l5ow_77","mc--footer--total":"_mc--footer--total_1l5ow_93","mc--footer--total--info":"_mc--footer--total--info_1l5ow_98","mc--footer--total--info--content":"_mc--footer--total--info--content_1l5ow_103","mc--field":"_mc--field_1l5ow_149","mc--body":"_mc--body_1l5ow_189","mc--body--products":"_mc--body--products_1l5ow_196","mc--body--empty--feedback":"_mc--body--empty--feedback_1l5ow_204","mc--body--empty--text":"_mc--body--empty--text_1l5ow_209","mc--body--promotion":"_mc--body--promotion_1l5ow_222","mc--body--promotion--closeness":"_mc--body--promotion--closeness_1l5ow_225","mc--body--promotion--closeness--success":"_mc--body--promotion--closeness--success_1l5ow_248","mc--body--coupon-tag":"_mc--body--coupon-tag_1l5ow_260","mc--body--coupon-tag--text":"_mc--body--coupon-tag--text_1l5ow_278","mc--body--coupon-tag--button":"_mc--body--coupon-tag--button_1l5ow_284","mc--header":"_mc--header_1l5ow_290","mc--header--subtitle":"_mc--header--subtitle_1l5ow_316","mc--notify":"_mc--notify_1l5ow_357","mc--notify--content":"_mc--notify--content_1l5ow_372","mc--notify--item":"_mc--notify--item_1l5ow_385",fadeInOut:Ih,fadeOut:wh,"mc--card":"_mc--card_1l5ow_447","mc--card--actions":"_mc--card--actions_1l5ow_452","mc--card--actions--secondary":"_mc--card--actions--secondary_1l5ow_460","mc--card--actions--add-remove":"_mc--card--actions--add-remove_1l5ow_487","mc--card--actions--gift":"_mc--card--actions--gift_1l5ow_501","mc--card--content-info":"_mc--card--content-info_1l5ow_514","mc--card--details":"_mc--card--details_1l5ow_521","mc--card--link":"_mc--card--link_1l5ow_526","mc--product--unavailable":"_mc--product--unavailable_1l5ow_534","mc--card--name":"_mc--card--name_1l5ow_537","mc--card--price":"_mc--card--price_1l5ow_552","mc--card--price--old-price":"_mc--card--price--old-price_1l5ow_562","mc--card--price--price-details":"_mc--card--price--price-details_1l5ow_566","mc--card--product-link":"_mc--card--product-link_1l5ow_577","mc--discount":"_mc--discount_1l5ow_587","mc--discount--header":"_mc--discount--header_1l5ow_590","inputs--tooltip":"_inputs--tooltip_1l5ow_590","mc--discount--body":"_mc--discount--body_1l5ow_609","minicart--modal-modifier":"_minicart--modal-modifier_1l5ow_630"},ql=({item:{id:e,message:t,callback:n},removeNotification:s,ICONS:o})=>{const a=g.useRef(null),i=()=>{var l;(l=a.current)==null||l.setAttribute("data-animation-out","true")},c=l=>{s(l)};return r.jsx("div",{className:te["mc--notify--item"],ref:a,onAnimationEnd:()=>c(e),children:r.jsxs(d.SnackBar.Structure,{size:"medium",children:[r.jsx(d.SnackBar.Content,{title:t}),r.jsxs(d.SnackBar.Support,{children:[typeof n=="function"&&r.jsx(d.Button,{onClick:()=>{n(),i()},size:"small",variant:"tertiary",children:"Desfazer"}),r.jsx(d.Button,{iconNameStart:o.close,iconSize:"small",onClick:()=>i(),variant:"tertiary"})]})]})},e)};ql.displayName="MiniCart.Notify.Item";const Vl=({ICONS:e})=>{const t=gs(),{removeNotification:n}=ys(),s=t.length?[...t].sort((o,a)=>a.id-o.id):[];return s.length?r.jsx("div",{className:te["mc--notify"],children:r.jsx("div",{className:te["mc--notify--content"],children:Array.isArray(s)&&s.map(o=>r.jsx(ql,{item:o,removeNotification:n,ICONS:e},o.id))})}):null};Vl.displayName="MiniCart.Notifications";const Rh=({handleSendEvent:e,onHandleRemove:t,product:n,MINICART_CONFIG:s,...o})=>{const a=$t(),{toggleProduct:i}=Et(),{itemOffered:{isVariationOf:{productGroupID:c}},quantity:l}=n;return r.jsx(d.Button,{...o,adornment:{end:r.jsx(d.Icon,{name:`favorite-${a.includes(c)?"true":"false"}`,size:"small"})},onClick:()=>{i(c),a.includes(c)||t({texture:"mini-cart-wishlist",title:`${s.messages.add_wishlist}`},l,()=>i(c)),e(a.includes(c)?"remove_from_wishlist":"add_to_wishlist","productEvents")},children:s.messages.add_wishlist_button})},Wl=({handleSendEvent:e,product:t,ICONS:n,MINICART_CONFIG:s,...o})=>{const{addToCart:a,removeToCart:i}=ve(),{bundleItems:c=[],id:l,uniqueId:u,seller:m,offerings:f,quantity:p}=t,h=(_,y,x)=>{i(l,_.title,()=>{typeof x=="function"&&x(),a({id:l,quantity:y,seller:m},{id:l,texture:_.texture},!0)})};return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:te["mc--card--actions--add-remove"],children:[s.has_wishlist_button&&r.jsx(Rh,{...o,product:t,handleSendEvent:e,onHandleRemove:h,ICONS:n,MINICART_CONFIG:s}),r.jsx(d.Button,{...o,adornment:{end:r.jsx(d.Icon,{name:n.delete,size:"small"})},underline:!0,variant:"secondary",state:"danger",onClick:()=>{h({texture:"mini-cart",title:`${s.messages.remove}`},p),e("remove_from_cart","skuEvents")},children:s.messages.remove_button})]}),s.has_gift_option&&r.jsx(Rt.Gift,{uniqueId:u,bundleItems:c,offerings:f,ICONS:n,MINICART_CONFIG:s})]})};Wl.displayName="MiniCart.Card.Actions";const Gl=({bundleItems:e,offerings:t,uniqueId:n,ICONS:s,MINICART_CONFIG:o})=>{const[a,i]=g.useState(!1),{toggleGiftItemCart:c}=ve(),l=()=>{if(t instanceof Object&&Array.isArray(t)){const[f]=t;if(f){i(!0);const p=e.some(h=>h.id===f.id);c(n,String(f.id),p).then(()=>i(!1))}}},u=t[0],m=e.find(f=>f.id===u.id);return u&&"id"in u?r.jsx("div",{className:te["mc--card--actions--gift"],children:r.jsx(d.Checkbox,{adornment:r.jsx(d.Icon,{name:s.check}),checked:!!m,disabled:a,label:o.messages.giftPackage,onChange:l})}):null};Gl.displayName="MiniCart.Card.Gift";const Kl=({itemOffered:e})=>{const t=T.updatedResizedImg(e==null?void 0:e.image[0].url,{width:200,height:300});return r.jsx(Me,{href:`${e==null?void 0:e.slug}`,className:te["mc--card--product-link"],children:r.jsx(Ie.Image,{alt:(e==null?void 0:e.image[0].alternateName)||"Produto",src:t||"",width:108,height:164,objectFit:"unset"})})};Kl.displayName="MiniCart.Card.Media";const Xl=({name:e,skuName:t,tagName:n,className:s})=>r.jsxs(r.Fragment,{children:[n&&r.jsx(d.Tag,{variant:"quaternary",title:n,style:{textTransform:"uppercase"},children:n}),r.jsx("p",{className:d.helpers.classNameConcat(te["mc--card--name"],s),children:T.getProductNameWithoutSku(e??"",t??"")})]});Xl.displayName="MiniCart.Card.Name";const Yl=({total:e,totalList:t})=>r.jsx(d.ProductInfo.Root,{children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:te["mc--card--price"],children:r.jsx(d.ProductInfo.Wrapper,{className:te["mc--card--price--details"],size:"small",layout:"horizontal",children:t&&e!==t?r.jsxs(r.Fragment,{children:[r.jsx(d.ProductInfo.Price,{label:"originalPrice",value:T.formatPriceToCurrency(t),size:"small"}),r.jsx(d.ProductInfo.Price,{label:"discountPrice",value:T.formatPriceToCurrency(e),size:"small"})]}):r.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:T.formatPriceToCurrency(e),size:"small"})})})})});Yl.displayName="MiniCart.ProductPrice";const Ql=({product:e,TEXTURE_IMAGE:t,TOGGLE_STYLE_MODIFIER:n})=>{var u;const[s,o]=g.useState(""),a=g.useRef(null),{cartStore:{options:i}}=ve(),c=e.itemOffered.isVariationOf.productGroupID,l=g.useCallback(()=>{var f;const m=(f=i==null?void 0:i.find(p=>p.id===c))==null?void 0:f.texture;if(m){o(m);return}fetch("/api/catalog/product/info",{method:"POST",priority:"low",body:JSON.stringify({ids:[c]})}).then(p=>p.json()).then(p=>{const h=p.data[0].items.find(_=>_.itemId===e.id);if(h){const _=h.images.find(y=>t.includes(y.imageLabel));if(_!=null&&_.imageUrl){o(_.imageUrl);return}o(h.images[0].imageUrl)}}).catch(p=>{console.error(p)})},[i,c,e.id]);return g.useEffect(()=>{if(!a.current)return;const m=new IntersectionObserver(f=>{f[0].isIntersecting&&l()});return m.observe(a.current),()=>{m.disconnect()}},[l]),r.jsx("div",{ref:a,children:r.jsx(d.ToggleStyle.Wrapper,{size:"small",style:n,children:r.jsx(d.ToggleStyle.Texture,{children:s?r.jsx(Ie.Image,{alt:((u=e.itemOffered)==null?void 0:u.image[0].alternateName)??"Produto",src:s,width:164,height:164,style:n}):r.jsx(xc,{})})})})};Ql.displayName="MiniCart.Card.Style";const Zl=({product:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:n,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:o})=>{const{size:a}=T.getColorAndSizeFromSkuName(e.itemOffered.skuName??"",n);return r.jsxs(d.Utils.Row,{alignItems:"center",children:[r.jsx(Ql,{product:e,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:o}),r.jsx(d.Utils.Divider,{direction:"vertical",size:"small",style:{height:24}}),a&&r.jsx(d.ToggleSize.Wrapper,{size:t.product_card.sku.size??"small",variation:t.product_card.sku.variation??"fill",className:te["mc-container-actions--toggle-size-modifier"],style:{backgroundColor:`${te.brandPrimaryLighter}`},children:r.jsx(d.ToggleSize.Text,{children:a})})]})};Zl.displayName="MiniCart.Card.Sku";const Rt={Actions:Wl,Gift:Gl,Media:Kl,Name:Xl,Price:Yl,Sku:Zl},Ah=e=>{var t;return{price:e.sellingPrice/100,listPrice:e.listPrice/100,totalPrice:(((t=e.priceDefinition)==null?void 0:t.total)??0)/100,totalListPrice:e.listPrice*e.quantity/100}},Jl=({available:e=!0,index:t,product:n,ICONS:s,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c})=>{var f,p;const{sendDataLayerEvent:l}=oe(),u=Ah(n),m=(h,_)=>{const y={commonData:{...n,...u},customData:{index:t},event:h};if(_==="skuEvents"){const x={...n,...u};y.supportData={selectedSkus:[x]},y.commonData.products=[x]}l({functionKey:_,data:y})};return r.jsxs("div",{className:d.helpers.classNameConcat(te["mc--card"],e?"":te["mc--card--unavailable"]),children:[r.jsx(Rt.Media,{itemOffered:n.itemOffered}),r.jsxs("div",{className:te["mc--card--content-info"],children:[r.jsx(Rt.Name,{name:((f=n.itemOffered)==null?void 0:f.name)??"",skuName:(p=n.itemOffered)==null?void 0:p.skuName}),r.jsxs("div",{className:te["mc--card--details"],children:[r.jsx("div",{className:te["mc--card--actions"],children:e?r.jsx(Rt.Price,{total:u.price,totalList:u.listPrice}):r.jsx(d.Tag,{variant:"secondary",size:"small",children:"Indisponível"})}),r.jsxs("div",{className:te["mc--card--actions--secondary"],children:[e&&r.jsx(Rt.Sku,{product:n,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c}),r.jsx(Rt.Actions,{handleSendEvent:m,product:n,size:"small",variant:"tertiary",ICONS:s,MINICART_CONFIG:o})]})]})]})]})};Jl.displayName="MiniCart.Card";const eu=({type:e="positive",ICONS:t,MESSAGE_CASHBACK:n})=>{var a;const{toExpire:s}=zt(),o=((a=s==null?void 0:s.cashback)==null?void 0:a.reduce((i,c)=>i+c.remaining_value,0))??0;return o>0?r.jsxs("div",{className:d.helpers.classNameConcat(te["mc--cashback"],te[`mc--cashback--${e}`]),children:[r.jsx(d.Icon,{name:t.alert_circle,size:"medium"}),r.jsxs("p",{children:[r.jsx("span",{children:T.formatPriceToCurrency(o)})," ",n.title]})]}):null};eu.displayName="MiniCart.Cashback";const tu=({type:e,ICONS:t,MINICART_CONFIG:n})=>{const{addCouponSeller:s,removeCoupon:o,removeSellerCode:a,cartStore:{marketingData:i,openTextField:c}}=ve(),[l,u]=g.useState(!1),[m,f]=g.useState(!1),p=g.useCallback(()=>{let x="";return e==="coupon"?x=(i==null?void 0:i.coupon)??"":x=String((c==null?void 0:c.value)??""),x.toUpperCase()??""},[i,c,e]),[h,_]=g.useState(!!p()),y=async x=>{f(!0),!!p()&&(e==="coupon"?await o():await a(),_(!1),u(!1)),await s(x,e).then(C=>{if(!C.statusOk&&x||C.code!==200){x?(u(!0),_(!1)):u(!1);return}_(!0),u(!1)}).catch(()=>u(!0)).finally(()=>f(!1))};return r.jsx(ke.Field,{hasError:l,hasSuccess:h,isLoading:m,onHandler:y,type:e,title:e==="coupon"?`${n.messages.descount_cupom_placeholder}`:`${n.messages.sellers_code_placeholder}`,value:p(),MINICART_CONFIG:n,ICONS:t})};tu.displayName="MiniCart.CouponSeller";const nu=({ICONS:e,MINICART_CONFIG:t,PLP_NOT_RESULT:n})=>{const{router:s}=ce(),o=()=>{s.push(n.link)};return r.jsxs(d.Utils.Column,{alignContent:"center",alignItems:"center",gap:"24px",className:te["mc--body--empty--feedback"],children:[r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsxs("p",{className:`typography-style-body-xs ${te["mc--body--empty--text"]}`,children:[t.messages.empty_card," "]})})}),r.jsx(d.Button,{variant:"tertiary",size:"large",onClick:()=>o(),"data-close":!0,adornment:{end:r.jsx(d.Icon,{name:e.arrow_right,size:"medium"})},children:t.messages.empty_bag})]})};nu.displayName="MiniCart.Feedback";const Th=e=>{const t=e.replace(/\D/g,"");return t.length>5?`${t.slice(0,5)}-${t.slice(5,8)}`:t},ru=({feedback:e,hasError:t,onHandler:n,hasSuccess:s,type:o,title:a,value:i,ICONS:c})=>{const[l,u]=g.useState(i);g.useEffect(()=>{t||u(i)},[i,t]);const m=()=>t?r.jsx(d.Icon,{name:c.delete_circle}):String(i).length&&s?r.jsx(d.Icon,{name:c.check_circle}):null,f=()=>{if(o==="seller"){const y=String(i).includes(" - ")?String(i).split(" - ")[0]:l;u(y)}},p=()=>{if(o==="seller"){const y=String(i).includes(" - ")?i:l;u(y)}},h=y=>{const x=y.currentTarget.value;if(x===""&&typeof n=="function"||s&&String(i).length>0&&x!==String(i)||t&&x!==String(i)){u(""),n("");return}if(o==="cep"){const C=Th(x);u(C)}else u(x)},_=y=>{if(y.key.toLocaleLowerCase()==="enter"&&typeof n=="function"){const x=y.currentTarget.value;n(x)}};return r.jsx(d.TextField.Input,{adornment:{end:m()},mode:"over-label",label:a,feedback:e,value:l,type:"text",onFocus:f,onBlur:p,onChange:h,onKeyDown:_})};ru.displayName="MiniCart.Field.Input";const su=({title:e,ICONS:t,MINICART_CONFIG:n,...s})=>{const o=g.useRef(null),{hasSuccess:a,hasError:i,isLoading:c,onHandler:l,type:u,value:m}=s,f=()=>i?"error":String(m).length&&a?"success":"none",p=g.useCallback(()=>{if(o.current){const y=o.current.querySelector("input");y&&typeof l=="function"&&(m!==""||i?(l(""),y.value=""):l((y==null?void 0:y.value)??""))}},[l,m,i]),h=f();return r.jsx("div",{ref:o,children:r.jsx(d.TextField.Structure,{className:te["mc--field"],input:r.jsx(ru,{...s,feedback:h,title:e,ICONS:t}),right:r.jsx(d.Button,{"data-has-success":!a,size:"medium",title:String(m).length&&a||i?"Remover":"Aplicar",onClick:()=>p(),disabled:c,children:String(m).length&&a||i?r.jsx(d.Icon,{name:"close",size:"small"}):`${n.messages.promo_code_button}`}),supportText:u==="cep"&&h==="success"?r.jsx(d.TextField.SupportText,{text:"Mais informações de frete na etapa a seguir",feedback:"success",title:"support"}):null})})};su.displayName="MiniCart.Field";const Ko=e=>{const t=e*100;return Math.round(t)},Lh=e=>(e/100).toFixed(2).replace(".",","),Oh=(e,t)=>{const{valueType:n,remainingValueToActivate:s}=e;if(n==="quantity")return`Adicione mais ${s} ${s===1?"item":"itens"} ${t}`;if(n==="price"){const o=s===100?"Falta":"Faltam",a=Lh(s);return`${o} R$ ${a} ${t}`}return t},ou=({ICONS:e})=>{var b;const{promotionRules:t,data:n,cartStore:s,cartStore:{items:o,marketingData:a},addCouponSeller:i,setIsOpen:c}=ve(),{sendDataLayerEvent:l}=oe(),u=(b=n==null?void 0:n.promotion)==null?void 0:b.promotionCart,m=g.useRef(!1),{router:f}=ce();if(g.useEffect(()=>{(u==null?void 0:u.selectPromotion)==="Cupom"&&(t==null?void 0:t.remainingValueToActivate)&&(t==null?void 0:t.remainingValueToActivate)<=0&&(u==null?void 0:u.cupom)&&!m.current&&(a==null?void 0:a.coupon)!==u.cupom&&(m.current=!0,i(u.cupom,"coupon")),t!=null&&t.remainingValueToActivate&&(t==null?void 0:t.remainingValueToActivate)<=0&&l({functionKey:"viewCartEvent",data:{event:"closeness_filled",commonData:{cartStore:s}}}),t!=null&&t.remainingValueToActivate&&(t==null?void 0:t.remainingValueToActivate)>0&&(m.current=!1)},[u==null?void 0:u.selectPromotion,t==null?void 0:t.remainingValueToActivate,u==null?void 0:u.cupom,a==null?void 0:a.coupon,i]),!t||!u||u.selectPromotion==="Desativar"||o.length===0)return null;const p=u.title,h=u.subtitle,_=u.titleSuccess,y=u.subtitleSuccess,x=u.linkLabel;return r.jsxs("div",{className:te["mc--body--promotion"],children:[t.remainingValueToActivate>0&&r.jsx(d.Closeness,{className:te["mc--body--promotion--closeness"],title:Oh(t,p),subtitle:h,percentage:Ko(t.completeness),iconLink:e.arrow_right,linkLabel:x,onClick:()=>{l({functionKey:"viewCartEvent",data:{event:"closeness_view_more",commonData:{cartStore:s}}}),f.push(`${u.link}`),c(!1)}}),t.remainingValueToActivate<=0&&r.jsx(d.Closeness,{className:`${te["mc--body--promotion--closeness"]} ${te["mc--body--promotion--closeness--success"]}`,title:_,subtitle:y,percentage:Ko(t.completeness)})]})};ou.displayName="MiniCart.Modal.Body.Promotion";const au=({TIPBAR_CONFIGS:e})=>{const{data:t,cartStore:n,cartStore:{items:s,marketingData:o},addCouponSeller:a}=ve(),i=t==null?void 0:t.flags.flagCart.flagCupom,c=(o==null?void 0:o.coupon)===(i==null?void 0:i.valueCupom),[l,u]=g.useState(!1),[m,f]=g.useState(!1);if(g.useEffect(()=>{l&&setTimeout(()=>{u(!1)},e.snackbar_timeout)},[l]),g.useEffect(()=>{m&&setTimeout(()=>{f(!1)},e.snackbar_timeout)},[m]),!i||i.active==="Desativar"||i.valueCupom===""||s.length===0)return null;const p=async()=>{if(!n.items.length){f(!0);return}(await a(i==null?void 0:i.valueCupom,"coupon")).code!==200&&u(!0)};return r.jsxs("div",{className:te["mc--body--coupon-tag"],style:{backgroundColor:`${i.tagColor}`,color:`${i.textColor}`},children:[r.jsx("div",{className:te["mc--body--coupon-tag--text"],dangerouslySetInnerHTML:{__html:i.value}}),r.jsx("div",{className:te["mc--body--coupon-tag--button"],children:r.jsx(d.Button,{variant:"quaternary",mode:"inverse",onClick:p,disabled:c,children:c?"Cupom Aplicado":"Aplicar Cupom"})})]})};au.displayName="MiniCart.Modal.Body.CouponTag";const iu=({children:e,ICONS:t,MINICART_CONFIG:n,NAME_SPLIT_SYMBOL:s,PLP_NOT_RESULT:o,TEXTURE_IMAGE:a,TIPBAR_CONFIGS:i,TOGGLE_STYLE_MODIFIER:c})=>{const{cartStore:{items:l,messages:u}}=ve();return r.jsxs(d.Modal.Body,{className:te["mc--body"],children:[e,r.jsx(ou,{ICONS:t}),r.jsx(au,{TIPBAR_CONFIGS:i}),r.jsx("div",{className:te["mc--body--products"],children:Array.isArray(l)&&l.length?l.map((m,f)=>{const p=u.find(h=>{var _;return h.code==="withoutStock"&&((_=h.fields)==null?void 0:_.ean)===m.ean})!==void 0;return r.jsx(ke.Card,{available:!m.availability.includes("outStock")||!p,index:f,product:m,ICONS:t,MINICART_CONFIG:n,NAME_SPLIT_SYMBOL:s,TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:c},`${m.id}-${m.itemOffered.sku}-${f}`)}):r.jsx(ke.Feedback,{ICONS:t,MINICART_CONFIG:n,PLP_NOT_RESULT:o})})]})};iu.displayName="MiniCart.Body";const cu=({children:e,storeConfig:t,MINICART_CONFIG:n})=>{const{cartStore:s}=ve();if(s.items.length===0)return null;const o=()=>{var i;const a=new URLSearchParams({orderFormId:s.id,...((i=s.marketingData)==null?void 0:i.utmCampaign)&&{utm_campaign:s.marketingData.utmCampaign}});window.location.href=`${t.checkoutUrl}?${a.toString()}#/cart`};return r.jsxs(d.Modal.Footer,{className:te["mc--footer"],children:[e,r.jsx("div",{className:te["mc--footer--actions"],children:r.jsx(d.Button,{variant:"primary",size:"large","data-close":!0,className:te["mc--footer--actions-button"],onClick:o,children:n.messages.checkout_button})})]})};cu.displayName="MiniCart.Modal.Footer";const lu=({children:e,ICONS:t,MINICART_CONFIG:n,Z_INDEX_WAR:s})=>{const[o,a]=g.useState(!1),i=g.useRef(null),c=()=>a(l=>!l);return r.jsxs(r.Fragment,{children:[o&&r.jsx(d.Tooltip.Root,{arrow:"right",position:"top",top:-3,left:-3,component:r.jsx("p",{children:"Código da vendedora, cupom ou cálculo do frete"}),id:"inputs--tooltip",className:te["inputs--tooltip"],style:{zIndex:s.modal},isOpen:!0,size:"medium",parent:i.current}),r.jsxs(d.Accordion.Wrapper,{className:te["mc--discount"],children:[r.jsx(d.Accordion.Header,{id:"frete",title:"Frete",closeIndicator:r.jsx(d.Icon,{name:t.arrow_up,size:"medium"}),openIndicator:r.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),className:d.helpers.classNameConcat(te["mc--discount--header"]),startOpen:n.promotion_input_starts_open,children:r.jsxs(d.TextStructure.Root,{children:[r.jsx(d.TextStructure.DivWrapper,{children:r.jsxs("h3",{className:"typography-style-body-sm",children:[n.messages.promo_code_title," "]})}),r.jsx("div",{ref:i,onMouseEnter:c,onMouseLeave:c,"aria-label":"Mostrar descrição",children:r.jsx(d.Icon,{name:t.alert_circle,size:"small"})})]})}),r.jsx(d.Accordion.Body,{className:te["mc--discount--body"],children:e})]})]})};lu.displayName="MiniCart.Discount";const uu=({discount:e,shipping:t,total:n})=>{var l,u;const{data:s}=ve(),o=(u=(l=s==null?void 0:s.flags)==null?void 0:l.flagCart)==null?void 0:u.flagTotal,a=n-Math.abs(e??0)+(t??0),i=t===0?"Frete Grátis":T.formatPriceToCurrency((t??0)/100),c=[{title:"Frete",value:t===void 0?"A calcular":i},{title:"Desconto",value:T.formatPriceToCurrency((e??0)/100)},{message:(o==null?void 0:o.value)??"",title:"Total",value:`1x de ${T.formatPriceToCurrency(a/100)}`}];return r.jsx("div",{className:te["mc--footer--total"],children:Array.isArray(c)&&c.map((m,f)=>r.jsxs("div",{className:te["mc--footer--total--info"],"data-discount":m.title==="Desconto",children:[r.jsx("p",{children:m.title}),r.jsxs("div",{className:te["mc--footer--total--info--content"],children:[m.message&&(o==null?void 0:o.active)==="Ativar"&&r.jsx(d.Tag,{variant:"primary",title:m.message,style:{backgroundColor:o==null?void 0:o.tagColor,color:o==null?void 0:o.textColor},children:m.message}),r.jsx(d.ProductInfo.Price,{className:te["mc--footer--total--info"],label:m.title,value:m.value})]})]},f))})};uu.displayName="MiniCart.Modal.Footer.Resume.Items";const du=()=>{var o,a,i;const{totalizers:e}=vt(),t=((o=e.find(c=>c.id==="Items"))==null?void 0:o.value)??0,n=(a=e.find(c=>c.id==="Discounts"))==null?void 0:a.value,s=(i=e.find(c=>c.id==="Shipping"))==null?void 0:i.value;return r.jsx(uu,{discount:n??0,total:t,shipping:s})};du.displayName="MiniCart.Modal.Footer.Totals";const mu=({ICONS:e,MINICART_CONFIG:t})=>{const{isMobile:n}=ne(),{cartStore:{items:s}}=ve(),o=s.reduce((a,i)=>a+(i.quantity??0),0);return r.jsx(d.Modal.Header,{navigation:"top",className:te["mc--header"],children:r.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!n,children:[r.jsx(d.Modal.Title,{navigation:"top",title:t.messages.title}),r.jsx("span",{className:te["mc--header--subtitle"],children:o!==1?`[${o}] Produtos`:`[${o}] Produto`}),r.jsx(d.Button,{"data-close":!0,iconNameStart:e.close,size:"small",variant:"tertiary"})]})})};mu.displayName="MiniCart.Modal.Header";const pu=({ICONS:e,MINICART_CONFIG:t})=>{const{cartStore:{shippingData:n},shipping:s,removeCEP:o}=ve(),{sendDataLayerEvent:a}=oe(),[i,c]=g.useState(!1),[l,u]=g.useState(!1),m=g.useCallback(()=>{var C;const b=((C=n==null?void 0:n.address)==null?void 0:C.postalCode)??"";return b.length===8&&!b.includes("-")?`${b.slice(0,5)}-${b.slice(5)}`:b},[n]),[f,p]=g.useState(!!m()),h=()=>{p(!1),c(!1)},_=b=>{var C;if(typeof b=="object"&&(b!=null&&b.logisticsInfo))return(C=b.logisticsInfo)==null?void 0:C.reduce((j,v)=>{var A;const P=(A=v==null?void 0:v.slas)==null?void 0:A.find(L=>(L==null?void 0:L.id)===(v==null?void 0:v.selectedSla));if(!P)return j;const S=parseInt(String((P==null?void 0:P.shippingEstimate)??"").replace("bd","")),E=Number((((P==null?void 0:P.price)??0)/100).toFixed(2));if(j.shipping_tier===void 0)return j.shipping_tier=v==null?void 0:v.selectedSla,j.delivery_time=S.toString(),j.shipping=E,j.flag_retirada=(v==null?void 0:v.selectedDeliveryChannel)==="delivery"?"false":"true",j;const I=parseInt(j.delivery_time??"0");return S>I&&(j.delivery_time=S.toString()),j.shipping=(j.shipping??0)+E,j},{shipping_tier:void 0,delivery_time:void 0,flag_retirada:void 0,shipping:void 0,currency:"BRL"})},y=async b=>{const C=b.replace(/\D/g,"");if(C.length!==8)return!1;try{return!(await yt.get(`https://viacep.com.br/ws/${C}/json/`)).data.erro}catch{return!1}},x=async b=>{if(u(!0),!!m()||!(b!=null&&b.trim())){await o(),h(),u(!1);return}if(!await y(b)){c(!0),p(!1),u(!1);return}try{const P=await s(b);if(c(!1),P){p(!0);const S=_(P);S&&a({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:S}})}}catch{c(!0)}finally{u(!1)}};return r.jsx(ke.Field,{hasSuccess:f,hasError:i,isLoading:l,onHandler:x,title:`${t.messages.shipping_calculation_placeholder}`,type:"cep",value:m(),ICONS:e,MINICART_CONFIG:t})};pu.displayName="MiniCart.Shipping";const fu=()=>{var n,s;const{data:e}=ve(),t=(s=(n=e==null?void 0:e.flags)==null?void 0:n.flagCart)==null?void 0:s.flagHeader;return t!=null&&t.value?r.jsx(d.Tag,{variant:"tertiary",title:t==null?void 0:t.value,size:"small",adornment:{start:t!=null&&t.enableIcon&&(t!=null&&t.icon)?r.jsx(d.Icon,{name:t==null?void 0:t.icon,style:{color:t==null?void 0:t.iconColor}}):null},style:{background:t==null?void 0:t.tagColor,color:t==null?void 0:t.textColor,width:"100%"},children:t==null?void 0:t.value}):null};fu.displayName="MiniCart.TagMessage";const ke={Body:iu,Card:Jl,Cashback:eu,CouponSeller:tu,Discount:lu,Field:su,Feedback:nu,Shipping:pu,Footer:cu,Header:mu,TagMessage:fu,Totals:du},kh=({ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:n,PLP_NOT_RESULT:s,TEXTURE_IMAGE:o,TIPBAR_CONFIGS:a,TOGGLE_STYLE_MODIFIER:i,Z_INDEX_WAR:c,storeConfig:l,minicartStyleModifiers:u})=>{const{isOpen:m,setIsOpen:f}=ve(),{isMobile:p}=ne();return r.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(te["minicart--modal-modifier"],u),isMobile:!0,isOpen:m,setIsOpen:f,style:{zIndex:c.modal},variant:p?"sideBottom":"sideRight",children:[r.jsx(ke.Header,{ICONS:e,MINICART_CONFIG:t}),r.jsx(ke.Body,{ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:n,PLP_NOT_RESULT:s,TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:i,TIPBAR_CONFIGS:a,children:r.jsx(ke.TagMessage,{})}),r.jsxs(ke.Footer,{MINICART_CONFIG:t,storeConfig:l,children:[r.jsxs(ke.Discount,{ICONS:e,MINICART_CONFIG:t,Z_INDEX_WAR:c,children:[r.jsx(ke.CouponSeller,{type:"seller",ICONS:e,MINICART_CONFIG:t}),r.jsx(ke.CouponSeller,{type:"coupon",ICONS:e,MINICART_CONFIG:t}),r.jsx(ke.Shipping,{ICONS:e,MINICART_CONFIG:t})]}),r.jsx(ke.Totals,{})]}),r.jsx(Vl,{ICONS:e})]})},hu=({tipBar:e,minicartStyleModifiers:t,menuV2:n,storeConfig:s,className:o})=>{const{structureRef:a,rootRef:i,CONSTANTS:c}=Ee(),{header:{HEADER_CONFIGS:l,Z_INDEX_WAR:u},minicart:m}=c;return r.jsx(d.Header.Structure,{innerRef:a,adornment:{start:e},style:{position:"sticky",top:0,zIndex:u.header},className:d.helpers.classNameConcat(Bs["header-animation"],o),children:r.jsxs(d.Header.Root,{innerRef:i,style:{zIndex:u.header},variant:l.default_variant,interactiveVariant:l.interactive_variant,children:[n??r.jsxs(gh,{children:[r.jsx("div",{className:T.responsive["responsive-mobile-block"],style:{height:"100%",width:"100%",zIndex:u.header_mobile},children:r.jsx(Hl,{storeConfig:s})}),r.jsx("div",{className:T.responsive["responsive-desktop-block"],style:{height:"100%",width:"100%",zIndex:u.header_desktop},children:r.jsx(wl,{storeConfig:s})})]}),r.jsx(Ph,{children:r.jsx(kh,{...m,minicartStyleModifiers:t})}),r.jsx(Ds,{title:"Produto adicionado à sua sacola!",CONSTANTS:c.addToCart})]})})};hu.displayName="Header";const Dh="_shippingFreight_6z8rf_6",Mh="_shippingFreight__postalCodeGrid_6z8rf_10",$h="_shippingFreight__grid_6z8rf_14",zh="_shippingFreight__grid__title_6z8rf_18",Fh="_shippingFreight__grid__remember_6z8rf_29",Bh="_postalCodeContainer_6z8rf_44",Uh="_deliveryStatusBar__tag_6z8rf_49",Hh="_deliveryStatusBarError__tag_6z8rf_66",qh="_deliveryInfo_6z8rf_74",Vh="_deliveryInfo__content_6z8rf_78",Wh="_deliveryInfo__text_6z8rf_84",Gh="_deliveryInfo__title_6z8rf_89",Kh="_deliveryInfo__subtitle_6z8rf_99",Xh="_deliveryInfo__tooltipIcon_6z8rf_109",Yh="_deliveryInfo__tooltip_6z8rf_109",Qh="_freightGrid_6z8rf_148",Zh="_freightContainer_6z8rf_155",Jh="_freightOption__content_6z8rf_160",e_="_freightOption__value_6z8rf_166",t_="_freightOption__title_6z8rf_177",n_="_freightOption__title_item_6z8rf_181",r_="_freightOption__paragraph_6z8rf_192",ue={shippingFreight:Dh,shippingFreight__postalCodeGrid:Mh,shippingFreight__grid:$h,shippingFreight__grid__title:zh,shippingFreight__grid__remember:Fh,postalCodeContainer:Bh,deliveryStatusBar__tag:Uh,deliveryStatusBarError__tag:Hh,deliveryInfo:qh,deliveryInfo__content:Vh,deliveryInfo__text:Wh,deliveryInfo__title:Gh,deliveryInfo__subtitle:Kh,deliveryInfo__tooltipIcon:Xh,deliveryInfo__tooltip:Yh,freightGrid:Qh,freightContainer:Zh,freightOption__content:Jh,freightOption__value:e_,freightOption__title:t_,freightOption__title_item:n_,freightOption__paragraph:r_,"input-modifier":"_input-modifier_6z8rf_207","freight--tooltip":"_freight--tooltip_6z8rf_227"},s_=({icon:e,title:t,subtitle:n,packageCount:s,packageUnit:o="",labelDescription:a,freightConfig:i,toolTipZIndex:c})=>{const[l,u]=g.useState(!1),m=g.useRef(null),f=()=>u(p=>!p);return r.jsxs("div",{className:ue.deliveryInfo,ref:m,children:[r.jsx(d.Tooltip.Root,{arrow:"bottom",component:r.jsx("div",{children:r.jsx("p",{children:i.messages.select_size_tag})}),id:"freight--tooltip",className:ue["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:m.current}),r.jsxs("div",{className:ue.deliveryInfo__content,children:[r.jsx("div",{className:ue.deliveryInfo__icon,children:r.jsx(d.Icon,{name:e,size:"medium"})}),r.jsxs("div",{className:ue.deliveryInfo__text,children:[r.jsxs("span",{className:ue.deliveryInfo__title,children:[t," ",s," ",o]}),n&&r.jsx("span",{className:ue.deliveryInfo__subtitle,children:n})]}),a&&r.jsxs("div",{className:ue.deliveryInfo__tooltipIcon,onMouseEnter:f,onMouseLeave:f,"aria-label":"Mostrar descrição",children:[r.jsx("span",{children:r.jsx(d.Icon,{name:i.icons.feedback_help,size:"small"})}),l&&r.jsx("div",{className:ue.deliveryInfo__tooltip,children:a})]})]})]})},o_=({value:e,title:t,paragraph:n})=>r.jsx("div",{className:ue.freightOption,children:r.jsxs("div",{className:ue.freightOption__content,children:[r.jsx("span",{className:ue.freightOption__value,children:e}),r.jsx("span",{className:ue.freightOption__title,children:r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{className:ue.footer__item,children:[r.jsx("span",{className:ue.freightOption__title_item,children:t}),n&&r.jsx("span",{className:ue.freightOption__paragraph,children:n})]})})})]})}),a_=({children:e})=>r.jsx("div",{className:ue.freightContainer,children:e}),i_=({children:e})=>r.jsx("div",{className:ue.freightGrid,children:e}),c_=({children:e})=>r.jsx("div",{className:ue.postalCodeContainer,children:e}),Xo=({message:e,seller:t="",size:n="small",setError:s})=>r.jsx("div",{className:s?ue.deliveryStatusBarError:ue.deliveryStatusBar,children:r.jsxs(d.Tag,{title:e,className:s?ue.deliveryStatusBarError__tag:ue.deliveryStatusBar__tag,size:n,children:[e," ",!s&&t]})}),l_=e=>{const t=parseInt(e,10);return t===1?`${t} dia`:`${t} dias`},u_=e=>{var n,s,o;const t=[];return(o=(s=(n=e==null?void 0:e.logisticsInfo)==null?void 0:n[0])==null?void 0:s.slas)==null||o.forEach(a=>{t.push({id:a.id,name:a.name,price:a.price,shippingEstimate:a.shippingEstimate})}),t},d_=({component:e,parent:t,top:n,left:s,target:o,contentRef:a,freightConfig:i,toolTipZIndex:c=999,...l})=>{const{isMobile:u}=ne();return r.jsx(r.Fragment,{children:u?r.jsx(d.Tooltip.Root,{arrow:"bottom",component:r.jsxs("div",{...l,ref:a,children:[e,r.jsx("p",{children:i.messages.select_size_tag})]}),id:"freight--tooltip",className:ue["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:t}):r.jsx(d.Tooltip.Root,{arrow:"bottom",component:r.jsxs("div",{...l,ref:a,children:[e,r.jsx("p",{children:i.messages.select_size_tag})]}),id:"freight--tooltip",className:ue["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-110%",left:"3%",parent:t})})},m_=({onUpdateFreightItems:e,sellerId:t,size:n,skuId:s,quantity:o,setError:a,setIsButtonClicked:i,component:c,freightConfig:l,toolTipZIndex:u})=>{var O,D,Q,M;const m=vt(),f=vt(U=>U.shipping),[p,h]=g.useState(),[_,y]=g.useState(!1),[x,b]=g.useState(!1),[C,j]=g.useState(!1),v=(D=(O=m.shippingData)==null?void 0:O.address)==null?void 0:D.postalCode,P=!(p!=null&&p.length)&&v?v:p,S=g.useRef(null),E=async U=>{const Y=U.target.value.replace(/\D/g,"").slice(0,8);Y.length>5?h(Y.replace(/^(\d{5})(\d{1,3})/,"$1-$2")):h(Y)},I=async U=>{const F=U.target.value.replace(/\D/g,"");try{if((await yt.get(`https://viacep.com.br/ws/${F}/json/`)).data.erro){a&&a(l.messages.cep_not_found),i(!1),b(!0);return}a&&a(""),b(!1)}catch{console.log("Erro ao validar o CEP. Tente novamente mais tarde.")}},A=async()=>{y(!0);try{const U=await yt.post("/api/checkout/simulation",{items:[{id:s,quantity:o,seller:t}],country:"BRA",postalCode:P});e(u_(U.data))}catch(U){console.error("Erro ao atualizar o documento:",U)}finally{y(!1),f(P,"BRA")}},L=async()=>{if(!s){j(!0),setTimeout(()=>j(!1),1500);return}await I({target:{value:P}}),_||(A(),i(!0))};return r.jsxs("div",{ref:S,style:{position:"relative"},children:[!s&&C?r.jsx(d_,{component:c,isOpen:C,parent:S.current,toolTipZIndex:u,freightConfig:l}):r.jsx(r.Fragment,{}),r.jsx("div",{style:{position:"relative"},children:r.jsx(d.TextField.Structure,{title:"structure",style:{width:"100%"},input:r.jsx(d.TextField.Input,{defaultValue:(M=(Q=m.shippingData)==null?void 0:Q.address)==null?void 0:M.postalCode,label:l.messages.text_input_label,title:"textfield",value:p,sizeVariant:n,onMouseOver:()=>s?null:j(!0),onMouseOut:()=>s?null:j(!1),mode:"simple",onChange:E,onKeyDown:U=>{U.key==="Enter"&&L()},className:ue["input-modifier"],feedback:x?"error":"none"}),right:r.jsx(d.Button,{onClick:L,size:n,title:"button",children:_?r.jsx(d.Spinner,{size:"small",indicatorColor:"#ffffff"}):l.messages.text_input_btn})})})]})},p_=({children:e,freightConfig:t})=>r.jsxs("div",{className:ue.shippingFreight,children:[r.jsxs("div",{className:ue.shippingFreight__grid,children:[r.jsx("span",{className:ue.shippingFreight__grid__title,children:t.messages.title}),r.jsx("span",{className:ue.shippingFreight__grid__remember,children:r.jsx($e,{href:"https://buscacepinter.correios.com.br/app/endereco/index.php",passHref:!0,target:"_blank",rel:"noopener noreferrer",size:"x-small",disablePadding:!1,title:t.messages.remember_cep,children:t.messages.remember_cep})})]}),r.jsx("div",{className:ue.shippingFreight__postalCodeGrid,children:e})]}),f_=({children:e})=>r.jsx("div",{className:ue.freightContainer,children:e}),_u=({className:e,sellerId:t,skuId:n,quantity:s,size:o,seller:a,local:i,CONSTANTS_PROPS:c})=>{const{sendDataLayerEvent:l}=oe(),[u,m]=g.useState(""),[f,p]=g.useState([]),[h,_]=g.useState(""),[y,x]=g.useState(!1),b=j=>m(j),C=j=>{p(j),l({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:{shippings:j.map(v=>({shipping_tier:v.id,delivery_time:v.shippingEstimate.replace("bd",""),flag_pickup:v.name.toLowerCase().includes("retirada")?"true":"false",shipping:v.price,currency:c.currency||"BRL"}))}}})};return r.jsxs(f_,{className:e,children:[r.jsxs(p_,{freightConfig:c.freightConfig,children:[r.jsx(c_,{children:r.jsx(m_,{onUpdateFreightItems:C,skuId:n,quantity:s,size:o,sellerId:t,local:i,setError:_,setIsButtonClicked:x,freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex})}),h?r.jsx(Xo,{size:o,message:h,setError:_}):f.length>0&&r.jsx(Xo,{size:o,message:c.freightConfig.messages.delivered_by,seller:a})]}),y&&!h?f.length>0&&r.jsxs(a_,{children:[r.jsx(i_,{children:f.filter(({id:j})=>!j.includes("Retirada")).map(j=>r.jsx(o_,{id:j.id,value:T.freightParsePrice({valueInCents:j.price,hasFree:!1,freeTaxMessage:c.freightConfig.messages.free_tax}),title:j.name,paragraph:`${c.freightConfig.messages.prefix_days}${l_(j.shippingEstimate)}`,radioValue:u,changeValue:b},j.id))}),c.deliveryInfoBoxesAllowed?r.jsx(s_,{icon:c.freightConfig.icons.delivery_truck,packageUnit:c.freightConfig.messages.unit_amout,title:c.freightConfig.messages.delivered_amount_packages,subtitle:"",packageCount:1,labelDescription:"Label",freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex??999}):r.jsx(r.Fragment,{})]}):null]})},jt={"pcd-navigation--breadcrumb":"_pcd-navigation--breadcrumb_1243w_1","pdc-navigation--content":"_pdc-navigation--content_1243w_28","pdc-navigation--filters":"_pdc-navigation--filters_1243w_54","pdc-navigation--filters--content":"_pdc-navigation--filters--content_1243w_67","pdc-navigation--selected":"_pdc-navigation--selected_1243w_139","pdc-navigation--selected--container":"_pdc-navigation--selected--container_1243w_152","pdc-navigation":"_pdc-navigation_1243w_28"},h_=({children:e,href:t,isLast:n,title:s,ICONS:o})=>r.jsx(d.BreadCrumb.Item,{adornment:{end:n&&r.jsx(d.Icon,{name:o.arrow_right})},children:n?r.jsx($e,{href:t??"/",size:"medium",title:s,disableUnderline:!0,children:e}):e}),gu=()=>{var a;const{state:e}=ze(),{ICONS:t}=De(),n=e!=null&&e.term&&e.term.length>0?`/${e.term}`:"",s=decodeURIComponent((a=e==null?void 0:e.base)!=null&&a.length?e.base:n??n).slice(1).split("/"),o=$i(s);return r.jsx("div",{className:jt["pcd-navigation--breadcrumb"],children:r.jsx(d.BreadCrumb.DivWrapper,{children:r.jsx(d.BreadCrumb.List,{children:Array.isArray(o)&&o.map((i,c)=>{var l,u;return g.createElement(h_,{...i,isLast:c!==o.length-1,key:i.href,title:(l=i.name)==null?void 0:l.replace(/-/g," "),ICONS:t},(u=i.name)==null?void 0:u.replace(/-/g," "))})})})})};gu.displayName="PLPNavigation.BreadCrumb";const yu=({children:e,...t})=>r.jsxs("div",{...t,className:jt["pdc-navigation--content"],children:[r.jsx(ft.Filters,{}),e]});yu.displayName="PLPNavigation.Content";const __="_sort_35wro_1",Gn={sort:__,"sort-list-wrapper":"_sort-list-wrapper_35wro_8","sort-list":"_sort-list_35wro_8","sort-button":"_sort-button_35wro_25"},g_=({children:e,sortListOpen:t,btnAdornment:n,style:s,...o})=>r.jsx(d.Button,{...o,adornment:{end:t?n==null?void 0:n.listOpen:n==null?void 0:n.listClosed},size:"small",variant:"tertiary",style:{...s,textDecoration:"none"},className:Gn["sort-button"],children:e}),y_=e=>r.jsx(d.RadioButton.Radio,{...e}),x_=({children:e,className:t,name:n,...s})=>r.jsx(d.RadioButton.Group,{...s,name:n||"sort-group",className:d.helpers.classNameConcat(Gn["sort-list"],t),children:e}),v_=({children:e,className:t,shadow:n=!0,padding:s="small",height:o="fit-content",...a})=>r.jsx(d.Card,{...a,shadow:n,className:d.helpers.classNameConcat(Gn["sort-list-wrapper"],t),padding:s,height:o,children:e}),xu=g.forwardRef(({children:e,className:t,...n},s)=>r.jsx("div",{...n,ref:s,className:d.helpers.classNameConcat(Gn.sort,t),children:e}));xu.displayName="SortRoot";const Kn=({handleSelectValue:e,sortListOpen:t,setSortListOpen:n,searchParams:s,ICONS:o,...a})=>{var p;const i=(p=s==null?void 0:s.get("sort"))==null?void 0:p.replace(":","_"),[c,l]=g.useState(i),{sendDataLayerEvent:u}=oe();g.useEffect(()=>{l(i||void 0)},[i]);const{ref:m}=Cl(()=>n(!1)),f=h=>{const _=h.target.value;l(_),typeof e=="function"&&e(_),u({functionKey:"filterEvent",data:{customData:{ordering:Bt.options[_]}}}),n(!1)};return r.jsxs(xu,{...a,ref:m,children:[r.jsx(g_,{btnAdornment:{listOpen:r.jsx(d.Icon,{name:o.arrow_up,size:"small"}),listClosed:r.jsx(d.Icon,{name:o.arrow_down,size:"small"})},sortListOpen:t,onClick:()=>n(!t),children:c?Bt.options[c]:Bt.placeholder},"sort-button"),t&&r.jsx(v_,{children:r.jsx(x_,{name:"sort-group",value:c??"",onChange:f,children:Object.keys(Bt.options).map(h=>r.jsx(y_,{label:Bt.options[h],value:h},h))})})]})};Kn.displayName="Sort";const vu=g.createContext({}),b_=({children:e,...t})=>{const[n,s]=g.useState(!1);return r.jsx(vu.Provider,{value:g.useMemo(()=>({...t,openOrderBy:n,setOpenOrderBy:s}),[t,n,s]),children:e})},j_=()=>{const e=g.useContext(vu);if(e===void 0)throw new Error("usePLPNavigationContext must be used within a PDCNavigationProvider");return e},bu=()=>{const{openOrderBy:e,onSort:t,setOpenFilters:n,setOpenOrderBy:s}=j_(),{ICONS:o,PDC_NAVIGATION:a,searchParams:i}=De();return r.jsxs("div",{className:jt["pdc-navigation--filters"],children:[r.jsx(ft.BreadCrumb,{}),r.jsxs("div",{className:jt["pdc-navigation--filters--content"],children:[r.jsx(Kn,{handleSelectValue:c=>t(c??"release_desc"),sortListOpen:e,setSortListOpen:s,ICONS:o,searchParams:i}),r.jsx(d.Button,{adornment:{end:r.jsx(d.Icon,{name:o.arrow_down})},onClick:()=>n(!0),size:"small",variant:"tertiary",children:a.filter_button}),r.jsx(ft.Total,{})]})]})};bu.displayName="PLPNavigation.Filters";const ju=({children:e,onSort:t,setOpenFilters:n,style:s,...o})=>{const a=g.useRef(null);return r.jsx(b_,{onSort:t,setOpenFilters:n,children:r.jsx("div",{...o,className:jt["pdc-navigation"],ref:a,style:{...s},children:r.jsx(ft.Content,{children:e})})})};ju.displayName="Root";const Cu=({callback:e,selected:t,...n})=>r.jsx("div",{...n,className:jt["pdc-navigation--selected"],children:r.jsx("div",{className:jt["pdc-navigation--selected--container"],children:Array.isArray(t)?t.map(s=>s.key==="productclusterids"?null:r.jsx(ft.SelectedItem,{callback:e,facet:s},s.value)):null})});Cu.displayName="PLPNavigation.Selected";const Hs=({key:e,PLP_FILTERS:t})=>t.some(n=>n.key===e)?e==="cores-filtraveis":!1,qs=({value:e,PLP_FILTERS_COLORS:t})=>{var n;return((n=t.find(s=>s.value===e))==null?void 0:n.color)??"#F2F2F2"},Su=({key:e,PLP_FILTERS:t})=>{var n;return(n=t.find(s=>s.key===e))==null?void 0:n.label},Eu=({key:e,PLP_FILTERS:t})=>{var n;return((n=t.find(s=>s.key===e))==null?void 0:n.order)??0},ss=({value:e})=>{const[t,n]=e.split(":").length===2?e.split(":"):[0,0],s=T.formatPriceToCurrency(Number(n));return`${T.formatPriceToCurrency(Number(t))} até ${s}`},Pu=({items:e})=>{const t=e.flatMap(o=>[o.range.from,o.range.to]),n=Math.min(...t.map(Math.abs)),s=Math.max(...t.map(Math.abs));return[n,s]},Nu=Object.freeze(Object.defineProperty({__proto__:null,checkedColor:Hs,createTagPrice:ss,getAbsoluteMinMax:Pu,getColor:qs,getName:Su,getOrder:Eu},Symbol.toStringTag,{value:"Module"})),We={"filter--empty":"_filter--empty_1mjas_1","filter--item":"_filter--item_1mjas_14","filter--item--price":"_filter--item--price_1mjas_19","filter--item--toggle":"_filter--item--toggle_1mjas_19","filter--item--toggle--container":"_filter--item--toggle--container_1mjas_30","filter--modal--body":"_filter--modal--body_1mjas_79","filter--modal--body--content":"_filter--modal--body--content_1mjas_87","filter--modal--footer":"_filter--modal--footer_1mjas_96","filter--modal":"_filter--modal_1mjas_79","filter--loading":"_filter--loading_1mjas_176","filter--selected":"_filter--selected_1mjas_206","filter--selected--content":"_filter--selected--content_1mjas_210"},Iu=({columns:e=2,CONSTANTS:t,...n})=>{var a;const{filters:s,onToggleFacet:o}=Ft();return r.jsxs("div",{...n,className:We["filter--modal--body--content"],children:[Array.isArray(s.facets)&&s.facets.map(i=>r.jsx(it.Item,{columns:e,facet:i,onToggleFacet:o,CONSTANTS:t},i.key)),!((a=s.facets)!=null&&a.length)&&r.jsx(it.Empty,{PLP_FILTERS_EMPTY:t.PLP_FILTERS_EMPTY})]})};Iu.displayName="Filter.Item.Content";const wu=({PLP_FILTERS_EMPTY:e})=>{const t=()=>{window.history.back()};return r.jsxs("div",{className:We["filter--empty"],children:[r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("h4",{children:e.title}),r.jsx("p",{children:e.subtitle})]}),r.jsx(d.Button,{onClick:()=>t(),variant:"tertiary",children:e.button})]})};wu.displayName="Filter.Empty";const Ru=({columns:e,facet:t,onToggleFacet:n,CONSTANTS:s,...o})=>{const a=Eu({key:t.key,PLP_FILTERS:s.PLP_FILTERS}),i=()=>{if(t.__typename==="FacetBoolean"){if(t.key==="cores-filtraveis")return r.jsx(it.Colors,{onToggleFacet:n,values:t.values,PLP_FILTERS:s.PLP_FILTERS,PLP_FILTERS_COLORS:s.PLP_FILTERS_COLORS});if(t.key==="tamanho")return r.jsx(it.Sizes,{onToggleFacet:n,values:t.values,PLP_SIZE_ORDER:s.PLP_SIZE_ORDER});if(t.key==="category-2")return r.jsx(it.Toggle,{columns:e,facetKey:t.key,onToggleFacet:n,values:t.values,ICONS:s.ICONS})}return t.__typename==="FacetRange"?r.jsx(it.Price,{facet:t}):r.jsx("p",{children:"Filter not support!!!"})};return r.jsx("div",{...o,className:We["filter--item"],style:{order:a},children:r.jsxs(d.Accordion.Wrapper,{style:{width:"100%"},children:[r.jsx(d.Accordion.Header,{id:t.key,closeIndicator:r.jsx(d.Icon,{name:s.ICONS.arrow_up}),openIndicator:r.jsx(d.Icon,{name:s.ICONS.arrow_down}),children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h4",{className:"typography-style-body-sm",children:Su({key:t.key,PLP_FILTERS:s.PLP_FILTERS})})})})}),r.jsx(d.Accordion.Body,{children:i()})]})})};Ru.displayName="Filter.Item";const Au=({onToggleFacet:e,values:t,PLP_FILTERS:n,PLP_FILTERS_COLORS:s,...o})=>r.jsx(Je.Root,{...o,children:r.jsx(Je.List,{children:Array.isArray(t)&&t.map(({key:a,selected:i,value:c})=>r.jsx(Je.Option,{active:i,"data-color":Hs({key:a,PLP_FILTERS:n}),fill:qs({value:c,PLP_FILTERS_COLORS:s}),onClick:()=>e({key:a,value:c}),type:"color"},`${a}-${c}`))})});Au.displayName="Filter.Item.Color";const Tu=({facet:e,...t})=>{var u,m;const{filters:{selected:n},price:s,onToggleFacet:o}=Ft(),[a,i]=(s==null?void 0:s.split(":").map(Number))??[0,100],[c,l]=((m=(u=n==null?void 0:n.find(({key:f})=>f==="price"))==null?void 0:u.value)==null?void 0:m.split(":").map(Number))??[a,i];return r.jsx("div",{...t,className:We["filter--item--price"],children:r.jsxs(d.Slider.SliderDual,{format:"price",initialValue:[c<a?a:c,l>i?i:l],min:a,max:i,type:"dual",step:1,onFinish:f=>{var p,h;f&&o({key:"price",value:`${(p=f.range)==null?void 0:p.min}:${(h=f.range)==null?void 0:h.max}`})},children:[r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("p",{"data-min-value":!0})})}),r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("p",{"data-max-value":!0})})})]})})};Tu.displayName="Filter.Item.Price";const Lu=({onToggleFacet:e,values:t,PLP_SIZE_ORDER:n,...s})=>{const o=[...t].sort((a,i)=>{const c=n.indexOf(a.name),l=n.indexOf(i.name);return c-l});return r.jsx(Je.Root,{...s,children:r.jsx(Je.List,{children:Array.isArray(o)&&o.map(({key:a,selected:i,value:c})=>r.jsx(Je.Option,{active:i,text:c,type:"size",onClick:()=>e({key:a,value:c})},c))})})};Lu.displayName="Filter.Item.Sizes";const Ou=({columns:e,facetKey:t,onToggleFacet:n,values:s,ICONS:o,...a})=>r.jsx("div",{...a,className:We["filter--item--toggle"],children:r.jsx("div",{className:We["filter--item--toggle--container"],style:{gridTemplateColumns:`repeat(${e}, 1fr)`},children:Array.isArray(s)&&s.map(i=>r.jsx(d.Checkbox,{label:(i==null?void 0:i.name)??"",adornment:r.jsx(d.Icon,{name:o.check}),checked:i.selected,onChange:()=>n(i)},i.value))})});Ou.displayName="Filter.Item.Toggle";const ku=({...e})=>{const{isLoading:t}=Ft();return r.jsx("div",{className:We["filter--loading"],"data-active":t,...e,children:r.jsx(d.Spinner,{indicatorColor:"#000",background:"#222"})})};ku.displayName="Filter.Loading";const Du=({children:e,className:t,isMobile:n=!1,CONSTANTS:{PLP_FILTERS_TITLE:s,ICONS:o}})=>{var m;const{deleteAllFacets:a,filters:i,isOpen:c,target:l,setIsOpen:u}=Ft();return r.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(We["filter--modal"],t),isMobile:n??!1,isOpen:c,parent:l,setIsOpen:u,variant:n?"sideBottom":"sideRight",style:{zIndex:99},children:[r.jsxs(d.Modal.Header,{navigation:"top",children:[r.jsx(d.Modal.Controls,{navigation:"top",isMobile:n,children:r.jsx(d.Button,{"data-close":!0,iconNameStart:o.close,size:"small",variant:"tertiary",style:{marginLeft:"auto"}})}),r.jsx(d.Modal.Title,{navigation:"top",title:s})]}),r.jsxs(d.Modal.Body,{style:{width:500},children:[r.jsx("div",{className:We["filter--modal--body"],children:e}),r.jsx(it.Loading,{})]}),r.jsx(d.Modal.Footer,{children:r.jsxs("div",{className:We["filter--modal--footer"],children:[r.jsx(d.Button,{"data-close":!0,size:"large",variant:"primary",children:(m=i.facets)!=null&&m.length?"ver resultados":"fechar"}),r.jsx(d.Button,{"data-close":!0,onClick:()=>a(),variant:"tertiary",children:"limpar filtros"})]})})]})};Du.displayName="Filter.Modal";const Mu=({children:e,className:t,isMobile:n,CONSTANTS:s,...o})=>r.jsx(ic,{...o,PLP_FILTERS:s.PLP_FILTERS,children:r.jsx(it.Modal,{className:t,isMobile:n,CONSTANTS:s,children:e})});Mu.displayName="Filter.Root";const $u=({ICONS:e,PLP_FILTERS_COLORS:t,PLP_FILTERS:n})=>{const{filters:s,onToggleFacet:o}=Ft();return r.jsx("div",{className:We["filter--selected"],children:r.jsx("div",{className:We["filter--selected--content"],children:Array.isArray(s.selected)&&s.selected.map(({key:a,value:i})=>a==="productclusterids"?null:r.jsx(d.Tag,{title:a==="price"?ss({value:i}):i,adornment:{end:r.jsx(d.Icon,{name:e.close,size:"x-small"})},colorSquare:qs({value:i,PLP_FILTERS_COLORS:t}),onClick:()=>o({key:a,value:i}),squareShow:Hs({key:a,PLP_FILTERS:n}),size:"medium",variant:"primary",children:a==="price"?ss({value:i}):i},i))})})};$u.displayName="Filter.Selected";const it={Colors:Au,Content:Iu,Empty:wu,Modal:Du,Item:Ru,Root:Mu,Loading:ku,Selected:$u,Price:Tu,Sizes:Lu,Toggle:Ou},{checkedColor:C_,createTagPrice:Yo,getColor:S_}=Nu,zu=({callback:e,facet:t})=>{const{ICONS:n,PLP_FILTERS_COLORS:s,PLP_FILTERS:o}=De();return r.jsx(d.Tag,{title:(t==null?void 0:t.key)==="price"?Yo({value:t.value}):t.value.toUpperCase(),adornment:{end:r.jsx(d.Icon,{name:n.close,size:"x-small"})},colorSquare:S_({value:t.value,PLP_FILTERS_COLORS:s}),onClick:()=>{typeof e=="function"&&e(t,!0)},squareShow:C_({key:t.key,PLP_FILTERS:o}),size:"medium",variant:"primary",children:(t==null?void 0:t.key)==="price"?Yo({value:t.value}):t.value.toUpperCase()})};zu.displayName="PLPNavigation.Selected.Item";const Fu=()=>r.jsx(d.TextStructure.Root,{children:r.jsx("p",{id:"pdc-navigation--total"})});Fu.displayName="PLPNavigation.Total";const ft={BreadCrumb:gu,Content:yu,Filters:bu,Root:ju,Selected:Cu,SelectedItem:zu,Total:Fu},E_="_footer__bottom_198g6_2",P_="_footer__wrapper_198g6_10",N_="_footer__main_198g6_39",I_="_footer__legalInformation_198g6_55",w_="_footer__column_198g6_77",R_="_footer__columnContent_198g6_87",A_="_footer__item_198g6_91",T_="_footer__itemLink_198g6_107",L_="_footer__columnTitle_198g6_122",O_="_footer__columnTitleIcon_198g6_134",k_="_footer__iconList_198g6_147",D_="_footer__itemSmallText_198g6_157",M_="_payment_198g6_168",$_="_footer__iconContainer_198g6_173",z_="_footer__iconListSubHeader_198g6_178",F_="_accordionWrapper_198g6_200",B_="_accordionHeader_198g6_204",U_="_accordionTextWrapper_198g6_208",de={footer__bottom:E_,footer__wrapper:P_,footer__main:N_,footer__legalInformation:I_,footer__column:w_,footer__columnContent:R_,footer__item:A_,footer__itemLink:T_,footer__columnTitle:L_,footer__columnTitleIcon:O_,footer__iconList:k_,footer__itemSmallText:D_,payment:M_,footer__iconContainer:$_,footer__iconListSubHeader:z_,accordionWrapper:F_,accordionHeader:B_,accordionTextWrapper:U_,"footer--stamps":"_footer--stamps_198g6_247","footer--stamps--company":"_footer--stamps--company_198g6_254","support-container":"_support-container_198g6_258","support-section":"_support-section_198g6_277","support-text":"_support-text_198g6_319","support-items":"_support-items_198g6_329","support-item":"_support-item_198g6_329"};var Bu={},Vs={},Xn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"warnOnce",{enumerable:!0,get:function(){return t}});let t=n=>{};if(process.env.NODE_ENV!=="production"){const n=new Set;t=s=>{n.has(s)||console.warn(s),n.add(s)}}})(Xn);var Uu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImageBlurSvg",{enumerable:!0,get:function(){return t}});function t(n){let{widthInt:s,heightInt:o,blurWidth:a,blurHeight:i,blurDataURL:c,objectFit:l}=n;const u=20,m=a?a*40:s,f=i?i*40:o,p=m&&f?"viewBox='0 0 "+m+" "+f+"'":"",h=p?"none":l==="contain"?"xMidYMid":l==="cover"?"xMidYMid slice":"none";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+p+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='"+u+"'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='"+u+"'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+h+"' style='filter: url(%23b);' href='"+c+"'/%3E%3C/svg%3E"}})(Uu);var Yn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(o,a){for(var i in a)Object.defineProperty(o,i,{enumerable:!0,get:a[i]})}t(e,{VALID_LOADERS:function(){return n},imageConfigDefault:function(){return s}});const n=["default","imgix","cloudinary","akamai","custom"],s={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",localPatterns:void 0,remotePatterns:[],qualities:void 0,unoptimized:!1}})(Yn);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImgProps",{enumerable:!0,get:function(){return h}});const t=Xn,n=Uu,s=Yn,o=["lazy","eager",void 0];function a(_){return _.default!==void 0}function i(_){return _.src!==void 0}function c(_){return typeof _=="object"&&(a(_)||i(_))}const l=new Map;let u;function m(_){return typeof _>"u"?_:typeof _=="number"?Number.isFinite(_)?_:NaN:typeof _=="string"&&/^[0-9]+$/.test(_)?parseInt(_,10):NaN}function f(_,y,x){let{deviceSizes:b,allSizes:C}=_;if(x){const v=/(^|\s)(1?\d?\d)vw/g,P=[];for(let S;S=v.exec(x);S)P.push(parseInt(S[2]));if(P.length){const S=Math.min(...P)*.01;return{widths:C.filter(E=>E>=b[0]*S),kind:"w"}}return{widths:C,kind:"w"}}return typeof y!="number"?{widths:b,kind:"w"}:{widths:[...new Set([y,y*2].map(v=>C.find(P=>P>=v)||C[C.length-1]))],kind:"x"}}function p(_){let{config:y,src:x,unoptimized:b,width:C,quality:j,sizes:v,loader:P}=_;if(b)return{src:x,srcSet:void 0,sizes:void 0};const{widths:S,kind:E}=f(y,C,v),I=S.length-1;return{sizes:!v&&E==="w"?"100vw":v,srcSet:S.map((A,L)=>P({config:y,src:x,quality:j,width:A})+" "+(E==="w"?A:L+1)+E).join(", "),src:P({config:y,src:x,quality:j,width:S[I]})}}function h(_,y){let{src:x,sizes:b,unoptimized:C=!1,priority:j=!1,loading:v,className:P,quality:S,width:E,height:I,fill:A=!1,style:L,overrideSrc:O,onLoad:D,onLoadingComplete:Q,placeholder:M="empty",blurDataURL:U,fetchPriority:F,decoding:Y="async",layout:G,objectFit:H,objectPosition:Z,lazyBoundary:re,lazyRoot:le,...se}=_;const{imgConf:ie,showAltText:$,blurComplete:J,defaultLoader:w}=y;let W,ae=ie||s.imageConfigDefault;if("allSizes"in ae)W=ae;else{var he;const X=[...ae.deviceSizes,...ae.imageSizes].sort((ee,fe)=>ee-fe),k=ae.deviceSizes.sort((ee,fe)=>ee-fe),B=(he=ae.qualities)==null?void 0:he.sort((ee,fe)=>ee-fe);W={...ae,allSizes:X,deviceSizes:k,qualities:B}}if(typeof w>"u")throw new Error(`images.loaderFile detected but the file is missing default export.
5
- Read more: https://nextjs.org/docs/messages/invalid-images-config`);let N=se.loader||w;delete se.loader,delete se.srcSet;const R="__next_img_default"in N;if(R){if(W.loader==="custom")throw new Error('Image with src "'+x+`" is missing "loader" prop.
6
- Read more: https://nextjs.org/docs/messages/next-image-missing-loader`)}else{const X=N;N=k=>{const{config:B,...ee}=k;return X(ee)}}if(G){G==="fill"&&(A=!0);const X={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}},k={responsive:"100vw",fill:"100vw"},B=X[G];B&&(L={...L,...B});const ee=k[G];ee&&!b&&(b=ee)}let Ne="",q=m(E),K=m(I),_e,we;if(c(x)){const X=a(x)?x.default:x;if(!X.src)throw new Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(X));if(!X.height||!X.width)throw new Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(X));if(_e=X.blurWidth,we=X.blurHeight,U=U||X.blurDataURL,Ne=X.src,!A){if(!q&&!K)q=X.width,K=X.height;else if(q&&!K){const k=q/X.width;K=Math.round(X.height*k)}else if(!q&&K){const k=K/X.height;q=Math.round(X.width*k)}}}x=typeof x=="string"?x:Ne;let be=!j&&(v==="lazy"||typeof v>"u");(!x||x.startsWith("data:")||x.startsWith("blob:"))&&(C=!0,be=!1),W.unoptimized&&(C=!0),R&&x.endsWith(".svg")&&!W.dangerouslyAllowSVG&&(C=!0),j&&(F="high");const ge=m(S);if(process.env.NODE_ENV!=="production"){if(W.output==="export"&&R&&!C)throw new Error("Image Optimization using the default loader is not compatible with `{ output: 'export' }`.\n Possible solutions:\n - Remove `{ output: 'export' }` and run \"next start\" to run server mode including the Image Optimization API.\n - Configure `{ images: { unoptimized: true } }` in `next.config.js` to disable the Image Optimization API.\n Read more: https://nextjs.org/docs/messages/export-image-api");if(!x)C=!0;else if(A){if(E)throw new Error('Image with src "'+x+'" has both "width" and "fill" properties. Only one should be used.');if(I)throw new Error('Image with src "'+x+'" has both "height" and "fill" properties. Only one should be used.');if(L!=null&&L.position&&L.position!=="absolute")throw new Error('Image with src "'+x+'" has both "fill" and "style.position" properties. Images with "fill" always use position absolute - it cannot be modified.');if(L!=null&&L.width&&L.width!=="100%")throw new Error('Image with src "'+x+'" has both "fill" and "style.width" properties. Images with "fill" always use width 100% - it cannot be modified.');if(L!=null&&L.height&&L.height!=="100%")throw new Error('Image with src "'+x+'" has both "fill" and "style.height" properties. Images with "fill" always use height 100% - it cannot be modified.')}else{if(typeof q>"u")throw new Error('Image with src "'+x+'" is missing required "width" property.');if(isNaN(q))throw new Error('Image with src "'+x+'" has invalid "width" property. Expected a numeric value in pixels but received "'+E+'".');if(typeof K>"u")throw new Error('Image with src "'+x+'" is missing required "height" property.');if(isNaN(K))throw new Error('Image with src "'+x+'" has invalid "height" property. Expected a numeric value in pixels but received "'+I+'".')}if(!o.includes(v))throw new Error('Image with src "'+x+'" has invalid "loading" property. Provided "'+v+'" should be one of '+o.map(String).join(",")+".");if(j&&v==="lazy")throw new Error('Image with src "'+x+`" has both "priority" and "loading='lazy'" properties. Only one should be used.`);if(M!=="empty"&&M!=="blur"&&!M.startsWith("data:image/"))throw new Error('Image with src "'+x+'" has invalid "placeholder" property "'+M+'".');if(M!=="empty"&&q&&K&&q*K<1600&&(0,t.warnOnce)('Image with src "'+x+'" is smaller than 40x40. Consider removing the "placeholder" property to improve performance.'),M==="blur"&&!U){const X=["jpeg","png","webp","avif"];throw new Error('Image with src "'+x+`" has "placeholder='blur'" property but is missing the "blurDataURL" property.
1
+ "use strict";var Dm=Object.defineProperty;var Ta=e=>{throw TypeError(e)};var Mm=(e,t,r)=>t in e?Dm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Cn=(e,t,r)=>Mm(e,typeof t!="symbol"?t+"":t,r),vs=(e,t,r)=>t.has(e)||Ta("Cannot "+r);var w=(e,t,r)=>(vs(e,t,"read from private field"),r?r.call(e):t.get(e)),re=(e,t,r)=>t.has(e)?Ta("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),K=(e,t,r,n)=>(vs(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),de=(e,t,r)=>(vs(e,t,"access private method"),r);var Sn=(e,t,r,n)=>({set _(o){K(e,t,o,r)},get _(){return w(e,t,n)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),g=require("react"),k=require("./index-dtcYsqh-.js"),Ct=require("idb-keyval"),hr=require("zustand"),fo=require("js-cookie"),d=require("@soma-vertical-web/core-components"),lr=require("axios"),po=require("@date-fns/tz"),Fm=require("jose"),Pr=require("@soma-vertical-web/foundations"),Go=require("react-dom"),gt=require("draft-js"),yc=require("react-intersection-observer");function zm(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const it=zm(g),Ko=g.createContext({}),Bm=({data:e,children:t})=>s.jsx(Ko.Provider,{value:{tags:e==null?void 0:e.config},children:t}),Ot=()=>{const{tags:e}=g.useContext(Ko),t=g.useCallback(r=>{var c,l,u,f;const n=(l=(c=e==null?void 0:e.commercial)==null?void 0:c.items)==null?void 0:l.find(p=>{var m;return(m=r??[])==null?void 0:m.find(h=>h.id===p.key)}),o=(f=(u=e==null?void 0:e.institucional)==null?void 0:u.items)==null?void 0:f.find(p=>{var m;return(m=r??[])==null?void 0:m.find(h=>h.id===p.key)}),a=e==null?void 0:e.flagPdp,i=(r==null?void 0:r.find(p=>{var m;return p.id===((m=e==null?void 0:e.flagGoldenPdp)==null?void 0:m.key)}))&&(e==null?void 0:e.flagGoldenPdp);return{commercial:n,institucional:o,flagPdp:a,flagGoldenPdp:i}},[e]);return{tags:e,getAvailableProductTag:t}},vc=({gridScrollBack:e})=>{g.useEffect(()=>{typeof window<"u"&&(e!=null&&e.refer)&&sessionStorage.setItem(e==null?void 0:e.refer,"true")},[])},xc=g.createContext({}),Um=({children:e,gridScrollBack:t})=>{const r=g.useRef(null);return vc({gridScrollBack:t}),s.jsx(xc.Provider,{value:{sizesContainerRef:r},children:e})},bc=()=>{const e=g.useContext(xc);if(e===void 0)throw new Error("useContext(PDPContext) must be used within a PDPProvider");return e},Dt=({event:e,data:t})=>{const r=(window==null?void 0:window.dataLayer)||[];t.ecommerce&&r.push({ecommerce:null}),r.push({...e&&{event:`custom_${e}`},...t})},Re={configs:{PLP_FILTERS:[{key:"",label:"",eventLabel:"",order:0}],currency:"BRL",categoryOff:"bazar",storeUrl:"https://www.example.com",MAIN_IMAGE:"1",NAME_SPLIT_SYMBOL:"-",VENDOR_CODE:""},productEvents:(e,t)=>{const{event:r,commonData:n,customData:o,promotionInfo:a,itemList:i,outsideEcommerceData:c}=e,{availableSizes:l,sizes:u,price:f}=n,p={...r==="view_item"?{currency:Re.configs.currency,value:f,grade_disponivel:l??(u?jc(u):"")}:{},...r==="add_to_wishlist"||r==="remove_from_wishlist"?{value:f,currency:Re.configs.currency}:{}},m=En({data:n,customData:{...o,...i,...a},configs:Re.configs});Dt({event:r,data:{...c,ecommerce:{...i,...p,items:[m]}}}),typeof t=="function"&&t(m,p)},productListEvent:e=>{const{commonData:{products:t},promotionInfo:r,itemList:n,outsideEcommerceData:o,customData:a}=e;if(t.length===0)return;const i=t.map(({node:c},l)=>En({data:{...c},customData:{...r,index:l,...a!=null&&a.item_list_name?{item_list_name:a==null?void 0:a.item_list_name}:n},configs:Re.configs}));Dt({event:"view_item_list",data:{...o,ecommerce:{...a!=null&&a.item_list_name?{item_list_name:a==null?void 0:a.item_list_name}:n,items:i}}})},skuEvents:e=>{const{event:t,commonData:{products:r},customData:n,supportData:{selectedSkus:o,price:a},promotionInfo:i,itemList:c,outsideEcommerceData:l}=e;let u=0;const f=r.map(p=>{var y,v,b,C,j,x,S,E,P;const m=o==null?void 0:o.find(N=>(p.productId??p.id)===N.productId);let h={...i,...c};if(m){const N=Sc(),A=Ec(N,m);A&&(h={...h,...A}),t==="add_to_cart"&&(i||c)&&mo({persistedData:N,type:"add",sku:(m==null?void 0:m.id)??(m==null?void 0:m.sku),newData:{promotionInfo:i,itemList:c}}),t==="remove_from_cart"&&mo({persistedData:N,type:"remove",sku:(m==null?void 0:m.id)??(m==null?void 0:m.sku)})}u+=p.price??((b=(v=(y=m==null?void 0:m.offers)==null?void 0:y.offers)==null?void 0:v[0])==null?void 0:b.price)??0;const _=(m==null?void 0:m.size)??k.getColorAndSizeFromSkuName((m==null?void 0:m.skuName)??(m==null?void 0:m.name)??((C=p.itemOffered)==null?void 0:C.skuName),Re.configs.NAME_SPLIT_SYMBOL).size;return En({data:p,customData:{...n,...h??{...i,...c},item_sku:(m==null?void 0:m.id)??(m==null?void 0:m.sku)??((j=p.itemOffered)==null?void 0:j.sku),quantity:(n==null?void 0:n.quantity)??p.quantity??1,item_variant2:_,seller_id:(m==null?void 0:m.sellerId)??(m==null?void 0:m.seller)??((P=(E=(S=(x=m==null?void 0:m.offers)==null?void 0:x.offers)==null?void 0:S[0])==null?void 0:E.seller)==null?void 0:P.identifier)??p.seller},configs:Re.configs})});Dt({event:t,data:{...l,ecommerce:{value:a??u,currency:Re.configs.currency,items:f}}})},filterEvent:e=>{var i;const{commonData:t,customData:r,outsideEcommerceData:n}=e,o={},a={};Array.isArray(t==null?void 0:t.selectedFacets)&&((i=t==null?void 0:t.selectedFacets)!=null&&i.length)&&((t==null?void 0:t.selectedFacets).forEach(({key:c,value:l})=>{var p;const u=((p=Re.configs.PLP_FILTERS.find(m=>m.key===c))==null?void 0:p.eventLabel)??c,f=(o==null?void 0:o[u])||[];u==="price_range"&&l.replace(":","-"),o[u]=[...f,l]}),Object.keys(o).forEach(c=>a[c]=o[c].join(", "))),Dt({event:"filter",data:{...n,...a,...r}})},viewCartEvent:e=>{var f,p,m,h,_,y,v,b,C,j;const{commonData:t,outsideEcommerceData:r}=e,{cartStore:n}=t;if(!n)return;const o=window.localStorage.getItem("persistedCartEventsData"),a=o?JSON.parse(o):{},i=n.items.map(x=>{const{promotionInfo:S,itemList:E}=a[x.id]??{};return En({data:{...x,price:x.price/100,listPrice:x.listPrice/100},customData:{...S,...E,item_sku:x.id??x.itemOffered.sku,quantity:x.quantity??1},configs:Re.configs})}),c=(((f=n.totalizers.find(x=>x.name==="Total dos Itens"))==null?void 0:f.value)??0)/100,l=(((p=n.totalizers.find(x=>x.name==="Total dos Descontos"))==null?void 0:p.value)??0)/100,u=((m=n.marketingData)==null?void 0:m.utmiCampaign)===Re.configs.VENDOR_CODE?(h=n.marketingData)==null?void 0:h.utmCampaign:(y=String((_=n.openTextField)==null?void 0:_.value))==null?void 0:y.split(" - ")[0];Dt({event:"view_cart",data:{...r,ecommerce:{currency:Re.configs.currency,value:c+l,total_discount:Math.abs(l),cep_preenchido:!!((b=(v=n.shippingData)==null?void 0:v.address)!=null&&b.postalCode),...u?{seller_coupon_name:u}:{},...((C=n.marketingData)==null?void 0:C.coupon)&&{sale_coupon_name:(j=n.marketingData)==null?void 0:j.coupon},subtotal:c,items:i}}})},readyEvents:e=>{const{event:t,readyData:r}=e;Dt({event:t,data:{...r}})}},jc=e=>e.reduce((t,r)=>(r.available&&t.push(r.value),t),[]).toString(),qm=e=>{const t=e.length;return{...e&&e.length>0?{item_category:e[0].includes(Re.configs.categoryOff)?"Bazar":"Coleção",...e[1]?{item_category2:e[1]}:{},...t>2?{item_category3:e[t-1]}:{}}:{}}},En=({data:e,customData:t,configs:r})=>({...$m(e,r==null?void 0:r.MAIN_IMAGE),...Hm(e),...Vm(e),...Wm(e),...t}),Cc=()=>{var e,t;return document?((t=(e=window.document.head.querySelector('meta[name="category"]'))==null?void 0:e.getAttribute("content"))==null?void 0:t.split("_"))??[]:[]},Sc=()=>{const e=window.localStorage.getItem("persistedCartEventsData");return e?JSON.parse(e):null},Ec=(e,t)=>e==null?void 0:e[t],mo=({persistedData:e,type:t,sku:r,newData:n})=>{if(!e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({[r]:n}));return}if(e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({...e,[r]:n}));return}e&&t==="remove"&&(delete e[r],window.localStorage.setItem("persistedCartEventsData",JSON.stringify(e)))},$m=(e,t="1")=>{var a,i,c,l,u,f,p,m,h,_,y;const r=e.productReference??e.gtin??e.productRefId,n=e.image??((i=(a=e.items)==null?void 0:a[0])==null?void 0:i.images)??((c=e.itemOffered)==null?void 0:c.image),o=n==null?void 0:n.find(v=>v.alternateName===t||v.imageLabel===t||v.keywords===t);return{item_id:e.productId??((l=e.isVariantOf)==null?void 0:l.productGroupID)??((u=e.isVariationOf)==null?void 0:u.productGroupID)??((p=(f=e.itemOffered)==null?void 0:f.isVariationOf)==null?void 0:p.productGroupID),item_ref:/_\d$/.test(r)?r.slice(0,-2):r,item_name:e.productTitle??e.productName??e.name??k.splitNameAndSizeFromFullName((m=e.itemOffered)==null?void 0:m.name,Re.configs.NAME_SPLIT_SYMBOL).name,item_brand:((h=e.brand)==null?void 0:h.brandName)??((_=e.brand)==null?void 0:_.name)??e.brand??((y=e.itemOffered)==null?void 0:y.brand.name),item_url:`${Re.configs.storeUrl}${e.linkText}/p`,item_image:(o==null?void 0:o.url)??(o==null?void 0:o.imageUrl)}},Aa=e=>Array.isArray(e)?e.reduce((t,r)=>(r.length>t.length&&(t=r),t),""):e,Hm=e=>{var u,f;const{categories:t,categoriesIds:r}=e,n=t??((u=e.itemOffered)==null?void 0:u.categories),o=r??((f=e.itemOffered)==null?void 0:f.categoriesIds),a=Aa(n),i=Aa(o),c=a.slice(1,-1).split("/"),l=i.slice(1,-1).split("/");return{item_category:c[0].toLowerCase().includes(Re.configs.categoryOff)?"Bazar":"Coleção",...c[1]&&{item_category2:c[1]},...c.length>2&&{item_category3:c[c.length-1]},item_category_id:l[l.length-1],...l.length>1&&{item_parent_category_id:l[l.length-2]}}},Vm=e=>{var o,a,i,c,l,u;const t=((o=e.itemOffered)==null?void 0:o.skuName)??((c=(i=(a=e.isVariantOf)==null?void 0:a.hasVariant)==null?void 0:i[0])==null?void 0:c.name)??((u=(l=e.items)==null?void 0:l[0])==null?void 0:u.name),{color:r,size:n}=k.getColorAndSizeFromSkuName(t,Re.configs.NAME_SPLIT_SYMBOL);return{item_variant:r,...e.itemOffered&&{item_variant2:n}}},Wm=e=>{var l,u;const{price:t,listPrice:r,installments:n}=e,o=t??((l=e.offers)==null?void 0:l.lowPrice)??0,a=r??((u=e.offers)==null?void 0:u.highPrice)??0,i=a?a-o:0,c=i%1===0?i:Number(i.toFixed(2));return{...t&&{price:o??a},...a&&{list_price:a,discount:c},...n&&{installments:n==null?void 0:n.count,installment_value:n==null?void 0:n.value},item_currency:Re.configs.currency}},Pc=()=>{const[e,t]=Cc(),[r,n]=e.split("-"),o=r.includes("shop")||r.includes("sale")?r:"";return{page_category:o&&n?n:"",page_departament:o,id:t,name:e}},Gm=Object.freeze(Object.defineProperty({__proto__:null,eventsFunctions:Re,findDataInPersistedData:Ec,getAvailablesSizes:jc,getCategories:qm,getPageCategoryAndDepartmentFromSlug:Pc,getPersistedData:Sc,getProductListInfoFromHead:Cc,pushDatalayer:Dt,updatePersistedData:mo},Symbol.toStringTag,{value:"Module"})),wc=g.createContext({}),Km=({children:e,evtFunctionsConfigs:t})=>{const r=g.useRef({}),n=g.useRef(null),o=g.useRef(null),a=g.useRef({}),i=g.useRef({trigger:!1,index:0}),c=({functionKey:f,data:p,callBack:m,timeout:h=100})=>{window.dataLayer||(window.dataLayer=[]),Re.configs=t;try{typeof Re[f]=="function"&&setTimeout(()=>{var _;p.promotionInfo=r.current,(_=o.current)!=null&&_.item_list_name&&(p.itemList=o.current),Re[f](p,m)},h)}catch(_){Dt({event:"error_event",data:{error_message:(_==null?void 0:_.message)??_}})}},l=({content:f})=>{c({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:f.replace("::",":")}}})},u=({updatePromotionRef:f,promotion:p,index:m})=>{f&&(r.current={...p}),c({functionKey:"readyEvents",data:{event:"select_promotion",readyData:{ecommerce:{...p,...m!==void 0&&{index:m}}}}})};return s.jsx(wc.Provider,{value:{sendDataLayerEvent:c,triggerSelectItemEventRef:i,promotionEventRef:r,currentLocalRef:n,itemListRef:o,cartProductsFullDataRef:a,handleSelectContent:l,handleSelectPromotionEvent:u},children:e})},ie=()=>g.useContext(wc),Nc=g.createContext({}),Qm=({children:e,productData:t,isKit:r,PDP_INFO:n,NAME_SPLIT_SYMBOL:o,TEXTURE_IMAGE:a})=>{var F,q;const{sendDataLayerEvent:i,triggerSelectItemEventRef:c}=ie(),{productId:l,productName:u,items:f,items:[{images:p,Videos:m}],description:h,["Composição"]:_="",productReference:y,categories:[v]}=t,{getAvailableProductTag:b}=Ot(),C=b(Object.entries(t.clusterHighlights).map(V=>({id:V[0],name:V[1]}))),j=v.slice(1,-1).split("/"),{installments:x,price:S,listPrice:E,sizes:P,allSizesAvailable:N}=k.getSkuInfos({items:f,NAME_SPLIT_SYMBOL:o}),A=k.getThumbImage({images:p,TEXTURE_IMAGE:a}),R=[{label:`${n.product.description}`,value:"description",content:h},{label:`${n.product.materiais}`,value:"composition",content:_}],O=((q=k.getColorAndSizeFromSkuName((F=t.items)==null?void 0:F[0].name,o))==null?void 0:q.color)??t["Cores Filtráveis"][0]??"",D=()=>({commonData:{...t,sizes:P,price:S,listPrice:E,installments:x},customData:{installments:x==null?void 0:x.count,installment_value:Number(x==null?void 0:x.value).toFixed(2)}}),$=({sku:V,size:J})=>{const{commonData:Z,customData:H}=D();i({functionKey:"productEvents",data:{event:"view_item",commonData:Z,customData:{...H,...V&&{item_sku:V},...J&&{item_variant2:J}}}})};return g.useEffect(()=>{if(c.current.trigger){const{commonData:V,customData:J}=D();i({functionKey:"productEvents",data:{event:"select_item",commonData:V,customData:{...J,index:c.current.index}}}),c.current.trigger=!1}$({})},[]),s.jsx(Nc.Provider,{value:{productData:t,productId:l,productName:u,productReference:y,tag:C,items:f,sizes:P,allSizesAvailable:N,installments:x,price:S,listPrice:E,thumbImage:A,images:p,video:m[0],descriptionContent:R,breadcrumbList:j,isKit:r,colorName:O,handleViewItemEvent:$},children:e})},We=()=>{const e=g.useContext(Nc);if(e===void 0)throw new Error("useContext(PDPDataContext) must be used within a PDPDataProvider");return e},Xm=()=>{const[e,t]=g.useState(null);return[e,async n=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(n),t(n),!0}catch(o){return console.warn("Copy failed",o),t(null),!1}}]},Ic=()=>{g.useEffect(()=>{const e=t=>{t.preventDefault()};return document.addEventListener("gesturestart",e),document.addEventListener("gesturechange",e),document.addEventListener("dblclick",e),document.addEventListener("wheel",t=>{t.ctrlKey&&e(t)}),()=>{document.removeEventListener("gesturestart",e),document.removeEventListener("gesturechange",e),document.removeEventListener("dblclick",e),document.removeEventListener("wheel",e)}},[])},Ym=typeof window>"u",Zm=(e,t)=>{const[r,n]=g.useState(()=>{if(Ym)return null;const a=localStorage.getItem(e);return a===null?t:JSON.parse(a||"{}")});return g.useEffect(()=>{const a=i=>{i.storageArea===localStorage&&i.key===e&&n(JSON.parse(i.newValue))};return window.addEventListener("storage",a),()=>{window.removeEventListener("storage",a)}},[e,t]),[r,a=>{n(i=>{const c=typeof a=="function"?a(i):a;return localStorage.setItem(e,JSON.stringify(c)),c})}]};function Qo(e,t,r){const[n,o]=g.useState(!1),{threshold:a}=r||{};return g.useEffect(()=>{if(!e.current)return()=>null;let i=null;const c=new IntersectionObserver(([l])=>{if(r!=null&&r.delay){i&&clearTimeout(i),i=setTimeout(()=>{o(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},r.delay);return}o(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},{threshold:a||1});return c.observe(e.current),()=>{c.disconnect()}},[e]),n}const es=({callback:e,onEnterViewportOnce:t,options:r})=>{const n=g.useRef(null);return g.useEffect(()=>{const o=n.current;if(!o)return;const a=new IntersectionObserver(([i])=>{i.isIntersecting&&typeof e=="function"&&(e(),t&&(a.unobserve(o),a.disconnect()))},r);return a.observe(o),()=>{t&&a.unobserve(o),a.disconnect()}},[e,t,r]),{element:n}},Rc=({defaultScale:e=1,maxScale:t=3})=>{const r=g.useRef(null),n=g.useRef(null),[o,a]=g.useState(e),i=g.useRef(0),c=g.useRef({x:0,y:0}),l=g.useRef({x:0,y:0}),u=()=>{if(!n.current||!r.current)return{minX:0,maxX:0,minY:0,maxY:0};const h=r.current.getBoundingClientRect(),_=n.current.children[0].getBoundingClientRect(),y=_.width,v=_.height,b=Math.min(0,(h.width-y)/2),C=Math.max(0,(y-h.width)/2),j=Math.min(0,(h.height-v)/2),x=Math.max(0,(v-h.height)/2);return{minX:b,maxX:C,minY:j,maxY:x}},f=(h,_,y)=>{if(n.current){const v=n.current.children[0];v&&requestAnimationFrame(()=>{v.style.transform=`translate(calc(-50% + ${h}px), calc(-50% + ${_}px)) scale(${y})`})}},p=g.useCallback(h=>{const{minX:_,maxX:y,minY:v,maxY:b}=u(),{x:C,y:j}=l.current,x=Math.max(_,Math.min(y,C)),S=Math.max(v,Math.min(b,j));if(h.touches.length>1){const E=h.touches[0],P=h.touches[1],N=E.pageX-P.pageX,A=E.pageY-P.pageY;i.current=Math.sqrt(N*N+A*A),c.current={x:(E.pageX+P.pageX)/2,y:(E.pageY+P.pageY)/2}}else h.touches.length===1&&(c.current={x:h.touches[0].pageX-x,y:h.touches[0].pageY-S})},[o,l]),m=g.useCallback(h=>{if(!n.current||!r.current)return;const{minX:_,maxX:y,minY:v,maxY:b}=u();if(h.touches.length>1){h.preventDefault();const C=h.touches[0],j=h.touches[1],x=C.pageX-j.pageX,S=C.pageY-j.pageY,E=Math.sqrt(x*x+S*S);if(!i.current){i.current=E;return}const P=E/i.current,N=Math.max(1,Math.min(t,o*P));if(o===N)return;a(N);const A=(C.pageX+j.pageX)/2,R=(C.pageY+j.pageY)/2;let O=A-c.current.x,D=R-c.current.y;O=Math.max(_,Math.min(y,O)),D=Math.max(v,Math.min(b,D)),l.current={x:O,y:D},i.current=E,f(O,D,N)}else if(h.touches.length===1){const C=h.touches[0].pageX,j=h.touches[0].pageY;let x=C-c.current.x,S=j-c.current.y;x=Math.max(_,Math.min(y,x)),S=Math.max(v,Math.min(b,S)),l.current={x,y:S},f(x,S,o)}},[t,o]);return g.useEffect(()=>(document.addEventListener("touchstart",p),document.addEventListener("touchmove",m,{passive:!1}),()=>{document.removeEventListener("touchstart",p),document.removeEventListener("touchmove",m)}),[m,p]),{containerRef:r,imgRef:n,scale:o}},Jm={attachment:"ATTACHMENT",specification:"SPECIFICATION",attribute:"ATTRIBUTE"},st=Promise.resolve(!1),ho={id:"",isOpen:!1,items:[],loading:!1,marketingData:null,messages:[],openTextField:{},paymentData:null,shippingData:null,totalizers:[],itemMetadata:[],recentlyAddedProducts:[],addCoupon:()=>st,addItem:()=>st,addSellerCode:()=>st,addMarketingData:()=>st,emptyCart:()=>({}),removeItem:()=>st,setIsOpen:()=>({}),shipping:()=>st,shippingUpdate:()=>st,toggleServiceToProduct:()=>st,updateItemQuantity:()=>st,insertProfileEmail:()=>st,setRecentlyAddedProducts:()=>({})},Xo=e=>e===0,Tc=(e,t)=>{if(!e||e.length===0)return[];let r="";const n=[],o=e.match(/\d+/g)??[];for(const a of o){const i=t[Number(a)];i&&(r+=(r?"/":"")+i,n.push(r))}return n},Ac=(e,t)=>{const{availability:r,additionalInfo:{brandName:n},bundleItems:o,id:a,uniqueId:i,detailUrl:c,ean:l,imageUrl:u,name:f,listPrice:p,quantity:m,price:h,priceDefinition:_,productCategories:y,productCategoryIds:v,productId:b,refId:C,seller:j,referenceId:x,offerings:S,productRefId:E,skuName:P,sellingPrice:N}=e;return{availability:r,bundleItems:o,referenceId:x,productRefId:E,id:a,ean:l,uniqueId:i,itemOffered:{additionalProperty:[],brand:{name:n},categories:Tc(v,y),categoriesIds:v,gtin:C,image:[{alternateName:(t==null?void 0:t.MAIN_IMAGE)??"1",url:u}],name:f,isVariationOf:{name:f,productGroupID:b},sku:a,slug:c,skuName:P},listPrice:p,quantity:m,offerings:S,price:h,priceDefinition:_,sellingPrice:N,seller:j}},Oc=(e,t)=>{const r=e.map(n=>({id:n.uniqueId,quantity:n.quantity,seller:n.seller}));return Array.isArray(t)?[...r,...t]:[...r,t]},Lc=(e,t)=>{const r=e.find(n=>n.id===t);if(r){const n=e.map((o,a)=>{var i,c;return{id:((i=o.itemOffered)==null?void 0:i.sku)??"",index:a,quantity:(r==null?void 0:r.id)===((c=o.itemOffered)==null?void 0:c.sku)?0:o.quantity,seller:o.seller??""}});return{updateItems:n,filterItems:n.filter(o=>o.id!==t)}}return{updateItems:[],filterItems:[]}},kc=(e,t,r)=>e.filter(n=>n.availability!=="withoutStock"&&n.availability!=="https://schema.org/OutOfStock").map((n,o)=>{var a,i;return n.id===t?{id:n.id,index:o,quantity:r,seller:n.seller,sku:((a=n.itemOffered)==null?void 0:a.sku)??""}:{id:n.id,index:o,quantity:n.quantity,seller:n.seller,sku:((i=n.itemOffered)==null?void 0:i.sku)??""}}),_o=(e,t)=>e.filter(r=>r.availability!=="withoutStock").findIndex(({id:r})=>r===t),eh=(e,t)=>{var r;return Array.isArray(e)?(((r=e==null?void 0:e.find(n=>{var o;return((o=n==null?void 0:n.id)==null?void 0:o.toLowerCase())===t}))==null?void 0:r.value)??0)/100:0},th=e=>{const t=e.reduce((o,a)=>{const i=Xo(a.price)?0:a.quantity;return o+i},0),r=e.reduce((o,a)=>o+a.price*a.quantity,0),n=e.reduce((o,a)=>o+a.listPrice*a.quantity,0);return{totalItems:t,total:r,subTotal:n}},rh=e=>Array.isArray(e)?e.filter(t=>t.availability!=="withoutStock").reduce((t,r)=>t+(Xo(r==null?void 0:r.price)?0:r.quantity),0):0,Dc=(e,t)=>{const{items:r,orderFormId:n,...o}=e;return{...o,id:n,items:Array.isArray(r)?r.map(a=>Ac(a,t)):[]}},Mc=(e,t)=>{const r=e.find(n=>n.id===t);return r?r.availability==="unavailableItemFulfillment":!1},nh=(e,t)=>{const r=e.sku,n=e.isVariantOf.hasVariant.find(o=>o.sku===r);return n?n.name.split(t)[1]:"--"},Cr=(e,t,r=!1)=>!e&&t!==""?{code:300,value:t,statusOk:r}:e===t?{code:200,value:t,statusOk:r}:{code:400,value:t,statusOk:r},sh=(e,t)=>{const r=new Set;return[e,...t].filter(n=>!r.has(n)&&r.add(n),r)},Fc=(e,t)=>t&&Array.isArray(t)&&t.find(n=>n.id===e)?Promise.resolve(e):Promise.resolve(!1),zc=(e,t)=>t?Promise.resolve(e[t]):Promise.resolve(!1),Bc=async e=>{try{const t=await e();if(typeof t!="boolean")return t}catch(t){console.error(`[Error orderForm]: ${t}`)}return!1},Uc=(e,t)=>{if(t!==-1){const r=Number(e);return r?r+1:1}return e??1},qc=(e,t)=>Array.isArray(e)?e.filter(r=>t==null?void 0:t.some(n=>n.id===r.id)):[],$c=async(e,t)=>e.then(r=>[...r??[],...t??[]]),qe=async(e,t,r,n)=>{const{priority:o="auto",body:a}=t;return fetch(e,{headers:{"Content-Type":"application/json"},priority:o,method:"POST",body:JSON.stringify(a)}).then(async i=>{const c=await i.json();return r?c:Dc(c,n)})},Hc=(e,t,r)=>({notifications:[...e.notifications,{id:Date.now(),message:t,callback:r}]}),Vc=e=>[...Array.isArray(e)?e:[e],"faststore"],Wc=e=>{const t=e.get("utm_source")||Yt("utm_source"),r=e.get("utm_campaign")||Yt("utm_campaign"),n=e.get("utm_medium")||Yt("utm_medium"),o=e.get("utmi_cp")||Yt("utmi_cp"),a=e.get("utmi_pc")||Yt("utmi_pc"),i=e.get("utmi_p")||Yt("utmi_p");return{...t&&{utmSource:t},...n&&{utmMedium:n},...r&&{utmCampaign:r},...o&&{utmiCampaign:o},...a&&{utmiPart:a},...i&&{utmipage:i}}},Yt=e=>{if(!e||typeof window>"u")return;const t=window.location.href;e=e.replace(/[[\]]/g,"\\$&");const r=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)"),n=r.exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null},Gc=(e,t,r="BR")=>{const n=t,o={country:r,addressType:"",postalCode:e||null,city:"",state:"",street:"",number:"",neighborhood:"",complement:"",reference:"",geoCoordinates:[]};if(n){const a=typeof n=="object"&&"latitude"in n?n.latitude:null,i=typeof n=="object"&&"longitude"in n?n.longitude:null;o.geoCoordinates=typeof a=="number"&&typeof i=="number"?{latitude:a,longitude:i}:null}return[o]},oh=Object.freeze(Object.defineProperty({__proto__:null,VALUE_REFERENCES:Jm,addItemOrder:Oc,addNotification:Hc,createItemOrder:Ac,createNewAddress:Gc,fetchCartAPI:qe,findItemIndex:_o,findOptions:qc,findTotalizerValue:eh,getCategories:Tc,getCode:Cr,getQuantity:Uc,getRemoveId:Fc,getSize:nh,getTotalItems:rh,getTotalizer:th,getUrlParameter:Yt,getValue:zc,initialState:ho,isGift:Xo,marketingTagsBuilder:Vc,mergeOptionsPromise:$c,mountMarketingData:Wc,orderFormValues:Dc,promiseDefault:st,removeQuantity:Lc,updateItemSellerExternal:Mc,updateOrderFormPromise:Bc,updateQuantity:kc,wishlistArray:sh},Symbol.toStringTag,{value:"Module"})),ah=()=>{const e=async(h,_)=>qe("/api/checkout/order-form/coupon",{body:{orderFormId:h,coupon:_}}),t=async(h,_,y={},v)=>{if(v)if(_){const b=_.includes(" - ")?_.split(" - ")[0]:_,C=await qe("/api/checkout/order-form/seller-code",{body:{orderFormId:h,sellerCode:b}},!0);return C instanceof Object&&y.name in C&&C[y.status]===!0?qe("/api/checkout/order-form/attachments",{body:{orderFormId:h,sellerCode:b,sellerName:C[y.name]}}).then(x=>({...x,openTextField:{...(x==null?void 0:x.openTextField)??{},statusOk:!0}})):Promise.resolve({paymentData:null,openTextField:{statusOk:!1,value:b}})}else return qe("/api/checkout/order-form/attachments",{body:{orderFormId:h,sellerCode:"",sellerName:""}})},r=async(h,_)=>qe("/api/checkout/order-form/attachments/marketing-data",{body:{orderFormId:h,marketingData:_}}),n=async(h,_,y)=>qe("/api/checkout/order-form/items",{body:{orderFormId:h,orderItems:Oc(_,y)}}),o=async(h,_,y,v=!1)=>qe("/api/checkout/order-form/offerings",{body:{id:_,itemIndex:y,orderFormId:h,remove:v}}),a=async h=>qe("/api/checkout/order-form/items/remove-all",{body:{orderFormId:h}}),i=async(h,_="low")=>qe("/api/checkout/order-form",{priority:_,body:{orderFormId:h??""}}),c=async(h,_)=>qe("/api/checkout/order-form/profile",{body:{orderFormId:h,email:_}}),l=async(h,_,y)=>{const v=Lc(_,y);return qe("/api/checkout/order-form/items/update",{body:{orderItems:v.updateItems,orderFormId:h}})},u=async(h,_,y,v,b,C,j)=>{var E,P;const x=j?{startDateUtc:(E=C==null?void 0:C.deliveryWindow)==null?void 0:E.startDate,endDateUtc:(P=C==null?void 0:C.deliveryWindow)==null?void 0:P.endDate}:null,S={logisticsInfo:Array.from({length:v},(N,A)=>({itemIndex:A,selectedDeliveryChannel:(C==null?void 0:C.deliveryChannel)||null,selectedSla:(C==null?void 0:C.deliveryMethod)||null,deliveryWindow:x})),selectedAddresses:b,clearAddressIfPostalCodeNotFound:!0};return qe("/api/checkout/order-form/shipping",{body:{...S,orderFormId:h,country:y,postalCode:_}})},f=async(h,_,y)=>qe("/api/checkout/order-form/shipping/update",{body:{orderFormId:h,options:_,selectedAddresses:y}}),p=async(h,_,y,v)=>{const b=kc(_,y,v);return qe("/api/checkout/order-form/items/update",{body:{orderFormId:h,orderItems:b}})};return{addCoupon:e,addItem:n,addSellerCode:t,addMarketingData:r,giftItem:o,emptyCart:a,getOrderForm:i,insertProfileEmail:c,removeItem:l,shipping:u,shippingUpdate:f,updateItemQuantity:async(h,_,y,v,b)=>p(h,_,y,v).then(C=>C&&Array.isArray(C.items)?Mc(C.items,y)?p(h,_,y,b):C:!1)}},go="soma::cart",Gr="soma::options",dr=hr.create((e,t)=>{const r=ah(),n=async(o,a,i)=>{e({loading:!0});const c=await Bc(o);if(typeof c!="boolean"){e({...c});const l=await $c(Ct.get(Gr),i);return Ct.set(Gr,l),zc(c,a).finally(()=>e({loading:!1,options:l}))}return st};if(typeof window<"u"){const o=async a=>{if(a){const i=await Ct.get(Gr).then(u=>qc(u,a.items));Ct.set(go,a),Ct.set(Gr,i),e({...a,options:i});const c=new URLSearchParams(window.location.search),l=c.get("utm_campaign")||c.get("utmi_campaign")||"";l&&n(()=>r.addSellerCode(t().id,l.toUpperCase()),"openTextField")}};return Ct.get(go).then(a=>r.getOrderForm(a?a.id:"").then(o)),{...ho,addCoupon:async a=>n(()=>r.addCoupon(t().id,a),"marketingData"),addItem:(a,i)=>{n(()=>r.addItem(t().id,t().items,a),"items",i)},addSellerCode:async(a,i)=>n(()=>r.addSellerCode(t().id,a,i,t().isOpen),"openTextField"),addMarketingData:async a=>n(()=>r.addMarketingData(t().id,a),"marketingData"),emptyCart:()=>{n(()=>r.emptyCart(t().id))},removeItem:async a=>{const i=await n(()=>r.removeItem(t().id,t().items,a),"items");return Fc(a,i)},shipping:async(a,i="BR")=>n(()=>r.shipping(t().id,a??"",i,t().items.length,Gc(a??"",null,i)),"shippingData"),shippingUpdate:async a=>n(()=>{var i;return r.shippingUpdate(t().id,a,(i=t().shippingData)==null?void 0:i.selectedAddresses)},"shippingData"),toggleServiceToProduct:async(a,i,c)=>n(()=>r.giftItem(t().id,a,i,c),"items"),updateItemQuantity:async(a,i,c)=>{const{id:l,items:u}=t();return n(()=>{var f;return r.updateItemQuantity(l,u,a,i,((f=u.find(p=>p.id===a))==null?void 0:f.quantity)??1)},"items",c?[c]:void 0)},insertProfileEmail:async a=>n(()=>r.insertProfileEmail(t().id,a),"clientProfileData"),setIsOpen:a=>e({isOpen:a})}}return ho}),ih=()=>dr(e=>e),Kc=hr.create(e=>({notifications:[],actions:{addNotification:(t,r)=>e(n=>Hc(n,t,r)),removeNotification:t=>e(r=>({notifications:r.notifications.filter(n=>n.id!==t)}))}})),Yo=()=>Kc(e=>e.notifications),Zo=()=>Kc(e=>e.actions),ch=Object.freeze(Object.defineProperty({__proto__:null,KEY_INDEXED_OPTIONS:Gr,KEY_INDEXED_STORE:go,useCartStore:dr,useGetCartStoreState:ih,useGetNotificationActions:Zo,useGetNotificationsStore:Yo},Symbol.toStringTag,{value:"Module"})),lh=6e3,Qc=g.createContext({}),Xc=({children:e,...t})=>{const{items:r}=dr(),[n,o]=g.useState([]),a=g.useRef(null),i=g.useMemo(()=>Array.isArray(n)&&n.length>0?n.map(c=>r.find(l=>l.id===c.id)).filter(c=>c!==void 0):[],[r,n]);return g.useEffect(()=>{n.length&&(clearTimeout(a.current??0),a.current=setTimeout(()=>{o([])},lh))},[n]),s.jsx(Qc.Provider,{value:g.useMemo(()=>({...t,setRecentlyAdded:o,recentlyAddedProducts:i}),[t,o,i]),children:e})},dn=()=>{const e=g.useContext(Qc);if(e===void 0)throw new Error("useUIContext must be used within a UIProvider");return e};class Yc{constructor(){Cn(this,"events",{});Cn(this,"prevData",{})}subscribe(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),()=>{this.events[t]=this.events[t].filter(n=>n!==r)}}publish(t,r){this.events[t]&&this.events[t].forEach(n=>{this.prevData[t]=r,n(r)})}}const Zc=g.createContext({}),uh=({children:e,headerConfigs:t,pathname:r,...n})=>{const[o,a]=g.useState(!0),[i,c]=g.useState(!1),l=r==="/",u=g.useRef(new Yc),f=h=>h?{headerVariant:t.home_default_variant,bannerVariant:t.home_default_variant,position:t.home_default_position}:{headerVariant:t.default_variant,bannerVariant:t.default_variant,position:t.default_position},p=f(l),m=g.useRef(p);return g.useEffect(()=>{var y;const h=((y=new URLSearchParams(window.location.search))==null?void 0:y.toString())??"";(h.includes("utm_")||h.includes("gclid"))&&(fo.get("lastMedias")||fo.set("lastMedias",`${h}`,{expires:1/24}));const _=()=>{const v=typeof(window==null?void 0:window.navigator)>"u"?"":navigator==null?void 0:navigator.userAgent,b=window.innerWidth<1024||!!v.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i);i||c(!0),o!==b&&(a(b),c(!0))};return i||_(),window.addEventListener("resize",_,{passive:!0}),()=>window.removeEventListener("resize",_)},[o,i]),g.useEffect(()=>{const h=f(l);u.current.publish("header:change_variant",h.headerVariant),u.current.publish("header:change_position",h.position),m.current=h},[l]),s.jsx(Zc.Provider,{value:{isMobile:o,mediatorRef:u,currentHeaderConfigsRef:m,deviceValidated:i,...n},children:s.jsx(Xc,{children:e})})},oe=()=>g.useContext(Zc),Jc=g.createContext({}),dh=({children:e,...t})=>s.jsx(Jc.Provider,{value:{...t},children:e}),pe=()=>g.useContext(Jc),_r=(e,t)=>hr.create(r=>{const n=()=>r({value:e});return t&&t instanceof Set&&t.add(n),{value:e,actions:{setValue:o=>r({value:o}),reset:n}}}),en={category:null,menuMobileIsOpen:!1,searchModalIsOpen:!1,userMenuIsOpen:!1},fn=new Set,fh=()=>{fn.forEach(e=>{e()})},el=hr.create((e,t)=>{const r=()=>e({value:en.category});return fn.add(r),{value:en.category,actions:{reset:r,setValue:n=>e(()=>({value:n})),updateValue:n=>{t().value!==n&&e({value:n})}}}}),tl=()=>el(e=>e.value),pn=()=>el(e=>e.actions),rl=_r(en.menuMobileIsOpen,fn),nl=()=>rl(e=>e.value),sl=()=>rl(e=>e.actions),ol=_r(en.searchModalIsOpen,fn),al=()=>ol(e=>e.value),ts=()=>ol(e=>e.actions),il=_r(en.userMenuIsOpen,fn),Jo=()=>il(e=>e.value),ea=()=>il(e=>e.actions),ph=Object.freeze(Object.defineProperty({__proto__:null,resetAllHeaderStores:fh,useActionsHeaderCategory:pn,useActionsMenuMobileIsOpen:sl,useActionsSearchModalIsOpen:ts,useActionsUserMenuIsOpen:ea,useGetHeaderCategoryStore:tl,useGetMenuMobileIsOpen:nl,useGetSearchModalIsOpen:al,useGetUserMenuIsOpen:Jo},Symbol.toStringTag,{value:"Module"})),Ur={selectedSkuInfo:{productId:"",name:"",size:"",sku:"",sellerId:"",sellerName:"",available:!1,quantity:1},openLetMeKnow:!1,openMeasurements:!1,showBottomNavigation:!1,showNotify:!1},$r=new Set,mh=()=>{$r.forEach(e=>{e()})},cl=hr.create(e=>{const t=()=>e({value:Ur.selectedSkuInfo});return $r.add(t),{value:Ur.selectedSkuInfo,actions:{setValue:r=>e(n=>({value:{...n,...r}})),reset:t}}}),mn=()=>cl(e=>e.value),ll=()=>cl(e=>e.actions),ul=_r(Ur.openLetMeKnow,$r),hh=()=>ul(e=>e.value),_h=()=>ul(e=>e.actions),dl=_r(Ur.showNotify,$r),fl=()=>dl(e=>e.value),ta=()=>dl(e=>e.actions),pl=_r(Ur.showBottomNavigation,$r),gh=()=>pl(e=>e.value),yh=()=>pl(e=>e.actions),ml=_r(Ur.openMeasurements,$r),hl=()=>ml(e=>e.value),_l=()=>ml(e=>e.actions),vh=Object.freeze(Object.defineProperty({__proto__:null,resetAllPDPStores:mh,useActionsPDPOpenLetMeKnow:_h,useActionsPDPOpenMeasurements:_l,useActionsPDPSelectedSkuInfo:ll,useActionsPDPShowBottomNavigation:yh,useActionsPDPShowNotify:ta,useGetPDPOpenLetMeKnow:hh,useGetPDPOpenMeasurements:hl,useGetPDPSelectedSkuInfo:mn,useGetPDPShowBottomNavigation:gh,useGetPDPShowNotify:fl},Symbol.toStringTag,{value:"Module"})),Oa={feedback:{active:!1,action:"add"},list:[]},ra=hr.create((e,t)=>({value:Oa,actions:{reset:()=>e({value:Oa}),setValue:n=>e(()=>({value:n})),toggleProduct:n=>e(o=>o.value.list.includes(n)?{value:{feedback:{active:!0,action:"remove"},list:o.value.list.filter(a=>a!==n)}}:{value:{feedback:{active:!0,action:"add"},list:[...o.value.list,n]}}),updateList:n=>e(o=>({value:{...o.value,list:n}})),resetFeedback:()=>e(n=>({value:{...n.value,feedback:{active:!1,action:""}}}))}})),Hr=()=>ra(e=>e.value.list),na=()=>ra(e=>e.value.feedback),gr=()=>ra(e=>e.actions),xh=Object.freeze(Object.defineProperty({__proto__:null,useActionsWishlistStore:gr,useGetWishlistFeedbackStore:na,useGetWishlistStore:Hr},Symbol.toStringTag,{value:"Module"})),gl=g.createContext({}),bh=({children:e,headerData:t,...r})=>{var f,p;const n=g.useRef(null),o=g.useRef(null),a=g.useRef(null),i=g.useRef(null),c=g.useRef(null),{mediatorRef:l,currentHeaderConfigsRef:u}=oe();return(f=l.current)==null||f.subscribe("header:change_variant",m=>{var b,C,j;if(m&&u.current&&(u.current.bannerVariant=m),!n.current)return;const _=document.body.scrollTop>0,y=n.current.getAttribute("data-interactiveVariant"),v=_?y:m??((b=u.current)==null?void 0:b.bannerVariant)??"default";v!==((C=u.current)==null?void 0:C.headerVariant)&&(n.current.setAttribute("data-bottomdivider",String(_)),n.current.setAttribute("data-variant",String(v)),(j=l.current)==null||j.publish("herobanner:change_controllers_variant",v),u.current&&(u.current.headerVariant=v))}),(p=l.current)==null||p.subscribe("header:change_position",m=>{n.current&&(n.current.style.position=m)}),g.useEffect(()=>{const m=new AbortController,h=d.helpers.throttle(()=>{var y;return(y=l.current)==null?void 0:y.publish("header:change_variant",null)},200);document.body.addEventListener("scroll",h,{passive:!0,signal:m.signal});const _=y=>{var b;(b=y.target.closest("a"))==null||b.blur()};return n.current&&(n.current.addEventListener("click",_,{signal:m.signal}),n.current.addEventListener("touchend",_,{signal:m.signal})),()=>{m.abort()}},[]),s.jsx(gl.Provider,{value:{headerData:t,structureRef:o,rootRef:n,tipbarRef:a,userMenuMobileRef:i,userMenuDesktopRef:c,...r},children:e})},Ae=()=>g.useContext(gl),yl=g.createContext({}),vl=({children:e,...t})=>s.jsx(yl.Provider,{value:g.useMemo(()=>t,[t]),children:e}),sa=()=>{const e=g.useContext(yl);if(e===void 0)throw new Error("useMenuMobileContext must be used within a MenuMobileProvider");return e},jh=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},Ch=(e,t,r)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const n=t.getBoundingClientRect(),o=e.getBoundingClientRect(),a=e!=null&&e.parentElement?jh(e==null?void 0:e.parentElement):0;return{left:n.left+n.width/2-(o.width+a),top:n.top+n.height+r}},xl=g.createContext({}),bl=({children:e,delay:t=600,gap:r=20,...n})=>{const[o,a]=g.useState(!1),i=g.useRef(null),[c,l]=g.useState(!1),[u,f]=g.useState({left:0,top:0}),p=g.useCallback(()=>{l(!0),typeof window<"u"&&(i.current=window.setTimeout(()=>{a(!1),l(!1)},t))},[l,a,t]);return g.useEffect(()=>{if(typeof window>"u")return;const m=window.document.querySelector("#cart-button"),h=window.document.querySelector("#add-to-cart--tooltip");if(m&&h){const{left:_,top:y}=Ch(h,m,r??0);f({left:_,top:y}),l(!1)}},[r,o]),s.jsx(xl.Provider,{value:g.useMemo(()=>({...n,...u,handleClose:p,isLeaving:c,isOpen:o,setIsOpen:a,setIsLeaving:l}),[n,u,p,c,o,a,l]),children:e})},yr=()=>{const e=g.useContext(xl);if(e===void 0)throw new Error("useAddToCartContext must be used within a AddToCartProvider");return e},jl=g.createContext({}),Sh=({children:e,SELLER_CODE_VALIDATION_KEYS:t,CARTPROVIDER_MESSAGE_PRODUCT_REMOVE:r,data:n,...o})=>{var ce,me,ae,ue;const a=dr(),{setRecentlyAdded:i}=dn(),c=g.useRef(""),l=Yo(),{addNotification:u,removeNotification:f}=Zo(),[p,m]=g.useState(null),{addCoupon:h,addItem:_,addSellerCode:y,addMarketingData:v,emptyCart:b,isOpen:C,removeItem:j,shipping:x,shippingUpdate:S,toggleServiceToProduct:E,updateItemQuantity:P}=a;g.useEffect(()=>{(async()=>{var T,Q;if(!a.id||!((Q=(T=n==null?void 0:n.promotion)==null?void 0:T.promotionCart)!=null&&Q.idPromotion))return;const te=await fetch("/api/buywin",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({orderFormId:a.id,promotionId:n.promotion.promotionCart.idPromotion,web:(n==null?void 0:n.promotion.promotionCart.versionAPI)==="Original"})}).then(le=>le.json());m(te)})()},[a.id,a.items.length,n==null?void 0:n.versionId,(me=(ce=n==null?void 0:n.promotion)==null?void 0:ce.promotionCart)==null?void 0:me.idPromotion,(ue=(ae=n==null?void 0:n.promotion)==null?void 0:ae.promotionCart)==null?void 0:ue.versionAPI]),g.useEffect(()=>{const z=fo.get("lastMedias");if(a.id&&z&&c.current!==z){c.current=z;const te=new URLSearchParams(z),T=Wc(te);v(T)}},[a,v]);const N=g.useCallback(async(z,te)=>(te==="coupon"?h(z):y(z,t??{})).then(Q=>{if(typeof Q!="boolean"&&Q instanceof Object){if(te==="seller"&&"value"in Q){const{statusOk:le,value:be}=Q,I=String(be??"").split(" - ");return Cr((I==null?void 0:I[0])??"",z,!!le)}return Cr(String(Q.coupon),z,!0)}return Cr("","")}).catch(()=>Promise.resolve({code:400})),[h,y]),A=g.useCallback((z,te,T)=>{const{id:Q}=z;P(Q,te,T)},[P]),R=g.useCallback((z,te,T=!1)=>{if(!z)return;const{id:Q}=z,le=_o(a.items,Q);if(le!==-1&&!T){const be=Number(a.items[le].quantity),I=a.items[le]?be+1:1;A(z,I,te)}else _({id:Q,quantity:(z==null?void 0:z.quantity)??1,seller:z.seller});C||i(be=>[...be,z])},[_,A,a.items,C,i]),O=g.useCallback((z,te)=>{if(!z||!Array.isArray(z))return;i(Q=>[...Q,...z]);const T=z.map(Q=>{const{id:le,quantity:be,seller:I}=Q,L=_o(a.items,le),Le=Uc(be??1,L);return{id:le,quantity:Le,seller:I}});_(T,te)},[_,a.items,i]),D=g.useCallback(async(z,te,T)=>z?j(z).then(()=>(u(te??`${r}`,T),Cr(z,z))):Promise.resolve(Cr("","Product id required")),[u,j]),$=g.useCallback(()=>{a.items.length>0&&b()},[b,a.items]),F=g.useCallback((z,te="BRA")=>x(z,te),[x]),q=g.useCallback(z=>{z&&S(z)},[S]),V=g.useCallback(async(z,te,T=!1)=>{const Q=a.items.findIndex(be=>be.uniqueId===z);return a.items[Q]&&Q>=0?E(te,Q,T):!1},[a.items,E]),J=g.useCallback(async(z,te)=>P(z,te).then(T=>{if(Array.isArray(T)){const Q=T.find(le=>le.id===z);if(Q&&(Q==null?void 0:Q.quantity)<te)return String(Q.quantity)}return!1}),[P]),Z=g.useCallback(async()=>{await v({...a.marketingData,coupon:""})},[v,a.marketingData]),H=g.useCallback(async()=>{await v({...a.marketingData,utmiCampaign:"",utmCampaign:"",utmSource:"",utmMedium:""})},[v,a.marketingData]),ee=g.useCallback(async()=>{await x("","BRA")},[x]);return s.jsx(jl.Provider,{value:g.useMemo(()=>({...o,data:n,addCouponSeller:N,addToCart:R,addItemsToCart:O,cartStore:a,notifications:l,clearCart:$,addNotification:u,isOpen:a.isOpen,removeNotification:f,removeToCart:D,setIsOpen:a.setIsOpen,shipping:F,shippingUpdateOption:q,toggleGiftItemCart:V,updateItemQuantity:J,removeCoupon:Z,removeSellerCode:H,removeCEP:ee,promotionRules:p,setPromotionRules:m}),[o,n,N,R,O,l,$,u,a,f,D,F,q,V,J,Z,H,ee,p,m]),children:e})},Pe=()=>{const e=g.useContext(jl);if(e===void 0)throw new Error("useCartContext must be used within a CartProvider");return e},Cl=g.createContext({}),Eh=({children:e,searchParams:t,PLP_SORT_DEFAULT:r})=>{const{router:n}=pe(),o=g.useCallback((f,p)=>{if(p){if(f.key.toLocaleLowerCase()==="price"){const m=p.getAll("facets");p.delete("facets"),m.forEach(h=>{const[_]=h.split("/");_!==f.key&&p.append("facets",h)})}p.set("page","1"),p.append("facets",`${f.key}/${f.value}`),n.push(`?${p.toString()}`)}},[n]),a=g.useCallback(()=>{const f=new URLSearchParams;f.set("sort",r),f.set("page","1"),n.push(`?${f.toString()}`)},[n]),i=g.useCallback((f,p)=>{if(!p||!p.has&&!p.has("facets"))return;const m=p.getAll("facets");p.delete("facets"),p.set("page","1"),m.forEach(h=>{const[_,y]=h.split("/");(_!==f.key||y!==f.value)&&p.append("facets",h)}),n.push(`?${p.toString()}`)},[n]),c=g.useCallback(f=>{const p=t?new URLSearchParams(t):new URLSearchParams;for(const[,m]of p.entries()){const[h,_]=m.split("/");if(h===f.key&&_===f.value)return i(f,p)}return o(f,p)},[o,i,t]),l=g.useCallback(f=>{const p=t?new URLSearchParams(t):new URLSearchParams;p.set("sort",f.replace("_",":")),n.push(`?${p.toString()}`)},[n,t]),u=g.useMemo(()=>({selectedFacets:[]}),[]);return s.jsx(Cl.Provider,{value:{...u,deleteAllFacets:a,onToggleFacet:c,onSort:l},children:e})},Ph=()=>{const e=g.useContext(Cl);if(e===void 0)throw new Error("useFacetsContext must be used within a FacetsProvider");return e},Sl=g.createContext({}),El=({children:e,fetch:t})=>{const r=g.useRef(!0),[n,o]=g.useState(null),[a,i]=g.useState(!1);return g.useEffect(()=>{(async()=>{r.current=!0;try{const l=await t();if(!l.ok)throw new Error("Failed to fetch data");const u=await l.json();o(u.data),r.current=!1}catch{r.current=!0,i(!0)}})()},[t]),s.jsx(Sl.Provider,{value:g.useMemo(()=>({data:n,isLoading:r.current??!1,isError:a}),[n,a,r]),children:e})},Pl=()=>{const e=g.useContext(Sl);if(e===void 0)throw new Error("useProductsContext must be used within a useRootContext");return e},Wr={placeholder:"Ordernar por",options:{score_desc:"Mais Relevantes",orders_desc:"Mais Vendidos",price_desc:"Maior Preço",price_asc:"Menor Preço",release_desc:"Novidades",discount_desc:"Maior Desconto",name_asc:"De A a Z"}},wl={nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"0",count:0,total:0},wh="Imagem do produto",La=1,Nh="Sair",Ih=e=>e.exit,ka=({ICONS:e,storeConfig:t})=>[{icon:e.person,label:"Minha conta",href:`${t.secureSubdomain}/api/io/account#/profile`,needToBeAuth:!1,deviceShown:"both"},{icon:e.delivery_truck,label:"Meus pedidos",href:`${t.secureSubdomain}/api/io/account#/orders`,needToBeAuth:!1,deviceShown:"both"},{icon:e.favorite_false,label:t.wishlistConfig.label,href:t.wishlistConfig.path,needToBeAuth:!1,deviceShown:"mobile"},{icon:e.help,label:t.termsConfig.label,href:t.termsConfig.path,needToBeAuth:!1,deviceShown:"mobile"}],Rh=(e,t)=>{const r=(t??"").split("@")[0];return e?`Olá${r.length?", ":" "}${r}!`:"Olá!"},Th=e=>"Seja bem vindo!",Ah="Marque a caixa para aceitar os termos de política de privacidade.",Oh="Algumas informações estão incorretas ou não foram preenchidas",Lh="Enviar",Nl=g.createContext({}),oa=({children:e,state:t,collectionId:r,brand:n,searchParams:o})=>{const a=g.useMemo(()=>{var i;return r?[{key:"productclusterids",value:r.toString()}]:n?[{key:"brand",value:n}]:(i=t.base)!=null&&i.length?t.base.slice(1).split("/").map((c,l)=>({key:`category-${l+1}`,value:c})):[]},[t.base,r]);return s.jsx(Nl.Provider,{value:g.useMemo(()=>({state:{...t,facets:[...a,...t.facets??[]]},searchParams:o}),[a,t,o]),children:e})},Be=()=>{const e=g.useContext(Nl);if(e===void 0)throw new Error("useSearchContext must be used within a SearchProvider");return e},Il=g.createContext({}),kh=({children:e})=>{const{data:t,...r}=Pl(),[n,o]=g.useState(0),{sendDataLayerEvent:a}=ie();return g.useEffect(()=>{if(t&&"pagination"in t&&t.products.length>0){a({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:t.products}}});const i=t.pagination.count;i&&Number.isInteger(i)&&o(i)}},[t,a,o]),s.jsx(Il.Provider,{value:g.useMemo(()=>({...r,products:t&&"products"in t?t==null?void 0:t.products:[],pagination:t&&"pagination"in t?t==null?void 0:t.pagination:wl,total:n}),[t,r,n]),children:e})},Dh=({children:e,query:t,forceUpdate:r})=>{const{state:n}=Be();return s.jsx(El,{fetch:()=>fetch("/api/search/product",{method:"POST",body:JSON.stringify({...n,query:t,forceUpdate:r,facets:n.facets??[]})}),children:s.jsx(kh,{children:e})})},Mh=()=>{const e=g.useContext(Il);if(e===void 0)throw new Error("useProductsContext must be used within a ProductsProvider");return e};var hn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Fh={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},vt,Jt,cc,zh=(cc=class{constructor(){re(this,vt,Fh);re(this,Jt,!1)}setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&w(this,Jt)&&e!==w(this,vt)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:w(this,vt),provider:e}),K(this,vt,e),process.env.NODE_ENV!=="production"&&K(this,Jt,!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&K(this,Jt,!0),w(this,vt).setTimeout(e,t)}clearTimeout(e){w(this,vt).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&K(this,Jt,!0),w(this,vt).setInterval(e,t)}clearInterval(e){w(this,vt).clearInterval(e)}},vt=new WeakMap,Jt=new WeakMap,cc),Zt=new zh;function Bh(e){setTimeout(e,0)}var fr=typeof window>"u"||"Deno"in globalThis;function Qe(){}function Uh(e,t){return typeof e=="function"?e(t):e}function yo(e){return typeof e=="number"&&e>=0&&e!==1/0}function Rl(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Wt(e,t){return typeof e=="function"?e(t):e}function at(e,t){return typeof e=="function"?e(t):e}function Da(e,t){const{type:r="all",exact:n,fetchStatus:o,predicate:a,queryKey:i,stale:c}=e;if(i){if(n){if(t.queryHash!==aa(i,t.options))return!1}else if(!rn(t.queryKey,i))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||o&&o!==t.state.fetchStatus||a&&!a(t))}function Ma(e,t){const{exact:r,status:n,predicate:o,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(tn(t.options.mutationKey)!==tn(a))return!1}else if(!rn(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||o&&!o(t))}function aa(e,t){return((t==null?void 0:t.queryKeyHashFn)||tn)(e)}function tn(e){return JSON.stringify(e,(t,r)=>bo(r)?Object.keys(r).sort().reduce((n,o)=>(n[o]=r[o],n),{}):r)}function rn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>rn(e[r],t[r])):!1}var qh=Object.prototype.hasOwnProperty;function vo(e,t){if(e===t)return e;const r=Fa(e)&&Fa(t);if(!r&&!(bo(e)&&bo(t)))return t;const o=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),i=a.length,c=r?new Array(i):{};let l=0;for(let u=0;u<i;u++){const f=r?u:a[u],p=e[f],m=t[f];if(p===m){c[f]=p,(r?u<o:qh.call(e,f))&&l++;continue}if(p===null||m===null||typeof p!="object"||typeof m!="object"){c[f]=m;continue}const h=vo(p,m);c[f]=h,h===p&&l++}return o===i&&l===o?e:c}function xo(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function Fa(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function bo(e){if(!za(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!za(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function za(e){return Object.prototype.toString.call(e)==="[object Object]"}function $h(e){return new Promise(t=>{Zt.setTimeout(t,e)})}function jo(e,t,r){if(typeof r.structuralSharing=="function")return r.structuralSharing(e,t);if(r.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return vo(e,t)}catch(n){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${n}`),n}return vo(e,t)}return t}function Hh(e){return e}function Vh(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Wh(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Wn=Symbol();function Tl(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Wn&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Wn?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Al(e,t){return typeof e=="function"?e(...t):!!e}function Gh(e,t,r){let n=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),n||(n=!0,o.aborted?r():o.addEventListener("abort",r,{once:!0})),o)}),e}var er,zt,Ir,lc,Kh=(lc=class extends hn{constructor(){super();re(this,er);re(this,zt);re(this,Ir);K(this,Ir,t=>{if(!fr&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){w(this,zt)||this.setEventListener(w(this,Ir))}onUnsubscribe(){var t;this.hasListeners()||((t=w(this,zt))==null||t.call(this),K(this,zt,void 0))}setEventListener(t){var r;K(this,Ir,t),(r=w(this,zt))==null||r.call(this),K(this,zt,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){w(this,er)!==t&&(K(this,er,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof w(this,er)=="boolean"?w(this,er):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},er=new WeakMap,zt=new WeakMap,Ir=new WeakMap,lc),ia=new Kh;function Co(){let e,t;const r=new Promise((o,a)=>{e=o,t=a});r.status="pending",r.catch(()=>{});function n(o){Object.assign(r,o),delete r.resolve,delete r.reject}return r.resolve=o=>{n({status:"fulfilled",value:o}),e(o)},r.reject=o=>{n({status:"rejected",reason:o}),t(o)},r}var Qh=Bh;function Xh(){let e=[],t=0,r=c=>{c()},n=c=>{c()},o=Qh;const a=c=>{t?e.push(c):o(()=>{r(c)})},i=()=>{const c=e;e=[],c.length&&o(()=>{n(()=>{c.forEach(l=>{r(l)})})})};return{batch:c=>{let l;t++;try{l=c()}finally{t--,t||i()}return l},batchCalls:c=>(...l)=>{a(()=>{c(...l)})},schedule:a,setNotifyFunction:c=>{r=c},setBatchNotifyFunction:c=>{n=c},setScheduler:c=>{o=c}}}var Fe=Xh(),Rr,Bt,Tr,uc,Yh=(uc=class extends hn{constructor(){super();re(this,Rr,!0);re(this,Bt);re(this,Tr);K(this,Tr,t=>{if(!fr&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){w(this,Bt)||this.setEventListener(w(this,Tr))}onUnsubscribe(){var t;this.hasListeners()||((t=w(this,Bt))==null||t.call(this),K(this,Bt,void 0))}setEventListener(t){var r;K(this,Tr,t),(r=w(this,Bt))==null||r.call(this),K(this,Bt,t(this.setOnline.bind(this)))}setOnline(t){w(this,Rr)!==t&&(K(this,Rr,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return w(this,Rr)}},Rr=new WeakMap,Bt=new WeakMap,Tr=new WeakMap,uc),Gn=new Yh;function Zh(e){return Math.min(1e3*2**e,3e4)}function Ol(e){return(e??"online")==="online"?Gn.isOnline():!0}var So=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ll(e){let t=!1,r=0,n;const o=Co(),a=()=>o.status!=="pending",i=y=>{var v;if(!a()){const b=new So(y);m(b),(v=e.onCancel)==null||v.call(e,b)}},c=()=>{t=!0},l=()=>{t=!1},u=()=>ia.isFocused()&&(e.networkMode==="always"||Gn.isOnline())&&e.canRun(),f=()=>Ol(e.networkMode)&&e.canRun(),p=y=>{a()||(n==null||n(),o.resolve(y))},m=y=>{a()||(n==null||n(),o.reject(y))},h=()=>new Promise(y=>{var v;n=b=>{(a()||u())&&y(b)},(v=e.onPause)==null||v.call(e)}).then(()=>{var y;n=void 0,a()||(y=e.onContinue)==null||y.call(e)}),_=()=>{if(a())return;let y;const v=r===0?e.initialPromise:void 0;try{y=v??e.fn()}catch(b){y=Promise.reject(b)}Promise.resolve(y).then(p).catch(b=>{var E;if(a())return;const C=e.retry??(fr?0:3),j=e.retryDelay??Zh,x=typeof j=="function"?j(r,b):j,S=C===!0||typeof C=="number"&&r<C||typeof C=="function"&&C(r,b);if(t||!S){m(b);return}r++,(E=e.onFail)==null||E.call(e,r,b),$h(x).then(()=>u()?void 0:h()).then(()=>{t?m(b):_()})})};return{promise:o,status:()=>o.status,cancel:i,continue:()=>(n==null||n(),o),cancelRetry:c,continueRetry:l,canStart:f,start:()=>(f()?_():h().then(_),o)}}var tr,dc,kl=(dc=class{constructor(){re(this,tr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),yo(this.gcTime)&&K(this,tr,Zt.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(fr?1/0:5*60*1e3))}clearGcTimeout(){w(this,tr)&&(Zt.clearTimeout(w(this,tr)),K(this,tr,void 0))}},tr=new WeakMap,dc),rr,Ar,ot,nr,ke,on,sr,mt,It,fc,Jh=(fc=class extends kl{constructor(t){super();re(this,mt);re(this,rr);re(this,Ar);re(this,ot);re(this,nr);re(this,ke);re(this,on);re(this,sr);K(this,sr,!1),K(this,on,t.defaultOptions),this.setOptions(t.options),this.observers=[],K(this,nr,t.client),K(this,ot,w(this,nr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,K(this,rr,Ua(this.options)),this.state=t.state??w(this,rr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=w(this,ke))==null?void 0:t.promise}setOptions(t){if(this.options={...w(this,on),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=Ua(this.options);r.data!==void 0&&(this.setState(Ba(r.data,r.dataUpdatedAt)),K(this,rr,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&w(this,ot).remove(this)}setData(t,r){const n=jo(this.state.data,t,this.options);return de(this,mt,It).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){de(this,mt,It).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,o;const r=(n=w(this,ke))==null?void 0:n.promise;return(o=w(this,ke))==null||o.cancel(t),r?r.then(Qe).catch(Qe):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(w(this,rr))}isActive(){return this.observers.some(t=>at(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Wn||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Wt(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Rl(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=w(this,ke))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=w(this,ke))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),w(this,ot).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(w(this,ke)&&(w(this,sr)?w(this,ke).cancel({revert:!0}):w(this,ke).cancelRetry()),this.scheduleGc()),w(this,ot).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||de(this,mt,It).call(this,{type:"invalidate"})}async fetch(t,r){var l,u,f,p,m,h,_,y,v,b,C,j;if(this.state.fetchStatus!=="idle"&&((l=w(this,ke))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(w(this,ke))return w(this,ke).continueRetry(),w(this,ke).promise}if(t&&this.setOptions(t),!this.options.queryFn){const x=this.observers.find(S=>S.options.queryFn);x&&this.setOptions(x.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,o=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(K(this,sr,!0),n.signal)})},a=()=>{const x=Tl(this.options,r),E=(()=>{const P={client:w(this,nr),queryKey:this.queryKey,meta:this.meta};return o(P),P})();return K(this,sr,!1),this.options.persister?this.options.persister(x,E,this):x(E)},c=(()=>{const x={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:w(this,nr),state:this.state,fetchFn:a};return o(x),x})();(u=this.options.behavior)==null||u.onFetch(c,this),K(this,Ar,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=c.fetchOptions)==null?void 0:f.meta))&&de(this,mt,It).call(this,{type:"fetch",meta:(p=c.fetchOptions)==null?void 0:p.meta}),K(this,ke,Ll({initialPromise:r==null?void 0:r.initialPromise,fn:c.fetchFn,onCancel:x=>{x instanceof So&&x.revert&&this.setState({...w(this,Ar),fetchStatus:"idle"}),n.abort()},onFail:(x,S)=>{de(this,mt,It).call(this,{type:"failed",failureCount:x,error:S})},onPause:()=>{de(this,mt,It).call(this,{type:"pause"})},onContinue:()=>{de(this,mt,It).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const x=await w(this,ke).start();if(x===void 0)throw process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(x),(h=(m=w(this,ot).config).onSuccess)==null||h.call(m,x,this),(y=(_=w(this,ot).config).onSettled)==null||y.call(_,x,this.state.error,this),x}catch(x){if(x instanceof So){if(x.silent)return w(this,ke).promise;if(x.revert){if(this.state.data===void 0)throw x;return this.state.data}}throw de(this,mt,It).call(this,{type:"error",error:x}),(b=(v=w(this,ot).config).onError)==null||b.call(v,x,this),(j=(C=w(this,ot).config).onSettled)==null||j.call(C,this.state.data,x,this),x}finally{this.scheduleGc()}}},rr=new WeakMap,Ar=new WeakMap,ot=new WeakMap,nr=new WeakMap,ke=new WeakMap,on=new WeakMap,sr=new WeakMap,mt=new WeakSet,It=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Dl(n.data,this.options),fetchMeta:t.meta??null};case"success":const o={...n,...Ba(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return K(this,Ar,t.manual?o:void 0),o;case"error":const a=t.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Fe.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),w(this,ot).notify({query:this,type:"updated",action:t})})},fc);function Dl(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ol(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ba(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ua(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Ge,fe,an,$e,or,Or,Rt,Ut,cn,Lr,kr,ar,ir,qt,Dr,ve,Kr,Eo,Po,wo,No,Io,Ro,To,Ml,pc,e_=(pc=class extends hn{constructor(t,r){super();re(this,ve);re(this,Ge);re(this,fe);re(this,an);re(this,$e);re(this,or);re(this,Or);re(this,Rt);re(this,Ut);re(this,cn);re(this,Lr);re(this,kr);re(this,ar);re(this,ir);re(this,qt);re(this,Dr,new Set);this.options=r,K(this,Ge,t),K(this,Ut,null),K(this,Rt,Co()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(w(this,fe).addObserver(this),qa(w(this,fe),this.options)?de(this,ve,Kr).call(this):this.updateResult(),de(this,ve,No).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ao(w(this,fe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ao(w(this,fe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,de(this,ve,Io).call(this),de(this,ve,Ro).call(this),w(this,fe).removeObserver(this)}setOptions(t){const r=this.options,n=w(this,fe);if(this.options=w(this,Ge).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof at(this.options.enabled,w(this,fe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");de(this,ve,To).call(this),w(this,fe).setOptions(this.options),r._defaulted&&!xo(this.options,r)&&w(this,Ge).getQueryCache().notify({type:"observerOptionsUpdated",query:w(this,fe),observer:this});const o=this.hasListeners();o&&$a(w(this,fe),n,this.options,r)&&de(this,ve,Kr).call(this),this.updateResult(),o&&(w(this,fe)!==n||at(this.options.enabled,w(this,fe))!==at(r.enabled,w(this,fe))||Wt(this.options.staleTime,w(this,fe))!==Wt(r.staleTime,w(this,fe)))&&de(this,ve,Eo).call(this);const a=de(this,ve,Po).call(this);o&&(w(this,fe)!==n||at(this.options.enabled,w(this,fe))!==at(r.enabled,w(this,fe))||a!==w(this,qt))&&de(this,ve,wo).call(this,a)}getOptimisticResult(t){const r=w(this,Ge).getQueryCache().build(w(this,Ge),t),n=this.createResult(r,t);return r_(this,n)&&(K(this,$e,n),K(this,Or,this.options),K(this,or,w(this,fe).state)),n}getCurrentResult(){return w(this,$e)}trackResult(t,r){return new Proxy(t,{get:(n,o)=>(this.trackProp(o),r==null||r(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&w(this,Rt).status==="pending"&&w(this,Rt).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,o))})}trackProp(t){w(this,Dr).add(t)}getCurrentQuery(){return w(this,fe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=w(this,Ge).defaultQueryOptions(t),n=w(this,Ge).getQueryCache().build(w(this,Ge),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return de(this,ve,Kr).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),w(this,$e)))}createResult(t,r){var A;const n=w(this,fe),o=this.options,a=w(this,$e),i=w(this,or),c=w(this,Or),u=t!==n?t.state:w(this,an),{state:f}=t;let p={...f},m=!1,h;if(r._optimisticResults){const R=this.hasListeners(),O=!R&&qa(t,r),D=R&&$a(t,n,r,o);(O||D)&&(p={...p,...Dl(f.data,t.options)}),r._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:_,errorUpdatedAt:y,status:v}=p;h=p.data;let b=!1;if(r.placeholderData!==void 0&&h===void 0&&v==="pending"){let R;a!=null&&a.isPlaceholderData&&r.placeholderData===(c==null?void 0:c.placeholderData)?(R=a.data,b=!0):R=typeof r.placeholderData=="function"?r.placeholderData((A=w(this,kr))==null?void 0:A.state.data,w(this,kr)):r.placeholderData,R!==void 0&&(v="success",h=jo(a==null?void 0:a.data,R,r),m=!0)}if(r.select&&h!==void 0&&!b)if(a&&h===(i==null?void 0:i.data)&&r.select===w(this,cn))h=w(this,Lr);else try{K(this,cn,r.select),h=r.select(h),h=jo(a==null?void 0:a.data,h,r),K(this,Lr,h),K(this,Ut,null)}catch(R){K(this,Ut,R)}w(this,Ut)&&(_=w(this,Ut),h=w(this,Lr),y=Date.now(),v="error");const C=p.fetchStatus==="fetching",j=v==="pending",x=v==="error",S=j&&C,E=h!==void 0,N={status:v,fetchStatus:p.fetchStatus,isPending:j,isSuccess:v==="success",isError:x,isInitialLoading:S,isLoading:S,data:h,dataUpdatedAt:p.dataUpdatedAt,error:_,errorUpdatedAt:y,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>u.dataUpdateCount||p.errorUpdateCount>u.errorUpdateCount,isFetching:C,isRefetching:C&&!j,isLoadingError:x&&!E,isPaused:p.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:x&&E,isStale:ca(t,r),refetch:this.refetch,promise:w(this,Rt),isEnabled:at(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const R=$=>{N.status==="error"?$.reject(N.error):N.data!==void 0&&$.resolve(N.data)},O=()=>{const $=K(this,Rt,N.promise=Co());R($)},D=w(this,Rt);switch(D.status){case"pending":t.queryHash===n.queryHash&&R(D);break;case"fulfilled":(N.status==="error"||N.data!==D.value)&&O();break;case"rejected":(N.status!=="error"||N.error!==D.reason)&&O();break}}return N}updateResult(){const t=w(this,$e),r=this.createResult(w(this,fe),this.options);if(K(this,or,w(this,fe).state),K(this,Or,this.options),w(this,or).data!==void 0&&K(this,kr,w(this,fe)),xo(r,t))return;K(this,$e,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!w(this,Dr).size)return!0;const i=new Set(a??w(this,Dr));return this.options.throwOnError&&i.add("error"),Object.keys(w(this,$e)).some(c=>{const l=c;return w(this,$e)[l]!==t[l]&&i.has(l)})};de(this,ve,Ml).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&de(this,ve,No).call(this)}},Ge=new WeakMap,fe=new WeakMap,an=new WeakMap,$e=new WeakMap,or=new WeakMap,Or=new WeakMap,Rt=new WeakMap,Ut=new WeakMap,cn=new WeakMap,Lr=new WeakMap,kr=new WeakMap,ar=new WeakMap,ir=new WeakMap,qt=new WeakMap,Dr=new WeakMap,ve=new WeakSet,Kr=function(t){de(this,ve,To).call(this);let r=w(this,fe).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Qe)),r},Eo=function(){de(this,ve,Io).call(this);const t=Wt(this.options.staleTime,w(this,fe));if(fr||w(this,$e).isStale||!yo(t))return;const n=Rl(w(this,$e).dataUpdatedAt,t)+1;K(this,ar,Zt.setTimeout(()=>{w(this,$e).isStale||this.updateResult()},n))},Po=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(w(this,fe)):this.options.refetchInterval)??!1},wo=function(t){de(this,ve,Ro).call(this),K(this,qt,t),!(fr||at(this.options.enabled,w(this,fe))===!1||!yo(w(this,qt))||w(this,qt)===0)&&K(this,ir,Zt.setInterval(()=>{(this.options.refetchIntervalInBackground||ia.isFocused())&&de(this,ve,Kr).call(this)},w(this,qt)))},No=function(){de(this,ve,Eo).call(this),de(this,ve,wo).call(this,de(this,ve,Po).call(this))},Io=function(){w(this,ar)&&(Zt.clearTimeout(w(this,ar)),K(this,ar,void 0))},Ro=function(){w(this,ir)&&(Zt.clearInterval(w(this,ir)),K(this,ir,void 0))},To=function(){const t=w(this,Ge).getQueryCache().build(w(this,Ge),this.options);if(t===w(this,fe))return;const r=w(this,fe);K(this,fe,t),K(this,an,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},Ml=function(t){Fe.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(w(this,$e))}),w(this,Ge).getQueryCache().notify({query:w(this,fe),type:"observerResultsUpdated"})})},pc);function t_(e,t){return at(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function qa(e,t){return t_(e,t)||e.state.data!==void 0&&Ao(e,t,t.refetchOnMount)}function Ao(e,t,r){if(at(t.enabled,e)!==!1&&Wt(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&ca(e,t)}return!1}function $a(e,t,r,n){return(e!==t||at(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&ca(e,r)}function ca(e,t){return at(t.enabled,e)!==!1&&e.isStaleByTime(Wt(t.staleTime,e))}function r_(e,t){return!xo(e.getCurrentResult(),t)}function Ha(e){return{onFetch:(t,r)=>{var f,p,m,h,_;const n=t.options,o=(m=(p=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:p.fetchMore)==null?void 0:m.direction,a=((h=t.state.data)==null?void 0:h.pages)||[],i=((_=t.state.data)==null?void 0:_.pageParams)||[];let c={pages:[],pageParams:[]},l=0;const u=async()=>{let y=!1;const v=j=>{Gh(j,()=>t.signal,()=>y=!0)},b=Tl(t.options,t.fetchOptions),C=async(j,x,S)=>{if(y)return Promise.reject();if(x==null&&j.pages.length)return Promise.resolve(j);const P=(()=>{const O={client:t.client,queryKey:t.queryKey,pageParam:x,direction:S?"backward":"forward",meta:t.options.meta};return v(O),O})(),N=await b(P),{maxPages:A}=t.options,R=S?Wh:Vh;return{pages:R(j.pages,N,A),pageParams:R(j.pageParams,x,A)}};if(o&&a.length){const j=o==="backward",x=j?n_:Va,S={pages:a,pageParams:i},E=x(n,S);c=await C(S,E,j)}else{const j=e??a.length;do{const x=l===0?i[0]??n.initialPageParam:Va(n,c);if(l>0&&x==null)break;c=await C(c,x),l++}while(l<j)}return c};t.options.persister?t.fetchFn=()=>{var y,v;return(v=(y=t.options).persister)==null?void 0:v.call(y,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function Va(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function n_(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var ln,xt,He,cr,bt,kt,mc,s_=(mc=class extends kl{constructor(t){super();re(this,bt);re(this,ln);re(this,xt);re(this,He);re(this,cr);K(this,ln,t.client),this.mutationId=t.mutationId,K(this,He,t.mutationCache),K(this,xt,[]),this.state=t.state||o_(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){w(this,xt).includes(t)||(w(this,xt).push(t),this.clearGcTimeout(),w(this,He).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){K(this,xt,w(this,xt).filter(r=>r!==t)),this.scheduleGc(),w(this,He).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){w(this,xt).length||(this.state.status==="pending"?this.scheduleGc():w(this,He).remove(this))}continue(){var t;return((t=w(this,cr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,c,l,u,f,p,m,h,_,y,v,b,C,j,x,S,E,P,N,A;const r=()=>{de(this,bt,kt).call(this,{type:"continue"})},n={client:w(this,ln),meta:this.options.meta,mutationKey:this.options.mutationKey};K(this,cr,Ll({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(R,O)=>{de(this,bt,kt).call(this,{type:"failed",failureCount:R,error:O})},onPause:()=>{de(this,bt,kt).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>w(this,He).canRun(this)}));const o=this.state.status==="pending",a=!w(this,cr).canStart();try{if(o)r();else{de(this,bt,kt).call(this,{type:"pending",variables:t,isPaused:a}),await((c=(i=w(this,He).config).onMutate)==null?void 0:c.call(i,t,this,n));const O=await((u=(l=this.options).onMutate)==null?void 0:u.call(l,t,n));O!==this.state.context&&de(this,bt,kt).call(this,{type:"pending",context:O,variables:t,isPaused:a})}const R=await w(this,cr).start();return await((p=(f=w(this,He).config).onSuccess)==null?void 0:p.call(f,R,t,this.state.context,this,n)),await((h=(m=this.options).onSuccess)==null?void 0:h.call(m,R,t,this.state.context,n)),await((y=(_=w(this,He).config).onSettled)==null?void 0:y.call(_,R,null,this.state.variables,this.state.context,this,n)),await((b=(v=this.options).onSettled)==null?void 0:b.call(v,R,null,t,this.state.context,n)),de(this,bt,kt).call(this,{type:"success",data:R}),R}catch(R){try{await((j=(C=w(this,He).config).onError)==null?void 0:j.call(C,R,t,this.state.context,this,n))}catch(O){Promise.reject(O)}try{await((S=(x=this.options).onError)==null?void 0:S.call(x,R,t,this.state.context,n))}catch(O){Promise.reject(O)}try{await((P=(E=w(this,He).config).onSettled)==null?void 0:P.call(E,void 0,R,this.state.variables,this.state.context,this,n))}catch(O){Promise.reject(O)}try{await((A=(N=this.options).onSettled)==null?void 0:A.call(N,void 0,R,t,this.state.context,n))}catch(O){Promise.reject(O)}throw de(this,bt,kt).call(this,{type:"error",error:R}),R}finally{w(this,He).runNext(this)}}},ln=new WeakMap,xt=new WeakMap,He=new WeakMap,cr=new WeakMap,bt=new WeakSet,kt=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Fe.batch(()=>{w(this,xt).forEach(n=>{n.onMutationUpdate(t)}),w(this,He).notify({mutation:this,type:"updated",action:t})})},mc);function o_(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Tt,ht,un,hc,a_=(hc=class extends hn{constructor(t={}){super();re(this,Tt);re(this,ht);re(this,un);this.config=t,K(this,Tt,new Set),K(this,ht,new Map),K(this,un,0)}build(t,r,n){const o=new s_({client:t,mutationCache:this,mutationId:++Sn(this,un)._,options:t.defaultMutationOptions(r),state:n});return this.add(o),o}add(t){w(this,Tt).add(t);const r=Pn(t);if(typeof r=="string"){const n=w(this,ht).get(r);n?n.push(t):w(this,ht).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(w(this,Tt).delete(t)){const r=Pn(t);if(typeof r=="string"){const n=w(this,ht).get(r);if(n)if(n.length>1){const o=n.indexOf(t);o!==-1&&n.splice(o,1)}else n[0]===t&&w(this,ht).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Pn(t);if(typeof r=="string"){const n=w(this,ht).get(r),o=n==null?void 0:n.find(a=>a.state.status==="pending");return!o||o===t}else return!0}runNext(t){var n;const r=Pn(t);if(typeof r=="string"){const o=(n=w(this,ht).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Fe.batch(()=>{w(this,Tt).forEach(t=>{this.notify({type:"removed",mutation:t})}),w(this,Tt).clear(),w(this,ht).clear()})}getAll(){return Array.from(w(this,Tt))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Ma(r,n))}findAll(t={}){return this.getAll().filter(r=>Ma(t,r))}notify(t){Fe.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Fe.batch(()=>Promise.all(t.map(r=>r.continue().catch(Qe))))}},Tt=new WeakMap,ht=new WeakMap,un=new WeakMap,hc);function Pn(e){var t;return(t=e.options.scope)==null?void 0:t.id}var jt,_c,i_=(_c=class extends hn{constructor(t={}){super();re(this,jt);this.config=t,K(this,jt,new Map)}build(t,r,n){const o=r.queryKey,a=r.queryHash??aa(o,r);let i=this.get(a);return i||(i=new Jh({client:t,queryKey:o,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(o)}),this.add(i)),i}add(t){w(this,jt).has(t.queryHash)||(w(this,jt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=w(this,jt).get(t.queryHash);r&&(t.destroy(),r===t&&w(this,jt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Fe.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return w(this,jt).get(t)}getAll(){return[...w(this,jt).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Da(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Da(t,n)):r}notify(t){Fe.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Fe.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Fe.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},jt=new WeakMap,_c),Ie,$t,Ht,Mr,Fr,Vt,zr,Br,gc,Fl=(gc=class{constructor(e={}){re(this,Ie);re(this,$t);re(this,Ht);re(this,Mr);re(this,Fr);re(this,Vt);re(this,zr);re(this,Br);K(this,Ie,e.queryCache||new i_),K(this,$t,e.mutationCache||new a_),K(this,Ht,e.defaultOptions||{}),K(this,Mr,new Map),K(this,Fr,new Map),K(this,Vt,0)}mount(){Sn(this,Vt)._++,w(this,Vt)===1&&(K(this,zr,ia.subscribe(async e=>{e&&(await this.resumePausedMutations(),w(this,Ie).onFocus())})),K(this,Br,Gn.subscribe(async e=>{e&&(await this.resumePausedMutations(),w(this,Ie).onOnline())})))}unmount(){var e,t;Sn(this,Vt)._--,w(this,Vt)===0&&((e=w(this,zr))==null||e.call(this),K(this,zr,void 0),(t=w(this,Br))==null||t.call(this),K(this,Br,void 0))}isFetching(e){return w(this,Ie).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return w(this,$t).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=w(this,Ie).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=w(this,Ie).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Wt(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return w(this,Ie).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),o=w(this,Ie).get(n.queryHash),a=o==null?void 0:o.state.data,i=Uh(t,a);if(i!==void 0)return w(this,Ie).build(this,n).setData(i,{...r,manual:!0})}setQueriesData(e,t,r){return Fe.batch(()=>w(this,Ie).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=w(this,Ie).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=w(this,Ie);Fe.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=w(this,Ie);return Fe.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Fe.batch(()=>w(this,Ie).findAll(e).map(o=>o.cancel(r)));return Promise.all(n).then(Qe).catch(Qe)}invalidateQueries(e,t={}){return Fe.batch(()=>(w(this,Ie).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Fe.batch(()=>w(this,Ie).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let a=o.fetch(void 0,r);return r.throwOnError||(a=a.catch(Qe)),o.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(Qe)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=w(this,Ie).build(this,t);return r.isStaleByTime(Wt(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Qe).catch(Qe)}fetchInfiniteQuery(e){return e.behavior=Ha(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Qe).catch(Qe)}ensureInfiniteQueryData(e){return e.behavior=Ha(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Gn.isOnline()?w(this,$t).resumePausedMutations():Promise.resolve()}getQueryCache(){return w(this,Ie)}getMutationCache(){return w(this,$t)}getDefaultOptions(){return w(this,Ht)}setDefaultOptions(e){K(this,Ht,e)}setQueryDefaults(e,t){w(this,Mr).set(tn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...w(this,Mr).values()],r={};return t.forEach(n=>{rn(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){w(this,Fr).set(tn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...w(this,Fr).values()],r={};return t.forEach(n=>{rn(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...w(this,Ht).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=aa(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Wn&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...w(this,Ht).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){w(this,Ie).clear(),w(this,$t).clear()}},Ie=new WeakMap,$t=new WeakMap,Ht=new WeakMap,Mr=new WeakMap,Fr=new WeakMap,Vt=new WeakMap,zr=new WeakMap,Br=new WeakMap,gc),zl=it.createContext(void 0),c_=e=>{const t=it.useContext(zl);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Bl=({client:e,children:t})=>(it.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),s.jsx(zl.Provider,{value:e,children:t})),Ul=it.createContext(!1),l_=()=>it.useContext(Ul);Ul.Provider;function u_(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var d_=it.createContext(u_()),f_=()=>it.useContext(d_),p_=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?Al(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},m_=e=>{it.useEffect(()=>{e.clearReset()},[e])},h_=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(o&&e.data===void 0||Al(r,[e.error,n])),__=e=>{if(e.suspense){const r=o=>o==="static"?o:Math.max(o??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...o)=>r(n(...o)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},g_=(e,t)=>e.isLoading&&e.isFetching&&!t,y_=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Wa=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function v_(e,t,r){var m,h,_,y;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const n=l_(),o=f_(),a=c_(),i=a.defaultQueryOptions(e);(h=(m=a.getDefaultOptions().queries)==null?void 0:m._experimental_beforeQuery)==null||h.call(m,i);const c=a.getQueryCache().get(i.queryHash);process.env.NODE_ENV!=="production"&&(i.queryFn||console.error(`[${i.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),i._optimisticResults=n?"isRestoring":"optimistic",__(i),p_(i,o,c),m_(o);const l=!a.getQueryCache().get(i.queryHash),[u]=it.useState(()=>new t(a,i)),f=u.getOptimisticResult(i),p=!n&&e.subscribed!==!1;if(it.useSyncExternalStore(it.useCallback(v=>{const b=p?u.subscribe(Fe.batchCalls(v)):Qe;return u.updateResult(),b},[u,p]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),it.useEffect(()=>{u.setOptions(i)},[i,u]),y_(i,f))throw Wa(i,u,o);if(h_({result:f,errorResetBoundary:o,throwOnError:i.throwOnError,query:c,suspense:i.suspense}))throw f.error;if((y=(_=a.getDefaultOptions().queries)==null?void 0:_._experimental_afterQuery)==null||y.call(_,i,f),i.experimental_prefetchInRender&&!fr&&g_(f,n)){const v=l?Wa(i,u,o):c==null?void 0:c.promise;v==null||v.catch(Qe).finally(()=>{u.updateResult()})}return i.notifyOnChangeProps?f:u.trackResult(f)}function x_(e,t){return v_(e,e_)}const b_=new Fl,ql=g.createContext({}),j_=({brand:e,constants:t,collectionId:r,children:n,itemsPerPage:o=24,pathname:a,searchParams:i,slug:c,...l})=>{const{PLP_SORT_DEFAULT:u}=t,f=g.useRef(""),[p,m]=g.useState(!1),h=(i==null?void 0:i.toString())??"",_=g.useMemo(()=>{const y=new URLSearchParams(h),v=y.get("query"),b=Number(y.get("page")??1),C=Number(y.get("count")??o),j=y.get("sort"),x=y.getAll("facets"),S=j??(r?"":u);return{base:v?"":a,count:C,facets:k.selectedFacets(x),page:b,sort:S,term:v??null}},[h,a,o,r,u]);return g.useEffect(()=>{f.current!==a&&(f.current=a,window.document.body.scrollTo(0,0))},[a]),s.jsx(ql.Provider,{value:g.useMemo(()=>({...l,constants:t,openFilters:p,setOpenFilters:m}),[t,p,l]),children:s.jsx(Bl,{client:b_,children:s.jsx(oa,{brand:e,collectionId:r,state:_,searchParams:i??new URLSearchParams,children:n})})})},nt=()=>{const e=g.useContext(ql);if(e===void 0)throw new Error("usePLPContext must be used within a PLPProvider");return e},Kn=(e,t)=>{if(e===t)return!0;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:e.every((o,a)=>Kn(o,t[a]));if(Array.isArray(t))return!1;const r=Object.keys(e),n=Object.keys(t);return r.length!==n.length?!1:r.every(o=>Object.prototype.hasOwnProperty.call(t,o)&&Kn(e[o],t[o]))},C_=(e,t,r="page")=>Object.keys(t).some(n=>n===r?!1:!Kn(t[n],e[n])),Oo=async e=>{const t=await fetch("/api/search/product",{method:"POST",body:JSON.stringify(e),priority:"high"});if(!t.ok)throw new Error("[FAILED TO FETCH DATA]");const r=await t.json();return r==null?void 0:r.data},$l=()=>({node:{sku:"",gtin:"",name:"...",description:"",releaseDate:"",slug:"",video:null,categories:[],categoryId:"",categoriesIds:[],id:"skeleton",brand:{name:""},seo:{title:"",description:"",canonical:""},cluster:{generals:[],highlights:[]},availability:{status:!0},breadcrumbList:{itemListElement:[]},image:[{alternateName:"1",url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=",keywords:"1"},{alternateName:"10",url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottgAAAABJRU5ErkJggg==",keywords:"10"}],offers:{lowPrice:1,highPrice:0,offers:[{availability:"true",listPrice:0,price:0,priceValidUntil:"",priceCurrency:"BRL",itemCondition:"",quantity:1,seller:{identifier:"1"}}],priceCurrency:"BRL"},isVariantOf:{productGroupID:"",hasVariant:[{additionalProperty:[{name:"Tamanho",value:"...",valueReference:"SPECIFICATION",propertyID:""}],name:"...",offers:{offers:[{availability:"https://schema.org/InStock",listPrice:0,price:0,quantity:1,seller:{identifier:"1"}}]},sku:"1",slug:"1",productId:"1"}],name:"",additionalProperty:[],skuVariants:null},installments:{count:2,value:1}}}),Hl=(e,t,r,n=24)=>{const o=new Set,a=[];if(!Array.isArray(e)||e.length===0)return{taken:o,placedBanners:a};const i=t*n*r;for(const c of e){let l=Number(c.position_grid),u=!1;for(;l<i;){const f=l%r;if(f+c.columns>r){l+=r-f;continue}if(!Array.from({length:c.columns}).some((h,_)=>o.has(l+_))){for(let h=0;h<c.columns;h++)o.add(l+h);a.push(l),u=!0;break}l++}u||console.info(`[PLP INFINITE FAILED BANNER POSITION]: pos=${c.position_grid}, cols=${c.columns}`)}return{taken:o,placedBanners:a}},Vl=(e,t,r,n=24)=>{const{placedBanners:o,taken:a}=Hl(e??[],t,r),i=[];let c=0;try{for(;i.length<t*n;)a.has(c)||i.push(c),c++;return{banners:o,products:i}}catch(l){console.info(`[PLP INFINITE FAILED TO GEN POSITIONS]: page=${t}`,l)}return{banners:[],products:i}},$n=(e,t,r=24)=>Array.from({length:e},(n,o)=>{const a=o+1;return{loading:e===a,page:a,pagination:t!=null&&t.products.length&&e===a?t==null?void 0:t.pagination:la(),products:t!=null&&t.products.length&&e===a?t==null?void 0:t.products:Array.from({length:r},()=>$l())}}),Wl=(e,t)=>[...e,{loading:!1,page:t,pagination:la(),products:[]}],la=()=>({nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"1",count:1,total:1}),S_=(e,t,r,n,o)=>{const a=e[e.length-1],i=(a==null?void 0:a.products.length)??o,c=(e.length-1)*o+i-1,l=r[c];return t.filter((u,f)=>{const p=n[f];return p<=l||o>i&&p>l})},Gl=(e,t)=>{const r=new Map;for(const o of e){const a=Math.floor(o/t);r.has(a)||r.set(a,[]),r.get(a).push(o)}const n=[];for(const[,o]of r){const a=o[Math.floor(Math.random()*o.length)];n.push(a)}return n},Kl=(e,t)=>{if(!e)return[];const r=e.map((n,o)=>n.video&&n.video!==""?o:null).filter(n=>n);return Gl(r,t)},Ql=e=>Array.isArray(e)?e.map((t,r)=>({href:`/${e.slice(0,r+1).join("/")}`,name:t})):[],E_=Object.freeze(Object.defineProperty({__proto__:null,createBreadcrumb:Ql,createPage:Wl,createPages:$n,createPagination:la,createProduct:$l,deepEqual:Kn,fetchPage:Oo,getBanners:Hl,getPositions:Vl,getProductsWithVideo:Kl,getRandomVideoPerRow:Gl,getVisibleBanners:S_,hasStateChangedExceptPage:C_},Symbol.toStringTag,{value:"Module"})),P_=50,vr=hr.create((e,t)=>{const r=i=>Math.min(i,P_),n=async(i,c)=>{const l=r(i.page);try{const u=await Oo({...i,page:l});o(l,f=>c?c(f,u):{...f,...u})}catch(u){console.error(`[PDC - SCROLL INFINITE FAILED TO FETCH PAGE ${l}]: ${u}`),o(l,f=>({...f,loading:!1}))}},o=(i,c)=>{e({load:!0,pages:t().pages.map(l=>l.page===i?c(l):l)})},a=async(i,c)=>await n(i,(l,u)=>(typeof c=="function"&&c(u),{...l,...u,loading:!0}));return{banners:[],load:!1,pages:[],total:0,positions:[],products:[],createPagesScroll:async(i,c,l,u)=>{var p,m,h;const f=r(Number(i==null?void 0:i.page));e({...c,pages:$n(f,void 0,u)});try{const _=await Oo({...i,page:f});if(console.info("FETCH PAGE DATA",_),!_.products.length&&((p=_==null?void 0:_.pagination)==null?void 0:p.total)<f){console.info("[PLP INFINITE] LOAD LAST PAGE ONLY"),a({...i,page:(m=_==null?void 0:_.pagination)==null?void 0:m.total},l),e({pages:$n((h=_==null?void 0:_.pagination)==null?void 0:h.total)});return}typeof l=="function"&&l(_),e({load:!0,pages:$n(f,_),total:Number(_.pagination.count)})}catch(_){console.error(`[PDC - SCROLL INFINITE TO CREATE PAGES]: page ${f} ${_}`)}},addPage:(i,c,l)=>{const{pages:u}=t(),f=r(i==null?void 0:i.page);u.some(p=>p.page===f)||(e({...c,pages:Wl(u,f)}),a(i,l))},updateProducts:(i,c)=>{const l=t().pages.find(u=>u.page===r(i==null?void 0:i.page));l!=null&&l.loading||a(i,c)}}}),w_=(e,t,r,n=0)=>{if(!e.length)return[];let o=0;const a=[];for(let i=0;i<e.length;i+=r){const c=e.slice(i,i+r),l=c.findIndex(u=>{var f;return(f=u.node)==null?void 0:f.video});for(let u=0;u<c.length;u++){const f=i+u,p=n+f,m=t.find(_=>_.position_grid===p+1),h=p+o+1;m&&(o+=m.columns),a.push({position:h,canPlayVideo:u===l})}}return a},Xl=(e,t,r)=>{const n=(t-1)*r,o=t*r;return e>=n&&e<=o},_n=e=>{var t;return(t=e==null?void 0:e.map(r=>({disable:k.disableSKU(r),size:k.getSKUName(r),skuID:"sku"in r&&r.sku})))==null?void 0:t.filter(r=>r.disable)},N_=Object.freeze(Object.defineProperty({__proto__:null,createGridPosAndVideo:w_,getSkusNotify:_n,isPositionInCurrentPage:Xl},Symbol.toStringTag,{value:"Module"})),Yl=({isMobile:e,ICONS:t,NOTIFY_INFO:r})=>s.jsxs(s.Fragment,{children:[s.jsx(d.Modal.Controls,{navigation:e?"top":"middle",isMobile:e??!1,children:!e&&s.jsxs(s.Fragment,{children:[s.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),s.jsx(d.Button,{"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})}),s.jsx(d.Modal.Title,{navigation:e?"top":"middle",title:r.title})]});Yl.displayName="Notify.Controls";const _t={"notify--header-modifier":"_notify--header-modifier_xlomp_1","notify--container":"_notify--container_xlomp_4","notify--form":"_notify--form_xlomp_20","notify--status":"_notify--status_xlomp_36","notify--status--success":"_notify--status--success_xlomp_50","notify--status--error":"_notify--status--error_xlomp_50","notify--modal--body":"_notify--modal--body_xlomp_99","notify--loading":"_notify--loading_xlomp_102","notify--selector":"_notify--selector_xlomp_122","notify--selector--header":"_notify--selector--header_xlomp_138","modal-modifier":"_modal-modifier_xlomp_168"};function Zl(e){const r=decodeURIComponent(window.document.cookie).split(";");for(const n of r){const[o,a]=n.trim().split("=");if(o===e)return a}}function ua(e,t,r={}){const o={...{path:"/",expires:new Date(Date.now()+36e5)},...r};let a=`${encodeURIComponent(e)}=${encodeURIComponent(t??"")}`;for(const i in o)o[i]!==void 0&&(a+=`; ${i}`,i==="expires"?a+=`=${o[i].toUTCString()}`:typeof o[i]=="boolean"?a+=`; ${o[i]?"true":"false"}`:a+=`=${o[i]}`);window.document.cookie=a}var Jl={CUSTOM_VIEW_CART:{name:"custom_view_cart",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","total_discount","subtotal","items"]},ADD_TO_WISHLIST:{name:"add_to_wishlist",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","items"]},ADD_TO_CART:{name:"add_to_cart",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","items"]},REMOVE_FROM_CART:{name:"remove_from_cart",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","items"]},ADD_COUPON:{name:"add_coupon",destinations:["DataLayer"],requiredParams:["brand","region","coupon","coupon_message","seller_cod_name"]},SEARCH:{name:"search",destinations:["DataLayer"],requiredParams:["brand","search_term","search_found","search_quantity"]},SEARCH_ZIPCODE:{name:"search_zipcode",destinations:["DataLayer"],requiredParams:["brand","region","shippings","zipcode","flag_pickup"]},VIEW_PROMOTION:{name:"view_promotion",destinations:["DataLayer"],requiredParams:["brand","region","currency","promotion_name","creative_slot","creative_name","items"]},SELECT_PROMOTION:{name:"select_promotion",destinations:["DataLayer"],requiredParams:["brand","region","currency","promotion_name","creative_slot","creative_name","items"]},SELECT_CONTENT:{name:"select_content",destinations:["DataLayer"],requiredParams:["brand","content_type"]},SELECT_ITEM:{name:"select_item",destinations:["DataLayer"],requiredParams:["brand","region","items","line_items"]},VIEW_ITEM:{name:"view_item",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","available_grid","items"]},VIEW_ITEM_LIST:{name:"view_item_list",destinations:["DataLayer"],requiredParams:["region","brand","line_items","items"]},BEGIN_CHECKOUT:{name:"begin_checkout",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","total_discount","subtotal","items"]},CUSTOM_BEGIN_CHECKOUT:{name:"custom_begin_checkout",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","total_discount","subtotal","items"]},AUTH_ACTION:{name:"auth_action",requiredParams:["region"]},ADD_PERSONAL_INFO:{name:"add_personal_info",destinations:["DataLayer"],requiredParams:["brand","pre_filled","line_items","currency","value","total_discount","subtotal"]},CUSTOM_ADD_SHIPPING_INFO:{name:"add_shipping_info",destinations:["DataLayer"],requiredParams:["brand","pre_filled","shipping","shipping_tier","line_items","currency","value","total_discount","subtotal","items"]},CUSTOM_ADD_PAYMENT_INFO:{name:"add_payment_info",destinations:["DataLayer"],requiredParams:["brand","pre_filled","line_items","currency","value","total_discount","payment_type","subtotal","items"]},ORDER_REVIEWED:{name:"order_reviewed",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","total_discount","subtotal","payment_type"]},PURCHASE:{name:"purchase",destinations:["DataLayer"],requiredParams:["brand","shipping_tier","line_items","currency","value","shipping","transaction_id","total_discount","payment_type","seller_cod_name","subtotal","coupon","items"]},CUSTOM_PURCHASE:{name:"custom_purchase",destinations:["DataLayer"],requiredParams:["brand","shipping_tier","line_items","currency","value","shipping","transaction_id","total_discount","payment_type","seller_cod_name","subtotal","coupon","items"]},CUSTOM_USER_INFO:{name:"custom_user_info",destinations:["DataLayer"],requiredParams:["user_info"]},NOTIFY_ME:{name:"notify_me",destinations:["DataLayer"],requiredParams:["brand","line_items","size","item_ref"]}};function I_(e,t,r){const n=t.window,o=Object.assign({},t);if(delete o.window,n){n.dataLayer=n.dataLayer||[],n.dataLayer.push({event:e,ecommerce:o});return}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:e,ecommerce:o})}function R_(e,t,r){console.log(`%c[DT - ${r}] EVENTO DISPARADO:%c `,`background: ${t}; color: white; font-weight: bold; padding: 2px 4px; border-radius: 3px;`,"color: #fff;",e||"")}var eu=[["vale","vale crédito"],["pagaleve","pix"],["pix parcel","pix parcelado"],["pix","pix"],["apple","apple pay"],["google","google pay"],["boleto","boleto"],["paypal","paypal"],["cred","cartão"],["visa","cartão"],["master","cartão"],["amex","cartão"],["elo","cartão"],["hiper","cartão"],["diner","cartão"],["deb","cartão"]];function T_(e,t,r){R_({id:e,custom_data:t},"#00c851",r)}var A_={DataLayer:I_,Dito:T_};async function O_(e,t){const r=Jl[e];r&&await Promise.allSettled(r.destinations.map(async n=>{try{await A_[n](e.toLowerCase(),t,n)}catch(o){console.error(`[DT] Failed to send ${e} to ${n}:`,o)}}))}async function L_(e){try{return await(await fetch(`/api/catalog_system/pub/products/search?fq=productId:${e}`)).json()}catch(t){console.log("[DT] Erro ao buscar dados do produto",t)}}function k_(e){try{const{pathname:t}=new URL(e,window.location.origin);return/\/p\/?$/.test(t)}catch{return!1}}function tu(e){if(!e)return null;const t=(()=>{try{return new URL(e,location.origin).pathname}catch{return e.split("?")[0]}})(),r=decodeURIComponent(t).match(/(\d+-\d+)(?=\/p|$)/);return r?r[1].replace("-","_"):null}async function D_(e){const t=tu(e);if(!t)return console.error("Não foi possível extrair o RefId da URL"),null;try{const r=await fetch(`/api/catalog_system/pub/products/search?fq=alternateIds_RefId:${t}`);if(!r.ok)throw new Error(`Erro na API: ${r.status}`);const n=await r.json();return(n==null?void 0:n[0])||null}catch(r){return console.error("Erro ao buscar dados do produto:",r),null}}function ru(e,t){var r,n,o,a;const i=(n=(r=e==null?void 0:e.shippingData)==null?void 0:r.logisticsInfo)==null?void 0:n.find(l=>l.itemId===t.id),c=(o=i==null?void 0:i.slas)==null?void 0:o.find(l=>l.id===i.selectedSla);return(a=c==null?void 0:c.pickupStoreInfo)!=null&&a.friendlyName?`retirada em loja: ${c.pickupStoreInfo.friendlyName}`:c!=null&&c.name?`Receba em casa: ${c.name}`:null}async function nu(e){var t,r;const n=await L_(e.productId||e.productID||e.item_group_id);return n.length&&(r=(t=n[0].items.find(o=>o.name===e.skuName))==null?void 0:t.itemId)!=null?r:null}function rs(e){return e.discount||e.discount===0?e.discount:parseFloat(Math.max(e.listPrice-e.sellingPrice,0).toFixed(2))/100||0}function pr(e){const t=[()=>{var r;return((r=e==null?void 0:e.productCategories)==null?void 0:r[39])==="BAZAR"?"Sale":"Coleção"},()=>e.item_category||e.category,()=>e.categories[0]];for(const r of t){const n=r();if(n!=null)return n}return null}function gn(e){const t=[()=>Object.values((e==null?void 0:e.productCategories)||{}).pop(),()=>Object.values((e==null?void 0:e.categories)||{}).pop(),()=>{var r,n,o,a,i;return(i=(a=(o=(n=(r=e==null?void 0:e.category)==null?void 0:r.split)==null?void 0:n.call(r,">"))==null?void 0:o[1])==null?void 0:a.trim)==null?void 0:i.call(a)},()=>e.item_category2];for(const r of t){const n=r();if(n!=null)return n}return null}function su(e){var t;const r=((t=e==null?void 0:e.additionalInfo)==null?void 0:t.tags)||(e==null?void 0:e.tags);return Array.isArray(r)&&r.length?r.join(","):null}var M_={farm:"farmrio","farm etc":"farmetc","farm rio":"farmrio"};function Ga(e){if(!e)return null;const t=e.toLowerCase().trim();return M_[t]||null}function wt(e){var t;let r=[];if(Array.isArray(e)&&e.every(a=>typeof a=="string"))r=e;else if(Array.isArray(e))r=e.map(a=>{var i;return((i=a.additionalInfo)==null?void 0:i.brandName)||a.brand});else if(typeof e=="object"&&e!==null&&"brand"in e)r=[((t=e.additionalInfo)==null?void 0:t.brandName)||e.brand];else return typeof e=="string"?Ga(e):null;const n=r.map(Ga).filter(a=>a!==null),o=[...new Set(n)].sort();return o.length>0?o.join("_"):null}function F_(e){var t;if(!e.orderForm&&!((t=e.orderForm.items)!=null&&t.length))return null;const r=e.orderForm.items;return wt(r)}function z_(e){var t;const{item:r}=e;return wt(((t=r==null?void 0:r.additionalInfo)==null?void 0:t.brandName)||r.brand||r.item_brand)}function B_(e,t){if(e!=null&&e.brand)return wt(e.brand)||e.brand||null;switch(t){case"CUSTOM_VIEW_CART":case"ADD_COUPON":case"ADD_PERSONAL_INFO":case"CUSTOM_ADD_SHIPPING_INFO":case"CUSTOM_ADD_PAYMENT_INFO":case"BEGIN_CHECKOUT":case"CUSTOM_BEGIN_CHECKOUT":case"SEARCH_ZIPCODE":case"ORDER_REVIEWED":case"PURCHASE":case"CUSTOM_PURCHASE":return F_(e);case"ADD_TO_CART":case"REMOVE_FROM_CART":return z_(e);default:return null}}async function U_(e){var t;const r=((t=e.orderForm)==null?void 0:t.items)||[];return r.length?await Promise.all(r.map(async n=>{var o,a,i;return{item_id:n.productId,item_category2:gn(n),item_category4:su(n),item_shipping_tier:ru(e.orderForm,n),price:parseFloat((n.price/100).toFixed(2))||0,quantity:n.quantity||1,item_ref:n.refId||null,item_brand:wt((o=n.additionalInfo)==null?void 0:o.brandName)||((a=n.additionalInfo)==null?void 0:a.brandName)||null,item_sku:await nu(n)||n.id||null,item_name:n.name||n.id||null,item_category:pr(n)||null,item_variant:n.skuName.split(/[-/]/)[0].trim(),item_variant2:((i=n.skuName.split(/[-/]/).pop())==null?void 0:i.trim())||"",discount:rs(n)}})):[]}async function q_(e,t){var r,n,o;const{item:a,orderForm:i}=e;return[{index:0,quantity:1,item_id:a.productId||a.item_group_id||a.sku||null,item_category2:gn(a),item_category4:su(a),item_shipping_tier:t==="REMOVE_FROM_CART"?ru(i,a):null,price:a.listPrice||parseFloat((a.price/100).toFixed(2))||0,item_ref:a.refId||a.item_ref||(a==null?void 0:a.additionalProperty.find(c=>c.name==="RefId").value)||null,item_brand:((r=a.additionalInfo)==null?void 0:r.brandName)||a.item_brand||a.brand.name||null,item_sku:a.sku||a.id||a.item_id||await nu(a)||null,item_name:a.name||a.item_name||null,item_category:pr(a)||null,item_variant:(a.skuName||a.item_variant||a.name).split(/[-/]/)[0].trim()||null,item_variant2:a.size||((n=a==null?void 0:a.itemAttributes)==null?void 0:n.size)||((o=(a.skuName||a.name).split(/[-/]/).pop())==null?void 0:o.trim())||null,discount:rs(a),item_list_name:pr(a)||null,item_url:a.item_url||null}]}async function $_(e){return((e==null?void 0:e.list)||[]).map(t=>{var r,n,o,a,i;return{price:((r=t==null?void 0:t.price)==null?void 0:r.list)||(t==null?void 0:t.price)||((n=t==null?void 0:t.offers)==null?void 0:n.lowPrice)||0,quantity:1,item_ref:(t==null?void 0:t.ref)||(t==null?void 0:t.item_ref)||(t==null?void 0:t.referenceId[0].Value)||(t==null?void 0:t.additionalProperty.find(c=>c.name==="RefId").value)||null,index:typeof(e==null?void 0:e.index)=="number"?e.index:null,item_brand:wt((o=t==null?void 0:t.brand)==null?void 0:o.name)||wt(e.brand)||wt(t==null?void 0:t.item_brand)||null,item_name:(t==null?void 0:t.productName)||(t==null?void 0:t.alternateName)||(t==null?void 0:t.item_name)||((a=t==null?void 0:t.seo)==null?void 0:a.title)||null,item_category:pr(t)||null,item_variant:((i=t==null?void 0:t.name)==null?void 0:i.split("-")[0].trim())||(t==null?void 0:t.item_variant)||null,item_category2:gn(t)||null,item_id:(t==null?void 0:t.productID)||(t==null?void 0:t.productId)||(t==null?void 0:t.item_id)||(t==null?void 0:t.id)||null,discount:rs(t)||null,item_list_name:(e==null?void 0:e.itemListName)||pr(t)||null}})}async function H_(e){var t,r,n;const{item:o}=e;return[{price:e.value||0,quantity:1,item_ref:o.ref||o.additionalProperty.find(a=>a.name==="RefId").value||null,item_brand:wt(o.brand.name)||wt(e.brand)||null,item_name:o.productName||o.alternateName||null,item_category:pr(o)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-")[0].trim())||null,item_category2:gn(o)||((n=(r=o==null?void 0:o.category)==null?void 0:r.split(">")[1])==null?void 0:n.trim())||null,item_id:(o==null?void 0:o.productID)||(o==null?void 0:o.productId)||o.item_group_id||null,discount:rs(o)||null,item_sku:(o==null?void 0:o.sku)||(o==null?void 0:o.productId)||null,item_url:o.url||o.item_url||null,seller_id:o.seller||null}]}async function V_(e){var t;if(!k_(e==null?void 0:e.bannerUrl))return[];const n=await D_(e==null?void 0:e.bannerUrl),o=n==null?void 0:n.items[0];return{price:(o==null?void 0:o.sellers[0].commertialOffer.Price)||0,quantity:1,item_ref:tu(e==null?void 0:e.bannerUrl),item_brand:wt(n.brand)||null,item_name:(n==null?void 0:n.productName)||(n==null?void 0:n.alternateName)||(n==null?void 0:n.item_name)||null,item_category:pr(n)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-").pop().trim())||null,item_category2:gn(n)||null,item_id:(n==null?void 0:n.productId)||null,discount:(o==null?void 0:o.sellers[0].commertialOffer.ListPrice)-(o==null?void 0:o.sellers[0].commertialOffer.Price)||null}}function W_(e,t){if(e!=null&&e.items)return e.items;switch(t){case"CUSTOM_VIEW_CART":case"BEGIN_CHECKOUT":case"CUSTOM_BEGIN_CHECKOUT":case"CUSTOM_ADD_SHIPPING_INFO":case"CUSTOM_ADD_PAYMENT_INFO":case"PURCHASE":case"CUSTOM_PURCHASE":return U_(e);case"ADD_TO_CART":case"ADD_TO_WISHLIST":case"REMOVE_FROM_CART":return q_(e,t);case"SELECT_ITEM":case"VIEW_ITEM_LIST":return $_(e);case"VIEW_ITEM":return H_(e);case"VIEW_PROMOTION":case"SELECT_PROMOTION":return V_(e);default:return null}}function G_(e){var t,r,n;if(!e.orderForm)return null;const o=((t=e.orderForm.paymentData)==null?void 0:t.payments)||[],a=((r=e.orderForm.paymentData)==null?void 0:r.paymentSystems)||[];if(!o.length||!a.length)return null;const i=o.find(p=>p==null?void 0:p.paymentSystem)||o[0],c=String((i==null?void 0:i.paymentSystem)||"").trim();if(!c)return null;const l=a.find(p=>String(p.id)===c),u=((n=l==null?void 0:l.name)==null?void 0:n.toLowerCase())||"",f=eu.find(([p])=>u.includes(p));return f?f[1]:null}function K_(e){var t,r,n,o;if(!e.orderForm)return null;const a=((t=e.orderForm.paymentData)==null?void 0:t.transactions)||[];if(!a.length)return null;const i=((r=a[0])==null?void 0:r.payments)||[];if(!i.length)return null;const c=((o=(n=i[0])==null?void 0:n.paymentSystemName)==null?void 0:o.toLowerCase())||"",l=eu.find(([u])=>c.includes(u));return l?l[1]:null}function Q_(e,t){if(e!=null&&e.paymentType)return e.paymentType;switch(t){case"ORDER_REVIEWED":case"CUSTOM_ADD_PAYMENT_INFO":return G_(e);case"PURCHASE":case"CUSTOM_PURCHASE":return K_(e);default:return null}}var X_={brand:B_,items:W_,payment_type:Q_,user_info:async(e,t)=>{var r;const o=(r={animale:{store:"https://www.animale.com.br",checkout:"https://secure.animale.com.br"},farm:{store:"https://lojafarm.myvtex.com"},mariafilo:{store:"https://mariafilo.myvtex.com",checkout:"https://secure.mariafilo.com.br"},lojacrisbarros:{store:"https://lojacrisbarros.myvtex.com",checkout:"https://secure.crisbarros.com.br"},lojaoffpremium:{store:"https://lojaoffpremium.myvtex.com",checkout:"https://secure.lojaoffpremium.com.br"}}[e.account||"https://www.animale.com.br"])==null?void 0:r[e.platform||"store"];if(!o)return{customer:{email:e.userEmail},address:null};try{const a=`${o}/_v/user-info`;return await(await fetch(a,{method:"POST",body:JSON.stringify({email:e.userEmail})})).json()}catch{return{customer:{email:e.userEmail},address:null}}},content_type:(e,t)=>"regiao".concat(":"+e.category).concat(e.subcategory?":"+e.subcategory:"").concat(":"+e.componentName)||null,region:(e,t)=>e.region||null,line_items:(e,t)=>e!=null&&e.lineItems?e.lineItems:e!=null&&e.item?[e.item.productId||e.item.productID||e.item.item_id]:e!=null&&e.list?e.list.map(r=>r.productID||(r==null?void 0:r.id)):(e.orderForm.items||[]).map(r=>r.productId).join(","),currency:(e,t)=>{var r,n,o,a;return e!=null&&e.currency?e.currency:e!=null&&e.bannerUrl?"BRL":e!=null&&e.item?((n=(r=e.item)==null?void 0:r.offers)==null?void 0:n.priceCurrency)||"BRL":((a=(o=e.orderForm)==null?void 0:o.storePreferencesData)==null?void 0:a.currencyCode)||null},value:(e,t)=>{var r;return e!=null&&e.value?e.value:e.item?e.item.price:((r=e.orderForm)==null?void 0:r.value)!=null?e.orderForm.value/100:null},total_discount:(e,t)=>{var r,n;const a=(((r=e.orderForm)==null?void 0:r.totalizers)||((n=e.orderForm)==null?void 0:n.totals)||[]).find(i=>i.id==="Discounts");return a?Math.abs(a.value)/100:0},subtotal:(e,t)=>{var r,n;return(((r=e.orderForm)==null?void 0:r.totalizers)||((n=e.orderForm)==null?void 0:n.totals)||[]).filter(i=>i.id==="Items").reduce((i,c)=>i+(c.value||0),0)/100||0},coupon_message:(e,t)=>{var r;if(e.couponMessage)return e.couponMessage;const n=((r=e.orderForm)==null?void 0:r.messages)||[];if(n.length===0)return null;const o=n.filter(a=>a.text.toLowerCase().includes("cupom"));return o.length===0?null:o.map(a=>a.text).join(" | ")},seller_cod_name:(e,t)=>e.appliedSellerCodName||(e==null?void 0:e.orderForm.marketingData.utmiCampaign)||null,coupon:(e,t)=>{var r,n;return e.appliedCoupon||((n=(r=e==null?void 0:e.orderForm)==null?void 0:r.marketingData)==null?void 0:n.coupon)||null},pre_filled:(e,t)=>!!e.preFilled,search_term:(e,t)=>e.searchTerm||null,search_found:(e,t)=>!!e.searchFound,search_quantity:(e,t)=>e.searchQuantity||0,promotion_name:(e,t)=>e.promotionName||null,creative_name:(e,t)=>e.creativeName||null,creative_slot:(e,t)=>e.creativeSlot||null,zipcode:(e,t)=>e.zipCode||null,size:(e,t)=>e.size||null,item_ref:(e,t)=>e.itemRef||null,flag_pickup:(e,t)=>{var r;const n=e.orderForm;return n?(((r=n.shippingData)==null?void 0:r.logisticsInfo)||[]).some(i=>{var c;return(c=i.slas)==null?void 0:c.some(l=>l.deliveryChannel==="pickup-in-point")}):null},shippings:(e,t)=>{const r=e.orderForm;if(!r)return null;const n={};for(const a of r.shippingData.logisticsInfo){const i=r.items[a.itemIndex];if(i)for(const c of a.slas){const l=c.name;n[l]||(n[l]={shipping_tier:c.name,delivery_time:parseInt(c.shippingEstimate),shipping:parseFloat((c.price/100).toFixed(1)),line_items:[]}),n[l].line_items.push(i.id)}}return Object.values(n).map(a=>({shipping:a.shipping,shipping_tier:a.shipping_tier,delivery_time:a.delivery_time,line_items:a.line_items.join(",")}))||null},shipping:(e,t)=>{var r,n,o;return((o=(n=(r=e==null?void 0:e.orderForm)==null?void 0:r.shippingData)==null?void 0:n.logisticsInfo)!=null?o:[]).reduce((i,c)=>{var l,u;const f=(l=c.slas)==null?void 0:l.find(p=>p.id===c.selectedSla);return i+((u=f==null?void 0:f.price)!=null?u:0)},0)},shipping_tier:(e,t)=>{var r,n,o,a;const c=((o=(n=(r=e==null?void 0:e.orderForm)==null?void 0:r.shippingData)==null?void 0:n.logisticsInfo)!=null?o:[]).find(m=>m.selectedSla);if(!c)return null;const l=(a=c.slas)==null?void 0:a.find(m=>m.id===c.selectedSla);if(!l)return null;const{deliveryChannel:u,name:f,pickupStoreInfo:p}=l;return u==="pickup-in-point"?`retirada em loja${p!=null&&p.friendlyName?`: ${p.friendlyName}`:""}`:u==="delivery"?`receba em casa${f?`: ${f}`:""}`:null},transaction_id:(e,t)=>{var r,n;return((n=(r=e.orderForm)==null?void 0:r.orderGroup)==null?void 0:n.toString())||null},available_grid:(e,t)=>e.availableGrid||null};async function Y_(e={},t){const r=Jl[t];return r?Object.fromEntries(await Promise.all(r.requiredParams.map(async o=>{const a=X_[o];return typeof a!="function"?(console.error(`[DT] Missing paramGetter for param: ${o}`),[o,null]):[o,await a(e,t)]}))):void 0}async function Z_(e,t={}){try{const r=await Y_(t,e);return await O_(e,Object.assign({},r,{window:t.window}))}catch(r){return console.error(`[DT] Error tracking event ${e}:`,r)}}const J_=({accountName:e=""})=>{const{sendDataLayerEvent:t}=ie(),{user:r}=Vr(),{cartStore:n}=Pe();return g.useEffect(()=>{if(!r)return;(async()=>{const{userId:a,email:i,firstName:c,lastName:l,phone:u,homePhone:f,postalCode:p,street:m,number:h,city:_,gender:y}=r,v=new TextEncoder().encode(a),b=await crypto.subtle.digest("SHA-256",v),j=Array.from(new Uint8Array(b)).map(x=>x.toString(16).padStart(2,"0")).join("");i&&Z_("CUSTOM_USER_INFO",{userEmail:i,platform:"store",account:e}),t({functionKey:"readyEvents",data:{readyData:{user_id:j,email:i,first_name:c,last_name:l,phone:u||f,zip:p,street:m,street_number:h,city:_,gender:y,orderform_id:n==null?void 0:n.id}}})})()},[r,n.id]),null},ou=g.createContext({amount:null,boxes:null,toExpire:null,loading:!0,logout:()=>null,getCurrentCredits:()=>({credits:0,cashback:0})}),eg=({children:e,AUTH_TOKEN_COOKIE:t,accountName:r})=>{var p;const{shipping:n,cartStore:o}=Pe(),[a,i]=g.useState({amount:null,boxes:null,toExpire:null,loading:!0}),c=g.useCallback(async()=>{try{await fetch("/api/user",{priority:"low"}).then(m=>m.json()).then(m=>{const{userCredits:h,..._}=m,{wishlist:y,...v}=_;i({amount:h==null?void 0:h.amount,boxes:h==null?void 0:h.boxes,toExpire:h==null?void 0:h.toExpire,user:v,loading:!1,wishlist:(typeof y=="string"?y.split(","):y)??[]})})}catch(m){console.error("my credits request",m),i({...a,loading:!1})}},[i]),l=g.useCallback(()=>{ua(t),c()},[c]),u=g.useCallback(()=>a.boxes?a.boxes.reduce((m,h)=>h.gift_card_box.refid==="C1643"?(m.cashback+=h.amount,m):(m.credits+=h.amount,m),{cashback:0,credits:0}):{cashback:0,credits:0},[a]),f=g.useCallback(async()=>{var m,h,_;if((m=a.user)!=null&&m.postalCode&&(o!=null&&o.id)&&!(o!=null&&o.loading)&&!((_=(h=o==null?void 0:o.shippingData)==null?void 0:h.address)!=null&&_.postalCode))try{await n(a.user.postalCode)}catch(y){console.error("Error auto-filling CEP:",y)}},[(p=a.user)==null?void 0:p.postalCode]);return g.useEffect(()=>{c()},[c]),g.useEffect(()=>{f()},[f]),s.jsxs(ou.Provider,{value:g.useMemo(()=>({...a,getCurrentCredits:u,logout:l}),[a,u,l]),children:[s.jsx(J_,{accountName:r}),e]})},Vr=()=>{const e=g.useContext(ou);if(e===void 0)throw new Error("useContext(SessionContext) must be used within a SessionProvider");return e},au=({color:e,delay:t=3e3,sku:r,setStatus:n,setIsLoading:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i})=>{const c=g.useRef(null),[l,u]=g.useState(null),{sendDataLayerEvent:f}=ie(),{user:p}=Vr(),m=p!=null&&p.firstName?`${p==null?void 0:p.firstName} ${p==null?void 0:p.lastName}`:"";return s.jsx("div",{className:_t["notify--form"],children:s.jsxs("form",{action:"POST",onSubmit:async h=>{var v;h.preventDefault();const _=h.currentTarget,y=((v=_.querySelector("input"))==null?void 0:v.value)??"";fetch("/api/aviseme",{method:"POST",body:JSON.stringify({userName:m,email:y,sku:r==null?void 0:r.skuID})}).then(b=>n(b.ok)).finally(()=>{o(!1),_.reset(),f({functionKey:"readyEvents",data:{event:"notify_me",readyData:{size:r==null?void 0:r.size,item_id:r==null?void 0:r.skuID,color:e}}}),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{var b;(b=document.body)==null||b.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0})),u(!0),n(null)},t)})},children:[s.jsx(d.TextField.Structure,{input:s.jsx(d.TextField.Input,{feedback:typeof l=="boolean"&&l?"error":"none",type:"email",label:i.email_placeholder,mode:"over-label",variant:"outlined",sizeVariant:"large",onChange:h=>u(!h.target.validity.valid),required:!0}),supportText:typeof l=="boolean"&&l?s.jsx(d.TextField.SupportText,{text:a.messages.invalid_email,feedback:"error"}):s.jsx(s.Fragment,{})}),s.jsx(d.Button,{disabled:!(l===!1||!r)||!r,type:"submit",size:"large",children:i.button})]})})};au.displayName="Notify.Form";const iu=({isLoading:e=!1})=>s.jsx("div",{className:_t["notify--loading"],"data-loading":e,children:s.jsx(d.Spinner,{})});iu.displayName="Notify.Loading";const da={"product-variation-list--list":"_product-variation-list--list_e0he8_1","product-variation-list--title":"_product-variation-list--title_e0he8_10","product-variation-list":"_product-variation-list_e0he8_1"},cu=({children:e,...t})=>s.jsx("div",{...t,className:da["product-variation-list--list"],children:e});cu.displayName="ProductVariationList.List";const lu=({fill:e="#1352C7",src:t="",type:r="size",text:n,...o})=>{const{nextimage:a}=pe();return r==="size"?s.jsxs(d.ToggleSize.Wrapper,{...o,size:"large",variation:"ghost",children:[s.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-size"}),s.jsx(d.ToggleSize.Text,{children:n})]}):s.jsxs(d.ToggleStyle.Wrapper,{...o,size:"small",title:"wrapper-texture",children:[s.jsx(d.ToggleStyle.DisabledAdornment,{title:"disabled-adornment-texture"}),r==="color"?s.jsx(d.ToggleStyle.Color,{background:e,title:"color"}):s.jsx(d.ToggleStyle.Texture,{title:"texture",children:s.jsx(a,{alt:n??"image",height:40,src:t,width:40})})]})};lu.displayName="ProductVariationList.Option";const uu=({children:e,...t})=>s.jsx("div",{className:da["product-variation-list"],...t,children:e});uu.displayName="ProductVariationList.Root";const du=({children:e,title:t,...r})=>s.jsxs("div",{...r,className:da["product-variation-list--title"],children:[t?s.jsx(d.TextStructure.Root,{children:s.jsx(d.TextStructure.SectionWrapper,{children:s.jsx("p",{children:t})})}):s.jsx(s.Fragment,{}),e]});du.displayName="ProductVariationList.Title";const yt={List:cu,Option:lu,Title:du,Root:uu},tg=(e,t)=>{if(!e||!t)return!1;const r=Object.keys(e);return r.length!==Object.keys(t).length?!1:r.every(n=>e[n]===t[n])},fu=({children:e,label:t="",skus:r,sku:n,setSku:o})=>s.jsxs(s.Fragment,{children:[s.jsx("div",{className:_t["notify--selector--header"],children:e}),s.jsxs(yt.Root,{className:_t["notify--selector"],children:[s.jsx(yt.Title,{title:t}),s.jsx(yt.List,{children:Array.isArray(r)&&r.map((a,i)=>{const c=tg(n,a);return s.jsx(yt.Option,{active:c,onClick:()=>o(c?null:a),text:String(a.size),type:"size"},i)})})]})]});fu.displayName="Notify.Selector";const Ka=({type:e,icon:t,title:r,subtitle:n})=>s.jsx("div",{className:_t[`notify--status--${e}`],children:s.jsx(d.TextStructure.Root,{adornment:{start:s.jsx(d.Icon,{name:t,size:"large"})},children:s.jsxs(d.TextStructure.DivWrapper,{children:[s.jsx("h2",{children:r}),s.jsx("h3",{children:n})]})})}),pu=({status:e,ICONS:t,PRODUCT_CARD_TEXTS:r})=>s.jsxs("div",{className:_t["notify--status"],"data-status":e,children:[s.jsx(Ka,{...r.success,icon:t.check_circle,type:"success"}),s.jsx(Ka,{...r.error,icon:t.alert_circle,type:"error"})]});pu.displayName="Notify.Status";const fa=({color:e,open:t,setVisible:r,skus:n,sku:o,setSku:a,ICONS:i,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l,PRODUCT_CARD_TEXTS:u,Z_INDEX_WAR:f})=>{const[p,m]=g.useState(!1),[h,_]=g.useState(null),{isMobile:y}=oe();return s.jsxs(d.Modal.Root,{isMobile:y??!1,isOpen:t,setIsOpen:r,variant:y?"sideBottom":"sideLeft",style:{zIndex:f.modal},className:_t["modal-modifier"],children:[s.jsx(d.Modal.Header,{navigation:"top",className:_t["notify--header-modifier"],children:s.jsx(Yl,{isMobile:y??!1,ICONS:i,NOTIFY_INFO:l})}),s.jsxs(d.Modal.Body,{className:_t["notify--modal--body"],children:[s.jsxs("div",{className:_t["notify--container"],children:[s.jsxs(fu,{label:l.selector_label,sku:o,skus:n,setSku:a,children:[s.jsx("p",{children:l.subtitle}),s.jsx("span",{children:l.description})]}),s.jsx(au,{delay:4e3,sku:o,setStatus:_,setIsLoading:m,color:e,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l}),s.jsx(iu,{isLoading:p}),s.jsx("div",{className:_t["notify--selector--header"],children:s.jsx("span",{children:l.legal})})]}),s.jsx(pu,{status:h,ICONS:i,PRODUCT_CARD_TEXTS:u})]})]})};fa.displayName="Notify";const yn=({skus:e,ICONS:t,NEWSLETTER_CONFIGS:r,NOTIFY_INFO:n,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:a,...i})=>{const c=_n(e??[]);return s.jsx(fa,{...i,skus:c,ICONS:t,NEWSLETTER_CONFIGS:r,NOTIFY_INFO:n,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:a})};yn.displayName="PDC.Notification";const mu=g.createContext({}),hu=({banners:e,children:t})=>{const{constants:{ITEMS_PER_PAGE:r,ICONS:n,NEWSLETTER_CONFIGS:o,NOTIFY_INFO:a,PRODUCT_CARD_TEXTS:i,Z_INDEX_WAR:c}}=nt(),{router:l}=pe(),{sendDataLayerEvent:u}=ie(),{isMobile:f}=oe(),{state:p}=Be(),{addPage:m,updateProducts:h}=vr(),_=f?8:16,y=f?2:4,[v,b]=g.useState(!1),[C,j]=g.useState(null),[x,S]=g.useState([]),E=g.useCallback(O=>{O&&"pagination"in O&&u({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:O.products}}})},[u]),P=g.useCallback(O=>{if(O.pagination.nextPage===!0){const D=O.page+1,$=Vl(e,D,y,r);m({...p,page:D},$,E)}},[m,e,E,y,r,p]),N=g.useCallback(O=>{O.loading===!1&&h({...p,page:O.page},E)},[E,h,p]),A=g.useCallback(O=>{const D=new URLSearchParams({});O.page!==Number(D.get("page")??1)&&(D.set("page",String(O.page)),l.replace(`?${D.toString()}`,{scroll:!1}))},[l]),R=g.useCallback((O,D)=>{const $=D?_n([D]):null;S(O),j($!=null&&$.length?$[0]:null),b(!0)},[]);return s.jsxs(mu.Provider,{value:g.useMemo(()=>({addPage:m,addNewPage:P,gap:_,columns:y,handleNotify:R,updatePage:N,updateProducts:h,updateParamPage:A}),[m,P,R,_,y,N,h,A]),children:[t,s.jsx(yn,{open:v,sku:C,skus:x,setSku:j,setVisible:b,ICONS:n,NEWSLETTER_CONFIGS:o,NOTIFY_INFO:a,PRODUCT_CARD_TEXTS:i,Z_INDEX_WAR:c})]})},xr=()=>{const e=g.useContext(mu);if(e===void 0)throw new Error("PLPInfiniteScrollContext must be used within a ScrollInfiniteProvider");return e},_u=g.createContext({gridBanners:void 0,banners:[]}),rg=({children:e,data:t,device:r,SectionZone:n,COMMON_PAGE_COLUMN_GAP_PDC:o})=>{const{isMobile:a}=oe(),i=(t==null?void 0:t.sections.filter(p=>p.name!=="List Product Banners"))??[],c=i.slice(0,La),l=i.slice(La,i.length),u=t==null?void 0:t.sections.find(p=>p.name==="List Product Banners"),f=g.useMemo(()=>{var p,m;return((m=(p=u==null?void 0:u.data)==null?void 0:p.banners)==null?void 0:m.map(h=>({...h.banner,columns:h.bannerWidth,position_grid:h.bannerPosition})))??[]},[u]);return a&&r==="mobile"||!a&&r==="desktop"?s.jsxs(_u.Provider,{value:{gridBanners:u,banners:f},children:[s.jsx(n,{data:c??[]}),s.jsxs(d.Utils.Column,{gap:o,className:d.helpers.classNameConcat("utils-column-modifier"),children:[e,s.jsx(n,{data:l??[]})]})]}):s.jsx(s.Fragment,{})},ns=()=>{const e=g.useContext(_u);return e===void 0&&console.error("Needs PLPContentContext on parent component"),e},gu=g.createContext({}),yu=({children:e,filters:t,...r})=>{var a;const{constants:{PLP_FILTERS:n}}=nt(),o=(a=t.facets)==null?void 0:a.filter(i=>n.find(c=>c.key===i.key));return s.jsx(gu.Provider,{value:g.useMemo(()=>({...r,filters:{...t,facets:o}}),[t,o,r]),children:e})},Qt=()=>{const e=g.useContext(gu);if(e===void 0)throw new Error("useFilterContext must be used within a FilterProvider");return e},vu=g.createContext({product:void 0}),ng=({children:e,data:t,productId:r,COMMON_PAGE_COLUMN_GAP:n,SectionZone:o})=>s.jsxs(vu.Provider,{value:{productId:r},children:[e,s.jsx(d.Utils.Column,{gap:n,className:d.helpers.classNameConcat("utils-column-modifier"),children:s.jsx(o,{data:(t==null?void 0:t.sections)??[]})})]}),xu=()=>{const e=g.useContext(vu);return e||console.error("use this hook only inside PDPContentProvider hierarchy"),e},sg=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase().trim();function og(e,t=1e3){let r=!1;return(...n)=>{r||(e(...n),r=!0,setTimeout(()=>{r=!1},t))}}function ag(e,t=1e3){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>{e(...n)},t)}}const bu=(e,t)=>t.getTime()>e.getTime()?Math.abs(t.getTime()-e.getTime()):0,Qr=(e,t)=>Math.floor(t==="days"?e/(1e3*60*60*24):t==="hours"?e%(1e3*60*60*24)/(1e3*60*60):t==="minutes"?e%(1e3*60*60)/(1e3*60):e%(1e3*60)/1e3),ig=e=>{const t=Fm.decodeJwt(e??"");return{email:t.sub,userId:t.userId}},cg=["name","email","phone","date","cpf","cep"],Qa={email:/\S+@\S+\.\S+/,name:new RegExp("^\\p{L}+( \\p{L}+)*$","u"),phone:/^\d{10,11}|\(\d{2}\)\s?\d{4,5}-\d{4}$/,date:/^\d{6,8}|^\d{2}\/\d{2}\/\d{2,4}$/,cep:/^\d{5}[-]?\d{3}$/,cpf:/^\d{11}|\d{3}\.\d{3}\.?\d{3,5}\-[\d]{2}$/},ju=({type:e,input:t,required:r=!1})=>{if(typeof t!="string"||!r&&t===""||!Qa[e])return!0;const n=t.trim();return Qa[e].test(n)},lg=e=>{const t=/\/(\d+)-\d+-\d+\/(.+?)\./,r=typeof e=="string"?e.match(t):null;return r?r[2].replace(/-/g," "):wh},ug=Object.freeze(Object.defineProperty({__proto__:null,FieldTypes:cg,debounce:ag,getAltTextFromUrl:lg,getAuthenticatedUser:ig,getCookie:Zl,getDaysHoursMinutesSeconds:Qr,getMilliSeconds:bu,removeAccentsAndReplaceSpaces:sg,setCookie:ua,throttle:og,validateInput:ju},Symbol.toStringTag,{value:"Module"})),dg=({fields:e})=>{const t={};return{mountedFields:(e==null?void 0:e.reduce((n,o)=>(t[o.master_data_field]="none",{...n,[o.master_data_field]:o}),{}))??{},mountedInputsStatus:t}},fg=({formData:e,mountedFields:t,inputsStatus:r,hasTermsAndConditions:n,checkboxRef:o,setFormStatus:a})=>{let i=!1,c=!1;const l={...r};return n&&!o.current&&(a("unchecked"),i=!0),e.forEach((u,f)=>{var h;if(f==="terms-and-conditions")return;const p=(h=t[f])==null?void 0:h.required;if(p&&!u){l[f]="required",i=!0;return}ju({type:t[f].type,input:u,required:p})||(l[f]="error",c=!0),typeof u=="string"&&e.set(f,u.toString().trim())}),{hasEmptyFields:i,hasErrors:c,inputStatusToUpdate:l}},Cu=g.createContext({}),Su=({children:e,masterDataEmailField:t,fields:r,variant:n,CONSTANTS:{MASTER_DATA_ENTITY:o,NEWSLETTER_CONFIGS:a}})=>{const{sendDataLayerEvent:i}=ie(),c=a.hasTermsAndConditions,{mountedFields:l,mountedInputsStatus:u}=g.useMemo(()=>dg({fields:r}),[r]),f=g.useRef(!1),[p,m]=g.useState("idle"),[h,_]=g.useState(u),y=async({searchFields:E,entity:P})=>{const N=await lr.post("/api/master-data/search",{body:{masterDataEntity:P,searchFields:E,headers:{"REST-Range":"resources=0-49"}}});return console.info(N),N.data},v=async({documentId:E,fieldsToBeUpdated:P,entity:N})=>(await lr.post("/api/master-data/update",{dataEntityName:N,documentId:E,fieldsToBeUpdated:P})).status,b=g.useCallback(async({payload:E,response:P},N,A)=>{var F;const{email:R,...O}=E,[D]=await y({searchFields:{[N]:R},entity:A??o.newsletter}),$=Array.isArray(D)?(F=D[0])==null?void 0:F.id:void 0;return D&&await v({documentId:$,fieldsToBeUpdated:O,entity:A??o.newsletter})!==204?{...P,status:"error"}:{...P,status:"success"}},[]),C=g.useCallback(async({formData:E},P,N)=>{const A={status:"idle",inputsStatus:{}},R={};E.forEach((O,D)=>{R[D]=O});try{const D=(await lr.post("/api/master-data",{body:{payload:R,masterDataEntity:P??o.newsletter}})).data;return(D==null?void 0:D.Message)==="duplicated entry"?b({payload:R,response:A},N,P):D!=null&&D.Id?{...A,status:"success"}:{...A,status:"error"}}catch(O){return console.error("error",O),{...A,status:"error"}}},[b]),j=g.useCallback(async(E,P,N)=>{E.preventDefault();const A=new FormData(E.target);if(A.append("acceptedTerms",f.current?"true":"false"),f.current){const O=new po.TZDate(new Date,"America/Sao_Paulo").toISOString();A.append("termsAcceptedAt",O)}P&&Object.keys(P).forEach(O=>{A.append(O,P[O])});const R=await C({formData:A},N??"",t);R&&(m(R==null?void 0:R.status),_(R.inputsStatus),R.status==="success"&&i({functionKey:"readyEvents",data:{event:"generate_lead"}}))},[t,C,m,_,i]),x=g.useCallback(E=>{const P=new FormData(E.currentTarget.parentElement),{hasEmptyFields:N,hasErrors:A,inputStatusToUpdate:R}=fg({formData:P,mountedFields:l,inputsStatus:h,hasTermsAndConditions:c,checkboxRef:f,setFormStatus:m});if(_(R),N||A){E.preventDefault();return}m("loading")},[l,h,c,f]),S=g.useCallback(()=>{m("idle"),_(u)},[u]);return s.jsx(Cu.Provider,{value:g.useMemo(()=>({formStatus:p,handleSubmit:j,setFormStatus:m,inputsStatus:h,setInputsStatus:_,hasTermsAndConditions:c,handleClickToSubmit:x,checkboxRef:f,masterDataEmailField:t,fields:r,variant:n,resetNewsletter:S}),[p,j,m,h,_,x,c,f,t,r,n,S]),children:e})},pa=()=>{const e=g.useContext(Cu);if(e===void 0)throw new Error("useNewsletterContext must be used within a NewsletterProvider");return e},Eu=g.createContext({}),Pu=({children:e,data:t})=>{const[r,n]=g.useState(),[o,a]=g.useState(),i=g.useCallback(u=>{const f=t.filter(p=>p.cidade===u);n(f)},[t]),c=g.useCallback(u=>{a(u)},[]),l=g.useCallback(()=>{a("")},[]);return s.jsx(Eu.Provider,{value:g.useMemo(()=>({clearSelectedStore:l,data:t,handleSelectCity:i,handleSelectStore:c,selectedCity:r,selectedStore:o}),[l,t,i,c,r,o]),children:e})},ss=()=>{const e=g.useContext(Eu);if(e===void 0)throw new Error("useLPStoreContext must be used within a LPStoreProvider");return e},pg={contexts:{addToCart:{hook:yr,provider:bl},cart:{hook:Pe,provider:Sh},cms:{FlagsAndTags:{context:Ko,hook:Ot,provider:Bm}},newsletter:{hook:pa,provider:Su},events:{hook:ie,provider:Km},global:{hook:oe,provider:uh,mediator:Yc},header:{hook:Ae,provider:bh},menuMobile:{hook:sa,provider:vl},next:{hook:pe,provider:dh},pdp:{provider:Um},PDPContent:{provider:ng,hook:xu},plp:{provider:j_,hook:nt},plpFilter:{hook:Qt,provider:yu},PLPContent:{provider:rg,hook:ns},plpInfinite:{provider:hu,hook:xr},pdpdata:{provider:Qm},searchFacets:{hook:Ph,provider:Eh},searchProducts:{hook:Mh,provider:Dh},searchRoot:{hook:Pl,provider:El},searchSearch:{hook:Be,provider:oa},session:{hook:Vr,provider:eg},ui:{hook:dn,provider:Xc},lpStore:{hook:ss,provider:Pu}},hooks:{useBackPDC:vc,useClipboard:Xm,useDisableZoom:Ic,useLocalStorage:Zm,useOnScreen:Qo,useSentinel:es,useTouchZoomPan:Rc},stores:{cart:ch,header:ph,pdp:vh,wishlist:xh}},mg={cart:oh,events:Gm,plp:E_,product:k.productHelpers,utils:ug,search:k.search},ma={helpers:mg},rt={"add-to-cart--card":"_add-to-cart--card_4v41y_1","add-to-cart--card--content":"_add-to-cart--card--content_4v41y_7","add-to-cart--card--name":"_add-to-cart--card--name_4v41y_16","add-to-cart--card--price-quantity":"_add-to-cart--card--price-quantity_4v41y_46","add-to-cart--card--style-size":"_add-to-cart--card--style-size_4v41y_53","add-to-cart--content":"_add-to-cart--content_4v41y_71","add-to-cart--content--title":"_add-to-cart--content--title_4v41y_78","add-to-cart--footer":"_add-to-cart--footer_4v41y_102","add-to-cart--footer--total":"_add-to-cart--footer--total_4v41y_108","add-to-cart--items":"_add-to-cart--items_4v41y_148","add-to-cart--tooltip":"_add-to-cart--tooltip_4v41y_198","add-to-cart__modal":"_add-to-cart__modal_4v41y_211"},wu=({brand:e,className:t,name:r,...n})=>s.jsxs("div",{...n,className:d.helpers.classNameConcat(rt["add-to-cart--card--name"],t),children:[s.jsx(d.Tag,{style:{textTransform:"uppercase"},size:"small",variant:"quaternary",title:e,children:e}),s.jsx(d.TextStructure.Root,{children:s.jsx(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:s.jsx("p",{className:"typography-style-body-md",children:r})})})]});wu.displayName="AddToCart.Card.Name";const Nu=({className:e,listPrice:t,price:r,quantity:n,productId:o,...a})=>{const i=k.formatPriceToCurrency(r/100),c=k.formatPriceToCurrency(t/100);return s.jsx("div",{...a,className:d.helpers.classNameConcat(rt["add-to-cart--card--price-quantity"],e),children:s.jsx(d.ProductInfo.Root,{size:"small",layout:"vertical",children:s.jsx(d.ProductInfo.Wrapper,{size:"small",layout:"vertical",children:s.jsx(d.ProductInfo.ValuesWrapper,{children:r!==t?s.jsxs(s.Fragment,{children:[s.jsx(d.ProductInfo.Price,{label:"originalPrice",value:i,size:"small"},"price-list"),s.jsx(d.ProductInfo.Price,{label:"discountPrice",value:c,size:"small"},"price-low")]}):s.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:c,size:"small"},"price-low")})})})})};Nu.displayName="AddToCart.Card.PriceQuantity";const hg="_skeleton_12b79_1",_g={skeleton:hg},Iu=({style:e})=>s.jsx("div",{style:e,className:_g.skeleton}),gg="_image_1y08u_1",yg={image:gg},vg=({alt:e,className:t,objectFit:r,...n})=>{const{nextimage:o}=pe();return s.jsx(o,{quality:90,...n,alt:e??"",className:d.helpers.classNameConcat(yg.image,t),"data-object-fit":r??"cover"})},xg=({videoRef:e,...t})=>s.jsx("video",{...t,ref:e,children:s.jsx("track",{kind:"captions"})}),De={Image:vg,Video:xg},Ru=({className:e,productGroupID:t,size:r,texture:n,...o})=>{const{CONSTANTS:{TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:i}}=yr(),[c,l]=g.useState(n??"");return g.useEffect(()=>{c||fetch("/api/catalog/product/info",{method:"POST",priority:"low",body:JSON.stringify({ids:[t]})}).then(u=>u.json()).then(u=>{const f=u.data[0].items[0];if(f){const p=f.images.find(m=>a.includes(m.imageLabel));p!=null&&p.imageUrl?l(p.imageUrl):l(f.images[0].imageUrl)}}).catch(u=>{console.error(u)})},[c,t]),s.jsxs("div",{...o,className:d.helpers.classNameConcat(rt["add-to-cart--card--style-size"],e),children:[s.jsx(d.ToggleStyle.Wrapper,{size:"x-small",style:i,children:s.jsx(d.ToggleStyle.Texture,{children:c?s.jsx(De.Image,{alt:"",src:c??"",width:164,height:164,style:i}):s.jsx(Iu,{})})}),s.jsx(d.Utils.Divider,{direction:"vertical",size:"medium",style:{height:24}}),r&&s.jsxs(d.ToggleSize.Wrapper,{size:"small",title:"wrapper-texture",children:[s.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),s.jsx(d.ToggleSize.Text,{children:r})]})]})};Ru.displayName="AddToCart.Card.StyleSize";const{helpers:bg}=ma,Tu=({className:e,item:t,texture:r,...n})=>{const{itemOffered:{name:o,brand:a,skuName:i,isVariationOf:{productGroupID:c}},quantity:l,price:u,sellingPrice:f}=t,{CONSTANTS:{NAME_SPLIT_SYMBOL:p}}=yr(),{size:m}=bg.product.getColorAndSizeFromSkuName(i??o,p);return s.jsxs("div",{...n,className:d.helpers.classNameConcat(rt["add-to-cart--card--content"],e),children:[s.jsx(wu,{brand:a.name,name:o}),s.jsx(Nu,{price:u,listPrice:f,quantity:l,productId:t.id}),s.jsx(Ru,{size:m,texture:r,productGroupID:c})]})};Tu.displayName="AddToCart.Card.Content";const Au=({image:e,thumbnail:t=!1})=>s.jsx(De.Image,{alt:e.alternateName??"image","data-thumbnail":t,height:t?152:120,src:e.url,width:t?152:94});Au.displayName="AddToCart.Card";const Ou=({className:e,item:t,texture:r,thumbnail:n,...o})=>{const{itemOffered:{image:[a]}}=t,i=k.updatedResizedImg(a.url,{width:200,height:300});return s.jsxs("div",{...o,className:d.helpers.classNameConcat(rt["add-to-cart--card"],e),children:[s.jsx(Au,{image:{alternateName:a.alternateName||"Produto",url:i||""},thumbnail:n}),!n&&s.jsx(Tu,{item:t,texture:r})]})};Ou.displayName="AddToCart.Card";const Lu=({className:e,children:t,title:r,...n})=>s.jsxs("div",{...n,className:d.helpers.classNameConcat(rt["add-to-cart--content"],e),children:[s.jsx("div",{className:rt["add-to-cart--content--title"],children:r&&s.jsx("h2",{children:r})}),t,s.jsx(ur.Footer,{})]});Lu.displayName="AddToCart.Layout.Content";const ku=({className:e,...t})=>{var h,_;const{isMobile:r,handleClose:n,CONSTANTS:{ADD_TO_CART:o}}=yr(),{cartStore:{totalizers:a},setIsOpen:i}=Pe(),c=(h=a.find(y=>y.id==="Discounts"))==null?void 0:h.value,l=((_=a.find(y=>y.id==="Items"))==null?void 0:_.value)??0,u=a.find(y=>y.id==="Shipping"),p=(l-Math.abs(c??0)+((u==null?void 0:u.value)??0))/100,m=k.formatPriceToCurrency(p??0);return s.jsxs("div",{...t,className:d.helpers.classNameConcat(rt["add-to-cart--footer"],e),children:[s.jsxs("div",{className:rt["add-to-cart--footer--total"],children:[s.jsx("span",{children:"Subtotal:"}),s.jsx("span",{children:m})]}),s.jsx(d.Button,{size:"medium",variant:"primary","data-close":!0,onClick:()=>i(!0),children:o.footer.bag}),r?s.jsx(d.Button,{"data-close":!0,size:"medium",variant:"tertiary",children:o.footer.keep_buying}):s.jsx(d.Button,{onClick:()=>n(),size:"medium",variant:"tertiary",children:o.footer.keep_buying})]})};ku.displayName="AddToCart.Layout.Footer";const Du=({children:e,className:t,thumbnail:r=!1,...n})=>{const{cartStore:{options:o}}=Pe(),{recentlyAddedProducts:a}=dn(),i=a.length>3?4:a.length;return s.jsxs("div",{...n,className:rt["add-to-cart--items"],"data-thumbnail":r,children:[Array.isArray(a)&&a.filter((c,l)=>l<i).map(c=>{var u;const l=(u=o==null?void 0:o.find(f=>f.id===c.itemOffered.isVariationOf.productGroupID))==null?void 0:u.texture;return s.jsx(ur.Card,{item:c,thumbnail:r,texture:l},c.itemOffered.sku)}),e]})};Du.displayName="AddToCart.Layout.Items";const Mu=({children:e,Z_INDEX_WAR:t})=>{const{isOpen:r,setIsOpen:n}=yr(),{isMobile:o}=oe();return s.jsxs(d.Modal.Root,{"data-modal":"add-to-cart--modal",className:rt["add-to-cart__modal"],isMobile:o??!1,isOpen:r,setIsOpen:n,variant:"sideBottom",style:{zIndex:t.modal},children:[s.jsx(d.Modal.Header,{navigation:"top",children:s.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0})}),s.jsx(d.Modal.Body,{children:e})]})};Mu.displayName="AddToCart.Modal";const jg=({children:e})=>{const{count:t,handleClose:r,setIsOpen:n}=yr(),o=g.useRef(t);return g.useEffect(()=>{t>o.current&&n(!0),t<o.current&&o.current>=1&&r(),o.current=t},[t,r,n]),s.jsx(s.Fragment,{children:e})},Fu=({children:e,component:t,CONSTANTS:r,...n})=>{const{recentlyAddedProducts:o}=dn(),{isMobile:a}=oe(),i=o.length>3?4:o.length;return s.jsx(bl,{...n,count:i,isMobile:a,CONSTANTS:r,children:s.jsx(jg,{children:a?s.jsxs(s.Fragment,{children:[s.jsx(ur.Modal,{Z_INDEX_WAR:r.Z_INDEX_WAR,children:t}),e]}):s.jsx(ur.Tooltip,{component:t,style:{width:350},Z_INDEX_WAR:r.Z_INDEX_WAR,children:e})})})};Fu.displayName="AddToCart.Root";const zu=({children:e,component:t,Z_INDEX_WAR:r,...n})=>{const{contentRef:o,left:a,isLeaving:i,target:c,isOpen:l,top:u}=yr();return s.jsx(d.Tooltip.Root,{arrow:"top-right",component:s.jsx("div",{...n,ref:o,children:t}),id:"add-to-cart--tooltip",className:rt["add-to-cart--tooltip"],style:{zIndex:r.modal},isLeaving:i,isOpen:l,left:a,size:"medium",position:"top",top:u,children:s.jsx("div",{className:rt["add-to-cart--tooltip"],ref:c,children:e})})};zu.displayName="AddToCart.Tooltip";const ur={Card:Ou,Content:Lu,Footer:ku,Items:Du,Modal:Mu,Root:Fu,Tooltip:zu},ha=({title:e,...t})=>{const{recentlyAddedProducts:r}=dn(),{isMobile:n}=oe(),o=r.length>3?4:r.length,a=r.length>(o??1),i=r.length>1;return s.jsx(ur.Root,{isMobile:n,count:r.length,component:s.jsx(ur.Content,{title:e,children:s.jsx(ur.Items,{thumbnail:i,children:a&&s.jsx(d.Badge.Count,{count:r.length-o,size:"medium",variant:"secondary"})})}),...t})};ha.displayName="AddToCart";const Xa={"backtotop-btn":"_backtotop-btn_vcjsm_1","card-modifier":"_card-modifier_vcjsm_29"},Cg=({children:e,className:t,classNameButton:r,adornment:n,iconPosition:o,scrollToOptions:a,style:i,...c})=>{const l={top:(a==null?void 0:a.top)??0,left:(a==null?void 0:a.left)??0,behavior:(a==null?void 0:a.behavior)??"smooth"},f=o&&n?{flexDirection:{top:"column",bottom:"column-reverse",left:"row",right:"row-reverse"}[o]}:{},p=()=>{window&&window.document.body.scrollTo({...l})};return s.jsx(d.Card,{...c,shadow:!0,padding:"small",className:d.helpers.classNameConcat(Xa["card-modifier"],t),style:{...i,padding:0},children:s.jsxs("button",{className:d.helpers.classNameConcat(Xa["backtotop-btn"],r),onClick:p,style:{...f},"data-orientation":o,children:[n,e]})})},Sg="_container_1sy8s_16",Ft={"carousel-container":"_carousel-container_1sy8s_1","add-cart-container":"_add-cart-container_1sy8s_8",container:Sg,"add-itens-to-cart-container":"_add-itens-to-cart-container_1sy8s_38","add-itens-to-cart-container-values":"_add-itens-to-cart-container-values_1sy8s_45","add-itens-to-cart-qty-products":"_add-itens-to-cart-qty-products_1sy8s_50","add-itens-to-cart-total":"_add-itens-to-cart-total_1sy8s_60","add-button":"_add-button_1sy8s_70"},Eg=({selectedProducts:e,handleAddAllToCart:t,CONSTANTS:r})=>{const n=Object.values(e.products).length;return s.jsxs("div",{className:Ft["add-itens-to-cart-container"],children:[s.jsxs("div",{className:Ft["add-itens-to-cart-container-values"],children:[s.jsx("div",{className:Ft["add-itens-to-cart-qty-products"],children:s.jsx("span",{children:n===0?r.BUY_PACKAGE.group_cart.select_all_product:`${n} ${n===1?r.BUY_PACKAGE.group_cart.select_product:r.BUY_PACKAGE.group_cart.select_product+"s"}`})}),s.jsx("div",{className:Ft["add-itens-to-cart-total"],children:s.jsx("span",{children:k.freightParsePrice({valueInCents:e.totalPrice*100,hasFree:!1,freeTaxMessage:r.FREIGHT_CALCULATION.messages.free_tax})})})]}),s.jsx(d.Button,{onClick:t,className:Ft["add-button"],size:"large",disabled:n===0,variant:"primary",children:r.BUY_BUTTON_LABELS.add_to_cart})]})},Pg=e=>e.reduce((t,r)=>{var o;const n=t.find(a=>a.node.id===r.node.id);if(!n)return[...t,r];if((o=n==null?void 0:n.node.isVariantOf)!=null&&o.hasVariant){const a=n.node.isVariantOf.hasVariant,i=r.node.isVariantOf.hasVariant;a&&i&&(n.node.isVariantOf.hasVariant=[...a,...i])}return t},[]),wg=({selectedProduct:e,productId:t,prevState:r,mainSellerId:n})=>{const{products:o,totalPrice:a}=r;try{if(!e){const{[t]:u,...f}=o;return{...r,totalPrice:a-u.price,products:f}}const i=k.getValidOffer(e.offers.offers,n);if(!i)return r;const c=i.seller.identifier,l=i.price;if(o[t]){const{price:u}=o[t];return o[t]={...o[t],price:l,id:e.sku,seller:c},{totalPrice:a+l-u,products:{...o}}}return{totalPrice:a+l,products:{...o,[t]:{id:e.sku,price:l,seller:c,productId:t}}}}catch(i){return console.error("Error handling SKU selection:",i),r}},Bu=g.createContext({}),Ng=({children:e,item:t,index:r,shelfTitle:n,...o})=>{const[a,i]=g.useState(null),c=g.useRef(null),l=g.useRef({availableSkus:[],priceInfo:{price:0,listPrice:0}}),{sendDataLayerEvent:u,itemListRef:f}=ie(),p=y=>{u({functionKey:"productEvents",data:{commonData:{...t,availableSizes:l.current.availableSkus,...l.current.priceInfo},customData:{index:r+1},event:y}})},m=()=>{p("add_to_wishlist")},h=()=>{u({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...t,...l.current.priceInfo}]},supportData:{selectedSku:a,selectedSkus:[a]},customData:{index:r}}})},_=()=>{n&&(f.current={item_list_name:n}),p("select_item")};return s.jsx(Bu.Provider,{value:g.useMemo(()=>({...o,index:r,item:t,element:c,selectedSku:a,setSelectedSku:i,eventDataRef:l,sendAddToWishlistEvent:m,sendSelectItemEvent:_,sendAddToCartEvent:h}),[o,t,c,a]),children:e})},ft=()=>{const e=g.useContext(Bu);if(e===void 0)throw new Error("useProductCardContext must be used within a ProductCardProvider");return e},ze={"product-card--actions":"_product-card--actions_bndjh_1","product-card--actions--group":"_product-card--actions--group_bndjh_9","product-card--actions--selectors":"_product-card--actions--selectors_bndjh_21","product-card--body":"_product-card--body_bndjh_33","product-card--header":"_product-card--header_bndjh_47","product-card--footer":"_product-card--footer_bndjh_67","product-card--image":"_product-card--image_bndjh_90","product-card--image--container":"_product-card--image--container_bndjh_97","product-card--outstock":"_product-card--outstock_bndjh_133","product-card--price":"_product-card--price_bndjh_155","product-card--title":"_product-card--title_bndjh_177","product-card--title--tag":"_product-card--title--tag_bndjh_183","product-card--title--content":"_product-card--title--content_bndjh_200","product-card--selectors--size":"_product-card--selectors--size_bndjh_240","product-card--selectors--size--button":"_product-card--selectors--size--button_bndjh_266","product-card--selectors--size--skus":"_product-card--selectors--size--skus_bndjh_275","product-card--selectors--style":"_product-card--selectors--style_bndjh_289","product-card--selectors--style--more":"_product-card--selectors--style--more_bndjh_299","product-card--video":"_product-card--video_bndjh_316","product-card--wrapper":"_product-card--wrapper_bndjh_342"},Uu=({callback:e,children:t,className:r,data:n,isKit:o,...a})=>{const{item:{availability:{status:i},image:c}}=ft();return i?s.jsxs("div",{...a,className:d.helpers.classNameConcat(ze["product-card--actions"],r),children:[s.jsxs(ye.Wrapper,{type:"actions--group",children:[s.jsx(ye.Price,{}),s.jsx("div",{className:ze["product-card--actions--selectors"],children:!o&&s.jsx(ye.StyleSelector,{data:n,images:c,callback:e})})]}),t]}):null};Uu.displayName="ProductCard.Actions";const qu=({className:e,isKit:t,...r})=>{const{addToCart:n}=Pe(),{isMobile:o=!1,selectedSku:a,outStock:i,item:c,sendAddToCartEvent:l,CONSTANTS:u}=ft(),f=()=>{var h;if(!a)return;const m=k.getValidOffer(a.offers.offers,u.StoreConfig_MainSellerId);m&&n({id:a==null?void 0:a.sku,quantity:1,seller:m.seller.identifier},{id:c.id,texture:(h=c==null?void 0:c.image.find(_=>u.TEXTURE_IMAGE.includes(_.alternateName)))==null?void 0:h.url}),l()},p=a?u.BUY_BUTTON_LABELS.add_to_cart:u.BUY_BUTTON_LABELS.select_size;return s.jsx(d.Button,{...r,className:d.helpers.classNameConcat(e,"buy-button"),disabled:!t&&!a&&!i,size:o?"medium":"large",variant:i?"secondary":"primary",onClick:i?r.onClick:f,children:i?"Avise-me quando chegar":p})};qu.displayName="ProductCard.Actions.BuyButton";const Ig={"snackbar-modifier":"_snackbar-modifier_1va2l_1"},wr=({size:e,adornment:t,title:r,subtitle:n,supportChildren:o,className:a,Z_INDEX_WAR:i,...c})=>s.jsxs(d.SnackBar.Structure,{...c,size:e,className:d.helpers.classNameConcat(Ig["snackbar-modifier"],a),width:360,style:{zIndex:i.snackbar},children:[s.jsx(d.SnackBar.Content,{adornment:t,title:r,subtitle:n}),o&&s.jsx(d.SnackBar.Support,{children:o})]});wr.displayName="SnackBar";const Zr={"wishlist--snack":"_wishlist--snack_3qi1o_9","wishlist--snack--actions":"_wishlist--snack--actions_3qi1o_25","wishlist-grid":"_wishlist-grid_3qi1o_31","wishlist-grid--container":"_wishlist-grid--container_3qi1o_39","pdc-empty-modifier":"_pdc-empty-modifier_3qi1o_49"};var Lo={exports:{}},Ve={};Ve._=Ve._interop_require_default=Rg;function Rg(e){return e&&e.__esModule?e:{default:e}}var wn={exports:{}},xs={},Ya;function $u(){return Ya||(Ya=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}t(e,{assign:function(){return a},searchParamsToUrlQuery:function(){return r},urlQueryToSearchParams:function(){return o}});function r(i){const c={};return i.forEach((l,u)=>{typeof c[u]>"u"?c[u]=l:Array.isArray(c[u])?c[u].push(l):c[u]=[c[u],l]}),c}function n(i){return typeof i=="string"||typeof i=="number"&&!isNaN(i)||typeof i=="boolean"?String(i):""}function o(i){const c=new URLSearchParams;return Object.entries(i).forEach(l=>{let[u,f]=l;Array.isArray(f)?f.forEach(p=>c.append(u,n(p))):c.set(u,n(f))}),c}function a(i){for(var c=arguments.length,l=new Array(c>1?c-1:0),u=1;u<c;u++)l[u-1]=arguments[u];return l.forEach(f=>{Array.from(f.keys()).forEach(p=>i.delete(p)),f.forEach((p,m)=>i.append(m,p))}),i}}(xs)),xs}var bs={},qr={};function Hu(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(Hu=function(n){return n?r:t})(e)}qr._=qr._interop_require_wildcard=Tg;function Tg(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=Hu(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}return n.default=e,r&&r.set(e,n),n}var Za;function Vu(){return Za||(Za=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var f in u)Object.defineProperty(l,f,{enumerable:!0,get:u[f]})}t(e,{formatUrl:function(){return a},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}});const n=qr._($u()),o=/https?|ftp|gopher|file/;function a(l){let{auth:u,hostname:f}=l,p=l.protocol||"",m=l.pathname||"",h=l.hash||"",_=l.query||"",y=!1;u=u?encodeURIComponent(u).replace(/%3A/i,":")+"@":"",l.host?y=u+l.host:f&&(y=u+(~f.indexOf(":")?"["+f+"]":f),l.port&&(y+=":"+l.port)),_&&typeof _=="object"&&(_=String(n.urlQueryToSearchParams(_)));let v=l.search||_&&"?"+_||"";return p&&!p.endsWith(":")&&(p+=":"),l.slashes||(!p||o.test(p))&&y!==!1?(y="//"+(y||""),m&&m[0]!=="/"&&(m="/"+m)):y||(y=""),h&&h[0]!=="#"&&(h="#"+h),v&&v[0]!=="?"&&(v="?"+v),m=m.replace(/[?#]/g,encodeURIComponent),v=v.replace("#","%23"),""+p+y+m+v+h}const i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(l){return process.env.NODE_ENV==="development"&&l!==null&&typeof l=="object"&&Object.keys(l).forEach(u=>{i.includes(u)||console.warn("Unknown key passed via urlObject into url.format: "+u)}),a(l)}}(bs)),bs}var js={},Ja;function Ag(){return Ja||(Ja=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"omit",{enumerable:!0,get:function(){return t}});function t(r,n){const o={};return Object.keys(r).forEach(a=>{n.includes(a)||(o[a]=r[a])}),o}}(js)),js}var Cs={},ei;function os(){return ei||(ei=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(x,S){for(var E in S)Object.defineProperty(x,E,{enumerable:!0,get:S[E]})}t(e,{DecodeError:function(){return _},MiddlewareNotFoundError:function(){return C},MissingStaticPage:function(){return b},NormalizeError:function(){return y},PageNotFoundError:function(){return v},SP:function(){return m},ST:function(){return h},WEB_VITALS:function(){return r},execOnce:function(){return n},getDisplayName:function(){return l},getLocationOrigin:function(){return i},getURL:function(){return c},isAbsoluteUrl:function(){return a},isResSent:function(){return u},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return f},stringifyError:function(){return j}});const r=["CLS","FCP","FID","INP","LCP","TTFB"];function n(x){let S=!1,E;return function(){for(var P=arguments.length,N=new Array(P),A=0;A<P;A++)N[A]=arguments[A];return S||(S=!0,E=x(...N)),E}}const o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,a=x=>o.test(x);function i(){const{protocol:x,hostname:S,port:E}=window.location;return x+"//"+S+(E?":"+E:"")}function c(){const{href:x}=window.location,S=i();return x.substring(S.length)}function l(x){return typeof x=="string"?x:x.displayName||x.name||"Unknown"}function u(x){return x.finished||x.headersSent}function f(x){const S=x.split("?");return S[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(S[1]?"?"+S.slice(1).join("?"):"")}async function p(x,S){if(process.env.NODE_ENV!=="production"){var E;if((E=x.prototype)!=null&&E.getInitialProps){const A='"'+l(x)+'.getInitialProps()" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.';throw new Error(A)}}const P=S.res||S.ctx&&S.ctx.res;if(!x.getInitialProps)return S.ctx&&S.Component?{pageProps:await p(S.Component,S.ctx)}:{};const N=await x.getInitialProps(S);if(P&&u(P))return N;if(!N){const A='"'+l(x)+'.getInitialProps()" should resolve to an object. But found "'+N+'" instead.';throw new Error(A)}return process.env.NODE_ENV!=="production"&&Object.keys(N).length===0&&!S.ctx&&console.warn(""+l(x)+" returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps"),N}const m=typeof performance<"u",h=m&&["mark","measure","getEntriesByName"].every(x=>typeof performance[x]=="function");class _ extends Error{}class y extends Error{}class v extends Error{constructor(S){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+S}}class b extends Error{constructor(S,E){super(),this.message="Failed to load static file for page: "+S+" "+E}}class C extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function j(x){return JSON.stringify({message:x.message,stack:x.stack})}}(Cs)),Cs}var Nn={exports:{}},Ss={},ti;function Wu(){return ti||(ti=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"removeTrailingSlash",{enumerable:!0,get:function(){return t}});function t(r){return r.replace(/\/$/,"")||"/"}}(Ss)),Ss}var Es={},ri;function _a(){return ri||(ri=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"parsePath",{enumerable:!0,get:function(){return t}});function t(r){const n=r.indexOf("#"),o=r.indexOf("?"),a=o>-1&&(n<0||o<n);return a||n>-1?{pathname:r.substring(0,a?o:n),query:a?r.substring(o,n>-1?n:void 0):"",hash:n>-1?r.slice(n):""}:{pathname:r,query:"",hash:""}}}(Es)),Es}var ni;function as(){return ni||(ni=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return o}});const r=Wu(),n=_a(),o=a=>{if(!a.startsWith("/")||process.env.__NEXT_MANUAL_TRAILING_SLASH)return a;const{pathname:i,query:c,hash:l}=(0,n.parsePath)(a);return process.env.__NEXT_TRAILING_SLASH?/\.[^/]+\/?$/.test(i)?""+(0,r.removeTrailingSlash)(i)+c+l:i.endsWith("/")?""+i+c+l:i+"/"+c+l:""+(0,r.removeTrailingSlash)(i)+c+l};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Nn,Nn.exports)),Nn.exports}var Ps={},In={exports:{}},ws={},si;function Gu(){return si||(si=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"pathHasPrefix",{enumerable:!0,get:function(){return r}});const t=_a();function r(n,o){if(typeof n!="string")return!1;const{pathname:a}=(0,t.parsePath)(n);return a===o||a.startsWith(o+"/")}}(ws)),ws}var oi;function Og(){return oi||(oi=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return o}});const r=Gu(),n=process.env.__NEXT_ROUTER_BASEPATH||"";function o(a){return(0,r.pathHasPrefix)(a,n)}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(In,In.exports)),In.exports}var ai;function Ku(){return ai||(ai=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isLocalURL",{enumerable:!0,get:function(){return n}});const t=os(),r=Og();function n(o){if(!(0,t.isAbsoluteUrl)(o))return!0;try{const a=(0,t.getLocationOrigin)(),i=new URL(o,a);return i.origin===a&&(0,r.hasBasePath)(i.pathname)}catch{return!1}}}(Ps)),Ps}var Ns={},Is={},ii;function Lg(){return ii||(ii=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getSortedRoutes",{enumerable:!0,get:function(){return r}});class t{insert(o){this._insert(o.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(o){o===void 0&&(o="/");const a=[...this.children.keys()].sort();this.slugName!==null&&a.splice(a.indexOf("[]"),1),this.restSlugName!==null&&a.splice(a.indexOf("[...]"),1),this.optionalRestSlugName!==null&&a.splice(a.indexOf("[[...]]"),1);const i=a.map(c=>this.children.get(c)._smoosh(""+o+c+"/")).reduce((c,l)=>[...c,...l],[]);if(this.slugName!==null&&i.push(...this.children.get("[]")._smoosh(o+"["+this.slugName+"]/")),!this.placeholder){const c=o==="/"?"/":o.slice(0,-1);if(this.optionalRestSlugName!=null)throw new Error('You cannot define a route with the same specificity as a optional catch-all route ("'+c+'" and "'+c+"[[..."+this.optionalRestSlugName+']]").');i.unshift(c)}return this.restSlugName!==null&&i.push(...this.children.get("[...]")._smoosh(o+"[..."+this.restSlugName+"]/")),this.optionalRestSlugName!==null&&i.push(...this.children.get("[[...]]")._smoosh(o+"[[..."+this.optionalRestSlugName+"]]/")),i}_insert(o,a,i){if(o.length===0){this.placeholder=!1;return}if(i)throw new Error("Catch-all must be the last part of the URL.");let c=o[0];if(c.startsWith("[")&&c.endsWith("]")){let f=function(p,m){if(p!==null&&p!==m)throw new Error("You cannot use different slug names for the same dynamic path ('"+p+"' !== '"+m+"').");a.forEach(h=>{if(h===m)throw new Error('You cannot have the same slug name "'+m+'" repeat within a single dynamic path');if(h.replace(/\W/g,"")===c.replace(/\W/g,""))throw new Error('You cannot have the slug names "'+h+'" and "'+m+'" differ only by non-word symbols within a single dynamic path')}),a.push(m)},l=c.slice(1,-1),u=!1;if(l.startsWith("[")&&l.endsWith("]")&&(l=l.slice(1,-1),u=!0),l.startsWith("...")&&(l=l.substring(3),i=!0),l.startsWith("[")||l.endsWith("]"))throw new Error("Segment names may not start or end with extra brackets ('"+l+"').");if(l.startsWith("."))throw new Error("Segment names may not start with erroneous periods ('"+l+"').");if(i)if(u){if(this.restSlugName!=null)throw new Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+o[0]+'" ).');f(this.optionalRestSlugName,l),this.optionalRestSlugName=l,c="[[...]]"}else{if(this.optionalRestSlugName!=null)throw new Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+o[0]+'").');f(this.restSlugName,l),this.restSlugName=l,c="[...]"}else{if(u)throw new Error('Optional route parameters are not yet supported ("'+o[0]+'").');f(this.slugName,l),this.slugName=l,c="[]"}}this.children.has(c)||this.children.set(c,new t),this.children.get(c)._insert(o.slice(1),a,i)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function r(n){const o=new t;return n.forEach(a=>o.insert(a)),o.smoosh()}}(Is)),Is}var Rs={},Ts={},As={},Os={},ci;function kg(){return ci||(ci=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ensureLeadingSlash",{enumerable:!0,get:function(){return t}});function t(r){return r.startsWith("/")?r:"/"+r}}(Os)),Os}var Ls={},li;function Dg(){return li||(li=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}t(e,{DEFAULT_SEGMENT_KEY:function(){return o},PAGE_SEGMENT_KEY:function(){return n},isGroupSegment:function(){return r}});function r(a){return a[0]==="("&&a.endsWith(")")}const n="__PAGE__",o="__DEFAULT__"}(Ls)),Ls}var ui;function Mg(){return ui||(ui=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}t(e,{normalizeAppPath:function(){return o},normalizeRscURL:function(){return a}});const r=kg(),n=Dg();function o(i){return(0,r.ensureLeadingSlash)(i.split("/").reduce((c,l,u,f)=>!l||(0,n.isGroupSegment)(l)||l[0]==="@"||(l==="page"||l==="route")&&u===f.length-1?c:c+"/"+l,""))}function a(i){return i.replace(/\.rsc($|\?)/,"$1")}}(As)),As}var di;function Qu(){return di||(di=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}t(e,{INTERCEPTION_ROUTE_MARKERS:function(){return n},extractInterceptionRouteInformation:function(){return a},isInterceptionRouteAppPath:function(){return o}});const r=Mg(),n=["(..)(..)","(.)","(..)","(...)"];function o(i){return i.split("/").find(c=>n.find(l=>c.startsWith(l)))!==void 0}function a(i){let c,l,u;for(const f of i.split("/"))if(l=n.find(p=>f.startsWith(p)),l){[c,u]=i.split(l,2);break}if(!c||!l||!u)throw new Error(`Invalid interception route: ${i}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`);switch(c=(0,r.normalizeAppPath)(c),l){case"(.)":c==="/"?u=`/${u}`:u=c+"/"+u;break;case"(..)":if(c==="/")throw new Error(`Invalid interception route: ${i}. Cannot use (..) marker at the root level, use (.) instead.`);u=c.split("/").slice(0,-1).concat(u).join("/");break;case"(...)":u="/"+u;break;case"(..)(..)":const f=c.split("/");if(f.length<=2)throw new Error(`Invalid interception route: ${i}. Cannot use (..)(..) marker at the root level or one level up.`);u=f.slice(0,-2).concat(u).join("/");break;default:throw new Error("Invariant: unexpected marker")}return{interceptingRoute:c,interceptedRoute:u}}}(Ts)),Ts}var fi;function Fg(){return fi||(fi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isDynamicRoute",{enumerable:!0,get:function(){return n}});const t=Qu(),r=/\/\[[^/]+?\](?=\/|$)/;function n(o){return(0,t.isInterceptionRouteAppPath)(o)&&(o=(0,t.extractInterceptionRouteInformation)(o).interceptedRoute),r.test(o)}}(Rs)),Rs}var pi;function zg(){return pi||(pi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(o,a){for(var i in a)Object.defineProperty(o,i,{enumerable:!0,get:a[i]})}t(e,{getSortedRoutes:function(){return r.getSortedRoutes},isDynamicRoute:function(){return n.isDynamicRoute}});const r=Lg(),n=Fg()}(Ns)),Ns}var ks={},Ds={},mi;function Bg(){return mi||(mi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getRouteMatcher",{enumerable:!0,get:function(){return r}});const t=os();function r(n){let{re:o,groups:a}=n;return i=>{const c=o.exec(i);if(!c)return!1;const l=f=>{try{return decodeURIComponent(f)}catch{throw new t.DecodeError("failed to decode param")}},u={};return Object.keys(a).forEach(f=>{const p=a[f],m=c[p.pos];m!==void 0&&(u[f]=~m.indexOf("/")?m.split("/").map(h=>l(h)):p.repeat?[l(m)]:l(m))}),u}}}(Ds)),Ds}var Ms={},Fs={},hi;function Ug(){return hi||(hi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(W,X){for(var je in X)Object.defineProperty(W,je,{enumerable:!0,get:X[je]})}t(e,{ACTION_SUFFIX:function(){return l},APP_DIR_ALIAS:function(){return O},CACHE_ONE_YEAR:function(){return x},DOT_NEXT_ALIAS:function(){return A},ESLINT_DEFAULT_DIRS:function(){return le},GSP_NO_RETURNED_VALUE:function(){return ae},GSSP_COMPONENT_MEMBER_ERROR:function(){return te},GSSP_NO_RETURNED_VALUE:function(){return ue},INSTRUMENTATION_HOOK_FILENAME:function(){return P},MIDDLEWARE_FILENAME:function(){return S},MIDDLEWARE_LOCATION_REGEXP:function(){return E},NEXT_BODY_SUFFIX:function(){return p},NEXT_CACHE_IMPLICIT_TAG_ID:function(){return j},NEXT_CACHE_REVALIDATED_TAGS_HEADER:function(){return _},NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER:function(){return y},NEXT_CACHE_SOFT_TAGS_HEADER:function(){return h},NEXT_CACHE_SOFT_TAG_MAX_LENGTH:function(){return C},NEXT_CACHE_TAGS_HEADER:function(){return m},NEXT_CACHE_TAG_MAX_ITEMS:function(){return v},NEXT_CACHE_TAG_MAX_LENGTH:function(){return b},NEXT_DATA_SUFFIX:function(){return u},NEXT_INTERCEPTION_MARKER_PREFIX:function(){return n},NEXT_META_SUFFIX:function(){return f},NEXT_QUERY_PARAM_PREFIX:function(){return r},NON_STANDARD_NODE_ENV:function(){return T},PAGES_DIR_ALIAS:function(){return N},PRERENDER_REVALIDATE_HEADER:function(){return o},PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER:function(){return a},PUBLIC_DIR_MIDDLEWARE_CONFLICT:function(){return J},ROOT_DIR_ALIAS:function(){return R},RSC_ACTION_CLIENT_WRAPPER_ALIAS:function(){return V},RSC_ACTION_ENCRYPTION_ALIAS:function(){return q},RSC_ACTION_PROXY_ALIAS:function(){return F},RSC_ACTION_VALIDATE_ALIAS:function(){return $},RSC_MOD_REF_PROXY_ALIAS:function(){return D},RSC_PREFETCH_SUFFIX:function(){return i},RSC_SUFFIX:function(){return c},SERVER_PROPS_EXPORT_ERROR:function(){return me},SERVER_PROPS_GET_INIT_PROPS_CONFLICT:function(){return H},SERVER_PROPS_SSG_CONFLICT:function(){return ee},SERVER_RUNTIME:function(){return be},SSG_FALLBACK_EXPORT_ERROR:function(){return Q},SSG_GET_INITIAL_PROPS_CONFLICT:function(){return Z},STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR:function(){return ce},UNSTABLE_REVALIDATE_RENAME_ERROR:function(){return z},WEBPACK_LAYERS:function(){return L},WEBPACK_RESOURCE_QUERIES:function(){return Le}});const r="nxtP",n="nxtI",o="x-prerender-revalidate",a="x-prerender-revalidate-if-generated",i=".prefetch.rsc",c=".rsc",l=".action",u=".json",f=".meta",p=".body",m="x-next-cache-tags",h="x-next-cache-soft-tags",_="x-next-revalidated-tags",y="x-next-revalidate-tag-token",v=128,b=256,C=1024,j="_N_T_",x=31536e3,S="middleware",E=`(?:src/)?${S}`,P="instrumentation",N="private-next-pages",A="private-dot-next",R="private-next-root-dir",O="private-next-app-dir",D="private-next-rsc-mod-ref-proxy",$="private-next-rsc-action-validate",F="private-next-rsc-server-reference",q="private-next-rsc-action-encryption",V="private-next-rsc-action-client-wrapper",J="You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict",Z="You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps",H="You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.",ee="You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps",ce="can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props",me="pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export",ae="Your `getStaticProps` function did not return an object. Did you forget to add a `return`?",ue="Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?",z="The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.",te="can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member",T='You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env',Q="Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export",le=["app","pages","components","lib","src"],be={edge:"edge",experimentalEdge:"experimental-edge",nodejs:"nodejs"},I={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",api:"api",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser",appMetadataRoute:"app-metadata-route",appRouteHandler:"app-route-handler"},L={...I,GROUP:{serverOnly:[I.reactServerComponents,I.actionBrowser,I.appMetadataRoute,I.appRouteHandler,I.instrument],clientOnly:[I.serverSideRendering,I.appPagesBrowser],nonClientServerTarget:[I.middleware,I.api],app:[I.reactServerComponents,I.actionBrowser,I.appMetadataRoute,I.appRouteHandler,I.serverSideRendering,I.appPagesBrowser,I.shared,I.instrument]}},Le={edgeSSREntry:"__next_edge_ssr_entry__",metadata:"__next_metadata__",metadataRoute:"__next_metadata_route__",metadataImageMeta:"__next_metadata_image_meta__"}}(Fs)),Fs}var zs={},_i;function qg(){return _i||(_i=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"escapeStringRegexp",{enumerable:!0,get:function(){return n}});const t=/[|\\{}()[\]^$+*?.-]/,r=/[|\\{}()[\]^$+*?.-]/g;function n(o){return t.test(o)?o.replace(r,"\\$&"):o}}(zs)),zs}var gi;function $g(){return gi||(gi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(_,y){for(var v in y)Object.defineProperty(_,v,{enumerable:!0,get:y[v]})}t(e,{getNamedMiddlewareRegex:function(){return h},getNamedRouteRegex:function(){return m},getRouteRegex:function(){return l},parseParameter:function(){return i}});const r=Ug(),n=Qu(),o=qg(),a=Wu();function i(_){const y=_.startsWith("[")&&_.endsWith("]");y&&(_=_.slice(1,-1));const v=_.startsWith("...");return v&&(_=_.slice(3)),{key:_,repeat:v,optional:y}}function c(_){const y=(0,a.removeTrailingSlash)(_).slice(1).split("/"),v={};let b=1;return{parameterizedRoute:y.map(C=>{const j=n.INTERCEPTION_ROUTE_MARKERS.find(S=>C.startsWith(S)),x=C.match(/\[((?:\[.*\])|.+)\]/);if(j&&x){const{key:S,optional:E,repeat:P}=i(x[1]);return v[S]={pos:b++,repeat:P,optional:E},"/"+(0,o.escapeStringRegexp)(j)+"([^/]+?)"}else if(x){const{key:S,repeat:E,optional:P}=i(x[1]);return v[S]={pos:b++,repeat:E,optional:P},E?P?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}else return"/"+(0,o.escapeStringRegexp)(C)}).join(""),groups:v}}function l(_){const{parameterizedRoute:y,groups:v}=c(_);return{re:new RegExp("^"+y+"(?:/)?$"),groups:v}}function u(){let _=0;return()=>{let y="",v=++_;for(;v>0;)y+=String.fromCharCode(97+(v-1)%26),v=Math.floor((v-1)/26);return y}}function f(_){let{interceptionMarker:y,getSafeRouteKey:v,segment:b,routeKeys:C,keyPrefix:j}=_;const{key:x,optional:S,repeat:E}=i(b);let P=x.replace(/\W/g,"");j&&(P=""+j+P);let N=!1;(P.length===0||P.length>30)&&(N=!0),isNaN(parseInt(P.slice(0,1)))||(N=!0),N&&(P=v()),j?C[P]=""+j+x:C[P]=x;const A=y?(0,o.escapeStringRegexp)(y):"";return E?S?"(?:/"+A+"(?<"+P+">.+?))?":"/"+A+"(?<"+P+">.+?)":"/"+A+"(?<"+P+">[^/]+?)"}function p(_,y){const v=(0,a.removeTrailingSlash)(_).slice(1).split("/"),b=u(),C={};return{namedParameterizedRoute:v.map(j=>{const x=n.INTERCEPTION_ROUTE_MARKERS.some(E=>j.startsWith(E)),S=j.match(/\[((?:\[.*\])|.+)\]/);if(x&&S){const[E]=j.split(S[0]);return f({getSafeRouteKey:b,interceptionMarker:E,segment:S[1],routeKeys:C,keyPrefix:y?r.NEXT_INTERCEPTION_MARKER_PREFIX:void 0})}else return S?f({getSafeRouteKey:b,segment:S[1],routeKeys:C,keyPrefix:y?r.NEXT_QUERY_PARAM_PREFIX:void 0}):"/"+(0,o.escapeStringRegexp)(j)}).join(""),routeKeys:C}}function m(_,y){const v=p(_,y);return{...l(_),namedRegex:"^"+v.namedParameterizedRoute+"(?:/)?$",routeKeys:v.routeKeys}}function h(_,y){const{parameterizedRoute:v}=c(_),{catchAll:b=!0}=y;if(v==="/")return{namedRegex:"^/"+(b?".*":"")+"$"};const{namedParameterizedRoute:C}=p(_,!1);let j=b?"(?:(/.*)?)":"";return{namedRegex:"^"+C+j+"$"}}}(Ms)),Ms}var yi;function Hg(){return yi||(yi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"interpolateAs",{enumerable:!0,get:function(){return n}});const t=Bg(),r=$g();function n(o,a,i){let c="";const l=(0,r.getRouteRegex)(o),u=l.groups,f=(a!==o?(0,t.getRouteMatcher)(l)(a):"")||i;c=o;const p=Object.keys(u);return p.every(m=>{let h=f[m]||"";const{repeat:_,optional:y}=u[m];let v="["+(_?"...":"")+m+"]";return y&&(v=(h?"":"/")+"["+v+"]"),_&&!Array.isArray(h)&&(h=[h]),(y||m in f)&&(c=c.replace(v,_?h.map(b=>encodeURIComponent(b)).join("/"):encodeURIComponent(h))||"/")})||(c=""),{params:p,result:c}}}(ks)),ks}var vi;function Vg(){return vi||(vi=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return f}});const r=$u(),n=Vu(),o=Ag(),a=os(),i=as(),c=Ku(),l=zg(),u=Hg();function f(p,m,h){let _,y=typeof m=="string"?m:(0,n.formatWithValidation)(m);const v=y.match(/^[a-zA-Z]{1,}:\/\//),b=v?y.slice(v[0].length):y;if((b.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+y+"' passed to next/router in page: '"+p.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");const j=(0,a.normalizeRepeatedSlashes)(b);y=(v?v[0]:"")+j}if(!(0,c.isLocalURL)(y))return h?[y]:y;try{_=new URL(y.startsWith("#")?p.asPath:p.pathname,"http://n")}catch{_=new URL("/","http://n")}try{const j=new URL(y,_);j.pathname=(0,i.normalizePathTrailingSlash)(j.pathname);let x="";if((0,l.isDynamicRoute)(j.pathname)&&j.searchParams&&h){const E=(0,r.searchParamsToUrlQuery)(j.searchParams),{result:P,params:N}=(0,u.interpolateAs)(j.pathname,j.pathname,E);P&&(x=(0,n.formatWithValidation)({pathname:P,hash:j.hash,query:(0,o.omit)(E,N)}))}const S=j.origin===_.origin?j.href.slice(j.origin.length):j.href;return h?[S,x||S]:S}catch{return h?[y]:y}}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(wn,wn.exports)),wn.exports}var Rn={exports:{}},Bs={},Us={},xi;function Xu(){return xi||(xi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addPathPrefix",{enumerable:!0,get:function(){return r}});const t=_a();function r(n,o){if(!n.startsWith("/")||!o)return n;const{pathname:a,query:i,hash:c}=(0,t.parsePath)(n);return""+o+a+i+c}}(Us)),Us}var bi;function Wg(){return bi||(bi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addLocale",{enumerable:!0,get:function(){return n}});const t=Xu(),r=Gu();function n(o,a,i,c){if(!a||a===i)return o;const l=o.toLowerCase();return!c&&((0,r.pathHasPrefix)(l,"/api")||(0,r.pathHasPrefix)(l,"/"+a.toLowerCase()))?o:(0,t.addPathPrefix)(o,"/"+a)}}(Bs)),Bs}var ji;function Gg(){return ji||(ji=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return n}});const r=as(),n=function(o){for(var a=arguments.length,i=new Array(a>1?a-1:0),c=1;c<a;c++)i[c-1]=arguments[c];return process.env.__NEXT_I18N_SUPPORT?(0,r.normalizePathTrailingSlash)(Wg().addLocale(o,...i)):o};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Rn,Rn.exports)),Rn.exports}var qs={},Ci;function Yu(){return Ci||(Ci=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RouterContext",{enumerable:!0,get:function(){return n}});const n=Ve._(g).default.createContext(null);process.env.NODE_ENV!=="production"&&(n.displayName="RouterContext")}(qs)),qs}var $s={},Si;function Kg(){return Si||(Si=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(u,f){for(var p in f)Object.defineProperty(u,p,{enumerable:!0,get:f[p]})}t(e,{AppRouterContext:function(){return o},GlobalLayoutRouterContext:function(){return i},LayoutRouterContext:function(){return a},MissingSlotContext:function(){return l},TemplateContext:function(){return c}});const n=Ve._(g),o=n.default.createContext(null),a=n.default.createContext(null),i=n.default.createContext(null),c=n.default.createContext(null);process.env.NODE_ENV!=="production"&&(o.displayName="AppRouterContext",a.displayName="LayoutRouterContext",i.displayName="GlobalLayoutRouterContext",c.displayName="TemplateContext");const l=n.default.createContext(new Set)}($s)),$s}var Tn={exports:{}},An={exports:{}},Ei;function Zu(){return Ei||(Ei=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}r(t,{cancelIdleCallback:function(){return o},requestIdleCallback:function(){return n}});const n=typeof self<"u"&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(a){let i=Date.now();return self.setTimeout(function(){a({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-i))}})},1)},o=typeof self<"u"&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(a){return clearTimeout(a)};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(An,An.exports)),An.exports}var Pi;function Qg(){return Pi||(Pi=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return u}});const r=g,n=Zu(),o=typeof IntersectionObserver=="function",a=new Map,i=[];function c(f){const p={root:f.root||null,margin:f.rootMargin||""},m=i.find(v=>v.root===p.root&&v.margin===p.margin);let h;if(m&&(h=a.get(m),h))return h;const _=new Map,y=new IntersectionObserver(v=>{v.forEach(b=>{const C=_.get(b.target),j=b.isIntersecting||b.intersectionRatio>0;C&&j&&C(j)})},f);return h={id:p,observer:y,elements:_},i.push(p),a.set(p,h),h}function l(f,p,m){const{id:h,observer:_,elements:y}=c(m);return y.set(f,p),_.observe(f),function(){if(y.delete(f),_.unobserve(f),y.size===0){_.disconnect(),a.delete(h);const b=i.findIndex(C=>C.root===h.root&&C.margin===h.margin);b>-1&&i.splice(b,1)}}}function u(f){let{rootRef:p,rootMargin:m,disabled:h}=f;const _=h||!o,[y,v]=(0,r.useState)(!1),b=(0,r.useRef)(null),C=(0,r.useCallback)(x=>{b.current=x},[]);(0,r.useEffect)(()=>{if(o){if(_||y)return;const x=b.current;if(x&&x.tagName)return l(x,E=>E&&v(E),{root:p==null?void 0:p.current,rootMargin:m})}else if(!y){const x=(0,n.requestIdleCallback)(()=>v(!0));return()=>(0,n.cancelIdleCallback)(x)}},[_,m,p,y,b.current]);const j=(0,r.useCallback)(()=>{v(!1)},[]);return[C,y,j]}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Tn,Tn.exports)),Tn.exports}var On={exports:{}},Ln={exports:{}},Hs={},wi;function Xg(){return wi||(wi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"normalizeLocalePath",{enumerable:!0,get:function(){return t}});function t(r,n){let o;const a=r.split("/");return(n||[]).some(i=>a[1]&&a[1].toLowerCase()===i.toLowerCase()?(o=i,a.splice(1,1),r=a.join("/")||"/",!0):!1),{pathname:r,detectedLocale:o}}}(Hs)),Hs}var Ni;function Yg(){return Ni||(Ni=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return r}});const r=(n,o)=>process.env.__NEXT_I18N_SUPPORT?Xg().normalizeLocalePath(n,o):{pathname:n,detectedLocale:void 0};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Ln,Ln.exports)),Ln.exports}var kn={exports:{}},Vs={},Ii;function Zg(){return Ii||(Ii=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"detectDomainLocale",{enumerable:!0,get:function(){return t}});function t(r,n,o){if(r){o&&(o=o.toLowerCase());for(const c of r){var a,i;const l=(a=c.domain)==null?void 0:a.split(":",1)[0].toLowerCase();if(n===l||o===c.defaultLocale.toLowerCase()||(i=c.locales)!=null&&i.some(u=>u.toLowerCase()===o))return c}}}}(Vs)),Vs}var Ri;function Jg(){return Ri||(Ri=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"detectDomainLocale",{enumerable:!0,get:function(){return r}});const r=function(){for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];if(process.env.__NEXT_I18N_SUPPORT)return Zg().detectDomainLocale(...o)};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(kn,kn.exports)),kn.exports}var Ti;function ey(){return Ti||(Ti=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return o}});const r=as(),n=process.env.__NEXT_ROUTER_BASEPATH||"";function o(a,i,c,l){if(process.env.__NEXT_I18N_SUPPORT){const u=Yg().normalizeLocalePath,f=Jg().detectDomainLocale,p=i||u(a,c).detectedLocale,m=f(l,void 0,p);if(m){const h="http"+(m.http?"":"s")+"://",_=p===m.defaultLocale?"":"/"+p;return""+h+m.domain+(0,r.normalizePathTrailingSlash)(""+n+_+a)}return!1}else return!1}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(On,On.exports)),On.exports}var Dn={exports:{}},Ai;function ty(){return Ai||(Ai=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return a}});const r=Xu(),n=as(),o=process.env.__NEXT_ROUTER_BASEPATH||"";function a(i,c){return(0,n.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH&&!c?i:(0,r.addPathPrefix)(i,o))}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Dn,Dn.exports)),Dn.exports}var Mn={exports:{}},Oi;function ry(){return Oi||(Oi=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(h,_){for(var y in _)Object.defineProperty(h,y,{enumerable:!0,get:_[y]})}r(t,{ACTION_FAST_REFRESH:function(){return l},ACTION_NAVIGATE:function(){return o},ACTION_PREFETCH:function(){return c},ACTION_REFRESH:function(){return n},ACTION_RESTORE:function(){return a},ACTION_SERVER_ACTION:function(){return u},ACTION_SERVER_PATCH:function(){return i},PrefetchCacheEntryStatus:function(){return p},PrefetchKind:function(){return f},isThenable:function(){return m}});const n="refresh",o="navigate",a="restore",i="server-patch",c="prefetch",l="fast-refresh",u="server-action";var f;(function(h){h.AUTO="auto",h.FULL="full",h.TEMPORARY="temporary"})(f||(f={}));var p;(function(h){h.fresh="fresh",h.reusable="reusable",h.expired="expired",h.stale="stale"})(p||(p={}));function m(h){return h&&(typeof h=="object"||typeof h=="function")&&typeof h.then=="function"}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Mn,Mn.exports)),Mn.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return E}});const r=Ve,n=s,o=r._(g),a=Vg(),i=Ku(),c=Vu(),l=os(),u=Gg(),f=Yu(),p=Kg(),m=Qg(),h=ey(),_=ty(),y=ry(),v=new Set;function b(P,N,A,R,O,D){if(typeof window>"u"||!D&&!(0,i.isLocalURL)(N))return;if(!R.bypassPrefetchedCheck){const F=typeof R.locale<"u"?R.locale:"locale"in P?P.locale:void 0,q=N+"%"+A+"%"+F;if(v.has(q))return;v.add(q)}(async()=>D?P.prefetch(N,O):P.prefetch(N,A,R))().catch(F=>{if(process.env.NODE_ENV!=="production")throw F})}function C(P){const A=P.currentTarget.getAttribute("target");return A&&A!=="_self"||P.metaKey||P.ctrlKey||P.shiftKey||P.altKey||P.nativeEvent&&P.nativeEvent.which===2}function j(P,N,A,R,O,D,$,F,q){const{nodeName:V}=P.currentTarget;if(V.toUpperCase()==="A"&&(C(P)||!q&&!(0,i.isLocalURL)(A)))return;P.preventDefault();const Z=()=>{const H=$??!0;"beforePopState"in N?N[O?"replace":"push"](A,R,{shallow:D,locale:F,scroll:H}):N[O?"replace":"push"](R||A,{scroll:H})};q?o.default.startTransition(Z):Z()}function x(P){return typeof P=="string"?P:(0,c.formatUrl)(P)}const E=o.default.forwardRef(function(N,A){let R;const{href:O,as:D,children:$,prefetch:F=null,passHref:q,replace:V,shallow:J,scroll:Z,locale:H,onClick:ee,onMouseEnter:ce,onTouchStart:me,legacyBehavior:ae=!1,...ue}=N;R=$,ae&&(typeof R=="string"||typeof R=="number")&&(R=(0,n.jsx)("a",{children:R}));const z=o.default.useContext(f.RouterContext),te=o.default.useContext(p.AppRouterContext),T=z??te,Q=!z,le=F!==!1,be=F===null?y.PrefetchKind.AUTO:y.PrefetchKind.FULL;if(process.env.NODE_ENV!=="production"){let B=function(U){return new Error("Failed prop type: The prop `"+U.key+"` expects a "+U.expected+" in `<Link>`, but got `"+U.actual+"` instead."+(typeof window<"u"?`
2
+ Open your browser's console to view the Component stack trace.`:""))};Object.keys({href:!0}).forEach(U=>{if(U==="href"&&(N[U]==null||typeof N[U]!="string"&&typeof N[U]!="object"))throw B({key:U,expected:"`string` or `object`",actual:N[U]===null?"null":typeof N[U]})}),Object.keys({as:!0,replace:!0,scroll:!0,shallow:!0,passHref:!0,prefetch:!0,locale:!0,onClick:!0,onMouseEnter:!0,onTouchStart:!0,legacyBehavior:!0}).forEach(U=>{const ne=typeof N[U];if(U==="as"){if(N[U]&&ne!=="string"&&ne!=="object")throw B({key:U,expected:"`string` or `object`",actual:ne})}else if(U==="locale"){if(N[U]&&ne!=="string")throw B({key:U,expected:"`string`",actual:ne})}else if(U==="onClick"||U==="onMouseEnter"||U==="onTouchStart"){if(N[U]&&ne!=="function")throw B({key:U,expected:"`function`",actual:ne})}else if((U==="replace"||U==="scroll"||U==="shallow"||U==="passHref"||U==="prefetch"||U==="legacyBehavior")&&N[U]!=null&&ne!=="boolean")throw B({key:U,expected:"`boolean`",actual:ne})});const M=o.default.useRef(!1);N.prefetch&&!M.current&&!Q&&(M.current=!0,console.warn("Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://nextjs.org/docs/messages/prefetch-true-deprecated"))}if(process.env.NODE_ENV!=="production"&&Q&&!D){let B;if(typeof O=="string"?B=O:typeof O=="object"&&typeof O.pathname=="string"&&(B=O.pathname),B&&B.split("/").some(Se=>Se.startsWith("[")&&Se.endsWith("]")))throw new Error("Dynamic href `"+B+"` found in <Link> while using the `/app` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href")}const{href:I,as:L}=o.default.useMemo(()=>{if(!z){const Se=x(O);return{href:Se,as:D?x(D):Se}}const[B,ge]=(0,a.resolveHref)(z,O,!0);return{href:B,as:D?(0,a.resolveHref)(z,D):ge||B}},[z,O,D]),Le=o.default.useRef(I),W=o.default.useRef(L);let X;if(ae)if(process.env.NODE_ENV==="development"){ee&&console.warn('"onClick" was passed to <Link> with `href` of `'+O+'` but "legacyBehavior" was set. The legacy behavior requires onClick be set on the child of next/link'),ce&&console.warn('"onMouseEnter" was passed to <Link> with `href` of `'+O+'` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link');try{X=o.default.Children.only(R)}catch{throw R?new Error("Multiple children were passed to <Link> with `href` of `"+O+"` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children"+(typeof window<"u"?`
3
+ Open your browser's console to view the Component stack trace.`:"")):new Error("No children were passed to <Link> with `href` of `"+O+"` but one child is required https://nextjs.org/docs/messages/link-no-children")}}else X=o.default.Children.only(R);else if(process.env.NODE_ENV==="development"&&(R==null?void 0:R.type)==="a")throw new Error(`Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.
4
+ Learn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor`);const je=ae?X&&typeof X=="object"&&X.ref:A,[Me,we,Ce]=(0,m.useIntersection)({rootMargin:"200px"}),Ue=o.default.useCallback(B=>{(W.current!==L||Le.current!==I)&&(Ce(),W.current=L,Le.current=I),Me(B),je&&(typeof je=="function"?je(B):typeof je=="object"&&(je.current=B))},[L,je,I,Ce,Me]);o.default.useEffect(()=>{process.env.NODE_ENV==="production"&&T&&(!we||!le||b(T,I,L,{locale:H},{kind:be},Q))},[L,I,we,H,le,z==null?void 0:z.locale,T,Q,be]);const Ne={ref:Ue,onClick(B){if(process.env.NODE_ENV!=="production"&&!B)throw new Error('Component rendered inside next/link has to pass click event to "onClick" prop.');!ae&&typeof ee=="function"&&ee(B),ae&&X.props&&typeof X.props.onClick=="function"&&X.props.onClick(B),T&&(B.defaultPrevented||j(B,T,I,L,V,J,Z,H,Q))},onMouseEnter(B){!ae&&typeof ce=="function"&&ce(B),ae&&X.props&&typeof X.props.onMouseEnter=="function"&&X.props.onMouseEnter(B),T&&((!le||process.env.NODE_ENV==="development")&&Q||b(T,I,L,{locale:H,priority:!0,bypassPrefetchedCheck:!0},{kind:be},Q))},onTouchStart:process.env.__NEXT_LINK_NO_TOUCH_START?void 0:function(ge){!ae&&typeof me=="function"&&me(ge),ae&&X.props&&typeof X.props.onTouchStart=="function"&&X.props.onTouchStart(ge),T&&(!le&&Q||b(T,I,L,{locale:H,priority:!0,bypassPrefetchedCheck:!0},{kind:be},Q))}};if((0,l.isAbsoluteUrl)(L))Ne.href=L;else if(!ae||q||X.type==="a"&&!("href"in X.props)){const B=typeof H<"u"?H:z==null?void 0:z.locale,ge=(z==null?void 0:z.isLocaleDomain)&&(0,h.getDomainLocale)(L,B,z==null?void 0:z.locales,z==null?void 0:z.domainLocales);Ne.href=ge||(0,_.addBasePath)((0,u.addLocale)(L,B,z==null?void 0:z.defaultLocale))}return ae?o.default.cloneElement(X,Ne):(0,n.jsx)("a",{...ue,...Ne,children:R})});(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(Lo,Lo.exports);var ny=Lo.exports,sy=ny;const Xe=k.getDefaultExportFromCjs(sy),oy="_link_w24h0_1",ay="_wrapper_w24h0_98",iy="_text_w24h0_106",Ws={link:oy,wrapper:ay,text:iy},Ye=({children:e,adornments:t,className:r,disableUnderline:n,href:o,mode:a,size:i,title:c,onClick:l,disablePadding:u,...f})=>{const p=d.helpers.ValidateProp({fieldTypes:Pr.SizesSmallExtended,property:i,fallback:"medium"}),m=d.helpers.ValidateProp({fieldTypes:Pr.Mode,property:a,fallback:"default"});return s.jsx(Xe,{...f,className:d.helpers.classNameConcat(Ws.link,r),href:o&&o.length>0?o:"#","data-size":p,"data-variant":m,title:c||"NextLink","data-disable-underline":n??!1,"data-disable-padding":u??!0,children:s.jsxs("div",{className:Ws.wrapper,onClick:l,children:[t==null?void 0:t.start,s.jsx("p",{className:Ws.text,"data-size":p,children:e}),t==null?void 0:t.end]})})},cy=({ICONS:e})=>{const{resetFeedback:t}=gr();return s.jsxs("div",{className:Zr["wishlist--snack--actions"],children:[s.jsx(Ye,{href:"/favoritos",children:"Ver Favoritos"}),s.jsx(d.Button,{variant:"tertiary",size:"small",onClick:t,adornment:{start:s.jsx(d.Icon,{name:e.close})}})]})},ga=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:r})=>{const n=na(),{resetFeedback:o}=gr(),a=g.useRef(null);return g.useEffect(()=>{a.current&&clearTimeout(a.current),n&&(a.current=setTimeout(()=>{o()},5e3))},[n,o]),(n==null?void 0:n.active)&&s.jsx(wr,{Z_INDEX_WAR:r,className:Zr["wishlist--snack"],"data-action":n.action,title:n.action==="add"?e.messages.add:e.messages.remove,supportChildren:s.jsx(cy,{ICONS:t}),size:"medium"})};ga.displayName="WishList.Feedback";const ya={"product-list--banner":"_product-list--banner_sfibj_1","product-list--card":"_product-list--card_sfibj_30","product-list":"_product-list_sfibj_1"},Ju=({className:e,children:t,columns:r=1,isMobile:n=!1,gap:o=8,position_grid:a,totalColumns:i=4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,...l})=>{const u=g.useMemo(()=>r%i===0?"initial":n||r<2?c:c.split("/").reverse().join("/"),[r,i,n]);return s.jsx("div",{...l,className:d.helpers.classNameConcat(ya["product-list--banner"],e),style:{aspectRatio:u,maxWidth:`${r/i*100}%`,order:a,padding:o/2},children:t})};Ju.displayName="ProductList.Banner";const ed=({isKit:e,parent:t,productId:r,setNotify:n,CONSTANTS:o})=>{const{router:a}=pe(),i=g.useRef(!1),c=g.useRef(null),[l,u]=g.useState([]),f=y=>a.push(y??""),p=new Map,m=async y=>{try{if(p.has(y)){u(p.get(y));return}const v=await fetch("/api/catalog/product/similars",{method:"POST",body:JSON.stringify({productId:y,filterTexture:o.TEXTURE_IMAGE}),priority:"low"});if(!v.ok)throw new Error("Erro ao buscar similares.");const b=await v.json();p.set(y,b),u(b)}catch(v){console.error(v)}},h=g.useCallback(y=>{!r||!y||(typeof m=="function"&&m(r),i.current=!0)},[r]),_=g.useCallback((y,v)=>{if(!y.isIntersecting){o.PLP_INFINITE_SCROLL&&c.current&&(clearTimeout(c.current),c.current=null);return}if(y.intersectionRatio>=v.threshold&&!i.current){if(o.PLP_INFINITE_SCROLL){c.current=setTimeout(()=>{h(!0)},o.PLP_PRODUCT_SIMILAR_DELAY);return}h(!0)}},[h]);return g.useEffect(()=>{if(e||!t.current)return;const y={root:null,threshold:.1},v=new IntersectionObserver(([b])=>{_(b,y)},y);return v.observe(t.current),()=>{c.current&&clearTimeout(c.current),v.disconnect()}},[_,t,e]),s.jsx(ye.Actions,{...l,callback:f,isKit:e,children:!e&&s.jsx(ye.SizeSelector,{setNotify:n,PLP_SIZE_ORDER:o.PLP_SIZE_ORDER})})};ed.displayName="ProductList.Card.Actions";const td=({className:e,children:t,gap:r=32,item:n,isMobile:o,order:a,tag:i,hasMaxWidth:c=!0,index:l,setSkuSelected:u,showVideo:f,CONSTANTS:p,...m})=>{const h=g.useRef(null),{availability:{status:_}}=n,y=g.useCallback((b,C)=>{var j;typeof u=="function"&&u((j=b.isVariantOf)==null?void 0:j.hasVariant,C)},[u]),v=n.name.substring(0,4).toLowerCase()==="kit ";return s.jsxs("div",{...m,className:d.helpers.classNameConcat(ya["product-list--card"],e),"data-mobile":o,"data-order":a,ref:h,style:{...c&&{maxWidth:o?"50%":"25%"},order:a,padding:r/2},children:[s.jsxs(ye.Root,{item:n,isMobile:o,index:l,size:o?"small":"medium",order:a,outStock:!_,CONSTANTS:p,children:[s.jsx(ye.Header,{product:n,tag:i==null?void 0:i.commercial}),s.jsx(ye.Media,{showVideo:f,hasPriority:!0}),s.jsxs(ye.Wrapper,{type:"body",children:[s.jsx(ye.Title,{tag:i==null?void 0:i.institucional}),s.jsx(ed,{productId:n.isVariantOf.productGroupID,parent:h,setNotify:y,isKit:v,CONSTANTS:p}),!v&&s.jsx(ye.OutStock,{callback:y})]}),s.jsx(ye.Wrapper,{type:"footer",children:_&&s.jsx(ye.BuyButton,{isKit:v})})]}),t]})};td.displayName="ProductList.Card";const rd=({children:e,className:t,...r})=>s.jsx("div",{...r,className:d.helpers.classNameConcat(ya["product-list"],t),children:e});rd.displayName="ProductList.Grid";const et={Banner:Ju,Card:td,Root:rd,helpers:N_},ly="_pdc_alo7z_1",dt={"pdc--empty":"_pdc--empty_alo7z_1","pdc--grid":"_pdc--grid_alo7z_17","pdc--grid--content":"_pdc--grid--content_alo7z_26","pdc--infinite":"_pdc--infinite_alo7z_41","pdc--infinite--loader":"_pdc--infinite--loader_alo7z_44","pdc--infinite--loader--page":"_pdc--infinite--loader--page_alo7z_54","pdc--infinite--card--disabled":"_pdc--infinite--card--disabled_alo7z_58","pdc--infinite--next-page":"_pdc--infinite--next-page_alo7z_91","pdc--infinite--next-page--card":"_pdc--infinite--next-page--card_alo7z_101","pdc--infinite--next-page--spinner":"_pdc--infinite--next-page--spinner_alo7z_111","pdc--pagination":"_pdc--pagination_alo7z_118",pdc:ly},va=({className:e,ICONS:t,PLP_NOT_RESULT:r})=>{const{router:n}=pe(),{isMobile:o}=oe(),a=()=>{n.push(r==null?void 0:r.link)};return s.jsxs("div",{className:d.helpers.classNameConcat(dt["pdc--empty"],e),children:[s.jsxs(d.TextStructure.DivWrapper,{className:dt["pdc--empty-wrapper"],children:[s.jsx("span",{className:o?"typography-style-body-md":"typography-style-heading-sm",children:r.title}),s.jsx("p",{className:o?"typography-style-body-xs":"typography-style-body-sm",children:r.subtitle})]}),s.jsx(d.Button,{adornment:{end:s.jsx(d.Icon,{name:t.arrow_right})},className:"typography-style-body-sm-strong",onClick:()=>a(),variant:"tertiary",children:s.jsx("b",{children:r.text})})]})};va.displayName="PDC.Empty";const is=e=>s.jsx("div",{...e,className:dt["pdc--infinite--next-page"],children:s.jsx(d.Spinner,{className:dt["pdc--infinite--next-page--spinner"]})});is.displayName="PDC.Spinner";function nd({CONSTANTS:e}){const{sendDataLayerEvent:t}=ie(),{isMobile:r}=oe(),{getAvailableProductTag:n}=Ot(),[o,a]=g.useState([]),[i,c]=g.useState(!0),l=Hr(),u=l.join(","),f=r?16:32;return g.useEffect(()=>{const p=async()=>{l.length?await fetch("/api/wishlist/products",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({productIds:l})}).then(m=>m.json()).then(m=>{a(m),t({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:m}}})}).catch(m=>console.error(m)):a([]),c(!1)};if(l.length){p();return}if(l.length===0&&o.length===0){c(!1);return}a([]),c(!1)},[u]),s.jsx("section",{className:Zr["wishlist-grid"],children:s.jsxs("div",{className:Zr["wishlist-grid--container"],children:[i&&s.jsx(is,{}),!l.length&&!(o!=null&&o.length)&&!i&&s.jsx(va,{className:Zr["pdc-empty-modifier"],ICONS:e.ICONS,PLP_NOT_RESULT:e.WISHLIST_NOT_RESULT}),s.jsx(et.Root,{children:Array.isArray(o)&&o.map((p,m)=>{const h=p.node.cluster.highlights||[],_=n(h);return s.jsx(et.Card,{gap:f,isMobile:r??!1,item:p.node,tag:_,index:m,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,MAIN_IMAGE:e.MAIN_IMAGE,PLP_GRID_SCROLL_BACK:e.PLP_GRID_SCROLL_BACK,PLP_INFINITE_SCROLL:e.PLP_INFINITE_SCROLL,PLP_SIZE_ORDER:e.PLP_SIZE_ORDER,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:e.PLP_SHOW_VIDEO_ON_PRODUCT_CARD,PLP_PRODUCT_SIMILAR_DELAY:e.PLP_PRODUCT_SIMILAR_DELAY,PRODUCT_CARD_IMAGE_ASPECT_RATIO:e.PRODUCT_CARD_IMAGE_ASPECT_RATIO,PRODUCT_CARD_TEXTS:e.PRODUCT_CARD_TEXTS,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:e.PRODUCT_CARD_TOP_WISHLIST_TOGGLE,PRODUCT_IMAGE_DIMENSIONS:e.PRODUCT_IMAGE_DIMENSIONS,SECOND_IMAGE:e.SECOND_IMAGE,StoreConfig_MainSellerId:e.StoreConfig_MainSellerId,TEXTURE_IMAGE:e.TEXTURE_IMAGE,Z_INDEX_WAR:e.Z_INDEX_WAR,ICONS:e.ICONS}},p.node.sku)})})]})})}nd.displayName="Wishlist.Grid";const uy=e=>e.map(t=>{var r;return(r=t.isVariantOf)==null?void 0:r.productGroupID})??[],sd=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:r})=>{const n=Vr(),o=Hr(),a=na(),{updateList:i}=gr();return g.useEffect(()=>{var l,u;a.active&&Ct.set("fs::wishlist",o);const c=async()=>{var f;await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:o,docId:(f=n==null?void 0:n.user)==null?void 0:f.id})}).catch(p=>{console.error("Error updating wishlist:",p)})};a.active&&((l=n.user)!=null&&l.id)&&o.length!==((u=n.wishlist)==null?void 0:u.length)&&c()},[a,n,o]),g.useEffect(()=>{var u;const c=async()=>{const f=await Ct.get("fs::wishlist");f&&(f==null?void 0:f.length)!==o.length&&i(f)},l=async()=>{var h;const f=await Ct.get("fs::wishlist")??[],p=n.wishlist?typeof n.wishlist[0]=="object"?uy(n.wishlist):n.wishlist:[],m=[...new Set([...f,...p])];i(m),Ct.set("fs::wishlist",o),p.length!==m.length&&await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:m,docId:(h=n.user)==null?void 0:h.id})}).catch(_=>{console.error("Error updating wishlist:",_)})};if((u=n.user)!=null&&u.id){l();return}c()},[n,i,o]),s.jsx(ga,{ICONS:t,Z_INDEX_WAR:r,WISHLIST_INFO:e})};sd.displayName="Wishlist.Init";const od=({product:e,priceInfo:t,size:r="medium",style:n,ICONS:o})=>{const{sendDataLayerEvent:a,currentLocalRef:i}=ie(),c=Hr(),{toggleProduct:l}=gr(),{isVariantOf:{productGroupID:u}}=e;return s.jsx(d.Button,{adornment:{start:s.jsx(d.Icon,{size:r,name:c.includes(u)?o.favorite_true:o.favorite_false})},onClick:()=>{l(u),a({functionKey:"productEvents",data:{event:c.includes(u)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:i.current},commonData:{...e,...t}}})},style:{...n,border:"none"},variant:"tertiary"})};od.displayName="WishList.Toggle";const ad={Feedback:ga,Toggle:od,Grid:nd,Init:sd},id=({product:e,tag:t,size:r="small"})=>{const{CONSTANTS:n}=ft(),{tags:o}=Ot(),a=e.offers.offers[0],i=k.getDiscountPercent(a.listPrice,a.price),c=o==null?void 0:o.flagDiscount;return s.jsxs(ye.Wrapper,{type:"header",style:{zIndex:n.Z_INDEX_WAR.product_card_header},children:[i>0&&!t&&(c==null?void 0:c.enableTag)&&s.jsxs(d.Tag,{title:`${i}% ${c==null?void 0:c.tagText}`,variant:"quaternary",size:"small",style:{background:c==null?void 0:c.tagColor,color:c==null?void 0:c.tagTextColor},children:[i,"% ",c==null?void 0:c.tagText]}),t?s.jsx(d.Tag,{title:t.value,adornment:{start:t.enableIcon&&t.icon?s.jsx(d.Icon,{name:t.icon,size:"small",style:{color:t.iconColor}}):null},size:r,variant:"quaternary",style:{background:t.tagColor,color:t.textColor},children:t.value}):null,n.PRODUCT_CARD_TOP_WISHLIST_TOGGLE&&s.jsx(ad.Toggle,{product:e,priceInfo:{price:a.price,listPrice:a.listPrice},variant:"card",ICONS:n.ICONS})]})};id.displayName="ProductCard.Actions.Header";const cd=({className:e,children:t,hasPriority:r=!1,showVideo:n=!1,...o})=>{const{element:a,index:i,item:{image:c,slug:l,video:u},sendSelectItemEvent:f,order:p,CONSTANTS:m}=ft(),h=k.getFirstImages({images:c,label:{first:m.MAIN_IMAGE,second:m.SECOND_IMAGE}});return s.jsxs("div",{...o,className:d.helpers.classNameConcat(ze["product-card--image"],e),ref:a,style:{aspectRatio:m.PRODUCT_CARD_IMAGE_ASPECT_RATIO},children:[s.jsx(Xe,{href:`/${l}/p`,onClick:f,onMouseUp:_=>{_.button===1&&f(),m.PLP_INFINITE_SCROLL&&sessionStorage.setItem(m.PLP_GRID_SCROLL_BACK.order,String(p))},children:s.jsx("div",{className:ze["product-card--image--container"],children:Array.isArray(h)&&h.map(({url:_,alternateName:y},v)=>g.createElement(De.Image,{...m.PRODUCT_IMAGE_DIMENSIONS.product_card,style:m.PRODUCT_IMAGE_DIMENSIONS.product_card,alt:y??"product image",key:v,...r&&{priority:v===0&&i<4},objectFit:"cover",src:_}))})}),m.PLP_SHOW_VIDEO_ON_PRODUCT_CARD&&n&&u&&s.jsx(ye.Video,{url:u,poster:h[0].url}),t]})};cd.displayName="ProductCard.Media.Media";const ld=({className:e,callback:t,children:r,...n})=>{const{isMobile:o,item:a,CONSTANTS:{PRODUCT_CARD_TEXTS:i}}=ft(),{availability:{status:c}}=a;return c?null:s.jsxs("div",{...n,className:d.helpers.classNameConcat(ze["product-card--outstock"],e),children:[s.jsx(d.Tag,{size:"small",variant:"secondary",title:i.disabled,children:i.disabled}),s.jsx(d.Button,{className:d.helpers.classNameConcat(e,"buy-button"),size:o?"medium":"large",variant:"quaternary",onClick:()=>{typeof t=="function"&&t(a)},children:i.notify})]})};ld.displayName="ProductCard.OutStock";const ud=({children:e,className:t="",index:r,isMobile:n=!1,item:o,size:a,order:i,outStock:c,shelfTitle:l,CONSTANTS:u,...f})=>s.jsx(Ng,{item:o,isMobile:n,outStock:c,order:i,size:a,index:r,shelfTitle:l,CONSTANTS:u,children:s.jsx("div",{...f,className:d.helpers.classNameConcat(ze["product-card--wrapper"],t),"data-size":a,children:e})});ud.displayName="ProductCard.Root";const dd=({disabled:e,label:t,size:r,value:n,onClick:o,...a})=>s.jsxs(d.ToggleSize.Wrapper,{...a,disabled:!1,outOfStock:e,size:r,onClick:o,children:[s.jsx(d.ToggleSize.DisabledAdornment,{}),s.jsx(d.ToggleSize.Text,{children:t})]});dd.displayName="ProductCard.SizeSelector.Item";const fd=({active:e=!1,callback:t,selectedSku:r=null,item:n,setNotify:o})=>{const{item:a,isMobile:i,setSelectedSku:c,eventDataRef:l}=ft();n.productId=a.id;const u=k.disableSKU(n),f=k.getSKUName(n,"tamanho");!u&&!l.current.availableSkus.includes(f)&&l.current.availableSkus.push(f);const p=g.useCallback(h=>{const _=r===h?null:h;typeof c=="function"&&c(_),typeof t=="function"&&t(_)},[t,c,r]),m=g.useCallback(()=>{if(u&&typeof o=="function"){o(a,n);return}p(n)},[n,o,p,u,a]);return s.jsx(dd,{active:e,disabled:u,label:f,onClick:()=>m(),size:i?"x-small":"small",value:n})};fd.displayName="ProductCard.SizeSelector.SkuItem";const pd=({items:e,getLabel:t,PLP_SIZE_ORDER:r})=>Array.isArray(e)?[...e].sort((n,o)=>{const a=t(n).toUpperCase(),i=t(o).toUpperCase(),c=r.indexOf(a)-r.indexOf(i);return c!==0?c:a.localeCompare(i,"pt-BR")}):[],md=({callback:e,className:t="",children:r,setNotify:n,PLP_SIZE_ORDER:o,...a})=>{const{isMobile:i,item:{isVariantOf:{hasVariant:c}},selectedSku:l}=ft(),u=g.useMemo(()=>Array.isArray(c)?pd({items:c,getLabel:f=>k.getSKUName(f,"tamanho"),PLP_SIZE_ORDER:o}):[],[c]);return s.jsxs("div",{...a,className:d.helpers.classNameConcat(ze["product-card--selectors--size"],t),"data-mobile":i,children:[s.jsx("div",{className:ze["product-card--selectors--size--skus"],children:u.map((f,p)=>s.jsx(fd,{active:l===f,callback:e,item:f,selectedSku:l,setNotify:n},`size--${p}--${f.sku}`))}),s.jsx("div",{className:ze["product-card--selectors--size--button"],children:r})]})};md.displayName="ProductCard.SizeSelector";const ko=({alt:e="",callback:t,more:r,total:n=4,src:o,url:a,...i})=>s.jsxs(d.ToggleStyle.Wrapper,{...i,onClick:()=>{typeof t=="function"&&t(a)},children:[s.jsx(d.ToggleStyle.DisabledAdornment,{}),s.jsxs(d.ToggleStyle.Texture,{children:[o&&s.jsx(De.Image,{alt:e??o,src:o,height:34,width:34}),r&&s.jsx(d.TextStructure.DivWrapper,{className:ze["product-card--selectors--style--more"],children:s.jsxs("p",{children:["+ ",n]})})]})]}),dy=({children:e,callback:t,data:r,total:n=4,size:o,...a})=>{const{index:i}=ft(),{triggerSelectItemEventRef:c}=ie();return s.jsxs("div",{...a,children:[e,Array.isArray(r)&&r.slice(0,n).map((l,u)=>s.jsx(ko,{callback:f=>{c.current.trigger=!0,c.current.index=i,typeof t=="function"&&t(f)},src:(l==null?void 0:l.textureImage)??"",alt:l==null?void 0:l.textureAlt,url:l==null?void 0:l.slug,size:o},u)),Array.isArray(r)&&(r==null?void 0:r.length)>n&&s.jsx(ko,{size:o,total:r.length-n,more:!0})]})},hd=({callback:e,className:t,data:r,images:n=[],findTexture:o,...a})=>{const{CONSTANTS:i}=ft(),c=o||i.TEXTURE_IMAGE,l=n==null?void 0:n.find(u=>c.includes(u.alternateName));return s.jsx(dy,{...a,callback:e,className:d.helpers.classNameConcat(ze["product-card--selectors--style"],t),data:r,size:"x-small",children:l&&s.jsx(ko,{active:!0,size:"x-small",src:l.url})})};hd.displayName="ProductCard.StyleSelector";const _d=({className:e,hasDecimal:t,...r})=>{const{isMobile:n,item:{offers:{lowPrice:o,highPrice:a},installments:{count:i,value:c}},eventDataRef:l}=ft();l.current.priceInfo={price:o,listPrice:a};const u=k.formatPriceToCurrency(a,t),f=k.formatPriceToCurrency(o,t),p=k.formatPriceToCurrency(c??0),m=n?"horizontal":"stacked";return s.jsx("div",{...r,className:d.helpers.classNameConcat(ze["product-card--price"],e),"data-mobile":n,children:s.jsx(d.ProductInfo.Root,{size:"small",layout:m,children:s.jsxs(d.ProductInfo.Wrapper,{size:"small",layout:m,children:[s.jsx(d.ProductInfo.ValuesWrapper,{children:f!==u?s.jsxs(s.Fragment,{children:[s.jsx(d.ProductInfo.Price,{label:"originalPrice",value:u,size:"small"}),s.jsx(d.ProductInfo.Price,{label:"discountPrice",value:f,size:"small"})]}):s.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:f,size:"small"})}),i&&i>1&&c?s.jsx(d.ProductInfo.Price,{label:"installment",value:`${i}x ${p}`,size:"small"}):null]})})})};_d.displayName="ProductCard.Price";const gd=({tag:e,className:t})=>{const{item:{name:r}}=ft();return s.jsxs("div",{className:d.helpers.classNameConcat(ze["product-card--title"],t),children:[s.jsx("div",{className:ze["product-card--title--tag"],children:e?s.jsx(d.Tag,{size:"small",title:e.value,variant:"quaternary",adornment:{start:e.enableIcon&&e.icon?s.jsx(d.Icon,{name:e.icon,style:{color:e.iconColor}}):null},style:{background:e.tagColor,color:e.textColor},children:e.value}):s.jsx("div",{})}),s.jsx("div",{className:ze["product-card--title--content"],children:r&&s.jsx(d.TextStructure.Root,{children:s.jsx(d.TextStructure.DivWrapper,{children:s.jsx("h3",{children:r})})})})]})};gd.displayName="ProductCard.Title";const yd=({className:e,url:t,poster:r,...n})=>{const{element:o}=ft();return g.useEffect(()=>{if(!(o!=null&&o.current))return;const a=o.current,i=a.querySelector("video");if(i){const c=new IntersectionObserver(f=>{f.forEach(p=>{k.setVideoPlay(p.isIntersecting,i,t)})},{root:null,rootMargin:"0px",threshold:.5}),l=()=>{i.setAttribute("data-loaded","true")},u=()=>{a&&(c.observe(a),i.addEventListener("loadeddata",l))};return document.readyState==="complete"?u():window.addEventListener("load",u),()=>{c.disconnect(),window.removeEventListener("load",u)}}return()=>null},[t,o]),s.jsx("div",{...n,className:d.helpers.classNameConcat(ze["product-card--video"],e),children:t&&s.jsx(De.Video,{autoPlay:!1,muted:!0,loop:!0,preload:"none",playsInline:!0,poster:r})})};yd.displayName="ProductCard.Media.Video";const vd=({children:e,className:t,type:r,...n})=>s.jsx("div",{...n,className:d.helpers.classNameConcat(ze[`product-card--${r}`],t),children:e});vd.displayName="ProductCard.Wrapper";const ye={Actions:Uu,BuyButton:qu,Header:id,Media:cd,Root:ud,OutStock:ld,Price:_d,SizeSelector:md,StyleSelector:hd,Title:gd,Video:yd,Wrapper:vd},fy="_carousel_1egdv_1",py="_shelf__container_1egdv_14",my="_shelf_without_carousel_1egdv_34",hy="_card_container_1egdv_57",Er={carousel:fy,"custom-controllers":"_custom-controllers_1egdv_5",shelf__container:py,"controllers-arrows-bullets":"_controllers-arrows-bullets_1egdv_23",shelf_without_carousel:my,card_container:hy},Li=({title:e})=>s.jsx("div",{className:Er.shelf__container,children:e&&s.jsx(d.TextStructure.Root,{children:s.jsxs(d.TextStructure.DivWrapper,{children:[s.jsx("h2",{className:d.helpers.classNameConcat("typography-style-body-md",k.responsive["responsive-mobile-flex"]),children:e}),s.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-md",k.responsive["responsive-desktop-flex"]),children:e})]})})}),_y=({children:e,ICONS:t,itemsPerPage:r,title:n})=>{const{isMobile:o}=oe(),a=r[o?"mobile":"desktop"],{initialize:i,controller:c,itemsStyles:l,pagination:u}=d.Carousel.useCarousel({itemsPerPage:a,gap:10,loop:!0,direction:"row"}),f=g.Children.toArray(e).length;return o||f>=4?s.jsxs(d.Carousel.Root,{innerRef:m=>{i(m)},className:Er.carousel,children:[s.jsxs("div",{className:Er["custom-controllers"],children:[n&&s.jsx(Li,{title:n}),a<f&&s.jsxs(d.Carousel.Controller,{className:Er["controllers-arrows-bullets"],children:[s.jsxs(d.Carousel.Arrows,{children:[s.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:s.jsx(d.Icon,{name:t.arrow_left})}}),s.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:s.jsx(d.Icon,{name:t.arrow_right})}})]}),!o&&a>2&&s.jsx(d.Carousel.Bullets,{page:u.currentPage,total:u.totalPages,onBulletClick:m=>c==null?void 0:c.navigateTo(m)})]})]}),s.jsx(d.Carousel.Body,{children:g.Children.map(e,(m,h)=>s.jsx(d.Carousel.Item,{style:{...l,overflow:"hidden"},children:m},`${n}_${h}`))})]}):s.jsxs(s.Fragment,{children:[n&&s.jsx(Li,{title:n}),s.jsx("div",{className:Er.shelf_without_carousel,children:e})]})},xd=({className:e,item:t,isMobile:r,size:n,shelfTitle:o,...a})=>{const i=g.useRef(null),{getAvailableProductTag:c}=Ot(),{availability:{status:l}}=t,u=p=>{const m=p.filter(h=>!a.CONSTANTS.TEXTURE_IMAGE.includes(h.keywords));return r?m.splice(0,2):m},f=c(t.cluster.highlights);return s.jsx("div",{ref:i,className:Er.card_container,children:s.jsxs(ye.Root,{...a,item:{...t,image:u(t.image)},isMobile:r,size:r?"small":"medium",outStock:!l,shelfTitle:o,children:[s.jsx(ye.Header,{product:t,tag:f==null?void 0:f.commercial}),s.jsx(ye.Media,{}),s.jsxs(ye.Wrapper,{type:"body",children:[s.jsx(ye.Title,{tag:f==null?void 0:f.institucional}),s.jsx(ye.Actions,{})]}),s.jsx(ye.Wrapper,{type:"footer"})]})})};xd.displayName="ProductList.Card";const nn={Shelf:_y,Card:xd},bd=({CONSTANTS:e,inView:t,products:r,innerRef:n})=>{const o=g.useMemo(()=>Pg(r),[r]),{isMobile:a}=oe(),{addItemsToCart:i}=Pe(),{sendDataLayerEvent:c}=ie(),{getAvailableProductTag:l}=Ot(),[u,f]=g.useState({totalPrice:0,products:{}}),p=()=>{const h=Object.values(u.products);i(h),c({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:h.map(_=>{const y=o.find(v=>v.node.id===_.productId);return y==null?void 0:y.node})},supportData:{selectedSkus:h,price:u.totalPrice}}})},m=({selectedProduct:h,productId:_})=>{const y=wg({selectedProduct:h,productId:_,prevState:u,mainSellerId:e.StoreConfig_MainSellerId});f(y)};return g.useEffect(()=>{if(!t||o.length===0)return;const h=e.BUY_PACKAGE.header.title;c({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o},customData:{item_list_name:h},outsideEcommerceData:{item_list_name:h}}})},[t]),s.jsxs("div",{className:Ft.container,ref:n,children:[s.jsx("div",{className:Ft["carousel-container"],style:{width:o.length<=3?"max-content":"75%"},children:s.jsx(nn.Shelf,{title:e.BUY_PACKAGE.header.title,itemsPerPage:{desktop:3,mobile:o.length>=3?2.2:o.length},ICONS:e.ICONS,children:Array.isArray(o)&&o.map(({node:h},_)=>{var b,C,j;const y=l(h.cluster.highlights),{availability:{status:v}}=h;return v?s.jsxs(ye.Root,{item:{...h,image:ma.helpers.product.getFirstImages({images:h.image,label:{first:e.MAIN_IMAGE,second:e.SECOND_IMAGE}})},isMobile:a,size:"medium",index:_,shelfTitle:e.BUY_PACKAGE.header.title,CONSTANTS:e,children:[s.jsx(ye.Header,{product:h,tag:y.commercial}),s.jsx(ye.Media,{}),s.jsxs(ye.Wrapper,{type:"body",children:[s.jsx(ye.Title,{tag:{value:(b=y.institucional)==null?void 0:b.value,enableIcon:(C=y.institucional)==null?void 0:C.enableIcon,icon:(j=y.institucional)==null?void 0:j.icon}}),s.jsx(ye.Actions,{children:s.jsx(ye.SizeSelector,{callback:x=>m({selectedProduct:x,productId:h.id}),PLP_SIZE_ORDER:e.PLP_SIZE_ORDER})})]})]},h.id):null})})}),s.jsx("div",{className:Ft["add-cart-container"],children:s.jsx(Eg,{handleAddAllToCart:p,selectedProducts:u,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,BUY_PACKAGE:e.BUY_PACKAGE,FREIGHT_CALCULATION:e.FREIGHT_CALCULATION}})})]})},xa={"btn-login":"_btn-login_yas63_12","btn-header":"_btn-header_yas63_22","header-animation":"_header-animation_yas63_35"},ba=({id:e})=>{const{setIsOpen:t,cartStore:{items:r}}=Pe(),{handleSelectContent:n}=ie(),{CONSTANTS:o}=Ae(),a=r.reduce((i,c)=>i+(c.quantity??0),0);return s.jsx(d.Header.SupportItem,{onClick:()=>{t(!0),n({content:"header:minicart"})},id:e,children:s.jsxs(d.Badge.AutoPositioner,{children:[s.jsx(d.Badge.Count,{count:a,size:"medium",variant:"primary",style:{backgroundColor:"black",display:a>0?"flex":"none"}}),s.jsx(d.Icon,{name:o.header.ICONS.bag,size:"medium"})]})})};ba.displayName="Header.Bag";const vn=({children:e,href:t,...r})=>t&&t!=="#"?s.jsx(Xe,{href:t.startsWith("/")?t:`/${t}`,...r,children:e}):e,jd=()=>{const{headerData:e}=Ae(),{handleSelectContent:t}=ie(),{reset:r,updateValue:n}=pn(),o=a=>{a?n(a):r()};return s.jsx(d.Header.Categories,{children:Array.isArray(e.categories)&&e.categories.map((a,i)=>s.jsx(vn,{href:a.link,onMouseEnter:()=>o(a.submenuId),onFocus:()=>o(a.submenuId),children:s.jsx(d.Header.CategoryItem,{className:xa["btn-header"],value:a.submenuId??null,adornment:{start:s.jsx(d.Icon,{name:a.iconStart}),end:s.jsx(d.Icon,{name:a.iconEnd})},style:{textWrap:"nowrap",gap:"0"},onClick:()=>{t({content:`header:${a.label}`})},children:a.label})},`category-${a.label}-${i}`))})};jd.displayName="Header.Categories";function gy(){const{handleSelectContent:e}=ie(),{CONSTANTS:t}=Ae(),{setValue:r}=ts();return s.jsx(d.Header.SupportItem,{onClick:()=>{r(!0),e({content:"header:search"})},children:s.jsx(d.Icon,{name:t.header.ICONS.search,size:"medium"})})}const yy={"menu-subcategories-container":"_menu-subcategories-container_a93cr_1"},vy={"observer-wrapper":"_observer-wrapper_r43gk_1"},cs=({children:e,eventData:t,observerOptions:r,callBackWhenVisible:n,stopOnIntersection:o=!0,className:a,...i})=>{const c=g.useRef(null),l=Qo(c,o,r),{sendDataLayerEvent:u}=ie();return g.useEffect(()=>{l&&(typeof n=="function"&&n(),t&&u({...t}))},[l]),s.jsx("div",{...i,ref:c,className:d.helpers.classNameConcat(vy["observer-wrapper"],a),children:e})},Cd=({thumbnails:e,category:t,isMobile:r=!0,callBack:n})=>{const{handleSelectPromotionEvent:o}=ie(),a=50/e.length;return s.jsx("div",{className:yy["menu-subcategories-container"],children:e.map((i,c)=>{const l=r?i.srcMobile:i.srcDesk;if(!l)return null;const u={creative_name:"banner-menu",creative_slot:`banner-menu:${t}:${c+1}`,promotion_id:l,promotion_name:i.promotion_name};return s.jsx(cs,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...u}}}},observerOptions:{delay:1e3},children:s.jsxs(Xe,{href:i.link??"#",onClick:()=>{typeof n=="function"&&n(),o({updatePromotionRef:!0,promotion:u})},children:[s.jsx(De.Image,{src:l,alt:i.label??l,width:500,height:500,sizes:`(max-width: 768px) 100vw, (max-width: 1023px) 75vw, ${a}vw`}),i.label&&s.jsx("p",{children:i.label})]})},`thumb-${i.label}-${c}`)})})};Cd.displayName="Menu.Thumbnail";const Do={"menu-desktop":"_menu-desktop_1b799_1","menu-categories":"_menu-categories_1b799_12"},Sd=({children:e,dividerOnRight:t=!0,subMenu:r,...n})=>{var l;const{router:o}=pe(),{reset:a}=pn(),{handleSelectContent:i}=ie(),{CONSTANTS:c}=Ae();return s.jsxs("div",{...n,className:Do["menu-categories"],children:[(l=r==null?void 0:r.subCategories)==null?void 0:l.map((u,f)=>{var h,_,y,v;const p=u.listCollapseDesk&&!((h=u.see_all)!=null&&h.link)?{expandAfterRowsQty:u.rowsToShowDesk}:{},m=u.listCollapseDesk&&!((_=u.see_all)!=null&&_.link)?{expansivesAdornments:{open:c.header.ICONS.add,close:c.header.ICONS.minus},expansivesLabels:{open:c.header.COMPONENT_LIST.listExpandLabel,close:c.header.COMPONENT_LIST.listCollapseLabel},iconSize:"x-small"}:{adornment:{end:s.jsx(d.Icon,{name:c.header.ICONS.arrow_right,size:"small"})}};return s.jsxs(d.ComponentList.Structure,{children:[s.jsx(vn,{href:u.linkLabel,title:u.label,onClick:()=>{u.linkLabel&&(a(),i({content:`menu:${u.label??""}:${r.label??""}`}))},children:s.jsx(d.TextStructure.Root,{children:s.jsx(d.TextStructure.DivWrapper,{children:s.jsx("h2",{children:u.label})})})}),s.jsx(d.ComponentList.List,{columns:1,...p,className:Do["submenu-categories"],children:(y=u.items)==null?void 0:y.map((b,C)=>s.jsx(d.ComponentList.ListItem,{id:`list-item-${b.label}-${C}`,children:s.jsx(Ye,{href:b.link??"#",size:"x-small",title:b.label??"",disableUnderline:!0,disablePadding:!0,onClick:()=>{a(),i({content:`menu:${u.label??""}:${b.label??""}:${r.label??""}`})},children:b.label})},`list-item-${b.label}-${C}`))}),((v=u.see_all)==null?void 0:v.link)&&s.jsx(d.ComponentList.Support,{...m,size:"small",onClick:()=>{var b;(b=u.see_all)!=null&&b.link&&(a(),i({content:`menu:${u.label??""}:${r.label}`}),o.push(u.see_all.link))},children:u.see_all.link&&u.see_all.label})]},`list-${u.label}-${f}`)}),t&&s.jsx(d.Utils.Divider,{size:"small",direction:"vertical"})]})};Sd.displayName="Menu.Categories";const Ed=({children:e,dividerOnBottom:t=!0,...r})=>{const{CONSTANTS:n}=Ae();return s.jsxs(s.Fragment,{children:[s.jsx("div",{...r,className:Do["menu-desktop"],style:{...r.style,justifyContent:n.header.ALIGNMENT_MENU},children:e}),t&&s.jsx(d.Utils.Divider,{size:"small"})]})};Ed.displayName="Menu.MenuRoot";const Gs={Root:Ed,Categories:Sd,Thumbnail:Cd},Pd=()=>{const{headerData:e,CONSTANTS:t}=Ae(),r=tl(),{reset:n}=pn();return s.jsx(d.Header.SubMenu,{className:"header-desktop-submenu",children:Array.isArray(e.subMenus)&&e.subMenus.map((o,a)=>{const{thumbnails:i,label:c,id:l}=o,u=l===r,f=i==null?void 0:i.some(p=>!!p.srcDesk);return s.jsxs(Gs.Root,{id:l,style:u?{display:"flex",zIndex:t.header.Z_INDEX_WAR.menu_desktop}:{display:"none"},dividerOnBottom:u,children:[s.jsx(Gs.Categories,{dividerOnRight:!!f,subMenu:o}),Array.isArray(i)&&s.jsx(Gs.Thumbnail,{thumbnails:i,isMobile:!1,category:c,callBack:n})]},`submenu-${l}-${a}`)})})};Pd.displayName="Header.SubMenu";const wd=()=>{const{handleSelectContent:e}=ie(),{CONSTANTS:t}=Ae();return s.jsx(Xe,{href:"/favoritos",children:s.jsx(d.Header.SupportItem,{onClick:()=>e({content:"header:wishlist"}),children:s.jsx(d.Icon,{name:t.header.ICONS.favorite_false,size:"medium"})})})};wd.displayName="Header.WishList";const xy="_root_im5yf_125",ct={"user-menu--credits":"_user-menu--credits_im5yf_1","user-menu--content":"_user-menu--content_im5yf_10","user-menu--login":"_user-menu--login_im5yf_30","user-menu--login--content":"_user-menu--login--content_im5yf_37","user-menu--menu":"_user-menu--menu_im5yf_64","user-menu--tooltip":"_user-menu--tooltip_im5yf_92","tooltip-modifier":"_tooltip-modifier_im5yf_103","modal-controls-modifier":"_modal-controls-modifier_im5yf_108","modal-header-modifier":"_modal-header-modifier_im5yf_116",root:xy},Nd=({className:e,children:t,...r})=>s.jsx("div",{...r,className:d.helpers.classNameConcat(ct["user-menu--content"],e),children:t});Nd.displayName="UserMenu.Content";var Id=(e=>(e.Account="account",e))(Id||{});const Rd=({className:e,cashBack:t,credits:r,link:n,total:o,...a})=>{const i=t?k.formatPriceToCurrency(t):void 0,c=r?k.formatPriceToCurrency(r):void 0,l=o?k.formatPriceToCurrency(o):void 0;return s.jsx(d.Credits.Account,{...a,className:d.helpers.classNameConcat(ct["user-menu--credits"],e),icon:"wallet",showIcon:!0,cashBackValue:i,creditsValue:c,linkMore:n,totalValue:l,type:Id.Account})};Rd.displayName="UserMenu.Credits";const Td=({className:e,children:t,description:r,text:n,...o})=>{const{isMobile:a}=oe();return s.jsx("div",{...o,className:d.helpers.classNameConcat(ct["user-menu--login"],e),"data-mobile":a,children:s.jsxs("div",{className:ct["user-menu--login--content"],children:[s.jsx(d.TextStructure.Root,{children:s.jsxs(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:[s.jsx("h3",{className:"typography-style-body-lg-strong",children:n}),s.jsx("p",{children:r})]})}),t]})})};Td.displayName="UserMenu.Login";const Ad=({className:e,isLogged:t,onLogoutClick:r,ICONS:n,storeConfig:o,isMobile:a})=>{const i=a?ka:ka({ICONS:n,storeConfig:o}).filter(c=>c.deviceShown==="both"||c.deviceShown===(a?"mobile":"desktop"));return s.jsxs("ul",{className:d.helpers.classNameConcat(ct["user-menu--menu"],e),children:[Array.isArray(i)&&i.map((c,l)=>s.jsx("li",{children:s.jsx(Ye,{href:c.href??"#",size:"small",disableUnderline:!0,adornments:{start:s.jsx(d.Icon,{name:c.icon??"delete"})},children:c.label})},l)),t?s.jsx("li",{children:s.jsx(Ye,{href:`${o.secureSubdomain}/api/vtexid/pub/logout?scope=mariafilo&returnUrl=${encodeURIComponent(`${o.storeUrl}`)}`,size:"small",disableUnderline:!0,onClick:r,adornments:{start:s.jsx(d.Icon,{name:Ih(n)})},children:Nh})}):s.jsx(s.Fragment,{})]})};Ad.displayName="UserMenu.Menu";const Od=e=>{const t=g.useRef(null),r=g.useCallback(a=>{t.current&&!t.current.contains(a.target)&&e()},[e]),n=g.useCallback(a=>{t.current&&!t.current.contains(a.target)&&e()},[e]),o=g.useCallback(a=>{a.key==="Escape"&&e()},[e]);return g.useEffect(()=>(document.addEventListener("mousedown",r),document.addEventListener("keydown",o),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("keydown",o),document.removeEventListener("touchstart",n)}),[r,o,n]),{ref:t}},by=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},jy=(e,t,r)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const{height:n,left:o,top:a,width:i}=t.getBoundingClientRect(),c=e.getBoundingClientRect(),l=e!=null&&e.parentElement?by(e==null?void 0:e.parentElement):0;return{left:o+i/2-(c.width+l*2),top:a+n+r}},Ld=g.createContext({}),Cy=({children:e,delay:t=600,gap:r=20,isOpen:n,setIsOpen:o,target:a,...i})=>{const c=g.useRef(null),[l,u]=g.useState(!1),[f,p]=g.useState({left:0,top:0}),{ref:m}=Od(()=>{u(!0),typeof window<"u"&&(c.current=window.setTimeout(()=>{o(!1),u(!1)},t))});return g.useEffect(()=>{if(a&&(m!=null&&m.current)){const{left:h,top:_}=jy(m.current,a,r??0);p({left:h,top:_}),u(!1)}},[r,n,a,m]),s.jsx(Ld.Provider,{value:g.useMemo(()=>({...i,...f,contentRef:m,isLeaving:l,isOpen:n,setIsOpen:o,setIsLeaving:u,target:a}),[i,f,m,l,n,o,u,a]),children:e})},kd=()=>{const e=g.useContext(Ld);if(e===void 0)throw new Error("useUserMenuContext must be used within a UserMenuProvider");return e},Dd=({children:e,isMobile:t=!1,Z_INDEX_WAR:r})=>{const{isOpen:n,setIsOpen:o}=kd();return s.jsxs(d.Modal.Root,{"data-user":"user-menu--modal",isMobile:t??!1,isOpen:n,setIsOpen:o,variant:"sideBottom",className:ct["modal-root-modifier"],style:{zIndex:r.user_menu_mobile},children:[s.jsx(d.Modal.Header,{navigation:"top",className:ct["modal-header-modifier"],children:s.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0,className:ct["modal-controls-modifier"]})}),s.jsx(d.Modal.Body,{children:e})]})};Dd.displayName="UserMenu.Modal";const Md=({children:e,component:t,Z_INDEX_WAR:r,isMobile:n,...o})=>s.jsx(Cy,{...o,className:ct.root,children:n?s.jsxs(s.Fragment,{children:[s.jsx(Mt.Modal,{Z_INDEX_WAR:r,children:t}),e]}):s.jsx(Mt.Tooltip,{component:t,style:{width:304,zIndex:r.user_menu},Z_INDEX_WAR:r,children:e})});Md.displayName="UserMenu.Root";const Fd=({children:e,component:t,Z_INDEX_WAR:r,...n})=>{const{contentRef:o,left:a,isLeaving:i,isOpen:c,top:l}=kd();return s.jsx(d.Tooltip.Root,{arrow:"top-right",component:s.jsx("div",{...n,ref:o,children:t}),className:d.helpers.classNameConcat(ct["user-menu--tooltip"],ct["tooltip-modifier"]),isLeaving:i,isOpen:c,left:a,size:"medium",position:"top",top:l,style:{zIndex:r.user_menu},children:s.jsx("div",{className:ct["user-menu--tooltip"],children:e})})};Fd.displayName="UserMenu.Tooltip";const Mt={Credits:Rd,Content:Nd,Login:Td,Menu:Ad,Modal:Dd,Root:Md,Tooltip:Fd},ls=({children:e,isOpen:t,setIsOpen:r,desktopUserMenuTarget:n,mobileUserMenuTarget:o,storeConfig:a})=>{var h,_,y;const{isMobile:i}=oe(),{CONSTANTS:c}=Ae(),l=Vr(),u=()=>{window.location.href=`${a.secureSubdomain}/api/io/login?returnUrl=${encodeURIComponent(`${window.location.href}`)}`},f=!!((h=l.user)!=null&&h.userId),{cashback:p,credits:m}=g.useMemo(()=>{var v,b;return{credits:((v=l==null?void 0:l.getCurrentCredits())==null?void 0:v.credits)??0,cashback:((b=l==null?void 0:l.getCurrentCredits())==null?void 0:b.cashback)??0}},[l]);return s.jsx(Mt.Root,{component:s.jsxs(Mt.Content,{children:[s.jsx(Mt.Login,{description:Th(f),text:Rh(f,((_=l==null?void 0:l.user)==null?void 0:_.firstName)??((y=l==null?void 0:l.user)==null?void 0:y.email)),children:!f&&s.jsx(d.Button,{id:"conta",size:"medium",variant:"quaternary",onClick:()=>u(),children:c.header.MENU_INFO.login.button_text})}),m+p&&f?s.jsx(Mt.Credits,{credits:m,cashBack:p,link:`${a.secureSubdomain}/account#/meus-creditos`,total:m+p}):s.jsx(s.Fragment,{}),s.jsx(d.Utils.Divider,{}),s.jsx(Mt.Menu,{ICONS:c.header.ICONS,storeConfig:a,isLogged:f,className:k.responsive["responsive-desktop-flex"],onLogoutClick:()=>l.logout()}),s.jsx(Mt.Menu,{ICONS:c.header.ICONS,storeConfig:a,isMobile:!0,isLogged:f,className:k.responsive["responsive-mobile-flex"],onLogoutClick:()=>l.logout()})]}),isOpen:t,isMobile:i,setIsOpen:r,target:i?o:n,Z_INDEX_WAR:c.header.Z_INDEX_WAR,children:e})};ls.displayName="UserMenu";const zd=({storeConfig:e})=>{const{CONSTANTS:t}=Ae(),{handleSelectContent:r}=ie(),{reset:n}=pn(),{setValue:o}=ea(),a=Jo(),i=g.useRef(null);return s.jsxs(s.Fragment,{children:[s.jsxs(d.Header.Wrapper,{className:"header-desktop-wrapper",children:[s.jsx(d.Header.Logo,{style:{width:"100%"},children:s.jsx(Xe,{href:"/",onMouseEnter:n,children:s.jsx(d.Icon,{name:t.header.ICONS.logo,onClick:()=>{r({content:"header:logo"})}})})}),s.jsx(jd,{}),s.jsxs(d.Header.Support,{onMouseEnter:n,style:{justifyContent:"flex-end"},children:[s.jsx(gy,{}),s.jsx(ls,{isOpen:a,setIsOpen:o,desktopUserMenuTarget:i.current,storeConfig:e,children:s.jsx(d.Header.SupportItem,{onClick:()=>{o(!0),r({content:"header:user_menu"})},className:xa["btn-login"],innerRef:i,children:s.jsx(d.Icon,{name:t.header.ICONS.person,size:"medium"})})}),s.jsx(wd,{}),s.jsx(ba,{id:"cart-button"})]})]}),s.jsx(Pd,{})]})};zd.displayName="Header.HeaderDesktopWrapper";const Ze={"menu--banners":"_menu--banners_j3ev9_1","menu--banners--item":"_menu--banners--item_j3ev9_6","menu--banners--item--text":"_menu--banners--item--text_j3ev9_17","menu--banners--list":"_menu--banners--list_j3ev9_21","menu--dummy-close":"_menu--dummy-close_j3ev9_46","menu--body":"_menu--body_j3ev9_54","menu--categories":"_menu--categories_j3ev9_67","menu--categories--title":"_menu--categories--title_j3ev9_80","menu--step":"_menu--step_j3ev9_92","menu--sub-category":"_menu--sub-category_j3ev9_108","menu--sub-category--item":"_menu--sub-category--item_j3ev9_115","menu--sub-category--list":"_menu--sub-category--list_j3ev9_121"},Bd=({children:e,mobileBannerAlt:t,mobileBannerSrc:r,textColor:n,submenuId:o,label:a,...i})=>s.jsx("button",{...i,className:Ze["menu--banners--item"],children:r?s.jsxs(d.Banner.Container,{children:[s.jsx(d.Banner.ImageWrapper,{children:s.jsx(De.Image,{alt:t??r,height:128,src:r,width:343,unoptimized:!0})}),s.jsx(d.Banner.Slot,{verticalAlignment:"end",horizontalAlignment:"center",children:s.jsx(d.TextStructure.Root,{children:s.jsx(d.TextStructure.DivWrapper,{className:Ze["menu--banners--item--text"],children:s.jsx("h2",{className:"typography-style-body-xs",style:n?{color:n}:{},children:e})})})})]}):s.jsx("h2",{...i,children:e})});Bd.displayName="Menu.Mobile.Category";const Ud=({label:e,...t})=>{const{CONSTANTS:r}=Ae();return s.jsx(d.Button,{...t,adornment:{end:s.jsx(d.Icon,{name:r.header.ICONS.arrow_right,size:"medium"})},mode:"inverse",size:"medium",variant:"primary",children:e})};Ud.displayName="Menu.Mobile.Body.Category";const qd=({subCategory:e,submenuLabel:t,onHandleOut:r,...n})=>s.jsx("div",{...n,className:Ze["menu--sub-category--list"],children:Array.isArray(e==null?void 0:e.items)&&(e==null?void 0:e.items.map((o,a)=>s.jsx(Ye,{disableUnderline:!0,disablePadding:!1,href:o.link??"#",onClick:()=>r(o.label,t),size:"medium",title:o.label??"",children:o.label},a)))});qd.displayName="Menu.Mobile.List";const $d=({current:e,onHandleOut:t})=>{var r;return e?s.jsx("div",{className:Ze["menu--sub-category"],children:Array.isArray(e==null?void 0:e.subCategories)&&((r=e==null?void 0:e.subCategories)==null?void 0:r.map((n,o)=>s.jsxs("div",{className:Ze["menu--sub-category--item"],children:[s.jsx(Jr.Title,{onHandleOut:t,subCategory:n,submenuLabel:e==null?void 0:e.id}),s.jsx(Jr.List,{onHandleOut:t,subCategory:n,submenuLabel:e==null?void 0:e.id})]},o)))}):s.jsx(s.Fragment,{})};$d.displayName="Menu.Mobile.Body.SubCategory";const Hd=({subCategory:e,submenuLabel:t,onHandleOut:r,...n})=>{var c;const{router:o}=pe(),{handleSelectContent:a}=ie(),{CONSTANTS:i}=Ae();return s.jsxs("div",{...n,className:Ze["menu--categories--title"],children:[s.jsx(vn,{href:e==null?void 0:e.linkLabel,title:e==null?void 0:e.linkLabel,onClick:()=>{a({content:`menu:${e.label??""}:${t}`})},children:s.jsx(d.TextStructure.Root,{children:s.jsx(d.TextStructure.DivWrapper,{children:s.jsx("h2",{className:"typography-style-body-md",children:e==null?void 0:e.label})})})}),((c=e==null?void 0:e.see_all)==null?void 0:c.link)&&s.jsx(d.ComponentList.Support,{adornment:{end:s.jsx(d.Icon,{name:i.header.ICONS.arrow_right,size:"small"})},size:"small",onClick:()=>{var l;r(e.label,t),(l=e==null?void 0:e.see_all)!=null&&l.link&&o.push(e.see_all.link)},children:e.see_all.label})]})};Hd.displayName="Menu.Mobile";const Jr={Banner:Bd,Category:Ud,List:qd,SubCategory:$d,Title:Hd},Vd=g.createContext({}),Sy=({children:e})=>{const[t,r]=g.useState(null),n=g.useCallback(()=>{r(null)},[]),o=a=>{a!==t&&r(a)};return s.jsx(Vd.Provider,{value:{currentCategory:t,setCurrentCategory:r,handleCloseMenu:n,handleChangeSubMenuOpened:o},children:e})},Wd=()=>g.useContext(Vd),Gd=e=>{const{router:t}=pe(),{headerData:r}=Ae(),{handleSelectContent:n}=ie(),{currentCategory:o,setCurrentCategory:a}=Wd(),i=g.useRef(null),c=()=>{if(i.current){const h=i.current;h&&(a(null),h==null||h.click())}},l=(h,_)=>{n({content:`menu:${h}`}),t.push(_),c()},u=(h,_)=>{n({content:`menu:${h}:${_}`}),c()},f=Array.isArray(r==null?void 0:r.categories)?r==null?void 0:r.categories:[],p=Array.isArray(r==null?void 0:r.subMenus)?r==null?void 0:r.subMenus:[],m=h=>{h.submenuId?a(h.submenuId):l(h.label,h.link)};return s.jsxs("div",{...e,className:Ze["menu--body"],style:{transform:`translate3d(calc(-100% * ${o?1:0}), 0px, 0px)`},children:[s.jsx("button",{className:Ze["menu--dummy-close"],ref:i,"data-close":!0}),s.jsxs("div",{className:Ze["menu--step"],"data-active":"true",children:[s.jsx("div",{className:Ze["menu--banners"],children:s.jsx("div",{className:Ze["menu--banners--list"],children:f.map((h,_)=>g.createElement(Jr.Banner,{...h,key:_,onClick:()=>l(h.label,h.link)},h.mobileBannerAlt))})}),s.jsx("div",{className:Ze["menu--categories"],children:f.map((h,_)=>s.jsx(Jr.Category,{label:h.label,onClick:()=>m(h)},_))})]}),s.jsx("div",{className:Ze["menu--step"],"data-active":!!o,children:s.jsx(Jr.SubCategory,{current:p.find(h=>h.id===o),onHandleOut:u})})]})};Gd.displayName="Menu.Mobile.Body";const Ey={"menu--header":"_menu--header_1ozdf_1"},Kd=()=>{var o;const{headerData:e}=Ae(),{currentCategory:t,setCurrentCategory:r}=Wd(),n=(o=e==null?void 0:e.categories)==null?void 0:o.find(a=>a.submenuId===t);return s.jsxs("div",{className:Ey["menu--header"],children:[s.jsx(d.Button,{"data-out":!n,iconNameStart:"arrow-left",mode:"inverse",onClick:()=>r(null)}),n&&s.jsx(d.TextStructure.Root,{children:s.jsx(d.TextStructure.DivWrapper,{alignContent:"center",children:s.jsx("h2",{className:"typography-style-body-lg",children:n==null?void 0:n.label})})}),s.jsx(d.Button,{iconNameStart:"close","data-close":!0,"data-only":!n,mode:"inverse",onClick:()=>r(null)})]})};Kd.displayName="Menu.Mobile.Header";var Mo={exports:{}};function Py(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ks={},Qs={},ki;function wy(){return ki||(ki=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"LoadableContext",{enumerable:!0,get:function(){return n}});const n=Ve._(g).default.createContext(null);process.env.NODE_ENV!=="production"&&(n.displayName="LoadableContext")}(Qs)),Qs}var Di;function Ny(){return Di||(Di=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return h}});const r=Ve._(g),n=wy();function o(_){return _&&_.default?_.default:_}const a=[],i=[];let c=!1;function l(_){let y=_(),v={loading:!0,loaded:null,error:null};return v.promise=y.then(b=>(v.loading=!1,v.loaded=b,b)).catch(b=>{throw v.loading=!1,v.error=b,b}),v}function u(_,y){let v=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},y),b=null;function C(){if(!b){const S=new f(_,v);b={getCurrentValue:S.getCurrentValue.bind(S),subscribe:S.subscribe.bind(S),retry:S.retry.bind(S),promise:S.promise.bind(S)}}return b.promise()}if(typeof window>"u"&&a.push(C),!c&&typeof window<"u"){const S=v.webpack&&typeof Py.resolveWeak=="function"?v.webpack():v.modules;S&&i.push(E=>{for(const P of S)if(E.includes(P))return C()})}function j(){C();const S=r.default.useContext(n.LoadableContext);S&&Array.isArray(v.modules)&&v.modules.forEach(E=>{S(E)})}function x(S,E){j();const P=r.default.useSyncExternalStore(b.subscribe,b.getCurrentValue,b.getCurrentValue);return r.default.useImperativeHandle(E,()=>({retry:b.retry}),[]),r.default.useMemo(()=>P.loading||P.error?r.default.createElement(v.loading,{isLoading:P.loading,pastDelay:P.pastDelay,timedOut:P.timedOut,error:P.error,retry:b.retry}):P.loaded?r.default.createElement(o(P.loaded),S):null,[S,P])}return x.preload=()=>C(),x.displayName="LoadableComponent",r.default.forwardRef(x)}class f{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};const{_res:y,_opts:v}=this;y.loading&&(typeof v.delay=="number"&&(v.delay===0?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},v.delay)),typeof v.timeout=="number"&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},v.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(b=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(y){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...y},this._callbacks.forEach(v=>v())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(y){return this._callbacks.add(y),()=>{this._callbacks.delete(y)}}constructor(y,v){this._loadFn=y,this._opts=v,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function p(_){return u(l,_)}function m(_,y){let v=[];for(;_.length;){let b=_.pop();v.push(b(y))}return Promise.all(v).then(()=>{if(_.length)return m(_,y)})}p.preloadAll=()=>new Promise((_,y)=>{m(a).then(_,y)}),p.preloadReady=_=>(_===void 0&&(_=[]),new Promise(y=>{const v=()=>(c=!0,y());m(i,_).then(v,v)})),typeof window<"u"&&(window.__NEXT_PRELOADREADY=p.preloadReady);const h=p}(Ks)),Ks}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(f,p){for(var m in p)Object.defineProperty(f,m,{enumerable:!0,get:p[m]})}r(t,{default:function(){return u},noSSR:function(){return l}});const n=Ve,o=s,a=n._(Ny()),i=typeof window>"u";function c(f){return{default:(f==null?void 0:f.default)||f}}function l(f,p){if(delete p.webpack,delete p.modules,!i)return f(p);const m=p.loading;return()=>(0,o.jsx)(m,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}function u(f,p){let m=a.default,h={loading:v=>{let{error:b,isLoading:C,pastDelay:j}=v;if(!j)return null;if(process.env.NODE_ENV!=="production"){if(C)return null;if(b)return(0,o.jsxs)("p",{children:[b.message,(0,o.jsx)("br",{}),b.stack]})}return null}};f instanceof Promise?h.loader=()=>f:typeof f=="function"?h.loader=f:typeof f=="object"&&(h={...h,...f}),h={...h,...p};const _=h.loader,y=()=>_!=null?_().then(c):Promise.resolve(c(()=>null));return h.loadableGenerated&&(h={...h,...h.loadableGenerated},delete h.loadableGenerated),typeof h.ssr=="boolean"&&!h.ssr?(delete h.webpack,delete h.modules,l(m,h)):m({...h,loader:y})}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(Mo,Mo.exports);var Iy=Mo.exports,Ry=Iy;const Qd=k.getDefaultExportFromCjs(Ry),Qn={"modal-modifier":"_modal-modifier_10zw4_1","menu--navigation-bar":"_menu--navigation-bar_10zw4_15","menu--root":"_menu--root_10zw4_26"},Xd=({children:e})=>{const{menuIsOpen:t,setMenuIsOpen:r}=sa(),{CONSTANTS:n}=Ae();return s.jsxs(d.Modal.RootWithoutPortal,{className:d.helpers.classNameConcat(Qn["modal-modifier"],"menu-mobile-root"),isOpen:t,setIsOpen:r,variant:"sideRight",style:{bottom:"unset",overflowY:"hidden",position:"fixed",top:0,zIndex:n.header.Z_INDEX_WAR.menu_mobile},children:[s.jsx(Kd,{}),s.jsx(d.Modal.Body,{className:Qn["menu--root"],children:e})]})};Xd.displayName="Menu.MenuRoot";const Ty=Qd(()=>Promise.resolve(Xd),{ssr:!1}),Yd=({children:e,last:t=!1,...r})=>s.jsxs(s.Fragment,{children:[s.jsx(d.Button,{...r,"data-close":!0,size:"small",variant:"tertiary",children:e}),!t&&s.jsx(d.Utils.Divider,{direction:"vertical",size:"small",className:Qn.divider})]});Yd.displayName="Menu.NavigationBarItem";const Zd=()=>{const{setUserMenuIsOpen:e}=sa(),{handleSelectContent:t}=ie(),{CONSTANTS:r}=Ae(),{router:n}=pe(),o=[{iconNameStart:r.header.ICONS.person,onClick:()=>{e(!0),t({content:"menu:user_menu"})},text:r.header.MENU_INFO.login.button_text},{iconNameStart:r.header.MENU_INFO.bag.button_icon,onClick:()=>{t({content:"menu:wishlist"}),n.push("/favoritos")},text:r.header.MENU_INFO.bag.button_text},{last:!0,iconNameStart:r.header.MENU_INFO.store.button_icon,onClick:()=>{t({content:"menu:store"}),n.push("/institucional/lojas")},text:r.header.MENU_INFO.store.button_text}];return s.jsx(d.Card,{id:"menu-navigationbar",shadow:!0,className:Qn["menu--navigation-bar"],style:{zIndex:r.header.Z_INDEX_WAR.menu_mobile_navigation_bar},children:Array.isArray(o)&&o.map((a,i)=>g.createElement(Yd,{...a,key:i},a.text))})};Zd.displayName="Menu.NavigationBar";const Xs={Body:Gd,NavigationBar:Zd,Root:Ty},Jd=({storeConfig:e})=>{const t=g.useRef(null),{CONSTANTS:r}=Ae(),{MENU_NAVIGATION_BAR_ALLOWED:n,ICONS:o}=r.header,{handleSelectContent:a}=ie(),{setValue:i}=ts(),{setValue:c}=sl(),{setValue:l}=ea(),u=Jo(),f=nl(),{isMobile:p}=oe();return s.jsxs(s.Fragment,{children:[s.jsxs(d.Header.Wrapper,{className:"header-mobile-wrapper",children:[s.jsx(d.Header.Logo,{style:{width:"100%"},children:s.jsx(Xe,{href:"/",children:s.jsx(d.Icon,{name:o.logo,size:"x-large",onClick:()=>{a({content:"header:logo"})}})})}),s.jsxs(d.Header.Support,{children:[s.jsx(d.Header.SupportItem,{onClick:()=>{i(!0),a({content:"header:search"})},children:s.jsx(d.Icon,{name:o.search,size:"medium"})}),s.jsx(ba,{}),s.jsxs(d.Header.SupportItem,{onClick:()=>c(!0),children:[s.jsx("span",{ref:t}),s.jsx(d.Icon,{name:o.menu,size:"medium"})]})]})]}),p&&s.jsx(vl,{menuIsOpen:f,setMenuIsOpen:c,userMenuIsOpen:f,setUserMenuIsOpen:l,children:s.jsx(ls,{storeConfig:e,isOpen:u,setIsOpen:l,mobileUserMenuTarget:t==null?void 0:t.current,children:s.jsxs(Xs.Root,{children:[s.jsx(Xs.Body,{}),n?s.jsx(Xs.NavigationBar,{}):s.jsx(s.Fragment,{})]})})})]})};Jd.displayName="Header.HeaderMobileWrapper";const Ay=g.createContext({}),Oy=({children:e})=>{const{sendDataLayerEvent:t}=ie(),{cartStore:r,isOpen:n}=Pe();g.useEffect(()=>{n&&t({functionKey:"viewCartEvent",data:{commonData:{cartStore:r}}})},[n]),g.useEffect(()=>{var a,i,c;if(r.id&&!((i=(a=r.marketingData)==null?void 0:a.marketingTags)!=null&&i.includes("faststore"))){const{id:l}=r;lr.post("/api/checkout/order-form/attachments/marketing-data",{orderFormId:l,marketingData:{...r==null?void 0:r.marketingData,marketingTags:Vc(((c=r.marketingData)==null?void 0:c.marketingTags)??[])}}).catch(u=>{console.error(u)})}},[r]);const o=({cartItem:a,oldQuantity:i,newQuantity:c})=>{t({functionKey:"skuEvents",data:{event:i>c?"remove_from_cart":"add_to_cart",commonData:{products:[{...a,price:a.price/100,listPrice:a.listPrice/100}]},customData:{quantity:c},supportData:{selectedSkus:[a]}}})};return s.jsx(Ay.Provider,{value:{handleUpdateItemQuantityEvent:o},children:e})},Ly="var(--color-background-brand-primary-lighter)",ky="_fadeInOut_1l5ow_1",Dy="_fadeOut_1l5ow_1",se={brandPrimaryLighter:Ly,"mc--cashback":"_mc--cashback_1l5ow_1","mc--cashback--positive":"_mc--cashback--positive_1l5ow_21","mc--cashback--alert":"_mc--cashback--alert_1l5ow_24","mc--container--actions":"_mc--container--actions_1l5ow_28","mc--container--actions--secondary":"_mc--container--actions--secondary_1l5ow_36","mc-container-actions--toggle-size-modifier":"_mc-container-actions--toggle-size-modifier_1l5ow_55","mc--footer":"_mc--footer_1l5ow_63","mc--footer--actions":"_mc--footer--actions_1l5ow_72","mc--footer--actions-button":"_mc--footer--actions-button_1l5ow_77","mc--footer--total":"_mc--footer--total_1l5ow_93","mc--footer--total--info":"_mc--footer--total--info_1l5ow_98","mc--footer--total--info--content":"_mc--footer--total--info--content_1l5ow_103","mc--field":"_mc--field_1l5ow_149","mc--body":"_mc--body_1l5ow_189","mc--body--products":"_mc--body--products_1l5ow_196","mc--body--empty--feedback":"_mc--body--empty--feedback_1l5ow_204","mc--body--empty--text":"_mc--body--empty--text_1l5ow_209","mc--body--promotion":"_mc--body--promotion_1l5ow_222","mc--body--promotion--closeness":"_mc--body--promotion--closeness_1l5ow_225","mc--body--promotion--closeness--success":"_mc--body--promotion--closeness--success_1l5ow_248","mc--body--coupon-tag":"_mc--body--coupon-tag_1l5ow_260","mc--body--coupon-tag--text":"_mc--body--coupon-tag--text_1l5ow_278","mc--body--coupon-tag--button":"_mc--body--coupon-tag--button_1l5ow_284","mc--header":"_mc--header_1l5ow_290","mc--header--subtitle":"_mc--header--subtitle_1l5ow_316","mc--notify":"_mc--notify_1l5ow_357","mc--notify--content":"_mc--notify--content_1l5ow_372","mc--notify--item":"_mc--notify--item_1l5ow_385",fadeInOut:ky,fadeOut:Dy,"mc--card":"_mc--card_1l5ow_447","mc--card--actions":"_mc--card--actions_1l5ow_452","mc--card--actions--secondary":"_mc--card--actions--secondary_1l5ow_460","mc--card--actions--add-remove":"_mc--card--actions--add-remove_1l5ow_487","mc--card--actions--gift":"_mc--card--actions--gift_1l5ow_501","mc--card--content-info":"_mc--card--content-info_1l5ow_514","mc--card--details":"_mc--card--details_1l5ow_521","mc--card--link":"_mc--card--link_1l5ow_526","mc--product--unavailable":"_mc--product--unavailable_1l5ow_534","mc--card--name":"_mc--card--name_1l5ow_537","mc--card--price":"_mc--card--price_1l5ow_552","mc--card--price--old-price":"_mc--card--price--old-price_1l5ow_562","mc--card--price--price-details":"_mc--card--price--price-details_1l5ow_566","mc--card--product-link":"_mc--card--product-link_1l5ow_577","mc--discount":"_mc--discount_1l5ow_587","mc--discount--header":"_mc--discount--header_1l5ow_590","inputs--tooltip":"_inputs--tooltip_1l5ow_590","mc--discount--body":"_mc--discount--body_1l5ow_609","minicart--modal-modifier":"_minicart--modal-modifier_1l5ow_630"},ef=({item:{id:e,message:t,callback:r},removeNotification:n,ICONS:o})=>{const a=g.useRef(null),i=()=>{var l;(l=a.current)==null||l.setAttribute("data-animation-out","true")},c=l=>{n(l)};return s.jsx("div",{className:se["mc--notify--item"],ref:a,onAnimationEnd:()=>c(e),children:s.jsxs(d.SnackBar.Structure,{size:"medium",children:[s.jsx(d.SnackBar.Content,{title:t}),s.jsxs(d.SnackBar.Support,{children:[typeof r=="function"&&s.jsx(d.Button,{onClick:()=>{r(),i()},size:"small",variant:"tertiary",children:"Desfazer"}),s.jsx(d.Button,{iconNameStart:o.close,iconSize:"small",onClick:()=>i(),variant:"tertiary"})]})]})},e)};ef.displayName="MiniCart.Notify.Item";const tf=({ICONS:e})=>{const t=Yo(),{removeNotification:r}=Zo(),n=t.length?[...t].sort((o,a)=>a.id-o.id):[];return n.length?s.jsx("div",{className:se["mc--notify"],children:s.jsx("div",{className:se["mc--notify--content"],children:Array.isArray(n)&&n.map(o=>s.jsx(ef,{item:o,removeNotification:r,ICONS:e},o.id))})}):null};tf.displayName="MiniCart.Notifications";const My=({handleSendEvent:e,onHandleRemove:t,product:r,MINICART_CONFIG:n,...o})=>{const a=Hr(),{toggleProduct:i}=gr(),{itemOffered:{isVariationOf:{productGroupID:c}},quantity:l}=r;return s.jsx(d.Button,{...o,adornment:{end:s.jsx(d.Icon,{name:`favorite-${a.includes(c)?"true":"false"}`,size:"small"})},onClick:()=>{i(c),a.includes(c)||t({texture:"mini-cart-wishlist",title:`${n.messages.add_wishlist}`},l,()=>i(c)),e(a.includes(c)?"remove_from_wishlist":"add_to_wishlist","productEvents")},children:n.messages.add_wishlist_button})},rf=({handleSendEvent:e,product:t,ICONS:r,MINICART_CONFIG:n,...o})=>{const{addToCart:a,removeToCart:i}=Pe(),{bundleItems:c=[],id:l,uniqueId:u,seller:f,offerings:p,quantity:m}=t,h=(_,y,v)=>{i(l,_.title,()=>{typeof v=="function"&&v(),a({id:l,quantity:y,seller:f},{id:l,texture:_.texture},!0)})};return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:se["mc--card--actions--add-remove"],children:[n.has_wishlist_button&&s.jsx(My,{...o,product:t,handleSendEvent:e,onHandleRemove:h,ICONS:r,MINICART_CONFIG:n}),s.jsx(d.Button,{...o,adornment:{end:s.jsx(d.Icon,{name:r.delete,size:"small"})},underline:!0,variant:"secondary",state:"danger",onClick:()=>{h({texture:"mini-cart",title:`${n.messages.remove}`},m),e("remove_from_cart","skuEvents")},children:n.messages.remove_button})]}),n.has_gift_option&&s.jsx(Sr.Gift,{uniqueId:u,bundleItems:c,offerings:p,ICONS:r,MINICART_CONFIG:n})]})};rf.displayName="MiniCart.Card.Actions";const nf=({bundleItems:e,offerings:t,uniqueId:r,ICONS:n,MINICART_CONFIG:o})=>{const[a,i]=g.useState(!1),{toggleGiftItemCart:c}=Pe(),l=()=>{if(t instanceof Object&&Array.isArray(t)){const[p]=t;if(p){i(!0);const m=e.some(h=>h.id===p.id);c(r,String(p.id),m).then(()=>i(!1))}}},u=t[0],f=e.find(p=>p.id===u.id);return u&&"id"in u?s.jsx("div",{className:se["mc--card--actions--gift"],children:s.jsx(d.Checkbox,{adornment:s.jsx(d.Icon,{name:n.check}),checked:!!f,disabled:a,label:o.messages.giftPackage,onChange:l})}):null};nf.displayName="MiniCart.Card.Gift";const sf=({itemOffered:e})=>{const t=k.updatedResizedImg(e==null?void 0:e.image[0].url,{width:200,height:300});return s.jsx(Xe,{href:`${e==null?void 0:e.slug}`,className:se["mc--card--product-link"],children:s.jsx(De.Image,{alt:(e==null?void 0:e.image[0].alternateName)||"Produto",src:t||"",width:108,height:164,objectFit:"unset"})})};sf.displayName="MiniCart.Card.Media";const of=({name:e,skuName:t,tagName:r,className:n})=>s.jsxs(s.Fragment,{children:[r&&s.jsx(d.Tag,{variant:"quaternary",title:r,style:{textTransform:"uppercase"},children:r}),s.jsx("p",{className:d.helpers.classNameConcat(se["mc--card--name"],n),children:k.getProductNameWithoutSku(e??"",t??"")})]});of.displayName="MiniCart.Card.Name";const af=({total:e,totalList:t})=>s.jsx(d.ProductInfo.Root,{children:s.jsx(d.TextStructure.Root,{children:s.jsx(d.TextStructure.DivWrapper,{className:se["mc--card--price"],children:s.jsx(d.ProductInfo.Wrapper,{className:se["mc--card--price--details"],size:"small",layout:"horizontal",children:t&&e!==t?s.jsxs(s.Fragment,{children:[s.jsx(d.ProductInfo.Price,{label:"originalPrice",value:k.formatPriceToCurrency(t),size:"small"}),s.jsx(d.ProductInfo.Price,{label:"discountPrice",value:k.formatPriceToCurrency(e),size:"small"})]}):s.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:k.formatPriceToCurrency(e),size:"small"})})})})});af.displayName="MiniCart.ProductPrice";const cf=({product:e,TEXTURE_IMAGE:t,TOGGLE_STYLE_MODIFIER:r})=>{var u;const[n,o]=g.useState(""),a=g.useRef(null),{cartStore:{options:i}}=Pe(),c=e.itemOffered.isVariationOf.productGroupID,l=g.useCallback(()=>{var p;const f=(p=i==null?void 0:i.find(m=>m.id===c))==null?void 0:p.texture;if(f){o(f);return}fetch("/api/catalog/product/info",{method:"POST",priority:"low",body:JSON.stringify({ids:[c]})}).then(m=>m.json()).then(m=>{const h=m.data[0].items.find(_=>_.itemId===e.id);if(h){const _=h.images.find(y=>t.includes(y.imageLabel));if(_!=null&&_.imageUrl){o(_.imageUrl);return}o(h.images[0].imageUrl)}}).catch(m=>{console.error(m)})},[i,c,e.id]);return g.useEffect(()=>{if(!a.current)return;const f=new IntersectionObserver(p=>{p[0].isIntersecting&&l()});return f.observe(a.current),()=>{f.disconnect()}},[l]),s.jsx("div",{ref:a,children:s.jsx(d.ToggleStyle.Wrapper,{size:"small",style:r,children:s.jsx(d.ToggleStyle.Texture,{children:n?s.jsx(De.Image,{alt:((u=e.itemOffered)==null?void 0:u.image[0].alternateName)??"Produto",src:n,width:164,height:164,style:r}):s.jsx(Iu,{})})})})};cf.displayName="MiniCart.Card.Style";const lf=({product:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,TEXTURE_IMAGE:n,TOGGLE_STYLE_MODIFIER:o})=>{const{size:a}=k.getColorAndSizeFromSkuName(e.itemOffered.skuName??"",r);return s.jsxs(d.Utils.Row,{alignItems:"center",children:[s.jsx(cf,{product:e,TEXTURE_IMAGE:n,TOGGLE_STYLE_MODIFIER:o}),s.jsx(d.Utils.Divider,{direction:"vertical",size:"small",style:{height:24}}),a&&s.jsx(d.ToggleSize.Wrapper,{size:t.product_card.sku.size??"small",variation:t.product_card.sku.variation??"fill",className:se["mc-container-actions--toggle-size-modifier"],style:{backgroundColor:`${se.brandPrimaryLighter}`},children:s.jsx(d.ToggleSize.Text,{children:a})})]})};lf.displayName="MiniCart.Card.Sku";const Sr={Actions:rf,Gift:nf,Media:sf,Name:of,Price:af,Sku:lf},Fy=e=>{var t;return{price:e.sellingPrice/100,listPrice:e.listPrice/100,totalPrice:(((t=e.priceDefinition)==null?void 0:t.total)??0)/100,totalListPrice:e.listPrice*e.quantity/100}},uf=({available:e=!0,index:t,product:r,ICONS:n,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c})=>{var p,m;const{sendDataLayerEvent:l}=ie(),u=Fy(r),f=(h,_)=>{const y={commonData:{...r,...u},customData:{index:t},event:h};if(_==="skuEvents"){const v={...r,...u};y.supportData={selectedSkus:[v]},y.commonData.products=[v]}l({functionKey:_,data:y})};return s.jsxs("div",{className:d.helpers.classNameConcat(se["mc--card"],e?"":se["mc--card--unavailable"]),children:[s.jsx(Sr.Media,{itemOffered:r.itemOffered}),s.jsxs("div",{className:se["mc--card--content-info"],children:[s.jsx(Sr.Name,{name:((p=r.itemOffered)==null?void 0:p.name)??"",skuName:(m=r.itemOffered)==null?void 0:m.skuName}),s.jsxs("div",{className:se["mc--card--details"],children:[s.jsx("div",{className:se["mc--card--actions"],children:e?s.jsx(Sr.Price,{total:u.price,totalList:u.listPrice}):s.jsx(d.Tag,{variant:"secondary",size:"small",children:"Indisponível"})}),s.jsxs("div",{className:se["mc--card--actions--secondary"],children:[e&&s.jsx(Sr.Sku,{product:r,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c}),s.jsx(Sr.Actions,{handleSendEvent:f,product:r,size:"small",variant:"tertiary",ICONS:n,MINICART_CONFIG:o})]})]})]})]})};uf.displayName="MiniCart.Card";const df=({type:e="positive",ICONS:t,MESSAGE_CASHBACK:r})=>{var a;const{toExpire:n}=Vr(),o=((a=n==null?void 0:n.cashback)==null?void 0:a.reduce((i,c)=>i+c.remaining_value,0))??0;return o>0?s.jsxs("div",{className:d.helpers.classNameConcat(se["mc--cashback"],se[`mc--cashback--${e}`]),children:[s.jsx(d.Icon,{name:t.alert_circle,size:"medium"}),s.jsxs("p",{children:[s.jsx("span",{children:k.formatPriceToCurrency(o)})," ",r.title]})]}):null};df.displayName="MiniCart.Cashback";const ff=({type:e,ICONS:t,MINICART_CONFIG:r})=>{const{addCouponSeller:n,removeCoupon:o,removeSellerCode:a,cartStore:{marketingData:i,openTextField:c}}=Pe(),[l,u]=g.useState(!1),[f,p]=g.useState(!1),m=g.useCallback(()=>{let v="";return e==="coupon"?v=(i==null?void 0:i.coupon)??"":v=String((c==null?void 0:c.value)??""),v.toUpperCase()??""},[i,c,e]),[h,_]=g.useState(!!m()),y=async v=>{p(!0),!!m()&&(e==="coupon"?await o():await a(),_(!1),u(!1)),await n(v,e).then(C=>{if(!C.statusOk&&v||C.code!==200){v?(u(!0),_(!1)):u(!1);return}_(!0),u(!1)}).catch(()=>u(!0)).finally(()=>p(!1))};return s.jsx(Ke.Field,{hasError:l,hasSuccess:h,isLoading:f,onHandler:y,type:e,title:e==="coupon"?`${r.messages.descount_cupom_placeholder}`:`${r.messages.sellers_code_placeholder}`,value:m(),MINICART_CONFIG:r,ICONS:t})};ff.displayName="MiniCart.CouponSeller";const pf=({ICONS:e,MINICART_CONFIG:t,PLP_NOT_RESULT:r})=>{const{router:n}=pe(),o=()=>{n.push(r.link)};return s.jsxs(d.Utils.Column,{alignContent:"center",alignItems:"center",gap:"24px",className:se["mc--body--empty--feedback"],children:[s.jsx(d.TextStructure.Root,{children:s.jsx(d.TextStructure.DivWrapper,{children:s.jsxs("p",{className:`typography-style-body-xs ${se["mc--body--empty--text"]}`,children:[t.messages.empty_card," "]})})}),s.jsx(d.Button,{variant:"tertiary",size:"large",onClick:()=>o(),"data-close":!0,adornment:{end:s.jsx(d.Icon,{name:e.arrow_right,size:"medium"})},children:t.messages.empty_bag})]})};pf.displayName="MiniCart.Feedback";const zy=e=>{const t=e.replace(/\D/g,"");return t.length>5?`${t.slice(0,5)}-${t.slice(5,8)}`:t},mf=({feedback:e,hasError:t,onHandler:r,hasSuccess:n,type:o,title:a,value:i,ICONS:c})=>{const[l,u]=g.useState(i);g.useEffect(()=>{t||u(i)},[i,t]);const f=()=>t?s.jsx(d.Icon,{name:c.delete_circle}):String(i).length&&n?s.jsx(d.Icon,{name:c.check_circle}):null,p=()=>{if(o==="seller"){const y=String(i).includes(" - ")?String(i).split(" - ")[0]:l;u(y)}},m=()=>{if(o==="seller"){const y=String(i).includes(" - ")?i:l;u(y)}},h=y=>{const v=y.currentTarget.value;if(v===""&&typeof r=="function"||n&&String(i).length>0&&v!==String(i)||t&&v!==String(i)){u(""),r("");return}if(o==="cep"){const C=zy(v);u(C)}else u(v)},_=y=>{if(y.key.toLocaleLowerCase()==="enter"&&typeof r=="function"){const v=y.currentTarget.value;r(v)}};return s.jsx(d.TextField.Input,{adornment:{end:f()},mode:"over-label",label:a,feedback:e,value:l,type:"text",onFocus:p,onBlur:m,onChange:h,onKeyDown:_})};mf.displayName="MiniCart.Field.Input";const hf=({title:e,ICONS:t,MINICART_CONFIG:r,...n})=>{const o=g.useRef(null),{hasSuccess:a,hasError:i,isLoading:c,onHandler:l,type:u,value:f}=n,p=()=>i?"error":String(f).length&&a?"success":"none",m=g.useCallback(()=>{if(o.current){const y=o.current.querySelector("input");y&&typeof l=="function"&&(f!==""||i?(l(""),y.value=""):l((y==null?void 0:y.value)??""))}},[l,f,i]),h=p();return s.jsx("div",{ref:o,children:s.jsx(d.TextField.Structure,{className:se["mc--field"],input:s.jsx(mf,{...n,feedback:h,title:e,ICONS:t}),right:s.jsx(d.Button,{"data-has-success":!a,size:"medium",title:String(f).length&&a||i?"Remover":"Aplicar",onClick:()=>m(),disabled:c,children:String(f).length&&a||i?s.jsx(d.Icon,{name:"close",size:"small"}):`${r.messages.promo_code_button}`}),supportText:u==="cep"&&h==="success"?s.jsx(d.TextField.SupportText,{text:"Mais informações de frete na etapa a seguir",feedback:"success",title:"support"}):null})})};hf.displayName="MiniCart.Field";const Mi=e=>{const t=e*100;return Math.round(t)},By=e=>(e/100).toFixed(2).replace(".",","),Uy=(e,t)=>{const{valueType:r,remainingValueToActivate:n}=e;if(r==="quantity")return`Adicione mais ${n} ${n===1?"item":"itens"} ${t}`;if(r==="price"){const o=n===100?"Falta":"Faltam",a=By(n);return`${o} R$ ${a} ${t}`}return t},_f=({ICONS:e})=>{var b;const{promotionRules:t,data:r,cartStore:n,cartStore:{items:o,marketingData:a},addCouponSeller:i,setIsOpen:c}=Pe(),{sendDataLayerEvent:l}=ie(),u=(b=r==null?void 0:r.promotion)==null?void 0:b.promotionCart,f=g.useRef(!1),{router:p}=pe();if(g.useEffect(()=>{(u==null?void 0:u.selectPromotion)==="Cupom"&&(t==null?void 0:t.remainingValueToActivate)&&(t==null?void 0:t.remainingValueToActivate)<=0&&(u==null?void 0:u.cupom)&&!f.current&&(a==null?void 0:a.coupon)!==u.cupom&&(f.current=!0,i(u.cupom,"coupon")),t!=null&&t.remainingValueToActivate&&(t==null?void 0:t.remainingValueToActivate)<=0&&l({functionKey:"viewCartEvent",data:{event:"closeness_filled",commonData:{cartStore:n}}}),t!=null&&t.remainingValueToActivate&&(t==null?void 0:t.remainingValueToActivate)>0&&(f.current=!1)},[u==null?void 0:u.selectPromotion,t==null?void 0:t.remainingValueToActivate,u==null?void 0:u.cupom,a==null?void 0:a.coupon,i]),!t||!u||u.selectPromotion==="Desativar"||o.length===0)return null;const m=u.title,h=u.subtitle,_=u.titleSuccess,y=u.subtitleSuccess,v=u.linkLabel;return s.jsxs("div",{className:se["mc--body--promotion"],children:[t.remainingValueToActivate>0&&s.jsx(d.Closeness,{className:se["mc--body--promotion--closeness"],title:Uy(t,m),subtitle:h,percentage:Mi(t.completeness),iconLink:e.arrow_right,linkLabel:v,onClick:()=>{l({functionKey:"viewCartEvent",data:{event:"closeness_view_more",commonData:{cartStore:n}}}),p.push(`${u.link}`),c(!1)}}),t.remainingValueToActivate<=0&&s.jsx(d.Closeness,{className:`${se["mc--body--promotion--closeness"]} ${se["mc--body--promotion--closeness--success"]}`,title:_,subtitle:y,percentage:Mi(t.completeness)})]})};_f.displayName="MiniCart.Modal.Body.Promotion";const gf=({TIPBAR_CONFIGS:e})=>{const{data:t,cartStore:r,cartStore:{items:n,marketingData:o},addCouponSeller:a}=Pe(),i=t==null?void 0:t.flags.flagCart.flagCupom,c=(o==null?void 0:o.coupon)===(i==null?void 0:i.valueCupom),[l,u]=g.useState(!1),[f,p]=g.useState(!1);if(g.useEffect(()=>{l&&setTimeout(()=>{u(!1)},e.snackbar_timeout)},[l]),g.useEffect(()=>{f&&setTimeout(()=>{p(!1)},e.snackbar_timeout)},[f]),!i||i.active==="Desativar"||i.valueCupom===""||n.length===0)return null;const m=async()=>{if(!r.items.length){p(!0);return}(await a(i==null?void 0:i.valueCupom,"coupon")).code!==200&&u(!0)};return s.jsxs("div",{className:se["mc--body--coupon-tag"],style:{backgroundColor:`${i.tagColor}`,color:`${i.textColor}`},children:[s.jsx("div",{className:se["mc--body--coupon-tag--text"],dangerouslySetInnerHTML:{__html:i.value}}),s.jsx("div",{className:se["mc--body--coupon-tag--button"],children:s.jsx(d.Button,{variant:"quaternary",mode:"inverse",onClick:m,disabled:c,children:c?"Cupom Aplicado":"Aplicar Cupom"})})]})};gf.displayName="MiniCart.Modal.Body.CouponTag";const yf=({children:e,ICONS:t,MINICART_CONFIG:r,NAME_SPLIT_SYMBOL:n,PLP_NOT_RESULT:o,TEXTURE_IMAGE:a,TIPBAR_CONFIGS:i,TOGGLE_STYLE_MODIFIER:c})=>{const{cartStore:{items:l,messages:u}}=Pe();return s.jsxs(d.Modal.Body,{className:se["mc--body"],children:[e,s.jsx(_f,{ICONS:t}),s.jsx(gf,{TIPBAR_CONFIGS:i}),s.jsx("div",{className:se["mc--body--products"],children:Array.isArray(l)&&l.length?l.map((f,p)=>{const m=u.find(h=>{var _;return h.code==="withoutStock"&&((_=h.fields)==null?void 0:_.ean)===f.ean})!==void 0;return s.jsx(Ke.Card,{available:!f.availability.includes("outStock")||!m,index:p,product:f,ICONS:t,MINICART_CONFIG:r,NAME_SPLIT_SYMBOL:n,TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:c},`${f.id}-${f.itemOffered.sku}-${p}`)}):s.jsx(Ke.Feedback,{ICONS:t,MINICART_CONFIG:r,PLP_NOT_RESULT:o})})]})};yf.displayName="MiniCart.Body";const vf=({children:e,storeConfig:t,MINICART_CONFIG:r})=>{const{cartStore:n}=Pe();if(n.items.length===0)return null;const o=()=>{var i;const a=new URLSearchParams({orderFormId:n.id,...((i=n.marketingData)==null?void 0:i.utmCampaign)&&{utm_campaign:n.marketingData.utmCampaign}});window.location.href=`${t.checkoutUrl}?${a.toString()}#/cart`};return s.jsxs(d.Modal.Footer,{className:se["mc--footer"],children:[e,s.jsx("div",{className:se["mc--footer--actions"],children:s.jsx(d.Button,{variant:"primary",size:"large","data-close":!0,className:se["mc--footer--actions-button"],onClick:o,children:r.messages.checkout_button})})]})};vf.displayName="MiniCart.Modal.Footer";const xf=({children:e,ICONS:t,MINICART_CONFIG:r,Z_INDEX_WAR:n})=>{const[o,a]=g.useState(!1),i=g.useRef(null),c=()=>a(l=>!l);return s.jsxs(s.Fragment,{children:[o&&s.jsx(d.Tooltip.Root,{arrow:"right",position:"top",top:-3,left:-3,component:s.jsx("p",{children:"Código da vendedora, cupom ou cálculo do frete"}),id:"inputs--tooltip",className:se["inputs--tooltip"],style:{zIndex:n.modal},isOpen:!0,size:"medium",parent:i.current}),s.jsxs(d.Accordion.Wrapper,{className:se["mc--discount"],children:[s.jsx(d.Accordion.Header,{id:"frete",title:"Frete",closeIndicator:s.jsx(d.Icon,{name:t.arrow_up,size:"medium"}),openIndicator:s.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),className:d.helpers.classNameConcat(se["mc--discount--header"]),startOpen:r.promotion_input_starts_open,children:s.jsxs(d.TextStructure.Root,{children:[s.jsx(d.TextStructure.DivWrapper,{children:s.jsxs("h3",{className:"typography-style-body-sm",children:[r.messages.promo_code_title," "]})}),s.jsx("div",{ref:i,onMouseEnter:c,onMouseLeave:c,"aria-label":"Mostrar descrição",children:s.jsx(d.Icon,{name:t.alert_circle,size:"small"})})]})}),s.jsx(d.Accordion.Body,{className:se["mc--discount--body"],children:e})]})]})};xf.displayName="MiniCart.Discount";const bf=({discount:e,shipping:t,total:r})=>{var l,u;const{data:n}=Pe(),o=(u=(l=n==null?void 0:n.flags)==null?void 0:l.flagCart)==null?void 0:u.flagTotal,a=r-Math.abs(e??0)+(t??0),i=t===0?"Frete Grátis":k.formatPriceToCurrency((t??0)/100),c=[{title:"Frete",value:t===void 0?"A calcular":i},{title:"Desconto",value:k.formatPriceToCurrency((e??0)/100)},{message:(o==null?void 0:o.value)??"",title:"Total",value:`1x de ${k.formatPriceToCurrency(a/100)}`}];return s.jsx("div",{className:se["mc--footer--total"],children:Array.isArray(c)&&c.map((f,p)=>s.jsxs("div",{className:se["mc--footer--total--info"],"data-discount":f.title==="Desconto",children:[s.jsx("p",{children:f.title}),s.jsxs("div",{className:se["mc--footer--total--info--content"],children:[f.message&&(o==null?void 0:o.active)==="Ativar"&&s.jsx(d.Tag,{variant:"primary",title:f.message,style:{backgroundColor:o==null?void 0:o.tagColor,color:o==null?void 0:o.textColor},children:f.message}),s.jsx(d.ProductInfo.Price,{className:se["mc--footer--total--info"],label:f.title,value:f.value})]})]},p))})};bf.displayName="MiniCart.Modal.Footer.Resume.Items";const jf=()=>{var o,a,i;const{totalizers:e}=dr(),t=((o=e.find(c=>c.id==="Items"))==null?void 0:o.value)??0,r=(a=e.find(c=>c.id==="Discounts"))==null?void 0:a.value,n=(i=e.find(c=>c.id==="Shipping"))==null?void 0:i.value;return s.jsx(bf,{discount:r??0,total:t,shipping:n})};jf.displayName="MiniCart.Modal.Footer.Totals";const Cf=({ICONS:e,MINICART_CONFIG:t})=>{const{isMobile:r}=oe(),{cartStore:{items:n}}=Pe(),o=n.reduce((a,i)=>a+(i.quantity??0),0);return s.jsx(d.Modal.Header,{navigation:"top",className:se["mc--header"],children:s.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!r,children:[s.jsx(d.Modal.Title,{navigation:"top",title:t.messages.title}),s.jsx("span",{className:se["mc--header--subtitle"],children:o!==1?`[${o}] Produtos`:`[${o}] Produto`}),s.jsx(d.Button,{"data-close":!0,iconNameStart:e.close,size:"small",variant:"tertiary"})]})})};Cf.displayName="MiniCart.Modal.Header";const Sf=({ICONS:e,MINICART_CONFIG:t})=>{const{cartStore:{shippingData:r},shipping:n,removeCEP:o}=Pe(),{sendDataLayerEvent:a}=ie(),[i,c]=g.useState(!1),[l,u]=g.useState(!1),f=g.useCallback(()=>{var C;const b=((C=r==null?void 0:r.address)==null?void 0:C.postalCode)??"";return b.length===8&&!b.includes("-")?`${b.slice(0,5)}-${b.slice(5)}`:b},[r]),[p,m]=g.useState(!!f()),h=()=>{m(!1),c(!1)},_=b=>{var C;if(typeof b=="object"&&(b!=null&&b.logisticsInfo))return(C=b.logisticsInfo)==null?void 0:C.reduce((j,x)=>{var A;const S=(A=x==null?void 0:x.slas)==null?void 0:A.find(R=>(R==null?void 0:R.id)===(x==null?void 0:x.selectedSla));if(!S)return j;const E=parseInt(String((S==null?void 0:S.shippingEstimate)??"").replace("bd","")),P=Number((((S==null?void 0:S.price)??0)/100).toFixed(2));if(j.shipping_tier===void 0)return j.shipping_tier=x==null?void 0:x.selectedSla,j.delivery_time=E.toString(),j.shipping=P,j.flag_retirada=(x==null?void 0:x.selectedDeliveryChannel)==="delivery"?"false":"true",j;const N=parseInt(j.delivery_time??"0");return E>N&&(j.delivery_time=E.toString()),j.shipping=(j.shipping??0)+P,j},{shipping_tier:void 0,delivery_time:void 0,flag_retirada:void 0,shipping:void 0,currency:"BRL"})},y=async b=>{const C=b.replace(/\D/g,"");if(C.length!==8)return!1;try{return!(await lr.get(`https://viacep.com.br/ws/${C}/json/`)).data.erro}catch{return!1}},v=async b=>{if(u(!0),!!f()||!(b!=null&&b.trim())){await o(),h(),u(!1);return}if(!await y(b)){c(!0),m(!1),u(!1);return}try{const S=await n(b);if(c(!1),S){m(!0);const E=_(S);E&&a({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:E}})}}catch{c(!0)}finally{u(!1)}};return s.jsx(Ke.Field,{hasSuccess:p,hasError:i,isLoading:l,onHandler:v,title:`${t.messages.shipping_calculation_placeholder}`,type:"cep",value:f(),ICONS:e,MINICART_CONFIG:t})};Sf.displayName="MiniCart.Shipping";const Ef=()=>{var r,n;const{data:e}=Pe(),t=(n=(r=e==null?void 0:e.flags)==null?void 0:r.flagCart)==null?void 0:n.flagHeader;return t!=null&&t.value?s.jsx(d.Tag,{variant:"tertiary",title:t==null?void 0:t.value,size:"small",adornment:{start:t!=null&&t.enableIcon&&(t!=null&&t.icon)?s.jsx(d.Icon,{name:t==null?void 0:t.icon,style:{color:t==null?void 0:t.iconColor}}):null},style:{background:t==null?void 0:t.tagColor,color:t==null?void 0:t.textColor,width:"100%"},children:t==null?void 0:t.value}):null};Ef.displayName="MiniCart.TagMessage";const Ke={Body:yf,Card:uf,Cashback:df,CouponSeller:ff,Discount:xf,Field:hf,Feedback:pf,Shipping:Sf,Footer:vf,Header:Cf,TagMessage:Ef,Totals:jf},qy=({ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,PLP_NOT_RESULT:n,TEXTURE_IMAGE:o,TIPBAR_CONFIGS:a,TOGGLE_STYLE_MODIFIER:i,Z_INDEX_WAR:c,storeConfig:l,minicartStyleModifiers:u})=>{const{isOpen:f,setIsOpen:p}=Pe(),{isMobile:m}=oe();return s.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(se["minicart--modal-modifier"],u),isMobile:!0,isOpen:f,setIsOpen:p,style:{zIndex:c.modal},variant:m?"sideBottom":"sideRight",children:[s.jsx(Ke.Header,{ICONS:e,MINICART_CONFIG:t}),s.jsx(Ke.Body,{ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,PLP_NOT_RESULT:n,TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:i,TIPBAR_CONFIGS:a,children:s.jsx(Ke.TagMessage,{})}),s.jsxs(Ke.Footer,{MINICART_CONFIG:t,storeConfig:l,children:[s.jsxs(Ke.Discount,{ICONS:e,MINICART_CONFIG:t,Z_INDEX_WAR:c,children:[s.jsx(Ke.CouponSeller,{type:"seller",ICONS:e,MINICART_CONFIG:t}),s.jsx(Ke.CouponSeller,{type:"coupon",ICONS:e,MINICART_CONFIG:t}),s.jsx(Ke.Shipping,{ICONS:e,MINICART_CONFIG:t})]}),s.jsx(Ke.Totals,{})]}),s.jsx(tf,{ICONS:e})]})},Pf=({tipBar:e,minicartStyleModifiers:t,menuV2:r,storeConfig:n,className:o})=>{const{structureRef:a,rootRef:i,CONSTANTS:c}=Ae(),{header:{HEADER_CONFIGS:l,Z_INDEX_WAR:u},minicart:f}=c;return s.jsx(d.Header.Structure,{innerRef:a,adornment:{start:e},style:{position:"sticky",top:0,zIndex:u.header},className:d.helpers.classNameConcat(xa["header-animation"],o),children:s.jsxs(d.Header.Root,{innerRef:i,style:{zIndex:u.header},variant:l.default_variant,interactiveVariant:l.interactive_variant,children:[r??s.jsxs(Sy,{children:[s.jsx("div",{className:k.responsive["responsive-mobile-block"],style:{height:"100%",width:"100%",zIndex:u.header_mobile},children:s.jsx(Jd,{storeConfig:n})}),s.jsx("div",{className:k.responsive["responsive-desktop-block"],style:{height:"100%",width:"100%",zIndex:u.header_desktop},children:s.jsx(zd,{storeConfig:n})})]}),s.jsx(Oy,{children:s.jsx(qy,{...f,minicartStyleModifiers:t})}),s.jsx(ha,{title:"Produto adicionado à sua sacola!",CONSTANTS:c.addToCart})]})})};Pf.displayName="Header";const $y="_shippingFreight_6z8rf_6",Hy="_shippingFreight__postalCodeGrid_6z8rf_10",Vy="_shippingFreight__grid_6z8rf_14",Wy="_shippingFreight__grid__title_6z8rf_18",Gy="_shippingFreight__grid__remember_6z8rf_29",Ky="_postalCodeContainer_6z8rf_44",Qy="_deliveryStatusBar__tag_6z8rf_49",Xy="_deliveryStatusBarError__tag_6z8rf_66",Yy="_deliveryInfo_6z8rf_74",Zy="_deliveryInfo__content_6z8rf_78",Jy="_deliveryInfo__text_6z8rf_84",ev="_deliveryInfo__title_6z8rf_89",tv="_deliveryInfo__subtitle_6z8rf_99",rv="_deliveryInfo__tooltipIcon_6z8rf_109",nv="_deliveryInfo__tooltip_6z8rf_109",sv="_freightGrid_6z8rf_148",ov="_freightContainer_6z8rf_155",av="_freightOption__content_6z8rf_160",iv="_freightOption__value_6z8rf_166",cv="_freightOption__title_6z8rf_177",lv="_freightOption__title_item_6z8rf_181",uv="_freightOption__paragraph_6z8rf_192",he={shippingFreight:$y,shippingFreight__postalCodeGrid:Hy,shippingFreight__grid:Vy,shippingFreight__grid__title:Wy,shippingFreight__grid__remember:Gy,postalCodeContainer:Ky,deliveryStatusBar__tag:Qy,deliveryStatusBarError__tag:Xy,deliveryInfo:Yy,deliveryInfo__content:Zy,deliveryInfo__text:Jy,deliveryInfo__title:ev,deliveryInfo__subtitle:tv,deliveryInfo__tooltipIcon:rv,deliveryInfo__tooltip:nv,freightGrid:sv,freightContainer:ov,freightOption__content:av,freightOption__value:iv,freightOption__title:cv,freightOption__title_item:lv,freightOption__paragraph:uv,"input-modifier":"_input-modifier_6z8rf_207","freight--tooltip":"_freight--tooltip_6z8rf_227"},dv=({icon:e,title:t,subtitle:r,packageCount:n,packageUnit:o="",labelDescription:a,freightConfig:i,toolTipZIndex:c})=>{const[l,u]=g.useState(!1),f=g.useRef(null),p=()=>u(m=>!m);return s.jsxs("div",{className:he.deliveryInfo,ref:f,children:[s.jsx(d.Tooltip.Root,{arrow:"bottom",component:s.jsx("div",{children:s.jsx("p",{children:i.messages.select_size_tag})}),id:"freight--tooltip",className:he["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:f.current}),s.jsxs("div",{className:he.deliveryInfo__content,children:[s.jsx("div",{className:he.deliveryInfo__icon,children:s.jsx(d.Icon,{name:e,size:"medium"})}),s.jsxs("div",{className:he.deliveryInfo__text,children:[s.jsxs("span",{className:he.deliveryInfo__title,children:[t," ",n," ",o]}),r&&s.jsx("span",{className:he.deliveryInfo__subtitle,children:r})]}),a&&s.jsxs("div",{className:he.deliveryInfo__tooltipIcon,onMouseEnter:p,onMouseLeave:p,"aria-label":"Mostrar descrição",children:[s.jsx("span",{children:s.jsx(d.Icon,{name:i.icons.feedback_help,size:"small"})}),l&&s.jsx("div",{className:he.deliveryInfo__tooltip,children:a})]})]})]})},fv=({value:e,title:t,paragraph:r})=>s.jsx("div",{className:he.freightOption,children:s.jsxs("div",{className:he.freightOption__content,children:[s.jsx("span",{className:he.freightOption__value,children:e}),s.jsx("span",{className:he.freightOption__title,children:s.jsx(d.TextStructure.Root,{children:s.jsxs(d.TextStructure.DivWrapper,{className:he.footer__item,children:[s.jsx("span",{className:he.freightOption__title_item,children:t}),r&&s.jsx("span",{className:he.freightOption__paragraph,children:r})]})})})]})}),pv=({children:e})=>s.jsx("div",{className:he.freightContainer,children:e}),mv=({children:e})=>s.jsx("div",{className:he.freightGrid,children:e}),hv=({children:e})=>s.jsx("div",{className:he.postalCodeContainer,children:e}),Fi=({message:e,seller:t="",size:r="small",setError:n})=>s.jsx("div",{className:n?he.deliveryStatusBarError:he.deliveryStatusBar,children:s.jsxs(d.Tag,{title:e,className:n?he.deliveryStatusBarError__tag:he.deliveryStatusBar__tag,size:r,children:[e," ",!n&&t]})}),_v=e=>{const t=parseInt(e,10);return t===1?`${t} dia`:`${t} dias`},gv=e=>{var r,n,o;const t=[];return(o=(n=(r=e==null?void 0:e.logisticsInfo)==null?void 0:r[0])==null?void 0:n.slas)==null||o.forEach(a=>{t.push({id:a.id,name:a.name,price:a.price,shippingEstimate:a.shippingEstimate})}),t},yv=({component:e,parent:t,top:r,left:n,target:o,contentRef:a,freightConfig:i,toolTipZIndex:c=999,...l})=>{const{isMobile:u}=oe();return s.jsx(s.Fragment,{children:u?s.jsx(d.Tooltip.Root,{arrow:"bottom",component:s.jsxs("div",{...l,ref:a,children:[e,s.jsx("p",{children:i.messages.select_size_tag})]}),id:"freight--tooltip",className:he["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:t}):s.jsx(d.Tooltip.Root,{arrow:"bottom",component:s.jsxs("div",{...l,ref:a,children:[e,s.jsx("p",{children:i.messages.select_size_tag})]}),id:"freight--tooltip",className:he["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-110%",left:"3%",parent:t})})},vv=({onUpdateFreightItems:e,sellerId:t,size:r,skuId:n,quantity:o,setError:a,setIsButtonClicked:i,component:c,freightConfig:l,toolTipZIndex:u})=>{var O,D,$,F;const f=dr(),p=dr(q=>q.shipping),[m,h]=g.useState(),[_,y]=g.useState(!1),[v,b]=g.useState(!1),[C,j]=g.useState(!1),x=(D=(O=f.shippingData)==null?void 0:O.address)==null?void 0:D.postalCode,S=!(m!=null&&m.length)&&x?x:m,E=g.useRef(null),P=async q=>{const J=q.target.value.replace(/\D/g,"").slice(0,8);J.length>5?h(J.replace(/^(\d{5})(\d{1,3})/,"$1-$2")):h(J)},N=async q=>{const V=q.target.value.replace(/\D/g,"");try{if((await lr.get(`https://viacep.com.br/ws/${V}/json/`)).data.erro){a&&a(l.messages.cep_not_found),i(!1),b(!0);return}a&&a(""),b(!1)}catch{console.log("Erro ao validar o CEP. Tente novamente mais tarde.")}},A=async()=>{y(!0);try{const q=await lr.post("/api/checkout/simulation",{items:[{id:n,quantity:o,seller:t}],country:"BRA",postalCode:S});e(gv(q.data))}catch(q){console.error("Erro ao atualizar o documento:",q)}finally{y(!1),p(S,"BRA")}},R=async()=>{if(!n){j(!0),setTimeout(()=>j(!1),1500);return}await N({target:{value:S}}),_||(A(),i(!0))};return s.jsxs("div",{ref:E,style:{position:"relative"},children:[!n&&C?s.jsx(yv,{component:c,isOpen:C,parent:E.current,toolTipZIndex:u,freightConfig:l}):s.jsx(s.Fragment,{}),s.jsx("div",{style:{position:"relative"},children:s.jsx(d.TextField.Structure,{title:"structure",style:{width:"100%"},input:s.jsx(d.TextField.Input,{defaultValue:(F=($=f.shippingData)==null?void 0:$.address)==null?void 0:F.postalCode,label:l.messages.text_input_label,title:"textfield",value:m,sizeVariant:r,onMouseOver:()=>n?null:j(!0),onMouseOut:()=>n?null:j(!1),mode:"simple",onChange:P,onKeyDown:q=>{q.key==="Enter"&&R()},className:he["input-modifier"],feedback:v?"error":"none"}),right:s.jsx(d.Button,{onClick:R,size:r,title:"button",children:_?s.jsx(d.Spinner,{size:"small",indicatorColor:"#ffffff"}):l.messages.text_input_btn})})})]})},xv=({children:e,freightConfig:t})=>s.jsxs("div",{className:he.shippingFreight,children:[s.jsxs("div",{className:he.shippingFreight__grid,children:[s.jsx("span",{className:he.shippingFreight__grid__title,children:t.messages.title}),s.jsx("span",{className:he.shippingFreight__grid__remember,children:s.jsx(Ye,{href:"https://buscacepinter.correios.com.br/app/endereco/index.php",passHref:!0,target:"_blank",rel:"noopener noreferrer",size:"x-small",disablePadding:!1,title:t.messages.remember_cep,children:t.messages.remember_cep})})]}),s.jsx("div",{className:he.shippingFreight__postalCodeGrid,children:e})]}),bv=({children:e})=>s.jsx("div",{className:he.freightContainer,children:e}),wf=({className:e,sellerId:t,skuId:r,quantity:n,size:o,seller:a,local:i,CONSTANTS_PROPS:c})=>{const{sendDataLayerEvent:l}=ie(),[u,f]=g.useState(""),[p,m]=g.useState([]),[h,_]=g.useState(""),[y,v]=g.useState(!1),b=j=>f(j),C=j=>{m(j),l({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:{shippings:j.map(x=>({shipping_tier:x.id,delivery_time:x.shippingEstimate.replace("bd",""),flag_pickup:x.name.toLowerCase().includes("retirada")?"true":"false",shipping:x.price,currency:c.currency||"BRL"}))}}})};return s.jsxs(bv,{className:e,children:[s.jsxs(xv,{freightConfig:c.freightConfig,children:[s.jsx(hv,{children:s.jsx(vv,{onUpdateFreightItems:C,skuId:r,quantity:n,size:o,sellerId:t,local:i,setError:_,setIsButtonClicked:v,freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex})}),h?s.jsx(Fi,{size:o,message:h,setError:_}):p.length>0&&s.jsx(Fi,{size:o,message:c.freightConfig.messages.delivered_by,seller:a})]}),y&&!h?p.length>0&&s.jsxs(pv,{children:[s.jsx(mv,{children:p.filter(({id:j})=>!j.includes("Retirada")).map(j=>s.jsx(fv,{id:j.id,value:k.freightParsePrice({valueInCents:j.price,hasFree:!1,freeTaxMessage:c.freightConfig.messages.free_tax}),title:j.name,paragraph:`${c.freightConfig.messages.prefix_days}${_v(j.shippingEstimate)}`,radioValue:u,changeValue:b},j.id))}),c.deliveryInfoBoxesAllowed?s.jsx(dv,{icon:c.freightConfig.icons.delivery_truck,packageUnit:c.freightConfig.messages.unit_amout,title:c.freightConfig.messages.delivered_amount_packages,subtitle:"",packageCount:1,labelDescription:"Label",freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex??999}):s.jsx(s.Fragment,{})]}):null]})},mr={"pcd-navigation--breadcrumb":"_pcd-navigation--breadcrumb_1243w_1","pdc-navigation--content":"_pdc-navigation--content_1243w_28","pdc-navigation--filters":"_pdc-navigation--filters_1243w_54","pdc-navigation--filters--content":"_pdc-navigation--filters--content_1243w_67","pdc-navigation--selected":"_pdc-navigation--selected_1243w_139","pdc-navigation--selected--container":"_pdc-navigation--selected--container_1243w_152","pdc-navigation":"_pdc-navigation_1243w_28"},jv=({children:e,href:t,isLast:r,title:n})=>{const{constants:{ICONS:o}}=nt();return s.jsx(d.BreadCrumb.Item,{adornment:{end:r&&s.jsx(d.Icon,{name:o.arrow_right})},children:r?s.jsx(Ye,{href:t??"/",size:"medium",title:n,disableUnderline:!0,children:e}):e})},Nf=()=>{var o;const{state:e}=Be(),t=e!=null&&e.term&&e.term.length>0?`/${e.term}`:"",r=decodeURIComponent((o=e==null?void 0:e.base)!=null&&o.length?e.base:t??t).slice(1).split("/"),n=Ql(r);return s.jsx("div",{className:mr["pcd-navigation--breadcrumb"],children:s.jsx(d.BreadCrumb.DivWrapper,{children:s.jsx(d.BreadCrumb.List,{children:Array.isArray(n)&&n.map((a,i)=>{var c,l;return g.createElement(jv,{...a,isLast:i!==n.length-1,key:a.href,title:(c=a.name)==null?void 0:c.replace(/-/g," ")},(l=a.name)==null?void 0:l.replace(/-/g," "))})})})})};Nf.displayName="PLPNavigation.BreadCrumb";const If=({children:e,...t})=>s.jsxs("div",{...t,className:mr["pdc-navigation--content"],children:[s.jsx(Kt.Filters,{}),e]});If.displayName="PLPNavigation.Content";const Cv="_sort_35wro_1",us={sort:Cv,"sort-list-wrapper":"_sort-list-wrapper_35wro_8","sort-list":"_sort-list_35wro_8","sort-button":"_sort-button_35wro_25"},Sv=({children:e,sortListOpen:t,btnAdornment:r,style:n,...o})=>s.jsx(d.Button,{...o,adornment:{end:t?r==null?void 0:r.listOpen:r==null?void 0:r.listClosed},size:"small",variant:"tertiary",style:{...n,textDecoration:"none"},className:us["sort-button"],children:e}),Ev=e=>s.jsx(d.RadioButton.Radio,{...e}),Pv=({children:e,className:t,name:r,...n})=>s.jsx(d.RadioButton.Group,{...n,name:r||"sort-group",className:d.helpers.classNameConcat(us["sort-list"],t),children:e}),wv=({children:e,className:t,shadow:r=!0,padding:n="small",height:o="fit-content",...a})=>s.jsx(d.Card,{...a,shadow:r,className:d.helpers.classNameConcat(us["sort-list-wrapper"],t),padding:n,height:o,children:e}),Rf=g.forwardRef(({children:e,className:t,...r},n)=>s.jsx("div",{...r,ref:n,className:d.helpers.classNameConcat(us.sort,t),children:e}));Rf.displayName="SortRoot";const ds=({handleSelectValue:e,sortListOpen:t,setSortListOpen:r,searchParams:n,ICONS:o,...a})=>{var m;const i=(m=n==null?void 0:n.get("sort"))==null?void 0:m.replace(":","_"),[c,l]=g.useState(i),{sendDataLayerEvent:u}=ie();g.useEffect(()=>{l(i||void 0)},[i]);const{ref:f}=Od(()=>r(!1)),p=h=>{const _=h.target.value;l(_),typeof e=="function"&&e(_),u({functionKey:"filterEvent",data:{customData:{ordering:Wr.options[_]}}}),r(!1)};return s.jsxs(Rf,{...a,ref:f,children:[s.jsx(Sv,{btnAdornment:{listOpen:s.jsx(d.Icon,{name:o.arrow_up,size:"small"}),listClosed:s.jsx(d.Icon,{name:o.arrow_down,size:"small"})},sortListOpen:t,onClick:()=>r(!t),children:c?Wr.options[c]:Wr.placeholder},"sort-button"),t&&s.jsx(wv,{children:s.jsx(Pv,{name:"sort-group",value:c??"",onChange:p,children:Object.keys(Wr.options).map(h=>s.jsx(Ev,{label:Wr.options[h],value:h},h))})})]})};ds.displayName="Sort";const Tf=g.createContext({}),Nv=({children:e,...t})=>{const[r,n]=g.useState(!1);return s.jsx(Tf.Provider,{value:g.useMemo(()=>({...t,openOrderBy:r,setOpenOrderBy:n}),[t,r,n]),children:e})},Iv=()=>{const e=g.useContext(Tf);if(e===void 0)throw new Error("usePLPNavigationContext must be used within a PDCNavigationProvider");return e},Af=()=>{const{openOrderBy:e,onSort:t,setOpenFilters:r,setOpenOrderBy:n}=Iv(),{constants:{ICONS:o,PDC_NAVIGATION:a}}=nt();return s.jsxs("div",{className:mr["pdc-navigation--filters"],children:[s.jsx(Kt.BreadCrumb,{}),s.jsxs("div",{className:mr["pdc-navigation--filters--content"],children:[s.jsx(ds,{handleSelectValue:i=>t(i??"release_desc"),sortListOpen:e,setSortListOpen:n,ICONS:o,searchParams:new URLSearchParams}),s.jsx(d.Button,{adornment:{end:s.jsx(d.Icon,{name:o.arrow_down})},onClick:()=>r(!0),size:"small",variant:"tertiary",children:a.filter_button}),s.jsx(Kt.Total,{})]})]})};Af.displayName="PLPNavigation.Filters";const Of=({children:e,onSort:t,setOpenFilters:r,style:n,...o})=>{const a=g.useRef(null);return s.jsx(Nv,{onSort:t,setOpenFilters:r,children:s.jsx("div",{...o,className:mr["pdc-navigation"],ref:a,style:{...n},children:s.jsx(Kt.Content,{children:e})})})};Of.displayName="Root";const Lf=({callback:e,selected:t,...r})=>s.jsx("div",{...r,className:mr["pdc-navigation--selected"],children:s.jsx("div",{className:mr["pdc-navigation--selected--container"],children:Array.isArray(t)?t.map(n=>n.key==="productclusterids"?null:s.jsx(Kt.SelectedItem,{callback:e,facet:n},n.value)):null})});Lf.displayName="PLPNavigation.Selected";const ja=({key:e,PLP_FILTERS:t})=>t.some(r=>r.key===e)?e==="cores-filtraveis":!1,Ca=({value:e,PLP_FILTERS_COLORS:t})=>{var r;return((r=t.find(n=>n.value===e))==null?void 0:r.color)??"#F2F2F2"},kf=({key:e,PLP_FILTERS:t})=>{var r;return(r=t.find(n=>n.key===e))==null?void 0:r.label},Df=({key:e,PLP_FILTERS:t})=>{var r;return((r=t.find(n=>n.key===e))==null?void 0:r.order)??0},Fo=({value:e})=>{const[t,r]=e.split(":").length===2?e.split(":"):[0,0],n=k.formatPriceToCurrency(Number(r));return`${k.formatPriceToCurrency(Number(t))} até ${n}`},Mf=({items:e})=>{const t=e.flatMap(o=>[o.range.from,o.range.to]),r=Math.min(...t.map(Math.abs)),n=Math.max(...t.map(Math.abs));return[r,n]},Ff=Object.freeze(Object.defineProperty({__proto__:null,checkedColor:ja,createTagPrice:Fo,getAbsoluteMinMax:Mf,getColor:Ca,getName:kf,getOrder:Df},Symbol.toStringTag,{value:"Module"})),lt={"filter--empty":"_filter--empty_1mjas_1","filter--item":"_filter--item_1mjas_14","filter--item--price":"_filter--item--price_1mjas_19","filter--item--toggle":"_filter--item--toggle_1mjas_19","filter--item--toggle--container":"_filter--item--toggle--container_1mjas_30","filter--modal--body":"_filter--modal--body_1mjas_79","filter--modal--body--content":"_filter--modal--body--content_1mjas_87","filter--modal--footer":"_filter--modal--footer_1mjas_96","filter--modal":"_filter--modal_1mjas_79","filter--loading":"_filter--loading_1mjas_176","filter--selected":"_filter--selected_1mjas_206","filter--selected--content":"_filter--selected--content_1mjas_210"},zf=({columns:e=2,CONSTANTS:t,...r})=>{var a;const{filters:n,onToggleFacet:o}=Qt();return s.jsxs("div",{...r,className:lt["filter--modal--body--content"],children:[Array.isArray(n.facets)&&n.facets.map(i=>s.jsx(At.Item,{columns:e,facet:i,onToggleFacet:o,CONSTANTS:t},i.key)),!((a=n.facets)!=null&&a.length)&&s.jsx(At.Empty,{PLP_FILTERS_EMPTY:t.PLP_FILTERS_EMPTY})]})};zf.displayName="Filter.Item.Content";const Bf=({PLP_FILTERS_EMPTY:e})=>{const t=()=>{window.history.back()};return s.jsxs("div",{className:lt["filter--empty"],children:[s.jsxs(d.TextStructure.DivWrapper,{children:[s.jsx("h4",{children:e.title}),s.jsx("p",{children:e.subtitle})]}),s.jsx(d.Button,{onClick:()=>t(),variant:"tertiary",children:e.button})]})};Bf.displayName="Filter.Empty";const Uf=({columns:e,facet:t,onToggleFacet:r,CONSTANTS:n,...o})=>{const a=Df({key:t.key,PLP_FILTERS:n.PLP_FILTERS}),i=()=>{if(t.__typename==="FacetBoolean"){if(t.key==="cores-filtraveis")return s.jsx(At.Colors,{onToggleFacet:r,values:t.values,PLP_FILTERS:n.PLP_FILTERS,PLP_FILTERS_COLORS:n.PLP_FILTERS_COLORS});if(t.key==="tamanho")return s.jsx(At.Sizes,{onToggleFacet:r,values:t.values,PLP_SIZE_ORDER:n.PLP_SIZE_ORDER});if(t.key==="category-2")return s.jsx(At.Toggle,{columns:e,facetKey:t.key,onToggleFacet:r,values:t.values,ICONS:n.ICONS})}return t.__typename==="FacetRange"?s.jsx(At.Price,{facet:t}):s.jsx("p",{children:"Filter not support!!!"})};return s.jsx("div",{...o,className:lt["filter--item"],style:{order:a},children:s.jsxs(d.Accordion.Wrapper,{style:{width:"100%"},children:[s.jsx(d.Accordion.Header,{id:t.key,closeIndicator:s.jsx(d.Icon,{name:n.ICONS.arrow_up}),openIndicator:s.jsx(d.Icon,{name:n.ICONS.arrow_down}),children:s.jsx(d.TextStructure.Root,{children:s.jsx(d.TextStructure.DivWrapper,{children:s.jsx("h4",{className:"typography-style-body-sm",children:kf({key:t.key,PLP_FILTERS:n.PLP_FILTERS})})})})}),s.jsx(d.Accordion.Body,{children:i()})]})})};Uf.displayName="Filter.Item";const qf=({onToggleFacet:e,values:t,PLP_FILTERS:r,PLP_FILTERS_COLORS:n,...o})=>{const{filters:{selected:a}}=Qt();return s.jsx(yt.Root,{...o,children:s.jsx(yt.List,{children:Array.isArray(t)&&t.map(({key:i,value:c})=>s.jsx(yt.Option,{active:!!(a!=null&&a.find(l=>l.key===i&&l.value===c)),"data-color":ja({key:i,PLP_FILTERS:r}),fill:Ca({value:c,PLP_FILTERS_COLORS:n}),onClick:()=>e({key:i,value:c}),type:"color"},`${i}-${c}`))})})};qf.displayName="Filter.Item.Color";const $f=({facet:e,...t})=>{var u,f;const{filters:{selected:r},price:n,onToggleFacet:o}=Qt(),[a,i]=(n==null?void 0:n.split(":").map(Number))??[0,100],[c,l]=((f=(u=r==null?void 0:r.find(({key:p})=>p==="price"))==null?void 0:u.value)==null?void 0:f.split(":").map(Number))??[a,i];return s.jsx("div",{...t,className:lt["filter--item--price"],children:s.jsxs(d.Slider.SliderDual,{format:"price",initialValue:[c<a?a:c,l>i?i:l],min:a,max:i,type:"dual",step:1,onFinish:p=>{var m,h;p&&o({key:"price",value:`${(m=p.range)==null?void 0:m.min}:${(h=p.range)==null?void 0:h.max}`})},children:[s.jsx(d.TextStructure.Root,{children:s.jsx(d.TextStructure.DivWrapper,{children:s.jsx("p",{"data-min-value":!0})})}),s.jsx(d.TextStructure.Root,{children:s.jsx(d.TextStructure.DivWrapper,{children:s.jsx("p",{"data-max-value":!0})})})]})})};$f.displayName="Filter.Item.Price";const Hf=({onToggleFacet:e,values:t,PLP_SIZE_ORDER:r,...n})=>{const{filters:{selected:o}}=Qt(),a=[...t].sort((i,c)=>{const l=r.indexOf(i.name),u=r.indexOf(c.name);return l-u});return s.jsx(yt.Root,{...n,children:s.jsx(yt.List,{children:Array.isArray(a)&&a.map(({key:i,value:c})=>s.jsx(yt.Option,{active:!!(o!=null&&o.find(l=>l.key===i&&l.value===c)),text:c,type:"size",onClick:()=>e({key:i,value:c})},c))})})};Hf.displayName="Filter.Item.Sizes";const Vf=({columns:e,facetKey:t,onToggleFacet:r,values:n,ICONS:o,...a})=>s.jsx("div",{...a,className:lt["filter--item--toggle"],children:s.jsx("div",{className:lt["filter--item--toggle--container"],style:{gridTemplateColumns:`repeat(${e}, 1fr)`},children:Array.isArray(n)&&n.map(i=>s.jsx(d.Checkbox,{label:(i==null?void 0:i.name)??"",adornment:s.jsx(d.Icon,{name:o.check}),checked:i.selected,onChange:()=>r(i)},i.value))})});Vf.displayName="Filter.Item.Toggle";const Wf=({...e})=>{const{isLoading:t}=Qt();return s.jsx("div",{className:lt["filter--loading"],"data-active":t,...e,children:s.jsx(d.Spinner,{indicatorColor:"#000",background:"#222"})})};Wf.displayName="Filter.Loading";const Gf=({children:e,className:t,isMobile:r=!1,CONSTANTS:{PLP_FILTERS_TITLE:n,ICONS:o}})=>{var f;const{deleteAllFacets:a,filters:i,isOpen:c,target:l,setIsOpen:u}=Qt();return s.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(lt["filter--modal"],t),isMobile:r??!1,isOpen:c,parent:l,setIsOpen:u,variant:r?"sideBottom":"sideRight",style:{zIndex:99},children:[s.jsxs(d.Modal.Header,{navigation:"top",children:[s.jsx(d.Modal.Controls,{navigation:"top",isMobile:r,children:s.jsx(d.Button,{"data-close":!0,iconNameStart:o.close,size:"small",variant:"tertiary",style:{marginLeft:"auto"}})}),s.jsx(d.Modal.Title,{navigation:"top",title:n})]}),s.jsxs(d.Modal.Body,{style:{width:500},children:[s.jsx("div",{className:lt["filter--modal--body"],children:e}),s.jsx(At.Loading,{})]}),s.jsx(d.Modal.Footer,{children:s.jsxs("div",{className:lt["filter--modal--footer"],children:[s.jsx(d.Button,{"data-close":!0,size:"large",variant:"primary",children:(f=i.facets)!=null&&f.length?"ver resultados":"fechar"}),s.jsx(d.Button,{"data-close":!0,onClick:()=>a(),variant:"tertiary",children:"limpar filtros"})]})})]})};Gf.displayName="Filter.Modal";const Kf=({children:e,className:t,isMobile:r,CONSTANTS:n,...o})=>s.jsx(yu,{...o,PLP_FILTERS:n.PLP_FILTERS,children:s.jsx(At.Modal,{className:t,isMobile:r,CONSTANTS:n,children:e})});Kf.displayName="Filter.Root";const Qf=({ICONS:e,PLP_FILTERS_COLORS:t,PLP_FILTERS:r})=>{const{filters:n,onToggleFacet:o}=Qt();return s.jsx("div",{className:lt["filter--selected"],children:s.jsx("div",{className:lt["filter--selected--content"],children:Array.isArray(n.selected)&&n.selected.map(({key:a,value:i})=>a==="productclusterids"?null:s.jsx(d.Tag,{title:a==="price"?Fo({value:i}):i,adornment:{end:s.jsx(d.Icon,{name:e.close,size:"x-small"})},colorSquare:Ca({value:i,PLP_FILTERS_COLORS:t}),onClick:()=>o({key:a,value:i}),squareShow:ja({key:a,PLP_FILTERS:r}),size:"medium",variant:"primary",children:a==="price"?Fo({value:i}):i},i))})})};Qf.displayName="Filter.Selected";const At={Colors:qf,Content:zf,Empty:Bf,Modal:Gf,Item:Uf,Root:Kf,Loading:Wf,Selected:Qf,Price:$f,Sizes:Hf,Toggle:Vf},{checkedColor:Rv,createTagPrice:zi,getColor:Tv}=Ff,Xf=({callback:e,facet:t})=>{const{constants:{ICONS:r,PLP_FILTERS_COLORS:n,PLP_FILTERS:o}}=nt();return s.jsx(d.Tag,{title:(t==null?void 0:t.key)==="price"?zi({value:t.value}):t.value.toUpperCase(),adornment:{end:s.jsx(d.Icon,{name:r.close,size:"x-small"})},colorSquare:Tv({value:t.value,PLP_FILTERS_COLORS:n}),onClick:()=>{typeof e=="function"&&e(t,!0)},squareShow:Rv({key:t.key,PLP_FILTERS:o}),size:"medium",variant:"primary",children:(t==null?void 0:t.key)==="price"?zi({value:t.value}):t.value.toUpperCase()})};Xf.displayName="PLPNavigation.Selected.Item";const Yf=()=>s.jsx(d.TextStructure.Root,{children:s.jsx("p",{id:"pdc-navigation--total"})});Yf.displayName="PLPNavigation.Total";const Kt={BreadCrumb:Nf,Content:If,Filters:Af,Root:Of,Selected:Lf,SelectedItem:Xf,Total:Yf},Av="_footer__bottom_198g6_2",Ov="_footer__wrapper_198g6_10",Lv="_footer__main_198g6_39",kv="_footer__legalInformation_198g6_55",Dv="_footer__column_198g6_77",Mv="_footer__columnContent_198g6_87",Fv="_footer__item_198g6_91",zv="_footer__itemLink_198g6_107",Bv="_footer__columnTitle_198g6_122",Uv="_footer__columnTitleIcon_198g6_134",qv="_footer__iconList_198g6_147",$v="_footer__itemSmallText_198g6_157",Hv="_payment_198g6_168",Vv="_footer__iconContainer_198g6_173",Wv="_footer__iconListSubHeader_198g6_178",Gv="_accordionWrapper_198g6_200",Kv="_accordionHeader_198g6_204",Qv="_accordionTextWrapper_198g6_208",_e={footer__bottom:Av,footer__wrapper:Ov,footer__main:Lv,footer__legalInformation:kv,footer__column:Dv,footer__columnContent:Mv,footer__item:Fv,footer__itemLink:zv,footer__columnTitle:Bv,footer__columnTitleIcon:Uv,footer__iconList:qv,footer__itemSmallText:$v,payment:Hv,footer__iconContainer:Vv,footer__iconListSubHeader:Wv,accordionWrapper:Gv,accordionHeader:Kv,accordionTextWrapper:Qv,"footer--stamps":"_footer--stamps_198g6_247","footer--stamps--company":"_footer--stamps--company_198g6_254","support-container":"_support-container_198g6_258","support-section":"_support-section_198g6_277","support-text":"_support-text_198g6_319","support-items":"_support-items_198g6_329","support-item":"_support-item_198g6_329"};var Zf={},Sa={},fs={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"warnOnce",{enumerable:!0,get:function(){return t}});let t=r=>{};if(process.env.NODE_ENV!=="production"){const r=new Set;t=n=>{r.has(n)||console.warn(n),r.add(n)}}})(fs);var Jf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImageBlurSvg",{enumerable:!0,get:function(){return t}});function t(r){let{widthInt:n,heightInt:o,blurWidth:a,blurHeight:i,blurDataURL:c,objectFit:l}=r;const u=20,f=a?a*40:n,p=i?i*40:o,m=f&&p?"viewBox='0 0 "+f+" "+p+"'":"",h=m?"none":l==="contain"?"xMidYMid":l==="cover"?"xMidYMid slice":"none";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+m+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='"+u+"'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='"+u+"'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+h+"' style='filter: url(%23b);' href='"+c+"'/%3E%3C/svg%3E"}})(Jf);var ps={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(o,a){for(var i in a)Object.defineProperty(o,i,{enumerable:!0,get:a[i]})}t(e,{VALID_LOADERS:function(){return r},imageConfigDefault:function(){return n}});const r=["default","imgix","cloudinary","akamai","custom"],n={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",localPatterns:void 0,remotePatterns:[],qualities:void 0,unoptimized:!1}})(ps);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImgProps",{enumerable:!0,get:function(){return h}});const t=fs,r=Jf,n=ps,o=["lazy","eager",void 0];function a(_){return _.default!==void 0}function i(_){return _.src!==void 0}function c(_){return typeof _=="object"&&(a(_)||i(_))}const l=new Map;let u;function f(_){return typeof _>"u"?_:typeof _=="number"?Number.isFinite(_)?_:NaN:typeof _=="string"&&/^[0-9]+$/.test(_)?parseInt(_,10):NaN}function p(_,y,v){let{deviceSizes:b,allSizes:C}=_;if(v){const x=/(^|\s)(1?\d?\d)vw/g,S=[];for(let E;E=x.exec(v);E)S.push(parseInt(E[2]));if(S.length){const E=Math.min(...S)*.01;return{widths:C.filter(P=>P>=b[0]*E),kind:"w"}}return{widths:C,kind:"w"}}return typeof y!="number"?{widths:b,kind:"w"}:{widths:[...new Set([y,y*2].map(x=>C.find(S=>S>=x)||C[C.length-1]))],kind:"x"}}function m(_){let{config:y,src:v,unoptimized:b,width:C,quality:j,sizes:x,loader:S}=_;if(b)return{src:v,srcSet:void 0,sizes:void 0};const{widths:E,kind:P}=p(y,C,x),N=E.length-1;return{sizes:!x&&P==="w"?"100vw":x,srcSet:E.map((A,R)=>S({config:y,src:v,quality:j,width:A})+" "+(P==="w"?A:R+1)+P).join(", "),src:S({config:y,src:v,quality:j,width:E[N]})}}function h(_,y){let{src:v,sizes:b,unoptimized:C=!1,priority:j=!1,loading:x,className:S,quality:E,width:P,height:N,fill:A=!1,style:R,overrideSrc:O,onLoad:D,onLoadingComplete:$,placeholder:F="empty",blurDataURL:q,fetchPriority:V,decoding:J="async",layout:Z,objectFit:H,objectPosition:ee,lazyBoundary:ce,lazyRoot:me,...ae}=_;const{imgConf:ue,showAltText:z,blurComplete:te,defaultLoader:T}=y;let Q,le=ue||n.imageConfigDefault;if("allSizes"in le)Q=le;else{var be;const Y=[...le.deviceSizes,...le.imageSizes].sort((ne,xe)=>ne-xe),M=le.deviceSizes.sort((ne,xe)=>ne-xe),U=(be=le.qualities)==null?void 0:be.sort((ne,xe)=>ne-xe);Q={...le,allSizes:Y,deviceSizes:M,qualities:U}}if(typeof T>"u")throw new Error(`images.loaderFile detected but the file is missing default export.
5
+ Read more: https://nextjs.org/docs/messages/invalid-images-config`);let I=ae.loader||T;delete ae.loader,delete ae.srcSet;const L="__next_img_default"in I;if(L){if(Q.loader==="custom")throw new Error('Image with src "'+v+`" is missing "loader" prop.
6
+ Read more: https://nextjs.org/docs/messages/next-image-missing-loader`)}else{const Y=I;I=M=>{const{config:U,...ne}=M;return Y(ne)}}if(Z){Z==="fill"&&(A=!0);const Y={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}},M={responsive:"100vw",fill:"100vw"},U=Y[Z];U&&(R={...R,...U});const ne=M[Z];ne&&!b&&(b=ne)}let Le="",W=f(P),X=f(N),je,Me;if(c(v)){const Y=a(v)?v.default:v;if(!Y.src)throw new Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(Y));if(!Y.height||!Y.width)throw new Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(Y));if(je=Y.blurWidth,Me=Y.blurHeight,q=q||Y.blurDataURL,Le=Y.src,!A){if(!W&&!X)W=Y.width,X=Y.height;else if(W&&!X){const M=W/Y.width;X=Math.round(Y.height*M)}else if(!W&&X){const M=X/Y.height;W=Math.round(Y.width*M)}}}v=typeof v=="string"?v:Le;let we=!j&&(x==="lazy"||typeof x>"u");(!v||v.startsWith("data:")||v.startsWith("blob:"))&&(C=!0,we=!1),Q.unoptimized&&(C=!0),L&&v.endsWith(".svg")&&!Q.dangerouslyAllowSVG&&(C=!0),j&&(V="high");const Ce=f(E);if(process.env.NODE_ENV!=="production"){if(Q.output==="export"&&L&&!C)throw new Error("Image Optimization using the default loader is not compatible with `{ output: 'export' }`.\n Possible solutions:\n - Remove `{ output: 'export' }` and run \"next start\" to run server mode including the Image Optimization API.\n - Configure `{ images: { unoptimized: true } }` in `next.config.js` to disable the Image Optimization API.\n Read more: https://nextjs.org/docs/messages/export-image-api");if(!v)C=!0;else if(A){if(P)throw new Error('Image with src "'+v+'" has both "width" and "fill" properties. Only one should be used.');if(N)throw new Error('Image with src "'+v+'" has both "height" and "fill" properties. Only one should be used.');if(R!=null&&R.position&&R.position!=="absolute")throw new Error('Image with src "'+v+'" has both "fill" and "style.position" properties. Images with "fill" always use position absolute - it cannot be modified.');if(R!=null&&R.width&&R.width!=="100%")throw new Error('Image with src "'+v+'" has both "fill" and "style.width" properties. Images with "fill" always use width 100% - it cannot be modified.');if(R!=null&&R.height&&R.height!=="100%")throw new Error('Image with src "'+v+'" has both "fill" and "style.height" properties. Images with "fill" always use height 100% - it cannot be modified.')}else{if(typeof W>"u")throw new Error('Image with src "'+v+'" is missing required "width" property.');if(isNaN(W))throw new Error('Image with src "'+v+'" has invalid "width" property. Expected a numeric value in pixels but received "'+P+'".');if(typeof X>"u")throw new Error('Image with src "'+v+'" is missing required "height" property.');if(isNaN(X))throw new Error('Image with src "'+v+'" has invalid "height" property. Expected a numeric value in pixels but received "'+N+'".')}if(!o.includes(x))throw new Error('Image with src "'+v+'" has invalid "loading" property. Provided "'+x+'" should be one of '+o.map(String).join(",")+".");if(j&&x==="lazy")throw new Error('Image with src "'+v+`" has both "priority" and "loading='lazy'" properties. Only one should be used.`);if(F!=="empty"&&F!=="blur"&&!F.startsWith("data:image/"))throw new Error('Image with src "'+v+'" has invalid "placeholder" property "'+F+'".');if(F!=="empty"&&W&&X&&W*X<1600&&(0,t.warnOnce)('Image with src "'+v+'" is smaller than 40x40. Consider removing the "placeholder" property to improve performance.'),F==="blur"&&!q){const Y=["jpeg","png","webp","avif"];throw new Error('Image with src "'+v+`" has "placeholder='blur'" property but is missing the "blurDataURL" property.
7
7
  Possible solutions:
8
8
  - Add a "blurDataURL" property, the contents should be a small Data URL to represent the image
9
- - Change the "src" property to a static import with one of the supported file types: `+X.join(",")+` (animated images not supported)
9
+ - Change the "src" property to a static import with one of the supported file types: `+Y.join(",")+` (animated images not supported)
10
10
  - Remove the "placeholder" property, effectively no blur effect
11
- Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url`)}if("ref"in se&&(0,t.warnOnce)('Image with src "'+x+'" is using unsupported "ref" property. Consider using the "onLoad" property instead.'),!C&&!R){const X=N({config:W,src:x,width:q||400,quality:ge||75});let k;try{k=new URL(X)}catch{}(X===x||k&&k.pathname===x&&!k.search)&&(0,t.warnOnce)('Image with src "'+x+`" has a "loader" property that does not implement width. Please implement it or use the "unoptimized" property instead.
12
- Read more: https://nextjs.org/docs/messages/next-image-missing-loader-width`)}Q&&(0,t.warnOnce)('Image with src "'+x+'" is using deprecated "onLoadingComplete" property. Please use the "onLoad" property instead.');for(const[X,k]of Object.entries({layout:G,objectFit:H,objectPosition:Z,lazyBoundary:re,lazyRoot:le}))k&&(0,t.warnOnce)('Image with src "'+x+'" has legacy prop "'+X+`". Did you forget to run the codemod?
13
- Read more: https://nextjs.org/docs/messages/next-image-upgrade-to-13`);if(typeof window<"u"&&!u&&window.PerformanceObserver){u=new PerformanceObserver(X=>{for(const B of X.getEntries()){var k;const ee=(B==null||(k=B.element)==null?void 0:k.src)||"",fe=l.get(ee);fe&&!fe.priority&&fe.placeholder==="empty"&&!fe.src.startsWith("data:")&&!fe.src.startsWith("blob:")&&(0,t.warnOnce)('Image with src "'+fe.src+`" was detected as the Largest Contentful Paint (LCP). Please add the "priority" property if this image is above the fold.
14
- Read more: https://nextjs.org/docs/api-reference/next/image#priority`)}});try{u.observe({type:"largest-contentful-paint",buffered:!0})}catch(X){console.error(X)}}}const Ae=Object.assign(A?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:H,objectPosition:Z}:{},$?{}:{color:"transparent"},L),je=!J&&M!=="empty"?M==="blur"?'url("data:image/svg+xml;charset=utf-8,'+(0,n.getImageBlurSvg)({widthInt:q,heightInt:K,blurWidth:_e,blurHeight:we,blurDataURL:U||"",objectFit:Ae.objectFit})+'")':'url("'+M+'")':null;let z=je?{backgroundSize:Ae.objectFit||"cover",backgroundPosition:Ae.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:je}:{};process.env.NODE_ENV==="development"&&z.backgroundImage&&M==="blur"&&U!=null&&U.startsWith("/")&&(z.backgroundImage='url("'+U+'")');const me=p({config:W,src:x,unoptimized:C,width:q,quality:ge,sizes:b,loader:N});if(process.env.NODE_ENV!=="production"&&typeof window<"u"){let X;try{X=new URL(me.src)}catch{X=new URL(me.src,window.location.href)}l.set(X.href,{src:x,priority:j,placeholder:M})}return{props:{...se,loading:be?"lazy":v,fetchPriority:F,width:q,height:K,decoding:Y,className:P,style:{...Ae,...z},sizes:me.sizes,srcSet:me.srcSet,src:O||me.src},meta:{unoptimized:C,priority:j,placeholder:M,fill:A}}}})(Vs);var os={exports:{}},bn={exports:{}},Tr={},Qo;function H_(){return Qo||(Qo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return a}});const t=g,n=typeof window>"u",s=n?()=>{}:t.useLayoutEffect,o=n?()=>{}:t.useEffect;function a(i){const{headManager:c,reduceComponentsToState:l}=i;function u(){if(c&&c.mountedInstances){const f=t.Children.toArray(Array.from(c.mountedInstances).filter(Boolean));c.updateHead(l(f,i))}}if(n){var m;c==null||(m=c.mountedInstances)==null||m.add(i.children),u()}return s(()=>{var f;return c==null||(f=c.mountedInstances)==null||f.add(i.children),()=>{var p;c==null||(p=c.mountedInstances)==null||p.delete(i.children)}}),s(()=>(c&&(c._pendingUpdate=u),()=>{c&&(c._pendingUpdate=u)})),o(()=>(c&&c._pendingUpdate&&(c._pendingUpdate(),c._pendingUpdate=null),()=>{c&&c._pendingUpdate&&(c._pendingUpdate(),c._pendingUpdate=null)})),null}}(Tr)),Tr}var Lr={},Zo;function q_(){return Zo||(Zo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AmpStateContext",{enumerable:!0,get:function(){return s}});const s=Le._(g).default.createContext({});process.env.NODE_ENV!=="production"&&(s.displayName="AmpStateContext")}(Lr)),Lr}var Or={},Jo;function Hu(){return Jo||(Jo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"HeadManagerContext",{enumerable:!0,get:function(){return s}});const s=Le._(g).default.createContext({});process.env.NODE_ENV!=="production"&&(s.displayName="HeadManagerContext")}(Or)),Or}var kr={},ea;function V_(){return ea||(ea=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isInAmpMode",{enumerable:!0,get:function(){return t}});function t(n){let{ampFirst:s=!1,hybrid:o=!1,hasQuery:a=!1}=n===void 0?{}:n;return s||o&&a}}(kr)),kr}var ta;function W_(){return ta||(ta=1,function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function n(j,v){for(var P in v)Object.defineProperty(j,P,{enumerable:!0,get:v[P]})}n(t,{default:function(){return C},defaultHead:function(){return p}});const s=Le,o=Dt,a=r,i=o._(g),c=s._(H_()),l=q_(),u=Hu(),m=V_(),f=Xn;function p(j){j===void 0&&(j=!1);const v=[(0,a.jsx)("meta",{charSet:"utf-8"})];return j||v.push((0,a.jsx)("meta",{name:"viewport",content:"width=device-width"})),v}function h(j,v){return typeof v=="string"||typeof v=="number"?j:v.type===i.default.Fragment?j.concat(i.default.Children.toArray(v.props.children).reduce((P,S)=>typeof S=="string"||typeof S=="number"?P:P.concat(S),[])):j.concat(v)}const _=["name","httpEquiv","charSet","itemProp"];function y(){const j=new Set,v=new Set,P=new Set,S={};return E=>{let I=!0,A=!1;if(E.key&&typeof E.key!="number"&&E.key.indexOf("$")>0){A=!0;const L=E.key.slice(E.key.indexOf("$")+1);j.has(L)?I=!1:j.add(L)}switch(E.type){case"title":case"base":v.has(E.type)?I=!1:v.add(E.type);break;case"meta":for(let L=0,O=_.length;L<O;L++){const D=_[L];if(E.props.hasOwnProperty(D))if(D==="charSet")P.has(D)?I=!1:P.add(D);else{const Q=E.props[D],M=S[D]||new Set;(D!=="name"||!A)&&M.has(Q)?I=!1:(M.add(Q),S[D]=M)}}break}return I}}function x(j,v){const{inAmpMode:P}=v;return j.reduce(h,[]).reverse().concat(p(P).reverse()).filter(y()).reverse().map((S,E)=>{const I=S.key||E;if(process.env.NODE_ENV!=="development"&&process.env.__NEXT_OPTIMIZE_FONTS&&!P&&S.type==="link"&&S.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(A=>S.props.href.startsWith(A))){const A={...S.props||{}};return A["data-href"]=A.href,A.href=void 0,A["data-optimized-fonts"]=!0,i.default.cloneElement(S,A)}if(process.env.NODE_ENV==="development")if(S.type==="script"&&S.props.type!=="application/ld+json"){const A=S.props.src?'<script> tag with src="'+S.props.src+'"':"inline <script>";(0,f.warnOnce)("Do not add <script> tags using next/head (see "+A+`). Use next/script instead.
15
- See more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component`)}else S.type==="link"&&S.props.rel==="stylesheet"&&(0,f.warnOnce)('Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="'+S.props.href+`"). Use Document instead.
16
- See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component`);return i.default.cloneElement(S,{key:I})})}function b(j){let{children:v}=j;const P=(0,i.useContext)(l.AmpStateContext),S=(0,i.useContext)(u.HeadManagerContext);return(0,a.jsx)(c.default,{reduceComponentsToState:x,headManager:S,inAmpMode:(0,m.isInAmpMode)(P),children:v})}const C=b;(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(bn,bn.exports)),bn.exports}var Dr={},na;function G_(){return na||(na=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ImageConfigContext",{enumerable:!0,get:function(){return o}});const n=Le._(g),s=Yn,o=n.default.createContext(s.imageConfigDefault);process.env.NODE_ENV!=="production"&&(o.displayName="ImageConfigContext")}(Dr)),Dr}var Mr={},$r={},zr={exports:{}},ra;function qu(){return ra||(ra=1,(()=>{var e={170:(o,a,i)=>{const c=i(510),l=()=>{if(typeof navigator<"u"&&navigator.platform){const m=navigator.platform.toLowerCase();return m==="win32"||m==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};function u(m,f,p=!1){return f&&(f.windows===null||f.windows===void 0)&&(f={...f,windows:l()}),c(m,f,p)}Object.assign(u,c),o.exports=u},154:o=>{const a="\\\\/",i=`[^${a}]`,c="\\.",l="\\+",u="\\?",m="\\/",f="(?=.)",p="[^/]",h=`(?:${m}|$)`,_=`(?:^|${m})`,y=`${c}{1,2}${h}`,x=`(?!${c})`,b=`(?!${_}${y})`,C=`(?!${c}{0,1}${h})`,j=`(?!${y})`,v=`[^.${m}]`,P=`${p}*?`,E={DOT_LITERAL:c,PLUS_LITERAL:l,QMARK_LITERAL:u,SLASH_LITERAL:m,ONE_CHAR:f,QMARK:p,END_ANCHOR:h,DOTS_SLASH:y,NO_DOT:x,NO_DOTS:b,NO_DOT_SLASH:C,NO_DOTS_SLASH:j,QMARK_NO_DOT:v,STAR:P,START_ANCHOR:_,SEP:"/"},I={...E,SLASH_LITERAL:`[${a}]`,QMARK:i,STAR:`${i}*?`,DOTS_SLASH:`${c}{1,2}(?:[${a}]|$)`,NO_DOT:`(?!${c})`,NO_DOTS:`(?!(?:^|[${a}])${c}{1,2}(?:[${a}]|$))`,NO_DOT_SLASH:`(?!${c}{0,1}(?:[${a}]|$))`,NO_DOTS_SLASH:`(?!${c}{1,2}(?:[${a}]|$))`,QMARK_NO_DOT:`[^.${a}]`,START_ANCHOR:`(?:^|[${a}])`,END_ANCHOR:`(?:[${a}]|$)`,SEP:"\\"},A={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};o.exports={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:A,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(L){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${L.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(L){return L===!0?I:E}}},697:(o,a,i)=>{const c=i(154),l=i(96),{MAX_LENGTH:u,POSIX_REGEX_SOURCE:m,REGEX_NON_SPECIAL_CHARS:f,REGEX_SPECIAL_CHARS_BACKREF:p,REPLACEMENTS:h}=c,_=(b,C)=>{if(typeof C.expandRange=="function")return C.expandRange(...b,C);b.sort();const j=`[${b.join("-")}]`;try{new RegExp(j)}catch{return b.map(P=>l.escapeRegex(P)).join("..")}return j},y=(b,C)=>`Missing ${b}: "${C}" - use "\\\\${C}" to match literal characters`,x=(b,C)=>{if(typeof b!="string")throw new TypeError("Expected a string");b=h[b]||b;const j={...C},v=typeof j.maxLength=="number"?Math.min(u,j.maxLength):u;let P=b.length;if(P>v)throw new SyntaxError(`Input length: ${P}, exceeds maximum allowed length: ${v}`);const S={type:"bos",value:"",output:j.prepend||""},E=[S],I=j.capture?"":"?:",A=c.globChars(j.windows),L=c.extglobChars(A),{DOT_LITERAL:O,PLUS_LITERAL:D,SLASH_LITERAL:Q,ONE_CHAR:M,DOTS_SLASH:U,NO_DOT:F,NO_DOT_SLASH:Y,NO_DOTS_SLASH:G,QMARK:H,QMARK_NO_DOT:Z,STAR:re,START_ANCHOR:le}=A,se=V=>`(${I}(?:(?!${le}${V.dot?U:O}).)*?)`,ie=j.dot?"":F,$=j.dot?H:Z;let J=j.bash===!0?se(j):re;j.capture&&(J=`(${J})`),typeof j.noext=="boolean"&&(j.noextglob=j.noext);const w={input:b,index:-1,start:0,dot:j.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:E};b=l.removePrefix(b,w),P=b.length;const W=[],ae=[],he=[];let N=S,R;const Ne=()=>w.index===P-1,q=w.peek=(V=1)=>b[w.index+V],K=w.advance=()=>b[++w.index]||"",_e=()=>b.slice(w.index+1),we=(V="",X=0)=>{w.consumed+=V,w.index+=X},be=V=>{w.output+=V.output!=null?V.output:V.value,we(V.value)},ge=()=>{let V=1;for(;q()==="!"&&(q(2)!=="("||q(3)==="?");)K(),w.start++,V++;return V%2===0?!1:(w.negated=!0,w.start++,!0)},Ae=V=>{w[V]++,he.push(V)},je=V=>{w[V]--,he.pop()},z=V=>{if(N.type==="globstar"){const X=w.braces>0&&(V.type==="comma"||V.type==="brace"),k=V.extglob===!0||W.length&&(V.type==="pipe"||V.type==="paren");V.type!=="slash"&&V.type!=="paren"&&!X&&!k&&(w.output=w.output.slice(0,-N.output.length),N.type="star",N.value="*",N.output=J,w.output+=N.output)}if(W.length&&V.type!=="paren"&&(W[W.length-1].inner+=V.value),(V.value||V.output)&&be(V),N&&N.type==="text"&&V.type==="text"){N.output=(N.output||N.value)+V.value,N.value+=V.value;return}V.prev=N,E.push(V),N=V},me=(V,X)=>{const k={...L[X],conditions:1,inner:""};k.prev=N,k.parens=w.parens,k.output=w.output;const B=(j.capture?"(":"")+k.open;Ae("parens"),z({type:V,value:X,output:w.output?"":M}),z({type:"paren",extglob:!0,value:K(),output:B}),W.push(k)},ye=V=>{let X=V.close+(j.capture?")":""),k;if(V.type==="negate"){let B=J;if(V.inner&&V.inner.length>1&&V.inner.includes("/")&&(B=se(j)),(B!==J||Ne()||/^\)+$/.test(_e()))&&(X=V.close=`)$))${B}`),V.inner.includes("*")&&(k=_e())&&/^\.[^\\/.]+$/.test(k)){const ee=x(k,{...C,fastpaths:!1}).output;X=V.close=`)${ee})${B})`}V.prev.type==="bos"&&(w.negatedExtglob=!0)}z({type:"paren",extglob:!0,value:R,output:X}),je("parens")};if(j.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(b)){let V=!1,X=b.replace(p,(k,B,ee,fe,Pe,er)=>fe==="\\"?(V=!0,k):fe==="?"?B?B+fe+(Pe?H.repeat(Pe.length):""):er===0?$+(Pe?H.repeat(Pe.length):""):H.repeat(ee.length):fe==="."?O.repeat(ee.length):fe==="*"?B?B+fe+(Pe?J:""):J:B?k:`\\${k}`);return V===!0&&(j.unescape===!0?X=X.replace(/\\/g,""):X=X.replace(/\\+/g,k=>k.length%2===0?"\\\\":k?"\\":"")),X===b&&j.contains===!0?(w.output=b,w):(w.output=l.wrapOutput(X,w,C),w)}for(;!Ne();){if(R=K(),R==="\0")continue;if(R==="\\"){const k=q();if(k==="/"&&j.bash!==!0||k==="."||k===";")continue;if(!k){R+="\\",z({type:"text",value:R});continue}const B=/^\\+/.exec(_e());let ee=0;if(B&&B[0].length>2&&(ee=B[0].length,w.index+=ee,ee%2!==0&&(R+="\\")),j.unescape===!0?R=K():R+=K(),w.brackets===0){z({type:"text",value:R});continue}}if(w.brackets>0&&(R!=="]"||N.value==="["||N.value==="[^")){if(j.posix!==!1&&R===":"){const k=N.value.slice(1);if(k.includes("[")&&(N.posix=!0,k.includes(":"))){const B=N.value.lastIndexOf("["),ee=N.value.slice(0,B),fe=N.value.slice(B+2),Pe=m[fe];if(Pe){N.value=ee+Pe,w.backtrack=!0,K(),!S.output&&E.indexOf(N)===1&&(S.output=M);continue}}}(R==="["&&q()!==":"||R==="-"&&q()==="]")&&(R=`\\${R}`),R==="]"&&(N.value==="["||N.value==="[^")&&(R=`\\${R}`),j.posix===!0&&R==="!"&&N.value==="["&&(R="^"),N.value+=R,be({value:R});continue}if(w.quotes===1&&R!=='"'){R=l.escapeRegex(R),N.value+=R,be({value:R});continue}if(R==='"'){w.quotes=w.quotes===1?0:1,j.keepQuotes===!0&&z({type:"text",value:R});continue}if(R==="("){Ae("parens"),z({type:"paren",value:R});continue}if(R===")"){if(w.parens===0&&j.strictBrackets===!0)throw new SyntaxError(y("opening","("));const k=W[W.length-1];if(k&&w.parens===k.parens+1){ye(W.pop());continue}z({type:"paren",value:R,output:w.parens?")":"\\)"}),je("parens");continue}if(R==="["){if(j.nobracket===!0||!_e().includes("]")){if(j.nobracket!==!0&&j.strictBrackets===!0)throw new SyntaxError(y("closing","]"));R=`\\${R}`}else Ae("brackets");z({type:"bracket",value:R});continue}if(R==="]"){if(j.nobracket===!0||N&&N.type==="bracket"&&N.value.length===1){z({type:"text",value:R,output:`\\${R}`});continue}if(w.brackets===0){if(j.strictBrackets===!0)throw new SyntaxError(y("opening","["));z({type:"text",value:R,output:`\\${R}`});continue}je("brackets");const k=N.value.slice(1);if(N.posix!==!0&&k[0]==="^"&&!k.includes("/")&&(R=`/${R}`),N.value+=R,be({value:R}),j.literalBrackets===!1||l.hasRegexChars(k))continue;const B=l.escapeRegex(N.value);if(w.output=w.output.slice(0,-N.value.length),j.literalBrackets===!0){w.output+=B,N.value=B;continue}N.value=`(${I}${B}|${N.value})`,w.output+=N.value;continue}if(R==="{"&&j.nobrace!==!0){Ae("braces");const k={type:"brace",value:R,output:"(",outputIndex:w.output.length,tokensIndex:w.tokens.length};ae.push(k),z(k);continue}if(R==="}"){const k=ae[ae.length-1];if(j.nobrace===!0||!k){z({type:"text",value:R,output:R});continue}let B=")";if(k.dots===!0){const ee=E.slice(),fe=[];for(let Pe=ee.length-1;Pe>=0&&(E.pop(),ee[Pe].type!=="brace");Pe--)ee[Pe].type!=="dots"&&fe.unshift(ee[Pe].value);B=_(fe,j),w.backtrack=!0}if(k.comma!==!0&&k.dots!==!0){const ee=w.output.slice(0,k.outputIndex),fe=w.tokens.slice(k.tokensIndex);k.value=k.output="\\{",R=B="\\}",w.output=ee;for(const Pe of fe)w.output+=Pe.output||Pe.value}z({type:"brace",value:R,output:B}),je("braces"),ae.pop();continue}if(R==="|"){W.length>0&&W[W.length-1].conditions++,z({type:"text",value:R});continue}if(R===","){let k=R;const B=ae[ae.length-1];B&&he[he.length-1]==="braces"&&(B.comma=!0,k="|"),z({type:"comma",value:R,output:k});continue}if(R==="/"){if(N.type==="dot"&&w.index===w.start+1){w.start=w.index+1,w.consumed="",w.output="",E.pop(),N=S;continue}z({type:"slash",value:R,output:Q});continue}if(R==="."){if(w.braces>0&&N.type==="dot"){N.value==="."&&(N.output=O);const k=ae[ae.length-1];N.type="dots",N.output+=R,N.value+=R,k.dots=!0;continue}if(w.braces+w.parens===0&&N.type!=="bos"&&N.type!=="slash"){z({type:"text",value:R,output:O});continue}z({type:"dot",value:R,output:O});continue}if(R==="?"){if(!(N&&N.value==="(")&&j.noextglob!==!0&&q()==="("&&q(2)!=="?"){me("qmark",R);continue}if(N&&N.type==="paren"){const B=q();let ee=R;(N.value==="("&&!/[!=<:]/.test(B)||B==="<"&&!/<([!=]|\w+>)/.test(_e()))&&(ee=`\\${R}`),z({type:"text",value:R,output:ee});continue}if(j.dot!==!0&&(N.type==="slash"||N.type==="bos")){z({type:"qmark",value:R,output:Z});continue}z({type:"qmark",value:R,output:H});continue}if(R==="!"){if(j.noextglob!==!0&&q()==="("&&(q(2)!=="?"||!/[!=<:]/.test(q(3)))){me("negate",R);continue}if(j.nonegate!==!0&&w.index===0){ge();continue}}if(R==="+"){if(j.noextglob!==!0&&q()==="("&&q(2)!=="?"){me("plus",R);continue}if(N&&N.value==="("||j.regex===!1){z({type:"plus",value:R,output:D});continue}if(N&&(N.type==="bracket"||N.type==="paren"||N.type==="brace")||w.parens>0){z({type:"plus",value:R});continue}z({type:"plus",value:D});continue}if(R==="@"){if(j.noextglob!==!0&&q()==="("&&q(2)!=="?"){z({type:"at",extglob:!0,value:R,output:""});continue}z({type:"text",value:R});continue}if(R!=="*"){(R==="$"||R==="^")&&(R=`\\${R}`);const k=f.exec(_e());k&&(R+=k[0],w.index+=k[0].length),z({type:"text",value:R});continue}if(N&&(N.type==="globstar"||N.star===!0)){N.type="star",N.star=!0,N.value+=R,N.output=J,w.backtrack=!0,w.globstar=!0,we(R);continue}let V=_e();if(j.noextglob!==!0&&/^\([^?]/.test(V)){me("star",R);continue}if(N.type==="star"){if(j.noglobstar===!0){we(R);continue}const k=N.prev,B=k.prev,ee=k.type==="slash"||k.type==="bos",fe=B&&(B.type==="star"||B.type==="globstar");if(j.bash===!0&&(!ee||V[0]&&V[0]!=="/")){z({type:"star",value:R,output:""});continue}const Pe=w.braces>0&&(k.type==="comma"||k.type==="brace"),er=W.length&&(k.type==="pipe"||k.type==="paren");if(!ee&&k.type!=="paren"&&!Pe&&!er){z({type:"star",value:R,output:""});continue}for(;V.slice(0,3)==="/**";){const an=b[w.index+4];if(an&&an!=="/")break;V=V.slice(3),we("/**",3)}if(k.type==="bos"&&Ne()){N.type="globstar",N.value+=R,N.output=se(j),w.output=N.output,w.globstar=!0,we(R);continue}if(k.type==="slash"&&k.prev.type!=="bos"&&!fe&&Ne()){w.output=w.output.slice(0,-(k.output+N.output).length),k.output=`(?:${k.output}`,N.type="globstar",N.output=se(j)+(j.strictSlashes?")":"|$)"),N.value+=R,w.globstar=!0,w.output+=k.output+N.output,we(R);continue}if(k.type==="slash"&&k.prev.type!=="bos"&&V[0]==="/"){const an=V[1]!==void 0?"|$":"";w.output=w.output.slice(0,-(k.output+N.output).length),k.output=`(?:${k.output}`,N.type="globstar",N.output=`${se(j)}${Q}|${Q}${an})`,N.value+=R,w.output+=k.output+N.output,w.globstar=!0,we(R+K()),z({type:"slash",value:"/",output:""});continue}if(k.type==="bos"&&V[0]==="/"){N.type="globstar",N.value+=R,N.output=`(?:^|${Q}|${se(j)}${Q})`,w.output=N.output,w.globstar=!0,we(R+K()),z({type:"slash",value:"/",output:""});continue}w.output=w.output.slice(0,-N.output.length),N.type="globstar",N.output=se(j),N.value+=R,w.output+=N.output,w.globstar=!0,we(R);continue}const X={type:"star",value:R,output:J};if(j.bash===!0){X.output=".*?",(N.type==="bos"||N.type==="slash")&&(X.output=ie+X.output),z(X);continue}if(N&&(N.type==="bracket"||N.type==="paren")&&j.regex===!0){X.output=R,z(X);continue}(w.index===w.start||N.type==="slash"||N.type==="dot")&&(N.type==="dot"?(w.output+=Y,N.output+=Y):j.dot===!0?(w.output+=G,N.output+=G):(w.output+=ie,N.output+=ie),q()!=="*"&&(w.output+=M,N.output+=M)),z(X)}for(;w.brackets>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing","]"));w.output=l.escapeLast(w.output,"["),je("brackets")}for(;w.parens>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing",")"));w.output=l.escapeLast(w.output,"("),je("parens")}for(;w.braces>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing","}"));w.output=l.escapeLast(w.output,"{"),je("braces")}if(j.strictSlashes!==!0&&(N.type==="star"||N.type==="bracket")&&z({type:"maybe_slash",value:"",output:`${Q}?`}),w.backtrack===!0){w.output="";for(const V of w.tokens)w.output+=V.output!=null?V.output:V.value,V.suffix&&(w.output+=V.suffix)}return w};x.fastpaths=(b,C)=>{const j={...C},v=typeof j.maxLength=="number"?Math.min(u,j.maxLength):u,P=b.length;if(P>v)throw new SyntaxError(`Input length: ${P}, exceeds maximum allowed length: ${v}`);b=h[b]||b;const{DOT_LITERAL:S,SLASH_LITERAL:E,ONE_CHAR:I,DOTS_SLASH:A,NO_DOT:L,NO_DOTS:O,NO_DOTS_SLASH:D,STAR:Q,START_ANCHOR:M}=c.globChars(j.windows),U=j.dot?O:L,F=j.dot?D:L,Y=j.capture?"":"?:",G={negated:!1,prefix:""};let H=j.bash===!0?".*?":Q;j.capture&&(H=`(${H})`);const Z=ie=>ie.noglobstar===!0?H:`(${Y}(?:(?!${M}${ie.dot?A:S}).)*?)`,re=ie=>{switch(ie){case"*":return`${U}${I}${H}`;case".*":return`${S}${I}${H}`;case"*.*":return`${U}${H}${S}${I}${H}`;case"*/*":return`${U}${H}${E}${I}${F}${H}`;case"**":return U+Z(j);case"**/*":return`(?:${U}${Z(j)}${E})?${F}${I}${H}`;case"**/*.*":return`(?:${U}${Z(j)}${E})?${F}${H}${S}${I}${H}`;case"**/.*":return`(?:${U}${Z(j)}${E})?${S}${I}${H}`;default:{const $=/^(.*?)\.(\w+)$/.exec(ie);if(!$)return;const J=re($[1]);return J?J+S+$[2]:void 0}}},le=l.removePrefix(b,G);let se=re(le);return se&&j.strictSlashes!==!0&&(se+=`${E}?`),se},o.exports=x},510:(o,a,i)=>{const c=i(716),l=i(697),u=i(96),m=i(154),f=h=>h&&typeof h=="object"&&!Array.isArray(h),p=(h,_,y=!1)=>{if(Array.isArray(h)){const E=h.map(A=>p(A,_,y));return A=>{for(const L of E){const O=L(A);if(O)return O}return!1}}const x=f(h)&&h.tokens&&h.input;if(h===""||typeof h!="string"&&!x)throw new TypeError("Expected pattern to be a non-empty string");const b=_||{},C=b.windows,j=x?p.compileRe(h,_):p.makeRe(h,_,!1,!0),v=j.state;delete j.state;let P=()=>!1;if(b.ignore){const E={..._,ignore:null,onMatch:null,onResult:null};P=p(b.ignore,E,y)}const S=(E,I=!1)=>{const{isMatch:A,match:L,output:O}=p.test(E,j,_,{glob:h,posix:C}),D={glob:h,state:v,regex:j,posix:C,input:E,output:O,match:L,isMatch:A};return typeof b.onResult=="function"&&b.onResult(D),A===!1?(D.isMatch=!1,I?D:!1):P(E)?(typeof b.onIgnore=="function"&&b.onIgnore(D),D.isMatch=!1,I?D:!1):(typeof b.onMatch=="function"&&b.onMatch(D),I?D:!0)};return y&&(S.state=v),S};p.test=(h,_,y,{glob:x,posix:b}={})=>{if(typeof h!="string")throw new TypeError("Expected input to be a string");if(h==="")return{isMatch:!1,output:""};const C=y||{},j=C.format||(b?u.toPosixSlashes:null);let v=h===x,P=v&&j?j(h):h;return v===!1&&(P=j?j(h):h,v=P===x),(v===!1||C.capture===!0)&&(C.matchBase===!0||C.basename===!0?v=p.matchBase(h,_,y,b):v=_.exec(P)),{isMatch:!!v,match:v,output:P}},p.matchBase=(h,_,y)=>(_ instanceof RegExp?_:p.makeRe(_,y)).test(u.basename(h)),p.isMatch=(h,_,y)=>p(_,y)(h),p.parse=(h,_)=>Array.isArray(h)?h.map(y=>p.parse(y,_)):l(h,{..._,fastpaths:!1}),p.scan=(h,_)=>c(h,_),p.compileRe=(h,_,y=!1,x=!1)=>{if(y===!0)return h.output;const b=_||{},C=b.contains?"":"^",j=b.contains?"":"$";let v=`${C}(?:${h.output})${j}`;h&&h.negated===!0&&(v=`^(?!${v}).*$`);const P=p.toRegex(v,_);return x===!0&&(P.state=h),P},p.makeRe=(h,_={},y=!1,x=!1)=>{if(!h||typeof h!="string")throw new TypeError("Expected a non-empty string");let b={negated:!1,fastpaths:!0};return _.fastpaths!==!1&&(h[0]==="."||h[0]==="*")&&(b.output=l.fastpaths(h,_)),b.output||(b=l(h,_)),p.compileRe(b,_,y,x)},p.toRegex=(h,_)=>{try{const y=_||{};return new RegExp(h,y.flags||(y.nocase?"i":""))}catch(y){if(_&&_.debug===!0)throw y;return/$^/}},p.constants=m,o.exports=p},716:(o,a,i)=>{const c=i(96),{CHAR_ASTERISK:l,CHAR_AT:u,CHAR_BACKWARD_SLASH:m,CHAR_COMMA:f,CHAR_DOT:p,CHAR_EXCLAMATION_MARK:h,CHAR_FORWARD_SLASH:_,CHAR_LEFT_CURLY_BRACE:y,CHAR_LEFT_PARENTHESES:x,CHAR_LEFT_SQUARE_BRACKET:b,CHAR_PLUS:C,CHAR_QUESTION_MARK:j,CHAR_RIGHT_CURLY_BRACE:v,CHAR_RIGHT_PARENTHESES:P,CHAR_RIGHT_SQUARE_BRACKET:S}=i(154),E=L=>L===_||L===m,I=L=>{L.isPrefix!==!0&&(L.depth=L.isGlobstar?1/0:1)},A=(L,O)=>{const D=O||{},Q=L.length-1,M=D.parts===!0||D.scanToEnd===!0,U=[],F=[],Y=[];let G=L,H=-1,Z=0,re=0,le=!1,se=!1,ie=!1,$=!1,J=!1,w=!1,W=!1,ae=!1,he=!1,N=!1,R=0,Ne,q,K={value:"",depth:0,isGlob:!1};const _e=()=>H>=Q,we=()=>G.charCodeAt(H+1),be=()=>(Ne=q,G.charCodeAt(++H));for(;H<Q;){q=be();let me;if(q===m){W=K.backslashes=!0,q=be(),q===y&&(w=!0);continue}if(w===!0||q===y){for(R++;_e()!==!0&&(q=be());){if(q===m){W=K.backslashes=!0,be();continue}if(q===y){R++;continue}if(w!==!0&&q===p&&(q=be())===p){if(le=K.isBrace=!0,ie=K.isGlob=!0,N=!0,M===!0)continue;break}if(w!==!0&&q===f){if(le=K.isBrace=!0,ie=K.isGlob=!0,N=!0,M===!0)continue;break}if(q===v&&(R--,R===0)){w=!1,le=K.isBrace=!0,N=!0;break}}if(M===!0)continue;break}if(q===_){if(U.push(H),F.push(K),K={value:"",depth:0,isGlob:!1},N===!0)continue;if(Ne===p&&H===Z+1){Z+=2;continue}re=H+1;continue}if(D.noext!==!0&&(q===C||q===u||q===l||q===j||q===h)===!0&&we()===x){if(ie=K.isGlob=!0,$=K.isExtglob=!0,N=!0,q===h&&H===Z&&(he=!0),M===!0){for(;_e()!==!0&&(q=be());){if(q===m){W=K.backslashes=!0,q=be();continue}if(q===P){ie=K.isGlob=!0,N=!0;break}}continue}break}if(q===l){if(Ne===l&&(J=K.isGlobstar=!0),ie=K.isGlob=!0,N=!0,M===!0)continue;break}if(q===j){if(ie=K.isGlob=!0,N=!0,M===!0)continue;break}if(q===b){for(;_e()!==!0&&(me=be());){if(me===m){W=K.backslashes=!0,be();continue}if(me===S){se=K.isBracket=!0,ie=K.isGlob=!0,N=!0;break}}if(M===!0)continue;break}if(D.nonegate!==!0&&q===h&&H===Z){ae=K.negated=!0,Z++;continue}if(D.noparen!==!0&&q===x){if(ie=K.isGlob=!0,M===!0){for(;_e()!==!0&&(q=be());){if(q===x){W=K.backslashes=!0,q=be();continue}if(q===P){N=!0;break}}continue}break}if(ie===!0){if(N=!0,M===!0)continue;break}}D.noext===!0&&($=!1,ie=!1);let ge=G,Ae="",je="";Z>0&&(Ae=G.slice(0,Z),G=G.slice(Z),re-=Z),ge&&ie===!0&&re>0?(ge=G.slice(0,re),je=G.slice(re)):ie===!0?(ge="",je=G):ge=G,ge&&ge!==""&&ge!=="/"&&ge!==G&&E(ge.charCodeAt(ge.length-1))&&(ge=ge.slice(0,-1)),D.unescape===!0&&(je&&(je=c.removeBackslashes(je)),ge&&W===!0&&(ge=c.removeBackslashes(ge)));const z={prefix:Ae,input:L,start:Z,base:ge,glob:je,isBrace:le,isBracket:se,isGlob:ie,isExtglob:$,isGlobstar:J,negated:ae,negatedExtglob:he};if(D.tokens===!0&&(z.maxDepth=0,E(q)||F.push(K),z.tokens=F),D.parts===!0||D.tokens===!0){let me;for(let ye=0;ye<U.length;ye++){const V=me?me+1:Z,X=U[ye],k=L.slice(V,X);D.tokens&&(ye===0&&Z!==0?(F[ye].isPrefix=!0,F[ye].value=Ae):F[ye].value=k,I(F[ye]),z.maxDepth+=F[ye].depth),(ye!==0||k!=="")&&Y.push(k),me=X}if(me&&me+1<L.length){const ye=L.slice(me+1);Y.push(ye),D.tokens&&(F[F.length-1].value=ye,I(F[F.length-1]),z.maxDepth+=F[F.length-1].depth)}z.slashes=U,z.parts=Y}return z};o.exports=A},96:(o,a,i)=>{const{REGEX_BACKSLASH:c,REGEX_REMOVE_BACKSLASH:l,REGEX_SPECIAL_CHARS:u,REGEX_SPECIAL_CHARS_GLOBAL:m}=i(154);a.isObject=f=>f!==null&&typeof f=="object"&&!Array.isArray(f),a.hasRegexChars=f=>u.test(f),a.isRegexChar=f=>f.length===1&&a.hasRegexChars(f),a.escapeRegex=f=>f.replace(m,"\\$1"),a.toPosixSlashes=f=>f.replace(c,"/"),a.removeBackslashes=f=>f.replace(l,p=>p==="\\"?"":p),a.escapeLast=(f,p,h)=>{const _=f.lastIndexOf(p,h);return _===-1?f:f[_-1]==="\\"?a.escapeLast(f,p,_-1):`${f.slice(0,_)}\\${f.slice(_)}`},a.removePrefix=(f,p={})=>{let h=f;return h.startsWith("./")&&(h=h.slice(2),p.prefix="./"),h},a.wrapOutput=(f,p={},h={})=>{const _=h.contains?"":"^",y=h.contains?"":"$";let x=`${_}(?:${f})${y}`;return p.negated===!0&&(x=`(?:^(?!${x}).*$)`),x},a.basename=(f,{windows:p}={})=>{const h=f.split(p?/[\\/]/:"/"),_=h[h.length-1];return _===""?h[h.length-2]:_}}},t={};function n(o){var a=t[o];if(a!==void 0)return a.exports;var i=t[o]={exports:{}},c=!0;try{e[o](i,i.exports,n),c=!1}finally{c&&delete t[o]}return i.exports}typeof n<"u"&&(n.ab=__dirname+"/");var s=n(170);zr.exports=s})()),zr.exports}var sa;function K_(){return sa||(sa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}t(e,{hasLocalMatch:function(){return o},matchLocalPattern:function(){return s}});const n=qu();function s(a,i){if(a.search!==void 0&&a.search!==i.search)return!1;var c;return!!(0,n.makeRe)((c=a.pathname)!=null?c:"**",{dot:!0}).test(i.pathname)}function o(a,i){if(!a)return!0;const c=new URL(i,"http://n");return a.some(l=>s(l,c))}}($r)),$r}var Fr={},oa;function X_(){return oa||(oa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}t(e,{hasRemoteMatch:function(){return o},matchRemotePattern:function(){return s}});const n=qu();function s(a,i){if(a.protocol!==void 0){const l=i.protocol.slice(0,-1);if(a.protocol!==l)return!1}if(a.port!==void 0&&a.port!==i.port)return!1;if(a.hostname===void 0)throw new Error(`Pattern should define hostname but found
17
- `+JSON.stringify(a));if(!(0,n.makeRe)(a.hostname).test(i.hostname)||a.search!==void 0&&a.search!==i.search)return!1;var c;return!!(0,n.makeRe)((c=a.pathname)!=null?c:"**",{dot:!0}).test(i.pathname)}function o(a,i,c){return a.some(l=>c.hostname===l)||i.some(l=>s(l,c))}}(Fr)),Fr}var aa;function Vu(){return aa||(aa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return s}});const t=75;function n(o){let{config:a,src:i,width:c,quality:l}=o;var u;if(process.env.NODE_ENV!=="production"){const f=[];if(i||f.push("src"),c||f.push("width"),f.length>0)throw new Error("Next Image Optimization requires "+f.join(", ")+" to be provided. Make sure you pass them as props to the `next/image` component. Received: "+JSON.stringify({src:i,width:c,quality:l}));if(i.startsWith("//"))throw new Error('Failed to parse src "'+i+'" on `next/image`, protocol-relative URL (//) must be changed to an absolute URL (http:// or https://)');if(i.startsWith("/")&&a.localPatterns&&process.env.NODE_ENV!=="test"&&process.env.NEXT_RUNTIME!=="edge"){const{hasLocalMatch:p}=K_();if(!p(a.localPatterns,i))throw new Error("Invalid src prop ("+i+") on `next/image` does not match `images.localPatterns` configured in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns")}if(!i.startsWith("/")&&(a.domains||a.remotePatterns)){let p;try{p=new URL(i)}catch(h){throw console.error(h),new Error('Failed to parse src "'+i+'" on `next/image`, if using relative image it must start with a leading slash "/" or be an absolute URL (http:// or https://)')}if(process.env.NODE_ENV!=="test"&&process.env.NEXT_RUNTIME!=="edge"){const{hasRemoteMatch:h}=X_();if(!h(a.domains,a.remotePatterns,p))throw new Error("Invalid src prop ("+i+') on `next/image`, hostname "'+p.hostname+'" is not configured under images in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-host')}}if(l&&a.qualities&&!a.qualities.includes(l))throw new Error("Invalid quality prop ("+l+") on `next/image` does not match `images.qualities` configured in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-qualities")}const m=l||((u=a.qualities)==null?void 0:u.reduce((f,p)=>Math.abs(p-t)<Math.abs(f-t)?p:f))||t;return a.path+"?url="+encodeURIComponent(i)+"&w="+c+"&q="+m+(process.env.NEXT_DEPLOYMENT_ID?"&dpl="+process.env.NEXT_DEPLOYMENT_ID:"")}n.__next_img_default=!0;const s=n}(Mr)),Mr}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return j}});const n=Le,s=Dt,o=r,a=s._(g),i=n._(ps),c=n._(W_()),l=Vs,u=Yn,m=G_(),f=Xn,p=Bc(),h=n._(Vu()),_=process.env.__NEXT_IMAGE_OPTS;typeof window>"u"&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);function y(v,P,S,E,I,A,L){const O=v==null?void 0:v.src;if(!v||v["data-loaded-src"]===O)return;v["data-loaded-src"]=O,("decode"in v?v.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(!(!v.parentElement||!v.isConnected)){if(P!=="empty"&&I(!0),S!=null&&S.current){const Q=new Event("load");Object.defineProperty(Q,"target",{writable:!1,value:v});let M=!1,U=!1;S.current({...Q,nativeEvent:Q,currentTarget:v,target:v,isDefaultPrevented:()=>M,isPropagationStopped:()=>U,persist:()=>{},preventDefault:()=>{M=!0,Q.preventDefault()},stopPropagation:()=>{U=!0,Q.stopPropagation()}})}if(E!=null&&E.current&&E.current(v),process.env.NODE_ENV!=="production"){const Q=new URL(O,"http://n").searchParams.get("url")||O;if(v.getAttribute("data-nimg")==="fill"){if(!A&&(!L||L==="100vw")&&v.getBoundingClientRect().width/window.innerWidth<.6&&(L==="100vw"?(0,f.warnOnce)('Image with src "'+Q+'" has "fill" prop and "sizes" prop of "100vw", but image is not rendered at full viewport width. Please adjust "sizes" to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes'):(0,f.warnOnce)('Image with src "'+Q+'" has "fill" but is missing "sizes" prop. Please add it to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes')),v.parentElement){const{position:F}=window.getComputedStyle(v.parentElement),Y=["absolute","fixed","relative"];Y.includes(F)||(0,f.warnOnce)('Image with src "'+Q+'" has "fill" and parent element with invalid "position". Provided "'+F+'" should be one of '+Y.map(String).join(",")+".")}v.height===0&&(0,f.warnOnce)('Image with src "'+Q+'" has "fill" and a height value of 0. This is likely because the parent element of the image has not been styled to have a set height.')}const M=v.height.toString()!==v.getAttribute("height"),U=v.width.toString()!==v.getAttribute("width");(M&&!U||!M&&U)&&(0,f.warnOnce)('Image with src "'+Q+`" has either width or height modified, but not the other. If you use CSS to change the size of your image, also include the styles 'width: "auto"' or 'height: "auto"' to maintain the aspect ratio.`)}}})}function x(v){return a.use?{fetchPriority:v}:{fetchpriority:v}}const b=(0,a.forwardRef)((v,P)=>{let{src:S,srcSet:E,sizes:I,height:A,width:L,decoding:O,className:D,style:Q,fetchPriority:M,placeholder:U,loading:F,unoptimized:Y,fill:G,onLoadRef:H,onLoadingCompleteRef:Z,setBlurComplete:re,setShowAltText:le,sizesInput:se,onLoad:ie,onError:$,...J}=v;return(0,o.jsx)("img",{...J,...x(M),loading:F,width:L,height:A,decoding:O,"data-nimg":G?"fill":"1",className:D,style:Q,sizes:I,srcSet:E,src:S,ref:(0,a.useCallback)(w=>{P&&(typeof P=="function"?P(w):typeof P=="object"&&(P.current=w)),w&&($&&(w.src=w.src),process.env.NODE_ENV!=="production"&&(S||console.error('Image is missing required "src" property:',w),w.getAttribute("alt")===null&&console.error('Image is missing required "alt" property. Please add Alternative Text to describe the image for screen readers and search engines.')),w.complete&&y(w,U,H,Z,re,Y,se))},[S,U,H,Z,re,$,Y,se,P]),onLoad:w=>{const W=w.currentTarget;y(W,U,H,Z,re,Y,se)},onError:w=>{le(!0),U!=="empty"&&re(!0),$&&$(w)}})});function C(v){let{isAppRouter:P,imgAttributes:S}=v;const E={as:"image",imageSrcSet:S.srcSet,imageSizes:S.sizes,crossOrigin:S.crossOrigin,referrerPolicy:S.referrerPolicy,...x(S.fetchPriority)};return P&&i.default.preload?(i.default.preload(S.src,E),null):(0,o.jsx)(c.default,{children:(0,o.jsx)("link",{rel:"preload",href:S.srcSet?void 0:S.src,...E},"__nimg-"+S.src+S.srcSet+S.sizes)})}const j=(0,a.forwardRef)((v,P)=>{const E=!(0,a.useContext)(p.RouterContext),I=(0,a.useContext)(m.ImageConfigContext),A=(0,a.useMemo)(()=>{var Z;const re=_||I||u.imageConfigDefault,le=[...re.deviceSizes,...re.imageSizes].sort(($,J)=>$-J),se=re.deviceSizes.sort(($,J)=>$-J),ie=(Z=re.qualities)==null?void 0:Z.sort(($,J)=>$-J);return{...re,allSizes:le,deviceSizes:se,qualities:ie}},[I]),{onLoad:L,onLoadingComplete:O}=v,D=(0,a.useRef)(L);(0,a.useEffect)(()=>{D.current=L},[L]);const Q=(0,a.useRef)(O);(0,a.useEffect)(()=>{Q.current=O},[O]);const[M,U]=(0,a.useState)(!1),[F,Y]=(0,a.useState)(!1),{props:G,meta:H}=(0,l.getImgProps)(v,{defaultLoader:h.default,imgConf:A,blurComplete:M,showAltText:F});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(b,{...G,unoptimized:H.unoptimized,placeholder:H.placeholder,fill:H.fill,onLoadRef:D,onLoadingCompleteRef:Q,setBlurComplete:U,setShowAltText:Y,sizesInput:v.sizes,ref:P}),H.priority?(0,o.jsx)(C,{isAppRouter:E,imgAttributes:G}):null]})});(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(os,os.exports);var Y_=os.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var m in u)Object.defineProperty(l,m,{enumerable:!0,get:u[m]})}t(e,{default:function(){return c},getImageProps:function(){return i}});const n=Le,s=Vs,o=Y_,a=n._(Vu());function i(l){const{props:u}=(0,s.getImgProps)(l,{defaultLoader:a.default,imgConf:process.env.__NEXT_IMAGE_OPTS});for(const[m,f]of Object.entries(u))f===void 0&&delete u[m];return{props:u}}const c=o.Image})(Bu);var Q_=Bu;const Yt=T.getDefaultExportFromCjs(Q_),Z_=({item:e,CONSTANTS:t})=>{const n=e.icon?t.PAYMENT_FLAGS.includes(e.icon)?"payment":"social":null,s=n==="payment"?t.PAYMENT_FLAGS_DICTIONARY[e.icon]:e.icon;return e.link?r.jsxs(Me,{href:e.link,target:"_blank",rel:"noopener noreferrer",className:de["support-item"],children:[e.image&&r.jsx("img",{src:e.image,alt:"",loading:"lazy"}),n==="payment"?r.jsx(Yt,{alt:s,src:`/assets/${s}.svg`,width:20,height:20}):r.jsx(d.Icon,{size:"small",name:s})]}):r.jsxs("div",{className:de["support-item"],children:[e.image&&r.jsx("img",{src:e.image,alt:"",loading:"lazy"}),n==="payment"?r.jsx(Yt,{alt:s,src:`/assets/${s}.svg`,width:20,height:20}):r.jsx(d.Icon,{size:"small",name:s})]})},J_=({content:e,CONSTANTS:t})=>r.jsx("div",{className:de["support-container"],children:e==null?void 0:e.map((n,s)=>r.jsxs("div",{"data-device":n.device,className:de["support-section"],children:[r.jsxs("div",{className:de["support-text"],children:[n.title&&r.jsx("h3",{children:n.title}),n.description&&r.jsx("p",{children:n.description})]}),Array.isArray(n.items)&&n.items.length&&r.jsx("div",{className:de["support-items"],"data-gap":n.gap,children:n.items.map((o,a)=>r.jsx(Z_,{item:o,CONSTANTS:t},`footer-support-item-${a}`))})]},`footer-support-${s}`))}),eg=({name:e,nameIcon:t,maxWidth:n,rowAlignContent:s,columnAlignContent:o,columnAlignItems:a,textAlignContent:i,textAlignItems:c,children:l})=>r.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:s,alignItems:s},columnWrapper:{alignContent:o,alignItems:a}},children:r.jsxs(d.TextStructure.DivWrapper,{alignContent:i,alignItems:c,className:de.footer__column,children:[r.jsxs("div",{className:t?de.footer__columnTitleIcon:de.footer__columnTitle,children:[r.jsx(d.Icon,{name:`${t}`,size:"small"}),e&&r.jsx("div",{children:e})]}),r.jsx("div",{className:de.footer__columnContent,style:{maxWidth:`${n}px`},children:l})]})}),tg=({name:e,nameIcon:t,maxWidth:n,children:s,ICONS:o,...a})=>r.jsxs(d.Accordion.Wrapper,{className:de.accordionWrapper,title:"accordion-wrapper",...a,children:[r.jsx(d.Accordion.Header,{id:(a==null?void 0:a.id)??"",className:de.accordionHeader,closeIndicator:r.jsx(d.Icon,{name:o.arrow_up,size:"medium"}),openIndicator:r.jsx(d.Icon,{name:o.arrow_down,size:"medium"}),title:"accordion-header",children:r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{className:t?de.accordionTextWrapper:"",children:[r.jsx(d.Icon,{name:`${t}`,size:"medium"}),r.jsx("h2",{className:"typography-style-body-md",children:e})]})})}),r.jsx(d.Accordion.Body,{title:"accordion-body",children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:de.footer__columnContent,style:{maxWidth:`${n}px`},children:s})})})]}),Br=e=>{const{isMobile:t}=ne();return t?r.jsx(tg,{...e}):r.jsx(eg,{...e})},jn=({type:e,children:t,className:n,collumnName:s,collumnNameIcon:o,icons:a,iconLink:i,iconSize:c,link:l,paymentDisclaimer:u,paymentTitle:m,rowAlignContent:f,columnAlignContent:p,columnAlignItems:h,textAlignContent:_,textAlignItems:y,...x})=>{let b;const{handleSelectContent:C}=oe(),{nextimage:j}=ce();switch(e){case"menu":b=r.jsx(Me,{className:de.footer__itemLink,href:l??"#",prefetch:!1,children:r.jsx("span",{onClick:()=>{C({content:`footer:${s}:${t}`})},children:t})});break;case"payment":b=r.jsxs("div",{className:d.helpers.classNameConcat(de.payment,de.footer__itemSmallText),...x,children:[u,r.jsxs("div",{className:d.helpers.classNameConcat(de.footer__iconContainer,de.footer__iconListSubHeader),children:[m,r.jsx("div",{className:de.footer__iconList,children:a==null?void 0:a.map((v,P)=>r.jsx(j,{alt:v,src:`/assets/${v}.svg`,width:c??20,height:c??20},P))})]})]});break;case"social-media":b=r.jsx("div",{className:de.footer__iconContainer,...x,children:r.jsx("div",{className:de.footer__iconList,children:i==null?void 0:i.map((v,P)=>r.jsx(Me,{prefetch:!1,href:v.link??"#",target:"_blank",children:r.jsx(d.Icon,{size:"medium",name:v.icon,onClick:()=>C({content:`footer:redes-sociais:${v.icon}`})})},P))})});break;default:b=r.jsx("div",{className:n,...x,children:t})}return r.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:f,alignItems:f},columnWrapper:{alignContent:p,alignItems:h}},...x,children:r.jsx(d.TextStructure.DivWrapper,{alignContent:_,alignItems:y,className:d.helpers.classNameConcat(de.footer__item,n),children:b})})},ng=({className:e,text:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(de.footer__legalInformation,e),children:r.jsx("span",{children:t})}),Wu=()=>{const{nextimage:e}=ce();return r.jsx("div",{className:de["footer--stamps"],children:r.jsx(e,{alt:"Empresa B",className:de["footer--stamps--company"],src:"/images/Footer/new_certfB.png",width:56,height:64})})};Wu.displayName="Footer.Stamps";const Gu=({children:e,legalTextSlot:t,adornment:n,className:s,...o})=>{const{isMobile:a}=ne(),i=g.Children.toArray(e).filter(Boolean),c=i.length;return r.jsxs("div",{className:de.footer__main,children:[(n==null?void 0:n.top)&&r.jsx("div",{className:de.footer__top,children:n==null?void 0:n.top}),c>0&&r.jsx("div",{...o,className:d.helpers.classNameConcat(de.footer__wrapper,s),children:i.map((l,u)=>r.jsx("div",{style:{flexGrow:1,maxWidth:`calc(100% / ${a?1:"fit-content"})`},children:l},u))}),(n==null?void 0:n.bottom)&&r.jsx("div",{className:de.footer__bottom,children:n.bottom}),t&&r.jsx("div",{className:de.footer__legalText,children:t})]})};Gu.displayName="Footer.Wrapper";const Ku=({data:{links:{links:e}},payments:t,socialInfo:n,socialMedias:s,adornment:o,LEGAL_INFORMATION_TEXT:a,ICONS:i,className:c,hasFooterStamps:l})=>{var u;return r.jsxs(Gu,{className:c,adornment:o,legalTextSlot:r.jsx(ng,{text:a}),children:[Array.isArray(e.column)&&e.column.map((m,f)=>r.jsx(Br,{id:`${f}column-menu`,name:m.name,nameIcon:m.nameIcon,ICONS:i,children:m.items.map((p,h)=>r.jsx(jn,{type:"menu",link:p.link,collumnName:m.name,collumnNameIcon:m.nameIcon,children:p.text},h))},f)),t&&((u=t.acceptedFlags)==null?void 0:u.length)>0&&r.jsx(Br,{id:"payment-column",name:t==null?void 0:t.title,nameIcon:t==null?void 0:t.titleIcon,maxWidth:150,ICONS:i,children:r.jsx(jn,{type:"payment",paymentDisclaimer:t==null?void 0:t.text,paymentTitle:t==null?void 0:t.flagsTitle,iconSize:16,icons:t==null?void 0:t.acceptedFlags})}),r.jsxs(Br,{id:"social-media-column",name:n==null?void 0:n.title,ICONS:i,children:[n!=null&&n.subTitle?r.jsx(jn,{children:n==null?void 0:n.subTitle}):null,r.jsx(jn,{type:"social-media",iconSize:24,iconLink:s}),l&&r.jsx(Wu,{})]})]})};Ku.displayName="Footer";const rg=Object.freeze(Object.defineProperty({__proto__:null,Footer:Ku,FooterSupport:J_},Symbol.toStringTag,{value:"Module"})),sg=()=>{const{colorName:e}=Oe();return r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:e.length===0?"":T.styles["accessibility-info"],children:r.jsx("p",{children:e})})})},Qn=({className:e,titleId:t})=>{var o,a,i;const{productName:n,tag:s}=Oe();return r.jsxs("div",{className:d.helpers.classNameConcat(T.styles.header,e),children:[s!=null&&s.commercial?r.jsx(d.Tag,{size:"small",title:(o=s.commercial)==null?void 0:o.value,variant:"quaternary",adornment:{start:(a=s.commercial)!=null&&a.icon?r.jsx(d.Icon,{name:s.commercial.icon}):null},children:(i=s.commercial)==null?void 0:i.value}):null,r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h1",{id:t,children:n})})})]})};Qn.displayName="PDP.PDPHeader";const Ws=({layout:e="horizontal"})=>{const{price:t,listPrice:n,installments:s}=Oe(),{count:o,value:a}=s,i=T.formatPriceToCurrency(n??0,!0),c=T.formatPriceToCurrency(t??0,!0),l=T.formatPriceToCurrency(a??0);return r.jsx(d.ProductInfo.Root,{size:"small",layout:e,children:r.jsxs(d.ProductInfo.Wrapper,{layout:e,size:"small",className:T.styles["price-wrapper"],children:[r.jsx(d.ProductInfo.ValuesWrapper,{children:t!==n?r.jsxs(r.Fragment,{children:[r.jsx(d.ProductInfo.Price,{label:"originalPrice",value:i.toString(),size:"small"}),r.jsx(d.ProductInfo.Price,{label:"discountPrice",value:c.toString(),size:"small"})]}):r.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:c.toString(),size:"small"})}),o&&o>1&&a?r.jsx(d.ProductInfo.Price,{label:"installment",value:`ou ${o}x ${l}`,size:"small"}):null]})})},as=({onAddCallBack:e,onDisabledClickCallBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:s})=>{const o=en(),{productId:a,productData:i,price:c,listPrice:l,thumbImage:u,isKit:m}=Oe(),{isMobile:f}=ne(),{addToCart:p}=ve(),{sendDataLayerEvent:h}=oe(),_=!m&&(!o.sku||!o.available),y=()=>{if(_&&typeof t=="function"){t();return}typeof e=="function"&&e({id:o.sku,quantity:o.quantity,seller:o.sellerId,sku:a}),p({id:o.sku,quantity:o.quantity,seller:o.sellerId},{id:a,texture:u==null?void 0:u.imageUrl}),h({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...i,price:c,listPrice:l}]},supportData:{selectedSkus:[o]},customData:{quantity:o.quantity}}})};return r.jsx(d.Button,{className:T.styles["add-to-cart"],size:f?(n==null?void 0:n.mobile)??"large":(n==null?void 0:n.desktop)??"x-large",onClick:y,children:o.sku&&o.available?`${s.add_to_cart}`:`${s.select_size}`})},og=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t})=>{const{isMobile:n}=ne(),s=en(),{sizesContainerRef:o}=ja(),{structureRef:a}=Ee();return s.sku&&s.available?r.jsx(as,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t}):r.jsx(d.Button,{className:T.styles["add-to-cart"],size:n?(e==null?void 0:e.mobile)??"large":(e==null?void 0:e.desktop)??"x-large",onClick:()=>{o.current&&a.current&&window.document.body.scrollTo({top:o.current.offsetTop-a.current.offsetHeight,behavior:"smooth"})},children:s.sku&&s.available?t.add_to_cart:t.select_size})},Cn=({value:e,label:t,suppressHydrationWarning:n=!1},s)=>{const o={value:e,...n&&{suppressHydrationWarning:!0}},a=s==="compact"?o:{...o,label:t};return r.jsx(d.Timer.Digit,{...a})},An=({dateEnd:e,dateInit:t,type:n="default",TIME_ZONE:s,...o})=>{const[a,i]=g.useState(uc(new Gr.TZDate(Date.now(),s),new Gr.TZDate(e,s))),[c,l]=g.useState(!1);if(g.useEffect(()=>{l(!0);const h=setInterval(()=>{i(_=>_<=0?(clearInterval(h),0):_-1e3)},1e3);return()=>clearInterval(h)},[]),!c||a<=0)return r.jsx(r.Fragment,{});const u=Ht(a,"days"),m=Ht(a,"hours"),f=Ht(a,"minutes"),p=Ht(a);return r.jsxs(d.Timer.Root,{...o,children:[u?r.jsxs(r.Fragment,{children:[Cn({value:u,label:"dias"},n),r.jsx(d.Timer.Separator,{})]}):null,Cn({value:m,label:"horas"},n),r.jsx(d.Timer.Separator,{}),Cn({value:f,label:"min"},n),r.jsx(d.Timer.Separator,{}),Cn({value:p,label:"segs",suppressHydrationWarning:!0},n)]})},Gs=({TIME_ZONE:e})=>{const{tag:t}=Oe(),n=t==null?void 0:t.flagGoldenPdp,s=g.useMemo(()=>{var o;if((o=n==null?void 0:n.tagImage)!=null&&o.includes("player.vimeo")){const a=n.tagImage.split("?")[1],i=a==null?void 0:a.split("&"),c=i==null?void 0:i.filter(u=>u.includes("loc")||u.includes("signature")||u.includes("user_id")),l=c==null?void 0:c.join("&");return`${n.tagImage.split("?")[0]}?${l}`}return n==null?void 0:n.tagImage},[n==null?void 0:n.tagImage]);return n!=null&&n.enableTag?r.jsxs("div",{className:T.styles["golden-tag"],style:(n==null?void 0:n.backgroundSelect)==="color"?{backgroundColor:n==null?void 0:n.backgroundColor}:(n==null?void 0:n.backgroundSelect)==="image"?{backgroundImage:`url(${n==null?void 0:n.tagImage})`}:void 0,children:[(n==null?void 0:n.backgroundSelect)==="video"&&r.jsx("div",{className:T.styles["golden-tag-video"],children:r.jsx(Ie.Video,{src:s,autoPlay:!0,muted:!0,loop:!0,playsInline:!0})}),r.jsxs("div",{className:T.styles["golden-tag-content"],children:[r.jsx("span",{className:T.styles["golden-tag-content-text"],style:{color:n==null?void 0:n.textColor},children:n==null?void 0:n.value}),(n==null?void 0:n.countDownEndDate)&&r.jsx(An,{mode:n==null?void 0:n.timerMode,size:"x-small",type:"compact",dateEnd:new Date((n==null?void 0:n.countDownEndDate)??""),TIME_ZONE:e})]})]}):null};Gs.displayName="PDP.GoldenTag";const ag=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t,TIME_ZONE:n,Z_INDEX_WAR:s})=>{const{isMobile:o}=ne();return o?r.jsxs(d.Card,{className:T.styles["bottom-navigation"],shadow:!0,style:{zIndex:s.pdp_bottom_navigation},children:[r.jsxs("div",{className:T.styles["bottom-navigation__header"],children:[r.jsx(Gs,{TIME_ZONE:n}),r.jsxs("div",{className:T.styles["bottom-navigation__header-content"],children:[r.jsx(Qn,{}),r.jsx(Ws,{layout:"name-vertical"})]})]}),r.jsx(og,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t})]}):null},ig=({children:e,setShowBottomNavigation:t})=>{const n=g.useRef(null),s=hs(n),o=g.useRef(s);return g.useEffect(()=>{var i;const{top:a}=((i=n.current)==null?void 0:i.getBoundingClientRect())??{top:0};o.current!==s&&a>0&&(t(!s),o.current=s)},[s]),r.jsx("div",{ref:n,style:{width:"100%"},children:e})},cg=({ICONS:e})=>{const{isMobile:t}=ne(),{price:n,listPrice:s,productData:o,productId:a}=Oe(),{sendDataLayerEvent:i}=oe(),c=$t(),{toggleProduct:l}=Et();return r.jsx(d.Button,{adornment:{start:r.jsx(d.Icon,{name:e[c.includes(a)?"favorite_true":"favorite_false"],size:"medium"})},className:T.styles["add-to-wishlist"],size:t?"medium":"x-large",variant:"tertiary",onClick:()=>{l(a),i({functionKey:"productEvents",data:{event:c.includes(a)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:"PDP"},commonData:{...o,price:n,listPrice:s}}})}})},Xu=({showWishlist:e=!0,callBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:s,ICONS:o,TIME_ZONE:a,Z_INDEX_WAR:i})=>{const{isMobile:c}=ne(),[l,u]=g.useState(!0);return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:T.styles.actions,children:[c?r.jsx(ig,{setShowBottomNavigation:u,children:r.jsx(as,{onAddCallBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:s})}):r.jsx(as,{onAddCallBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:s}),e&&r.jsx(cg,{ICONS:o})]}),c&&l&&r.jsx(ag,{addToCartBtnSize:n,BUY_BUTTON_LABELS:s,Z_INDEX_WAR:i,TIME_ZONE:a})]})},Yu=({className:e,device:t,ICONS:n})=>{const{breadcrumbList:s,productName:o}=Oe(),a=i=>i.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return r.jsx(d.BreadCrumb.DivWrapper,{className:d.helpers.classNameConcat(T.styles.breadcrumb,[t==="mobile"?T.styles["breadcrumbs-mobile"]:T.styles["breadcrumbs-desktop"],e]),children:r.jsxs(d.BreadCrumb.List,{children:[Array.isArray(s)&&s.map((i,c)=>{const l=a(s.slice(0,c+1).map(u=>u.replace(/\s/g,"-").toLowerCase()).join("/"));return r.jsx(d.BreadCrumb.Item,{adornment:{end:r.jsx(d.Icon,{name:n.arrow_right})},role:"listitem",children:r.jsx(Me,{href:`/${l}`,children:i})},`pdp-breadcrumb-${l}-${c}`)}),r.jsx(d.BreadCrumb.Item,{role:"listitem",className:d.helpers.classNameConcat(T.styles["breadcrumb--active"],e),children:o},"pdp-breadcrumb-productName")]})})};Yu.displayName="PDP.BreadCrumb";const Qu=({className:e})=>{var s;const{tag:t}=Oe(),n=t==null?void 0:t.flagPdp;return n&&((s=n==null?void 0:n.value)!=null&&s.length)?r.jsx(d.Tag,{className:d.helpers.classNameConcat(T.styles.credits,e),variant:"tertiary",title:n==null?void 0:n.value,size:"small",adornment:{start:n!=null&&n.enableIcon&&(n!=null&&n.icon)?r.jsx(d.Icon,{name:n==null?void 0:n.icon,style:{color:n==null?void 0:n.iconColor}}):null},style:{background:n==null?void 0:n.tagColor,color:n==null?void 0:n.textColor},children:n==null?void 0:n.value}):r.jsx(r.Fragment,{})};Qu.displayName="PDPCredits";const lg=()=>{const{descriptionContent:e,productReference:t}=Oe(),[n,s]=g.useState("description");return r.jsxs(d.Tabs.Root,{className:T.styles["tabs-root-modifier"],children:[r.jsx(d.Tabs.TabList,{className:T.styles["tabs-list-modifier"],children:e==null?void 0:e.map(({label:o,value:a})=>r.jsx(d.Tabs.Item,{label:o,value:a,activeTab:n,onTabChange:s,size:"large",className:`${T.styles["tabs-item-modifier"]} ${n===a?T.styles["tabs-item-active"]:""}`},a))}),r.jsxs("div",{className:T.styles["content-wrapper"],children:[n==="description"?r.jsx("div",{children:r.jsxs("span",{className:T.styles.productref,children:["Ref:",t]})}):"",e==null?void 0:e.map(({value:o,content:a})=>n===o?r.jsx(d.Tabs.Panel,{className:`${T.styles["tabs-panel"]} ${n===o?T.styles["tabs-panel-enter"]:T.styles["tabs-panel-exit"]}`,children:r.jsx("div",{className:T.styles.content,dangerouslySetInnerHTML:{__html:a}})},o):null)]})]})},ug=({CURRENCY:e,DELIVERY_INFO_BOXES_ALLOWED:t,FREIGHT_CALCULATION:n,Z_INDEX_WAR:s})=>{const o=en(),{isMobile:a}=ne();return r.jsxs(r.Fragment,{children:[a?r.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null,r.jsx(_u,{skuId:o.available?o.sku:"",size:a?n.inputSize.mobile:n.inputSize.desktop,quantity:o.quantity,sellerId:o.sellerId,seller:o.sellerName,local:"PDP",CONSTANTS_PROPS:{freightConfig:n,deliveryInfoBoxesAllowed:t,toolTipZIndex:s.modal,currency:e}}),a?r.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null]})},ia=({image:e,index:t,handleZoom:n,PRODUCT_IMAGE_DIMENSIONS:s})=>{const o=T.resizingImg(e.imageUrl,s.pdp),{nextimage:a}=ce();return r.jsx(a,{src:o,alt:e.imageLabel,objectFit:"contain",...s.pdp,...t<=1&&{priority:!0,loading:"eager"},onClick:()=>{n(t)}},t)},dg=({video:e,productName:t,poster:n})=>{const{sendDataLayerEvent:s}=oe(),o=g.useRef(!1);return r.jsx(Ie.Video,{src:e,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,style:{zIndex:-1,aspectRatio:"2/3"},onPlaying:()=>{o.current||(o.current=!0,s({functionKey:"readyEvents",data:{event:"video_start",readyData:{product:t}}}))},poster:n})},Zu=({images:e,video:t,handleZoom:n,productName:s,PRODUCT_IMAGE_DIMENSIONS:o})=>{var u,m;const{initialize:a,pagination:i,controller:c,itemsStyles:l}=d.Carousel.useCarousel({gap:0,itemsPerPage:1,loop:!1,direction:"row"});return r.jsxs(d.Carousel.Root,{innerRef:f=>{a(f)},className:T.styles["gallery-carousel-modifier"],children:[r.jsx(d.Carousel.Controller,{position:"absolute",top:"24px",bottom:"unset",left:"16px",children:r.jsx(d.Carousel.Bullets,{page:i.currentPage,total:e.length,onBulletClick:f=>c==null?void 0:c.navigateTo(f)})}),r.jsxs(d.Carousel.Body,{children:[r.jsx(d.Carousel.Item,{style:l,children:r.jsx(ia,{image:e[0],index:0,handleZoom:n,PRODUCT_IMAGE_DIMENSIONS:o})},"PDP_gallery_0"),t&&r.jsx(d.Carousel.Item,{style:l,children:r.jsx(dg,{video:t,productName:s,...((u=e[1])==null?void 0:u.imageUrl)&&{poster:(m=e[1])==null?void 0:m.imageUrl}})},"PDP_gallery_video"),e.map((f,p)=>p===0?null:r.jsx(d.Carousel.Item,{style:l,children:r.jsx(ia,{image:f,index:p,handleZoom:n,PRODUCT_IMAGE_DIMENSIONS:o})},`PDP_gallery_${p}`))]})]})};Zu.displayName="PDP.Carousel";const mg="_thumbs_1fbzz_65",pg="_selected_1fbzz_93",fg="_carousel_1fbzz_162",hg="_bullets_1fbzz_199",Se={"image-zoom-wrapper-desktop":"_image-zoom-wrapper-desktop_1fbzz_1","button-close-container":"_button-close-container_1fbzz_10","button-close":"_button-close_1fbzz_10","main-image-container":"_main-image-container_1fbzz_22","image-desktop":"_image-desktop_1fbzz_52",thumbs:mg,selected:pg,"image-zoom-wrapper-mobile":"_image-zoom-wrapper-mobile_1fbzz_115","image-mobile":"_image-mobile_1fbzz_145","image-zoom--image":"_image-zoom--image_1fbzz_159",carousel:fg,"carousel-controller":"_carousel-controller_1fbzz_167","arrow-left":"_arrow-left_1fbzz_177","arrow-right":"_arrow-right_1fbzz_178",bullets:hg,"zoom-popup":"_zoom-popup_1fbzz_210","image-zoom--mobile":"_image-zoom--mobile_1fbzz_250","image-zoom--image--img":"_image-zoom--image--img_1fbzz_280"},ca=({onClose:e,ICONS:t})=>r.jsx("div",{className:`${Se["button-close-container"]}`,children:r.jsx(d.Button,{iconNameStart:t.close,iconSize:"medium",className:`${Se["button-close"]}`,variant:"tertiary",state:"default",size:"medium",onClick:e,style:{textDecoration:"none"}})}),_g=({children:e,Z_INDEX_WAR:t,...n})=>r.jsx("div",{...n,className:Se["image-zoom-wrapper-desktop"],style:{zIndex:t.pdp_image_zoom},children:e}),Ju=({images:e,setCurrent:t,setFirstImgLoaded:n,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o})=>{const{nextimage:a}=ce();let i=null;const c=g.useRef(null),{initialize:l,controller:u,pagination:m,itemsStyles:f}=d.Carousel.useCarousel({itemsPerPage:1,gap:10,loop:!1,direction:"row"}),p=_=>{u==null||u.navigateTo(_)},h=()=>{n(!0)};return g.useEffect(()=>{t(m.currentPage)},[m.currentPage,t]),r.jsxs(d.Carousel.Root,{innerRef:_=>{_&&!i&&(i=_,l(i))},className:Se.carousel,children:[r.jsxs(d.Carousel.Controller,{className:Se["carousel-controller"],children:[r.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.prevPage(),className:Se["arrow-left"],adornment:{start:r.jsx(d.Icon,{name:s.arrow_left})}}),r.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.nextPage(),className:Se["arrow-right"],adornment:{start:r.jsx(d.Icon,{name:s.arrow_right})}})]}),r.jsx(d.Carousel.Body,{children:Array.isArray(e)&&e.map((_,y)=>r.jsx(d.Carousel.Item,{style:f,children:r.jsx(a,{...o.image_zoom.mobile,...y===0&&{priority:!0,loading:"eager"},ref:c,className:Se.imageMobile,src:_.imageUrl,alt:_.imageText,quality:100,...y===0&&{onLoad:h}})},y))}),r.jsx(d.Carousel.Bullets,{className:Se.bullets,page:m.currentPage,total:m.totalPages,onBulletClick:p})]})};Ju.displayName="ImageZoom.Mobile.Carousel";const ed=({imgRef:e,image:t,PRODUCT_IMAGE_DIMENSIONS:n})=>{Ra();const{nextimage:s}=ce();return r.jsx("div",{className:Se["image-zoom--image"],ref:e,children:r.jsx(s,{...n.image_zoom.mobile,alt:t.imageText,className:Se["image-zoom--image--img"],quality:100,src:t.imageUrl})})};ed.displayName="ImageZoom.ImageZoom";const td=({loaded:e=!1})=>r.jsx("div",{className:Se["zoom-popup"],"data-loaded":e,children:r.jsxs("svg",{width:"38",height:"39",viewBox:"0 0 38 39",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.93 5.382a3.711 3.711 0 0 1 2.55-1.007c.949 0 1.864.36 2.549 1.007a3.534 3.534 0 0 1 1.113 2.472v11.357l10.118 3.332c.587.193 1.1.56 1.465 1.053.366.494.565 1.089.566 1.7v.004c0 .22-.025.44-.075.653v.005l-2.98 12.52a.625.625 0 0 1-1.215-.29l2.977-12.515v-.002c.029-.122.043-.247.044-.372a1.619 1.619 0 0 0-.321-.958 1.729 1.729 0 0 0-.851-.61L24.32 20.257a.625.625 0 0 1-.43-.594V7.88a2.285 2.285 0 0 0-.72-1.59 2.462 2.462 0 0 0-1.691-.665c-.635 0-1.241.24-1.69.666a2.285 2.285 0 0 0-.722 1.59v19.04a.625.625 0 0 1-1.115.388l-.056-.071-.161-.202a178.922 178.922 0 0 0-2.333-2.858l-.002-.002a2.581 2.581 0 0 0-.897-.69 2.677 2.677 0 0 0-1.122-.25H12.37c-.307 0-.61.078-.874.225a1.712 1.712 0 0 0-.635.61 1.625 1.625 0 0 0-.016 1.653l7.128 12.296a.625.625 0 0 1-1.082.627L9.762 26.35a2.876 2.876 0 0 1 .027-2.924 2.962 2.962 0 0 1 1.098-1.057 3.05 3.05 0 0 1 1.482-.384h1.016c.57.002 1.133.127 1.648.368.515.24.97.59 1.33 1.024.514.614 1.026 1.239 1.455 1.768V7.855a3.535 3.535 0 0 1 1.113-2.473ZM6.446 10.22a.625.625 0 0 1 0 .884l-5.324 5.324a.625.625 0 0 1-.884-.884l5.324-5.324a.625.625 0 0 1 .884 0Z"}),r.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.68 12.033c.345 0 .625.28.625.625v2.703h2.702a.625.625 0 1 1 0 1.25H.68a.625.625 0 0 1-.625-.625v-3.328c0-.345.28-.625.625-.625ZM16.429.237a.625.625 0 0 1 0 .884l-5.325 5.324a.625.625 0 0 1-.884-.883L15.545.237a.625.625 0 0 1 .884 0Z"}),r.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.034.68c0-.346.28-.626.625-.626h3.328c.345 0 .625.28.625.625v3.328a.625.625 0 1 1-1.25 0V1.304h-2.703a.625.625 0 0 1-.625-.625Z"})]})});td.displayName="ImageZoom.ZoomPopup";const nd=({images:e,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:n,...s})=>{const[o,a]=g.useState(!1),[i,c]=g.useState(0),{containerRef:l,imgRef:u,scale:m}=Aa({defaultScale:1,maxScale:3});return r.jsxs("div",{...s,className:Se["image-mobile"],"data-disable-carrousel-pan":m>1,children:[r.jsx(td,{loaded:o}),r.jsx(Ju,{images:e,setCurrent:c,setFirstImgLoaded:a,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:n}),r.jsx("div",{className:Se["image-zoom--mobile"],ref:l,children:r.jsx(ed,{imgRef:u,image:e[i],PRODUCT_IMAGE_DIMENSIONS:n})})]})};nd.displayName="ImageZoom.ImageMobile";const gg=({children:e,Z_INDEX_WAR:t,...n})=>r.jsx("div",{...n,className:Se["image-zoom-wrapper-mobile"],style:{zIndex:t.pdp_image_zoom},children:e}),yg="_modal_1u87b_1",nt={modal:yg,"quick-shop__modal":"_quick-shop__modal_1u87b_4","shop-bag":"_shop-bag_1u87b_9","modal-product-body":"_modal-product-body_1u87b_25","pdp-main__info-modifier":"_pdp-main__info-modifier_1u87b_32","modal-header":"_modal-header_1u87b_38","modal-header__title":"_modal-header__title_1u87b_41"};function xg({headerTitle:e,isMobile:t,ICONS:n}){return r.jsx(d.Modal.Header,{navigation:"top",className:nt["modal-header"],children:r.jsxs(d.Modal.Controls,{navigation:"top",isMobile:t,children:[r.jsx("div",{className:nt["modal-header__title"],children:r.jsx(d.Modal.Title,{navigation:"top",className:nt["quick-shop__title"],title:e})}),r.jsx(d.Button,{className:nt["modal-header__close-button"],"data-close":!0,iconNameStart:n.close,size:"small",variant:"tertiary"})]})})}const rd=({PDP_INFO:e,PLP_SIZE_ORDER:t,ICONS:n,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:i})=>{const{sizes:c,productId:l,handleViewItemEvent:u}=Oe(),m=g.useMemo(()=>c!=null&&c.length?rl({items:c,getLabel:v=>v.value,PLP_SIZE_ORDER:t}):[],[c]),{sizesContainerRef:f}=ja(),{isMobile:p}=ne(),h=en(),_=pi(),{setValue:y}=ui(),{setValue:x}=bs(),b=g.useRef({}),[C,j]=g.useState(null);return r.jsxs("div",{ref:f,className:d.helpers.classNameConcat(T.styles.sizes,"PDP_sizes"),children:[r.jsx("span",{className:T.styles["sections-title"],children:e.product.size_title}),r.jsx("div",{children:m.map(v=>(!v.available&&!b.current[v.value]&&(b.current[v.value]={disable:!v.available,size:v.value,skuID:v.sku}),r.jsxs(d.ToggleSize.Wrapper,{size:p?"medium":"large",title:v.value,outOfStock:!v.available,onClick:()=>{v.available||(j({skuID:v.sku,size:v.value,disable:!0}),x(!0)),h.sku!==v.sku&&(y({...h,productId:l,name:v.name,size:v.value,sku:v.sku,sellerId:v.sellerId,sellerName:v.sellerName,available:v.available}),u({sku:v.sku,size:v.value}))},active:h.sku===v.sku,children:[r.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),r.jsx(d.ToggleSize.Text,{children:v==null?void 0:v.value})]},`sizes-${v.sku}-${v.value}`)))}),r.jsx(Ls,{open:_,setVisible:x,sku:C,setSku:j,skus:Object.values(b.current),ICONS:n,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:i})]})},qt=({children:e,className:t,type:n})=>r.jsx("div",{className:d.helpers.classNameConcat(T.styles["pdp-main__info-subsection"],[T.styles[`subsection-${n}`],t]),children:e}),sd=({children:e,className:t})=>{const{structureRef:n,tipbarRef:s}=Ee(),o=g.useMemo(()=>{var c,l;const a=((c=n.current)==null?void 0:c.clientHeight)||0,i=((l=s.current)==null?void 0:l.clientHeight)||0;return a+i},[n,s]);return r.jsx("div",{className:d.helpers.classNameConcat(T.styles["pdp-main__info"],t),id:"pdpmaininfo",style:{top:o},children:e})},vg=({children:e,link:t,TOGGLE_STYLE_MODIFIER:n})=>{const{isMobile:s}=ne(),{router:o}=ce(),a=()=>{t&&o.push(t)},i=g.useRef(null);return r.jsx(d.ToggleStyle.Wrapper,{size:s?"medium":"small",style:{...n,border:`${i.current===t?"2":"1"}`,overflow:"hidden",padding:"0"},onClick:a,active:i.current===t,children:e})},od=({productId:e,similars:t,TOGGLE_STYLE_MODIFIER:n})=>{const{thumbImage:s}=Oe(),o=[{productId:e,slug:"",textureImage:(s==null?void 0:s.imageUrl)??"",textureAlt:(s==null?void 0:s.imageText)??""},...t];return r.jsx("div",{children:o.map((a,i)=>a.textureImage?r.jsxs(vg,{link:a.slug?a.slug:null,TOGGLE_STYLE_MODIFIER:n,children:[r.jsx(d.ToggleStyle.DisabledAdornment,{}),r.jsx(d.ToggleStyle.Texture,{children:r.jsx(Ie.Image,{alt:a.textureAlt,src:a.textureImage,height:34,width:34,style:{borderRadius:0,height:"100%"}})})]},`similars-item-${i}`):null)})},ad=({TEXTURE_IMAGE:e,TOGGLE_STYLE_MODIFIER:t})=>{const{productId:n}=Oe(),[s,o]=g.useState([]),a=new Map;return g.useEffect(()=>{if(n){if(a.has(n)){o(a.get(n));return}fetch("/api/catalog/product/similars",{method:"POST",body:JSON.stringify({productId:n,filterTexture:e})}).then(i=>i.json()).then(({data:i})=>{Array.isArray(i)&&i.length===0||(a.set(n,i),o(i))}).catch(i=>{console.error(i)})}},[n]),r.jsxs("div",{className:T.styles.similars,children:[r.jsx("span",{className:T.styles["sections-title"],children:"Cor"}),r.jsx(od,{productId:n,similars:s,TOGGLE_STYLE_MODIFIER:t})]})};ad.displayName="PDP.Info.Similars";const bg=({callBackProductAdded:e,BUY_BUTTON_LABELS:t,ICONS:n,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PDP_INFO:a,PLP_SIZE_ORDER:i,PRODUCT_CARD_TEXTS:c,TEXTURE_IMAGE:l,TIME_ZONE:u,TOGGLE_STYLE_MODIFIER:m,Z_INDEX_WAR:f})=>r.jsx(d.Modal.Body,{className:nt["modal-product-body"],children:r.jsxs(sd,{className:nt["pdp-main__info-modifier"],children:[r.jsxs(qt,{type:"product-info",children:[r.jsx(Qn,{}),r.jsx(Ws,{})]}),r.jsx(qt,{type:"similars",children:r.jsx(ad,{TEXTURE_IMAGE:l,TOGGLE_STYLE_MODIFIER:m})}),r.jsx(qt,{type:"sizes",children:r.jsx(rd,{ICONS:n,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PDP_INFO:a,PLP_SIZE_ORDER:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:f})}),r.jsx(qt,{type:"actions",children:r.jsx(Xu,{showWishlist:!1,callBack:e,addToCartBtnSize:{mobile:"medium",desktop:"large"},BUY_BUTTON_LABELS:t,ICONS:n,TIME_ZONE:u,Z_INDEX_WAR:f})})]})});function jg({callBackProductAdded:e,QUICKSHOP:t,ICONS:n,...s}){const[o,a]=g.useState(!1),i=()=>a(c=>!c);return r.jsxs("div",{className:nt["quick-shop"],children:[r.jsx(d.Button,{onClick:i,size:"x-large",className:nt["shop-bag"],iconNameStart:n.bag,iconSize:"medium"}),r.jsxs(d.Modal.Root,{isOpen:o,setIsOpen:a,className:`${nt.modal} ${nt["quick-shop__modal"]}`,style:{position:"fixed",height:"100svh",width:"100%",top:0,zIndex:1e3,bottom:"unset",overflowY:"hidden"},variant:"sideRight",children:[r.jsx(xg,{headerTitle:t.title,ICONS:n}),r.jsx(bg,{callBackProductAdded:e,ICONS:n,...s})]})]})}const Cg=({image:e})=>r.jsx(Yt,{src:T.resizingImg(e.imageUrl,{width:50,height:75})||"",alt:e.imageText,className:Se.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:10,style:{position:"absolute",inset:0,filter:"blur(10px)"}}),Sg=({images:e,selectedImageIndex:t,PRODUCT_IMAGE_DIMENSIONS:n,...s})=>{const[o,a]=g.useState(!1),{nextimage:i}=ce();return r.jsx("div",{...s,className:Se["main-image-container"],children:r.jsxs("div",{className:Se["image-desktop"],children:[!o&&r.jsx(Cg,{image:e==null?void 0:e[t]}),r.jsx(i,{src:T.resizingImg(e==null?void 0:e[t].imageUrl,{...n.image_zoom.desktop})||"",alt:e==null?void 0:e[t].imageText,className:Se.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:100,onLoad:()=>{a(!0)}})]})})},Eg=({images:e,onThumbnailClick:t,selectedImageIndex:n})=>{const{nextimage:s}=ce();return r.jsx("div",{className:Se.thumbs,children:e.map((o,a)=>r.jsx("div",{role:"button",tabIndex:0,onClick:()=>t(a),onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&t(a)},className:a===n?Se.selected:"",children:r.jsx(s,{src:o.imageUrl,alt:o.imageText,layout:"responsive",width:100,height:100,objectFit:"cover",priority:!1})},a))})},id=({images:e,initialSelectedImageIndex:t=0,setShowImageZoom:n,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o,Z_INDEX_WAR:a,...i})=>{const{isMobile:c}=ne(),[l,u]=g.useState(t),m=f=>{u(f)};return c?r.jsxs(gg,{Z_INDEX_WAR:a,children:[r.jsx(ca,{onClose:()=>n({show:!1,initialIndex:0}),ICONS:s}),r.jsx(nd,{images:e,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o})]}):r.jsxs(_g,{Z_INDEX_WAR:a,children:[r.jsx(ca,{onClose:()=>n({show:!1,initialIndex:0}),ICONS:s}),r.jsx(Sg,{images:e,selectedImageIndex:l,onThumbnailClick:m,PRODUCT_IMAGE_DIMENSIONS:o},e[l].imageId??`${e[l].imageText}-${l}`),r.jsx(Eg,{images:e,selectedImageIndex:l,onThumbnailClick:m}),r.jsx(jg,{callBackProductAdded:()=>{n({initialIndex:0,show:!1})},ICONS:s,Z_INDEX_WAR:a,...i})]})};id.displayName="ImageZoom";const Pg=({productImgs:e,PRODUCT_IMAGE_DIMENSIONS:t,...n})=>{const{video:s,productName:o}=Oe(),[a,i]=g.useState({show:!1,initialIndex:0});g.useEffect(()=>(a.show?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll"),()=>{document.body.classList.remove("no-scroll")}),[a]);const c=l=>{i({show:!0,initialIndex:l})};return r.jsxs(r.Fragment,{children:[r.jsx(Zu,{images:e,video:s,handleZoom:c,productName:o,PRODUCT_IMAGE_DIMENSIONS:t}),a.show&&r.jsx(id,{images:e,initialSelectedImageIndex:a.initialIndex,setShowImageZoom:i,PRODUCT_IMAGE_DIMENSIONS:t,...n})]})},cd=({TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...n})=>{const{images:s}=Oe(),o=g.useMemo(()=>{const a=s.filter(i=>!e.includes(i.imageLabel));return a.length>0?a:s},[]);return r.jsx(Pg,{productImgs:o,TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...n})};cd.displayName="PDP.Gallery";const Ng=({className:e,hasIcons:t=!0,ICONS:n,PDP_INFO:s})=>{const{allSizesAvailable:o,productId:a}=Oe(),{setValue:i}=bs(),{sendDataLayerEvent:c}=oe();return r.jsx("div",{className:d.helpers.classNameConcat(T.styles.links,e),id:"pdp-container","data-product-id":a,children:r.jsxs("div",{className:T.styles["links-wrapper"],children:[!o&&r.jsx(d.Button,{adornment:t?{start:r.jsx(d.Icon,{name:n.product})}:{},size:"x-small",variant:"tertiary",onClick:()=>i(!0),underline:!0,children:s.links_and_stepper.size_out_of_stock}),r.jsx(d.Button,{adornment:t?{start:r.jsx(d.Icon,{name:n.ruler})}:{},size:"x-small",variant:"tertiary",underline:!0,onClick:()=>{var l,u;(u=window.SizebayParams)==null||u.openChart((l=window.SizebayParams)==null?void 0:l.id),c({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:"pdp:guia-de-medidas"}}})},children:s.links_and_stepper.size_table_title}),r.jsx(d.Button,{size:"x-small",variant:"tertiary",className:"sizebay",underline:!0,onClick:()=>{var l,u;return(u=window.SizebayParams)==null?void 0:u.openVFR((l=window.SizebayParams)==null?void 0:l.id)},children:s.links_and_stepper.sizebay})]})})},Ig=({children:e})=>r.jsx("div",{className:T.styles["pdp-main__info-main-content"],children:e}),wg=({head:e,className:t})=>r.jsx("thead",{className:t,children:r.jsx("tr",{children:e.map((n,s)=>r.jsx("th",{children:n},`head-title-${s}`))})}),Rg=({rows:e,className:t})=>r.jsx("tbody",{className:t,children:e.map((n,s)=>r.jsx("tr",{children:n.map(o=>typeof o=="string"&&o.includes("blocks")?JSON.parse(o).blocks.map(a=>`${a.text}
18
- `):o).map((o,a)=>r.jsx("td",{children:o},`cell-content-${a}`))},`row-content-${s}`))}),Ag="_tableContainer_1yxy2_1",Tg={tableContainer:Ag},Lg=({children:e,className:t=""})=>r.jsx("table",{className:`${Tg.tableContainer} ${t}`,children:e}),Ur={Head:wg,Rows:Rg,Root:Lg},Og=({title:e,text:t})=>r.jsxs("p",{className:T.styles.measurementRowsText,children:[r.jsx("h1",{className:T.styles.measurementRowsTitle,children:e}),t]}),kg=({ICONS:e,SIZES:t,Z_INDEX_WAR:n})=>{const s=_i(),{setValue:o}=gi();return r.jsx(d.Modal.Root,{isMobile:!0,style:{zIndex:n.modal},setIsOpen:o,isOpen:s,className:T.styles.measurementModal,children:r.jsx(d.Modal.Body,{children:r.jsxs("div",{className:T.styles.measurementContainer,children:[r.jsx("h1",{className:T.styles.measurementTitle,children:t.title}),r.jsxs("div",{className:T.styles.measurementContent,children:[r.jsx("div",{className:T.styles.measurementImageContainer,children:r.jsx(Yt,{width:264,height:402,alt:"",className:T.styles.measurementImage,src:t.bannerImage})}),r.jsxs(Ur.Root,{className:T.styles.measurementTable,children:[r.jsx(Ur.Head,{className:T.styles.measurementHead,head:t.head}),r.jsx(Ur.Rows,{className:T.styles.measurementRows,rows:t.rows.map((a,i)=>[r.jsx(Og,{title:t.descriptions[i].title,text:t.descriptions[i].text},i),...a])})]})]}),r.jsx(d.Button,{onClick:()=>o(!1),className:T.styles.measurementClose,variant:"tertiary",children:r.jsx(d.Icon,{name:e.close})})]})})},"minicart")},Dg=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(T.styles["pdp-main__gallery-wrapper"],t),...n,children:e}),Mg=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(T.styles.pdp,t),...n,children:e}),$g=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(T.styles["pdp-main"],t),...n,children:e}),zg=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(T.styles["pdp-main__info-secondary-content"],t),...n,children:e}),Fg={gallery:Dg,pdp:Mg,main:$g,secondary:zg},Bg=({className:e,...t})=>r.jsx(d.Utils.Divider,{...t,className:d.helpers.classNameConcat(T.styles.divider,e)}),Ug=Object.freeze(Object.defineProperty({__proto__:null,AccessibilityInfo:sg,Actions:Xu,BreadCrumb:Yu,Credits:Qu,DescriptionsTabs:lg,Divider:Bg,Freight:ug,Gallery:cd,GoldenTag:Gs,Header:Qn,Links:Ng,MainContent:Ig,MainInfo:sd,Price:Ws,ProductMeasurements:kg,SimilarsItems:od,Sizes:rd,SubSectionWrapper:qt,containers:Fg},Symbol.toStringTag,{value:"Module"})),Hg=(e,t)=>{const[n,s]=Pu({items:e}),[o,a]=t.split(":").map(Number);return isNaN(o)||isNaN(a)?[n,s]:[n<o?n:o,s>a?s:a]},qg=()=>{var S;const{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:n,PLP_FILTERS_EMPTY:s,PLP_FILTERS_TITLE:o,PLP_SIZE_ORDER:a}=De(),[i,c]=g.useState("10000:0"),{isMobile:l}=ne(),{sendDataLayerEvent:u}=oe(),{openFilters:m,setOpenFilters:f}=ws(),{state:p}=ze(),{breadcrumb:h,deleteAllFacets:_,isLoading:y=!1,facets:x,onToggleFacet:b,selectedFacets:C}=_c.contexts.searchFacets.hook(),j=g.useRef(""),v={isLast:!0,href:(S=p.term)!=null&&S.length?`/${p.term}`:"",name:p.term},P=T.filterNonRootFacets(C,p==null?void 0:p.base);return g.useEffect(()=>{const E=x.find(({key:I})=>I==="price");if(E){const[I,A]=Hg(E.values,i??"10000:0");c(`${I}:${A}`)}},[x,i,c]),g.useEffect(()=>{if(!P.length)return;const E=JSON.stringify(P);j.current!==E&&(j.current=E,u({functionKey:"filterEvent",data:{commonData:{selectedFacets:P}}}))},[P]),r.jsxs(In.teamComponents.Filter.Root,{CONSTANTS:{ICONS:e,PLP_FILTERS_TITLE:o,PLP_FILTERS:t},breadcrumb:h.length?h:[v],deleteAllFacets:_,filters:{facets:T.filterNonCategorySelected(x,p==null?void 0:p.base),selected:P},isMobile:l??!1,isLoading:y,isOpen:m,price:i,onToggleFacet:b,setIsOpen:f,target:document.body,children:[r.jsx(In.teamComponents.Filter.Selected,{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:n}),r.jsx(In.teamComponents.Filter.Content,{columns:2,CONSTANTS:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:n,PLP_FILTERS_EMPTY:s,PLP_SIZE_ORDER:a}})]})},ld=()=>typeof document>"u"?null:r.jsx(qg,{});ld.displayName="Filters";const Ks=({total:e=0})=>{const{SEARCH_TOTAL_PORTAL_ID:t}=De();if(typeof window>"u")return null;const n=document.getElementById(t);return n?ps.createPortal(r.jsxs("span",{children:["[",e,"] produto",e>1?"s":""]}),n):null};Ks.displayName="PDC.Grid.NavigationTotal";const Vg=({productCount:e,PLP_GRID_SCROLL_BACK:t})=>{g.useEffect(()=>{var a;const s=new URLSearchParams(window.location.search).get("page");if(e){const[i,c]=((a=sessionStorage.getItem(t.key))==null?void 0:a.split("-"))??["0",null],l=sessionStorage.getItem(t.refer);i&&l==="true"&&(c===(s||"null")&&window.document.body.scrollTo({top:parseInt(i,10),behavior:"smooth"}),sessionStorage.setItem(t.refer,"false"))}const o=()=>{e>0&&window.document.body.scrollTop&&sessionStorage.setItem(t.key,`${window.document.body.scrollTop.toString()}-${s}`)};return window.document.body.addEventListener("scroll",o,{passive:!0}),()=>{window.document.body.removeEventListener("scroll",o)}},[e])},Wg=()=>{const{isMobile:e}=ne(),{isLoading:t,products:n,total:s}=tn(),o=De();return Vg({productCount:n.length,PLP_GRID_SCROLL_BACK:o.PLP_GRID_SCROLL_BACK}),r.jsxs(r.Fragment,{children:[r.jsx(tt.Products,{isMobile:e??!1,items:n,...o}),!n.length&&!t&&r.jsx(tt.Empty,{ICONS:o.ICONS,PLP_NOT_RESULT:o.PLP_NOT_RESULT}),r.jsx(Ks,{total:s})]})},ud=({infinite:e=!1})=>r.jsx("div",{className:Ke["pdc--grid"],children:r.jsx("div",{className:Ke["pdc--grid--content"],children:e?r.jsx(tt.InfiniteScroller,{}):r.jsx(Wg,{})})});ud.displayName="Grid";const Nt=e=>({centro:"center",esquerda:"start",direita:"end"})[e],dd=({children:e,contentState:t,entityKey:n})=>{const{url:s}=t.getEntity(n).getData();return s?r.jsx(Me,{href:s,children:e}):e},Gg=(e,t,n)=>{e.findEntityRanges(s=>{const o=s.getEntity();return o===null?!1:n.getEntity(o).getType()==="LINK"},t)},Tn=e=>{const t=new Ze.CompositeDecorator([{strategy:Gg,component:dd}]),n=Ze.convertFromRaw(e);return Ze.EditorState.createWithContent(n,t)},Kg=e=>Ze.convertFromRaw(e),Ln=Ze.DefaultDraftBlockRenderMap.set("unstyled",{element:"div",aliasedElements:["div"]}),la="superior-direita",Sn="dentro-inferior-centro",Xg="inferior-direita",Hr="dentro-inferior-esquerda",md=e=>({position:e===Sn||e===Hr?"absolute":"default",shouldRender:[la,Sn,Hr].includes(e)?"top":"bottom",alignItems:[Sn].includes(e)?"center":[la,Xg].includes(e)?"flex-end":"flex-start",left:e===Hr?"16px":e===Sn?"45%":"unset"}),Yg=Object.freeze(Object.defineProperty({__proto__:null,CREATE_CONTENT:Tn,EXTENDED_BLOCK_RENDER_MAP:Ln,GET_CONTENT_STATE:Kg,controllersPositionsAdapter:md},Symbol.toStringTag,{value:"Module"})),Qg=({expanded:e,content:t})=>r.jsxs("details",{open:e,children:[t.textStructureReduced?r.jsx("summary",{onClick:n=>n.preventDefault(),children:r.jsx(Ze.Editor,{editorKey:"draft-editor-1",blockRenderMap:Ln,editorState:t!=null&&t.textStructureReduced?Tn(JSON.parse(t.textStructureReduced)):Ze.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):r.jsx(r.Fragment,{}),t.showTextStructureExpander&&t.textStructure?r.jsx(r.Fragment,{children:r.jsx(Ze.Editor,{editorKey:"draft-editor-1",blockRenderMap:Ln,editorState:t.textStructure?Tn(JSON.parse(t.textStructure)):Ze.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):r.jsx(r.Fragment,{})]}),Zg="_textContentWrapper_1bigo_5",Jg="_textContentSection_1bigo_13",is={"link-modifier":"_link-modifier_1bigo_1",textContentWrapper:Zg,textContentSection:Jg},pd=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:n})=>{var a;const[s,o]=g.useState(!1);return r.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:Nt(e.textStructureAlignment),alignItems:Nt(e.textStructureAlignment)},columnWrapper:{alignContent:Nt(e.textStructureAlignment),alignItems:Nt(e.textStructureAlignment)}},adornment:{bottom:e.showTextStructureExpander&&e.textStructure?r.jsx(d.Button,{variant:"tertiary",adornment:{end:r.jsx(d.Icon,{name:s?`${t.arrow_up}`:`${t.arrow_down}`})},onClick:()=>o(i=>!i),size:"small",children:s?(n==null?void 0:n.less)??"Ver Menos":(n==null?void 0:n.more)??"Ver Mais"}):r.jsx(r.Fragment,{})},children:r.jsxs(d.Utils.Column,{className:is.textContentWrapper,style:{alignItems:Nt(e.textStructureAlignment)},children:[r.jsx(d.TextStructure.DivWrapper,{style:{textAlign:Nt(e.textStructureAlignment)},mode:e.textStructureMode??"default",children:e.textStructureReduced?r.jsx(Qg,{content:e,expanded:s}):r.jsx(r.Fragment,{})}),e.textStructureButtonLabel?r.jsx($e,{mode:e.textStructureMode??"default",href:e.textStructureButtonHref??"#",size:e.textStructureButtonSize,className:is["link-modifier"],adornments:(a=e.textStructureButtonIcon)!=null&&a.length&&e.enableIcon?{end:r.jsx(d.Icon,{name:e.textStructureButtonIcon})}:void 0,children:e.textStructureButtonLabel}):r.jsx(r.Fragment,{})]})})},ey=e=>({centro:{verticalAlignment:"center",horizontalAlignment:"center"},"centro-esquerda":{verticalAlignment:"center",horizontalAlignment:"start"},"centro-direita":{verticalAlignment:"center",horizontalAlignment:"end"},"superior-centro":{verticalAlignment:"start",horizontalAlignment:"center"},"superior-esquerda":{verticalAlignment:"start",horizontalAlignment:"start"},"superior-direita":{verticalAlignment:"start",horizontalAlignment:"end"},"inferior-centro":{verticalAlignment:"end",horizontalAlignment:"center"},"inferior-esquerda":{verticalAlignment:"end",horizontalAlignment:"start"},"inferior-direita":{verticalAlignment:"end",horizontalAlignment:"end"}})[e],ua=e=>({centro:"center",esquerda:"start",direita:"end"})[e],da={"content-modifier":"_content-modifier_16y4u_5","banner-image-wrapper-modifier":"_banner-image-wrapper-modifier_16y4u_13"},ma=({data:e,videoUrl:t,priority:n,videoRef:s,ICONS:o,TEXTCONTENT_EXPANDED:a,TIME_ZONE:i,className:c,...l})=>{const{video:u,image:m,imageHref:f,imageOpacity:p,altImage:h,backgroundColor:_,position:y,contentAlignment:x,showTimer:b,contentOrder:C,timerMode:j,timerEnd:v,timerInit:P,textStructure:S,textStructureReduced:E}=e.banner,I=(f==null?void 0:f.trim())||(m==null?void 0:m.trim())||null,{nextimage:A}=ce();return r.jsxs(d.Banner.Container,{...l,children:[r.jsxs(d.Banner.ImageWrapper,{className:da["banner-image-wrapper-modifier"],style:p?{background:_}:void 0,children:[u&&r.jsx(Ie.Video,{videoRef:s,src:t,autoPlay:n,loop:!0,playsInline:!0,muted:!0}),I&&!(u!=null&&u.length)&&r.jsx(A,{src:I,width:"1920",height:"1080",alt:h??m??"",...n?{priority:n}:{},style:p?{opacity:"0"}:void 0}),!m&&!(u!=null&&u.length)&&r.jsx("div",{style:{background:_}})]}),b||E||S?r.jsx(d.Banner.Slot,{...ey(y??"centro"),className:d.helpers.classNameConcat(da["content-modifier"],c),style:{textAlign:ua(x)},children:r.jsxs(d.Utils.Column,{gap:"16px",alignItems:ua(x),children:[b&&C==="timer-first"&&r.jsx(An,{mode:j??"default",size:"small",dateEnd:v?new Date(v):new Date,dateInit:P?new Date(P):new Date,TIME_ZONE:i}),r.jsx(pd,{data:e.banner,ICONS:o,TEXTCONTENT_EXPANDED:a}),b&&C!=="timer-first"&&r.jsx(An,{mode:j??"default",size:"small",dateEnd:v?new Date(v):new Date,dateInit:P?new Date(P):new Date,TIME_ZONE:i})]})}):r.jsx(r.Fragment,{})]})};class Ye extends g.Component{constructor(){super(...arguments);cn(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(){return{hasError:!0,error:null}}componentDidCatch(n,s){if(process.env.NODE_ENV!=="production"){if(this.props.debugger)debugger;console.groupCollapsed("Error Boundary CMS",this.props.name),console.log("Error:",(n==null?void 0:n.message)??n),console.log("Error Info:",s),console.groupEnd()}}render(){const{hasError:n}=this.state,{children:s,fallback:o}=this.props;return n&&process.env.NODE_ENV==="production"?null:n&&o!==void 0?o:s}}const sn=({data:e,className:t,priority:n,creative:s,name:o,...a})=>{const{handleSelectPromotionEvent:i,currentLocalRef:c}=oe(),{banner:{promotion_name:l},index:u,componentIndex:m}=e,f=typeof u=="number"?`:${u+1}`:"",p={creative_name:s,creative_slot:`${s}-${c.current}:${m+1}${f}`,promotion_id:e.banner.href,promotion_name:l},h=g.useRef(null),_=g.useMemo(()=>{var x;if((x=e.banner.video)!=null&&x.includes("player.vimeo")){const b=e.banner.video.split("?")[1],C=b==null?void 0:b.split("&"),j=C==null?void 0:C.filter(P=>P.includes("loc")||P.includes("signature")||P.includes("user_id")),v=j==null?void 0:j.join("&");return`${e.banner.video.split("?")[0]}?${v}`}return e.banner.video},[e]),y=()=>{var x;(x=h.current)!=null&&x.paused&&h.current.play()};return r.jsx(Ye,{name:o,children:r.jsx(Vn,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...p,index:u}}}},observerOptions:{delay:100,..._&&{threshold:.1}},..._&&{callBackWhenVisible:y},children:e.banner.href?r.jsx(Me,{href:e.banner.href,onClick:()=>{i({updatePromotionRef:!0,promotion:p,index:u})},children:r.jsx(ma,{data:e,videoUrl:_,priority:n,videoRef:h,className:t,...a})}):r.jsx(ma,{data:e,videoUrl:_,priority:n,videoRef:h,className:t,...a})})})},Xs=e=>r.jsx(Ye,{name:e.name,children:r.jsx(sn,{...e})}),fd=({columns:e,count:t,gap:n,className:s})=>{var x;const{banners:o,pages:a,products:i}=ct(),{isMobile:c}=ne(),{banners:l}=Fn(),{ICONS:u,PRODUCT_CARD_IMAGE_ASPECT_RATIO:m,TEXTCONTENT_EXPANDED:f,TIME_ZONE:p}=De(),h=((x=a[a.length-1])==null?void 0:x.products.length)??t,_=i[(a.length-1)*t+h-1],y=l.filter((b,C)=>o[C]<_);return Array.isArray(y)?y.map((b,C)=>r.jsx(ot.Banner,{columns:b.columns,gap:n,isMobile:c??!1,position_grid:o[C]+1,totalColumns:e,PRODUCT_CARD_IMAGE_ASPECT_RATIO:m,children:r.jsx(sn,{name:"Banner Carousel",data:{banner:b,componentIndex:C},creative:"banner_grid",ICONS:u,TEXTCONTENT_EXPANDED:f,TIME_ZONE:p,className:s})},`${b.position_grid}-${C}`)):null};fd.displayName="PDC.InfiniteScroller.Banners";const hd=e=>{var s;const{pages:t}=ct(),n=t[t.length-1];return(n==null?void 0:n.page)!==((s=n==null?void 0:n.pagination)==null?void 0:s.total)&&!(n!=null&&n.loading)?r.jsx(qn,{...e}):null};hd.displayName="PDC.InfiniteScroller.Loading";const _d=({page:e,...t})=>{const{updateParamPage:n}=ct(),{element:s}=kn({callback:()=>n(e),options:{threshold:0}});return r.jsx("div",{...t,id:`pdc-scroll-infinite-${e.page}`,className:Ke["pdc--infinite--loader"],"data-page":e.page,ref:s})};_d.displayName="PDC.Page.Anchor";const gd=({first:e,gap:t,isMobile:n=!1,item:s,index:o,last:a=!1,order:i,page:c,showVideo:l=!1})=>{const{load:u,handleNotify:m}=ct(),{getAvailableProductTag:f}=ht(),{BUY_BUTTON_LABELS:p,MAIN_IMAGE:h,PLP_GRID_SCROLL_BACK:_,PLP_INFINITE_SCROLL:y,PLP_PRODUCT_SIMILAR_DELAY:x,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:b,PLP_SIZE_ORDER:C,PRODUCT_CARD_IMAGE_ASPECT_RATIO:j,PRODUCT_CARD_TEXTS:v,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:P,PRODUCT_IMAGE_DIMENSIONS:S,SECOND_IMAGE:E,StoreConfig_MainSellerId:I,TEXTURE_IMAGE:A,Z_INDEX_WAR:L,ICONS:O}=De(),D=f(s==null?void 0:s.cluster.highlights);return r.jsx(ot.Card,{className:s.id==="skeleton"?Ke["pdc--infinite--card--disabled"]:"",gap:t,isMobile:n??!1,item:s,order:i,tag:D,index:o,setSkuSelected:m,showVideo:l,CONSTANTS:{BUY_BUTTON_LABELS:p,MAIN_IMAGE:h,PLP_GRID_SCROLL_BACK:_,PLP_INFINITE_SCROLL:y,PLP_PRODUCT_SIMILAR_DELAY:x,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:b,PLP_SIZE_ORDER:C,PRODUCT_CARD_IMAGE_ASPECT_RATIO:j,PRODUCT_CARD_TEXTS:v,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:P,PRODUCT_IMAGE_DIMENSIONS:S,SECOND_IMAGE:E,StoreConfig_MainSellerId:I,TEXTURE_IMAGE:A,Z_INDEX_WAR:L,ICONS:O},children:c&&u&&r.jsxs(r.Fragment,{children:[e&&r.jsx(Nn.Anchor,{page:c}),!c.loading&&r.jsx(Nn.Loader,{page:c}),a&&c.loading&&r.jsx(Nn.NextPage,{page:c})]})})};gd.displayName="PDC.Page.Card";const yd=({type:e="default",page:t,...n})=>{const{load:s,updatePage:o}=ct(),{element:a}=kn({callback:()=>o(t),onEnterViewportOnce:!0,options:{threshold:1}});return s===!0&&r.jsx("div",{...n,className:Ke[`pdc--infinite--loader${e==="page"?"--page":""}`],ref:a})};yd.displayName="PDC.Page.Loader";const xd=({page:e,...t})=>{var o;const{addNewPage:n}=ct(),{element:s}=kn({callback:()=>{n(e)},onEnterViewportOnce:!0,options:{threshold:[.5,1]}});return((o=e==null?void 0:e.pagination)==null?void 0:o.nextPage)===!0&&e.loading===!0?r.jsx("div",{...t,className:Ke["pdc--infinite--next-page--card"],"data-next-page":!0,ref:s}):null};xd.displayName="PDC.Page.NextPage";const Nn={Anchor:_d,Card:gd,Loader:yd,NextPage:xd},vd=({count:e,gap:t,page:n})=>{const{isMobile:s}=ne(),{columns:o,products:a}=ct(),i=(n.page-1)*e,c=Mi(n.products,o);return Array.isArray(n.products)?n.products.map((l,u)=>r.jsx(Nn.Card,{first:u===0,last:u===n.products.length-1,gap:t,index:u,item:l.node,isMobile:s??!1,order:a[i+u]+1,page:u===0||u===n.products.length-1?n:void 0,showVideo:!!c.indexOf(u)},a[i+u]+1)):null};vd.displayName="PDC.Page";const ty=({pages:e,load:t,PLP_GRID_SCROLL_BACK:n})=>{const s=g.useRef(!1);g.useEffect(()=>{const o=e[e.length-1];if(t&&o&&!s.current){const a=sessionStorage.getItem(n.refer),i=sessionStorage.getItem(n.order),c=document.querySelector(a==="true"?`[data-order="${i}"]`:`#pdc-scroll-infinite-${o.page}`);c&&(s.current=!0,sessionStorage.setItem(n.refer,"false"),o.page>1&&c.scrollIntoView({behavior:"instant",block:"start"}))}if(!t&&s.current){s.current=!1;const a=document.querySelector("body > main");a&&a.scrollIntoView({behavior:"instant",block:"start"})}},[t,e])},ny=()=>{var l,u;const{count:e}=ze(),{columns:t,gap:n,load:s,pages:o,total:a}=ct(),i=De(),{PLP_GRID_SCROLL_BACK:c}=De();return ty({pages:o,load:s,PLP_GRID_SCROLL_BACK:c}),r.jsxs(r.Fragment,{children:[s===!0&&((u=(l=o[0])==null?void 0:l.pagination)==null?void 0:u.count)===0&&r.jsx(tt.Empty,{ICONS:i.ICONS,PLP_NOT_RESULT:i.PLP_NOT_RESULT}),r.jsxs(ot.Root,{children:[Array.isArray(o)&&o.map((m,f)=>r.jsx(vd,{count:e,gap:n,page:m},f)),r.jsx(fd,{columns:t,count:e,gap:n})]}),r.jsx(Ks,{total:a}),r.jsx(hd,{})]})},bd=()=>{const{banners:e}=Fn();return r.jsx(sc,{banners:e,children:r.jsx(ny,{})})};bd.displayName="PDC.InfiniteScroller";const jd=()=>{const{setOpenFilters:e}=ws(),{selectedFacets:t,onToggleFacet:n,onSort:s}=wi(),{state:o}=ze(),{Z_INDEX_WAR:a}=De(),i=T.filterNonRootFacets(t,o==null?void 0:o.base);return r.jsx(ft.Root,{onSort:s,setOpenFilters:e,style:{zIndex:a.plp_navigation},children:r.jsx(ft.Selected,{callback:n,selected:i})})};jd.displayName="Navigation";const cs=({currentPage:e,callback:t,type:n,...s})=>r.jsx(d.Button,{...s,iconNameStart:`arrow-${n}`,onClick:()=>{typeof t=="function"&&t(n==="left"?"prev":"")},size:"large",variant:"tertiary"});cs.displayName="Arrow";const ls=({active:e,prev:t,ellipses:n,page:s,selectedPage:o})=>r.jsxs(r.Fragment,{children:[n&&t&&r.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."}),e&&r.jsx(d.Pagination.Item,{isActive:!1,index:s,variant:"tertiary",onClick:()=>{typeof o=="function"&&o(s)},children:s}),n&&!t&&r.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."})]});ls.displayName="PageEllipses";const Cd=({children:e,endPage:t,page:n,total:s,selectedPage:o,ITEMS_PER_SECTION:a})=>r.jsxs(r.Fragment,{children:[r.jsx(ls,{active:n>=a&&s>a,selectedPage:o,currentPage:n,prev:!1,ellipses:n>a&&s>a,page:1}),e,r.jsx(ls,{active:s-n>1&&s!==t,selectedPage:o,currentPage:n,prev:!0,ellipses:t<s-1,page:s})]});Cd.displayName="Pagination.Layout";const ry=(e,t,n)=>{const s=new URLSearchParams(n);return s.set(e,t),s.toString()},sy=(e,t)=>{const n=[];for(let s=e;s<=t;s++)n.push(s);return n},oy=({currentPage:e,total:t,maxVisiblePages:n,SEARCH_PAGE_ITEM_THRESHOLD:s})=>{const o=t>=s?s:t,a=Math.max(1,e===o?o-n+1:e-Math.floor(n/2)),i=Math.min(o,a+n-1);return{startPage:a,endPage:i,totalPages:o}},Sd=({currentPage:e,pages:t,searchParams:n,VARIANT_PAGINATION:s})=>{const{router:o,pathname:a}=ce();return Array.isArray(t)?t.map(i=>r.jsx(d.Pagination.Item,{isActive:e===i,index:i,variant:e===i?s.active:s.default,onClick:()=>o.push(`${a}?${ry("page",i.toString(),n)}`),children:i},i)):null};Sd.displayName="Pages";const Ys=({query:e,type:t="default",searchParams:n,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:a,SEARCH_PAGE_ITEM_THRESHOLD:i,VARIANT_PAGINATION:c,...l})=>{const{router:u,pathname:m}=ce(),{state:{page:f=1}}=ze(),{pagination:{total:p}}=tn(),{endPage:h,totalPages:_,startPage:y}=oy({currentPage:f,total:p,maxVisiblePages:o,SEARCH_PAGE_ITEM_THRESHOLD:i}),x=C=>{const j=C.toString(),v=new URLSearchParams(n.toString());t==="default"&&v.set("page",j),t==="search"&&(v.set("query",e??""),v.set("count",a.toString()),v.set("page",j),s&&v.set("sort",s.replace("_",":")));const S=`${t==="search"?"/search":m}?${v.toString()}`;u.push(S)},b=C=>{x(C==="prev"?f-1:f+1)};return p?r.jsx("div",{...l,className:Ke["pdc--pagination"],children:r.jsx(d.Pagination.Wrapper,{adornment:{start:r.jsx(cs,{callback:b,currentPage:f,disabled:f<2,type:"left"}),end:r.jsx(cs,{callback:b,currentPage:f,disabled:f>=_,type:"right"})},children:r.jsx(Cd,{endPage:h,page:f,selectedPage:x,total:p,ITEMS_PER_SECTION:o,children:r.jsx(Sd,{currentPage:f,pages:sy(y,h),searchParams:n,VARIANT_PAGINATION:c})})})}):r.jsx(r.Fragment,{})};Ys.displayName="Pagination";const Ed=({gap:e,isMobile:t,className:n})=>{const{count:s,state:o}=ze(),{banners:a}=Fn(),{ICONS:i,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u}=De(),m=a.filter(f=>zi(f.position_grid,o.page,s));return Array.isArray(m)?m.map((f,p)=>r.jsx(ot.Banner,{columns:f.columns,gap:e,isMobile:t,position_grid:f.position_grid,totalColumns:t?2:4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,children:r.jsx(sn,{name:"Banner Carousel",data:{banner:f,componentIndex:p},creative:"banner_grid",ICONS:i,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u,className:n})},f.position_grid)):null};Ed.displayName="PDC.Grid.Banners";const Qs=({isMobile:e=!1,items:t,BUY_BUTTON_LABELS:n,ICONS:s,MAIN_IMAGE:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PLP_GRID_SCROLL_BACK:c,PLP_INFINITE_SCROLL:l,PLP_PRODUCT_SIMILAR_DELAY:u,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:m,PLP_SIZE_ORDER:f,PRODUCT_CARD_IMAGE_ASPECT_RATIO:p,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:y,SECOND_IMAGE:x,StoreConfig_MainSellerId:b,TEXTURE_IMAGE:C,Z_INDEX_WAR:j})=>{const{getAvailableProductTag:v}=ht(),{count:P,state:S}=ze(),[E,I]=g.useState(!1),[A,L]=g.useState(null),[O,D]=g.useState([]),Q=g.useCallback((Y,G)=>{const H=G?Mn([G]):null;D(Y),L(H!=null&&H.length?H[0]:null),I(!0)},[]),M=e?8:16,U=(S.page-1)*P,F=ot.helpers.createGridPosAndVideo(t,[],e?2:4,S.page);return r.jsxs(r.Fragment,{children:[r.jsxs(ot.Root,{children:[Array.isArray(t)&&t.map((Y,G)=>{var Z,re;const H=v(Y.node.cluster.highlights);return r.jsx(ot.Card,{gap:M,isMobile:e??!1,item:Y.node,order:U+(((Z=F[G])==null?void 0:Z.position)??0),tag:H,index:G,setSkuSelected:Q,showVideo:(re=F[G])==null?void 0:re.canPlayVideo,CONSTANTS:{BUY_BUTTON_LABELS:n,MAIN_IMAGE:o,PLP_GRID_SCROLL_BACK:c,PLP_INFINITE_SCROLL:l,PLP_PRODUCT_SIMILAR_DELAY:u,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:m,PLP_SIZE_ORDER:f,PRODUCT_CARD_IMAGE_ASPECT_RATIO:p,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:y,SECOND_IMAGE:x,StoreConfig_MainSellerId:b,TEXTURE_IMAGE:C,Z_INDEX_WAR:j,ICONS:s}},Y.node.sku)}),t.length>0&&r.jsx(Ed,{gap:M,isMobile:e??!1})]}),r.jsx(zn,{open:E,sku:A,skus:O,setSku:L,setVisible:I,ICONS:s,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:h,Z_INDEX_WAR:j})]})};Qs.displayName="PDC.Products";const tt={Empty:Fs,Filters:ld,Grid:ud,InfiniteScroller:bd,Spinner:qn,Navigation:jd,Notification:zn,Pagination:Ys,Products:Qs},Pd=({className:e,...t})=>{const{searchParams:n,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:a,PLP_INFINITE_SCROLL:i,SEARCH_PAGE_ITEM_THRESHOLD:c,VARIANT_PAGINATION:l}=t;return r.jsx(rp,{...t,children:r.jsxs("div",{className:d.helpers.classNameConcat(Ke.pdc,e),children:[r.jsxs(Ii,{forceUpdate:!0,children:[r.jsx(tt.Navigation,{}),r.jsx(tt.Filters,{})]}),i===!0?r.jsx(tt.Grid,{infinite:!0}):r.jsxs(Is,{forceUpdate:!0,query:n.get("query")??void 0,children:[r.jsx(tt.Grid,{}),r.jsx(tt.Pagination,{searchParams:n,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:a,SEARCH_PAGE_ITEM_THRESHOLD:c,VARIANT_PAGINATION:l})]})]})})};Pd.displayName="Templates.PDC";const Nd=g.createContext({}),ay=({children:e,...t})=>r.jsx(Nd.Provider,{value:t,children:e}),Zn=()=>{const e=g.useContext(Nd);if(e===void 0)throw new Error("useSearchConstants must be used within a SearchConstantsProvider");return e},iy="_grid_e75z7_21",cy="_navigation_e75z7_44",ly="_spinner_e75z7_70",uy="_sort_e75z7_76",pt={"rearch-result--empty":"_rearch-result--empty_e75z7_1",grid:iy,"grid-header":"_grid-header_e75z7_37",navigation:cy,"result-disclaimer":"_result-disclaimer_e75z7_51",spinner:ly,sort:uy,"search-result":"_search-result_e75z7_91"},Id=({term:e})=>{const{router:t}=ce(),{SEARCH_RESULT:n,ICONS:s}=Zn(),o=()=>{t.push(n.EMPTY.ALL_TERMS)};return r.jsxs("div",{className:pt["rearch-result--empty"],children:[r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("div",{className:T.responsive["responsive-desktop-flex"],children:r.jsx("h2",{className:"typography-style-heading-sm",children:n.EMPTY.NOT_FOUND})}),r.jsx("div",{className:T.responsive["responsive-mobile-flex"],children:r.jsx("h2",{className:"typography-style-body-md",children:n.EMPTY.NOT_FOUND})}),r.jsxs("p",{children:[n.EMPTY.NOT_FOUND_P," ",`"${e}"`]})]}),r.jsx(d.Button,{onClick:()=>o(),variant:"tertiary",size:"medium",adornment:{end:r.jsx(d.Icon,{name:s.arrow_right,size:"medium"})},children:n.EMPTY.ALL_TERMS_LABEL})]})};Id.displayName="RearchResult.Empty";const dy=e=>r.jsxs(r.Fragment,{children:[r.jsx("div",{className:T.responsive["responsive-desktop-flex"],children:r.jsx("h2",{className:"typography-style-heading-sm",children:e.SEARCH.SEARCHING})}),r.jsx("div",{className:T.responsive["responsive-mobile-flex"],children:r.jsx("h2",{className:"typography-style-body-md",children:e.SEARCH.SEARCHING})}),r.jsx(d.Spinner,{className:pt.spinner})]}),my=(e,t,n)=>r.jsxs(r.Fragment,{children:[r.jsx("div",{className:T.responsive["responsive-desktop-flex"],children:r.jsx("h2",{className:"typography-style-heading-sm",children:t.SEARCH.SEARCHED})}),r.jsx("div",{className:T.responsive["responsive-mobile-flex"],children:r.jsx("h2",{className:"typography-style-body-md",children:t.SEARCH.SEARCHED})}),r.jsxs("p",{children:[t.SEARCH.SEARCHED_P_START," ",e," ",t.SEARCH.SEARCHED_P_END," ",`"${n}"`]})]}),wd=({isLoading:e,quantity:t,term:n})=>{const{SEARCH_RESULT:s}=Zn();return r.jsx(d.TextStructure.DivWrapper,{children:e?dy(s):my(t,s,n)})};wd.displayName="Search.Loading";const py=({term:e})=>{const[t,n]=g.useState(!1),{router:s}=ce(),{searchParams:o}=ze(),{ITEMS_DEFAULT_SORT:a,ITEMS_PER_PAGE:i,ICONS:c}=Zn(),l=u=>{T.navigateToSearchPage(s,e,i,1,u??a)};return r.jsx("div",{className:pt.sort,children:r.jsx(Kn,{handleSelectValue:u=>l(u??"release_desc"),sortListOpen:t,setSortListOpen:n,searchParams:o,ICONS:c})})},fy=({query:e})=>{const{isLoading:t,products:n,pagination:s}=tn();return r.jsxs("div",{className:pt["grid-header"],children:[r.jsxs("div",{className:pt.navigation,children:[!t&&(n!=null&&n.length)?r.jsx(py,{term:e}):null,r.jsx(d.Utils.Divider,{})]}),!t&&(n!=null&&n.length)?r.jsx("div",{className:pt["result-disclaimer"],children:r.jsx(wd,{term:e,isLoading:t,quantity:s.count})}):null]})},Rd=({isMobile:e=!1,query:t})=>{const{isLoading:n,products:s,pagination:o}=tn(),{searchParams:a}=ze(),i=Zn(),{sendDataLayerEvent:c}=oe(),l=g.useRef({query:t,sended:!1}),u=g.useMemo(()=>!n&&s.length>0&&o.count>0,[n,s.length,o.count]);return g.useEffect(()=>{if(!n){if(l.current.query!==t){l.current.sended=!1,l.current.query=t;return}l.current.sended||(c({functionKey:"readyEvents",data:{event:"view_search_results",readyData:{search_term:t,search_found:(s==null?void 0:s.length)>0}}}),l.current.sended=!0)}},[t,s,n,c]),r.jsxs("div",{className:pt.grid,children:[u?r.jsx(fy,{query:t}):r.jsx(r.Fragment,{}),!n&&(s!=null&&s.length)?r.jsx(Qs,{isMobile:e??!1,items:s,...i}):r.jsx(r.Fragment,{}),(s==null?void 0:s.length)===0&&!n?r.jsx(Id,{term:t}):null,u&&r.jsx(Ys,{searchParams:a,...i})]})};Rd.displayName="SearchResultContent";const hy=({className:e})=>{const{state:t}=ze(),{isMobile:n}=ne();return r.jsx(Is,{forceUpdate:!1,query:t.term??"",children:r.jsx("div",{className:d.helpers.classNameConcat(pt["search-result"],e),children:r.jsx(Rd,{currentPage:t.page,isMobile:n??!1,query:t.term??""})})})},Ad=({className:e,searchParams:t,CONSTANTS:n})=>{const s=new URLSearchParams(t??""),o=String((s==null?void 0:s.get("query"))??""),a=Number((s==null?void 0:s.get("count"))??0),i=Number((s==null?void 0:s.get("page"))??0),c=String((s==null?void 0:s.get("sort"))??"");return r.jsx(ay,{...n,children:r.jsx(Ns,{sort:c,state:{sort:c,base:"",facets:[],term:o,page:i,count:a},count:a,searchParams:s,ITEMS_PER_PAGE:n.ITEMS_PER_PAGE,children:r.jsx(hy,{className:e})})})};Ad.displayName="Search";const _y=({page:e,data:t})=>{const{pathname:n}=ce(),s=g.useRef(null),{sendDataLayerEvent:o,currentLocalRef:a,itemListRef:i,promotionEventRef:c}=oe();return g.useEffect(()=>{const l=Bi("login_event")||"{}",u=JSON.parse(l);if(u.name||u.method){const m=new Date(0);o({functionKey:"readyEvents",data:{event:u.name,readyData:{method:u.method}}}),As("login_event","",{expires:m})}},[]),g.useEffect(()=>{if(s.current===n)return;s.current=n;let l={};switch(e){case"PDP":{const m=t,f={};if(!m){l={page_category:"pdp"};break}m.items.forEach(({itemId:p,sellers:h})=>f[p]=h[0].commertialOffer.AvailableQuantity),l={page_category:"pdp",seller_ids:m.items.map(({sellers:p})=>p[0].sellerId).join(),skuStocks:f,product_reference_id:m.productReference};break}case"PDC":{const{page_category:m,page_departament:f,id:p,name:h}=Na(),_=h,y=p;l={page_category:"lista_produtos",...f&&{page_departament:f}},i.current={item_list_name:n==="/search"?"busca":_??void 0,item_list_id:n==="/search"?void 0:y??void 0},f&&o({functionKey:"readyEvents",data:{event:"view_category",readyData:{page_category:m,page_departament:f}}});break}default:l={page_category:e},c.current={},i.current={};break}const u={region:e,...l};a.current=e,o({functionKey:"readyEvents",data:{readyData:{vtex_version:"fast",...u}},timeout:0})},[n]),null};var us={exports:{}},En={exports:{}},pa;function gy(){return pa||(pa=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(l,u){for(var m in u)Object.defineProperty(l,m,{enumerable:!0,get:u[m]})}n(t,{DOMAttributeNames:function(){return s},default:function(){return c},isEqualNode:function(){return a}});const s={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function o(l){let{type:u,props:m}=l;const f=document.createElement(u);for(const _ in m){if(!m.hasOwnProperty(_)||_==="children"||_==="dangerouslySetInnerHTML"||m[_]===void 0)continue;const y=s[_]||_.toLowerCase();u==="script"&&(y==="async"||y==="defer"||y==="noModule")?f[y]=!!m[_]:f.setAttribute(y,m[_])}const{children:p,dangerouslySetInnerHTML:h}=m;return h?f.innerHTML=h.__html||"":p&&(f.textContent=typeof p=="string"?p:Array.isArray(p)?p.join(""):""),f}function a(l,u){if(l instanceof HTMLElement&&u instanceof HTMLElement){const m=u.getAttribute("nonce");if(m&&!l.getAttribute("nonce")){const f=u.cloneNode(!0);return f.setAttribute("nonce",""),f.nonce=m,m===l.nonce&&l.isEqualNode(f)}}return l.isEqualNode(u)}let i;process.env.__NEXT_STRICT_NEXT_HEAD?i=(l,u)=>{const m=document.querySelector("head");if(!m)return;const f=m.querySelectorAll('meta[name="next-head"]')||[],p=[];if(l==="meta"){const y=m.querySelector("meta[charset]");y&&p.push(y)}for(let y=0;y<f.length;y++){var h;const b=f[y].nextSibling;(b==null||(h=b.tagName)==null?void 0:h.toLowerCase())===l&&p.push(b)}const _=u.map(o).filter(y=>{for(let x=0,b=p.length;x<b;x++){const C=p[x];if(a(C,y))return p.splice(x,1),!1}return!0});p.forEach(y=>{var x;const b=y.previousSibling;if(b&&b.getAttribute("name")==="next-head"){var C;(C=y.parentNode)==null||C.removeChild(b)}(x=y.parentNode)==null||x.removeChild(y)}),_.forEach(y=>{var x;const b=document.createElement("meta");b.name="next-head",b.content="1",((x=y.tagName)==null?void 0:x.toLowerCase())==="meta"&&y.getAttribute("charset")||m.appendChild(b),m.appendChild(y)})}:i=(l,u)=>{const m=document.getElementsByTagName("head")[0],f=m.querySelector("meta[name=next-head-count]");if(process.env.NODE_ENV!=="production"&&!f){console.error("Warning: next-head-count is missing. https://nextjs.org/docs/messages/next-head-count-missing");return}const p=Number(f.content),h=[];for(let x=0,b=f.previousElementSibling;x<p;x++,b=(b==null?void 0:b.previousElementSibling)||null){var _;(b==null||(_=b.tagName)==null?void 0:_.toLowerCase())===l&&h.push(b)}const y=u.map(o).filter(x=>{for(let b=0,C=h.length;b<C;b++){const j=h[b];if(a(j,x))return h.splice(b,1),!1}return!0});h.forEach(x=>{var b;return(b=x.parentNode)==null?void 0:b.removeChild(x)}),y.forEach(x=>m.insertBefore(x,f)),f.content=(p-h.length+y.length).toString()};function c(){return{mountedInstances:new Set,updateHead:l=>{const u={};l.forEach(p=>{if(p.type==="link"&&p.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+p.props["data-href"]+'"]'))return;p.props.href=p.props["data-href"],p.props["data-href"]=void 0}const h=u[p.type]||[];h.push(p),u[p.type]=h});const m=u.title?u.title[0]:null;let f="";if(m){const{children:p}=m.props;f=typeof p=="string"?p:Array.isArray(p)?p.join(""):""}f!==document.title&&(document.title=f),["meta","base","link","style","script"].forEach(p=>{i(p,u[p]||[])})}}}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(En,En.exports)),En.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function n(S,E){for(var I in E)Object.defineProperty(S,I,{enumerable:!0,get:E[I]})}n(t,{default:function(){return P},handleClientScriptLoad:function(){return x},initScriptLoader:function(){return j}});const s=Le,o=Dt,a=r,i=s._(ps),c=o._(g),l=Hu(),u=gy(),m=Uc(),f=new Map,p=new Set,h=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],_=S=>{if(i.default.preinit){S.forEach(E=>{i.default.preinit(E,{as:"style"})});return}if(typeof window<"u"){let E=document.head;S.forEach(I=>{let A=document.createElement("link");A.type="text/css",A.rel="stylesheet",A.href=I,E.appendChild(A)})}},y=S=>{const{src:E,id:I,onLoad:A=()=>{},onReady:L=null,dangerouslySetInnerHTML:O,children:D="",strategy:Q="afterInteractive",onError:M,stylesheets:U}=S,F=I||E;if(F&&p.has(F))return;if(f.has(E)){p.add(F),f.get(E).then(A,M);return}const Y=()=>{L&&L(),p.add(F)},G=document.createElement("script"),H=new Promise((Z,re)=>{G.addEventListener("load",function(le){Z(),A&&A.call(this,le),Y()}),G.addEventListener("error",function(le){re(le)})}).catch(function(Z){M&&M(Z)});O?(G.innerHTML=O.__html||"",Y()):D?(G.textContent=typeof D=="string"?D:Array.isArray(D)?D.join(""):"",Y()):E&&(G.src=E,f.set(E,H));for(const[Z,re]of Object.entries(S)){if(re===void 0||h.includes(Z))continue;const le=u.DOMAttributeNames[Z]||Z.toLowerCase();G.setAttribute(le,re)}Q==="worker"&&G.setAttribute("type","text/partytown"),G.setAttribute("data-nscript",Q),U&&_(U),document.body.appendChild(G)};function x(S){const{strategy:E="afterInteractive"}=S;E==="lazyOnload"?window.addEventListener("load",()=>{(0,m.requestIdleCallback)(()=>y(S))}):y(S)}function b(S){document.readyState==="complete"?(0,m.requestIdleCallback)(()=>y(S)):window.addEventListener("load",()=>{(0,m.requestIdleCallback)(()=>y(S))})}function C(){[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(E=>{const I=E.id||E.getAttribute("src");p.add(I)})}function j(S){S.forEach(x),C()}function v(S){const{id:E,src:I="",onLoad:A=()=>{},onReady:L=null,strategy:O="afterInteractive",onError:D,stylesheets:Q,...M}=S,{updateScripts:U,scripts:F,getIsSsr:Y,appDir:G,nonce:H}=(0,c.useContext)(l.HeadManagerContext),Z=(0,c.useRef)(!1);(0,c.useEffect)(()=>{const le=E||I;Z.current||(L&&le&&p.has(le)&&L(),Z.current=!0)},[L,E,I]);const re=(0,c.useRef)(!1);if((0,c.useEffect)(()=>{re.current||(O==="afterInteractive"?y(S):O==="lazyOnload"&&b(S),re.current=!0)},[S,O]),(O==="beforeInteractive"||O==="worker")&&(U?(F[O]=(F[O]||[]).concat([{id:E,src:I,onLoad:A,onReady:L,onError:D,...M}]),U(F)):Y&&Y()?p.add(E||I):Y&&!Y()&&y(S)),G){if(Q&&Q.forEach(le=>{i.default.preinit(le,{as:"style"})}),O==="beforeInteractive")return I?(i.default.preload(I,M.integrity?{as:"script",integrity:M.integrity,nonce:H,crossOrigin:M.crossOrigin}:{as:"script",nonce:H,crossOrigin:M.crossOrigin}),(0,a.jsx)("script",{nonce:H,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([I,{...M,id:E}])+")"}})):(M.dangerouslySetInnerHTML&&(M.children=M.dangerouslySetInnerHTML.__html,delete M.dangerouslySetInnerHTML),(0,a.jsx)("script",{nonce:H,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...M,id:E}])+")"}}));O==="afterInteractive"&&I&&i.default.preload(I,M.integrity?{as:"script",integrity:M.integrity,nonce:H,crossOrigin:M.crossOrigin}:{as:"script",nonce:H,crossOrigin:M.crossOrigin})}return null}Object.defineProperty(v,"__nextScript",{value:!0});const P=v;(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(us,us.exports);var yy=us.exports,xy=yy;const Td=T.getDefaultExportFromCjs(xy),vy=({children:e,ONE_TRUST:t})=>r.jsxs(r.Fragment,{children:[r.jsx(Td,{src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",defer:!0,strategy:"afterInteractive","data-domain-script":t.siteId,type:"text/javascript"}),e]}),by=zl(()=>Promise.resolve(vy),{ssr:!1}),jy="_lgpd_8ojiy_82",Cy="_success_8ojiy_248",Sy="_error_8ojiy_312",xe={"newsletter-root":"_newsletter-root_8ojiy_1","has-border-top":"_has-border-top_8ojiy_9","has-border-bottom":"_has-border-bottom_8ojiy_12","newsletter-container":"_newsletter-container_8ojiy_20","content-text":"_content-text_8ojiy_35","form-wrapper":"_form-wrapper_8ojiy_39","newsletter-container-banner":"_newsletter-container-banner_8ojiy_64",lgpd:jy,"textfield-structure-modifier":"_textfield-structure-modifier_8ojiy_190","input-wrapper-modifier":"_input-wrapper-modifier_8ojiy_196","submit-btn":"_submit-btn_8ojiy_200","loading-spinner":"_loading-spinner_8ojiy_211","terms-and-conditions-checkbox":"_terms-and-conditions-checkbox_8ojiy_217","terms-and-conditions-unchecked":"_terms-and-conditions-unchecked_8ojiy_230","terms-and-conditions-checked":"_terms-and-conditions-checked_8ojiy_244",success:Cy,"text-structure-modifier":"_text-structure-modifier_8ojiy_257","success-title":"_success-title_8ojiy_297","close-button":"_close-button_8ojiy_302",error:Sy,"newsletter-wrapper":"_newsletter-wrapper_8ojiy_332","banner-container":"_banner-container_8ojiy_345","newsletter-provider-wrapper":"_newsletter-provider-wrapper_8ojiy_358","newsletter-root-banner":"_newsletter-root-banner_8ojiy_371","banner-background":"_banner-background_8ojiy_392","newsletter-provider-wrapper-background":"_newsletter-provider-wrapper-background_8ojiy_401"},Ld=({invalid_message:e,master_data_field:t,placeholder:n,required:s=!1,CONSTANTS:o})=>{const{isMobile:a}=ne(),{inputsStatus:i,setInputsStatus:c,setFormStatus:l,variant:u}=Os();return r.jsx(d.TextField.Structure,{className:`${xe["textfield-structure-modifier"]} ${u}`,input:r.jsx(d.TextField.Input,{mode:"simple",label:n,sizeVariant:a?o.NEWSLETTER_CONFIGS.interactionSizeMob:o.NEWSLETTER_CONFIGS.interactionSizeDesk,name:t,className:`${xe["input-wrapper-modifier"]} ${u}`,feedback:i[t]==="required"?"error":i[t],onChange:()=>{i[t]!=="none"&&(c(m=>({...m,[t]:"none"})),l("idle"))},required:s}),supportText:i[t]==="error"||i[t]==="required"?r.jsx("div",{className:u==="horizontal"?xe["support-text-modifier"]:"",children:r.jsx(d.TextField.SupportText,{text:i[t]==="error"?e??o.NEWSLETTER_CONFIGS.messages.invalid_generic:o.NEWSLETTER_CONFIGS.messages.required_field,feedback:"error"})}):null})};Ld.displayName="Newsletter.Input";const Od=({formStatus:e,fields:t,CONSTANTS:n})=>r.jsxs(r.Fragment,{children:[Array.isArray(t)&&t.map((s,o)=>r.jsx(Ld,{invalid_message:s.invalid_message,master_data_field:s.master_data_field,placeholder:s.placeholder,required:s.required,type:s.type,CONSTANTS:n},`nt-field-${s.master_data_field}-${o}`)),e==="error"&&r.jsx("div",{className:xe.error,children:r.jsx("p",{children:n.NEWSLETTER_CONFIGS.form.status.error})})]});Od.displayName="Newsletter.FormFields";const kd=({formStatus:e,CONSTANTS:t,...n})=>{const{isMobile:s}=ne();return r.jsxs(d.Button,{...n,className:xe["submit-btn"],disabled:e==="success",size:s?"medium":"large",children:[r.jsx("span",{"data-loading":e==="loading","data-label":!0,children:t.NEWSLETTER_CONFIGS.submitLabel}),t.NEWSLETTER_CONFIGS.hasLoadingState&&e==="loading"&&r.jsx(d.Spinner,{className:xe["loading-spinner"],size:"small"})]})};kd.displayName="Newsletter.SubmitButton";const Dd=({checkboxRef:e,formStatus:t,setFormStatus:n,CONSTANTS:s})=>{const o=a=>{a.target.checked?(e.current=!0,t==="unchecked"&&n("idle")):e.current=!1};return r.jsxs(r.Fragment,{children:[r.jsx(d.Checkbox,{adornment:r.jsx(d.Icon,{name:s.ICONS.check,size:"x-small"}),defaultChecked:e.current,disabled:t==="success",name:"terms-and-conditions",label:s.NEWSLETTER_CONFIGS.messages.accept_terms_and_conditions,onChange:o,sizeVariant:"small",className:xe["terms-and-conditions-checkbox"]}),t==="unchecked"&&r.jsx("div",{className:xe["terms-and-conditions-unchecked"],children:r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:s.ICONS.alert_circle,size:"small"})},children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("p",{children:s.NEWSLETTER_CONFIGS.messages.terms_and_conditions_not_accepted})})})})]})};Dd.displayName="Newsletter.Terms";const Md=({title:e,description:t,CONSTANTS:n})=>r.jsx("div",{className:xe.success,children:r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{className:xe["text-structure-modifier"],children:[r.jsxs("div",{className:xe["success-title"],children:[r.jsx(d.Icon,{name:n.ICONS.check_circle,size:"medium"}),r.jsx("h3",{children:e})]}),r.jsx("p",{children:t})]})})});Md.displayName="Newsletter.Success";const $d=({formPayloadOptionals:e,masterDataEntity:t,banner:n,termsDescription:s,lgpdLinkLable:o,lgpdLink:a,variant:i,CONSTANTS:c})=>{const{checkboxRef:l,fields:u,formStatus:m,hasTermsAndConditions:f,handleClickToSubmit:p,handleSubmit:h,setFormStatus:_}=Os();return r.jsx(r.Fragment,{children:m==="success"?r.jsx(Md,{description:c.NEWSLETTER_CONFIGS.messages.success_description,title:c.NEWSLETTER_CONFIGS.messages.success_title,CONSTANTS:c}):r.jsxs(r.Fragment,{children:[r.jsxs("form",{className:xe["form-wrapper"],onSubmit:y=>h(y,e,t),children:[r.jsx(Od,{formStatus:m,fields:u,CONSTANTS:c}),f&&r.jsx(Dd,{checkboxRef:l,formStatus:m,setFormStatus:_,CONSTANTS:c}),r.jsx(kd,{formStatus:m,type:"submit",variant:"primary",onClick:p,CONSTANTS:c})]}),(n||i==="vertical")&&r.jsxs("div",{className:xe.lgpd,children:[s&&r.jsx("p",{children:s}),o&&r.jsx($e,{href:a,children:o})]})]})})};$d.displayName="Newsletter.Form";const Ey=["horizontal","vertical"],Zs=({className:e,description:t,formPayloadOptionals:n,fields:s,masterDataEntity:o,masterDataEmailField:a,masterDataNameField:i,banner:c,altBanner:l,bannerBackground:u,termsDescription:m,lgpdLinkLable:f,lgpdLink:p,title:h,variant:_,borderTop:y,borderBottom:x,CONSTANTS:b,...C})=>{if(!a||!i)return null;const j=d.helpers.ValidateProp({fieldTypes:Ey,property:_,fallback:"horizontal"});return r.jsxs("div",{className:c?u?xe["banner-background"]:xe["newsletter-wrapper"]:"",children:[c&&r.jsx(d.Banner.Container,{className:xe["banner-container"],children:r.jsx(d.Banner.ImageWrapper,{children:r.jsx(Ie.Image,{src:c,alt:l,width:"1920",height:"500"})})}),r.jsx("div",{className:c?xe["newsletter-provider-wrapper"+(u?"-background":"")]:"",children:r.jsx(pc,{fields:s,masterDataEmailField:a,masterDataNameField:i,variant:j,CONSTANTS:b,children:r.jsx("div",{...C,className:d.helpers.classNameConcat(xe["newsletter-root"+(c||j==="vertical"?"-banner":"")],[y&&xe["has-border-top"],x&&xe["has-border-bottom"],e].filter(Boolean)),"data-variant":j,children:r.jsxs("div",{className:c||j==="vertical"?xe["newsletter-container-banner"]:xe["newsletter-container"],children:[r.jsxs("div",{className:xe["content-text"],children:[r.jsx("h2",{children:h}),r.jsx("p",{children:t}),!c&&j==="horizontal"&&r.jsxs("div",{className:xe.lgpd,children:[r.jsx("p",{children:m}),f&&r.jsx($e,{target:"_blank",href:p,children:f})]})]}),r.jsx($d,{formPayloadOptionals:n,masterDataEntity:o,CONSTANTS:b,banner:c,lgpdLink:p,lgpdLinkLable:f,termsDescription:m,variant:j})]})})})})]})};Zs.displayName="Newsletter";const zd=({children:e,...t})=>r.jsx("div",{...t,children:e});zd.displayName="CallToAction";const Py="_wrapper_aejhu_1",Ny="_body_aejhu_8",On={wrapper:Py,body:Ny,"wrapper-body":"_wrapper-body_aejhu_16","accordion-modifier":"_accordion-modifier_aejhu_32"},Iy=({children:e,className:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(On.wrapper,t),children:e}),wy=({data:e,ICONS:t})=>{const[n,s]=g.useState(null),o=i=>{s(c=>c===i?null:i)},{router:a}=ce();return r.jsx("div",{className:d.helpers.classNameConcat(On.body),children:Array.isArray(e)&&(e==null?void 0:e.map((i,c)=>{var f;const l=n===i.id,u=i.buttonHref&&i.buttonHref!=="#",m=i.buttonHref&&i.type==="button"&&u?{onClick:()=>{var p;if((p=i.buttonHref)!=null&&p.startsWith("/")){a.push(i.buttonHref);return}window.open(i.buttonHref,"_blank")}}:{};return r.jsx("div",{children:i.type==="button"?r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{variant:"tertiary",mode:i.buttonMode??"default",size:i.buttonSize??"medium",iconNameStart:t[i.buttonIcon]??i.buttonIcon,...m,style:{marginTop:16},children:i.buttonLabel}),r.jsx(d.Utils.Divider,{direction:"horizontal",size:"small",style:{height:16}})]}):r.jsxs(d.Accordion.Wrapper,{className:d.helpers.classNameConcat(On["accordion-modifier"]),children:[r.jsx(d.Accordion.Header,{id:`${c}-${i.title}`,closeIndicator:l?r.jsx(d.Icon,{name:t.arrow_up,size:"medium"}):void 0,openIndicator:l?void 0:r.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),title:"accordion-header",onClick:()=>o(i.id),children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h2",{className:"typography-style-body-sm",children:i.title})})})}),r.jsx(d.Accordion.Body,{title:"accordion-body",children:r.jsx(d.TextStructure.Root,{children:l&&r.jsxs(d.TextStructure.DivWrapper,{children:[i.subtitle?r.jsx("h3",{className:"typography-style-body-md",children:i.subtitle}):r.jsx(r.Fragment,{}),r.jsx("p",{className:"typography-style-caption",children:i.description}),i.buttonLabel&&i.buttonHref?r.jsx($e,{href:i.buttonHref??"#",mode:i.buttonMode??"default",size:i.buttonSize??"medium",adornments:(f=i.buttonIcon)!=null&&f.length?{end:r.jsx(d.Icon,{name:t[i.buttonIcon]??i.buttonIcon})}:void 0,children:i.buttonLabel}):r.jsx(r.Fragment,{})]})})})]})},i.id)}))})},Ry=({className:e,data:t,ICONS:n,...s})=>{const[o,a]=g.useState(!1),[i,c]=g.useState(null);g.useEffect(()=>{!o&&!i&&t&&c(t)},[o,i]);const l=g.useCallback(()=>{a(u=>!u)},[]);return i?r.jsxs(Iy,{...s,className:e,children:[r.jsx("div",{className:On["wrapper-body"],hidden:!o,children:o&&r.jsx(wy,{data:i.content,ICONS:n})}),r.jsx(zd,{children:r.jsx("div",{onClick:l,children:o?r.jsx(d.Button,{iconNameEnd:n.close,size:(i==null?void 0:i.helpButtonSize)??"x-large"}):r.jsx(d.Button,{iconNameStart:(i==null?void 0:i.iconLabel)??n.help,size:(i==null?void 0:i.helpButtonSize)??"x-large",children:i==null?void 0:i.label})})})]}):r.jsx(r.Fragment,{})},Ay="_formContainer_zwlly_1",Ty="_formFieldGroup_zwlly_6",Ly="_formFieldGroupName_zwlly_10",Oy="_formFieldWrapper_zwlly_20",ky="_formFieldInput_zwlly_30",Dy="_success_zwlly_73",My="_button_zwlly_110",$y="_error_zwlly_114",at={formContainer:Ay,formFieldGroup:Ty,formFieldGroupName:Ly,formFieldWrapper:Oy,formFieldInput:ky,success:Dy,"text-structure-modifier":"_text-structure-modifier_zwlly_85",button:My,error:$y},zy=({group:e,children:t,className:n})=>r.jsx(r.Fragment,{children:r.jsxs("div",{className:d.helpers.classNameConcat(at.formFieldGroup,n),children:[r.jsx("h1",{className:at.formFieldGroupName,children:e.groupLabel}),t]},e.groupLabel)});async function Fy(e){const t=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-1",t);return Array.from(new Uint8Array(n)).map(a=>a.toString(16).padStart(2,"0")).join("")}const By=async e=>await fetch("/api/dito-ingest",{method:"POST",body:JSON.stringify(e)}).then(n=>n.json()),Fd=g.createContext({});function Bd({children:e,groups:t,masterDataEntity:n,postFn:s,actionName:o="",originName:a="",POPUP_SUBMITTED_STORAGE:i}){const[c,l]=g.useState(!1),[u,m]=g.useState({}),[f,p]=g.useState([]),[h,_]=g.useState("idle"),[y,x]=g.useState(""),b=({target:{name:j,value:v}})=>{m({...u,[j]:v})},C=j=>{j.preventDefault(),s({body:{masterDataEntity:n,payload:u}}).then(async({Message:v})=>{if(v){const S=v.match(/'(.*?[^\\])'/g)||[];var P="-";for(const E of S){const I=E.substring(1,E.length-1),L=t.flatMap(O=>O.fields).find(({name:O})=>O===I);x(I),L&&(P=L.name)}return _("error"),p([P])}if(u.email){const S=await Fy(u.email||""),E=new Date().toISOString();By([{user_id:S,timestamp:E,type:"IDENTIFY",traits:{id:S,created_at:E,name:u.name,email:u.email,phone:u==null?void 0:u.phone}},{action:o,timestamp:E,type:"TRACK",user_id:S,context:{user_agent:navigator.userAgent},properties:{custom_data:{email:u.email,nome:u.name,origem:a,...u}}}])}return window.localStorage.setItem(i,"true"),m({}),l(!0),_("success"),p([])})};return r.jsx(Fd.Provider,{value:{formErrors:f,handleInputChange:b,submitForm:C,formData:u,status:h,fieldMessage:y,success:c,setSuccess:l},children:e})}function Jn(){return g.useContext(Fd)}const Uy=({fields:e,className:t})=>{const{formData:n,handleInputChange:s,formErrors:o}=Jn();return r.jsx("div",{className:d.helpers.classNameConcat(at.formFieldWrapper,t),children:e.map(({label:a,name:i,required:c,width:l="medium"})=>r.jsx(d.TextField.Input,{label:`${a}${c?"*":""}`,title:i,value:n[i]||"",name:i,sizeVariant:"large",onChange:s,required:c,feedback:o.includes(i)?"error":"none",className:at.formFieldInput,"data-inputsize":l},i))})},Hy=({FORM_CONFIGS:e,ICONS:t})=>{const{router:n}=ce();return r.jsxs("div",{className:at.success,children:[r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:t.check_circle,size:"medium"})},children:r.jsx(d.TextStructure.DivWrapper,{className:at["text-structure-modifier"],children:r.jsx("p",{children:e.successMessage})})}),r.jsx(d.Button,{size:"large",onClick:()=>n.push("/"),className:at.button,children:e.returnButton})]})},qy=({FORM_CONFIGS:e,ICONS:t})=>{const{fieldMessage:n}=Jn();return r.jsx("div",{className:at.error,children:r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:t.delete_circle,size:"small"})},children:r.jsx(d.TextStructure.DivWrapper,{className:at["text-structure-modifier"],children:r.jsxs("p",{children:[e.errorMessage,n]})})})})},Vy=({children:e,className:t,ICONS:n,FORM_CONFIGS:s})=>{const{submitForm:o,status:a}=Jn();return r.jsx("form",{onSubmit:o,className:d.helpers.classNameConcat(at.formContainer,t),children:a==="success"?r.jsx(Hy,{ICONS:n,FORM_CONFIGS:s}):r.jsxs(r.Fragment,{children:[e,a==="error"&&r.jsx(qy,{ICONS:n,FORM_CONFIGS:s})]})})},Wy=e=>{const{children:t,className:n}=e;return r.jsx(Bd,{...e,children:r.jsx(Vy,{ICONS:e.ICONS,FORM_CONFIGS:e.FORM_CONFIGS,className:n,children:t})})},Ot={Root:Wy,FieldGroup:zy,FieldWrapper:Uy},Gy="_button_1e35m_39",_t={"banner-container":"_banner-container_1e35m_1","banner-background":"_banner-background_1e35m_6","form-root":"_form-root_1e35m_15",button:Gy,"form-fied-wrapper":"_form-fied-wrapper_1e35m_52"};function Ky({content:e,sections:t,FORM_CONFIGS:n,ICONS:s,postFn:o,POPUP_SUBMITTED_STORAGE:a}){var l;const{isMobile:i}=ne(),c=((l=t.find(({name:u})=>u==="Form"))==null?void 0:l.data)||{};return r.jsx("div",{children:r.jsxs(d.Banner.Container,{className:_t["banner-container"],children:[r.jsx(d.Banner.ImageWrapper,{children:r.jsx(Ie.Image,{className:_t["banner-background"],src:i?e.bannerMobile:e.bannerDesk,alt:e.altBanner,width:"1920",height:"500"})}),r.jsxs(Ot.Root,{postFn:o,ICONS:s,FORM_CONFIGS:n,groups:c.groups||[],masterDataEntity:c.masterDataEntity||"",className:_t["form-root"],POPUP_SUBMITTED_STORAGE:a,children:[c.groups.map(u=>r.jsx(Ot.FieldGroup,{group:u,children:r.jsx(Ot.FieldWrapper,{fields:u.fields,className:_t["form-fied-wrapper"]})},u.groupLabel)),r.jsxs("div",{children:[r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("p",{className:"typography-style-body-xs",children:e.requiredMessage})}),r.jsx("div",{className:_t["button-wrapper"],children:r.jsx("div",{className:_t["button-frame"],children:r.jsx(d.Button,{size:"large",type:"submit",className:_t.button,children:e.buttonLabel})})})]})]})]})})}const Xy="_content_1jj9i_36",Yy="_trends_1jj9i_47",Qy="_modal_1jj9i_1",Ue={"modal-header":"_modal-header_1jj9i_1","modal-header__close-button":"_modal-header__close-button_1jj9i_7","search-modal__title":"_search-modal__title_1jj9i_10",content:Xy,trends:Yy,"trends-content":"_trends-content_1jj9i_57","trends-item":"_trends-item_1jj9i_62","modal-auto-complete":"_modal-auto-complete_1jj9i_76","modal-search-empty":"_modal-search-empty_1jj9i_88",modal:Qy,"search-modal__modal":"_search-modal__modal_1jj9i_100"},Ud=g.createContext({}),Zy=({children:e,term:t})=>{const[n,s]=g.useState([]),[o,a]=g.useState(!1);return g.useEffect(()=>{if(!t){s([]);return}(async()=>{a(!0);try{const c=await fetch("/api/search/suggestedTerms",{method:"POST",body:JSON.stringify({query:t,locale:"pt-BR"})}),{data:l}=await c.json();s((l==null?void 0:l.searches)||[])}catch(c){console.error("Erro ao buscar sugestões:",c)}})()},[t]),r.jsx(Ud.Provider,{value:g.useMemo(()=>({suggestedTerms:n,loading:o,setLoading:a}),[n,o]),children:e})},Jy=({children:e,...t})=>r.jsx(Zy,{...t,children:e}),ex=()=>{const e=g.useContext(Ud);if(!e)throw new Error("useSuggestedTermsContext must be used within a SuggestedTermsProvider");return e},qr=(e,t,n=24,s=1,o="release:desc")=>{const a=`/search?query=${t??""}&count=${n}&page=${s}${o?`&sort=${o.replace("_",":")}`:""}`;e.push(a)},Hd=({placeholder:e,noResultsTitle:t,noResultsLabel:n,noResultsTermText:s,handleClose:o,setTerm:a,ICONS:i,ITEMS_DEFAULT_SORT:c,ITEMS_PER_PAGE:l,SEARCH_MODAL:u})=>{const[m,f]=g.useState(""),{suggestedTerms:p,loading:h,setLoading:_}=ex(),{router:y}=ce(),x=g.useRef(null),b=v=>{f(v.target.value),clearTimeout(x.current),v.target.value.length>2&&(a(v.target.value),x.current=setTimeout(()=>{a(v.target.value),_(!1)},2e3))},C=v=>{v.key==="Enter"&&(m==null?void 0:m.length)>2&&(o(),qr(y,m,l,1,c))},j=v=>{o(),qr(y,v,l,1,c)};return g.useEffect(()=>{if(clearTimeout(x.current),m.length<=2||p.length>0){_(!1);return}return _(!0),x.current=setTimeout(()=>{qr(y,m,l,1,c),_(!1),o()},2e3),()=>{clearTimeout(x.current)}},[m,p]),r.jsx(d.DropDown.AutoComplete,{className:Ue["modal-auto-complete"],onKeyDown:C,onInputChange:b,placeholder:e,stopClickPropagation:!1,adornment:{end:h?r.jsx(d.Spinner,{size:"small"}):r.jsx(d.Button,{variant:"tertiary",size:"small",iconNameStart:i.search,onClick:()=>{j(m)},disabled:!(m.length>2)})},children:(p==null?void 0:p.length)>0&&r.jsx(r.Fragment,{children:(p==null?void 0:p.length)>0&&(m==null?void 0:m.length)>2?r.jsx(d.DropDown.AutoCompleteList,{className:Ue["modal-auto-complete__dropdown"],seeAll:r.jsx("span",{onClick:()=>j(m),children:s+m}),children:p.map((v,P)=>r.jsx(d.DropDown.ListItemWithLink,{children:r.jsx($e,{href:`/search?query=${v.term}&count=${l}&page=1`,size:"x-small",title:v.term,disableUnderline:!0,disablePadding:!1,onClick:S=>{S.preventDefault(),o()},children:v.term})},`key-${v.term}-${P}`))}):!h&&(m==null?void 0:m.length)>3&&(p==null?void 0:p.length)===0&&r.jsxs(d.DropDown.AutoCompleteList,{className:Ue["modal-search-empty"],children:[r.jsx(d.DropDown.NotResults,{description:n,title:t}),r.jsx(d.Button,{className:"all-terms",onClick:()=>{o(),y.push(u.EMPTY.ALL_TERMS)},variant:"tertiary",size:"medium",title:u.EMPTY.ALL_TERMS_LABEL,adornment:{end:r.jsx(d.Icon,{name:i.arrow_right,size:"medium"})},children:u.EMPTY.ALL_TERMS_LABEL})]})})})};Hd.displayName="SearchModal.AutoComplete";function tx({title:e,ICONS:t}){const{isMobile:n}=ne();return r.jsx(d.Modal.Header,{navigation:"top",className:Ue["modal-header"],children:r.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!n,children:[r.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),r.jsx(d.Modal.Title,{navigation:"top",className:Ue["search-modal__title"],title:e}),r.jsx(d.Button,{className:Ue["modal-header__close-button"],"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})})}const qd=g.createContext({searches:[],isLoading:!1,error:null});let Vr=null;const nx=({children:e})=>{const[t,n]=g.useState([]),[s,o]=g.useState(!0),[a,i]=g.useState(null);return g.useEffect(()=>{(async()=>{try{if(o(!0),Vr){n(Vr),o(!1);return}const l=await fetch("/api/search/topSearch");if(!l.ok)throw new Error(`Erro ao buscar os dados: ${l.status}`);const m=(await l.json()).data.searches||[];Vr=m,n(m)}catch(l){i(l instanceof Error?l.message:"Erro desconhecido")}finally{o(!1)}})()},[]),r.jsx(qd.Provider,{value:g.useMemo(()=>({searches:t,isLoading:s,error:a}),[t,s,a]),children:e})},rx=()=>{const e=g.useContext(qd);if(!e)throw new Error("useTopSearches must be used within a TopSearchesProvider");return e},sx=({title:e,allTermsLabel:t,allTermsUrl:n,qtyTrends:s,handleClose:o,ICONS:a,ITEMS_PER_PAGE:i})=>{const{searches:c,isLoading:l}=rx(),{router:u}=ce(),m=Array.isArray(c)?c:[];return r.jsx(r.Fragment,{children:!l&&m.length>0?r.jsx(d.ComponentList.Structure,{className:Ue.trends,title:e,children:r.jsxs("div",{className:Ue["trends-content"],children:[r.jsx(d.ComponentList.List,{columns:1,children:m.slice(0,s).map((f,p)=>r.jsx(d.ComponentList.ListItem,{className:Ue["trends-item"],children:r.jsx($e,{href:`/search?query=${f.term}&count=${i}&page=1`,size:"x-small",adornments:{end:r.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},disableUnderline:!0,title:f.term,onClick:()=>o(),children:f.term})},`list-item-${p}`))}),r.jsx(d.Button,{className:"all-terms",variant:"tertiary",size:"x-small",underline:!1,onClick:()=>{o(),u.push(n)},adornment:{end:r.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},children:t})]})}):null})};function ox({SectionZone:e}){var s;const[t,n]=g.useState(null);return g.useEffect(()=>{(async()=>{try{const a=await fetch("/api/cms/content-type-client",{method:"POST",body:JSON.stringify({contentType:"search"})});if(!a.ok)return;const i=await a.json();n(i)}catch(a){console.error("[CMS FETCH ERROR]",a)}})()},[]),r.jsx("div",{className:Ue.content,children:t!==null&&r.jsx(e,{data:((s=t[0])==null?void 0:s.sections)??[],componentConfigs:{"Product Carousel":{searchModal:!0}}})})}const Vd=({className:e,trends:t,CONSTANTS:n,SectionZone:s})=>{const[o,a]=g.useState(""),{isMobile:i}=ne(),c=ii(),{setValue:l}=Dn(),{SEARCH_MODAL:u,ICONS:m,ITEMS_PER_PAGE:f,ITEMS_DEFAULT_SORT:p}=n;return r.jsxs(d.Modal.Root,{isMobile:i??!1,variant:i?"sideBottom":"sideRight",isOpen:c,setIsOpen:l,className:`${Ue.modal} ${Ue["search-modal__modal"]} ${e??""}`,children:[r.jsx(tx,{title:u.HEADER.TITLE,ICONS:m}),r.jsxs(d.Modal.Body,{className:Ue["modal-content-body"],children:[r.jsx(Jy,{term:o,children:r.jsx(Hd,{placeholder:u.AUTOCOMPLETE.PLACEHOLDER,noResultsTitle:u.EMPTY.NOT_FOUND,noResultsLabel:u.EMPTY.NOT_FOUND_P,noResultsTermUrl:u.AUTOCOMPLETE.NO_RESULTS.NO_RESULTS_TERM_URL,noResultsTermText:u.AUTOCOMPLETE.NO_RESULTS.NO_RESULTS_TERM_TEXT,handleClose:()=>l(!1),setTerm:a,ICONS:m,ITEMS_DEFAULT_SORT:p,ITEMS_PER_PAGE:f,SEARCH_MODAL:u})}),t?r.jsx(nx,{children:r.jsx(sx,{title:u.TRENDS.TITLE,allTermsUrl:u.TRENDS.ALL_TERMS_URL,allTermsLabel:u.TRENDS.ALL_TERMS_LABEL,qtyTrends:u.TRENDS.QTY_TERMS,handleClose:()=>l(!1),ICONS:m,ITEMS_PER_PAGE:f})}):null,r.jsx(ox,{SectionZone:s})]})]})};Vd.displayName="SearchModal";const Ge={"store--page-title":"_store--page-title_1rs1a_1","store--page-title--title":"_store--page-title--title_1rs1a_4","store--return-button":"_store--return-button_1rs1a_14","store--section":"_store--section_1rs1a_36","store--section--img":"_store--section--img_1rs1a_41","store--details":"_store--details_1rs1a_51","store--details--title":"_store--details--title_1rs1a_59","store--details--subtitle":"_store--details--subtitle_1rs1a_68","store--details--text":"_store--details--text_1rs1a_77","store--details--vendor":"_store--details--vendor_1rs1a_87","store--select":"_store--select_1rs1a_91","store--wrapper":"_store--wrapper_1rs1a_115"},Wd=({LPLOJAS_TEMPLATE_RETURN_BUTTON:e,ICONS:t,showVendor:n})=>{const{selectedCity:s,selectedStore:o}=Bn();return r.jsx(d.Card,{padding:"small",shadow:!0,className:Ge["store--wrapper"],children:o?r.jsxs(r.Fragment,{children:[r.jsx(rt.ReturnButton,{ICONS:t,children:e}),r.jsx(rt.Details,{ICONS:t,showVendor:n,store:s==null?void 0:s.find(a=>a.nome===o)})]}):r.jsx(rt.Select,{ICONS:t})})};Wd.displayName="LPStores.Content";const Vt=({title:e,text:t,type:n,...s})=>r.jsx(d.TextStructure.DivWrapper,{...s,children:n==="title"?r.jsx("h4",{className:Ge["store--details--title"],children:e}):r.jsxs(r.Fragment,{children:[r.jsx("h5",{className:Ge["store--details--subtitle"],children:e}),r.jsx("p",{className:Ge["store--details--text"],children:t})]})});Vt.displayName="LPStores.Details";const Gd=({vendor:e,ICONS:t})=>{const n=e?e.split(","):[];return r.jsxs(d.Accordion.Wrapper,{style:{width:"100%"},children:[r.jsx(d.Accordion.Header,{id:"accordion-header-vendor",closeIndicator:r.jsx(d.Icon,{name:t.arrow_up,size:"small"}),openIndicator:r.jsx(d.Icon,{name:t.arrow_down,size:"small"}),title:"Código de vendedor (A)",children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{gap:0,children:r.jsx("h3",{className:"typography-style-body-md",children:"Código de vendedor (A)"})})})}),r.jsx(d.Accordion.Body,{children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:Ge["store--details--vendor"],children:n.map((s,o)=>r.jsx("p",{className:"typography-style-body-sm",children:s.trim()},o))})})})]})};Gd.displayName="LPStores.Details";const Kd=({store:e,showVendor:t,ICONS:n})=>r.jsxs("div",{className:Ge["store--details"],children:[r.jsx(Vt,{alignItems:"left",title:String(e==null?void 0:e.nome),type:"title"}),r.jsx(Vt,{title:"Endereço",text:String(e.endereco)}),e.telefone&&r.jsx(Vt,{title:"Telefone",text:String(e.telefone)}),e.horario&&r.jsx(Vt,{title:"Horário de funcionamento",text:String(e.horario)}),t&&r.jsx(Gd,{ICONS:n,vendor:String(e.vendedoras)})]});Kd.displayName="LPStores.Details";const Xd=({ICONS:e,arrowDownIcon:t=r.jsx(d.Icon,{name:e.arrow_down,size:"small"}),arrowUpIcon:n=r.jsx(d.Icon,{name:e.arrow_up,size:"small"}),list:s,selectText:o,...a})=>r.jsx(d.DropDown.DefaultDropDown,{...a,"aria-placeholder":o,adornmentListClosed:{end:t},adornmentListOpened:{end:n},mode:"simple",placeholder:o,sizeVariant:"large",children:r.jsx(d.DropDown.DefaultDropDownList,{placeholder:o,supportText:o,maxHeight:400,children:Array.isArray(s)&&(s==null?void 0:s.map(i=>r.jsx(d.DropDown.ListItem,{value:i,children:i},i.replace(/\s/g,""))))})});Xd.displayName="LPStores.DropDown";const Yd=({children:e,ICONS:t})=>{const{clearSelectedStore:n}=Bn(),s=()=>{typeof n=="function"&&n()};return r.jsxs("button",{"aria-label":String(e),className:Ge["store--return-button"],onClick:s,onKeyDown:s,children:[r.jsx(d.Icon,{name:t.arrow_left,size:"small"}),e]})};Yd.displayName="LPStores.ReturnButton";const Qd=({children:e,data:t})=>r.jsx(hc,{data:t,children:e});Qd.displayName="LPStores.Root";const Zd=({children:e,imgAlt:t,imgSrcDesk:n,imgSrcMob:s})=>{const{isMobile:o}=ne();return r.jsxs("section",{className:Ge["store--section"],children:[r.jsx(Yt,{src:o?s:n,alt:t,fill:!0,className:Ge["store--section--img"]}),e]})};Zd.displayName="LPStores.Section";const Jd=({ICONS:e})=>{const{data:t,handleSelectCity:n,selectedCity:s,handleSelectStore:o}=Bn(),a=new Set(t.map(c=>c.cidade)),i=Array.from(a).filter(c=>typeof c=="string");return r.jsxs("div",{className:Ge["store--select"],children:[r.jsx(rt.DropDown,{selectText:"Selecione a cidade",handleSelectedValue:n,list:i,defaultValue:s==null?void 0:s[0].cidade,ICONS:e}),r.jsx(rt.DropDown,{"data-selected-city":!!s,selectText:"Selecione a loja",handleSelectedValue:o,list:s?s==null?void 0:s.map(c=>String(c.nome)):[],ICONS:e},s==null?void 0:s[0].cidade)]})};Jd.displayName="LPStores.Select";const em=({children:e})=>r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:Ge["store--page-title"],children:r.jsx("h2",{className:Ge["store--page-title--title"],children:e})})});em.displayName="LPStores.Title";const rt={Content:Wd,Details:Kd,DropDown:Xd,ReturnButton:Yd,Root:Qd,Section:Zd,Select:Jd,Title:em},In={teamComponents:{AddToCart:Ds,BackToTop:_f,HelpButton:Ry,BuyPackage:dl,Filter:{...it,helpers:Nu},...rg,FreightCalculation:_u,Header:hu,Link:$e,Media:Ie,PLPNavigation:ft,ProductCard:pe,ProductList:ot,ProductVariationList:Je,Sort:Kn,UserMenu:Wn,Newsletter:Zs,Form:Ot},template:{minicart:ke,pdc:Pd,pdc_composites:tt,pdp:Ug,searchResult:Ad,wishList:Yc,LPCadastro:Ky,SearchModal:Vd,LPStores:rt},utils:{EventCollector:_y,ExternalScripts:by,LinkOrNotLink:rn,ObserverWrapper:Vn,SnackBarComponent:Lt,DraftJsLinkWrapper:dd}},ax=(e,t)=>{const n=e.map(o=>`'${o.source}'`).join(`,
11
+ Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url`)}if("ref"in ae&&(0,t.warnOnce)('Image with src "'+v+'" is using unsupported "ref" property. Consider using the "onLoad" property instead.'),!C&&!L){const Y=I({config:Q,src:v,width:W||400,quality:Ce||75});let M;try{M=new URL(Y)}catch{}(Y===v||M&&M.pathname===v&&!M.search)&&(0,t.warnOnce)('Image with src "'+v+`" has a "loader" property that does not implement width. Please implement it or use the "unoptimized" property instead.
12
+ Read more: https://nextjs.org/docs/messages/next-image-missing-loader-width`)}$&&(0,t.warnOnce)('Image with src "'+v+'" is using deprecated "onLoadingComplete" property. Please use the "onLoad" property instead.');for(const[Y,M]of Object.entries({layout:Z,objectFit:H,objectPosition:ee,lazyBoundary:ce,lazyRoot:me}))M&&(0,t.warnOnce)('Image with src "'+v+'" has legacy prop "'+Y+`". Did you forget to run the codemod?
13
+ Read more: https://nextjs.org/docs/messages/next-image-upgrade-to-13`);if(typeof window<"u"&&!u&&window.PerformanceObserver){u=new PerformanceObserver(Y=>{for(const U of Y.getEntries()){var M;const ne=(U==null||(M=U.element)==null?void 0:M.src)||"",xe=l.get(ne);xe&&!xe.priority&&xe.placeholder==="empty"&&!xe.src.startsWith("data:")&&!xe.src.startsWith("blob:")&&(0,t.warnOnce)('Image with src "'+xe.src+`" was detected as the Largest Contentful Paint (LCP). Please add the "priority" property if this image is above the fold.
14
+ Read more: https://nextjs.org/docs/api-reference/next/image#priority`)}});try{u.observe({type:"largest-contentful-paint",buffered:!0})}catch(Y){console.error(Y)}}}const Ue=Object.assign(A?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:H,objectPosition:ee}:{},z?{}:{color:"transparent"},R),Ne=!te&&F!=="empty"?F==="blur"?'url("data:image/svg+xml;charset=utf-8,'+(0,r.getImageBlurSvg)({widthInt:W,heightInt:X,blurWidth:je,blurHeight:Me,blurDataURL:q||"",objectFit:Ue.objectFit})+'")':'url("'+F+'")':null;let B=Ne?{backgroundSize:Ue.objectFit||"cover",backgroundPosition:Ue.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:Ne}:{};process.env.NODE_ENV==="development"&&B.backgroundImage&&F==="blur"&&q!=null&&q.startsWith("/")&&(B.backgroundImage='url("'+q+'")');const ge=m({config:Q,src:v,unoptimized:C,width:W,quality:Ce,sizes:b,loader:I});if(process.env.NODE_ENV!=="production"&&typeof window<"u"){let Y;try{Y=new URL(ge.src)}catch{Y=new URL(ge.src,window.location.href)}l.set(Y.href,{src:v,priority:j,placeholder:F})}return{props:{...ae,loading:we?"lazy":x,fetchPriority:V,width:W,height:X,decoding:J,className:S,style:{...Ue,...B},sizes:ge.sizes,srcSet:ge.srcSet,src:O||ge.src},meta:{unoptimized:C,priority:j,placeholder:F,fill:A}}}})(Sa);var zo={exports:{}},Fn={exports:{}},Ys={},Bi;function Xv(){return Bi||(Bi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return a}});const t=g,r=typeof window>"u",n=r?()=>{}:t.useLayoutEffect,o=r?()=>{}:t.useEffect;function a(i){const{headManager:c,reduceComponentsToState:l}=i;function u(){if(c&&c.mountedInstances){const p=t.Children.toArray(Array.from(c.mountedInstances).filter(Boolean));c.updateHead(l(p,i))}}if(r){var f;c==null||(f=c.mountedInstances)==null||f.add(i.children),u()}return n(()=>{var p;return c==null||(p=c.mountedInstances)==null||p.add(i.children),()=>{var m;c==null||(m=c.mountedInstances)==null||m.delete(i.children)}}),n(()=>(c&&(c._pendingUpdate=u),()=>{c&&(c._pendingUpdate=u)})),o(()=>(c&&c._pendingUpdate&&(c._pendingUpdate(),c._pendingUpdate=null),()=>{c&&c._pendingUpdate&&(c._pendingUpdate(),c._pendingUpdate=null)})),null}}(Ys)),Ys}var Zs={},Ui;function Yv(){return Ui||(Ui=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AmpStateContext",{enumerable:!0,get:function(){return n}});const n=Ve._(g).default.createContext({});process.env.NODE_ENV!=="production"&&(n.displayName="AmpStateContext")}(Zs)),Zs}var Js={},qi;function ep(){return qi||(qi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"HeadManagerContext",{enumerable:!0,get:function(){return n}});const n=Ve._(g).default.createContext({});process.env.NODE_ENV!=="production"&&(n.displayName="HeadManagerContext")}(Js)),Js}var eo={},$i;function Zv(){return $i||($i=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isInAmpMode",{enumerable:!0,get:function(){return t}});function t(r){let{ampFirst:n=!1,hybrid:o=!1,hasQuery:a=!1}=r===void 0?{}:r;return n||o&&a}}(eo)),eo}var Hi;function Jv(){return Hi||(Hi=1,function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function r(j,x){for(var S in x)Object.defineProperty(j,S,{enumerable:!0,get:x[S]})}r(t,{default:function(){return C},defaultHead:function(){return m}});const n=Ve,o=qr,a=s,i=o._(g),c=n._(Xv()),l=Yv(),u=ep(),f=Zv(),p=fs;function m(j){j===void 0&&(j=!1);const x=[(0,a.jsx)("meta",{charSet:"utf-8"})];return j||x.push((0,a.jsx)("meta",{name:"viewport",content:"width=device-width"})),x}function h(j,x){return typeof x=="string"||typeof x=="number"?j:x.type===i.default.Fragment?j.concat(i.default.Children.toArray(x.props.children).reduce((S,E)=>typeof E=="string"||typeof E=="number"?S:S.concat(E),[])):j.concat(x)}const _=["name","httpEquiv","charSet","itemProp"];function y(){const j=new Set,x=new Set,S=new Set,E={};return P=>{let N=!0,A=!1;if(P.key&&typeof P.key!="number"&&P.key.indexOf("$")>0){A=!0;const R=P.key.slice(P.key.indexOf("$")+1);j.has(R)?N=!1:j.add(R)}switch(P.type){case"title":case"base":x.has(P.type)?N=!1:x.add(P.type);break;case"meta":for(let R=0,O=_.length;R<O;R++){const D=_[R];if(P.props.hasOwnProperty(D))if(D==="charSet")S.has(D)?N=!1:S.add(D);else{const $=P.props[D],F=E[D]||new Set;(D!=="name"||!A)&&F.has($)?N=!1:(F.add($),E[D]=F)}}break}return N}}function v(j,x){const{inAmpMode:S}=x;return j.reduce(h,[]).reverse().concat(m(S).reverse()).filter(y()).reverse().map((E,P)=>{const N=E.key||P;if(process.env.NODE_ENV!=="development"&&process.env.__NEXT_OPTIMIZE_FONTS&&!S&&E.type==="link"&&E.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(A=>E.props.href.startsWith(A))){const A={...E.props||{}};return A["data-href"]=A.href,A.href=void 0,A["data-optimized-fonts"]=!0,i.default.cloneElement(E,A)}if(process.env.NODE_ENV==="development")if(E.type==="script"&&E.props.type!=="application/ld+json"){const A=E.props.src?'<script> tag with src="'+E.props.src+'"':"inline <script>";(0,p.warnOnce)("Do not add <script> tags using next/head (see "+A+`). Use next/script instead.
15
+ See more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component`)}else E.type==="link"&&E.props.rel==="stylesheet"&&(0,p.warnOnce)('Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="'+E.props.href+`"). Use Document instead.
16
+ See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component`);return i.default.cloneElement(E,{key:N})})}function b(j){let{children:x}=j;const S=(0,i.useContext)(l.AmpStateContext),E=(0,i.useContext)(u.HeadManagerContext);return(0,a.jsx)(c.default,{reduceComponentsToState:v,headManager:E,inAmpMode:(0,f.isInAmpMode)(S),children:x})}const C=b;(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Fn,Fn.exports)),Fn.exports}var to={},Vi;function ex(){return Vi||(Vi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ImageConfigContext",{enumerable:!0,get:function(){return o}});const r=Ve._(g),n=ps,o=r.default.createContext(n.imageConfigDefault);process.env.NODE_ENV!=="production"&&(o.displayName="ImageConfigContext")}(to)),to}var ro={},no={},so={exports:{}},Wi;function tp(){return Wi||(Wi=1,(()=>{var e={170:(o,a,i)=>{const c=i(510),l=()=>{if(typeof navigator<"u"&&navigator.platform){const f=navigator.platform.toLowerCase();return f==="win32"||f==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};function u(f,p,m=!1){return p&&(p.windows===null||p.windows===void 0)&&(p={...p,windows:l()}),c(f,p,m)}Object.assign(u,c),o.exports=u},154:o=>{const a="\\\\/",i=`[^${a}]`,c="\\.",l="\\+",u="\\?",f="\\/",p="(?=.)",m="[^/]",h=`(?:${f}|$)`,_=`(?:^|${f})`,y=`${c}{1,2}${h}`,v=`(?!${c})`,b=`(?!${_}${y})`,C=`(?!${c}{0,1}${h})`,j=`(?!${y})`,x=`[^.${f}]`,S=`${m}*?`,P={DOT_LITERAL:c,PLUS_LITERAL:l,QMARK_LITERAL:u,SLASH_LITERAL:f,ONE_CHAR:p,QMARK:m,END_ANCHOR:h,DOTS_SLASH:y,NO_DOT:v,NO_DOTS:b,NO_DOT_SLASH:C,NO_DOTS_SLASH:j,QMARK_NO_DOT:x,STAR:S,START_ANCHOR:_,SEP:"/"},N={...P,SLASH_LITERAL:`[${a}]`,QMARK:i,STAR:`${i}*?`,DOTS_SLASH:`${c}{1,2}(?:[${a}]|$)`,NO_DOT:`(?!${c})`,NO_DOTS:`(?!(?:^|[${a}])${c}{1,2}(?:[${a}]|$))`,NO_DOT_SLASH:`(?!${c}{0,1}(?:[${a}]|$))`,NO_DOTS_SLASH:`(?!${c}{1,2}(?:[${a}]|$))`,QMARK_NO_DOT:`[^.${a}]`,START_ANCHOR:`(?:^|[${a}])`,END_ANCHOR:`(?:[${a}]|$)`,SEP:"\\"},A={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};o.exports={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:A,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(R){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${R.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(R){return R===!0?N:P}}},697:(o,a,i)=>{const c=i(154),l=i(96),{MAX_LENGTH:u,POSIX_REGEX_SOURCE:f,REGEX_NON_SPECIAL_CHARS:p,REGEX_SPECIAL_CHARS_BACKREF:m,REPLACEMENTS:h}=c,_=(b,C)=>{if(typeof C.expandRange=="function")return C.expandRange(...b,C);b.sort();const j=`[${b.join("-")}]`;try{new RegExp(j)}catch{return b.map(S=>l.escapeRegex(S)).join("..")}return j},y=(b,C)=>`Missing ${b}: "${C}" - use "\\\\${C}" to match literal characters`,v=(b,C)=>{if(typeof b!="string")throw new TypeError("Expected a string");b=h[b]||b;const j={...C},x=typeof j.maxLength=="number"?Math.min(u,j.maxLength):u;let S=b.length;if(S>x)throw new SyntaxError(`Input length: ${S}, exceeds maximum allowed length: ${x}`);const E={type:"bos",value:"",output:j.prepend||""},P=[E],N=j.capture?"":"?:",A=c.globChars(j.windows),R=c.extglobChars(A),{DOT_LITERAL:O,PLUS_LITERAL:D,SLASH_LITERAL:$,ONE_CHAR:F,DOTS_SLASH:q,NO_DOT:V,NO_DOT_SLASH:J,NO_DOTS_SLASH:Z,QMARK:H,QMARK_NO_DOT:ee,STAR:ce,START_ANCHOR:me}=A,ae=G=>`(${N}(?:(?!${me}${G.dot?q:O}).)*?)`,ue=j.dot?"":V,z=j.dot?H:ee;let te=j.bash===!0?ae(j):ce;j.capture&&(te=`(${te})`),typeof j.noext=="boolean"&&(j.noextglob=j.noext);const T={input:b,index:-1,start:0,dot:j.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:P};b=l.removePrefix(b,T),S=b.length;const Q=[],le=[],be=[];let I=E,L;const Le=()=>T.index===S-1,W=T.peek=(G=1)=>b[T.index+G],X=T.advance=()=>b[++T.index]||"",je=()=>b.slice(T.index+1),Me=(G="",Y=0)=>{T.consumed+=G,T.index+=Y},we=G=>{T.output+=G.output!=null?G.output:G.value,Me(G.value)},Ce=()=>{let G=1;for(;W()==="!"&&(W(2)!=="("||W(3)==="?");)X(),T.start++,G++;return G%2===0?!1:(T.negated=!0,T.start++,!0)},Ue=G=>{T[G]++,be.push(G)},Ne=G=>{T[G]--,be.pop()},B=G=>{if(I.type==="globstar"){const Y=T.braces>0&&(G.type==="comma"||G.type==="brace"),M=G.extglob===!0||Q.length&&(G.type==="pipe"||G.type==="paren");G.type!=="slash"&&G.type!=="paren"&&!Y&&!M&&(T.output=T.output.slice(0,-I.output.length),I.type="star",I.value="*",I.output=te,T.output+=I.output)}if(Q.length&&G.type!=="paren"&&(Q[Q.length-1].inner+=G.value),(G.value||G.output)&&we(G),I&&I.type==="text"&&G.type==="text"){I.output=(I.output||I.value)+G.value,I.value+=G.value;return}G.prev=I,P.push(G),I=G},ge=(G,Y)=>{const M={...R[Y],conditions:1,inner:""};M.prev=I,M.parens=T.parens,M.output=T.output;const U=(j.capture?"(":"")+M.open;Ue("parens"),B({type:G,value:Y,output:T.output?"":F}),B({type:"paren",extglob:!0,value:X(),output:U}),Q.push(M)},Se=G=>{let Y=G.close+(j.capture?")":""),M;if(G.type==="negate"){let U=te;if(G.inner&&G.inner.length>1&&G.inner.includes("/")&&(U=ae(j)),(U!==te||Le()||/^\)+$/.test(je()))&&(Y=G.close=`)$))${U}`),G.inner.includes("*")&&(M=je())&&/^\.[^\\/.]+$/.test(M)){const ne=v(M,{...C,fastpaths:!1}).output;Y=G.close=`)${ne})${U})`}G.prev.type==="bos"&&(T.negatedExtglob=!0)}B({type:"paren",extglob:!0,value:L,output:Y}),Ne("parens")};if(j.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(b)){let G=!1,Y=b.replace(m,(M,U,ne,xe,Oe,ys)=>xe==="\\"?(G=!0,M):xe==="?"?U?U+xe+(Oe?H.repeat(Oe.length):""):ys===0?z+(Oe?H.repeat(Oe.length):""):H.repeat(ne.length):xe==="."?O.repeat(ne.length):xe==="*"?U?U+xe+(Oe?te:""):te:U?M:`\\${M}`);return G===!0&&(j.unescape===!0?Y=Y.replace(/\\/g,""):Y=Y.replace(/\\+/g,M=>M.length%2===0?"\\\\":M?"\\":"")),Y===b&&j.contains===!0?(T.output=b,T):(T.output=l.wrapOutput(Y,T,C),T)}for(;!Le();){if(L=X(),L==="\0")continue;if(L==="\\"){const M=W();if(M==="/"&&j.bash!==!0||M==="."||M===";")continue;if(!M){L+="\\",B({type:"text",value:L});continue}const U=/^\\+/.exec(je());let ne=0;if(U&&U[0].length>2&&(ne=U[0].length,T.index+=ne,ne%2!==0&&(L+="\\")),j.unescape===!0?L=X():L+=X(),T.brackets===0){B({type:"text",value:L});continue}}if(T.brackets>0&&(L!=="]"||I.value==="["||I.value==="[^")){if(j.posix!==!1&&L===":"){const M=I.value.slice(1);if(M.includes("[")&&(I.posix=!0,M.includes(":"))){const U=I.value.lastIndexOf("["),ne=I.value.slice(0,U),xe=I.value.slice(U+2),Oe=f[xe];if(Oe){I.value=ne+Oe,T.backtrack=!0,X(),!E.output&&P.indexOf(I)===1&&(E.output=F);continue}}}(L==="["&&W()!==":"||L==="-"&&W()==="]")&&(L=`\\${L}`),L==="]"&&(I.value==="["||I.value==="[^")&&(L=`\\${L}`),j.posix===!0&&L==="!"&&I.value==="["&&(L="^"),I.value+=L,we({value:L});continue}if(T.quotes===1&&L!=='"'){L=l.escapeRegex(L),I.value+=L,we({value:L});continue}if(L==='"'){T.quotes=T.quotes===1?0:1,j.keepQuotes===!0&&B({type:"text",value:L});continue}if(L==="("){Ue("parens"),B({type:"paren",value:L});continue}if(L===")"){if(T.parens===0&&j.strictBrackets===!0)throw new SyntaxError(y("opening","("));const M=Q[Q.length-1];if(M&&T.parens===M.parens+1){Se(Q.pop());continue}B({type:"paren",value:L,output:T.parens?")":"\\)"}),Ne("parens");continue}if(L==="["){if(j.nobracket===!0||!je().includes("]")){if(j.nobracket!==!0&&j.strictBrackets===!0)throw new SyntaxError(y("closing","]"));L=`\\${L}`}else Ue("brackets");B({type:"bracket",value:L});continue}if(L==="]"){if(j.nobracket===!0||I&&I.type==="bracket"&&I.value.length===1){B({type:"text",value:L,output:`\\${L}`});continue}if(T.brackets===0){if(j.strictBrackets===!0)throw new SyntaxError(y("opening","["));B({type:"text",value:L,output:`\\${L}`});continue}Ne("brackets");const M=I.value.slice(1);if(I.posix!==!0&&M[0]==="^"&&!M.includes("/")&&(L=`/${L}`),I.value+=L,we({value:L}),j.literalBrackets===!1||l.hasRegexChars(M))continue;const U=l.escapeRegex(I.value);if(T.output=T.output.slice(0,-I.value.length),j.literalBrackets===!0){T.output+=U,I.value=U;continue}I.value=`(${N}${U}|${I.value})`,T.output+=I.value;continue}if(L==="{"&&j.nobrace!==!0){Ue("braces");const M={type:"brace",value:L,output:"(",outputIndex:T.output.length,tokensIndex:T.tokens.length};le.push(M),B(M);continue}if(L==="}"){const M=le[le.length-1];if(j.nobrace===!0||!M){B({type:"text",value:L,output:L});continue}let U=")";if(M.dots===!0){const ne=P.slice(),xe=[];for(let Oe=ne.length-1;Oe>=0&&(P.pop(),ne[Oe].type!=="brace");Oe--)ne[Oe].type!=="dots"&&xe.unshift(ne[Oe].value);U=_(xe,j),T.backtrack=!0}if(M.comma!==!0&&M.dots!==!0){const ne=T.output.slice(0,M.outputIndex),xe=T.tokens.slice(M.tokensIndex);M.value=M.output="\\{",L=U="\\}",T.output=ne;for(const Oe of xe)T.output+=Oe.output||Oe.value}B({type:"brace",value:L,output:U}),Ne("braces"),le.pop();continue}if(L==="|"){Q.length>0&&Q[Q.length-1].conditions++,B({type:"text",value:L});continue}if(L===","){let M=L;const U=le[le.length-1];U&&be[be.length-1]==="braces"&&(U.comma=!0,M="|"),B({type:"comma",value:L,output:M});continue}if(L==="/"){if(I.type==="dot"&&T.index===T.start+1){T.start=T.index+1,T.consumed="",T.output="",P.pop(),I=E;continue}B({type:"slash",value:L,output:$});continue}if(L==="."){if(T.braces>0&&I.type==="dot"){I.value==="."&&(I.output=O);const M=le[le.length-1];I.type="dots",I.output+=L,I.value+=L,M.dots=!0;continue}if(T.braces+T.parens===0&&I.type!=="bos"&&I.type!=="slash"){B({type:"text",value:L,output:O});continue}B({type:"dot",value:L,output:O});continue}if(L==="?"){if(!(I&&I.value==="(")&&j.noextglob!==!0&&W()==="("&&W(2)!=="?"){ge("qmark",L);continue}if(I&&I.type==="paren"){const U=W();let ne=L;(I.value==="("&&!/[!=<:]/.test(U)||U==="<"&&!/<([!=]|\w+>)/.test(je()))&&(ne=`\\${L}`),B({type:"text",value:L,output:ne});continue}if(j.dot!==!0&&(I.type==="slash"||I.type==="bos")){B({type:"qmark",value:L,output:ee});continue}B({type:"qmark",value:L,output:H});continue}if(L==="!"){if(j.noextglob!==!0&&W()==="("&&(W(2)!=="?"||!/[!=<:]/.test(W(3)))){ge("negate",L);continue}if(j.nonegate!==!0&&T.index===0){Ce();continue}}if(L==="+"){if(j.noextglob!==!0&&W()==="("&&W(2)!=="?"){ge("plus",L);continue}if(I&&I.value==="("||j.regex===!1){B({type:"plus",value:L,output:D});continue}if(I&&(I.type==="bracket"||I.type==="paren"||I.type==="brace")||T.parens>0){B({type:"plus",value:L});continue}B({type:"plus",value:D});continue}if(L==="@"){if(j.noextglob!==!0&&W()==="("&&W(2)!=="?"){B({type:"at",extglob:!0,value:L,output:""});continue}B({type:"text",value:L});continue}if(L!=="*"){(L==="$"||L==="^")&&(L=`\\${L}`);const M=p.exec(je());M&&(L+=M[0],T.index+=M[0].length),B({type:"text",value:L});continue}if(I&&(I.type==="globstar"||I.star===!0)){I.type="star",I.star=!0,I.value+=L,I.output=te,T.backtrack=!0,T.globstar=!0,Me(L);continue}let G=je();if(j.noextglob!==!0&&/^\([^?]/.test(G)){ge("star",L);continue}if(I.type==="star"){if(j.noglobstar===!0){Me(L);continue}const M=I.prev,U=M.prev,ne=M.type==="slash"||M.type==="bos",xe=U&&(U.type==="star"||U.type==="globstar");if(j.bash===!0&&(!ne||G[0]&&G[0]!=="/")){B({type:"star",value:L,output:""});continue}const Oe=T.braces>0&&(M.type==="comma"||M.type==="brace"),ys=Q.length&&(M.type==="pipe"||M.type==="paren");if(!ne&&M.type!=="paren"&&!Oe&&!ys){B({type:"star",value:L,output:""});continue}for(;G.slice(0,3)==="/**";){const jn=b[T.index+4];if(jn&&jn!=="/")break;G=G.slice(3),Me("/**",3)}if(M.type==="bos"&&Le()){I.type="globstar",I.value+=L,I.output=ae(j),T.output=I.output,T.globstar=!0,Me(L);continue}if(M.type==="slash"&&M.prev.type!=="bos"&&!xe&&Le()){T.output=T.output.slice(0,-(M.output+I.output).length),M.output=`(?:${M.output}`,I.type="globstar",I.output=ae(j)+(j.strictSlashes?")":"|$)"),I.value+=L,T.globstar=!0,T.output+=M.output+I.output,Me(L);continue}if(M.type==="slash"&&M.prev.type!=="bos"&&G[0]==="/"){const jn=G[1]!==void 0?"|$":"";T.output=T.output.slice(0,-(M.output+I.output).length),M.output=`(?:${M.output}`,I.type="globstar",I.output=`${ae(j)}${$}|${$}${jn})`,I.value+=L,T.output+=M.output+I.output,T.globstar=!0,Me(L+X()),B({type:"slash",value:"/",output:""});continue}if(M.type==="bos"&&G[0]==="/"){I.type="globstar",I.value+=L,I.output=`(?:^|${$}|${ae(j)}${$})`,T.output=I.output,T.globstar=!0,Me(L+X()),B({type:"slash",value:"/",output:""});continue}T.output=T.output.slice(0,-I.output.length),I.type="globstar",I.output=ae(j),I.value+=L,T.output+=I.output,T.globstar=!0,Me(L);continue}const Y={type:"star",value:L,output:te};if(j.bash===!0){Y.output=".*?",(I.type==="bos"||I.type==="slash")&&(Y.output=ue+Y.output),B(Y);continue}if(I&&(I.type==="bracket"||I.type==="paren")&&j.regex===!0){Y.output=L,B(Y);continue}(T.index===T.start||I.type==="slash"||I.type==="dot")&&(I.type==="dot"?(T.output+=J,I.output+=J):j.dot===!0?(T.output+=Z,I.output+=Z):(T.output+=ue,I.output+=ue),W()!=="*"&&(T.output+=F,I.output+=F)),B(Y)}for(;T.brackets>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing","]"));T.output=l.escapeLast(T.output,"["),Ne("brackets")}for(;T.parens>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing",")"));T.output=l.escapeLast(T.output,"("),Ne("parens")}for(;T.braces>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing","}"));T.output=l.escapeLast(T.output,"{"),Ne("braces")}if(j.strictSlashes!==!0&&(I.type==="star"||I.type==="bracket")&&B({type:"maybe_slash",value:"",output:`${$}?`}),T.backtrack===!0){T.output="";for(const G of T.tokens)T.output+=G.output!=null?G.output:G.value,G.suffix&&(T.output+=G.suffix)}return T};v.fastpaths=(b,C)=>{const j={...C},x=typeof j.maxLength=="number"?Math.min(u,j.maxLength):u,S=b.length;if(S>x)throw new SyntaxError(`Input length: ${S}, exceeds maximum allowed length: ${x}`);b=h[b]||b;const{DOT_LITERAL:E,SLASH_LITERAL:P,ONE_CHAR:N,DOTS_SLASH:A,NO_DOT:R,NO_DOTS:O,NO_DOTS_SLASH:D,STAR:$,START_ANCHOR:F}=c.globChars(j.windows),q=j.dot?O:R,V=j.dot?D:R,J=j.capture?"":"?:",Z={negated:!1,prefix:""};let H=j.bash===!0?".*?":$;j.capture&&(H=`(${H})`);const ee=ue=>ue.noglobstar===!0?H:`(${J}(?:(?!${F}${ue.dot?A:E}).)*?)`,ce=ue=>{switch(ue){case"*":return`${q}${N}${H}`;case".*":return`${E}${N}${H}`;case"*.*":return`${q}${H}${E}${N}${H}`;case"*/*":return`${q}${H}${P}${N}${V}${H}`;case"**":return q+ee(j);case"**/*":return`(?:${q}${ee(j)}${P})?${V}${N}${H}`;case"**/*.*":return`(?:${q}${ee(j)}${P})?${V}${H}${E}${N}${H}`;case"**/.*":return`(?:${q}${ee(j)}${P})?${E}${N}${H}`;default:{const z=/^(.*?)\.(\w+)$/.exec(ue);if(!z)return;const te=ce(z[1]);return te?te+E+z[2]:void 0}}},me=l.removePrefix(b,Z);let ae=ce(me);return ae&&j.strictSlashes!==!0&&(ae+=`${P}?`),ae},o.exports=v},510:(o,a,i)=>{const c=i(716),l=i(697),u=i(96),f=i(154),p=h=>h&&typeof h=="object"&&!Array.isArray(h),m=(h,_,y=!1)=>{if(Array.isArray(h)){const P=h.map(A=>m(A,_,y));return A=>{for(const R of P){const O=R(A);if(O)return O}return!1}}const v=p(h)&&h.tokens&&h.input;if(h===""||typeof h!="string"&&!v)throw new TypeError("Expected pattern to be a non-empty string");const b=_||{},C=b.windows,j=v?m.compileRe(h,_):m.makeRe(h,_,!1,!0),x=j.state;delete j.state;let S=()=>!1;if(b.ignore){const P={..._,ignore:null,onMatch:null,onResult:null};S=m(b.ignore,P,y)}const E=(P,N=!1)=>{const{isMatch:A,match:R,output:O}=m.test(P,j,_,{glob:h,posix:C}),D={glob:h,state:x,regex:j,posix:C,input:P,output:O,match:R,isMatch:A};return typeof b.onResult=="function"&&b.onResult(D),A===!1?(D.isMatch=!1,N?D:!1):S(P)?(typeof b.onIgnore=="function"&&b.onIgnore(D),D.isMatch=!1,N?D:!1):(typeof b.onMatch=="function"&&b.onMatch(D),N?D:!0)};return y&&(E.state=x),E};m.test=(h,_,y,{glob:v,posix:b}={})=>{if(typeof h!="string")throw new TypeError("Expected input to be a string");if(h==="")return{isMatch:!1,output:""};const C=y||{},j=C.format||(b?u.toPosixSlashes:null);let x=h===v,S=x&&j?j(h):h;return x===!1&&(S=j?j(h):h,x=S===v),(x===!1||C.capture===!0)&&(C.matchBase===!0||C.basename===!0?x=m.matchBase(h,_,y,b):x=_.exec(S)),{isMatch:!!x,match:x,output:S}},m.matchBase=(h,_,y)=>(_ instanceof RegExp?_:m.makeRe(_,y)).test(u.basename(h)),m.isMatch=(h,_,y)=>m(_,y)(h),m.parse=(h,_)=>Array.isArray(h)?h.map(y=>m.parse(y,_)):l(h,{..._,fastpaths:!1}),m.scan=(h,_)=>c(h,_),m.compileRe=(h,_,y=!1,v=!1)=>{if(y===!0)return h.output;const b=_||{},C=b.contains?"":"^",j=b.contains?"":"$";let x=`${C}(?:${h.output})${j}`;h&&h.negated===!0&&(x=`^(?!${x}).*$`);const S=m.toRegex(x,_);return v===!0&&(S.state=h),S},m.makeRe=(h,_={},y=!1,v=!1)=>{if(!h||typeof h!="string")throw new TypeError("Expected a non-empty string");let b={negated:!1,fastpaths:!0};return _.fastpaths!==!1&&(h[0]==="."||h[0]==="*")&&(b.output=l.fastpaths(h,_)),b.output||(b=l(h,_)),m.compileRe(b,_,y,v)},m.toRegex=(h,_)=>{try{const y=_||{};return new RegExp(h,y.flags||(y.nocase?"i":""))}catch(y){if(_&&_.debug===!0)throw y;return/$^/}},m.constants=f,o.exports=m},716:(o,a,i)=>{const c=i(96),{CHAR_ASTERISK:l,CHAR_AT:u,CHAR_BACKWARD_SLASH:f,CHAR_COMMA:p,CHAR_DOT:m,CHAR_EXCLAMATION_MARK:h,CHAR_FORWARD_SLASH:_,CHAR_LEFT_CURLY_BRACE:y,CHAR_LEFT_PARENTHESES:v,CHAR_LEFT_SQUARE_BRACKET:b,CHAR_PLUS:C,CHAR_QUESTION_MARK:j,CHAR_RIGHT_CURLY_BRACE:x,CHAR_RIGHT_PARENTHESES:S,CHAR_RIGHT_SQUARE_BRACKET:E}=i(154),P=R=>R===_||R===f,N=R=>{R.isPrefix!==!0&&(R.depth=R.isGlobstar?1/0:1)},A=(R,O)=>{const D=O||{},$=R.length-1,F=D.parts===!0||D.scanToEnd===!0,q=[],V=[],J=[];let Z=R,H=-1,ee=0,ce=0,me=!1,ae=!1,ue=!1,z=!1,te=!1,T=!1,Q=!1,le=!1,be=!1,I=!1,L=0,Le,W,X={value:"",depth:0,isGlob:!1};const je=()=>H>=$,Me=()=>Z.charCodeAt(H+1),we=()=>(Le=W,Z.charCodeAt(++H));for(;H<$;){W=we();let ge;if(W===f){Q=X.backslashes=!0,W=we(),W===y&&(T=!0);continue}if(T===!0||W===y){for(L++;je()!==!0&&(W=we());){if(W===f){Q=X.backslashes=!0,we();continue}if(W===y){L++;continue}if(T!==!0&&W===m&&(W=we())===m){if(me=X.isBrace=!0,ue=X.isGlob=!0,I=!0,F===!0)continue;break}if(T!==!0&&W===p){if(me=X.isBrace=!0,ue=X.isGlob=!0,I=!0,F===!0)continue;break}if(W===x&&(L--,L===0)){T=!1,me=X.isBrace=!0,I=!0;break}}if(F===!0)continue;break}if(W===_){if(q.push(H),V.push(X),X={value:"",depth:0,isGlob:!1},I===!0)continue;if(Le===m&&H===ee+1){ee+=2;continue}ce=H+1;continue}if(D.noext!==!0&&(W===C||W===u||W===l||W===j||W===h)===!0&&Me()===v){if(ue=X.isGlob=!0,z=X.isExtglob=!0,I=!0,W===h&&H===ee&&(be=!0),F===!0){for(;je()!==!0&&(W=we());){if(W===f){Q=X.backslashes=!0,W=we();continue}if(W===S){ue=X.isGlob=!0,I=!0;break}}continue}break}if(W===l){if(Le===l&&(te=X.isGlobstar=!0),ue=X.isGlob=!0,I=!0,F===!0)continue;break}if(W===j){if(ue=X.isGlob=!0,I=!0,F===!0)continue;break}if(W===b){for(;je()!==!0&&(ge=we());){if(ge===f){Q=X.backslashes=!0,we();continue}if(ge===E){ae=X.isBracket=!0,ue=X.isGlob=!0,I=!0;break}}if(F===!0)continue;break}if(D.nonegate!==!0&&W===h&&H===ee){le=X.negated=!0,ee++;continue}if(D.noparen!==!0&&W===v){if(ue=X.isGlob=!0,F===!0){for(;je()!==!0&&(W=we());){if(W===v){Q=X.backslashes=!0,W=we();continue}if(W===S){I=!0;break}}continue}break}if(ue===!0){if(I=!0,F===!0)continue;break}}D.noext===!0&&(z=!1,ue=!1);let Ce=Z,Ue="",Ne="";ee>0&&(Ue=Z.slice(0,ee),Z=Z.slice(ee),ce-=ee),Ce&&ue===!0&&ce>0?(Ce=Z.slice(0,ce),Ne=Z.slice(ce)):ue===!0?(Ce="",Ne=Z):Ce=Z,Ce&&Ce!==""&&Ce!=="/"&&Ce!==Z&&P(Ce.charCodeAt(Ce.length-1))&&(Ce=Ce.slice(0,-1)),D.unescape===!0&&(Ne&&(Ne=c.removeBackslashes(Ne)),Ce&&Q===!0&&(Ce=c.removeBackslashes(Ce)));const B={prefix:Ue,input:R,start:ee,base:Ce,glob:Ne,isBrace:me,isBracket:ae,isGlob:ue,isExtglob:z,isGlobstar:te,negated:le,negatedExtglob:be};if(D.tokens===!0&&(B.maxDepth=0,P(W)||V.push(X),B.tokens=V),D.parts===!0||D.tokens===!0){let ge;for(let Se=0;Se<q.length;Se++){const G=ge?ge+1:ee,Y=q[Se],M=R.slice(G,Y);D.tokens&&(Se===0&&ee!==0?(V[Se].isPrefix=!0,V[Se].value=Ue):V[Se].value=M,N(V[Se]),B.maxDepth+=V[Se].depth),(Se!==0||M!=="")&&J.push(M),ge=Y}if(ge&&ge+1<R.length){const Se=R.slice(ge+1);J.push(Se),D.tokens&&(V[V.length-1].value=Se,N(V[V.length-1]),B.maxDepth+=V[V.length-1].depth)}B.slashes=q,B.parts=J}return B};o.exports=A},96:(o,a,i)=>{const{REGEX_BACKSLASH:c,REGEX_REMOVE_BACKSLASH:l,REGEX_SPECIAL_CHARS:u,REGEX_SPECIAL_CHARS_GLOBAL:f}=i(154);a.isObject=p=>p!==null&&typeof p=="object"&&!Array.isArray(p),a.hasRegexChars=p=>u.test(p),a.isRegexChar=p=>p.length===1&&a.hasRegexChars(p),a.escapeRegex=p=>p.replace(f,"\\$1"),a.toPosixSlashes=p=>p.replace(c,"/"),a.removeBackslashes=p=>p.replace(l,m=>m==="\\"?"":m),a.escapeLast=(p,m,h)=>{const _=p.lastIndexOf(m,h);return _===-1?p:p[_-1]==="\\"?a.escapeLast(p,m,_-1):`${p.slice(0,_)}\\${p.slice(_)}`},a.removePrefix=(p,m={})=>{let h=p;return h.startsWith("./")&&(h=h.slice(2),m.prefix="./"),h},a.wrapOutput=(p,m={},h={})=>{const _=h.contains?"":"^",y=h.contains?"":"$";let v=`${_}(?:${p})${y}`;return m.negated===!0&&(v=`(?:^(?!${v}).*$)`),v},a.basename=(p,{windows:m}={})=>{const h=p.split(m?/[\\/]/:"/"),_=h[h.length-1];return _===""?h[h.length-2]:_}}},t={};function r(o){var a=t[o];if(a!==void 0)return a.exports;var i=t[o]={exports:{}},c=!0;try{e[o](i,i.exports,r),c=!1}finally{c&&delete t[o]}return i.exports}typeof r<"u"&&(r.ab=__dirname+"/");var n=r(170);so.exports=n})()),so.exports}var Gi;function tx(){return Gi||(Gi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}t(e,{hasLocalMatch:function(){return o},matchLocalPattern:function(){return n}});const r=tp();function n(a,i){if(a.search!==void 0&&a.search!==i.search)return!1;var c;return!!(0,r.makeRe)((c=a.pathname)!=null?c:"**",{dot:!0}).test(i.pathname)}function o(a,i){if(!a)return!0;const c=new URL(i,"http://n");return a.some(l=>n(l,c))}}(no)),no}var oo={},Ki;function rx(){return Ki||(Ki=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}t(e,{hasRemoteMatch:function(){return o},matchRemotePattern:function(){return n}});const r=tp();function n(a,i){if(a.protocol!==void 0){const l=i.protocol.slice(0,-1);if(a.protocol!==l)return!1}if(a.port!==void 0&&a.port!==i.port)return!1;if(a.hostname===void 0)throw new Error(`Pattern should define hostname but found
17
+ `+JSON.stringify(a));if(!(0,r.makeRe)(a.hostname).test(i.hostname)||a.search!==void 0&&a.search!==i.search)return!1;var c;return!!(0,r.makeRe)((c=a.pathname)!=null?c:"**",{dot:!0}).test(i.pathname)}function o(a,i,c){return a.some(l=>c.hostname===l)||i.some(l=>n(l,c))}}(oo)),oo}var Qi;function rp(){return Qi||(Qi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}});const t=75;function r(o){let{config:a,src:i,width:c,quality:l}=o;var u;if(process.env.NODE_ENV!=="production"){const p=[];if(i||p.push("src"),c||p.push("width"),p.length>0)throw new Error("Next Image Optimization requires "+p.join(", ")+" to be provided. Make sure you pass them as props to the `next/image` component. Received: "+JSON.stringify({src:i,width:c,quality:l}));if(i.startsWith("//"))throw new Error('Failed to parse src "'+i+'" on `next/image`, protocol-relative URL (//) must be changed to an absolute URL (http:// or https://)');if(i.startsWith("/")&&a.localPatterns&&process.env.NODE_ENV!=="test"&&process.env.NEXT_RUNTIME!=="edge"){const{hasLocalMatch:m}=tx();if(!m(a.localPatterns,i))throw new Error("Invalid src prop ("+i+") on `next/image` does not match `images.localPatterns` configured in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns")}if(!i.startsWith("/")&&(a.domains||a.remotePatterns)){let m;try{m=new URL(i)}catch(h){throw console.error(h),new Error('Failed to parse src "'+i+'" on `next/image`, if using relative image it must start with a leading slash "/" or be an absolute URL (http:// or https://)')}if(process.env.NODE_ENV!=="test"&&process.env.NEXT_RUNTIME!=="edge"){const{hasRemoteMatch:h}=rx();if(!h(a.domains,a.remotePatterns,m))throw new Error("Invalid src prop ("+i+') on `next/image`, hostname "'+m.hostname+'" is not configured under images in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-host')}}if(l&&a.qualities&&!a.qualities.includes(l))throw new Error("Invalid quality prop ("+l+") on `next/image` does not match `images.qualities` configured in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-qualities")}const f=l||((u=a.qualities)==null?void 0:u.reduce((p,m)=>Math.abs(m-t)<Math.abs(p-t)?m:p))||t;return a.path+"?url="+encodeURIComponent(i)+"&w="+c+"&q="+f+(process.env.NEXT_DEPLOYMENT_ID?"&dpl="+process.env.NEXT_DEPLOYMENT_ID:"")}r.__next_img_default=!0;const n=r}(ro)),ro}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return j}});const r=Ve,n=qr,o=s,a=n._(g),i=r._(Go),c=r._(Jv()),l=Sa,u=ps,f=ex(),p=fs,m=Yu(),h=r._(rp()),_=process.env.__NEXT_IMAGE_OPTS;typeof window>"u"&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);function y(x,S,E,P,N,A,R){const O=x==null?void 0:x.src;if(!x||x["data-loaded-src"]===O)return;x["data-loaded-src"]=O,("decode"in x?x.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(!(!x.parentElement||!x.isConnected)){if(S!=="empty"&&N(!0),E!=null&&E.current){const $=new Event("load");Object.defineProperty($,"target",{writable:!1,value:x});let F=!1,q=!1;E.current({...$,nativeEvent:$,currentTarget:x,target:x,isDefaultPrevented:()=>F,isPropagationStopped:()=>q,persist:()=>{},preventDefault:()=>{F=!0,$.preventDefault()},stopPropagation:()=>{q=!0,$.stopPropagation()}})}if(P!=null&&P.current&&P.current(x),process.env.NODE_ENV!=="production"){const $=new URL(O,"http://n").searchParams.get("url")||O;if(x.getAttribute("data-nimg")==="fill"){if(!A&&(!R||R==="100vw")&&x.getBoundingClientRect().width/window.innerWidth<.6&&(R==="100vw"?(0,p.warnOnce)('Image with src "'+$+'" has "fill" prop and "sizes" prop of "100vw", but image is not rendered at full viewport width. Please adjust "sizes" to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes'):(0,p.warnOnce)('Image with src "'+$+'" has "fill" but is missing "sizes" prop. Please add it to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes')),x.parentElement){const{position:V}=window.getComputedStyle(x.parentElement),J=["absolute","fixed","relative"];J.includes(V)||(0,p.warnOnce)('Image with src "'+$+'" has "fill" and parent element with invalid "position". Provided "'+V+'" should be one of '+J.map(String).join(",")+".")}x.height===0&&(0,p.warnOnce)('Image with src "'+$+'" has "fill" and a height value of 0. This is likely because the parent element of the image has not been styled to have a set height.')}const F=x.height.toString()!==x.getAttribute("height"),q=x.width.toString()!==x.getAttribute("width");(F&&!q||!F&&q)&&(0,p.warnOnce)('Image with src "'+$+`" has either width or height modified, but not the other. If you use CSS to change the size of your image, also include the styles 'width: "auto"' or 'height: "auto"' to maintain the aspect ratio.`)}}})}function v(x){return a.use?{fetchPriority:x}:{fetchpriority:x}}const b=(0,a.forwardRef)((x,S)=>{let{src:E,srcSet:P,sizes:N,height:A,width:R,decoding:O,className:D,style:$,fetchPriority:F,placeholder:q,loading:V,unoptimized:J,fill:Z,onLoadRef:H,onLoadingCompleteRef:ee,setBlurComplete:ce,setShowAltText:me,sizesInput:ae,onLoad:ue,onError:z,...te}=x;return(0,o.jsx)("img",{...te,...v(F),loading:V,width:R,height:A,decoding:O,"data-nimg":Z?"fill":"1",className:D,style:$,sizes:N,srcSet:P,src:E,ref:(0,a.useCallback)(T=>{S&&(typeof S=="function"?S(T):typeof S=="object"&&(S.current=T)),T&&(z&&(T.src=T.src),process.env.NODE_ENV!=="production"&&(E||console.error('Image is missing required "src" property:',T),T.getAttribute("alt")===null&&console.error('Image is missing required "alt" property. Please add Alternative Text to describe the image for screen readers and search engines.')),T.complete&&y(T,q,H,ee,ce,J,ae))},[E,q,H,ee,ce,z,J,ae,S]),onLoad:T=>{const Q=T.currentTarget;y(Q,q,H,ee,ce,J,ae)},onError:T=>{me(!0),q!=="empty"&&ce(!0),z&&z(T)}})});function C(x){let{isAppRouter:S,imgAttributes:E}=x;const P={as:"image",imageSrcSet:E.srcSet,imageSizes:E.sizes,crossOrigin:E.crossOrigin,referrerPolicy:E.referrerPolicy,...v(E.fetchPriority)};return S&&i.default.preload?(i.default.preload(E.src,P),null):(0,o.jsx)(c.default,{children:(0,o.jsx)("link",{rel:"preload",href:E.srcSet?void 0:E.src,...P},"__nimg-"+E.src+E.srcSet+E.sizes)})}const j=(0,a.forwardRef)((x,S)=>{const P=!(0,a.useContext)(m.RouterContext),N=(0,a.useContext)(f.ImageConfigContext),A=(0,a.useMemo)(()=>{var ee;const ce=_||N||u.imageConfigDefault,me=[...ce.deviceSizes,...ce.imageSizes].sort((z,te)=>z-te),ae=ce.deviceSizes.sort((z,te)=>z-te),ue=(ee=ce.qualities)==null?void 0:ee.sort((z,te)=>z-te);return{...ce,allSizes:me,deviceSizes:ae,qualities:ue}},[N]),{onLoad:R,onLoadingComplete:O}=x,D=(0,a.useRef)(R);(0,a.useEffect)(()=>{D.current=R},[R]);const $=(0,a.useRef)(O);(0,a.useEffect)(()=>{$.current=O},[O]);const[F,q]=(0,a.useState)(!1),[V,J]=(0,a.useState)(!1),{props:Z,meta:H}=(0,l.getImgProps)(x,{defaultLoader:h.default,imgConf:A,blurComplete:F,showAltText:V});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(b,{...Z,unoptimized:H.unoptimized,placeholder:H.placeholder,fill:H.fill,onLoadRef:D,onLoadingCompleteRef:$,setBlurComplete:q,setShowAltText:J,sizesInput:x.sizes,ref:S}),H.priority?(0,o.jsx)(C,{isAppRouter:P,imgAttributes:Z}):null]})});(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(zo,zo.exports);var nx=zo.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var f in u)Object.defineProperty(l,f,{enumerable:!0,get:u[f]})}t(e,{default:function(){return c},getImageProps:function(){return i}});const r=Ve,n=Sa,o=nx,a=r._(rp());function i(l){const{props:u}=(0,n.getImgProps)(l,{defaultLoader:a.default,imgConf:process.env.__NEXT_IMAGE_OPTS});for(const[f,p]of Object.entries(u))p===void 0&&delete u[f];return{props:u}}const c=o.Image})(Zf);var sx=Zf;const sn=k.getDefaultExportFromCjs(sx),ox=({item:e,CONSTANTS:t})=>{const r=e.icon?t.PAYMENT_FLAGS.includes(e.icon)?"payment":"social":null,n=r==="payment"?t.PAYMENT_FLAGS_DICTIONARY[e.icon]:e.icon;return e.link?s.jsxs(Xe,{href:e.link,target:"_blank",rel:"noopener noreferrer",className:_e["support-item"],children:[e.image&&s.jsx("img",{src:e.image,alt:"",loading:"lazy"}),r==="payment"?s.jsx(sn,{alt:n,src:`/assets/${n}.svg`,width:20,height:20}):s.jsx(d.Icon,{size:"small",name:n})]}):s.jsxs("div",{className:_e["support-item"],children:[e.image&&s.jsx("img",{src:e.image,alt:"",loading:"lazy"}),r==="payment"?s.jsx(sn,{alt:n,src:`/assets/${n}.svg`,width:20,height:20}):s.jsx(d.Icon,{size:"small",name:n})]})},ax=({content:e,CONSTANTS:t})=>s.jsx("div",{className:_e["support-container"],children:e==null?void 0:e.map((r,n)=>s.jsxs("div",{"data-device":r.device,className:_e["support-section"],children:[s.jsxs("div",{className:_e["support-text"],children:[r.title&&s.jsx("h3",{children:r.title}),r.description&&s.jsx("p",{children:r.description})]}),Array.isArray(r.items)&&r.items.length&&s.jsx("div",{className:_e["support-items"],"data-gap":r.gap,children:r.items.map((o,a)=>s.jsx(ox,{item:o,CONSTANTS:t},`footer-support-item-${a}`))})]},`footer-support-${n}`))}),ix=({name:e,nameIcon:t,maxWidth:r,rowAlignContent:n,columnAlignContent:o,columnAlignItems:a,textAlignContent:i,textAlignItems:c,children:l})=>s.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:n,alignItems:n},columnWrapper:{alignContent:o,alignItems:a}},children:s.jsxs(d.TextStructure.DivWrapper,{alignContent:i,alignItems:c,className:_e.footer__column,children:[s.jsxs("div",{className:t?_e.footer__columnTitleIcon:_e.footer__columnTitle,children:[s.jsx(d.Icon,{name:`${t}`,size:"small"}),e&&s.jsx("div",{children:e})]}),s.jsx("div",{className:_e.footer__columnContent,style:{maxWidth:`${r}px`},children:l})]})}),cx=({name:e,nameIcon:t,maxWidth:r,children:n,ICONS:o,...a})=>s.jsxs(d.Accordion.Wrapper,{className:_e.accordionWrapper,title:"accordion-wrapper",...a,children:[s.jsx(d.Accordion.Header,{id:(a==null?void 0:a.id)??"",className:_e.accordionHeader,closeIndicator:s.jsx(d.Icon,{name:o.arrow_up,size:"medium"}),openIndicator:s.jsx(d.Icon,{name:o.arrow_down,size:"medium"}),title:"accordion-header",children:s.jsx(d.TextStructure.Root,{children:s.jsxs(d.TextStructure.DivWrapper,{className:t?_e.accordionTextWrapper:"",children:[s.jsx(d.Icon,{name:`${t}`,size:"medium"}),s.jsx("h2",{className:"typography-style-body-md",children:e})]})})}),s.jsx(d.Accordion.Body,{title:"accordion-body",children:s.jsx(d.TextStructure.Root,{children:s.jsx(d.TextStructure.DivWrapper,{className:_e.footer__columnContent,style:{maxWidth:`${r}px`},children:n})})})]}),ao=e=>{const{isMobile:t}=oe();return t?s.jsx(cx,{...e}):s.jsx(ix,{...e})},zn=({type:e,children:t,className:r,collumnName:n,collumnNameIcon:o,icons:a,iconLink:i,iconSize:c,link:l,paymentDisclaimer:u,paymentTitle:f,rowAlignContent:p,columnAlignContent:m,columnAlignItems:h,textAlignContent:_,textAlignItems:y,...v})=>{let b;const{handleSelectContent:C}=ie(),{nextimage:j}=pe();switch(e){case"menu":b=s.jsx(Xe,{className:_e.footer__itemLink,href:l??"#",prefetch:!1,children:s.jsx("span",{onClick:()=>{C({content:`footer:${n}:${t}`})},children:t})});break;case"payment":b=s.jsxs("div",{className:d.helpers.classNameConcat(_e.payment,_e.footer__itemSmallText),...v,children:[u,s.jsxs("div",{className:d.helpers.classNameConcat(_e.footer__iconContainer,_e.footer__iconListSubHeader),children:[f,s.jsx("div",{className:_e.footer__iconList,children:a==null?void 0:a.map((x,S)=>s.jsx(j,{alt:x,src:`/assets/${x}.svg`,width:c??20,height:c??20},S))})]})]});break;case"social-media":b=s.jsx("div",{className:_e.footer__iconContainer,...v,children:s.jsx("div",{className:_e.footer__iconList,children:i==null?void 0:i.map((x,S)=>s.jsx(Xe,{prefetch:!1,href:x.link??"#",target:"_blank",children:s.jsx(d.Icon,{size:"medium",name:x.icon,onClick:()=>C({content:`footer:redes-sociais:${x.icon}`})})},S))})});break;default:b=s.jsx("div",{className:r,...v,children:t})}return s.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:p,alignItems:p},columnWrapper:{alignContent:m,alignItems:h}},...v,children:s.jsx(d.TextStructure.DivWrapper,{alignContent:_,alignItems:y,className:d.helpers.classNameConcat(_e.footer__item,r),children:b})})},lx=({className:e,text:t,...r})=>s.jsx("div",{...r,className:d.helpers.classNameConcat(_e.footer__legalInformation,e),children:s.jsx("span",{children:t})}),np=()=>{const{nextimage:e}=pe();return s.jsx("div",{className:_e["footer--stamps"],children:s.jsx(e,{alt:"Empresa B",className:_e["footer--stamps--company"],src:"/images/Footer/new_certfB.png",width:56,height:64})})};np.displayName="Footer.Stamps";const sp=({children:e,legalTextSlot:t,adornment:r,className:n,...o})=>{const{isMobile:a}=oe(),i=g.Children.toArray(e).filter(Boolean),c=i.length;return s.jsxs("div",{className:_e.footer__main,children:[(r==null?void 0:r.top)&&s.jsx("div",{className:_e.footer__top,children:r==null?void 0:r.top}),c>0&&s.jsx("div",{...o,className:d.helpers.classNameConcat(_e.footer__wrapper,n),children:i.map((l,u)=>s.jsx("div",{style:{flexGrow:1,maxWidth:`calc(100% / ${a?1:"fit-content"})`},children:l},u))}),(r==null?void 0:r.bottom)&&s.jsx("div",{className:_e.footer__bottom,children:r.bottom}),t&&s.jsx("div",{className:_e.footer__legalText,children:t})]})};sp.displayName="Footer.Wrapper";const op=({data:{links:{links:e}},payments:t,socialInfo:r,socialMedias:n,adornment:o,LEGAL_INFORMATION_TEXT:a,ICONS:i,className:c,hasFooterStamps:l})=>{var u;return s.jsxs(sp,{className:c,adornment:o,legalTextSlot:s.jsx(lx,{text:a}),children:[Array.isArray(e.column)&&e.column.map((f,p)=>s.jsx(ao,{id:`${p}column-menu`,name:f.name,nameIcon:f.nameIcon,ICONS:i,children:f.items.map((m,h)=>s.jsx(zn,{type:"menu",link:m.link,collumnName:f.name,collumnNameIcon:f.nameIcon,children:m.text},h))},p)),t&&((u=t.acceptedFlags)==null?void 0:u.length)>0&&s.jsx(ao,{id:"payment-column",name:t==null?void 0:t.title,nameIcon:t==null?void 0:t.titleIcon,maxWidth:150,ICONS:i,children:s.jsx(zn,{type:"payment",paymentDisclaimer:t==null?void 0:t.text,paymentTitle:t==null?void 0:t.flagsTitle,iconSize:16,icons:t==null?void 0:t.acceptedFlags})}),s.jsxs(ao,{id:"social-media-column",name:r==null?void 0:r.title,ICONS:i,children:[r!=null&&r.subTitle?s.jsx(zn,{children:r==null?void 0:r.subTitle}):null,s.jsx(zn,{type:"social-media",iconSize:24,iconLink:n}),l&&s.jsx(np,{})]})]})};op.displayName="Footer";const ux=Object.freeze(Object.defineProperty({__proto__:null,Footer:op,FooterSupport:ax},Symbol.toStringTag,{value:"Module"})),dx=()=>{const{colorName:e}=We();return s.jsx(d.TextStructure.Root,{children:s.jsx(d.TextStructure.DivWrapper,{className:e.length===0?"":k.styles["accessibility-info"],children:s.jsx("p",{children:e})})})},ms=({className:e,titleId:t})=>{var o,a,i;const{productName:r,tag:n}=We();return s.jsxs("div",{className:d.helpers.classNameConcat(k.styles.header,e),children:[n!=null&&n.commercial?s.jsx(d.Tag,{size:"small",title:(o=n.commercial)==null?void 0:o.value,variant:"quaternary",adornment:{start:(a=n.commercial)!=null&&a.icon?s.jsx(d.Icon,{name:n.commercial.icon}):null},children:(i=n.commercial)==null?void 0:i.value}):null,s.jsx(d.TextStructure.Root,{children:s.jsx(d.TextStructure.DivWrapper,{children:s.jsx("h1",{id:t,children:r})})})]})};ms.displayName="PDP.PDPHeader";const Ea=({layout:e="horizontal"})=>{const{price:t,listPrice:r,installments:n}=We(),{count:o,value:a}=n,i=k.formatPriceToCurrency(r??0,!0),c=k.formatPriceToCurrency(t??0,!0),l=k.formatPriceToCurrency(a??0);return s.jsx(d.ProductInfo.Root,{size:"small",layout:e,children:s.jsxs(d.ProductInfo.Wrapper,{layout:e,size:"small",className:k.styles["price-wrapper"],children:[s.jsx(d.ProductInfo.ValuesWrapper,{children:t!==r?s.jsxs(s.Fragment,{children:[s.jsx(d.ProductInfo.Price,{label:"originalPrice",value:i.toString(),size:"small"}),s.jsx(d.ProductInfo.Price,{label:"discountPrice",value:c.toString(),size:"small"})]}):s.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:c.toString(),size:"small"})}),o&&o>1&&a?s.jsx(d.ProductInfo.Price,{label:"installment",value:`ou ${o}x ${l}`,size:"small"}):null]})})},Bo=({onAddCallBack:e,onDisabledClickCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:n})=>{const o=mn(),{productId:a,productData:i,price:c,listPrice:l,thumbImage:u,isKit:f}=We(),{isMobile:p}=oe(),{addToCart:m}=Pe(),{sendDataLayerEvent:h}=ie(),_=!f&&(!o.sku||!o.available),y=()=>{if(_&&typeof t=="function"){t();return}typeof e=="function"&&e({id:o.sku,quantity:o.quantity,seller:o.sellerId,sku:a}),m({id:o.sku,quantity:o.quantity,seller:o.sellerId},{id:a,texture:u==null?void 0:u.imageUrl}),h({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...i,price:c,listPrice:l}]},supportData:{selectedSkus:[o]},customData:{quantity:o.quantity}}})};return s.jsx(d.Button,{className:k.styles["add-to-cart"],size:p?(r==null?void 0:r.mobile)??"large":(r==null?void 0:r.desktop)??"x-large",onClick:y,children:o.sku&&o.available?`${n.add_to_cart}`:`${n.select_size}`})},fx=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t})=>{const{isMobile:r}=oe(),n=mn(),{sizesContainerRef:o}=bc(),{structureRef:a}=Ae();return n.sku&&n.available?s.jsx(Bo,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t}):s.jsx(d.Button,{className:k.styles["add-to-cart"],size:r?(e==null?void 0:e.mobile)??"large":(e==null?void 0:e.desktop)??"x-large",onClick:()=>{o.current&&a.current&&window.document.body.scrollTo({top:o.current.offsetTop-a.current.offsetHeight,behavior:"smooth"})},children:n.sku&&n.available?t.add_to_cart:t.select_size})},Bn=({value:e,label:t,suppressHydrationWarning:r=!1},n)=>{const o={value:e,...r&&{suppressHydrationWarning:!0}},a=n==="compact"?o:{...o,label:t};return s.jsx(d.Timer.Digit,{...a})},Xn=({dateEnd:e,dateInit:t,type:r="default",TIME_ZONE:n,...o})=>{const[a,i]=g.useState(bu(new po.TZDate(Date.now(),n),new po.TZDate(e,n))),[c,l]=g.useState(!1);if(g.useEffect(()=>{l(!0);const h=setInterval(()=>{i(_=>_<=0?(clearInterval(h),0):_-1e3)},1e3);return()=>clearInterval(h)},[]),!c||a<=0)return s.jsx(s.Fragment,{});const u=Qr(a,"days"),f=Qr(a,"hours"),p=Qr(a,"minutes"),m=Qr(a);return s.jsxs(d.Timer.Root,{...o,children:[u?s.jsxs(s.Fragment,{children:[Bn({value:u,label:"dias"},r),s.jsx(d.Timer.Separator,{})]}):null,Bn({value:f,label:"horas"},r),s.jsx(d.Timer.Separator,{}),Bn({value:p,label:"min"},r),s.jsx(d.Timer.Separator,{}),Bn({value:m,label:"segs",suppressHydrationWarning:!0},r)]})},Pa=({TIME_ZONE:e})=>{const{tag:t}=We(),r=t==null?void 0:t.flagGoldenPdp,n=g.useMemo(()=>{var o;if((o=r==null?void 0:r.tagImage)!=null&&o.includes("player.vimeo")){const a=r.tagImage.split("?")[1],i=a==null?void 0:a.split("&"),c=i==null?void 0:i.filter(u=>u.includes("loc")||u.includes("signature")||u.includes("user_id")),l=c==null?void 0:c.join("&");return`${r.tagImage.split("?")[0]}?${l}`}return r==null?void 0:r.tagImage},[r==null?void 0:r.tagImage]);return r!=null&&r.enableTag?s.jsxs("div",{className:k.styles["golden-tag"],style:(r==null?void 0:r.backgroundSelect)==="color"?{backgroundColor:r==null?void 0:r.backgroundColor}:(r==null?void 0:r.backgroundSelect)==="image"?{backgroundImage:`url(${r==null?void 0:r.tagImage})`}:void 0,children:[(r==null?void 0:r.backgroundSelect)==="video"&&s.jsx("div",{className:k.styles["golden-tag-video"],children:s.jsx(De.Video,{src:n,autoPlay:!0,muted:!0,loop:!0,playsInline:!0})}),s.jsxs("div",{className:k.styles["golden-tag-content"],children:[s.jsx("span",{className:k.styles["golden-tag-content-text"],style:{color:r==null?void 0:r.textColor},children:r==null?void 0:r.value}),(r==null?void 0:r.countDownEndDate)&&s.jsx(Xn,{mode:r==null?void 0:r.timerMode,size:"x-small",type:"compact",dateEnd:new Date((r==null?void 0:r.countDownEndDate)??""),TIME_ZONE:e})]})]}):null};Pa.displayName="PDP.GoldenTag";const px=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t,TIME_ZONE:r,Z_INDEX_WAR:n})=>{const{isMobile:o}=oe();return o?s.jsxs(d.Card,{className:k.styles["bottom-navigation"],shadow:!0,style:{zIndex:n.pdp_bottom_navigation},children:[s.jsxs("div",{className:k.styles["bottom-navigation__header"],children:[s.jsx(Pa,{TIME_ZONE:r}),s.jsxs("div",{className:k.styles["bottom-navigation__header-content"],children:[s.jsx(ms,{}),s.jsx(Ea,{layout:"name-vertical"})]})]}),s.jsx(fx,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t})]}):null},mx=({children:e,setShowBottomNavigation:t})=>{const r=g.useRef(null),n=Qo(r),o=g.useRef(n);return g.useEffect(()=>{var i;const{top:a}=((i=r.current)==null?void 0:i.getBoundingClientRect())??{top:0};o.current!==n&&a>0&&(t(!n),o.current=n)},[n]),s.jsx("div",{ref:r,style:{width:"100%"},children:e})},hx=({ICONS:e})=>{const{isMobile:t}=oe(),{price:r,listPrice:n,productData:o,productId:a}=We(),{sendDataLayerEvent:i}=ie(),c=Hr(),{toggleProduct:l}=gr();return s.jsx(d.Button,{adornment:{start:s.jsx(d.Icon,{name:e[c.includes(a)?"favorite_true":"favorite_false"],size:"medium"})},className:k.styles["add-to-wishlist"],size:t?"medium":"x-large",variant:"tertiary",onClick:()=>{l(a),i({functionKey:"productEvents",data:{event:c.includes(a)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:"PDP"},commonData:{...o,price:r,listPrice:n}}})}})},ap=({showWishlist:e=!0,callBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:n,ICONS:o,TIME_ZONE:a,Z_INDEX_WAR:i})=>{const{isMobile:c}=oe(),[l,u]=g.useState(!0);return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:k.styles.actions,children:[c?s.jsx(mx,{setShowBottomNavigation:u,children:s.jsx(Bo,{onAddCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:n})}):s.jsx(Bo,{onAddCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:n}),e&&s.jsx(hx,{ICONS:o})]}),c&&l&&s.jsx(px,{addToCartBtnSize:r,BUY_BUTTON_LABELS:n,Z_INDEX_WAR:i,TIME_ZONE:a})]})},ip=({className:e,device:t,ICONS:r})=>{const{breadcrumbList:n,productName:o}=We(),a=i=>i.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return s.jsx(d.BreadCrumb.DivWrapper,{className:d.helpers.classNameConcat(k.styles.breadcrumb,[t==="mobile"?k.styles["breadcrumbs-mobile"]:k.styles["breadcrumbs-desktop"],e]),children:s.jsxs(d.BreadCrumb.List,{children:[Array.isArray(n)&&n.map((i,c)=>{const l=a(n.slice(0,c+1).map(u=>u.replace(/\s/g,"-").toLowerCase()).join("/"));return s.jsx(d.BreadCrumb.Item,{adornment:{end:s.jsx(d.Icon,{name:r.arrow_right})},role:"listitem",children:s.jsx(Xe,{href:`/${l}`,children:i})},`pdp-breadcrumb-${l}-${c}`)}),s.jsx(d.BreadCrumb.Item,{role:"listitem",className:d.helpers.classNameConcat(k.styles["breadcrumb--active"],e),children:o},"pdp-breadcrumb-productName")]})})};ip.displayName="PDP.BreadCrumb";const cp=({className:e})=>{var n;const{tag:t}=We(),r=t==null?void 0:t.flagPdp;return r&&((n=r==null?void 0:r.value)!=null&&n.length)?s.jsx(d.Tag,{className:d.helpers.classNameConcat(k.styles.credits,e),variant:"tertiary",title:r==null?void 0:r.value,size:"small",adornment:{start:r!=null&&r.enableIcon&&(r!=null&&r.icon)?s.jsx(d.Icon,{name:r==null?void 0:r.icon,style:{color:r==null?void 0:r.iconColor}}):null},style:{background:r==null?void 0:r.tagColor,color:r==null?void 0:r.textColor},children:r==null?void 0:r.value}):s.jsx(s.Fragment,{})};cp.displayName="PDPCredits";const _x=()=>{const{descriptionContent:e,productReference:t}=We(),[r,n]=g.useState("description");return s.jsxs(d.Tabs.Root,{className:k.styles["tabs-root-modifier"],children:[s.jsx(d.Tabs.TabList,{className:k.styles["tabs-list-modifier"],children:e==null?void 0:e.map(({label:o,value:a})=>s.jsx(d.Tabs.Item,{label:o,value:a,activeTab:r,onTabChange:n,size:"large",className:`${k.styles["tabs-item-modifier"]} ${r===a?k.styles["tabs-item-active"]:""}`},a))}),s.jsxs("div",{className:k.styles["content-wrapper"],children:[r==="description"?s.jsx("div",{children:s.jsxs("span",{className:k.styles.productref,children:["Ref:",t]})}):"",e==null?void 0:e.map(({value:o,content:a})=>r===o?s.jsx(d.Tabs.Panel,{className:`${k.styles["tabs-panel"]} ${r===o?k.styles["tabs-panel-enter"]:k.styles["tabs-panel-exit"]}`,children:s.jsx("div",{className:k.styles.content,dangerouslySetInnerHTML:{__html:a}})},o):null)]})]})},gx=({CURRENCY:e,DELIVERY_INFO_BOXES_ALLOWED:t,FREIGHT_CALCULATION:r,Z_INDEX_WAR:n})=>{const o=mn(),{isMobile:a}=oe();return s.jsxs(s.Fragment,{children:[a?s.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null,s.jsx(wf,{skuId:o.available?o.sku:"",size:a?r.inputSize.mobile:r.inputSize.desktop,quantity:o.quantity,sellerId:o.sellerId,seller:o.sellerName,local:"PDP",CONSTANTS_PROPS:{freightConfig:r,deliveryInfoBoxesAllowed:t,toolTipZIndex:n.modal,currency:e}}),a?s.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null]})},Xi=({image:e,index:t,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:n})=>{const o=k.resizingImg(e.imageUrl,n.pdp),{nextimage:a}=pe();return s.jsx(a,{src:o,alt:e.imageLabel,objectFit:"contain",...n.pdp,...t<=1&&{priority:!0,loading:"eager"},onClick:()=>{r(t)}},t)},yx=({video:e,productName:t,poster:r})=>{const{sendDataLayerEvent:n}=ie(),o=g.useRef(!1);return s.jsx(De.Video,{src:e,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,style:{zIndex:-1,aspectRatio:"2/3"},onPlaying:()=>{o.current||(o.current=!0,n({functionKey:"readyEvents",data:{event:"video_start",readyData:{product:t}}}))},poster:r})},lp=({images:e,video:t,handleZoom:r,productName:n,PRODUCT_IMAGE_DIMENSIONS:o})=>{var u,f;const{initialize:a,pagination:i,controller:c,itemsStyles:l}=d.Carousel.useCarousel({gap:0,itemsPerPage:1,loop:!1,direction:"row"});return s.jsxs(d.Carousel.Root,{innerRef:p=>{a(p)},className:k.styles["gallery-carousel-modifier"],children:[s.jsx(d.Carousel.Controller,{position:"absolute",top:"24px",bottom:"unset",left:"16px",children:s.jsx(d.Carousel.Bullets,{page:i.currentPage,total:e.length,onBulletClick:p=>c==null?void 0:c.navigateTo(p)})}),s.jsxs(d.Carousel.Body,{children:[s.jsx(d.Carousel.Item,{style:l,children:s.jsx(Xi,{image:e[0],index:0,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:o})},"PDP_gallery_0"),t&&s.jsx(d.Carousel.Item,{style:l,children:s.jsx(yx,{video:t,productName:n,...((u=e[1])==null?void 0:u.imageUrl)&&{poster:(f=e[1])==null?void 0:f.imageUrl}})},"PDP_gallery_video"),e.map((p,m)=>m===0?null:s.jsx(d.Carousel.Item,{style:l,children:s.jsx(Xi,{image:p,index:m,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:o})},`PDP_gallery_${m}`))]})]})};lp.displayName="PDP.Carousel";const vx="_thumbs_1954e_65",xx="_selected_1954e_92",bx="_carousel_1954e_164",jx="_bullets_1954e_201",Te={"image-zoom-wrapper-desktop":"_image-zoom-wrapper-desktop_1954e_1","button-close-container":"_button-close-container_1954e_10","button-close":"_button-close_1954e_10","main-image-container":"_main-image-container_1954e_22","image-desktop":"_image-desktop_1954e_52",thumbs:vx,selected:xx,"image-zoom-wrapper-mobile":"_image-zoom-wrapper-mobile_1954e_117","image-mobile":"_image-mobile_1954e_147","image-zoom--image":"_image-zoom--image_1954e_161",carousel:bx,"carousel-controller":"_carousel-controller_1954e_169","arrow-left":"_arrow-left_1954e_179","arrow-right":"_arrow-right_1954e_180",bullets:jx,"zoom-popup":"_zoom-popup_1954e_212","image-zoom--mobile":"_image-zoom--mobile_1954e_252","image-zoom--image--img":"_image-zoom--image--img_1954e_282"},Yi=({onClose:e,ICONS:t})=>s.jsx("div",{className:`${Te["button-close-container"]}`,children:s.jsx(d.Button,{iconNameStart:t.close,iconSize:"medium",className:`${Te["button-close"]}`,variant:"tertiary",state:"default",size:"medium",onClick:e,style:{textDecoration:"none"}})}),Cx=({children:e,Z_INDEX_WAR:t,...r})=>s.jsx("div",{...r,className:Te["image-zoom-wrapper-desktop"],style:{zIndex:t.pdp_image_zoom},children:e}),up=({images:e,setCurrent:t,setFirstImgLoaded:r,ICONS:n,PRODUCT_IMAGE_DIMENSIONS:o})=>{const{nextimage:a}=pe();let i=null;const c=g.useRef(null),{initialize:l,controller:u,pagination:f,itemsStyles:p}=d.Carousel.useCarousel({itemsPerPage:1,gap:10,loop:!1,direction:"row"}),m=_=>{u==null||u.navigateTo(_)},h=()=>{r(!0)};return g.useEffect(()=>{t(f.currentPage)},[f.currentPage,t]),s.jsxs(d.Carousel.Root,{innerRef:_=>{_&&!i&&(i=_,l(i))},className:Te.carousel,children:[s.jsxs(d.Carousel.Controller,{className:Te["carousel-controller"],children:[s.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.prevPage(),className:Te["arrow-left"],adornment:{start:s.jsx(d.Icon,{name:n.arrow_left})}}),s.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.nextPage(),className:Te["arrow-right"],adornment:{start:s.jsx(d.Icon,{name:n.arrow_right})}})]}),s.jsx(d.Carousel.Body,{children:Array.isArray(e)&&e.map((_,y)=>s.jsx(d.Carousel.Item,{style:p,children:s.jsx(a,{...o.image_zoom.mobile,...y===0&&{priority:!0,loading:"eager"},ref:c,className:Te.imageMobile,src:_.imageUrl,alt:_.imageText,quality:100,...y===0&&{onLoad:h}})},y))}),s.jsx(d.Carousel.Bullets,{className:Te.bullets,page:f.currentPage,total:f.totalPages,onBulletClick:m})]})};up.displayName="ImageZoom.Mobile.Carousel";const dp=({imgRef:e,image:t,PRODUCT_IMAGE_DIMENSIONS:r})=>{Ic();const{nextimage:n}=pe();return s.jsx("div",{className:Te["image-zoom--image"],ref:e,children:s.jsx(n,{...r.image_zoom.mobile,alt:t.imageText,className:Te["image-zoom--image--img"],quality:100,src:t.imageUrl})})};dp.displayName="ImageZoom.ImageZoom";const fp=({loaded:e=!1})=>s.jsx("div",{className:Te["zoom-popup"],"data-loaded":e,children:s.jsxs("svg",{width:"38",height:"39",viewBox:"0 0 38 39",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.93 5.382a3.711 3.711 0 0 1 2.55-1.007c.949 0 1.864.36 2.549 1.007a3.534 3.534 0 0 1 1.113 2.472v11.357l10.118 3.332c.587.193 1.1.56 1.465 1.053.366.494.565 1.089.566 1.7v.004c0 .22-.025.44-.075.653v.005l-2.98 12.52a.625.625 0 0 1-1.215-.29l2.977-12.515v-.002c.029-.122.043-.247.044-.372a1.619 1.619 0 0 0-.321-.958 1.729 1.729 0 0 0-.851-.61L24.32 20.257a.625.625 0 0 1-.43-.594V7.88a2.285 2.285 0 0 0-.72-1.59 2.462 2.462 0 0 0-1.691-.665c-.635 0-1.241.24-1.69.666a2.285 2.285 0 0 0-.722 1.59v19.04a.625.625 0 0 1-1.115.388l-.056-.071-.161-.202a178.922 178.922 0 0 0-2.333-2.858l-.002-.002a2.581 2.581 0 0 0-.897-.69 2.677 2.677 0 0 0-1.122-.25H12.37c-.307 0-.61.078-.874.225a1.712 1.712 0 0 0-.635.61 1.625 1.625 0 0 0-.016 1.653l7.128 12.296a.625.625 0 0 1-1.082.627L9.762 26.35a2.876 2.876 0 0 1 .027-2.924 2.962 2.962 0 0 1 1.098-1.057 3.05 3.05 0 0 1 1.482-.384h1.016c.57.002 1.133.127 1.648.368.515.24.97.59 1.33 1.024.514.614 1.026 1.239 1.455 1.768V7.855a3.535 3.535 0 0 1 1.113-2.473ZM6.446 10.22a.625.625 0 0 1 0 .884l-5.324 5.324a.625.625 0 0 1-.884-.884l5.324-5.324a.625.625 0 0 1 .884 0Z"}),s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.68 12.033c.345 0 .625.28.625.625v2.703h2.702a.625.625 0 1 1 0 1.25H.68a.625.625 0 0 1-.625-.625v-3.328c0-.345.28-.625.625-.625ZM16.429.237a.625.625 0 0 1 0 .884l-5.325 5.324a.625.625 0 0 1-.884-.883L15.545.237a.625.625 0 0 1 .884 0Z"}),s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.034.68c0-.346.28-.626.625-.626h3.328c.345 0 .625.28.625.625v3.328a.625.625 0 1 1-1.25 0V1.304h-2.703a.625.625 0 0 1-.625-.625Z"})]})});fp.displayName="ImageZoom.ZoomPopup";const pp=({images:e,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:r,...n})=>{const[o,a]=g.useState(!1),[i,c]=g.useState(0),{containerRef:l,imgRef:u,scale:f}=Rc({defaultScale:1,maxScale:3});return s.jsxs("div",{...n,className:Te["image-mobile"],"data-disable-carrousel-pan":f>1,children:[s.jsx(fp,{loaded:o}),s.jsx(up,{images:e,setCurrent:c,setFirstImgLoaded:a,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:r}),s.jsx("div",{className:Te["image-zoom--mobile"],ref:l,children:s.jsx(dp,{imgRef:u,image:e[i],PRODUCT_IMAGE_DIMENSIONS:r})})]})};pp.displayName="ImageZoom.ImageMobile";const Sx=({children:e,Z_INDEX_WAR:t,...r})=>s.jsx("div",{...r,className:Te["image-zoom-wrapper-mobile"],style:{zIndex:t.pdp_image_zoom},children:e}),Ex="_modal_1u87b_1",Et={modal:Ex,"quick-shop__modal":"_quick-shop__modal_1u87b_4","shop-bag":"_shop-bag_1u87b_9","modal-product-body":"_modal-product-body_1u87b_25","pdp-main__info-modifier":"_pdp-main__info-modifier_1u87b_32","modal-header":"_modal-header_1u87b_38","modal-header__title":"_modal-header__title_1u87b_41"};function Px({headerTitle:e,isMobile:t,ICONS:r}){return s.jsx(d.Modal.Header,{navigation:"top",className:Et["modal-header"],children:s.jsxs(d.Modal.Controls,{navigation:"top",isMobile:t,children:[s.jsx("div",{className:Et["modal-header__title"],children:s.jsx(d.Modal.Title,{navigation:"top",className:Et["quick-shop__title"],title:e})}),s.jsx(d.Button,{className:Et["modal-header__close-button"],"data-close":!0,iconNameStart:r.close,size:"small",variant:"tertiary"})]})})}const mp=({PDP_INFO:e,PLP_SIZE_ORDER:t,ICONS:r,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:i})=>{const{sizes:c,productId:l,handleViewItemEvent:u}=We(),f=g.useMemo(()=>c!=null&&c.length?pd({items:c,getLabel:x=>x.value,PLP_SIZE_ORDER:t}):[],[c]),{sizesContainerRef:p}=bc(),{isMobile:m}=oe(),h=mn(),_=fl(),{setValue:y}=ll(),{setValue:v}=ta(),b=g.useRef({}),[C,j]=g.useState(null);return s.jsxs("div",{ref:p,className:d.helpers.classNameConcat(k.styles.sizes,"PDP_sizes"),children:[s.jsx("span",{className:k.styles["sections-title"],children:e.product.size_title}),s.jsx("div",{children:f.map(x=>(!x.available&&!b.current[x.value]&&(b.current[x.value]={disable:!x.available,size:x.value,skuID:x.sku}),s.jsxs(d.ToggleSize.Wrapper,{size:m?"medium":"large",title:x.value,outOfStock:!x.available,onClick:()=>{x.available||(j({skuID:x.sku,size:x.value,disable:!0}),v(!0)),h.sku!==x.sku&&(y({...h,productId:l,name:x.name,size:x.value,sku:x.sku,sellerId:x.sellerId,sellerName:x.sellerName,available:x.available}),u({sku:x.sku,size:x.value}))},active:h.sku===x.sku,children:[s.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),s.jsx(d.ToggleSize.Text,{children:x==null?void 0:x.value})]},`sizes-${x.sku}-${x.value}`)))}),s.jsx(fa,{open:_,setVisible:v,sku:C,setSku:j,skus:Object.values(b.current),ICONS:r,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:i})]})},Xr=({children:e,className:t,type:r})=>s.jsx("div",{className:d.helpers.classNameConcat(k.styles["pdp-main__info-subsection"],[k.styles[`subsection-${r}`],t]),children:e}),hp=({children:e,className:t})=>{const{structureRef:r,tipbarRef:n}=Ae(),o=g.useMemo(()=>{var c,l;const a=((c=r.current)==null?void 0:c.clientHeight)||0,i=((l=n.current)==null?void 0:l.clientHeight)||0;return a+i},[r,n]);return s.jsx("div",{className:d.helpers.classNameConcat(k.styles["pdp-main__info"],t),id:"pdpmaininfo",style:{top:o},children:e})},wx=({children:e,link:t,TOGGLE_STYLE_MODIFIER:r})=>{const{isMobile:n}=oe(),{router:o}=pe(),a=()=>{t&&o.push(t)},i=g.useRef(null);return s.jsx(d.ToggleStyle.Wrapper,{size:n?"medium":"small",style:{...r,border:`${i.current===t?"2":"1"}`,overflow:"hidden",padding:"0"},onClick:a,active:i.current===t,children:e})},_p=({productId:e,similars:t,TOGGLE_STYLE_MODIFIER:r})=>{const{thumbImage:n}=We(),o=[{productId:e,slug:"",textureImage:(n==null?void 0:n.imageUrl)??"",textureAlt:(n==null?void 0:n.imageText)??""},...t];return s.jsx("div",{children:o.map((a,i)=>a.textureImage?s.jsxs(wx,{link:a.slug?a.slug:null,TOGGLE_STYLE_MODIFIER:r,children:[s.jsx(d.ToggleStyle.DisabledAdornment,{}),s.jsx(d.ToggleStyle.Texture,{children:s.jsx(De.Image,{alt:a.textureAlt,src:a.textureImage,height:34,width:34,style:{borderRadius:0,height:"100%"}})})]},`similars-item-${i}`):null)})},gp=({TEXTURE_IMAGE:e,TOGGLE_STYLE_MODIFIER:t})=>{const{productId:r}=We(),[n,o]=g.useState([]),a=new Map;return g.useEffect(()=>{if(r){if(a.has(r)){o(a.get(r));return}fetch("/api/catalog/product/similars",{method:"POST",body:JSON.stringify({productId:r,filterTexture:e})}).then(i=>i.json()).then(({data:i})=>{Array.isArray(i)&&i.length===0||(a.set(r,i),o(i))}).catch(i=>{console.error(i)})}},[r]),s.jsxs("div",{className:k.styles.similars,children:[s.jsx("span",{className:k.styles["sections-title"],children:"Cor"}),s.jsx(_p,{productId:r,similars:n,TOGGLE_STYLE_MODIFIER:t})]})};gp.displayName="PDP.Info.Similars";const Nx=({callBackProductAdded:e,BUY_BUTTON_LABELS:t,ICONS:r,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:o,PDP_INFO:a,PLP_SIZE_ORDER:i,PRODUCT_CARD_TEXTS:c,TEXTURE_IMAGE:l,TIME_ZONE:u,TOGGLE_STYLE_MODIFIER:f,Z_INDEX_WAR:p})=>s.jsx(d.Modal.Body,{className:Et["modal-product-body"],children:s.jsxs(hp,{className:Et["pdp-main__info-modifier"],children:[s.jsxs(Xr,{type:"product-info",children:[s.jsx(ms,{}),s.jsx(Ea,{})]}),s.jsx(Xr,{type:"similars",children:s.jsx(gp,{TEXTURE_IMAGE:l,TOGGLE_STYLE_MODIFIER:f})}),s.jsx(Xr,{type:"sizes",children:s.jsx(mp,{ICONS:r,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:o,PDP_INFO:a,PLP_SIZE_ORDER:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:p})}),s.jsx(Xr,{type:"actions",children:s.jsx(ap,{showWishlist:!1,callBack:e,addToCartBtnSize:{mobile:"medium",desktop:"large"},BUY_BUTTON_LABELS:t,ICONS:r,TIME_ZONE:u,Z_INDEX_WAR:p})})]})});function Ix({callBackProductAdded:e,QUICKSHOP:t,ICONS:r,...n}){const[o,a]=g.useState(!1),i=()=>a(c=>!c);return s.jsxs("div",{className:Et["quick-shop"],children:[s.jsx(d.Button,{onClick:i,size:"x-large",className:Et["shop-bag"],iconNameStart:r.bag,iconSize:"medium"}),s.jsxs(d.Modal.Root,{isOpen:o,setIsOpen:a,className:`${Et.modal} ${Et["quick-shop__modal"]}`,style:{position:"fixed",height:"100svh",width:"100%",top:0,zIndex:1e3,bottom:"unset",overflowY:"hidden"},variant:"sideRight",children:[s.jsx(Px,{headerTitle:t.title,ICONS:r}),s.jsx(Nx,{callBackProductAdded:e,ICONS:r,...n})]})]})}const Rx=({image:e})=>s.jsx(sn,{src:k.resizingImg(e.imageUrl,{width:50,height:75})||"",alt:e.imageText,className:Te.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:10,style:{position:"absolute",inset:0,filter:"blur(10px)"}}),Tx=({images:e,selectedImageIndex:t,PRODUCT_IMAGE_DIMENSIONS:r,...n})=>{const[o,a]=g.useState(!1),{nextimage:i}=pe();return s.jsx("div",{...n,className:Te["main-image-container"],children:s.jsxs("div",{className:Te["image-desktop"],children:[!o&&s.jsx(Rx,{image:e==null?void 0:e[t]}),s.jsx(i,{src:k.resizingImg(e==null?void 0:e[t].imageUrl,{...r.image_zoom.desktop})||"",alt:e==null?void 0:e[t].imageText,className:Te.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:100,onLoad:()=>{a(!0)}})]})})},Ax=({images:e,onThumbnailClick:t,selectedImageIndex:r})=>{const{nextimage:n}=pe();return s.jsx("div",{className:Te.thumbs,children:e.map((o,a)=>s.jsx("div",{role:"button",tabIndex:0,onClick:()=>t(a),onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&t(a)},className:a===r?Te.selected:"",children:s.jsx(n,{src:o.imageUrl,alt:o.imageText,layout:"responsive",width:100,height:100,objectFit:"cover",priority:!1})},a))})},yp=({images:e,initialSelectedImageIndex:t=0,setShowImageZoom:r,ICONS:n,PRODUCT_IMAGE_DIMENSIONS:o,Z_INDEX_WAR:a,...i})=>{const{isMobile:c}=oe(),[l,u]=g.useState(t),f=p=>{u(p)};return c?s.jsxs(Sx,{Z_INDEX_WAR:a,children:[s.jsx(Yi,{onClose:()=>r({show:!1,initialIndex:0}),ICONS:n}),s.jsx(pp,{images:e,ICONS:n,PRODUCT_IMAGE_DIMENSIONS:o})]}):s.jsxs(Cx,{Z_INDEX_WAR:a,children:[s.jsx(Yi,{onClose:()=>r({show:!1,initialIndex:0}),ICONS:n}),s.jsx(Tx,{images:e,selectedImageIndex:l,onThumbnailClick:f,PRODUCT_IMAGE_DIMENSIONS:o},e[l].imageId??`${e[l].imageText}-${l}`),s.jsx(Ax,{images:e,selectedImageIndex:l,onThumbnailClick:f}),s.jsx(Ix,{callBackProductAdded:()=>{r({initialIndex:0,show:!1})},ICONS:n,Z_INDEX_WAR:a,...i})]})};yp.displayName="ImageZoom";const Ox=({productImgs:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})=>{const{video:n,productName:o}=We(),[a,i]=g.useState({show:!1,initialIndex:0});g.useEffect(()=>(a.show?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll"),()=>{document.body.classList.remove("no-scroll")}),[a]);const c=l=>{i({show:!0,initialIndex:l})};return s.jsxs(s.Fragment,{children:[s.jsx(lp,{images:e,video:n,handleZoom:c,productName:o,PRODUCT_IMAGE_DIMENSIONS:t}),a.show&&s.jsx(yp,{images:e,initialSelectedImageIndex:a.initialIndex,setShowImageZoom:i,PRODUCT_IMAGE_DIMENSIONS:t,...r})]})},vp=({TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})=>{const{images:n}=We(),o=g.useMemo(()=>{const a=n.filter(i=>!e.includes(i.imageLabel));return a.length>0?a:n},[]);return s.jsx(Ox,{productImgs:o,TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})};vp.displayName="PDP.Gallery";const Lx=({className:e,hasIcons:t=!0,ICONS:r,PDP_INFO:n})=>{const{allSizesAvailable:o,productId:a}=We(),{setValue:i}=ta(),{sendDataLayerEvent:c}=ie();return s.jsx("div",{className:d.helpers.classNameConcat(k.styles.links,e),id:"pdp-container","data-product-id":a,children:s.jsxs("div",{className:k.styles["links-wrapper"],children:[!o&&s.jsx(d.Button,{adornment:t?{start:s.jsx(d.Icon,{name:r.product})}:{},size:"x-small",variant:"tertiary",onClick:()=>i(!0),underline:!0,children:n.links_and_stepper.size_out_of_stock}),s.jsx(d.Button,{adornment:t?{start:s.jsx(d.Icon,{name:r.ruler})}:{},size:"x-small",variant:"tertiary",underline:!0,onClick:()=>{var l,u;(u=window.SizebayParams)==null||u.openChart((l=window.SizebayParams)==null?void 0:l.id),c({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:"pdp:guia-de-medidas"}}})},children:n.links_and_stepper.size_table_title}),s.jsx(d.Button,{size:"x-small",variant:"tertiary",className:"sizebay",underline:!0,onClick:()=>{var l,u;return(u=window.SizebayParams)==null?void 0:u.openVFR((l=window.SizebayParams)==null?void 0:l.id)},children:n.links_and_stepper.sizebay})]})})},kx=({children:e})=>s.jsx("div",{className:k.styles["pdp-main__info-main-content"],children:e}),Dx=({head:e,className:t})=>s.jsx("thead",{className:t,children:s.jsx("tr",{children:e.map((r,n)=>s.jsx("th",{children:r},`head-title-${n}`))})}),Mx=({rows:e,className:t})=>s.jsx("tbody",{className:t,children:e.map((r,n)=>s.jsx("tr",{children:r.map(o=>typeof o=="string"&&o.includes("blocks")?JSON.parse(o).blocks.map(a=>`${a.text}
18
+ `):o).map((o,a)=>s.jsx("td",{children:o},`cell-content-${a}`))},`row-content-${n}`))}),Fx="_tableContainer_1yxy2_1",zx={tableContainer:Fx},Bx=({children:e,className:t=""})=>s.jsx("table",{className:`${zx.tableContainer} ${t}`,children:e}),io={Head:Dx,Rows:Mx,Root:Bx},Ux=({title:e,text:t})=>s.jsxs("p",{className:k.styles.measurementRowsText,children:[s.jsx("h1",{className:k.styles.measurementRowsTitle,children:e}),t]}),qx=({ICONS:e,SIZES:t,Z_INDEX_WAR:r})=>{const n=hl(),{setValue:o}=_l();return s.jsx(d.Modal.Root,{isMobile:!0,style:{zIndex:r.modal},setIsOpen:o,isOpen:n,className:k.styles.measurementModal,children:s.jsx(d.Modal.Body,{children:s.jsxs("div",{className:k.styles.measurementContainer,children:[s.jsx("h1",{className:k.styles.measurementTitle,children:t.title}),s.jsxs("div",{className:k.styles.measurementContent,children:[s.jsx("div",{className:k.styles.measurementImageContainer,children:s.jsx(sn,{width:264,height:402,alt:"",className:k.styles.measurementImage,src:t.bannerImage})}),s.jsxs(io.Root,{className:k.styles.measurementTable,children:[s.jsx(io.Head,{className:k.styles.measurementHead,head:t.head}),s.jsx(io.Rows,{className:k.styles.measurementRows,rows:t.rows.map((a,i)=>[s.jsx(Ux,{title:t.descriptions[i].title,text:t.descriptions[i].text},i),...a])})]})]}),s.jsx(d.Button,{onClick:()=>o(!1),className:k.styles.measurementClose,variant:"tertiary",children:s.jsx(d.Icon,{name:e.close})})]})})},"minicart")},$x=({children:e,className:t,...r})=>s.jsx("div",{className:d.helpers.classNameConcat(k.styles["pdp-main__gallery-wrapper"],t),...r,children:e}),Hx=({children:e,className:t,...r})=>s.jsx("div",{className:d.helpers.classNameConcat(k.styles.pdp,t),...r,children:e}),Vx=({children:e,className:t,...r})=>s.jsx("div",{className:d.helpers.classNameConcat(k.styles["pdp-main"],t),...r,children:e}),Wx=({children:e,className:t,...r})=>s.jsx("div",{className:d.helpers.classNameConcat(k.styles["pdp-main__info-secondary-content"],t),...r,children:e}),Gx={gallery:$x,pdp:Hx,main:Vx,secondary:Wx},Kx=({className:e,...t})=>s.jsx(d.Utils.Divider,{...t,className:d.helpers.classNameConcat(k.styles.divider,e)}),Qx=Object.freeze(Object.defineProperty({__proto__:null,AccessibilityInfo:dx,Actions:ap,BreadCrumb:ip,Credits:cp,DescriptionsTabs:_x,Divider:Kx,Freight:gx,Gallery:vp,GoldenTag:Pa,Header:ms,Links:Lx,MainContent:kx,MainInfo:hp,Price:Ea,ProductMeasurements:qx,SimilarsItems:_p,Sizes:mp,SubSectionWrapper:Xr,containers:Gx},Symbol.toStringTag,{value:"Module"})),Xx=(e,t)=>{const[r,n]=Mf({items:e}),[o,a]=t.split(":").map(Number);return isNaN(o)||isNaN(a)?[r,n]:[r<o?r:o,n>a?n:a]},xp=g.createContext({}),bp=({children:e,fetch:t,queryKey:r,options:n})=>{const{data:o,isLoading:a,error:i}=x_({queryKey:r,queryFn:async()=>{const c=await t();if(!c.ok)throw new Error("[ROOT QUERY PROVIDER ERROR]: NOT LOAD!");return c.json()},...n});return s.jsx(xp.Provider,{value:g.useMemo(()=>({data:o,isLoading:a,isError:!!i}),[o,a,i]),children:e})},jp=()=>{const e=g.useContext(xp);if(e===void 0)throw new Error("useProductsContext must be used within a useRootContext");return e},Cp=g.createContext({}),Yx=({children:e,PLP_SORT_DEFAULT:t})=>{const{router:r}=pe(),{searchParams:n}=Be(),{data:o,isLoading:a,...i}=jp(),c=g.useCallback((h,_)=>{if(_){if(h.key.toLocaleLowerCase()==="price"){const y=_.getAll("facets");_.delete("facets"),y.forEach(v=>{const[b]=v.split("/");b!==h.key&&_.append("facets",v)})}_.set("page","1"),_.append("facets",`${h.key}/${h.value}`),r.push(`?${_.toString()}`)}},[r]),l=g.useCallback(()=>{const h=new URLSearchParams;h.set("sort",t),h.set("page","1"),r.push(`?${h.toString()}`)},[r,t]),u=g.useCallback((h,_)=>{if(!_||!_.has&&!_.has("facets"))return;const y=_.getAll("facets");_.delete("facets"),_.set("page","1"),y.forEach(v=>{const[b,C]=v.split("/");(b!==h.key||C!==h.value)&&_.append("facets",v)}),r.push(`?${_.toString()}`)},[r]),f=g.useCallback(h=>{const _=n?new URLSearchParams(n):new URLSearchParams;for(const[,y]of _.entries()){const[v,b]=y.split("/");if(v===h.key&&b===h.value)return u(h,_)}return c(h,_)},[c,u,n]),p=g.useCallback(h=>{const _=n?new URLSearchParams(n):new URLSearchParams;_.set("sort",h.replace("_",":")),r.push(`?${_.toString()}`)},[r,n]),m=o&&"data"in o?o.data:null;return s.jsx(Cp.Provider,{value:{...i,breadcrumb:(m==null?void 0:m.breadcrumb)??[],deleteAllFacets:l,facets:(m==null?void 0:m.facets)??[],isLoading:a,selectedFacets:k.getFacetsActiveSearchParams(n),onToggleFacet:f,onSort:p},children:e})},Zx=({children:e,...t})=>{const{state:r}=Be(),n=a=>a==="productclusterids"||a.startsWith("category-"),o=r.facets.filter(({key:a})=>n(a));return s.jsx(bp,{fetch:()=>fetch("/api/search/facets",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...r,facets:o})}),queryKey:["facets",r.base,r.term],options:{gcTime:1e3*60*30,refetchOnWindowFocus:!1,placeholderData:Hh,staleTime:1e3*60*30},children:s.jsx(Yx,{...t,children:e})})},Sp=()=>{const e=g.useContext(Cp);if(e===void 0)throw new Error("use QueryFacetsContext must be used within a QueryFacetsProvider");return e},Jx=()=>{var S;const{constants:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:n,PLP_FILTERS_TITLE:o,PLP_SIZE_ORDER:a},openFilters:i,setOpenFilters:c}=nt(),[l,u]=g.useState("10000:0"),{isMobile:f}=oe(),{sendDataLayerEvent:p}=ie(),{state:m}=Be(),{breadcrumb:h,deleteAllFacets:_,facets:y,isLoading:v,onToggleFacet:b}=Sp(),C=g.useRef(""),j={isLast:!0,href:(S=m.term)!=null&&S.length?`/${m.term}`:"",name:m.term},x=k.filterNonRootFacets(m.facets,m==null?void 0:m.base);return g.useEffect(()=>{const E=y.find(({key:P})=>P==="price");if(E){const[P,N]=Xx(E.values,l??"10000:0");u(`${P}:${N}`)}},[y,l,u]),g.useEffect(()=>{if(!x.length)return;const E=JSON.stringify(x);C.current!==E&&(C.current=E,p({functionKey:"filterEvent",data:{commonData:{selectedFacets:x}}}))},[x]),s.jsxs(Vn.teamComponents.Filter.Root,{CONSTANTS:{ICONS:e,PLP_FILTERS_TITLE:o,PLP_FILTERS:t},breadcrumb:h.length?h:[j],deleteAllFacets:_,filters:{facets:k.filterNonCategorySelected(y,m==null?void 0:m.base),selected:x},isMobile:f??!1,isLoading:v??!1,isOpen:i,price:l,onToggleFacet:b,setIsOpen:c,target:document.body,children:[s.jsx(Vn.teamComponents.Filter.Selected,{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r}),s.jsx(Vn.teamComponents.Filter.Content,{columns:2,CONSTANTS:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:n,PLP_SIZE_ORDER:a}})]})},Ep=()=>typeof document>"u"?null:s.jsx(Jx,{});Ep.displayName="Filters";const eb=({productCount:e,PLP_GRID_SCROLL_BACK:t})=>{g.useEffect(()=>{var a;const n=new URLSearchParams(window.location.search).get("page");if(e){const[i,c]=((a=sessionStorage.getItem(t.key))==null?void 0:a.split("-"))??["0",null],l=sessionStorage.getItem(t.refer);i&&l==="true"&&(c===(n||"null")&&window.document.body.scrollTo({top:parseInt(i,10),behavior:"smooth"}),sessionStorage.setItem(t.refer,"false"))}const o=()=>{e>0&&window.document.body.scrollTop&&sessionStorage.setItem(t.key,`${window.document.body.scrollTop.toString()}-${n}`)};return window.document.body.addEventListener("scroll",o,{passive:!0}),()=>{window.document.body.removeEventListener("scroll",o)}},[e])},Pp=g.createContext({}),tb=({children:e})=>{const{data:t,isLoading:r,...n}=jp(),o=t&&"data"in t?t.data:null;return s.jsx(Pp.Provider,{value:{...n,isLoading:r,products:(o==null?void 0:o.products)??[],pagination:(o==null?void 0:o.pagination)??wl,total:(o==null?void 0:o.pagination.count)??0},children:e})},wp=({children:e,forceUpdate:t,...r})=>s.jsx(bp,{fetch:()=>fetch("/api/search/product",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...r,forceUpdate:t})}),queryKey:["products",r.page,r.sort,JSON.stringify(r.facets)],options:{gcTime:1e3*60*30,staleTime:1e3*60*5,refetchOnWindowFocus:!1},children:s.jsx(tb,{children:e})}),hs=()=>{const e=g.useContext(Pp);if(e===void 0)throw new Error("useQueryProductsContext must be used within a QueryProductsProvider");return e},wa=({total:e=0})=>{const{constants:{SEARCH_TOTAL_PORTAL_ID:t}}=nt();if(typeof window>"u")return null;const r=document.getElementById(t);return r?Go.createPortal(s.jsxs("span",{children:["[",e,"] produto",e>1?"s":""]}),r):null};wa.displayName="PDC.Grid.NavigationTotal";const rb=()=>{const{isMobile:e}=oe(),{constants:t,mainSeller:r}=nt(),{isLoading:n,products:o,total:a}=hs(),{ICONS:i,PLP_GRID_SCROLL_BACK:c,PLP_NOT_RESULT:l}=t;return eb({productCount:(o==null?void 0:o.length)??0,PLP_GRID_SCROLL_BACK:c}),o?s.jsxs(s.Fragment,{children:[s.jsx(St.Products,{...t,isMobile:e??!1,items:o,StoreConfig_MainSellerId:r}),!o.length&&!n&&s.jsx(St.Empty,{ICONS:i,PLP_NOT_RESULT:l}),s.jsx(wa,{total:a})]}):null},Np=({infinite:e=!1})=>s.jsx("div",{className:dt["pdc--grid"],children:s.jsx("div",{className:dt["pdc--grid--content"],children:e?s.jsx(St.InfiniteScroller,{}):s.jsx(rb,{})})});Np.displayName="Grid";const br=e=>({centro:"center",esquerda:"start",direita:"end"})[e],Ip=({children:e,contentState:t,entityKey:r})=>{const{url:n}=t.getEntity(r).getData();return n?s.jsx(Xe,{href:n,children:e}):e},nb=(e,t,r)=>{e.findEntityRanges(n=>{const o=n.getEntity();return o===null?!1:r.getEntity(o).getType()==="LINK"},t)},Yn=e=>{const t=new gt.CompositeDecorator([{strategy:nb,component:Ip}]),r=gt.convertFromRaw(e);return gt.EditorState.createWithContent(r,t)},sb=e=>gt.convertFromRaw(e),Zn=gt.DefaultDraftBlockRenderMap.set("unstyled",{element:"div",aliasedElements:["div"]}),Zi="superior-direita",Un="dentro-inferior-centro",ob="inferior-direita",co="dentro-inferior-esquerda",Rp=e=>({position:e===Un||e===co?"absolute":"default",shouldRender:[Zi,Un,co].includes(e)?"top":"bottom",alignItems:[Un].includes(e)?"center":[Zi,ob].includes(e)?"flex-end":"flex-start",left:e===co?"16px":e===Un?"45%":"unset"}),ab=Object.freeze(Object.defineProperty({__proto__:null,CREATE_CONTENT:Yn,EXTENDED_BLOCK_RENDER_MAP:Zn,GET_CONTENT_STATE:sb,controllersPositionsAdapter:Rp},Symbol.toStringTag,{value:"Module"})),ib=({expanded:e,content:t})=>s.jsxs("details",{open:e,children:[t.textStructureReduced?s.jsx("summary",{onClick:r=>r.preventDefault(),children:s.jsx(gt.Editor,{editorKey:"draft-editor-1",blockRenderMap:Zn,editorState:t!=null&&t.textStructureReduced?Yn(JSON.parse(t.textStructureReduced)):gt.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):s.jsx(s.Fragment,{}),t.showTextStructureExpander&&t.textStructure?s.jsx(s.Fragment,{children:s.jsx(gt.Editor,{editorKey:"draft-editor-1",blockRenderMap:Zn,editorState:t.textStructure?Yn(JSON.parse(t.textStructure)):gt.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):s.jsx(s.Fragment,{})]}),cb="_textContentWrapper_176ht_5",lb="_textContentSection_176ht_13",Uo={"link-modifier":"_link-modifier_176ht_1",textContentWrapper:cb,textContentSection:lb},Tp=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:r})=>{var a;const[n,o]=g.useState(!1);return s.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:br(e.textStructureAlignment),alignItems:br(e.textStructureAlignment)},columnWrapper:{alignContent:br(e.textStructureAlignment),alignItems:br(e.textStructureAlignment)}},adornment:{bottom:e.showTextStructureExpander&&e.textStructure?s.jsx(d.Button,{variant:"tertiary",adornment:{end:s.jsx(d.Icon,{name:n?`${t.arrow_up}`:`${t.arrow_down}`})},onClick:()=>o(i=>!i),size:"small",children:n?(r==null?void 0:r.less)??"Ver Menos":(r==null?void 0:r.more)??"Ver Mais"}):s.jsx(s.Fragment,{})},children:s.jsxs(d.Utils.Column,{className:Uo.textContentWrapper,style:{alignItems:br(e.textStructureAlignment)},children:[s.jsx(d.TextStructure.DivWrapper,{style:{textAlign:br(e.textStructureAlignment)},mode:e.textStructureMode??"default",children:e.textStructureReduced?s.jsx(ib,{content:e,expanded:n}):s.jsx(s.Fragment,{})}),e.textStructureButtonLabel?s.jsx(Ye,{mode:e.textStructureMode??"default",href:e.textStructureButtonHref??"#",size:e.textStructureButtonSize,className:Uo["link-modifier"],adornments:(a=e.textStructureButtonIcon)!=null&&a.length&&e.enableIcon?{end:s.jsx(d.Icon,{name:e.textStructureButtonIcon})}:void 0,children:e.textStructureButtonLabel}):s.jsx(s.Fragment,{})]})})},ub=e=>({centro:{verticalAlignment:"center",horizontalAlignment:"center"},"centro-esquerda":{verticalAlignment:"center",horizontalAlignment:"start"},"centro-direita":{verticalAlignment:"center",horizontalAlignment:"end"},"superior-centro":{verticalAlignment:"start",horizontalAlignment:"center"},"superior-esquerda":{verticalAlignment:"start",horizontalAlignment:"start"},"superior-direita":{verticalAlignment:"start",horizontalAlignment:"end"},"inferior-centro":{verticalAlignment:"end",horizontalAlignment:"center"},"inferior-esquerda":{verticalAlignment:"end",horizontalAlignment:"start"},"inferior-direita":{verticalAlignment:"end",horizontalAlignment:"end"}})[e],Ji=e=>({centro:"center",esquerda:"start",direita:"end"})[e],ec={"content-modifier":"_content-modifier_16y4u_5","banner-image-wrapper-modifier":"_banner-image-wrapper-modifier_16y4u_13"},tc=({data:e,videoUrl:t,priority:r,videoRef:n,ICONS:o,TEXTCONTENT_EXPANDED:a,TIME_ZONE:i,className:c,...l})=>{const{video:u,image:f,imageHref:p,imageOpacity:m,altImage:h,backgroundColor:_,position:y,contentAlignment:v,showTimer:b,contentOrder:C,timerMode:j,timerEnd:x,timerInit:S,textStructure:E,textStructureReduced:P}=e.banner,N=(p==null?void 0:p.trim())||(f==null?void 0:f.trim())||null,{nextimage:A}=pe();return s.jsxs(d.Banner.Container,{...l,children:[s.jsxs(d.Banner.ImageWrapper,{className:ec["banner-image-wrapper-modifier"],style:m?{background:_}:void 0,children:[u&&s.jsx(De.Video,{videoRef:n,src:t,autoPlay:r,loop:!0,playsInline:!0,muted:!0}),N&&!(u!=null&&u.length)&&s.jsx(A,{src:N,width:"1920",height:"1080",alt:h??f??"",...r?{priority:r}:{},style:m?{opacity:"0"}:void 0}),!f&&!(u!=null&&u.length)&&s.jsx("div",{style:{background:_}})]}),b||P||E?s.jsx(d.Banner.Slot,{...ub(y??"centro"),className:d.helpers.classNameConcat(ec["content-modifier"],c),style:{textAlign:Ji(v)},children:s.jsxs(d.Utils.Column,{gap:"16px",alignItems:Ji(v),children:[b&&C==="timer-first"&&s.jsx(Xn,{mode:j??"default",size:"small",dateEnd:x?new Date(x):new Date,dateInit:S?new Date(S):new Date,TIME_ZONE:i}),s.jsx(Tp,{data:e.banner,ICONS:o,TEXTCONTENT_EXPANDED:a}),b&&C!=="timer-first"&&s.jsx(Xn,{mode:j??"default",size:"small",dateEnd:x?new Date(x):new Date,dateInit:S?new Date(S):new Date,TIME_ZONE:i})]})}):s.jsx(s.Fragment,{})]})};class pt extends g.Component{constructor(){super(...arguments);Cn(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(){return{hasError:!0,error:null}}componentDidCatch(r,n){if(process.env.NODE_ENV!=="production"){if(this.props.debugger)debugger;console.groupCollapsed("Error Boundary CMS",this.props.name),console.log("Error:",(r==null?void 0:r.message)??r),console.log("Error Info:",n),console.groupEnd()}}render(){const{hasError:r}=this.state,{children:n,fallback:o}=this.props;return r&&process.env.NODE_ENV==="production"?null:r&&o!==void 0?o:n}}const xn=({data:e,className:t,priority:r,creative:n,name:o,...a})=>{const{handleSelectPromotionEvent:i,currentLocalRef:c}=ie(),{banner:{promotion_name:l},index:u,componentIndex:f}=e,p=typeof u=="number"?`:${u+1}`:"",m={creative_name:n,creative_slot:`${n}-${c.current}:${f+1}${p}`,promotion_id:e.banner.href,promotion_name:l},h=g.useRef(null),_=g.useMemo(()=>{var v;if((v=e.banner.video)!=null&&v.includes("player.vimeo")){const b=e.banner.video.split("?")[1],C=b==null?void 0:b.split("&"),j=C==null?void 0:C.filter(S=>S.includes("loc")||S.includes("signature")||S.includes("user_id")),x=j==null?void 0:j.join("&");return`${e.banner.video.split("?")[0]}?${x}`}return e.banner.video},[e]),y=()=>{var v;(v=h.current)!=null&&v.paused&&h.current.play()};return s.jsx(pt,{name:o,children:s.jsx(cs,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...m,index:u}}}},observerOptions:{delay:100,..._&&{threshold:.1}},..._&&{callBackWhenVisible:y},children:e.banner.href?s.jsx(Xe,{href:e.banner.href,onClick:()=>{i({updatePromotionRef:!0,promotion:m,index:u})},children:s.jsx(tc,{data:e,videoUrl:_,priority:r,videoRef:h,className:t,...a})}):s.jsx(tc,{data:e,videoUrl:_,priority:r,videoRef:h,className:t,...a})})})},Na=e=>s.jsx(pt,{name:e.name,children:s.jsx(xn,{...e})}),db=g.createContext({}),Ap=()=>{const e=g.useContext(db);if(e===void 0)throw new Error("usePLPConstants must be used within a PLPConstantsProvider");return e},Op=({columns:e,count:t,gap:r,className:n})=>{var v;const{banners:o,pages:a,products:i}=vr(),{isMobile:c}=oe(),{banners:l}=ns(),{ICONS:u,PRODUCT_CARD_IMAGE_ASPECT_RATIO:f,TEXTCONTENT_EXPANDED:p,TIME_ZONE:m}=Ap(),h=((v=a[a.length-1])==null?void 0:v.products.length)??t,_=i[(a.length-1)*t+h-1],y=l.filter((b,C)=>o[C]<_);return Array.isArray(y)?y.map((b,C)=>s.jsx(et.Banner,{columns:b.columns,gap:r,isMobile:c??!1,position_grid:o[C]+1,totalColumns:e,PRODUCT_CARD_IMAGE_ASPECT_RATIO:f,children:s.jsx(xn,{name:"Banner Carousel",data:{banner:b,componentIndex:C},creative:"banner_grid",ICONS:u,TEXTCONTENT_EXPANDED:p,TIME_ZONE:m,className:n})},`${b.position_grid}-${C}`)):null};Op.displayName="PDC.InfiniteScroller.Banners";const Lp=e=>{var n;const{pages:t}=vr(),r=t[t.length-1];return(r==null?void 0:r.page)!==((n=r==null?void 0:r.pagination)==null?void 0:n.total)&&!(r!=null&&r.loading)?s.jsx(is,{...e}):null};Lp.displayName="PDC.InfiniteScroller.Loading";const kp=({page:e,...t})=>{const{updateParamPage:r}=xr(),{element:n}=es({callback:()=>r(e),options:{threshold:0}});return s.jsx("div",{...t,id:`pdc-scroll-infinite-${e.page}`,className:dt["pdc--infinite--loader"],"data-page":e.page,ref:n})};kp.displayName="PDC.Page.Anchor";const Dp=({first:e,gap:t,isMobile:r=!1,item:n,index:o,last:a=!1,order:i,page:c,showVideo:l=!1})=>{const{handleNotify:u}=xr(),{load:f}=vr(),{getAvailableProductTag:p}=Ot(),{BUY_BUTTON_LABELS:m,MAIN_IMAGE:h,PLP_GRID_SCROLL_BACK:_,PLP_INFINITE_SCROLL:y,PLP_PRODUCT_SIMILAR_DELAY:v,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:b,PLP_SIZE_ORDER:C,PRODUCT_CARD_IMAGE_ASPECT_RATIO:j,PRODUCT_CARD_TEXTS:x,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:S,PRODUCT_IMAGE_DIMENSIONS:E,SECOND_IMAGE:P,StoreConfig_MainSellerId:N,TEXTURE_IMAGE:A,Z_INDEX_WAR:R,ICONS:O}=Ap(),D=p(n==null?void 0:n.cluster.highlights);return s.jsx(et.Card,{className:n.id==="skeleton"?dt["pdc--infinite--card--disabled"]:"",gap:t,isMobile:r??!1,item:n,order:i,tag:D,index:o,setSkuSelected:u,showVideo:l,CONSTANTS:{BUY_BUTTON_LABELS:m,MAIN_IMAGE:h,PLP_GRID_SCROLL_BACK:_,PLP_INFINITE_SCROLL:y,PLP_PRODUCT_SIMILAR_DELAY:v,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:b,PLP_SIZE_ORDER:C,PRODUCT_CARD_IMAGE_ASPECT_RATIO:j,PRODUCT_CARD_TEXTS:x,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:S,PRODUCT_IMAGE_DIMENSIONS:E,SECOND_IMAGE:P,StoreConfig_MainSellerId:N,TEXTURE_IMAGE:A,Z_INDEX_WAR:R,ICONS:O},children:c&&f&&s.jsxs(s.Fragment,{children:[e&&s.jsx(Hn.Anchor,{page:c}),!c.loading&&s.jsx(Hn.Loader,{page:c}),a&&c.loading&&s.jsx(Hn.NextPage,{page:c})]})})};Dp.displayName="PDC.Page.Card";const Mp=({type:e="default",page:t,...r})=>{const{updatePage:n}=xr(),{load:o}=vr(),{element:a}=es({callback:()=>n(t),onEnterViewportOnce:!0,options:{threshold:1}});return o===!0&&s.jsx("div",{...r,className:dt[`pdc--infinite--loader${e==="page"?"--page":""}`],ref:a})};Mp.displayName="PDC.Page.Loader";const Fp=({page:e,...t})=>{var o;const{addNewPage:r}=xr(),{element:n}=es({callback:()=>{r(e)},onEnterViewportOnce:!0,options:{threshold:[.5,1]}});return((o=e==null?void 0:e.pagination)==null?void 0:o.nextPage)===!0&&e.loading===!0?s.jsx("div",{...t,className:dt["pdc--infinite--next-page--card"],"data-next-page":!0,ref:n}):null};Fp.displayName="PDC.Page.NextPage";const Hn={Anchor:kp,Card:Dp,Loader:Mp,NextPage:Fp},zp=({count:e,gap:t,page:r})=>{const{isMobile:n}=oe(),{columns:o}=xr(),{products:a}=vr(),i=(r.page-1)*e,c=Kl(r.products,o);return Array.isArray(r.products)?r.products.map((l,u)=>s.jsx(Hn.Card,{first:u===0,last:u===r.products.length-1,gap:t,index:u,item:l.node,isMobile:n??!1,order:a[i+u]+1,page:u===0||u===r.products.length-1?r:void 0,showVideo:!!c.indexOf(u)},a[i+u]+1)):null};zp.displayName="PDC.Page";const fb=({pages:e,load:t,PLP_GRID_SCROLL_BACK:r})=>{const n=g.useRef(!1);g.useEffect(()=>{const o=e[e.length-1];if(t&&o&&!n.current){const a=sessionStorage.getItem(r.refer),i=sessionStorage.getItem(r.order),c=document.querySelector(a==="true"?`[data-order="${i}"]`:`#pdc-scroll-infinite-${o.page}`);c&&(n.current=!0,sessionStorage.setItem(r.refer,"false"),o.page>1&&c.scrollIntoView({behavior:"instant",block:"start"}))}if(!t&&n.current){n.current=!1;const a=document.querySelector("body > main");a&&a.scrollIntoView({behavior:"instant",block:"start"})}},[t,e])},pb=()=>{var u,f;const{state:{count:e=1}}=Be(),{columns:t,gap:r}=xr(),{load:n,pages:o,total:a}=vr(),{constants:{ICONS:i,PLP_GRID_SCROLL_BACK:c,PLP_NOT_RESULT:l}}=nt();return fb({pages:o,load:n,PLP_GRID_SCROLL_BACK:c}),s.jsxs(s.Fragment,{children:[n===!0&&((f=(u=o[0])==null?void 0:u.pagination)==null?void 0:f.count)===0&&s.jsx(St.Empty,{ICONS:i,PLP_NOT_RESULT:l}),s.jsxs(et.Root,{children:[Array.isArray(o)&&o.map((p,m)=>s.jsx(zp,{count:e,gap:r,page:p},m)),s.jsx(Op,{columns:t,count:e,gap:r})]}),s.jsx(wa,{total:a}),s.jsx(Lp,{})]})},Bp=()=>{const{banners:e}=ns();return s.jsx(hu,{banners:e,children:s.jsx(pb,{})})};Bp.displayName="PDC.InfiniteScroller";const Up=()=>{const{state:e}=Be(),{constants:{Z_INDEX_WAR:t},setOpenFilters:r}=nt(),{selectedFacets:n,onToggleFacet:o,onSort:a}=Sp(),i=k.filterNonRootFacets(n,e==null?void 0:e.base);return s.jsx(Kt.Root,{onSort:a,setOpenFilters:r,style:{zIndex:t.plp_navigation},children:s.jsx(Kt.Selected,{callback:o,selected:i})})};Up.displayName="Navigation";const qo=({currentPage:e,callback:t,type:r,...n})=>s.jsx(d.Button,{...n,iconNameStart:`arrow-${r}`,onClick:()=>{typeof t=="function"&&t(r==="left"?"prev":"")},size:"large",variant:"tertiary"});qo.displayName="Arrow";const $o=({active:e,prev:t,ellipses:r,page:n,selectedPage:o})=>s.jsxs(s.Fragment,{children:[r&&t&&s.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."}),e&&s.jsx(d.Pagination.Item,{isActive:!1,index:n,variant:"tertiary",onClick:()=>{typeof o=="function"&&o(n)},children:n}),r&&!t&&s.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."})]});$o.displayName="PageEllipses";const qp=({children:e,endPage:t,page:r,total:n,selectedPage:o,ITEMS_PER_SECTION:a})=>s.jsxs(s.Fragment,{children:[s.jsx($o,{active:r>=a&&n>a,selectedPage:o,currentPage:r,prev:!1,ellipses:r>a&&n>a,page:1}),e,s.jsx($o,{active:n-r>1&&n!==t,selectedPage:o,currentPage:r,prev:!0,ellipses:t<n-1,page:n})]});qp.displayName="Pagination.Layout";const mb=(e,t,r)=>{const n=new URLSearchParams(r);return n.set(e,t),n.toString()},hb=(e,t)=>{const r=[];for(let n=e;n<=t;n++)r.push(n);return r},_b=({currentPage:e,total:t,maxVisiblePages:r,SEARCH_PAGE_ITEM_THRESHOLD:n})=>{const o=t>=n?n:t,a=Math.max(1,e===o?o-r+1:e-Math.floor(r/2)),i=Math.min(o,a+r-1);return{startPage:a,endPage:i,totalPages:o}},$p=({currentPage:e,pages:t,searchParams:r,VARIANT_PAGINATION:n})=>{const{router:o,pathname:a}=pe();return Array.isArray(t)?t.map(i=>s.jsx(d.Pagination.Item,{isActive:e===i,index:i,variant:e===i?n.active:n.default,onClick:()=>o.push(`${a}?${mb("page",i.toString(),r)}`),children:i},i)):null};$p.displayName="Pages";const Ia=({query:e,type:t="default",searchParams:r,ITEMS_DEFAULT_SORT:n,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:a,SEARCH_PAGE_ITEM_THRESHOLD:i,VARIANT_PAGINATION:c,...l})=>{const{router:u,pathname:f}=pe(),{state:{page:p=1}}=Be(),{pagination:{total:m}}=hs(),{endPage:h,totalPages:_,startPage:y}=_b({currentPage:p,total:m,maxVisiblePages:o,SEARCH_PAGE_ITEM_THRESHOLD:i}),v=C=>{const j=C.toString(),x=new URLSearchParams(r.toString());t==="default"&&x.set("page",j),t==="search"&&(x.set("query",e??""),x.set("count",a.toString()),x.set("page",j),n&&x.set("sort",n.replace("_",":")));const E=`${t==="search"?"/search":f}?${x.toString()}`;u.push(E)},b=C=>{v(C==="prev"?p-1:p+1)};return m?s.jsx("div",{...l,className:dt["pdc--pagination"],children:s.jsx(d.Pagination.Wrapper,{adornment:{start:s.jsx(qo,{callback:b,currentPage:p,disabled:p<2,type:"left"}),end:s.jsx(qo,{callback:b,currentPage:p,disabled:p>=_,type:"right"})},children:s.jsx(qp,{endPage:h,page:p,selectedPage:v,total:m,ITEMS_PER_SECTION:o,children:s.jsx($p,{currentPage:p,pages:hb(y,h),searchParams:r,VARIANT_PAGINATION:c})})})}):null};Ia.displayName="Pagination";const Hp=({gap:e,isMobile:t,className:r})=>{const{state:n}=Be(),{banners:o}=ns(),{constants:a}=nt(),{ICONS:i,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u}=a,f=o.filter(p=>Xl(p.position_grid,n.page,(n==null?void 0:n.count)??1));return Array.isArray(f)?f.map((p,m)=>s.jsx(et.Banner,{columns:p.columns,gap:e,isMobile:t,position_grid:p.position_grid,totalColumns:t?2:4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,children:s.jsx(xn,{name:"Banner Carousel",data:{banner:p,componentIndex:m},creative:"banner_grid",ICONS:i,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u,className:r})},p.position_grid)):null};Hp.displayName="PDC.Grid.Banners";const Vp=({isMobile:e=!1,items:t,BUY_BUTTON_LABELS:r,ICONS:n,MAIN_IMAGE:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PLP_GRID_SCROLL_BACK:c,PLP_INFINITE_SCROLL:l,PLP_PRODUCT_SIMILAR_DELAY:u,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:f,PLP_SIZE_ORDER:p,PRODUCT_CARD_IMAGE_ASPECT_RATIO:m,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:y,SECOND_IMAGE:v,StoreConfig_MainSellerId:b,TEXTURE_IMAGE:C,Z_INDEX_WAR:j})=>{const{getAvailableProductTag:x}=Ot(),{state:S}=Be(),[E,P]=g.useState(!1),[N,A]=g.useState(null),[R,O]=g.useState([]),D=g.useCallback((V,J)=>{const Z=J?_n([J]):null;O(V),A(Z!=null&&Z.length?Z[0]:null),P(!0)},[]),$=e?8:16,F=(S.page-1)*((S==null?void 0:S.count)??1),q=et.helpers.createGridPosAndVideo(t,[],e?2:4,S.page);return s.jsxs(s.Fragment,{children:[s.jsxs(et.Root,{children:[Array.isArray(t)&&t.map((V,J)=>{var H,ee;const Z=x(V.node.cluster.highlights);return s.jsx(et.Card,{gap:$,isMobile:e??!1,item:V.node,order:F+(((H=q[J])==null?void 0:H.position)??0),tag:Z,index:J,setSkuSelected:D,showVideo:(ee=q[J])==null?void 0:ee.canPlayVideo,CONSTANTS:{BUY_BUTTON_LABELS:r,MAIN_IMAGE:o,PLP_GRID_SCROLL_BACK:c,PLP_INFINITE_SCROLL:l,PLP_PRODUCT_SIMILAR_DELAY:u,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:f,PLP_SIZE_ORDER:p,PRODUCT_CARD_IMAGE_ASPECT_RATIO:m,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:y,SECOND_IMAGE:v,StoreConfig_MainSellerId:b,TEXTURE_IMAGE:C,Z_INDEX_WAR:j,ICONS:n}},V.node.sku)}),t.length>0&&s.jsx(Hp,{gap:$,isMobile:e??!1})]}),s.jsx(yn,{open:E,sku:N,skus:R,setSku:A,setVisible:P,ICONS:n,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:h,Z_INDEX_WAR:j})]})};Vp.displayName="PDC.Products";const St={Empty:va,Filters:Ep,Grid:Np,InfiniteScroller:Bp,Spinner:is,Navigation:Up,Notification:yn,Pagination:Ia,Products:Vp},Wp=({className:e})=>{const{constants:t}=nt(),{state:r,searchParams:n}=Be(),{ITEMS_DEFAULT_SORT:o,ITEMS_PER_SECTION:a,ITEMS_PER_PAGE:i,PLP_INFINITE_SCROLL:c,PLP_SORT_DEFAULT:l,SEARCH_PAGE_ITEM_THRESHOLD:u,VARIANT_PAGINATION:f}=t;return s.jsxs("div",{className:d.helpers.classNameConcat(dt.pdc,e),children:[s.jsxs(Zx,{state:r,forceUpdate:!0,PLP_SORT_DEFAULT:l,children:[s.jsx(St.Navigation,{}),s.jsx(St.Filters,{})]}),c===!0?s.jsx(St.Grid,{infinite:!0}):s.jsxs(wp,{...r,forceUpdate:!0,children:[s.jsx(St.Grid,{}),s.jsx(St.Pagination,{searchParams:n,ITEMS_DEFAULT_SORT:o,ITEMS_PER_SECTION:a,ITEMS_PER_PAGE:i,SEARCH_PAGE_ITEM_THRESHOLD:u,VARIANT_PAGINATION:f})]})]})};Wp.displayName="Templates.PDC";const Gp=g.createContext({}),gb=({children:e,...t})=>s.jsx(Gp.Provider,{value:t,children:e}),_s=()=>{const e=g.useContext(Gp);if(e===void 0)throw new Error("useSearchConstants must be used within a SearchConstantsProvider");return e},yb="_grid_e75z7_21",vb="_navigation_e75z7_44",xb="_spinner_e75z7_70",bb="_sort_e75z7_76",Gt={"rearch-result--empty":"_rearch-result--empty_e75z7_1",grid:yb,"grid-header":"_grid-header_e75z7_37",navigation:vb,"result-disclaimer":"_result-disclaimer_e75z7_51",spinner:xb,sort:bb,"search-result":"_search-result_e75z7_91"},Kp=({term:e})=>{const{router:t}=pe(),{SEARCH_RESULT:r,ICONS:n}=_s(),o=()=>{t.push(r.EMPTY.ALL_TERMS)};return s.jsxs("div",{className:Gt["rearch-result--empty"],children:[s.jsxs(d.TextStructure.DivWrapper,{children:[s.jsx("div",{className:k.responsive["responsive-desktop-flex"],children:s.jsx("h2",{className:"typography-style-heading-sm",children:r.EMPTY.NOT_FOUND})}),s.jsx("div",{className:k.responsive["responsive-mobile-flex"],children:s.jsx("h2",{className:"typography-style-body-md",children:r.EMPTY.NOT_FOUND})}),s.jsxs("p",{children:[r.EMPTY.NOT_FOUND_P," ",`"${e}"`]})]}),s.jsx(d.Button,{onClick:()=>o(),variant:"tertiary",size:"medium",adornment:{end:s.jsx(d.Icon,{name:n.arrow_right,size:"medium"})},children:r.EMPTY.ALL_TERMS_LABEL})]})};Kp.displayName="RearchResult.Empty";const jb=e=>s.jsxs(s.Fragment,{children:[s.jsx("div",{className:k.responsive["responsive-desktop-flex"],children:s.jsx("h2",{className:"typography-style-heading-sm",children:e.SEARCH.SEARCHING})}),s.jsx("div",{className:k.responsive["responsive-mobile-flex"],children:s.jsx("h2",{className:"typography-style-body-md",children:e.SEARCH.SEARCHING})}),s.jsx(d.Spinner,{className:Gt.spinner})]}),Cb=(e,t,r)=>s.jsxs(s.Fragment,{children:[s.jsx("div",{className:k.responsive["responsive-desktop-flex"],children:s.jsx("h2",{className:"typography-style-heading-sm",children:t.SEARCH.SEARCHED})}),s.jsx("div",{className:k.responsive["responsive-mobile-flex"],children:s.jsx("h2",{className:"typography-style-body-md",children:t.SEARCH.SEARCHED})}),s.jsxs("p",{children:[t.SEARCH.SEARCHED_P_START," ",e," ",t.SEARCH.SEARCHED_P_END," ",`"${r}"`]})]}),Qp=({isLoading:e,quantity:t,term:r})=>{const{SEARCH_RESULT:n}=_s();return s.jsx(d.TextStructure.DivWrapper,{children:e?jb(n):Cb(t,n,r)})};Qp.displayName="Search.Loading";const Sb=({term:e})=>{const[t,r]=g.useState(!1),{router:n}=pe(),{searchParams:o}=Be(),{ITEMS_DEFAULT_SORT:a,ITEMS_PER_PAGE:i,ICONS:c}=_s(),l=u=>{k.navigateToSearchPage(n,e,i,1,u??a)};return s.jsx("div",{className:Gt.sort,children:s.jsx(ds,{handleSelectValue:u=>l(u??"release_desc"),sortListOpen:t,setSortListOpen:r,searchParams:o,ICONS:c})})},Eb=({query:e})=>{const{isLoading:t,products:r,pagination:n}=hs();return s.jsxs("div",{className:Gt["grid-header"],children:[s.jsxs("div",{className:Gt.navigation,children:[!t&&(r!=null&&r.length)?s.jsx(Sb,{term:e}):null,s.jsx(d.Utils.Divider,{})]}),!t&&(r!=null&&r.length)?s.jsx("div",{className:Gt["result-disclaimer"],children:s.jsx(Qp,{term:e,isLoading:t,quantity:n.count})}):null]})},Xp=({isMobile:e=!1,items:t,BUY_BUTTON_LABELS:r,ICONS:n,MAIN_IMAGE:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PLP_GRID_SCROLL_BACK:c,PLP_INFINITE_SCROLL:l,PLP_PRODUCT_SIMILAR_DELAY:u,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:f,PLP_SIZE_ORDER:p,PRODUCT_CARD_IMAGE_ASPECT_RATIO:m,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:y,SECOND_IMAGE:v,StoreConfig_MainSellerId:b,TEXTURE_IMAGE:C,Z_INDEX_WAR:j})=>{const{getAvailableProductTag:x}=Ot(),{state:S}=Be(),[E,P]=g.useState(!1),[N,A]=g.useState(null),[R,O]=g.useState([]),D=g.useCallback((V,J)=>{const Z=J?_n([J]):null;O(V),A(Z!=null&&Z.length?Z[0]:null),P(!0)},[]),$=e?8:16,F=(S.page-1)*((S==null?void 0:S.count)??1),q=et.helpers.createGridPosAndVideo(t,[],e?2:4,S.page);return s.jsxs(s.Fragment,{children:[s.jsx(et.Root,{children:Array.isArray(t)&&t.map((V,J)=>{var H,ee;const Z=x(V.node.cluster.highlights);return s.jsx(et.Card,{gap:$,isMobile:e??!1,item:V.node,order:F+(((H=q[J])==null?void 0:H.position)??0),tag:Z,index:J,setSkuSelected:D,showVideo:(ee=q[J])==null?void 0:ee.canPlayVideo,CONSTANTS:{BUY_BUTTON_LABELS:r,MAIN_IMAGE:o,PLP_GRID_SCROLL_BACK:c,PLP_INFINITE_SCROLL:l,PLP_PRODUCT_SIMILAR_DELAY:u,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:f,PLP_SIZE_ORDER:p,PRODUCT_CARD_IMAGE_ASPECT_RATIO:m,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:y,SECOND_IMAGE:v,StoreConfig_MainSellerId:b,TEXTURE_IMAGE:C,Z_INDEX_WAR:j,ICONS:n}},V.node.sku)})}),s.jsx(yn,{open:E,sku:N,skus:R,setSku:A,setVisible:P,ICONS:n,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:h,Z_INDEX_WAR:j})]})};Xp.displayName="PDC.Products";const Yp=({isMobile:e=!1,query:t})=>{const{isLoading:r,products:n,pagination:o}=hs(),{searchParams:a}=Be(),i=_s(),{sendDataLayerEvent:c}=ie(),l=g.useRef({query:t,sended:!1}),u=g.useMemo(()=>!r&&n.length>0&&o.count>0,[r,n.length,o.count]);return g.useEffect(()=>{if(!r){if(l.current.query!==t){l.current.sended=!1,l.current.query=t;return}l.current.sended||(c({functionKey:"readyEvents",data:{event:"view_search_results",readyData:{search_term:t,search_found:(n==null?void 0:n.length)>0}}}),l.current.sended=!0)}},[t,n,r,c]),s.jsxs("div",{className:Gt.grid,children:[u&&s.jsx(Eb,{query:t}),!r&&(n!=null&&n.length)?s.jsx(Xp,{...i,isMobile:e??!1,items:n}):null,(n==null?void 0:n.length)===0&&!r?s.jsx(Kp,{term:t}):null,u&&s.jsx(Ia,{searchParams:a,...i})]})};Yp.displayName="SearchResultContent";const Pb=({className:e})=>{const{state:t}=Be(),{isMobile:r}=oe();return s.jsx(wp,{...t,forceUpdate:!1,children:s.jsx("div",{className:d.helpers.classNameConcat(Gt["search-result"],e),children:s.jsx(Yp,{currentPage:t.page,isMobile:r??!1,query:t.term??""})})})},wb=new Fl,Zp=({className:e,searchParams:t,CONSTANTS:r})=>{const n=new URLSearchParams(t??""),o=String((n==null?void 0:n.get("query"))??""),a=Number((n==null?void 0:n.get("count"))??0),i=Number((n==null?void 0:n.get("page"))??0),c=String((n==null?void 0:n.get("sort"))??"");return s.jsx(Bl,{client:wb,children:s.jsx(gb,{...r,children:s.jsx(oa,{state:{sort:c,base:"",facets:[],term:o,page:i,count:a},searchParams:n,children:s.jsx(Pb,{className:e})})})})};Zp.displayName="Search";const Nb=({page:e,data:t})=>{const{pathname:r}=pe(),n=g.useRef(null),{sendDataLayerEvent:o,currentLocalRef:a,itemListRef:i,promotionEventRef:c}=ie();return g.useEffect(()=>{const l=Zl("login_event")||"{}",u=JSON.parse(l);if(u.name||u.method){const f=new Date(0);o({functionKey:"readyEvents",data:{event:u.name,readyData:{method:u.method}}}),ua("login_event","",{expires:f})}},[]),g.useEffect(()=>{if(n.current===r)return;n.current=r;let l={};switch(e){case"PDP":{const f=t,p={};if(!f){l={page_category:"pdp"};break}f.items.forEach(({itemId:m,sellers:h})=>p[m]=h[0].commertialOffer.AvailableQuantity),l={page_category:"pdp",seller_ids:f.items.map(({sellers:m})=>m[0].sellerId).join(),skuStocks:p,product_reference_id:f.productReference};break}case"PDC":{const{page_category:f,page_departament:p,id:m,name:h}=Pc(),_=h,y=m;l={page_category:"lista_produtos",...p&&{page_departament:p}},i.current={item_list_name:r==="/search"?"busca":_??void 0,item_list_id:r==="/search"?void 0:y??void 0},p&&o({functionKey:"readyEvents",data:{event:"view_category",readyData:{page_category:f,page_departament:p}}});break}default:l={page_category:e},c.current={},i.current={};break}const u={region:e,...l};a.current=e,o({functionKey:"readyEvents",data:{readyData:{vtex_version:"fast",...u}},timeout:0})},[r]),null};var Ho={exports:{}},qn={exports:{}},rc;function Ib(){return rc||(rc=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(l,u){for(var f in u)Object.defineProperty(l,f,{enumerable:!0,get:u[f]})}r(t,{DOMAttributeNames:function(){return n},default:function(){return c},isEqualNode:function(){return a}});const n={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function o(l){let{type:u,props:f}=l;const p=document.createElement(u);for(const _ in f){if(!f.hasOwnProperty(_)||_==="children"||_==="dangerouslySetInnerHTML"||f[_]===void 0)continue;const y=n[_]||_.toLowerCase();u==="script"&&(y==="async"||y==="defer"||y==="noModule")?p[y]=!!f[_]:p.setAttribute(y,f[_])}const{children:m,dangerouslySetInnerHTML:h}=f;return h?p.innerHTML=h.__html||"":m&&(p.textContent=typeof m=="string"?m:Array.isArray(m)?m.join(""):""),p}function a(l,u){if(l instanceof HTMLElement&&u instanceof HTMLElement){const f=u.getAttribute("nonce");if(f&&!l.getAttribute("nonce")){const p=u.cloneNode(!0);return p.setAttribute("nonce",""),p.nonce=f,f===l.nonce&&l.isEqualNode(p)}}return l.isEqualNode(u)}let i;process.env.__NEXT_STRICT_NEXT_HEAD?i=(l,u)=>{const f=document.querySelector("head");if(!f)return;const p=f.querySelectorAll('meta[name="next-head"]')||[],m=[];if(l==="meta"){const y=f.querySelector("meta[charset]");y&&m.push(y)}for(let y=0;y<p.length;y++){var h;const b=p[y].nextSibling;(b==null||(h=b.tagName)==null?void 0:h.toLowerCase())===l&&m.push(b)}const _=u.map(o).filter(y=>{for(let v=0,b=m.length;v<b;v++){const C=m[v];if(a(C,y))return m.splice(v,1),!1}return!0});m.forEach(y=>{var v;const b=y.previousSibling;if(b&&b.getAttribute("name")==="next-head"){var C;(C=y.parentNode)==null||C.removeChild(b)}(v=y.parentNode)==null||v.removeChild(y)}),_.forEach(y=>{var v;const b=document.createElement("meta");b.name="next-head",b.content="1",((v=y.tagName)==null?void 0:v.toLowerCase())==="meta"&&y.getAttribute("charset")||f.appendChild(b),f.appendChild(y)})}:i=(l,u)=>{const f=document.getElementsByTagName("head")[0],p=f.querySelector("meta[name=next-head-count]");if(process.env.NODE_ENV!=="production"&&!p){console.error("Warning: next-head-count is missing. https://nextjs.org/docs/messages/next-head-count-missing");return}const m=Number(p.content),h=[];for(let v=0,b=p.previousElementSibling;v<m;v++,b=(b==null?void 0:b.previousElementSibling)||null){var _;(b==null||(_=b.tagName)==null?void 0:_.toLowerCase())===l&&h.push(b)}const y=u.map(o).filter(v=>{for(let b=0,C=h.length;b<C;b++){const j=h[b];if(a(j,v))return h.splice(b,1),!1}return!0});h.forEach(v=>{var b;return(b=v.parentNode)==null?void 0:b.removeChild(v)}),y.forEach(v=>f.insertBefore(v,p)),p.content=(m-h.length+y.length).toString()};function c(){return{mountedInstances:new Set,updateHead:l=>{const u={};l.forEach(m=>{if(m.type==="link"&&m.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+m.props["data-href"]+'"]'))return;m.props.href=m.props["data-href"],m.props["data-href"]=void 0}const h=u[m.type]||[];h.push(m),u[m.type]=h});const f=u.title?u.title[0]:null;let p="";if(f){const{children:m}=f.props;p=typeof m=="string"?m:Array.isArray(m)?m.join(""):""}p!==document.title&&(document.title=p),["meta","base","link","style","script"].forEach(m=>{i(m,u[m]||[])})}}}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(qn,qn.exports)),qn.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function r(E,P){for(var N in P)Object.defineProperty(E,N,{enumerable:!0,get:P[N]})}r(t,{default:function(){return S},handleClientScriptLoad:function(){return v},initScriptLoader:function(){return j}});const n=Ve,o=qr,a=s,i=n._(Go),c=o._(g),l=ep(),u=Ib(),f=Zu(),p=new Map,m=new Set,h=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],_=E=>{if(i.default.preinit){E.forEach(P=>{i.default.preinit(P,{as:"style"})});return}if(typeof window<"u"){let P=document.head;E.forEach(N=>{let A=document.createElement("link");A.type="text/css",A.rel="stylesheet",A.href=N,P.appendChild(A)})}},y=E=>{const{src:P,id:N,onLoad:A=()=>{},onReady:R=null,dangerouslySetInnerHTML:O,children:D="",strategy:$="afterInteractive",onError:F,stylesheets:q}=E,V=N||P;if(V&&m.has(V))return;if(p.has(P)){m.add(V),p.get(P).then(A,F);return}const J=()=>{R&&R(),m.add(V)},Z=document.createElement("script"),H=new Promise((ee,ce)=>{Z.addEventListener("load",function(me){ee(),A&&A.call(this,me),J()}),Z.addEventListener("error",function(me){ce(me)})}).catch(function(ee){F&&F(ee)});O?(Z.innerHTML=O.__html||"",J()):D?(Z.textContent=typeof D=="string"?D:Array.isArray(D)?D.join(""):"",J()):P&&(Z.src=P,p.set(P,H));for(const[ee,ce]of Object.entries(E)){if(ce===void 0||h.includes(ee))continue;const me=u.DOMAttributeNames[ee]||ee.toLowerCase();Z.setAttribute(me,ce)}$==="worker"&&Z.setAttribute("type","text/partytown"),Z.setAttribute("data-nscript",$),q&&_(q),document.body.appendChild(Z)};function v(E){const{strategy:P="afterInteractive"}=E;P==="lazyOnload"?window.addEventListener("load",()=>{(0,f.requestIdleCallback)(()=>y(E))}):y(E)}function b(E){document.readyState==="complete"?(0,f.requestIdleCallback)(()=>y(E)):window.addEventListener("load",()=>{(0,f.requestIdleCallback)(()=>y(E))})}function C(){[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(P=>{const N=P.id||P.getAttribute("src");m.add(N)})}function j(E){E.forEach(v),C()}function x(E){const{id:P,src:N="",onLoad:A=()=>{},onReady:R=null,strategy:O="afterInteractive",onError:D,stylesheets:$,...F}=E,{updateScripts:q,scripts:V,getIsSsr:J,appDir:Z,nonce:H}=(0,c.useContext)(l.HeadManagerContext),ee=(0,c.useRef)(!1);(0,c.useEffect)(()=>{const me=P||N;ee.current||(R&&me&&m.has(me)&&R(),ee.current=!0)},[R,P,N]);const ce=(0,c.useRef)(!1);if((0,c.useEffect)(()=>{ce.current||(O==="afterInteractive"?y(E):O==="lazyOnload"&&b(E),ce.current=!0)},[E,O]),(O==="beforeInteractive"||O==="worker")&&(q?(V[O]=(V[O]||[]).concat([{id:P,src:N,onLoad:A,onReady:R,onError:D,...F}]),q(V)):J&&J()?m.add(P||N):J&&!J()&&y(E)),Z){if($&&$.forEach(me=>{i.default.preinit(me,{as:"style"})}),O==="beforeInteractive")return N?(i.default.preload(N,F.integrity?{as:"script",integrity:F.integrity,nonce:H,crossOrigin:F.crossOrigin}:{as:"script",nonce:H,crossOrigin:F.crossOrigin}),(0,a.jsx)("script",{nonce:H,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([N,{...F,id:P}])+")"}})):(F.dangerouslySetInnerHTML&&(F.children=F.dangerouslySetInnerHTML.__html,delete F.dangerouslySetInnerHTML),(0,a.jsx)("script",{nonce:H,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...F,id:P}])+")"}}));O==="afterInteractive"&&N&&i.default.preload(N,F.integrity?{as:"script",integrity:F.integrity,nonce:H,crossOrigin:F.crossOrigin}:{as:"script",nonce:H,crossOrigin:F.crossOrigin})}return null}Object.defineProperty(x,"__nextScript",{value:!0});const S=x;(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(Ho,Ho.exports);var Rb=Ho.exports,Tb=Rb;const Jp=k.getDefaultExportFromCjs(Tb),Ab=({children:e,ONE_TRUST:t})=>s.jsxs(s.Fragment,{children:[s.jsx(Jp,{src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",defer:!0,strategy:"afterInteractive","data-domain-script":t.siteId,type:"text/javascript"}),e]}),Ob=Qd(()=>Promise.resolve(Ab),{ssr:!1}),Lb="_lgpd_vffd3_82",kb="_success_vffd3_248",Db="_error_vffd3_312",Ee={"newsletter-root":"_newsletter-root_vffd3_1","has-border-top":"_has-border-top_vffd3_9","has-border-bottom":"_has-border-bottom_vffd3_12","newsletter-container":"_newsletter-container_vffd3_20","content-text":"_content-text_vffd3_35","form-wrapper":"_form-wrapper_vffd3_39","newsletter-container-banner":"_newsletter-container-banner_vffd3_64",lgpd:Lb,"textfield-structure-modifier":"_textfield-structure-modifier_vffd3_190","input-wrapper-modifier":"_input-wrapper-modifier_vffd3_196","submit-btn":"_submit-btn_vffd3_200","loading-spinner":"_loading-spinner_vffd3_211","terms-and-conditions-checkbox":"_terms-and-conditions-checkbox_vffd3_217","terms-and-conditions-unchecked":"_terms-and-conditions-unchecked_vffd3_230","terms-and-conditions-checked":"_terms-and-conditions-checked_vffd3_244",success:kb,"text-structure-modifier":"_text-structure-modifier_vffd3_257","success-title":"_success-title_vffd3_297","close-button":"_close-button_vffd3_302",error:Db,"newsletter-wrapper":"_newsletter-wrapper_vffd3_332","banner-container":"_banner-container_vffd3_345","newsletter-provider-wrapper":"_newsletter-provider-wrapper_vffd3_358","newsletter-root-banner":"_newsletter-root-banner_vffd3_371","banner-background":"_banner-background_vffd3_392","newsletter-provider-wrapper-background":"_newsletter-provider-wrapper-background_vffd3_401"},em=({invalid_message:e,master_data_field:t,placeholder:r,required:n=!1,CONSTANTS:o})=>{const{isMobile:a}=oe(),{inputsStatus:i,setInputsStatus:c,setFormStatus:l,variant:u}=pa();return s.jsx(d.TextField.Structure,{className:`${Ee["textfield-structure-modifier"]} ${u}`,input:s.jsx(d.TextField.Input,{mode:"simple",label:r,sizeVariant:a?o.NEWSLETTER_CONFIGS.interactionSizeMob:o.NEWSLETTER_CONFIGS.interactionSizeDesk,name:t,className:`${Ee["input-wrapper-modifier"]} ${u}`,feedback:i[t]==="required"?"error":i[t],onChange:()=>{i[t]!=="none"&&(c(f=>({...f,[t]:"none"})),l("idle"))},required:n}),supportText:i[t]==="error"||i[t]==="required"?s.jsx("div",{className:u==="horizontal"?Ee["support-text-modifier"]:"",children:s.jsx(d.TextField.SupportText,{text:i[t]==="error"?e??o.NEWSLETTER_CONFIGS.messages.invalid_generic:o.NEWSLETTER_CONFIGS.messages.required_field,feedback:"error"})}):null})};em.displayName="Newsletter.Input";const tm=({formStatus:e,fields:t,CONSTANTS:r})=>s.jsxs(s.Fragment,{children:[Array.isArray(t)&&t.map((n,o)=>s.jsx(em,{invalid_message:n.invalid_message,master_data_field:n.master_data_field,placeholder:n.placeholder,required:n.required,type:n.type,CONSTANTS:r},`nt-field-${n.master_data_field}-${o}`)),e==="error"&&s.jsx("div",{className:Ee.error,children:s.jsx("p",{children:r.NEWSLETTER_CONFIGS.form.status.error})})]});tm.displayName="Newsletter.FormFields";const rm=({formStatus:e,CONSTANTS:t,...r})=>{const{isMobile:n}=oe();return s.jsxs(d.Button,{...r,className:Ee["submit-btn"],disabled:e==="success",size:n?"medium":"large",children:[s.jsx("span",{"data-loading":e==="loading","data-label":!0,children:t.NEWSLETTER_CONFIGS.submitLabel}),t.NEWSLETTER_CONFIGS.hasLoadingState&&e==="loading"&&s.jsx(d.Spinner,{className:Ee["loading-spinner"],size:"small"})]})};rm.displayName="Newsletter.SubmitButton";const nm=({checkboxRef:e,formStatus:t,setFormStatus:r,CONSTANTS:n})=>{const o=a=>{a.target.checked?(e.current=!0,t==="unchecked"&&r("idle")):e.current=!1};return s.jsxs(s.Fragment,{children:[s.jsx(d.Checkbox,{adornment:s.jsx(d.Icon,{name:n.ICONS.check,size:"x-small"}),defaultChecked:e.current,disabled:t==="success",name:"terms-and-conditions",label:n.NEWSLETTER_CONFIGS.messages.accept_terms_and_conditions,onChange:o,sizeVariant:"small",className:Ee["terms-and-conditions-checkbox"]}),t==="unchecked"&&s.jsx("div",{className:Ee["terms-and-conditions-unchecked"],children:s.jsx(d.TextStructure.Root,{adornment:{start:s.jsx(d.Icon,{name:n.ICONS.alert_circle,size:"small"})},children:s.jsx(d.TextStructure.DivWrapper,{children:s.jsx("p",{children:n.NEWSLETTER_CONFIGS.messages.terms_and_conditions_not_accepted})})})})]})};nm.displayName="Newsletter.Terms";const sm=({title:e,description:t,CONSTANTS:r})=>s.jsx("div",{className:Ee.success,children:s.jsx(d.TextStructure.Root,{children:s.jsxs(d.TextStructure.DivWrapper,{className:Ee["text-structure-modifier"],children:[s.jsxs("div",{className:Ee["success-title"],children:[s.jsx(d.Icon,{name:r.ICONS.check_circle,size:"medium"}),s.jsx("h3",{children:e})]}),s.jsx("p",{children:t})]})})});sm.displayName="Newsletter.Success";const om=({formPayloadOptionals:e,masterDataEntity:t,banner:r,termsDescription:n,lgpdLinkLable:o,lgpdLink:a,variant:i,CONSTANTS:c})=>{const{checkboxRef:l,fields:u,formStatus:f,hasTermsAndConditions:p,handleClickToSubmit:m,handleSubmit:h,setFormStatus:_}=pa();return s.jsx(s.Fragment,{children:f==="success"?s.jsx(sm,{description:c.NEWSLETTER_CONFIGS.messages.success_description,title:c.NEWSLETTER_CONFIGS.messages.success_title,CONSTANTS:c}):s.jsxs(s.Fragment,{children:[s.jsxs("form",{className:Ee["form-wrapper"],onSubmit:y=>h(y,e,t),children:[s.jsx(tm,{formStatus:f,fields:u,CONSTANTS:c}),p&&s.jsx(nm,{checkboxRef:l,formStatus:f,setFormStatus:_,CONSTANTS:c}),s.jsx(rm,{formStatus:f,type:"submit",variant:"primary",onClick:m,CONSTANTS:c})]}),(r||i==="vertical")&&s.jsxs("div",{className:Ee.lgpd,children:[n&&s.jsx("p",{children:n}),o&&s.jsx(Ye,{href:a,children:o})]})]})})};om.displayName="Newsletter.Form";const Mb=["horizontal","vertical"],Ra=({className:e,description:t,formPayloadOptionals:r,fields:n,masterDataEntity:o,masterDataEmailField:a,masterDataNameField:i,banner:c,altBanner:l,bannerBackground:u,termsDescription:f,lgpdLinkLable:p,lgpdLink:m,title:h,variant:_,borderTop:y,borderBottom:v,CONSTANTS:b,...C})=>{if(!a||!i)return null;const j=d.helpers.ValidateProp({fieldTypes:Mb,property:_,fallback:"horizontal"});return s.jsxs("div",{className:c?u?Ee["banner-background"]:Ee["newsletter-wrapper"]:"",children:[c&&s.jsx(d.Banner.Container,{className:Ee["banner-container"],children:s.jsx(d.Banner.ImageWrapper,{children:s.jsx(De.Image,{src:c,alt:l,width:"1920",height:"500"})})}),s.jsx("div",{className:c?Ee["newsletter-provider-wrapper"+(u?"-background":"")]:"",children:s.jsx(Su,{fields:n,masterDataEmailField:a,masterDataNameField:i,variant:j,CONSTANTS:b,children:s.jsx("div",{...C,className:d.helpers.classNameConcat(Ee["newsletter-root"+(c||j==="vertical"?"-banner":"")],[y&&Ee["has-border-top"],v&&Ee["has-border-bottom"],e].filter(Boolean)),"data-variant":j,children:s.jsxs("div",{className:c||j==="vertical"?Ee["newsletter-container-banner"]:Ee["newsletter-container"],children:[s.jsxs("div",{className:Ee["content-text"],children:[s.jsx("h2",{children:h}),s.jsx("p",{children:t}),!c&&j==="horizontal"&&s.jsxs("div",{className:Ee.lgpd,children:[s.jsx("p",{children:f}),p&&s.jsx(Ye,{target:"_blank",href:m,children:p})]})]}),s.jsx(om,{formPayloadOptionals:r,masterDataEntity:o,CONSTANTS:b,banner:c,lgpdLink:m,lgpdLinkLable:p,termsDescription:f,variant:j})]})})})})]})};Ra.displayName="Newsletter";const am=({children:e,...t})=>s.jsx("div",{...t,children:e});am.displayName="CallToAction";const Fb="_wrapper_aejhu_1",zb="_body_aejhu_8",Jn={wrapper:Fb,body:zb,"wrapper-body":"_wrapper-body_aejhu_16","accordion-modifier":"_accordion-modifier_aejhu_32"},Bb=({children:e,className:t,...r})=>s.jsx("div",{...r,className:d.helpers.classNameConcat(Jn.wrapper,t),children:e}),Ub=({data:e,ICONS:t})=>{const[r,n]=g.useState(null),o=i=>{n(c=>c===i?null:i)},{router:a}=pe();return s.jsx("div",{className:d.helpers.classNameConcat(Jn.body),children:Array.isArray(e)&&(e==null?void 0:e.map((i,c)=>{var p;const l=r===i.id,u=i.buttonHref&&i.buttonHref!=="#",f=i.buttonHref&&i.type==="button"&&u?{onClick:()=>{var m;if((m=i.buttonHref)!=null&&m.startsWith("/")){a.push(i.buttonHref);return}window.open(i.buttonHref,"_blank")}}:{};return s.jsx("div",{children:i.type==="button"?s.jsxs(s.Fragment,{children:[s.jsx(d.Button,{variant:"tertiary",mode:i.buttonMode??"default",size:i.buttonSize??"medium",iconNameStart:t[i.buttonIcon]??i.buttonIcon,...f,style:{marginTop:16},children:i.buttonLabel}),s.jsx(d.Utils.Divider,{direction:"horizontal",size:"small",style:{height:16}})]}):s.jsxs(d.Accordion.Wrapper,{className:d.helpers.classNameConcat(Jn["accordion-modifier"]),children:[s.jsx(d.Accordion.Header,{id:`${c}-${i.title}`,closeIndicator:l?s.jsx(d.Icon,{name:t.arrow_up,size:"medium"}):void 0,openIndicator:l?void 0:s.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),title:"accordion-header",onClick:()=>o(i.id),children:s.jsx(d.TextStructure.Root,{children:s.jsx(d.TextStructure.DivWrapper,{children:s.jsx("h2",{className:"typography-style-body-sm",children:i.title})})})}),s.jsx(d.Accordion.Body,{title:"accordion-body",children:s.jsx(d.TextStructure.Root,{children:l&&s.jsxs(d.TextStructure.DivWrapper,{children:[i.subtitle?s.jsx("h3",{className:"typography-style-body-md",children:i.subtitle}):s.jsx(s.Fragment,{}),s.jsx("p",{className:"typography-style-caption",children:i.description}),i.buttonLabel&&i.buttonHref?s.jsx(Ye,{href:i.buttonHref??"#",mode:i.buttonMode??"default",size:i.buttonSize??"medium",adornments:(p=i.buttonIcon)!=null&&p.length?{end:s.jsx(d.Icon,{name:t[i.buttonIcon]??i.buttonIcon})}:void 0,children:i.buttonLabel}):s.jsx(s.Fragment,{})]})})})]})},i.id)}))})},qb=({className:e,data:t,ICONS:r,...n})=>{const[o,a]=g.useState(!1),[i,c]=g.useState(null);g.useEffect(()=>{!o&&!i&&t&&c(t)},[o,i]);const l=g.useCallback(()=>{a(u=>!u)},[]);return i?s.jsxs(Bb,{...n,className:e,children:[s.jsx("div",{className:Jn["wrapper-body"],hidden:!o,children:o&&s.jsx(Ub,{data:i.content,ICONS:r})}),s.jsx(am,{children:s.jsx("div",{onClick:l,children:o?s.jsx(d.Button,{iconNameEnd:r.close,size:(i==null?void 0:i.helpButtonSize)??"x-large"}):s.jsx(d.Button,{iconNameStart:(i==null?void 0:i.iconLabel)??r.help,size:(i==null?void 0:i.helpButtonSize)??"x-large",children:i==null?void 0:i.label})})})]}):s.jsx(s.Fragment,{})},$b="_formContainer_zwlly_1",Hb="_formFieldGroup_zwlly_6",Vb="_formFieldGroupName_zwlly_10",Wb="_formFieldWrapper_zwlly_20",Gb="_formFieldInput_zwlly_30",Kb="_success_zwlly_73",Qb="_button_zwlly_110",Xb="_error_zwlly_114",Nt={formContainer:$b,formFieldGroup:Hb,formFieldGroupName:Vb,formFieldWrapper:Wb,formFieldInput:Gb,success:Kb,"text-structure-modifier":"_text-structure-modifier_zwlly_85",button:Qb,error:Xb},Yb=({group:e,children:t,className:r})=>s.jsx(s.Fragment,{children:s.jsxs("div",{className:d.helpers.classNameConcat(Nt.formFieldGroup,r),children:[s.jsx("h1",{className:Nt.formFieldGroupName,children:e.groupLabel}),t]},e.groupLabel)});async function Zb(e){const t=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-1",t);return Array.from(new Uint8Array(r)).map(a=>a.toString(16).padStart(2,"0")).join("")}const Jb=async e=>await fetch("/api/dito-ingest",{method:"POST",body:JSON.stringify(e)}).then(r=>r.json()),im=g.createContext({});function cm({children:e,groups:t,masterDataEntity:r,postFn:n,actionName:o="",originName:a="",POPUP_SUBMITTED_STORAGE:i}){const[c,l]=g.useState(!1),[u,f]=g.useState({}),[p,m]=g.useState([]),[h,_]=g.useState("idle"),[y,v]=g.useState(""),b=({target:{name:j,value:x}})=>{f({...u,[j]:x})},C=j=>{j.preventDefault(),n({body:{masterDataEntity:r,payload:u}}).then(async({Message:x})=>{if(x){const E=x.match(/'(.*?[^\\])'/g)||[];var S="-";for(const P of E){const N=P.substring(1,P.length-1),R=t.flatMap(O=>O.fields).find(({name:O})=>O===N);v(N),R&&(S=R.name)}return _("error"),m([S])}if(u.email){const E=await Zb(u.email||""),P=new Date().toISOString();Jb([{user_id:E,timestamp:P,type:"IDENTIFY",traits:{id:E,created_at:P,name:u.name,email:u.email,phone:u==null?void 0:u.phone}},{action:o,timestamp:P,type:"TRACK",user_id:E,context:{user_agent:navigator.userAgent},properties:{custom_data:{email:u.email,nome:u.name,origem:a,...u}}}])}return window.localStorage.setItem(i,"true"),f({}),l(!0),_("success"),m([])})};return s.jsx(im.Provider,{value:{formErrors:p,handleInputChange:b,submitForm:C,formData:u,status:h,fieldMessage:y,success:c,setSuccess:l},children:e})}function gs(){return g.useContext(im)}const ej=({fields:e,className:t})=>{const{formData:r,handleInputChange:n,formErrors:o}=gs();return s.jsx("div",{className:d.helpers.classNameConcat(Nt.formFieldWrapper,t),children:e.map(({label:a,name:i,required:c,width:l="medium"})=>s.jsx(d.TextField.Input,{label:`${a}${c?"*":""}`,title:i,value:r[i]||"",name:i,sizeVariant:"large",onChange:n,required:c,feedback:o.includes(i)?"error":"none",className:Nt.formFieldInput,"data-inputsize":l},i))})},tj=({FORM_CONFIGS:e,ICONS:t})=>{const{router:r}=pe();return s.jsxs("div",{className:Nt.success,children:[s.jsx(d.TextStructure.Root,{adornment:{start:s.jsx(d.Icon,{name:t.check_circle,size:"medium"})},children:s.jsx(d.TextStructure.DivWrapper,{className:Nt["text-structure-modifier"],children:s.jsx("p",{children:e.successMessage})})}),s.jsx(d.Button,{size:"large",onClick:()=>r.push("/"),className:Nt.button,children:e.returnButton})]})},rj=({FORM_CONFIGS:e,ICONS:t})=>{const{fieldMessage:r}=gs();return s.jsx("div",{className:Nt.error,children:s.jsx(d.TextStructure.Root,{adornment:{start:s.jsx(d.Icon,{name:t.delete_circle,size:"small"})},children:s.jsx(d.TextStructure.DivWrapper,{className:Nt["text-structure-modifier"],children:s.jsxs("p",{children:[e.errorMessage,r]})})})})},nj=({children:e,className:t,ICONS:r,FORM_CONFIGS:n})=>{const{submitForm:o,status:a}=gs();return s.jsx("form",{onSubmit:o,className:d.helpers.classNameConcat(Nt.formContainer,t),children:a==="success"?s.jsx(tj,{ICONS:r,FORM_CONFIGS:n}):s.jsxs(s.Fragment,{children:[e,a==="error"&&s.jsx(rj,{ICONS:r,FORM_CONFIGS:n})]})})},sj=e=>{const{children:t,className:r}=e;return s.jsx(cm,{...e,children:s.jsx(nj,{ICONS:e.ICONS,FORM_CONFIGS:e.FORM_CONFIGS,className:r,children:t})})},Nr={Root:sj,FieldGroup:Yb,FieldWrapper:ej},oj="_button_1e35m_39",Xt={"banner-container":"_banner-container_1e35m_1","banner-background":"_banner-background_1e35m_6","form-root":"_form-root_1e35m_15",button:oj,"form-fied-wrapper":"_form-fied-wrapper_1e35m_52"};function aj({content:e,sections:t,FORM_CONFIGS:r,ICONS:n,postFn:o,POPUP_SUBMITTED_STORAGE:a}){var l;const{isMobile:i}=oe(),c=((l=t.find(({name:u})=>u==="Form"))==null?void 0:l.data)||{};return s.jsx("div",{children:s.jsxs(d.Banner.Container,{className:Xt["banner-container"],children:[s.jsx(d.Banner.ImageWrapper,{children:s.jsx(De.Image,{className:Xt["banner-background"],src:i?e.bannerMobile:e.bannerDesk,alt:e.altBanner,width:"1920",height:"500"})}),s.jsxs(Nr.Root,{postFn:o,ICONS:n,FORM_CONFIGS:r,groups:c.groups||[],masterDataEntity:c.masterDataEntity||"",className:Xt["form-root"],POPUP_SUBMITTED_STORAGE:a,children:[c.groups.map(u=>s.jsx(Nr.FieldGroup,{group:u,children:s.jsx(Nr.FieldWrapper,{fields:u.fields,className:Xt["form-fied-wrapper"]})},u.groupLabel)),s.jsxs("div",{children:[s.jsx(d.TextStructure.DivWrapper,{children:s.jsx("p",{className:"typography-style-body-xs",children:e.requiredMessage})}),s.jsx("div",{className:Xt["button-wrapper"],children:s.jsx("div",{className:Xt["button-frame"],children:s.jsx(d.Button,{size:"large",type:"submit",className:Xt.button,children:e.buttonLabel})})})]})]})]})})}const ij="_content_1jj9i_36",cj="_trends_1jj9i_47",lj="_modal_1jj9i_1",tt={"modal-header":"_modal-header_1jj9i_1","modal-header__close-button":"_modal-header__close-button_1jj9i_7","search-modal__title":"_search-modal__title_1jj9i_10",content:ij,trends:cj,"trends-content":"_trends-content_1jj9i_57","trends-item":"_trends-item_1jj9i_62","modal-auto-complete":"_modal-auto-complete_1jj9i_76","modal-search-empty":"_modal-search-empty_1jj9i_88",modal:lj,"search-modal__modal":"_search-modal__modal_1jj9i_100"},lm=g.createContext({}),uj=({children:e,term:t})=>{const[r,n]=g.useState([]),[o,a]=g.useState(!1);return g.useEffect(()=>{if(!t){n([]);return}(async()=>{a(!0);try{const c=await fetch("/api/search/suggestedTerms",{method:"POST",body:JSON.stringify({query:t,locale:"pt-BR"})}),{data:l}=await c.json();n((l==null?void 0:l.searches)||[])}catch(c){console.error("Erro ao buscar sugestões:",c)}})()},[t]),s.jsx(lm.Provider,{value:g.useMemo(()=>({suggestedTerms:r,loading:o,setLoading:a}),[r,o]),children:e})},dj=({children:e,...t})=>s.jsx(uj,{...t,children:e}),fj=()=>{const e=g.useContext(lm);if(!e)throw new Error("useSuggestedTermsContext must be used within a SuggestedTermsProvider");return e},lo=(e,t,r=24,n=1,o="release:desc")=>{const a=`/search?query=${t??""}&count=${r}&page=${n}${o?`&sort=${o.replace("_",":")}`:""}`;e.push(a)},um=({placeholder:e,noResultsTitle:t,noResultsLabel:r,noResultsTermText:n,handleClose:o,setTerm:a,ICONS:i,ITEMS_DEFAULT_SORT:c,ITEMS_PER_PAGE:l,SEARCH_MODAL:u})=>{const[f,p]=g.useState(""),{suggestedTerms:m,loading:h,setLoading:_}=fj(),{router:y}=pe(),v=g.useRef(null),b=x=>{p(x.target.value),clearTimeout(v.current),x.target.value.length>2&&(a(x.target.value),v.current=setTimeout(()=>{a(x.target.value),_(!1)},2e3))},C=x=>{x.key==="Enter"&&(f==null?void 0:f.length)>2&&(o(),lo(y,f,l,1,c))},j=x=>{o(),lo(y,x,l,1,c)};return g.useEffect(()=>{if(clearTimeout(v.current),f.length<=2||m.length>0){_(!1);return}return _(!0),v.current=setTimeout(()=>{lo(y,f,l,1,c),_(!1),o()},2e3),()=>{clearTimeout(v.current)}},[f,m]),s.jsx(d.DropDown.AutoComplete,{className:tt["modal-auto-complete"],onKeyDown:C,onInputChange:b,placeholder:e,stopClickPropagation:!1,adornment:{end:h?s.jsx(d.Spinner,{size:"small"}):s.jsx(d.Button,{variant:"tertiary",size:"small",iconNameStart:i.search,onClick:()=>{j(f)},disabled:!(f.length>2)})},children:(m==null?void 0:m.length)>0&&s.jsx(s.Fragment,{children:(m==null?void 0:m.length)>0&&(f==null?void 0:f.length)>2?s.jsx(d.DropDown.AutoCompleteList,{className:tt["modal-auto-complete__dropdown"],seeAll:s.jsx("span",{onClick:()=>j(f),children:n+f}),children:m.map((x,S)=>s.jsx(d.DropDown.ListItemWithLink,{children:s.jsx(Ye,{href:`/search?query=${x.term}&count=${l}&page=1`,size:"x-small",title:x.term,disableUnderline:!0,disablePadding:!1,onClick:E=>{E.preventDefault(),o()},children:x.term})},`key-${x.term}-${S}`))}):!h&&(f==null?void 0:f.length)>3&&(m==null?void 0:m.length)===0&&s.jsxs(d.DropDown.AutoCompleteList,{className:tt["modal-search-empty"],children:[s.jsx(d.DropDown.NotResults,{description:r,title:t}),s.jsx(d.Button,{className:"all-terms",onClick:()=>{o(),y.push(u.EMPTY.ALL_TERMS)},variant:"tertiary",size:"medium",title:u.EMPTY.ALL_TERMS_LABEL,adornment:{end:s.jsx(d.Icon,{name:i.arrow_right,size:"medium"})},children:u.EMPTY.ALL_TERMS_LABEL})]})})})};um.displayName="SearchModal.AutoComplete";function pj({title:e,ICONS:t}){const{isMobile:r}=oe();return s.jsx(d.Modal.Header,{navigation:"top",className:tt["modal-header"],children:s.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!r,children:[s.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),s.jsx(d.Modal.Title,{navigation:"top",className:tt["search-modal__title"],title:e}),s.jsx(d.Button,{className:tt["modal-header__close-button"],"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})})}const dm=g.createContext({searches:[],isLoading:!1,error:null});let uo=null;const mj=({children:e})=>{const[t,r]=g.useState([]),[n,o]=g.useState(!0),[a,i]=g.useState(null);return g.useEffect(()=>{(async()=>{try{if(o(!0),uo){r(uo),o(!1);return}const l=await fetch("/api/search/topSearch");if(!l.ok)throw new Error(`Erro ao buscar os dados: ${l.status}`);const f=(await l.json()).data.searches||[];uo=f,r(f)}catch(l){i(l instanceof Error?l.message:"Erro desconhecido")}finally{o(!1)}})()},[]),s.jsx(dm.Provider,{value:g.useMemo(()=>({searches:t,isLoading:n,error:a}),[t,n,a]),children:e})},hj=()=>{const e=g.useContext(dm);if(!e)throw new Error("useTopSearches must be used within a TopSearchesProvider");return e},_j=({title:e,allTermsLabel:t,allTermsUrl:r,qtyTrends:n,handleClose:o,ICONS:a,ITEMS_PER_PAGE:i})=>{const{searches:c,isLoading:l}=hj(),{router:u}=pe(),f=Array.isArray(c)?c:[];return s.jsx(s.Fragment,{children:!l&&f.length>0?s.jsx(d.ComponentList.Structure,{className:tt.trends,title:e,children:s.jsxs("div",{className:tt["trends-content"],children:[s.jsx(d.ComponentList.List,{columns:1,children:f.slice(0,n).map((p,m)=>s.jsx(d.ComponentList.ListItem,{className:tt["trends-item"],children:s.jsx(Ye,{href:`/search?query=${p.term}&count=${i}&page=1`,size:"x-small",adornments:{end:s.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},disableUnderline:!0,title:p.term,onClick:()=>o(),children:p.term})},`list-item-${m}`))}),s.jsx(d.Button,{className:"all-terms",variant:"tertiary",size:"x-small",underline:!1,onClick:()=>{o(),u.push(r)},adornment:{end:s.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},children:t})]})}):null})};function gj({SectionZone:e}){var n;const[t,r]=g.useState(null);return g.useEffect(()=>{(async()=>{try{const a=await fetch("/api/cms/content-type-client",{method:"POST",body:JSON.stringify({contentType:"search"})});if(!a.ok)return;const i=await a.json();r(i)}catch(a){console.error("[CMS FETCH ERROR]",a)}})()},[]),s.jsx("div",{className:tt.content,children:t!==null&&s.jsx(e,{data:((n=t[0])==null?void 0:n.sections)??[],componentConfigs:{"Product Carousel":{searchModal:!0}}})})}const fm=({className:e,trends:t,CONSTANTS:r,SectionZone:n})=>{const[o,a]=g.useState(""),{isMobile:i}=oe(),c=al(),{setValue:l}=ts(),{SEARCH_MODAL:u,ICONS:f,ITEMS_PER_PAGE:p,ITEMS_DEFAULT_SORT:m}=r;return s.jsxs(d.Modal.Root,{isMobile:i??!1,variant:i?"sideBottom":"sideRight",isOpen:c,setIsOpen:l,className:`${tt.modal} ${tt["search-modal__modal"]} ${e??""}`,children:[s.jsx(pj,{title:u.HEADER.TITLE,ICONS:f}),s.jsxs(d.Modal.Body,{className:tt["modal-content-body"],children:[s.jsx(dj,{term:o,children:s.jsx(um,{placeholder:u.AUTOCOMPLETE.PLACEHOLDER,noResultsTitle:u.EMPTY.NOT_FOUND,noResultsLabel:u.EMPTY.NOT_FOUND_P,noResultsTermUrl:u.AUTOCOMPLETE.NO_RESULTS.NO_RESULTS_TERM_URL,noResultsTermText:u.AUTOCOMPLETE.NO_RESULTS.NO_RESULTS_TERM_TEXT,handleClose:()=>l(!1),setTerm:a,ICONS:f,ITEMS_DEFAULT_SORT:m,ITEMS_PER_PAGE:p,SEARCH_MODAL:u})}),t?s.jsx(mj,{children:s.jsx(_j,{title:u.TRENDS.TITLE,allTermsUrl:u.TRENDS.ALL_TERMS_URL,allTermsLabel:u.TRENDS.ALL_TERMS_LABEL,qtyTrends:u.TRENDS.QTY_TERMS,handleClose:()=>l(!1),ICONS:f,ITEMS_PER_PAGE:p})}):null,s.jsx(gj,{SectionZone:n})]})]})};fm.displayName="SearchModal";const ut={"store--page-title":"_store--page-title_1rs1a_1","store--page-title--title":"_store--page-title--title_1rs1a_4","store--return-button":"_store--return-button_1rs1a_14","store--section":"_store--section_1rs1a_36","store--section--img":"_store--section--img_1rs1a_41","store--details":"_store--details_1rs1a_51","store--details--title":"_store--details--title_1rs1a_59","store--details--subtitle":"_store--details--subtitle_1rs1a_68","store--details--text":"_store--details--text_1rs1a_77","store--details--vendor":"_store--details--vendor_1rs1a_87","store--select":"_store--select_1rs1a_91","store--wrapper":"_store--wrapper_1rs1a_115"},pm=({LPLOJAS_TEMPLATE_RETURN_BUTTON:e,ICONS:t,showVendor:r})=>{const{selectedCity:n,selectedStore:o}=ss();return s.jsx(d.Card,{padding:"small",shadow:!0,className:ut["store--wrapper"],children:o?s.jsxs(s.Fragment,{children:[s.jsx(Pt.ReturnButton,{ICONS:t,children:e}),s.jsx(Pt.Details,{ICONS:t,showVendor:r,store:n==null?void 0:n.find(a=>a.nome===o)})]}):s.jsx(Pt.Select,{ICONS:t})})};pm.displayName="LPStores.Content";const Yr=({title:e,text:t,type:r,...n})=>s.jsx(d.TextStructure.DivWrapper,{...n,children:r==="title"?s.jsx("h4",{className:ut["store--details--title"],children:e}):s.jsxs(s.Fragment,{children:[s.jsx("h5",{className:ut["store--details--subtitle"],children:e}),s.jsx("p",{className:ut["store--details--text"],children:t})]})});Yr.displayName="LPStores.Details";const mm=({vendor:e,ICONS:t})=>{const r=e?e.split(","):[];return s.jsxs(d.Accordion.Wrapper,{style:{width:"100%"},children:[s.jsx(d.Accordion.Header,{id:"accordion-header-vendor",closeIndicator:s.jsx(d.Icon,{name:t.arrow_up,size:"small"}),openIndicator:s.jsx(d.Icon,{name:t.arrow_down,size:"small"}),title:"Código de vendedor (A)",children:s.jsx(d.TextStructure.Root,{children:s.jsx(d.TextStructure.DivWrapper,{gap:0,children:s.jsx("h3",{className:"typography-style-body-md",children:"Código de vendedor (A)"})})})}),s.jsx(d.Accordion.Body,{children:s.jsx(d.TextStructure.Root,{children:s.jsx(d.TextStructure.DivWrapper,{className:ut["store--details--vendor"],children:r.map((n,o)=>s.jsx("p",{className:"typography-style-body-sm",children:n.trim()},o))})})})]})};mm.displayName="LPStores.Details";const hm=({store:e,showVendor:t,ICONS:r})=>s.jsxs("div",{className:ut["store--details"],children:[s.jsx(Yr,{alignItems:"left",title:String(e==null?void 0:e.nome),type:"title"}),s.jsx(Yr,{title:"Endereço",text:String(e.endereco)}),e.telefone&&s.jsx(Yr,{title:"Telefone",text:String(e.telefone)}),e.horario&&s.jsx(Yr,{title:"Horário de funcionamento",text:String(e.horario)}),t&&s.jsx(mm,{ICONS:r,vendor:String(e.vendedoras)})]});hm.displayName="LPStores.Details";const _m=({ICONS:e,arrowDownIcon:t=s.jsx(d.Icon,{name:e.arrow_down,size:"small"}),arrowUpIcon:r=s.jsx(d.Icon,{name:e.arrow_up,size:"small"}),list:n,selectText:o,...a})=>s.jsx(d.DropDown.DefaultDropDown,{...a,"aria-placeholder":o,adornmentListClosed:{end:t},adornmentListOpened:{end:r},mode:"simple",placeholder:o,sizeVariant:"large",children:s.jsx(d.DropDown.DefaultDropDownList,{placeholder:o,supportText:o,maxHeight:400,children:Array.isArray(n)&&(n==null?void 0:n.map(i=>s.jsx(d.DropDown.ListItem,{value:i,children:i},i.replace(/\s/g,""))))})});_m.displayName="LPStores.DropDown";const gm=({children:e,ICONS:t})=>{const{clearSelectedStore:r}=ss(),n=()=>{typeof r=="function"&&r()};return s.jsxs("button",{"aria-label":String(e),className:ut["store--return-button"],onClick:n,onKeyDown:n,children:[s.jsx(d.Icon,{name:t.arrow_left,size:"small"}),e]})};gm.displayName="LPStores.ReturnButton";const ym=({children:e,data:t})=>s.jsx(Pu,{data:t,children:e});ym.displayName="LPStores.Root";const vm=({children:e,imgAlt:t,imgSrcDesk:r,imgSrcMob:n})=>{const{isMobile:o}=oe();return s.jsxs("section",{className:ut["store--section"],children:[s.jsx(sn,{src:o?n:r,alt:t,fill:!0,className:ut["store--section--img"]}),e]})};vm.displayName="LPStores.Section";const xm=({ICONS:e})=>{const{data:t,handleSelectCity:r,selectedCity:n,handleSelectStore:o}=ss(),a=new Set(t.map(c=>c.cidade)),i=Array.from(a).filter(c=>typeof c=="string");return s.jsxs("div",{className:ut["store--select"],children:[s.jsx(Pt.DropDown,{selectText:"Selecione a cidade",handleSelectedValue:r,list:i,defaultValue:n==null?void 0:n[0].cidade,ICONS:e}),s.jsx(Pt.DropDown,{"data-selected-city":!!n,selectText:"Selecione a loja",handleSelectedValue:o,list:n?n==null?void 0:n.map(c=>String(c.nome)):[],ICONS:e},n==null?void 0:n[0].cidade)]})};xm.displayName="LPStores.Select";const bm=({children:e})=>s.jsx(d.TextStructure.Root,{children:s.jsx(d.TextStructure.DivWrapper,{className:ut["store--page-title"],children:s.jsx("h2",{className:ut["store--page-title--title"],children:e})})});bm.displayName="LPStores.Title";const Pt={Content:pm,Details:hm,DropDown:_m,ReturnButton:gm,Root:ym,Section:vm,Select:xm,Title:bm},Vn={teamComponents:{AddToCart:ha,BackToTop:Cg,HelpButton:qb,BuyPackage:bd,Filter:{...At,helpers:Ff},...ux,FreightCalculation:wf,Header:Pf,Link:Ye,Media:De,PLPNavigation:Kt,ProductCard:ye,ProductList:et,ProductVariationList:yt,Sort:ds,UserMenu:ls,Newsletter:Ra,Form:Nr},template:{minicart:Ke,pdc:Wp,pdc_composites:St,pdp:Qx,searchResult:Zp,wishList:ad,LPCadastro:aj,SearchModal:fm,LPStores:Pt},utils:{EventCollector:Nb,ExternalScripts:Ob,LinkOrNotLink:vn,ObserverWrapper:cs,SnackBarComponent:wr,DraftJsLinkWrapper:Ip}},yj=(e,t)=>{const r=e.map(o=>`'${o.source}'`).join(`,
19
19
  `);return`
20
20
  import type { NextRequest } from 'next/server'
21
21
  import { NextResponse } from 'next/server'
@@ -52,7 +52,7 @@ See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-comp
52
52
 
53
53
  export const config = {
54
54
  matcher: [
55
- ${n}
55
+ ${r}
56
56
  ]
57
57
  }
58
- `},ix=Object.freeze(Object.defineProperty({__proto__:null,generateMiddleware:ax},Symbol.toStringTag,{value:"Module"})),cx={helpers:ix},ds={"custom-carousel":"_custom-carousel_t5fgp_1","carrousel-arrows-display-controller":"_carrousel-arrows-display-controller_t5fgp_10","carousel-controllers-modifier":"_carousel-controllers-modifier_t5fgp_19"};function lx(e,t){const{mediatorRef:n}=ne();g.useEffect(()=>n.current.subscribe(e,t),[e,t])}const fa=({prevOnClick:e,nextOnClick:t,onBulletClick:n,currentPage:s,totalPages:o,position:a,hideControllers:i,left:c,isFirst:l,ICONS:u})=>{const[m,f]=g.useState("default");return lx("herobanner:change_controllers_variant",p=>{l&&f(p.includes("white")?"inverse":"default")}),r.jsxs(d.Carousel.Controller,{className:ds["carousel-controllers-modifier"],position:a??"absolute","data-hide-controllers":i,bottom:"16px",top:"unset",left:c,children:[r.jsxs(d.Carousel.Arrows,{className:ds["carrousel-arrows-display-controller"],children:[r.jsx(d.Button,{variant:"tertiary",onClick:e,adornment:{start:r.jsx(d.Icon,{name:u.arrow_left})},mode:m}),r.jsx(d.Button,{variant:"tertiary",onClick:t,adornment:{start:r.jsx(d.Icon,{name:u.arrow_right})},mode:m})]}),r.jsx(d.Carousel.Bullets,{page:s,total:o,onBulletClick:n,mode:m})]})},ux=({children:e,data:t,banner:n,...s})=>{const{mediatorRef:o}=ne();return t.data.first?r.jsx(Vn,{observerOptions:{threshold:.51},stopOnIntersection:!1,callBackWhenVisible:()=>{o.current.publish("header:change_variant",n.headerVariant)},...s,children:e}):r.jsx(r.Fragment,{children:e})},tm=e=>{const{initialize:t,pagination:n,controller:s,itemsStyles:o}=d.Carousel.useCarousel({gap:e.data.config.gap,itemsPerPage:e.data.config.slidesPerView,direction:"row"}),a=g.useRef(void 0),i=g.useMemo(()=>md(e.data.config.controllerPosition??"dentro-inferior-centro"),[e]),c=g.useCallback(()=>{e.data.config.slideDuration&&n.totalPages>1&&(a.current=setInterval(()=>{s==null||s.nextPage()},e.data.config.slideDuration*1e3))},[s,e.data.config.slideDuration,n.totalPages]),l=g.useCallback(m=>{clearInterval(a.current),c(),m()},[c]),u=g.useMemo(()=>{var m;return{nextOnClick:()=>l(()=>s==null?void 0:s.nextPage()),prevOnClick:()=>l(()=>s==null?void 0:s.prevPage()),onBulletClick:f=>l(()=>s==null?void 0:s.navigateTo(f)),currentPage:n.currentPage,totalPages:n.totalPages,position:i.position,hideControllers:((m=e.data.config)==null?void 0:m.hideControllers)??!1,left:i.left}},[n.currentPage,n.totalPages,i.position,e.data.config.hideControllers,l,s]);return g.useEffect(()=>(c(),()=>clearInterval(a.current)),[c]),r.jsx(Ye,{name:e.name,children:r.jsxs(d.Carousel.Root,{innerRef:m=>{t(m)},className:d.helpers.classNameConcat(ds["custom-carousel"],e.data.config.fullWidth?"":"common-section"),"data-infinity-border":!0,style:{...e.data.config.marginTop!=="0px"&&{marginTop:`-${e.data.config.marginTop}`},...e.data.config.marginBottom!=="0px"&&{marginBottom:`-${e.data.config.marginBottom}`}},children:[i.shouldRender==="top"&&n.totalPages>1?r.jsx(fa,{ICONS:e.ICONS,...u,isFirst:e.data.first}):r.jsx(r.Fragment,{}),r.jsx(d.Carousel.Body,{children:e==null?void 0:e.data.banners.map((m,f)=>r.jsx(d.Carousel.Item,{style:o,children:r.jsx(ux,{data:e,banner:m,children:r.jsx(sn,{name:"Banner Carousel",ICONS:e.ICONS,TEXTCONTENT_EXPANDED:e.TEXTCONTENT_EXPANDED,TIME_ZONE:e.TIME_ZONE,suppressContentEditableWarning:!0,suppressHydrationWarning:!0,className:e.className,data:{banner:m,index:f,componentIndex:e.data.componentIndex},creative:"banner-carousel",...e.data.first&&f===0&&{priority:!0}})})},`hero-banner-item-${f}`))}),i.shouldRender==="bottom"&&n.totalPages>1?r.jsx(fa,{ICONS:e.ICONS,...u}):r.jsx(r.Fragment,{})]})})},dx={Banner:Xs},It={"row-controller-modifier":"_row-controller-modifier_co4wb_1","carousel-title-modifier":"_carousel-title-modifier_co4wb_18","carousel-modifier":"_carousel-modifier_co4wb_22","card-modifier":"_card-modifier_co4wb_26"},nm=({data:e,name:t,CONSTANTS:n})=>{var m;const{isMobile:s}=ne(),o=e.config.size??"medium",a=e.config.disableCarouselMobile??!1,{initialize:i,pagination:c,controller:l,itemsStyles:u}=d.Carousel.useCarousel({itemsPerPage:s?e==null?void 0:e.config.slidesPerViewMobile:(m=e==null?void 0:e.config)==null?void 0:m.slidesPerView,gap:s?e.config.gapMobile:e.config.gap,direction:s&&a?"column":"row"});return r.jsx(Ye,{name:t,children:r.jsx(d.Utils.Column,{style:{width:o==="small"?"70%":"100%"},alignContent:"center",justifyContent:"center",alignItems:"center",children:r.jsxs(d.Carousel.Root,{innerRef:f=>{i(f)},className:d.helpers.classNameConcat(It["carousel-modifier"],"common-section"),children:[o==="medium"?r.jsxs(d.TextStructure.Root,{children:[n.ACTIVE_BENNEFITS_BAR_TITLE&&r.jsx(d.TextStructure.DivWrapper,{className:It["carousel-title-modifier"],children:r.jsx("h2",{className:"typography-style-body-lg",children:n.BENNEFITS_BAR_TITLE})}),s&&c.totalPages>1&&r.jsx(d.Carousel.Controller,{className:d.helpers.classNameConcat(It["row-controller-modifier"],n.ACTIVE_BENNEFITS_BAR_TITLE?It["title-on"]:void 0),children:r.jsxs(d.Carousel.Arrows,{children:[r.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.prevPage(),adornment:{start:r.jsx(d.Icon,{name:n.ICONS.arrow_left})}}),r.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.nextPage(),adornment:{start:r.jsx(d.Icon,{name:n.ICONS.arrow_right})}})]})})]}):r.jsx(r.Fragment,{}),r.jsx(d.Carousel.Body,{children:e.bennefit.map((f,p)=>r.jsx(d.Carousel.Item,{className:It["card-modifier"],style:u,children:r.jsx(d.Card,{stroke:!0,padding:"small",children:r.jsx(d.TextStructure.Root,{layoutProps:{columnWrapper:{alignContent:"start",alignItems:"start",justifyContent:"start"},textRow:{alignContent:"center",alignItems:"center",justifyContent:"center"}},adornment:{[o==="medium"?"top":"start"]:r.jsx(d.Icon,{name:f.icon,size:o==="medium"?"medium":"small"})},children:r.jsxs(d.TextStructure.DivWrapper,{alignItems:"start",children:[r.jsx("h3",{className:"typography-style-body-md",children:f.title}),f.subtitle&&f.subtitle.length?r.jsx("p",{className:"typography-style-body-xs",children:f.subtitle}):r.jsx(r.Fragment,{})]})})})},`bennefit=${p}`))}),!s&&c.totalPages>1?r.jsxs(d.Carousel.Controller,{className:It["row-controller-modifier"],children:[r.jsxs(d.Carousel.Arrows,{children:[r.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.prevPage(),adornment:{start:r.jsx(d.Icon,{name:n.ICONS.arrow_left})}}),r.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.nextPage(),adornment:{start:r.jsx(d.Icon,{name:n.ICONS.arrow_right})}})]}),r.jsx(d.Carousel.Bullets,{page:c.currentPage,total:c.totalPages,onBulletClick:f=>l==null?void 0:l.navigateTo(f)})]}):r.jsx(r.Fragment,{})]})})})},rm=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:n,className:s,name:o})=>r.jsx(Ye,{name:o,children:r.jsx("div",{className:d.helpers.classNameConcat(is.textContentSection,s??""),style:e.borderTop?{borderTop:"none"}:void 0,children:r.jsx(pd,{data:e,ICONS:t,TEXTCONTENT_EXPANDED:n})})}),ha={"accordion-modifier":"_accordion-modifier_1we16_1","accordion-body-modifier":"_accordion-body-modifier_1we16_7"},sm=({data:e,id:t,ICONS:n,className:s,name:o})=>{var c;const[a,i]=g.useState([]);return r.jsx(Ye,{name:o,children:r.jsxs(d.Utils.Column,{gap:"var(--gap-vertical-sm)",className:s??"",children:[e.titleAccordion?r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-sm","common-section"),style:{fontWeight:500},children:e.titleAccordion})})}):r.jsx(r.Fragment,{}),(c=e.accordions)==null?void 0:c.map((l,u)=>r.jsxs(d.Accordion.Wrapper,{className:ha["accordion-modifier"],children:[r.jsx(d.Accordion.Header,{id:`${t}-text-accordion-${u}`,openIndicator:r.jsx(d.Icon,{name:n.arrow_down}),closeIndicator:r.jsx(d.Icon,{name:n.arrow_up}),startOpen:a.includes(u),onClick:()=>i(m=>m.includes(u)?m.filter(f=>f!==u):[...m,u]),children:r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("h3",{className:"typography-style-body-md-strong",children:l.title}),l.subtitle&&l.subtitle.length?r.jsx("h2",{children:l.subtitle}):r.jsx(r.Fragment,{})]})})}),r.jsx(d.Accordion.Body,{children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:ha["accordion-body-modifier"],children:r.jsx(Ze.Editor,{editorKey:`${t}-editor-${u}`,blockRenderMap:Ln,editorState:l.text?Tn(JSON.parse(l.text)):Ze.EditorState.createEmpty(),onChange:()=>null})})})})]},`${t}-accordion-${u}-${a.includes(u)}`))]})})},om=g.createContext({}),mx=({data:e,children:t,...n})=>{var _,y,x,b,C,j,v,P,S,E,I,A,L;const[s,o]=g.useState(!0),{initialize:a,controller:i,itemsStyles:c}=d.Carousel.useCarousel({gap:0,itemsPerPage:1}),l={slideTranstionTimer:(y=(_=e==null?void 0:e.staticConfig)==null?void 0:_.staticConfig)==null?void 0:y.slideTranstionTimer,showCarouselArrows:(b=(x=e==null?void 0:e.staticConfig)==null?void 0:x.staticConfig)==null?void 0:b.showCarouselArrows,hasCloseBtn:(j=(C=e==null?void 0:e.staticConfig)==null?void 0:C.staticConfig)==null?void 0:j.hasCloseBtn,backgroundColor:(P=(v=e==null?void 0:e.staticConfig)==null?void 0:v.staticConfig)==null?void 0:P.backgroundColor,textColorVariant:(E=(S=e==null?void 0:e.staticConfig)==null?void 0:S.staticConfig)==null?void 0:E.textColorVariant,content:((A=(I=e==null?void 0:e.content)==null?void 0:I.content)==null?void 0:A.items)??[]},u=(L=l.content)==null?void 0:L.filter(O=>!O.countDownEndDate||new Date(O.countDownEndDate)>new Date),m=u.length>1,f={...l.backgroundColor?{backgroundColor:l.backgroundColor}:{}},p=()=>{o(!1)},h=d.helpers.ValidateProp({fieldTypes:Tt.Mode,property:l.textColorVariant,fallback:"default"});return r.jsx(om.Provider,{value:{isOpen:s,setIsOpen:o,hasCarousel:m,backgroundStyle:f,handleCloseTipbar:p,mode:h,slideTranstionTimer:l.slideTranstionTimer,showCarouselArrows:l.showCarouselArrows,hasCloseBtn:l.hasCloseBtn,slices:u,carouselProps:{initialize:a,controller:i,itemsStyles:c},...n},children:t})},lt=()=>g.useContext(om),px=({dateEnd:e,...t})=>{const{CONSTANTS:{TIME_ZONE:n}}=lt();return r.jsx(An,{dateEnd:new Date(e),TIME_ZONE:n,...t})},fx="_tipbar_bt3p0_1",hx="_tipbar__carousel_bt3p0_15",on={tipbar:fx,tipbar__carousel:hx,"tipbar__close-btn":"_tipbar__close-btn_bt3p0_29","tipbar-item":"_tipbar-item_bt3p0_37","tipbar-item__coupon":"_tipbar-item__coupon_bt3p0_45"},_x=({coupon:e,feedbackTitle:t,feedbackDescription:n,...s})=>{const{CONSTANTS:o}=lt(),{addCouponSeller:a,cartStore:i}=ve(),[c,l]=g.useState({status:!1,showSnackBar:!1}),[u,m]=g.useState(!1),[f,p]=g.useState(!1),h=async()=>{if(!i.items.length){p(!0);return}(await a(e,"coupon")).code===200?l({status:!0,showSnackBar:!0}):m(!0)};return g.useEffect(()=>{c.showSnackBar&&setTimeout(()=>{l(_=>({..._,showSnackBar:!1}))},o.TIPBAR_CONFIGS.snackbar_timeout)},[c.showSnackBar]),g.useEffect(()=>{u&&setTimeout(()=>{m(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[u]),g.useEffect(()=>{f&&setTimeout(()=>{p(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[f]),r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{...s,onClick:h,disabled:c.status,className:on["tipbar-item__coupon"],children:c.status?`${o.TIPBAR_CONFIGS.coupon_applied_message}`:`${o.TIPBAR_CONFIGS.coupon_default_message}`}),c.showSnackBar&&(t||n)&&r.jsx(Lt,{title:t,subtitle:n,Z_INDEX_WAR:o.Z_INDEX_WAR},`feedback-coupon-${e}`),u&&r.jsx(Lt,{title:o.TIPBAR_CONFIGS.coupon_error_title,subtitle:o.TIPBAR_CONFIGS.coupon_error_message,Z_INDEX_WAR:o.Z_INDEX_WAR},`error-coupon-${e}`),f&&r.jsx(Lt,{title:o.TIPBAR_CONFIGS.coupon_cart_empty_title,subtitle:o.TIPBAR_CONFIGS.coupon_cart_empty_message,Z_INDEX_WAR:o.Z_INDEX_WAR},`error-cart-empty-${e}`)]})},gx=({title:e,description:t,style:n,mode:s,className:o})=>r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{mode:s,className:o,children:[e&&r.jsx("h3",{className:"typography-style-body-sm",style:n,children:e}),t&&r.jsx("p",{className:"typography-style-caption",style:n,children:t})]})}),yx=({coupon:e,...t})=>{const{CONSTANTS:n}=lt();return r.jsx(d.Copy,{...t,iconCopy:n.ICONS.copy,iconSuccess:n.ICONS.check,children:e})},xx=({staticZone:e,type:t,className:n,description:s,title:o})=>{const{mode:a}=lt();if(t==="countdown")return r.jsx(px,{dateEnd:e.countDownEndDate,size:"x-small",mode:a});if(t==="coupon"){const i=d.helpers.ValidateProp({fieldTypes:Tt.Mode,property:e.couponButtonMode,fallback:"default"}),c=d.helpers.ValidateProp({fieldTypes:Tt.VariantsExtended,property:e.couponButtonVariant,fallback:"primary"});return e.coupon?r.jsx(_x,{coupon:e.coupon,mode:i,variant:c,feedbackTitle:e.couponFeedbackTitle,feedbackDescription:e.couponFeedbackDescription}):null}if(t==="copy"){const i=d.helpers.ValidateProp({fieldTypes:Tt.Mode,property:e.couponButtonMode,fallback:"default"});return e.coupon?r.jsx(yx,{coupon:e.coupon,mode:i}):null}return r.jsx(gx,{title:o,description:s,mode:a,className:n})},_a=({handleCloseTipbar:e,mode:t})=>{const{CONSTANTS:n}=lt();return r.jsx(d.Button,{title:"fechar tipbar",className:on["tipbar__close-btn"],onClick:e,variant:"tertiary",mode:t,adornment:{start:r.jsx(d.Icon,{name:n.ICONS.close})}})},vx=({children:e,mode:t="default",showCarouselArrows:n=!0,slideTranstionTimer:s})=>{const{carouselProps:o,CONSTANTS:a}=lt(),i=g.useRef(null),c=(u,m)=>{var f,p;u.stopPropagation(),u.preventDefault(),m==="prev"?(f=o.controller)==null||f.prevPage():(p=o.controller)==null||p.nextPage(),i.current&&(clearInterval(i.current),l())},l=g.useCallback(()=>{if(s&&o.controller){const u=setInterval(()=>{var m;(m=o.controller)==null||m.nextPage()},s);i.current=u}},[s,o]);return g.useEffect(()=>(l(),()=>{i.current&&clearInterval(i.current)}),[s,l]),r.jsxs(d.Carousel.Root,{innerRef:u=>{o.initialize(u)},className:on.tipbar__carousel,style:{flexDirection:"row",alignItems:"center"},children:[n&&r.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"prev"),adornment:{start:r.jsx(d.Icon,{name:a.ICONS.arrow_left})}}),r.jsx(d.Carousel.Body,{children:e}),n&&r.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"next"),adornment:{start:r.jsx(d.Icon,{name:a.ICONS.arrow_right})}})]})},bx=({children:e,className:t})=>{const{hasCarousel:n,mode:s,hasCloseBtn:o,backgroundStyle:a,showCarouselArrows:i,slideTranstionTimer:c,handleCloseTipbar:l}=lt(),u=n&&i;return r.jsx("div",{style:a,"data-hasclosebtn":o,className:d.helpers.classNameConcat(on.tipbar,t),children:n?r.jsxs(r.Fragment,{children:[r.jsx(vx,{mode:s,showCarouselArrows:u,slideTranstionTimer:c,children:e}),o&&r.jsx(_a,{handleCloseTipbar:l,showCarouselArrows:u,mode:s})]}):r.jsxs(r.Fragment,{children:[e,o&&r.jsx(_a,{handleCloseTipbar:l,mode:s})]})})},jx=({children:e,highlightFirstSection:t,...n})=>{const{hasCarousel:s,carouselProps:o}=lt(),a=r.jsx("div",{...n,className:on["tipbar-item"],children:e});return s?r.jsx(d.Carousel.Item,{style:o.itemsStyles,children:a}):a},am=({className:e})=>{const{isOpen:t,slices:n}=lt();return n.length&&t?r.jsx(bx,{children:n.map((s,o)=>{var a;return r.jsx(r.Fragment,{children:r.jsx(rn,{href:s.link,children:r.jsx(jx,{highlightFirstSection:s.highlightFirstSection,"data-justifyhighlightedsection":s.horizontalAlignHighlightedSection?s.horizontalAlignHighlightedSection:"center",children:s&&((a=s==null?void 0:s.items)!=null&&a.length)?s.items.map((i,c)=>r.jsx(xx,{staticZone:s,type:i.type,title:i.title,description:i.description,className:e},`tipbar-slice-field-${c}`)):null})})},`tipbar-slice-${o}`)})}):null};am.displayName="TipBar.Root";const ms=({className:e,...t})=>r.jsx(mx,{...t,children:r.jsx(am,{className:e})});ms.displayName="TipBar";const Cx=({CONSTANTS:e,data:t})=>{const{pathname:n}=ce(),{tipbarRef:s}=Ee(),o=c=>{const l=t==null?void 0:t.find(u=>{var m,f,p,h,_;return((f=(m=u.staticConfig)==null?void 0:m.staticConfig)==null?void 0:f.deviceType)===c&&((_=(h=(p=u.staticConfig)==null?void 0:p.staticConfig)==null?void 0:h.paths)==null?void 0:_.includes(n))});return l||(t==null?void 0:t.find(u=>{var m,f,p,h,_,y;return((f=(m=u.staticConfig)==null?void 0:m.staticConfig)==null?void 0:f.deviceType)===c&&(!((h=(p=u.staticConfig)==null?void 0:p.staticConfig)!=null&&h.paths)||((y=(_=u.staticConfig)==null?void 0:_.staticConfig)==null?void 0:y.paths.length)===0)}))},a=o("desktop"),i=o("mobile");return r.jsxs("div",{ref:s,className:T.responsive["responsive-flex"],children:[i&&r.jsx("div",{className:T.responsive["responsive-mobile-flex"],children:r.jsx(ms,{data:i,CONSTANTS:e})}),a&&r.jsx("div",{className:T.responsive["responsive-desktop-flex"],children:r.jsx(ms,{data:a,CONSTANTS:e})})]})},ga={"card-image-wrapper":"_card-image-wrapper_10mul_1","card-image-container":"_card-image-container_10mul_9"},im=e=>{const{nextimage:t}=ce();return r.jsx(Ye,{name:e.name,children:e.data.banners.map((n,s)=>r.jsx("div",{className:ga["card-image-wrapper"],children:r.jsx("div",{className:ga["card-image-container"],children:r.jsx(t,{src:n.image,alt:n.altImage?n.altImage:"Banner Coleção",width:500,height:600})})},s))})},Sx=({SectionZone:e,name:t,storeId:n,previewId:s})=>{const[o,a]=g.useState();return g.useEffect(()=>{o||T.fetchContentType("search",{name:t,storeId:n,previewId:s}).then(i=>{i!=null&&i.data&&Array.isArray(i.data)&&a(i.data[0])})},[]),r.jsx(e,{data:o??[]})},cm=({data:{componentIndex:e,...t},name:n,CONSTANTS:s})=>r.jsx(Ye,{name:n,children:r.jsx(Zs,{...t,CONSTANTS:s})}),lm=async e=>{const{type:t}=e,n=t==="collectionSearch"?"/api/search/product":"/api/search/crosseling",s=JSON.stringify(t==="collectionSearch"?{...e.params,facets:e.facets,term:e.term,forceUpdate:!1}:e.facets);return(await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:s}).then(a=>a.json()).then(a=>t==="collectionSearch"?a.data.products:a.products)).filter(a=>!!a.node.availability.status)},Ex="_shelf__container_bi04n_10",um={shelf__container:Ex},Px=({collectionSearch:e,title:t,CONSTANTS:n,searchModal:s})=>{const[o,a]=g.useState([]),{isMobile:i}=ne(),{ref:c,inView:l}=xa.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:u}=oe();return g.useEffect(()=>{if(!e)return;function m(){var f,p;lm({type:"collectionSearch",term:e==null?void 0:e.term,facets:e==null?void 0:e.facets,params:{count:((f=e==null?void 0:e.params)==null?void 0:f.count)??12,sort:((p=e==null?void 0:e.params)==null?void 0:p.sort)??n.ITEMS_DEFAULT_SORT}}).then(h=>{a(h)})}m()},[e]),g.useEffect(()=>{!l||o.length===0||u({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o},customData:{item_list_name:t??"Você também pode gostar"}}})},[l,o]),o.length===0?null:r.jsx("div",{ref:c,className:um.shelf__container,children:r.jsx(Xt.Shelf,{title:t??"Você também pode gostar",itemsPerPage:s?{desktop:2,mobile:1.4}:{desktop:4.4,mobile:2.2},ICONS:n.ICONS,children:Array.isArray(o)&&o.map(({node:m},f)=>{const{availability:{status:p}}=m;return p?r.jsx(Xt.Card,{item:m,isMobile:i,size:"medium",index:f,shelfTitle:t??"Você também pode gostar",CONSTANTS:n},m.id):null})})})},Nx=({recommendationSearch:e,title:t,CONSTANTS:n})=>{const[s,o]=g.useState([]),{isMobile:a}=ne(),{ref:i,inView:c}=xa.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:l}=oe(),u=g.useMemo(()=>e?[{key:e.type,value:e.productId}]:[],[e]);return g.useEffect(()=>{if(!e)return;function m(){var f;lm({type:"recommendationSearch",facets:u,params:{count:((f=e==null?void 0:e.params)==null?void 0:f.count)??12,sort:n.ITEMS_DEFAULT_SORT}}).then(p=>o(p))}m()},[u,e]),g.useEffect(()=>{if(!c||s.length===0||(e==null?void 0:e.type)==="suggestions")return;const m=t??"Você também pode gostar";l({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:s},customData:{item_list_name:m},outsideEcommerceData:{item_list_name:m}}})},[c,s]),(s==null?void 0:s.length)===0?null:(e==null?void 0:e.type)==="suggestions"?r.jsx(dl,{products:s,innerRef:i,inView:c,CONSTANTS:n}):r.jsx("div",{ref:i,className:um.shelf__container,children:r.jsx(Xt.Shelf,{title:t??"Você também pode gostar",itemsPerPage:{desktop:4.4,mobile:2.2},ICONS:n.ICONS,children:Array.isArray(s)&&s.map(({node:m},f)=>{const{availability:{status:p}}=m;return p?r.jsx(Xt.Card,{item:m,isMobile:a,size:"medium",index:f,shelfTitle:t??"Você também pode gostar",CONSTANTS:n},m.id):null})})})},dm=({data:e,name:t,CONSTANTS:n})=>{const{productId:s}=lc();return!(e!=null&&e.productLists)||e.productLists.length===0?null:e.productLists.map((o,a)=>r.jsx(Ye,{name:t,children:r.jsx(Nx,{title:o.title,recommendationSearch:{type:o.product_group_option,productId:s,params:{count:o.number_of_items,sort:"score:desc"}},CONSTANTS:n},`shelf=${a}`)}))},mm=({data:e,CONSTANTS:t,searchModal:n,name:s})=>{var a;const o=(a=e==null?void 0:e.productLists)==null?void 0:a.filter(i=>!!i.collectionId||!!i.search_base_name);return!o||o.length===0?null:o.map((i,c)=>{const l=i.collectionId?{term:"",facets:[{key:"productclusterids",value:`${i.collectionId}`}]}:{term:i.search_base_name,facets:[]};return r.jsx(Ye,{name:s,children:r.jsx(Px,{title:i.title,collectionSearch:{params:{count:i.number_of_items,sort:i.sort},...l},searchModal:n,CONSTANTS:t},`shelf=${c}`)})})},Ix="_embedLiveContainer_1ss0l_2",wx="_embedLivePlayer_1ss0l_7",ya={embedLiveContainer:Ix,embedLivePlayer:wx},pm=({data:e,name:t})=>r.jsx(Ye,{name:t,children:r.jsx("div",{className:ya.embedLiveContainer,children:r.jsx("div",{className:ya.embedLivePlayer,children:e.banner.videosrc?r.jsx(Ie.Video,{src:e.banner.videosrc??"",playsInline:!0,autoPlay:!0,loop:!0,muted:!0,title:"Live",controls:!0}):r.jsxs("div",{children:[r.jsx("iframe",{src:e.banner.embed_source??"",allow:"autoplay; fullscreen; picture-in-picture; loop;",title:"Live"}),r.jsx(Td,{src:"https://player.vimeo.com/api/player.js",defer:!0,strategy:"lazyOnload"})]})})})}),Rx="_popup_5taxs_9",Ax="_popup__overlay_5taxs_19",Tx="_popup__modal_5taxs_27",Be={popup:Rx,popup__overlay:Ax,popup__modal:Tx,"popup__modal--form":"_popup__modal--form_5taxs_49","popup__modal--header":"_popup__modal--header_5taxs_66","popup__modal--status":"_popup__modal--status_5taxs_69","popup__modal--checkbox":"_popup__modal--checkbox_5taxs_78","popup__modal--success":"_popup__modal--success_5taxs_90","popup__modal--close":"_popup__modal--close_5taxs_101"},Lx=e=>r.jsx("div",{className:Be["popup__modal--success"],children:r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:e.ICONS.check_circle,size:"large"})},children:r.jsxs(d.TextStructure.DivWrapper,{className:Be["text-structure-modifier"],children:[r.jsx("h3",{className:"typography-style-body-sm-strong",children:e.successTitle}),r.jsx("p",{className:"typography-style-body-caption",children:e.successDescription})]})})}),Ox=e=>{const{title:t,description:n,groups:s,ICONS:o}=e,{formErrors:a,submitForm:i,success:c}=Jn(),[l,u]=g.useState(!1);return r.jsx("form",{onSubmit:i,className:Be.formContainer,children:r.jsxs("div",{className:Be["popup__modal--form"],children:[r.jsxs(d.TextStructure.DivWrapper,{className:Be["popup__modal--header"],children:[r.jsx("strong",{className:"typography-style-body-md-strong",children:t}),r.jsx("p",{className:"typography-style-body-xs",children:n})]}),c?r.jsx(Lx,{...e}):r.jsxs(r.Fragment,{children:[s.map(m=>r.jsx(Ot.FieldGroup,{group:m,children:r.jsx(Ot.FieldWrapper,{fields:m.fields})},m.groupLabel)),r.jsx(d.Checkbox,{className:Be["popup__modal--checkbox"],adornment:r.jsx(d.Icon,{name:o.check,size:"small"}),name:"terms-and-conditions",label:"Li e aceito os termos de política de privacidade abaixo.",sizeVariant:"small",checked:l,onChange:()=>u(!l)}),r.jsxs("div",{children:[!l&&r.jsx(d.TextStructure.DivWrapper,{className:Be["popup__modal--status"],children:r.jsxs("p",{className:"typography-style-body-caption",children:[r.jsx(d.Icon,{size:"small",name:o.alert_circle}),dp]})}),r.jsx(d.Button,{disabled:!l,size:"medium",type:"submit",children:pp}),a.length?r.jsx(d.TextStructure.DivWrapper,{className:Be["popup__modal--status"],children:r.jsx("p",{className:d.helpers.classNameConcat(Be.formSubmitWarning,"typography-style-body-xs"),children:mp})}):null]})]})]})})},fm=({data:e,name:t,CONSTANTS:n})=>{const[s,o]=g.useState(!1),a=typeof window<"u"?window.sessionStorage.getItem(n.POPUP_TRACK_STORAGE)||window.localStorage.getItem(n.POPUP_SUBMITTED_STORAGE):null,i=()=>{o(!1),window.sessionStorage.setItem(n.POPUP_TRACK_STORAGE,"true")};return g.useEffect(()=>{setTimeout(()=>!a&&o(!0),2e3)},[]),e.active&&s?r.jsx(Ye,{name:t,children:r.jsxs("div",{className:Be.popup,children:[r.jsx("div",{onClick:i,className:Be.popup__overlay}),r.jsxs("div",{className:Be.popup__modal,children:[r.jsx(d.Button,{onClick:i,variant:"tertiary",className:Be["popup__modal--close"],children:r.jsx(d.Icon,{style:{color:e.closeColor||"#000"},name:n.ICONS.close,size:"medium"})}),r.jsx("div",{children:r.jsx(Ie.Image,{src:e.imageUrl,width:"459",height:"418",alt:e.title})}),r.jsx(Bd,{...e,children:r.jsx(Ox,{...e,ICONS:n.ICONS})})]})]})}):null},kx={"Image Grid":im,"Embed Live":pm,"Banner Carousel":tm,Banner:Xs,"Bennefits Bar":nm,newsletter:cm,TextContent:rm,TextAccordion:sm,"Product Carousel":mm,"PDP Product Carousel":dm,"Popup Modal":fm},Dx=({data:e,identifyWhoIsFirst:t=!1,componentConfigs:n})=>e==null?void 0:e.map((s,o)=>{const a=kx[s.name],i={...(n==null?void 0:n[s.name])??{}};return t&&o===0&&(s.data.first=!0),s.data.componentIndex=o,s.name==="TextAccordion"&&(i.id=`text-accordion-${o}`),a?r.jsx(a,{name:s.name,data:s.data,...i},`section-zone-component-${o}`):null}),Mx=e=>{const t=Fx(zx(e));return $x(t)},$x=e=>{const t=[];for(const n in e)t.push(...e[n]);return t},zx=e=>!e||!Array.isArray(e)?{}:e==null?void 0:e.reduce((t,n)=>{if(n!=null&&n.cidade){let s=t[n==null?void 0:n.cidade];s===void 0&&(s=t[n==null?void 0:n.cidade]=[]),s.push(n)}return t},{}),Fx=e=>{if(!e||!Object.keys(e).length)return{};const t=Object.keys(e).sort((s,o)=>s.localeCompare(o)),n={};for(const s of t)n[s]=e[s];return n},Bx=({content:e,data:t,showVendor:n,ICONS:s,entity:o,LPLOJAS_TEMPLATE_RETURN_BUTTON:a})=>{const[i,c]=g.useState([]);return g.useEffect(()=>{(async()=>{try{const u=await fetch("/api/master-data/search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({masterDataEntity:o,searchFields:{_fields:"_all"},headers:{"REST-Range":"resources=0-1000"}})});if(!u.ok)throw new Error(`[LPStoresClientWrapper] MasterData error ${u.status}`);const m=await u.json();c(Mx(m))}catch(u){console.error(u)}})()},[o]),!Array.isArray(t)||!t.length?null:r.jsxs(rt.Root,{data:i,children:[r.jsx(rt.Title,{children:e.titlePage}),r.jsx(rt.Section,{imgSrcDesk:e.imageBackgroundDesk,imgSrcMob:e.imageBackgroundMob,imgAlt:e.altImageBackgroud,children:r.jsx(rt.Content,{showVendor:n,ICONS:s,LPLOJAS_TEMPLATE_RETURN_BUTTON:a})})]})},Ux={Banner:dx,BannerSection:sn,BennefitsBarSection:nm,SingleBannerSection:Xs,TextContentSection:rm,BannerCarousel:tm,TextAccordionSection:sm,TipbarScreening:Cx,ImageGrid:im,SearchPageScreening:T.SearchPageScreening,SearchContent:Sx,NewsletterSection:cm,PDPProductCarousel:dm,ProductCarousel:mm,EmbedLive:pm,PopupModalSection:fm,SectionZone:Dx,LPStoresClientWrapper:Bx},Hx={Components:Ux,helpers:Yg};exports.cms=Hx;exports.contexts=_c;exports.data=ks;exports.layout=In;exports.scripts=cx;
58
+ `},vj=Object.freeze(Object.defineProperty({__proto__:null,generateMiddleware:yj},Symbol.toStringTag,{value:"Module"})),xj={helpers:vj},Vo={"custom-carousel":"_custom-carousel_t5fgp_1","carrousel-arrows-display-controller":"_carrousel-arrows-display-controller_t5fgp_10","carousel-controllers-modifier":"_carousel-controllers-modifier_t5fgp_19"};function bj(e,t){const{mediatorRef:r}=oe();g.useEffect(()=>r.current.subscribe(e,t),[e,t])}const nc=({prevOnClick:e,nextOnClick:t,onBulletClick:r,currentPage:n,totalPages:o,position:a,hideControllers:i,left:c,isFirst:l,ICONS:u})=>{const[f,p]=g.useState("default");return bj("herobanner:change_controllers_variant",m=>{l&&p(m.includes("white")?"inverse":"default")}),s.jsxs(d.Carousel.Controller,{className:Vo["carousel-controllers-modifier"],position:a??"absolute","data-hide-controllers":i,bottom:"16px",top:"unset",left:c,children:[s.jsxs(d.Carousel.Arrows,{className:Vo["carrousel-arrows-display-controller"],children:[s.jsx(d.Button,{variant:"tertiary",onClick:e,adornment:{start:s.jsx(d.Icon,{name:u.arrow_left})},mode:f}),s.jsx(d.Button,{variant:"tertiary",onClick:t,adornment:{start:s.jsx(d.Icon,{name:u.arrow_right})},mode:f})]}),s.jsx(d.Carousel.Bullets,{page:n,total:o,onBulletClick:r,mode:f})]})},jj=({children:e,data:t,banner:r,...n})=>{const{mediatorRef:o}=oe();return t.data.first?s.jsx(cs,{observerOptions:{threshold:.51},stopOnIntersection:!1,callBackWhenVisible:()=>{o.current.publish("header:change_variant",r.headerVariant)},...n,children:e}):s.jsx(s.Fragment,{children:e})},jm=e=>{const{initialize:t,pagination:r,controller:n,itemsStyles:o}=d.Carousel.useCarousel({gap:e.data.config.gap,itemsPerPage:e.data.config.slidesPerView,direction:"row"}),a=g.useRef(void 0),i=g.useMemo(()=>Rp(e.data.config.controllerPosition??"dentro-inferior-centro"),[e]),c=g.useCallback(()=>{e.data.config.slideDuration&&r.totalPages>1&&(a.current=setInterval(()=>{n==null||n.nextPage()},e.data.config.slideDuration*1e3))},[n,e.data.config.slideDuration,r.totalPages]),l=g.useCallback(f=>{clearInterval(a.current),c(),f()},[c]),u=g.useMemo(()=>{var f;return{nextOnClick:()=>l(()=>n==null?void 0:n.nextPage()),prevOnClick:()=>l(()=>n==null?void 0:n.prevPage()),onBulletClick:p=>l(()=>n==null?void 0:n.navigateTo(p)),currentPage:r.currentPage,totalPages:r.totalPages,position:i.position,hideControllers:((f=e.data.config)==null?void 0:f.hideControllers)??!1,left:i.left}},[r.currentPage,r.totalPages,i.position,e.data.config.hideControllers,l,n]);return g.useEffect(()=>(c(),()=>clearInterval(a.current)),[c]),s.jsx(pt,{name:e.name,children:s.jsxs(d.Carousel.Root,{innerRef:f=>{t(f)},className:d.helpers.classNameConcat(Vo["custom-carousel"],e.data.config.fullWidth?"":"common-section"),"data-infinity-border":!0,style:{...e.data.config.marginTop!=="0px"&&{marginTop:`-${e.data.config.marginTop}`},...e.data.config.marginBottom!=="0px"&&{marginBottom:`-${e.data.config.marginBottom}`}},children:[i.shouldRender==="top"&&r.totalPages>1?s.jsx(nc,{ICONS:e.ICONS,...u,isFirst:e.data.first}):s.jsx(s.Fragment,{}),s.jsx(d.Carousel.Body,{children:e==null?void 0:e.data.banners.map((f,p)=>s.jsx(d.Carousel.Item,{style:o,children:s.jsx(jj,{data:e,banner:f,children:s.jsx(xn,{name:"Banner Carousel",ICONS:e.ICONS,TEXTCONTENT_EXPANDED:e.TEXTCONTENT_EXPANDED,TIME_ZONE:e.TIME_ZONE,suppressContentEditableWarning:!0,suppressHydrationWarning:!0,className:e.className,data:{banner:f,index:p,componentIndex:e.data.componentIndex},creative:"banner-carousel",...e.data.first&&p===0&&{priority:!0}})})},`hero-banner-item-${p}`))}),i.shouldRender==="bottom"&&r.totalPages>1?s.jsx(nc,{ICONS:e.ICONS,...u}):s.jsx(s.Fragment,{})]})})},Cj={Banner:Na},jr={"row-controller-modifier":"_row-controller-modifier_co4wb_1","carousel-title-modifier":"_carousel-title-modifier_co4wb_18","carousel-modifier":"_carousel-modifier_co4wb_22","card-modifier":"_card-modifier_co4wb_26"},Cm=({data:e,name:t,CONSTANTS:r})=>{var f;const{isMobile:n}=oe(),o=e.config.size??"medium",a=e.config.disableCarouselMobile??!1,{initialize:i,pagination:c,controller:l,itemsStyles:u}=d.Carousel.useCarousel({itemsPerPage:n?e==null?void 0:e.config.slidesPerViewMobile:(f=e==null?void 0:e.config)==null?void 0:f.slidesPerView,gap:n?e.config.gapMobile:e.config.gap,direction:n&&a?"column":"row"});return s.jsx(pt,{name:t,children:s.jsx(d.Utils.Column,{style:{width:o==="small"?"70%":"100%"},alignContent:"center",justifyContent:"center",alignItems:"center",children:s.jsxs(d.Carousel.Root,{innerRef:p=>{i(p)},className:d.helpers.classNameConcat(jr["carousel-modifier"],"common-section"),children:[o==="medium"?s.jsxs(d.TextStructure.Root,{children:[r.ACTIVE_BENNEFITS_BAR_TITLE&&s.jsx(d.TextStructure.DivWrapper,{className:jr["carousel-title-modifier"],children:s.jsx("h2",{className:"typography-style-body-lg",children:r.BENNEFITS_BAR_TITLE})}),n&&c.totalPages>1&&s.jsx(d.Carousel.Controller,{className:d.helpers.classNameConcat(jr["row-controller-modifier"],r.ACTIVE_BENNEFITS_BAR_TITLE?jr["title-on"]:void 0),children:s.jsxs(d.Carousel.Arrows,{children:[s.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.prevPage(),adornment:{start:s.jsx(d.Icon,{name:r.ICONS.arrow_left})}}),s.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.nextPage(),adornment:{start:s.jsx(d.Icon,{name:r.ICONS.arrow_right})}})]})})]}):s.jsx(s.Fragment,{}),s.jsx(d.Carousel.Body,{children:e.bennefit.map((p,m)=>s.jsx(d.Carousel.Item,{className:jr["card-modifier"],style:u,children:s.jsx(d.Card,{stroke:!0,padding:"small",children:s.jsx(d.TextStructure.Root,{layoutProps:{columnWrapper:{alignContent:"start",alignItems:"start",justifyContent:"start"},textRow:{alignContent:"center",alignItems:"center",justifyContent:"center"}},adornment:{[o==="medium"?"top":"start"]:s.jsx(d.Icon,{name:p.icon,size:o==="medium"?"medium":"small"})},children:s.jsxs(d.TextStructure.DivWrapper,{alignItems:"start",children:[s.jsx("h3",{className:"typography-style-body-md",children:p.title}),p.subtitle&&p.subtitle.length?s.jsx("p",{className:"typography-style-body-xs",children:p.subtitle}):s.jsx(s.Fragment,{})]})})})},`bennefit=${m}`))}),!n&&c.totalPages>1?s.jsxs(d.Carousel.Controller,{className:jr["row-controller-modifier"],children:[s.jsxs(d.Carousel.Arrows,{children:[s.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.prevPage(),adornment:{start:s.jsx(d.Icon,{name:r.ICONS.arrow_left})}}),s.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.nextPage(),adornment:{start:s.jsx(d.Icon,{name:r.ICONS.arrow_right})}})]}),s.jsx(d.Carousel.Bullets,{page:c.currentPage,total:c.totalPages,onBulletClick:p=>l==null?void 0:l.navigateTo(p)})]}):s.jsx(s.Fragment,{})]})})})},Sm=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:r,className:n,name:o})=>s.jsx(pt,{name:o,children:s.jsx("div",{className:d.helpers.classNameConcat(Uo.textContentSection,n??""),style:e.borderTop?{borderTop:"none"}:void 0,children:s.jsx(Tp,{data:e,ICONS:t,TEXTCONTENT_EXPANDED:r})})}),sc={"accordion-modifier":"_accordion-modifier_1we16_1","accordion-body-modifier":"_accordion-body-modifier_1we16_7"},Em=({data:e,id:t,ICONS:r,className:n,name:o})=>{var c;const[a,i]=g.useState([]);return s.jsx(pt,{name:o,children:s.jsxs(d.Utils.Column,{gap:"var(--gap-vertical-sm)",className:n??"",children:[e.titleAccordion?s.jsx(d.TextStructure.Root,{children:s.jsx(d.TextStructure.DivWrapper,{children:s.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-sm","common-section"),style:{fontWeight:500},children:e.titleAccordion})})}):s.jsx(s.Fragment,{}),(c=e.accordions)==null?void 0:c.map((l,u)=>s.jsxs(d.Accordion.Wrapper,{className:sc["accordion-modifier"],children:[s.jsx(d.Accordion.Header,{id:`${t}-text-accordion-${u}`,openIndicator:s.jsx(d.Icon,{name:r.arrow_down}),closeIndicator:s.jsx(d.Icon,{name:r.arrow_up}),startOpen:a.includes(u),onClick:()=>i(f=>f.includes(u)?f.filter(p=>p!==u):[...f,u]),children:s.jsx(d.TextStructure.Root,{children:s.jsxs(d.TextStructure.DivWrapper,{children:[s.jsx("h3",{className:"typography-style-body-md-strong",children:l.title}),l.subtitle&&l.subtitle.length?s.jsx("h2",{children:l.subtitle}):s.jsx(s.Fragment,{})]})})}),s.jsx(d.Accordion.Body,{children:s.jsx(d.TextStructure.Root,{children:s.jsx(d.TextStructure.DivWrapper,{className:sc["accordion-body-modifier"],children:s.jsx(gt.Editor,{editorKey:`${t}-editor-${u}`,blockRenderMap:Zn,editorState:l.text?Yn(JSON.parse(l.text)):gt.EditorState.createEmpty(),onChange:()=>null})})})})]},`${t}-accordion-${u}-${a.includes(u)}`))]})})},Pm=g.createContext({}),Sj=({data:e,children:t,...r})=>{var _,y,v,b,C,j,x,S,E,P,N,A,R;const[n,o]=g.useState(!0),{initialize:a,controller:i,itemsStyles:c}=d.Carousel.useCarousel({gap:0,itemsPerPage:1}),l={slideTranstionTimer:(y=(_=e==null?void 0:e.staticConfig)==null?void 0:_.staticConfig)==null?void 0:y.slideTranstionTimer,showCarouselArrows:(b=(v=e==null?void 0:e.staticConfig)==null?void 0:v.staticConfig)==null?void 0:b.showCarouselArrows,hasCloseBtn:(j=(C=e==null?void 0:e.staticConfig)==null?void 0:C.staticConfig)==null?void 0:j.hasCloseBtn,backgroundColor:(S=(x=e==null?void 0:e.staticConfig)==null?void 0:x.staticConfig)==null?void 0:S.backgroundColor,textColorVariant:(P=(E=e==null?void 0:e.staticConfig)==null?void 0:E.staticConfig)==null?void 0:P.textColorVariant,content:((A=(N=e==null?void 0:e.content)==null?void 0:N.content)==null?void 0:A.items)??[]},u=(R=l.content)==null?void 0:R.filter(O=>!O.countDownEndDate||new Date(O.countDownEndDate)>new Date),f=u.length>1,p={...l.backgroundColor?{backgroundColor:l.backgroundColor}:{}},m=()=>{o(!1)},h=d.helpers.ValidateProp({fieldTypes:Pr.Mode,property:l.textColorVariant,fallback:"default"});return s.jsx(Pm.Provider,{value:{isOpen:n,setIsOpen:o,hasCarousel:f,backgroundStyle:p,handleCloseTipbar:m,mode:h,slideTranstionTimer:l.slideTranstionTimer,showCarouselArrows:l.showCarouselArrows,hasCloseBtn:l.hasCloseBtn,slices:u,carouselProps:{initialize:a,controller:i,itemsStyles:c},...r},children:t})},Lt=()=>g.useContext(Pm),Ej=({dateEnd:e,...t})=>{const{CONSTANTS:{TIME_ZONE:r}}=Lt();return s.jsx(Xn,{dateEnd:new Date(e),TIME_ZONE:r,...t})},Pj="_tipbar_bt3p0_1",wj="_tipbar__carousel_bt3p0_15",bn={tipbar:Pj,tipbar__carousel:wj,"tipbar__close-btn":"_tipbar__close-btn_bt3p0_29","tipbar-item":"_tipbar-item_bt3p0_37","tipbar-item__coupon":"_tipbar-item__coupon_bt3p0_45"},Nj=({coupon:e,feedbackTitle:t,feedbackDescription:r,...n})=>{const{CONSTANTS:o}=Lt(),{addCouponSeller:a,cartStore:i}=Pe(),[c,l]=g.useState({status:!1,showSnackBar:!1}),[u,f]=g.useState(!1),[p,m]=g.useState(!1),h=async()=>{if(!i.items.length){m(!0);return}(await a(e,"coupon")).code===200?l({status:!0,showSnackBar:!0}):f(!0)};return g.useEffect(()=>{c.showSnackBar&&setTimeout(()=>{l(_=>({..._,showSnackBar:!1}))},o.TIPBAR_CONFIGS.snackbar_timeout)},[c.showSnackBar]),g.useEffect(()=>{u&&setTimeout(()=>{f(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[u]),g.useEffect(()=>{p&&setTimeout(()=>{m(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[p]),s.jsxs(s.Fragment,{children:[s.jsx(d.Button,{...n,onClick:h,disabled:c.status,className:bn["tipbar-item__coupon"],children:c.status?`${o.TIPBAR_CONFIGS.coupon_applied_message}`:`${o.TIPBAR_CONFIGS.coupon_default_message}`}),c.showSnackBar&&(t||r)&&s.jsx(wr,{title:t,subtitle:r,Z_INDEX_WAR:o.Z_INDEX_WAR},`feedback-coupon-${e}`),u&&s.jsx(wr,{title:o.TIPBAR_CONFIGS.coupon_error_title,subtitle:o.TIPBAR_CONFIGS.coupon_error_message,Z_INDEX_WAR:o.Z_INDEX_WAR},`error-coupon-${e}`),p&&s.jsx(wr,{title:o.TIPBAR_CONFIGS.coupon_cart_empty_title,subtitle:o.TIPBAR_CONFIGS.coupon_cart_empty_message,Z_INDEX_WAR:o.Z_INDEX_WAR},`error-cart-empty-${e}`)]})},Ij=({title:e,description:t,style:r,mode:n,className:o})=>s.jsx(d.TextStructure.Root,{children:s.jsxs(d.TextStructure.DivWrapper,{mode:n,className:o,children:[e&&s.jsx("h3",{className:"typography-style-body-sm",style:r,children:e}),t&&s.jsx("p",{className:"typography-style-caption",style:r,children:t})]})}),Rj=({coupon:e,...t})=>{const{CONSTANTS:r}=Lt();return s.jsx(d.Copy,{...t,iconCopy:r.ICONS.copy,iconSuccess:r.ICONS.check,children:e})},Tj=({staticZone:e,type:t,className:r,description:n,title:o})=>{const{mode:a}=Lt();if(t==="countdown")return s.jsx(Ej,{dateEnd:e.countDownEndDate,size:"x-small",mode:a});if(t==="coupon"){const i=d.helpers.ValidateProp({fieldTypes:Pr.Mode,property:e.couponButtonMode,fallback:"default"}),c=d.helpers.ValidateProp({fieldTypes:Pr.VariantsExtended,property:e.couponButtonVariant,fallback:"primary"});return e.coupon?s.jsx(Nj,{coupon:e.coupon,mode:i,variant:c,feedbackTitle:e.couponFeedbackTitle,feedbackDescription:e.couponFeedbackDescription}):null}if(t==="copy"){const i=d.helpers.ValidateProp({fieldTypes:Pr.Mode,property:e.couponButtonMode,fallback:"default"});return e.coupon?s.jsx(Rj,{coupon:e.coupon,mode:i}):null}return s.jsx(Ij,{title:o,description:n,mode:a,className:r})},oc=({handleCloseTipbar:e,mode:t})=>{const{CONSTANTS:r}=Lt();return s.jsx(d.Button,{title:"fechar tipbar",className:bn["tipbar__close-btn"],onClick:e,variant:"tertiary",mode:t,adornment:{start:s.jsx(d.Icon,{name:r.ICONS.close})}})},Aj=({children:e,mode:t="default",showCarouselArrows:r=!0,slideTranstionTimer:n})=>{const{carouselProps:o,CONSTANTS:a}=Lt(),i=g.useRef(null),c=(u,f)=>{var p,m;u.stopPropagation(),u.preventDefault(),f==="prev"?(p=o.controller)==null||p.prevPage():(m=o.controller)==null||m.nextPage(),i.current&&(clearInterval(i.current),l())},l=g.useCallback(()=>{if(n&&o.controller){const u=setInterval(()=>{var f;(f=o.controller)==null||f.nextPage()},n);i.current=u}},[n,o]);return g.useEffect(()=>(l(),()=>{i.current&&clearInterval(i.current)}),[n,l]),s.jsxs(d.Carousel.Root,{innerRef:u=>{o.initialize(u)},className:bn.tipbar__carousel,style:{flexDirection:"row",alignItems:"center"},children:[r&&s.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"prev"),adornment:{start:s.jsx(d.Icon,{name:a.ICONS.arrow_left})}}),s.jsx(d.Carousel.Body,{children:e}),r&&s.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"next"),adornment:{start:s.jsx(d.Icon,{name:a.ICONS.arrow_right})}})]})},Oj=({children:e,className:t})=>{const{hasCarousel:r,mode:n,hasCloseBtn:o,backgroundStyle:a,showCarouselArrows:i,slideTranstionTimer:c,handleCloseTipbar:l}=Lt(),u=r&&i;return s.jsx("div",{style:a,"data-hasclosebtn":o,className:d.helpers.classNameConcat(bn.tipbar,t),children:r?s.jsxs(s.Fragment,{children:[s.jsx(Aj,{mode:n,showCarouselArrows:u,slideTranstionTimer:c,children:e}),o&&s.jsx(oc,{handleCloseTipbar:l,showCarouselArrows:u,mode:n})]}):s.jsxs(s.Fragment,{children:[e,o&&s.jsx(oc,{handleCloseTipbar:l,mode:n})]})})},Lj=({children:e,highlightFirstSection:t,...r})=>{const{hasCarousel:n,carouselProps:o}=Lt(),a=s.jsx("div",{...r,className:bn["tipbar-item"],children:e});return n?s.jsx(d.Carousel.Item,{style:o.itemsStyles,children:a}):a},wm=({className:e})=>{const{isOpen:t,slices:r}=Lt();return r.length&&t?s.jsx(Oj,{children:r.map((n,o)=>{var a;return s.jsx(s.Fragment,{children:s.jsx(vn,{href:n.link,children:s.jsx(Lj,{highlightFirstSection:n.highlightFirstSection,"data-justifyhighlightedsection":n.horizontalAlignHighlightedSection?n.horizontalAlignHighlightedSection:"center",children:n&&((a=n==null?void 0:n.items)!=null&&a.length)?n.items.map((i,c)=>s.jsx(Tj,{staticZone:n,type:i.type,title:i.title,description:i.description,className:e},`tipbar-slice-field-${c}`)):null})})},`tipbar-slice-${o}`)})}):null};wm.displayName="TipBar.Root";const Wo=({className:e,...t})=>s.jsx(Sj,{...t,children:s.jsx(wm,{className:e})});Wo.displayName="TipBar";const kj=({CONSTANTS:e,data:t})=>{const{pathname:r}=pe(),{tipbarRef:n}=Ae(),o=c=>{const l=t==null?void 0:t.find(u=>{var f,p,m,h,_;return((p=(f=u.staticConfig)==null?void 0:f.staticConfig)==null?void 0:p.deviceType)===c&&((_=(h=(m=u.staticConfig)==null?void 0:m.staticConfig)==null?void 0:h.paths)==null?void 0:_.includes(r))});return l||(t==null?void 0:t.find(u=>{var f,p,m,h,_,y;return((p=(f=u.staticConfig)==null?void 0:f.staticConfig)==null?void 0:p.deviceType)===c&&(!((h=(m=u.staticConfig)==null?void 0:m.staticConfig)!=null&&h.paths)||((y=(_=u.staticConfig)==null?void 0:_.staticConfig)==null?void 0:y.paths.length)===0)}))},a=o("desktop"),i=o("mobile");return s.jsxs("div",{ref:n,className:k.responsive["responsive-flex"],children:[i&&s.jsx("div",{className:k.responsive["responsive-mobile-flex"],children:s.jsx(Wo,{data:i,CONSTANTS:e})}),a&&s.jsx("div",{className:k.responsive["responsive-desktop-flex"],children:s.jsx(Wo,{data:a,CONSTANTS:e})})]})},ac={"card-image-wrapper":"_card-image-wrapper_10mul_1","card-image-container":"_card-image-container_10mul_9"},Nm=e=>{const{nextimage:t}=pe();return s.jsx(pt,{name:e.name,children:e.data.banners.map((r,n)=>s.jsx("div",{className:ac["card-image-wrapper"],children:s.jsx("div",{className:ac["card-image-container"],children:s.jsx(t,{src:r.image,alt:r.altImage?r.altImage:"Banner Coleção",width:500,height:600})})},n))})},Dj=({SectionZone:e,name:t,storeId:r,previewId:n})=>{const[o,a]=g.useState();return g.useEffect(()=>{o||k.fetchContentType("search",{name:t,storeId:r,previewId:n}).then(i=>{i!=null&&i.data&&Array.isArray(i.data)&&a(i.data[0])})},[]),s.jsx(e,{data:o??[]})},Im=({data:{componentIndex:e,...t},name:r,CONSTANTS:n})=>s.jsx(pt,{name:r,children:s.jsx(Ra,{...t,CONSTANTS:n})}),Rm=async e=>{const{type:t}=e,r=t==="collectionSearch"?"/api/search/product":"/api/search/crosseling",n=JSON.stringify(t==="collectionSearch"?{...e.params,facets:e.facets,term:e.term,forceUpdate:!1}:e.facets);return(await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:n}).then(a=>a.json()).then(a=>t==="collectionSearch"?a.data.products:a.products)).filter(a=>!!a.node.availability.status)},Mj="_shelf__container_bi04n_10",Tm={shelf__container:Mj},Fj=({collectionSearch:e,title:t,CONSTANTS:r,searchModal:n})=>{const[o,a]=g.useState([]),{isMobile:i}=oe(),{ref:c,inView:l}=yc.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:u}=ie();return g.useEffect(()=>{if(!e)return;function f(){var p,m;Rm({type:"collectionSearch",term:e==null?void 0:e.term,facets:e==null?void 0:e.facets,params:{count:((p=e==null?void 0:e.params)==null?void 0:p.count)??12,sort:((m=e==null?void 0:e.params)==null?void 0:m.sort)??r.ITEMS_DEFAULT_SORT}}).then(h=>{a(h)})}f()},[e]),g.useEffect(()=>{!l||o.length===0||u({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o},customData:{item_list_name:t??"Você também pode gostar"}}})},[l,o]),o.length===0?null:s.jsx("div",{ref:c,className:Tm.shelf__container,children:s.jsx(nn.Shelf,{title:t??"Você também pode gostar",itemsPerPage:n?{desktop:2,mobile:1.4}:{desktop:4.4,mobile:2.2},ICONS:r.ICONS,children:Array.isArray(o)&&o.map(({node:f},p)=>{const{availability:{status:m}}=f;return m?s.jsx(nn.Card,{item:f,isMobile:i,size:"medium",index:p,shelfTitle:t??"Você também pode gostar",CONSTANTS:r},f.id):null})})})},zj=({recommendationSearch:e,title:t,CONSTANTS:r})=>{const[n,o]=g.useState([]),{isMobile:a}=oe(),{ref:i,inView:c}=yc.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:l}=ie(),u=g.useMemo(()=>e?[{key:e.type,value:e.productId}]:[],[e]);return g.useEffect(()=>{if(!e)return;function f(){var p;Rm({type:"recommendationSearch",facets:u,params:{count:((p=e==null?void 0:e.params)==null?void 0:p.count)??12,sort:r.ITEMS_DEFAULT_SORT}}).then(m=>o(m))}f()},[u,e]),g.useEffect(()=>{if(!c||n.length===0||(e==null?void 0:e.type)==="suggestions")return;const f=t??"Você também pode gostar";l({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:n},customData:{item_list_name:f},outsideEcommerceData:{item_list_name:f}}})},[c,n]),(n==null?void 0:n.length)===0?null:(e==null?void 0:e.type)==="suggestions"?s.jsx(bd,{products:n,innerRef:i,inView:c,CONSTANTS:r}):s.jsx("div",{ref:i,className:Tm.shelf__container,children:s.jsx(nn.Shelf,{title:t??"Você também pode gostar",itemsPerPage:{desktop:4.4,mobile:2.2},ICONS:r.ICONS,children:Array.isArray(n)&&n.map(({node:f},p)=>{const{availability:{status:m}}=f;return m?s.jsx(nn.Card,{item:f,isMobile:a,size:"medium",index:p,shelfTitle:t??"Você também pode gostar",CONSTANTS:r},f.id):null})})})},Am=({data:e,name:t,CONSTANTS:r})=>{const{productId:n}=xu();return!(e!=null&&e.productLists)||e.productLists.length===0?null:e.productLists.map((o,a)=>s.jsx(pt,{name:t,children:s.jsx(zj,{title:o.title,recommendationSearch:{type:o.product_group_option,productId:n,params:{count:o.number_of_items,sort:"score:desc"}},CONSTANTS:r},`shelf=${a}`)}))},Om=({data:e,CONSTANTS:t,searchModal:r,name:n})=>{var a;const o=(a=e==null?void 0:e.productLists)==null?void 0:a.filter(i=>!!i.collectionId||!!i.search_base_name);return!o||o.length===0?null:o.map((i,c)=>{const l=i.collectionId?{term:"",facets:[{key:"productclusterids",value:`${i.collectionId}`}]}:{term:i.search_base_name,facets:[]};return s.jsx(pt,{name:n,children:s.jsx(Fj,{title:i.title,collectionSearch:{params:{count:i.number_of_items,sort:i.sort},...l},searchModal:r,CONSTANTS:t},`shelf=${c}`)})})},Bj="_embedLiveContainer_1ss0l_2",Uj="_embedLivePlayer_1ss0l_7",ic={embedLiveContainer:Bj,embedLivePlayer:Uj},Lm=({data:e,name:t})=>s.jsx(pt,{name:t,children:s.jsx("div",{className:ic.embedLiveContainer,children:s.jsx("div",{className:ic.embedLivePlayer,children:e.banner.videosrc?s.jsx(De.Video,{src:e.banner.videosrc??"",playsInline:!0,autoPlay:!0,loop:!0,muted:!0,title:"Live",controls:!0}):s.jsxs("div",{children:[s.jsx("iframe",{src:e.banner.embed_source??"",allow:"autoplay; fullscreen; picture-in-picture; loop;",title:"Live"}),s.jsx(Jp,{src:"https://player.vimeo.com/api/player.js",defer:!0,strategy:"lazyOnload"})]})})})}),qj="_popup_5taxs_9",$j="_popup__overlay_5taxs_19",Hj="_popup__modal_5taxs_27",Je={popup:qj,popup__overlay:$j,popup__modal:Hj,"popup__modal--form":"_popup__modal--form_5taxs_49","popup__modal--header":"_popup__modal--header_5taxs_66","popup__modal--status":"_popup__modal--status_5taxs_69","popup__modal--checkbox":"_popup__modal--checkbox_5taxs_78","popup__modal--success":"_popup__modal--success_5taxs_90","popup__modal--close":"_popup__modal--close_5taxs_101"},Vj=e=>s.jsx("div",{className:Je["popup__modal--success"],children:s.jsx(d.TextStructure.Root,{adornment:{start:s.jsx(d.Icon,{name:e.ICONS.check_circle,size:"large"})},children:s.jsxs(d.TextStructure.DivWrapper,{className:Je["text-structure-modifier"],children:[s.jsx("h3",{className:"typography-style-body-sm-strong",children:e.successTitle}),s.jsx("p",{className:"typography-style-body-caption",children:e.successDescription})]})})}),Wj=e=>{const{title:t,description:r,groups:n,ICONS:o}=e,{formErrors:a,submitForm:i,success:c}=gs(),[l,u]=g.useState(!1);return s.jsx("form",{onSubmit:i,className:Je.formContainer,children:s.jsxs("div",{className:Je["popup__modal--form"],children:[s.jsxs(d.TextStructure.DivWrapper,{className:Je["popup__modal--header"],children:[s.jsx("strong",{className:"typography-style-body-md-strong",children:t}),s.jsx("p",{className:"typography-style-body-xs",children:r})]}),c?s.jsx(Vj,{...e}):s.jsxs(s.Fragment,{children:[n.map(f=>s.jsx(Nr.FieldGroup,{group:f,children:s.jsx(Nr.FieldWrapper,{fields:f.fields})},f.groupLabel)),s.jsx(d.Checkbox,{className:Je["popup__modal--checkbox"],adornment:s.jsx(d.Icon,{name:o.check,size:"small"}),name:"terms-and-conditions",label:"Li e aceito os termos de política de privacidade abaixo.",sizeVariant:"small",checked:l,onChange:()=>u(!l)}),s.jsxs("div",{children:[!l&&s.jsx(d.TextStructure.DivWrapper,{className:Je["popup__modal--status"],children:s.jsxs("p",{className:"typography-style-body-caption",children:[s.jsx(d.Icon,{size:"small",name:o.alert_circle}),Ah]})}),s.jsx(d.Button,{disabled:!l,size:"medium",type:"submit",children:Lh}),a.length?s.jsx(d.TextStructure.DivWrapper,{className:Je["popup__modal--status"],children:s.jsx("p",{className:d.helpers.classNameConcat(Je.formSubmitWarning,"typography-style-body-xs"),children:Oh})}):null]})]})]})})},km=({data:e,name:t,CONSTANTS:r})=>{const[n,o]=g.useState(!1),a=typeof window<"u"?window.sessionStorage.getItem(r.POPUP_TRACK_STORAGE)||window.localStorage.getItem(r.POPUP_SUBMITTED_STORAGE):null,i=()=>{o(!1),window.sessionStorage.setItem(r.POPUP_TRACK_STORAGE,"true")};return g.useEffect(()=>{setTimeout(()=>!a&&o(!0),2e3)},[]),e.active&&n?s.jsx(pt,{name:t,children:s.jsxs("div",{className:Je.popup,children:[s.jsx("div",{onClick:i,className:Je.popup__overlay}),s.jsxs("div",{className:Je.popup__modal,children:[s.jsx(d.Button,{onClick:i,variant:"tertiary",className:Je["popup__modal--close"],children:s.jsx(d.Icon,{style:{color:e.closeColor||"#000"},name:r.ICONS.close,size:"medium"})}),s.jsx("div",{children:s.jsx(De.Image,{src:e.imageUrl,width:"459",height:"418",alt:e.title})}),s.jsx(cm,{...e,children:s.jsx(Wj,{...e,ICONS:r.ICONS})})]})]})}):null},Gj={"Image Grid":Nm,"Embed Live":Lm,"Banner Carousel":jm,Banner:Na,"Bennefits Bar":Cm,newsletter:Im,TextContent:Sm,TextAccordion:Em,"Product Carousel":Om,"PDP Product Carousel":Am,"Popup Modal":km},Kj=({data:e,identifyWhoIsFirst:t=!1,componentConfigs:r})=>e==null?void 0:e.map((n,o)=>{const a=Gj[n.name],i={...(r==null?void 0:r[n.name])??{}};return t&&o===0&&(n.data.first=!0),n.data.componentIndex=o,n.name==="TextAccordion"&&(i.id=`text-accordion-${o}`),a?s.jsx(a,{name:n.name,data:n.data,...i},`section-zone-component-${o}`):null}),Qj=e=>{const t=Zj(Yj(e));return Xj(t)},Xj=e=>{const t=[];for(const r in e)t.push(...e[r]);return t},Yj=e=>!e||!Array.isArray(e)?{}:e==null?void 0:e.reduce((t,r)=>{if(r!=null&&r.cidade){let n=t[r==null?void 0:r.cidade];n===void 0&&(n=t[r==null?void 0:r.cidade]=[]),n.push(r)}return t},{}),Zj=e=>{if(!e||!Object.keys(e).length)return{};const t=Object.keys(e).sort((n,o)=>n.localeCompare(o)),r={};for(const n of t)r[n]=e[n];return r},Jj=({content:e,data:t,showVendor:r,ICONS:n,entity:o,LPLOJAS_TEMPLATE_RETURN_BUTTON:a})=>{const[i,c]=g.useState([]);return g.useEffect(()=>{(async()=>{try{const u=await fetch("/api/master-data/search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({masterDataEntity:o,searchFields:{_fields:"_all"},headers:{"REST-Range":"resources=0-1000"}})});if(!u.ok)throw new Error(`[LPStoresClientWrapper] MasterData error ${u.status}`);const f=await u.json();c(Qj(f))}catch(u){console.error(u)}})()},[o]),!Array.isArray(t)||!t.length?null:s.jsxs(Pt.Root,{data:i,children:[s.jsx(Pt.Title,{children:e.titlePage}),s.jsx(Pt.Section,{imgSrcDesk:e.imageBackgroundDesk,imgSrcMob:e.imageBackgroundMob,imgAlt:e.altImageBackgroud,children:s.jsx(Pt.Content,{showVendor:r,ICONS:n,LPLOJAS_TEMPLATE_RETURN_BUTTON:a})})]})},eC={Banner:Cj,BannerSection:xn,BennefitsBarSection:Cm,SingleBannerSection:Na,TextContentSection:Sm,BannerCarousel:jm,TextAccordionSection:Em,TipbarScreening:kj,ImageGrid:Nm,SearchPageScreening:k.SearchPageScreening,SearchContent:Dj,NewsletterSection:Im,PDPProductCarousel:Am,ProductCarousel:Om,EmbedLive:Lm,PopupModalSection:km,SectionZone:Kj,LPStoresClientWrapper:Jj},tC={Components:eC,helpers:ab};exports.cms=tC;exports.contexts=pg;exports.data=ma;exports.layout=Vn;exports.scripts=xj;