@soma-vertical-web/multi-lib 1.0.0 → 1.0.1

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,7 +1,7 @@
1
- "use strict";var Ud=Object.defineProperty;var Hd=(e,t,r)=>t in e?Ud(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Jt=(e,t,r)=>Hd(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),g=require("react"),A=require("./SearchPageScreening-BryoK-U4.js"),Ze=require("idb-keyval"),yt=require("zustand"),Mr=require("js-cookie"),d=require("@soma-vertical-web/core-components"),ft=require("axios"),Dr=require("@date-fns/tz"),qd=require("jose"),Nt=require("@soma-vertical-web/foundations"),rs=require("react-dom"),Ye=require("draft-js"),ca=require("react-intersection-observer"),ss=g.createContext({}),Vd=({data:e,children:t})=>n.jsx(ss.Provider,{value:{tags:e==null?void 0:e.config},children:t}),dt=()=>{const{tags:e}=g.useContext(ss),t=g.useCallback(r=>{var c,l,u,p;const s=(l=(c=e==null?void 0:e.commercial)==null?void 0:c.items)==null?void 0:l.find(f=>{var m;return(m=r??[])==null?void 0:m.find(h=>h.id===f.key)}),o=(p=(u=e==null?void 0:e.institucional)==null?void 0:u.items)==null?void 0:p.find(f=>{var m;return(m=r??[])==null?void 0:m.find(h=>h.id===f.key)}),a=e==null?void 0:e.flagPdp,i=(r==null?void 0:r.find(f=>{var m;return f.id===((m=e==null?void 0:e.flagGoldenPdp)==null?void 0:m.key)}))&&(e==null?void 0:e.flagGoldenPdp);return{commercial:s,institucional:o,flagPdp:a,flagGoldenPdp:i}},[e]);return{tags:e,getAvailableProductTag:t}},la=({gridScrollBack:e})=>{g.useEffect(()=>{typeof window<"u"&&(e!=null&&e.refer)&&sessionStorage.setItem(e==null?void 0:e.refer,"true")},[])},ua=g.createContext({}),Wd=({children:e,gridScrollBack:t})=>{const r=g.useRef(null);return la({gridScrollBack:t}),n.jsx(ua.Provider,{value:{sizesContainerRef:r},children:e})},da=()=>{const e=g.useContext(ua);if(e===void 0)throw new Error("useContext(PDPContext) must be used within a PDPProvider");return e},at=({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})},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:r,commonData:s,customData:o,promotionInfo:a,itemList:i,outsideEcommerceData:c}=e,{availableSizes:l,sizes:u,price:p}=s,f={...r==="view_item"?{currency:Ce.configs.currency,value:p,grade_disponivel:l??(u?pa(u):"")}:{},...r==="add_to_wishlist"||r==="remove_from_wishlist"?{value:p,currency:Ce.configs.currency}:{}},m=en({data:s,customData:{...o,...i,...a},configs:Ce.configs});at({event:r,data:{...c,ecommerce:{...i,...f,items:[m]}}}),typeof t=="function"&&t(m,f)},productListEvent:e=>{const{commonData:{products:t},promotionInfo:r,itemList:s,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}:s},configs:Ce.configs}));at({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:r},customData:s,supportData:{selectedSkus:o,price:a},promotionInfo:i,itemList:c,outsideEcommerceData:l}=e;let u=0;const p=r.map(f=>{var y,x,b,E,j,v,P,S,C;const m=o==null?void 0:o.find(I=>(f.productId??f.id)===I.productId);let h={...i,...c};if(m){const I=fa(),L=ha(I,m);L&&(h={...h,...L}),t==="add_to_cart"&&(i||c)&&zr({persistedData:I,type:"add",sku:(m==null?void 0:m.id)??(m==null?void 0:m.sku),newData:{promotionInfo:i,itemList:c}}),t==="remove_from_cart"&&zr({persistedData:I,type:"remove",sku:(m==null?void 0:m.id)??(m==null?void 0:m.sku)})}u+=f.price??((b=(x=(y=m==null?void 0:m.offers)==null?void 0:y.offers)==null?void 0:x[0])==null?void 0:b.price)??0;const _=(m==null?void 0:m.size)??A.getColorAndSizeFromSkuName((m==null?void 0:m.skuName)??(m==null?void 0:m.name)??((E=f.itemOffered)==null?void 0:E.skuName),Ce.configs.NAME_SPLIT_SYMBOL).size;return en({data:f,customData:{...s,...h??{...i,...c},item_sku:(m==null?void 0:m.id)??(m==null?void 0:m.sku)??((j=f.itemOffered)==null?void 0:j.sku),quantity:(s==null?void 0:s.quantity)??f.quantity??1,item_variant2:_,seller_id:(m==null?void 0:m.sellerId)??(m==null?void 0:m.seller)??((C=(S=(P=(v=m==null?void 0:m.offers)==null?void 0:v.offers)==null?void 0:P[0])==null?void 0:S.seller)==null?void 0:C.identifier)??f.seller},configs:Ce.configs})});at({event:t,data:{...l,ecommerce:{value:a??u,currency:Ce.configs.currency,items:p}}})},filterEvent:e=>{var i;const{commonData:t,customData:r,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(m=>m.key===c))==null?void 0:f.eventLabel)??c,p=(o==null?void 0:o[u])||[];u==="price_range"&&l.replace(":","-"),o[u]=[...p,l]}),Object.keys(o).forEach(c=>a[c]=o[c].join(", "))),at({event:"filter",data:{...s,...a,...r}})},viewCartEvent:e=>{var p,f,m,h,_,y,x,b,E,j;const{commonData:t,outsideEcommerceData:r}=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 en({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=(((p=s.totalizers.find(v=>v.name==="Total dos Itens"))==null?void 0:p.value)??0)/100,l=(((f=s.totalizers.find(v=>v.name==="Total dos Descontos"))==null?void 0:f.value)??0)/100,u=((m=s.marketingData)==null?void 0:m.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];at({event:"view_cart",data:{...r,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}:{},...((E=s.marketingData)==null?void 0:E.coupon)&&{sale_coupon_name:(j=s.marketingData)==null?void 0:j.coupon},subtotal:c,items:i}}})},readyEvents:e=>{const{event:t,readyData:r}=e;at({event:t,data:{...r}})}},pa=e=>e.reduce((t,r)=>(r.available&&t.push(r.value),t),[]).toString(),Gd=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]}:{}}:{}}},en=({data:e,customData:t,configs:r})=>({...Kd(e,r==null?void 0:r.MAIN_IMAGE),...Xd(e),...Yd(e),...Qd(e),...t}),ma=()=>{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("_"))??[]:[]},fa=()=>{const e=window.localStorage.getItem("persistedCartEventsData");return e?JSON.parse(e):null},ha=(e,t)=>e==null?void 0:e[t],zr=({persistedData:e,type:t,sku:r,newData:s})=>{if(!e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({[r]:s}));return}if(e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({...e,[r]:s}));return}e&&t==="remove"&&(delete e[r],window.localStorage.setItem("persistedCartEventsData",JSON.stringify(e)))},Kd=(e,t="1")=>{var a,i,c,l,u,p,f,m,h,_,y;const r=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=(p=e.itemOffered)==null?void 0:p.isVariationOf)==null?void 0:f.productGroupID),item_ref:/_\d$/.test(r)?r.slice(0,-2):r,item_name:e.productTitle??e.productName??e.name??A.splitNameAndSizeFromFullName((m=e.itemOffered)==null?void 0:m.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)}},Hs=e=>Array.isArray(e)?e.reduce((t,r)=>(r.length>t.length&&(t=r),t),""):e,Xd=e=>{var u,p;const{categories:t,categoriesIds:r}=e,s=t??((u=e.itemOffered)==null?void 0:u.categories),o=r??((p=e.itemOffered)==null?void 0:p.categoriesIds),a=Hs(s),i=Hs(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]}}},Yd=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:s}=A.getColorAndSizeFromSkuName(t,Ce.configs.NAME_SPLIT_SYMBOL);return{item_variant:r,...e.itemOffered&&{item_variant2:s}}},Qd=e=>{var l,u;const{price:t,listPrice:r,installments:s}=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},...s&&{installments:s==null?void 0:s.count,installment_value:s==null?void 0:s.value},item_currency:Ce.configs.currency}},_a=()=>{const[e,t]=ma(),[r,s]=e.split("-"),o=r.includes("shop")||r.includes("sale")?r:"";return{page_category:o&&s?s:"",page_departament:o,id:t,name:e}},Zd=Object.freeze(Object.defineProperty({__proto__:null,eventsFunctions:Ce,findDataInPersistedData:ha,getAvailablesSizes:pa,getCategories:Gd,getPageCategoryAndDepartmentFromSlug:_a,getPersistedData:fa,getProductListInfoFromHead:ma,pushDatalayer:at,updatePersistedData:zr},Symbol.toStringTag,{value:"Module"})),ga=g.createContext({}),Jd=({children:e,evtFunctionsConfigs:t})=>{const r=g.useRef({}),s=g.useRef(null),o=g.useRef(null),a=g.useRef({}),i=g.useRef({trigger:!1,index:0}),c=({functionKey:p,data:f,callBack:m,timeout:h=100})=>{window.dataLayer||(window.dataLayer=[]),Ce.configs=t;try{typeof Ce[p]=="function"&&setTimeout(()=>{var _;f.promotionInfo=r.current,(_=o.current)!=null&&_.item_list_name&&(f.itemList=o.current),Ce[p](f,m)},h)}catch(_){at({event:"error_event",data:{error_message:(_==null?void 0:_.message)??_}})}},l=({content:p})=>{c({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:p.replace("::",":")}}})},u=({updatePromotionRef:p,promotion:f,index:m})=>{p&&(r.current={...f}),c({functionKey:"readyEvents",data:{event:"select_promotion",readyData:{ecommerce:{...f,...m!==void 0&&{index:m}}}}})};return n.jsx(ga.Provider,{value:{sendDataLayerEvent:c,triggerSelectItemEventRef:i,promotionEventRef:r,currentLocalRef:s,itemListRef:o,cartProductsFullDataRef:a,handleSelectContent:l,handleSelectPromotionEvent:u},children:e})},oe=()=>g.useContext(ga),ya=g.createContext({}),ep=({children:e,productData:t,isKit:r,PDP_INFO:s,NAME_SPLIT_SYMBOL:o,TEXTURE_IMAGE:a})=>{var D,U;const{sendDataLayerEvent:i,triggerSelectItemEventRef:c}=oe(),{productId:l,productName:u,items:p,items:[{images:f,Videos:m}],description:h,["Composição"]:_="",productReference:y,categories:[x]}=t,{getAvailableProductTag:b}=dt(),E=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:C,allSizesAvailable:I}=A.getSkuInfos({items:p,NAME_SPLIT_SYMBOL:o}),L=A.getThumbImage({images:f,TEXTURE_IMAGE:a}),T=[{label:`${s.product.description}`,value:"description",content:h},{label:`${s.product.materiais}`,value:"composition",content:_}],k=((U=A.getColorAndSizeFromSkuName((D=t.items)==null?void 0:D[0].name,o))==null?void 0:U.color)??t["Cores Filtráveis"][0]??"",M=()=>({commonData:{...t,sizes:C,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}=M();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}=M();i({functionKey:"productEvents",data:{event:"select_item",commonData:F,customData:{...Y,index:c.current.index}}}),c.current.trigger=!1}Q({})},[]),n.jsx(ya.Provider,{value:{productData:t,productId:l,productName:u,productReference:y,tag:E,items:p,sizes:C,allSizesAvailable:I,installments:v,price:P,listPrice:S,thumbImage:L,images:f,video:m[0],descriptionContent:T,breadcrumbList:j,isKit:r,colorName:k,handleViewItemEvent:Q},children:e})},ke=()=>{const e=g.useContext(ya);if(e===void 0)throw new Error("useContext(PDPDataContext) must be used within a PDPDataProvider");return e},tp=()=>{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}}]},xa=()=>{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)}},[])},np=typeof window>"u",rp=(e,t)=>{const[r,s]=g.useState(()=>{if(np)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]),[r,a=>{s(i=>{const c=typeof a=="function"?a(i):a;return localStorage.setItem(e,JSON.stringify(c)),c})}]};function os(e,t,r){const[s,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]),s}const In=({callback:e,onEnterViewportOnce:t,options:r})=>{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()))},r);return a.observe(o),()=>{t&&a.unobserve(o),a.disconnect()}},[e,t,r]),{element:s}},va=({defaultScale:e=1,maxScale:t=3})=>{const r=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||!r.current)return{minX:0,maxX:0,minY:0,maxY:0};const h=r.current.getBoundingClientRect(),_=s.current.children[0].getBoundingClientRect(),y=_.width,x=_.height,b=Math.min(0,(h.width-y)/2),E=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:E,minY:j,maxY:v}},p=(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:E,y:j}=l.current,v=Math.max(_,Math.min(y,E)),P=Math.max(x,Math.min(b,j));if(h.touches.length>1){const S=h.touches[0],C=h.touches[1],I=S.pageX-C.pageX,L=S.pageY-C.pageY;i.current=Math.sqrt(I*I+L*L),c.current={x:(S.pageX+C.pageX)/2,y:(S.pageY+C.pageY)/2}}else h.touches.length===1&&(c.current={x:h.touches[0].pageX-v,y:h.touches[0].pageY-P})},[o,l]),m=g.useCallback(h=>{if(!s.current||!r.current)return;const{minX:_,maxX:y,minY:x,maxY:b}=u();if(h.touches.length>1){h.preventDefault();const E=h.touches[0],j=h.touches[1],v=E.pageX-j.pageX,P=E.pageY-j.pageY,S=Math.sqrt(v*v+P*P);if(!i.current){i.current=S;return}const C=S/i.current,I=Math.max(1,Math.min(t,o*C));if(o===I)return;a(I);const L=(E.pageX+j.pageX)/2,T=(E.pageY+j.pageY)/2;let k=L-c.current.x,M=T-c.current.y;k=Math.max(_,Math.min(y,k)),M=Math.max(x,Math.min(b,M)),l.current={x:k,y:M},i.current=S,p(k,M,I)}else if(h.touches.length===1){const E=h.touches[0].pageX,j=h.touches[0].pageY;let v=E-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},p(v,P,o)}},[t,o]);return g.useEffect(()=>(document.addEventListener("touchstart",f),document.addEventListener("touchmove",m,{passive:!1}),()=>{document.removeEventListener("touchstart",f),document.removeEventListener("touchmove",m)}),[m,f]),{containerRef:r,imgRef:s,scale:o}},sp={attachment:"ATTACHMENT",specification:"SPECIFICATION",attribute:"ATTRIBUTE"},qe=Promise.resolve(!1),$r={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:()=>({})},as=e=>e===0,ba=(e,t)=>{if(!e||e.length===0)return[];let r="";const s=[],o=e.match(/\d+/g)??[];for(const a of o){const i=t[Number(a)];i&&(r+=(r?"/":"")+i,s.push(r))}return s},ja=(e,t)=>{const{availability:r,additionalInfo:{brandName:s},bundleItems:o,id:a,uniqueId:i,detailUrl:c,ean:l,imageUrl:u,name:p,listPrice:f,quantity:m,price:h,priceDefinition:_,productCategories:y,productCategoryIds:x,productId:b,refId:E,seller:j,referenceId:v,offerings:P,productRefId:S,skuName:C,sellingPrice:I}=e;return{availability:r,bundleItems:o,referenceId:v,productRefId:S,id:a,ean:l,uniqueId:i,itemOffered:{additionalProperty:[],brand:{name:s},categories:ba(x,y),categoriesIds:x,gtin:E,image:[{alternateName:(t==null?void 0:t.MAIN_IMAGE)??"1",url:u}],name:p,isVariationOf:{name:p,productGroupID:b},sku:a,slug:c,skuName:C},listPrice:f,quantity:m,offerings:P,price:h,priceDefinition:_,sellingPrice:I,seller:j}},Ca=(e,t)=>{const r=e.map(s=>({id:s.uniqueId,quantity:s.quantity,seller:s.seller}));return Array.isArray(t)?[...r,...t]:[...r,t]},Sa=(e,t)=>{const r=e.find(s=>s.id===t);if(r){const s=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:s,filterItems:s.filter(o=>o.id!==t)}}return{updateItems:[],filterItems:[]}},Ea=(e,t,r)=>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:r,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)??""}}),Fr=(e,t)=>e.filter(r=>r.availability!=="withoutStock").findIndex(({id:r})=>r===t),op=(e,t)=>{var r;return Array.isArray(e)?(((r=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:r.value)??0)/100:0},ap=e=>{const t=e.reduce((o,a)=>{const i=as(a.price)?0:a.quantity;return o+i},0),r=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:r,subTotal:s}},ip=e=>Array.isArray(e)?e.filter(t=>t.availability!=="withoutStock").reduce((t,r)=>t+(as(r==null?void 0:r.price)?0:r.quantity),0):0,Pa=(e,t)=>{const{items:r,orderFormId:s,...o}=e;return{...o,id:s,items:Array.isArray(r)?r.map(a=>ja(a,t)):[]}},Na=(e,t)=>{const r=e.find(s=>s.id===t);return r?r.availability==="unavailableItemFulfillment":!1},cp=(e,t)=>{const r=e.sku,s=e.isVariantOf.hasVariant.find(o=>o.sku===r);return s?s.name.split(t)[1]:"--"},St=(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},lp=(e,t)=>{const r=new Set;return[e,...t].filter(s=>!r.has(s)&&r.add(s),r)},Ia=(e,t)=>t&&Array.isArray(t)&&t.find(s=>s.id===e)?Promise.resolve(e):Promise.resolve(!1),Ra=(e,t)=>t?Promise.resolve(e[t]):Promise.resolve(!1),wa=async e=>{try{const t=await e();if(typeof t!="boolean")return t}catch(t){console.error(`[Error orderForm]: ${t}`)}return!1},Aa=(e,t)=>{if(t!==-1){const r=Number(e);return r?r+1:1}return e??1},Ta=(e,t)=>Array.isArray(e)?e.filter(r=>t==null?void 0:t.some(s=>s.id===r.id)):[],La=async(e,t)=>e.then(r=>[...r??[],...t??[]]),Te=async(e,t,r,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 r?c:Pa(c,s)})},ka=(e,t,r)=>({notifications:[...e.notifications,{id:Date.now(),message:t,callback:r}]}),Oa=e=>[...Array.isArray(e)?e:[e],"faststore"],Ma=e=>{const t=e.get("utm_source")||mt("utm_source"),r=e.get("utm_campaign")||mt("utm_campaign"),s=e.get("utm_medium")||mt("utm_medium"),o=e.get("utmi_cp")||mt("utmi_cp"),a=e.get("utmi_pc")||mt("utmi_pc"),i=e.get("utmi_p")||mt("utmi_p");return{...t&&{utmSource:t},...s&&{utmMedium:s},...r&&{utmCampaign:r},...o&&{utmiCampaign:o},...a&&{utmiPart:a},...i&&{utmipage:i}}},mt=e=>{if(!e||typeof window>"u")return;const t=window.location.href;e=e.replace(/[[\]]/g,"\\$&");const r=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)"),s=r.exec(t);return s?s[2]?decodeURIComponent(s[2].replace(/\+/g," ")):"":null},Da=(e,t,r="BR")=>{const s=t,o={country:r,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]},up=Object.freeze(Object.defineProperty({__proto__:null,VALUE_REFERENCES:sp,addItemOrder:Ca,addNotification:ka,createItemOrder:ja,createNewAddress:Da,fetchCartAPI:Te,findItemIndex:Fr,findOptions:Ta,findTotalizerValue:op,getCategories:ba,getCode:St,getQuantity:Aa,getRemoveId:Ia,getSize:cp,getTotalItems:ip,getTotalizer:ap,getUrlParameter:mt,getValue:Ra,initialState:$r,isGift:as,marketingTagsBuilder:Oa,mergeOptionsPromise:La,mountMarketingData:Ma,orderFormValues:Pa,promiseDefault:qe,removeQuantity:Sa,updateItemSellerExternal:Na,updateOrderFormPromise:wa,updateQuantity:Ea,wishlistArray:lp},Symbol.toStringTag,{value:"Module"})),dp=()=>{const e=async(h,_)=>Te("/api/checkout/order-form/coupon",{body:{orderFormId:h,coupon:_}}),t=async(h,_,y={})=>{if(_){const x=_.includes(" - ")?_.split(" - ")[0]:_,b=await Te("/api/checkout/order-form/seller-code",{body:{orderFormId:h,sellerCode:x}},!0);return b instanceof Object&&y.name in b&&b[y.status]===!0?Te("/api/checkout/order-form/attachments",{body:{orderFormId:h,sellerCode:x,sellerName:b[y.name]}}).then(j=>({...j,openTextField:{...(j==null?void 0:j.openTextField)??{},statusOk:!0}})):Promise.resolve({paymentData:null,openTextField:{statusOk:!1,value:x}})}else return Te("/api/checkout/order-form/attachments",{body:{orderFormId:h,sellerCode:"",sellerName:""}})},r=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:Ca(_,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=Sa(_,y);return Te("/api/checkout/order-form/items/update",{body:{orderItems:x.updateItems,orderFormId:h}})},u=async(h,_,y,x,b,E,j)=>{var S,C;const v=j?{startDateUtc:(S=E==null?void 0:E.deliveryWindow)==null?void 0:S.startDate,endDateUtc:(C=E==null?void 0:E.deliveryWindow)==null?void 0:C.endDate}:null,P={logisticsInfo:Array.from({length:x},(I,L)=>({itemIndex:L,selectedDeliveryChannel:(E==null?void 0:E.deliveryChannel)||null,selectedSla:(E==null?void 0:E.deliveryMethod)||null,deliveryWindow:v})),selectedAddresses:b,clearAddressIfPostalCodeNotFound:!0};return Te("/api/checkout/order-form/shipping",{body:{...P,orderFormId:h,country:y,postalCode:_}})},p=async(h,_,y)=>Te("/api/checkout/order-form/shipping/update",{body:{orderFormId:h,options:_,selectedAddresses:y}}),f=async(h,_,y,x)=>{const b=Ea(_,y,x);return Te("/api/checkout/order-form/items/update",{body:{orderFormId:h,orderItems:b}})};return{addCoupon:e,addItem:s,addSellerCode:t,addMarketingData:r,giftItem:o,emptyCart:a,getOrderForm:i,insertProfileEmail:c,removeItem:l,shipping:u,shippingUpdate:p,updateItemQuantity:async(h,_,y,x,b)=>f(h,_,y,x).then(E=>E&&Array.isArray(E.items)?Na(E.items,y)?f(h,_,y,b):E:!1)}},Br="soma::cart",Dt="soma::options",_t=yt.create((e,t)=>{const r=dp(),s=async(o,a,i)=>{e({loading:!0});const c=await wa(o);if(typeof c!="boolean"){e({...c});const l=await La(Ze.get(Dt),i);return Ze.set(Dt,l),Ra(c,a).finally(()=>e({loading:!1,options:l}))}return qe};if(typeof window<"u"){const o=async a=>{if(a){const i=await Ze.get(Dt).then(u=>Ta(u,a.items));Ze.set(Br,a),Ze.set(Dt,i),e({...a,options:i});const c=new URLSearchParams(window.location.search),l=c.get("utm_campaign")||c.get("utmi_campaign")||"";l&&s(()=>r.addSellerCode(t().id,l.toUpperCase()),"openTextField")}};return Ze.get(Br).then(a=>r.getOrderForm(a?a.id:"").then(o)),{...$r,addCoupon:async a=>s(()=>r.addCoupon(t().id,a),"marketingData"),addItem:(a,i)=>{s(()=>r.addItem(t().id,t().items,a),"items",i)},addSellerCode:async(a,i)=>s(()=>r.addSellerCode(t().id,a,i),"openTextField"),addMarketingData:async a=>s(()=>r.addMarketingData(t().id,a),"marketingData"),emptyCart:()=>{s(()=>r.emptyCart(t().id))},removeItem:async a=>{const i=await s(()=>r.removeItem(t().id,t().items,a),"items");return Ia(a,i)},shipping:async(a,i="BR")=>s(()=>r.shipping(t().id,a??"",i,t().items.length,Da(a??"",null,i)),"shippingData"),shippingUpdate:async a=>s(()=>{var i;return r.shippingUpdate(t().id,a,(i=t().shippingData)==null?void 0:i.selectedAddresses)},"shippingData"),toggleServiceToProduct:async(a,i,c)=>s(()=>r.giftItem(t().id,a,i,c),"items"),updateItemQuantity:async(a,i,c)=>{const{id:l,items:u}=t();return s(()=>{var p;return r.updateItemQuantity(l,u,a,i,((p=u.find(f=>f.id===a))==null?void 0:p.quantity)??1)},"items",c?[c]:void 0)},insertProfileEmail:async a=>s(()=>r.insertProfileEmail(t().id,a),"clientProfileData"),setIsOpen:a=>e({isOpen:a})}}return $r}),pp=()=>_t(e=>e),za=yt.create(e=>({notifications:[],actions:{addNotification:(t,r)=>e(s=>ka(s,t,r)),removeNotification:t=>e(r=>({notifications:r.notifications.filter(s=>s.id!==t)}))}})),is=()=>za(e=>e.notifications),cs=()=>za(e=>e.actions),mp=Object.freeze(Object.defineProperty({__proto__:null,KEY_INDEXED_OPTIONS:Dt,KEY_INDEXED_STORE:Br,useCartStore:_t,useGetCartStoreState:pp,useGetNotificationActions:cs,useGetNotificationsStore:is},Symbol.toStringTag,{value:"Module"})),fp=6e3,$a=g.createContext({}),Fa=({children:e,...t})=>{const{items:r}=_t(),[s,o]=g.useState([]),a=g.useRef(null),i=g.useMemo(()=>Array.isArray(s)&&s.length>0?s.map(c=>r.find(l=>l.id===c.id)).filter(c=>c!==void 0):[],[r,s]);return g.useEffect(()=>{s.length&&(clearTimeout(a.current??0),a.current=setTimeout(()=>{o([])},fp))},[s]),n.jsx($a.Provider,{value:g.useMemo(()=>({...t,setRecentlyAdded:o,recentlyAddedProducts:i}),[t,o,i]),children:e})},qt=()=>{const e=g.useContext($a);if(e===void 0)throw new Error("useUIContext must be used within a UIProvider");return e};class Ba{constructor(){Jt(this,"events",{});Jt(this,"prevData",{})}subscribe(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),()=>{this.events[t]=this.events[t].filter(s=>s!==r)}}publish(t,r){this.events[t]&&this.events[t].forEach(s=>{this.prevData[t]=r,s(r)})}}const Ua=g.createContext({}),hp=({children:e,headerConfigs:t,pathname:r,...s})=>{const[o,a]=g.useState(!0),[i,c]=g.useState(!1),l=r==="/",u=g.useRef(new Ba),p=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=p(l),m=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"))&&(Mr.get("lastMedias")||Mr.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=p(l);u.current.publish("header:change_variant",h.headerVariant),u.current.publish("header:change_position",h.position),m.current=h},[l]),n.jsx(Ua.Provider,{value:{isMobile:o,mediatorRef:u,currentHeaderConfigsRef:m,deviceValidated:i,...s},children:n.jsx(Fa,{children:e})})},ne=()=>g.useContext(Ua),Ha=g.createContext({}),_p=({children:e,...t})=>n.jsx(Ha.Provider,{value:{...t},children:e}),ce=()=>g.useContext(Ha),xt=(e,t)=>yt.create(r=>{const s=()=>r({value:e});return t&&t instanceof Set&&t.add(s),{value:e,actions:{setValue:o=>r({value:o}),reset:s}}}),Ut={category:null,menuMobileIsOpen:!1,searchModalIsOpen:!1,userMenuIsOpen:!1},Vt=new Set,gp=()=>{Vt.forEach(e=>{e()})},qa=yt.create((e,t)=>{const r=()=>e({value:Ut.category});return Vt.add(r),{value:Ut.category,actions:{reset:r,setValue:s=>e(()=>({value:s})),updateValue:s=>{t().value!==s&&e({value:s})}}}}),Va=()=>qa(e=>e.value),Wt=()=>qa(e=>e.actions),Wa=xt(Ut.menuMobileIsOpen,Vt),Ga=()=>Wa(e=>e.value),Ka=()=>Wa(e=>e.actions),Xa=xt(Ut.searchModalIsOpen,Vt),Ya=()=>Xa(e=>e.value),Rn=()=>Xa(e=>e.actions),Qa=xt(Ut.userMenuIsOpen,Vt),ls=()=>Qa(e=>e.value),us=()=>Qa(e=>e.actions),yp=Object.freeze(Object.defineProperty({__proto__:null,resetAllHeaderStores:gp,useActionsHeaderCategory:Wt,useActionsMenuMobileIsOpen:Ka,useActionsSearchModalIsOpen:Rn,useActionsUserMenuIsOpen:us,useGetHeaderCategoryStore:Va,useGetMenuMobileIsOpen:Ga,useGetSearchModalIsOpen:Ya,useGetUserMenuIsOpen:ls},Symbol.toStringTag,{value:"Module"})),wt={selectedSkuInfo:{productId:"",name:"",size:"",sku:"",sellerId:"",sellerName:"",available:!1,quantity:1},openLetMeKnow:!1,openMeasurements:!1,showBottomNavigation:!1,showNotify:!1},Tt=new Set,xp=()=>{Tt.forEach(e=>{e()})},Za=yt.create(e=>{const t=()=>e({value:wt.selectedSkuInfo});return Tt.add(t),{value:wt.selectedSkuInfo,actions:{setValue:r=>e(s=>({value:{...s,...r}})),reset:t}}}),Gt=()=>Za(e=>e.value),Ja=()=>Za(e=>e.actions),ei=xt(wt.openLetMeKnow,Tt),vp=()=>ei(e=>e.value),bp=()=>ei(e=>e.actions),ti=xt(wt.showNotify,Tt),ni=()=>ti(e=>e.value),ds=()=>ti(e=>e.actions),ri=xt(wt.showBottomNavigation,Tt),jp=()=>ri(e=>e.value),Cp=()=>ri(e=>e.actions),si=xt(wt.openMeasurements,Tt),oi=()=>si(e=>e.value),ai=()=>si(e=>e.actions),Sp=Object.freeze(Object.defineProperty({__proto__:null,resetAllPDPStores:xp,useActionsPDPOpenLetMeKnow:bp,useActionsPDPOpenMeasurements:ai,useActionsPDPSelectedSkuInfo:Ja,useActionsPDPShowBottomNavigation:Cp,useActionsPDPShowNotify:ds,useGetPDPOpenLetMeKnow:vp,useGetPDPOpenMeasurements:oi,useGetPDPSelectedSkuInfo:Gt,useGetPDPShowBottomNavigation:jp,useGetPDPShowNotify:ni},Symbol.toStringTag,{value:"Module"})),qs={feedback:{active:!1,action:"add"},list:[]},ps=yt.create((e,t)=>({value:qs,actions:{reset:()=>e({value:qs}),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:""}}}))}})),Lt=()=>ps(e=>e.value.list),ms=()=>ps(e=>e.value.feedback),vt=()=>ps(e=>e.actions),Ep=Object.freeze(Object.defineProperty({__proto__:null,useActionsWishlistStore:vt,useGetWishlistFeedbackStore:ms,useGetWishlistStore:Lt},Symbol.toStringTag,{value:"Module"})),ii=g.createContext({}),Pp=({children:e,headerData:t,...r})=>{var p,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(p=l.current)==null||p.subscribe("header:change_variant",m=>{var b,E,j;if(m&&u.current&&(u.current.bannerVariant=m),!s.current)return;const _=document.body.scrollTop>0,y=s.current.getAttribute("data-interactiveVariant"),x=_?y:m??((b=u.current)==null?void 0:b.bannerVariant)??"default";x!==((E=u.current)==null?void 0:E.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",m=>{s.current&&(s.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 s.current&&(s.current.addEventListener("click",_,{signal:m.signal}),s.current.addEventListener("touchend",_,{signal:m.signal})),()=>{m.abort()}},[]),n.jsx(ii.Provider,{value:{headerData:t,structureRef:o,rootRef:s,tipbarRef:a,userMenuMobileRef:i,userMenuDesktopRef:c,...r},children:e})},Ee=()=>g.useContext(ii),ci=g.createContext({}),li=({children:e,...t})=>n.jsx(ci.Provider,{value:g.useMemo(()=>t,[t]),children:e}),fs=()=>{const e=g.useContext(ci);if(e===void 0)throw new Error("useMenuMobileContext must be used within a MenuMobileProvider");return e},Np=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},Ip=(e,t,r)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const s=t.getBoundingClientRect(),o=e.getBoundingClientRect(),a=e!=null&&e.parentElement?Np(e==null?void 0:e.parentElement):0;return{left:s.left+s.width/2-(o.width+a),top:s.top+s.height+r}},ui=g.createContext({}),di=({children:e,delay:t=600,gap:r=20,...s})=>{const[o,a]=g.useState(!1),i=g.useRef(null),[c,l]=g.useState(!1),[u,p]=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 m=window.document.querySelector("#cart-button"),h=window.document.querySelector("#add-to-cart--tooltip");if(m&&h){const{left:_,top:y}=Ip(h,m,r??0);p({left:_,top:y}),l(!1)}},[r,o]),n.jsx(ui.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})},bt=()=>{const e=g.useContext(ui);if(e===void 0)throw new Error("useAddToCartContext must be used within a AddToCartProvider");return e},pi=g.createContext({}),Rp=({children:e,SELLER_CODE_VALIDATION_KEYS:t,CARTPROVIDER_MESSAGE_PRODUCT_REMOVE:r,data:s,...o})=>{var re,le,se,ie;const a=_t(),{setRecentlyAdded:i}=qt(),c=g.useRef(""),l=is(),{addNotification:u,removeNotification:p}=cs(),[f,m]=g.useState(null),{addCoupon:h,addItem:_,addSellerCode:y,addMarketingData:x,emptyCart:b,isOpen:E,removeItem:j,shipping:v,shippingUpdate:P,toggleServiceToProduct:S,updateItemQuantity:C}=a;g.useEffect(()=>{(async()=>{var R,W;if(!a.id||!((W=(R=s==null?void 0:s.promotion)==null?void 0:R.promotionCart)!=null&&W.idPromotion))return;const{data: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());m(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 z=Mr.get("lastMedias");if(a.id&&z&&c.current!==z){c.current=z;const J=new URLSearchParams(z),R=Ma(J);x(R)}},[a,x]);const I=g.useCallback(async(z,J)=>(J==="coupon"?h(z):y(z,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 St((N==null?void 0:N[0])??"",z,!!ae)}return St(String(W.coupon),z,!0)}return St("","")}).catch(()=>Promise.resolve({code:400})),[h,y]),L=g.useCallback((z,J,R)=>{const{id:W}=z;C(W,J,R)},[C]),T=g.useCallback((z,J,R=!1)=>{if(!z)return;const{id:W}=z,ae=Fr(a.items,W);if(ae!==-1&&!R){const he=Number(a.items[ae].quantity),N=a.items[ae]?he+1:1;L(z,N,J)}else _({id:W,quantity:(z==null?void 0:z.quantity)??1,seller:z.seller});E||i(he=>[...he,z])},[_,L,a.items,E,i]),k=g.useCallback((z,J)=>{if(!z||!Array.isArray(z))return;i(W=>[...W,...z]);const R=z.map(W=>{const{id:ae,quantity:he,seller:N}=W,w=Fr(a.items,ae),Ne=Aa(he??1,w);return{id:ae,quantity:Ne,seller:N}});_(R,J)},[_,a.items,i]),M=g.useCallback(async(z,J,R)=>z?j(z).then(()=>(u(J??`${r}`,R),St(z,z))):Promise.resolve(St("","Product id required")),[u,j]),Q=g.useCallback(()=>{a.items.length>0&&b()},[b,a.items]),D=g.useCallback((z,J="BRA")=>v(z,J),[v]),U=g.useCallback(z=>{z&&P(z)},[P]),F=g.useCallback(async(z,J,R=!1)=>{const W=a.items.findIndex(he=>he.uniqueId===z);return a.items[W]&&W>=0?S(J,W,R):!1},[a.items,S]),Y=g.useCallback(async(z,J)=>C(z,J).then(R=>{if(Array.isArray(R)){const W=R.find(ae=>ae.id===z);if(W&&(W==null?void 0:W.quantity)<J)return String(W.quantity)}return!1}),[C]),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 n.jsx(pi.Provider,{value:g.useMemo(()=>({...o,data:s,addCouponSeller:I,addToCart:T,addItemsToCart:k,cartStore:a,notifications:l,clearCart:Q,addNotification:u,isOpen:a.isOpen,removeNotification:p,removeToCart:M,setIsOpen:a.setIsOpen,shipping:D,shippingUpdateOption:U,toggleGiftItemCart:F,updateItemQuantity:Y,removeCoupon:G,removeSellerCode:H,removeCEP:Z,promotionRules:f,setPromotionRules:m}),[o,s,I,T,k,l,Q,u,a,p,M,D,U,F,Y,G,H,Z,f,m]),children:e})},ve=()=>{const e=g.useContext(pi);if(e===void 0)throw new Error("useCartContext must be used within a CartProvider");return e},mi=g.createContext({}),hs=({children:e,fetch:t})=>{const r=g.useRef(!0),[s,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]),n.jsx(mi.Provider,{value:g.useMemo(()=>({data:s,isLoading:r.current??!1,isError:a}),[s,a,r]),children:e})},_s=()=>{const e=g.useContext(mi);if(e===void 0)throw new Error("useProductsContext must be used within a useRootContext");return e},fi=g.createContext({}),gs=({children:e,sort:t,state:r,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=r.base)!=null&&u.length?r.base.slice(1).split("/").map((p,f)=>({key:`category-${f+1}`,value:p})):[]},[r.base,o]);return n.jsx(fi.Provider,{value:g.useMemo(()=>({state:{...r,facets:[...l,...r.facets??[]]},sort:t,count:s??c,searchParams:i}),[l,s,t,r,i]),children:e})},$e=()=>{const e=g.useContext(fi);if(e===void 0)throw new Error("useSearchContext must be used within a SearchProvider");return e},hi=g.createContext({}),wp=({children:e,...t})=>n.jsx(hi.Provider,{value:t,children:e}),Me=()=>{const e=g.useContext(hi);if(e===void 0)throw new Error("usePLPConstants must be used within a PLPConstantsProvider");return e},_i=g.createContext({}),Ap=({children:e,selectedFacets:t})=>{const{data:r,...s}=_s(),{router:o}=ce(),{searchParams:a,PLP_SORT_DEFAULT:i}=Me(),c=g.useCallback((m,h)=>{if(h){if(m.key.toLocaleLowerCase()==="price"){const _=h.getAll("facets");h.delete("facets"),_.forEach(y=>{const[x]=y.split("/");x!==m.key&&h.append("facets",y)})}h.set("page","1"),h.append("facets",`${m.key}/${m.value}`),o.push(`?${h.toString()}`)}},[o]),l=g.useCallback(()=>{const m=new URLSearchParams;m.set("sort",i),m.set("page","1"),o.push(`?${m.toString()}`)},[o]),u=g.useCallback((m,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!==m.key||b!==m.value)&&h.append("facets",y)}),o.push(`?${h.toString()}`)},[o]),p=g.useCallback(m=>{const h=a?new URLSearchParams(a):new URLSearchParams;for(const[,_]of h.entries()){const[y,x]=_.split("/");if(y===m.key&&x===m.value)return u(m,h)}return c(m,h)},[c,u,a]),f=g.useCallback(m=>{const h=a?new URLSearchParams(a):new URLSearchParams;h.set("sort",m.replace("_",":")),o.push(`?${h.toString()}`)},[o,a]);return n.jsx(_i.Provider,{value:g.useMemo(()=>({...s,breadcrumb:r&&"breadcrumb"in r?r==null?void 0:r.breadcrumb:[],deleteAllFacets:l,facets:r&&"facets"in r?r==null?void 0:r.facets:[],selectedFacets:t,onToggleFacet:p,onSort:f,searchParams:a}),[r,l,f,p,s,t,a]),children:e})},gi=({children:e,forceUpdate:t})=>{const{state:r}=$e();return n.jsx(hs,{fetch:()=>fetch("/api/search/facets",{method:"POST",body:JSON.stringify({...r,forceUpdate:t}),priority:"low"}),children:n.jsx(Ap,{selectedFacets:(r==null?void 0:r.facets)??[],children:e})})},yi=()=>{const e=g.useContext(_i);if(e===void 0)throw new Error("useFacetsContext must be used within a FacetsProvider");return e},Mt={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"}},Tp={nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"0",count:0,total:0},Lp="Imagem do produto",Vs=1,kp="Sair",Op=e=>e.exit,Ws=({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"}],Mp=(e,t)=>{const r=(t??"").split("@")[0];return e?`Olá${r.length?", ":" "}${r}!`:"Olá!"},Dp=e=>"Seja bem vindo!",zp="Marque a caixa para aceitar os termos de política de privacidade.",$p="Algumas informações estão incorretas ou não foram preenchidas",Fp="Enviar",xi=g.createContext({}),Bp=({children:e})=>{const{data:t,...r}=_s(),[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]),n.jsx(xi.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:Tp,total:s}),[t,r,s]),children:e})},ys=({children:e,query:t,forceUpdate:r})=>{const{count:s,state:o}=$e(),a={...o,count:s};return n.jsx(hs,{fetch:()=>fetch("/api/search/product",{method:"POST",body:JSON.stringify({...a,query:t,forceUpdate:r,facets:o.facets??[]})}),children:n.jsx(Bp,{children:e})})},Kt=()=>{const e=g.useContext(xi);if(e===void 0)throw new Error("useProductsContext must be used within a ProductsProvider");return e},vi=g.createContext({}),Up=({children:e,slug:t,searchParams:r,collectionId:s,brand:o,itemsPerPage:a=24,PLP_SORT_DEFAULT:i})=>{const{pathname:c}=ce(),l=g.useRef(""),[u,p]=g.useState(!1),f=g.useMemo(()=>{const h=new URL(c,"http://localhost"),_=(r==null?void 0:r.getAll("facets"))??[],y=(r==null?void 0:r.get("page"))??"1",x=(r==null?void 0:r.get("sort"))??(s?"":i);return h.searchParams.set("page",String(y)),h.searchParams.set("sort",String(x)),r!=null&&r.get("query")?(h.searchParams.set("query",r.get("query")),h):(h.searchParams.set("base",Array.isArray(t)?t.join("/"):t),h.searchParams.set("facets",_.join(",")),h)},[s,c,r,t]),m=g.useMemo(()=>{if(Array.isArray(r==null?void 0:r.getAll("facets")))return A.parseSearchState(f,r.getAll("facets")??[""]);const h=(r==null?void 0:r.getAll("facets"))??[];return A.parseSearchState(f,h)},[f,r]);return g.useEffect(()=>{l.current!==c&&(l.current=c,window.document.body.scrollTo(0,0))},[c]),n.jsx(vi.Provider,{value:g.useMemo(()=>({openFilters:u,setOpenFilters:p}),[u,p]),children:n.jsx(gs,{ITEMS_PER_PAGE:a,searchParams:r??new URLSearchParams,state:g.useMemo(()=>({...m}),[m]),collectionId:s,brand:o,children:e})})},xs=()=>{const e=g.useContext(vi);if(e===void 0)throw new Error("usePLPContext must be used within a PLPProvider");return e},bn=(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)=>bn(o,t[a]));if(Array.isArray(t))return!1;const r=Object.keys(e),s=Object.keys(t);return r.length!==s.length?!1:r.every(o=>Object.prototype.hasOwnProperty.call(t,o)&&bn(e[o],t[o]))},bi=(e,t,r="page")=>Object.keys(t).some(s=>s===r?!1:!bn(t[s],e[s])),Ur=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},ji=()=>({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}}}),Ci=(e,t,r,s=24)=>{const o=new Set,a=[];if(!Array.isArray(e)||e.length===0)return{taken:o,placedBanners:a};const i=t*s*r;for(const c of e){let l=Number(c.position_grid),u=!1;for(;l<i;){const p=l%r;if(p+c.columns>r){l+=r-p;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}},Hr=(e,t,r,s=24)=>{const{placedBanners:o,taken:a}=Ci(e??[],t,r),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}},yn=(e,t,r=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:vs(),products:t!=null&&t.products.length&&e===a?t==null?void 0:t.products:Array.from({length:r},()=>ji())}}),Si=(e,t)=>[...e,{loading:!1,page:t,pagination:vs(),products:[]}],vs=()=>({nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"1",count:1,total:1}),Hp=(e,t,r,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=r[c];return t.filter((u,p)=>{const f=s[p];return f<=l||o>i&&f>l})},Ei=(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 s=[];for(const[,o]of r){const a=o[Math.floor(Math.random()*o.length)];s.push(a)}return s},Pi=(e,t)=>{if(!e)return[];const r=e.map((s,o)=>s.video&&s.video!==""?o:null).filter(s=>s);return Ei(r,t)},Ni=e=>Array.isArray(e)?e.map((t,r)=>({href:`/${e.slice(0,r+1).join("/")}`,name:t})):[],qp=Object.freeze(Object.defineProperty({__proto__:null,createBreadcrumb:Ni,createPage:Si,createPages:yn,createPagination:vs,createProduct:ji,deepEqual:bn,fetchPage:Ur,getBanners:Ci,getPositions:Hr,getProductsWithVideo:Pi,getRandomVideoPerRow:Ei,getVisibleBanners:Hp,hasStateChangedExceptPage:bi},Symbol.toStringTag,{value:"Module"})),Vp=50,Wp=yt.create((e,t)=>{const r=i=>Math.min(i,Vp),s=async(i,c)=>{const l=r(i.page);try{const u=await Ur({...i,page:l});o(l,p=>c?c(p,u):{...p,...u})}catch(u){console.error(`[PDC - SCROLL INFINITE FAILED TO FETCH PAGE ${l}]: ${u}`),o(l,p=>({...p,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,m,h;const p=r(Number(i==null?void 0:i.page));e({...c,pages:yn(p,void 0,u)});try{const _=await Ur({...i,page:p});if(_){if(!_.products.length&&((f=_==null?void 0:_.pagination)==null?void 0:f.total)<p){a({...i,page:(m=_==null?void 0:_.pagination)==null?void 0:m.total},l),e({pages:yn((h=_==null?void 0:_.pagination)==null?void 0:h.total)});return}typeof l=="function"&&l(_),e({load:!0,pages:yn(p,_),total:Number(_.pagination.count)})}}catch(_){console.error(`[PDC - SCROLL INFINITE TO CREATE PAGES]: page ${p} ${_}`)}},addPage:(i,c,l)=>{const{pages:u}=t(),p=r(i==null?void 0:i.page);u.some(f=>f.page===p)||(e({...c,pages:Si(u,p)}),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)}}}),Gp=(e,t,r,s=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 p;return(p=u.node)==null?void 0:p.video});for(let u=0;u<c.length;u++){const p=i+u,f=s+p,m=t.find(_=>_.position_grid===f+1),h=f+o+1;m&&(o+=m.columns),a.push({position:h,canPlayVideo:u===l})}}return a},Ii=(e,t,r)=>{const s=(t-1)*r,o=t*r;return e>=s&&e<=o},wn=e=>{var t;return(t=e==null?void 0:e.map(r=>({disable:A.disableSKU(r),size:A.getSKUName(r),skuID:"sku"in r&&r.sku})))==null?void 0:t.filter(r=>r.disable)},Kp=Object.freeze(Object.defineProperty({__proto__:null,createGridPosAndVideo:Gp,getSkusNotify:wn,isPositionInCurrentPage:Ii},Symbol.toStringTag,{value:"Module"})),Ri=({isMobile:e,ICONS:t,NOTIFY_INFO:r})=>n.jsxs(n.Fragment,{children:[n.jsx(d.Modal.Controls,{navigation:e?"top":"middle",isMobile:e??!1,children:!e&&n.jsxs(n.Fragment,{children:[n.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),n.jsx(d.Button,{"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})}),n.jsx(d.Modal.Title,{navigation:e?"top":"middle",title:r.title})]});Ri.displayName="Notify.Controls";const Xe={"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 wi(e){const r=decodeURIComponent(window.document.cookie).split(";");for(const s of r){const[o,a]=s.trim().split("=");if(o===e)return a}}function bs(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}const Xp=()=>{const{sendDataLayerEvent:e}=oe(),{user:t}=kt(),{cartStore:r}=ve();return g.useEffect(()=>{if(!t)return;(async()=>{const{userId:o,email:a,firstName:i,lastName:c,phone:l,homePhone:u,postalCode:p,street:f,number:m,city:h,gender:_}=t,y=new TextEncoder().encode(o),x=await crypto.subtle.digest("SHA-256",y),E=Array.from(new Uint8Array(x)).map(j=>j.toString(16).padStart(2,"0")).join("");e({functionKey:"readyEvents",data:{readyData:{user_id:E,email:a,first_name:i,last_name:c,phone:l||u,zip:p,street:f,street_number:m,city:h,gender:_,orderform_id:r==null?void 0:r.id}}})})()},[t,r.id]),null},Ai=g.createContext({amount:null,boxes:null,toExpire:null,loading:!0,logout:()=>null,getCurrentCredits:()=>({credits:0,cashback:0})}),Yp=({children:e,AUTH_TOKEN_COOKIE:t})=>{var p;const{shipping:r,cartStore:s}=ve(),[o,a]=g.useState({amount:null,boxes:null,toExpire:null,loading:!0}),i=g.useCallback(async()=>{try{await fetch("/api/user",{priority:"low"}).then(f=>f.json()).then(f=>{const{userCredits:m,...h}=f,{wishlist:_,...y}=h;a({amount:m==null?void 0:m.amount,boxes:m==null?void 0:m.boxes,toExpire:m==null?void 0:m.toExpire,user:y,loading:!1,wishlist:(typeof _=="string"?_.split(","):_)??[]})})}catch(f){console.error("my credits request",f),a({...o,loading:!1})}},[a]),c=g.useCallback(()=>{bs(t),i()},[i]),l=g.useCallback(()=>o.boxes?o.boxes.reduce((f,m)=>m.gift_card_box.refid==="C1643"?(f.cashback+=m.amount,f):(f.credits+=m.amount,f),{cashback:0,credits:0}):{cashback:0,credits:0},[o]),u=g.useCallback(async()=>{var f,m,h;if((f=o.user)!=null&&f.postalCode&&(s!=null&&s.id)&&!(s!=null&&s.loading)&&!((h=(m=s==null?void 0:s.shippingData)==null?void 0:m.address)!=null&&h.postalCode))try{await r(o.user.postalCode)}catch(_){console.error("Error auto-filling CEP:",_)}},[(p=o.user)==null?void 0:p.postalCode]);return g.useEffect(()=>{i()},[i]),g.useEffect(()=>{u()},[u]),n.jsxs(Ai.Provider,{value:g.useMemo(()=>({...o,getCurrentCredits:l,logout:c}),[o,l,c]),children:[n.jsx(Xp,{}),e]})},kt=()=>{const e=g.useContext(Ai);if(e===void 0)throw new Error("useContext(SessionContext) must be used within a SessionProvider");return e},Ti=({color:e,delay:t=3e3,sku:r,setStatus:s,setIsLoading:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i})=>{const c=g.useRef(null),[l,u]=g.useState(null),{sendDataLayerEvent:p}=oe(),{user:f}=kt(),m=f!=null&&f.firstName?`${f==null?void 0:f.firstName} ${f==null?void 0:f.lastName}`:"";return n.jsx("div",{className:Xe["notify--form"],children:n.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:m,email:y,sku:r==null?void 0:r.skuID})}).then(b=>s(b.ok)).finally(()=>{o(!1),_.reset(),p({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),s(null)},t)})},children:[n.jsx(d.TextField.Structure,{input:n.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?n.jsx(d.TextField.SupportText,{text:a.messages.invalid_email,feedback:"error"}):n.jsx(n.Fragment,{})}),n.jsx(d.Button,{disabled:!(l===!1||!r)||!r,type:"submit",size:"large",children:i.button})]})})};Ti.displayName="Notify.Form";const Li=({isLoading:e=!1})=>n.jsx("div",{className:Xe["notify--loading"],"data-loading":e,children:n.jsx(d.Spinner,{})});Li.displayName="Notify.Loading";const js={"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"},ki=({children:e,...t})=>n.jsx("div",{...t,className:js["product-variation-list--list"],children:e});ki.displayName="ProductVariationList.List";const Oi=({fill:e="#1352C7",src:t="",type:r="size",text:s,...o})=>{const{nextimage:a}=ce();return r==="size"?n.jsxs(d.ToggleSize.Wrapper,{...o,size:"large",variation:"ghost",children:[n.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-size"}),n.jsx(d.ToggleSize.Text,{children:s})]}):n.jsxs(d.ToggleStyle.Wrapper,{...o,size:"small",title:"wrapper-texture",children:[n.jsx(d.ToggleStyle.DisabledAdornment,{title:"disabled-adornment-texture"}),r==="color"?n.jsx(d.ToggleStyle.Color,{background:e,title:"color"}):n.jsx(d.ToggleStyle.Texture,{title:"texture",children:n.jsx(a,{alt:s??"image",height:40,src:t,width:40})})]})};Oi.displayName="ProductVariationList.Option";const Mi=({children:e,...t})=>n.jsx("div",{className:js["product-variation-list"],...t,children:e});Mi.displayName="ProductVariationList.Root";const Di=({children:e,title:t,...r})=>n.jsxs("div",{...r,className:js["product-variation-list--title"],children:[t?n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.SectionWrapper,{children:n.jsx("p",{children:t})})}):n.jsx(n.Fragment,{}),e]});Di.displayName="ProductVariationList.Title";const Qe={List:ki,Option:Oi,Title:Di,Root:Mi},Qp=(e,t)=>{if(!e||!t)return!1;const r=Object.keys(e);return r.length!==Object.keys(t).length?!1:r.every(s=>e[s]===t[s])},zi=({children:e,label:t="",skus:r,sku:s,setSku:o})=>n.jsxs(n.Fragment,{children:[n.jsx("div",{className:Xe["notify--selector--header"],children:e}),n.jsxs(Qe.Root,{className:Xe["notify--selector"],children:[n.jsx(Qe.Title,{title:t}),n.jsx(Qe.List,{children:Array.isArray(r)&&r.map((a,i)=>{const c=Qp(s,a);return n.jsx(Qe.Option,{active:c,onClick:()=>o(c?null:a),text:String(a.size),type:"size"},i)})})]})]});zi.displayName="Notify.Selector";const Gs=({type:e,icon:t,title:r,subtitle:s})=>n.jsx("div",{className:Xe[`notify--status--${e}`],children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:t,size:"large"})},children:n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h2",{children:r}),n.jsx("h3",{children:s})]})})}),$i=({status:e,ICONS:t,PRODUCT_CARD_TEXTS:r})=>n.jsxs("div",{className:Xe["notify--status"],"data-status":e,children:[n.jsx(Gs,{...r.success,icon:t.check_circle,type:"success"}),n.jsx(Gs,{...r.error,icon:t.alert_circle,type:"error"})]});$i.displayName="Notify.Status";const Cs=({color:e,open:t,setVisible:r,skus:s,sku:o,setSku:a,ICONS:i,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l,PRODUCT_CARD_TEXTS:u,Z_INDEX_WAR:p})=>{const[f,m]=g.useState(!1),[h,_]=g.useState(null),{isMobile:y}=ne();return n.jsxs(d.Modal.Root,{isMobile:y??!1,isOpen:t,setIsOpen:r,variant:y?"sideBottom":"sideLeft",style:{zIndex:p.modal},className:Xe["modal-modifier"],children:[n.jsx(d.Modal.Header,{navigation:"top",className:Xe["notify--header-modifier"],children:n.jsx(Ri,{isMobile:y??!1,ICONS:i,NOTIFY_INFO:l})}),n.jsxs(d.Modal.Body,{className:Xe["notify--modal--body"],children:[n.jsxs("div",{className:Xe["notify--container"],children:[n.jsxs(zi,{label:l.selector_label,sku:o,skus:s,setSku:a,children:[n.jsx("p",{children:l.subtitle}),n.jsx("span",{children:l.description})]}),n.jsx(Ti,{delay:4e3,sku:o,setStatus:_,setIsLoading:m,color:e,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l}),n.jsx(Li,{isLoading:f}),n.jsx("div",{className:Xe["notify--selector--header"],children:n.jsx("span",{children:l.legal})})]}),n.jsx($i,{status:h,ICONS:i,PRODUCT_CARD_TEXTS:u})]})]})};Cs.displayName="Notify";const An=({skus:e,ICONS:t,NEWSLETTER_CONFIGS:r,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:a,...i})=>{const c=wn(e??[]);return n.jsx(Cs,{skus:c,ICONS:t,NEWSLETTER_CONFIGS:r,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:a,...i})};An.displayName="PDC.Notification";const Fi=g.createContext({}),Bi=({banners:e,children:t})=>{const{searchParams:r,ITEMS_PER_PAGE:s,ICONS:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l}=Me(),{router:u}=ce(),{sendDataLayerEvent:p}=oe(),{isMobile:f}=ne(),{state:m}=$e(),{addPage:h,createPages:_,updateProducts:y,...x}=Wp(),b=f?8:16,E=f?2:4,j=g.useRef(!1),v=g.useRef(m),[P,S]=g.useState(!1),[C,I]=g.useState(null),[L,T]=g.useState([]),k=g.useCallback(F=>{F&&"pagination"in F&&p({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:F.products}}})},[p]),M=g.useCallback(F=>{if(F.pagination.nextPage===!0){const Y=F.page+1,G=Hr(e,Y,E,s);h({...m,page:Y},G,k)}},[h,e,k,E,s,m]),Q=g.useCallback(F=>{F.loading===!1&&y({...m,page:F.page},k)},[k,y,m]),D=g.useCallback(F=>{const Y=new URLSearchParams(r);F.page!==Number(Y.get("page")??1)&&(Y.set("page",String(F.page)),u.replace(`?${Y.toString()}`,{scroll:!1}))},[u,r]),U=g.useCallback((F,Y)=>{const G=Y?wn([Y]):null;T(F),I(G!=null&&G.length?G[0]:null),S(!0)},[]);return g.useEffect(()=>{const F=!j.current,Y=bi(v.current,m),G=Hr(e,m.page,E);F?_(m,G,k,s):Y&&(_(m,G,k,s),v.current=m),j.current=!0},[e,_,k,E,s,m]),n.jsxs(Fi.Provider,{value:g.useMemo(()=>({...x,addPage:h,addNewPage:M,createPages:_,gap:b,columns:E,handleNotify:U,updatePage:Q,updateProducts:y,updateParamPage:D}),[h,M,_,U,b,E,x,Q,y,D]),children:[t,n.jsx(An,{open:P,sku:C,skus:L,setSku:I,setVisible:S,ICONS:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l})]})},st=()=>{const e=g.useContext(Fi);if(e===void 0)throw new Error("PLPInfiniteScrollContext must be used within a ScrollInfiniteProvider");return e},Ui=g.createContext({gridBanners:void 0,banners:[]}),Zp=({children:e,data:t,device:r,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,Vs),l=i.slice(Vs,i.length),u=t==null?void 0:t.sections.find(f=>f.name==="List Product Banners"),p=g.useMemo(()=>{var f,m;return((m=(f=u==null?void 0:u.data)==null?void 0:f.banners)==null?void 0:m.map(h=>({...h.banner,columns:h.bannerWidth,position_grid:h.bannerPosition})))??[]},[u]);return a&&r==="mobile"||!a&&r==="desktop"?n.jsxs(Ui.Provider,{value:{gridBanners:u,banners:p},children:[n.jsx(s,{data:c??[]}),n.jsxs(d.Utils.Column,{gap:o,className:d.helpers.classNameConcat("utils-column-modifier"),children:[e,n.jsx(s,{data:l??[]})]})]}):n.jsx(n.Fragment,{})},Tn=()=>{const e=g.useContext(Ui);return e===void 0&&console.error("Needs PLPContentContext on parent component"),e},Hi=g.createContext({}),qi=({children:e,filters:t,PLP_FILTERS:r,...s})=>{var a;const o=(a=t.facets)==null?void 0:a.filter(i=>r.find(c=>c.key===i.key));return n.jsx(Hi.Provider,{value:g.useMemo(()=>({...s,filters:{...t,facets:o}}),[t,o,s]),children:e})},Ot=()=>{const e=g.useContext(Hi);if(e===void 0)throw new Error("useFilterContext must be used within a FilterProvider");return e},Vi=g.createContext({product:void 0}),Jp=({children:e,data:t,productId:r,COMMON_PAGE_COLUMN_GAP:s,SectionZone:o})=>n.jsxs(Vi.Provider,{value:{productId:r},children:[e,n.jsx(d.Utils.Column,{gap:s,className:d.helpers.classNameConcat("utils-column-modifier"),children:n.jsx(o,{data:(t==null?void 0:t.sections)??[]})})]}),Wi=()=>{const e=g.useContext(Vi);return e||console.error("use this hook only inside PDPContentProvider hierarchy"),e},em=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase().trim();function tm(e,t=1e3){let r=!1;return(...s)=>{r||(e(...s),r=!0,setTimeout(()=>{r=!1},t))}}function nm(e,t=1e3){let r;return(...s)=>{clearTimeout(r),r=setTimeout(()=>{e(...s)},t)}}const Gi=(e,t)=>t.getTime()>e.getTime()?Math.abs(t.getTime()-e.getTime()):0,zt=(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),rm=e=>{const t=qd.decodeJwt(e??"");return{email:t.sub,userId:t.userId}},sm=["name","email","phone","date","cpf","cep"],Ks={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}$/},Ki=({type:e,input:t,required:r=!1})=>{if(typeof t!="string"||!r&&t===""||!Ks[e])return!0;const s=t.trim();return Ks[e].test(s)},om=e=>{const t=/\/(\d+)-\d+-\d+\/(.+?)\./,r=typeof e=="string"?e.match(t):null;return r?r[2].replace(/-/g," "):Lp},am=Object.freeze(Object.defineProperty({__proto__:null,FieldTypes:sm,debounce:nm,getAltTextFromUrl:om,getAuthenticatedUser:rm,getCookie:wi,getDaysHoursMinutesSeconds:zt,getMilliSeconds:Gi,removeAccentsAndReplaceSpaces:em,setCookie:bs,throttle:tm,validateInput:Ki},Symbol.toStringTag,{value:"Module"})),im=({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}},cm=({formData:e,mountedFields:t,inputsStatus:r,hasTermsAndConditions:s,checkboxRef:o,setFormStatus:a})=>{let i=!1,c=!1;const l={...r};return s&&!o.current&&(a("unchecked"),i=!0),e.forEach((u,p)=>{var h;if(p==="terms-and-conditions")return;const f=(h=t[p])==null?void 0:h.required;if(f&&!u){l[p]="required",i=!0;return}Ki({type:t[p].type,input:u,required:f})||(l[p]="error",c=!0),typeof u=="string"&&e.set(p,u.toString().trim())}),{hasEmptyFields:i,hasErrors:c,inputStatusToUpdate:l}},Xi=g.createContext({}),Yi=({children:e,masterDataEmailField:t,fields:r,variant:s,CONSTANTS:{MASTER_DATA_ENTITY:o,NEWSLETTER_CONFIGS:a}})=>{const{sendDataLayerEvent:i}=oe(),c=a.hasTermsAndConditions,{mountedFields:l,mountedInputsStatus:u}=g.useMemo(()=>im({fields:r}),[r]),p=g.useRef(!1),[f,m]=g.useState("idle"),[h,_]=g.useState(u),y=async({searchFields:S,entity:C})=>{const I=await ft.post("/api/master-data/search",{body:{masterDataEntity:C,searchFields:S,headers:{"REST-Range":"resources=0-49"}}});return console.info(I),I.data},x=async({documentId:S,fieldsToBeUpdated:C,entity:I})=>(await ft.post("/api/master-data/update",{dataEntityName:I,documentId:S,fieldsToBeUpdated:C})).status,b=g.useCallback(async({payload:S,response:C},I,L)=>{var D;const{email:T,...k}=S,[M]=await y({searchFields:{[I]:T},entity:L??o.newsletter}),Q=Array.isArray(M)?(D=M[0])==null?void 0:D.id:void 0;return M&&await x({documentId:Q,fieldsToBeUpdated:k,entity:L??o.newsletter})!==204?{...C,status:"error"}:{...C,status:"success"}},[]),E=g.useCallback(async({formData:S},C,I)=>{const L={status:"idle",inputsStatus:{}},T={};S.forEach((k,M)=>{T[M]=k});try{const M=(await ft.post("/api/master-data",{body:{payload:T,masterDataEntity:C??o.newsletter}})).data;return(M==null?void 0:M.Message)==="duplicated entry"?b({payload:T,response:L},I,C):M!=null&&M.Id?{...L,status:"success"}:{...L,status:"error"}}catch(k){return console.error("error",k),{...L,status:"error"}}},[b]),j=g.useCallback(async(S,C,I)=>{S.preventDefault();const L=new FormData(S.target);if(L.append("acceptedTerms",p.current?"true":"false"),p.current){const k=new Dr.TZDate(new Date,"America/Sao_Paulo").toISOString();L.append("termsAcceptedAt",k)}C&&Object.keys(C).forEach(k=>{L.append(k,C[k])});const T=await E({formData:L},I??"",t);T&&(m(T==null?void 0:T.status),_(T.inputsStatus),T.status==="success"&&i({functionKey:"readyEvents",data:{event:"generate_lead"}}))},[t,E,m,_,i]),v=g.useCallback(S=>{const C=new FormData(S.currentTarget.parentElement),{hasEmptyFields:I,hasErrors:L,inputStatusToUpdate:T}=cm({formData:C,mountedFields:l,inputsStatus:h,hasTermsAndConditions:c,checkboxRef:p,setFormStatus:m});if(_(T),I||L){S.preventDefault();return}m("loading")},[l,h,c,p]),P=g.useCallback(()=>{m("idle"),_(u)},[u]);return n.jsx(Xi.Provider,{value:g.useMemo(()=>({formStatus:f,handleSubmit:j,setFormStatus:m,inputsStatus:h,setInputsStatus:_,hasTermsAndConditions:c,handleClickToSubmit:v,checkboxRef:p,masterDataEmailField:t,fields:r,variant:s,resetNewsletter:P}),[f,j,m,h,_,v,c,p,t,r,s,P]),children:e})},Ss=()=>{const e=g.useContext(Xi);if(e===void 0)throw new Error("useNewsletterContext must be used within a NewsletterProvider");return e},Qi={contexts:{addToCart:{hook:bt,provider:di},cart:{hook:ve,provider:Rp},cms:{FlagsAndTags:{context:ss,hook:dt,provider:Vd}},newsletter:{hook:Ss,provider:Yi},events:{hook:oe,provider:Jd},global:{hook:ne,provider:hp,mediator:Ba},header:{hook:Ee,provider:Pp},menuMobile:{hook:fs,provider:li},next:{hook:ce,provider:_p},pdp:{provider:Wd},PDPContent:{provider:Jp,hook:Wi},plp:{provider:Up,hook:xs},plpFilter:{hook:Ot,provider:qi},PLPContent:{provider:Zp,hook:Tn},plpInfinite:{provider:Bi,hook:st},pdpdata:{provider:ep},searchFacets:{hook:yi,provider:gi},searchProducts:{hook:Kt,provider:ys},searchRoot:{hook:_s,provider:hs},searchSearch:{hook:$e,provider:gs},session:{hook:kt,provider:Yp},ui:{hook:qt,provider:Fa}},hooks:{useBackPDC:la,useClipboard:tp,useDisableZoom:xa,useLocalStorage:rp,useOnScreen:os,useSentinel:In,useTouchZoomPan:va},stores:{cart:mp,header:yp,pdp:Sp,wishlist:Ep}},lm={cart:up,events:Zd,plp:qp,product:A.productHelpers,utils:am},Es={helpers:lm},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"},Zi=({brand:e,className:t,name:r,...s})=>n.jsxs("div",{...s,className:d.helpers.classNameConcat(He["add-to-cart--card--name"],t),children:[n.jsx(d.Tag,{style:{textTransform:"uppercase"},size:"small",variant:"quaternary",title:e,children:e}),n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:n.jsx("p",{className:"typography-style-body-md",children:r})})})]});Zi.displayName="AddToCart.Card.Name";const Ji=({className:e,listPrice:t,price:r,quantity:s,productId:o,...a})=>{const i=A.formatPriceToCurrency(r/100),c=A.formatPriceToCurrency(t/100);return n.jsx("div",{...a,className:d.helpers.classNameConcat(He["add-to-cart--card--price-quantity"],e),children:n.jsx(d.ProductInfo.Root,{size:"small",layout:"vertical",children:n.jsx(d.ProductInfo.Wrapper,{size:"small",layout:"vertical",children:n.jsx(d.ProductInfo.ValuesWrapper,{children:r!==t?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:i,size:"small"},"price-list"),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:c,size:"small"},"price-low")]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:c,size:"small"},"price-low")})})})})};Ji.displayName="AddToCart.Card.PriceQuantity";const um="_skeleton_12b79_1",dm={skeleton:um},ec=({style:e})=>n.jsx("div",{style:e,className:dm.skeleton}),pm="_image_1y08u_1",mm={image:pm},fm=({alt:e,className:t,objectFit:r,...s})=>{const{nextimage:o}=ce();return n.jsx(o,{quality:90,...s,alt:e??"",className:d.helpers.classNameConcat(mm.image,t),"data-object-fit":r??"cover"})},hm=({videoRef:e,...t})=>n.jsx("video",{...t,ref:e,children:n.jsx("track",{kind:"captions"})}),Ie={Image:fm,Video:hm},tc=({className:e,productGroupID:t,size:r,texture:s,...o})=>{const{CONSTANTS:{TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:i}}=bt(),[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 p=u.data[0].items[0];if(p){const f=p.images.find(m=>a.includes(m.imageLabel));f!=null&&f.imageUrl?l(f.imageUrl):l(p.images[0].imageUrl)}}).catch(u=>{console.error(u)})},[c,t]),n.jsxs("div",{...o,className:d.helpers.classNameConcat(He["add-to-cart--card--style-size"],e),children:[n.jsx(d.ToggleStyle.Wrapper,{size:"x-small",style:i,children:n.jsx(d.ToggleStyle.Texture,{children:c?n.jsx(Ie.Image,{alt:"",src:c??"",width:164,height:164,style:i}):n.jsx(ec,{})})}),n.jsx(d.Utils.Divider,{direction:"vertical",size:"medium",style:{height:24}}),r&&n.jsxs(d.ToggleSize.Wrapper,{size:"small",title:"wrapper-texture",children:[n.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),n.jsx(d.ToggleSize.Text,{children:r})]})]})};tc.displayName="AddToCart.Card.StyleSize";const{helpers:_m}=Es,nc=({className:e,item:t,texture:r,...s})=>{const{itemOffered:{name:o,brand:a,skuName:i,isVariationOf:{productGroupID:c}},quantity:l,price:u,sellingPrice:p}=t,{CONSTANTS:{NAME_SPLIT_SYMBOL:f}}=bt(),{size:m}=_m.product.getColorAndSizeFromSkuName(i??o,f);return n.jsxs("div",{...s,className:d.helpers.classNameConcat(He["add-to-cart--card--content"],e),children:[n.jsx(Zi,{brand:a.name,name:o}),n.jsx(Ji,{price:u,listPrice:p,quantity:l,productId:t.id}),n.jsx(tc,{size:m,texture:r,productGroupID:c})]})};nc.displayName="AddToCart.Card.Content";const rc=({image:e,thumbnail:t=!1})=>n.jsx(Ie.Image,{alt:e.alternateName??"image","data-thumbnail":t,height:t?152:120,src:e.url,width:t?152:94});rc.displayName="AddToCart.Card";const sc=({className:e,item:t,texture:r,thumbnail:s,...o})=>{const{itemOffered:{image:[a]}}=t,i=A.updatedResizedImg(a.url,{width:200,height:300});return n.jsxs("div",{...o,className:d.helpers.classNameConcat(He["add-to-cart--card"],e),children:[n.jsx(rc,{image:{alternateName:a.alternateName||"Produto",url:i||""},thumbnail:s}),!s&&n.jsx(nc,{item:t,texture:r})]})};sc.displayName="AddToCart.Card";const oc=({className:e,children:t,title:r,...s})=>n.jsxs("div",{...s,className:d.helpers.classNameConcat(He["add-to-cart--content"],e),children:[n.jsx("div",{className:He["add-to-cart--content--title"],children:r&&n.jsx("h2",{children:r})}),t,n.jsx(ht.Footer,{})]});oc.displayName="AddToCart.Layout.Content";const ac=({className:e,...t})=>{var h,_;const{isMobile:r,handleClose:s,CONSTANTS:{ADD_TO_CART:o}}=bt(),{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,m=A.formatPriceToCurrency(f??0);return n.jsxs("div",{...t,className:d.helpers.classNameConcat(He["add-to-cart--footer"],e),children:[n.jsxs("div",{className:He["add-to-cart--footer--total"],children:[n.jsx("span",{children:"Subtotal:"}),n.jsx("span",{children:m})]}),n.jsx(d.Button,{size:"medium",variant:"primary","data-close":!0,onClick:()=>i(!0),children:o.footer.bag}),r?n.jsx(d.Button,{"data-close":!0,size:"medium",variant:"tertiary",children:o.footer.keep_buying}):n.jsx(d.Button,{onClick:()=>s(),size:"medium",variant:"tertiary",children:o.footer.keep_buying})]})};ac.displayName="AddToCart.Layout.Footer";const ic=({children:e,className:t,thumbnail:r=!1,...s})=>{const{cartStore:{options:o}}=ve(),{recentlyAddedProducts:a}=qt(),i=a.length>3?4:a.length;return n.jsxs("div",{...s,className:He["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(p=>p.id===c.itemOffered.isVariationOf.productGroupID))==null?void 0:u.texture;return n.jsx(ht.Card,{item:c,thumbnail:r,texture:l},c.itemOffered.sku)}),e]})};ic.displayName="AddToCart.Layout.Items";const cc=({children:e,Z_INDEX_WAR:t})=>{const{isOpen:r,setIsOpen:s}=bt(),{isMobile:o}=ne();return n.jsxs(d.Modal.Root,{"data-modal":"add-to-cart--modal",className:He["add-to-cart__modal"],isMobile:o??!1,isOpen:r,setIsOpen:s,variant:"sideBottom",style:{zIndex:t.modal},children:[n.jsx(d.Modal.Header,{navigation:"top",children:n.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0})}),n.jsx(d.Modal.Body,{children:e})]})};cc.displayName="AddToCart.Modal";const gm=({children:e})=>{const{count:t,handleClose:r,setIsOpen:s}=bt(),o=g.useRef(t);return g.useEffect(()=>{t>o.current&&s(!0),t<o.current&&o.current>=1&&r(),o.current=t},[t,r,s]),n.jsx(n.Fragment,{children:e})},lc=({children:e,component:t,CONSTANTS:r,...s})=>{const{recentlyAddedProducts:o}=qt(),{isMobile:a}=ne(),i=o.length>3?4:o.length;return n.jsx(di,{...s,count:i,isMobile:a,CONSTANTS:r,children:n.jsx(gm,{children:a?n.jsxs(n.Fragment,{children:[n.jsx(ht.Modal,{Z_INDEX_WAR:r.Z_INDEX_WAR,children:t}),e]}):n.jsx(ht.Tooltip,{component:t,style:{width:350},Z_INDEX_WAR:r.Z_INDEX_WAR,children:e})})})};lc.displayName="AddToCart.Root";const uc=({children:e,component:t,Z_INDEX_WAR:r,...s})=>{const{contentRef:o,left:a,isLeaving:i,target:c,isOpen:l,top:u}=bt();return n.jsx(d.Tooltip.Root,{arrow:"top-right",component:n.jsx("div",{...s,ref:o,children:t}),id:"add-to-cart--tooltip",className:He["add-to-cart--tooltip"],style:{zIndex:r.modal},isLeaving:i,isOpen:l,left:a,size:"medium",position:"top",top:u,children:n.jsx("div",{className:He["add-to-cart--tooltip"],ref:c,children:e})})};uc.displayName="AddToCart.Tooltip";const ht={Card:sc,Content:oc,Footer:ac,Items:ic,Modal:cc,Root:lc,Tooltip:uc},Ps=({title:e,...t})=>{const{recentlyAddedProducts:r}=qt(),{isMobile:s}=ne(),o=r.length>3?4:r.length,a=r.length>(o??1),i=r.length>1;return n.jsx(ht.Root,{isMobile:s,count:r.length,component:n.jsx(ht.Content,{title:e,children:n.jsx(ht.Items,{thumbnail:i,children:a&&n.jsx(d.Badge.Count,{count:r.length-o,size:"medium",variant:"secondary"})})}),...t})};Ps.displayName="AddToCart";const Xs={"backtotop-btn":"_backtotop-btn_1shb6_1","card-modifier":"_card-modifier_1shb6_27"},ym=({children:e,className:t,adornment:r,iconPosition:s,scrollToOptions:o,style:a,...i})=>{const c={top:(o==null?void 0:o.top)??0,left:(o==null?void 0:o.left)??0,behavior:(o==null?void 0:o.behavior)??"smooth"},u=s&&r?{flexDirection:{top:"column",bottom:"column-reverse",left:"row",right:"row-reverse"}[s]}:{},p=()=>{window&&window.document.body.scrollTo({...c})};return n.jsx(d.Card,{...i,shadow:!0,padding:"small",className:d.helpers.classNameConcat(Xs["card-modifier"],t),style:{...a,padding:0},children:n.jsxs("button",{className:Xs["backtotop-btn"],onClick:p,style:{...u},"data-orientation":s,children:[r,e]})})},xm="_container_1sy8s_16",ct={"carousel-container":"_carousel-container_1sy8s_1","add-cart-container":"_add-cart-container_1sy8s_8",container:xm,"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"},vm=({selectedProducts:e,handleAddAllToCart:t,CONSTANTS:r})=>{const s=Object.values(e.products).length;return n.jsxs("div",{className:ct["add-itens-to-cart-container"],children:[n.jsxs("div",{className:ct["add-itens-to-cart-container-values"],children:[n.jsx("div",{className:ct["add-itens-to-cart-qty-products"],children:n.jsx("span",{children:s===0?r.BUY_PACKAGE.group_cart.select_all_product:`${s} ${s===1?r.BUY_PACKAGE.group_cart.select_product:r.BUY_PACKAGE.group_cart.select_product+"s"}`})}),n.jsx("div",{className:ct["add-itens-to-cart-total"],children:n.jsx("span",{children:A.freightParsePrice({valueInCents:e.totalPrice*100,hasFree:!1,freeTaxMessage:r.FREIGHT_CALCULATION.messages.free_tax})})})]}),n.jsx(d.Button,{onClick:t,className:ct["add-button"],size:"large",disabled:s===0,variant:"primary",children:r.BUY_BUTTON_LABELS.add_to_cart})]})},bm=e=>e.reduce((t,r)=>{var o;const s=t.find(a=>a.node.id===r.node.id);if(!s)return[...t,r];if((o=s==null?void 0:s.node.isVariantOf)!=null&&o.hasVariant){const a=s.node.isVariantOf.hasVariant,i=r.node.isVariantOf.hasVariant;a&&i&&(s.node.isVariantOf.hasVariant=[...a,...i])}return t},[]),jm=({selectedProduct:e,productId:t,prevState:r,mainSellerId:s})=>{const{products:o,totalPrice:a}=r;try{if(!e){const{[t]:u,...p}=o;return{...r,totalPrice:a-u.price,products:p}}const i=A.getValidOffer(e.offers.offers,s);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}},dc=g.createContext({}),Cm=({children:e,item:t,index:r,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:p}=oe(),f=y=>{u({functionKey:"productEvents",data:{commonData:{...t,availableSizes:l.current.availableSkus,...l.current.priceInfo},customData:{index:r+1},event:y}})},m=()=>{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:r}}})},_=()=>{s&&(p.current={item_list_name:s}),f("select_item")};return n.jsx(dc.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})},Ke=()=>{const e=g.useContext(dc);if(e===void 0)throw new Error("useProductCardContext must be used within a ProductCardProvider");return e},we={"product-card--actions":"_product-card--actions_nmzk4_1","product-card--actions--group":"_product-card--actions--group_nmzk4_9","product-card--actions--selectors":"_product-card--actions--selectors_nmzk4_21","product-card--body":"_product-card--body_nmzk4_33","product-card--header":"_product-card--header_nmzk4_47","product-card--footer":"_product-card--footer_nmzk4_67","product-card--image":"_product-card--image_nmzk4_90","product-card--image--container":"_product-card--image--container_nmzk4_97","product-card--outstock":"_product-card--outstock_nmzk4_133","product-card--price":"_product-card--price_nmzk4_155","product-card--title":"_product-card--title_nmzk4_177","product-card--title--tag":"_product-card--title--tag_nmzk4_183","product-card--title--content":"_product-card--title--content_nmzk4_200","product-card--selectors--size":"_product-card--selectors--size_nmzk4_240","product-card--selectors--size--button":"_product-card--selectors--size--button_nmzk4_266","product-card--selectors--size--skus":"_product-card--selectors--size--skus_nmzk4_275","product-card--selectors--style":"_product-card--selectors--style_nmzk4_289","product-card--selectors--style--more":"_product-card--selectors--style--more_nmzk4_299","product-card--video":"_product-card--video_nmzk4_316","product-card--wrapper":"_product-card--wrapper_nmzk4_342"},pc=({callback:e,children:t,className:r,data:s,isKit:o,...a})=>{const{item:{availability:{status:i},image:c}}=Ke();return i?n.jsxs("div",{...a,className:d.helpers.classNameConcat(we["product-card--actions"],r),children:[n.jsxs(me.Wrapper,{type:"actions--group",children:[n.jsx(me.Price,{}),n.jsx("div",{className:we["product-card--actions--selectors"],children:!o&&n.jsx(me.StyleSelector,{data:s,images:c,callback:e})})]}),t]}):null};pc.displayName="ProductCard.Actions";const mc=({className:e,isKit:t,...r})=>{const{addToCart:s}=ve(),{isMobile:o=!1,selectedSku:a,outStock:i,item:c,sendAddToCartEvent:l,CONSTANTS:u}=Ke(),p=()=>{var h;if(!a)return;const m=A.getValidOffer(a.offers.offers,u.StoreConfig_MainSellerId);m&&s({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()},f=a?u.BUY_BUTTON_LABELS.add_to_cart:u.BUY_BUTTON_LABELS.select_size;return n.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:p,children:i?"Avise-me quando chegar":f})};mc.displayName="ProductCard.Actions.BuyButton";const Sm={"snackbar-modifier":"_snackbar-modifier_1va2l_1"},It=({size:e,adornment:t,title:r,subtitle:s,supportChildren:o,className:a,Z_INDEX_WAR:i,...c})=>n.jsxs(d.SnackBar.Structure,{...c,size:e,className:d.helpers.classNameConcat(Sm["snackbar-modifier"],a),width:360,style:{zIndex:i.snackbar},children:[n.jsx(d.SnackBar.Content,{adornment:t,title:r,subtitle:s}),o&&n.jsx(d.SnackBar.Support,{children:o})]});It.displayName="SnackBar";const Ft={"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 qr={exports:{}},Le={};Le._=Le._interop_require_default=Em;function Em(e){return e&&e.__esModule?e:{default:e}}var tn={exports:{}},Wn={},Ys;function fc(){return Ys||(Ys=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 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,p]=l;Array.isArray(p)?p.forEach(f=>c.append(u,s(f))):c.set(u,s(p))}),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(p=>{Array.from(p.keys()).forEach(f=>i.delete(f)),p.forEach((f,m)=>i.append(m,f))}),i}}(Wn)),Wn}var Gn={},At={};function hc(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(hc=function(s){return s?r:t})(e)}At._=At._interop_require_wildcard=Pm;function Pm(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=hc(t);if(r&&r.has(e))return r.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,r&&r.set(e,s),s}var Qs;function _c(){return Qs||(Qs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var p in u)Object.defineProperty(l,p,{enumerable:!0,get:u[p]})}t(e,{formatUrl:function(){return a},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}});const s=At._(fc()),o=/https?|ftp|gopher|file/;function a(l){let{auth:u,hostname:p}=l,f=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:p&&(y=u+(~p.indexOf(":")?"["+p+"]":p),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||""),m&&m[0]!=="/"&&(m="/"+m)):y||(y=""),h&&h[0]!=="#"&&(h="#"+h),x&&x[0]!=="?"&&(x="?"+x),m=m.replace(/[?#]/g,encodeURIComponent),x=x.replace("#","%23"),""+f+y+m+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)}}(Gn)),Gn}var Kn={},Zs;function Nm(){return Zs||(Zs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"omit",{enumerable:!0,get:function(){return t}});function t(r,s){const o={};return Object.keys(r).forEach(a=>{s.includes(a)||(o[a]=r[a])}),o}}(Kn)),Kn}var Xn={},Js;function Ln(){return Js||(Js=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 E},MissingStaticPage:function(){return b},NormalizeError:function(){return y},PageNotFoundError:function(){return x},SP:function(){return m},ST:function(){return h},WEB_VITALS:function(){return r},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 p},stringifyError:function(){return j}});const r=["CLS","FCP","FID","INP","LCP","TTFB"];function s(v){let P=!1,S;return function(){for(var C=arguments.length,I=new Array(C),L=0;L<C;L++)I[L]=arguments[L];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 p(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 L='"'+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(L)}}const C=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(C&&u(C))return I;if(!I){const L='"'+l(v)+'.getInitialProps()" should resolve to an object. But found "'+I+'" instead.';throw new Error(L)}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 m=typeof performance<"u",h=m&&["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 E 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})}}(Xn)),Xn}var nn={exports:{}},Yn={},eo;function gc(){return eo||(eo=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(/\/$/,"")||"/"}}(Yn)),Yn}var Qn={},to;function Ns(){return to||(to=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"parsePath",{enumerable:!0,get:function(){return t}});function t(r){const s=r.indexOf("#"),o=r.indexOf("?"),a=o>-1&&(s<0||o<s);return a||s>-1?{pathname:r.substring(0,a?o:s),query:a?r.substring(o,s>-1?s:void 0):"",hash:s>-1?r.slice(s):""}:{pathname:r,query:"",hash:""}}}(Qn)),Qn}var no;function kn(){return no||(no=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return o}});const r=gc(),s=Ns(),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,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 Zn={},rn={exports:{}},Jn={},ro;function yc(){return ro||(ro=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"pathHasPrefix",{enumerable:!0,get:function(){return r}});const t=Ns();function r(s,o){if(typeof s!="string")return!1;const{pathname:a}=(0,t.parsePath)(s);return a===o||a.startsWith(o+"/")}}(Jn)),Jn}var so;function Im(){return so||(so=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return o}});const r=yc(),s=process.env.__NEXT_ROUTER_BASEPATH||"";function o(a){return(0,r.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)}(rn,rn.exports)),rn.exports}var oo;function xc(){return oo||(oo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isLocalURL",{enumerable:!0,get:function(){return s}});const t=Ln(),r=Im();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,r.hasBasePath)(i.pathname)}catch{return!1}}}(Zn)),Zn}var er={},tr={},ao;function Rm(){return ao||(ao=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 p=function(f,m){if(f!==null&&f!==m)throw new Error("You cannot use different slug names for the same dynamic path ('"+f+"' !== '"+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]+'" ).');p(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]+'").');p(this.restSlugName,l),this.restSlugName=l,c="[...]"}else{if(u)throw new Error('Optional route parameters are not yet supported ("'+o[0]+'").');p(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(s){const o=new t;return s.forEach(a=>o.insert(a)),o.smoosh()}}(tr)),tr}var nr={},rr={},sr={},or={},io;function wm(){return io||(io=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}}(or)),or}var ar={},co;function Am(){return co||(co=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 r}});function r(a){return a[0]==="("&&a.endsWith(")")}const s="__PAGE__",o="__DEFAULT__"}(ar)),ar}var lo;function Tm(){return lo||(lo=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=wm(),s=Am();function o(i){return(0,r.ensureLeadingSlash)(i.split("/").reduce((c,l,u,p)=>!l||(0,s.isGroupSegment)(l)||l[0]==="@"||(l==="page"||l==="route")&&u===p.length-1?c:c+"/"+l,""))}function a(i){return i.replace(/\.rsc($|\?)/,"$1")}}(sr)),sr}var uo;function vc(){return uo||(uo=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 r=Tm(),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 p of i.split("/"))if(l=s.find(f=>p.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,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 p=c.split("/");if(p.length<=2)throw new Error(`Invalid interception route: ${i}. Cannot use (..)(..) marker at the root level or one level up.`);u=p.slice(0,-2).concat(u).join("/");break;default:throw new Error("Invariant: unexpected marker")}return{interceptingRoute:c,interceptedRoute:u}}}(rr)),rr}var po;function Lm(){return po||(po=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isDynamicRoute",{enumerable:!0,get:function(){return s}});const t=vc(),r=/\/\[[^/]+?\](?=\/|$)/;function s(o){return(0,t.isInterceptionRouteAppPath)(o)&&(o=(0,t.extractInterceptionRouteInformation)(o).interceptedRoute),r.test(o)}}(nr)),nr}var mo;function km(){return mo||(mo=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 s.isDynamicRoute}});const r=Rm(),s=Lm()}(er)),er}var ir={},cr={},fo;function Om(){return fo||(fo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getRouteMatcher",{enumerable:!0,get:function(){return r}});const t=Ln();function r(s){let{re:o,groups:a}=s;return i=>{const c=o.exec(i);if(!c)return!1;const l=p=>{try{return decodeURIComponent(p)}catch{throw new t.DecodeError("failed to decode param")}},u={};return Object.keys(a).forEach(p=>{const f=a[p],m=c[f.pos];m!==void 0&&(u[p]=~m.indexOf("/")?m.split("/").map(h=>l(h)):f.repeat?[l(m)]:l(m))}),u}}}(cr)),cr}var lr={},ur={},ho;function Mm(){return ho||(ho=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 k},CACHE_ONE_YEAR:function(){return v},DOT_NEXT_ALIAS:function(){return L},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 C},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 E},NEXT_CACHE_TAGS_HEADER:function(){return m},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 p},NEXT_QUERY_PARAM_PREFIX:function(){return r},NON_STANDARD_NODE_ENV:function(){return R},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 T},RSC_ACTION_CLIENT_WRAPPER_ALIAS:function(){return F},RSC_ACTION_ENCRYPTION_ALIAS:function(){return U},RSC_ACTION_PROXY_ALIAS:function(){return D},RSC_ACTION_VALIDATE_ALIAS:function(){return Q},RSC_MOD_REF_PROXY_ALIAS:function(){return M},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 z},WEBPACK_LAYERS:function(){return w},WEBPACK_RESOURCE_QUERIES:function(){return Ne}});const r="nxtP",s="nxtI",o="x-prerender-revalidate",a="x-prerender-revalidate-if-generated",i=".prefetch.rsc",c=".rsc",l=".action",u=".json",p=".meta",f=".body",m="x-next-cache-tags",h="x-next-cache-soft-tags",_="x-next-revalidated-tags",y="x-next-revalidate-tag-token",x=128,b=256,E=1024,j="_N_T_",v=31536e3,P="middleware",S=`(?:src/)?${P}`,C="instrumentation",I="private-next-pages",L="private-dot-next",T="private-next-root-dir",k="private-next-app-dir",M="private-next-rsc-mod-ref-proxy",Q="private-next-rsc-action-validate",D="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`?",z="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",R='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"},w={...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__"}}(ur)),ur}var dr={},_o;function Dm(){return _o||(_o=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"escapeStringRegexp",{enumerable:!0,get:function(){return s}});const t=/[|\\{}()[\]^$+*?.-]/,r=/[|\\{}()[\]^$+*?.-]/g;function s(o){return t.test(o)?o.replace(r,"\\$&"):o}}(dr)),dr}var go;function zm(){return go||(go=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 m},getRouteRegex:function(){return l},parseParameter:function(){return i}});const r=Mm(),s=vc(),o=Dm(),a=gc();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(E=>{const j=s.INTERCEPTION_ROUTE_MARKERS.find(P=>E.startsWith(P)),v=E.match(/\[((?:\[.*\])|.+)\]/);if(j&&v){const{key:P,optional:S,repeat:C}=i(v[1]);return x[P]={pos:b++,repeat:C,optional:S},"/"+(0,o.escapeStringRegexp)(j)+"([^/]+?)"}else if(v){const{key:P,repeat:S,optional:C}=i(v[1]);return x[P]={pos:b++,repeat:S,optional:C},S?C?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}else return"/"+(0,o.escapeStringRegexp)(E)}).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 p(_){let{interceptionMarker:y,getSafeRouteKey:x,segment:b,routeKeys:E,keyPrefix:j}=_;const{key:v,optional:P,repeat:S}=i(b);let C=v.replace(/\W/g,"");j&&(C=""+j+C);let I=!1;(C.length===0||C.length>30)&&(I=!0),isNaN(parseInt(C.slice(0,1)))||(I=!0),I&&(C=x()),j?E[C]=""+j+v:E[C]=v;const L=y?(0,o.escapeStringRegexp)(y):"";return S?P?"(?:/"+L+"(?<"+C+">.+?))?":"/"+L+"(?<"+C+">.+?)":"/"+L+"(?<"+C+">[^/]+?)"}function f(_,y){const x=(0,a.removeTrailingSlash)(_).slice(1).split("/"),b=u(),E={};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 p({getSafeRouteKey:b,interceptionMarker:S,segment:P[1],routeKeys:E,keyPrefix:y?r.NEXT_INTERCEPTION_MARKER_PREFIX:void 0})}else return P?p({getSafeRouteKey:b,segment:P[1],routeKeys:E,keyPrefix:y?r.NEXT_QUERY_PARAM_PREFIX:void 0}):"/"+(0,o.escapeStringRegexp)(j)}).join(""),routeKeys:E}}function m(_,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:E}=f(_,!1);let j=b?"(?:(/.*)?)":"";return{namedRegex:"^"+E+j+"$"}}}(lr)),lr}var yo;function $m(){return yo||(yo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"interpolateAs",{enumerable:!0,get:function(){return s}});const t=Om(),r=zm();function s(o,a,i){let c="";const l=(0,r.getRouteRegex)(o),u=l.groups,p=(a!==o?(0,t.getRouteMatcher)(l)(a):"")||i;c=o;const f=Object.keys(u);return f.every(m=>{let h=p[m]||"";const{repeat:_,optional:y}=u[m];let x="["+(_?"...":"")+m+"]";return y&&(x=(h?"":"/")+"["+x+"]"),_&&!Array.isArray(h)&&(h=[h]),(y||m in p)&&(c=c.replace(x,_?h.map(b=>encodeURIComponent(b)).join("/"):encodeURIComponent(h))||"/")})||(c=""),{params:f,result:c}}}(ir)),ir}var xo;function Fm(){return xo||(xo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return p}});const r=fc(),s=_c(),o=Nm(),a=Ln(),i=kn(),c=xc(),l=km(),u=$m();function p(f,m,h){let _,y=typeof m=="string"?m:(0,s.formatWithValidation)(m);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,r.searchParamsToUrlQuery)(j.searchParams),{result:C,params:I}=(0,u.interpolateAs)(j.pathname,j.pathname,S);C&&(v=(0,s.formatWithValidation)({pathname:C,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)}(tn,tn.exports)),tn.exports}var sn={exports:{}},pr={},mr={},vo;function bc(){return vo||(vo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addPathPrefix",{enumerable:!0,get:function(){return r}});const t=Ns();function r(s,o){if(!s.startsWith("/")||!o)return s;const{pathname:a,query:i,hash:c}=(0,t.parsePath)(s);return""+o+a+i+c}}(mr)),mr}var bo;function Bm(){return bo||(bo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addLocale",{enumerable:!0,get:function(){return s}});const t=bc(),r=yc();function s(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)}}(pr)),pr}var jo;function Um(){return jo||(jo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return s}});const r=kn(),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,r.normalizePathTrailingSlash)(Bm().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)}(sn,sn.exports)),sn.exports}var fr={},Co;function jc(){return Co||(Co=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")}(fr)),fr}var hr={},So;function Hm(){return So||(So=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(u,p){for(var f in p)Object.defineProperty(u,f,{enumerable:!0,get:p[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)}(hr)),hr}var on={exports:{}},an={exports:{}},Eo;function Cc(){return Eo||(Eo=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 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)}(an,an.exports)),an.exports}var Po;function qm(){return Po||(Po=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return u}});const r=g,s=Cc(),o=typeof IntersectionObserver=="function",a=new Map,i=[];function c(p){const f={root:p.root||null,margin:p.rootMargin||""},m=i.find(x=>x.root===f.root&&x.margin===f.margin);let h;if(m&&(h=a.get(m),h))return h;const _=new Map,y=new IntersectionObserver(x=>{x.forEach(b=>{const E=_.get(b.target),j=b.isIntersecting||b.intersectionRatio>0;E&&j&&E(j)})},p);return h={id:f,observer:y,elements:_},i.push(f),a.set(f,h),h}function l(p,f,m){const{id:h,observer:_,elements:y}=c(m);return y.set(p,f),_.observe(p),function(){if(y.delete(p),_.unobserve(p),y.size===0){_.disconnect(),a.delete(h);const b=i.findIndex(E=>E.root===h.root&&E.margin===h.margin);b>-1&&i.splice(b,1)}}}function u(p){let{rootRef:f,rootMargin:m,disabled:h}=p;const _=h||!o,[y,x]=(0,r.useState)(!1),b=(0,r.useRef)(null),E=(0,r.useCallback)(v=>{b.current=v},[]);(0,r.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:m})}else if(!y){const v=(0,s.requestIdleCallback)(()=>x(!0));return()=>(0,s.cancelIdleCallback)(v)}},[_,m,f,y,b.current]);const j=(0,r.useCallback)(()=>{x(!1)},[]);return[E,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)}(on,on.exports)),on.exports}var cn={exports:{}},ln={exports:{}},_r={},No;function Vm(){return No||(No=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"normalizeLocalePath",{enumerable:!0,get:function(){return t}});function t(r,s){let o;const a=r.split("/");return(s||[]).some(i=>a[1]&&a[1].toLowerCase()===i.toLowerCase()?(o=i,a.splice(1,1),r=a.join("/")||"/",!0):!1),{pathname:r,detectedLocale:o}}}(_r)),_r}var Io;function Wm(){return Io||(Io=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return r}});const r=(s,o)=>process.env.__NEXT_I18N_SUPPORT?Vm().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)}(ln,ln.exports)),ln.exports}var un={exports:{}},gr={},Ro;function Gm(){return Ro||(Ro=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"detectDomainLocale",{enumerable:!0,get:function(){return t}});function t(r,s,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(s===l||o===c.defaultLocale.toLowerCase()||(i=c.locales)!=null&&i.some(u=>u.toLowerCase()===o))return c}}}}(gr)),gr}var wo;function Km(){return wo||(wo=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 s=arguments.length,o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];if(process.env.__NEXT_I18N_SUPPORT)return Gm().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)}(un,un.exports)),un.exports}var Ao;function Xm(){return Ao||(Ao=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return o}});const r=kn(),s=process.env.__NEXT_ROUTER_BASEPATH||"";function o(a,i,c,l){if(process.env.__NEXT_I18N_SUPPORT){const u=Wm().normalizeLocalePath,p=Km().detectDomainLocale,f=i||u(a,c).detectedLocale,m=p(l,void 0,f);if(m){const h="http"+(m.http?"":"s")+"://",_=f===m.defaultLocale?"":"/"+f;return""+h+m.domain+(0,r.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)}(cn,cn.exports)),cn.exports}var dn={exports:{}},To;function Ym(){return To||(To=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return a}});const r=bc(),s=kn(),o=process.env.__NEXT_ROUTER_BASEPATH||"";function a(i,c){return(0,s.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 pn={exports:{}},Lo;function Qm(){return Lo||(Lo=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 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 p},isThenable:function(){return m}});const s="refresh",o="navigate",a="restore",i="server-patch",c="prefetch",l="fast-refresh",u="server-action";var p;(function(h){h.AUTO="auto",h.FULL="full",h.TEMPORARY="temporary"})(p||(p={}));var f;(function(h){h.fresh="fresh",h.reusable="reusable",h.expired="expired",h.stale="stale"})(f||(f={}));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)}(pn,pn.exports)),pn.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return S}});const r=Le,s=n,o=r._(g),a=Fm(),i=xc(),c=_c(),l=Ln(),u=Um(),p=jc(),f=Hm(),m=qm(),h=Xm(),_=Ym(),y=Qm(),x=new Set;function b(C,I,L,T,k,M){if(typeof window>"u"||!M&&!(0,i.isLocalURL)(I))return;if(!T.bypassPrefetchedCheck){const D=typeof T.locale<"u"?T.locale:"locale"in C?C.locale:void 0,U=I+"%"+L+"%"+D;if(x.has(U))return;x.add(U)}(async()=>M?C.prefetch(I,k):C.prefetch(I,L,T))().catch(D=>{if(process.env.NODE_ENV!=="production")throw D})}function E(C){const L=C.currentTarget.getAttribute("target");return L&&L!=="_self"||C.metaKey||C.ctrlKey||C.shiftKey||C.altKey||C.nativeEvent&&C.nativeEvent.which===2}function j(C,I,L,T,k,M,Q,D,U){const{nodeName:F}=C.currentTarget;if(F.toUpperCase()==="A"&&(E(C)||!U&&!(0,i.isLocalURL)(L)))return;C.preventDefault();const G=()=>{const H=Q??!0;"beforePopState"in I?I[k?"replace":"push"](L,T,{shallow:M,locale:D,scroll:H}):I[k?"replace":"push"](T||L,{scroll:H})};U?o.default.startTransition(G):G()}function v(C){return typeof C=="string"?C:(0,c.formatUrl)(C)}const S=o.default.forwardRef(function(I,L){let T;const{href:k,as:M,children:Q,prefetch:D=null,passHref:U,replace:F,shallow:Y,scroll:G,locale:H,onClick:Z,onMouseEnter:re,onTouchStart:le,legacyBehavior:se=!1,...ie}=I;T=Q,se&&(typeof T=="string"||typeof T=="number")&&(T=(0,s.jsx)("a",{children:T}));const z=o.default.useContext(p.RouterContext),J=o.default.useContext(f.AppRouterContext),R=z??J,W=!z,ae=D!==!1,he=D===null?y.PrefetchKind.AUTO:y.PrefetchKind.FULL;if(process.env.NODE_ENV!=="production"){let $=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 $({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 $({key:B,expected:"`string` or `object`",actual:ee})}else if(B==="locale"){if(I[B]&&ee!=="string")throw $({key:B,expected:"`string`",actual:ee})}else if(B==="onClick"||B==="onMouseEnter"||B==="onTouchStart"){if(I[B]&&ee!=="function")throw $({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 $({key:B,expected:"`boolean`",actual:ee})});const O=o.default.useRef(!1);I.prefetch&&!O.current&&!W&&(O.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&&!M){let $;if(typeof k=="string"?$=k:typeof k=="object"&&typeof k.pathname=="string"&&($=k.pathname),$&&$.split("/").some(ye=>ye.startsWith("[")&&ye.endsWith("]")))throw new Error("Dynamic href `"+$+"` 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:w}=o.default.useMemo(()=>{if(!z){const ye=v(k);return{href:ye,as:M?v(M):ye}}const[$,pe]=(0,a.resolveHref)(z,k,!0);return{href:$,as:M?(0,a.resolveHref)(z,M):pe||$}},[z,k,M]),Ne=o.default.useRef(N),q=o.default.useRef(w);let K;if(se)if(process.env.NODE_ENV==="development"){Z&&console.warn('"onClick" was passed to <Link> with `href` of `'+k+'` 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 `'+k+'` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link');try{K=o.default.Children.only(T)}catch{throw T?new Error("Multiple children were passed to <Link> with `href` of `"+k+"` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children"+(typeof window<"u"?`
1
+ "use strict";var Ud=Object.defineProperty;var Hd=(e,t,r)=>t in e?Ud(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Jt=(e,t,r)=>Hd(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),g=require("react"),A=require("./SearchPageScreening-BryoK-U4.js"),Ze=require("idb-keyval"),yt=require("zustand"),Mr=require("js-cookie"),d=require("@soma-vertical-web/core-components"),ft=require("axios"),Dr=require("@date-fns/tz"),qd=require("jose"),Nt=require("@soma-vertical-web/foundations"),rs=require("react-dom"),Ye=require("draft-js"),ca=require("react-intersection-observer"),ss=g.createContext({}),Vd=({data:e,children:t})=>n.jsx(ss.Provider,{value:{tags:e==null?void 0:e.config},children:t}),dt=()=>{const{tags:e}=g.useContext(ss),t=g.useCallback(r=>{var c,l,u,p;const s=(l=(c=e==null?void 0:e.commercial)==null?void 0:c.items)==null?void 0:l.find(f=>{var m;return(m=r??[])==null?void 0:m.find(h=>h.id===f.key)}),o=(p=(u=e==null?void 0:e.institucional)==null?void 0:u.items)==null?void 0:p.find(f=>{var m;return(m=r??[])==null?void 0:m.find(h=>h.id===f.key)}),a=e==null?void 0:e.flagPdp,i=(r==null?void 0:r.find(f=>{var m;return f.id===((m=e==null?void 0:e.flagGoldenPdp)==null?void 0:m.key)}))&&(e==null?void 0:e.flagGoldenPdp);return{commercial:s,institucional:o,flagPdp:a,flagGoldenPdp:i}},[e]);return{tags:e,getAvailableProductTag:t}},la=({gridScrollBack:e})=>{g.useEffect(()=>{typeof window<"u"&&(e!=null&&e.refer)&&sessionStorage.setItem(e==null?void 0:e.refer,"true")},[])},ua=g.createContext({}),Wd=({children:e,gridScrollBack:t})=>{const r=g.useRef(null);return la({gridScrollBack:t}),n.jsx(ua.Provider,{value:{sizesContainerRef:r},children:e})},da=()=>{const e=g.useContext(ua);if(e===void 0)throw new Error("useContext(PDPContext) must be used within a PDPProvider");return e},at=({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})},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:r,commonData:s,customData:o,promotionInfo:a,itemList:i,outsideEcommerceData:c}=e,{availableSizes:l,sizes:u,price:p}=s,f={...r==="view_item"?{currency:Ce.configs.currency,value:p,grade_disponivel:l??(u?pa(u):"")}:{},...r==="add_to_wishlist"||r==="remove_from_wishlist"?{value:p,currency:Ce.configs.currency}:{}},m=en({data:s,customData:{...o,...i,...a},configs:Ce.configs});at({event:r,data:{...c,ecommerce:{...i,...f,items:[m]}}}),typeof t=="function"&&t(m,f)},productListEvent:e=>{const{commonData:{products:t},promotionInfo:r,itemList:s,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}:s},configs:Ce.configs}));at({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:r},customData:s,supportData:{selectedSkus:o,price:a},promotionInfo:i,itemList:c,outsideEcommerceData:l}=e;let u=0;const p=r.map(f=>{var y,x,b,E,j,v,P,S,C;const m=o==null?void 0:o.find(I=>(f.productId??f.id)===I.productId);let h={...i,...c};if(m){const I=fa(),L=ha(I,m);L&&(h={...h,...L}),t==="add_to_cart"&&(i||c)&&$r({persistedData:I,type:"add",sku:(m==null?void 0:m.id)??(m==null?void 0:m.sku),newData:{promotionInfo:i,itemList:c}}),t==="remove_from_cart"&&$r({persistedData:I,type:"remove",sku:(m==null?void 0:m.id)??(m==null?void 0:m.sku)})}u+=f.price??((b=(x=(y=m==null?void 0:m.offers)==null?void 0:y.offers)==null?void 0:x[0])==null?void 0:b.price)??0;const _=(m==null?void 0:m.size)??A.getColorAndSizeFromSkuName((m==null?void 0:m.skuName)??(m==null?void 0:m.name)??((E=f.itemOffered)==null?void 0:E.skuName),Ce.configs.NAME_SPLIT_SYMBOL).size;return en({data:f,customData:{...s,...h??{...i,...c},item_sku:(m==null?void 0:m.id)??(m==null?void 0:m.sku)??((j=f.itemOffered)==null?void 0:j.sku),quantity:(s==null?void 0:s.quantity)??f.quantity??1,item_variant2:_,seller_id:(m==null?void 0:m.sellerId)??(m==null?void 0:m.seller)??((C=(S=(P=(v=m==null?void 0:m.offers)==null?void 0:v.offers)==null?void 0:P[0])==null?void 0:S.seller)==null?void 0:C.identifier)??f.seller},configs:Ce.configs})});at({event:t,data:{...l,ecommerce:{value:a??u,currency:Ce.configs.currency,items:p}}})},filterEvent:e=>{var i;const{commonData:t,customData:r,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(m=>m.key===c))==null?void 0:f.eventLabel)??c,p=(o==null?void 0:o[u])||[];u==="price_range"&&l.replace(":","-"),o[u]=[...p,l]}),Object.keys(o).forEach(c=>a[c]=o[c].join(", "))),at({event:"filter",data:{...s,...a,...r}})},viewCartEvent:e=>{var p,f,m,h,_,y,x,b,E,j;const{commonData:t,outsideEcommerceData:r}=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 en({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=(((p=s.totalizers.find(v=>v.name==="Total dos Itens"))==null?void 0:p.value)??0)/100,l=(((f=s.totalizers.find(v=>v.name==="Total dos Descontos"))==null?void 0:f.value)??0)/100,u=((m=s.marketingData)==null?void 0:m.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];at({event:"view_cart",data:{...r,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}:{},...((E=s.marketingData)==null?void 0:E.coupon)&&{sale_coupon_name:(j=s.marketingData)==null?void 0:j.coupon},subtotal:c,items:i}}})},readyEvents:e=>{const{event:t,readyData:r}=e;at({event:t,data:{...r}})}},pa=e=>e.reduce((t,r)=>(r.available&&t.push(r.value),t),[]).toString(),Gd=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]}:{}}:{}}},en=({data:e,customData:t,configs:r})=>({...Kd(e,r==null?void 0:r.MAIN_IMAGE),...Xd(e),...Yd(e),...Qd(e),...t}),ma=()=>{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("_"))??[]:[]},fa=()=>{const e=window.localStorage.getItem("persistedCartEventsData");return e?JSON.parse(e):null},ha=(e,t)=>e==null?void 0:e[t],$r=({persistedData:e,type:t,sku:r,newData:s})=>{if(!e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({[r]:s}));return}if(e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({...e,[r]:s}));return}e&&t==="remove"&&(delete e[r],window.localStorage.setItem("persistedCartEventsData",JSON.stringify(e)))},Kd=(e,t="1")=>{var a,i,c,l,u,p,f,m,h,_,y;const r=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=(p=e.itemOffered)==null?void 0:p.isVariationOf)==null?void 0:f.productGroupID),item_ref:/_\d$/.test(r)?r.slice(0,-2):r,item_name:e.productTitle??e.productName??e.name??A.splitNameAndSizeFromFullName((m=e.itemOffered)==null?void 0:m.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)}},Hs=e=>Array.isArray(e)?e.reduce((t,r)=>(r.length>t.length&&(t=r),t),""):e,Xd=e=>{var u,p;const{categories:t,categoriesIds:r}=e,s=t??((u=e.itemOffered)==null?void 0:u.categories),o=r??((p=e.itemOffered)==null?void 0:p.categoriesIds),a=Hs(s),i=Hs(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]}}},Yd=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:s}=A.getColorAndSizeFromSkuName(t,Ce.configs.NAME_SPLIT_SYMBOL);return{item_variant:r,...e.itemOffered&&{item_variant2:s}}},Qd=e=>{var l,u;const{price:t,listPrice:r,installments:s}=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},...s&&{installments:s==null?void 0:s.count,installment_value:s==null?void 0:s.value},item_currency:Ce.configs.currency}},_a=()=>{const[e,t]=ma(),[r,s]=e.split("-"),o=r.includes("shop")||r.includes("sale")?r:"";return{page_category:o&&s?s:"",page_departament:o,id:t,name:e}},Zd=Object.freeze(Object.defineProperty({__proto__:null,eventsFunctions:Ce,findDataInPersistedData:ha,getAvailablesSizes:pa,getCategories:Gd,getPageCategoryAndDepartmentFromSlug:_a,getPersistedData:fa,getProductListInfoFromHead:ma,pushDatalayer:at,updatePersistedData:$r},Symbol.toStringTag,{value:"Module"})),ga=g.createContext({}),Jd=({children:e,evtFunctionsConfigs:t})=>{const r=g.useRef({}),s=g.useRef(null),o=g.useRef(null),a=g.useRef({}),i=g.useRef({trigger:!1,index:0}),c=({functionKey:p,data:f,callBack:m,timeout:h=100})=>{window.dataLayer||(window.dataLayer=[]),Ce.configs=t;try{typeof Ce[p]=="function"&&setTimeout(()=>{var _;f.promotionInfo=r.current,(_=o.current)!=null&&_.item_list_name&&(f.itemList=o.current),Ce[p](f,m)},h)}catch(_){at({event:"error_event",data:{error_message:(_==null?void 0:_.message)??_}})}},l=({content:p})=>{c({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:p.replace("::",":")}}})},u=({updatePromotionRef:p,promotion:f,index:m})=>{p&&(r.current={...f}),c({functionKey:"readyEvents",data:{event:"select_promotion",readyData:{ecommerce:{...f,...m!==void 0&&{index:m}}}}})};return n.jsx(ga.Provider,{value:{sendDataLayerEvent:c,triggerSelectItemEventRef:i,promotionEventRef:r,currentLocalRef:s,itemListRef:o,cartProductsFullDataRef:a,handleSelectContent:l,handleSelectPromotionEvent:u},children:e})},oe=()=>g.useContext(ga),ya=g.createContext({}),ep=({children:e,productData:t,isKit:r,PDP_INFO:s,NAME_SPLIT_SYMBOL:o,TEXTURE_IMAGE:a})=>{var D,U;const{sendDataLayerEvent:i,triggerSelectItemEventRef:c}=oe(),{productId:l,productName:u,items:p,items:[{images:f,Videos:m}],description:h,["Composição"]:_="",productReference:y,categories:[x]}=t,{getAvailableProductTag:b}=dt(),E=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:C,allSizesAvailable:I}=A.getSkuInfos({items:p,NAME_SPLIT_SYMBOL:o}),L=A.getThumbImage({images:f,TEXTURE_IMAGE:a}),T=[{label:`${s.product.description}`,value:"description",content:h},{label:`${s.product.materiais}`,value:"composition",content:_}],k=((U=A.getColorAndSizeFromSkuName((D=t.items)==null?void 0:D[0].name,o))==null?void 0:U.color)??t["Cores Filtráveis"][0]??"",M=()=>({commonData:{...t,sizes:C,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}=M();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}=M();i({functionKey:"productEvents",data:{event:"select_item",commonData:F,customData:{...Y,index:c.current.index}}}),c.current.trigger=!1}Q({})},[]),n.jsx(ya.Provider,{value:{productData:t,productId:l,productName:u,productReference:y,tag:E,items:p,sizes:C,allSizesAvailable:I,installments:v,price:P,listPrice:S,thumbImage:L,images:f,video:m[0],descriptionContent:T,breadcrumbList:j,isKit:r,colorName:k,handleViewItemEvent:Q},children:e})},ke=()=>{const e=g.useContext(ya);if(e===void 0)throw new Error("useContext(PDPDataContext) must be used within a PDPDataProvider");return e},tp=()=>{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}}]},xa=()=>{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)}},[])},np=typeof window>"u",rp=(e,t)=>{const[r,s]=g.useState(()=>{if(np)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]),[r,a=>{s(i=>{const c=typeof a=="function"?a(i):a;return localStorage.setItem(e,JSON.stringify(c)),c})}]};function os(e,t,r){const[s,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]),s}const In=({callback:e,onEnterViewportOnce:t,options:r})=>{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()))},r);return a.observe(o),()=>{t&&a.unobserve(o),a.disconnect()}},[e,t,r]),{element:s}},va=({defaultScale:e=1,maxScale:t=3})=>{const r=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||!r.current)return{minX:0,maxX:0,minY:0,maxY:0};const h=r.current.getBoundingClientRect(),_=s.current.children[0].getBoundingClientRect(),y=_.width,x=_.height,b=Math.min(0,(h.width-y)/2),E=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:E,minY:j,maxY:v}},p=(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:E,y:j}=l.current,v=Math.max(_,Math.min(y,E)),P=Math.max(x,Math.min(b,j));if(h.touches.length>1){const S=h.touches[0],C=h.touches[1],I=S.pageX-C.pageX,L=S.pageY-C.pageY;i.current=Math.sqrt(I*I+L*L),c.current={x:(S.pageX+C.pageX)/2,y:(S.pageY+C.pageY)/2}}else h.touches.length===1&&(c.current={x:h.touches[0].pageX-v,y:h.touches[0].pageY-P})},[o,l]),m=g.useCallback(h=>{if(!s.current||!r.current)return;const{minX:_,maxX:y,minY:x,maxY:b}=u();if(h.touches.length>1){h.preventDefault();const E=h.touches[0],j=h.touches[1],v=E.pageX-j.pageX,P=E.pageY-j.pageY,S=Math.sqrt(v*v+P*P);if(!i.current){i.current=S;return}const C=S/i.current,I=Math.max(1,Math.min(t,o*C));if(o===I)return;a(I);const L=(E.pageX+j.pageX)/2,T=(E.pageY+j.pageY)/2;let k=L-c.current.x,M=T-c.current.y;k=Math.max(_,Math.min(y,k)),M=Math.max(x,Math.min(b,M)),l.current={x:k,y:M},i.current=S,p(k,M,I)}else if(h.touches.length===1){const E=h.touches[0].pageX,j=h.touches[0].pageY;let v=E-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},p(v,P,o)}},[t,o]);return g.useEffect(()=>(document.addEventListener("touchstart",f),document.addEventListener("touchmove",m,{passive:!1}),()=>{document.removeEventListener("touchstart",f),document.removeEventListener("touchmove",m)}),[m,f]),{containerRef:r,imgRef:s,scale:o}},sp={attachment:"ATTACHMENT",specification:"SPECIFICATION",attribute:"ATTRIBUTE"},qe=Promise.resolve(!1),zr={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:()=>({})},as=e=>e===0,ba=(e,t)=>{if(!e||e.length===0)return[];let r="";const s=[],o=e.match(/\d+/g)??[];for(const a of o){const i=t[Number(a)];i&&(r+=(r?"/":"")+i,s.push(r))}return s},ja=(e,t)=>{const{availability:r,additionalInfo:{brandName:s},bundleItems:o,id:a,uniqueId:i,detailUrl:c,ean:l,imageUrl:u,name:p,listPrice:f,quantity:m,price:h,priceDefinition:_,productCategories:y,productCategoryIds:x,productId:b,refId:E,seller:j,referenceId:v,offerings:P,productRefId:S,skuName:C,sellingPrice:I}=e;return{availability:r,bundleItems:o,referenceId:v,productRefId:S,id:a,ean:l,uniqueId:i,itemOffered:{additionalProperty:[],brand:{name:s},categories:ba(x,y),categoriesIds:x,gtin:E,image:[{alternateName:(t==null?void 0:t.MAIN_IMAGE)??"1",url:u}],name:p,isVariationOf:{name:p,productGroupID:b},sku:a,slug:c,skuName:C},listPrice:f,quantity:m,offerings:P,price:h,priceDefinition:_,sellingPrice:I,seller:j}},Ca=(e,t)=>{const r=e.map(s=>({id:s.uniqueId,quantity:s.quantity,seller:s.seller}));return Array.isArray(t)?[...r,...t]:[...r,t]},Sa=(e,t)=>{const r=e.find(s=>s.id===t);if(r){const s=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:s,filterItems:s.filter(o=>o.id!==t)}}return{updateItems:[],filterItems:[]}},Ea=(e,t,r)=>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:r,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)??""}}),Fr=(e,t)=>e.filter(r=>r.availability!=="withoutStock").findIndex(({id:r})=>r===t),op=(e,t)=>{var r;return Array.isArray(e)?(((r=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:r.value)??0)/100:0},ap=e=>{const t=e.reduce((o,a)=>{const i=as(a.price)?0:a.quantity;return o+i},0),r=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:r,subTotal:s}},ip=e=>Array.isArray(e)?e.filter(t=>t.availability!=="withoutStock").reduce((t,r)=>t+(as(r==null?void 0:r.price)?0:r.quantity),0):0,Pa=(e,t)=>{const{items:r,orderFormId:s,...o}=e;return{...o,id:s,items:Array.isArray(r)?r.map(a=>ja(a,t)):[]}},Na=(e,t)=>{const r=e.find(s=>s.id===t);return r?r.availability==="unavailableItemFulfillment":!1},cp=(e,t)=>{const r=e.sku,s=e.isVariantOf.hasVariant.find(o=>o.sku===r);return s?s.name.split(t)[1]:"--"},St=(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},lp=(e,t)=>{const r=new Set;return[e,...t].filter(s=>!r.has(s)&&r.add(s),r)},Ia=(e,t)=>t&&Array.isArray(t)&&t.find(s=>s.id===e)?Promise.resolve(e):Promise.resolve(!1),Ra=(e,t)=>t?Promise.resolve(e[t]):Promise.resolve(!1),wa=async e=>{try{const t=await e();if(typeof t!="boolean")return t}catch(t){console.error(`[Error orderForm]: ${t}`)}return!1},Aa=(e,t)=>{if(t!==-1){const r=Number(e);return r?r+1:1}return e??1},Ta=(e,t)=>Array.isArray(e)?e.filter(r=>t==null?void 0:t.some(s=>s.id===r.id)):[],La=async(e,t)=>e.then(r=>[...r??[],...t??[]]),Te=async(e,t,r,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 r?c:Pa(c,s)})},ka=(e,t,r)=>({notifications:[...e.notifications,{id:Date.now(),message:t,callback:r}]}),Oa=e=>[...Array.isArray(e)?e:[e],"faststore"],Ma=e=>{const t=e.get("utm_source")||mt("utm_source"),r=e.get("utm_campaign")||mt("utm_campaign"),s=e.get("utm_medium")||mt("utm_medium"),o=e.get("utmi_cp")||mt("utmi_cp"),a=e.get("utmi_pc")||mt("utmi_pc"),i=e.get("utmi_p")||mt("utmi_p");return{...t&&{utmSource:t},...s&&{utmMedium:s},...r&&{utmCampaign:r},...o&&{utmiCampaign:o},...a&&{utmiPart:a},...i&&{utmipage:i}}},mt=e=>{if(!e||typeof window>"u")return;const t=window.location.href;e=e.replace(/[[\]]/g,"\\$&");const r=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)"),s=r.exec(t);return s?s[2]?decodeURIComponent(s[2].replace(/\+/g," ")):"":null},Da=(e,t,r="BR")=>{const s=t,o={country:r,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]},up=Object.freeze(Object.defineProperty({__proto__:null,VALUE_REFERENCES:sp,addItemOrder:Ca,addNotification:ka,createItemOrder:ja,createNewAddress:Da,fetchCartAPI:Te,findItemIndex:Fr,findOptions:Ta,findTotalizerValue:op,getCategories:ba,getCode:St,getQuantity:Aa,getRemoveId:Ia,getSize:cp,getTotalItems:ip,getTotalizer:ap,getUrlParameter:mt,getValue:Ra,initialState:zr,isGift:as,marketingTagsBuilder:Oa,mergeOptionsPromise:La,mountMarketingData:Ma,orderFormValues:Pa,promiseDefault:qe,removeQuantity:Sa,updateItemSellerExternal:Na,updateOrderFormPromise:wa,updateQuantity:Ea,wishlistArray:lp},Symbol.toStringTag,{value:"Module"})),dp=()=>{const e=async(h,_)=>Te("/api/checkout/order-form/coupon",{body:{orderFormId:h,coupon:_}}),t=async(h,_,y={})=>{if(_){const x=_.includes(" - ")?_.split(" - ")[0]:_,b=await Te("/api/checkout/order-form/seller-code",{body:{orderFormId:h,sellerCode:x}},!0);return b instanceof Object&&y.name in b&&b[y.status]===!0?Te("/api/checkout/order-form/attachments",{body:{orderFormId:h,sellerCode:x,sellerName:b[y.name]}}).then(j=>({...j,openTextField:{...(j==null?void 0:j.openTextField)??{},statusOk:!0}})):Promise.resolve({paymentData:null,openTextField:{statusOk:!1,value:x}})}else return Te("/api/checkout/order-form/attachments",{body:{orderFormId:h,sellerCode:"",sellerName:""}})},r=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:Ca(_,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=Sa(_,y);return Te("/api/checkout/order-form/items/update",{body:{orderItems:x.updateItems,orderFormId:h}})},u=async(h,_,y,x,b,E,j)=>{var S,C;const v=j?{startDateUtc:(S=E==null?void 0:E.deliveryWindow)==null?void 0:S.startDate,endDateUtc:(C=E==null?void 0:E.deliveryWindow)==null?void 0:C.endDate}:null,P={logisticsInfo:Array.from({length:x},(I,L)=>({itemIndex:L,selectedDeliveryChannel:(E==null?void 0:E.deliveryChannel)||null,selectedSla:(E==null?void 0:E.deliveryMethod)||null,deliveryWindow:v})),selectedAddresses:b,clearAddressIfPostalCodeNotFound:!0};return Te("/api/checkout/order-form/shipping",{body:{...P,orderFormId:h,country:y,postalCode:_}})},p=async(h,_,y)=>Te("/api/checkout/order-form/shipping/update",{body:{orderFormId:h,options:_,selectedAddresses:y}}),f=async(h,_,y,x)=>{const b=Ea(_,y,x);return Te("/api/checkout/order-form/items/update",{body:{orderFormId:h,orderItems:b}})};return{addCoupon:e,addItem:s,addSellerCode:t,addMarketingData:r,giftItem:o,emptyCart:a,getOrderForm:i,insertProfileEmail:c,removeItem:l,shipping:u,shippingUpdate:p,updateItemQuantity:async(h,_,y,x,b)=>f(h,_,y,x).then(E=>E&&Array.isArray(E.items)?Na(E.items,y)?f(h,_,y,b):E:!1)}},Br="soma::cart",Dt="soma::options",_t=yt.create((e,t)=>{const r=dp(),s=async(o,a,i)=>{e({loading:!0});const c=await wa(o);if(typeof c!="boolean"){e({...c});const l=await La(Ze.get(Dt),i);return Ze.set(Dt,l),Ra(c,a).finally(()=>e({loading:!1,options:l}))}return qe};if(typeof window<"u"){const o=async a=>{if(a){const i=await Ze.get(Dt).then(u=>Ta(u,a.items));Ze.set(Br,a),Ze.set(Dt,i),e({...a,options:i});const c=new URLSearchParams(window.location.search),l=c.get("utm_campaign")||c.get("utmi_campaign")||"";l&&s(()=>r.addSellerCode(t().id,l.toUpperCase()),"openTextField")}};return Ze.get(Br).then(a=>r.getOrderForm(a?a.id:"").then(o)),{...zr,addCoupon:async a=>s(()=>r.addCoupon(t().id,a),"marketingData"),addItem:(a,i)=>{s(()=>r.addItem(t().id,t().items,a),"items",i)},addSellerCode:async(a,i)=>s(()=>r.addSellerCode(t().id,a,i),"openTextField"),addMarketingData:async a=>s(()=>r.addMarketingData(t().id,a),"marketingData"),emptyCart:()=>{s(()=>r.emptyCart(t().id))},removeItem:async a=>{const i=await s(()=>r.removeItem(t().id,t().items,a),"items");return Ia(a,i)},shipping:async(a,i="BR")=>s(()=>r.shipping(t().id,a??"",i,t().items.length,Da(a??"",null,i)),"shippingData"),shippingUpdate:async a=>s(()=>{var i;return r.shippingUpdate(t().id,a,(i=t().shippingData)==null?void 0:i.selectedAddresses)},"shippingData"),toggleServiceToProduct:async(a,i,c)=>s(()=>r.giftItem(t().id,a,i,c),"items"),updateItemQuantity:async(a,i,c)=>{const{id:l,items:u}=t();return s(()=>{var p;return r.updateItemQuantity(l,u,a,i,((p=u.find(f=>f.id===a))==null?void 0:p.quantity)??1)},"items",c?[c]:void 0)},insertProfileEmail:async a=>s(()=>r.insertProfileEmail(t().id,a),"clientProfileData"),setIsOpen:a=>e({isOpen:a})}}return zr}),pp=()=>_t(e=>e),$a=yt.create(e=>({notifications:[],actions:{addNotification:(t,r)=>e(s=>ka(s,t,r)),removeNotification:t=>e(r=>({notifications:r.notifications.filter(s=>s.id!==t)}))}})),is=()=>$a(e=>e.notifications),cs=()=>$a(e=>e.actions),mp=Object.freeze(Object.defineProperty({__proto__:null,KEY_INDEXED_OPTIONS:Dt,KEY_INDEXED_STORE:Br,useCartStore:_t,useGetCartStoreState:pp,useGetNotificationActions:cs,useGetNotificationsStore:is},Symbol.toStringTag,{value:"Module"})),fp=6e3,za=g.createContext({}),Fa=({children:e,...t})=>{const{items:r}=_t(),[s,o]=g.useState([]),a=g.useRef(null),i=g.useMemo(()=>Array.isArray(s)&&s.length>0?s.map(c=>r.find(l=>l.id===c.id)).filter(c=>c!==void 0):[],[r,s]);return g.useEffect(()=>{s.length&&(clearTimeout(a.current??0),a.current=setTimeout(()=>{o([])},fp))},[s]),n.jsx(za.Provider,{value:g.useMemo(()=>({...t,setRecentlyAdded:o,recentlyAddedProducts:i}),[t,o,i]),children:e})},qt=()=>{const e=g.useContext(za);if(e===void 0)throw new Error("useUIContext must be used within a UIProvider");return e};class Ba{constructor(){Jt(this,"events",{});Jt(this,"prevData",{})}subscribe(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),()=>{this.events[t]=this.events[t].filter(s=>s!==r)}}publish(t,r){this.events[t]&&this.events[t].forEach(s=>{this.prevData[t]=r,s(r)})}}const Ua=g.createContext({}),hp=({children:e,headerConfigs:t,pathname:r,...s})=>{const[o,a]=g.useState(!0),[i,c]=g.useState(!1),l=r==="/",u=g.useRef(new Ba),p=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=p(l),m=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"))&&(Mr.get("lastMedias")||Mr.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=p(l);u.current.publish("header:change_variant",h.headerVariant),u.current.publish("header:change_position",h.position),m.current=h},[l]),n.jsx(Ua.Provider,{value:{isMobile:o,mediatorRef:u,currentHeaderConfigsRef:m,deviceValidated:i,...s},children:n.jsx(Fa,{children:e})})},ne=()=>g.useContext(Ua),Ha=g.createContext({}),_p=({children:e,...t})=>n.jsx(Ha.Provider,{value:{...t},children:e}),ce=()=>g.useContext(Ha),xt=(e,t)=>yt.create(r=>{const s=()=>r({value:e});return t&&t instanceof Set&&t.add(s),{value:e,actions:{setValue:o=>r({value:o}),reset:s}}}),Ut={category:null,menuMobileIsOpen:!1,searchModalIsOpen:!1,userMenuIsOpen:!1},Vt=new Set,gp=()=>{Vt.forEach(e=>{e()})},qa=yt.create((e,t)=>{const r=()=>e({value:Ut.category});return Vt.add(r),{value:Ut.category,actions:{reset:r,setValue:s=>e(()=>({value:s})),updateValue:s=>{t().value!==s&&e({value:s})}}}}),Va=()=>qa(e=>e.value),Wt=()=>qa(e=>e.actions),Wa=xt(Ut.menuMobileIsOpen,Vt),Ga=()=>Wa(e=>e.value),Ka=()=>Wa(e=>e.actions),Xa=xt(Ut.searchModalIsOpen,Vt),Ya=()=>Xa(e=>e.value),Rn=()=>Xa(e=>e.actions),Qa=xt(Ut.userMenuIsOpen,Vt),ls=()=>Qa(e=>e.value),us=()=>Qa(e=>e.actions),yp=Object.freeze(Object.defineProperty({__proto__:null,resetAllHeaderStores:gp,useActionsHeaderCategory:Wt,useActionsMenuMobileIsOpen:Ka,useActionsSearchModalIsOpen:Rn,useActionsUserMenuIsOpen:us,useGetHeaderCategoryStore:Va,useGetMenuMobileIsOpen:Ga,useGetSearchModalIsOpen:Ya,useGetUserMenuIsOpen:ls},Symbol.toStringTag,{value:"Module"})),wt={selectedSkuInfo:{productId:"",name:"",size:"",sku:"",sellerId:"",sellerName:"",available:!1,quantity:1},openLetMeKnow:!1,openMeasurements:!1,showBottomNavigation:!1,showNotify:!1},Tt=new Set,xp=()=>{Tt.forEach(e=>{e()})},Za=yt.create(e=>{const t=()=>e({value:wt.selectedSkuInfo});return Tt.add(t),{value:wt.selectedSkuInfo,actions:{setValue:r=>e(s=>({value:{...s,...r}})),reset:t}}}),Gt=()=>Za(e=>e.value),Ja=()=>Za(e=>e.actions),ei=xt(wt.openLetMeKnow,Tt),vp=()=>ei(e=>e.value),bp=()=>ei(e=>e.actions),ti=xt(wt.showNotify,Tt),ni=()=>ti(e=>e.value),ds=()=>ti(e=>e.actions),ri=xt(wt.showBottomNavigation,Tt),jp=()=>ri(e=>e.value),Cp=()=>ri(e=>e.actions),si=xt(wt.openMeasurements,Tt),oi=()=>si(e=>e.value),ai=()=>si(e=>e.actions),Sp=Object.freeze(Object.defineProperty({__proto__:null,resetAllPDPStores:xp,useActionsPDPOpenLetMeKnow:bp,useActionsPDPOpenMeasurements:ai,useActionsPDPSelectedSkuInfo:Ja,useActionsPDPShowBottomNavigation:Cp,useActionsPDPShowNotify:ds,useGetPDPOpenLetMeKnow:vp,useGetPDPOpenMeasurements:oi,useGetPDPSelectedSkuInfo:Gt,useGetPDPShowBottomNavigation:jp,useGetPDPShowNotify:ni},Symbol.toStringTag,{value:"Module"})),qs={feedback:{active:!1,action:"add"},list:[]},ps=yt.create((e,t)=>({value:qs,actions:{reset:()=>e({value:qs}),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:""}}}))}})),Lt=()=>ps(e=>e.value.list),ms=()=>ps(e=>e.value.feedback),vt=()=>ps(e=>e.actions),Ep=Object.freeze(Object.defineProperty({__proto__:null,useActionsWishlistStore:vt,useGetWishlistFeedbackStore:ms,useGetWishlistStore:Lt},Symbol.toStringTag,{value:"Module"})),ii=g.createContext({}),Pp=({children:e,headerData:t,...r})=>{var p,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(p=l.current)==null||p.subscribe("header:change_variant",m=>{var b,E,j;if(m&&u.current&&(u.current.bannerVariant=m),!s.current)return;const _=document.body.scrollTop>0,y=s.current.getAttribute("data-interactiveVariant"),x=_?y:m??((b=u.current)==null?void 0:b.bannerVariant)??"default";x!==((E=u.current)==null?void 0:E.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",m=>{s.current&&(s.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 s.current&&(s.current.addEventListener("click",_,{signal:m.signal}),s.current.addEventListener("touchend",_,{signal:m.signal})),()=>{m.abort()}},[]),n.jsx(ii.Provider,{value:{headerData:t,structureRef:o,rootRef:s,tipbarRef:a,userMenuMobileRef:i,userMenuDesktopRef:c,...r},children:e})},Ee=()=>g.useContext(ii),ci=g.createContext({}),li=({children:e,...t})=>n.jsx(ci.Provider,{value:g.useMemo(()=>t,[t]),children:e}),fs=()=>{const e=g.useContext(ci);if(e===void 0)throw new Error("useMenuMobileContext must be used within a MenuMobileProvider");return e},Np=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},Ip=(e,t,r)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const s=t.getBoundingClientRect(),o=e.getBoundingClientRect(),a=e!=null&&e.parentElement?Np(e==null?void 0:e.parentElement):0;return{left:s.left+s.width/2-(o.width+a),top:s.top+s.height+r}},ui=g.createContext({}),di=({children:e,delay:t=600,gap:r=20,...s})=>{const[o,a]=g.useState(!1),i=g.useRef(null),[c,l]=g.useState(!1),[u,p]=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 m=window.document.querySelector("#cart-button"),h=window.document.querySelector("#add-to-cart--tooltip");if(m&&h){const{left:_,top:y}=Ip(h,m,r??0);p({left:_,top:y}),l(!1)}},[r,o]),n.jsx(ui.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})},bt=()=>{const e=g.useContext(ui);if(e===void 0)throw new Error("useAddToCartContext must be used within a AddToCartProvider");return e},pi=g.createContext({}),Rp=({children:e,SELLER_CODE_VALIDATION_KEYS:t,CARTPROVIDER_MESSAGE_PRODUCT_REMOVE:r,data:s,...o})=>{var re,le,se,ie;const a=_t(),{setRecentlyAdded:i}=qt(),c=g.useRef(""),l=is(),{addNotification:u,removeNotification:p}=cs(),[f,m]=g.useState(null),{addCoupon:h,addItem:_,addSellerCode:y,addMarketingData:x,emptyCart:b,isOpen:E,removeItem:j,shipping:v,shippingUpdate:P,toggleServiceToProduct:S,updateItemQuantity:C}=a;g.useEffect(()=>{(async()=>{var R,W;if(!a.id||!((W=(R=s==null?void 0:s.promotion)==null?void 0:R.promotionCart)!=null&&W.idPromotion))return;const{data: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());m(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 $=Mr.get("lastMedias");if(a.id&&$&&c.current!==$){c.current=$;const J=new URLSearchParams($),R=Ma(J);x(R)}},[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 St((N==null?void 0:N[0])??"",$,!!ae)}return St(String(W.coupon),$,!0)}return St("","")}).catch(()=>Promise.resolve({code:400})),[h,y]),L=g.useCallback(($,J,R)=>{const{id:W}=$;C(W,J,R)},[C]),T=g.useCallback(($,J,R=!1)=>{if(!$)return;const{id:W}=$,ae=Fr(a.items,W);if(ae!==-1&&!R){const he=Number(a.items[ae].quantity),N=a.items[ae]?he+1:1;L($,N,J)}else _({id:W,quantity:($==null?void 0:$.quantity)??1,seller:$.seller});E||i(he=>[...he,$])},[_,L,a.items,E,i]),k=g.useCallback(($,J)=>{if(!$||!Array.isArray($))return;i(W=>[...W,...$]);const R=$.map(W=>{const{id:ae,quantity:he,seller:N}=W,w=Fr(a.items,ae),Ne=Aa(he??1,w);return{id:ae,quantity:Ne,seller:N}});_(R,J)},[_,a.items,i]),M=g.useCallback(async($,J,R)=>$?j($).then(()=>(u(J??`${r}`,R),St($,$))):Promise.resolve(St("","Product id required")),[u,j]),Q=g.useCallback(()=>{a.items.length>0&&b()},[b,a.items]),D=g.useCallback(($,J="BRA")=>v($,J),[v]),U=g.useCallback($=>{$&&P($)},[P]),F=g.useCallback(async($,J,R=!1)=>{const W=a.items.findIndex(he=>he.uniqueId===$);return a.items[W]&&W>=0?S(J,W,R):!1},[a.items,S]),Y=g.useCallback(async($,J)=>C($,J).then(R=>{if(Array.isArray(R)){const W=R.find(ae=>ae.id===$);if(W&&(W==null?void 0:W.quantity)<J)return String(W.quantity)}return!1}),[C]),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 n.jsx(pi.Provider,{value:g.useMemo(()=>({...o,data:s,addCouponSeller:I,addToCart:T,addItemsToCart:k,cartStore:a,notifications:l,clearCart:Q,addNotification:u,isOpen:a.isOpen,removeNotification:p,removeToCart:M,setIsOpen:a.setIsOpen,shipping:D,shippingUpdateOption:U,toggleGiftItemCart:F,updateItemQuantity:Y,removeCoupon:G,removeSellerCode:H,removeCEP:Z,promotionRules:f,setPromotionRules:m}),[o,s,I,T,k,l,Q,u,a,p,M,D,U,F,Y,G,H,Z,f,m]),children:e})},ve=()=>{const e=g.useContext(pi);if(e===void 0)throw new Error("useCartContext must be used within a CartProvider");return e},mi=g.createContext({}),hs=({children:e,fetch:t})=>{const r=g.useRef(!0),[s,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]),n.jsx(mi.Provider,{value:g.useMemo(()=>({data:s,isLoading:r.current??!1,isError:a}),[s,a,r]),children:e})},_s=()=>{const e=g.useContext(mi);if(e===void 0)throw new Error("useProductsContext must be used within a useRootContext");return e},fi=g.createContext({}),gs=({children:e,sort:t,state:r,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=r.base)!=null&&u.length?r.base.slice(1).split("/").map((p,f)=>({key:`category-${f+1}`,value:p})):[]},[r.base,o]);return n.jsx(fi.Provider,{value:g.useMemo(()=>({state:{...r,facets:[...l,...r.facets??[]]},sort:t,count:s??c,searchParams:i}),[l,s,t,r,i]),children:e})},ze=()=>{const e=g.useContext(fi);if(e===void 0)throw new Error("useSearchContext must be used within a SearchProvider");return e},hi=g.createContext({}),wp=({children:e,...t})=>n.jsx(hi.Provider,{value:t,children:e}),Me=()=>{const e=g.useContext(hi);if(e===void 0)throw new Error("usePLPConstants must be used within a PLPConstantsProvider");return e},_i=g.createContext({}),Ap=({children:e,selectedFacets:t})=>{const{data:r,...s}=_s(),{router:o}=ce(),{searchParams:a,PLP_SORT_DEFAULT:i}=Me(),c=g.useCallback((m,h)=>{if(h){if(m.key.toLocaleLowerCase()==="price"){const _=h.getAll("facets");h.delete("facets"),_.forEach(y=>{const[x]=y.split("/");x!==m.key&&h.append("facets",y)})}h.set("page","1"),h.append("facets",`${m.key}/${m.value}`),o.push(`?${h.toString()}`)}},[o]),l=g.useCallback(()=>{const m=new URLSearchParams;m.set("sort",i),m.set("page","1"),o.push(`?${m.toString()}`)},[o]),u=g.useCallback((m,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!==m.key||b!==m.value)&&h.append("facets",y)}),o.push(`?${h.toString()}`)},[o]),p=g.useCallback(m=>{const h=a?new URLSearchParams(a):new URLSearchParams;for(const[,_]of h.entries()){const[y,x]=_.split("/");if(y===m.key&&x===m.value)return u(m,h)}return c(m,h)},[c,u,a]),f=g.useCallback(m=>{const h=a?new URLSearchParams(a):new URLSearchParams;h.set("sort",m.replace("_",":")),o.push(`?${h.toString()}`)},[o,a]);return n.jsx(_i.Provider,{value:g.useMemo(()=>({...s,breadcrumb:r&&"breadcrumb"in r?r==null?void 0:r.breadcrumb:[],deleteAllFacets:l,facets:r&&"facets"in r?r==null?void 0:r.facets:[],selectedFacets:t,onToggleFacet:p,onSort:f,searchParams:a}),[r,l,f,p,s,t,a]),children:e})},gi=({children:e,forceUpdate:t})=>{const{state:r}=ze();return n.jsx(hs,{fetch:()=>fetch("/api/search/facets",{method:"POST",body:JSON.stringify({...r,forceUpdate:t}),priority:"low"}),children:n.jsx(Ap,{selectedFacets:(r==null?void 0:r.facets)??[],children:e})})},yi=()=>{const e=g.useContext(_i);if(e===void 0)throw new Error("useFacetsContext must be used within a FacetsProvider");return e},Mt={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"}},Tp={nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"0",count:0,total:0},Lp="Imagem do produto",Vs=1,kp="Sair",Op=e=>e.exit,Ws=({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"}],Mp=(e,t)=>{const r=(t??"").split("@")[0];return e?`Olá${r.length?", ":" "}${r}!`:"Olá!"},Dp=e=>"Seja bem vindo!",$p="Marque a caixa para aceitar os termos de política de privacidade.",zp="Algumas informações estão incorretas ou não foram preenchidas",Fp="Enviar",xi=g.createContext({}),Bp=({children:e})=>{const{data:t,...r}=_s(),[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]),n.jsx(xi.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:Tp,total:s}),[t,r,s]),children:e})},ys=({children:e,query:t,forceUpdate:r})=>{const{count:s,state:o}=ze(),a={...o,count:s};return n.jsx(hs,{fetch:()=>fetch("/api/search/product",{method:"POST",body:JSON.stringify({...a,query:t,forceUpdate:r,facets:o.facets??[]})}),children:n.jsx(Bp,{children:e})})},Kt=()=>{const e=g.useContext(xi);if(e===void 0)throw new Error("useProductsContext must be used within a ProductsProvider");return e},vi=g.createContext({}),Up=({children:e,slug:t,searchParams:r,collectionId:s,brand:o,itemsPerPage:a=24,PLP_SORT_DEFAULT:i})=>{const{pathname:c}=ce(),l=g.useRef(""),[u,p]=g.useState(!1),f=g.useMemo(()=>{const h=new URL(c,"http://localhost"),_=(r==null?void 0:r.getAll("facets"))??[],y=(r==null?void 0:r.get("page"))??"1",x=(r==null?void 0:r.get("sort"))??(s?"":i);return h.searchParams.set("page",String(y)),h.searchParams.set("sort",String(x)),r!=null&&r.get("query")?(h.searchParams.set("query",r.get("query")),h):(h.searchParams.set("base",Array.isArray(t)?t.join("/"):t),h.searchParams.set("facets",_.join(",")),h)},[s,c,r,t]),m=g.useMemo(()=>{if(Array.isArray(r==null?void 0:r.getAll("facets")))return A.parseSearchState(f,r.getAll("facets")??[""]);const h=(r==null?void 0:r.getAll("facets"))??[];return A.parseSearchState(f,h)},[f,r]);return g.useEffect(()=>{l.current!==c&&(l.current=c,window.document.body.scrollTo(0,0))},[c]),n.jsx(vi.Provider,{value:g.useMemo(()=>({openFilters:u,setOpenFilters:p}),[u,p]),children:n.jsx(gs,{ITEMS_PER_PAGE:a,searchParams:r??new URLSearchParams,state:g.useMemo(()=>({...m}),[m]),collectionId:s,brand:o,children:e})})},xs=()=>{const e=g.useContext(vi);if(e===void 0)throw new Error("usePLPContext must be used within a PLPProvider");return e},bn=(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)=>bn(o,t[a]));if(Array.isArray(t))return!1;const r=Object.keys(e),s=Object.keys(t);return r.length!==s.length?!1:r.every(o=>Object.prototype.hasOwnProperty.call(t,o)&&bn(e[o],t[o]))},bi=(e,t,r="page")=>Object.keys(t).some(s=>s===r?!1:!bn(t[s],e[s])),Ur=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},ji=()=>({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}}}),Ci=(e,t,r,s=24)=>{const o=new Set,a=[];if(!Array.isArray(e)||e.length===0)return{taken:o,placedBanners:a};const i=t*s*r;for(const c of e){let l=Number(c.position_grid),u=!1;for(;l<i;){const p=l%r;if(p+c.columns>r){l+=r-p;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}},Hr=(e,t,r,s=24)=>{const{placedBanners:o,taken:a}=Ci(e??[],t,r),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}},yn=(e,t,r=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:vs(),products:t!=null&&t.products.length&&e===a?t==null?void 0:t.products:Array.from({length:r},()=>ji())}}),Si=(e,t)=>[...e,{loading:!1,page:t,pagination:vs(),products:[]}],vs=()=>({nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"1",count:1,total:1}),Hp=(e,t,r,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=r[c];return t.filter((u,p)=>{const f=s[p];return f<=l||o>i&&f>l})},Ei=(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 s=[];for(const[,o]of r){const a=o[Math.floor(Math.random()*o.length)];s.push(a)}return s},Pi=(e,t)=>{if(!e)return[];const r=e.map((s,o)=>s.video&&s.video!==""?o:null).filter(s=>s);return Ei(r,t)},Ni=e=>Array.isArray(e)?e.map((t,r)=>({href:`/${e.slice(0,r+1).join("/")}`,name:t})):[],qp=Object.freeze(Object.defineProperty({__proto__:null,createBreadcrumb:Ni,createPage:Si,createPages:yn,createPagination:vs,createProduct:ji,deepEqual:bn,fetchPage:Ur,getBanners:Ci,getPositions:Hr,getProductsWithVideo:Pi,getRandomVideoPerRow:Ei,getVisibleBanners:Hp,hasStateChangedExceptPage:bi},Symbol.toStringTag,{value:"Module"})),Vp=50,Wp=yt.create((e,t)=>{const r=i=>Math.min(i,Vp),s=async(i,c)=>{const l=r(i.page);try{const u=await Ur({...i,page:l});o(l,p=>c?c(p,u):{...p,...u})}catch(u){console.error(`[PDC - SCROLL INFINITE FAILED TO FETCH PAGE ${l}]: ${u}`),o(l,p=>({...p,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,m,h;const p=r(Number(i==null?void 0:i.page));e({...c,pages:yn(p,void 0,u)});try{const _=await Ur({...i,page:p});if(_){if(!_.products.length&&((f=_==null?void 0:_.pagination)==null?void 0:f.total)<p){a({...i,page:(m=_==null?void 0:_.pagination)==null?void 0:m.total},l),e({pages:yn((h=_==null?void 0:_.pagination)==null?void 0:h.total)});return}typeof l=="function"&&l(_),e({load:!0,pages:yn(p,_),total:Number(_.pagination.count)})}}catch(_){console.error(`[PDC - SCROLL INFINITE TO CREATE PAGES]: page ${p} ${_}`)}},addPage:(i,c,l)=>{const{pages:u}=t(),p=r(i==null?void 0:i.page);u.some(f=>f.page===p)||(e({...c,pages:Si(u,p)}),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)}}}),Gp=(e,t,r,s=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 p;return(p=u.node)==null?void 0:p.video});for(let u=0;u<c.length;u++){const p=i+u,f=s+p,m=t.find(_=>_.position_grid===f+1),h=f+o+1;m&&(o+=m.columns),a.push({position:h,canPlayVideo:u===l})}}return a},Ii=(e,t,r)=>{const s=(t-1)*r,o=t*r;return e>=s&&e<=o},wn=e=>{var t;return(t=e==null?void 0:e.map(r=>({disable:A.disableSKU(r),size:A.getSKUName(r),skuID:"sku"in r&&r.sku})))==null?void 0:t.filter(r=>r.disable)},Kp=Object.freeze(Object.defineProperty({__proto__:null,createGridPosAndVideo:Gp,getSkusNotify:wn,isPositionInCurrentPage:Ii},Symbol.toStringTag,{value:"Module"})),Ri=({isMobile:e,ICONS:t,NOTIFY_INFO:r})=>n.jsxs(n.Fragment,{children:[n.jsx(d.Modal.Controls,{navigation:e?"top":"middle",isMobile:e??!1,children:!e&&n.jsxs(n.Fragment,{children:[n.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),n.jsx(d.Button,{"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})}),n.jsx(d.Modal.Title,{navigation:e?"top":"middle",title:r.title})]});Ri.displayName="Notify.Controls";const Xe={"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 wi(e){const r=decodeURIComponent(window.document.cookie).split(";");for(const s of r){const[o,a]=s.trim().split("=");if(o===e)return a}}function bs(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}const Xp=()=>{const{sendDataLayerEvent:e}=oe(),{user:t}=kt(),{cartStore:r}=ve();return g.useEffect(()=>{if(!t)return;(async()=>{const{userId:o,email:a,firstName:i,lastName:c,phone:l,homePhone:u,postalCode:p,street:f,number:m,city:h,gender:_}=t,y=new TextEncoder().encode(o),x=await crypto.subtle.digest("SHA-256",y),E=Array.from(new Uint8Array(x)).map(j=>j.toString(16).padStart(2,"0")).join("");e({functionKey:"readyEvents",data:{readyData:{user_id:E,email:a,first_name:i,last_name:c,phone:l||u,zip:p,street:f,street_number:m,city:h,gender:_,orderform_id:r==null?void 0:r.id}}})})()},[t,r.id]),null},Ai=g.createContext({amount:null,boxes:null,toExpire:null,loading:!0,logout:()=>null,getCurrentCredits:()=>({credits:0,cashback:0})}),Yp=({children:e,AUTH_TOKEN_COOKIE:t})=>{var p;const{shipping:r,cartStore:s}=ve(),[o,a]=g.useState({amount:null,boxes:null,toExpire:null,loading:!0}),i=g.useCallback(async()=>{try{await fetch("/api/user",{priority:"low"}).then(f=>f.json()).then(f=>{const{userCredits:m,...h}=f,{wishlist:_,...y}=h;a({amount:m==null?void 0:m.amount,boxes:m==null?void 0:m.boxes,toExpire:m==null?void 0:m.toExpire,user:y,loading:!1,wishlist:(typeof _=="string"?_.split(","):_)??[]})})}catch(f){console.error("my credits request",f),a({...o,loading:!1})}},[a]),c=g.useCallback(()=>{bs(t),i()},[i]),l=g.useCallback(()=>o.boxes?o.boxes.reduce((f,m)=>m.gift_card_box.refid==="C1643"?(f.cashback+=m.amount,f):(f.credits+=m.amount,f),{cashback:0,credits:0}):{cashback:0,credits:0},[o]),u=g.useCallback(async()=>{var f,m,h;if((f=o.user)!=null&&f.postalCode&&(s!=null&&s.id)&&!(s!=null&&s.loading)&&!((h=(m=s==null?void 0:s.shippingData)==null?void 0:m.address)!=null&&h.postalCode))try{await r(o.user.postalCode)}catch(_){console.error("Error auto-filling CEP:",_)}},[(p=o.user)==null?void 0:p.postalCode]);return g.useEffect(()=>{i()},[i]),g.useEffect(()=>{u()},[u]),n.jsxs(Ai.Provider,{value:g.useMemo(()=>({...o,getCurrentCredits:l,logout:c}),[o,l,c]),children:[n.jsx(Xp,{}),e]})},kt=()=>{const e=g.useContext(Ai);if(e===void 0)throw new Error("useContext(SessionContext) must be used within a SessionProvider");return e},Ti=({color:e,delay:t=3e3,sku:r,setStatus:s,setIsLoading:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i})=>{const c=g.useRef(null),[l,u]=g.useState(null),{sendDataLayerEvent:p}=oe(),{user:f}=kt(),m=f!=null&&f.firstName?`${f==null?void 0:f.firstName} ${f==null?void 0:f.lastName}`:"";return n.jsx("div",{className:Xe["notify--form"],children:n.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:m,email:y,sku:r==null?void 0:r.skuID})}).then(b=>s(b.ok)).finally(()=>{o(!1),_.reset(),p({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),s(null)},t)})},children:[n.jsx(d.TextField.Structure,{input:n.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?n.jsx(d.TextField.SupportText,{text:a.messages.invalid_email,feedback:"error"}):n.jsx(n.Fragment,{})}),n.jsx(d.Button,{disabled:!(l===!1||!r)||!r,type:"submit",size:"large",children:i.button})]})})};Ti.displayName="Notify.Form";const Li=({isLoading:e=!1})=>n.jsx("div",{className:Xe["notify--loading"],"data-loading":e,children:n.jsx(d.Spinner,{})});Li.displayName="Notify.Loading";const js={"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"},ki=({children:e,...t})=>n.jsx("div",{...t,className:js["product-variation-list--list"],children:e});ki.displayName="ProductVariationList.List";const Oi=({fill:e="#1352C7",src:t="",type:r="size",text:s,...o})=>{const{nextimage:a}=ce();return r==="size"?n.jsxs(d.ToggleSize.Wrapper,{...o,size:"large",variation:"ghost",children:[n.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-size"}),n.jsx(d.ToggleSize.Text,{children:s})]}):n.jsxs(d.ToggleStyle.Wrapper,{...o,size:"small",title:"wrapper-texture",children:[n.jsx(d.ToggleStyle.DisabledAdornment,{title:"disabled-adornment-texture"}),r==="color"?n.jsx(d.ToggleStyle.Color,{background:e,title:"color"}):n.jsx(d.ToggleStyle.Texture,{title:"texture",children:n.jsx(a,{alt:s??"image",height:40,src:t,width:40})})]})};Oi.displayName="ProductVariationList.Option";const Mi=({children:e,...t})=>n.jsx("div",{className:js["product-variation-list"],...t,children:e});Mi.displayName="ProductVariationList.Root";const Di=({children:e,title:t,...r})=>n.jsxs("div",{...r,className:js["product-variation-list--title"],children:[t?n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.SectionWrapper,{children:n.jsx("p",{children:t})})}):n.jsx(n.Fragment,{}),e]});Di.displayName="ProductVariationList.Title";const Qe={List:ki,Option:Oi,Title:Di,Root:Mi},Qp=(e,t)=>{if(!e||!t)return!1;const r=Object.keys(e);return r.length!==Object.keys(t).length?!1:r.every(s=>e[s]===t[s])},$i=({children:e,label:t="",skus:r,sku:s,setSku:o})=>n.jsxs(n.Fragment,{children:[n.jsx("div",{className:Xe["notify--selector--header"],children:e}),n.jsxs(Qe.Root,{className:Xe["notify--selector"],children:[n.jsx(Qe.Title,{title:t}),n.jsx(Qe.List,{children:Array.isArray(r)&&r.map((a,i)=>{const c=Qp(s,a);return n.jsx(Qe.Option,{active:c,onClick:()=>o(c?null:a),text:String(a.size),type:"size"},i)})})]})]});$i.displayName="Notify.Selector";const Gs=({type:e,icon:t,title:r,subtitle:s})=>n.jsx("div",{className:Xe[`notify--status--${e}`],children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:t,size:"large"})},children:n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h2",{children:r}),n.jsx("h3",{children:s})]})})}),zi=({status:e,ICONS:t,PRODUCT_CARD_TEXTS:r})=>n.jsxs("div",{className:Xe["notify--status"],"data-status":e,children:[n.jsx(Gs,{...r.success,icon:t.check_circle,type:"success"}),n.jsx(Gs,{...r.error,icon:t.alert_circle,type:"error"})]});zi.displayName="Notify.Status";const Cs=({color:e,open:t,setVisible:r,skus:s,sku:o,setSku:a,ICONS:i,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l,PRODUCT_CARD_TEXTS:u,Z_INDEX_WAR:p})=>{const[f,m]=g.useState(!1),[h,_]=g.useState(null),{isMobile:y}=ne();return n.jsxs(d.Modal.Root,{isMobile:y??!1,isOpen:t,setIsOpen:r,variant:y?"sideBottom":"sideLeft",style:{zIndex:p.modal},className:Xe["modal-modifier"],children:[n.jsx(d.Modal.Header,{navigation:"top",className:Xe["notify--header-modifier"],children:n.jsx(Ri,{isMobile:y??!1,ICONS:i,NOTIFY_INFO:l})}),n.jsxs(d.Modal.Body,{className:Xe["notify--modal--body"],children:[n.jsxs("div",{className:Xe["notify--container"],children:[n.jsxs($i,{label:l.selector_label,sku:o,skus:s,setSku:a,children:[n.jsx("p",{children:l.subtitle}),n.jsx("span",{children:l.description})]}),n.jsx(Ti,{delay:4e3,sku:o,setStatus:_,setIsLoading:m,color:e,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l}),n.jsx(Li,{isLoading:f}),n.jsx("div",{className:Xe["notify--selector--header"],children:n.jsx("span",{children:l.legal})})]}),n.jsx(zi,{status:h,ICONS:i,PRODUCT_CARD_TEXTS:u})]})]})};Cs.displayName="Notify";const An=({skus:e,ICONS:t,NEWSLETTER_CONFIGS:r,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:a,...i})=>{const c=wn(e??[]);return n.jsx(Cs,{skus:c,ICONS:t,NEWSLETTER_CONFIGS:r,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:a,...i})};An.displayName="PDC.Notification";const Fi=g.createContext({}),Bi=({banners:e,children:t})=>{const{searchParams:r,ITEMS_PER_PAGE:s,ICONS:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l}=Me(),{router:u}=ce(),{sendDataLayerEvent:p}=oe(),{isMobile:f}=ne(),{state:m}=ze(),{addPage:h,createPages:_,updateProducts:y,...x}=Wp(),b=f?8:16,E=f?2:4,j=g.useRef(!1),v=g.useRef(m),[P,S]=g.useState(!1),[C,I]=g.useState(null),[L,T]=g.useState([]),k=g.useCallback(F=>{F&&"pagination"in F&&p({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:F.products}}})},[p]),M=g.useCallback(F=>{if(F.pagination.nextPage===!0){const Y=F.page+1,G=Hr(e,Y,E,s);h({...m,page:Y},G,k)}},[h,e,k,E,s,m]),Q=g.useCallback(F=>{F.loading===!1&&y({...m,page:F.page},k)},[k,y,m]),D=g.useCallback(F=>{const Y=new URLSearchParams(r);F.page!==Number(Y.get("page")??1)&&(Y.set("page",String(F.page)),u.replace(`?${Y.toString()}`,{scroll:!1}))},[u,r]),U=g.useCallback((F,Y)=>{const G=Y?wn([Y]):null;T(F),I(G!=null&&G.length?G[0]:null),S(!0)},[]);return g.useEffect(()=>{const F=!j.current,Y=bi(v.current,m),G=Hr(e,m.page,E);F?_(m,G,k,s):Y&&(_(m,G,k,s),v.current=m),j.current=!0},[e,_,k,E,s,m]),n.jsxs(Fi.Provider,{value:g.useMemo(()=>({...x,addPage:h,addNewPage:M,createPages:_,gap:b,columns:E,handleNotify:U,updatePage:Q,updateProducts:y,updateParamPage:D}),[h,M,_,U,b,E,x,Q,y,D]),children:[t,n.jsx(An,{open:P,sku:C,skus:L,setSku:I,setVisible:S,ICONS:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l})]})},st=()=>{const e=g.useContext(Fi);if(e===void 0)throw new Error("PLPInfiniteScrollContext must be used within a ScrollInfiniteProvider");return e},Ui=g.createContext({gridBanners:void 0,banners:[]}),Zp=({children:e,data:t,device:r,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,Vs),l=i.slice(Vs,i.length),u=t==null?void 0:t.sections.find(f=>f.name==="List Product Banners"),p=g.useMemo(()=>{var f,m;return((m=(f=u==null?void 0:u.data)==null?void 0:f.banners)==null?void 0:m.map(h=>({...h.banner,columns:h.bannerWidth,position_grid:h.bannerPosition})))??[]},[u]);return a&&r==="mobile"||!a&&r==="desktop"?n.jsxs(Ui.Provider,{value:{gridBanners:u,banners:p},children:[n.jsx(s,{data:c??[]}),n.jsxs(d.Utils.Column,{gap:o,className:d.helpers.classNameConcat("utils-column-modifier"),children:[e,n.jsx(s,{data:l??[]})]})]}):n.jsx(n.Fragment,{})},Tn=()=>{const e=g.useContext(Ui);return e===void 0&&console.error("Needs PLPContentContext on parent component"),e},Hi=g.createContext({}),qi=({children:e,filters:t,PLP_FILTERS:r,...s})=>{var a;const o=(a=t.facets)==null?void 0:a.filter(i=>r.find(c=>c.key===i.key));return n.jsx(Hi.Provider,{value:g.useMemo(()=>({...s,filters:{...t,facets:o}}),[t,o,s]),children:e})},Ot=()=>{const e=g.useContext(Hi);if(e===void 0)throw new Error("useFilterContext must be used within a FilterProvider");return e},Vi=g.createContext({product:void 0}),Jp=({children:e,data:t,productId:r,COMMON_PAGE_COLUMN_GAP:s,SectionZone:o})=>n.jsxs(Vi.Provider,{value:{productId:r},children:[e,n.jsx(d.Utils.Column,{gap:s,className:d.helpers.classNameConcat("utils-column-modifier"),children:n.jsx(o,{data:(t==null?void 0:t.sections)??[]})})]}),Wi=()=>{const e=g.useContext(Vi);return e||console.error("use this hook only inside PDPContentProvider hierarchy"),e},em=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase().trim();function tm(e,t=1e3){let r=!1;return(...s)=>{r||(e(...s),r=!0,setTimeout(()=>{r=!1},t))}}function nm(e,t=1e3){let r;return(...s)=>{clearTimeout(r),r=setTimeout(()=>{e(...s)},t)}}const Gi=(e,t)=>t.getTime()>e.getTime()?Math.abs(t.getTime()-e.getTime()):0,$t=(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),rm=e=>{const t=qd.decodeJwt(e??"");return{email:t.sub,userId:t.userId}},sm=["name","email","phone","date","cpf","cep"],Ks={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}$/},Ki=({type:e,input:t,required:r=!1})=>{if(typeof t!="string"||!r&&t===""||!Ks[e])return!0;const s=t.trim();return Ks[e].test(s)},om=e=>{const t=/\/(\d+)-\d+-\d+\/(.+?)\./,r=typeof e=="string"?e.match(t):null;return r?r[2].replace(/-/g," "):Lp},am=Object.freeze(Object.defineProperty({__proto__:null,FieldTypes:sm,debounce:nm,getAltTextFromUrl:om,getAuthenticatedUser:rm,getCookie:wi,getDaysHoursMinutesSeconds:$t,getMilliSeconds:Gi,removeAccentsAndReplaceSpaces:em,setCookie:bs,throttle:tm,validateInput:Ki},Symbol.toStringTag,{value:"Module"})),im=({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}},cm=({formData:e,mountedFields:t,inputsStatus:r,hasTermsAndConditions:s,checkboxRef:o,setFormStatus:a})=>{let i=!1,c=!1;const l={...r};return s&&!o.current&&(a("unchecked"),i=!0),e.forEach((u,p)=>{var h;if(p==="terms-and-conditions")return;const f=(h=t[p])==null?void 0:h.required;if(f&&!u){l[p]="required",i=!0;return}Ki({type:t[p].type,input:u,required:f})||(l[p]="error",c=!0),typeof u=="string"&&e.set(p,u.toString().trim())}),{hasEmptyFields:i,hasErrors:c,inputStatusToUpdate:l}},Xi=g.createContext({}),Yi=({children:e,masterDataEmailField:t,fields:r,variant:s,CONSTANTS:{MASTER_DATA_ENTITY:o,NEWSLETTER_CONFIGS:a}})=>{const{sendDataLayerEvent:i}=oe(),c=a.hasTermsAndConditions,{mountedFields:l,mountedInputsStatus:u}=g.useMemo(()=>im({fields:r}),[r]),p=g.useRef(!1),[f,m]=g.useState("idle"),[h,_]=g.useState(u),y=async({searchFields:S,entity:C})=>{const I=await ft.post("/api/master-data/search",{body:{masterDataEntity:C,searchFields:S,headers:{"REST-Range":"resources=0-49"}}});return console.info(I),I.data},x=async({documentId:S,fieldsToBeUpdated:C,entity:I})=>(await ft.post("/api/master-data/update",{dataEntityName:I,documentId:S,fieldsToBeUpdated:C})).status,b=g.useCallback(async({payload:S,response:C},I,L)=>{var D;const{email:T,...k}=S,[M]=await y({searchFields:{[I]:T},entity:L??o.newsletter}),Q=Array.isArray(M)?(D=M[0])==null?void 0:D.id:void 0;return M&&await x({documentId:Q,fieldsToBeUpdated:k,entity:L??o.newsletter})!==204?{...C,status:"error"}:{...C,status:"success"}},[]),E=g.useCallback(async({formData:S},C,I)=>{const L={status:"idle",inputsStatus:{}},T={};S.forEach((k,M)=>{T[M]=k});try{const M=(await ft.post("/api/master-data",{body:{payload:T,masterDataEntity:C??o.newsletter}})).data;return(M==null?void 0:M.Message)==="duplicated entry"?b({payload:T,response:L},I,C):M!=null&&M.Id?{...L,status:"success"}:{...L,status:"error"}}catch(k){return console.error("error",k),{...L,status:"error"}}},[b]),j=g.useCallback(async(S,C,I)=>{S.preventDefault();const L=new FormData(S.target);if(L.append("acceptedTerms",p.current?"true":"false"),p.current){const k=new Dr.TZDate(new Date,"America/Sao_Paulo").toISOString();L.append("termsAcceptedAt",k)}C&&Object.keys(C).forEach(k=>{L.append(k,C[k])});const T=await E({formData:L},I??"",t);T&&(m(T==null?void 0:T.status),_(T.inputsStatus),T.status==="success"&&i({functionKey:"readyEvents",data:{event:"generate_lead"}}))},[t,E,m,_,i]),v=g.useCallback(S=>{const C=new FormData(S.currentTarget.parentElement),{hasEmptyFields:I,hasErrors:L,inputStatusToUpdate:T}=cm({formData:C,mountedFields:l,inputsStatus:h,hasTermsAndConditions:c,checkboxRef:p,setFormStatus:m});if(_(T),I||L){S.preventDefault();return}m("loading")},[l,h,c,p]),P=g.useCallback(()=>{m("idle"),_(u)},[u]);return n.jsx(Xi.Provider,{value:g.useMemo(()=>({formStatus:f,handleSubmit:j,setFormStatus:m,inputsStatus:h,setInputsStatus:_,hasTermsAndConditions:c,handleClickToSubmit:v,checkboxRef:p,masterDataEmailField:t,fields:r,variant:s,resetNewsletter:P}),[f,j,m,h,_,v,c,p,t,r,s,P]),children:e})},Ss=()=>{const e=g.useContext(Xi);if(e===void 0)throw new Error("useNewsletterContext must be used within a NewsletterProvider");return e},Qi={contexts:{addToCart:{hook:bt,provider:di},cart:{hook:ve,provider:Rp},cms:{FlagsAndTags:{context:ss,hook:dt,provider:Vd}},newsletter:{hook:Ss,provider:Yi},events:{hook:oe,provider:Jd},global:{hook:ne,provider:hp,mediator:Ba},header:{hook:Ee,provider:Pp},menuMobile:{hook:fs,provider:li},next:{hook:ce,provider:_p},pdp:{provider:Wd},PDPContent:{provider:Jp,hook:Wi},plp:{provider:Up,hook:xs},plpFilter:{hook:Ot,provider:qi},PLPContent:{provider:Zp,hook:Tn},plpInfinite:{provider:Bi,hook:st},pdpdata:{provider:ep},searchFacets:{hook:yi,provider:gi},searchProducts:{hook:Kt,provider:ys},searchRoot:{hook:_s,provider:hs},searchSearch:{hook:ze,provider:gs},session:{hook:kt,provider:Yp},ui:{hook:qt,provider:Fa}},hooks:{useBackPDC:la,useClipboard:tp,useDisableZoom:xa,useLocalStorage:rp,useOnScreen:os,useSentinel:In,useTouchZoomPan:va},stores:{cart:mp,header:yp,pdp:Sp,wishlist:Ep}},lm={cart:up,events:Zd,plp:qp,product:A.productHelpers,utils:am},Es={helpers:lm},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"},Zi=({brand:e,className:t,name:r,...s})=>n.jsxs("div",{...s,className:d.helpers.classNameConcat(He["add-to-cart--card--name"],t),children:[n.jsx(d.Tag,{style:{textTransform:"uppercase"},size:"small",variant:"quaternary",title:e,children:e}),n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:n.jsx("p",{className:"typography-style-body-md",children:r})})})]});Zi.displayName="AddToCart.Card.Name";const Ji=({className:e,listPrice:t,price:r,quantity:s,productId:o,...a})=>{const i=A.formatPriceToCurrency(r/100),c=A.formatPriceToCurrency(t/100);return n.jsx("div",{...a,className:d.helpers.classNameConcat(He["add-to-cart--card--price-quantity"],e),children:n.jsx(d.ProductInfo.Root,{size:"small",layout:"vertical",children:n.jsx(d.ProductInfo.Wrapper,{size:"small",layout:"vertical",children:n.jsx(d.ProductInfo.ValuesWrapper,{children:r!==t?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:i,size:"small"},"price-list"),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:c,size:"small"},"price-low")]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:c,size:"small"},"price-low")})})})})};Ji.displayName="AddToCart.Card.PriceQuantity";const um="_skeleton_12b79_1",dm={skeleton:um},ec=({style:e})=>n.jsx("div",{style:e,className:dm.skeleton}),pm="_image_1y08u_1",mm={image:pm},fm=({alt:e,className:t,objectFit:r,...s})=>{const{nextimage:o}=ce();return n.jsx(o,{quality:90,...s,alt:e??"",className:d.helpers.classNameConcat(mm.image,t),"data-object-fit":r??"cover"})},hm=({videoRef:e,...t})=>n.jsx("video",{...t,ref:e,children:n.jsx("track",{kind:"captions"})}),Ie={Image:fm,Video:hm},tc=({className:e,productGroupID:t,size:r,texture:s,...o})=>{const{CONSTANTS:{TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:i}}=bt(),[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 p=u.data[0].items[0];if(p){const f=p.images.find(m=>a.includes(m.imageLabel));f!=null&&f.imageUrl?l(f.imageUrl):l(p.images[0].imageUrl)}}).catch(u=>{console.error(u)})},[c,t]),n.jsxs("div",{...o,className:d.helpers.classNameConcat(He["add-to-cart--card--style-size"],e),children:[n.jsx(d.ToggleStyle.Wrapper,{size:"x-small",style:i,children:n.jsx(d.ToggleStyle.Texture,{children:c?n.jsx(Ie.Image,{alt:"",src:c??"",width:164,height:164,style:i}):n.jsx(ec,{})})}),n.jsx(d.Utils.Divider,{direction:"vertical",size:"medium",style:{height:24}}),r&&n.jsxs(d.ToggleSize.Wrapper,{size:"small",title:"wrapper-texture",children:[n.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),n.jsx(d.ToggleSize.Text,{children:r})]})]})};tc.displayName="AddToCart.Card.StyleSize";const{helpers:_m}=Es,nc=({className:e,item:t,texture:r,...s})=>{const{itemOffered:{name:o,brand:a,skuName:i,isVariationOf:{productGroupID:c}},quantity:l,price:u,sellingPrice:p}=t,{CONSTANTS:{NAME_SPLIT_SYMBOL:f}}=bt(),{size:m}=_m.product.getColorAndSizeFromSkuName(i??o,f);return n.jsxs("div",{...s,className:d.helpers.classNameConcat(He["add-to-cart--card--content"],e),children:[n.jsx(Zi,{brand:a.name,name:o}),n.jsx(Ji,{price:u,listPrice:p,quantity:l,productId:t.id}),n.jsx(tc,{size:m,texture:r,productGroupID:c})]})};nc.displayName="AddToCart.Card.Content";const rc=({image:e,thumbnail:t=!1})=>n.jsx(Ie.Image,{alt:e.alternateName??"image","data-thumbnail":t,height:t?152:120,src:e.url,width:t?152:94});rc.displayName="AddToCart.Card";const sc=({className:e,item:t,texture:r,thumbnail:s,...o})=>{const{itemOffered:{image:[a]}}=t,i=A.updatedResizedImg(a.url,{width:200,height:300});return n.jsxs("div",{...o,className:d.helpers.classNameConcat(He["add-to-cart--card"],e),children:[n.jsx(rc,{image:{alternateName:a.alternateName||"Produto",url:i||""},thumbnail:s}),!s&&n.jsx(nc,{item:t,texture:r})]})};sc.displayName="AddToCart.Card";const oc=({className:e,children:t,title:r,...s})=>n.jsxs("div",{...s,className:d.helpers.classNameConcat(He["add-to-cart--content"],e),children:[n.jsx("div",{className:He["add-to-cart--content--title"],children:r&&n.jsx("h2",{children:r})}),t,n.jsx(ht.Footer,{})]});oc.displayName="AddToCart.Layout.Content";const ac=({className:e,...t})=>{var h,_;const{isMobile:r,handleClose:s,CONSTANTS:{ADD_TO_CART:o}}=bt(),{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,m=A.formatPriceToCurrency(f??0);return n.jsxs("div",{...t,className:d.helpers.classNameConcat(He["add-to-cart--footer"],e),children:[n.jsxs("div",{className:He["add-to-cart--footer--total"],children:[n.jsx("span",{children:"Subtotal:"}),n.jsx("span",{children:m})]}),n.jsx(d.Button,{size:"medium",variant:"primary","data-close":!0,onClick:()=>i(!0),children:o.footer.bag}),r?n.jsx(d.Button,{"data-close":!0,size:"medium",variant:"tertiary",children:o.footer.keep_buying}):n.jsx(d.Button,{onClick:()=>s(),size:"medium",variant:"tertiary",children:o.footer.keep_buying})]})};ac.displayName="AddToCart.Layout.Footer";const ic=({children:e,className:t,thumbnail:r=!1,...s})=>{const{cartStore:{options:o}}=ve(),{recentlyAddedProducts:a}=qt(),i=a.length>3?4:a.length;return n.jsxs("div",{...s,className:He["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(p=>p.id===c.itemOffered.isVariationOf.productGroupID))==null?void 0:u.texture;return n.jsx(ht.Card,{item:c,thumbnail:r,texture:l},c.itemOffered.sku)}),e]})};ic.displayName="AddToCart.Layout.Items";const cc=({children:e,Z_INDEX_WAR:t})=>{const{isOpen:r,setIsOpen:s}=bt(),{isMobile:o}=ne();return n.jsxs(d.Modal.Root,{"data-modal":"add-to-cart--modal",className:He["add-to-cart__modal"],isMobile:o??!1,isOpen:r,setIsOpen:s,variant:"sideBottom",style:{zIndex:t.modal},children:[n.jsx(d.Modal.Header,{navigation:"top",children:n.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0})}),n.jsx(d.Modal.Body,{children:e})]})};cc.displayName="AddToCart.Modal";const gm=({children:e})=>{const{count:t,handleClose:r,setIsOpen:s}=bt(),o=g.useRef(t);return g.useEffect(()=>{t>o.current&&s(!0),t<o.current&&o.current>=1&&r(),o.current=t},[t,r,s]),n.jsx(n.Fragment,{children:e})},lc=({children:e,component:t,CONSTANTS:r,...s})=>{const{recentlyAddedProducts:o}=qt(),{isMobile:a}=ne(),i=o.length>3?4:o.length;return n.jsx(di,{...s,count:i,isMobile:a,CONSTANTS:r,children:n.jsx(gm,{children:a?n.jsxs(n.Fragment,{children:[n.jsx(ht.Modal,{Z_INDEX_WAR:r.Z_INDEX_WAR,children:t}),e]}):n.jsx(ht.Tooltip,{component:t,style:{width:350},Z_INDEX_WAR:r.Z_INDEX_WAR,children:e})})})};lc.displayName="AddToCart.Root";const uc=({children:e,component:t,Z_INDEX_WAR:r,...s})=>{const{contentRef:o,left:a,isLeaving:i,target:c,isOpen:l,top:u}=bt();return n.jsx(d.Tooltip.Root,{arrow:"top-right",component:n.jsx("div",{...s,ref:o,children:t}),id:"add-to-cart--tooltip",className:He["add-to-cart--tooltip"],style:{zIndex:r.modal},isLeaving:i,isOpen:l,left:a,size:"medium",position:"top",top:u,children:n.jsx("div",{className:He["add-to-cart--tooltip"],ref:c,children:e})})};uc.displayName="AddToCart.Tooltip";const ht={Card:sc,Content:oc,Footer:ac,Items:ic,Modal:cc,Root:lc,Tooltip:uc},Ps=({title:e,...t})=>{const{recentlyAddedProducts:r}=qt(),{isMobile:s}=ne(),o=r.length>3?4:r.length,a=r.length>(o??1),i=r.length>1;return n.jsx(ht.Root,{isMobile:s,count:r.length,component:n.jsx(ht.Content,{title:e,children:n.jsx(ht.Items,{thumbnail:i,children:a&&n.jsx(d.Badge.Count,{count:r.length-o,size:"medium",variant:"secondary"})})}),...t})};Ps.displayName="AddToCart";const Xs={"backtotop-btn":"_backtotop-btn_1shb6_1","card-modifier":"_card-modifier_1shb6_27"},ym=({children:e,className:t,adornment:r,iconPosition:s,scrollToOptions:o,style:a,...i})=>{const c={top:(o==null?void 0:o.top)??0,left:(o==null?void 0:o.left)??0,behavior:(o==null?void 0:o.behavior)??"smooth"},u=s&&r?{flexDirection:{top:"column",bottom:"column-reverse",left:"row",right:"row-reverse"}[s]}:{},p=()=>{window&&window.document.body.scrollTo({...c})};return n.jsx(d.Card,{...i,shadow:!0,padding:"small",className:d.helpers.classNameConcat(Xs["card-modifier"],t),style:{...a,padding:0},children:n.jsxs("button",{className:Xs["backtotop-btn"],onClick:p,style:{...u},"data-orientation":s,children:[r,e]})})},xm="_container_1sy8s_16",ct={"carousel-container":"_carousel-container_1sy8s_1","add-cart-container":"_add-cart-container_1sy8s_8",container:xm,"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"},vm=({selectedProducts:e,handleAddAllToCart:t,CONSTANTS:r})=>{const s=Object.values(e.products).length;return n.jsxs("div",{className:ct["add-itens-to-cart-container"],children:[n.jsxs("div",{className:ct["add-itens-to-cart-container-values"],children:[n.jsx("div",{className:ct["add-itens-to-cart-qty-products"],children:n.jsx("span",{children:s===0?r.BUY_PACKAGE.group_cart.select_all_product:`${s} ${s===1?r.BUY_PACKAGE.group_cart.select_product:r.BUY_PACKAGE.group_cart.select_product+"s"}`})}),n.jsx("div",{className:ct["add-itens-to-cart-total"],children:n.jsx("span",{children:A.freightParsePrice({valueInCents:e.totalPrice*100,hasFree:!1,freeTaxMessage:r.FREIGHT_CALCULATION.messages.free_tax})})})]}),n.jsx(d.Button,{onClick:t,className:ct["add-button"],size:"large",disabled:s===0,variant:"primary",children:r.BUY_BUTTON_LABELS.add_to_cart})]})},bm=e=>e.reduce((t,r)=>{var o;const s=t.find(a=>a.node.id===r.node.id);if(!s)return[...t,r];if((o=s==null?void 0:s.node.isVariantOf)!=null&&o.hasVariant){const a=s.node.isVariantOf.hasVariant,i=r.node.isVariantOf.hasVariant;a&&i&&(s.node.isVariantOf.hasVariant=[...a,...i])}return t},[]),jm=({selectedProduct:e,productId:t,prevState:r,mainSellerId:s})=>{const{products:o,totalPrice:a}=r;try{if(!e){const{[t]:u,...p}=o;return{...r,totalPrice:a-u.price,products:p}}const i=A.getValidOffer(e.offers.offers,s);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}},dc=g.createContext({}),Cm=({children:e,item:t,index:r,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:p}=oe(),f=y=>{u({functionKey:"productEvents",data:{commonData:{...t,availableSizes:l.current.availableSkus,...l.current.priceInfo},customData:{index:r+1},event:y}})},m=()=>{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:r}}})},_=()=>{s&&(p.current={item_list_name:s}),f("select_item")};return n.jsx(dc.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})},Ke=()=>{const e=g.useContext(dc);if(e===void 0)throw new Error("useProductCardContext must be used within a ProductCardProvider");return e},we={"product-card--actions":"_product-card--actions_nmzk4_1","product-card--actions--group":"_product-card--actions--group_nmzk4_9","product-card--actions--selectors":"_product-card--actions--selectors_nmzk4_21","product-card--body":"_product-card--body_nmzk4_33","product-card--header":"_product-card--header_nmzk4_47","product-card--footer":"_product-card--footer_nmzk4_67","product-card--image":"_product-card--image_nmzk4_90","product-card--image--container":"_product-card--image--container_nmzk4_97","product-card--outstock":"_product-card--outstock_nmzk4_133","product-card--price":"_product-card--price_nmzk4_155","product-card--title":"_product-card--title_nmzk4_177","product-card--title--tag":"_product-card--title--tag_nmzk4_183","product-card--title--content":"_product-card--title--content_nmzk4_200","product-card--selectors--size":"_product-card--selectors--size_nmzk4_240","product-card--selectors--size--button":"_product-card--selectors--size--button_nmzk4_266","product-card--selectors--size--skus":"_product-card--selectors--size--skus_nmzk4_275","product-card--selectors--style":"_product-card--selectors--style_nmzk4_289","product-card--selectors--style--more":"_product-card--selectors--style--more_nmzk4_299","product-card--video":"_product-card--video_nmzk4_316","product-card--wrapper":"_product-card--wrapper_nmzk4_342"},pc=({callback:e,children:t,className:r,data:s,isKit:o,...a})=>{const{item:{availability:{status:i},image:c}}=Ke();return i?n.jsxs("div",{...a,className:d.helpers.classNameConcat(we["product-card--actions"],r),children:[n.jsxs(me.Wrapper,{type:"actions--group",children:[n.jsx(me.Price,{}),n.jsx("div",{className:we["product-card--actions--selectors"],children:!o&&n.jsx(me.StyleSelector,{data:s,images:c,callback:e})})]}),t]}):null};pc.displayName="ProductCard.Actions";const mc=({className:e,isKit:t,...r})=>{const{addToCart:s}=ve(),{isMobile:o=!1,selectedSku:a,outStock:i,item:c,sendAddToCartEvent:l,CONSTANTS:u}=Ke(),p=()=>{var h;if(!a)return;const m=A.getValidOffer(a.offers.offers,u.StoreConfig_MainSellerId);m&&s({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()},f=a?u.BUY_BUTTON_LABELS.add_to_cart:u.BUY_BUTTON_LABELS.select_size;return n.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:p,children:i?"Avise-me quando chegar":f})};mc.displayName="ProductCard.Actions.BuyButton";const Sm={"snackbar-modifier":"_snackbar-modifier_1va2l_1"},It=({size:e,adornment:t,title:r,subtitle:s,supportChildren:o,className:a,Z_INDEX_WAR:i,...c})=>n.jsxs(d.SnackBar.Structure,{...c,size:e,className:d.helpers.classNameConcat(Sm["snackbar-modifier"],a),width:360,style:{zIndex:i.snackbar},children:[n.jsx(d.SnackBar.Content,{adornment:t,title:r,subtitle:s}),o&&n.jsx(d.SnackBar.Support,{children:o})]});It.displayName="SnackBar";const Ft={"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 qr={exports:{}},Le={};Le._=Le._interop_require_default=Em;function Em(e){return e&&e.__esModule?e:{default:e}}var tn={exports:{}},Wn={},Ys;function fc(){return Ys||(Ys=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 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,p]=l;Array.isArray(p)?p.forEach(f=>c.append(u,s(f))):c.set(u,s(p))}),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(p=>{Array.from(p.keys()).forEach(f=>i.delete(f)),p.forEach((f,m)=>i.append(m,f))}),i}}(Wn)),Wn}var Gn={},At={};function hc(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(hc=function(s){return s?r:t})(e)}At._=At._interop_require_wildcard=Pm;function Pm(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=hc(t);if(r&&r.has(e))return r.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,r&&r.set(e,s),s}var Qs;function _c(){return Qs||(Qs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var p in u)Object.defineProperty(l,p,{enumerable:!0,get:u[p]})}t(e,{formatUrl:function(){return a},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}});const s=At._(fc()),o=/https?|ftp|gopher|file/;function a(l){let{auth:u,hostname:p}=l,f=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:p&&(y=u+(~p.indexOf(":")?"["+p+"]":p),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||""),m&&m[0]!=="/"&&(m="/"+m)):y||(y=""),h&&h[0]!=="#"&&(h="#"+h),x&&x[0]!=="?"&&(x="?"+x),m=m.replace(/[?#]/g,encodeURIComponent),x=x.replace("#","%23"),""+f+y+m+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)}}(Gn)),Gn}var Kn={},Zs;function Nm(){return Zs||(Zs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"omit",{enumerable:!0,get:function(){return t}});function t(r,s){const o={};return Object.keys(r).forEach(a=>{s.includes(a)||(o[a]=r[a])}),o}}(Kn)),Kn}var Xn={},Js;function Ln(){return Js||(Js=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 E},MissingStaticPage:function(){return b},NormalizeError:function(){return y},PageNotFoundError:function(){return x},SP:function(){return m},ST:function(){return h},WEB_VITALS:function(){return r},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 p},stringifyError:function(){return j}});const r=["CLS","FCP","FID","INP","LCP","TTFB"];function s(v){let P=!1,S;return function(){for(var C=arguments.length,I=new Array(C),L=0;L<C;L++)I[L]=arguments[L];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 p(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 L='"'+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(L)}}const C=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(C&&u(C))return I;if(!I){const L='"'+l(v)+'.getInitialProps()" should resolve to an object. But found "'+I+'" instead.';throw new Error(L)}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 m=typeof performance<"u",h=m&&["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 E 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})}}(Xn)),Xn}var nn={exports:{}},Yn={},eo;function gc(){return eo||(eo=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(/\/$/,"")||"/"}}(Yn)),Yn}var Qn={},to;function Ns(){return to||(to=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"parsePath",{enumerable:!0,get:function(){return t}});function t(r){const s=r.indexOf("#"),o=r.indexOf("?"),a=o>-1&&(s<0||o<s);return a||s>-1?{pathname:r.substring(0,a?o:s),query:a?r.substring(o,s>-1?s:void 0):"",hash:s>-1?r.slice(s):""}:{pathname:r,query:"",hash:""}}}(Qn)),Qn}var no;function kn(){return no||(no=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return o}});const r=gc(),s=Ns(),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,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 Zn={},rn={exports:{}},Jn={},ro;function yc(){return ro||(ro=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"pathHasPrefix",{enumerable:!0,get:function(){return r}});const t=Ns();function r(s,o){if(typeof s!="string")return!1;const{pathname:a}=(0,t.parsePath)(s);return a===o||a.startsWith(o+"/")}}(Jn)),Jn}var so;function Im(){return so||(so=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return o}});const r=yc(),s=process.env.__NEXT_ROUTER_BASEPATH||"";function o(a){return(0,r.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)}(rn,rn.exports)),rn.exports}var oo;function xc(){return oo||(oo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isLocalURL",{enumerable:!0,get:function(){return s}});const t=Ln(),r=Im();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,r.hasBasePath)(i.pathname)}catch{return!1}}}(Zn)),Zn}var er={},tr={},ao;function Rm(){return ao||(ao=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 p=function(f,m){if(f!==null&&f!==m)throw new Error("You cannot use different slug names for the same dynamic path ('"+f+"' !== '"+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]+'" ).');p(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]+'").');p(this.restSlugName,l),this.restSlugName=l,c="[...]"}else{if(u)throw new Error('Optional route parameters are not yet supported ("'+o[0]+'").');p(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(s){const o=new t;return s.forEach(a=>o.insert(a)),o.smoosh()}}(tr)),tr}var nr={},rr={},sr={},or={},io;function wm(){return io||(io=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}}(or)),or}var ar={},co;function Am(){return co||(co=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 r}});function r(a){return a[0]==="("&&a.endsWith(")")}const s="__PAGE__",o="__DEFAULT__"}(ar)),ar}var lo;function Tm(){return lo||(lo=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=wm(),s=Am();function o(i){return(0,r.ensureLeadingSlash)(i.split("/").reduce((c,l,u,p)=>!l||(0,s.isGroupSegment)(l)||l[0]==="@"||(l==="page"||l==="route")&&u===p.length-1?c:c+"/"+l,""))}function a(i){return i.replace(/\.rsc($|\?)/,"$1")}}(sr)),sr}var uo;function vc(){return uo||(uo=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 r=Tm(),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 p of i.split("/"))if(l=s.find(f=>p.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,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 p=c.split("/");if(p.length<=2)throw new Error(`Invalid interception route: ${i}. Cannot use (..)(..) marker at the root level or one level up.`);u=p.slice(0,-2).concat(u).join("/");break;default:throw new Error("Invariant: unexpected marker")}return{interceptingRoute:c,interceptedRoute:u}}}(rr)),rr}var po;function Lm(){return po||(po=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isDynamicRoute",{enumerable:!0,get:function(){return s}});const t=vc(),r=/\/\[[^/]+?\](?=\/|$)/;function s(o){return(0,t.isInterceptionRouteAppPath)(o)&&(o=(0,t.extractInterceptionRouteInformation)(o).interceptedRoute),r.test(o)}}(nr)),nr}var mo;function km(){return mo||(mo=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 s.isDynamicRoute}});const r=Rm(),s=Lm()}(er)),er}var ir={},cr={},fo;function Om(){return fo||(fo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getRouteMatcher",{enumerable:!0,get:function(){return r}});const t=Ln();function r(s){let{re:o,groups:a}=s;return i=>{const c=o.exec(i);if(!c)return!1;const l=p=>{try{return decodeURIComponent(p)}catch{throw new t.DecodeError("failed to decode param")}},u={};return Object.keys(a).forEach(p=>{const f=a[p],m=c[f.pos];m!==void 0&&(u[p]=~m.indexOf("/")?m.split("/").map(h=>l(h)):f.repeat?[l(m)]:l(m))}),u}}}(cr)),cr}var lr={},ur={},ho;function Mm(){return ho||(ho=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 k},CACHE_ONE_YEAR:function(){return v},DOT_NEXT_ALIAS:function(){return L},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 C},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 E},NEXT_CACHE_TAGS_HEADER:function(){return m},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 p},NEXT_QUERY_PARAM_PREFIX:function(){return r},NON_STANDARD_NODE_ENV:function(){return R},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 T},RSC_ACTION_CLIENT_WRAPPER_ALIAS:function(){return F},RSC_ACTION_ENCRYPTION_ALIAS:function(){return U},RSC_ACTION_PROXY_ALIAS:function(){return D},RSC_ACTION_VALIDATE_ALIAS:function(){return Q},RSC_MOD_REF_PROXY_ALIAS:function(){return M},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 w},WEBPACK_RESOURCE_QUERIES:function(){return Ne}});const r="nxtP",s="nxtI",o="x-prerender-revalidate",a="x-prerender-revalidate-if-generated",i=".prefetch.rsc",c=".rsc",l=".action",u=".json",p=".meta",f=".body",m="x-next-cache-tags",h="x-next-cache-soft-tags",_="x-next-revalidated-tags",y="x-next-revalidate-tag-token",x=128,b=256,E=1024,j="_N_T_",v=31536e3,P="middleware",S=`(?:src/)?${P}`,C="instrumentation",I="private-next-pages",L="private-dot-next",T="private-next-root-dir",k="private-next-app-dir",M="private-next-rsc-mod-ref-proxy",Q="private-next-rsc-action-validate",D="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",R='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"},w={...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__"}}(ur)),ur}var dr={},_o;function Dm(){return _o||(_o=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"escapeStringRegexp",{enumerable:!0,get:function(){return s}});const t=/[|\\{}()[\]^$+*?.-]/,r=/[|\\{}()[\]^$+*?.-]/g;function s(o){return t.test(o)?o.replace(r,"\\$&"):o}}(dr)),dr}var go;function $m(){return go||(go=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 m},getRouteRegex:function(){return l},parseParameter:function(){return i}});const r=Mm(),s=vc(),o=Dm(),a=gc();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(E=>{const j=s.INTERCEPTION_ROUTE_MARKERS.find(P=>E.startsWith(P)),v=E.match(/\[((?:\[.*\])|.+)\]/);if(j&&v){const{key:P,optional:S,repeat:C}=i(v[1]);return x[P]={pos:b++,repeat:C,optional:S},"/"+(0,o.escapeStringRegexp)(j)+"([^/]+?)"}else if(v){const{key:P,repeat:S,optional:C}=i(v[1]);return x[P]={pos:b++,repeat:S,optional:C},S?C?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}else return"/"+(0,o.escapeStringRegexp)(E)}).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 p(_){let{interceptionMarker:y,getSafeRouteKey:x,segment:b,routeKeys:E,keyPrefix:j}=_;const{key:v,optional:P,repeat:S}=i(b);let C=v.replace(/\W/g,"");j&&(C=""+j+C);let I=!1;(C.length===0||C.length>30)&&(I=!0),isNaN(parseInt(C.slice(0,1)))||(I=!0),I&&(C=x()),j?E[C]=""+j+v:E[C]=v;const L=y?(0,o.escapeStringRegexp)(y):"";return S?P?"(?:/"+L+"(?<"+C+">.+?))?":"/"+L+"(?<"+C+">.+?)":"/"+L+"(?<"+C+">[^/]+?)"}function f(_,y){const x=(0,a.removeTrailingSlash)(_).slice(1).split("/"),b=u(),E={};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 p({getSafeRouteKey:b,interceptionMarker:S,segment:P[1],routeKeys:E,keyPrefix:y?r.NEXT_INTERCEPTION_MARKER_PREFIX:void 0})}else return P?p({getSafeRouteKey:b,segment:P[1],routeKeys:E,keyPrefix:y?r.NEXT_QUERY_PARAM_PREFIX:void 0}):"/"+(0,o.escapeStringRegexp)(j)}).join(""),routeKeys:E}}function m(_,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:E}=f(_,!1);let j=b?"(?:(/.*)?)":"";return{namedRegex:"^"+E+j+"$"}}}(lr)),lr}var yo;function zm(){return yo||(yo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"interpolateAs",{enumerable:!0,get:function(){return s}});const t=Om(),r=$m();function s(o,a,i){let c="";const l=(0,r.getRouteRegex)(o),u=l.groups,p=(a!==o?(0,t.getRouteMatcher)(l)(a):"")||i;c=o;const f=Object.keys(u);return f.every(m=>{let h=p[m]||"";const{repeat:_,optional:y}=u[m];let x="["+(_?"...":"")+m+"]";return y&&(x=(h?"":"/")+"["+x+"]"),_&&!Array.isArray(h)&&(h=[h]),(y||m in p)&&(c=c.replace(x,_?h.map(b=>encodeURIComponent(b)).join("/"):encodeURIComponent(h))||"/")})||(c=""),{params:f,result:c}}}(ir)),ir}var xo;function Fm(){return xo||(xo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return p}});const r=fc(),s=_c(),o=Nm(),a=Ln(),i=kn(),c=xc(),l=km(),u=zm();function p(f,m,h){let _,y=typeof m=="string"?m:(0,s.formatWithValidation)(m);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,r.searchParamsToUrlQuery)(j.searchParams),{result:C,params:I}=(0,u.interpolateAs)(j.pathname,j.pathname,S);C&&(v=(0,s.formatWithValidation)({pathname:C,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)}(tn,tn.exports)),tn.exports}var sn={exports:{}},pr={},mr={},vo;function bc(){return vo||(vo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addPathPrefix",{enumerable:!0,get:function(){return r}});const t=Ns();function r(s,o){if(!s.startsWith("/")||!o)return s;const{pathname:a,query:i,hash:c}=(0,t.parsePath)(s);return""+o+a+i+c}}(mr)),mr}var bo;function Bm(){return bo||(bo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addLocale",{enumerable:!0,get:function(){return s}});const t=bc(),r=yc();function s(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)}}(pr)),pr}var jo;function Um(){return jo||(jo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return s}});const r=kn(),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,r.normalizePathTrailingSlash)(Bm().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)}(sn,sn.exports)),sn.exports}var fr={},Co;function jc(){return Co||(Co=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")}(fr)),fr}var hr={},So;function Hm(){return So||(So=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(u,p){for(var f in p)Object.defineProperty(u,f,{enumerable:!0,get:p[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)}(hr)),hr}var on={exports:{}},an={exports:{}},Eo;function Cc(){return Eo||(Eo=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 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)}(an,an.exports)),an.exports}var Po;function qm(){return Po||(Po=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return u}});const r=g,s=Cc(),o=typeof IntersectionObserver=="function",a=new Map,i=[];function c(p){const f={root:p.root||null,margin:p.rootMargin||""},m=i.find(x=>x.root===f.root&&x.margin===f.margin);let h;if(m&&(h=a.get(m),h))return h;const _=new Map,y=new IntersectionObserver(x=>{x.forEach(b=>{const E=_.get(b.target),j=b.isIntersecting||b.intersectionRatio>0;E&&j&&E(j)})},p);return h={id:f,observer:y,elements:_},i.push(f),a.set(f,h),h}function l(p,f,m){const{id:h,observer:_,elements:y}=c(m);return y.set(p,f),_.observe(p),function(){if(y.delete(p),_.unobserve(p),y.size===0){_.disconnect(),a.delete(h);const b=i.findIndex(E=>E.root===h.root&&E.margin===h.margin);b>-1&&i.splice(b,1)}}}function u(p){let{rootRef:f,rootMargin:m,disabled:h}=p;const _=h||!o,[y,x]=(0,r.useState)(!1),b=(0,r.useRef)(null),E=(0,r.useCallback)(v=>{b.current=v},[]);(0,r.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:m})}else if(!y){const v=(0,s.requestIdleCallback)(()=>x(!0));return()=>(0,s.cancelIdleCallback)(v)}},[_,m,f,y,b.current]);const j=(0,r.useCallback)(()=>{x(!1)},[]);return[E,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)}(on,on.exports)),on.exports}var cn={exports:{}},ln={exports:{}},_r={},No;function Vm(){return No||(No=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"normalizeLocalePath",{enumerable:!0,get:function(){return t}});function t(r,s){let o;const a=r.split("/");return(s||[]).some(i=>a[1]&&a[1].toLowerCase()===i.toLowerCase()?(o=i,a.splice(1,1),r=a.join("/")||"/",!0):!1),{pathname:r,detectedLocale:o}}}(_r)),_r}var Io;function Wm(){return Io||(Io=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return r}});const r=(s,o)=>process.env.__NEXT_I18N_SUPPORT?Vm().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)}(ln,ln.exports)),ln.exports}var un={exports:{}},gr={},Ro;function Gm(){return Ro||(Ro=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"detectDomainLocale",{enumerable:!0,get:function(){return t}});function t(r,s,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(s===l||o===c.defaultLocale.toLowerCase()||(i=c.locales)!=null&&i.some(u=>u.toLowerCase()===o))return c}}}}(gr)),gr}var wo;function Km(){return wo||(wo=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 s=arguments.length,o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];if(process.env.__NEXT_I18N_SUPPORT)return Gm().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)}(un,un.exports)),un.exports}var Ao;function Xm(){return Ao||(Ao=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return o}});const r=kn(),s=process.env.__NEXT_ROUTER_BASEPATH||"";function o(a,i,c,l){if(process.env.__NEXT_I18N_SUPPORT){const u=Wm().normalizeLocalePath,p=Km().detectDomainLocale,f=i||u(a,c).detectedLocale,m=p(l,void 0,f);if(m){const h="http"+(m.http?"":"s")+"://",_=f===m.defaultLocale?"":"/"+f;return""+h+m.domain+(0,r.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)}(cn,cn.exports)),cn.exports}var dn={exports:{}},To;function Ym(){return To||(To=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return a}});const r=bc(),s=kn(),o=process.env.__NEXT_ROUTER_BASEPATH||"";function a(i,c){return(0,s.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 pn={exports:{}},Lo;function Qm(){return Lo||(Lo=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 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 p},isThenable:function(){return m}});const s="refresh",o="navigate",a="restore",i="server-patch",c="prefetch",l="fast-refresh",u="server-action";var p;(function(h){h.AUTO="auto",h.FULL="full",h.TEMPORARY="temporary"})(p||(p={}));var f;(function(h){h.fresh="fresh",h.reusable="reusable",h.expired="expired",h.stale="stale"})(f||(f={}));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)}(pn,pn.exports)),pn.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return S}});const r=Le,s=n,o=r._(g),a=Fm(),i=xc(),c=_c(),l=Ln(),u=Um(),p=jc(),f=Hm(),m=qm(),h=Xm(),_=Ym(),y=Qm(),x=new Set;function b(C,I,L,T,k,M){if(typeof window>"u"||!M&&!(0,i.isLocalURL)(I))return;if(!T.bypassPrefetchedCheck){const D=typeof T.locale<"u"?T.locale:"locale"in C?C.locale:void 0,U=I+"%"+L+"%"+D;if(x.has(U))return;x.add(U)}(async()=>M?C.prefetch(I,k):C.prefetch(I,L,T))().catch(D=>{if(process.env.NODE_ENV!=="production")throw D})}function E(C){const L=C.currentTarget.getAttribute("target");return L&&L!=="_self"||C.metaKey||C.ctrlKey||C.shiftKey||C.altKey||C.nativeEvent&&C.nativeEvent.which===2}function j(C,I,L,T,k,M,Q,D,U){const{nodeName:F}=C.currentTarget;if(F.toUpperCase()==="A"&&(E(C)||!U&&!(0,i.isLocalURL)(L)))return;C.preventDefault();const G=()=>{const H=Q??!0;"beforePopState"in I?I[k?"replace":"push"](L,T,{shallow:M,locale:D,scroll:H}):I[k?"replace":"push"](T||L,{scroll:H})};U?o.default.startTransition(G):G()}function v(C){return typeof C=="string"?C:(0,c.formatUrl)(C)}const S=o.default.forwardRef(function(I,L){let T;const{href:k,as:M,children:Q,prefetch:D=null,passHref:U,replace:F,shallow:Y,scroll:G,locale:H,onClick:Z,onMouseEnter:re,onTouchStart:le,legacyBehavior:se=!1,...ie}=I;T=Q,se&&(typeof T=="string"||typeof T=="number")&&(T=(0,s.jsx)("a",{children:T}));const $=o.default.useContext(p.RouterContext),J=o.default.useContext(f.AppRouterContext),R=$??J,W=!$,ae=D!==!1,he=D===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 O=o.default.useRef(!1);I.prefetch&&!O.current&&!W&&(O.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&&!M){let z;if(typeof k=="string"?z=k:typeof k=="object"&&typeof k.pathname=="string"&&(z=k.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:w}=o.default.useMemo(()=>{if(!$){const ye=v(k);return{href:ye,as:M?v(M):ye}}const[z,pe]=(0,a.resolveHref)($,k,!0);return{href:z,as:M?(0,a.resolveHref)($,M):pe||z}},[$,k,M]),Ne=o.default.useRef(N),q=o.default.useRef(w);let K;if(se)if(process.env.NODE_ENV==="development"){Z&&console.warn('"onClick" was passed to <Link> with `href` of `'+k+'` 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 `'+k+'` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link');try{K=o.default.Children.only(T)}catch{throw T?new Error("Multiple children were passed to <Link> with `href` of `"+k+"` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children"+(typeof window<"u"?`
3
3
  Open your browser's console to view the Component stack trace.`:"")):new Error("No children were passed to <Link> with `href` of `"+k+"` but one child is required https://nextjs.org/docs/messages/link-no-children")}}else K=o.default.Children.only(T);else if(process.env.NODE_ENV==="development"&&(T==null?void 0:T.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:L,[Re,be,ge]=(0,m.useIntersection)({rootMargin:"200px"}),Ae=o.default.useCallback($=>{(q.current!==w||Ne.current!==N)&&(ge(),q.current=w,Ne.current=N),Re($),_e&&(typeof _e=="function"?_e($):typeof _e=="object"&&(_e.current=$))},[w,_e,N,ge,Re]);o.default.useEffect(()=>{process.env.NODE_ENV==="production"&&R&&(!be||!ae||b(R,N,w,{locale:H},{kind:he},W))},[w,N,be,H,ae,z==null?void 0:z.locale,R,W,he]);const je={ref:Ae,onClick($){if(process.env.NODE_ENV!=="production"&&!$)throw new Error('Component rendered inside next/link has to pass click event to "onClick" prop.');!se&&typeof Z=="function"&&Z($),se&&K.props&&typeof K.props.onClick=="function"&&K.props.onClick($),R&&($.defaultPrevented||j($,R,N,w,F,Y,G,H,W))},onMouseEnter($){!se&&typeof re=="function"&&re($),se&&K.props&&typeof K.props.onMouseEnter=="function"&&K.props.onMouseEnter($),R&&((!ae||process.env.NODE_ENV==="development")&&W||b(R,N,w,{locale:H,priority:!0,bypassPrefetchedCheck:!0},{kind:he},W))},onTouchStart:process.env.__NEXT_LINK_NO_TOUCH_START?void 0:function(pe){!se&&typeof le=="function"&&le(pe),se&&K.props&&typeof K.props.onTouchStart=="function"&&K.props.onTouchStart(pe),R&&(!ae&&W||b(R,N,w,{locale:H,priority:!0,bypassPrefetchedCheck:!0},{kind:he},W))}};if((0,l.isAbsoluteUrl)(w))je.href=w;else if(!se||U||K.type==="a"&&!("href"in K.props)){const $=typeof H<"u"?H:z==null?void 0:z.locale,pe=(z==null?void 0:z.isLocaleDomain)&&(0,h.getDomainLocale)(w,$,z==null?void 0:z.locales,z==null?void 0:z.domainLocales);je.href=pe||(0,_.addBasePath)((0,u.addLocale)(w,$,z==null?void 0:z.defaultLocale))}return se?o.default.cloneElement(K,je):(0,s.jsx)("a",{...ie,...je,children:T})});(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)})(qr,qr.exports);var Zm=qr.exports,Jm=Zm;const De=A.getDefaultExportFromCjs(Jm),ef="_link_w24h0_1",tf="_wrapper_w24h0_98",nf="_text_w24h0_106",yr={link:ef,wrapper:tf,text:nf},ze=({children:e,adornments:t,className:r,disableUnderline:s,href:o,mode:a,size:i,title:c,onClick:l,disablePadding:u,...p})=>{const f=d.helpers.ValidateProp({fieldTypes:Nt.SizesSmallExtended,property:i,fallback:"medium"}),m=d.helpers.ValidateProp({fieldTypes:Nt.Mode,property:a,fallback:"default"});return n.jsx(De,{...p,className:d.helpers.classNameConcat(yr.link,r),href:o&&o.length>0?o:"#","data-size":f,"data-variant":m,title:c||"NextLink","data-disable-underline":s??!1,"data-disable-padding":u??!0,children:n.jsxs("div",{className:yr.wrapper,onClick:l,children:[t==null?void 0:t.start,n.jsx("p",{className:yr.text,"data-size":f,children:e}),t==null?void 0:t.end]})})},rf=({ICONS:e})=>{const{resetFeedback:t}=vt();return n.jsxs("div",{className:Ft["wishlist--snack--actions"],children:[n.jsx(ze,{href:"/favoritos",children:"Ver Favoritos"}),n.jsx(d.Button,{variant:"tertiary",size:"small",onClick:t,adornment:{start:n.jsx(d.Icon,{name:e.close})}})]})},Is=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:r})=>{const s=ms(),{resetFeedback:o}=vt(),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)&&n.jsx(It,{Z_INDEX_WAR:r,className:Ft["wishlist--snack"],"data-action":s.action,title:s.action==="add"?e.messages.add:e.messages.remove,supportChildren:n.jsx(rf,{ICONS:t}),size:"medium"})};Is.displayName="WishList.Feedback";const Rs={"product-list--banner":"_product-list--banner_sfibj_1","product-list--card":"_product-list--card_sfibj_30","product-list":"_product-list_sfibj_1"},Sc=({className:e,children:t,columns:r=1,isMobile:s=!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":s||r<2?c:c.split("/").reverse().join("/"),[r,i,s]);return n.jsx("div",{...l,className:d.helpers.classNameConcat(Rs["product-list--banner"],e),style:{aspectRatio:u,maxWidth:`${r/i*100}%`,order:a,padding:o/2},children:t})};Sc.displayName="ProductList.Banner";const Ec=({isKit:e,parent:t,productId:r,setNotify:s,CONSTANTS:o})=>{const{router:a}=ce(),i=g.useRef(!1),c=g.useRef(null),[l,u]=g.useState([]),p=_=>a.push(_??""),f=async _=>{try{const y=await fetch("/api/catalog/product/similars",{method:"POST",body:JSON.stringify({productId:_,filterTexture:o.TEXTURE_IMAGE}),priority:"low"});if(!y.ok)throw new Error("Erro ao buscar similares.");const x=await y.json();u(x)}catch(y){console.error(y)}},m=g.useCallback(_=>{!r||!_||(typeof f=="function"&&f(r),i.current=!0)},[r]),h=g.useCallback((_,y)=>{if(!_.isIntersecting){o.PLP_INFINITE_SCROLL&&c.current&&(clearTimeout(c.current),c.current=null);return}if(_.intersectionRatio>=y.threshold&&!i.current){if(o.PLP_INFINITE_SCROLL){c.current=setTimeout(()=>{m(!0)},o.PLP_PRODUCT_SIMILAR_DELAY);return}m(!0)}},[m]);return g.useEffect(()=>{if(e||!t.current)return;const _={root:null,threshold:.1},y=new IntersectionObserver(([x])=>{h(x,_)},_);return y.observe(t.current),()=>{c.current&&clearTimeout(c.current),y.disconnect()}},[h,t,e]),n.jsx(me.Actions,{...l,callback:p,isKit:e,children:!e&&n.jsx(me.SizeSelector,{setNotify:s,PLP_SIZE_ORDER:o.PLP_SIZE_ORDER})})};Ec.displayName="ProductList.Card.Actions";const Pc=({className:e,children:t,gap:r=32,item:s,isMobile:o,order:a,tag:i,hasMaxWidth:c=!0,index:l,setSkuSelected:u,showVideo:p,CONSTANTS:f,...m})=>{const h=g.useRef(null),{availability:{status:_}}=s,y=g.useCallback((b,E)=>{var j;typeof u=="function"&&u((j=b.isVariantOf)==null?void 0:j.hasVariant,E)},[u]),x=s.name.substring(0,4).toLowerCase()==="kit ";return n.jsxs("div",{...m,className:d.helpers.classNameConcat(Rs["product-list--card"],e),"data-mobile":o,"data-order":a,ref:h,style:{...c&&{maxWidth:o?"50%":"25%"},order:a,padding:r/2},children:[n.jsxs(me.Root,{item:s,isMobile:o,index:l,size:o?"small":"medium",order:a,outStock:!_,CONSTANTS:f,children:[n.jsx(me.Header,{product:s,tag:i==null?void 0:i.commercial}),n.jsx(me.Media,{showVideo:p,hasPriority:!0}),n.jsxs(me.Wrapper,{type:"body",children:[n.jsx(me.Title,{tag:i==null?void 0:i.institucional}),n.jsx(Ec,{productId:s.isVariantOf.productGroupID,parent:h,setNotify:y,isKit:x,CONSTANTS:f}),!x&&n.jsx(me.OutStock,{callback:y})]}),n.jsx(me.Wrapper,{type:"footer",children:_&&n.jsx(me.BuyButton,{isKit:x})})]}),t]})};Pc.displayName="ProductList.Card";const Nc=({children:e,className:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat(Rs["product-list"],t),children:e});Nc.displayName="ProductList.Grid";const tt={Banner:Sc,Card:Pc,Root:Nc,helpers:Kp},sf="_pdc_alo7z_1",Ge={"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:sf},ws=({className:e,ICONS:t,PLP_NOT_RESULT:r})=>{const{router:s}=ce(),{isMobile:o}=ne(),a=()=>{s.push(r==null?void 0:r.link)};return n.jsxs("div",{className:d.helpers.classNameConcat(Ge["pdc--empty"],e),children:[n.jsxs(d.TextStructure.DivWrapper,{className:Ge["pdc--empty-wrapper"],children:[n.jsx("span",{className:o?"typography-style-body-md":"typography-style-heading-sm",children:r.title}),n.jsx("p",{className:o?"typography-style-body-xs":"typography-style-body-sm",children:r.subtitle})]}),n.jsx(d.Button,{adornment:{end:n.jsx(d.Icon,{name:t.arrow_right})},className:"typography-style-body-sm-strong",onClick:()=>a(),variant:"tertiary",children:n.jsx("b",{children:r.text})})]})};ws.displayName="PDC.Empty";const On=e=>n.jsx("div",{...e,className:Ge["pdc--infinite--next-page"],children:n.jsx(d.Spinner,{className:Ge["pdc--infinite--next-page--spinner"]})});On.displayName="PDC.Spinner";function Ic({CONSTANTS:e}){const{sendDataLayerEvent:t}=oe(),{isMobile:r}=ne(),{getAvailableProductTag:s}=dt(),[o,a]=g.useState([]),[i,c]=g.useState(!0),l=Lt(),u=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(f=>f.json()).then(f=>{a(f),t({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:f}}})}).catch(f=>console.error(f)):a([]),c(!1)};if(l.length){p();return}if(l.length===0&&o.length===0){c(!1);return}a([]),c(!1)},[l]),n.jsx("section",{className:Ft["wishlist-grid"],children:n.jsxs("div",{className:Ft["wishlist-grid--container"],children:[i&&n.jsx(On,{}),!l.length&&!(o!=null&&o.length)&&!i&&n.jsx(ws,{className:Ft["pdc-empty-modifier"],ICONS:e.ICONS,PLP_NOT_RESULT:e.WISHLIST_NOT_RESULT}),n.jsx(tt.Root,{children:Array.isArray(o)&&o.map((p,f)=>{const m=p.node.cluster.highlights||[],h=s(m);return n.jsx(tt.Card,{gap:u,isMobile:r??!1,item:p.node,tag:h,index:f,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)})})]})})}Ic.displayName="Wishlist.Grid";const of=e=>e.map(t=>{var r;return(r=t.isVariantOf)==null?void 0:r.productGroupID})??[],Rc=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:r})=>{const s=kt(),o=Lt(),a=ms(),{updateList:i}=vt();return g.useEffect(()=>{var l,u;a.active&&Ze.set("fs::wishlist",o);const c=async()=>{var p;await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:o,docId:(p=s==null?void 0:s.user)==null?void 0:p.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 p=await Ze.get("fs::wishlist");p&&(p==null?void 0:p.length)!==o.length&&i(p)},l=async()=>{var h;const p=await Ze.get("fs::wishlist")??[],f=s.wishlist?typeof s.wishlist[0]=="object"?of(s.wishlist):s.wishlist:[],m=[...new Set([...p,...f])];i(m),Ze.set("fs::wishlist",o),f.length!==m.length&&await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:m,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]),n.jsx(Is,{ICONS:t,Z_INDEX_WAR:r,WISHLIST_INFO:e})};Rc.displayName="Wishlist.Init";const wc=({product:e,priceInfo:t,size:r="medium",style:s,ICONS:o})=>{const{sendDataLayerEvent:a,currentLocalRef:i}=oe(),c=Lt(),{toggleProduct:l}=vt(),{isVariantOf:{productGroupID:u}}=e;return n.jsx(d.Button,{adornment:{start:n.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:{...s,border:"none"},variant:"tertiary"})};wc.displayName="WishList.Toggle";const Ac={Feedback:Is,Toggle:wc,Grid:Ic,Init:Rc},Tc=({product:e,tag:t,size:r="small"})=>{const{CONSTANTS:s}=Ke(),{tags:o}=dt(),a=e.offers.offers[0],i=A.getDiscountPercent(a.listPrice,a.price),c=o==null?void 0:o.flagDiscount;return n.jsxs(me.Wrapper,{type:"header",style:{zIndex:s.Z_INDEX_WAR.product_card_header},children:[i>0&&!t&&(c==null?void 0:c.enableTag)&&n.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?n.jsx(d.Tag,{title:t.value,adornment:{start:t.enableIcon&&t.icon?n.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,s.PRODUCT_CARD_TOP_WISHLIST_TOGGLE&&n.jsx(Ac.Toggle,{product:e,priceInfo:{price:a.price,listPrice:a.listPrice},variant:"card",ICONS:s.ICONS})]})};Tc.displayName="ProductCard.Actions.Header";const Lc=({className:e,children:t,hasPriority:r=!1,showVideo:s=!1,...o})=>{const{element:a,index:i,item:{image:c,slug:l,video:u},sendSelectItemEvent:p,order:f,CONSTANTS:m}=Ke(),h=A.getFirstImages({images:c,label:{first:m.MAIN_IMAGE,second:m.SECOND_IMAGE}});return n.jsxs("div",{...o,className:d.helpers.classNameConcat(we["product-card--image"],e),ref:a,style:{aspectRatio:m.PRODUCT_CARD_IMAGE_ASPECT_RATIO},children:[n.jsx(De,{href:`/${l}/p`,onClick:p,onMouseUp:_=>{_.button===1&&p(),m.PLP_INFINITE_SCROLL&&sessionStorage.setItem(m.PLP_GRID_SCROLL_BACK.order,String(f))},children:n.jsx("div",{className:we["product-card--image--container"],children:Array.isArray(h)&&h.map(({url:_,alternateName:y},x)=>g.createElement(Ie.Image,{...m.PRODUCT_IMAGE_DIMENSIONS.product_card,style:m.PRODUCT_IMAGE_DIMENSIONS.product_card,alt:y??"product image",key:x,...r&&{priority:x===0&&i<4},objectFit:"cover",src:_}))})}),m.PLP_SHOW_VIDEO_ON_PRODUCT_CARD&&s&&u&&n.jsx(me.Video,{url:u,poster:h[0].url}),t]})};Lc.displayName="ProductCard.Media.Media";const kc=({className:e,callback:t,children:r,...s})=>{const{isMobile:o,item:a,CONSTANTS:{PRODUCT_CARD_TEXTS:i}}=Ke(),{availability:{status:c}}=a;return c?null:n.jsxs("div",{...s,className:d.helpers.classNameConcat(we["product-card--outstock"],e),children:[n.jsx(d.Tag,{size:"small",variant:"secondary",title:i.disabled,children:i.disabled}),n.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})]})};kc.displayName="ProductCard.OutStock";const Oc=({children:e,className:t="",index:r,isMobile:s=!1,item:o,size:a,order:i,outStock:c,shelfTitle:l,CONSTANTS:u,...p})=>n.jsx(Cm,{item:o,isMobile:s,outStock:c,order:i,size:a,index:r,shelfTitle:l,CONSTANTS:u,children:n.jsx("div",{...p,className:d.helpers.classNameConcat(we["product-card--wrapper"],t),"data-size":a,children:e})});Oc.displayName="ProductCard.Root";const Mc=({disabled:e,label:t,size:r,value:s,onClick:o,...a})=>n.jsxs(d.ToggleSize.Wrapper,{...a,disabled:!1,outOfStock:e,size:r,onClick:o,children:[n.jsx(d.ToggleSize.DisabledAdornment,{}),n.jsx(d.ToggleSize.Text,{children:t})]});Mc.displayName="ProductCard.SizeSelector.Item";const Dc=({active:e=!1,callback:t,selectedSku:r=null,item:s,setNotify:o})=>{const{item:a,isMobile:i,setSelectedSku:c,eventDataRef:l}=Ke();s.productId=a.id;const u=A.disableSKU(s),p=A.getSKUName(s,"tamanho");!u&&!l.current.availableSkus.includes(p)&&l.current.availableSkus.push(p);const f=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,s);return}f(s)},[s,o,f,u,a]);return n.jsx(Mc,{active:e,disabled:u,label:p,onClick:()=>m(),size:i?"x-small":"small",value:s})};Dc.displayName="ProductCard.SizeSelector.SkuItem";const zc=({items:e,getLabel:t,PLP_SIZE_ORDER:r})=>Array.isArray(e)?[...e].sort((s,o)=>{const a=t(s).toUpperCase(),i=t(o).toUpperCase(),c=r.indexOf(a)-r.indexOf(i);return c!==0?c:a.localeCompare(i,"pt-BR")}):[],$c=({callback:e,className:t="",children:r,setNotify:s,PLP_SIZE_ORDER:o,...a})=>{const{isMobile:i,item:{isVariantOf:{hasVariant:c}},selectedSku:l}=Ke(),u=g.useMemo(()=>Array.isArray(c)?zc({items:c,getLabel:p=>A.getSKUName(p,"tamanho"),PLP_SIZE_ORDER:o}):[],[c]);return n.jsxs("div",{...a,className:d.helpers.classNameConcat(we["product-card--selectors--size"],t),"data-mobile":i,children:[n.jsx("div",{className:we["product-card--selectors--size--skus"],children:u.map((p,f)=>n.jsx(Dc,{active:l===p,callback:e,item:p,selectedSku:l,setNotify:s},`size--${f}--${p.sku}`))}),n.jsx("div",{className:we["product-card--selectors--size--button"],children:r})]})};$c.displayName="ProductCard.SizeSelector";const Vr=({alt:e="",callback:t,more:r,total:s=4,src:o,url:a,...i})=>n.jsxs(d.ToggleStyle.Wrapper,{...i,onClick:()=>{typeof t=="function"&&t(a)},children:[n.jsx(d.ToggleStyle.DisabledAdornment,{}),n.jsxs(d.ToggleStyle.Texture,{children:[o&&n.jsx(Ie.Image,{alt:e??o,src:o,height:34,width:34}),r&&n.jsx(d.TextStructure.DivWrapper,{className:we["product-card--selectors--style--more"],children:n.jsxs("p",{children:["+ ",s]})})]})]}),af=({children:e,callback:t,data:r,total:s=4,size:o,...a})=>{const{index:i}=Ke(),{triggerSelectItemEventRef:c}=oe();return n.jsxs("div",{...a,children:[e,Array.isArray(r)&&r.slice(0,s).map((l,u)=>n.jsx(Vr,{callback:p=>{c.current.trigger=!0,c.current.index=i,typeof t=="function"&&t(p)},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)>s&&n.jsx(Vr,{size:o,total:r.length-s,more:!0})]})},Fc=({callback:e,className:t,data:r,images:s=[],findTexture:o,...a})=>{const{CONSTANTS:i}=Ke(),c=o||i.TEXTURE_IMAGE,l=s==null?void 0:s.find(u=>c.includes(u.alternateName));return n.jsx(af,{...a,callback:e,className:d.helpers.classNameConcat(we["product-card--selectors--style"],t),data:r,size:"x-small",children:l&&n.jsx(Vr,{active:!0,size:"x-small",src:l.url})})};Fc.displayName="ProductCard.StyleSelector";const Bc=({className:e,hasDecimal:t,...r})=>{const{isMobile:s,item:{offers:{lowPrice:o,highPrice:a},installments:{count:i,value:c}},eventDataRef:l}=Ke();l.current.priceInfo={price:o,listPrice:a};const u=A.formatPriceToCurrency(a,t),p=A.formatPriceToCurrency(o,t),f=A.formatPriceToCurrency(c??0),m=s?"horizontal":"stacked";return n.jsx("div",{...r,className:d.helpers.classNameConcat(we["product-card--price"],e),"data-mobile":s,children:n.jsx(d.ProductInfo.Root,{size:"small",layout:m,children:n.jsxs(d.ProductInfo.Wrapper,{size:"small",layout:m,children:[n.jsx(d.ProductInfo.ValuesWrapper,{children:p!==u?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:u,size:"small"}),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:p,size:"small"})]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:p,size:"small"})}),i&&i>1&&c?n.jsx(d.ProductInfo.Price,{label:"installment",value:`${i}x ${f}`,size:"small"}):null]})})})};Bc.displayName="ProductCard.Price";const Uc=({tag:e,className:t})=>{const{item:{name:r}}=Ke();return n.jsxs("div",{className:d.helpers.classNameConcat(we["product-card--title"],t),children:[n.jsx("div",{className:we["product-card--title--tag"],children:e?n.jsx(d.Tag,{size:"small",title:e.value,variant:"quaternary",adornment:{start:e.enableIcon&&e.icon?n.jsx(d.Icon,{name:e.icon,style:{color:e.iconColor}}):null},style:{background:e.tagColor,color:e.textColor},children:e.value}):n.jsx("div",{})}),n.jsx("div",{className:we["product-card--title--content"],children:r&&n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h3",{children:r})})})})]})};Uc.displayName="ProductCard.Title";const Hc=({className:e,url:t,poster:r,...s})=>{const{element:o}=Ke();return g.useEffect(()=>{if(!(o!=null&&o.current))return;const a=o.current,i=a.querySelector("video");if(i){const c=new IntersectionObserver(p=>{p.forEach(f=>{A.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]),n.jsx("div",{...s,className:d.helpers.classNameConcat(we["product-card--video"],e),children:t&&n.jsx(Ie.Video,{autoPlay:!1,muted:!0,loop:!0,preload:"none",playsInline:!0,poster:r})})};Hc.displayName="ProductCard.Media.Video";const qc=({children:e,className:t,type:r,...s})=>n.jsx("div",{...s,className:d.helpers.classNameConcat(we[`product-card--${r}`],t),children:e});qc.displayName="ProductCard.Wrapper";const me={Actions:pc,BuyButton:mc,Header:Tc,Media:Lc,Root:Oc,OutStock:kc,Price:Bc,SizeSelector:$c,StyleSelector:Fc,Title:Uc,Video:Hc,Wrapper:qc},cf="_carousel_245ib_1",lf="_shelf__container_245ib_14",uf="_shelf_without_carousel_245ib_34",df="_card_container_245ib_50",Pt={carousel:cf,"custom-controllers":"_custom-controllers_245ib_5",shelf__container:lf,"controllers-arrows-bullets":"_controllers-arrows-bullets_245ib_23",shelf_without_carousel:uf,card_container:df},ko=({title:e})=>n.jsx("div",{className:Pt.shelf__container,children:e&&n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h2",{className:d.helpers.classNameConcat("typography-style-body-md",A.responsive["responsive-mobile-flex"]),children:e}),n.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-md",A.responsive["responsive-desktop-flex"]),children:e})]})})}),pf=({children:e,ICONS:t,itemsPerPage:r,title:s})=>{const{isMobile:o}=ne(),a=r[o?"mobile":"desktop"],{initialize:i,controller:c,itemsStyles:l,pagination:u}=d.Carousel.useCarousel({itemsPerPage:a,gap:10,loop:!0,direction:"row"}),p=g.Children.toArray(e).length;return o||p>=4?n.jsxs(d.Carousel.Root,{innerRef:m=>{i(m)},className:Pt.carousel,children:[n.jsxs("div",{className:Pt["custom-controllers"],children:[s&&n.jsx(ko,{title:s}),a<p&&n.jsxs(d.Carousel.Controller,{className:Pt["controllers-arrows-bullets"],children:[n.jsxs(d.Carousel.Arrows,{children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:n.jsx(d.Icon,{name:t.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:n.jsx(d.Icon,{name:t.arrow_right})}})]}),!o&&a>2&&n.jsx(d.Carousel.Bullets,{page:u.currentPage,total:u.totalPages,onBulletClick:m=>c==null?void 0:c.navigateTo(m)})]})]}),n.jsx(d.Carousel.Body,{children:g.Children.map(e,(m,h)=>n.jsx(d.Carousel.Item,{style:{...l,overflow:"hidden"},children:m},`${s}_${h}`))})]}):n.jsxs(n.Fragment,{children:[s&&n.jsx(ko,{title:s}),n.jsx("div",{className:Pt.shelf_without_carousel,children:e})]})},Vc=({className:e,item:t,isMobile:r,size:s,shelfTitle:o,...a})=>{const i=g.useRef(null),{getAvailableProductTag:c}=dt(),{availability:{status:l}}=t,u=f=>{const m=f.filter(h=>!a.CONSTANTS.TEXTURE_IMAGE.includes(h.keywords));return r?m.splice(0,2):m},p=c(t.cluster.highlights);return n.jsx("div",{ref:i,className:Pt.card_container,children:n.jsxs(me.Root,{...a,item:{...t,image:u(t.image)},isMobile:r,size:r?"small":"medium",outStock:!l,shelfTitle:o,children:[n.jsx(me.Header,{product:t,tag:p==null?void 0:p.commercial}),n.jsx(me.Media,{}),n.jsxs(me.Wrapper,{type:"body",children:[n.jsx(me.Title,{tag:p==null?void 0:p.institucional}),n.jsx(me.Actions,{})]}),n.jsx(me.Wrapper,{type:"footer"})]})})};Vc.displayName="ProductList.Card";const Ht={Shelf:pf,Card:Vc},Wc=({CONSTANTS:e,inView:t,products:r,innerRef:s})=>{const o=g.useMemo(()=>bm(r),[r]),{isMobile:a}=ne(),{addItemsToCart:i}=ve(),{sendDataLayerEvent:c}=oe(),{getAvailableProductTag:l}=dt(),[u,p]=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}}})},m=({selectedProduct:h,productId:_})=>{const y=jm({selectedProduct:h,productId:_,prevState:u,mainSellerId:e.StoreConfig_MainSellerId});p(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]),n.jsxs("div",{className:ct.container,ref:s,children:[n.jsx("div",{className:ct["carousel-container"],style:{width:o.length<=3?"max-content":"75%"},children:n.jsx(Ht.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,E,j;const y=l(h.cluster.highlights),{availability:{status:x}}=h;return x?n.jsxs(me.Root,{item:{...h,image:Es.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:[n.jsx(me.Header,{product:h,tag:y.commercial}),n.jsx(me.Media,{}),n.jsxs(me.Wrapper,{type:"body",children:[n.jsx(me.Title,{tag:{value:(b=y.institucional)==null?void 0:b.value,enableIcon:(E=y.institucional)==null?void 0:E.enableIcon,icon:(j=y.institucional)==null?void 0:j.icon}}),n.jsx(me.Actions,{children:n.jsx(me.SizeSelector,{callback:v=>m({selectedProduct:v,productId:h.id}),PLP_SIZE_ORDER:e.PLP_SIZE_ORDER})})]})]},h.id):null})})}),n.jsx("div",{className:ct["add-cart-container"],children:n.jsx(vm,{handleAddAllToCart:f,selectedProducts:u,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,BUY_PACKAGE:e.BUY_PACKAGE,FREIGHT_CALCULATION:e.FREIGHT_CALCULATION}})})]})},As={"btn-login":"_btn-login_yas63_12","btn-header":"_btn-header_yas63_22","header-animation":"_header-animation_yas63_35"},Ts=({id:e})=>{const{setIsOpen:t,cartStore:{items:r}}=ve(),{handleSelectContent:s}=oe(),{CONSTANTS:o}=Ee(),a=r.reduce((i,c)=>i+(c.quantity??0),0);return n.jsx(d.Header.SupportItem,{onClick:()=>{t(!0),s({content:"header:minicart"})},id:e,children:n.jsxs(d.Badge.AutoPositioner,{children:[n.jsx(d.Badge.Count,{count:a,size:"medium",variant:"primary",style:{backgroundColor:"black",display:a>0?"flex":"none"}}),n.jsx(d.Icon,{name:o.header.ICONS.bag,size:"medium"})]})})};Ts.displayName="Header.Bag";const Xt=({children:e,href:t,...r})=>t&&t!=="#"?n.jsx(De,{href:t.startsWith("/")?t:`/${t}`,...r,children:e}):e,Gc=()=>{const{headerData:e}=Ee(),{handleSelectContent:t}=oe(),{reset:r,updateValue:s}=Wt(),o=a=>{a?s(a):r()};return n.jsx(d.Header.Categories,{children:Array.isArray(e.categories)&&e.categories.map((a,i)=>n.jsx(Xt,{href:a.link,onMouseEnter:()=>o(a.submenuId),onFocus:()=>o(a.submenuId),children:n.jsx(d.Header.CategoryItem,{className:As["btn-header"],value:a.submenuId??null,adornment:{start:n.jsx(d.Icon,{name:a.iconStart}),end:n.jsx(d.Icon,{name:a.iconEnd})},style:{textWrap:"nowrap",gap:"0"},onClick:()=>{t({content:`header:${a.label}`})},children:a.label})},`category-${a.label}-${i}`))})};Gc.displayName="Header.Categories";function mf(){const{handleSelectContent:e}=oe(),{CONSTANTS:t}=Ee(),{setValue:r}=Rn();return n.jsx(d.Header.SupportItem,{onClick:()=>{r(!0),e({content:"header:search"})},children:n.jsx(d.Icon,{name:t.header.ICONS.search,size:"medium"})})}const ff={"menu-subcategories-container":"_menu-subcategories-container_a93cr_1"},hf={"observer-wrapper":"_observer-wrapper_r43gk_1"},Mn=({children:e,eventData:t,observerOptions:r,callBackWhenVisible:s,stopOnIntersection:o=!0,className:a,...i})=>{const c=g.useRef(null),l=os(c,o,r),{sendDataLayerEvent:u}=oe();return g.useEffect(()=>{l&&(typeof s=="function"&&s(),t&&u({...t}))},[l]),n.jsx("div",{...i,ref:c,className:d.helpers.classNameConcat(hf["observer-wrapper"],a),children:e})},Kc=({thumbnails:e,category:t,isMobile:r=!0,callBack:s})=>{const{handleSelectPromotionEvent:o}=oe(),a=50/e.length;return n.jsx("div",{className:ff["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 n.jsx(Mn,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...u}}}},observerOptions:{delay:1e3},children:n.jsxs(De,{href:i.link??"#",onClick:()=>{typeof s=="function"&&s(),o({updatePromotionRef:!0,promotion:u})},children:[n.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&&n.jsx("p",{children:i.label})]})},`thumb-${i.label}-${c}`)})})};Kc.displayName="Menu.Thumbnail";const Wr={"menu-desktop":"_menu-desktop_1b799_1","menu-categories":"_menu-categories_1b799_12"},Xc=({children:e,dividerOnRight:t=!0,subMenu:r,...s})=>{var l;const{router:o}=ce(),{reset:a}=Wt(),{handleSelectContent:i}=oe(),{CONSTANTS:c}=Ee();return n.jsxs("div",{...s,className:Wr["menu-categories"],children:[(l=r==null?void 0:r.subCategories)==null?void 0:l.map((u,p)=>{var h,_,y,x;const f=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:n.jsx(d.Icon,{name:c.header.ICONS.arrow_right,size:"small"})}};return n.jsxs(d.ComponentList.Structure,{children:[n.jsx(Xt,{href:u.linkLabel,title:u.label,onClick:()=>{u.linkLabel&&(a(),i({content:`menu:${u.label??""}:${r.label??""}`}))},children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h2",{children:u.label})})})}),n.jsx(d.ComponentList.List,{columns:1,...f,className:Wr["submenu-categories"],children:(y=u.items)==null?void 0:y.map((b,E)=>n.jsx(d.ComponentList.ListItem,{id:`list-item-${b.label}-${E}`,children:n.jsx(ze,{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}-${E}`))}),((x=u.see_all)==null?void 0:x.link)&&n.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}-${p}`)}),t&&n.jsx(d.Utils.Divider,{size:"small",direction:"vertical"})]})};Xc.displayName="Menu.Categories";const Yc=({children:e,dividerOnBottom:t=!0,...r})=>{const{CONSTANTS:s}=Ee();return n.jsxs(n.Fragment,{children:[n.jsx("div",{...r,className:Wr["menu-desktop"],style:{...r.style,justifyContent:s.header.ALIGNMENT_MENU},children:e}),t&&n.jsx(d.Utils.Divider,{size:"small"})]})};Yc.displayName="Menu.MenuRoot";const xr={Root:Yc,Categories:Xc,Thumbnail:Kc},Qc=()=>{const{headerData:e,CONSTANTS:t}=Ee(),r=Va(),{reset:s}=Wt();return n.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,p=i==null?void 0:i.some(f=>!!f.srcDesk);return n.jsxs(xr.Root,{id:l,style:u?{display:"flex",zIndex:t.header.Z_INDEX_WAR.menu_desktop}:{display:"none"},dividerOnBottom:u,children:[n.jsx(xr.Categories,{dividerOnRight:!!p,subMenu:o}),Array.isArray(i)&&n.jsx(xr.Thumbnail,{thumbnails:i,isMobile:!1,category:c,callBack:s})]},`submenu-${l}-${a}`)})})};Qc.displayName="Header.SubMenu";const Zc=()=>{const{handleSelectContent:e}=oe(),{CONSTANTS:t}=Ee();return n.jsx(De,{href:"/favoritos",children:n.jsx(d.Header.SupportItem,{onClick:()=>e({content:"header:wishlist"}),children:n.jsx(d.Icon,{name:t.header.ICONS.favorite_false,size:"medium"})})})};Zc.displayName="Header.WishList";const _f="_root_wvekm_126",Ve={"user-menu--credits":"_user-menu--credits_wvekm_1","user-menu--content":"_user-menu--content_wvekm_10","user-menu--login":"_user-menu--login_wvekm_30","user-menu--login--content":"_user-menu--login--content_wvekm_37","user-menu--menu":"_user-menu--menu_wvekm_64","user-menu--tooltip":"_user-menu--tooltip_wvekm_93","tooltip-modifier":"_tooltip-modifier_wvekm_104","modal-controls-modifier":"_modal-controls-modifier_wvekm_109","modal-header-modifier":"_modal-header-modifier_wvekm_117",root:_f},Jc=({className:e,children:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat(Ve["user-menu--content"],e),children:t});Jc.displayName="UserMenu.Content";var el=(e=>(e.Account="account",e))(el||{});const tl=({className:e,cashBack:t,credits:r,link:s,total:o,...a})=>{const i=t?A.formatPriceToCurrency(t):void 0,c=r?A.formatPriceToCurrency(r):void 0,l=o?A.formatPriceToCurrency(o):void 0;return n.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:el.Account})};tl.displayName="UserMenu.Credits";const nl=({className:e,children:t,description:r,text:s,...o})=>{const{isMobile:a}=ne();return n.jsx("div",{...o,className:d.helpers.classNameConcat(Ve["user-menu--login"],e),"data-mobile":a,children:n.jsxs("div",{className:Ve["user-menu--login--content"],children:[n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:[n.jsx("h3",{className:"typography-style-body-lg-strong",children:s}),n.jsx("p",{children:r})]})}),t]})})};nl.displayName="UserMenu.Login";const rl=({className:e,isLogged:t,onLogoutClick:r,ICONS:s,storeConfig:o,isMobile:a})=>{const i=a?Ws:Ws({ICONS:s,storeConfig:o}).filter(c=>c.deviceShown==="both"||c.deviceShown===(a?"mobile":"desktop"));return n.jsxs("ul",{className:d.helpers.classNameConcat(Ve["user-menu--menu"],e),children:[Array.isArray(i)&&i.map((c,l)=>n.jsx("li",{children:n.jsx(ze,{href:c.href??"#",size:"small",disableUnderline:!0,adornments:{start:n.jsx(d.Icon,{name:c.icon??"delete"})},children:c.label})},l)),t?n.jsx("li",{children:n.jsx(ze,{href:`${o.secureSubdomain}/api/vtexid/pub/logout?scope=mariafilo&returnUrl=${encodeURIComponent(`${o.storeUrl}`)}`,size:"small",disableUnderline:!0,onClick:r,adornments:{start:n.jsx(d.Icon,{name:Op(s)})},children:kp})}):n.jsx(n.Fragment,{})]})};rl.displayName="UserMenu.Menu";const sl=e=>{const t=g.useRef(null),r=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",r),document.addEventListener("keydown",o),document.addEventListener("touchstart",s),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("keydown",o),document.removeEventListener("touchstart",s)}),[r,o,s]),{ref:t}},gf=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},yf=(e,t,r)=>{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?gf(e==null?void 0:e.parentElement):0;return{left:o+i/2-(c.width+l*2),top:a+s+r}},ol=g.createContext({}),xf=({children:e,delay:t=600,gap:r=20,isOpen:s,setIsOpen:o,target:a,...i})=>{const c=g.useRef(null),[l,u]=g.useState(!1),[p,f]=g.useState({left:0,top:0}),{ref:m}=sl(()=>{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:_}=yf(m.current,a,r??0);f({left:h,top:_}),u(!1)}},[r,s,a,m]),n.jsx(ol.Provider,{value:g.useMemo(()=>({...i,...p,contentRef:m,isLeaving:l,isOpen:s,setIsOpen:o,setIsLeaving:u,target:a}),[i,p,m,l,s,o,u,a]),children:e})},al=()=>{const e=g.useContext(ol);if(e===void 0)throw new Error("useUserMenuContext must be used within a UserMenuProvider");return e},il=({children:e,isMobile:t=!1,Z_INDEX_WAR:r})=>{const{isOpen:s,setIsOpen:o}=al();return n.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:r.user_menu_mobile},children:[n.jsx(d.Modal.Header,{navigation:"top",className:Ve["modal-header-modifier"],children:n.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0,className:Ve["modal-controls-modifier"]})}),n.jsx(d.Modal.Body,{children:e})]})};il.displayName="UserMenu.Modal";const cl=({children:e,component:t,Z_INDEX_WAR:r,isMobile:s,...o})=>n.jsx(xf,{...o,className:Ve.root,children:s?n.jsxs(n.Fragment,{children:[n.jsx(it.Modal,{Z_INDEX_WAR:r,children:t}),e]}):n.jsx(it.Tooltip,{component:t,style:{width:304,zIndex:r.user_menu},Z_INDEX_WAR:r,children:e})});cl.displayName="UserMenu.Root";const ll=({children:e,component:t,Z_INDEX_WAR:r,...s})=>{const{contentRef:o,left:a,isLeaving:i,isOpen:c,top:l}=al();return n.jsx(d.Tooltip.Root,{arrow:"top-right",component:n.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:r.user_menu},children:n.jsx("div",{className:Ve["user-menu--tooltip"],children:e})})};ll.displayName="UserMenu.Tooltip";const it={Credits:tl,Content:Jc,Login:nl,Menu:rl,Modal:il,Root:cl,Tooltip:ll},Dn=({children:e,isOpen:t,setIsOpen:r,desktopUserMenuTarget:s,mobileUserMenuTarget:o,storeConfig:a})=>{var h,_,y;const{isMobile:i}=ne(),{CONSTANTS:c}=Ee(),l=kt(),u=()=>{window.location.href=`${a.secureSubdomain}/api/io/login?returnUrl=${encodeURIComponent(`${window.location.href}`)}`},p=!!((h=l.user)!=null&&h.userId),{cashback:f,credits:m}=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 n.jsx(it.Root,{component:n.jsxs(it.Content,{children:[n.jsx(it.Login,{description:Dp(p),text:Mp(p,((_=l==null?void 0:l.user)==null?void 0:_.firstName)??((y=l==null?void 0:l.user)==null?void 0:y.email)),children:!p&&n.jsx(d.Button,{size:"medium",variant:"quaternary",onClick:()=>u(),children:c.header.MENU_INFO.login.button_text})}),m+f&&p?n.jsx(it.Credits,{credits:m,cashBack:f,link:`${a.secureSubdomain}/account#/meus-creditos`,total:m+f}):n.jsx(n.Fragment,{}),n.jsx(d.Utils.Divider,{}),n.jsx(it.Menu,{ICONS:c.header.ICONS,storeConfig:a,isLogged:p,className:A.responsive["responsive-desktop-flex"],onLogoutClick:()=>l.logout()}),n.jsx(it.Menu,{ICONS:c.header.ICONS,storeConfig:a,isMobile:!0,isLogged:p,className:A.responsive["responsive-mobile-flex"],onLogoutClick:()=>l.logout()})]}),isOpen:t,isMobile:i,setIsOpen:r,target:i?o:s,Z_INDEX_WAR:c.header.Z_INDEX_WAR,children:e})};Dn.displayName="UserMenu";const ul=({storeConfig:e})=>{const{CONSTANTS:t}=Ee(),{handleSelectContent:r}=oe(),{reset:s}=Wt(),{setValue:o}=us(),a=ls(),i=g.useRef(null);return n.jsxs(n.Fragment,{children:[n.jsxs(d.Header.Wrapper,{className:"header-desktop-wrapper",children:[n.jsx(d.Header.Logo,{style:{width:"100%"},children:n.jsx(De,{href:"/",onMouseEnter:s,children:n.jsx(d.Icon,{name:t.header.ICONS.logo,onClick:()=>{r({content:"header:logo"})}})})}),n.jsx(Gc,{}),n.jsxs(d.Header.Support,{onMouseEnter:s,style:{justifyContent:"flex-end"},children:[n.jsx(mf,{}),n.jsx(Dn,{isOpen:a,setIsOpen:o,desktopUserMenuTarget:i.current,storeConfig:e,children:n.jsx(d.Header.SupportItem,{onClick:()=>{o(!0),r({content:"header:user_menu"})},className:As["btn-login"],innerRef:i,children:n.jsx(d.Icon,{name:t.header.ICONS.person,size:"medium"})})}),n.jsx(Zc,{}),n.jsx(Ts,{id:"cart-button"})]})]}),n.jsx(Qc,{})]})};ul.displayName="Header.HeaderDesktopWrapper";const Fe={"menu--banners":"_menu--banners_1bvvz_1","menu--banners--item":"_menu--banners--item_1bvvz_6","menu--banners--item--text":"_menu--banners--item--text_1bvvz_17","menu--banners--list":"_menu--banners--list_1bvvz_21","menu--dummy-close":"_menu--dummy-close_1bvvz_46","menu--body":"_menu--body_1bvvz_54","menu--categories":"_menu--categories_1bvvz_67","menu--categories--title":"_menu--categories--title_1bvvz_80","menu--step":"_menu--step_1bvvz_92","menu--sub-category":"_menu--sub-category_1bvvz_108","menu--sub-category--item":"_menu--sub-category--item_1bvvz_115","menu--sub-category--list":"_menu--sub-category--list_1bvvz_121"},dl=({children:e,mobileBannerAlt:t,mobileBannerSrc:r,textColor:s,submenuId:o,label:a,...i})=>n.jsx("button",{...i,className:Fe["menu--banners--item"],children:r?n.jsxs(d.Banner.Container,{children:[n.jsx(d.Banner.ImageWrapper,{children:n.jsx(Ie.Image,{alt:t??r,height:128,src:r,width:343,unoptimized:!0})}),n.jsx(d.Banner.Slot,{verticalAlignment:"end",horizontalAlignment:"center",children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:Fe["menu--banners--item--text"],children:n.jsx("h2",{className:"typography-style-body-xs",style:s?{color:s}:{},children:e})})})})]}):n.jsx("h2",{...i,children:e})});dl.displayName="Menu.Mobile.Category";const pl=({label:e,...t})=>{const{CONSTANTS:r}=Ee();return n.jsx(d.Button,{...t,adornment:{end:n.jsx(d.Icon,{name:r.header.ICONS.arrow_right,size:"medium"})},mode:"inverse",size:"medium",variant:"primary",children:e})};pl.displayName="Menu.Mobile.Body.Category";const ml=({subCategory:e,submenuLabel:t,onHandleOut:r,...s})=>n.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)=>n.jsx(ze,{disableUnderline:!0,disablePadding:!1,href:o.link??"#",onClick:()=>r(o.label,t),size:"medium",title:o.label??"",children:o.label},a)))});ml.displayName="Menu.Mobile.List";const fl=({current:e,onHandleOut:t})=>{var r;return e?n.jsx("div",{className:Fe["menu--sub-category"],children:Array.isArray(e==null?void 0:e.subCategories)&&((r=e==null?void 0:e.subCategories)==null?void 0:r.map((s,o)=>n.jsxs("div",{className:Fe["menu--sub-category--item"],children:[n.jsx(Bt.Title,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id}),n.jsx(Bt.List,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id})]},o)))}):n.jsx(n.Fragment,{})};fl.displayName="Menu.Mobile.Body.SubCategory";const hl=({subCategory:e,submenuLabel:t,onHandleOut:r,...s})=>{var c;const{router:o}=ce(),{handleSelectContent:a}=oe(),{CONSTANTS:i}=Ee();return n.jsxs("div",{...s,className:Fe["menu--categories--title"],children:[n.jsx(Xt,{href:e==null?void 0:e.linkLabel,title:e==null?void 0:e.linkLabel,onClick:()=>{a({content:`menu:${e.label??""}:${t}`})},children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.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)&&n.jsx(d.ComponentList.Support,{adornment:{end:n.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})]})};hl.displayName="Menu.Mobile";const Bt={Banner:dl,Category:pl,List:ml,SubCategory:fl,Title:hl},_l=g.createContext({}),vf=({children:e})=>{const[t,r]=g.useState(null),s=g.useCallback(()=>{r(null)},[]),o=a=>{a!==t&&r(a)};return n.jsx(_l.Provider,{value:{currentCategory:t,setCurrentCategory:r,handleCloseMenu:s,handleChangeSubMenuOpened:o},children:e})},gl=()=>g.useContext(_l),yl=e=>{const{router:t}=ce(),{headerData:r}=Ee(),{handleSelectContent:s}=oe(),{currentCategory:o,setCurrentCategory:a}=gl(),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()},p=Array.isArray(r==null?void 0:r.categories)?r==null?void 0:r.categories:[],f=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 n.jsxs("div",{...e,className:Fe["menu--body"],style:{transform:`translate3d(calc(-100% * ${o?1:0}), 0px, 0px)`},children:[n.jsx("button",{className:Fe["menu--dummy-close"],ref:i,"data-close":!0}),n.jsxs("div",{className:Fe["menu--step"],"data-active":"true",children:[n.jsx("div",{className:Fe["menu--banners"],children:n.jsx("div",{className:Fe["menu--banners--list"],children:p.map((h,_)=>g.createElement(Bt.Banner,{...h,key:_,onClick:()=>l(h.label,h.link)},h.mobileBannerAlt))})}),n.jsx("div",{className:Fe["menu--categories"],children:p.map((h,_)=>n.jsx(Bt.Category,{label:h.label,onClick:()=>m(h)},_))})]}),n.jsx("div",{className:Fe["menu--step"],"data-active":!!o,children:n.jsx(Bt.SubCategory,{current:f.find(h=>h.id===o),onHandleOut:u})})]})};yl.displayName="Menu.Mobile.Body";const bf={"menu--header":"_menu--header_1ozdf_1"},xl=()=>{var o;const{headerData:e}=Ee(),{currentCategory:t,setCurrentCategory:r}=gl(),s=(o=e==null?void 0:e.categories)==null?void 0:o.find(a=>a.submenuId===t);return n.jsxs("div",{className:bf["menu--header"],children:[n.jsx(d.Button,{"data-out":!s,iconNameStart:"arrow-left",mode:"inverse",onClick:()=>r(null)}),s&&n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{alignContent:"center",children:n.jsx("h2",{className:"typography-style-body-lg",children:s==null?void 0:s.label})})}),n.jsx(d.Button,{iconNameStart:"close","data-close":!0,"data-only":!s,mode:"inverse",onClick:()=>r(null)})]})};xl.displayName="Menu.Mobile.Header";var Gr={exports:{}};function jf(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 vr={},br={},Oo;function Cf(){return Oo||(Oo=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")}(br)),br}var Mo;function Sf(){return Mo||(Mo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return h}});const r=Le._(g),s=Cf();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 E(){if(!b){const P=new p(_,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(E),!c&&typeof window<"u"){const P=x.webpack&&typeof jf.resolveWeak=="function"?x.webpack():x.modules;P&&i.push(S=>{for(const C of P)if(S.includes(C))return E()})}function j(){E();const P=r.default.useContext(s.LoadableContext);P&&Array.isArray(x.modules)&&x.modules.forEach(S=>{P(S)})}function v(P,S){j();const C=r.default.useSyncExternalStore(b.subscribe,b.getCurrentValue,b.getCurrentValue);return r.default.useImperativeHandle(S,()=>({retry:b.retry}),[]),r.default.useMemo(()=>C.loading||C.error?r.default.createElement(x.loading,{isLoading:C.loading,pastDelay:C.pastDelay,timedOut:C.timedOut,error:C.error,retry:b.retry}):C.loaded?r.default.createElement(o(C.loaded),P):null,[P,C])}return v.preload=()=>E(),v.displayName="LoadableComponent",r.default.forwardRef(v)}class p{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 m(_,y){let x=[];for(;_.length;){let b=_.pop();x.push(b(y))}return Promise.all(x).then(()=>{if(_.length)return m(_,y)})}f.preloadAll=()=>new Promise((_,y)=>{m(a).then(_,y)}),f.preloadReady=_=>(_===void 0&&(_=[]),new Promise(y=>{const x=()=>(c=!0,y());m(i,_).then(x,x)})),typeof window<"u"&&(window.__NEXT_PRELOADREADY=f.preloadReady);const h=f}(vr)),vr}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(p,f){for(var m in f)Object.defineProperty(p,m,{enumerable:!0,get:f[m]})}r(t,{default:function(){return u},noSSR:function(){return l}});const s=Le,o=n,a=s._(Sf()),i=typeof window>"u";function c(p){return{default:(p==null?void 0:p.default)||p}}function l(p,f){if(delete f.webpack,delete f.modules,!i)return p(f);const m=f.loading;return()=>(0,o.jsx)(m,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}function u(p,f){let m=a.default,h={loading:x=>{let{error:b,isLoading:E,pastDelay:j}=x;if(!j)return null;if(process.env.NODE_ENV!=="production"){if(E)return null;if(b)return(0,o.jsxs)("p",{children:[b.message,(0,o.jsx)("br",{}),b.stack]})}return null}};p instanceof Promise?h.loader=()=>p:typeof p=="function"?h.loader=p:typeof p=="object"&&(h={...h,...p}),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(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)})(Gr,Gr.exports);var Ef=Gr.exports,Pf=Ef;const vl=A.getDefaultExportFromCjs(Pf),jn={"modal-modifier":"_modal-modifier_10zw4_1","menu--navigation-bar":"_menu--navigation-bar_10zw4_15","menu--root":"_menu--root_10zw4_26"},bl=({children:e})=>{const{menuIsOpen:t,setMenuIsOpen:r}=fs(),{CONSTANTS:s}=Ee();return n.jsxs(d.Modal.RootWithoutPortal,{className:d.helpers.classNameConcat(jn["modal-modifier"],"menu-mobile-root"),isOpen:t,setIsOpen:r,variant:"sideRight",style:{bottom:"unset",overflowY:"hidden",position:"fixed",top:0,zIndex:s.header.Z_INDEX_WAR.menu_mobile},children:[n.jsx(xl,{}),n.jsx(d.Modal.Body,{className:jn["menu--root"],children:e})]})};bl.displayName="Menu.MenuRoot";const Nf=vl(()=>Promise.resolve(bl),{ssr:!1}),jl=({children:e,last:t=!1,...r})=>n.jsxs(n.Fragment,{children:[n.jsx(d.Button,{...r,"data-close":!0,size:"small",variant:"tertiary",children:e}),!t&&n.jsx(d.Utils.Divider,{direction:"vertical",size:"small",className:jn.divider})]});jl.displayName="Menu.NavigationBarItem";const Cl=()=>{const{setUserMenuIsOpen:e}=fs(),{handleSelectContent:t}=oe(),{CONSTANTS:r}=Ee(),{router:s}=ce(),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"}),s.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"}),s.push("/institucional/lojas")},text:r.header.MENU_INFO.store.button_text}];return n.jsx(d.Card,{id:"menu-navigationbar",shadow:!0,className:jn["menu--navigation-bar"],style:{zIndex:r.header.Z_INDEX_WAR.menu_mobile_navigation_bar},children:Array.isArray(o)&&o.map((a,i)=>g.createElement(jl,{...a,key:i},a.text))})};Cl.displayName="Menu.NavigationBar";const jr={Body:yl,NavigationBar:Cl,Root:Nf},Sl=({storeConfig:e})=>{const t=g.useRef(null),{CONSTANTS:r}=Ee(),{MENU_NAVIGATION_BAR_ALLOWED:s,ICONS:o}=r.header,{handleSelectContent:a}=oe(),{setValue:i}=Rn(),{setValue:c}=Ka(),{setValue:l}=us(),u=ls(),p=Ga(),{isMobile:f}=ne();return n.jsxs(n.Fragment,{children:[n.jsxs(d.Header.Wrapper,{className:"header-mobile-wrapper",children:[n.jsx(d.Header.Logo,{style:{width:"100%"},children:n.jsx(De,{href:"/",children:n.jsx(d.Icon,{name:o.logo,size:"x-large",onClick:()=>{a({content:"header:logo"})}})})}),n.jsxs(d.Header.Support,{children:[n.jsx(d.Header.SupportItem,{onClick:()=>{i(!0),a({content:"header:search"})},children:n.jsx(d.Icon,{name:o.search,size:"medium"})}),n.jsx(Ts,{}),n.jsxs(d.Header.SupportItem,{onClick:()=>c(!0),children:[n.jsx("span",{ref:t}),n.jsx(d.Icon,{name:o.menu,size:"medium"})]})]})]}),f&&n.jsx(li,{menuIsOpen:p,setMenuIsOpen:c,userMenuIsOpen:p,setUserMenuIsOpen:l,children:n.jsx(Dn,{storeConfig:e,isOpen:u,setIsOpen:l,mobileUserMenuTarget:t==null?void 0:t.current,children:n.jsxs(jr.Root,{children:[n.jsx(jr.Body,{}),s?n.jsx(jr.NavigationBar,{}):n.jsx(n.Fragment,{})]})})})]})};Sl.displayName="Header.HeaderMobileWrapper";const If=g.createContext({}),Rf=({children:e})=>{const{sendDataLayerEvent:t}=oe(),{cartStore:r,isOpen:s}=ve();g.useEffect(()=>{s&&t({functionKey:"viewCartEvent",data:{commonData:{cartStore:r}}})},[s]),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;ft.post("/api/checkout/order-form/attachments/marketing-data",{orderFormId:l,marketingData:{...r==null?void 0:r.marketingData,marketingTags:Oa(((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 n.jsx(If.Provider,{value:{handleUpdateItemQuantityEvent:o},children:e})},wf="_fadeInOut_1hg4u_1",Af="_fadeOut_1hg4u_1",te={"mc--cashback":"_mc--cashback_1hg4u_1","mc--cashback--positive":"_mc--cashback--positive_1hg4u_21","mc--cashback--alert":"_mc--cashback--alert_1hg4u_24","mc--container--actions":"_mc--container--actions_1hg4u_28","mc--container--actions--secondary":"_mc--container--actions--secondary_1hg4u_36","mc--container--actions--toggle-size-modifier":"_mc--container--actions--toggle-size-modifier_1hg4u_54","mc--footer":"_mc--footer_1hg4u_58","mc--footer--actions":"_mc--footer--actions_1hg4u_67","mc--footer--actions-button":"_mc--footer--actions-button_1hg4u_72","mc--footer--total":"_mc--footer--total_1hg4u_88","mc--footer--total--info":"_mc--footer--total--info_1hg4u_93","mc--footer--total--info--content":"_mc--footer--total--info--content_1hg4u_98","mc--field":"_mc--field_1hg4u_144","mc--body":"_mc--body_1hg4u_184","mc--body--products":"_mc--body--products_1hg4u_191","mc--body--empty--feedback":"_mc--body--empty--feedback_1hg4u_199","mc--body--empty--text":"_mc--body--empty--text_1hg4u_204","mc--body--promotion":"_mc--body--promotion_1hg4u_217","mc--body--promotion--closeness":"_mc--body--promotion--closeness_1hg4u_220","mc--body--promotion--closeness--success":"_mc--body--promotion--closeness--success_1hg4u_243","mc--body--coupon-tag":"_mc--body--coupon-tag_1hg4u_255","mc--body--coupon-tag--text":"_mc--body--coupon-tag--text_1hg4u_273","mc--body--coupon-tag--button":"_mc--body--coupon-tag--button_1hg4u_279","mc--header":"_mc--header_1hg4u_285","mc--header--subtitle":"_mc--header--subtitle_1hg4u_311","mc--notify":"_mc--notify_1hg4u_352","mc--notify--content":"_mc--notify--content_1hg4u_367","mc--notify--item":"_mc--notify--item_1hg4u_380",fadeInOut:wf,fadeOut:Af,"mc--card":"_mc--card_1hg4u_442","mc--card--actions":"_mc--card--actions_1hg4u_447","mc--card--actions--secondary":"_mc--card--actions--secondary_1hg4u_455","mc--card--actions--add-remove":"_mc--card--actions--add-remove_1hg4u_482","mc--card--actions--gift":"_mc--card--actions--gift_1hg4u_496","mc--card--content-info":"_mc--card--content-info_1hg4u_509","mc--card--details":"_mc--card--details_1hg4u_516","mc--card--link":"_mc--card--link_1hg4u_521","mc--product--unavailable":"_mc--product--unavailable_1hg4u_529","mc--card--name":"_mc--card--name_1hg4u_532","mc--card--price":"_mc--card--price_1hg4u_547","mc--card--price--old-price":"_mc--card--price--old-price_1hg4u_557","mc--card--price--price-details":"_mc--card--price--price-details_1hg4u_561","mc--card--product-link":"_mc--card--product-link_1hg4u_572","mc--discount":"_mc--discount_1hg4u_582","mc--discount--header":"_mc--discount--header_1hg4u_585","inputs--tooltip":"_inputs--tooltip_1hg4u_585","mc--discount--body":"_mc--discount--body_1hg4u_604","minicart--modal-modifier":"_minicart--modal-modifier_1hg4u_625"},El=({item:{id:e,message:t,callback:r},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 n.jsx("div",{className:te["mc--notify--item"],ref:a,onAnimationEnd:()=>c(e),children:n.jsxs(d.SnackBar.Structure,{size:"medium",children:[n.jsx(d.SnackBar.Content,{title:t}),n.jsxs(d.SnackBar.Support,{children:[typeof r=="function"&&n.jsx(d.Button,{onClick:()=>{r(),i()},size:"small",variant:"tertiary",children:"Desfazer"}),n.jsx(d.Button,{iconNameStart:o.close,iconSize:"small",onClick:()=>i(),variant:"tertiary"})]})]})},e)};El.displayName="MiniCart.Notify.Item";const Pl=({ICONS:e})=>{const t=is(),{removeNotification:r}=cs(),s=t.length?[...t].sort((o,a)=>a.id-o.id):[];return s.length?n.jsx("div",{className:te["mc--notify"],children:n.jsx("div",{className:te["mc--notify--content"],children:Array.isArray(s)&&s.map(o=>n.jsx(El,{item:o,removeNotification:r,ICONS:e},o.id))})}):null};Pl.displayName="MiniCart.Notifications";const Tf=({handleSendEvent:e,onHandleRemove:t,product:r,MINICART_CONFIG:s,...o})=>{const a=Lt(),{toggleProduct:i}=vt(),{itemOffered:{isVariationOf:{productGroupID:c}},quantity:l}=r;return n.jsx(d.Button,{...o,adornment:{end:n.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})},Nl=({handleSendEvent:e,product:t,ICONS:r,MINICART_CONFIG:s,...o})=>{const{addToCart:a,removeToCart:i}=ve(),{bundleItems:c=[],id:l,uniqueId:u,seller:p,offerings:f,quantity:m}=t,h=(_,y,x)=>{i(l,_.title,()=>{typeof x=="function"&&x(),a({id:l,quantity:y,seller:p},{id:l,texture:_.texture},!0)})};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:te["mc--card--actions--add-remove"],children:[s.has_wishlist_button&&n.jsx(Tf,{...o,product:t,handleSendEvent:e,onHandleRemove:h,ICONS:r,MINICART_CONFIG:s}),n.jsx(d.Button,{...o,adornment:{end:n.jsx(d.Icon,{name:r.delete,size:"small"})},underline:!0,variant:"secondary",state:"danger",onClick:()=>{h({texture:"mini-cart",title:`${s.messages.remove}`},m),e("remove_from_cart","skuEvents")},children:s.messages.remove_button})]}),s.has_gift_option&&n.jsx(Et.Gift,{uniqueId:u,bundleItems:c,offerings:f,ICONS:r,MINICART_CONFIG:s})]})};Nl.displayName="MiniCart.Card.Actions";const Il=({bundleItems:e,offerings:t,uniqueId:r,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 m=e.some(h=>h.id===f.id);c(r,String(f.id),m).then(()=>i(!1))}}},u=t[0],p=e.find(f=>f.id===u.id);return u&&"id"in u?n.jsx("div",{className:te["mc--card--actions--gift"],children:n.jsx(d.Checkbox,{adornment:n.jsx(d.Icon,{name:s.check}),checked:!!p,disabled:a,label:o.messages.giftPackage,onChange:l})}):null};Il.displayName="MiniCart.Card.Gift";const Rl=({itemOffered:e})=>{const t=A.updatedResizedImg(e==null?void 0:e.image[0].url,{width:200,height:300});return n.jsx(De,{href:`${e==null?void 0:e.slug}`,className:te["mc--card--product-link"],children:n.jsx(Ie.Image,{alt:(e==null?void 0:e.image[0].alternateName)||"Produto",src:t||"",width:108,height:164,objectFit:"unset"})})};Rl.displayName="MiniCart.Card.Media";const wl=({name:e,skuName:t,tagName:r,className:s})=>n.jsxs(n.Fragment,{children:[r&&n.jsx(d.Tag,{variant:"quaternary",title:r,style:{textTransform:"uppercase"},children:r}),n.jsx("p",{className:d.helpers.classNameConcat(te["mc--card--name"],s),children:A.getProductNameWithoutSku(e??"",t??"")})]});wl.displayName="MiniCart.Card.Name";const Al=({total:e,totalList:t})=>n.jsx(d.ProductInfo.Root,{children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:te["mc--card--price"],children:n.jsx(d.ProductInfo.Wrapper,{className:te["mc--card--price--details"],size:"small",layout:"horizontal",children:t&&e!==t?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:A.formatPriceToCurrency(t),size:"small"}),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:A.formatPriceToCurrency(e),size:"small"})]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:A.formatPriceToCurrency(e),size:"small"})})})})});Al.displayName="MiniCart.ProductPrice";const Tl=({product:e,TEXTURE_IMAGE:t,TOGGLE_STYLE_MODIFIER:r})=>{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 p=(f=i==null?void 0:i.find(m=>m.id===c))==null?void 0:f.texture;if(p){o(p);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;new IntersectionObserver(l).observe(a.current)},[l]),n.jsx("div",{ref:a,children:n.jsx(d.ToggleStyle.Wrapper,{size:"small",style:r,children:n.jsx(d.ToggleStyle.Texture,{children:s?n.jsx(Ie.Image,{alt:((u=e.itemOffered)==null?void 0:u.image[0].alternateName)??"Produto",src:s,width:164,height:164,style:r}):n.jsx(ec,{})})})})};Tl.displayName="MiniCart.Card.Style";const Ll=({product:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:o})=>{const{size:a}=A.getColorAndSizeFromSkuName(e.itemOffered.skuName??"",r);return n.jsxs(d.Utils.Row,{alignItems:"center",children:[n.jsx(Tl,{product:e,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:o}),n.jsx(d.Utils.Divider,{direction:"vertical",size:"small",style:{height:24}}),a&&n.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"],children:n.jsx(d.ToggleSize.Text,{children:a})})]})};Ll.displayName="MiniCart.Card.Sku";const Et={Actions:Nl,Gift:Il,Media:Rl,Name:wl,Price:Al,Sku:Ll},Lf=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}},kl=({available:e=!0,index:t,product:r,ICONS:s,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c})=>{var f,m;const{sendDataLayerEvent:l}=oe(),u=Lf(r),p=(h,_)=>{const y={commonData:{...r,...u},customData:{index:t},event:h};if(_==="skuEvents"){const x={...r,...u};y.supportData={selectedSkus:[x]},y.commonData.products=[x]}l({functionKey:_,data:y})};return n.jsxs("div",{className:d.helpers.classNameConcat(te["mc--card"],e?"":te["mc--card--unavailable"]),children:[n.jsx(Et.Media,{itemOffered:r.itemOffered}),n.jsxs("div",{className:te["mc--card--content-info"],children:[n.jsx(Et.Name,{name:((f=r.itemOffered)==null?void 0:f.name)??"",skuName:(m=r.itemOffered)==null?void 0:m.skuName}),n.jsxs("div",{className:te["mc--card--details"],children:[n.jsx("div",{className:te["mc--card--actions"],children:e?n.jsx(Et.Price,{total:u.price,totalList:u.listPrice}):n.jsx(d.Tag,{variant:"secondary",size:"small",children:"Indisponível"})}),n.jsxs("div",{className:te["mc--card--actions--secondary"],children:[e&&n.jsx(Et.Sku,{product:r,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c}),n.jsx(Et.Actions,{handleSendEvent:p,product:r,size:"small",variant:"tertiary",ICONS:s,MINICART_CONFIG:o})]})]})]})]})};kl.displayName="MiniCart.Card";const Ol=({type:e="positive",ICONS:t,MESSAGE_CASHBACK:r})=>{var a;const{toExpire:s}=kt(),o=((a=s==null?void 0:s.cashback)==null?void 0:a.reduce((i,c)=>i+c.remaining_value,0))??0;return o>0?n.jsxs("div",{className:d.helpers.classNameConcat(te["mc--cashback"],te[`mc--cashback--${e}`]),children:[n.jsx(d.Icon,{name:t.alert_circle,size:"medium"}),n.jsxs("p",{children:[n.jsx("span",{children:A.formatPriceToCurrency(o)})," ",r.title]})]}):null};Ol.displayName="MiniCart.Cashback";const Ml=({type:e,ICONS:t,MINICART_CONFIG:r})=>{const{addCouponSeller:s,removeCoupon:o,removeSellerCode:a,cartStore:{marketingData:i,openTextField:c}}=ve(),[l,u]=g.useState(!1),[p,f]=g.useState(!1),m=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(!!m()),y=async x=>{f(!0),!!m()&&(e==="coupon"?await o():await a(),_(!1),u(!1)),await s(x,e).then(E=>{if(!E.statusOk&&x||E.code!==200){x?(u(!0),_(!1)):u(!1);return}_(!0),u(!1)}).catch(()=>u(!0)).finally(()=>f(!1))};return n.jsx(Oe.Field,{hasError:l,hasSuccess:h,isLoading:p,onHandler:y,type:e,title:e==="coupon"?`${r.messages.descount_cupom_placeholder}`:`${r.messages.sellers_code_placeholder}`,value:m(),MINICART_CONFIG:r,ICONS:t})};Ml.displayName="MiniCart.CouponSeller";const Dl=({ICONS:e,MINICART_CONFIG:t,PLP_NOT_RESULT:r})=>{const{router:s}=ce(),o=()=>{s.push(r.link)};return n.jsxs(d.Utils.Column,{alignContent:"center",alignItems:"center",gap:"24px",className:te["mc--body--empty--feedback"],children:[n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsxs("p",{className:`typography-style-body-xs ${te["mc--body--empty--text"]}`,children:[t.messages.empty_card," "]})})}),n.jsx(d.Button,{variant:"tertiary",size:"large",onClick:()=>o(),"data-close":!0,adornment:{end:n.jsx(d.Icon,{name:e.arrow_right,size:"medium"})},children:t.messages.empty_bag})]})};Dl.displayName="MiniCart.Feedback";const kf=e=>{const t=e.replace(/\D/g,"");return t.length>5?`${t.slice(0,5)}-${t.slice(5,8)}`:t},zl=({feedback:e,hasError:t,onHandler:r,hasSuccess:s,type:o,title:a,value:i,ICONS:c})=>{const[l,u]=g.useState(i);g.useEffect(()=>{t||u(i)},[i,t]);const p=()=>t?n.jsx(d.Icon,{name:c.delete_circle}):String(i).length&&s?n.jsx(d.Icon,{name:c.check_circle}):null,f=()=>{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 x=y.currentTarget.value;if(x===""&&typeof r=="function"||s&&String(i).length>0&&x!==String(i)||t&&x!==String(i)){u(""),r("");return}if(o==="cep"){const E=kf(x);u(E)}else u(x)},_=y=>{if(y.key.toLocaleLowerCase()==="enter"&&typeof r=="function"){const x=y.currentTarget.value;r(x)}};return n.jsx(d.TextField.Input,{adornment:{end:p()},mode:"over-label",label:a,feedback:e,value:l,type:"text",onFocus:f,onBlur:m,onChange:h,onKeyDown:_})};zl.displayName="MiniCart.Field.Input";const $l=({title:e,ICONS:t,MINICART_CONFIG:r,...s})=>{const o=g.useRef(null),{hasSuccess:a,hasError:i,isLoading:c,onHandler:l,type:u,value:p}=s,f=()=>i?"error":String(p).length&&a?"success":"none",m=g.useCallback(()=>{if(o.current){const y=o.current.querySelector("input");y&&typeof l=="function"&&(p!==""||i?(l(""),y.value=""):l((y==null?void 0:y.value)??""))}},[l,p,i]),h=f();return n.jsx("div",{ref:o,children:n.jsx(d.TextField.Structure,{className:te["mc--field"],input:n.jsx(zl,{...s,feedback:h,title:e,ICONS:t}),right:n.jsx(d.Button,{"data-has-success":!a,size:"medium",title:String(p).length&&a||i?"Remover":"Aplicar",onClick:()=>m(),disabled:c,children:String(p).length&&a||i?n.jsx(d.Icon,{name:"close",size:"small"}):`${r.messages.promo_code_button}`}),supportText:u==="cep"&&h==="success"?n.jsx(d.TextField.SupportText,{text:"Mais informações de frete na etapa a seguir",feedback:"success",title:"support"}):null})})};$l.displayName="MiniCart.Field";const Do=e=>{const t=e*100;return Math.round(t)},Of=e=>(e/100).toFixed(2).replace(".",","),Mf=(e,t)=>{const{valueType:r,remainingValueToActivate:s}=e;if(r==="quantity")return`Adicione mais ${s} ${s===1?"item":"itens"} ${t}`;if(r==="price"){const o=s===100?"Falta":"Faltam",a=Of(s);return`${o} R$ ${a} ${t}`}return t},Fl=({ICONS:e})=>{var b;const{promotionRules:t,data:r,cartStore:s,cartStore:{items:o,marketingData:a},addCouponSeller:i,setIsOpen:c}=ve(),{sendDataLayerEvent:l}=oe(),u=(b=r==null?void 0:r.promotion)==null?void 0:b.promotionCart,p=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)&&!p.current&&(a==null?void 0:a.coupon)!==u.cupom&&(p.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&&(p.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,x=u.linkLabel;return n.jsxs("div",{className:te["mc--body--promotion"],children:[t.remainingValueToActivate>0&&n.jsx(d.Closeness,{className:te["mc--body--promotion--closeness"],title:Mf(t,m),subtitle:h,percentage:Do(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&&n.jsx(d.Closeness,{className:`${te["mc--body--promotion--closeness"]} ${te["mc--body--promotion--closeness--success"]}`,title:_,subtitle:y,percentage:Do(t.completeness)})]})};Fl.displayName="MiniCart.Modal.Body.Promotion";const Bl=({TIPBAR_CONFIGS:e})=>{const{data:t,cartStore:r,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),[p,f]=g.useState(!1);if(g.useEffect(()=>{l&&setTimeout(()=>{u(!1)},e.snackbar_timeout)},[l]),g.useEffect(()=>{p&&setTimeout(()=>{f(!1)},e.snackbar_timeout)},[p]),!i||i.active==="Desativar"||i.valueCupom===""||s.length===0)return null;const m=async()=>{if(!r.items.length){f(!0);return}(await a(i==null?void 0:i.valueCupom,"coupon")).code!==200&&u(!0)};return n.jsxs("div",{className:te["mc--body--coupon-tag"],style:{backgroundColor:`${i.tagColor}`,color:`${i.textColor}`},children:[n.jsx("div",{className:te["mc--body--coupon-tag--text"],dangerouslySetInnerHTML:{__html:i.value}}),n.jsx("div",{className:te["mc--body--coupon-tag--button"],children:n.jsx(d.Button,{variant:"quaternary",mode:"inverse",onClick:m,disabled:c,children:c?"Cupom Aplicado":"Aplicar Cupom"})})]})};Bl.displayName="MiniCart.Modal.Body.CouponTag";const Ul=({children:e,ICONS:t,MINICART_CONFIG:r,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 n.jsxs(d.Modal.Body,{className:te["mc--body"],children:[e,n.jsx(Fl,{ICONS:t}),n.jsx(Bl,{TIPBAR_CONFIGS:i}),n.jsx("div",{className:te["mc--body--products"],children:Array.isArray(l)&&l.length?l.map((p,f)=>{const m=u.find(h=>{var _;return h.code==="withoutStock"&&((_=h.fields)==null?void 0:_.ean)===p.ean})!==void 0;return n.jsx(Oe.Card,{available:!p.availability.includes("outStock")||!m,index:f,product:p,ICONS:t,MINICART_CONFIG:r,NAME_SPLIT_SYMBOL:s,TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:c},`${p.id}-${p.itemOffered.sku}-${f}`)}):n.jsx(Oe.Feedback,{ICONS:t,MINICART_CONFIG:r,PLP_NOT_RESULT:o})})]})};Ul.displayName="MiniCart.Body";const Hl=({children:e,storeConfig:t,MINICART_CONFIG:r})=>{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 n.jsxs(d.Modal.Footer,{className:te["mc--footer"],children:[e,n.jsx("div",{className:te["mc--footer--actions"],children:n.jsx(d.Button,{variant:"primary",size:"large","data-close":!0,className:te["mc--footer--actions-button"],onClick:o,children:r.messages.checkout_button})})]})};Hl.displayName="MiniCart.Modal.Footer";const ql=({children:e,ICONS:t,MINICART_CONFIG:r,Z_INDEX_WAR:s})=>{const[o,a]=g.useState(!1),i=g.useRef(null),c=()=>a(l=>!l);return n.jsxs(n.Fragment,{children:[o&&n.jsx(d.Tooltip.Root,{arrow:"right",position:"top",top:-3,left:-3,component:n.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}),n.jsxs(d.Accordion.Wrapper,{className:te["mc--discount"],children:[n.jsx(d.Accordion.Header,{id:"frete",title:"Frete",closeIndicator:n.jsx(d.Icon,{name:t.arrow_up,size:"medium"}),openIndicator:n.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),className:d.helpers.classNameConcat(te["mc--discount--header"]),startOpen:r.promotion_input_starts_open,children:n.jsxs(d.TextStructure.Root,{children:[n.jsx(d.TextStructure.DivWrapper,{children:n.jsxs("h3",{className:"typography-style-body-sm",children:[r.messages.promo_code_title," "]})}),n.jsx("div",{ref:i,onMouseEnter:c,onMouseLeave:c,"aria-label":"Mostrar descrição",children:n.jsx(d.Icon,{name:t.alert_circle,size:"small"})})]})}),n.jsx(d.Accordion.Body,{className:te["mc--discount--body"],children:e})]})]})};ql.displayName="MiniCart.Discount";const Vl=({discount:e,shipping:t,total:r})=>{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=r-Math.abs(e??0)+(t??0),i=t===0?"Frete Grátis":A.formatPriceToCurrency((t??0)/100),c=[{title:"Frete",value:t===void 0?"A calcular":i},{title:"Desconto",value:A.formatPriceToCurrency((e??0)/100)},{message:(o==null?void 0:o.value)??"",title:"Total",value:`1x de ${A.formatPriceToCurrency(a/100)}`}];return n.jsx("div",{className:te["mc--footer--total"],children:Array.isArray(c)&&c.map((p,f)=>n.jsxs("div",{className:te["mc--footer--total--info"],"data-discount":p.title==="Desconto",children:[n.jsx("p",{children:p.title}),n.jsxs("div",{className:te["mc--footer--total--info--content"],children:[p.message&&(o==null?void 0:o.active)==="Ativar"&&n.jsx(d.Tag,{variant:"primary",title:p.message,style:{backgroundColor:o==null?void 0:o.tagColor,color:o==null?void 0:o.textColor},children:p.message}),n.jsx(d.ProductInfo.Price,{className:te["mc--footer--total--info"],label:p.title,value:p.value})]})]},f))})};Vl.displayName="MiniCart.Modal.Footer.Resume.Items";const Wl=()=>{var o,a,i;const{totalizers:e}=_t(),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,s=(i=e.find(c=>c.id==="Shipping"))==null?void 0:i.value;return n.jsx(Vl,{discount:r??0,total:t,shipping:s})};Wl.displayName="MiniCart.Modal.Footer.Totals";const Gl=({ICONS:e,MINICART_CONFIG:t})=>{const{isMobile:r}=ne(),{cartStore:{items:s}}=ve(),o=s.reduce((a,i)=>a+(i.quantity??0),0);return n.jsx(d.Modal.Header,{navigation:"top",className:te["mc--header"],children:n.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!r,children:[n.jsx(d.Modal.Title,{navigation:"top",title:t.messages.title}),n.jsx("span",{className:te["mc--header--subtitle"],children:o!==1?`[${o}] Produtos`:`[${o}] Produto`}),n.jsx(d.Button,{"data-close":!0,iconNameStart:e.close,size:"small",variant:"tertiary"})]})})};Gl.displayName="MiniCart.Modal.Header";const Kl=({ICONS:e,MINICART_CONFIG:t})=>{const{cartStore:{shippingData:r},shipping:s,removeCEP:o}=ve(),{sendDataLayerEvent:a}=oe(),[i,c]=g.useState(!1),[l,u]=g.useState(!1),p=g.useCallback(()=>{var E;const b=((E=r==null?void 0:r.address)==null?void 0:E.postalCode)??"";return b.length===8&&!b.includes("-")?`${b.slice(0,5)}-${b.slice(5)}`:b},[r]),[f,m]=g.useState(!!p()),h=()=>{m(!1),c(!1)},_=b=>{var E;if(typeof b=="object"&&(b!=null&&b.logisticsInfo))return(E=b.logisticsInfo)==null?void 0:E.reduce((j,v)=>{var L;const P=(L=v==null?void 0:v.slas)==null?void 0:L.find(T=>(T==null?void 0:T.id)===(v==null?void 0:v.selectedSla));if(!P)return j;const S=parseInt(String((P==null?void 0:P.shippingEstimate)??"").replace("bd","")),C=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=C,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)+C,j},{shipping_tier:void 0,delivery_time:void 0,flag_retirada:void 0,shipping:void 0,currency:"BRL"})},y=async b=>{const E=b.replace(/\D/g,"");if(E.length!==8)return!1;try{return!(await ft.get(`https://viacep.com.br/ws/${E}/json/`)).data.erro}catch{return!1}},x=async b=>{if(u(!0),!!p()||!(b!=null&&b.trim())){await o(),h(),u(!1);return}if(!await y(b)){c(!0),m(!1),u(!1);return}try{const P=await s(b);if(c(!1),P){m(!0);const S=_(P);S&&a({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:S}})}}catch{c(!0)}finally{u(!1)}};return n.jsx(Oe.Field,{hasSuccess:f,hasError:i,isLoading:l,onHandler:x,title:`${t.messages.shipping_calculation_placeholder}`,type:"cep",value:p(),ICONS:e,MINICART_CONFIG:t})};Kl.displayName="MiniCart.Shipping";const Xl=()=>{var r,s;const{data:e}=ve(),t=(s=(r=e==null?void 0:e.flags)==null?void 0:r.flagCart)==null?void 0:s.flagHeader;return t!=null&&t.value?n.jsx(d.Tag,{variant:"tertiary",title:t==null?void 0:t.value,size:"small",adornment:{start:t!=null&&t.enableIcon&&(t!=null&&t.icon)?n.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};Xl.displayName="MiniCart.TagMessage";const Oe={Body:Ul,Card:kl,Cashback:Ol,CouponSeller:Ml,Discount:ql,Field:$l,Feedback:Dl,Shipping:Kl,Footer:Hl,Header:Gl,TagMessage:Xl,Totals:Wl},Df=({ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,PLP_NOT_RESULT:s,TEXTURE_IMAGE:o,TIPBAR_CONFIGS:a,TOGGLE_STYLE_MODIFIER:i,Z_INDEX_WAR:c,storeConfig:l,minicartStyleModifiers:u})=>{const{isOpen:p,setIsOpen:f}=ve(),{isMobile:m}=ne();return n.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(te["minicart--modal-modifier"],u),isMobile:!0,isOpen:p,setIsOpen:f,style:{zIndex:c.modal},variant:m?"sideBottom":"sideRight",children:[n.jsx(Oe.Header,{ICONS:e,MINICART_CONFIG:t}),n.jsx(Oe.Body,{ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,PLP_NOT_RESULT:s,TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:i,TIPBAR_CONFIGS:a,children:n.jsx(Oe.TagMessage,{})}),n.jsxs(Oe.Footer,{MINICART_CONFIG:t,storeConfig:l,children:[n.jsxs(Oe.Discount,{ICONS:e,MINICART_CONFIG:t,Z_INDEX_WAR:c,children:[n.jsx(Oe.CouponSeller,{type:"seller",ICONS:e,MINICART_CONFIG:t}),n.jsx(Oe.CouponSeller,{type:"coupon",ICONS:e,MINICART_CONFIG:t}),n.jsx(Oe.Shipping,{ICONS:e,MINICART_CONFIG:t})]}),n.jsx(Oe.Totals,{})]}),n.jsx(Pl,{ICONS:e})]})},Yl=({tipBar:e,minicartStyleModifiers:t,menuV2:r,storeConfig:s,className:o})=>{const{structureRef:a,rootRef:i,CONSTANTS:c}=Ee(),{header:{HEADER_CONFIGS:l,Z_INDEX_WAR:u},minicart:p}=c;return n.jsx(d.Header.Structure,{innerRef:a,adornment:{start:e},style:{position:"sticky",top:0,zIndex:u.header},className:d.helpers.classNameConcat(As["header-animation"],o),children:n.jsxs(d.Header.Root,{innerRef:i,style:{zIndex:u.header},variant:l.default_variant,interactiveVariant:l.interactive_variant,children:[r??n.jsxs(vf,{children:[n.jsx("div",{className:A.responsive["responsive-mobile-block"],style:{height:"100%",width:"100%",zIndex:u.header_mobile},children:n.jsx(Sl,{storeConfig:s})}),n.jsx("div",{className:A.responsive["responsive-desktop-block"],style:{height:"100%",width:"100%",zIndex:u.header_desktop},children:n.jsx(ul,{storeConfig:s})})]}),n.jsx(Rf,{children:n.jsx(Df,{...p,minicartStyleModifiers:t})}),n.jsx(Ps,{title:"Produto adicionado à sua sacola!",CONSTANTS:c.addToCart})]})})};Yl.displayName="Header";const zf="_shippingFreight_6z8rf_6",$f="_shippingFreight__postalCodeGrid_6z8rf_10",Ff="_shippingFreight__grid_6z8rf_14",Bf="_shippingFreight__grid__title_6z8rf_18",Uf="_shippingFreight__grid__remember_6z8rf_29",Hf="_postalCodeContainer_6z8rf_44",qf="_deliveryStatusBar__tag_6z8rf_49",Vf="_deliveryStatusBarError__tag_6z8rf_66",Wf="_deliveryInfo_6z8rf_74",Gf="_deliveryInfo__content_6z8rf_78",Kf="_deliveryInfo__text_6z8rf_84",Xf="_deliveryInfo__title_6z8rf_89",Yf="_deliveryInfo__subtitle_6z8rf_99",Qf="_deliveryInfo__tooltipIcon_6z8rf_109",Zf="_deliveryInfo__tooltip_6z8rf_109",Jf="_freightGrid_6z8rf_148",eh="_freightContainer_6z8rf_155",th="_freightOption__content_6z8rf_160",nh="_freightOption__value_6z8rf_166",rh="_freightOption__title_6z8rf_177",sh="_freightOption__title_item_6z8rf_181",oh="_freightOption__paragraph_6z8rf_192",ue={shippingFreight:zf,shippingFreight__postalCodeGrid:$f,shippingFreight__grid:Ff,shippingFreight__grid__title:Bf,shippingFreight__grid__remember:Uf,postalCodeContainer:Hf,deliveryStatusBar__tag:qf,deliveryStatusBarError__tag:Vf,deliveryInfo:Wf,deliveryInfo__content:Gf,deliveryInfo__text:Kf,deliveryInfo__title:Xf,deliveryInfo__subtitle:Yf,deliveryInfo__tooltipIcon:Qf,deliveryInfo__tooltip:Zf,freightGrid:Jf,freightContainer:eh,freightOption__content:th,freightOption__value:nh,freightOption__title:rh,freightOption__title_item:sh,freightOption__paragraph:oh,"input-modifier":"_input-modifier_6z8rf_207","freight--tooltip":"_freight--tooltip_6z8rf_227"},ah=({icon:e,title:t,subtitle:r,packageCount:s,packageUnit:o="",labelDescription:a,freightConfig:i,toolTipZIndex:c})=>{const[l,u]=g.useState(!1),p=g.useRef(null),f=()=>u(m=>!m);return n.jsxs("div",{className:ue.deliveryInfo,ref:p,children:[n.jsx(d.Tooltip.Root,{arrow:"bottom",component:n.jsx("div",{children:n.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:p.current}),n.jsxs("div",{className:ue.deliveryInfo__content,children:[n.jsx("div",{className:ue.deliveryInfo__icon,children:n.jsx(d.Icon,{name:e,size:"medium"})}),n.jsxs("div",{className:ue.deliveryInfo__text,children:[n.jsxs("span",{className:ue.deliveryInfo__title,children:[t," ",s," ",o]}),r&&n.jsx("span",{className:ue.deliveryInfo__subtitle,children:r})]}),a&&n.jsxs("div",{className:ue.deliveryInfo__tooltipIcon,onMouseEnter:f,onMouseLeave:f,"aria-label":"Mostrar descrição",children:[n.jsx("span",{children:n.jsx(d.Icon,{name:i.icons.feedback_help,size:"small"})}),l&&n.jsx("div",{className:ue.deliveryInfo__tooltip,children:a})]})]})]})},ih=({value:e,title:t,paragraph:r})=>n.jsx("div",{className:ue.freightOption,children:n.jsxs("div",{className:ue.freightOption__content,children:[n.jsx("span",{className:ue.freightOption__value,children:e}),n.jsx("span",{className:ue.freightOption__title,children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{className:ue.footer__item,children:[n.jsx("span",{className:ue.freightOption__title_item,children:t}),r&&n.jsx("span",{className:ue.freightOption__paragraph,children:r})]})})})]})}),ch=({children:e})=>n.jsx("div",{className:ue.freightContainer,children:e}),lh=({children:e})=>n.jsx("div",{className:ue.freightGrid,children:e}),uh=({children:e})=>n.jsx("div",{className:ue.postalCodeContainer,children:e}),zo=({message:e,seller:t="",size:r="small",setError:s})=>n.jsx("div",{className:s?ue.deliveryStatusBarError:ue.deliveryStatusBar,children:n.jsxs(d.Tag,{title:e,className:s?ue.deliveryStatusBarError__tag:ue.deliveryStatusBar__tag,size:r,children:[e," ",!s&&t]})}),dh=e=>{const t=parseInt(e,10);return t===1?`${t} dia`:`${t} dias`},ph=e=>{var r,s,o;const t=[];return(o=(s=(r=e==null?void 0:e.logisticsInfo)==null?void 0:r[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},mh=({component:e,parent:t,top:r,left:s,target:o,contentRef:a,freightConfig:i,toolTipZIndex:c=999,...l})=>{const{isMobile:u}=ne();return n.jsx(n.Fragment,{children:u?n.jsx(d.Tooltip.Root,{arrow:"bottom",component:n.jsxs("div",{...l,ref:a,children:[e,n.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}):n.jsx(d.Tooltip.Root,{arrow:"bottom",component:n.jsxs("div",{...l,ref:a,children:[e,n.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})})},fh=({onUpdateFreightItems:e,sellerId:t,size:r,skuId:s,quantity:o,setError:a,setIsButtonClicked:i,component:c,freightConfig:l,toolTipZIndex:u})=>{var k,M,Q,D;const p=_t(),f=_t(U=>U.shipping),[m,h]=g.useState(),[_,y]=g.useState(!1),[x,b]=g.useState(!1),[E,j]=g.useState(!1),v=(M=(k=p.shippingData)==null?void 0:k.address)==null?void 0:M.postalCode,P=!(m!=null&&m.length)&&v?v:m,S=g.useRef(null),C=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 ft.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.")}},L=async()=>{y(!0);try{const U=await ft.post("/api/checkout/simulation",{items:[{id:s,quantity:o,seller:t}],country:"BRA",postalCode:P});e(ph(U.data))}catch(U){console.error("Erro ao atualizar o documento:",U)}finally{y(!1),f(P,"BRA")}},T=async()=>{if(!s){j(!0),setTimeout(()=>j(!1),1500);return}await I({target:{value:P}}),_||(L(),i(!0))};return n.jsxs("div",{ref:S,style:{position:"relative"},children:[!s&&E?n.jsx(mh,{component:c,isOpen:E,parent:S.current,toolTipZIndex:u,freightConfig:l}):n.jsx(n.Fragment,{}),n.jsx("div",{style:{position:"relative"},children:n.jsx(d.TextField.Structure,{title:"structure",style:{width:"100%"},input:n.jsx(d.TextField.Input,{defaultValue:(D=(Q=p.shippingData)==null?void 0:Q.address)==null?void 0:D.postalCode,label:l.messages.text_input_label,title:"textfield",value:m,sizeVariant:r,onMouseOver:()=>s?null:j(!0),onMouseOut:()=>s?null:j(!1),mode:"simple",onChange:C,onKeyDown:U=>{U.key==="Enter"&&T()},className:ue["input-modifier"],feedback:x?"error":"none"}),right:n.jsx(d.Button,{onClick:T,size:r,title:"button",children:_?n.jsx(d.Spinner,{size:"small",indicatorColor:"#ffffff"}):l.messages.text_input_btn})})})]})},hh=({children:e,freightConfig:t})=>n.jsxs("div",{className:ue.shippingFreight,children:[n.jsxs("div",{className:ue.shippingFreight__grid,children:[n.jsx("span",{className:ue.shippingFreight__grid__title,children:t.messages.title}),n.jsx("span",{className:ue.shippingFreight__grid__remember,children:n.jsx(ze,{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})})]}),n.jsx("div",{className:ue.shippingFreight__postalCodeGrid,children:e})]}),_h=({children:e})=>n.jsx("div",{className:ue.freightContainer,children:e}),Ql=({className:e,sellerId:t,skuId:r,quantity:s,size:o,seller:a,local:i,CONSTANTS_PROPS:c})=>{const{sendDataLayerEvent:l}=oe(),[u,p]=g.useState(""),[f,m]=g.useState([]),[h,_]=g.useState(""),[y,x]=g.useState(!1),b=j=>p(j),E=j=>{m(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 n.jsxs(_h,{className:e,children:[n.jsxs(hh,{freightConfig:c.freightConfig,children:[n.jsx(uh,{children:n.jsx(fh,{onUpdateFreightItems:E,skuId:r,quantity:s,size:o,sellerId:t,local:i,setError:_,setIsButtonClicked:x,freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex})}),h?n.jsx(zo,{size:o,message:h,setError:_}):f.length>0&&n.jsx(zo,{size:o,message:c.freightConfig.messages.delivered_by,seller:a})]}),y&&!h?f.length>0&&n.jsxs(ch,{children:[n.jsx(lh,{children:f.filter(({id:j})=>!j.includes("Retirada")).map(j=>n.jsx(ih,{id:j.id,value:A.freightParsePrice({valueInCents:j.price,hasFree:!1,freeTaxMessage:c.freightConfig.messages.free_tax}),title:j.name,paragraph:`${c.freightConfig.messages.prefix_days}${dh(j.shippingEstimate)}`,radioValue:u,changeValue:b},j.id))}),c.deliveryInfoBoxesAllowed?n.jsx(ah,{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}):n.jsx(n.Fragment,{})]}):null]})},gt={"pcd-navigation--breadcrumb":"_pcd-navigation--breadcrumb_e02qd_1","pdc-navigation--content":"_pdc-navigation--content_e02qd_28","pdc-navigation--filters":"_pdc-navigation--filters_e02qd_54","pdc-navigation--filters--content":"_pdc-navigation--filters--content_e02qd_67","pdc-navigation--selected":"_pdc-navigation--selected_e02qd_137","pdc-navigation--selected--container":"_pdc-navigation--selected--container_e02qd_150","pdc-navigation":"_pdc-navigation_e02qd_28"},gh=({children:e,href:t,isLast:r,title:s,ICONS:o})=>n.jsx(d.BreadCrumb.Item,{adornment:{end:r&&n.jsx(d.Icon,{name:o.arrow_right})},children:r?n.jsx(ze,{href:t??"/",size:"medium",title:s,disableUnderline:!0,children:e}):e}),Zl=()=>{var a;const{state:e}=$e(),{ICONS:t}=Me(),r=e!=null&&e.term&&e.term.length>0?`/${e.term}`:"",s=decodeURIComponent((a=e==null?void 0:e.base)!=null&&a.length?e.base:r??r).slice(1).split("/"),o=Ni(s);return n.jsx("div",{className:gt["pcd-navigation--breadcrumb"],children:n.jsx(d.BreadCrumb.DivWrapper,{children:n.jsx(d.BreadCrumb.List,{children:Array.isArray(o)&&o.map((i,c)=>{var l,u;return g.createElement(gh,{...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," "))})})})})};Zl.displayName="PLPNavigation.BreadCrumb";const Jl=({children:e,...t})=>n.jsxs("div",{...t,className:gt["pdc-navigation--content"],children:[n.jsx(ut.Filters,{}),e]});Jl.displayName="PLPNavigation.Content";const yh="_sort_35wro_1",zn={sort:yh,"sort-list-wrapper":"_sort-list-wrapper_35wro_8","sort-list":"_sort-list_35wro_8","sort-button":"_sort-button_35wro_25"},xh=({children:e,sortListOpen:t,btnAdornment:r,style:s,...o})=>n.jsx(d.Button,{...o,adornment:{end:t?r==null?void 0:r.listOpen:r==null?void 0:r.listClosed},size:"small",variant:"tertiary",style:{...s,textDecoration:"none"},className:zn["sort-button"],children:e}),vh=e=>n.jsx(d.RadioButton.Radio,{...e}),bh=({children:e,className:t,name:r,...s})=>n.jsx(d.RadioButton.Group,{...s,name:r||"sort-group",className:d.helpers.classNameConcat(zn["sort-list"],t),children:e}),jh=({children:e,className:t,shadow:r=!0,padding:s="small",height:o="fit-content",...a})=>n.jsx(d.Card,{...a,shadow:r,className:d.helpers.classNameConcat(zn["sort-list-wrapper"],t),padding:s,height:o,children:e}),eu=g.forwardRef(({children:e,className:t,...r},s)=>n.jsx("div",{...r,ref:s,className:d.helpers.classNameConcat(zn.sort,t),children:e}));eu.displayName="SortRoot";const $n=({handleSelectValue:e,sortListOpen:t,setSortListOpen:r,searchParams:s,ICONS:o,...a})=>{var m;const i=(m=s==null?void 0:s.get("sort"))==null?void 0:m.replace(":","_"),[c,l]=g.useState(i),{sendDataLayerEvent:u}=oe();g.useEffect(()=>{l(i||void 0)},[i]);const{ref:p}=sl(()=>r(!1)),f=h=>{const _=h.target.value;l(_),typeof e=="function"&&e(_),u({functionKey:"filterEvent",data:{customData:{ordering:Mt.options[_]}}}),r(!1)};return n.jsxs(eu,{...a,ref:p,children:[n.jsx(xh,{btnAdornment:{listOpen:n.jsx(d.Icon,{name:o.arrow_up,size:"small"}),listClosed:n.jsx(d.Icon,{name:o.arrow_down,size:"small"})},sortListOpen:t,onClick:()=>r(!t),children:c?Mt.options[c]:Mt.placeholder},"sort-button"),t&&n.jsx(jh,{children:n.jsx(bh,{name:"sort-group",value:c??"",onChange:f,children:Object.keys(Mt.options).map(h=>n.jsx(vh,{label:Mt.options[h],value:h},h))})})]})};$n.displayName="Sort";const tu=g.createContext({}),Ch=({children:e,...t})=>{const[r,s]=g.useState(!1);return n.jsx(tu.Provider,{value:g.useMemo(()=>({...t,openOrderBy:r,setOpenOrderBy:s}),[t,r,s]),children:e})},Sh=()=>{const e=g.useContext(tu);if(e===void 0)throw new Error("usePLPNavigationContext must be used within a PDCNavigationProvider");return e},nu=()=>{const{openOrderBy:e,onSort:t,setOpenFilters:r,setOpenOrderBy:s}=Sh(),{ICONS:o,PDC_NAVIGATION:a,searchParams:i}=Me();return n.jsxs("div",{className:gt["pdc-navigation--filters"],children:[n.jsx(ut.BreadCrumb,{}),n.jsxs("div",{className:gt["pdc-navigation--filters--content"],children:[n.jsx($n,{handleSelectValue:c=>t(c??"release_desc"),sortListOpen:e,setSortListOpen:s,ICONS:o,searchParams:i}),n.jsx(d.Button,{adornment:{end:n.jsx(d.Icon,{name:o.arrow_down})},onClick:()=>r(!0),size:"small",variant:"tertiary",children:a.filter_button}),n.jsx(ut.Total,{})]})]})};nu.displayName="PLPNavigation.Filters";const ru=({children:e,onSort:t,setOpenFilters:r,style:s,...o})=>{const a=g.useRef(null);return n.jsx(Ch,{onSort:t,setOpenFilters:r,children:n.jsx("div",{...o,className:gt["pdc-navigation"],ref:a,style:{...s},children:n.jsx(ut.Content,{children:e})})})};ru.displayName="Root";const su=({callback:e,selected:t,...r})=>n.jsx("div",{...r,className:gt["pdc-navigation--selected"],children:n.jsx("div",{className:gt["pdc-navigation--selected--container"],children:Array.isArray(t)?t.map(s=>s.key==="productclusterids"?null:n.jsx(ut.SelectedItem,{callback:e,facet:s},s.value)):null})});su.displayName="PLPNavigation.Selected";const Ls=({key:e,PLP_FILTERS:t})=>t.some(r=>r.key===e)?e==="cores-filtraveis":!1,ks=({value:e,PLP_FILTERS_COLORS:t})=>{var r;return((r=t.find(s=>s.value===e))==null?void 0:r.color)??"#F2F2F2"},ou=({key:e,PLP_FILTERS:t})=>{var r;return(r=t.find(s=>s.key===e))==null?void 0:r.label},au=({key:e,PLP_FILTERS:t})=>{var r;return((r=t.find(s=>s.key===e))==null?void 0:r.order)??0},Kr=({value:e})=>{const[t,r]=e.split(":").length===2?e.split(":"):[0,0],s=A.formatPriceToCurrency(Number(r));return`${A.formatPriceToCurrency(Number(t))} até ${s}`},iu=({items:e})=>{const t=e.flatMap(o=>[o.range.from,o.range.to]),r=Math.min(...t.map(Math.abs)),s=Math.max(...t.map(Math.abs));return[r,s]},cu=Object.freeze(Object.defineProperty({__proto__:null,checkedColor:Ls,createTagPrice:Kr,getAbsoluteMinMax:iu,getColor:ks,getName:ou,getOrder:au},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"},lu=({columns:e=2,CONSTANTS:t,...r})=>{var a;const{filters:s,onToggleFacet:o}=Ot();return n.jsxs("div",{...r,className:We["filter--modal--body--content"],children:[Array.isArray(s.facets)&&s.facets.map(i=>n.jsx(rt.Item,{columns:e,facet:i,onToggleFacet:o,CONSTANTS:t},i.key)),!((a=s.facets)!=null&&a.length)&&n.jsx(rt.Empty,{PLP_FILTERS_EMPTY:t.PLP_FILTERS_EMPTY})]})};lu.displayName="Filter.Item.Content";const uu=({PLP_FILTERS_EMPTY:e})=>{const t=()=>{window.history.back()};return n.jsxs("div",{className:We["filter--empty"],children:[n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h4",{children:e.title}),n.jsx("p",{children:e.subtitle})]}),n.jsx(d.Button,{onClick:()=>t(),variant:"tertiary",children:e.button})]})};uu.displayName="Filter.Empty";const du=({columns:e,facet:t,onToggleFacet:r,CONSTANTS:s,...o})=>{const a=au({key:t.key,PLP_FILTERS:s.PLP_FILTERS}),i=()=>{if(t.__typename==="FacetBoolean"){if(t.key==="cores-filtraveis")return n.jsx(rt.Colors,{onToggleFacet:r,values:t.values,PLP_FILTERS:s.PLP_FILTERS,PLP_FILTERS_COLORS:s.PLP_FILTERS_COLORS});if(t.key==="tamanho")return n.jsx(rt.Sizes,{onToggleFacet:r,values:t.values,PLP_SIZE_ORDER:s.PLP_SIZE_ORDER});if(t.key==="category-2")return n.jsx(rt.Toggle,{columns:e,facetKey:t.key,onToggleFacet:r,values:t.values,ICONS:s.ICONS})}return t.__typename==="FacetRange"?n.jsx(rt.Price,{facet:t}):n.jsx("p",{children:"Filter not support!!!"})};return n.jsx("div",{...o,className:We["filter--item"],style:{order:a},children:n.jsxs(d.Accordion.Wrapper,{style:{width:"100%"},children:[n.jsx(d.Accordion.Header,{id:t.key,closeIndicator:n.jsx(d.Icon,{name:s.ICONS.arrow_up}),openIndicator:n.jsx(d.Icon,{name:s.ICONS.arrow_down}),children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h4",{className:"typography-style-body-sm",children:ou({key:t.key,PLP_FILTERS:s.PLP_FILTERS})})})})}),n.jsx(d.Accordion.Body,{children:i()})]})})};du.displayName="Filter.Item";const pu=({onToggleFacet:e,values:t,PLP_FILTERS:r,PLP_FILTERS_COLORS:s,...o})=>n.jsx(Qe.Root,{...o,children:n.jsx(Qe.List,{children:Array.isArray(t)&&t.map(({key:a,selected:i,value:c})=>n.jsx(Qe.Option,{active:i,"data-color":Ls({key:a,PLP_FILTERS:r}),fill:ks({value:c,PLP_FILTERS_COLORS:s}),onClick:()=>e({key:a,value:c}),type:"color"},`${a}-${c}`))})});pu.displayName="Filter.Item.Color";const mu=({facet:e,...t})=>{var u,p;const{filters:{selected:r},price:s,onToggleFacet:o}=Ot(),[a,i]=(s==null?void 0:s.split(":").map(Number))??[0,100],[c,l]=((p=(u=r==null?void 0:r.find(({key:f})=>f==="price"))==null?void 0:u.value)==null?void 0:p.split(":").map(Number))??[a,i];return n.jsx("div",{...t,className:We["filter--item--price"],children:n.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 m,h;f&&o({key:"price",value:`${(m=f.range)==null?void 0:m.min}:${(h=f.range)==null?void 0:h.max}`})},children:[n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{"data-min-value":!0})})}),n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{"data-max-value":!0})})})]})})};mu.displayName="Filter.Item.Price";const fu=({onToggleFacet:e,values:t,PLP_SIZE_ORDER:r,...s})=>{const o=[...t].sort((a,i)=>{const c=r.indexOf(a.name),l=r.indexOf(i.name);return c-l});return n.jsx(Qe.Root,{...s,children:n.jsx(Qe.List,{children:Array.isArray(o)&&o.map(({key:a,selected:i,value:c})=>n.jsx(Qe.Option,{active:i,text:c,type:"size",onClick:()=>e({key:a,value:c})},c))})})};fu.displayName="Filter.Item.Sizes";const hu=({columns:e,facetKey:t,onToggleFacet:r,values:s,ICONS:o,...a})=>n.jsx("div",{...a,className:We["filter--item--toggle"],children:n.jsx("div",{className:We["filter--item--toggle--container"],style:{gridTemplateColumns:`repeat(${e}, 1fr)`},children:Array.isArray(s)&&s.map(i=>n.jsx(d.Checkbox,{label:(i==null?void 0:i.name)??"",adornment:n.jsx(d.Icon,{name:o.check}),checked:i.selected,onChange:()=>r(i)},i.value))})});hu.displayName="Filter.Item.Toggle";const _u=({...e})=>{const{isLoading:t}=Ot();return n.jsx("div",{className:We["filter--loading"],"data-active":t,...e,children:n.jsx(d.Spinner,{indicatorColor:"#000",background:"#222"})})};_u.displayName="Filter.Loading";const gu=({children:e,className:t,isMobile:r=!1,CONSTANTS:{PLP_FILTERS_TITLE:s,ICONS:o}})=>{var p;const{deleteAllFacets:a,filters:i,isOpen:c,target:l,setIsOpen:u}=Ot();return n.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(We["filter--modal"],t),isMobile:r??!1,isOpen:c,parent:l,setIsOpen:u,variant:r?"sideBottom":"sideRight",style:{zIndex:99},children:[n.jsxs(d.Modal.Header,{navigation:"top",children:[n.jsx(d.Modal.Controls,{navigation:"top",isMobile:r,children:n.jsx(d.Button,{"data-close":!0,iconNameStart:o.close,size:"small",variant:"tertiary",style:{marginLeft:"auto"}})}),n.jsx(d.Modal.Title,{navigation:"top",title:s})]}),n.jsxs(d.Modal.Body,{style:{width:500},children:[n.jsx("div",{className:We["filter--modal--body"],children:e}),n.jsx(rt.Loading,{})]}),n.jsx(d.Modal.Footer,{children:n.jsxs("div",{className:We["filter--modal--footer"],children:[n.jsx(d.Button,{"data-close":!0,size:"large",variant:"primary",children:(p=i.facets)!=null&&p.length?"ver resultados":"fechar"}),n.jsx(d.Button,{"data-close":!0,onClick:()=>a(),variant:"tertiary",children:"limpar filtros"})]})})]})};gu.displayName="Filter.Modal";const yu=({children:e,className:t,isMobile:r,CONSTANTS:s,...o})=>n.jsx(qi,{...o,PLP_FILTERS:s.PLP_FILTERS,children:n.jsx(rt.Modal,{className:t,isMobile:r,CONSTANTS:s,children:e})});yu.displayName="Filter.Root";const xu=({ICONS:e,PLP_FILTERS_COLORS:t,PLP_FILTERS:r})=>{const{filters:s,onToggleFacet:o}=Ot();return n.jsx("div",{className:We["filter--selected"],children:n.jsx("div",{className:We["filter--selected--content"],children:Array.isArray(s.selected)&&s.selected.map(({key:a,value:i})=>a==="productclusterids"?null:n.jsx(d.Tag,{title:a==="price"?Kr({value:i}):i,adornment:{end:n.jsx(d.Icon,{name:e.close,size:"x-small"})},colorSquare:ks({value:i,PLP_FILTERS_COLORS:t}),onClick:()=>o({key:a,value:i}),squareShow:Ls({key:a,PLP_FILTERS:r}),size:"medium",variant:"primary",children:a==="price"?Kr({value:i}):i},i))})})};xu.displayName="Filter.Selected";const rt={Colors:pu,Content:lu,Empty:uu,Modal:gu,Item:du,Root:yu,Loading:_u,Selected:xu,Price:mu,Sizes:fu,Toggle:hu},{checkedColor:Eh,createTagPrice:$o,getColor:Ph}=cu,vu=({callback:e,facet:t})=>{const{ICONS:r,PLP_FILTERS_COLORS:s,PLP_FILTERS:o}=Me();return n.jsx(d.Tag,{title:(t==null?void 0:t.key)==="price"?$o({value:t.value}):t.value.toUpperCase(),adornment:{end:n.jsx(d.Icon,{name:r.close,size:"x-small"})},colorSquare:Ph({value:t.value,PLP_FILTERS_COLORS:s}),onClick:()=>{typeof e=="function"&&e(t,!0)},squareShow:Eh({key:t.key,PLP_FILTERS:o}),size:"medium",variant:"primary",children:(t==null?void 0:t.key)==="price"?$o({value:t.value}):t.value.toUpperCase()})};vu.displayName="PLPNavigation.Selected.Item";const bu=()=>n.jsx(d.TextStructure.Root,{children:n.jsx("p",{id:"pdc-navigation--total"})});bu.displayName="PLPNavigation.Total";const ut={BreadCrumb:Zl,Content:Jl,Filters:nu,Root:ru,Selected:su,SelectedItem:vu,Total:bu},Nh="_footer__bottom_198g6_2",Ih="_footer__wrapper_198g6_10",Rh="_footer__main_198g6_39",wh="_footer__legalInformation_198g6_55",Ah="_footer__column_198g6_77",Th="_footer__columnContent_198g6_87",Lh="_footer__item_198g6_91",kh="_footer__itemLink_198g6_107",Oh="_footer__columnTitle_198g6_122",Mh="_footer__columnTitleIcon_198g6_134",Dh="_footer__iconList_198g6_147",zh="_footer__itemSmallText_198g6_157",$h="_payment_198g6_168",Fh="_footer__iconContainer_198g6_173",Bh="_footer__iconListSubHeader_198g6_178",Uh="_accordionWrapper_198g6_200",Hh="_accordionHeader_198g6_204",qh="_accordionTextWrapper_198g6_208",de={footer__bottom:Nh,footer__wrapper:Ih,footer__main:Rh,footer__legalInformation:wh,footer__column:Ah,footer__columnContent:Th,footer__item:Lh,footer__itemLink:kh,footer__columnTitle:Oh,footer__columnTitleIcon:Mh,footer__iconList:Dh,footer__itemSmallText:zh,payment:$h,footer__iconContainer:Fh,footer__iconListSubHeader:Bh,accordionWrapper:Uh,accordionHeader:Hh,accordionTextWrapper:qh,"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 ju={},Os={},Fn={};(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=s=>{r.has(s)||console.warn(s),r.add(s)}}})(Fn);var Cu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImageBlurSvg",{enumerable:!0,get:function(){return t}});function t(r){let{widthInt:s,heightInt:o,blurWidth:a,blurHeight:i,blurDataURL:c,objectFit:l}=r;const u=20,p=a?a*40:s,f=i?i*40:o,m=p&&f?"viewBox='0 0 "+p+" "+f+"'":"",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"}})(Cu);var Bn={};(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 s}});const r=["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}})(Bn);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImgProps",{enumerable:!0,get:function(){return h}});const t=Fn,r=Cu,s=Bn,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 p(_){return typeof _>"u"?_:typeof _=="number"?Number.isFinite(_)?_:NaN:typeof _=="string"&&/^[0-9]+$/.test(_)?parseInt(_,10):NaN}function f(_,y,x){let{deviceSizes:b,allSizes:E}=_;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:E.filter(C=>C>=b[0]*S),kind:"w"}}return{widths:E,kind:"w"}}return typeof y!="number"?{widths:b,kind:"w"}:{widths:[...new Set([y,y*2].map(v=>E.find(P=>P>=v)||E[E.length-1]))],kind:"x"}}function m(_){let{config:y,src:x,unoptimized:b,width:E,quality:j,sizes:v,loader:P}=_;if(b)return{src:x,srcSet:void 0,sizes:void 0};const{widths:S,kind:C}=f(y,E,v),I=S.length-1;return{sizes:!v&&C==="w"?"100vw":v,srcSet:S.map((L,T)=>P({config:y,src:x,quality:j,width:L})+" "+(C==="w"?L:T+1)+C).join(", "),src:P({config:y,src:x,quality:j,width:S[I]})}}function h(_,y){let{src:x,sizes:b,unoptimized:E=!1,priority:j=!1,loading:v,className:P,quality:S,width:C,height:I,fill:L=!1,style:T,overrideSrc:k,onLoad:M,onLoadingComplete:Q,placeholder:D="empty",blurDataURL:U,fetchPriority:F,decoding:Y="async",layout:G,objectFit:H,objectPosition:Z,lazyBoundary:re,lazyRoot:le,...se}=_;const{imgConf:ie,showAltText:z,blurComplete:J,defaultLoader:R}=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),O=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:O,qualities:B}}if(typeof R>"u")throw new Error(`images.loaderFile detected but the file is missing default export.
4
+ Learn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor`);const _e=se?K&&typeof K=="object"&&K.ref:L,[Re,be,ge]=(0,m.useIntersection)({rootMargin:"200px"}),Ae=o.default.useCallback(z=>{(q.current!==w||Ne.current!==N)&&(ge(),q.current=w,Ne.current=N),Re(z),_e&&(typeof _e=="function"?_e(z):typeof _e=="object"&&(_e.current=z))},[w,_e,N,ge,Re]);o.default.useEffect(()=>{process.env.NODE_ENV==="production"&&R&&(!be||!ae||b(R,N,w,{locale:H},{kind:he},W))},[w,N,be,H,ae,$==null?void 0:$.locale,R,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),R&&(z.defaultPrevented||j(z,R,N,w,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),R&&((!ae||process.env.NODE_ENV==="development")&&W||b(R,N,w,{locale:H,priority:!0,bypassPrefetchedCheck:!0},{kind:he},W))},onTouchStart:process.env.__NEXT_LINK_NO_TOUCH_START?void 0:function(pe){!se&&typeof le=="function"&&le(pe),se&&K.props&&typeof K.props.onTouchStart=="function"&&K.props.onTouchStart(pe),R&&(!ae&&W||b(R,N,w,{locale:H,priority:!0,bypassPrefetchedCheck:!0},{kind:he},W))}};if((0,l.isAbsoluteUrl)(w))je.href=w;else if(!se||U||K.type==="a"&&!("href"in K.props)){const z=typeof H<"u"?H:$==null?void 0:$.locale,pe=($==null?void 0:$.isLocaleDomain)&&(0,h.getDomainLocale)(w,z,$==null?void 0:$.locales,$==null?void 0:$.domainLocales);je.href=pe||(0,_.addBasePath)((0,u.addLocale)(w,z,$==null?void 0:$.defaultLocale))}return se?o.default.cloneElement(K,je):(0,s.jsx)("a",{...ie,...je,children:T})});(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)})(qr,qr.exports);var Zm=qr.exports,Jm=Zm;const De=A.getDefaultExportFromCjs(Jm),ef="_link_w24h0_1",tf="_wrapper_w24h0_98",nf="_text_w24h0_106",yr={link:ef,wrapper:tf,text:nf},$e=({children:e,adornments:t,className:r,disableUnderline:s,href:o,mode:a,size:i,title:c,onClick:l,disablePadding:u,...p})=>{const f=d.helpers.ValidateProp({fieldTypes:Nt.SizesSmallExtended,property:i,fallback:"medium"}),m=d.helpers.ValidateProp({fieldTypes:Nt.Mode,property:a,fallback:"default"});return n.jsx(De,{...p,className:d.helpers.classNameConcat(yr.link,r),href:o&&o.length>0?o:"#","data-size":f,"data-variant":m,title:c||"NextLink","data-disable-underline":s??!1,"data-disable-padding":u??!0,children:n.jsxs("div",{className:yr.wrapper,onClick:l,children:[t==null?void 0:t.start,n.jsx("p",{className:yr.text,"data-size":f,children:e}),t==null?void 0:t.end]})})},rf=({ICONS:e})=>{const{resetFeedback:t}=vt();return n.jsxs("div",{className:Ft["wishlist--snack--actions"],children:[n.jsx($e,{href:"/favoritos",children:"Ver Favoritos"}),n.jsx(d.Button,{variant:"tertiary",size:"small",onClick:t,adornment:{start:n.jsx(d.Icon,{name:e.close})}})]})},Is=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:r})=>{const s=ms(),{resetFeedback:o}=vt(),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)&&n.jsx(It,{Z_INDEX_WAR:r,className:Ft["wishlist--snack"],"data-action":s.action,title:s.action==="add"?e.messages.add:e.messages.remove,supportChildren:n.jsx(rf,{ICONS:t}),size:"medium"})};Is.displayName="WishList.Feedback";const Rs={"product-list--banner":"_product-list--banner_sfibj_1","product-list--card":"_product-list--card_sfibj_30","product-list":"_product-list_sfibj_1"},Sc=({className:e,children:t,columns:r=1,isMobile:s=!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":s||r<2?c:c.split("/").reverse().join("/"),[r,i,s]);return n.jsx("div",{...l,className:d.helpers.classNameConcat(Rs["product-list--banner"],e),style:{aspectRatio:u,maxWidth:`${r/i*100}%`,order:a,padding:o/2},children:t})};Sc.displayName="ProductList.Banner";const Ec=({isKit:e,parent:t,productId:r,setNotify:s,CONSTANTS:o})=>{const{router:a}=ce(),i=g.useRef(!1),c=g.useRef(null),[l,u]=g.useState([]),p=_=>a.push(_??""),f=async _=>{try{const y=await fetch("/api/catalog/product/similars",{method:"POST",body:JSON.stringify({productId:_,filterTexture:o.TEXTURE_IMAGE}),priority:"low"});if(!y.ok)throw new Error("Erro ao buscar similares.");const x=await y.json();u(x)}catch(y){console.error(y)}},m=g.useCallback(_=>{!r||!_||(typeof f=="function"&&f(r),i.current=!0)},[r]),h=g.useCallback((_,y)=>{if(!_.isIntersecting){o.PLP_INFINITE_SCROLL&&c.current&&(clearTimeout(c.current),c.current=null);return}if(_.intersectionRatio>=y.threshold&&!i.current){if(o.PLP_INFINITE_SCROLL){c.current=setTimeout(()=>{m(!0)},o.PLP_PRODUCT_SIMILAR_DELAY);return}m(!0)}},[m]);return g.useEffect(()=>{if(e||!t.current)return;const _={root:null,threshold:.1},y=new IntersectionObserver(([x])=>{h(x,_)},_);return y.observe(t.current),()=>{c.current&&clearTimeout(c.current),y.disconnect()}},[h,t,e]),n.jsx(me.Actions,{...l,callback:p,isKit:e,children:!e&&n.jsx(me.SizeSelector,{setNotify:s,PLP_SIZE_ORDER:o.PLP_SIZE_ORDER})})};Ec.displayName="ProductList.Card.Actions";const Pc=({className:e,children:t,gap:r=32,item:s,isMobile:o,order:a,tag:i,hasMaxWidth:c=!0,index:l,setSkuSelected:u,showVideo:p,CONSTANTS:f,...m})=>{const h=g.useRef(null),{availability:{status:_}}=s,y=g.useCallback((b,E)=>{var j;typeof u=="function"&&u((j=b.isVariantOf)==null?void 0:j.hasVariant,E)},[u]),x=s.name.substring(0,4).toLowerCase()==="kit ";return n.jsxs("div",{...m,className:d.helpers.classNameConcat(Rs["product-list--card"],e),"data-mobile":o,"data-order":a,ref:h,style:{...c&&{maxWidth:o?"50%":"25%"},order:a,padding:r/2},children:[n.jsxs(me.Root,{item:s,isMobile:o,index:l,size:o?"small":"medium",order:a,outStock:!_,CONSTANTS:f,children:[n.jsx(me.Header,{product:s,tag:i==null?void 0:i.commercial}),n.jsx(me.Media,{showVideo:p,hasPriority:!0}),n.jsxs(me.Wrapper,{type:"body",children:[n.jsx(me.Title,{tag:i==null?void 0:i.institucional}),n.jsx(Ec,{productId:s.isVariantOf.productGroupID,parent:h,setNotify:y,isKit:x,CONSTANTS:f}),!x&&n.jsx(me.OutStock,{callback:y})]}),n.jsx(me.Wrapper,{type:"footer",children:_&&n.jsx(me.BuyButton,{isKit:x})})]}),t]})};Pc.displayName="ProductList.Card";const Nc=({children:e,className:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat(Rs["product-list"],t),children:e});Nc.displayName="ProductList.Grid";const tt={Banner:Sc,Card:Pc,Root:Nc,helpers:Kp},sf="_pdc_alo7z_1",Ge={"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:sf},ws=({className:e,ICONS:t,PLP_NOT_RESULT:r})=>{const{router:s}=ce(),{isMobile:o}=ne(),a=()=>{s.push(r==null?void 0:r.link)};return n.jsxs("div",{className:d.helpers.classNameConcat(Ge["pdc--empty"],e),children:[n.jsxs(d.TextStructure.DivWrapper,{className:Ge["pdc--empty-wrapper"],children:[n.jsx("span",{className:o?"typography-style-body-md":"typography-style-heading-sm",children:r.title}),n.jsx("p",{className:o?"typography-style-body-xs":"typography-style-body-sm",children:r.subtitle})]}),n.jsx(d.Button,{adornment:{end:n.jsx(d.Icon,{name:t.arrow_right})},className:"typography-style-body-sm-strong",onClick:()=>a(),variant:"tertiary",children:n.jsx("b",{children:r.text})})]})};ws.displayName="PDC.Empty";const On=e=>n.jsx("div",{...e,className:Ge["pdc--infinite--next-page"],children:n.jsx(d.Spinner,{className:Ge["pdc--infinite--next-page--spinner"]})});On.displayName="PDC.Spinner";function Ic({CONSTANTS:e}){const{sendDataLayerEvent:t}=oe(),{isMobile:r}=ne(),{getAvailableProductTag:s}=dt(),[o,a]=g.useState([]),[i,c]=g.useState(!0),l=Lt(),u=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(f=>f.json()).then(f=>{a(f),t({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:f}}})}).catch(f=>console.error(f)):a([]),c(!1)};if(l.length){p();return}if(l.length===0&&o.length===0){c(!1);return}a([]),c(!1)},[l]),n.jsx("section",{className:Ft["wishlist-grid"],children:n.jsxs("div",{className:Ft["wishlist-grid--container"],children:[i&&n.jsx(On,{}),!l.length&&!(o!=null&&o.length)&&!i&&n.jsx(ws,{className:Ft["pdc-empty-modifier"],ICONS:e.ICONS,PLP_NOT_RESULT:e.WISHLIST_NOT_RESULT}),n.jsx(tt.Root,{children:Array.isArray(o)&&o.map((p,f)=>{const m=p.node.cluster.highlights||[],h=s(m);return n.jsx(tt.Card,{gap:u,isMobile:r??!1,item:p.node,tag:h,index:f,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)})})]})})}Ic.displayName="Wishlist.Grid";const of=e=>e.map(t=>{var r;return(r=t.isVariantOf)==null?void 0:r.productGroupID})??[],Rc=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:r})=>{const s=kt(),o=Lt(),a=ms(),{updateList:i}=vt();return g.useEffect(()=>{var l,u;a.active&&Ze.set("fs::wishlist",o);const c=async()=>{var p;await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:o,docId:(p=s==null?void 0:s.user)==null?void 0:p.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 p=await Ze.get("fs::wishlist");p&&(p==null?void 0:p.length)!==o.length&&i(p)},l=async()=>{var h;const p=await Ze.get("fs::wishlist")??[],f=s.wishlist?typeof s.wishlist[0]=="object"?of(s.wishlist):s.wishlist:[],m=[...new Set([...p,...f])];i(m),Ze.set("fs::wishlist",o),f.length!==m.length&&await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:m,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]),n.jsx(Is,{ICONS:t,Z_INDEX_WAR:r,WISHLIST_INFO:e})};Rc.displayName="Wishlist.Init";const wc=({product:e,priceInfo:t,size:r="medium",style:s,ICONS:o})=>{const{sendDataLayerEvent:a,currentLocalRef:i}=oe(),c=Lt(),{toggleProduct:l}=vt(),{isVariantOf:{productGroupID:u}}=e;return n.jsx(d.Button,{adornment:{start:n.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:{...s,border:"none"},variant:"tertiary"})};wc.displayName="WishList.Toggle";const Ac={Feedback:Is,Toggle:wc,Grid:Ic,Init:Rc},Tc=({product:e,tag:t,size:r="small"})=>{const{CONSTANTS:s}=Ke(),{tags:o}=dt(),a=e.offers.offers[0],i=A.getDiscountPercent(a.listPrice,a.price),c=o==null?void 0:o.flagDiscount;return n.jsxs(me.Wrapper,{type:"header",style:{zIndex:s.Z_INDEX_WAR.product_card_header},children:[i>0&&!t&&(c==null?void 0:c.enableTag)&&n.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?n.jsx(d.Tag,{title:t.value,adornment:{start:t.enableIcon&&t.icon?n.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,s.PRODUCT_CARD_TOP_WISHLIST_TOGGLE&&n.jsx(Ac.Toggle,{product:e,priceInfo:{price:a.price,listPrice:a.listPrice},variant:"card",ICONS:s.ICONS})]})};Tc.displayName="ProductCard.Actions.Header";const Lc=({className:e,children:t,hasPriority:r=!1,showVideo:s=!1,...o})=>{const{element:a,index:i,item:{image:c,slug:l,video:u},sendSelectItemEvent:p,order:f,CONSTANTS:m}=Ke(),h=A.getFirstImages({images:c,label:{first:m.MAIN_IMAGE,second:m.SECOND_IMAGE}});return n.jsxs("div",{...o,className:d.helpers.classNameConcat(we["product-card--image"],e),ref:a,style:{aspectRatio:m.PRODUCT_CARD_IMAGE_ASPECT_RATIO},children:[n.jsx(De,{href:`/${l}/p`,onClick:p,onMouseUp:_=>{_.button===1&&p(),m.PLP_INFINITE_SCROLL&&sessionStorage.setItem(m.PLP_GRID_SCROLL_BACK.order,String(f))},children:n.jsx("div",{className:we["product-card--image--container"],children:Array.isArray(h)&&h.map(({url:_,alternateName:y},x)=>g.createElement(Ie.Image,{...m.PRODUCT_IMAGE_DIMENSIONS.product_card,style:m.PRODUCT_IMAGE_DIMENSIONS.product_card,alt:y??"product image",key:x,...r&&{priority:x===0&&i<4},objectFit:"cover",src:_}))})}),m.PLP_SHOW_VIDEO_ON_PRODUCT_CARD&&s&&u&&n.jsx(me.Video,{url:u,poster:h[0].url}),t]})};Lc.displayName="ProductCard.Media.Media";const kc=({className:e,callback:t,children:r,...s})=>{const{isMobile:o,item:a,CONSTANTS:{PRODUCT_CARD_TEXTS:i}}=Ke(),{availability:{status:c}}=a;return c?null:n.jsxs("div",{...s,className:d.helpers.classNameConcat(we["product-card--outstock"],e),children:[n.jsx(d.Tag,{size:"small",variant:"secondary",title:i.disabled,children:i.disabled}),n.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})]})};kc.displayName="ProductCard.OutStock";const Oc=({children:e,className:t="",index:r,isMobile:s=!1,item:o,size:a,order:i,outStock:c,shelfTitle:l,CONSTANTS:u,...p})=>n.jsx(Cm,{item:o,isMobile:s,outStock:c,order:i,size:a,index:r,shelfTitle:l,CONSTANTS:u,children:n.jsx("div",{...p,className:d.helpers.classNameConcat(we["product-card--wrapper"],t),"data-size":a,children:e})});Oc.displayName="ProductCard.Root";const Mc=({disabled:e,label:t,size:r,value:s,onClick:o,...a})=>n.jsxs(d.ToggleSize.Wrapper,{...a,disabled:!1,outOfStock:e,size:r,onClick:o,children:[n.jsx(d.ToggleSize.DisabledAdornment,{}),n.jsx(d.ToggleSize.Text,{children:t})]});Mc.displayName="ProductCard.SizeSelector.Item";const Dc=({active:e=!1,callback:t,selectedSku:r=null,item:s,setNotify:o})=>{const{item:a,isMobile:i,setSelectedSku:c,eventDataRef:l}=Ke();s.productId=a.id;const u=A.disableSKU(s),p=A.getSKUName(s,"tamanho");!u&&!l.current.availableSkus.includes(p)&&l.current.availableSkus.push(p);const f=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,s);return}f(s)},[s,o,f,u,a]);return n.jsx(Mc,{active:e,disabled:u,label:p,onClick:()=>m(),size:i?"x-small":"small",value:s})};Dc.displayName="ProductCard.SizeSelector.SkuItem";const $c=({items:e,getLabel:t,PLP_SIZE_ORDER:r})=>Array.isArray(e)?[...e].sort((s,o)=>{const a=t(s).toUpperCase(),i=t(o).toUpperCase(),c=r.indexOf(a)-r.indexOf(i);return c!==0?c:a.localeCompare(i,"pt-BR")}):[],zc=({callback:e,className:t="",children:r,setNotify:s,PLP_SIZE_ORDER:o,...a})=>{const{isMobile:i,item:{isVariantOf:{hasVariant:c}},selectedSku:l}=Ke(),u=g.useMemo(()=>Array.isArray(c)?$c({items:c,getLabel:p=>A.getSKUName(p,"tamanho"),PLP_SIZE_ORDER:o}):[],[c]);return n.jsxs("div",{...a,className:d.helpers.classNameConcat(we["product-card--selectors--size"],t),"data-mobile":i,children:[n.jsx("div",{className:we["product-card--selectors--size--skus"],children:u.map((p,f)=>n.jsx(Dc,{active:l===p,callback:e,item:p,selectedSku:l,setNotify:s},`size--${f}--${p.sku}`))}),n.jsx("div",{className:we["product-card--selectors--size--button"],children:r})]})};zc.displayName="ProductCard.SizeSelector";const Vr=({alt:e="",callback:t,more:r,total:s=4,src:o,url:a,...i})=>n.jsxs(d.ToggleStyle.Wrapper,{...i,onClick:()=>{typeof t=="function"&&t(a)},children:[n.jsx(d.ToggleStyle.DisabledAdornment,{}),n.jsxs(d.ToggleStyle.Texture,{children:[o&&n.jsx(Ie.Image,{alt:e??o,src:o,height:34,width:34}),r&&n.jsx(d.TextStructure.DivWrapper,{className:we["product-card--selectors--style--more"],children:n.jsxs("p",{children:["+ ",s]})})]})]}),af=({children:e,callback:t,data:r,total:s=4,size:o,...a})=>{const{index:i}=Ke(),{triggerSelectItemEventRef:c}=oe();return n.jsxs("div",{...a,children:[e,Array.isArray(r)&&r.slice(0,s).map((l,u)=>n.jsx(Vr,{callback:p=>{c.current.trigger=!0,c.current.index=i,typeof t=="function"&&t(p)},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)>s&&n.jsx(Vr,{size:o,total:r.length-s,more:!0})]})},Fc=({callback:e,className:t,data:r,images:s=[],findTexture:o,...a})=>{const{CONSTANTS:i}=Ke(),c=o||i.TEXTURE_IMAGE,l=s==null?void 0:s.find(u=>c.includes(u.alternateName));return n.jsx(af,{...a,callback:e,className:d.helpers.classNameConcat(we["product-card--selectors--style"],t),data:r,size:"x-small",children:l&&n.jsx(Vr,{active:!0,size:"x-small",src:l.url})})};Fc.displayName="ProductCard.StyleSelector";const Bc=({className:e,hasDecimal:t,...r})=>{const{isMobile:s,item:{offers:{lowPrice:o,highPrice:a},installments:{count:i,value:c}},eventDataRef:l}=Ke();l.current.priceInfo={price:o,listPrice:a};const u=A.formatPriceToCurrency(a,t),p=A.formatPriceToCurrency(o,t),f=A.formatPriceToCurrency(c??0),m=s?"horizontal":"stacked";return n.jsx("div",{...r,className:d.helpers.classNameConcat(we["product-card--price"],e),"data-mobile":s,children:n.jsx(d.ProductInfo.Root,{size:"small",layout:m,children:n.jsxs(d.ProductInfo.Wrapper,{size:"small",layout:m,children:[n.jsx(d.ProductInfo.ValuesWrapper,{children:p!==u?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:u,size:"small"}),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:p,size:"small"})]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:p,size:"small"})}),i&&i>1&&c?n.jsx(d.ProductInfo.Price,{label:"installment",value:`${i}x ${f}`,size:"small"}):null]})})})};Bc.displayName="ProductCard.Price";const Uc=({tag:e,className:t})=>{const{item:{name:r}}=Ke();return n.jsxs("div",{className:d.helpers.classNameConcat(we["product-card--title"],t),children:[n.jsx("div",{className:we["product-card--title--tag"],children:e?n.jsx(d.Tag,{size:"small",title:e.value,variant:"quaternary",adornment:{start:e.enableIcon&&e.icon?n.jsx(d.Icon,{name:e.icon,style:{color:e.iconColor}}):null},style:{background:e.tagColor,color:e.textColor},children:e.value}):n.jsx("div",{})}),n.jsx("div",{className:we["product-card--title--content"],children:r&&n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h3",{children:r})})})})]})};Uc.displayName="ProductCard.Title";const Hc=({className:e,url:t,poster:r,...s})=>{const{element:o}=Ke();return g.useEffect(()=>{if(!(o!=null&&o.current))return;const a=o.current,i=a.querySelector("video");if(i){const c=new IntersectionObserver(p=>{p.forEach(f=>{A.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]),n.jsx("div",{...s,className:d.helpers.classNameConcat(we["product-card--video"],e),children:t&&n.jsx(Ie.Video,{autoPlay:!1,muted:!0,loop:!0,preload:"none",playsInline:!0,poster:r})})};Hc.displayName="ProductCard.Media.Video";const qc=({children:e,className:t,type:r,...s})=>n.jsx("div",{...s,className:d.helpers.classNameConcat(we[`product-card--${r}`],t),children:e});qc.displayName="ProductCard.Wrapper";const me={Actions:pc,BuyButton:mc,Header:Tc,Media:Lc,Root:Oc,OutStock:kc,Price:Bc,SizeSelector:zc,StyleSelector:Fc,Title:Uc,Video:Hc,Wrapper:qc},cf="_carousel_245ib_1",lf="_shelf__container_245ib_14",uf="_shelf_without_carousel_245ib_34",df="_card_container_245ib_50",Pt={carousel:cf,"custom-controllers":"_custom-controllers_245ib_5",shelf__container:lf,"controllers-arrows-bullets":"_controllers-arrows-bullets_245ib_23",shelf_without_carousel:uf,card_container:df},ko=({title:e})=>n.jsx("div",{className:Pt.shelf__container,children:e&&n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h2",{className:d.helpers.classNameConcat("typography-style-body-md",A.responsive["responsive-mobile-flex"]),children:e}),n.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-md",A.responsive["responsive-desktop-flex"]),children:e})]})})}),pf=({children:e,ICONS:t,itemsPerPage:r,title:s})=>{const{isMobile:o}=ne(),a=r[o?"mobile":"desktop"],{initialize:i,controller:c,itemsStyles:l,pagination:u}=d.Carousel.useCarousel({itemsPerPage:a,gap:10,loop:!0,direction:"row"}),p=g.Children.toArray(e).length;return o||p>=4?n.jsxs(d.Carousel.Root,{innerRef:m=>{i(m)},className:Pt.carousel,children:[n.jsxs("div",{className:Pt["custom-controllers"],children:[s&&n.jsx(ko,{title:s}),a<p&&n.jsxs(d.Carousel.Controller,{className:Pt["controllers-arrows-bullets"],children:[n.jsxs(d.Carousel.Arrows,{children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:n.jsx(d.Icon,{name:t.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:n.jsx(d.Icon,{name:t.arrow_right})}})]}),!o&&a>2&&n.jsx(d.Carousel.Bullets,{page:u.currentPage,total:u.totalPages,onBulletClick:m=>c==null?void 0:c.navigateTo(m)})]})]}),n.jsx(d.Carousel.Body,{children:g.Children.map(e,(m,h)=>n.jsx(d.Carousel.Item,{style:{...l,overflow:"hidden"},children:m},`${s}_${h}`))})]}):n.jsxs(n.Fragment,{children:[s&&n.jsx(ko,{title:s}),n.jsx("div",{className:Pt.shelf_without_carousel,children:e})]})},Vc=({className:e,item:t,isMobile:r,size:s,shelfTitle:o,...a})=>{const i=g.useRef(null),{getAvailableProductTag:c}=dt(),{availability:{status:l}}=t,u=f=>{const m=f.filter(h=>!a.CONSTANTS.TEXTURE_IMAGE.includes(h.keywords));return r?m.splice(0,2):m},p=c(t.cluster.highlights);return n.jsx("div",{ref:i,className:Pt.card_container,children:n.jsxs(me.Root,{...a,item:{...t,image:u(t.image)},isMobile:r,size:r?"small":"medium",outStock:!l,shelfTitle:o,children:[n.jsx(me.Header,{product:t,tag:p==null?void 0:p.commercial}),n.jsx(me.Media,{}),n.jsxs(me.Wrapper,{type:"body",children:[n.jsx(me.Title,{tag:p==null?void 0:p.institucional}),n.jsx(me.Actions,{})]}),n.jsx(me.Wrapper,{type:"footer"})]})})};Vc.displayName="ProductList.Card";const Ht={Shelf:pf,Card:Vc},Wc=({CONSTANTS:e,inView:t,products:r,innerRef:s})=>{const o=g.useMemo(()=>bm(r),[r]),{isMobile:a}=ne(),{addItemsToCart:i}=ve(),{sendDataLayerEvent:c}=oe(),{getAvailableProductTag:l}=dt(),[u,p]=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}}})},m=({selectedProduct:h,productId:_})=>{const y=jm({selectedProduct:h,productId:_,prevState:u,mainSellerId:e.StoreConfig_MainSellerId});p(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]),n.jsxs("div",{className:ct.container,ref:s,children:[n.jsx("div",{className:ct["carousel-container"],style:{width:o.length<=3?"max-content":"75%"},children:n.jsx(Ht.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,E,j;const y=l(h.cluster.highlights),{availability:{status:x}}=h;return x?n.jsxs(me.Root,{item:{...h,image:Es.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:[n.jsx(me.Header,{product:h,tag:y.commercial}),n.jsx(me.Media,{}),n.jsxs(me.Wrapper,{type:"body",children:[n.jsx(me.Title,{tag:{value:(b=y.institucional)==null?void 0:b.value,enableIcon:(E=y.institucional)==null?void 0:E.enableIcon,icon:(j=y.institucional)==null?void 0:j.icon}}),n.jsx(me.Actions,{children:n.jsx(me.SizeSelector,{callback:v=>m({selectedProduct:v,productId:h.id}),PLP_SIZE_ORDER:e.PLP_SIZE_ORDER})})]})]},h.id):null})})}),n.jsx("div",{className:ct["add-cart-container"],children:n.jsx(vm,{handleAddAllToCart:f,selectedProducts:u,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,BUY_PACKAGE:e.BUY_PACKAGE,FREIGHT_CALCULATION:e.FREIGHT_CALCULATION}})})]})},As={"btn-login":"_btn-login_yas63_12","btn-header":"_btn-header_yas63_22","header-animation":"_header-animation_yas63_35"},Ts=({id:e})=>{const{setIsOpen:t,cartStore:{items:r}}=ve(),{handleSelectContent:s}=oe(),{CONSTANTS:o}=Ee(),a=r.reduce((i,c)=>i+(c.quantity??0),0);return n.jsx(d.Header.SupportItem,{onClick:()=>{t(!0),s({content:"header:minicart"})},id:e,children:n.jsxs(d.Badge.AutoPositioner,{children:[n.jsx(d.Badge.Count,{count:a,size:"medium",variant:"primary",style:{backgroundColor:"black",display:a>0?"flex":"none"}}),n.jsx(d.Icon,{name:o.header.ICONS.bag,size:"medium"})]})})};Ts.displayName="Header.Bag";const Xt=({children:e,href:t,...r})=>t&&t!=="#"?n.jsx(De,{href:t.startsWith("/")?t:`/${t}`,...r,children:e}):e,Gc=()=>{const{headerData:e}=Ee(),{handleSelectContent:t}=oe(),{reset:r,updateValue:s}=Wt(),o=a=>{a?s(a):r()};return n.jsx(d.Header.Categories,{children:Array.isArray(e.categories)&&e.categories.map((a,i)=>n.jsx(Xt,{href:a.link,onMouseEnter:()=>o(a.submenuId),onFocus:()=>o(a.submenuId),children:n.jsx(d.Header.CategoryItem,{className:As["btn-header"],value:a.submenuId??null,adornment:{start:n.jsx(d.Icon,{name:a.iconStart}),end:n.jsx(d.Icon,{name:a.iconEnd})},style:{textWrap:"nowrap",gap:"0"},onClick:()=>{t({content:`header:${a.label}`})},children:a.label})},`category-${a.label}-${i}`))})};Gc.displayName="Header.Categories";function mf(){const{handleSelectContent:e}=oe(),{CONSTANTS:t}=Ee(),{setValue:r}=Rn();return n.jsx(d.Header.SupportItem,{onClick:()=>{r(!0),e({content:"header:search"})},children:n.jsx(d.Icon,{name:t.header.ICONS.search,size:"medium"})})}const ff={"menu-subcategories-container":"_menu-subcategories-container_a93cr_1"},hf={"observer-wrapper":"_observer-wrapper_r43gk_1"},Mn=({children:e,eventData:t,observerOptions:r,callBackWhenVisible:s,stopOnIntersection:o=!0,className:a,...i})=>{const c=g.useRef(null),l=os(c,o,r),{sendDataLayerEvent:u}=oe();return g.useEffect(()=>{l&&(typeof s=="function"&&s(),t&&u({...t}))},[l]),n.jsx("div",{...i,ref:c,className:d.helpers.classNameConcat(hf["observer-wrapper"],a),children:e})},Kc=({thumbnails:e,category:t,isMobile:r=!0,callBack:s})=>{const{handleSelectPromotionEvent:o}=oe(),a=50/e.length;return n.jsx("div",{className:ff["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 n.jsx(Mn,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...u}}}},observerOptions:{delay:1e3},children:n.jsxs(De,{href:i.link??"#",onClick:()=>{typeof s=="function"&&s(),o({updatePromotionRef:!0,promotion:u})},children:[n.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&&n.jsx("p",{children:i.label})]})},`thumb-${i.label}-${c}`)})})};Kc.displayName="Menu.Thumbnail";const Wr={"menu-desktop":"_menu-desktop_1b799_1","menu-categories":"_menu-categories_1b799_12"},Xc=({children:e,dividerOnRight:t=!0,subMenu:r,...s})=>{var l;const{router:o}=ce(),{reset:a}=Wt(),{handleSelectContent:i}=oe(),{CONSTANTS:c}=Ee();return n.jsxs("div",{...s,className:Wr["menu-categories"],children:[(l=r==null?void 0:r.subCategories)==null?void 0:l.map((u,p)=>{var h,_,y,x;const f=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:n.jsx(d.Icon,{name:c.header.ICONS.arrow_right,size:"small"})}};return n.jsxs(d.ComponentList.Structure,{children:[n.jsx(Xt,{href:u.linkLabel,title:u.label,onClick:()=>{u.linkLabel&&(a(),i({content:`menu:${u.label??""}:${r.label??""}`}))},children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h2",{children:u.label})})})}),n.jsx(d.ComponentList.List,{columns:1,...f,className:Wr["submenu-categories"],children:(y=u.items)==null?void 0:y.map((b,E)=>n.jsx(d.ComponentList.ListItem,{id:`list-item-${b.label}-${E}`,children:n.jsx($e,{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}-${E}`))}),((x=u.see_all)==null?void 0:x.link)&&n.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}-${p}`)}),t&&n.jsx(d.Utils.Divider,{size:"small",direction:"vertical"})]})};Xc.displayName="Menu.Categories";const Yc=({children:e,dividerOnBottom:t=!0,...r})=>{const{CONSTANTS:s}=Ee();return n.jsxs(n.Fragment,{children:[n.jsx("div",{...r,className:Wr["menu-desktop"],style:{...r.style,justifyContent:s.header.ALIGNMENT_MENU},children:e}),t&&n.jsx(d.Utils.Divider,{size:"small"})]})};Yc.displayName="Menu.MenuRoot";const xr={Root:Yc,Categories:Xc,Thumbnail:Kc},Qc=()=>{const{headerData:e,CONSTANTS:t}=Ee(),r=Va(),{reset:s}=Wt();return n.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,p=i==null?void 0:i.some(f=>!!f.srcDesk);return n.jsxs(xr.Root,{id:l,style:u?{display:"flex",zIndex:t.header.Z_INDEX_WAR.menu_desktop}:{display:"none"},dividerOnBottom:u,children:[n.jsx(xr.Categories,{dividerOnRight:!!p,subMenu:o}),Array.isArray(i)&&n.jsx(xr.Thumbnail,{thumbnails:i,isMobile:!1,category:c,callBack:s})]},`submenu-${l}-${a}`)})})};Qc.displayName="Header.SubMenu";const Zc=()=>{const{handleSelectContent:e}=oe(),{CONSTANTS:t}=Ee();return n.jsx(De,{href:"/favoritos",children:n.jsx(d.Header.SupportItem,{onClick:()=>e({content:"header:wishlist"}),children:n.jsx(d.Icon,{name:t.header.ICONS.favorite_false,size:"medium"})})})};Zc.displayName="Header.WishList";const _f="_root_wvekm_126",Ve={"user-menu--credits":"_user-menu--credits_wvekm_1","user-menu--content":"_user-menu--content_wvekm_10","user-menu--login":"_user-menu--login_wvekm_30","user-menu--login--content":"_user-menu--login--content_wvekm_37","user-menu--menu":"_user-menu--menu_wvekm_64","user-menu--tooltip":"_user-menu--tooltip_wvekm_93","tooltip-modifier":"_tooltip-modifier_wvekm_104","modal-controls-modifier":"_modal-controls-modifier_wvekm_109","modal-header-modifier":"_modal-header-modifier_wvekm_117",root:_f},Jc=({className:e,children:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat(Ve["user-menu--content"],e),children:t});Jc.displayName="UserMenu.Content";var el=(e=>(e.Account="account",e))(el||{});const tl=({className:e,cashBack:t,credits:r,link:s,total:o,...a})=>{const i=t?A.formatPriceToCurrency(t):void 0,c=r?A.formatPriceToCurrency(r):void 0,l=o?A.formatPriceToCurrency(o):void 0;return n.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:el.Account})};tl.displayName="UserMenu.Credits";const nl=({className:e,children:t,description:r,text:s,...o})=>{const{isMobile:a}=ne();return n.jsx("div",{...o,className:d.helpers.classNameConcat(Ve["user-menu--login"],e),"data-mobile":a,children:n.jsxs("div",{className:Ve["user-menu--login--content"],children:[n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:[n.jsx("h3",{className:"typography-style-body-lg-strong",children:s}),n.jsx("p",{children:r})]})}),t]})})};nl.displayName="UserMenu.Login";const rl=({className:e,isLogged:t,onLogoutClick:r,ICONS:s,storeConfig:o,isMobile:a})=>{const i=a?Ws:Ws({ICONS:s,storeConfig:o}).filter(c=>c.deviceShown==="both"||c.deviceShown===(a?"mobile":"desktop"));return n.jsxs("ul",{className:d.helpers.classNameConcat(Ve["user-menu--menu"],e),children:[Array.isArray(i)&&i.map((c,l)=>n.jsx("li",{children:n.jsx($e,{href:c.href??"#",size:"small",disableUnderline:!0,adornments:{start:n.jsx(d.Icon,{name:c.icon??"delete"})},children:c.label})},l)),t?n.jsx("li",{children:n.jsx($e,{href:`${o.secureSubdomain}/api/vtexid/pub/logout?scope=mariafilo&returnUrl=${encodeURIComponent(`${o.storeUrl}`)}`,size:"small",disableUnderline:!0,onClick:r,adornments:{start:n.jsx(d.Icon,{name:Op(s)})},children:kp})}):n.jsx(n.Fragment,{})]})};rl.displayName="UserMenu.Menu";const sl=e=>{const t=g.useRef(null),r=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",r),document.addEventListener("keydown",o),document.addEventListener("touchstart",s),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("keydown",o),document.removeEventListener("touchstart",s)}),[r,o,s]),{ref:t}},gf=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},yf=(e,t,r)=>{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?gf(e==null?void 0:e.parentElement):0;return{left:o+i/2-(c.width+l*2),top:a+s+r}},ol=g.createContext({}),xf=({children:e,delay:t=600,gap:r=20,isOpen:s,setIsOpen:o,target:a,...i})=>{const c=g.useRef(null),[l,u]=g.useState(!1),[p,f]=g.useState({left:0,top:0}),{ref:m}=sl(()=>{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:_}=yf(m.current,a,r??0);f({left:h,top:_}),u(!1)}},[r,s,a,m]),n.jsx(ol.Provider,{value:g.useMemo(()=>({...i,...p,contentRef:m,isLeaving:l,isOpen:s,setIsOpen:o,setIsLeaving:u,target:a}),[i,p,m,l,s,o,u,a]),children:e})},al=()=>{const e=g.useContext(ol);if(e===void 0)throw new Error("useUserMenuContext must be used within a UserMenuProvider");return e},il=({children:e,isMobile:t=!1,Z_INDEX_WAR:r})=>{const{isOpen:s,setIsOpen:o}=al();return n.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:r.user_menu_mobile},children:[n.jsx(d.Modal.Header,{navigation:"top",className:Ve["modal-header-modifier"],children:n.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0,className:Ve["modal-controls-modifier"]})}),n.jsx(d.Modal.Body,{children:e})]})};il.displayName="UserMenu.Modal";const cl=({children:e,component:t,Z_INDEX_WAR:r,isMobile:s,...o})=>n.jsx(xf,{...o,className:Ve.root,children:s?n.jsxs(n.Fragment,{children:[n.jsx(it.Modal,{Z_INDEX_WAR:r,children:t}),e]}):n.jsx(it.Tooltip,{component:t,style:{width:304,zIndex:r.user_menu},Z_INDEX_WAR:r,children:e})});cl.displayName="UserMenu.Root";const ll=({children:e,component:t,Z_INDEX_WAR:r,...s})=>{const{contentRef:o,left:a,isLeaving:i,isOpen:c,top:l}=al();return n.jsx(d.Tooltip.Root,{arrow:"top-right",component:n.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:r.user_menu},children:n.jsx("div",{className:Ve["user-menu--tooltip"],children:e})})};ll.displayName="UserMenu.Tooltip";const it={Credits:tl,Content:Jc,Login:nl,Menu:rl,Modal:il,Root:cl,Tooltip:ll},Dn=({children:e,isOpen:t,setIsOpen:r,desktopUserMenuTarget:s,mobileUserMenuTarget:o,storeConfig:a})=>{var h,_,y;const{isMobile:i}=ne(),{CONSTANTS:c}=Ee(),l=kt(),u=()=>{window.location.href=`${a.secureSubdomain}/api/io/login?returnUrl=${encodeURIComponent(`${window.location.href}`)}`},p=!!((h=l.user)!=null&&h.userId),{cashback:f,credits:m}=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 n.jsx(it.Root,{component:n.jsxs(it.Content,{children:[n.jsx(it.Login,{description:Dp(p),text:Mp(p,((_=l==null?void 0:l.user)==null?void 0:_.firstName)??((y=l==null?void 0:l.user)==null?void 0:y.email)),children:!p&&n.jsx(d.Button,{size:"medium",variant:"quaternary",onClick:()=>u(),children:c.header.MENU_INFO.login.button_text})}),m+f&&p?n.jsx(it.Credits,{credits:m,cashBack:f,link:`${a.secureSubdomain}/account#/meus-creditos`,total:m+f}):n.jsx(n.Fragment,{}),n.jsx(d.Utils.Divider,{}),n.jsx(it.Menu,{ICONS:c.header.ICONS,storeConfig:a,isLogged:p,className:A.responsive["responsive-desktop-flex"],onLogoutClick:()=>l.logout()}),n.jsx(it.Menu,{ICONS:c.header.ICONS,storeConfig:a,isMobile:!0,isLogged:p,className:A.responsive["responsive-mobile-flex"],onLogoutClick:()=>l.logout()})]}),isOpen:t,isMobile:i,setIsOpen:r,target:i?o:s,Z_INDEX_WAR:c.header.Z_INDEX_WAR,children:e})};Dn.displayName="UserMenu";const ul=({storeConfig:e})=>{const{CONSTANTS:t}=Ee(),{handleSelectContent:r}=oe(),{reset:s}=Wt(),{setValue:o}=us(),a=ls(),i=g.useRef(null);return n.jsxs(n.Fragment,{children:[n.jsxs(d.Header.Wrapper,{className:"header-desktop-wrapper",children:[n.jsx(d.Header.Logo,{style:{width:"100%"},children:n.jsx(De,{href:"/",onMouseEnter:s,children:n.jsx(d.Icon,{name:t.header.ICONS.logo,onClick:()=>{r({content:"header:logo"})}})})}),n.jsx(Gc,{}),n.jsxs(d.Header.Support,{onMouseEnter:s,style:{justifyContent:"flex-end"},children:[n.jsx(mf,{}),n.jsx(Dn,{isOpen:a,setIsOpen:o,desktopUserMenuTarget:i.current,storeConfig:e,children:n.jsx(d.Header.SupportItem,{onClick:()=>{o(!0),r({content:"header:user_menu"})},className:As["btn-login"],innerRef:i,children:n.jsx(d.Icon,{name:t.header.ICONS.person,size:"medium"})})}),n.jsx(Zc,{}),n.jsx(Ts,{id:"cart-button"})]})]}),n.jsx(Qc,{})]})};ul.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"},dl=({children:e,mobileBannerAlt:t,mobileBannerSrc:r,textColor:s,submenuId:o,label:a,...i})=>n.jsx("button",{...i,className:Fe["menu--banners--item"],children:r?n.jsxs(d.Banner.Container,{children:[n.jsx(d.Banner.ImageWrapper,{children:n.jsx(Ie.Image,{alt:t??r,height:128,src:r,width:343,unoptimized:!0})}),n.jsx(d.Banner.Slot,{verticalAlignment:"end",horizontalAlignment:"center",children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:Fe["menu--banners--item--text"],children:n.jsx("h2",{className:"typography-style-body-xs",style:s?{color:s}:{},children:e})})})})]}):n.jsx("h2",{...i,children:e})});dl.displayName="Menu.Mobile.Category";const pl=({label:e,...t})=>{const{CONSTANTS:r}=Ee();return n.jsx(d.Button,{...t,adornment:{end:n.jsx(d.Icon,{name:r.header.ICONS.arrow_right,size:"medium"})},mode:"inverse",size:"medium",variant:"primary",children:e})};pl.displayName="Menu.Mobile.Body.Category";const ml=({subCategory:e,submenuLabel:t,onHandleOut:r,...s})=>n.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)=>n.jsx($e,{disableUnderline:!0,disablePadding:!1,href:o.link??"#",onClick:()=>r(o.label,t),size:"medium",title:o.label??"",children:o.label},a)))});ml.displayName="Menu.Mobile.List";const fl=({current:e,onHandleOut:t})=>{var r;return e?n.jsx("div",{className:Fe["menu--sub-category"],children:Array.isArray(e==null?void 0:e.subCategories)&&((r=e==null?void 0:e.subCategories)==null?void 0:r.map((s,o)=>n.jsxs("div",{className:Fe["menu--sub-category--item"],children:[n.jsx(Bt.Title,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id}),n.jsx(Bt.List,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id})]},o)))}):n.jsx(n.Fragment,{})};fl.displayName="Menu.Mobile.Body.SubCategory";const hl=({subCategory:e,submenuLabel:t,onHandleOut:r,...s})=>{var c;const{router:o}=ce(),{handleSelectContent:a}=oe(),{CONSTANTS:i}=Ee();return n.jsxs("div",{...s,className:Fe["menu--categories--title"],children:[n.jsx(Xt,{href:e==null?void 0:e.linkLabel,title:e==null?void 0:e.linkLabel,onClick:()=>{a({content:`menu:${e.label??""}:${t}`})},children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.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)&&n.jsx(d.ComponentList.Support,{adornment:{end:n.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})]})};hl.displayName="Menu.Mobile";const Bt={Banner:dl,Category:pl,List:ml,SubCategory:fl,Title:hl},_l=g.createContext({}),vf=({children:e})=>{const[t,r]=g.useState(null),s=g.useCallback(()=>{r(null)},[]),o=a=>{a!==t&&r(a)};return n.jsx(_l.Provider,{value:{currentCategory:t,setCurrentCategory:r,handleCloseMenu:s,handleChangeSubMenuOpened:o},children:e})},gl=()=>g.useContext(_l),yl=e=>{const{router:t}=ce(),{headerData:r}=Ee(),{handleSelectContent:s}=oe(),{currentCategory:o,setCurrentCategory:a}=gl(),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()},p=Array.isArray(r==null?void 0:r.categories)?r==null?void 0:r.categories:[],f=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 n.jsxs("div",{...e,className:Fe["menu--body"],style:{transform:`translate3d(calc(-100% * ${o?1:0}), 0px, 0px)`},children:[n.jsx("button",{className:Fe["menu--dummy-close"],ref:i,"data-close":!0}),n.jsxs("div",{className:Fe["menu--step"],"data-active":"true",children:[n.jsx("div",{className:Fe["menu--banners"],children:n.jsx("div",{className:Fe["menu--banners--list"],children:p.map((h,_)=>g.createElement(Bt.Banner,{...h,key:_,onClick:()=>l(h.label,h.link)},h.mobileBannerAlt))})}),n.jsx("div",{className:Fe["menu--categories"],children:p.map((h,_)=>n.jsx(Bt.Category,{label:h.label,onClick:()=>m(h)},_))})]}),n.jsx("div",{className:Fe["menu--step"],"data-active":!!o,children:n.jsx(Bt.SubCategory,{current:f.find(h=>h.id===o),onHandleOut:u})})]})};yl.displayName="Menu.Mobile.Body";const bf={"menu--header":"_menu--header_1ozdf_1"},xl=()=>{var o;const{headerData:e}=Ee(),{currentCategory:t,setCurrentCategory:r}=gl(),s=(o=e==null?void 0:e.categories)==null?void 0:o.find(a=>a.submenuId===t);return n.jsxs("div",{className:bf["menu--header"],children:[n.jsx(d.Button,{"data-out":!s,iconNameStart:"arrow-left",mode:"inverse",onClick:()=>r(null)}),s&&n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{alignContent:"center",children:n.jsx("h2",{className:"typography-style-body-lg",children:s==null?void 0:s.label})})}),n.jsx(d.Button,{iconNameStart:"close","data-close":!0,"data-only":!s,mode:"inverse",onClick:()=>r(null)})]})};xl.displayName="Menu.Mobile.Header";var Gr={exports:{}};function jf(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 vr={},br={},Oo;function Cf(){return Oo||(Oo=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")}(br)),br}var Mo;function Sf(){return Mo||(Mo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return h}});const r=Le._(g),s=Cf();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 E(){if(!b){const P=new p(_,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(E),!c&&typeof window<"u"){const P=x.webpack&&typeof jf.resolveWeak=="function"?x.webpack():x.modules;P&&i.push(S=>{for(const C of P)if(S.includes(C))return E()})}function j(){E();const P=r.default.useContext(s.LoadableContext);P&&Array.isArray(x.modules)&&x.modules.forEach(S=>{P(S)})}function v(P,S){j();const C=r.default.useSyncExternalStore(b.subscribe,b.getCurrentValue,b.getCurrentValue);return r.default.useImperativeHandle(S,()=>({retry:b.retry}),[]),r.default.useMemo(()=>C.loading||C.error?r.default.createElement(x.loading,{isLoading:C.loading,pastDelay:C.pastDelay,timedOut:C.timedOut,error:C.error,retry:b.retry}):C.loaded?r.default.createElement(o(C.loaded),P):null,[P,C])}return v.preload=()=>E(),v.displayName="LoadableComponent",r.default.forwardRef(v)}class p{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 m(_,y){let x=[];for(;_.length;){let b=_.pop();x.push(b(y))}return Promise.all(x).then(()=>{if(_.length)return m(_,y)})}f.preloadAll=()=>new Promise((_,y)=>{m(a).then(_,y)}),f.preloadReady=_=>(_===void 0&&(_=[]),new Promise(y=>{const x=()=>(c=!0,y());m(i,_).then(x,x)})),typeof window<"u"&&(window.__NEXT_PRELOADREADY=f.preloadReady);const h=f}(vr)),vr}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(p,f){for(var m in f)Object.defineProperty(p,m,{enumerable:!0,get:f[m]})}r(t,{default:function(){return u},noSSR:function(){return l}});const s=Le,o=n,a=s._(Sf()),i=typeof window>"u";function c(p){return{default:(p==null?void 0:p.default)||p}}function l(p,f){if(delete f.webpack,delete f.modules,!i)return p(f);const m=f.loading;return()=>(0,o.jsx)(m,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}function u(p,f){let m=a.default,h={loading:x=>{let{error:b,isLoading:E,pastDelay:j}=x;if(!j)return null;if(process.env.NODE_ENV!=="production"){if(E)return null;if(b)return(0,o.jsxs)("p",{children:[b.message,(0,o.jsx)("br",{}),b.stack]})}return null}};p instanceof Promise?h.loader=()=>p:typeof p=="function"?h.loader=p:typeof p=="object"&&(h={...h,...p}),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(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)})(Gr,Gr.exports);var Ef=Gr.exports,Pf=Ef;const vl=A.getDefaultExportFromCjs(Pf),jn={"modal-modifier":"_modal-modifier_10zw4_1","menu--navigation-bar":"_menu--navigation-bar_10zw4_15","menu--root":"_menu--root_10zw4_26"},bl=({children:e})=>{const{menuIsOpen:t,setMenuIsOpen:r}=fs(),{CONSTANTS:s}=Ee();return n.jsxs(d.Modal.RootWithoutPortal,{className:d.helpers.classNameConcat(jn["modal-modifier"],"menu-mobile-root"),isOpen:t,setIsOpen:r,variant:"sideRight",style:{bottom:"unset",overflowY:"hidden",position:"fixed",top:0,zIndex:s.header.Z_INDEX_WAR.menu_mobile},children:[n.jsx(xl,{}),n.jsx(d.Modal.Body,{className:jn["menu--root"],children:e})]})};bl.displayName="Menu.MenuRoot";const Nf=vl(()=>Promise.resolve(bl),{ssr:!1}),jl=({children:e,last:t=!1,...r})=>n.jsxs(n.Fragment,{children:[n.jsx(d.Button,{...r,"data-close":!0,size:"small",variant:"tertiary",children:e}),!t&&n.jsx(d.Utils.Divider,{direction:"vertical",size:"small",className:jn.divider})]});jl.displayName="Menu.NavigationBarItem";const Cl=()=>{const{setUserMenuIsOpen:e}=fs(),{handleSelectContent:t}=oe(),{CONSTANTS:r}=Ee(),{router:s}=ce(),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"}),s.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"}),s.push("/institucional/lojas")},text:r.header.MENU_INFO.store.button_text}];return n.jsx(d.Card,{id:"menu-navigationbar",shadow:!0,className:jn["menu--navigation-bar"],style:{zIndex:r.header.Z_INDEX_WAR.menu_mobile_navigation_bar},children:Array.isArray(o)&&o.map((a,i)=>g.createElement(jl,{...a,key:i},a.text))})};Cl.displayName="Menu.NavigationBar";const jr={Body:yl,NavigationBar:Cl,Root:Nf},Sl=({storeConfig:e})=>{const t=g.useRef(null),{CONSTANTS:r}=Ee(),{MENU_NAVIGATION_BAR_ALLOWED:s,ICONS:o}=r.header,{handleSelectContent:a}=oe(),{setValue:i}=Rn(),{setValue:c}=Ka(),{setValue:l}=us(),u=ls(),p=Ga(),{isMobile:f}=ne();return n.jsxs(n.Fragment,{children:[n.jsxs(d.Header.Wrapper,{className:"header-mobile-wrapper",children:[n.jsx(d.Header.Logo,{style:{width:"100%"},children:n.jsx(De,{href:"/",children:n.jsx(d.Icon,{name:o.logo,size:"x-large",onClick:()=>{a({content:"header:logo"})}})})}),n.jsxs(d.Header.Support,{children:[n.jsx(d.Header.SupportItem,{onClick:()=>{i(!0),a({content:"header:search"})},children:n.jsx(d.Icon,{name:o.search,size:"medium"})}),n.jsx(Ts,{}),n.jsxs(d.Header.SupportItem,{onClick:()=>c(!0),children:[n.jsx("span",{ref:t}),n.jsx(d.Icon,{name:o.menu,size:"medium"})]})]})]}),f&&n.jsx(li,{menuIsOpen:p,setMenuIsOpen:c,userMenuIsOpen:p,setUserMenuIsOpen:l,children:n.jsx(Dn,{storeConfig:e,isOpen:u,setIsOpen:l,mobileUserMenuTarget:t==null?void 0:t.current,children:n.jsxs(jr.Root,{children:[n.jsx(jr.Body,{}),s?n.jsx(jr.NavigationBar,{}):n.jsx(n.Fragment,{})]})})})]})};Sl.displayName="Header.HeaderMobileWrapper";const If=g.createContext({}),Rf=({children:e})=>{const{sendDataLayerEvent:t}=oe(),{cartStore:r,isOpen:s}=ve();g.useEffect(()=>{s&&t({functionKey:"viewCartEvent",data:{commonData:{cartStore:r}}})},[s]),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;ft.post("/api/checkout/order-form/attachments/marketing-data",{orderFormId:l,marketingData:{...r==null?void 0:r.marketingData,marketingTags:Oa(((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 n.jsx(If.Provider,{value:{handleUpdateItemQuantityEvent:o},children:e})},wf="_fadeInOut_1hg4u_1",Af="_fadeOut_1hg4u_1",te={"mc--cashback":"_mc--cashback_1hg4u_1","mc--cashback--positive":"_mc--cashback--positive_1hg4u_21","mc--cashback--alert":"_mc--cashback--alert_1hg4u_24","mc--container--actions":"_mc--container--actions_1hg4u_28","mc--container--actions--secondary":"_mc--container--actions--secondary_1hg4u_36","mc--container--actions--toggle-size-modifier":"_mc--container--actions--toggle-size-modifier_1hg4u_54","mc--footer":"_mc--footer_1hg4u_58","mc--footer--actions":"_mc--footer--actions_1hg4u_67","mc--footer--actions-button":"_mc--footer--actions-button_1hg4u_72","mc--footer--total":"_mc--footer--total_1hg4u_88","mc--footer--total--info":"_mc--footer--total--info_1hg4u_93","mc--footer--total--info--content":"_mc--footer--total--info--content_1hg4u_98","mc--field":"_mc--field_1hg4u_144","mc--body":"_mc--body_1hg4u_184","mc--body--products":"_mc--body--products_1hg4u_191","mc--body--empty--feedback":"_mc--body--empty--feedback_1hg4u_199","mc--body--empty--text":"_mc--body--empty--text_1hg4u_204","mc--body--promotion":"_mc--body--promotion_1hg4u_217","mc--body--promotion--closeness":"_mc--body--promotion--closeness_1hg4u_220","mc--body--promotion--closeness--success":"_mc--body--promotion--closeness--success_1hg4u_243","mc--body--coupon-tag":"_mc--body--coupon-tag_1hg4u_255","mc--body--coupon-tag--text":"_mc--body--coupon-tag--text_1hg4u_273","mc--body--coupon-tag--button":"_mc--body--coupon-tag--button_1hg4u_279","mc--header":"_mc--header_1hg4u_285","mc--header--subtitle":"_mc--header--subtitle_1hg4u_311","mc--notify":"_mc--notify_1hg4u_352","mc--notify--content":"_mc--notify--content_1hg4u_367","mc--notify--item":"_mc--notify--item_1hg4u_380",fadeInOut:wf,fadeOut:Af,"mc--card":"_mc--card_1hg4u_442","mc--card--actions":"_mc--card--actions_1hg4u_447","mc--card--actions--secondary":"_mc--card--actions--secondary_1hg4u_455","mc--card--actions--add-remove":"_mc--card--actions--add-remove_1hg4u_482","mc--card--actions--gift":"_mc--card--actions--gift_1hg4u_496","mc--card--content-info":"_mc--card--content-info_1hg4u_509","mc--card--details":"_mc--card--details_1hg4u_516","mc--card--link":"_mc--card--link_1hg4u_521","mc--product--unavailable":"_mc--product--unavailable_1hg4u_529","mc--card--name":"_mc--card--name_1hg4u_532","mc--card--price":"_mc--card--price_1hg4u_547","mc--card--price--old-price":"_mc--card--price--old-price_1hg4u_557","mc--card--price--price-details":"_mc--card--price--price-details_1hg4u_561","mc--card--product-link":"_mc--card--product-link_1hg4u_572","mc--discount":"_mc--discount_1hg4u_582","mc--discount--header":"_mc--discount--header_1hg4u_585","inputs--tooltip":"_inputs--tooltip_1hg4u_585","mc--discount--body":"_mc--discount--body_1hg4u_604","minicart--modal-modifier":"_minicart--modal-modifier_1hg4u_625"},El=({item:{id:e,message:t,callback:r},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 n.jsx("div",{className:te["mc--notify--item"],ref:a,onAnimationEnd:()=>c(e),children:n.jsxs(d.SnackBar.Structure,{size:"medium",children:[n.jsx(d.SnackBar.Content,{title:t}),n.jsxs(d.SnackBar.Support,{children:[typeof r=="function"&&n.jsx(d.Button,{onClick:()=>{r(),i()},size:"small",variant:"tertiary",children:"Desfazer"}),n.jsx(d.Button,{iconNameStart:o.close,iconSize:"small",onClick:()=>i(),variant:"tertiary"})]})]})},e)};El.displayName="MiniCart.Notify.Item";const Pl=({ICONS:e})=>{const t=is(),{removeNotification:r}=cs(),s=t.length?[...t].sort((o,a)=>a.id-o.id):[];return s.length?n.jsx("div",{className:te["mc--notify"],children:n.jsx("div",{className:te["mc--notify--content"],children:Array.isArray(s)&&s.map(o=>n.jsx(El,{item:o,removeNotification:r,ICONS:e},o.id))})}):null};Pl.displayName="MiniCart.Notifications";const Tf=({handleSendEvent:e,onHandleRemove:t,product:r,MINICART_CONFIG:s,...o})=>{const a=Lt(),{toggleProduct:i}=vt(),{itemOffered:{isVariationOf:{productGroupID:c}},quantity:l}=r;return n.jsx(d.Button,{...o,adornment:{end:n.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})},Nl=({handleSendEvent:e,product:t,ICONS:r,MINICART_CONFIG:s,...o})=>{const{addToCart:a,removeToCart:i}=ve(),{bundleItems:c=[],id:l,uniqueId:u,seller:p,offerings:f,quantity:m}=t,h=(_,y,x)=>{i(l,_.title,()=>{typeof x=="function"&&x(),a({id:l,quantity:y,seller:p},{id:l,texture:_.texture},!0)})};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:te["mc--card--actions--add-remove"],children:[s.has_wishlist_button&&n.jsx(Tf,{...o,product:t,handleSendEvent:e,onHandleRemove:h,ICONS:r,MINICART_CONFIG:s}),n.jsx(d.Button,{...o,adornment:{end:n.jsx(d.Icon,{name:r.delete,size:"small"})},underline:!0,variant:"secondary",state:"danger",onClick:()=>{h({texture:"mini-cart",title:`${s.messages.remove}`},m),e("remove_from_cart","skuEvents")},children:s.messages.remove_button})]}),s.has_gift_option&&n.jsx(Et.Gift,{uniqueId:u,bundleItems:c,offerings:f,ICONS:r,MINICART_CONFIG:s})]})};Nl.displayName="MiniCart.Card.Actions";const Il=({bundleItems:e,offerings:t,uniqueId:r,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 m=e.some(h=>h.id===f.id);c(r,String(f.id),m).then(()=>i(!1))}}},u=t[0],p=e.find(f=>f.id===u.id);return u&&"id"in u?n.jsx("div",{className:te["mc--card--actions--gift"],children:n.jsx(d.Checkbox,{adornment:n.jsx(d.Icon,{name:s.check}),checked:!!p,disabled:a,label:o.messages.giftPackage,onChange:l})}):null};Il.displayName="MiniCart.Card.Gift";const Rl=({itemOffered:e})=>{const t=A.updatedResizedImg(e==null?void 0:e.image[0].url,{width:200,height:300});return n.jsx(De,{href:`${e==null?void 0:e.slug}`,className:te["mc--card--product-link"],children:n.jsx(Ie.Image,{alt:(e==null?void 0:e.image[0].alternateName)||"Produto",src:t||"",width:108,height:164,objectFit:"unset"})})};Rl.displayName="MiniCart.Card.Media";const wl=({name:e,skuName:t,tagName:r,className:s})=>n.jsxs(n.Fragment,{children:[r&&n.jsx(d.Tag,{variant:"quaternary",title:r,style:{textTransform:"uppercase"},children:r}),n.jsx("p",{className:d.helpers.classNameConcat(te["mc--card--name"],s),children:A.getProductNameWithoutSku(e??"",t??"")})]});wl.displayName="MiniCart.Card.Name";const Al=({total:e,totalList:t})=>n.jsx(d.ProductInfo.Root,{children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:te["mc--card--price"],children:n.jsx(d.ProductInfo.Wrapper,{className:te["mc--card--price--details"],size:"small",layout:"horizontal",children:t&&e!==t?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:A.formatPriceToCurrency(t),size:"small"}),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:A.formatPriceToCurrency(e),size:"small"})]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:A.formatPriceToCurrency(e),size:"small"})})})})});Al.displayName="MiniCart.ProductPrice";const Tl=({product:e,TEXTURE_IMAGE:t,TOGGLE_STYLE_MODIFIER:r})=>{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 p=(f=i==null?void 0:i.find(m=>m.id===c))==null?void 0:f.texture;if(p){o(p);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;new IntersectionObserver(l).observe(a.current)},[l]),n.jsx("div",{ref:a,children:n.jsx(d.ToggleStyle.Wrapper,{size:"small",style:r,children:n.jsx(d.ToggleStyle.Texture,{children:s?n.jsx(Ie.Image,{alt:((u=e.itemOffered)==null?void 0:u.image[0].alternateName)??"Produto",src:s,width:164,height:164,style:r}):n.jsx(ec,{})})})})};Tl.displayName="MiniCart.Card.Style";const Ll=({product:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:o})=>{const{size:a}=A.getColorAndSizeFromSkuName(e.itemOffered.skuName??"",r);return n.jsxs(d.Utils.Row,{alignItems:"center",children:[n.jsx(Tl,{product:e,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:o}),n.jsx(d.Utils.Divider,{direction:"vertical",size:"small",style:{height:24}}),a&&n.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"],children:n.jsx(d.ToggleSize.Text,{children:a})})]})};Ll.displayName="MiniCart.Card.Sku";const Et={Actions:Nl,Gift:Il,Media:Rl,Name:wl,Price:Al,Sku:Ll},Lf=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}},kl=({available:e=!0,index:t,product:r,ICONS:s,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c})=>{var f,m;const{sendDataLayerEvent:l}=oe(),u=Lf(r),p=(h,_)=>{const y={commonData:{...r,...u},customData:{index:t},event:h};if(_==="skuEvents"){const x={...r,...u};y.supportData={selectedSkus:[x]},y.commonData.products=[x]}l({functionKey:_,data:y})};return n.jsxs("div",{className:d.helpers.classNameConcat(te["mc--card"],e?"":te["mc--card--unavailable"]),children:[n.jsx(Et.Media,{itemOffered:r.itemOffered}),n.jsxs("div",{className:te["mc--card--content-info"],children:[n.jsx(Et.Name,{name:((f=r.itemOffered)==null?void 0:f.name)??"",skuName:(m=r.itemOffered)==null?void 0:m.skuName}),n.jsxs("div",{className:te["mc--card--details"],children:[n.jsx("div",{className:te["mc--card--actions"],children:e?n.jsx(Et.Price,{total:u.price,totalList:u.listPrice}):n.jsx(d.Tag,{variant:"secondary",size:"small",children:"Indisponível"})}),n.jsxs("div",{className:te["mc--card--actions--secondary"],children:[e&&n.jsx(Et.Sku,{product:r,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c}),n.jsx(Et.Actions,{handleSendEvent:p,product:r,size:"small",variant:"tertiary",ICONS:s,MINICART_CONFIG:o})]})]})]})]})};kl.displayName="MiniCart.Card";const Ol=({type:e="positive",ICONS:t,MESSAGE_CASHBACK:r})=>{var a;const{toExpire:s}=kt(),o=((a=s==null?void 0:s.cashback)==null?void 0:a.reduce((i,c)=>i+c.remaining_value,0))??0;return o>0?n.jsxs("div",{className:d.helpers.classNameConcat(te["mc--cashback"],te[`mc--cashback--${e}`]),children:[n.jsx(d.Icon,{name:t.alert_circle,size:"medium"}),n.jsxs("p",{children:[n.jsx("span",{children:A.formatPriceToCurrency(o)})," ",r.title]})]}):null};Ol.displayName="MiniCart.Cashback";const Ml=({type:e,ICONS:t,MINICART_CONFIG:r})=>{const{addCouponSeller:s,removeCoupon:o,removeSellerCode:a,cartStore:{marketingData:i,openTextField:c}}=ve(),[l,u]=g.useState(!1),[p,f]=g.useState(!1),m=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(!!m()),y=async x=>{f(!0),!!m()&&(e==="coupon"?await o():await a(),_(!1),u(!1)),await s(x,e).then(E=>{if(!E.statusOk&&x||E.code!==200){x?(u(!0),_(!1)):u(!1);return}_(!0),u(!1)}).catch(()=>u(!0)).finally(()=>f(!1))};return n.jsx(Oe.Field,{hasError:l,hasSuccess:h,isLoading:p,onHandler:y,type:e,title:e==="coupon"?`${r.messages.descount_cupom_placeholder}`:`${r.messages.sellers_code_placeholder}`,value:m(),MINICART_CONFIG:r,ICONS:t})};Ml.displayName="MiniCart.CouponSeller";const Dl=({ICONS:e,MINICART_CONFIG:t,PLP_NOT_RESULT:r})=>{const{router:s}=ce(),o=()=>{s.push(r.link)};return n.jsxs(d.Utils.Column,{alignContent:"center",alignItems:"center",gap:"24px",className:te["mc--body--empty--feedback"],children:[n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsxs("p",{className:`typography-style-body-xs ${te["mc--body--empty--text"]}`,children:[t.messages.empty_card," "]})})}),n.jsx(d.Button,{variant:"tertiary",size:"large",onClick:()=>o(),"data-close":!0,adornment:{end:n.jsx(d.Icon,{name:e.arrow_right,size:"medium"})},children:t.messages.empty_bag})]})};Dl.displayName="MiniCart.Feedback";const kf=e=>{const t=e.replace(/\D/g,"");return t.length>5?`${t.slice(0,5)}-${t.slice(5,8)}`:t},$l=({feedback:e,hasError:t,onHandler:r,hasSuccess:s,type:o,title:a,value:i,ICONS:c})=>{const[l,u]=g.useState(i);g.useEffect(()=>{t||u(i)},[i,t]);const p=()=>t?n.jsx(d.Icon,{name:c.delete_circle}):String(i).length&&s?n.jsx(d.Icon,{name:c.check_circle}):null,f=()=>{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 x=y.currentTarget.value;if(x===""&&typeof r=="function"||s&&String(i).length>0&&x!==String(i)||t&&x!==String(i)){u(""),r("");return}if(o==="cep"){const E=kf(x);u(E)}else u(x)},_=y=>{if(y.key.toLocaleLowerCase()==="enter"&&typeof r=="function"){const x=y.currentTarget.value;r(x)}};return n.jsx(d.TextField.Input,{adornment:{end:p()},mode:"over-label",label:a,feedback:e,value:l,type:"text",onFocus:f,onBlur:m,onChange:h,onKeyDown:_})};$l.displayName="MiniCart.Field.Input";const zl=({title:e,ICONS:t,MINICART_CONFIG:r,...s})=>{const o=g.useRef(null),{hasSuccess:a,hasError:i,isLoading:c,onHandler:l,type:u,value:p}=s,f=()=>i?"error":String(p).length&&a?"success":"none",m=g.useCallback(()=>{if(o.current){const y=o.current.querySelector("input");y&&typeof l=="function"&&(p!==""||i?(l(""),y.value=""):l((y==null?void 0:y.value)??""))}},[l,p,i]),h=f();return n.jsx("div",{ref:o,children:n.jsx(d.TextField.Structure,{className:te["mc--field"],input:n.jsx($l,{...s,feedback:h,title:e,ICONS:t}),right:n.jsx(d.Button,{"data-has-success":!a,size:"medium",title:String(p).length&&a||i?"Remover":"Aplicar",onClick:()=>m(),disabled:c,children:String(p).length&&a||i?n.jsx(d.Icon,{name:"close",size:"small"}):`${r.messages.promo_code_button}`}),supportText:u==="cep"&&h==="success"?n.jsx(d.TextField.SupportText,{text:"Mais informações de frete na etapa a seguir",feedback:"success",title:"support"}):null})})};zl.displayName="MiniCart.Field";const Do=e=>{const t=e*100;return Math.round(t)},Of=e=>(e/100).toFixed(2).replace(".",","),Mf=(e,t)=>{const{valueType:r,remainingValueToActivate:s}=e;if(r==="quantity")return`Adicione mais ${s} ${s===1?"item":"itens"} ${t}`;if(r==="price"){const o=s===100?"Falta":"Faltam",a=Of(s);return`${o} R$ ${a} ${t}`}return t},Fl=({ICONS:e})=>{var b;const{promotionRules:t,data:r,cartStore:s,cartStore:{items:o,marketingData:a},addCouponSeller:i,setIsOpen:c}=ve(),{sendDataLayerEvent:l}=oe(),u=(b=r==null?void 0:r.promotion)==null?void 0:b.promotionCart,p=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)&&!p.current&&(a==null?void 0:a.coupon)!==u.cupom&&(p.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&&(p.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,x=u.linkLabel;return n.jsxs("div",{className:te["mc--body--promotion"],children:[t.remainingValueToActivate>0&&n.jsx(d.Closeness,{className:te["mc--body--promotion--closeness"],title:Mf(t,m),subtitle:h,percentage:Do(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&&n.jsx(d.Closeness,{className:`${te["mc--body--promotion--closeness"]} ${te["mc--body--promotion--closeness--success"]}`,title:_,subtitle:y,percentage:Do(t.completeness)})]})};Fl.displayName="MiniCart.Modal.Body.Promotion";const Bl=({TIPBAR_CONFIGS:e})=>{const{data:t,cartStore:r,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),[p,f]=g.useState(!1);if(g.useEffect(()=>{l&&setTimeout(()=>{u(!1)},e.snackbar_timeout)},[l]),g.useEffect(()=>{p&&setTimeout(()=>{f(!1)},e.snackbar_timeout)},[p]),!i||i.active==="Desativar"||i.valueCupom===""||s.length===0)return null;const m=async()=>{if(!r.items.length){f(!0);return}(await a(i==null?void 0:i.valueCupom,"coupon")).code!==200&&u(!0)};return n.jsxs("div",{className:te["mc--body--coupon-tag"],style:{backgroundColor:`${i.tagColor}`,color:`${i.textColor}`},children:[n.jsx("div",{className:te["mc--body--coupon-tag--text"],dangerouslySetInnerHTML:{__html:i.value}}),n.jsx("div",{className:te["mc--body--coupon-tag--button"],children:n.jsx(d.Button,{variant:"quaternary",mode:"inverse",onClick:m,disabled:c,children:c?"Cupom Aplicado":"Aplicar Cupom"})})]})};Bl.displayName="MiniCart.Modal.Body.CouponTag";const Ul=({children:e,ICONS:t,MINICART_CONFIG:r,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 n.jsxs(d.Modal.Body,{className:te["mc--body"],children:[e,n.jsx(Fl,{ICONS:t}),n.jsx(Bl,{TIPBAR_CONFIGS:i}),n.jsx("div",{className:te["mc--body--products"],children:Array.isArray(l)&&l.length?l.map((p,f)=>{const m=u.find(h=>{var _;return h.code==="withoutStock"&&((_=h.fields)==null?void 0:_.ean)===p.ean})!==void 0;return n.jsx(Oe.Card,{available:!p.availability.includes("outStock")||!m,index:f,product:p,ICONS:t,MINICART_CONFIG:r,NAME_SPLIT_SYMBOL:s,TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:c},`${p.id}-${p.itemOffered.sku}-${f}`)}):n.jsx(Oe.Feedback,{ICONS:t,MINICART_CONFIG:r,PLP_NOT_RESULT:o})})]})};Ul.displayName="MiniCart.Body";const Hl=({children:e,storeConfig:t,MINICART_CONFIG:r})=>{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 n.jsxs(d.Modal.Footer,{className:te["mc--footer"],children:[e,n.jsx("div",{className:te["mc--footer--actions"],children:n.jsx(d.Button,{variant:"primary",size:"large","data-close":!0,className:te["mc--footer--actions-button"],onClick:o,children:r.messages.checkout_button})})]})};Hl.displayName="MiniCart.Modal.Footer";const ql=({children:e,ICONS:t,MINICART_CONFIG:r,Z_INDEX_WAR:s})=>{const[o,a]=g.useState(!1),i=g.useRef(null),c=()=>a(l=>!l);return n.jsxs(n.Fragment,{children:[o&&n.jsx(d.Tooltip.Root,{arrow:"right",position:"top",top:-3,left:-3,component:n.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}),n.jsxs(d.Accordion.Wrapper,{className:te["mc--discount"],children:[n.jsx(d.Accordion.Header,{id:"frete",title:"Frete",closeIndicator:n.jsx(d.Icon,{name:t.arrow_up,size:"medium"}),openIndicator:n.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),className:d.helpers.classNameConcat(te["mc--discount--header"]),startOpen:r.promotion_input_starts_open,children:n.jsxs(d.TextStructure.Root,{children:[n.jsx(d.TextStructure.DivWrapper,{children:n.jsxs("h3",{className:"typography-style-body-sm",children:[r.messages.promo_code_title," "]})}),n.jsx("div",{ref:i,onMouseEnter:c,onMouseLeave:c,"aria-label":"Mostrar descrição",children:n.jsx(d.Icon,{name:t.alert_circle,size:"small"})})]})}),n.jsx(d.Accordion.Body,{className:te["mc--discount--body"],children:e})]})]})};ql.displayName="MiniCart.Discount";const Vl=({discount:e,shipping:t,total:r})=>{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=r-Math.abs(e??0)+(t??0),i=t===0?"Frete Grátis":A.formatPriceToCurrency((t??0)/100),c=[{title:"Frete",value:t===void 0?"A calcular":i},{title:"Desconto",value:A.formatPriceToCurrency((e??0)/100)},{message:(o==null?void 0:o.value)??"",title:"Total",value:`1x de ${A.formatPriceToCurrency(a/100)}`}];return n.jsx("div",{className:te["mc--footer--total"],children:Array.isArray(c)&&c.map((p,f)=>n.jsxs("div",{className:te["mc--footer--total--info"],"data-discount":p.title==="Desconto",children:[n.jsx("p",{children:p.title}),n.jsxs("div",{className:te["mc--footer--total--info--content"],children:[p.message&&(o==null?void 0:o.active)==="Ativar"&&n.jsx(d.Tag,{variant:"primary",title:p.message,style:{backgroundColor:o==null?void 0:o.tagColor,color:o==null?void 0:o.textColor},children:p.message}),n.jsx(d.ProductInfo.Price,{className:te["mc--footer--total--info"],label:p.title,value:p.value})]})]},f))})};Vl.displayName="MiniCart.Modal.Footer.Resume.Items";const Wl=()=>{var o,a,i;const{totalizers:e}=_t(),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,s=(i=e.find(c=>c.id==="Shipping"))==null?void 0:i.value;return n.jsx(Vl,{discount:r??0,total:t,shipping:s})};Wl.displayName="MiniCart.Modal.Footer.Totals";const Gl=({ICONS:e,MINICART_CONFIG:t})=>{const{isMobile:r}=ne(),{cartStore:{items:s}}=ve(),o=s.reduce((a,i)=>a+(i.quantity??0),0);return n.jsx(d.Modal.Header,{navigation:"top",className:te["mc--header"],children:n.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!r,children:[n.jsx(d.Modal.Title,{navigation:"top",title:t.messages.title}),n.jsx("span",{className:te["mc--header--subtitle"],children:o!==1?`[${o}] Produtos`:`[${o}] Produto`}),n.jsx(d.Button,{"data-close":!0,iconNameStart:e.close,size:"small",variant:"tertiary"})]})})};Gl.displayName="MiniCart.Modal.Header";const Kl=({ICONS:e,MINICART_CONFIG:t})=>{const{cartStore:{shippingData:r},shipping:s,removeCEP:o}=ve(),{sendDataLayerEvent:a}=oe(),[i,c]=g.useState(!1),[l,u]=g.useState(!1),p=g.useCallback(()=>{var E;const b=((E=r==null?void 0:r.address)==null?void 0:E.postalCode)??"";return b.length===8&&!b.includes("-")?`${b.slice(0,5)}-${b.slice(5)}`:b},[r]),[f,m]=g.useState(!!p()),h=()=>{m(!1),c(!1)},_=b=>{var E;if(typeof b=="object"&&(b!=null&&b.logisticsInfo))return(E=b.logisticsInfo)==null?void 0:E.reduce((j,v)=>{var L;const P=(L=v==null?void 0:v.slas)==null?void 0:L.find(T=>(T==null?void 0:T.id)===(v==null?void 0:v.selectedSla));if(!P)return j;const S=parseInt(String((P==null?void 0:P.shippingEstimate)??"").replace("bd","")),C=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=C,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)+C,j},{shipping_tier:void 0,delivery_time:void 0,flag_retirada:void 0,shipping:void 0,currency:"BRL"})},y=async b=>{const E=b.replace(/\D/g,"");if(E.length!==8)return!1;try{return!(await ft.get(`https://viacep.com.br/ws/${E}/json/`)).data.erro}catch{return!1}},x=async b=>{if(u(!0),!!p()||!(b!=null&&b.trim())){await o(),h(),u(!1);return}if(!await y(b)){c(!0),m(!1),u(!1);return}try{const P=await s(b);if(c(!1),P){m(!0);const S=_(P);S&&a({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:S}})}}catch{c(!0)}finally{u(!1)}};return n.jsx(Oe.Field,{hasSuccess:f,hasError:i,isLoading:l,onHandler:x,title:`${t.messages.shipping_calculation_placeholder}`,type:"cep",value:p(),ICONS:e,MINICART_CONFIG:t})};Kl.displayName="MiniCart.Shipping";const Xl=()=>{var r,s;const{data:e}=ve(),t=(s=(r=e==null?void 0:e.flags)==null?void 0:r.flagCart)==null?void 0:s.flagHeader;return t!=null&&t.value?n.jsx(d.Tag,{variant:"tertiary",title:t==null?void 0:t.value,size:"small",adornment:{start:t!=null&&t.enableIcon&&(t!=null&&t.icon)?n.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};Xl.displayName="MiniCart.TagMessage";const Oe={Body:Ul,Card:kl,Cashback:Ol,CouponSeller:Ml,Discount:ql,Field:zl,Feedback:Dl,Shipping:Kl,Footer:Hl,Header:Gl,TagMessage:Xl,Totals:Wl},Df=({ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,PLP_NOT_RESULT:s,TEXTURE_IMAGE:o,TIPBAR_CONFIGS:a,TOGGLE_STYLE_MODIFIER:i,Z_INDEX_WAR:c,storeConfig:l,minicartStyleModifiers:u})=>{const{isOpen:p,setIsOpen:f}=ve(),{isMobile:m}=ne();return n.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(te["minicart--modal-modifier"],u),isMobile:!0,isOpen:p,setIsOpen:f,style:{zIndex:c.modal},variant:m?"sideBottom":"sideRight",children:[n.jsx(Oe.Header,{ICONS:e,MINICART_CONFIG:t}),n.jsx(Oe.Body,{ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,PLP_NOT_RESULT:s,TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:i,TIPBAR_CONFIGS:a,children:n.jsx(Oe.TagMessage,{})}),n.jsxs(Oe.Footer,{MINICART_CONFIG:t,storeConfig:l,children:[n.jsxs(Oe.Discount,{ICONS:e,MINICART_CONFIG:t,Z_INDEX_WAR:c,children:[n.jsx(Oe.CouponSeller,{type:"seller",ICONS:e,MINICART_CONFIG:t}),n.jsx(Oe.CouponSeller,{type:"coupon",ICONS:e,MINICART_CONFIG:t}),n.jsx(Oe.Shipping,{ICONS:e,MINICART_CONFIG:t})]}),n.jsx(Oe.Totals,{})]}),n.jsx(Pl,{ICONS:e})]})},Yl=({tipBar:e,minicartStyleModifiers:t,menuV2:r,storeConfig:s,className:o})=>{const{structureRef:a,rootRef:i,CONSTANTS:c}=Ee(),{header:{HEADER_CONFIGS:l,Z_INDEX_WAR:u},minicart:p}=c;return n.jsx(d.Header.Structure,{innerRef:a,adornment:{start:e},style:{position:"sticky",top:0,zIndex:u.header},className:d.helpers.classNameConcat(As["header-animation"],o),children:n.jsxs(d.Header.Root,{innerRef:i,style:{zIndex:u.header},variant:l.default_variant,interactiveVariant:l.interactive_variant,children:[r??n.jsxs(vf,{children:[n.jsx("div",{className:A.responsive["responsive-mobile-block"],style:{height:"100%",width:"100%",zIndex:u.header_mobile},children:n.jsx(Sl,{storeConfig:s})}),n.jsx("div",{className:A.responsive["responsive-desktop-block"],style:{height:"100%",width:"100%",zIndex:u.header_desktop},children:n.jsx(ul,{storeConfig:s})})]}),n.jsx(Rf,{children:n.jsx(Df,{...p,minicartStyleModifiers:t})}),n.jsx(Ps,{title:"Produto adicionado à sua sacola!",CONSTANTS:c.addToCart})]})})};Yl.displayName="Header";const $f="_shippingFreight_6z8rf_6",zf="_shippingFreight__postalCodeGrid_6z8rf_10",Ff="_shippingFreight__grid_6z8rf_14",Bf="_shippingFreight__grid__title_6z8rf_18",Uf="_shippingFreight__grid__remember_6z8rf_29",Hf="_postalCodeContainer_6z8rf_44",qf="_deliveryStatusBar__tag_6z8rf_49",Vf="_deliveryStatusBarError__tag_6z8rf_66",Wf="_deliveryInfo_6z8rf_74",Gf="_deliveryInfo__content_6z8rf_78",Kf="_deliveryInfo__text_6z8rf_84",Xf="_deliveryInfo__title_6z8rf_89",Yf="_deliveryInfo__subtitle_6z8rf_99",Qf="_deliveryInfo__tooltipIcon_6z8rf_109",Zf="_deliveryInfo__tooltip_6z8rf_109",Jf="_freightGrid_6z8rf_148",eh="_freightContainer_6z8rf_155",th="_freightOption__content_6z8rf_160",nh="_freightOption__value_6z8rf_166",rh="_freightOption__title_6z8rf_177",sh="_freightOption__title_item_6z8rf_181",oh="_freightOption__paragraph_6z8rf_192",ue={shippingFreight:$f,shippingFreight__postalCodeGrid:zf,shippingFreight__grid:Ff,shippingFreight__grid__title:Bf,shippingFreight__grid__remember:Uf,postalCodeContainer:Hf,deliveryStatusBar__tag:qf,deliveryStatusBarError__tag:Vf,deliveryInfo:Wf,deliveryInfo__content:Gf,deliveryInfo__text:Kf,deliveryInfo__title:Xf,deliveryInfo__subtitle:Yf,deliveryInfo__tooltipIcon:Qf,deliveryInfo__tooltip:Zf,freightGrid:Jf,freightContainer:eh,freightOption__content:th,freightOption__value:nh,freightOption__title:rh,freightOption__title_item:sh,freightOption__paragraph:oh,"input-modifier":"_input-modifier_6z8rf_207","freight--tooltip":"_freight--tooltip_6z8rf_227"},ah=({icon:e,title:t,subtitle:r,packageCount:s,packageUnit:o="",labelDescription:a,freightConfig:i,toolTipZIndex:c})=>{const[l,u]=g.useState(!1),p=g.useRef(null),f=()=>u(m=>!m);return n.jsxs("div",{className:ue.deliveryInfo,ref:p,children:[n.jsx(d.Tooltip.Root,{arrow:"bottom",component:n.jsx("div",{children:n.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:p.current}),n.jsxs("div",{className:ue.deliveryInfo__content,children:[n.jsx("div",{className:ue.deliveryInfo__icon,children:n.jsx(d.Icon,{name:e,size:"medium"})}),n.jsxs("div",{className:ue.deliveryInfo__text,children:[n.jsxs("span",{className:ue.deliveryInfo__title,children:[t," ",s," ",o]}),r&&n.jsx("span",{className:ue.deliveryInfo__subtitle,children:r})]}),a&&n.jsxs("div",{className:ue.deliveryInfo__tooltipIcon,onMouseEnter:f,onMouseLeave:f,"aria-label":"Mostrar descrição",children:[n.jsx("span",{children:n.jsx(d.Icon,{name:i.icons.feedback_help,size:"small"})}),l&&n.jsx("div",{className:ue.deliveryInfo__tooltip,children:a})]})]})]})},ih=({value:e,title:t,paragraph:r})=>n.jsx("div",{className:ue.freightOption,children:n.jsxs("div",{className:ue.freightOption__content,children:[n.jsx("span",{className:ue.freightOption__value,children:e}),n.jsx("span",{className:ue.freightOption__title,children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{className:ue.footer__item,children:[n.jsx("span",{className:ue.freightOption__title_item,children:t}),r&&n.jsx("span",{className:ue.freightOption__paragraph,children:r})]})})})]})}),ch=({children:e})=>n.jsx("div",{className:ue.freightContainer,children:e}),lh=({children:e})=>n.jsx("div",{className:ue.freightGrid,children:e}),uh=({children:e})=>n.jsx("div",{className:ue.postalCodeContainer,children:e}),$o=({message:e,seller:t="",size:r="small",setError:s})=>n.jsx("div",{className:s?ue.deliveryStatusBarError:ue.deliveryStatusBar,children:n.jsxs(d.Tag,{title:e,className:s?ue.deliveryStatusBarError__tag:ue.deliveryStatusBar__tag,size:r,children:[e," ",!s&&t]})}),dh=e=>{const t=parseInt(e,10);return t===1?`${t} dia`:`${t} dias`},ph=e=>{var r,s,o;const t=[];return(o=(s=(r=e==null?void 0:e.logisticsInfo)==null?void 0:r[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},mh=({component:e,parent:t,top:r,left:s,target:o,contentRef:a,freightConfig:i,toolTipZIndex:c=999,...l})=>{const{isMobile:u}=ne();return n.jsx(n.Fragment,{children:u?n.jsx(d.Tooltip.Root,{arrow:"bottom",component:n.jsxs("div",{...l,ref:a,children:[e,n.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}):n.jsx(d.Tooltip.Root,{arrow:"bottom",component:n.jsxs("div",{...l,ref:a,children:[e,n.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})})},fh=({onUpdateFreightItems:e,sellerId:t,size:r,skuId:s,quantity:o,setError:a,setIsButtonClicked:i,component:c,freightConfig:l,toolTipZIndex:u})=>{var k,M,Q,D;const p=_t(),f=_t(U=>U.shipping),[m,h]=g.useState(),[_,y]=g.useState(!1),[x,b]=g.useState(!1),[E,j]=g.useState(!1),v=(M=(k=p.shippingData)==null?void 0:k.address)==null?void 0:M.postalCode,P=!(m!=null&&m.length)&&v?v:m,S=g.useRef(null),C=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 ft.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.")}},L=async()=>{y(!0);try{const U=await ft.post("/api/checkout/simulation",{items:[{id:s,quantity:o,seller:t}],country:"BRA",postalCode:P});e(ph(U.data))}catch(U){console.error("Erro ao atualizar o documento:",U)}finally{y(!1),f(P,"BRA")}},T=async()=>{if(!s){j(!0),setTimeout(()=>j(!1),1500);return}await I({target:{value:P}}),_||(L(),i(!0))};return n.jsxs("div",{ref:S,style:{position:"relative"},children:[!s&&E?n.jsx(mh,{component:c,isOpen:E,parent:S.current,toolTipZIndex:u,freightConfig:l}):n.jsx(n.Fragment,{}),n.jsx("div",{style:{position:"relative"},children:n.jsx(d.TextField.Structure,{title:"structure",style:{width:"100%"},input:n.jsx(d.TextField.Input,{defaultValue:(D=(Q=p.shippingData)==null?void 0:Q.address)==null?void 0:D.postalCode,label:l.messages.text_input_label,title:"textfield",value:m,sizeVariant:r,onMouseOver:()=>s?null:j(!0),onMouseOut:()=>s?null:j(!1),mode:"simple",onChange:C,onKeyDown:U=>{U.key==="Enter"&&T()},className:ue["input-modifier"],feedback:x?"error":"none"}),right:n.jsx(d.Button,{onClick:T,size:r,title:"button",children:_?n.jsx(d.Spinner,{size:"small",indicatorColor:"#ffffff"}):l.messages.text_input_btn})})})]})},hh=({children:e,freightConfig:t})=>n.jsxs("div",{className:ue.shippingFreight,children:[n.jsxs("div",{className:ue.shippingFreight__grid,children:[n.jsx("span",{className:ue.shippingFreight__grid__title,children:t.messages.title}),n.jsx("span",{className:ue.shippingFreight__grid__remember,children:n.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})})]}),n.jsx("div",{className:ue.shippingFreight__postalCodeGrid,children:e})]}),_h=({children:e})=>n.jsx("div",{className:ue.freightContainer,children:e}),Ql=({className:e,sellerId:t,skuId:r,quantity:s,size:o,seller:a,local:i,CONSTANTS_PROPS:c})=>{const{sendDataLayerEvent:l}=oe(),[u,p]=g.useState(""),[f,m]=g.useState([]),[h,_]=g.useState(""),[y,x]=g.useState(!1),b=j=>p(j),E=j=>{m(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 n.jsxs(_h,{className:e,children:[n.jsxs(hh,{freightConfig:c.freightConfig,children:[n.jsx(uh,{children:n.jsx(fh,{onUpdateFreightItems:E,skuId:r,quantity:s,size:o,sellerId:t,local:i,setError:_,setIsButtonClicked:x,freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex})}),h?n.jsx($o,{size:o,message:h,setError:_}):f.length>0&&n.jsx($o,{size:o,message:c.freightConfig.messages.delivered_by,seller:a})]}),y&&!h?f.length>0&&n.jsxs(ch,{children:[n.jsx(lh,{children:f.filter(({id:j})=>!j.includes("Retirada")).map(j=>n.jsx(ih,{id:j.id,value:A.freightParsePrice({valueInCents:j.price,hasFree:!1,freeTaxMessage:c.freightConfig.messages.free_tax}),title:j.name,paragraph:`${c.freightConfig.messages.prefix_days}${dh(j.shippingEstimate)}`,radioValue:u,changeValue:b},j.id))}),c.deliveryInfoBoxesAllowed?n.jsx(ah,{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}):n.jsx(n.Fragment,{})]}):null]})},gt={"pcd-navigation--breadcrumb":"_pcd-navigation--breadcrumb_e02qd_1","pdc-navigation--content":"_pdc-navigation--content_e02qd_28","pdc-navigation--filters":"_pdc-navigation--filters_e02qd_54","pdc-navigation--filters--content":"_pdc-navigation--filters--content_e02qd_67","pdc-navigation--selected":"_pdc-navigation--selected_e02qd_137","pdc-navigation--selected--container":"_pdc-navigation--selected--container_e02qd_150","pdc-navigation":"_pdc-navigation_e02qd_28"},gh=({children:e,href:t,isLast:r,title:s,ICONS:o})=>n.jsx(d.BreadCrumb.Item,{adornment:{end:r&&n.jsx(d.Icon,{name:o.arrow_right})},children:r?n.jsx($e,{href:t??"/",size:"medium",title:s,disableUnderline:!0,children:e}):e}),Zl=()=>{var a;const{state:e}=ze(),{ICONS:t}=Me(),r=e!=null&&e.term&&e.term.length>0?`/${e.term}`:"",s=decodeURIComponent((a=e==null?void 0:e.base)!=null&&a.length?e.base:r??r).slice(1).split("/"),o=Ni(s);return n.jsx("div",{className:gt["pcd-navigation--breadcrumb"],children:n.jsx(d.BreadCrumb.DivWrapper,{children:n.jsx(d.BreadCrumb.List,{children:Array.isArray(o)&&o.map((i,c)=>{var l,u;return g.createElement(gh,{...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," "))})})})})};Zl.displayName="PLPNavigation.BreadCrumb";const Jl=({children:e,...t})=>n.jsxs("div",{...t,className:gt["pdc-navigation--content"],children:[n.jsx(ut.Filters,{}),e]});Jl.displayName="PLPNavigation.Content";const yh="_sort_35wro_1",$n={sort:yh,"sort-list-wrapper":"_sort-list-wrapper_35wro_8","sort-list":"_sort-list_35wro_8","sort-button":"_sort-button_35wro_25"},xh=({children:e,sortListOpen:t,btnAdornment:r,style:s,...o})=>n.jsx(d.Button,{...o,adornment:{end:t?r==null?void 0:r.listOpen:r==null?void 0:r.listClosed},size:"small",variant:"tertiary",style:{...s,textDecoration:"none"},className:$n["sort-button"],children:e}),vh=e=>n.jsx(d.RadioButton.Radio,{...e}),bh=({children:e,className:t,name:r,...s})=>n.jsx(d.RadioButton.Group,{...s,name:r||"sort-group",className:d.helpers.classNameConcat($n["sort-list"],t),children:e}),jh=({children:e,className:t,shadow:r=!0,padding:s="small",height:o="fit-content",...a})=>n.jsx(d.Card,{...a,shadow:r,className:d.helpers.classNameConcat($n["sort-list-wrapper"],t),padding:s,height:o,children:e}),eu=g.forwardRef(({children:e,className:t,...r},s)=>n.jsx("div",{...r,ref:s,className:d.helpers.classNameConcat($n.sort,t),children:e}));eu.displayName="SortRoot";const zn=({handleSelectValue:e,sortListOpen:t,setSortListOpen:r,searchParams:s,ICONS:o,...a})=>{var m;const i=(m=s==null?void 0:s.get("sort"))==null?void 0:m.replace(":","_"),[c,l]=g.useState(i),{sendDataLayerEvent:u}=oe();g.useEffect(()=>{l(i||void 0)},[i]);const{ref:p}=sl(()=>r(!1)),f=h=>{const _=h.target.value;l(_),typeof e=="function"&&e(_),u({functionKey:"filterEvent",data:{customData:{ordering:Mt.options[_]}}}),r(!1)};return n.jsxs(eu,{...a,ref:p,children:[n.jsx(xh,{btnAdornment:{listOpen:n.jsx(d.Icon,{name:o.arrow_up,size:"small"}),listClosed:n.jsx(d.Icon,{name:o.arrow_down,size:"small"})},sortListOpen:t,onClick:()=>r(!t),children:c?Mt.options[c]:Mt.placeholder},"sort-button"),t&&n.jsx(jh,{children:n.jsx(bh,{name:"sort-group",value:c??"",onChange:f,children:Object.keys(Mt.options).map(h=>n.jsx(vh,{label:Mt.options[h],value:h},h))})})]})};zn.displayName="Sort";const tu=g.createContext({}),Ch=({children:e,...t})=>{const[r,s]=g.useState(!1);return n.jsx(tu.Provider,{value:g.useMemo(()=>({...t,openOrderBy:r,setOpenOrderBy:s}),[t,r,s]),children:e})},Sh=()=>{const e=g.useContext(tu);if(e===void 0)throw new Error("usePLPNavigationContext must be used within a PDCNavigationProvider");return e},nu=()=>{const{openOrderBy:e,onSort:t,setOpenFilters:r,setOpenOrderBy:s}=Sh(),{ICONS:o,PDC_NAVIGATION:a,searchParams:i}=Me();return n.jsxs("div",{className:gt["pdc-navigation--filters"],children:[n.jsx(ut.BreadCrumb,{}),n.jsxs("div",{className:gt["pdc-navigation--filters--content"],children:[n.jsx(zn,{handleSelectValue:c=>t(c??"release_desc"),sortListOpen:e,setSortListOpen:s,ICONS:o,searchParams:i}),n.jsx(d.Button,{adornment:{end:n.jsx(d.Icon,{name:o.arrow_down})},onClick:()=>r(!0),size:"small",variant:"tertiary",children:a.filter_button}),n.jsx(ut.Total,{})]})]})};nu.displayName="PLPNavigation.Filters";const ru=({children:e,onSort:t,setOpenFilters:r,style:s,...o})=>{const a=g.useRef(null);return n.jsx(Ch,{onSort:t,setOpenFilters:r,children:n.jsx("div",{...o,className:gt["pdc-navigation"],ref:a,style:{...s},children:n.jsx(ut.Content,{children:e})})})};ru.displayName="Root";const su=({callback:e,selected:t,...r})=>n.jsx("div",{...r,className:gt["pdc-navigation--selected"],children:n.jsx("div",{className:gt["pdc-navigation--selected--container"],children:Array.isArray(t)?t.map(s=>s.key==="productclusterids"?null:n.jsx(ut.SelectedItem,{callback:e,facet:s},s.value)):null})});su.displayName="PLPNavigation.Selected";const Ls=({key:e,PLP_FILTERS:t})=>t.some(r=>r.key===e)?e==="cores-filtraveis":!1,ks=({value:e,PLP_FILTERS_COLORS:t})=>{var r;return((r=t.find(s=>s.value===e))==null?void 0:r.color)??"#F2F2F2"},ou=({key:e,PLP_FILTERS:t})=>{var r;return(r=t.find(s=>s.key===e))==null?void 0:r.label},au=({key:e,PLP_FILTERS:t})=>{var r;return((r=t.find(s=>s.key===e))==null?void 0:r.order)??0},Kr=({value:e})=>{const[t,r]=e.split(":").length===2?e.split(":"):[0,0],s=A.formatPriceToCurrency(Number(r));return`${A.formatPriceToCurrency(Number(t))} até ${s}`},iu=({items:e})=>{const t=e.flatMap(o=>[o.range.from,o.range.to]),r=Math.min(...t.map(Math.abs)),s=Math.max(...t.map(Math.abs));return[r,s]},cu=Object.freeze(Object.defineProperty({__proto__:null,checkedColor:Ls,createTagPrice:Kr,getAbsoluteMinMax:iu,getColor:ks,getName:ou,getOrder:au},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"},lu=({columns:e=2,CONSTANTS:t,...r})=>{var a;const{filters:s,onToggleFacet:o}=Ot();return n.jsxs("div",{...r,className:We["filter--modal--body--content"],children:[Array.isArray(s.facets)&&s.facets.map(i=>n.jsx(rt.Item,{columns:e,facet:i,onToggleFacet:o,CONSTANTS:t},i.key)),!((a=s.facets)!=null&&a.length)&&n.jsx(rt.Empty,{PLP_FILTERS_EMPTY:t.PLP_FILTERS_EMPTY})]})};lu.displayName="Filter.Item.Content";const uu=({PLP_FILTERS_EMPTY:e})=>{const t=()=>{window.history.back()};return n.jsxs("div",{className:We["filter--empty"],children:[n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h4",{children:e.title}),n.jsx("p",{children:e.subtitle})]}),n.jsx(d.Button,{onClick:()=>t(),variant:"tertiary",children:e.button})]})};uu.displayName="Filter.Empty";const du=({columns:e,facet:t,onToggleFacet:r,CONSTANTS:s,...o})=>{const a=au({key:t.key,PLP_FILTERS:s.PLP_FILTERS}),i=()=>{if(t.__typename==="FacetBoolean"){if(t.key==="cores-filtraveis")return n.jsx(rt.Colors,{onToggleFacet:r,values:t.values,PLP_FILTERS:s.PLP_FILTERS,PLP_FILTERS_COLORS:s.PLP_FILTERS_COLORS});if(t.key==="tamanho")return n.jsx(rt.Sizes,{onToggleFacet:r,values:t.values,PLP_SIZE_ORDER:s.PLP_SIZE_ORDER});if(t.key==="category-2")return n.jsx(rt.Toggle,{columns:e,facetKey:t.key,onToggleFacet:r,values:t.values,ICONS:s.ICONS})}return t.__typename==="FacetRange"?n.jsx(rt.Price,{facet:t}):n.jsx("p",{children:"Filter not support!!!"})};return n.jsx("div",{...o,className:We["filter--item"],style:{order:a},children:n.jsxs(d.Accordion.Wrapper,{style:{width:"100%"},children:[n.jsx(d.Accordion.Header,{id:t.key,closeIndicator:n.jsx(d.Icon,{name:s.ICONS.arrow_up}),openIndicator:n.jsx(d.Icon,{name:s.ICONS.arrow_down}),children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h4",{className:"typography-style-body-sm",children:ou({key:t.key,PLP_FILTERS:s.PLP_FILTERS})})})})}),n.jsx(d.Accordion.Body,{children:i()})]})})};du.displayName="Filter.Item";const pu=({onToggleFacet:e,values:t,PLP_FILTERS:r,PLP_FILTERS_COLORS:s,...o})=>n.jsx(Qe.Root,{...o,children:n.jsx(Qe.List,{children:Array.isArray(t)&&t.map(({key:a,selected:i,value:c})=>n.jsx(Qe.Option,{active:i,"data-color":Ls({key:a,PLP_FILTERS:r}),fill:ks({value:c,PLP_FILTERS_COLORS:s}),onClick:()=>e({key:a,value:c}),type:"color"},`${a}-${c}`))})});pu.displayName="Filter.Item.Color";const mu=({facet:e,...t})=>{var u,p;const{filters:{selected:r},price:s,onToggleFacet:o}=Ot(),[a,i]=(s==null?void 0:s.split(":").map(Number))??[0,100],[c,l]=((p=(u=r==null?void 0:r.find(({key:f})=>f==="price"))==null?void 0:u.value)==null?void 0:p.split(":").map(Number))??[a,i];return n.jsx("div",{...t,className:We["filter--item--price"],children:n.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 m,h;f&&o({key:"price",value:`${(m=f.range)==null?void 0:m.min}:${(h=f.range)==null?void 0:h.max}`})},children:[n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{"data-min-value":!0})})}),n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{"data-max-value":!0})})})]})})};mu.displayName="Filter.Item.Price";const fu=({onToggleFacet:e,values:t,PLP_SIZE_ORDER:r,...s})=>{const o=[...t].sort((a,i)=>{const c=r.indexOf(a.name),l=r.indexOf(i.name);return c-l});return n.jsx(Qe.Root,{...s,children:n.jsx(Qe.List,{children:Array.isArray(o)&&o.map(({key:a,selected:i,value:c})=>n.jsx(Qe.Option,{active:i,text:c,type:"size",onClick:()=>e({key:a,value:c})},c))})})};fu.displayName="Filter.Item.Sizes";const hu=({columns:e,facetKey:t,onToggleFacet:r,values:s,ICONS:o,...a})=>n.jsx("div",{...a,className:We["filter--item--toggle"],children:n.jsx("div",{className:We["filter--item--toggle--container"],style:{gridTemplateColumns:`repeat(${e}, 1fr)`},children:Array.isArray(s)&&s.map(i=>n.jsx(d.Checkbox,{label:(i==null?void 0:i.name)??"",adornment:n.jsx(d.Icon,{name:o.check}),checked:i.selected,onChange:()=>r(i)},i.value))})});hu.displayName="Filter.Item.Toggle";const _u=({...e})=>{const{isLoading:t}=Ot();return n.jsx("div",{className:We["filter--loading"],"data-active":t,...e,children:n.jsx(d.Spinner,{indicatorColor:"#000",background:"#222"})})};_u.displayName="Filter.Loading";const gu=({children:e,className:t,isMobile:r=!1,CONSTANTS:{PLP_FILTERS_TITLE:s,ICONS:o}})=>{var p;const{deleteAllFacets:a,filters:i,isOpen:c,target:l,setIsOpen:u}=Ot();return n.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(We["filter--modal"],t),isMobile:r??!1,isOpen:c,parent:l,setIsOpen:u,variant:r?"sideBottom":"sideRight",style:{zIndex:99},children:[n.jsxs(d.Modal.Header,{navigation:"top",children:[n.jsx(d.Modal.Controls,{navigation:"top",isMobile:r,children:n.jsx(d.Button,{"data-close":!0,iconNameStart:o.close,size:"small",variant:"tertiary",style:{marginLeft:"auto"}})}),n.jsx(d.Modal.Title,{navigation:"top",title:s})]}),n.jsxs(d.Modal.Body,{style:{width:500},children:[n.jsx("div",{className:We["filter--modal--body"],children:e}),n.jsx(rt.Loading,{})]}),n.jsx(d.Modal.Footer,{children:n.jsxs("div",{className:We["filter--modal--footer"],children:[n.jsx(d.Button,{"data-close":!0,size:"large",variant:"primary",children:(p=i.facets)!=null&&p.length?"ver resultados":"fechar"}),n.jsx(d.Button,{"data-close":!0,onClick:()=>a(),variant:"tertiary",children:"limpar filtros"})]})})]})};gu.displayName="Filter.Modal";const yu=({children:e,className:t,isMobile:r,CONSTANTS:s,...o})=>n.jsx(qi,{...o,PLP_FILTERS:s.PLP_FILTERS,children:n.jsx(rt.Modal,{className:t,isMobile:r,CONSTANTS:s,children:e})});yu.displayName="Filter.Root";const xu=({ICONS:e,PLP_FILTERS_COLORS:t,PLP_FILTERS:r})=>{const{filters:s,onToggleFacet:o}=Ot();return n.jsx("div",{className:We["filter--selected"],children:n.jsx("div",{className:We["filter--selected--content"],children:Array.isArray(s.selected)&&s.selected.map(({key:a,value:i})=>a==="productclusterids"?null:n.jsx(d.Tag,{title:a==="price"?Kr({value:i}):i,adornment:{end:n.jsx(d.Icon,{name:e.close,size:"x-small"})},colorSquare:ks({value:i,PLP_FILTERS_COLORS:t}),onClick:()=>o({key:a,value:i}),squareShow:Ls({key:a,PLP_FILTERS:r}),size:"medium",variant:"primary",children:a==="price"?Kr({value:i}):i},i))})})};xu.displayName="Filter.Selected";const rt={Colors:pu,Content:lu,Empty:uu,Modal:gu,Item:du,Root:yu,Loading:_u,Selected:xu,Price:mu,Sizes:fu,Toggle:hu},{checkedColor:Eh,createTagPrice:zo,getColor:Ph}=cu,vu=({callback:e,facet:t})=>{const{ICONS:r,PLP_FILTERS_COLORS:s,PLP_FILTERS:o}=Me();return n.jsx(d.Tag,{title:(t==null?void 0:t.key)==="price"?zo({value:t.value}):t.value.toUpperCase(),adornment:{end:n.jsx(d.Icon,{name:r.close,size:"x-small"})},colorSquare:Ph({value:t.value,PLP_FILTERS_COLORS:s}),onClick:()=>{typeof e=="function"&&e(t,!0)},squareShow:Eh({key:t.key,PLP_FILTERS:o}),size:"medium",variant:"primary",children:(t==null?void 0:t.key)==="price"?zo({value:t.value}):t.value.toUpperCase()})};vu.displayName="PLPNavigation.Selected.Item";const bu=()=>n.jsx(d.TextStructure.Root,{children:n.jsx("p",{id:"pdc-navigation--total"})});bu.displayName="PLPNavigation.Total";const ut={BreadCrumb:Zl,Content:Jl,Filters:nu,Root:ru,Selected:su,SelectedItem:vu,Total:bu},Nh="_footer__bottom_198g6_2",Ih="_footer__wrapper_198g6_10",Rh="_footer__main_198g6_39",wh="_footer__legalInformation_198g6_55",Ah="_footer__column_198g6_77",Th="_footer__columnContent_198g6_87",Lh="_footer__item_198g6_91",kh="_footer__itemLink_198g6_107",Oh="_footer__columnTitle_198g6_122",Mh="_footer__columnTitleIcon_198g6_134",Dh="_footer__iconList_198g6_147",$h="_footer__itemSmallText_198g6_157",zh="_payment_198g6_168",Fh="_footer__iconContainer_198g6_173",Bh="_footer__iconListSubHeader_198g6_178",Uh="_accordionWrapper_198g6_200",Hh="_accordionHeader_198g6_204",qh="_accordionTextWrapper_198g6_208",de={footer__bottom:Nh,footer__wrapper:Ih,footer__main:Rh,footer__legalInformation:wh,footer__column:Ah,footer__columnContent:Th,footer__item:Lh,footer__itemLink:kh,footer__columnTitle:Oh,footer__columnTitleIcon:Mh,footer__iconList:Dh,footer__itemSmallText:$h,payment:zh,footer__iconContainer:Fh,footer__iconListSubHeader:Bh,accordionWrapper:Uh,accordionHeader:Hh,accordionTextWrapper:qh,"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 ju={},Os={},Fn={};(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=s=>{r.has(s)||console.warn(s),r.add(s)}}})(Fn);var Cu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImageBlurSvg",{enumerable:!0,get:function(){return t}});function t(r){let{widthInt:s,heightInt:o,blurWidth:a,blurHeight:i,blurDataURL:c,objectFit:l}=r;const u=20,p=a?a*40:s,f=i?i*40:o,m=p&&f?"viewBox='0 0 "+p+" "+f+"'":"",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"}})(Cu);var Bn={};(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 s}});const r=["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}})(Bn);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImgProps",{enumerable:!0,get:function(){return h}});const t=Fn,r=Cu,s=Bn,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 p(_){return typeof _>"u"?_:typeof _=="number"?Number.isFinite(_)?_:NaN:typeof _=="string"&&/^[0-9]+$/.test(_)?parseInt(_,10):NaN}function f(_,y,x){let{deviceSizes:b,allSizes:E}=_;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:E.filter(C=>C>=b[0]*S),kind:"w"}}return{widths:E,kind:"w"}}return typeof y!="number"?{widths:b,kind:"w"}:{widths:[...new Set([y,y*2].map(v=>E.find(P=>P>=v)||E[E.length-1]))],kind:"x"}}function m(_){let{config:y,src:x,unoptimized:b,width:E,quality:j,sizes:v,loader:P}=_;if(b)return{src:x,srcSet:void 0,sizes:void 0};const{widths:S,kind:C}=f(y,E,v),I=S.length-1;return{sizes:!v&&C==="w"?"100vw":v,srcSet:S.map((L,T)=>P({config:y,src:x,quality:j,width:L})+" "+(C==="w"?L:T+1)+C).join(", "),src:P({config:y,src:x,quality:j,width:S[I]})}}function h(_,y){let{src:x,sizes:b,unoptimized:E=!1,priority:j=!1,loading:v,className:P,quality:S,width:C,height:I,fill:L=!1,style:T,overrideSrc:k,onLoad:M,onLoadingComplete:Q,placeholder:D="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:R}=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),O=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:O,qualities:B}}if(typeof R>"u")throw new Error(`images.loaderFile detected but the file is missing default export.
5
5
  Read more: https://nextjs.org/docs/messages/invalid-images-config`);let N=se.loader||R;delete se.loader,delete se.srcSet;const w="__next_img_default"in N;if(w){if(W.loader==="custom")throw new Error('Image with src "'+x+`" is missing "loader" prop.
6
6
  Read more: https://nextjs.org/docs/messages/next-image-missing-loader`)}else{const X=N;N=O=>{const{config:B,...ee}=O;return X(ee)}}if(G){G==="fill"&&(L=!0);const X={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}},O={responsive:"100vw",fill:"100vw"},B=X[G];B&&(T={...T,...B});const ee=O[G];ee&&!b&&(b=ee)}let Ne="",q=p(C),K=p(I),_e,Re;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,Re=X.blurHeight,U=U||X.blurDataURL,Ne=X.src,!L){if(!q&&!K)q=X.width,K=X.height;else if(q&&!K){const O=q/X.width;K=Math.round(X.height*O)}else if(!q&&K){const O=K/X.height;q=Math.round(X.width*O)}}}x=typeof x=="string"?x:Ne;let be=!j&&(v==="lazy"||typeof v>"u");(!x||x.startsWith("data:")||x.startsWith("blob:"))&&(E=!0,be=!1),W.unoptimized&&(E=!0),w&&x.endsWith(".svg")&&!W.dangerouslyAllowSVG&&(E=!0),j&&(F="high");const ge=p(S);if(process.env.NODE_ENV!=="production"){if(W.output==="export"&&w&&!E)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)E=!0;else if(L){if(C)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(T!=null&&T.position&&T.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(T!=null&&T.width&&T.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(T!=null&&T.height&&T.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 "'+C+'".');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(D!=="empty"&&D!=="blur"&&!D.startsWith("data:image/"))throw new Error('Image with src "'+x+'" has invalid "placeholder" property "'+D+'".');if(D!=="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.'),D==="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.
7
7
  Possible solutions:
@@ -11,11 +11,11 @@ Read more: https://nextjs.org/docs/messages/next-image-missing-loader`)}else{con
11
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.'),!E&&!w){const X=N({config:W,src:x,width:q||400,quality:ge||75});let O;try{O=new URL(X)}catch{}(X===x||O&&O.pathname===x&&!O.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
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,O]of Object.entries({layout:G,objectFit:H,objectPosition:Z,lazyBoundary:re,lazyRoot:le}))O&&(0,t.warnOnce)('Image with src "'+x+'" has legacy prop "'+X+`". Did you forget to run the codemod?
13
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 O;const ee=(B==null||(O=B.element)==null?void 0:O.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(L?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:H,objectPosition:Z}:{},z?{}:{color:"transparent"},T),je=!J&&D!=="empty"?D==="blur"?'url("data:image/svg+xml;charset=utf-8,'+(0,r.getImageBlurSvg)({widthInt:q,heightInt:K,blurWidth:_e,blurHeight:Re,blurDataURL:U||"",objectFit:Ae.objectFit})+'")':'url("'+D+'")':null;let $=je?{backgroundSize:Ae.objectFit||"cover",backgroundPosition:Ae.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:je}:{};process.env.NODE_ENV==="development"&&$.backgroundImage&&D==="blur"&&U!=null&&U.startsWith("/")&&($.backgroundImage='url("'+U+'")');const pe=m({config:W,src:x,unoptimized:E,width:q,quality:ge,sizes:b,loader:N});if(process.env.NODE_ENV!=="production"&&typeof window<"u"){let X;try{X=new URL(pe.src)}catch{X=new URL(pe.src,window.location.href)}l.set(X.href,{src:x,priority:j,placeholder:D})}return{props:{...se,loading:be?"lazy":v,fetchPriority:F,width:q,height:K,decoding:Y,className:P,style:{...Ae,...$},sizes:pe.sizes,srcSet:pe.srcSet,src:k||pe.src},meta:{unoptimized:E,priority:j,placeholder:D,fill:L}}}})(Os);var Xr={exports:{}},mn={exports:{}},Cr={},Fo;function Vh(){return Fo||(Fo=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",s=r?()=>{}:t.useLayoutEffect,o=r?()=>{}: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(r){var p;c==null||(p=c.mountedInstances)==null||p.add(i.children),u()}return s(()=>{var f;return c==null||(f=c.mountedInstances)==null||f.add(i.children),()=>{var m;c==null||(m=c.mountedInstances)==null||m.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}}(Cr)),Cr}var Sr={},Bo;function Wh(){return Bo||(Bo=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")}(Sr)),Sr}var Er={},Uo;function Su(){return Uo||(Uo=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")}(Er)),Er}var Pr={},Ho;function Gh(){return Ho||(Ho=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isInAmpMode",{enumerable:!0,get:function(){return t}});function t(r){let{ampFirst:s=!1,hybrid:o=!1,hasQuery:a=!1}=r===void 0?{}:r;return s||o&&a}}(Pr)),Pr}var qo;function Kh(){return qo||(qo=1,function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function r(j,v){for(var P in v)Object.defineProperty(j,P,{enumerable:!0,get:v[P]})}r(t,{default:function(){return E},defaultHead:function(){return m}});const s=Le,o=At,a=n,i=o._(g),c=s._(Vh()),l=Wh(),u=Su(),p=Gh(),f=Fn;function m(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 C=>{let I=!0,L=!1;if(C.key&&typeof C.key!="number"&&C.key.indexOf("$")>0){L=!0;const T=C.key.slice(C.key.indexOf("$")+1);j.has(T)?I=!1:j.add(T)}switch(C.type){case"title":case"base":v.has(C.type)?I=!1:v.add(C.type);break;case"meta":for(let T=0,k=_.length;T<k;T++){const M=_[T];if(C.props.hasOwnProperty(M))if(M==="charSet")P.has(M)?I=!1:P.add(M);else{const Q=C.props[M],D=S[M]||new Set;(M!=="name"||!L)&&D.has(Q)?I=!1:(D.add(Q),S[M]=D)}}break}return I}}function x(j,v){const{inAmpMode:P}=v;return j.reduce(h,[]).reverse().concat(m(P).reverse()).filter(y()).reverse().map((S,C)=>{const I=S.key||C;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(L=>S.props.href.startsWith(L))){const L={...S.props||{}};return L["data-href"]=L.href,L.href=void 0,L["data-optimized-fonts"]=!0,i.default.cloneElement(S,L)}if(process.env.NODE_ENV==="development")if(S.type==="script"&&S.props.type!=="application/ld+json"){const L=S.props.src?'<script> tag with src="'+S.props.src+'"':"inline <script>";(0,f.warnOnce)("Do not add <script> tags using next/head (see "+L+`). Use next/script instead.
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(L?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:H,objectPosition:Z}:{},$?{}:{color:"transparent"},T),je=!J&&D!=="empty"?D==="blur"?'url("data:image/svg+xml;charset=utf-8,'+(0,r.getImageBlurSvg)({widthInt:q,heightInt:K,blurWidth:_e,blurHeight:Re,blurDataURL:U||"",objectFit:Ae.objectFit})+'")':'url("'+D+'")':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&&D==="blur"&&U!=null&&U.startsWith("/")&&(z.backgroundImage='url("'+U+'")');const pe=m({config:W,src:x,unoptimized:E,width:q,quality:ge,sizes:b,loader:N});if(process.env.NODE_ENV!=="production"&&typeof window<"u"){let X;try{X=new URL(pe.src)}catch{X=new URL(pe.src,window.location.href)}l.set(X.href,{src:x,priority:j,placeholder:D})}return{props:{...se,loading:be?"lazy":v,fetchPriority:F,width:q,height:K,decoding:Y,className:P,style:{...Ae,...z},sizes:pe.sizes,srcSet:pe.srcSet,src:k||pe.src},meta:{unoptimized:E,priority:j,placeholder:D,fill:L}}}})(Os);var Xr={exports:{}},mn={exports:{}},Cr={},Fo;function Vh(){return Fo||(Fo=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",s=r?()=>{}:t.useLayoutEffect,o=r?()=>{}: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(r){var p;c==null||(p=c.mountedInstances)==null||p.add(i.children),u()}return s(()=>{var f;return c==null||(f=c.mountedInstances)==null||f.add(i.children),()=>{var m;c==null||(m=c.mountedInstances)==null||m.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}}(Cr)),Cr}var Sr={},Bo;function Wh(){return Bo||(Bo=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")}(Sr)),Sr}var Er={},Uo;function Su(){return Uo||(Uo=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")}(Er)),Er}var Pr={},Ho;function Gh(){return Ho||(Ho=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isInAmpMode",{enumerable:!0,get:function(){return t}});function t(r){let{ampFirst:s=!1,hybrid:o=!1,hasQuery:a=!1}=r===void 0?{}:r;return s||o&&a}}(Pr)),Pr}var qo;function Kh(){return qo||(qo=1,function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function r(j,v){for(var P in v)Object.defineProperty(j,P,{enumerable:!0,get:v[P]})}r(t,{default:function(){return E},defaultHead:function(){return m}});const s=Le,o=At,a=n,i=o._(g),c=s._(Vh()),l=Wh(),u=Su(),p=Gh(),f=Fn;function m(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 C=>{let I=!0,L=!1;if(C.key&&typeof C.key!="number"&&C.key.indexOf("$")>0){L=!0;const T=C.key.slice(C.key.indexOf("$")+1);j.has(T)?I=!1:j.add(T)}switch(C.type){case"title":case"base":v.has(C.type)?I=!1:v.add(C.type);break;case"meta":for(let T=0,k=_.length;T<k;T++){const M=_[T];if(C.props.hasOwnProperty(M))if(M==="charSet")P.has(M)?I=!1:P.add(M);else{const Q=C.props[M],D=S[M]||new Set;(M!=="name"||!L)&&D.has(Q)?I=!1:(D.add(Q),S[M]=D)}}break}return I}}function x(j,v){const{inAmpMode:P}=v;return j.reduce(h,[]).reverse().concat(m(P).reverse()).filter(y()).reverse().map((S,C)=>{const I=S.key||C;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(L=>S.props.href.startsWith(L))){const L={...S.props||{}};return L["data-href"]=L.href,L.href=void 0,L["data-optimized-fonts"]=!0,i.default.cloneElement(S,L)}if(process.env.NODE_ENV==="development")if(S.type==="script"&&S.props.type!=="application/ld+json"){const L=S.props.src?'<script> tag with src="'+S.props.src+'"':"inline <script>";(0,f.warnOnce)("Do not add <script> tags using next/head (see "+L+`). Use next/script instead.
15
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,p.isInAmpMode)(P),children:v})}const E=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)}(mn,mn.exports)),mn.exports}var Nr={},Vo;function Xh(){return Vo||(Vo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ImageConfigContext",{enumerable:!0,get:function(){return o}});const r=Le._(g),s=Bn,o=r.default.createContext(s.imageConfigDefault);process.env.NODE_ENV!=="production"&&(o.displayName="ImageConfigContext")}(Nr)),Nr}var Ir={},Rr={},wr={exports:{}},Wo;function Eu(){return Wo||(Wo=1,(()=>{var e={170:(o,a,i)=>{const c=i(510),l=()=>{if(typeof navigator<"u"&&navigator.platform){const p=navigator.platform.toLowerCase();return p==="win32"||p==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};function u(p,f,m=!1){return f&&(f.windows===null||f.windows===void 0)&&(f={...f,windows:l()}),c(p,f,m)}Object.assign(u,c),o.exports=u},154:o=>{const a="\\\\/",i=`[^${a}]`,c="\\.",l="\\+",u="\\?",p="\\/",f="(?=.)",m="[^/]",h=`(?:${p}|$)`,_=`(?:^|${p})`,y=`${c}{1,2}${h}`,x=`(?!${c})`,b=`(?!${_}${y})`,E=`(?!${c}{0,1}${h})`,j=`(?!${y})`,v=`[^.${p}]`,P=`${m}*?`,C={DOT_LITERAL:c,PLUS_LITERAL:l,QMARK_LITERAL:u,SLASH_LITERAL:p,ONE_CHAR:f,QMARK:m,END_ANCHOR:h,DOTS_SLASH:y,NO_DOT:x,NO_DOTS:b,NO_DOT_SLASH:E,NO_DOTS_SLASH:j,QMARK_NO_DOT:v,STAR:P,START_ANCHOR:_,SEP:"/"},I={...C,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:"\\"},L={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:L,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(T){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${T.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(T){return T===!0?I:C}}},697:(o,a,i)=>{const c=i(154),l=i(96),{MAX_LENGTH:u,POSIX_REGEX_SOURCE:p,REGEX_NON_SPECIAL_CHARS:f,REGEX_SPECIAL_CHARS_BACKREF:m,REPLACEMENTS:h}=c,_=(b,E)=>{if(typeof E.expandRange=="function")return E.expandRange(...b,E);b.sort();const j=`[${b.join("-")}]`;try{new RegExp(j)}catch{return b.map(P=>l.escapeRegex(P)).join("..")}return j},y=(b,E)=>`Missing ${b}: "${E}" - use "\\\\${E}" to match literal characters`,x=(b,E)=>{if(typeof b!="string")throw new TypeError("Expected a string");b=h[b]||b;const j={...E},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||""},C=[S],I=j.capture?"":"?:",L=c.globChars(j.windows),T=c.extglobChars(L),{DOT_LITERAL:k,PLUS_LITERAL:M,SLASH_LITERAL:Q,ONE_CHAR:D,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}=L,se=V=>`(${I}(?:(?!${le}${V.dot?U:k}).)*?)`,ie=j.dot?"":F,z=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 R={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:C};b=l.removePrefix(b,R),P=b.length;const W=[],ae=[],he=[];let N=S,w;const Ne=()=>R.index===P-1,q=R.peek=(V=1)=>b[R.index+V],K=R.advance=()=>b[++R.index]||"",_e=()=>b.slice(R.index+1),Re=(V="",X=0)=>{R.consumed+=V,R.index+=X},be=V=>{R.output+=V.output!=null?V.output:V.value,Re(V.value)},ge=()=>{let V=1;for(;q()==="!"&&(q(2)!=="("||q(3)==="?");)K(),R.start++,V++;return V%2===0?!1:(R.negated=!0,R.start++,!0)},Ae=V=>{R[V]++,he.push(V)},je=V=>{R[V]--,he.pop()},$=V=>{if(N.type==="globstar"){const X=R.braces>0&&(V.type==="comma"||V.type==="brace"),O=V.extglob===!0||W.length&&(V.type==="pipe"||V.type==="paren");V.type!=="slash"&&V.type!=="paren"&&!X&&!O&&(R.output=R.output.slice(0,-N.output.length),N.type="star",N.value="*",N.output=J,R.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,C.push(V),N=V},pe=(V,X)=>{const O={...T[X],conditions:1,inner:""};O.prev=N,O.parens=R.parens,O.output=R.output;const B=(j.capture?"(":"")+O.open;Ae("parens"),$({type:V,value:X,output:R.output?"":D}),$({type:"paren",extglob:!0,value:K(),output:B}),W.push(O)},ye=V=>{let X=V.close+(j.capture?")":""),O;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("*")&&(O=_e())&&/^\.[^\\/.]+$/.test(O)){const ee=x(O,{...E,fastpaths:!1}).output;X=V.close=`)${ee})${B})`}V.prev.type==="bos"&&(R.negatedExtglob=!0)}$({type:"paren",extglob:!0,value:w,output:X}),je("parens")};if(j.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(b)){let V=!1,X=b.replace(m,(O,B,ee,fe,Pe,Vn)=>fe==="\\"?(V=!0,O):fe==="?"?B?B+fe+(Pe?H.repeat(Pe.length):""):Vn===0?z+(Pe?H.repeat(Pe.length):""):H.repeat(ee.length):fe==="."?k.repeat(ee.length):fe==="*"?B?B+fe+(Pe?J:""):J:B?O:`\\${O}`);return V===!0&&(j.unescape===!0?X=X.replace(/\\/g,""):X=X.replace(/\\+/g,O=>O.length%2===0?"\\\\":O?"\\":"")),X===b&&j.contains===!0?(R.output=b,R):(R.output=l.wrapOutput(X,R,E),R)}for(;!Ne();){if(w=K(),w==="\0")continue;if(w==="\\"){const O=q();if(O==="/"&&j.bash!==!0||O==="."||O===";")continue;if(!O){w+="\\",$({type:"text",value:w});continue}const B=/^\\+/.exec(_e());let ee=0;if(B&&B[0].length>2&&(ee=B[0].length,R.index+=ee,ee%2!==0&&(w+="\\")),j.unescape===!0?w=K():w+=K(),R.brackets===0){$({type:"text",value:w});continue}}if(R.brackets>0&&(w!=="]"||N.value==="["||N.value==="[^")){if(j.posix!==!1&&w===":"){const O=N.value.slice(1);if(O.includes("[")&&(N.posix=!0,O.includes(":"))){const B=N.value.lastIndexOf("["),ee=N.value.slice(0,B),fe=N.value.slice(B+2),Pe=p[fe];if(Pe){N.value=ee+Pe,R.backtrack=!0,K(),!S.output&&C.indexOf(N)===1&&(S.output=D);continue}}}(w==="["&&q()!==":"||w==="-"&&q()==="]")&&(w=`\\${w}`),w==="]"&&(N.value==="["||N.value==="[^")&&(w=`\\${w}`),j.posix===!0&&w==="!"&&N.value==="["&&(w="^"),N.value+=w,be({value:w});continue}if(R.quotes===1&&w!=='"'){w=l.escapeRegex(w),N.value+=w,be({value:w});continue}if(w==='"'){R.quotes=R.quotes===1?0:1,j.keepQuotes===!0&&$({type:"text",value:w});continue}if(w==="("){Ae("parens"),$({type:"paren",value:w});continue}if(w===")"){if(R.parens===0&&j.strictBrackets===!0)throw new SyntaxError(y("opening","("));const O=W[W.length-1];if(O&&R.parens===O.parens+1){ye(W.pop());continue}$({type:"paren",value:w,output:R.parens?")":"\\)"}),je("parens");continue}if(w==="["){if(j.nobracket===!0||!_e().includes("]")){if(j.nobracket!==!0&&j.strictBrackets===!0)throw new SyntaxError(y("closing","]"));w=`\\${w}`}else Ae("brackets");$({type:"bracket",value:w});continue}if(w==="]"){if(j.nobracket===!0||N&&N.type==="bracket"&&N.value.length===1){$({type:"text",value:w,output:`\\${w}`});continue}if(R.brackets===0){if(j.strictBrackets===!0)throw new SyntaxError(y("opening","["));$({type:"text",value:w,output:`\\${w}`});continue}je("brackets");const O=N.value.slice(1);if(N.posix!==!0&&O[0]==="^"&&!O.includes("/")&&(w=`/${w}`),N.value+=w,be({value:w}),j.literalBrackets===!1||l.hasRegexChars(O))continue;const B=l.escapeRegex(N.value);if(R.output=R.output.slice(0,-N.value.length),j.literalBrackets===!0){R.output+=B,N.value=B;continue}N.value=`(${I}${B}|${N.value})`,R.output+=N.value;continue}if(w==="{"&&j.nobrace!==!0){Ae("braces");const O={type:"brace",value:w,output:"(",outputIndex:R.output.length,tokensIndex:R.tokens.length};ae.push(O),$(O);continue}if(w==="}"){const O=ae[ae.length-1];if(j.nobrace===!0||!O){$({type:"text",value:w,output:w});continue}let B=")";if(O.dots===!0){const ee=C.slice(),fe=[];for(let Pe=ee.length-1;Pe>=0&&(C.pop(),ee[Pe].type!=="brace");Pe--)ee[Pe].type!=="dots"&&fe.unshift(ee[Pe].value);B=_(fe,j),R.backtrack=!0}if(O.comma!==!0&&O.dots!==!0){const ee=R.output.slice(0,O.outputIndex),fe=R.tokens.slice(O.tokensIndex);O.value=O.output="\\{",w=B="\\}",R.output=ee;for(const Pe of fe)R.output+=Pe.output||Pe.value}$({type:"brace",value:w,output:B}),je("braces"),ae.pop();continue}if(w==="|"){W.length>0&&W[W.length-1].conditions++,$({type:"text",value:w});continue}if(w===","){let O=w;const B=ae[ae.length-1];B&&he[he.length-1]==="braces"&&(B.comma=!0,O="|"),$({type:"comma",value:w,output:O});continue}if(w==="/"){if(N.type==="dot"&&R.index===R.start+1){R.start=R.index+1,R.consumed="",R.output="",C.pop(),N=S;continue}$({type:"slash",value:w,output:Q});continue}if(w==="."){if(R.braces>0&&N.type==="dot"){N.value==="."&&(N.output=k);const O=ae[ae.length-1];N.type="dots",N.output+=w,N.value+=w,O.dots=!0;continue}if(R.braces+R.parens===0&&N.type!=="bos"&&N.type!=="slash"){$({type:"text",value:w,output:k});continue}$({type:"dot",value:w,output:k});continue}if(w==="?"){if(!(N&&N.value==="(")&&j.noextglob!==!0&&q()==="("&&q(2)!=="?"){pe("qmark",w);continue}if(N&&N.type==="paren"){const B=q();let ee=w;(N.value==="("&&!/[!=<:]/.test(B)||B==="<"&&!/<([!=]|\w+>)/.test(_e()))&&(ee=`\\${w}`),$({type:"text",value:w,output:ee});continue}if(j.dot!==!0&&(N.type==="slash"||N.type==="bos")){$({type:"qmark",value:w,output:Z});continue}$({type:"qmark",value:w,output:H});continue}if(w==="!"){if(j.noextglob!==!0&&q()==="("&&(q(2)!=="?"||!/[!=<:]/.test(q(3)))){pe("negate",w);continue}if(j.nonegate!==!0&&R.index===0){ge();continue}}if(w==="+"){if(j.noextglob!==!0&&q()==="("&&q(2)!=="?"){pe("plus",w);continue}if(N&&N.value==="("||j.regex===!1){$({type:"plus",value:w,output:M});continue}if(N&&(N.type==="bracket"||N.type==="paren"||N.type==="brace")||R.parens>0){$({type:"plus",value:w});continue}$({type:"plus",value:M});continue}if(w==="@"){if(j.noextglob!==!0&&q()==="("&&q(2)!=="?"){$({type:"at",extglob:!0,value:w,output:""});continue}$({type:"text",value:w});continue}if(w!=="*"){(w==="$"||w==="^")&&(w=`\\${w}`);const O=f.exec(_e());O&&(w+=O[0],R.index+=O[0].length),$({type:"text",value:w});continue}if(N&&(N.type==="globstar"||N.star===!0)){N.type="star",N.star=!0,N.value+=w,N.output=J,R.backtrack=!0,R.globstar=!0,Re(w);continue}let V=_e();if(j.noextglob!==!0&&/^\([^?]/.test(V)){pe("star",w);continue}if(N.type==="star"){if(j.noglobstar===!0){Re(w);continue}const O=N.prev,B=O.prev,ee=O.type==="slash"||O.type==="bos",fe=B&&(B.type==="star"||B.type==="globstar");if(j.bash===!0&&(!ee||V[0]&&V[0]!=="/")){$({type:"star",value:w,output:""});continue}const Pe=R.braces>0&&(O.type==="comma"||O.type==="brace"),Vn=W.length&&(O.type==="pipe"||O.type==="paren");if(!ee&&O.type!=="paren"&&!Pe&&!Vn){$({type:"star",value:w,output:""});continue}for(;V.slice(0,3)==="/**";){const Zt=b[R.index+4];if(Zt&&Zt!=="/")break;V=V.slice(3),Re("/**",3)}if(O.type==="bos"&&Ne()){N.type="globstar",N.value+=w,N.output=se(j),R.output=N.output,R.globstar=!0,Re(w);continue}if(O.type==="slash"&&O.prev.type!=="bos"&&!fe&&Ne()){R.output=R.output.slice(0,-(O.output+N.output).length),O.output=`(?:${O.output}`,N.type="globstar",N.output=se(j)+(j.strictSlashes?")":"|$)"),N.value+=w,R.globstar=!0,R.output+=O.output+N.output,Re(w);continue}if(O.type==="slash"&&O.prev.type!=="bos"&&V[0]==="/"){const Zt=V[1]!==void 0?"|$":"";R.output=R.output.slice(0,-(O.output+N.output).length),O.output=`(?:${O.output}`,N.type="globstar",N.output=`${se(j)}${Q}|${Q}${Zt})`,N.value+=w,R.output+=O.output+N.output,R.globstar=!0,Re(w+K()),$({type:"slash",value:"/",output:""});continue}if(O.type==="bos"&&V[0]==="/"){N.type="globstar",N.value+=w,N.output=`(?:^|${Q}|${se(j)}${Q})`,R.output=N.output,R.globstar=!0,Re(w+K()),$({type:"slash",value:"/",output:""});continue}R.output=R.output.slice(0,-N.output.length),N.type="globstar",N.output=se(j),N.value+=w,R.output+=N.output,R.globstar=!0,Re(w);continue}const X={type:"star",value:w,output:J};if(j.bash===!0){X.output=".*?",(N.type==="bos"||N.type==="slash")&&(X.output=ie+X.output),$(X);continue}if(N&&(N.type==="bracket"||N.type==="paren")&&j.regex===!0){X.output=w,$(X);continue}(R.index===R.start||N.type==="slash"||N.type==="dot")&&(N.type==="dot"?(R.output+=Y,N.output+=Y):j.dot===!0?(R.output+=G,N.output+=G):(R.output+=ie,N.output+=ie),q()!=="*"&&(R.output+=D,N.output+=D)),$(X)}for(;R.brackets>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing","]"));R.output=l.escapeLast(R.output,"["),je("brackets")}for(;R.parens>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing",")"));R.output=l.escapeLast(R.output,"("),je("parens")}for(;R.braces>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing","}"));R.output=l.escapeLast(R.output,"{"),je("braces")}if(j.strictSlashes!==!0&&(N.type==="star"||N.type==="bracket")&&$({type:"maybe_slash",value:"",output:`${Q}?`}),R.backtrack===!0){R.output="";for(const V of R.tokens)R.output+=V.output!=null?V.output:V.value,V.suffix&&(R.output+=V.suffix)}return R};x.fastpaths=(b,E)=>{const j={...E},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:C,ONE_CHAR:I,DOTS_SLASH:L,NO_DOT:T,NO_DOTS:k,NO_DOTS_SLASH:M,STAR:Q,START_ANCHOR:D}=c.globChars(j.windows),U=j.dot?k:T,F=j.dot?M:T,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}(?:(?!${D}${ie.dot?L: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}${C}${I}${F}${H}`;case"**":return U+Z(j);case"**/*":return`(?:${U}${Z(j)}${C})?${F}${I}${H}`;case"**/*.*":return`(?:${U}${Z(j)}${C})?${F}${H}${S}${I}${H}`;case"**/.*":return`(?:${U}${Z(j)}${C})?${S}${I}${H}`;default:{const z=/^(.*?)\.(\w+)$/.exec(ie);if(!z)return;const J=re(z[1]);return J?J+S+z[2]:void 0}}},le=l.removePrefix(b,G);let se=re(le);return se&&j.strictSlashes!==!0&&(se+=`${C}?`),se},o.exports=x},510:(o,a,i)=>{const c=i(716),l=i(697),u=i(96),p=i(154),f=h=>h&&typeof h=="object"&&!Array.isArray(h),m=(h,_,y=!1)=>{if(Array.isArray(h)){const C=h.map(L=>m(L,_,y));return L=>{for(const T of C){const k=T(L);if(k)return k}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=_||{},E=b.windows,j=x?m.compileRe(h,_):m.makeRe(h,_,!1,!0),v=j.state;delete j.state;let P=()=>!1;if(b.ignore){const C={..._,ignore:null,onMatch:null,onResult:null};P=m(b.ignore,C,y)}const S=(C,I=!1)=>{const{isMatch:L,match:T,output:k}=m.test(C,j,_,{glob:h,posix:E}),M={glob:h,state:v,regex:j,posix:E,input:C,output:k,match:T,isMatch:L};return typeof b.onResult=="function"&&b.onResult(M),L===!1?(M.isMatch=!1,I?M:!1):P(C)?(typeof b.onIgnore=="function"&&b.onIgnore(M),M.isMatch=!1,I?M:!1):(typeof b.onMatch=="function"&&b.onMatch(M),I?M:!0)};return y&&(S.state=v),S};m.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 E=y||{},j=E.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||E.capture===!0)&&(E.matchBase===!0||E.basename===!0?v=m.matchBase(h,_,y,b):v=_.exec(P)),{isMatch:!!v,match:v,output:P}},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,x=!1)=>{if(y===!0)return h.output;const b=_||{},E=b.contains?"":"^",j=b.contains?"":"$";let v=`${E}(?:${h.output})${j}`;h&&h.negated===!0&&(v=`^(?!${v}).*$`);const P=m.toRegex(v,_);return x===!0&&(P.state=h),P},m.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,_)),m.compileRe(b,_,y,x)},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=p,o.exports=m},716:(o,a,i)=>{const c=i(96),{CHAR_ASTERISK:l,CHAR_AT:u,CHAR_BACKWARD_SLASH:p,CHAR_COMMA:f,CHAR_DOT:m,CHAR_EXCLAMATION_MARK:h,CHAR_FORWARD_SLASH:_,CHAR_LEFT_CURLY_BRACE:y,CHAR_LEFT_PARENTHESES:x,CHAR_LEFT_SQUARE_BRACKET:b,CHAR_PLUS:E,CHAR_QUESTION_MARK:j,CHAR_RIGHT_CURLY_BRACE:v,CHAR_RIGHT_PARENTHESES:P,CHAR_RIGHT_SQUARE_BRACKET:S}=i(154),C=T=>T===_||T===p,I=T=>{T.isPrefix!==!0&&(T.depth=T.isGlobstar?1/0:1)},L=(T,k)=>{const M=k||{},Q=T.length-1,D=M.parts===!0||M.scanToEnd===!0,U=[],F=[],Y=[];let G=T,H=-1,Z=0,re=0,le=!1,se=!1,ie=!1,z=!1,J=!1,R=!1,W=!1,ae=!1,he=!1,N=!1,w=0,Ne,q,K={value:"",depth:0,isGlob:!1};const _e=()=>H>=Q,Re=()=>G.charCodeAt(H+1),be=()=>(Ne=q,G.charCodeAt(++H));for(;H<Q;){q=be();let pe;if(q===p){W=K.backslashes=!0,q=be(),q===y&&(R=!0);continue}if(R===!0||q===y){for(w++;_e()!==!0&&(q=be());){if(q===p){W=K.backslashes=!0,be();continue}if(q===y){w++;continue}if(R!==!0&&q===m&&(q=be())===m){if(le=K.isBrace=!0,ie=K.isGlob=!0,N=!0,D===!0)continue;break}if(R!==!0&&q===f){if(le=K.isBrace=!0,ie=K.isGlob=!0,N=!0,D===!0)continue;break}if(q===v&&(w--,w===0)){R=!1,le=K.isBrace=!0,N=!0;break}}if(D===!0)continue;break}if(q===_){if(U.push(H),F.push(K),K={value:"",depth:0,isGlob:!1},N===!0)continue;if(Ne===m&&H===Z+1){Z+=2;continue}re=H+1;continue}if(M.noext!==!0&&(q===E||q===u||q===l||q===j||q===h)===!0&&Re()===x){if(ie=K.isGlob=!0,z=K.isExtglob=!0,N=!0,q===h&&H===Z&&(he=!0),D===!0){for(;_e()!==!0&&(q=be());){if(q===p){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,D===!0)continue;break}if(q===j){if(ie=K.isGlob=!0,N=!0,D===!0)continue;break}if(q===b){for(;_e()!==!0&&(pe=be());){if(pe===p){W=K.backslashes=!0,be();continue}if(pe===S){se=K.isBracket=!0,ie=K.isGlob=!0,N=!0;break}}if(D===!0)continue;break}if(M.nonegate!==!0&&q===h&&H===Z){ae=K.negated=!0,Z++;continue}if(M.noparen!==!0&&q===x){if(ie=K.isGlob=!0,D===!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,D===!0)continue;break}}M.noext===!0&&(z=!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&&C(ge.charCodeAt(ge.length-1))&&(ge=ge.slice(0,-1)),M.unescape===!0&&(je&&(je=c.removeBackslashes(je)),ge&&W===!0&&(ge=c.removeBackslashes(ge)));const $={prefix:Ae,input:T,start:Z,base:ge,glob:je,isBrace:le,isBracket:se,isGlob:ie,isExtglob:z,isGlobstar:J,negated:ae,negatedExtglob:he};if(M.tokens===!0&&($.maxDepth=0,C(q)||F.push(K),$.tokens=F),M.parts===!0||M.tokens===!0){let pe;for(let ye=0;ye<U.length;ye++){const V=pe?pe+1:Z,X=U[ye],O=T.slice(V,X);M.tokens&&(ye===0&&Z!==0?(F[ye].isPrefix=!0,F[ye].value=Ae):F[ye].value=O,I(F[ye]),$.maxDepth+=F[ye].depth),(ye!==0||O!=="")&&Y.push(O),pe=X}if(pe&&pe+1<T.length){const ye=T.slice(pe+1);Y.push(ye),M.tokens&&(F[F.length-1].value=ye,I(F[F.length-1]),$.maxDepth+=F[F.length-1].depth)}$.slashes=U,$.parts=Y}return $};o.exports=L},96:(o,a,i)=>{const{REGEX_BACKSLASH:c,REGEX_REMOVE_BACKSLASH:l,REGEX_SPECIAL_CHARS:u,REGEX_SPECIAL_CHARS_GLOBAL:p}=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(p,"\\$1"),a.toPosixSlashes=f=>f.replace(c,"/"),a.removeBackslashes=f=>f.replace(l,m=>m==="\\"?"":m),a.escapeLast=(f,m,h)=>{const _=f.lastIndexOf(m,h);return _===-1?f:f[_-1]==="\\"?a.escapeLast(f,m,_-1):`${f.slice(0,_)}\\${f.slice(_)}`},a.removePrefix=(f,m={})=>{let h=f;return h.startsWith("./")&&(h=h.slice(2),m.prefix="./"),h},a.wrapOutput=(f,m={},h={})=>{const _=h.contains?"":"^",y=h.contains?"":"$";let x=`${_}(?:${f})${y}`;return m.negated===!0&&(x=`(?:^(?!${x}).*$)`),x},a.basename=(f,{windows:m}={})=>{const h=f.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 s=r(170);wr.exports=s})()),wr.exports}var Go;function Yh(){return Go||(Go=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 r=Eu();function s(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=>s(l,c))}}(Rr)),Rr}var Ar={},Ko;function Qh(){return Ko||(Ko=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 r=Eu();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,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=>s(l,c))}}(Ar)),Ar}var Xo;function Pu(){return Xo||(Xo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return s}});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 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:m}=Yh();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}=Qh();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 p=l||((u=a.qualities)==null?void 0:u.reduce((f,m)=>Math.abs(m-t)<Math.abs(f-t)?m:f))||t;return a.path+"?url="+encodeURIComponent(i)+"&w="+c+"&q="+p+(process.env.NEXT_DEPLOYMENT_ID?"&dpl="+process.env.NEXT_DEPLOYMENT_ID:"")}r.__next_img_default=!0;const s=r}(Ir)),Ir}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return j}});const r=Le,s=At,o=n,a=s._(g),i=r._(rs),c=r._(Kh()),l=Os,u=Bn,p=Xh(),f=Fn,m=jc(),h=r._(Pu()),_=process.env.__NEXT_IMAGE_OPTS;typeof window>"u"&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);function y(v,P,S,C,I,L,T){const k=v==null?void 0:v.src;if(!v||v["data-loaded-src"]===k)return;v["data-loaded-src"]=k,("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 D=!1,U=!1;S.current({...Q,nativeEvent:Q,currentTarget:v,target:v,isDefaultPrevented:()=>D,isPropagationStopped:()=>U,persist:()=>{},preventDefault:()=>{D=!0,Q.preventDefault()},stopPropagation:()=>{U=!0,Q.stopPropagation()}})}if(C!=null&&C.current&&C.current(v),process.env.NODE_ENV!=="production"){const Q=new URL(k,"http://n").searchParams.get("url")||k;if(v.getAttribute("data-nimg")==="fill"){if(!L&&(!T||T==="100vw")&&v.getBoundingClientRect().width/window.innerWidth<.6&&(T==="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 D=v.height.toString()!==v.getAttribute("height"),U=v.width.toString()!==v.getAttribute("width");(D&&!U||!D&&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:C,sizes:I,height:L,width:T,decoding:k,className:M,style:Q,fetchPriority:D,placeholder:U,loading:F,unoptimized:Y,fill:G,onLoadRef:H,onLoadingCompleteRef:Z,setBlurComplete:re,setShowAltText:le,sizesInput:se,onLoad:ie,onError:z,...J}=v;return(0,o.jsx)("img",{...J,...x(D),loading:F,width:T,height:L,decoding:k,"data-nimg":G?"fill":"1",className:M,style:Q,sizes:I,srcSet:C,src:S,ref:(0,a.useCallback)(R=>{P&&(typeof P=="function"?P(R):typeof P=="object"&&(P.current=R)),R&&(z&&(R.src=R.src),process.env.NODE_ENV!=="production"&&(S||console.error('Image is missing required "src" property:',R),R.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.')),R.complete&&y(R,U,H,Z,re,Y,se))},[S,U,H,Z,re,z,Y,se,P]),onLoad:R=>{const W=R.currentTarget;y(W,U,H,Z,re,Y,se)},onError:R=>{le(!0),U!=="empty"&&re(!0),z&&z(R)}})});function E(v){let{isAppRouter:P,imgAttributes:S}=v;const C={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,C),null):(0,o.jsx)(c.default,{children:(0,o.jsx)("link",{rel:"preload",href:S.srcSet?void 0:S.src,...C},"__nimg-"+S.src+S.srcSet+S.sizes)})}const j=(0,a.forwardRef)((v,P)=>{const C=!(0,a.useContext)(m.RouterContext),I=(0,a.useContext)(p.ImageConfigContext),L=(0,a.useMemo)(()=>{var Z;const re=_||I||u.imageConfigDefault,le=[...re.deviceSizes,...re.imageSizes].sort((z,J)=>z-J),se=re.deviceSizes.sort((z,J)=>z-J),ie=(Z=re.qualities)==null?void 0:Z.sort((z,J)=>z-J);return{...re,allSizes:le,deviceSizes:se,qualities:ie}},[I]),{onLoad:T,onLoadingComplete:k}=v,M=(0,a.useRef)(T);(0,a.useEffect)(()=>{M.current=T},[T]);const Q=(0,a.useRef)(k);(0,a.useEffect)(()=>{Q.current=k},[k]);const[D,U]=(0,a.useState)(!1),[F,Y]=(0,a.useState)(!1),{props:G,meta:H}=(0,l.getImgProps)(v,{defaultLoader:h.default,imgConf:L,blurComplete:D,showAltText:F});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(b,{...G,unoptimized:H.unoptimized,placeholder:H.placeholder,fill:H.fill,onLoadRef:M,onLoadingCompleteRef:Q,setBlurComplete:U,setShowAltText:Y,sizesInput:v.sizes,ref:P}),H.priority?(0,o.jsx)(E,{isAppRouter:C,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)})(Xr,Xr.exports);var Zh=Xr.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var p in u)Object.defineProperty(l,p,{enumerable:!0,get:u[p]})}t(e,{default:function(){return c},getImageProps:function(){return i}});const r=Le,s=Os,o=Zh,a=r._(Pu());function i(l){const{props:u}=(0,s.getImgProps)(l,{defaultLoader:a.default,imgConf:process.env.__NEXT_IMAGE_OPTS});for(const[p,f]of Object.entries(u))f===void 0&&delete u[p];return{props:u}}const c=o.Image})(ju);var Jh=ju;const Cn=A.getDefaultExportFromCjs(Jh),e_=({item:e,CONSTANTS:t})=>{const r=e.icon?t.PAYMENT_FLAGS.includes(e.icon)?"payment":"social":null,s=r==="payment"?t.PAYMENT_FLAGS_DICTIONARY[e.icon]:e.icon;return e.link?n.jsxs(De,{href:e.link,target:"_blank",rel:"noopener noreferrer",className:de["support-item"],children:[e.image&&n.jsx("img",{src:e.image,alt:"",loading:"lazy"}),r==="payment"?n.jsx(Cn,{alt:s,src:`/assets/${s}.svg`,width:20,height:20}):n.jsx(d.Icon,{size:"small",name:s})]}):n.jsxs("div",{className:de["support-item"],children:[e.image&&n.jsx("img",{src:e.image,alt:"",loading:"lazy"}),r==="payment"?n.jsx(Cn,{alt:s,src:`/assets/${s}.svg`,width:20,height:20}):n.jsx(d.Icon,{size:"small",name:s})]})},t_=({content:e,CONSTANTS:t})=>n.jsx("div",{className:de["support-container"],children:e==null?void 0:e.map((r,s)=>n.jsxs("div",{"data-device":r.device,className:de["support-section"],children:[n.jsxs("div",{className:de["support-text"],children:[r.title&&n.jsx("h3",{children:r.title}),r.description&&n.jsx("p",{children:r.description})]}),Array.isArray(r.items)&&r.items.length&&n.jsx("div",{className:de["support-items"],"data-gap":r.gap,children:r.items.map((o,a)=>n.jsx(e_,{item:o,CONSTANTS:t},`footer-support-item-${a}`))})]},`footer-support-${s}`))}),n_=({name:e,nameIcon:t,maxWidth:r,rowAlignContent:s,columnAlignContent:o,columnAlignItems:a,textAlignContent:i,textAlignItems:c,children:l})=>n.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:s,alignItems:s},columnWrapper:{alignContent:o,alignItems:a}},children:n.jsxs(d.TextStructure.DivWrapper,{alignContent:i,alignItems:c,className:de.footer__column,children:[n.jsxs("div",{className:t?de.footer__columnTitleIcon:de.footer__columnTitle,children:[n.jsx(d.Icon,{name:`${t}`,size:"small"}),e&&n.jsx("div",{children:e})]}),n.jsx("div",{className:de.footer__columnContent,style:{maxWidth:`${r}px`},children:l})]})}),r_=({name:e,nameIcon:t,maxWidth:r,children:s,ICONS:o,...a})=>n.jsxs(d.Accordion.Wrapper,{className:de.accordionWrapper,title:"accordion-wrapper",...a,children:[n.jsx(d.Accordion.Header,{id:(a==null?void 0:a.id)??"",className:de.accordionHeader,closeIndicator:n.jsx(d.Icon,{name:o.arrow_up,size:"medium"}),openIndicator:n.jsx(d.Icon,{name:o.arrow_down,size:"medium"}),title:"accordion-header",children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{className:t?de.accordionTextWrapper:"",children:[n.jsx(d.Icon,{name:`${t}`,size:"medium"}),n.jsx("h2",{className:"typography-style-body-md",children:e})]})})}),n.jsx(d.Accordion.Body,{title:"accordion-body",children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:de.footer__columnContent,style:{maxWidth:`${r}px`},children:s})})})]}),Tr=e=>{const{isMobile:t}=ne();return t?n.jsx(r_,{...e}):n.jsx(n_,{...e})},fn=({type:e,children:t,className:r,collumnName:s,collumnNameIcon:o,icons:a,iconLink:i,iconSize:c,link:l,paymentDisclaimer:u,paymentTitle:p,rowAlignContent:f,columnAlignContent:m,columnAlignItems:h,textAlignContent:_,textAlignItems:y,...x})=>{let b;const{handleSelectContent:E}=oe(),{nextimage:j}=ce();switch(e){case"menu":b=n.jsx(De,{className:de.footer__itemLink,href:l??"#",prefetch:!1,children:n.jsx("span",{onClick:()=>{E({content:`footer:${s}:${t}`})},children:t})});break;case"payment":b=n.jsxs("div",{className:d.helpers.classNameConcat(de.payment,de.footer__itemSmallText),...x,children:[u,n.jsxs("div",{className:d.helpers.classNameConcat(de.footer__iconContainer,de.footer__iconListSubHeader),children:[p,n.jsx("div",{className:de.footer__iconList,children:a==null?void 0:a.map((v,P)=>n.jsx(j,{alt:v,src:`/assets/${v}.svg`,width:c??20,height:c??20},P))})]})]});break;case"social-media":b=n.jsx("div",{className:de.footer__iconContainer,...x,children:n.jsx("div",{className:de.footer__iconList,children:i==null?void 0:i.map((v,P)=>n.jsx(De,{prefetch:!1,href:v.link??"#",target:"_blank",children:n.jsx(d.Icon,{size:"medium",name:v.icon,onClick:()=>E({content:`footer:redes-sociais:${v.icon}`})})},P))})});break;default:b=n.jsx("div",{className:r,...x,children:t})}return n.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:f,alignItems:f},columnWrapper:{alignContent:m,alignItems:h}},...x,children:n.jsx(d.TextStructure.DivWrapper,{alignContent:_,alignItems:y,className:d.helpers.classNameConcat(de.footer__item,r),children:b})})},s_=({className:e,text:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat(de.footer__legalInformation,e),children:n.jsx("span",{children:t})}),Nu=()=>{const{nextimage:e}=ce();return n.jsx("div",{className:de["footer--stamps"],children:n.jsx(e,{alt:"Empresa B",className:de["footer--stamps--company"],src:"/images/Footer/new_certfB.png",width:56,height:64})})};Nu.displayName="Footer.Stamps";const Iu=({children:e,legalTextSlot:t,adornment:r,className:s,...o})=>{const{isMobile:a}=ne(),i=g.Children.toArray(e).filter(Boolean),c=i.length;return n.jsxs("div",{className:de.footer__main,children:[(r==null?void 0:r.top)&&n.jsx("div",{className:de.footer__top,children:r==null?void 0:r.top}),c>0&&n.jsx("div",{...o,className:d.helpers.classNameConcat(de.footer__wrapper,s),children:i.map((l,u)=>n.jsx("div",{style:{flexGrow:1,maxWidth:`calc(100% / ${a?1:"fit-content"})`},children:l},u))}),(r==null?void 0:r.bottom)&&n.jsx("div",{className:de.footer__bottom,children:r.bottom}),t&&n.jsx("div",{className:de.footer__legalText,children:t})]})};Iu.displayName="Footer.Wrapper";const Ru=({data:{links:{links:e}},payments:t,socialInfo:r,socialMedias:s,adornment:o,LEGAL_INFORMATION_TEXT:a,ICONS:i,className:c,hasFooterStamps:l=!0})=>{var u;return n.jsxs(Iu,{className:c,adornment:o,legalTextSlot:n.jsx(s_,{text:a}),children:[Array.isArray(e.column)&&e.column.map((p,f)=>n.jsx(Tr,{id:`${f}column-menu`,name:p.name,nameIcon:p.nameIcon,ICONS:i,children:p.items.map((m,h)=>n.jsx(fn,{type:"menu",link:m.link,collumnName:p.name,collumnNameIcon:p.nameIcon,children:m.text},h))},f)),t&&((u=t.acceptedFlags)==null?void 0:u.length)>0&&n.jsx(Tr,{id:"payment-column",name:t==null?void 0:t.title,nameIcon:t==null?void 0:t.titleIcon,maxWidth:150,ICONS:i,children:n.jsx(fn,{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})}),n.jsxs(Tr,{id:"social-media-column",name:r==null?void 0:r.title,ICONS:i,children:[r!=null&&r.subTitle?n.jsx(fn,{children:r==null?void 0:r.subTitle}):null,n.jsx(fn,{type:"social-media",iconSize:24,iconLink:s}),l&&n.jsx(Nu,{})]})]})};Ru.displayName="Footer";const o_=Object.freeze(Object.defineProperty({__proto__:null,Footer:Ru,FooterSupport:t_},Symbol.toStringTag,{value:"Module"})),a_=()=>{const{colorName:e}=ke();return n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:e.length===0?"":A.styles["accessibility-info"],children:n.jsx("p",{children:e})})})},Un=({className:e,titleId:t})=>{var o,a,i;const{productName:r,tag:s}=ke();return n.jsxs("div",{className:d.helpers.classNameConcat(A.styles.header,e),children:[s!=null&&s.commercial?n.jsx(d.Tag,{size:"small",title:(o=s.commercial)==null?void 0:o.value,variant:"quaternary",adornment:{start:(a=s.commercial)!=null&&a.icon?n.jsx(d.Icon,{name:s.commercial.icon}):null},children:(i=s.commercial)==null?void 0:i.value}):null,n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h1",{id:t,children:r})})})]})};Un.displayName="PDP.PDPHeader";const Ms=({layout:e="horizontal"})=>{const{price:t,listPrice:r,installments:s}=ke(),{count:o,value:a}=s,i=A.formatPriceToCurrency(r??0,!0),c=A.formatPriceToCurrency(t??0,!0),l=A.formatPriceToCurrency(a??0);return n.jsx(d.ProductInfo.Root,{size:"small",layout:e,children:n.jsxs(d.ProductInfo.Wrapper,{layout:e,size:"small",className:A.styles["price-wrapper"],children:[n.jsx(d.ProductInfo.ValuesWrapper,{children:t!==r?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:i.toString(),size:"small"}),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:c.toString(),size:"small"})]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:c.toString(),size:"small"})}),o&&o>1&&a?n.jsx(d.ProductInfo.Price,{label:"installment",value:`ou ${o}x ${l}`,size:"small"}):null]})})},Yr=({onAddCallBack:e,onDisabledClickCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s})=>{const o=Gt(),{productId:a,productData:i,price:c,listPrice:l,thumbImage:u,isKit:p}=ke(),{isMobile:f}=ne(),{addToCart:m}=ve(),{sendDataLayerEvent:h}=oe(),_=!p&&(!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 n.jsx(d.Button,{className:A.styles["add-to-cart"],size:f?(r==null?void 0:r.mobile)??"large":(r==null?void 0:r.desktop)??"x-large",onClick:y,children:o.sku&&o.available?`${s.add_to_cart}`:`${s.select_size}`})},i_=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t})=>{const{isMobile:r}=ne(),s=Gt(),{sizesContainerRef:o}=da(),{structureRef:a}=Ee();return s.sku&&s.available?n.jsx(Yr,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t}):n.jsx(d.Button,{className:A.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:s.sku&&s.available?t.add_to_cart:t.select_size})},hn=({value:e,label:t,suppressHydrationWarning:r=!1},s)=>{const o={value:e,...r&&{suppressHydrationWarning:!0}},a=s==="compact"?o:{...o,label:t};return n.jsx(d.Timer.Digit,{...a})},Sn=({dateEnd:e,dateInit:t,type:r="default",TIME_ZONE:s,...o})=>{const[a,i]=g.useState(Gi(new Dr.TZDate(Date.now(),s),new Dr.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 n.jsx(n.Fragment,{});const u=zt(a,"days"),p=zt(a,"hours"),f=zt(a,"minutes"),m=zt(a);return n.jsxs(d.Timer.Root,{...o,children:[u?n.jsxs(n.Fragment,{children:[hn({value:u,label:"dias"},r),n.jsx(d.Timer.Separator,{})]}):null,hn({value:p,label:"horas"},r),n.jsx(d.Timer.Separator,{}),hn({value:f,label:"min"},r),n.jsx(d.Timer.Separator,{}),hn({value:m,label:"segs",suppressHydrationWarning:!0},r)]})},Ds=({TIME_ZONE:e})=>{const{tag:t}=ke(),r=t==null?void 0:t.flagGoldenPdp,s=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?n.jsxs("div",{className:A.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"&&n.jsx("div",{className:A.styles["golden-tag-video"],children:n.jsx(Ie.Video,{src:s,autoPlay:!0,muted:!0,loop:!0,playsInline:!0})}),n.jsxs("div",{className:A.styles["golden-tag-content"],children:[n.jsx("span",{className:A.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)&&n.jsx(Sn,{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};Ds.displayName="PDP.GoldenTag";const c_=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t,TIME_ZONE:r,Z_INDEX_WAR:s})=>{const{isMobile:o}=ne();return o?n.jsxs(d.Card,{className:A.styles["bottom-navigation"],shadow:!0,style:{zIndex:s.pdp_bottom_navigation},children:[n.jsxs("div",{className:A.styles["bottom-navigation__header"],children:[n.jsx(Ds,{TIME_ZONE:r}),n.jsxs("div",{className:A.styles["bottom-navigation__header-content"],children:[n.jsx(Un,{}),n.jsx(Ms,{layout:"name-vertical"})]})]}),n.jsx(i_,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t})]}):null},l_=({children:e,setShowBottomNavigation:t})=>{const r=g.useRef(null),s=os(r),o=g.useRef(s);return g.useEffect(()=>{var i;const{top:a}=((i=r.current)==null?void 0:i.getBoundingClientRect())??{top:0};o.current!==s&&a>0&&(t(!s),o.current=s)},[s]),n.jsx("div",{ref:r,style:{width:"100%"},children:e})},u_=({ICONS:e})=>{const{isMobile:t}=ne(),{price:r,listPrice:s,productData:o,productId:a}=ke(),{sendDataLayerEvent:i}=oe(),c=Lt(),{toggleProduct:l}=vt();return n.jsx(d.Button,{adornment:{start:n.jsx(d.Icon,{name:e[c.includes(a)?"favorite_true":"favorite_false"],size:"medium"})},className:A.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:s}}})}})},wu=({showWishlist:e=!0,callBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s,ICONS:o,TIME_ZONE:a,Z_INDEX_WAR:i})=>{const{isMobile:c}=ne(),[l,u]=g.useState(!0);return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:A.styles.actions,children:[c?n.jsx(l_,{setShowBottomNavigation:u,children:n.jsx(Yr,{onAddCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s})}):n.jsx(Yr,{onAddCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s}),e&&n.jsx(u_,{ICONS:o})]}),c&&l&&n.jsx(c_,{addToCartBtnSize:r,BUY_BUTTON_LABELS:s,Z_INDEX_WAR:i,TIME_ZONE:a})]})},Au=({className:e,device:t,ICONS:r})=>{const{breadcrumbList:s,productName:o}=ke(),a=i=>i.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return n.jsx(d.BreadCrumb.DivWrapper,{className:d.helpers.classNameConcat(A.styles.breadcrumb,[t==="mobile"?A.styles["breadcrumbs-mobile"]:A.styles["breadcrumbs-desktop"],e]),children:n.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 n.jsx(d.BreadCrumb.Item,{adornment:{end:n.jsx(d.Icon,{name:r.arrow_right})},role:"listitem",children:n.jsx(De,{href:`/${l}`,children:i})},`pdp-breadcrumb-${l}-${c}`)}),n.jsx(d.BreadCrumb.Item,{role:"listitem",className:d.helpers.classNameConcat(A.styles["breadcrumb--active"],e),children:o},"pdp-breadcrumb-productName")]})})};Au.displayName="PDP.BreadCrumb";const Tu=({className:e})=>{var s;const{tag:t}=ke(),r=t==null?void 0:t.flagPdp;return r&&((s=r==null?void 0:r.value)!=null&&s.length)?n.jsx(d.Tag,{className:d.helpers.classNameConcat(A.styles.credits,e),variant:"tertiary",title:r==null?void 0:r.value,size:"small",adornment:{start:r!=null&&r.enableIcon&&(r!=null&&r.icon)?n.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}):n.jsx(n.Fragment,{})};Tu.displayName="PDPCredits";const d_=()=>{const{descriptionContent:e,productReference:t}=ke(),[r,s]=g.useState("description");return n.jsxs(d.Tabs.Root,{className:A.styles["tabs-root-modifier"],children:[n.jsx(d.Tabs.TabList,{className:A.styles["tabs-list-modifier"],children:e==null?void 0:e.map(({label:o,value:a})=>n.jsx(d.Tabs.Item,{label:o,value:a,activeTab:r,onTabChange:s,size:"large",className:`${A.styles["tabs-item-modifier"]} ${r===a?A.styles["tabs-item-active"]:""}`},a))}),n.jsxs("div",{className:A.styles["content-wrapper"],children:[r==="description"?n.jsx("div",{children:n.jsxs("span",{className:A.styles.productref,children:["Ref:",t]})}):"",e==null?void 0:e.map(({value:o,content:a})=>r===o?n.jsx(d.Tabs.Panel,{className:`${A.styles["tabs-panel"]} ${r===o?A.styles["tabs-panel-enter"]:A.styles["tabs-panel-exit"]}`,children:n.jsx("div",{className:A.styles.content,dangerouslySetInnerHTML:{__html:a}})},o):null)]})]})},p_=({CURRENCY:e,DELIVERY_INFO_BOXES_ALLOWED:t,FREIGHT_CALCULATION:r,Z_INDEX_WAR:s})=>{const o=Gt(),{isMobile:a}=ne();return n.jsxs(n.Fragment,{children:[a?n.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null,n.jsx(Ql,{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:s.modal,currency:e}}),a?n.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null]})},Yo=({image:e,index:t,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:s})=>{const o=A.resizingImg(e.imageUrl,s.pdp),{nextimage:a}=ce();return n.jsx(a,{src:o,alt:e.imageLabel,objectFit:"contain",...s.pdp,...t<=1&&{priority:!0,loading:"eager"},onClick:()=>{r(t)}},t)},m_=({video:e,productName:t,poster:r})=>{const{sendDataLayerEvent:s}=oe(),o=g.useRef(!1);return n.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:r})},Lu=({images:e,video:t,handleZoom:r,productName:s,PRODUCT_IMAGE_DIMENSIONS:o})=>{var u,p;const{initialize:a,pagination:i,controller:c,itemsStyles:l}=d.Carousel.useCarousel({gap:0,itemsPerPage:1,loop:!1,direction:"row"});return n.jsxs(d.Carousel.Root,{innerRef:f=>{a(f)},className:A.styles["gallery-carousel-modifier"],children:[n.jsx(d.Carousel.Controller,{position:"absolute",top:"24px",bottom:"unset",left:"16px",children:n.jsx(d.Carousel.Bullets,{page:i.currentPage,total:e.length,onBulletClick:f=>c==null?void 0:c.navigateTo(f)})}),n.jsxs(d.Carousel.Body,{children:[n.jsx(d.Carousel.Item,{style:l,children:n.jsx(Yo,{image:e[0],index:0,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:o})},"PDP_gallery_0"),t&&n.jsx(d.Carousel.Item,{style:l,children:n.jsx(m_,{video:t,productName:s,...((u=e[1])==null?void 0:u.imageUrl)&&{poster:(p=e[1])==null?void 0:p.imageUrl}})},"PDP_gallery_video"),e.map((f,m)=>m===0?null:n.jsx(d.Carousel.Item,{style:l,children:n.jsx(Yo,{image:f,index:m,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:o})},`PDP_gallery_${m}`))]})]})};Lu.displayName="PDP.Carousel";const f_="_thumbs_1fbzz_65",h_="_selected_1fbzz_93",__="_carousel_1fbzz_162",g_="_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:f_,selected:h_,"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:__,"carousel-controller":"_carousel-controller_1fbzz_167","arrow-left":"_arrow-left_1fbzz_177","arrow-right":"_arrow-right_1fbzz_178",bullets:g_,"zoom-popup":"_zoom-popup_1fbzz_210","image-zoom--mobile":"_image-zoom--mobile_1fbzz_250","image-zoom--image--img":"_image-zoom--image--img_1fbzz_280"},Qo=({onClose:e,ICONS:t})=>n.jsx("div",{className:`${Se["button-close-container"]}`,children:n.jsx(d.Button,{iconNameStart:t.close,iconSize:"medium",className:`${Se["button-close"]}`,variant:"tertiary",state:"default",size:"medium",onClick:e,style:{textDecoration:"none"}})}),y_=({children:e,Z_INDEX_WAR:t,...r})=>n.jsx("div",{...r,className:Se["image-zoom-wrapper-desktop"],style:{zIndex:t.pdp_image_zoom},children:e}),ku=({images:e,setCurrent:t,setFirstImgLoaded:r,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o})=>{const{nextimage:a}=ce();let i=null;const c=g.useRef(null),{initialize:l,controller:u,pagination:p,itemsStyles:f}=d.Carousel.useCarousel({itemsPerPage:1,gap:10,loop:!1,direction:"row"}),m=_=>{u==null||u.navigateTo(_)},h=()=>{r(!0)};return g.useEffect(()=>{t(p.currentPage)},[p.currentPage,t]),n.jsxs(d.Carousel.Root,{innerRef:_=>{_&&!i&&(i=_,l(i))},className:Se.carousel,children:[n.jsxs(d.Carousel.Controller,{className:Se["carousel-controller"],children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.prevPage(),className:Se["arrow-left"],adornment:{start:n.jsx(d.Icon,{name:s.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.nextPage(),className:Se["arrow-right"],adornment:{start:n.jsx(d.Icon,{name:s.arrow_right})}})]}),n.jsx(d.Carousel.Body,{children:Array.isArray(e)&&e.map((_,y)=>n.jsx(d.Carousel.Item,{style:f,children:n.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))}),n.jsx(d.Carousel.Bullets,{className:Se.bullets,page:p.currentPage,total:p.totalPages,onBulletClick:m})]})};ku.displayName="ImageZoom.Mobile.Carousel";const Ou=({imgRef:e,image:t,PRODUCT_IMAGE_DIMENSIONS:r})=>{xa();const{nextimage:s}=ce();return n.jsx("div",{className:Se["image-zoom--image"],ref:e,children:n.jsx(s,{...r.image_zoom.mobile,alt:t.imageText,className:Se["image-zoom--image--img"],quality:100,src:t.imageUrl})})};Ou.displayName="ImageZoom.ImageZoom";const Mu=({loaded:e=!1})=>n.jsx("div",{className:Se["zoom-popup"],"data-loaded":e,children:n.jsxs("svg",{width:"38",height:"39",viewBox:"0 0 38 39",xmlns:"http://www.w3.org/2000/svg",children:[n.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"}),n.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"}),n.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"})]})});Mu.displayName="ImageZoom.ZoomPopup";const Du=({images:e,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:r,...s})=>{const[o,a]=g.useState(!1),[i,c]=g.useState(0),{containerRef:l,imgRef:u,scale:p}=va({defaultScale:1,maxScale:3});return n.jsxs("div",{...s,className:Se["image-mobile"],"data-disable-carrousel-pan":p>1,children:[n.jsx(Mu,{loaded:o}),n.jsx(ku,{images:e,setCurrent:c,setFirstImgLoaded:a,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:r}),n.jsx("div",{className:Se["image-zoom--mobile"],ref:l,children:n.jsx(Ou,{imgRef:u,image:e[i],PRODUCT_IMAGE_DIMENSIONS:r})})]})};Du.displayName="ImageZoom.ImageMobile";const x_=({children:e,Z_INDEX_WAR:t,...r})=>n.jsx("div",{...r,className:Se["image-zoom-wrapper-mobile"],style:{zIndex:t.pdp_image_zoom},children:e}),v_="_modal_1u87b_1",et={modal:v_,"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 b_({headerTitle:e,isMobile:t,ICONS:r}){return n.jsx(d.Modal.Header,{navigation:"top",className:et["modal-header"],children:n.jsxs(d.Modal.Controls,{navigation:"top",isMobile:t,children:[n.jsx("div",{className:et["modal-header__title"],children:n.jsx(d.Modal.Title,{navigation:"top",className:et["quick-shop__title"],title:e})}),n.jsx(d.Button,{className:et["modal-header__close-button"],"data-close":!0,iconNameStart:r.close,size:"small",variant:"tertiary"})]})})}const zu=({PDP_INFO:e,PLP_SIZE_ORDER:t,ICONS:r,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:i})=>{const{sizes:c,productId:l,handleViewItemEvent:u}=ke(),p=g.useMemo(()=>c!=null&&c.length?zc({items:c,getLabel:v=>v.value,PLP_SIZE_ORDER:t}):[],[c]),{sizesContainerRef:f}=da(),{isMobile:m}=ne(),h=Gt(),_=ni(),{setValue:y}=Ja(),{setValue:x}=ds(),b=g.useRef({}),[E,j]=g.useState(null);return n.jsxs("div",{ref:f,className:d.helpers.classNameConcat(A.styles.sizes,"PDP_sizes"),children:[n.jsx("span",{className:A.styles["sections-title"],children:e.product.size_title}),n.jsx("div",{children:p.map(v=>(!v.available&&!b.current[v.value]&&(b.current[v.value]={disable:!v.available,size:v.value,skuID:v.sku}),n.jsxs(d.ToggleSize.Wrapper,{size:m?"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:[n.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),n.jsx(d.ToggleSize.Text,{children:v==null?void 0:v.value})]},`sizes-${v.sku}-${v.value}`)))}),n.jsx(Cs,{open:_,setVisible:x,sku:E,setSku:j,skus:Object.values(b.current),ICONS:r,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:i})]})},$t=({children:e,className:t,type:r})=>n.jsx("div",{className:d.helpers.classNameConcat(A.styles["pdp-main__info-subsection"],[A.styles[`subsection-${r}`],t]),children:e}),$u=({children:e,className:t})=>{const{structureRef:r,tipbarRef:s}=Ee(),o=g.useMemo(()=>{var c,l;const a=((c=r.current)==null?void 0:c.clientHeight)||0,i=((l=s.current)==null?void 0:l.clientHeight)||0;return a+i},[r,s]);return n.jsx("div",{className:d.helpers.classNameConcat(A.styles["pdp-main__info"],t),id:"pdpmaininfo",style:{top:o},children:e})},j_=({children:e,link:t,TOGGLE_STYLE_MODIFIER:r})=>{const{isMobile:s}=ne(),{router:o}=ce(),a=()=>{t&&o.push(t)},i=g.useRef(null);return n.jsx(d.ToggleStyle.Wrapper,{size:s?"medium":"small",style:{...r,border:`${i.current===t?"2":"1"}`,overflow:"hidden",padding:"0"},onClick:a,active:i.current===t,children:e})},Fu=({productId:e,similars:t,TOGGLE_STYLE_MODIFIER:r})=>{const{thumbImage:s}=ke(),o=[{productId:e,slug:"",textureImage:(s==null?void 0:s.imageUrl)??"",textureAlt:(s==null?void 0:s.imageText)??""},...t];return n.jsx("div",{children:o.map((a,i)=>a.textureImage?n.jsxs(j_,{link:a.slug?a.slug:null,TOGGLE_STYLE_MODIFIER:r,children:[n.jsx(d.ToggleStyle.DisabledAdornment,{}),n.jsx(d.ToggleStyle.Texture,{children:n.jsx(Ie.Image,{alt:a.textureAlt,src:a.textureImage,height:34,width:34,style:{borderRadius:0,height:"100%"}})})]},`similars-item-${i}`):null)})},Bu=({TEXTURE_IMAGE:e,TOGGLE_STYLE_MODIFIER:t})=>{const{productId:r}=ke(),[s,o]=g.useState([]);return g.useEffect(()=>{fetch("/api/catalog/product/similars",{method:"POST",body:JSON.stringify({productId:r,filterTexture:e})}).then(a=>a.json()).then(({data:a})=>{Array.isArray(a)&&a.length===0||o(a)}).catch(a=>{console.error(a)})},[r]),n.jsxs("div",{className:A.styles.similars,children:[n.jsx("span",{className:A.styles["sections-title"],children:"Cor"}),n.jsx(Fu,{productId:r,similars:s,TOGGLE_STYLE_MODIFIER:t})]})};Bu.displayName="PDP.Info.Similars";const C_=({callBackProductAdded:e,BUY_BUTTON_LABELS:t,ICONS:r,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:p,Z_INDEX_WAR:f})=>n.jsx(d.Modal.Body,{className:et["modal-product-body"],children:n.jsxs($u,{className:et["pdp-main__info-modifier"],children:[n.jsxs($t,{type:"product-info",children:[n.jsx(Un,{}),n.jsx(Ms,{})]}),n.jsx($t,{type:"similars",children:n.jsx(Bu,{TEXTURE_IMAGE:l,TOGGLE_STYLE_MODIFIER:p})}),n.jsx($t,{type:"sizes",children:n.jsx(zu,{ICONS:r,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PDP_INFO:a,PLP_SIZE_ORDER:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:f})}),n.jsx($t,{type:"actions",children:n.jsx(wu,{showWishlist:!1,callBack:e,addToCartBtnSize:{mobile:"medium",desktop:"large"},BUY_BUTTON_LABELS:t,ICONS:r,TIME_ZONE:u,Z_INDEX_WAR:f})})]})});function S_({callBackProductAdded:e,QUICKSHOP:t,ICONS:r,...s}){const[o,a]=g.useState(!1),i=()=>a(c=>!c);return n.jsxs("div",{className:et["quick-shop"],children:[n.jsx(d.Button,{onClick:i,size:"x-large",className:et["shop-bag"],iconNameStart:r.bag,iconSize:"medium"}),n.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:[n.jsx(b_,{headerTitle:t.title,ICONS:r}),n.jsx(C_,{callBackProductAdded:e,ICONS:r,...s})]})]})}const E_=({image:e})=>n.jsx(Cn,{src:A.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)"}}),P_=({images:e,selectedImageIndex:t,PRODUCT_IMAGE_DIMENSIONS:r,...s})=>{const[o,a]=g.useState(!1),{nextimage:i}=ce();return n.jsx("div",{...s,className:Se["main-image-container"],children:n.jsxs("div",{className:Se["image-desktop"],children:[!o&&n.jsx(E_,{image:e==null?void 0:e[t]}),n.jsx(i,{src:A.resizingImg(e==null?void 0:e[t].imageUrl,{...r.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)}})]})})},N_=({images:e,onThumbnailClick:t,selectedImageIndex:r})=>{const{nextimage:s}=ce();return n.jsx("div",{className:Se.thumbs,children:e.map((o,a)=>n.jsx("div",{role:"button",tabIndex:0,onClick:()=>t(a),onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&t(a)},className:a===r?Se.selected:"",children:n.jsx(s,{src:o.imageUrl,alt:o.imageText,layout:"responsive",width:100,height:100,objectFit:"cover",priority:!1})},a))})},Uu=({images:e,initialSelectedImageIndex:t=0,setShowImageZoom:r,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o,Z_INDEX_WAR:a,...i})=>{const{isMobile:c}=ne(),[l,u]=g.useState(t),p=f=>{u(f)};return c?n.jsxs(x_,{Z_INDEX_WAR:a,children:[n.jsx(Qo,{onClose:()=>r({show:!1,initialIndex:0}),ICONS:s}),n.jsx(Du,{images:e,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o})]}):n.jsxs(y_,{Z_INDEX_WAR:a,children:[n.jsx(Qo,{onClose:()=>r({show:!1,initialIndex:0}),ICONS:s}),n.jsx(P_,{images:e,selectedImageIndex:l,onThumbnailClick:p,PRODUCT_IMAGE_DIMENSIONS:o},e[l].imageId??`${e[l].imageText}-${l}`),n.jsx(N_,{images:e,selectedImageIndex:l,onThumbnailClick:p}),n.jsx(S_,{callBackProductAdded:()=>{r({initialIndex:0,show:!1})},ICONS:s,Z_INDEX_WAR:a,...i})]})};Uu.displayName="ImageZoom";const I_=({productImgs:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})=>{const{video:s,productName:o}=ke(),[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 n.jsxs(n.Fragment,{children:[n.jsx(Lu,{images:e,video:s,handleZoom:c,productName:o,PRODUCT_IMAGE_DIMENSIONS:t}),a.show&&n.jsx(Uu,{images:e,initialSelectedImageIndex:a.initialIndex,setShowImageZoom:i,PRODUCT_IMAGE_DIMENSIONS:t,...r})]})},Hu=({TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})=>{const{images:s}=ke(),o=g.useMemo(()=>{const a=s.filter(i=>!e.includes(i.imageLabel));return a.length>0?a:s},[]);return n.jsx(I_,{productImgs:o,TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})};Hu.displayName="PDP.Gallery";const R_=({className:e,hasIcons:t=!0,ICONS:r,PDP_INFO:s})=>{const{allSizesAvailable:o,productId:a}=ke(),{setValue:i}=ds(),{sendDataLayerEvent:c}=oe();return n.jsx("div",{className:d.helpers.classNameConcat(A.styles.links,e),id:"pdp-container","data-product-id":a,children:n.jsxs("div",{className:A.styles["links-wrapper"],children:[!o&&n.jsx(d.Button,{adornment:t?{start:n.jsx(d.Icon,{name:r.product})}:{},size:"x-small",variant:"tertiary",onClick:()=>i(!0),underline:!0,children:s.links_and_stepper.size_out_of_stock}),n.jsx(d.Button,{adornment:t?{start:n.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:s.links_and_stepper.size_table_title}),n.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})]})})},w_=({children:e})=>n.jsx("div",{className:A.styles["pdp-main__info-main-content"],children:e}),A_=({head:e,className:t})=>n.jsx("thead",{className:t,children:n.jsx("tr",{children:e.map((r,s)=>n.jsx("th",{children:r},`head-title-${s}`))})}),T_=({rows:e,className:t})=>n.jsx("tbody",{className:t,children:e.map((r,s)=>n.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)=>n.jsx("td",{children:o},`cell-content-${a}`))},`row-content-${s}`))}),L_="_tableContainer_1yxy2_1",k_={tableContainer:L_},O_=({children:e,className:t=""})=>n.jsx("table",{className:`${k_.tableContainer} ${t}`,children:e}),Lr={Head:A_,Rows:T_,Root:O_},M_=({title:e,text:t})=>n.jsxs("p",{className:A.styles.measurementRowsText,children:[n.jsx("h1",{className:A.styles.measurementRowsTitle,children:e}),t]}),D_=({ICONS:e,SIZES:t,Z_INDEX_WAR:r})=>{const s=oi(),{setValue:o}=ai();return n.jsx(d.Modal.Root,{isMobile:!0,style:{zIndex:r.modal},setIsOpen:o,isOpen:s,className:A.styles.measurementModal,children:n.jsx(d.Modal.Body,{children:n.jsxs("div",{className:A.styles.measurementContainer,children:[n.jsx("h1",{className:A.styles.measurementTitle,children:t.title}),n.jsxs("div",{className:A.styles.measurementContent,children:[n.jsx("div",{className:A.styles.measurementImageContainer,children:n.jsx(Cn,{width:264,height:402,alt:"",className:A.styles.measurementImage,src:t.bannerImage})}),n.jsxs(Lr.Root,{className:A.styles.measurementTable,children:[n.jsx(Lr.Head,{className:A.styles.measurementHead,head:t.head}),n.jsx(Lr.Rows,{className:A.styles.measurementRows,rows:t.rows.map((a,i)=>[n.jsx(M_,{title:t.descriptions[i].title,text:t.descriptions[i].text},i),...a])})]})]}),n.jsx(d.Button,{onClick:()=>o(!1),className:A.styles.measurementClose,variant:"tertiary",children:n.jsx(d.Icon,{name:e.close})})]})})},"minicart")},z_=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(A.styles["pdp-main__gallery-wrapper"],t),...r,children:e}),$_=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(A.styles.pdp,t),...r,children:e}),F_=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(A.styles["pdp-main"],t),...r,children:e}),B_=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(A.styles["pdp-main__info-secondary-content"],t),...r,children:e}),U_={gallery:z_,pdp:$_,main:F_,secondary:B_},H_=({className:e,...t})=>n.jsx(d.Utils.Divider,{...t,className:d.helpers.classNameConcat(A.styles.divider,e)}),q_=Object.freeze(Object.defineProperty({__proto__:null,AccessibilityInfo:a_,Actions:wu,BreadCrumb:Au,Credits:Tu,DescriptionsTabs:d_,Divider:H_,Freight:p_,Gallery:Hu,GoldenTag:Ds,Header:Un,Links:R_,MainContent:w_,MainInfo:$u,Price:Ms,ProductMeasurements:D_,SimilarsItems:Fu,Sizes:zu,SubSectionWrapper:$t,containers:U_},Symbol.toStringTag,{value:"Module"})),V_=(e,t)=>{const[r,s]=iu({items:e}),[o,a]=t.split(":").map(Number);return isNaN(o)||isNaN(a)?[r,s]:[r<o?r:o,s>a?s:a]},W_=()=>{var S;const{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:s,PLP_FILTERS_TITLE:o,PLP_SIZE_ORDER:a}=Me(),[i,c]=g.useState("10000:0"),{isMobile:l}=ne(),{sendDataLayerEvent:u}=oe(),{openFilters:p,setOpenFilters:f}=xs(),{state:m}=$e(),{breadcrumb:h,deleteAllFacets:_,isLoading:y=!1,facets:x,onToggleFacet:b,selectedFacets:E}=Qi.contexts.searchFacets.hook(),j=g.useRef(""),v={isLast:!0,href:(S=m.term)!=null&&S.length?`/${m.term}`:"",name:m.term},P=A.filterNonRootFacets(E,m==null?void 0:m.base);return g.useEffect(()=>{const C=x.find(({key:I})=>I==="price");if(C){const[I,L]=V_(C.values,i??"10000:0");c(`${I}:${L}`)}},[x,i,c]),g.useEffect(()=>{if(!P.length)return;const C=JSON.stringify(P);j.current!==C&&(j.current=C,u({functionKey:"filterEvent",data:{commonData:{selectedFacets:P}}}))},[P]),n.jsxs(vn.teamComponents.Filter.Root,{CONSTANTS:{ICONS:e,PLP_FILTERS_TITLE:o,PLP_FILTERS:t},breadcrumb:h.length?h:[v],deleteAllFacets:_,filters:{facets:A.filterNonCategorySelected(x,m==null?void 0:m.base),selected:P},isMobile:l??!1,isLoading:y,isOpen:p,price:i,onToggleFacet:b,setIsOpen:f,target:document.body,children:[n.jsx(vn.teamComponents.Filter.Selected,{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r}),n.jsx(vn.teamComponents.Filter.Content,{columns:2,CONSTANTS:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:s,PLP_SIZE_ORDER:a}})]})},qu=()=>typeof document>"u"?null:n.jsx(W_,{});qu.displayName="Filters";const zs=({total:e=0})=>{const{SEARCH_TOTAL_PORTAL_ID:t}=Me();if(typeof window>"u")return null;const r=document.getElementById(t);return r?rs.createPortal(n.jsxs("span",{children:["[",e,"] produto",e>1?"s":""]}),r):null};zs.displayName="PDC.Grid.NavigationTotal";const G_=({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])},K_=()=>{const{isMobile:e}=ne(),{isLoading:t,products:r,total:s}=Kt(),o=Me();return G_({productCount:r.length,PLP_GRID_SCROLL_BACK:o.PLP_GRID_SCROLL_BACK}),n.jsxs(n.Fragment,{children:[n.jsx(Je.Products,{isMobile:e??!1,items:r,...o}),!r.length&&!t&&n.jsx(Je.Empty,{ICONS:o.ICONS,PLP_NOT_RESULT:o.PLP_NOT_RESULT}),n.jsx(zs,{total:s})]})},Vu=({infinite:e=!1})=>n.jsx("div",{className:Ge["pdc--grid"],children:n.jsx("div",{className:Ge["pdc--grid--content"],children:e?n.jsx(Je.InfiniteScroller,{}):n.jsx(K_,{})})});Vu.displayName="Grid";const jt=e=>({centro:"center",esquerda:"start",direita:"end"})[e],Wu=({children:e,contentState:t,entityKey:r})=>{const{url:s}=t.getEntity(r).getData();return s?n.jsx(De,{href:s,children:e}):e},X_=(e,t,r)=>{e.findEntityRanges(s=>{const o=s.getEntity();return o===null?!1:r.getEntity(o).getType()==="LINK"},t)},En=e=>{const t=new Ye.CompositeDecorator([{strategy:X_,component:Wu}]),r=Ye.convertFromRaw(e);return Ye.EditorState.createWithContent(r,t)},Y_=e=>Ye.convertFromRaw(e),Pn=Ye.DefaultDraftBlockRenderMap.set("unstyled",{element:"div",aliasedElements:["div"]}),Zo="superior-direita",_n="dentro-inferior-centro",Q_="inferior-direita",kr="dentro-inferior-esquerda",Gu=e=>({position:e===_n||e===kr?"absolute":"default",shouldRender:[Zo,_n,kr].includes(e)?"top":"bottom",alignItems:[_n].includes(e)?"center":[Zo,Q_].includes(e)?"flex-end":"flex-start",left:e===kr?"16px":e===_n?"45%":"unset"}),Z_=Object.freeze(Object.defineProperty({__proto__:null,CREATE_CONTENT:En,EXTENDED_BLOCK_RENDER_MAP:Pn,GET_CONTENT_STATE:Y_,controllersPositionsAdapter:Gu},Symbol.toStringTag,{value:"Module"})),J_=({expanded:e,content:t})=>n.jsxs("details",{open:e,children:[t.textStructureReduced?n.jsx("summary",{onClick:r=>r.preventDefault(),children:n.jsx(Ye.Editor,{editorKey:"draft-editor-1",blockRenderMap:Pn,editorState:t!=null&&t.textStructureReduced?En(JSON.parse(t.textStructureReduced)):Ye.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):n.jsx(n.Fragment,{}),t.showTextStructureExpander&&t.textStructure?n.jsx(n.Fragment,{children:n.jsx(Ye.Editor,{editorKey:"draft-editor-1",blockRenderMap:Pn,editorState:t.textStructure?En(JSON.parse(t.textStructure)):Ye.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):n.jsx(n.Fragment,{})]}),eg="_textContentWrapper_1bigo_5",tg="_textContentSection_1bigo_13",Qr={"link-modifier":"_link-modifier_1bigo_1",textContentWrapper:eg,textContentSection:tg},Ku=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:r})=>{var a;const[s,o]=g.useState(!1);return n.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:jt(e.textStructureAlignment),alignItems:jt(e.textStructureAlignment)},columnWrapper:{alignContent:jt(e.textStructureAlignment),alignItems:jt(e.textStructureAlignment)}},adornment:{bottom:e.showTextStructureExpander&&e.textStructure?n.jsx(d.Button,{variant:"tertiary",adornment:{end:n.jsx(d.Icon,{name:s?`${t.arrow_up}`:`${t.arrow_down}`})},onClick:()=>o(i=>!i),size:"small",children:s?(r==null?void 0:r.less)??"Ver Menos":(r==null?void 0:r.more)??"Ver Mais"}):n.jsx(n.Fragment,{})},children:n.jsxs(d.Utils.Column,{className:Qr.textContentWrapper,style:{alignItems:jt(e.textStructureAlignment)},children:[n.jsx(d.TextStructure.DivWrapper,{style:{textAlign:jt(e.textStructureAlignment)},mode:e.textStructureMode??"default",children:e.textStructureReduced?n.jsx(J_,{content:e,expanded:s}):n.jsx(n.Fragment,{})}),e.textStructureButtonLabel?n.jsx(ze,{mode:e.textStructureMode??"default",href:e.textStructureButtonHref??"#",size:e.textStructureButtonSize,className:Qr["link-modifier"],adornments:(a=e.textStructureButtonIcon)!=null&&a.length&&e.enableIcon?{end:n.jsx(d.Icon,{name:e.textStructureButtonIcon})}:void 0,children:e.textStructureButtonLabel}):n.jsx(n.Fragment,{})]})})},ng=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],Jo=e=>({centro:"center",esquerda:"start",direita:"end"})[e],ea={"content-modifier":"_content-modifier_16y4u_5","banner-image-wrapper-modifier":"_banner-image-wrapper-modifier_16y4u_13"},ta=({data:e,videoUrl:t,priority:r,videoRef:s,ICONS:o,TEXTCONTENT_EXPANDED:a,TIME_ZONE:i,...c})=>{const{video:l,image:u,imageHref:p,imageOpacity:f,altImage:m,backgroundColor:h,position:_,contentAlignment:y,showTimer:x,contentOrder:b,timerMode:E,timerEnd:j,timerInit:v,textStructure:P,textStructureReduced:S}=e.banner,C=(p==null?void 0:p.trim())||(u==null?void 0:u.trim())||null,{nextimage:I}=ce();return n.jsxs(d.Banner.Container,{...c,children:[n.jsxs(d.Banner.ImageWrapper,{className:ea["banner-image-wrapper-modifier"],style:f?{background:h}:void 0,children:[l&&n.jsx(Ie.Video,{videoRef:s,src:t,autoPlay:r,loop:!0,playsInline:!0,muted:!0}),C&&!(l!=null&&l.length)&&n.jsx(I,{src:C,width:"1920",height:"1080",alt:m??u??"",...r?{priority:r}:{},style:f?{opacity:"0"}:void 0}),!u&&!(l!=null&&l.length)&&n.jsx("div",{style:{background:h}})]}),x||S||P?n.jsx(d.Banner.Slot,{...ng(_??"centro"),className:ea["content-modifier"],style:{textAlign:Jo(y)},children:n.jsxs(d.Utils.Column,{gap:"16px",alignItems:Jo(y),children:[x&&b==="timer-first"&&n.jsx(Sn,{mode:E??"default",size:"small",dateEnd:j?new Date(j):new Date,dateInit:v?new Date(v):new Date,TIME_ZONE:i}),n.jsx(Ku,{data:e.banner,ICONS:o,TEXTCONTENT_EXPANDED:a}),x&&b!=="timer-first"&&n.jsx(Sn,{mode:E??"default",size:"small",dateEnd:j?new Date(j):new Date,dateInit:v?new Date(v):new Date,TIME_ZONE:i})]})}):n.jsx(n.Fragment,{})]})},Yt=({data:e,className:t,priority:r,creative:s,...o})=>{const{handleSelectPromotionEvent:a,currentLocalRef:i}=oe(),{banner:{promotion_name:c},index:l,componentIndex:u}=e,p=typeof l=="number"?`:${l+1}`:"",f={creative_name:s,creative_slot:`${s}-${i.current}:${u+1}${p}`,promotion_id:e.banner.href,promotion_name:c},m=g.useRef(null),h=g.useMemo(()=>{var y;if((y=e.banner.video)!=null&&y.includes("player.vimeo")){const x=e.banner.video.split("?")[1],b=x==null?void 0:x.split("&"),E=b==null?void 0:b.filter(v=>v.includes("loc")||v.includes("signature")||v.includes("user_id")),j=E==null?void 0:E.join("&");return`${e.banner.video.split("?")[0]}?${j}`}return e.banner.video},[e]),_=()=>{var y;(y=m.current)!=null&&y.paused&&m.current.play()};return n.jsx(Mn,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...f,index:l}}}},observerOptions:{delay:100,...h&&{threshold:.1}},...h&&{callBackWhenVisible:_},children:e.banner.href?n.jsx(De,{href:e.banner.href,onClick:()=>{a({updatePromotionRef:!0,promotion:f,index:l})},children:n.jsx(ta,{data:e,videoUrl:h,priority:r,videoRef:m,...o})}):n.jsx(ta,{data:e,videoUrl:h,priority:r,videoRef:m,...o})})},$s=e=>n.jsx(Yt,{...e}),Xu=({columns:e,count:t,gap:r})=>{var y;const{banners:s,pages:o,products:a}=st(),{isMobile:i}=ne(),{banners:c}=Tn(),{ICONS:l,PRODUCT_CARD_IMAGE_ASPECT_RATIO:u,TEXTCONTENT_EXPANDED:p,TIME_ZONE:f}=Me(),m=((y=o[o.length-1])==null?void 0:y.products.length)??t,h=a[(o.length-1)*t+m-1],_=c.filter((x,b)=>s[b]<h);return Array.isArray(_)?_.map((x,b)=>n.jsx(tt.Banner,{columns:x.columns,gap:r,isMobile:i??!1,position_grid:s[b]+1,totalColumns:e,PRODUCT_CARD_IMAGE_ASPECT_RATIO:u,children:n.jsx(Yt,{data:{banner:x,componentIndex:b},creative:"banner_grid",ICONS:l,TEXTCONTENT_EXPANDED:p,TIME_ZONE:f})},`${x.position_grid}-${b}`)):null};Xu.displayName="PDC.InfiniteScroller.Banners";const Yu=e=>{var s;const{pages:t}=st(),r=t[t.length-1];return(r==null?void 0:r.page)!==((s=r==null?void 0:r.pagination)==null?void 0:s.total)&&!(r!=null&&r.loading)?n.jsx(On,{...e}):null};Yu.displayName="PDC.InfiniteScroller.Loading";const Qu=({page:e,...t})=>{const{updateParamPage:r}=st(),{element:s}=In({callback:()=>r(e),options:{threshold:0}});return n.jsx("div",{...t,id:`pdc-scroll-infinite-${e.page}`,className:Ge["pdc--infinite--loader"],"data-page":e.page,ref:s})};Qu.displayName="PDC.Page.Anchor";const Zu=({first:e,gap:t,isMobile:r=!1,item:s,index:o,last:a=!1,order:i,page:c,showVideo:l=!1})=>{const{load:u,handleNotify:p}=st(),{getAvailableProductTag:f}=dt(),{BUY_BUTTON_LABELS:m,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:E,PRODUCT_CARD_IMAGE_ASPECT_RATIO:j,PRODUCT_CARD_TEXTS:v,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:P,PRODUCT_IMAGE_DIMENSIONS:S,SECOND_IMAGE:C,StoreConfig_MainSellerId:I,TEXTURE_IMAGE:L,Z_INDEX_WAR:T,ICONS:k}=Me(),M=f(s==null?void 0:s.cluster.highlights);return n.jsx(tt.Card,{className:s.id==="skeleton"?Ge["pdc--infinite--card--disabled"]:"",gap:t,isMobile:r??!1,item:s,order:i,tag:M,index:o,setSkuSelected:p,showVideo:l,CONSTANTS:{BUY_BUTTON_LABELS:m,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:E,PRODUCT_CARD_IMAGE_ASPECT_RATIO:j,PRODUCT_CARD_TEXTS:v,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:P,PRODUCT_IMAGE_DIMENSIONS:S,SECOND_IMAGE:C,StoreConfig_MainSellerId:I,TEXTURE_IMAGE:L,Z_INDEX_WAR:T,ICONS:k},children:c&&u&&n.jsxs(n.Fragment,{children:[e&&n.jsx(xn.Anchor,{page:c}),!c.loading&&n.jsx(xn.Loader,{page:c}),a&&c.loading&&n.jsx(xn.NextPage,{page:c})]})})};Zu.displayName="PDC.Page.Card";const Ju=({type:e="default",page:t,...r})=>{const{load:s,updatePage:o}=st(),{element:a}=In({callback:()=>o(t),onEnterViewportOnce:!0,options:{threshold:1}});return s===!0&&n.jsx("div",{...r,className:Ge[`pdc--infinite--loader${e==="page"?"--page":""}`],ref:a})};Ju.displayName="PDC.Page.Loader";const ed=({page:e,...t})=>{var o;const{addNewPage:r}=st(),{element:s}=In({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?n.jsx("div",{...t,className:Ge["pdc--infinite--next-page--card"],"data-next-page":!0,ref:s}):null};ed.displayName="PDC.Page.NextPage";const xn={Anchor:Qu,Card:Zu,Loader:Ju,NextPage:ed},td=({count:e,gap:t,page:r})=>{const{isMobile:s}=ne(),{columns:o,products:a}=st(),i=(r.page-1)*e,c=Pi(r.products,o);return Array.isArray(r.products)?r.products.map((l,u)=>n.jsx(xn.Card,{first:u===0,last:u===r.products.length-1,gap:t,index:u,item:l.node,isMobile:s??!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};td.displayName="PDC.Page";const rg=({pages:e,load:t,PLP_GRID_SCROLL_BACK:r})=>{const s=g.useRef(!1);g.useEffect(()=>{const o=e[e.length-1];if(t&&o&&!s.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&&(s.current=!0,sessionStorage.setItem(r.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])},sg=()=>{var l,u;const{count:e}=$e(),{columns:t,gap:r,load:s,pages:o,total:a}=st(),i=Me(),{PLP_GRID_SCROLL_BACK:c}=Me();return rg({pages:o,load:s,PLP_GRID_SCROLL_BACK:c}),n.jsxs(n.Fragment,{children:[s===!0&&((u=(l=o[0])==null?void 0:l.pagination)==null?void 0:u.count)===0&&n.jsx(Je.Empty,{ICONS:i.ICONS,PLP_NOT_RESULT:i.PLP_NOT_RESULT}),n.jsxs(tt.Root,{children:[Array.isArray(o)&&o.map((p,f)=>n.jsx(td,{count:e,gap:r,page:p},f)),n.jsx(Xu,{columns:t,count:e,gap:r})]}),n.jsx(zs,{total:a}),n.jsx(Yu,{})]})},nd=()=>{const{banners:e}=Tn();return n.jsx(Bi,{banners:e,children:n.jsx(sg,{})})};nd.displayName="PDC.InfiniteScroller";const rd=()=>{const{setOpenFilters:e}=xs(),{selectedFacets:t,onToggleFacet:r,onSort:s}=yi(),{state:o}=$e(),{Z_INDEX_WAR:a}=Me(),i=A.filterNonRootFacets(t,o==null?void 0:o.base);return n.jsx(ut.Root,{onSort:s,setOpenFilters:e,style:{zIndex:a.plp_navigation},children:n.jsx(ut.Selected,{callback:r,selected:i})})};rd.displayName="Navigation";const Zr=({currentPage:e,callback:t,type:r,...s})=>n.jsx(d.Button,{...s,iconNameStart:`arrow-${r}`,onClick:()=>{typeof t=="function"&&t(r==="left"?"prev":"")},size:"large",variant:"tertiary"});Zr.displayName="Arrow";const Jr=({active:e,prev:t,ellipses:r,page:s,selectedPage:o})=>n.jsxs(n.Fragment,{children:[r&&t&&n.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."}),e&&n.jsx(d.Pagination.Item,{isActive:!1,index:s,variant:"tertiary",onClick:()=>{typeof o=="function"&&o(s)},children:s}),r&&!t&&n.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."})]});Jr.displayName="PageEllipses";const sd=({children:e,endPage:t,page:r,total:s,selectedPage:o,ITEMS_PER_SECTION:a})=>n.jsxs(n.Fragment,{children:[n.jsx(Jr,{active:r>=a&&s>a,selectedPage:o,currentPage:r,prev:!1,ellipses:r>a&&s>a,page:1}),e,n.jsx(Jr,{active:s-r>1&&s!==t,selectedPage:o,currentPage:r,prev:!0,ellipses:t<s-1,page:s})]});sd.displayName="Pagination.Layout";const og=(e,t,r)=>{const s=new URLSearchParams(r);return s.set(e,t),s.toString()},ag=(e,t)=>{const r=[];for(let s=e;s<=t;s++)r.push(s);return r},ig=({currentPage:e,total:t,maxVisiblePages:r,SEARCH_PAGE_ITEM_THRESHOLD:s})=>{const o=t>=s?s: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}},od=({currentPage:e,pages:t,searchParams:r,VARIANT_PAGINATION:s})=>{const{router:o,pathname:a}=ce();return Array.isArray(t)?t.map(i=>n.jsx(d.Pagination.Item,{isActive:e===i,index:i,variant:e===i?s.active:s.default,onClick:()=>o.push(`${a}?${og("page",i.toString(),r)}`),children:i},i)):null};od.displayName="Pages";const Fs=({query:e,type:t="default",searchParams:r,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:p}=ce(),{state:{page:f=1}}=$e(),{pagination:{total:m}}=Kt(),{endPage:h,totalPages:_,startPage:y}=ig({currentPage:f,total:m,maxVisiblePages:o,SEARCH_PAGE_ITEM_THRESHOLD:i}),x=E=>{const j=E.toString(),v=new URLSearchParams(r.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":p}?${v.toString()}`;u.push(S)},b=E=>{x(E==="prev"?f-1:f+1)};return m?n.jsx("div",{...l,className:Ge["pdc--pagination"],children:n.jsx(d.Pagination.Wrapper,{adornment:{start:n.jsx(Zr,{callback:b,currentPage:f,disabled:f<2,type:"left"}),end:n.jsx(Zr,{callback:b,currentPage:f,disabled:f>=_,type:"right"})},children:n.jsx(sd,{endPage:h,page:f,selectedPage:x,total:m,ITEMS_PER_SECTION:o,children:n.jsx(od,{currentPage:f,pages:ag(y,h),searchParams:r,VARIANT_PAGINATION:c})})})}):n.jsx(n.Fragment,{})};Fs.displayName="Pagination";const ad=({gap:e,isMobile:t})=>{const{count:r,state:s}=$e(),{banners:o}=Tn(),{ICONS:a,PRODUCT_CARD_IMAGE_ASPECT_RATIO:i,TEXTCONTENT_EXPANDED:c,TIME_ZONE:l}=Me(),u=o.filter(p=>Ii(p.position_grid,s.page,r));return Array.isArray(u)?u.map((p,f)=>n.jsx(tt.Banner,{columns:p.columns,gap:e,isMobile:t,position_grid:p.position_grid,totalColumns:t?2:4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:i,children:n.jsx(Yt,{data:{banner:p,componentIndex:f},creative:"banner_grid",ICONS:a,TEXTCONTENT_EXPANDED:c,TIME_ZONE:l})},p.position_grid)):null};ad.displayName="PDC.Grid.Banners";const Bs=({isMobile:e=!1,items:t,BUY_BUTTON_LABELS:r,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:p,PLP_SIZE_ORDER:f,PRODUCT_CARD_IMAGE_ASPECT_RATIO:m,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:y,SECOND_IMAGE:x,StoreConfig_MainSellerId:b,TEXTURE_IMAGE:E,Z_INDEX_WAR:j})=>{const{getAvailableProductTag:v}=dt(),{count:P,state:S}=$e(),[C,I]=g.useState(!1),[L,T]=g.useState(null),[k,M]=g.useState([]),Q=g.useCallback((Y,G)=>{const H=G?wn([G]):null;M(Y),T(H!=null&&H.length?H[0]:null),I(!0)},[]),D=e?8:16,U=(S.page-1)*P,F=tt.helpers.createGridPosAndVideo(t,[],e?2:4,S.page);return n.jsxs(n.Fragment,{children:[n.jsxs(tt.Root,{children:[Array.isArray(t)&&t.map((Y,G)=>{var Z,re;const H=v(Y.node.cluster.highlights);return n.jsx(tt.Card,{gap:D,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:r,MAIN_IMAGE:o,PLP_GRID_SCROLL_BACK:c,PLP_INFINITE_SCROLL:l,PLP_PRODUCT_SIMILAR_DELAY:u,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:p,PLP_SIZE_ORDER:f,PRODUCT_CARD_IMAGE_ASPECT_RATIO:m,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:y,SECOND_IMAGE:x,StoreConfig_MainSellerId:b,TEXTURE_IMAGE:E,Z_INDEX_WAR:j,ICONS:s}},Y.node.sku)}),t.length>0&&n.jsx(ad,{gap:D,isMobile:e??!1})]}),n.jsx(An,{open:C,sku:L,skus:k,setSku:T,setVisible:I,ICONS:s,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:h,Z_INDEX_WAR:j})]})};Bs.displayName="PDC.Products";const Je={Empty:ws,Filters:qu,Grid:Vu,InfiniteScroller:nd,Spinner:On,Navigation:rd,Notification:An,Pagination:Fs,Products:Bs},id=({className:e,...t})=>{const{searchParams:r,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 n.jsx(wp,{...t,children:n.jsxs("div",{className:d.helpers.classNameConcat(Ge.pdc,e),children:[n.jsxs(gi,{forceUpdate:!0,children:[n.jsx(Je.Navigation,{}),n.jsx(Je.Filters,{})]}),i===!0?n.jsx(Je.Grid,{infinite:!0}):n.jsxs(ys,{forceUpdate:!0,query:r.get("query")??void 0,children:[n.jsx(Je.Grid,{}),n.jsx(Je.Pagination,{searchParams:r,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:a,SEARCH_PAGE_ITEM_THRESHOLD:c,VARIANT_PAGINATION:l})]})]})})};id.displayName="Templates.PDC";const cd=g.createContext({}),cg=({children:e,...t})=>n.jsx(cd.Provider,{value:t,children:e}),Hn=()=>{const e=g.useContext(cd);if(e===void 0)throw new Error("useSearchConstants must be used within a SearchConstantsProvider");return e},lg="_grid_e75z7_21",ug="_navigation_e75z7_44",dg="_spinner_e75z7_70",pg="_sort_e75z7_76",lt={"rearch-result--empty":"_rearch-result--empty_e75z7_1",grid:lg,"grid-header":"_grid-header_e75z7_37",navigation:ug,"result-disclaimer":"_result-disclaimer_e75z7_51",spinner:dg,sort:pg,"search-result":"_search-result_e75z7_91"},ld=({term:e})=>{const{router:t}=ce(),{SEARCH_RESULT:r,ICONS:s}=Hn(),o=()=>{t.push(r.EMPTY.ALL_TERMS)};return n.jsxs("div",{className:lt["rearch-result--empty"],children:[n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("div",{className:A.responsive["responsive-desktop-flex"],children:n.jsx("h2",{className:"typography-style-heading-sm",children:r.EMPTY.NOT_FOUND})}),n.jsx("div",{className:A.responsive["responsive-mobile-flex"],children:n.jsx("h2",{className:"typography-style-body-md",children:r.EMPTY.NOT_FOUND})}),n.jsxs("p",{children:[r.EMPTY.NOT_FOUND_P," ",`"${e}"`]})]}),n.jsx(d.Button,{onClick:()=>o(),variant:"tertiary",size:"medium",adornment:{end:n.jsx(d.Icon,{name:s.arrow_right,size:"medium"})},children:r.EMPTY.ALL_TERMS_LABEL})]})};ld.displayName="RearchResult.Empty";const mg=e=>n.jsxs(n.Fragment,{children:[n.jsx("div",{className:A.responsive["responsive-desktop-flex"],children:n.jsx("h2",{className:"typography-style-heading-sm",children:e.SEARCH.SEARCHING})}),n.jsx("div",{className:A.responsive["responsive-mobile-flex"],children:n.jsx("h2",{className:"typography-style-body-md",children:e.SEARCH.SEARCHING})}),n.jsx(d.Spinner,{className:lt.spinner})]}),fg=(e,t,r)=>n.jsxs(n.Fragment,{children:[n.jsx("div",{className:A.responsive["responsive-desktop-flex"],children:n.jsx("h2",{className:"typography-style-heading-sm",children:t.SEARCH.SEARCHED})}),n.jsx("div",{className:A.responsive["responsive-mobile-flex"],children:n.jsx("h2",{className:"typography-style-body-md",children:t.SEARCH.SEARCHED})}),n.jsxs("p",{children:[t.SEARCH.SEARCHED_P_START," ",e," ",t.SEARCH.SEARCHED_P_END," ",`"${r}"`]})]}),ud=({isLoading:e,quantity:t,term:r})=>{const{SEARCH_RESULT:s}=Hn();return n.jsx(d.TextStructure.DivWrapper,{children:e?mg(s):fg(t,s,r)})};ud.displayName="Search.Loading";const hg=({term:e})=>{const[t,r]=g.useState(!1),{router:s}=ce(),{searchParams:o}=$e(),{ITEMS_DEFAULT_SORT:a,ITEMS_PER_PAGE:i,ICONS:c}=Hn(),l=u=>{A.navigateToSearchPage(s,e,i,1,u??a)};return n.jsx("div",{className:lt.sort,children:n.jsx($n,{handleSelectValue:u=>l(u??"release_desc"),sortListOpen:t,setSortListOpen:r,searchParams:o,ICONS:c})})},_g=({query:e})=>{const{isLoading:t,products:r,pagination:s}=Kt();return n.jsxs("div",{className:lt["grid-header"],children:[n.jsxs("div",{className:lt.navigation,children:[!t&&(r!=null&&r.length)?n.jsx(hg,{term:e}):null,n.jsx(d.Utils.Divider,{})]}),!t&&(r!=null&&r.length)?n.jsx("div",{className:lt["result-disclaimer"],children:n.jsx(ud,{term:e,isLoading:t,quantity:s.count})}):null]})},dd=({isMobile:e=!1,query:t})=>{const{isLoading:r,products:s,pagination:o}=Kt(),{searchParams:a}=$e(),i=Hn(),{sendDataLayerEvent:c}=oe(),l=g.useRef({query:t,sended:!1}),u=g.useMemo(()=>!r&&s.length>0&&o.count>0,[r,s.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:(s==null?void 0:s.length)>0}}}),l.current.sended=!0)}},[t,s,r,c]),n.jsxs("div",{className:lt.grid,children:[u?n.jsx(_g,{query:t}):n.jsx(n.Fragment,{}),!r&&(s!=null&&s.length)?n.jsx(Bs,{isMobile:e??!1,items:s,...i}):n.jsx(n.Fragment,{}),(s==null?void 0:s.length)===0&&!r?n.jsx(ld,{term:t}):null,u&&n.jsx(Fs,{searchParams:a,...i})]})};dd.displayName="SearchResultContent";const gg=({className:e})=>{const{state:t}=$e(),{isMobile:r}=ne();return n.jsx(ys,{forceUpdate:!1,query:t.term??"",children:n.jsx("div",{className:d.helpers.classNameConcat(lt["search-result"],e),children:n.jsx(dd,{currentPage:t.page,isMobile:r??!1,query:t.term??""})})})},pd=({className:e,searchParams:t,CONSTANTS:r})=>{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 n.jsx(cg,{...r,children:n.jsx(gs,{sort:c,state:{sort:c,base:"",facets:[],term:o,page:i,count:a},count:a,searchParams:s,ITEMS_PER_PAGE:r.ITEMS_PER_PAGE,children:n.jsx(gg,{className:e})})})};pd.displayName="Search";const yg=({page:e,data:t})=>{const{pathname:r}=ce(),s=g.useRef(null),{sendDataLayerEvent:o,currentLocalRef:a,itemListRef:i,promotionEventRef:c}=oe();return g.useEffect(()=>{const l=wi("login_event")||"{}",u=JSON.parse(l);if(u.name||u.method){const p=new Date(0);o({functionKey:"readyEvents",data:{event:u.name,readyData:{method:u.method}}}),bs("login_event","",{expires:p})}},[]),g.useEffect(()=>{if(s.current===r)return;s.current=r;let l={};switch(e){case"PDP":{const p=t,f={};if(!p){l={page_category:"pdp"};break}p.items.forEach(({itemId:m,sellers:h})=>f[m]=h[0].commertialOffer.AvailableQuantity),l={page_category:"pdp",seller_ids:p.items.map(({sellers:m})=>m[0].sellerId).join(),skuStocks:f,product_reference_id:p.productReference};break}case"PDC":{const{page_category:p,page_departament:f,id:m,name:h}=_a(),_=h,y=m;l={page_category:"lista_produtos",...f&&{page_departament:f}},i.current={item_list_name:r==="/search"?"busca":_??void 0,item_list_id:r==="/search"?void 0:y??void 0},f&&o({functionKey:"readyEvents",data:{event:"view_category",readyData:{page_category:p,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})},[r]),null};var es={exports:{}},gn={exports:{}},na;function xg(){return na||(na=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(l,u){for(var p in u)Object.defineProperty(l,p,{enumerable:!0,get:u[p]})}r(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:p}=l;const f=document.createElement(u);for(const _ in p){if(!p.hasOwnProperty(_)||_==="children"||_==="dangerouslySetInnerHTML"||p[_]===void 0)continue;const y=s[_]||_.toLowerCase();u==="script"&&(y==="async"||y==="defer"||y==="noModule")?f[y]=!!p[_]:f.setAttribute(y,p[_])}const{children:m,dangerouslySetInnerHTML:h}=p;return h?f.innerHTML=h.__html||"":m&&(f.textContent=typeof m=="string"?m:Array.isArray(m)?m.join(""):""),f}function a(l,u){if(l instanceof HTMLElement&&u instanceof HTMLElement){const p=u.getAttribute("nonce");if(p&&!l.getAttribute("nonce")){const f=u.cloneNode(!0);return f.setAttribute("nonce",""),f.nonce=p,p===l.nonce&&l.isEqualNode(f)}}return l.isEqualNode(u)}let i;process.env.__NEXT_STRICT_NEXT_HEAD?i=(l,u)=>{const p=document.querySelector("head");if(!p)return;const f=p.querySelectorAll('meta[name="next-head"]')||[],m=[];if(l==="meta"){const y=p.querySelector("meta[charset]");y&&m.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&&m.push(b)}const _=u.map(o).filter(y=>{for(let x=0,b=m.length;x<b;x++){const E=m[x];if(a(E,y))return m.splice(x,1),!1}return!0});m.forEach(y=>{var x;const b=y.previousSibling;if(b&&b.getAttribute("name")==="next-head"){var E;(E=y.parentNode)==null||E.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")||p.appendChild(b),p.appendChild(y)})}:i=(l,u)=>{const p=document.getElementsByTagName("head")[0],f=p.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 m=Number(f.content),h=[];for(let x=0,b=f.previousElementSibling;x<m;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,E=h.length;b<E;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=>p.insertBefore(x,f)),f.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 p=u.title?u.title[0]:null;let f="";if(p){const{children:m}=p.props;f=typeof m=="string"?m:Array.isArray(m)?m.join(""):""}f!==document.title&&(document.title=f),["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)}(gn,gn.exports)),gn.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function r(S,C){for(var I in C)Object.defineProperty(S,I,{enumerable:!0,get:C[I]})}r(t,{default:function(){return P},handleClientScriptLoad:function(){return x},initScriptLoader:function(){return j}});const s=Le,o=At,a=n,i=s._(rs),c=o._(g),l=Su(),u=xg(),p=Cc(),f=new Map,m=new Set,h=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],_=S=>{if(i.default.preinit){S.forEach(C=>{i.default.preinit(C,{as:"style"})});return}if(typeof window<"u"){let C=document.head;S.forEach(I=>{let L=document.createElement("link");L.type="text/css",L.rel="stylesheet",L.href=I,C.appendChild(L)})}},y=S=>{const{src:C,id:I,onLoad:L=()=>{},onReady:T=null,dangerouslySetInnerHTML:k,children:M="",strategy:Q="afterInteractive",onError:D,stylesheets:U}=S,F=I||C;if(F&&m.has(F))return;if(f.has(C)){m.add(F),f.get(C).then(L,D);return}const Y=()=>{T&&T(),m.add(F)},G=document.createElement("script"),H=new Promise((Z,re)=>{G.addEventListener("load",function(le){Z(),L&&L.call(this,le),Y()}),G.addEventListener("error",function(le){re(le)})}).catch(function(Z){D&&D(Z)});k?(G.innerHTML=k.__html||"",Y()):M?(G.textContent=typeof M=="string"?M:Array.isArray(M)?M.join(""):"",Y()):C&&(G.src=C,f.set(C,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:C="afterInteractive"}=S;C==="lazyOnload"?window.addEventListener("load",()=>{(0,p.requestIdleCallback)(()=>y(S))}):y(S)}function b(S){document.readyState==="complete"?(0,p.requestIdleCallback)(()=>y(S)):window.addEventListener("load",()=>{(0,p.requestIdleCallback)(()=>y(S))})}function E(){[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(C=>{const I=C.id||C.getAttribute("src");m.add(I)})}function j(S){S.forEach(x),E()}function v(S){const{id:C,src:I="",onLoad:L=()=>{},onReady:T=null,strategy:k="afterInteractive",onError:M,stylesheets:Q,...D}=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=C||I;Z.current||(T&&le&&m.has(le)&&T(),Z.current=!0)},[T,C,I]);const re=(0,c.useRef)(!1);if((0,c.useEffect)(()=>{re.current||(k==="afterInteractive"?y(S):k==="lazyOnload"&&b(S),re.current=!0)},[S,k]),(k==="beforeInteractive"||k==="worker")&&(U?(F[k]=(F[k]||[]).concat([{id:C,src:I,onLoad:L,onReady:T,onError:M,...D}]),U(F)):Y&&Y()?m.add(C||I):Y&&!Y()&&y(S)),G){if(Q&&Q.forEach(le=>{i.default.preinit(le,{as:"style"})}),k==="beforeInteractive")return I?(i.default.preload(I,D.integrity?{as:"script",integrity:D.integrity,nonce:H,crossOrigin:D.crossOrigin}:{as:"script",nonce:H,crossOrigin:D.crossOrigin}),(0,a.jsx)("script",{nonce:H,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([I,{...D,id:C}])+")"}})):(D.dangerouslySetInnerHTML&&(D.children=D.dangerouslySetInnerHTML.__html,delete D.dangerouslySetInnerHTML),(0,a.jsx)("script",{nonce:H,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...D,id:C}])+")"}}));k==="afterInteractive"&&I&&i.default.preload(I,D.integrity?{as:"script",integrity:D.integrity,nonce:H,crossOrigin:D.crossOrigin}:{as:"script",nonce:H,crossOrigin:D.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)})(es,es.exports);var vg=es.exports,bg=vg;const md=A.getDefaultExportFromCjs(bg),jg=({children:e,ONE_TRUST:t})=>n.jsxs(n.Fragment,{children:[n.jsx(md,{src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",defer:!0,strategy:"afterInteractive","data-domain-script":t.siteId,type:"text/javascript"}),e]}),Cg=vl(()=>Promise.resolve(jg),{ssr:!1}),Sg="_lgpd_2vba5_82",Eg="_success_2vba5_248",Pg="_error_2vba5_312",xe={"newsletter-root":"_newsletter-root_2vba5_1","has-border-top":"_has-border-top_2vba5_9","has-border-bottom":"_has-border-bottom_2vba5_12","newsletter-container":"_newsletter-container_2vba5_20","content-text":"_content-text_2vba5_35","form-wrapper":"_form-wrapper_2vba5_39","newsletter-container-banner":"_newsletter-container-banner_2vba5_64",lgpd:Sg,"textfield-structure-modifier":"_textfield-structure-modifier_2vba5_190","input-wrapper-modifier":"_input-wrapper-modifier_2vba5_196","submit-btn":"_submit-btn_2vba5_200","loading-spinner":"_loading-spinner_2vba5_211","terms-and-conditions-checkbox":"_terms-and-conditions-checkbox_2vba5_217","terms-and-conditions-unchecked":"_terms-and-conditions-unchecked_2vba5_230","terms-and-conditions-checked":"_terms-and-conditions-checked_2vba5_244",success:Eg,"text-structure-modifier":"_text-structure-modifier_2vba5_257","success-title":"_success-title_2vba5_297","close-button":"_close-button_2vba5_302",error:Pg,"newsletter-wrapper":"_newsletter-wrapper_2vba5_332","banner-container":"_banner-container_2vba5_345","newsletter-provider-wrapper":"_newsletter-provider-wrapper_2vba5_358","newsletter-root-banner":"_newsletter-root-banner_2vba5_371","banner-background":"_banner-background_2vba5_392","newsletter-provider-wrapper-background":"_newsletter-provider-wrapper-background_2vba5_401"},fd=({invalid_message:e,master_data_field:t,placeholder:r,required:s=!1,CONSTANTS:o})=>{const{isMobile:a}=ne(),{inputsStatus:i,setInputsStatus:c,setFormStatus:l,variant:u}=Ss();return n.jsx(d.TextField.Structure,{className:`${xe["textfield-structure-modifier"]} ${u}`,input:n.jsx(d.TextField.Input,{mode:"simple",label:r,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(p=>({...p,[t]:"none"})),l("idle"))},required:s}),supportText:i[t]==="error"||i[t]==="required"?n.jsx("div",{className:u==="horizontal"?xe["support-text-modifier"]:"",children:n.jsx(d.TextField.SupportText,{text:i[t]==="error"?e??o.NEWSLETTER_CONFIGS.messages.invalid_generic:o.NEWSLETTER_CONFIGS.messages.required_field,feedback:"error"})}):null})};fd.displayName="Newsletter.Input";const hd=({formStatus:e,fields:t,CONSTANTS:r})=>n.jsxs(n.Fragment,{children:[Array.isArray(t)&&t.map((s,o)=>n.jsx(fd,{invalid_message:s.invalid_message,master_data_field:s.master_data_field,placeholder:s.placeholder,required:s.required,type:s.type,CONSTANTS:r},`nt-field-${s.master_data_field}-${o}`)),e==="error"&&n.jsx("div",{className:xe.error,children:n.jsx("p",{children:r.NEWSLETTER_CONFIGS.form.status.error})})]});hd.displayName="Newsletter.FormFields";const _d=({formStatus:e,CONSTANTS:t,...r})=>{const{isMobile:s}=ne();return n.jsxs(d.Button,{...r,className:xe["submit-btn"],disabled:e==="success",size:s?"medium":"large",children:[n.jsx("span",{"data-loading":e==="loading","data-label":!0,children:t.NEWSLETTER_CONFIGS.submitLabel}),t.NEWSLETTER_CONFIGS.hasLoadingState&&e==="loading"&&n.jsx(d.Spinner,{className:xe["loading-spinner"],size:"small"})]})};_d.displayName="Newsletter.SubmitButton";const gd=({checkboxRef:e,formStatus:t,setFormStatus:r,CONSTANTS:s})=>{const o=a=>{a.target.checked?(e.current=!0,t==="unchecked"&&r("idle")):e.current=!1};return n.jsxs(n.Fragment,{children:[n.jsx(d.Checkbox,{adornment:n.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"&&n.jsx("div",{className:xe["terms-and-conditions-unchecked"],children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:s.ICONS.alert_circle,size:"small"})},children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{children:s.NEWSLETTER_CONFIGS.messages.terms_and_conditions_not_accepted})})})})]})};gd.displayName="Newsletter.Terms";const yd=({title:e,description:t,CONSTANTS:r})=>n.jsx("div",{className:xe.success,children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{className:xe["text-structure-modifier"],children:[n.jsxs("div",{className:xe["success-title"],children:[n.jsx(d.Icon,{name:r.ICONS.check_circle,size:"medium"}),n.jsx("h3",{children:e})]}),n.jsx("p",{children:t})]})})});yd.displayName="Newsletter.Success";const xd=({formPayloadOptionals:e,masterDataEntity:t,banner:r,termsDescription:s,lgpdLinkLable:o,lgpdLink:a,variant:i,CONSTANTS:c})=>{const{checkboxRef:l,fields:u,formStatus:p,hasTermsAndConditions:f,handleClickToSubmit:m,handleSubmit:h,setFormStatus:_}=Ss();return n.jsx(n.Fragment,{children:p==="success"?n.jsx(yd,{description:c.NEWSLETTER_CONFIGS.messages.success_description,title:c.NEWSLETTER_CONFIGS.messages.success_title,CONSTANTS:c}):n.jsxs(n.Fragment,{children:[n.jsxs("form",{className:xe["form-wrapper"],onSubmit:y=>h(y,e,t),children:[n.jsx(hd,{formStatus:p,fields:u,CONSTANTS:c}),f&&n.jsx(gd,{checkboxRef:l,formStatus:p,setFormStatus:_,CONSTANTS:c}),n.jsx(_d,{formStatus:p,type:"submit",variant:"primary",onClick:m,CONSTANTS:c})]}),(r||i==="vertical")&&n.jsxs("div",{className:xe.lgpd,children:[s&&n.jsx("p",{children:s}),o&&n.jsx(ze,{href:a,children:o})]})]})})};xd.displayName="Newsletter.Form";const Ng=["horizontal","vertical"],Us=({className:e,description:t,formPayloadOptionals:r,fields:s,masterDataEntity:o,masterDataEmailField:a,masterDataNameField:i,banner:c,altBanner:l,bannerBackground:u,termsDescription:p,lgpdLinkLable:f,lgpdLink:m,title:h,variant:_,borderTop:y,borderBottom:x,CONSTANTS:b,...E})=>{if(!a||!i)return null;const j=d.helpers.ValidateProp({fieldTypes:Ng,property:_,fallback:"horizontal"});return n.jsxs("div",{className:c?u?xe["banner-background"]:xe["newsletter-wrapper"]:"",children:[c&&n.jsx(d.Banner.Container,{className:xe["banner-container"],children:n.jsx(d.Banner.ImageWrapper,{children:n.jsx(Ie.Image,{src:c,alt:l,width:"1920",height:"500"})})}),n.jsx("div",{className:c?xe["newsletter-provider-wrapper"+(u?"-background":"")]:"",children:n.jsx(Yi,{fields:s,masterDataEmailField:a,masterDataNameField:i,variant:j,CONSTANTS:b,children:n.jsx("div",{...E,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:n.jsxs("div",{className:c||j==="vertical"?xe["newsletter-container-banner"]:xe["newsletter-container"],children:[n.jsxs("div",{className:xe["content-text"],children:[n.jsx("h2",{children:h}),n.jsx("p",{children:t}),!c&&j==="horizontal"&&n.jsxs("div",{className:xe.lgpd,children:[n.jsx("p",{children:p}),f&&n.jsx(ze,{target:"_blank",href:m,children:f})]})]}),n.jsx(xd,{formPayloadOptionals:r,masterDataEntity:o,CONSTANTS:b,banner:c,lgpdLink:m,lgpdLinkLable:f,termsDescription:p,variant:j})]})})})})]})};Us.displayName="Newsletter";const vd=({children:e,...t})=>n.jsx("div",{...t,children:e});vd.displayName="CallToAction";const Ig="_wrapper_aejhu_1",Rg="_body_aejhu_8",Nn={wrapper:Ig,body:Rg,"wrapper-body":"_wrapper-body_aejhu_16","accordion-modifier":"_accordion-modifier_aejhu_32"},wg=({children:e,className:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat(Nn.wrapper,t),children:e}),Ag=({data:e,ICONS:t})=>{const[r,s]=g.useState(null),o=i=>{s(c=>c===i?null:i)},{router:a}=ce();return n.jsx("div",{className:d.helpers.classNameConcat(Nn.body),children:Array.isArray(e)&&(e==null?void 0:e.map((i,c)=>{var f;const l=r===i.id,u=i.buttonHref&&i.buttonHref!=="#",p=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 n.jsx("div",{children:i.type==="button"?n.jsxs(n.Fragment,{children:[n.jsx(d.Button,{variant:"tertiary",mode:i.buttonMode??"default",size:i.buttonSize??"medium",iconNameStart:t[i.buttonIcon]??i.buttonIcon,...p,style:{marginTop:16},children:i.buttonLabel}),n.jsx(d.Utils.Divider,{direction:"horizontal",size:"small",style:{height:16}})]}):n.jsxs(d.Accordion.Wrapper,{className:d.helpers.classNameConcat(Nn["accordion-modifier"]),children:[n.jsx(d.Accordion.Header,{id:`${c}-${i.title}`,closeIndicator:l?n.jsx(d.Icon,{name:t.arrow_up,size:"medium"}):void 0,openIndicator:l?void 0:n.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),title:"accordion-header",onClick:()=>o(i.id),children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h2",{className:"typography-style-body-sm",children:i.title})})})}),n.jsx(d.Accordion.Body,{title:"accordion-body",children:n.jsx(d.TextStructure.Root,{children:l&&n.jsxs(d.TextStructure.DivWrapper,{children:[i.subtitle?n.jsx("h3",{className:"typography-style-body-md",children:i.subtitle}):n.jsx(n.Fragment,{}),n.jsx("p",{className:"typography-style-caption",children:i.description}),i.buttonLabel&&i.buttonHref?n.jsx(ze,{href:i.buttonHref??"#",mode:i.buttonMode??"default",size:i.buttonSize??"medium",adornments:(f=i.buttonIcon)!=null&&f.length?{end:n.jsx(d.Icon,{name:t[i.buttonIcon]??i.buttonIcon})}:void 0,children:i.buttonLabel}):n.jsx(n.Fragment,{})]})})})]})},i.id)}))})},Tg=({className:e,data:t,ICONS:r,...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?n.jsxs(wg,{...s,className:e,children:[n.jsx("div",{className:Nn["wrapper-body"],hidden:!o,children:o&&n.jsx(Ag,{data:i.content,ICONS:r})}),n.jsx(vd,{children:n.jsx("div",{onClick:l,children:o?n.jsx(d.Button,{iconNameEnd:r.close,size:(i==null?void 0:i.helpButtonSize)??"x-large"}):n.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})})})]}):n.jsx(n.Fragment,{})},Lg="_formContainer_zwlly_1",kg="_formFieldGroup_zwlly_6",Og="_formFieldGroupName_zwlly_10",Mg="_formFieldWrapper_zwlly_20",Dg="_formFieldInput_zwlly_30",zg="_success_zwlly_73",$g="_button_zwlly_110",Fg="_error_zwlly_114",nt={formContainer:Lg,formFieldGroup:kg,formFieldGroupName:Og,formFieldWrapper:Mg,formFieldInput:Dg,success:zg,"text-structure-modifier":"_text-structure-modifier_zwlly_85",button:$g,error:Fg},Bg=({group:e,children:t,className:r})=>n.jsx(n.Fragment,{children:n.jsxs("div",{className:d.helpers.classNameConcat(nt.formFieldGroup,r),children:[n.jsx("h1",{className:nt.formFieldGroupName,children:e.groupLabel}),t]},e.groupLabel)});async function Ug(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 Hg=async e=>await fetch("/api/dito-ingest",{method:"POST",body:JSON.stringify(e)}).then(r=>r.json()),bd=g.createContext({});function jd({children:e,groups:t,masterDataEntity:r,postFn:s,actionName:o="",originName:a="",POPUP_SUBMITTED_STORAGE:i}){const[c,l]=g.useState(!1),[u,p]=g.useState({}),[f,m]=g.useState([]),[h,_]=g.useState("idle"),[y,x]=g.useState(""),b=({target:{name:j,value:v}})=>{p({...u,[j]:v})},E=j=>{j.preventDefault(),s({body:{masterDataEntity:r,payload:u}}).then(async({Message:v})=>{if(v){const S=v.match(/'(.*?[^\\])'/g)||[];var P="-";for(const C of S){const I=C.substring(1,C.length-1),T=t.flatMap(k=>k.fields).find(({name:k})=>k===I);x(I),T&&(P=T.name)}return _("error"),m([P])}if(u.email){const S=await Ug(u.email||""),C=new Date().toISOString();Hg([{user_id:S,timestamp:C,type:"IDENTIFY",traits:{id:S,created_at:C,name:u.name,email:u.email,phone:u==null?void 0:u.phone}},{action:o,timestamp:C,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"),p({}),l(!0),_("success"),m([])})};return n.jsx(bd.Provider,{value:{formErrors:f,handleInputChange:b,submitForm:E,formData:u,status:h,fieldMessage:y,success:c,setSuccess:l},children:e})}function qn(){return g.useContext(bd)}const qg=({fields:e,className:t})=>{const{formData:r,handleInputChange:s,formErrors:o}=qn();return n.jsx("div",{className:d.helpers.classNameConcat(nt.formFieldWrapper,t),children:e.map(({label:a,name:i,required:c,width:l="medium"})=>n.jsx(d.TextField.Input,{label:`${a}${c?"*":""}`,title:i,value:r[i]||"",name:i,sizeVariant:"large",onChange:s,required:c,feedback:o.includes(i)?"error":"none",className:nt.formFieldInput,"data-inputsize":l},i))})},Vg=({FORM_CONFIGS:e,ICONS:t})=>{const{router:r}=ce();return n.jsxs("div",{className:nt.success,children:[n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:t.check_circle,size:"medium"})},children:n.jsx(d.TextStructure.DivWrapper,{className:nt["text-structure-modifier"],children:n.jsx("p",{children:e.successMessage})})}),n.jsx(d.Button,{size:"large",onClick:()=>r.push("/"),className:nt.button,children:e.returnButton})]})},Wg=({FORM_CONFIGS:e,ICONS:t})=>{const{fieldMessage:r}=qn();return n.jsx("div",{className:nt.error,children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:t.delete_circle,size:"small"})},children:n.jsx(d.TextStructure.DivWrapper,{className:nt["text-structure-modifier"],children:n.jsxs("p",{children:[e.errorMessage,r]})})})})},Gg=({children:e,className:t,ICONS:r,FORM_CONFIGS:s})=>{const{submitForm:o,status:a}=qn();return n.jsx("form",{onSubmit:o,className:d.helpers.classNameConcat(nt.formContainer,t),children:a==="success"?n.jsx(Vg,{ICONS:r,FORM_CONFIGS:s}):n.jsxs(n.Fragment,{children:[e,a==="error"&&n.jsx(Wg,{ICONS:r,FORM_CONFIGS:s})]})})},Kg=e=>{const{children:t,className:r}=e;return n.jsx(jd,{...e,children:n.jsx(Gg,{ICONS:e.ICONS,FORM_CONFIGS:e.FORM_CONFIGS,className:r,children:t})})},Rt={Root:Kg,FieldGroup:Bg,FieldWrapper:qg},Xg="_button_1e35m_39",pt={"banner-container":"_banner-container_1e35m_1","banner-background":"_banner-background_1e35m_6","form-root":"_form-root_1e35m_15",button:Xg,"form-fied-wrapper":"_form-fied-wrapper_1e35m_52"};function Yg({content:e,sections:t,FORM_CONFIGS:r,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 n.jsx("div",{children:n.jsxs(d.Banner.Container,{className:pt["banner-container"],children:[n.jsx(d.Banner.ImageWrapper,{children:n.jsx(Ie.Image,{className:pt["banner-background"],src:i?e.bannerMobile:e.bannerDesk,alt:e.altBanner,width:"1920",height:"500"})}),n.jsxs(Rt.Root,{postFn:o,ICONS:s,FORM_CONFIGS:r,groups:c.groups||[],masterDataEntity:c.masterDataEntity||"",className:pt["form-root"],POPUP_SUBMITTED_STORAGE:a,children:[c.groups.map(u=>n.jsx(Rt.FieldGroup,{group:u,children:n.jsx(Rt.FieldWrapper,{fields:u.fields,className:pt["form-fied-wrapper"]})},u.groupLabel)),n.jsxs("div",{children:[n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{className:"typography-style-body-xs",children:e.requiredMessage})}),n.jsx("div",{className:pt["button-wrapper"],children:n.jsx("div",{className:pt["button-frame"],children:n.jsx(d.Button,{size:"large",type:"submit",className:pt.button,children:e.buttonLabel})})})]})]})]})})}const Qg="_content_1jj9i_36",Zg="_trends_1jj9i_47",Jg="_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:Qg,trends:Zg,"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:Jg,"search-modal__modal":"_search-modal__modal_1jj9i_100"},Cd=g.createContext({}),ey=({children:e,term:t})=>{const[r,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]),n.jsx(Cd.Provider,{value:g.useMemo(()=>({suggestedTerms:r,loading:o,setLoading:a}),[r,o]),children:e})},ty=({children:e,...t})=>n.jsx(ey,{...t,children:e}),ny=()=>{const e=g.useContext(Cd);if(!e)throw new Error("useSuggestedTermsContext must be used within a SuggestedTermsProvider");return e},Or=(e,t,r=24,s=1,o="release:desc")=>{const a=`/search?query=${t??""}&count=${r}&page=${s}${o?`&sort=${o.replace("_",":")}`:""}`;e.push(a)},Sd=({placeholder:e,noResultsTitle:t,noResultsLabel:r,noResultsTermText:s,handleClose:o,setTerm:a,ICONS:i,ITEMS_DEFAULT_SORT:c,ITEMS_PER_PAGE:l,SEARCH_MODAL:u})=>{const[p,f]=g.useState(""),{suggestedTerms:m,loading:h,setLoading:_}=ny(),{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))},E=v=>{v.key==="Enter"&&(p==null?void 0:p.length)>2&&(o(),Or(y,p,l,1,c))},j=v=>{o(),Or(y,v,l,1,c)};return g.useEffect(()=>{if(clearTimeout(x.current),p.length<=2||m.length>0){_(!1);return}return _(!0),x.current=setTimeout(()=>{Or(y,p,l,1,c),_(!1),o()},2e3),()=>{clearTimeout(x.current)}},[p,m]),n.jsx(d.DropDown.AutoComplete,{className:Ue["modal-auto-complete"],onKeyDown:E,onInputChange:b,placeholder:e,stopClickPropagation:!1,adornment:{end:h?n.jsx(d.Spinner,{size:"small"}):n.jsx(d.Button,{variant:"tertiary",size:"small",iconNameStart:i.search,onClick:()=>{j(p)},disabled:!(p.length>2)})},children:(m==null?void 0:m.length)>0&&n.jsx(n.Fragment,{children:(m==null?void 0:m.length)>0&&(p==null?void 0:p.length)>2?n.jsx(d.DropDown.AutoCompleteList,{className:Ue["modal-auto-complete__dropdown"],seeAll:n.jsx("span",{onClick:()=>j(p),children:s+p}),children:m.map((v,P)=>n.jsx(d.DropDown.ListItemWithLink,{children:n.jsx(ze,{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&&(p==null?void 0:p.length)>3&&(m==null?void 0:m.length)===0&&n.jsxs(d.DropDown.AutoCompleteList,{className:Ue["modal-search-empty"],children:[n.jsx(d.DropDown.NotResults,{description:r,title:t}),n.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:n.jsx(d.Icon,{name:i.arrow_right,size:"medium"})},children:u.EMPTY.ALL_TERMS_LABEL})]})})})};Sd.displayName="SearchModal.AutoComplete";function ry({title:e,ICONS:t}){const{isMobile:r}=ne();return n.jsx(d.Modal.Header,{navigation:"top",className:Ue["modal-header"],children:n.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!r,children:[n.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),n.jsx(d.Modal.Title,{navigation:"top",className:Ue["search-modal__title"],title:e}),n.jsx(d.Button,{className:Ue["modal-header__close-button"],"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})})}const Ed=g.createContext({searches:[],isLoading:!1,error:null}),sy=({children:e})=>{const[t,r]=g.useState([]),[s,o]=g.useState(!0),[a,i]=g.useState(null);return g.useEffect(()=>{(async()=>{try{o(!0);const l=await fetch("/api/search/topSearch");if(!l.ok)throw new Error(`Erro ao buscar os dados: ${l.status}`);const u=await l.json();r(u.data.searches||[])}catch(l){i(l instanceof Error?l.message:"Erro desconhecido")}finally{o(!1)}})()},[]),n.jsx(Ed.Provider,{value:g.useMemo(()=>({searches:t,isLoading:s,error:a}),[t,s,a]),children:e})},oy=()=>{const e=g.useContext(Ed);if(!e)throw new Error("useTopSearches must be used within a TopSearchesProvider");return e},ay=({title:e,allTermsLabel:t,allTermsUrl:r,qtyTrends:s,handleClose:o,ICONS:a,ITEMS_PER_PAGE:i})=>{const{searches:c,isLoading:l}=oy(),{router:u}=ce(),p=Array.isArray(c)?c:[];return n.jsx(n.Fragment,{children:!l&&p.length>0?n.jsx(d.ComponentList.Structure,{className:Ue.trends,title:e,children:n.jsxs("div",{className:Ue["trends-content"],children:[n.jsx(d.ComponentList.List,{columns:1,children:p.slice(0,s).map((f,m)=>n.jsx(d.ComponentList.ListItem,{className:Ue["trends-item"],children:n.jsx(ze,{href:`/search?query=${f.term}&count=${i}&page=1`,size:"x-small",adornments:{end:n.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},disableUnderline:!0,title:f.term,onClick:()=>o(),children:f.term})},`list-item-${m}`))}),n.jsx(d.Button,{className:"all-terms",variant:"tertiary",size:"x-small",underline:!1,onClick:()=>{o(),u.push(r)},adornment:{end:n.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},children:t})]})}):null})},Pd=({SectionZone:e,name:t,storeId:r,previewId:s})=>{const[o,a]=g.useState();return g.useEffect(()=>{o||A.fetchContentType("search",{name:t,storeId:r,previewId:s}).then(i=>{i!=null&&i.data&&Array.isArray(i.data)&&a(i.data[0])})},[]),n.jsx(e,{data:o??[]})};function iy(e){const{SectionZone:t,name:r,storeId:s,previewId:o}=e;return n.jsx("div",{className:Ue.content,children:n.jsx(Pd,{SectionZone:t,name:r,storeId:s,previewId:o})})}const Nd=({className:e,trends:t,CONSTANTS:r,cmsConfig:s})=>{const[o,a]=g.useState(""),{isMobile:i}=ne(),c=Ya(),{setValue:l}=Rn(),{SEARCH_MODAL:u,ICONS:p,ITEMS_PER_PAGE:f,ITEMS_DEFAULT_SORT:m}=r;return n.jsxs(d.Modal.Root,{isMobile:i??!1,variant:i?"sideBottom":"sideRight",isOpen:c,setIsOpen:l,className:`${Ue.modal} ${Ue["search-modal__modal"]} ${e??""}`,children:[n.jsx(ry,{title:u.HEADER.TITLE,ICONS:p}),n.jsxs(d.Modal.Body,{className:Ue["modal-content-body"],children:[n.jsx(ty,{term:o,children:n.jsx(Sd,{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:p,ITEMS_DEFAULT_SORT:m,ITEMS_PER_PAGE:f,SEARCH_MODAL:u})}),t?n.jsx(sy,{children:n.jsx(ay,{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:p,ITEMS_PER_PAGE:f})}):null,s?n.jsx(iy,{...s}):null]})]})};Nd.displayName="SearchModal";const vn={teamComponents:{AddToCart:Ps,BackToTop:ym,HelpButton:Tg,BuyPackage:Wc,Filter:{...rt,helpers:cu},...o_,FreightCalculation:Ql,Header:Yl,Link:ze,Media:Ie,PLPNavigation:ut,ProductCard:me,ProductList:tt,ProductVariationList:Qe,Sort:$n,UserMenu:Dn,Newsletter:Us,Form:Rt},template:{minicart:Oe,pdc:id,pdc_composites:Je,pdp:q_,searchResult:pd,wishList:Ac,LPCadastro:Yg,SearchModal:Nd},utils:{EventCollector:yg,ExternalScripts:Cg,LinkOrNotLink:Xt,ObserverWrapper:Mn,SnackBarComponent:It,DraftJsLinkWrapper:Wu}},cy=(e,t)=>{const r=e.map(o=>`'${o.source}'`).join(`,
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,p.isInAmpMode)(P),children:v})}const E=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)}(mn,mn.exports)),mn.exports}var Nr={},Vo;function Xh(){return Vo||(Vo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ImageConfigContext",{enumerable:!0,get:function(){return o}});const r=Le._(g),s=Bn,o=r.default.createContext(s.imageConfigDefault);process.env.NODE_ENV!=="production"&&(o.displayName="ImageConfigContext")}(Nr)),Nr}var Ir={},Rr={},wr={exports:{}},Wo;function Eu(){return Wo||(Wo=1,(()=>{var e={170:(o,a,i)=>{const c=i(510),l=()=>{if(typeof navigator<"u"&&navigator.platform){const p=navigator.platform.toLowerCase();return p==="win32"||p==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};function u(p,f,m=!1){return f&&(f.windows===null||f.windows===void 0)&&(f={...f,windows:l()}),c(p,f,m)}Object.assign(u,c),o.exports=u},154:o=>{const a="\\\\/",i=`[^${a}]`,c="\\.",l="\\+",u="\\?",p="\\/",f="(?=.)",m="[^/]",h=`(?:${p}|$)`,_=`(?:^|${p})`,y=`${c}{1,2}${h}`,x=`(?!${c})`,b=`(?!${_}${y})`,E=`(?!${c}{0,1}${h})`,j=`(?!${y})`,v=`[^.${p}]`,P=`${m}*?`,C={DOT_LITERAL:c,PLUS_LITERAL:l,QMARK_LITERAL:u,SLASH_LITERAL:p,ONE_CHAR:f,QMARK:m,END_ANCHOR:h,DOTS_SLASH:y,NO_DOT:x,NO_DOTS:b,NO_DOT_SLASH:E,NO_DOTS_SLASH:j,QMARK_NO_DOT:v,STAR:P,START_ANCHOR:_,SEP:"/"},I={...C,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:"\\"},L={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:L,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(T){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${T.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(T){return T===!0?I:C}}},697:(o,a,i)=>{const c=i(154),l=i(96),{MAX_LENGTH:u,POSIX_REGEX_SOURCE:p,REGEX_NON_SPECIAL_CHARS:f,REGEX_SPECIAL_CHARS_BACKREF:m,REPLACEMENTS:h}=c,_=(b,E)=>{if(typeof E.expandRange=="function")return E.expandRange(...b,E);b.sort();const j=`[${b.join("-")}]`;try{new RegExp(j)}catch{return b.map(P=>l.escapeRegex(P)).join("..")}return j},y=(b,E)=>`Missing ${b}: "${E}" - use "\\\\${E}" to match literal characters`,x=(b,E)=>{if(typeof b!="string")throw new TypeError("Expected a string");b=h[b]||b;const j={...E},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||""},C=[S],I=j.capture?"":"?:",L=c.globChars(j.windows),T=c.extglobChars(L),{DOT_LITERAL:k,PLUS_LITERAL:M,SLASH_LITERAL:Q,ONE_CHAR:D,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}=L,se=V=>`(${I}(?:(?!${le}${V.dot?U:k}).)*?)`,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 R={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:C};b=l.removePrefix(b,R),P=b.length;const W=[],ae=[],he=[];let N=S,w;const Ne=()=>R.index===P-1,q=R.peek=(V=1)=>b[R.index+V],K=R.advance=()=>b[++R.index]||"",_e=()=>b.slice(R.index+1),Re=(V="",X=0)=>{R.consumed+=V,R.index+=X},be=V=>{R.output+=V.output!=null?V.output:V.value,Re(V.value)},ge=()=>{let V=1;for(;q()==="!"&&(q(2)!=="("||q(3)==="?");)K(),R.start++,V++;return V%2===0?!1:(R.negated=!0,R.start++,!0)},Ae=V=>{R[V]++,he.push(V)},je=V=>{R[V]--,he.pop()},z=V=>{if(N.type==="globstar"){const X=R.braces>0&&(V.type==="comma"||V.type==="brace"),O=V.extglob===!0||W.length&&(V.type==="pipe"||V.type==="paren");V.type!=="slash"&&V.type!=="paren"&&!X&&!O&&(R.output=R.output.slice(0,-N.output.length),N.type="star",N.value="*",N.output=J,R.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,C.push(V),N=V},pe=(V,X)=>{const O={...T[X],conditions:1,inner:""};O.prev=N,O.parens=R.parens,O.output=R.output;const B=(j.capture?"(":"")+O.open;Ae("parens"),z({type:V,value:X,output:R.output?"":D}),z({type:"paren",extglob:!0,value:K(),output:B}),W.push(O)},ye=V=>{let X=V.close+(j.capture?")":""),O;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("*")&&(O=_e())&&/^\.[^\\/.]+$/.test(O)){const ee=x(O,{...E,fastpaths:!1}).output;X=V.close=`)${ee})${B})`}V.prev.type==="bos"&&(R.negatedExtglob=!0)}z({type:"paren",extglob:!0,value:w,output:X}),je("parens")};if(j.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(b)){let V=!1,X=b.replace(m,(O,B,ee,fe,Pe,Vn)=>fe==="\\"?(V=!0,O):fe==="?"?B?B+fe+(Pe?H.repeat(Pe.length):""):Vn===0?$+(Pe?H.repeat(Pe.length):""):H.repeat(ee.length):fe==="."?k.repeat(ee.length):fe==="*"?B?B+fe+(Pe?J:""):J:B?O:`\\${O}`);return V===!0&&(j.unescape===!0?X=X.replace(/\\/g,""):X=X.replace(/\\+/g,O=>O.length%2===0?"\\\\":O?"\\":"")),X===b&&j.contains===!0?(R.output=b,R):(R.output=l.wrapOutput(X,R,E),R)}for(;!Ne();){if(w=K(),w==="\0")continue;if(w==="\\"){const O=q();if(O==="/"&&j.bash!==!0||O==="."||O===";")continue;if(!O){w+="\\",z({type:"text",value:w});continue}const B=/^\\+/.exec(_e());let ee=0;if(B&&B[0].length>2&&(ee=B[0].length,R.index+=ee,ee%2!==0&&(w+="\\")),j.unescape===!0?w=K():w+=K(),R.brackets===0){z({type:"text",value:w});continue}}if(R.brackets>0&&(w!=="]"||N.value==="["||N.value==="[^")){if(j.posix!==!1&&w===":"){const O=N.value.slice(1);if(O.includes("[")&&(N.posix=!0,O.includes(":"))){const B=N.value.lastIndexOf("["),ee=N.value.slice(0,B),fe=N.value.slice(B+2),Pe=p[fe];if(Pe){N.value=ee+Pe,R.backtrack=!0,K(),!S.output&&C.indexOf(N)===1&&(S.output=D);continue}}}(w==="["&&q()!==":"||w==="-"&&q()==="]")&&(w=`\\${w}`),w==="]"&&(N.value==="["||N.value==="[^")&&(w=`\\${w}`),j.posix===!0&&w==="!"&&N.value==="["&&(w="^"),N.value+=w,be({value:w});continue}if(R.quotes===1&&w!=='"'){w=l.escapeRegex(w),N.value+=w,be({value:w});continue}if(w==='"'){R.quotes=R.quotes===1?0:1,j.keepQuotes===!0&&z({type:"text",value:w});continue}if(w==="("){Ae("parens"),z({type:"paren",value:w});continue}if(w===")"){if(R.parens===0&&j.strictBrackets===!0)throw new SyntaxError(y("opening","("));const O=W[W.length-1];if(O&&R.parens===O.parens+1){ye(W.pop());continue}z({type:"paren",value:w,output:R.parens?")":"\\)"}),je("parens");continue}if(w==="["){if(j.nobracket===!0||!_e().includes("]")){if(j.nobracket!==!0&&j.strictBrackets===!0)throw new SyntaxError(y("closing","]"));w=`\\${w}`}else Ae("brackets");z({type:"bracket",value:w});continue}if(w==="]"){if(j.nobracket===!0||N&&N.type==="bracket"&&N.value.length===1){z({type:"text",value:w,output:`\\${w}`});continue}if(R.brackets===0){if(j.strictBrackets===!0)throw new SyntaxError(y("opening","["));z({type:"text",value:w,output:`\\${w}`});continue}je("brackets");const O=N.value.slice(1);if(N.posix!==!0&&O[0]==="^"&&!O.includes("/")&&(w=`/${w}`),N.value+=w,be({value:w}),j.literalBrackets===!1||l.hasRegexChars(O))continue;const B=l.escapeRegex(N.value);if(R.output=R.output.slice(0,-N.value.length),j.literalBrackets===!0){R.output+=B,N.value=B;continue}N.value=`(${I}${B}|${N.value})`,R.output+=N.value;continue}if(w==="{"&&j.nobrace!==!0){Ae("braces");const O={type:"brace",value:w,output:"(",outputIndex:R.output.length,tokensIndex:R.tokens.length};ae.push(O),z(O);continue}if(w==="}"){const O=ae[ae.length-1];if(j.nobrace===!0||!O){z({type:"text",value:w,output:w});continue}let B=")";if(O.dots===!0){const ee=C.slice(),fe=[];for(let Pe=ee.length-1;Pe>=0&&(C.pop(),ee[Pe].type!=="brace");Pe--)ee[Pe].type!=="dots"&&fe.unshift(ee[Pe].value);B=_(fe,j),R.backtrack=!0}if(O.comma!==!0&&O.dots!==!0){const ee=R.output.slice(0,O.outputIndex),fe=R.tokens.slice(O.tokensIndex);O.value=O.output="\\{",w=B="\\}",R.output=ee;for(const Pe of fe)R.output+=Pe.output||Pe.value}z({type:"brace",value:w,output:B}),je("braces"),ae.pop();continue}if(w==="|"){W.length>0&&W[W.length-1].conditions++,z({type:"text",value:w});continue}if(w===","){let O=w;const B=ae[ae.length-1];B&&he[he.length-1]==="braces"&&(B.comma=!0,O="|"),z({type:"comma",value:w,output:O});continue}if(w==="/"){if(N.type==="dot"&&R.index===R.start+1){R.start=R.index+1,R.consumed="",R.output="",C.pop(),N=S;continue}z({type:"slash",value:w,output:Q});continue}if(w==="."){if(R.braces>0&&N.type==="dot"){N.value==="."&&(N.output=k);const O=ae[ae.length-1];N.type="dots",N.output+=w,N.value+=w,O.dots=!0;continue}if(R.braces+R.parens===0&&N.type!=="bos"&&N.type!=="slash"){z({type:"text",value:w,output:k});continue}z({type:"dot",value:w,output:k});continue}if(w==="?"){if(!(N&&N.value==="(")&&j.noextglob!==!0&&q()==="("&&q(2)!=="?"){pe("qmark",w);continue}if(N&&N.type==="paren"){const B=q();let ee=w;(N.value==="("&&!/[!=<:]/.test(B)||B==="<"&&!/<([!=]|\w+>)/.test(_e()))&&(ee=`\\${w}`),z({type:"text",value:w,output:ee});continue}if(j.dot!==!0&&(N.type==="slash"||N.type==="bos")){z({type:"qmark",value:w,output:Z});continue}z({type:"qmark",value:w,output:H});continue}if(w==="!"){if(j.noextglob!==!0&&q()==="("&&(q(2)!=="?"||!/[!=<:]/.test(q(3)))){pe("negate",w);continue}if(j.nonegate!==!0&&R.index===0){ge();continue}}if(w==="+"){if(j.noextglob!==!0&&q()==="("&&q(2)!=="?"){pe("plus",w);continue}if(N&&N.value==="("||j.regex===!1){z({type:"plus",value:w,output:M});continue}if(N&&(N.type==="bracket"||N.type==="paren"||N.type==="brace")||R.parens>0){z({type:"plus",value:w});continue}z({type:"plus",value:M});continue}if(w==="@"){if(j.noextglob!==!0&&q()==="("&&q(2)!=="?"){z({type:"at",extglob:!0,value:w,output:""});continue}z({type:"text",value:w});continue}if(w!=="*"){(w==="$"||w==="^")&&(w=`\\${w}`);const O=f.exec(_e());O&&(w+=O[0],R.index+=O[0].length),z({type:"text",value:w});continue}if(N&&(N.type==="globstar"||N.star===!0)){N.type="star",N.star=!0,N.value+=w,N.output=J,R.backtrack=!0,R.globstar=!0,Re(w);continue}let V=_e();if(j.noextglob!==!0&&/^\([^?]/.test(V)){pe("star",w);continue}if(N.type==="star"){if(j.noglobstar===!0){Re(w);continue}const O=N.prev,B=O.prev,ee=O.type==="slash"||O.type==="bos",fe=B&&(B.type==="star"||B.type==="globstar");if(j.bash===!0&&(!ee||V[0]&&V[0]!=="/")){z({type:"star",value:w,output:""});continue}const Pe=R.braces>0&&(O.type==="comma"||O.type==="brace"),Vn=W.length&&(O.type==="pipe"||O.type==="paren");if(!ee&&O.type!=="paren"&&!Pe&&!Vn){z({type:"star",value:w,output:""});continue}for(;V.slice(0,3)==="/**";){const Zt=b[R.index+4];if(Zt&&Zt!=="/")break;V=V.slice(3),Re("/**",3)}if(O.type==="bos"&&Ne()){N.type="globstar",N.value+=w,N.output=se(j),R.output=N.output,R.globstar=!0,Re(w);continue}if(O.type==="slash"&&O.prev.type!=="bos"&&!fe&&Ne()){R.output=R.output.slice(0,-(O.output+N.output).length),O.output=`(?:${O.output}`,N.type="globstar",N.output=se(j)+(j.strictSlashes?")":"|$)"),N.value+=w,R.globstar=!0,R.output+=O.output+N.output,Re(w);continue}if(O.type==="slash"&&O.prev.type!=="bos"&&V[0]==="/"){const Zt=V[1]!==void 0?"|$":"";R.output=R.output.slice(0,-(O.output+N.output).length),O.output=`(?:${O.output}`,N.type="globstar",N.output=`${se(j)}${Q}|${Q}${Zt})`,N.value+=w,R.output+=O.output+N.output,R.globstar=!0,Re(w+K()),z({type:"slash",value:"/",output:""});continue}if(O.type==="bos"&&V[0]==="/"){N.type="globstar",N.value+=w,N.output=`(?:^|${Q}|${se(j)}${Q})`,R.output=N.output,R.globstar=!0,Re(w+K()),z({type:"slash",value:"/",output:""});continue}R.output=R.output.slice(0,-N.output.length),N.type="globstar",N.output=se(j),N.value+=w,R.output+=N.output,R.globstar=!0,Re(w);continue}const X={type:"star",value:w,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=w,z(X);continue}(R.index===R.start||N.type==="slash"||N.type==="dot")&&(N.type==="dot"?(R.output+=Y,N.output+=Y):j.dot===!0?(R.output+=G,N.output+=G):(R.output+=ie,N.output+=ie),q()!=="*"&&(R.output+=D,N.output+=D)),z(X)}for(;R.brackets>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing","]"));R.output=l.escapeLast(R.output,"["),je("brackets")}for(;R.parens>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing",")"));R.output=l.escapeLast(R.output,"("),je("parens")}for(;R.braces>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing","}"));R.output=l.escapeLast(R.output,"{"),je("braces")}if(j.strictSlashes!==!0&&(N.type==="star"||N.type==="bracket")&&z({type:"maybe_slash",value:"",output:`${Q}?`}),R.backtrack===!0){R.output="";for(const V of R.tokens)R.output+=V.output!=null?V.output:V.value,V.suffix&&(R.output+=V.suffix)}return R};x.fastpaths=(b,E)=>{const j={...E},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:C,ONE_CHAR:I,DOTS_SLASH:L,NO_DOT:T,NO_DOTS:k,NO_DOTS_SLASH:M,STAR:Q,START_ANCHOR:D}=c.globChars(j.windows),U=j.dot?k:T,F=j.dot?M:T,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}(?:(?!${D}${ie.dot?L: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}${C}${I}${F}${H}`;case"**":return U+Z(j);case"**/*":return`(?:${U}${Z(j)}${C})?${F}${I}${H}`;case"**/*.*":return`(?:${U}${Z(j)}${C})?${F}${H}${S}${I}${H}`;case"**/.*":return`(?:${U}${Z(j)}${C})?${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+=`${C}?`),se},o.exports=x},510:(o,a,i)=>{const c=i(716),l=i(697),u=i(96),p=i(154),f=h=>h&&typeof h=="object"&&!Array.isArray(h),m=(h,_,y=!1)=>{if(Array.isArray(h)){const C=h.map(L=>m(L,_,y));return L=>{for(const T of C){const k=T(L);if(k)return k}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=_||{},E=b.windows,j=x?m.compileRe(h,_):m.makeRe(h,_,!1,!0),v=j.state;delete j.state;let P=()=>!1;if(b.ignore){const C={..._,ignore:null,onMatch:null,onResult:null};P=m(b.ignore,C,y)}const S=(C,I=!1)=>{const{isMatch:L,match:T,output:k}=m.test(C,j,_,{glob:h,posix:E}),M={glob:h,state:v,regex:j,posix:E,input:C,output:k,match:T,isMatch:L};return typeof b.onResult=="function"&&b.onResult(M),L===!1?(M.isMatch=!1,I?M:!1):P(C)?(typeof b.onIgnore=="function"&&b.onIgnore(M),M.isMatch=!1,I?M:!1):(typeof b.onMatch=="function"&&b.onMatch(M),I?M:!0)};return y&&(S.state=v),S};m.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 E=y||{},j=E.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||E.capture===!0)&&(E.matchBase===!0||E.basename===!0?v=m.matchBase(h,_,y,b):v=_.exec(P)),{isMatch:!!v,match:v,output:P}},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,x=!1)=>{if(y===!0)return h.output;const b=_||{},E=b.contains?"":"^",j=b.contains?"":"$";let v=`${E}(?:${h.output})${j}`;h&&h.negated===!0&&(v=`^(?!${v}).*$`);const P=m.toRegex(v,_);return x===!0&&(P.state=h),P},m.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,_)),m.compileRe(b,_,y,x)},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=p,o.exports=m},716:(o,a,i)=>{const c=i(96),{CHAR_ASTERISK:l,CHAR_AT:u,CHAR_BACKWARD_SLASH:p,CHAR_COMMA:f,CHAR_DOT:m,CHAR_EXCLAMATION_MARK:h,CHAR_FORWARD_SLASH:_,CHAR_LEFT_CURLY_BRACE:y,CHAR_LEFT_PARENTHESES:x,CHAR_LEFT_SQUARE_BRACKET:b,CHAR_PLUS:E,CHAR_QUESTION_MARK:j,CHAR_RIGHT_CURLY_BRACE:v,CHAR_RIGHT_PARENTHESES:P,CHAR_RIGHT_SQUARE_BRACKET:S}=i(154),C=T=>T===_||T===p,I=T=>{T.isPrefix!==!0&&(T.depth=T.isGlobstar?1/0:1)},L=(T,k)=>{const M=k||{},Q=T.length-1,D=M.parts===!0||M.scanToEnd===!0,U=[],F=[],Y=[];let G=T,H=-1,Z=0,re=0,le=!1,se=!1,ie=!1,$=!1,J=!1,R=!1,W=!1,ae=!1,he=!1,N=!1,w=0,Ne,q,K={value:"",depth:0,isGlob:!1};const _e=()=>H>=Q,Re=()=>G.charCodeAt(H+1),be=()=>(Ne=q,G.charCodeAt(++H));for(;H<Q;){q=be();let pe;if(q===p){W=K.backslashes=!0,q=be(),q===y&&(R=!0);continue}if(R===!0||q===y){for(w++;_e()!==!0&&(q=be());){if(q===p){W=K.backslashes=!0,be();continue}if(q===y){w++;continue}if(R!==!0&&q===m&&(q=be())===m){if(le=K.isBrace=!0,ie=K.isGlob=!0,N=!0,D===!0)continue;break}if(R!==!0&&q===f){if(le=K.isBrace=!0,ie=K.isGlob=!0,N=!0,D===!0)continue;break}if(q===v&&(w--,w===0)){R=!1,le=K.isBrace=!0,N=!0;break}}if(D===!0)continue;break}if(q===_){if(U.push(H),F.push(K),K={value:"",depth:0,isGlob:!1},N===!0)continue;if(Ne===m&&H===Z+1){Z+=2;continue}re=H+1;continue}if(M.noext!==!0&&(q===E||q===u||q===l||q===j||q===h)===!0&&Re()===x){if(ie=K.isGlob=!0,$=K.isExtglob=!0,N=!0,q===h&&H===Z&&(he=!0),D===!0){for(;_e()!==!0&&(q=be());){if(q===p){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,D===!0)continue;break}if(q===j){if(ie=K.isGlob=!0,N=!0,D===!0)continue;break}if(q===b){for(;_e()!==!0&&(pe=be());){if(pe===p){W=K.backslashes=!0,be();continue}if(pe===S){se=K.isBracket=!0,ie=K.isGlob=!0,N=!0;break}}if(D===!0)continue;break}if(M.nonegate!==!0&&q===h&&H===Z){ae=K.negated=!0,Z++;continue}if(M.noparen!==!0&&q===x){if(ie=K.isGlob=!0,D===!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,D===!0)continue;break}}M.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&&C(ge.charCodeAt(ge.length-1))&&(ge=ge.slice(0,-1)),M.unescape===!0&&(je&&(je=c.removeBackslashes(je)),ge&&W===!0&&(ge=c.removeBackslashes(ge)));const z={prefix:Ae,input:T,start:Z,base:ge,glob:je,isBrace:le,isBracket:se,isGlob:ie,isExtglob:$,isGlobstar:J,negated:ae,negatedExtglob:he};if(M.tokens===!0&&(z.maxDepth=0,C(q)||F.push(K),z.tokens=F),M.parts===!0||M.tokens===!0){let pe;for(let ye=0;ye<U.length;ye++){const V=pe?pe+1:Z,X=U[ye],O=T.slice(V,X);M.tokens&&(ye===0&&Z!==0?(F[ye].isPrefix=!0,F[ye].value=Ae):F[ye].value=O,I(F[ye]),z.maxDepth+=F[ye].depth),(ye!==0||O!=="")&&Y.push(O),pe=X}if(pe&&pe+1<T.length){const ye=T.slice(pe+1);Y.push(ye),M.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=L},96:(o,a,i)=>{const{REGEX_BACKSLASH:c,REGEX_REMOVE_BACKSLASH:l,REGEX_SPECIAL_CHARS:u,REGEX_SPECIAL_CHARS_GLOBAL:p}=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(p,"\\$1"),a.toPosixSlashes=f=>f.replace(c,"/"),a.removeBackslashes=f=>f.replace(l,m=>m==="\\"?"":m),a.escapeLast=(f,m,h)=>{const _=f.lastIndexOf(m,h);return _===-1?f:f[_-1]==="\\"?a.escapeLast(f,m,_-1):`${f.slice(0,_)}\\${f.slice(_)}`},a.removePrefix=(f,m={})=>{let h=f;return h.startsWith("./")&&(h=h.slice(2),m.prefix="./"),h},a.wrapOutput=(f,m={},h={})=>{const _=h.contains?"":"^",y=h.contains?"":"$";let x=`${_}(?:${f})${y}`;return m.negated===!0&&(x=`(?:^(?!${x}).*$)`),x},a.basename=(f,{windows:m}={})=>{const h=f.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 s=r(170);wr.exports=s})()),wr.exports}var Go;function Yh(){return Go||(Go=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 r=Eu();function s(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=>s(l,c))}}(Rr)),Rr}var Ar={},Ko;function Qh(){return Ko||(Ko=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 r=Eu();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,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=>s(l,c))}}(Ar)),Ar}var Xo;function Pu(){return Xo||(Xo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return s}});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 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:m}=Yh();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}=Qh();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 p=l||((u=a.qualities)==null?void 0:u.reduce((f,m)=>Math.abs(m-t)<Math.abs(f-t)?m:f))||t;return a.path+"?url="+encodeURIComponent(i)+"&w="+c+"&q="+p+(process.env.NEXT_DEPLOYMENT_ID?"&dpl="+process.env.NEXT_DEPLOYMENT_ID:"")}r.__next_img_default=!0;const s=r}(Ir)),Ir}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return j}});const r=Le,s=At,o=n,a=s._(g),i=r._(rs),c=r._(Kh()),l=Os,u=Bn,p=Xh(),f=Fn,m=jc(),h=r._(Pu()),_=process.env.__NEXT_IMAGE_OPTS;typeof window>"u"&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);function y(v,P,S,C,I,L,T){const k=v==null?void 0:v.src;if(!v||v["data-loaded-src"]===k)return;v["data-loaded-src"]=k,("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 D=!1,U=!1;S.current({...Q,nativeEvent:Q,currentTarget:v,target:v,isDefaultPrevented:()=>D,isPropagationStopped:()=>U,persist:()=>{},preventDefault:()=>{D=!0,Q.preventDefault()},stopPropagation:()=>{U=!0,Q.stopPropagation()}})}if(C!=null&&C.current&&C.current(v),process.env.NODE_ENV!=="production"){const Q=new URL(k,"http://n").searchParams.get("url")||k;if(v.getAttribute("data-nimg")==="fill"){if(!L&&(!T||T==="100vw")&&v.getBoundingClientRect().width/window.innerWidth<.6&&(T==="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 D=v.height.toString()!==v.getAttribute("height"),U=v.width.toString()!==v.getAttribute("width");(D&&!U||!D&&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:C,sizes:I,height:L,width:T,decoding:k,className:M,style:Q,fetchPriority:D,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(D),loading:F,width:T,height:L,decoding:k,"data-nimg":G?"fill":"1",className:M,style:Q,sizes:I,srcSet:C,src:S,ref:(0,a.useCallback)(R=>{P&&(typeof P=="function"?P(R):typeof P=="object"&&(P.current=R)),R&&($&&(R.src=R.src),process.env.NODE_ENV!=="production"&&(S||console.error('Image is missing required "src" property:',R),R.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.')),R.complete&&y(R,U,H,Z,re,Y,se))},[S,U,H,Z,re,$,Y,se,P]),onLoad:R=>{const W=R.currentTarget;y(W,U,H,Z,re,Y,se)},onError:R=>{le(!0),U!=="empty"&&re(!0),$&&$(R)}})});function E(v){let{isAppRouter:P,imgAttributes:S}=v;const C={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,C),null):(0,o.jsx)(c.default,{children:(0,o.jsx)("link",{rel:"preload",href:S.srcSet?void 0:S.src,...C},"__nimg-"+S.src+S.srcSet+S.sizes)})}const j=(0,a.forwardRef)((v,P)=>{const C=!(0,a.useContext)(m.RouterContext),I=(0,a.useContext)(p.ImageConfigContext),L=(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:T,onLoadingComplete:k}=v,M=(0,a.useRef)(T);(0,a.useEffect)(()=>{M.current=T},[T]);const Q=(0,a.useRef)(k);(0,a.useEffect)(()=>{Q.current=k},[k]);const[D,U]=(0,a.useState)(!1),[F,Y]=(0,a.useState)(!1),{props:G,meta:H}=(0,l.getImgProps)(v,{defaultLoader:h.default,imgConf:L,blurComplete:D,showAltText:F});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(b,{...G,unoptimized:H.unoptimized,placeholder:H.placeholder,fill:H.fill,onLoadRef:M,onLoadingCompleteRef:Q,setBlurComplete:U,setShowAltText:Y,sizesInput:v.sizes,ref:P}),H.priority?(0,o.jsx)(E,{isAppRouter:C,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)})(Xr,Xr.exports);var Zh=Xr.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var p in u)Object.defineProperty(l,p,{enumerable:!0,get:u[p]})}t(e,{default:function(){return c},getImageProps:function(){return i}});const r=Le,s=Os,o=Zh,a=r._(Pu());function i(l){const{props:u}=(0,s.getImgProps)(l,{defaultLoader:a.default,imgConf:process.env.__NEXT_IMAGE_OPTS});for(const[p,f]of Object.entries(u))f===void 0&&delete u[p];return{props:u}}const c=o.Image})(ju);var Jh=ju;const Cn=A.getDefaultExportFromCjs(Jh),e_=({item:e,CONSTANTS:t})=>{const r=e.icon?t.PAYMENT_FLAGS.includes(e.icon)?"payment":"social":null,s=r==="payment"?t.PAYMENT_FLAGS_DICTIONARY[e.icon]:e.icon;return e.link?n.jsxs(De,{href:e.link,target:"_blank",rel:"noopener noreferrer",className:de["support-item"],children:[e.image&&n.jsx("img",{src:e.image,alt:"",loading:"lazy"}),r==="payment"?n.jsx(Cn,{alt:s,src:`/assets/${s}.svg`,width:20,height:20}):n.jsx(d.Icon,{size:"small",name:s})]}):n.jsxs("div",{className:de["support-item"],children:[e.image&&n.jsx("img",{src:e.image,alt:"",loading:"lazy"}),r==="payment"?n.jsx(Cn,{alt:s,src:`/assets/${s}.svg`,width:20,height:20}):n.jsx(d.Icon,{size:"small",name:s})]})},t_=({content:e,CONSTANTS:t})=>n.jsx("div",{className:de["support-container"],children:e==null?void 0:e.map((r,s)=>n.jsxs("div",{"data-device":r.device,className:de["support-section"],children:[n.jsxs("div",{className:de["support-text"],children:[r.title&&n.jsx("h3",{children:r.title}),r.description&&n.jsx("p",{children:r.description})]}),Array.isArray(r.items)&&r.items.length&&n.jsx("div",{className:de["support-items"],"data-gap":r.gap,children:r.items.map((o,a)=>n.jsx(e_,{item:o,CONSTANTS:t},`footer-support-item-${a}`))})]},`footer-support-${s}`))}),n_=({name:e,nameIcon:t,maxWidth:r,rowAlignContent:s,columnAlignContent:o,columnAlignItems:a,textAlignContent:i,textAlignItems:c,children:l})=>n.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:s,alignItems:s},columnWrapper:{alignContent:o,alignItems:a}},children:n.jsxs(d.TextStructure.DivWrapper,{alignContent:i,alignItems:c,className:de.footer__column,children:[n.jsxs("div",{className:t?de.footer__columnTitleIcon:de.footer__columnTitle,children:[n.jsx(d.Icon,{name:`${t}`,size:"small"}),e&&n.jsx("div",{children:e})]}),n.jsx("div",{className:de.footer__columnContent,style:{maxWidth:`${r}px`},children:l})]})}),r_=({name:e,nameIcon:t,maxWidth:r,children:s,ICONS:o,...a})=>n.jsxs(d.Accordion.Wrapper,{className:de.accordionWrapper,title:"accordion-wrapper",...a,children:[n.jsx(d.Accordion.Header,{id:(a==null?void 0:a.id)??"",className:de.accordionHeader,closeIndicator:n.jsx(d.Icon,{name:o.arrow_up,size:"medium"}),openIndicator:n.jsx(d.Icon,{name:o.arrow_down,size:"medium"}),title:"accordion-header",children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{className:t?de.accordionTextWrapper:"",children:[n.jsx(d.Icon,{name:`${t}`,size:"medium"}),n.jsx("h2",{className:"typography-style-body-md",children:e})]})})}),n.jsx(d.Accordion.Body,{title:"accordion-body",children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:de.footer__columnContent,style:{maxWidth:`${r}px`},children:s})})})]}),Tr=e=>{const{isMobile:t}=ne();return t?n.jsx(r_,{...e}):n.jsx(n_,{...e})},fn=({type:e,children:t,className:r,collumnName:s,collumnNameIcon:o,icons:a,iconLink:i,iconSize:c,link:l,paymentDisclaimer:u,paymentTitle:p,rowAlignContent:f,columnAlignContent:m,columnAlignItems:h,textAlignContent:_,textAlignItems:y,...x})=>{let b;const{handleSelectContent:E}=oe(),{nextimage:j}=ce();switch(e){case"menu":b=n.jsx(De,{className:de.footer__itemLink,href:l??"#",prefetch:!1,children:n.jsx("span",{onClick:()=>{E({content:`footer:${s}:${t}`})},children:t})});break;case"payment":b=n.jsxs("div",{className:d.helpers.classNameConcat(de.payment,de.footer__itemSmallText),...x,children:[u,n.jsxs("div",{className:d.helpers.classNameConcat(de.footer__iconContainer,de.footer__iconListSubHeader),children:[p,n.jsx("div",{className:de.footer__iconList,children:a==null?void 0:a.map((v,P)=>n.jsx(j,{alt:v,src:`/assets/${v}.svg`,width:c??20,height:c??20},P))})]})]});break;case"social-media":b=n.jsx("div",{className:de.footer__iconContainer,...x,children:n.jsx("div",{className:de.footer__iconList,children:i==null?void 0:i.map((v,P)=>n.jsx(De,{prefetch:!1,href:v.link??"#",target:"_blank",children:n.jsx(d.Icon,{size:"medium",name:v.icon,onClick:()=>E({content:`footer:redes-sociais:${v.icon}`})})},P))})});break;default:b=n.jsx("div",{className:r,...x,children:t})}return n.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:f,alignItems:f},columnWrapper:{alignContent:m,alignItems:h}},...x,children:n.jsx(d.TextStructure.DivWrapper,{alignContent:_,alignItems:y,className:d.helpers.classNameConcat(de.footer__item,r),children:b})})},s_=({className:e,text:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat(de.footer__legalInformation,e),children:n.jsx("span",{children:t})}),Nu=()=>{const{nextimage:e}=ce();return n.jsx("div",{className:de["footer--stamps"],children:n.jsx(e,{alt:"Empresa B",className:de["footer--stamps--company"],src:"/images/Footer/new_certfB.png",width:56,height:64})})};Nu.displayName="Footer.Stamps";const Iu=({children:e,legalTextSlot:t,adornment:r,className:s,...o})=>{const{isMobile:a}=ne(),i=g.Children.toArray(e).filter(Boolean),c=i.length;return n.jsxs("div",{className:de.footer__main,children:[(r==null?void 0:r.top)&&n.jsx("div",{className:de.footer__top,children:r==null?void 0:r.top}),c>0&&n.jsx("div",{...o,className:d.helpers.classNameConcat(de.footer__wrapper,s),children:i.map((l,u)=>n.jsx("div",{style:{flexGrow:1,maxWidth:`calc(100% / ${a?1:"fit-content"})`},children:l},u))}),(r==null?void 0:r.bottom)&&n.jsx("div",{className:de.footer__bottom,children:r.bottom}),t&&n.jsx("div",{className:de.footer__legalText,children:t})]})};Iu.displayName="Footer.Wrapper";const Ru=({data:{links:{links:e}},payments:t,socialInfo:r,socialMedias:s,adornment:o,LEGAL_INFORMATION_TEXT:a,ICONS:i,className:c,hasFooterStamps:l=!0})=>{var u;return n.jsxs(Iu,{className:c,adornment:o,legalTextSlot:n.jsx(s_,{text:a}),children:[Array.isArray(e.column)&&e.column.map((p,f)=>n.jsx(Tr,{id:`${f}column-menu`,name:p.name,nameIcon:p.nameIcon,ICONS:i,children:p.items.map((m,h)=>n.jsx(fn,{type:"menu",link:m.link,collumnName:p.name,collumnNameIcon:p.nameIcon,children:m.text},h))},f)),t&&((u=t.acceptedFlags)==null?void 0:u.length)>0&&n.jsx(Tr,{id:"payment-column",name:t==null?void 0:t.title,nameIcon:t==null?void 0:t.titleIcon,maxWidth:150,ICONS:i,children:n.jsx(fn,{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})}),n.jsxs(Tr,{id:"social-media-column",name:r==null?void 0:r.title,ICONS:i,children:[r!=null&&r.subTitle?n.jsx(fn,{children:r==null?void 0:r.subTitle}):null,n.jsx(fn,{type:"social-media",iconSize:24,iconLink:s}),l&&n.jsx(Nu,{})]})]})};Ru.displayName="Footer";const o_=Object.freeze(Object.defineProperty({__proto__:null,Footer:Ru,FooterSupport:t_},Symbol.toStringTag,{value:"Module"})),a_=()=>{const{colorName:e}=ke();return n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:e.length===0?"":A.styles["accessibility-info"],children:n.jsx("p",{children:e})})})},Un=({className:e,titleId:t})=>{var o,a,i;const{productName:r,tag:s}=ke();return n.jsxs("div",{className:d.helpers.classNameConcat(A.styles.header,e),children:[s!=null&&s.commercial?n.jsx(d.Tag,{size:"small",title:(o=s.commercial)==null?void 0:o.value,variant:"quaternary",adornment:{start:(a=s.commercial)!=null&&a.icon?n.jsx(d.Icon,{name:s.commercial.icon}):null},children:(i=s.commercial)==null?void 0:i.value}):null,n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h1",{id:t,children:r})})})]})};Un.displayName="PDP.PDPHeader";const Ms=({layout:e="horizontal"})=>{const{price:t,listPrice:r,installments:s}=ke(),{count:o,value:a}=s,i=A.formatPriceToCurrency(r??0,!0),c=A.formatPriceToCurrency(t??0,!0),l=A.formatPriceToCurrency(a??0);return n.jsx(d.ProductInfo.Root,{size:"small",layout:e,children:n.jsxs(d.ProductInfo.Wrapper,{layout:e,size:"small",className:A.styles["price-wrapper"],children:[n.jsx(d.ProductInfo.ValuesWrapper,{children:t!==r?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:i.toString(),size:"small"}),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:c.toString(),size:"small"})]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:c.toString(),size:"small"})}),o&&o>1&&a?n.jsx(d.ProductInfo.Price,{label:"installment",value:`ou ${o}x ${l}`,size:"small"}):null]})})},Yr=({onAddCallBack:e,onDisabledClickCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s})=>{const o=Gt(),{productId:a,productData:i,price:c,listPrice:l,thumbImage:u,isKit:p}=ke(),{isMobile:f}=ne(),{addToCart:m}=ve(),{sendDataLayerEvent:h}=oe(),_=!p&&(!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 n.jsx(d.Button,{className:A.styles["add-to-cart"],size:f?(r==null?void 0:r.mobile)??"large":(r==null?void 0:r.desktop)??"x-large",onClick:y,children:o.sku&&o.available?`${s.add_to_cart}`:`${s.select_size}`})},i_=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t})=>{const{isMobile:r}=ne(),s=Gt(),{sizesContainerRef:o}=da(),{structureRef:a}=Ee();return s.sku&&s.available?n.jsx(Yr,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t}):n.jsx(d.Button,{className:A.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:s.sku&&s.available?t.add_to_cart:t.select_size})},hn=({value:e,label:t,suppressHydrationWarning:r=!1},s)=>{const o={value:e,...r&&{suppressHydrationWarning:!0}},a=s==="compact"?o:{...o,label:t};return n.jsx(d.Timer.Digit,{...a})},Sn=({dateEnd:e,dateInit:t,type:r="default",TIME_ZONE:s,...o})=>{const[a,i]=g.useState(Gi(new Dr.TZDate(Date.now(),s),new Dr.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 n.jsx(n.Fragment,{});const u=$t(a,"days"),p=$t(a,"hours"),f=$t(a,"minutes"),m=$t(a);return n.jsxs(d.Timer.Root,{...o,children:[u?n.jsxs(n.Fragment,{children:[hn({value:u,label:"dias"},r),n.jsx(d.Timer.Separator,{})]}):null,hn({value:p,label:"horas"},r),n.jsx(d.Timer.Separator,{}),hn({value:f,label:"min"},r),n.jsx(d.Timer.Separator,{}),hn({value:m,label:"segs",suppressHydrationWarning:!0},r)]})},Ds=({TIME_ZONE:e})=>{const{tag:t}=ke(),r=t==null?void 0:t.flagGoldenPdp,s=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?n.jsxs("div",{className:A.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"&&n.jsx("div",{className:A.styles["golden-tag-video"],children:n.jsx(Ie.Video,{src:s,autoPlay:!0,muted:!0,loop:!0,playsInline:!0})}),n.jsxs("div",{className:A.styles["golden-tag-content"],children:[n.jsx("span",{className:A.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)&&n.jsx(Sn,{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};Ds.displayName="PDP.GoldenTag";const c_=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t,TIME_ZONE:r,Z_INDEX_WAR:s})=>{const{isMobile:o}=ne();return o?n.jsxs(d.Card,{className:A.styles["bottom-navigation"],shadow:!0,style:{zIndex:s.pdp_bottom_navigation},children:[n.jsxs("div",{className:A.styles["bottom-navigation__header"],children:[n.jsx(Ds,{TIME_ZONE:r}),n.jsxs("div",{className:A.styles["bottom-navigation__header-content"],children:[n.jsx(Un,{}),n.jsx(Ms,{layout:"name-vertical"})]})]}),n.jsx(i_,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t})]}):null},l_=({children:e,setShowBottomNavigation:t})=>{const r=g.useRef(null),s=os(r),o=g.useRef(s);return g.useEffect(()=>{var i;const{top:a}=((i=r.current)==null?void 0:i.getBoundingClientRect())??{top:0};o.current!==s&&a>0&&(t(!s),o.current=s)},[s]),n.jsx("div",{ref:r,style:{width:"100%"},children:e})},u_=({ICONS:e})=>{const{isMobile:t}=ne(),{price:r,listPrice:s,productData:o,productId:a}=ke(),{sendDataLayerEvent:i}=oe(),c=Lt(),{toggleProduct:l}=vt();return n.jsx(d.Button,{adornment:{start:n.jsx(d.Icon,{name:e[c.includes(a)?"favorite_true":"favorite_false"],size:"medium"})},className:A.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:s}}})}})},wu=({showWishlist:e=!0,callBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s,ICONS:o,TIME_ZONE:a,Z_INDEX_WAR:i})=>{const{isMobile:c}=ne(),[l,u]=g.useState(!0);return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:A.styles.actions,children:[c?n.jsx(l_,{setShowBottomNavigation:u,children:n.jsx(Yr,{onAddCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s})}):n.jsx(Yr,{onAddCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s}),e&&n.jsx(u_,{ICONS:o})]}),c&&l&&n.jsx(c_,{addToCartBtnSize:r,BUY_BUTTON_LABELS:s,Z_INDEX_WAR:i,TIME_ZONE:a})]})},Au=({className:e,device:t,ICONS:r})=>{const{breadcrumbList:s,productName:o}=ke(),a=i=>i.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return n.jsx(d.BreadCrumb.DivWrapper,{className:d.helpers.classNameConcat(A.styles.breadcrumb,[t==="mobile"?A.styles["breadcrumbs-mobile"]:A.styles["breadcrumbs-desktop"],e]),children:n.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 n.jsx(d.BreadCrumb.Item,{adornment:{end:n.jsx(d.Icon,{name:r.arrow_right})},role:"listitem",children:n.jsx(De,{href:`/${l}`,children:i})},`pdp-breadcrumb-${l}-${c}`)}),n.jsx(d.BreadCrumb.Item,{role:"listitem",className:d.helpers.classNameConcat(A.styles["breadcrumb--active"],e),children:o},"pdp-breadcrumb-productName")]})})};Au.displayName="PDP.BreadCrumb";const Tu=({className:e})=>{var s;const{tag:t}=ke(),r=t==null?void 0:t.flagPdp;return r&&((s=r==null?void 0:r.value)!=null&&s.length)?n.jsx(d.Tag,{className:d.helpers.classNameConcat(A.styles.credits,e),variant:"tertiary",title:r==null?void 0:r.value,size:"small",adornment:{start:r!=null&&r.enableIcon&&(r!=null&&r.icon)?n.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}):n.jsx(n.Fragment,{})};Tu.displayName="PDPCredits";const d_=()=>{const{descriptionContent:e,productReference:t}=ke(),[r,s]=g.useState("description");return n.jsxs(d.Tabs.Root,{className:A.styles["tabs-root-modifier"],children:[n.jsx(d.Tabs.TabList,{className:A.styles["tabs-list-modifier"],children:e==null?void 0:e.map(({label:o,value:a})=>n.jsx(d.Tabs.Item,{label:o,value:a,activeTab:r,onTabChange:s,size:"large",className:`${A.styles["tabs-item-modifier"]} ${r===a?A.styles["tabs-item-active"]:""}`},a))}),n.jsxs("div",{className:A.styles["content-wrapper"],children:[r==="description"?n.jsx("div",{children:n.jsxs("span",{className:A.styles.productref,children:["Ref:",t]})}):"",e==null?void 0:e.map(({value:o,content:a})=>r===o?n.jsx(d.Tabs.Panel,{className:`${A.styles["tabs-panel"]} ${r===o?A.styles["tabs-panel-enter"]:A.styles["tabs-panel-exit"]}`,children:n.jsx("div",{className:A.styles.content,dangerouslySetInnerHTML:{__html:a}})},o):null)]})]})},p_=({CURRENCY:e,DELIVERY_INFO_BOXES_ALLOWED:t,FREIGHT_CALCULATION:r,Z_INDEX_WAR:s})=>{const o=Gt(),{isMobile:a}=ne();return n.jsxs(n.Fragment,{children:[a?n.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null,n.jsx(Ql,{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:s.modal,currency:e}}),a?n.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null]})},Yo=({image:e,index:t,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:s})=>{const o=A.resizingImg(e.imageUrl,s.pdp),{nextimage:a}=ce();return n.jsx(a,{src:o,alt:e.imageLabel,objectFit:"contain",...s.pdp,...t<=1&&{priority:!0,loading:"eager"},onClick:()=>{r(t)}},t)},m_=({video:e,productName:t,poster:r})=>{const{sendDataLayerEvent:s}=oe(),o=g.useRef(!1);return n.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:r})},Lu=({images:e,video:t,handleZoom:r,productName:s,PRODUCT_IMAGE_DIMENSIONS:o})=>{var u,p;const{initialize:a,pagination:i,controller:c,itemsStyles:l}=d.Carousel.useCarousel({gap:0,itemsPerPage:1,loop:!1,direction:"row"});return n.jsxs(d.Carousel.Root,{innerRef:f=>{a(f)},className:A.styles["gallery-carousel-modifier"],children:[n.jsx(d.Carousel.Controller,{position:"absolute",top:"24px",bottom:"unset",left:"16px",children:n.jsx(d.Carousel.Bullets,{page:i.currentPage,total:e.length,onBulletClick:f=>c==null?void 0:c.navigateTo(f)})}),n.jsxs(d.Carousel.Body,{children:[n.jsx(d.Carousel.Item,{style:l,children:n.jsx(Yo,{image:e[0],index:0,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:o})},"PDP_gallery_0"),t&&n.jsx(d.Carousel.Item,{style:l,children:n.jsx(m_,{video:t,productName:s,...((u=e[1])==null?void 0:u.imageUrl)&&{poster:(p=e[1])==null?void 0:p.imageUrl}})},"PDP_gallery_video"),e.map((f,m)=>m===0?null:n.jsx(d.Carousel.Item,{style:l,children:n.jsx(Yo,{image:f,index:m,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:o})},`PDP_gallery_${m}`))]})]})};Lu.displayName="PDP.Carousel";const f_="_thumbs_1fbzz_65",h_="_selected_1fbzz_93",__="_carousel_1fbzz_162",g_="_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:f_,selected:h_,"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:__,"carousel-controller":"_carousel-controller_1fbzz_167","arrow-left":"_arrow-left_1fbzz_177","arrow-right":"_arrow-right_1fbzz_178",bullets:g_,"zoom-popup":"_zoom-popup_1fbzz_210","image-zoom--mobile":"_image-zoom--mobile_1fbzz_250","image-zoom--image--img":"_image-zoom--image--img_1fbzz_280"},Qo=({onClose:e,ICONS:t})=>n.jsx("div",{className:`${Se["button-close-container"]}`,children:n.jsx(d.Button,{iconNameStart:t.close,iconSize:"medium",className:`${Se["button-close"]}`,variant:"tertiary",state:"default",size:"medium",onClick:e,style:{textDecoration:"none"}})}),y_=({children:e,Z_INDEX_WAR:t,...r})=>n.jsx("div",{...r,className:Se["image-zoom-wrapper-desktop"],style:{zIndex:t.pdp_image_zoom},children:e}),ku=({images:e,setCurrent:t,setFirstImgLoaded:r,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o})=>{const{nextimage:a}=ce();let i=null;const c=g.useRef(null),{initialize:l,controller:u,pagination:p,itemsStyles:f}=d.Carousel.useCarousel({itemsPerPage:1,gap:10,loop:!1,direction:"row"}),m=_=>{u==null||u.navigateTo(_)},h=()=>{r(!0)};return g.useEffect(()=>{t(p.currentPage)},[p.currentPage,t]),n.jsxs(d.Carousel.Root,{innerRef:_=>{_&&!i&&(i=_,l(i))},className:Se.carousel,children:[n.jsxs(d.Carousel.Controller,{className:Se["carousel-controller"],children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.prevPage(),className:Se["arrow-left"],adornment:{start:n.jsx(d.Icon,{name:s.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.nextPage(),className:Se["arrow-right"],adornment:{start:n.jsx(d.Icon,{name:s.arrow_right})}})]}),n.jsx(d.Carousel.Body,{children:Array.isArray(e)&&e.map((_,y)=>n.jsx(d.Carousel.Item,{style:f,children:n.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))}),n.jsx(d.Carousel.Bullets,{className:Se.bullets,page:p.currentPage,total:p.totalPages,onBulletClick:m})]})};ku.displayName="ImageZoom.Mobile.Carousel";const Ou=({imgRef:e,image:t,PRODUCT_IMAGE_DIMENSIONS:r})=>{xa();const{nextimage:s}=ce();return n.jsx("div",{className:Se["image-zoom--image"],ref:e,children:n.jsx(s,{...r.image_zoom.mobile,alt:t.imageText,className:Se["image-zoom--image--img"],quality:100,src:t.imageUrl})})};Ou.displayName="ImageZoom.ImageZoom";const Mu=({loaded:e=!1})=>n.jsx("div",{className:Se["zoom-popup"],"data-loaded":e,children:n.jsxs("svg",{width:"38",height:"39",viewBox:"0 0 38 39",xmlns:"http://www.w3.org/2000/svg",children:[n.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"}),n.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"}),n.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"})]})});Mu.displayName="ImageZoom.ZoomPopup";const Du=({images:e,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:r,...s})=>{const[o,a]=g.useState(!1),[i,c]=g.useState(0),{containerRef:l,imgRef:u,scale:p}=va({defaultScale:1,maxScale:3});return n.jsxs("div",{...s,className:Se["image-mobile"],"data-disable-carrousel-pan":p>1,children:[n.jsx(Mu,{loaded:o}),n.jsx(ku,{images:e,setCurrent:c,setFirstImgLoaded:a,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:r}),n.jsx("div",{className:Se["image-zoom--mobile"],ref:l,children:n.jsx(Ou,{imgRef:u,image:e[i],PRODUCT_IMAGE_DIMENSIONS:r})})]})};Du.displayName="ImageZoom.ImageMobile";const x_=({children:e,Z_INDEX_WAR:t,...r})=>n.jsx("div",{...r,className:Se["image-zoom-wrapper-mobile"],style:{zIndex:t.pdp_image_zoom},children:e}),v_="_modal_1u87b_1",et={modal:v_,"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 b_({headerTitle:e,isMobile:t,ICONS:r}){return n.jsx(d.Modal.Header,{navigation:"top",className:et["modal-header"],children:n.jsxs(d.Modal.Controls,{navigation:"top",isMobile:t,children:[n.jsx("div",{className:et["modal-header__title"],children:n.jsx(d.Modal.Title,{navigation:"top",className:et["quick-shop__title"],title:e})}),n.jsx(d.Button,{className:et["modal-header__close-button"],"data-close":!0,iconNameStart:r.close,size:"small",variant:"tertiary"})]})})}const $u=({PDP_INFO:e,PLP_SIZE_ORDER:t,ICONS:r,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:i})=>{const{sizes:c,productId:l,handleViewItemEvent:u}=ke(),p=g.useMemo(()=>c!=null&&c.length?$c({items:c,getLabel:v=>v.value,PLP_SIZE_ORDER:t}):[],[c]),{sizesContainerRef:f}=da(),{isMobile:m}=ne(),h=Gt(),_=ni(),{setValue:y}=Ja(),{setValue:x}=ds(),b=g.useRef({}),[E,j]=g.useState(null);return n.jsxs("div",{ref:f,className:d.helpers.classNameConcat(A.styles.sizes,"PDP_sizes"),children:[n.jsx("span",{className:A.styles["sections-title"],children:e.product.size_title}),n.jsx("div",{children:p.map(v=>(!v.available&&!b.current[v.value]&&(b.current[v.value]={disable:!v.available,size:v.value,skuID:v.sku}),n.jsxs(d.ToggleSize.Wrapper,{size:m?"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:[n.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),n.jsx(d.ToggleSize.Text,{children:v==null?void 0:v.value})]},`sizes-${v.sku}-${v.value}`)))}),n.jsx(Cs,{open:_,setVisible:x,sku:E,setSku:j,skus:Object.values(b.current),ICONS:r,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:i})]})},zt=({children:e,className:t,type:r})=>n.jsx("div",{className:d.helpers.classNameConcat(A.styles["pdp-main__info-subsection"],[A.styles[`subsection-${r}`],t]),children:e}),zu=({children:e,className:t})=>{const{structureRef:r,tipbarRef:s}=Ee(),o=g.useMemo(()=>{var c,l;const a=((c=r.current)==null?void 0:c.clientHeight)||0,i=((l=s.current)==null?void 0:l.clientHeight)||0;return a+i},[r,s]);return n.jsx("div",{className:d.helpers.classNameConcat(A.styles["pdp-main__info"],t),id:"pdpmaininfo",style:{top:o},children:e})},j_=({children:e,link:t,TOGGLE_STYLE_MODIFIER:r})=>{const{isMobile:s}=ne(),{router:o}=ce(),a=()=>{t&&o.push(t)},i=g.useRef(null);return n.jsx(d.ToggleStyle.Wrapper,{size:s?"medium":"small",style:{...r,border:`${i.current===t?"2":"1"}`,overflow:"hidden",padding:"0"},onClick:a,active:i.current===t,children:e})},Fu=({productId:e,similars:t,TOGGLE_STYLE_MODIFIER:r})=>{const{thumbImage:s}=ke(),o=[{productId:e,slug:"",textureImage:(s==null?void 0:s.imageUrl)??"",textureAlt:(s==null?void 0:s.imageText)??""},...t];return n.jsx("div",{children:o.map((a,i)=>a.textureImage?n.jsxs(j_,{link:a.slug?a.slug:null,TOGGLE_STYLE_MODIFIER:r,children:[n.jsx(d.ToggleStyle.DisabledAdornment,{}),n.jsx(d.ToggleStyle.Texture,{children:n.jsx(Ie.Image,{alt:a.textureAlt,src:a.textureImage,height:34,width:34,style:{borderRadius:0,height:"100%"}})})]},`similars-item-${i}`):null)})},Bu=({TEXTURE_IMAGE:e,TOGGLE_STYLE_MODIFIER:t})=>{const{productId:r}=ke(),[s,o]=g.useState([]);return g.useEffect(()=>{fetch("/api/catalog/product/similars",{method:"POST",body:JSON.stringify({productId:r,filterTexture:e})}).then(a=>a.json()).then(({data:a})=>{Array.isArray(a)&&a.length===0||o(a)}).catch(a=>{console.error(a)})},[r]),n.jsxs("div",{className:A.styles.similars,children:[n.jsx("span",{className:A.styles["sections-title"],children:"Cor"}),n.jsx(Fu,{productId:r,similars:s,TOGGLE_STYLE_MODIFIER:t})]})};Bu.displayName="PDP.Info.Similars";const C_=({callBackProductAdded:e,BUY_BUTTON_LABELS:t,ICONS:r,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:p,Z_INDEX_WAR:f})=>n.jsx(d.Modal.Body,{className:et["modal-product-body"],children:n.jsxs(zu,{className:et["pdp-main__info-modifier"],children:[n.jsxs(zt,{type:"product-info",children:[n.jsx(Un,{}),n.jsx(Ms,{})]}),n.jsx(zt,{type:"similars",children:n.jsx(Bu,{TEXTURE_IMAGE:l,TOGGLE_STYLE_MODIFIER:p})}),n.jsx(zt,{type:"sizes",children:n.jsx($u,{ICONS:r,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PDP_INFO:a,PLP_SIZE_ORDER:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:f})}),n.jsx(zt,{type:"actions",children:n.jsx(wu,{showWishlist:!1,callBack:e,addToCartBtnSize:{mobile:"medium",desktop:"large"},BUY_BUTTON_LABELS:t,ICONS:r,TIME_ZONE:u,Z_INDEX_WAR:f})})]})});function S_({callBackProductAdded:e,QUICKSHOP:t,ICONS:r,...s}){const[o,a]=g.useState(!1),i=()=>a(c=>!c);return n.jsxs("div",{className:et["quick-shop"],children:[n.jsx(d.Button,{onClick:i,size:"x-large",className:et["shop-bag"],iconNameStart:r.bag,iconSize:"medium"}),n.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:[n.jsx(b_,{headerTitle:t.title,ICONS:r}),n.jsx(C_,{callBackProductAdded:e,ICONS:r,...s})]})]})}const E_=({image:e})=>n.jsx(Cn,{src:A.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)"}}),P_=({images:e,selectedImageIndex:t,PRODUCT_IMAGE_DIMENSIONS:r,...s})=>{const[o,a]=g.useState(!1),{nextimage:i}=ce();return n.jsx("div",{...s,className:Se["main-image-container"],children:n.jsxs("div",{className:Se["image-desktop"],children:[!o&&n.jsx(E_,{image:e==null?void 0:e[t]}),n.jsx(i,{src:A.resizingImg(e==null?void 0:e[t].imageUrl,{...r.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)}})]})})},N_=({images:e,onThumbnailClick:t,selectedImageIndex:r})=>{const{nextimage:s}=ce();return n.jsx("div",{className:Se.thumbs,children:e.map((o,a)=>n.jsx("div",{role:"button",tabIndex:0,onClick:()=>t(a),onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&t(a)},className:a===r?Se.selected:"",children:n.jsx(s,{src:o.imageUrl,alt:o.imageText,layout:"responsive",width:100,height:100,objectFit:"cover",priority:!1})},a))})},Uu=({images:e,initialSelectedImageIndex:t=0,setShowImageZoom:r,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o,Z_INDEX_WAR:a,...i})=>{const{isMobile:c}=ne(),[l,u]=g.useState(t),p=f=>{u(f)};return c?n.jsxs(x_,{Z_INDEX_WAR:a,children:[n.jsx(Qo,{onClose:()=>r({show:!1,initialIndex:0}),ICONS:s}),n.jsx(Du,{images:e,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o})]}):n.jsxs(y_,{Z_INDEX_WAR:a,children:[n.jsx(Qo,{onClose:()=>r({show:!1,initialIndex:0}),ICONS:s}),n.jsx(P_,{images:e,selectedImageIndex:l,onThumbnailClick:p,PRODUCT_IMAGE_DIMENSIONS:o},e[l].imageId??`${e[l].imageText}-${l}`),n.jsx(N_,{images:e,selectedImageIndex:l,onThumbnailClick:p}),n.jsx(S_,{callBackProductAdded:()=>{r({initialIndex:0,show:!1})},ICONS:s,Z_INDEX_WAR:a,...i})]})};Uu.displayName="ImageZoom";const I_=({productImgs:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})=>{const{video:s,productName:o}=ke(),[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 n.jsxs(n.Fragment,{children:[n.jsx(Lu,{images:e,video:s,handleZoom:c,productName:o,PRODUCT_IMAGE_DIMENSIONS:t}),a.show&&n.jsx(Uu,{images:e,initialSelectedImageIndex:a.initialIndex,setShowImageZoom:i,PRODUCT_IMAGE_DIMENSIONS:t,...r})]})},Hu=({TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})=>{const{images:s}=ke(),o=g.useMemo(()=>{const a=s.filter(i=>!e.includes(i.imageLabel));return a.length>0?a:s},[]);return n.jsx(I_,{productImgs:o,TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})};Hu.displayName="PDP.Gallery";const R_=({className:e,hasIcons:t=!0,ICONS:r,PDP_INFO:s})=>{const{allSizesAvailable:o,productId:a}=ke(),{setValue:i}=ds(),{sendDataLayerEvent:c}=oe();return n.jsx("div",{className:d.helpers.classNameConcat(A.styles.links,e),id:"pdp-container","data-product-id":a,children:n.jsxs("div",{className:A.styles["links-wrapper"],children:[!o&&n.jsx(d.Button,{adornment:t?{start:n.jsx(d.Icon,{name:r.product})}:{},size:"x-small",variant:"tertiary",onClick:()=>i(!0),underline:!0,children:s.links_and_stepper.size_out_of_stock}),n.jsx(d.Button,{adornment:t?{start:n.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:s.links_and_stepper.size_table_title}),n.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})]})})},w_=({children:e})=>n.jsx("div",{className:A.styles["pdp-main__info-main-content"],children:e}),A_=({head:e,className:t})=>n.jsx("thead",{className:t,children:n.jsx("tr",{children:e.map((r,s)=>n.jsx("th",{children:r},`head-title-${s}`))})}),T_=({rows:e,className:t})=>n.jsx("tbody",{className:t,children:e.map((r,s)=>n.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)=>n.jsx("td",{children:o},`cell-content-${a}`))},`row-content-${s}`))}),L_="_tableContainer_1yxy2_1",k_={tableContainer:L_},O_=({children:e,className:t=""})=>n.jsx("table",{className:`${k_.tableContainer} ${t}`,children:e}),Lr={Head:A_,Rows:T_,Root:O_},M_=({title:e,text:t})=>n.jsxs("p",{className:A.styles.measurementRowsText,children:[n.jsx("h1",{className:A.styles.measurementRowsTitle,children:e}),t]}),D_=({ICONS:e,SIZES:t,Z_INDEX_WAR:r})=>{const s=oi(),{setValue:o}=ai();return n.jsx(d.Modal.Root,{isMobile:!0,style:{zIndex:r.modal},setIsOpen:o,isOpen:s,className:A.styles.measurementModal,children:n.jsx(d.Modal.Body,{children:n.jsxs("div",{className:A.styles.measurementContainer,children:[n.jsx("h1",{className:A.styles.measurementTitle,children:t.title}),n.jsxs("div",{className:A.styles.measurementContent,children:[n.jsx("div",{className:A.styles.measurementImageContainer,children:n.jsx(Cn,{width:264,height:402,alt:"",className:A.styles.measurementImage,src:t.bannerImage})}),n.jsxs(Lr.Root,{className:A.styles.measurementTable,children:[n.jsx(Lr.Head,{className:A.styles.measurementHead,head:t.head}),n.jsx(Lr.Rows,{className:A.styles.measurementRows,rows:t.rows.map((a,i)=>[n.jsx(M_,{title:t.descriptions[i].title,text:t.descriptions[i].text},i),...a])})]})]}),n.jsx(d.Button,{onClick:()=>o(!1),className:A.styles.measurementClose,variant:"tertiary",children:n.jsx(d.Icon,{name:e.close})})]})})},"minicart")},$_=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(A.styles["pdp-main__gallery-wrapper"],t),...r,children:e}),z_=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(A.styles.pdp,t),...r,children:e}),F_=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(A.styles["pdp-main"],t),...r,children:e}),B_=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(A.styles["pdp-main__info-secondary-content"],t),...r,children:e}),U_={gallery:$_,pdp:z_,main:F_,secondary:B_},H_=({className:e,...t})=>n.jsx(d.Utils.Divider,{...t,className:d.helpers.classNameConcat(A.styles.divider,e)}),q_=Object.freeze(Object.defineProperty({__proto__:null,AccessibilityInfo:a_,Actions:wu,BreadCrumb:Au,Credits:Tu,DescriptionsTabs:d_,Divider:H_,Freight:p_,Gallery:Hu,GoldenTag:Ds,Header:Un,Links:R_,MainContent:w_,MainInfo:zu,Price:Ms,ProductMeasurements:D_,SimilarsItems:Fu,Sizes:$u,SubSectionWrapper:zt,containers:U_},Symbol.toStringTag,{value:"Module"})),V_=(e,t)=>{const[r,s]=iu({items:e}),[o,a]=t.split(":").map(Number);return isNaN(o)||isNaN(a)?[r,s]:[r<o?r:o,s>a?s:a]},W_=()=>{var S;const{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:s,PLP_FILTERS_TITLE:o,PLP_SIZE_ORDER:a}=Me(),[i,c]=g.useState("10000:0"),{isMobile:l}=ne(),{sendDataLayerEvent:u}=oe(),{openFilters:p,setOpenFilters:f}=xs(),{state:m}=ze(),{breadcrumb:h,deleteAllFacets:_,isLoading:y=!1,facets:x,onToggleFacet:b,selectedFacets:E}=Qi.contexts.searchFacets.hook(),j=g.useRef(""),v={isLast:!0,href:(S=m.term)!=null&&S.length?`/${m.term}`:"",name:m.term},P=A.filterNonRootFacets(E,m==null?void 0:m.base);return g.useEffect(()=>{const C=x.find(({key:I})=>I==="price");if(C){const[I,L]=V_(C.values,i??"10000:0");c(`${I}:${L}`)}},[x,i,c]),g.useEffect(()=>{if(!P.length)return;const C=JSON.stringify(P);j.current!==C&&(j.current=C,u({functionKey:"filterEvent",data:{commonData:{selectedFacets:P}}}))},[P]),n.jsxs(vn.teamComponents.Filter.Root,{CONSTANTS:{ICONS:e,PLP_FILTERS_TITLE:o,PLP_FILTERS:t},breadcrumb:h.length?h:[v],deleteAllFacets:_,filters:{facets:A.filterNonCategorySelected(x,m==null?void 0:m.base),selected:P},isMobile:l??!1,isLoading:y,isOpen:p,price:i,onToggleFacet:b,setIsOpen:f,target:document.body,children:[n.jsx(vn.teamComponents.Filter.Selected,{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r}),n.jsx(vn.teamComponents.Filter.Content,{columns:2,CONSTANTS:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:s,PLP_SIZE_ORDER:a}})]})},qu=()=>typeof document>"u"?null:n.jsx(W_,{});qu.displayName="Filters";const $s=({total:e=0})=>{const{SEARCH_TOTAL_PORTAL_ID:t}=Me();if(typeof window>"u")return null;const r=document.getElementById(t);return r?rs.createPortal(n.jsxs("span",{children:["[",e,"] produto",e>1?"s":""]}),r):null};$s.displayName="PDC.Grid.NavigationTotal";const G_=({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])},K_=()=>{const{isMobile:e}=ne(),{isLoading:t,products:r,total:s}=Kt(),o=Me();return G_({productCount:r.length,PLP_GRID_SCROLL_BACK:o.PLP_GRID_SCROLL_BACK}),n.jsxs(n.Fragment,{children:[n.jsx(Je.Products,{isMobile:e??!1,items:r,...o}),!r.length&&!t&&n.jsx(Je.Empty,{ICONS:o.ICONS,PLP_NOT_RESULT:o.PLP_NOT_RESULT}),n.jsx($s,{total:s})]})},Vu=({infinite:e=!1})=>n.jsx("div",{className:Ge["pdc--grid"],children:n.jsx("div",{className:Ge["pdc--grid--content"],children:e?n.jsx(Je.InfiniteScroller,{}):n.jsx(K_,{})})});Vu.displayName="Grid";const jt=e=>({centro:"center",esquerda:"start",direita:"end"})[e],Wu=({children:e,contentState:t,entityKey:r})=>{const{url:s}=t.getEntity(r).getData();return s?n.jsx(De,{href:s,children:e}):e},X_=(e,t,r)=>{e.findEntityRanges(s=>{const o=s.getEntity();return o===null?!1:r.getEntity(o).getType()==="LINK"},t)},En=e=>{const t=new Ye.CompositeDecorator([{strategy:X_,component:Wu}]),r=Ye.convertFromRaw(e);return Ye.EditorState.createWithContent(r,t)},Y_=e=>Ye.convertFromRaw(e),Pn=Ye.DefaultDraftBlockRenderMap.set("unstyled",{element:"div",aliasedElements:["div"]}),Zo="superior-direita",_n="dentro-inferior-centro",Q_="inferior-direita",kr="dentro-inferior-esquerda",Gu=e=>({position:e===_n||e===kr?"absolute":"default",shouldRender:[Zo,_n,kr].includes(e)?"top":"bottom",alignItems:[_n].includes(e)?"center":[Zo,Q_].includes(e)?"flex-end":"flex-start",left:e===kr?"16px":e===_n?"45%":"unset"}),Z_=Object.freeze(Object.defineProperty({__proto__:null,CREATE_CONTENT:En,EXTENDED_BLOCK_RENDER_MAP:Pn,GET_CONTENT_STATE:Y_,controllersPositionsAdapter:Gu},Symbol.toStringTag,{value:"Module"})),J_=({expanded:e,content:t})=>n.jsxs("details",{open:e,children:[t.textStructureReduced?n.jsx("summary",{onClick:r=>r.preventDefault(),children:n.jsx(Ye.Editor,{editorKey:"draft-editor-1",blockRenderMap:Pn,editorState:t!=null&&t.textStructureReduced?En(JSON.parse(t.textStructureReduced)):Ye.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):n.jsx(n.Fragment,{}),t.showTextStructureExpander&&t.textStructure?n.jsx(n.Fragment,{children:n.jsx(Ye.Editor,{editorKey:"draft-editor-1",blockRenderMap:Pn,editorState:t.textStructure?En(JSON.parse(t.textStructure)):Ye.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):n.jsx(n.Fragment,{})]}),eg="_textContentWrapper_1bigo_5",tg="_textContentSection_1bigo_13",Qr={"link-modifier":"_link-modifier_1bigo_1",textContentWrapper:eg,textContentSection:tg},Ku=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:r})=>{var a;const[s,o]=g.useState(!1);return n.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:jt(e.textStructureAlignment),alignItems:jt(e.textStructureAlignment)},columnWrapper:{alignContent:jt(e.textStructureAlignment),alignItems:jt(e.textStructureAlignment)}},adornment:{bottom:e.showTextStructureExpander&&e.textStructure?n.jsx(d.Button,{variant:"tertiary",adornment:{end:n.jsx(d.Icon,{name:s?`${t.arrow_up}`:`${t.arrow_down}`})},onClick:()=>o(i=>!i),size:"small",children:s?(r==null?void 0:r.less)??"Ver Menos":(r==null?void 0:r.more)??"Ver Mais"}):n.jsx(n.Fragment,{})},children:n.jsxs(d.Utils.Column,{className:Qr.textContentWrapper,style:{alignItems:jt(e.textStructureAlignment)},children:[n.jsx(d.TextStructure.DivWrapper,{style:{textAlign:jt(e.textStructureAlignment)},mode:e.textStructureMode??"default",children:e.textStructureReduced?n.jsx(J_,{content:e,expanded:s}):n.jsx(n.Fragment,{})}),e.textStructureButtonLabel?n.jsx($e,{mode:e.textStructureMode??"default",href:e.textStructureButtonHref??"#",size:e.textStructureButtonSize,className:Qr["link-modifier"],adornments:(a=e.textStructureButtonIcon)!=null&&a.length&&e.enableIcon?{end:n.jsx(d.Icon,{name:e.textStructureButtonIcon})}:void 0,children:e.textStructureButtonLabel}):n.jsx(n.Fragment,{})]})})},ng=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],Jo=e=>({centro:"center",esquerda:"start",direita:"end"})[e],ea={"content-modifier":"_content-modifier_16y4u_5","banner-image-wrapper-modifier":"_banner-image-wrapper-modifier_16y4u_13"},ta=({data:e,videoUrl:t,priority:r,videoRef:s,ICONS:o,TEXTCONTENT_EXPANDED:a,TIME_ZONE:i,...c})=>{const{video:l,image:u,imageHref:p,imageOpacity:f,altImage:m,backgroundColor:h,position:_,contentAlignment:y,showTimer:x,contentOrder:b,timerMode:E,timerEnd:j,timerInit:v,textStructure:P,textStructureReduced:S}=e.banner,C=(p==null?void 0:p.trim())||(u==null?void 0:u.trim())||null,{nextimage:I}=ce();return n.jsxs(d.Banner.Container,{...c,children:[n.jsxs(d.Banner.ImageWrapper,{className:ea["banner-image-wrapper-modifier"],style:f?{background:h}:void 0,children:[l&&n.jsx(Ie.Video,{videoRef:s,src:t,autoPlay:r,loop:!0,playsInline:!0,muted:!0}),C&&!(l!=null&&l.length)&&n.jsx(I,{src:C,width:"1920",height:"1080",alt:m??u??"",...r?{priority:r}:{},style:f?{opacity:"0"}:void 0}),!u&&!(l!=null&&l.length)&&n.jsx("div",{style:{background:h}})]}),x||S||P?n.jsx(d.Banner.Slot,{...ng(_??"centro"),className:ea["content-modifier"],style:{textAlign:Jo(y)},children:n.jsxs(d.Utils.Column,{gap:"16px",alignItems:Jo(y),children:[x&&b==="timer-first"&&n.jsx(Sn,{mode:E??"default",size:"small",dateEnd:j?new Date(j):new Date,dateInit:v?new Date(v):new Date,TIME_ZONE:i}),n.jsx(Ku,{data:e.banner,ICONS:o,TEXTCONTENT_EXPANDED:a}),x&&b!=="timer-first"&&n.jsx(Sn,{mode:E??"default",size:"small",dateEnd:j?new Date(j):new Date,dateInit:v?new Date(v):new Date,TIME_ZONE:i})]})}):n.jsx(n.Fragment,{})]})},Yt=({data:e,className:t,priority:r,creative:s,...o})=>{const{handleSelectPromotionEvent:a,currentLocalRef:i}=oe(),{banner:{promotion_name:c},index:l,componentIndex:u}=e,p=typeof l=="number"?`:${l+1}`:"",f={creative_name:s,creative_slot:`${s}-${i.current}:${u+1}${p}`,promotion_id:e.banner.href,promotion_name:c},m=g.useRef(null),h=g.useMemo(()=>{var y;if((y=e.banner.video)!=null&&y.includes("player.vimeo")){const x=e.banner.video.split("?")[1],b=x==null?void 0:x.split("&"),E=b==null?void 0:b.filter(v=>v.includes("loc")||v.includes("signature")||v.includes("user_id")),j=E==null?void 0:E.join("&");return`${e.banner.video.split("?")[0]}?${j}`}return e.banner.video},[e]),_=()=>{var y;(y=m.current)!=null&&y.paused&&m.current.play()};return n.jsx(Mn,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...f,index:l}}}},observerOptions:{delay:100,...h&&{threshold:.1}},...h&&{callBackWhenVisible:_},children:e.banner.href?n.jsx(De,{href:e.banner.href,onClick:()=>{a({updatePromotionRef:!0,promotion:f,index:l})},children:n.jsx(ta,{data:e,videoUrl:h,priority:r,videoRef:m,...o})}):n.jsx(ta,{data:e,videoUrl:h,priority:r,videoRef:m,...o})})},zs=e=>n.jsx(Yt,{...e}),Xu=({columns:e,count:t,gap:r})=>{var y;const{banners:s,pages:o,products:a}=st(),{isMobile:i}=ne(),{banners:c}=Tn(),{ICONS:l,PRODUCT_CARD_IMAGE_ASPECT_RATIO:u,TEXTCONTENT_EXPANDED:p,TIME_ZONE:f}=Me(),m=((y=o[o.length-1])==null?void 0:y.products.length)??t,h=a[(o.length-1)*t+m-1],_=c.filter((x,b)=>s[b]<h);return Array.isArray(_)?_.map((x,b)=>n.jsx(tt.Banner,{columns:x.columns,gap:r,isMobile:i??!1,position_grid:s[b]+1,totalColumns:e,PRODUCT_CARD_IMAGE_ASPECT_RATIO:u,children:n.jsx(Yt,{data:{banner:x,componentIndex:b},creative:"banner_grid",ICONS:l,TEXTCONTENT_EXPANDED:p,TIME_ZONE:f})},`${x.position_grid}-${b}`)):null};Xu.displayName="PDC.InfiniteScroller.Banners";const Yu=e=>{var s;const{pages:t}=st(),r=t[t.length-1];return(r==null?void 0:r.page)!==((s=r==null?void 0:r.pagination)==null?void 0:s.total)&&!(r!=null&&r.loading)?n.jsx(On,{...e}):null};Yu.displayName="PDC.InfiniteScroller.Loading";const Qu=({page:e,...t})=>{const{updateParamPage:r}=st(),{element:s}=In({callback:()=>r(e),options:{threshold:0}});return n.jsx("div",{...t,id:`pdc-scroll-infinite-${e.page}`,className:Ge["pdc--infinite--loader"],"data-page":e.page,ref:s})};Qu.displayName="PDC.Page.Anchor";const Zu=({first:e,gap:t,isMobile:r=!1,item:s,index:o,last:a=!1,order:i,page:c,showVideo:l=!1})=>{const{load:u,handleNotify:p}=st(),{getAvailableProductTag:f}=dt(),{BUY_BUTTON_LABELS:m,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:E,PRODUCT_CARD_IMAGE_ASPECT_RATIO:j,PRODUCT_CARD_TEXTS:v,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:P,PRODUCT_IMAGE_DIMENSIONS:S,SECOND_IMAGE:C,StoreConfig_MainSellerId:I,TEXTURE_IMAGE:L,Z_INDEX_WAR:T,ICONS:k}=Me(),M=f(s==null?void 0:s.cluster.highlights);return n.jsx(tt.Card,{className:s.id==="skeleton"?Ge["pdc--infinite--card--disabled"]:"",gap:t,isMobile:r??!1,item:s,order:i,tag:M,index:o,setSkuSelected:p,showVideo:l,CONSTANTS:{BUY_BUTTON_LABELS:m,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:E,PRODUCT_CARD_IMAGE_ASPECT_RATIO:j,PRODUCT_CARD_TEXTS:v,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:P,PRODUCT_IMAGE_DIMENSIONS:S,SECOND_IMAGE:C,StoreConfig_MainSellerId:I,TEXTURE_IMAGE:L,Z_INDEX_WAR:T,ICONS:k},children:c&&u&&n.jsxs(n.Fragment,{children:[e&&n.jsx(xn.Anchor,{page:c}),!c.loading&&n.jsx(xn.Loader,{page:c}),a&&c.loading&&n.jsx(xn.NextPage,{page:c})]})})};Zu.displayName="PDC.Page.Card";const Ju=({type:e="default",page:t,...r})=>{const{load:s,updatePage:o}=st(),{element:a}=In({callback:()=>o(t),onEnterViewportOnce:!0,options:{threshold:1}});return s===!0&&n.jsx("div",{...r,className:Ge[`pdc--infinite--loader${e==="page"?"--page":""}`],ref:a})};Ju.displayName="PDC.Page.Loader";const ed=({page:e,...t})=>{var o;const{addNewPage:r}=st(),{element:s}=In({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?n.jsx("div",{...t,className:Ge["pdc--infinite--next-page--card"],"data-next-page":!0,ref:s}):null};ed.displayName="PDC.Page.NextPage";const xn={Anchor:Qu,Card:Zu,Loader:Ju,NextPage:ed},td=({count:e,gap:t,page:r})=>{const{isMobile:s}=ne(),{columns:o,products:a}=st(),i=(r.page-1)*e,c=Pi(r.products,o);return Array.isArray(r.products)?r.products.map((l,u)=>n.jsx(xn.Card,{first:u===0,last:u===r.products.length-1,gap:t,index:u,item:l.node,isMobile:s??!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};td.displayName="PDC.Page";const rg=({pages:e,load:t,PLP_GRID_SCROLL_BACK:r})=>{const s=g.useRef(!1);g.useEffect(()=>{const o=e[e.length-1];if(t&&o&&!s.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&&(s.current=!0,sessionStorage.setItem(r.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])},sg=()=>{var l,u;const{count:e}=ze(),{columns:t,gap:r,load:s,pages:o,total:a}=st(),i=Me(),{PLP_GRID_SCROLL_BACK:c}=Me();return rg({pages:o,load:s,PLP_GRID_SCROLL_BACK:c}),n.jsxs(n.Fragment,{children:[s===!0&&((u=(l=o[0])==null?void 0:l.pagination)==null?void 0:u.count)===0&&n.jsx(Je.Empty,{ICONS:i.ICONS,PLP_NOT_RESULT:i.PLP_NOT_RESULT}),n.jsxs(tt.Root,{children:[Array.isArray(o)&&o.map((p,f)=>n.jsx(td,{count:e,gap:r,page:p},f)),n.jsx(Xu,{columns:t,count:e,gap:r})]}),n.jsx($s,{total:a}),n.jsx(Yu,{})]})},nd=()=>{const{banners:e}=Tn();return n.jsx(Bi,{banners:e,children:n.jsx(sg,{})})};nd.displayName="PDC.InfiniteScroller";const rd=()=>{const{setOpenFilters:e}=xs(),{selectedFacets:t,onToggleFacet:r,onSort:s}=yi(),{state:o}=ze(),{Z_INDEX_WAR:a}=Me(),i=A.filterNonRootFacets(t,o==null?void 0:o.base);return n.jsx(ut.Root,{onSort:s,setOpenFilters:e,style:{zIndex:a.plp_navigation},children:n.jsx(ut.Selected,{callback:r,selected:i})})};rd.displayName="Navigation";const Zr=({currentPage:e,callback:t,type:r,...s})=>n.jsx(d.Button,{...s,iconNameStart:`arrow-${r}`,onClick:()=>{typeof t=="function"&&t(r==="left"?"prev":"")},size:"large",variant:"tertiary"});Zr.displayName="Arrow";const Jr=({active:e,prev:t,ellipses:r,page:s,selectedPage:o})=>n.jsxs(n.Fragment,{children:[r&&t&&n.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."}),e&&n.jsx(d.Pagination.Item,{isActive:!1,index:s,variant:"tertiary",onClick:()=>{typeof o=="function"&&o(s)},children:s}),r&&!t&&n.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."})]});Jr.displayName="PageEllipses";const sd=({children:e,endPage:t,page:r,total:s,selectedPage:o,ITEMS_PER_SECTION:a})=>n.jsxs(n.Fragment,{children:[n.jsx(Jr,{active:r>=a&&s>a,selectedPage:o,currentPage:r,prev:!1,ellipses:r>a&&s>a,page:1}),e,n.jsx(Jr,{active:s-r>1&&s!==t,selectedPage:o,currentPage:r,prev:!0,ellipses:t<s-1,page:s})]});sd.displayName="Pagination.Layout";const og=(e,t,r)=>{const s=new URLSearchParams(r);return s.set(e,t),s.toString()},ag=(e,t)=>{const r=[];for(let s=e;s<=t;s++)r.push(s);return r},ig=({currentPage:e,total:t,maxVisiblePages:r,SEARCH_PAGE_ITEM_THRESHOLD:s})=>{const o=t>=s?s: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}},od=({currentPage:e,pages:t,searchParams:r,VARIANT_PAGINATION:s})=>{const{router:o,pathname:a}=ce();return Array.isArray(t)?t.map(i=>n.jsx(d.Pagination.Item,{isActive:e===i,index:i,variant:e===i?s.active:s.default,onClick:()=>o.push(`${a}?${og("page",i.toString(),r)}`),children:i},i)):null};od.displayName="Pages";const Fs=({query:e,type:t="default",searchParams:r,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:p}=ce(),{state:{page:f=1}}=ze(),{pagination:{total:m}}=Kt(),{endPage:h,totalPages:_,startPage:y}=ig({currentPage:f,total:m,maxVisiblePages:o,SEARCH_PAGE_ITEM_THRESHOLD:i}),x=E=>{const j=E.toString(),v=new URLSearchParams(r.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":p}?${v.toString()}`;u.push(S)},b=E=>{x(E==="prev"?f-1:f+1)};return m?n.jsx("div",{...l,className:Ge["pdc--pagination"],children:n.jsx(d.Pagination.Wrapper,{adornment:{start:n.jsx(Zr,{callback:b,currentPage:f,disabled:f<2,type:"left"}),end:n.jsx(Zr,{callback:b,currentPage:f,disabled:f>=_,type:"right"})},children:n.jsx(sd,{endPage:h,page:f,selectedPage:x,total:m,ITEMS_PER_SECTION:o,children:n.jsx(od,{currentPage:f,pages:ag(y,h),searchParams:r,VARIANT_PAGINATION:c})})})}):n.jsx(n.Fragment,{})};Fs.displayName="Pagination";const ad=({gap:e,isMobile:t})=>{const{count:r,state:s}=ze(),{banners:o}=Tn(),{ICONS:a,PRODUCT_CARD_IMAGE_ASPECT_RATIO:i,TEXTCONTENT_EXPANDED:c,TIME_ZONE:l}=Me(),u=o.filter(p=>Ii(p.position_grid,s.page,r));return Array.isArray(u)?u.map((p,f)=>n.jsx(tt.Banner,{columns:p.columns,gap:e,isMobile:t,position_grid:p.position_grid,totalColumns:t?2:4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:i,children:n.jsx(Yt,{data:{banner:p,componentIndex:f},creative:"banner_grid",ICONS:a,TEXTCONTENT_EXPANDED:c,TIME_ZONE:l})},p.position_grid)):null};ad.displayName="PDC.Grid.Banners";const Bs=({isMobile:e=!1,items:t,BUY_BUTTON_LABELS:r,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:p,PLP_SIZE_ORDER:f,PRODUCT_CARD_IMAGE_ASPECT_RATIO:m,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:y,SECOND_IMAGE:x,StoreConfig_MainSellerId:b,TEXTURE_IMAGE:E,Z_INDEX_WAR:j})=>{const{getAvailableProductTag:v}=dt(),{count:P,state:S}=ze(),[C,I]=g.useState(!1),[L,T]=g.useState(null),[k,M]=g.useState([]),Q=g.useCallback((Y,G)=>{const H=G?wn([G]):null;M(Y),T(H!=null&&H.length?H[0]:null),I(!0)},[]),D=e?8:16,U=(S.page-1)*P,F=tt.helpers.createGridPosAndVideo(t,[],e?2:4,S.page);return n.jsxs(n.Fragment,{children:[n.jsxs(tt.Root,{children:[Array.isArray(t)&&t.map((Y,G)=>{var Z,re;const H=v(Y.node.cluster.highlights);return n.jsx(tt.Card,{gap:D,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:r,MAIN_IMAGE:o,PLP_GRID_SCROLL_BACK:c,PLP_INFINITE_SCROLL:l,PLP_PRODUCT_SIMILAR_DELAY:u,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:p,PLP_SIZE_ORDER:f,PRODUCT_CARD_IMAGE_ASPECT_RATIO:m,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:y,SECOND_IMAGE:x,StoreConfig_MainSellerId:b,TEXTURE_IMAGE:E,Z_INDEX_WAR:j,ICONS:s}},Y.node.sku)}),t.length>0&&n.jsx(ad,{gap:D,isMobile:e??!1})]}),n.jsx(An,{open:C,sku:L,skus:k,setSku:T,setVisible:I,ICONS:s,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:h,Z_INDEX_WAR:j})]})};Bs.displayName="PDC.Products";const Je={Empty:ws,Filters:qu,Grid:Vu,InfiniteScroller:nd,Spinner:On,Navigation:rd,Notification:An,Pagination:Fs,Products:Bs},id=({className:e,...t})=>{const{searchParams:r,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 n.jsx(wp,{...t,children:n.jsxs("div",{className:d.helpers.classNameConcat(Ge.pdc,e),children:[n.jsxs(gi,{forceUpdate:!0,children:[n.jsx(Je.Navigation,{}),n.jsx(Je.Filters,{})]}),i===!0?n.jsx(Je.Grid,{infinite:!0}):n.jsxs(ys,{forceUpdate:!0,query:r.get("query")??void 0,children:[n.jsx(Je.Grid,{}),n.jsx(Je.Pagination,{searchParams:r,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:a,SEARCH_PAGE_ITEM_THRESHOLD:c,VARIANT_PAGINATION:l})]})]})})};id.displayName="Templates.PDC";const cd=g.createContext({}),cg=({children:e,...t})=>n.jsx(cd.Provider,{value:t,children:e}),Hn=()=>{const e=g.useContext(cd);if(e===void 0)throw new Error("useSearchConstants must be used within a SearchConstantsProvider");return e},lg="_grid_e75z7_21",ug="_navigation_e75z7_44",dg="_spinner_e75z7_70",pg="_sort_e75z7_76",lt={"rearch-result--empty":"_rearch-result--empty_e75z7_1",grid:lg,"grid-header":"_grid-header_e75z7_37",navigation:ug,"result-disclaimer":"_result-disclaimer_e75z7_51",spinner:dg,sort:pg,"search-result":"_search-result_e75z7_91"},ld=({term:e})=>{const{router:t}=ce(),{SEARCH_RESULT:r,ICONS:s}=Hn(),o=()=>{t.push(r.EMPTY.ALL_TERMS)};return n.jsxs("div",{className:lt["rearch-result--empty"],children:[n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("div",{className:A.responsive["responsive-desktop-flex"],children:n.jsx("h2",{className:"typography-style-heading-sm",children:r.EMPTY.NOT_FOUND})}),n.jsx("div",{className:A.responsive["responsive-mobile-flex"],children:n.jsx("h2",{className:"typography-style-body-md",children:r.EMPTY.NOT_FOUND})}),n.jsxs("p",{children:[r.EMPTY.NOT_FOUND_P," ",`"${e}"`]})]}),n.jsx(d.Button,{onClick:()=>o(),variant:"tertiary",size:"medium",adornment:{end:n.jsx(d.Icon,{name:s.arrow_right,size:"medium"})},children:r.EMPTY.ALL_TERMS_LABEL})]})};ld.displayName="RearchResult.Empty";const mg=e=>n.jsxs(n.Fragment,{children:[n.jsx("div",{className:A.responsive["responsive-desktop-flex"],children:n.jsx("h2",{className:"typography-style-heading-sm",children:e.SEARCH.SEARCHING})}),n.jsx("div",{className:A.responsive["responsive-mobile-flex"],children:n.jsx("h2",{className:"typography-style-body-md",children:e.SEARCH.SEARCHING})}),n.jsx(d.Spinner,{className:lt.spinner})]}),fg=(e,t,r)=>n.jsxs(n.Fragment,{children:[n.jsx("div",{className:A.responsive["responsive-desktop-flex"],children:n.jsx("h2",{className:"typography-style-heading-sm",children:t.SEARCH.SEARCHED})}),n.jsx("div",{className:A.responsive["responsive-mobile-flex"],children:n.jsx("h2",{className:"typography-style-body-md",children:t.SEARCH.SEARCHED})}),n.jsxs("p",{children:[t.SEARCH.SEARCHED_P_START," ",e," ",t.SEARCH.SEARCHED_P_END," ",`"${r}"`]})]}),ud=({isLoading:e,quantity:t,term:r})=>{const{SEARCH_RESULT:s}=Hn();return n.jsx(d.TextStructure.DivWrapper,{children:e?mg(s):fg(t,s,r)})};ud.displayName="Search.Loading";const hg=({term:e})=>{const[t,r]=g.useState(!1),{router:s}=ce(),{searchParams:o}=ze(),{ITEMS_DEFAULT_SORT:a,ITEMS_PER_PAGE:i,ICONS:c}=Hn(),l=u=>{A.navigateToSearchPage(s,e,i,1,u??a)};return n.jsx("div",{className:lt.sort,children:n.jsx(zn,{handleSelectValue:u=>l(u??"release_desc"),sortListOpen:t,setSortListOpen:r,searchParams:o,ICONS:c})})},_g=({query:e})=>{const{isLoading:t,products:r,pagination:s}=Kt();return n.jsxs("div",{className:lt["grid-header"],children:[n.jsxs("div",{className:lt.navigation,children:[!t&&(r!=null&&r.length)?n.jsx(hg,{term:e}):null,n.jsx(d.Utils.Divider,{})]}),!t&&(r!=null&&r.length)?n.jsx("div",{className:lt["result-disclaimer"],children:n.jsx(ud,{term:e,isLoading:t,quantity:s.count})}):null]})},dd=({isMobile:e=!1,query:t})=>{const{isLoading:r,products:s,pagination:o}=Kt(),{searchParams:a}=ze(),i=Hn(),{sendDataLayerEvent:c}=oe(),l=g.useRef({query:t,sended:!1}),u=g.useMemo(()=>!r&&s.length>0&&o.count>0,[r,s.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:(s==null?void 0:s.length)>0}}}),l.current.sended=!0)}},[t,s,r,c]),n.jsxs("div",{className:lt.grid,children:[u?n.jsx(_g,{query:t}):n.jsx(n.Fragment,{}),!r&&(s!=null&&s.length)?n.jsx(Bs,{isMobile:e??!1,items:s,...i}):n.jsx(n.Fragment,{}),(s==null?void 0:s.length)===0&&!r?n.jsx(ld,{term:t}):null,u&&n.jsx(Fs,{searchParams:a,...i})]})};dd.displayName="SearchResultContent";const gg=({className:e})=>{const{state:t}=ze(),{isMobile:r}=ne();return n.jsx(ys,{forceUpdate:!1,query:t.term??"",children:n.jsx("div",{className:d.helpers.classNameConcat(lt["search-result"],e),children:n.jsx(dd,{currentPage:t.page,isMobile:r??!1,query:t.term??""})})})},pd=({className:e,searchParams:t,CONSTANTS:r})=>{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 n.jsx(cg,{...r,children:n.jsx(gs,{sort:c,state:{sort:c,base:"",facets:[],term:o,page:i,count:a},count:a,searchParams:s,ITEMS_PER_PAGE:r.ITEMS_PER_PAGE,children:n.jsx(gg,{className:e})})})};pd.displayName="Search";const yg=({page:e,data:t})=>{const{pathname:r}=ce(),s=g.useRef(null),{sendDataLayerEvent:o,currentLocalRef:a,itemListRef:i,promotionEventRef:c}=oe();return g.useEffect(()=>{const l=wi("login_event")||"{}",u=JSON.parse(l);if(u.name||u.method){const p=new Date(0);o({functionKey:"readyEvents",data:{event:u.name,readyData:{method:u.method}}}),bs("login_event","",{expires:p})}},[]),g.useEffect(()=>{if(s.current===r)return;s.current=r;let l={};switch(e){case"PDP":{const p=t,f={};if(!p){l={page_category:"pdp"};break}p.items.forEach(({itemId:m,sellers:h})=>f[m]=h[0].commertialOffer.AvailableQuantity),l={page_category:"pdp",seller_ids:p.items.map(({sellers:m})=>m[0].sellerId).join(),skuStocks:f,product_reference_id:p.productReference};break}case"PDC":{const{page_category:p,page_departament:f,id:m,name:h}=_a(),_=h,y=m;l={page_category:"lista_produtos",...f&&{page_departament:f}},i.current={item_list_name:r==="/search"?"busca":_??void 0,item_list_id:r==="/search"?void 0:y??void 0},f&&o({functionKey:"readyEvents",data:{event:"view_category",readyData:{page_category:p,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})},[r]),null};var es={exports:{}},gn={exports:{}},na;function xg(){return na||(na=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(l,u){for(var p in u)Object.defineProperty(l,p,{enumerable:!0,get:u[p]})}r(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:p}=l;const f=document.createElement(u);for(const _ in p){if(!p.hasOwnProperty(_)||_==="children"||_==="dangerouslySetInnerHTML"||p[_]===void 0)continue;const y=s[_]||_.toLowerCase();u==="script"&&(y==="async"||y==="defer"||y==="noModule")?f[y]=!!p[_]:f.setAttribute(y,p[_])}const{children:m,dangerouslySetInnerHTML:h}=p;return h?f.innerHTML=h.__html||"":m&&(f.textContent=typeof m=="string"?m:Array.isArray(m)?m.join(""):""),f}function a(l,u){if(l instanceof HTMLElement&&u instanceof HTMLElement){const p=u.getAttribute("nonce");if(p&&!l.getAttribute("nonce")){const f=u.cloneNode(!0);return f.setAttribute("nonce",""),f.nonce=p,p===l.nonce&&l.isEqualNode(f)}}return l.isEqualNode(u)}let i;process.env.__NEXT_STRICT_NEXT_HEAD?i=(l,u)=>{const p=document.querySelector("head");if(!p)return;const f=p.querySelectorAll('meta[name="next-head"]')||[],m=[];if(l==="meta"){const y=p.querySelector("meta[charset]");y&&m.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&&m.push(b)}const _=u.map(o).filter(y=>{for(let x=0,b=m.length;x<b;x++){const E=m[x];if(a(E,y))return m.splice(x,1),!1}return!0});m.forEach(y=>{var x;const b=y.previousSibling;if(b&&b.getAttribute("name")==="next-head"){var E;(E=y.parentNode)==null||E.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")||p.appendChild(b),p.appendChild(y)})}:i=(l,u)=>{const p=document.getElementsByTagName("head")[0],f=p.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 m=Number(f.content),h=[];for(let x=0,b=f.previousElementSibling;x<m;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,E=h.length;b<E;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=>p.insertBefore(x,f)),f.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 p=u.title?u.title[0]:null;let f="";if(p){const{children:m}=p.props;f=typeof m=="string"?m:Array.isArray(m)?m.join(""):""}f!==document.title&&(document.title=f),["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)}(gn,gn.exports)),gn.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function r(S,C){for(var I in C)Object.defineProperty(S,I,{enumerable:!0,get:C[I]})}r(t,{default:function(){return P},handleClientScriptLoad:function(){return x},initScriptLoader:function(){return j}});const s=Le,o=At,a=n,i=s._(rs),c=o._(g),l=Su(),u=xg(),p=Cc(),f=new Map,m=new Set,h=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],_=S=>{if(i.default.preinit){S.forEach(C=>{i.default.preinit(C,{as:"style"})});return}if(typeof window<"u"){let C=document.head;S.forEach(I=>{let L=document.createElement("link");L.type="text/css",L.rel="stylesheet",L.href=I,C.appendChild(L)})}},y=S=>{const{src:C,id:I,onLoad:L=()=>{},onReady:T=null,dangerouslySetInnerHTML:k,children:M="",strategy:Q="afterInteractive",onError:D,stylesheets:U}=S,F=I||C;if(F&&m.has(F))return;if(f.has(C)){m.add(F),f.get(C).then(L,D);return}const Y=()=>{T&&T(),m.add(F)},G=document.createElement("script"),H=new Promise((Z,re)=>{G.addEventListener("load",function(le){Z(),L&&L.call(this,le),Y()}),G.addEventListener("error",function(le){re(le)})}).catch(function(Z){D&&D(Z)});k?(G.innerHTML=k.__html||"",Y()):M?(G.textContent=typeof M=="string"?M:Array.isArray(M)?M.join(""):"",Y()):C&&(G.src=C,f.set(C,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:C="afterInteractive"}=S;C==="lazyOnload"?window.addEventListener("load",()=>{(0,p.requestIdleCallback)(()=>y(S))}):y(S)}function b(S){document.readyState==="complete"?(0,p.requestIdleCallback)(()=>y(S)):window.addEventListener("load",()=>{(0,p.requestIdleCallback)(()=>y(S))})}function E(){[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(C=>{const I=C.id||C.getAttribute("src");m.add(I)})}function j(S){S.forEach(x),E()}function v(S){const{id:C,src:I="",onLoad:L=()=>{},onReady:T=null,strategy:k="afterInteractive",onError:M,stylesheets:Q,...D}=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=C||I;Z.current||(T&&le&&m.has(le)&&T(),Z.current=!0)},[T,C,I]);const re=(0,c.useRef)(!1);if((0,c.useEffect)(()=>{re.current||(k==="afterInteractive"?y(S):k==="lazyOnload"&&b(S),re.current=!0)},[S,k]),(k==="beforeInteractive"||k==="worker")&&(U?(F[k]=(F[k]||[]).concat([{id:C,src:I,onLoad:L,onReady:T,onError:M,...D}]),U(F)):Y&&Y()?m.add(C||I):Y&&!Y()&&y(S)),G){if(Q&&Q.forEach(le=>{i.default.preinit(le,{as:"style"})}),k==="beforeInteractive")return I?(i.default.preload(I,D.integrity?{as:"script",integrity:D.integrity,nonce:H,crossOrigin:D.crossOrigin}:{as:"script",nonce:H,crossOrigin:D.crossOrigin}),(0,a.jsx)("script",{nonce:H,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([I,{...D,id:C}])+")"}})):(D.dangerouslySetInnerHTML&&(D.children=D.dangerouslySetInnerHTML.__html,delete D.dangerouslySetInnerHTML),(0,a.jsx)("script",{nonce:H,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...D,id:C}])+")"}}));k==="afterInteractive"&&I&&i.default.preload(I,D.integrity?{as:"script",integrity:D.integrity,nonce:H,crossOrigin:D.crossOrigin}:{as:"script",nonce:H,crossOrigin:D.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)})(es,es.exports);var vg=es.exports,bg=vg;const md=A.getDefaultExportFromCjs(bg),jg=({children:e,ONE_TRUST:t})=>n.jsxs(n.Fragment,{children:[n.jsx(md,{src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",defer:!0,strategy:"afterInteractive","data-domain-script":t.siteId,type:"text/javascript"}),e]}),Cg=vl(()=>Promise.resolve(jg),{ssr:!1}),Sg="_lgpd_2vba5_82",Eg="_success_2vba5_248",Pg="_error_2vba5_312",xe={"newsletter-root":"_newsletter-root_2vba5_1","has-border-top":"_has-border-top_2vba5_9","has-border-bottom":"_has-border-bottom_2vba5_12","newsletter-container":"_newsletter-container_2vba5_20","content-text":"_content-text_2vba5_35","form-wrapper":"_form-wrapper_2vba5_39","newsletter-container-banner":"_newsletter-container-banner_2vba5_64",lgpd:Sg,"textfield-structure-modifier":"_textfield-structure-modifier_2vba5_190","input-wrapper-modifier":"_input-wrapper-modifier_2vba5_196","submit-btn":"_submit-btn_2vba5_200","loading-spinner":"_loading-spinner_2vba5_211","terms-and-conditions-checkbox":"_terms-and-conditions-checkbox_2vba5_217","terms-and-conditions-unchecked":"_terms-and-conditions-unchecked_2vba5_230","terms-and-conditions-checked":"_terms-and-conditions-checked_2vba5_244",success:Eg,"text-structure-modifier":"_text-structure-modifier_2vba5_257","success-title":"_success-title_2vba5_297","close-button":"_close-button_2vba5_302",error:Pg,"newsletter-wrapper":"_newsletter-wrapper_2vba5_332","banner-container":"_banner-container_2vba5_345","newsletter-provider-wrapper":"_newsletter-provider-wrapper_2vba5_358","newsletter-root-banner":"_newsletter-root-banner_2vba5_371","banner-background":"_banner-background_2vba5_392","newsletter-provider-wrapper-background":"_newsletter-provider-wrapper-background_2vba5_401"},fd=({invalid_message:e,master_data_field:t,placeholder:r,required:s=!1,CONSTANTS:o})=>{const{isMobile:a}=ne(),{inputsStatus:i,setInputsStatus:c,setFormStatus:l,variant:u}=Ss();return n.jsx(d.TextField.Structure,{className:`${xe["textfield-structure-modifier"]} ${u}`,input:n.jsx(d.TextField.Input,{mode:"simple",label:r,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(p=>({...p,[t]:"none"})),l("idle"))},required:s}),supportText:i[t]==="error"||i[t]==="required"?n.jsx("div",{className:u==="horizontal"?xe["support-text-modifier"]:"",children:n.jsx(d.TextField.SupportText,{text:i[t]==="error"?e??o.NEWSLETTER_CONFIGS.messages.invalid_generic:o.NEWSLETTER_CONFIGS.messages.required_field,feedback:"error"})}):null})};fd.displayName="Newsletter.Input";const hd=({formStatus:e,fields:t,CONSTANTS:r})=>n.jsxs(n.Fragment,{children:[Array.isArray(t)&&t.map((s,o)=>n.jsx(fd,{invalid_message:s.invalid_message,master_data_field:s.master_data_field,placeholder:s.placeholder,required:s.required,type:s.type,CONSTANTS:r},`nt-field-${s.master_data_field}-${o}`)),e==="error"&&n.jsx("div",{className:xe.error,children:n.jsx("p",{children:r.NEWSLETTER_CONFIGS.form.status.error})})]});hd.displayName="Newsletter.FormFields";const _d=({formStatus:e,CONSTANTS:t,...r})=>{const{isMobile:s}=ne();return n.jsxs(d.Button,{...r,className:xe["submit-btn"],disabled:e==="success",size:s?"medium":"large",children:[n.jsx("span",{"data-loading":e==="loading","data-label":!0,children:t.NEWSLETTER_CONFIGS.submitLabel}),t.NEWSLETTER_CONFIGS.hasLoadingState&&e==="loading"&&n.jsx(d.Spinner,{className:xe["loading-spinner"],size:"small"})]})};_d.displayName="Newsletter.SubmitButton";const gd=({checkboxRef:e,formStatus:t,setFormStatus:r,CONSTANTS:s})=>{const o=a=>{a.target.checked?(e.current=!0,t==="unchecked"&&r("idle")):e.current=!1};return n.jsxs(n.Fragment,{children:[n.jsx(d.Checkbox,{adornment:n.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"&&n.jsx("div",{className:xe["terms-and-conditions-unchecked"],children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:s.ICONS.alert_circle,size:"small"})},children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{children:s.NEWSLETTER_CONFIGS.messages.terms_and_conditions_not_accepted})})})})]})};gd.displayName="Newsletter.Terms";const yd=({title:e,description:t,CONSTANTS:r})=>n.jsx("div",{className:xe.success,children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{className:xe["text-structure-modifier"],children:[n.jsxs("div",{className:xe["success-title"],children:[n.jsx(d.Icon,{name:r.ICONS.check_circle,size:"medium"}),n.jsx("h3",{children:e})]}),n.jsx("p",{children:t})]})})});yd.displayName="Newsletter.Success";const xd=({formPayloadOptionals:e,masterDataEntity:t,banner:r,termsDescription:s,lgpdLinkLable:o,lgpdLink:a,variant:i,CONSTANTS:c})=>{const{checkboxRef:l,fields:u,formStatus:p,hasTermsAndConditions:f,handleClickToSubmit:m,handleSubmit:h,setFormStatus:_}=Ss();return n.jsx(n.Fragment,{children:p==="success"?n.jsx(yd,{description:c.NEWSLETTER_CONFIGS.messages.success_description,title:c.NEWSLETTER_CONFIGS.messages.success_title,CONSTANTS:c}):n.jsxs(n.Fragment,{children:[n.jsxs("form",{className:xe["form-wrapper"],onSubmit:y=>h(y,e,t),children:[n.jsx(hd,{formStatus:p,fields:u,CONSTANTS:c}),f&&n.jsx(gd,{checkboxRef:l,formStatus:p,setFormStatus:_,CONSTANTS:c}),n.jsx(_d,{formStatus:p,type:"submit",variant:"primary",onClick:m,CONSTANTS:c})]}),(r||i==="vertical")&&n.jsxs("div",{className:xe.lgpd,children:[s&&n.jsx("p",{children:s}),o&&n.jsx($e,{href:a,children:o})]})]})})};xd.displayName="Newsletter.Form";const Ng=["horizontal","vertical"],Us=({className:e,description:t,formPayloadOptionals:r,fields:s,masterDataEntity:o,masterDataEmailField:a,masterDataNameField:i,banner:c,altBanner:l,bannerBackground:u,termsDescription:p,lgpdLinkLable:f,lgpdLink:m,title:h,variant:_,borderTop:y,borderBottom:x,CONSTANTS:b,...E})=>{if(!a||!i)return null;const j=d.helpers.ValidateProp({fieldTypes:Ng,property:_,fallback:"horizontal"});return n.jsxs("div",{className:c?u?xe["banner-background"]:xe["newsletter-wrapper"]:"",children:[c&&n.jsx(d.Banner.Container,{className:xe["banner-container"],children:n.jsx(d.Banner.ImageWrapper,{children:n.jsx(Ie.Image,{src:c,alt:l,width:"1920",height:"500"})})}),n.jsx("div",{className:c?xe["newsletter-provider-wrapper"+(u?"-background":"")]:"",children:n.jsx(Yi,{fields:s,masterDataEmailField:a,masterDataNameField:i,variant:j,CONSTANTS:b,children:n.jsx("div",{...E,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:n.jsxs("div",{className:c||j==="vertical"?xe["newsletter-container-banner"]:xe["newsletter-container"],children:[n.jsxs("div",{className:xe["content-text"],children:[n.jsx("h2",{children:h}),n.jsx("p",{children:t}),!c&&j==="horizontal"&&n.jsxs("div",{className:xe.lgpd,children:[n.jsx("p",{children:p}),f&&n.jsx($e,{target:"_blank",href:m,children:f})]})]}),n.jsx(xd,{formPayloadOptionals:r,masterDataEntity:o,CONSTANTS:b,banner:c,lgpdLink:m,lgpdLinkLable:f,termsDescription:p,variant:j})]})})})})]})};Us.displayName="Newsletter";const vd=({children:e,...t})=>n.jsx("div",{...t,children:e});vd.displayName="CallToAction";const Ig="_wrapper_aejhu_1",Rg="_body_aejhu_8",Nn={wrapper:Ig,body:Rg,"wrapper-body":"_wrapper-body_aejhu_16","accordion-modifier":"_accordion-modifier_aejhu_32"},wg=({children:e,className:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat(Nn.wrapper,t),children:e}),Ag=({data:e,ICONS:t})=>{const[r,s]=g.useState(null),o=i=>{s(c=>c===i?null:i)},{router:a}=ce();return n.jsx("div",{className:d.helpers.classNameConcat(Nn.body),children:Array.isArray(e)&&(e==null?void 0:e.map((i,c)=>{var f;const l=r===i.id,u=i.buttonHref&&i.buttonHref!=="#",p=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 n.jsx("div",{children:i.type==="button"?n.jsxs(n.Fragment,{children:[n.jsx(d.Button,{variant:"tertiary",mode:i.buttonMode??"default",size:i.buttonSize??"medium",iconNameStart:t[i.buttonIcon]??i.buttonIcon,...p,style:{marginTop:16},children:i.buttonLabel}),n.jsx(d.Utils.Divider,{direction:"horizontal",size:"small",style:{height:16}})]}):n.jsxs(d.Accordion.Wrapper,{className:d.helpers.classNameConcat(Nn["accordion-modifier"]),children:[n.jsx(d.Accordion.Header,{id:`${c}-${i.title}`,closeIndicator:l?n.jsx(d.Icon,{name:t.arrow_up,size:"medium"}):void 0,openIndicator:l?void 0:n.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),title:"accordion-header",onClick:()=>o(i.id),children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h2",{className:"typography-style-body-sm",children:i.title})})})}),n.jsx(d.Accordion.Body,{title:"accordion-body",children:n.jsx(d.TextStructure.Root,{children:l&&n.jsxs(d.TextStructure.DivWrapper,{children:[i.subtitle?n.jsx("h3",{className:"typography-style-body-md",children:i.subtitle}):n.jsx(n.Fragment,{}),n.jsx("p",{className:"typography-style-caption",children:i.description}),i.buttonLabel&&i.buttonHref?n.jsx($e,{href:i.buttonHref??"#",mode:i.buttonMode??"default",size:i.buttonSize??"medium",adornments:(f=i.buttonIcon)!=null&&f.length?{end:n.jsx(d.Icon,{name:t[i.buttonIcon]??i.buttonIcon})}:void 0,children:i.buttonLabel}):n.jsx(n.Fragment,{})]})})})]})},i.id)}))})},Tg=({className:e,data:t,ICONS:r,...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?n.jsxs(wg,{...s,className:e,children:[n.jsx("div",{className:Nn["wrapper-body"],hidden:!o,children:o&&n.jsx(Ag,{data:i.content,ICONS:r})}),n.jsx(vd,{children:n.jsx("div",{onClick:l,children:o?n.jsx(d.Button,{iconNameEnd:r.close,size:(i==null?void 0:i.helpButtonSize)??"x-large"}):n.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})})})]}):n.jsx(n.Fragment,{})},Lg="_formContainer_zwlly_1",kg="_formFieldGroup_zwlly_6",Og="_formFieldGroupName_zwlly_10",Mg="_formFieldWrapper_zwlly_20",Dg="_formFieldInput_zwlly_30",$g="_success_zwlly_73",zg="_button_zwlly_110",Fg="_error_zwlly_114",nt={formContainer:Lg,formFieldGroup:kg,formFieldGroupName:Og,formFieldWrapper:Mg,formFieldInput:Dg,success:$g,"text-structure-modifier":"_text-structure-modifier_zwlly_85",button:zg,error:Fg},Bg=({group:e,children:t,className:r})=>n.jsx(n.Fragment,{children:n.jsxs("div",{className:d.helpers.classNameConcat(nt.formFieldGroup,r),children:[n.jsx("h1",{className:nt.formFieldGroupName,children:e.groupLabel}),t]},e.groupLabel)});async function Ug(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 Hg=async e=>await fetch("/api/dito-ingest",{method:"POST",body:JSON.stringify(e)}).then(r=>r.json()),bd=g.createContext({});function jd({children:e,groups:t,masterDataEntity:r,postFn:s,actionName:o="",originName:a="",POPUP_SUBMITTED_STORAGE:i}){const[c,l]=g.useState(!1),[u,p]=g.useState({}),[f,m]=g.useState([]),[h,_]=g.useState("idle"),[y,x]=g.useState(""),b=({target:{name:j,value:v}})=>{p({...u,[j]:v})},E=j=>{j.preventDefault(),s({body:{masterDataEntity:r,payload:u}}).then(async({Message:v})=>{if(v){const S=v.match(/'(.*?[^\\])'/g)||[];var P="-";for(const C of S){const I=C.substring(1,C.length-1),T=t.flatMap(k=>k.fields).find(({name:k})=>k===I);x(I),T&&(P=T.name)}return _("error"),m([P])}if(u.email){const S=await Ug(u.email||""),C=new Date().toISOString();Hg([{user_id:S,timestamp:C,type:"IDENTIFY",traits:{id:S,created_at:C,name:u.name,email:u.email,phone:u==null?void 0:u.phone}},{action:o,timestamp:C,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"),p({}),l(!0),_("success"),m([])})};return n.jsx(bd.Provider,{value:{formErrors:f,handleInputChange:b,submitForm:E,formData:u,status:h,fieldMessage:y,success:c,setSuccess:l},children:e})}function qn(){return g.useContext(bd)}const qg=({fields:e,className:t})=>{const{formData:r,handleInputChange:s,formErrors:o}=qn();return n.jsx("div",{className:d.helpers.classNameConcat(nt.formFieldWrapper,t),children:e.map(({label:a,name:i,required:c,width:l="medium"})=>n.jsx(d.TextField.Input,{label:`${a}${c?"*":""}`,title:i,value:r[i]||"",name:i,sizeVariant:"large",onChange:s,required:c,feedback:o.includes(i)?"error":"none",className:nt.formFieldInput,"data-inputsize":l},i))})},Vg=({FORM_CONFIGS:e,ICONS:t})=>{const{router:r}=ce();return n.jsxs("div",{className:nt.success,children:[n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:t.check_circle,size:"medium"})},children:n.jsx(d.TextStructure.DivWrapper,{className:nt["text-structure-modifier"],children:n.jsx("p",{children:e.successMessage})})}),n.jsx(d.Button,{size:"large",onClick:()=>r.push("/"),className:nt.button,children:e.returnButton})]})},Wg=({FORM_CONFIGS:e,ICONS:t})=>{const{fieldMessage:r}=qn();return n.jsx("div",{className:nt.error,children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:t.delete_circle,size:"small"})},children:n.jsx(d.TextStructure.DivWrapper,{className:nt["text-structure-modifier"],children:n.jsxs("p",{children:[e.errorMessage,r]})})})})},Gg=({children:e,className:t,ICONS:r,FORM_CONFIGS:s})=>{const{submitForm:o,status:a}=qn();return n.jsx("form",{onSubmit:o,className:d.helpers.classNameConcat(nt.formContainer,t),children:a==="success"?n.jsx(Vg,{ICONS:r,FORM_CONFIGS:s}):n.jsxs(n.Fragment,{children:[e,a==="error"&&n.jsx(Wg,{ICONS:r,FORM_CONFIGS:s})]})})},Kg=e=>{const{children:t,className:r}=e;return n.jsx(jd,{...e,children:n.jsx(Gg,{ICONS:e.ICONS,FORM_CONFIGS:e.FORM_CONFIGS,className:r,children:t})})},Rt={Root:Kg,FieldGroup:Bg,FieldWrapper:qg},Xg="_button_1e35m_39",pt={"banner-container":"_banner-container_1e35m_1","banner-background":"_banner-background_1e35m_6","form-root":"_form-root_1e35m_15",button:Xg,"form-fied-wrapper":"_form-fied-wrapper_1e35m_52"};function Yg({content:e,sections:t,FORM_CONFIGS:r,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 n.jsx("div",{children:n.jsxs(d.Banner.Container,{className:pt["banner-container"],children:[n.jsx(d.Banner.ImageWrapper,{children:n.jsx(Ie.Image,{className:pt["banner-background"],src:i?e.bannerMobile:e.bannerDesk,alt:e.altBanner,width:"1920",height:"500"})}),n.jsxs(Rt.Root,{postFn:o,ICONS:s,FORM_CONFIGS:r,groups:c.groups||[],masterDataEntity:c.masterDataEntity||"",className:pt["form-root"],POPUP_SUBMITTED_STORAGE:a,children:[c.groups.map(u=>n.jsx(Rt.FieldGroup,{group:u,children:n.jsx(Rt.FieldWrapper,{fields:u.fields,className:pt["form-fied-wrapper"]})},u.groupLabel)),n.jsxs("div",{children:[n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{className:"typography-style-body-xs",children:e.requiredMessage})}),n.jsx("div",{className:pt["button-wrapper"],children:n.jsx("div",{className:pt["button-frame"],children:n.jsx(d.Button,{size:"large",type:"submit",className:pt.button,children:e.buttonLabel})})})]})]})]})})}const Qg="_content_1jj9i_36",Zg="_trends_1jj9i_47",Jg="_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:Qg,trends:Zg,"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:Jg,"search-modal__modal":"_search-modal__modal_1jj9i_100"},Cd=g.createContext({}),ey=({children:e,term:t})=>{const[r,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]),n.jsx(Cd.Provider,{value:g.useMemo(()=>({suggestedTerms:r,loading:o,setLoading:a}),[r,o]),children:e})},ty=({children:e,...t})=>n.jsx(ey,{...t,children:e}),ny=()=>{const e=g.useContext(Cd);if(!e)throw new Error("useSuggestedTermsContext must be used within a SuggestedTermsProvider");return e},Or=(e,t,r=24,s=1,o="release:desc")=>{const a=`/search?query=${t??""}&count=${r}&page=${s}${o?`&sort=${o.replace("_",":")}`:""}`;e.push(a)},Sd=({placeholder:e,noResultsTitle:t,noResultsLabel:r,noResultsTermText:s,handleClose:o,setTerm:a,ICONS:i,ITEMS_DEFAULT_SORT:c,ITEMS_PER_PAGE:l,SEARCH_MODAL:u})=>{const[p,f]=g.useState(""),{suggestedTerms:m,loading:h,setLoading:_}=ny(),{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))},E=v=>{v.key==="Enter"&&(p==null?void 0:p.length)>2&&(o(),Or(y,p,l,1,c))},j=v=>{o(),Or(y,v,l,1,c)};return g.useEffect(()=>{if(clearTimeout(x.current),p.length<=2||m.length>0){_(!1);return}return _(!0),x.current=setTimeout(()=>{Or(y,p,l,1,c),_(!1),o()},2e3),()=>{clearTimeout(x.current)}},[p,m]),n.jsx(d.DropDown.AutoComplete,{className:Ue["modal-auto-complete"],onKeyDown:E,onInputChange:b,placeholder:e,stopClickPropagation:!1,adornment:{end:h?n.jsx(d.Spinner,{size:"small"}):n.jsx(d.Button,{variant:"tertiary",size:"small",iconNameStart:i.search,onClick:()=>{j(p)},disabled:!(p.length>2)})},children:(m==null?void 0:m.length)>0&&n.jsx(n.Fragment,{children:(m==null?void 0:m.length)>0&&(p==null?void 0:p.length)>2?n.jsx(d.DropDown.AutoCompleteList,{className:Ue["modal-auto-complete__dropdown"],seeAll:n.jsx("span",{onClick:()=>j(p),children:s+p}),children:m.map((v,P)=>n.jsx(d.DropDown.ListItemWithLink,{children:n.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&&(p==null?void 0:p.length)>3&&(m==null?void 0:m.length)===0&&n.jsxs(d.DropDown.AutoCompleteList,{className:Ue["modal-search-empty"],children:[n.jsx(d.DropDown.NotResults,{description:r,title:t}),n.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:n.jsx(d.Icon,{name:i.arrow_right,size:"medium"})},children:u.EMPTY.ALL_TERMS_LABEL})]})})})};Sd.displayName="SearchModal.AutoComplete";function ry({title:e,ICONS:t}){const{isMobile:r}=ne();return n.jsx(d.Modal.Header,{navigation:"top",className:Ue["modal-header"],children:n.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!r,children:[n.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),n.jsx(d.Modal.Title,{navigation:"top",className:Ue["search-modal__title"],title:e}),n.jsx(d.Button,{className:Ue["modal-header__close-button"],"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})})}const Ed=g.createContext({searches:[],isLoading:!1,error:null}),sy=({children:e})=>{const[t,r]=g.useState([]),[s,o]=g.useState(!0),[a,i]=g.useState(null);return g.useEffect(()=>{(async()=>{try{o(!0);const l=await fetch("/api/search/topSearch");if(!l.ok)throw new Error(`Erro ao buscar os dados: ${l.status}`);const u=await l.json();r(u.data.searches||[])}catch(l){i(l instanceof Error?l.message:"Erro desconhecido")}finally{o(!1)}})()},[]),n.jsx(Ed.Provider,{value:g.useMemo(()=>({searches:t,isLoading:s,error:a}),[t,s,a]),children:e})},oy=()=>{const e=g.useContext(Ed);if(!e)throw new Error("useTopSearches must be used within a TopSearchesProvider");return e},ay=({title:e,allTermsLabel:t,allTermsUrl:r,qtyTrends:s,handleClose:o,ICONS:a,ITEMS_PER_PAGE:i})=>{const{searches:c,isLoading:l}=oy(),{router:u}=ce(),p=Array.isArray(c)?c:[];return n.jsx(n.Fragment,{children:!l&&p.length>0?n.jsx(d.ComponentList.Structure,{className:Ue.trends,title:e,children:n.jsxs("div",{className:Ue["trends-content"],children:[n.jsx(d.ComponentList.List,{columns:1,children:p.slice(0,s).map((f,m)=>n.jsx(d.ComponentList.ListItem,{className:Ue["trends-item"],children:n.jsx($e,{href:`/search?query=${f.term}&count=${i}&page=1`,size:"x-small",adornments:{end:n.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},disableUnderline:!0,title:f.term,onClick:()=>o(),children:f.term})},`list-item-${m}`))}),n.jsx(d.Button,{className:"all-terms",variant:"tertiary",size:"x-small",underline:!1,onClick:()=>{o(),u.push(r)},adornment:{end:n.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},children:t})]})}):null})},Pd=({SectionZone:e,name:t,storeId:r,previewId:s})=>{const[o,a]=g.useState();return g.useEffect(()=>{o||A.fetchContentType("search",{name:t,storeId:r,previewId:s}).then(i=>{i!=null&&i.data&&Array.isArray(i.data)&&a(i.data[0])})},[]),n.jsx(e,{data:o??[]})};function iy(e){const{SectionZone:t,name:r,storeId:s,previewId:o}=e;return n.jsx("div",{className:Ue.content,children:n.jsx(Pd,{SectionZone:t,name:r,storeId:s,previewId:o})})}const Nd=({className:e,trends:t,CONSTANTS:r,cmsConfig:s})=>{const[o,a]=g.useState(""),{isMobile:i}=ne(),c=Ya(),{setValue:l}=Rn(),{SEARCH_MODAL:u,ICONS:p,ITEMS_PER_PAGE:f,ITEMS_DEFAULT_SORT:m}=r;return n.jsxs(d.Modal.Root,{isMobile:i??!1,variant:i?"sideBottom":"sideRight",isOpen:c,setIsOpen:l,className:`${Ue.modal} ${Ue["search-modal__modal"]} ${e??""}`,children:[n.jsx(ry,{title:u.HEADER.TITLE,ICONS:p}),n.jsxs(d.Modal.Body,{className:Ue["modal-content-body"],children:[n.jsx(ty,{term:o,children:n.jsx(Sd,{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:p,ITEMS_DEFAULT_SORT:m,ITEMS_PER_PAGE:f,SEARCH_MODAL:u})}),t?n.jsx(sy,{children:n.jsx(ay,{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:p,ITEMS_PER_PAGE:f})}):null,s?n.jsx(iy,{...s}):null]})]})};Nd.displayName="SearchModal";const vn={teamComponents:{AddToCart:Ps,BackToTop:ym,HelpButton:Tg,BuyPackage:Wc,Filter:{...rt,helpers:cu},...o_,FreightCalculation:Ql,Header:Yl,Link:$e,Media:Ie,PLPNavigation:ut,ProductCard:me,ProductList:tt,ProductVariationList:Qe,Sort:zn,UserMenu:Dn,Newsletter:Us,Form:Rt},template:{minicart:Oe,pdc:id,pdc_composites:Je,pdp:q_,searchResult:pd,wishList:Ac,LPCadastro:Yg,SearchModal:Nd},utils:{EventCollector:yg,ExternalScripts:Cg,LinkOrNotLink:Xt,ObserverWrapper:Mn,SnackBarComponent:It,DraftJsLinkWrapper:Wu}},cy=(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'
@@ -55,4 +55,4 @@ See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-comp
55
55
  ${r}
56
56
  ]
57
57
  }
58
- `},ly=Object.freeze(Object.defineProperty({__proto__:null,generateMiddleware:cy},Symbol.toStringTag,{value:"Module"})),uy={helpers:ly},ts={"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 dy(e,t){const{mediatorRef:r}=ne();g.useEffect(()=>r.current.subscribe(e,t),[e,t])}const ra=({prevOnClick:e,nextOnClick:t,onBulletClick:r,currentPage:s,totalPages:o,position:a,hideControllers:i,left:c,isFirst:l,ICONS:u})=>{const[p,f]=g.useState("default");return dy("herobanner:change_controllers_variant",m=>{l&&f(m.includes("white")?"inverse":"default")}),n.jsxs(d.Carousel.Controller,{className:ts["carousel-controllers-modifier"],position:a??"absolute","data-hide-controllers":i,bottom:"16px",top:"unset",left:c,children:[n.jsxs(d.Carousel.Arrows,{className:ts["carrousel-arrows-display-controller"],children:[n.jsx(d.Button,{variant:"tertiary",onClick:e,adornment:{start:n.jsx(d.Icon,{name:u.arrow_left})},mode:p}),n.jsx(d.Button,{variant:"tertiary",onClick:t,adornment:{start:n.jsx(d.Icon,{name:u.arrow_right})},mode:p})]}),n.jsx(d.Carousel.Bullets,{page:s,total:o,onBulletClick:r,mode:p})]})},py=({children:e,data:t,banner:r,...s})=>{const{mediatorRef:o}=ne();return t.data.first?n.jsx(Mn,{observerOptions:{threshold:.51},stopOnIntersection:!1,callBackWhenVisible:()=>{o.current.publish("header:change_variant",r.headerVariant)},...s,children:e}):n.jsx(n.Fragment,{children:e})},Id=e=>{const{initialize:t,pagination:r,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(()=>Gu(e.data.config.controllerPosition??"dentro-inferior-centro"),[e]),c=g.useCallback(()=>{e.data.config.slideDuration&&r.totalPages>1&&(a.current=setInterval(()=>{s==null||s.nextPage()},e.data.config.slideDuration*1e3))},[s,e.data.config.slideDuration,r.totalPages]),l=g.useCallback(p=>{clearInterval(a.current),c(),p()},[c]),u=g.useMemo(()=>{var p;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:r.currentPage,totalPages:r.totalPages,position:i.position,hideControllers:((p=e.data.config)==null?void 0:p.hideControllers)??!1,left:i.left}},[r.currentPage,r.totalPages,i.position,e.data.config.hideControllers,l,s]);return g.useEffect(()=>(c(),()=>clearInterval(a.current)),[c]),n.jsxs(d.Carousel.Root,{innerRef:p=>{t(p)},className:d.helpers.classNameConcat(ts["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?n.jsx(ra,{ICONS:e.ICONS,...u,isFirst:e.data.first}):n.jsx(n.Fragment,{}),n.jsx(d.Carousel.Body,{children:e==null?void 0:e.data.banners.map((p,f)=>n.jsx(d.Carousel.Item,{style:o,children:n.jsx(py,{data:e,banner:p,children:n.jsx(Yt,{ICONS:e.ICONS,TEXTCONTENT_EXPANDED:e.TEXTCONTENT_EXPANDED,TIME_ZONE:e.TIME_ZONE,suppressContentEditableWarning:!0,suppressHydrationWarning:!0,data:{banner:p,index:f,componentIndex:e.data.componentIndex},creative:"banner-carousel",...e.data.first&&f===0&&{priority:!0}})})},`hero-banner-item-${f}`))}),i.shouldRender==="bottom"&&r.totalPages>1?n.jsx(ra,{ICONS:e.ICONS,...u}):n.jsx(n.Fragment,{})]})},my={Banner:$s},Ct={"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"},Rd=({data:e,CONSTANTS:t})=>{var u;const{isMobile:r}=ne(),s=e.config.size??"medium",o=e.config.disableCarouselMobile??!1,{initialize:a,pagination:i,controller:c,itemsStyles:l}=d.Carousel.useCarousel({itemsPerPage:r?e==null?void 0:e.config.slidesPerViewMobile:(u=e==null?void 0:e.config)==null?void 0:u.slidesPerView,gap:r?e.config.gapMobile:e.config.gap,direction:r&&o?"column":"row"});return n.jsx(d.Utils.Column,{style:{width:s==="small"?"70%":"100%"},alignContent:"center",justifyContent:"center",alignItems:"center",children:n.jsxs(d.Carousel.Root,{innerRef:p=>{a(p)},className:d.helpers.classNameConcat(Ct["carousel-modifier"],"common-section"),children:[s==="medium"?n.jsxs(d.TextStructure.Root,{children:[t.ACTIVE_BENNEFITS_BAR_TITLE&&n.jsx(d.TextStructure.DivWrapper,{className:Ct["carousel-title-modifier"],children:n.jsx("h2",{className:"typography-style-body-lg",children:t.BENNEFITS_BAR_TITLE})}),r&&i.totalPages>1&&n.jsx(d.Carousel.Controller,{className:d.helpers.classNameConcat(Ct["row-controller-modifier"],t.ACTIVE_BENNEFITS_BAR_TITLE?Ct["title-on"]:void 0),children:n.jsxs(d.Carousel.Arrows,{children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:n.jsx(d.Icon,{name:t.ICONS.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:n.jsx(d.Icon,{name:t.ICONS.arrow_right})}})]})})]}):n.jsx(n.Fragment,{}),n.jsx(d.Carousel.Body,{children:e.bennefit.map((p,f)=>n.jsx(d.Carousel.Item,{className:Ct["card-modifier"],style:l,children:n.jsx(d.Card,{stroke:!0,padding:"small",children:n.jsx(d.TextStructure.Root,{layoutProps:{columnWrapper:{alignContent:"start",alignItems:"start",justifyContent:"start"},textRow:{alignContent:"center",alignItems:"center",justifyContent:"center"}},adornment:{[s==="medium"?"top":"start"]:n.jsx(d.Icon,{name:p.icon,size:s==="medium"?"medium":"small"})},children:n.jsxs(d.TextStructure.DivWrapper,{alignItems:"start",children:[n.jsx("h3",{className:"typography-style-body-md",children:p.title}),p.subtitle&&p.subtitle.length?n.jsx("p",{className:"typography-style-body-xs",children:p.subtitle}):n.jsx(n.Fragment,{})]})})})},`bennefit=${f}`))}),!r&&i.totalPages>1?n.jsxs(d.Carousel.Controller,{className:Ct["row-controller-modifier"],children:[n.jsxs(d.Carousel.Arrows,{children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:n.jsx(d.Icon,{name:t.ICONS.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:n.jsx(d.Icon,{name:t.ICONS.arrow_right})}})]}),n.jsx(d.Carousel.Bullets,{page:i.currentPage,total:i.totalPages,onBulletClick:p=>c==null?void 0:c.navigateTo(p)})]}):n.jsx(n.Fragment,{})]})})},wd=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:r,className:s})=>n.jsx("div",{className:d.helpers.classNameConcat(Qr.textContentSection,s??""),style:e.borderTop?{borderTop:"none"}:void 0,children:n.jsx(Ku,{data:e,ICONS:t,TEXTCONTENT_EXPANDED:r})}),sa={"accordion-modifier":"_accordion-modifier_1we16_1","accordion-body-modifier":"_accordion-body-modifier_1we16_7"},Ad=({data:e,id:t,ICONS:r,className:s})=>{var i;const[o,a]=g.useState([]);return n.jsxs(d.Utils.Column,{gap:"var(--gap-vertical-sm)",className:s??"",children:[e.titleAccordion?n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-sm","common-section"),style:{fontWeight:500},children:e.titleAccordion})})}):n.jsx(n.Fragment,{}),(i=e.accordions)==null?void 0:i.map((c,l)=>n.jsxs(d.Accordion.Wrapper,{className:sa["accordion-modifier"],children:[n.jsx(d.Accordion.Header,{id:`${t}-text-accordion-${l}`,openIndicator:n.jsx(d.Icon,{name:r.arrow_down}),closeIndicator:n.jsx(d.Icon,{name:r.arrow_up}),startOpen:o.includes(l),onClick:()=>a(u=>u.includes(l)?u.filter(p=>p!==l):[...u,l]),children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h3",{className:"typography-style-body-md-strong",children:c.title}),c.subtitle&&c.subtitle.length?n.jsx("h2",{children:c.subtitle}):n.jsx(n.Fragment,{})]})})}),n.jsx(d.Accordion.Body,{children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:sa["accordion-body-modifier"],children:n.jsx(Ye.Editor,{editorKey:`${t}-editor-${l}`,blockRenderMap:Pn,editorState:c.text?En(JSON.parse(c.text)):Ye.EditorState.createEmpty(),onChange:()=>null})})})})]},`${t}-accordion-${l}-${o.includes(l)}`))]})},Td=g.createContext({}),fy=({data:e,children:t,...r})=>{var _,y,x,b,E,j,v,P,S,C,I,L,T;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=(E=e==null?void 0:e.staticConfig)==null?void 0:E.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:(C=(S=e==null?void 0:e.staticConfig)==null?void 0:S.staticConfig)==null?void 0:C.textColorVariant,content:((L=(I=e==null?void 0:e.content)==null?void 0:I.content)==null?void 0:L.items)??[]},u=(T=l.content)==null?void 0:T.filter(k=>!k.countDownEndDate||new Date(k.countDownEndDate)>new Date),p=u.length>1,f={...l.backgroundColor?{backgroundColor:l.backgroundColor}:{}},m=()=>{o(!1)},h=d.helpers.ValidateProp({fieldTypes:Nt.Mode,property:l.textColorVariant,fallback:"default"});return n.jsx(Td.Provider,{value:{isOpen:s,setIsOpen:o,hasCarousel:p,backgroundStyle:f,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})},ot=()=>g.useContext(Td),hy=({dateEnd:e,...t})=>{const{CONSTANTS:{TIME_ZONE:r}}=ot();return n.jsx(Sn,{dateEnd:new Date(e),TIME_ZONE:r,...t})},_y="_tipbar_bt3p0_1",gy="_tipbar__carousel_bt3p0_15",Qt={tipbar:_y,tipbar__carousel:gy,"tipbar__close-btn":"_tipbar__close-btn_bt3p0_29","tipbar-item":"_tipbar-item_bt3p0_37","tipbar-item__coupon":"_tipbar-item__coupon_bt3p0_45"},yy=({coupon:e,feedbackTitle:t,feedbackDescription:r,...s})=>{const{CONSTANTS:o}=ot(),{addCouponSeller:a,cartStore:i}=ve(),[c,l]=g.useState({status:!1,showSnackBar:!1}),[u,p]=g.useState(!1),[f,m]=g.useState(!1),h=async()=>{if(!i.items.length){m(!0);return}(await a(e,"coupon")).code===200?l({status:!0,showSnackBar:!0}):p(!0)};return g.useEffect(()=>{c.showSnackBar&&setTimeout(()=>{l(_=>({..._,showSnackBar:!1}))},o.TIPBAR_CONFIGS.snackbar_timeout)},[c.showSnackBar]),g.useEffect(()=>{u&&setTimeout(()=>{p(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[u]),g.useEffect(()=>{f&&setTimeout(()=>{m(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[f]),n.jsxs(n.Fragment,{children:[n.jsx(d.Button,{...s,onClick:h,disabled:c.status,className:Qt["tipbar-item__coupon"],children:c.status?`${o.TIPBAR_CONFIGS.coupon_applied_message}`:`${o.TIPBAR_CONFIGS.coupon_default_message}`}),c.showSnackBar&&(t||r)&&n.jsx(It,{title:t,subtitle:r,Z_INDEX_WAR:o.Z_INDEX_WAR},`feedback-coupon-${e}`),u&&n.jsx(It,{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&&n.jsx(It,{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}`)]})},xy=({title:e,description:t,style:r,mode:s,className:o})=>n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{mode:s,className:o,children:[e&&n.jsx("h3",{className:"typography-style-body-sm",style:r,children:e}),t&&n.jsx("p",{className:"typography-style-caption",style:r,children:t})]})}),vy=({coupon:e,...t})=>{const{CONSTANTS:r}=ot();return n.jsx(d.Copy,{...t,iconCopy:r.ICONS.copy,iconSuccess:r.ICONS.check,children:e})},by=({staticZone:e,type:t,className:r,description:s,title:o})=>{const{mode:a}=ot();if(t==="countdown")return n.jsx(hy,{dateEnd:e.countDownEndDate,size:"x-small",mode:a});if(t==="coupon"){const i=d.helpers.ValidateProp({fieldTypes:Nt.Mode,property:e.couponButtonMode,fallback:"default"}),c=d.helpers.ValidateProp({fieldTypes:Nt.VariantsExtended,property:e.couponButtonVariant,fallback:"primary"});return e.coupon?n.jsx(yy,{coupon:e.coupon,mode:i,variant:c,feedbackTitle:e.couponFeedbackTitle,feedbackDescription:e.couponFeedbackDescription}):null}if(t==="copy"){const i=d.helpers.ValidateProp({fieldTypes:Nt.Mode,property:e.couponButtonMode,fallback:"default"});return e.coupon?n.jsx(vy,{coupon:e.coupon,mode:i}):null}return n.jsx(xy,{title:o,description:s,mode:a,className:r})},oa=({handleCloseTipbar:e,mode:t})=>{const{CONSTANTS:r}=ot();return n.jsx(d.Button,{title:"fechar tipbar",className:Qt["tipbar__close-btn"],onClick:e,variant:"tertiary",mode:t,adornment:{start:n.jsx(d.Icon,{name:r.ICONS.close})}})},jy=({children:e,mode:t="default",showCarouselArrows:r=!0,slideTranstionTimer:s})=>{const{carouselProps:o,CONSTANTS:a}=ot(),i=g.useRef(null),c=(u,p)=>{var f,m;u.stopPropagation(),u.preventDefault(),p==="prev"?(f=o.controller)==null||f.prevPage():(m=o.controller)==null||m.nextPage(),i.current&&(clearInterval(i.current),l())},l=g.useCallback(()=>{if(s&&o.controller){const u=setInterval(()=>{var p;(p=o.controller)==null||p.nextPage()},s);i.current=u}},[s,o]);return g.useEffect(()=>(l(),()=>{i.current&&clearInterval(i.current)}),[s,l]),n.jsxs(d.Carousel.Root,{innerRef:u=>{o.initialize(u)},className:Qt.tipbar__carousel,style:{flexDirection:"row",alignItems:"center"},children:[r&&n.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"prev"),adornment:{start:n.jsx(d.Icon,{name:a.ICONS.arrow_left})}}),n.jsx(d.Carousel.Body,{children:e}),r&&n.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"next"),adornment:{start:n.jsx(d.Icon,{name:a.ICONS.arrow_right})}})]})},Cy=({children:e,className:t})=>{const{hasCarousel:r,mode:s,hasCloseBtn:o,backgroundStyle:a,showCarouselArrows:i,slideTranstionTimer:c,handleCloseTipbar:l}=ot(),u=r&&i;return n.jsx("div",{style:a,"data-hasclosebtn":o,className:d.helpers.classNameConcat(Qt.tipbar,t),children:r?n.jsxs(n.Fragment,{children:[n.jsx(jy,{mode:s,showCarouselArrows:u,slideTranstionTimer:c,children:e}),o&&n.jsx(oa,{handleCloseTipbar:l,showCarouselArrows:u,mode:s})]}):n.jsxs(n.Fragment,{children:[e,o&&n.jsx(oa,{handleCloseTipbar:l,mode:s})]})})},Sy=({children:e,highlightFirstSection:t,...r})=>{const{hasCarousel:s,carouselProps:o}=ot(),a=n.jsx("div",{...r,className:Qt["tipbar-item"],children:e});return s?n.jsx(d.Carousel.Item,{style:o.itemsStyles,children:a}):a},Ld=({className:e})=>{const{isOpen:t,slices:r}=ot();return r.length&&t?n.jsx(Cy,{children:r.map((s,o)=>{var a;return n.jsx(n.Fragment,{children:n.jsx(Xt,{href:s.link,children:n.jsx(Sy,{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)=>n.jsx(by,{staticZone:s,type:i.type,title:i.title,description:i.description,className:e},`tipbar-slice-field-${c}`)):null})})},`tipbar-slice-${o}`)})}):null};Ld.displayName="TipBar.Root";const ns=({className:e,...t})=>n.jsx(fy,{...t,children:n.jsx(Ld,{className:e})});ns.displayName="TipBar";const Ey=({CONSTANTS:e,data:t})=>{const{pathname:r}=ce(),{tipbarRef:s}=Ee(),o=c=>{const l=t==null?void 0:t.find(u=>{var p,f,m,h,_;return((f=(p=u.staticConfig)==null?void 0:p.staticConfig)==null?void 0:f.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 p,f,m,h,_,y;return((f=(p=u.staticConfig)==null?void 0:p.staticConfig)==null?void 0:f.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 n.jsxs("div",{ref:s,className:A.responsive["responsive-flex"],children:[i&&n.jsx("div",{className:A.responsive["responsive-mobile-flex"],children:n.jsx(ns,{data:i,CONSTANTS:e})}),a&&n.jsx("div",{className:A.responsive["responsive-desktop-flex"],children:n.jsx(ns,{data:a,CONSTANTS:e})})]})},aa={"card-image-wrapper":"_card-image-wrapper_10mul_1","card-image-container":"_card-image-container_10mul_9"},kd=e=>{const{nextimage:t}=ce();return n.jsx(n.Fragment,{children:e.data.banners.map((r,s)=>n.jsx("div",{className:aa["card-image-wrapper"],children:n.jsx("div",{className:aa["card-image-container"],children:n.jsx(t,{src:r.image,alt:r.altImage?r.altImage:"Banner Coleção",width:500,height:600})})},s))})},Od=({data:{componentIndex:e,...t},CONSTANTS:r})=>n.jsx(Us,{...t,CONSTANTS:r}),Md=async e=>{const{type:t}=e,r=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(r,{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)},Py="_shelf__container_bi04n_10",Dd={shelf__container:Py},Ny=({collectionSearch:e,title:t,CONSTANTS:r})=>{const[s,o]=g.useState([]),{isMobile:a}=ne(),{ref:i,inView:c}=ca.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:l}=oe();return g.useEffect(()=>{if(!e)return;function u(){var p,f;Md({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:((f=e==null?void 0:e.params)==null?void 0:f.sort)??r.ITEMS_DEFAULT_SORT}}).then(m=>{o(m)})}u()},[e]),g.useEffect(()=>{!c||s.length===0||l({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:s},customData:{item_list_name:t??"Você também pode gostar"}}})},[c,s]),s.length===0?null:n.jsx("div",{ref:i,className:Dd.shelf__container,children:n.jsx(Ht.Shelf,{title:t??"Você também pode gostar",itemsPerPage:{desktop:4.4,mobile:2.2},ICONS:r.ICONS,children:Array.isArray(s)&&s.map(({node:u},p)=>{const{availability:{status:f}}=u;return f?n.jsx(Ht.Card,{item:u,isMobile:a,size:"medium",index:p,shelfTitle:t??"Você também pode gostar",CONSTANTS:r},u.id):null})})})},Iy=({recommendationSearch:e,title:t,CONSTANTS:r})=>{const[s,o]=g.useState([]),{isMobile:a}=ne(),{ref:i,inView:c}=ca.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 p(){var f;Md({type:"recommendationSearch",facets:u,params:{count:((f=e==null?void 0:e.params)==null?void 0:f.count)??12,sort:r.ITEMS_DEFAULT_SORT}}).then(m=>o(m))}p()},[u,e]),g.useEffect(()=>{if(!c||s.length===0||(e==null?void 0:e.type)==="suggestions")return;const p=t??"Você também pode gostar";l({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:s},customData:{item_list_name:p},outsideEcommerceData:{item_list_name:p}}})},[c,s]),(s==null?void 0:s.length)===0?null:(e==null?void 0:e.type)==="suggestions"?n.jsx(Wc,{products:s,innerRef:i,inView:c,CONSTANTS:r}):n.jsx("div",{ref:i,className:Dd.shelf__container,children:n.jsx(Ht.Shelf,{title:t??"Você também pode gostar",itemsPerPage:{desktop:4.4,mobile:2.2},ICONS:r.ICONS,children:Array.isArray(s)&&s.map(({node:p},f)=>{const{availability:{status:m}}=p;return m?n.jsx(Ht.Card,{item:p,isMobile:a,size:"medium",index:f,shelfTitle:t??"Você também pode gostar",CONSTANTS:r},p.id):null})})})},zd=({data:e,CONSTANTS:t})=>{const{productId:r}=Wi();return e.productLists.map((s,o)=>n.jsx(Iy,{title:s.title,recommendationSearch:{type:s.product_group_option,productId:r,params:{count:s.number_of_items,sort:"score:desc"}},CONSTANTS:t},`shelf=${o}`))},$d=({data:e,CONSTANTS:t})=>e.productLists.map((r,s)=>{const o=r.collectionId?{term:"",facets:[{key:"productclusterids",value:`${r.collectionId}`}]}:{term:r.search_base_name,facets:[]};return n.jsx(Ny,{title:r.title,collectionSearch:{params:{count:r.number_of_items,sort:r.sort},...o},CONSTANTS:t},`shelf=${s}`)}),Ry="_embedLiveContainer_1ss0l_2",wy="_embedLivePlayer_1ss0l_7",ia={embedLiveContainer:Ry,embedLivePlayer:wy},Fd=({data:e})=>n.jsx("div",{className:ia.embedLiveContainer,children:n.jsx("div",{className:ia.embedLivePlayer,children:e.banner.videosrc?n.jsx(Ie.Video,{src:e.banner.videosrc??"",playsInline:!0,autoPlay:!0,loop:!0,muted:!0,title:"Live",controls:!0}):n.jsxs("div",{children:[n.jsx("iframe",{src:e.banner.embed_source??"",allow:"autoplay; fullscreen; picture-in-picture; loop;",title:"Live"}),n.jsx(md,{src:"https://player.vimeo.com/api/player.js",defer:!0,strategy:"lazyOnload"})]})})}),Ay="_popup_5taxs_9",Ty="_popup__overlay_5taxs_19",Ly="_popup__modal_5taxs_27",Be={popup:Ay,popup__overlay:Ty,popup__modal:Ly,"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"},ky=e=>n.jsx("div",{className:Be["popup__modal--success"],children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:e.ICONS.check_circle,size:"large"})},children:n.jsxs(d.TextStructure.DivWrapper,{className:Be["text-structure-modifier"],children:[n.jsx("h3",{className:"typography-style-body-sm-strong",children:e.successTitle}),n.jsx("p",{className:"typography-style-body-caption",children:e.successDescription})]})})}),Oy=e=>{const{title:t,description:r,groups:s,ICONS:o}=e,{formErrors:a,submitForm:i,success:c}=qn(),[l,u]=g.useState(!1);return n.jsx("form",{onSubmit:i,className:Be.formContainer,children:n.jsxs("div",{className:Be["popup__modal--form"],children:[n.jsxs(d.TextStructure.DivWrapper,{className:Be["popup__modal--header"],children:[n.jsx("strong",{className:"typography-style-body-md-strong",children:t}),n.jsx("p",{className:"typography-style-body-xs",children:r})]}),c?n.jsx(ky,{...e}):n.jsxs(n.Fragment,{children:[s.map(p=>n.jsx(Rt.FieldGroup,{group:p,children:n.jsx(Rt.FieldWrapper,{fields:p.fields})},p.groupLabel)),n.jsx(d.Checkbox,{className:Be["popup__modal--checkbox"],adornment:n.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)}),n.jsxs("div",{children:[!l&&n.jsx(d.TextStructure.DivWrapper,{className:Be["popup__modal--status"],children:n.jsxs("p",{className:"typography-style-body-caption",children:[n.jsx(d.Icon,{size:"small",name:o.alert_circle}),zp]})}),n.jsx(d.Button,{disabled:!l,size:"medium",type:"submit",children:Fp}),a.length?n.jsx(d.TextStructure.DivWrapper,{className:Be["popup__modal--status"],children:n.jsx("p",{className:d.helpers.classNameConcat(Be.formSubmitWarning,"typography-style-body-xs"),children:$p})}):null]})]})]})})},Bd=({data:e,CONSTANTS:t})=>{const[r,s]=g.useState(!1),o=typeof window<"u"?window.sessionStorage.getItem(t.POPUP_TRACK_STORAGE)||window.localStorage.getItem(t.POPUP_SUBMITTED_STORAGE):null,a=()=>{s(!1),window.sessionStorage.setItem(t.POPUP_TRACK_STORAGE,"true")};return g.useEffect(()=>{setTimeout(()=>!o&&s(!0),2e3)},[]),e.active&&r?n.jsxs("div",{className:Be.popup,children:[n.jsx("div",{onClick:a,className:Be.popup__overlay}),n.jsxs("div",{className:Be.popup__modal,children:[n.jsx(d.Button,{onClick:a,variant:"tertiary",className:Be["popup__modal--close"],children:n.jsx(d.Icon,{style:{color:e.closeColor||"#000"},name:t.ICONS.close,size:"medium"})}),n.jsx("div",{children:n.jsx(Ie.Image,{src:e.imageUrl,width:"459",height:"418",alt:e.title})}),n.jsx(jd,{...e,children:n.jsx(Oy,{...e,ICONS:t.ICONS})})]})]}):null};class My extends g.Component{constructor(){super(...arguments);Jt(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(){return{hasError:!0,error:null}}componentDidCatch(r,s){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:",s),console.groupEnd()}}render(){const{hasError:r}=this.state,{children:s,fallback:o}=this.props;return r&&process.env.NODE_ENV==="production"?null:r&&o!==void 0?o:s}}const Dy={"Image Grid":kd,"Embed Live":Fd,"Banner Carousel":Id,Banner:$s,"Bennefits Bar":Rd,newsletter:Od,TextContent:wd,TextAccordion:Ad,"Product Carousel":$d,"PDP Product Carousel":zd,"Popup Modal":Bd},zy=({data:e,identifyWhoIsFirst:t=!1,componentConfigs:r})=>e==null?void 0:e.map((s,o)=>{const a=Dy[s.name],i={...(r==null?void 0:r[s.name])??{}};return t&&o===0&&(s.data.first=!0),s.data.componentIndex=o,s.name==="TextAccordion"&&(i.id=`text-accordion-${o}`),a?n.jsx(My,{name:s.name,children:n.jsx(a,{data:s.data,...i})},`section-zone-component-${o}`):null}),$y={Banner:my,BannerSection:Yt,BennefitsBarSection:Rd,SingleBannerSection:$s,TextContentSection:wd,BannerCarousel:Id,TextAccordionSection:Ad,TipbarScreening:Ey,ImageGrid:kd,SearchPageScreening:A.SearchPageScreening,SearchContent:Pd,NewsletterSection:Od,PDPProductCarousel:zd,ProductCarousel:$d,EmbedLive:Fd,PopupModalSection:Bd,SectionZone:zy},Fy={Components:$y,helpers:Z_};exports.cms=Fy;exports.contexts=Qi;exports.data=Es;exports.layout=vn;exports.scripts=uy;
58
+ `},ly=Object.freeze(Object.defineProperty({__proto__:null,generateMiddleware:cy},Symbol.toStringTag,{value:"Module"})),uy={helpers:ly},ts={"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 dy(e,t){const{mediatorRef:r}=ne();g.useEffect(()=>r.current.subscribe(e,t),[e,t])}const ra=({prevOnClick:e,nextOnClick:t,onBulletClick:r,currentPage:s,totalPages:o,position:a,hideControllers:i,left:c,isFirst:l,ICONS:u})=>{const[p,f]=g.useState("default");return dy("herobanner:change_controllers_variant",m=>{l&&f(m.includes("white")?"inverse":"default")}),n.jsxs(d.Carousel.Controller,{className:ts["carousel-controllers-modifier"],position:a??"absolute","data-hide-controllers":i,bottom:"16px",top:"unset",left:c,children:[n.jsxs(d.Carousel.Arrows,{className:ts["carrousel-arrows-display-controller"],children:[n.jsx(d.Button,{variant:"tertiary",onClick:e,adornment:{start:n.jsx(d.Icon,{name:u.arrow_left})},mode:p}),n.jsx(d.Button,{variant:"tertiary",onClick:t,adornment:{start:n.jsx(d.Icon,{name:u.arrow_right})},mode:p})]}),n.jsx(d.Carousel.Bullets,{page:s,total:o,onBulletClick:r,mode:p})]})},py=({children:e,data:t,banner:r,...s})=>{const{mediatorRef:o}=ne();return t.data.first?n.jsx(Mn,{observerOptions:{threshold:.51},stopOnIntersection:!1,callBackWhenVisible:()=>{o.current.publish("header:change_variant",r.headerVariant)},...s,children:e}):n.jsx(n.Fragment,{children:e})},Id=e=>{const{initialize:t,pagination:r,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(()=>Gu(e.data.config.controllerPosition??"dentro-inferior-centro"),[e]),c=g.useCallback(()=>{e.data.config.slideDuration&&r.totalPages>1&&(a.current=setInterval(()=>{s==null||s.nextPage()},e.data.config.slideDuration*1e3))},[s,e.data.config.slideDuration,r.totalPages]),l=g.useCallback(p=>{clearInterval(a.current),c(),p()},[c]),u=g.useMemo(()=>{var p;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:r.currentPage,totalPages:r.totalPages,position:i.position,hideControllers:((p=e.data.config)==null?void 0:p.hideControllers)??!1,left:i.left}},[r.currentPage,r.totalPages,i.position,e.data.config.hideControllers,l,s]);return g.useEffect(()=>(c(),()=>clearInterval(a.current)),[c]),n.jsxs(d.Carousel.Root,{innerRef:p=>{t(p)},className:d.helpers.classNameConcat(ts["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?n.jsx(ra,{ICONS:e.ICONS,...u,isFirst:e.data.first}):n.jsx(n.Fragment,{}),n.jsx(d.Carousel.Body,{children:e==null?void 0:e.data.banners.map((p,f)=>n.jsx(d.Carousel.Item,{style:o,children:n.jsx(py,{data:e,banner:p,children:n.jsx(Yt,{ICONS:e.ICONS,TEXTCONTENT_EXPANDED:e.TEXTCONTENT_EXPANDED,TIME_ZONE:e.TIME_ZONE,suppressContentEditableWarning:!0,suppressHydrationWarning:!0,data:{banner:p,index:f,componentIndex:e.data.componentIndex},creative:"banner-carousel",...e.data.first&&f===0&&{priority:!0}})})},`hero-banner-item-${f}`))}),i.shouldRender==="bottom"&&r.totalPages>1?n.jsx(ra,{ICONS:e.ICONS,...u}):n.jsx(n.Fragment,{})]})},my={Banner:zs},Ct={"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"},Rd=({data:e,CONSTANTS:t})=>{var u;const{isMobile:r}=ne(),s=e.config.size??"medium",o=e.config.disableCarouselMobile??!1,{initialize:a,pagination:i,controller:c,itemsStyles:l}=d.Carousel.useCarousel({itemsPerPage:r?e==null?void 0:e.config.slidesPerViewMobile:(u=e==null?void 0:e.config)==null?void 0:u.slidesPerView,gap:r?e.config.gapMobile:e.config.gap,direction:r&&o?"column":"row"});return n.jsx(d.Utils.Column,{style:{width:s==="small"?"70%":"100%"},alignContent:"center",justifyContent:"center",alignItems:"center",children:n.jsxs(d.Carousel.Root,{innerRef:p=>{a(p)},className:d.helpers.classNameConcat(Ct["carousel-modifier"],"common-section"),children:[s==="medium"?n.jsxs(d.TextStructure.Root,{children:[t.ACTIVE_BENNEFITS_BAR_TITLE&&n.jsx(d.TextStructure.DivWrapper,{className:Ct["carousel-title-modifier"],children:n.jsx("h2",{className:"typography-style-body-lg",children:t.BENNEFITS_BAR_TITLE})}),r&&i.totalPages>1&&n.jsx(d.Carousel.Controller,{className:d.helpers.classNameConcat(Ct["row-controller-modifier"],t.ACTIVE_BENNEFITS_BAR_TITLE?Ct["title-on"]:void 0),children:n.jsxs(d.Carousel.Arrows,{children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:n.jsx(d.Icon,{name:t.ICONS.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:n.jsx(d.Icon,{name:t.ICONS.arrow_right})}})]})})]}):n.jsx(n.Fragment,{}),n.jsx(d.Carousel.Body,{children:e.bennefit.map((p,f)=>n.jsx(d.Carousel.Item,{className:Ct["card-modifier"],style:l,children:n.jsx(d.Card,{stroke:!0,padding:"small",children:n.jsx(d.TextStructure.Root,{layoutProps:{columnWrapper:{alignContent:"start",alignItems:"start",justifyContent:"start"},textRow:{alignContent:"center",alignItems:"center",justifyContent:"center"}},adornment:{[s==="medium"?"top":"start"]:n.jsx(d.Icon,{name:p.icon,size:s==="medium"?"medium":"small"})},children:n.jsxs(d.TextStructure.DivWrapper,{alignItems:"start",children:[n.jsx("h3",{className:"typography-style-body-md",children:p.title}),p.subtitle&&p.subtitle.length?n.jsx("p",{className:"typography-style-body-xs",children:p.subtitle}):n.jsx(n.Fragment,{})]})})})},`bennefit=${f}`))}),!r&&i.totalPages>1?n.jsxs(d.Carousel.Controller,{className:Ct["row-controller-modifier"],children:[n.jsxs(d.Carousel.Arrows,{children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:n.jsx(d.Icon,{name:t.ICONS.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:n.jsx(d.Icon,{name:t.ICONS.arrow_right})}})]}),n.jsx(d.Carousel.Bullets,{page:i.currentPage,total:i.totalPages,onBulletClick:p=>c==null?void 0:c.navigateTo(p)})]}):n.jsx(n.Fragment,{})]})})},wd=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:r,className:s})=>n.jsx("div",{className:d.helpers.classNameConcat(Qr.textContentSection,s??""),style:e.borderTop?{borderTop:"none"}:void 0,children:n.jsx(Ku,{data:e,ICONS:t,TEXTCONTENT_EXPANDED:r})}),sa={"accordion-modifier":"_accordion-modifier_1we16_1","accordion-body-modifier":"_accordion-body-modifier_1we16_7"},Ad=({data:e,id:t,ICONS:r,className:s})=>{var i;const[o,a]=g.useState([]);return n.jsxs(d.Utils.Column,{gap:"var(--gap-vertical-sm)",className:s??"",children:[e.titleAccordion?n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-sm","common-section"),style:{fontWeight:500},children:e.titleAccordion})})}):n.jsx(n.Fragment,{}),(i=e.accordions)==null?void 0:i.map((c,l)=>n.jsxs(d.Accordion.Wrapper,{className:sa["accordion-modifier"],children:[n.jsx(d.Accordion.Header,{id:`${t}-text-accordion-${l}`,openIndicator:n.jsx(d.Icon,{name:r.arrow_down}),closeIndicator:n.jsx(d.Icon,{name:r.arrow_up}),startOpen:o.includes(l),onClick:()=>a(u=>u.includes(l)?u.filter(p=>p!==l):[...u,l]),children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h3",{className:"typography-style-body-md-strong",children:c.title}),c.subtitle&&c.subtitle.length?n.jsx("h2",{children:c.subtitle}):n.jsx(n.Fragment,{})]})})}),n.jsx(d.Accordion.Body,{children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:sa["accordion-body-modifier"],children:n.jsx(Ye.Editor,{editorKey:`${t}-editor-${l}`,blockRenderMap:Pn,editorState:c.text?En(JSON.parse(c.text)):Ye.EditorState.createEmpty(),onChange:()=>null})})})})]},`${t}-accordion-${l}-${o.includes(l)}`))]})},Td=g.createContext({}),fy=({data:e,children:t,...r})=>{var _,y,x,b,E,j,v,P,S,C,I,L,T;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=(E=e==null?void 0:e.staticConfig)==null?void 0:E.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:(C=(S=e==null?void 0:e.staticConfig)==null?void 0:S.staticConfig)==null?void 0:C.textColorVariant,content:((L=(I=e==null?void 0:e.content)==null?void 0:I.content)==null?void 0:L.items)??[]},u=(T=l.content)==null?void 0:T.filter(k=>!k.countDownEndDate||new Date(k.countDownEndDate)>new Date),p=u.length>1,f={...l.backgroundColor?{backgroundColor:l.backgroundColor}:{}},m=()=>{o(!1)},h=d.helpers.ValidateProp({fieldTypes:Nt.Mode,property:l.textColorVariant,fallback:"default"});return n.jsx(Td.Provider,{value:{isOpen:s,setIsOpen:o,hasCarousel:p,backgroundStyle:f,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})},ot=()=>g.useContext(Td),hy=({dateEnd:e,...t})=>{const{CONSTANTS:{TIME_ZONE:r}}=ot();return n.jsx(Sn,{dateEnd:new Date(e),TIME_ZONE:r,...t})},_y="_tipbar_bt3p0_1",gy="_tipbar__carousel_bt3p0_15",Qt={tipbar:_y,tipbar__carousel:gy,"tipbar__close-btn":"_tipbar__close-btn_bt3p0_29","tipbar-item":"_tipbar-item_bt3p0_37","tipbar-item__coupon":"_tipbar-item__coupon_bt3p0_45"},yy=({coupon:e,feedbackTitle:t,feedbackDescription:r,...s})=>{const{CONSTANTS:o}=ot(),{addCouponSeller:a,cartStore:i}=ve(),[c,l]=g.useState({status:!1,showSnackBar:!1}),[u,p]=g.useState(!1),[f,m]=g.useState(!1),h=async()=>{if(!i.items.length){m(!0);return}(await a(e,"coupon")).code===200?l({status:!0,showSnackBar:!0}):p(!0)};return g.useEffect(()=>{c.showSnackBar&&setTimeout(()=>{l(_=>({..._,showSnackBar:!1}))},o.TIPBAR_CONFIGS.snackbar_timeout)},[c.showSnackBar]),g.useEffect(()=>{u&&setTimeout(()=>{p(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[u]),g.useEffect(()=>{f&&setTimeout(()=>{m(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[f]),n.jsxs(n.Fragment,{children:[n.jsx(d.Button,{...s,onClick:h,disabled:c.status,className:Qt["tipbar-item__coupon"],children:c.status?`${o.TIPBAR_CONFIGS.coupon_applied_message}`:`${o.TIPBAR_CONFIGS.coupon_default_message}`}),c.showSnackBar&&(t||r)&&n.jsx(It,{title:t,subtitle:r,Z_INDEX_WAR:o.Z_INDEX_WAR},`feedback-coupon-${e}`),u&&n.jsx(It,{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&&n.jsx(It,{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}`)]})},xy=({title:e,description:t,style:r,mode:s,className:o})=>n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{mode:s,className:o,children:[e&&n.jsx("h3",{className:"typography-style-body-sm",style:r,children:e}),t&&n.jsx("p",{className:"typography-style-caption",style:r,children:t})]})}),vy=({coupon:e,...t})=>{const{CONSTANTS:r}=ot();return n.jsx(d.Copy,{...t,iconCopy:r.ICONS.copy,iconSuccess:r.ICONS.check,children:e})},by=({staticZone:e,type:t,className:r,description:s,title:o})=>{const{mode:a}=ot();if(t==="countdown")return n.jsx(hy,{dateEnd:e.countDownEndDate,size:"x-small",mode:a});if(t==="coupon"){const i=d.helpers.ValidateProp({fieldTypes:Nt.Mode,property:e.couponButtonMode,fallback:"default"}),c=d.helpers.ValidateProp({fieldTypes:Nt.VariantsExtended,property:e.couponButtonVariant,fallback:"primary"});return e.coupon?n.jsx(yy,{coupon:e.coupon,mode:i,variant:c,feedbackTitle:e.couponFeedbackTitle,feedbackDescription:e.couponFeedbackDescription}):null}if(t==="copy"){const i=d.helpers.ValidateProp({fieldTypes:Nt.Mode,property:e.couponButtonMode,fallback:"default"});return e.coupon?n.jsx(vy,{coupon:e.coupon,mode:i}):null}return n.jsx(xy,{title:o,description:s,mode:a,className:r})},oa=({handleCloseTipbar:e,mode:t})=>{const{CONSTANTS:r}=ot();return n.jsx(d.Button,{title:"fechar tipbar",className:Qt["tipbar__close-btn"],onClick:e,variant:"tertiary",mode:t,adornment:{start:n.jsx(d.Icon,{name:r.ICONS.close})}})},jy=({children:e,mode:t="default",showCarouselArrows:r=!0,slideTranstionTimer:s})=>{const{carouselProps:o,CONSTANTS:a}=ot(),i=g.useRef(null),c=(u,p)=>{var f,m;u.stopPropagation(),u.preventDefault(),p==="prev"?(f=o.controller)==null||f.prevPage():(m=o.controller)==null||m.nextPage(),i.current&&(clearInterval(i.current),l())},l=g.useCallback(()=>{if(s&&o.controller){const u=setInterval(()=>{var p;(p=o.controller)==null||p.nextPage()},s);i.current=u}},[s,o]);return g.useEffect(()=>(l(),()=>{i.current&&clearInterval(i.current)}),[s,l]),n.jsxs(d.Carousel.Root,{innerRef:u=>{o.initialize(u)},className:Qt.tipbar__carousel,style:{flexDirection:"row",alignItems:"center"},children:[r&&n.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"prev"),adornment:{start:n.jsx(d.Icon,{name:a.ICONS.arrow_left})}}),n.jsx(d.Carousel.Body,{children:e}),r&&n.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"next"),adornment:{start:n.jsx(d.Icon,{name:a.ICONS.arrow_right})}})]})},Cy=({children:e,className:t})=>{const{hasCarousel:r,mode:s,hasCloseBtn:o,backgroundStyle:a,showCarouselArrows:i,slideTranstionTimer:c,handleCloseTipbar:l}=ot(),u=r&&i;return n.jsx("div",{style:a,"data-hasclosebtn":o,className:d.helpers.classNameConcat(Qt.tipbar,t),children:r?n.jsxs(n.Fragment,{children:[n.jsx(jy,{mode:s,showCarouselArrows:u,slideTranstionTimer:c,children:e}),o&&n.jsx(oa,{handleCloseTipbar:l,showCarouselArrows:u,mode:s})]}):n.jsxs(n.Fragment,{children:[e,o&&n.jsx(oa,{handleCloseTipbar:l,mode:s})]})})},Sy=({children:e,highlightFirstSection:t,...r})=>{const{hasCarousel:s,carouselProps:o}=ot(),a=n.jsx("div",{...r,className:Qt["tipbar-item"],children:e});return s?n.jsx(d.Carousel.Item,{style:o.itemsStyles,children:a}):a},Ld=({className:e})=>{const{isOpen:t,slices:r}=ot();return r.length&&t?n.jsx(Cy,{children:r.map((s,o)=>{var a;return n.jsx(n.Fragment,{children:n.jsx(Xt,{href:s.link,children:n.jsx(Sy,{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)=>n.jsx(by,{staticZone:s,type:i.type,title:i.title,description:i.description,className:e},`tipbar-slice-field-${c}`)):null})})},`tipbar-slice-${o}`)})}):null};Ld.displayName="TipBar.Root";const ns=({className:e,...t})=>n.jsx(fy,{...t,children:n.jsx(Ld,{className:e})});ns.displayName="TipBar";const Ey=({CONSTANTS:e,data:t})=>{const{pathname:r}=ce(),{tipbarRef:s}=Ee(),o=c=>{const l=t==null?void 0:t.find(u=>{var p,f,m,h,_;return((f=(p=u.staticConfig)==null?void 0:p.staticConfig)==null?void 0:f.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 p,f,m,h,_,y;return((f=(p=u.staticConfig)==null?void 0:p.staticConfig)==null?void 0:f.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 n.jsxs("div",{ref:s,className:A.responsive["responsive-flex"],children:[i&&n.jsx("div",{className:A.responsive["responsive-mobile-flex"],children:n.jsx(ns,{data:i,CONSTANTS:e})}),a&&n.jsx("div",{className:A.responsive["responsive-desktop-flex"],children:n.jsx(ns,{data:a,CONSTANTS:e})})]})},aa={"card-image-wrapper":"_card-image-wrapper_10mul_1","card-image-container":"_card-image-container_10mul_9"},kd=e=>{const{nextimage:t}=ce();return n.jsx(n.Fragment,{children:e.data.banners.map((r,s)=>n.jsx("div",{className:aa["card-image-wrapper"],children:n.jsx("div",{className:aa["card-image-container"],children:n.jsx(t,{src:r.image,alt:r.altImage?r.altImage:"Banner Coleção",width:500,height:600})})},s))})},Od=({data:{componentIndex:e,...t},CONSTANTS:r})=>n.jsx(Us,{...t,CONSTANTS:r}),Md=async e=>{const{type:t}=e,r=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(r,{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)},Py="_shelf__container_bi04n_10",Dd={shelf__container:Py},Ny=({collectionSearch:e,title:t,CONSTANTS:r})=>{const[s,o]=g.useState([]),{isMobile:a}=ne(),{ref:i,inView:c}=ca.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:l}=oe();return g.useEffect(()=>{if(!e)return;function u(){var p,f;Md({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:((f=e==null?void 0:e.params)==null?void 0:f.sort)??r.ITEMS_DEFAULT_SORT}}).then(m=>{o(m)})}u()},[e]),g.useEffect(()=>{!c||s.length===0||l({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:s},customData:{item_list_name:t??"Você também pode gostar"}}})},[c,s]),s.length===0?null:n.jsx("div",{ref:i,className:Dd.shelf__container,children:n.jsx(Ht.Shelf,{title:t??"Você também pode gostar",itemsPerPage:{desktop:4.4,mobile:2.2},ICONS:r.ICONS,children:Array.isArray(s)&&s.map(({node:u},p)=>{const{availability:{status:f}}=u;return f?n.jsx(Ht.Card,{item:u,isMobile:a,size:"medium",index:p,shelfTitle:t??"Você também pode gostar",CONSTANTS:r},u.id):null})})})},Iy=({recommendationSearch:e,title:t,CONSTANTS:r})=>{const[s,o]=g.useState([]),{isMobile:a}=ne(),{ref:i,inView:c}=ca.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 p(){var f;Md({type:"recommendationSearch",facets:u,params:{count:((f=e==null?void 0:e.params)==null?void 0:f.count)??12,sort:r.ITEMS_DEFAULT_SORT}}).then(m=>o(m))}p()},[u,e]),g.useEffect(()=>{if(!c||s.length===0||(e==null?void 0:e.type)==="suggestions")return;const p=t??"Você também pode gostar";l({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:s},customData:{item_list_name:p},outsideEcommerceData:{item_list_name:p}}})},[c,s]),(s==null?void 0:s.length)===0?null:(e==null?void 0:e.type)==="suggestions"?n.jsx(Wc,{products:s,innerRef:i,inView:c,CONSTANTS:r}):n.jsx("div",{ref:i,className:Dd.shelf__container,children:n.jsx(Ht.Shelf,{title:t??"Você também pode gostar",itemsPerPage:{desktop:4.4,mobile:2.2},ICONS:r.ICONS,children:Array.isArray(s)&&s.map(({node:p},f)=>{const{availability:{status:m}}=p;return m?n.jsx(Ht.Card,{item:p,isMobile:a,size:"medium",index:f,shelfTitle:t??"Você também pode gostar",CONSTANTS:r},p.id):null})})})},$d=({data:e,CONSTANTS:t})=>{const{productId:r}=Wi();return e.productLists.map((s,o)=>n.jsx(Iy,{title:s.title,recommendationSearch:{type:s.product_group_option,productId:r,params:{count:s.number_of_items,sort:"score:desc"}},CONSTANTS:t},`shelf=${o}`))},zd=({data:e,CONSTANTS:t})=>e.productLists.map((r,s)=>{const o=r.collectionId?{term:"",facets:[{key:"productclusterids",value:`${r.collectionId}`}]}:{term:r.search_base_name,facets:[]};return n.jsx(Ny,{title:r.title,collectionSearch:{params:{count:r.number_of_items,sort:r.sort},...o},CONSTANTS:t},`shelf=${s}`)}),Ry="_embedLiveContainer_1ss0l_2",wy="_embedLivePlayer_1ss0l_7",ia={embedLiveContainer:Ry,embedLivePlayer:wy},Fd=({data:e})=>n.jsx("div",{className:ia.embedLiveContainer,children:n.jsx("div",{className:ia.embedLivePlayer,children:e.banner.videosrc?n.jsx(Ie.Video,{src:e.banner.videosrc??"",playsInline:!0,autoPlay:!0,loop:!0,muted:!0,title:"Live",controls:!0}):n.jsxs("div",{children:[n.jsx("iframe",{src:e.banner.embed_source??"",allow:"autoplay; fullscreen; picture-in-picture; loop;",title:"Live"}),n.jsx(md,{src:"https://player.vimeo.com/api/player.js",defer:!0,strategy:"lazyOnload"})]})})}),Ay="_popup_5taxs_9",Ty="_popup__overlay_5taxs_19",Ly="_popup__modal_5taxs_27",Be={popup:Ay,popup__overlay:Ty,popup__modal:Ly,"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"},ky=e=>n.jsx("div",{className:Be["popup__modal--success"],children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:e.ICONS.check_circle,size:"large"})},children:n.jsxs(d.TextStructure.DivWrapper,{className:Be["text-structure-modifier"],children:[n.jsx("h3",{className:"typography-style-body-sm-strong",children:e.successTitle}),n.jsx("p",{className:"typography-style-body-caption",children:e.successDescription})]})})}),Oy=e=>{const{title:t,description:r,groups:s,ICONS:o}=e,{formErrors:a,submitForm:i,success:c}=qn(),[l,u]=g.useState(!1);return n.jsx("form",{onSubmit:i,className:Be.formContainer,children:n.jsxs("div",{className:Be["popup__modal--form"],children:[n.jsxs(d.TextStructure.DivWrapper,{className:Be["popup__modal--header"],children:[n.jsx("strong",{className:"typography-style-body-md-strong",children:t}),n.jsx("p",{className:"typography-style-body-xs",children:r})]}),c?n.jsx(ky,{...e}):n.jsxs(n.Fragment,{children:[s.map(p=>n.jsx(Rt.FieldGroup,{group:p,children:n.jsx(Rt.FieldWrapper,{fields:p.fields})},p.groupLabel)),n.jsx(d.Checkbox,{className:Be["popup__modal--checkbox"],adornment:n.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)}),n.jsxs("div",{children:[!l&&n.jsx(d.TextStructure.DivWrapper,{className:Be["popup__modal--status"],children:n.jsxs("p",{className:"typography-style-body-caption",children:[n.jsx(d.Icon,{size:"small",name:o.alert_circle}),$p]})}),n.jsx(d.Button,{disabled:!l,size:"medium",type:"submit",children:Fp}),a.length?n.jsx(d.TextStructure.DivWrapper,{className:Be["popup__modal--status"],children:n.jsx("p",{className:d.helpers.classNameConcat(Be.formSubmitWarning,"typography-style-body-xs"),children:zp})}):null]})]})]})})},Bd=({data:e,CONSTANTS:t})=>{const[r,s]=g.useState(!1),o=typeof window<"u"?window.sessionStorage.getItem(t.POPUP_TRACK_STORAGE)||window.localStorage.getItem(t.POPUP_SUBMITTED_STORAGE):null,a=()=>{s(!1),window.sessionStorage.setItem(t.POPUP_TRACK_STORAGE,"true")};return g.useEffect(()=>{setTimeout(()=>!o&&s(!0),2e3)},[]),e.active&&r?n.jsxs("div",{className:Be.popup,children:[n.jsx("div",{onClick:a,className:Be.popup__overlay}),n.jsxs("div",{className:Be.popup__modal,children:[n.jsx(d.Button,{onClick:a,variant:"tertiary",className:Be["popup__modal--close"],children:n.jsx(d.Icon,{style:{color:e.closeColor||"#000"},name:t.ICONS.close,size:"medium"})}),n.jsx("div",{children:n.jsx(Ie.Image,{src:e.imageUrl,width:"459",height:"418",alt:e.title})}),n.jsx(jd,{...e,children:n.jsx(Oy,{...e,ICONS:t.ICONS})})]})]}):null};class My extends g.Component{constructor(){super(...arguments);Jt(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(){return{hasError:!0,error:null}}componentDidCatch(r,s){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:",s),console.groupEnd()}}render(){const{hasError:r}=this.state,{children:s,fallback:o}=this.props;return r&&process.env.NODE_ENV==="production"?null:r&&o!==void 0?o:s}}const Dy={"Image Grid":kd,"Embed Live":Fd,"Banner Carousel":Id,Banner:zs,"Bennefits Bar":Rd,newsletter:Od,TextContent:wd,TextAccordion:Ad,"Product Carousel":zd,"PDP Product Carousel":$d,"Popup Modal":Bd},$y=({data:e,identifyWhoIsFirst:t=!1,componentConfigs:r})=>e==null?void 0:e.map((s,o)=>{const a=Dy[s.name],i={...(r==null?void 0:r[s.name])??{}};return t&&o===0&&(s.data.first=!0),s.data.componentIndex=o,s.name==="TextAccordion"&&(i.id=`text-accordion-${o}`),a?n.jsx(My,{name:s.name,children:n.jsx(a,{data:s.data,...i})},`section-zone-component-${o}`):null}),zy={Banner:my,BannerSection:Yt,BennefitsBarSection:Rd,SingleBannerSection:zs,TextContentSection:wd,BannerCarousel:Id,TextAccordionSection:Ad,TipbarScreening:Ey,ImageGrid:kd,SearchPageScreening:A.SearchPageScreening,SearchContent:Pd,NewsletterSection:Od,PDPProductCarousel:$d,ProductCarousel:zd,EmbedLive:Fd,PopupModalSection:Bd,SectionZone:$y},Fy={Components:zy,helpers:Z_};exports.cms=Fy;exports.contexts=Qi;exports.data=Es;exports.layout=vn;exports.scripts=uy;