@soma-vertical-web/multi-lib 1.0.20 → 1.0.21
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/contexts/contexts/Session.d.ts +1 -1
- package/contexts/index.d.ts +1 -1
- package/data/api/checkout/order-form/shipping/update/index.d.ts +2 -2
- package/data/api/user/index.d.ts +3 -0
- package/index-BhiCzrut.mjs +2255 -0
- package/index-DZ1MbO8M.js +4 -0
- package/index.js +16 -16
- package/index.mjs +8350 -8397
- package/index2.js +8 -1
- package/index2.mjs +2341 -1139
- package/layout/index.d.ts +3 -1
- package/layout/template/PDC/Composite/Products/Products.d.ts +1 -1
- package/layout/template/PDC/index.d.ts +1 -1
- package/layout/template/PDP/Composite/Info/MainContent/Similars/index.d.ts +1 -1
- package/layout/template/PDP/index.d.ts +2 -2
- package/layout/template/TrackingRouteWatcher/index.d.ts +5 -0
- package/package.json +1 -1
- package/server.d.ts +5 -1
- package/style.css +1 -1
- package/types/cms/Sections/SectionZone/index.d.ts +0 -1
- package/types/contexts/contexts/plp.d.ts +0 -1
- package/types/contexts/contexts/session.d.ts +1 -0
- package/types/contexts/hooks/index.d.ts +0 -12
- package/types/layout/team-components/ProductCard/index.d.ts +0 -1
- package/types/layout/team-components/ProductList/index.d.ts +1 -2
- package/types/layout/templates/PDP/index.d.ts +2 -1
- package/types/layout/templates/PLP/index.d.ts +0 -1
package/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
"use strict";var ym=Object.defineProperty;var xm=(e,t,n)=>t in e?ym(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var gt=(e,t,n)=>xm(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),g=require("react"),H=require("./index-xWhZ_YcF.js"),tt=require("idb-keyval"),Et=require("zustand"),Gr=require("js-cookie"),d=require("@soma-vertical-web/core-components"),vt=require("axios"),Kr=require("@date-fns/tz"),vm=require("jose"),Lt=require("@soma-vertical-web/foundations"),fs=require("react-dom"),Je=require("draft-js"),ba=require("react-intersection-observer"),hs=g.createContext({}),bm=({data:e,children:t})=>r.jsx(hs.Provider,{value:{tags:e==null?void 0:e.config},children:t}),_t=()=>{const{tags:e}=g.useContext(hs),t=g.useCallback(n=>{var c,l,u,m;const s=(l=(c=e==null?void 0:e.commercial)==null?void 0:c.items)==null?void 0:l.find(f=>{var p;return(p=n??[])==null?void 0:p.find(h=>h.id===f.key)}),o=(m=(u=e==null?void 0:e.institucional)==null?void 0:u.items)==null?void 0:m.find(f=>{var p;return(p=n??[])==null?void 0:p.find(h=>h.id===f.key)}),a=e==null?void 0:e.flagPdp,i=(n==null?void 0:n.find(f=>{var p;return f.id===((p=e==null?void 0:e.flagGoldenPdp)==null?void 0:p.key)}))&&(e==null?void 0:e.flagGoldenPdp);return{commercial:s,institucional:o,flagPdp:a,flagGoldenPdp:i}},[e]);return{tags:e,getAvailableProductTag:t}},ja=({gridScrollBack:e})=>{g.useEffect(()=>{typeof window<"u"&&(e!=null&&e.refer)&&sessionStorage.setItem(e==null?void 0:e.refer,"true")},[])},Ca=g.createContext({}),jm=({children:e,gridScrollBack:t})=>{const n=g.useRef(null);return ja({gridScrollBack:t}),r.jsx(Ca.Provider,{value:{sizesContainerRef:n},children:e})},Sa=()=>{const e=g.useContext(Ca);if(e===void 0)throw new Error("useContext(PDPContext) must be used within a PDPProvider");return e},dt=({event:e,data:t})=>{const n=(window==null?void 0:window.dataLayer)||[];t.ecommerce&&n.push({ecommerce:null}),n.push({...e&&{event:`custom_${e}`},...t})},Se={configs:{PLP_FILTERS:[{key:"",label:"",eventLabel:"",order:0}],currency:"BRL",categoryOff:"bazar",storeUrl:"https://www.example.com",MAIN_IMAGE:"1",NAME_SPLIT_SYMBOL:"-",VENDOR_CODE:""},productEvents:(e,t)=>{const{event:n,commonData:s,customData:o,promotionInfo:a,itemList:i,outsideEcommerceData:c}=e,{availableSizes:l,sizes:u,price:m}=s,f={...n==="view_item"?{currency:Se.configs.currency,value:m,grade_disponivel:l??(u?Ea(u):"")}:{},...n==="add_to_wishlist"||n==="remove_from_wishlist"?{value:m,currency:Se.configs.currency}:{}},p=un({data:s,customData:{...o,...i,...a},configs:Se.configs});dt({event:n,data:{...c,ecommerce:{...i,...f,items:[p]}}}),typeof t=="function"&&t(p,f)},productListEvent:e=>{const{commonData:{products:t},promotionInfo:n,itemList:s,outsideEcommerceData:o,customData:a}=e;if(t.length===0)return;const i=t.map(({node:c},l)=>un({data:{...c},customData:{...n,index:l,...a!=null&&a.item_list_name?{item_list_name:a==null?void 0:a.item_list_name}:s},configs:Se.configs}));dt({event:"view_item_list",data:{...o,ecommerce:{...a!=null&&a.item_list_name?{item_list_name:a==null?void 0:a.item_list_name}:s,items:i}}})},skuEvents:e=>{const{event:t,commonData:{products:n},customData:s,supportData:{selectedSkus:o,price:a},promotionInfo:i,itemList:c,outsideEcommerceData:l}=e;let u=0;const m=n.map(f=>{var y,x,b,C,j,v,P,E,S;const p=o==null?void 0:o.find(I=>(f.productId??f.id)===I.productId);let h={...i,...c};if(p){const I=Na(),T=Ia(I,p);T&&(h={...h,...T}),t==="add_to_cart"&&(i||c)&&Xr({persistedData:I,type:"add",sku:(p==null?void 0:p.id)??(p==null?void 0:p.sku),newData:{promotionInfo:i,itemList:c}}),t==="remove_from_cart"&&Xr({persistedData:I,type:"remove",sku:(p==null?void 0:p.id)??(p==null?void 0:p.sku)})}u+=f.price??((b=(x=(y=p==null?void 0:p.offers)==null?void 0:y.offers)==null?void 0:x[0])==null?void 0:b.price)??0;const _=(p==null?void 0:p.size)??H.getColorAndSizeFromSkuName((p==null?void 0:p.skuName)??(p==null?void 0:p.name)??((C=f.itemOffered)==null?void 0:C.skuName),Se.configs.NAME_SPLIT_SYMBOL).size;return un({data:f,customData:{...s,...h??{...i,...c},item_sku:(p==null?void 0:p.id)??(p==null?void 0:p.sku)??((j=f.itemOffered)==null?void 0:j.sku),quantity:(s==null?void 0:s.quantity)??f.quantity??1,item_variant2:_,seller_id:(p==null?void 0:p.sellerId)??(p==null?void 0:p.seller)??((S=(E=(P=(v=p==null?void 0:p.offers)==null?void 0:v.offers)==null?void 0:P[0])==null?void 0:E.seller)==null?void 0:S.identifier)??f.seller},configs:Se.configs})});dt({event:t,data:{...l,ecommerce:{value:a??u,currency:Se.configs.currency,items:m}}})},filterEvent:e=>{var i;const{commonData:t,customData:n,outsideEcommerceData:s}=e,o={},a={};Array.isArray(t==null?void 0:t.selectedFacets)&&((i=t==null?void 0:t.selectedFacets)!=null&&i.length)&&((t==null?void 0:t.selectedFacets).forEach(({key:c,value:l})=>{var f;const u=((f=Se.configs.PLP_FILTERS.find(p=>p.key===c))==null?void 0:f.eventLabel)??c,m=(o==null?void 0:o[u])||[];u==="price_range"&&l.replace(":","-"),o[u]=[...m,l]}),Object.keys(o).forEach(c=>a[c]=o[c].join(", "))),dt({event:"filter",data:{...s,...a,...n}})},viewCartEvent:e=>{var m,f,p,h,_,y,x,b,C,j;const{commonData:t,outsideEcommerceData:n}=e,{cartStore:s}=t;if(!s)return;const o=window.localStorage.getItem("persistedCartEventsData"),a=o?JSON.parse(o):{},i=s.items.map(v=>{const{promotionInfo:P,itemList:E}=a[v.id]??{};return un({data:{...v,price:v.price/100,listPrice:v.listPrice/100},customData:{...P,...E,item_sku:v.id??v.itemOffered.sku,quantity:v.quantity??1},configs:Se.configs})}),c=(((m=s.totalizers.find(v=>v.name==="Total dos Itens"))==null?void 0:m.value)??0)/100,l=(((f=s.totalizers.find(v=>v.name==="Total dos Descontos"))==null?void 0:f.value)??0)/100,u=((p=s.marketingData)==null?void 0:p.utmiCampaign)===Se.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];dt({event:"view_cart",data:{...n,ecommerce:{currency:Se.configs.currency,value:c+l,total_discount:Math.abs(l),cep_preenchido:!!((b=(x=s.shippingData)==null?void 0:x.address)!=null&&b.postalCode),...u?{seller_coupon_name:u}:{},...((C=s.marketingData)==null?void 0:C.coupon)&&{sale_coupon_name:(j=s.marketingData)==null?void 0:j.coupon},subtotal:c,items:i}}})},readyEvents:e=>{const{event:t,readyData:n}=e;dt({event:t,data:{...n}})}},Ea=e=>e.reduce((t,n)=>(n.available&&t.push(n.value),t),[]).toString(),Cm=e=>{const t=e.length;return{...e&&e.length>0?{item_category:e[0].includes(Se.configs.categoryOff)?"Bazar":"Coleção",...e[1]?{item_category2:e[1]}:{},...t>2?{item_category3:e[t-1]}:{}}:{}}},un=({data:e,customData:t,configs:n})=>({...Sm(e,n==null?void 0:n.MAIN_IMAGE),...Em(e),...Pm(e),...Nm(e),...t}),Pa=()=>{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("_"))??[]:[]},Na=()=>{const e=window.localStorage.getItem("persistedCartEventsData");return e?JSON.parse(e):null},Ia=(e,t)=>e==null?void 0:e[t],Xr=({persistedData:e,type:t,sku:n,newData:s})=>{if(!e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({[n]:s}));return}if(e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({...e,[n]:s}));return}e&&t==="remove"&&(delete e[n],window.localStorage.setItem("persistedCartEventsData",JSON.stringify(e)))},Sm=(e,t="1")=>{var a,i,c,l,u,m,f,p,h,_,y;const n=e.productReference??e.gtin??e.productRefId,s=e.image??((i=(a=e.items)==null?void 0:a[0])==null?void 0:i.images)??((c=e.itemOffered)==null?void 0:c.image),o=s==null?void 0:s.find(x=>x.alternateName===t||x.imageLabel===t||x.keywords===t);return{item_id:e.productId??((l=e.isVariantOf)==null?void 0:l.productGroupID)??((u=e.isVariationOf)==null?void 0:u.productGroupID)??((f=(m=e.itemOffered)==null?void 0:m.isVariationOf)==null?void 0:f.productGroupID),item_ref:/_\d$/.test(n)?n.slice(0,-2):n,item_name:e.productTitle??e.productName??e.name??H.splitNameAndSizeFromFullName((p=e.itemOffered)==null?void 0:p.name,Se.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:`${Se.configs.storeUrl}${e.linkText}/p`,item_image:(o==null?void 0:o.url)??(o==null?void 0:o.imageUrl)}},eo=e=>Array.isArray(e)?e.reduce((t,n)=>(n.length>t.length&&(t=n),t),""):e,Em=e=>{var u,m;const{categories:t,categoriesIds:n}=e,s=t??((u=e.itemOffered)==null?void 0:u.categories),o=n??((m=e.itemOffered)==null?void 0:m.categoriesIds),a=eo(s),i=eo(o),c=a.slice(1,-1).split("/"),l=i.slice(1,-1).split("/");return{item_category:c[0].toLowerCase().includes(Se.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]}}},Pm=e=>{var o,a,i,c,l,u;const t=((o=e.itemOffered)==null?void 0:o.skuName)??((c=(i=(a=e.isVariantOf)==null?void 0:a.hasVariant)==null?void 0:i[0])==null?void 0:c.name)??((u=(l=e.items)==null?void 0:l[0])==null?void 0:u.name),{color:n,size:s}=H.getColorAndSizeFromSkuName(t,Se.configs.NAME_SPLIT_SYMBOL);return{item_variant:n,...e.itemOffered&&{item_variant2:s}}},Nm=e=>{var l,u;const{price:t,listPrice:n,installments:s}=e,o=t??((l=e.offers)==null?void 0:l.lowPrice)??0,a=n??((u=e.offers)==null?void 0:u.highPrice)??0,i=a?a-o:0,c=i%1===0?i:Number(i.toFixed(2));return{...t&&{price:o??a},...a&&{list_price:a,discount:c},...s&&{installments:s==null?void 0:s.count,installment_value:s==null?void 0:s.value},item_currency:Se.configs.currency}},wa=()=>{const[e,t]=Pa(),[n,s]=e.split("-"),o=n.includes("shop")||n.includes("sale")?n:"";return{page_category:o&&s?s:"",page_departament:o,id:t,name:e}},Im=Object.freeze(Object.defineProperty({__proto__:null,eventsFunctions:Se,findDataInPersistedData:Ia,getAvailablesSizes:Ea,getCategories:Cm,getPageCategoryAndDepartmentFromSlug:wa,getPersistedData:Na,getProductListInfoFromHead:Pa,pushDatalayer:dt,updatePersistedData:Xr},Symbol.toStringTag,{value:"Module"})),Ra=g.createContext({}),wm=({children:e,evtFunctionsConfigs:t})=>{const n=g.useRef({}),s=g.useRef(null),o=g.useRef(null),a=g.useRef({}),i=g.useRef({trigger:!1,index:0}),c=({functionKey:m,data:f,callBack:p,timeout:h=100})=>{window.dataLayer||(window.dataLayer=[]),Se.configs=t;try{typeof Se[m]=="function"&&setTimeout(()=>{var _;f.promotionInfo=n.current,(_=o.current)!=null&&_.item_list_name&&(f.itemList=o.current),Se[m](f,p)},h)}catch(_){dt({event:"error_event",data:{error_message:(_==null?void 0:_.message)??_}})}},l=({content:m})=>{c({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:m.replace("::",":")}}})},u=({updatePromotionRef:m,promotion:f,index:p})=>{m&&(n.current={...f}),c({functionKey:"readyEvents",data:{event:"select_promotion",readyData:{ecommerce:{...f,...p!==void 0&&{index:p}}}}})};return r.jsx(Ra.Provider,{value:{sendDataLayerEvent:c,triggerSelectItemEventRef:i,promotionEventRef:n,currentLocalRef:s,itemListRef:o,cartProductsFullDataRef:a,handleSelectContent:l,handleSelectPromotionEvent:u},children:e})},ae=()=>g.useContext(Ra),Ta=g.createContext({}),Rm=({children:e,productData:t,isKit:n,PDP_INFO:s,NAME_SPLIT_SYMBOL:o,TEXTURE_IMAGE:a})=>{var D,U;const{sendDataLayerEvent:i,triggerSelectItemEventRef:c}=ae(),{productId:l,productName:u,items:m,items:[{images:f,Videos:p}],description:h,["Composição"]:_="",productReference:y,categories:[x]}=t,{getAvailableProductTag:b}=_t(),C=b(Object.entries(t.clusterHighlights).map(B=>({id:B[0],name:B[1]}))),j=x.slice(1,-1).split("/"),{installments:v,price:P,listPrice:E,sizes:S,allSizesAvailable:I}=H.getSkuInfos({items:m,NAME_SPLIT_SYMBOL:o}),T=H.getThumbImage({images:f,TEXTURE_IMAGE:a}),A=[{label:`${s.product.description}`,value:"description",content:h},{label:`${s.product.materiais}`,value:"composition",content:_}],k=((U=H.getColorAndSizeFromSkuName((D=t.items)==null?void 0:D[0].name,o))==null?void 0:U.color)??t["Cores Filtráveis"][0]??"",O=()=>({commonData:{...t,sizes:S,price:P,listPrice:E,installments:v},customData:{installments:v==null?void 0:v.count,installment_value:Number(v==null?void 0:v.value).toFixed(2)}}),Y=({sku:B,size:Q})=>{const{commonData:G,customData:$}=O();i({functionKey:"productEvents",data:{event:"view_item",commonData:G,customData:{...$,...B&&{item_sku:B},...Q&&{item_variant2:Q}}}})};return g.useEffect(()=>{if(c.current.trigger){const{commonData:B,customData:Q}=O();i({functionKey:"productEvents",data:{event:"select_item",commonData:B,customData:{...Q,index:c.current.index}}}),c.current.trigger=!1}Y({})},[]),r.jsx(Ta.Provider,{value:{productData:t,productId:l,productName:u,productReference:y,tag:C,items:m,sizes:S,allSizesAvailable:I,installments:v,price:P,listPrice:E,thumbImage:T,images:f,video:p[0],descriptionContent:A,breadcrumbList:j,isKit:n,colorName:k,handleViewItemEvent:Y},children:e})},Oe=()=>{const e=g.useContext(Ta);if(e===void 0)throw new Error("useContext(PDPDataContext) must be used within a PDPDataProvider");return e},Tm=()=>{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}}]},Aa=()=>{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)}},[])},Am=typeof window>"u",km=(e,t)=>{const[n,s]=g.useState(()=>{if(Am)return null;const a=localStorage.getItem(e);return a===null?t:JSON.parse(a||"{}")});return g.useEffect(()=>{const a=i=>{i.storageArea===localStorage&&i.key===e&&s(JSON.parse(i.newValue))};return window.addEventListener("storage",a),()=>{window.removeEventListener("storage",a)}},[e,t]),[n,a=>{s(i=>{const c=typeof a=="function"?a(i):a;return localStorage.setItem(e,JSON.stringify(c)),c})}]};function _s(e,t,n){const[s,o]=g.useState(!1),{threshold:a}=n||{};return g.useEffect(()=>{if(!e.current)return()=>null;let i=null;const c=new IntersectionObserver(([l])=>{if(n!=null&&n.delay){i&&clearTimeout(i),i=setTimeout(()=>{o(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},n.delay);return}o(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},{threshold:a||1});return c.observe(e.current),()=>{c.disconnect()}},[e]),s}const Dn=({callback:e,onEnterViewportOnce:t,options:n})=>{const s=g.useRef(null);return g.useEffect(()=>{const o=s.current;if(!o)return;const a=new IntersectionObserver(([i])=>{i.isIntersecting&&typeof e=="function"&&(e(),t&&(a.unobserve(o),a.disconnect()))},n);return a.observe(o),()=>{t&&a.unobserve(o),a.disconnect()}},[e,t,n]),{element:s}},ka=({defaultScale:e=1,maxScale:t=3})=>{const n=g.useRef(null),s=g.useRef(null),[o,a]=g.useState(e),i=g.useRef(0),c=g.useRef({x:0,y:0}),l=g.useRef({x:0,y:0}),u=()=>{if(!s.current||!n.current)return{minX:0,maxX:0,minY:0,maxY:0};const h=n.current.getBoundingClientRect(),_=s.current.children[0].getBoundingClientRect(),y=_.width,x=_.height,b=Math.min(0,(h.width-y)/2),C=Math.max(0,(y-h.width)/2),j=Math.min(0,(h.height-x)/2),v=Math.max(0,(x-h.height)/2);return{minX:b,maxX:C,minY:j,maxY:v}},m=(h,_,y)=>{if(s.current){const x=s.current.children[0];x&&requestAnimationFrame(()=>{x.style.transform=`translate(calc(-50% + ${h}px), calc(-50% + ${_}px)) scale(${y})`})}},f=g.useCallback(h=>{const{minX:_,maxX:y,minY:x,maxY:b}=u(),{x:C,y:j}=l.current,v=Math.max(_,Math.min(y,C)),P=Math.max(x,Math.min(b,j));if(h.touches.length>1){const E=h.touches[0],S=h.touches[1],I=E.pageX-S.pageX,T=E.pageY-S.pageY;i.current=Math.sqrt(I*I+T*T),c.current={x:(E.pageX+S.pageX)/2,y:(E.pageY+S.pageY)/2}}else h.touches.length===1&&(c.current={x:h.touches[0].pageX-v,y:h.touches[0].pageY-P})},[o,l]),p=g.useCallback(h=>{if(!s.current||!n.current)return;const{minX:_,maxX:y,minY:x,maxY:b}=u();if(h.touches.length>1){h.preventDefault();const C=h.touches[0],j=h.touches[1],v=C.pageX-j.pageX,P=C.pageY-j.pageY,E=Math.sqrt(v*v+P*P);if(!i.current){i.current=E;return}const S=E/i.current,I=Math.max(1,Math.min(t,o*S));if(o===I)return;a(I);const T=(C.pageX+j.pageX)/2,A=(C.pageY+j.pageY)/2;let k=T-c.current.x,O=A-c.current.y;k=Math.max(_,Math.min(y,k)),O=Math.max(x,Math.min(b,O)),l.current={x:k,y:O},i.current=E,m(k,O,I)}else if(h.touches.length===1){const C=h.touches[0].pageX,j=h.touches[0].pageY;let v=C-c.current.x,P=j-c.current.y;v=Math.max(_,Math.min(y,v)),P=Math.max(x,Math.min(b,P)),l.current={x:v,y:P},m(v,P,o)}},[t,o]);return g.useEffect(()=>(document.addEventListener("touchstart",f),document.addEventListener("touchmove",p,{passive:!1}),()=>{document.removeEventListener("touchstart",f),document.removeEventListener("touchmove",p)}),[p,f]),{containerRef:n,imgRef:s,scale:o}},Lm={attachment:"ATTACHMENT",specification:"SPECIFICATION",attribute:"ATTRIBUTE"},Ve=Promise.resolve(!1),Yr={id:"",isOpen:!1,items:[],loading:!1,marketingData:null,messages:[],openTextField:{},paymentData:null,shippingData:null,totalizers:[],itemMetadata:[],recentlyAddedProducts:[],addCoupon:()=>Ve,addItem:()=>Ve,addSellerCode:()=>Ve,addMarketingData:()=>Ve,emptyCart:()=>({}),removeItem:()=>Ve,setIsOpen:()=>({}),shipping:()=>Ve,shippingUpdate:()=>Ve,toggleServiceToProduct:()=>Ve,updateItemQuantity:()=>Ve,insertProfileEmail:()=>Ve,setRecentlyAddedProducts:()=>({})},gs=e=>e===0,La=(e,t)=>{if(!e||e.length===0)return[];let n="";const s=[],o=e.match(/\d+/g)??[];for(const a of o){const i=t[Number(a)];i&&(n+=(n?"/":"")+i,s.push(n))}return s},Oa=(e,t)=>{const{availability:n,additionalInfo:{brandName:s},bundleItems:o,id:a,uniqueId:i,detailUrl:c,ean:l,imageUrl:u,name:m,listPrice:f,quantity:p,price:h,priceDefinition:_,productCategories:y,productCategoryIds:x,productId:b,refId:C,seller:j,referenceId:v,offerings:P,productRefId:E,skuName:S,sellingPrice:I}=e;return{availability:n,bundleItems:o,referenceId:v,productRefId:E,id:a,ean:l,uniqueId:i,itemOffered:{additionalProperty:[],brand:{name:s},categories:La(x,y),categoriesIds:x,gtin:C,image:[{alternateName:(t==null?void 0:t.MAIN_IMAGE)??"1",url:u}],name:m,isVariationOf:{name:m,productGroupID:b},sku:a,slug:c,skuName:S},listPrice:f,quantity:p,offerings:P,price:h,priceDefinition:_,sellingPrice:I,seller:j}},Da=(e,t)=>{const n=e.map(s=>({id:s.uniqueId,quantity:s.quantity,seller:s.seller}));return Array.isArray(t)?[...n,...t]:[...n,t]},Ma=(e,t)=>{const n=e.find(s=>s.id===t);if(n){const s=e.map((o,a)=>{var i,c;return{id:((i=o.itemOffered)==null?void 0:i.sku)??"",index:a,quantity:(n==null?void 0:n.id)===((c=o.itemOffered)==null?void 0:c.sku)?0:o.quantity,seller:o.seller??""}});return{updateItems:s,filterItems:s.filter(o=>o.id!==t)}}return{updateItems:[],filterItems:[]}},Fa=(e,t,n)=>e.filter(s=>s.availability!=="withoutStock"&&s.availability!=="https://schema.org/OutOfStock").map((s,o)=>{var a,i;return s.id===t?{id:s.id,index:o,quantity:n,seller:s.seller,sku:((a=s.itemOffered)==null?void 0:a.sku)??""}:{id:s.id,index:o,quantity:s.quantity,seller:s.seller,sku:((i=s.itemOffered)==null?void 0:i.sku)??""}}),Qr=(e,t)=>e.filter(n=>n.availability!=="withoutStock").findIndex(({id:n})=>n===t),Om=(e,t)=>{var n;return Array.isArray(e)?(((n=e==null?void 0:e.find(s=>{var o;return((o=s==null?void 0:s.id)==null?void 0:o.toLowerCase())===t}))==null?void 0:n.value)??0)/100:0},Dm=e=>{const t=e.reduce((o,a)=>{const i=gs(a.price)?0:a.quantity;return o+i},0),n=e.reduce((o,a)=>o+a.price*a.quantity,0),s=e.reduce((o,a)=>o+a.listPrice*a.quantity,0);return{totalItems:t,total:n,subTotal:s}},Mm=e=>Array.isArray(e)?e.filter(t=>t.availability!=="withoutStock").reduce((t,n)=>t+(gs(n==null?void 0:n.price)?0:n.quantity),0):0,za=(e,t)=>{const{items:n,orderFormId:s,...o}=e;return{...o,id:s,items:Array.isArray(n)?n.map(a=>Oa(a,t)):[]}},Ba=(e,t)=>{const n=e.find(s=>s.id===t);return n?n.availability==="unavailableItemFulfillment":!1},Fm=(e,t)=>{const n=e.sku,s=e.isVariantOf.hasVariant.find(o=>o.sku===n);return s?s.name.split(t)[1]:"--"},Tt=(e,t,n=!1)=>!e&&t!==""?{code:300,value:t,statusOk:n}:e===t?{code:200,value:t,statusOk:n}:{code:400,value:t,statusOk:n},zm=(e,t)=>{const n=new Set;return[e,...t].filter(s=>!n.has(s)&&n.add(s),n)},Ua=(e,t)=>t&&Array.isArray(t)&&t.find(s=>s.id===e)?Promise.resolve(e):Promise.resolve(!1),$a=(e,t)=>t?Promise.resolve(e[t]):Promise.resolve(!1),Ha=async e=>{try{const t=await e();if(typeof t!="boolean")return t}catch(t){console.error(`[Error orderForm]: ${t}`)}return!1},qa=(e,t)=>{if(t!==-1){const n=Number(e);return n?n+1:1}return e??1},Va=(e,t)=>Array.isArray(e)?e.filter(n=>t==null?void 0:t.some(s=>s.id===n.id)):[],Wa=async(e,t)=>e.then(n=>[...n??[],...t??[]]),ke=async(e,t,n,s)=>{const{priority:o="auto",body:a}=t;return fetch(e,{headers:{"Content-Type":"application/json"},priority:o,method:"POST",body:JSON.stringify(a)}).then(async i=>{const c=await i.json();return n?c:za(c,s)})},Ga=(e,t,n)=>({notifications:[...e.notifications,{id:Date.now(),message:t,callback:n}]}),Ka=e=>[...Array.isArray(e)?e:[e],"faststore"],Xa=e=>{const t=e.get("utm_source")||xt("utm_source"),n=e.get("utm_campaign")||xt("utm_campaign"),s=e.get("utm_medium")||xt("utm_medium"),o=e.get("utmi_cp")||xt("utmi_cp"),a=e.get("utmi_pc")||xt("utmi_pc"),i=e.get("utmi_p")||xt("utmi_p");return{...t&&{utmSource:t},...s&&{utmMedium:s},...n&&{utmCampaign:n},...o&&{utmiCampaign:o},...a&&{utmiPart:a},...i&&{utmipage:i}}},xt=e=>{if(!e||typeof window>"u")return;const t=window.location.href;e=e.replace(/[[\]]/g,"\\$&");const n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)"),s=n.exec(t);return s?s[2]?decodeURIComponent(s[2].replace(/\+/g," ")):"":null},Ya=(e,t,n="BR")=>{const s=t,o={country:n,addressType:"",postalCode:e||null,city:"",state:"",street:"",number:"",neighborhood:"",complement:"",reference:"",geoCoordinates:[]};if(s){const a=typeof s=="object"&&"latitude"in s?s.latitude:null,i=typeof s=="object"&&"longitude"in s?s.longitude:null;o.geoCoordinates=typeof a=="number"&&typeof i=="number"?{latitude:a,longitude:i}:null}return[o]},Bm=Object.freeze(Object.defineProperty({__proto__:null,VALUE_REFERENCES:Lm,addItemOrder:Da,addNotification:Ga,createItemOrder:Oa,createNewAddress:Ya,fetchCartAPI:ke,findItemIndex:Qr,findOptions:Va,findTotalizerValue:Om,getCategories:La,getCode:Tt,getQuantity:qa,getRemoveId:Ua,getSize:Fm,getTotalItems:Mm,getTotalizer:Dm,getUrlParameter:xt,getValue:$a,initialState:Yr,isGift:gs,marketingTagsBuilder:Ka,mergeOptionsPromise:Wa,mountMarketingData:Xa,orderFormValues:za,promiseDefault:Ve,removeQuantity:Ma,updateItemSellerExternal:Ba,updateOrderFormPromise:Ha,updateQuantity:Fa,wishlistArray:zm},Symbol.toStringTag,{value:"Module"})),Um=()=>{const e=async(h,_)=>ke("/api/checkout/order-form/coupon",{body:{orderFormId:h,coupon:_}}),t=async(h,_,y={},x)=>{if(x)if(_){const b=_.includes(" - ")?_.split(" - ")[0]:_,C=await ke("/api/checkout/order-form/seller-code",{body:{orderFormId:h,sellerCode:b}},!0);return C instanceof Object&&y.name in C&&C[y.status]===!0?ke("/api/checkout/order-form/attachments",{body:{orderFormId:h,sellerCode:b,sellerName:C[y.name]}}).then(v=>({...v,openTextField:{...(v==null?void 0:v.openTextField)??{},statusOk:!0}})):Promise.resolve({paymentData:null,openTextField:{statusOk:!1,value:b}})}else return ke("/api/checkout/order-form/attachments",{body:{orderFormId:h,sellerCode:"",sellerName:""}})},n=async(h,_)=>ke("/api/checkout/order-form/attachments/marketing-data",{body:{orderFormId:h,marketingData:_}}),s=async(h,_,y)=>ke("/api/checkout/order-form/items",{body:{orderFormId:h,orderItems:Da(_,y)}}),o=async(h,_,y,x=!1)=>ke("/api/checkout/order-form/offerings",{body:{id:_,itemIndex:y,orderFormId:h,remove:x}}),a=async h=>ke("/api/checkout/order-form/items/remove-all",{body:{orderFormId:h}}),i=async(h,_="low")=>ke("/api/checkout/order-form",{priority:_,body:{orderFormId:h??""}}),c=async(h,_)=>ke("/api/checkout/order-form/profile",{body:{orderFormId:h,email:_}}),l=async(h,_,y)=>{const x=Ma(_,y);return ke("/api/checkout/order-form/items/update",{body:{orderItems:x.updateItems,orderFormId:h}})},u=async(h,_,y,x,b,C,j)=>{var E,S;const v=j?{startDateUtc:(E=C==null?void 0:C.deliveryWindow)==null?void 0:E.startDate,endDateUtc:(S=C==null?void 0:C.deliveryWindow)==null?void 0:S.endDate}:null,P={logisticsInfo:Array.from({length:x},(I,T)=>({itemIndex:T,selectedDeliveryChannel:(C==null?void 0:C.deliveryChannel)||null,selectedSla:(C==null?void 0:C.deliveryMethod)||null,deliveryWindow:v})),selectedAddresses:b,clearAddressIfPostalCodeNotFound:!0};return ke("/api/checkout/order-form/shipping",{body:{...P,orderFormId:h,country:y,postalCode:_}})},m=async(h,_,y)=>ke("/api/checkout/order-form/shipping/update",{body:{orderFormId:h,options:_,selectedAddresses:y}}),f=async(h,_,y,x)=>{const b=Fa(_,y,x);return ke("/api/checkout/order-form/items/update",{body:{orderFormId:h,orderItems:b}})};return{addCoupon:e,addItem:s,addSellerCode:t,addMarketingData:n,giftItem:o,emptyCart:a,getOrderForm:i,insertProfileEmail:c,removeItem:l,shipping:u,shippingUpdate:m,updateItemQuantity:async(h,_,y,x,b)=>f(h,_,y,x).then(C=>C&&Array.isArray(C.items)?Ba(C.items,y)?f(h,_,y,b):C:!1)}},Zr="soma::cart",qt="soma::options",jt=Et.create((e,t)=>{const n=Um(),s=async(o,a,i)=>{e({loading:!0});const c=await Ha(o);if(typeof c!="boolean"){e({...c});const l=await Wa(tt.get(qt),i);return tt.set(qt,l),$a(c,a).finally(()=>e({loading:!1,options:l}))}return Ve};if(typeof window<"u"){const o=async a=>{if(a){const i=await tt.get(qt).then(u=>Va(u,a.items));tt.set(Zr,a),tt.set(qt,i),e({...a,options:i});const c=new URLSearchParams(window.location.search),l=c.get("utm_campaign")||c.get("utmi_campaign")||"";l&&s(()=>n.addSellerCode(t().id,l.toUpperCase()),"openTextField")}};return tt.get(Zr).then(a=>n.getOrderForm(a?a.id:"").then(o)),{...Yr,addCoupon:async a=>s(()=>n.addCoupon(t().id,a),"marketingData"),addItem:(a,i)=>{s(()=>n.addItem(t().id,t().items,a),"items",i)},addSellerCode:async(a,i)=>s(()=>n.addSellerCode(t().id,a,i,t().isOpen),"openTextField"),addMarketingData:async a=>s(()=>n.addMarketingData(t().id,a),"marketingData"),emptyCart:()=>{s(()=>n.emptyCart(t().id))},removeItem:async a=>{const i=await s(()=>n.removeItem(t().id,t().items,a),"items");return Ua(a,i)},shipping:async(a,i="BR")=>s(()=>n.shipping(t().id,a??"",i,t().items.length,Ya(a??"",null,i)),"shippingData"),shippingUpdate:async a=>s(()=>{var i;return n.shippingUpdate(t().id,a,(i=t().shippingData)==null?void 0:i.selectedAddresses)},"shippingData"),toggleServiceToProduct:async(a,i,c)=>s(()=>n.giftItem(t().id,a,i,c),"items"),updateItemQuantity:async(a,i,c)=>{const{id:l,items:u}=t();return s(()=>{var m;return n.updateItemQuantity(l,u,a,i,((m=u.find(f=>f.id===a))==null?void 0:m.quantity)??1)},"items",c?[c]:void 0)},insertProfileEmail:async a=>s(()=>n.insertProfileEmail(t().id,a),"clientProfileData"),setIsOpen:a=>e({isOpen:a})}}return Yr}),$m=()=>jt(e=>e),Qa=Et.create(e=>({notifications:[],actions:{addNotification:(t,n)=>e(s=>Ga(s,t,n)),removeNotification:t=>e(n=>({notifications:n.notifications.filter(s=>s.id!==t)}))}})),ys=()=>Qa(e=>e.notifications),xs=()=>Qa(e=>e.actions),Hm=Object.freeze(Object.defineProperty({__proto__:null,KEY_INDEXED_OPTIONS:qt,KEY_INDEXED_STORE:Zr,useCartStore:jt,useGetCartStoreState:$m,useGetNotificationActions:xs,useGetNotificationsStore:ys},Symbol.toStringTag,{value:"Module"})),qm=6e3,Za=g.createContext({}),Ja=({children:e,...t})=>{const{items:n}=jt(),[s,o]=g.useState([]),a=g.useRef(null),i=g.useMemo(()=>Array.isArray(s)&&s.length>0?s.map(c=>n.find(l=>l.id===c.id)).filter(c=>c!==void 0):[],[n,s]);return g.useEffect(()=>{s.length&&(clearTimeout(a.current??0),a.current=setTimeout(()=>{o([])},qm))},[s]),r.jsx(Za.Provider,{value:g.useMemo(()=>({...t,setRecentlyAdded:o,recentlyAddedProducts:i}),[t,o,i]),children:e})},Jt=()=>{const e=g.useContext(Za);if(e===void 0)throw new Error("useUIContext must be used within a UIProvider");return e};class ei{constructor(){gt(this,"events",{});gt(this,"prevData",{})}subscribe(t,n){return this.events[t]||(this.events[t]=[]),this.events[t].push(n),()=>{this.events[t]=this.events[t].filter(s=>s!==n)}}publish(t,n){this.events[t]&&this.events[t].forEach(s=>{this.prevData[t]=n,s(n)})}}const ti=g.createContext({}),Vm=({children:e,headerConfigs:t,pathname:n,...s})=>{const[o,a]=g.useState(!0),[i,c]=g.useState(!1),l=n==="/",u=g.useRef(new ei),m=h=>h?{headerVariant:t.home_default_variant,bannerVariant:t.home_default_variant,position:t.home_default_position}:{headerVariant:t.default_variant,bannerVariant:t.default_variant,position:t.default_position},f=m(l),p=g.useRef(f);return g.useEffect(()=>{var y;const h=((y=new URLSearchParams(window.location.search))==null?void 0:y.toString())??"";(h.includes("utm_")||h.includes("gclid"))&&(Gr.get("lastMedias")||Gr.set("lastMedias",`${h}`,{expires:1/24}));const _=()=>{const x=typeof(window==null?void 0:window.navigator)>"u"?"":navigator==null?void 0:navigator.userAgent,b=window.innerWidth<1024||!!x.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i);i||c(!0),o!==b&&(a(b),c(!0))};return i||_(),window.addEventListener("resize",_,{passive:!0}),()=>window.removeEventListener("resize",_)},[o,i]),g.useEffect(()=>{const h=m(l);u.current.publish("header:change_variant",h.headerVariant),u.current.publish("header:change_position",h.position),p.current=h},[l]),r.jsx(ti.Provider,{value:{isMobile:o,mediatorRef:u,currentHeaderConfigsRef:p,deviceValidated:i,...s},children:r.jsx(Ja,{children:e})})},re=()=>g.useContext(ti),ni=g.createContext({}),Wm=({children:e,...t})=>r.jsx(ni.Provider,{value:{...t},children:e}),ue=()=>g.useContext(ni),Pt=(e,t)=>Et.create(n=>{const s=()=>n({value:e});return t&&t instanceof Set&&t.add(s),{value:e,actions:{setValue:o=>n({value:o}),reset:s}}}),Yt={category:null,menuMobileIsOpen:!1,searchModalIsOpen:!1,userMenuIsOpen:!1},en=new Set,Gm=()=>{en.forEach(e=>{e()})},ri=Et.create((e,t)=>{const n=()=>e({value:Yt.category});return en.add(n),{value:Yt.category,actions:{reset:n,setValue:s=>e(()=>({value:s})),updateValue:s=>{t().value!==s&&e({value:s})}}}}),si=()=>ri(e=>e.value),tn=()=>ri(e=>e.actions),oi=Pt(Yt.menuMobileIsOpen,en),ai=()=>oi(e=>e.value),ii=()=>oi(e=>e.actions),ci=Pt(Yt.searchModalIsOpen,en),li=()=>ci(e=>e.value),Mn=()=>ci(e=>e.actions),ui=Pt(Yt.userMenuIsOpen,en),vs=()=>ui(e=>e.value),bs=()=>ui(e=>e.actions),Km=Object.freeze(Object.defineProperty({__proto__:null,resetAllHeaderStores:Gm,useActionsHeaderCategory:tn,useActionsMenuMobileIsOpen:ii,useActionsSearchModalIsOpen:Mn,useActionsUserMenuIsOpen:bs,useGetHeaderCategoryStore:si,useGetMenuMobileIsOpen:ai,useGetSearchModalIsOpen:li,useGetUserMenuIsOpen:vs},Symbol.toStringTag,{value:"Module"})),Mt={selectedSkuInfo:{productId:"",name:"",size:"",sku:"",sellerId:"",sellerName:"",available:!1,quantity:1},openLetMeKnow:!1,openMeasurements:!1,showBottomNavigation:!1,showNotify:!1},zt=new Set,Xm=()=>{zt.forEach(e=>{e()})},di=Et.create(e=>{const t=()=>e({value:Mt.selectedSkuInfo});return zt.add(t),{value:Mt.selectedSkuInfo,actions:{setValue:n=>e(s=>({value:{...s,...n}})),reset:t}}}),nn=()=>di(e=>e.value),mi=()=>di(e=>e.actions),pi=Pt(Mt.openLetMeKnow,zt),Ym=()=>pi(e=>e.value),Qm=()=>pi(e=>e.actions),fi=Pt(Mt.showNotify,zt),hi=()=>fi(e=>e.value),js=()=>fi(e=>e.actions),_i=Pt(Mt.showBottomNavigation,zt),Zm=()=>_i(e=>e.value),Jm=()=>_i(e=>e.actions),gi=Pt(Mt.openMeasurements,zt),yi=()=>gi(e=>e.value),xi=()=>gi(e=>e.actions),ep=Object.freeze(Object.defineProperty({__proto__:null,resetAllPDPStores:Xm,useActionsPDPOpenLetMeKnow:Qm,useActionsPDPOpenMeasurements:xi,useActionsPDPSelectedSkuInfo:mi,useActionsPDPShowBottomNavigation:Jm,useActionsPDPShowNotify:js,useGetPDPOpenLetMeKnow:Ym,useGetPDPOpenMeasurements:yi,useGetPDPSelectedSkuInfo:nn,useGetPDPShowBottomNavigation:Zm,useGetPDPShowNotify:hi},Symbol.toStringTag,{value:"Module"})),to={feedback:{active:!1,action:"add"},list:[]},Cs=Et.create((e,t)=>({value:to,actions:{reset:()=>e({value:to}),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:""}}}))}})),Bt=()=>Cs(e=>e.value.list),Ss=()=>Cs(e=>e.value.feedback),Nt=()=>Cs(e=>e.actions),tp=Object.freeze(Object.defineProperty({__proto__:null,useActionsWishlistStore:Nt,useGetWishlistFeedbackStore:Ss,useGetWishlistStore:Bt},Symbol.toStringTag,{value:"Module"})),vi=g.createContext({}),np=({children:e,headerData:t,...n})=>{var m,f;const s=g.useRef(null),o=g.useRef(null),a=g.useRef(null),i=g.useRef(null),c=g.useRef(null),{mediatorRef:l,currentHeaderConfigsRef:u}=re();return(m=l.current)==null||m.subscribe("header:change_variant",p=>{var b,C,j;if(p&&u.current&&(u.current.bannerVariant=p),!s.current)return;const _=document.body.scrollTop>0,y=s.current.getAttribute("data-interactiveVariant"),x=_?y:p??((b=u.current)==null?void 0:b.bannerVariant)??"default";x!==((C=u.current)==null?void 0:C.headerVariant)&&(s.current.setAttribute("data-bottomdivider",String(_)),s.current.setAttribute("data-variant",String(x)),(j=l.current)==null||j.publish("herobanner:change_controllers_variant",x),u.current&&(u.current.headerVariant=x))}),(f=l.current)==null||f.subscribe("header:change_position",p=>{s.current&&(s.current.style.position=p)}),g.useEffect(()=>{const p=new AbortController,h=d.helpers.throttle(()=>{var y;return(y=l.current)==null?void 0:y.publish("header:change_variant",null)},200);document.body.addEventListener("scroll",h,{passive:!0,signal:p.signal});const _=y=>{var b;(b=y.target.closest("a"))==null||b.blur()};return s.current&&(s.current.addEventListener("click",_,{signal:p.signal}),s.current.addEventListener("touchend",_,{signal:p.signal})),()=>{p.abort()}},[]),r.jsx(vi.Provider,{value:{headerData:t,structureRef:o,rootRef:s,tipbarRef:a,userMenuMobileRef:i,userMenuDesktopRef:c,...n},children:e})},Pe=()=>g.useContext(vi),bi=g.createContext({}),ji=({children:e,...t})=>r.jsx(bi.Provider,{value:g.useMemo(()=>t,[t]),children:e}),Es=()=>{const e=g.useContext(bi);if(e===void 0)throw new Error("useMenuMobileContext must be used within a MenuMobileProvider");return e},rp=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},sp=(e,t,n)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const s=t.getBoundingClientRect(),o=e.getBoundingClientRect(),a=e!=null&&e.parentElement?rp(e==null?void 0:e.parentElement):0;return{left:s.left+s.width/2-(o.width+a),top:s.top+s.height+n}},Ci=g.createContext({}),Si=({children:e,delay:t=600,gap:n=20,...s})=>{const[o,a]=g.useState(!1),i=g.useRef(null),[c,l]=g.useState(!1),[u,m]=g.useState({left:0,top:0}),f=g.useCallback(()=>{l(!0),typeof window<"u"&&(i.current=window.setTimeout(()=>{a(!1),l(!1)},t))},[l,a,t]);return g.useEffect(()=>{if(typeof window>"u")return;const p=window.document.querySelector("#cart-button"),h=window.document.querySelector("#add-to-cart--tooltip");if(p&&h){const{left:_,top:y}=sp(h,p,n??0);m({left:_,top:y}),l(!1)}},[n,o]),r.jsx(Ci.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})},It=()=>{const e=g.useContext(Ci);if(e===void 0)throw new Error("useAddToCartContext must be used within a AddToCartProvider");return e},Ei=g.createContext({}),op=({children:e,SELLER_CODE_VALIDATION_KEYS:t,CARTPROVIDER_MESSAGE_PRODUCT_REMOVE:n,data:s,...o})=>{var se,ce,oe,le;const a=jt(),{setRecentlyAdded:i}=Jt(),c=g.useRef(""),l=ys(),{addNotification:u,removeNotification:m}=xs(),[f,p]=g.useState(null),{addCoupon:h,addItem:_,addSellerCode:y,addMarketingData:x,emptyCart:b,isOpen:C,removeItem:j,shipping:v,shippingUpdate:P,toggleServiceToProduct:E,updateItemQuantity:S}=a;g.useEffect(()=>{(async()=>{var w,W;if(!a.id||!((W=(w=s==null?void 0:s.promotion)==null?void 0:w.promotionCart)!=null&&W.idPromotion))return;const ee=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(ie=>ie.json());p(ee)})()},[a.id,a.items.length,s==null?void 0:s.versionId,(ce=(se=s==null?void 0:s.promotion)==null?void 0:se.promotionCart)==null?void 0:ce.idPromotion,(le=(oe=s==null?void 0:s.promotion)==null?void 0:oe.promotionCart)==null?void 0:le.versionAPI]),g.useEffect(()=>{const M=Gr.get("lastMedias");if(a.id&&M&&c.current!==M){c.current=M;const ee=new URLSearchParams(M),w=Xa(ee);x(w)}},[a,x]);const I=g.useCallback(async(M,ee)=>(ee==="coupon"?h(M):y(M,t??{})).then(W=>{if(typeof W!="boolean"&&W instanceof Object){if(ee==="seller"&&"value"in W){const{statusOk:ie,value:_e}=W,N=String(_e??"").split(" - ");return Tt((N==null?void 0:N[0])??"",M,!!ie)}return Tt(String(W.coupon),M,!0)}return Tt("","")}).catch(()=>Promise.resolve({code:400})),[h,y]),T=g.useCallback((M,ee,w)=>{const{id:W}=M;S(W,ee,w)},[S]),A=g.useCallback((M,ee,w=!1)=>{if(!M)return;const{id:W}=M,ie=Qr(a.items,W);if(ie!==-1&&!w){const _e=Number(a.items[ie].quantity),N=a.items[ie]?_e+1:1;T(M,N,ee)}else _({id:W,quantity:(M==null?void 0:M.quantity)??1,seller:M.seller});C||i(_e=>[..._e,M])},[_,T,a.items,C,i]),k=g.useCallback((M,ee)=>{if(!M||!Array.isArray(M))return;i(W=>[...W,...M]);const w=M.map(W=>{const{id:ie,quantity:_e,seller:N}=W,R=Qr(a.items,ie),Ie=qa(_e??1,R);return{id:ie,quantity:Ie,seller:N}});_(w,ee)},[_,a.items,i]),O=g.useCallback(async(M,ee,w)=>M?j(M).then(()=>(u(ee??`${n}`,w),Tt(M,M))):Promise.resolve(Tt("","Product id required")),[u,j]),Y=g.useCallback(()=>{a.items.length>0&&b()},[b,a.items]),D=g.useCallback((M,ee="BRA")=>v(M,ee),[v]),U=g.useCallback(M=>{M&&P(M)},[P]),B=g.useCallback(async(M,ee,w=!1)=>{const W=a.items.findIndex(_e=>_e.uniqueId===M);return a.items[W]&&W>=0?E(ee,W,w):!1},[a.items,E]),Q=g.useCallback(async(M,ee)=>S(M,ee).then(w=>{if(Array.isArray(w)){const W=w.find(ie=>ie.id===M);if(W&&(W==null?void 0:W.quantity)<ee)return String(W.quantity)}return!1}),[S]),G=g.useCallback(async()=>{await x({...a.marketingData,coupon:""})},[x,a.marketingData]),$=g.useCallback(async()=>{await x({...a.marketingData,utmiCampaign:"",utmCampaign:"",utmSource:"",utmMedium:""})},[x,a.marketingData]),J=g.useCallback(async()=>{await v("","BRA")},[v]);return r.jsx(Ei.Provider,{value:g.useMemo(()=>({...o,data:s,addCouponSeller:I,addToCart:A,addItemsToCart:k,cartStore:a,notifications:l,clearCart:Y,addNotification:u,isOpen:a.isOpen,removeNotification:m,removeToCart:O,setIsOpen:a.setIsOpen,shipping:D,shippingUpdateOption:U,toggleGiftItemCart:B,updateItemQuantity:Q,removeCoupon:G,removeSellerCode:$,removeCEP:J,promotionRules:f,setPromotionRules:p}),[o,s,I,A,k,l,Y,u,a,m,O,D,U,B,Q,G,$,J,f,p]),children:e})},be=()=>{const e=g.useContext(Ei);if(e===void 0)throw new Error("useCartContext must be used within a CartProvider");return e},Pi=g.createContext({}),Ps=({children:e,fetch:t})=>{const n=g.useRef(!0),[s,o]=g.useState(null),[a,i]=g.useState(!1);return g.useEffect(()=>{(async()=>{n.current=!0;try{const l=await t();if(!l.ok)throw new Error("Failed to fetch data");const u=await l.json();o(u.data),n.current=!1}catch{n.current=!0,i(!0)}})()},[t]),r.jsx(Pi.Provider,{value:g.useMemo(()=>({data:s,isLoading:n.current??!1,isError:a}),[s,a,n]),children:e})},Ns=()=>{const e=g.useContext(Pi);if(e===void 0)throw new Error("useProductsContext must be used within a useRootContext");return e},Ni=g.createContext({}),Is=({children:e,sort:t,state:n,count:s,collectionId:o,brand:a,searchParams:i,ITEMS_PER_PAGE:c})=>{const l=g.useMemo(()=>{var u;return o?[{key:"productclusterids",value:o.toString()}]:a?[{key:"brand",value:a}]:(u=n.base)!=null&&u.length?n.base.slice(1).split("/").map((m,f)=>({key:`category-${f+1}`,value:m})):[]},[n.base,o]);return r.jsx(Ni.Provider,{value:g.useMemo(()=>({state:{...n,facets:[...l,...n.facets??[]]},sort:t,count:s??c,searchParams:i}),[l,s,t,n,i]),children:e})},Be=()=>{const e=g.useContext(Ni);if(e===void 0)throw new Error("useSearchContext must be used within a SearchProvider");return e},Ii=g.createContext({}),ap=({children:e,...t})=>r.jsx(Ii.Provider,{value:t,children:e}),Me=()=>{const e=g.useContext(Ii);if(e===void 0)throw new Error("usePLPConstants must be used within a PLPConstantsProvider");return e},wi=g.createContext({}),ip=({children:e,selectedFacets:t})=>{const{data:n,...s}=Ns(),{router:o}=ue(),{searchParams:a,PLP_SORT_DEFAULT:i}=Me(),c=g.useCallback((p,h)=>{if(h){if(p.key.toLocaleLowerCase()==="price"){const _=h.getAll("facets");h.delete("facets"),_.forEach(y=>{const[x]=y.split("/");x!==p.key&&h.append("facets",y)})}h.set("page","1"),h.append("facets",`${p.key}/${p.value}`),o.push(`?${h.toString()}`)}},[o]),l=g.useCallback(()=>{const p=new URLSearchParams;p.set("sort",i),p.set("page","1"),o.push(`?${p.toString()}`)},[o]),u=g.useCallback((p,h)=>{if(!h||!h.has&&!h.has("facets"))return;const _=h.getAll("facets");h.delete("facets"),h.set("page","1"),_.forEach(y=>{const[x,b]=y.split("/");(x!==p.key||b!==p.value)&&h.append("facets",y)}),o.push(`?${h.toString()}`)},[o]),m=g.useCallback(p=>{const h=a?new URLSearchParams(a):new URLSearchParams;for(const[,_]of h.entries()){const[y,x]=_.split("/");if(y===p.key&&x===p.value)return u(p,h)}return c(p,h)},[c,u,a]),f=g.useCallback(p=>{const h=a?new URLSearchParams(a):new URLSearchParams;h.set("sort",p.replace("_",":")),o.push(`?${h.toString()}`)},[o,a]);return r.jsx(wi.Provider,{value:g.useMemo(()=>({...s,breadcrumb:n&&"breadcrumb"in n?n==null?void 0:n.breadcrumb:[],deleteAllFacets:l,facets:n&&"facets"in n?n==null?void 0:n.facets:[],selectedFacets:t,onToggleFacet:m,onSort:f,searchParams:a}),[n,l,f,m,s,t,a]),children:e})},Ri=({children:e,forceUpdate:t})=>{const{state:n}=Be();return r.jsx(Ps,{fetch:()=>fetch("/api/search/facets",{method:"POST",body:JSON.stringify({...n,forceUpdate:t}),priority:"low"}),children:r.jsx(ip,{selectedFacets:(n==null?void 0:n.facets)??[],children:e})})},Ti=()=>{const e=g.useContext(wi);if(e===void 0)throw new Error("useFacetsContext must be used within a FacetsProvider");return e},Ht={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"}},cp={nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"0",count:0,total:0},lp="Imagem do produto",no=1,up="Sair",dp=e=>e.exit,ro=({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 n=(t??"").split("@")[0];return e?`Olá${n.length?", ":" "}${n}!`:"Olá!"},pp=e=>"Seja bem vindo!",fp="Marque a caixa para aceitar os termos de política de privacidade.",hp="Algumas informações estão incorretas ou não foram preenchidas",_p="Enviar",Ai=g.createContext({}),gp=({children:e})=>{const{data:t,...n}=Ns(),[s,o]=g.useState(0),{sendDataLayerEvent:a}=ae();return g.useEffect(()=>{if(t&&"pagination"in t&&t.products.length>0){a({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:t.products}}});const i=t.pagination.count;i&&Number.isInteger(i)&&o(i)}},[t,a,o]),r.jsx(Ai.Provider,{value:g.useMemo(()=>({...n,products:t&&"products"in t?t==null?void 0:t.products:[],pagination:t&&"pagination"in t?t==null?void 0:t.pagination:cp,total:s}),[t,n,s]),children:e})},ws=({children:e,query:t,forceUpdate:n})=>{const{count:s,state:o}=Be(),a={...o,count:s};return r.jsx(Ps,{fetch:()=>fetch("/api/search/product",{method:"POST",body:JSON.stringify({...a,query:t,forceUpdate:n,facets:o.facets??[]})}),children:r.jsx(gp,{children:e})})},rn=()=>{const e=g.useContext(Ai);if(e===void 0)throw new Error("useProductsContext must be used within a ProductsProvider");return e},ki=g.createContext({}),yp=({children:e,slug:t,searchParams:n,collectionId:s,brand:o,itemsPerPage:a=24,PLP_SORT_DEFAULT:i})=>{const{pathname:c}=ue(),l=g.useRef(""),[u,m]=g.useState(!1),f=g.useMemo(()=>{const h=new URL(c,"http://localhost"),_=(n==null?void 0:n.getAll("facets"))??[],y=(n==null?void 0:n.get("page"))??"1",x=(n==null?void 0:n.get("sort"))??(s?"":i);return h.searchParams.set("page",String(y)),h.searchParams.set("sort",String(x)),n!=null&&n.get("query")?(h.searchParams.set("query",n.get("query")),h):(h.searchParams.set("base",Array.isArray(t)?t.join("/"):t),h.searchParams.set("facets",_.join(",")),h)},[s,c,n,t]),p=g.useMemo(()=>{if(Array.isArray(n==null?void 0:n.getAll("facets")))return H.parseSearchState(f,n.getAll("facets")??[""]);const h=(n==null?void 0:n.getAll("facets"))??[];return H.parseSearchState(f,h)},[f,n]);return g.useEffect(()=>{l.current!==c&&(l.current=c,window.document.body.scrollTo(0,0))},[c]),r.jsx(ki.Provider,{value:g.useMemo(()=>({openFilters:u,setOpenFilters:m}),[u,m]),children:r.jsx(Is,{ITEMS_PER_PAGE:a,searchParams:n??new URLSearchParams,state:g.useMemo(()=>({...p}),[p]),collectionId:s,brand:o,children:e})})},Rs=()=>{const e=g.useContext(ki);if(e===void 0)throw new Error("usePLPContext must be used within a PLPProvider");return e},Rn=(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)=>Rn(o,t[a]));if(Array.isArray(t))return!1;const n=Object.keys(e),s=Object.keys(t);return n.length!==s.length?!1:n.every(o=>Object.prototype.hasOwnProperty.call(t,o)&&Rn(e[o],t[o]))},Li=(e,t,n="page")=>Object.keys(t).some(s=>s===n?!1:!Rn(t[s],e[s])),Jr=async e=>{const t=await fetch("/api/search/product",{method:"POST",body:JSON.stringify(e),priority:"high"});if(!t.ok)throw new Error("[FAILED TO FETCH DATA]");const n=await t.json();return n==null?void 0:n.data},Oi=()=>({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}}}),Di=(e,t,n,s=24)=>{const o=new Set,a=[];if(!Array.isArray(e)||e.length===0)return{taken:o,placedBanners:a};const i=t*s*n;for(const c of e){let l=Number(c.position_grid),u=!1;for(;l<i;){const m=l%n;if(m+c.columns>n){l+=n-m;continue}if(!Array.from({length:c.columns}).some((h,_)=>o.has(l+_))){for(let h=0;h<c.columns;h++)o.add(l+h);a.push(l),u=!0;break}l++}u||console.info(`[PLP INFINITE FAILED BANNER POSITION]: pos=${c.position_grid}, cols=${c.columns}`)}return{taken:o,placedBanners:a}},es=(e,t,n,s=24)=>{const{placedBanners:o,taken:a}=Di(e??[],t,n),i=[];let c=0;try{for(;i.length<t*s;)a.has(c)||i.push(c),c++;return{banners:o,products:i}}catch(l){console.info(`[PLP INFINITE FAILED TO GEN POSITIONS]: page=${t}`,l)}return{banners:[],products:i}},Nn=(e,t,n=24)=>Array.from({length:e},(s,o)=>{const a=o+1;return{loading:e===a,page:a,pagination:t!=null&&t.products.length&&e===a?t==null?void 0:t.pagination:Ts(),products:t!=null&&t.products.length&&e===a?t==null?void 0:t.products:Array.from({length:n},()=>Oi())}}),Mi=(e,t)=>[...e,{loading:!1,page:t,pagination:Ts(),products:[]}],Ts=()=>({nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"1",count:1,total:1}),xp=(e,t,n,s,o)=>{const a=e[e.length-1],i=(a==null?void 0:a.products.length)??o,c=(e.length-1)*o+i-1,l=n[c];return t.filter((u,m)=>{const f=s[m];return f<=l||o>i&&f>l})},Fi=(e,t)=>{const n=new Map;for(const o of e){const a=Math.floor(o/t);n.has(a)||n.set(a,[]),n.get(a).push(o)}const s=[];for(const[,o]of n){const a=o[Math.floor(Math.random()*o.length)];s.push(a)}return s},zi=(e,t)=>{if(!e)return[];const n=e.map((s,o)=>s.video&&s.video!==""?o:null).filter(s=>s);return Fi(n,t)},Bi=e=>Array.isArray(e)?e.map((t,n)=>({href:`/${e.slice(0,n+1).join("/")}`,name:t})):[],vp=Object.freeze(Object.defineProperty({__proto__:null,createBreadcrumb:Bi,createPage:Mi,createPages:Nn,createPagination:Ts,createProduct:Oi,deepEqual:Rn,fetchPage:Jr,getBanners:Di,getPositions:es,getProductsWithVideo:zi,getRandomVideoPerRow:Fi,getVisibleBanners:xp,hasStateChangedExceptPage:Li},Symbol.toStringTag,{value:"Module"})),bp=50,jp=Et.create((e,t)=>{const n=i=>Math.min(i,bp),s=async(i,c)=>{const l=n(i.page);try{const u=await Jr({...i,page:l});o(l,m=>c?c(m,u):{...m,...u})}catch(u){console.error(`[PDC - SCROLL INFINITE FAILED TO FETCH PAGE ${l}]: ${u}`),o(l,m=>({...m,loading:!1}))}},o=(i,c)=>{e({load:!0,pages:t().pages.map(l=>l.page===i?c(l):l)})},a=async(i,c)=>{await s(i,(l,u)=>(typeof c=="function"&&c(u),{...l,...u,loading:!0}))};return{banners:[],load:!1,pages:[],total:0,positions:[],products:[],createPages:async(i,c,l,u)=>{var f,p,h;const m=n(Number(i==null?void 0:i.page));e({...c,pages:Nn(m,void 0,u)});try{const _=await Jr({...i,page:m});if(_){if(!_.products.length&&((f=_==null?void 0:_.pagination)==null?void 0:f.total)<m){a({...i,page:(p=_==null?void 0:_.pagination)==null?void 0:p.total},l),e({pages:Nn((h=_==null?void 0:_.pagination)==null?void 0:h.total)});return}typeof l=="function"&&l(_),e({load:!0,pages:Nn(m,_),total:Number(_.pagination.count)})}}catch(_){console.error(`[PDC - SCROLL INFINITE TO CREATE PAGES]: page ${m} ${_}`)}},addPage:(i,c,l)=>{const{pages:u}=t(),m=n(i==null?void 0:i.page);u.some(f=>f.page===m)||(e({...c,pages:Mi(u,m)}),a(i,l))},updateProducts:(i,c)=>{const l=t().pages.find(u=>u.page===n(i==null?void 0:i.page));l!=null&&l.loading||a(i,c)}}}),Cp=(e,t,n,s=0)=>{if(!e.length)return[];let o=0;const a=[];for(let i=0;i<e.length;i+=n){const c=e.slice(i,i+n),l=c.findIndex(u=>{var m;return(m=u.node)==null?void 0:m.video});for(let u=0;u<c.length;u++){const m=i+u,f=s+m,p=t.find(_=>_.position_grid===f+1),h=f+o+1;p&&(o+=p.columns),a.push({position:h,canPlayVideo:u===l})}}return a},Ui=(e,t,n)=>{const s=(t-1)*n,o=t*n;return e>=s&&e<=o},Fn=e=>{var t;return(t=e==null?void 0:e.map(n=>({disable:H.disableSKU(n),size:H.getSKUName(n),skuID:"sku"in n&&n.sku})))==null?void 0:t.filter(n=>n.disable)},Sp=Object.freeze(Object.defineProperty({__proto__:null,createGridPosAndVideo:Cp,getSkusNotify:Fn,isPositionInCurrentPage:Ui},Symbol.toStringTag,{value:"Module"})),$i=({isMobile:e,ICONS:t,NOTIFY_INFO:n})=>r.jsxs(r.Fragment,{children:[r.jsx(d.Modal.Controls,{navigation:e?"top":"middle",isMobile:e??!1,children:!e&&r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),r.jsx(d.Button,{"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})}),r.jsx(d.Modal.Title,{navigation:e?"top":"middle",title:n.title})]});$i.displayName="Notify.Controls";const Ze={"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 Hi(e){const n=decodeURIComponent(window.document.cookie).split(";");for(const s of n){const[o,a]=s.trim().split("=");if(o===e)return a}}function As(e,t,n={}){const o={...{path:"/",expires:new Date(Date.now()+36e5)},...n};let a=`${encodeURIComponent(e)}=${encodeURIComponent(t??"")}`;for(const i in o)o[i]!==void 0&&(a+=`; ${i}`,i==="expires"?a+=`=${o[i].toUTCString()}`:typeof o[i]=="boolean"?a+=`; ${o[i]?"true":"false"}`:a+=`=${o[i]}`);window.document.cookie=a}var qi={CUSTOM_VIEW_CART:{name:"custom_view_cart",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","total_discount","subtotal","items"]},ADD_TO_WISHLIST:{name:"add_to_wishlist",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","items"]},ADD_TO_CART:{name:"add_to_cart",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","items"]},REMOVE_FROM_CART:{name:"remove_from_cart",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","items"]},ADD_COUPON:{name:"add_coupon",destinations:["DataLayer"],requiredParams:["brand","region","coupon","coupon_message","seller_cod_name"]},SEARCH:{name:"search",destinations:["DataLayer"],requiredParams:["brand","search_term","search_found","search_quantity"]},SEARCH_ZIPCODE:{name:"search_zipcode",destinations:["DataLayer"],requiredParams:["brand","region","shippings","zipcode","flag_pickup"]},VIEW_PROMOTION:{name:"view_promotion",destinations:["DataLayer"],requiredParams:["brand","region","currency","promotion_name","creative_slot","creative_name","items"]},SELECT_PROMOTION:{name:"select_promotion",destinations:["DataLayer"],requiredParams:["brand","region","currency","promotion_name","creative_slot","creative_name","items"]},SELECT_CONTENT:{name:"select_content",destinations:["DataLayer"],requiredParams:["brand","content_type"]},SELECT_ITEM:{name:"select_item",destinations:["DataLayer"],requiredParams:["brand","region","items","line_items"]},VIEW_ITEM:{name:"view_item",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","available_grid","items"]},VIEW_ITEM_LIST:{name:"view_item_list",destinations:["DataLayer"],requiredParams:["region","brand","line_items","items"]},BEGIN_CHECKOUT:{name:"begin_checkout",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","total_discount","subtotal","items"]},CUSTOM_BEGIN_CHECKOUT:{name:"custom_begin_checkout",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","total_discount","subtotal","items"]},AUTH_ACTION:{name:"auth_action",requiredParams:["region"]},ADD_PERSONAL_INFO:{name:"add_personal_info",destinations:["DataLayer"],requiredParams:["brand","pre_filled","line_items","currency","value","total_discount","subtotal"]},CUSTOM_ADD_SHIPPING_INFO:{name:"add_shipping_info",destinations:["DataLayer"],requiredParams:["brand","pre_filled","shipping","shipping_tier","line_items","currency","value","total_discount","subtotal","items"]},CUSTOM_ADD_PAYMENT_INFO:{name:"add_payment_info",destinations:["DataLayer"],requiredParams:["brand","pre_filled","line_items","currency","value","total_discount","payment_type","subtotal","items"]},ORDER_REVIEWED:{name:"order_reviewed",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","total_discount","subtotal","payment_type"]},PURCHASE:{name:"purchase",destinations:["DataLayer"],requiredParams:["brand","shipping_tier","line_items","currency","value","shipping","transaction_id","total_discount","payment_type","seller_cod_name","subtotal","coupon","items"]},CUSTOM_PURCHASE:{name:"custom_purchase",destinations:["DataLayer"],requiredParams:["brand","shipping_tier","line_items","currency","value","shipping","transaction_id","total_discount","payment_type","seller_cod_name","subtotal","coupon","items"]},CUSTOM_USER_INFO:{name:"custom_user_info",destinations:["DataLayer"],requiredParams:["user_info"]},NOTIFY_ME:{name:"notify_me",destinations:["DataLayer"],requiredParams:["brand","line_items","size","item_ref"]}};function Ep(e,t,n){const s=t.window,o=Object.assign({},t);if(delete o.window,s){s.dataLayer=s.dataLayer||[],s.dataLayer.push({event:e,ecommerce:o});return}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:e,ecommerce:o})}function Pp(e,t,n){console.log(`%c[DT - ${n}] EVENTO DISPARADO:%c `,`background: ${t}; color: white; font-weight: bold; padding: 2px 4px; border-radius: 3px;`,"color: #fff;",e||"")}var Vi=[["vale","vale crédito"],["pagaleve","pix"],["pix parcel","pix parcelado"],["pix","pix"],["apple","apple pay"],["google","google pay"],["boleto","boleto"],["paypal","paypal"],["cred","cartão"],["visa","cartão"],["master","cartão"],["amex","cartão"],["elo","cartão"],["hiper","cartão"],["diner","cartão"],["deb","cartão"]];function Np(e,t,n){Pp({id:e,custom_data:t},"#00c851",n)}var Ip={DataLayer:Ep,Dito:Np};async function wp(e,t){const n=qi[e];n&&await Promise.allSettled(n.destinations.map(async s=>{try{await Ip[s](e.toLowerCase(),t,s)}catch(o){console.error(`[DT] Failed to send ${e} to ${s}:`,o)}}))}async function Rp(e){try{return await(await fetch(`/api/catalog_system/pub/products/search?fq=productId:${e}`)).json()}catch(t){console.log("[DT] Erro ao buscar dados do produto",t)}}function Tp(e){try{const{pathname:t}=new URL(e,window.location.origin);return/\/p\/?$/.test(t)}catch{return!1}}function Wi(e){if(!e)return null;const t=(()=>{try{return new URL(e,location.origin).pathname}catch{return e.split("?")[0]}})(),n=decodeURIComponent(t).match(/(\d+-\d+)(?=\/p|$)/);return n?n[1].replace("-","_"):null}async function Ap(e){const t=Wi(e);if(!t)return console.error("Não foi possível extrair o RefId da URL"),null;try{const n=await fetch(`/api/catalog_system/pub/products/search?fq=alternateIds_RefId:${t}`);if(!n.ok)throw new Error(`Erro na API: ${n.status}`);const s=await n.json();return(s==null?void 0:s[0])||null}catch(n){return console.error("Erro ao buscar dados do produto:",n),null}}function Gi(e,t){var n,s,o,a;const i=(s=(n=e==null?void 0:e.shippingData)==null?void 0:n.logisticsInfo)==null?void 0:s.find(l=>l.itemId===t.id),c=(o=i==null?void 0:i.slas)==null?void 0:o.find(l=>l.id===i.selectedSla);return(a=c==null?void 0:c.pickupStoreInfo)!=null&&a.friendlyName?`retirada em loja: ${c.pickupStoreInfo.friendlyName}`:c!=null&&c.name?`Receba em casa: ${c.name}`:null}async function Ki(e){var t,n;const s=await Rp(e.productId||e.productID||e.item_group_id);return s.length&&(n=(t=s[0].items.find(o=>o.name===e.skuName))==null?void 0:t.itemId)!=null?n:null}function zn(e){return e.discount||e.discount===0?e.discount:parseFloat(Math.max(e.listPrice-e.sellingPrice,0).toFixed(2))/100||0}function Ct(e){const t=[()=>{var n;return((n=e==null?void 0:e.productCategories)==null?void 0:n[39])==="BAZAR"?"Sale":"Coleção"},()=>e.item_category||e.category,()=>e.categories[0]];for(const n of t){const s=n();if(s!=null)return s}return null}function sn(e){const t=[()=>Object.values((e==null?void 0:e.productCategories)||{}).pop(),()=>Object.values((e==null?void 0:e.categories)||{}).pop(),()=>{var n,s,o,a,i;return(i=(a=(o=(s=(n=e==null?void 0:e.category)==null?void 0:n.split)==null?void 0:s.call(n,">"))==null?void 0:o[1])==null?void 0:a.trim)==null?void 0:i.call(a)},()=>e.item_category2];for(const n of t){const s=n();if(s!=null)return s}return null}function Xi(e){var t;const n=((t=e==null?void 0:e.additionalInfo)==null?void 0:t.tags)||(e==null?void 0:e.tags);return Array.isArray(n)&&n.length?n.join(","):null}var kp={farm:"farmrio","farm etc":"farmetc","farm rio":"farmrio"};function so(e){if(!e)return null;const t=e.toLowerCase().trim();return kp[t]||null}function ot(e){var t;let n=[];if(Array.isArray(e)&&e.every(a=>typeof a=="string"))n=e;else if(Array.isArray(e))n=e.map(a=>{var i;return((i=a.additionalInfo)==null?void 0:i.brandName)||a.brand});else if(typeof e=="object"&&e!==null&&"brand"in e)n=[((t=e.additionalInfo)==null?void 0:t.brandName)||e.brand];else return typeof e=="string"?so(e):null;const s=n.map(so).filter(a=>a!==null),o=[...new Set(s)].sort();return o.length>0?o.join("_"):null}function Lp(e){var t;if(!e.orderForm&&!((t=e.orderForm.items)!=null&&t.length))return null;const n=e.orderForm.items;return ot(n)}function Op(e){var t;const{item:n}=e;return ot(((t=n==null?void 0:n.additionalInfo)==null?void 0:t.brandName)||n.brand||n.item_brand)}function Dp(e,t){if(e!=null&&e.brand)return ot(e.brand)||e.brand||null;switch(t){case"CUSTOM_VIEW_CART":case"ADD_COUPON":case"ADD_PERSONAL_INFO":case"CUSTOM_ADD_SHIPPING_INFO":case"CUSTOM_ADD_PAYMENT_INFO":case"BEGIN_CHECKOUT":case"CUSTOM_BEGIN_CHECKOUT":case"SEARCH_ZIPCODE":case"ORDER_REVIEWED":case"PURCHASE":case"CUSTOM_PURCHASE":return Lp(e);case"ADD_TO_CART":case"REMOVE_FROM_CART":return Op(e);default:return null}}async function Mp(e){var t;const n=((t=e.orderForm)==null?void 0:t.items)||[];return n.length?await Promise.all(n.map(async s=>{var o,a,i;return{item_id:s.productId,item_category2:sn(s),item_category4:Xi(s),item_shipping_tier:Gi(e.orderForm,s),price:parseFloat((s.price/100).toFixed(2))||0,quantity:s.quantity||1,item_ref:s.refId||null,item_brand:ot((o=s.additionalInfo)==null?void 0:o.brandName)||((a=s.additionalInfo)==null?void 0:a.brandName)||null,item_sku:await Ki(s)||s.id||null,item_name:s.name||s.id||null,item_category:Ct(s)||null,item_variant:s.skuName.split(/[-/]/)[0].trim(),item_variant2:((i=s.skuName.split(/[-/]/).pop())==null?void 0:i.trim())||"",discount:zn(s)}})):[]}async function Fp(e,t){var n,s,o;const{item:a,orderForm:i}=e;return[{index:0,quantity:1,item_id:a.productId||a.item_group_id||a.sku||null,item_category2:sn(a),item_category4:Xi(a),item_shipping_tier:t==="REMOVE_FROM_CART"?Gi(i,a):null,price:a.listPrice||parseFloat((a.price/100).toFixed(2))||0,item_ref:a.refId||a.item_ref||(a==null?void 0:a.additionalProperty.find(c=>c.name==="RefId").value)||null,item_brand:((n=a.additionalInfo)==null?void 0:n.brandName)||a.item_brand||a.brand.name||null,item_sku:a.sku||a.id||a.item_id||await Ki(a)||null,item_name:a.name||a.item_name||null,item_category:Ct(a)||null,item_variant:(a.skuName||a.item_variant||a.name).split(/[-/]/)[0].trim()||null,item_variant2:a.size||((s=a==null?void 0:a.itemAttributes)==null?void 0:s.size)||((o=(a.skuName||a.name).split(/[-/]/).pop())==null?void 0:o.trim())||null,discount:zn(a),item_list_name:Ct(a)||null,item_url:a.item_url||null}]}async function zp(e){return((e==null?void 0:e.list)||[]).map(t=>{var n,s,o,a,i;return{price:((n=t==null?void 0:t.price)==null?void 0:n.list)||(t==null?void 0:t.price)||((s=t==null?void 0:t.offers)==null?void 0:s.lowPrice)||0,quantity:1,item_ref:(t==null?void 0:t.ref)||(t==null?void 0:t.item_ref)||(t==null?void 0:t.referenceId[0].Value)||(t==null?void 0:t.additionalProperty.find(c=>c.name==="RefId").value)||null,index:typeof(e==null?void 0:e.index)=="number"?e.index:null,item_brand:ot((o=t==null?void 0:t.brand)==null?void 0:o.name)||ot(e.brand)||ot(t==null?void 0:t.item_brand)||null,item_name:(t==null?void 0:t.productName)||(t==null?void 0:t.alternateName)||(t==null?void 0:t.item_name)||((a=t==null?void 0:t.seo)==null?void 0:a.title)||null,item_category:Ct(t)||null,item_variant:((i=t==null?void 0:t.name)==null?void 0:i.split("-")[0].trim())||(t==null?void 0:t.item_variant)||null,item_category2:sn(t)||null,item_id:(t==null?void 0:t.productID)||(t==null?void 0:t.productId)||(t==null?void 0:t.item_id)||(t==null?void 0:t.id)||null,discount:zn(t)||null,item_list_name:(e==null?void 0:e.itemListName)||Ct(t)||null}})}async function Bp(e){var t,n,s;const{item:o}=e;return[{price:e.value||0,quantity:1,item_ref:o.ref||o.additionalProperty.find(a=>a.name==="RefId").value||null,item_brand:ot(o.brand.name)||ot(e.brand)||null,item_name:o.productName||o.alternateName||null,item_category:Ct(o)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-")[0].trim())||null,item_category2:sn(o)||((s=(n=o==null?void 0:o.category)==null?void 0:n.split(">")[1])==null?void 0:s.trim())||null,item_id:(o==null?void 0:o.productID)||(o==null?void 0:o.productId)||o.item_group_id||null,discount:zn(o)||null,item_sku:(o==null?void 0:o.sku)||(o==null?void 0:o.productId)||null,item_url:o.url||o.item_url||null,seller_id:o.seller||null}]}async function Up(e){var t;if(!Tp(e==null?void 0:e.bannerUrl))return[];const s=await Ap(e==null?void 0:e.bannerUrl),o=s==null?void 0:s.items[0];return{price:(o==null?void 0:o.sellers[0].commertialOffer.Price)||0,quantity:1,item_ref:Wi(e==null?void 0:e.bannerUrl),item_brand:ot(s.brand)||null,item_name:(s==null?void 0:s.productName)||(s==null?void 0:s.alternateName)||(s==null?void 0:s.item_name)||null,item_category:Ct(s)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-").pop().trim())||null,item_category2:sn(s)||null,item_id:(s==null?void 0:s.productId)||null,discount:(o==null?void 0:o.sellers[0].commertialOffer.ListPrice)-(o==null?void 0:o.sellers[0].commertialOffer.Price)||null}}function $p(e,t){if(e!=null&&e.items)return e.items;switch(t){case"CUSTOM_VIEW_CART":case"BEGIN_CHECKOUT":case"CUSTOM_BEGIN_CHECKOUT":case"CUSTOM_ADD_SHIPPING_INFO":case"CUSTOM_ADD_PAYMENT_INFO":case"PURCHASE":case"CUSTOM_PURCHASE":return Mp(e);case"ADD_TO_CART":case"ADD_TO_WISHLIST":case"REMOVE_FROM_CART":return Fp(e,t);case"SELECT_ITEM":case"VIEW_ITEM_LIST":return zp(e);case"VIEW_ITEM":return Bp(e);case"VIEW_PROMOTION":case"SELECT_PROMOTION":return Up(e);default:return null}}function Hp(e){var t,n,s;if(!e.orderForm)return null;const o=((t=e.orderForm.paymentData)==null?void 0:t.payments)||[],a=((n=e.orderForm.paymentData)==null?void 0:n.paymentSystems)||[];if(!o.length||!a.length)return null;const i=o.find(f=>f==null?void 0:f.paymentSystem)||o[0],c=String((i==null?void 0:i.paymentSystem)||"").trim();if(!c)return null;const l=a.find(f=>String(f.id)===c),u=((s=l==null?void 0:l.name)==null?void 0:s.toLowerCase())||"",m=Vi.find(([f])=>u.includes(f));return m?m[1]:null}function qp(e){var t,n,s,o;if(!e.orderForm)return null;const a=((t=e.orderForm.paymentData)==null?void 0:t.transactions)||[];if(!a.length)return null;const i=((n=a[0])==null?void 0:n.payments)||[];if(!i.length)return null;const c=((o=(s=i[0])==null?void 0:s.paymentSystemName)==null?void 0:o.toLowerCase())||"",l=Vi.find(([u])=>c.includes(u));return l?l[1]:null}function Vp(e,t){if(e!=null&&e.paymentType)return e.paymentType;switch(t){case"ORDER_REVIEWED":case"CUSTOM_ADD_PAYMENT_INFO":return Hp(e);case"PURCHASE":case"CUSTOM_PURCHASE":return qp(e);default:return null}}var Wp={brand:Dp,items:$p,payment_type:Vp,user_info:async(e,t)=>{var n;const o=(n={animale:{store:"https://www.animale.com.br",checkout:"https://secure.animale.com.br"},farm:{store:"https://lojafarm.myvtex.com"},mariafilo:{store:"https://mariafilo.myvtex.com",checkout:"https://secure.mariafilo.com.br"},lojacrisbarros:{store:"https://lojacrisbarros.myvtex.com",checkout:"https://secure.crisbarros.com.br"},lojaoffpremium:{store:"https://lojaoffpremium.myvtex.com",checkout:"https://secure.lojaoffpremium.com.br"}}[e.account||"https://www.animale.com.br"])==null?void 0:n[e.platform||"store"];if(!o)return{customer:{email:e.userEmail},address:null};try{const a=`${o}/_v/user-info`;return await(await fetch(a,{method:"POST",body:JSON.stringify({email:e.userEmail})})).json()}catch{return{customer:{email:e.userEmail},address:null}}},content_type:(e,t)=>"regiao".concat(":"+e.category).concat(e.subcategory?":"+e.subcategory:"").concat(":"+e.componentName)||null,region:(e,t)=>e.region||null,line_items:(e,t)=>e!=null&&e.lineItems?e.lineItems:e!=null&&e.item?[e.item.productId||e.item.productID||e.item.item_id]:e!=null&&e.list?e.list.map(n=>n.productID||(n==null?void 0:n.id)):(e.orderForm.items||[]).map(n=>n.productId).join(","),currency:(e,t)=>{var n,s,o,a;return e!=null&&e.currency?e.currency:e!=null&&e.bannerUrl?"BRL":e!=null&&e.item?((s=(n=e.item)==null?void 0:n.offers)==null?void 0:s.priceCurrency)||"BRL":((a=(o=e.orderForm)==null?void 0:o.storePreferencesData)==null?void 0:a.currencyCode)||null},value:(e,t)=>{var n;return e!=null&&e.value?e.value:e.item?e.item.price:((n=e.orderForm)==null?void 0:n.value)!=null?e.orderForm.value/100:null},total_discount:(e,t)=>{var n,s;const a=(((n=e.orderForm)==null?void 0:n.totalizers)||((s=e.orderForm)==null?void 0:s.totals)||[]).find(i=>i.id==="Discounts");return a?Math.abs(a.value)/100:0},subtotal:(e,t)=>{var n,s;return(((n=e.orderForm)==null?void 0:n.totalizers)||((s=e.orderForm)==null?void 0:s.totals)||[]).filter(i=>i.id==="Items").reduce((i,c)=>i+(c.value||0),0)/100||0},coupon_message:(e,t)=>{var n;if(e.couponMessage)return e.couponMessage;const s=((n=e.orderForm)==null?void 0:n.messages)||[];if(s.length===0)return null;const o=s.filter(a=>a.text.toLowerCase().includes("cupom"));return o.length===0?null:o.map(a=>a.text).join(" | ")},seller_cod_name:(e,t)=>e.appliedSellerCodName||(e==null?void 0:e.orderForm.marketingData.utmiCampaign)||null,coupon:(e,t)=>{var n,s;return e.appliedCoupon||((s=(n=e==null?void 0:e.orderForm)==null?void 0:n.marketingData)==null?void 0:s.coupon)||null},pre_filled:(e,t)=>!!e.preFilled,search_term:(e,t)=>e.searchTerm||null,search_found:(e,t)=>!!e.searchFound,search_quantity:(e,t)=>e.searchQuantity||0,promotion_name:(e,t)=>e.promotionName||null,creative_name:(e,t)=>e.creativeName||null,creative_slot:(e,t)=>e.creativeSlot||null,zipcode:(e,t)=>e.zipCode||null,size:(e,t)=>e.size||null,item_ref:(e,t)=>e.itemRef||null,flag_pickup:(e,t)=>{var n;const s=e.orderForm;return s?(((n=s.shippingData)==null?void 0:n.logisticsInfo)||[]).some(i=>{var c;return(c=i.slas)==null?void 0:c.some(l=>l.deliveryChannel==="pickup-in-point")}):null},shippings:(e,t)=>{const n=e.orderForm;if(!n)return null;const s={};for(const a of n.shippingData.logisticsInfo){const i=n.items[a.itemIndex];if(i)for(const c of a.slas){const l=c.name;s[l]||(s[l]={shipping_tier:c.name,delivery_time:parseInt(c.shippingEstimate),shipping:parseFloat((c.price/100).toFixed(1)),line_items:[]}),s[l].line_items.push(i.id)}}return Object.values(s).map(a=>({shipping:a.shipping,shipping_tier:a.shipping_tier,delivery_time:a.delivery_time,line_items:a.line_items.join(",")}))||null},shipping:(e,t)=>{var n,s,o;return((o=(s=(n=e==null?void 0:e.orderForm)==null?void 0:n.shippingData)==null?void 0:s.logisticsInfo)!=null?o:[]).reduce((i,c)=>{var l,u;const m=(l=c.slas)==null?void 0:l.find(f=>f.id===c.selectedSla);return i+((u=m==null?void 0:m.price)!=null?u:0)},0)},shipping_tier:(e,t)=>{var n,s,o,a;const c=((o=(s=(n=e==null?void 0:e.orderForm)==null?void 0:n.shippingData)==null?void 0:s.logisticsInfo)!=null?o:[]).find(p=>p.selectedSla);if(!c)return null;const l=(a=c.slas)==null?void 0:a.find(p=>p.id===c.selectedSla);if(!l)return null;const{deliveryChannel:u,name:m,pickupStoreInfo:f}=l;return u==="pickup-in-point"?`retirada em loja${f!=null&&f.friendlyName?`: ${f.friendlyName}`:""}`:u==="delivery"?`receba em casa${m?`: ${m}`:""}`:null},transaction_id:(e,t)=>{var n,s;return((s=(n=e.orderForm)==null?void 0:n.orderGroup)==null?void 0:s.toString())||null},available_grid:(e,t)=>e.availableGrid||null};async function Gp(e={},t){const n=qi[t];return n?Object.fromEntries(await Promise.all(n.requiredParams.map(async o=>{const a=Wp[o];return typeof a!="function"?(console.error(`[DT] Missing paramGetter for param: ${o}`),[o,null]):[o,await a(e,t)]}))):void 0}async function Kp(e,t={}){try{const n=await Gp(t,e);return await wp(e,Object.assign({},n,{window:t.window}))}catch(n){return console.error(`[DT] Error tracking event ${e}:`,n)}}const Xp=({accountName:e=""})=>{const{sendDataLayerEvent:t}=ae(),{user:n}=Ut(),{cartStore:s}=be();return g.useEffect(()=>{if(!n)return;(async()=>{const{userId:a,email:i,firstName:c,lastName:l,phone:u,homePhone:m,postalCode:f,street:p,number:h,city:_,gender:y}=n,x=new TextEncoder().encode(a),b=await crypto.subtle.digest("SHA-256",x),j=Array.from(new Uint8Array(b)).map(v=>v.toString(16).padStart(2,"0")).join("");i&&Kp("CUSTOM_USER_INFO",{userEmail:i,platform:"store",account:e}),t({functionKey:"readyEvents",data:{readyData:{user_id:j,email:i,first_name:c,last_name:l,phone:u||m,zip:f,street:p,street_number:h,city:_,gender:y,orderform_id:s==null?void 0:s.id}}})})()},[n,s.id]),null},Yi=g.createContext({amount:null,boxes:null,toExpire:null,loading:!0,logout:()=>null,getCurrentCredits:()=>({credits:0,cashback:0})}),Yp=({children:e,AUTH_TOKEN_COOKIE:t,accountName:n})=>{var f;const{shipping:s,cartStore:o}=be(),[a,i]=g.useState({amount:null,boxes:null,toExpire:null,loading:!0}),c=g.useCallback(async()=>{try{await fetch("/api/user",{priority:"low"}).then(p=>p.json()).then(p=>{const{userCredits:h,..._}=p,{wishlist:y,...x}=_;i({amount:h==null?void 0:h.amount,boxes:h==null?void 0:h.boxes,toExpire:h==null?void 0:h.toExpire,user:x,loading:!1,wishlist:(typeof y=="string"?y.split(","):y)??[]})})}catch(p){console.error("my credits request",p),i({...a,loading:!1})}},[i]),l=g.useCallback(()=>{As(t),c()},[c]),u=g.useCallback(()=>a.boxes?a.boxes.reduce((p,h)=>h.gift_card_box.refid==="C1643"?(p.cashback+=h.amount,p):(p.credits+=h.amount,p),{cashback:0,credits:0}):{cashback:0,credits:0},[a]),m=g.useCallback(async()=>{var p,h,_;if((p=a.user)!=null&&p.postalCode&&(o!=null&&o.id)&&!(o!=null&&o.loading)&&!((_=(h=o==null?void 0:o.shippingData)==null?void 0:h.address)!=null&&_.postalCode))try{await s(a.user.postalCode)}catch(y){console.error("Error auto-filling CEP:",y)}},[(f=a.user)==null?void 0:f.postalCode]);return g.useEffect(()=>{c()},[c]),g.useEffect(()=>{m()},[m]),r.jsxs(Yi.Provider,{value:g.useMemo(()=>({...a,getCurrentCredits:u,logout:l}),[a,u,l]),children:[r.jsx(Xp,{accountName:n}),e]})},Ut=()=>{const e=g.useContext(Yi);if(e===void 0)throw new Error("useContext(SessionContext) must be used within a SessionProvider");return e},Qi=({color:e,delay:t=3e3,sku:n,setStatus:s,setIsLoading:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i})=>{const c=g.useRef(null),[l,u]=g.useState(null),{sendDataLayerEvent:m}=ae(),{user:f}=Ut(),p=f!=null&&f.firstName?`${f==null?void 0:f.firstName} ${f==null?void 0:f.lastName}`:"";return r.jsx("div",{className:Ze["notify--form"],children:r.jsxs("form",{action:"POST",onSubmit:async h=>{var x;h.preventDefault();const _=h.currentTarget,y=((x=_.querySelector("input"))==null?void 0:x.value)??"";fetch("/api/aviseme",{method:"POST",body:JSON.stringify({userName:p,email:y,sku:n==null?void 0:n.skuID})}).then(b=>s(b.ok)).finally(()=>{o(!1),_.reset(),m({functionKey:"readyEvents",data:{event:"notify_me",readyData:{size:n==null?void 0:n.size,item_id:n==null?void 0:n.skuID,color:e}}}),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{var b;(b=document.body)==null||b.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0})),u(!0),s(null)},t)})},children:[r.jsx(d.TextField.Structure,{input:r.jsx(d.TextField.Input,{feedback:typeof l=="boolean"&&l?"error":"none",type:"email",label:i.email_placeholder,mode:"over-label",variant:"outlined",sizeVariant:"large",onChange:h=>u(!h.target.validity.valid),required:!0}),supportText:typeof l=="boolean"&&l?r.jsx(d.TextField.SupportText,{text:a.messages.invalid_email,feedback:"error"}):r.jsx(r.Fragment,{})}),r.jsx(d.Button,{disabled:!(l===!1||!n)||!n,type:"submit",size:"large",children:i.button})]})})};Qi.displayName="Notify.Form";const Zi=({isLoading:e=!1})=>r.jsx("div",{className:Ze["notify--loading"],"data-loading":e,children:r.jsx(d.Spinner,{})});Zi.displayName="Notify.Loading";const ks={"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"},Ji=({children:e,...t})=>r.jsx("div",{...t,className:ks["product-variation-list--list"],children:e});Ji.displayName="ProductVariationList.List";const ec=({fill:e="#1352C7",src:t="",type:n="size",text:s,...o})=>{const{nextimage:a}=ue();return n==="size"?r.jsxs(d.ToggleSize.Wrapper,{...o,size:"large",variation:"ghost",children:[r.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-size"}),r.jsx(d.ToggleSize.Text,{children:s})]}):r.jsxs(d.ToggleStyle.Wrapper,{...o,size:"small",title:"wrapper-texture",children:[r.jsx(d.ToggleStyle.DisabledAdornment,{title:"disabled-adornment-texture"}),n==="color"?r.jsx(d.ToggleStyle.Color,{background:e,title:"color"}):r.jsx(d.ToggleStyle.Texture,{title:"texture",children:r.jsx(a,{alt:s??"image",height:40,src:t,width:40})})]})};ec.displayName="ProductVariationList.Option";const tc=({children:e,...t})=>r.jsx("div",{className:ks["product-variation-list"],...t,children:e});tc.displayName="ProductVariationList.Root";const nc=({children:e,title:t,...n})=>r.jsxs("div",{...n,className:ks["product-variation-list--title"],children:[t?r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.SectionWrapper,{children:r.jsx("p",{children:t})})}):r.jsx(r.Fragment,{}),e]});nc.displayName="ProductVariationList.Title";const et={List:Ji,Option:ec,Title:nc,Root:tc},Qp=(e,t)=>{if(!e||!t)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(s=>e[s]===t[s])},rc=({children:e,label:t="",skus:n,sku:s,setSku:o})=>r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Ze["notify--selector--header"],children:e}),r.jsxs(et.Root,{className:Ze["notify--selector"],children:[r.jsx(et.Title,{title:t}),r.jsx(et.List,{children:Array.isArray(n)&&n.map((a,i)=>{const c=Qp(s,a);return r.jsx(et.Option,{active:c,onClick:()=>o(c?null:a),text:String(a.size),type:"size"},i)})})]})]});rc.displayName="Notify.Selector";const oo=({type:e,icon:t,title:n,subtitle:s})=>r.jsx("div",{className:Ze[`notify--status--${e}`],children:r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:t,size:"large"})},children:r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("h2",{children:n}),r.jsx("h3",{children:s})]})})}),sc=({status:e,ICONS:t,PRODUCT_CARD_TEXTS:n})=>r.jsxs("div",{className:Ze["notify--status"],"data-status":e,children:[r.jsx(oo,{...n.success,icon:t.check_circle,type:"success"}),r.jsx(oo,{...n.error,icon:t.alert_circle,type:"error"})]});sc.displayName="Notify.Status";const Ls=({color:e,open:t,setVisible:n,skus:s,sku:o,setSku:a,ICONS:i,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l,PRODUCT_CARD_TEXTS:u,Z_INDEX_WAR:m})=>{const[f,p]=g.useState(!1),[h,_]=g.useState(null),{isMobile:y}=re();return r.jsxs(d.Modal.Root,{isMobile:y??!1,isOpen:t,setIsOpen:n,variant:y?"sideBottom":"sideLeft",style:{zIndex:m.modal},className:Ze["modal-modifier"],children:[r.jsx(d.Modal.Header,{navigation:"top",className:Ze["notify--header-modifier"],children:r.jsx($i,{isMobile:y??!1,ICONS:i,NOTIFY_INFO:l})}),r.jsxs(d.Modal.Body,{className:Ze["notify--modal--body"],children:[r.jsxs("div",{className:Ze["notify--container"],children:[r.jsxs(rc,{label:l.selector_label,sku:o,skus:s,setSku:a,children:[r.jsx("p",{children:l.subtitle}),r.jsx("span",{children:l.description})]}),r.jsx(Qi,{delay:4e3,sku:o,setStatus:_,setIsLoading:p,color:e,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l}),r.jsx(Zi,{isLoading:f}),r.jsx("div",{className:Ze["notify--selector--header"],children:r.jsx("span",{children:l.legal})})]}),r.jsx(sc,{status:h,ICONS:i,PRODUCT_CARD_TEXTS:u})]})]})};Ls.displayName="Notify";const Bn=({skus:e,ICONS:t,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:a,...i})=>{const c=Fn(e??[]);return r.jsx(Ls,{skus:c,ICONS:t,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:a,...i})};Bn.displayName="PDC.Notification";const oc=g.createContext({}),ac=({banners:e,children:t})=>{const{searchParams:n,ITEMS_PER_PAGE:s,ICONS:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l}=Me(),{router:u}=ue(),{sendDataLayerEvent:m}=ae(),{isMobile:f}=re(),{state:p}=Be(),{addPage:h,createPages:_,updateProducts:y,...x}=jp(),b=f?8:16,C=f?2:4,j=g.useRef(!1),v=g.useRef(p),[P,E]=g.useState(!1),[S,I]=g.useState(null),[T,A]=g.useState([]),k=g.useCallback(B=>{B&&"pagination"in B&&m({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:B.products}}})},[m]),O=g.useCallback(B=>{if(B.pagination.nextPage===!0){const Q=B.page+1,G=es(e,Q,C,s);h({...p,page:Q},G,k)}},[h,e,k,C,s,p]),Y=g.useCallback(B=>{B.loading===!1&&y({...p,page:B.page},k)},[k,y,p]),D=g.useCallback(B=>{const Q=new URLSearchParams(n);B.page!==Number(Q.get("page")??1)&&(Q.set("page",String(B.page)),u.replace(`?${Q.toString()}`,{scroll:!1}))},[u,n]),U=g.useCallback((B,Q)=>{const G=Q?Fn([Q]):null;A(B),I(G!=null&&G.length?G[0]:null),E(!0)},[]);return g.useEffect(()=>{const B=!j.current,Q=Li(v.current,p),G=es(e,p.page,C);B?_(p,G,k,s):Q&&(_(p,G,k,s),v.current=p),j.current=!0},[e,_,k,C,s,p]),r.jsxs(oc.Provider,{value:g.useMemo(()=>({...x,addPage:h,addNewPage:O,createPages:_,gap:b,columns:C,handleNotify:U,updatePage:Y,updateProducts:y,updateParamPage:D}),[h,O,_,U,b,C,x,Y,y,D]),children:[t,r.jsx(Bn,{open:P,sku:S,skus:T,setSku:I,setVisible:E,ICONS:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l})]})},lt=()=>{const e=g.useContext(oc);if(e===void 0)throw new Error("PLPInfiniteScrollContext must be used within a ScrollInfiniteProvider");return e},ic=g.createContext({gridBanners:void 0,banners:[]}),Zp=({children:e,data:t,device:n,SectionZone:s,COMMON_PAGE_COLUMN_GAP_PDC:o})=>{const{isMobile:a}=re(),i=(t==null?void 0:t.sections.filter(f=>f.name!=="List Product Banners"))??[],c=i.slice(0,no),l=i.slice(no,i.length),u=t==null?void 0:t.sections.find(f=>f.name==="List Product Banners"),m=g.useMemo(()=>{var f,p;return((p=(f=u==null?void 0:u.data)==null?void 0:f.banners)==null?void 0:p.map(h=>({...h.banner,columns:h.bannerWidth,position_grid:h.bannerPosition})))??[]},[u]);return a&&n==="mobile"||!a&&n==="desktop"?r.jsxs(ic.Provider,{value:{gridBanners:u,banners:m},children:[r.jsx(s,{data:c??[]}),r.jsxs(d.Utils.Column,{gap:o,className:d.helpers.classNameConcat("utils-column-modifier"),children:[e,r.jsx(s,{data:l??[]})]})]}):r.jsx(r.Fragment,{})},Un=()=>{const e=g.useContext(ic);return e===void 0&&console.error("Needs PLPContentContext on parent component"),e},cc=g.createContext({}),lc=({children:e,filters:t,PLP_FILTERS:n,...s})=>{var a;const o=(a=t.facets)==null?void 0:a.filter(i=>n.find(c=>c.key===i.key));return r.jsx(cc.Provider,{value:g.useMemo(()=>({...s,filters:{...t,facets:o}}),[t,o,s]),children:e})},$t=()=>{const e=g.useContext(cc);if(e===void 0)throw new Error("useFilterContext must be used within a FilterProvider");return e},uc=g.createContext({product:void 0}),Jp=({children:e,data:t,productId:n,COMMON_PAGE_COLUMN_GAP:s,SectionZone:o})=>r.jsxs(uc.Provider,{value:{productId:n},children:[e,r.jsx(d.Utils.Column,{gap:s,className:d.helpers.classNameConcat("utils-column-modifier"),children:r.jsx(o,{data:(t==null?void 0:t.sections)??[]})})]}),dc=()=>{const e=g.useContext(uc);return e||console.error("use this hook only inside PDPContentProvider hierarchy"),e},ef=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase().trim();function tf(e,t=1e3){let n=!1;return(...s)=>{n||(e(...s),n=!0,setTimeout(()=>{n=!1},t))}}function nf(e,t=1e3){let n;return(...s)=>{clearTimeout(n),n=setTimeout(()=>{e(...s)},t)}}const mc=(e,t)=>t.getTime()>e.getTime()?Math.abs(t.getTime()-e.getTime()):0,Vt=(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),rf=e=>{const t=vm.decodeJwt(e??"");return{email:t.sub,userId:t.userId}},sf=["name","email","phone","date","cpf","cep"],ao={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}$/},pc=({type:e,input:t,required:n=!1})=>{if(typeof t!="string"||!n&&t===""||!ao[e])return!0;const s=t.trim();return ao[e].test(s)},of=e=>{const t=/\/(\d+)-\d+-\d+\/(.+?)\./,n=typeof e=="string"?e.match(t):null;return n?n[2].replace(/-/g," "):lp},af=Object.freeze(Object.defineProperty({__proto__:null,FieldTypes:sf,debounce:nf,getAltTextFromUrl:of,getAuthenticatedUser:rf,getCookie:Hi,getDaysHoursMinutesSeconds:Vt,getMilliSeconds:mc,removeAccentsAndReplaceSpaces:ef,setCookie:As,throttle:tf,validateInput:pc},Symbol.toStringTag,{value:"Module"})),cf=({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}},lf=({formData:e,mountedFields:t,inputsStatus:n,hasTermsAndConditions:s,checkboxRef:o,setFormStatus:a})=>{let i=!1,c=!1;const l={...n};return s&&!o.current&&(a("unchecked"),i=!0),e.forEach((u,m)=>{var h;if(m==="terms-and-conditions")return;const f=(h=t[m])==null?void 0:h.required;if(f&&!u){l[m]="required",i=!0;return}pc({type:t[m].type,input:u,required:f})||(l[m]="error",c=!0),typeof u=="string"&&e.set(m,u.toString().trim())}),{hasEmptyFields:i,hasErrors:c,inputStatusToUpdate:l}},fc=g.createContext({}),hc=({children:e,masterDataEmailField:t,fields:n,variant:s,CONSTANTS:{MASTER_DATA_ENTITY:o,NEWSLETTER_CONFIGS:a}})=>{const{sendDataLayerEvent:i}=ae(),c=a.hasTermsAndConditions,{mountedFields:l,mountedInputsStatus:u}=g.useMemo(()=>cf({fields:n}),[n]),m=g.useRef(!1),[f,p]=g.useState("idle"),[h,_]=g.useState(u),y=async({searchFields:E,entity:S})=>{const I=await vt.post("/api/master-data/search",{body:{masterDataEntity:S,searchFields:E,headers:{"REST-Range":"resources=0-49"}}});return console.info(I),I.data},x=async({documentId:E,fieldsToBeUpdated:S,entity:I})=>(await vt.post("/api/master-data/update",{dataEntityName:I,documentId:E,fieldsToBeUpdated:S})).status,b=g.useCallback(async({payload:E,response:S},I,T)=>{var D;const{email:A,...k}=E,[O]=await y({searchFields:{[I]:A},entity:T??o.newsletter}),Y=Array.isArray(O)?(D=O[0])==null?void 0:D.id:void 0;return O&&await x({documentId:Y,fieldsToBeUpdated:k,entity:T??o.newsletter})!==204?{...S,status:"error"}:{...S,status:"success"}},[]),C=g.useCallback(async({formData:E},S,I)=>{const T={status:"idle",inputsStatus:{}},A={};E.forEach((k,O)=>{A[O]=k});try{const O=(await vt.post("/api/master-data",{body:{payload:A,masterDataEntity:S??o.newsletter}})).data;return(O==null?void 0:O.Message)==="duplicated entry"?b({payload:A,response:T},I,S):O!=null&&O.Id?{...T,status:"success"}:{...T,status:"error"}}catch(k){return console.error("error",k),{...T,status:"error"}}},[b]),j=g.useCallback(async(E,S,I)=>{E.preventDefault();const T=new FormData(E.target);if(T.append("acceptedTerms",m.current?"true":"false"),m.current){const k=new Kr.TZDate(new Date,"America/Sao_Paulo").toISOString();T.append("termsAcceptedAt",k)}S&&Object.keys(S).forEach(k=>{T.append(k,S[k])});const A=await C({formData:T},I??"",t);A&&(p(A==null?void 0:A.status),_(A.inputsStatus),A.status==="success"&&i({functionKey:"readyEvents",data:{event:"generate_lead"}}))},[t,C,p,_,i]),v=g.useCallback(E=>{const S=new FormData(E.currentTarget.parentElement),{hasEmptyFields:I,hasErrors:T,inputStatusToUpdate:A}=lf({formData:S,mountedFields:l,inputsStatus:h,hasTermsAndConditions:c,checkboxRef:m,setFormStatus:p});if(_(A),I||T){E.preventDefault();return}p("loading")},[l,h,c,m]),P=g.useCallback(()=>{p("idle"),_(u)},[u]);return r.jsx(fc.Provider,{value:g.useMemo(()=>({formStatus:f,handleSubmit:j,setFormStatus:p,inputsStatus:h,setInputsStatus:_,hasTermsAndConditions:c,handleClickToSubmit:v,checkboxRef:m,masterDataEmailField:t,fields:n,variant:s,resetNewsletter:P}),[f,j,p,h,_,v,c,m,t,n,s,P]),children:e})},Os=()=>{const e=g.useContext(fc);if(e===void 0)throw new Error("useNewsletterContext must be used within a NewsletterProvider");return e},_c=g.createContext({}),gc=({children:e,data:t})=>{const[n,s]=g.useState(),[o,a]=g.useState(),i=g.useCallback(u=>{const m=t.filter(f=>f.cidade===u);s(m)},[t]),c=g.useCallback(u=>{a(u)},[]),l=g.useCallback(()=>{a("")},[]);return r.jsx(_c.Provider,{value:g.useMemo(()=>({clearSelectedStore:l,data:t,handleSelectCity:i,handleSelectStore:c,selectedCity:n,selectedStore:o}),[l,t,i,c,n,o]),children:e})},$n=()=>{const e=g.useContext(_c);if(e===void 0)throw new Error("useLPStoreContext must be used within a LPStoreProvider");return e},yc={contexts:{addToCart:{hook:It,provider:Si},cart:{hook:be,provider:op},cms:{FlagsAndTags:{context:hs,hook:_t,provider:bm}},newsletter:{hook:Os,provider:hc},events:{hook:ae,provider:wm},global:{hook:re,provider:Vm,mediator:ei},header:{hook:Pe,provider:np},menuMobile:{hook:Es,provider:ji},next:{hook:ue,provider:Wm},pdp:{provider:jm},PDPContent:{provider:Jp,hook:dc},plp:{provider:yp,hook:Rs},plpFilter:{hook:$t,provider:lc},PLPContent:{provider:Zp,hook:Un},plpInfinite:{provider:ac,hook:lt},pdpdata:{provider:Rm},searchFacets:{hook:Ti,provider:Ri},searchProducts:{hook:rn,provider:ws},searchRoot:{hook:Ns,provider:Ps},searchSearch:{hook:Be,provider:Is},session:{hook:Ut,provider:Yp},ui:{hook:Jt,provider:Ja},lpStore:{hook:$n,provider:gc}},hooks:{useBackPDC:ja,useClipboard:Tm,useDisableZoom:Aa,useLocalStorage:km,useOnScreen:_s,useSentinel:Dn,useTouchZoomPan:ka},stores:{cart:Hm,header:Km,pdp:ep,wishlist:tp}},uf={cart:Bm,events:Im,plp:vp,product:H.productHelpers,utils:af},Ds={helpers:uf},qe={"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"},xc=({brand:e,className:t,name:n,...s})=>r.jsxs("div",{...s,className:d.helpers.classNameConcat(qe["add-to-cart--card--name"],t),children:[r.jsx(d.Tag,{style:{textTransform:"uppercase"},size:"small",variant:"quaternary",title:e,children:e}),r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:r.jsx("p",{className:"typography-style-body-md",children:n})})})]});xc.displayName="AddToCart.Card.Name";const vc=({className:e,listPrice:t,price:n,quantity:s,productId:o,...a})=>{const i=H.formatPriceToCurrency(n/100),c=H.formatPriceToCurrency(t/100);return r.jsx("div",{...a,className:d.helpers.classNameConcat(qe["add-to-cart--card--price-quantity"],e),children:r.jsx(d.ProductInfo.Root,{size:"small",layout:"vertical",children:r.jsx(d.ProductInfo.Wrapper,{size:"small",layout:"vertical",children:r.jsx(d.ProductInfo.ValuesWrapper,{children:n!==t?r.jsxs(r.Fragment,{children:[r.jsx(d.ProductInfo.Price,{label:"originalPrice",value:i,size:"small"},"price-list"),r.jsx(d.ProductInfo.Price,{label:"discountPrice",value:c,size:"small"},"price-low")]}):r.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:c,size:"small"},"price-low")})})})})};vc.displayName="AddToCart.Card.PriceQuantity";const df="_skeleton_12b79_1",mf={skeleton:df},bc=({style:e})=>r.jsx("div",{style:e,className:mf.skeleton}),pf="_image_1y08u_1",ff={image:pf},hf=({alt:e,className:t,objectFit:n,...s})=>{const{nextimage:o}=ue();return r.jsx(o,{quality:90,...s,alt:e??"",className:d.helpers.classNameConcat(ff.image,t),"data-object-fit":n??"cover"})},_f=({videoRef:e,...t})=>r.jsx("video",{...t,ref:e,children:r.jsx("track",{kind:"captions"})}),we={Image:hf,Video:_f},jc=({className:e,productGroupID:t,size:n,texture:s,...o})=>{const{CONSTANTS:{TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:i}}=It(),[c,l]=g.useState(s??"");return g.useEffect(()=>{c||fetch("/api/catalog/product/info",{method:"POST",priority:"low",body:JSON.stringify({ids:[t]})}).then(u=>u.json()).then(u=>{const m=u.data[0].items[0];if(m){const f=m.images.find(p=>a.includes(p.imageLabel));f!=null&&f.imageUrl?l(f.imageUrl):l(m.images[0].imageUrl)}}).catch(u=>{console.error(u)})},[c,t]),r.jsxs("div",{...o,className:d.helpers.classNameConcat(qe["add-to-cart--card--style-size"],e),children:[r.jsx(d.ToggleStyle.Wrapper,{size:"x-small",style:i,children:r.jsx(d.ToggleStyle.Texture,{children:c?r.jsx(we.Image,{alt:"",src:c??"",width:164,height:164,style:i}):r.jsx(bc,{})})}),r.jsx(d.Utils.Divider,{direction:"vertical",size:"medium",style:{height:24}}),n&&r.jsxs(d.ToggleSize.Wrapper,{size:"small",title:"wrapper-texture",children:[r.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),r.jsx(d.ToggleSize.Text,{children:n})]})]})};jc.displayName="AddToCart.Card.StyleSize";const{helpers:gf}=Ds,Cc=({className:e,item:t,texture:n,...s})=>{const{itemOffered:{name:o,brand:a,skuName:i,isVariationOf:{productGroupID:c}},quantity:l,price:u,sellingPrice:m}=t,{CONSTANTS:{NAME_SPLIT_SYMBOL:f}}=It(),{size:p}=gf.product.getColorAndSizeFromSkuName(i??o,f);return r.jsxs("div",{...s,className:d.helpers.classNameConcat(qe["add-to-cart--card--content"],e),children:[r.jsx(xc,{brand:a.name,name:o}),r.jsx(vc,{price:u,listPrice:m,quantity:l,productId:t.id}),r.jsx(jc,{size:p,texture:n,productGroupID:c})]})};Cc.displayName="AddToCart.Card.Content";const Sc=({image:e,thumbnail:t=!1})=>r.jsx(we.Image,{alt:e.alternateName??"image","data-thumbnail":t,height:t?152:120,src:e.url,width:t?152:94});Sc.displayName="AddToCart.Card";const Ec=({className:e,item:t,texture:n,thumbnail:s,...o})=>{const{itemOffered:{image:[a]}}=t,i=H.updatedResizedImg(a.url,{width:200,height:300});return r.jsxs("div",{...o,className:d.helpers.classNameConcat(qe["add-to-cart--card"],e),children:[r.jsx(Sc,{image:{alternateName:a.alternateName||"Produto",url:i||""},thumbnail:s}),!s&&r.jsx(Cc,{item:t,texture:n})]})};Ec.displayName="AddToCart.Card";const Pc=({className:e,children:t,title:n,...s})=>r.jsxs("div",{...s,className:d.helpers.classNameConcat(qe["add-to-cart--content"],e),children:[r.jsx("div",{className:qe["add-to-cart--content--title"],children:n&&r.jsx("h2",{children:n})}),t,r.jsx(bt.Footer,{})]});Pc.displayName="AddToCart.Layout.Content";const Nc=({className:e,...t})=>{var h,_;const{isMobile:n,handleClose:s,CONSTANTS:{ADD_TO_CART:o}}=It(),{cartStore:{totalizers:a},setIsOpen:i}=be(),c=(h=a.find(y=>y.id==="Discounts"))==null?void 0:h.value,l=((_=a.find(y=>y.id==="Items"))==null?void 0:_.value)??0,u=a.find(y=>y.id==="Shipping"),f=(l-Math.abs(c??0)+((u==null?void 0:u.value)??0))/100,p=H.formatPriceToCurrency(f??0);return r.jsxs("div",{...t,className:d.helpers.classNameConcat(qe["add-to-cart--footer"],e),children:[r.jsxs("div",{className:qe["add-to-cart--footer--total"],children:[r.jsx("span",{children:"Subtotal:"}),r.jsx("span",{children:p})]}),r.jsx(d.Button,{size:"medium",variant:"primary","data-close":!0,onClick:()=>i(!0),children:o.footer.bag}),n?r.jsx(d.Button,{"data-close":!0,size:"medium",variant:"tertiary",children:o.footer.keep_buying}):r.jsx(d.Button,{onClick:()=>s(),size:"medium",variant:"tertiary",children:o.footer.keep_buying})]})};Nc.displayName="AddToCart.Layout.Footer";const Ic=({children:e,className:t,thumbnail:n=!1,...s})=>{const{cartStore:{options:o}}=be(),{recentlyAddedProducts:a}=Jt(),i=a.length>3?4:a.length;return r.jsxs("div",{...s,className:qe["add-to-cart--items"],"data-thumbnail":n,children:[Array.isArray(a)&&a.filter((c,l)=>l<i).map(c=>{var u;const l=(u=o==null?void 0:o.find(m=>m.id===c.itemOffered.isVariationOf.productGroupID))==null?void 0:u.texture;return r.jsx(bt.Card,{item:c,thumbnail:n,texture:l},c.itemOffered.sku)}),e]})};Ic.displayName="AddToCart.Layout.Items";const wc=({children:e,Z_INDEX_WAR:t})=>{const{isOpen:n,setIsOpen:s}=It(),{isMobile:o}=re();return r.jsxs(d.Modal.Root,{"data-modal":"add-to-cart--modal",className:qe["add-to-cart__modal"],isMobile:o??!1,isOpen:n,setIsOpen:s,variant:"sideBottom",style:{zIndex:t.modal},children:[r.jsx(d.Modal.Header,{navigation:"top",children:r.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0})}),r.jsx(d.Modal.Body,{children:e})]})};wc.displayName="AddToCart.Modal";const yf=({children:e})=>{const{count:t,handleClose:n,setIsOpen:s}=It(),o=g.useRef(t);return g.useEffect(()=>{t>o.current&&s(!0),t<o.current&&o.current>=1&&n(),o.current=t},[t,n,s]),r.jsx(r.Fragment,{children:e})},Rc=({children:e,component:t,CONSTANTS:n,...s})=>{const{recentlyAddedProducts:o}=Jt(),{isMobile:a}=re(),i=o.length>3?4:o.length;return r.jsx(Si,{...s,count:i,isMobile:a,CONSTANTS:n,children:r.jsx(yf,{children:a?r.jsxs(r.Fragment,{children:[r.jsx(bt.Modal,{Z_INDEX_WAR:n.Z_INDEX_WAR,children:t}),e]}):r.jsx(bt.Tooltip,{component:t,style:{width:350},Z_INDEX_WAR:n.Z_INDEX_WAR,children:e})})})};Rc.displayName="AddToCart.Root";const Tc=({children:e,component:t,Z_INDEX_WAR:n,...s})=>{const{contentRef:o,left:a,isLeaving:i,target:c,isOpen:l,top:u}=It();return r.jsx(d.Tooltip.Root,{arrow:"top-right",component:r.jsx("div",{...s,ref:o,children:t}),id:"add-to-cart--tooltip",className:qe["add-to-cart--tooltip"],style:{zIndex:n.modal},isLeaving:i,isOpen:l,left:a,size:"medium",position:"top",top:u,children:r.jsx("div",{className:qe["add-to-cart--tooltip"],ref:c,children:e})})};Tc.displayName="AddToCart.Tooltip";const bt={Card:Ec,Content:Pc,Footer:Nc,Items:Ic,Modal:wc,Root:Rc,Tooltip:Tc},Ms=({title:e,...t})=>{const{recentlyAddedProducts:n}=Jt(),{isMobile:s}=re(),o=n.length>3?4:n.length,a=n.length>(o??1),i=n.length>1;return r.jsx(bt.Root,{isMobile:s,count:n.length,component:r.jsx(bt.Content,{title:e,children:r.jsx(bt.Items,{thumbnail:i,children:a&&r.jsx(d.Badge.Count,{count:n.length-o,size:"medium",variant:"secondary"})})}),...t})};Ms.displayName="AddToCart";const io={"backtotop-btn":"_backtotop-btn_vcjsm_1","card-modifier":"_card-modifier_vcjsm_29"},xf=({children:e,className:t,classNameButton:n,adornment:s,iconPosition:o,scrollToOptions:a,style:i,...c})=>{const l={top:(a==null?void 0:a.top)??0,left:(a==null?void 0:a.left)??0,behavior:(a==null?void 0:a.behavior)??"smooth"},m=o&&s?{flexDirection:{top:"column",bottom:"column-reverse",left:"row",right:"row-reverse"}[o]}:{},f=()=>{window&&window.document.body.scrollTo({...l})};return r.jsx(d.Card,{...c,shadow:!0,padding:"small",className:d.helpers.classNameConcat(io["card-modifier"],t),style:{...i,padding:0},children:r.jsxs("button",{className:d.helpers.classNameConcat(io["backtotop-btn"],n),onClick:f,style:{...m},"data-orientation":o,children:[s,e]})})},vf="_container_1sy8s_16",pt={"carousel-container":"_carousel-container_1sy8s_1","add-cart-container":"_add-cart-container_1sy8s_8",container:vf,"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"},bf=({selectedProducts:e,handleAddAllToCart:t,CONSTANTS:n})=>{const s=Object.values(e.products).length;return r.jsxs("div",{className:pt["add-itens-to-cart-container"],children:[r.jsxs("div",{className:pt["add-itens-to-cart-container-values"],children:[r.jsx("div",{className:pt["add-itens-to-cart-qty-products"],children:r.jsx("span",{children:s===0?n.BUY_PACKAGE.group_cart.select_all_product:`${s} ${s===1?n.BUY_PACKAGE.group_cart.select_product:n.BUY_PACKAGE.group_cart.select_product+"s"}`})}),r.jsx("div",{className:pt["add-itens-to-cart-total"],children:r.jsx("span",{children:H.freightParsePrice({valueInCents:e.totalPrice*100,hasFree:!1,freeTaxMessage:n.FREIGHT_CALCULATION.messages.free_tax})})})]}),r.jsx(d.Button,{onClick:t,className:pt["add-button"],size:"large",disabled:s===0,variant:"primary",children:n.BUY_BUTTON_LABELS.add_to_cart})]})},jf=e=>e.reduce((t,n)=>{var o;const s=t.find(a=>a.node.id===n.node.id);if(!s)return[...t,n];if((o=s==null?void 0:s.node.isVariantOf)!=null&&o.hasVariant){const a=s.node.isVariantOf.hasVariant,i=n.node.isVariantOf.hasVariant;a&&i&&(s.node.isVariantOf.hasVariant=[...a,...i])}return t},[]),Cf=({selectedProduct:e,productId:t,prevState:n,mainSellerId:s})=>{const{products:o,totalPrice:a}=n;try{if(!e){const{[t]:u,...m}=o;return{...n,totalPrice:a-u.price,products:m}}const i=H.getValidOffer(e.offers.offers,s);if(!i)return n;const c=i.seller.identifier,l=i.price;if(o[t]){const{price:u}=o[t];return o[t]={...o[t],price:l,id:e.sku,seller:c},{totalPrice:a+l-u,products:{...o}}}return{totalPrice:a+l,products:{...o,[t]:{id:e.sku,price:l,seller:c,productId:t}}}}catch(i){return console.error("Error handling SKU selection:",i),n}},Ac=g.createContext({}),Sf=({children:e,item:t,index:n,shelfTitle:s,...o})=>{const[a,i]=g.useState(null),c=g.useRef(null),l=g.useRef({availableSkus:[],priceInfo:{price:0,listPrice:0}}),{sendDataLayerEvent:u,itemListRef:m}=ae(),f=y=>{u({functionKey:"productEvents",data:{commonData:{...t,availableSizes:l.current.availableSkus,...l.current.priceInfo},customData:{index:n+1},event:y}})},p=()=>{f("add_to_wishlist")},h=()=>{u({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...t,...l.current.priceInfo}]},supportData:{selectedSku:a,selectedSkus:[a]},customData:{index:n}}})},_=()=>{s&&(m.current={item_list_name:s}),f("select_item")};return r.jsx(Ac.Provider,{value:g.useMemo(()=>({...o,index:n,item:t,element:c,selectedSku:a,setSelectedSku:i,eventDataRef:l,sendAddToWishlistEvent:p,sendSelectItemEvent:_,sendAddToCartEvent:h}),[o,t,c,a]),children:e})},Ye=()=>{const e=g.useContext(Ac);if(e===void 0)throw new Error("useProductCardContext must be used within a ProductCardProvider");return e},Te={"product-card--actions":"_product-card--actions_bndjh_1","product-card--actions--group":"_product-card--actions--group_bndjh_9","product-card--actions--selectors":"_product-card--actions--selectors_bndjh_21","product-card--body":"_product-card--body_bndjh_33","product-card--header":"_product-card--header_bndjh_47","product-card--footer":"_product-card--footer_bndjh_67","product-card--image":"_product-card--image_bndjh_90","product-card--image--container":"_product-card--image--container_bndjh_97","product-card--outstock":"_product-card--outstock_bndjh_133","product-card--price":"_product-card--price_bndjh_155","product-card--title":"_product-card--title_bndjh_177","product-card--title--tag":"_product-card--title--tag_bndjh_183","product-card--title--content":"_product-card--title--content_bndjh_200","product-card--selectors--size":"_product-card--selectors--size_bndjh_240","product-card--selectors--size--button":"_product-card--selectors--size--button_bndjh_266","product-card--selectors--size--skus":"_product-card--selectors--size--skus_bndjh_275","product-card--selectors--style":"_product-card--selectors--style_bndjh_289","product-card--selectors--style--more":"_product-card--selectors--style--more_bndjh_299","product-card--video":"_product-card--video_bndjh_316","product-card--wrapper":"_product-card--wrapper_bndjh_342"},kc=({callback:e,children:t,className:n,data:s,isKit:o,...a})=>{const{item:{availability:{status:i},image:c}}=Ye();return i?r.jsxs("div",{...a,className:d.helpers.classNameConcat(Te["product-card--actions"],n),children:[r.jsxs(fe.Wrapper,{type:"actions--group",children:[r.jsx(fe.Price,{}),r.jsx("div",{className:Te["product-card--actions--selectors"],children:!o&&r.jsx(fe.StyleSelector,{data:s,images:c,callback:e})})]}),t]}):null};kc.displayName="ProductCard.Actions";const Lc=({className:e,isKit:t,...n})=>{const{addToCart:s}=be(),{isMobile:o=!1,selectedSku:a,outStock:i,item:c,sendAddToCartEvent:l,CONSTANTS:u}=Ye(),m=()=>{var h;if(!a)return;const p=H.getValidOffer(a.offers.offers,u.StoreConfig_MainSellerId);p&&s({id:a==null?void 0:a.sku,quantity:1,seller:p.seller.identifier},{id:c.id,texture:(h=c==null?void 0:c.image.find(_=>u.TEXTURE_IMAGE.includes(_.alternateName)))==null?void 0:h.url}),l()},f=a?u.BUY_BUTTON_LABELS.add_to_cart:u.BUY_BUTTON_LABELS.select_size;return r.jsx(d.Button,{...n,className:d.helpers.classNameConcat(e,"buy-button"),disabled:!t&&!a&&!i,size:o?"medium":"large",variant:i?"secondary":"primary",onClick:i?n.onClick:m,children:i?"Avise-me quando chegar":f})};Lc.displayName="ProductCard.Actions.BuyButton";const Ef={"snackbar-modifier":"_snackbar-modifier_1va2l_1"},Ot=({size:e,adornment:t,title:n,subtitle:s,supportChildren:o,className:a,Z_INDEX_WAR:i,...c})=>r.jsxs(d.SnackBar.Structure,{...c,size:e,className:d.helpers.classNameConcat(Ef["snackbar-modifier"],a),width:360,style:{zIndex:i.snackbar},children:[r.jsx(d.SnackBar.Content,{adornment:t,title:n,subtitle:s}),o&&r.jsx(d.SnackBar.Support,{children:o})]});Ot.displayName="SnackBar";const Kt={"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 ts={exports:{}},Le={};Le._=Le._interop_require_default=Pf;function Pf(e){return e&&e.__esModule?e:{default:e}}var dn={exports:{}},nr={},co;function Oc(){return co||(co=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}t(e,{assign:function(){return a},searchParamsToUrlQuery:function(){return n},urlQueryToSearchParams:function(){return o}});function n(i){const c={};return i.forEach((l,u)=>{typeof c[u]>"u"?c[u]=l:Array.isArray(c[u])?c[u].push(l):c[u]=[c[u],l]}),c}function s(i){return typeof i=="string"||typeof i=="number"&&!isNaN(i)||typeof i=="boolean"?String(i):""}function o(i){const c=new URLSearchParams;return Object.entries(i).forEach(l=>{let[u,m]=l;Array.isArray(m)?m.forEach(f=>c.append(u,s(f))):c.set(u,s(m))}),c}function a(i){for(var c=arguments.length,l=new Array(c>1?c-1:0),u=1;u<c;u++)l[u-1]=arguments[u];return l.forEach(m=>{Array.from(m.keys()).forEach(f=>i.delete(f)),m.forEach((f,p)=>i.append(p,f))}),i}}(nr)),nr}var rr={},Ft={};function Dc(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Dc=function(s){return s?n:t})(e)}Ft._=Ft._interop_require_wildcard=Nf;function Nf(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Dc(t);if(n&&n.has(e))return n.get(e);var s={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(s,a,i):s[a]=e[a]}return s.default=e,n&&n.set(e,s),s}var lo;function Mc(){return lo||(lo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var m in u)Object.defineProperty(l,m,{enumerable:!0,get:u[m]})}t(e,{formatUrl:function(){return a},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}});const s=Ft._(Oc()),o=/https?|ftp|gopher|file/;function a(l){let{auth:u,hostname:m}=l,f=l.protocol||"",p=l.pathname||"",h=l.hash||"",_=l.query||"",y=!1;u=u?encodeURIComponent(u).replace(/%3A/i,":")+"@":"",l.host?y=u+l.host:m&&(y=u+(~m.indexOf(":")?"["+m+"]":m),l.port&&(y+=":"+l.port)),_&&typeof _=="object"&&(_=String(s.urlQueryToSearchParams(_)));let x=l.search||_&&"?"+_||"";return f&&!f.endsWith(":")&&(f+=":"),l.slashes||(!f||o.test(f))&&y!==!1?(y="//"+(y||""),p&&p[0]!=="/"&&(p="/"+p)):y||(y=""),h&&h[0]!=="#"&&(h="#"+h),x&&x[0]!=="?"&&(x="?"+x),p=p.replace(/[?#]/g,encodeURIComponent),x=x.replace("#","%23"),""+f+y+p+x+h}const i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(l){return process.env.NODE_ENV==="development"&&l!==null&&typeof l=="object"&&Object.keys(l).forEach(u=>{i.includes(u)||console.warn("Unknown key passed via urlObject into url.format: "+u)}),a(l)}}(rr)),rr}var sr={},uo;function If(){return uo||(uo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"omit",{enumerable:!0,get:function(){return t}});function t(n,s){const o={};return Object.keys(n).forEach(a=>{s.includes(a)||(o[a]=n[a])}),o}}(sr)),sr}var or={},mo;function Hn(){return mo||(mo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(v,P){for(var E in P)Object.defineProperty(v,E,{enumerable:!0,get:P[E]})}t(e,{DecodeError:function(){return _},MiddlewareNotFoundError:function(){return C},MissingStaticPage:function(){return b},NormalizeError:function(){return y},PageNotFoundError:function(){return x},SP:function(){return p},ST:function(){return h},WEB_VITALS:function(){return n},execOnce:function(){return s},getDisplayName:function(){return l},getLocationOrigin:function(){return i},getURL:function(){return c},isAbsoluteUrl:function(){return a},isResSent:function(){return u},loadGetInitialProps:function(){return f},normalizeRepeatedSlashes:function(){return m},stringifyError:function(){return j}});const n=["CLS","FCP","FID","INP","LCP","TTFB"];function s(v){let P=!1,E;return function(){for(var S=arguments.length,I=new Array(S),T=0;T<S;T++)I[T]=arguments[T];return P||(P=!0,E=v(...I)),E}}const o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,a=v=>o.test(v);function i(){const{protocol:v,hostname:P,port:E}=window.location;return v+"//"+P+(E?":"+E:"")}function c(){const{href:v}=window.location,P=i();return v.substring(P.length)}function l(v){return typeof v=="string"?v:v.displayName||v.name||"Unknown"}function u(v){return v.finished||v.headersSent}function m(v){const P=v.split("?");return P[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(P[1]?"?"+P.slice(1).join("?"):"")}async function f(v,P){if(process.env.NODE_ENV!=="production"){var E;if((E=v.prototype)!=null&&E.getInitialProps){const T='"'+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(T)}}const S=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(S&&u(S))return I;if(!I){const T='"'+l(v)+'.getInitialProps()" should resolve to an object. But found "'+I+'" instead.';throw new Error(T)}return process.env.NODE_ENV!=="production"&&Object.keys(I).length===0&&!P.ctx&&console.warn(""+l(v)+" returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps"),I}const p=typeof performance<"u",h=p&&["mark","measure","getEntriesByName"].every(v=>typeof performance[v]=="function");class _ extends Error{}class y extends Error{}class x extends Error{constructor(P){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+P}}class b extends Error{constructor(P,E){super(),this.message="Failed to load static file for page: "+P+" "+E}}class C extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function j(v){return JSON.stringify({message:v.message,stack:v.stack})}}(or)),or}var mn={exports:{}},ar={},po;function Fc(){return po||(po=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"removeTrailingSlash",{enumerable:!0,get:function(){return t}});function t(n){return n.replace(/\/$/,"")||"/"}}(ar)),ar}var ir={},fo;function Fs(){return fo||(fo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"parsePath",{enumerable:!0,get:function(){return t}});function t(n){const s=n.indexOf("#"),o=n.indexOf("?"),a=o>-1&&(s<0||o<s);return a||s>-1?{pathname:n.substring(0,a?o:s),query:a?n.substring(o,s>-1?s:void 0):"",hash:s>-1?n.slice(s):""}:{pathname:n,query:"",hash:""}}}(ir)),ir}var ho;function qn(){return ho||(ho=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return o}});const n=Fc(),s=Fs(),o=a=>{if(!a.startsWith("/")||process.env.__NEXT_MANUAL_TRAILING_SLASH)return a;const{pathname:i,query:c,hash:l}=(0,s.parsePath)(a);return process.env.__NEXT_TRAILING_SLASH?/\.[^/]+\/?$/.test(i)?""+(0,n.removeTrailingSlash)(i)+c+l:i.endsWith("/")?""+i+c+l:i+"/"+c+l:""+(0,n.removeTrailingSlash)(i)+c+l};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(mn,mn.exports)),mn.exports}var cr={},pn={exports:{}},lr={},_o;function zc(){return _o||(_o=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"pathHasPrefix",{enumerable:!0,get:function(){return n}});const t=Fs();function n(s,o){if(typeof s!="string")return!1;const{pathname:a}=(0,t.parsePath)(s);return a===o||a.startsWith(o+"/")}}(lr)),lr}var go;function wf(){return go||(go=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return o}});const n=zc(),s=process.env.__NEXT_ROUTER_BASEPATH||"";function o(a){return(0,n.pathHasPrefix)(a,s)}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(pn,pn.exports)),pn.exports}var yo;function Bc(){return yo||(yo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isLocalURL",{enumerable:!0,get:function(){return s}});const t=Hn(),n=wf();function s(o){if(!(0,t.isAbsoluteUrl)(o))return!0;try{const a=(0,t.getLocationOrigin)(),i=new URL(o,a);return i.origin===a&&(0,n.hasBasePath)(i.pathname)}catch{return!1}}}(cr)),cr}var ur={},dr={},xo;function Rf(){return xo||(xo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getSortedRoutes",{enumerable:!0,get:function(){return n}});class t{insert(o){this._insert(o.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(o){o===void 0&&(o="/");const a=[...this.children.keys()].sort();this.slugName!==null&&a.splice(a.indexOf("[]"),1),this.restSlugName!==null&&a.splice(a.indexOf("[...]"),1),this.optionalRestSlugName!==null&&a.splice(a.indexOf("[[...]]"),1);const i=a.map(c=>this.children.get(c)._smoosh(""+o+c+"/")).reduce((c,l)=>[...c,...l],[]);if(this.slugName!==null&&i.push(...this.children.get("[]")._smoosh(o+"["+this.slugName+"]/")),!this.placeholder){const c=o==="/"?"/":o.slice(0,-1);if(this.optionalRestSlugName!=null)throw new Error('You cannot define a route with the same specificity as a optional catch-all route ("'+c+'" and "'+c+"[[..."+this.optionalRestSlugName+']]").');i.unshift(c)}return this.restSlugName!==null&&i.push(...this.children.get("[...]")._smoosh(o+"[..."+this.restSlugName+"]/")),this.optionalRestSlugName!==null&&i.push(...this.children.get("[[...]]")._smoosh(o+"[[..."+this.optionalRestSlugName+"]]/")),i}_insert(o,a,i){if(o.length===0){this.placeholder=!1;return}if(i)throw new Error("Catch-all must be the last part of the URL.");let c=o[0];if(c.startsWith("[")&&c.endsWith("]")){let m=function(f,p){if(f!==null&&f!==p)throw new Error("You cannot use different slug names for the same dynamic path ('"+f+"' !== '"+p+"').");a.forEach(h=>{if(h===p)throw new Error('You cannot have the same slug name "'+p+'" repeat within a single dynamic path');if(h.replace(/\W/g,"")===c.replace(/\W/g,""))throw new Error('You cannot have the slug names "'+h+'" and "'+p+'" differ only by non-word symbols within a single dynamic path')}),a.push(p)},l=c.slice(1,-1),u=!1;if(l.startsWith("[")&&l.endsWith("]")&&(l=l.slice(1,-1),u=!0),l.startsWith("...")&&(l=l.substring(3),i=!0),l.startsWith("[")||l.endsWith("]"))throw new Error("Segment names may not start or end with extra brackets ('"+l+"').");if(l.startsWith("."))throw new Error("Segment names may not start with erroneous periods ('"+l+"').");if(i)if(u){if(this.restSlugName!=null)throw new Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+o[0]+'" ).');m(this.optionalRestSlugName,l),this.optionalRestSlugName=l,c="[[...]]"}else{if(this.optionalRestSlugName!=null)throw new Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+o[0]+'").');m(this.restSlugName,l),this.restSlugName=l,c="[...]"}else{if(u)throw new Error('Optional route parameters are not yet supported ("'+o[0]+'").');m(this.slugName,l),this.slugName=l,c="[]"}}this.children.has(c)||this.children.set(c,new t),this.children.get(c)._insert(o.slice(1),a,i)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function n(s){const o=new t;return s.forEach(a=>o.insert(a)),o.smoosh()}}(dr)),dr}var mr={},pr={},fr={},hr={},vo;function Tf(){return vo||(vo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ensureLeadingSlash",{enumerable:!0,get:function(){return t}});function t(n){return n.startsWith("/")?n:"/"+n}}(hr)),hr}var _r={},bo;function Af(){return bo||(bo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}t(e,{DEFAULT_SEGMENT_KEY:function(){return o},PAGE_SEGMENT_KEY:function(){return s},isGroupSegment:function(){return n}});function n(a){return a[0]==="("&&a.endsWith(")")}const s="__PAGE__",o="__DEFAULT__"}(_r)),_r}var jo;function kf(){return jo||(jo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}t(e,{normalizeAppPath:function(){return o},normalizeRscURL:function(){return a}});const n=Tf(),s=Af();function o(i){return(0,n.ensureLeadingSlash)(i.split("/").reduce((c,l,u,m)=>!l||(0,s.isGroupSegment)(l)||l[0]==="@"||(l==="page"||l==="route")&&u===m.length-1?c:c+"/"+l,""))}function a(i){return i.replace(/\.rsc($|\?)/,"$1")}}(fr)),fr}var Co;function Uc(){return Co||(Co=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}t(e,{INTERCEPTION_ROUTE_MARKERS:function(){return s},extractInterceptionRouteInformation:function(){return a},isInterceptionRouteAppPath:function(){return o}});const n=kf(),s=["(..)(..)","(.)","(..)","(...)"];function o(i){return i.split("/").find(c=>s.find(l=>c.startsWith(l)))!==void 0}function a(i){let c,l,u;for(const m of i.split("/"))if(l=s.find(f=>m.startsWith(f)),l){[c,u]=i.split(l,2);break}if(!c||!l||!u)throw new Error(`Invalid interception route: ${i}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`);switch(c=(0,n.normalizeAppPath)(c),l){case"(.)":c==="/"?u=`/${u}`:u=c+"/"+u;break;case"(..)":if(c==="/")throw new Error(`Invalid interception route: ${i}. Cannot use (..) marker at the root level, use (.) instead.`);u=c.split("/").slice(0,-1).concat(u).join("/");break;case"(...)":u="/"+u;break;case"(..)(..)":const m=c.split("/");if(m.length<=2)throw new Error(`Invalid interception route: ${i}. Cannot use (..)(..) marker at the root level or one level up.`);u=m.slice(0,-2).concat(u).join("/");break;default:throw new Error("Invariant: unexpected marker")}return{interceptingRoute:c,interceptedRoute:u}}}(pr)),pr}var So;function Lf(){return So||(So=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isDynamicRoute",{enumerable:!0,get:function(){return s}});const t=Uc(),n=/\/\[[^/]+?\](?=\/|$)/;function s(o){return(0,t.isInterceptionRouteAppPath)(o)&&(o=(0,t.extractInterceptionRouteInformation)(o).interceptedRoute),n.test(o)}}(mr)),mr}var Eo;function Of(){return Eo||(Eo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(o,a){for(var i in a)Object.defineProperty(o,i,{enumerable:!0,get:a[i]})}t(e,{getSortedRoutes:function(){return n.getSortedRoutes},isDynamicRoute:function(){return s.isDynamicRoute}});const n=Rf(),s=Lf()}(ur)),ur}var gr={},yr={},Po;function Df(){return Po||(Po=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getRouteMatcher",{enumerable:!0,get:function(){return n}});const t=Hn();function n(s){let{re:o,groups:a}=s;return i=>{const c=o.exec(i);if(!c)return!1;const l=m=>{try{return decodeURIComponent(m)}catch{throw new t.DecodeError("failed to decode param")}},u={};return Object.keys(a).forEach(m=>{const f=a[m],p=c[f.pos];p!==void 0&&(u[m]=~p.indexOf("/")?p.split("/").map(h=>l(h)):f.repeat?[l(p)]:l(p))}),u}}}(yr)),yr}var xr={},vr={},No;function Mf(){return No||(No=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(q,K){for(var ge in K)Object.defineProperty(q,ge,{enumerable:!0,get:K[ge]})}t(e,{ACTION_SUFFIX:function(){return l},APP_DIR_ALIAS:function(){return k},CACHE_ONE_YEAR:function(){return v},DOT_NEXT_ALIAS:function(){return T},ESLINT_DEFAULT_DIRS:function(){return ie},GSP_NO_RETURNED_VALUE:function(){return oe},GSSP_COMPONENT_MEMBER_ERROR:function(){return ee},GSSP_NO_RETURNED_VALUE:function(){return le},INSTRUMENTATION_HOOK_FILENAME:function(){return S},MIDDLEWARE_FILENAME:function(){return P},MIDDLEWARE_LOCATION_REGEXP:function(){return E},NEXT_BODY_SUFFIX:function(){return f},NEXT_CACHE_IMPLICIT_TAG_ID:function(){return j},NEXT_CACHE_REVALIDATED_TAGS_HEADER:function(){return _},NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER:function(){return y},NEXT_CACHE_SOFT_TAGS_HEADER:function(){return h},NEXT_CACHE_SOFT_TAG_MAX_LENGTH:function(){return C},NEXT_CACHE_TAGS_HEADER:function(){return p},NEXT_CACHE_TAG_MAX_ITEMS:function(){return x},NEXT_CACHE_TAG_MAX_LENGTH:function(){return b},NEXT_DATA_SUFFIX:function(){return u},NEXT_INTERCEPTION_MARKER_PREFIX:function(){return s},NEXT_META_SUFFIX:function(){return m},NEXT_QUERY_PARAM_PREFIX:function(){return n},NON_STANDARD_NODE_ENV:function(){return w},PAGES_DIR_ALIAS:function(){return I},PRERENDER_REVALIDATE_HEADER:function(){return o},PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER:function(){return a},PUBLIC_DIR_MIDDLEWARE_CONFLICT:function(){return Q},ROOT_DIR_ALIAS:function(){return A},RSC_ACTION_CLIENT_WRAPPER_ALIAS:function(){return B},RSC_ACTION_ENCRYPTION_ALIAS:function(){return U},RSC_ACTION_PROXY_ALIAS:function(){return D},RSC_ACTION_VALIDATE_ALIAS:function(){return Y},RSC_MOD_REF_PROXY_ALIAS:function(){return O},RSC_PREFETCH_SUFFIX:function(){return i},RSC_SUFFIX:function(){return c},SERVER_PROPS_EXPORT_ERROR:function(){return ce},SERVER_PROPS_GET_INIT_PROPS_CONFLICT:function(){return $},SERVER_PROPS_SSG_CONFLICT:function(){return J},SERVER_RUNTIME:function(){return _e},SSG_FALLBACK_EXPORT_ERROR:function(){return W},SSG_GET_INITIAL_PROPS_CONFLICT:function(){return G},STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR:function(){return se},UNSTABLE_REVALIDATE_RENAME_ERROR:function(){return M},WEBPACK_LAYERS:function(){return R},WEBPACK_RESOURCE_QUERIES:function(){return Ie}});const n="nxtP",s="nxtI",o="x-prerender-revalidate",a="x-prerender-revalidate-if-generated",i=".prefetch.rsc",c=".rsc",l=".action",u=".json",m=".meta",f=".body",p="x-next-cache-tags",h="x-next-cache-soft-tags",_="x-next-revalidated-tags",y="x-next-revalidate-tag-token",x=128,b=256,C=1024,j="_N_T_",v=31536e3,P="middleware",E=`(?:src/)?${P}`,S="instrumentation",I="private-next-pages",T="private-dot-next",A="private-next-root-dir",k="private-next-app-dir",O="private-next-rsc-mod-ref-proxy",Y="private-next-rsc-action-validate",D="private-next-rsc-server-reference",U="private-next-rsc-action-encryption",B="private-next-rsc-action-client-wrapper",Q="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",$="You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.",J="You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps",se="can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props",ce="pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export",oe="Your `getStaticProps` function did not return an object. Did you forget to add a `return`?",le="Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?",M="The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.",ee="can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member",w='You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env',W="Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export",ie=["app","pages","components","lib","src"],_e={edge:"edge",experimentalEdge:"experimental-edge",nodejs:"nodejs"},N={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",api:"api",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser",appMetadataRoute:"app-metadata-route",appRouteHandler:"app-route-handler"},R={...N,GROUP:{serverOnly:[N.reactServerComponents,N.actionBrowser,N.appMetadataRoute,N.appRouteHandler,N.instrument],clientOnly:[N.serverSideRendering,N.appPagesBrowser],nonClientServerTarget:[N.middleware,N.api],app:[N.reactServerComponents,N.actionBrowser,N.appMetadataRoute,N.appRouteHandler,N.serverSideRendering,N.appPagesBrowser,N.shared,N.instrument]}},Ie={edgeSSREntry:"__next_edge_ssr_entry__",metadata:"__next_metadata__",metadataRoute:"__next_metadata_route__",metadataImageMeta:"__next_metadata_image_meta__"}}(vr)),vr}var br={},Io;function Ff(){return Io||(Io=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"escapeStringRegexp",{enumerable:!0,get:function(){return s}});const t=/[|\\{}()[\]^$+*?.-]/,n=/[|\\{}()[\]^$+*?.-]/g;function s(o){return t.test(o)?o.replace(n,"\\$&"):o}}(br)),br}var wo;function zf(){return wo||(wo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(_,y){for(var x in y)Object.defineProperty(_,x,{enumerable:!0,get:y[x]})}t(e,{getNamedMiddlewareRegex:function(){return h},getNamedRouteRegex:function(){return p},getRouteRegex:function(){return l},parseParameter:function(){return i}});const n=Mf(),s=Uc(),o=Ff(),a=Fc();function i(_){const y=_.startsWith("[")&&_.endsWith("]");y&&(_=_.slice(1,-1));const x=_.startsWith("...");return x&&(_=_.slice(3)),{key:_,repeat:x,optional:y}}function c(_){const y=(0,a.removeTrailingSlash)(_).slice(1).split("/"),x={};let b=1;return{parameterizedRoute:y.map(C=>{const j=s.INTERCEPTION_ROUTE_MARKERS.find(P=>C.startsWith(P)),v=C.match(/\[((?:\[.*\])|.+)\]/);if(j&&v){const{key:P,optional:E,repeat:S}=i(v[1]);return x[P]={pos:b++,repeat:S,optional:E},"/"+(0,o.escapeStringRegexp)(j)+"([^/]+?)"}else if(v){const{key:P,repeat:E,optional:S}=i(v[1]);return x[P]={pos:b++,repeat:E,optional:S},E?S?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}else return"/"+(0,o.escapeStringRegexp)(C)}).join(""),groups:x}}function l(_){const{parameterizedRoute:y,groups:x}=c(_);return{re:new RegExp("^"+y+"(?:/)?$"),groups:x}}function u(){let _=0;return()=>{let y="",x=++_;for(;x>0;)y+=String.fromCharCode(97+(x-1)%26),x=Math.floor((x-1)/26);return y}}function m(_){let{interceptionMarker:y,getSafeRouteKey:x,segment:b,routeKeys:C,keyPrefix:j}=_;const{key:v,optional:P,repeat:E}=i(b);let S=v.replace(/\W/g,"");j&&(S=""+j+S);let I=!1;(S.length===0||S.length>30)&&(I=!0),isNaN(parseInt(S.slice(0,1)))||(I=!0),I&&(S=x()),j?C[S]=""+j+v:C[S]=v;const T=y?(0,o.escapeStringRegexp)(y):"";return E?P?"(?:/"+T+"(?<"+S+">.+?))?":"/"+T+"(?<"+S+">.+?)":"/"+T+"(?<"+S+">[^/]+?)"}function f(_,y){const x=(0,a.removeTrailingSlash)(_).slice(1).split("/"),b=u(),C={};return{namedParameterizedRoute:x.map(j=>{const v=s.INTERCEPTION_ROUTE_MARKERS.some(E=>j.startsWith(E)),P=j.match(/\[((?:\[.*\])|.+)\]/);if(v&&P){const[E]=j.split(P[0]);return m({getSafeRouteKey:b,interceptionMarker:E,segment:P[1],routeKeys:C,keyPrefix:y?n.NEXT_INTERCEPTION_MARKER_PREFIX:void 0})}else return P?m({getSafeRouteKey:b,segment:P[1],routeKeys:C,keyPrefix:y?n.NEXT_QUERY_PARAM_PREFIX:void 0}):"/"+(0,o.escapeStringRegexp)(j)}).join(""),routeKeys:C}}function p(_,y){const x=f(_,y);return{...l(_),namedRegex:"^"+x.namedParameterizedRoute+"(?:/)?$",routeKeys:x.routeKeys}}function h(_,y){const{parameterizedRoute:x}=c(_),{catchAll:b=!0}=y;if(x==="/")return{namedRegex:"^/"+(b?".*":"")+"$"};const{namedParameterizedRoute:C}=f(_,!1);let j=b?"(?:(/.*)?)":"";return{namedRegex:"^"+C+j+"$"}}}(xr)),xr}var Ro;function Bf(){return Ro||(Ro=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"interpolateAs",{enumerable:!0,get:function(){return s}});const t=Df(),n=zf();function s(o,a,i){let c="";const l=(0,n.getRouteRegex)(o),u=l.groups,m=(a!==o?(0,t.getRouteMatcher)(l)(a):"")||i;c=o;const f=Object.keys(u);return f.every(p=>{let h=m[p]||"";const{repeat:_,optional:y}=u[p];let x="["+(_?"...":"")+p+"]";return y&&(x=(h?"":"/")+"["+x+"]"),_&&!Array.isArray(h)&&(h=[h]),(y||p in m)&&(c=c.replace(x,_?h.map(b=>encodeURIComponent(b)).join("/"):encodeURIComponent(h))||"/")})||(c=""),{params:f,result:c}}}(gr)),gr}var To;function Uf(){return To||(To=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return m}});const n=Oc(),s=Mc(),o=If(),a=Hn(),i=qn(),c=Bc(),l=Of(),u=Bf();function m(f,p,h){let _,y=typeof p=="string"?p:(0,s.formatWithValidation)(p);const x=y.match(/^[a-zA-Z]{1,}:\/\//),b=x?y.slice(x[0].length):y;if((b.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+y+"' passed to next/router in page: '"+f.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");const j=(0,a.normalizeRepeatedSlashes)(b);y=(x?x[0]:"")+j}if(!(0,c.isLocalURL)(y))return h?[y]:y;try{_=new URL(y.startsWith("#")?f.asPath:f.pathname,"http://n")}catch{_=new URL("/","http://n")}try{const j=new URL(y,_);j.pathname=(0,i.normalizePathTrailingSlash)(j.pathname);let v="";if((0,l.isDynamicRoute)(j.pathname)&&j.searchParams&&h){const E=(0,n.searchParamsToUrlQuery)(j.searchParams),{result:S,params:I}=(0,u.interpolateAs)(j.pathname,j.pathname,E);S&&(v=(0,s.formatWithValidation)({pathname:S,hash:j.hash,query:(0,o.omit)(E,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)}(dn,dn.exports)),dn.exports}var fn={exports:{}},jr={},Cr={},Ao;function $c(){return Ao||(Ao=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addPathPrefix",{enumerable:!0,get:function(){return n}});const t=Fs();function n(s,o){if(!s.startsWith("/")||!o)return s;const{pathname:a,query:i,hash:c}=(0,t.parsePath)(s);return""+o+a+i+c}}(Cr)),Cr}var ko;function $f(){return ko||(ko=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addLocale",{enumerable:!0,get:function(){return s}});const t=$c(),n=zc();function s(o,a,i,c){if(!a||a===i)return o;const l=o.toLowerCase();return!c&&((0,n.pathHasPrefix)(l,"/api")||(0,n.pathHasPrefix)(l,"/"+a.toLowerCase()))?o:(0,t.addPathPrefix)(o,"/"+a)}}(jr)),jr}var Lo;function Hf(){return Lo||(Lo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return s}});const n=qn(),s=function(o){for(var a=arguments.length,i=new Array(a>1?a-1:0),c=1;c<a;c++)i[c-1]=arguments[c];return process.env.__NEXT_I18N_SUPPORT?(0,n.normalizePathTrailingSlash)($f().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)}(fn,fn.exports)),fn.exports}var Sr={},Oo;function Hc(){return Oo||(Oo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RouterContext",{enumerable:!0,get:function(){return s}});const s=Le._(g).default.createContext(null);process.env.NODE_ENV!=="production"&&(s.displayName="RouterContext")}(Sr)),Sr}var Er={},Do;function qf(){return Do||(Do=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(u,m){for(var f in m)Object.defineProperty(u,f,{enumerable:!0,get:m[f]})}t(e,{AppRouterContext:function(){return o},GlobalLayoutRouterContext:function(){return i},LayoutRouterContext:function(){return a},MissingSlotContext:function(){return l},TemplateContext:function(){return c}});const s=Le._(g),o=s.default.createContext(null),a=s.default.createContext(null),i=s.default.createContext(null),c=s.default.createContext(null);process.env.NODE_ENV!=="production"&&(o.displayName="AppRouterContext",a.displayName="LayoutRouterContext",i.displayName="GlobalLayoutRouterContext",c.displayName="TemplateContext");const l=s.default.createContext(new Set)}(Er)),Er}var hn={exports:{}},_n={exports:{}},Mo;function qc(){return Mo||(Mo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}n(t,{cancelIdleCallback:function(){return o},requestIdleCallback:function(){return s}});const s=typeof self<"u"&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(a){let i=Date.now();return self.setTimeout(function(){a({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-i))}})},1)},o=typeof self<"u"&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(a){return clearTimeout(a)};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(_n,_n.exports)),_n.exports}var Fo;function Vf(){return Fo||(Fo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return u}});const n=g,s=qc(),o=typeof IntersectionObserver=="function",a=new Map,i=[];function c(m){const f={root:m.root||null,margin:m.rootMargin||""},p=i.find(x=>x.root===f.root&&x.margin===f.margin);let h;if(p&&(h=a.get(p),h))return h;const _=new Map,y=new IntersectionObserver(x=>{x.forEach(b=>{const C=_.get(b.target),j=b.isIntersecting||b.intersectionRatio>0;C&&j&&C(j)})},m);return h={id:f,observer:y,elements:_},i.push(f),a.set(f,h),h}function l(m,f,p){const{id:h,observer:_,elements:y}=c(p);return y.set(m,f),_.observe(m),function(){if(y.delete(m),_.unobserve(m),y.size===0){_.disconnect(),a.delete(h);const b=i.findIndex(C=>C.root===h.root&&C.margin===h.margin);b>-1&&i.splice(b,1)}}}function u(m){let{rootRef:f,rootMargin:p,disabled:h}=m;const _=h||!o,[y,x]=(0,n.useState)(!1),b=(0,n.useRef)(null),C=(0,n.useCallback)(v=>{b.current=v},[]);(0,n.useEffect)(()=>{if(o){if(_||y)return;const v=b.current;if(v&&v.tagName)return l(v,E=>E&&x(E),{root:f==null?void 0:f.current,rootMargin:p})}else if(!y){const v=(0,s.requestIdleCallback)(()=>x(!0));return()=>(0,s.cancelIdleCallback)(v)}},[_,p,f,y,b.current]);const j=(0,n.useCallback)(()=>{x(!1)},[]);return[C,y,j]}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(hn,hn.exports)),hn.exports}var gn={exports:{}},yn={exports:{}},Pr={},zo;function Wf(){return zo||(zo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"normalizeLocalePath",{enumerable:!0,get:function(){return t}});function t(n,s){let o;const a=n.split("/");return(s||[]).some(i=>a[1]&&a[1].toLowerCase()===i.toLowerCase()?(o=i,a.splice(1,1),n=a.join("/")||"/",!0):!1),{pathname:n,detectedLocale:o}}}(Pr)),Pr}var Bo;function Gf(){return Bo||(Bo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return n}});const n=(s,o)=>process.env.__NEXT_I18N_SUPPORT?Wf().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)}(yn,yn.exports)),yn.exports}var xn={exports:{}},Nr={},Uo;function Kf(){return Uo||(Uo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"detectDomainLocale",{enumerable:!0,get:function(){return t}});function t(n,s,o){if(n){o&&(o=o.toLowerCase());for(const c of n){var a,i;const l=(a=c.domain)==null?void 0:a.split(":",1)[0].toLowerCase();if(s===l||o===c.defaultLocale.toLowerCase()||(i=c.locales)!=null&&i.some(u=>u.toLowerCase()===o))return c}}}}(Nr)),Nr}var $o;function Xf(){return $o||($o=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"detectDomainLocale",{enumerable:!0,get:function(){return n}});const n=function(){for(var s=arguments.length,o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];if(process.env.__NEXT_I18N_SUPPORT)return Kf().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)}(xn,xn.exports)),xn.exports}var Ho;function Yf(){return Ho||(Ho=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return o}});const n=qn(),s=process.env.__NEXT_ROUTER_BASEPATH||"";function o(a,i,c,l){if(process.env.__NEXT_I18N_SUPPORT){const u=Gf().normalizeLocalePath,m=Xf().detectDomainLocale,f=i||u(a,c).detectedLocale,p=m(l,void 0,f);if(p){const h="http"+(p.http?"":"s")+"://",_=f===p.defaultLocale?"":"/"+f;return""+h+p.domain+(0,n.normalizePathTrailingSlash)(""+s+_+a)}return!1}else return!1}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(gn,gn.exports)),gn.exports}var vn={exports:{}},qo;function Qf(){return qo||(qo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return a}});const n=$c(),s=qn(),o=process.env.__NEXT_ROUTER_BASEPATH||"";function a(i,c){return(0,s.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH&&!c?i:(0,n.addPathPrefix)(i,o))}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(vn,vn.exports)),vn.exports}var bn={exports:{}},Vo;function Zf(){return Vo||(Vo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(h,_){for(var y in _)Object.defineProperty(h,y,{enumerable:!0,get:_[y]})}n(t,{ACTION_FAST_REFRESH:function(){return l},ACTION_NAVIGATE:function(){return o},ACTION_PREFETCH:function(){return c},ACTION_REFRESH:function(){return s},ACTION_RESTORE:function(){return a},ACTION_SERVER_ACTION:function(){return u},ACTION_SERVER_PATCH:function(){return i},PrefetchCacheEntryStatus:function(){return f},PrefetchKind:function(){return m},isThenable:function(){return p}});const s="refresh",o="navigate",a="restore",i="server-patch",c="prefetch",l="fast-refresh",u="server-action";var m;(function(h){h.AUTO="auto",h.FULL="full",h.TEMPORARY="temporary"})(m||(m={}));var f;(function(h){h.fresh="fresh",h.reusable="reusable",h.expired="expired",h.stale="stale"})(f||(f={}));function p(h){return h&&(typeof h=="object"||typeof h=="function")&&typeof h.then=="function"}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(bn,bn.exports)),bn.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return E}});const n=Le,s=r,o=n._(g),a=Uf(),i=Bc(),c=Mc(),l=Hn(),u=Hf(),m=Hc(),f=qf(),p=Vf(),h=Yf(),_=Qf(),y=Zf(),x=new Set;function b(S,I,T,A,k,O){if(typeof window>"u"||!O&&!(0,i.isLocalURL)(I))return;if(!A.bypassPrefetchedCheck){const D=typeof A.locale<"u"?A.locale:"locale"in S?S.locale:void 0,U=I+"%"+T+"%"+D;if(x.has(U))return;x.add(U)}(async()=>O?S.prefetch(I,k):S.prefetch(I,T,A))().catch(D=>{if(process.env.NODE_ENV!=="production")throw D})}function C(S){const T=S.currentTarget.getAttribute("target");return T&&T!=="_self"||S.metaKey||S.ctrlKey||S.shiftKey||S.altKey||S.nativeEvent&&S.nativeEvent.which===2}function j(S,I,T,A,k,O,Y,D,U){const{nodeName:B}=S.currentTarget;if(B.toUpperCase()==="A"&&(C(S)||!U&&!(0,i.isLocalURL)(T)))return;S.preventDefault();const G=()=>{const $=Y??!0;"beforePopState"in I?I[k?"replace":"push"](T,A,{shallow:O,locale:D,scroll:$}):I[k?"replace":"push"](A||T,{scroll:$})};U?o.default.startTransition(G):G()}function v(S){return typeof S=="string"?S:(0,c.formatUrl)(S)}const E=o.default.forwardRef(function(I,T){let A;const{href:k,as:O,children:Y,prefetch:D=null,passHref:U,replace:B,shallow:Q,scroll:G,locale:$,onClick:J,onMouseEnter:se,onTouchStart:ce,legacyBehavior:oe=!1,...le}=I;A=Y,oe&&(typeof A=="string"||typeof A=="number")&&(A=(0,s.jsx)("a",{children:A}));const M=o.default.useContext(m.RouterContext),ee=o.default.useContext(f.AppRouterContext),w=M??ee,W=!M,ie=D!==!1,_e=D===null?y.PrefetchKind.AUTO:y.PrefetchKind.FULL;if(process.env.NODE_ENV!=="production"){let F=function(z){return new Error("Failed prop type: The prop `"+z.key+"` expects a "+z.expected+" in `<Link>`, but got `"+z.actual+"` instead."+(typeof window<"u"?`
|
|
2
|
-
Open your browser's console to view the Component stack trace.`:""))};Object.keys({href:!0}).forEach(
|
|
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
|
|
4
|
-
Learn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor`);const ge=oe?K&&typeof K=="object"&&K.ref:T,[Re,je,ye]=(0,p.useIntersection)({rootMargin:"200px"}),Ae=o.default.useCallback(F=>{(q.current!==R||Ie.current!==N)&&(ye(),q.current=R,Ie.current=N),Re(F),ge&&(typeof ge=="function"?ge(F):typeof ge=="object"&&(ge.current=F))},[R,ge,N,ye,Re]);o.default.useEffect(()=>{process.env.NODE_ENV==="production"&&w&&(!je||!ie||b(w,N,R,{locale:$},{kind:_e},W))},[R,N,je,$,ie,M==null?void 0:M.locale,w,W,_e]);const Ce={ref:Ae,onClick(F){if(process.env.NODE_ENV!=="production"&&!F)throw new Error('Component rendered inside next/link has to pass click event to "onClick" prop.');!oe&&typeof J=="function"&&J(F),oe&&K.props&&typeof K.props.onClick=="function"&&K.props.onClick(F),w&&(F.defaultPrevented||j(F,w,N,R,B,Q,G,$,W))},onMouseEnter(F){!oe&&typeof se=="function"&&se(F),oe&&K.props&&typeof K.props.onMouseEnter=="function"&&K.props.onMouseEnter(F),w&&((!ie||process.env.NODE_ENV==="development")&&W||b(w,N,R,{locale:$,priority:!0,bypassPrefetchedCheck:!0},{kind:_e},W))},onTouchStart:process.env.__NEXT_LINK_NO_TOUCH_START?void 0:function(pe){!oe&&typeof ce=="function"&&ce(pe),oe&&K.props&&typeof K.props.onTouchStart=="function"&&K.props.onTouchStart(pe),w&&(!ie&&W||b(w,N,R,{locale:$,priority:!0,bypassPrefetchedCheck:!0},{kind:_e},W))}};if((0,l.isAbsoluteUrl)(R))Ce.href=R;else if(!oe||U||K.type==="a"&&!("href"in K.props)){const F=typeof $<"u"?$:M==null?void 0:M.locale,pe=(M==null?void 0:M.isLocaleDomain)&&(0,h.getDomainLocale)(R,F,M==null?void 0:M.locales,M==null?void 0:M.domainLocales);Ce.href=pe||(0,_.addBasePath)((0,u.addLocale)(R,F,M==null?void 0:M.defaultLocale))}return oe?o.default.cloneElement(K,Ce):(0,s.jsx)("a",{...le,...Ce,children: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)})(ts,ts.exports);var Jf=ts.exports,eh=Jf;const Fe=H.getDefaultExportFromCjs(eh),th="_link_w24h0_1",nh="_wrapper_w24h0_98",rh="_text_w24h0_106",Ir={link:th,wrapper:nh,text:rh},ze=({children:e,adornments:t,className:n,disableUnderline:s,href:o,mode:a,size:i,title:c,onClick:l,disablePadding:u,...m})=>{const f=d.helpers.ValidateProp({fieldTypes:Lt.SizesSmallExtended,property:i,fallback:"medium"}),p=d.helpers.ValidateProp({fieldTypes:Lt.Mode,property:a,fallback:"default"});return r.jsx(Fe,{...m,className:d.helpers.classNameConcat(Ir.link,n),href:o&&o.length>0?o:"#","data-size":f,"data-variant":p,title:c||"NextLink","data-disable-underline":s??!1,"data-disable-padding":u??!0,children:r.jsxs("div",{className:Ir.wrapper,onClick:l,children:[t==null?void 0:t.start,r.jsx("p",{className:Ir.text,"data-size":f,children:e}),t==null?void 0:t.end]})})},sh=({ICONS:e})=>{const{resetFeedback:t}=Nt();return r.jsxs("div",{className:Kt["wishlist--snack--actions"],children:[r.jsx(ze,{href:"/favoritos",children:"Ver Favoritos"}),r.jsx(d.Button,{variant:"tertiary",size:"small",onClick:t,adornment:{start:r.jsx(d.Icon,{name:e.close})}})]})},zs=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:n})=>{const s=Ss(),{resetFeedback:o}=Nt(),a=g.useRef(null);return g.useEffect(()=>{a.current&&clearTimeout(a.current),s&&(a.current=setTimeout(()=>{o()},5e3))},[s,o]),(s==null?void 0:s.active)&&r.jsx(Ot,{Z_INDEX_WAR:n,className:Kt["wishlist--snack"],"data-action":s.action,title:s.action==="add"?e.messages.add:e.messages.remove,supportChildren:r.jsx(sh,{ICONS:t}),size:"medium"})};zs.displayName="WishList.Feedback";const Bs={"product-list--banner":"_product-list--banner_sfibj_1","product-list--card":"_product-list--card_sfibj_30","product-list":"_product-list_sfibj_1"},Vc=({className:e,children:t,columns:n=1,isMobile:s=!1,gap:o=8,position_grid:a,totalColumns:i=4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,...l})=>{const u=g.useMemo(()=>n%i===0?"initial":s||n<2?c:c.split("/").reverse().join("/"),[n,i,s]);return r.jsx("div",{...l,className:d.helpers.classNameConcat(Bs["product-list--banner"],e),style:{aspectRatio:u,maxWidth:`${n/i*100}%`,order:a,padding:o/2},children:t})};Vc.displayName="ProductList.Banner";class oh{constructor(){gt(this,"cache",new Map);gt(this,"pendingRequests",new Map);gt(this,"rafId",null)}request(t,n,s){const o=this.getCacheKey(t,s==null?void 0:s.filterTexture);if(this.cache.has(o)){n(this.cache.get(o));return}const a=this.pendingRequests.get(o);a?a.callbacks.push(n):this.pendingRequests.set(o,{productId:t,callbacks:[n],filterTexture:s.filterTexture,storeId:s.storeId}),this.rafId===null&&(this.rafId=requestAnimationFrame(()=>this.executeGroup()))}getCacheKey(t,n){return n!=null&&n.length?`${t}|${n.sort().join(",")}`:t}async executeGroup(){this.rafId=null;const t=this.pendingRequests;if(t.size===0)return;const n=[],s=[];if(t.forEach((a,i)=>{this.cache.has(i)?s.push([i,a]):n.push(a)}),s.forEach(([a,i])=>{const c=this.cache.get(a);c&&i.callbacks.forEach(l=>l(c)),t.delete(a)}),n.length===0)return;const o=new Map;n.forEach(a=>{var l;const i=((l=a.filterTexture)==null?void 0:l.sort().join(","))||"no-filter",c=o.get(i)||[];c.push(a),o.set(i,c)}),await Promise.all(Array.from(o.values()).map(a=>this.executeGroupRequest(a)))}async executeGroupRequest(t){const n=t.map(i=>i.productId),s=t[0].filterTexture,a=`https://${t[0].storeId}.myvtex.com/_v/get-similars`;try{const i=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:n})});if(!i.ok)throw new Error("Erro ao buscar similares.");const c=await i.json();t.forEach(l=>{const u=c[l.productId]||[],m=s&&u.length?H.formattedSimilars(u,s):u,f=this.getCacheKey(l.productId,s);this.cache.set(f,m),l.callbacks.forEach(p=>p(m)),this.pendingRequests.delete(f)})}catch(i){console.error("Erro ao buscar similares:",i),t.forEach(c=>{const l=this.getCacheKey(c.productId,s);c.callbacks.forEach(u=>u([])),this.pendingRequests.delete(l)})}}clearCache(){this.cache.clear()}}const Wo=new oh;function Wc(e,t){const[n,s]=g.useState([]),o=g.useRef(!1);g.useEffect(()=>{o.current=!1},[e]);const a=g.useCallback(()=>{!e||o.current||(o.current=!0,Wo.request(e,s,t))},[e,t]),i=g.useCallback(()=>Wo.clearCache(),[]);return{items:n,loadSimilars:a,clearCache:i}}const Gc=({isKit:e,parent:t,productId:n,setNotify:s,CONSTANTS:o})=>{const{router:a}=ue(),{items:i,loadSimilars:c}=Wc(n,{filterTexture:o.TEXTURE_IMAGE,storeId:o.storeId}),l=g.useRef(!1),u=g.useRef(null),m=h=>a.push(h??""),f=g.useCallback(h=>{!n||!h||c()},[n,c]),p=g.useCallback((h,_)=>{if(!h.isIntersecting){o.PLP_INFINITE_SCROLL&&u.current&&(clearTimeout(u.current),u.current=null);return}if(h.intersectionRatio>=_.threshold&&!l.current){if(o.PLP_INFINITE_SCROLL){u.current=setTimeout(()=>{f(!0)},o.PLP_PRODUCT_SIMILAR_DELAY);return}f(!0)}},[f]);return g.useEffect(()=>{if(e||!t.current)return;const h={root:null,threshold:.1},_=new IntersectionObserver(([y])=>{p(y,h)},h);return _.observe(t.current),()=>{u.current&&clearTimeout(u.current),_.disconnect()}},[p,t,e]),r.jsx(fe.Actions,{data:i,callback:m,isKit:e,children:!e&&r.jsx(fe.SizeSelector,{setNotify:s,PLP_SIZE_ORDER:o.PLP_SIZE_ORDER})})};Gc.displayName="ProductList.Card.Actions";const Kc=({className:e,children:t,gap:n=32,item:s,isMobile:o,order:a,tag:i,hasMaxWidth:c=!0,index:l,setSkuSelected:u,showVideo:m,CONSTANTS:f,...p})=>{const h=g.useRef(null),{availability:{status:_}}=s,y=g.useCallback((b,C)=>{var j;typeof u=="function"&&u((j=b.isVariantOf)==null?void 0:j.hasVariant,C)},[u]),x=s.name.substring(0,4).toLowerCase()==="kit ";return r.jsxs("div",{...p,className:d.helpers.classNameConcat(Bs["product-list--card"],e),"data-mobile":o,"data-order":a,ref:h,style:{...c&&{maxWidth:o?"50%":"25%"},order:a,padding:n/2},children:[r.jsxs(fe.Root,{item:s,isMobile:o,index:l,size:o?"small":"medium",order:a,outStock:!_,CONSTANTS:f,children:[r.jsx(fe.Header,{product:s,tag:i==null?void 0:i.commercial}),r.jsx(fe.Media,{showVideo:m,hasPriority:!0}),r.jsxs(fe.Wrapper,{type:"body",children:[r.jsx(fe.Title,{tag:i==null?void 0:i.institucional}),r.jsx(Gc,{productId:s.isVariantOf.productGroupID,parent:h,setNotify:y,isKit:x,CONSTANTS:f}),!x&&r.jsx(fe.OutStock,{callback:y})]}),r.jsx(fe.Wrapper,{type:"footer",children:_&&r.jsx(fe.BuyButton,{isKit:x})})]}),t]})};Kc.displayName="ProductList.Card";const Xc=({children:e,className:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(Bs["product-list"],t),children:e});Xc.displayName="ProductList.Grid";const at={Banner:Vc,Card:Kc,Root:Xc,helpers:Sp},ah="_pdc_alo7z_1",Xe={"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:ah},Us=({className:e,ICONS:t,PLP_NOT_RESULT:n})=>{const{router:s}=ue(),{isMobile:o}=re(),a=()=>{s.push(n==null?void 0:n.link)};return r.jsxs("div",{className:d.helpers.classNameConcat(Xe["pdc--empty"],e),children:[r.jsxs(d.TextStructure.DivWrapper,{className:Xe["pdc--empty-wrapper"],children:[r.jsx("span",{className:o?"typography-style-body-md":"typography-style-heading-sm",children:n.title}),r.jsx("p",{className:o?"typography-style-body-xs":"typography-style-body-sm",children:n.subtitle})]}),r.jsx(d.Button,{adornment:{end:r.jsx(d.Icon,{name:t.arrow_right})},className:"typography-style-body-sm-strong",onClick:()=>a(),variant:"tertiary",children:r.jsx("b",{children:n.text})})]})};Us.displayName="PDC.Empty";const Vn=e=>r.jsx("div",{...e,className:Xe["pdc--infinite--next-page"],children:r.jsx(d.Spinner,{className:Xe["pdc--infinite--next-page--spinner"]})});Vn.displayName="PDC.Spinner";function Yc({CONSTANTS:e}){const{sendDataLayerEvent:t}=ae(),{isMobile:n}=re(),{getAvailableProductTag:s}=_t(),[o,a]=g.useState([]),[i,c]=g.useState(!0),l=Bt(),u=l.join(","),m=n?16:32;return g.useEffect(()=>{const f=async()=>{l.length?await fetch("/api/wishlist/products",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({productIds:l})}).then(p=>p.json()).then(p=>{a(p),t({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:p}}})}).catch(p=>console.error(p)):a([]),c(!1)};if(l.length){f();return}if(l.length===0&&o.length===0){c(!1);return}a([]),c(!1)},[u]),r.jsx("section",{className:Kt["wishlist-grid"],children:r.jsxs("div",{className:Kt["wishlist-grid--container"],children:[i&&r.jsx(Vn,{}),!l.length&&!(o!=null&&o.length)&&!i&&r.jsx(Us,{className:Kt["pdc-empty-modifier"],ICONS:e.ICONS,PLP_NOT_RESULT:e.WISHLIST_NOT_RESULT}),r.jsx(at.Root,{children:Array.isArray(o)&&o.map((f,p)=>{const h=f.node.cluster.highlights||[],_=s(h);return r.jsx(at.Card,{gap:m,isMobile:n??!1,item:f.node,tag:_,index:p,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,MAIN_IMAGE:e.MAIN_IMAGE,PLP_GRID_SCROLL_BACK:e.PLP_GRID_SCROLL_BACK,PLP_INFINITE_SCROLL:e.PLP_INFINITE_SCROLL,PLP_SIZE_ORDER:e.PLP_SIZE_ORDER,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:e.PLP_SHOW_VIDEO_ON_PRODUCT_CARD,PLP_PRODUCT_SIMILAR_DELAY:e.PLP_PRODUCT_SIMILAR_DELAY,PRODUCT_CARD_IMAGE_ASPECT_RATIO:e.PRODUCT_CARD_IMAGE_ASPECT_RATIO,PRODUCT_CARD_TEXTS:e.PRODUCT_CARD_TEXTS,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:e.PRODUCT_CARD_TOP_WISHLIST_TOGGLE,PRODUCT_IMAGE_DIMENSIONS:e.PRODUCT_IMAGE_DIMENSIONS,SECOND_IMAGE:e.SECOND_IMAGE,StoreConfig_MainSellerId:e.StoreConfig_MainSellerId,TEXTURE_IMAGE:e.TEXTURE_IMAGE,Z_INDEX_WAR:e.Z_INDEX_WAR,ICONS:e.ICONS,storeId:e.storeId}},f.node.sku)})})]})})}Yc.displayName="Wishlist.Grid";const ih=e=>e.map(t=>{var n;return(n=t.isVariantOf)==null?void 0:n.productGroupID})??[],Qc=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:n})=>{const s=Ut(),o=Bt(),a=Ss(),{updateList:i}=Nt();return g.useEffect(()=>{var l,u;a.active&&tt.set("fs::wishlist",o);const c=async()=>{var m;await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:o,docId:(m=s==null?void 0:s.user)==null?void 0:m.id})}).catch(f=>{console.error("Error updating wishlist:",f)})};a.active&&((l=s.user)!=null&&l.id)&&o.length!==((u=s.wishlist)==null?void 0:u.length)&&c()},[a,s,o]),g.useEffect(()=>{var u;const c=async()=>{const m=await tt.get("fs::wishlist");m&&(m==null?void 0:m.length)!==o.length&&i(m)},l=async()=>{var h;const m=await tt.get("fs::wishlist")??[],f=s.wishlist?typeof s.wishlist[0]=="object"?ih(s.wishlist):s.wishlist:[],p=[...new Set([...m,...f])];i(p),tt.set("fs::wishlist",o),f.length!==p.length&&await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:p,docId:(h=s.user)==null?void 0:h.id})}).catch(_=>{console.error("Error updating wishlist:",_)})};if((u=s.user)!=null&&u.id){l();return}c()},[s,i,o]),r.jsx(zs,{ICONS:t,Z_INDEX_WAR:n,WISHLIST_INFO:e})};Qc.displayName="Wishlist.Init";const Zc=({product:e,priceInfo:t,size:n="medium",style:s,ICONS:o})=>{const{sendDataLayerEvent:a,currentLocalRef:i}=ae(),c=Bt(),{toggleProduct:l}=Nt(),{isVariantOf:{productGroupID:u}}=e;return r.jsx(d.Button,{adornment:{start:r.jsx(d.Icon,{size:n,name:c.includes(u)?o.favorite_true:o.favorite_false})},onClick:()=>{l(u),a({functionKey:"productEvents",data:{event:c.includes(u)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:i.current},commonData:{...e,...t}}})},style:{...s,border:"none"},variant:"tertiary"})};Zc.displayName="WishList.Toggle";const Jc={Feedback:zs,Toggle:Zc,Grid:Yc,Init:Qc},el=({product:e,tag:t,size:n="small"})=>{const{CONSTANTS:s}=Ye(),{tags:o}=_t(),a=e.offers.offers[0],i=H.getDiscountPercent(a.listPrice,a.price),c=o==null?void 0:o.flagDiscount;return r.jsxs(fe.Wrapper,{type:"header",style:{zIndex:s.Z_INDEX_WAR.product_card_header},children:[i>0&&!t&&(c==null?void 0:c.enableTag)&&r.jsxs(d.Tag,{title:`${i}% ${c==null?void 0:c.tagText}`,variant:"quaternary",size:"small",style:{background:c==null?void 0:c.tagColor,color:c==null?void 0:c.tagTextColor},children:[i,"% ",c==null?void 0:c.tagText]}),t?r.jsx(d.Tag,{title:t.value,adornment:{start:t.enableIcon&&t.icon?r.jsx(d.Icon,{name:t.icon,size:"small",style:{color:t.iconColor}}):null},size:n,variant:"quaternary",style:{background:t.tagColor,color:t.textColor},children:t.value}):null,s.PRODUCT_CARD_TOP_WISHLIST_TOGGLE&&r.jsx(Jc.Toggle,{product:e,priceInfo:{price:a.price,listPrice:a.listPrice},variant:"card",ICONS:s.ICONS})]})};el.displayName="ProductCard.Actions.Header";const tl=({className:e,children:t,hasPriority:n=!1,showVideo:s=!1,...o})=>{const{element:a,index:i,item:{image:c,slug:l,video:u},sendSelectItemEvent:m,order:f,CONSTANTS:p}=Ye(),h=H.getFirstImages({images:c,label:{first:p.MAIN_IMAGE,second:p.SECOND_IMAGE}});return r.jsxs("div",{...o,className:d.helpers.classNameConcat(Te["product-card--image"],e),ref:a,style:{aspectRatio:p.PRODUCT_CARD_IMAGE_ASPECT_RATIO},children:[r.jsx(Fe,{href:`/${l}/p`,onClick:m,onMouseUp:_=>{_.button===1&&m(),p.PLP_INFINITE_SCROLL&&sessionStorage.setItem(p.PLP_GRID_SCROLL_BACK.order,String(f))},children:r.jsx("div",{className:Te["product-card--image--container"],children:Array.isArray(h)&&h.map(({url:_,alternateName:y},x)=>g.createElement(we.Image,{...p.PRODUCT_IMAGE_DIMENSIONS.product_card,style:p.PRODUCT_IMAGE_DIMENSIONS.product_card,alt:y??"product image",key:x,...n&&{priority:x===0&&i<4},objectFit:"cover",src:_}))})}),p.PLP_SHOW_VIDEO_ON_PRODUCT_CARD&&s&&u&&r.jsx(fe.Video,{url:u,poster:h[0].url}),t]})};tl.displayName="ProductCard.Media.Media";const nl=({className:e,callback:t,children:n,...s})=>{const{isMobile:o,item:a,CONSTANTS:{PRODUCT_CARD_TEXTS:i}}=Ye(),{availability:{status:c}}=a;return c?null:r.jsxs("div",{...s,className:d.helpers.classNameConcat(Te["product-card--outstock"],e),children:[r.jsx(d.Tag,{size:"small",variant:"secondary",title:i.disabled,children:i.disabled}),r.jsx(d.Button,{className:d.helpers.classNameConcat(e,"buy-button"),size:o?"medium":"large",variant:"quaternary",onClick:()=>{typeof t=="function"&&t(a)},children:i.notify})]})};nl.displayName="ProductCard.OutStock";const rl=({children:e,className:t="",index:n,isMobile:s=!1,item:o,size:a,order:i,outStock:c,shelfTitle:l,CONSTANTS:u,...m})=>r.jsx(Sf,{item:o,isMobile:s,outStock:c,order:i,size:a,index:n,shelfTitle:l,CONSTANTS:u,children:r.jsx("div",{...m,className:d.helpers.classNameConcat(Te["product-card--wrapper"],t),"data-size":a,children:e})});rl.displayName="ProductCard.Root";const sl=({disabled:e,label:t,size:n,value:s,onClick:o,...a})=>r.jsxs(d.ToggleSize.Wrapper,{...a,disabled:!1,outOfStock:e,size:n,onClick:o,children:[r.jsx(d.ToggleSize.DisabledAdornment,{}),r.jsx(d.ToggleSize.Text,{children:t})]});sl.displayName="ProductCard.SizeSelector.Item";const ol=({active:e=!1,callback:t,selectedSku:n=null,item:s,setNotify:o})=>{const{item:a,isMobile:i,setSelectedSku:c,eventDataRef:l}=Ye();s.productId=a.id;const u=H.disableSKU(s),m=H.getSKUName(s,"tamanho");!u&&!l.current.availableSkus.includes(m)&&l.current.availableSkus.push(m);const f=g.useCallback(h=>{const _=n===h?null:h;typeof c=="function"&&c(_),typeof t=="function"&&t(_)},[t,c,n]),p=g.useCallback(()=>{if(u&&typeof o=="function"){o(a,s);return}f(s)},[s,o,f,u,a]);return r.jsx(sl,{active:e,disabled:u,label:m,onClick:()=>p(),size:i?"x-small":"small",value:s})};ol.displayName="ProductCard.SizeSelector.SkuItem";const al=({items:e,getLabel:t,PLP_SIZE_ORDER:n})=>Array.isArray(e)?[...e].sort((s,o)=>{const a=t(s).toUpperCase(),i=t(o).toUpperCase(),c=n.indexOf(a)-n.indexOf(i);return c!==0?c:a.localeCompare(i,"pt-BR")}):[],il=({callback:e,className:t="",children:n,setNotify:s,PLP_SIZE_ORDER:o,...a})=>{const{isMobile:i,item:{isVariantOf:{hasVariant:c}},selectedSku:l}=Ye(),u=g.useMemo(()=>Array.isArray(c)?al({items:c,getLabel:m=>H.getSKUName(m,"tamanho"),PLP_SIZE_ORDER:o}):[],[c]);return r.jsxs("div",{...a,className:d.helpers.classNameConcat(Te["product-card--selectors--size"],t),"data-mobile":i,children:[r.jsx("div",{className:Te["product-card--selectors--size--skus"],children:u.map((m,f)=>r.jsx(ol,{active:l===m,callback:e,item:m,selectedSku:l,setNotify:s},`size--${f}--${m.sku}`))}),r.jsx("div",{className:Te["product-card--selectors--size--button"],children:n})]})};il.displayName="ProductCard.SizeSelector";const ns=({alt:e="",callback:t,more:n,total:s=4,src:o,url:a,...i})=>r.jsxs(d.ToggleStyle.Wrapper,{...i,onClick:()=>{typeof t=="function"&&t(a)},children:[r.jsx(d.ToggleStyle.DisabledAdornment,{}),r.jsxs(d.ToggleStyle.Texture,{children:[o&&r.jsx(we.Image,{alt:e??o,src:o,height:34,width:34}),n&&r.jsx(d.TextStructure.DivWrapper,{className:Te["product-card--selectors--style--more"],children:r.jsxs("p",{children:["+ ",s]})})]})]}),ch=({children:e,callback:t,data:n,total:s=4,size:o,...a})=>{const{index:i}=Ye(),{triggerSelectItemEventRef:c}=ae();return r.jsxs("div",{...a,children:[e,Array.isArray(n)&&n.slice(0,s).map((l,u)=>r.jsx(ns,{callback:m=>{c.current.trigger=!0,c.current.index=i,typeof t=="function"&&t(m)},src:(l==null?void 0:l.textureImage)??"",alt:l==null?void 0:l.textureAlt,url:l==null?void 0:l.slug,size:o},u)),Array.isArray(n)&&(n==null?void 0:n.length)>s&&r.jsx(ns,{size:o,total:n.length-s,more:!0})]})},cl=({callback:e,className:t,data:n,images:s=[],findTexture:o,...a})=>{const{CONSTANTS:i}=Ye(),c=o||i.TEXTURE_IMAGE,l=s==null?void 0:s.find(u=>c.includes(u.alternateName));return r.jsx(ch,{...a,callback:e,className:d.helpers.classNameConcat(Te["product-card--selectors--style"],t),data:n,size:"x-small",children:l&&r.jsx(ns,{active:!0,size:"x-small",src:l.url})})};cl.displayName="ProductCard.StyleSelector";const ll=({className:e,hasDecimal:t,...n})=>{const{isMobile:s,item:{offers:{lowPrice:o,highPrice:a},installments:{count:i,value:c}},eventDataRef:l}=Ye();l.current.priceInfo={price:o,listPrice:a};const u=H.formatPriceToCurrency(a,t),m=H.formatPriceToCurrency(o,t),f=H.formatPriceToCurrency(c??0),p=s?"horizontal":"stacked";return r.jsx("div",{...n,className:d.helpers.classNameConcat(Te["product-card--price"],e),"data-mobile":s,children:r.jsx(d.ProductInfo.Root,{size:"small",layout:p,children:r.jsxs(d.ProductInfo.Wrapper,{size:"small",layout:p,children:[r.jsx(d.ProductInfo.ValuesWrapper,{children:m!==u?r.jsxs(r.Fragment,{children:[r.jsx(d.ProductInfo.Price,{label:"originalPrice",value:u,size:"small"}),r.jsx(d.ProductInfo.Price,{label:"discountPrice",value:m,size:"small"})]}):r.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:m,size:"small"})}),i&&i>1&&c?r.jsx(d.ProductInfo.Price,{label:"installment",value:`${i}x ${f}`,size:"small"}):null]})})})};ll.displayName="ProductCard.Price";const ul=({tag:e,className:t})=>{const{item:{name:n}}=Ye();return r.jsxs("div",{className:d.helpers.classNameConcat(Te["product-card--title"],t),children:[r.jsx("div",{className:Te["product-card--title--tag"],children:e?r.jsx(d.Tag,{size:"small",title:e.value,variant:"quaternary",adornment:{start:e.enableIcon&&e.icon?r.jsx(d.Icon,{name:e.icon,style:{color:e.iconColor}}):null},style:{background:e.tagColor,color:e.textColor},children:e.value}):r.jsx("div",{})}),r.jsx("div",{className:Te["product-card--title--content"],children:n&&r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h3",{children:n})})})})]})};ul.displayName="ProductCard.Title";const dl=({className:e,url:t,poster:n,...s})=>{const{element:o}=Ye();return g.useEffect(()=>{if(!(o!=null&&o.current))return;const a=o.current,i=a.querySelector("video");if(i){const c=new IntersectionObserver(m=>{m.forEach(f=>{H.setVideoPlay(f.isIntersecting,i,t)})},{root:null,rootMargin:"0px",threshold:.5}),l=()=>{i.setAttribute("data-loaded","true")},u=()=>{a&&(c.observe(a),i.addEventListener("loadeddata",l))};return document.readyState==="complete"?u():window.addEventListener("load",u),()=>{c.disconnect(),window.removeEventListener("load",u)}}return()=>null},[t,o]),r.jsx("div",{...s,className:d.helpers.classNameConcat(Te["product-card--video"],e),children:t&&r.jsx(we.Video,{autoPlay:!1,muted:!0,loop:!0,preload:"none",playsInline:!0,poster:n})})};dl.displayName="ProductCard.Media.Video";const ml=({children:e,className:t,type:n,...s})=>r.jsx("div",{...s,className:d.helpers.classNameConcat(Te[`product-card--${n}`],t),children:e});ml.displayName="ProductCard.Wrapper";const fe={Actions:kc,BuyButton:Lc,Header:el,Media:tl,Root:rl,OutStock:nl,Price:ll,SizeSelector:il,StyleSelector:cl,Title:ul,Video:dl,Wrapper:ml},lh="_carousel_1egdv_1",uh="_shelf__container_1egdv_14",dh="_shelf_without_carousel_1egdv_34",mh="_card_container_1egdv_57",kt={carousel:lh,"custom-controllers":"_custom-controllers_1egdv_5",shelf__container:uh,"controllers-arrows-bullets":"_controllers-arrows-bullets_1egdv_23",shelf_without_carousel:dh,card_container:mh},Go=({title:e})=>r.jsx("div",{className:kt.shelf__container,children:e&&r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("h2",{className:d.helpers.classNameConcat("typography-style-body-md",H.responsive["responsive-mobile-flex"]),children:e}),r.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-md",H.responsive["responsive-desktop-flex"]),children:e})]})})}),ph=({children:e,ICONS:t,itemsPerPage:n,title:s})=>{const{isMobile:o}=re(),a=n[o?"mobile":"desktop"],{initialize:i,controller:c,itemsStyles:l,pagination:u}=d.Carousel.useCarousel({itemsPerPage:a,gap:10,loop:!0,direction:"row"}),m=g.Children.toArray(e).length;return o||m>=4?r.jsxs(d.Carousel.Root,{innerRef:p=>{i(p)},className:kt.carousel,children:[r.jsxs("div",{className:kt["custom-controllers"],children:[s&&r.jsx(Go,{title:s}),a<m&&r.jsxs(d.Carousel.Controller,{className:kt["controllers-arrows-bullets"],children:[r.jsxs(d.Carousel.Arrows,{children:[r.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:r.jsx(d.Icon,{name:t.arrow_left})}}),r.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:r.jsx(d.Icon,{name:t.arrow_right})}})]}),!o&&a>2&&r.jsx(d.Carousel.Bullets,{page:u.currentPage,total:u.totalPages,onBulletClick:p=>c==null?void 0:c.navigateTo(p)})]})]}),r.jsx(d.Carousel.Body,{children:g.Children.map(e,(p,h)=>r.jsx(d.Carousel.Item,{style:{...l,overflow:"hidden"},children:p},`${s}_${h}`))})]}):r.jsxs(r.Fragment,{children:[s&&r.jsx(Go,{title:s}),r.jsx("div",{className:kt.shelf_without_carousel,children:e})]})},pl=({className:e,item:t,isMobile:n,size:s,shelfTitle:o,...a})=>{const i=g.useRef(null),{getAvailableProductTag:c}=_t(),{availability:{status:l}}=t,u=f=>{const p=f.filter(h=>!a.CONSTANTS.TEXTURE_IMAGE.includes(h.keywords));return n?p.splice(0,2):p},m=c(t.cluster.highlights);return r.jsx("div",{ref:i,className:kt.card_container,children:r.jsxs(fe.Root,{...a,item:{...t,image:u(t.image)},isMobile:n,size:n?"small":"medium",outStock:!l,shelfTitle:o,children:[r.jsx(fe.Header,{product:t,tag:m==null?void 0:m.commercial}),r.jsx(fe.Media,{}),r.jsxs(fe.Wrapper,{type:"body",children:[r.jsx(fe.Title,{tag:m==null?void 0:m.institucional}),r.jsx(fe.Actions,{})]}),r.jsx(fe.Wrapper,{type:"footer"})]})})};pl.displayName="ProductList.Card";const Qt={Shelf:ph,Card:pl},fl=({CONSTANTS:e,inView:t,products:n,innerRef:s})=>{const o=g.useMemo(()=>jf(n),[n]),{isMobile:a}=re(),{addItemsToCart:i}=be(),{sendDataLayerEvent:c}=ae(),{getAvailableProductTag:l}=_t(),[u,m]=g.useState({totalPrice:0,products:{}}),f=()=>{const h=Object.values(u.products);i(h),c({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:h.map(_=>{const y=o.find(x=>x.node.id===_.productId);return y==null?void 0:y.node})},supportData:{selectedSkus:h,price:u.totalPrice}}})},p=({selectedProduct:h,productId:_})=>{const y=Cf({selectedProduct:h,productId:_,prevState:u,mainSellerId:e.StoreConfig_MainSellerId});m(y)};return g.useEffect(()=>{if(!t||o.length===0)return;const h=e.BUY_PACKAGE.header.title;c({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o},customData:{item_list_name:h},outsideEcommerceData:{item_list_name:h}}})},[t]),r.jsxs("div",{className:pt.container,ref:s,children:[r.jsx("div",{className:pt["carousel-container"],style:{width:o.length<=3?"max-content":"75%"},children:r.jsx(Qt.Shelf,{title:e.BUY_PACKAGE.header.title,itemsPerPage:{desktop:3,mobile:o.length>=3?2.2:o.length},ICONS:e.ICONS,children:Array.isArray(o)&&o.map(({node:h},_)=>{var b,C,j;const y=l(h.cluster.highlights),{availability:{status:x}}=h;return x?r.jsxs(fe.Root,{item:{...h,image:Ds.helpers.product.getFirstImages({images:h.image,label:{first:e.MAIN_IMAGE,second:e.SECOND_IMAGE}})},isMobile:a,size:"medium",index:_,shelfTitle:e.BUY_PACKAGE.header.title,CONSTANTS:e,children:[r.jsx(fe.Header,{product:h,tag:y.commercial}),r.jsx(fe.Media,{}),r.jsxs(fe.Wrapper,{type:"body",children:[r.jsx(fe.Title,{tag:{value:(b=y.institucional)==null?void 0:b.value,enableIcon:(C=y.institucional)==null?void 0:C.enableIcon,icon:(j=y.institucional)==null?void 0:j.icon}}),r.jsx(fe.Actions,{children:r.jsx(fe.SizeSelector,{callback:v=>p({selectedProduct:v,productId:h.id}),PLP_SIZE_ORDER:e.PLP_SIZE_ORDER})})]})]},h.id):null})})}),r.jsx("div",{className:pt["add-cart-container"],children:r.jsx(bf,{handleAddAllToCart:f,selectedProducts:u,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,BUY_PACKAGE:e.BUY_PACKAGE,FREIGHT_CALCULATION:e.FREIGHT_CALCULATION}})})]})},$s={"btn-login":"_btn-login_yas63_12","btn-header":"_btn-header_yas63_22","header-animation":"_header-animation_yas63_35"},Hs=({id:e})=>{const{setIsOpen:t,cartStore:{items:n}}=be(),{handleSelectContent:s}=ae(),{CONSTANTS:o}=Pe(),a=n.reduce((i,c)=>i+(c.quantity??0),0);return r.jsx(d.Header.SupportItem,{onClick:()=>{t(!0),s({content:"header:minicart"})},id:e,children:r.jsxs(d.Badge.AutoPositioner,{children:[r.jsx(d.Badge.Count,{count:a,size:"medium",variant:"primary",style:{backgroundColor:"black",display:a>0?"flex":"none"}}),r.jsx(d.Icon,{name:o.header.ICONS.bag,size:"medium"})]})})};Hs.displayName="Header.Bag";const on=({children:e,href:t,...n})=>t&&t!=="#"?r.jsx(Fe,{href:t.startsWith("/")?t:`/${t}`,...n,children:e}):e,hl=()=>{const{headerData:e}=Pe(),{handleSelectContent:t}=ae(),{reset:n,updateValue:s}=tn(),o=a=>{a?s(a):n()};return r.jsx(d.Header.Categories,{children:Array.isArray(e.categories)&&e.categories.map((a,i)=>r.jsx(on,{href:a.link,onMouseEnter:()=>o(a.submenuId),onFocus:()=>o(a.submenuId),children:r.jsx(d.Header.CategoryItem,{className:$s["btn-header"],value:a.submenuId??null,adornment:{start:r.jsx(d.Icon,{name:a.iconStart}),end:r.jsx(d.Icon,{name:a.iconEnd})},style:{textWrap:"nowrap",gap:"0"},onClick:()=>{t({content:`header:${a.label}`})},children:a.label})},`category-${a.label}-${i}`))})};hl.displayName="Header.Categories";function fh(){const{handleSelectContent:e}=ae(),{CONSTANTS:t}=Pe(),{setValue:n}=Mn();return r.jsx(d.Header.SupportItem,{onClick:()=>{n(!0),e({content:"header:search"})},children:r.jsx(d.Icon,{name:t.header.ICONS.search,size:"medium"})})}const hh={"menu-subcategories-container":"_menu-subcategories-container_a93cr_1"},_h={"observer-wrapper":"_observer-wrapper_r43gk_1"},Wn=({children:e,eventData:t,observerOptions:n,callBackWhenVisible:s,stopOnIntersection:o=!0,className:a,...i})=>{const c=g.useRef(null),l=_s(c,o,n),{sendDataLayerEvent:u}=ae();return g.useEffect(()=>{l&&(typeof s=="function"&&s(),t&&u({...t}))},[l]),r.jsx("div",{...i,ref:c,className:d.helpers.classNameConcat(_h["observer-wrapper"],a),children:e})},_l=({thumbnails:e,category:t,isMobile:n=!0,callBack:s})=>{const{handleSelectPromotionEvent:o}=ae(),a=50/e.length;return r.jsx("div",{className:hh["menu-subcategories-container"],children:e.map((i,c)=>{const l=n?i.srcMobile:i.srcDesk;if(!l)return null;const u={creative_name:"banner-menu",creative_slot:`banner-menu:${t}:${c+1}`,promotion_id:l,promotion_name:i.promotion_name};return r.jsx(Wn,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...u}}}},observerOptions:{delay:1e3},children:r.jsxs(Fe,{href:i.link??"#",onClick:()=>{typeof s=="function"&&s(),o({updatePromotionRef:!0,promotion:u})},children:[r.jsx(we.Image,{src:l,alt:i.label??l,width:500,height:500,sizes:`(max-width: 768px) 100vw, (max-width: 1023px) 75vw, ${a}vw`}),i.label&&r.jsx("p",{children:i.label})]})},`thumb-${i.label}-${c}`)})})};_l.displayName="Menu.Thumbnail";const rs={"menu-desktop":"_menu-desktop_1b799_1","menu-categories":"_menu-categories_1b799_12"},gl=({children:e,dividerOnRight:t=!0,subMenu:n,...s})=>{var l;const{router:o}=ue(),{reset:a}=tn(),{handleSelectContent:i}=ae(),{CONSTANTS:c}=Pe();return r.jsxs("div",{...s,className:rs["menu-categories"],children:[(l=n==null?void 0:n.subCategories)==null?void 0:l.map((u,m)=>{var h,_,y,x;const f=u.listCollapseDesk&&!((h=u.see_all)!=null&&h.link)?{expandAfterRowsQty:u.rowsToShowDesk}:{},p=u.listCollapseDesk&&!((_=u.see_all)!=null&&_.link)?{expansivesAdornments:{open:c.header.ICONS.add,close:c.header.ICONS.minus},expansivesLabels:{open:c.header.COMPONENT_LIST.listExpandLabel,close:c.header.COMPONENT_LIST.listCollapseLabel},iconSize:"x-small"}:{adornment:{end:r.jsx(d.Icon,{name:c.header.ICONS.arrow_right,size:"small"})}};return r.jsxs(d.ComponentList.Structure,{children:[r.jsx(on,{href:u.linkLabel,title:u.label,onClick:()=>{u.linkLabel&&(a(),i({content:`menu:${u.label??""}:${n.label??""}`}))},children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h2",{children:u.label})})})}),r.jsx(d.ComponentList.List,{columns:1,...f,className:rs["submenu-categories"],children:(y=u.items)==null?void 0:y.map((b,C)=>r.jsx(d.ComponentList.ListItem,{id:`list-item-${b.label}-${C}`,children:r.jsx(ze,{href:b.link??"#",size:"x-small",title:b.label??"",disableUnderline:!0,disablePadding:!0,onClick:()=>{a(),i({content:`menu:${u.label??""}:${b.label??""}:${n.label??""}`})},children:b.label})},`list-item-${b.label}-${C}`))}),((x=u.see_all)==null?void 0:x.link)&&r.jsx(d.ComponentList.Support,{...p,size:"small",onClick:()=>{var b;(b=u.see_all)!=null&&b.link&&(a(),i({content:`menu:${u.label??""}:${n.label}`}),o.push(u.see_all.link))},children:u.see_all.link&&u.see_all.label})]},`list-${u.label}-${m}`)}),t&&r.jsx(d.Utils.Divider,{size:"small",direction:"vertical"})]})};gl.displayName="Menu.Categories";const yl=({children:e,dividerOnBottom:t=!0,...n})=>{const{CONSTANTS:s}=Pe();return r.jsxs(r.Fragment,{children:[r.jsx("div",{...n,className:rs["menu-desktop"],style:{...n.style,justifyContent:s.header.ALIGNMENT_MENU},children:e}),t&&r.jsx(d.Utils.Divider,{size:"small"})]})};yl.displayName="Menu.MenuRoot";const wr={Root:yl,Categories:gl,Thumbnail:_l},xl=()=>{const{headerData:e,CONSTANTS:t}=Pe(),n=si(),{reset:s}=tn();return r.jsx(d.Header.SubMenu,{className:"header-desktop-submenu",children:Array.isArray(e.subMenus)&&e.subMenus.map((o,a)=>{const{thumbnails:i,label:c,id:l}=o,u=l===n,m=i==null?void 0:i.some(f=>!!f.srcDesk);return r.jsxs(wr.Root,{id:l,style:u?{display:"flex",zIndex:t.header.Z_INDEX_WAR.menu_desktop}:{display:"none"},dividerOnBottom:u,children:[r.jsx(wr.Categories,{dividerOnRight:!!m,subMenu:o}),Array.isArray(i)&&r.jsx(wr.Thumbnail,{thumbnails:i,isMobile:!1,category:c,callBack:s})]},`submenu-${l}-${a}`)})})};xl.displayName="Header.SubMenu";const vl=()=>{const{handleSelectContent:e}=ae(),{CONSTANTS:t}=Pe();return r.jsx(Fe,{href:"/favoritos",children:r.jsx(d.Header.SupportItem,{onClick:()=>e({content:"header:wishlist"}),children:r.jsx(d.Icon,{name:t.header.ICONS.favorite_false,size:"medium"})})})};vl.displayName="Header.WishList";const gh="_root_im5yf_125",We={"user-menu--credits":"_user-menu--credits_im5yf_1","user-menu--content":"_user-menu--content_im5yf_10","user-menu--login":"_user-menu--login_im5yf_30","user-menu--login--content":"_user-menu--login--content_im5yf_37","user-menu--menu":"_user-menu--menu_im5yf_64","user-menu--tooltip":"_user-menu--tooltip_im5yf_92","tooltip-modifier":"_tooltip-modifier_im5yf_103","modal-controls-modifier":"_modal-controls-modifier_im5yf_108","modal-header-modifier":"_modal-header-modifier_im5yf_116",root:gh},bl=({className:e,children:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(We["user-menu--content"],e),children:t});bl.displayName="UserMenu.Content";var jl=(e=>(e.Account="account",e))(jl||{});const Cl=({className:e,cashBack:t,credits:n,link:s,total:o,...a})=>{const i=t?H.formatPriceToCurrency(t):void 0,c=n?H.formatPriceToCurrency(n):void 0,l=o?H.formatPriceToCurrency(o):void 0;return r.jsx(d.Credits.Account,{...a,className:d.helpers.classNameConcat(We["user-menu--credits"],e),icon:"wallet",showIcon:!0,cashBackValue:i,creditsValue:c,linkMore:s,totalValue:l,type:jl.Account})};Cl.displayName="UserMenu.Credits";const Sl=({className:e,children:t,description:n,text:s,...o})=>{const{isMobile:a}=re();return r.jsx("div",{...o,className:d.helpers.classNameConcat(We["user-menu--login"],e),"data-mobile":a,children:r.jsxs("div",{className:We["user-menu--login--content"],children:[r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:[r.jsx("h3",{className:"typography-style-body-lg-strong",children:s}),r.jsx("p",{children:n})]})}),t]})})};Sl.displayName="UserMenu.Login";const El=({className:e,isLogged:t,onLogoutClick:n,ICONS:s,storeConfig:o,isMobile:a})=>{const i=a?ro:ro({ICONS:s,storeConfig:o}).filter(c=>c.deviceShown==="both"||c.deviceShown===(a?"mobile":"desktop"));return r.jsxs("ul",{className:d.helpers.classNameConcat(We["user-menu--menu"],e),children:[Array.isArray(i)&&i.map((c,l)=>r.jsx("li",{children:r.jsx(ze,{href:c.href??"#",size:"small",disableUnderline:!0,adornments:{start:r.jsx(d.Icon,{name:c.icon??"delete"})},children:c.label})},l)),t?r.jsx("li",{children:r.jsx(ze,{href:`${o.secureSubdomain}/api/vtexid/pub/logout?scope=mariafilo&returnUrl=${encodeURIComponent(`${o.storeUrl}`)}`,size:"small",disableUnderline:!0,onClick:n,adornments:{start:r.jsx(d.Icon,{name:dp(s)})},children:up})}):r.jsx(r.Fragment,{})]})};El.displayName="UserMenu.Menu";const Pl=e=>{const t=g.useRef(null),n=g.useCallback(a=>{t.current&&!t.current.contains(a.target)&&e()},[e]),s=g.useCallback(a=>{t.current&&!t.current.contains(a.target)&&e()},[e]),o=g.useCallback(a=>{a.key==="Escape"&&e()},[e]);return g.useEffect(()=>(document.addEventListener("mousedown",n),document.addEventListener("keydown",o),document.addEventListener("touchstart",s),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("keydown",o),document.removeEventListener("touchstart",s)}),[n,o,s]),{ref:t}},yh=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},xh=(e,t,n)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const{height:s,left:o,top:a,width:i}=t.getBoundingClientRect(),c=e.getBoundingClientRect(),l=e!=null&&e.parentElement?yh(e==null?void 0:e.parentElement):0;return{left:o+i/2-(c.width+l*2),top:a+s+n}},Nl=g.createContext({}),vh=({children:e,delay:t=600,gap:n=20,isOpen:s,setIsOpen:o,target:a,...i})=>{const c=g.useRef(null),[l,u]=g.useState(!1),[m,f]=g.useState({left:0,top:0}),{ref:p}=Pl(()=>{u(!0),typeof window<"u"&&(c.current=window.setTimeout(()=>{o(!1),u(!1)},t))});return g.useEffect(()=>{if(a&&(p!=null&&p.current)){const{left:h,top:_}=xh(p.current,a,n??0);f({left:h,top:_}),u(!1)}},[n,s,a,p]),r.jsx(Nl.Provider,{value:g.useMemo(()=>({...i,...m,contentRef:p,isLeaving:l,isOpen:s,setIsOpen:o,setIsLeaving:u,target:a}),[i,m,p,l,s,o,u,a]),children:e})},Il=()=>{const e=g.useContext(Nl);if(e===void 0)throw new Error("useUserMenuContext must be used within a UserMenuProvider");return e},wl=({children:e,isMobile:t=!1,Z_INDEX_WAR:n})=>{const{isOpen:s,setIsOpen:o}=Il();return r.jsxs(d.Modal.Root,{"data-user":"user-menu--modal",isMobile:t??!1,isOpen:s,setIsOpen:o,variant:"sideBottom",className:We["modal-root-modifier"],style:{zIndex:n.user_menu_mobile},children:[r.jsx(d.Modal.Header,{navigation:"top",className:We["modal-header-modifier"],children:r.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0,className:We["modal-controls-modifier"]})}),r.jsx(d.Modal.Body,{children:e})]})};wl.displayName="UserMenu.Modal";const Rl=({children:e,component:t,Z_INDEX_WAR:n,isMobile:s,...o})=>r.jsx(vh,{...o,className:We.root,children:s?r.jsxs(r.Fragment,{children:[r.jsx(mt.Modal,{Z_INDEX_WAR:n,children:t}),e]}):r.jsx(mt.Tooltip,{component:t,style:{width:304,zIndex:n.user_menu},Z_INDEX_WAR:n,children:e})});Rl.displayName="UserMenu.Root";const Tl=({children:e,component:t,Z_INDEX_WAR:n,...s})=>{const{contentRef:o,left:a,isLeaving:i,isOpen:c,top:l}=Il();return r.jsx(d.Tooltip.Root,{arrow:"top-right",component:r.jsx("div",{...s,ref:o,children:t}),className:d.helpers.classNameConcat(We["user-menu--tooltip"],We["tooltip-modifier"]),isLeaving:i,isOpen:c,left:a,size:"medium",position:"top",top:l,style:{zIndex:n.user_menu},children:r.jsx("div",{className:We["user-menu--tooltip"],children:e})})};Tl.displayName="UserMenu.Tooltip";const mt={Credits:Cl,Content:bl,Login:Sl,Menu:El,Modal:wl,Root:Rl,Tooltip:Tl},Gn=({children:e,isOpen:t,setIsOpen:n,desktopUserMenuTarget:s,mobileUserMenuTarget:o,storeConfig:a})=>{var h,_,y;const{isMobile:i}=re(),{CONSTANTS:c}=Pe(),l=Ut(),u=()=>{window.location.href=`${a.secureSubdomain}/api/io/login?returnUrl=${encodeURIComponent(`${window.location.href}`)}`},m=!!((h=l.user)!=null&&h.userId),{cashback:f,credits:p}=g.useMemo(()=>{var x,b;return{credits:((x=l==null?void 0:l.getCurrentCredits())==null?void 0:x.credits)??0,cashback:((b=l==null?void 0:l.getCurrentCredits())==null?void 0:b.cashback)??0}},[l]);return r.jsx(mt.Root,{component:r.jsxs(mt.Content,{children:[r.jsx(mt.Login,{description:pp(m),text:mp(m,((_=l==null?void 0:l.user)==null?void 0:_.firstName)??((y=l==null?void 0:l.user)==null?void 0:y.email)),children:!m&&r.jsx(d.Button,{id:"conta",size:"medium",variant:"quaternary",onClick:()=>u(),children:c.header.MENU_INFO.login.button_text})}),p+f&&m?r.jsx(mt.Credits,{credits:p,cashBack:f,link:`${a.secureSubdomain}/account#/meus-creditos`,total:p+f}):r.jsx(r.Fragment,{}),r.jsx(d.Utils.Divider,{}),r.jsx(mt.Menu,{ICONS:c.header.ICONS,storeConfig:a,isLogged:m,className:H.responsive["responsive-desktop-flex"],onLogoutClick:()=>l.logout()}),r.jsx(mt.Menu,{ICONS:c.header.ICONS,storeConfig:a,isMobile:!0,isLogged:m,className:H.responsive["responsive-mobile-flex"],onLogoutClick:()=>l.logout()})]}),isOpen:t,isMobile:i,setIsOpen:n,target:i?o:s,Z_INDEX_WAR:c.header.Z_INDEX_WAR,children:e})};Gn.displayName="UserMenu";const Al=({storeConfig:e})=>{const{CONSTANTS:t}=Pe(),{handleSelectContent:n}=ae(),{reset:s}=tn(),{setValue:o}=bs(),a=vs(),i=g.useRef(null);return r.jsxs(r.Fragment,{children:[r.jsxs(d.Header.Wrapper,{className:"header-desktop-wrapper",children:[r.jsx(d.Header.Logo,{style:{width:"100%"},children:r.jsx(Fe,{href:"/",onMouseEnter:s,children:r.jsx(d.Icon,{name:t.header.ICONS.logo,onClick:()=>{n({content:"header:logo"})}})})}),r.jsx(hl,{}),r.jsxs(d.Header.Support,{onMouseEnter:s,style:{justifyContent:"flex-end"},children:[r.jsx(fh,{}),r.jsx(Gn,{isOpen:a,setIsOpen:o,desktopUserMenuTarget:i.current,storeConfig:e,children:r.jsx(d.Header.SupportItem,{onClick:()=>{o(!0),n({content:"header:user_menu"})},className:$s["btn-login"],innerRef:i,children:r.jsx(d.Icon,{name:t.header.ICONS.person,size:"medium"})})}),r.jsx(vl,{}),r.jsx(Hs,{id:"cart-button"})]})]}),r.jsx(xl,{})]})};Al.displayName="Header.HeaderDesktopWrapper";const Ue={"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"},kl=({children:e,mobileBannerAlt:t,mobileBannerSrc:n,textColor:s,submenuId:o,label:a,...i})=>r.jsx("button",{...i,className:Ue["menu--banners--item"],children:n?r.jsxs(d.Banner.Container,{children:[r.jsx(d.Banner.ImageWrapper,{children:r.jsx(we.Image,{alt:t??n,height:128,src:n,width:343,unoptimized:!0})}),r.jsx(d.Banner.Slot,{verticalAlignment:"end",horizontalAlignment:"center",children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:Ue["menu--banners--item--text"],children:r.jsx("h2",{className:"typography-style-body-xs",style:s?{color:s}:{},children:e})})})})]}):r.jsx("h2",{...i,children:e})});kl.displayName="Menu.Mobile.Category";const Ll=({label:e,...t})=>{const{CONSTANTS:n}=Pe();return r.jsx(d.Button,{...t,adornment:{end:r.jsx(d.Icon,{name:n.header.ICONS.arrow_right,size:"medium"})},mode:"inverse",size:"medium",variant:"primary",children:e})};Ll.displayName="Menu.Mobile.Body.Category";const Ol=({subCategory:e,submenuLabel:t,onHandleOut:n,...s})=>r.jsx("div",{...s,className:Ue["menu--sub-category--list"],children:Array.isArray(e==null?void 0:e.items)&&(e==null?void 0:e.items.map((o,a)=>r.jsx(ze,{disableUnderline:!0,disablePadding:!1,href:o.link??"#",onClick:()=>n(o.label,t),size:"medium",title:o.label??"",children:o.label},a)))});Ol.displayName="Menu.Mobile.List";const Dl=({current:e,onHandleOut:t})=>{var n;return e?r.jsx("div",{className:Ue["menu--sub-category"],children:Array.isArray(e==null?void 0:e.subCategories)&&((n=e==null?void 0:e.subCategories)==null?void 0:n.map((s,o)=>r.jsxs("div",{className:Ue["menu--sub-category--item"],children:[r.jsx(Xt.Title,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id}),r.jsx(Xt.List,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id})]},o)))}):r.jsx(r.Fragment,{})};Dl.displayName="Menu.Mobile.Body.SubCategory";const Ml=({subCategory:e,submenuLabel:t,onHandleOut:n,...s})=>{var c;const{router:o}=ue(),{handleSelectContent:a}=ae(),{CONSTANTS:i}=Pe();return r.jsxs("div",{...s,className:Ue["menu--categories--title"],children:[r.jsx(on,{href:e==null?void 0:e.linkLabel,title:e==null?void 0:e.linkLabel,onClick:()=>{a({content:`menu:${e.label??""}:${t}`})},children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h2",{className:"typography-style-body-md",children:e==null?void 0:e.label})})})}),((c=e==null?void 0:e.see_all)==null?void 0:c.link)&&r.jsx(d.ComponentList.Support,{adornment:{end:r.jsx(d.Icon,{name:i.header.ICONS.arrow_right,size:"small"})},size:"small",onClick:()=>{var l;n(e.label,t),(l=e==null?void 0:e.see_all)!=null&&l.link&&o.push(e.see_all.link)},children:e.see_all.label})]})};Ml.displayName="Menu.Mobile";const Xt={Banner:kl,Category:Ll,List:Ol,SubCategory:Dl,Title:Ml},Fl=g.createContext({}),bh=({children:e})=>{const[t,n]=g.useState(null),s=g.useCallback(()=>{n(null)},[]),o=a=>{a!==t&&n(a)};return r.jsx(Fl.Provider,{value:{currentCategory:t,setCurrentCategory:n,handleCloseMenu:s,handleChangeSubMenuOpened:o},children:e})},zl=()=>g.useContext(Fl),Bl=e=>{const{router:t}=ue(),{headerData:n}=Pe(),{handleSelectContent:s}=ae(),{currentCategory:o,setCurrentCategory:a}=zl(),i=g.useRef(null),c=()=>{if(i.current){const h=i.current;h&&(a(null),h==null||h.click())}},l=(h,_)=>{s({content:`menu:${h}`}),t.push(_),c()},u=(h,_)=>{s({content:`menu:${h}:${_}`}),c()},m=Array.isArray(n==null?void 0:n.categories)?n==null?void 0:n.categories:[],f=Array.isArray(n==null?void 0:n.subMenus)?n==null?void 0:n.subMenus:[],p=h=>{h.submenuId?a(h.submenuId):l(h.label,h.link)};return r.jsxs("div",{...e,className:Ue["menu--body"],style:{transform:`translate3d(calc(-100% * ${o?1:0}), 0px, 0px)`},children:[r.jsx("button",{className:Ue["menu--dummy-close"],ref:i,"data-close":!0}),r.jsxs("div",{className:Ue["menu--step"],"data-active":"true",children:[r.jsx("div",{className:Ue["menu--banners"],children:r.jsx("div",{className:Ue["menu--banners--list"],children:m.map((h,_)=>g.createElement(Xt.Banner,{...h,key:_,onClick:()=>l(h.label,h.link)},h.mobileBannerAlt))})}),r.jsx("div",{className:Ue["menu--categories"],children:m.map((h,_)=>r.jsx(Xt.Category,{label:h.label,onClick:()=>p(h)},_))})]}),r.jsx("div",{className:Ue["menu--step"],"data-active":!!o,children:r.jsx(Xt.SubCategory,{current:f.find(h=>h.id===o),onHandleOut:u})})]})};Bl.displayName="Menu.Mobile.Body";const jh={"menu--header":"_menu--header_1ozdf_1"},Ul=()=>{var o;const{headerData:e}=Pe(),{currentCategory:t,setCurrentCategory:n}=zl(),s=(o=e==null?void 0:e.categories)==null?void 0:o.find(a=>a.submenuId===t);return r.jsxs("div",{className:jh["menu--header"],children:[r.jsx(d.Button,{"data-out":!s,iconNameStart:"arrow-left",mode:"inverse",onClick:()=>n(null)}),s&&r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{alignContent:"center",children:r.jsx("h2",{className:"typography-style-body-lg",children:s==null?void 0:s.label})})}),r.jsx(d.Button,{iconNameStart:"close","data-close":!0,"data-only":!s,mode:"inverse",onClick:()=>n(null)})]})};Ul.displayName="Menu.Mobile.Header";var ss={exports:{}};function Ch(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 Rr={},Tr={},Ko;function Sh(){return Ko||(Ko=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")}(Tr)),Tr}var Xo;function Eh(){return Xo||(Xo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return h}});const n=Le._(g),s=Sh();function o(_){return _&&_.default?_.default:_}const a=[],i=[];let c=!1;function l(_){let y=_(),x={loading:!0,loaded:null,error:null};return x.promise=y.then(b=>(x.loading=!1,x.loaded=b,b)).catch(b=>{throw x.loading=!1,x.error=b,b}),x}function u(_,y){let x=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},y),b=null;function C(){if(!b){const P=new m(_,x);b={getCurrentValue:P.getCurrentValue.bind(P),subscribe:P.subscribe.bind(P),retry:P.retry.bind(P),promise:P.promise.bind(P)}}return b.promise()}if(typeof window>"u"&&a.push(C),!c&&typeof window<"u"){const P=x.webpack&&typeof Ch.resolveWeak=="function"?x.webpack():x.modules;P&&i.push(E=>{for(const S of P)if(E.includes(S))return C()})}function j(){C();const P=n.default.useContext(s.LoadableContext);P&&Array.isArray(x.modules)&&x.modules.forEach(E=>{P(E)})}function v(P,E){j();const S=n.default.useSyncExternalStore(b.subscribe,b.getCurrentValue,b.getCurrentValue);return n.default.useImperativeHandle(E,()=>({retry:b.retry}),[]),n.default.useMemo(()=>S.loading||S.error?n.default.createElement(x.loading,{isLoading:S.loading,pastDelay:S.pastDelay,timedOut:S.timedOut,error:S.error,retry:b.retry}):S.loaded?n.default.createElement(o(S.loaded),P):null,[P,S])}return v.preload=()=>C(),v.displayName="LoadableComponent",n.default.forwardRef(v)}class m{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};const{_res:y,_opts:x}=this;y.loading&&(typeof x.delay=="number"&&(x.delay===0?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},x.delay)),typeof x.timeout=="number"&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},x.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(b=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(y){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...y},this._callbacks.forEach(x=>x())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(y){return this._callbacks.add(y),()=>{this._callbacks.delete(y)}}constructor(y,x){this._loadFn=y,this._opts=x,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function f(_){return u(l,_)}function p(_,y){let x=[];for(;_.length;){let b=_.pop();x.push(b(y))}return Promise.all(x).then(()=>{if(_.length)return p(_,y)})}f.preloadAll=()=>new Promise((_,y)=>{p(a).then(_,y)}),f.preloadReady=_=>(_===void 0&&(_=[]),new Promise(y=>{const x=()=>(c=!0,y());p(i,_).then(x,x)})),typeof window<"u"&&(window.__NEXT_PRELOADREADY=f.preloadReady);const h=f}(Rr)),Rr}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(m,f){for(var p in f)Object.defineProperty(m,p,{enumerable:!0,get:f[p]})}n(t,{default:function(){return u},noSSR:function(){return l}});const s=Le,o=r,a=s._(Eh()),i=typeof window>"u";function c(m){return{default:(m==null?void 0:m.default)||m}}function l(m,f){if(delete f.webpack,delete f.modules,!i)return m(f);const p=f.loading;return()=>(0,o.jsx)(p,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}function u(m,f){let p=a.default,h={loading:x=>{let{error:b,isLoading:C,pastDelay:j}=x;if(!j)return null;if(process.env.NODE_ENV!=="production"){if(C)return null;if(b)return(0,o.jsxs)("p",{children:[b.message,(0,o.jsx)("br",{}),b.stack]})}return null}};m instanceof Promise?h.loader=()=>m:typeof m=="function"?h.loader=m:typeof m=="object"&&(h={...h,...m}),h={...h,...f};const _=h.loader,y=()=>_!=null?_().then(c):Promise.resolve(c(()=>null));return h.loadableGenerated&&(h={...h,...h.loadableGenerated},delete h.loadableGenerated),typeof h.ssr=="boolean"&&!h.ssr?(delete h.webpack,delete h.modules,l(p,h)):p({...h,loader:y})}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(ss,ss.exports);var Ph=ss.exports,Nh=Ph;const $l=H.getDefaultExportFromCjs(Nh),Tn={"modal-modifier":"_modal-modifier_10zw4_1","menu--navigation-bar":"_menu--navigation-bar_10zw4_15","menu--root":"_menu--root_10zw4_26"},Hl=({children:e})=>{const{menuIsOpen:t,setMenuIsOpen:n}=Es(),{CONSTANTS:s}=Pe();return r.jsxs(d.Modal.RootWithoutPortal,{className:d.helpers.classNameConcat(Tn["modal-modifier"],"menu-mobile-root"),isOpen:t,setIsOpen:n,variant:"sideRight",style:{bottom:"unset",overflowY:"hidden",position:"fixed",top:0,zIndex:s.header.Z_INDEX_WAR.menu_mobile},children:[r.jsx(Ul,{}),r.jsx(d.Modal.Body,{className:Tn["menu--root"],children:e})]})};Hl.displayName="Menu.MenuRoot";const Ih=$l(()=>Promise.resolve(Hl),{ssr:!1}),ql=({children:e,last:t=!1,...n})=>r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{...n,"data-close":!0,size:"small",variant:"tertiary",children:e}),!t&&r.jsx(d.Utils.Divider,{direction:"vertical",size:"small",className:Tn.divider})]});ql.displayName="Menu.NavigationBarItem";const Vl=()=>{const{setUserMenuIsOpen:e}=Es(),{handleSelectContent:t}=ae(),{CONSTANTS:n}=Pe(),{router:s}=ue(),o=[{iconNameStart:n.header.ICONS.person,onClick:()=>{e(!0),t({content:"menu:user_menu"})},text:n.header.MENU_INFO.login.button_text},{iconNameStart:n.header.MENU_INFO.bag.button_icon,onClick:()=>{t({content:"menu:wishlist"}),s.push("/favoritos")},text:n.header.MENU_INFO.bag.button_text},{last:!0,iconNameStart:n.header.MENU_INFO.store.button_icon,onClick:()=>{t({content:"menu:store"}),s.push("/institucional/lojas")},text:n.header.MENU_INFO.store.button_text}];return r.jsx(d.Card,{id:"menu-navigationbar",shadow:!0,className:Tn["menu--navigation-bar"],style:{zIndex:n.header.Z_INDEX_WAR.menu_mobile_navigation_bar},children:Array.isArray(o)&&o.map((a,i)=>g.createElement(ql,{...a,key:i},a.text))})};Vl.displayName="Menu.NavigationBar";const Ar={Body:Bl,NavigationBar:Vl,Root:Ih},Wl=({storeConfig:e})=>{const t=g.useRef(null),{CONSTANTS:n}=Pe(),{MENU_NAVIGATION_BAR_ALLOWED:s,ICONS:o}=n.header,{handleSelectContent:a}=ae(),{setValue:i}=Mn(),{setValue:c}=ii(),{setValue:l}=bs(),u=vs(),m=ai(),{isMobile:f}=re();return r.jsxs(r.Fragment,{children:[r.jsxs(d.Header.Wrapper,{className:"header-mobile-wrapper",children:[r.jsx(d.Header.Logo,{style:{width:"100%"},children:r.jsx(Fe,{href:"/",children:r.jsx(d.Icon,{name:o.logo,size:"x-large",onClick:()=>{a({content:"header:logo"})}})})}),r.jsxs(d.Header.Support,{children:[r.jsx(d.Header.SupportItem,{onClick:()=>{i(!0),a({content:"header:search"})},children:r.jsx(d.Icon,{name:o.search,size:"medium"})}),r.jsx(Hs,{}),r.jsxs(d.Header.SupportItem,{onClick:()=>c(!0),children:[r.jsx("span",{ref:t}),r.jsx(d.Icon,{name:o.menu,size:"medium"})]})]})]}),f&&r.jsx(ji,{menuIsOpen:m,setMenuIsOpen:c,userMenuIsOpen:m,setUserMenuIsOpen:l,children:r.jsx(Gn,{storeConfig:e,isOpen:u,setIsOpen:l,mobileUserMenuTarget:t==null?void 0:t.current,children:r.jsxs(Ar.Root,{children:[r.jsx(Ar.Body,{}),s?r.jsx(Ar.NavigationBar,{}):r.jsx(r.Fragment,{})]})})})]})};Wl.displayName="Header.HeaderMobileWrapper";const wh=g.createContext({}),Rh=({children:e})=>{const{sendDataLayerEvent:t}=ae(),{cartStore:n,isOpen:s}=be();g.useEffect(()=>{s&&t({functionKey:"viewCartEvent",data:{commonData:{cartStore:n}}})},[s]),g.useEffect(()=>{var a,i,c;if(n.id&&!((i=(a=n.marketingData)==null?void 0:a.marketingTags)!=null&&i.includes("faststore"))){const{id:l}=n;vt.post("/api/checkout/order-form/attachments/marketing-data",{orderFormId:l,marketingData:{...n==null?void 0:n.marketingData,marketingTags:Ka(((c=n.marketingData)==null?void 0:c.marketingTags)??[])}}).catch(u=>{console.error(u)})}},[n]);const o=({cartItem:a,oldQuantity:i,newQuantity:c})=>{t({functionKey:"skuEvents",data:{event:i>c?"remove_from_cart":"add_to_cart",commonData:{products:[{...a,price:a.price/100,listPrice:a.listPrice/100}]},customData:{quantity:c},supportData:{selectedSkus:[a]}}})};return r.jsx(wh.Provider,{value:{handleUpdateItemQuantityEvent:o},children:e})},Th="var(--color-background-brand-primary-lighter)",Ah="_fadeInOut_1l5ow_1",kh="_fadeOut_1l5ow_1",ne={brandPrimaryLighter:Th,"mc--cashback":"_mc--cashback_1l5ow_1","mc--cashback--positive":"_mc--cashback--positive_1l5ow_21","mc--cashback--alert":"_mc--cashback--alert_1l5ow_24","mc--container--actions":"_mc--container--actions_1l5ow_28","mc--container--actions--secondary":"_mc--container--actions--secondary_1l5ow_36","mc-container-actions--toggle-size-modifier":"_mc-container-actions--toggle-size-modifier_1l5ow_55","mc--footer":"_mc--footer_1l5ow_63","mc--footer--actions":"_mc--footer--actions_1l5ow_72","mc--footer--actions-button":"_mc--footer--actions-button_1l5ow_77","mc--footer--total":"_mc--footer--total_1l5ow_93","mc--footer--total--info":"_mc--footer--total--info_1l5ow_98","mc--footer--total--info--content":"_mc--footer--total--info--content_1l5ow_103","mc--field":"_mc--field_1l5ow_149","mc--body":"_mc--body_1l5ow_189","mc--body--products":"_mc--body--products_1l5ow_196","mc--body--empty--feedback":"_mc--body--empty--feedback_1l5ow_204","mc--body--empty--text":"_mc--body--empty--text_1l5ow_209","mc--body--promotion":"_mc--body--promotion_1l5ow_222","mc--body--promotion--closeness":"_mc--body--promotion--closeness_1l5ow_225","mc--body--promotion--closeness--success":"_mc--body--promotion--closeness--success_1l5ow_248","mc--body--coupon-tag":"_mc--body--coupon-tag_1l5ow_260","mc--body--coupon-tag--text":"_mc--body--coupon-tag--text_1l5ow_278","mc--body--coupon-tag--button":"_mc--body--coupon-tag--button_1l5ow_284","mc--header":"_mc--header_1l5ow_290","mc--header--subtitle":"_mc--header--subtitle_1l5ow_316","mc--notify":"_mc--notify_1l5ow_357","mc--notify--content":"_mc--notify--content_1l5ow_372","mc--notify--item":"_mc--notify--item_1l5ow_385",fadeInOut:Ah,fadeOut:kh,"mc--card":"_mc--card_1l5ow_447","mc--card--actions":"_mc--card--actions_1l5ow_452","mc--card--actions--secondary":"_mc--card--actions--secondary_1l5ow_460","mc--card--actions--add-remove":"_mc--card--actions--add-remove_1l5ow_487","mc--card--actions--gift":"_mc--card--actions--gift_1l5ow_501","mc--card--content-info":"_mc--card--content-info_1l5ow_514","mc--card--details":"_mc--card--details_1l5ow_521","mc--card--link":"_mc--card--link_1l5ow_526","mc--product--unavailable":"_mc--product--unavailable_1l5ow_534","mc--card--name":"_mc--card--name_1l5ow_537","mc--card--price":"_mc--card--price_1l5ow_552","mc--card--price--old-price":"_mc--card--price--old-price_1l5ow_562","mc--card--price--price-details":"_mc--card--price--price-details_1l5ow_566","mc--card--product-link":"_mc--card--product-link_1l5ow_577","mc--discount":"_mc--discount_1l5ow_587","mc--discount--header":"_mc--discount--header_1l5ow_590","inputs--tooltip":"_inputs--tooltip_1l5ow_590","mc--discount--body":"_mc--discount--body_1l5ow_609","minicart--modal-modifier":"_minicart--modal-modifier_1l5ow_630"},Gl=({item:{id:e,message:t,callback:n},removeNotification:s,ICONS:o})=>{const a=g.useRef(null),i=()=>{var l;(l=a.current)==null||l.setAttribute("data-animation-out","true")},c=l=>{s(l)};return r.jsx("div",{className:ne["mc--notify--item"],ref:a,onAnimationEnd:()=>c(e),children:r.jsxs(d.SnackBar.Structure,{size:"medium",children:[r.jsx(d.SnackBar.Content,{title:t}),r.jsxs(d.SnackBar.Support,{children:[typeof n=="function"&&r.jsx(d.Button,{onClick:()=>{n(),i()},size:"small",variant:"tertiary",children:"Desfazer"}),r.jsx(d.Button,{iconNameStart:o.close,iconSize:"small",onClick:()=>i(),variant:"tertiary"})]})]})},e)};Gl.displayName="MiniCart.Notify.Item";const Kl=({ICONS:e})=>{const t=ys(),{removeNotification:n}=xs(),s=t.length?[...t].sort((o,a)=>a.id-o.id):[];return s.length?r.jsx("div",{className:ne["mc--notify"],children:r.jsx("div",{className:ne["mc--notify--content"],children:Array.isArray(s)&&s.map(o=>r.jsx(Gl,{item:o,removeNotification:n,ICONS:e},o.id))})}):null};Kl.displayName="MiniCart.Notifications";const Lh=({handleSendEvent:e,onHandleRemove:t,product:n,MINICART_CONFIG:s,...o})=>{const a=Bt(),{toggleProduct:i}=Nt(),{itemOffered:{isVariationOf:{productGroupID:c}},quantity:l}=n;return r.jsx(d.Button,{...o,adornment:{end:r.jsx(d.Icon,{name:`favorite-${a.includes(c)?"true":"false"}`,size:"small"})},onClick:()=>{i(c),a.includes(c)||t({texture:"mini-cart-wishlist",title:`${s.messages.add_wishlist}`},l,()=>i(c)),e(a.includes(c)?"remove_from_wishlist":"add_to_wishlist","productEvents")},children:s.messages.add_wishlist_button})},Xl=({handleSendEvent:e,product:t,ICONS:n,MINICART_CONFIG:s,...o})=>{const{addToCart:a,removeToCart:i}=be(),{bundleItems:c=[],id:l,uniqueId:u,seller:m,offerings:f,quantity:p}=t,h=(_,y,x)=>{i(l,_.title,()=>{typeof x=="function"&&x(),a({id:l,quantity:y,seller:m},{id:l,texture:_.texture},!0)})};return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:ne["mc--card--actions--add-remove"],children:[s.has_wishlist_button&&r.jsx(Lh,{...o,product:t,handleSendEvent:e,onHandleRemove:h,ICONS:n,MINICART_CONFIG:s}),r.jsx(d.Button,{...o,adornment:{end:r.jsx(d.Icon,{name:n.delete,size:"small"})},underline:!0,variant:"secondary",state:"danger",onClick:()=>{h({texture:"mini-cart",title:`${s.messages.remove}`},p),e("remove_from_cart","skuEvents")},children:s.messages.remove_button})]}),s.has_gift_option&&r.jsx(At.Gift,{uniqueId:u,bundleItems:c,offerings:f,ICONS:n,MINICART_CONFIG:s})]})};Xl.displayName="MiniCart.Card.Actions";const Yl=({bundleItems:e,offerings:t,uniqueId:n,ICONS:s,MINICART_CONFIG:o})=>{const[a,i]=g.useState(!1),{toggleGiftItemCart:c}=be(),l=()=>{if(t instanceof Object&&Array.isArray(t)){const[f]=t;if(f){i(!0);const p=e.some(h=>h.id===f.id);c(n,String(f.id),p).then(()=>i(!1))}}},u=t[0],m=e.find(f=>f.id===u.id);return u&&"id"in u?r.jsx("div",{className:ne["mc--card--actions--gift"],children:r.jsx(d.Checkbox,{adornment:r.jsx(d.Icon,{name:s.check}),checked:!!m,disabled:a,label:o.messages.giftPackage,onChange:l})}):null};Yl.displayName="MiniCart.Card.Gift";const Ql=({itemOffered:e})=>{const t=H.updatedResizedImg(e==null?void 0:e.image[0].url,{width:200,height:300});return r.jsx(Fe,{href:`${e==null?void 0:e.slug}`,className:ne["mc--card--product-link"],children:r.jsx(we.Image,{alt:(e==null?void 0:e.image[0].alternateName)||"Produto",src:t||"",width:108,height:164,objectFit:"unset"})})};Ql.displayName="MiniCart.Card.Media";const Zl=({name:e,skuName:t,tagName:n,className:s})=>r.jsxs(r.Fragment,{children:[n&&r.jsx(d.Tag,{variant:"quaternary",title:n,style:{textTransform:"uppercase"},children:n}),r.jsx("p",{className:d.helpers.classNameConcat(ne["mc--card--name"],s),children:H.getProductNameWithoutSku(e??"",t??"")})]});Zl.displayName="MiniCart.Card.Name";const Jl=({total:e,totalList:t})=>r.jsx(d.ProductInfo.Root,{children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:ne["mc--card--price"],children:r.jsx(d.ProductInfo.Wrapper,{className:ne["mc--card--price--details"],size:"small",layout:"horizontal",children:t&&e!==t?r.jsxs(r.Fragment,{children:[r.jsx(d.ProductInfo.Price,{label:"originalPrice",value:H.formatPriceToCurrency(t),size:"small"}),r.jsx(d.ProductInfo.Price,{label:"discountPrice",value:H.formatPriceToCurrency(e),size:"small"})]}):r.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:H.formatPriceToCurrency(e),size:"small"})})})})});Jl.displayName="MiniCart.ProductPrice";const eu=({product:e,TEXTURE_IMAGE:t,TOGGLE_STYLE_MODIFIER:n})=>{var u;const[s,o]=g.useState(""),a=g.useRef(null),{cartStore:{options:i}}=be(),c=e.itemOffered.isVariationOf.productGroupID,l=g.useCallback(()=>{var f;const m=(f=i==null?void 0:i.find(p=>p.id===c))==null?void 0:f.texture;if(m){o(m);return}fetch("/api/catalog/product/info",{method:"POST",priority:"low",body:JSON.stringify({ids:[c]})}).then(p=>p.json()).then(p=>{const h=p.data[0].items.find(_=>_.itemId===e.id);if(h){const _=h.images.find(y=>t.includes(y.imageLabel));if(_!=null&&_.imageUrl){o(_.imageUrl);return}o(h.images[0].imageUrl)}}).catch(p=>{console.error(p)})},[i,c,e.id]);return g.useEffect(()=>{if(!a.current)return;const m=new IntersectionObserver(f=>{f[0].isIntersecting&&l()});return m.observe(a.current),()=>{m.disconnect()}},[l]),r.jsx("div",{ref:a,children:r.jsx(d.ToggleStyle.Wrapper,{size:"small",style:n,children:r.jsx(d.ToggleStyle.Texture,{children:s?r.jsx(we.Image,{alt:((u=e.itemOffered)==null?void 0:u.image[0].alternateName)??"Produto",src:s,width:164,height:164,style:n}):r.jsx(bc,{})})})})};eu.displayName="MiniCart.Card.Style";const tu=({product:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:n,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:o})=>{const{size:a}=H.getColorAndSizeFromSkuName(e.itemOffered.skuName??"",n);return r.jsxs(d.Utils.Row,{alignItems:"center",children:[r.jsx(eu,{product:e,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:o}),r.jsx(d.Utils.Divider,{direction:"vertical",size:"small",style:{height:24}}),a&&r.jsx(d.ToggleSize.Wrapper,{size:t.product_card.sku.size??"small",variation:t.product_card.sku.variation??"fill",className:ne["mc-container-actions--toggle-size-modifier"],style:{backgroundColor:`${ne.brandPrimaryLighter}`},children:r.jsx(d.ToggleSize.Text,{children:a})})]})};tu.displayName="MiniCart.Card.Sku";const At={Actions:Xl,Gift:Yl,Media:Ql,Name:Zl,Price:Jl,Sku:tu},Oh=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}},nu=({available:e=!0,index:t,product:n,ICONS:s,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c})=>{var f,p;const{sendDataLayerEvent:l}=ae(),u=Oh(n),m=(h,_)=>{const y={commonData:{...n,...u},customData:{index:t},event:h};if(_==="skuEvents"){const x={...n,...u};y.supportData={selectedSkus:[x]},y.commonData.products=[x]}l({functionKey:_,data:y})};return r.jsxs("div",{className:d.helpers.classNameConcat(ne["mc--card"],e?"":ne["mc--card--unavailable"]),children:[r.jsx(At.Media,{itemOffered:n.itemOffered}),r.jsxs("div",{className:ne["mc--card--content-info"],children:[r.jsx(At.Name,{name:((f=n.itemOffered)==null?void 0:f.name)??"",skuName:(p=n.itemOffered)==null?void 0:p.skuName}),r.jsxs("div",{className:ne["mc--card--details"],children:[r.jsx("div",{className:ne["mc--card--actions"],children:e?r.jsx(At.Price,{total:u.price,totalList:u.listPrice}):r.jsx(d.Tag,{variant:"secondary",size:"small",children:"Indisponível"})}),r.jsxs("div",{className:ne["mc--card--actions--secondary"],children:[e&&r.jsx(At.Sku,{product:n,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c}),r.jsx(At.Actions,{handleSendEvent:m,product:n,size:"small",variant:"tertiary",ICONS:s,MINICART_CONFIG:o})]})]})]})]})};nu.displayName="MiniCart.Card";const ru=({type:e="positive",ICONS:t,MESSAGE_CASHBACK:n})=>{var a;const{toExpire:s}=Ut(),o=((a=s==null?void 0:s.cashback)==null?void 0:a.reduce((i,c)=>i+c.remaining_value,0))??0;return o>0?r.jsxs("div",{className:d.helpers.classNameConcat(ne["mc--cashback"],ne[`mc--cashback--${e}`]),children:[r.jsx(d.Icon,{name:t.alert_circle,size:"medium"}),r.jsxs("p",{children:[r.jsx("span",{children:H.formatPriceToCurrency(o)})," ",n.title]})]}):null};ru.displayName="MiniCart.Cashback";const su=({type:e,ICONS:t,MINICART_CONFIG:n})=>{const{addCouponSeller:s,removeCoupon:o,removeSellerCode:a,cartStore:{marketingData:i,openTextField:c}}=be(),[l,u]=g.useState(!1),[m,f]=g.useState(!1),p=g.useCallback(()=>{let x="";return e==="coupon"?x=(i==null?void 0:i.coupon)??"":x=String((c==null?void 0:c.value)??""),x.toUpperCase()??""},[i,c,e]),[h,_]=g.useState(!!p()),y=async x=>{f(!0),!!p()&&(e==="coupon"?await o():await a(),_(!1),u(!1)),await s(x,e).then(C=>{if(!C.statusOk&&x||C.code!==200){x?(u(!0),_(!1)):u(!1);return}_(!0),u(!1)}).catch(()=>u(!0)).finally(()=>f(!1))};return r.jsx(De.Field,{hasError:l,hasSuccess:h,isLoading:m,onHandler:y,type:e,title:e==="coupon"?`${n.messages.descount_cupom_placeholder}`:`${n.messages.sellers_code_placeholder}`,value:p(),MINICART_CONFIG:n,ICONS:t})};su.displayName="MiniCart.CouponSeller";const ou=({ICONS:e,MINICART_CONFIG:t,PLP_NOT_RESULT:n})=>{const{router:s}=ue(),o=()=>{s.push(n.link)};return r.jsxs(d.Utils.Column,{alignContent:"center",alignItems:"center",gap:"24px",className:ne["mc--body--empty--feedback"],children:[r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsxs("p",{className:`typography-style-body-xs ${ne["mc--body--empty--text"]}`,children:[t.messages.empty_card," "]})})}),r.jsx(d.Button,{variant:"tertiary",size:"large",onClick:()=>o(),"data-close":!0,adornment:{end:r.jsx(d.Icon,{name:e.arrow_right,size:"medium"})},children:t.messages.empty_bag})]})};ou.displayName="MiniCart.Feedback";const Dh=e=>{const t=e.replace(/\D/g,"");return t.length>5?`${t.slice(0,5)}-${t.slice(5,8)}`:t},au=({feedback:e,hasError:t,onHandler:n,hasSuccess:s,type:o,title:a,value:i,ICONS:c})=>{const[l,u]=g.useState(i);g.useEffect(()=>{t||u(i)},[i,t]);const m=()=>t?r.jsx(d.Icon,{name:c.delete_circle}):String(i).length&&s?r.jsx(d.Icon,{name:c.check_circle}):null,f=()=>{if(o==="seller"){const y=String(i).includes(" - ")?String(i).split(" - ")[0]:l;u(y)}},p=()=>{if(o==="seller"){const y=String(i).includes(" - ")?i:l;u(y)}},h=y=>{const x=y.currentTarget.value;if(x===""&&typeof n=="function"||s&&String(i).length>0&&x!==String(i)||t&&x!==String(i)){u(""),n("");return}if(o==="cep"){const C=Dh(x);u(C)}else u(x)},_=y=>{if(y.key.toLocaleLowerCase()==="enter"&&typeof n=="function"){const x=y.currentTarget.value;n(x)}};return r.jsx(d.TextField.Input,{adornment:{end:m()},mode:"over-label",label:a,feedback:e,value:l,type:"text",onFocus:f,onBlur:p,onChange:h,onKeyDown:_})};au.displayName="MiniCart.Field.Input";const iu=({title:e,ICONS:t,MINICART_CONFIG:n,...s})=>{const o=g.useRef(null),{hasSuccess:a,hasError:i,isLoading:c,onHandler:l,type:u,value:m}=s,f=()=>i?"error":String(m).length&&a?"success":"none",p=g.useCallback(()=>{if(o.current){const y=o.current.querySelector("input");y&&typeof l=="function"&&(m!==""||i?(l(""),y.value=""):l((y==null?void 0:y.value)??""))}},[l,m,i]),h=f();return r.jsx("div",{ref:o,children:r.jsx(d.TextField.Structure,{className:ne["mc--field"],input:r.jsx(au,{...s,feedback:h,title:e,ICONS:t}),right:r.jsx(d.Button,{"data-has-success":!a,size:"medium",title:String(m).length&&a||i?"Remover":"Aplicar",onClick:()=>p(),disabled:c,children:String(m).length&&a||i?r.jsx(d.Icon,{name:"close",size:"small"}):`${n.messages.promo_code_button}`}),supportText:u==="cep"&&h==="success"?r.jsx(d.TextField.SupportText,{text:"Mais informações de frete na etapa a seguir",feedback:"success",title:"support"}):null})})};iu.displayName="MiniCart.Field";const Yo=e=>{const t=e*100;return Math.round(t)},Mh=e=>(e/100).toFixed(2).replace(".",","),Fh=(e,t)=>{const{valueType:n,remainingValueToActivate:s}=e;if(n==="quantity")return`Adicione mais ${s} ${s===1?"item":"itens"} ${t}`;if(n==="price"){const o=s===100?"Falta":"Faltam",a=Mh(s);return`${o} R$ ${a} ${t}`}return t},cu=({ICONS:e})=>{var b;const{promotionRules:t,data:n,cartStore:s,cartStore:{items:o,marketingData:a},addCouponSeller:i,setIsOpen:c}=be(),{sendDataLayerEvent:l}=ae(),u=(b=n==null?void 0:n.promotion)==null?void 0:b.promotionCart,m=g.useRef(!1),{router:f}=ue();if(g.useEffect(()=>{(u==null?void 0:u.selectPromotion)==="Cupom"&&(t==null?void 0:t.remainingValueToActivate)&&(t==null?void 0:t.remainingValueToActivate)<=0&&(u==null?void 0:u.cupom)&&!m.current&&(a==null?void 0:a.coupon)!==u.cupom&&(m.current=!0,i(u.cupom,"coupon")),t!=null&&t.remainingValueToActivate&&(t==null?void 0:t.remainingValueToActivate)<=0&&l({functionKey:"viewCartEvent",data:{event:"closeness_filled",commonData:{cartStore:s}}}),t!=null&&t.remainingValueToActivate&&(t==null?void 0:t.remainingValueToActivate)>0&&(m.current=!1)},[u==null?void 0:u.selectPromotion,t==null?void 0:t.remainingValueToActivate,u==null?void 0:u.cupom,a==null?void 0:a.coupon,i]),!t||!u||u.selectPromotion==="Desativar"||o.length===0)return null;const p=u.title,h=u.subtitle,_=u.titleSuccess,y=u.subtitleSuccess,x=u.linkLabel;return r.jsxs("div",{className:ne["mc--body--promotion"],children:[t.remainingValueToActivate>0&&r.jsx(d.Closeness,{className:ne["mc--body--promotion--closeness"],title:Fh(t,p),subtitle:h,percentage:Yo(t.completeness),iconLink:e.arrow_right,linkLabel:x,onClick:()=>{l({functionKey:"viewCartEvent",data:{event:"closeness_view_more",commonData:{cartStore:s}}}),f.push(`${u.link}`),c(!1)}}),t.remainingValueToActivate<=0&&r.jsx(d.Closeness,{className:`${ne["mc--body--promotion--closeness"]} ${ne["mc--body--promotion--closeness--success"]}`,title:_,subtitle:y,percentage:Yo(t.completeness)})]})};cu.displayName="MiniCart.Modal.Body.Promotion";const lu=({TIPBAR_CONFIGS:e})=>{const{data:t,cartStore:n,cartStore:{items:s,marketingData:o},addCouponSeller:a}=be(),i=t==null?void 0:t.flags.flagCart.flagCupom,c=(o==null?void 0:o.coupon)===(i==null?void 0:i.valueCupom),[l,u]=g.useState(!1),[m,f]=g.useState(!1);if(g.useEffect(()=>{l&&setTimeout(()=>{u(!1)},e.snackbar_timeout)},[l]),g.useEffect(()=>{m&&setTimeout(()=>{f(!1)},e.snackbar_timeout)},[m]),!i||i.active==="Desativar"||i.valueCupom===""||s.length===0)return null;const p=async()=>{if(!n.items.length){f(!0);return}(await a(i==null?void 0:i.valueCupom,"coupon")).code!==200&&u(!0)};return r.jsxs("div",{className:ne["mc--body--coupon-tag"],style:{backgroundColor:`${i.tagColor}`,color:`${i.textColor}`},children:[r.jsx("div",{className:ne["mc--body--coupon-tag--text"],dangerouslySetInnerHTML:{__html:i.value}}),r.jsx("div",{className:ne["mc--body--coupon-tag--button"],children:r.jsx(d.Button,{variant:"quaternary",mode:"inverse",onClick:p,disabled:c,children:c?"Cupom Aplicado":"Aplicar Cupom"})})]})};lu.displayName="MiniCart.Modal.Body.CouponTag";const uu=({children:e,ICONS:t,MINICART_CONFIG:n,NAME_SPLIT_SYMBOL:s,PLP_NOT_RESULT:o,TEXTURE_IMAGE:a,TIPBAR_CONFIGS:i,TOGGLE_STYLE_MODIFIER:c})=>{const{cartStore:{items:l,messages:u}}=be();return r.jsxs(d.Modal.Body,{className:ne["mc--body"],children:[e,r.jsx(cu,{ICONS:t}),r.jsx(lu,{TIPBAR_CONFIGS:i}),r.jsx("div",{className:ne["mc--body--products"],children:Array.isArray(l)&&l.length?l.map((m,f)=>{const p=u.find(h=>{var _;return h.code==="withoutStock"&&((_=h.fields)==null?void 0:_.ean)===m.ean})!==void 0;return r.jsx(De.Card,{available:!m.availability.includes("outStock")||!p,index:f,product:m,ICONS:t,MINICART_CONFIG:n,NAME_SPLIT_SYMBOL:s,TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:c},`${m.id}-${m.itemOffered.sku}-${f}`)}):r.jsx(De.Feedback,{ICONS:t,MINICART_CONFIG:n,PLP_NOT_RESULT:o})})]})};uu.displayName="MiniCart.Body";const du=({children:e,storeConfig:t,MINICART_CONFIG:n})=>{const{cartStore:s}=be();if(s.items.length===0)return null;const o=()=>{var i;const a=new URLSearchParams({orderFormId:s.id,...((i=s.marketingData)==null?void 0:i.utmCampaign)&&{utm_campaign:s.marketingData.utmCampaign}});window.location.href=`${t.checkoutUrl}?${a.toString()}#/cart`};return r.jsxs(d.Modal.Footer,{className:ne["mc--footer"],children:[e,r.jsx("div",{className:ne["mc--footer--actions"],children:r.jsx(d.Button,{variant:"primary",size:"large","data-close":!0,className:ne["mc--footer--actions-button"],onClick:o,children:n.messages.checkout_button})})]})};du.displayName="MiniCart.Modal.Footer";const mu=({children:e,ICONS:t,MINICART_CONFIG:n,Z_INDEX_WAR:s})=>{const[o,a]=g.useState(!1),i=g.useRef(null),c=()=>a(l=>!l);return r.jsxs(r.Fragment,{children:[o&&r.jsx(d.Tooltip.Root,{arrow:"right",position:"top",top:-3,left:-3,component:r.jsx("p",{children:"Código da vendedora, cupom ou cálculo do frete"}),id:"inputs--tooltip",className:ne["inputs--tooltip"],style:{zIndex:s.modal},isOpen:!0,size:"medium",parent:i.current}),r.jsxs(d.Accordion.Wrapper,{className:ne["mc--discount"],children:[r.jsx(d.Accordion.Header,{id:"frete",title:"Frete",closeIndicator:r.jsx(d.Icon,{name:t.arrow_up,size:"medium"}),openIndicator:r.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),className:d.helpers.classNameConcat(ne["mc--discount--header"]),startOpen:n.promotion_input_starts_open,children:r.jsxs(d.TextStructure.Root,{children:[r.jsx(d.TextStructure.DivWrapper,{children:r.jsxs("h3",{className:"typography-style-body-sm",children:[n.messages.promo_code_title," "]})}),r.jsx("div",{ref:i,onMouseEnter:c,onMouseLeave:c,"aria-label":"Mostrar descrição",children:r.jsx(d.Icon,{name:t.alert_circle,size:"small"})})]})}),r.jsx(d.Accordion.Body,{className:ne["mc--discount--body"],children:e})]})]})};mu.displayName="MiniCart.Discount";const pu=({discount:e,shipping:t,total:n})=>{var l,u;const{data:s}=be(),o=(u=(l=s==null?void 0:s.flags)==null?void 0:l.flagCart)==null?void 0:u.flagTotal,a=n-Math.abs(e??0)+(t??0),i=t===0?"Frete Grátis":H.formatPriceToCurrency((t??0)/100),c=[{title:"Frete",value:t===void 0?"A calcular":i},{title:"Desconto",value:H.formatPriceToCurrency((e??0)/100)},{message:(o==null?void 0:o.value)??"",title:"Total",value:`1x de ${H.formatPriceToCurrency(a/100)}`}];return r.jsx("div",{className:ne["mc--footer--total"],children:Array.isArray(c)&&c.map((m,f)=>r.jsxs("div",{className:ne["mc--footer--total--info"],"data-discount":m.title==="Desconto",children:[r.jsx("p",{children:m.title}),r.jsxs("div",{className:ne["mc--footer--total--info--content"],children:[m.message&&(o==null?void 0:o.active)==="Ativar"&&r.jsx(d.Tag,{variant:"primary",title:m.message,style:{backgroundColor:o==null?void 0:o.tagColor,color:o==null?void 0:o.textColor},children:m.message}),r.jsx(d.ProductInfo.Price,{className:ne["mc--footer--total--info"],label:m.title,value:m.value})]})]},f))})};pu.displayName="MiniCart.Modal.Footer.Resume.Items";const fu=()=>{var o,a,i;const{totalizers:e}=jt(),t=((o=e.find(c=>c.id==="Items"))==null?void 0:o.value)??0,n=(a=e.find(c=>c.id==="Discounts"))==null?void 0:a.value,s=(i=e.find(c=>c.id==="Shipping"))==null?void 0:i.value;return r.jsx(pu,{discount:n??0,total:t,shipping:s})};fu.displayName="MiniCart.Modal.Footer.Totals";const hu=({ICONS:e,MINICART_CONFIG:t})=>{const{isMobile:n}=re(),{cartStore:{items:s}}=be(),o=s.reduce((a,i)=>a+(i.quantity??0),0);return r.jsx(d.Modal.Header,{navigation:"top",className:ne["mc--header"],children:r.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!n,children:[r.jsx(d.Modal.Title,{navigation:"top",title:t.messages.title}),r.jsx("span",{className:ne["mc--header--subtitle"],children:o!==1?`[${o}] Produtos`:`[${o}] Produto`}),r.jsx(d.Button,{"data-close":!0,iconNameStart:e.close,size:"small",variant:"tertiary"})]})})};hu.displayName="MiniCart.Modal.Header";const _u=({ICONS:e,MINICART_CONFIG:t})=>{const{cartStore:{shippingData:n},shipping:s,removeCEP:o}=be(),{sendDataLayerEvent:a}=ae(),[i,c]=g.useState(!1),[l,u]=g.useState(!1),m=g.useCallback(()=>{var C;const b=((C=n==null?void 0:n.address)==null?void 0:C.postalCode)??"";return b.length===8&&!b.includes("-")?`${b.slice(0,5)}-${b.slice(5)}`:b},[n]),[f,p]=g.useState(!!m()),h=()=>{p(!1),c(!1)},_=b=>{var C;if(typeof b=="object"&&(b!=null&&b.logisticsInfo))return(C=b.logisticsInfo)==null?void 0:C.reduce((j,v)=>{var T;const P=(T=v==null?void 0:v.slas)==null?void 0:T.find(A=>(A==null?void 0:A.id)===(v==null?void 0:v.selectedSla));if(!P)return j;const E=parseInt(String((P==null?void 0:P.shippingEstimate)??"").replace("bd","")),S=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=E.toString(),j.shipping=S,j.flag_retirada=(v==null?void 0:v.selectedDeliveryChannel)==="delivery"?"false":"true",j;const I=parseInt(j.delivery_time??"0");return E>I&&(j.delivery_time=E.toString()),j.shipping=(j.shipping??0)+S,j},{shipping_tier:void 0,delivery_time:void 0,flag_retirada:void 0,shipping:void 0,currency:"BRL"})},y=async b=>{const C=b.replace(/\D/g,"");if(C.length!==8)return!1;try{return!(await vt.get(`https://viacep.com.br/ws/${C}/json/`)).data.erro}catch{return!1}},x=async b=>{if(u(!0),!!m()||!(b!=null&&b.trim())){await o(),h(),u(!1);return}if(!await y(b)){c(!0),p(!1),u(!1);return}try{const P=await s(b);if(c(!1),P){p(!0);const E=_(P);E&&a({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:E}})}}catch{c(!0)}finally{u(!1)}};return r.jsx(De.Field,{hasSuccess:f,hasError:i,isLoading:l,onHandler:x,title:`${t.messages.shipping_calculation_placeholder}`,type:"cep",value:m(),ICONS:e,MINICART_CONFIG:t})};_u.displayName="MiniCart.Shipping";const gu=()=>{var n,s;const{data:e}=be(),t=(s=(n=e==null?void 0:e.flags)==null?void 0:n.flagCart)==null?void 0:s.flagHeader;return t!=null&&t.value?r.jsx(d.Tag,{variant:"tertiary",title:t==null?void 0:t.value,size:"small",adornment:{start:t!=null&&t.enableIcon&&(t!=null&&t.icon)?r.jsx(d.Icon,{name:t==null?void 0:t.icon,style:{color:t==null?void 0:t.iconColor}}):null},style:{background:t==null?void 0:t.tagColor,color:t==null?void 0:t.textColor,width:"100%"},children:t==null?void 0:t.value}):null};gu.displayName="MiniCart.TagMessage";const De={Body:uu,Card:nu,Cashback:ru,CouponSeller:su,Discount:mu,Field:iu,Feedback:ou,Shipping:_u,Footer:du,Header:hu,TagMessage:gu,Totals:fu},zh=({ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:n,PLP_NOT_RESULT:s,TEXTURE_IMAGE:o,TIPBAR_CONFIGS:a,TOGGLE_STYLE_MODIFIER:i,Z_INDEX_WAR:c,storeConfig:l,minicartStyleModifiers:u})=>{const{isOpen:m,setIsOpen:f}=be(),{isMobile:p}=re();return r.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(ne["minicart--modal-modifier"],u),isMobile:!0,isOpen:m,setIsOpen:f,style:{zIndex:c.modal},variant:p?"sideBottom":"sideRight",children:[r.jsx(De.Header,{ICONS:e,MINICART_CONFIG:t}),r.jsx(De.Body,{ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:n,PLP_NOT_RESULT:s,TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:i,TIPBAR_CONFIGS:a,children:r.jsx(De.TagMessage,{})}),r.jsxs(De.Footer,{MINICART_CONFIG:t,storeConfig:l,children:[r.jsxs(De.Discount,{ICONS:e,MINICART_CONFIG:t,Z_INDEX_WAR:c,children:[r.jsx(De.CouponSeller,{type:"seller",ICONS:e,MINICART_CONFIG:t}),r.jsx(De.CouponSeller,{type:"coupon",ICONS:e,MINICART_CONFIG:t}),r.jsx(De.Shipping,{ICONS:e,MINICART_CONFIG:t})]}),r.jsx(De.Totals,{})]}),r.jsx(Kl,{ICONS:e})]})},yu=({tipBar:e,minicartStyleModifiers:t,menuV2:n,storeConfig:s,className:o})=>{const{structureRef:a,rootRef:i,CONSTANTS:c}=Pe(),{header:{HEADER_CONFIGS:l,Z_INDEX_WAR:u},minicart:m}=c;return r.jsx(d.Header.Structure,{innerRef:a,adornment:{start:e},style:{position:"sticky",top:0,zIndex:u.header},className:d.helpers.classNameConcat($s["header-animation"],o),children:r.jsxs(d.Header.Root,{innerRef:i,style:{zIndex:u.header},variant:l.default_variant,interactiveVariant:l.interactive_variant,children:[n??r.jsxs(bh,{children:[r.jsx("div",{className:H.responsive["responsive-mobile-block"],style:{height:"100%",width:"100%",zIndex:u.header_mobile},children:r.jsx(Wl,{storeConfig:s})}),r.jsx("div",{className:H.responsive["responsive-desktop-block"],style:{height:"100%",width:"100%",zIndex:u.header_desktop},children:r.jsx(Al,{storeConfig:s})})]}),r.jsx(Rh,{children:r.jsx(zh,{...m,minicartStyleModifiers:t})}),r.jsx(Ms,{title:"Produto adicionado à sua sacola!",CONSTANTS:c.addToCart})]})})};yu.displayName="Header";const Bh="_shippingFreight_6z8rf_6",Uh="_shippingFreight__postalCodeGrid_6z8rf_10",$h="_shippingFreight__grid_6z8rf_14",Hh="_shippingFreight__grid__title_6z8rf_18",qh="_shippingFreight__grid__remember_6z8rf_29",Vh="_postalCodeContainer_6z8rf_44",Wh="_deliveryStatusBar__tag_6z8rf_49",Gh="_deliveryStatusBarError__tag_6z8rf_66",Kh="_deliveryInfo_6z8rf_74",Xh="_deliveryInfo__content_6z8rf_78",Yh="_deliveryInfo__text_6z8rf_84",Qh="_deliveryInfo__title_6z8rf_89",Zh="_deliveryInfo__subtitle_6z8rf_99",Jh="_deliveryInfo__tooltipIcon_6z8rf_109",e_="_deliveryInfo__tooltip_6z8rf_109",t_="_freightGrid_6z8rf_148",n_="_freightContainer_6z8rf_155",r_="_freightOption__content_6z8rf_160",s_="_freightOption__value_6z8rf_166",o_="_freightOption__title_6z8rf_177",a_="_freightOption__title_item_6z8rf_181",i_="_freightOption__paragraph_6z8rf_192",de={shippingFreight:Bh,shippingFreight__postalCodeGrid:Uh,shippingFreight__grid:$h,shippingFreight__grid__title:Hh,shippingFreight__grid__remember:qh,postalCodeContainer:Vh,deliveryStatusBar__tag:Wh,deliveryStatusBarError__tag:Gh,deliveryInfo:Kh,deliveryInfo__content:Xh,deliveryInfo__text:Yh,deliveryInfo__title:Qh,deliveryInfo__subtitle:Zh,deliveryInfo__tooltipIcon:Jh,deliveryInfo__tooltip:e_,freightGrid:t_,freightContainer:n_,freightOption__content:r_,freightOption__value:s_,freightOption__title:o_,freightOption__title_item:a_,freightOption__paragraph:i_,"input-modifier":"_input-modifier_6z8rf_207","freight--tooltip":"_freight--tooltip_6z8rf_227"},c_=({icon:e,title:t,subtitle:n,packageCount:s,packageUnit:o="",labelDescription:a,freightConfig:i,toolTipZIndex:c})=>{const[l,u]=g.useState(!1),m=g.useRef(null),f=()=>u(p=>!p);return r.jsxs("div",{className:de.deliveryInfo,ref:m,children:[r.jsx(d.Tooltip.Root,{arrow:"bottom",component:r.jsx("div",{children:r.jsx("p",{children:i.messages.select_size_tag})}),id:"freight--tooltip",className:de["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:m.current}),r.jsxs("div",{className:de.deliveryInfo__content,children:[r.jsx("div",{className:de.deliveryInfo__icon,children:r.jsx(d.Icon,{name:e,size:"medium"})}),r.jsxs("div",{className:de.deliveryInfo__text,children:[r.jsxs("span",{className:de.deliveryInfo__title,children:[t," ",s," ",o]}),n&&r.jsx("span",{className:de.deliveryInfo__subtitle,children:n})]}),a&&r.jsxs("div",{className:de.deliveryInfo__tooltipIcon,onMouseEnter:f,onMouseLeave:f,"aria-label":"Mostrar descrição",children:[r.jsx("span",{children:r.jsx(d.Icon,{name:i.icons.feedback_help,size:"small"})}),l&&r.jsx("div",{className:de.deliveryInfo__tooltip,children:a})]})]})]})},l_=({value:e,title:t,paragraph:n})=>r.jsx("div",{className:de.freightOption,children:r.jsxs("div",{className:de.freightOption__content,children:[r.jsx("span",{className:de.freightOption__value,children:e}),r.jsx("span",{className:de.freightOption__title,children:r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{className:de.footer__item,children:[r.jsx("span",{className:de.freightOption__title_item,children:t}),n&&r.jsx("span",{className:de.freightOption__paragraph,children:n})]})})})]})}),u_=({children:e})=>r.jsx("div",{className:de.freightContainer,children:e}),d_=({children:e})=>r.jsx("div",{className:de.freightGrid,children:e}),m_=({children:e})=>r.jsx("div",{className:de.postalCodeContainer,children:e}),Qo=({message:e,seller:t="",size:n="small",setError:s})=>r.jsx("div",{className:s?de.deliveryStatusBarError:de.deliveryStatusBar,children:r.jsxs(d.Tag,{title:e,className:s?de.deliveryStatusBarError__tag:de.deliveryStatusBar__tag,size:n,children:[e," ",!s&&t]})}),p_=e=>{const t=parseInt(e,10);return t===1?`${t} dia`:`${t} dias`},f_=e=>{var n,s,o;const t=[];return(o=(s=(n=e==null?void 0:e.logisticsInfo)==null?void 0:n[0])==null?void 0:s.slas)==null||o.forEach(a=>{t.push({id:a.id,name:a.name,price:a.price,shippingEstimate:a.shippingEstimate})}),t},h_=({component:e,parent:t,top:n,left:s,target:o,contentRef:a,freightConfig:i,toolTipZIndex:c=999,...l})=>{const{isMobile:u}=re();return r.jsx(r.Fragment,{children:u?r.jsx(d.Tooltip.Root,{arrow:"bottom",component:r.jsxs("div",{...l,ref:a,children:[e,r.jsx("p",{children:i.messages.select_size_tag})]}),id:"freight--tooltip",className:de["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:t}):r.jsx(d.Tooltip.Root,{arrow:"bottom",component:r.jsxs("div",{...l,ref:a,children:[e,r.jsx("p",{children:i.messages.select_size_tag})]}),id:"freight--tooltip",className:de["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-110%",left:"3%",parent:t})})},__=({onUpdateFreightItems:e,sellerId:t,size:n,skuId:s,quantity:o,setError:a,setIsButtonClicked:i,component:c,freightConfig:l,toolTipZIndex:u})=>{var k,O,Y,D;const m=jt(),f=jt(U=>U.shipping),[p,h]=g.useState(),[_,y]=g.useState(!1),[x,b]=g.useState(!1),[C,j]=g.useState(!1),v=(O=(k=m.shippingData)==null?void 0:k.address)==null?void 0:O.postalCode,P=!(p!=null&&p.length)&&v?v:p,E=g.useRef(null),S=async U=>{const Q=U.target.value.replace(/\D/g,"").slice(0,8);Q.length>5?h(Q.replace(/^(\d{5})(\d{1,3})/,"$1-$2")):h(Q)},I=async U=>{const B=U.target.value.replace(/\D/g,"");try{if((await vt.get(`https://viacep.com.br/ws/${B}/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.")}},T=async()=>{y(!0);try{const U=await vt.post("/api/checkout/simulation",{items:[{id:s,quantity:o,seller:t}],country:"BRA",postalCode:P});e(f_(U.data))}catch(U){console.error("Erro ao atualizar o documento:",U)}finally{y(!1),f(P,"BRA")}},A=async()=>{if(!s){j(!0),setTimeout(()=>j(!1),1500);return}await I({target:{value:P}}),_||(T(),i(!0))};return r.jsxs("div",{ref:E,style:{position:"relative"},children:[!s&&C?r.jsx(h_,{component:c,isOpen:C,parent:E.current,toolTipZIndex:u,freightConfig:l}):r.jsx(r.Fragment,{}),r.jsx("div",{style:{position:"relative"},children:r.jsx(d.TextField.Structure,{title:"structure",style:{width:"100%"},input:r.jsx(d.TextField.Input,{defaultValue:(D=(Y=m.shippingData)==null?void 0:Y.address)==null?void 0:D.postalCode,label:l.messages.text_input_label,title:"textfield",value:p,sizeVariant:n,onMouseOver:()=>s?null:j(!0),onMouseOut:()=>s?null:j(!1),mode:"simple",onChange:S,onKeyDown:U=>{U.key==="Enter"&&A()},className:de["input-modifier"],feedback:x?"error":"none"}),right:r.jsx(d.Button,{onClick:A,size:n,title:"button",children:_?r.jsx(d.Spinner,{size:"small",indicatorColor:"#ffffff"}):l.messages.text_input_btn})})})]})},g_=({children:e,freightConfig:t})=>r.jsxs("div",{className:de.shippingFreight,children:[r.jsxs("div",{className:de.shippingFreight__grid,children:[r.jsx("span",{className:de.shippingFreight__grid__title,children:t.messages.title}),r.jsx("span",{className:de.shippingFreight__grid__remember,children:r.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})})]}),r.jsx("div",{className:de.shippingFreight__postalCodeGrid,children:e})]}),y_=({children:e})=>r.jsx("div",{className:de.freightContainer,children:e}),xu=({className:e,sellerId:t,skuId:n,quantity:s,size:o,seller:a,local:i,CONSTANTS_PROPS:c})=>{const{sendDataLayerEvent:l}=ae(),[u,m]=g.useState(""),[f,p]=g.useState([]),[h,_]=g.useState(""),[y,x]=g.useState(!1),b=j=>m(j),C=j=>{p(j),l({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:{shippings:j.map(v=>({shipping_tier:v.id,delivery_time:v.shippingEstimate.replace("bd",""),flag_pickup:v.name.toLowerCase().includes("retirada")?"true":"false",shipping:v.price,currency:c.currency||"BRL"}))}}})};return r.jsxs(y_,{className:e,children:[r.jsxs(g_,{freightConfig:c.freightConfig,children:[r.jsx(m_,{children:r.jsx(__,{onUpdateFreightItems:C,skuId:n,quantity:s,size:o,sellerId:t,local:i,setError:_,setIsButtonClicked:x,freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex})}),h?r.jsx(Qo,{size:o,message:h,setError:_}):f.length>0&&r.jsx(Qo,{size:o,message:c.freightConfig.messages.delivered_by,seller:a})]}),y&&!h?f.length>0&&r.jsxs(u_,{children:[r.jsx(d_,{children:f.filter(({id:j})=>!j.includes("Retirada")).map(j=>r.jsx(l_,{id:j.id,value:H.freightParsePrice({valueInCents:j.price,hasFree:!1,freeTaxMessage:c.freightConfig.messages.free_tax}),title:j.name,paragraph:`${c.freightConfig.messages.prefix_days}${p_(j.shippingEstimate)}`,radioValue:u,changeValue:b},j.id))}),c.deliveryInfoBoxesAllowed?r.jsx(c_,{icon:c.freightConfig.icons.delivery_truck,packageUnit:c.freightConfig.messages.unit_amout,title:c.freightConfig.messages.delivered_amount_packages,subtitle:"",packageCount:1,labelDescription:"Label",freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex??999}):r.jsx(r.Fragment,{})]}):null]})},St={"pcd-navigation--breadcrumb":"_pcd-navigation--breadcrumb_1243w_1","pdc-navigation--content":"_pdc-navigation--content_1243w_28","pdc-navigation--filters":"_pdc-navigation--filters_1243w_54","pdc-navigation--filters--content":"_pdc-navigation--filters--content_1243w_67","pdc-navigation--selected":"_pdc-navigation--selected_1243w_139","pdc-navigation--selected--container":"_pdc-navigation--selected--container_1243w_152","pdc-navigation":"_pdc-navigation_1243w_28"},x_=({children:e,href:t,isLast:n,title:s,ICONS:o})=>r.jsx(d.BreadCrumb.Item,{adornment:{end:n&&r.jsx(d.Icon,{name:o.arrow_right})},children:n?r.jsx(ze,{href:t??"/",size:"medium",title:s,disableUnderline:!0,children:e}):e}),vu=()=>{var a;const{state:e}=Be(),{ICONS:t}=Me(),n=e!=null&&e.term&&e.term.length>0?`/${e.term}`:"",s=decodeURIComponent((a=e==null?void 0:e.base)!=null&&a.length?e.base:n??n).slice(1).split("/"),o=Bi(s);return r.jsx("div",{className:St["pcd-navigation--breadcrumb"],children:r.jsx(d.BreadCrumb.DivWrapper,{children:r.jsx(d.BreadCrumb.List,{children:Array.isArray(o)&&o.map((i,c)=>{var l,u;return g.createElement(x_,{...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," "))})})})})};vu.displayName="PLPNavigation.BreadCrumb";const bu=({children:e,...t})=>r.jsxs("div",{...t,className:St["pdc-navigation--content"],children:[r.jsx(ht.Filters,{}),e]});bu.displayName="PLPNavigation.Content";const v_="_sort_35wro_1",Kn={sort:v_,"sort-list-wrapper":"_sort-list-wrapper_35wro_8","sort-list":"_sort-list_35wro_8","sort-button":"_sort-button_35wro_25"},b_=({children:e,sortListOpen:t,btnAdornment:n,style:s,...o})=>r.jsx(d.Button,{...o,adornment:{end:t?n==null?void 0:n.listOpen:n==null?void 0:n.listClosed},size:"small",variant:"tertiary",style:{...s,textDecoration:"none"},className:Kn["sort-button"],children:e}),j_=e=>r.jsx(d.RadioButton.Radio,{...e}),C_=({children:e,className:t,name:n,...s})=>r.jsx(d.RadioButton.Group,{...s,name:n||"sort-group",className:d.helpers.classNameConcat(Kn["sort-list"],t),children:e}),S_=({children:e,className:t,shadow:n=!0,padding:s="small",height:o="fit-content",...a})=>r.jsx(d.Card,{...a,shadow:n,className:d.helpers.classNameConcat(Kn["sort-list-wrapper"],t),padding:s,height:o,children:e}),ju=g.forwardRef(({children:e,className:t,...n},s)=>r.jsx("div",{...n,ref:s,className:d.helpers.classNameConcat(Kn.sort,t),children:e}));ju.displayName="SortRoot";const Xn=({handleSelectValue:e,sortListOpen:t,setSortListOpen:n,searchParams:s,ICONS:o,...a})=>{var p;const i=(p=s==null?void 0:s.get("sort"))==null?void 0:p.replace(":","_"),[c,l]=g.useState(i),{sendDataLayerEvent:u}=ae();g.useEffect(()=>{l(i||void 0)},[i]);const{ref:m}=Pl(()=>n(!1)),f=h=>{const _=h.target.value;l(_),typeof e=="function"&&e(_),u({functionKey:"filterEvent",data:{customData:{ordering:Ht.options[_]}}}),n(!1)};return r.jsxs(ju,{...a,ref:m,children:[r.jsx(b_,{btnAdornment:{listOpen:r.jsx(d.Icon,{name:o.arrow_up,size:"small"}),listClosed:r.jsx(d.Icon,{name:o.arrow_down,size:"small"})},sortListOpen:t,onClick:()=>n(!t),children:c?Ht.options[c]:Ht.placeholder},"sort-button"),t&&r.jsx(S_,{children:r.jsx(C_,{name:"sort-group",value:c??"",onChange:f,children:Object.keys(Ht.options).map(h=>r.jsx(j_,{label:Ht.options[h],value:h},h))})})]})};Xn.displayName="Sort";const Cu=g.createContext({}),E_=({children:e,...t})=>{const[n,s]=g.useState(!1);return r.jsx(Cu.Provider,{value:g.useMemo(()=>({...t,openOrderBy:n,setOpenOrderBy:s}),[t,n,s]),children:e})},P_=()=>{const e=g.useContext(Cu);if(e===void 0)throw new Error("usePLPNavigationContext must be used within a PDCNavigationProvider");return e},Su=()=>{const{openOrderBy:e,onSort:t,setOpenFilters:n,setOpenOrderBy:s}=P_(),{ICONS:o,PDC_NAVIGATION:a,searchParams:i}=Me();return r.jsxs("div",{className:St["pdc-navigation--filters"],children:[r.jsx(ht.BreadCrumb,{}),r.jsxs("div",{className:St["pdc-navigation--filters--content"],children:[r.jsx(Xn,{handleSelectValue:c=>t(c??"release_desc"),sortListOpen:e,setSortListOpen:s,ICONS:o,searchParams:i}),r.jsx(d.Button,{adornment:{end:r.jsx(d.Icon,{name:o.arrow_down})},onClick:()=>n(!0),size:"small",variant:"tertiary",children:a.filter_button}),r.jsx(ht.Total,{})]})]})};Su.displayName="PLPNavigation.Filters";const Eu=({children:e,onSort:t,setOpenFilters:n,style:s,...o})=>{const a=g.useRef(null);return r.jsx(E_,{onSort:t,setOpenFilters:n,children:r.jsx("div",{...o,className:St["pdc-navigation"],ref:a,style:{...s},children:r.jsx(ht.Content,{children:e})})})};Eu.displayName="Root";const Pu=({callback:e,selected:t,...n})=>r.jsx("div",{...n,className:St["pdc-navigation--selected"],children:r.jsx("div",{className:St["pdc-navigation--selected--container"],children:Array.isArray(t)?t.map(s=>s.key==="productclusterids"?null:r.jsx(ht.SelectedItem,{callback:e,facet:s},s.value)):null})});Pu.displayName="PLPNavigation.Selected";const qs=({key:e,PLP_FILTERS:t})=>t.some(n=>n.key===e)?e==="cores-filtraveis":!1,Vs=({value:e,PLP_FILTERS_COLORS:t})=>{var n;return((n=t.find(s=>s.value===e))==null?void 0:n.color)??"#F2F2F2"},Nu=({key:e,PLP_FILTERS:t})=>{var n;return(n=t.find(s=>s.key===e))==null?void 0:n.label},Iu=({key:e,PLP_FILTERS:t})=>{var n;return((n=t.find(s=>s.key===e))==null?void 0:n.order)??0},os=({value:e})=>{const[t,n]=e.split(":").length===2?e.split(":"):[0,0],s=H.formatPriceToCurrency(Number(n));return`${H.formatPriceToCurrency(Number(t))} até ${s}`},wu=({items:e})=>{const t=e.flatMap(o=>[o.range.from,o.range.to]),n=Math.min(...t.map(Math.abs)),s=Math.max(...t.map(Math.abs));return[n,s]},Ru=Object.freeze(Object.defineProperty({__proto__:null,checkedColor:qs,createTagPrice:os,getAbsoluteMinMax:wu,getColor:Vs,getName:Nu,getOrder:Iu},Symbol.toStringTag,{value:"Module"})),Ge={"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"},Tu=({columns:e=2,CONSTANTS:t,...n})=>{var a;const{filters:s,onToggleFacet:o}=$t();return r.jsxs("div",{...n,className:Ge["filter--modal--body--content"],children:[Array.isArray(s.facets)&&s.facets.map(i=>r.jsx(ct.Item,{columns:e,facet:i,onToggleFacet:o,CONSTANTS:t},i.key)),!((a=s.facets)!=null&&a.length)&&r.jsx(ct.Empty,{PLP_FILTERS_EMPTY:t.PLP_FILTERS_EMPTY})]})};Tu.displayName="Filter.Item.Content";const Au=({PLP_FILTERS_EMPTY:e})=>{const t=()=>{window.history.back()};return r.jsxs("div",{className:Ge["filter--empty"],children:[r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("h4",{children:e.title}),r.jsx("p",{children:e.subtitle})]}),r.jsx(d.Button,{onClick:()=>t(),variant:"tertiary",children:e.button})]})};Au.displayName="Filter.Empty";const ku=({columns:e,facet:t,onToggleFacet:n,CONSTANTS:s,...o})=>{const a=Iu({key:t.key,PLP_FILTERS:s.PLP_FILTERS}),i=()=>{if(t.__typename==="FacetBoolean"){if(t.key==="cores-filtraveis")return r.jsx(ct.Colors,{onToggleFacet:n,values:t.values,PLP_FILTERS:s.PLP_FILTERS,PLP_FILTERS_COLORS:s.PLP_FILTERS_COLORS});if(t.key==="tamanho")return r.jsx(ct.Sizes,{onToggleFacet:n,values:t.values,PLP_SIZE_ORDER:s.PLP_SIZE_ORDER});if(t.key==="category-2")return r.jsx(ct.Toggle,{columns:e,facetKey:t.key,onToggleFacet:n,values:t.values,ICONS:s.ICONS})}return t.__typename==="FacetRange"?r.jsx(ct.Price,{facet:t}):r.jsx("p",{children:"Filter not support!!!"})};return r.jsx("div",{...o,className:Ge["filter--item"],style:{order:a},children:r.jsxs(d.Accordion.Wrapper,{style:{width:"100%"},children:[r.jsx(d.Accordion.Header,{id:t.key,closeIndicator:r.jsx(d.Icon,{name:s.ICONS.arrow_up}),openIndicator:r.jsx(d.Icon,{name:s.ICONS.arrow_down}),children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h4",{className:"typography-style-body-sm",children:Nu({key:t.key,PLP_FILTERS:s.PLP_FILTERS})})})})}),r.jsx(d.Accordion.Body,{children:i()})]})})};ku.displayName="Filter.Item";const Lu=({onToggleFacet:e,values:t,PLP_FILTERS:n,PLP_FILTERS_COLORS:s,...o})=>r.jsx(et.Root,{...o,children:r.jsx(et.List,{children:Array.isArray(t)&&t.map(({key:a,selected:i,value:c})=>r.jsx(et.Option,{active:i,"data-color":qs({key:a,PLP_FILTERS:n}),fill:Vs({value:c,PLP_FILTERS_COLORS:s}),onClick:()=>e({key:a,value:c}),type:"color"},`${a}-${c}`))})});Lu.displayName="Filter.Item.Color";const Ou=({facet:e,...t})=>{var u,m;const{filters:{selected:n},price:s,onToggleFacet:o}=$t(),[a,i]=(s==null?void 0:s.split(":").map(Number))??[0,100],[c,l]=((m=(u=n==null?void 0:n.find(({key:f})=>f==="price"))==null?void 0:u.value)==null?void 0:m.split(":").map(Number))??[a,i];return r.jsx("div",{...t,className:Ge["filter--item--price"],children:r.jsxs(d.Slider.SliderDual,{format:"price",initialValue:[c<a?a:c,l>i?i:l],min:a,max:i,type:"dual",step:1,onFinish:f=>{var p,h;f&&o({key:"price",value:`${(p=f.range)==null?void 0:p.min}:${(h=f.range)==null?void 0:h.max}`})},children:[r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("p",{"data-min-value":!0})})}),r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("p",{"data-max-value":!0})})})]})})};Ou.displayName="Filter.Item.Price";const Du=({onToggleFacet:e,values:t,PLP_SIZE_ORDER:n,...s})=>{const o=[...t].sort((a,i)=>{const c=n.indexOf(a.name),l=n.indexOf(i.name);return c-l});return r.jsx(et.Root,{...s,children:r.jsx(et.List,{children:Array.isArray(o)&&o.map(({key:a,selected:i,value:c})=>r.jsx(et.Option,{active:i,text:c,type:"size",onClick:()=>e({key:a,value:c})},c))})})};Du.displayName="Filter.Item.Sizes";const Mu=({columns:e,facetKey:t,onToggleFacet:n,values:s,ICONS:o,...a})=>r.jsx("div",{...a,className:Ge["filter--item--toggle"],children:r.jsx("div",{className:Ge["filter--item--toggle--container"],style:{gridTemplateColumns:`repeat(${e}, 1fr)`},children:Array.isArray(s)&&s.map(i=>r.jsx(d.Checkbox,{label:(i==null?void 0:i.name)??"",adornment:r.jsx(d.Icon,{name:o.check}),checked:i.selected,onChange:()=>n(i)},i.value))})});Mu.displayName="Filter.Item.Toggle";const Fu=({...e})=>{const{isLoading:t}=$t();return r.jsx("div",{className:Ge["filter--loading"],"data-active":t,...e,children:r.jsx(d.Spinner,{indicatorColor:"#000",background:"#222"})})};Fu.displayName="Filter.Loading";const zu=({children:e,className:t,isMobile:n=!1,CONSTANTS:{PLP_FILTERS_TITLE:s,ICONS:o}})=>{var m;const{deleteAllFacets:a,filters:i,isOpen:c,target:l,setIsOpen:u}=$t();return r.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(Ge["filter--modal"],t),isMobile:n??!1,isOpen:c,parent:l,setIsOpen:u,variant:n?"sideBottom":"sideRight",style:{zIndex:99},children:[r.jsxs(d.Modal.Header,{navigation:"top",children:[r.jsx(d.Modal.Controls,{navigation:"top",isMobile:n,children:r.jsx(d.Button,{"data-close":!0,iconNameStart:o.close,size:"small",variant:"tertiary",style:{marginLeft:"auto"}})}),r.jsx(d.Modal.Title,{navigation:"top",title:s})]}),r.jsxs(d.Modal.Body,{style:{width:500},children:[r.jsx("div",{className:Ge["filter--modal--body"],children:e}),r.jsx(ct.Loading,{})]}),r.jsx(d.Modal.Footer,{children:r.jsxs("div",{className:Ge["filter--modal--footer"],children:[r.jsx(d.Button,{"data-close":!0,size:"large",variant:"primary",children:(m=i.facets)!=null&&m.length?"ver resultados":"fechar"}),r.jsx(d.Button,{"data-close":!0,onClick:()=>a(),variant:"tertiary",children:"limpar filtros"})]})})]})};zu.displayName="Filter.Modal";const Bu=({children:e,className:t,isMobile:n,CONSTANTS:s,...o})=>r.jsx(lc,{...o,PLP_FILTERS:s.PLP_FILTERS,children:r.jsx(ct.Modal,{className:t,isMobile:n,CONSTANTS:s,children:e})});Bu.displayName="Filter.Root";const Uu=({ICONS:e,PLP_FILTERS_COLORS:t,PLP_FILTERS:n})=>{const{filters:s,onToggleFacet:o}=$t();return r.jsx("div",{className:Ge["filter--selected"],children:r.jsx("div",{className:Ge["filter--selected--content"],children:Array.isArray(s.selected)&&s.selected.map(({key:a,value:i})=>a==="productclusterids"?null:r.jsx(d.Tag,{title:a==="price"?os({value:i}):i,adornment:{end:r.jsx(d.Icon,{name:e.close,size:"x-small"})},colorSquare:Vs({value:i,PLP_FILTERS_COLORS:t}),onClick:()=>o({key:a,value:i}),squareShow:qs({key:a,PLP_FILTERS:n}),size:"medium",variant:"primary",children:a==="price"?os({value:i}):i},i))})})};Uu.displayName="Filter.Selected";const ct={Colors:Lu,Content:Tu,Empty:Au,Modal:zu,Item:ku,Root:Bu,Loading:Fu,Selected:Uu,Price:Ou,Sizes:Du,Toggle:Mu},{checkedColor:N_,createTagPrice:Zo,getColor:I_}=Ru,$u=({callback:e,facet:t})=>{const{ICONS:n,PLP_FILTERS_COLORS:s,PLP_FILTERS:o}=Me();return r.jsx(d.Tag,{title:(t==null?void 0:t.key)==="price"?Zo({value:t.value}):t.value.toUpperCase(),adornment:{end:r.jsx(d.Icon,{name:n.close,size:"x-small"})},colorSquare:I_({value:t.value,PLP_FILTERS_COLORS:s}),onClick:()=>{typeof e=="function"&&e(t,!0)},squareShow:N_({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()})};$u.displayName="PLPNavigation.Selected.Item";const Hu=()=>r.jsx(d.TextStructure.Root,{children:r.jsx("p",{id:"pdc-navigation--total"})});Hu.displayName="PLPNavigation.Total";const ht={BreadCrumb:vu,Content:bu,Filters:Su,Root:Eu,Selected:Pu,SelectedItem:$u,Total:Hu},w_="_footer__bottom_198g6_2",R_="_footer__wrapper_198g6_10",T_="_footer__main_198g6_39",A_="_footer__legalInformation_198g6_55",k_="_footer__column_198g6_77",L_="_footer__columnContent_198g6_87",O_="_footer__item_198g6_91",D_="_footer__itemLink_198g6_107",M_="_footer__columnTitle_198g6_122",F_="_footer__columnTitleIcon_198g6_134",z_="_footer__iconList_198g6_147",B_="_footer__itemSmallText_198g6_157",U_="_payment_198g6_168",$_="_footer__iconContainer_198g6_173",H_="_footer__iconListSubHeader_198g6_178",q_="_accordionWrapper_198g6_200",V_="_accordionHeader_198g6_204",W_="_accordionTextWrapper_198g6_208",me={footer__bottom:w_,footer__wrapper:R_,footer__main:T_,footer__legalInformation:A_,footer__column:k_,footer__columnContent:L_,footer__item:O_,footer__itemLink:D_,footer__columnTitle:M_,footer__columnTitleIcon:F_,footer__iconList:z_,footer__itemSmallText:B_,payment:U_,footer__iconContainer:$_,footer__iconListSubHeader:H_,accordionWrapper:q_,accordionHeader:V_,accordionTextWrapper:W_,"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 qu={},Ws={},Yn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"warnOnce",{enumerable:!0,get:function(){return t}});let t=n=>{};if(process.env.NODE_ENV!=="production"){const n=new Set;t=s=>{n.has(s)||console.warn(s),n.add(s)}}})(Yn);var Vu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImageBlurSvg",{enumerable:!0,get:function(){return t}});function t(n){let{widthInt:s,heightInt:o,blurWidth:a,blurHeight:i,blurDataURL:c,objectFit:l}=n;const u=20,m=a?a*40:s,f=i?i*40:o,p=m&&f?"viewBox='0 0 "+m+" "+f+"'":"",h=p?"none":l==="contain"?"xMidYMid":l==="cover"?"xMidYMid slice":"none";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+p+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='"+u+"'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='"+u+"'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+h+"' style='filter: url(%23b);' href='"+c+"'/%3E%3C/svg%3E"}})(Vu);var Qn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(o,a){for(var i in a)Object.defineProperty(o,i,{enumerable:!0,get:a[i]})}t(e,{VALID_LOADERS:function(){return n},imageConfigDefault:function(){return s}});const n=["default","imgix","cloudinary","akamai","custom"],s={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",localPatterns:void 0,remotePatterns:[],qualities:void 0,unoptimized:!1}})(Qn);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImgProps",{enumerable:!0,get:function(){return h}});const t=Yn,n=Vu,s=Qn,o=["lazy","eager",void 0];function a(_){return _.default!==void 0}function i(_){return _.src!==void 0}function c(_){return typeof _=="object"&&(a(_)||i(_))}const l=new Map;let u;function m(_){return typeof _>"u"?_:typeof _=="number"?Number.isFinite(_)?_:NaN:typeof _=="string"&&/^[0-9]+$/.test(_)?parseInt(_,10):NaN}function f(_,y,x){let{deviceSizes:b,allSizes:C}=_;if(x){const v=/(^|\s)(1?\d?\d)vw/g,P=[];for(let E;E=v.exec(x);E)P.push(parseInt(E[2]));if(P.length){const E=Math.min(...P)*.01;return{widths:C.filter(S=>S>=b[0]*E),kind:"w"}}return{widths:C,kind:"w"}}return typeof y!="number"?{widths:b,kind:"w"}:{widths:[...new Set([y,y*2].map(v=>C.find(P=>P>=v)||C[C.length-1]))],kind:"x"}}function p(_){let{config:y,src:x,unoptimized:b,width:C,quality:j,sizes:v,loader:P}=_;if(b)return{src:x,srcSet:void 0,sizes:void 0};const{widths:E,kind:S}=f(y,C,v),I=E.length-1;return{sizes:!v&&S==="w"?"100vw":v,srcSet:E.map((T,A)=>P({config:y,src:x,quality:j,width:T})+" "+(S==="w"?T:A+1)+S).join(", "),src:P({config:y,src:x,quality:j,width:E[I]})}}function h(_,y){let{src:x,sizes:b,unoptimized:C=!1,priority:j=!1,loading:v,className:P,quality:E,width:S,height:I,fill:T=!1,style:A,overrideSrc:k,onLoad:O,onLoadingComplete:Y,placeholder:D="empty",blurDataURL:U,fetchPriority:B,decoding:Q="async",layout:G,objectFit:$,objectPosition:J,lazyBoundary:se,lazyRoot:ce,...oe}=_;const{imgConf:le,showAltText:M,blurComplete:ee,defaultLoader:w}=y;let W,ie=le||s.imageConfigDefault;if("allSizes"in ie)W=ie;else{var _e;const X=[...ie.deviceSizes,...ie.imageSizes].sort((te,he)=>te-he),L=ie.deviceSizes.sort((te,he)=>te-he),z=(_e=ie.qualities)==null?void 0:_e.sort((te,he)=>te-he);W={...ie,allSizes:X,deviceSizes:L,qualities:z}}if(typeof w>"u")throw new Error(`images.loaderFile detected but the file is missing default export.
|
|
5
|
-
Read more: https://nextjs.org/docs/messages/invalid-images-config`);let
|
|
6
|
-
Read more: https://nextjs.org/docs/messages/next-image-missing-loader`)}else{const
|
|
1
|
+
"use strict";var _m=Object.defineProperty;var gm=(e,t,n)=>t in e?_m(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var cn=(e,t,n)=>gm(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),g=require("react"),R=require("./index-DZ1MbO8M.js"),et=require("idb-keyval"),St=require("zustand"),Br=require("js-cookie"),d=require("@soma-vertical-web/core-components"),yt=require("axios"),Ur=require("@date-fns/tz"),ym=require("jose"),Ot=require("@soma-vertical-web/foundations"),ys=require("react-dom"),Ze=require("draft-js"),ba=require("react-intersection-observer"),vs=g.createContext({}),vm=({data:e,children:t})=>r.jsx(vs.Provider,{value:{tags:e==null?void 0:e.config},children:t}),ht=()=>{const{tags:e}=g.useContext(vs),t=g.useCallback(n=>{var c,l,u,m;const s=(l=(c=e==null?void 0:e.commercial)==null?void 0:c.items)==null?void 0:l.find(p=>{var f;return(f=n??[])==null?void 0:f.find(h=>h.id===p.key)}),o=(m=(u=e==null?void 0:e.institucional)==null?void 0:u.items)==null?void 0:m.find(p=>{var f;return(f=n??[])==null?void 0:f.find(h=>h.id===p.key)}),a=e==null?void 0:e.flagPdp,i=(n==null?void 0:n.find(p=>{var f;return p.id===((f=e==null?void 0:e.flagGoldenPdp)==null?void 0:f.key)}))&&(e==null?void 0:e.flagGoldenPdp);return{commercial:s,institucional:o,flagPdp:a,flagGoldenPdp:i}},[e]);return{tags:e,getAvailableProductTag:t}},ja=({gridScrollBack:e})=>{g.useEffect(()=>{typeof window<"u"&&(e!=null&&e.refer)&&sessionStorage.setItem(e==null?void 0:e.refer,"true")},[])},Ca=g.createContext({}),xm=({children:e,gridScrollBack:t})=>{const n=g.useRef(null);return ja({gridScrollBack:t}),r.jsx(Ca.Provider,{value:{sizesContainerRef:n},children:e})},Sa=()=>{const e=g.useContext(Ca);if(e===void 0)throw new Error("useContext(PDPContext) must be used within a PDPProvider");return e},ut=({event:e,data:t})=>{const n=(window==null?void 0:window.dataLayer)||[];t.ecommerce&&n.push({ecommerce:null}),n.push({...e&&{event:`custom_${e}`},...t})},Ce={configs:{PLP_FILTERS:[{key:"",label:"",eventLabel:"",order:0}],currency:"BRL",categoryOff:"bazar",storeUrl:"https://www.example.com",MAIN_IMAGE:"1",NAME_SPLIT_SYMBOL:"-",VENDOR_CODE:""},productEvents:(e,t)=>{const{event:n,commonData:s,customData:o,promotionInfo:a,itemList:i,outsideEcommerceData:c}=e,{availableSizes:l,sizes:u,price:m}=s,p={...n==="view_item"?{currency:Ce.configs.currency,value:m,grade_disponivel:l??(u?Pa(u):"")}:{},...n==="add_to_wishlist"||n==="remove_from_wishlist"?{value:m,currency:Ce.configs.currency}:{}},f=ln({data:s,customData:{...o,...i,...a},configs:Ce.configs});ut({event:n,data:{...c,ecommerce:{...i,...p,items:[f]}}}),typeof t=="function"&&t(f,p)},productListEvent:e=>{const{commonData:{products:t},promotionInfo:n,itemList:s,outsideEcommerceData:o,customData:a}=e;if(t.length===0)return;const i=t.map(({node:c},l)=>ln({data:{...c},customData:{...n,index:l,...a!=null&&a.item_list_name?{item_list_name:a==null?void 0:a.item_list_name}:s},configs:Ce.configs}));ut({event:"view_item_list",data:{...o,ecommerce:{...a!=null&&a.item_list_name?{item_list_name:a==null?void 0:a.item_list_name}:s,items:i}}})},skuEvents:e=>{const{event:t,commonData:{products:n},customData:s,supportData:{selectedSkus:o,price:a},promotionInfo:i,itemList:c,outsideEcommerceData:l}=e;let u=0;const m=n.map(p=>{var y,v,x,C,j,b,w,S,P;const f=o==null?void 0:o.find(E=>(p.productId??p.id)===E.productId);let h={...i,...c};if(f){const E=Ea(),A=Na(E,f);A&&(h={...h,...A}),t==="add_to_cart"&&(i||c)&&qr({persistedData:E,type:"add",sku:(f==null?void 0:f.id)??(f==null?void 0:f.sku),newData:{promotionInfo:i,itemList:c}}),t==="remove_from_cart"&&qr({persistedData:E,type:"remove",sku:(f==null?void 0:f.id)??(f==null?void 0:f.sku)})}u+=p.price??((x=(v=(y=f==null?void 0:f.offers)==null?void 0:y.offers)==null?void 0:v[0])==null?void 0:x.price)??0;const _=(f==null?void 0:f.size)??R.getColorAndSizeFromSkuName((f==null?void 0:f.skuName)??(f==null?void 0:f.name)??((C=p.itemOffered)==null?void 0:C.skuName),Ce.configs.NAME_SPLIT_SYMBOL).size;return ln({data:p,customData:{...s,...h??{...i,...c},item_sku:(f==null?void 0:f.id)??(f==null?void 0:f.sku)??((j=p.itemOffered)==null?void 0:j.sku),quantity:(s==null?void 0:s.quantity)??p.quantity??1,item_variant2:_,seller_id:(f==null?void 0:f.sellerId)??(f==null?void 0:f.seller)??((P=(S=(w=(b=f==null?void 0:f.offers)==null?void 0:b.offers)==null?void 0:w[0])==null?void 0:S.seller)==null?void 0:P.identifier)??p.seller},configs:Ce.configs})});ut({event:t,data:{...l,ecommerce:{value:a??u,currency:Ce.configs.currency,items:m}}})},filterEvent:e=>{var i;const{commonData:t,customData:n,outsideEcommerceData:s}=e,o={},a={};Array.isArray(t==null?void 0:t.selectedFacets)&&((i=t==null?void 0:t.selectedFacets)!=null&&i.length)&&((t==null?void 0:t.selectedFacets).forEach(({key:c,value:l})=>{var p;const u=((p=Ce.configs.PLP_FILTERS.find(f=>f.key===c))==null?void 0:p.eventLabel)??c,m=(o==null?void 0:o[u])||[];u==="price_range"&&l.replace(":","-"),o[u]=[...m,l]}),Object.keys(o).forEach(c=>a[c]=o[c].join(", "))),ut({event:"filter",data:{...s,...a,...n}})},viewCartEvent:e=>{var m,p,f,h,_,y,v,x,C,j;const{commonData:t,outsideEcommerceData:n}=e,{cartStore:s}=t;if(!s)return;const o=window.localStorage.getItem("persistedCartEventsData"),a=o?JSON.parse(o):{},i=s.items.map(b=>{const{promotionInfo:w,itemList:S}=a[b.id]??{};return ln({data:{...b,price:b.price/100,listPrice:b.listPrice/100},customData:{...w,...S,item_sku:b.id??b.itemOffered.sku,quantity:b.quantity??1},configs:Ce.configs})}),c=(((m=s.totalizers.find(b=>b.name==="Total dos Itens"))==null?void 0:m.value)??0)/100,l=(((p=s.totalizers.find(b=>b.name==="Total dos Descontos"))==null?void 0:p.value)??0)/100,u=((f=s.marketingData)==null?void 0:f.utmiCampaign)===Ce.configs.VENDOR_CODE?(h=s.marketingData)==null?void 0:h.utmCampaign:(y=String((_=s.openTextField)==null?void 0:_.value))==null?void 0:y.split(" - ")[0];ut({event:"view_cart",data:{...n,ecommerce:{currency:Ce.configs.currency,value:c+l,total_discount:Math.abs(l),cep_preenchido:!!((x=(v=s.shippingData)==null?void 0:v.address)!=null&&x.postalCode),...u?{seller_coupon_name:u}:{},...((C=s.marketingData)==null?void 0:C.coupon)&&{sale_coupon_name:(j=s.marketingData)==null?void 0:j.coupon},subtotal:c,items:i}}})},readyEvents:e=>{const{event:t,readyData:n}=e;ut({event:t,data:{...n}})}},Pa=e=>e.reduce((t,n)=>(n.available&&t.push(n.value),t),[]).toString(),bm=e=>{const t=e.length;return{...e&&e.length>0?{item_category:e[0].includes(Ce.configs.categoryOff)?"Bazar":"Coleção",...e[1]?{item_category2:e[1]}:{},...t>2?{item_category3:e[t-1]}:{}}:{}}},ln=({data:e,customData:t,configs:n})=>({...jm(e,n==null?void 0:n.MAIN_IMAGE),...Cm(e),...Sm(e),...Pm(e),...t}),wa=()=>{var e,t;return document?((t=(e=window.document.head.querySelector('meta[name="category"]'))==null?void 0:e.getAttribute("content"))==null?void 0:t.split("_"))??[]:[]},Ea=()=>{const e=window.localStorage.getItem("persistedCartEventsData");return e?JSON.parse(e):null},Na=(e,t)=>e==null?void 0:e[t],qr=({persistedData:e,type:t,sku:n,newData:s})=>{if(!e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({[n]:s}));return}if(e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({...e,[n]:s}));return}e&&t==="remove"&&(delete e[n],window.localStorage.setItem("persistedCartEventsData",JSON.stringify(e)))},jm=(e,t="1")=>{var a,i,c,l,u,m,p,f,h,_,y;const n=e.productReference??e.gtin??e.productRefId,s=e.image??((i=(a=e.items)==null?void 0:a[0])==null?void 0:i.images)??((c=e.itemOffered)==null?void 0:c.image),o=s==null?void 0:s.find(v=>v.alternateName===t||v.imageLabel===t||v.keywords===t);return{item_id:e.productId??((l=e.isVariantOf)==null?void 0:l.productGroupID)??((u=e.isVariationOf)==null?void 0:u.productGroupID)??((p=(m=e.itemOffered)==null?void 0:m.isVariationOf)==null?void 0:p.productGroupID),item_ref:/_\d$/.test(n)?n.slice(0,-2):n,item_name:e.productTitle??e.productName??e.name??R.splitNameAndSizeFromFullName((f=e.itemOffered)==null?void 0:f.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)}},ao=e=>Array.isArray(e)?e.reduce((t,n)=>(n.length>t.length&&(t=n),t),""):e,Cm=e=>{var u,m;const{categories:t,categoriesIds:n}=e,s=t??((u=e.itemOffered)==null?void 0:u.categories),o=n??((m=e.itemOffered)==null?void 0:m.categoriesIds),a=ao(s),i=ao(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]}}},Sm=e=>{var o,a,i,c,l,u;const t=((o=e.itemOffered)==null?void 0:o.skuName)??((c=(i=(a=e.isVariantOf)==null?void 0:a.hasVariant)==null?void 0:i[0])==null?void 0:c.name)??((u=(l=e.items)==null?void 0:l[0])==null?void 0:u.name),{color:n,size:s}=R.getColorAndSizeFromSkuName(t,Ce.configs.NAME_SPLIT_SYMBOL);return{item_variant:n,...e.itemOffered&&{item_variant2:s}}},Pm=e=>{var l,u;const{price:t,listPrice:n,installments:s}=e,o=t??((l=e.offers)==null?void 0:l.lowPrice)??0,a=n??((u=e.offers)==null?void 0:u.highPrice)??0,i=a?a-o:0,c=i%1===0?i:Number(i.toFixed(2));return{...t&&{price:o??a},...a&&{list_price:a,discount:c},...s&&{installments:s==null?void 0:s.count,installment_value:s==null?void 0:s.value},item_currency:Ce.configs.currency}},Ia=()=>{const[e,t]=wa(),[n,s]=e.split("-"),o=n.includes("shop")||n.includes("sale")?n:"";return{page_category:o&&s?s:"",page_departament:o,id:t,name:e}},wm=Object.freeze(Object.defineProperty({__proto__:null,eventsFunctions:Ce,findDataInPersistedData:Na,getAvailablesSizes:Pa,getCategories:bm,getPageCategoryAndDepartmentFromSlug:Ia,getPersistedData:Ea,getProductListInfoFromHead:wa,pushDatalayer:ut,updatePersistedData:qr},Symbol.toStringTag,{value:"Module"})),Ra=g.createContext({}),Em=({children:e,evtFunctionsConfigs:t})=>{const n=g.useRef({}),s=g.useRef(null),o=g.useRef(null),a=g.useRef({}),i=g.useRef({trigger:!1,index:0}),c=({functionKey:m,data:p,callBack:f,timeout:h=100})=>{window.dataLayer||(window.dataLayer=[]),Ce.configs=t;try{typeof Ce[m]=="function"&&setTimeout(()=>{var _;p.promotionInfo=n.current,(_=o.current)!=null&&_.item_list_name&&(p.itemList=o.current),Ce[m](p,f)},h)}catch(_){ut({event:"error_event",data:{error_message:(_==null?void 0:_.message)??_}})}},l=({content:m})=>{c({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:m.replace("::",":")}}})},u=({updatePromotionRef:m,promotion:p,index:f})=>{m&&(n.current={...p}),c({functionKey:"readyEvents",data:{event:"select_promotion",readyData:{ecommerce:{...p,...f!==void 0&&{index:f}}}}})};return r.jsx(Ra.Provider,{value:{sendDataLayerEvent:c,triggerSelectItemEventRef:i,promotionEventRef:n,currentLocalRef:s,itemListRef:o,cartProductsFullDataRef:a,handleSelectContent:l,handleSelectPromotionEvent:u},children:e})},oe=()=>g.useContext(Ra),Ta=g.createContext({}),Nm=({children:e,productData:t,isKit:n,PDP_INFO:s,NAME_SPLIT_SYMBOL:o,TEXTURE_IMAGE:a})=>{var D,q;const{sendDataLayerEvent:i,triggerSelectItemEventRef:c}=oe(),{productId:l,productName:u,items:m,items:[{images:p,Videos:f}],description:h,["Composição"]:_="",productReference:y,categories:[v]}=t,{getAvailableProductTag:x}=ht(),C=x(Object.entries(t.clusterHighlights).map(U=>({id:U[0],name:U[1]}))),j=v.slice(1,-1).split("/"),{installments:b,price:w,listPrice:S,sizes:P,allSizesAvailable:E}=R.getSkuInfos({items:m,NAME_SPLIT_SYMBOL:o}),A=R.getThumbImage({images:p,TEXTURE_IMAGE:a}),O=[{label:`${s.product.description}`,value:"description",content:h},{label:`${s.product.materiais}`,value:"composition",content:_}],k=((q=R.getColorAndSizeFromSkuName((D=t.items)==null?void 0:D[0].name,o))==null?void 0:q.color)??t["Cores Filtráveis"][0]??"",M=()=>({commonData:{...t,sizes:P,price:w,listPrice:S,installments:b},customData:{installments:b==null?void 0:b.count,installment_value:Number(b==null?void 0:b.value).toFixed(2)}}),Q=({sku:U,size:Y})=>{const{commonData:G,customData:H}=M();i({functionKey:"productEvents",data:{event:"view_item",commonData:G,customData:{...H,...U&&{item_sku:U},...Y&&{item_variant2:Y}}}})};return g.useEffect(()=>{if(c.current.trigger){const{commonData:U,customData:Y}=M();i({functionKey:"productEvents",data:{event:"select_item",commonData:U,customData:{...Y,index:c.current.index}}}),c.current.trigger=!1}Q({})},[]),r.jsx(Ta.Provider,{value:{productData:t,productId:l,productName:u,productReference:y,tag:C,items:m,sizes:P,allSizesAvailable:E,installments:b,price:w,listPrice:S,thumbImage:A,images:p,video:f[0],descriptionContent:O,breadcrumbList:j,isKit:n,colorName:k,handleViewItemEvent:Q},children:e})},Le=()=>{const e=g.useContext(Ta);if(e===void 0)throw new Error("useContext(PDPDataContext) must be used within a PDPDataProvider");return e},Im=()=>{const[e,t]=g.useState(null);return[e,async s=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(s),t(s),!0}catch(o){return console.warn("Copy failed",o),t(null),!1}}]},Aa=()=>{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)}},[])},Rm=typeof window>"u",Tm=(e,t)=>{const[n,s]=g.useState(()=>{if(Rm)return null;const a=localStorage.getItem(e);return a===null?t:JSON.parse(a||"{}")});return g.useEffect(()=>{const a=i=>{i.storageArea===localStorage&&i.key===e&&s(JSON.parse(i.newValue))};return window.addEventListener("storage",a),()=>{window.removeEventListener("storage",a)}},[e,t]),[n,a=>{s(i=>{const c=typeof a=="function"?a(i):a;return localStorage.setItem(e,JSON.stringify(c)),c})}]};function xs(e,t,n){const[s,o]=g.useState(!1),{threshold:a}=n||{};return g.useEffect(()=>{if(!e.current)return()=>null;let i=null;const c=new IntersectionObserver(([l])=>{if(n!=null&&n.delay){i&&clearTimeout(i),i=setTimeout(()=>{o(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},n.delay);return}o(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},{threshold:a||1});return c.observe(e.current),()=>{c.disconnect()}},[e]),s}const Fn=({callback:e,onEnterViewportOnce:t,options:n})=>{const s=g.useRef(null);return g.useEffect(()=>{const o=s.current;if(!o)return;const a=new IntersectionObserver(([i])=>{i.isIntersecting&&typeof e=="function"&&(e(),t&&(a.unobserve(o),a.disconnect()))},n);return a.observe(o),()=>{t&&a.unobserve(o),a.disconnect()}},[e,t,n]),{element:s}},Oa=({defaultScale:e=1,maxScale:t=3})=>{const n=g.useRef(null),s=g.useRef(null),[o,a]=g.useState(e),i=g.useRef(0),c=g.useRef({x:0,y:0}),l=g.useRef({x:0,y:0}),u=()=>{if(!s.current||!n.current)return{minX:0,maxX:0,minY:0,maxY:0};const h=n.current.getBoundingClientRect(),_=s.current.children[0].getBoundingClientRect(),y=_.width,v=_.height,x=Math.min(0,(h.width-y)/2),C=Math.max(0,(y-h.width)/2),j=Math.min(0,(h.height-v)/2),b=Math.max(0,(v-h.height)/2);return{minX:x,maxX:C,minY:j,maxY:b}},m=(h,_,y)=>{if(s.current){const v=s.current.children[0];v&&requestAnimationFrame(()=>{v.style.transform=`translate(calc(-50% + ${h}px), calc(-50% + ${_}px)) scale(${y})`})}},p=g.useCallback(h=>{const{minX:_,maxX:y,minY:v,maxY:x}=u(),{x:C,y:j}=l.current,b=Math.max(_,Math.min(y,C)),w=Math.max(v,Math.min(x,j));if(h.touches.length>1){const S=h.touches[0],P=h.touches[1],E=S.pageX-P.pageX,A=S.pageY-P.pageY;i.current=Math.sqrt(E*E+A*A),c.current={x:(S.pageX+P.pageX)/2,y:(S.pageY+P.pageY)/2}}else h.touches.length===1&&(c.current={x:h.touches[0].pageX-b,y:h.touches[0].pageY-w})},[o,l]),f=g.useCallback(h=>{if(!s.current||!n.current)return;const{minX:_,maxX:y,minY:v,maxY:x}=u();if(h.touches.length>1){h.preventDefault();const C=h.touches[0],j=h.touches[1],b=C.pageX-j.pageX,w=C.pageY-j.pageY,S=Math.sqrt(b*b+w*w);if(!i.current){i.current=S;return}const P=S/i.current,E=Math.max(1,Math.min(t,o*P));if(o===E)return;a(E);const A=(C.pageX+j.pageX)/2,O=(C.pageY+j.pageY)/2;let k=A-c.current.x,M=O-c.current.y;k=Math.max(_,Math.min(y,k)),M=Math.max(v,Math.min(x,M)),l.current={x:k,y:M},i.current=S,m(k,M,E)}else if(h.touches.length===1){const C=h.touches[0].pageX,j=h.touches[0].pageY;let b=C-c.current.x,w=j-c.current.y;b=Math.max(_,Math.min(y,b)),w=Math.max(v,Math.min(x,w)),l.current={x:b,y:w},m(b,w,o)}},[t,o]);return g.useEffect(()=>(document.addEventListener("touchstart",p),document.addEventListener("touchmove",f,{passive:!1}),()=>{document.removeEventListener("touchstart",p),document.removeEventListener("touchmove",f)}),[f,p]),{containerRef:n,imgRef:s,scale:o}},Am={attachment:"ATTACHMENT",specification:"SPECIFICATION",attribute:"ATTRIBUTE"},Ve=Promise.resolve(!1),Hr={id:"",isOpen:!1,items:[],loading:!1,marketingData:null,messages:[],openTextField:{},paymentData:null,shippingData:null,totalizers:[],itemMetadata:[],recentlyAddedProducts:[],addCoupon:()=>Ve,addItem:()=>Ve,addSellerCode:()=>Ve,addMarketingData:()=>Ve,emptyCart:()=>({}),removeItem:()=>Ve,setIsOpen:()=>({}),shipping:()=>Ve,shippingUpdate:()=>Ve,toggleServiceToProduct:()=>Ve,updateItemQuantity:()=>Ve,insertProfileEmail:()=>Ve,setRecentlyAddedProducts:()=>({})},bs=e=>e===0,La=(e,t)=>{if(!e||e.length===0)return[];let n="";const s=[],o=e.match(/\d+/g)??[];for(const a of o){const i=t[Number(a)];i&&(n+=(n?"/":"")+i,s.push(n))}return s},ka=(e,t)=>{const{availability:n,additionalInfo:{brandName:s},bundleItems:o,id:a,uniqueId:i,detailUrl:c,ean:l,imageUrl:u,name:m,listPrice:p,quantity:f,price:h,priceDefinition:_,productCategories:y,productCategoryIds:v,productId:x,refId:C,seller:j,referenceId:b,offerings:w,productRefId:S,skuName:P,sellingPrice:E}=e;return{availability:n,bundleItems:o,referenceId:b,productRefId:S,id:a,ean:l,uniqueId:i,itemOffered:{additionalProperty:[],brand:{name:s},categories:La(v,y),categoriesIds:v,gtin:C,image:[{alternateName:(t==null?void 0:t.MAIN_IMAGE)??"1",url:u}],name:m,isVariationOf:{name:m,productGroupID:x},sku:a,slug:c,skuName:P},listPrice:p,quantity:f,offerings:w,price:h,priceDefinition:_,sellingPrice:E,seller:j}},Ma=(e,t)=>{const n=e.map(s=>({id:s.uniqueId,quantity:s.quantity,seller:s.seller}));return Array.isArray(t)?[...n,...t]:[...n,t]},Da=(e,t)=>{const n=e.find(s=>s.id===t);if(n){const s=e.map((o,a)=>{var i,c;return{id:((i=o.itemOffered)==null?void 0:i.sku)??"",index:a,quantity:(n==null?void 0:n.id)===((c=o.itemOffered)==null?void 0:c.sku)?0:o.quantity,seller:o.seller??""}});return{updateItems:s,filterItems:s.filter(o=>o.id!==t)}}return{updateItems:[],filterItems:[]}},Fa=(e,t,n)=>e.filter(s=>s.availability!=="withoutStock"&&s.availability!=="https://schema.org/OutOfStock").map((s,o)=>{var a,i;return s.id===t?{id:s.id,index:o,quantity:n,seller:s.seller,sku:((a=s.itemOffered)==null?void 0:a.sku)??""}:{id:s.id,index:o,quantity:s.quantity,seller:s.seller,sku:((i=s.itemOffered)==null?void 0:i.sku)??""}}),Vr=(e,t)=>e.filter(n=>n.availability!=="withoutStock").findIndex(({id:n})=>n===t),Om=(e,t)=>{var n;return Array.isArray(e)?(((n=e==null?void 0:e.find(s=>{var o;return((o=s==null?void 0:s.id)==null?void 0:o.toLowerCase())===t}))==null?void 0:n.value)??0)/100:0},Lm=e=>{const t=e.reduce((o,a)=>{const i=bs(a.price)?0:a.quantity;return o+i},0),n=e.reduce((o,a)=>o+a.price*a.quantity,0),s=e.reduce((o,a)=>o+a.listPrice*a.quantity,0);return{totalItems:t,total:n,subTotal:s}},km=e=>Array.isArray(e)?e.filter(t=>t.availability!=="withoutStock").reduce((t,n)=>t+(bs(n==null?void 0:n.price)?0:n.quantity),0):0,za=(e,t)=>{const{items:n,orderFormId:s,...o}=e;return{...o,id:s,items:Array.isArray(n)?n.map(a=>ka(a,t)):[]}},Ba=(e,t)=>{const n=e.find(s=>s.id===t);return n?n.availability==="unavailableItemFulfillment":!1},Mm=(e,t)=>{const n=e.sku,s=e.isVariantOf.hasVariant.find(o=>o.sku===n);return s?s.name.split(t)[1]:"--"},Rt=(e,t,n=!1)=>!e&&t!==""?{code:300,value:t,statusOk:n}:e===t?{code:200,value:t,statusOk:n}:{code:400,value:t,statusOk:n},Dm=(e,t)=>{const n=new Set;return[e,...t].filter(s=>!n.has(s)&&n.add(s),n)},Ua=(e,t)=>t&&Array.isArray(t)&&t.find(s=>s.id===e)?Promise.resolve(e):Promise.resolve(!1),qa=(e,t)=>t?Promise.resolve(e[t]):Promise.resolve(!1),Ha=async e=>{try{const t=await e();if(typeof t!="boolean")return t}catch(t){console.error(`[Error orderForm]: ${t}`)}return!1},Va=(e,t)=>{if(t!==-1){const n=Number(e);return n?n+1:1}return e??1},$a=(e,t)=>Array.isArray(e)?e.filter(n=>t==null?void 0:t.some(s=>s.id===n.id)):[],Wa=async(e,t)=>e.then(n=>[...n??[],...t??[]]),Ae=async(e,t,n,s)=>{const{priority:o="auto",body:a}=t;return fetch(e,{headers:{"Content-Type":"application/json"},priority:o,method:"POST",body:JSON.stringify(a)}).then(async i=>{const c=await i.json();return n?c:za(c,s)})},Ga=(e,t,n)=>({notifications:[...e.notifications,{id:Date.now(),message:t,callback:n}]}),Ka=e=>[...Array.isArray(e)?e:[e],"faststore"],Xa=e=>{const t=e.get("utm_source")||gt("utm_source"),n=e.get("utm_campaign")||gt("utm_campaign"),s=e.get("utm_medium")||gt("utm_medium"),o=e.get("utmi_cp")||gt("utmi_cp"),a=e.get("utmi_pc")||gt("utmi_pc"),i=e.get("utmi_p")||gt("utmi_p");return{...t&&{utmSource:t},...s&&{utmMedium:s},...n&&{utmCampaign:n},...o&&{utmiCampaign:o},...a&&{utmiPart:a},...i&&{utmipage:i}}},gt=e=>{if(!e||typeof window>"u")return;const t=window.location.href;e=e.replace(/[[\]]/g,"\\$&");const n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)"),s=n.exec(t);return s?s[2]?decodeURIComponent(s[2].replace(/\+/g," ")):"":null},Ya=(e,t,n="BR")=>{const s=t,o={country:n,addressType:"",postalCode:e||null,city:"",state:"",street:"",number:"",neighborhood:"",complement:"",reference:"",geoCoordinates:[]};if(s){const a=typeof s=="object"&&"latitude"in s?s.latitude:null,i=typeof s=="object"&&"longitude"in s?s.longitude:null;o.geoCoordinates=typeof a=="number"&&typeof i=="number"?{latitude:a,longitude:i}:null}return[o]},Fm=Object.freeze(Object.defineProperty({__proto__:null,VALUE_REFERENCES:Am,addItemOrder:Ma,addNotification:Ga,createItemOrder:ka,createNewAddress:Ya,fetchCartAPI:Ae,findItemIndex:Vr,findOptions:$a,findTotalizerValue:Om,getCategories:La,getCode:Rt,getQuantity:Va,getRemoveId:Ua,getSize:Mm,getTotalItems:km,getTotalizer:Lm,getUrlParameter:gt,getValue:qa,initialState:Hr,isGift:bs,marketingTagsBuilder:Ka,mergeOptionsPromise:Wa,mountMarketingData:Xa,orderFormValues:za,promiseDefault:Ve,removeQuantity:Da,updateItemSellerExternal:Ba,updateOrderFormPromise:Ha,updateQuantity:Fa,wishlistArray:Dm},Symbol.toStringTag,{value:"Module"})),zm=()=>{const e=async(h,_)=>Ae("/api/checkout/order-form/coupon",{body:{orderFormId:h,coupon:_}}),t=async(h,_,y={},v)=>{if(v)if(_){const x=_.includes(" - ")?_.split(" - ")[0]:_,C=await Ae("/api/checkout/order-form/seller-code",{body:{orderFormId:h,sellerCode:x}},!0);return C instanceof Object&&y.name in C&&C[y.status]===!0?Ae("/api/checkout/order-form/attachments",{body:{orderFormId:h,sellerCode:x,sellerName:C[y.name]}}).then(b=>({...b,openTextField:{...(b==null?void 0:b.openTextField)??{},statusOk:!0}})):Promise.resolve({paymentData:null,openTextField:{statusOk:!1,value:x}})}else return Ae("/api/checkout/order-form/attachments",{body:{orderFormId:h,sellerCode:"",sellerName:""}})},n=async(h,_)=>Ae("/api/checkout/order-form/attachments/marketing-data",{body:{orderFormId:h,marketingData:_}}),s=async(h,_,y)=>Ae("/api/checkout/order-form/items",{body:{orderFormId:h,orderItems:Ma(_,y)}}),o=async(h,_,y,v=!1)=>Ae("/api/checkout/order-form/offerings",{body:{id:_,itemIndex:y,orderFormId:h,remove:v}}),a=async h=>Ae("/api/checkout/order-form/items/remove-all",{body:{orderFormId:h}}),i=async(h,_="low")=>Ae("/api/checkout/order-form",{priority:_,body:{orderFormId:h??""}}),c=async(h,_)=>Ae("/api/checkout/order-form/profile",{body:{orderFormId:h,email:_}}),l=async(h,_,y)=>{const v=Da(_,y);return Ae("/api/checkout/order-form/items/update",{body:{orderItems:v.updateItems,orderFormId:h}})},u=async(h,_,y,v,x,C,j)=>{var S,P;const b=j?{startDateUtc:(S=C==null?void 0:C.deliveryWindow)==null?void 0:S.startDate,endDateUtc:(P=C==null?void 0:C.deliveryWindow)==null?void 0:P.endDate}:null,w={logisticsInfo:Array.from({length:v},(E,A)=>({itemIndex:A,selectedDeliveryChannel:(C==null?void 0:C.deliveryChannel)||null,selectedSla:(C==null?void 0:C.deliveryMethod)||null,deliveryWindow:b})),selectedAddresses:x,clearAddressIfPostalCodeNotFound:!0};return Ae("/api/checkout/order-form/shipping",{body:{...w,orderFormId:h,country:y,postalCode:_}})},m=async(h,_,y)=>Ae("/api/checkout/order-form/shipping/update",{body:{orderFormId:h,options:_,selectedAddresses:y}}),p=async(h,_,y,v)=>{const x=Fa(_,y,v);return Ae("/api/checkout/order-form/items/update",{body:{orderFormId:h,orderItems:x}})};return{addCoupon:e,addItem:s,addSellerCode:t,addMarketingData:n,giftItem:o,emptyCart:a,getOrderForm:i,insertProfileEmail:c,removeItem:l,shipping:u,shippingUpdate:m,updateItemQuantity:async(h,_,y,v,x)=>p(h,_,y,v).then(C=>C&&Array.isArray(C.items)?Ba(C.items,y)?p(h,_,y,x):C:!1)}},$r="soma::cart",qt="soma::options",xt=St.create((e,t)=>{const n=zm(),s=async(o,a,i)=>{e({loading:!0});const c=await Ha(o);if(typeof c!="boolean"){e({...c});const l=await Wa(et.get(qt),i);return et.set(qt,l),qa(c,a).finally(()=>e({loading:!1,options:l}))}return Ve};if(typeof window<"u"){const o=async a=>{if(a){const i=await et.get(qt).then(u=>$a(u,a.items));et.set($r,a),et.set(qt,i),e({...a,options:i});const c=new URLSearchParams(window.location.search),l=c.get("utm_campaign")||c.get("utmi_campaign")||"";l&&s(()=>n.addSellerCode(t().id,l.toUpperCase()),"openTextField")}};return et.get($r).then(a=>n.getOrderForm(a?a.id:"").then(o)),{...Hr,addCoupon:async a=>s(()=>n.addCoupon(t().id,a),"marketingData"),addItem:(a,i)=>{s(()=>n.addItem(t().id,t().items,a),"items",i)},addSellerCode:async(a,i)=>s(()=>n.addSellerCode(t().id,a,i,t().isOpen),"openTextField"),addMarketingData:async a=>s(()=>n.addMarketingData(t().id,a),"marketingData"),emptyCart:()=>{s(()=>n.emptyCart(t().id))},removeItem:async a=>{const i=await s(()=>n.removeItem(t().id,t().items,a),"items");return Ua(a,i)},shipping:async(a,i="BR")=>s(()=>n.shipping(t().id,a??"",i,t().items.length,Ya(a??"",null,i)),"shippingData"),shippingUpdate:async a=>s(()=>{var i;return n.shippingUpdate(t().id,a,(i=t().shippingData)==null?void 0:i.selectedAddresses)},"shippingData"),toggleServiceToProduct:async(a,i,c)=>s(()=>n.giftItem(t().id,a,i,c),"items"),updateItemQuantity:async(a,i,c)=>{const{id:l,items:u}=t();return s(()=>{var m;return n.updateItemQuantity(l,u,a,i,((m=u.find(p=>p.id===a))==null?void 0:m.quantity)??1)},"items",c?[c]:void 0)},insertProfileEmail:async a=>s(()=>n.insertProfileEmail(t().id,a),"clientProfileData"),setIsOpen:a=>e({isOpen:a})}}return Hr}),Bm=()=>xt(e=>e),Qa=St.create(e=>({notifications:[],actions:{addNotification:(t,n)=>e(s=>Ga(s,t,n)),removeNotification:t=>e(n=>({notifications:n.notifications.filter(s=>s.id!==t)}))}})),js=()=>Qa(e=>e.notifications),Cs=()=>Qa(e=>e.actions),Um=Object.freeze(Object.defineProperty({__proto__:null,KEY_INDEXED_OPTIONS:qt,KEY_INDEXED_STORE:$r,useCartStore:xt,useGetCartStoreState:Bm,useGetNotificationActions:Cs,useGetNotificationsStore:js},Symbol.toStringTag,{value:"Module"})),qm=6e3,Za=g.createContext({}),Ja=({children:e,...t})=>{const{items:n}=xt(),[s,o]=g.useState([]),a=g.useRef(null),i=g.useMemo(()=>Array.isArray(s)&&s.length>0?s.map(c=>n.find(l=>l.id===c.id)).filter(c=>c!==void 0):[],[n,s]);return g.useEffect(()=>{s.length&&(clearTimeout(a.current??0),a.current=setTimeout(()=>{o([])},qm))},[s]),r.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 ei{constructor(){cn(this,"events",{});cn(this,"prevData",{})}subscribe(t,n){return this.events[t]||(this.events[t]=[]),this.events[t].push(n),()=>{this.events[t]=this.events[t].filter(s=>s!==n)}}publish(t,n){this.events[t]&&this.events[t].forEach(s=>{this.prevData[t]=n,s(n)})}}const ti=g.createContext({}),Hm=({children:e,headerConfigs:t,pathname:n,...s})=>{const[o,a]=g.useState(!0),[i,c]=g.useState(!1),l=n==="/",u=g.useRef(new ei),m=h=>h?{headerVariant:t.home_default_variant,bannerVariant:t.home_default_variant,position:t.home_default_position}:{headerVariant:t.default_variant,bannerVariant:t.default_variant,position:t.default_position},p=m(l),f=g.useRef(p);return g.useEffect(()=>{var y;const h=((y=new URLSearchParams(window.location.search))==null?void 0:y.toString())??"";(h.includes("utm_")||h.includes("gclid"))&&(Br.get("lastMedias")||Br.set("lastMedias",`${h}`,{expires:1/24}));const _=()=>{const v=typeof(window==null?void 0:window.navigator)>"u"?"":navigator==null?void 0:navigator.userAgent,x=window.innerWidth<1024||!!v.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i);i||c(!0),o!==x&&(a(x),c(!0))};return i||_(),window.addEventListener("resize",_,{passive:!0}),()=>window.removeEventListener("resize",_)},[o,i]),g.useEffect(()=>{const h=m(l);u.current.publish("header:change_variant",h.headerVariant),u.current.publish("header:change_position",h.position),f.current=h},[l]),r.jsx(ti.Provider,{value:{isMobile:o,mediatorRef:u,currentHeaderConfigsRef:f,deviceValidated:i,...s},children:r.jsx(Ja,{children:e})})},ne=()=>g.useContext(ti),ni=g.createContext({}),Vm=({children:e,...t})=>r.jsx(ni.Provider,{value:{...t},children:e}),ie=()=>g.useContext(ni),Pt=(e,t)=>St.create(n=>{const s=()=>n({value:e});return t&&t instanceof Set&&t.add(s),{value:e,actions:{setValue:o=>n({value:o}),reset:s}}}),Kt={category:null,menuMobileIsOpen:!1,searchModalIsOpen:!1,userMenuIsOpen:!1},Zt=new Set,$m=()=>{Zt.forEach(e=>{e()})},ri=St.create((e,t)=>{const n=()=>e({value:Kt.category});return Zt.add(n),{value:Kt.category,actions:{reset:n,setValue:s=>e(()=>({value:s})),updateValue:s=>{t().value!==s&&e({value:s})}}}}),si=()=>ri(e=>e.value),Jt=()=>ri(e=>e.actions),oi=Pt(Kt.menuMobileIsOpen,Zt),ai=()=>oi(e=>e.value),ii=()=>oi(e=>e.actions),ci=Pt(Kt.searchModalIsOpen,Zt),li=()=>ci(e=>e.value),zn=()=>ci(e=>e.actions),ui=Pt(Kt.userMenuIsOpen,Zt),Ss=()=>ui(e=>e.value),Ps=()=>ui(e=>e.actions),Wm=Object.freeze(Object.defineProperty({__proto__:null,resetAllHeaderStores:$m,useActionsHeaderCategory:Jt,useActionsMenuMobileIsOpen:ii,useActionsSearchModalIsOpen:zn,useActionsUserMenuIsOpen:Ps,useGetHeaderCategoryStore:si,useGetMenuMobileIsOpen:ai,useGetSearchModalIsOpen:li,useGetUserMenuIsOpen:Ss},Symbol.toStringTag,{value:"Module"})),Mt={selectedSkuInfo:{productId:"",name:"",size:"",sku:"",sellerId:"",sellerName:"",available:!1,quantity:1},openLetMeKnow:!1,openMeasurements:!1,showBottomNavigation:!1,showNotify:!1},Dt=new Set,Gm=()=>{Dt.forEach(e=>{e()})},di=St.create(e=>{const t=()=>e({value:Mt.selectedSkuInfo});return Dt.add(t),{value:Mt.selectedSkuInfo,actions:{setValue:n=>e(s=>({value:{...s,...n}})),reset:t}}}),en=()=>di(e=>e.value),mi=()=>di(e=>e.actions),fi=Pt(Mt.openLetMeKnow,Dt),Km=()=>fi(e=>e.value),Xm=()=>fi(e=>e.actions),pi=Pt(Mt.showNotify,Dt),hi=()=>pi(e=>e.value),ws=()=>pi(e=>e.actions),_i=Pt(Mt.showBottomNavigation,Dt),Ym=()=>_i(e=>e.value),Qm=()=>_i(e=>e.actions),gi=Pt(Mt.openMeasurements,Dt),yi=()=>gi(e=>e.value),vi=()=>gi(e=>e.actions),Zm=Object.freeze(Object.defineProperty({__proto__:null,resetAllPDPStores:Gm,useActionsPDPOpenLetMeKnow:Xm,useActionsPDPOpenMeasurements:vi,useActionsPDPSelectedSkuInfo:mi,useActionsPDPShowBottomNavigation:Qm,useActionsPDPShowNotify:ws,useGetPDPOpenLetMeKnow:Km,useGetPDPOpenMeasurements:yi,useGetPDPSelectedSkuInfo:en,useGetPDPShowBottomNavigation:Ym,useGetPDPShowNotify:hi},Symbol.toStringTag,{value:"Module"})),io={feedback:{active:!1,action:"add"},list:[]},Es=St.create((e,t)=>({value:io,actions:{reset:()=>e({value:io}),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:""}}}))}})),Ft=()=>Es(e=>e.value.list),Ns=()=>Es(e=>e.value.feedback),wt=()=>Es(e=>e.actions),Jm=Object.freeze(Object.defineProperty({__proto__:null,useActionsWishlistStore:wt,useGetWishlistFeedbackStore:Ns,useGetWishlistStore:Ft},Symbol.toStringTag,{value:"Module"})),xi=g.createContext({}),ef=({children:e,headerData:t,...n})=>{var m,p;const s=g.useRef(null),o=g.useRef(null),a=g.useRef(null),i=g.useRef(null),c=g.useRef(null),{mediatorRef:l,currentHeaderConfigsRef:u}=ne();return(m=l.current)==null||m.subscribe("header:change_variant",f=>{var x,C,j;if(f&&u.current&&(u.current.bannerVariant=f),!s.current)return;const _=document.body.scrollTop>0,y=s.current.getAttribute("data-interactiveVariant"),v=_?y:f??((x=u.current)==null?void 0:x.bannerVariant)??"default";v!==((C=u.current)==null?void 0:C.headerVariant)&&(s.current.setAttribute("data-bottomdivider",String(_)),s.current.setAttribute("data-variant",String(v)),(j=l.current)==null||j.publish("herobanner:change_controllers_variant",v),u.current&&(u.current.headerVariant=v))}),(p=l.current)==null||p.subscribe("header:change_position",f=>{s.current&&(s.current.style.position=f)}),g.useEffect(()=>{const f=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:f.signal});const _=y=>{var x;(x=y.target.closest("a"))==null||x.blur()};return s.current&&(s.current.addEventListener("click",_,{signal:f.signal}),s.current.addEventListener("touchend",_,{signal:f.signal})),()=>{f.abort()}},[]),r.jsx(xi.Provider,{value:{headerData:t,structureRef:o,rootRef:s,tipbarRef:a,userMenuMobileRef:i,userMenuDesktopRef:c,...n},children:e})},Pe=()=>g.useContext(xi),bi=g.createContext({}),ji=({children:e,...t})=>r.jsx(bi.Provider,{value:g.useMemo(()=>t,[t]),children:e}),Is=()=>{const e=g.useContext(bi);if(e===void 0)throw new Error("useMenuMobileContext must be used within a MenuMobileProvider");return e},tf=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},nf=(e,t,n)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const s=t.getBoundingClientRect(),o=e.getBoundingClientRect(),a=e!=null&&e.parentElement?tf(e==null?void 0:e.parentElement):0;return{left:s.left+s.width/2-(o.width+a),top:s.top+s.height+n}},Ci=g.createContext({}),Si=({children:e,delay:t=600,gap:n=20,...s})=>{const[o,a]=g.useState(!1),i=g.useRef(null),[c,l]=g.useState(!1),[u,m]=g.useState({left:0,top:0}),p=g.useCallback(()=>{l(!0),typeof window<"u"&&(i.current=window.setTimeout(()=>{a(!1),l(!1)},t))},[l,a,t]);return g.useEffect(()=>{if(typeof window>"u")return;const f=window.document.querySelector("#cart-button"),h=window.document.querySelector("#add-to-cart--tooltip");if(f&&h){const{left:_,top:y}=nf(h,f,n??0);m({left:_,top:y}),l(!1)}},[n,o]),r.jsx(Ci.Provider,{value:g.useMemo(()=>({...s,...u,handleClose:p,isLeaving:c,isOpen:o,setIsOpen:a,setIsLeaving:l}),[s,u,p,c,o,a,l]),children:e})},Et=()=>{const e=g.useContext(Ci);if(e===void 0)throw new Error("useAddToCartContext must be used within a AddToCartProvider");return e},Pi=g.createContext({}),rf=({children:e,SELLER_CODE_VALIDATION_KEYS:t,CARTPROVIDER_MESSAGE_PRODUCT_REMOVE:n,data:s,...o})=>{var re,ue,se,ce;const a=xt(),{setRecentlyAdded:i}=Qt(),c=g.useRef(""),l=js(),{addNotification:u,removeNotification:m}=Cs(),[p,f]=g.useState(null),{addCoupon:h,addItem:_,addSellerCode:y,addMarketingData:v,emptyCart:x,isOpen:C,removeItem:j,shipping:b,shippingUpdate:w,toggleServiceToProduct:S,updateItemQuantity:P}=a;g.useEffect(()=>{(async()=>{var N,W;if(!a.id||!((W=(N=s==null?void 0:s.promotion)==null?void 0:N.promotionCart)!=null&&W.idPromotion))return;const J=await fetch("/api/buywin",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({orderFormId:a.id,promotionId:s.promotion.promotionCart.idPromotion,web:(s==null?void 0:s.promotion.promotionCart.versionAPI)==="Original"})}).then(ae=>ae.json());f(J)})()},[a.id,a.items.length,s==null?void 0:s.versionId,(ue=(re=s==null?void 0:s.promotion)==null?void 0:re.promotionCart)==null?void 0:ue.idPromotion,(ce=(se=s==null?void 0:s.promotion)==null?void 0:se.promotionCart)==null?void 0:ce.versionAPI]),g.useEffect(()=>{const F=Br.get("lastMedias");if(a.id&&F&&c.current!==F){c.current=F;const J=new URLSearchParams(F),N=Xa(J);v(N)}},[a,v]);const E=g.useCallback(async(F,J)=>(J==="coupon"?h(F):y(F,t??{})).then(W=>{if(typeof W!="boolean"&&W instanceof Object){if(J==="seller"&&"value"in W){const{statusOk:ae,value:he}=W,I=String(he??"").split(" - ");return Rt((I==null?void 0:I[0])??"",F,!!ae)}return Rt(String(W.coupon),F,!0)}return Rt("","")}).catch(()=>Promise.resolve({code:400})),[h,y]),A=g.useCallback((F,J,N)=>{const{id:W}=F;P(W,J,N)},[P]),O=g.useCallback((F,J,N=!1)=>{if(!F)return;const{id:W}=F,ae=Vr(a.items,W);if(ae!==-1&&!N){const he=Number(a.items[ae].quantity),I=a.items[ae]?he+1:1;A(F,I,J)}else _({id:W,quantity:(F==null?void 0:F.quantity)??1,seller:F.seller});C||i(he=>[...he,F])},[_,A,a.items,C,i]),k=g.useCallback((F,J)=>{if(!F||!Array.isArray(F))return;i(W=>[...W,...F]);const N=F.map(W=>{const{id:ae,quantity:he,seller:I}=W,T=Vr(a.items,ae),Re=Va(he??1,T);return{id:ae,quantity:Re,seller:I}});_(N,J)},[_,a.items,i]),M=g.useCallback(async(F,J,N)=>F?j(F).then(()=>(u(J??`${n}`,N),Rt(F,F))):Promise.resolve(Rt("","Product id required")),[u,j]),Q=g.useCallback(()=>{a.items.length>0&&x()},[x,a.items]),D=g.useCallback((F,J="BRA")=>b(F,J),[b]),q=g.useCallback(F=>{F&&w(F)},[w]),U=g.useCallback(async(F,J,N=!1)=>{const W=a.items.findIndex(he=>he.uniqueId===F);return a.items[W]&&W>=0?S(J,W,N):!1},[a.items,S]),Y=g.useCallback(async(F,J)=>P(F,J).then(N=>{if(Array.isArray(N)){const W=N.find(ae=>ae.id===F);if(W&&(W==null?void 0:W.quantity)<J)return String(W.quantity)}return!1}),[P]),G=g.useCallback(async()=>{await v({...a.marketingData,coupon:""})},[v,a.marketingData]),H=g.useCallback(async()=>{await v({...a.marketingData,utmiCampaign:"",utmCampaign:"",utmSource:"",utmMedium:""})},[v,a.marketingData]),Z=g.useCallback(async()=>{await b("","BRA")},[b]);return r.jsx(Pi.Provider,{value:g.useMemo(()=>({...o,data:s,addCouponSeller:E,addToCart:O,addItemsToCart:k,cartStore:a,notifications:l,clearCart:Q,addNotification:u,isOpen:a.isOpen,removeNotification:m,removeToCart:M,setIsOpen:a.setIsOpen,shipping:D,shippingUpdateOption:q,toggleGiftItemCart:U,updateItemQuantity:Y,removeCoupon:G,removeSellerCode:H,removeCEP:Z,promotionRules:p,setPromotionRules:f}),[o,s,E,O,k,l,Q,u,a,m,M,D,q,U,Y,G,H,Z,p,f]),children:e})},ve=()=>{const e=g.useContext(Pi);if(e===void 0)throw new Error("useCartContext must be used within a CartProvider");return e},wi=g.createContext({}),Rs=({children:e,fetch:t})=>{const n=g.useRef(!0),[s,o]=g.useState(null),[a,i]=g.useState(!1);return g.useEffect(()=>{(async()=>{n.current=!0;try{const l=await t();if(!l.ok)throw new Error("Failed to fetch data");const u=await l.json();o(u.data),n.current=!1}catch{n.current=!0,i(!0)}})()},[t]),r.jsx(wi.Provider,{value:g.useMemo(()=>({data:s,isLoading:n.current??!1,isError:a}),[s,a,n]),children:e})},Ts=()=>{const e=g.useContext(wi);if(e===void 0)throw new Error("useProductsContext must be used within a useRootContext");return e},Ei=g.createContext({}),As=({children:e,sort:t,state:n,count:s,collectionId:o,brand:a,searchParams:i,ITEMS_PER_PAGE:c})=>{const l=g.useMemo(()=>{var u;return o?[{key:"productclusterids",value:o.toString()}]:a?[{key:"brand",value:a}]:(u=n.base)!=null&&u.length?n.base.slice(1).split("/").map((m,p)=>({key:`category-${p+1}`,value:m})):[]},[n.base,o]);return r.jsx(Ei.Provider,{value:g.useMemo(()=>({state:{...n,facets:[...l,...n.facets??[]]},sort:t,count:s??c,searchParams:i}),[l,s,t,n,i]),children:e})},ze=()=>{const e=g.useContext(Ei);if(e===void 0)throw new Error("useSearchContext must be used within a SearchProvider");return e},Ni=g.createContext({}),sf=({children:e,...t})=>r.jsx(Ni.Provider,{value:t,children:e}),Me=()=>{const e=g.useContext(Ni);if(e===void 0)throw new Error("usePLPConstants must be used within a PLPConstantsProvider");return e},Ii=g.createContext({}),of=({children:e,selectedFacets:t})=>{const{data:n,...s}=Ts(),{router:o}=ie(),{searchParams:a,PLP_SORT_DEFAULT:i}=Me(),c=g.useCallback((f,h)=>{if(h){if(f.key.toLocaleLowerCase()==="price"){const _=h.getAll("facets");h.delete("facets"),_.forEach(y=>{const[v]=y.split("/");v!==f.key&&h.append("facets",y)})}h.set("page","1"),h.append("facets",`${f.key}/${f.value}`),o.push(`?${h.toString()}`)}},[o]),l=g.useCallback(()=>{const f=new URLSearchParams;f.set("sort",i),f.set("page","1"),o.push(`?${f.toString()}`)},[o]),u=g.useCallback((f,h)=>{if(!h||!h.has&&!h.has("facets"))return;const _=h.getAll("facets");h.delete("facets"),h.set("page","1"),_.forEach(y=>{const[v,x]=y.split("/");(v!==f.key||x!==f.value)&&h.append("facets",y)}),o.push(`?${h.toString()}`)},[o]),m=g.useCallback(f=>{const h=a?new URLSearchParams(a):new URLSearchParams;for(const[,_]of h.entries()){const[y,v]=_.split("/");if(y===f.key&&v===f.value)return u(f,h)}return c(f,h)},[c,u,a]),p=g.useCallback(f=>{const h=a?new URLSearchParams(a):new URLSearchParams;h.set("sort",f.replace("_",":")),o.push(`?${h.toString()}`)},[o,a]);return r.jsx(Ii.Provider,{value:g.useMemo(()=>({...s,breadcrumb:n&&"breadcrumb"in n?n==null?void 0:n.breadcrumb:[],deleteAllFacets:l,facets:n&&"facets"in n?n==null?void 0:n.facets:[],selectedFacets:t,onToggleFacet:m,onSort:p,searchParams:a}),[n,l,p,m,s,t,a]),children:e})},Ri=({children:e,forceUpdate:t})=>{const{state:n}=ze();return r.jsx(Rs,{fetch:()=>fetch("/api/search/facets",{method:"POST",body:JSON.stringify({...n,forceUpdate:t}),priority:"low"}),children:r.jsx(of,{selectedFacets:(n==null?void 0:n.facets)??[],children:e})})},Ti=()=>{const e=g.useContext(Ii);if(e===void 0)throw new Error("useFacetsContext must be used within a FacetsProvider");return e},Ut={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"}},af={nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"0",count:0,total:0},cf="Imagem do produto",co=1,lf="Sair",uf=e=>e.exit,lo=({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"}],df=(e,t)=>{const n=(t??"").split("@")[0];return e?`Olá${n.length?", ":" "}${n}!`:"Olá!"},mf=e=>"Seja bem vindo!",ff="Marque a caixa para aceitar os termos de política de privacidade.",pf="Algumas informações estão incorretas ou não foram preenchidas",hf="Enviar",Ai=g.createContext({}),_f=({children:e})=>{const{data:t,...n}=Ts(),[s,o]=g.useState(0),{sendDataLayerEvent:a}=oe();return g.useEffect(()=>{if(t&&"pagination"in t&&t.products.length>0){a({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:t.products}}});const i=t.pagination.count;i&&Number.isInteger(i)&&o(i)}},[t,a,o]),r.jsx(Ai.Provider,{value:g.useMemo(()=>({...n,products:t&&"products"in t?t==null?void 0:t.products:[],pagination:t&&"pagination"in t?t==null?void 0:t.pagination:af,total:s}),[t,n,s]),children:e})},Os=({children:e,query:t,forceUpdate:n})=>{const{count:s,state:o}=ze(),a={...o,count:s};return r.jsx(Rs,{fetch:()=>fetch("/api/search/product",{method:"POST",body:JSON.stringify({...a,query:t,forceUpdate:n,facets:o.facets??[]})}),children:r.jsx(_f,{children:e})})},tn=()=>{const e=g.useContext(Ai);if(e===void 0)throw new Error("useProductsContext must be used within a ProductsProvider");return e},Oi=g.createContext({}),gf=({children:e,slug:t,searchParams:n,collectionId:s,brand:o,itemsPerPage:a=24,PLP_SORT_DEFAULT:i})=>{const{pathname:c}=ie(),l=g.useRef(""),[u,m]=g.useState(!1),p=g.useMemo(()=>{const h=new URL(c,"http://localhost"),_=(n==null?void 0:n.getAll("facets"))??[],y=(n==null?void 0:n.get("page"))??"1",v=(n==null?void 0:n.get("sort"))??(s?"":i);return h.searchParams.set("page",String(y)),h.searchParams.set("sort",String(v)),n!=null&&n.get("query")?(h.searchParams.set("query",n.get("query")),h):(h.searchParams.set("base",Array.isArray(t)?t.join("/"):t),h.searchParams.set("facets",_.join(",")),h)},[s,c,n,t]),f=g.useMemo(()=>{if(Array.isArray(n==null?void 0:n.getAll("facets")))return R.parseSearchState(p,n.getAll("facets")??[""]);const h=(n==null?void 0:n.getAll("facets"))??[];return R.parseSearchState(p,h)},[p,n]);return g.useEffect(()=>{l.current!==c&&(l.current=c,window.document.body.scrollTo(0,0))},[c]),r.jsx(Oi.Provider,{value:g.useMemo(()=>({openFilters:u,setOpenFilters:m}),[u,m]),children:r.jsx(As,{ITEMS_PER_PAGE:a,searchParams:n??new URLSearchParams,state:g.useMemo(()=>({...f}),[f]),collectionId:s,brand:o,children:e})})},Ls=()=>{const e=g.useContext(Oi);if(e===void 0)throw new Error("usePLPContext must be used within a PLPProvider");return e},An=(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)=>An(o,t[a]));if(Array.isArray(t))return!1;const n=Object.keys(e),s=Object.keys(t);return n.length!==s.length?!1:n.every(o=>Object.prototype.hasOwnProperty.call(t,o)&&An(e[o],t[o]))},Li=(e,t,n="page")=>Object.keys(t).some(s=>s===n?!1:!An(t[s],e[s])),Wr=async e=>{const t=await fetch("/api/search/product",{method:"POST",body:JSON.stringify(e),priority:"high"});if(!t.ok)throw new Error("[FAILED TO FETCH DATA]");const n=await t.json();return n==null?void 0:n.data},ki=()=>({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}}}),Mi=(e,t,n,s=24)=>{const o=new Set,a=[];if(!Array.isArray(e)||e.length===0)return{taken:o,placedBanners:a};const i=t*s*n;for(const c of e){let l=Number(c.position_grid),u=!1;for(;l<i;){const m=l%n;if(m+c.columns>n){l+=n-m;continue}if(!Array.from({length:c.columns}).some((h,_)=>o.has(l+_))){for(let h=0;h<c.columns;h++)o.add(l+h);a.push(l),u=!0;break}l++}u||console.info(`[PLP INFINITE FAILED BANNER POSITION]: pos=${c.position_grid}, cols=${c.columns}`)}return{taken:o,placedBanners:a}},Gr=(e,t,n,s=24)=>{const{placedBanners:o,taken:a}=Mi(e??[],t,n),i=[];let c=0;try{for(;i.length<t*s;)a.has(c)||i.push(c),c++;return{banners:o,products:i}}catch(l){console.info(`[PLP INFINITE FAILED TO GEN POSITIONS]: page=${t}`,l)}return{banners:[],products:i}},In=(e,t,n=24)=>Array.from({length:e},(s,o)=>{const a=o+1;return{loading:e===a,page:a,pagination:t!=null&&t.products.length&&e===a?t==null?void 0:t.pagination:ks(),products:t!=null&&t.products.length&&e===a?t==null?void 0:t.products:Array.from({length:n},()=>ki())}}),Di=(e,t)=>[...e,{loading:!1,page:t,pagination:ks(),products:[]}],ks=()=>({nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"1",count:1,total:1}),yf=(e,t,n,s,o)=>{const a=e[e.length-1],i=(a==null?void 0:a.products.length)??o,c=(e.length-1)*o+i-1,l=n[c];return t.filter((u,m)=>{const p=s[m];return p<=l||o>i&&p>l})},Fi=(e,t)=>{const n=new Map;for(const o of e){const a=Math.floor(o/t);n.has(a)||n.set(a,[]),n.get(a).push(o)}const s=[];for(const[,o]of n){const a=o[Math.floor(Math.random()*o.length)];s.push(a)}return s},zi=(e,t)=>{if(!e)return[];const n=e.map((s,o)=>s.video&&s.video!==""?o:null).filter(s=>s);return Fi(n,t)},Bi=e=>Array.isArray(e)?e.map((t,n)=>({href:`/${e.slice(0,n+1).join("/")}`,name:t})):[],vf=Object.freeze(Object.defineProperty({__proto__:null,createBreadcrumb:Bi,createPage:Di,createPages:In,createPagination:ks,createProduct:ki,deepEqual:An,fetchPage:Wr,getBanners:Mi,getPositions:Gr,getProductsWithVideo:zi,getRandomVideoPerRow:Fi,getVisibleBanners:yf,hasStateChangedExceptPage:Li},Symbol.toStringTag,{value:"Module"})),xf=50,bf=St.create((e,t)=>{const n=i=>Math.min(i,xf),s=async(i,c)=>{const l=n(i.page);try{const u=await Wr({...i,page:l});o(l,m=>c?c(m,u):{...m,...u})}catch(u){console.error(`[PDC - SCROLL INFINITE FAILED TO FETCH PAGE ${l}]: ${u}`),o(l,m=>({...m,loading:!1}))}},o=(i,c)=>{e({load:!0,pages:t().pages.map(l=>l.page===i?c(l):l)})},a=async(i,c)=>{await s(i,(l,u)=>(typeof c=="function"&&c(u),{...l,...u,loading:!0}))};return{banners:[],load:!1,pages:[],total:0,positions:[],products:[],createPages:async(i,c,l,u)=>{var p,f,h;const m=n(Number(i==null?void 0:i.page));e({...c,pages:In(m,void 0,u)});try{const _=await Wr({...i,page:m});if(_){if(!_.products.length&&((p=_==null?void 0:_.pagination)==null?void 0:p.total)<m){a({...i,page:(f=_==null?void 0:_.pagination)==null?void 0:f.total},l),e({pages:In((h=_==null?void 0:_.pagination)==null?void 0:h.total)});return}typeof l=="function"&&l(_),e({load:!0,pages:In(m,_),total:Number(_.pagination.count)})}}catch(_){console.error(`[PDC - SCROLL INFINITE TO CREATE PAGES]: page ${m} ${_}`)}},addPage:(i,c,l)=>{const{pages:u}=t(),m=n(i==null?void 0:i.page);u.some(p=>p.page===m)||(e({...c,pages:Di(u,m)}),a(i,l))},updateProducts:(i,c)=>{const l=t().pages.find(u=>u.page===n(i==null?void 0:i.page));l!=null&&l.loading||a(i,c)}}}),jf=(e,t,n,s=0)=>{if(!e.length)return[];let o=0;const a=[];for(let i=0;i<e.length;i+=n){const c=e.slice(i,i+n),l=c.findIndex(u=>{var m;return(m=u.node)==null?void 0:m.video});for(let u=0;u<c.length;u++){const m=i+u,p=s+m,f=t.find(_=>_.position_grid===p+1),h=p+o+1;f&&(o+=f.columns),a.push({position:h,canPlayVideo:u===l})}}return a},Ui=(e,t,n)=>{const s=(t-1)*n,o=t*n;return e>=s&&e<=o},Bn=e=>{var t;return(t=e==null?void 0:e.map(n=>({disable:R.disableSKU(n),size:R.getSKUName(n),skuID:"sku"in n&&n.sku})))==null?void 0:t.filter(n=>n.disable)},Cf=Object.freeze(Object.defineProperty({__proto__:null,createGridPosAndVideo:jf,getSkusNotify:Bn,isPositionInCurrentPage:Ui},Symbol.toStringTag,{value:"Module"})),qi=({isMobile:e,ICONS:t,NOTIFY_INFO:n})=>r.jsxs(r.Fragment,{children:[r.jsx(d.Modal.Controls,{navigation:e?"top":"middle",isMobile:e??!1,children:!e&&r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),r.jsx(d.Button,{"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})}),r.jsx(d.Modal.Title,{navigation:e?"top":"middle",title:n.title})]});qi.displayName="Notify.Controls";const Qe={"notify--header-modifier":"_notify--header-modifier_xlomp_1","notify--container":"_notify--container_xlomp_4","notify--form":"_notify--form_xlomp_20","notify--status":"_notify--status_xlomp_36","notify--status--success":"_notify--status--success_xlomp_50","notify--status--error":"_notify--status--error_xlomp_50","notify--modal--body":"_notify--modal--body_xlomp_99","notify--loading":"_notify--loading_xlomp_102","notify--selector":"_notify--selector_xlomp_122","notify--selector--header":"_notify--selector--header_xlomp_138","modal-modifier":"_modal-modifier_xlomp_168"};function Hi(e){const n=decodeURIComponent(window.document.cookie).split(";");for(const s of n){const[o,a]=s.trim().split("=");if(o===e)return a}}function Ms(e,t,n={}){const o={...{path:"/",expires:new Date(Date.now()+36e5)},...n};let a=`${encodeURIComponent(e)}=${encodeURIComponent(t??"")}`;for(const i in o)o[i]!==void 0&&(a+=`; ${i}`,i==="expires"?a+=`=${o[i].toUTCString()}`:typeof o[i]=="boolean"?a+=`; ${o[i]?"true":"false"}`:a+=`=${o[i]}`);window.document.cookie=a}const Vi=g.createContext({amount:null,boxes:null,toExpire:null,loading:!0,logout:()=>null,getCurrentCredits:()=>({credits:0,cashback:0})}),Sf=({children:e,AUTH_TOKEN_COOKIE:t})=>{var m;const{shipping:n,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(p=>p.json()).then(p=>{const{userCredits:f,userId:h,sub:_,...y}=p,{wishlist:v,...x}=y;a({amount:f==null?void 0:f.amount,boxes:f==null?void 0:f.boxes,toExpire:f==null?void 0:f.toExpire,user:{...x,userId:h,sub:_??""},loading:!1,wishlist:(typeof v=="string"?v.split(","):v)??[]})})}catch(p){console.error("user info and my credits request",p),a({...o,loading:!1})}},[a]),c=g.useCallback(()=>{Ms(t),i()},[i]),l=g.useCallback(()=>o.boxes?o.boxes.reduce((p,f)=>f.gift_card_box.refid==="C1643"?(p.cashback+=f.amount,p):(p.credits+=f.amount,p),{cashback:0,credits:0}):{cashback:0,credits:0},[o]),u=g.useCallback(async()=>{var p,f,h;if((p=o.user)!=null&&p.postalCode&&(s!=null&&s.id)&&!(s!=null&&s.loading)&&!((h=(f=s==null?void 0:s.shippingData)==null?void 0:f.address)!=null&&h.postalCode))try{await n(o.user.postalCode)}catch(_){console.error("Error auto-filling CEP:",_)}},[(m=o.user)==null?void 0:m.postalCode]);return g.useEffect(()=>{i()},[i]),g.useEffect(()=>{u()},[u]),r.jsx(Vi.Provider,{value:g.useMemo(()=>({...o,getCurrentCredits:l,logout:c}),[o,l,c]),children:e})},zt=()=>{const e=g.useContext(Vi);if(e===void 0)throw new Error("useContext(SessionContext) must be used within a SessionProvider");return e},$i=({color:e,delay:t=3e3,sku:n,setStatus:s,setIsLoading:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i})=>{const c=g.useRef(null),[l,u]=g.useState(null),{sendDataLayerEvent:m}=oe(),{user:p}=zt(),f=p!=null&&p.firstName?`${p==null?void 0:p.firstName} ${p==null?void 0:p.lastName}`:"";return r.jsx("div",{className:Qe["notify--form"],children:r.jsxs("form",{action:"POST",onSubmit:async h=>{var v;h.preventDefault();const _=h.currentTarget,y=((v=_.querySelector("input"))==null?void 0:v.value)??"";fetch("/api/aviseme",{method:"POST",body:JSON.stringify({userName:f,email:y,sku:n==null?void 0:n.skuID})}).then(x=>s(x.ok)).finally(()=>{o(!1),_.reset(),m({functionKey:"readyEvents",data:{event:"notify_me",readyData:{size:n==null?void 0:n.size,item_id:n==null?void 0:n.skuID,color:e}}}),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{var x;(x=document.body)==null||x.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0})),u(!0),s(null)},t)})},children:[r.jsx(d.TextField.Structure,{input:r.jsx(d.TextField.Input,{feedback:typeof l=="boolean"&&l?"error":"none",type:"email",label:i.email_placeholder,mode:"over-label",variant:"outlined",sizeVariant:"large",onChange:h=>u(!h.target.validity.valid),required:!0}),supportText:typeof l=="boolean"&&l?r.jsx(d.TextField.SupportText,{text:a.messages.invalid_email,feedback:"error"}):r.jsx(r.Fragment,{})}),r.jsx(d.Button,{disabled:!(l===!1||!n)||!n,type:"submit",size:"large",children:i.button})]})})};$i.displayName="Notify.Form";const Wi=({isLoading:e=!1})=>r.jsx("div",{className:Qe["notify--loading"],"data-loading":e,children:r.jsx(d.Spinner,{})});Wi.displayName="Notify.Loading";const Ds={"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"},Gi=({children:e,...t})=>r.jsx("div",{...t,className:Ds["product-variation-list--list"],children:e});Gi.displayName="ProductVariationList.List";const Ki=({fill:e="#1352C7",src:t="",type:n="size",text:s,...o})=>{const{nextimage:a}=ie();return n==="size"?r.jsxs(d.ToggleSize.Wrapper,{...o,size:"large",variation:"ghost",children:[r.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-size"}),r.jsx(d.ToggleSize.Text,{children:s})]}):r.jsxs(d.ToggleStyle.Wrapper,{...o,size:"small",title:"wrapper-texture",children:[r.jsx(d.ToggleStyle.DisabledAdornment,{title:"disabled-adornment-texture"}),n==="color"?r.jsx(d.ToggleStyle.Color,{background:e,title:"color"}):r.jsx(d.ToggleStyle.Texture,{title:"texture",children:r.jsx(a,{alt:s??"image",height:40,src:t,width:40})})]})};Ki.displayName="ProductVariationList.Option";const Xi=({children:e,...t})=>r.jsx("div",{className:Ds["product-variation-list"],...t,children:e});Xi.displayName="ProductVariationList.Root";const Yi=({children:e,title:t,...n})=>r.jsxs("div",{...n,className:Ds["product-variation-list--title"],children:[t?r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.SectionWrapper,{children:r.jsx("p",{children:t})})}):r.jsx(r.Fragment,{}),e]});Yi.displayName="ProductVariationList.Title";const Je={List:Gi,Option:Ki,Title:Yi,Root:Xi},Pf=(e,t)=>{if(!e||!t)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(s=>e[s]===t[s])},Qi=({children:e,label:t="",skus:n,sku:s,setSku:o})=>r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Qe["notify--selector--header"],children:e}),r.jsxs(Je.Root,{className:Qe["notify--selector"],children:[r.jsx(Je.Title,{title:t}),r.jsx(Je.List,{children:Array.isArray(n)&&n.map((a,i)=>{const c=Pf(s,a);return r.jsx(Je.Option,{active:c,onClick:()=>o(c?null:a),text:String(a.size),type:"size"},i)})})]})]});Qi.displayName="Notify.Selector";const uo=({type:e,icon:t,title:n,subtitle:s})=>r.jsx("div",{className:Qe[`notify--status--${e}`],children:r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:t,size:"large"})},children:r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("h2",{children:n}),r.jsx("h3",{children:s})]})})}),Zi=({status:e,ICONS:t,PRODUCT_CARD_TEXTS:n})=>r.jsxs("div",{className:Qe["notify--status"],"data-status":e,children:[r.jsx(uo,{...n.success,icon:t.check_circle,type:"success"}),r.jsx(uo,{...n.error,icon:t.alert_circle,type:"error"})]});Zi.displayName="Notify.Status";const Fs=({color:e,open:t,setVisible:n,skus:s,sku:o,setSku:a,ICONS:i,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l,PRODUCT_CARD_TEXTS:u,Z_INDEX_WAR:m})=>{const[p,f]=g.useState(!1),[h,_]=g.useState(null),{isMobile:y}=ne();return r.jsxs(d.Modal.Root,{isMobile:y??!1,isOpen:t,setIsOpen:n,variant:y?"sideBottom":"sideLeft",style:{zIndex:m.modal},className:Qe["modal-modifier"],children:[r.jsx(d.Modal.Header,{navigation:"top",className:Qe["notify--header-modifier"],children:r.jsx(qi,{isMobile:y??!1,ICONS:i,NOTIFY_INFO:l})}),r.jsxs(d.Modal.Body,{className:Qe["notify--modal--body"],children:[r.jsxs("div",{className:Qe["notify--container"],children:[r.jsxs(Qi,{label:l.selector_label,sku:o,skus:s,setSku:a,children:[r.jsx("p",{children:l.subtitle}),r.jsx("span",{children:l.description})]}),r.jsx($i,{delay:4e3,sku:o,setStatus:_,setIsLoading:f,color:e,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l}),r.jsx(Wi,{isLoading:p}),r.jsx("div",{className:Qe["notify--selector--header"],children:r.jsx("span",{children:l.legal})})]}),r.jsx(Zi,{status:h,ICONS:i,PRODUCT_CARD_TEXTS:u})]})]})};Fs.displayName="Notify";const Un=({skus:e,ICONS:t,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:a,...i})=>{const c=Bn(e??[]);return r.jsx(Fs,{skus:c,ICONS:t,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:a,...i})};Un.displayName="PDC.Notification";const Ji=g.createContext({}),ec=({banners:e,children:t})=>{const{searchParams:n,ITEMS_PER_PAGE:s,ICONS:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l}=Me(),{router:u}=ie(),{sendDataLayerEvent:m}=oe(),{isMobile:p}=ne(),{state:f}=ze(),{addPage:h,createPages:_,updateProducts:y,...v}=bf(),x=p?8:16,C=p?2:4,j=g.useRef(!1),b=g.useRef(f),[w,S]=g.useState(!1),[P,E]=g.useState(null),[A,O]=g.useState([]),k=g.useCallback(U=>{U&&"pagination"in U&&m({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:U.products}}})},[m]),M=g.useCallback(U=>{if(U.pagination.nextPage===!0){const Y=U.page+1,G=Gr(e,Y,C,s);h({...f,page:Y},G,k)}},[h,e,k,C,s,f]),Q=g.useCallback(U=>{U.loading===!1&&y({...f,page:U.page},k)},[k,y,f]),D=g.useCallback(U=>{const Y=new URLSearchParams(n);U.page!==Number(Y.get("page")??1)&&(Y.set("page",String(U.page)),u.replace(`?${Y.toString()}`,{scroll:!1}))},[u,n]),q=g.useCallback((U,Y)=>{const G=Y?Bn([Y]):null;O(U),E(G!=null&&G.length?G[0]:null),S(!0)},[]);return g.useEffect(()=>{const U=!j.current,Y=Li(b.current,f),G=Gr(e,f.page,C);U?_(f,G,k,s):Y&&(_(f,G,k,s),b.current=f),j.current=!0},[e,_,k,C,s,f]),r.jsxs(Ji.Provider,{value:g.useMemo(()=>({...v,addPage:h,addNewPage:M,createPages:_,gap:x,columns:C,handleNotify:q,updatePage:Q,updateProducts:y,updateParamPage:D}),[h,M,_,q,x,C,v,Q,y,D]),children:[t,r.jsx(Un,{open:w,sku:P,skus:A,setSku:E,setVisible:S,ICONS:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l})]})},ct=()=>{const e=g.useContext(Ji);if(e===void 0)throw new Error("PLPInfiniteScrollContext must be used within a ScrollInfiniteProvider");return e},tc=g.createContext({gridBanners:void 0,banners:[]}),wf=({children:e,data:t,device:n,SectionZone:s,COMMON_PAGE_COLUMN_GAP_PDC:o})=>{const{isMobile:a}=ne(),i=(t==null?void 0:t.sections.filter(p=>p.name!=="List Product Banners"))??[],c=i.slice(0,co),l=i.slice(co,i.length),u=t==null?void 0:t.sections.find(p=>p.name==="List Product Banners"),m=g.useMemo(()=>{var p,f;return((f=(p=u==null?void 0:u.data)==null?void 0:p.banners)==null?void 0:f.map(h=>({...h.banner,columns:h.bannerWidth,position_grid:h.bannerPosition})))??[]},[u]);return a&&n==="mobile"||!a&&n==="desktop"?r.jsxs(tc.Provider,{value:{gridBanners:u,banners:m},children:[r.jsx(s,{data:c??[]}),r.jsxs(d.Utils.Column,{gap:o,className:d.helpers.classNameConcat("utils-column-modifier"),children:[e,r.jsx(s,{data:l??[]})]})]}):r.jsx(r.Fragment,{})},qn=()=>{const e=g.useContext(tc);return e===void 0&&console.error("Needs PLPContentContext on parent component"),e},nc=g.createContext({}),rc=({children:e,filters:t,PLP_FILTERS:n,...s})=>{var a;const o=(a=t.facets)==null?void 0:a.filter(i=>n.find(c=>c.key===i.key));return r.jsx(nc.Provider,{value:g.useMemo(()=>({...s,filters:{...t,facets:o}}),[t,o,s]),children:e})},Bt=()=>{const e=g.useContext(nc);if(e===void 0)throw new Error("useFilterContext must be used within a FilterProvider");return e},sc=g.createContext({product:void 0}),Ef=({children:e,data:t,productId:n,COMMON_PAGE_COLUMN_GAP:s,SectionZone:o})=>r.jsxs(sc.Provider,{value:{productId:n},children:[e,r.jsx(d.Utils.Column,{gap:s,className:d.helpers.classNameConcat("utils-column-modifier"),children:r.jsx(o,{data:(t==null?void 0:t.sections)??[]})})]}),oc=()=>{const e=g.useContext(sc);return e||console.error("use this hook only inside PDPContentProvider hierarchy"),e},Nf=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase().trim();function If(e,t=1e3){let n=!1;return(...s)=>{n||(e(...s),n=!0,setTimeout(()=>{n=!1},t))}}function Rf(e,t=1e3){let n;return(...s)=>{clearTimeout(n),n=setTimeout(()=>{e(...s)},t)}}const ac=(e,t)=>t.getTime()>e.getTime()?Math.abs(t.getTime()-e.getTime()):0,Ht=(e,t)=>Math.floor(t==="days"?e/(1e3*60*60*24):t==="hours"?e%(1e3*60*60*24)/(1e3*60*60):t==="minutes"?e%(1e3*60*60)/(1e3*60):e%(1e3*60)/1e3),Tf=e=>{const t=ym.decodeJwt(e??"");return{email:t.sub,userId:t.userId}},Af=["name","email","phone","date","cpf","cep"],mo={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}$/},ic=({type:e,input:t,required:n=!1})=>{if(typeof t!="string"||!n&&t===""||!mo[e])return!0;const s=t.trim();return mo[e].test(s)},Of=e=>{const t=/\/(\d+)-\d+-\d+\/(.+?)\./,n=typeof e=="string"?e.match(t):null;return n?n[2].replace(/-/g," "):cf},Lf=Object.freeze(Object.defineProperty({__proto__:null,FieldTypes:Af,debounce:Rf,getAltTextFromUrl:Of,getAuthenticatedUser:Tf,getCookie:Hi,getDaysHoursMinutesSeconds:Ht,getMilliSeconds:ac,removeAccentsAndReplaceSpaces:Nf,setCookie:Ms,throttle:If,validateInput:ic},Symbol.toStringTag,{value:"Module"})),kf=({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}},Mf=({formData:e,mountedFields:t,inputsStatus:n,hasTermsAndConditions:s,checkboxRef:o,setFormStatus:a})=>{let i=!1,c=!1;const l={...n};return s&&!o.current&&(a("unchecked"),i=!0),e.forEach((u,m)=>{var h;if(m==="terms-and-conditions")return;const p=(h=t[m])==null?void 0:h.required;if(p&&!u){l[m]="required",i=!0;return}ic({type:t[m].type,input:u,required:p})||(l[m]="error",c=!0),typeof u=="string"&&e.set(m,u.toString().trim())}),{hasEmptyFields:i,hasErrors:c,inputStatusToUpdate:l}},cc=g.createContext({}),lc=({children:e,masterDataEmailField:t,fields:n,variant:s,CONSTANTS:{MASTER_DATA_ENTITY:o,NEWSLETTER_CONFIGS:a}})=>{const{sendDataLayerEvent:i}=oe(),c=a.hasTermsAndConditions,{mountedFields:l,mountedInputsStatus:u}=g.useMemo(()=>kf({fields:n}),[n]),m=g.useRef(!1),[p,f]=g.useState("idle"),[h,_]=g.useState(u),y=async({searchFields:S,entity:P})=>{const E=await yt.post("/api/master-data/search",{body:{masterDataEntity:P,searchFields:S,headers:{"REST-Range":"resources=0-49"}}});return console.info(E),E.data},v=async({documentId:S,fieldsToBeUpdated:P,entity:E})=>(await yt.post("/api/master-data/update",{dataEntityName:E,documentId:S,fieldsToBeUpdated:P})).status,x=g.useCallback(async({payload:S,response:P},E,A)=>{var D;const{email:O,...k}=S,[M]=await y({searchFields:{[E]:O},entity:A??o.newsletter}),Q=Array.isArray(M)?(D=M[0])==null?void 0:D.id:void 0;return M&&await v({documentId:Q,fieldsToBeUpdated:k,entity:A??o.newsletter})!==204?{...P,status:"error"}:{...P,status:"success"}},[]),C=g.useCallback(async({formData:S},P,E)=>{const A={status:"idle",inputsStatus:{}},O={};S.forEach((k,M)=>{O[M]=k});try{const M=(await yt.post("/api/master-data",{body:{payload:O,masterDataEntity:P??o.newsletter}})).data;return(M==null?void 0:M.Message)==="duplicated entry"?x({payload:O,response:A},E,P):M!=null&&M.Id?{...A,status:"success"}:{...A,status:"error"}}catch(k){return console.error("error",k),{...A,status:"error"}}},[x]),j=g.useCallback(async(S,P,E)=>{S.preventDefault();const A=new FormData(S.target);if(A.append("acceptedTerms",m.current?"true":"false"),m.current){const k=new Ur.TZDate(new Date,"America/Sao_Paulo").toISOString();A.append("termsAcceptedAt",k)}P&&Object.keys(P).forEach(k=>{A.append(k,P[k])});const O=await C({formData:A},E??"",t);O&&(f(O==null?void 0:O.status),_(O.inputsStatus),O.status==="success"&&i({functionKey:"readyEvents",data:{event:"generate_lead"}}))},[t,C,f,_,i]),b=g.useCallback(S=>{const P=new FormData(S.currentTarget.parentElement),{hasEmptyFields:E,hasErrors:A,inputStatusToUpdate:O}=Mf({formData:P,mountedFields:l,inputsStatus:h,hasTermsAndConditions:c,checkboxRef:m,setFormStatus:f});if(_(O),E||A){S.preventDefault();return}f("loading")},[l,h,c,m]),w=g.useCallback(()=>{f("idle"),_(u)},[u]);return r.jsx(cc.Provider,{value:g.useMemo(()=>({formStatus:p,handleSubmit:j,setFormStatus:f,inputsStatus:h,setInputsStatus:_,hasTermsAndConditions:c,handleClickToSubmit:b,checkboxRef:m,masterDataEmailField:t,fields:n,variant:s,resetNewsletter:w}),[p,j,f,h,_,b,c,m,t,n,s,w]),children:e})},zs=()=>{const e=g.useContext(cc);if(e===void 0)throw new Error("useNewsletterContext must be used within a NewsletterProvider");return e},uc=g.createContext({}),dc=({children:e,data:t})=>{const[n,s]=g.useState(),[o,a]=g.useState(),i=g.useCallback(u=>{const m=t.filter(p=>p.cidade===u);s(m)},[t]),c=g.useCallback(u=>{a(u)},[]),l=g.useCallback(()=>{a("")},[]);return r.jsx(uc.Provider,{value:g.useMemo(()=>({clearSelectedStore:l,data:t,handleSelectCity:i,handleSelectStore:c,selectedCity:n,selectedStore:o}),[l,t,i,c,n,o]),children:e})},Hn=()=>{const e=g.useContext(uc);if(e===void 0)throw new Error("useLPStoreContext must be used within a LPStoreProvider");return e},mc={contexts:{addToCart:{hook:Et,provider:Si},cart:{hook:ve,provider:rf},cms:{FlagsAndTags:{context:vs,hook:ht,provider:vm}},newsletter:{hook:zs,provider:lc},events:{hook:oe,provider:Em},global:{hook:ne,provider:Hm,mediator:ei},header:{hook:Pe,provider:ef},menuMobile:{hook:Is,provider:ji},next:{hook:ie,provider:Vm},pdp:{provider:xm},PDPContent:{provider:Ef,hook:oc},plp:{provider:gf,hook:Ls},plpFilter:{hook:Bt,provider:rc},PLPContent:{provider:wf,hook:qn},plpInfinite:{provider:ec,hook:ct},pdpdata:{provider:Nm},searchFacets:{hook:Ti,provider:Ri},searchProducts:{hook:tn,provider:Os},searchRoot:{hook:Ts,provider:Rs},searchSearch:{hook:ze,provider:As},session:{hook:zt,provider:Sf},ui:{hook:Qt,provider:Ja},lpStore:{hook:Hn,provider:dc}},hooks:{useBackPDC:ja,useClipboard:Im,useDisableZoom:Aa,useLocalStorage:Tm,useOnScreen:xs,useSentinel:Fn,useTouchZoomPan:Oa},stores:{cart:Um,header:Wm,pdp:Zm,wishlist:Jm}},Df={cart:Fm,events:wm,plp:vf,product:R.productHelpers,utils:Lf},Bs={helpers:Df},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"},fc=({brand:e,className:t,name:n,...s})=>r.jsxs("div",{...s,className:d.helpers.classNameConcat(He["add-to-cart--card--name"],t),children:[r.jsx(d.Tag,{style:{textTransform:"uppercase"},size:"small",variant:"quaternary",title:e,children:e}),r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:r.jsx("p",{className:"typography-style-body-md",children:n})})})]});fc.displayName="AddToCart.Card.Name";const pc=({className:e,listPrice:t,price:n,quantity:s,productId:o,...a})=>{const i=R.formatPriceToCurrency(n/100),c=R.formatPriceToCurrency(t/100);return r.jsx("div",{...a,className:d.helpers.classNameConcat(He["add-to-cart--card--price-quantity"],e),children:r.jsx(d.ProductInfo.Root,{size:"small",layout:"vertical",children:r.jsx(d.ProductInfo.Wrapper,{size:"small",layout:"vertical",children:r.jsx(d.ProductInfo.ValuesWrapper,{children:n!==t?r.jsxs(r.Fragment,{children:[r.jsx(d.ProductInfo.Price,{label:"originalPrice",value:i,size:"small"},"price-list"),r.jsx(d.ProductInfo.Price,{label:"discountPrice",value:c,size:"small"},"price-low")]}):r.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:c,size:"small"},"price-low")})})})})};pc.displayName="AddToCart.Card.PriceQuantity";const Ff="_skeleton_12b79_1",zf={skeleton:Ff},hc=({style:e})=>r.jsx("div",{style:e,className:zf.skeleton}),Bf="_image_1y08u_1",Uf={image:Bf},qf=({alt:e,className:t,objectFit:n,...s})=>{const{nextimage:o}=ie();return r.jsx(o,{quality:90,...s,alt:e??"",className:d.helpers.classNameConcat(Uf.image,t),"data-object-fit":n??"cover"})},Hf=({videoRef:e,...t})=>r.jsx("video",{...t,ref:e,children:r.jsx("track",{kind:"captions"})}),Ee={Image:qf,Video:Hf},_c=({className:e,productGroupID:t,size:n,texture:s,...o})=>{const{CONSTANTS:{TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:i}}=Et(),[c,l]=g.useState(s??"");return g.useEffect(()=>{c||fetch("/api/catalog/product/info",{method:"POST",priority:"low",body:JSON.stringify({ids:[t]})}).then(u=>u.json()).then(u=>{const m=u.data[0].items[0];if(m){const p=m.images.find(f=>a.includes(f.imageLabel));p!=null&&p.imageUrl?l(p.imageUrl):l(m.images[0].imageUrl)}}).catch(u=>{console.error(u)})},[c,t]),r.jsxs("div",{...o,className:d.helpers.classNameConcat(He["add-to-cart--card--style-size"],e),children:[r.jsx(d.ToggleStyle.Wrapper,{size:"x-small",style:i,children:r.jsx(d.ToggleStyle.Texture,{children:c?r.jsx(Ee.Image,{alt:"",src:c??"",width:164,height:164,style:i}):r.jsx(hc,{})})}),r.jsx(d.Utils.Divider,{direction:"vertical",size:"medium",style:{height:24}}),n&&r.jsxs(d.ToggleSize.Wrapper,{size:"small",title:"wrapper-texture",children:[r.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),r.jsx(d.ToggleSize.Text,{children:n})]})]})};_c.displayName="AddToCart.Card.StyleSize";const{helpers:Vf}=Bs,gc=({className:e,item:t,texture:n,...s})=>{const{itemOffered:{name:o,brand:a,skuName:i,isVariationOf:{productGroupID:c}},quantity:l,price:u,sellingPrice:m}=t,{CONSTANTS:{NAME_SPLIT_SYMBOL:p}}=Et(),{size:f}=Vf.product.getColorAndSizeFromSkuName(i??o,p);return r.jsxs("div",{...s,className:d.helpers.classNameConcat(He["add-to-cart--card--content"],e),children:[r.jsx(fc,{brand:a.name,name:o}),r.jsx(pc,{price:u,listPrice:m,quantity:l,productId:t.id}),r.jsx(_c,{size:f,texture:n,productGroupID:c})]})};gc.displayName="AddToCart.Card.Content";const yc=({image:e,thumbnail:t=!1})=>r.jsx(Ee.Image,{alt:e.alternateName??"image","data-thumbnail":t,height:t?152:120,src:e.url,width:t?152:94});yc.displayName="AddToCart.Card";const vc=({className:e,item:t,texture:n,thumbnail:s,...o})=>{const{itemOffered:{image:[a]}}=t,i=R.updatedResizedImg(a.url,{width:200,height:300});return r.jsxs("div",{...o,className:d.helpers.classNameConcat(He["add-to-cart--card"],e),children:[r.jsx(yc,{image:{alternateName:a.alternateName||"Produto",url:i||""},thumbnail:s}),!s&&r.jsx(gc,{item:t,texture:n})]})};vc.displayName="AddToCart.Card";const xc=({className:e,children:t,title:n,...s})=>r.jsxs("div",{...s,className:d.helpers.classNameConcat(He["add-to-cart--content"],e),children:[r.jsx("div",{className:He["add-to-cart--content--title"],children:n&&r.jsx("h2",{children:n})}),t,r.jsx(vt.Footer,{})]});xc.displayName="AddToCart.Layout.Content";const bc=({className:e,...t})=>{var h,_;const{isMobile:n,handleClose:s,CONSTANTS:{ADD_TO_CART:o}}=Et(),{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"),p=(l-Math.abs(c??0)+((u==null?void 0:u.value)??0))/100,f=R.formatPriceToCurrency(p??0);return r.jsxs("div",{...t,className:d.helpers.classNameConcat(He["add-to-cart--footer"],e),children:[r.jsxs("div",{className:He["add-to-cart--footer--total"],children:[r.jsx("span",{children:"Subtotal:"}),r.jsx("span",{children:f})]}),r.jsx(d.Button,{size:"medium",variant:"primary","data-close":!0,onClick:()=>i(!0),children:o.footer.bag}),n?r.jsx(d.Button,{"data-close":!0,size:"medium",variant:"tertiary",children:o.footer.keep_buying}):r.jsx(d.Button,{onClick:()=>s(),size:"medium",variant:"tertiary",children:o.footer.keep_buying})]})};bc.displayName="AddToCart.Layout.Footer";const jc=({children:e,className:t,thumbnail:n=!1,...s})=>{const{cartStore:{options:o}}=ve(),{recentlyAddedProducts:a}=Qt(),i=a.length>3?4:a.length;return r.jsxs("div",{...s,className:He["add-to-cart--items"],"data-thumbnail":n,children:[Array.isArray(a)&&a.filter((c,l)=>l<i).map(c=>{var u;const l=(u=o==null?void 0:o.find(m=>m.id===c.itemOffered.isVariationOf.productGroupID))==null?void 0:u.texture;return r.jsx(vt.Card,{item:c,thumbnail:n,texture:l},c.itemOffered.sku)}),e]})};jc.displayName="AddToCart.Layout.Items";const Cc=({children:e,Z_INDEX_WAR:t})=>{const{isOpen:n,setIsOpen:s}=Et(),{isMobile:o}=ne();return r.jsxs(d.Modal.Root,{"data-modal":"add-to-cart--modal",className:He["add-to-cart__modal"],isMobile:o??!1,isOpen:n,setIsOpen:s,variant:"sideBottom",style:{zIndex:t.modal},children:[r.jsx(d.Modal.Header,{navigation:"top",children:r.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0})}),r.jsx(d.Modal.Body,{children:e})]})};Cc.displayName="AddToCart.Modal";const $f=({children:e})=>{const{count:t,handleClose:n,setIsOpen:s}=Et(),o=g.useRef(t);return g.useEffect(()=>{t>o.current&&s(!0),t<o.current&&o.current>=1&&n(),o.current=t},[t,n,s]),r.jsx(r.Fragment,{children:e})},Sc=({children:e,component:t,CONSTANTS:n,...s})=>{const{recentlyAddedProducts:o}=Qt(),{isMobile:a}=ne(),i=o.length>3?4:o.length;return r.jsx(Si,{...s,count:i,isMobile:a,CONSTANTS:n,children:r.jsx($f,{children:a?r.jsxs(r.Fragment,{children:[r.jsx(vt.Modal,{Z_INDEX_WAR:n.Z_INDEX_WAR,children:t}),e]}):r.jsx(vt.Tooltip,{component:t,style:{width:350},Z_INDEX_WAR:n.Z_INDEX_WAR,children:e})})})};Sc.displayName="AddToCart.Root";const Pc=({children:e,component:t,Z_INDEX_WAR:n,...s})=>{const{contentRef:o,left:a,isLeaving:i,target:c,isOpen:l,top:u}=Et();return r.jsx(d.Tooltip.Root,{arrow:"top-right",component:r.jsx("div",{...s,ref:o,children:t}),id:"add-to-cart--tooltip",className:He["add-to-cart--tooltip"],style:{zIndex:n.modal},isLeaving:i,isOpen:l,left:a,size:"medium",position:"top",top:u,children:r.jsx("div",{className:He["add-to-cart--tooltip"],ref:c,children:e})})};Pc.displayName="AddToCart.Tooltip";const vt={Card:vc,Content:xc,Footer:bc,Items:jc,Modal:Cc,Root:Sc,Tooltip:Pc},Us=({title:e,...t})=>{const{recentlyAddedProducts:n}=Qt(),{isMobile:s}=ne(),o=n.length>3?4:n.length,a=n.length>(o??1),i=n.length>1;return r.jsx(vt.Root,{isMobile:s,count:n.length,component:r.jsx(vt.Content,{title:e,children:r.jsx(vt.Items,{thumbnail:i,children:a&&r.jsx(d.Badge.Count,{count:n.length-o,size:"medium",variant:"secondary"})})}),...t})};Us.displayName="AddToCart";const fo={"backtotop-btn":"_backtotop-btn_vcjsm_1","card-modifier":"_card-modifier_vcjsm_29"},Wf=({children:e,className:t,classNameButton:n,adornment:s,iconPosition:o,scrollToOptions:a,style:i,...c})=>{const l={top:(a==null?void 0:a.top)??0,left:(a==null?void 0:a.left)??0,behavior:(a==null?void 0:a.behavior)??"smooth"},m=o&&s?{flexDirection:{top:"column",bottom:"column-reverse",left:"row",right:"row-reverse"}[o]}:{},p=()=>{window&&window.document.body.scrollTo({...l})};return r.jsx(d.Card,{...c,shadow:!0,padding:"small",className:d.helpers.classNameConcat(fo["card-modifier"],t),style:{...i,padding:0},children:r.jsxs("button",{className:d.helpers.classNameConcat(fo["backtotop-btn"],n),onClick:p,style:{...m},"data-orientation":o,children:[s,e]})})},Gf="_container_1sy8s_16",mt={"carousel-container":"_carousel-container_1sy8s_1","add-cart-container":"_add-cart-container_1sy8s_8",container:Gf,"add-itens-to-cart-container":"_add-itens-to-cart-container_1sy8s_38","add-itens-to-cart-container-values":"_add-itens-to-cart-container-values_1sy8s_45","add-itens-to-cart-qty-products":"_add-itens-to-cart-qty-products_1sy8s_50","add-itens-to-cart-total":"_add-itens-to-cart-total_1sy8s_60","add-button":"_add-button_1sy8s_70"},Kf=({selectedProducts:e,handleAddAllToCart:t,CONSTANTS:n})=>{const s=Object.values(e.products).length;return r.jsxs("div",{className:mt["add-itens-to-cart-container"],children:[r.jsxs("div",{className:mt["add-itens-to-cart-container-values"],children:[r.jsx("div",{className:mt["add-itens-to-cart-qty-products"],children:r.jsx("span",{children:s===0?n.BUY_PACKAGE.group_cart.select_all_product:`${s} ${s===1?n.BUY_PACKAGE.group_cart.select_product:n.BUY_PACKAGE.group_cart.select_product+"s"}`})}),r.jsx("div",{className:mt["add-itens-to-cart-total"],children:r.jsx("span",{children:R.freightParsePrice({valueInCents:e.totalPrice*100,hasFree:!1,freeTaxMessage:n.FREIGHT_CALCULATION.messages.free_tax})})})]}),r.jsx(d.Button,{onClick:t,className:mt["add-button"],size:"large",disabled:s===0,variant:"primary",children:n.BUY_BUTTON_LABELS.add_to_cart})]})},Xf=e=>e.reduce((t,n)=>{var o;const s=t.find(a=>a.node.id===n.node.id);if(!s)return[...t,n];if((o=s==null?void 0:s.node.isVariantOf)!=null&&o.hasVariant){const a=s.node.isVariantOf.hasVariant,i=n.node.isVariantOf.hasVariant;a&&i&&(s.node.isVariantOf.hasVariant=[...a,...i])}return t},[]),Yf=({selectedProduct:e,productId:t,prevState:n,mainSellerId:s})=>{const{products:o,totalPrice:a}=n;try{if(!e){const{[t]:u,...m}=o;return{...n,totalPrice:a-u.price,products:m}}const i=R.getValidOffer(e.offers.offers,s);if(!i)return n;const c=i.seller.identifier,l=i.price;if(o[t]){const{price:u}=o[t];return o[t]={...o[t],price:l,id:e.sku,seller:c},{totalPrice:a+l-u,products:{...o}}}return{totalPrice:a+l,products:{...o,[t]:{id:e.sku,price:l,seller:c,productId:t}}}}catch(i){return console.error("Error handling SKU selection:",i),n}},wc=g.createContext({}),Qf=({children:e,item:t,index:n,shelfTitle:s,...o})=>{const[a,i]=g.useState(null),c=g.useRef(null),l=g.useRef({availableSkus:[],priceInfo:{price:0,listPrice:0}}),{sendDataLayerEvent:u,itemListRef:m}=oe(),p=y=>{u({functionKey:"productEvents",data:{commonData:{...t,availableSizes:l.current.availableSkus,...l.current.priceInfo},customData:{index:n+1},event:y}})},f=()=>{p("add_to_wishlist")},h=()=>{u({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...t,...l.current.priceInfo}]},supportData:{selectedSku:a,selectedSkus:[a]},customData:{index:n}}})},_=()=>{s&&(m.current={item_list_name:s}),p("select_item")};return r.jsx(wc.Provider,{value:g.useMemo(()=>({...o,index:n,item:t,element:c,selectedSku:a,setSelectedSku:i,eventDataRef:l,sendAddToWishlistEvent:f,sendSelectItemEvent:_,sendAddToCartEvent:h}),[o,t,c,a]),children:e})},Xe=()=>{const e=g.useContext(wc);if(e===void 0)throw new Error("useProductCardContext must be used within a ProductCardProvider");return e},Ie={"product-card--actions":"_product-card--actions_bndjh_1","product-card--actions--group":"_product-card--actions--group_bndjh_9","product-card--actions--selectors":"_product-card--actions--selectors_bndjh_21","product-card--body":"_product-card--body_bndjh_33","product-card--header":"_product-card--header_bndjh_47","product-card--footer":"_product-card--footer_bndjh_67","product-card--image":"_product-card--image_bndjh_90","product-card--image--container":"_product-card--image--container_bndjh_97","product-card--outstock":"_product-card--outstock_bndjh_133","product-card--price":"_product-card--price_bndjh_155","product-card--title":"_product-card--title_bndjh_177","product-card--title--tag":"_product-card--title--tag_bndjh_183","product-card--title--content":"_product-card--title--content_bndjh_200","product-card--selectors--size":"_product-card--selectors--size_bndjh_240","product-card--selectors--size--button":"_product-card--selectors--size--button_bndjh_266","product-card--selectors--size--skus":"_product-card--selectors--size--skus_bndjh_275","product-card--selectors--style":"_product-card--selectors--style_bndjh_289","product-card--selectors--style--more":"_product-card--selectors--style--more_bndjh_299","product-card--video":"_product-card--video_bndjh_316","product-card--wrapper":"_product-card--wrapper_bndjh_342"},Ec=({callback:e,children:t,className:n,data:s,isKit:o,...a})=>{const{item:{availability:{status:i},image:c}}=Xe();return i?r.jsxs("div",{...a,className:d.helpers.classNameConcat(Ie["product-card--actions"],n),children:[r.jsxs(fe.Wrapper,{type:"actions--group",children:[r.jsx(fe.Price,{}),r.jsx("div",{className:Ie["product-card--actions--selectors"],children:!o&&r.jsx(fe.StyleSelector,{data:s,images:c,callback:e})})]}),t]}):null};Ec.displayName="ProductCard.Actions";const Nc=({className:e,isKit:t,...n})=>{const{addToCart:s}=ve(),{isMobile:o=!1,selectedSku:a,outStock:i,item:c,sendAddToCartEvent:l,CONSTANTS:u}=Xe(),m=()=>{var h;if(!a)return;const f=R.getValidOffer(a.offers.offers,u.StoreConfig_MainSellerId);f&&s({id:a==null?void 0:a.sku,quantity:1,seller:f.seller.identifier},{id:c.id,texture:(h=c==null?void 0:c.image.find(_=>u.TEXTURE_IMAGE.includes(_.alternateName)))==null?void 0:h.url}),l()},p=a?u.BUY_BUTTON_LABELS.add_to_cart:u.BUY_BUTTON_LABELS.select_size;return r.jsx(d.Button,{...n,className:d.helpers.classNameConcat(e,"buy-button"),disabled:!t&&!a&&!i,size:o?"medium":"large",variant:i?"secondary":"primary",onClick:i?n.onClick:m,children:i?"Avise-me quando chegar":p})};Nc.displayName="ProductCard.Actions.BuyButton";const Zf={"snackbar-modifier":"_snackbar-modifier_1va2l_1"},Lt=({size:e,adornment:t,title:n,subtitle:s,supportChildren:o,className:a,Z_INDEX_WAR:i,...c})=>r.jsxs(d.SnackBar.Structure,{...c,size:e,className:d.helpers.classNameConcat(Zf["snackbar-modifier"],a),width:360,style:{zIndex:i.snackbar},children:[r.jsx(d.SnackBar.Content,{adornment:t,title:n,subtitle:s}),o&&r.jsx(d.SnackBar.Support,{children:o})]});Lt.displayName="SnackBar";const Wt={"wishlist--snack":"_wishlist--snack_3qi1o_9","wishlist--snack--actions":"_wishlist--snack--actions_3qi1o_25","wishlist-grid":"_wishlist-grid_3qi1o_31","wishlist-grid--container":"_wishlist-grid--container_3qi1o_39","pdc-empty-modifier":"_pdc-empty-modifier_3qi1o_49"};var Kr={exports:{}},Oe={};Oe._=Oe._interop_require_default=Jf;function Jf(e){return e&&e.__esModule?e:{default:e}}var un={exports:{}},sr={},po;function Ic(){return po||(po=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}t(e,{assign:function(){return a},searchParamsToUrlQuery:function(){return n},urlQueryToSearchParams:function(){return o}});function n(i){const c={};return i.forEach((l,u)=>{typeof c[u]>"u"?c[u]=l:Array.isArray(c[u])?c[u].push(l):c[u]=[c[u],l]}),c}function s(i){return typeof i=="string"||typeof i=="number"&&!isNaN(i)||typeof i=="boolean"?String(i):""}function o(i){const c=new URLSearchParams;return Object.entries(i).forEach(l=>{let[u,m]=l;Array.isArray(m)?m.forEach(p=>c.append(u,s(p))):c.set(u,s(m))}),c}function a(i){for(var c=arguments.length,l=new Array(c>1?c-1:0),u=1;u<c;u++)l[u-1]=arguments[u];return l.forEach(m=>{Array.from(m.keys()).forEach(p=>i.delete(p)),m.forEach((p,f)=>i.append(f,p))}),i}}(sr)),sr}var or={},bt={};function Rc(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Rc=function(s){return s?n:t})(e)}bt._=bt._interop_require_wildcard=ep;function ep(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Rc(t);if(n&&n.has(e))return n.get(e);var s={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(s,a,i):s[a]=e[a]}return s.default=e,n&&n.set(e,s),s}var ho;function Tc(){return ho||(ho=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var m in u)Object.defineProperty(l,m,{enumerable:!0,get:u[m]})}t(e,{formatUrl:function(){return a},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}});const s=bt._(Ic()),o=/https?|ftp|gopher|file/;function a(l){let{auth:u,hostname:m}=l,p=l.protocol||"",f=l.pathname||"",h=l.hash||"",_=l.query||"",y=!1;u=u?encodeURIComponent(u).replace(/%3A/i,":")+"@":"",l.host?y=u+l.host:m&&(y=u+(~m.indexOf(":")?"["+m+"]":m),l.port&&(y+=":"+l.port)),_&&typeof _=="object"&&(_=String(s.urlQueryToSearchParams(_)));let v=l.search||_&&"?"+_||"";return p&&!p.endsWith(":")&&(p+=":"),l.slashes||(!p||o.test(p))&&y!==!1?(y="//"+(y||""),f&&f[0]!=="/"&&(f="/"+f)):y||(y=""),h&&h[0]!=="#"&&(h="#"+h),v&&v[0]!=="?"&&(v="?"+v),f=f.replace(/[?#]/g,encodeURIComponent),v=v.replace("#","%23"),""+p+y+f+v+h}const i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(l){return process.env.NODE_ENV==="development"&&l!==null&&typeof l=="object"&&Object.keys(l).forEach(u=>{i.includes(u)||console.warn("Unknown key passed via urlObject into url.format: "+u)}),a(l)}}(or)),or}var ar={},_o;function tp(){return _o||(_o=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"omit",{enumerable:!0,get:function(){return t}});function t(n,s){const o={};return Object.keys(n).forEach(a=>{s.includes(a)||(o[a]=n[a])}),o}}(ar)),ar}var ir={},go;function Vn(){return go||(go=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(b,w){for(var S in w)Object.defineProperty(b,S,{enumerable:!0,get:w[S]})}t(e,{DecodeError:function(){return _},MiddlewareNotFoundError:function(){return C},MissingStaticPage:function(){return x},NormalizeError:function(){return y},PageNotFoundError:function(){return v},SP:function(){return f},ST:function(){return h},WEB_VITALS:function(){return n},execOnce:function(){return s},getDisplayName:function(){return l},getLocationOrigin:function(){return i},getURL:function(){return c},isAbsoluteUrl:function(){return a},isResSent:function(){return u},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return m},stringifyError:function(){return j}});const n=["CLS","FCP","FID","INP","LCP","TTFB"];function s(b){let w=!1,S;return function(){for(var P=arguments.length,E=new Array(P),A=0;A<P;A++)E[A]=arguments[A];return w||(w=!0,S=b(...E)),S}}const o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,a=b=>o.test(b);function i(){const{protocol:b,hostname:w,port:S}=window.location;return b+"//"+w+(S?":"+S:"")}function c(){const{href:b}=window.location,w=i();return b.substring(w.length)}function l(b){return typeof b=="string"?b:b.displayName||b.name||"Unknown"}function u(b){return b.finished||b.headersSent}function m(b){const w=b.split("?");return w[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(w[1]?"?"+w.slice(1).join("?"):"")}async function p(b,w){if(process.env.NODE_ENV!=="production"){var S;if((S=b.prototype)!=null&&S.getInitialProps){const A='"'+l(b)+'.getInitialProps()" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.';throw new Error(A)}}const P=w.res||w.ctx&&w.ctx.res;if(!b.getInitialProps)return w.ctx&&w.Component?{pageProps:await p(w.Component,w.ctx)}:{};const E=await b.getInitialProps(w);if(P&&u(P))return E;if(!E){const A='"'+l(b)+'.getInitialProps()" should resolve to an object. But found "'+E+'" instead.';throw new Error(A)}return process.env.NODE_ENV!=="production"&&Object.keys(E).length===0&&!w.ctx&&console.warn(""+l(b)+" returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps"),E}const f=typeof performance<"u",h=f&&["mark","measure","getEntriesByName"].every(b=>typeof performance[b]=="function");class _ extends Error{}class y extends Error{}class v extends Error{constructor(w){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+w}}class x extends Error{constructor(w,S){super(),this.message="Failed to load static file for page: "+w+" "+S}}class C extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function j(b){return JSON.stringify({message:b.message,stack:b.stack})}}(ir)),ir}var dn={exports:{}},yo;function $n(){return yo||(yo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return o}});const n=R.removeTrailingSlash,s=R.parsePath,o=a=>{if(!a.startsWith("/")||process.env.__NEXT_MANUAL_TRAILING_SLASH)return a;const{pathname:i,query:c,hash:l}=(0,s.parsePath)(a);return process.env.__NEXT_TRAILING_SLASH?/\.[^/]+\/?$/.test(i)?""+(0,n.removeTrailingSlash)(i)+c+l:i.endsWith("/")?""+i+c+l:i+"/"+c+l:""+(0,n.removeTrailingSlash)(i)+c+l};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(dn,dn.exports)),dn.exports}var cr={},mn={exports:{}},vo;function np(){return vo||(vo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return o}});const n=R.pathHasPrefix,s=process.env.__NEXT_ROUTER_BASEPATH||"";function o(a){return(0,n.pathHasPrefix)(a,s)}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(mn,mn.exports)),mn.exports}var xo;function Ac(){return xo||(xo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isLocalURL",{enumerable:!0,get:function(){return s}});const t=Vn(),n=np();function s(o){if(!(0,t.isAbsoluteUrl)(o))return!0;try{const a=(0,t.getLocationOrigin)(),i=new URL(o,a);return i.origin===a&&(0,n.hasBasePath)(i.pathname)}catch{return!1}}}(cr)),cr}var lr={},ur={},bo;function rp(){return bo||(bo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getSortedRoutes",{enumerable:!0,get:function(){return n}});class t{insert(o){this._insert(o.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(o){o===void 0&&(o="/");const a=[...this.children.keys()].sort();this.slugName!==null&&a.splice(a.indexOf("[]"),1),this.restSlugName!==null&&a.splice(a.indexOf("[...]"),1),this.optionalRestSlugName!==null&&a.splice(a.indexOf("[[...]]"),1);const i=a.map(c=>this.children.get(c)._smoosh(""+o+c+"/")).reduce((c,l)=>[...c,...l],[]);if(this.slugName!==null&&i.push(...this.children.get("[]")._smoosh(o+"["+this.slugName+"]/")),!this.placeholder){const c=o==="/"?"/":o.slice(0,-1);if(this.optionalRestSlugName!=null)throw new Error('You cannot define a route with the same specificity as a optional catch-all route ("'+c+'" and "'+c+"[[..."+this.optionalRestSlugName+']]").');i.unshift(c)}return this.restSlugName!==null&&i.push(...this.children.get("[...]")._smoosh(o+"[..."+this.restSlugName+"]/")),this.optionalRestSlugName!==null&&i.push(...this.children.get("[[...]]")._smoosh(o+"[[..."+this.optionalRestSlugName+"]]/")),i}_insert(o,a,i){if(o.length===0){this.placeholder=!1;return}if(i)throw new Error("Catch-all must be the last part of the URL.");let c=o[0];if(c.startsWith("[")&&c.endsWith("]")){let m=function(p,f){if(p!==null&&p!==f)throw new Error("You cannot use different slug names for the same dynamic path ('"+p+"' !== '"+f+"').");a.forEach(h=>{if(h===f)throw new Error('You cannot have the same slug name "'+f+'" 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 "'+f+'" differ only by non-word symbols within a single dynamic path')}),a.push(f)},l=c.slice(1,-1),u=!1;if(l.startsWith("[")&&l.endsWith("]")&&(l=l.slice(1,-1),u=!0),l.startsWith("...")&&(l=l.substring(3),i=!0),l.startsWith("[")||l.endsWith("]"))throw new Error("Segment names may not start or end with extra brackets ('"+l+"').");if(l.startsWith("."))throw new Error("Segment names may not start with erroneous periods ('"+l+"').");if(i)if(u){if(this.restSlugName!=null)throw new Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+o[0]+'" ).');m(this.optionalRestSlugName,l),this.optionalRestSlugName=l,c="[[...]]"}else{if(this.optionalRestSlugName!=null)throw new Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+o[0]+'").');m(this.restSlugName,l),this.restSlugName=l,c="[...]"}else{if(u)throw new Error('Optional route parameters are not yet supported ("'+o[0]+'").');m(this.slugName,l),this.slugName=l,c="[]"}}this.children.has(c)||this.children.set(c,new t),this.children.get(c)._insert(o.slice(1),a,i)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function n(s){const o=new t;return s.forEach(a=>o.insert(a)),o.smoosh()}}(ur)),ur}var dr={},mr={},fr={},pr={},jo;function sp(){return jo||(jo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ensureLeadingSlash",{enumerable:!0,get:function(){return t}});function t(n){return n.startsWith("/")?n:"/"+n}}(pr)),pr}var qs={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}t(e,{DEFAULT_SEGMENT_KEY:function(){return o},PAGE_SEGMENT_KEY:function(){return s},isGroupSegment:function(){return n}});function n(a){return a[0]==="("&&a.endsWith(")")}const s="__PAGE__",o="__DEFAULT__"})(qs);var Co;function op(){return Co||(Co=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}t(e,{normalizeAppPath:function(){return o},normalizeRscURL:function(){return a}});const n=sp(),s=qs;function o(i){return(0,n.ensureLeadingSlash)(i.split("/").reduce((c,l,u,m)=>!l||(0,s.isGroupSegment)(l)||l[0]==="@"||(l==="page"||l==="route")&&u===m.length-1?c:c+"/"+l,""))}function a(i){return i.replace(/\.rsc($|\?)/,"$1")}}(fr)),fr}var So;function Oc(){return So||(So=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}t(e,{INTERCEPTION_ROUTE_MARKERS:function(){return s},extractInterceptionRouteInformation:function(){return a},isInterceptionRouteAppPath:function(){return o}});const n=op(),s=["(..)(..)","(.)","(..)","(...)"];function o(i){return i.split("/").find(c=>s.find(l=>c.startsWith(l)))!==void 0}function a(i){let c,l,u;for(const m of i.split("/"))if(l=s.find(p=>m.startsWith(p)),l){[c,u]=i.split(l,2);break}if(!c||!l||!u)throw new Error(`Invalid interception route: ${i}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`);switch(c=(0,n.normalizeAppPath)(c),l){case"(.)":c==="/"?u=`/${u}`:u=c+"/"+u;break;case"(..)":if(c==="/")throw new Error(`Invalid interception route: ${i}. Cannot use (..) marker at the root level, use (.) instead.`);u=c.split("/").slice(0,-1).concat(u).join("/");break;case"(...)":u="/"+u;break;case"(..)(..)":const m=c.split("/");if(m.length<=2)throw new Error(`Invalid interception route: ${i}. Cannot use (..)(..) marker at the root level or one level up.`);u=m.slice(0,-2).concat(u).join("/");break;default:throw new Error("Invariant: unexpected marker")}return{interceptingRoute:c,interceptedRoute:u}}}(mr)),mr}var Po;function ap(){return Po||(Po=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isDynamicRoute",{enumerable:!0,get:function(){return s}});const t=Oc(),n=/\/\[[^/]+?\](?=\/|$)/;function s(o){return(0,t.isInterceptionRouteAppPath)(o)&&(o=(0,t.extractInterceptionRouteInformation)(o).interceptedRoute),n.test(o)}}(dr)),dr}var wo;function ip(){return wo||(wo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(o,a){for(var i in a)Object.defineProperty(o,i,{enumerable:!0,get:a[i]})}t(e,{getSortedRoutes:function(){return n.getSortedRoutes},isDynamicRoute:function(){return s.isDynamicRoute}});const n=rp(),s=ap()}(lr)),lr}var hr={},_r={},Eo;function cp(){return Eo||(Eo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getRouteMatcher",{enumerable:!0,get:function(){return n}});const t=Vn();function n(s){let{re:o,groups:a}=s;return i=>{const c=o.exec(i);if(!c)return!1;const l=m=>{try{return decodeURIComponent(m)}catch{throw new t.DecodeError("failed to decode param")}},u={};return Object.keys(a).forEach(m=>{const p=a[m],f=c[p.pos];f!==void 0&&(u[m]=~f.indexOf("/")?f.split("/").map(h=>l(h)):p.repeat?[l(f)]:l(f))}),u}}}(_r)),_r}var gr={},yr={},No;function lp(){return No||(No=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"escapeStringRegexp",{enumerable:!0,get:function(){return s}});const t=/[|\\{}()[\]^$+*?.-]/,n=/[|\\{}()[\]^$+*?.-]/g;function s(o){return t.test(o)?o.replace(n,"\\$&"):o}}(yr)),yr}var Io;function up(){return Io||(Io=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(_,y){for(var v in y)Object.defineProperty(_,v,{enumerable:!0,get:y[v]})}t(e,{getNamedMiddlewareRegex:function(){return h},getNamedRouteRegex:function(){return f},getRouteRegex:function(){return l},parseParameter:function(){return i}});const n=R.constants,s=Oc(),o=lp(),a=R.removeTrailingSlash;function i(_){const y=_.startsWith("[")&&_.endsWith("]");y&&(_=_.slice(1,-1));const v=_.startsWith("...");return v&&(_=_.slice(3)),{key:_,repeat:v,optional:y}}function c(_){const y=(0,a.removeTrailingSlash)(_).slice(1).split("/"),v={};let x=1;return{parameterizedRoute:y.map(C=>{const j=s.INTERCEPTION_ROUTE_MARKERS.find(w=>C.startsWith(w)),b=C.match(/\[((?:\[.*\])|.+)\]/);if(j&&b){const{key:w,optional:S,repeat:P}=i(b[1]);return v[w]={pos:x++,repeat:P,optional:S},"/"+(0,o.escapeStringRegexp)(j)+"([^/]+?)"}else if(b){const{key:w,repeat:S,optional:P}=i(b[1]);return v[w]={pos:x++,repeat:S,optional:P},S?P?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}else return"/"+(0,o.escapeStringRegexp)(C)}).join(""),groups:v}}function l(_){const{parameterizedRoute:y,groups:v}=c(_);return{re:new RegExp("^"+y+"(?:/)?$"),groups:v}}function u(){let _=0;return()=>{let y="",v=++_;for(;v>0;)y+=String.fromCharCode(97+(v-1)%26),v=Math.floor((v-1)/26);return y}}function m(_){let{interceptionMarker:y,getSafeRouteKey:v,segment:x,routeKeys:C,keyPrefix:j}=_;const{key:b,optional:w,repeat:S}=i(x);let P=b.replace(/\W/g,"");j&&(P=""+j+P);let E=!1;(P.length===0||P.length>30)&&(E=!0),isNaN(parseInt(P.slice(0,1)))||(E=!0),E&&(P=v()),j?C[P]=""+j+b:C[P]=b;const A=y?(0,o.escapeStringRegexp)(y):"";return S?w?"(?:/"+A+"(?<"+P+">.+?))?":"/"+A+"(?<"+P+">.+?)":"/"+A+"(?<"+P+">[^/]+?)"}function p(_,y){const v=(0,a.removeTrailingSlash)(_).slice(1).split("/"),x=u(),C={};return{namedParameterizedRoute:v.map(j=>{const b=s.INTERCEPTION_ROUTE_MARKERS.some(S=>j.startsWith(S)),w=j.match(/\[((?:\[.*\])|.+)\]/);if(b&&w){const[S]=j.split(w[0]);return m({getSafeRouteKey:x,interceptionMarker:S,segment:w[1],routeKeys:C,keyPrefix:y?n.NEXT_INTERCEPTION_MARKER_PREFIX:void 0})}else return w?m({getSafeRouteKey:x,segment:w[1],routeKeys:C,keyPrefix:y?n.NEXT_QUERY_PARAM_PREFIX:void 0}):"/"+(0,o.escapeStringRegexp)(j)}).join(""),routeKeys:C}}function f(_,y){const v=p(_,y);return{...l(_),namedRegex:"^"+v.namedParameterizedRoute+"(?:/)?$",routeKeys:v.routeKeys}}function h(_,y){const{parameterizedRoute:v}=c(_),{catchAll:x=!0}=y;if(v==="/")return{namedRegex:"^/"+(x?".*":"")+"$"};const{namedParameterizedRoute:C}=p(_,!1);let j=x?"(?:(/.*)?)":"";return{namedRegex:"^"+C+j+"$"}}}(gr)),gr}var Ro;function dp(){return Ro||(Ro=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"interpolateAs",{enumerable:!0,get:function(){return s}});const t=cp(),n=up();function s(o,a,i){let c="";const l=(0,n.getRouteRegex)(o),u=l.groups,m=(a!==o?(0,t.getRouteMatcher)(l)(a):"")||i;c=o;const p=Object.keys(u);return p.every(f=>{let h=m[f]||"";const{repeat:_,optional:y}=u[f];let v="["+(_?"...":"")+f+"]";return y&&(v=(h?"":"/")+"["+v+"]"),_&&!Array.isArray(h)&&(h=[h]),(y||f in m)&&(c=c.replace(v,_?h.map(x=>encodeURIComponent(x)).join("/"):encodeURIComponent(h))||"/")})||(c=""),{params:p,result:c}}}(hr)),hr}var To;function mp(){return To||(To=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return m}});const n=Ic(),s=Tc(),o=tp(),a=Vn(),i=$n(),c=Ac(),l=ip(),u=dp();function m(p,f,h){let _,y=typeof f=="string"?f:(0,s.formatWithValidation)(f);const v=y.match(/^[a-zA-Z]{1,}:\/\//),x=v?y.slice(v[0].length):y;if((x.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+y+"' passed to next/router in page: '"+p.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");const j=(0,a.normalizeRepeatedSlashes)(x);y=(v?v[0]:"")+j}if(!(0,c.isLocalURL)(y))return h?[y]:y;try{_=new URL(y.startsWith("#")?p.asPath:p.pathname,"http://n")}catch{_=new URL("/","http://n")}try{const j=new URL(y,_);j.pathname=(0,i.normalizePathTrailingSlash)(j.pathname);let b="";if((0,l.isDynamicRoute)(j.pathname)&&j.searchParams&&h){const S=(0,n.searchParamsToUrlQuery)(j.searchParams),{result:P,params:E}=(0,u.interpolateAs)(j.pathname,j.pathname,S);P&&(b=(0,s.formatWithValidation)({pathname:P,hash:j.hash,query:(0,o.omit)(S,E)}))}const w=j.origin===_.origin?j.href.slice(j.origin.length):j.href;return h?[w,b||w]:w}catch{return h?[y]:y}}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(un,un.exports)),un.exports}var fn={exports:{}},Ao;function fp(){return Ao||(Ao=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return s}});const n=$n(),s=function(o){for(var a=arguments.length,i=new Array(a>1?a-1:0),c=1;c<a;c++)i[c-1]=arguments[c];return process.env.__NEXT_I18N_SUPPORT?(0,n.normalizePathTrailingSlash)(R.addLocale.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)}(fn,fn.exports)),fn.exports}var vr={},Oo;function Lc(){return Oo||(Oo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RouterContext",{enumerable:!0,get:function(){return s}});const s=Oe._(g).default.createContext(null);process.env.NODE_ENV!=="production"&&(s.displayName="RouterContext")}(vr)),vr}var Hs={};(function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(u,m){for(var p in m)Object.defineProperty(u,p,{enumerable:!0,get:m[p]})}t(e,{AppRouterContext:function(){return o},GlobalLayoutRouterContext:function(){return i},LayoutRouterContext:function(){return a},MissingSlotContext:function(){return l},TemplateContext:function(){return c}});const s=Oe._(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)})(Hs);var pn={exports:{}},hn={exports:{}},Lo;function kc(){return Lo||(Lo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}n(t,{cancelIdleCallback:function(){return o},requestIdleCallback:function(){return s}});const s=typeof self<"u"&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(a){let i=Date.now();return self.setTimeout(function(){a({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-i))}})},1)},o=typeof self<"u"&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(a){return clearTimeout(a)};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(hn,hn.exports)),hn.exports}var ko;function pp(){return ko||(ko=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return u}});const n=g,s=kc(),o=typeof IntersectionObserver=="function",a=new Map,i=[];function c(m){const p={root:m.root||null,margin:m.rootMargin||""},f=i.find(v=>v.root===p.root&&v.margin===p.margin);let h;if(f&&(h=a.get(f),h))return h;const _=new Map,y=new IntersectionObserver(v=>{v.forEach(x=>{const C=_.get(x.target),j=x.isIntersecting||x.intersectionRatio>0;C&&j&&C(j)})},m);return h={id:p,observer:y,elements:_},i.push(p),a.set(p,h),h}function l(m,p,f){const{id:h,observer:_,elements:y}=c(f);return y.set(m,p),_.observe(m),function(){if(y.delete(m),_.unobserve(m),y.size===0){_.disconnect(),a.delete(h);const x=i.findIndex(C=>C.root===h.root&&C.margin===h.margin);x>-1&&i.splice(x,1)}}}function u(m){let{rootRef:p,rootMargin:f,disabled:h}=m;const _=h||!o,[y,v]=(0,n.useState)(!1),x=(0,n.useRef)(null),C=(0,n.useCallback)(b=>{x.current=b},[]);(0,n.useEffect)(()=>{if(o){if(_||y)return;const b=x.current;if(b&&b.tagName)return l(b,S=>S&&v(S),{root:p==null?void 0:p.current,rootMargin:f})}else if(!y){const b=(0,s.requestIdleCallback)(()=>v(!0));return()=>(0,s.cancelIdleCallback)(b)}},[_,f,p,y,x.current]);const j=(0,n.useCallback)(()=>{v(!1)},[]);return[C,y,j]}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(pn,pn.exports)),pn.exports}var _n={exports:{}},gn={exports:{}},Mo;function hp(){return Mo||(Mo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return n}});const n=(s,o)=>process.env.__NEXT_I18N_SUPPORT?R.normalizeLocalePath.normalizeLocalePath(s,o):{pathname:s,detectedLocale:void 0};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(gn,gn.exports)),gn.exports}var yn={exports:{}},Do;function _p(){return Do||(Do=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"detectDomainLocale",{enumerable:!0,get:function(){return n}});const n=function(){for(var s=arguments.length,o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];if(process.env.__NEXT_I18N_SUPPORT)return R.detectDomainLocale.detectDomainLocale(...o)};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(yn,yn.exports)),yn.exports}var Fo;function gp(){return Fo||(Fo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return o}});const n=$n(),s=process.env.__NEXT_ROUTER_BASEPATH||"";function o(a,i,c,l){if(process.env.__NEXT_I18N_SUPPORT){const u=hp().normalizeLocalePath,m=_p().detectDomainLocale,p=i||u(a,c).detectedLocale,f=m(l,void 0,p);if(f){const h="http"+(f.http?"":"s")+"://",_=p===f.defaultLocale?"":"/"+p;return""+h+f.domain+(0,n.normalizePathTrailingSlash)(""+s+_+a)}return!1}else return!1}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(_n,_n.exports)),_n.exports}var vn={exports:{}},zo;function yp(){return zo||(zo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return a}});const n=R.addPathPrefix,s=$n(),o=process.env.__NEXT_ROUTER_BASEPATH||"";function a(i,c){return(0,s.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH&&!c?i:(0,n.addPathPrefix)(i,o))}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(vn,vn.exports)),vn.exports}var xn={exports:{}},Bo;function vp(){return Bo||(Bo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(h,_){for(var y in _)Object.defineProperty(h,y,{enumerable:!0,get:_[y]})}n(t,{ACTION_FAST_REFRESH:function(){return l},ACTION_NAVIGATE:function(){return o},ACTION_PREFETCH:function(){return c},ACTION_REFRESH:function(){return s},ACTION_RESTORE:function(){return a},ACTION_SERVER_ACTION:function(){return u},ACTION_SERVER_PATCH:function(){return i},PrefetchCacheEntryStatus:function(){return p},PrefetchKind:function(){return m},isThenable:function(){return f}});const s="refresh",o="navigate",a="restore",i="server-patch",c="prefetch",l="fast-refresh",u="server-action";var m;(function(h){h.AUTO="auto",h.FULL="full",h.TEMPORARY="temporary"})(m||(m={}));var p;(function(h){h.fresh="fresh",h.reusable="reusable",h.expired="expired",h.stale="stale"})(p||(p={}));function f(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)}(xn,xn.exports)),xn.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return S}});const n=Oe,s=r,o=n._(g),a=mp(),i=Ac(),c=Tc(),l=Vn(),u=fp(),m=Lc(),p=Hs,f=pp(),h=gp(),_=yp(),y=vp(),v=new Set;function x(P,E,A,O,k,M){if(typeof window>"u"||!M&&!(0,i.isLocalURL)(E))return;if(!O.bypassPrefetchedCheck){const D=typeof O.locale<"u"?O.locale:"locale"in P?P.locale:void 0,q=E+"%"+A+"%"+D;if(v.has(q))return;v.add(q)}(async()=>M?P.prefetch(E,k):P.prefetch(E,A,O))().catch(D=>{if(process.env.NODE_ENV!=="production")throw D})}function C(P){const A=P.currentTarget.getAttribute("target");return A&&A!=="_self"||P.metaKey||P.ctrlKey||P.shiftKey||P.altKey||P.nativeEvent&&P.nativeEvent.which===2}function j(P,E,A,O,k,M,Q,D,q){const{nodeName:U}=P.currentTarget;if(U.toUpperCase()==="A"&&(C(P)||!q&&!(0,i.isLocalURL)(A)))return;P.preventDefault();const G=()=>{const H=Q??!0;"beforePopState"in E?E[k?"replace":"push"](A,O,{shallow:M,locale:D,scroll:H}):E[k?"replace":"push"](O||A,{scroll:H})};q?o.default.startTransition(G):G()}function b(P){return typeof P=="string"?P:(0,c.formatUrl)(P)}const S=o.default.forwardRef(function(E,A){let O;const{href:k,as:M,children:Q,prefetch:D=null,passHref:q,replace:U,shallow:Y,scroll:G,locale:H,onClick:Z,onMouseEnter:re,onTouchStart:ue,legacyBehavior:se=!1,...ce}=E;O=Q,se&&(typeof O=="string"||typeof O=="number")&&(O=(0,s.jsx)("a",{children:O}));const F=o.default.useContext(m.RouterContext),J=o.default.useContext(p.AppRouterContext),N=F??J,W=!F,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"&&(E[B]==null||typeof E[B]!="string"&&typeof E[B]!="object"))throw z({key:B,expected:"`string` or `object`",actual:E[B]===null?"null":typeof E[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 E[B];if(B==="as"){if(E[B]&&ee!=="string"&&ee!=="object")throw z({key:B,expected:"`string` or `object`",actual:ee})}else if(B==="locale"){if(E[B]&&ee!=="string")throw z({key:B,expected:"`string`",actual:ee})}else if(B==="onClick"||B==="onMouseEnter"||B==="onTouchStart"){if(E[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")&&E[B]!=null&&ee!=="boolean")throw z({key:B,expected:"`boolean`",actual:ee})});const L=o.default.useRef(!1);E.prefetch&&!L.current&&!W&&(L.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(ge=>ge.startsWith("[")&&ge.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:I,as:T}=o.default.useMemo(()=>{if(!F){const ge=b(k);return{href:ge,as:M?b(M):ge}}const[z,me]=(0,a.resolveHref)(F,k,!0);return{href:z,as:M?(0,a.resolveHref)(F,M):me||z}},[F,k,M]),Re=o.default.useRef(I),$=o.default.useRef(T);let X;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{X=o.default.Children.only(O)}catch{throw O?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
|
+
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 X=o.default.Children.only(O);else if(process.env.NODE_ENV==="development"&&(O==null?void 0:O.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 xe=se?X&&typeof X=="object"&&X.ref:A,[Ne,be,_e]=(0,f.useIntersection)({rootMargin:"200px"}),Te=o.default.useCallback(z=>{($.current!==T||Re.current!==I)&&(_e(),$.current=T,Re.current=I),Ne(z),xe&&(typeof xe=="function"?xe(z):typeof xe=="object"&&(xe.current=z))},[T,xe,I,_e,Ne]);o.default.useEffect(()=>{process.env.NODE_ENV==="production"&&N&&(!be||!ae||x(N,I,T,{locale:H},{kind:he},W))},[T,I,be,H,ae,F==null?void 0:F.locale,N,W,he]);const je={ref:Te,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&&X.props&&typeof X.props.onClick=="function"&&X.props.onClick(z),N&&(z.defaultPrevented||j(z,N,I,T,U,Y,G,H,W))},onMouseEnter(z){!se&&typeof re=="function"&&re(z),se&&X.props&&typeof X.props.onMouseEnter=="function"&&X.props.onMouseEnter(z),N&&((!ae||process.env.NODE_ENV==="development")&&W||x(N,I,T,{locale:H,priority:!0,bypassPrefetchedCheck:!0},{kind:he},W))},onTouchStart:process.env.__NEXT_LINK_NO_TOUCH_START?void 0:function(me){!se&&typeof ue=="function"&&ue(me),se&&X.props&&typeof X.props.onTouchStart=="function"&&X.props.onTouchStart(me),N&&(!ae&&W||x(N,I,T,{locale:H,priority:!0,bypassPrefetchedCheck:!0},{kind:he},W))}};if((0,l.isAbsoluteUrl)(T))je.href=T;else if(!se||q||X.type==="a"&&!("href"in X.props)){const z=typeof H<"u"?H:F==null?void 0:F.locale,me=(F==null?void 0:F.isLocaleDomain)&&(0,h.getDomainLocale)(T,z,F==null?void 0:F.locales,F==null?void 0:F.domainLocales);je.href=me||(0,_.addBasePath)((0,u.addLocale)(T,z,F==null?void 0:F.defaultLocale))}return se?o.default.cloneElement(X,je):(0,s.jsx)("a",{...ce,...je,children: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)})(Kr,Kr.exports);var xp=Kr.exports,bp=xp;const De=R.getDefaultExportFromCjs(bp),jp="_link_w24h0_1",Cp="_wrapper_w24h0_98",Sp="_text_w24h0_106",xr={link:jp,wrapper:Cp,text:Sp},Fe=({children:e,adornments:t,className:n,disableUnderline:s,href:o,mode:a,size:i,title:c,onClick:l,disablePadding:u,...m})=>{const p=d.helpers.ValidateProp({fieldTypes:Ot.SizesSmallExtended,property:i,fallback:"medium"}),f=d.helpers.ValidateProp({fieldTypes:Ot.Mode,property:a,fallback:"default"});return r.jsx(De,{...m,className:d.helpers.classNameConcat(xr.link,n),href:o&&o.length>0?o:"#","data-size":p,"data-variant":f,title:c||"NextLink","data-disable-underline":s??!1,"data-disable-padding":u??!0,children:r.jsxs("div",{className:xr.wrapper,onClick:l,children:[t==null?void 0:t.start,r.jsx("p",{className:xr.text,"data-size":p,children:e}),t==null?void 0:t.end]})})},Pp=({ICONS:e})=>{const{resetFeedback:t}=wt();return r.jsxs("div",{className:Wt["wishlist--snack--actions"],children:[r.jsx(Fe,{href:"/favoritos",children:"Ver Favoritos"}),r.jsx(d.Button,{variant:"tertiary",size:"small",onClick:t,adornment:{start:r.jsx(d.Icon,{name:e.close})}})]})},Vs=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:n})=>{const s=Ns(),{resetFeedback:o}=wt(),a=g.useRef(null);return g.useEffect(()=>{a.current&&clearTimeout(a.current),s&&(a.current=setTimeout(()=>{o()},5e3))},[s,o]),(s==null?void 0:s.active)&&r.jsx(Lt,{Z_INDEX_WAR:n,className:Wt["wishlist--snack"],"data-action":s.action,title:s.action==="add"?e.messages.add:e.messages.remove,supportChildren:r.jsx(Pp,{ICONS:t}),size:"medium"})};Vs.displayName="WishList.Feedback";const $s={"product-list--banner":"_product-list--banner_sfibj_1","product-list--card":"_product-list--card_sfibj_30","product-list":"_product-list_sfibj_1"},Mc=({className:e,children:t,columns:n=1,isMobile:s=!1,gap:o=8,position_grid:a,totalColumns:i=4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,...l})=>{const u=g.useMemo(()=>n%i===0?"initial":s||n<2?c:c.split("/").reverse().join("/"),[n,i,s]);return r.jsx("div",{...l,className:d.helpers.classNameConcat($s["product-list--banner"],e),style:{aspectRatio:u,maxWidth:`${n/i*100}%`,order:a,padding:o/2},children:t})};Mc.displayName="ProductList.Banner";const Dc=({isKit:e,parent:t,productId:n,setNotify:s,CONSTANTS:o})=>{const{router:a}=ie(),i=g.useRef(!1),c=g.useRef(null),[l,u]=g.useState([]),m=y=>a.push(y??""),p=new Map,f=async y=>{try{if(p.has(y)){u(p.get(y));return}const v=await fetch("/api/catalog/product/similars",{method:"POST",body:JSON.stringify({productId:y,filterTexture:o.TEXTURE_IMAGE}),priority:"low"});if(!v.ok)throw new Error("Erro ao buscar similares.");const x=await v.json();p.set(y,x),u(x)}catch(v){console.error(v)}},h=g.useCallback(y=>{!n||!y||(typeof f=="function"&&f(n),i.current=!0)},[n]),_=g.useCallback((y,v)=>{if(!y.isIntersecting){o.PLP_INFINITE_SCROLL&&c.current&&(clearTimeout(c.current),c.current=null);return}if(y.intersectionRatio>=v.threshold&&!i.current){if(o.PLP_INFINITE_SCROLL){c.current=setTimeout(()=>{h(!0)},o.PLP_PRODUCT_SIMILAR_DELAY);return}h(!0)}},[h]);return g.useEffect(()=>{if(e||!t.current)return;const y={root:null,threshold:.1},v=new IntersectionObserver(([x])=>{_(x,y)},y);return v.observe(t.current),()=>{c.current&&clearTimeout(c.current),v.disconnect()}},[_,t,e]),r.jsx(fe.Actions,{...l,callback:m,isKit:e,children:!e&&r.jsx(fe.SizeSelector,{setNotify:s,PLP_SIZE_ORDER:o.PLP_SIZE_ORDER})})};Dc.displayName="ProductList.Card.Actions";const Fc=({className:e,children:t,gap:n=32,item:s,isMobile:o,order:a,tag:i,hasMaxWidth:c=!0,index:l,setSkuSelected:u,showVideo:m,CONSTANTS:p,...f})=>{const h=g.useRef(null),{availability:{status:_}}=s,y=g.useCallback((x,C)=>{var j;typeof u=="function"&&u((j=x.isVariantOf)==null?void 0:j.hasVariant,C)},[u]),v=s.name.substring(0,4).toLowerCase()==="kit ";return r.jsxs("div",{...f,className:d.helpers.classNameConcat($s["product-list--card"],e),"data-mobile":o,"data-order":a,ref:h,style:{...c&&{maxWidth:o?"50%":"25%"},order:a,padding:n/2},children:[r.jsxs(fe.Root,{item:s,isMobile:o,index:l,size:o?"small":"medium",order:a,outStock:!_,CONSTANTS:p,children:[r.jsx(fe.Header,{product:s,tag:i==null?void 0:i.commercial}),r.jsx(fe.Media,{showVideo:m,hasPriority:!0}),r.jsxs(fe.Wrapper,{type:"body",children:[r.jsx(fe.Title,{tag:i==null?void 0:i.institucional}),r.jsx(Dc,{productId:s.isVariantOf.productGroupID,parent:h,setNotify:y,isKit:v,CONSTANTS:p}),!v&&r.jsx(fe.OutStock,{callback:y})]}),r.jsx(fe.Wrapper,{type:"footer",children:_&&r.jsx(fe.BuyButton,{isKit:v})})]}),t]})};Fc.displayName="ProductList.Card";const zc=({children:e,className:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat($s["product-list"],t),children:e});zc.displayName="ProductList.Grid";const st={Banner:Mc,Card:Fc,Root:zc,helpers:Cf},wp="_pdc_alo7z_1",Ke={"pdc--empty":"_pdc--empty_alo7z_1","pdc--grid":"_pdc--grid_alo7z_17","pdc--grid--content":"_pdc--grid--content_alo7z_26","pdc--infinite":"_pdc--infinite_alo7z_41","pdc--infinite--loader":"_pdc--infinite--loader_alo7z_44","pdc--infinite--loader--page":"_pdc--infinite--loader--page_alo7z_54","pdc--infinite--card--disabled":"_pdc--infinite--card--disabled_alo7z_58","pdc--infinite--next-page":"_pdc--infinite--next-page_alo7z_91","pdc--infinite--next-page--card":"_pdc--infinite--next-page--card_alo7z_101","pdc--infinite--next-page--spinner":"_pdc--infinite--next-page--spinner_alo7z_111","pdc--pagination":"_pdc--pagination_alo7z_118",pdc:wp},Ws=({className:e,ICONS:t,PLP_NOT_RESULT:n})=>{const{router:s}=ie(),{isMobile:o}=ne(),a=()=>{s.push(n==null?void 0:n.link)};return r.jsxs("div",{className:d.helpers.classNameConcat(Ke["pdc--empty"],e),children:[r.jsxs(d.TextStructure.DivWrapper,{className:Ke["pdc--empty-wrapper"],children:[r.jsx("span",{className:o?"typography-style-body-md":"typography-style-heading-sm",children:n.title}),r.jsx("p",{className:o?"typography-style-body-xs":"typography-style-body-sm",children:n.subtitle})]}),r.jsx(d.Button,{adornment:{end:r.jsx(d.Icon,{name:t.arrow_right})},className:"typography-style-body-sm-strong",onClick:()=>a(),variant:"tertiary",children:r.jsx("b",{children:n.text})})]})};Ws.displayName="PDC.Empty";const Wn=e=>r.jsx("div",{...e,className:Ke["pdc--infinite--next-page"],children:r.jsx(d.Spinner,{className:Ke["pdc--infinite--next-page--spinner"]})});Wn.displayName="PDC.Spinner";function Bc({CONSTANTS:e}){const{sendDataLayerEvent:t}=oe(),{isMobile:n}=ne(),{getAvailableProductTag:s}=ht(),[o,a]=g.useState([]),[i,c]=g.useState(!0),l=Ft(),u=l.join(","),m=n?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)},[u]),r.jsx("section",{className:Wt["wishlist-grid"],children:r.jsxs("div",{className:Wt["wishlist-grid--container"],children:[i&&r.jsx(Wn,{}),!l.length&&!(o!=null&&o.length)&&!i&&r.jsx(Ws,{className:Wt["pdc-empty-modifier"],ICONS:e.ICONS,PLP_NOT_RESULT:e.WISHLIST_NOT_RESULT}),r.jsx(st.Root,{children:Array.isArray(o)&&o.map((p,f)=>{const h=p.node.cluster.highlights||[],_=s(h);return r.jsx(st.Card,{gap:m,isMobile:n??!1,item:p.node,tag:_,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)})})]})})}Bc.displayName="Wishlist.Grid";const Ep=e=>e.map(t=>{var n;return(n=t.isVariantOf)==null?void 0:n.productGroupID})??[],Uc=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:n})=>{const s=zt(),o=Ft(),a=Ns(),{updateList:i}=wt();return g.useEffect(()=>{var l,u;a.active&&et.set("fs::wishlist",o);const c=async()=>{var m;await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:o,docId:(m=s==null?void 0:s.user)==null?void 0:m.id})}).catch(p=>{console.error("Error updating wishlist:",p)})};a.active&&((l=s.user)!=null&&l.id)&&o.length!==((u=s.wishlist)==null?void 0:u.length)&&c()},[a,s,o]),g.useEffect(()=>{var u;const c=async()=>{const m=await et.get("fs::wishlist");m&&(m==null?void 0:m.length)!==o.length&&i(m)},l=async()=>{var h;const m=await et.get("fs::wishlist")??[],p=s.wishlist?typeof s.wishlist[0]=="object"?Ep(s.wishlist):s.wishlist:[],f=[...new Set([...m,...p])];i(f),et.set("fs::wishlist",o),p.length!==f.length&&await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:f,docId:(h=s.user)==null?void 0:h.id})}).catch(_=>{console.error("Error updating wishlist:",_)})};if((u=s.user)!=null&&u.id){l();return}c()},[s,i,o]),r.jsx(Vs,{ICONS:t,Z_INDEX_WAR:n,WISHLIST_INFO:e})};Uc.displayName="Wishlist.Init";const qc=({product:e,priceInfo:t,size:n="medium",style:s,ICONS:o})=>{const{sendDataLayerEvent:a,currentLocalRef:i}=oe(),c=Ft(),{toggleProduct:l}=wt(),{isVariantOf:{productGroupID:u}}=e;return r.jsx(d.Button,{adornment:{start:r.jsx(d.Icon,{size:n,name:c.includes(u)?o.favorite_true:o.favorite_false})},onClick:()=>{l(u),a({functionKey:"productEvents",data:{event:c.includes(u)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:i.current},commonData:{...e,...t}}})},style:{...s,border:"none"},variant:"tertiary"})};qc.displayName="WishList.Toggle";const Hc={Feedback:Vs,Toggle:qc,Grid:Bc,Init:Uc},Vc=({product:e,tag:t,size:n="small"})=>{const{CONSTANTS:s}=Xe(),{tags:o}=ht(),a=e.offers.offers[0],i=R.getDiscountPercent(a.listPrice,a.price),c=o==null?void 0:o.flagDiscount;return r.jsxs(fe.Wrapper,{type:"header",style:{zIndex:s.Z_INDEX_WAR.product_card_header},children:[i>0&&!t&&(c==null?void 0:c.enableTag)&&r.jsxs(d.Tag,{title:`${i}% ${c==null?void 0:c.tagText}`,variant:"quaternary",size:"small",style:{background:c==null?void 0:c.tagColor,color:c==null?void 0:c.tagTextColor},children:[i,"% ",c==null?void 0:c.tagText]}),t?r.jsx(d.Tag,{title:t.value,adornment:{start:t.enableIcon&&t.icon?r.jsx(d.Icon,{name:t.icon,size:"small",style:{color:t.iconColor}}):null},size:n,variant:"quaternary",style:{background:t.tagColor,color:t.textColor},children:t.value}):null,s.PRODUCT_CARD_TOP_WISHLIST_TOGGLE&&r.jsx(Hc.Toggle,{product:e,priceInfo:{price:a.price,listPrice:a.listPrice},variant:"card",ICONS:s.ICONS})]})};Vc.displayName="ProductCard.Actions.Header";const $c=({className:e,children:t,hasPriority:n=!1,showVideo:s=!1,...o})=>{const{element:a,index:i,item:{image:c,slug:l,video:u},sendSelectItemEvent:m,order:p,CONSTANTS:f}=Xe(),h=R.getFirstImages({images:c,label:{first:f.MAIN_IMAGE,second:f.SECOND_IMAGE}});return r.jsxs("div",{...o,className:d.helpers.classNameConcat(Ie["product-card--image"],e),ref:a,style:{aspectRatio:f.PRODUCT_CARD_IMAGE_ASPECT_RATIO},children:[r.jsx(De,{href:`/${l}/p`,onClick:m,onMouseUp:_=>{_.button===1&&m(),f.PLP_INFINITE_SCROLL&&sessionStorage.setItem(f.PLP_GRID_SCROLL_BACK.order,String(p))},children:r.jsx("div",{className:Ie["product-card--image--container"],children:Array.isArray(h)&&h.map(({url:_,alternateName:y},v)=>g.createElement(Ee.Image,{...f.PRODUCT_IMAGE_DIMENSIONS.product_card,style:f.PRODUCT_IMAGE_DIMENSIONS.product_card,alt:y??"product image",key:v,...n&&{priority:v===0&&i<4},objectFit:"cover",src:_}))})}),f.PLP_SHOW_VIDEO_ON_PRODUCT_CARD&&s&&u&&r.jsx(fe.Video,{url:u,poster:h[0].url}),t]})};$c.displayName="ProductCard.Media.Media";const Wc=({className:e,callback:t,children:n,...s})=>{const{isMobile:o,item:a,CONSTANTS:{PRODUCT_CARD_TEXTS:i}}=Xe(),{availability:{status:c}}=a;return c?null:r.jsxs("div",{...s,className:d.helpers.classNameConcat(Ie["product-card--outstock"],e),children:[r.jsx(d.Tag,{size:"small",variant:"secondary",title:i.disabled,children:i.disabled}),r.jsx(d.Button,{className:d.helpers.classNameConcat(e,"buy-button"),size:o?"medium":"large",variant:"quaternary",onClick:()=>{typeof t=="function"&&t(a)},children:i.notify})]})};Wc.displayName="ProductCard.OutStock";const Gc=({children:e,className:t="",index:n,isMobile:s=!1,item:o,size:a,order:i,outStock:c,shelfTitle:l,CONSTANTS:u,...m})=>r.jsx(Qf,{item:o,isMobile:s,outStock:c,order:i,size:a,index:n,shelfTitle:l,CONSTANTS:u,children:r.jsx("div",{...m,className:d.helpers.classNameConcat(Ie["product-card--wrapper"],t),"data-size":a,children:e})});Gc.displayName="ProductCard.Root";const Kc=({disabled:e,label:t,size:n,value:s,onClick:o,...a})=>r.jsxs(d.ToggleSize.Wrapper,{...a,disabled:!1,outOfStock:e,size:n,onClick:o,children:[r.jsx(d.ToggleSize.DisabledAdornment,{}),r.jsx(d.ToggleSize.Text,{children:t})]});Kc.displayName="ProductCard.SizeSelector.Item";const Xc=({active:e=!1,callback:t,selectedSku:n=null,item:s,setNotify:o})=>{const{item:a,isMobile:i,setSelectedSku:c,eventDataRef:l}=Xe();s.productId=a.id;const u=R.disableSKU(s),m=R.getSKUName(s,"tamanho");!u&&!l.current.availableSkus.includes(m)&&l.current.availableSkus.push(m);const p=g.useCallback(h=>{const _=n===h?null:h;typeof c=="function"&&c(_),typeof t=="function"&&t(_)},[t,c,n]),f=g.useCallback(()=>{if(u&&typeof o=="function"){o(a,s);return}p(s)},[s,o,p,u,a]);return r.jsx(Kc,{active:e,disabled:u,label:m,onClick:()=>f(),size:i?"x-small":"small",value:s})};Xc.displayName="ProductCard.SizeSelector.SkuItem";const Yc=({items:e,getLabel:t,PLP_SIZE_ORDER:n})=>Array.isArray(e)?[...e].sort((s,o)=>{const a=t(s).toUpperCase(),i=t(o).toUpperCase(),c=n.indexOf(a)-n.indexOf(i);return c!==0?c:a.localeCompare(i,"pt-BR")}):[],Qc=({callback:e,className:t="",children:n,setNotify:s,PLP_SIZE_ORDER:o,...a})=>{const{isMobile:i,item:{isVariantOf:{hasVariant:c}},selectedSku:l}=Xe(),u=g.useMemo(()=>Array.isArray(c)?Yc({items:c,getLabel:m=>R.getSKUName(m,"tamanho"),PLP_SIZE_ORDER:o}):[],[c]);return r.jsxs("div",{...a,className:d.helpers.classNameConcat(Ie["product-card--selectors--size"],t),"data-mobile":i,children:[r.jsx("div",{className:Ie["product-card--selectors--size--skus"],children:u.map((m,p)=>r.jsx(Xc,{active:l===m,callback:e,item:m,selectedSku:l,setNotify:s},`size--${p}--${m.sku}`))}),r.jsx("div",{className:Ie["product-card--selectors--size--button"],children:n})]})};Qc.displayName="ProductCard.SizeSelector";const Xr=({alt:e="",callback:t,more:n,total:s=4,src:o,url:a,...i})=>r.jsxs(d.ToggleStyle.Wrapper,{...i,onClick:()=>{typeof t=="function"&&t(a)},children:[r.jsx(d.ToggleStyle.DisabledAdornment,{}),r.jsxs(d.ToggleStyle.Texture,{children:[o&&r.jsx(Ee.Image,{alt:e??o,src:o,height:34,width:34}),n&&r.jsx(d.TextStructure.DivWrapper,{className:Ie["product-card--selectors--style--more"],children:r.jsxs("p",{children:["+ ",s]})})]})]}),Np=({children:e,callback:t,data:n,total:s=4,size:o,...a})=>{const{index:i}=Xe(),{triggerSelectItemEventRef:c}=oe();return r.jsxs("div",{...a,children:[e,Array.isArray(n)&&n.slice(0,s).map((l,u)=>r.jsx(Xr,{callback:m=>{c.current.trigger=!0,c.current.index=i,typeof t=="function"&&t(m)},src:(l==null?void 0:l.textureImage)??"",alt:l==null?void 0:l.textureAlt,url:l==null?void 0:l.slug,size:o},u)),Array.isArray(n)&&(n==null?void 0:n.length)>s&&r.jsx(Xr,{size:o,total:n.length-s,more:!0})]})},Zc=({callback:e,className:t,data:n,images:s=[],findTexture:o,...a})=>{const{CONSTANTS:i}=Xe(),c=o||i.TEXTURE_IMAGE,l=s==null?void 0:s.find(u=>c.includes(u.alternateName));return r.jsx(Np,{...a,callback:e,className:d.helpers.classNameConcat(Ie["product-card--selectors--style"],t),data:n,size:"x-small",children:l&&r.jsx(Xr,{active:!0,size:"x-small",src:l.url})})};Zc.displayName="ProductCard.StyleSelector";const Jc=({className:e,hasDecimal:t,...n})=>{const{isMobile:s,item:{offers:{lowPrice:o,highPrice:a},installments:{count:i,value:c}},eventDataRef:l}=Xe();l.current.priceInfo={price:o,listPrice:a};const u=R.formatPriceToCurrency(a,t),m=R.formatPriceToCurrency(o,t),p=R.formatPriceToCurrency(c??0),f=s?"horizontal":"stacked";return r.jsx("div",{...n,className:d.helpers.classNameConcat(Ie["product-card--price"],e),"data-mobile":s,children:r.jsx(d.ProductInfo.Root,{size:"small",layout:f,children:r.jsxs(d.ProductInfo.Wrapper,{size:"small",layout:f,children:[r.jsx(d.ProductInfo.ValuesWrapper,{children:m!==u?r.jsxs(r.Fragment,{children:[r.jsx(d.ProductInfo.Price,{label:"originalPrice",value:u,size:"small"}),r.jsx(d.ProductInfo.Price,{label:"discountPrice",value:m,size:"small"})]}):r.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:m,size:"small"})}),i&&i>1&&c?r.jsx(d.ProductInfo.Price,{label:"installment",value:`${i}x ${p}`,size:"small"}):null]})})})};Jc.displayName="ProductCard.Price";const el=({tag:e,className:t})=>{const{item:{name:n}}=Xe();return r.jsxs("div",{className:d.helpers.classNameConcat(Ie["product-card--title"],t),children:[r.jsx("div",{className:Ie["product-card--title--tag"],children:e?r.jsx(d.Tag,{size:"small",title:e.value,variant:"quaternary",adornment:{start:e.enableIcon&&e.icon?r.jsx(d.Icon,{name:e.icon,style:{color:e.iconColor}}):null},style:{background:e.tagColor,color:e.textColor},children:e.value}):r.jsx("div",{})}),r.jsx("div",{className:Ie["product-card--title--content"],children:n&&r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h3",{children:n})})})})]})};el.displayName="ProductCard.Title";const tl=({className:e,url:t,poster:n,...s})=>{const{element:o}=Xe();return g.useEffect(()=>{if(!(o!=null&&o.current))return;const a=o.current,i=a.querySelector("video");if(i){const c=new IntersectionObserver(m=>{m.forEach(p=>{R.setVideoPlay(p.isIntersecting,i,t)})},{root:null,rootMargin:"0px",threshold:.5}),l=()=>{i.setAttribute("data-loaded","true")},u=()=>{a&&(c.observe(a),i.addEventListener("loadeddata",l))};return document.readyState==="complete"?u():window.addEventListener("load",u),()=>{c.disconnect(),window.removeEventListener("load",u)}}return()=>null},[t,o]),r.jsx("div",{...s,className:d.helpers.classNameConcat(Ie["product-card--video"],e),children:t&&r.jsx(Ee.Video,{autoPlay:!1,muted:!0,loop:!0,preload:"none",playsInline:!0,poster:n})})};tl.displayName="ProductCard.Media.Video";const nl=({children:e,className:t,type:n,...s})=>r.jsx("div",{...s,className:d.helpers.classNameConcat(Ie[`product-card--${n}`],t),children:e});nl.displayName="ProductCard.Wrapper";const fe={Actions:Ec,BuyButton:Nc,Header:Vc,Media:$c,Root:Gc,OutStock:Wc,Price:Jc,SizeSelector:Qc,StyleSelector:Zc,Title:el,Video:tl,Wrapper:nl},Ip="_carousel_1egdv_1",Rp="_shelf__container_1egdv_14",Tp="_shelf_without_carousel_1egdv_34",Ap="_card_container_1egdv_57",At={carousel:Ip,"custom-controllers":"_custom-controllers_1egdv_5",shelf__container:Rp,"controllers-arrows-bullets":"_controllers-arrows-bullets_1egdv_23",shelf_without_carousel:Tp,card_container:Ap},Uo=({title:e})=>r.jsx("div",{className:At.shelf__container,children:e&&r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("h2",{className:d.helpers.classNameConcat("typography-style-body-md",R.responsive["responsive-mobile-flex"]),children:e}),r.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-md",R.responsive["responsive-desktop-flex"]),children:e})]})})}),Op=({children:e,ICONS:t,itemsPerPage:n,title:s})=>{const{isMobile:o}=ne(),a=n[o?"mobile":"desktop"],{initialize:i,controller:c,itemsStyles:l,pagination:u}=d.Carousel.useCarousel({itemsPerPage:a,gap:10,loop:!0,direction:"row"}),m=g.Children.toArray(e).length;return o||m>=4?r.jsxs(d.Carousel.Root,{innerRef:f=>{i(f)},className:At.carousel,children:[r.jsxs("div",{className:At["custom-controllers"],children:[s&&r.jsx(Uo,{title:s}),a<m&&r.jsxs(d.Carousel.Controller,{className:At["controllers-arrows-bullets"],children:[r.jsxs(d.Carousel.Arrows,{children:[r.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:r.jsx(d.Icon,{name:t.arrow_left})}}),r.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:r.jsx(d.Icon,{name:t.arrow_right})}})]}),!o&&a>2&&r.jsx(d.Carousel.Bullets,{page:u.currentPage,total:u.totalPages,onBulletClick:f=>c==null?void 0:c.navigateTo(f)})]})]}),r.jsx(d.Carousel.Body,{children:g.Children.map(e,(f,h)=>r.jsx(d.Carousel.Item,{style:{...l,overflow:"hidden"},children:f},`${s}_${h}`))})]}):r.jsxs(r.Fragment,{children:[s&&r.jsx(Uo,{title:s}),r.jsx("div",{className:At.shelf_without_carousel,children:e})]})},rl=({className:e,item:t,isMobile:n,size:s,shelfTitle:o,...a})=>{const i=g.useRef(null),{getAvailableProductTag:c}=ht(),{availability:{status:l}}=t,u=p=>{const f=p.filter(h=>!a.CONSTANTS.TEXTURE_IMAGE.includes(h.keywords));return n?f.splice(0,2):f},m=c(t.cluster.highlights);return r.jsx("div",{ref:i,className:At.card_container,children:r.jsxs(fe.Root,{...a,item:{...t,image:u(t.image)},isMobile:n,size:n?"small":"medium",outStock:!l,shelfTitle:o,children:[r.jsx(fe.Header,{product:t,tag:m==null?void 0:m.commercial}),r.jsx(fe.Media,{}),r.jsxs(fe.Wrapper,{type:"body",children:[r.jsx(fe.Title,{tag:m==null?void 0:m.institucional}),r.jsx(fe.Actions,{})]}),r.jsx(fe.Wrapper,{type:"footer"})]})})};rl.displayName="ProductList.Card";const Xt={Shelf:Op,Card:rl},sl=({CONSTANTS:e,inView:t,products:n,innerRef:s})=>{const o=g.useMemo(()=>Xf(n),[n]),{isMobile:a}=ne(),{addItemsToCart:i}=ve(),{sendDataLayerEvent:c}=oe(),{getAvailableProductTag:l}=ht(),[u,m]=g.useState({totalPrice:0,products:{}}),p=()=>{const h=Object.values(u.products);i(h),c({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:h.map(_=>{const y=o.find(v=>v.node.id===_.productId);return y==null?void 0:y.node})},supportData:{selectedSkus:h,price:u.totalPrice}}})},f=({selectedProduct:h,productId:_})=>{const y=Yf({selectedProduct:h,productId:_,prevState:u,mainSellerId:e.StoreConfig_MainSellerId});m(y)};return g.useEffect(()=>{if(!t||o.length===0)return;const h=e.BUY_PACKAGE.header.title;c({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o},customData:{item_list_name:h},outsideEcommerceData:{item_list_name:h}}})},[t]),r.jsxs("div",{className:mt.container,ref:s,children:[r.jsx("div",{className:mt["carousel-container"],style:{width:o.length<=3?"max-content":"75%"},children:r.jsx(Xt.Shelf,{title:e.BUY_PACKAGE.header.title,itemsPerPage:{desktop:3,mobile:o.length>=3?2.2:o.length},ICONS:e.ICONS,children:Array.isArray(o)&&o.map(({node:h},_)=>{var x,C,j;const y=l(h.cluster.highlights),{availability:{status:v}}=h;return v?r.jsxs(fe.Root,{item:{...h,image:Bs.helpers.product.getFirstImages({images:h.image,label:{first:e.MAIN_IMAGE,second:e.SECOND_IMAGE}})},isMobile:a,size:"medium",index:_,shelfTitle:e.BUY_PACKAGE.header.title,CONSTANTS:e,children:[r.jsx(fe.Header,{product:h,tag:y.commercial}),r.jsx(fe.Media,{}),r.jsxs(fe.Wrapper,{type:"body",children:[r.jsx(fe.Title,{tag:{value:(x=y.institucional)==null?void 0:x.value,enableIcon:(C=y.institucional)==null?void 0:C.enableIcon,icon:(j=y.institucional)==null?void 0:j.icon}}),r.jsx(fe.Actions,{children:r.jsx(fe.SizeSelector,{callback:b=>f({selectedProduct:b,productId:h.id}),PLP_SIZE_ORDER:e.PLP_SIZE_ORDER})})]})]},h.id):null})})}),r.jsx("div",{className:mt["add-cart-container"],children:r.jsx(Kf,{handleAddAllToCart:p,selectedProducts:u,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,BUY_PACKAGE:e.BUY_PACKAGE,FREIGHT_CALCULATION:e.FREIGHT_CALCULATION}})})]})},Gs={"btn-login":"_btn-login_yas63_12","btn-header":"_btn-header_yas63_22","header-animation":"_header-animation_yas63_35"},Ks=({id:e})=>{const{setIsOpen:t,cartStore:{items:n}}=ve(),{handleSelectContent:s}=oe(),{CONSTANTS:o}=Pe(),a=n.reduce((i,c)=>i+(c.quantity??0),0);return r.jsx(d.Header.SupportItem,{onClick:()=>{t(!0),s({content:"header:minicart"})},id:e,children:r.jsxs(d.Badge.AutoPositioner,{children:[r.jsx(d.Badge.Count,{count:a,size:"medium",variant:"primary",style:{backgroundColor:"black",display:a>0?"flex":"none"}}),r.jsx(d.Icon,{name:o.header.ICONS.bag,size:"medium"})]})})};Ks.displayName="Header.Bag";const nn=({children:e,href:t,...n})=>t&&t!=="#"?r.jsx(De,{href:t.startsWith("/")?t:`/${t}`,...n,children:e}):e,ol=()=>{const{headerData:e}=Pe(),{handleSelectContent:t}=oe(),{reset:n,updateValue:s}=Jt(),o=a=>{a?s(a):n()};return r.jsx(d.Header.Categories,{children:Array.isArray(e.categories)&&e.categories.map((a,i)=>r.jsx(nn,{href:a.link,onMouseEnter:()=>o(a.submenuId),onFocus:()=>o(a.submenuId),children:r.jsx(d.Header.CategoryItem,{className:Gs["btn-header"],value:a.submenuId??null,adornment:{start:r.jsx(d.Icon,{name:a.iconStart}),end:r.jsx(d.Icon,{name:a.iconEnd})},style:{textWrap:"nowrap",gap:"0"},onClick:()=>{t({content:`header:${a.label}`})},children:a.label})},`category-${a.label}-${i}`))})};ol.displayName="Header.Categories";function Lp(){const{handleSelectContent:e}=oe(),{CONSTANTS:t}=Pe(),{setValue:n}=zn();return r.jsx(d.Header.SupportItem,{onClick:()=>{n(!0),e({content:"header:search"})},children:r.jsx(d.Icon,{name:t.header.ICONS.search,size:"medium"})})}const kp={"menu-subcategories-container":"_menu-subcategories-container_a93cr_1"},Mp={"observer-wrapper":"_observer-wrapper_r43gk_1"},Gn=({children:e,eventData:t,observerOptions:n,callBackWhenVisible:s,stopOnIntersection:o=!0,className:a,...i})=>{const c=g.useRef(null),l=xs(c,o,n),{sendDataLayerEvent:u}=oe();return g.useEffect(()=>{l&&(typeof s=="function"&&s(),t&&u({...t}))},[l]),r.jsx("div",{...i,ref:c,className:d.helpers.classNameConcat(Mp["observer-wrapper"],a),children:e})},al=({thumbnails:e,category:t,isMobile:n=!0,callBack:s})=>{const{handleSelectPromotionEvent:o}=oe(),a=50/e.length;return r.jsx("div",{className:kp["menu-subcategories-container"],children:e.map((i,c)=>{const l=n?i.srcMobile:i.srcDesk;if(!l)return null;const u={creative_name:"banner-menu",creative_slot:`banner-menu:${t}:${c+1}`,promotion_id:l,promotion_name:i.promotion_name};return r.jsx(Gn,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...u}}}},observerOptions:{delay:1e3},children:r.jsxs(De,{href:i.link??"#",onClick:()=>{typeof s=="function"&&s(),o({updatePromotionRef:!0,promotion:u})},children:[r.jsx(Ee.Image,{src:l,alt:i.label??l,width:500,height:500,sizes:`(max-width: 768px) 100vw, (max-width: 1023px) 75vw, ${a}vw`}),i.label&&r.jsx("p",{children:i.label})]})},`thumb-${i.label}-${c}`)})})};al.displayName="Menu.Thumbnail";const Yr={"menu-desktop":"_menu-desktop_1b799_1","menu-categories":"_menu-categories_1b799_12"},il=({children:e,dividerOnRight:t=!0,subMenu:n,...s})=>{var l;const{router:o}=ie(),{reset:a}=Jt(),{handleSelectContent:i}=oe(),{CONSTANTS:c}=Pe();return r.jsxs("div",{...s,className:Yr["menu-categories"],children:[(l=n==null?void 0:n.subCategories)==null?void 0:l.map((u,m)=>{var h,_,y,v;const p=u.listCollapseDesk&&!((h=u.see_all)!=null&&h.link)?{expandAfterRowsQty:u.rowsToShowDesk}:{},f=u.listCollapseDesk&&!((_=u.see_all)!=null&&_.link)?{expansivesAdornments:{open:c.header.ICONS.add,close:c.header.ICONS.minus},expansivesLabels:{open:c.header.COMPONENT_LIST.listExpandLabel,close:c.header.COMPONENT_LIST.listCollapseLabel},iconSize:"x-small"}:{adornment:{end:r.jsx(d.Icon,{name:c.header.ICONS.arrow_right,size:"small"})}};return r.jsxs(d.ComponentList.Structure,{children:[r.jsx(nn,{href:u.linkLabel,title:u.label,onClick:()=>{u.linkLabel&&(a(),i({content:`menu:${u.label??""}:${n.label??""}`}))},children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h2",{children:u.label})})})}),r.jsx(d.ComponentList.List,{columns:1,...p,className:Yr["submenu-categories"],children:(y=u.items)==null?void 0:y.map((x,C)=>r.jsx(d.ComponentList.ListItem,{id:`list-item-${x.label}-${C}`,children:r.jsx(Fe,{href:x.link??"#",size:"x-small",title:x.label??"",disableUnderline:!0,disablePadding:!0,onClick:()=>{a(),i({content:`menu:${u.label??""}:${x.label??""}:${n.label??""}`})},children:x.label})},`list-item-${x.label}-${C}`))}),((v=u.see_all)==null?void 0:v.link)&&r.jsx(d.ComponentList.Support,{...f,size:"small",onClick:()=>{var x;(x=u.see_all)!=null&&x.link&&(a(),i({content:`menu:${u.label??""}:${n.label}`}),o.push(u.see_all.link))},children:u.see_all.link&&u.see_all.label})]},`list-${u.label}-${m}`)}),t&&r.jsx(d.Utils.Divider,{size:"small",direction:"vertical"})]})};il.displayName="Menu.Categories";const cl=({children:e,dividerOnBottom:t=!0,...n})=>{const{CONSTANTS:s}=Pe();return r.jsxs(r.Fragment,{children:[r.jsx("div",{...n,className:Yr["menu-desktop"],style:{...n.style,justifyContent:s.header.ALIGNMENT_MENU},children:e}),t&&r.jsx(d.Utils.Divider,{size:"small"})]})};cl.displayName="Menu.MenuRoot";const br={Root:cl,Categories:il,Thumbnail:al},ll=()=>{const{headerData:e,CONSTANTS:t}=Pe(),n=si(),{reset:s}=Jt();return r.jsx(d.Header.SubMenu,{className:"header-desktop-submenu",children:Array.isArray(e.subMenus)&&e.subMenus.map((o,a)=>{const{thumbnails:i,label:c,id:l}=o,u=l===n,m=i==null?void 0:i.some(p=>!!p.srcDesk);return r.jsxs(br.Root,{id:l,style:u?{display:"flex",zIndex:t.header.Z_INDEX_WAR.menu_desktop}:{display:"none"},dividerOnBottom:u,children:[r.jsx(br.Categories,{dividerOnRight:!!m,subMenu:o}),Array.isArray(i)&&r.jsx(br.Thumbnail,{thumbnails:i,isMobile:!1,category:c,callBack:s})]},`submenu-${l}-${a}`)})})};ll.displayName="Header.SubMenu";const ul=()=>{const{handleSelectContent:e}=oe(),{CONSTANTS:t}=Pe();return r.jsx(De,{href:"/favoritos",children:r.jsx(d.Header.SupportItem,{onClick:()=>e({content:"header:wishlist"}),children:r.jsx(d.Icon,{name:t.header.ICONS.favorite_false,size:"medium"})})})};ul.displayName="Header.WishList";const Dp="_root_im5yf_125",$e={"user-menu--credits":"_user-menu--credits_im5yf_1","user-menu--content":"_user-menu--content_im5yf_10","user-menu--login":"_user-menu--login_im5yf_30","user-menu--login--content":"_user-menu--login--content_im5yf_37","user-menu--menu":"_user-menu--menu_im5yf_64","user-menu--tooltip":"_user-menu--tooltip_im5yf_92","tooltip-modifier":"_tooltip-modifier_im5yf_103","modal-controls-modifier":"_modal-controls-modifier_im5yf_108","modal-header-modifier":"_modal-header-modifier_im5yf_116",root:Dp},dl=({className:e,children:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat($e["user-menu--content"],e),children:t});dl.displayName="UserMenu.Content";var ml=(e=>(e.Account="account",e))(ml||{});const fl=({className:e,cashBack:t,credits:n,link:s,total:o,...a})=>{const i=t?R.formatPriceToCurrency(t):void 0,c=n?R.formatPriceToCurrency(n):void 0,l=o?R.formatPriceToCurrency(o):void 0;return r.jsx(d.Credits.Account,{...a,className:d.helpers.classNameConcat($e["user-menu--credits"],e),icon:"wallet",showIcon:!0,cashBackValue:i,creditsValue:c,linkMore:s,totalValue:l,type:ml.Account})};fl.displayName="UserMenu.Credits";const pl=({className:e,children:t,description:n,text:s,...o})=>{const{isMobile:a}=ne();return r.jsx("div",{...o,className:d.helpers.classNameConcat($e["user-menu--login"],e),"data-mobile":a,children:r.jsxs("div",{className:$e["user-menu--login--content"],children:[r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:[r.jsx("h3",{className:"typography-style-body-lg-strong",children:s}),r.jsx("p",{children:n})]})}),t]})})};pl.displayName="UserMenu.Login";const hl=({className:e,isLogged:t,onLogoutClick:n,ICONS:s,storeConfig:o,isMobile:a})=>{const i=a?lo:lo({ICONS:s,storeConfig:o}).filter(c=>c.deviceShown==="both"||c.deviceShown===(a?"mobile":"desktop"));return r.jsxs("ul",{className:d.helpers.classNameConcat($e["user-menu--menu"],e),children:[Array.isArray(i)&&i.map((c,l)=>r.jsx("li",{children:r.jsx(Fe,{href:c.href??"#",size:"small",disableUnderline:!0,adornments:{start:r.jsx(d.Icon,{name:c.icon??"delete"})},children:c.label})},l)),t?r.jsx("li",{children:r.jsx(Fe,{href:`${o.secureSubdomain}/api/vtexid/pub/logout?scope=mariafilo&returnUrl=${encodeURIComponent(`${o.storeUrl}`)}`,size:"small",disableUnderline:!0,onClick:n,adornments:{start:r.jsx(d.Icon,{name:uf(s)})},children:lf})}):r.jsx(r.Fragment,{})]})};hl.displayName="UserMenu.Menu";const _l=e=>{const t=g.useRef(null),n=g.useCallback(a=>{t.current&&!t.current.contains(a.target)&&e()},[e]),s=g.useCallback(a=>{t.current&&!t.current.contains(a.target)&&e()},[e]),o=g.useCallback(a=>{a.key==="Escape"&&e()},[e]);return g.useEffect(()=>(document.addEventListener("mousedown",n),document.addEventListener("keydown",o),document.addEventListener("touchstart",s),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("keydown",o),document.removeEventListener("touchstart",s)}),[n,o,s]),{ref:t}},Fp=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},zp=(e,t,n)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const{height:s,left:o,top:a,width:i}=t.getBoundingClientRect(),c=e.getBoundingClientRect(),l=e!=null&&e.parentElement?Fp(e==null?void 0:e.parentElement):0;return{left:o+i/2-(c.width+l*2),top:a+s+n}},gl=g.createContext({}),Bp=({children:e,delay:t=600,gap:n=20,isOpen:s,setIsOpen:o,target:a,...i})=>{const c=g.useRef(null),[l,u]=g.useState(!1),[m,p]=g.useState({left:0,top:0}),{ref:f}=_l(()=>{u(!0),typeof window<"u"&&(c.current=window.setTimeout(()=>{o(!1),u(!1)},t))});return g.useEffect(()=>{if(a&&(f!=null&&f.current)){const{left:h,top:_}=zp(f.current,a,n??0);p({left:h,top:_}),u(!1)}},[n,s,a,f]),r.jsx(gl.Provider,{value:g.useMemo(()=>({...i,...m,contentRef:f,isLeaving:l,isOpen:s,setIsOpen:o,setIsLeaving:u,target:a}),[i,m,f,l,s,o,u,a]),children:e})},yl=()=>{const e=g.useContext(gl);if(e===void 0)throw new Error("useUserMenuContext must be used within a UserMenuProvider");return e},vl=({children:e,isMobile:t=!1,Z_INDEX_WAR:n})=>{const{isOpen:s,setIsOpen:o}=yl();return r.jsxs(d.Modal.Root,{"data-user":"user-menu--modal",isMobile:t??!1,isOpen:s,setIsOpen:o,variant:"sideBottom",className:$e["modal-root-modifier"],style:{zIndex:n.user_menu_mobile},children:[r.jsx(d.Modal.Header,{navigation:"top",className:$e["modal-header-modifier"],children:r.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0,className:$e["modal-controls-modifier"]})}),r.jsx(d.Modal.Body,{children:e})]})};vl.displayName="UserMenu.Modal";const xl=({children:e,component:t,Z_INDEX_WAR:n,isMobile:s,...o})=>r.jsx(Bp,{...o,className:$e.root,children:s?r.jsxs(r.Fragment,{children:[r.jsx(dt.Modal,{Z_INDEX_WAR:n,children:t}),e]}):r.jsx(dt.Tooltip,{component:t,style:{width:304,zIndex:n.user_menu},Z_INDEX_WAR:n,children:e})});xl.displayName="UserMenu.Root";const bl=({children:e,component:t,Z_INDEX_WAR:n,...s})=>{const{contentRef:o,left:a,isLeaving:i,isOpen:c,top:l}=yl();return r.jsx(d.Tooltip.Root,{arrow:"top-right",component:r.jsx("div",{...s,ref:o,children:t}),className:d.helpers.classNameConcat($e["user-menu--tooltip"],$e["tooltip-modifier"]),isLeaving:i,isOpen:c,left:a,size:"medium",position:"top",top:l,style:{zIndex:n.user_menu},children:r.jsx("div",{className:$e["user-menu--tooltip"],children:e})})};bl.displayName="UserMenu.Tooltip";const dt={Credits:fl,Content:dl,Login:pl,Menu:hl,Modal:vl,Root:xl,Tooltip:bl},Kn=({children:e,isOpen:t,setIsOpen:n,desktopUserMenuTarget:s,mobileUserMenuTarget:o,storeConfig:a})=>{var h,_,y;const{isMobile:i}=ne(),{CONSTANTS:c}=Pe(),l=zt(),u=()=>{window.location.href=`${a.secureSubdomain}/api/io/login?returnUrl=${encodeURIComponent(`${window.location.href}`)}`},m=!!((h=l.user)!=null&&h.userId),{cashback:p,credits:f}=g.useMemo(()=>{var v,x;return{credits:((v=l==null?void 0:l.getCurrentCredits())==null?void 0:v.credits)??0,cashback:((x=l==null?void 0:l.getCurrentCredits())==null?void 0:x.cashback)??0}},[l]);return r.jsx(dt.Root,{component:r.jsxs(dt.Content,{children:[r.jsx(dt.Login,{description:mf(m),text:df(m,((_=l==null?void 0:l.user)==null?void 0:_.firstName)??((y=l==null?void 0:l.user)==null?void 0:y.email)),children:!m&&r.jsx(d.Button,{id:"conta",size:"medium",variant:"quaternary",onClick:()=>u(),children:c.header.MENU_INFO.login.button_text})}),f+p&&m?r.jsx(dt.Credits,{credits:f,cashBack:p,link:`${a.secureSubdomain}/account#/meus-creditos`,total:f+p}):r.jsx(r.Fragment,{}),r.jsx(d.Utils.Divider,{}),r.jsx(dt.Menu,{ICONS:c.header.ICONS,storeConfig:a,isLogged:m,className:R.responsive["responsive-desktop-flex"],onLogoutClick:()=>l.logout()}),r.jsx(dt.Menu,{ICONS:c.header.ICONS,storeConfig:a,isMobile:!0,isLogged:m,className:R.responsive["responsive-mobile-flex"],onLogoutClick:()=>l.logout()})]}),isOpen:t,isMobile:i,setIsOpen:n,target:i?o:s,Z_INDEX_WAR:c.header.Z_INDEX_WAR,children:e})};Kn.displayName="UserMenu";const jl=({storeConfig:e})=>{const{CONSTANTS:t}=Pe(),{handleSelectContent:n}=oe(),{reset:s}=Jt(),{setValue:o}=Ps(),a=Ss(),i=g.useRef(null);return r.jsxs(r.Fragment,{children:[r.jsxs(d.Header.Wrapper,{className:"header-desktop-wrapper",children:[r.jsx(d.Header.Logo,{style:{width:"100%"},children:r.jsx(De,{href:"/",onMouseEnter:s,children:r.jsx(d.Icon,{name:t.header.ICONS.logo,onClick:()=>{n({content:"header:logo"})}})})}),r.jsx(ol,{}),r.jsxs(d.Header.Support,{onMouseEnter:s,style:{justifyContent:"flex-end"},children:[r.jsx(Lp,{}),r.jsx(Kn,{isOpen:a,setIsOpen:o,desktopUserMenuTarget:i.current,storeConfig:e,children:r.jsx(d.Header.SupportItem,{onClick:()=>{o(!0),n({content:"header:user_menu"})},className:Gs["btn-login"],innerRef:i,children:r.jsx(d.Icon,{name:t.header.ICONS.person,size:"medium"})})}),r.jsx(ul,{}),r.jsx(Ks,{id:"cart-button"})]})]}),r.jsx(ll,{})]})};jl.displayName="Header.HeaderDesktopWrapper";const Be={"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"},Cl=({children:e,mobileBannerAlt:t,mobileBannerSrc:n,textColor:s,submenuId:o,label:a,...i})=>r.jsx("button",{...i,className:Be["menu--banners--item"],children:n?r.jsxs(d.Banner.Container,{children:[r.jsx(d.Banner.ImageWrapper,{children:r.jsx(Ee.Image,{alt:t??n,height:128,src:n,width:343,unoptimized:!0})}),r.jsx(d.Banner.Slot,{verticalAlignment:"end",horizontalAlignment:"center",children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:Be["menu--banners--item--text"],children:r.jsx("h2",{className:"typography-style-body-xs",style:s?{color:s}:{},children:e})})})})]}):r.jsx("h2",{...i,children:e})});Cl.displayName="Menu.Mobile.Category";const Sl=({label:e,...t})=>{const{CONSTANTS:n}=Pe();return r.jsx(d.Button,{...t,adornment:{end:r.jsx(d.Icon,{name:n.header.ICONS.arrow_right,size:"medium"})},mode:"inverse",size:"medium",variant:"primary",children:e})};Sl.displayName="Menu.Mobile.Body.Category";const Pl=({subCategory:e,submenuLabel:t,onHandleOut:n,...s})=>r.jsx("div",{...s,className:Be["menu--sub-category--list"],children:Array.isArray(e==null?void 0:e.items)&&(e==null?void 0:e.items.map((o,a)=>r.jsx(Fe,{disableUnderline:!0,disablePadding:!1,href:o.link??"#",onClick:()=>n(o.label,t),size:"medium",title:o.label??"",children:o.label},a)))});Pl.displayName="Menu.Mobile.List";const wl=({current:e,onHandleOut:t})=>{var n;return e?r.jsx("div",{className:Be["menu--sub-category"],children:Array.isArray(e==null?void 0:e.subCategories)&&((n=e==null?void 0:e.subCategories)==null?void 0:n.map((s,o)=>r.jsxs("div",{className:Be["menu--sub-category--item"],children:[r.jsx(Gt.Title,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id}),r.jsx(Gt.List,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id})]},o)))}):r.jsx(r.Fragment,{})};wl.displayName="Menu.Mobile.Body.SubCategory";const El=({subCategory:e,submenuLabel:t,onHandleOut:n,...s})=>{var c;const{router:o}=ie(),{handleSelectContent:a}=oe(),{CONSTANTS:i}=Pe();return r.jsxs("div",{...s,className:Be["menu--categories--title"],children:[r.jsx(nn,{href:e==null?void 0:e.linkLabel,title:e==null?void 0:e.linkLabel,onClick:()=>{a({content:`menu:${e.label??""}:${t}`})},children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h2",{className:"typography-style-body-md",children:e==null?void 0:e.label})})})}),((c=e==null?void 0:e.see_all)==null?void 0:c.link)&&r.jsx(d.ComponentList.Support,{adornment:{end:r.jsx(d.Icon,{name:i.header.ICONS.arrow_right,size:"small"})},size:"small",onClick:()=>{var l;n(e.label,t),(l=e==null?void 0:e.see_all)!=null&&l.link&&o.push(e.see_all.link)},children:e.see_all.label})]})};El.displayName="Menu.Mobile";const Gt={Banner:Cl,Category:Sl,List:Pl,SubCategory:wl,Title:El},Nl=g.createContext({}),Up=({children:e})=>{const[t,n]=g.useState(null),s=g.useCallback(()=>{n(null)},[]),o=a=>{a!==t&&n(a)};return r.jsx(Nl.Provider,{value:{currentCategory:t,setCurrentCategory:n,handleCloseMenu:s,handleChangeSubMenuOpened:o},children:e})},Il=()=>g.useContext(Nl),Rl=e=>{const{router:t}=ie(),{headerData:n}=Pe(),{handleSelectContent:s}=oe(),{currentCategory:o,setCurrentCategory:a}=Il(),i=g.useRef(null),c=()=>{if(i.current){const h=i.current;h&&(a(null),h==null||h.click())}},l=(h,_)=>{s({content:`menu:${h}`}),t.push(_),c()},u=(h,_)=>{s({content:`menu:${h}:${_}`}),c()},m=Array.isArray(n==null?void 0:n.categories)?n==null?void 0:n.categories:[],p=Array.isArray(n==null?void 0:n.subMenus)?n==null?void 0:n.subMenus:[],f=h=>{h.submenuId?a(h.submenuId):l(h.label,h.link)};return r.jsxs("div",{...e,className:Be["menu--body"],style:{transform:`translate3d(calc(-100% * ${o?1:0}), 0px, 0px)`},children:[r.jsx("button",{className:Be["menu--dummy-close"],ref:i,"data-close":!0}),r.jsxs("div",{className:Be["menu--step"],"data-active":"true",children:[r.jsx("div",{className:Be["menu--banners"],children:r.jsx("div",{className:Be["menu--banners--list"],children:m.map((h,_)=>g.createElement(Gt.Banner,{...h,key:_,onClick:()=>l(h.label,h.link)},h.mobileBannerAlt))})}),r.jsx("div",{className:Be["menu--categories"],children:m.map((h,_)=>r.jsx(Gt.Category,{label:h.label,onClick:()=>f(h)},_))})]}),r.jsx("div",{className:Be["menu--step"],"data-active":!!o,children:r.jsx(Gt.SubCategory,{current:p.find(h=>h.id===o),onHandleOut:u})})]})};Rl.displayName="Menu.Mobile.Body";const qp={"menu--header":"_menu--header_1ozdf_1"},Tl=()=>{var o;const{headerData:e}=Pe(),{currentCategory:t,setCurrentCategory:n}=Il(),s=(o=e==null?void 0:e.categories)==null?void 0:o.find(a=>a.submenuId===t);return r.jsxs("div",{className:qp["menu--header"],children:[r.jsx(d.Button,{"data-out":!s,iconNameStart:"arrow-left",mode:"inverse",onClick:()=>n(null)}),s&&r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{alignContent:"center",children:r.jsx("h2",{className:"typography-style-body-lg",children:s==null?void 0:s.label})})}),r.jsx(d.Button,{iconNameStart:"close","data-close":!0,"data-only":!s,mode:"inverse",onClick:()=>n(null)})]})};Tl.displayName="Menu.Mobile.Header";var Qr={exports:{}};function Hp(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 jr={},Cr={},qo;function Vp(){return qo||(qo=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"LoadableContext",{enumerable:!0,get:function(){return s}});const s=Oe._(g).default.createContext(null);process.env.NODE_ENV!=="production"&&(s.displayName="LoadableContext")}(Cr)),Cr}var Ho;function $p(){return Ho||(Ho=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return h}});const n=Oe._(g),s=Vp();function o(_){return _&&_.default?_.default:_}const a=[],i=[];let c=!1;function l(_){let y=_(),v={loading:!0,loaded:null,error:null};return v.promise=y.then(x=>(v.loading=!1,v.loaded=x,x)).catch(x=>{throw v.loading=!1,v.error=x,x}),v}function u(_,y){let v=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},y),x=null;function C(){if(!x){const w=new m(_,v);x={getCurrentValue:w.getCurrentValue.bind(w),subscribe:w.subscribe.bind(w),retry:w.retry.bind(w),promise:w.promise.bind(w)}}return x.promise()}if(typeof window>"u"&&a.push(C),!c&&typeof window<"u"){const w=v.webpack&&typeof Hp.resolveWeak=="function"?v.webpack():v.modules;w&&i.push(S=>{for(const P of w)if(S.includes(P))return C()})}function j(){C();const w=n.default.useContext(s.LoadableContext);w&&Array.isArray(v.modules)&&v.modules.forEach(S=>{w(S)})}function b(w,S){j();const P=n.default.useSyncExternalStore(x.subscribe,x.getCurrentValue,x.getCurrentValue);return n.default.useImperativeHandle(S,()=>({retry:x.retry}),[]),n.default.useMemo(()=>P.loading||P.error?n.default.createElement(v.loading,{isLoading:P.loading,pastDelay:P.pastDelay,timedOut:P.timedOut,error:P.error,retry:x.retry}):P.loaded?n.default.createElement(o(P.loaded),w):null,[w,P])}return b.preload=()=>C(),b.displayName="LoadableComponent",n.default.forwardRef(b)}class m{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};const{_res:y,_opts:v}=this;y.loading&&(typeof v.delay=="number"&&(v.delay===0?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},v.delay)),typeof v.timeout=="number"&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},v.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(x=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(y){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...y},this._callbacks.forEach(v=>v())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(y){return this._callbacks.add(y),()=>{this._callbacks.delete(y)}}constructor(y,v){this._loadFn=y,this._opts=v,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function p(_){return u(l,_)}function f(_,y){let v=[];for(;_.length;){let x=_.pop();v.push(x(y))}return Promise.all(v).then(()=>{if(_.length)return f(_,y)})}p.preloadAll=()=>new Promise((_,y)=>{f(a).then(_,y)}),p.preloadReady=_=>(_===void 0&&(_=[]),new Promise(y=>{const v=()=>(c=!0,y());f(i,_).then(v,v)})),typeof window<"u"&&(window.__NEXT_PRELOADREADY=p.preloadReady);const h=p}(jr)),jr}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(m,p){for(var f in p)Object.defineProperty(m,f,{enumerable:!0,get:p[f]})}n(t,{default:function(){return u},noSSR:function(){return l}});const s=Oe,o=r,a=s._($p()),i=typeof window>"u";function c(m){return{default:(m==null?void 0:m.default)||m}}function l(m,p){if(delete p.webpack,delete p.modules,!i)return m(p);const f=p.loading;return()=>(0,o.jsx)(f,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}function u(m,p){let f=a.default,h={loading:v=>{let{error:x,isLoading:C,pastDelay:j}=v;if(!j)return null;if(process.env.NODE_ENV!=="production"){if(C)return null;if(x)return(0,o.jsxs)("p",{children:[x.message,(0,o.jsx)("br",{}),x.stack]})}return null}};m instanceof Promise?h.loader=()=>m:typeof m=="function"?h.loader=m:typeof m=="object"&&(h={...h,...m}),h={...h,...p};const _=h.loader,y=()=>_!=null?_().then(c):Promise.resolve(c(()=>null));return h.loadableGenerated&&(h={...h,...h.loadableGenerated},delete h.loadableGenerated),typeof h.ssr=="boolean"&&!h.ssr?(delete h.webpack,delete h.modules,l(f,h)):f({...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)})(Qr,Qr.exports);var Wp=Qr.exports,Gp=Wp;const Al=R.getDefaultExportFromCjs(Gp),On={"modal-modifier":"_modal-modifier_10zw4_1","menu--navigation-bar":"_menu--navigation-bar_10zw4_15","menu--root":"_menu--root_10zw4_26"},Ol=({children:e})=>{const{menuIsOpen:t,setMenuIsOpen:n}=Is(),{CONSTANTS:s}=Pe();return r.jsxs(d.Modal.RootWithoutPortal,{className:d.helpers.classNameConcat(On["modal-modifier"],"menu-mobile-root"),isOpen:t,setIsOpen:n,variant:"sideRight",style:{bottom:"unset",overflowY:"hidden",position:"fixed",top:0,zIndex:s.header.Z_INDEX_WAR.menu_mobile},children:[r.jsx(Tl,{}),r.jsx(d.Modal.Body,{className:On["menu--root"],children:e})]})};Ol.displayName="Menu.MenuRoot";const Kp=Al(()=>Promise.resolve(Ol),{ssr:!1}),Ll=({children:e,last:t=!1,...n})=>r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{...n,"data-close":!0,size:"small",variant:"tertiary",children:e}),!t&&r.jsx(d.Utils.Divider,{direction:"vertical",size:"small",className:On.divider})]});Ll.displayName="Menu.NavigationBarItem";const kl=()=>{const{setUserMenuIsOpen:e}=Is(),{handleSelectContent:t}=oe(),{CONSTANTS:n}=Pe(),{router:s}=ie(),o=[{iconNameStart:n.header.ICONS.person,onClick:()=>{e(!0),t({content:"menu:user_menu"})},text:n.header.MENU_INFO.login.button_text},{iconNameStart:n.header.MENU_INFO.bag.button_icon,onClick:()=>{t({content:"menu:wishlist"}),s.push("/favoritos")},text:n.header.MENU_INFO.bag.button_text},{last:!0,iconNameStart:n.header.MENU_INFO.store.button_icon,onClick:()=>{t({content:"menu:store"}),s.push("/institucional/lojas")},text:n.header.MENU_INFO.store.button_text}];return r.jsx(d.Card,{id:"menu-navigationbar",shadow:!0,className:On["menu--navigation-bar"],style:{zIndex:n.header.Z_INDEX_WAR.menu_mobile_navigation_bar},children:Array.isArray(o)&&o.map((a,i)=>g.createElement(Ll,{...a,key:i},a.text))})};kl.displayName="Menu.NavigationBar";const Sr={Body:Rl,NavigationBar:kl,Root:Kp},Ml=({storeConfig:e})=>{const t=g.useRef(null),{CONSTANTS:n}=Pe(),{MENU_NAVIGATION_BAR_ALLOWED:s,ICONS:o}=n.header,{handleSelectContent:a}=oe(),{setValue:i}=zn(),{setValue:c}=ii(),{setValue:l}=Ps(),u=Ss(),m=ai(),{isMobile:p}=ne();return r.jsxs(r.Fragment,{children:[r.jsxs(d.Header.Wrapper,{className:"header-mobile-wrapper",children:[r.jsx(d.Header.Logo,{style:{width:"100%"},children:r.jsx(De,{href:"/",children:r.jsx(d.Icon,{name:o.logo,size:"x-large",onClick:()=>{a({content:"header:logo"})}})})}),r.jsxs(d.Header.Support,{children:[r.jsx(d.Header.SupportItem,{onClick:()=>{i(!0),a({content:"header:search"})},children:r.jsx(d.Icon,{name:o.search,size:"medium"})}),r.jsx(Ks,{}),r.jsxs(d.Header.SupportItem,{onClick:()=>c(!0),children:[r.jsx("span",{ref:t}),r.jsx(d.Icon,{name:o.menu,size:"medium"})]})]})]}),p&&r.jsx(ji,{menuIsOpen:m,setMenuIsOpen:c,userMenuIsOpen:m,setUserMenuIsOpen:l,children:r.jsx(Kn,{storeConfig:e,isOpen:u,setIsOpen:l,mobileUserMenuTarget:t==null?void 0:t.current,children:r.jsxs(Sr.Root,{children:[r.jsx(Sr.Body,{}),s?r.jsx(Sr.NavigationBar,{}):r.jsx(r.Fragment,{})]})})})]})};Ml.displayName="Header.HeaderMobileWrapper";const Xp=g.createContext({}),Yp=({children:e})=>{const{sendDataLayerEvent:t}=oe(),{cartStore:n,isOpen:s}=ve();g.useEffect(()=>{s&&t({functionKey:"viewCartEvent",data:{commonData:{cartStore:n}}})},[s]),g.useEffect(()=>{var a,i,c;if(n.id&&!((i=(a=n.marketingData)==null?void 0:a.marketingTags)!=null&&i.includes("faststore"))){const{id:l}=n;yt.post("/api/checkout/order-form/attachments/marketing-data",{orderFormId:l,marketingData:{...n==null?void 0:n.marketingData,marketingTags:Ka(((c=n.marketingData)==null?void 0:c.marketingTags)??[])}}).catch(u=>{console.error(u)})}},[n]);const o=({cartItem:a,oldQuantity:i,newQuantity:c})=>{t({functionKey:"skuEvents",data:{event:i>c?"remove_from_cart":"add_to_cart",commonData:{products:[{...a,price:a.price/100,listPrice:a.listPrice/100}]},customData:{quantity:c},supportData:{selectedSkus:[a]}}})};return r.jsx(Xp.Provider,{value:{handleUpdateItemQuantityEvent:o},children:e})},Qp="var(--color-background-brand-primary-lighter)",Zp="_fadeInOut_1l5ow_1",Jp="_fadeOut_1l5ow_1",te={brandPrimaryLighter:Qp,"mc--cashback":"_mc--cashback_1l5ow_1","mc--cashback--positive":"_mc--cashback--positive_1l5ow_21","mc--cashback--alert":"_mc--cashback--alert_1l5ow_24","mc--container--actions":"_mc--container--actions_1l5ow_28","mc--container--actions--secondary":"_mc--container--actions--secondary_1l5ow_36","mc-container-actions--toggle-size-modifier":"_mc-container-actions--toggle-size-modifier_1l5ow_55","mc--footer":"_mc--footer_1l5ow_63","mc--footer--actions":"_mc--footer--actions_1l5ow_72","mc--footer--actions-button":"_mc--footer--actions-button_1l5ow_77","mc--footer--total":"_mc--footer--total_1l5ow_93","mc--footer--total--info":"_mc--footer--total--info_1l5ow_98","mc--footer--total--info--content":"_mc--footer--total--info--content_1l5ow_103","mc--field":"_mc--field_1l5ow_149","mc--body":"_mc--body_1l5ow_189","mc--body--products":"_mc--body--products_1l5ow_196","mc--body--empty--feedback":"_mc--body--empty--feedback_1l5ow_204","mc--body--empty--text":"_mc--body--empty--text_1l5ow_209","mc--body--promotion":"_mc--body--promotion_1l5ow_222","mc--body--promotion--closeness":"_mc--body--promotion--closeness_1l5ow_225","mc--body--promotion--closeness--success":"_mc--body--promotion--closeness--success_1l5ow_248","mc--body--coupon-tag":"_mc--body--coupon-tag_1l5ow_260","mc--body--coupon-tag--text":"_mc--body--coupon-tag--text_1l5ow_278","mc--body--coupon-tag--button":"_mc--body--coupon-tag--button_1l5ow_284","mc--header":"_mc--header_1l5ow_290","mc--header--subtitle":"_mc--header--subtitle_1l5ow_316","mc--notify":"_mc--notify_1l5ow_357","mc--notify--content":"_mc--notify--content_1l5ow_372","mc--notify--item":"_mc--notify--item_1l5ow_385",fadeInOut:Zp,fadeOut:Jp,"mc--card":"_mc--card_1l5ow_447","mc--card--actions":"_mc--card--actions_1l5ow_452","mc--card--actions--secondary":"_mc--card--actions--secondary_1l5ow_460","mc--card--actions--add-remove":"_mc--card--actions--add-remove_1l5ow_487","mc--card--actions--gift":"_mc--card--actions--gift_1l5ow_501","mc--card--content-info":"_mc--card--content-info_1l5ow_514","mc--card--details":"_mc--card--details_1l5ow_521","mc--card--link":"_mc--card--link_1l5ow_526","mc--product--unavailable":"_mc--product--unavailable_1l5ow_534","mc--card--name":"_mc--card--name_1l5ow_537","mc--card--price":"_mc--card--price_1l5ow_552","mc--card--price--old-price":"_mc--card--price--old-price_1l5ow_562","mc--card--price--price-details":"_mc--card--price--price-details_1l5ow_566","mc--card--product-link":"_mc--card--product-link_1l5ow_577","mc--discount":"_mc--discount_1l5ow_587","mc--discount--header":"_mc--discount--header_1l5ow_590","inputs--tooltip":"_inputs--tooltip_1l5ow_590","mc--discount--body":"_mc--discount--body_1l5ow_609","minicart--modal-modifier":"_minicart--modal-modifier_1l5ow_630"},Dl=({item:{id:e,message:t,callback:n},removeNotification:s,ICONS:o})=>{const a=g.useRef(null),i=()=>{var l;(l=a.current)==null||l.setAttribute("data-animation-out","true")},c=l=>{s(l)};return r.jsx("div",{className:te["mc--notify--item"],ref:a,onAnimationEnd:()=>c(e),children:r.jsxs(d.SnackBar.Structure,{size:"medium",children:[r.jsx(d.SnackBar.Content,{title:t}),r.jsxs(d.SnackBar.Support,{children:[typeof n=="function"&&r.jsx(d.Button,{onClick:()=>{n(),i()},size:"small",variant:"tertiary",children:"Desfazer"}),r.jsx(d.Button,{iconNameStart:o.close,iconSize:"small",onClick:()=>i(),variant:"tertiary"})]})]})},e)};Dl.displayName="MiniCart.Notify.Item";const Fl=({ICONS:e})=>{const t=js(),{removeNotification:n}=Cs(),s=t.length?[...t].sort((o,a)=>a.id-o.id):[];return s.length?r.jsx("div",{className:te["mc--notify"],children:r.jsx("div",{className:te["mc--notify--content"],children:Array.isArray(s)&&s.map(o=>r.jsx(Dl,{item:o,removeNotification:n,ICONS:e},o.id))})}):null};Fl.displayName="MiniCart.Notifications";const eh=({handleSendEvent:e,onHandleRemove:t,product:n,MINICART_CONFIG:s,...o})=>{const a=Ft(),{toggleProduct:i}=wt(),{itemOffered:{isVariationOf:{productGroupID:c}},quantity:l}=n;return r.jsx(d.Button,{...o,adornment:{end:r.jsx(d.Icon,{name:`favorite-${a.includes(c)?"true":"false"}`,size:"small"})},onClick:()=>{i(c),a.includes(c)||t({texture:"mini-cart-wishlist",title:`${s.messages.add_wishlist}`},l,()=>i(c)),e(a.includes(c)?"remove_from_wishlist":"add_to_wishlist","productEvents")},children:s.messages.add_wishlist_button})},zl=({handleSendEvent:e,product:t,ICONS:n,MINICART_CONFIG:s,...o})=>{const{addToCart:a,removeToCart:i}=ve(),{bundleItems:c=[],id:l,uniqueId:u,seller:m,offerings:p,quantity:f}=t,h=(_,y,v)=>{i(l,_.title,()=>{typeof v=="function"&&v(),a({id:l,quantity:y,seller:m},{id:l,texture:_.texture},!0)})};return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:te["mc--card--actions--add-remove"],children:[s.has_wishlist_button&&r.jsx(eh,{...o,product:t,handleSendEvent:e,onHandleRemove:h,ICONS:n,MINICART_CONFIG:s}),r.jsx(d.Button,{...o,adornment:{end:r.jsx(d.Icon,{name:n.delete,size:"small"})},underline:!0,variant:"secondary",state:"danger",onClick:()=>{h({texture:"mini-cart",title:`${s.messages.remove}`},f),e("remove_from_cart","skuEvents")},children:s.messages.remove_button})]}),s.has_gift_option&&r.jsx(Tt.Gift,{uniqueId:u,bundleItems:c,offerings:p,ICONS:n,MINICART_CONFIG:s})]})};zl.displayName="MiniCart.Card.Actions";const Bl=({bundleItems:e,offerings:t,uniqueId:n,ICONS:s,MINICART_CONFIG:o})=>{const[a,i]=g.useState(!1),{toggleGiftItemCart:c}=ve(),l=()=>{if(t instanceof Object&&Array.isArray(t)){const[p]=t;if(p){i(!0);const f=e.some(h=>h.id===p.id);c(n,String(p.id),f).then(()=>i(!1))}}},u=t[0],m=e.find(p=>p.id===u.id);return u&&"id"in u?r.jsx("div",{className:te["mc--card--actions--gift"],children:r.jsx(d.Checkbox,{adornment:r.jsx(d.Icon,{name:s.check}),checked:!!m,disabled:a,label:o.messages.giftPackage,onChange:l})}):null};Bl.displayName="MiniCart.Card.Gift";const Ul=({itemOffered:e})=>{const t=R.updatedResizedImg(e==null?void 0:e.image[0].url,{width:200,height:300});return r.jsx(De,{href:`${e==null?void 0:e.slug}`,className:te["mc--card--product-link"],children:r.jsx(Ee.Image,{alt:(e==null?void 0:e.image[0].alternateName)||"Produto",src:t||"",width:108,height:164,objectFit:"unset"})})};Ul.displayName="MiniCart.Card.Media";const ql=({name:e,skuName:t,tagName:n,className:s})=>r.jsxs(r.Fragment,{children:[n&&r.jsx(d.Tag,{variant:"quaternary",title:n,style:{textTransform:"uppercase"},children:n}),r.jsx("p",{className:d.helpers.classNameConcat(te["mc--card--name"],s),children:R.getProductNameWithoutSku(e??"",t??"")})]});ql.displayName="MiniCart.Card.Name";const Hl=({total:e,totalList:t})=>r.jsx(d.ProductInfo.Root,{children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:te["mc--card--price"],children:r.jsx(d.ProductInfo.Wrapper,{className:te["mc--card--price--details"],size:"small",layout:"horizontal",children:t&&e!==t?r.jsxs(r.Fragment,{children:[r.jsx(d.ProductInfo.Price,{label:"originalPrice",value:R.formatPriceToCurrency(t),size:"small"}),r.jsx(d.ProductInfo.Price,{label:"discountPrice",value:R.formatPriceToCurrency(e),size:"small"})]}):r.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:R.formatPriceToCurrency(e),size:"small"})})})})});Hl.displayName="MiniCart.ProductPrice";const Vl=({product:e,TEXTURE_IMAGE:t,TOGGLE_STYLE_MODIFIER:n})=>{var u;const[s,o]=g.useState(""),a=g.useRef(null),{cartStore:{options:i}}=ve(),c=e.itemOffered.isVariationOf.productGroupID,l=g.useCallback(()=>{var p;const m=(p=i==null?void 0:i.find(f=>f.id===c))==null?void 0:p.texture;if(m){o(m);return}fetch("/api/catalog/product/info",{method:"POST",priority:"low",body:JSON.stringify({ids:[c]})}).then(f=>f.json()).then(f=>{const h=f.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(f=>{console.error(f)})},[i,c,e.id]);return g.useEffect(()=>{if(!a.current)return;const m=new IntersectionObserver(p=>{p[0].isIntersecting&&l()});return m.observe(a.current),()=>{m.disconnect()}},[l]),r.jsx("div",{ref:a,children:r.jsx(d.ToggleStyle.Wrapper,{size:"small",style:n,children:r.jsx(d.ToggleStyle.Texture,{children:s?r.jsx(Ee.Image,{alt:((u=e.itemOffered)==null?void 0:u.image[0].alternateName)??"Produto",src:s,width:164,height:164,style:n}):r.jsx(hc,{})})})})};Vl.displayName="MiniCart.Card.Style";const $l=({product:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:n,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:o})=>{const{size:a}=R.getColorAndSizeFromSkuName(e.itemOffered.skuName??"",n);return r.jsxs(d.Utils.Row,{alignItems:"center",children:[r.jsx(Vl,{product:e,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:o}),r.jsx(d.Utils.Divider,{direction:"vertical",size:"small",style:{height:24}}),a&&r.jsx(d.ToggleSize.Wrapper,{size:t.product_card.sku.size??"small",variation:t.product_card.sku.variation??"fill",className:te["mc-container-actions--toggle-size-modifier"],style:{backgroundColor:`${te.brandPrimaryLighter}`},children:r.jsx(d.ToggleSize.Text,{children:a})})]})};$l.displayName="MiniCart.Card.Sku";const Tt={Actions:zl,Gift:Bl,Media:Ul,Name:ql,Price:Hl,Sku:$l},th=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}},Wl=({available:e=!0,index:t,product:n,ICONS:s,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c})=>{var p,f;const{sendDataLayerEvent:l}=oe(),u=th(n),m=(h,_)=>{const y={commonData:{...n,...u},customData:{index:t},event:h};if(_==="skuEvents"){const v={...n,...u};y.supportData={selectedSkus:[v]},y.commonData.products=[v]}l({functionKey:_,data:y})};return r.jsxs("div",{className:d.helpers.classNameConcat(te["mc--card"],e?"":te["mc--card--unavailable"]),children:[r.jsx(Tt.Media,{itemOffered:n.itemOffered}),r.jsxs("div",{className:te["mc--card--content-info"],children:[r.jsx(Tt.Name,{name:((p=n.itemOffered)==null?void 0:p.name)??"",skuName:(f=n.itemOffered)==null?void 0:f.skuName}),r.jsxs("div",{className:te["mc--card--details"],children:[r.jsx("div",{className:te["mc--card--actions"],children:e?r.jsx(Tt.Price,{total:u.price,totalList:u.listPrice}):r.jsx(d.Tag,{variant:"secondary",size:"small",children:"Indisponível"})}),r.jsxs("div",{className:te["mc--card--actions--secondary"],children:[e&&r.jsx(Tt.Sku,{product:n,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c}),r.jsx(Tt.Actions,{handleSendEvent:m,product:n,size:"small",variant:"tertiary",ICONS:s,MINICART_CONFIG:o})]})]})]})]})};Wl.displayName="MiniCart.Card";const Gl=({type:e="positive",ICONS:t,MESSAGE_CASHBACK:n})=>{var a;const{toExpire:s}=zt(),o=((a=s==null?void 0:s.cashback)==null?void 0:a.reduce((i,c)=>i+c.remaining_value,0))??0;return o>0?r.jsxs("div",{className:d.helpers.classNameConcat(te["mc--cashback"],te[`mc--cashback--${e}`]),children:[r.jsx(d.Icon,{name:t.alert_circle,size:"medium"}),r.jsxs("p",{children:[r.jsx("span",{children:R.formatPriceToCurrency(o)})," ",n.title]})]}):null};Gl.displayName="MiniCart.Cashback";const Kl=({type:e,ICONS:t,MINICART_CONFIG:n})=>{const{addCouponSeller:s,removeCoupon:o,removeSellerCode:a,cartStore:{marketingData:i,openTextField:c}}=ve(),[l,u]=g.useState(!1),[m,p]=g.useState(!1),f=g.useCallback(()=>{let v="";return e==="coupon"?v=(i==null?void 0:i.coupon)??"":v=String((c==null?void 0:c.value)??""),v.toUpperCase()??""},[i,c,e]),[h,_]=g.useState(!!f()),y=async v=>{p(!0),!!f()&&(e==="coupon"?await o():await a(),_(!1),u(!1)),await s(v,e).then(C=>{if(!C.statusOk&&v||C.code!==200){v?(u(!0),_(!1)):u(!1);return}_(!0),u(!1)}).catch(()=>u(!0)).finally(()=>p(!1))};return r.jsx(ke.Field,{hasError:l,hasSuccess:h,isLoading:m,onHandler:y,type:e,title:e==="coupon"?`${n.messages.descount_cupom_placeholder}`:`${n.messages.sellers_code_placeholder}`,value:f(),MINICART_CONFIG:n,ICONS:t})};Kl.displayName="MiniCart.CouponSeller";const Xl=({ICONS:e,MINICART_CONFIG:t,PLP_NOT_RESULT:n})=>{const{router:s}=ie(),o=()=>{s.push(n.link)};return r.jsxs(d.Utils.Column,{alignContent:"center",alignItems:"center",gap:"24px",className:te["mc--body--empty--feedback"],children:[r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsxs("p",{className:`typography-style-body-xs ${te["mc--body--empty--text"]}`,children:[t.messages.empty_card," "]})})}),r.jsx(d.Button,{variant:"tertiary",size:"large",onClick:()=>o(),"data-close":!0,adornment:{end:r.jsx(d.Icon,{name:e.arrow_right,size:"medium"})},children:t.messages.empty_bag})]})};Xl.displayName="MiniCart.Feedback";const nh=e=>{const t=e.replace(/\D/g,"");return t.length>5?`${t.slice(0,5)}-${t.slice(5,8)}`:t},Yl=({feedback:e,hasError:t,onHandler:n,hasSuccess:s,type:o,title:a,value:i,ICONS:c})=>{const[l,u]=g.useState(i);g.useEffect(()=>{t||u(i)},[i,t]);const m=()=>t?r.jsx(d.Icon,{name:c.delete_circle}):String(i).length&&s?r.jsx(d.Icon,{name:c.check_circle}):null,p=()=>{if(o==="seller"){const y=String(i).includes(" - ")?String(i).split(" - ")[0]:l;u(y)}},f=()=>{if(o==="seller"){const y=String(i).includes(" - ")?i:l;u(y)}},h=y=>{const v=y.currentTarget.value;if(v===""&&typeof n=="function"||s&&String(i).length>0&&v!==String(i)||t&&v!==String(i)){u(""),n("");return}if(o==="cep"){const C=nh(v);u(C)}else u(v)},_=y=>{if(y.key.toLocaleLowerCase()==="enter"&&typeof n=="function"){const v=y.currentTarget.value;n(v)}};return r.jsx(d.TextField.Input,{adornment:{end:m()},mode:"over-label",label:a,feedback:e,value:l,type:"text",onFocus:p,onBlur:f,onChange:h,onKeyDown:_})};Yl.displayName="MiniCart.Field.Input";const Ql=({title:e,ICONS:t,MINICART_CONFIG:n,...s})=>{const o=g.useRef(null),{hasSuccess:a,hasError:i,isLoading:c,onHandler:l,type:u,value:m}=s,p=()=>i?"error":String(m).length&&a?"success":"none",f=g.useCallback(()=>{if(o.current){const y=o.current.querySelector("input");y&&typeof l=="function"&&(m!==""||i?(l(""),y.value=""):l((y==null?void 0:y.value)??""))}},[l,m,i]),h=p();return r.jsx("div",{ref:o,children:r.jsx(d.TextField.Structure,{className:te["mc--field"],input:r.jsx(Yl,{...s,feedback:h,title:e,ICONS:t}),right:r.jsx(d.Button,{"data-has-success":!a,size:"medium",title:String(m).length&&a||i?"Remover":"Aplicar",onClick:()=>f(),disabled:c,children:String(m).length&&a||i?r.jsx(d.Icon,{name:"close",size:"small"}):`${n.messages.promo_code_button}`}),supportText:u==="cep"&&h==="success"?r.jsx(d.TextField.SupportText,{text:"Mais informações de frete na etapa a seguir",feedback:"success",title:"support"}):null})})};Ql.displayName="MiniCart.Field";const Vo=e=>{const t=e*100;return Math.round(t)},rh=e=>(e/100).toFixed(2).replace(".",","),sh=(e,t)=>{const{valueType:n,remainingValueToActivate:s}=e;if(n==="quantity")return`Adicione mais ${s} ${s===1?"item":"itens"} ${t}`;if(n==="price"){const o=s===100?"Falta":"Faltam",a=rh(s);return`${o} R$ ${a} ${t}`}return t},Zl=({ICONS:e})=>{var x;const{promotionRules:t,data:n,cartStore:s,cartStore:{items:o,marketingData:a},addCouponSeller:i,setIsOpen:c}=ve(),{sendDataLayerEvent:l}=oe(),u=(x=n==null?void 0:n.promotion)==null?void 0:x.promotionCart,m=g.useRef(!1),{router:p}=ie();if(g.useEffect(()=>{(u==null?void 0:u.selectPromotion)==="Cupom"&&(t==null?void 0:t.remainingValueToActivate)&&(t==null?void 0:t.remainingValueToActivate)<=0&&(u==null?void 0:u.cupom)&&!m.current&&(a==null?void 0:a.coupon)!==u.cupom&&(m.current=!0,i(u.cupom,"coupon")),t!=null&&t.remainingValueToActivate&&(t==null?void 0:t.remainingValueToActivate)<=0&&l({functionKey:"viewCartEvent",data:{event:"closeness_filled",commonData:{cartStore:s}}}),t!=null&&t.remainingValueToActivate&&(t==null?void 0:t.remainingValueToActivate)>0&&(m.current=!1)},[u==null?void 0:u.selectPromotion,t==null?void 0:t.remainingValueToActivate,u==null?void 0:u.cupom,a==null?void 0:a.coupon,i]),!t||!u||u.selectPromotion==="Desativar"||o.length===0)return null;const f=u.title,h=u.subtitle,_=u.titleSuccess,y=u.subtitleSuccess,v=u.linkLabel;return r.jsxs("div",{className:te["mc--body--promotion"],children:[t.remainingValueToActivate>0&&r.jsx(d.Closeness,{className:te["mc--body--promotion--closeness"],title:sh(t,f),subtitle:h,percentage:Vo(t.completeness),iconLink:e.arrow_right,linkLabel:v,onClick:()=>{l({functionKey:"viewCartEvent",data:{event:"closeness_view_more",commonData:{cartStore:s}}}),p.push(`${u.link}`),c(!1)}}),t.remainingValueToActivate<=0&&r.jsx(d.Closeness,{className:`${te["mc--body--promotion--closeness"]} ${te["mc--body--promotion--closeness--success"]}`,title:_,subtitle:y,percentage:Vo(t.completeness)})]})};Zl.displayName="MiniCart.Modal.Body.Promotion";const Jl=({TIPBAR_CONFIGS:e})=>{const{data:t,cartStore:n,cartStore:{items:s,marketingData:o},addCouponSeller:a}=ve(),i=t==null?void 0:t.flags.flagCart.flagCupom,c=(o==null?void 0:o.coupon)===(i==null?void 0:i.valueCupom),[l,u]=g.useState(!1),[m,p]=g.useState(!1);if(g.useEffect(()=>{l&&setTimeout(()=>{u(!1)},e.snackbar_timeout)},[l]),g.useEffect(()=>{m&&setTimeout(()=>{p(!1)},e.snackbar_timeout)},[m]),!i||i.active==="Desativar"||i.valueCupom===""||s.length===0)return null;const f=async()=>{if(!n.items.length){p(!0);return}(await a(i==null?void 0:i.valueCupom,"coupon")).code!==200&&u(!0)};return r.jsxs("div",{className:te["mc--body--coupon-tag"],style:{backgroundColor:`${i.tagColor}`,color:`${i.textColor}`},children:[r.jsx("div",{className:te["mc--body--coupon-tag--text"],dangerouslySetInnerHTML:{__html:i.value}}),r.jsx("div",{className:te["mc--body--coupon-tag--button"],children:r.jsx(d.Button,{variant:"quaternary",mode:"inverse",onClick:f,disabled:c,children:c?"Cupom Aplicado":"Aplicar Cupom"})})]})};Jl.displayName="MiniCart.Modal.Body.CouponTag";const eu=({children:e,ICONS:t,MINICART_CONFIG:n,NAME_SPLIT_SYMBOL:s,PLP_NOT_RESULT:o,TEXTURE_IMAGE:a,TIPBAR_CONFIGS:i,TOGGLE_STYLE_MODIFIER:c})=>{const{cartStore:{items:l,messages:u}}=ve();return r.jsxs(d.Modal.Body,{className:te["mc--body"],children:[e,r.jsx(Zl,{ICONS:t}),r.jsx(Jl,{TIPBAR_CONFIGS:i}),r.jsx("div",{className:te["mc--body--products"],children:Array.isArray(l)&&l.length?l.map((m,p)=>{const f=u.find(h=>{var _;return h.code==="withoutStock"&&((_=h.fields)==null?void 0:_.ean)===m.ean})!==void 0;return r.jsx(ke.Card,{available:!m.availability.includes("outStock")||!f,index:p,product:m,ICONS:t,MINICART_CONFIG:n,NAME_SPLIT_SYMBOL:s,TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:c},`${m.id}-${m.itemOffered.sku}-${p}`)}):r.jsx(ke.Feedback,{ICONS:t,MINICART_CONFIG:n,PLP_NOT_RESULT:o})})]})};eu.displayName="MiniCart.Body";const tu=({children:e,storeConfig:t,MINICART_CONFIG:n})=>{const{cartStore:s}=ve();if(s.items.length===0)return null;const o=()=>{var i;const a=new URLSearchParams({orderFormId:s.id,...((i=s.marketingData)==null?void 0:i.utmCampaign)&&{utm_campaign:s.marketingData.utmCampaign}});window.location.href=`${t.checkoutUrl}?${a.toString()}#/cart`};return r.jsxs(d.Modal.Footer,{className:te["mc--footer"],children:[e,r.jsx("div",{className:te["mc--footer--actions"],children:r.jsx(d.Button,{variant:"primary",size:"large","data-close":!0,className:te["mc--footer--actions-button"],onClick:o,children:n.messages.checkout_button})})]})};tu.displayName="MiniCart.Modal.Footer";const nu=({children:e,ICONS:t,MINICART_CONFIG:n,Z_INDEX_WAR:s})=>{const[o,a]=g.useState(!1),i=g.useRef(null),c=()=>a(l=>!l);return r.jsxs(r.Fragment,{children:[o&&r.jsx(d.Tooltip.Root,{arrow:"right",position:"top",top:-3,left:-3,component:r.jsx("p",{children:"Código da vendedora, cupom ou cálculo do frete"}),id:"inputs--tooltip",className:te["inputs--tooltip"],style:{zIndex:s.modal},isOpen:!0,size:"medium",parent:i.current}),r.jsxs(d.Accordion.Wrapper,{className:te["mc--discount"],children:[r.jsx(d.Accordion.Header,{id:"frete",title:"Frete",closeIndicator:r.jsx(d.Icon,{name:t.arrow_up,size:"medium"}),openIndicator:r.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),className:d.helpers.classNameConcat(te["mc--discount--header"]),startOpen:n.promotion_input_starts_open,children:r.jsxs(d.TextStructure.Root,{children:[r.jsx(d.TextStructure.DivWrapper,{children:r.jsxs("h3",{className:"typography-style-body-sm",children:[n.messages.promo_code_title," "]})}),r.jsx("div",{ref:i,onMouseEnter:c,onMouseLeave:c,"aria-label":"Mostrar descrição",children:r.jsx(d.Icon,{name:t.alert_circle,size:"small"})})]})}),r.jsx(d.Accordion.Body,{className:te["mc--discount--body"],children:e})]})]})};nu.displayName="MiniCart.Discount";const ru=({discount:e,shipping:t,total:n})=>{var l,u;const{data:s}=ve(),o=(u=(l=s==null?void 0:s.flags)==null?void 0:l.flagCart)==null?void 0:u.flagTotal,a=n-Math.abs(e??0)+(t??0),i=t===0?"Frete Grátis":R.formatPriceToCurrency((t??0)/100),c=[{title:"Frete",value:t===void 0?"A calcular":i},{title:"Desconto",value:R.formatPriceToCurrency((e??0)/100)},{message:(o==null?void 0:o.value)??"",title:"Total",value:`1x de ${R.formatPriceToCurrency(a/100)}`}];return r.jsx("div",{className:te["mc--footer--total"],children:Array.isArray(c)&&c.map((m,p)=>r.jsxs("div",{className:te["mc--footer--total--info"],"data-discount":m.title==="Desconto",children:[r.jsx("p",{children:m.title}),r.jsxs("div",{className:te["mc--footer--total--info--content"],children:[m.message&&(o==null?void 0:o.active)==="Ativar"&&r.jsx(d.Tag,{variant:"primary",title:m.message,style:{backgroundColor:o==null?void 0:o.tagColor,color:o==null?void 0:o.textColor},children:m.message}),r.jsx(d.ProductInfo.Price,{className:te["mc--footer--total--info"],label:m.title,value:m.value})]})]},p))})};ru.displayName="MiniCart.Modal.Footer.Resume.Items";const su=()=>{var o,a,i;const{totalizers:e}=xt(),t=((o=e.find(c=>c.id==="Items"))==null?void 0:o.value)??0,n=(a=e.find(c=>c.id==="Discounts"))==null?void 0:a.value,s=(i=e.find(c=>c.id==="Shipping"))==null?void 0:i.value;return r.jsx(ru,{discount:n??0,total:t,shipping:s})};su.displayName="MiniCart.Modal.Footer.Totals";const ou=({ICONS:e,MINICART_CONFIG:t})=>{const{isMobile:n}=ne(),{cartStore:{items:s}}=ve(),o=s.reduce((a,i)=>a+(i.quantity??0),0);return r.jsx(d.Modal.Header,{navigation:"top",className:te["mc--header"],children:r.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!n,children:[r.jsx(d.Modal.Title,{navigation:"top",title:t.messages.title}),r.jsx("span",{className:te["mc--header--subtitle"],children:o!==1?`[${o}] Produtos`:`[${o}] Produto`}),r.jsx(d.Button,{"data-close":!0,iconNameStart:e.close,size:"small",variant:"tertiary"})]})})};ou.displayName="MiniCart.Modal.Header";const au=({ICONS:e,MINICART_CONFIG:t})=>{const{cartStore:{shippingData:n},shipping:s,removeCEP:o}=ve(),{sendDataLayerEvent:a}=oe(),[i,c]=g.useState(!1),[l,u]=g.useState(!1),m=g.useCallback(()=>{var C;const x=((C=n==null?void 0:n.address)==null?void 0:C.postalCode)??"";return x.length===8&&!x.includes("-")?`${x.slice(0,5)}-${x.slice(5)}`:x},[n]),[p,f]=g.useState(!!m()),h=()=>{f(!1),c(!1)},_=x=>{var C;if(typeof x=="object"&&(x!=null&&x.logisticsInfo))return(C=x.logisticsInfo)==null?void 0:C.reduce((j,b)=>{var A;const w=(A=b==null?void 0:b.slas)==null?void 0:A.find(O=>(O==null?void 0:O.id)===(b==null?void 0:b.selectedSla));if(!w)return j;const S=parseInt(String((w==null?void 0:w.shippingEstimate)??"").replace("bd","")),P=Number((((w==null?void 0:w.price)??0)/100).toFixed(2));if(j.shipping_tier===void 0)return j.shipping_tier=b==null?void 0:b.selectedSla,j.delivery_time=S.toString(),j.shipping=P,j.flag_retirada=(b==null?void 0:b.selectedDeliveryChannel)==="delivery"?"false":"true",j;const E=parseInt(j.delivery_time??"0");return S>E&&(j.delivery_time=S.toString()),j.shipping=(j.shipping??0)+P,j},{shipping_tier:void 0,delivery_time:void 0,flag_retirada:void 0,shipping:void 0,currency:"BRL"})},y=async x=>{const C=x.replace(/\D/g,"");if(C.length!==8)return!1;try{return!(await yt.get(`https://viacep.com.br/ws/${C}/json/`)).data.erro}catch{return!1}},v=async x=>{if(u(!0),!!m()||!(x!=null&&x.trim())){await o(),h(),u(!1);return}if(!await y(x)){c(!0),f(!1),u(!1);return}try{const w=await s(x);if(c(!1),w){f(!0);const S=_(w);S&&a({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:S}})}}catch{c(!0)}finally{u(!1)}};return r.jsx(ke.Field,{hasSuccess:p,hasError:i,isLoading:l,onHandler:v,title:`${t.messages.shipping_calculation_placeholder}`,type:"cep",value:m(),ICONS:e,MINICART_CONFIG:t})};au.displayName="MiniCart.Shipping";const iu=()=>{var n,s;const{data:e}=ve(),t=(s=(n=e==null?void 0:e.flags)==null?void 0:n.flagCart)==null?void 0:s.flagHeader;return t!=null&&t.value?r.jsx(d.Tag,{variant:"tertiary",title:t==null?void 0:t.value,size:"small",adornment:{start:t!=null&&t.enableIcon&&(t!=null&&t.icon)?r.jsx(d.Icon,{name:t==null?void 0:t.icon,style:{color:t==null?void 0:t.iconColor}}):null},style:{background:t==null?void 0:t.tagColor,color:t==null?void 0:t.textColor,width:"100%"},children:t==null?void 0:t.value}):null};iu.displayName="MiniCart.TagMessage";const ke={Body:eu,Card:Wl,Cashback:Gl,CouponSeller:Kl,Discount:nu,Field:Ql,Feedback:Xl,Shipping:au,Footer:tu,Header:ou,TagMessage:iu,Totals:su},oh=({ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:n,PLP_NOT_RESULT:s,TEXTURE_IMAGE:o,TIPBAR_CONFIGS:a,TOGGLE_STYLE_MODIFIER:i,Z_INDEX_WAR:c,storeConfig:l,minicartStyleModifiers:u})=>{const{isOpen:m,setIsOpen:p}=ve(),{isMobile:f}=ne();return r.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(te["minicart--modal-modifier"],u),isMobile:!0,isOpen:m,setIsOpen:p,style:{zIndex:c.modal},variant:f?"sideBottom":"sideRight",children:[r.jsx(ke.Header,{ICONS:e,MINICART_CONFIG:t}),r.jsx(ke.Body,{ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:n,PLP_NOT_RESULT:s,TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:i,TIPBAR_CONFIGS:a,children:r.jsx(ke.TagMessage,{})}),r.jsxs(ke.Footer,{MINICART_CONFIG:t,storeConfig:l,children:[r.jsxs(ke.Discount,{ICONS:e,MINICART_CONFIG:t,Z_INDEX_WAR:c,children:[r.jsx(ke.CouponSeller,{type:"seller",ICONS:e,MINICART_CONFIG:t}),r.jsx(ke.CouponSeller,{type:"coupon",ICONS:e,MINICART_CONFIG:t}),r.jsx(ke.Shipping,{ICONS:e,MINICART_CONFIG:t})]}),r.jsx(ke.Totals,{})]}),r.jsx(Fl,{ICONS:e})]})},cu=({tipBar:e,minicartStyleModifiers:t,menuV2:n,storeConfig:s,className:o})=>{const{structureRef:a,rootRef:i,CONSTANTS:c}=Pe(),{header:{HEADER_CONFIGS:l,Z_INDEX_WAR:u},minicart:m}=c;return r.jsx(d.Header.Structure,{innerRef:a,adornment:{start:e},style:{position:"sticky",top:0,zIndex:u.header},className:d.helpers.classNameConcat(Gs["header-animation"],o),children:r.jsxs(d.Header.Root,{innerRef:i,style:{zIndex:u.header},variant:l.default_variant,interactiveVariant:l.interactive_variant,children:[n??r.jsxs(Up,{children:[r.jsx("div",{className:R.responsive["responsive-mobile-block"],style:{height:"100%",width:"100%",zIndex:u.header_mobile},children:r.jsx(Ml,{storeConfig:s})}),r.jsx("div",{className:R.responsive["responsive-desktop-block"],style:{height:"100%",width:"100%",zIndex:u.header_desktop},children:r.jsx(jl,{storeConfig:s})})]}),r.jsx(Yp,{children:r.jsx(oh,{...m,minicartStyleModifiers:t})}),r.jsx(Us,{title:"Produto adicionado à sua sacola!",CONSTANTS:c.addToCart})]})})};cu.displayName="Header";const ah="_shippingFreight_6z8rf_6",ih="_shippingFreight__postalCodeGrid_6z8rf_10",ch="_shippingFreight__grid_6z8rf_14",lh="_shippingFreight__grid__title_6z8rf_18",uh="_shippingFreight__grid__remember_6z8rf_29",dh="_postalCodeContainer_6z8rf_44",mh="_deliveryStatusBar__tag_6z8rf_49",fh="_deliveryStatusBarError__tag_6z8rf_66",ph="_deliveryInfo_6z8rf_74",hh="_deliveryInfo__content_6z8rf_78",_h="_deliveryInfo__text_6z8rf_84",gh="_deliveryInfo__title_6z8rf_89",yh="_deliveryInfo__subtitle_6z8rf_99",vh="_deliveryInfo__tooltipIcon_6z8rf_109",xh="_deliveryInfo__tooltip_6z8rf_109",bh="_freightGrid_6z8rf_148",jh="_freightContainer_6z8rf_155",Ch="_freightOption__content_6z8rf_160",Sh="_freightOption__value_6z8rf_166",Ph="_freightOption__title_6z8rf_177",wh="_freightOption__title_item_6z8rf_181",Eh="_freightOption__paragraph_6z8rf_192",le={shippingFreight:ah,shippingFreight__postalCodeGrid:ih,shippingFreight__grid:ch,shippingFreight__grid__title:lh,shippingFreight__grid__remember:uh,postalCodeContainer:dh,deliveryStatusBar__tag:mh,deliveryStatusBarError__tag:fh,deliveryInfo:ph,deliveryInfo__content:hh,deliveryInfo__text:_h,deliveryInfo__title:gh,deliveryInfo__subtitle:yh,deliveryInfo__tooltipIcon:vh,deliveryInfo__tooltip:xh,freightGrid:bh,freightContainer:jh,freightOption__content:Ch,freightOption__value:Sh,freightOption__title:Ph,freightOption__title_item:wh,freightOption__paragraph:Eh,"input-modifier":"_input-modifier_6z8rf_207","freight--tooltip":"_freight--tooltip_6z8rf_227"},Nh=({icon:e,title:t,subtitle:n,packageCount:s,packageUnit:o="",labelDescription:a,freightConfig:i,toolTipZIndex:c})=>{const[l,u]=g.useState(!1),m=g.useRef(null),p=()=>u(f=>!f);return r.jsxs("div",{className:le.deliveryInfo,ref:m,children:[r.jsx(d.Tooltip.Root,{arrow:"bottom",component:r.jsx("div",{children:r.jsx("p",{children:i.messages.select_size_tag})}),id:"freight--tooltip",className:le["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:m.current}),r.jsxs("div",{className:le.deliveryInfo__content,children:[r.jsx("div",{className:le.deliveryInfo__icon,children:r.jsx(d.Icon,{name:e,size:"medium"})}),r.jsxs("div",{className:le.deliveryInfo__text,children:[r.jsxs("span",{className:le.deliveryInfo__title,children:[t," ",s," ",o]}),n&&r.jsx("span",{className:le.deliveryInfo__subtitle,children:n})]}),a&&r.jsxs("div",{className:le.deliveryInfo__tooltipIcon,onMouseEnter:p,onMouseLeave:p,"aria-label":"Mostrar descrição",children:[r.jsx("span",{children:r.jsx(d.Icon,{name:i.icons.feedback_help,size:"small"})}),l&&r.jsx("div",{className:le.deliveryInfo__tooltip,children:a})]})]})]})},Ih=({value:e,title:t,paragraph:n})=>r.jsx("div",{className:le.freightOption,children:r.jsxs("div",{className:le.freightOption__content,children:[r.jsx("span",{className:le.freightOption__value,children:e}),r.jsx("span",{className:le.freightOption__title,children:r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{className:le.footer__item,children:[r.jsx("span",{className:le.freightOption__title_item,children:t}),n&&r.jsx("span",{className:le.freightOption__paragraph,children:n})]})})})]})}),Rh=({children:e})=>r.jsx("div",{className:le.freightContainer,children:e}),Th=({children:e})=>r.jsx("div",{className:le.freightGrid,children:e}),Ah=({children:e})=>r.jsx("div",{className:le.postalCodeContainer,children:e}),$o=({message:e,seller:t="",size:n="small",setError:s})=>r.jsx("div",{className:s?le.deliveryStatusBarError:le.deliveryStatusBar,children:r.jsxs(d.Tag,{title:e,className:s?le.deliveryStatusBarError__tag:le.deliveryStatusBar__tag,size:n,children:[e," ",!s&&t]})}),Oh=e=>{const t=parseInt(e,10);return t===1?`${t} dia`:`${t} dias`},Lh=e=>{var n,s,o;const t=[];return(o=(s=(n=e==null?void 0:e.logisticsInfo)==null?void 0:n[0])==null?void 0:s.slas)==null||o.forEach(a=>{t.push({id:a.id,name:a.name,price:a.price,shippingEstimate:a.shippingEstimate})}),t},kh=({component:e,parent:t,top:n,left:s,target:o,contentRef:a,freightConfig:i,toolTipZIndex:c=999,...l})=>{const{isMobile:u}=ne();return r.jsx(r.Fragment,{children:u?r.jsx(d.Tooltip.Root,{arrow:"bottom",component:r.jsxs("div",{...l,ref:a,children:[e,r.jsx("p",{children:i.messages.select_size_tag})]}),id:"freight--tooltip",className:le["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:t}):r.jsx(d.Tooltip.Root,{arrow:"bottom",component:r.jsxs("div",{...l,ref:a,children:[e,r.jsx("p",{children:i.messages.select_size_tag})]}),id:"freight--tooltip",className:le["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-110%",left:"3%",parent:t})})},Mh=({onUpdateFreightItems:e,sellerId:t,size:n,skuId:s,quantity:o,setError:a,setIsButtonClicked:i,component:c,freightConfig:l,toolTipZIndex:u})=>{var k,M,Q,D;const m=xt(),p=xt(q=>q.shipping),[f,h]=g.useState(),[_,y]=g.useState(!1),[v,x]=g.useState(!1),[C,j]=g.useState(!1),b=(M=(k=m.shippingData)==null?void 0:k.address)==null?void 0:M.postalCode,w=!(f!=null&&f.length)&&b?b:f,S=g.useRef(null),P=async q=>{const Y=q.target.value.replace(/\D/g,"").slice(0,8);Y.length>5?h(Y.replace(/^(\d{5})(\d{1,3})/,"$1-$2")):h(Y)},E=async q=>{const U=q.target.value.replace(/\D/g,"");try{if((await yt.get(`https://viacep.com.br/ws/${U}/json/`)).data.erro){a&&a(l.messages.cep_not_found),i(!1),x(!0);return}a&&a(""),x(!1)}catch{console.log("Erro ao validar o CEP. Tente novamente mais tarde.")}},A=async()=>{y(!0);try{const q=await yt.post("/api/checkout/simulation",{items:[{id:s,quantity:o,seller:t}],country:"BRA",postalCode:w});e(Lh(q.data))}catch(q){console.error("Erro ao atualizar o documento:",q)}finally{y(!1),p(w,"BRA")}},O=async()=>{if(!s){j(!0),setTimeout(()=>j(!1),1500);return}await E({target:{value:w}}),_||(A(),i(!0))};return r.jsxs("div",{ref:S,style:{position:"relative"},children:[!s&&C?r.jsx(kh,{component:c,isOpen:C,parent:S.current,toolTipZIndex:u,freightConfig:l}):r.jsx(r.Fragment,{}),r.jsx("div",{style:{position:"relative"},children:r.jsx(d.TextField.Structure,{title:"structure",style:{width:"100%"},input:r.jsx(d.TextField.Input,{defaultValue:(D=(Q=m.shippingData)==null?void 0:Q.address)==null?void 0:D.postalCode,label:l.messages.text_input_label,title:"textfield",value:f,sizeVariant:n,onMouseOver:()=>s?null:j(!0),onMouseOut:()=>s?null:j(!1),mode:"simple",onChange:P,onKeyDown:q=>{q.key==="Enter"&&O()},className:le["input-modifier"],feedback:v?"error":"none"}),right:r.jsx(d.Button,{onClick:O,size:n,title:"button",children:_?r.jsx(d.Spinner,{size:"small",indicatorColor:"#ffffff"}):l.messages.text_input_btn})})})]})},Dh=({children:e,freightConfig:t})=>r.jsxs("div",{className:le.shippingFreight,children:[r.jsxs("div",{className:le.shippingFreight__grid,children:[r.jsx("span",{className:le.shippingFreight__grid__title,children:t.messages.title}),r.jsx("span",{className:le.shippingFreight__grid__remember,children:r.jsx(Fe,{href:"https://buscacepinter.correios.com.br/app/endereco/index.php",passHref:!0,target:"_blank",rel:"noopener noreferrer",size:"x-small",disablePadding:!1,title:t.messages.remember_cep,children:t.messages.remember_cep})})]}),r.jsx("div",{className:le.shippingFreight__postalCodeGrid,children:e})]}),Fh=({children:e})=>r.jsx("div",{className:le.freightContainer,children:e}),lu=({className:e,sellerId:t,skuId:n,quantity:s,size:o,seller:a,local:i,CONSTANTS_PROPS:c})=>{const{sendDataLayerEvent:l}=oe(),[u,m]=g.useState(""),[p,f]=g.useState([]),[h,_]=g.useState(""),[y,v]=g.useState(!1),x=j=>m(j),C=j=>{f(j),l({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:{shippings:j.map(b=>({shipping_tier:b.id,delivery_time:b.shippingEstimate.replace("bd",""),flag_pickup:b.name.toLowerCase().includes("retirada")?"true":"false",shipping:b.price,currency:c.currency||"BRL"}))}}})};return r.jsxs(Fh,{className:e,children:[r.jsxs(Dh,{freightConfig:c.freightConfig,children:[r.jsx(Ah,{children:r.jsx(Mh,{onUpdateFreightItems:C,skuId:n,quantity:s,size:o,sellerId:t,local:i,setError:_,setIsButtonClicked:v,freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex})}),h?r.jsx($o,{size:o,message:h,setError:_}):p.length>0&&r.jsx($o,{size:o,message:c.freightConfig.messages.delivered_by,seller:a})]}),y&&!h?p.length>0&&r.jsxs(Rh,{children:[r.jsx(Th,{children:p.filter(({id:j})=>!j.includes("Retirada")).map(j=>r.jsx(Ih,{id:j.id,value:R.freightParsePrice({valueInCents:j.price,hasFree:!1,freeTaxMessage:c.freightConfig.messages.free_tax}),title:j.name,paragraph:`${c.freightConfig.messages.prefix_days}${Oh(j.shippingEstimate)}`,radioValue:u,changeValue:x},j.id))}),c.deliveryInfoBoxesAllowed?r.jsx(Nh,{icon:c.freightConfig.icons.delivery_truck,packageUnit:c.freightConfig.messages.unit_amout,title:c.freightConfig.messages.delivered_amount_packages,subtitle:"",packageCount:1,labelDescription:"Label",freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex??999}):r.jsx(r.Fragment,{})]}):null]})},jt={"pcd-navigation--breadcrumb":"_pcd-navigation--breadcrumb_1243w_1","pdc-navigation--content":"_pdc-navigation--content_1243w_28","pdc-navigation--filters":"_pdc-navigation--filters_1243w_54","pdc-navigation--filters--content":"_pdc-navigation--filters--content_1243w_67","pdc-navigation--selected":"_pdc-navigation--selected_1243w_139","pdc-navigation--selected--container":"_pdc-navigation--selected--container_1243w_152","pdc-navigation":"_pdc-navigation_1243w_28"},zh=({children:e,href:t,isLast:n,title:s,ICONS:o})=>r.jsx(d.BreadCrumb.Item,{adornment:{end:n&&r.jsx(d.Icon,{name:o.arrow_right})},children:n?r.jsx(Fe,{href:t??"/",size:"medium",title:s,disableUnderline:!0,children:e}):e}),uu=()=>{var a;const{state:e}=ze(),{ICONS:t}=Me(),n=e!=null&&e.term&&e.term.length>0?`/${e.term}`:"",s=decodeURIComponent((a=e==null?void 0:e.base)!=null&&a.length?e.base:n??n).slice(1).split("/"),o=Bi(s);return r.jsx("div",{className:jt["pcd-navigation--breadcrumb"],children:r.jsx(d.BreadCrumb.DivWrapper,{children:r.jsx(d.BreadCrumb.List,{children:Array.isArray(o)&&o.map((i,c)=>{var l,u;return g.createElement(zh,{...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," "))})})})})};uu.displayName="PLPNavigation.BreadCrumb";const du=({children:e,...t})=>r.jsxs("div",{...t,className:jt["pdc-navigation--content"],children:[r.jsx(pt.Filters,{}),e]});du.displayName="PLPNavigation.Content";const Bh="_sort_35wro_1",Xn={sort:Bh,"sort-list-wrapper":"_sort-list-wrapper_35wro_8","sort-list":"_sort-list_35wro_8","sort-button":"_sort-button_35wro_25"},Uh=({children:e,sortListOpen:t,btnAdornment:n,style:s,...o})=>r.jsx(d.Button,{...o,adornment:{end:t?n==null?void 0:n.listOpen:n==null?void 0:n.listClosed},size:"small",variant:"tertiary",style:{...s,textDecoration:"none"},className:Xn["sort-button"],children:e}),qh=e=>r.jsx(d.RadioButton.Radio,{...e}),Hh=({children:e,className:t,name:n,...s})=>r.jsx(d.RadioButton.Group,{...s,name:n||"sort-group",className:d.helpers.classNameConcat(Xn["sort-list"],t),children:e}),Vh=({children:e,className:t,shadow:n=!0,padding:s="small",height:o="fit-content",...a})=>r.jsx(d.Card,{...a,shadow:n,className:d.helpers.classNameConcat(Xn["sort-list-wrapper"],t),padding:s,height:o,children:e}),mu=g.forwardRef(({children:e,className:t,...n},s)=>r.jsx("div",{...n,ref:s,className:d.helpers.classNameConcat(Xn.sort,t),children:e}));mu.displayName="SortRoot";const Yn=({handleSelectValue:e,sortListOpen:t,setSortListOpen:n,searchParams:s,ICONS:o,...a})=>{var f;const i=(f=s==null?void 0:s.get("sort"))==null?void 0:f.replace(":","_"),[c,l]=g.useState(i),{sendDataLayerEvent:u}=oe();g.useEffect(()=>{l(i||void 0)},[i]);const{ref:m}=_l(()=>n(!1)),p=h=>{const _=h.target.value;l(_),typeof e=="function"&&e(_),u({functionKey:"filterEvent",data:{customData:{ordering:Ut.options[_]}}}),n(!1)};return r.jsxs(mu,{...a,ref:m,children:[r.jsx(Uh,{btnAdornment:{listOpen:r.jsx(d.Icon,{name:o.arrow_up,size:"small"}),listClosed:r.jsx(d.Icon,{name:o.arrow_down,size:"small"})},sortListOpen:t,onClick:()=>n(!t),children:c?Ut.options[c]:Ut.placeholder},"sort-button"),t&&r.jsx(Vh,{children:r.jsx(Hh,{name:"sort-group",value:c??"",onChange:p,children:Object.keys(Ut.options).map(h=>r.jsx(qh,{label:Ut.options[h],value:h},h))})})]})};Yn.displayName="Sort";const fu=g.createContext({}),$h=({children:e,...t})=>{const[n,s]=g.useState(!1);return r.jsx(fu.Provider,{value:g.useMemo(()=>({...t,openOrderBy:n,setOpenOrderBy:s}),[t,n,s]),children:e})},Wh=()=>{const e=g.useContext(fu);if(e===void 0)throw new Error("usePLPNavigationContext must be used within a PDCNavigationProvider");return e},pu=()=>{const{openOrderBy:e,onSort:t,setOpenFilters:n,setOpenOrderBy:s}=Wh(),{ICONS:o,PDC_NAVIGATION:a,searchParams:i}=Me();return r.jsxs("div",{className:jt["pdc-navigation--filters"],children:[r.jsx(pt.BreadCrumb,{}),r.jsxs("div",{className:jt["pdc-navigation--filters--content"],children:[r.jsx(Yn,{handleSelectValue:c=>t(c??"release_desc"),sortListOpen:e,setSortListOpen:s,ICONS:o,searchParams:i}),r.jsx(d.Button,{adornment:{end:r.jsx(d.Icon,{name:o.arrow_down})},onClick:()=>n(!0),size:"small",variant:"tertiary",children:a.filter_button}),r.jsx(pt.Total,{})]})]})};pu.displayName="PLPNavigation.Filters";const hu=({children:e,onSort:t,setOpenFilters:n,style:s,...o})=>{const a=g.useRef(null);return r.jsx($h,{onSort:t,setOpenFilters:n,children:r.jsx("div",{...o,className:jt["pdc-navigation"],ref:a,style:{...s},children:r.jsx(pt.Content,{children:e})})})};hu.displayName="Root";const _u=({callback:e,selected:t,...n})=>r.jsx("div",{...n,className:jt["pdc-navigation--selected"],children:r.jsx("div",{className:jt["pdc-navigation--selected--container"],children:Array.isArray(t)?t.map(s=>s.key==="productclusterids"?null:r.jsx(pt.SelectedItem,{callback:e,facet:s},s.value)):null})});_u.displayName="PLPNavigation.Selected";const Xs=({key:e,PLP_FILTERS:t})=>t.some(n=>n.key===e)?e==="cores-filtraveis":!1,Ys=({value:e,PLP_FILTERS_COLORS:t})=>{var n;return((n=t.find(s=>s.value===e))==null?void 0:n.color)??"#F2F2F2"},gu=({key:e,PLP_FILTERS:t})=>{var n;return(n=t.find(s=>s.key===e))==null?void 0:n.label},yu=({key:e,PLP_FILTERS:t})=>{var n;return((n=t.find(s=>s.key===e))==null?void 0:n.order)??0},Zr=({value:e})=>{const[t,n]=e.split(":").length===2?e.split(":"):[0,0],s=R.formatPriceToCurrency(Number(n));return`${R.formatPriceToCurrency(Number(t))} até ${s}`},vu=({items:e})=>{const t=e.flatMap(o=>[o.range.from,o.range.to]),n=Math.min(...t.map(Math.abs)),s=Math.max(...t.map(Math.abs));return[n,s]},xu=Object.freeze(Object.defineProperty({__proto__:null,checkedColor:Xs,createTagPrice:Zr,getAbsoluteMinMax:vu,getColor:Ys,getName:gu,getOrder:yu},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"},bu=({columns:e=2,CONSTANTS:t,...n})=>{var a;const{filters:s,onToggleFacet:o}=Bt();return r.jsxs("div",{...n,className:We["filter--modal--body--content"],children:[Array.isArray(s.facets)&&s.facets.map(i=>r.jsx(it.Item,{columns:e,facet:i,onToggleFacet:o,CONSTANTS:t},i.key)),!((a=s.facets)!=null&&a.length)&&r.jsx(it.Empty,{PLP_FILTERS_EMPTY:t.PLP_FILTERS_EMPTY})]})};bu.displayName="Filter.Item.Content";const ju=({PLP_FILTERS_EMPTY:e})=>{const t=()=>{window.history.back()};return r.jsxs("div",{className:We["filter--empty"],children:[r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("h4",{children:e.title}),r.jsx("p",{children:e.subtitle})]}),r.jsx(d.Button,{onClick:()=>t(),variant:"tertiary",children:e.button})]})};ju.displayName="Filter.Empty";const Cu=({columns:e,facet:t,onToggleFacet:n,CONSTANTS:s,...o})=>{const a=yu({key:t.key,PLP_FILTERS:s.PLP_FILTERS}),i=()=>{if(t.__typename==="FacetBoolean"){if(t.key==="cores-filtraveis")return r.jsx(it.Colors,{onToggleFacet:n,values:t.values,PLP_FILTERS:s.PLP_FILTERS,PLP_FILTERS_COLORS:s.PLP_FILTERS_COLORS});if(t.key==="tamanho")return r.jsx(it.Sizes,{onToggleFacet:n,values:t.values,PLP_SIZE_ORDER:s.PLP_SIZE_ORDER});if(t.key==="category-2")return r.jsx(it.Toggle,{columns:e,facetKey:t.key,onToggleFacet:n,values:t.values,ICONS:s.ICONS})}return t.__typename==="FacetRange"?r.jsx(it.Price,{facet:t}):r.jsx("p",{children:"Filter not support!!!"})};return r.jsx("div",{...o,className:We["filter--item"],style:{order:a},children:r.jsxs(d.Accordion.Wrapper,{style:{width:"100%"},children:[r.jsx(d.Accordion.Header,{id:t.key,closeIndicator:r.jsx(d.Icon,{name:s.ICONS.arrow_up}),openIndicator:r.jsx(d.Icon,{name:s.ICONS.arrow_down}),children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h4",{className:"typography-style-body-sm",children:gu({key:t.key,PLP_FILTERS:s.PLP_FILTERS})})})})}),r.jsx(d.Accordion.Body,{children:i()})]})})};Cu.displayName="Filter.Item";const Su=({onToggleFacet:e,values:t,PLP_FILTERS:n,PLP_FILTERS_COLORS:s,...o})=>r.jsx(Je.Root,{...o,children:r.jsx(Je.List,{children:Array.isArray(t)&&t.map(({key:a,selected:i,value:c})=>r.jsx(Je.Option,{active:i,"data-color":Xs({key:a,PLP_FILTERS:n}),fill:Ys({value:c,PLP_FILTERS_COLORS:s}),onClick:()=>e({key:a,value:c}),type:"color"},`${a}-${c}`))})});Su.displayName="Filter.Item.Color";const Pu=({facet:e,...t})=>{var u,m;const{filters:{selected:n},price:s,onToggleFacet:o}=Bt(),[a,i]=(s==null?void 0:s.split(":").map(Number))??[0,100],[c,l]=((m=(u=n==null?void 0:n.find(({key:p})=>p==="price"))==null?void 0:u.value)==null?void 0:m.split(":").map(Number))??[a,i];return r.jsx("div",{...t,className:We["filter--item--price"],children:r.jsxs(d.Slider.SliderDual,{format:"price",initialValue:[c<a?a:c,l>i?i:l],min:a,max:i,type:"dual",step:1,onFinish:p=>{var f,h;p&&o({key:"price",value:`${(f=p.range)==null?void 0:f.min}:${(h=p.range)==null?void 0:h.max}`})},children:[r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("p",{"data-min-value":!0})})}),r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("p",{"data-max-value":!0})})})]})})};Pu.displayName="Filter.Item.Price";const wu=({onToggleFacet:e,values:t,PLP_SIZE_ORDER:n,...s})=>{const o=[...t].sort((a,i)=>{const c=n.indexOf(a.name),l=n.indexOf(i.name);return c-l});return r.jsx(Je.Root,{...s,children:r.jsx(Je.List,{children:Array.isArray(o)&&o.map(({key:a,selected:i,value:c})=>r.jsx(Je.Option,{active:i,text:c,type:"size",onClick:()=>e({key:a,value:c})},c))})})};wu.displayName="Filter.Item.Sizes";const Eu=({columns:e,facetKey:t,onToggleFacet:n,values:s,ICONS:o,...a})=>r.jsx("div",{...a,className:We["filter--item--toggle"],children:r.jsx("div",{className:We["filter--item--toggle--container"],style:{gridTemplateColumns:`repeat(${e}, 1fr)`},children:Array.isArray(s)&&s.map(i=>r.jsx(d.Checkbox,{label:(i==null?void 0:i.name)??"",adornment:r.jsx(d.Icon,{name:o.check}),checked:i.selected,onChange:()=>n(i)},i.value))})});Eu.displayName="Filter.Item.Toggle";const Nu=({...e})=>{const{isLoading:t}=Bt();return r.jsx("div",{className:We["filter--loading"],"data-active":t,...e,children:r.jsx(d.Spinner,{indicatorColor:"#000",background:"#222"})})};Nu.displayName="Filter.Loading";const Iu=({children:e,className:t,isMobile:n=!1,CONSTANTS:{PLP_FILTERS_TITLE:s,ICONS:o}})=>{var m;const{deleteAllFacets:a,filters:i,isOpen:c,target:l,setIsOpen:u}=Bt();return r.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(We["filter--modal"],t),isMobile:n??!1,isOpen:c,parent:l,setIsOpen:u,variant:n?"sideBottom":"sideRight",style:{zIndex:99},children:[r.jsxs(d.Modal.Header,{navigation:"top",children:[r.jsx(d.Modal.Controls,{navigation:"top",isMobile:n,children:r.jsx(d.Button,{"data-close":!0,iconNameStart:o.close,size:"small",variant:"tertiary",style:{marginLeft:"auto"}})}),r.jsx(d.Modal.Title,{navigation:"top",title:s})]}),r.jsxs(d.Modal.Body,{style:{width:500},children:[r.jsx("div",{className:We["filter--modal--body"],children:e}),r.jsx(it.Loading,{})]}),r.jsx(d.Modal.Footer,{children:r.jsxs("div",{className:We["filter--modal--footer"],children:[r.jsx(d.Button,{"data-close":!0,size:"large",variant:"primary",children:(m=i.facets)!=null&&m.length?"ver resultados":"fechar"}),r.jsx(d.Button,{"data-close":!0,onClick:()=>a(),variant:"tertiary",children:"limpar filtros"})]})})]})};Iu.displayName="Filter.Modal";const Ru=({children:e,className:t,isMobile:n,CONSTANTS:s,...o})=>r.jsx(rc,{...o,PLP_FILTERS:s.PLP_FILTERS,children:r.jsx(it.Modal,{className:t,isMobile:n,CONSTANTS:s,children:e})});Ru.displayName="Filter.Root";const Tu=({ICONS:e,PLP_FILTERS_COLORS:t,PLP_FILTERS:n})=>{const{filters:s,onToggleFacet:o}=Bt();return r.jsx("div",{className:We["filter--selected"],children:r.jsx("div",{className:We["filter--selected--content"],children:Array.isArray(s.selected)&&s.selected.map(({key:a,value:i})=>a==="productclusterids"?null:r.jsx(d.Tag,{title:a==="price"?Zr({value:i}):i,adornment:{end:r.jsx(d.Icon,{name:e.close,size:"x-small"})},colorSquare:Ys({value:i,PLP_FILTERS_COLORS:t}),onClick:()=>o({key:a,value:i}),squareShow:Xs({key:a,PLP_FILTERS:n}),size:"medium",variant:"primary",children:a==="price"?Zr({value:i}):i},i))})})};Tu.displayName="Filter.Selected";const it={Colors:Su,Content:bu,Empty:ju,Modal:Iu,Item:Cu,Root:Ru,Loading:Nu,Selected:Tu,Price:Pu,Sizes:wu,Toggle:Eu},{checkedColor:Gh,createTagPrice:Wo,getColor:Kh}=xu,Au=({callback:e,facet:t})=>{const{ICONS:n,PLP_FILTERS_COLORS:s,PLP_FILTERS:o}=Me();return r.jsx(d.Tag,{title:(t==null?void 0:t.key)==="price"?Wo({value:t.value}):t.value.toUpperCase(),adornment:{end:r.jsx(d.Icon,{name:n.close,size:"x-small"})},colorSquare:Kh({value:t.value,PLP_FILTERS_COLORS:s}),onClick:()=>{typeof e=="function"&&e(t,!0)},squareShow:Gh({key:t.key,PLP_FILTERS:o}),size:"medium",variant:"primary",children:(t==null?void 0:t.key)==="price"?Wo({value:t.value}):t.value.toUpperCase()})};Au.displayName="PLPNavigation.Selected.Item";const Ou=()=>r.jsx(d.TextStructure.Root,{children:r.jsx("p",{id:"pdc-navigation--total"})});Ou.displayName="PLPNavigation.Total";const pt={BreadCrumb:uu,Content:du,Filters:pu,Root:hu,Selected:_u,SelectedItem:Au,Total:Ou},Xh="_footer__bottom_198g6_2",Yh="_footer__wrapper_198g6_10",Qh="_footer__main_198g6_39",Zh="_footer__legalInformation_198g6_55",Jh="_footer__column_198g6_77",e_="_footer__columnContent_198g6_87",t_="_footer__item_198g6_91",n_="_footer__itemLink_198g6_107",r_="_footer__columnTitle_198g6_122",s_="_footer__columnTitleIcon_198g6_134",o_="_footer__iconList_198g6_147",a_="_footer__itemSmallText_198g6_157",i_="_payment_198g6_168",c_="_footer__iconContainer_198g6_173",l_="_footer__iconListSubHeader_198g6_178",u_="_accordionWrapper_198g6_200",d_="_accordionHeader_198g6_204",m_="_accordionTextWrapper_198g6_208",de={footer__bottom:Xh,footer__wrapper:Yh,footer__main:Qh,footer__legalInformation:Zh,footer__column:Jh,footer__columnContent:e_,footer__item:t_,footer__itemLink:n_,footer__columnTitle:r_,footer__columnTitleIcon:s_,footer__iconList:o_,footer__itemSmallText:a_,payment:i_,footer__iconContainer:c_,footer__iconListSubHeader:l_,accordionWrapper:u_,accordionHeader:d_,accordionTextWrapper:m_,"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 Lu={},Qs={},Qn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"warnOnce",{enumerable:!0,get:function(){return t}});let t=n=>{};if(process.env.NODE_ENV!=="production"){const n=new Set;t=s=>{n.has(s)||console.warn(s),n.add(s)}}})(Qn);var ku={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImageBlurSvg",{enumerable:!0,get:function(){return t}});function t(n){let{widthInt:s,heightInt:o,blurWidth:a,blurHeight:i,blurDataURL:c,objectFit:l}=n;const u=20,m=a?a*40:s,p=i?i*40:o,f=m&&p?"viewBox='0 0 "+m+" "+p+"'":"",h=f?"none":l==="contain"?"xMidYMid":l==="cover"?"xMidYMid slice":"none";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+f+"%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"}})(ku);var Zn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(o,a){for(var i in a)Object.defineProperty(o,i,{enumerable:!0,get:a[i]})}t(e,{VALID_LOADERS:function(){return n},imageConfigDefault:function(){return s}});const n=["default","imgix","cloudinary","akamai","custom"],s={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",localPatterns:void 0,remotePatterns:[],qualities:void 0,unoptimized:!1}})(Zn);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImgProps",{enumerable:!0,get:function(){return h}});const t=Qn,n=ku,s=Zn,o=["lazy","eager",void 0];function a(_){return _.default!==void 0}function i(_){return _.src!==void 0}function c(_){return typeof _=="object"&&(a(_)||i(_))}const l=new Map;let u;function m(_){return typeof _>"u"?_:typeof _=="number"?Number.isFinite(_)?_:NaN:typeof _=="string"&&/^[0-9]+$/.test(_)?parseInt(_,10):NaN}function p(_,y,v){let{deviceSizes:x,allSizes:C}=_;if(v){const b=/(^|\s)(1?\d?\d)vw/g,w=[];for(let S;S=b.exec(v);S)w.push(parseInt(S[2]));if(w.length){const S=Math.min(...w)*.01;return{widths:C.filter(P=>P>=x[0]*S),kind:"w"}}return{widths:C,kind:"w"}}return typeof y!="number"?{widths:x,kind:"w"}:{widths:[...new Set([y,y*2].map(b=>C.find(w=>w>=b)||C[C.length-1]))],kind:"x"}}function f(_){let{config:y,src:v,unoptimized:x,width:C,quality:j,sizes:b,loader:w}=_;if(x)return{src:v,srcSet:void 0,sizes:void 0};const{widths:S,kind:P}=p(y,C,b),E=S.length-1;return{sizes:!b&&P==="w"?"100vw":b,srcSet:S.map((A,O)=>w({config:y,src:v,quality:j,width:A})+" "+(P==="w"?A:O+1)+P).join(", "),src:w({config:y,src:v,quality:j,width:S[E]})}}function h(_,y){let{src:v,sizes:x,unoptimized:C=!1,priority:j=!1,loading:b,className:w,quality:S,width:P,height:E,fill:A=!1,style:O,overrideSrc:k,onLoad:M,onLoadingComplete:Q,placeholder:D="empty",blurDataURL:q,fetchPriority:U,decoding:Y="async",layout:G,objectFit:H,objectPosition:Z,lazyBoundary:re,lazyRoot:ue,...se}=_;const{imgConf:ce,showAltText:F,blurComplete:J,defaultLoader:N}=y;let W,ae=ce||s.imageConfigDefault;if("allSizes"in ae)W=ae;else{var he;const K=[...ae.deviceSizes,...ae.imageSizes].sort((ee,pe)=>ee-pe),L=ae.deviceSizes.sort((ee,pe)=>ee-pe),B=(he=ae.qualities)==null?void 0:he.sort((ee,pe)=>ee-pe);W={...ae,allSizes:K,deviceSizes:L,qualities:B}}if(typeof N>"u")throw new Error(`images.loaderFile detected but the file is missing default export.
|
|
5
|
+
Read more: https://nextjs.org/docs/messages/invalid-images-config`);let I=se.loader||N;delete se.loader,delete se.srcSet;const T="__next_img_default"in I;if(T){if(W.loader==="custom")throw new Error('Image with src "'+v+`" is missing "loader" prop.
|
|
6
|
+
Read more: https://nextjs.org/docs/messages/next-image-missing-loader`)}else{const K=I;I=L=>{const{config:B,...ee}=L;return K(ee)}}if(G){G==="fill"&&(A=!0);const K={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}},L={responsive:"100vw",fill:"100vw"},B=K[G];B&&(O={...O,...B});const ee=L[G];ee&&!x&&(x=ee)}let Re="",$=m(P),X=m(E),xe,Ne;if(c(v)){const K=a(v)?v.default:v;if(!K.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(K));if(!K.height||!K.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(K));if(xe=K.blurWidth,Ne=K.blurHeight,q=q||K.blurDataURL,Re=K.src,!A){if(!$&&!X)$=K.width,X=K.height;else if($&&!X){const L=$/K.width;X=Math.round(K.height*L)}else if(!$&&X){const L=X/K.height;$=Math.round(K.width*L)}}}v=typeof v=="string"?v:Re;let be=!j&&(b==="lazy"||typeof b>"u");(!v||v.startsWith("data:")||v.startsWith("blob:"))&&(C=!0,be=!1),W.unoptimized&&(C=!0),T&&v.endsWith(".svg")&&!W.dangerouslyAllowSVG&&(C=!0),j&&(U="high");const _e=m(S);if(process.env.NODE_ENV!=="production"){if(W.output==="export"&&T&&!C)throw new Error("Image Optimization using the default loader is not compatible with `{ output: 'export' }`.\n Possible solutions:\n - Remove `{ output: 'export' }` and run \"next start\" to run server mode including the Image Optimization API.\n - Configure `{ images: { unoptimized: true } }` in `next.config.js` to disable the Image Optimization API.\n Read more: https://nextjs.org/docs/messages/export-image-api");if(!v)C=!0;else if(A){if(P)throw new Error('Image with src "'+v+'" has both "width" and "fill" properties. Only one should be used.');if(E)throw new Error('Image with src "'+v+'" has both "height" and "fill" properties. Only one should be used.');if(O!=null&&O.position&&O.position!=="absolute")throw new Error('Image with src "'+v+'" has both "fill" and "style.position" properties. Images with "fill" always use position absolute - it cannot be modified.');if(O!=null&&O.width&&O.width!=="100%")throw new Error('Image with src "'+v+'" has both "fill" and "style.width" properties. Images with "fill" always use width 100% - it cannot be modified.');if(O!=null&&O.height&&O.height!=="100%")throw new Error('Image with src "'+v+'" has both "fill" and "style.height" properties. Images with "fill" always use height 100% - it cannot be modified.')}else{if(typeof $>"u")throw new Error('Image with src "'+v+'" is missing required "width" property.');if(isNaN($))throw new Error('Image with src "'+v+'" has invalid "width" property. Expected a numeric value in pixels but received "'+P+'".');if(typeof X>"u")throw new Error('Image with src "'+v+'" is missing required "height" property.');if(isNaN(X))throw new Error('Image with src "'+v+'" has invalid "height" property. Expected a numeric value in pixels but received "'+E+'".')}if(!o.includes(b))throw new Error('Image with src "'+v+'" has invalid "loading" property. Provided "'+b+'" should be one of '+o.map(String).join(",")+".");if(j&&b==="lazy")throw new Error('Image with src "'+v+`" 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 "'+v+'" has invalid "placeholder" property "'+D+'".');if(D!=="empty"&&$&&X&&$*X<1600&&(0,t.warnOnce)('Image with src "'+v+'" is smaller than 40x40. Consider removing the "placeholder" property to improve performance.'),D==="blur"&&!q){const K=["jpeg","png","webp","avif"];throw new Error('Image with src "'+v+`" has "placeholder='blur'" property but is missing the "blurDataURL" property.
|
|
7
7
|
Possible solutions:
|
|
8
8
|
- Add a "blurDataURL" property, the contents should be a small Data URL to represent the image
|
|
9
|
-
- Change the "src" property to a static import with one of the supported file types: `+
|
|
9
|
+
- Change the "src" property to a static import with one of the supported file types: `+K.join(",")+` (animated images not supported)
|
|
10
10
|
- Remove the "placeholder" property, effectively no blur effect
|
|
11
|
-
Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url`)}if("ref"in
|
|
12
|
-
Read more: https://nextjs.org/docs/messages/next-image-missing-loader-width`)}
|
|
13
|
-
Read more: https://nextjs.org/docs/messages/next-image-upgrade-to-13`);if(typeof window<"u"&&!u&&window.PerformanceObserver){u=new PerformanceObserver(
|
|
14
|
-
Read more: https://nextjs.org/docs/api-reference/next/image#priority`)}});try{u.observe({type:"largest-contentful-paint",buffered:!0})}catch(
|
|
15
|
-
See more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component`)}else
|
|
16
|
-
See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component`);return i.default.cloneElement(E,{key:I})})}function b(j){let{children:v}=j;const P=(0,i.useContext)(l.AmpStateContext),E=(0,i.useContext)(u.HeadManagerContext);return(0,a.jsx)(c.default,{reduceComponentsToState:x,headManager:E,inAmpMode:(0,m.isInAmpMode)(P),children:v})}const C=b;(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(jn,jn.exports)),jn.exports}var Mr={},sa;function Q_(){return sa||(sa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ImageConfigContext",{enumerable:!0,get:function(){return o}});const n=Le._(g),s=Qn,o=n.default.createContext(s.imageConfigDefault);process.env.NODE_ENV!=="production"&&(o.displayName="ImageConfigContext")}(Mr)),Mr}var Fr={},zr={},Br={exports:{}},oa;function Gu(){return oa||(oa=1,(()=>{var e={170:(o,a,i)=>{const c=i(510),l=()=>{if(typeof navigator<"u"&&navigator.platform){const m=navigator.platform.toLowerCase();return m==="win32"||m==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};function u(m,f,p=!1){return f&&(f.windows===null||f.windows===void 0)&&(f={...f,windows:l()}),c(m,f,p)}Object.assign(u,c),o.exports=u},154:o=>{const a="\\\\/",i=`[^${a}]`,c="\\.",l="\\+",u="\\?",m="\\/",f="(?=.)",p="[^/]",h=`(?:${m}|$)`,_=`(?:^|${m})`,y=`${c}{1,2}${h}`,x=`(?!${c})`,b=`(?!${_}${y})`,C=`(?!${c}{0,1}${h})`,j=`(?!${y})`,v=`[^.${m}]`,P=`${p}*?`,S={DOT_LITERAL:c,PLUS_LITERAL:l,QMARK_LITERAL:u,SLASH_LITERAL:m,ONE_CHAR:f,QMARK:p,END_ANCHOR:h,DOTS_SLASH:y,NO_DOT:x,NO_DOTS:b,NO_DOT_SLASH:C,NO_DOTS_SLASH:j,QMARK_NO_DOT:v,STAR:P,START_ANCHOR:_,SEP:"/"},I={...S,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:"\\"},T={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:T,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(A){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${A.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(A){return A===!0?I:S}}},697:(o,a,i)=>{const c=i(154),l=i(96),{MAX_LENGTH:u,POSIX_REGEX_SOURCE:m,REGEX_NON_SPECIAL_CHARS:f,REGEX_SPECIAL_CHARS_BACKREF:p,REPLACEMENTS:h}=c,_=(b,C)=>{if(typeof C.expandRange=="function")return C.expandRange(...b,C);b.sort();const j=`[${b.join("-")}]`;try{new RegExp(j)}catch{return b.map(P=>l.escapeRegex(P)).join("..")}return j},y=(b,C)=>`Missing ${b}: "${C}" - use "\\\\${C}" to match literal characters`,x=(b,C)=>{if(typeof b!="string")throw new TypeError("Expected a string");b=h[b]||b;const j={...C},v=typeof j.maxLength=="number"?Math.min(u,j.maxLength):u;let P=b.length;if(P>v)throw new SyntaxError(`Input length: ${P}, exceeds maximum allowed length: ${v}`);const E={type:"bos",value:"",output:j.prepend||""},S=[E],I=j.capture?"":"?:",T=c.globChars(j.windows),A=c.extglobChars(T),{DOT_LITERAL:k,PLUS_LITERAL:O,SLASH_LITERAL:Y,ONE_CHAR:D,DOTS_SLASH:U,NO_DOT:B,NO_DOT_SLASH:Q,NO_DOTS_SLASH:G,QMARK:$,QMARK_NO_DOT:J,STAR:se,START_ANCHOR:ce}=T,oe=V=>`(${I}(?:(?!${ce}${V.dot?U:k}).)*?)`,le=j.dot?"":B,M=j.dot?$:J;let ee=j.bash===!0?oe(j):se;j.capture&&(ee=`(${ee})`),typeof j.noext=="boolean"&&(j.noextglob=j.noext);const w={input:b,index:-1,start:0,dot:j.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:S};b=l.removePrefix(b,w),P=b.length;const W=[],ie=[],_e=[];let N=E,R;const Ie=()=>w.index===P-1,q=w.peek=(V=1)=>b[w.index+V],K=w.advance=()=>b[++w.index]||"",ge=()=>b.slice(w.index+1),Re=(V="",X=0)=>{w.consumed+=V,w.index+=X},je=V=>{w.output+=V.output!=null?V.output:V.value,Re(V.value)},ye=()=>{let V=1;for(;q()==="!"&&(q(2)!=="("||q(3)==="?");)K(),w.start++,V++;return V%2===0?!1:(w.negated=!0,w.start++,!0)},Ae=V=>{w[V]++,_e.push(V)},Ce=V=>{w[V]--,_e.pop()},F=V=>{if(N.type==="globstar"){const X=w.braces>0&&(V.type==="comma"||V.type==="brace"),L=V.extglob===!0||W.length&&(V.type==="pipe"||V.type==="paren");V.type!=="slash"&&V.type!=="paren"&&!X&&!L&&(w.output=w.output.slice(0,-N.output.length),N.type="star",N.value="*",N.output=ee,w.output+=N.output)}if(W.length&&V.type!=="paren"&&(W[W.length-1].inner+=V.value),(V.value||V.output)&&je(V),N&&N.type==="text"&&V.type==="text"){N.output=(N.output||N.value)+V.value,N.value+=V.value;return}V.prev=N,S.push(V),N=V},pe=(V,X)=>{const L={...A[X],conditions:1,inner:""};L.prev=N,L.parens=w.parens,L.output=w.output;const z=(j.capture?"(":"")+L.open;Ae("parens"),F({type:V,value:X,output:w.output?"":D}),F({type:"paren",extglob:!0,value:K(),output:z}),W.push(L)},xe=V=>{let X=V.close+(j.capture?")":""),L;if(V.type==="negate"){let z=ee;if(V.inner&&V.inner.length>1&&V.inner.includes("/")&&(z=oe(j)),(z!==ee||Ie()||/^\)+$/.test(ge()))&&(X=V.close=`)$))${z}`),V.inner.includes("*")&&(L=ge())&&/^\.[^\\/.]+$/.test(L)){const te=x(L,{...C,fastpaths:!1}).output;X=V.close=`)${te})${z})`}V.prev.type==="bos"&&(w.negatedExtglob=!0)}F({type:"paren",extglob:!0,value:R,output:X}),Ce("parens")};if(j.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(b)){let V=!1,X=b.replace(p,(L,z,te,he,Ne,tr)=>he==="\\"?(V=!0,L):he==="?"?z?z+he+(Ne?$.repeat(Ne.length):""):tr===0?M+(Ne?$.repeat(Ne.length):""):$.repeat(te.length):he==="."?k.repeat(te.length):he==="*"?z?z+he+(Ne?ee:""):ee:z?L:`\\${L}`);return V===!0&&(j.unescape===!0?X=X.replace(/\\/g,""):X=X.replace(/\\+/g,L=>L.length%2===0?"\\\\":L?"\\":"")),X===b&&j.contains===!0?(w.output=b,w):(w.output=l.wrapOutput(X,w,C),w)}for(;!Ie();){if(R=K(),R==="\0")continue;if(R==="\\"){const L=q();if(L==="/"&&j.bash!==!0||L==="."||L===";")continue;if(!L){R+="\\",F({type:"text",value:R});continue}const z=/^\\+/.exec(ge());let te=0;if(z&&z[0].length>2&&(te=z[0].length,w.index+=te,te%2!==0&&(R+="\\")),j.unescape===!0?R=K():R+=K(),w.brackets===0){F({type:"text",value:R});continue}}if(w.brackets>0&&(R!=="]"||N.value==="["||N.value==="[^")){if(j.posix!==!1&&R===":"){const L=N.value.slice(1);if(L.includes("[")&&(N.posix=!0,L.includes(":"))){const z=N.value.lastIndexOf("["),te=N.value.slice(0,z),he=N.value.slice(z+2),Ne=m[he];if(Ne){N.value=te+Ne,w.backtrack=!0,K(),!E.output&&S.indexOf(N)===1&&(E.output=D);continue}}}(R==="["&&q()!==":"||R==="-"&&q()==="]")&&(R=`\\${R}`),R==="]"&&(N.value==="["||N.value==="[^")&&(R=`\\${R}`),j.posix===!0&&R==="!"&&N.value==="["&&(R="^"),N.value+=R,je({value:R});continue}if(w.quotes===1&&R!=='"'){R=l.escapeRegex(R),N.value+=R,je({value:R});continue}if(R==='"'){w.quotes=w.quotes===1?0:1,j.keepQuotes===!0&&F({type:"text",value:R});continue}if(R==="("){Ae("parens"),F({type:"paren",value:R});continue}if(R===")"){if(w.parens===0&&j.strictBrackets===!0)throw new SyntaxError(y("opening","("));const L=W[W.length-1];if(L&&w.parens===L.parens+1){xe(W.pop());continue}F({type:"paren",value:R,output:w.parens?")":"\\)"}),Ce("parens");continue}if(R==="["){if(j.nobracket===!0||!ge().includes("]")){if(j.nobracket!==!0&&j.strictBrackets===!0)throw new SyntaxError(y("closing","]"));R=`\\${R}`}else Ae("brackets");F({type:"bracket",value:R});continue}if(R==="]"){if(j.nobracket===!0||N&&N.type==="bracket"&&N.value.length===1){F({type:"text",value:R,output:`\\${R}`});continue}if(w.brackets===0){if(j.strictBrackets===!0)throw new SyntaxError(y("opening","["));F({type:"text",value:R,output:`\\${R}`});continue}Ce("brackets");const L=N.value.slice(1);if(N.posix!==!0&&L[0]==="^"&&!L.includes("/")&&(R=`/${R}`),N.value+=R,je({value:R}),j.literalBrackets===!1||l.hasRegexChars(L))continue;const z=l.escapeRegex(N.value);if(w.output=w.output.slice(0,-N.value.length),j.literalBrackets===!0){w.output+=z,N.value=z;continue}N.value=`(${I}${z}|${N.value})`,w.output+=N.value;continue}if(R==="{"&&j.nobrace!==!0){Ae("braces");const L={type:"brace",value:R,output:"(",outputIndex:w.output.length,tokensIndex:w.tokens.length};ie.push(L),F(L);continue}if(R==="}"){const L=ie[ie.length-1];if(j.nobrace===!0||!L){F({type:"text",value:R,output:R});continue}let z=")";if(L.dots===!0){const te=S.slice(),he=[];for(let Ne=te.length-1;Ne>=0&&(S.pop(),te[Ne].type!=="brace");Ne--)te[Ne].type!=="dots"&&he.unshift(te[Ne].value);z=_(he,j),w.backtrack=!0}if(L.comma!==!0&&L.dots!==!0){const te=w.output.slice(0,L.outputIndex),he=w.tokens.slice(L.tokensIndex);L.value=L.output="\\{",R=z="\\}",w.output=te;for(const Ne of he)w.output+=Ne.output||Ne.value}F({type:"brace",value:R,output:z}),Ce("braces"),ie.pop();continue}if(R==="|"){W.length>0&&W[W.length-1].conditions++,F({type:"text",value:R});continue}if(R===","){let L=R;const z=ie[ie.length-1];z&&_e[_e.length-1]==="braces"&&(z.comma=!0,L="|"),F({type:"comma",value:R,output:L});continue}if(R==="/"){if(N.type==="dot"&&w.index===w.start+1){w.start=w.index+1,w.consumed="",w.output="",S.pop(),N=E;continue}F({type:"slash",value:R,output:Y});continue}if(R==="."){if(w.braces>0&&N.type==="dot"){N.value==="."&&(N.output=k);const L=ie[ie.length-1];N.type="dots",N.output+=R,N.value+=R,L.dots=!0;continue}if(w.braces+w.parens===0&&N.type!=="bos"&&N.type!=="slash"){F({type:"text",value:R,output:k});continue}F({type:"dot",value:R,output:k});continue}if(R==="?"){if(!(N&&N.value==="(")&&j.noextglob!==!0&&q()==="("&&q(2)!=="?"){pe("qmark",R);continue}if(N&&N.type==="paren"){const z=q();let te=R;(N.value==="("&&!/[!=<:]/.test(z)||z==="<"&&!/<([!=]|\w+>)/.test(ge()))&&(te=`\\${R}`),F({type:"text",value:R,output:te});continue}if(j.dot!==!0&&(N.type==="slash"||N.type==="bos")){F({type:"qmark",value:R,output:J});continue}F({type:"qmark",value:R,output:$});continue}if(R==="!"){if(j.noextglob!==!0&&q()==="("&&(q(2)!=="?"||!/[!=<:]/.test(q(3)))){pe("negate",R);continue}if(j.nonegate!==!0&&w.index===0){ye();continue}}if(R==="+"){if(j.noextglob!==!0&&q()==="("&&q(2)!=="?"){pe("plus",R);continue}if(N&&N.value==="("||j.regex===!1){F({type:"plus",value:R,output:O});continue}if(N&&(N.type==="bracket"||N.type==="paren"||N.type==="brace")||w.parens>0){F({type:"plus",value:R});continue}F({type:"plus",value:O});continue}if(R==="@"){if(j.noextglob!==!0&&q()==="("&&q(2)!=="?"){F({type:"at",extglob:!0,value:R,output:""});continue}F({type:"text",value:R});continue}if(R!=="*"){(R==="$"||R==="^")&&(R=`\\${R}`);const L=f.exec(ge());L&&(R+=L[0],w.index+=L[0].length),F({type:"text",value:R});continue}if(N&&(N.type==="globstar"||N.star===!0)){N.type="star",N.star=!0,N.value+=R,N.output=ee,w.backtrack=!0,w.globstar=!0,Re(R);continue}let V=ge();if(j.noextglob!==!0&&/^\([^?]/.test(V)){pe("star",R);continue}if(N.type==="star"){if(j.noglobstar===!0){Re(R);continue}const L=N.prev,z=L.prev,te=L.type==="slash"||L.type==="bos",he=z&&(z.type==="star"||z.type==="globstar");if(j.bash===!0&&(!te||V[0]&&V[0]!=="/")){F({type:"star",value:R,output:""});continue}const Ne=w.braces>0&&(L.type==="comma"||L.type==="brace"),tr=W.length&&(L.type==="pipe"||L.type==="paren");if(!te&&L.type!=="paren"&&!Ne&&!tr){F({type:"star",value:R,output:""});continue}for(;V.slice(0,3)==="/**";){const ln=b[w.index+4];if(ln&&ln!=="/")break;V=V.slice(3),Re("/**",3)}if(L.type==="bos"&&Ie()){N.type="globstar",N.value+=R,N.output=oe(j),w.output=N.output,w.globstar=!0,Re(R);continue}if(L.type==="slash"&&L.prev.type!=="bos"&&!he&&Ie()){w.output=w.output.slice(0,-(L.output+N.output).length),L.output=`(?:${L.output}`,N.type="globstar",N.output=oe(j)+(j.strictSlashes?")":"|$)"),N.value+=R,w.globstar=!0,w.output+=L.output+N.output,Re(R);continue}if(L.type==="slash"&&L.prev.type!=="bos"&&V[0]==="/"){const ln=V[1]!==void 0?"|$":"";w.output=w.output.slice(0,-(L.output+N.output).length),L.output=`(?:${L.output}`,N.type="globstar",N.output=`${oe(j)}${Y}|${Y}${ln})`,N.value+=R,w.output+=L.output+N.output,w.globstar=!0,Re(R+K()),F({type:"slash",value:"/",output:""});continue}if(L.type==="bos"&&V[0]==="/"){N.type="globstar",N.value+=R,N.output=`(?:^|${Y}|${oe(j)}${Y})`,w.output=N.output,w.globstar=!0,Re(R+K()),F({type:"slash",value:"/",output:""});continue}w.output=w.output.slice(0,-N.output.length),N.type="globstar",N.output=oe(j),N.value+=R,w.output+=N.output,w.globstar=!0,Re(R);continue}const X={type:"star",value:R,output:ee};if(j.bash===!0){X.output=".*?",(N.type==="bos"||N.type==="slash")&&(X.output=le+X.output),F(X);continue}if(N&&(N.type==="bracket"||N.type==="paren")&&j.regex===!0){X.output=R,F(X);continue}(w.index===w.start||N.type==="slash"||N.type==="dot")&&(N.type==="dot"?(w.output+=Q,N.output+=Q):j.dot===!0?(w.output+=G,N.output+=G):(w.output+=le,N.output+=le),q()!=="*"&&(w.output+=D,N.output+=D)),F(X)}for(;w.brackets>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing","]"));w.output=l.escapeLast(w.output,"["),Ce("brackets")}for(;w.parens>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing",")"));w.output=l.escapeLast(w.output,"("),Ce("parens")}for(;w.braces>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing","}"));w.output=l.escapeLast(w.output,"{"),Ce("braces")}if(j.strictSlashes!==!0&&(N.type==="star"||N.type==="bracket")&&F({type:"maybe_slash",value:"",output:`${Y}?`}),w.backtrack===!0){w.output="";for(const V of w.tokens)w.output+=V.output!=null?V.output:V.value,V.suffix&&(w.output+=V.suffix)}return w};x.fastpaths=(b,C)=>{const j={...C},v=typeof j.maxLength=="number"?Math.min(u,j.maxLength):u,P=b.length;if(P>v)throw new SyntaxError(`Input length: ${P}, exceeds maximum allowed length: ${v}`);b=h[b]||b;const{DOT_LITERAL:E,SLASH_LITERAL:S,ONE_CHAR:I,DOTS_SLASH:T,NO_DOT:A,NO_DOTS:k,NO_DOTS_SLASH:O,STAR:Y,START_ANCHOR:D}=c.globChars(j.windows),U=j.dot?k:A,B=j.dot?O:A,Q=j.capture?"":"?:",G={negated:!1,prefix:""};let $=j.bash===!0?".*?":Y;j.capture&&($=`(${$})`);const J=le=>le.noglobstar===!0?$:`(${Q}(?:(?!${D}${le.dot?T:E}).)*?)`,se=le=>{switch(le){case"*":return`${U}${I}${$}`;case".*":return`${E}${I}${$}`;case"*.*":return`${U}${$}${E}${I}${$}`;case"*/*":return`${U}${$}${S}${I}${B}${$}`;case"**":return U+J(j);case"**/*":return`(?:${U}${J(j)}${S})?${B}${I}${$}`;case"**/*.*":return`(?:${U}${J(j)}${S})?${B}${$}${E}${I}${$}`;case"**/.*":return`(?:${U}${J(j)}${S})?${E}${I}${$}`;default:{const M=/^(.*?)\.(\w+)$/.exec(le);if(!M)return;const ee=se(M[1]);return ee?ee+E+M[2]:void 0}}},ce=l.removePrefix(b,G);let oe=se(ce);return oe&&j.strictSlashes!==!0&&(oe+=`${S}?`),oe},o.exports=x},510:(o,a,i)=>{const c=i(716),l=i(697),u=i(96),m=i(154),f=h=>h&&typeof h=="object"&&!Array.isArray(h),p=(h,_,y=!1)=>{if(Array.isArray(h)){const S=h.map(T=>p(T,_,y));return T=>{for(const A of S){const k=A(T);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=_||{},C=b.windows,j=x?p.compileRe(h,_):p.makeRe(h,_,!1,!0),v=j.state;delete j.state;let P=()=>!1;if(b.ignore){const S={..._,ignore:null,onMatch:null,onResult:null};P=p(b.ignore,S,y)}const E=(S,I=!1)=>{const{isMatch:T,match:A,output:k}=p.test(S,j,_,{glob:h,posix:C}),O={glob:h,state:v,regex:j,posix:C,input:S,output:k,match:A,isMatch:T};return typeof b.onResult=="function"&&b.onResult(O),T===!1?(O.isMatch=!1,I?O:!1):P(S)?(typeof b.onIgnore=="function"&&b.onIgnore(O),O.isMatch=!1,I?O:!1):(typeof b.onMatch=="function"&&b.onMatch(O),I?O:!0)};return y&&(E.state=v),E};p.test=(h,_,y,{glob:x,posix:b}={})=>{if(typeof h!="string")throw new TypeError("Expected input to be a string");if(h==="")return{isMatch:!1,output:""};const C=y||{},j=C.format||(b?u.toPosixSlashes:null);let v=h===x,P=v&&j?j(h):h;return v===!1&&(P=j?j(h):h,v=P===x),(v===!1||C.capture===!0)&&(C.matchBase===!0||C.basename===!0?v=p.matchBase(h,_,y,b):v=_.exec(P)),{isMatch:!!v,match:v,output:P}},p.matchBase=(h,_,y)=>(_ instanceof RegExp?_:p.makeRe(_,y)).test(u.basename(h)),p.isMatch=(h,_,y)=>p(_,y)(h),p.parse=(h,_)=>Array.isArray(h)?h.map(y=>p.parse(y,_)):l(h,{..._,fastpaths:!1}),p.scan=(h,_)=>c(h,_),p.compileRe=(h,_,y=!1,x=!1)=>{if(y===!0)return h.output;const b=_||{},C=b.contains?"":"^",j=b.contains?"":"$";let v=`${C}(?:${h.output})${j}`;h&&h.negated===!0&&(v=`^(?!${v}).*$`);const P=p.toRegex(v,_);return x===!0&&(P.state=h),P},p.makeRe=(h,_={},y=!1,x=!1)=>{if(!h||typeof h!="string")throw new TypeError("Expected a non-empty string");let b={negated:!1,fastpaths:!0};return _.fastpaths!==!1&&(h[0]==="."||h[0]==="*")&&(b.output=l.fastpaths(h,_)),b.output||(b=l(h,_)),p.compileRe(b,_,y,x)},p.toRegex=(h,_)=>{try{const y=_||{};return new RegExp(h,y.flags||(y.nocase?"i":""))}catch(y){if(_&&_.debug===!0)throw y;return/$^/}},p.constants=m,o.exports=p},716:(o,a,i)=>{const c=i(96),{CHAR_ASTERISK:l,CHAR_AT:u,CHAR_BACKWARD_SLASH:m,CHAR_COMMA:f,CHAR_DOT:p,CHAR_EXCLAMATION_MARK:h,CHAR_FORWARD_SLASH:_,CHAR_LEFT_CURLY_BRACE:y,CHAR_LEFT_PARENTHESES:x,CHAR_LEFT_SQUARE_BRACKET:b,CHAR_PLUS:C,CHAR_QUESTION_MARK:j,CHAR_RIGHT_CURLY_BRACE:v,CHAR_RIGHT_PARENTHESES:P,CHAR_RIGHT_SQUARE_BRACKET:E}=i(154),S=A=>A===_||A===m,I=A=>{A.isPrefix!==!0&&(A.depth=A.isGlobstar?1/0:1)},T=(A,k)=>{const O=k||{},Y=A.length-1,D=O.parts===!0||O.scanToEnd===!0,U=[],B=[],Q=[];let G=A,$=-1,J=0,se=0,ce=!1,oe=!1,le=!1,M=!1,ee=!1,w=!1,W=!1,ie=!1,_e=!1,N=!1,R=0,Ie,q,K={value:"",depth:0,isGlob:!1};const ge=()=>$>=Y,Re=()=>G.charCodeAt($+1),je=()=>(Ie=q,G.charCodeAt(++$));for(;$<Y;){q=je();let pe;if(q===m){W=K.backslashes=!0,q=je(),q===y&&(w=!0);continue}if(w===!0||q===y){for(R++;ge()!==!0&&(q=je());){if(q===m){W=K.backslashes=!0,je();continue}if(q===y){R++;continue}if(w!==!0&&q===p&&(q=je())===p){if(ce=K.isBrace=!0,le=K.isGlob=!0,N=!0,D===!0)continue;break}if(w!==!0&&q===f){if(ce=K.isBrace=!0,le=K.isGlob=!0,N=!0,D===!0)continue;break}if(q===v&&(R--,R===0)){w=!1,ce=K.isBrace=!0,N=!0;break}}if(D===!0)continue;break}if(q===_){if(U.push($),B.push(K),K={value:"",depth:0,isGlob:!1},N===!0)continue;if(Ie===p&&$===J+1){J+=2;continue}se=$+1;continue}if(O.noext!==!0&&(q===C||q===u||q===l||q===j||q===h)===!0&&Re()===x){if(le=K.isGlob=!0,M=K.isExtglob=!0,N=!0,q===h&&$===J&&(_e=!0),D===!0){for(;ge()!==!0&&(q=je());){if(q===m){W=K.backslashes=!0,q=je();continue}if(q===P){le=K.isGlob=!0,N=!0;break}}continue}break}if(q===l){if(Ie===l&&(ee=K.isGlobstar=!0),le=K.isGlob=!0,N=!0,D===!0)continue;break}if(q===j){if(le=K.isGlob=!0,N=!0,D===!0)continue;break}if(q===b){for(;ge()!==!0&&(pe=je());){if(pe===m){W=K.backslashes=!0,je();continue}if(pe===E){oe=K.isBracket=!0,le=K.isGlob=!0,N=!0;break}}if(D===!0)continue;break}if(O.nonegate!==!0&&q===h&&$===J){ie=K.negated=!0,J++;continue}if(O.noparen!==!0&&q===x){if(le=K.isGlob=!0,D===!0){for(;ge()!==!0&&(q=je());){if(q===x){W=K.backslashes=!0,q=je();continue}if(q===P){N=!0;break}}continue}break}if(le===!0){if(N=!0,D===!0)continue;break}}O.noext===!0&&(M=!1,le=!1);let ye=G,Ae="",Ce="";J>0&&(Ae=G.slice(0,J),G=G.slice(J),se-=J),ye&&le===!0&&se>0?(ye=G.slice(0,se),Ce=G.slice(se)):le===!0?(ye="",Ce=G):ye=G,ye&&ye!==""&&ye!=="/"&&ye!==G&&S(ye.charCodeAt(ye.length-1))&&(ye=ye.slice(0,-1)),O.unescape===!0&&(Ce&&(Ce=c.removeBackslashes(Ce)),ye&&W===!0&&(ye=c.removeBackslashes(ye)));const F={prefix:Ae,input:A,start:J,base:ye,glob:Ce,isBrace:ce,isBracket:oe,isGlob:le,isExtglob:M,isGlobstar:ee,negated:ie,negatedExtglob:_e};if(O.tokens===!0&&(F.maxDepth=0,S(q)||B.push(K),F.tokens=B),O.parts===!0||O.tokens===!0){let pe;for(let xe=0;xe<U.length;xe++){const V=pe?pe+1:J,X=U[xe],L=A.slice(V,X);O.tokens&&(xe===0&&J!==0?(B[xe].isPrefix=!0,B[xe].value=Ae):B[xe].value=L,I(B[xe]),F.maxDepth+=B[xe].depth),(xe!==0||L!=="")&&Q.push(L),pe=X}if(pe&&pe+1<A.length){const xe=A.slice(pe+1);Q.push(xe),O.tokens&&(B[B.length-1].value=xe,I(B[B.length-1]),F.maxDepth+=B[B.length-1].depth)}F.slashes=U,F.parts=Q}return F};o.exports=T},96:(o,a,i)=>{const{REGEX_BACKSLASH:c,REGEX_REMOVE_BACKSLASH:l,REGEX_SPECIAL_CHARS:u,REGEX_SPECIAL_CHARS_GLOBAL:m}=i(154);a.isObject=f=>f!==null&&typeof f=="object"&&!Array.isArray(f),a.hasRegexChars=f=>u.test(f),a.isRegexChar=f=>f.length===1&&a.hasRegexChars(f),a.escapeRegex=f=>f.replace(m,"\\$1"),a.toPosixSlashes=f=>f.replace(c,"/"),a.removeBackslashes=f=>f.replace(l,p=>p==="\\"?"":p),a.escapeLast=(f,p,h)=>{const _=f.lastIndexOf(p,h);return _===-1?f:f[_-1]==="\\"?a.escapeLast(f,p,_-1):`${f.slice(0,_)}\\${f.slice(_)}`},a.removePrefix=(f,p={})=>{let h=f;return h.startsWith("./")&&(h=h.slice(2),p.prefix="./"),h},a.wrapOutput=(f,p={},h={})=>{const _=h.contains?"":"^",y=h.contains?"":"$";let x=`${_}(?:${f})${y}`;return p.negated===!0&&(x=`(?:^(?!${x}).*$)`),x},a.basename=(f,{windows:p}={})=>{const h=f.split(p?/[\\/]/:"/"),_=h[h.length-1];return _===""?h[h.length-2]:_}}},t={};function n(o){var a=t[o];if(a!==void 0)return a.exports;var i=t[o]={exports:{}},c=!0;try{e[o](i,i.exports,n),c=!1}finally{c&&delete t[o]}return i.exports}typeof n<"u"&&(n.ab=__dirname+"/");var s=n(170);Br.exports=s})()),Br.exports}var aa;function Z_(){return aa||(aa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}t(e,{hasLocalMatch:function(){return o},matchLocalPattern:function(){return s}});const n=Gu();function s(a,i){if(a.search!==void 0&&a.search!==i.search)return!1;var c;return!!(0,n.makeRe)((c=a.pathname)!=null?c:"**",{dot:!0}).test(i.pathname)}function o(a,i){if(!a)return!0;const c=new URL(i,"http://n");return a.some(l=>s(l,c))}}(zr)),zr}var Ur={},ia;function J_(){return ia||(ia=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}t(e,{hasRemoteMatch:function(){return o},matchRemotePattern:function(){return s}});const n=Gu();function s(a,i){if(a.protocol!==void 0){const l=i.protocol.slice(0,-1);if(a.protocol!==l)return!1}if(a.port!==void 0&&a.port!==i.port)return!1;if(a.hostname===void 0)throw new Error(`Pattern should define hostname but found
|
|
17
|
-
`+JSON.stringify(a));if(!(0,n.makeRe)(a.hostname).test(i.hostname)||a.search!==void 0&&a.search!==i.search)return!1;var c;return!!(0,n.makeRe)((c=a.pathname)!=null?c:"**",{dot:!0}).test(i.pathname)}function o(a,i,c){return a.some(l=>c.hostname===l)||i.some(l=>s(l,c))}}(Ur)),Ur}var ca;function Ku(){return ca||(ca=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return s}});const t=75;function n(o){let{config:a,src:i,width:c,quality:l}=o;var u;if(process.env.NODE_ENV!=="production"){const f=[];if(i||f.push("src"),c||f.push("width"),f.length>0)throw new Error("Next Image Optimization requires "+f.join(", ")+" to be provided. Make sure you pass them as props to the `next/image` component. Received: "+JSON.stringify({src:i,width:c,quality:l}));if(i.startsWith("//"))throw new Error('Failed to parse src "'+i+'" on `next/image`, protocol-relative URL (//) must be changed to an absolute URL (http:// or https://)');if(i.startsWith("/")&&a.localPatterns&&process.env.NODE_ENV!=="test"&&process.env.NEXT_RUNTIME!=="edge"){const{hasLocalMatch:p}=Z_();if(!p(a.localPatterns,i))throw new Error("Invalid src prop ("+i+") on `next/image` does not match `images.localPatterns` configured in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns")}if(!i.startsWith("/")&&(a.domains||a.remotePatterns)){let p;try{p=new URL(i)}catch(h){throw console.error(h),new Error('Failed to parse src "'+i+'" on `next/image`, if using relative image it must start with a leading slash "/" or be an absolute URL (http:// or https://)')}if(process.env.NODE_ENV!=="test"&&process.env.NEXT_RUNTIME!=="edge"){const{hasRemoteMatch:h}=J_();if(!h(a.domains,a.remotePatterns,p))throw new Error("Invalid src prop ("+i+') on `next/image`, hostname "'+p.hostname+'" is not configured under images in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-host')}}if(l&&a.qualities&&!a.qualities.includes(l))throw new Error("Invalid quality prop ("+l+") on `next/image` does not match `images.qualities` configured in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-qualities")}const m=l||((u=a.qualities)==null?void 0:u.reduce((f,p)=>Math.abs(p-t)<Math.abs(f-t)?p:f))||t;return a.path+"?url="+encodeURIComponent(i)+"&w="+c+"&q="+m+(process.env.NEXT_DEPLOYMENT_ID?"&dpl="+process.env.NEXT_DEPLOYMENT_ID:"")}n.__next_img_default=!0;const s=n}(Fr)),Fr}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return j}});const n=Le,s=Ft,o=r,a=s._(g),i=n._(fs),c=n._(Y_()),l=Ws,u=Qn,m=Q_(),f=Yn,p=Hc(),h=n._(Ku()),_=process.env.__NEXT_IMAGE_OPTS;typeof window>"u"&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);function y(v,P,E,S,I,T,A){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),E!=null&&E.current){const Y=new Event("load");Object.defineProperty(Y,"target",{writable:!1,value:v});let D=!1,U=!1;E.current({...Y,nativeEvent:Y,currentTarget:v,target:v,isDefaultPrevented:()=>D,isPropagationStopped:()=>U,persist:()=>{},preventDefault:()=>{D=!0,Y.preventDefault()},stopPropagation:()=>{U=!0,Y.stopPropagation()}})}if(S!=null&&S.current&&S.current(v),process.env.NODE_ENV!=="production"){const Y=new URL(k,"http://n").searchParams.get("url")||k;if(v.getAttribute("data-nimg")==="fill"){if(!T&&(!A||A==="100vw")&&v.getBoundingClientRect().width/window.innerWidth<.6&&(A==="100vw"?(0,f.warnOnce)('Image with src "'+Y+'" 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 "'+Y+'" 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:B}=window.getComputedStyle(v.parentElement),Q=["absolute","fixed","relative"];Q.includes(B)||(0,f.warnOnce)('Image with src "'+Y+'" has "fill" and parent element with invalid "position". Provided "'+B+'" should be one of '+Q.map(String).join(",")+".")}v.height===0&&(0,f.warnOnce)('Image with src "'+Y+'" 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 "'+Y+`" 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:E,srcSet:S,sizes:I,height:T,width:A,decoding:k,className:O,style:Y,fetchPriority:D,placeholder:U,loading:B,unoptimized:Q,fill:G,onLoadRef:$,onLoadingCompleteRef:J,setBlurComplete:se,setShowAltText:ce,sizesInput:oe,onLoad:le,onError:M,...ee}=v;return(0,o.jsx)("img",{...ee,...x(D),loading:B,width:A,height:T,decoding:k,"data-nimg":G?"fill":"1",className:O,style:Y,sizes:I,srcSet:S,src:E,ref:(0,a.useCallback)(w=>{P&&(typeof P=="function"?P(w):typeof P=="object"&&(P.current=w)),w&&(M&&(w.src=w.src),process.env.NODE_ENV!=="production"&&(E||console.error('Image is missing required "src" property:',w),w.getAttribute("alt")===null&&console.error('Image is missing required "alt" property. Please add Alternative Text to describe the image for screen readers and search engines.')),w.complete&&y(w,U,$,J,se,Q,oe))},[E,U,$,J,se,M,Q,oe,P]),onLoad:w=>{const W=w.currentTarget;y(W,U,$,J,se,Q,oe)},onError:w=>{ce(!0),U!=="empty"&&se(!0),M&&M(w)}})});function C(v){let{isAppRouter:P,imgAttributes:E}=v;const S={as:"image",imageSrcSet:E.srcSet,imageSizes:E.sizes,crossOrigin:E.crossOrigin,referrerPolicy:E.referrerPolicy,...x(E.fetchPriority)};return P&&i.default.preload?(i.default.preload(E.src,S),null):(0,o.jsx)(c.default,{children:(0,o.jsx)("link",{rel:"preload",href:E.srcSet?void 0:E.src,...S},"__nimg-"+E.src+E.srcSet+E.sizes)})}const j=(0,a.forwardRef)((v,P)=>{const S=!(0,a.useContext)(p.RouterContext),I=(0,a.useContext)(m.ImageConfigContext),T=(0,a.useMemo)(()=>{var J;const se=_||I||u.imageConfigDefault,ce=[...se.deviceSizes,...se.imageSizes].sort((M,ee)=>M-ee),oe=se.deviceSizes.sort((M,ee)=>M-ee),le=(J=se.qualities)==null?void 0:J.sort((M,ee)=>M-ee);return{...se,allSizes:ce,deviceSizes:oe,qualities:le}},[I]),{onLoad:A,onLoadingComplete:k}=v,O=(0,a.useRef)(A);(0,a.useEffect)(()=>{O.current=A},[A]);const Y=(0,a.useRef)(k);(0,a.useEffect)(()=>{Y.current=k},[k]);const[D,U]=(0,a.useState)(!1),[B,Q]=(0,a.useState)(!1),{props:G,meta:$}=(0,l.getImgProps)(v,{defaultLoader:h.default,imgConf:T,blurComplete:D,showAltText:B});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(b,{...G,unoptimized:$.unoptimized,placeholder:$.placeholder,fill:$.fill,onLoadRef:O,onLoadingCompleteRef:Y,setBlurComplete:U,setShowAltText:Q,sizesInput:v.sizes,ref:P}),$.priority?(0,o.jsx)(C,{isAppRouter:S,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)})(as,as.exports);var eg=as.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var m in u)Object.defineProperty(l,m,{enumerable:!0,get:u[m]})}t(e,{default:function(){return c},getImageProps:function(){return i}});const n=Le,s=Ws,o=eg,a=n._(Ku());function i(l){const{props:u}=(0,s.getImgProps)(l,{defaultLoader:a.default,imgConf:process.env.__NEXT_IMAGE_OPTS});for(const[m,f]of Object.entries(u))f===void 0&&delete u[m];return{props:u}}const c=o.Image})(qu);var tg=qu;const Zt=H.getDefaultExportFromCjs(tg),ng=({item:e,CONSTANTS:t})=>{const n=e.icon?t.PAYMENT_FLAGS.includes(e.icon)?"payment":"social":null,s=n==="payment"?t.PAYMENT_FLAGS_DICTIONARY[e.icon]:e.icon;return e.link?r.jsxs(Fe,{href:e.link,target:"_blank",rel:"noopener noreferrer",className:me["support-item"],children:[e.image&&r.jsx("img",{src:e.image,alt:"",loading:"lazy"}),n==="payment"?r.jsx(Zt,{alt:s,src:`/assets/${s}.svg`,width:20,height:20}):r.jsx(d.Icon,{size:"small",name:s})]}):r.jsxs("div",{className:me["support-item"],children:[e.image&&r.jsx("img",{src:e.image,alt:"",loading:"lazy"}),n==="payment"?r.jsx(Zt,{alt:s,src:`/assets/${s}.svg`,width:20,height:20}):r.jsx(d.Icon,{size:"small",name:s})]})},rg=({content:e,CONSTANTS:t})=>r.jsx("div",{className:me["support-container"],children:e==null?void 0:e.map((n,s)=>r.jsxs("div",{"data-device":n.device,className:me["support-section"],children:[r.jsxs("div",{className:me["support-text"],children:[n.title&&r.jsx("h3",{children:n.title}),n.description&&r.jsx("p",{children:n.description})]}),Array.isArray(n.items)&&n.items.length&&r.jsx("div",{className:me["support-items"],"data-gap":n.gap,children:n.items.map((o,a)=>r.jsx(ng,{item:o,CONSTANTS:t},`footer-support-item-${a}`))})]},`footer-support-${s}`))}),sg=({name:e,nameIcon:t,maxWidth:n,rowAlignContent:s,columnAlignContent:o,columnAlignItems:a,textAlignContent:i,textAlignItems:c,children:l})=>r.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:s,alignItems:s},columnWrapper:{alignContent:o,alignItems:a}},children:r.jsxs(d.TextStructure.DivWrapper,{alignContent:i,alignItems:c,className:me.footer__column,children:[r.jsxs("div",{className:t?me.footer__columnTitleIcon:me.footer__columnTitle,children:[r.jsx(d.Icon,{name:`${t}`,size:"small"}),e&&r.jsx("div",{children:e})]}),r.jsx("div",{className:me.footer__columnContent,style:{maxWidth:`${n}px`},children:l})]})}),og=({name:e,nameIcon:t,maxWidth:n,children:s,ICONS:o,...a})=>r.jsxs(d.Accordion.Wrapper,{className:me.accordionWrapper,title:"accordion-wrapper",...a,children:[r.jsx(d.Accordion.Header,{id:(a==null?void 0:a.id)??"",className:me.accordionHeader,closeIndicator:r.jsx(d.Icon,{name:o.arrow_up,size:"medium"}),openIndicator:r.jsx(d.Icon,{name:o.arrow_down,size:"medium"}),title:"accordion-header",children:r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{className:t?me.accordionTextWrapper:"",children:[r.jsx(d.Icon,{name:`${t}`,size:"medium"}),r.jsx("h2",{className:"typography-style-body-md",children:e})]})})}),r.jsx(d.Accordion.Body,{title:"accordion-body",children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:me.footer__columnContent,style:{maxWidth:`${n}px`},children:s})})})]}),$r=e=>{const{isMobile:t}=re();return t?r.jsx(og,{...e}):r.jsx(sg,{...e})},Cn=({type:e,children:t,className:n,collumnName:s,collumnNameIcon:o,icons:a,iconLink:i,iconSize:c,link:l,paymentDisclaimer:u,paymentTitle:m,rowAlignContent:f,columnAlignContent:p,columnAlignItems:h,textAlignContent:_,textAlignItems:y,...x})=>{let b;const{handleSelectContent:C}=ae(),{nextimage:j}=ue();switch(e){case"menu":b=r.jsx(Fe,{className:me.footer__itemLink,href:l??"#",prefetch:!1,children:r.jsx("span",{onClick:()=>{C({content:`footer:${s}:${t}`})},children:t})});break;case"payment":b=r.jsxs("div",{className:d.helpers.classNameConcat(me.payment,me.footer__itemSmallText),...x,children:[u,r.jsxs("div",{className:d.helpers.classNameConcat(me.footer__iconContainer,me.footer__iconListSubHeader),children:[m,r.jsx("div",{className:me.footer__iconList,children:a==null?void 0:a.map((v,P)=>r.jsx(j,{alt:v,src:`/assets/${v}.svg`,width:c??20,height:c??20},P))})]})]});break;case"social-media":b=r.jsx("div",{className:me.footer__iconContainer,...x,children:r.jsx("div",{className:me.footer__iconList,children:i==null?void 0:i.map((v,P)=>r.jsx(Fe,{prefetch:!1,href:v.link??"#",target:"_blank",children:r.jsx(d.Icon,{size:"medium",name:v.icon,onClick:()=>C({content:`footer:redes-sociais:${v.icon}`})})},P))})});break;default:b=r.jsx("div",{className:n,...x,children:t})}return r.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:f,alignItems:f},columnWrapper:{alignContent:p,alignItems:h}},...x,children:r.jsx(d.TextStructure.DivWrapper,{alignContent:_,alignItems:y,className:d.helpers.classNameConcat(me.footer__item,n),children:b})})},ag=({className:e,text:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(me.footer__legalInformation,e),children:r.jsx("span",{children:t})}),Xu=()=>{const{nextimage:e}=ue();return r.jsx("div",{className:me["footer--stamps"],children:r.jsx(e,{alt:"Empresa B",className:me["footer--stamps--company"],src:"/images/Footer/new_certfB.png",width:56,height:64})})};Xu.displayName="Footer.Stamps";const Yu=({children:e,legalTextSlot:t,adornment:n,className:s,...o})=>{const{isMobile:a}=re(),i=g.Children.toArray(e).filter(Boolean),c=i.length;return r.jsxs("div",{className:me.footer__main,children:[(n==null?void 0:n.top)&&r.jsx("div",{className:me.footer__top,children:n==null?void 0:n.top}),c>0&&r.jsx("div",{...o,className:d.helpers.classNameConcat(me.footer__wrapper,s),children:i.map((l,u)=>r.jsx("div",{style:{flexGrow:1,maxWidth:`calc(100% / ${a?1:"fit-content"})`},children:l},u))}),(n==null?void 0:n.bottom)&&r.jsx("div",{className:me.footer__bottom,children:n.bottom}),t&&r.jsx("div",{className:me.footer__legalText,children:t})]})};Yu.displayName="Footer.Wrapper";const Qu=({data:{links:{links:e}},payments:t,socialInfo:n,socialMedias:s,adornment:o,LEGAL_INFORMATION_TEXT:a,ICONS:i,className:c,hasFooterStamps:l})=>{var u;return r.jsxs(Yu,{className:c,adornment:o,legalTextSlot:r.jsx(ag,{text:a}),children:[Array.isArray(e.column)&&e.column.map((m,f)=>r.jsx($r,{id:`${f}column-menu`,name:m.name,nameIcon:m.nameIcon,ICONS:i,children:m.items.map((p,h)=>r.jsx(Cn,{type:"menu",link:p.link,collumnName:m.name,collumnNameIcon:m.nameIcon,children:p.text},h))},f)),t&&((u=t.acceptedFlags)==null?void 0:u.length)>0&&r.jsx($r,{id:"payment-column",name:t==null?void 0:t.title,nameIcon:t==null?void 0:t.titleIcon,maxWidth:150,ICONS:i,children:r.jsx(Cn,{type:"payment",paymentDisclaimer:t==null?void 0:t.text,paymentTitle:t==null?void 0:t.flagsTitle,iconSize:16,icons:t==null?void 0:t.acceptedFlags})}),r.jsxs($r,{id:"social-media-column",name:n==null?void 0:n.title,ICONS:i,children:[n!=null&&n.subTitle?r.jsx(Cn,{children:n==null?void 0:n.subTitle}):null,r.jsx(Cn,{type:"social-media",iconSize:24,iconLink:s}),l&&r.jsx(Xu,{})]})]})};Qu.displayName="Footer";const ig=Object.freeze(Object.defineProperty({__proto__:null,Footer:Qu,FooterSupport:rg},Symbol.toStringTag,{value:"Module"})),cg="_header_9xxjk_57",lg="_actions_9xxjk_131",ug="_breadcrumb_9xxjk_142",dg="_credits_9xxjk_157",mg="_pdplinks_9xxjk_185",pg="_similars_9xxjk_212",fg="_sizes_9xxjk_251",hg="_measurementTable_9xxjk_267",_g="_measurementHead_9xxjk_280",gg="_measurementRows_9xxjk_285",yg="_measurementRowsTitle_9xxjk_302",xg="_measurementRowsText_9xxjk_314",vg="_measurementImage_9xxjk_325",bg="_measurementImageContainer_9xxjk_328",jg="_measurementContent_9xxjk_337",Cg="_measurementTitle_9xxjk_341",Sg="_measurementClose_9xxjk_352",Eg="_productref_9xxjk_417",Pg="_slideOut_9xxjk_1",Ng="_slideIn_9xxjk_1",Ig="_content_9xxjk_397",wg="_pdp_9xxjk_185",Rg="_divider_9xxjk_575",Z={"bottom-navigation":"_bottom-navigation_9xxjk_1","bottom-navigation__credits-modifier":"_bottom-navigation__credits-modifier_9xxjk_18","bottom-navigation__header":"_bottom-navigation__header_9xxjk_21","bottom-navigation__header-content":"_bottom-navigation__header-content_9xxjk_26","golden-tag-content":"_golden-tag-content_9xxjk_45","bottom-navigation__price-and-promo":"_bottom-navigation__price-and-promo_9xxjk_48",header:cg,"golden-tag":"_golden-tag_9xxjk_45","golden-tag-video":"_golden-tag-video_9xxjk_86","golden-tag-content-text":"_golden-tag-content-text_9xxjk_105",actions:lg,"add-to-cart":"_add-to-cart_9xxjk_138",breadcrumb:ug,"breadcrumb--active":"_breadcrumb--active_9xxjk_147",credits:dg,"gallery-carousel-modifier":"_gallery-carousel-modifier_9xxjk_162",pdplinks:mg,"links-wrapper":"_links-wrapper_9xxjk_195",similars:pg,"similars-info":"_similars-info_9xxjk_224","toggle-style-modifier":"_toggle-style-modifier_9xxjk_233","accessibility-info":"_accessibility-info_9xxjk_237",sizes:fg,"price-wrapper":"_price-wrapper_9xxjk_263",measurementTable:hg,measurementHead:_g,measurementRows:gg,measurementRowsTitle:yg,measurementRowsText:xg,measurementImage:vg,measurementImageContainer:bg,measurementContent:jg,measurementTitle:Cg,measurementClose:Sg,"tabs-root-modifier":"_tabs-root-modifier_9xxjk_358","tabs-list-modifier":"_tabs-list-modifier_9xxjk_376","tabs-item-modifier":"_tabs-item-modifier_9xxjk_393","content-wrapper":"_content-wrapper_9xxjk_397",productref:Eg,"tabs-panel":"_tabs-panel_9xxjk_428","tabs-panel-exit":"_tabs-panel-exit_9xxjk_434",slideOut:Pg,"tabs-panel-enter":"_tabs-panel-enter_9xxjk_438",slideIn:Ng,content:Ig,pdp:wg,"pdp-main":"_pdp-main_9xxjk_496","pdp-main__gallery-wrapper":"_pdp-main__gallery-wrapper_9xxjk_501","pdp-main__info":"_pdp-main__info_9xxjk_518","pdp-main__info-main-content":"_pdp-main__info-main-content_9xxjk_533","pdp-main__info-subsection":"_pdp-main__info-subsection_9xxjk_533","subsection-product-info":"_subsection-product-info_9xxjk_544","subsection-similars":"_subsection-similars_9xxjk_547","subsection-sizes":"_subsection-sizes_9xxjk_550","subsection-actions":"_subsection-actions_9xxjk_553","pdp-main__info-secondary-content":"_pdp-main__info-secondary-content_9xxjk_557","sections-title":"_sections-title_9xxjk_563",divider:Rg,"breadcrumbs-desktop":"_breadcrumbs-desktop_9xxjk_580","breadcrumbs-mobile":"_breadcrumbs-mobile_9xxjk_589"},Tg=({children:e,link:t,TOGGLE_STYLE_MODIFIER:n})=>{const{isMobile:s}=re(),{router:o}=ue(),a=()=>{t&&o.push(t)},i=g.useRef(null);return r.jsx(d.ToggleStyle.Wrapper,{size:s?"medium":"small",style:{...n,border:`${i.current===t?"2":"1"}`,overflow:"hidden",padding:"0"},onClick:a,active:i.current===t,children:e})},Zu=({productId:e,similars:t,TOGGLE_STYLE_MODIFIER:n})=>{const{thumbImage:s}=Oe(),o=[{productId:e,slug:"",textureImage:(s==null?void 0:s.imageUrl)??"",textureAlt:(s==null?void 0:s.imageText)??""},...t];return r.jsx("div",{children:o.map((a,i)=>a.textureImage?r.jsxs(Tg,{link:a.slug?a.slug:null,TOGGLE_STYLE_MODIFIER:n,children:[r.jsx(d.ToggleStyle.DisabledAdornment,{}),r.jsx(d.ToggleStyle.Texture,{children:r.jsx(we.Image,{alt:a.textureAlt,src:a.textureImage,height:34,width:34,style:{borderRadius:0,height:"100%"}})})]},`similars-item-${i}`):null)})},Ag=({children:e,storeId:t,productId:n,PDP_INFO:s,TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:a})=>{const{items:i,loadSimilars:c}=Wc(n,{filterTexture:o,storeId:t});return g.useEffect(()=>{c()},[c]),r.jsxs("div",{className:Z.similars,children:[r.jsxs("div",{className:Z["similars-info"],children:[r.jsx("span",{className:Z["sections-title"],children:s.product.color_title}),e]}),r.jsx(Zu,{productId:n,similars:i,TOGGLE_STYLE_MODIFIER:a})]})},kg=()=>{const{colorName:e}=Oe();return r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:e.length===0?"":Z["accessibility-info"],children:r.jsx("p",{children:e})})})},Zn=({className:e,titleId:t})=>{var o,a,i;const{productName:n,tag:s}=Oe();return r.jsxs("div",{className:d.helpers.classNameConcat(Z.header,e),children:[s!=null&&s.commercial?r.jsx(d.Tag,{size:"small",title:(o=s.commercial)==null?void 0:o.value,variant:"quaternary",adornment:{start:(a=s.commercial)!=null&&a.icon?r.jsx(d.Icon,{name:s.commercial.icon}):null},children:(i=s.commercial)==null?void 0:i.value}):null,r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h1",{id:t,children:n})})})]})};Zn.displayName="PDP.PDPHeader";const Gs=({layout:e="horizontal"})=>{const{price:t,listPrice:n,installments:s}=Oe(),{count:o,value:a}=s,i=H.formatPriceToCurrency(n??0,!0),c=H.formatPriceToCurrency(t??0,!0),l=H.formatPriceToCurrency(a??0);return r.jsx(d.ProductInfo.Root,{size:"small",layout:e,children:r.jsxs(d.ProductInfo.Wrapper,{layout:e,size:"small",className:Z["price-wrapper"],children:[r.jsx(d.ProductInfo.ValuesWrapper,{children:t!==n?r.jsxs(r.Fragment,{children:[r.jsx(d.ProductInfo.Price,{label:"originalPrice",value:i.toString(),size:"small"}),r.jsx(d.ProductInfo.Price,{label:"discountPrice",value:c.toString(),size:"small"})]}):r.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:c.toString(),size:"small"})}),o&&o>1&&a?r.jsx(d.ProductInfo.Price,{label:"installment",value:`ou ${o}x ${l}`,size:"small"}):null]})})},is=({onAddCallBack:e,onDisabledClickCallBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:s})=>{const o=nn(),{productId:a,productData:i,price:c,listPrice:l,thumbImage:u,isKit:m}=Oe(),{isMobile:f}=re(),{addToCart:p}=be(),{sendDataLayerEvent:h}=ae(),_=!m&&(!o.sku||!o.available),y=()=>{if(_&&typeof t=="function"){t();return}typeof e=="function"&&e({id:o.sku,quantity:o.quantity,seller:o.sellerId,sku:a}),p({id:o.sku,quantity:o.quantity,seller:o.sellerId},{id:a,texture:u==null?void 0:u.imageUrl}),h({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...i,price:c,listPrice:l}]},supportData:{selectedSkus:[o]},customData:{quantity:o.quantity}}})};return r.jsx(d.Button,{className:Z["add-to-cart"],size:f?(n==null?void 0:n.mobile)??"large":(n==null?void 0:n.desktop)??"x-large",onClick:y,children:o.sku&&o.available?`${s.add_to_cart}`:`${s.select_size}`})},Lg=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t})=>{const{isMobile:n}=re(),s=nn(),{sizesContainerRef:o}=Sa(),{structureRef:a}=Pe();return s.sku&&s.available?r.jsx(is,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t}):r.jsx(d.Button,{className:Z["add-to-cart"],size:n?(e==null?void 0:e.mobile)??"large":(e==null?void 0:e.desktop)??"x-large",onClick:()=>{o.current&&a.current&&window.document.body.scrollTo({top:o.current.offsetTop-a.current.offsetHeight,behavior:"smooth"})},children:s.sku&&s.available?t.add_to_cart:t.select_size})},Sn=({value:e,label:t,suppressHydrationWarning:n=!1},s)=>{const o={value:e,...n&&{suppressHydrationWarning:!0}},a=s==="compact"?o:{...o,label:t};return r.jsx(d.Timer.Digit,{...a})},An=({dateEnd:e,dateInit:t,type:n="default",TIME_ZONE:s,...o})=>{const[a,i]=g.useState(mc(new Kr.TZDate(Date.now(),s),new Kr.TZDate(e,s))),[c,l]=g.useState(!1);if(g.useEffect(()=>{l(!0);const h=setInterval(()=>{i(_=>_<=0?(clearInterval(h),0):_-1e3)},1e3);return()=>clearInterval(h)},[]),!c||a<=0)return r.jsx(r.Fragment,{});const u=Vt(a,"days"),m=Vt(a,"hours"),f=Vt(a,"minutes"),p=Vt(a);return r.jsxs(d.Timer.Root,{...o,children:[u?r.jsxs(r.Fragment,{children:[Sn({value:u,label:"dias"},n),r.jsx(d.Timer.Separator,{})]}):null,Sn({value:m,label:"horas"},n),r.jsx(d.Timer.Separator,{}),Sn({value:f,label:"min"},n),r.jsx(d.Timer.Separator,{}),Sn({value:p,label:"segs",suppressHydrationWarning:!0},n)]})},Ks=({TIME_ZONE:e})=>{const{tag:t}=Oe(),n=t==null?void 0:t.flagGoldenPdp,s=g.useMemo(()=>{var o;if((o=n==null?void 0:n.tagImage)!=null&&o.includes("player.vimeo")){const a=n.tagImage.split("?")[1],i=a==null?void 0:a.split("&"),c=i==null?void 0:i.filter(u=>u.includes("loc")||u.includes("signature")||u.includes("user_id")),l=c==null?void 0:c.join("&");return`${n.tagImage.split("?")[0]}?${l}`}return n==null?void 0:n.tagImage},[n==null?void 0:n.tagImage]);return n!=null&&n.enableTag?r.jsxs("div",{className:Z["golden-tag"],style:(n==null?void 0:n.backgroundSelect)==="color"?{backgroundColor:n==null?void 0:n.backgroundColor}:(n==null?void 0:n.backgroundSelect)==="image"?{backgroundImage:`url(${n==null?void 0:n.tagImage})`}:void 0,children:[(n==null?void 0:n.backgroundSelect)==="video"&&r.jsx("div",{className:Z["golden-tag-video"],children:r.jsx(we.Video,{src:s,autoPlay:!0,muted:!0,loop:!0,playsInline:!0})}),r.jsxs("div",{className:Z["golden-tag-content"],children:[r.jsx("span",{className:Z["golden-tag-content-text"],style:{color:n==null?void 0:n.textColor},children:n==null?void 0:n.value}),(n==null?void 0:n.countDownEndDate)&&r.jsx(An,{mode:n==null?void 0:n.timerMode,size:"x-small",type:"compact",dateEnd:new Date((n==null?void 0:n.countDownEndDate)??""),TIME_ZONE:e})]})]}):null};Ks.displayName="PDP.GoldenTag";const Og=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t,TIME_ZONE:n,Z_INDEX_WAR:s})=>{const{isMobile:o}=re();return o?r.jsxs(d.Card,{className:Z["bottom-navigation"],shadow:!0,style:{zIndex:s.pdp_bottom_navigation},children:[r.jsxs("div",{className:Z["bottom-navigation__header"],children:[r.jsx(Ks,{TIME_ZONE:n}),r.jsxs("div",{className:Z["bottom-navigation__header-content"],children:[r.jsx(Zn,{}),r.jsx(Gs,{layout:"name-vertical"})]})]}),r.jsx(Lg,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t})]}):null},Dg=({children:e,setShowBottomNavigation:t})=>{const n=g.useRef(null),s=_s(n),o=g.useRef(s);return g.useEffect(()=>{var i;const{top:a}=((i=n.current)==null?void 0:i.getBoundingClientRect())??{top:0};o.current!==s&&a>0&&(t(!s),o.current=s)},[s]),r.jsx("div",{ref:n,style:{width:"100%"},children:e})},Mg=({ICONS:e})=>{const{isMobile:t}=re(),{price:n,listPrice:s,productData:o,productId:a}=Oe(),{sendDataLayerEvent:i}=ae(),c=Bt(),{toggleProduct:l}=Nt();return r.jsx(d.Button,{adornment:{start:r.jsx(d.Icon,{name:e[c.includes(a)?"favorite_true":"favorite_false"],size:"medium"})},className:Z["add-to-wishlist"],size:t?"medium":"x-large",variant:"tertiary",onClick:()=>{l(a),i({functionKey:"productEvents",data:{event:c.includes(a)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:"PDP"},commonData:{...o,price:n,listPrice:s}}})}})},Ju=({showWishlist:e=!0,callBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:s,ICONS:o,TIME_ZONE:a,Z_INDEX_WAR:i})=>{const{isMobile:c}=re(),[l,u]=g.useState(!0);return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:Z.actions,children:[c?r.jsx(Dg,{setShowBottomNavigation:u,children:r.jsx(is,{onAddCallBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:s})}):r.jsx(is,{onAddCallBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:s}),e&&r.jsx(Mg,{ICONS:o})]}),c&&l&&r.jsx(Og,{addToCartBtnSize:n,BUY_BUTTON_LABELS:s,Z_INDEX_WAR:i,TIME_ZONE:a})]})},ed=({className:e,device:t,ICONS:n})=>{const{breadcrumbList:s,productName:o}=Oe(),a=i=>i.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return r.jsx(d.BreadCrumb.DivWrapper,{className:d.helpers.classNameConcat(Z.breadcrumb,[t==="mobile"?Z["breadcrumbs-mobile"]:Z["breadcrumbs-desktop"],e]),children:r.jsxs(d.BreadCrumb.List,{children:[Array.isArray(s)&&s.map((i,c)=>{const l=a(s.slice(0,c+1).map(u=>u.replace(/\s/g,"-").toLowerCase()).join("/"));return r.jsx(d.BreadCrumb.Item,{adornment:{end:r.jsx(d.Icon,{name:n.arrow_right})},role:"listitem",children:r.jsx(Fe,{href:`/${l}`,children:i})},`pdp-breadcrumb-${l}-${c}`)}),r.jsx(d.BreadCrumb.Item,{role:"listitem",className:d.helpers.classNameConcat(Z["breadcrumb--active"],e),children:o},"pdp-breadcrumb-productName")]})})};ed.displayName="PDP.BreadCrumb";const td=({className:e})=>{var s;const{tag:t}=Oe(),n=t==null?void 0:t.flagPdp;return n&&((s=n==null?void 0:n.value)!=null&&s.length)?r.jsx(d.Tag,{className:d.helpers.classNameConcat(Z.credits,e),variant:"tertiary",title:n==null?void 0:n.value,size:"small",adornment:{start:n!=null&&n.enableIcon&&(n!=null&&n.icon)?r.jsx(d.Icon,{name:n==null?void 0:n.icon,style:{color:n==null?void 0:n.iconColor}}):null},style:{background:n==null?void 0:n.tagColor,color:n==null?void 0:n.textColor},children:n==null?void 0:n.value}):r.jsx(r.Fragment,{})};td.displayName="PDPCredits";const Fg=()=>{const{descriptionContent:e,productReference:t}=Oe(),[n,s]=g.useState("description");return r.jsxs(d.Tabs.Root,{className:Z["tabs-root-modifier"],children:[r.jsx(d.Tabs.TabList,{className:Z["tabs-list-modifier"],children:e==null?void 0:e.map(({label:o,value:a})=>r.jsx(d.Tabs.Item,{label:o,value:a,activeTab:n,onTabChange:s,size:"large",className:`${Z["tabs-item-modifier"]} ${n===a?Z["tabs-item-active"]:""}`},a))}),r.jsxs("div",{className:Z["content-wrapper"],children:[n==="description"?r.jsx("div",{children:r.jsxs("span",{className:Z.productref,children:["Ref:",t]})}):"",e==null?void 0:e.map(({value:o,content:a})=>n===o?r.jsx(d.Tabs.Panel,{className:`${Z["tabs-panel"]} ${n===o?Z["tabs-panel-enter"]:Z["tabs-panel-exit"]}`,children:r.jsx("div",{className:Z.content,dangerouslySetInnerHTML:{__html:a}})},o):null)]})]})},zg=({CURRENCY:e,DELIVERY_INFO_BOXES_ALLOWED:t,FREIGHT_CALCULATION:n,Z_INDEX_WAR:s})=>{const o=nn(),{isMobile:a}=re();return r.jsxs(r.Fragment,{children:[a?r.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null,r.jsx(xu,{skuId:o.available?o.sku:"",size:a?n.inputSize.mobile:n.inputSize.desktop,quantity:o.quantity,sellerId:o.sellerId,seller:o.sellerName,local:"PDP",CONSTANTS_PROPS:{freightConfig:n,deliveryInfoBoxesAllowed:t,toolTipZIndex:s.modal,currency:e}}),a?r.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null]})},la=({image:e,index:t,handleZoom:n,PRODUCT_IMAGE_DIMENSIONS:s})=>{const o=H.resizingImg(e.imageUrl,s.pdp),{nextimage:a}=ue();return r.jsx(a,{src:o,alt:e.imageLabel,objectFit:"contain",...s.pdp,...t<=1&&{priority:!0,loading:"eager"},onClick:()=>{n(t)}},t)},Bg=({video:e,productName:t,poster:n})=>{const{sendDataLayerEvent:s}=ae(),o=g.useRef(!1);return r.jsx(we.Video,{src:e,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,style:{zIndex:-1,aspectRatio:"2/3"},onPlaying:()=>{o.current||(o.current=!0,s({functionKey:"readyEvents",data:{event:"video_start",readyData:{product:t}}}))},poster:n})},nd=({images:e,video:t,handleZoom:n,productName:s,PRODUCT_IMAGE_DIMENSIONS:o})=>{var u,m;const{initialize:a,pagination:i,controller:c,itemsStyles:l}=d.Carousel.useCarousel({gap:0,itemsPerPage:1,loop:!1,direction:"row"});return r.jsxs(d.Carousel.Root,{innerRef:f=>{a(f)},className:Z["gallery-carousel-modifier"],children:[r.jsx(d.Carousel.Controller,{position:"absolute",top:"24px",bottom:"unset",left:"16px",children:r.jsx(d.Carousel.Bullets,{page:i.currentPage,total:e.length,onBulletClick:f=>c==null?void 0:c.navigateTo(f)})}),r.jsxs(d.Carousel.Body,{children:[r.jsx(d.Carousel.Item,{style:l,children:r.jsx(la,{image:e[0],index:0,handleZoom:n,PRODUCT_IMAGE_DIMENSIONS:o})},"PDP_gallery_0"),t&&r.jsx(d.Carousel.Item,{style:l,children:r.jsx(Bg,{video:t,productName:s,...((u=e[1])==null?void 0:u.imageUrl)&&{poster:(m=e[1])==null?void 0:m.imageUrl}})},"PDP_gallery_video"),e.map((f,p)=>p===0?null:r.jsx(d.Carousel.Item,{style:l,children:r.jsx(la,{image:f,index:p,handleZoom:n,PRODUCT_IMAGE_DIMENSIONS:o})},`PDP_gallery_${p}`))]})]})};nd.displayName="PDP.Carousel";const Ug="_thumbs_1954e_65",$g="_selected_1954e_92",Hg="_carousel_1954e_164",qg="_bullets_1954e_201",Ee={"image-zoom-wrapper-desktop":"_image-zoom-wrapper-desktop_1954e_1","button-close-container":"_button-close-container_1954e_10","button-close":"_button-close_1954e_10","main-image-container":"_main-image-container_1954e_22","image-desktop":"_image-desktop_1954e_52",thumbs:Ug,selected:$g,"image-zoom-wrapper-mobile":"_image-zoom-wrapper-mobile_1954e_117","image-mobile":"_image-mobile_1954e_147","image-zoom--image":"_image-zoom--image_1954e_161",carousel:Hg,"carousel-controller":"_carousel-controller_1954e_169","arrow-left":"_arrow-left_1954e_179","arrow-right":"_arrow-right_1954e_180",bullets:qg,"zoom-popup":"_zoom-popup_1954e_212","image-zoom--mobile":"_image-zoom--mobile_1954e_252","image-zoom--image--img":"_image-zoom--image--img_1954e_282"},ua=({onClose:e,ICONS:t})=>r.jsx("div",{className:`${Ee["button-close-container"]}`,children:r.jsx(d.Button,{iconNameStart:t.close,iconSize:"medium",className:`${Ee["button-close"]}`,variant:"tertiary",state:"default",size:"medium",onClick:e,style:{textDecoration:"none"}})}),Vg=({children:e,Z_INDEX_WAR:t,...n})=>r.jsx("div",{...n,className:Ee["image-zoom-wrapper-desktop"],style:{zIndex:t.pdp_image_zoom},children:e}),rd=({images:e,setCurrent:t,setFirstImgLoaded:n,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o})=>{const{nextimage:a}=ue();let i=null;const c=g.useRef(null),{initialize:l,controller:u,pagination:m,itemsStyles:f}=d.Carousel.useCarousel({itemsPerPage:1,gap:10,loop:!1,direction:"row"}),p=_=>{u==null||u.navigateTo(_)},h=()=>{n(!0)};return g.useEffect(()=>{t(m.currentPage)},[m.currentPage,t]),r.jsxs(d.Carousel.Root,{innerRef:_=>{_&&!i&&(i=_,l(i))},className:Ee.carousel,children:[r.jsxs(d.Carousel.Controller,{className:Ee["carousel-controller"],children:[r.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.prevPage(),className:Ee["arrow-left"],adornment:{start:r.jsx(d.Icon,{name:s.arrow_left})}}),r.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.nextPage(),className:Ee["arrow-right"],adornment:{start:r.jsx(d.Icon,{name:s.arrow_right})}})]}),r.jsx(d.Carousel.Body,{children:Array.isArray(e)&&e.map((_,y)=>r.jsx(d.Carousel.Item,{style:f,children:r.jsx(a,{...o.image_zoom.mobile,...y===0&&{priority:!0,loading:"eager"},ref:c,className:Ee.imageMobile,src:_.imageUrl,alt:_.imageText,quality:100,...y===0&&{onLoad:h}})},y))}),r.jsx(d.Carousel.Bullets,{className:Ee.bullets,page:m.currentPage,total:m.totalPages,onBulletClick:p})]})};rd.displayName="ImageZoom.Mobile.Carousel";const sd=({imgRef:e,image:t,PRODUCT_IMAGE_DIMENSIONS:n})=>{Aa();const{nextimage:s}=ue();return r.jsx("div",{className:Ee["image-zoom--image"],ref:e,children:r.jsx(s,{...n.image_zoom.mobile,alt:t.imageText,className:Ee["image-zoom--image--img"],quality:100,src:t.imageUrl})})};sd.displayName="ImageZoom.ImageZoom";const od=({loaded:e=!1})=>r.jsx("div",{className:Ee["zoom-popup"],"data-loaded":e,children:r.jsxs("svg",{width:"38",height:"39",viewBox:"0 0 38 39",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.93 5.382a3.711 3.711 0 0 1 2.55-1.007c.949 0 1.864.36 2.549 1.007a3.534 3.534 0 0 1 1.113 2.472v11.357l10.118 3.332c.587.193 1.1.56 1.465 1.053.366.494.565 1.089.566 1.7v.004c0 .22-.025.44-.075.653v.005l-2.98 12.52a.625.625 0 0 1-1.215-.29l2.977-12.515v-.002c.029-.122.043-.247.044-.372a1.619 1.619 0 0 0-.321-.958 1.729 1.729 0 0 0-.851-.61L24.32 20.257a.625.625 0 0 1-.43-.594V7.88a2.285 2.285 0 0 0-.72-1.59 2.462 2.462 0 0 0-1.691-.665c-.635 0-1.241.24-1.69.666a2.285 2.285 0 0 0-.722 1.59v19.04a.625.625 0 0 1-1.115.388l-.056-.071-.161-.202a178.922 178.922 0 0 0-2.333-2.858l-.002-.002a2.581 2.581 0 0 0-.897-.69 2.677 2.677 0 0 0-1.122-.25H12.37c-.307 0-.61.078-.874.225a1.712 1.712 0 0 0-.635.61 1.625 1.625 0 0 0-.016 1.653l7.128 12.296a.625.625 0 0 1-1.082.627L9.762 26.35a2.876 2.876 0 0 1 .027-2.924 2.962 2.962 0 0 1 1.098-1.057 3.05 3.05 0 0 1 1.482-.384h1.016c.57.002 1.133.127 1.648.368.515.24.97.59 1.33 1.024.514.614 1.026 1.239 1.455 1.768V7.855a3.535 3.535 0 0 1 1.113-2.473ZM6.446 10.22a.625.625 0 0 1 0 .884l-5.324 5.324a.625.625 0 0 1-.884-.884l5.324-5.324a.625.625 0 0 1 .884 0Z"}),r.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.68 12.033c.345 0 .625.28.625.625v2.703h2.702a.625.625 0 1 1 0 1.25H.68a.625.625 0 0 1-.625-.625v-3.328c0-.345.28-.625.625-.625ZM16.429.237a.625.625 0 0 1 0 .884l-5.325 5.324a.625.625 0 0 1-.884-.883L15.545.237a.625.625 0 0 1 .884 0Z"}),r.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.034.68c0-.346.28-.626.625-.626h3.328c.345 0 .625.28.625.625v3.328a.625.625 0 1 1-1.25 0V1.304h-2.703a.625.625 0 0 1-.625-.625Z"})]})});od.displayName="ImageZoom.ZoomPopup";const ad=({images:e,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:n,...s})=>{const[o,a]=g.useState(!1),[i,c]=g.useState(0),{containerRef:l,imgRef:u,scale:m}=ka({defaultScale:1,maxScale:3});return r.jsxs("div",{...s,className:Ee["image-mobile"],"data-disable-carrousel-pan":m>1,children:[r.jsx(od,{loaded:o}),r.jsx(rd,{images:e,setCurrent:c,setFirstImgLoaded:a,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:n}),r.jsx("div",{className:Ee["image-zoom--mobile"],ref:l,children:r.jsx(sd,{imgRef:u,image:e[i],PRODUCT_IMAGE_DIMENSIONS:n})})]})};ad.displayName="ImageZoom.ImageMobile";const Wg=({children:e,Z_INDEX_WAR:t,...n})=>r.jsx("div",{...n,className:Ee["image-zoom-wrapper-mobile"],style:{zIndex:t.pdp_image_zoom},children:e}),Gg="_modal_1u87b_1",rt={modal:Gg,"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 Kg({headerTitle:e,isMobile:t,ICONS:n}){return r.jsx(d.Modal.Header,{navigation:"top",className:rt["modal-header"],children:r.jsxs(d.Modal.Controls,{navigation:"top",isMobile:t,children:[r.jsx("div",{className:rt["modal-header__title"],children:r.jsx(d.Modal.Title,{navigation:"top",className:rt["quick-shop__title"],title:e})}),r.jsx(d.Button,{className:rt["modal-header__close-button"],"data-close":!0,iconNameStart:n.close,size:"small",variant:"tertiary"})]})})}const id=({PDP_INFO:e,PLP_SIZE_ORDER:t,ICONS:n,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:i})=>{const{sizes:c,productId:l,handleViewItemEvent:u}=Oe(),m=g.useMemo(()=>c!=null&&c.length?al({items:c,getLabel:v=>v.value,PLP_SIZE_ORDER:t}):[],[c]),{sizesContainerRef:f}=Sa(),{isMobile:p}=re(),h=nn(),_=hi(),{setValue:y}=mi(),{setValue:x}=js(),b=g.useRef({}),[C,j]=g.useState(null);return r.jsxs("div",{ref:f,className:d.helpers.classNameConcat(Z.sizes,"PDP_sizes"),children:[r.jsx("span",{className:Z["sections-title"],children:e.product.size_title}),r.jsx("div",{children:m.map(v=>(!v.available&&!b.current[v.value]&&(b.current[v.value]={disable:!v.available,size:v.value,skuID:v.sku}),r.jsxs(d.ToggleSize.Wrapper,{size:p?"medium":"large",title:v.value,outOfStock:!v.available,onClick:()=>{v.available||(j({skuID:v.sku,size:v.value,disable:!0}),x(!0)),h.sku!==v.sku&&(y({...h,productId:l,name:v.name,size:v.value,sku:v.sku,sellerId:v.sellerId,sellerName:v.sellerName,available:v.available}),u({sku:v.sku,size:v.value}))},active:h.sku===v.sku,children:[r.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),r.jsx(d.ToggleSize.Text,{children:v==null?void 0:v.value})]},`sizes-${v.sku}-${v.value}`)))}),r.jsx(Ls,{open:_,setVisible:x,sku:C,setSku:j,skus:Object.values(b.current),ICONS:n,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:i})]})},Wt=({children:e,className:t,type:n})=>r.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main__info-subsection"],[Z[`subsection-${n}`],t]),children:e}),cd=({children:e,className:t})=>{const{structureRef:n,tipbarRef:s}=Pe(),o=g.useMemo(()=>{var c,l;const a=((c=n.current)==null?void 0:c.clientHeight)||0,i=((l=s.current)==null?void 0:l.clientHeight)||0;return a+i},[n,s]);return r.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main__info"],t),id:"pdpmaininfo",style:{top:o},children:e})},ld=({TEXTURE_IMAGE:e,TOGGLE_STYLE_MODIFIER:t})=>{const{productId:n}=Oe(),[s,o]=g.useState([]),a=new Map;return g.useEffect(()=>{if(n){if(a.has(n)){o(a.get(n));return}fetch("/api/catalog/product/similars",{method:"POST",body:JSON.stringify({productId:n,filterTexture:e})}).then(i=>i.json()).then(({data:i})=>{Array.isArray(i)&&i.length===0||(a.set(n,i),o(i))}).catch(i=>{console.error(i)})}},[n]),r.jsxs("div",{className:Z.similars,children:[r.jsx("span",{className:Z["sections-title"],children:"Cor"}),r.jsx(Zu,{productId:n,similars:s,TOGGLE_STYLE_MODIFIER:t})]})};ld.displayName="PDP.Info.Similars";const Xg=({callBackProductAdded:e,BUY_BUTTON_LABELS:t,ICONS:n,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PDP_INFO:a,PLP_SIZE_ORDER:i,PRODUCT_CARD_TEXTS:c,TEXTURE_IMAGE:l,TIME_ZONE:u,TOGGLE_STYLE_MODIFIER:m,Z_INDEX_WAR:f})=>r.jsx(d.Modal.Body,{className:rt["modal-product-body"],children:r.jsxs(cd,{className:rt["pdp-main__info-modifier"],children:[r.jsxs(Wt,{type:"product-info",children:[r.jsx(Zn,{}),r.jsx(Gs,{})]}),r.jsx(Wt,{type:"similars",children:r.jsx(ld,{TEXTURE_IMAGE:l,TOGGLE_STYLE_MODIFIER:m})}),r.jsx(Wt,{type:"sizes",children:r.jsx(id,{ICONS:n,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PDP_INFO:a,PLP_SIZE_ORDER:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:f})}),r.jsx(Wt,{type:"actions",children:r.jsx(Ju,{showWishlist:!1,callBack:e,addToCartBtnSize:{mobile:"medium",desktop:"large"},BUY_BUTTON_LABELS:t,ICONS:n,TIME_ZONE:u,Z_INDEX_WAR:f})})]})});function Yg({callBackProductAdded:e,QUICKSHOP:t,ICONS:n,...s}){const[o,a]=g.useState(!1),i=()=>a(c=>!c);return r.jsxs("div",{className:rt["quick-shop"],children:[r.jsx(d.Button,{onClick:i,size:"x-large",className:rt["shop-bag"],iconNameStart:n.bag,iconSize:"medium"}),r.jsxs(d.Modal.Root,{isOpen:o,setIsOpen:a,className:`${rt.modal} ${rt["quick-shop__modal"]}`,style:{position:"fixed",height:"100svh",width:"100%",top:0,zIndex:1e3,bottom:"unset",overflowY:"hidden"},variant:"sideRight",children:[r.jsx(Kg,{headerTitle:t.title,ICONS:n}),r.jsx(Xg,{callBackProductAdded:e,ICONS:n,...s})]})]})}const Qg=({image:e})=>r.jsx(Zt,{src:H.resizingImg(e.imageUrl,{width:50,height:75})||"",alt:e.imageText,className:Ee.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:10,style:{position:"absolute",inset:0,filter:"blur(10px)"}}),Zg=({images:e,selectedImageIndex:t,PRODUCT_IMAGE_DIMENSIONS:n,...s})=>{const[o,a]=g.useState(!1),{nextimage:i}=ue();return r.jsx("div",{...s,className:Ee["main-image-container"],children:r.jsxs("div",{className:Ee["image-desktop"],children:[!o&&r.jsx(Qg,{image:e==null?void 0:e[t]}),r.jsx(i,{src:H.resizingImg(e==null?void 0:e[t].imageUrl,{...n.image_zoom.desktop})||"",alt:e==null?void 0:e[t].imageText,className:Ee.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:100,onLoad:()=>{a(!0)}})]})})},Jg=({images:e,onThumbnailClick:t,selectedImageIndex:n})=>{const{nextimage:s}=ue();return r.jsx("div",{className:Ee.thumbs,children:e.map((o,a)=>r.jsx("div",{role:"button",tabIndex:0,onClick:()=>t(a),onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&t(a)},className:a===n?Ee.selected:"",children:r.jsx(s,{src:o.imageUrl,alt:o.imageText,layout:"responsive",width:100,height:100,objectFit:"cover",priority:!1})},a))})},ud=({images:e,initialSelectedImageIndex:t=0,setShowImageZoom:n,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o,Z_INDEX_WAR:a,...i})=>{const{isMobile:c}=re(),[l,u]=g.useState(t),m=f=>{u(f)};return c?r.jsxs(Wg,{Z_INDEX_WAR:a,children:[r.jsx(ua,{onClose:()=>n({show:!1,initialIndex:0}),ICONS:s}),r.jsx(ad,{images:e,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o})]}):r.jsxs(Vg,{Z_INDEX_WAR:a,children:[r.jsx(ua,{onClose:()=>n({show:!1,initialIndex:0}),ICONS:s}),r.jsx(Zg,{images:e,selectedImageIndex:l,onThumbnailClick:m,PRODUCT_IMAGE_DIMENSIONS:o},e[l].imageId??`${e[l].imageText}-${l}`),r.jsx(Jg,{images:e,selectedImageIndex:l,onThumbnailClick:m}),r.jsx(Yg,{callBackProductAdded:()=>{n({initialIndex:0,show:!1})},ICONS:s,Z_INDEX_WAR:a,...i})]})};ud.displayName="ImageZoom";const ey=({productImgs:e,PRODUCT_IMAGE_DIMENSIONS:t,...n})=>{const{video:s,productName:o}=Oe(),[a,i]=g.useState({show:!1,initialIndex:0});g.useEffect(()=>(a.show?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll"),()=>{document.body.classList.remove("no-scroll")}),[a]);const c=l=>{i({show:!0,initialIndex:l})};return r.jsxs(r.Fragment,{children:[r.jsx(nd,{images:e,video:s,handleZoom:c,productName:o,PRODUCT_IMAGE_DIMENSIONS:t}),a.show&&r.jsx(ud,{images:e,initialSelectedImageIndex:a.initialIndex,setShowImageZoom:i,PRODUCT_IMAGE_DIMENSIONS:t,...n})]})},dd=({TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...n})=>{const{images:s}=Oe(),o=g.useMemo(()=>{const a=s.filter(i=>!e.includes(i.imageLabel));return a.length>0?a:s},[]);return r.jsx(ey,{productImgs:o,TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...n})};dd.displayName="PDP.Gallery";const ty=({className:e,hasIcons:t=!0,ICONS:n,PDP_INFO:s})=>{const{allSizesAvailable:o,productId:a}=Oe(),{setValue:i}=js(),{sendDataLayerEvent:c}=ae();return r.jsx("div",{className:d.helpers.classNameConcat(Z.links,e),id:"pdp-container","data-product-id":a,children:r.jsxs("div",{className:Z["links-wrapper"],children:[!o&&r.jsx(d.Button,{adornment:t?{start:r.jsx(d.Icon,{name:n.product})}:{},size:"x-small",variant:"tertiary",onClick:()=>i(!0),underline:!0,children:s.links_and_stepper.size_out_of_stock}),r.jsx(d.Button,{adornment:t?{start:r.jsx(d.Icon,{name:n.ruler})}:{},size:"x-small",variant:"tertiary",underline:!0,onClick:()=>{var l,u;(u=window.SizebayParams)==null||u.openChart((l=window.SizebayParams)==null?void 0:l.id),c({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:"pdp:guia-de-medidas"}}})},children:s.links_and_stepper.size_table_title}),r.jsx(d.Button,{size:"x-small",variant:"tertiary",className:"sizebay",underline:!0,onClick:()=>{var l,u;return(u=window.SizebayParams)==null?void 0:u.openVFR((l=window.SizebayParams)==null?void 0:l.id)},children:s.links_and_stepper.sizebay})]})})},ny=({children:e})=>r.jsx("div",{className:Z["pdp-main__info-main-content"],children:e}),ry=({head:e,className:t})=>r.jsx("thead",{className:t,children:r.jsx("tr",{children:e.map((n,s)=>r.jsx("th",{children:n},`head-title-${s}`))})}),sy=({rows:e,className:t})=>r.jsx("tbody",{className:t,children:e.map((n,s)=>r.jsx("tr",{children:n.map(o=>typeof o=="string"&&o.includes("blocks")?JSON.parse(o).blocks.map(a=>`${a.text}
|
|
18
|
-
`):o).map((o,a)=>r.jsx("td",{children:o},`cell-content-${a}`))},`row-content-${s}`))}),oy="_tableContainer_1yxy2_1",ay={tableContainer:oy},iy=({children:e,className:t=""})=>r.jsx("table",{className:`${ay.tableContainer} ${t}`,children:e}),Hr={Head:ry,Rows:sy,Root:iy},cy=({title:e,text:t})=>r.jsxs("p",{className:Z.measurementRowsText,children:[r.jsx("h1",{className:Z.measurementRowsTitle,children:e}),t]}),ly=({ICONS:e,SIZES:t,Z_INDEX_WAR:n})=>{const s=yi(),{setValue:o}=xi();return r.jsx(d.Modal.Root,{isMobile:!0,style:{zIndex:n.modal},setIsOpen:o,isOpen:s,className:Z.measurementModal,children:r.jsx(d.Modal.Body,{children:r.jsxs("div",{className:Z.measurementContainer,children:[r.jsx("h1",{className:Z.measurementTitle,children:t.title}),r.jsxs("div",{className:Z.measurementContent,children:[r.jsx("div",{className:Z.measurementImageContainer,children:r.jsx(Zt,{width:264,height:402,alt:"",className:Z.measurementImage,src:t.bannerImage})}),r.jsxs(Hr.Root,{className:Z.measurementTable,children:[r.jsx(Hr.Head,{className:Z.measurementHead,head:t.head}),r.jsx(Hr.Rows,{className:Z.measurementRows,rows:t.rows.map((a,i)=>[r.jsx(cy,{title:t.descriptions[i].title,text:t.descriptions[i].text},i),...a])})]})]}),r.jsx(d.Button,{onClick:()=>o(!1),className:Z.measurementClose,variant:"tertiary",children:r.jsx(d.Icon,{name:e.close})})]})})},"minicart")},uy=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main__gallery-wrapper"],t),...n,children:e}),dy=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(Z.pdp,t),...n,children:e}),my=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main"],t),...n,children:e}),py=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main__info-secondary-content"],t),...n,children:e}),fy={gallery:uy,pdp:dy,main:my,secondary:py},hy=({className:e,...t})=>r.jsx(d.Utils.Divider,{...t,className:d.helpers.classNameConcat(Z.divider,e)}),_y=Object.freeze(Object.defineProperty({__proto__:null,AccessibilityInfo:kg,Actions:Ju,BreadCrumb:ed,Credits:td,DescriptionsTabs:Fg,Divider:hy,Freight:zg,Gallery:dd,GoldenTag:Ks,Header:Zn,Links:ty,MainContent:ny,MainInfo:cd,PDPSimilars:Ag,Price:Gs,ProductMeasurements:ly,Sizes:id,SubSectionWrapper:Wt,containers:fy},Symbol.toStringTag,{value:"Module"})),gy=(e,t)=>{const[n,s]=wu({items:e}),[o,a]=t.split(":").map(Number);return isNaN(o)||isNaN(a)?[n,s]:[n<o?n:o,s>a?s:a]},yy=()=>{var E;const{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:n,PLP_FILTERS_EMPTY:s,PLP_FILTERS_TITLE:o,PLP_SIZE_ORDER:a}=Me(),[i,c]=g.useState("10000:0"),{isMobile:l}=re(),{sendDataLayerEvent:u}=ae(),{openFilters:m,setOpenFilters:f}=Rs(),{state:p}=Be(),{breadcrumb:h,deleteAllFacets:_,isLoading:y=!1,facets:x,onToggleFacet:b,selectedFacets:C}=yc.contexts.searchFacets.hook(),j=g.useRef(""),v={isLast:!0,href:(E=p.term)!=null&&E.length?`/${p.term}`:"",name:p.term},P=H.filterNonRootFacets(C,p==null?void 0:p.base);return g.useEffect(()=>{const S=x.find(({key:I})=>I==="price");if(S){const[I,T]=gy(S.values,i??"10000:0");c(`${I}:${T}`)}},[x,i,c]),g.useEffect(()=>{if(!P.length)return;const S=JSON.stringify(P);j.current!==S&&(j.current=S,u({functionKey:"filterEvent",data:{commonData:{selectedFacets:P}}}))},[P]),r.jsxs(wn.teamComponents.Filter.Root,{CONSTANTS:{ICONS:e,PLP_FILTERS_TITLE:o,PLP_FILTERS:t},breadcrumb:h.length?h:[v],deleteAllFacets:_,filters:{facets:H.filterNonCategorySelected(x,p==null?void 0:p.base),selected:P},isMobile:l??!1,isLoading:y,isOpen:m,price:i,onToggleFacet:b,setIsOpen:f,target:document.body,children:[r.jsx(wn.teamComponents.Filter.Selected,{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:n}),r.jsx(wn.teamComponents.Filter.Content,{columns:2,CONSTANTS:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:n,PLP_FILTERS_EMPTY:s,PLP_SIZE_ORDER:a}})]})},md=()=>typeof document>"u"?null:r.jsx(yy,{});md.displayName="Filters";const Xs=({total:e=0})=>{const{SEARCH_TOTAL_PORTAL_ID:t}=Me();if(typeof window>"u")return null;const n=document.getElementById(t);return n?fs.createPortal(r.jsxs("span",{children:["[",e,"] produto",e>1?"s":""]}),n):null};Xs.displayName="PDC.Grid.NavigationTotal";const xy=({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])},vy=()=>{const{isMobile:e}=re(),{isLoading:t,products:n,total:s}=rn(),o=Me();return xy({productCount:n.length,PLP_GRID_SCROLL_BACK:o.PLP_GRID_SCROLL_BACK}),r.jsxs(r.Fragment,{children:[r.jsx(nt.Products,{isMobile:e??!1,items:n,...o}),!n.length&&!t&&r.jsx(nt.Empty,{ICONS:o.ICONS,PLP_NOT_RESULT:o.PLP_NOT_RESULT}),r.jsx(Xs,{total:s})]})},pd=({infinite:e=!1})=>r.jsx("div",{className:Xe["pdc--grid"],children:r.jsx("div",{className:Xe["pdc--grid--content"],children:e?r.jsx(nt.InfiniteScroller,{}):r.jsx(vy,{})})});pd.displayName="Grid";const wt=e=>({centro:"center",esquerda:"start",direita:"end"})[e],fd=({children:e,contentState:t,entityKey:n})=>{const{url:s}=t.getEntity(n).getData();return s?r.jsx(Fe,{href:s,children:e}):e},by=(e,t,n)=>{e.findEntityRanges(s=>{const o=s.getEntity();return o===null?!1:n.getEntity(o).getType()==="LINK"},t)},kn=e=>{const t=new Je.CompositeDecorator([{strategy:by,component:fd}]),n=Je.convertFromRaw(e);return Je.EditorState.createWithContent(n,t)},jy=e=>Je.convertFromRaw(e),Ln=Je.DefaultDraftBlockRenderMap.set("unstyled",{element:"div",aliasedElements:["div"]}),da="superior-direita",En="dentro-inferior-centro",Cy="inferior-direita",qr="dentro-inferior-esquerda",hd=e=>({position:e===En||e===qr?"absolute":"default",shouldRender:[da,En,qr].includes(e)?"top":"bottom",alignItems:[En].includes(e)?"center":[da,Cy].includes(e)?"flex-end":"flex-start",left:e===qr?"16px":e===En?"45%":"unset"}),Sy=Object.freeze(Object.defineProperty({__proto__:null,CREATE_CONTENT:kn,EXTENDED_BLOCK_RENDER_MAP:Ln,GET_CONTENT_STATE:jy,controllersPositionsAdapter:hd},Symbol.toStringTag,{value:"Module"})),Ey=({expanded:e,content:t})=>r.jsxs("details",{open:e,children:[t.textStructureReduced?r.jsx("summary",{onClick:n=>n.preventDefault(),children:r.jsx(Je.Editor,{editorKey:"draft-editor-1",blockRenderMap:Ln,editorState:t!=null&&t.textStructureReduced?kn(JSON.parse(t.textStructureReduced)):Je.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):r.jsx(r.Fragment,{}),t.showTextStructureExpander&&t.textStructure?r.jsx(r.Fragment,{children:r.jsx(Je.Editor,{editorKey:"draft-editor-1",blockRenderMap:Ln,editorState:t.textStructure?kn(JSON.parse(t.textStructure)):Je.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):r.jsx(r.Fragment,{})]}),Py="_textContentWrapper_176ht_5",Ny="_textContentSection_176ht_13",cs={"link-modifier":"_link-modifier_176ht_1",textContentWrapper:Py,textContentSection:Ny},_d=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:n})=>{var a;const[s,o]=g.useState(!1);return r.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:wt(e.textStructureAlignment),alignItems:wt(e.textStructureAlignment)},columnWrapper:{alignContent:wt(e.textStructureAlignment),alignItems:wt(e.textStructureAlignment)}},adornment:{bottom:e.showTextStructureExpander&&e.textStructure?r.jsx(d.Button,{variant:"tertiary",adornment:{end:r.jsx(d.Icon,{name:s?`${t.arrow_up}`:`${t.arrow_down}`})},onClick:()=>o(i=>!i),size:"small",children:s?(n==null?void 0:n.less)??"Ver Menos":(n==null?void 0:n.more)??"Ver Mais"}):r.jsx(r.Fragment,{})},children:r.jsxs(d.Utils.Column,{className:cs.textContentWrapper,style:{alignItems:wt(e.textStructureAlignment)},children:[r.jsx(d.TextStructure.DivWrapper,{style:{textAlign:wt(e.textStructureAlignment)},mode:e.textStructureMode??"default",children:e.textStructureReduced?r.jsx(Ey,{content:e,expanded:s}):r.jsx(r.Fragment,{})}),e.textStructureButtonLabel?r.jsx(ze,{mode:e.textStructureMode??"default",href:e.textStructureButtonHref??"#",size:e.textStructureButtonSize,className:cs["link-modifier"],adornments:(a=e.textStructureButtonIcon)!=null&&a.length&&e.enableIcon?{end:r.jsx(d.Icon,{name:e.textStructureButtonIcon})}:void 0,children:e.textStructureButtonLabel}):r.jsx(r.Fragment,{})]})})},Iy=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],ma=e=>({centro:"center",esquerda:"start",direita:"end"})[e],pa={"content-modifier":"_content-modifier_16y4u_5","banner-image-wrapper-modifier":"_banner-image-wrapper-modifier_16y4u_13"},fa=({data:e,videoUrl:t,priority:n,videoRef:s,ICONS:o,TEXTCONTENT_EXPANDED:a,TIME_ZONE:i,className:c,...l})=>{const{video:u,image:m,imageHref:f,imageOpacity:p,altImage:h,backgroundColor:_,position:y,contentAlignment:x,showTimer:b,contentOrder:C,timerMode:j,timerEnd:v,timerInit:P,textStructure:E,textStructureReduced:S}=e.banner,I=(f==null?void 0:f.trim())||(m==null?void 0:m.trim())||null,{nextimage:T}=ue();return r.jsxs(d.Banner.Container,{...l,children:[r.jsxs(d.Banner.ImageWrapper,{className:pa["banner-image-wrapper-modifier"],style:p?{background:_}:void 0,children:[u&&r.jsx(we.Video,{videoRef:s,src:t,autoPlay:n,loop:!0,playsInline:!0,muted:!0}),I&&!(u!=null&&u.length)&&r.jsx(T,{src:I,width:"1920",height:"1080",alt:h??m??"",...n?{priority:n}:{},style:p?{opacity:"0"}:void 0}),!m&&!(u!=null&&u.length)&&r.jsx("div",{style:{background:_}})]}),b||S||E?r.jsx(d.Banner.Slot,{...Iy(y??"centro"),className:d.helpers.classNameConcat(pa["content-modifier"],c),style:{textAlign:ma(x)},children:r.jsxs(d.Utils.Column,{gap:"16px",alignItems:ma(x),children:[b&&C==="timer-first"&&r.jsx(An,{mode:j??"default",size:"small",dateEnd:v?new Date(v):new Date,dateInit:P?new Date(P):new Date,TIME_ZONE:i}),r.jsx(_d,{data:e.banner,ICONS:o,TEXTCONTENT_EXPANDED:a}),b&&C!=="timer-first"&&r.jsx(An,{mode:j??"default",size:"small",dateEnd:v?new Date(v):new Date,dateInit:P?new Date(P):new Date,TIME_ZONE:i})]})}):r.jsx(r.Fragment,{})]})};class Qe extends g.Component{constructor(){super(...arguments);gt(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(){return{hasError:!0,error:null}}componentDidCatch(n,s){if(process.env.NODE_ENV!=="production"){if(this.props.debugger)debugger;console.groupCollapsed("Error Boundary CMS",this.props.name),console.log("Error:",(n==null?void 0:n.message)??n),console.log("Error Info:",s),console.groupEnd()}}render(){const{hasError:n}=this.state,{children:s,fallback:o}=this.props;return n&&process.env.NODE_ENV==="production"?null:n&&o!==void 0?o:s}}const an=({data:e,className:t,priority:n,creative:s,name:o,...a})=>{const{handleSelectPromotionEvent:i,currentLocalRef:c}=ae(),{banner:{promotion_name:l},index:u,componentIndex:m}=e,f=typeof u=="number"?`:${u+1}`:"",p={creative_name:s,creative_slot:`${s}-${c.current}:${m+1}${f}`,promotion_id:e.banner.href,promotion_name:l},h=g.useRef(null),_=g.useMemo(()=>{var x;if((x=e.banner.video)!=null&&x.includes("player.vimeo")){const b=e.banner.video.split("?")[1],C=b==null?void 0:b.split("&"),j=C==null?void 0:C.filter(P=>P.includes("loc")||P.includes("signature")||P.includes("user_id")),v=j==null?void 0:j.join("&");return`${e.banner.video.split("?")[0]}?${v}`}return e.banner.video},[e]),y=()=>{var x;(x=h.current)!=null&&x.paused&&h.current.play()};return r.jsx(Qe,{name:o,children:r.jsx(Wn,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...p,index:u}}}},observerOptions:{delay:100,..._&&{threshold:.1}},..._&&{callBackWhenVisible:y},children:e.banner.href?r.jsx(Fe,{href:e.banner.href,onClick:()=>{i({updatePromotionRef:!0,promotion:p,index:u})},children:r.jsx(fa,{data:e,videoUrl:_,priority:n,videoRef:h,className:t,...a})}):r.jsx(fa,{data:e,videoUrl:_,priority:n,videoRef:h,className:t,...a})})})},Ys=e=>r.jsx(Qe,{name:e.name,children:r.jsx(an,{...e})}),gd=({columns:e,count:t,gap:n,className:s})=>{var x;const{banners:o,pages:a,products:i}=lt(),{isMobile:c}=re(),{banners:l}=Un(),{ICONS:u,PRODUCT_CARD_IMAGE_ASPECT_RATIO:m,TEXTCONTENT_EXPANDED:f,TIME_ZONE:p}=Me(),h=((x=a[a.length-1])==null?void 0:x.products.length)??t,_=i[(a.length-1)*t+h-1],y=l.filter((b,C)=>o[C]<_);return Array.isArray(y)?y.map((b,C)=>r.jsx(at.Banner,{columns:b.columns,gap:n,isMobile:c??!1,position_grid:o[C]+1,totalColumns:e,PRODUCT_CARD_IMAGE_ASPECT_RATIO:m,children:r.jsx(an,{name:"Banner Carousel",data:{banner:b,componentIndex:C},creative:"banner_grid",ICONS:u,TEXTCONTENT_EXPANDED:f,TIME_ZONE:p,className:s})},`${b.position_grid}-${C}`)):null};gd.displayName="PDC.InfiniteScroller.Banners";const yd=e=>{var s;const{pages:t}=lt(),n=t[t.length-1];return(n==null?void 0:n.page)!==((s=n==null?void 0:n.pagination)==null?void 0:s.total)&&!(n!=null&&n.loading)?r.jsx(Vn,{...e}):null};yd.displayName="PDC.InfiniteScroller.Loading";const xd=({page:e,...t})=>{const{updateParamPage:n}=lt(),{element:s}=Dn({callback:()=>n(e),options:{threshold:0}});return r.jsx("div",{...t,id:`pdc-scroll-infinite-${e.page}`,className:Xe["pdc--infinite--loader"],"data-page":e.page,ref:s})};xd.displayName="PDC.Page.Anchor";const vd=({first:e,gap:t,isMobile:n=!1,item:s,index:o,last:a=!1,order:i,page:c,showVideo:l=!1})=>{const{load:u,handleNotify:m}=lt(),{getAvailableProductTag:f}=_t(),{BUY_BUTTON_LABELS:p,MAIN_IMAGE:h,PLP_GRID_SCROLL_BACK:_,PLP_INFINITE_SCROLL:y,PLP_PRODUCT_SIMILAR_DELAY:x,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:b,PLP_SIZE_ORDER:C,PRODUCT_CARD_IMAGE_ASPECT_RATIO:j,PRODUCT_CARD_TEXTS:v,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:P,PRODUCT_IMAGE_DIMENSIONS:E,SECOND_IMAGE:S,StoreConfig_MainSellerId:I,TEXTURE_IMAGE:T,Z_INDEX_WAR:A,ICONS:k,storeId:O}=Me(),Y=f(s==null?void 0:s.cluster.highlights);return r.jsx(at.Card,{className:s.id==="skeleton"?Xe["pdc--infinite--card--disabled"]:"",gap:t,isMobile:n??!1,item:s,order:i,tag:Y,index:o,setSkuSelected:m,showVideo:l,CONSTANTS:{BUY_BUTTON_LABELS:p,MAIN_IMAGE:h,PLP_GRID_SCROLL_BACK:_,PLP_INFINITE_SCROLL:y,PLP_PRODUCT_SIMILAR_DELAY:x,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:b,PLP_SIZE_ORDER:C,PRODUCT_CARD_IMAGE_ASPECT_RATIO:j,PRODUCT_CARD_TEXTS:v,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:P,PRODUCT_IMAGE_DIMENSIONS:E,SECOND_IMAGE:S,StoreConfig_MainSellerId:I,TEXTURE_IMAGE:T,Z_INDEX_WAR:A,ICONS:k,storeId:O},children:c&&u&&r.jsxs(r.Fragment,{children:[e&&r.jsx(In.Anchor,{page:c}),!c.loading&&r.jsx(In.Loader,{page:c}),a&&c.loading&&r.jsx(In.NextPage,{page:c})]})})};vd.displayName="PDC.Page.Card";const bd=({type:e="default",page:t,...n})=>{const{load:s,updatePage:o}=lt(),{element:a}=Dn({callback:()=>o(t),onEnterViewportOnce:!0,options:{threshold:1}});return s===!0&&r.jsx("div",{...n,className:Xe[`pdc--infinite--loader${e==="page"?"--page":""}`],ref:a})};bd.displayName="PDC.Page.Loader";const jd=({page:e,...t})=>{var o;const{addNewPage:n}=lt(),{element:s}=Dn({callback:()=>{n(e)},onEnterViewportOnce:!0,options:{threshold:[.5,1]}});return((o=e==null?void 0:e.pagination)==null?void 0:o.nextPage)===!0&&e.loading===!0?r.jsx("div",{...t,className:Xe["pdc--infinite--next-page--card"],"data-next-page":!0,ref:s}):null};jd.displayName="PDC.Page.NextPage";const In={Anchor:xd,Card:vd,Loader:bd,NextPage:jd},Cd=({count:e,gap:t,page:n})=>{const{isMobile:s}=re(),{columns:o,products:a}=lt(),i=(n.page-1)*e,c=zi(n.products,o);return Array.isArray(n.products)?n.products.map((l,u)=>r.jsx(In.Card,{first:u===0,last:u===n.products.length-1,gap:t,index:u,item:l.node,isMobile:s??!1,order:a[i+u]+1,page:u===0||u===n.products.length-1?n:void 0,showVideo:!!c.indexOf(u)},a[i+u]+1)):null};Cd.displayName="PDC.Page";const wy=({pages:e,load:t,PLP_GRID_SCROLL_BACK:n})=>{const s=g.useRef(!1);g.useEffect(()=>{const o=e[e.length-1];if(t&&o&&!s.current){const a=sessionStorage.getItem(n.refer),i=sessionStorage.getItem(n.order),c=document.querySelector(a==="true"?`[data-order="${i}"]`:`#pdc-scroll-infinite-${o.page}`);c&&(s.current=!0,sessionStorage.setItem(n.refer,"false"),o.page>1&&c.scrollIntoView({behavior:"instant",block:"start"}))}if(!t&&s.current){s.current=!1;const a=document.querySelector("body > main");a&&a.scrollIntoView({behavior:"instant",block:"start"})}},[t,e])},Ry=()=>{var l,u;const{count:e}=Be(),{columns:t,gap:n,load:s,pages:o,total:a}=lt(),i=Me(),{PLP_GRID_SCROLL_BACK:c}=Me();return wy({pages:o,load:s,PLP_GRID_SCROLL_BACK:c}),r.jsxs(r.Fragment,{children:[s===!0&&((u=(l=o[0])==null?void 0:l.pagination)==null?void 0:u.count)===0&&r.jsx(nt.Empty,{ICONS:i.ICONS,PLP_NOT_RESULT:i.PLP_NOT_RESULT}),r.jsxs(at.Root,{children:[Array.isArray(o)&&o.map((m,f)=>r.jsx(Cd,{count:e,gap:n,page:m},f)),r.jsx(gd,{columns:t,count:e,gap:n})]}),r.jsx(Xs,{total:a}),r.jsx(yd,{})]})},Sd=()=>{const{banners:e}=Un();return r.jsx(ac,{banners:e,children:r.jsx(Ry,{})})};Sd.displayName="PDC.InfiniteScroller";const Ed=()=>{const{setOpenFilters:e}=Rs(),{selectedFacets:t,onToggleFacet:n,onSort:s}=Ti(),{state:o}=Be(),{Z_INDEX_WAR:a}=Me(),i=H.filterNonRootFacets(t,o==null?void 0:o.base);return r.jsx(ht.Root,{onSort:s,setOpenFilters:e,style:{zIndex:a.plp_navigation},children:r.jsx(ht.Selected,{callback:n,selected:i})})};Ed.displayName="Navigation";const ls=({currentPage:e,callback:t,type:n,...s})=>r.jsx(d.Button,{...s,iconNameStart:`arrow-${n}`,onClick:()=>{typeof t=="function"&&t(n==="left"?"prev":"")},size:"large",variant:"tertiary"});ls.displayName="Arrow";const us=({active:e,prev:t,ellipses:n,page:s,selectedPage:o})=>r.jsxs(r.Fragment,{children:[n&&t&&r.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."}),e&&r.jsx(d.Pagination.Item,{isActive:!1,index:s,variant:"tertiary",onClick:()=>{typeof o=="function"&&o(s)},children:s}),n&&!t&&r.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."})]});us.displayName="PageEllipses";const Pd=({children:e,endPage:t,page:n,total:s,selectedPage:o,ITEMS_PER_SECTION:a})=>r.jsxs(r.Fragment,{children:[r.jsx(us,{active:n>=a&&s>a,selectedPage:o,currentPage:n,prev:!1,ellipses:n>a&&s>a,page:1}),e,r.jsx(us,{active:s-n>1&&s!==t,selectedPage:o,currentPage:n,prev:!0,ellipses:t<s-1,page:s})]});Pd.displayName="Pagination.Layout";const Ty=(e,t,n)=>{const s=new URLSearchParams(n);return s.set(e,t),s.toString()},Ay=(e,t)=>{const n=[];for(let s=e;s<=t;s++)n.push(s);return n},ky=({currentPage:e,total:t,maxVisiblePages:n,SEARCH_PAGE_ITEM_THRESHOLD:s})=>{const o=t>=s?s:t,a=Math.max(1,e===o?o-n+1:e-Math.floor(n/2)),i=Math.min(o,a+n-1);return{startPage:a,endPage:i,totalPages:o}},Nd=({currentPage:e,pages:t,searchParams:n,VARIANT_PAGINATION:s})=>{const{router:o,pathname:a}=ue();return Array.isArray(t)?t.map(i=>r.jsx(d.Pagination.Item,{isActive:e===i,index:i,variant:e===i?s.active:s.default,onClick:()=>o.push(`${a}?${Ty("page",i.toString(),n)}`),children:i},i)):null};Nd.displayName="Pages";const Qs=({query:e,type:t="default",searchParams:n,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:a,SEARCH_PAGE_ITEM_THRESHOLD:i,VARIANT_PAGINATION:c,...l})=>{const{router:u,pathname:m}=ue(),{state:{page:f=1}}=Be(),{pagination:{total:p}}=rn(),{endPage:h,totalPages:_,startPage:y}=ky({currentPage:f,total:p,maxVisiblePages:o,SEARCH_PAGE_ITEM_THRESHOLD:i}),x=C=>{const j=C.toString(),v=new URLSearchParams(n.toString());t==="default"&&v.set("page",j),t==="search"&&(v.set("query",e??""),v.set("count",a.toString()),v.set("page",j),s&&v.set("sort",s.replace("_",":")));const E=`${t==="search"?"/search":m}?${v.toString()}`;u.push(E)},b=C=>{x(C==="prev"?f-1:f+1)};return p?r.jsx("div",{...l,className:Xe["pdc--pagination"],children:r.jsx(d.Pagination.Wrapper,{adornment:{start:r.jsx(ls,{callback:b,currentPage:f,disabled:f<2,type:"left"}),end:r.jsx(ls,{callback:b,currentPage:f,disabled:f>=_,type:"right"})},children:r.jsx(Pd,{endPage:h,page:f,selectedPage:x,total:p,ITEMS_PER_SECTION:o,children:r.jsx(Nd,{currentPage:f,pages:Ay(y,h),searchParams:n,VARIANT_PAGINATION:c})})})}):r.jsx(r.Fragment,{})};Qs.displayName="Pagination";const Id=({gap:e,isMobile:t,className:n})=>{const{count:s,state:o}=Be(),{banners:a}=Un(),{ICONS:i,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u}=Me(),m=a.filter(f=>Ui(f.position_grid,o.page,s));return Array.isArray(m)?m.map((f,p)=>r.jsx(at.Banner,{columns:f.columns,gap:e,isMobile:t,position_grid:f.position_grid,totalColumns:t?2:4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,children:r.jsx(an,{name:"Banner Carousel",data:{banner:f,componentIndex:p},creative:"banner_grid",ICONS:i,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u,className:n})},f.position_grid)):null};Id.displayName="PDC.Grid.Banners";const Zs=({isMobile:e=!1,items:t,BUY_BUTTON_LABELS:n,ICONS:s,MAIN_IMAGE:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PLP_GRID_SCROLL_BACK:c,PLP_INFINITE_SCROLL:l,PLP_PRODUCT_SIMILAR_DELAY:u,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:m,PLP_SIZE_ORDER:f,PRODUCT_CARD_IMAGE_ASPECT_RATIO:p,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:y,SECOND_IMAGE:x,StoreConfig_MainSellerId:b,TEXTURE_IMAGE:C,Z_INDEX_WAR:j,storeId:v})=>{const{getAvailableProductTag:P}=_t(),{count:E,state:S}=Be(),[I,T]=g.useState(!1),[A,k]=g.useState(null),[O,Y]=g.useState([]),D=g.useCallback((G,$)=>{const J=$?Fn([$]):null;Y(G),k(J!=null&&J.length?J[0]:null),T(!0)},[]),U=e?8:16,B=(S.page-1)*E,Q=at.helpers.createGridPosAndVideo(t,[],e?2:4,S.page);return r.jsxs(r.Fragment,{children:[r.jsxs(at.Root,{children:[Array.isArray(t)&&t.map((G,$)=>{var se,ce;const J=P(G.node.cluster.highlights);return r.jsx(at.Card,{gap:U,isMobile:e??!1,item:G.node,order:B+(((se=Q[$])==null?void 0:se.position)??0),tag:J,index:$,setSkuSelected:D,showVideo:(ce=Q[$])==null?void 0:ce.canPlayVideo,CONSTANTS:{BUY_BUTTON_LABELS:n,MAIN_IMAGE:o,PLP_GRID_SCROLL_BACK:c,PLP_INFINITE_SCROLL:l,PLP_PRODUCT_SIMILAR_DELAY:u,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:m,PLP_SIZE_ORDER:f,PRODUCT_CARD_IMAGE_ASPECT_RATIO:p,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:y,SECOND_IMAGE:x,StoreConfig_MainSellerId:b,TEXTURE_IMAGE:C,Z_INDEX_WAR:j,ICONS:s,storeId:v}},G.node.sku)}),t.length>0&&r.jsx(Id,{gap:U,isMobile:e??!1})]}),r.jsx(Bn,{open:I,sku:A,skus:O,setSku:k,setVisible:T,ICONS:s,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:h,Z_INDEX_WAR:j})]})};Zs.displayName="PDC.Products";const nt={Empty:Us,Filters:md,Grid:pd,InfiniteScroller:Sd,Spinner:Vn,Navigation:Ed,Notification:Bn,Pagination:Qs,Products:Zs},wd=({className:e,...t})=>{const{searchParams:n,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:a,PLP_INFINITE_SCROLL:i,SEARCH_PAGE_ITEM_THRESHOLD:c,VARIANT_PAGINATION:l}=t;return r.jsx(ap,{...t,children:r.jsxs("div",{className:d.helpers.classNameConcat(Xe.pdc,e),children:[r.jsxs(Ri,{forceUpdate:!0,children:[r.jsx(nt.Navigation,{}),r.jsx(nt.Filters,{})]}),i===!0?r.jsx(nt.Grid,{infinite:!0}):r.jsxs(ws,{forceUpdate:!0,query:n.get("query")??void 0,children:[r.jsx(nt.Grid,{}),r.jsx(nt.Pagination,{searchParams:n,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:a,SEARCH_PAGE_ITEM_THRESHOLD:c,VARIANT_PAGINATION:l})]})]})})};wd.displayName="Templates.PDC";const Rd=g.createContext({}),Ly=({children:e,...t})=>r.jsx(Rd.Provider,{value:t,children:e}),Jn=()=>{const e=g.useContext(Rd);if(e===void 0)throw new Error("useSearchConstants must be used within a SearchConstantsProvider");return e},Oy="_grid_e75z7_21",Dy="_navigation_e75z7_44",My="_spinner_e75z7_70",Fy="_sort_e75z7_76",ft={"rearch-result--empty":"_rearch-result--empty_e75z7_1",grid:Oy,"grid-header":"_grid-header_e75z7_37",navigation:Dy,"result-disclaimer":"_result-disclaimer_e75z7_51",spinner:My,sort:Fy,"search-result":"_search-result_e75z7_91"},Td=({term:e})=>{const{router:t}=ue(),{SEARCH_RESULT:n,ICONS:s}=Jn(),o=()=>{t.push(n.EMPTY.ALL_TERMS)};return r.jsxs("div",{className:ft["rearch-result--empty"],children:[r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("div",{className:H.responsive["responsive-desktop-flex"],children:r.jsx("h2",{className:"typography-style-heading-sm",children:n.EMPTY.NOT_FOUND})}),r.jsx("div",{className:H.responsive["responsive-mobile-flex"],children:r.jsx("h2",{className:"typography-style-body-md",children:n.EMPTY.NOT_FOUND})}),r.jsxs("p",{children:[n.EMPTY.NOT_FOUND_P," ",`"${e}"`]})]}),r.jsx(d.Button,{onClick:()=>o(),variant:"tertiary",size:"medium",adornment:{end:r.jsx(d.Icon,{name:s.arrow_right,size:"medium"})},children:n.EMPTY.ALL_TERMS_LABEL})]})};Td.displayName="RearchResult.Empty";const zy=e=>r.jsxs(r.Fragment,{children:[r.jsx("div",{className:H.responsive["responsive-desktop-flex"],children:r.jsx("h2",{className:"typography-style-heading-sm",children:e.SEARCH.SEARCHING})}),r.jsx("div",{className:H.responsive["responsive-mobile-flex"],children:r.jsx("h2",{className:"typography-style-body-md",children:e.SEARCH.SEARCHING})}),r.jsx(d.Spinner,{className:ft.spinner})]}),By=(e,t,n)=>r.jsxs(r.Fragment,{children:[r.jsx("div",{className:H.responsive["responsive-desktop-flex"],children:r.jsx("h2",{className:"typography-style-heading-sm",children:t.SEARCH.SEARCHED})}),r.jsx("div",{className:H.responsive["responsive-mobile-flex"],children:r.jsx("h2",{className:"typography-style-body-md",children:t.SEARCH.SEARCHED})}),r.jsxs("p",{children:[t.SEARCH.SEARCHED_P_START," ",e," ",t.SEARCH.SEARCHED_P_END," ",`"${n}"`]})]}),Ad=({isLoading:e,quantity:t,term:n})=>{const{SEARCH_RESULT:s}=Jn();return r.jsx(d.TextStructure.DivWrapper,{children:e?zy(s):By(t,s,n)})};Ad.displayName="Search.Loading";const Uy=({term:e})=>{const[t,n]=g.useState(!1),{router:s}=ue(),{searchParams:o}=Be(),{ITEMS_DEFAULT_SORT:a,ITEMS_PER_PAGE:i,ICONS:c}=Jn(),l=u=>{H.navigateToSearchPage(s,e,i,1,u??a)};return r.jsx("div",{className:ft.sort,children:r.jsx(Xn,{handleSelectValue:u=>l(u??"release_desc"),sortListOpen:t,setSortListOpen:n,searchParams:o,ICONS:c})})},$y=({query:e})=>{const{isLoading:t,products:n,pagination:s}=rn();return r.jsxs("div",{className:ft["grid-header"],children:[r.jsxs("div",{className:ft.navigation,children:[!t&&(n!=null&&n.length)?r.jsx(Uy,{term:e}):null,r.jsx(d.Utils.Divider,{})]}),!t&&(n!=null&&n.length)?r.jsx("div",{className:ft["result-disclaimer"],children:r.jsx(Ad,{term:e,isLoading:t,quantity:s.count})}):null]})},kd=({isMobile:e=!1,query:t})=>{const{isLoading:n,products:s,pagination:o}=rn(),{searchParams:a}=Be(),i=Jn(),{sendDataLayerEvent:c}=ae(),l=g.useRef({query:t,sended:!1}),u=g.useMemo(()=>!n&&s.length>0&&o.count>0,[n,s.length,o.count]);return g.useEffect(()=>{if(!n){if(l.current.query!==t){l.current.sended=!1,l.current.query=t;return}l.current.sended||(c({functionKey:"readyEvents",data:{event:"view_search_results",readyData:{search_term:t,search_found:(s==null?void 0:s.length)>0}}}),l.current.sended=!0)}},[t,s,n,c]),r.jsxs("div",{className:ft.grid,children:[u?r.jsx($y,{query:t}):r.jsx(r.Fragment,{}),!n&&(s!=null&&s.length)?r.jsx(Zs,{isMobile:e??!1,items:s,...i}):r.jsx(r.Fragment,{}),(s==null?void 0:s.length)===0&&!n?r.jsx(Td,{term:t}):null,u&&r.jsx(Qs,{searchParams:a,...i})]})};kd.displayName="SearchResultContent";const Hy=({className:e})=>{const{state:t}=Be(),{isMobile:n}=re();return r.jsx(ws,{forceUpdate:!1,query:t.term??"",children:r.jsx("div",{className:d.helpers.classNameConcat(ft["search-result"],e),children:r.jsx(kd,{currentPage:t.page,isMobile:n??!1,query:t.term??""})})})},Ld=({className:e,searchParams:t,CONSTANTS:n})=>{const s=new URLSearchParams(t??""),o=String((s==null?void 0:s.get("query"))??""),a=Number((s==null?void 0:s.get("count"))??0),i=Number((s==null?void 0:s.get("page"))??0),c=String((s==null?void 0:s.get("sort"))??"");return r.jsx(Ly,{...n,children:r.jsx(Is,{sort:c,state:{sort:c,base:"",facets:[],term:o,page:i,count:a},count:a,searchParams:s,ITEMS_PER_PAGE:n.ITEMS_PER_PAGE,children:r.jsx(Hy,{className:e})})})};Ld.displayName="Search";const qy=({page:e,data:t})=>{const{pathname:n}=ue(),s=g.useRef(null),{sendDataLayerEvent:o,currentLocalRef:a,itemListRef:i,promotionEventRef:c}=ae();return g.useEffect(()=>{const l=Hi("login_event")||"{}",u=JSON.parse(l);if(u.name||u.method){const m=new Date(0);o({functionKey:"readyEvents",data:{event:u.name,readyData:{method:u.method}}}),As("login_event","",{expires:m})}},[]),g.useEffect(()=>{if(s.current===n)return;s.current=n;let l={};switch(e){case"PDP":{const m=t,f={};if(!m){l={page_category:"pdp"};break}m.items.forEach(({itemId:p,sellers:h})=>f[p]=h[0].commertialOffer.AvailableQuantity),l={page_category:"pdp",seller_ids:m.items.map(({sellers:p})=>p[0].sellerId).join(),skuStocks:f,product_reference_id:m.productReference};break}case"PDC":{const{page_category:m,page_departament:f,id:p,name:h}=wa(),_=h,y=p;l={page_category:"lista_produtos",...f&&{page_departament:f}},i.current={item_list_name:n==="/search"?"busca":_??void 0,item_list_id:n==="/search"?void 0:y??void 0},f&&o({functionKey:"readyEvents",data:{event:"view_category",readyData:{page_category:m,page_departament:f}}});break}default:l={page_category:e},c.current={},i.current={};break}const u={region:e,...l};a.current=e,o({functionKey:"readyEvents",data:{readyData:{vtex_version:"fast",...u}},timeout:0})},[n]),null};var ds={exports:{}},Pn={exports:{}},ha;function Vy(){return ha||(ha=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(l,u){for(var m in u)Object.defineProperty(l,m,{enumerable:!0,get:u[m]})}n(t,{DOMAttributeNames:function(){return s},default:function(){return c},isEqualNode:function(){return a}});const s={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function o(l){let{type:u,props:m}=l;const f=document.createElement(u);for(const _ in m){if(!m.hasOwnProperty(_)||_==="children"||_==="dangerouslySetInnerHTML"||m[_]===void 0)continue;const y=s[_]||_.toLowerCase();u==="script"&&(y==="async"||y==="defer"||y==="noModule")?f[y]=!!m[_]:f.setAttribute(y,m[_])}const{children:p,dangerouslySetInnerHTML:h}=m;return h?f.innerHTML=h.__html||"":p&&(f.textContent=typeof p=="string"?p:Array.isArray(p)?p.join(""):""),f}function a(l,u){if(l instanceof HTMLElement&&u instanceof HTMLElement){const m=u.getAttribute("nonce");if(m&&!l.getAttribute("nonce")){const f=u.cloneNode(!0);return f.setAttribute("nonce",""),f.nonce=m,m===l.nonce&&l.isEqualNode(f)}}return l.isEqualNode(u)}let i;process.env.__NEXT_STRICT_NEXT_HEAD?i=(l,u)=>{const m=document.querySelector("head");if(!m)return;const f=m.querySelectorAll('meta[name="next-head"]')||[],p=[];if(l==="meta"){const y=m.querySelector("meta[charset]");y&&p.push(y)}for(let y=0;y<f.length;y++){var h;const b=f[y].nextSibling;(b==null||(h=b.tagName)==null?void 0:h.toLowerCase())===l&&p.push(b)}const _=u.map(o).filter(y=>{for(let x=0,b=p.length;x<b;x++){const C=p[x];if(a(C,y))return p.splice(x,1),!1}return!0});p.forEach(y=>{var x;const b=y.previousSibling;if(b&&b.getAttribute("name")==="next-head"){var C;(C=y.parentNode)==null||C.removeChild(b)}(x=y.parentNode)==null||x.removeChild(y)}),_.forEach(y=>{var x;const b=document.createElement("meta");b.name="next-head",b.content="1",((x=y.tagName)==null?void 0:x.toLowerCase())==="meta"&&y.getAttribute("charset")||m.appendChild(b),m.appendChild(y)})}:i=(l,u)=>{const m=document.getElementsByTagName("head")[0],f=m.querySelector("meta[name=next-head-count]");if(process.env.NODE_ENV!=="production"&&!f){console.error("Warning: next-head-count is missing. https://nextjs.org/docs/messages/next-head-count-missing");return}const p=Number(f.content),h=[];for(let x=0,b=f.previousElementSibling;x<p;x++,b=(b==null?void 0:b.previousElementSibling)||null){var _;(b==null||(_=b.tagName)==null?void 0:_.toLowerCase())===l&&h.push(b)}const y=u.map(o).filter(x=>{for(let b=0,C=h.length;b<C;b++){const j=h[b];if(a(j,x))return h.splice(b,1),!1}return!0});h.forEach(x=>{var b;return(b=x.parentNode)==null?void 0:b.removeChild(x)}),y.forEach(x=>m.insertBefore(x,f)),f.content=(p-h.length+y.length).toString()};function c(){return{mountedInstances:new Set,updateHead:l=>{const u={};l.forEach(p=>{if(p.type==="link"&&p.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+p.props["data-href"]+'"]'))return;p.props.href=p.props["data-href"],p.props["data-href"]=void 0}const h=u[p.type]||[];h.push(p),u[p.type]=h});const m=u.title?u.title[0]:null;let f="";if(m){const{children:p}=m.props;f=typeof p=="string"?p:Array.isArray(p)?p.join(""):""}f!==document.title&&(document.title=f),["meta","base","link","style","script"].forEach(p=>{i(p,u[p]||[])})}}}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Pn,Pn.exports)),Pn.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function n(E,S){for(var I in S)Object.defineProperty(E,I,{enumerable:!0,get:S[I]})}n(t,{default:function(){return P},handleClientScriptLoad:function(){return x},initScriptLoader:function(){return j}});const s=Le,o=Ft,a=r,i=s._(fs),c=o._(g),l=Wu(),u=Vy(),m=qc(),f=new Map,p=new Set,h=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],_=E=>{if(i.default.preinit){E.forEach(S=>{i.default.preinit(S,{as:"style"})});return}if(typeof window<"u"){let S=document.head;E.forEach(I=>{let T=document.createElement("link");T.type="text/css",T.rel="stylesheet",T.href=I,S.appendChild(T)})}},y=E=>{const{src:S,id:I,onLoad:T=()=>{},onReady:A=null,dangerouslySetInnerHTML:k,children:O="",strategy:Y="afterInteractive",onError:D,stylesheets:U}=E,B=I||S;if(B&&p.has(B))return;if(f.has(S)){p.add(B),f.get(S).then(T,D);return}const Q=()=>{A&&A(),p.add(B)},G=document.createElement("script"),$=new Promise((J,se)=>{G.addEventListener("load",function(ce){J(),T&&T.call(this,ce),Q()}),G.addEventListener("error",function(ce){se(ce)})}).catch(function(J){D&&D(J)});k?(G.innerHTML=k.__html||"",Q()):O?(G.textContent=typeof O=="string"?O:Array.isArray(O)?O.join(""):"",Q()):S&&(G.src=S,f.set(S,$));for(const[J,se]of Object.entries(E)){if(se===void 0||h.includes(J))continue;const ce=u.DOMAttributeNames[J]||J.toLowerCase();G.setAttribute(ce,se)}Y==="worker"&&G.setAttribute("type","text/partytown"),G.setAttribute("data-nscript",Y),U&&_(U),document.body.appendChild(G)};function x(E){const{strategy:S="afterInteractive"}=E;S==="lazyOnload"?window.addEventListener("load",()=>{(0,m.requestIdleCallback)(()=>y(E))}):y(E)}function b(E){document.readyState==="complete"?(0,m.requestIdleCallback)(()=>y(E)):window.addEventListener("load",()=>{(0,m.requestIdleCallback)(()=>y(E))})}function C(){[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(S=>{const I=S.id||S.getAttribute("src");p.add(I)})}function j(E){E.forEach(x),C()}function v(E){const{id:S,src:I="",onLoad:T=()=>{},onReady:A=null,strategy:k="afterInteractive",onError:O,stylesheets:Y,...D}=E,{updateScripts:U,scripts:B,getIsSsr:Q,appDir:G,nonce:$}=(0,c.useContext)(l.HeadManagerContext),J=(0,c.useRef)(!1);(0,c.useEffect)(()=>{const ce=S||I;J.current||(A&&ce&&p.has(ce)&&A(),J.current=!0)},[A,S,I]);const se=(0,c.useRef)(!1);if((0,c.useEffect)(()=>{se.current||(k==="afterInteractive"?y(E):k==="lazyOnload"&&b(E),se.current=!0)},[E,k]),(k==="beforeInteractive"||k==="worker")&&(U?(B[k]=(B[k]||[]).concat([{id:S,src:I,onLoad:T,onReady:A,onError:O,...D}]),U(B)):Q&&Q()?p.add(S||I):Q&&!Q()&&y(E)),G){if(Y&&Y.forEach(ce=>{i.default.preinit(ce,{as:"style"})}),k==="beforeInteractive")return I?(i.default.preload(I,D.integrity?{as:"script",integrity:D.integrity,nonce:$,crossOrigin:D.crossOrigin}:{as:"script",nonce:$,crossOrigin:D.crossOrigin}),(0,a.jsx)("script",{nonce:$,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([I,{...D,id:S}])+")"}})):(D.dangerouslySetInnerHTML&&(D.children=D.dangerouslySetInnerHTML.__html,delete D.dangerouslySetInnerHTML),(0,a.jsx)("script",{nonce:$,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...D,id:S}])+")"}}));k==="afterInteractive"&&I&&i.default.preload(I,D.integrity?{as:"script",integrity:D.integrity,nonce:$,crossOrigin:D.crossOrigin}:{as:"script",nonce:$,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)})(ds,ds.exports);var Wy=ds.exports,Gy=Wy;const Od=H.getDefaultExportFromCjs(Gy),Ky=({children:e,ONE_TRUST:t})=>r.jsxs(r.Fragment,{children:[r.jsx(Od,{src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",defer:!0,strategy:"afterInteractive","data-domain-script":t.siteId,type:"text/javascript"}),e]}),Xy=$l(()=>Promise.resolve(Ky),{ssr:!1}),Yy="_lgpd_vffd3_82",Qy="_success_vffd3_248",Zy="_error_vffd3_312",ve={"newsletter-root":"_newsletter-root_vffd3_1","has-border-top":"_has-border-top_vffd3_9","has-border-bottom":"_has-border-bottom_vffd3_12","newsletter-container":"_newsletter-container_vffd3_20","content-text":"_content-text_vffd3_35","form-wrapper":"_form-wrapper_vffd3_39","newsletter-container-banner":"_newsletter-container-banner_vffd3_64",lgpd:Yy,"textfield-structure-modifier":"_textfield-structure-modifier_vffd3_190","input-wrapper-modifier":"_input-wrapper-modifier_vffd3_196","submit-btn":"_submit-btn_vffd3_200","loading-spinner":"_loading-spinner_vffd3_211","terms-and-conditions-checkbox":"_terms-and-conditions-checkbox_vffd3_217","terms-and-conditions-unchecked":"_terms-and-conditions-unchecked_vffd3_230","terms-and-conditions-checked":"_terms-and-conditions-checked_vffd3_244",success:Qy,"text-structure-modifier":"_text-structure-modifier_vffd3_257","success-title":"_success-title_vffd3_297","close-button":"_close-button_vffd3_302",error:Zy,"newsletter-wrapper":"_newsletter-wrapper_vffd3_332","banner-container":"_banner-container_vffd3_345","newsletter-provider-wrapper":"_newsletter-provider-wrapper_vffd3_358","newsletter-root-banner":"_newsletter-root-banner_vffd3_371","banner-background":"_banner-background_vffd3_392","newsletter-provider-wrapper-background":"_newsletter-provider-wrapper-background_vffd3_401"},Dd=({invalid_message:e,master_data_field:t,placeholder:n,required:s=!1,CONSTANTS:o})=>{const{isMobile:a}=re(),{inputsStatus:i,setInputsStatus:c,setFormStatus:l,variant:u}=Os();return r.jsx(d.TextField.Structure,{className:`${ve["textfield-structure-modifier"]} ${u}`,input:r.jsx(d.TextField.Input,{mode:"simple",label:n,sizeVariant:a?o.NEWSLETTER_CONFIGS.interactionSizeMob:o.NEWSLETTER_CONFIGS.interactionSizeDesk,name:t,className:`${ve["input-wrapper-modifier"]} ${u}`,feedback:i[t]==="required"?"error":i[t],onChange:()=>{i[t]!=="none"&&(c(m=>({...m,[t]:"none"})),l("idle"))},required:s}),supportText:i[t]==="error"||i[t]==="required"?r.jsx("div",{className:u==="horizontal"?ve["support-text-modifier"]:"",children:r.jsx(d.TextField.SupportText,{text:i[t]==="error"?e??o.NEWSLETTER_CONFIGS.messages.invalid_generic:o.NEWSLETTER_CONFIGS.messages.required_field,feedback:"error"})}):null})};Dd.displayName="Newsletter.Input";const Md=({formStatus:e,fields:t,CONSTANTS:n})=>r.jsxs(r.Fragment,{children:[Array.isArray(t)&&t.map((s,o)=>r.jsx(Dd,{invalid_message:s.invalid_message,master_data_field:s.master_data_field,placeholder:s.placeholder,required:s.required,type:s.type,CONSTANTS:n},`nt-field-${s.master_data_field}-${o}`)),e==="error"&&r.jsx("div",{className:ve.error,children:r.jsx("p",{children:n.NEWSLETTER_CONFIGS.form.status.error})})]});Md.displayName="Newsletter.FormFields";const Fd=({formStatus:e,CONSTANTS:t,...n})=>{const{isMobile:s}=re();return r.jsxs(d.Button,{...n,className:ve["submit-btn"],disabled:e==="success",size:s?"medium":"large",children:[r.jsx("span",{"data-loading":e==="loading","data-label":!0,children:t.NEWSLETTER_CONFIGS.submitLabel}),t.NEWSLETTER_CONFIGS.hasLoadingState&&e==="loading"&&r.jsx(d.Spinner,{className:ve["loading-spinner"],size:"small"})]})};Fd.displayName="Newsletter.SubmitButton";const zd=({checkboxRef:e,formStatus:t,setFormStatus:n,CONSTANTS:s})=>{const o=a=>{a.target.checked?(e.current=!0,t==="unchecked"&&n("idle")):e.current=!1};return r.jsxs(r.Fragment,{children:[r.jsx(d.Checkbox,{adornment:r.jsx(d.Icon,{name:s.ICONS.check,size:"x-small"}),defaultChecked:e.current,disabled:t==="success",name:"terms-and-conditions",label:s.NEWSLETTER_CONFIGS.messages.accept_terms_and_conditions,onChange:o,sizeVariant:"small",className:ve["terms-and-conditions-checkbox"]}),t==="unchecked"&&r.jsx("div",{className:ve["terms-and-conditions-unchecked"],children:r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:s.ICONS.alert_circle,size:"small"})},children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("p",{children:s.NEWSLETTER_CONFIGS.messages.terms_and_conditions_not_accepted})})})})]})};zd.displayName="Newsletter.Terms";const Bd=({title:e,description:t,CONSTANTS:n})=>r.jsx("div",{className:ve.success,children:r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{className:ve["text-structure-modifier"],children:[r.jsxs("div",{className:ve["success-title"],children:[r.jsx(d.Icon,{name:n.ICONS.check_circle,size:"medium"}),r.jsx("h3",{children:e})]}),r.jsx("p",{children:t})]})})});Bd.displayName="Newsletter.Success";const Ud=({formPayloadOptionals:e,masterDataEntity:t,banner:n,termsDescription:s,lgpdLinkLable:o,lgpdLink:a,variant:i,CONSTANTS:c})=>{const{checkboxRef:l,fields:u,formStatus:m,hasTermsAndConditions:f,handleClickToSubmit:p,handleSubmit:h,setFormStatus:_}=Os();return r.jsx(r.Fragment,{children:m==="success"?r.jsx(Bd,{description:c.NEWSLETTER_CONFIGS.messages.success_description,title:c.NEWSLETTER_CONFIGS.messages.success_title,CONSTANTS:c}):r.jsxs(r.Fragment,{children:[r.jsxs("form",{className:ve["form-wrapper"],onSubmit:y=>h(y,e,t),children:[r.jsx(Md,{formStatus:m,fields:u,CONSTANTS:c}),f&&r.jsx(zd,{checkboxRef:l,formStatus:m,setFormStatus:_,CONSTANTS:c}),r.jsx(Fd,{formStatus:m,type:"submit",variant:"primary",onClick:p,CONSTANTS:c})]}),(n||i==="vertical")&&r.jsxs("div",{className:ve.lgpd,children:[s&&r.jsx("p",{children:s}),o&&r.jsx(ze,{href:a,children:o})]})]})})};Ud.displayName="Newsletter.Form";const Jy=["horizontal","vertical"],Js=({className:e,description:t,formPayloadOptionals:n,fields:s,masterDataEntity:o,masterDataEmailField:a,masterDataNameField:i,banner:c,altBanner:l,bannerBackground:u,termsDescription:m,lgpdLinkLable:f,lgpdLink:p,title:h,variant:_,borderTop:y,borderBottom:x,CONSTANTS:b,...C})=>{if(!a||!i)return null;const j=d.helpers.ValidateProp({fieldTypes:Jy,property:_,fallback:"horizontal"});return r.jsxs("div",{className:c?u?ve["banner-background"]:ve["newsletter-wrapper"]:"",children:[c&&r.jsx(d.Banner.Container,{className:ve["banner-container"],children:r.jsx(d.Banner.ImageWrapper,{children:r.jsx(we.Image,{src:c,alt:l,width:"1920",height:"500"})})}),r.jsx("div",{className:c?ve["newsletter-provider-wrapper"+(u?"-background":"")]:"",children:r.jsx(hc,{fields:s,masterDataEmailField:a,masterDataNameField:i,variant:j,CONSTANTS:b,children:r.jsx("div",{...C,className:d.helpers.classNameConcat(ve["newsletter-root"+(c||j==="vertical"?"-banner":"")],[y&&ve["has-border-top"],x&&ve["has-border-bottom"],e].filter(Boolean)),"data-variant":j,children:r.jsxs("div",{className:c||j==="vertical"?ve["newsletter-container-banner"]:ve["newsletter-container"],children:[r.jsxs("div",{className:ve["content-text"],children:[r.jsx("h2",{children:h}),r.jsx("p",{children:t}),!c&&j==="horizontal"&&r.jsxs("div",{className:ve.lgpd,children:[r.jsx("p",{children:m}),f&&r.jsx(ze,{target:"_blank",href:p,children:f})]})]}),r.jsx(Ud,{formPayloadOptionals:n,masterDataEntity:o,CONSTANTS:b,banner:c,lgpdLink:p,lgpdLinkLable:f,termsDescription:m,variant:j})]})})})})]})};Js.displayName="Newsletter";const $d=({children:e,...t})=>r.jsx("div",{...t,children:e});$d.displayName="CallToAction";const ex="_wrapper_aejhu_1",tx="_body_aejhu_8",On={wrapper:ex,body:tx,"wrapper-body":"_wrapper-body_aejhu_16","accordion-modifier":"_accordion-modifier_aejhu_32"},nx=({children:e,className:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(On.wrapper,t),children:e}),rx=({data:e,ICONS:t})=>{const[n,s]=g.useState(null),o=i=>{s(c=>c===i?null:i)},{router:a}=ue();return r.jsx("div",{className:d.helpers.classNameConcat(On.body),children:Array.isArray(e)&&(e==null?void 0:e.map((i,c)=>{var f;const l=n===i.id,u=i.buttonHref&&i.buttonHref!=="#",m=i.buttonHref&&i.type==="button"&&u?{onClick:()=>{var p;if((p=i.buttonHref)!=null&&p.startsWith("/")){a.push(i.buttonHref);return}window.open(i.buttonHref,"_blank")}}:{};return r.jsx("div",{children:i.type==="button"?r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{variant:"tertiary",mode:i.buttonMode??"default",size:i.buttonSize??"medium",iconNameStart:t[i.buttonIcon]??i.buttonIcon,...m,style:{marginTop:16},children:i.buttonLabel}),r.jsx(d.Utils.Divider,{direction:"horizontal",size:"small",style:{height:16}})]}):r.jsxs(d.Accordion.Wrapper,{className:d.helpers.classNameConcat(On["accordion-modifier"]),children:[r.jsx(d.Accordion.Header,{id:`${c}-${i.title}`,closeIndicator:l?r.jsx(d.Icon,{name:t.arrow_up,size:"medium"}):void 0,openIndicator:l?void 0:r.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),title:"accordion-header",onClick:()=>o(i.id),children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h2",{className:"typography-style-body-sm",children:i.title})})})}),r.jsx(d.Accordion.Body,{title:"accordion-body",children:r.jsx(d.TextStructure.Root,{children:l&&r.jsxs(d.TextStructure.DivWrapper,{children:[i.subtitle?r.jsx("h3",{className:"typography-style-body-md",children:i.subtitle}):r.jsx(r.Fragment,{}),r.jsx("p",{className:"typography-style-caption",children:i.description}),i.buttonLabel&&i.buttonHref?r.jsx(ze,{href:i.buttonHref??"#",mode:i.buttonMode??"default",size:i.buttonSize??"medium",adornments:(f=i.buttonIcon)!=null&&f.length?{end:r.jsx(d.Icon,{name:t[i.buttonIcon]??i.buttonIcon})}:void 0,children:i.buttonLabel}):r.jsx(r.Fragment,{})]})})})]})},i.id)}))})},sx=({className:e,data:t,ICONS:n,...s})=>{const[o,a]=g.useState(!1),[i,c]=g.useState(null);g.useEffect(()=>{!o&&!i&&t&&c(t)},[o,i]);const l=g.useCallback(()=>{a(u=>!u)},[]);return i?r.jsxs(nx,{...s,className:e,children:[r.jsx("div",{className:On["wrapper-body"],hidden:!o,children:o&&r.jsx(rx,{data:i.content,ICONS:n})}),r.jsx($d,{children:r.jsx("div",{onClick:l,children:o?r.jsx(d.Button,{iconNameEnd:n.close,size:(i==null?void 0:i.helpButtonSize)??"x-large"}):r.jsx(d.Button,{iconNameStart:(i==null?void 0:i.iconLabel)??n.help,size:(i==null?void 0:i.helpButtonSize)??"x-large",children:i==null?void 0:i.label})})})]}):r.jsx(r.Fragment,{})},ox="_formContainer_zwlly_1",ax="_formFieldGroup_zwlly_6",ix="_formFieldGroupName_zwlly_10",cx="_formFieldWrapper_zwlly_20",lx="_formFieldInput_zwlly_30",ux="_success_zwlly_73",dx="_button_zwlly_110",mx="_error_zwlly_114",it={formContainer:ox,formFieldGroup:ax,formFieldGroupName:ix,formFieldWrapper:cx,formFieldInput:lx,success:ux,"text-structure-modifier":"_text-structure-modifier_zwlly_85",button:dx,error:mx},px=({group:e,children:t,className:n})=>r.jsx(r.Fragment,{children:r.jsxs("div",{className:d.helpers.classNameConcat(it.formFieldGroup,n),children:[r.jsx("h1",{className:it.formFieldGroupName,children:e.groupLabel}),t]},e.groupLabel)});async function fx(e){const t=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-1",t);return Array.from(new Uint8Array(n)).map(a=>a.toString(16).padStart(2,"0")).join("")}const hx=async e=>await fetch("/api/dito-ingest",{method:"POST",body:JSON.stringify(e)}).then(n=>n.json()),Hd=g.createContext({});function qd({children:e,groups:t,masterDataEntity:n,postFn:s,actionName:o="",originName:a="",POPUP_SUBMITTED_STORAGE:i}){const[c,l]=g.useState(!1),[u,m]=g.useState({}),[f,p]=g.useState([]),[h,_]=g.useState("idle"),[y,x]=g.useState(""),b=({target:{name:j,value:v}})=>{m({...u,[j]:v})},C=j=>{j.preventDefault(),s({body:{masterDataEntity:n,payload:u}}).then(async({Message:v})=>{if(v){const E=v.match(/'(.*?[^\\])'/g)||[];var P="-";for(const S of E){const I=S.substring(1,S.length-1),A=t.flatMap(k=>k.fields).find(({name:k})=>k===I);x(I),A&&(P=A.name)}return _("error"),p([P])}if(u.email){const E=await fx(u.email||""),S=new Date().toISOString();hx([{user_id:E,timestamp:S,type:"IDENTIFY",traits:{id:E,created_at:S,name:u.name,email:u.email,phone:u==null?void 0:u.phone}},{action:o,timestamp:S,type:"TRACK",user_id:E,context:{user_agent:navigator.userAgent},properties:{custom_data:{email:u.email,nome:u.name,origem:a,...u}}}])}return window.localStorage.setItem(i,"true"),m({}),l(!0),_("success"),p([])})};return r.jsx(Hd.Provider,{value:{formErrors:f,handleInputChange:b,submitForm:C,formData:u,status:h,fieldMessage:y,success:c,setSuccess:l},children:e})}function er(){return g.useContext(Hd)}const _x=({fields:e,className:t})=>{const{formData:n,handleInputChange:s,formErrors:o}=er();return r.jsx("div",{className:d.helpers.classNameConcat(it.formFieldWrapper,t),children:e.map(({label:a,name:i,required:c,width:l="medium"})=>r.jsx(d.TextField.Input,{label:`${a}${c?"*":""}`,title:i,value:n[i]||"",name:i,sizeVariant:"large",onChange:s,required:c,feedback:o.includes(i)?"error":"none",className:it.formFieldInput,"data-inputsize":l},i))})},gx=({FORM_CONFIGS:e,ICONS:t})=>{const{router:n}=ue();return r.jsxs("div",{className:it.success,children:[r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:t.check_circle,size:"medium"})},children:r.jsx(d.TextStructure.DivWrapper,{className:it["text-structure-modifier"],children:r.jsx("p",{children:e.successMessage})})}),r.jsx(d.Button,{size:"large",onClick:()=>n.push("/"),className:it.button,children:e.returnButton})]})},yx=({FORM_CONFIGS:e,ICONS:t})=>{const{fieldMessage:n}=er();return r.jsx("div",{className:it.error,children:r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:t.delete_circle,size:"small"})},children:r.jsx(d.TextStructure.DivWrapper,{className:it["text-structure-modifier"],children:r.jsxs("p",{children:[e.errorMessage,n]})})})})},xx=({children:e,className:t,ICONS:n,FORM_CONFIGS:s})=>{const{submitForm:o,status:a}=er();return r.jsx("form",{onSubmit:o,className:d.helpers.classNameConcat(it.formContainer,t),children:a==="success"?r.jsx(gx,{ICONS:n,FORM_CONFIGS:s}):r.jsxs(r.Fragment,{children:[e,a==="error"&&r.jsx(yx,{ICONS:n,FORM_CONFIGS:s})]})})},vx=e=>{const{children:t,className:n}=e;return r.jsx(qd,{...e,children:r.jsx(xx,{ICONS:e.ICONS,FORM_CONFIGS:e.FORM_CONFIGS,className:n,children:t})})},Dt={Root:vx,FieldGroup:px,FieldWrapper:_x},bx="_button_1e35m_39",yt={"banner-container":"_banner-container_1e35m_1","banner-background":"_banner-background_1e35m_6","form-root":"_form-root_1e35m_15",button:bx,"form-fied-wrapper":"_form-fied-wrapper_1e35m_52"};function jx({content:e,sections:t,FORM_CONFIGS:n,ICONS:s,postFn:o,POPUP_SUBMITTED_STORAGE:a}){var l;const{isMobile:i}=re(),c=((l=t.find(({name:u})=>u==="Form"))==null?void 0:l.data)||{};return r.jsx("div",{children:r.jsxs(d.Banner.Container,{className:yt["banner-container"],children:[r.jsx(d.Banner.ImageWrapper,{children:r.jsx(we.Image,{className:yt["banner-background"],src:i?e.bannerMobile:e.bannerDesk,alt:e.altBanner,width:"1920",height:"500"})}),r.jsxs(Dt.Root,{postFn:o,ICONS:s,FORM_CONFIGS:n,groups:c.groups||[],masterDataEntity:c.masterDataEntity||"",className:yt["form-root"],POPUP_SUBMITTED_STORAGE:a,children:[c.groups.map(u=>r.jsx(Dt.FieldGroup,{group:u,children:r.jsx(Dt.FieldWrapper,{fields:u.fields,className:yt["form-fied-wrapper"]})},u.groupLabel)),r.jsxs("div",{children:[r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("p",{className:"typography-style-body-xs",children:e.requiredMessage})}),r.jsx("div",{className:yt["button-wrapper"],children:r.jsx("div",{className:yt["button-frame"],children:r.jsx(d.Button,{size:"large",type:"submit",className:yt.button,children:e.buttonLabel})})})]})]})]})})}const Cx="_content_1jj9i_36",Sx="_trends_1jj9i_47",Ex="_modal_1jj9i_1",He={"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:Cx,trends:Sx,"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:Ex,"search-modal__modal":"_search-modal__modal_1jj9i_100"},Vd=g.createContext({}),Px=({children:e,term:t})=>{const[n,s]=g.useState([]),[o,a]=g.useState(!1);return g.useEffect(()=>{if(!t){s([]);return}(async()=>{a(!0);try{const c=await fetch("/api/search/suggestedTerms",{method:"POST",body:JSON.stringify({query:t,locale:"pt-BR"})}),{data:l}=await c.json();s((l==null?void 0:l.searches)||[])}catch(c){console.error("Erro ao buscar sugestões:",c)}})()},[t]),r.jsx(Vd.Provider,{value:g.useMemo(()=>({suggestedTerms:n,loading:o,setLoading:a}),[n,o]),children:e})},Nx=({children:e,...t})=>r.jsx(Px,{...t,children:e}),Ix=()=>{const e=g.useContext(Vd);if(!e)throw new Error("useSuggestedTermsContext must be used within a SuggestedTermsProvider");return e},Vr=(e,t,n=24,s=1,o="release:desc")=>{const a=`/search?query=${t??""}&count=${n}&page=${s}${o?`&sort=${o.replace("_",":")}`:""}`;e.push(a)},Wd=({placeholder:e,noResultsTitle:t,noResultsLabel:n,noResultsTermText:s,handleClose:o,setTerm:a,ICONS:i,ITEMS_DEFAULT_SORT:c,ITEMS_PER_PAGE:l,SEARCH_MODAL:u})=>{const[m,f]=g.useState(""),{suggestedTerms:p,loading:h,setLoading:_}=Ix(),{router:y}=ue(),x=g.useRef(null),b=v=>{f(v.target.value),clearTimeout(x.current),v.target.value.length>2&&(a(v.target.value),x.current=setTimeout(()=>{a(v.target.value),_(!1)},2e3))},C=v=>{v.key==="Enter"&&(m==null?void 0:m.length)>2&&(o(),Vr(y,m,l,1,c))},j=v=>{o(),Vr(y,v,l,1,c)};return g.useEffect(()=>{if(clearTimeout(x.current),m.length<=2||p.length>0){_(!1);return}return _(!0),x.current=setTimeout(()=>{Vr(y,m,l,1,c),_(!1),o()},2e3),()=>{clearTimeout(x.current)}},[m,p]),r.jsx(d.DropDown.AutoComplete,{className:He["modal-auto-complete"],onKeyDown:C,onInputChange:b,placeholder:e,stopClickPropagation:!1,adornment:{end:h?r.jsx(d.Spinner,{size:"small"}):r.jsx(d.Button,{variant:"tertiary",size:"small",iconNameStart:i.search,onClick:()=>{j(m)},disabled:!(m.length>2)})},children:(p==null?void 0:p.length)>0&&r.jsx(r.Fragment,{children:(p==null?void 0:p.length)>0&&(m==null?void 0:m.length)>2?r.jsx(d.DropDown.AutoCompleteList,{className:He["modal-auto-complete__dropdown"],seeAll:r.jsx("span",{onClick:()=>j(m),children:s+m}),children:p.map((v,P)=>r.jsx(d.DropDown.ListItemWithLink,{children:r.jsx(ze,{href:`/search?query=${v.term}&count=${l}&page=1`,size:"x-small",title:v.term,disableUnderline:!0,disablePadding:!1,onClick:E=>{E.preventDefault(),o()},children:v.term})},`key-${v.term}-${P}`))}):!h&&(m==null?void 0:m.length)>3&&(p==null?void 0:p.length)===0&&r.jsxs(d.DropDown.AutoCompleteList,{className:He["modal-search-empty"],children:[r.jsx(d.DropDown.NotResults,{description:n,title:t}),r.jsx(d.Button,{className:"all-terms",onClick:()=>{o(),y.push(u.EMPTY.ALL_TERMS)},variant:"tertiary",size:"medium",title:u.EMPTY.ALL_TERMS_LABEL,adornment:{end:r.jsx(d.Icon,{name:i.arrow_right,size:"medium"})},children:u.EMPTY.ALL_TERMS_LABEL})]})})})};Wd.displayName="SearchModal.AutoComplete";function wx({title:e,ICONS:t}){const{isMobile:n}=re();return r.jsx(d.Modal.Header,{navigation:"top",className:He["modal-header"],children:r.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!n,children:[r.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),r.jsx(d.Modal.Title,{navigation:"top",className:He["search-modal__title"],title:e}),r.jsx(d.Button,{className:He["modal-header__close-button"],"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})})}const Gd=g.createContext({searches:[],isLoading:!1,error:null});let Wr=null;const Rx=({children:e})=>{const[t,n]=g.useState([]),[s,o]=g.useState(!0),[a,i]=g.useState(null);return g.useEffect(()=>{(async()=>{try{if(o(!0),Wr){n(Wr),o(!1);return}const l=await fetch("/api/search/topSearch");if(!l.ok)throw new Error(`Erro ao buscar os dados: ${l.status}`);const m=(await l.json()).data.searches||[];Wr=m,n(m)}catch(l){i(l instanceof Error?l.message:"Erro desconhecido")}finally{o(!1)}})()},[]),r.jsx(Gd.Provider,{value:g.useMemo(()=>({searches:t,isLoading:s,error:a}),[t,s,a]),children:e})},Tx=()=>{const e=g.useContext(Gd);if(!e)throw new Error("useTopSearches must be used within a TopSearchesProvider");return e},Ax=({title:e,allTermsLabel:t,allTermsUrl:n,qtyTrends:s,handleClose:o,ICONS:a,ITEMS_PER_PAGE:i})=>{const{searches:c,isLoading:l}=Tx(),{router:u}=ue(),m=Array.isArray(c)?c:[];return r.jsx(r.Fragment,{children:!l&&m.length>0?r.jsx(d.ComponentList.Structure,{className:He.trends,title:e,children:r.jsxs("div",{className:He["trends-content"],children:[r.jsx(d.ComponentList.List,{columns:1,children:m.slice(0,s).map((f,p)=>r.jsx(d.ComponentList.ListItem,{className:He["trends-item"],children:r.jsx(ze,{href:`/search?query=${f.term}&count=${i}&page=1`,size:"x-small",adornments:{end:r.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},disableUnderline:!0,title:f.term,onClick:()=>o(),children:f.term})},`list-item-${p}`))}),r.jsx(d.Button,{className:"all-terms",variant:"tertiary",size:"x-small",underline:!1,onClick:()=>{o(),u.push(n)},adornment:{end:r.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},children:t})]})}):null})};function kx({SectionZone:e}){var s;const[t,n]=g.useState(null);return g.useEffect(()=>{(async()=>{try{const a=await fetch("/api/cms/content-type-client",{method:"POST",body:JSON.stringify({contentType:"search"})});if(!a.ok)return;const i=await a.json();n(i)}catch(a){console.error("[CMS FETCH ERROR]",a)}})()},[]),r.jsx("div",{className:He.content,children:t!==null&&r.jsx(e,{data:((s=t[0])==null?void 0:s.sections)??[],componentConfigs:{"Product Carousel":{searchModal:!0}}})})}const Kd=({className:e,trends:t,CONSTANTS:n,SectionZone:s})=>{const[o,a]=g.useState(""),{isMobile:i}=re(),c=li(),{setValue:l}=Mn(),{SEARCH_MODAL:u,ICONS:m,ITEMS_PER_PAGE:f,ITEMS_DEFAULT_SORT:p}=n;return r.jsxs(d.Modal.Root,{isMobile:i??!1,variant:i?"sideBottom":"sideRight",isOpen:c,setIsOpen:l,className:`${He.modal} ${He["search-modal__modal"]} ${e??""}`,children:[r.jsx(wx,{title:u.HEADER.TITLE,ICONS:m}),r.jsxs(d.Modal.Body,{className:He["modal-content-body"],children:[r.jsx(Nx,{term:o,children:r.jsx(Wd,{placeholder:u.AUTOCOMPLETE.PLACEHOLDER,noResultsTitle:u.EMPTY.NOT_FOUND,noResultsLabel:u.EMPTY.NOT_FOUND_P,noResultsTermUrl:u.AUTOCOMPLETE.NO_RESULTS.NO_RESULTS_TERM_URL,noResultsTermText:u.AUTOCOMPLETE.NO_RESULTS.NO_RESULTS_TERM_TEXT,handleClose:()=>l(!1),setTerm:a,ICONS:m,ITEMS_DEFAULT_SORT:p,ITEMS_PER_PAGE:f,SEARCH_MODAL:u})}),t?r.jsx(Rx,{children:r.jsx(Ax,{title:u.TRENDS.TITLE,allTermsUrl:u.TRENDS.ALL_TERMS_URL,allTermsLabel:u.TRENDS.ALL_TERMS_LABEL,qtyTrends:u.TRENDS.QTY_TERMS,handleClose:()=>l(!1),ICONS:m,ITEMS_PER_PAGE:f})}):null,r.jsx(kx,{SectionZone:s})]})]})};Kd.displayName="SearchModal";const Ke={"store--page-title":"_store--page-title_1rs1a_1","store--page-title--title":"_store--page-title--title_1rs1a_4","store--return-button":"_store--return-button_1rs1a_14","store--section":"_store--section_1rs1a_36","store--section--img":"_store--section--img_1rs1a_41","store--details":"_store--details_1rs1a_51","store--details--title":"_store--details--title_1rs1a_59","store--details--subtitle":"_store--details--subtitle_1rs1a_68","store--details--text":"_store--details--text_1rs1a_77","store--details--vendor":"_store--details--vendor_1rs1a_87","store--select":"_store--select_1rs1a_91","store--wrapper":"_store--wrapper_1rs1a_115"},Xd=({LPLOJAS_TEMPLATE_RETURN_BUTTON:e,ICONS:t,showVendor:n})=>{const{selectedCity:s,selectedStore:o}=$n();return r.jsx(d.Card,{padding:"small",shadow:!0,className:Ke["store--wrapper"],children:o?r.jsxs(r.Fragment,{children:[r.jsx(st.ReturnButton,{ICONS:t,children:e}),r.jsx(st.Details,{ICONS:t,showVendor:n,store:s==null?void 0:s.find(a=>a.nome===o)})]}):r.jsx(st.Select,{ICONS:t})})};Xd.displayName="LPStores.Content";const Gt=({title:e,text:t,type:n,...s})=>r.jsx(d.TextStructure.DivWrapper,{...s,children:n==="title"?r.jsx("h4",{className:Ke["store--details--title"],children:e}):r.jsxs(r.Fragment,{children:[r.jsx("h5",{className:Ke["store--details--subtitle"],children:e}),r.jsx("p",{className:Ke["store--details--text"],children:t})]})});Gt.displayName="LPStores.Details";const Yd=({vendor:e,ICONS:t})=>{const n=e?e.split(","):[];return r.jsxs(d.Accordion.Wrapper,{style:{width:"100%"},children:[r.jsx(d.Accordion.Header,{id:"accordion-header-vendor",closeIndicator:r.jsx(d.Icon,{name:t.arrow_up,size:"small"}),openIndicator:r.jsx(d.Icon,{name:t.arrow_down,size:"small"}),title:"Código de vendedor (A)",children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{gap:0,children:r.jsx("h3",{className:"typography-style-body-md",children:"Código de vendedor (A)"})})})}),r.jsx(d.Accordion.Body,{children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:Ke["store--details--vendor"],children:n.map((s,o)=>r.jsx("p",{className:"typography-style-body-sm",children:s.trim()},o))})})})]})};Yd.displayName="LPStores.Details";const Qd=({store:e,showVendor:t,ICONS:n})=>r.jsxs("div",{className:Ke["store--details"],children:[r.jsx(Gt,{alignItems:"left",title:String(e==null?void 0:e.nome),type:"title"}),r.jsx(Gt,{title:"Endereço",text:String(e.endereco)}),e.telefone&&r.jsx(Gt,{title:"Telefone",text:String(e.telefone)}),e.horario&&r.jsx(Gt,{title:"Horário de funcionamento",text:String(e.horario)}),t&&r.jsx(Yd,{ICONS:n,vendor:String(e.vendedoras)})]});Qd.displayName="LPStores.Details";const Zd=({ICONS:e,arrowDownIcon:t=r.jsx(d.Icon,{name:e.arrow_down,size:"small"}),arrowUpIcon:n=r.jsx(d.Icon,{name:e.arrow_up,size:"small"}),list:s,selectText:o,...a})=>r.jsx(d.DropDown.DefaultDropDown,{...a,"aria-placeholder":o,adornmentListClosed:{end:t},adornmentListOpened:{end:n},mode:"simple",placeholder:o,sizeVariant:"large",children:r.jsx(d.DropDown.DefaultDropDownList,{placeholder:o,supportText:o,maxHeight:400,children:Array.isArray(s)&&(s==null?void 0:s.map(i=>r.jsx(d.DropDown.ListItem,{value:i,children:i},i.replace(/\s/g,""))))})});Zd.displayName="LPStores.DropDown";const Jd=({children:e,ICONS:t})=>{const{clearSelectedStore:n}=$n(),s=()=>{typeof n=="function"&&n()};return r.jsxs("button",{"aria-label":String(e),className:Ke["store--return-button"],onClick:s,onKeyDown:s,children:[r.jsx(d.Icon,{name:t.arrow_left,size:"small"}),e]})};Jd.displayName="LPStores.ReturnButton";const em=({children:e,data:t})=>r.jsx(gc,{data:t,children:e});em.displayName="LPStores.Root";const tm=({children:e,imgAlt:t,imgSrcDesk:n,imgSrcMob:s})=>{const{isMobile:o}=re();return r.jsxs("section",{className:Ke["store--section"],children:[r.jsx(Zt,{src:o?s:n,alt:t,fill:!0,className:Ke["store--section--img"]}),e]})};tm.displayName="LPStores.Section";const nm=({ICONS:e})=>{const{data:t,handleSelectCity:n,selectedCity:s,handleSelectStore:o}=$n(),a=new Set(t.map(c=>c.cidade)),i=Array.from(a).filter(c=>typeof c=="string");return r.jsxs("div",{className:Ke["store--select"],children:[r.jsx(st.DropDown,{selectText:"Selecione a cidade",handleSelectedValue:n,list:i,defaultValue:s==null?void 0:s[0].cidade,ICONS:e}),r.jsx(st.DropDown,{"data-selected-city":!!s,selectText:"Selecione a loja",handleSelectedValue:o,list:s?s==null?void 0:s.map(c=>String(c.nome)):[],ICONS:e},s==null?void 0:s[0].cidade)]})};nm.displayName="LPStores.Select";const rm=({children:e})=>r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:Ke["store--page-title"],children:r.jsx("h2",{className:Ke["store--page-title--title"],children:e})})});rm.displayName="LPStores.Title";const st={Content:Xd,Details:Qd,DropDown:Zd,ReturnButton:Jd,Root:em,Section:tm,Select:nm,Title:rm},wn={teamComponents:{AddToCart:Ms,BackToTop:xf,HelpButton:sx,BuyPackage:fl,Filter:{...ct,helpers:Ru},...ig,FreightCalculation:xu,Header:yu,Link:ze,Media:we,PLPNavigation:ht,ProductCard:fe,ProductList:at,ProductVariationList:et,Sort:Xn,UserMenu:Gn,Newsletter:Js,Form:Dt},template:{minicart:De,pdc:wd,pdc_composites:nt,pdp:_y,searchResult:Ld,wishList:Jc,LPCadastro:jx,SearchModal:Kd,LPStores:st},utils:{EventCollector:qy,ExternalScripts:Xy,LinkOrNotLink:on,ObserverWrapper:Wn,SnackBarComponent:Ot,DraftJsLinkWrapper:fd}},Lx=(e,t)=>{const n=e.map(o=>`'${o.source}'`).join(`,
|
|
11
|
+
Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url`)}if("ref"in se&&(0,t.warnOnce)('Image with src "'+v+'" is using unsupported "ref" property. Consider using the "onLoad" property instead.'),!C&&!T){const K=I({config:W,src:v,width:$||400,quality:_e||75});let L;try{L=new URL(K)}catch{}(K===v||L&&L.pathname===v&&!L.search)&&(0,t.warnOnce)('Image with src "'+v+`" has a "loader" property that does not implement width. Please implement it or use the "unoptimized" property instead.
|
|
12
|
+
Read more: https://nextjs.org/docs/messages/next-image-missing-loader-width`)}Q&&(0,t.warnOnce)('Image with src "'+v+'" is using deprecated "onLoadingComplete" property. Please use the "onLoad" property instead.');for(const[K,L]of Object.entries({layout:G,objectFit:H,objectPosition:Z,lazyBoundary:re,lazyRoot:ue}))L&&(0,t.warnOnce)('Image with src "'+v+'" has legacy prop "'+K+`". Did you forget to run the codemod?
|
|
13
|
+
Read more: https://nextjs.org/docs/messages/next-image-upgrade-to-13`);if(typeof window<"u"&&!u&&window.PerformanceObserver){u=new PerformanceObserver(K=>{for(const B of K.getEntries()){var L;const ee=(B==null||(L=B.element)==null?void 0:L.src)||"",pe=l.get(ee);pe&&!pe.priority&&pe.placeholder==="empty"&&!pe.src.startsWith("data:")&&!pe.src.startsWith("blob:")&&(0,t.warnOnce)('Image with src "'+pe.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(K){console.error(K)}}}const Te=Object.assign(A?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:H,objectPosition:Z}:{},F?{}:{color:"transparent"},O),je=!J&&D!=="empty"?D==="blur"?'url("data:image/svg+xml;charset=utf-8,'+(0,n.getImageBlurSvg)({widthInt:$,heightInt:X,blurWidth:xe,blurHeight:Ne,blurDataURL:q||"",objectFit:Te.objectFit})+'")':'url("'+D+'")':null;let z=je?{backgroundSize:Te.objectFit||"cover",backgroundPosition:Te.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:je}:{};process.env.NODE_ENV==="development"&&z.backgroundImage&&D==="blur"&&q!=null&&q.startsWith("/")&&(z.backgroundImage='url("'+q+'")');const me=f({config:W,src:v,unoptimized:C,width:$,quality:_e,sizes:x,loader:I});if(process.env.NODE_ENV!=="production"&&typeof window<"u"){let K;try{K=new URL(me.src)}catch{K=new URL(me.src,window.location.href)}l.set(K.href,{src:v,priority:j,placeholder:D})}return{props:{...se,loading:be?"lazy":b,fetchPriority:U,width:$,height:X,decoding:Y,className:w,style:{...Te,...z},sizes:me.sizes,srcSet:me.srcSet,src:k||me.src},meta:{unoptimized:C,priority:j,placeholder:D,fill:A}}}})(Qs);var Jr={exports:{}},bn={exports:{}},Pr={},Go;function f_(){return Go||(Go=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return a}});const t=g,n=typeof window>"u",s=n?()=>{}:t.useLayoutEffect,o=n?()=>{}:t.useEffect;function a(i){const{headManager:c,reduceComponentsToState:l}=i;function u(){if(c&&c.mountedInstances){const p=t.Children.toArray(Array.from(c.mountedInstances).filter(Boolean));c.updateHead(l(p,i))}}if(n){var m;c==null||(m=c.mountedInstances)==null||m.add(i.children),u()}return s(()=>{var p;return c==null||(p=c.mountedInstances)==null||p.add(i.children),()=>{var f;c==null||(f=c.mountedInstances)==null||f.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}}(Pr)),Pr}var wr={},Ko;function p_(){return Ko||(Ko=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AmpStateContext",{enumerable:!0,get:function(){return s}});const s=Oe._(g).default.createContext({});process.env.NODE_ENV!=="production"&&(s.displayName="AmpStateContext")}(wr)),wr}var Er={},Xo;function Mu(){return Xo||(Xo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"HeadManagerContext",{enumerable:!0,get:function(){return s}});const s=Oe._(g).default.createContext({});process.env.NODE_ENV!=="production"&&(s.displayName="HeadManagerContext")}(Er)),Er}var Nr={},Yo;function h_(){return Yo||(Yo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isInAmpMode",{enumerable:!0,get:function(){return t}});function t(n){let{ampFirst:s=!1,hybrid:o=!1,hasQuery:a=!1}=n===void 0?{}:n;return s||o&&a}}(Nr)),Nr}var Qo;function __(){return Qo||(Qo=1,function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function n(j,b){for(var w in b)Object.defineProperty(j,w,{enumerable:!0,get:b[w]})}n(t,{default:function(){return C},defaultHead:function(){return f}});const s=Oe,o=bt,a=r,i=o._(g),c=s._(f_()),l=p_(),u=Mu(),m=h_(),p=Qn;function f(j){j===void 0&&(j=!1);const b=[(0,a.jsx)("meta",{charSet:"utf-8"})];return j||b.push((0,a.jsx)("meta",{name:"viewport",content:"width=device-width"})),b}function h(j,b){return typeof b=="string"||typeof b=="number"?j:b.type===i.default.Fragment?j.concat(i.default.Children.toArray(b.props.children).reduce((w,S)=>typeof S=="string"||typeof S=="number"?w:w.concat(S),[])):j.concat(b)}const _=["name","httpEquiv","charSet","itemProp"];function y(){const j=new Set,b=new Set,w=new Set,S={};return P=>{let E=!0,A=!1;if(P.key&&typeof P.key!="number"&&P.key.indexOf("$")>0){A=!0;const O=P.key.slice(P.key.indexOf("$")+1);j.has(O)?E=!1:j.add(O)}switch(P.type){case"title":case"base":b.has(P.type)?E=!1:b.add(P.type);break;case"meta":for(let O=0,k=_.length;O<k;O++){const M=_[O];if(P.props.hasOwnProperty(M))if(M==="charSet")w.has(M)?E=!1:w.add(M);else{const Q=P.props[M],D=S[M]||new Set;(M!=="name"||!A)&&D.has(Q)?E=!1:(D.add(Q),S[M]=D)}}break}return E}}function v(j,b){const{inAmpMode:w}=b;return j.reduce(h,[]).reverse().concat(f(w).reverse()).filter(y()).reverse().map((S,P)=>{const E=S.key||P;if(process.env.NODE_ENV!=="development"&&process.env.__NEXT_OPTIMIZE_FONTS&&!w&&S.type==="link"&&S.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(A=>S.props.href.startsWith(A))){const A={...S.props||{}};return A["data-href"]=A.href,A.href=void 0,A["data-optimized-fonts"]=!0,i.default.cloneElement(S,A)}if(process.env.NODE_ENV==="development")if(S.type==="script"&&S.props.type!=="application/ld+json"){const A=S.props.src?'<script> tag with src="'+S.props.src+'"':"inline <script>";(0,p.warnOnce)("Do not add <script> tags using next/head (see "+A+`). Use next/script instead.
|
|
15
|
+
See more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component`)}else S.type==="link"&&S.props.rel==="stylesheet"&&(0,p.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:E})})}function x(j){let{children:b}=j;const w=(0,i.useContext)(l.AmpStateContext),S=(0,i.useContext)(u.HeadManagerContext);return(0,a.jsx)(c.default,{reduceComponentsToState:v,headManager:S,inAmpMode:(0,m.isInAmpMode)(w),children:b})}const C=x;(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(bn,bn.exports)),bn.exports}var Ir={},Zo;function g_(){return Zo||(Zo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ImageConfigContext",{enumerable:!0,get:function(){return o}});const n=Oe._(g),s=Zn,o=n.default.createContext(s.imageConfigDefault);process.env.NODE_ENV!=="production"&&(o.displayName="ImageConfigContext")}(Ir)),Ir}var Rr={},Tr={},Ar={exports:{}},Jo;function Du(){return Jo||(Jo=1,(()=>{var e={170:(o,a,i)=>{const c=i(510),l=()=>{if(typeof navigator<"u"&&navigator.platform){const m=navigator.platform.toLowerCase();return m==="win32"||m==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};function u(m,p,f=!1){return p&&(p.windows===null||p.windows===void 0)&&(p={...p,windows:l()}),c(m,p,f)}Object.assign(u,c),o.exports=u},154:o=>{const a="\\\\/",i=`[^${a}]`,c="\\.",l="\\+",u="\\?",m="\\/",p="(?=.)",f="[^/]",h=`(?:${m}|$)`,_=`(?:^|${m})`,y=`${c}{1,2}${h}`,v=`(?!${c})`,x=`(?!${_}${y})`,C=`(?!${c}{0,1}${h})`,j=`(?!${y})`,b=`[^.${m}]`,w=`${f}*?`,P={DOT_LITERAL:c,PLUS_LITERAL:l,QMARK_LITERAL:u,SLASH_LITERAL:m,ONE_CHAR:p,QMARK:f,END_ANCHOR:h,DOTS_SLASH:y,NO_DOT:v,NO_DOTS:x,NO_DOT_SLASH:C,NO_DOTS_SLASH:j,QMARK_NO_DOT:b,STAR:w,START_ANCHOR:_,SEP:"/"},E={...P,SLASH_LITERAL:`[${a}]`,QMARK:i,STAR:`${i}*?`,DOTS_SLASH:`${c}{1,2}(?:[${a}]|$)`,NO_DOT:`(?!${c})`,NO_DOTS:`(?!(?:^|[${a}])${c}{1,2}(?:[${a}]|$))`,NO_DOT_SLASH:`(?!${c}{0,1}(?:[${a}]|$))`,NO_DOTS_SLASH:`(?!${c}{1,2}(?:[${a}]|$))`,QMARK_NO_DOT:`[^.${a}]`,START_ANCHOR:`(?:^|[${a}])`,END_ANCHOR:`(?:[${a}]|$)`,SEP:"\\"},A={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};o.exports={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:A,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(O){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${O.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(O){return O===!0?E:P}}},697:(o,a,i)=>{const c=i(154),l=i(96),{MAX_LENGTH:u,POSIX_REGEX_SOURCE:m,REGEX_NON_SPECIAL_CHARS:p,REGEX_SPECIAL_CHARS_BACKREF:f,REPLACEMENTS:h}=c,_=(x,C)=>{if(typeof C.expandRange=="function")return C.expandRange(...x,C);x.sort();const j=`[${x.join("-")}]`;try{new RegExp(j)}catch{return x.map(w=>l.escapeRegex(w)).join("..")}return j},y=(x,C)=>`Missing ${x}: "${C}" - use "\\\\${C}" to match literal characters`,v=(x,C)=>{if(typeof x!="string")throw new TypeError("Expected a string");x=h[x]||x;const j={...C},b=typeof j.maxLength=="number"?Math.min(u,j.maxLength):u;let w=x.length;if(w>b)throw new SyntaxError(`Input length: ${w}, exceeds maximum allowed length: ${b}`);const S={type:"bos",value:"",output:j.prepend||""},P=[S],E=j.capture?"":"?:",A=c.globChars(j.windows),O=c.extglobChars(A),{DOT_LITERAL:k,PLUS_LITERAL:M,SLASH_LITERAL:Q,ONE_CHAR:D,DOTS_SLASH:q,NO_DOT:U,NO_DOT_SLASH:Y,NO_DOTS_SLASH:G,QMARK:H,QMARK_NO_DOT:Z,STAR:re,START_ANCHOR:ue}=A,se=V=>`(${E}(?:(?!${ue}${V.dot?q:k}).)*?)`,ce=j.dot?"":U,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 N={input:x,index:-1,start:0,dot:j.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:P};x=l.removePrefix(x,N),w=x.length;const W=[],ae=[],he=[];let I=S,T;const Re=()=>N.index===w-1,$=N.peek=(V=1)=>x[N.index+V],X=N.advance=()=>x[++N.index]||"",xe=()=>x.slice(N.index+1),Ne=(V="",K=0)=>{N.consumed+=V,N.index+=K},be=V=>{N.output+=V.output!=null?V.output:V.value,Ne(V.value)},_e=()=>{let V=1;for(;$()==="!"&&($(2)!=="("||$(3)==="?");)X(),N.start++,V++;return V%2===0?!1:(N.negated=!0,N.start++,!0)},Te=V=>{N[V]++,he.push(V)},je=V=>{N[V]--,he.pop()},z=V=>{if(I.type==="globstar"){const K=N.braces>0&&(V.type==="comma"||V.type==="brace"),L=V.extglob===!0||W.length&&(V.type==="pipe"||V.type==="paren");V.type!=="slash"&&V.type!=="paren"&&!K&&!L&&(N.output=N.output.slice(0,-I.output.length),I.type="star",I.value="*",I.output=J,N.output+=I.output)}if(W.length&&V.type!=="paren"&&(W[W.length-1].inner+=V.value),(V.value||V.output)&&be(V),I&&I.type==="text"&&V.type==="text"){I.output=(I.output||I.value)+V.value,I.value+=V.value;return}V.prev=I,P.push(V),I=V},me=(V,K)=>{const L={...O[K],conditions:1,inner:""};L.prev=I,L.parens=N.parens,L.output=N.output;const B=(j.capture?"(":"")+L.open;Te("parens"),z({type:V,value:K,output:N.output?"":D}),z({type:"paren",extglob:!0,value:X(),output:B}),W.push(L)},ge=V=>{let K=V.close+(j.capture?")":""),L;if(V.type==="negate"){let B=J;if(V.inner&&V.inner.length>1&&V.inner.includes("/")&&(B=se(j)),(B!==J||Re()||/^\)+$/.test(xe()))&&(K=V.close=`)$))${B}`),V.inner.includes("*")&&(L=xe())&&/^\.[^\\/.]+$/.test(L)){const ee=v(L,{...C,fastpaths:!1}).output;K=V.close=`)${ee})${B})`}V.prev.type==="bos"&&(N.negatedExtglob=!0)}z({type:"paren",extglob:!0,value:T,output:K}),je("parens")};if(j.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(x)){let V=!1,K=x.replace(f,(L,B,ee,pe,we,rr)=>pe==="\\"?(V=!0,L):pe==="?"?B?B+pe+(we?H.repeat(we.length):""):rr===0?F+(we?H.repeat(we.length):""):H.repeat(ee.length):pe==="."?k.repeat(ee.length):pe==="*"?B?B+pe+(we?J:""):J:B?L:`\\${L}`);return V===!0&&(j.unescape===!0?K=K.replace(/\\/g,""):K=K.replace(/\\+/g,L=>L.length%2===0?"\\\\":L?"\\":"")),K===x&&j.contains===!0?(N.output=x,N):(N.output=l.wrapOutput(K,N,C),N)}for(;!Re();){if(T=X(),T==="\0")continue;if(T==="\\"){const L=$();if(L==="/"&&j.bash!==!0||L==="."||L===";")continue;if(!L){T+="\\",z({type:"text",value:T});continue}const B=/^\\+/.exec(xe());let ee=0;if(B&&B[0].length>2&&(ee=B[0].length,N.index+=ee,ee%2!==0&&(T+="\\")),j.unescape===!0?T=X():T+=X(),N.brackets===0){z({type:"text",value:T});continue}}if(N.brackets>0&&(T!=="]"||I.value==="["||I.value==="[^")){if(j.posix!==!1&&T===":"){const L=I.value.slice(1);if(L.includes("[")&&(I.posix=!0,L.includes(":"))){const B=I.value.lastIndexOf("["),ee=I.value.slice(0,B),pe=I.value.slice(B+2),we=m[pe];if(we){I.value=ee+we,N.backtrack=!0,X(),!S.output&&P.indexOf(I)===1&&(S.output=D);continue}}}(T==="["&&$()!==":"||T==="-"&&$()==="]")&&(T=`\\${T}`),T==="]"&&(I.value==="["||I.value==="[^")&&(T=`\\${T}`),j.posix===!0&&T==="!"&&I.value==="["&&(T="^"),I.value+=T,be({value:T});continue}if(N.quotes===1&&T!=='"'){T=l.escapeRegex(T),I.value+=T,be({value:T});continue}if(T==='"'){N.quotes=N.quotes===1?0:1,j.keepQuotes===!0&&z({type:"text",value:T});continue}if(T==="("){Te("parens"),z({type:"paren",value:T});continue}if(T===")"){if(N.parens===0&&j.strictBrackets===!0)throw new SyntaxError(y("opening","("));const L=W[W.length-1];if(L&&N.parens===L.parens+1){ge(W.pop());continue}z({type:"paren",value:T,output:N.parens?")":"\\)"}),je("parens");continue}if(T==="["){if(j.nobracket===!0||!xe().includes("]")){if(j.nobracket!==!0&&j.strictBrackets===!0)throw new SyntaxError(y("closing","]"));T=`\\${T}`}else Te("brackets");z({type:"bracket",value:T});continue}if(T==="]"){if(j.nobracket===!0||I&&I.type==="bracket"&&I.value.length===1){z({type:"text",value:T,output:`\\${T}`});continue}if(N.brackets===0){if(j.strictBrackets===!0)throw new SyntaxError(y("opening","["));z({type:"text",value:T,output:`\\${T}`});continue}je("brackets");const L=I.value.slice(1);if(I.posix!==!0&&L[0]==="^"&&!L.includes("/")&&(T=`/${T}`),I.value+=T,be({value:T}),j.literalBrackets===!1||l.hasRegexChars(L))continue;const B=l.escapeRegex(I.value);if(N.output=N.output.slice(0,-I.value.length),j.literalBrackets===!0){N.output+=B,I.value=B;continue}I.value=`(${E}${B}|${I.value})`,N.output+=I.value;continue}if(T==="{"&&j.nobrace!==!0){Te("braces");const L={type:"brace",value:T,output:"(",outputIndex:N.output.length,tokensIndex:N.tokens.length};ae.push(L),z(L);continue}if(T==="}"){const L=ae[ae.length-1];if(j.nobrace===!0||!L){z({type:"text",value:T,output:T});continue}let B=")";if(L.dots===!0){const ee=P.slice(),pe=[];for(let we=ee.length-1;we>=0&&(P.pop(),ee[we].type!=="brace");we--)ee[we].type!=="dots"&&pe.unshift(ee[we].value);B=_(pe,j),N.backtrack=!0}if(L.comma!==!0&&L.dots!==!0){const ee=N.output.slice(0,L.outputIndex),pe=N.tokens.slice(L.tokensIndex);L.value=L.output="\\{",T=B="\\}",N.output=ee;for(const we of pe)N.output+=we.output||we.value}z({type:"brace",value:T,output:B}),je("braces"),ae.pop();continue}if(T==="|"){W.length>0&&W[W.length-1].conditions++,z({type:"text",value:T});continue}if(T===","){let L=T;const B=ae[ae.length-1];B&&he[he.length-1]==="braces"&&(B.comma=!0,L="|"),z({type:"comma",value:T,output:L});continue}if(T==="/"){if(I.type==="dot"&&N.index===N.start+1){N.start=N.index+1,N.consumed="",N.output="",P.pop(),I=S;continue}z({type:"slash",value:T,output:Q});continue}if(T==="."){if(N.braces>0&&I.type==="dot"){I.value==="."&&(I.output=k);const L=ae[ae.length-1];I.type="dots",I.output+=T,I.value+=T,L.dots=!0;continue}if(N.braces+N.parens===0&&I.type!=="bos"&&I.type!=="slash"){z({type:"text",value:T,output:k});continue}z({type:"dot",value:T,output:k});continue}if(T==="?"){if(!(I&&I.value==="(")&&j.noextglob!==!0&&$()==="("&&$(2)!=="?"){me("qmark",T);continue}if(I&&I.type==="paren"){const B=$();let ee=T;(I.value==="("&&!/[!=<:]/.test(B)||B==="<"&&!/<([!=]|\w+>)/.test(xe()))&&(ee=`\\${T}`),z({type:"text",value:T,output:ee});continue}if(j.dot!==!0&&(I.type==="slash"||I.type==="bos")){z({type:"qmark",value:T,output:Z});continue}z({type:"qmark",value:T,output:H});continue}if(T==="!"){if(j.noextglob!==!0&&$()==="("&&($(2)!=="?"||!/[!=<:]/.test($(3)))){me("negate",T);continue}if(j.nonegate!==!0&&N.index===0){_e();continue}}if(T==="+"){if(j.noextglob!==!0&&$()==="("&&$(2)!=="?"){me("plus",T);continue}if(I&&I.value==="("||j.regex===!1){z({type:"plus",value:T,output:M});continue}if(I&&(I.type==="bracket"||I.type==="paren"||I.type==="brace")||N.parens>0){z({type:"plus",value:T});continue}z({type:"plus",value:M});continue}if(T==="@"){if(j.noextglob!==!0&&$()==="("&&$(2)!=="?"){z({type:"at",extglob:!0,value:T,output:""});continue}z({type:"text",value:T});continue}if(T!=="*"){(T==="$"||T==="^")&&(T=`\\${T}`);const L=p.exec(xe());L&&(T+=L[0],N.index+=L[0].length),z({type:"text",value:T});continue}if(I&&(I.type==="globstar"||I.star===!0)){I.type="star",I.star=!0,I.value+=T,I.output=J,N.backtrack=!0,N.globstar=!0,Ne(T);continue}let V=xe();if(j.noextglob!==!0&&/^\([^?]/.test(V)){me("star",T);continue}if(I.type==="star"){if(j.noglobstar===!0){Ne(T);continue}const L=I.prev,B=L.prev,ee=L.type==="slash"||L.type==="bos",pe=B&&(B.type==="star"||B.type==="globstar");if(j.bash===!0&&(!ee||V[0]&&V[0]!=="/")){z({type:"star",value:T,output:""});continue}const we=N.braces>0&&(L.type==="comma"||L.type==="brace"),rr=W.length&&(L.type==="pipe"||L.type==="paren");if(!ee&&L.type!=="paren"&&!we&&!rr){z({type:"star",value:T,output:""});continue}for(;V.slice(0,3)==="/**";){const an=x[N.index+4];if(an&&an!=="/")break;V=V.slice(3),Ne("/**",3)}if(L.type==="bos"&&Re()){I.type="globstar",I.value+=T,I.output=se(j),N.output=I.output,N.globstar=!0,Ne(T);continue}if(L.type==="slash"&&L.prev.type!=="bos"&&!pe&&Re()){N.output=N.output.slice(0,-(L.output+I.output).length),L.output=`(?:${L.output}`,I.type="globstar",I.output=se(j)+(j.strictSlashes?")":"|$)"),I.value+=T,N.globstar=!0,N.output+=L.output+I.output,Ne(T);continue}if(L.type==="slash"&&L.prev.type!=="bos"&&V[0]==="/"){const an=V[1]!==void 0?"|$":"";N.output=N.output.slice(0,-(L.output+I.output).length),L.output=`(?:${L.output}`,I.type="globstar",I.output=`${se(j)}${Q}|${Q}${an})`,I.value+=T,N.output+=L.output+I.output,N.globstar=!0,Ne(T+X()),z({type:"slash",value:"/",output:""});continue}if(L.type==="bos"&&V[0]==="/"){I.type="globstar",I.value+=T,I.output=`(?:^|${Q}|${se(j)}${Q})`,N.output=I.output,N.globstar=!0,Ne(T+X()),z({type:"slash",value:"/",output:""});continue}N.output=N.output.slice(0,-I.output.length),I.type="globstar",I.output=se(j),I.value+=T,N.output+=I.output,N.globstar=!0,Ne(T);continue}const K={type:"star",value:T,output:J};if(j.bash===!0){K.output=".*?",(I.type==="bos"||I.type==="slash")&&(K.output=ce+K.output),z(K);continue}if(I&&(I.type==="bracket"||I.type==="paren")&&j.regex===!0){K.output=T,z(K);continue}(N.index===N.start||I.type==="slash"||I.type==="dot")&&(I.type==="dot"?(N.output+=Y,I.output+=Y):j.dot===!0?(N.output+=G,I.output+=G):(N.output+=ce,I.output+=ce),$()!=="*"&&(N.output+=D,I.output+=D)),z(K)}for(;N.brackets>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing","]"));N.output=l.escapeLast(N.output,"["),je("brackets")}for(;N.parens>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing",")"));N.output=l.escapeLast(N.output,"("),je("parens")}for(;N.braces>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing","}"));N.output=l.escapeLast(N.output,"{"),je("braces")}if(j.strictSlashes!==!0&&(I.type==="star"||I.type==="bracket")&&z({type:"maybe_slash",value:"",output:`${Q}?`}),N.backtrack===!0){N.output="";for(const V of N.tokens)N.output+=V.output!=null?V.output:V.value,V.suffix&&(N.output+=V.suffix)}return N};v.fastpaths=(x,C)=>{const j={...C},b=typeof j.maxLength=="number"?Math.min(u,j.maxLength):u,w=x.length;if(w>b)throw new SyntaxError(`Input length: ${w}, exceeds maximum allowed length: ${b}`);x=h[x]||x;const{DOT_LITERAL:S,SLASH_LITERAL:P,ONE_CHAR:E,DOTS_SLASH:A,NO_DOT:O,NO_DOTS:k,NO_DOTS_SLASH:M,STAR:Q,START_ANCHOR:D}=c.globChars(j.windows),q=j.dot?k:O,U=j.dot?M:O,Y=j.capture?"":"?:",G={negated:!1,prefix:""};let H=j.bash===!0?".*?":Q;j.capture&&(H=`(${H})`);const Z=ce=>ce.noglobstar===!0?H:`(${Y}(?:(?!${D}${ce.dot?A:S}).)*?)`,re=ce=>{switch(ce){case"*":return`${q}${E}${H}`;case".*":return`${S}${E}${H}`;case"*.*":return`${q}${H}${S}${E}${H}`;case"*/*":return`${q}${H}${P}${E}${U}${H}`;case"**":return q+Z(j);case"**/*":return`(?:${q}${Z(j)}${P})?${U}${E}${H}`;case"**/*.*":return`(?:${q}${Z(j)}${P})?${U}${H}${S}${E}${H}`;case"**/.*":return`(?:${q}${Z(j)}${P})?${S}${E}${H}`;default:{const F=/^(.*?)\.(\w+)$/.exec(ce);if(!F)return;const J=re(F[1]);return J?J+S+F[2]:void 0}}},ue=l.removePrefix(x,G);let se=re(ue);return se&&j.strictSlashes!==!0&&(se+=`${P}?`),se},o.exports=v},510:(o,a,i)=>{const c=i(716),l=i(697),u=i(96),m=i(154),p=h=>h&&typeof h=="object"&&!Array.isArray(h),f=(h,_,y=!1)=>{if(Array.isArray(h)){const P=h.map(A=>f(A,_,y));return A=>{for(const O of P){const k=O(A);if(k)return k}return!1}}const v=p(h)&&h.tokens&&h.input;if(h===""||typeof h!="string"&&!v)throw new TypeError("Expected pattern to be a non-empty string");const x=_||{},C=x.windows,j=v?f.compileRe(h,_):f.makeRe(h,_,!1,!0),b=j.state;delete j.state;let w=()=>!1;if(x.ignore){const P={..._,ignore:null,onMatch:null,onResult:null};w=f(x.ignore,P,y)}const S=(P,E=!1)=>{const{isMatch:A,match:O,output:k}=f.test(P,j,_,{glob:h,posix:C}),M={glob:h,state:b,regex:j,posix:C,input:P,output:k,match:O,isMatch:A};return typeof x.onResult=="function"&&x.onResult(M),A===!1?(M.isMatch=!1,E?M:!1):w(P)?(typeof x.onIgnore=="function"&&x.onIgnore(M),M.isMatch=!1,E?M:!1):(typeof x.onMatch=="function"&&x.onMatch(M),E?M:!0)};return y&&(S.state=b),S};f.test=(h,_,y,{glob:v,posix:x}={})=>{if(typeof h!="string")throw new TypeError("Expected input to be a string");if(h==="")return{isMatch:!1,output:""};const C=y||{},j=C.format||(x?u.toPosixSlashes:null);let b=h===v,w=b&&j?j(h):h;return b===!1&&(w=j?j(h):h,b=w===v),(b===!1||C.capture===!0)&&(C.matchBase===!0||C.basename===!0?b=f.matchBase(h,_,y,x):b=_.exec(w)),{isMatch:!!b,match:b,output:w}},f.matchBase=(h,_,y)=>(_ instanceof RegExp?_:f.makeRe(_,y)).test(u.basename(h)),f.isMatch=(h,_,y)=>f(_,y)(h),f.parse=(h,_)=>Array.isArray(h)?h.map(y=>f.parse(y,_)):l(h,{..._,fastpaths:!1}),f.scan=(h,_)=>c(h,_),f.compileRe=(h,_,y=!1,v=!1)=>{if(y===!0)return h.output;const x=_||{},C=x.contains?"":"^",j=x.contains?"":"$";let b=`${C}(?:${h.output})${j}`;h&&h.negated===!0&&(b=`^(?!${b}).*$`);const w=f.toRegex(b,_);return v===!0&&(w.state=h),w},f.makeRe=(h,_={},y=!1,v=!1)=>{if(!h||typeof h!="string")throw new TypeError("Expected a non-empty string");let x={negated:!1,fastpaths:!0};return _.fastpaths!==!1&&(h[0]==="."||h[0]==="*")&&(x.output=l.fastpaths(h,_)),x.output||(x=l(h,_)),f.compileRe(x,_,y,v)},f.toRegex=(h,_)=>{try{const y=_||{};return new RegExp(h,y.flags||(y.nocase?"i":""))}catch(y){if(_&&_.debug===!0)throw y;return/$^/}},f.constants=m,o.exports=f},716:(o,a,i)=>{const c=i(96),{CHAR_ASTERISK:l,CHAR_AT:u,CHAR_BACKWARD_SLASH:m,CHAR_COMMA:p,CHAR_DOT:f,CHAR_EXCLAMATION_MARK:h,CHAR_FORWARD_SLASH:_,CHAR_LEFT_CURLY_BRACE:y,CHAR_LEFT_PARENTHESES:v,CHAR_LEFT_SQUARE_BRACKET:x,CHAR_PLUS:C,CHAR_QUESTION_MARK:j,CHAR_RIGHT_CURLY_BRACE:b,CHAR_RIGHT_PARENTHESES:w,CHAR_RIGHT_SQUARE_BRACKET:S}=i(154),P=O=>O===_||O===m,E=O=>{O.isPrefix!==!0&&(O.depth=O.isGlobstar?1/0:1)},A=(O,k)=>{const M=k||{},Q=O.length-1,D=M.parts===!0||M.scanToEnd===!0,q=[],U=[],Y=[];let G=O,H=-1,Z=0,re=0,ue=!1,se=!1,ce=!1,F=!1,J=!1,N=!1,W=!1,ae=!1,he=!1,I=!1,T=0,Re,$,X={value:"",depth:0,isGlob:!1};const xe=()=>H>=Q,Ne=()=>G.charCodeAt(H+1),be=()=>(Re=$,G.charCodeAt(++H));for(;H<Q;){$=be();let me;if($===m){W=X.backslashes=!0,$=be(),$===y&&(N=!0);continue}if(N===!0||$===y){for(T++;xe()!==!0&&($=be());){if($===m){W=X.backslashes=!0,be();continue}if($===y){T++;continue}if(N!==!0&&$===f&&($=be())===f){if(ue=X.isBrace=!0,ce=X.isGlob=!0,I=!0,D===!0)continue;break}if(N!==!0&&$===p){if(ue=X.isBrace=!0,ce=X.isGlob=!0,I=!0,D===!0)continue;break}if($===b&&(T--,T===0)){N=!1,ue=X.isBrace=!0,I=!0;break}}if(D===!0)continue;break}if($===_){if(q.push(H),U.push(X),X={value:"",depth:0,isGlob:!1},I===!0)continue;if(Re===f&&H===Z+1){Z+=2;continue}re=H+1;continue}if(M.noext!==!0&&($===C||$===u||$===l||$===j||$===h)===!0&&Ne()===v){if(ce=X.isGlob=!0,F=X.isExtglob=!0,I=!0,$===h&&H===Z&&(he=!0),D===!0){for(;xe()!==!0&&($=be());){if($===m){W=X.backslashes=!0,$=be();continue}if($===w){ce=X.isGlob=!0,I=!0;break}}continue}break}if($===l){if(Re===l&&(J=X.isGlobstar=!0),ce=X.isGlob=!0,I=!0,D===!0)continue;break}if($===j){if(ce=X.isGlob=!0,I=!0,D===!0)continue;break}if($===x){for(;xe()!==!0&&(me=be());){if(me===m){W=X.backslashes=!0,be();continue}if(me===S){se=X.isBracket=!0,ce=X.isGlob=!0,I=!0;break}}if(D===!0)continue;break}if(M.nonegate!==!0&&$===h&&H===Z){ae=X.negated=!0,Z++;continue}if(M.noparen!==!0&&$===v){if(ce=X.isGlob=!0,D===!0){for(;xe()!==!0&&($=be());){if($===v){W=X.backslashes=!0,$=be();continue}if($===w){I=!0;break}}continue}break}if(ce===!0){if(I=!0,D===!0)continue;break}}M.noext===!0&&(F=!1,ce=!1);let _e=G,Te="",je="";Z>0&&(Te=G.slice(0,Z),G=G.slice(Z),re-=Z),_e&&ce===!0&&re>0?(_e=G.slice(0,re),je=G.slice(re)):ce===!0?(_e="",je=G):_e=G,_e&&_e!==""&&_e!=="/"&&_e!==G&&P(_e.charCodeAt(_e.length-1))&&(_e=_e.slice(0,-1)),M.unescape===!0&&(je&&(je=c.removeBackslashes(je)),_e&&W===!0&&(_e=c.removeBackslashes(_e)));const z={prefix:Te,input:O,start:Z,base:_e,glob:je,isBrace:ue,isBracket:se,isGlob:ce,isExtglob:F,isGlobstar:J,negated:ae,negatedExtglob:he};if(M.tokens===!0&&(z.maxDepth=0,P($)||U.push(X),z.tokens=U),M.parts===!0||M.tokens===!0){let me;for(let ge=0;ge<q.length;ge++){const V=me?me+1:Z,K=q[ge],L=O.slice(V,K);M.tokens&&(ge===0&&Z!==0?(U[ge].isPrefix=!0,U[ge].value=Te):U[ge].value=L,E(U[ge]),z.maxDepth+=U[ge].depth),(ge!==0||L!=="")&&Y.push(L),me=K}if(me&&me+1<O.length){const ge=O.slice(me+1);Y.push(ge),M.tokens&&(U[U.length-1].value=ge,E(U[U.length-1]),z.maxDepth+=U[U.length-1].depth)}z.slashes=q,z.parts=Y}return z};o.exports=A},96:(o,a,i)=>{const{REGEX_BACKSLASH:c,REGEX_REMOVE_BACKSLASH:l,REGEX_SPECIAL_CHARS:u,REGEX_SPECIAL_CHARS_GLOBAL:m}=i(154);a.isObject=p=>p!==null&&typeof p=="object"&&!Array.isArray(p),a.hasRegexChars=p=>u.test(p),a.isRegexChar=p=>p.length===1&&a.hasRegexChars(p),a.escapeRegex=p=>p.replace(m,"\\$1"),a.toPosixSlashes=p=>p.replace(c,"/"),a.removeBackslashes=p=>p.replace(l,f=>f==="\\"?"":f),a.escapeLast=(p,f,h)=>{const _=p.lastIndexOf(f,h);return _===-1?p:p[_-1]==="\\"?a.escapeLast(p,f,_-1):`${p.slice(0,_)}\\${p.slice(_)}`},a.removePrefix=(p,f={})=>{let h=p;return h.startsWith("./")&&(h=h.slice(2),f.prefix="./"),h},a.wrapOutput=(p,f={},h={})=>{const _=h.contains?"":"^",y=h.contains?"":"$";let v=`${_}(?:${p})${y}`;return f.negated===!0&&(v=`(?:^(?!${v}).*$)`),v},a.basename=(p,{windows:f}={})=>{const h=p.split(f?/[\\/]/:"/"),_=h[h.length-1];return _===""?h[h.length-2]:_}}},t={};function n(o){var a=t[o];if(a!==void 0)return a.exports;var i=t[o]={exports:{}},c=!0;try{e[o](i,i.exports,n),c=!1}finally{c&&delete t[o]}return i.exports}typeof n<"u"&&(n.ab=__dirname+"/");var s=n(170);Ar.exports=s})()),Ar.exports}var ea;function y_(){return ea||(ea=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}t(e,{hasLocalMatch:function(){return o},matchLocalPattern:function(){return s}});const n=Du();function s(a,i){if(a.search!==void 0&&a.search!==i.search)return!1;var c;return!!(0,n.makeRe)((c=a.pathname)!=null?c:"**",{dot:!0}).test(i.pathname)}function o(a,i){if(!a)return!0;const c=new URL(i,"http://n");return a.some(l=>s(l,c))}}(Tr)),Tr}var Or={},ta;function v_(){return ta||(ta=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}t(e,{hasRemoteMatch:function(){return o},matchRemotePattern:function(){return s}});const n=Du();function s(a,i){if(a.protocol!==void 0){const l=i.protocol.slice(0,-1);if(a.protocol!==l)return!1}if(a.port!==void 0&&a.port!==i.port)return!1;if(a.hostname===void 0)throw new Error(`Pattern should define hostname but found
|
|
17
|
+
`+JSON.stringify(a));if(!(0,n.makeRe)(a.hostname).test(i.hostname)||a.search!==void 0&&a.search!==i.search)return!1;var c;return!!(0,n.makeRe)((c=a.pathname)!=null?c:"**",{dot:!0}).test(i.pathname)}function o(a,i,c){return a.some(l=>c.hostname===l)||i.some(l=>s(l,c))}}(Or)),Or}var na;function Fu(){return na||(na=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return s}});const t=75;function n(o){let{config:a,src:i,width:c,quality:l}=o;var u;if(process.env.NODE_ENV!=="production"){const p=[];if(i||p.push("src"),c||p.push("width"),p.length>0)throw new Error("Next Image Optimization requires "+p.join(", ")+" to be provided. Make sure you pass them as props to the `next/image` component. Received: "+JSON.stringify({src:i,width:c,quality:l}));if(i.startsWith("//"))throw new Error('Failed to parse src "'+i+'" on `next/image`, protocol-relative URL (//) must be changed to an absolute URL (http:// or https://)');if(i.startsWith("/")&&a.localPatterns&&process.env.NODE_ENV!=="test"&&process.env.NEXT_RUNTIME!=="edge"){const{hasLocalMatch:f}=y_();if(!f(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 f;try{f=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}=v_();if(!h(a.domains,a.remotePatterns,f))throw new Error("Invalid src prop ("+i+') on `next/image`, hostname "'+f.hostname+'" is not configured under images in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-host')}}if(l&&a.qualities&&!a.qualities.includes(l))throw new Error("Invalid quality prop ("+l+") on `next/image` does not match `images.qualities` configured in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-qualities")}const m=l||((u=a.qualities)==null?void 0:u.reduce((p,f)=>Math.abs(f-t)<Math.abs(p-t)?f:p))||t;return a.path+"?url="+encodeURIComponent(i)+"&w="+c+"&q="+m+(process.env.NEXT_DEPLOYMENT_ID?"&dpl="+process.env.NEXT_DEPLOYMENT_ID:"")}n.__next_img_default=!0;const s=n}(Rr)),Rr}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return j}});const n=Oe,s=bt,o=r,a=s._(g),i=n._(ys),c=n._(__()),l=Qs,u=Zn,m=g_(),p=Qn,f=Lc(),h=n._(Fu()),_=process.env.__NEXT_IMAGE_OPTS;typeof window>"u"&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);function y(b,w,S,P,E,A,O){const k=b==null?void 0:b.src;if(!b||b["data-loaded-src"]===k)return;b["data-loaded-src"]=k,("decode"in b?b.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(!(!b.parentElement||!b.isConnected)){if(w!=="empty"&&E(!0),S!=null&&S.current){const Q=new Event("load");Object.defineProperty(Q,"target",{writable:!1,value:b});let D=!1,q=!1;S.current({...Q,nativeEvent:Q,currentTarget:b,target:b,isDefaultPrevented:()=>D,isPropagationStopped:()=>q,persist:()=>{},preventDefault:()=>{D=!0,Q.preventDefault()},stopPropagation:()=>{q=!0,Q.stopPropagation()}})}if(P!=null&&P.current&&P.current(b),process.env.NODE_ENV!=="production"){const Q=new URL(k,"http://n").searchParams.get("url")||k;if(b.getAttribute("data-nimg")==="fill"){if(!A&&(!O||O==="100vw")&&b.getBoundingClientRect().width/window.innerWidth<.6&&(O==="100vw"?(0,p.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,p.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')),b.parentElement){const{position:U}=window.getComputedStyle(b.parentElement),Y=["absolute","fixed","relative"];Y.includes(U)||(0,p.warnOnce)('Image with src "'+Q+'" has "fill" and parent element with invalid "position". Provided "'+U+'" should be one of '+Y.map(String).join(",")+".")}b.height===0&&(0,p.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=b.height.toString()!==b.getAttribute("height"),q=b.width.toString()!==b.getAttribute("width");(D&&!q||!D&&q)&&(0,p.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 v(b){return a.use?{fetchPriority:b}:{fetchpriority:b}}const x=(0,a.forwardRef)((b,w)=>{let{src:S,srcSet:P,sizes:E,height:A,width:O,decoding:k,className:M,style:Q,fetchPriority:D,placeholder:q,loading:U,unoptimized:Y,fill:G,onLoadRef:H,onLoadingCompleteRef:Z,setBlurComplete:re,setShowAltText:ue,sizesInput:se,onLoad:ce,onError:F,...J}=b;return(0,o.jsx)("img",{...J,...v(D),loading:U,width:O,height:A,decoding:k,"data-nimg":G?"fill":"1",className:M,style:Q,sizes:E,srcSet:P,src:S,ref:(0,a.useCallback)(N=>{w&&(typeof w=="function"?w(N):typeof w=="object"&&(w.current=N)),N&&(F&&(N.src=N.src),process.env.NODE_ENV!=="production"&&(S||console.error('Image is missing required "src" property:',N),N.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.')),N.complete&&y(N,q,H,Z,re,Y,se))},[S,q,H,Z,re,F,Y,se,w]),onLoad:N=>{const W=N.currentTarget;y(W,q,H,Z,re,Y,se)},onError:N=>{ue(!0),q!=="empty"&&re(!0),F&&F(N)}})});function C(b){let{isAppRouter:w,imgAttributes:S}=b;const P={as:"image",imageSrcSet:S.srcSet,imageSizes:S.sizes,crossOrigin:S.crossOrigin,referrerPolicy:S.referrerPolicy,...v(S.fetchPriority)};return w&&i.default.preload?(i.default.preload(S.src,P),null):(0,o.jsx)(c.default,{children:(0,o.jsx)("link",{rel:"preload",href:S.srcSet?void 0:S.src,...P},"__nimg-"+S.src+S.srcSet+S.sizes)})}const j=(0,a.forwardRef)((b,w)=>{const P=!(0,a.useContext)(f.RouterContext),E=(0,a.useContext)(m.ImageConfigContext),A=(0,a.useMemo)(()=>{var Z;const re=_||E||u.imageConfigDefault,ue=[...re.deviceSizes,...re.imageSizes].sort((F,J)=>F-J),se=re.deviceSizes.sort((F,J)=>F-J),ce=(Z=re.qualities)==null?void 0:Z.sort((F,J)=>F-J);return{...re,allSizes:ue,deviceSizes:se,qualities:ce}},[E]),{onLoad:O,onLoadingComplete:k}=b,M=(0,a.useRef)(O);(0,a.useEffect)(()=>{M.current=O},[O]);const Q=(0,a.useRef)(k);(0,a.useEffect)(()=>{Q.current=k},[k]);const[D,q]=(0,a.useState)(!1),[U,Y]=(0,a.useState)(!1),{props:G,meta:H}=(0,l.getImgProps)(b,{defaultLoader:h.default,imgConf:A,blurComplete:D,showAltText:U});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x,{...G,unoptimized:H.unoptimized,placeholder:H.placeholder,fill:H.fill,onLoadRef:M,onLoadingCompleteRef:Q,setBlurComplete:q,setShowAltText:Y,sizesInput:b.sizes,ref:w}),H.priority?(0,o.jsx)(C,{isAppRouter:P,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)})(Jr,Jr.exports);var x_=Jr.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var m in u)Object.defineProperty(l,m,{enumerable:!0,get:u[m]})}t(e,{default:function(){return c},getImageProps:function(){return i}});const n=Oe,s=Qs,o=x_,a=n._(Fu());function i(l){const{props:u}=(0,s.getImgProps)(l,{defaultLoader:a.default,imgConf:process.env.__NEXT_IMAGE_OPTS});for(const[m,p]of Object.entries(u))p===void 0&&delete u[m];return{props:u}}const c=o.Image})(Lu);var b_=Lu;const Yt=R.getDefaultExportFromCjs(b_),j_=({item:e,CONSTANTS:t})=>{const n=e.icon?t.PAYMENT_FLAGS.includes(e.icon)?"payment":"social":null,s=n==="payment"?t.PAYMENT_FLAGS_DICTIONARY[e.icon]:e.icon;return e.link?r.jsxs(De,{href:e.link,target:"_blank",rel:"noopener noreferrer",className:de["support-item"],children:[e.image&&r.jsx("img",{src:e.image,alt:"",loading:"lazy"}),n==="payment"?r.jsx(Yt,{alt:s,src:`/assets/${s}.svg`,width:20,height:20}):r.jsx(d.Icon,{size:"small",name:s})]}):r.jsxs("div",{className:de["support-item"],children:[e.image&&r.jsx("img",{src:e.image,alt:"",loading:"lazy"}),n==="payment"?r.jsx(Yt,{alt:s,src:`/assets/${s}.svg`,width:20,height:20}):r.jsx(d.Icon,{size:"small",name:s})]})},C_=({content:e,CONSTANTS:t})=>r.jsx("div",{className:de["support-container"],children:e==null?void 0:e.map((n,s)=>r.jsxs("div",{"data-device":n.device,className:de["support-section"],children:[r.jsxs("div",{className:de["support-text"],children:[n.title&&r.jsx("h3",{children:n.title}),n.description&&r.jsx("p",{children:n.description})]}),Array.isArray(n.items)&&n.items.length&&r.jsx("div",{className:de["support-items"],"data-gap":n.gap,children:n.items.map((o,a)=>r.jsx(j_,{item:o,CONSTANTS:t},`footer-support-item-${a}`))})]},`footer-support-${s}`))}),S_=({name:e,nameIcon:t,maxWidth:n,rowAlignContent:s,columnAlignContent:o,columnAlignItems:a,textAlignContent:i,textAlignItems:c,children:l})=>r.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:s,alignItems:s},columnWrapper:{alignContent:o,alignItems:a}},children:r.jsxs(d.TextStructure.DivWrapper,{alignContent:i,alignItems:c,className:de.footer__column,children:[r.jsxs("div",{className:t?de.footer__columnTitleIcon:de.footer__columnTitle,children:[r.jsx(d.Icon,{name:`${t}`,size:"small"}),e&&r.jsx("div",{children:e})]}),r.jsx("div",{className:de.footer__columnContent,style:{maxWidth:`${n}px`},children:l})]})}),P_=({name:e,nameIcon:t,maxWidth:n,children:s,ICONS:o,...a})=>r.jsxs(d.Accordion.Wrapper,{className:de.accordionWrapper,title:"accordion-wrapper",...a,children:[r.jsx(d.Accordion.Header,{id:(a==null?void 0:a.id)??"",className:de.accordionHeader,closeIndicator:r.jsx(d.Icon,{name:o.arrow_up,size:"medium"}),openIndicator:r.jsx(d.Icon,{name:o.arrow_down,size:"medium"}),title:"accordion-header",children:r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{className:t?de.accordionTextWrapper:"",children:[r.jsx(d.Icon,{name:`${t}`,size:"medium"}),r.jsx("h2",{className:"typography-style-body-md",children:e})]})})}),r.jsx(d.Accordion.Body,{title:"accordion-body",children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:de.footer__columnContent,style:{maxWidth:`${n}px`},children:s})})})]}),Lr=e=>{const{isMobile:t}=ne();return t?r.jsx(P_,{...e}):r.jsx(S_,{...e})},jn=({type:e,children:t,className:n,collumnName:s,collumnNameIcon:o,icons:a,iconLink:i,iconSize:c,link:l,paymentDisclaimer:u,paymentTitle:m,rowAlignContent:p,columnAlignContent:f,columnAlignItems:h,textAlignContent:_,textAlignItems:y,...v})=>{let x;const{handleSelectContent:C}=oe(),{nextimage:j}=ie();switch(e){case"menu":x=r.jsx(De,{className:de.footer__itemLink,href:l??"#",prefetch:!1,children:r.jsx("span",{onClick:()=>{C({content:`footer:${s}:${t}`})},children:t})});break;case"payment":x=r.jsxs("div",{className:d.helpers.classNameConcat(de.payment,de.footer__itemSmallText),...v,children:[u,r.jsxs("div",{className:d.helpers.classNameConcat(de.footer__iconContainer,de.footer__iconListSubHeader),children:[m,r.jsx("div",{className:de.footer__iconList,children:a==null?void 0:a.map((b,w)=>r.jsx(j,{alt:b,src:`/assets/${b}.svg`,width:c??20,height:c??20},w))})]})]});break;case"social-media":x=r.jsx("div",{className:de.footer__iconContainer,...v,children:r.jsx("div",{className:de.footer__iconList,children:i==null?void 0:i.map((b,w)=>r.jsx(De,{prefetch:!1,href:b.link??"#",target:"_blank",children:r.jsx(d.Icon,{size:"medium",name:b.icon,onClick:()=>C({content:`footer:redes-sociais:${b.icon}`})})},w))})});break;default:x=r.jsx("div",{className:n,...v,children:t})}return r.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:p,alignItems:p},columnWrapper:{alignContent:f,alignItems:h}},...v,children:r.jsx(d.TextStructure.DivWrapper,{alignContent:_,alignItems:y,className:d.helpers.classNameConcat(de.footer__item,n),children:x})})},w_=({className:e,text:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(de.footer__legalInformation,e),children:r.jsx("span",{children:t})}),zu=()=>{const{nextimage:e}=ie();return r.jsx("div",{className:de["footer--stamps"],children:r.jsx(e,{alt:"Empresa B",className:de["footer--stamps--company"],src:"/images/Footer/new_certfB.png",width:56,height:64})})};zu.displayName="Footer.Stamps";const Bu=({children:e,legalTextSlot:t,adornment:n,className:s,...o})=>{const{isMobile:a}=ne(),i=g.Children.toArray(e).filter(Boolean),c=i.length;return r.jsxs("div",{className:de.footer__main,children:[(n==null?void 0:n.top)&&r.jsx("div",{className:de.footer__top,children:n==null?void 0:n.top}),c>0&&r.jsx("div",{...o,className:d.helpers.classNameConcat(de.footer__wrapper,s),children:i.map((l,u)=>r.jsx("div",{style:{flexGrow:1,maxWidth:`calc(100% / ${a?1:"fit-content"})`},children:l},u))}),(n==null?void 0:n.bottom)&&r.jsx("div",{className:de.footer__bottom,children:n.bottom}),t&&r.jsx("div",{className:de.footer__legalText,children:t})]})};Bu.displayName="Footer.Wrapper";const Uu=({data:{links:{links:e}},payments:t,socialInfo:n,socialMedias:s,adornment:o,LEGAL_INFORMATION_TEXT:a,ICONS:i,className:c,hasFooterStamps:l})=>{var u;return r.jsxs(Bu,{className:c,adornment:o,legalTextSlot:r.jsx(w_,{text:a}),children:[Array.isArray(e.column)&&e.column.map((m,p)=>r.jsx(Lr,{id:`${p}column-menu`,name:m.name,nameIcon:m.nameIcon,ICONS:i,children:m.items.map((f,h)=>r.jsx(jn,{type:"menu",link:f.link,collumnName:m.name,collumnNameIcon:m.nameIcon,children:f.text},h))},p)),t&&((u=t.acceptedFlags)==null?void 0:u.length)>0&&r.jsx(Lr,{id:"payment-column",name:t==null?void 0:t.title,nameIcon:t==null?void 0:t.titleIcon,maxWidth:150,ICONS:i,children:r.jsx(jn,{type:"payment",paymentDisclaimer:t==null?void 0:t.text,paymentTitle:t==null?void 0:t.flagsTitle,iconSize:16,icons:t==null?void 0:t.acceptedFlags})}),r.jsxs(Lr,{id:"social-media-column",name:n==null?void 0:n.title,ICONS:i,children:[n!=null&&n.subTitle?r.jsx(jn,{children:n==null?void 0:n.subTitle}):null,r.jsx(jn,{type:"social-media",iconSize:24,iconLink:s}),l&&r.jsx(zu,{})]})]})};Uu.displayName="Footer";const E_=Object.freeze(Object.defineProperty({__proto__:null,Footer:Uu,FooterSupport:C_},Symbol.toStringTag,{value:"Module"})),N_=()=>{const{colorName:e}=Le();return r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:e.length===0?"":R.styles["accessibility-info"],children:r.jsx("p",{children:e})})})},Jn=({className:e,titleId:t})=>{var o,a,i;const{productName:n,tag:s}=Le();return r.jsxs("div",{className:d.helpers.classNameConcat(R.styles.header,e),children:[s!=null&&s.commercial?r.jsx(d.Tag,{size:"small",title:(o=s.commercial)==null?void 0:o.value,variant:"quaternary",adornment:{start:(a=s.commercial)!=null&&a.icon?r.jsx(d.Icon,{name:s.commercial.icon}):null},children:(i=s.commercial)==null?void 0:i.value}):null,r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h1",{id:t,children:n})})})]})};Jn.displayName="PDP.PDPHeader";const Zs=({layout:e="horizontal"})=>{const{price:t,listPrice:n,installments:s}=Le(),{count:o,value:a}=s,i=R.formatPriceToCurrency(n??0,!0),c=R.formatPriceToCurrency(t??0,!0),l=R.formatPriceToCurrency(a??0);return r.jsx(d.ProductInfo.Root,{size:"small",layout:e,children:r.jsxs(d.ProductInfo.Wrapper,{layout:e,size:"small",className:R.styles["price-wrapper"],children:[r.jsx(d.ProductInfo.ValuesWrapper,{children:t!==n?r.jsxs(r.Fragment,{children:[r.jsx(d.ProductInfo.Price,{label:"originalPrice",value:i.toString(),size:"small"}),r.jsx(d.ProductInfo.Price,{label:"discountPrice",value:c.toString(),size:"small"})]}):r.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:c.toString(),size:"small"})}),o&&o>1&&a?r.jsx(d.ProductInfo.Price,{label:"installment",value:`ou ${o}x ${l}`,size:"small"}):null]})})},es=({onAddCallBack:e,onDisabledClickCallBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:s})=>{const o=en(),{productId:a,productData:i,price:c,listPrice:l,thumbImage:u,isKit:m}=Le(),{isMobile:p}=ne(),{addToCart:f}=ve(),{sendDataLayerEvent:h}=oe(),_=!m&&(!o.sku||!o.available),y=()=>{if(_&&typeof t=="function"){t();return}typeof e=="function"&&e({id:o.sku,quantity:o.quantity,seller:o.sellerId,sku:a}),f({id:o.sku,quantity:o.quantity,seller:o.sellerId},{id:a,texture:u==null?void 0:u.imageUrl}),h({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...i,price:c,listPrice:l}]},supportData:{selectedSkus:[o]},customData:{quantity:o.quantity}}})};return r.jsx(d.Button,{className:R.styles["add-to-cart"],size:p?(n==null?void 0:n.mobile)??"large":(n==null?void 0:n.desktop)??"x-large",onClick:y,children:o.sku&&o.available?`${s.add_to_cart}`:`${s.select_size}`})},I_=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t})=>{const{isMobile:n}=ne(),s=en(),{sizesContainerRef:o}=Sa(),{structureRef:a}=Pe();return s.sku&&s.available?r.jsx(es,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t}):r.jsx(d.Button,{className:R.styles["add-to-cart"],size:n?(e==null?void 0:e.mobile)??"large":(e==null?void 0:e.desktop)??"x-large",onClick:()=>{o.current&&a.current&&window.document.body.scrollTo({top:o.current.offsetTop-a.current.offsetHeight,behavior:"smooth"})},children:s.sku&&s.available?t.add_to_cart:t.select_size})},Cn=({value:e,label:t,suppressHydrationWarning:n=!1},s)=>{const o={value:e,...n&&{suppressHydrationWarning:!0}},a=s==="compact"?o:{...o,label:t};return r.jsx(d.Timer.Digit,{...a})},Ln=({dateEnd:e,dateInit:t,type:n="default",TIME_ZONE:s,...o})=>{const[a,i]=g.useState(ac(new Ur.TZDate(Date.now(),s),new Ur.TZDate(e,s))),[c,l]=g.useState(!1);if(g.useEffect(()=>{l(!0);const h=setInterval(()=>{i(_=>_<=0?(clearInterval(h),0):_-1e3)},1e3);return()=>clearInterval(h)},[]),!c||a<=0)return r.jsx(r.Fragment,{});const u=Ht(a,"days"),m=Ht(a,"hours"),p=Ht(a,"minutes"),f=Ht(a);return r.jsxs(d.Timer.Root,{...o,children:[u?r.jsxs(r.Fragment,{children:[Cn({value:u,label:"dias"},n),r.jsx(d.Timer.Separator,{})]}):null,Cn({value:m,label:"horas"},n),r.jsx(d.Timer.Separator,{}),Cn({value:p,label:"min"},n),r.jsx(d.Timer.Separator,{}),Cn({value:f,label:"segs",suppressHydrationWarning:!0},n)]})},Js=({TIME_ZONE:e})=>{const{tag:t}=Le(),n=t==null?void 0:t.flagGoldenPdp,s=g.useMemo(()=>{var o;if((o=n==null?void 0:n.tagImage)!=null&&o.includes("player.vimeo")){const a=n.tagImage.split("?")[1],i=a==null?void 0:a.split("&"),c=i==null?void 0:i.filter(u=>u.includes("loc")||u.includes("signature")||u.includes("user_id")),l=c==null?void 0:c.join("&");return`${n.tagImage.split("?")[0]}?${l}`}return n==null?void 0:n.tagImage},[n==null?void 0:n.tagImage]);return n!=null&&n.enableTag?r.jsxs("div",{className:R.styles["golden-tag"],style:(n==null?void 0:n.backgroundSelect)==="color"?{backgroundColor:n==null?void 0:n.backgroundColor}:(n==null?void 0:n.backgroundSelect)==="image"?{backgroundImage:`url(${n==null?void 0:n.tagImage})`}:void 0,children:[(n==null?void 0:n.backgroundSelect)==="video"&&r.jsx("div",{className:R.styles["golden-tag-video"],children:r.jsx(Ee.Video,{src:s,autoPlay:!0,muted:!0,loop:!0,playsInline:!0})}),r.jsxs("div",{className:R.styles["golden-tag-content"],children:[r.jsx("span",{className:R.styles["golden-tag-content-text"],style:{color:n==null?void 0:n.textColor},children:n==null?void 0:n.value}),(n==null?void 0:n.countDownEndDate)&&r.jsx(Ln,{mode:n==null?void 0:n.timerMode,size:"x-small",type:"compact",dateEnd:new Date((n==null?void 0:n.countDownEndDate)??""),TIME_ZONE:e})]})]}):null};Js.displayName="PDP.GoldenTag";const R_=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t,TIME_ZONE:n,Z_INDEX_WAR:s})=>{const{isMobile:o}=ne();return o?r.jsxs(d.Card,{className:R.styles["bottom-navigation"],shadow:!0,style:{zIndex:s.pdp_bottom_navigation},children:[r.jsxs("div",{className:R.styles["bottom-navigation__header"],children:[r.jsx(Js,{TIME_ZONE:n}),r.jsxs("div",{className:R.styles["bottom-navigation__header-content"],children:[r.jsx(Jn,{}),r.jsx(Zs,{layout:"name-vertical"})]})]}),r.jsx(I_,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t})]}):null},T_=({children:e,setShowBottomNavigation:t})=>{const n=g.useRef(null),s=xs(n),o=g.useRef(s);return g.useEffect(()=>{var i;const{top:a}=((i=n.current)==null?void 0:i.getBoundingClientRect())??{top:0};o.current!==s&&a>0&&(t(!s),o.current=s)},[s]),r.jsx("div",{ref:n,style:{width:"100%"},children:e})},A_=({ICONS:e})=>{const{isMobile:t}=ne(),{price:n,listPrice:s,productData:o,productId:a}=Le(),{sendDataLayerEvent:i}=oe(),c=Ft(),{toggleProduct:l}=wt();return r.jsx(d.Button,{adornment:{start:r.jsx(d.Icon,{name:e[c.includes(a)?"favorite_true":"favorite_false"],size:"medium"})},className:R.styles["add-to-wishlist"],size:t?"medium":"x-large",variant:"tertiary",onClick:()=>{l(a),i({functionKey:"productEvents",data:{event:c.includes(a)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:"PDP"},commonData:{...o,price:n,listPrice:s}}})}})},qu=({showWishlist:e=!0,callBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:s,ICONS:o,TIME_ZONE:a,Z_INDEX_WAR:i})=>{const{isMobile:c}=ne(),[l,u]=g.useState(!0);return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:R.styles.actions,children:[c?r.jsx(T_,{setShowBottomNavigation:u,children:r.jsx(es,{onAddCallBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:s})}):r.jsx(es,{onAddCallBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:s}),e&&r.jsx(A_,{ICONS:o})]}),c&&l&&r.jsx(R_,{addToCartBtnSize:n,BUY_BUTTON_LABELS:s,Z_INDEX_WAR:i,TIME_ZONE:a})]})},Hu=({className:e,device:t,ICONS:n})=>{const{breadcrumbList:s,productName:o}=Le(),a=i=>i.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return r.jsx(d.BreadCrumb.DivWrapper,{className:d.helpers.classNameConcat(R.styles.breadcrumb,[t==="mobile"?R.styles["breadcrumbs-mobile"]:R.styles["breadcrumbs-desktop"],e]),children:r.jsxs(d.BreadCrumb.List,{children:[Array.isArray(s)&&s.map((i,c)=>{const l=a(s.slice(0,c+1).map(u=>u.replace(/\s/g,"-").toLowerCase()).join("/"));return r.jsx(d.BreadCrumb.Item,{adornment:{end:r.jsx(d.Icon,{name:n.arrow_right})},role:"listitem",children:r.jsx(De,{href:`/${l}`,children:i})},`pdp-breadcrumb-${l}-${c}`)}),r.jsx(d.BreadCrumb.Item,{role:"listitem",className:d.helpers.classNameConcat(R.styles["breadcrumb--active"],e),children:o},"pdp-breadcrumb-productName")]})})};Hu.displayName="PDP.BreadCrumb";const Vu=({className:e})=>{var s;const{tag:t}=Le(),n=t==null?void 0:t.flagPdp;return n&&((s=n==null?void 0:n.value)!=null&&s.length)?r.jsx(d.Tag,{className:d.helpers.classNameConcat(R.styles.credits,e),variant:"tertiary",title:n==null?void 0:n.value,size:"small",adornment:{start:n!=null&&n.enableIcon&&(n!=null&&n.icon)?r.jsx(d.Icon,{name:n==null?void 0:n.icon,style:{color:n==null?void 0:n.iconColor}}):null},style:{background:n==null?void 0:n.tagColor,color:n==null?void 0:n.textColor},children:n==null?void 0:n.value}):r.jsx(r.Fragment,{})};Vu.displayName="PDPCredits";const O_=()=>{const{descriptionContent:e,productReference:t}=Le(),[n,s]=g.useState("description");return r.jsxs(d.Tabs.Root,{className:R.styles["tabs-root-modifier"],children:[r.jsx(d.Tabs.TabList,{className:R.styles["tabs-list-modifier"],children:e==null?void 0:e.map(({label:o,value:a})=>r.jsx(d.Tabs.Item,{label:o,value:a,activeTab:n,onTabChange:s,size:"large",className:`${R.styles["tabs-item-modifier"]} ${n===a?R.styles["tabs-item-active"]:""}`},a))}),r.jsxs("div",{className:R.styles["content-wrapper"],children:[n==="description"?r.jsx("div",{children:r.jsxs("span",{className:R.styles.productref,children:["Ref:",t]})}):"",e==null?void 0:e.map(({value:o,content:a})=>n===o?r.jsx(d.Tabs.Panel,{className:`${R.styles["tabs-panel"]} ${n===o?R.styles["tabs-panel-enter"]:R.styles["tabs-panel-exit"]}`,children:r.jsx("div",{className:R.styles.content,dangerouslySetInnerHTML:{__html:a}})},o):null)]})]})},L_=({CURRENCY:e,DELIVERY_INFO_BOXES_ALLOWED:t,FREIGHT_CALCULATION:n,Z_INDEX_WAR:s})=>{const o=en(),{isMobile:a}=ne();return r.jsxs(r.Fragment,{children:[a?r.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null,r.jsx(lu,{skuId:o.available?o.sku:"",size:a?n.inputSize.mobile:n.inputSize.desktop,quantity:o.quantity,sellerId:o.sellerId,seller:o.sellerName,local:"PDP",CONSTANTS_PROPS:{freightConfig:n,deliveryInfoBoxesAllowed:t,toolTipZIndex:s.modal,currency:e}}),a?r.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null]})},ra=({image:e,index:t,handleZoom:n,PRODUCT_IMAGE_DIMENSIONS:s})=>{const o=R.resizingImg(e.imageUrl,s.pdp),{nextimage:a}=ie();return r.jsx(a,{src:o,alt:e.imageLabel,objectFit:"contain",...s.pdp,...t<=1&&{priority:!0,loading:"eager"},onClick:()=>{n(t)}},t)},k_=({video:e,productName:t,poster:n})=>{const{sendDataLayerEvent:s}=oe(),o=g.useRef(!1);return r.jsx(Ee.Video,{src:e,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,style:{zIndex:-1,aspectRatio:"2/3"},onPlaying:()=>{o.current||(o.current=!0,s({functionKey:"readyEvents",data:{event:"video_start",readyData:{product:t}}}))},poster:n})},$u=({images:e,video:t,handleZoom:n,productName:s,PRODUCT_IMAGE_DIMENSIONS:o})=>{var u,m;const{initialize:a,pagination:i,controller:c,itemsStyles:l}=d.Carousel.useCarousel({gap:0,itemsPerPage:1,loop:!1,direction:"row"});return r.jsxs(d.Carousel.Root,{innerRef:p=>{a(p)},className:R.styles["gallery-carousel-modifier"],children:[r.jsx(d.Carousel.Controller,{position:"absolute",top:"24px",bottom:"unset",left:"16px",children:r.jsx(d.Carousel.Bullets,{page:i.currentPage,total:e.length,onBulletClick:p=>c==null?void 0:c.navigateTo(p)})}),r.jsxs(d.Carousel.Body,{children:[r.jsx(d.Carousel.Item,{style:l,children:r.jsx(ra,{image:e[0],index:0,handleZoom:n,PRODUCT_IMAGE_DIMENSIONS:o})},"PDP_gallery_0"),t&&r.jsx(d.Carousel.Item,{style:l,children:r.jsx(k_,{video:t,productName:s,...((u=e[1])==null?void 0:u.imageUrl)&&{poster:(m=e[1])==null?void 0:m.imageUrl}})},"PDP_gallery_video"),e.map((p,f)=>f===0?null:r.jsx(d.Carousel.Item,{style:l,children:r.jsx(ra,{image:p,index:f,handleZoom:n,PRODUCT_IMAGE_DIMENSIONS:o})},`PDP_gallery_${f}`))]})]})};$u.displayName="PDP.Carousel";const M_="_thumbs_1954e_65",D_="_selected_1954e_92",F_="_carousel_1954e_164",z_="_bullets_1954e_201",Se={"image-zoom-wrapper-desktop":"_image-zoom-wrapper-desktop_1954e_1","button-close-container":"_button-close-container_1954e_10","button-close":"_button-close_1954e_10","main-image-container":"_main-image-container_1954e_22","image-desktop":"_image-desktop_1954e_52",thumbs:M_,selected:D_,"image-zoom-wrapper-mobile":"_image-zoom-wrapper-mobile_1954e_117","image-mobile":"_image-mobile_1954e_147","image-zoom--image":"_image-zoom--image_1954e_161",carousel:F_,"carousel-controller":"_carousel-controller_1954e_169","arrow-left":"_arrow-left_1954e_179","arrow-right":"_arrow-right_1954e_180",bullets:z_,"zoom-popup":"_zoom-popup_1954e_212","image-zoom--mobile":"_image-zoom--mobile_1954e_252","image-zoom--image--img":"_image-zoom--image--img_1954e_282"},sa=({onClose:e,ICONS:t})=>r.jsx("div",{className:`${Se["button-close-container"]}`,children:r.jsx(d.Button,{iconNameStart:t.close,iconSize:"medium",className:`${Se["button-close"]}`,variant:"tertiary",state:"default",size:"medium",onClick:e,style:{textDecoration:"none"}})}),B_=({children:e,Z_INDEX_WAR:t,...n})=>r.jsx("div",{...n,className:Se["image-zoom-wrapper-desktop"],style:{zIndex:t.pdp_image_zoom},children:e}),Wu=({images:e,setCurrent:t,setFirstImgLoaded:n,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o})=>{const{nextimage:a}=ie();let i=null;const c=g.useRef(null),{initialize:l,controller:u,pagination:m,itemsStyles:p}=d.Carousel.useCarousel({itemsPerPage:1,gap:10,loop:!1,direction:"row"}),f=_=>{u==null||u.navigateTo(_)},h=()=>{n(!0)};return g.useEffect(()=>{t(m.currentPage)},[m.currentPage,t]),r.jsxs(d.Carousel.Root,{innerRef:_=>{_&&!i&&(i=_,l(i))},className:Se.carousel,children:[r.jsxs(d.Carousel.Controller,{className:Se["carousel-controller"],children:[r.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.prevPage(),className:Se["arrow-left"],adornment:{start:r.jsx(d.Icon,{name:s.arrow_left})}}),r.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.nextPage(),className:Se["arrow-right"],adornment:{start:r.jsx(d.Icon,{name:s.arrow_right})}})]}),r.jsx(d.Carousel.Body,{children:Array.isArray(e)&&e.map((_,y)=>r.jsx(d.Carousel.Item,{style:p,children:r.jsx(a,{...o.image_zoom.mobile,...y===0&&{priority:!0,loading:"eager"},ref:c,className:Se.imageMobile,src:_.imageUrl,alt:_.imageText,quality:100,...y===0&&{onLoad:h}})},y))}),r.jsx(d.Carousel.Bullets,{className:Se.bullets,page:m.currentPage,total:m.totalPages,onBulletClick:f})]})};Wu.displayName="ImageZoom.Mobile.Carousel";const Gu=({imgRef:e,image:t,PRODUCT_IMAGE_DIMENSIONS:n})=>{Aa();const{nextimage:s}=ie();return r.jsx("div",{className:Se["image-zoom--image"],ref:e,children:r.jsx(s,{...n.image_zoom.mobile,alt:t.imageText,className:Se["image-zoom--image--img"],quality:100,src:t.imageUrl})})};Gu.displayName="ImageZoom.ImageZoom";const Ku=({loaded:e=!1})=>r.jsx("div",{className:Se["zoom-popup"],"data-loaded":e,children:r.jsxs("svg",{width:"38",height:"39",viewBox:"0 0 38 39",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.93 5.382a3.711 3.711 0 0 1 2.55-1.007c.949 0 1.864.36 2.549 1.007a3.534 3.534 0 0 1 1.113 2.472v11.357l10.118 3.332c.587.193 1.1.56 1.465 1.053.366.494.565 1.089.566 1.7v.004c0 .22-.025.44-.075.653v.005l-2.98 12.52a.625.625 0 0 1-1.215-.29l2.977-12.515v-.002c.029-.122.043-.247.044-.372a1.619 1.619 0 0 0-.321-.958 1.729 1.729 0 0 0-.851-.61L24.32 20.257a.625.625 0 0 1-.43-.594V7.88a2.285 2.285 0 0 0-.72-1.59 2.462 2.462 0 0 0-1.691-.665c-.635 0-1.241.24-1.69.666a2.285 2.285 0 0 0-.722 1.59v19.04a.625.625 0 0 1-1.115.388l-.056-.071-.161-.202a178.922 178.922 0 0 0-2.333-2.858l-.002-.002a2.581 2.581 0 0 0-.897-.69 2.677 2.677 0 0 0-1.122-.25H12.37c-.307 0-.61.078-.874.225a1.712 1.712 0 0 0-.635.61 1.625 1.625 0 0 0-.016 1.653l7.128 12.296a.625.625 0 0 1-1.082.627L9.762 26.35a2.876 2.876 0 0 1 .027-2.924 2.962 2.962 0 0 1 1.098-1.057 3.05 3.05 0 0 1 1.482-.384h1.016c.57.002 1.133.127 1.648.368.515.24.97.59 1.33 1.024.514.614 1.026 1.239 1.455 1.768V7.855a3.535 3.535 0 0 1 1.113-2.473ZM6.446 10.22a.625.625 0 0 1 0 .884l-5.324 5.324a.625.625 0 0 1-.884-.884l5.324-5.324a.625.625 0 0 1 .884 0Z"}),r.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.68 12.033c.345 0 .625.28.625.625v2.703h2.702a.625.625 0 1 1 0 1.25H.68a.625.625 0 0 1-.625-.625v-3.328c0-.345.28-.625.625-.625ZM16.429.237a.625.625 0 0 1 0 .884l-5.325 5.324a.625.625 0 0 1-.884-.883L15.545.237a.625.625 0 0 1 .884 0Z"}),r.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.034.68c0-.346.28-.626.625-.626h3.328c.345 0 .625.28.625.625v3.328a.625.625 0 1 1-1.25 0V1.304h-2.703a.625.625 0 0 1-.625-.625Z"})]})});Ku.displayName="ImageZoom.ZoomPopup";const Xu=({images:e,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:n,...s})=>{const[o,a]=g.useState(!1),[i,c]=g.useState(0),{containerRef:l,imgRef:u,scale:m}=Oa({defaultScale:1,maxScale:3});return r.jsxs("div",{...s,className:Se["image-mobile"],"data-disable-carrousel-pan":m>1,children:[r.jsx(Ku,{loaded:o}),r.jsx(Wu,{images:e,setCurrent:c,setFirstImgLoaded:a,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:n}),r.jsx("div",{className:Se["image-zoom--mobile"],ref:l,children:r.jsx(Gu,{imgRef:u,image:e[i],PRODUCT_IMAGE_DIMENSIONS:n})})]})};Xu.displayName="ImageZoom.ImageMobile";const U_=({children:e,Z_INDEX_WAR:t,...n})=>r.jsx("div",{...n,className:Se["image-zoom-wrapper-mobile"],style:{zIndex:t.pdp_image_zoom},children:e}),q_="_modal_1u87b_1",nt={modal:q_,"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 H_({headerTitle:e,isMobile:t,ICONS:n}){return r.jsx(d.Modal.Header,{navigation:"top",className:nt["modal-header"],children:r.jsxs(d.Modal.Controls,{navigation:"top",isMobile:t,children:[r.jsx("div",{className:nt["modal-header__title"],children:r.jsx(d.Modal.Title,{navigation:"top",className:nt["quick-shop__title"],title:e})}),r.jsx(d.Button,{className:nt["modal-header__close-button"],"data-close":!0,iconNameStart:n.close,size:"small",variant:"tertiary"})]})})}const Yu=({PDP_INFO:e,PLP_SIZE_ORDER:t,ICONS:n,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:i})=>{const{sizes:c,productId:l,handleViewItemEvent:u}=Le(),m=g.useMemo(()=>c!=null&&c.length?Yc({items:c,getLabel:b=>b.value,PLP_SIZE_ORDER:t}):[],[c]),{sizesContainerRef:p}=Sa(),{isMobile:f}=ne(),h=en(),_=hi(),{setValue:y}=mi(),{setValue:v}=ws(),x=g.useRef({}),[C,j]=g.useState(null);return r.jsxs("div",{ref:p,className:d.helpers.classNameConcat(R.styles.sizes,"PDP_sizes"),children:[r.jsx("span",{className:R.styles["sections-title"],children:e.product.size_title}),r.jsx("div",{children:m.map(b=>(!b.available&&!x.current[b.value]&&(x.current[b.value]={disable:!b.available,size:b.value,skuID:b.sku}),r.jsxs(d.ToggleSize.Wrapper,{size:f?"medium":"large",title:b.value,outOfStock:!b.available,onClick:()=>{b.available||(j({skuID:b.sku,size:b.value,disable:!0}),v(!0)),h.sku!==b.sku&&(y({...h,productId:l,name:b.name,size:b.value,sku:b.sku,sellerId:b.sellerId,sellerName:b.sellerName,available:b.available}),u({sku:b.sku,size:b.value}))},active:h.sku===b.sku,children:[r.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),r.jsx(d.ToggleSize.Text,{children:b==null?void 0:b.value})]},`sizes-${b.sku}-${b.value}`)))}),r.jsx(Fs,{open:_,setVisible:v,sku:C,setSku:j,skus:Object.values(x.current),ICONS:n,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:i})]})},Vt=({children:e,className:t,type:n})=>r.jsx("div",{className:d.helpers.classNameConcat(R.styles["pdp-main__info-subsection"],[R.styles[`subsection-${n}`],t]),children:e}),Qu=({children:e,className:t})=>{const{structureRef:n,tipbarRef:s}=Pe(),o=g.useMemo(()=>{var c,l;const a=((c=n.current)==null?void 0:c.clientHeight)||0,i=((l=s.current)==null?void 0:l.clientHeight)||0;return a+i},[n,s]);return r.jsx("div",{className:d.helpers.classNameConcat(R.styles["pdp-main__info"],t),id:"pdpmaininfo",style:{top:o},children:e})},V_=({children:e,link:t,TOGGLE_STYLE_MODIFIER:n})=>{const{isMobile:s}=ne(),{router:o}=ie(),a=()=>{t&&o.push(t)},i=g.useRef(null);return r.jsx(d.ToggleStyle.Wrapper,{size:s?"medium":"small",style:{...n,border:`${i.current===t?"2":"1"}`,overflow:"hidden",padding:"0"},onClick:a,active:i.current===t,children:e})},Zu=({productId:e,similars:t,TOGGLE_STYLE_MODIFIER:n})=>{const{thumbImage:s}=Le(),o=[{productId:e,slug:"",textureImage:(s==null?void 0:s.imageUrl)??"",textureAlt:(s==null?void 0:s.imageText)??""},...t];return r.jsx("div",{children:o.map((a,i)=>a.textureImage?r.jsxs(V_,{link:a.slug?a.slug:null,TOGGLE_STYLE_MODIFIER:n,children:[r.jsx(d.ToggleStyle.DisabledAdornment,{}),r.jsx(d.ToggleStyle.Texture,{children:r.jsx(Ee.Image,{alt:a.textureAlt,src:a.textureImage,height:34,width:34,style:{borderRadius:0,height:"100%"}})})]},`similars-item-${i}`):null)})},Ju=({TEXTURE_IMAGE:e,TOGGLE_STYLE_MODIFIER:t})=>{const{productId:n}=Le(),[s,o]=g.useState([]),a=new Map;return g.useEffect(()=>{if(n){if(a.has(n)){o(a.get(n));return}fetch("/api/catalog/product/similars",{method:"POST",body:JSON.stringify({productId:n,filterTexture:e})}).then(i=>i.json()).then(({data:i})=>{Array.isArray(i)&&i.length===0||(a.set(n,i),o(i))}).catch(i=>{console.error(i)})}},[n]),r.jsxs("div",{className:R.styles.similars,children:[r.jsx("span",{className:R.styles["sections-title"],children:"Cor"}),r.jsx(Zu,{productId:n,similars:s,TOGGLE_STYLE_MODIFIER:t})]})};Ju.displayName="PDP.Info.Similars";const $_=({callBackProductAdded:e,BUY_BUTTON_LABELS:t,ICONS:n,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PDP_INFO:a,PLP_SIZE_ORDER:i,PRODUCT_CARD_TEXTS:c,TEXTURE_IMAGE:l,TIME_ZONE:u,TOGGLE_STYLE_MODIFIER:m,Z_INDEX_WAR:p})=>r.jsx(d.Modal.Body,{className:nt["modal-product-body"],children:r.jsxs(Qu,{className:nt["pdp-main__info-modifier"],children:[r.jsxs(Vt,{type:"product-info",children:[r.jsx(Jn,{}),r.jsx(Zs,{})]}),r.jsx(Vt,{type:"similars",children:r.jsx(Ju,{TEXTURE_IMAGE:l,TOGGLE_STYLE_MODIFIER:m})}),r.jsx(Vt,{type:"sizes",children:r.jsx(Yu,{ICONS:n,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PDP_INFO:a,PLP_SIZE_ORDER:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:p})}),r.jsx(Vt,{type:"actions",children:r.jsx(qu,{showWishlist:!1,callBack:e,addToCartBtnSize:{mobile:"medium",desktop:"large"},BUY_BUTTON_LABELS:t,ICONS:n,TIME_ZONE:u,Z_INDEX_WAR:p})})]})});function W_({callBackProductAdded:e,QUICKSHOP:t,ICONS:n,...s}){const[o,a]=g.useState(!1),i=()=>a(c=>!c);return r.jsxs("div",{className:nt["quick-shop"],children:[r.jsx(d.Button,{onClick:i,size:"x-large",className:nt["shop-bag"],iconNameStart:n.bag,iconSize:"medium"}),r.jsxs(d.Modal.Root,{isOpen:o,setIsOpen:a,className:`${nt.modal} ${nt["quick-shop__modal"]}`,style:{position:"fixed",height:"100svh",width:"100%",top:0,zIndex:1e3,bottom:"unset",overflowY:"hidden"},variant:"sideRight",children:[r.jsx(H_,{headerTitle:t.title,ICONS:n}),r.jsx($_,{callBackProductAdded:e,ICONS:n,...s})]})]})}const G_=({image:e})=>r.jsx(Yt,{src:R.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)"}}),K_=({images:e,selectedImageIndex:t,PRODUCT_IMAGE_DIMENSIONS:n,...s})=>{const[o,a]=g.useState(!1),{nextimage:i}=ie();return r.jsx("div",{...s,className:Se["main-image-container"],children:r.jsxs("div",{className:Se["image-desktop"],children:[!o&&r.jsx(G_,{image:e==null?void 0:e[t]}),r.jsx(i,{src:R.resizingImg(e==null?void 0:e[t].imageUrl,{...n.image_zoom.desktop})||"",alt:e==null?void 0:e[t].imageText,className:Se.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:100,onLoad:()=>{a(!0)}})]})})},X_=({images:e,onThumbnailClick:t,selectedImageIndex:n})=>{const{nextimage:s}=ie();return r.jsx("div",{className:Se.thumbs,children:e.map((o,a)=>r.jsx("div",{role:"button",tabIndex:0,onClick:()=>t(a),onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&t(a)},className:a===n?Se.selected:"",children:r.jsx(s,{src:o.imageUrl,alt:o.imageText,layout:"responsive",width:100,height:100,objectFit:"cover",priority:!1})},a))})},ed=({images:e,initialSelectedImageIndex:t=0,setShowImageZoom:n,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o,Z_INDEX_WAR:a,...i})=>{const{isMobile:c}=ne(),[l,u]=g.useState(t),m=p=>{u(p)};return c?r.jsxs(U_,{Z_INDEX_WAR:a,children:[r.jsx(sa,{onClose:()=>n({show:!1,initialIndex:0}),ICONS:s}),r.jsx(Xu,{images:e,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o})]}):r.jsxs(B_,{Z_INDEX_WAR:a,children:[r.jsx(sa,{onClose:()=>n({show:!1,initialIndex:0}),ICONS:s}),r.jsx(K_,{images:e,selectedImageIndex:l,onThumbnailClick:m,PRODUCT_IMAGE_DIMENSIONS:o},e[l].imageId??`${e[l].imageText}-${l}`),r.jsx(X_,{images:e,selectedImageIndex:l,onThumbnailClick:m}),r.jsx(W_,{callBackProductAdded:()=>{n({initialIndex:0,show:!1})},ICONS:s,Z_INDEX_WAR:a,...i})]})};ed.displayName="ImageZoom";const Y_=({productImgs:e,PRODUCT_IMAGE_DIMENSIONS:t,...n})=>{const{video:s,productName:o}=Le(),[a,i]=g.useState({show:!1,initialIndex:0});g.useEffect(()=>(a.show?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll"),()=>{document.body.classList.remove("no-scroll")}),[a]);const c=l=>{i({show:!0,initialIndex:l})};return r.jsxs(r.Fragment,{children:[r.jsx($u,{images:e,video:s,handleZoom:c,productName:o,PRODUCT_IMAGE_DIMENSIONS:t}),a.show&&r.jsx(ed,{images:e,initialSelectedImageIndex:a.initialIndex,setShowImageZoom:i,PRODUCT_IMAGE_DIMENSIONS:t,...n})]})},td=({TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...n})=>{const{images:s}=Le(),o=g.useMemo(()=>{const a=s.filter(i=>!e.includes(i.imageLabel));return a.length>0?a:s},[]);return r.jsx(Y_,{productImgs:o,TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...n})};td.displayName="PDP.Gallery";const Q_=({className:e,hasIcons:t=!0,ICONS:n,PDP_INFO:s})=>{const{allSizesAvailable:o,productId:a}=Le(),{setValue:i}=ws(),{sendDataLayerEvent:c}=oe();return r.jsx("div",{className:d.helpers.classNameConcat(R.styles.links,e),id:"pdp-container","data-product-id":a,children:r.jsxs("div",{className:R.styles["links-wrapper"],children:[!o&&r.jsx(d.Button,{adornment:t?{start:r.jsx(d.Icon,{name:n.product})}:{},size:"x-small",variant:"tertiary",onClick:()=>i(!0),underline:!0,children:s.links_and_stepper.size_out_of_stock}),r.jsx(d.Button,{adornment:t?{start:r.jsx(d.Icon,{name:n.ruler})}:{},size:"x-small",variant:"tertiary",underline:!0,onClick:()=>{var l,u;(u=window.SizebayParams)==null||u.openChart((l=window.SizebayParams)==null?void 0:l.id),c({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:"pdp:guia-de-medidas"}}})},children:s.links_and_stepper.size_table_title}),r.jsx(d.Button,{size:"x-small",variant:"tertiary",className:"sizebay",underline:!0,onClick:()=>{var l,u;return(u=window.SizebayParams)==null?void 0:u.openVFR((l=window.SizebayParams)==null?void 0:l.id)},children:s.links_and_stepper.sizebay})]})})},Z_=({children:e})=>r.jsx("div",{className:R.styles["pdp-main__info-main-content"],children:e}),J_=({head:e,className:t})=>r.jsx("thead",{className:t,children:r.jsx("tr",{children:e.map((n,s)=>r.jsx("th",{children:n},`head-title-${s}`))})}),eg=({rows:e,className:t})=>r.jsx("tbody",{className:t,children:e.map((n,s)=>r.jsx("tr",{children:n.map(o=>typeof o=="string"&&o.includes("blocks")?JSON.parse(o).blocks.map(a=>`${a.text}
|
|
18
|
+
`):o).map((o,a)=>r.jsx("td",{children:o},`cell-content-${a}`))},`row-content-${s}`))}),tg="_tableContainer_1yxy2_1",ng={tableContainer:tg},rg=({children:e,className:t=""})=>r.jsx("table",{className:`${ng.tableContainer} ${t}`,children:e}),kr={Head:J_,Rows:eg,Root:rg},sg=({title:e,text:t})=>r.jsxs("p",{className:R.styles.measurementRowsText,children:[r.jsx("h1",{className:R.styles.measurementRowsTitle,children:e}),t]}),og=({ICONS:e,SIZES:t,Z_INDEX_WAR:n})=>{const s=yi(),{setValue:o}=vi();return r.jsx(d.Modal.Root,{isMobile:!0,style:{zIndex:n.modal},setIsOpen:o,isOpen:s,className:R.styles.measurementModal,children:r.jsx(d.Modal.Body,{children:r.jsxs("div",{className:R.styles.measurementContainer,children:[r.jsx("h1",{className:R.styles.measurementTitle,children:t.title}),r.jsxs("div",{className:R.styles.measurementContent,children:[r.jsx("div",{className:R.styles.measurementImageContainer,children:r.jsx(Yt,{width:264,height:402,alt:"",className:R.styles.measurementImage,src:t.bannerImage})}),r.jsxs(kr.Root,{className:R.styles.measurementTable,children:[r.jsx(kr.Head,{className:R.styles.measurementHead,head:t.head}),r.jsx(kr.Rows,{className:R.styles.measurementRows,rows:t.rows.map((a,i)=>[r.jsx(sg,{title:t.descriptions[i].title,text:t.descriptions[i].text},i),...a])})]})]}),r.jsx(d.Button,{onClick:()=>o(!1),className:R.styles.measurementClose,variant:"tertiary",children:r.jsx(d.Icon,{name:e.close})})]})})},"minicart")},ag=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(R.styles["pdp-main__gallery-wrapper"],t),...n,children:e}),ig=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(R.styles.pdp,t),...n,children:e}),cg=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(R.styles["pdp-main"],t),...n,children:e}),lg=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(R.styles["pdp-main__info-secondary-content"],t),...n,children:e}),ug={gallery:ag,pdp:ig,main:cg,secondary:lg},dg=({className:e,...t})=>r.jsx(d.Utils.Divider,{...t,className:d.helpers.classNameConcat(R.styles.divider,e)}),mg=Object.freeze(Object.defineProperty({__proto__:null,AccessibilityInfo:N_,Actions:qu,BreadCrumb:Hu,Credits:Vu,DescriptionsTabs:O_,Divider:dg,Freight:L_,Gallery:td,GoldenTag:Js,Header:Jn,Links:Q_,MainContent:Z_,MainInfo:Qu,Price:Zs,ProductMeasurements:og,SimilarsItems:Zu,Sizes:Yu,SubSectionWrapper:Vt,containers:ug},Symbol.toStringTag,{value:"Module"})),fg=(e,t)=>{const[n,s]=vu({items:e}),[o,a]=t.split(":").map(Number);return isNaN(o)||isNaN(a)?[n,s]:[n<o?n:o,s>a?s:a]},pg=()=>{var S;const{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:n,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:m,setOpenFilters:p}=Ls(),{state:f}=ze(),{breadcrumb:h,deleteAllFacets:_,isLoading:y=!1,facets:v,onToggleFacet:x,selectedFacets:C}=mc.contexts.searchFacets.hook(),j=g.useRef(""),b={isLast:!0,href:(S=f.term)!=null&&S.length?`/${f.term}`:"",name:f.term},w=R.filterNonRootFacets(C,f==null?void 0:f.base);return g.useEffect(()=>{const P=v.find(({key:E})=>E==="price");if(P){const[E,A]=fg(P.values,i??"10000:0");c(`${E}:${A}`)}},[v,i,c]),g.useEffect(()=>{if(!w.length)return;const P=JSON.stringify(w);j.current!==P&&(j.current=P,u({functionKey:"filterEvent",data:{commonData:{selectedFacets:w}}}))},[w]),r.jsxs(Tn.teamComponents.Filter.Root,{CONSTANTS:{ICONS:e,PLP_FILTERS_TITLE:o,PLP_FILTERS:t},breadcrumb:h.length?h:[b],deleteAllFacets:_,filters:{facets:R.filterNonCategorySelected(v,f==null?void 0:f.base),selected:w},isMobile:l??!1,isLoading:y,isOpen:m,price:i,onToggleFacet:x,setIsOpen:p,target:document.body,children:[r.jsx(Tn.teamComponents.Filter.Selected,{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:n}),r.jsx(Tn.teamComponents.Filter.Content,{columns:2,CONSTANTS:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:n,PLP_FILTERS_EMPTY:s,PLP_SIZE_ORDER:a}})]})},nd=()=>typeof document>"u"?null:r.jsx(pg,{});nd.displayName="Filters";const eo=({total:e=0})=>{const{SEARCH_TOTAL_PORTAL_ID:t}=Me();if(typeof window>"u")return null;const n=document.getElementById(t);return n?ys.createPortal(r.jsxs("span",{children:["[",e,"] produto",e>1?"s":""]}),n):null};eo.displayName="PDC.Grid.NavigationTotal";const hg=({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])},_g=()=>{const{isMobile:e}=ne(),{isLoading:t,products:n,total:s}=tn(),o=Me();return hg({productCount:n.length,PLP_GRID_SCROLL_BACK:o.PLP_GRID_SCROLL_BACK}),r.jsxs(r.Fragment,{children:[r.jsx(tt.Products,{isMobile:e??!1,items:n,...o}),!n.length&&!t&&r.jsx(tt.Empty,{ICONS:o.ICONS,PLP_NOT_RESULT:o.PLP_NOT_RESULT}),r.jsx(eo,{total:s})]})},rd=({infinite:e=!1})=>r.jsx("div",{className:Ke["pdc--grid"],children:r.jsx("div",{className:Ke["pdc--grid--content"],children:e?r.jsx(tt.InfiniteScroller,{}):r.jsx(_g,{})})});rd.displayName="Grid";const Nt=e=>({centro:"center",esquerda:"start",direita:"end"})[e],sd=({children:e,contentState:t,entityKey:n})=>{const{url:s}=t.getEntity(n).getData();return s?r.jsx(De,{href:s,children:e}):e},gg=(e,t,n)=>{e.findEntityRanges(s=>{const o=s.getEntity();return o===null?!1:n.getEntity(o).getType()==="LINK"},t)},kn=e=>{const t=new Ze.CompositeDecorator([{strategy:gg,component:sd}]),n=Ze.convertFromRaw(e);return Ze.EditorState.createWithContent(n,t)},yg=e=>Ze.convertFromRaw(e),Mn=Ze.DefaultDraftBlockRenderMap.set("unstyled",{element:"div",aliasedElements:["div"]}),oa="superior-direita",Sn="dentro-inferior-centro",vg="inferior-direita",Mr="dentro-inferior-esquerda",od=e=>({position:e===Sn||e===Mr?"absolute":"default",shouldRender:[oa,Sn,Mr].includes(e)?"top":"bottom",alignItems:[Sn].includes(e)?"center":[oa,vg].includes(e)?"flex-end":"flex-start",left:e===Mr?"16px":e===Sn?"45%":"unset"}),xg=Object.freeze(Object.defineProperty({__proto__:null,CREATE_CONTENT:kn,EXTENDED_BLOCK_RENDER_MAP:Mn,GET_CONTENT_STATE:yg,controllersPositionsAdapter:od},Symbol.toStringTag,{value:"Module"})),bg=({expanded:e,content:t})=>r.jsxs("details",{open:e,children:[t.textStructureReduced?r.jsx("summary",{onClick:n=>n.preventDefault(),children:r.jsx(Ze.Editor,{editorKey:"draft-editor-1",blockRenderMap:Mn,editorState:t!=null&&t.textStructureReduced?kn(JSON.parse(t.textStructureReduced)):Ze.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):r.jsx(r.Fragment,{}),t.showTextStructureExpander&&t.textStructure?r.jsx(r.Fragment,{children:r.jsx(Ze.Editor,{editorKey:"draft-editor-1",blockRenderMap:Mn,editorState:t.textStructure?kn(JSON.parse(t.textStructure)):Ze.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):r.jsx(r.Fragment,{})]}),jg="_textContentWrapper_176ht_5",Cg="_textContentSection_176ht_13",ts={"link-modifier":"_link-modifier_176ht_1",textContentWrapper:jg,textContentSection:Cg},ad=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:n})=>{var a;const[s,o]=g.useState(!1);return r.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:Nt(e.textStructureAlignment),alignItems:Nt(e.textStructureAlignment)},columnWrapper:{alignContent:Nt(e.textStructureAlignment),alignItems:Nt(e.textStructureAlignment)}},adornment:{bottom:e.showTextStructureExpander&&e.textStructure?r.jsx(d.Button,{variant:"tertiary",adornment:{end:r.jsx(d.Icon,{name:s?`${t.arrow_up}`:`${t.arrow_down}`})},onClick:()=>o(i=>!i),size:"small",children:s?(n==null?void 0:n.less)??"Ver Menos":(n==null?void 0:n.more)??"Ver Mais"}):r.jsx(r.Fragment,{})},children:r.jsxs(d.Utils.Column,{className:ts.textContentWrapper,style:{alignItems:Nt(e.textStructureAlignment)},children:[r.jsx(d.TextStructure.DivWrapper,{style:{textAlign:Nt(e.textStructureAlignment)},mode:e.textStructureMode??"default",children:e.textStructureReduced?r.jsx(bg,{content:e,expanded:s}):r.jsx(r.Fragment,{})}),e.textStructureButtonLabel?r.jsx(Fe,{mode:e.textStructureMode??"default",href:e.textStructureButtonHref??"#",size:e.textStructureButtonSize,className:ts["link-modifier"],adornments:(a=e.textStructureButtonIcon)!=null&&a.length&&e.enableIcon?{end:r.jsx(d.Icon,{name:e.textStructureButtonIcon})}:void 0,children:e.textStructureButtonLabel}):r.jsx(r.Fragment,{})]})})},Sg=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],aa=e=>({centro:"center",esquerda:"start",direita:"end"})[e],ia={"content-modifier":"_content-modifier_16y4u_5","banner-image-wrapper-modifier":"_banner-image-wrapper-modifier_16y4u_13"},ca=({data:e,videoUrl:t,priority:n,videoRef:s,ICONS:o,TEXTCONTENT_EXPANDED:a,TIME_ZONE:i,className:c,...l})=>{const{video:u,image:m,imageHref:p,imageOpacity:f,altImage:h,backgroundColor:_,position:y,contentAlignment:v,showTimer:x,contentOrder:C,timerMode:j,timerEnd:b,timerInit:w,textStructure:S,textStructureReduced:P}=e.banner,E=(p==null?void 0:p.trim())||(m==null?void 0:m.trim())||null,{nextimage:A}=ie();return r.jsxs(d.Banner.Container,{...l,children:[r.jsxs(d.Banner.ImageWrapper,{className:ia["banner-image-wrapper-modifier"],style:f?{background:_}:void 0,children:[u&&r.jsx(Ee.Video,{videoRef:s,src:t,autoPlay:n,loop:!0,playsInline:!0,muted:!0}),E&&!(u!=null&&u.length)&&r.jsx(A,{src:E,width:"1920",height:"1080",alt:h??m??"",...n?{priority:n}:{},style:f?{opacity:"0"}:void 0}),!m&&!(u!=null&&u.length)&&r.jsx("div",{style:{background:_}})]}),x||P||S?r.jsx(d.Banner.Slot,{...Sg(y??"centro"),className:d.helpers.classNameConcat(ia["content-modifier"],c),style:{textAlign:aa(v)},children:r.jsxs(d.Utils.Column,{gap:"16px",alignItems:aa(v),children:[x&&C==="timer-first"&&r.jsx(Ln,{mode:j??"default",size:"small",dateEnd:b?new Date(b):new Date,dateInit:w?new Date(w):new Date,TIME_ZONE:i}),r.jsx(ad,{data:e.banner,ICONS:o,TEXTCONTENT_EXPANDED:a}),x&&C!=="timer-first"&&r.jsx(Ln,{mode:j??"default",size:"small",dateEnd:b?new Date(b):new Date,dateInit:w?new Date(w):new Date,TIME_ZONE:i})]})}):r.jsx(r.Fragment,{})]})};class Ye extends g.Component{constructor(){super(...arguments);cn(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(){return{hasError:!0,error:null}}componentDidCatch(n,s){if(process.env.NODE_ENV!=="production"){if(this.props.debugger)debugger;console.groupCollapsed("Error Boundary CMS",this.props.name),console.log("Error:",(n==null?void 0:n.message)??n),console.log("Error Info:",s),console.groupEnd()}}render(){const{hasError:n}=this.state,{children:s,fallback:o}=this.props;return n&&process.env.NODE_ENV==="production"?null:n&&o!==void 0?o:s}}const rn=({data:e,className:t,priority:n,creative:s,name:o,...a})=>{const{handleSelectPromotionEvent:i,currentLocalRef:c}=oe(),{banner:{promotion_name:l},index:u,componentIndex:m}=e,p=typeof u=="number"?`:${u+1}`:"",f={creative_name:s,creative_slot:`${s}-${c.current}:${m+1}${p}`,promotion_id:e.banner.href,promotion_name:l},h=g.useRef(null),_=g.useMemo(()=>{var v;if((v=e.banner.video)!=null&&v.includes("player.vimeo")){const x=e.banner.video.split("?")[1],C=x==null?void 0:x.split("&"),j=C==null?void 0:C.filter(w=>w.includes("loc")||w.includes("signature")||w.includes("user_id")),b=j==null?void 0:j.join("&");return`${e.banner.video.split("?")[0]}?${b}`}return e.banner.video},[e]),y=()=>{var v;(v=h.current)!=null&&v.paused&&h.current.play()};return r.jsx(Ye,{name:o,children:r.jsx(Gn,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...f,index:u}}}},observerOptions:{delay:100,..._&&{threshold:.1}},..._&&{callBackWhenVisible:y},children:e.banner.href?r.jsx(De,{href:e.banner.href,onClick:()=>{i({updatePromotionRef:!0,promotion:f,index:u})},children:r.jsx(ca,{data:e,videoUrl:_,priority:n,videoRef:h,className:t,...a})}):r.jsx(ca,{data:e,videoUrl:_,priority:n,videoRef:h,className:t,...a})})})},to=e=>r.jsx(Ye,{name:e.name,children:r.jsx(rn,{...e})}),id=({columns:e,count:t,gap:n,className:s})=>{var v;const{banners:o,pages:a,products:i}=ct(),{isMobile:c}=ne(),{banners:l}=qn(),{ICONS:u,PRODUCT_CARD_IMAGE_ASPECT_RATIO:m,TEXTCONTENT_EXPANDED:p,TIME_ZONE:f}=Me(),h=((v=a[a.length-1])==null?void 0:v.products.length)??t,_=i[(a.length-1)*t+h-1],y=l.filter((x,C)=>o[C]<_);return Array.isArray(y)?y.map((x,C)=>r.jsx(st.Banner,{columns:x.columns,gap:n,isMobile:c??!1,position_grid:o[C]+1,totalColumns:e,PRODUCT_CARD_IMAGE_ASPECT_RATIO:m,children:r.jsx(rn,{name:"Banner Carousel",data:{banner:x,componentIndex:C},creative:"banner_grid",ICONS:u,TEXTCONTENT_EXPANDED:p,TIME_ZONE:f,className:s})},`${x.position_grid}-${C}`)):null};id.displayName="PDC.InfiniteScroller.Banners";const cd=e=>{var s;const{pages:t}=ct(),n=t[t.length-1];return(n==null?void 0:n.page)!==((s=n==null?void 0:n.pagination)==null?void 0:s.total)&&!(n!=null&&n.loading)?r.jsx(Wn,{...e}):null};cd.displayName="PDC.InfiniteScroller.Loading";const ld=({page:e,...t})=>{const{updateParamPage:n}=ct(),{element:s}=Fn({callback:()=>n(e),options:{threshold:0}});return r.jsx("div",{...t,id:`pdc-scroll-infinite-${e.page}`,className:Ke["pdc--infinite--loader"],"data-page":e.page,ref:s})};ld.displayName="PDC.Page.Anchor";const ud=({first:e,gap:t,isMobile:n=!1,item:s,index:o,last:a=!1,order:i,page:c,showVideo:l=!1})=>{const{load:u,handleNotify:m}=ct(),{getAvailableProductTag:p}=ht(),{BUY_BUTTON_LABELS:f,MAIN_IMAGE:h,PLP_GRID_SCROLL_BACK:_,PLP_INFINITE_SCROLL:y,PLP_PRODUCT_SIMILAR_DELAY:v,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:x,PLP_SIZE_ORDER:C,PRODUCT_CARD_IMAGE_ASPECT_RATIO:j,PRODUCT_CARD_TEXTS:b,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:w,PRODUCT_IMAGE_DIMENSIONS:S,SECOND_IMAGE:P,StoreConfig_MainSellerId:E,TEXTURE_IMAGE:A,Z_INDEX_WAR:O,ICONS:k}=Me(),M=p(s==null?void 0:s.cluster.highlights);return r.jsx(st.Card,{className:s.id==="skeleton"?Ke["pdc--infinite--card--disabled"]:"",gap:t,isMobile:n??!1,item:s,order:i,tag:M,index:o,setSkuSelected:m,showVideo:l,CONSTANTS:{BUY_BUTTON_LABELS:f,MAIN_IMAGE:h,PLP_GRID_SCROLL_BACK:_,PLP_INFINITE_SCROLL:y,PLP_PRODUCT_SIMILAR_DELAY:v,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:x,PLP_SIZE_ORDER:C,PRODUCT_CARD_IMAGE_ASPECT_RATIO:j,PRODUCT_CARD_TEXTS:b,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:w,PRODUCT_IMAGE_DIMENSIONS:S,SECOND_IMAGE:P,StoreConfig_MainSellerId:E,TEXTURE_IMAGE:A,Z_INDEX_WAR:O,ICONS:k},children:c&&u&&r.jsxs(r.Fragment,{children:[e&&r.jsx(Rn.Anchor,{page:c}),!c.loading&&r.jsx(Rn.Loader,{page:c}),a&&c.loading&&r.jsx(Rn.NextPage,{page:c})]})})};ud.displayName="PDC.Page.Card";const dd=({type:e="default",page:t,...n})=>{const{load:s,updatePage:o}=ct(),{element:a}=Fn({callback:()=>o(t),onEnterViewportOnce:!0,options:{threshold:1}});return s===!0&&r.jsx("div",{...n,className:Ke[`pdc--infinite--loader${e==="page"?"--page":""}`],ref:a})};dd.displayName="PDC.Page.Loader";const md=({page:e,...t})=>{var o;const{addNewPage:n}=ct(),{element:s}=Fn({callback:()=>{n(e)},onEnterViewportOnce:!0,options:{threshold:[.5,1]}});return((o=e==null?void 0:e.pagination)==null?void 0:o.nextPage)===!0&&e.loading===!0?r.jsx("div",{...t,className:Ke["pdc--infinite--next-page--card"],"data-next-page":!0,ref:s}):null};md.displayName="PDC.Page.NextPage";const Rn={Anchor:ld,Card:ud,Loader:dd,NextPage:md},fd=({count:e,gap:t,page:n})=>{const{isMobile:s}=ne(),{columns:o,products:a}=ct(),i=(n.page-1)*e,c=zi(n.products,o);return Array.isArray(n.products)?n.products.map((l,u)=>r.jsx(Rn.Card,{first:u===0,last:u===n.products.length-1,gap:t,index:u,item:l.node,isMobile:s??!1,order:a[i+u]+1,page:u===0||u===n.products.length-1?n:void 0,showVideo:!!c.indexOf(u)},a[i+u]+1)):null};fd.displayName="PDC.Page";const Pg=({pages:e,load:t,PLP_GRID_SCROLL_BACK:n})=>{const s=g.useRef(!1);g.useEffect(()=>{const o=e[e.length-1];if(t&&o&&!s.current){const a=sessionStorage.getItem(n.refer),i=sessionStorage.getItem(n.order),c=document.querySelector(a==="true"?`[data-order="${i}"]`:`#pdc-scroll-infinite-${o.page}`);c&&(s.current=!0,sessionStorage.setItem(n.refer,"false"),o.page>1&&c.scrollIntoView({behavior:"instant",block:"start"}))}if(!t&&s.current){s.current=!1;const a=document.querySelector("body > main");a&&a.scrollIntoView({behavior:"instant",block:"start"})}},[t,e])},wg=()=>{var l,u;const{count:e}=ze(),{columns:t,gap:n,load:s,pages:o,total:a}=ct(),i=Me(),{PLP_GRID_SCROLL_BACK:c}=Me();return Pg({pages:o,load:s,PLP_GRID_SCROLL_BACK:c}),r.jsxs(r.Fragment,{children:[s===!0&&((u=(l=o[0])==null?void 0:l.pagination)==null?void 0:u.count)===0&&r.jsx(tt.Empty,{ICONS:i.ICONS,PLP_NOT_RESULT:i.PLP_NOT_RESULT}),r.jsxs(st.Root,{children:[Array.isArray(o)&&o.map((m,p)=>r.jsx(fd,{count:e,gap:n,page:m},p)),r.jsx(id,{columns:t,count:e,gap:n})]}),r.jsx(eo,{total:a}),r.jsx(cd,{})]})},pd=()=>{const{banners:e}=qn();return r.jsx(ec,{banners:e,children:r.jsx(wg,{})})};pd.displayName="PDC.InfiniteScroller";const hd=()=>{const{setOpenFilters:e}=Ls(),{selectedFacets:t,onToggleFacet:n,onSort:s}=Ti(),{state:o}=ze(),{Z_INDEX_WAR:a}=Me(),i=R.filterNonRootFacets(t,o==null?void 0:o.base);return r.jsx(pt.Root,{onSort:s,setOpenFilters:e,style:{zIndex:a.plp_navigation},children:r.jsx(pt.Selected,{callback:n,selected:i})})};hd.displayName="Navigation";const ns=({currentPage:e,callback:t,type:n,...s})=>r.jsx(d.Button,{...s,iconNameStart:`arrow-${n}`,onClick:()=>{typeof t=="function"&&t(n==="left"?"prev":"")},size:"large",variant:"tertiary"});ns.displayName="Arrow";const rs=({active:e,prev:t,ellipses:n,page:s,selectedPage:o})=>r.jsxs(r.Fragment,{children:[n&&t&&r.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."}),e&&r.jsx(d.Pagination.Item,{isActive:!1,index:s,variant:"tertiary",onClick:()=>{typeof o=="function"&&o(s)},children:s}),n&&!t&&r.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."})]});rs.displayName="PageEllipses";const _d=({children:e,endPage:t,page:n,total:s,selectedPage:o,ITEMS_PER_SECTION:a})=>r.jsxs(r.Fragment,{children:[r.jsx(rs,{active:n>=a&&s>a,selectedPage:o,currentPage:n,prev:!1,ellipses:n>a&&s>a,page:1}),e,r.jsx(rs,{active:s-n>1&&s!==t,selectedPage:o,currentPage:n,prev:!0,ellipses:t<s-1,page:s})]});_d.displayName="Pagination.Layout";const Eg=(e,t,n)=>{const s=new URLSearchParams(n);return s.set(e,t),s.toString()},Ng=(e,t)=>{const n=[];for(let s=e;s<=t;s++)n.push(s);return n},Ig=({currentPage:e,total:t,maxVisiblePages:n,SEARCH_PAGE_ITEM_THRESHOLD:s})=>{const o=t>=s?s:t,a=Math.max(1,e===o?o-n+1:e-Math.floor(n/2)),i=Math.min(o,a+n-1);return{startPage:a,endPage:i,totalPages:o}},gd=({currentPage:e,pages:t,searchParams:n,VARIANT_PAGINATION:s})=>{const{router:o,pathname:a}=ie();return Array.isArray(t)?t.map(i=>r.jsx(d.Pagination.Item,{isActive:e===i,index:i,variant:e===i?s.active:s.default,onClick:()=>o.push(`${a}?${Eg("page",i.toString(),n)}`),children:i},i)):null};gd.displayName="Pages";const no=({query:e,type:t="default",searchParams:n,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:a,SEARCH_PAGE_ITEM_THRESHOLD:i,VARIANT_PAGINATION:c,...l})=>{const{router:u,pathname:m}=ie(),{state:{page:p=1}}=ze(),{pagination:{total:f}}=tn(),{endPage:h,totalPages:_,startPage:y}=Ig({currentPage:p,total:f,maxVisiblePages:o,SEARCH_PAGE_ITEM_THRESHOLD:i}),v=C=>{const j=C.toString(),b=new URLSearchParams(n.toString());t==="default"&&b.set("page",j),t==="search"&&(b.set("query",e??""),b.set("count",a.toString()),b.set("page",j),s&&b.set("sort",s.replace("_",":")));const S=`${t==="search"?"/search":m}?${b.toString()}`;u.push(S)},x=C=>{v(C==="prev"?p-1:p+1)};return f?r.jsx("div",{...l,className:Ke["pdc--pagination"],children:r.jsx(d.Pagination.Wrapper,{adornment:{start:r.jsx(ns,{callback:x,currentPage:p,disabled:p<2,type:"left"}),end:r.jsx(ns,{callback:x,currentPage:p,disabled:p>=_,type:"right"})},children:r.jsx(_d,{endPage:h,page:p,selectedPage:v,total:f,ITEMS_PER_SECTION:o,children:r.jsx(gd,{currentPage:p,pages:Ng(y,h),searchParams:n,VARIANT_PAGINATION:c})})})}):r.jsx(r.Fragment,{})};no.displayName="Pagination";const yd=({gap:e,isMobile:t,className:n})=>{const{count:s,state:o}=ze(),{banners:a}=qn(),{ICONS:i,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u}=Me(),m=a.filter(p=>Ui(p.position_grid,o.page,s));return Array.isArray(m)?m.map((p,f)=>r.jsx(st.Banner,{columns:p.columns,gap:e,isMobile:t,position_grid:p.position_grid,totalColumns:t?2:4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,children:r.jsx(rn,{name:"Banner Carousel",data:{banner:p,componentIndex:f},creative:"banner_grid",ICONS:i,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u,className:n})},p.position_grid)):null};yd.displayName="PDC.Grid.Banners";const ro=({isMobile:e=!1,items:t,BUY_BUTTON_LABELS:n,ICONS:s,MAIN_IMAGE:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PLP_GRID_SCROLL_BACK:c,PLP_INFINITE_SCROLL:l,PLP_PRODUCT_SIMILAR_DELAY:u,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:m,PLP_SIZE_ORDER:p,PRODUCT_CARD_IMAGE_ASPECT_RATIO:f,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:y,SECOND_IMAGE:v,StoreConfig_MainSellerId:x,TEXTURE_IMAGE:C,Z_INDEX_WAR:j})=>{const{getAvailableProductTag:b}=ht(),{count:w,state:S}=ze(),[P,E]=g.useState(!1),[A,O]=g.useState(null),[k,M]=g.useState([]),Q=g.useCallback((Y,G)=>{const H=G?Bn([G]):null;M(Y),O(H!=null&&H.length?H[0]:null),E(!0)},[]),D=e?8:16,q=(S.page-1)*w,U=st.helpers.createGridPosAndVideo(t,[],e?2:4,S.page);return r.jsxs(r.Fragment,{children:[r.jsxs(st.Root,{children:[Array.isArray(t)&&t.map((Y,G)=>{var Z,re;const H=b(Y.node.cluster.highlights);return r.jsx(st.Card,{gap:D,isMobile:e??!1,item:Y.node,order:q+(((Z=U[G])==null?void 0:Z.position)??0),tag:H,index:G,setSkuSelected:Q,showVideo:(re=U[G])==null?void 0:re.canPlayVideo,CONSTANTS:{BUY_BUTTON_LABELS:n,MAIN_IMAGE:o,PLP_GRID_SCROLL_BACK:c,PLP_INFINITE_SCROLL:l,PLP_PRODUCT_SIMILAR_DELAY:u,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:m,PLP_SIZE_ORDER:p,PRODUCT_CARD_IMAGE_ASPECT_RATIO:f,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:y,SECOND_IMAGE:v,StoreConfig_MainSellerId:x,TEXTURE_IMAGE:C,Z_INDEX_WAR:j,ICONS:s}},Y.node.sku)}),t.length>0&&r.jsx(yd,{gap:D,isMobile:e??!1})]}),r.jsx(Un,{open:P,sku:A,skus:k,setSku:O,setVisible:E,ICONS:s,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:h,Z_INDEX_WAR:j})]})};ro.displayName="PDC.Products";const tt={Empty:Ws,Filters:nd,Grid:rd,InfiniteScroller:pd,Spinner:Wn,Navigation:hd,Notification:Un,Pagination:no,Products:ro},vd=({className:e,...t})=>{const{searchParams:n,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:a,PLP_INFINITE_SCROLL:i,SEARCH_PAGE_ITEM_THRESHOLD:c,VARIANT_PAGINATION:l}=t;return r.jsx(sf,{...t,children:r.jsxs("div",{className:d.helpers.classNameConcat(Ke.pdc,e),children:[r.jsxs(Ri,{forceUpdate:!0,children:[r.jsx(tt.Navigation,{}),r.jsx(tt.Filters,{})]}),i===!0?r.jsx(tt.Grid,{infinite:!0}):r.jsxs(Os,{forceUpdate:!0,query:n.get("query")??void 0,children:[r.jsx(tt.Grid,{}),r.jsx(tt.Pagination,{searchParams:n,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:a,SEARCH_PAGE_ITEM_THRESHOLD:c,VARIANT_PAGINATION:l})]})]})})};vd.displayName="Templates.PDC";const xd=g.createContext({}),Rg=({children:e,...t})=>r.jsx(xd.Provider,{value:t,children:e}),er=()=>{const e=g.useContext(xd);if(e===void 0)throw new Error("useSearchConstants must be used within a SearchConstantsProvider");return e},Tg="_grid_e75z7_21",Ag="_navigation_e75z7_44",Og="_spinner_e75z7_70",Lg="_sort_e75z7_76",ft={"rearch-result--empty":"_rearch-result--empty_e75z7_1",grid:Tg,"grid-header":"_grid-header_e75z7_37",navigation:Ag,"result-disclaimer":"_result-disclaimer_e75z7_51",spinner:Og,sort:Lg,"search-result":"_search-result_e75z7_91"},bd=({term:e})=>{const{router:t}=ie(),{SEARCH_RESULT:n,ICONS:s}=er(),o=()=>{t.push(n.EMPTY.ALL_TERMS)};return r.jsxs("div",{className:ft["rearch-result--empty"],children:[r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("div",{className:R.responsive["responsive-desktop-flex"],children:r.jsx("h2",{className:"typography-style-heading-sm",children:n.EMPTY.NOT_FOUND})}),r.jsx("div",{className:R.responsive["responsive-mobile-flex"],children:r.jsx("h2",{className:"typography-style-body-md",children:n.EMPTY.NOT_FOUND})}),r.jsxs("p",{children:[n.EMPTY.NOT_FOUND_P," ",`"${e}"`]})]}),r.jsx(d.Button,{onClick:()=>o(),variant:"tertiary",size:"medium",adornment:{end:r.jsx(d.Icon,{name:s.arrow_right,size:"medium"})},children:n.EMPTY.ALL_TERMS_LABEL})]})};bd.displayName="RearchResult.Empty";const kg=e=>r.jsxs(r.Fragment,{children:[r.jsx("div",{className:R.responsive["responsive-desktop-flex"],children:r.jsx("h2",{className:"typography-style-heading-sm",children:e.SEARCH.SEARCHING})}),r.jsx("div",{className:R.responsive["responsive-mobile-flex"],children:r.jsx("h2",{className:"typography-style-body-md",children:e.SEARCH.SEARCHING})}),r.jsx(d.Spinner,{className:ft.spinner})]}),Mg=(e,t,n)=>r.jsxs(r.Fragment,{children:[r.jsx("div",{className:R.responsive["responsive-desktop-flex"],children:r.jsx("h2",{className:"typography-style-heading-sm",children:t.SEARCH.SEARCHED})}),r.jsx("div",{className:R.responsive["responsive-mobile-flex"],children:r.jsx("h2",{className:"typography-style-body-md",children:t.SEARCH.SEARCHED})}),r.jsxs("p",{children:[t.SEARCH.SEARCHED_P_START," ",e," ",t.SEARCH.SEARCHED_P_END," ",`"${n}"`]})]}),jd=({isLoading:e,quantity:t,term:n})=>{const{SEARCH_RESULT:s}=er();return r.jsx(d.TextStructure.DivWrapper,{children:e?kg(s):Mg(t,s,n)})};jd.displayName="Search.Loading";const Dg=({term:e})=>{const[t,n]=g.useState(!1),{router:s}=ie(),{searchParams:o}=ze(),{ITEMS_DEFAULT_SORT:a,ITEMS_PER_PAGE:i,ICONS:c}=er(),l=u=>{R.navigateToSearchPage(s,e,i,1,u??a)};return r.jsx("div",{className:ft.sort,children:r.jsx(Yn,{handleSelectValue:u=>l(u??"release_desc"),sortListOpen:t,setSortListOpen:n,searchParams:o,ICONS:c})})},Fg=({query:e})=>{const{isLoading:t,products:n,pagination:s}=tn();return r.jsxs("div",{className:ft["grid-header"],children:[r.jsxs("div",{className:ft.navigation,children:[!t&&(n!=null&&n.length)?r.jsx(Dg,{term:e}):null,r.jsx(d.Utils.Divider,{})]}),!t&&(n!=null&&n.length)?r.jsx("div",{className:ft["result-disclaimer"],children:r.jsx(jd,{term:e,isLoading:t,quantity:s.count})}):null]})},Cd=({isMobile:e=!1,query:t})=>{const{isLoading:n,products:s,pagination:o}=tn(),{searchParams:a}=ze(),i=er(),{sendDataLayerEvent:c}=oe(),l=g.useRef({query:t,sended:!1}),u=g.useMemo(()=>!n&&s.length>0&&o.count>0,[n,s.length,o.count]);return g.useEffect(()=>{if(!n){if(l.current.query!==t){l.current.sended=!1,l.current.query=t;return}l.current.sended||(c({functionKey:"readyEvents",data:{event:"view_search_results",readyData:{search_term:t,search_found:(s==null?void 0:s.length)>0}}}),l.current.sended=!0)}},[t,s,n,c]),r.jsxs("div",{className:ft.grid,children:[u?r.jsx(Fg,{query:t}):r.jsx(r.Fragment,{}),!n&&(s!=null&&s.length)?r.jsx(ro,{isMobile:e??!1,items:s,...i}):r.jsx(r.Fragment,{}),(s==null?void 0:s.length)===0&&!n?r.jsx(bd,{term:t}):null,u&&r.jsx(no,{searchParams:a,...i})]})};Cd.displayName="SearchResultContent";const zg=({className:e})=>{const{state:t}=ze(),{isMobile:n}=ne();return r.jsx(Os,{forceUpdate:!1,query:t.term??"",children:r.jsx("div",{className:d.helpers.classNameConcat(ft["search-result"],e),children:r.jsx(Cd,{currentPage:t.page,isMobile:n??!1,query:t.term??""})})})},Sd=({className:e,searchParams:t,CONSTANTS:n})=>{const s=new URLSearchParams(t??""),o=String((s==null?void 0:s.get("query"))??""),a=Number((s==null?void 0:s.get("count"))??0),i=Number((s==null?void 0:s.get("page"))??0),c=String((s==null?void 0:s.get("sort"))??"");return r.jsx(Rg,{...n,children:r.jsx(As,{sort:c,state:{sort:c,base:"",facets:[],term:o,page:i,count:a},count:a,searchParams:s,ITEMS_PER_PAGE:n.ITEMS_PER_PAGE,children:r.jsx(zg,{className:e})})})};Sd.displayName="Search";const Bg=({page:e,data:t})=>{const{pathname:n}=ie(),s=g.useRef(null),{sendDataLayerEvent:o,currentLocalRef:a,itemListRef:i,promotionEventRef:c}=oe();return g.useEffect(()=>{const l=Hi("login_event")||"{}",u=JSON.parse(l);if(u.name||u.method){const m=new Date(0);o({functionKey:"readyEvents",data:{event:u.name,readyData:{method:u.method}}}),Ms("login_event","",{expires:m})}},[]),g.useEffect(()=>{if(s.current===n)return;s.current=n;let l={};switch(e){case"PDP":{const m=t,p={};if(!m){l={page_category:"pdp"};break}m.items.forEach(({itemId:f,sellers:h})=>p[f]=h[0].commertialOffer.AvailableQuantity),l={page_category:"pdp",seller_ids:m.items.map(({sellers:f})=>f[0].sellerId).join(),skuStocks:p,product_reference_id:m.productReference};break}case"PDC":{const{page_category:m,page_departament:p,id:f,name:h}=Ia(),_=h,y=f;l={page_category:"lista_produtos",...p&&{page_departament:p}},i.current={item_list_name:n==="/search"?"busca":_??void 0,item_list_id:n==="/search"?void 0:y??void 0},p&&o({functionKey:"readyEvents",data:{event:"view_category",readyData:{page_category:m,page_departament:p}}});break}default:l={page_category:e},c.current={},i.current={};break}const u={region:e,...l};a.current=e,o({functionKey:"readyEvents",data:{readyData:{vtex_version:"fast",...u}},timeout:0})},[n]),null};var ss={exports:{}},Pn={exports:{}},la;function Ug(){return la||(la=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(l,u){for(var m in u)Object.defineProperty(l,m,{enumerable:!0,get:u[m]})}n(t,{DOMAttributeNames:function(){return s},default:function(){return c},isEqualNode:function(){return a}});const s={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function o(l){let{type:u,props:m}=l;const p=document.createElement(u);for(const _ in m){if(!m.hasOwnProperty(_)||_==="children"||_==="dangerouslySetInnerHTML"||m[_]===void 0)continue;const y=s[_]||_.toLowerCase();u==="script"&&(y==="async"||y==="defer"||y==="noModule")?p[y]=!!m[_]:p.setAttribute(y,m[_])}const{children:f,dangerouslySetInnerHTML:h}=m;return h?p.innerHTML=h.__html||"":f&&(p.textContent=typeof f=="string"?f:Array.isArray(f)?f.join(""):""),p}function a(l,u){if(l instanceof HTMLElement&&u instanceof HTMLElement){const m=u.getAttribute("nonce");if(m&&!l.getAttribute("nonce")){const p=u.cloneNode(!0);return p.setAttribute("nonce",""),p.nonce=m,m===l.nonce&&l.isEqualNode(p)}}return l.isEqualNode(u)}let i;process.env.__NEXT_STRICT_NEXT_HEAD?i=(l,u)=>{const m=document.querySelector("head");if(!m)return;const p=m.querySelectorAll('meta[name="next-head"]')||[],f=[];if(l==="meta"){const y=m.querySelector("meta[charset]");y&&f.push(y)}for(let y=0;y<p.length;y++){var h;const x=p[y].nextSibling;(x==null||(h=x.tagName)==null?void 0:h.toLowerCase())===l&&f.push(x)}const _=u.map(o).filter(y=>{for(let v=0,x=f.length;v<x;v++){const C=f[v];if(a(C,y))return f.splice(v,1),!1}return!0});f.forEach(y=>{var v;const x=y.previousSibling;if(x&&x.getAttribute("name")==="next-head"){var C;(C=y.parentNode)==null||C.removeChild(x)}(v=y.parentNode)==null||v.removeChild(y)}),_.forEach(y=>{var v;const x=document.createElement("meta");x.name="next-head",x.content="1",((v=y.tagName)==null?void 0:v.toLowerCase())==="meta"&&y.getAttribute("charset")||m.appendChild(x),m.appendChild(y)})}:i=(l,u)=>{const m=document.getElementsByTagName("head")[0],p=m.querySelector("meta[name=next-head-count]");if(process.env.NODE_ENV!=="production"&&!p){console.error("Warning: next-head-count is missing. https://nextjs.org/docs/messages/next-head-count-missing");return}const f=Number(p.content),h=[];for(let v=0,x=p.previousElementSibling;v<f;v++,x=(x==null?void 0:x.previousElementSibling)||null){var _;(x==null||(_=x.tagName)==null?void 0:_.toLowerCase())===l&&h.push(x)}const y=u.map(o).filter(v=>{for(let x=0,C=h.length;x<C;x++){const j=h[x];if(a(j,v))return h.splice(x,1),!1}return!0});h.forEach(v=>{var x;return(x=v.parentNode)==null?void 0:x.removeChild(v)}),y.forEach(v=>m.insertBefore(v,p)),p.content=(f-h.length+y.length).toString()};function c(){return{mountedInstances:new Set,updateHead:l=>{const u={};l.forEach(f=>{if(f.type==="link"&&f.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+f.props["data-href"]+'"]'))return;f.props.href=f.props["data-href"],f.props["data-href"]=void 0}const h=u[f.type]||[];h.push(f),u[f.type]=h});const m=u.title?u.title[0]:null;let p="";if(m){const{children:f}=m.props;p=typeof f=="string"?f:Array.isArray(f)?f.join(""):""}p!==document.title&&(document.title=p),["meta","base","link","style","script"].forEach(f=>{i(f,u[f]||[])})}}}(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});function n(S,P){for(var E in P)Object.defineProperty(S,E,{enumerable:!0,get:P[E]})}n(t,{default:function(){return w},handleClientScriptLoad:function(){return v},initScriptLoader:function(){return j}});const s=Oe,o=bt,a=r,i=s._(ys),c=o._(g),l=Mu(),u=Ug(),m=kc(),p=new Map,f=new Set,h=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],_=S=>{if(i.default.preinit){S.forEach(P=>{i.default.preinit(P,{as:"style"})});return}if(typeof window<"u"){let P=document.head;S.forEach(E=>{let A=document.createElement("link");A.type="text/css",A.rel="stylesheet",A.href=E,P.appendChild(A)})}},y=S=>{const{src:P,id:E,onLoad:A=()=>{},onReady:O=null,dangerouslySetInnerHTML:k,children:M="",strategy:Q="afterInteractive",onError:D,stylesheets:q}=S,U=E||P;if(U&&f.has(U))return;if(p.has(P)){f.add(U),p.get(P).then(A,D);return}const Y=()=>{O&&O(),f.add(U)},G=document.createElement("script"),H=new Promise((Z,re)=>{G.addEventListener("load",function(ue){Z(),A&&A.call(this,ue),Y()}),G.addEventListener("error",function(ue){re(ue)})}).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()):P&&(G.src=P,p.set(P,H));for(const[Z,re]of Object.entries(S)){if(re===void 0||h.includes(Z))continue;const ue=u.DOMAttributeNames[Z]||Z.toLowerCase();G.setAttribute(ue,re)}Q==="worker"&&G.setAttribute("type","text/partytown"),G.setAttribute("data-nscript",Q),q&&_(q),document.body.appendChild(G)};function v(S){const{strategy:P="afterInteractive"}=S;P==="lazyOnload"?window.addEventListener("load",()=>{(0,m.requestIdleCallback)(()=>y(S))}):y(S)}function x(S){document.readyState==="complete"?(0,m.requestIdleCallback)(()=>y(S)):window.addEventListener("load",()=>{(0,m.requestIdleCallback)(()=>y(S))})}function C(){[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(P=>{const E=P.id||P.getAttribute("src");f.add(E)})}function j(S){S.forEach(v),C()}function b(S){const{id:P,src:E="",onLoad:A=()=>{},onReady:O=null,strategy:k="afterInteractive",onError:M,stylesheets:Q,...D}=S,{updateScripts:q,scripts:U,getIsSsr:Y,appDir:G,nonce:H}=(0,c.useContext)(l.HeadManagerContext),Z=(0,c.useRef)(!1);(0,c.useEffect)(()=>{const ue=P||E;Z.current||(O&&ue&&f.has(ue)&&O(),Z.current=!0)},[O,P,E]);const re=(0,c.useRef)(!1);if((0,c.useEffect)(()=>{re.current||(k==="afterInteractive"?y(S):k==="lazyOnload"&&x(S),re.current=!0)},[S,k]),(k==="beforeInteractive"||k==="worker")&&(q?(U[k]=(U[k]||[]).concat([{id:P,src:E,onLoad:A,onReady:O,onError:M,...D}]),q(U)):Y&&Y()?f.add(P||E):Y&&!Y()&&y(S)),G){if(Q&&Q.forEach(ue=>{i.default.preinit(ue,{as:"style"})}),k==="beforeInteractive")return E?(i.default.preload(E,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([E,{...D,id:P}])+")"}})):(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:P}])+")"}}));k==="afterInteractive"&&E&&i.default.preload(E,D.integrity?{as:"script",integrity:D.integrity,nonce:H,crossOrigin:D.crossOrigin}:{as:"script",nonce:H,crossOrigin:D.crossOrigin})}return null}Object.defineProperty(b,"__nextScript",{value:!0});const w=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)})(ss,ss.exports);var qg=ss.exports,Hg=qg;const Pd=R.getDefaultExportFromCjs(Hg),Vg=({children:e,ONE_TRUST:t})=>r.jsxs(r.Fragment,{children:[r.jsx(Pd,{src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",defer:!0,strategy:"afterInteractive","data-domain-script":t.siteId,type:"text/javascript"}),e]}),$g=Al(()=>Promise.resolve(Vg),{ssr:!1}),Wg="_lgpd_vffd3_82",Gg="_success_vffd3_248",Kg="_error_vffd3_312",ye={"newsletter-root":"_newsletter-root_vffd3_1","has-border-top":"_has-border-top_vffd3_9","has-border-bottom":"_has-border-bottom_vffd3_12","newsletter-container":"_newsletter-container_vffd3_20","content-text":"_content-text_vffd3_35","form-wrapper":"_form-wrapper_vffd3_39","newsletter-container-banner":"_newsletter-container-banner_vffd3_64",lgpd:Wg,"textfield-structure-modifier":"_textfield-structure-modifier_vffd3_190","input-wrapper-modifier":"_input-wrapper-modifier_vffd3_196","submit-btn":"_submit-btn_vffd3_200","loading-spinner":"_loading-spinner_vffd3_211","terms-and-conditions-checkbox":"_terms-and-conditions-checkbox_vffd3_217","terms-and-conditions-unchecked":"_terms-and-conditions-unchecked_vffd3_230","terms-and-conditions-checked":"_terms-and-conditions-checked_vffd3_244",success:Gg,"text-structure-modifier":"_text-structure-modifier_vffd3_257","success-title":"_success-title_vffd3_297","close-button":"_close-button_vffd3_302",error:Kg,"newsletter-wrapper":"_newsletter-wrapper_vffd3_332","banner-container":"_banner-container_vffd3_345","newsletter-provider-wrapper":"_newsletter-provider-wrapper_vffd3_358","newsletter-root-banner":"_newsletter-root-banner_vffd3_371","banner-background":"_banner-background_vffd3_392","newsletter-provider-wrapper-background":"_newsletter-provider-wrapper-background_vffd3_401"},wd=({invalid_message:e,master_data_field:t,placeholder:n,required:s=!1,CONSTANTS:o})=>{const{isMobile:a}=ne(),{inputsStatus:i,setInputsStatus:c,setFormStatus:l,variant:u}=zs();return r.jsx(d.TextField.Structure,{className:`${ye["textfield-structure-modifier"]} ${u}`,input:r.jsx(d.TextField.Input,{mode:"simple",label:n,sizeVariant:a?o.NEWSLETTER_CONFIGS.interactionSizeMob:o.NEWSLETTER_CONFIGS.interactionSizeDesk,name:t,className:`${ye["input-wrapper-modifier"]} ${u}`,feedback:i[t]==="required"?"error":i[t],onChange:()=>{i[t]!=="none"&&(c(m=>({...m,[t]:"none"})),l("idle"))},required:s}),supportText:i[t]==="error"||i[t]==="required"?r.jsx("div",{className:u==="horizontal"?ye["support-text-modifier"]:"",children:r.jsx(d.TextField.SupportText,{text:i[t]==="error"?e??o.NEWSLETTER_CONFIGS.messages.invalid_generic:o.NEWSLETTER_CONFIGS.messages.required_field,feedback:"error"})}):null})};wd.displayName="Newsletter.Input";const Ed=({formStatus:e,fields:t,CONSTANTS:n})=>r.jsxs(r.Fragment,{children:[Array.isArray(t)&&t.map((s,o)=>r.jsx(wd,{invalid_message:s.invalid_message,master_data_field:s.master_data_field,placeholder:s.placeholder,required:s.required,type:s.type,CONSTANTS:n},`nt-field-${s.master_data_field}-${o}`)),e==="error"&&r.jsx("div",{className:ye.error,children:r.jsx("p",{children:n.NEWSLETTER_CONFIGS.form.status.error})})]});Ed.displayName="Newsletter.FormFields";const Nd=({formStatus:e,CONSTANTS:t,...n})=>{const{isMobile:s}=ne();return r.jsxs(d.Button,{...n,className:ye["submit-btn"],disabled:e==="success",size:s?"medium":"large",children:[r.jsx("span",{"data-loading":e==="loading","data-label":!0,children:t.NEWSLETTER_CONFIGS.submitLabel}),t.NEWSLETTER_CONFIGS.hasLoadingState&&e==="loading"&&r.jsx(d.Spinner,{className:ye["loading-spinner"],size:"small"})]})};Nd.displayName="Newsletter.SubmitButton";const Id=({checkboxRef:e,formStatus:t,setFormStatus:n,CONSTANTS:s})=>{const o=a=>{a.target.checked?(e.current=!0,t==="unchecked"&&n("idle")):e.current=!1};return r.jsxs(r.Fragment,{children:[r.jsx(d.Checkbox,{adornment:r.jsx(d.Icon,{name:s.ICONS.check,size:"x-small"}),defaultChecked:e.current,disabled:t==="success",name:"terms-and-conditions",label:s.NEWSLETTER_CONFIGS.messages.accept_terms_and_conditions,onChange:o,sizeVariant:"small",className:ye["terms-and-conditions-checkbox"]}),t==="unchecked"&&r.jsx("div",{className:ye["terms-and-conditions-unchecked"],children:r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:s.ICONS.alert_circle,size:"small"})},children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("p",{children:s.NEWSLETTER_CONFIGS.messages.terms_and_conditions_not_accepted})})})})]})};Id.displayName="Newsletter.Terms";const Rd=({title:e,description:t,CONSTANTS:n})=>r.jsx("div",{className:ye.success,children:r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{className:ye["text-structure-modifier"],children:[r.jsxs("div",{className:ye["success-title"],children:[r.jsx(d.Icon,{name:n.ICONS.check_circle,size:"medium"}),r.jsx("h3",{children:e})]}),r.jsx("p",{children:t})]})})});Rd.displayName="Newsletter.Success";const Td=({formPayloadOptionals:e,masterDataEntity:t,banner:n,termsDescription:s,lgpdLinkLable:o,lgpdLink:a,variant:i,CONSTANTS:c})=>{const{checkboxRef:l,fields:u,formStatus:m,hasTermsAndConditions:p,handleClickToSubmit:f,handleSubmit:h,setFormStatus:_}=zs();return r.jsx(r.Fragment,{children:m==="success"?r.jsx(Rd,{description:c.NEWSLETTER_CONFIGS.messages.success_description,title:c.NEWSLETTER_CONFIGS.messages.success_title,CONSTANTS:c}):r.jsxs(r.Fragment,{children:[r.jsxs("form",{className:ye["form-wrapper"],onSubmit:y=>h(y,e,t),children:[r.jsx(Ed,{formStatus:m,fields:u,CONSTANTS:c}),p&&r.jsx(Id,{checkboxRef:l,formStatus:m,setFormStatus:_,CONSTANTS:c}),r.jsx(Nd,{formStatus:m,type:"submit",variant:"primary",onClick:f,CONSTANTS:c})]}),(n||i==="vertical")&&r.jsxs("div",{className:ye.lgpd,children:[s&&r.jsx("p",{children:s}),o&&r.jsx(Fe,{href:a,children:o})]})]})})};Td.displayName="Newsletter.Form";const Xg=["horizontal","vertical"],so=({className:e,description:t,formPayloadOptionals:n,fields:s,masterDataEntity:o,masterDataEmailField:a,masterDataNameField:i,banner:c,altBanner:l,bannerBackground:u,termsDescription:m,lgpdLinkLable:p,lgpdLink:f,title:h,variant:_,borderTop:y,borderBottom:v,CONSTANTS:x,...C})=>{if(!a||!i)return null;const j=d.helpers.ValidateProp({fieldTypes:Xg,property:_,fallback:"horizontal"});return r.jsxs("div",{className:c?u?ye["banner-background"]:ye["newsletter-wrapper"]:"",children:[c&&r.jsx(d.Banner.Container,{className:ye["banner-container"],children:r.jsx(d.Banner.ImageWrapper,{children:r.jsx(Ee.Image,{src:c,alt:l,width:"1920",height:"500"})})}),r.jsx("div",{className:c?ye["newsletter-provider-wrapper"+(u?"-background":"")]:"",children:r.jsx(lc,{fields:s,masterDataEmailField:a,masterDataNameField:i,variant:j,CONSTANTS:x,children:r.jsx("div",{...C,className:d.helpers.classNameConcat(ye["newsletter-root"+(c||j==="vertical"?"-banner":"")],[y&&ye["has-border-top"],v&&ye["has-border-bottom"],e].filter(Boolean)),"data-variant":j,children:r.jsxs("div",{className:c||j==="vertical"?ye["newsletter-container-banner"]:ye["newsletter-container"],children:[r.jsxs("div",{className:ye["content-text"],children:[r.jsx("h2",{children:h}),r.jsx("p",{children:t}),!c&&j==="horizontal"&&r.jsxs("div",{className:ye.lgpd,children:[r.jsx("p",{children:m}),p&&r.jsx(Fe,{target:"_blank",href:f,children:p})]})]}),r.jsx(Td,{formPayloadOptionals:n,masterDataEntity:o,CONSTANTS:x,banner:c,lgpdLink:f,lgpdLinkLable:p,termsDescription:m,variant:j})]})})})})]})};so.displayName="Newsletter";const Ad=({children:e,...t})=>r.jsx("div",{...t,children:e});Ad.displayName="CallToAction";const Yg="_wrapper_aejhu_1",Qg="_body_aejhu_8",Dn={wrapper:Yg,body:Qg,"wrapper-body":"_wrapper-body_aejhu_16","accordion-modifier":"_accordion-modifier_aejhu_32"},Zg=({children:e,className:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(Dn.wrapper,t),children:e}),Jg=({data:e,ICONS:t})=>{const[n,s]=g.useState(null),o=i=>{s(c=>c===i?null:i)},{router:a}=ie();return r.jsx("div",{className:d.helpers.classNameConcat(Dn.body),children:Array.isArray(e)&&(e==null?void 0:e.map((i,c)=>{var p;const l=n===i.id,u=i.buttonHref&&i.buttonHref!=="#",m=i.buttonHref&&i.type==="button"&&u?{onClick:()=>{var f;if((f=i.buttonHref)!=null&&f.startsWith("/")){a.push(i.buttonHref);return}window.open(i.buttonHref,"_blank")}}:{};return r.jsx("div",{children:i.type==="button"?r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{variant:"tertiary",mode:i.buttonMode??"default",size:i.buttonSize??"medium",iconNameStart:t[i.buttonIcon]??i.buttonIcon,...m,style:{marginTop:16},children:i.buttonLabel}),r.jsx(d.Utils.Divider,{direction:"horizontal",size:"small",style:{height:16}})]}):r.jsxs(d.Accordion.Wrapper,{className:d.helpers.classNameConcat(Dn["accordion-modifier"]),children:[r.jsx(d.Accordion.Header,{id:`${c}-${i.title}`,closeIndicator:l?r.jsx(d.Icon,{name:t.arrow_up,size:"medium"}):void 0,openIndicator:l?void 0:r.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),title:"accordion-header",onClick:()=>o(i.id),children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h2",{className:"typography-style-body-sm",children:i.title})})})}),r.jsx(d.Accordion.Body,{title:"accordion-body",children:r.jsx(d.TextStructure.Root,{children:l&&r.jsxs(d.TextStructure.DivWrapper,{children:[i.subtitle?r.jsx("h3",{className:"typography-style-body-md",children:i.subtitle}):r.jsx(r.Fragment,{}),r.jsx("p",{className:"typography-style-caption",children:i.description}),i.buttonLabel&&i.buttonHref?r.jsx(Fe,{href:i.buttonHref??"#",mode:i.buttonMode??"default",size:i.buttonSize??"medium",adornments:(p=i.buttonIcon)!=null&&p.length?{end:r.jsx(d.Icon,{name:t[i.buttonIcon]??i.buttonIcon})}:void 0,children:i.buttonLabel}):r.jsx(r.Fragment,{})]})})})]})},i.id)}))})},ey=({className:e,data:t,ICONS:n,...s})=>{const[o,a]=g.useState(!1),[i,c]=g.useState(null);g.useEffect(()=>{!o&&!i&&t&&c(t)},[o,i]);const l=g.useCallback(()=>{a(u=>!u)},[]);return i?r.jsxs(Zg,{...s,className:e,children:[r.jsx("div",{className:Dn["wrapper-body"],hidden:!o,children:o&&r.jsx(Jg,{data:i.content,ICONS:n})}),r.jsx(Ad,{children:r.jsx("div",{onClick:l,children:o?r.jsx(d.Button,{iconNameEnd:n.close,size:(i==null?void 0:i.helpButtonSize)??"x-large"}):r.jsx(d.Button,{iconNameStart:(i==null?void 0:i.iconLabel)??n.help,size:(i==null?void 0:i.helpButtonSize)??"x-large",children:i==null?void 0:i.label})})})]}):r.jsx(r.Fragment,{})},ty="_formContainer_zwlly_1",ny="_formFieldGroup_zwlly_6",ry="_formFieldGroupName_zwlly_10",sy="_formFieldWrapper_zwlly_20",oy="_formFieldInput_zwlly_30",ay="_success_zwlly_73",iy="_button_zwlly_110",cy="_error_zwlly_114",ot={formContainer:ty,formFieldGroup:ny,formFieldGroupName:ry,formFieldWrapper:sy,formFieldInput:oy,success:ay,"text-structure-modifier":"_text-structure-modifier_zwlly_85",button:iy,error:cy},ly=({group:e,children:t,className:n})=>r.jsx(r.Fragment,{children:r.jsxs("div",{className:d.helpers.classNameConcat(ot.formFieldGroup,n),children:[r.jsx("h1",{className:ot.formFieldGroupName,children:e.groupLabel}),t]},e.groupLabel)});async function uy(e){const t=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-1",t);return Array.from(new Uint8Array(n)).map(a=>a.toString(16).padStart(2,"0")).join("")}const dy=async e=>await fetch("/api/dito-ingest",{method:"POST",body:JSON.stringify(e)}).then(n=>n.json()),Od=g.createContext({});function Ld({children:e,groups:t,masterDataEntity:n,postFn:s,actionName:o="",originName:a="",POPUP_SUBMITTED_STORAGE:i}){const[c,l]=g.useState(!1),[u,m]=g.useState({}),[p,f]=g.useState([]),[h,_]=g.useState("idle"),[y,v]=g.useState(""),x=({target:{name:j,value:b}})=>{m({...u,[j]:b})},C=j=>{j.preventDefault(),s({body:{masterDataEntity:n,payload:u}}).then(async({Message:b})=>{if(b){const S=b.match(/'(.*?[^\\])'/g)||[];var w="-";for(const P of S){const E=P.substring(1,P.length-1),O=t.flatMap(k=>k.fields).find(({name:k})=>k===E);v(E),O&&(w=O.name)}return _("error"),f([w])}if(u.email){const S=await uy(u.email||""),P=new Date().toISOString();dy([{user_id:S,timestamp:P,type:"IDENTIFY",traits:{id:S,created_at:P,name:u.name,email:u.email,phone:u==null?void 0:u.phone}},{action:o,timestamp:P,type:"TRACK",user_id:S,context:{user_agent:navigator.userAgent},properties:{custom_data:{email:u.email,nome:u.name,origem:a,...u}}}])}return window.localStorage.setItem(i,"true"),m({}),l(!0),_("success"),f([])})};return r.jsx(Od.Provider,{value:{formErrors:p,handleInputChange:x,submitForm:C,formData:u,status:h,fieldMessage:y,success:c,setSuccess:l},children:e})}function tr(){return g.useContext(Od)}const my=({fields:e,className:t})=>{const{formData:n,handleInputChange:s,formErrors:o}=tr();return r.jsx("div",{className:d.helpers.classNameConcat(ot.formFieldWrapper,t),children:e.map(({label:a,name:i,required:c,width:l="medium"})=>r.jsx(d.TextField.Input,{label:`${a}${c?"*":""}`,title:i,value:n[i]||"",name:i,sizeVariant:"large",onChange:s,required:c,feedback:o.includes(i)?"error":"none",className:ot.formFieldInput,"data-inputsize":l},i))})},fy=({FORM_CONFIGS:e,ICONS:t})=>{const{router:n}=ie();return r.jsxs("div",{className:ot.success,children:[r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:t.check_circle,size:"medium"})},children:r.jsx(d.TextStructure.DivWrapper,{className:ot["text-structure-modifier"],children:r.jsx("p",{children:e.successMessage})})}),r.jsx(d.Button,{size:"large",onClick:()=>n.push("/"),className:ot.button,children:e.returnButton})]})},py=({FORM_CONFIGS:e,ICONS:t})=>{const{fieldMessage:n}=tr();return r.jsx("div",{className:ot.error,children:r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:t.delete_circle,size:"small"})},children:r.jsx(d.TextStructure.DivWrapper,{className:ot["text-structure-modifier"],children:r.jsxs("p",{children:[e.errorMessage,n]})})})})},hy=({children:e,className:t,ICONS:n,FORM_CONFIGS:s})=>{const{submitForm:o,status:a}=tr();return r.jsx("form",{onSubmit:o,className:d.helpers.classNameConcat(ot.formContainer,t),children:a==="success"?r.jsx(fy,{ICONS:n,FORM_CONFIGS:s}):r.jsxs(r.Fragment,{children:[e,a==="error"&&r.jsx(py,{ICONS:n,FORM_CONFIGS:s})]})})},_y=e=>{const{children:t,className:n}=e;return r.jsx(Ld,{...e,children:r.jsx(hy,{ICONS:e.ICONS,FORM_CONFIGS:e.FORM_CONFIGS,className:n,children:t})})},kt={Root:_y,FieldGroup:ly,FieldWrapper:my},gy="_button_1e35m_39",_t={"banner-container":"_banner-container_1e35m_1","banner-background":"_banner-background_1e35m_6","form-root":"_form-root_1e35m_15",button:gy,"form-fied-wrapper":"_form-fied-wrapper_1e35m_52"};function yy({content:e,sections:t,FORM_CONFIGS:n,ICONS:s,postFn:o,POPUP_SUBMITTED_STORAGE:a}){var l;const{isMobile:i}=ne(),c=((l=t.find(({name:u})=>u==="Form"))==null?void 0:l.data)||{};return r.jsx("div",{children:r.jsxs(d.Banner.Container,{className:_t["banner-container"],children:[r.jsx(d.Banner.ImageWrapper,{children:r.jsx(Ee.Image,{className:_t["banner-background"],src:i?e.bannerMobile:e.bannerDesk,alt:e.altBanner,width:"1920",height:"500"})}),r.jsxs(kt.Root,{postFn:o,ICONS:s,FORM_CONFIGS:n,groups:c.groups||[],masterDataEntity:c.masterDataEntity||"",className:_t["form-root"],POPUP_SUBMITTED_STORAGE:a,children:[c.groups.map(u=>r.jsx(kt.FieldGroup,{group:u,children:r.jsx(kt.FieldWrapper,{fields:u.fields,className:_t["form-fied-wrapper"]})},u.groupLabel)),r.jsxs("div",{children:[r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("p",{className:"typography-style-body-xs",children:e.requiredMessage})}),r.jsx("div",{className:_t["button-wrapper"],children:r.jsx("div",{className:_t["button-frame"],children:r.jsx(d.Button,{size:"large",type:"submit",className:_t.button,children:e.buttonLabel})})})]})]})]})})}const vy="_content_1jj9i_36",xy="_trends_1jj9i_47",by="_modal_1jj9i_1",qe={"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:vy,trends:xy,"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:by,"search-modal__modal":"_search-modal__modal_1jj9i_100"},kd=g.createContext({}),jy=({children:e,term:t})=>{const[n,s]=g.useState([]),[o,a]=g.useState(!1);return g.useEffect(()=>{if(!t){s([]);return}(async()=>{a(!0);try{const c=await fetch("/api/search/suggestedTerms",{method:"POST",body:JSON.stringify({query:t,locale:"pt-BR"})}),{data:l}=await c.json();s((l==null?void 0:l.searches)||[])}catch(c){console.error("Erro ao buscar sugestões:",c)}})()},[t]),r.jsx(kd.Provider,{value:g.useMemo(()=>({suggestedTerms:n,loading:o,setLoading:a}),[n,o]),children:e})},Cy=({children:e,...t})=>r.jsx(jy,{...t,children:e}),Sy=()=>{const e=g.useContext(kd);if(!e)throw new Error("useSuggestedTermsContext must be used within a SuggestedTermsProvider");return e},Dr=(e,t,n=24,s=1,o="release:desc")=>{const a=`/search?query=${t??""}&count=${n}&page=${s}${o?`&sort=${o.replace("_",":")}`:""}`;e.push(a)},Md=({placeholder:e,noResultsTitle:t,noResultsLabel:n,noResultsTermText:s,handleClose:o,setTerm:a,ICONS:i,ITEMS_DEFAULT_SORT:c,ITEMS_PER_PAGE:l,SEARCH_MODAL:u})=>{const[m,p]=g.useState(""),{suggestedTerms:f,loading:h,setLoading:_}=Sy(),{router:y}=ie(),v=g.useRef(null),x=b=>{p(b.target.value),clearTimeout(v.current),b.target.value.length>2&&(a(b.target.value),v.current=setTimeout(()=>{a(b.target.value),_(!1)},2e3))},C=b=>{b.key==="Enter"&&(m==null?void 0:m.length)>2&&(o(),Dr(y,m,l,1,c))},j=b=>{o(),Dr(y,b,l,1,c)};return g.useEffect(()=>{if(clearTimeout(v.current),m.length<=2||f.length>0){_(!1);return}return _(!0),v.current=setTimeout(()=>{Dr(y,m,l,1,c),_(!1),o()},2e3),()=>{clearTimeout(v.current)}},[m,f]),r.jsx(d.DropDown.AutoComplete,{className:qe["modal-auto-complete"],onKeyDown:C,onInputChange:x,placeholder:e,stopClickPropagation:!1,adornment:{end:h?r.jsx(d.Spinner,{size:"small"}):r.jsx(d.Button,{variant:"tertiary",size:"small",iconNameStart:i.search,onClick:()=>{j(m)},disabled:!(m.length>2)})},children:(f==null?void 0:f.length)>0&&r.jsx(r.Fragment,{children:(f==null?void 0:f.length)>0&&(m==null?void 0:m.length)>2?r.jsx(d.DropDown.AutoCompleteList,{className:qe["modal-auto-complete__dropdown"],seeAll:r.jsx("span",{onClick:()=>j(m),children:s+m}),children:f.map((b,w)=>r.jsx(d.DropDown.ListItemWithLink,{children:r.jsx(Fe,{href:`/search?query=${b.term}&count=${l}&page=1`,size:"x-small",title:b.term,disableUnderline:!0,disablePadding:!1,onClick:S=>{S.preventDefault(),o()},children:b.term})},`key-${b.term}-${w}`))}):!h&&(m==null?void 0:m.length)>3&&(f==null?void 0:f.length)===0&&r.jsxs(d.DropDown.AutoCompleteList,{className:qe["modal-search-empty"],children:[r.jsx(d.DropDown.NotResults,{description:n,title:t}),r.jsx(d.Button,{className:"all-terms",onClick:()=>{o(),y.push(u.EMPTY.ALL_TERMS)},variant:"tertiary",size:"medium",title:u.EMPTY.ALL_TERMS_LABEL,adornment:{end:r.jsx(d.Icon,{name:i.arrow_right,size:"medium"})},children:u.EMPTY.ALL_TERMS_LABEL})]})})})};Md.displayName="SearchModal.AutoComplete";function Py({title:e,ICONS:t}){const{isMobile:n}=ne();return r.jsx(d.Modal.Header,{navigation:"top",className:qe["modal-header"],children:r.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!n,children:[r.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),r.jsx(d.Modal.Title,{navigation:"top",className:qe["search-modal__title"],title:e}),r.jsx(d.Button,{className:qe["modal-header__close-button"],"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})})}const Dd=g.createContext({searches:[],isLoading:!1,error:null});let Fr=null;const wy=({children:e})=>{const[t,n]=g.useState([]),[s,o]=g.useState(!0),[a,i]=g.useState(null);return g.useEffect(()=>{(async()=>{try{if(o(!0),Fr){n(Fr),o(!1);return}const l=await fetch("/api/search/topSearch");if(!l.ok)throw new Error(`Erro ao buscar os dados: ${l.status}`);const m=(await l.json()).data.searches||[];Fr=m,n(m)}catch(l){i(l instanceof Error?l.message:"Erro desconhecido")}finally{o(!1)}})()},[]),r.jsx(Dd.Provider,{value:g.useMemo(()=>({searches:t,isLoading:s,error:a}),[t,s,a]),children:e})},Ey=()=>{const e=g.useContext(Dd);if(!e)throw new Error("useTopSearches must be used within a TopSearchesProvider");return e},Ny=({title:e,allTermsLabel:t,allTermsUrl:n,qtyTrends:s,handleClose:o,ICONS:a,ITEMS_PER_PAGE:i})=>{const{searches:c,isLoading:l}=Ey(),{router:u}=ie(),m=Array.isArray(c)?c:[];return r.jsx(r.Fragment,{children:!l&&m.length>0?r.jsx(d.ComponentList.Structure,{className:qe.trends,title:e,children:r.jsxs("div",{className:qe["trends-content"],children:[r.jsx(d.ComponentList.List,{columns:1,children:m.slice(0,s).map((p,f)=>r.jsx(d.ComponentList.ListItem,{className:qe["trends-item"],children:r.jsx(Fe,{href:`/search?query=${p.term}&count=${i}&page=1`,size:"x-small",adornments:{end:r.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},disableUnderline:!0,title:p.term,onClick:()=>o(),children:p.term})},`list-item-${f}`))}),r.jsx(d.Button,{className:"all-terms",variant:"tertiary",size:"x-small",underline:!1,onClick:()=>{o(),u.push(n)},adornment:{end:r.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},children:t})]})}):null})};function Iy({SectionZone:e}){var s;const[t,n]=g.useState(null);return g.useEffect(()=>{(async()=>{try{const a=await fetch("/api/cms/content-type-client",{method:"POST",body:JSON.stringify({contentType:"search"})});if(!a.ok)return;const i=await a.json();n(i)}catch(a){console.error("[CMS FETCH ERROR]",a)}})()},[]),r.jsx("div",{className:qe.content,children:t!==null&&r.jsx(e,{data:((s=t[0])==null?void 0:s.sections)??[],componentConfigs:{"Product Carousel":{searchModal:!0}}})})}const Fd=({className:e,trends:t,CONSTANTS:n,SectionZone:s})=>{const[o,a]=g.useState(""),{isMobile:i}=ne(),c=li(),{setValue:l}=zn(),{SEARCH_MODAL:u,ICONS:m,ITEMS_PER_PAGE:p,ITEMS_DEFAULT_SORT:f}=n;return r.jsxs(d.Modal.Root,{isMobile:i??!1,variant:i?"sideBottom":"sideRight",isOpen:c,setIsOpen:l,className:`${qe.modal} ${qe["search-modal__modal"]} ${e??""}`,children:[r.jsx(Py,{title:u.HEADER.TITLE,ICONS:m}),r.jsxs(d.Modal.Body,{className:qe["modal-content-body"],children:[r.jsx(Cy,{term:o,children:r.jsx(Md,{placeholder:u.AUTOCOMPLETE.PLACEHOLDER,noResultsTitle:u.EMPTY.NOT_FOUND,noResultsLabel:u.EMPTY.NOT_FOUND_P,noResultsTermUrl:u.AUTOCOMPLETE.NO_RESULTS.NO_RESULTS_TERM_URL,noResultsTermText:u.AUTOCOMPLETE.NO_RESULTS.NO_RESULTS_TERM_TEXT,handleClose:()=>l(!1),setTerm:a,ICONS:m,ITEMS_DEFAULT_SORT:f,ITEMS_PER_PAGE:p,SEARCH_MODAL:u})}),t?r.jsx(wy,{children:r.jsx(Ny,{title:u.TRENDS.TITLE,allTermsUrl:u.TRENDS.ALL_TERMS_URL,allTermsLabel:u.TRENDS.ALL_TERMS_LABEL,qtyTrends:u.TRENDS.QTY_TERMS,handleClose:()=>l(!1),ICONS:m,ITEMS_PER_PAGE:p})}):null,r.jsx(Iy,{SectionZone:s})]})]})};Fd.displayName="SearchModal";const Ge={"store--page-title":"_store--page-title_1rs1a_1","store--page-title--title":"_store--page-title--title_1rs1a_4","store--return-button":"_store--return-button_1rs1a_14","store--section":"_store--section_1rs1a_36","store--section--img":"_store--section--img_1rs1a_41","store--details":"_store--details_1rs1a_51","store--details--title":"_store--details--title_1rs1a_59","store--details--subtitle":"_store--details--subtitle_1rs1a_68","store--details--text":"_store--details--text_1rs1a_77","store--details--vendor":"_store--details--vendor_1rs1a_87","store--select":"_store--select_1rs1a_91","store--wrapper":"_store--wrapper_1rs1a_115"},zd=({LPLOJAS_TEMPLATE_RETURN_BUTTON:e,ICONS:t,showVendor:n})=>{const{selectedCity:s,selectedStore:o}=Hn();return r.jsx(d.Card,{padding:"small",shadow:!0,className:Ge["store--wrapper"],children:o?r.jsxs(r.Fragment,{children:[r.jsx(rt.ReturnButton,{ICONS:t,children:e}),r.jsx(rt.Details,{ICONS:t,showVendor:n,store:s==null?void 0:s.find(a=>a.nome===o)})]}):r.jsx(rt.Select,{ICONS:t})})};zd.displayName="LPStores.Content";const $t=({title:e,text:t,type:n,...s})=>r.jsx(d.TextStructure.DivWrapper,{...s,children:n==="title"?r.jsx("h4",{className:Ge["store--details--title"],children:e}):r.jsxs(r.Fragment,{children:[r.jsx("h5",{className:Ge["store--details--subtitle"],children:e}),r.jsx("p",{className:Ge["store--details--text"],children:t})]})});$t.displayName="LPStores.Details";const Bd=({vendor:e,ICONS:t})=>{const n=e?e.split(","):[];return r.jsxs(d.Accordion.Wrapper,{style:{width:"100%"},children:[r.jsx(d.Accordion.Header,{id:"accordion-header-vendor",closeIndicator:r.jsx(d.Icon,{name:t.arrow_up,size:"small"}),openIndicator:r.jsx(d.Icon,{name:t.arrow_down,size:"small"}),title:"Código de vendedor (A)",children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{gap:0,children:r.jsx("h3",{className:"typography-style-body-md",children:"Código de vendedor (A)"})})})}),r.jsx(d.Accordion.Body,{children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:Ge["store--details--vendor"],children:n.map((s,o)=>r.jsx("p",{className:"typography-style-body-sm",children:s.trim()},o))})})})]})};Bd.displayName="LPStores.Details";const Ud=({store:e,showVendor:t,ICONS:n})=>r.jsxs("div",{className:Ge["store--details"],children:[r.jsx($t,{alignItems:"left",title:String(e==null?void 0:e.nome),type:"title"}),r.jsx($t,{title:"Endereço",text:String(e.endereco)}),e.telefone&&r.jsx($t,{title:"Telefone",text:String(e.telefone)}),e.horario&&r.jsx($t,{title:"Horário de funcionamento",text:String(e.horario)}),t&&r.jsx(Bd,{ICONS:n,vendor:String(e.vendedoras)})]});Ud.displayName="LPStores.Details";const qd=({ICONS:e,arrowDownIcon:t=r.jsx(d.Icon,{name:e.arrow_down,size:"small"}),arrowUpIcon:n=r.jsx(d.Icon,{name:e.arrow_up,size:"small"}),list:s,selectText:o,...a})=>r.jsx(d.DropDown.DefaultDropDown,{...a,"aria-placeholder":o,adornmentListClosed:{end:t},adornmentListOpened:{end:n},mode:"simple",placeholder:o,sizeVariant:"large",children:r.jsx(d.DropDown.DefaultDropDownList,{placeholder:o,supportText:o,maxHeight:400,children:Array.isArray(s)&&(s==null?void 0:s.map(i=>r.jsx(d.DropDown.ListItem,{value:i,children:i},i.replace(/\s/g,""))))})});qd.displayName="LPStores.DropDown";const Hd=({children:e,ICONS:t})=>{const{clearSelectedStore:n}=Hn(),s=()=>{typeof n=="function"&&n()};return r.jsxs("button",{"aria-label":String(e),className:Ge["store--return-button"],onClick:s,onKeyDown:s,children:[r.jsx(d.Icon,{name:t.arrow_left,size:"small"}),e]})};Hd.displayName="LPStores.ReturnButton";const Vd=({children:e,data:t})=>r.jsx(dc,{data:t,children:e});Vd.displayName="LPStores.Root";const $d=({children:e,imgAlt:t,imgSrcDesk:n,imgSrcMob:s})=>{const{isMobile:o}=ne();return r.jsxs("section",{className:Ge["store--section"],children:[r.jsx(Yt,{src:o?s:n,alt:t,fill:!0,className:Ge["store--section--img"]}),e]})};$d.displayName="LPStores.Section";const Wd=({ICONS:e})=>{const{data:t,handleSelectCity:n,selectedCity:s,handleSelectStore:o}=Hn(),a=new Set(t.map(c=>c.cidade)),i=Array.from(a).filter(c=>typeof c=="string");return r.jsxs("div",{className:Ge["store--select"],children:[r.jsx(rt.DropDown,{selectText:"Selecione a cidade",handleSelectedValue:n,list:i,defaultValue:s==null?void 0:s[0].cidade,ICONS:e}),r.jsx(rt.DropDown,{"data-selected-city":!!s,selectText:"Selecione a loja",handleSelectedValue:o,list:s?s==null?void 0:s.map(c=>String(c.nome)):[],ICONS:e},s==null?void 0:s[0].cidade)]})};Wd.displayName="LPStores.Select";const Gd=({children:e})=>r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:Ge["store--page-title"],children:r.jsx("h2",{className:Ge["store--page-title--title"],children:e})})});Gd.displayName="LPStores.Title";const rt={Content:zd,Details:Ud,DropDown:qd,ReturnButton:Hd,Root:Vd,Section:$d,Select:Wd,Title:Gd};var Kd={CUSTOM_VIEW_CART:{name:"custom_view_cart",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","total_discount","subtotal","items"]},ADD_TO_WISHLIST:{name:"add_to_wishlist",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","items"]},ADD_TO_CART:{name:"add_to_cart",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","items"]},REMOVE_FROM_CART:{name:"remove_from_cart",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","items"]},ADD_COUPON:{name:"add_coupon",destinations:["DataLayer"],requiredParams:["brand","region","coupon","coupon_message","seller_cod_name"]},SEARCH:{name:"search",destinations:["DataLayer"],requiredParams:["brand","search_term","search_found","search_quantity"]},SEARCH_ZIPCODE:{name:"search_zipcode",destinations:["DataLayer"],requiredParams:["brand","region","shippings","zipcode","flag_pickup"]},VIEW_PROMOTION:{name:"view_promotion",destinations:["DataLayer"],requiredParams:["brand","region","currency","promotion_name","creative_slot","creative_name","items"]},SELECT_PROMOTION:{name:"select_promotion",destinations:["DataLayer"],requiredParams:["brand","region","currency","promotion_name","creative_slot","creative_name","items"]},SELECT_CONTENT:{name:"select_content",destinations:["DataLayer"],requiredParams:["brand","content_type"]},SELECT_ITEM:{name:"select_item",destinations:["DataLayer"],requiredParams:["brand","region","items","line_items"]},VIEW_ITEM:{name:"view_item",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","available_grid","items"]},VIEW_ITEM_LIST:{name:"view_item_list",destinations:["DataLayer"],requiredParams:["region","brand","line_items","items"]},BEGIN_CHECKOUT:{name:"begin_checkout",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","total_discount","subtotal","items"]},CUSTOM_BEGIN_CHECKOUT:{name:"custom_begin_checkout",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","total_discount","subtotal","items"]},AUTH_ACTION:{name:"auth_action",requiredParams:["region"]},ADD_PERSONAL_INFO:{name:"add_personal_info",destinations:["DataLayer"],requiredParams:["brand","pre_filled","line_items","currency","value","total_discount","subtotal"]},CUSTOM_ADD_SHIPPING_INFO:{name:"add_shipping_info",destinations:["DataLayer"],requiredParams:["brand","pre_filled","shipping","shipping_tier","line_items","currency","value","total_discount","subtotal","items"]},CUSTOM_ADD_PAYMENT_INFO:{name:"add_payment_info",destinations:["DataLayer"],requiredParams:["brand","pre_filled","line_items","currency","value","total_discount","payment_type","subtotal","items"]},ORDER_REVIEWED:{name:"order_reviewed",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","total_discount","subtotal","payment_type"]},PURCHASE:{name:"purchase",destinations:["DataLayer"],requiredParams:["brand","shipping_tier","line_items","currency","value","shipping","transaction_id","total_discount","payment_type","seller_cod_name","subtotal","coupon","items"]},CUSTOM_PURCHASE:{name:"custom_purchase",destinations:["DataLayer"],requiredParams:["brand","shipping_tier","line_items","currency","value","shipping","transaction_id","total_discount","payment_type","seller_cod_name","subtotal","coupon","items"]},CUSTOM_USER_INFO:{name:"custom_user_info",destinations:["DataLayer"],requiredParams:["user_info"]},NOTIFY_ME:{name:"notify_me",destinations:["DataLayer"],requiredParams:["brand","line_items","size","item_ref"]}};function Ry(e,t,n){const s=t.window,o=Object.assign({},t);if(delete o.window,s){s.dataLayer=s.dataLayer||[],s.dataLayer.push({event:e,ecommerce:o});return}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:e,ecommerce:o})}function Ty(e,t,n){console.log(`%c[DT - ${n}] EVENTO DISPARADO:%c `,`background: ${t}; color: white; font-weight: bold; padding: 2px 4px; border-radius: 3px;`,"color: #fff;",e||"")}var Xd=[["vale","vale crédito"],["pagaleve","pix"],["pix parcel","pix parcelado"],["pix","pix"],["apple","apple pay"],["google","google pay"],["boleto","boleto"],["paypal","paypal"],["cred","cartão"],["visa","cartão"],["master","cartão"],["amex","cartão"],["elo","cartão"],["hiper","cartão"],["diner","cartão"],["deb","cartão"]];function Ay(e,t,n){Ty({id:e,custom_data:t},"#00c851",n)}var Oy={DataLayer:Ry,Dito:Ay};async function Ly(e,t){const n=Kd[e];n&&await Promise.allSettled(n.destinations.map(async s=>{try{await Oy[s](e.toLowerCase(),t,s)}catch(o){console.error(`[DT] Failed to send ${e} to ${s}:`,o)}}))}async function ky(e){try{return await(await fetch(`/api/catalog_system/pub/products/search?fq=productId:${e}`)).json()}catch(t){console.log("[DT] Erro ao buscar dados do produto",t)}}function My(e){try{const{pathname:t}=new URL(e,window.location.origin);return/\/p\/?$/.test(t)}catch{return!1}}function Yd(e){if(!e)return null;const t=(()=>{try{return new URL(e,location.origin).pathname}catch{return e.split("?")[0]}})(),n=decodeURIComponent(t).match(/(\d+-\d+)(?=\/p|$)/);return n?n[1].replace("-","_"):null}async function Dy(e){const t=Yd(e);if(!t)return console.error("Não foi possível extrair o RefId da URL"),null;try{const n=await fetch(`/api/catalog_system/pub/products/search?fq=alternateIds_RefId:${t}`);if(!n.ok)throw new Error(`Erro na API: ${n.status}`);const s=await n.json();return(s==null?void 0:s[0])||null}catch(n){return console.error("Erro ao buscar dados do produto:",n),null}}function Qd(e,t){var n,s,o,a;const i=(s=(n=e==null?void 0:e.shippingData)==null?void 0:n.logisticsInfo)==null?void 0:s.find(l=>l.itemId===t.id),c=(o=i==null?void 0:i.slas)==null?void 0:o.find(l=>l.id===i.selectedSla);return(a=c==null?void 0:c.pickupStoreInfo)!=null&&a.friendlyName?`retirada em loja: ${c.pickupStoreInfo.friendlyName}`:c!=null&&c.name?`Receba em casa: ${c.name}`:null}async function Zd(e){var t,n;const s=await ky(e.productId||e.productID||e.item_group_id);return s.length&&(n=(t=s[0].items.find(o=>o.name===e.skuName))==null?void 0:t.itemId)!=null?n:null}function nr(e){return e.discount||e.discount===0?e.discount:parseFloat(Math.max(e.listPrice-e.sellingPrice,0).toFixed(2))/100||0}function Ct(e){const t=[()=>{var n;return((n=e==null?void 0:e.productCategories)==null?void 0:n[39])==="BAZAR"?"Sale":"Coleção"},()=>e.item_category||e.category,()=>e.categories[0]];for(const n of t){const s=n();if(s!=null)return s}return null}function sn(e){const t=[()=>Object.values((e==null?void 0:e.productCategories)||{}).pop(),()=>Object.values((e==null?void 0:e.categories)||{}).pop(),()=>{var n,s,o,a,i;return(i=(a=(o=(s=(n=e==null?void 0:e.category)==null?void 0:n.split)==null?void 0:s.call(n,">"))==null?void 0:o[1])==null?void 0:a.trim)==null?void 0:i.call(a)},()=>e.item_category2];for(const n of t){const s=n();if(s!=null)return s}return null}function Jd(e){var t;const n=((t=e==null?void 0:e.additionalInfo)==null?void 0:t.tags)||(e==null?void 0:e.tags);return Array.isArray(n)&&n.length?n.join(","):null}var Fy={farm:"farmrio","farm etc":"farmetc","farm rio":"farmrio"};function ua(e){if(!e)return null;const t=e.toLowerCase().trim();return Fy[t]||null}function at(e){var t;let n=[];if(Array.isArray(e)&&e.every(a=>typeof a=="string"))n=e;else if(Array.isArray(e))n=e.map(a=>{var i;return((i=a.additionalInfo)==null?void 0:i.brandName)||a.brand});else if(typeof e=="object"&&e!==null&&"brand"in e)n=[((t=e.additionalInfo)==null?void 0:t.brandName)||e.brand];else return typeof e=="string"?ua(e):null;const s=n.map(ua).filter(a=>a!==null),o=[...new Set(s)].sort();return o.length>0?o.join("_"):null}function zy(e){var t;if(!e.orderForm&&!((t=e.orderForm.items)!=null&&t.length))return null;const n=e.orderForm.items;return at(n)}function By(e){var t;const{item:n}=e;return at(((t=n==null?void 0:n.additionalInfo)==null?void 0:t.brandName)||n.brand||n.item_brand)}function Uy(e,t){if(e!=null&&e.brand)return at(e.brand)||e.brand||null;switch(t){case"CUSTOM_VIEW_CART":case"ADD_COUPON":case"ADD_PERSONAL_INFO":case"CUSTOM_ADD_SHIPPING_INFO":case"CUSTOM_ADD_PAYMENT_INFO":case"BEGIN_CHECKOUT":case"CUSTOM_BEGIN_CHECKOUT":case"SEARCH_ZIPCODE":case"ORDER_REVIEWED":case"PURCHASE":case"CUSTOM_PURCHASE":return zy(e);case"ADD_TO_CART":case"REMOVE_FROM_CART":return By(e);default:return null}}async function qy(e){var t;const n=((t=e.orderForm)==null?void 0:t.items)||[];return n.length?await Promise.all(n.map(async s=>{var o,a,i;return{item_id:s.productId,item_category2:sn(s),item_category4:Jd(s),item_shipping_tier:Qd(e.orderForm,s),price:parseFloat((s.price/100).toFixed(2))||0,quantity:s.quantity||1,item_ref:s.refId||null,item_brand:at((o=s.additionalInfo)==null?void 0:o.brandName)||((a=s.additionalInfo)==null?void 0:a.brandName)||null,item_sku:await Zd(s)||s.id||null,item_name:s.name||s.id||null,item_category:Ct(s)||null,item_variant:s.skuName.split(/[-/]/)[0].trim(),item_variant2:((i=s.skuName.split(/[-/]/).pop())==null?void 0:i.trim())||"",discount:nr(s)}})):[]}async function Hy(e,t){var n,s,o;const{item:a,orderForm:i}=e;return[{index:0,quantity:1,item_id:a.productId||a.item_group_id||a.sku||null,item_category2:sn(a),item_category4:Jd(a),item_shipping_tier:t==="REMOVE_FROM_CART"?Qd(i,a):null,price:a.listPrice||parseFloat((a.price/100).toFixed(2))||0,item_ref:a.refId||a.item_ref||(a==null?void 0:a.additionalProperty.find(c=>c.name==="RefId").value)||null,item_brand:((n=a.additionalInfo)==null?void 0:n.brandName)||a.item_brand||a.brand.name||null,item_sku:a.sku||a.id||a.item_id||await Zd(a)||null,item_name:a.name||a.item_name||null,item_category:Ct(a)||null,item_variant:(a.skuName||a.item_variant||a.name).split(/[-/]/)[0].trim()||null,item_variant2:a.size||((s=a==null?void 0:a.itemAttributes)==null?void 0:s.size)||((o=(a.skuName||a.name).split(/[-/]/).pop())==null?void 0:o.trim())||null,discount:nr(a),item_list_name:Ct(a)||null,item_url:a.item_url||null}]}async function Vy(e){return((e==null?void 0:e.list)||[]).map(t=>{var n,s,o,a,i;return{price:((n=t==null?void 0:t.price)==null?void 0:n.list)||(t==null?void 0:t.price)||((s=t==null?void 0:t.offers)==null?void 0:s.lowPrice)||0,quantity:1,item_ref:(t==null?void 0:t.ref)||(t==null?void 0:t.item_ref)||(t==null?void 0:t.referenceId[0].Value)||(t==null?void 0:t.additionalProperty.find(c=>c.name==="RefId").value)||null,index:typeof(e==null?void 0:e.index)=="number"?e.index:null,item_brand:at((o=t==null?void 0:t.brand)==null?void 0:o.name)||at(e.brand)||at(t==null?void 0:t.item_brand)||null,item_name:(t==null?void 0:t.productName)||(t==null?void 0:t.alternateName)||(t==null?void 0:t.item_name)||((a=t==null?void 0:t.seo)==null?void 0:a.title)||null,item_category:Ct(t)||null,item_variant:((i=t==null?void 0:t.name)==null?void 0:i.split("-")[0].trim())||(t==null?void 0:t.item_variant)||null,item_category2:sn(t)||null,item_id:(t==null?void 0:t.productID)||(t==null?void 0:t.productId)||(t==null?void 0:t.item_id)||(t==null?void 0:t.id)||null,discount:nr(t)||null,item_list_name:(e==null?void 0:e.itemListName)||Ct(t)||null}})}async function $y(e){var t,n,s;const{item:o}=e;return[{price:e.value||0,quantity:1,item_ref:o.ref||o.additionalProperty.find(a=>a.name==="RefId").value||null,item_brand:at(o.brand.name)||at(e.brand)||null,item_name:o.productName||o.alternateName||null,item_category:Ct(o)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-")[0].trim())||null,item_category2:sn(o)||((s=(n=o==null?void 0:o.category)==null?void 0:n.split(">")[1])==null?void 0:s.trim())||null,item_id:(o==null?void 0:o.productID)||(o==null?void 0:o.productId)||o.item_group_id||null,discount:nr(o)||null,item_sku:(o==null?void 0:o.sku)||(o==null?void 0:o.productId)||null,item_url:o.url||o.item_url||null,seller_id:o.seller||null}]}async function Wy(e){var t;if(!My(e==null?void 0:e.bannerUrl))return[];const s=await Dy(e==null?void 0:e.bannerUrl),o=s==null?void 0:s.items[0];return{price:(o==null?void 0:o.sellers[0].commertialOffer.Price)||0,quantity:1,item_ref:Yd(e==null?void 0:e.bannerUrl),item_brand:at(s.brand)||null,item_name:(s==null?void 0:s.productName)||(s==null?void 0:s.alternateName)||(s==null?void 0:s.item_name)||null,item_category:Ct(s)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-").pop().trim())||null,item_category2:sn(s)||null,item_id:(s==null?void 0:s.productId)||null,discount:(o==null?void 0:o.sellers[0].commertialOffer.ListPrice)-(o==null?void 0:o.sellers[0].commertialOffer.Price)||null}}function Gy(e,t){if(e!=null&&e.items)return e.items;switch(t){case"CUSTOM_VIEW_CART":case"BEGIN_CHECKOUT":case"CUSTOM_BEGIN_CHECKOUT":case"CUSTOM_ADD_SHIPPING_INFO":case"CUSTOM_ADD_PAYMENT_INFO":case"PURCHASE":case"CUSTOM_PURCHASE":return qy(e);case"ADD_TO_CART":case"ADD_TO_WISHLIST":case"REMOVE_FROM_CART":return Hy(e,t);case"SELECT_ITEM":case"VIEW_ITEM_LIST":return Vy(e);case"VIEW_ITEM":return $y(e);case"VIEW_PROMOTION":case"SELECT_PROMOTION":return Wy(e);default:return null}}function Ky(e){var t,n,s;if(!e.orderForm)return null;const o=((t=e.orderForm.paymentData)==null?void 0:t.payments)||[],a=((n=e.orderForm.paymentData)==null?void 0:n.paymentSystems)||[];if(!o.length||!a.length)return null;const i=o.find(p=>p==null?void 0:p.paymentSystem)||o[0],c=String((i==null?void 0:i.paymentSystem)||"").trim();if(!c)return null;const l=a.find(p=>String(p.id)===c),u=((s=l==null?void 0:l.name)==null?void 0:s.toLowerCase())||"",m=Xd.find(([p])=>u.includes(p));return m?m[1]:null}function Xy(e){var t,n,s,o;if(!e.orderForm)return null;const a=((t=e.orderForm.paymentData)==null?void 0:t.transactions)||[];if(!a.length)return null;const i=((n=a[0])==null?void 0:n.payments)||[];if(!i.length)return null;const c=((o=(s=i[0])==null?void 0:s.paymentSystemName)==null?void 0:o.toLowerCase())||"",l=Xd.find(([u])=>c.includes(u));return l?l[1]:null}function Yy(e,t){if(e!=null&&e.paymentType)return e.paymentType;switch(t){case"ORDER_REVIEWED":case"CUSTOM_ADD_PAYMENT_INFO":return Ky(e);case"PURCHASE":case"CUSTOM_PURCHASE":return Xy(e);default:return null}}var Qy={brand:Uy,items:Gy,payment_type:Yy,user_info:async(e,t)=>{var n;const o=(n={animale:{store:"https://www.animale.com.br",checkout:"https://secure.animale.com.br"},farm:{store:"https://lojafarm.myvtex.com"},mariafilo:{store:"https://mariafilo.myvtex.com",checkout:"https://secure.mariafilo.com.br"},lojacrisbarros:{store:"https://lojacrisbarros.myvtex.com",checkout:"https://secure.crisbarros.com.br"},lojaoffpremium:{store:"https://lojaoffpremium.myvtex.com",checkout:"https://secure.lojaoffpremium.com.br"}}[e.account||"https://www.animale.com.br"])==null?void 0:n[e.platform||"store"];if(!o)return{customer:{email:e.userEmail},address:null};try{const a=`${o}/_v/user-info`;return await(await fetch(a,{method:"POST",body:JSON.stringify({email:e.userEmail})})).json()}catch{return{customer:{email:e.userEmail},address:null}}},content_type:(e,t)=>"regiao".concat(":"+e.category).concat(e.subcategory?":"+e.subcategory:"").concat(":"+e.componentName)||null,region:(e,t)=>e.region||null,line_items:(e,t)=>e!=null&&e.lineItems?e.lineItems:e!=null&&e.item?[e.item.productId||e.item.productID||e.item.item_id]:e!=null&&e.list?e.list.map(n=>n.productID||(n==null?void 0:n.id)):(e.orderForm.items||[]).map(n=>n.productId).join(","),currency:(e,t)=>{var n,s,o,a;return e!=null&&e.currency?e.currency:e!=null&&e.bannerUrl?"BRL":e!=null&&e.item?((s=(n=e.item)==null?void 0:n.offers)==null?void 0:s.priceCurrency)||"BRL":((a=(o=e.orderForm)==null?void 0:o.storePreferencesData)==null?void 0:a.currencyCode)||null},value:(e,t)=>{var n;return e!=null&&e.value?e.value:e.item?e.item.price:((n=e.orderForm)==null?void 0:n.value)!=null?e.orderForm.value/100:null},total_discount:(e,t)=>{var n,s;const a=(((n=e.orderForm)==null?void 0:n.totalizers)||((s=e.orderForm)==null?void 0:s.totals)||[]).find(i=>i.id==="Discounts");return a?Math.abs(a.value)/100:0},subtotal:(e,t)=>{var n,s;return(((n=e.orderForm)==null?void 0:n.totalizers)||((s=e.orderForm)==null?void 0:s.totals)||[]).filter(i=>i.id==="Items").reduce((i,c)=>i+(c.value||0),0)/100||0},coupon_message:(e,t)=>{var n;if(e.couponMessage)return e.couponMessage;const s=((n=e.orderForm)==null?void 0:n.messages)||[];if(s.length===0)return null;const o=s.filter(a=>a.text.toLowerCase().includes("cupom"));return o.length===0?null:o.map(a=>a.text).join(" | ")},seller_cod_name:(e,t)=>e.appliedSellerCodName||(e==null?void 0:e.orderForm.marketingData.utmiCampaign)||null,coupon:(e,t)=>{var n,s;return e.appliedCoupon||((s=(n=e==null?void 0:e.orderForm)==null?void 0:n.marketingData)==null?void 0:s.coupon)||null},pre_filled:(e,t)=>!!e.preFilled,search_term:(e,t)=>e.searchTerm||null,search_found:(e,t)=>!!e.searchFound,search_quantity:(e,t)=>e.searchQuantity||0,promotion_name:(e,t)=>e.promotionName||null,creative_name:(e,t)=>e.creativeName||null,creative_slot:(e,t)=>e.creativeSlot||null,zipcode:(e,t)=>e.zipCode||null,size:(e,t)=>e.size||null,item_ref:(e,t)=>e.itemRef||null,flag_pickup:(e,t)=>{var n;const s=e.orderForm;return s?(((n=s.shippingData)==null?void 0:n.logisticsInfo)||[]).some(i=>{var c;return(c=i.slas)==null?void 0:c.some(l=>l.deliveryChannel==="pickup-in-point")}):null},shippings:(e,t)=>{const n=e.orderForm;if(!n)return null;const s={};for(const a of n.shippingData.logisticsInfo){const i=n.items[a.itemIndex];if(i)for(const c of a.slas){const l=c.name;s[l]||(s[l]={shipping_tier:c.name,delivery_time:parseInt(c.shippingEstimate),shipping:parseFloat((c.price/100).toFixed(1)),line_items:[]}),s[l].line_items.push(i.id)}}return Object.values(s).map(a=>({shipping:a.shipping,shipping_tier:a.shipping_tier,delivery_time:a.delivery_time,line_items:a.line_items.join(",")}))||null},shipping:(e,t)=>{var n,s,o;return((o=(s=(n=e==null?void 0:e.orderForm)==null?void 0:n.shippingData)==null?void 0:s.logisticsInfo)!=null?o:[]).reduce((i,c)=>{var l,u;const m=(l=c.slas)==null?void 0:l.find(p=>p.id===c.selectedSla);return i+((u=m==null?void 0:m.price)!=null?u:0)},0)},shipping_tier:(e,t)=>{var n,s,o,a;const c=((o=(s=(n=e==null?void 0:e.orderForm)==null?void 0:n.shippingData)==null?void 0:s.logisticsInfo)!=null?o:[]).find(f=>f.selectedSla);if(!c)return null;const l=(a=c.slas)==null?void 0:a.find(f=>f.id===c.selectedSla);if(!l)return null;const{deliveryChannel:u,name:m,pickupStoreInfo:p}=l;return u==="pickup-in-point"?`retirada em loja${p!=null&&p.friendlyName?`: ${p.friendlyName}`:""}`:u==="delivery"?`receba em casa${m?`: ${m}`:""}`:null},transaction_id:(e,t)=>{var n,s;return((s=(n=e.orderForm)==null?void 0:n.orderGroup)==null?void 0:s.toString())||null},available_grid:(e,t)=>e.availableGrid||null};async function Zy(e={},t){const n=Kd[t];return n?Object.fromEntries(await Promise.all(n.requiredParams.map(async o=>{const a=Qy[o];return typeof a!="function"?(console.error(`[DT] Missing paramGetter for param: ${o}`),[o,null]):[o,await a(e,t)]}))):void 0}async function Jy(e,t={}){try{const n=await Zy(t,e);return await Ly(e,Object.assign({},n,{window:t.window}))}catch(n){return console.error(`[DT] Error tracking event ${e}:`,n)}}var os={exports:{}},em={};(function(e){"use client";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,{PathParamsContext:function(){return a},PathnameContext:function(){return o},SearchParamsContext:function(){return s}});const n=g,s=(0,n.createContext)(null),o=(0,n.createContext)(null),a=(0,n.createContext)(null);process.env.NODE_ENV!=="production"&&(s.displayName="SearchParamsContext",o.displayName="PathnameContext",a.displayName="PathParamsContext")})(em);var as={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return n}});function n(s){return Array.isArray(s)?s[1]: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)})(as,as.exports);var ev=as.exports,is={exports:{}},cs={exports:{}},ls={exports:{}},us={exports:{}},ds={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return a}});const n=new Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class s{disable(){throw n}getStore(){}run(){throw n}exit(){throw n}enterWith(){throw n}}const o=globalThis.AsyncLocalStorage;function a(){return o?new o:new 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)})(ds,ds.exports);var oo=ds.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return s}});const s=(0,oo.createAsyncLocalStorage)();(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(us,us.exports);var tv=us.exports;(function(e,t){"TURBOPACK { transition: next-shared }";Object.defineProperty(t,"__esModule",{value:!0});function n(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}n(t,{getExpectedRequestStore:function(){return o},requestAsyncStorage:function(){return s.requestAsyncStorage}});const s=tv;function o(a){const i=s.requestAsyncStorage.getStore();if(i)return i;throw new Error("`"+a+"` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context")}(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)})(ls,ls.exports);var nv=ls.exports,ms={exports:{}},fs={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return s}});const s=(0,oo.createAsyncLocalStorage)();(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)})(fs,fs.exports);var rv=fs.exports;(function(e,t){"TURBOPACK { transition: next-shared }";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return n.actionAsyncStorage}});const n=rv;(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)})(ms,ms.exports);var sv=ms.exports,ps={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return n}});var n;(function(s){s[s.SeeOther=303]="SeeOther",s[s.TemporaryRedirect=307]="TemporaryRedirect",s[s.PermanentRedirect=308]="PermanentRedirect"})(n||(n={})),(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(ps,ps.exports);var ov=ps.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(y,v){for(var x in v)Object.defineProperty(y,x,{enumerable:!0,get:v[x]})}n(t,{RedirectType:function(){return c},getRedirectError:function(){return l},getRedirectStatusCodeFromError:function(){return _},getRedirectTypeFromError:function(){return h},getURLFromRedirectError:function(){return f},isRedirectError:function(){return p},permanentRedirect:function(){return m},redirect:function(){return u}});const s=nv,o=sv,a=ov,i="NEXT_REDIRECT";var c;(function(y){y.push="push",y.replace="replace"})(c||(c={}));function l(y,v,x){x===void 0&&(x=a.RedirectStatusCode.TemporaryRedirect);const C=new Error(i);C.digest=i+";"+v+";"+y+";"+x+";";const j=s.requestAsyncStorage.getStore();return j&&(C.mutableCookies=j.mutableCookies),C}function u(y,v){v===void 0&&(v="replace");const x=o.actionAsyncStorage.getStore();throw l(y,v,x!=null&&x.isAction?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.TemporaryRedirect)}function m(y,v){v===void 0&&(v="replace");const x=o.actionAsyncStorage.getStore();throw l(y,v,x!=null&&x.isAction?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.PermanentRedirect)}function p(y){if(typeof y!="object"||y===null||!("digest"in y)||typeof y.digest!="string")return!1;const[v,x,C,j]=y.digest.split(";",4),b=Number(j);return v===i&&(x==="replace"||x==="push")&&typeof C=="string"&&!isNaN(b)&&b in a.RedirectStatusCode}function f(y){return p(y)?y.digest.split(";",3)[2]:null}function h(y){if(!p(y))throw new Error("Not a redirect error");return y.digest.split(";",2)[1]}function _(y){if(!p(y))throw new Error("Not a redirect error");return Number(y.digest.split(";",4)[3])}(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)})(cs,cs.exports);var av=cs.exports,hs={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}n(t,{isNotFoundError:function(){return a},notFound:function(){return o}});const s="NEXT_NOT_FOUND";function o(){const i=new Error(s);throw i.digest=s,i}function a(i){return typeof i!="object"||i===null||!("digest"in i)?!1:i.digest===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)})(hs,hs.exports);var iv=hs.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(c,l){for(var u in l)Object.defineProperty(c,u,{enumerable:!0,get:l[u]})}n(t,{ReadonlyURLSearchParams:function(){return i},RedirectType:function(){return s.RedirectType},notFound:function(){return o.notFound},permanentRedirect:function(){return s.permanentRedirect},redirect:function(){return s.redirect}});const s=av,o=iv;class a extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class i extends URLSearchParams{append(){throw new a}delete(){throw new a}set(){throw new a}sort(){throw new 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)})(is,is.exports);var cv=is.exports,tm={};(function(e){"use client";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,{ServerInsertedHTMLContext:function(){return o},useServerInsertedHTML:function(){return a}});const s=bt._(g),o=s.default.createContext(null);function a(i){const c=(0,s.useContext)(o);c&&c(i)}})(tm);var wn={exports:{}},zr={},da;function lv(){return da||(da=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,{BailoutToCSRError:function(){return s},isBailoutToCSRError:function(){return o}});const n="BAILOUT_TO_CLIENT_SIDE_RENDERING";class s extends Error{constructor(i){super("Bail out to client-side rendering: "+i),this.reason=i,this.digest=n}}function o(a){return typeof a!="object"||a===null||!("digest"in a)?!1:a.digest===n}}(zr)),zr}var En={exports:{}},Nn={exports:{}},ma;function uv(){return ma||(ma=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return s}});const s=(0,oo.createAsyncLocalStorage)();(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 fa;function dv(){return fa||(fa=1,function(e,t){"TURBOPACK { transition: next-shared }";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return n.staticGenerationAsyncStorage}});const n=uv();(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(En,En.exports)),En.exports}var pa;function mv(){return pa||(pa=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"bailoutToClientRendering",{enumerable:!0,get:function(){return o}});const n=lv(),s=dv();function o(a){const i=s.staticGenerationAsyncStorage.getStore();if(!(i!=null&&i.forceStatic)&&i!=null&&i.isStaticGeneration)throw new n.BailoutToCSRError(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)}(wn,wn.exports)),wn.exports}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(x,C){for(var j in C)Object.defineProperty(x,j,{enumerable:!0,get:C[j]})}n(t,{ReadonlyURLSearchParams:function(){return l.ReadonlyURLSearchParams},RedirectType:function(){return l.RedirectType},ServerInsertedHTMLContext:function(){return u.ServerInsertedHTMLContext},notFound:function(){return l.notFound},permanentRedirect:function(){return l.permanentRedirect},redirect:function(){return l.redirect},useParams:function(){return h},usePathname:function(){return p},useRouter:function(){return f},useSearchParams:function(){return m},useSelectedLayoutSegment:function(){return v},useSelectedLayoutSegments:function(){return y},useServerInsertedHTML:function(){return u.useServerInsertedHTML}});const s=g,o=Hs,a=em,i=ev,c=qs,l=cv,u=tm;function m(){const x=(0,s.useContext)(a.SearchParamsContext),C=(0,s.useMemo)(()=>x?new l.ReadonlyURLSearchParams(x):null,[x]);if(typeof window>"u"){const{bailoutToClientRendering:j}=mv();j("useSearchParams()")}return C}function p(){return(0,s.useContext)(a.PathnameContext)}function f(){const x=(0,s.useContext)(o.AppRouterContext);if(x===null)throw new Error("invariant expected app router to be mounted");return x}function h(){return(0,s.useContext)(a.PathParamsContext)}function _(x,C,j,b){j===void 0&&(j=!0),b===void 0&&(b=[]);let w;if(j)w=x[1][C];else{const A=x[1];var S;w=(S=A.children)!=null?S:Object.values(A)[0]}if(!w)return b;const P=w[0],E=(0,i.getSegmentValue)(P);return!E||E.startsWith(c.PAGE_SEGMENT_KEY)?b:(b.push(E),_(w,C,!1,b))}function y(x){x===void 0&&(x="children");const C=(0,s.useContext)(o.LayoutRouterContext);return C?_(C.tree,x):null}function v(x){x===void 0&&(x="children");const C=y(x);if(!C||C.length===0)return null;const j=x==="children"?C[0]:C[C.length-1];return j===c.DEFAULT_SEGMENT_KEY?null: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)})(os,os.exports);var fv=os.exports,ha=fv;function pv({accountName:e}){const{user:t}=zt(),n=ha.usePathname(),s=ha.useSearchParams(),o=(t==null?void 0:t.sub)||(t==null?void 0:t.email),a=t==null?void 0:t.userId;return g.useEffect(()=>{o&&a?Jy("CUSTOM_USER_INFO",{userId:a,userEmail:o,platform:"store",account:e}):console.warn("[DT] Usuário deslogado ou sessão carregando...")},[n,s,o,a]),null}const Tn={teamComponents:{AddToCart:Us,BackToTop:Wf,HelpButton:ey,BuyPackage:sl,Filter:{...it,helpers:xu},...E_,FreightCalculation:lu,Header:cu,Link:Fe,Media:Ee,PLPNavigation:pt,ProductCard:fe,ProductList:st,ProductVariationList:Je,Sort:Yn,UserMenu:Kn,Newsletter:so,Form:kt},template:{minicart:ke,pdc:vd,pdc_composites:tt,pdp:mg,searchResult:Sd,wishList:Hc,LPCadastro:yy,SearchModal:Fd,LPStores:rt,tracker:pv},utils:{EventCollector:Bg,ExternalScripts:$g,LinkOrNotLink:nn,ObserverWrapper:Gn,SnackBarComponent:Lt,DraftJsLinkWrapper:sd}},hv=(e,t)=>{const n=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
|
${n}
|
|
56
56
|
]
|
|
57
57
|
}
|
|
58
|
-
`},Ox=Object.freeze(Object.defineProperty({__proto__:null,generateMiddleware:Lx},Symbol.toStringTag,{value:"Module"})),Dx={helpers:Ox},ms={"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 Mx(e,t){const{mediatorRef:n}=re();g.useEffect(()=>n.current.subscribe(e,t),[e,t])}const _a=({prevOnClick:e,nextOnClick:t,onBulletClick:n,currentPage:s,totalPages:o,position:a,hideControllers:i,left:c,isFirst:l,ICONS:u})=>{const[m,f]=g.useState("default");return Mx("herobanner:change_controllers_variant",p=>{l&&f(p.includes("white")?"inverse":"default")}),r.jsxs(d.Carousel.Controller,{className:ms["carousel-controllers-modifier"],position:a??"absolute","data-hide-controllers":i,bottom:"16px",top:"unset",left:c,children:[r.jsxs(d.Carousel.Arrows,{className:ms["carrousel-arrows-display-controller"],children:[r.jsx(d.Button,{variant:"tertiary",onClick:e,adornment:{start:r.jsx(d.Icon,{name:u.arrow_left})},mode:m}),r.jsx(d.Button,{variant:"tertiary",onClick:t,adornment:{start:r.jsx(d.Icon,{name:u.arrow_right})},mode:m})]}),r.jsx(d.Carousel.Bullets,{page:s,total:o,onBulletClick:n,mode:m})]})},Fx=({children:e,data:t,banner:n,...s})=>{const{mediatorRef:o}=re();return t.data.first?r.jsx(Wn,{observerOptions:{threshold:.51},stopOnIntersection:!1,callBackWhenVisible:()=>{o.current.publish("header:change_variant",n.headerVariant)},...s,children:e}):r.jsx(r.Fragment,{children:e})},sm=e=>{const{initialize:t,pagination:n,controller:s,itemsStyles:o}=d.Carousel.useCarousel({gap:e.data.config.gap,itemsPerPage:e.data.config.slidesPerView,direction:"row"}),a=g.useRef(void 0),i=g.useMemo(()=>hd(e.data.config.controllerPosition??"dentro-inferior-centro"),[e]),c=g.useCallback(()=>{e.data.config.slideDuration&&n.totalPages>1&&(a.current=setInterval(()=>{s==null||s.nextPage()},e.data.config.slideDuration*1e3))},[s,e.data.config.slideDuration,n.totalPages]),l=g.useCallback(m=>{clearInterval(a.current),c(),m()},[c]),u=g.useMemo(()=>{var m;return{nextOnClick:()=>l(()=>s==null?void 0:s.nextPage()),prevOnClick:()=>l(()=>s==null?void 0:s.prevPage()),onBulletClick:f=>l(()=>s==null?void 0:s.navigateTo(f)),currentPage:n.currentPage,totalPages:n.totalPages,position:i.position,hideControllers:((m=e.data.config)==null?void 0:m.hideControllers)??!1,left:i.left}},[n.currentPage,n.totalPages,i.position,e.data.config.hideControllers,l,s]);return g.useEffect(()=>(c(),()=>clearInterval(a.current)),[c]),r.jsx(Qe,{name:e.name,children:r.jsxs(d.Carousel.Root,{innerRef:m=>{t(m)},className:d.helpers.classNameConcat(ms["custom-carousel"],e.data.config.fullWidth?"":"common-section"),"data-infinity-border":!0,style:{...e.data.config.marginTop!=="0px"&&{marginTop:`-${e.data.config.marginTop}`},...e.data.config.marginBottom!=="0px"&&{marginBottom:`-${e.data.config.marginBottom}`}},children:[i.shouldRender==="top"&&n.totalPages>1?r.jsx(_a,{ICONS:e.ICONS,...u,isFirst:e.data.first}):r.jsx(r.Fragment,{}),r.jsx(d.Carousel.Body,{children:e==null?void 0:e.data.banners.map((m,f)=>r.jsx(d.Carousel.Item,{style:o,children:r.jsx(Fx,{data:e,banner:m,children:r.jsx(an,{name:"Banner Carousel",ICONS:e.ICONS,TEXTCONTENT_EXPANDED:e.TEXTCONTENT_EXPANDED,TIME_ZONE:e.TIME_ZONE,suppressContentEditableWarning:!0,suppressHydrationWarning:!0,className:e.className,data:{banner:m,index:f,componentIndex:e.data.componentIndex},creative:"banner-carousel",...e.data.first&&f===0&&{priority:!0}})})},`hero-banner-item-${f}`))}),i.shouldRender==="bottom"&&n.totalPages>1?r.jsx(_a,{ICONS:e.ICONS,...u}):r.jsx(r.Fragment,{})]})})},zx={Banner:Ys},Rt={"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"},om=({data:e,name:t,CONSTANTS:n})=>{var m;const{isMobile:s}=re(),o=e.config.size??"medium",a=e.config.disableCarouselMobile??!1,{initialize:i,pagination:c,controller:l,itemsStyles:u}=d.Carousel.useCarousel({itemsPerPage:s?e==null?void 0:e.config.slidesPerViewMobile:(m=e==null?void 0:e.config)==null?void 0:m.slidesPerView,gap:s?e.config.gapMobile:e.config.gap,direction:s&&a?"column":"row"});return r.jsx(Qe,{name:t,children:r.jsx(d.Utils.Column,{style:{width:o==="small"?"70%":"100%"},alignContent:"center",justifyContent:"center",alignItems:"center",children:r.jsxs(d.Carousel.Root,{innerRef:f=>{i(f)},className:d.helpers.classNameConcat(Rt["carousel-modifier"],"common-section"),children:[o==="medium"?r.jsxs(d.TextStructure.Root,{children:[n.ACTIVE_BENNEFITS_BAR_TITLE&&r.jsx(d.TextStructure.DivWrapper,{className:Rt["carousel-title-modifier"],children:r.jsx("h2",{className:"typography-style-body-lg",children:n.BENNEFITS_BAR_TITLE})}),s&&c.totalPages>1&&r.jsx(d.Carousel.Controller,{className:d.helpers.classNameConcat(Rt["row-controller-modifier"],n.ACTIVE_BENNEFITS_BAR_TITLE?Rt["title-on"]:void 0),children:r.jsxs(d.Carousel.Arrows,{children:[r.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.prevPage(),adornment:{start:r.jsx(d.Icon,{name:n.ICONS.arrow_left})}}),r.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.nextPage(),adornment:{start:r.jsx(d.Icon,{name:n.ICONS.arrow_right})}})]})})]}):r.jsx(r.Fragment,{}),r.jsx(d.Carousel.Body,{children:e.bennefit.map((f,p)=>r.jsx(d.Carousel.Item,{className:Rt["card-modifier"],style:u,children:r.jsx(d.Card,{stroke:!0,padding:"small",children:r.jsx(d.TextStructure.Root,{layoutProps:{columnWrapper:{alignContent:"start",alignItems:"start",justifyContent:"start"},textRow:{alignContent:"center",alignItems:"center",justifyContent:"center"}},adornment:{[o==="medium"?"top":"start"]:r.jsx(d.Icon,{name:f.icon,size:o==="medium"?"medium":"small"})},children:r.jsxs(d.TextStructure.DivWrapper,{alignItems:"start",children:[r.jsx("h3",{className:"typography-style-body-md",children:f.title}),f.subtitle&&f.subtitle.length?r.jsx("p",{className:"typography-style-body-xs",children:f.subtitle}):r.jsx(r.Fragment,{})]})})})},`bennefit=${p}`))}),!s&&c.totalPages>1?r.jsxs(d.Carousel.Controller,{className:Rt["row-controller-modifier"],children:[r.jsxs(d.Carousel.Arrows,{children:[r.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.prevPage(),adornment:{start:r.jsx(d.Icon,{name:n.ICONS.arrow_left})}}),r.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.nextPage(),adornment:{start:r.jsx(d.Icon,{name:n.ICONS.arrow_right})}})]}),r.jsx(d.Carousel.Bullets,{page:c.currentPage,total:c.totalPages,onBulletClick:f=>l==null?void 0:l.navigateTo(f)})]}):r.jsx(r.Fragment,{})]})})})},am=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:n,className:s,name:o})=>r.jsx(Qe,{name:o,children:r.jsx("div",{className:d.helpers.classNameConcat(cs.textContentSection,s??""),style:e.borderTop?{borderTop:"none"}:void 0,children:r.jsx(_d,{data:e,ICONS:t,TEXTCONTENT_EXPANDED:n})})}),ga={"accordion-modifier":"_accordion-modifier_1we16_1","accordion-body-modifier":"_accordion-body-modifier_1we16_7"},im=({data:e,id:t,ICONS:n,className:s,name:o})=>{var c;const[a,i]=g.useState([]);return r.jsx(Qe,{name:o,children:r.jsxs(d.Utils.Column,{gap:"var(--gap-vertical-sm)",className:s??"",children:[e.titleAccordion?r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-sm","common-section"),style:{fontWeight:500},children:e.titleAccordion})})}):r.jsx(r.Fragment,{}),(c=e.accordions)==null?void 0:c.map((l,u)=>r.jsxs(d.Accordion.Wrapper,{className:ga["accordion-modifier"],children:[r.jsx(d.Accordion.Header,{id:`${t}-text-accordion-${u}`,openIndicator:r.jsx(d.Icon,{name:n.arrow_down}),closeIndicator:r.jsx(d.Icon,{name:n.arrow_up}),startOpen:a.includes(u),onClick:()=>i(m=>m.includes(u)?m.filter(f=>f!==u):[...m,u]),children:r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("h3",{className:"typography-style-body-md-strong",children:l.title}),l.subtitle&&l.subtitle.length?r.jsx("h2",{children:l.subtitle}):r.jsx(r.Fragment,{})]})})}),r.jsx(d.Accordion.Body,{children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:ga["accordion-body-modifier"],children:r.jsx(Je.Editor,{editorKey:`${t}-editor-${u}`,blockRenderMap:Ln,editorState:l.text?kn(JSON.parse(l.text)):Je.EditorState.createEmpty(),onChange:()=>null})})})})]},`${t}-accordion-${u}-${a.includes(u)}`))]})})},cm=g.createContext({}),Bx=({data:e,children:t,...n})=>{var _,y,x,b,C,j,v,P,E,S,I,T,A;const[s,o]=g.useState(!0),{initialize:a,controller:i,itemsStyles:c}=d.Carousel.useCarousel({gap:0,itemsPerPage:1}),l={slideTranstionTimer:(y=(_=e==null?void 0:e.staticConfig)==null?void 0:_.staticConfig)==null?void 0:y.slideTranstionTimer,showCarouselArrows:(b=(x=e==null?void 0:e.staticConfig)==null?void 0:x.staticConfig)==null?void 0:b.showCarouselArrows,hasCloseBtn:(j=(C=e==null?void 0:e.staticConfig)==null?void 0:C.staticConfig)==null?void 0:j.hasCloseBtn,backgroundColor:(P=(v=e==null?void 0:e.staticConfig)==null?void 0:v.staticConfig)==null?void 0:P.backgroundColor,textColorVariant:(S=(E=e==null?void 0:e.staticConfig)==null?void 0:E.staticConfig)==null?void 0:S.textColorVariant,content:((T=(I=e==null?void 0:e.content)==null?void 0:I.content)==null?void 0:T.items)??[]},u=(A=l.content)==null?void 0:A.filter(k=>!k.countDownEndDate||new Date(k.countDownEndDate)>new Date),m=u.length>1,f={...l.backgroundColor?{backgroundColor:l.backgroundColor}:{}},p=()=>{o(!1)},h=d.helpers.ValidateProp({fieldTypes:Lt.Mode,property:l.textColorVariant,fallback:"default"});return r.jsx(cm.Provider,{value:{isOpen:s,setIsOpen:o,hasCarousel:m,backgroundStyle:f,handleCloseTipbar:p,mode:h,slideTranstionTimer:l.slideTranstionTimer,showCarouselArrows:l.showCarouselArrows,hasCloseBtn:l.hasCloseBtn,slices:u,carouselProps:{initialize:a,controller:i,itemsStyles:c},...n},children:t})},ut=()=>g.useContext(cm),Ux=({dateEnd:e,...t})=>{const{CONSTANTS:{TIME_ZONE:n}}=ut();return r.jsx(An,{dateEnd:new Date(e),TIME_ZONE:n,...t})},$x="_tipbar_bt3p0_1",Hx="_tipbar__carousel_bt3p0_15",cn={tipbar:$x,tipbar__carousel:Hx,"tipbar__close-btn":"_tipbar__close-btn_bt3p0_29","tipbar-item":"_tipbar-item_bt3p0_37","tipbar-item__coupon":"_tipbar-item__coupon_bt3p0_45"},qx=({coupon:e,feedbackTitle:t,feedbackDescription:n,...s})=>{const{CONSTANTS:o}=ut(),{addCouponSeller:a,cartStore:i}=be(),[c,l]=g.useState({status:!1,showSnackBar:!1}),[u,m]=g.useState(!1),[f,p]=g.useState(!1),h=async()=>{if(!i.items.length){p(!0);return}(await a(e,"coupon")).code===200?l({status:!0,showSnackBar:!0}):m(!0)};return g.useEffect(()=>{c.showSnackBar&&setTimeout(()=>{l(_=>({..._,showSnackBar:!1}))},o.TIPBAR_CONFIGS.snackbar_timeout)},[c.showSnackBar]),g.useEffect(()=>{u&&setTimeout(()=>{m(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[u]),g.useEffect(()=>{f&&setTimeout(()=>{p(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[f]),r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{...s,onClick:h,disabled:c.status,className:cn["tipbar-item__coupon"],children:c.status?`${o.TIPBAR_CONFIGS.coupon_applied_message}`:`${o.TIPBAR_CONFIGS.coupon_default_message}`}),c.showSnackBar&&(t||n)&&r.jsx(Ot,{title:t,subtitle:n,Z_INDEX_WAR:o.Z_INDEX_WAR},`feedback-coupon-${e}`),u&&r.jsx(Ot,{title:o.TIPBAR_CONFIGS.coupon_error_title,subtitle:o.TIPBAR_CONFIGS.coupon_error_message,Z_INDEX_WAR:o.Z_INDEX_WAR},`error-coupon-${e}`),f&&r.jsx(Ot,{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}`)]})},Vx=({title:e,description:t,style:n,mode:s,className:o})=>r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{mode:s,className:o,children:[e&&r.jsx("h3",{className:"typography-style-body-sm",style:n,children:e}),t&&r.jsx("p",{className:"typography-style-caption",style:n,children:t})]})}),Wx=({coupon:e,...t})=>{const{CONSTANTS:n}=ut();return r.jsx(d.Copy,{...t,iconCopy:n.ICONS.copy,iconSuccess:n.ICONS.check,children:e})},Gx=({staticZone:e,type:t,className:n,description:s,title:o})=>{const{mode:a}=ut();if(t==="countdown")return r.jsx(Ux,{dateEnd:e.countDownEndDate,size:"x-small",mode:a});if(t==="coupon"){const i=d.helpers.ValidateProp({fieldTypes:Lt.Mode,property:e.couponButtonMode,fallback:"default"}),c=d.helpers.ValidateProp({fieldTypes:Lt.VariantsExtended,property:e.couponButtonVariant,fallback:"primary"});return e.coupon?r.jsx(qx,{coupon:e.coupon,mode:i,variant:c,feedbackTitle:e.couponFeedbackTitle,feedbackDescription:e.couponFeedbackDescription}):null}if(t==="copy"){const i=d.helpers.ValidateProp({fieldTypes:Lt.Mode,property:e.couponButtonMode,fallback:"default"});return e.coupon?r.jsx(Wx,{coupon:e.coupon,mode:i}):null}return r.jsx(Vx,{title:o,description:s,mode:a,className:n})},ya=({handleCloseTipbar:e,mode:t})=>{const{CONSTANTS:n}=ut();return r.jsx(d.Button,{title:"fechar tipbar",className:cn["tipbar__close-btn"],onClick:e,variant:"tertiary",mode:t,adornment:{start:r.jsx(d.Icon,{name:n.ICONS.close})}})},Kx=({children:e,mode:t="default",showCarouselArrows:n=!0,slideTranstionTimer:s})=>{const{carouselProps:o,CONSTANTS:a}=ut(),i=g.useRef(null),c=(u,m)=>{var f,p;u.stopPropagation(),u.preventDefault(),m==="prev"?(f=o.controller)==null||f.prevPage():(p=o.controller)==null||p.nextPage(),i.current&&(clearInterval(i.current),l())},l=g.useCallback(()=>{if(s&&o.controller){const u=setInterval(()=>{var m;(m=o.controller)==null||m.nextPage()},s);i.current=u}},[s,o]);return g.useEffect(()=>(l(),()=>{i.current&&clearInterval(i.current)}),[s,l]),r.jsxs(d.Carousel.Root,{innerRef:u=>{o.initialize(u)},className:cn.tipbar__carousel,style:{flexDirection:"row",alignItems:"center"},children:[n&&r.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"prev"),adornment:{start:r.jsx(d.Icon,{name:a.ICONS.arrow_left})}}),r.jsx(d.Carousel.Body,{children:e}),n&&r.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"next"),adornment:{start:r.jsx(d.Icon,{name:a.ICONS.arrow_right})}})]})},Xx=({children:e,className:t})=>{const{hasCarousel:n,mode:s,hasCloseBtn:o,backgroundStyle:a,showCarouselArrows:i,slideTranstionTimer:c,handleCloseTipbar:l}=ut(),u=n&&i;return r.jsx("div",{style:a,"data-hasclosebtn":o,className:d.helpers.classNameConcat(cn.tipbar,t),children:n?r.jsxs(r.Fragment,{children:[r.jsx(Kx,{mode:s,showCarouselArrows:u,slideTranstionTimer:c,children:e}),o&&r.jsx(ya,{handleCloseTipbar:l,showCarouselArrows:u,mode:s})]}):r.jsxs(r.Fragment,{children:[e,o&&r.jsx(ya,{handleCloseTipbar:l,mode:s})]})})},Yx=({children:e,highlightFirstSection:t,...n})=>{const{hasCarousel:s,carouselProps:o}=ut(),a=r.jsx("div",{...n,className:cn["tipbar-item"],children:e});return s?r.jsx(d.Carousel.Item,{style:o.itemsStyles,children:a}):a},lm=({className:e})=>{const{isOpen:t,slices:n}=ut();return n.length&&t?r.jsx(Xx,{children:n.map((s,o)=>{var a;return r.jsx(r.Fragment,{children:r.jsx(on,{href:s.link,children:r.jsx(Yx,{highlightFirstSection:s.highlightFirstSection,"data-justifyhighlightedsection":s.horizontalAlignHighlightedSection?s.horizontalAlignHighlightedSection:"center",children:s&&((a=s==null?void 0:s.items)!=null&&a.length)?s.items.map((i,c)=>r.jsx(Gx,{staticZone:s,type:i.type,title:i.title,description:i.description,className:e},`tipbar-slice-field-${c}`)):null})})},`tipbar-slice-${o}`)})}):null};lm.displayName="TipBar.Root";const ps=({className:e,...t})=>r.jsx(Bx,{...t,children:r.jsx(lm,{className:e})});ps.displayName="TipBar";const Qx=({CONSTANTS:e,data:t})=>{const{pathname:n}=ue(),{tipbarRef:s}=Pe(),o=c=>{const l=t==null?void 0:t.find(u=>{var m,f,p,h,_;return((f=(m=u.staticConfig)==null?void 0:m.staticConfig)==null?void 0:f.deviceType)===c&&((_=(h=(p=u.staticConfig)==null?void 0:p.staticConfig)==null?void 0:h.paths)==null?void 0:_.includes(n))});return l||(t==null?void 0:t.find(u=>{var m,f,p,h,_,y;return((f=(m=u.staticConfig)==null?void 0:m.staticConfig)==null?void 0:f.deviceType)===c&&(!((h=(p=u.staticConfig)==null?void 0:p.staticConfig)!=null&&h.paths)||((y=(_=u.staticConfig)==null?void 0:_.staticConfig)==null?void 0:y.paths.length)===0)}))},a=o("desktop"),i=o("mobile");return r.jsxs("div",{ref:s,className:H.responsive["responsive-flex"],children:[i&&r.jsx("div",{className:H.responsive["responsive-mobile-flex"],children:r.jsx(ps,{data:i,CONSTANTS:e})}),a&&r.jsx("div",{className:H.responsive["responsive-desktop-flex"],children:r.jsx(ps,{data:a,CONSTANTS:e})})]})},xa={"card-image-wrapper":"_card-image-wrapper_10mul_1","card-image-container":"_card-image-container_10mul_9"},um=e=>{const{nextimage:t}=ue();return r.jsx(Qe,{name:e.name,children:e.data.banners.map((n,s)=>r.jsx("div",{className:xa["card-image-wrapper"],children:r.jsx("div",{className:xa["card-image-container"],children:r.jsx(t,{src:n.image,alt:n.altImage?n.altImage:"Banner Coleção",width:500,height:600})})},s))})},Zx=({SectionZone:e,name:t,storeId:n,previewId:s})=>{const[o,a]=g.useState();return g.useEffect(()=>{o||H.fetchContentType("search",{name:t,storeId:n,previewId:s}).then(i=>{i!=null&&i.data&&Array.isArray(i.data)&&a(i.data[0])})},[]),r.jsx(e,{data:o??[]})},dm=({data:{componentIndex:e,...t},name:n,CONSTANTS:s})=>r.jsx(Qe,{name:n,children:r.jsx(Js,{...t,CONSTANTS:s})}),mm=async e=>{const{type:t}=e,n=t==="collectionSearch"?"/api/search/product":"/api/search/crosseling",s=JSON.stringify(t==="collectionSearch"?{...e.params,facets:e.facets,term:e.term,forceUpdate:!1}:e.facets);return(await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:s}).then(a=>a.json()).then(a=>t==="collectionSearch"?a.data.products:a.products)).filter(a=>!!a.node.availability.status)},Jx="_shelf__container_bi04n_10",pm={shelf__container:Jx},ev=({collectionSearch:e,title:t,CONSTANTS:n,searchModal:s})=>{const[o,a]=g.useState([]),{isMobile:i}=re(),{ref:c,inView:l}=ba.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:u}=ae();return g.useEffect(()=>{if(!e)return;function m(){var f,p;mm({type:"collectionSearch",term:e==null?void 0:e.term,facets:e==null?void 0:e.facets,params:{count:((f=e==null?void 0:e.params)==null?void 0:f.count)??12,sort:((p=e==null?void 0:e.params)==null?void 0:p.sort)??n.ITEMS_DEFAULT_SORT}}).then(h=>{a(h)})}m()},[e]),g.useEffect(()=>{!l||o.length===0||u({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o},customData:{item_list_name:t??"Você também pode gostar"}}})},[l,o]),o.length===0?null:r.jsx("div",{ref:c,className:pm.shelf__container,children:r.jsx(Qt.Shelf,{title:t??"Você também pode gostar",itemsPerPage:s?{desktop:2,mobile:1.4}:{desktop:4.4,mobile:2.2},ICONS:n.ICONS,children:Array.isArray(o)&&o.map(({node:m},f)=>{const{availability:{status:p}}=m;return p?r.jsx(Qt.Card,{item:m,isMobile:i,size:"medium",index:f,shelfTitle:t??"Você também pode gostar",CONSTANTS:n},m.id):null})})})},tv=({recommendationSearch:e,title:t,CONSTANTS:n})=>{const[s,o]=g.useState([]),{isMobile:a}=re(),{ref:i,inView:c}=ba.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:l}=ae(),u=g.useMemo(()=>e?[{key:e.type,value:e.productId}]:[],[e]);return g.useEffect(()=>{if(!e)return;function m(){var f;mm({type:"recommendationSearch",facets:u,params:{count:((f=e==null?void 0:e.params)==null?void 0:f.count)??12,sort:n.ITEMS_DEFAULT_SORT}}).then(p=>o(p))}m()},[u,e]),g.useEffect(()=>{if(!c||s.length===0||(e==null?void 0:e.type)==="suggestions")return;const m=t??"Você também pode gostar";l({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:s},customData:{item_list_name:m},outsideEcommerceData:{item_list_name:m}}})},[c,s]),(s==null?void 0:s.length)===0?null:(e==null?void 0:e.type)==="suggestions"?r.jsx(fl,{products:s,innerRef:i,inView:c,CONSTANTS:n}):r.jsx("div",{ref:i,className:pm.shelf__container,children:r.jsx(Qt.Shelf,{title:t??"Você também pode gostar",itemsPerPage:{desktop:4.4,mobile:2.2},ICONS:n.ICONS,children:Array.isArray(s)&&s.map(({node:m},f)=>{const{availability:{status:p}}=m;return p?r.jsx(Qt.Card,{item:m,isMobile:a,size:"medium",index:f,shelfTitle:t??"Você também pode gostar",CONSTANTS:n},m.id):null})})})},fm=({data:e,name:t,CONSTANTS:n})=>{const{productId:s}=dc();return!(e!=null&&e.productLists)||e.productLists.length===0?null:e.productLists.map((o,a)=>r.jsx(Qe,{name:t,children:r.jsx(tv,{title:o.title,recommendationSearch:{type:o.product_group_option,productId:s,params:{count:o.number_of_items,sort:"score:desc"}},CONSTANTS:n},`shelf=${a}`)}))},hm=({data:e,CONSTANTS:t,searchModal:n,name:s})=>{var a;const o=(a=e==null?void 0:e.productLists)==null?void 0:a.filter(i=>!!i.collectionId||!!i.search_base_name);return!o||o.length===0?null:o.map((i,c)=>{const l=i.collectionId?{term:"",facets:[{key:"productclusterids",value:`${i.collectionId}`}]}:{term:i.search_base_name,facets:[]};return r.jsx(Qe,{name:s,children:r.jsx(ev,{title:i.title,collectionSearch:{params:{count:i.number_of_items,sort:i.sort},...l},searchModal:n,CONSTANTS:t},`shelf=${c}`)})})},nv="_embedLiveContainer_1ss0l_2",rv="_embedLivePlayer_1ss0l_7",va={embedLiveContainer:nv,embedLivePlayer:rv},_m=({data:e,name:t})=>r.jsx(Qe,{name:t,children:r.jsx("div",{className:va.embedLiveContainer,children:r.jsx("div",{className:va.embedLivePlayer,children:e.banner.videosrc?r.jsx(we.Video,{src:e.banner.videosrc??"",playsInline:!0,autoPlay:!0,loop:!0,muted:!0,title:"Live",controls:!0}):r.jsxs("div",{children:[r.jsx("iframe",{src:e.banner.embed_source??"",allow:"autoplay; fullscreen; picture-in-picture; loop;",title:"Live"}),r.jsx(Od,{src:"https://player.vimeo.com/api/player.js",defer:!0,strategy:"lazyOnload"})]})})})}),sv="_popup_5taxs_9",ov="_popup__overlay_5taxs_19",av="_popup__modal_5taxs_27",$e={popup:sv,popup__overlay:ov,popup__modal:av,"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"},iv=e=>r.jsx("div",{className:$e["popup__modal--success"],children:r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:e.ICONS.check_circle,size:"large"})},children:r.jsxs(d.TextStructure.DivWrapper,{className:$e["text-structure-modifier"],children:[r.jsx("h3",{className:"typography-style-body-sm-strong",children:e.successTitle}),r.jsx("p",{className:"typography-style-body-caption",children:e.successDescription})]})})}),cv=e=>{const{title:t,description:n,groups:s,ICONS:o}=e,{formErrors:a,submitForm:i,success:c}=er(),[l,u]=g.useState(!1);return r.jsx("form",{onSubmit:i,className:$e.formContainer,children:r.jsxs("div",{className:$e["popup__modal--form"],children:[r.jsxs(d.TextStructure.DivWrapper,{className:$e["popup__modal--header"],children:[r.jsx("strong",{className:"typography-style-body-md-strong",children:t}),r.jsx("p",{className:"typography-style-body-xs",children:n})]}),c?r.jsx(iv,{...e}):r.jsxs(r.Fragment,{children:[s.map(m=>r.jsx(Dt.FieldGroup,{group:m,children:r.jsx(Dt.FieldWrapper,{fields:m.fields})},m.groupLabel)),r.jsx(d.Checkbox,{className:$e["popup__modal--checkbox"],adornment:r.jsx(d.Icon,{name:o.check,size:"small"}),name:"terms-and-conditions",label:"Li e aceito os termos de política de privacidade abaixo.",sizeVariant:"small",checked:l,onChange:()=>u(!l)}),r.jsxs("div",{children:[!l&&r.jsx(d.TextStructure.DivWrapper,{className:$e["popup__modal--status"],children:r.jsxs("p",{className:"typography-style-body-caption",children:[r.jsx(d.Icon,{size:"small",name:o.alert_circle}),fp]})}),r.jsx(d.Button,{disabled:!l,size:"medium",type:"submit",children:_p}),a.length?r.jsx(d.TextStructure.DivWrapper,{className:$e["popup__modal--status"],children:r.jsx("p",{className:d.helpers.classNameConcat($e.formSubmitWarning,"typography-style-body-xs"),children:hp})}):null]})]})]})})},gm=({data:e,name:t,CONSTANTS:n})=>{const[s,o]=g.useState(!1),a=typeof window<"u"?window.sessionStorage.getItem(n.POPUP_TRACK_STORAGE)||window.localStorage.getItem(n.POPUP_SUBMITTED_STORAGE):null,i=()=>{o(!1),window.sessionStorage.setItem(n.POPUP_TRACK_STORAGE,"true")};return g.useEffect(()=>{setTimeout(()=>!a&&o(!0),2e3)},[]),e.active&&s?r.jsx(Qe,{name:t,children:r.jsxs("div",{className:$e.popup,children:[r.jsx("div",{onClick:i,className:$e.popup__overlay}),r.jsxs("div",{className:$e.popup__modal,children:[r.jsx(d.Button,{onClick:i,variant:"tertiary",className:$e["popup__modal--close"],children:r.jsx(d.Icon,{style:{color:e.closeColor||"#000"},name:n.ICONS.close,size:"medium"})}),r.jsx("div",{children:r.jsx(we.Image,{src:e.imageUrl,width:"459",height:"418",alt:e.title})}),r.jsx(qd,{...e,children:r.jsx(cv,{...e,ICONS:n.ICONS})})]})]})}):null},lv={"Image Grid":um,"Embed Live":_m,"Banner Carousel":sm,Banner:Ys,"Bennefits Bar":om,newsletter:dm,TextContent:am,TextAccordion:im,"Product Carousel":hm,"PDP Product Carousel":fm,"Popup Modal":gm},uv=({data:e,identifyWhoIsFirst:t=!1,componentConfigs:n})=>e==null?void 0:e.map((s,o)=>{const a=lv[s.name],i={...(n==null?void 0:n[s.name])??{}};return t&&o===0&&(s.data.first=!0),s.data.componentIndex=o,s.name==="TextAccordion"&&(i.id=`text-accordion-${o}`),a?r.jsx(a,{name:s.name,data:s.data,...i},`section-zone-component-${o}`):null}),dv=e=>{const t=fv(pv(e));return mv(t)},mv=e=>{const t=[];for(const n in e)t.push(...e[n]);return t},pv=e=>!e||!Array.isArray(e)?{}:e==null?void 0:e.reduce((t,n)=>{if(n!=null&&n.cidade){let s=t[n==null?void 0:n.cidade];s===void 0&&(s=t[n==null?void 0:n.cidade]=[]),s.push(n)}return t},{}),fv=e=>{if(!e||!Object.keys(e).length)return{};const t=Object.keys(e).sort((s,o)=>s.localeCompare(o)),n={};for(const s of t)n[s]=e[s];return n},hv=({content:e,data:t,showVendor:n,ICONS:s,entity:o,LPLOJAS_TEMPLATE_RETURN_BUTTON:a})=>{const[i,c]=g.useState([]);return g.useEffect(()=>{(async()=>{try{const u=await fetch("/api/master-data/search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({masterDataEntity:o,searchFields:{_fields:"_all"},headers:{"REST-Range":"resources=0-1000"}})});if(!u.ok)throw new Error(`[LPStoresClientWrapper] MasterData error ${u.status}`);const m=await u.json();c(dv(m))}catch(u){console.error(u)}})()},[o]),!Array.isArray(t)||!t.length?null:r.jsxs(st.Root,{data:i,children:[r.jsx(st.Title,{children:e.titlePage}),r.jsx(st.Section,{imgSrcDesk:e.imageBackgroundDesk,imgSrcMob:e.imageBackgroundMob,imgAlt:e.altImageBackgroud,children:r.jsx(st.Content,{showVendor:n,ICONS:s,LPLOJAS_TEMPLATE_RETURN_BUTTON:a})})]})},_v={Banner:zx,BannerSection:an,BennefitsBarSection:om,SingleBannerSection:Ys,TextContentSection:am,BannerCarousel:sm,TextAccordionSection:im,TipbarScreening:Qx,ImageGrid:um,SearchPageScreening:H.SearchPageScreening,SearchContent:Zx,NewsletterSection:dm,PDPProductCarousel:fm,ProductCarousel:hm,EmbedLive:_m,PopupModalSection:gm,SectionZone:uv,LPStoresClientWrapper:hv},gv={Components:_v,helpers:Sy};exports.cms=gv;exports.contexts=yc;exports.data=Ds;exports.layout=wn;exports.scripts=Dx;
|
|
58
|
+
`},_v=Object.freeze(Object.defineProperty({__proto__:null,generateMiddleware:hv},Symbol.toStringTag,{value:"Module"})),gv={helpers:_v},_s={"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 yv(e,t){const{mediatorRef:n}=ne();g.useEffect(()=>n.current.subscribe(e,t),[e,t])}const _a=({prevOnClick:e,nextOnClick:t,onBulletClick:n,currentPage:s,totalPages:o,position:a,hideControllers:i,left:c,isFirst:l,ICONS:u})=>{const[m,p]=g.useState("default");return yv("herobanner:change_controllers_variant",f=>{l&&p(f.includes("white")?"inverse":"default")}),r.jsxs(d.Carousel.Controller,{className:_s["carousel-controllers-modifier"],position:a??"absolute","data-hide-controllers":i,bottom:"16px",top:"unset",left:c,children:[r.jsxs(d.Carousel.Arrows,{className:_s["carrousel-arrows-display-controller"],children:[r.jsx(d.Button,{variant:"tertiary",onClick:e,adornment:{start:r.jsx(d.Icon,{name:u.arrow_left})},mode:m}),r.jsx(d.Button,{variant:"tertiary",onClick:t,adornment:{start:r.jsx(d.Icon,{name:u.arrow_right})},mode:m})]}),r.jsx(d.Carousel.Bullets,{page:s,total:o,onBulletClick:n,mode:m})]})},vv=({children:e,data:t,banner:n,...s})=>{const{mediatorRef:o}=ne();return t.data.first?r.jsx(Gn,{observerOptions:{threshold:.51},stopOnIntersection:!1,callBackWhenVisible:()=>{o.current.publish("header:change_variant",n.headerVariant)},...s,children:e}):r.jsx(r.Fragment,{children:e})},nm=e=>{const{initialize:t,pagination:n,controller:s,itemsStyles:o}=d.Carousel.useCarousel({gap:e.data.config.gap,itemsPerPage:e.data.config.slidesPerView,direction:"row"}),a=g.useRef(void 0),i=g.useMemo(()=>od(e.data.config.controllerPosition??"dentro-inferior-centro"),[e]),c=g.useCallback(()=>{e.data.config.slideDuration&&n.totalPages>1&&(a.current=setInterval(()=>{s==null||s.nextPage()},e.data.config.slideDuration*1e3))},[s,e.data.config.slideDuration,n.totalPages]),l=g.useCallback(m=>{clearInterval(a.current),c(),m()},[c]),u=g.useMemo(()=>{var m;return{nextOnClick:()=>l(()=>s==null?void 0:s.nextPage()),prevOnClick:()=>l(()=>s==null?void 0:s.prevPage()),onBulletClick:p=>l(()=>s==null?void 0:s.navigateTo(p)),currentPage:n.currentPage,totalPages:n.totalPages,position:i.position,hideControllers:((m=e.data.config)==null?void 0:m.hideControllers)??!1,left:i.left}},[n.currentPage,n.totalPages,i.position,e.data.config.hideControllers,l,s]);return g.useEffect(()=>(c(),()=>clearInterval(a.current)),[c]),r.jsx(Ye,{name:e.name,children:r.jsxs(d.Carousel.Root,{innerRef:m=>{t(m)},className:d.helpers.classNameConcat(_s["custom-carousel"],e.data.config.fullWidth?"":"common-section"),"data-infinity-border":!0,style:{...e.data.config.marginTop!=="0px"&&{marginTop:`-${e.data.config.marginTop}`},...e.data.config.marginBottom!=="0px"&&{marginBottom:`-${e.data.config.marginBottom}`}},children:[i.shouldRender==="top"&&n.totalPages>1?r.jsx(_a,{ICONS:e.ICONS,...u,isFirst:e.data.first}):r.jsx(r.Fragment,{}),r.jsx(d.Carousel.Body,{children:e==null?void 0:e.data.banners.map((m,p)=>r.jsx(d.Carousel.Item,{style:o,children:r.jsx(vv,{data:e,banner:m,children:r.jsx(rn,{name:"Banner Carousel",ICONS:e.ICONS,TEXTCONTENT_EXPANDED:e.TEXTCONTENT_EXPANDED,TIME_ZONE:e.TIME_ZONE,suppressContentEditableWarning:!0,suppressHydrationWarning:!0,className:e.className,data:{banner:m,index:p,componentIndex:e.data.componentIndex},creative:"banner-carousel",...e.data.first&&p===0&&{priority:!0}})})},`hero-banner-item-${p}`))}),i.shouldRender==="bottom"&&n.totalPages>1?r.jsx(_a,{ICONS:e.ICONS,...u}):r.jsx(r.Fragment,{})]})})},xv={Banner:to},It={"row-controller-modifier":"_row-controller-modifier_co4wb_1","carousel-title-modifier":"_carousel-title-modifier_co4wb_18","carousel-modifier":"_carousel-modifier_co4wb_22","card-modifier":"_card-modifier_co4wb_26"},rm=({data:e,name:t,CONSTANTS:n})=>{var m;const{isMobile:s}=ne(),o=e.config.size??"medium",a=e.config.disableCarouselMobile??!1,{initialize:i,pagination:c,controller:l,itemsStyles:u}=d.Carousel.useCarousel({itemsPerPage:s?e==null?void 0:e.config.slidesPerViewMobile:(m=e==null?void 0:e.config)==null?void 0:m.slidesPerView,gap:s?e.config.gapMobile:e.config.gap,direction:s&&a?"column":"row"});return r.jsx(Ye,{name:t,children:r.jsx(d.Utils.Column,{style:{width:o==="small"?"70%":"100%"},alignContent:"center",justifyContent:"center",alignItems:"center",children:r.jsxs(d.Carousel.Root,{innerRef:p=>{i(p)},className:d.helpers.classNameConcat(It["carousel-modifier"],"common-section"),children:[o==="medium"?r.jsxs(d.TextStructure.Root,{children:[n.ACTIVE_BENNEFITS_BAR_TITLE&&r.jsx(d.TextStructure.DivWrapper,{className:It["carousel-title-modifier"],children:r.jsx("h2",{className:"typography-style-body-lg",children:n.BENNEFITS_BAR_TITLE})}),s&&c.totalPages>1&&r.jsx(d.Carousel.Controller,{className:d.helpers.classNameConcat(It["row-controller-modifier"],n.ACTIVE_BENNEFITS_BAR_TITLE?It["title-on"]:void 0),children:r.jsxs(d.Carousel.Arrows,{children:[r.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.prevPage(),adornment:{start:r.jsx(d.Icon,{name:n.ICONS.arrow_left})}}),r.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.nextPage(),adornment:{start:r.jsx(d.Icon,{name:n.ICONS.arrow_right})}})]})})]}):r.jsx(r.Fragment,{}),r.jsx(d.Carousel.Body,{children:e.bennefit.map((p,f)=>r.jsx(d.Carousel.Item,{className:It["card-modifier"],style:u,children:r.jsx(d.Card,{stroke:!0,padding:"small",children:r.jsx(d.TextStructure.Root,{layoutProps:{columnWrapper:{alignContent:"start",alignItems:"start",justifyContent:"start"},textRow:{alignContent:"center",alignItems:"center",justifyContent:"center"}},adornment:{[o==="medium"?"top":"start"]:r.jsx(d.Icon,{name:p.icon,size:o==="medium"?"medium":"small"})},children:r.jsxs(d.TextStructure.DivWrapper,{alignItems:"start",children:[r.jsx("h3",{className:"typography-style-body-md",children:p.title}),p.subtitle&&p.subtitle.length?r.jsx("p",{className:"typography-style-body-xs",children:p.subtitle}):r.jsx(r.Fragment,{})]})})})},`bennefit=${f}`))}),!s&&c.totalPages>1?r.jsxs(d.Carousel.Controller,{className:It["row-controller-modifier"],children:[r.jsxs(d.Carousel.Arrows,{children:[r.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.prevPage(),adornment:{start:r.jsx(d.Icon,{name:n.ICONS.arrow_left})}}),r.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.nextPage(),adornment:{start:r.jsx(d.Icon,{name:n.ICONS.arrow_right})}})]}),r.jsx(d.Carousel.Bullets,{page:c.currentPage,total:c.totalPages,onBulletClick:p=>l==null?void 0:l.navigateTo(p)})]}):r.jsx(r.Fragment,{})]})})})},sm=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:n,className:s,name:o})=>r.jsx(Ye,{name:o,children:r.jsx("div",{className:d.helpers.classNameConcat(ts.textContentSection,s??""),style:e.borderTop?{borderTop:"none"}:void 0,children:r.jsx(ad,{data:e,ICONS:t,TEXTCONTENT_EXPANDED:n})})}),ga={"accordion-modifier":"_accordion-modifier_1we16_1","accordion-body-modifier":"_accordion-body-modifier_1we16_7"},om=({data:e,id:t,ICONS:n,className:s,name:o})=>{var c;const[a,i]=g.useState([]);return r.jsx(Ye,{name:o,children:r.jsxs(d.Utils.Column,{gap:"var(--gap-vertical-sm)",className:s??"",children:[e.titleAccordion?r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-sm","common-section"),style:{fontWeight:500},children:e.titleAccordion})})}):r.jsx(r.Fragment,{}),(c=e.accordions)==null?void 0:c.map((l,u)=>r.jsxs(d.Accordion.Wrapper,{className:ga["accordion-modifier"],children:[r.jsx(d.Accordion.Header,{id:`${t}-text-accordion-${u}`,openIndicator:r.jsx(d.Icon,{name:n.arrow_down}),closeIndicator:r.jsx(d.Icon,{name:n.arrow_up}),startOpen:a.includes(u),onClick:()=>i(m=>m.includes(u)?m.filter(p=>p!==u):[...m,u]),children:r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("h3",{className:"typography-style-body-md-strong",children:l.title}),l.subtitle&&l.subtitle.length?r.jsx("h2",{children:l.subtitle}):r.jsx(r.Fragment,{})]})})}),r.jsx(d.Accordion.Body,{children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:ga["accordion-body-modifier"],children:r.jsx(Ze.Editor,{editorKey:`${t}-editor-${u}`,blockRenderMap:Mn,editorState:l.text?kn(JSON.parse(l.text)):Ze.EditorState.createEmpty(),onChange:()=>null})})})})]},`${t}-accordion-${u}-${a.includes(u)}`))]})})},am=g.createContext({}),bv=({data:e,children:t,...n})=>{var _,y,v,x,C,j,b,w,S,P,E,A,O;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:(x=(v=e==null?void 0:e.staticConfig)==null?void 0:v.staticConfig)==null?void 0:x.showCarouselArrows,hasCloseBtn:(j=(C=e==null?void 0:e.staticConfig)==null?void 0:C.staticConfig)==null?void 0:j.hasCloseBtn,backgroundColor:(w=(b=e==null?void 0:e.staticConfig)==null?void 0:b.staticConfig)==null?void 0:w.backgroundColor,textColorVariant:(P=(S=e==null?void 0:e.staticConfig)==null?void 0:S.staticConfig)==null?void 0:P.textColorVariant,content:((A=(E=e==null?void 0:e.content)==null?void 0:E.content)==null?void 0:A.items)??[]},u=(O=l.content)==null?void 0:O.filter(k=>!k.countDownEndDate||new Date(k.countDownEndDate)>new Date),m=u.length>1,p={...l.backgroundColor?{backgroundColor:l.backgroundColor}:{}},f=()=>{o(!1)},h=d.helpers.ValidateProp({fieldTypes:Ot.Mode,property:l.textColorVariant,fallback:"default"});return r.jsx(am.Provider,{value:{isOpen:s,setIsOpen:o,hasCarousel:m,backgroundStyle:p,handleCloseTipbar:f,mode:h,slideTranstionTimer:l.slideTranstionTimer,showCarouselArrows:l.showCarouselArrows,hasCloseBtn:l.hasCloseBtn,slices:u,carouselProps:{initialize:a,controller:i,itemsStyles:c},...n},children:t})},lt=()=>g.useContext(am),jv=({dateEnd:e,...t})=>{const{CONSTANTS:{TIME_ZONE:n}}=lt();return r.jsx(Ln,{dateEnd:new Date(e),TIME_ZONE:n,...t})},Cv="_tipbar_bt3p0_1",Sv="_tipbar__carousel_bt3p0_15",on={tipbar:Cv,tipbar__carousel:Sv,"tipbar__close-btn":"_tipbar__close-btn_bt3p0_29","tipbar-item":"_tipbar-item_bt3p0_37","tipbar-item__coupon":"_tipbar-item__coupon_bt3p0_45"},Pv=({coupon:e,feedbackTitle:t,feedbackDescription:n,...s})=>{const{CONSTANTS:o}=lt(),{addCouponSeller:a,cartStore:i}=ve(),[c,l]=g.useState({status:!1,showSnackBar:!1}),[u,m]=g.useState(!1),[p,f]=g.useState(!1),h=async()=>{if(!i.items.length){f(!0);return}(await a(e,"coupon")).code===200?l({status:!0,showSnackBar:!0}):m(!0)};return g.useEffect(()=>{c.showSnackBar&&setTimeout(()=>{l(_=>({..._,showSnackBar:!1}))},o.TIPBAR_CONFIGS.snackbar_timeout)},[c.showSnackBar]),g.useEffect(()=>{u&&setTimeout(()=>{m(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[u]),g.useEffect(()=>{p&&setTimeout(()=>{f(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[p]),r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{...s,onClick:h,disabled:c.status,className:on["tipbar-item__coupon"],children:c.status?`${o.TIPBAR_CONFIGS.coupon_applied_message}`:`${o.TIPBAR_CONFIGS.coupon_default_message}`}),c.showSnackBar&&(t||n)&&r.jsx(Lt,{title:t,subtitle:n,Z_INDEX_WAR:o.Z_INDEX_WAR},`feedback-coupon-${e}`),u&&r.jsx(Lt,{title:o.TIPBAR_CONFIGS.coupon_error_title,subtitle:o.TIPBAR_CONFIGS.coupon_error_message,Z_INDEX_WAR:o.Z_INDEX_WAR},`error-coupon-${e}`),p&&r.jsx(Lt,{title:o.TIPBAR_CONFIGS.coupon_cart_empty_title,subtitle:o.TIPBAR_CONFIGS.coupon_cart_empty_message,Z_INDEX_WAR:o.Z_INDEX_WAR},`error-cart-empty-${e}`)]})},wv=({title:e,description:t,style:n,mode:s,className:o})=>r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{mode:s,className:o,children:[e&&r.jsx("h3",{className:"typography-style-body-sm",style:n,children:e}),t&&r.jsx("p",{className:"typography-style-caption",style:n,children:t})]})}),Ev=({coupon:e,...t})=>{const{CONSTANTS:n}=lt();return r.jsx(d.Copy,{...t,iconCopy:n.ICONS.copy,iconSuccess:n.ICONS.check,children:e})},Nv=({staticZone:e,type:t,className:n,description:s,title:o})=>{const{mode:a}=lt();if(t==="countdown")return r.jsx(jv,{dateEnd:e.countDownEndDate,size:"x-small",mode:a});if(t==="coupon"){const i=d.helpers.ValidateProp({fieldTypes:Ot.Mode,property:e.couponButtonMode,fallback:"default"}),c=d.helpers.ValidateProp({fieldTypes:Ot.VariantsExtended,property:e.couponButtonVariant,fallback:"primary"});return e.coupon?r.jsx(Pv,{coupon:e.coupon,mode:i,variant:c,feedbackTitle:e.couponFeedbackTitle,feedbackDescription:e.couponFeedbackDescription}):null}if(t==="copy"){const i=d.helpers.ValidateProp({fieldTypes:Ot.Mode,property:e.couponButtonMode,fallback:"default"});return e.coupon?r.jsx(Ev,{coupon:e.coupon,mode:i}):null}return r.jsx(wv,{title:o,description:s,mode:a,className:n})},ya=({handleCloseTipbar:e,mode:t})=>{const{CONSTANTS:n}=lt();return r.jsx(d.Button,{title:"fechar tipbar",className:on["tipbar__close-btn"],onClick:e,variant:"tertiary",mode:t,adornment:{start:r.jsx(d.Icon,{name:n.ICONS.close})}})},Iv=({children:e,mode:t="default",showCarouselArrows:n=!0,slideTranstionTimer:s})=>{const{carouselProps:o,CONSTANTS:a}=lt(),i=g.useRef(null),c=(u,m)=>{var p,f;u.stopPropagation(),u.preventDefault(),m==="prev"?(p=o.controller)==null||p.prevPage():(f=o.controller)==null||f.nextPage(),i.current&&(clearInterval(i.current),l())},l=g.useCallback(()=>{if(s&&o.controller){const u=setInterval(()=>{var m;(m=o.controller)==null||m.nextPage()},s);i.current=u}},[s,o]);return g.useEffect(()=>(l(),()=>{i.current&&clearInterval(i.current)}),[s,l]),r.jsxs(d.Carousel.Root,{innerRef:u=>{o.initialize(u)},className:on.tipbar__carousel,style:{flexDirection:"row",alignItems:"center"},children:[n&&r.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"prev"),adornment:{start:r.jsx(d.Icon,{name:a.ICONS.arrow_left})}}),r.jsx(d.Carousel.Body,{children:e}),n&&r.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"next"),adornment:{start:r.jsx(d.Icon,{name:a.ICONS.arrow_right})}})]})},Rv=({children:e,className:t})=>{const{hasCarousel:n,mode:s,hasCloseBtn:o,backgroundStyle:a,showCarouselArrows:i,slideTranstionTimer:c,handleCloseTipbar:l}=lt(),u=n&&i;return r.jsx("div",{style:a,"data-hasclosebtn":o,className:d.helpers.classNameConcat(on.tipbar,t),children:n?r.jsxs(r.Fragment,{children:[r.jsx(Iv,{mode:s,showCarouselArrows:u,slideTranstionTimer:c,children:e}),o&&r.jsx(ya,{handleCloseTipbar:l,showCarouselArrows:u,mode:s})]}):r.jsxs(r.Fragment,{children:[e,o&&r.jsx(ya,{handleCloseTipbar:l,mode:s})]})})},Tv=({children:e,highlightFirstSection:t,...n})=>{const{hasCarousel:s,carouselProps:o}=lt(),a=r.jsx("div",{...n,className:on["tipbar-item"],children:e});return s?r.jsx(d.Carousel.Item,{style:o.itemsStyles,children:a}):a},im=({className:e})=>{const{isOpen:t,slices:n}=lt();return n.length&&t?r.jsx(Rv,{children:n.map((s,o)=>{var a;return r.jsx(r.Fragment,{children:r.jsx(nn,{href:s.link,children:r.jsx(Tv,{highlightFirstSection:s.highlightFirstSection,"data-justifyhighlightedsection":s.horizontalAlignHighlightedSection?s.horizontalAlignHighlightedSection:"center",children:s&&((a=s==null?void 0:s.items)!=null&&a.length)?s.items.map((i,c)=>r.jsx(Nv,{staticZone:s,type:i.type,title:i.title,description:i.description,className:e},`tipbar-slice-field-${c}`)):null})})},`tipbar-slice-${o}`)})}):null};im.displayName="TipBar.Root";const gs=({className:e,...t})=>r.jsx(bv,{...t,children:r.jsx(im,{className:e})});gs.displayName="TipBar";const Av=({CONSTANTS:e,data:t})=>{const{pathname:n}=ie(),{tipbarRef:s}=Pe(),o=c=>{const l=t==null?void 0:t.find(u=>{var m,p,f,h,_;return((p=(m=u.staticConfig)==null?void 0:m.staticConfig)==null?void 0:p.deviceType)===c&&((_=(h=(f=u.staticConfig)==null?void 0:f.staticConfig)==null?void 0:h.paths)==null?void 0:_.includes(n))});return l||(t==null?void 0:t.find(u=>{var m,p,f,h,_,y;return((p=(m=u.staticConfig)==null?void 0:m.staticConfig)==null?void 0:p.deviceType)===c&&(!((h=(f=u.staticConfig)==null?void 0:f.staticConfig)!=null&&h.paths)||((y=(_=u.staticConfig)==null?void 0:_.staticConfig)==null?void 0:y.paths.length)===0)}))},a=o("desktop"),i=o("mobile");return r.jsxs("div",{ref:s,className:R.responsive["responsive-flex"],children:[i&&r.jsx("div",{className:R.responsive["responsive-mobile-flex"],children:r.jsx(gs,{data:i,CONSTANTS:e})}),a&&r.jsx("div",{className:R.responsive["responsive-desktop-flex"],children:r.jsx(gs,{data:a,CONSTANTS:e})})]})},va={"card-image-wrapper":"_card-image-wrapper_10mul_1","card-image-container":"_card-image-container_10mul_9"},cm=e=>{const{nextimage:t}=ie();return r.jsx(Ye,{name:e.name,children:e.data.banners.map((n,s)=>r.jsx("div",{className:va["card-image-wrapper"],children:r.jsx("div",{className:va["card-image-container"],children:r.jsx(t,{src:n.image,alt:n.altImage?n.altImage:"Banner Coleção",width:500,height:600})})},s))})},Ov=({SectionZone:e,name:t,storeId:n,previewId:s})=>{const[o,a]=g.useState();return g.useEffect(()=>{o||R.fetchContentType("search",{name:t,storeId:n,previewId:s}).then(i=>{i!=null&&i.data&&Array.isArray(i.data)&&a(i.data[0])})},[]),r.jsx(e,{data:o??[]})},lm=({data:{componentIndex:e,...t},name:n,CONSTANTS:s})=>r.jsx(Ye,{name:n,children:r.jsx(so,{...t,CONSTANTS:s})}),um=async e=>{const{type:t}=e,n=t==="collectionSearch"?"/api/search/product":"/api/search/crosseling",s=JSON.stringify(t==="collectionSearch"?{...e.params,facets:e.facets,term:e.term,forceUpdate:!1}:e.facets);return(await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:s}).then(a=>a.json()).then(a=>t==="collectionSearch"?a.data.products:a.products)).filter(a=>!!a.node.availability.status)},Lv="_shelf__container_bi04n_10",dm={shelf__container:Lv},kv=({collectionSearch:e,title:t,CONSTANTS:n,searchModal:s})=>{const[o,a]=g.useState([]),{isMobile:i}=ne(),{ref:c,inView:l}=ba.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:u}=oe();return g.useEffect(()=>{if(!e)return;function m(){var p,f;um({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)??n.ITEMS_DEFAULT_SORT}}).then(h=>{a(h)})}m()},[e]),g.useEffect(()=>{!l||o.length===0||u({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o},customData:{item_list_name:t??"Você também pode gostar"}}})},[l,o]),o.length===0?null:r.jsx("div",{ref:c,className:dm.shelf__container,children:r.jsx(Xt.Shelf,{title:t??"Você também pode gostar",itemsPerPage:s?{desktop:2,mobile:1.4}:{desktop:4.4,mobile:2.2},ICONS:n.ICONS,children:Array.isArray(o)&&o.map(({node:m},p)=>{const{availability:{status:f}}=m;return f?r.jsx(Xt.Card,{item:m,isMobile:i,size:"medium",index:p,shelfTitle:t??"Você também pode gostar",CONSTANTS:n},m.id):null})})})},Mv=({recommendationSearch:e,title:t,CONSTANTS:n})=>{const[s,o]=g.useState([]),{isMobile:a}=ne(),{ref:i,inView:c}=ba.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:l}=oe(),u=g.useMemo(()=>e?[{key:e.type,value:e.productId}]:[],[e]);return g.useEffect(()=>{if(!e)return;function m(){var p;um({type:"recommendationSearch",facets:u,params:{count:((p=e==null?void 0:e.params)==null?void 0:p.count)??12,sort:n.ITEMS_DEFAULT_SORT}}).then(f=>o(f))}m()},[u,e]),g.useEffect(()=>{if(!c||s.length===0||(e==null?void 0:e.type)==="suggestions")return;const m=t??"Você também pode gostar";l({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:s},customData:{item_list_name:m},outsideEcommerceData:{item_list_name:m}}})},[c,s]),(s==null?void 0:s.length)===0?null:(e==null?void 0:e.type)==="suggestions"?r.jsx(sl,{products:s,innerRef:i,inView:c,CONSTANTS:n}):r.jsx("div",{ref:i,className:dm.shelf__container,children:r.jsx(Xt.Shelf,{title:t??"Você também pode gostar",itemsPerPage:{desktop:4.4,mobile:2.2},ICONS:n.ICONS,children:Array.isArray(s)&&s.map(({node:m},p)=>{const{availability:{status:f}}=m;return f?r.jsx(Xt.Card,{item:m,isMobile:a,size:"medium",index:p,shelfTitle:t??"Você também pode gostar",CONSTANTS:n},m.id):null})})})},mm=({data:e,name:t,CONSTANTS:n})=>{const{productId:s}=oc();return!(e!=null&&e.productLists)||e.productLists.length===0?null:e.productLists.map((o,a)=>r.jsx(Ye,{name:t,children:r.jsx(Mv,{title:o.title,recommendationSearch:{type:o.product_group_option,productId:s,params:{count:o.number_of_items,sort:"score:desc"}},CONSTANTS:n},`shelf=${a}`)}))},fm=({data:e,CONSTANTS:t,searchModal:n,name:s})=>{var a;const o=(a=e==null?void 0:e.productLists)==null?void 0:a.filter(i=>!!i.collectionId||!!i.search_base_name);return!o||o.length===0?null:o.map((i,c)=>{const l=i.collectionId?{term:"",facets:[{key:"productclusterids",value:`${i.collectionId}`}]}:{term:i.search_base_name,facets:[]};return r.jsx(Ye,{name:s,children:r.jsx(kv,{title:i.title,collectionSearch:{params:{count:i.number_of_items,sort:i.sort},...l},searchModal:n,CONSTANTS:t},`shelf=${c}`)})})},Dv="_embedLiveContainer_1ss0l_2",Fv="_embedLivePlayer_1ss0l_7",xa={embedLiveContainer:Dv,embedLivePlayer:Fv},pm=({data:e,name:t})=>r.jsx(Ye,{name:t,children:r.jsx("div",{className:xa.embedLiveContainer,children:r.jsx("div",{className:xa.embedLivePlayer,children:e.banner.videosrc?r.jsx(Ee.Video,{src:e.banner.videosrc??"",playsInline:!0,autoPlay:!0,loop:!0,muted:!0,title:"Live",controls:!0}):r.jsxs("div",{children:[r.jsx("iframe",{src:e.banner.embed_source??"",allow:"autoplay; fullscreen; picture-in-picture; loop;",title:"Live"}),r.jsx(Pd,{src:"https://player.vimeo.com/api/player.js",defer:!0,strategy:"lazyOnload"})]})})})}),zv="_popup_5taxs_9",Bv="_popup__overlay_5taxs_19",Uv="_popup__modal_5taxs_27",Ue={popup:zv,popup__overlay:Bv,popup__modal:Uv,"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"},qv=e=>r.jsx("div",{className:Ue["popup__modal--success"],children:r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:e.ICONS.check_circle,size:"large"})},children:r.jsxs(d.TextStructure.DivWrapper,{className:Ue["text-structure-modifier"],children:[r.jsx("h3",{className:"typography-style-body-sm-strong",children:e.successTitle}),r.jsx("p",{className:"typography-style-body-caption",children:e.successDescription})]})})}),Hv=e=>{const{title:t,description:n,groups:s,ICONS:o}=e,{formErrors:a,submitForm:i,success:c}=tr(),[l,u]=g.useState(!1);return r.jsx("form",{onSubmit:i,className:Ue.formContainer,children:r.jsxs("div",{className:Ue["popup__modal--form"],children:[r.jsxs(d.TextStructure.DivWrapper,{className:Ue["popup__modal--header"],children:[r.jsx("strong",{className:"typography-style-body-md-strong",children:t}),r.jsx("p",{className:"typography-style-body-xs",children:n})]}),c?r.jsx(qv,{...e}):r.jsxs(r.Fragment,{children:[s.map(m=>r.jsx(kt.FieldGroup,{group:m,children:r.jsx(kt.FieldWrapper,{fields:m.fields})},m.groupLabel)),r.jsx(d.Checkbox,{className:Ue["popup__modal--checkbox"],adornment:r.jsx(d.Icon,{name:o.check,size:"small"}),name:"terms-and-conditions",label:"Li e aceito os termos de política de privacidade abaixo.",sizeVariant:"small",checked:l,onChange:()=>u(!l)}),r.jsxs("div",{children:[!l&&r.jsx(d.TextStructure.DivWrapper,{className:Ue["popup__modal--status"],children:r.jsxs("p",{className:"typography-style-body-caption",children:[r.jsx(d.Icon,{size:"small",name:o.alert_circle}),ff]})}),r.jsx(d.Button,{disabled:!l,size:"medium",type:"submit",children:hf}),a.length?r.jsx(d.TextStructure.DivWrapper,{className:Ue["popup__modal--status"],children:r.jsx("p",{className:d.helpers.classNameConcat(Ue.formSubmitWarning,"typography-style-body-xs"),children:pf})}):null]})]})]})})},hm=({data:e,name:t,CONSTANTS:n})=>{const[s,o]=g.useState(!1),a=typeof window<"u"?window.sessionStorage.getItem(n.POPUP_TRACK_STORAGE)||window.localStorage.getItem(n.POPUP_SUBMITTED_STORAGE):null,i=()=>{o(!1),window.sessionStorage.setItem(n.POPUP_TRACK_STORAGE,"true")};return g.useEffect(()=>{setTimeout(()=>!a&&o(!0),2e3)},[]),e.active&&s?r.jsx(Ye,{name:t,children:r.jsxs("div",{className:Ue.popup,children:[r.jsx("div",{onClick:i,className:Ue.popup__overlay}),r.jsxs("div",{className:Ue.popup__modal,children:[r.jsx(d.Button,{onClick:i,variant:"tertiary",className:Ue["popup__modal--close"],children:r.jsx(d.Icon,{style:{color:e.closeColor||"#000"},name:n.ICONS.close,size:"medium"})}),r.jsx("div",{children:r.jsx(Ee.Image,{src:e.imageUrl,width:"459",height:"418",alt:e.title})}),r.jsx(Ld,{...e,children:r.jsx(Hv,{...e,ICONS:n.ICONS})})]})]})}):null},Vv={"Image Grid":cm,"Embed Live":pm,"Banner Carousel":nm,Banner:to,"Bennefits Bar":rm,newsletter:lm,TextContent:sm,TextAccordion:om,"Product Carousel":fm,"PDP Product Carousel":mm,"Popup Modal":hm},$v=({data:e,identifyWhoIsFirst:t=!1,componentConfigs:n})=>e==null?void 0:e.map((s,o)=>{const a=Vv[s.name],i={...(n==null?void 0:n[s.name])??{}};return t&&o===0&&(s.data.first=!0),s.data.componentIndex=o,s.name==="TextAccordion"&&(i.id=`text-accordion-${o}`),a?r.jsx(a,{name:s.name,data:s.data,...i},`section-zone-component-${o}`):null}),Wv=e=>{const t=Xv(Kv(e));return Gv(t)},Gv=e=>{const t=[];for(const n in e)t.push(...e[n]);return t},Kv=e=>!e||!Array.isArray(e)?{}:e==null?void 0:e.reduce((t,n)=>{if(n!=null&&n.cidade){let s=t[n==null?void 0:n.cidade];s===void 0&&(s=t[n==null?void 0:n.cidade]=[]),s.push(n)}return t},{}),Xv=e=>{if(!e||!Object.keys(e).length)return{};const t=Object.keys(e).sort((s,o)=>s.localeCompare(o)),n={};for(const s of t)n[s]=e[s];return n},Yv=({content:e,data:t,showVendor:n,ICONS:s,entity:o,LPLOJAS_TEMPLATE_RETURN_BUTTON:a})=>{const[i,c]=g.useState([]);return g.useEffect(()=>{(async()=>{try{const u=await fetch("/api/master-data/search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({masterDataEntity:o,searchFields:{_fields:"_all"},headers:{"REST-Range":"resources=0-1000"}})});if(!u.ok)throw new Error(`[LPStoresClientWrapper] MasterData error ${u.status}`);const m=await u.json();c(Wv(m))}catch(u){console.error(u)}})()},[o]),!Array.isArray(t)||!t.length?null:r.jsxs(rt.Root,{data:i,children:[r.jsx(rt.Title,{children:e.titlePage}),r.jsx(rt.Section,{imgSrcDesk:e.imageBackgroundDesk,imgSrcMob:e.imageBackgroundMob,imgAlt:e.altImageBackgroud,children:r.jsx(rt.Content,{showVendor:n,ICONS:s,LPLOJAS_TEMPLATE_RETURN_BUTTON:a})})]})},Qv={Banner:xv,BannerSection:rn,BennefitsBarSection:rm,SingleBannerSection:to,TextContentSection:sm,BannerCarousel:nm,TextAccordionSection:om,TipbarScreening:Av,ImageGrid:cm,SearchPageScreening:R.SearchPageScreening,SearchContent:Ov,NewsletterSection:lm,PDPProductCarousel:mm,ProductCarousel:fm,EmbedLive:pm,PopupModalSection:hm,SectionZone:$v,LPStoresClientWrapper:Yv},Zv={Components:Qv,helpers:xg};exports.cms=Zv;exports.contexts=mc;exports.data=Bs;exports.layout=Tn;exports.scripts=gv;
|