@soma-vertical-web/multi-lib 1.0.33 → 1.0.34
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/cms/ContentTypes/Search/SearchContent.d.ts +1 -1
- package/cms/Sections/ProductCarousel/request.d.ts +4 -0
- package/cms/index.d.ts +1 -1
- package/contexts/contexts/GlobalContext.d.ts +1 -1
- package/contexts/contexts/plp/FilterContext.d.ts +1 -1
- package/contexts/contexts/plp/PLPContext.d.ts +1 -1
- package/contexts/contexts/plp/PLPInfiniteContext.tsx.d.ts +1 -1
- package/contexts/contexts/search/QueryFacets.d.ts +1 -1
- package/contexts/contexts/search/QueryProducts.d.ts +1 -1
- package/contexts/contexts/search/Search.d.ts +1 -1
- package/contexts/contexts/search/TopSearches.d.ts +1 -1
- package/contexts/hooks/useOperations.d.ts +1 -1
- package/contexts/hooks/useScrollRestorationInfinite.d.ts +1 -1
- package/contexts/index.d.ts +5 -17
- package/contexts/store/plp.d.ts +2 -2
- package/data/api/cms/content-type/index.d.ts +1 -1
- package/data/api/user/index.d.ts +2 -2
- package/data/helpers/plp/index.d.ts +6 -14
- package/data/helpers/search/facets.d.ts +1 -0
- package/data/helpers/search/index.d.ts +4 -0
- package/data/helpers/search/product/index.d.ts +13 -1
- package/data/helpers/search/search.d.ts +1 -0
- package/data/index.d.ts +7 -6
- package/index-AgO_aUeQ.mjs +2371 -0
- package/index-D0PGMDh5.js +4 -0
- package/index.js +17 -17
- package/index.mjs +11329 -8960
- package/index2.js +2 -2
- package/index2.mjs +268 -277
- package/layout/index.d.ts +9 -9
- package/layout/team-component/AddToCart/AddToCart.d.ts +1 -1
- package/layout/team-component/AddToCart/Composite/Card/Card.d.ts +1 -1
- package/layout/team-component/AddToCart/Composite/Card/Content.d.ts +1 -1
- package/layout/team-component/AddToCart/Composite/Card/StyleSize.d.ts +1 -1
- package/layout/template/MiniCart/Composite/Card/Card.d.ts +1 -1
- package/layout/template/MiniCart/Composite/Card/Composite/Sku.d.ts +1 -1
- package/layout/template/MiniCart/Composite/Card/Composite/Style.d.ts +1 -1
- package/layout/template/MiniCart/Composite/Card/index.d.ts +2 -2
- package/layout/template/MiniCart/Composite/Modal/Body/Body.d.ts +1 -1
- package/layout/template/MiniCart/MiniCart.d.ts +1 -1
- package/layout/template/MiniCart/index.d.ts +2 -2
- package/layout/template/PDC/Composite/Grid/Grid.d.ts +1 -1
- package/layout/template/PDC/Composite/InfiniteScroller/Banners/Banners.d.ts +1 -1
- package/layout/template/PDC/Composite/InfiniteScroller/Filters/Filters.d.ts +2 -6
- package/layout/template/PDC/Composite/InfiniteScroller/InfiniteScroller.d.ts +3 -1
- package/layout/template/PDC/Composite/InfiniteScroller/Page/Composite/Card.d.ts +1 -1
- package/layout/template/PDC/Composite/InfiniteScroller/Page/Composite/Loader.d.ts +1 -1
- package/layout/template/PDC/Composite/InfiniteScroller/Page/Composite/NextPage.d.ts +4 -1
- package/layout/template/PDC/Composite/InfiniteScroller/Page/Page.d.ts +2 -2
- package/layout/template/PDC/Composite/InfiniteScroller/Page/index.d.ts +10 -3
- package/layout/template/PDC/Composite/Pagination/Pagination.d.ts +1 -1
- package/layout/template/PDC/Composite/Products/Products.d.ts +1 -1
- package/layout/template/PDC/PDC.d.ts +1 -1
- package/layout/template/PDC/index.d.ts +4 -4
- package/layout/template/QuickShop/Composite/Body.d.ts +1 -1
- package/layout/template/QuickShop/Composite/Similars.d.ts +1 -1
- package/layout/template/SearchModal/SearchModal.d.ts +1 -1
- package/layout/template/SearchResult/SearchContent.d.ts +1 -1
- package/layout/template/SearchResult/SearchResult.d.ts +1 -1
- package/package.json +1 -1
- package/server.d.ts +4 -0
- package/style.css +1 -1
- package/types/cms/Sections/SectionZone/index.d.ts +1 -0
- package/types/contexts/contexts/global.d.ts +0 -1
- package/types/contexts/contexts/plp.d.ts +65 -22
- package/types/contexts/contexts/search.d.ts +37 -30
- package/types/contexts/hooks/index.d.ts +3 -3
- package/types/layout/team-components/AddToCart/index.d.ts +5 -1
- package/types/layout/team-components/HelpButton/index.d.ts +4 -2
- package/types/layout/team-components/PLPNavigation/index.d.ts +0 -2
- package/types/layout/team-components/ProductCard/index.d.ts +1 -0
- package/types/layout/team-components/ProductList/index.d.ts +2 -1
- package/types/layout/templates/MiniCart/index.d.ts +2 -0
- package/types/layout/templates/PLP/index.d.ts +21 -4
- package/types/layout/templates/QuickShop/index.d.ts +2 -1
- package/types/layout/templates/SearchModal/index.d.ts +2 -1
- package/types/layout/templates/SearchResult/index.d.ts +3 -0
package/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
"use strict";var pm=Object.defineProperty;var fm=(e,t,r)=>t in e?pm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var gt=(e,t,r)=>fm(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),g=require("react"),T=require("./index-CXSKhXO3.js"),Qe=require("idb-keyval"),Pt=require("zustand"),Xr=require("js-cookie"),d=require("@soma-vertical-web/core-components"),kt=require("axios"),Yr=require("@date-fns/tz"),hm=require("jose"),Ot=require("@soma-vertical-web/foundations"),ws=require("react-dom"),Je=require("draft-js"),ka=require("react-intersection-observer"),Ns=g.createContext({}),_m=({data:e,children:t})=>n.jsx(Ns.Provider,{value:{tags:e==null?void 0:e.config},children:t}),_t=()=>{const{tags:e}=g.useContext(Ns),t=g.useCallback(r=>{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=r??[])==null?void 0:f.find(h=>h.id===p.key)}),a=(m=(u=e==null?void 0:e.institucional)==null?void 0:u.items)==null?void 0:m.find(p=>{var f;return(f=r??[])==null?void 0:f.find(h=>h.id===p.key)}),o=e==null?void 0:e.flagPdp,i=(r==null?void 0:r.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:a,flagPdp:o,flagGoldenPdp:i}},[e]);return{tags:e,getAvailableProductTag:t}},Oa=({gridScrollBack:e})=>{g.useEffect(()=>{typeof window<"u"&&(e!=null&&e.refer)&&sessionStorage.setItem(e==null?void 0:e.refer,"true")},[])},La=g.createContext({}),gm=({children:e,gridScrollBack:t})=>{const r=g.useRef(null);return Oa({gridScrollBack:t}),n.jsx(La.Provider,{value:{sizesContainerRef:r},children:e})},Ma=()=>{const e=g.useContext(La);if(e===void 0)throw new Error("useContext(PDPContext) must be used within a PDPProvider");return e},dt=({event:e,data:t})=>{const r=(window==null?void 0:window.dataLayer)||[];t.ecommerce&&r.push({ecommerce:null}),r.push({...e&&{event:`custom_${e}`},...t})},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:r,commonData:s,customData:a,promotionInfo:o,itemList:i,outsideEcommerceData:c}=e,{availableSizes:l,sizes:u,price:m}=s,p={...r==="view_item"?{currency:Se.configs.currency,value:m,grade_disponivel:l??(u?Da(u):"")}:{},...r==="add_to_wishlist"||r==="remove_from_wishlist"?{value:m,currency:Se.configs.currency}:{}},f=mn({data:s,customData:{...a,...i,...o},configs:Se.configs});dt({event:r,data:{...c,ecommerce:{...i,...p,items:[f]}}}),typeof t=="function"&&t(f,p)},productListEvent:e=>{const{commonData:{products:t},promotionInfo:r,itemList:s,outsideEcommerceData:a,customData:o}=e;if(t.length===0)return;const i=t.map(({node:c},l)=>mn({data:{...c},customData:{...r,index:l,...o!=null&&o.item_list_name?{item_list_name:o==null?void 0:o.item_list_name}:s},configs:Se.configs}));dt({event:"view_item_list",data:{...a,ecommerce:{...o!=null&&o.item_list_name?{item_list_name:o==null?void 0:o.item_list_name}:s,items:i}}})},skuEvents:e=>{const{event:t,commonData:{products:r},customData:s,supportData:{selectedSkus:a,price:o},promotionInfo:i,itemList:c,outsideEcommerceData:l}=e;let u=0;const m=r.map(p=>{var y,x,v,C,j,b,w,S,P;const f=a==null?void 0:a.find(N=>(p.productId??p.id)===N.productId);let h={...i,...c};if(f){const N=za(),R=Ba(N,f);R&&(h={...h,...R}),t==="add_to_cart"&&(i||c)&&Qr({persistedData:N,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:N,type:"remove",sku:(f==null?void 0:f.id)??(f==null?void 0:f.sku)})}u+=p.price??((v=(x=(y=f==null?void 0:f.offers)==null?void 0:y.offers)==null?void 0:x[0])==null?void 0:v.price)??0;const _=(f==null?void 0:f.size)??T.getColorAndSizeFromSkuName((f==null?void 0:f.skuName)??(f==null?void 0:f.name)??((C=p.itemOffered)==null?void 0:C.skuName),Se.configs.NAME_SPLIT_SYMBOL).size;return mn({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:Se.configs})});dt({event:t,data:{...l,ecommerce:{value:o??u,currency:Se.configs.currency,items:m}}})},filterEvent:e=>{var i;const{commonData:t,customData:r,outsideEcommerceData:s}=e,a={},o={};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=Se.configs.PLP_FILTERS.find(f=>f.key===c))==null?void 0:p.eventLabel)??c,m=(a==null?void 0:a[u])||[];u==="price_range"&&l.replace(":","-"),a[u]=[...m,l]}),Object.keys(a).forEach(c=>o[c]=a[c].join(", "))),dt({event:"filter",data:{...s,...o,...r}})},viewCartEvent:e=>{var m,p,f,h,_,y,x,v,C,j;const{commonData:t,outsideEcommerceData:r}=e,{cartStore:s}=t;if(!s)return;const a=window.localStorage.getItem("persistedCartEventsData"),o=a?JSON.parse(a):{},i=s.items.map(b=>{const{promotionInfo:w,itemList:S}=o[b.id]??{};return mn({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:Se.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)===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:{...r,ecommerce:{currency:Se.configs.currency,value:c+l,total_discount:Math.abs(l),cep_preenchido:!!((v=(x=s.shippingData)==null?void 0:x.address)!=null&&v.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:r}=e;dt({event:t,data:{...r}})}},Da=e=>e.reduce((t,r)=>(r.available&&t.push(r.value),t),[]).toString(),ym=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]}:{}}:{}}},mn=({data:e,customData:t,configs:r})=>({...xm(e,r==null?void 0:r.MAIN_IMAGE),...vm(e),...bm(e),...jm(e),...t}),Fa=()=>{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("_"))??[]:[]},za=()=>{const e=window.localStorage.getItem("persistedCartEventsData");return e?JSON.parse(e):null},Ba=(e,t)=>e==null?void 0:e[t],Qr=({persistedData:e,type:t,sku:r,newData:s})=>{if(!e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({[r]:s}));return}if(e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({...e,[r]:s}));return}e&&t==="remove"&&(delete e[r],window.localStorage.setItem("persistedCartEventsData",JSON.stringify(e)))},xm=(e,t="1")=>{var o,i,c,l,u,m,p,f,h,_,y;const r=e.productReference??e.gtin??e.productRefId,s=e.image??((i=(o=e.items)==null?void 0:o[0])==null?void 0:i.images)??((c=e.itemOffered)==null?void 0:c.image),a=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)??((p=(m=e.itemOffered)==null?void 0:m.isVariationOf)==null?void 0:p.productGroupID),item_ref:/_\d$/.test(r)?r.slice(0,-2):r,item_name:e.productTitle??e.productName??e.name??T.splitNameAndSizeFromFullName((f=e.itemOffered)==null?void 0:f.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:(a==null?void 0:a.url)??(a==null?void 0:a.imageUrl)}},fo=e=>Array.isArray(e)?e.reduce((t,r)=>(r.length>t.length&&(t=r),t),""):e,vm=e=>{var u,m;const{categories:t,categoriesIds:r}=e,s=t??((u=e.itemOffered)==null?void 0:u.categories),a=r??((m=e.itemOffered)==null?void 0:m.categoriesIds),o=fo(s),i=fo(a),c=o.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]}}},bm=e=>{var a,o,i,c,l,u;const t=((a=e.itemOffered)==null?void 0:a.skuName)??((c=(i=(o=e.isVariantOf)==null?void 0:o.hasVariant)==null?void 0:i[0])==null?void 0:c.name)??((u=(l=e.items)==null?void 0:l[0])==null?void 0:u.name),{color:r,size:s}=T.getColorAndSizeFromSkuName(t,Se.configs.NAME_SPLIT_SYMBOL);return{item_variant:r,...e.itemOffered&&{item_variant2:s}}},jm=e=>{var l,u;const{price:t,listPrice:r,installments:s}=e,a=t??((l=e.offers)==null?void 0:l.lowPrice)??0,o=r??((u=e.offers)==null?void 0:u.highPrice)??0,i=o?o-a:0,c=i%1===0?i:Number(i.toFixed(2));return{...t&&{price:a??o},...o&&{list_price:o,discount:c},...s&&{installments:s==null?void 0:s.count,installment_value:s==null?void 0:s.value},item_currency:Se.configs.currency}},Ua=()=>{const[e,t]=Fa(),[r,s]=e.split("-"),a=r.includes("shop")||r.includes("sale")?r:"";return{page_category:a&&s?s:"",page_departament:a,id:t,name:e}},Cm=Object.freeze(Object.defineProperty({__proto__:null,eventsFunctions:Se,findDataInPersistedData:Ba,getAvailablesSizes:Da,getCategories:ym,getPageCategoryAndDepartmentFromSlug:Ua,getPersistedData:za,getProductListInfoFromHead:Fa,pushDatalayer:dt,updatePersistedData:Qr},Symbol.toStringTag,{value:"Module"})),qa=g.createContext({}),Sm=({children:e,evtFunctionsConfigs:t})=>{const r=g.useRef({}),s=g.useRef(null),a=g.useRef(null),o=g.useRef({}),i=g.useRef({trigger:!1,index:0}),c=({functionKey:m,data:p,callBack:f,timeout:h=100})=>{window.dataLayer||(window.dataLayer=[]),Se.configs=t;try{typeof Se[m]=="function"&&setTimeout(()=>{var _;p.promotionInfo=r.current,(_=a.current)!=null&&_.item_list_name&&(p.itemList=a.current),Se[m](p,f)},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:p,index:f})=>{m&&(r.current={...p}),c({functionKey:"readyEvents",data:{event:"select_promotion",readyData:{ecommerce:{...p,...f!==void 0&&{index:f}}}}})};return n.jsx(qa.Provider,{value:{sendDataLayerEvent:c,triggerSelectItemEventRef:i,promotionEventRef:r,currentLocalRef:s,itemListRef:a,cartProductsFullDataRef:o,handleSelectContent:l,handleSelectPromotionEvent:u},children:e})},ae=()=>g.useContext(qa),Ha=g.createContext({}),Pm=({children:e,productData:t,isKit:r,PDP_INFO:s,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:o})=>{var D,q;const{sendDataLayerEvent:i,triggerSelectItemEventRef:c}=ae(),{productId:l,productName:u,items:m,items:[{images:p,Videos:f}],description:h,["Composição"]:_="",productReference:y,categories:[x]}=t,{getAvailableProductTag:v}=_t(),C=v(Object.entries(t.clusterHighlights).map(U=>({id:U[0],name:U[1]}))),j=x.slice(1,-1).split("/"),{installments:b,price:w,listPrice:S,sizes:P,allSizesAvailable:N}=T.getSkuInfos({items:m,NAME_SPLIT_SYMBOL:a}),R=T.getThumbImage({images:p,TEXTURE_IMAGE:o}),k=[{label:`${s.product.description}`,value:"description",content:h},{label:`${s.product.materiais}`,value:"composition",content:_}],O=((q=T.getColorAndSizeFromSkuName((D=t.items)==null?void 0:D[0].name,a))==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)}}),X=({sku:U,size:Q})=>{const{commonData:G,customData:H}=M();i({functionKey:"productEvents",data:{event:"view_item",commonData:G,customData:{...H,...U&&{item_sku:U},...Q&&{item_variant2:Q}}}})};return g.useEffect(()=>{if(c.current.trigger){const{commonData:U,customData:Q}=M();i({functionKey:"productEvents",data:{event:"select_item",commonData:U,customData:{...Q,index:c.current.index}}}),c.current.trigger=!1}X({})},[]),n.jsx(Ha.Provider,{value:{productData:t,productId:l,productName:u,productReference:y,tag:C,items:m,sizes:P,allSizesAvailable:N,installments:b,price:w,listPrice:S,thumbImage:R,images:p,video:f[0],descriptionContent:k,breadcrumbList:j,isKit:r,colorName:O,handleViewItemEvent:X},children:e})},Le=()=>{const e=g.useContext(Ha);if(e===void 0)throw new Error("useContext(PDPDataContext) must be used within a PDPDataProvider");return e},wm=()=>{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(a){return console.warn("Copy failed",a),t(null),!1}}]},$a=()=>{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)}},[])},Nm=typeof window>"u",Em=(e,t)=>{const[r,s]=g.useState(()=>{if(Nm)return null;const o=localStorage.getItem(e);return o===null?t:JSON.parse(o||"{}")});return g.useEffect(()=>{const o=i=>{i.storageArea===localStorage&&i.key===e&&s(JSON.parse(i.newValue))};return window.addEventListener("storage",o),()=>{window.removeEventListener("storage",o)}},[e,t]),[r,o=>{s(i=>{const c=typeof o=="function"?o(i):o;return localStorage.setItem(e,JSON.stringify(c)),c})}]};function Es(e,t,r){const[s,a]=g.useState(!1),{threshold:o}=r||{};return g.useEffect(()=>{if(!e.current)return()=>null;let i=null;const c=new IntersectionObserver(([l])=>{if(r!=null&&r.delay){i&&clearTimeout(i),i=setTimeout(()=>{a(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},r.delay);return}a(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},{threshold:o||1});return c.observe(e.current),()=>{c.disconnect()}},[e]),s}const Hn=({callback:e,onEnterViewportOnce:t,options:r})=>{const s=g.useRef(null);return g.useEffect(()=>{const a=s.current;if(!a)return;const o=new IntersectionObserver(([i])=>{i.isIntersecting&&typeof e=="function"&&(e(),t&&(o.unobserve(a),o.disconnect()))},r);return o.observe(a),()=>{t&&o.unobserve(a),o.disconnect()}},[e,t,r]),{element:s}},Va=({defaultScale:e=1,maxScale:t=3})=>{const r=g.useRef(null),s=g.useRef(null),[a,o]=g.useState(e),i=g.useRef(0),c=g.useRef({x:0,y:0}),l=g.useRef({x:0,y:0}),u=()=>{if(!s.current||!r.current)return{minX:0,maxX:0,minY:0,maxY:0};const h=r.current.getBoundingClientRect(),_=s.current.children[0].getBoundingClientRect(),y=_.width,x=_.height,v=Math.min(0,(h.width-y)/2),C=Math.max(0,(y-h.width)/2),j=Math.min(0,(h.height-x)/2),b=Math.max(0,(x-h.height)/2);return{minX:v,maxX:C,minY:j,maxY:b}},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})`})}},p=g.useCallback(h=>{const{minX:_,maxX:y,minY:x,maxY:v}=u(),{x:C,y:j}=l.current,b=Math.max(_,Math.min(y,C)),w=Math.max(x,Math.min(v,j));if(h.touches.length>1){const S=h.touches[0],P=h.touches[1],N=S.pageX-P.pageX,R=S.pageY-P.pageY;i.current=Math.sqrt(N*N+R*R),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})},[a,l]),f=g.useCallback(h=>{if(!s.current||!r.current)return;const{minX:_,maxX:y,minY:x,maxY:v}=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,N=Math.max(1,Math.min(t,a*P));if(a===N)return;o(N);const R=(C.pageX+j.pageX)/2,k=(C.pageY+j.pageY)/2;let O=R-c.current.x,M=k-c.current.y;O=Math.max(_,Math.min(y,O)),M=Math.max(x,Math.min(v,M)),l.current={x:O,y:M},i.current=S,m(O,M,N)}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(x,Math.min(v,w)),l.current={x:b,y:w},m(b,w,a)}},[t,a]);return g.useEffect(()=>(document.addEventListener("touchstart",p),document.addEventListener("touchmove",f,{passive:!1}),()=>{document.removeEventListener("touchstart",p),document.removeEventListener("touchmove",f)}),[f,p]),{containerRef:r,imgRef:s,scale:a}},Im=()=>{const e=async(h,_)=>T.proxyCartAPI("/_v/proxy/checkout/order-form/coupon",{body:{orderFormId:h,coupon:_}}),t=async(h,_,y={},x)=>{if(x)if(_){const v=_.includes(" - ")?_.split(" - ")[0]:_,C=await T.proxyCartAPI("/_v/proxy/checkout/order-form/seller-code",{body:{orderFormId:h,sellerCode:v}});return C instanceof Object&&y.name in C&&C[y.status]===!0?T.proxyCartAPI("/_v/proxy/checkout/order-form/attachments",{body:{orderFormId:h,sellerCode:v,sellerName:C[y.name]}}).then(b=>({...b,openTextField:{...(b==null?void 0:b.openTextField)??{},statusOk:!0}})):Promise.resolve({paymentData:null,openTextField:{statusOk:!1,value:v}})}else return T.proxyCartAPI("/_v/proxy/checkout/order-form/attachments",{body:{orderFormId:h,sellerCode:"",sellerName:""}})},r=async(h,_)=>T.proxyCartAPI("/_v/proxy/checkout/order-form/attachments/marketing-data",{body:{orderFormId:h,marketingData:_}}),s=async(h,_,y)=>T.proxyCartAPI("/_v/proxy/checkout/order-form/items",{body:{orderFormId:h,orderItems:T.addItemOrder(_,y)}}),a=async(h,_,y,x=!1)=>T.proxyCartAPI("/_v/proxy/checkout/order-form/offerings",{body:{id:_,itemIndex:y,orderFormId:h,remove:x}}),o=async h=>T.proxyCartAPI("/_v/proxy/checkout/order-form/items/remove-all",{body:{orderFormId:h}}),i=async h=>T.proxyCartAPI("/_v/proxy/checkout/order-form",{body:{orderFormId:h??""}}),c=async(h,_)=>T.proxyCartAPI("/_v/proxy/checkout/order-form/profile",{body:{orderFormId:h,email:_}}),l=async(h,_,y)=>{const x=T.removeQuantity(_,y);return T.proxyCartAPI("/_v/proxy/checkout/order-form/items/update",{body:{orderItems:x.updateItems,orderFormId:h}})},u=async(h,_,y,x,v,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:x},(N,R)=>({itemIndex:R,selectedDeliveryChannel:(C==null?void 0:C.deliveryChannel)||null,selectedSla:(C==null?void 0:C.deliveryMethod)||null,deliveryWindow:b})),selectedAddresses:v,clearAddressIfPostalCodeNotFound:!0};return T.proxyCartAPI("/_v/proxy/checkout/order-form/shipping",{body:{...w,orderFormId:h,country:y,postalCode:_}})},m=async(h,_,y)=>T.proxyCartAPI("/_v/proxy/checkout/order-form/shipping/update",{body:{orderFormId:h,options:_,selectedAddresses:y}}),p=async(h,_,y,x)=>{const v=T.updateQuantity(_,y,x);return T.proxyCartAPI("/_v/proxy/checkout/order-form/items/update",{body:{orderFormId:h,orderItems:v}})};return{addCoupon:e,addItem:s,addSellerCode:t,addMarketingData:r,giftItem:a,emptyCart:o,getOrderForm:i,insertProfileEmail:c,removeItem:l,shipping:u,shippingUpdate:m,updateItemQuantity:async(h,_,y,x,v)=>p(h,_,y,x).then(C=>C&&Array.isArray(C.items)?T.updateItemSellerExternal(C.items,y)?p(h,_,y,v):C:!1)}},Mn="soma::cart",Vt="soma::options",bt=Pt.create((e,t)=>{const r=Im(),s=async(a,o,i)=>{e({loading:!0});const c=await T.updateOrderFormPromise(a);if(typeof c!="boolean"){e({...c});const l=await T.mergeOptionsPromise(Qe.get(Vt),i);return Qe.set(Vt,l),T.getValue(c,o).finally(()=>e({loading:!1,options:l}))}return T.promiseDefault};if(typeof window<"u"){const a=async o=>{if(o){const i=await Qe.get(Vt).then(u=>T.findOptions(u,o.items));Qe.set(Mn,o),Qe.set(Vt,i),e({...o,options:i});const c=new URLSearchParams(window.location.search),l=c.get("utm_campaign")||c.get("utmi_campaign")||"";l&&s(()=>r.addSellerCode(t().id,l.toUpperCase()),"openTextField")}};return Qe.get(Mn).then(o=>r.getOrderForm(o?o.id:"").then(a)),{...T.initialState,addCoupon:async o=>s(()=>r.addCoupon(t().id,o),"marketingData"),addItem:(o,i)=>{s(()=>r.addItem(t().id,t().items,o),"items",i)},addSellerCode:async(o,i)=>s(()=>r.addSellerCode(t().id,o,i,t().isOpen),"openTextField"),addMarketingData:async o=>s(()=>r.addMarketingData(t().id,o),"marketingData"),emptyCart:()=>{s(()=>r.emptyCart(t().id))},removeItem:async o=>{const i=await s(()=>r.removeItem(t().id,t().items,o),"items");return T.getRemoveId(o,i)},shipping:async(o,i="BR")=>s(()=>r.shipping(t().id,o??"",i,t().items.length,T.createNewAddress(o??"",null,i)),"shippingData"),shippingUpdate:async o=>s(()=>{var i;return r.shippingUpdate(t().id,o,(i=t().shippingData)==null?void 0:i.selectedAddresses)},"shippingData"),toggleServiceToProduct:async(o,i,c)=>s(()=>r.giftItem(t().id,o,i,c),"items"),updateItemQuantity:async(o,i,c)=>{const{id:l,items:u}=t();return s(()=>{var m;return r.updateItemQuantity(l,u,o,i,((m=u.find(p=>p.id===o))==null?void 0:m.quantity)??1)},"items",c?[c]:void 0)},insertProfileEmail:async o=>s(()=>r.insertProfileEmail(t().id,o),"clientProfileData"),setIsOpen:o=>e({isOpen:o})}}return T.initialState}),Rm=()=>bt(e=>e),Wa=Pt.create(e=>({notifications:[],actions:{addNotification:(t,r)=>e(s=>T.addNotification(s,t,r)),removeNotification:t=>e(r=>({notifications:r.notifications.filter(s=>s.id!==t)}))}})),Is=()=>Wa(e=>e.notifications),Rs=()=>Wa(e=>e.actions),Tm=Object.freeze(Object.defineProperty({__proto__:null,KEY_INDEXED_OPTIONS:Vt,KEY_INDEXED_STORE:Mn,useCartStore:bt,useGetCartStoreState:Rm,useGetNotificationActions:Rs,useGetNotificationsStore:Is},Symbol.toStringTag,{value:"Module"})),Am=6e3,Ga=g.createContext({}),Ka=({children:e,...t})=>{const{items:r}=bt(),[s,a]=g.useState([]),o=g.useRef(null),i=g.useMemo(()=>Array.isArray(s)&&s.length>0?s.map(c=>r.find(l=>l.id===c.id)).filter(c=>c!==void 0):[],[r,s]);return g.useEffect(()=>{s.length&&(clearTimeout(o.current??0),o.current=setTimeout(()=>{a([])},Am))},[s]),n.jsx(Ga.Provider,{value:g.useMemo(()=>({...t,setRecentlyAdded:a,recentlyAddedProducts:i}),[t,a,i]),children:e})},tn=()=>{const e=g.useContext(Ga);if(e===void 0)throw new Error("useUIContext must be used within a UIProvider");return e};class Xa{constructor(){gt(this,"events",{});gt(this,"prevData",{})}subscribe(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),()=>{this.events[t]=this.events[t].filter(s=>s!==r)}}publish(t,r){this.events[t]&&this.events[t].forEach(s=>{this.prevData[t]=r,s(r)})}}const Ya=g.createContext({}),km=({children:e,headerConfigs:t,pathname:r,storeId:s,...a})=>{T.configureFetchProxy(s);const[o,i]=g.useState(!0),[c,l]=g.useState(!1),u=r==="/",m=g.useRef(new Xa),p=_=>_?{headerVariant:t.home_default_variant,bannerVariant:t.home_default_variant,position:t.home_default_position}:{headerVariant:t.default_variant,bannerVariant:t.default_variant,position:t.default_position},f=p(u),h=g.useRef(f);return g.useEffect(()=>{var x;const _=((x=new URLSearchParams(window.location.search))==null?void 0:x.toString())??"";(_.includes("utm_")||_.includes("gclid"))&&(Xr.get("lastMedias")||Xr.set("lastMedias",`${_}`,{expires:1/24}));const y=()=>{const v=typeof(window==null?void 0:window.navigator)>"u"?"":navigator==null?void 0:navigator.userAgent,C=window.innerWidth<1024||!!v.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i);c||l(!0),o!==C&&(i(C),l(!0))};return c||y(),window.addEventListener("resize",y,{passive:!0}),()=>window.removeEventListener("resize",y)},[o,c]),g.useEffect(()=>{const _=p(u);m.current.publish("header:change_variant",_.headerVariant),m.current.publish("header:change_position",_.position),h.current=_},[u]),n.jsx(Ya.Provider,{value:{isMobile:o,mediatorRef:m,currentHeaderConfigsRef:h,deviceValidated:c,...a},children:n.jsx(Ka,{children:e})})},ne=()=>g.useContext(Ya),Qa=g.createContext({}),Om=({children:e,...t})=>n.jsx(Qa.Provider,{value:{...t},children:e}),ce=()=>g.useContext(Qa),wt=(e,t)=>Pt.create(r=>{const s=()=>r({value:e});return t&&t instanceof Set&&t.add(s),{value:e,actions:{setValue:a=>r({value:a}),reset:s}}}),Qt={category:null,menuMobileIsOpen:!1,searchModalIsOpen:!1,userMenuIsOpen:!1},nn=new Set,Lm=()=>{nn.forEach(e=>{e()})},Za=Pt.create((e,t)=>{const r=()=>e({value:Qt.category});return nn.add(r),{value:Qt.category,actions:{reset:r,setValue:s=>e(()=>({value:s})),updateValue:s=>{t().value!==s&&e({value:s})}}}}),Ja=()=>Za(e=>e.value),rn=()=>Za(e=>e.actions),ei=wt(Qt.menuMobileIsOpen,nn),ti=()=>ei(e=>e.value),ni=()=>ei(e=>e.actions),ri=wt(Qt.searchModalIsOpen,nn),si=()=>ri(e=>e.value),$n=()=>ri(e=>e.actions),oi=wt(Qt.userMenuIsOpen,nn),Ts=()=>oi(e=>e.value),As=()=>oi(e=>e.actions),Mm=Object.freeze(Object.defineProperty({__proto__:null,resetAllHeaderStores:Lm,useActionsHeaderCategory:rn,useActionsMenuMobileIsOpen:ni,useActionsSearchModalIsOpen:$n,useActionsUserMenuIsOpen:As,useGetHeaderCategoryStore:Ja,useGetMenuMobileIsOpen:ti,useGetSearchModalIsOpen:si,useGetUserMenuIsOpen:Ts},Symbol.toStringTag,{value:"Module"})),Dt={selectedSkuInfo:{productId:"",name:"",size:"",sku:"",sellerId:"",sellerName:"",available:!1,quantity:1},openLetMeKnow:!1,openMeasurements:!1,showBottomNavigation:!1,showNotify:!1},Ft=new Set,Dm=()=>{Ft.forEach(e=>{e()})},ai=Pt.create(e=>{const t=()=>e({value:Dt.selectedSkuInfo});return Ft.add(t),{value:Dt.selectedSkuInfo,actions:{setValue:r=>e(s=>({value:{...s,...r}})),reset:t}}}),sn=()=>ai(e=>e.value),ii=()=>ai(e=>e.actions),ci=wt(Dt.openLetMeKnow,Ft),Fm=()=>ci(e=>e.value),zm=()=>ci(e=>e.actions),li=wt(Dt.showNotify,Ft),ui=()=>li(e=>e.value),ks=()=>li(e=>e.actions),di=wt(Dt.showBottomNavigation,Ft),Bm=()=>di(e=>e.value),Um=()=>di(e=>e.actions),mi=wt(Dt.openMeasurements,Ft),pi=()=>mi(e=>e.value),fi=()=>mi(e=>e.actions),qm=Object.freeze(Object.defineProperty({__proto__:null,resetAllPDPStores:Dm,useActionsPDPOpenLetMeKnow:zm,useActionsPDPOpenMeasurements:fi,useActionsPDPSelectedSkuInfo:ii,useActionsPDPShowBottomNavigation:Um,useActionsPDPShowNotify:ks,useGetPDPOpenLetMeKnow:Fm,useGetPDPOpenMeasurements:pi,useGetPDPSelectedSkuInfo:sn,useGetPDPShowBottomNavigation:Bm,useGetPDPShowNotify:ui},Symbol.toStringTag,{value:"Module"})),ho={feedback:{active:!1,action:"add"},list:[]},Os=Pt.create((e,t)=>({value:ho,actions:{reset:()=>e({value:ho}),setValue:s=>e(()=>({value:s})),toggleProduct:s=>e(a=>a.value.list.includes(s)?{value:{feedback:{active:!0,action:"remove"},list:a.value.list.filter(o=>o!==s)}}:{value:{feedback:{active:!0,action:"add"},list:[...a.value.list,s]}}),updateList:s=>e(a=>({value:{...a.value,list:s}})),resetFeedback:()=>e(s=>({value:{...s.value,feedback:{active:!1,action:""}}}))}})),zt=()=>Os(e=>e.value.list),Ls=()=>Os(e=>e.value.feedback),Nt=()=>Os(e=>e.actions),Hm=Object.freeze(Object.defineProperty({__proto__:null,useActionsWishlistStore:Nt,useGetWishlistFeedbackStore:Ls,useGetWishlistStore:zt},Symbol.toStringTag,{value:"Module"})),hi=g.createContext({}),$m=({children:e,headerData:t,...r})=>{var m,p;const s=g.useRef(null),a=g.useRef(null),o=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 v,C,j;if(f&&u.current&&(u.current.bannerVariant=f),!s.current)return;const _=document.body.scrollTop>0,y=s.current.getAttribute("data-interactiveVariant"),x=_?y:f??((v=u.current)==null?void 0:v.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))}),(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 v;(v=y.target.closest("a"))==null||v.blur()};return s.current&&(s.current.addEventListener("click",_,{signal:f.signal}),s.current.addEventListener("touchend",_,{signal:f.signal})),()=>{f.abort()}},[]),n.jsx(hi.Provider,{value:{headerData:t,structureRef:a,rootRef:s,tipbarRef:o,userMenuMobileRef:i,userMenuDesktopRef:c,...r},children:e})},Ne=()=>g.useContext(hi),_i=g.createContext({}),gi=({children:e,...t})=>n.jsx(_i.Provider,{value:g.useMemo(()=>t,[t]),children:e}),Ms=()=>{const e=g.useContext(_i);if(e===void 0)throw new Error("useMenuMobileContext must be used within a MenuMobileProvider");return e},Vm=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},Wm=(e,t,r)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const s=t.getBoundingClientRect(),a=e.getBoundingClientRect(),o=e!=null&&e.parentElement?Vm(e==null?void 0:e.parentElement):0;return{left:s.left+s.width/2-(a.width+o),top:s.top+s.height+r}},yi=g.createContext({}),xi=({children:e,delay:t=600,gap:r=20,...s})=>{const[a,o]=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(()=>{o(!1),l(!1)},t))},[l,o,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}=Wm(h,f,r??0);m({left:_,top:y}),l(!1)}},[r,a]),n.jsx(yi.Provider,{value:g.useMemo(()=>({...s,...u,handleClose:p,isLeaving:c,isOpen:a,setIsOpen:o,setIsLeaving:l}),[s,u,p,c,a,o,l]),children:e})},Et=()=>{const e=g.useContext(yi);if(e===void 0)throw new Error("useAddToCartContext must be used within a AddToCartProvider");return e},vi=g.createContext({}),Gm=({children:e,SELLER_CODE_VALIDATION_KEYS:t,CARTPROVIDER_MESSAGE_PRODUCT_REMOVE:r,data:s,...a})=>{var se,de,oe,le;const o=bt(),{setRecentlyAdded:i}=tn(),c=g.useRef(""),l=Is(),{addNotification:u,removeNotification:m}=Rs(),[p,f]=g.useState(null),{addCoupon:h,addItem:_,addSellerCode:y,addMarketingData:x,emptyCart:v,isOpen:C,removeItem:j,shipping:b,shippingUpdate:w,toggleServiceToProduct:S,updateItemQuantity:P}=o;g.useEffect(()=>{(async()=>{var E,W,ie,he;if(!o.id||!((W=(E=s==null?void 0:s.promotion)==null?void 0:E.promotionCart)!=null&&W.idPromotion)||((he=(ie=s==null?void 0:s.promotion)==null?void 0:ie.promotionCart)==null?void 0:he.selectPromotion)==="Desativar")return;const ee=await fetch("/api/buywin",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({orderFormId:o.id,promotionId:s.promotion.promotionCart.idPromotion,web:(s==null?void 0:s.promotion.promotionCart.versionAPI)==="Original"})}).then(I=>I.json());f(ee)})()},[o.id,o.items.length,s==null?void 0:s.versionId,(de=(se=s==null?void 0:s.promotion)==null?void 0:se.promotionCart)==null?void 0:de.idPromotion,(le=(oe=s==null?void 0:s.promotion)==null?void 0:oe.promotionCart)==null?void 0:le.versionAPI]),g.useEffect(()=>{const F=Xr.get("lastMedias");if(o.id&&F&&c.current!==F){c.current=F;const ee=new URLSearchParams(F),E=T.mountMarketingData(ee);x(E)}},[o,x]);const N=g.useCallback(async(F,ee)=>(ee==="coupon"?h(F):y(F,t??{})).then(W=>{if(typeof W!="boolean"&&W instanceof Object){if(ee==="seller"&&"value"in W){const{statusOk:ie,value:he}=W,I=String(he??"").split(" - ");return T.getCode((I==null?void 0:I[0])??"",F,!!ie)}return T.getCode(String(W.coupon),F,!0)}return T.getCode("","")}).catch(()=>Promise.resolve({code:400})),[h,y]),R=g.useCallback((F,ee,E)=>{const{id:W}=F;P(W,ee,E)},[P]),k=g.useCallback((F,ee,E=!1)=>{if(!F)return;const{id:W}=F,ie=T.findItemIndex(o.items,W);if(ie!==-1&&!E){const he=Number(o.items[ie].quantity),I=o.items[ie]?he+1:1;R(F,I,ee)}else _({id:W,quantity:(F==null?void 0:F.quantity)??1,seller:F.seller});C||i(he=>[...he,F])},[_,R,o.items,C,i]),O=g.useCallback((F,ee)=>{if(!F||!Array.isArray(F))return;i(W=>[...W,...F]);const E=F.map(W=>{const{id:ie,quantity:he,seller:I}=W,A=T.findItemIndex(o.items,ie),Te=T.getQuantity(he??1,A);return{id:ie,quantity:Te,seller:I}});_(E,ee)},[_,o.items,i]),M=g.useCallback(async(F,ee,E)=>F?j(F).then(()=>(u(ee??`${r}`,E),T.getCode(F,F))):Promise.resolve(T.getCode("","Product id required")),[u,j]),X=g.useCallback(()=>{o.items.length>0&&v()},[v,o.items]),D=g.useCallback((F,ee="BRA")=>b(F,ee),[b]),q=g.useCallback(F=>{F&&w(F)},[w]),U=g.useCallback(async(F,ee,E=!1)=>{const W=o.items.findIndex(he=>he.uniqueId===F);return o.items[W]&&W>=0?S(ee,W,E):!1},[o.items,S]),Q=g.useCallback(async(F,ee)=>P(F,ee).then(E=>{if(Array.isArray(E)){const W=E.find(ie=>ie.id===F);if(W&&(W==null?void 0:W.quantity)<ee)return String(W.quantity)}return!1}),[P]),G=g.useCallback(async()=>{await x({...o.marketingData,coupon:""})},[x,o.marketingData]),H=g.useCallback(async()=>{await x({...o.marketingData,utmiCampaign:"",utmCampaign:"",utmSource:"",utmMedium:""})},[x,o.marketingData]),J=g.useCallback(async()=>{await b("","BRA")},[b]);return n.jsx(vi.Provider,{value:g.useMemo(()=>({...a,data:s,addCouponSeller:N,addToCart:k,addItemsToCart:O,cartStore:o,notifications:l,clearCart:X,addNotification:u,isOpen:o.isOpen,removeNotification:m,removeToCart:M,setIsOpen:o.setIsOpen,shipping:D,shippingUpdateOption:q,toggleGiftItemCart:U,updateItemQuantity:Q,removeCoupon:G,removeSellerCode:H,removeCEP:J,promotionRules:p,setPromotionRules:f}),[a,s,N,k,O,l,X,u,o,m,M,D,q,U,Q,G,H,J,p,f]),children:e})},ve=()=>{const e=g.useContext(vi);if(e===void 0)throw new Error("useCartContext must be used within a CartProvider");return e},bi=g.createContext({}),Ds=({children:e,fetch:t})=>{const r=g.useRef(!0),[s,a]=g.useState(null),[o,i]=g.useState(!1);return g.useEffect(()=>{(async()=>{r.current=!0;try{const l=await t();if(!l.ok)throw new Error("Failed to fetch data");const u=await l.json();a(u.data),r.current=!1}catch{r.current=!0,i(!0)}})()},[t]),n.jsx(bi.Provider,{value:g.useMemo(()=>({data:s,isLoading:r.current??!1,isError:o}),[s,o,r]),children:e})},Fs=()=>{const e=g.useContext(bi);if(e===void 0)throw new Error("useProductsContext must be used within a useRootContext");return e},ji=g.createContext({}),zs=({children:e,sort:t,state:r,count:s,collectionId:a,brand:o,searchParams:i,ITEMS_PER_PAGE:c})=>{const l=g.useMemo(()=>{var u;return a?[{key:"productclusterids",value:a.toString()}]:o?[{key:"brand",value:o}]:(u=r.base)!=null&&u.length?r.base.slice(1).split("/").map((m,p)=>({key:`category-${p+1}`,value:m})):[]},[r.base,a]);return n.jsx(ji.Provider,{value:g.useMemo(()=>({state:{...r,facets:[...l,...r.facets??[]]},sort:t,count:s??c,searchParams:i}),[l,s,t,r,i]),children:e})},ze=()=>{const e=g.useContext(ji);if(e===void 0)throw new Error("useSearchContext must be used within a SearchProvider");return e},Ci=g.createContext({}),Km=({children:e,...t})=>n.jsx(Ci.Provider,{value:t,children:e}),De=()=>{const e=g.useContext(Ci);if(e===void 0)throw new Error("usePLPConstants must be used within a PLPConstantsProvider");return e},Si=g.createContext({}),Xm=({children:e,selectedFacets:t})=>{const{data:r,...s}=Fs(),{router:a}=ce(),{searchParams:o,PLP_SORT_DEFAULT:i}=De(),c=g.useCallback((f,h)=>{if(h){if(f.key.toLocaleLowerCase()==="price"){const _=h.getAll("facets");h.delete("facets"),_.forEach(y=>{const[x]=y.split("/");x!==f.key&&h.append("facets",y)})}h.set("page","1"),h.append("facets",`${f.key}/${f.value}`),a.push(`?${h.toString()}`)}},[a]),l=g.useCallback(()=>{const f=new URLSearchParams;f.set("sort",i),f.set("page","1"),a.push(`?${f.toString()}`)},[a]),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[x,v]=y.split("/");(x!==f.key||v!==f.value)&&h.append("facets",y)}),a.push(`?${h.toString()}`)},[a]),m=g.useCallback(f=>{const h=o?new URLSearchParams(o):new URLSearchParams;for(const[,_]of h.entries()){const[y,x]=_.split("/");if(y===f.key&&x===f.value)return u(f,h)}return c(f,h)},[c,u,o]),p=g.useCallback(f=>{const h=o?new URLSearchParams(o):new URLSearchParams;h.set("sort",f.replace("_",":")),a.push(`?${h.toString()}`)},[a,o]);return n.jsx(Si.Provider,{value:g.useMemo(()=>({...s,breadcrumb:r&&"breadcrumb"in r?r==null?void 0:r.breadcrumb:[],deleteAllFacets:l,facets:r&&"facets"in r?r==null?void 0:r.facets:[],selectedFacets:t,onToggleFacet:m,onSort:p,searchParams:o}),[r,l,p,m,s,t,o]),children:e})},Pi=({children:e,forceUpdate:t})=>{const{state:r}=ze();return n.jsx(Ds,{fetch:()=>T.fetchProxy("/_v/proxy/search/facets",{method:"POST",body:JSON.stringify({...r,forceUpdate:t})}),children:n.jsx(Xm,{selectedFacets:(r==null?void 0:r.facets)??[],children:e})})},wi=()=>{const e=g.useContext(Si);if(e===void 0)throw new Error("useFacetsContext must be used within a FacetsProvider");return e},qt={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"}},Ym={nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"0",count:0,total:0},Qm="Imagem do produto",_o=1,Zm="Sair",Jm=e=>e.exit,go=({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"}],ep=(e,t)=>{const r=(t??"").split("@")[0];return e?`Olá${r.length?", ":" "}${r}!`:"Olá!"},tp=e=>"Seja bem vindo!",np="Marque a caixa para aceitar os termos de política de privacidade.",rp="Algumas informações estão incorretas ou não foram preenchidas",sp="Enviar",Ni=g.createContext({}),op=({children:e})=>{const{data:t,...r}=Fs(),[s,a]=g.useState(0),{sendDataLayerEvent:o}=ae();return g.useEffect(()=>{if(t&&"pagination"in t&&t.products.length>0){o({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:t.products}}});const i=t.pagination.count;i&&Number.isInteger(i)&&a(i)}},[t,o,a]),n.jsx(Ni.Provider,{value:g.useMemo(()=>({...r,products:t&&"products"in t?t==null?void 0:t.products:[],pagination:t&&"pagination"in t?t==null?void 0:t.pagination:Ym,total:s}),[t,r,s]),children:e})},Bs=({children:e,query:t,forceUpdate:r})=>{const{count:s,state:a}=ze(),o={...a,count:s};return n.jsx(Ds,{fetch:()=>T.fetchProxy("/_v/proxy/search/product",{method:"POST",body:JSON.stringify({...o,query:t,forceUpdate:r,facets:a.facets??[]})}),children:n.jsx(op,{children:e})})},on=()=>{const e=g.useContext(Ni);if(e===void 0)throw new Error("useProductsContext must be used within a ProductsProvider");return e},Ei=g.createContext({}),ap=({children:e,slug:t,searchParams:r,collectionId:s,brand:a,itemsPerPage:o=24,PLP_SORT_DEFAULT:i})=>{const{pathname:c}=ce(),l=g.useRef(""),[u,m]=g.useState(!1),p=g.useMemo(()=>{const h=new URL(c,"http://localhost"),_=(r==null?void 0:r.getAll("facets"))??[],y=(r==null?void 0:r.get("page"))??"1",x=(r==null?void 0:r.get("sort"))??(s?"":i);return h.searchParams.set("page",String(y)),h.searchParams.set("sort",String(x)),r!=null&&r.get("query")?(h.searchParams.set("query",r.get("query")),h):(h.searchParams.set("base",Array.isArray(t)?t.join("/"):t),h.searchParams.set("facets",_.join(",")),h)},[s,c,r,t]),f=g.useMemo(()=>{if(Array.isArray(r==null?void 0:r.getAll("facets")))return T.parseSearchState(p,r.getAll("facets")??[""]);const h=(r==null?void 0:r.getAll("facets"))??[];return T.parseSearchState(p,h)},[p,r]);return g.useEffect(()=>{l.current!==c&&(l.current=c,window.document.body.scrollTo(0,0))},[c]),n.jsx(Ei.Provider,{value:g.useMemo(()=>({openFilters:u,setOpenFilters:m}),[u,m]),children:n.jsx(zs,{ITEMS_PER_PAGE:o,searchParams:r??new URLSearchParams,state:g.useMemo(()=>({...f}),[f]),collectionId:s,brand:a,children:e})})},Us=()=>{const e=g.useContext(Ei);if(e===void 0)throw new Error("usePLPContext must be used within a PLPProvider");return e},Dn=(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((a,o)=>Dn(a,t[o]));if(Array.isArray(t))return!1;const r=Object.keys(e),s=Object.keys(t);return r.length!==s.length?!1:r.every(a=>Object.prototype.hasOwnProperty.call(t,a)&&Dn(e[a],t[a]))},Ii=(e,t,r="page")=>Object.keys(t).some(s=>s===r?!1:!Dn(t[s],e[s])),Zr=async e=>{const t=await T.fetchProxy("/_v/proxy/search/product",{method:"POST",body:JSON.stringify(e)});if(!t.ok)throw new Error("[FAILED TO FETCH DATA]");const r=await t.json();return r==null?void 0:r.data},Ri=()=>({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}}}),Ti=(e,t,r,s=24)=>{const a=new Set,o=[];if(!Array.isArray(e)||e.length===0)return{taken:a,placedBanners:o};const i=t*s*r;for(const c of e){let l=Number(c.position_grid),u=!1;for(;l<i;){const m=l%r;if(m+c.columns>r){l+=r-m;continue}if(!Array.from({length:c.columns}).some((h,_)=>a.has(l+_))){for(let h=0;h<c.columns;h++)a.add(l+h);o.push(l),u=!0;break}l++}u||console.info(`[PLP INFINITE FAILED BANNER POSITION]: pos=${c.position_grid}, cols=${c.columns}`)}return{taken:a,placedBanners:o}},Jr=(e,t,r,s=24)=>{const{placedBanners:a,taken:o}=Ti(e??[],t,r),i=[];let c=0;try{for(;i.length<t*s;)o.has(c)||i.push(c),c++;return{banners:a,products:i}}catch(l){console.info(`[PLP INFINITE FAILED TO GEN POSITIONS]: page=${t}`,l)}return{banners:[],products:i}},An=(e,t,r=24)=>Array.from({length:e},(s,a)=>{const o=a+1;return{loading:e===o,page:o,pagination:t!=null&&t.products.length&&e===o?t==null?void 0:t.pagination:qs(),products:t!=null&&t.products.length&&e===o?t==null?void 0:t.products:Array.from({length:r},()=>Ri())}}),Ai=(e,t)=>[...e,{loading:!1,page:t,pagination:qs(),products:[]}],qs=()=>({nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"1",count:1,total:1}),ip=(e,t,r,s,a)=>{const o=e[e.length-1],i=(o==null?void 0:o.products.length)??a,c=(e.length-1)*a+i-1,l=r[c];return t.filter((u,m)=>{const p=s[m];return p<=l||a>i&&p>l})},ki=(e,t)=>{const r=new Map;for(const a of e){const o=Math.floor(a/t);r.has(o)||r.set(o,[]),r.get(o).push(a)}const s=[];for(const[,a]of r){const o=a[Math.floor(Math.random()*a.length)];s.push(o)}return s},Oi=(e,t)=>{if(!e)return[];const r=e.map((s,a)=>s.video&&s.video!==""?a:null).filter(s=>s);return ki(r,t)},Li=e=>Array.isArray(e)?e.map((t,r)=>({href:`/${e.slice(0,r+1).join("/")}`,name:t})):[],cp=Object.freeze(Object.defineProperty({__proto__:null,createBreadcrumb:Li,createPage:Ai,createPages:An,createPagination:qs,createProduct:Ri,deepEqual:Dn,fetchPage:Zr,getBanners:Ti,getPositions:Jr,getProductsWithVideo:Oi,getRandomVideoPerRow:ki,getVisibleBanners:ip,hasStateChangedExceptPage:Ii},Symbol.toStringTag,{value:"Module"})),lp=50,up=Pt.create((e,t)=>{const r=i=>Math.min(i,lp),s=async(i,c)=>{const l=r(i.page);try{const u=await Zr({...i,page:l});a(l,m=>c?c(m,u):{...m,...u})}catch(u){console.error(`[PDC - SCROLL INFINITE FAILED TO FETCH PAGE ${l}]: ${u}`),a(l,m=>({...m,loading:!1}))}},a=(i,c)=>{e({load:!0,pages:t().pages.map(l=>l.page===i?c(l):l)})},o=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=r(Number(i==null?void 0:i.page));e({...c,pages:An(m,void 0,u)});try{const _=await Zr({...i,page:m});if(_){if(!_.products.length&&((p=_==null?void 0:_.pagination)==null?void 0:p.total)<m){o({...i,page:(f=_==null?void 0:_.pagination)==null?void 0:f.total},l),e({pages:An((h=_==null?void 0:_.pagination)==null?void 0:h.total)});return}typeof l=="function"&&l(_),e({load:!0,pages:An(m,_),total:Number(_.pagination.count)})}}catch(_){console.error(`[PDC - SCROLL INFINITE TO CREATE PAGES]: page ${m} ${_}`)}},addPage:(i,c,l,u)=>{const{pages:m}=t(),p=r(i==null?void 0:i.page);m.some(f=>f.page===p)||(e({...c,pages:Ai(m,p)}),o(i,l))},updateProducts:(i,c)=>{const l=t().pages.find(u=>u.page===r(i==null?void 0:i.page));l!=null&&l.loading||o(i,c)}}}),dp=(e,t,r,s=0)=>{if(!e.length)return[];let a=0;const o=[];for(let i=0;i<e.length;i+=r){const c=e.slice(i,i+r),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+a+1;f&&(a+=f.columns),o.push({position:h,canPlayVideo:u===l})}}return o},Mi=(e,t,r)=>{const s=(t-1)*r,a=t*r;return e>=s&&e<=a},Vn=e=>{var t;return(t=e==null?void 0:e.map(r=>({disable:T.disableSKU(r),size:T.getSKUName(r),skuID:"sku"in r&&r.sku})))==null?void 0:t.filter(r=>r.disable)},mp=Object.freeze(Object.defineProperty({__proto__:null,createGridPosAndVideo:dp,getSkusNotify:Vn,isPositionInCurrentPage:Mi},Symbol.toStringTag,{value:"Module"})),Di=({isMobile:e,ICONS:t,NOTIFY_INFO:r})=>n.jsxs(n.Fragment,{children:[n.jsx(d.Modal.Controls,{navigation:e?"top":"middle",isMobile:e??!1,children:!e&&n.jsxs(n.Fragment,{children:[n.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),n.jsx(d.Button,{"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})}),n.jsx(d.Modal.Title,{navigation:e?"top":"middle",title:r.title})]});Di.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 Fi(e){const r=decodeURIComponent(window.document.cookie).split(";");for(const s of r){const[a,o]=s.trim().split("=");if(a===e)return o}}function Hs(e,t,r={}){const a={...{path:"/",expires:new Date(Date.now()+36e5)},...r};let o=`${encodeURIComponent(e)}=${encodeURIComponent(t??"")}`;for(const i in a)a[i]!==void 0&&(o+=`; ${i}`,i==="expires"?o+=`=${a[i].toUTCString()}`:typeof a[i]=="boolean"?o+=`; ${a[i]?"true":"false"}`:o+=`=${a[i]}`);window.document.cookie=o}const zi=g.createContext({amount:null,boxes:null,toExpire:null,loading:!0,logout:()=>null,getCurrentCredits:()=>({credits:0,cashback:0})}),pp=({children:e,AUTH_TOKEN_COOKIE:t})=>{var m;const{shipping:r,cartStore:s}=ve(),[a,o]=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:x,...v}=y;o({amount:f==null?void 0:f.amount,boxes:f==null?void 0:f.boxes,toExpire:f==null?void 0:f.toExpire,user:{...v,userId:h,sub:_??""},loading:!1,wishlist:(typeof x=="string"?x.split(",").filter(Boolean):x)??[]})})}catch(p){console.error("user info and my credits request",p),o({...a,loading:!1})}},[o]),c=g.useCallback(()=>{Hs(t),i()},[i]),l=g.useCallback(()=>a.boxes?a.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},[a]),u=g.useCallback(async()=>{var p,f,h;if((p=a.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 r(a.user.postalCode)}catch(_){console.error("Error auto-filling CEP:",_)}},[(m=a.user)==null?void 0:m.postalCode]);return g.useEffect(()=>{i()},[i]),g.useEffect(()=>{u()},[u]),n.jsx(zi.Provider,{value:g.useMemo(()=>({...a,getCurrentCredits:l,logout:c}),[a,l,c]),children:e})},Bt=()=>{const e=g.useContext(zi);if(e===void 0)throw new Error("useContext(SessionContext) must be used within a SessionProvider");return e},Bi=({color:e,delay:t=3e3,sku:r,setStatus:s,setIsLoading:a,NEWSLETTER_CONFIGS:o,NOTIFY_INFO:i})=>{const c=g.useRef(null),[l,u]=g.useState(null),{sendDataLayerEvent:m}=ae(),{user:p}=Bt(),f=p!=null&&p.firstName?`${p==null?void 0:p.firstName} ${p==null?void 0:p.lastName}`:"";return n.jsx("div",{className:Ze["notify--form"],children:n.jsxs("form",{action:"POST",onSubmit:async h=>{var x;h.preventDefault();const _=h.currentTarget,y=((x=_.querySelector("input"))==null?void 0:x.value)??"";fetch("/api/aviseme",{method:"POST",body:JSON.stringify({userName:f,email:y,sku:r==null?void 0:r.skuID})}).then(v=>s(v.ok)).finally(()=>{a(!1),_.reset(),m({functionKey:"readyEvents",data:{event:"notify_me",readyData:{size:r==null?void 0:r.size,item_id:r==null?void 0:r.skuID,color:e}}}),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{var v;(v=document.body)==null||v.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0})),u(!0),s(null)},t)})},children:[n.jsx(d.TextField.Structure,{input:n.jsx(d.TextField.Input,{feedback:typeof l=="boolean"&&l?"error":"none",type:"email",label:i.email_placeholder,mode:"over-label",variant:"outlined",sizeVariant:"large",onChange:h=>u(!h.target.validity.valid),required:!0}),supportText:typeof l=="boolean"&&l?n.jsx(d.TextField.SupportText,{text:o.messages.invalid_email,feedback:"error"}):n.jsx(n.Fragment,{})}),n.jsx(d.Button,{disabled:!(l===!1||!r)||!r,type:"submit",size:"large",children:i.button})]})})};Bi.displayName="Notify.Form";const Ui=({isLoading:e=!1})=>n.jsx("div",{className:Ze["notify--loading"],"data-loading":e,children:n.jsx(d.Spinner,{})});Ui.displayName="Notify.Loading";const $s={"product-variation-list--list":"_product-variation-list--list_e0he8_1","product-variation-list--title":"_product-variation-list--title_e0he8_10","product-variation-list":"_product-variation-list_e0he8_1"},qi=({children:e,...t})=>n.jsx("div",{...t,className:$s["product-variation-list--list"],children:e});qi.displayName="ProductVariationList.List";const Hi=({fill:e="#1352C7",src:t="",type:r="size",text:s,...a})=>{const{nextimage:o}=ce();return r==="size"?n.jsxs(d.ToggleSize.Wrapper,{...a,size:"large",variation:"ghost",children:[n.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-size"}),n.jsx(d.ToggleSize.Text,{children:s})]}):n.jsxs(d.ToggleStyle.Wrapper,{...a,size:"small",title:"wrapper-texture",children:[n.jsx(d.ToggleStyle.DisabledAdornment,{title:"disabled-adornment-texture"}),r==="color"?n.jsx(d.ToggleStyle.Color,{background:e,title:"color"}):n.jsx(d.ToggleStyle.Texture,{title:"texture",children:n.jsx(o,{alt:s??"image",height:40,src:t,width:40})})]})};Hi.displayName="ProductVariationList.Option";const $i=({children:e,...t})=>n.jsx("div",{className:$s["product-variation-list"],...t,children:e});$i.displayName="ProductVariationList.Root";const Vi=({children:e,title:t,...r})=>n.jsxs("div",{...r,className:$s["product-variation-list--title"],children:[t?n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.SectionWrapper,{children:n.jsx("p",{children:t})})}):n.jsx(n.Fragment,{}),e]});Vi.displayName="ProductVariationList.Title";const et={List:qi,Option:Hi,Title:Vi,Root:$i},fp=(e,t)=>{if(!e||!t)return!1;const r=Object.keys(e);return r.length!==Object.keys(t).length?!1:r.every(s=>e[s]===t[s])},Wi=({children:e,label:t="",skus:r,sku:s,setSku:a})=>n.jsxs(n.Fragment,{children:[n.jsx("div",{className:Ze["notify--selector--header"],children:e}),n.jsxs(et.Root,{className:Ze["notify--selector"],children:[n.jsx(et.Title,{title:t}),n.jsx(et.List,{children:Array.isArray(r)&&r.map((o,i)=>{const c=fp(s,o);return n.jsx(et.Option,{active:c,onClick:()=>a(c?null:o),text:String(o.size),type:"size"},i)})})]})]});Wi.displayName="Notify.Selector";const yo=({type:e,icon:t,title:r,subtitle:s})=>n.jsx("div",{className:Ze[`notify--status--${e}`],children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:t,size:"large"})},children:n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h2",{children:r}),n.jsx("h3",{children:s})]})})}),Gi=({status:e,ICONS:t,PRODUCT_CARD_TEXTS:r})=>n.jsxs("div",{className:Ze["notify--status"],"data-status":e,children:[n.jsx(yo,{...r.success,icon:t.check_circle,type:"success"}),n.jsx(yo,{...r.error,icon:t.alert_circle,type:"error"})]});Gi.displayName="Notify.Status";const Vs=({color:e,open:t,setVisible:r,skus:s,sku:a,setSku:o,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 n.jsxs(d.Modal.Root,{isMobile:y??!1,isOpen:t,setIsOpen:r,variant:y?"sideBottom":"sideLeft",style:{zIndex:m.modal},className:Ze["modal-modifier"],children:[n.jsx(d.Modal.Header,{navigation:"top",className:Ze["notify--header-modifier"],children:n.jsx(Di,{isMobile:y??!1,ICONS:i,NOTIFY_INFO:l})}),n.jsxs(d.Modal.Body,{className:Ze["notify--modal--body"],children:[n.jsxs("div",{className:Ze["notify--container"],children:[n.jsxs(Wi,{label:l.selector_label,sku:a,skus:s,setSku:o,children:[n.jsx("p",{children:l.subtitle}),n.jsx("span",{children:l.description})]}),n.jsx(Bi,{delay:4e3,sku:a,setStatus:_,setIsLoading:f,color:e,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l}),n.jsx(Ui,{isLoading:p}),n.jsx("div",{className:Ze["notify--selector--header"],children:n.jsx("span",{children:l.legal})})]}),n.jsx(Gi,{status:h,ICONS:i,PRODUCT_CARD_TEXTS:u})]})]})};Vs.displayName="Notify";const Wn=({skus:e,ICONS:t,NEWSLETTER_CONFIGS:r,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:o,...i})=>{const c=Vn(e??[]);return n.jsx(Vs,{skus:c,ICONS:t,NEWSLETTER_CONFIGS:r,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:o,...i})};Wn.displayName="PDC.Notification";const Ki=g.createContext({}),Xi=({banners:e,children:t})=>{const{searchParams:r,ITEMS_PER_PAGE:s,ICONS:a,NEWSLETTER_CONFIGS:o,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l}=De(),{router:u}=ce(),{sendDataLayerEvent:m}=ae(),{isMobile:p}=ne(),{state:f}=ze(),{addPage:h,createPages:_,updateProducts:y,...x}=up(),v=p?8:16,C=p?2:4,j=g.useRef(!1),b=g.useRef(f),[w,S]=g.useState(!1),[P,N]=g.useState(null),[R,k]=g.useState([]),O=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 Q=U.page+1,G=Jr(e,Q,C,s);h({...f,page:Q},G,O,s)}},[h,e,O,C,s,f]),X=g.useCallback(U=>{U.loading===!1&&y({...f,page:U.page},O)},[O,y,f]),D=g.useCallback(U=>{const Q=new URLSearchParams(r);U.page!==Number(Q.get("page")??1)&&(Q.set("page",String(U.page)),u.replace(`?${Q.toString()}`,{scroll:!1}))},[u,r]),q=g.useCallback((U,Q)=>{const G=Q?Vn([Q]):null;k(U),N(G!=null&&G.length?G[0]:null),S(!0)},[]);return g.useEffect(()=>{const U=!j.current,Q=Ii(b.current,f),G=Jr(e,f.page,C);U?_(f,G,O,s):Q&&(_(f,G,O,s),b.current=f),j.current=!0},[e,_,O,C,s,f]),n.jsxs(Ki.Provider,{value:g.useMemo(()=>({...x,addPage:h,addNewPage:M,createPages:_,gap:v,columns:C,handleNotify:q,updatePage:X,updateProducts:y,updateParamPage:D}),[h,M,_,q,v,C,x,X,y,D]),children:[t,n.jsx(Wn,{open:w,sku:P,skus:R,setSku:N,setVisible:S,ICONS:a,NEWSLETTER_CONFIGS:o,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l})]})},lt=()=>{const e=g.useContext(Ki);if(e===void 0)throw new Error("PLPInfiniteScrollContext must be used within a ScrollInfiniteProvider");return e},Yi=g.createContext({gridBanners:void 0,banners:[]}),hp=({children:e,data:t,device:r,SectionZone:s,COMMON_PAGE_COLUMN_GAP_PDC:a})=>{const{isMobile:o}=ne(),i=(t==null?void 0:t.sections.filter(p=>p.name!=="List Product Banners"))??[],c=i.slice(0,_o),l=i.slice(_o,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 o&&r==="mobile"||!o&&r==="desktop"?n.jsxs(Yi.Provider,{value:{gridBanners:u,banners:m},children:[n.jsx(s,{data:c??[]}),n.jsxs(d.Utils.Column,{gap:a,className:d.helpers.classNameConcat("utils-column-modifier"),children:[e,n.jsx(s,{data:l??[]})]})]}):n.jsx(n.Fragment,{})},Gn=()=>{const e=g.useContext(Yi);return e===void 0&&console.error("Needs PLPContentContext on parent component"),e},Qi=g.createContext({}),Zi=({children:e,filters:t,PLP_FILTERS:r,...s})=>{var o;const a=(o=t.facets)==null?void 0:o.filter(i=>r.find(c=>c.key===i.key));return n.jsx(Qi.Provider,{value:g.useMemo(()=>({...s,filters:{...t,facets:a}}),[t,a,s]),children:e})},Ut=()=>{const e=g.useContext(Qi);if(e===void 0)throw new Error("useFilterContext must be used within a FilterProvider");return e},Ji=g.createContext({product:void 0}),_p=({children:e,data:t,productId:r,COMMON_PAGE_COLUMN_GAP:s,SectionZone:a})=>n.jsxs(Ji.Provider,{value:{productId:r},children:[e,n.jsx(d.Utils.Column,{gap:s,className:d.helpers.classNameConcat("utils-column-modifier"),children:n.jsx(a,{data:(t==null?void 0:t.sections)??[]})})]}),ec=()=>{const e=g.useContext(Ji);return e||console.error("use this hook only inside PDPContentProvider hierarchy"),e},es=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase().trim();function gp(e,t=1e3){let r=!1;return(...s)=>{r||(e(...s),r=!0,setTimeout(()=>{r=!1},t))}}function yp(e,t=1e3){let r;return(...s)=>{clearTimeout(r),r=setTimeout(()=>{e(...s)},t)}}const tc=(e,t)=>t.getTime()>e.getTime()?Math.abs(t.getTime()-e.getTime()):0,Wt=(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),xp=e=>{const t=hm.decodeJwt(e??"");return{email:t.sub,userId:t.userId}},vp=["name","email","phone","date","cpf","cep"],xo={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}$/},nc=({type:e,input:t,required:r=!1})=>{if(typeof t!="string"||!r&&t===""||!xo[e])return!0;const s=t.trim();return xo[e].test(s)},bp=e=>{const t=/\/(\d+)-\d+-\d+\/(.+?)\./,r=typeof e=="string"?e.match(t):null;return r?r[2].replace(/-/g," "):Qm},jp=Object.freeze(Object.defineProperty({__proto__:null,FieldTypes:vp,debounce:yp,getAltTextFromUrl:bp,getAuthenticatedUser:xp,getCookie:Fi,getDaysHoursMinutesSeconds:Wt,getMilliSeconds:tc,removeAccentsAndReplaceSpaces:es,setCookie:Hs,throttle:gp,validateInput:nc},Symbol.toStringTag,{value:"Module"})),Cp=({fields:e})=>{const t={};return{mountedFields:(e==null?void 0:e.reduce((s,a)=>(t[a.master_data_field]="none",{...s,[a.master_data_field]:a}),{}))??{},mountedInputsStatus:t}},Sp=({formData:e,mountedFields:t,inputsStatus:r,hasTermsAndConditions:s,checkboxRef:a,setFormStatus:o})=>{let i=!1,c=!1;const l={...r};return s&&!a.current&&(o("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}nc({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}},rc=g.createContext({}),sc=({children:e,masterDataEmailField:t,fields:r,variant:s,CONSTANTS:{MASTER_DATA_ENTITY:a,NEWSLETTER_CONFIGS:o}})=>{const{sendDataLayerEvent:i}=ae(),c=o.hasTermsAndConditions,{mountedFields:l,mountedInputsStatus:u}=g.useMemo(()=>Cp({fields:r}),[r]),m=g.useRef(!1),[p,f]=g.useState("idle"),[h,_]=g.useState(u),y=async({searchFields:S,entity:P})=>{const N=await kt.post("/api/master-data/search",{body:{masterDataEntity:P,searchFields:S,headers:{"REST-Range":"resources=0-49"}}});return console.info(N),N.data},x=async({documentId:S,fieldsToBeUpdated:P,entity:N})=>(await kt.post("/api/master-data/update",{dataEntityName:N,documentId:S,fieldsToBeUpdated:P})).status,v=g.useCallback(async({payload:S,response:P},N,R)=>{var D;const{email:k,...O}=S,[M]=await y({searchFields:{[N]:k},entity:R??a.newsletter}),X=Array.isArray(M)?(D=M[0])==null?void 0:D.id:void 0;return M&&await x({documentId:X,fieldsToBeUpdated:O,entity:R??a.newsletter})!==204?{...P,status:"error"}:{...P,status:"success"}},[]),C=g.useCallback(async({formData:S},P,N)=>{const R={status:"idle",inputsStatus:{}},k={};S.forEach((O,M)=>{k[M]=O});try{const M=(await kt.post("/api/master-data",{body:{payload:k,masterDataEntity:P??a.newsletter}})).data;return(M==null?void 0:M.Message)==="duplicated entry"?v({payload:k,response:R},N,P):M!=null&&M.Id?{...R,status:"success"}:{...R,status:"error"}}catch(O){return console.error("error",O),{...R,status:"error"}}},[v]),j=g.useCallback(async(S,P,N)=>{S.preventDefault();const R=new FormData(S.target);if(R.append("acceptedTerms",m.current?"true":"false"),m.current){const O=new Yr.TZDate(new Date,"America/Sao_Paulo").toISOString();R.append("termsAcceptedAt",O)}P&&Object.keys(P).forEach(O=>{R.append(O,P[O])});const k=await C({formData:R},N??"",t);k&&(f(k==null?void 0:k.status),_(k.inputsStatus),k.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:N,hasErrors:R,inputStatusToUpdate:k}=Sp({formData:P,mountedFields:l,inputsStatus:h,hasTermsAndConditions:c,checkboxRef:m,setFormStatus:f});if(_(k),N||R){S.preventDefault();return}f("loading")},[l,h,c,m]),w=g.useCallback(()=>{f("idle"),_(u)},[u]);return n.jsx(rc.Provider,{value:g.useMemo(()=>({formStatus:p,handleSubmit:j,setFormStatus:f,inputsStatus:h,setInputsStatus:_,hasTermsAndConditions:c,handleClickToSubmit:b,checkboxRef:m,masterDataEmailField:t,fields:r,variant:s,resetNewsletter:w}),[p,j,f,h,_,b,c,m,t,r,s,w]),children:e})},Ws=()=>{const e=g.useContext(rc);if(e===void 0)throw new Error("useNewsletterContext must be used within a NewsletterProvider");return e},oc=g.createContext({}),ac=({children:e,data:t})=>{const[r,s]=g.useState(),[a,o]=g.useState(),i=g.useCallback(u=>{const m=t.filter(p=>p.cidade===u);s(m)},[t]),c=g.useCallback(u=>{o(u)},[]),l=g.useCallback(()=>{o("")},[]);return n.jsx(oc.Provider,{value:g.useMemo(()=>({clearSelectedStore:l,data:t,handleSelectCity:i,handleSelectStore:c,selectedCity:r,selectedStore:a}),[l,t,i,c,r,a]),children:e})},Kn=()=>{const e=g.useContext(oc);if(e===void 0)throw new Error("useLPStoreContext must be used within a LPStoreProvider");return e},Zt={contexts:{addToCart:{hook:Et,provider:xi},cart:{hook:ve,provider:Gm},cms:{FlagsAndTags:{context:Ns,hook:_t,provider:_m}},newsletter:{hook:Ws,provider:sc},events:{hook:ae,provider:Sm},global:{hook:ne,provider:km,mediator:Xa},header:{hook:Ne,provider:$m},menuMobile:{hook:Ms,provider:gi},next:{hook:ce,provider:Om},pdp:{provider:gm},PDPContent:{provider:_p,hook:ec},plp:{provider:ap,hook:Us},plpFilter:{hook:Ut,provider:Zi},PLPContent:{provider:hp,hook:Gn},plpInfinite:{provider:Xi,hook:lt},pdpdata:{provider:Pm},searchFacets:{hook:wi,provider:Pi},searchProducts:{hook:on,provider:Bs},searchRoot:{hook:Fs,provider:Ds},searchSearch:{hook:ze,provider:zs},session:{hook:Bt,provider:pp},ui:{hook:tn,provider:Ka},lpStore:{hook:Kn,provider:ac}},hooks:{useBackPDC:Oa,useClipboard:wm,useDisableZoom:$a,useLocalStorage:Em,useOnScreen:Es,useSentinel:Hn,useTouchZoomPan:Va},stores:{cart:Tm,header:Mm,pdp:qm,wishlist:Hm}},Pp={cart:T.cart,events:Cm,plp:cp,product:T.productHelpers,utils:jp},Gs={helpers:Pp},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"},ic=({brand:e,className:t,name:r,...s})=>n.jsxs("div",{...s,className:d.helpers.classNameConcat(He["add-to-cart--card--name"],t),children:[n.jsx(d.Tag,{style:{textTransform:"uppercase"},size:"small",variant:"quaternary",title:e,children:e}),n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:n.jsx("p",{className:"typography-style-body-md",children:r})})})]});ic.displayName="AddToCart.Card.Name";const cc=({className:e,listPrice:t,price:r,quantity:s,productId:a,...o})=>{const i=T.formatPriceToCurrency(r/100),c=T.formatPriceToCurrency(t/100);return n.jsx("div",{...o,className:d.helpers.classNameConcat(He["add-to-cart--card--price-quantity"],e),children:n.jsx(d.ProductInfo.Root,{size:"small",layout:"vertical",children:n.jsx(d.ProductInfo.Wrapper,{size:"small",layout:"vertical",children:n.jsx(d.ProductInfo.ValuesWrapper,{children:r!==t?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:i,size:"small"},"price-list"),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:c,size:"small"},"price-low")]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:c,size:"small"},"price-low")})})})})};cc.displayName="AddToCart.Card.PriceQuantity";const wp="_skeleton_12b79_1",Np={skeleton:wp},lc=({style:e})=>n.jsx("div",{style:e,className:Np.skeleton}),Ep="_image_1y08u_1",Ip={image:Ep},Rp=({alt:e,className:t,objectFit:r,...s})=>{const{nextimage:a}=ce();return n.jsx(a,{quality:90,...s,alt:e??"",className:d.helpers.classNameConcat(Ip.image,t),"data-object-fit":r??"cover"})},Tp=({videoRef:e,...t})=>n.jsx("video",{...t,ref:e,children:n.jsx("track",{kind:"captions"})}),we={Image:Rp,Video:Tp},uc=({className:e,productGroupID:t,size:r,texture:s,...a})=>{const{CONSTANTS:{TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:i}}=Et(),[c,l]=g.useState(s??"");return g.useEffect(()=>{c||T.fetchProxy("/_v/proxy/catalog/product/info",{method:"POST",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=>o.includes(f.imageLabel));p!=null&&p.imageUrl?l(p.imageUrl):l(m.images[0].imageUrl)}}).catch(u=>{console.error(u)})},[c,t]),n.jsxs("div",{...a,className:d.helpers.classNameConcat(He["add-to-cart--card--style-size"],e),children:[n.jsx(d.ToggleStyle.Wrapper,{size:"x-small",style:i,children:n.jsx(d.ToggleStyle.Texture,{children:c?n.jsx(we.Image,{alt:"",src:c??"",width:164,height:164,style:i}):n.jsx(lc,{})})}),n.jsx(d.Utils.Divider,{direction:"vertical",size:"medium",style:{height:24}}),r&&n.jsxs(d.ToggleSize.Wrapper,{size:"small",title:"wrapper-texture",children:[n.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),n.jsx(d.ToggleSize.Text,{children:r})]})]})};uc.displayName="AddToCart.Card.StyleSize";const{helpers:Ap}=Gs,dc=({className:e,item:t,texture:r,...s})=>{const{itemOffered:{name:a,brand:o,skuName:i,isVariationOf:{productGroupID:c}},quantity:l,price:u,sellingPrice:m}=t,{CONSTANTS:{NAME_SPLIT_SYMBOL:p}}=Et(),{size:f}=Ap.product.getColorAndSizeFromSkuName(i??a,p);return n.jsxs("div",{...s,className:d.helpers.classNameConcat(He["add-to-cart--card--content"],e),children:[n.jsx(ic,{brand:o.name,name:a}),n.jsx(cc,{price:u,listPrice:m,quantity:l,productId:t.id}),n.jsx(uc,{size:f,texture:r,productGroupID:c})]})};dc.displayName="AddToCart.Card.Content";const mc=({image:e,thumbnail:t=!1})=>n.jsx(we.Image,{alt:e.alternateName??"image","data-thumbnail":t,height:t?152:120,src:e.url,width:t?152:94});mc.displayName="AddToCart.Card";const pc=({className:e,item:t,texture:r,thumbnail:s,...a})=>{const{itemOffered:{image:[o]}}=t,i=T.updatedResizedImg(o.url,{width:200,height:300});return n.jsxs("div",{...a,className:d.helpers.classNameConcat(He["add-to-cart--card"],e),children:[n.jsx(mc,{image:{alternateName:o.alternateName||"Produto",url:i||""},thumbnail:s}),!s&&n.jsx(dc,{item:t,texture:r})]})};pc.displayName="AddToCart.Card";const fc=({className:e,children:t,title:r,...s})=>n.jsxs("div",{...s,className:d.helpers.classNameConcat(He["add-to-cart--content"],e),children:[n.jsx("div",{className:He["add-to-cart--content--title"],children:r&&n.jsx("h2",{children:r})}),t,n.jsx(vt.Footer,{})]});fc.displayName="AddToCart.Layout.Content";const hc=({className:e,...t})=>{var h,_;const{isMobile:r,handleClose:s,CONSTANTS:{ADD_TO_CART:a}}=Et(),{cartStore:{totalizers:o},setIsOpen:i}=ve(),c=(h=o.find(y=>y.id==="Discounts"))==null?void 0:h.value,l=((_=o.find(y=>y.id==="Items"))==null?void 0:_.value)??0,u=o.find(y=>y.id==="Shipping"),p=(l-Math.abs(c??0)+((u==null?void 0:u.value)??0))/100,f=T.formatPriceToCurrency(p??0);return n.jsxs("div",{...t,className:d.helpers.classNameConcat(He["add-to-cart--footer"],e),children:[n.jsxs("div",{className:He["add-to-cart--footer--total"],children:[n.jsx("span",{children:"Subtotal:"}),n.jsx("span",{children:f})]}),n.jsx(d.Button,{size:"medium",variant:"primary","data-close":!0,onClick:()=>i(!0),children:a.footer.bag}),r?n.jsx(d.Button,{"data-close":!0,size:"medium",variant:"tertiary",children:a.footer.keep_buying}):n.jsx(d.Button,{onClick:()=>s(),size:"medium",variant:"tertiary",children:a.footer.keep_buying})]})};hc.displayName="AddToCart.Layout.Footer";const _c=({children:e,className:t,thumbnail:r=!1,...s})=>{const{cartStore:{options:a}}=ve(),{recentlyAddedProducts:o}=tn(),i=o.length>3?4:o.length;return n.jsxs("div",{...s,className:He["add-to-cart--items"],"data-thumbnail":r,children:[Array.isArray(o)&&o.filter((c,l)=>l<i).map(c=>{var u;const l=(u=a==null?void 0:a.find(m=>m.id===c.itemOffered.isVariationOf.productGroupID))==null?void 0:u.texture;return n.jsx(vt.Card,{item:c,thumbnail:r,texture:l},c.itemOffered.sku)}),e]})};_c.displayName="AddToCart.Layout.Items";const gc=({children:e,Z_INDEX_WAR:t})=>{const{isOpen:r,setIsOpen:s}=Et(),{isMobile:a}=ne();return n.jsxs(d.Modal.Root,{"data-modal":"add-to-cart--modal",className:He["add-to-cart__modal"],isMobile:a??!1,isOpen:r,setIsOpen:s,variant:"sideBottom",style:{zIndex:t.modal},children:[n.jsx(d.Modal.Header,{navigation:"top",children:n.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0})}),n.jsx(d.Modal.Body,{children:e})]})};gc.displayName="AddToCart.Modal";const kp=({children:e})=>{const{count:t,handleClose:r,setIsOpen:s}=Et(),a=g.useRef(t);return g.useEffect(()=>{t>a.current&&s(!0),t<a.current&&a.current>=1&&r(),a.current=t},[t,r,s]),n.jsx(n.Fragment,{children:e})},yc=({children:e,component:t,CONSTANTS:r,...s})=>{const{recentlyAddedProducts:a}=tn(),{isMobile:o}=ne(),i=a.length>3?4:a.length;return n.jsx(xi,{...s,count:i,isMobile:o,CONSTANTS:r,children:n.jsx(kp,{children:o?n.jsxs(n.Fragment,{children:[n.jsx(vt.Modal,{Z_INDEX_WAR:r.Z_INDEX_WAR,children:t}),e]}):n.jsx(vt.Tooltip,{component:t,style:{width:350},Z_INDEX_WAR:r.Z_INDEX_WAR,children:e})})})};yc.displayName="AddToCart.Root";const xc=({children:e,component:t,Z_INDEX_WAR:r,...s})=>{const{contentRef:a,left:o,isLeaving:i,target:c,isOpen:l,top:u}=Et();return n.jsx(d.Tooltip.Root,{arrow:"top-right",component:n.jsx("div",{...s,ref:a,children:t}),id:"add-to-cart--tooltip",className:He["add-to-cart--tooltip"],style:{zIndex:r.modal},isLeaving:i,isOpen:l,left:o,size:"medium",position:"top",top:u,children:n.jsx("div",{className:He["add-to-cart--tooltip"],ref:c,children:e})})};xc.displayName="AddToCart.Tooltip";const vt={Card:pc,Content:fc,Footer:hc,Items:_c,Modal:gc,Root:yc,Tooltip:xc},Ks=({title:e,...t})=>{const{recentlyAddedProducts:r}=tn(),{isMobile:s}=ne(),a=r.length>3?4:r.length,o=r.length>(a??1),i=r.length>1;return n.jsx(vt.Root,{isMobile:s,count:r.length,component:n.jsx(vt.Content,{title:e,children:n.jsx(vt.Items,{thumbnail:i,children:o&&n.jsx(d.Badge.Count,{count:r.length-a,size:"medium",variant:"secondary"})})}),...t})};Ks.displayName="AddToCart";const vo={"backtotop-btn":"_backtotop-btn_vcjsm_1","card-modifier":"_card-modifier_vcjsm_29"},Op=({children:e,className:t,classNameButton:r,adornment:s,iconPosition:a,scrollToOptions:o,style:i,...c})=>{const l={top:(o==null?void 0:o.top)??0,left:(o==null?void 0:o.left)??0,behavior:(o==null?void 0:o.behavior)??"smooth"},m=a&&s?{flexDirection:{top:"column",bottom:"column-reverse",left:"row",right:"row-reverse"}[a]}:{},p=()=>{window&&window.document.body.scrollTo({...l})};return n.jsx(d.Card,{...c,shadow:!0,padding:"small",className:d.helpers.classNameConcat(vo["card-modifier"],t),style:{...i,padding:0},children:n.jsxs("button",{className:d.helpers.classNameConcat(vo["backtotop-btn"],r),onClick:p,style:{...m},"data-orientation":a,children:[s,e]})})},Lp="_container_1sy8s_16",pt={"carousel-container":"_carousel-container_1sy8s_1","add-cart-container":"_add-cart-container_1sy8s_8",container:Lp,"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"},Mp=({selectedProducts:e,handleAddAllToCart:t,CONSTANTS:r})=>{const s=Object.values(e.products).length;return n.jsxs("div",{className:pt["add-itens-to-cart-container"],children:[n.jsxs("div",{className:pt["add-itens-to-cart-container-values"],children:[n.jsx("div",{className:pt["add-itens-to-cart-qty-products"],children:n.jsx("span",{children:s===0?r.BUY_PACKAGE.group_cart.select_all_product:`${s} ${s===1?r.BUY_PACKAGE.group_cart.select_product:r.BUY_PACKAGE.group_cart.select_product+"s"}`})}),n.jsx("div",{className:pt["add-itens-to-cart-total"],children:n.jsx("span",{children:T.freightParsePrice({valueInCents:e.totalPrice*100,hasFree:!1,freeTaxMessage:r.FREIGHT_CALCULATION.messages.free_tax})})})]}),n.jsx(d.Button,{onClick:t,className:pt["add-button"],size:"large",disabled:s===0,variant:"primary",children:r.BUY_BUTTON_LABELS.add_to_cart})]})},Dp=e=>e.reduce((t,r)=>{var a;const s=t.find(o=>o.node.id===r.node.id);if(!s)return[...t,r];if((a=s==null?void 0:s.node.isVariantOf)!=null&&a.hasVariant){const o=s.node.isVariantOf.hasVariant,i=r.node.isVariantOf.hasVariant;o&&i&&(s.node.isVariantOf.hasVariant=[...o,...i])}return t},[]),Fp=({selectedProduct:e,productId:t,prevState:r,mainSellerId:s})=>{const{products:a,totalPrice:o}=r;try{if(!e){const{[t]:u,...m}=a;return{...r,totalPrice:o-u.price,products:m}}const i=T.getValidOffer(e.offers.offers,s);if(!i)return r;const c=i.seller.identifier,l=i.price;if(a[t]){const{price:u}=a[t];return a[t]={...a[t],price:l,id:e.sku,seller:c},{totalPrice:o+l-u,products:{...a}}}return{totalPrice:o+l,products:{...a,[t]:{id:e.sku,price:l,seller:c,productId:t}}}}catch(i){return console.error("Error handling SKU selection:",i),r}},vc=g.createContext({}),zp=({children:e,item:t,index:r,shelfTitle:s,...a})=>{const[o,i]=g.useState(null),c=g.useRef(null),l=g.useRef({availableSkus:[],priceInfo:{price:0,listPrice:0}}),{sendDataLayerEvent:u,itemListRef:m}=ae(),p=y=>{u({functionKey:"productEvents",data:{commonData:{...t,availableSizes:l.current.availableSkus,...l.current.priceInfo},customData:{index:r+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:o,selectedSkus:[o]},customData:{index:r}}})},_=()=>{s&&(m.current={item_list_name:s}),p("select_item")};return n.jsx(vc.Provider,{value:g.useMemo(()=>({...a,index:r,item:t,element:c,selectedSku:o,setSelectedSku:i,eventDataRef:l,sendAddToWishlistEvent:f,sendSelectItemEvent:_,sendAddToCartEvent:h}),[a,t,c,o]),children:e})},Ke=()=>{const e=g.useContext(vc);if(e===void 0)throw new Error("useProductCardContext must be used within a ProductCardProvider");return e},Re={"product-card--actions":"_product-card--actions_bndjh_1","product-card--actions--group":"_product-card--actions--group_bndjh_9","product-card--actions--selectors":"_product-card--actions--selectors_bndjh_21","product-card--body":"_product-card--body_bndjh_33","product-card--header":"_product-card--header_bndjh_47","product-card--footer":"_product-card--footer_bndjh_67","product-card--image":"_product-card--image_bndjh_90","product-card--image--container":"_product-card--image--container_bndjh_97","product-card--outstock":"_product-card--outstock_bndjh_133","product-card--price":"_product-card--price_bndjh_155","product-card--title":"_product-card--title_bndjh_177","product-card--title--tag":"_product-card--title--tag_bndjh_183","product-card--title--content":"_product-card--title--content_bndjh_200","product-card--selectors--size":"_product-card--selectors--size_bndjh_240","product-card--selectors--size--button":"_product-card--selectors--size--button_bndjh_266","product-card--selectors--size--skus":"_product-card--selectors--size--skus_bndjh_275","product-card--selectors--style":"_product-card--selectors--style_bndjh_289","product-card--selectors--style--more":"_product-card--selectors--style--more_bndjh_299","product-card--video":"_product-card--video_bndjh_316","product-card--wrapper":"_product-card--wrapper_bndjh_342"},bc=({callback:e,children:t,className:r,data:s,isKit:a,...o})=>{const{item:{availability:{status:i},image:c}}=Ke();return i?n.jsxs("div",{...o,className:d.helpers.classNameConcat(Re["product-card--actions"],r),children:[n.jsxs(fe.Wrapper,{type:"actions--group",children:[n.jsx(fe.Price,{}),n.jsx("div",{className:Re["product-card--actions--selectors"],children:!a&&n.jsx(fe.StyleSelector,{data:s,images:c,callback:e})})]}),t]}):null};bc.displayName="ProductCard.Actions";const jc=({className:e,isKit:t,...r})=>{const{addToCart:s}=ve(),{isMobile:a=!1,selectedSku:o,outStock:i,item:c,sendAddToCartEvent:l,CONSTANTS:u}=Ke(),m=()=>{var h;if(!o)return;const f=T.getValidOffer(o.offers.offers,u.StoreConfig_MainSellerId);f&&s({id:o==null?void 0:o.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=o?u.BUY_BUTTON_LABELS.add_to_cart:u.BUY_BUTTON_LABELS.select_size;return n.jsx(d.Button,{...r,className:d.helpers.classNameConcat(e,"buy-button"),disabled:!t&&!o&&!i,size:a?"medium":"large",variant:i?"secondary":"primary",onClick:i?r.onClick:m,children:i?"Avise-me quando chegar":p})};jc.displayName="ProductCard.Actions.BuyButton";const Bp={"snackbar-modifier":"_snackbar-modifier_1va2l_1"},Lt=({size:e,adornment:t,title:r,subtitle:s,supportChildren:a,className:o,Z_INDEX_WAR:i,...c})=>n.jsxs(d.SnackBar.Structure,{...c,size:e,className:d.helpers.classNameConcat(Bp["snackbar-modifier"],o),width:360,style:{zIndex:i.snackbar},children:[n.jsx(d.SnackBar.Content,{adornment:t,title:r,subtitle:s}),a&&n.jsx(d.SnackBar.Support,{children:a})]});Lt.displayName="SnackBar";const Xt={"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:{}},ke={};ke._=ke._interop_require_default=Up;function Up(e){return e&&e.__esModule?e:{default:e}}var pn={exports:{}},lr={},bo;function Cc(){return bo||(bo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}t(e,{assign:function(){return o},searchParamsToUrlQuery:function(){return r},urlQueryToSearchParams:function(){return a}});function r(i){const c={};return i.forEach((l,u)=>{typeof c[u]>"u"?c[u]=l:Array.isArray(c[u])?c[u].push(l):c[u]=[c[u],l]}),c}function s(i){return typeof i=="string"||typeof i=="number"&&!isNaN(i)||typeof i=="boolean"?String(i):""}function a(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 o(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}}(lr)),lr}var ur={},jt={};function Sc(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(Sc=function(s){return s?r:t})(e)}jt._=jt._interop_require_wildcard=qp;function qp(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=Sc(t);if(r&&r.has(e))return r.get(e);var s={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var i=a?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(s,o,i):s[o]=e[o]}return s.default=e,r&&r.set(e,s),s}var jo;function Pc(){return jo||(jo=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 o},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}});const s=jt._(Cc()),a=/https?|ftp|gopher|file/;function o(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 x=l.search||_&&"?"+_||"";return p&&!p.endsWith(":")&&(p+=":"),l.slashes||(!p||a.test(p))&&y!==!1?(y="//"+(y||""),f&&f[0]!=="/"&&(f="/"+f)):y||(y=""),h&&h[0]!=="#"&&(h="#"+h),x&&x[0]!=="?"&&(x="?"+x),f=f.replace(/[?#]/g,encodeURIComponent),x=x.replace("#","%23"),""+p+y+f+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)}),o(l)}}(ur)),ur}var dr={},Co;function Hp(){return Co||(Co=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"omit",{enumerable:!0,get:function(){return t}});function t(r,s){const a={};return Object.keys(r).forEach(o=>{s.includes(o)||(a[o]=r[o])}),a}}(dr)),dr}var mr={},So;function Xn(){return So||(So=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 v},NormalizeError:function(){return y},PageNotFoundError:function(){return x},SP:function(){return f},ST:function(){return h},WEB_VITALS:function(){return r},execOnce:function(){return s},getDisplayName:function(){return l},getLocationOrigin:function(){return i},getURL:function(){return c},isAbsoluteUrl:function(){return o},isResSent:function(){return u},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return m},stringifyError:function(){return j}});const r=["CLS","FCP","FID","INP","LCP","TTFB"];function s(b){let w=!1,S;return function(){for(var P=arguments.length,N=new Array(P),R=0;R<P;R++)N[R]=arguments[R];return w||(w=!0,S=b(...N)),S}}const a=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,o=b=>a.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 R='"'+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(R)}}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 N=await b.getInitialProps(w);if(P&&u(P))return N;if(!N){const R='"'+l(b)+'.getInitialProps()" should resolve to an object. But found "'+N+'" instead.';throw new Error(R)}return process.env.NODE_ENV!=="production"&&Object.keys(N).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"),N}const f=typeof performance<"u",h=f&&["mark","measure","getEntriesByName"].every(b=>typeof performance[b]=="function");class _ extends Error{}class y extends Error{}class x extends Error{constructor(w){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+w}}class v 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})}}(mr)),mr}var fn={exports:{}},Po;function Yn(){return Po||(Po=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return a}});const r=T.removeTrailingSlash,s=T.parsePath,a=o=>{if(!o.startsWith("/")||process.env.__NEXT_MANUAL_TRAILING_SLASH)return o;const{pathname:i,query:c,hash:l}=(0,s.parsePath)(o);return process.env.__NEXT_TRAILING_SLASH?/\.[^/]+\/?$/.test(i)?""+(0,r.removeTrailingSlash)(i)+c+l:i.endsWith("/")?""+i+c+l:i+"/"+c+l:""+(0,r.removeTrailingSlash)(i)+c+l};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(fn,fn.exports)),fn.exports}var pr={},hn={exports:{}},wo;function $p(){return wo||(wo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return a}});const r=T.pathHasPrefix,s=process.env.__NEXT_ROUTER_BASEPATH||"";function a(o){return(0,r.pathHasPrefix)(o,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)}(hn,hn.exports)),hn.exports}var No;function wc(){return No||(No=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isLocalURL",{enumerable:!0,get:function(){return s}});const t=Xn(),r=$p();function s(a){if(!(0,t.isAbsoluteUrl)(a))return!0;try{const o=(0,t.getLocationOrigin)(),i=new URL(a,o);return i.origin===o&&(0,r.hasBasePath)(i.pathname)}catch{return!1}}}(pr)),pr}var fr={},hr={},Eo;function Vp(){return Eo||(Eo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getSortedRoutes",{enumerable:!0,get:function(){return r}});class t{insert(a){this._insert(a.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(a){a===void 0&&(a="/");const o=[...this.children.keys()].sort();this.slugName!==null&&o.splice(o.indexOf("[]"),1),this.restSlugName!==null&&o.splice(o.indexOf("[...]"),1),this.optionalRestSlugName!==null&&o.splice(o.indexOf("[[...]]"),1);const i=o.map(c=>this.children.get(c)._smoosh(""+a+c+"/")).reduce((c,l)=>[...c,...l],[]);if(this.slugName!==null&&i.push(...this.children.get("[]")._smoosh(a+"["+this.slugName+"]/")),!this.placeholder){const c=a==="/"?"/":a.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(a+"[..."+this.restSlugName+"]/")),this.optionalRestSlugName!==null&&i.push(...this.children.get("[[...]]")._smoosh(a+"[[..."+this.optionalRestSlugName+"]]/")),i}_insert(a,o,i){if(a.length===0){this.placeholder=!1;return}if(i)throw new Error("Catch-all must be the last part of the URL.");let c=a[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+"').");o.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')}),o.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 "'+a[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 "'+a[0]+'").');m(this.restSlugName,l),this.restSlugName=l,c="[...]"}else{if(u)throw new Error('Optional route parameters are not yet supported ("'+a[0]+'").');m(this.slugName,l),this.slugName=l,c="[]"}}this.children.has(c)||this.children.set(c,new t),this.children.get(c)._insert(a.slice(1),o,i)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function r(s){const a=new t;return s.forEach(o=>a.insert(o)),a.smoosh()}}(hr)),hr}var _r={},gr={},yr={},xr={},Io;function Wp(){return Io||(Io=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ensureLeadingSlash",{enumerable:!0,get:function(){return t}});function t(r){return r.startsWith("/")?r:"/"+r}}(xr)),xr}var vr={},Ro;function Nc(){return Ro||(Ro=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(o,i){for(var c in i)Object.defineProperty(o,c,{enumerable:!0,get:i[c]})}t(e,{DEFAULT_SEGMENT_KEY:function(){return a},PAGE_SEGMENT_KEY:function(){return s},isGroupSegment:function(){return r}});function r(o){return o[0]==="("&&o.endsWith(")")}const s="__PAGE__",a="__DEFAULT__"}(vr)),vr}var To;function Gp(){return To||(To=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 a},normalizeRscURL:function(){return o}});const r=Wp(),s=Nc();function a(i){return(0,r.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 o(i){return i.replace(/\.rsc($|\?)/,"$1")}}(yr)),yr}var Ao;function Ec(){return Ao||(Ao=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 o},isInterceptionRouteAppPath:function(){return a}});const r=Gp(),s=["(..)(..)","(.)","(..)","(...)"];function a(i){return i.split("/").find(c=>s.find(l=>c.startsWith(l)))!==void 0}function o(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,r.normalizeAppPath)(c),l){case"(.)":c==="/"?u=`/${u}`:u=c+"/"+u;break;case"(..)":if(c==="/")throw new Error(`Invalid interception route: ${i}. Cannot use (..) marker at the root level, use (.) instead.`);u=c.split("/").slice(0,-1).concat(u).join("/");break;case"(...)":u="/"+u;break;case"(..)(..)":const 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}}}(gr)),gr}var ko;function Kp(){return ko||(ko=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isDynamicRoute",{enumerable:!0,get:function(){return s}});const t=Ec(),r=/\/\[[^/]+?\](?=\/|$)/;function s(a){return(0,t.isInterceptionRouteAppPath)(a)&&(a=(0,t.extractInterceptionRouteInformation)(a).interceptedRoute),r.test(a)}}(_r)),_r}var Oo;function Xp(){return Oo||(Oo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,o){for(var i in o)Object.defineProperty(a,i,{enumerable:!0,get:o[i]})}t(e,{getSortedRoutes:function(){return r.getSortedRoutes},isDynamicRoute:function(){return s.isDynamicRoute}});const r=Vp(),s=Kp()}(fr)),fr}var br={},jr={},Lo;function Yp(){return Lo||(Lo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getRouteMatcher",{enumerable:!0,get:function(){return r}});const t=Xn();function r(s){let{re:a,groups:o}=s;return i=>{const c=a.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(o).forEach(m=>{const p=o[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}}}(jr)),jr}var Cr={},Sr={},Mo;function Qp(){return Mo||(Mo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"escapeStringRegexp",{enumerable:!0,get:function(){return s}});const t=/[|\\{}()[\]^$+*?.-]/,r=/[|\\{}()[\]^$+*?.-]/g;function s(a){return t.test(a)?a.replace(r,"\\$&"):a}}(Sr)),Sr}var Do;function Zp(){return Do||(Do=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 f},getRouteRegex:function(){return l},parseParameter:function(){return i}});const r=T.constants,s=Ec(),a=Qp(),o=T.removeTrailingSlash;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,o.removeTrailingSlash)(_).slice(1).split("/"),x={};let v=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 x[w]={pos:v++,repeat:P,optional:S},"/"+(0,a.escapeStringRegexp)(j)+"([^/]+?)"}else if(b){const{key:w,repeat:S,optional:P}=i(b[1]);return x[w]={pos:v++,repeat:S,optional:P},S?P?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}else return"/"+(0,a.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:v,routeKeys:C,keyPrefix:j}=_;const{key:b,optional:w,repeat:S}=i(v);let P=b.replace(/\W/g,"");j&&(P=""+j+P);let N=!1;(P.length===0||P.length>30)&&(N=!0),isNaN(parseInt(P.slice(0,1)))||(N=!0),N&&(P=x()),j?C[P]=""+j+b:C[P]=b;const R=y?(0,a.escapeStringRegexp)(y):"";return S?w?"(?:/"+R+"(?<"+P+">.+?))?":"/"+R+"(?<"+P+">.+?)":"/"+R+"(?<"+P+">[^/]+?)"}function p(_,y){const x=(0,o.removeTrailingSlash)(_).slice(1).split("/"),v=u(),C={};return{namedParameterizedRoute:x.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:v,interceptionMarker:S,segment:w[1],routeKeys:C,keyPrefix:y?r.NEXT_INTERCEPTION_MARKER_PREFIX:void 0})}else return w?m({getSafeRouteKey:v,segment:w[1],routeKeys:C,keyPrefix:y?r.NEXT_QUERY_PARAM_PREFIX:void 0}):"/"+(0,a.escapeStringRegexp)(j)}).join(""),routeKeys:C}}function f(_,y){const x=p(_,y);return{...l(_),namedRegex:"^"+x.namedParameterizedRoute+"(?:/)?$",routeKeys:x.routeKeys}}function h(_,y){const{parameterizedRoute:x}=c(_),{catchAll:v=!0}=y;if(x==="/")return{namedRegex:"^/"+(v?".*":"")+"$"};const{namedParameterizedRoute:C}=p(_,!1);let j=v?"(?:(/.*)?)":"";return{namedRegex:"^"+C+j+"$"}}}(Cr)),Cr}var Fo;function Jp(){return Fo||(Fo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"interpolateAs",{enumerable:!0,get:function(){return s}});const t=Yp(),r=Zp();function s(a,o,i){let c="";const l=(0,r.getRouteRegex)(a),u=l.groups,m=(o!==a?(0,t.getRouteMatcher)(l)(o):"")||i;c=a;const p=Object.keys(u);return p.every(f=>{let h=m[f]||"";const{repeat:_,optional:y}=u[f];let x="["+(_?"...":"")+f+"]";return y&&(x=(h?"":"/")+"["+x+"]"),_&&!Array.isArray(h)&&(h=[h]),(y||f in m)&&(c=c.replace(x,_?h.map(v=>encodeURIComponent(v)).join("/"):encodeURIComponent(h))||"/")})||(c=""),{params:p,result:c}}}(br)),br}var zo;function ef(){return zo||(zo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return m}});const r=Cc(),s=Pc(),a=Hp(),o=Xn(),i=Yn(),c=wc(),l=Xp(),u=Jp();function m(p,f,h){let _,y=typeof f=="string"?f:(0,s.formatWithValidation)(f);const x=y.match(/^[a-zA-Z]{1,}:\/\//),v=x?y.slice(x[0].length):y;if((v.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,o.normalizeRepeatedSlashes)(v);y=(x?x[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,r.searchParamsToUrlQuery)(j.searchParams),{result:P,params:N}=(0,u.interpolateAs)(j.pathname,j.pathname,S);P&&(b=(0,s.formatWithValidation)({pathname:P,hash:j.hash,query:(0,a.omit)(S,N)}))}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)}(pn,pn.exports)),pn.exports}var _n={exports:{}},Bo;function tf(){return Bo||(Bo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return s}});const r=Yn(),s=function(a){for(var o=arguments.length,i=new Array(o>1?o-1:0),c=1;c<o;c++)i[c-1]=arguments[c];return process.env.__NEXT_I18N_SUPPORT?(0,r.normalizePathTrailingSlash)(T.addLocale.addLocale(a,...i)):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 Pr={},Uo;function Ic(){return Uo||(Uo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RouterContext",{enumerable:!0,get:function(){return s}});const s=ke._(g).default.createContext(null);process.env.NODE_ENV!=="production"&&(s.displayName="RouterContext")}(Pr)),Pr}var wr={},qo;function Rc(){return qo||(qo=1,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 a},GlobalLayoutRouterContext:function(){return i},LayoutRouterContext:function(){return o},MissingSlotContext:function(){return l},TemplateContext:function(){return c}});const s=ke._(g),a=s.default.createContext(null),o=s.default.createContext(null),i=s.default.createContext(null),c=s.default.createContext(null);process.env.NODE_ENV!=="production"&&(a.displayName="AppRouterContext",o.displayName="LayoutRouterContext",i.displayName="GlobalLayoutRouterContext",c.displayName="TemplateContext");const l=s.default.createContext(new Set)}(wr)),wr}var gn={exports:{}},yn={exports:{}},Ho;function Tc(){return Ho||(Ho=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(o,i){for(var c in i)Object.defineProperty(o,c,{enumerable:!0,get:i[c]})}r(t,{cancelIdleCallback:function(){return a},requestIdleCallback:function(){return s}});const s=typeof self<"u"&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(o){let i=Date.now();return self.setTimeout(function(){o({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-i))}})},1)},a=typeof self<"u"&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(o){return clearTimeout(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 $o;function nf(){return $o||($o=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return u}});const r=g,s=Tc(),a=typeof IntersectionObserver=="function",o=new Map,i=[];function c(m){const p={root:m.root||null,margin:m.rootMargin||""},f=i.find(x=>x.root===p.root&&x.margin===p.margin);let h;if(f&&(h=o.get(f),h))return h;const _=new Map,y=new IntersectionObserver(x=>{x.forEach(v=>{const C=_.get(v.target),j=v.isIntersecting||v.intersectionRatio>0;C&&j&&C(j)})},m);return h={id:p,observer:y,elements:_},i.push(p),o.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(),o.delete(h);const v=i.findIndex(C=>C.root===h.root&&C.margin===h.margin);v>-1&&i.splice(v,1)}}}function u(m){let{rootRef:p,rootMargin:f,disabled:h}=m;const _=h||!a,[y,x]=(0,r.useState)(!1),v=(0,r.useRef)(null),C=(0,r.useCallback)(b=>{v.current=b},[]);(0,r.useEffect)(()=>{if(a){if(_||y)return;const b=v.current;if(b&&b.tagName)return l(b,S=>S&&x(S),{root:p==null?void 0:p.current,rootMargin:f})}else if(!y){const b=(0,s.requestIdleCallback)(()=>x(!0));return()=>(0,s.cancelIdleCallback)(b)}},[_,f,p,y,v.current]);const j=(0,r.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)}(gn,gn.exports)),gn.exports}var xn={exports:{}},vn={exports:{}},Vo;function rf(){return Vo||(Vo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return r}});const r=(s,a)=>process.env.__NEXT_I18N_SUPPORT?T.normalizeLocalePath.normalizeLocalePath(s,a):{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)}(vn,vn.exports)),vn.exports}var bn={exports:{}},Wo;function sf(){return Wo||(Wo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"detectDomainLocale",{enumerable:!0,get:function(){return r}});const r=function(){for(var s=arguments.length,a=new Array(s),o=0;o<s;o++)a[o]=arguments[o];if(process.env.__NEXT_I18N_SUPPORT)return T.detectDomainLocale.detectDomainLocale(...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)}(bn,bn.exports)),bn.exports}var Go;function of(){return Go||(Go=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return a}});const r=Yn(),s=process.env.__NEXT_ROUTER_BASEPATH||"";function a(o,i,c,l){if(process.env.__NEXT_I18N_SUPPORT){const u=rf().normalizeLocalePath,m=sf().detectDomainLocale,p=i||u(o,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,r.normalizePathTrailingSlash)(""+s+_+o)}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)}(xn,xn.exports)),xn.exports}var jn={exports:{}},Ko;function af(){return Ko||(Ko=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return o}});const r=T.addPathPrefix,s=Yn(),a=process.env.__NEXT_ROUTER_BASEPATH||"";function o(i,c){return(0,s.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH&&!c?i:(0,r.addPathPrefix)(i,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)}(jn,jn.exports)),jn.exports}var Cn={exports:{}},Xo;function cf(){return Xo||(Xo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(h,_){for(var y in _)Object.defineProperty(h,y,{enumerable:!0,get:_[y]})}r(t,{ACTION_FAST_REFRESH:function(){return l},ACTION_NAVIGATE:function(){return a},ACTION_PREFETCH:function(){return c},ACTION_REFRESH:function(){return s},ACTION_RESTORE:function(){return o},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",a="navigate",o="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)}(Cn,Cn.exports)),Cn.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return S}});const r=ke,s=n,a=r._(g),o=ef(),i=wc(),c=Pc(),l=Xn(),u=tf(),m=Ic(),p=Rc(),f=nf(),h=of(),_=af(),y=cf(),x=new Set;function v(P,N,R,k,O,M){if(typeof window>"u"||!M&&!(0,i.isLocalURL)(N))return;if(!k.bypassPrefetchedCheck){const D=typeof k.locale<"u"?k.locale:"locale"in P?P.locale:void 0,q=N+"%"+R+"%"+D;if(x.has(q))return;x.add(q)}(async()=>M?P.prefetch(N,O):P.prefetch(N,R,k))().catch(D=>{if(process.env.NODE_ENV!=="production")throw D})}function C(P){const R=P.currentTarget.getAttribute("target");return R&&R!=="_self"||P.metaKey||P.ctrlKey||P.shiftKey||P.altKey||P.nativeEvent&&P.nativeEvent.which===2}function j(P,N,R,k,O,M,X,D,q){const{nodeName:U}=P.currentTarget;if(U.toUpperCase()==="A"&&(C(P)||!q&&!(0,i.isLocalURL)(R)))return;P.preventDefault();const G=()=>{const H=X??!0;"beforePopState"in N?N[O?"replace":"push"](R,k,{shallow:M,locale:D,scroll:H}):N[O?"replace":"push"](k||R,{scroll:H})};q?a.default.startTransition(G):G()}function b(P){return typeof P=="string"?P:(0,c.formatUrl)(P)}const S=a.default.forwardRef(function(N,R){let k;const{href:O,as:M,children:X,prefetch:D=null,passHref:q,replace:U,shallow:Q,scroll:G,locale:H,onClick:J,onMouseEnter:se,onTouchStart:de,legacyBehavior:oe=!1,...le}=N;k=X,oe&&(typeof k=="string"||typeof k=="number")&&(k=(0,s.jsx)("a",{children:k}));const F=a.default.useContext(m.RouterContext),ee=a.default.useContext(p.AppRouterContext),E=F??ee,W=!F,ie=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(
|
|
3
|
-
Open your browser's console to view the Component stack trace.`:"")):new Error("No children were passed to <Link> with `href` of `"+O+"` but one child is required https://nextjs.org/docs/messages/link-no-children")}}else Y=
|
|
4
|
-
Learn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor`);const be=oe?Y&&typeof Y=="object"&&Y.ref:R,[Ie,je,ge]=(0,f.useIntersection)({rootMargin:"200px"}),Ae=a.default.useCallback(z=>{(V.current!==A||Te.current!==I)&&(ge(),V.current=A,Te.current=I),Ie(z),be&&(typeof be=="function"?be(z):typeof be=="object"&&(be.current=z))},[A,be,I,ge,Ie]);a.default.useEffect(()=>{process.env.NODE_ENV==="production"&&E&&(!je||!ie||v(E,I,A,{locale:H},{kind:he},W))},[A,I,je,H,ie,F==null?void 0:F.locale,E,W,he]);const Ce={ref:Ae,onClick(z){if(process.env.NODE_ENV!=="production"&&!z)throw new Error('Component rendered inside next/link has to pass click event to "onClick" prop.');!oe&&typeof J=="function"&&J(z),oe&&Y.props&&typeof Y.props.onClick=="function"&&Y.props.onClick(z),E&&(z.defaultPrevented||j(z,E,I,A,U,Q,G,H,W))},onMouseEnter(z){!oe&&typeof se=="function"&&se(z),oe&&Y.props&&typeof Y.props.onMouseEnter=="function"&&Y.props.onMouseEnter(z),E&&((!ie||process.env.NODE_ENV==="development")&&W||v(E,I,A,{locale:H,priority:!0,bypassPrefetchedCheck:!0},{kind:he},W))},onTouchStart:process.env.__NEXT_LINK_NO_TOUCH_START?void 0:function(pe){!oe&&typeof de=="function"&&de(pe),oe&&Y.props&&typeof Y.props.onTouchStart=="function"&&Y.props.onTouchStart(pe),E&&(!ie&&W||v(E,I,A,{locale:H,priority:!0,bypassPrefetchedCheck:!0},{kind:he},W))}};if((0,l.isAbsoluteUrl)(A))Ce.href=A;else if(!oe||q||Y.type==="a"&&!("href"in Y.props)){const z=typeof H<"u"?H:F==null?void 0:F.locale,pe=(F==null?void 0:F.isLocaleDomain)&&(0,h.getDomainLocale)(A,z,F==null?void 0:F.locales,F==null?void 0:F.domainLocales);Ce.href=pe||(0,_.addBasePath)((0,u.addLocale)(A,z,F==null?void 0:F.defaultLocale))}return oe?a.default.cloneElement(Y,Ce):(0,s.jsx)("a",{...le,...Ce,children:k})});(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 lf=ts.exports,uf=lf;const Fe=T.getDefaultExportFromCjs(uf),df="_link_w24h0_1",mf="_wrapper_w24h0_98",pf="_text_w24h0_106",Nr={link:df,wrapper:mf,text:pf},Oe=({children:e,adornments:t,className:r,disableUnderline:s,href:a,mode:o,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:o,fallback:"default"});return n.jsx(Fe,{...m,className:d.helpers.classNameConcat(Nr.link,r),href:a&&a.length>0?a:"#","data-size":p,"data-variant":f,title:c||"NextLink","data-disable-underline":s??!1,"data-disable-padding":u??!0,children:n.jsxs("div",{className:Nr.wrapper,onClick:l,children:[t==null?void 0:t.start,n.jsx("p",{className:Nr.text,"data-size":p,children:e}),t==null?void 0:t.end]})})},ff=({ICONS:e})=>{const{resetFeedback:t}=Nt();return n.jsxs("div",{className:Xt["wishlist--snack--actions"],children:[n.jsx(Oe,{href:"/favoritos",children:"Ver Favoritos"}),n.jsx(d.Button,{variant:"tertiary",size:"small",onClick:t,adornment:{start:n.jsx(d.Icon,{name:e.close})}})]})},Xs=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:r})=>{const s=Ls(),{resetFeedback:a}=Nt(),o=g.useRef(null);return g.useEffect(()=>{o.current&&clearTimeout(o.current),s&&(o.current=setTimeout(()=>{a()},5e3))},[s,a]),(s==null?void 0:s.active)&&n.jsx(Lt,{Z_INDEX_WAR:r,className:Xt["wishlist--snack"],"data-action":s.action,title:s.action==="add"?e.messages.add:e.messages.remove,supportChildren:n.jsx(ff,{ICONS:t}),size:"medium"})};Xs.displayName="WishList.Feedback";const Ys={"product-list--banner":"_product-list--banner_sfibj_1","product-list--card":"_product-list--card_sfibj_30","product-list":"_product-list_sfibj_1"},Ac=({className:e,children:t,columns:r=1,isMobile:s=!1,gap:a=8,position_grid:o,totalColumns:i=4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,...l})=>{const u=g.useMemo(()=>r%i===0?"initial":s||r<2?c:c.split("/").reverse().join("/"),[r,i,s]);return n.jsx("div",{...l,className:d.helpers.classNameConcat(Ys["product-list--banner"],e),style:{aspectRatio:u,maxWidth:`${r/i*100}%`,order:o,padding:a/2},children:t})};Ac.displayName="ProductList.Banner";class hf{constructor(){gt(this,"cache",new Map);gt(this,"pendingRequests",new Map);gt(this,"rafId",null)}request(t,r,s){const a=this.getCacheKey(t,s==null?void 0:s.filterTexture);if(this.cache.has(a)){r(this.cache.get(a));return}const o=this.pendingRequests.get(a);o?o.callbacks.push(r):this.pendingRequests.set(a,{productId:t,callbacks:[r],filterTexture:s.filterTexture}),this.rafId===null&&(this.rafId=requestAnimationFrame(()=>this.executeGroup()))}getCacheKey(t,r){return r!=null&&r.length?`${t}|${r.sort().join(",")}`:t}async executeGroup(){this.rafId=null;const t=this.pendingRequests;if(t.size===0)return;const r=[],s=[];if(t.forEach((o,i)=>{this.cache.has(i)?s.push([i,o]):r.push(o)}),s.forEach(([o,i])=>{const c=this.cache.get(o);c&&i.callbacks.forEach(l=>l(c)),t.delete(o)}),r.length===0)return;const a=new Map;r.forEach(o=>{var l;const i=((l=o.filterTexture)==null?void 0:l.sort().join(","))||"no-filter",c=a.get(i)||[];c.push(o),a.set(i,c)}),await Promise.all(Array.from(a.values()).map(o=>this.executeGroupRequest(o)))}async executeGroupRequest(t){const r=t.map(a=>a.productId),s=t[0].filterTexture;try{const a=await T.fetchProxy("/_v/proxy/catalog/product/similars",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:r})});if(!a.ok)throw new Error("Erro ao buscar similares.");const o=await a.json();t.forEach(i=>{const c=o[i.productId]||[],l=s&&c.length?T.formattedSimilars(c,s):c,u=this.getCacheKey(i.productId,s);this.cache.set(u,l),i.callbacks.forEach(m=>m(l)),this.pendingRequests.delete(u)})}catch(a){console.error("Erro ao buscar similares:",a),t.forEach(o=>{const i=this.getCacheKey(o.productId,s);o.callbacks.forEach(c=>c([])),this.pendingRequests.delete(i)})}}clearCache(){this.cache.clear()}}const Yo=new hf;function Qs(e,t){const[r,s]=g.useState([]),a=g.useRef(!1);g.useEffect(()=>{a.current=!1},[e]);const o=g.useCallback(()=>{!e||a.current||(a.current=!0,Yo.request(e,s,t))},[e,t]),i=g.useCallback(()=>Yo.clearCache(),[]);return{items:r,loadSimilars:o,clearCache:i}}const kc=({isKit:e,parent:t,productId:r,setNotify:s,CONSTANTS:a})=>{const{router:o}=ce(),{items:i,loadSimilars:c}=Qs(r,{filterTexture:a.TEXTURE_IMAGE}),l=g.useRef(!1),u=g.useRef(null),m=h=>o.push(h??""),p=g.useCallback(h=>{!r||!h||c()},[r,c]),f=g.useCallback((h,_)=>{if(!h.isIntersecting){a.PLP_INFINITE_SCROLL&&u.current&&(clearTimeout(u.current),u.current=null);return}if(h.intersectionRatio>=_.threshold&&!l.current){if(a.PLP_INFINITE_SCROLL){u.current=setTimeout(()=>{p(!0)},a.PLP_PRODUCT_SIMILAR_DELAY);return}p(!0)}},[p]);return g.useEffect(()=>{if(e||!t.current)return;const h={root:null,threshold:.1},_=new IntersectionObserver(([y])=>{f(y,h)},h);return _.observe(t.current),()=>{u.current&&clearTimeout(u.current),_.disconnect()}},[f,t,e]),n.jsx(fe.Actions,{data:i,callback:m,isKit:e,children:!e&&n.jsx(fe.SizeSelector,{setNotify:s,PLP_SIZE_ORDER:a.PLP_SIZE_ORDER})})};kc.displayName="ProductList.Card.Actions";const Oc=({className:e,children:t,gap:r=32,item:s,isMobile:a,order:o,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((v,C)=>{var j;typeof u=="function"&&u((j=v.isVariantOf)==null?void 0:j.hasVariant,C)},[u]),x=s.name.substring(0,4).toLowerCase()==="kit ";return n.jsxs("div",{...f,className:d.helpers.classNameConcat(Ys["product-list--card"],e),"data-mobile":a,"data-order":o,ref:h,style:{...c&&{maxWidth:a?"50%":"25%"},order:o,padding:r/2},children:[n.jsxs(fe.Root,{item:s,isMobile:a,index:l,size:a?"small":"medium",order:o,outStock:!_,CONSTANTS:p,children:[n.jsx(fe.Header,{product:s,tag:i==null?void 0:i.commercial}),n.jsx(fe.Media,{showVideo:m,hasPriority:!0}),n.jsxs(fe.Wrapper,{type:"body",children:[n.jsx(fe.Title,{tag:i==null?void 0:i.institucional}),n.jsx(kc,{productId:s.isVariantOf.productGroupID,parent:h,setNotify:y,isKit:x,CONSTANTS:p}),!x&&n.jsx(fe.OutStock,{callback:y})]}),n.jsx(fe.Wrapper,{type:"footer",children:_&&n.jsx(fe.BuyButton,{isKit:x})})]}),t]})};Oc.displayName="ProductList.Card";const Lc=({children:e,className:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat(Ys["product-list"],t),children:e});Lc.displayName="ProductList.Grid";const st={Banner:Ac,Card:Oc,Root:Lc,helpers:mp},_f="_pdc_alo7z_1",Ge={"pdc--empty":"_pdc--empty_alo7z_1","pdc--grid":"_pdc--grid_alo7z_17","pdc--grid--content":"_pdc--grid--content_alo7z_26","pdc--infinite":"_pdc--infinite_alo7z_41","pdc--infinite--loader":"_pdc--infinite--loader_alo7z_44","pdc--infinite--loader--page":"_pdc--infinite--loader--page_alo7z_54","pdc--infinite--card--disabled":"_pdc--infinite--card--disabled_alo7z_58","pdc--infinite--next-page":"_pdc--infinite--next-page_alo7z_91","pdc--infinite--next-page--card":"_pdc--infinite--next-page--card_alo7z_101","pdc--infinite--next-page--spinner":"_pdc--infinite--next-page--spinner_alo7z_111","pdc--pagination":"_pdc--pagination_alo7z_118",pdc:_f},Zs=({className:e,ICONS:t,PLP_NOT_RESULT:r})=>{const{router:s}=ce(),{isMobile:a}=ne(),o=()=>{s.push(r==null?void 0:r.link)};return n.jsxs("div",{className:d.helpers.classNameConcat(Ge["pdc--empty"],e),children:[n.jsxs(d.TextStructure.DivWrapper,{className:Ge["pdc--empty-wrapper"],children:[n.jsx("span",{className:a?"typography-style-body-md":"typography-style-heading-sm",children:r.title}),n.jsx("p",{className:a?"typography-style-body-xs":"typography-style-body-sm",children:r.subtitle})]}),n.jsx(d.Button,{adornment:{end:n.jsx(d.Icon,{name:t.arrow_right})},className:"typography-style-body-sm-strong",onClick:()=>o(),variant:"tertiary",children:n.jsx("b",{children:r.text})})]})};Zs.displayName="PDC.Empty";const Qn=e=>n.jsx("div",{...e,className:Ge["pdc--infinite--next-page"],children:n.jsx(d.Spinner,{className:Ge["pdc--infinite--next-page--spinner"]})});Qn.displayName="PDC.Spinner";function Mc({CONSTANTS:e}){const{sendDataLayerEvent:t}=ae(),{isMobile:r}=ne(),{getAvailableProductTag:s}=_t(),[a,o]=g.useState([]),[i,c]=g.useState(!0),l=zt(),u=l.join(","),m=r?16:32;return g.useEffect(()=>{const p=async()=>{l.length?await fetch("/api/wishlist/products",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({productIds:l})}).then(f=>f.json()).then(f=>{o(f),t({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:f}}})}).catch(f=>console.error(f)):o([]),c(!1)};if(l.length){p();return}if(l.length===0&&a.length===0){c(!1);return}o([]),c(!1)},[u]),n.jsx("section",{className:Xt["wishlist-grid"],children:n.jsxs("div",{className:Xt["wishlist-grid--container"],children:[i&&n.jsx(Qn,{}),!l.length&&!(a!=null&&a.length)&&!i&&n.jsx(Zs,{className:Xt["pdc-empty-modifier"],ICONS:e.ICONS,PLP_NOT_RESULT:e.WISHLIST_NOT_RESULT}),n.jsx(st.Root,{children:Array.isArray(a)&&a.map((p,f)=>{const h=p.node.cluster.highlights||[],_=s(h);return n.jsx(st.Card,{gap:m,isMobile:r??!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)})})]})})}Mc.displayName="Wishlist.Grid";const gf=e=>e.map(t=>{var r;return(r=t.isVariantOf)==null?void 0:r.productGroupID})??[],Dc=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:r})=>{const s=Bt(),a=zt(),o=Ls(),{updateList:i}=Nt();return g.useEffect(()=>{var l,u;o.active&&Qe.set("fs::wishlist",a);const c=async()=>{var m;await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:a,docId:(m=s==null?void 0:s.user)==null?void 0:m.id})}).catch(p=>{console.error("Error updating wishlist:",p)})};o.active&&((l=s.user)!=null&&l.id)&&a.length!==((u=s.wishlist)==null?void 0:u.length)&&c()},[o,s,a]),g.useEffect(()=>{var u;const c=async()=>{const m=await Qe.get("fs::wishlist");m&&(m==null?void 0:m.length)!==a.length&&i(m)},l=async()=>{var h;const m=await Qe.get("fs::wishlist")??[],p=s.wishlist?typeof s.wishlist[0]=="object"?gf(s.wishlist):s.wishlist:[],f=[...new Set([...m,...p])];i(f),Qe.set("fs::wishlist",f),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]),n.jsx(Xs,{ICONS:t,Z_INDEX_WAR:r,WISHLIST_INFO:e})};Dc.displayName="Wishlist.Init";const Fc=({product:e,priceInfo:t,size:r="medium",style:s,ICONS:a})=>{const{sendDataLayerEvent:o,currentLocalRef:i}=ae(),c=zt(),{toggleProduct:l}=Nt(),{isVariantOf:{productGroupID:u}}=e;return n.jsx(d.Button,{adornment:{start:n.jsx(d.Icon,{size:r,name:c.includes(u)?a.favorite_true:a.favorite_false})},onClick:()=>{l(u),o({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"})};Fc.displayName="WishList.Toggle";const zc={Feedback:Xs,Toggle:Fc,Grid:Mc,Init:Dc},Bc=({product:e,tag:t,size:r="small"})=>{const{CONSTANTS:s}=Ke(),{tags:a}=_t(),o=e.offers.offers[0],i=T.getDiscountPercent(o.listPrice,o.price),c=a==null?void 0:a.flagDiscount;return n.jsxs(fe.Wrapper,{type:"header",style:{zIndex:s.Z_INDEX_WAR.product_card_header},children:[i>0&&!t&&(c==null?void 0:c.enableTag)&&n.jsxs(d.Tag,{title:`${i}% ${c==null?void 0:c.tagText}`,variant:"quaternary",size:"small",style:{background:c==null?void 0:c.tagColor,color:c==null?void 0:c.tagTextColor},children:[i,"% ",c==null?void 0:c.tagText]}),t?n.jsx(d.Tag,{title:t.value,adornment:{start:t.enableIcon&&t.icon?n.jsx(d.Icon,{name:t.icon,size:"small",style:{color:t.iconColor}}):null},size:r,variant:"quaternary",style:{background:t.tagColor,color:t.textColor},children:t.value}):null,s.PRODUCT_CARD_TOP_WISHLIST_TOGGLE&&n.jsx(zc.Toggle,{product:e,priceInfo:{price:o.price,listPrice:o.listPrice},variant:"card",ICONS:s.ICONS})]})};Bc.displayName="ProductCard.Actions.Header";const Uc=({className:e,children:t,hasPriority:r=!1,showVideo:s=!1,...a})=>{const{element:o,index:i,item:{image:c,slug:l,video:u},sendSelectItemEvent:m,order:p,CONSTANTS:f}=Ke(),h=T.getFirstImages({images:c,label:{first:f.MAIN_IMAGE,second:f.SECOND_IMAGE}});return n.jsxs("div",{...a,className:d.helpers.classNameConcat(Re["product-card--image"],e),ref:o,style:{aspectRatio:f.PRODUCT_CARD_IMAGE_ASPECT_RATIO},children:[n.jsx(Fe,{href:`/${l}/p`,onClick:m,onMouseUp:_=>{_.button===1&&m(),f.PLP_INFINITE_SCROLL&&sessionStorage.setItem(f.PLP_GRID_SCROLL_BACK.order,String(p))},children:n.jsx("div",{className:Re["product-card--image--container"],children:Array.isArray(h)&&h.map(({url:_,alternateName:y},x)=>g.createElement(we.Image,{...f.PRODUCT_IMAGE_DIMENSIONS.product_card,style:f.PRODUCT_IMAGE_DIMENSIONS.product_card,alt:y??"product image",key:x,...r&&{priority:x===0&&i<4},objectFit:"cover",src:_}))})}),f.PLP_SHOW_VIDEO_ON_PRODUCT_CARD&&s&&u&&n.jsx(fe.Video,{url:u,poster:h[0].url}),t]})};Uc.displayName="ProductCard.Media.Media";const qc=({className:e,callback:t,children:r,...s})=>{const{isMobile:a,item:o,CONSTANTS:{PRODUCT_CARD_TEXTS:i}}=Ke(),{availability:{status:c}}=o;return c?null:n.jsxs("div",{...s,className:d.helpers.classNameConcat(Re["product-card--outstock"],e),children:[n.jsx(d.Tag,{size:"small",variant:"secondary",title:i.disabled,children:i.disabled}),n.jsx(d.Button,{className:d.helpers.classNameConcat(e,"buy-button"),size:a?"medium":"large",variant:"quaternary",onClick:()=>{typeof t=="function"&&t(o)},children:i.notify})]})};qc.displayName="ProductCard.OutStock";const Hc=({children:e,className:t="",index:r,isMobile:s=!1,item:a,size:o,order:i,outStock:c,shelfTitle:l,CONSTANTS:u,...m})=>n.jsx(zp,{item:a,isMobile:s,outStock:c,order:i,size:o,index:r,shelfTitle:l,CONSTANTS:u,children:n.jsx("div",{...m,className:d.helpers.classNameConcat(Re["product-card--wrapper"],t),"data-size":o,children:e})});Hc.displayName="ProductCard.Root";const $c=({disabled:e,label:t,size:r,value:s,onClick:a,...o})=>n.jsxs(d.ToggleSize.Wrapper,{...o,disabled:!1,outOfStock:e,size:r,onClick:a,children:[n.jsx(d.ToggleSize.DisabledAdornment,{}),n.jsx(d.ToggleSize.Text,{children:t})]});$c.displayName="ProductCard.SizeSelector.Item";const Vc=({active:e=!1,callback:t,selectedSku:r=null,item:s,setNotify:a})=>{const{item:o,isMobile:i,setSelectedSku:c,eventDataRef:l}=Ke();s.productId=o.id;const u=T.disableSKU(s),m=T.getSKUName(s,"tamanho");!u&&!l.current.availableSkus.includes(m)&&l.current.availableSkus.push(m);const p=g.useCallback(h=>{const _=r===h?null:h;typeof c=="function"&&c(_),typeof t=="function"&&t(_)},[t,c,r]),f=g.useCallback(()=>{if(u&&typeof a=="function"){a(o,s);return}p(s)},[s,a,p,u,o]);return n.jsx($c,{active:e,disabled:u,label:m,onClick:()=>f(),size:i?"x-small":"small",value:s})};Vc.displayName="ProductCard.SizeSelector.SkuItem";const Wc=({items:e,getLabel:t,PLP_SIZE_ORDER:r})=>Array.isArray(e)?[...e].sort((s,a)=>{const o=t(s).toUpperCase(),i=t(a).toUpperCase(),c=r.indexOf(o)-r.indexOf(i);return c!==0?c:o.localeCompare(i,"pt-BR")}):[],Gc=({callback:e,className:t="",children:r,setNotify:s,PLP_SIZE_ORDER:a,...o})=>{const{isMobile:i,item:{isVariantOf:{hasVariant:c}},selectedSku:l}=Ke(),u=g.useMemo(()=>Array.isArray(c)?Wc({items:c,getLabel:m=>T.getSKUName(m,"tamanho"),PLP_SIZE_ORDER:a}):[],[c]);return n.jsxs("div",{...o,className:d.helpers.classNameConcat(Re["product-card--selectors--size"],t),"data-mobile":i,children:[n.jsx("div",{className:Re["product-card--selectors--size--skus"],children:u.map((m,p)=>n.jsx(Vc,{active:l===m,callback:e,item:m,selectedSku:l,setNotify:s},`size--${p}--${m.sku}`))}),n.jsx("div",{className:Re["product-card--selectors--size--button"],children:r})]})};Gc.displayName="ProductCard.SizeSelector";const ns=({alt:e="",callback:t,more:r,total:s=4,src:a,url:o,...i})=>n.jsxs(d.ToggleStyle.Wrapper,{...i,onClick:()=>{typeof t=="function"&&t(o)},children:[n.jsx(d.ToggleStyle.DisabledAdornment,{}),n.jsxs(d.ToggleStyle.Texture,{children:[a&&n.jsx(we.Image,{alt:e??a,src:a,height:34,width:34}),r&&n.jsx(d.TextStructure.DivWrapper,{className:Re["product-card--selectors--style--more"],children:n.jsxs("p",{children:["+ ",s]})})]})]}),yf=({children:e,callback:t,data:r,total:s=4,size:a,...o})=>{const{index:i}=Ke(),{triggerSelectItemEventRef:c}=ae();return n.jsxs("div",{...o,children:[e,Array.isArray(r)&&r.slice(0,s).map((l,u)=>n.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:a},u)),Array.isArray(r)&&(r==null?void 0:r.length)>s&&n.jsx(ns,{size:a,total:r.length-s,more:!0})]})},Kc=({callback:e,className:t,data:r,images:s=[],findTexture:a,...o})=>{const{CONSTANTS:i}=Ke(),c=a||i.TEXTURE_IMAGE,l=s==null?void 0:s.find(u=>c.includes(u.alternateName));return n.jsx(yf,{...o,callback:e,className:d.helpers.classNameConcat(Re["product-card--selectors--style"],t),data:r,size:"x-small",children:l&&n.jsx(ns,{active:!0,size:"x-small",src:l.url})})};Kc.displayName="ProductCard.StyleSelector";const Xc=({className:e,hasDecimal:t,...r})=>{const{isMobile:s,item:{offers:{lowPrice:a,highPrice:o},installments:{count:i,value:c}},eventDataRef:l}=Ke();l.current.priceInfo={price:a,listPrice:o};const u=T.formatPriceToCurrency(o,t),m=T.formatPriceToCurrency(a,t),p=T.formatPriceToCurrency(c??0),f=s?"horizontal":"stacked";return n.jsx("div",{...r,className:d.helpers.classNameConcat(Re["product-card--price"],e),"data-mobile":s,children:n.jsx(d.ProductInfo.Root,{size:"small",layout:f,children:n.jsxs(d.ProductInfo.Wrapper,{size:"small",layout:f,children:[n.jsx(d.ProductInfo.ValuesWrapper,{children:m!==u?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:u,size:"small"}),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:m,size:"small"})]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:m,size:"small"})}),i&&i>1&&c?n.jsx(d.ProductInfo.Price,{label:"installment",value:`${i}x ${p}`,size:"small"}):null]})})})};Xc.displayName="ProductCard.Price";const Yc=({tag:e,className:t})=>{const{item:{name:r}}=Ke();return n.jsxs("div",{className:d.helpers.classNameConcat(Re["product-card--title"],t),children:[n.jsx("div",{className:Re["product-card--title--tag"],children:e?n.jsx(d.Tag,{size:"small",title:e.value,variant:"quaternary",adornment:{start:e.enableIcon&&e.icon?n.jsx(d.Icon,{name:e.icon,style:{color:e.iconColor}}):null},style:{background:e.tagColor,color:e.textColor},children:e.value}):n.jsx("div",{})}),n.jsx("div",{className:Re["product-card--title--content"],children:r&&n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h3",{children:r})})})})]})};Yc.displayName="ProductCard.Title";const Qc=({className:e,url:t,poster:r,...s})=>{const{element:a}=Ke();return g.useEffect(()=>{if(!(a!=null&&a.current))return;const o=a.current,i=o.querySelector("video");if(i){const c=new IntersectionObserver(m=>{m.forEach(p=>{T.setVideoPlay(p.isIntersecting,i,t)})},{root:null,rootMargin:"0px",threshold:.5}),l=()=>{i.setAttribute("data-loaded","true")},u=()=>{o&&(c.observe(o),i.addEventListener("loadeddata",l))};return document.readyState==="complete"?u():window.addEventListener("load",u),()=>{c.disconnect(),window.removeEventListener("load",u)}}return()=>null},[t,a]),n.jsx("div",{...s,className:d.helpers.classNameConcat(Re["product-card--video"],e),children:t&&n.jsx(we.Video,{autoPlay:!1,muted:!0,loop:!0,preload:"none",playsInline:!0,poster:r})})};Qc.displayName="ProductCard.Media.Video";const Zc=({children:e,className:t,type:r,...s})=>n.jsx("div",{...s,className:d.helpers.classNameConcat(Re[`product-card--${r}`],t),children:e});Zc.displayName="ProductCard.Wrapper";const fe={Actions:bc,BuyButton:jc,Header:Bc,Media:Uc,Root:Hc,OutStock:qc,Price:Xc,SizeSelector:Gc,StyleSelector:Kc,Title:Yc,Video:Qc,Wrapper:Zc},xf="_carousel_1egdv_1",vf="_shelf__container_1egdv_14",bf="_shelf_without_carousel_1egdv_34",jf="_card_container_1egdv_57",At={carousel:xf,"custom-controllers":"_custom-controllers_1egdv_5",shelf__container:vf,"controllers-arrows-bullets":"_controllers-arrows-bullets_1egdv_23",shelf_without_carousel:bf,card_container:jf},Qo=({title:e})=>n.jsx("div",{className:At.shelf__container,children:e&&n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h2",{className:d.helpers.classNameConcat("typography-style-body-md",T.responsive["responsive-mobile-flex"]),children:e}),n.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-md",T.responsive["responsive-desktop-flex"]),children:e})]})})}),Cf=({children:e,ICONS:t,itemsPerPage:r,title:s})=>{const{isMobile:a}=ne(),o=r[a?"mobile":"desktop"],{initialize:i,controller:c,itemsStyles:l,pagination:u}=d.Carousel.useCarousel({itemsPerPage:o,gap:10,loop:!0,direction:"row"}),m=g.Children.toArray(e).length;return a||m>=4?n.jsxs(d.Carousel.Root,{innerRef:f=>{i(f)},className:At.carousel,children:[n.jsxs("div",{className:At["custom-controllers"],children:[s&&n.jsx(Qo,{title:s}),o<m&&n.jsxs(d.Carousel.Controller,{className:At["controllers-arrows-bullets"],children:[n.jsxs(d.Carousel.Arrows,{children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:n.jsx(d.Icon,{name:t.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:n.jsx(d.Icon,{name:t.arrow_right})}})]}),!a&&o>2&&n.jsx(d.Carousel.Bullets,{page:u.currentPage,total:u.totalPages,onBulletClick:f=>c==null?void 0:c.navigateTo(f)})]})]}),n.jsx(d.Carousel.Body,{children:g.Children.map(e,(f,h)=>n.jsx(d.Carousel.Item,{style:{...l,overflow:"hidden"},children:f},`${s}_${h}`))})]}):n.jsxs(n.Fragment,{children:[s&&n.jsx(Qo,{title:s}),n.jsx("div",{className:At.shelf_without_carousel,children:e})]})},Jc=({className:e,item:t,isMobile:r,size:s,shelfTitle:a,...o})=>{const i=g.useRef(null),{getAvailableProductTag:c}=_t(),{availability:{status:l}}=t,u=p=>{const f=p.filter(h=>!o.CONSTANTS.TEXTURE_IMAGE.includes(h.keywords));return r?f.splice(0,2):f},m=c(t.cluster.highlights);return n.jsx("div",{ref:i,className:At.card_container,children:n.jsxs(fe.Root,{...o,item:{...t,image:u(t.image)},isMobile:r,size:r?"small":"medium",outStock:!l,shelfTitle:a,children:[n.jsx(fe.Header,{product:t,tag:m==null?void 0:m.commercial}),n.jsx(fe.Media,{}),n.jsxs(fe.Wrapper,{type:"body",children:[n.jsx(fe.Title,{tag:m==null?void 0:m.institucional}),n.jsx(fe.Actions,{})]}),n.jsx(fe.Wrapper,{type:"footer"})]})})};Jc.displayName="ProductList.Card";const Jt={Shelf:Cf,Card:Jc},el=({CONSTANTS:e,inView:t,products:r,innerRef:s})=>{const a=g.useMemo(()=>Dp(r),[r]),{isMobile:o}=ne(),{addItemsToCart:i}=ve(),{sendDataLayerEvent:c}=ae(),{getAvailableProductTag:l}=_t(),[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=a.find(x=>x.node.id===_.productId);return y==null?void 0:y.node})},supportData:{selectedSkus:h,price:u.totalPrice}}})},f=({selectedProduct:h,productId:_})=>{const y=Fp({selectedProduct:h,productId:_,prevState:u,mainSellerId:e.StoreConfig_MainSellerId});m(y)};return g.useEffect(()=>{if(!t||a.length===0)return;const h=e.BUY_PACKAGE.header.title;c({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:a},customData:{item_list_name:h},outsideEcommerceData:{item_list_name:h}}})},[t]),n.jsxs("div",{className:pt.container,ref:s,children:[n.jsx("div",{className:pt["carousel-container"],style:{width:a.length<=3?"max-content":"75%"},children:n.jsx(Jt.Shelf,{title:e.BUY_PACKAGE.header.title,itemsPerPage:{desktop:3,mobile:a.length>=3?2.2:a.length},ICONS:e.ICONS,children:Array.isArray(a)&&a.map(({node:h},_)=>{var v,C,j;const y=l(h.cluster.highlights),{availability:{status:x}}=h;return x?n.jsxs(fe.Root,{item:{...h,image:Gs.helpers.product.getFirstImages({images:h.image,label:{first:e.MAIN_IMAGE,second:e.SECOND_IMAGE}})},isMobile:o,size:"medium",index:_,shelfTitle:e.BUY_PACKAGE.header.title,CONSTANTS:e,children:[n.jsx(fe.Header,{product:h,tag:y.commercial}),n.jsx(fe.Media,{}),n.jsxs(fe.Wrapper,{type:"body",children:[n.jsx(fe.Title,{tag:{value:(v=y.institucional)==null?void 0:v.value,enableIcon:(C=y.institucional)==null?void 0:C.enableIcon,icon:(j=y.institucional)==null?void 0:j.icon}}),n.jsx(fe.Actions,{children:n.jsx(fe.SizeSelector,{callback:b=>f({selectedProduct:b,productId:h.id}),PLP_SIZE_ORDER:e.PLP_SIZE_ORDER})})]})]},h.id):null})})}),n.jsx("div",{className:pt["add-cart-container"],children:n.jsx(Mp,{handleAddAllToCart:p,selectedProducts:u,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,BUY_PACKAGE:e.BUY_PACKAGE,FREIGHT_CALCULATION:e.FREIGHT_CALCULATION}})})]})},Js={"btn-login":"_btn-login_yas63_12","btn-header":"_btn-header_yas63_22","header-animation":"_header-animation_yas63_35"},eo=({id:e})=>{const{setIsOpen:t,cartStore:{items:r}}=ve(),{handleSelectContent:s}=ae(),{CONSTANTS:a}=Ne(),o=r.reduce((i,c)=>i+(c.quantity??0),0);return n.jsx(d.Header.SupportItem,{onClick:()=>{t(!0),s({content:"header:minicart"})},id:e,children:n.jsxs(d.Badge.AutoPositioner,{children:[n.jsx(d.Badge.Count,{count:o,size:"medium",variant:"primary",style:{backgroundColor:"black",display:o>0?"flex":"none"}}),n.jsx(d.Icon,{name:a.header.ICONS.bag,size:"medium"})]})})};eo.displayName="Header.Bag";const an=({children:e,href:t,...r})=>t&&t!=="#"?n.jsx(Fe,{href:t.startsWith("/")?t:`/${t}`,...r,children:e}):e,tl=()=>{const{headerData:e}=Ne(),{handleSelectContent:t}=ae(),{reset:r,updateValue:s}=rn(),a=o=>{o?s(o):r()};return n.jsx(d.Header.Categories,{children:Array.isArray(e.categories)&&e.categories.map((o,i)=>n.jsx(an,{href:o.link,onMouseEnter:()=>a(o.submenuId),onFocus:()=>a(o.submenuId),children:n.jsx(d.Header.CategoryItem,{className:Js["btn-header"],value:o.submenuId??null,adornment:{start:n.jsx(d.Icon,{name:o.iconStart}),end:n.jsx(d.Icon,{name:o.iconEnd})},style:{textWrap:"nowrap",gap:"0"},onClick:()=>{t({content:`header:${o.label}`})},children:o.label})},`category-${o.label}-${i}`))})};tl.displayName="Header.Categories";function Sf(){const{handleSelectContent:e}=ae(),{CONSTANTS:t}=Ne(),{setValue:r}=$n();return n.jsx(d.Header.SupportItem,{onClick:()=>{r(!0),e({content:"header:search"})},children:n.jsx(d.Icon,{name:t.header.ICONS.search,size:"medium"})})}const Pf={"menu-subcategories-container":"_menu-subcategories-container_a93cr_1"},wf={"observer-wrapper":"_observer-wrapper_r43gk_1"},Zn=({children:e,eventData:t,observerOptions:r,callBackWhenVisible:s,stopOnIntersection:a=!0,className:o,...i})=>{const c=g.useRef(null),l=Es(c,a,r),{sendDataLayerEvent:u}=ae();return g.useEffect(()=>{l&&(typeof s=="function"&&s(),t&&u({...t}))},[l]),n.jsx("div",{...i,ref:c,className:d.helpers.classNameConcat(wf["observer-wrapper"],o),children:e})},nl=({thumbnails:e,category:t,isMobile:r=!0,callBack:s})=>{const{handleSelectPromotionEvent:a}=ae(),o=50/e.length;return n.jsx("div",{className:Pf["menu-subcategories-container"],children:e.map((i,c)=>{const l=r?i.srcMobile:i.srcDesk;if(!l)return null;const u={creative_name:"banner-menu",creative_slot:`banner-menu:${t}:${c+1}`,promotion_id:l,promotion_name:i.promotion_name};return n.jsx(Zn,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...u}}}},observerOptions:{delay:1e3},children:n.jsxs(Fe,{href:i.link??"#",onClick:()=>{typeof s=="function"&&s(),a({updatePromotionRef:!0,promotion:u})},children:[n.jsx(we.Image,{src:l,alt:i.label??l,width:500,height:500,sizes:`(max-width: 768px) 100vw, (max-width: 1023px) 75vw, ${o}vw`}),i.label&&n.jsx("p",{children:i.label})]})},`thumb-${i.label}-${c}`)})})};nl.displayName="Menu.Thumbnail";const rs={"menu-desktop":"_menu-desktop_1b799_1","menu-categories":"_menu-categories_1b799_12"},rl=({children:e,dividerOnRight:t=!0,subMenu:r,...s})=>{var l;const{router:a}=ce(),{reset:o}=rn(),{handleSelectContent:i}=ae(),{CONSTANTS:c}=Ne();return n.jsxs("div",{...s,className:rs["menu-categories"],children:[(l=r==null?void 0:r.subCategories)==null?void 0:l.map((u,m)=>{var h,_,y,x;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:n.jsx(d.Icon,{name:c.header.ICONS.arrow_right,size:"small"})}};return n.jsxs(d.ComponentList.Structure,{children:[n.jsx(an,{href:u.linkLabel,title:u.label,onClick:()=>{u.linkLabel&&(o(),i({content:`menu:${u.label??""}:${r.label??""}`}))},children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h2",{children:u.label})})})}),n.jsx(d.ComponentList.List,{columns:1,...p,className:rs["submenu-categories"],children:(y=u.items)==null?void 0:y.map((v,C)=>n.jsx(d.ComponentList.ListItem,{id:`list-item-${v.label}-${C}`,children:n.jsx(Oe,{href:v.link??"#",size:"x-small",title:v.label??"",disableUnderline:!0,disablePadding:!0,onClick:()=>{o(),i({content:`menu:${u.label??""}:${v.label??""}:${r.label??""}`})},children:v.label})},`list-item-${v.label}-${C}`))}),((x=u.see_all)==null?void 0:x.link)&&n.jsx(d.ComponentList.Support,{...f,size:"small",onClick:()=>{var v;(v=u.see_all)!=null&&v.link&&(o(),i({content:`menu:${u.label??""}:${r.label}`}),a.push(u.see_all.link))},children:u.see_all.link&&u.see_all.label})]},`list-${u.label}-${m}`)}),t&&n.jsx(d.Utils.Divider,{size:"small",direction:"vertical"})]})};rl.displayName="Menu.Categories";const sl=({children:e,dividerOnBottom:t=!0,...r})=>{const{CONSTANTS:s}=Ne();return n.jsxs(n.Fragment,{children:[n.jsx("div",{...r,className:rs["menu-desktop"],style:{...r.style,justifyContent:s.header.ALIGNMENT_MENU},children:e}),t&&n.jsx(d.Utils.Divider,{size:"small"})]})};sl.displayName="Menu.MenuRoot";const Er={Root:sl,Categories:rl,Thumbnail:nl},ol=()=>{const{headerData:e,CONSTANTS:t}=Ne(),r=Ja(),{reset:s}=rn();return n.jsx(d.Header.SubMenu,{className:"header-desktop-submenu",children:Array.isArray(e.subMenus)&&e.subMenus.map((a,o)=>{const{thumbnails:i,label:c,id:l}=a,u=l===r,m=i==null?void 0:i.some(p=>!!p.srcDesk);return n.jsxs(Er.Root,{id:l,style:u?{display:"flex",zIndex:t.header.Z_INDEX_WAR.menu_desktop}:{display:"none"},dividerOnBottom:u,children:[n.jsx(Er.Categories,{dividerOnRight:!!m,subMenu:a}),Array.isArray(i)&&n.jsx(Er.Thumbnail,{thumbnails:i,isMobile:!1,category:c,callBack:s})]},`submenu-${l}-${o}`)})})};ol.displayName="Header.SubMenu";const al=()=>{const{handleSelectContent:e}=ae(),{CONSTANTS:t}=Ne();return n.jsx(Fe,{href:"/favoritos",children:n.jsx(d.Header.SupportItem,{onClick:()=>e({content:"header:wishlist"}),children:n.jsx(d.Icon,{name:t.header.ICONS.favorite_false,size:"medium"})})})};al.displayName="Header.WishList";const Nf="_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:Nf},il=({className:e,children:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat($e["user-menu--content"],e),children:t});il.displayName="UserMenu.Content";var cl=(e=>(e.Account="account",e))(cl||{});const ll=({className:e,cashBack:t,credits:r,link:s,total:a,...o})=>{const i=t?T.formatPriceToCurrency(t):void 0,c=r?T.formatPriceToCurrency(r):void 0,l=a?T.formatPriceToCurrency(a):void 0;return n.jsx(d.Credits.Account,{...o,className:d.helpers.classNameConcat($e["user-menu--credits"],e),icon:"wallet",showIcon:!0,cashBackValue:i,creditsValue:c,linkMore:s,totalValue:l,type:cl.Account})};ll.displayName="UserMenu.Credits";const ul=({className:e,children:t,description:r,text:s,...a})=>{const{isMobile:o}=ne();return n.jsx("div",{...a,className:d.helpers.classNameConcat($e["user-menu--login"],e),"data-mobile":o,children:n.jsxs("div",{className:$e["user-menu--login--content"],children:[n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:[n.jsx("h3",{className:"typography-style-body-lg-strong",children:s}),n.jsx("p",{children:r})]})}),t]})})};ul.displayName="UserMenu.Login";const dl=({className:e,isLogged:t,onLogoutClick:r,ICONS:s,storeConfig:a,isMobile:o})=>{const i=o?go:go({ICONS:s,storeConfig:a}).filter(c=>c.deviceShown==="both"||c.deviceShown===(o?"mobile":"desktop"));return n.jsxs("ul",{className:d.helpers.classNameConcat($e["user-menu--menu"],e),children:[Array.isArray(i)&&i.map((c,l)=>n.jsx("li",{children:n.jsx(Oe,{href:c.href??"#",size:"small",disableUnderline:!0,adornments:{start:n.jsx(d.Icon,{name:c.icon??"delete"})},children:c.label})},l)),t?n.jsx("li",{children:n.jsx(Oe,{href:`${a.secureSubdomain}/api/vtexid/pub/logout?scope=mariafilo&returnUrl=${encodeURIComponent(`${a.storeUrl}`)}`,size:"small",disableUnderline:!0,onClick:r,adornments:{start:n.jsx(d.Icon,{name:Jm(s)})},children:Zm})}):n.jsx(n.Fragment,{})]})};dl.displayName="UserMenu.Menu";const ml=e=>{const t=g.useRef(null),r=g.useCallback(o=>{t.current&&!t.current.contains(o.target)&&e()},[e]),s=g.useCallback(o=>{t.current&&!t.current.contains(o.target)&&e()},[e]),a=g.useCallback(o=>{o.key==="Escape"&&e()},[e]);return g.useEffect(()=>(document.addEventListener("mousedown",r),document.addEventListener("keydown",a),document.addEventListener("touchstart",s),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("keydown",a),document.removeEventListener("touchstart",s)}),[r,a,s]),{ref:t}},Ef=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},If=(e,t,r)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const{height:s,left:a,top:o,width:i}=t.getBoundingClientRect(),c=e.getBoundingClientRect(),l=e!=null&&e.parentElement?Ef(e==null?void 0:e.parentElement):0;return{left:a+i/2-(c.width+l*2),top:o+s+r}},pl=g.createContext({}),Rf=({children:e,delay:t=600,gap:r=20,isOpen:s,setIsOpen:a,target:o,...i})=>{const c=g.useRef(null),[l,u]=g.useState(!1),[m,p]=g.useState({left:0,top:0}),{ref:f}=ml(()=>{u(!0),typeof window<"u"&&(c.current=window.setTimeout(()=>{a(!1),u(!1)},t))});return g.useEffect(()=>{if(o&&(f!=null&&f.current)){const{left:h,top:_}=If(f.current,o,r??0);p({left:h,top:_}),u(!1)}},[r,s,o,f]),n.jsx(pl.Provider,{value:g.useMemo(()=>({...i,...m,contentRef:f,isLeaving:l,isOpen:s,setIsOpen:a,setIsLeaving:u,target:o}),[i,m,f,l,s,a,u,o]),children:e})},fl=()=>{const e=g.useContext(pl);if(e===void 0)throw new Error("useUserMenuContext must be used within a UserMenuProvider");return e},hl=({children:e,isMobile:t=!1,Z_INDEX_WAR:r})=>{const{isOpen:s,setIsOpen:a}=fl();return n.jsxs(d.Modal.Root,{"data-user":"user-menu--modal",isMobile:t??!1,isOpen:s,setIsOpen:a,variant:"sideBottom",className:$e["modal-root-modifier"],style:{zIndex:r.user_menu_mobile},children:[n.jsx(d.Modal.Header,{navigation:"top",className:$e["modal-header-modifier"],children:n.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0,className:$e["modal-controls-modifier"]})}),n.jsx(d.Modal.Body,{children:e})]})};hl.displayName="UserMenu.Modal";const _l=({children:e,component:t,Z_INDEX_WAR:r,isMobile:s,...a})=>n.jsx(Rf,{...a,className:$e.root,children:s?n.jsxs(n.Fragment,{children:[n.jsx(mt.Modal,{Z_INDEX_WAR:r,children:t}),e]}):n.jsx(mt.Tooltip,{component:t,style:{width:304,zIndex:r.user_menu},Z_INDEX_WAR:r,children:e})});_l.displayName="UserMenu.Root";const gl=({children:e,component:t,Z_INDEX_WAR:r,...s})=>{const{contentRef:a,left:o,isLeaving:i,isOpen:c,top:l}=fl();return n.jsx(d.Tooltip.Root,{arrow:"top-right",component:n.jsx("div",{...s,ref:a,children:t}),className:d.helpers.classNameConcat($e["user-menu--tooltip"],$e["tooltip-modifier"]),isLeaving:i,isOpen:c,left:o,size:"medium",position:"top",top:l,style:{zIndex:r.user_menu},children:n.jsx("div",{className:$e["user-menu--tooltip"],children:e})})};gl.displayName="UserMenu.Tooltip";const mt={Credits:ll,Content:il,Login:ul,Menu:dl,Modal:hl,Root:_l,Tooltip:gl},Jn=({children:e,isOpen:t,setIsOpen:r,desktopUserMenuTarget:s,mobileUserMenuTarget:a,storeConfig:o})=>{var h,_,y;const{isMobile:i}=ne(),{CONSTANTS:c}=Ne(),l=Bt(),u=()=>{window.location.href=`${o.secureSubdomain}/api/io/login?returnUrl=${encodeURIComponent(`${window.location.href}`)}`},m=!!((h=l.user)!=null&&h.userId),{cashback:p,credits:f}=g.useMemo(()=>{var x,v;return{credits:((x=l==null?void 0:l.getCurrentCredits())==null?void 0:x.credits)??0,cashback:((v=l==null?void 0:l.getCurrentCredits())==null?void 0:v.cashback)??0}},[l]);return n.jsx(mt.Root,{component:n.jsxs(mt.Content,{children:[n.jsx(mt.Login,{description:tp(m),text:ep(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&&n.jsx(d.Button,{id:"conta",size:"medium",variant:"quaternary",onClick:()=>u(),children:c.header.MENU_INFO.login.button_text})}),f+p&&m?n.jsx(mt.Credits,{credits:f,cashBack:p,link:`${o.secureSubdomain}/account#/meus-creditos`,total:f+p}):n.jsx(n.Fragment,{}),n.jsx(d.Utils.Divider,{}),n.jsx(mt.Menu,{ICONS:c.header.ICONS,storeConfig:o,isLogged:m,className:T.responsive["responsive-desktop-flex"],onLogoutClick:()=>l.logout()}),n.jsx(mt.Menu,{ICONS:c.header.ICONS,storeConfig:o,isMobile:!0,isLogged:m,className:T.responsive["responsive-mobile-flex"],onLogoutClick:()=>l.logout()})]}),isOpen:t,isMobile:i,setIsOpen:r,target:i?a:s,Z_INDEX_WAR:c.header.Z_INDEX_WAR,children:e})};Jn.displayName="UserMenu";const yl=({storeConfig:e})=>{const{CONSTANTS:t}=Ne(),{handleSelectContent:r}=ae(),{reset:s}=rn(),{setValue:a}=As(),o=Ts(),i=g.useRef(null);return n.jsxs(n.Fragment,{children:[n.jsxs(d.Header.Wrapper,{className:"header-desktop-wrapper",children:[n.jsx(d.Header.Logo,{style:{width:"100%"},children:n.jsx(Fe,{href:"/",onMouseEnter:s,children:n.jsx(d.Icon,{name:t.header.ICONS.logo,onClick:()=>{r({content:"header:logo"})}})})}),n.jsx(tl,{}),n.jsxs(d.Header.Support,{onMouseEnter:s,style:{justifyContent:"flex-end"},children:[n.jsx(Sf,{}),n.jsx(Jn,{isOpen:o,setIsOpen:a,desktopUserMenuTarget:i.current,storeConfig:e,children:n.jsx(d.Header.SupportItem,{onClick:()=>{a(!0),r({content:"header:user_menu"})},className:Js["btn-login"],innerRef:i,children:n.jsx(d.Icon,{name:t.header.ICONS.person,size:"medium"})})}),n.jsx(al,{}),n.jsx(eo,{id:"cart-button"})]})]}),n.jsx(ol,{})]})};yl.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"},xl=({children:e,mobileBannerAlt:t,mobileBannerSrc:r,textColor:s,submenuId:a,label:o,...i})=>n.jsx("button",{...i,className:Be["menu--banners--item"],children:r?n.jsxs(d.Banner.Container,{children:[n.jsx(d.Banner.ImageWrapper,{children:n.jsx(we.Image,{alt:t??r,height:128,src:r,width:343,unoptimized:!0})}),n.jsx(d.Banner.Slot,{verticalAlignment:"end",horizontalAlignment:"center",children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:Be["menu--banners--item--text"],children:n.jsx("h2",{className:"typography-style-body-xs",style:s?{color:s}:{},children:e})})})})]}):n.jsx("h2",{...i,children:e})});xl.displayName="Menu.Mobile.Category";const vl=({label:e,...t})=>{const{CONSTANTS:r}=Ne();return n.jsx(d.Button,{...t,adornment:{end:n.jsx(d.Icon,{name:r.header.ICONS.arrow_right,size:"medium"})},mode:"inverse",size:"medium",variant:"primary",children:e})};vl.displayName="Menu.Mobile.Body.Category";const bl=({subCategory:e,submenuLabel:t,onHandleOut:r,...s})=>n.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((a,o)=>n.jsx(Oe,{disableUnderline:!0,disablePadding:!1,href:a.link??"#",onClick:()=>r(a.label,t),size:"medium",title:a.label??"",children:a.label},o)))});bl.displayName="Menu.Mobile.List";const jl=({current:e,onHandleOut:t})=>{var r;return e?n.jsx("div",{className:Be["menu--sub-category"],children:Array.isArray(e==null?void 0:e.subCategories)&&((r=e==null?void 0:e.subCategories)==null?void 0:r.map((s,a)=>n.jsxs("div",{className:Be["menu--sub-category--item"],children:[n.jsx(Yt.Title,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id}),n.jsx(Yt.List,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id})]},a)))}):n.jsx(n.Fragment,{})};jl.displayName="Menu.Mobile.Body.SubCategory";const Cl=({subCategory:e,submenuLabel:t,onHandleOut:r,...s})=>{var c;const{router:a}=ce(),{handleSelectContent:o}=ae(),{CONSTANTS:i}=Ne();return n.jsxs("div",{...s,className:Be["menu--categories--title"],children:[n.jsx(an,{href:e==null?void 0:e.linkLabel,title:e==null?void 0:e.linkLabel,onClick:()=>{o({content:`menu:${e.label??""}:${t}`})},children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h2",{className:"typography-style-body-md",children:e==null?void 0:e.label})})})}),((c=e==null?void 0:e.see_all)==null?void 0:c.link)&&n.jsx(d.ComponentList.Support,{adornment:{end:n.jsx(d.Icon,{name:i.header.ICONS.arrow_right,size:"small"})},size:"small",onClick:()=>{var l;r(e.label,t),(l=e==null?void 0:e.see_all)!=null&&l.link&&a.push(e.see_all.link)},children:e.see_all.label})]})};Cl.displayName="Menu.Mobile";const Yt={Banner:xl,Category:vl,List:bl,SubCategory:jl,Title:Cl},Sl=g.createContext({}),Tf=({children:e})=>{const[t,r]=g.useState(null),s=g.useCallback(()=>{r(null)},[]),a=o=>{o!==t&&r(o)};return n.jsx(Sl.Provider,{value:{currentCategory:t,setCurrentCategory:r,handleCloseMenu:s,handleChangeSubMenuOpened:a},children:e})},Pl=()=>g.useContext(Sl),wl=e=>{const{router:t}=ce(),{headerData:r}=Ne(),{handleSelectContent:s}=ae(),{currentCategory:a,setCurrentCategory:o}=Pl(),i=g.useRef(null),c=()=>{if(i.current){const h=i.current;h&&(o(null),h==null||h.click())}},l=(h,_)=>{s({content:`menu:${h}`}),t.push(_),c()},u=(h,_)=>{s({content:`menu:${h}:${_}`}),c()},m=Array.isArray(r==null?void 0:r.categories)?r==null?void 0:r.categories:[],p=Array.isArray(r==null?void 0:r.subMenus)?r==null?void 0:r.subMenus:[],f=h=>{h.submenuId?o(h.submenuId):l(h.label,h.link)};return n.jsxs("div",{...e,className:Be["menu--body"],style:{transform:`translate3d(calc(-100% * ${a?1:0}), 0px, 0px)`},children:[n.jsx("button",{className:Be["menu--dummy-close"],ref:i,"data-close":!0}),n.jsxs("div",{className:Be["menu--step"],"data-active":"true",children:[n.jsx("div",{className:Be["menu--banners"],children:n.jsx("div",{className:Be["menu--banners--list"],children:m.map((h,_)=>g.createElement(Yt.Banner,{...h,key:_,onClick:()=>l(h.label,h.link)},h.mobileBannerAlt))})}),n.jsx("div",{className:Be["menu--categories"],children:m.map((h,_)=>n.jsx(Yt.Category,{label:h.label,onClick:()=>f(h)},_))})]}),n.jsx("div",{className:Be["menu--step"],"data-active":!!a,children:n.jsx(Yt.SubCategory,{current:p.find(h=>h.id===a),onHandleOut:u})})]})};wl.displayName="Menu.Mobile.Body";const Af={"menu--header":"_menu--header_1ozdf_1"},Nl=()=>{var a;const{headerData:e}=Ne(),{currentCategory:t,setCurrentCategory:r}=Pl(),s=(a=e==null?void 0:e.categories)==null?void 0:a.find(o=>o.submenuId===t);return n.jsxs("div",{className:Af["menu--header"],children:[n.jsx(d.Button,{"data-out":!s,iconNameStart:"arrow-left",mode:"inverse",onClick:()=>r(null)}),s&&n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{alignContent:"center",children:n.jsx("h2",{className:"typography-style-body-lg",children:s==null?void 0:s.label})})}),n.jsx(d.Button,{iconNameStart:"close","data-close":!0,"data-only":!s,mode:"inverse",onClick:()=>r(null)})]})};Nl.displayName="Menu.Mobile.Header";var ss={exports:{}};function kf(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 Ir={},Rr={},Zo;function Of(){return Zo||(Zo=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"LoadableContext",{enumerable:!0,get:function(){return s}});const s=ke._(g).default.createContext(null);process.env.NODE_ENV!=="production"&&(s.displayName="LoadableContext")}(Rr)),Rr}var Jo;function Lf(){return Jo||(Jo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return h}});const r=ke._(g),s=Of();function a(_){return _&&_.default?_.default:_}const o=[],i=[];let c=!1;function l(_){let y=_(),x={loading:!0,loaded:null,error:null};return x.promise=y.then(v=>(x.loading=!1,x.loaded=v,v)).catch(v=>{throw x.loading=!1,x.error=v,v}),x}function u(_,y){let x=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},y),v=null;function C(){if(!v){const w=new m(_,x);v={getCurrentValue:w.getCurrentValue.bind(w),subscribe:w.subscribe.bind(w),retry:w.retry.bind(w),promise:w.promise.bind(w)}}return v.promise()}if(typeof window>"u"&&o.push(C),!c&&typeof window<"u"){const w=x.webpack&&typeof kf.resolveWeak=="function"?x.webpack():x.modules;w&&i.push(S=>{for(const P of w)if(S.includes(P))return C()})}function j(){C();const w=r.default.useContext(s.LoadableContext);w&&Array.isArray(x.modules)&&x.modules.forEach(S=>{w(S)})}function b(w,S){j();const P=r.default.useSyncExternalStore(v.subscribe,v.getCurrentValue,v.getCurrentValue);return r.default.useImperativeHandle(S,()=>({retry:v.retry}),[]),r.default.useMemo(()=>P.loading||P.error?r.default.createElement(x.loading,{isLoading:P.loading,pastDelay:P.pastDelay,timedOut:P.timedOut,error:P.error,retry:v.retry}):P.loaded?r.default.createElement(a(P.loaded),w):null,[w,P])}return b.preload=()=>C(),b.displayName="LoadableComponent",r.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: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(v=>{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 p(_){return u(l,_)}function f(_,y){let x=[];for(;_.length;){let v=_.pop();x.push(v(y))}return Promise.all(x).then(()=>{if(_.length)return f(_,y)})}p.preloadAll=()=>new Promise((_,y)=>{f(o).then(_,y)}),p.preloadReady=_=>(_===void 0&&(_=[]),new Promise(y=>{const x=()=>(c=!0,y());f(i,_).then(x,x)})),typeof window<"u"&&(window.__NEXT_PRELOADREADY=p.preloadReady);const h=p}(Ir)),Ir}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(m,p){for(var f in p)Object.defineProperty(m,f,{enumerable:!0,get:p[f]})}r(t,{default:function(){return u},noSSR:function(){return l}});const s=ke,a=n,o=s._(Lf()),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,a.jsx)(f,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}function u(m,p){let f=o.default,h={loading:x=>{let{error:v,isLoading:C,pastDelay:j}=x;if(!j)return null;if(process.env.NODE_ENV!=="production"){if(C)return null;if(v)return(0,a.jsxs)("p",{children:[v.message,(0,a.jsx)("br",{}),v.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)})(ss,ss.exports);var Mf=ss.exports,Df=Mf;const El=T.getDefaultExportFromCjs(Df),Fn={"modal-modifier":"_modal-modifier_10zw4_1","menu--navigation-bar":"_menu--navigation-bar_10zw4_15","menu--root":"_menu--root_10zw4_26"},Il=({children:e})=>{const{menuIsOpen:t,setMenuIsOpen:r}=Ms(),{CONSTANTS:s}=Ne();return n.jsxs(d.Modal.RootWithoutPortal,{className:d.helpers.classNameConcat(Fn["modal-modifier"],"menu-mobile-root"),isOpen:t,setIsOpen:r,variant:"sideRight",style:{bottom:"unset",overflowY:"hidden",position:"fixed",top:0,zIndex:s.header.Z_INDEX_WAR.menu_mobile},children:[n.jsx(Nl,{}),n.jsx(d.Modal.Body,{className:Fn["menu--root"],children:e})]})};Il.displayName="Menu.MenuRoot";const Ff=El(()=>Promise.resolve(Il),{ssr:!1}),Rl=({children:e,last:t=!1,...r})=>n.jsxs(n.Fragment,{children:[n.jsx(d.Button,{...r,"data-close":!0,size:"small",variant:"tertiary",children:e}),!t&&n.jsx(d.Utils.Divider,{direction:"vertical",size:"small",className:Fn.divider})]});Rl.displayName="Menu.NavigationBarItem";const Tl=()=>{const{setUserMenuIsOpen:e}=Ms(),{handleSelectContent:t}=ae(),{CONSTANTS:r}=Ne(),{router:s}=ce(),a=[{iconNameStart:r.header.ICONS.person,onClick:()=>{e(!0),t({content:"menu:user_menu"})},text:r.header.MENU_INFO.login.button_text},{iconNameStart:r.header.MENU_INFO.bag.button_icon,onClick:()=>{t({content:"menu:wishlist"}),s.push("/favoritos")},text:r.header.MENU_INFO.bag.button_text},{last:!0,iconNameStart:r.header.MENU_INFO.store.button_icon,onClick:()=>{t({content:"menu:store"}),s.push("/institucional/lojas")},text:r.header.MENU_INFO.store.button_text}];return n.jsx(d.Card,{id:"menu-navigationbar",shadow:!0,className:Fn["menu--navigation-bar"],style:{zIndex:r.header.Z_INDEX_WAR.menu_mobile_navigation_bar},children:Array.isArray(a)&&a.map((o,i)=>g.createElement(Rl,{...o,key:i},o.text))})};Tl.displayName="Menu.NavigationBar";const Tr={Body:wl,NavigationBar:Tl,Root:Ff},Al=({storeConfig:e})=>{const t=g.useRef(null),{CONSTANTS:r}=Ne(),{MENU_NAVIGATION_BAR_ALLOWED:s,ICONS:a}=r.header,{handleSelectContent:o}=ae(),{setValue:i}=$n(),{setValue:c}=ni(),{setValue:l}=As(),u=Ts(),m=ti(),{isMobile:p}=ne();return n.jsxs(n.Fragment,{children:[n.jsxs(d.Header.Wrapper,{className:"header-mobile-wrapper",children:[n.jsx(d.Header.Logo,{style:{width:"100%"},children:n.jsx(Fe,{href:"/",children:n.jsx(d.Icon,{name:a.logo,size:"x-large",onClick:()=>{o({content:"header:logo"})}})})}),n.jsxs(d.Header.Support,{children:[n.jsx(d.Header.SupportItem,{onClick:()=>{i(!0),o({content:"header:search"})},children:n.jsx(d.Icon,{name:a.search,size:"medium"})}),n.jsx(eo,{}),n.jsxs(d.Header.SupportItem,{onClick:()=>c(!0),children:[n.jsx("span",{ref:t}),n.jsx(d.Icon,{name:a.menu,size:"medium"})]})]})]}),p&&n.jsx(gi,{menuIsOpen:m,setMenuIsOpen:c,userMenuIsOpen:m,setUserMenuIsOpen:l,children:n.jsx(Jn,{storeConfig:e,isOpen:u,setIsOpen:l,mobileUserMenuTarget:t==null?void 0:t.current,children:n.jsxs(Tr.Root,{children:[n.jsx(Tr.Body,{}),s?n.jsx(Tr.NavigationBar,{}):n.jsx(n.Fragment,{})]})})})]})};Al.displayName="Header.HeaderMobileWrapper";const zf=g.createContext({}),Bf=({children:e})=>{const{sendDataLayerEvent:t}=ae(),{cartStore:r,isOpen:s}=ve();g.useEffect(()=>{s&&t({functionKey:"viewCartEvent",data:{commonData:{cartStore:r}}})},[s]),g.useEffect(()=>{var o,i,c;if(r.id&&!((i=(o=r.marketingData)==null?void 0:o.marketingTags)!=null&&i.includes("faststore"))){const{id:l}=r;T.proxyCartAPI("/_v/proxy/checkout/order-form/attachments/marketing-data",{body:{orderFormId:l,marketingData:{...r==null?void 0:r.marketingData,marketingTags:T.marketingTagsBuilder(((c=r.marketingData)==null?void 0:c.marketingTags)??[])}}}).catch(u=>{console.error(u)})}},[r]);const a=({cartItem:o,oldQuantity:i,newQuantity:c})=>{t({functionKey:"skuEvents",data:{event:i>c?"remove_from_cart":"add_to_cart",commonData:{products:[{...o,price:o.price/100,listPrice:o.listPrice/100}]},customData:{quantity:c},supportData:{selectedSkus:[o]}}})};return n.jsx(zf.Provider,{value:{handleUpdateItemQuantityEvent:a},children:e})},Uf="var(--color-background-brand-primary-lighter)",qf="_fadeInOut_1l5ow_1",Hf="_fadeOut_1l5ow_1",re={brandPrimaryLighter:Uf,"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:qf,fadeOut:Hf,"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"},kl=({item:{id:e,message:t,callback:r},removeNotification:s,ICONS:a})=>{const o=g.useRef(null),i=()=>{var l;(l=o.current)==null||l.setAttribute("data-animation-out","true")},c=l=>{s(l)};return n.jsx("div",{className:re["mc--notify--item"],ref:o,onAnimationEnd:()=>c(e),children:n.jsxs(d.SnackBar.Structure,{size:"medium",children:[n.jsx(d.SnackBar.Content,{title:t}),n.jsxs(d.SnackBar.Support,{children:[typeof r=="function"&&n.jsx(d.Button,{onClick:()=>{r(),i()},size:"small",variant:"tertiary",children:"Desfazer"}),n.jsx(d.Button,{iconNameStart:a.close,iconSize:"small",onClick:()=>i(),variant:"tertiary"})]})]})},e)};kl.displayName="MiniCart.Notify.Item";const Ol=({ICONS:e})=>{const t=Is(),{removeNotification:r}=Rs(),s=t.length?[...t].sort((a,o)=>o.id-a.id):[];return s.length?n.jsx("div",{className:re["mc--notify"],children:n.jsx("div",{className:re["mc--notify--content"],children:Array.isArray(s)&&s.map(a=>n.jsx(kl,{item:a,removeNotification:r,ICONS:e},a.id))})}):null};Ol.displayName="MiniCart.Notifications";const $f=({handleSendEvent:e,onHandleRemove:t,product:r,MINICART_CONFIG:s,...a})=>{const o=zt(),{toggleProduct:i}=Nt(),{itemOffered:{isVariationOf:{productGroupID:c}},quantity:l}=r;return n.jsx(d.Button,{...a,adornment:{end:n.jsx(d.Icon,{name:`favorite-${o.includes(c)?"true":"false"}`,size:"small"})},onClick:()=>{i(c),o.includes(c)||t({texture:"mini-cart-wishlist",title:`${s.messages.add_wishlist}`},l,()=>i(c)),e(o.includes(c)?"remove_from_wishlist":"add_to_wishlist","productEvents")},children:s.messages.add_wishlist_button})},Ll=({handleSendEvent:e,product:t,ICONS:r,MINICART_CONFIG:s,...a})=>{const{addToCart:o,removeToCart:i}=ve(),{bundleItems:c=[],id:l,uniqueId:u,seller:m,offerings:p,quantity:f}=t,h=(_,y,x)=>{i(l,_.title,()=>{typeof x=="function"&&x(),o({id:l,quantity:y,seller:m},{id:l,texture:_.texture},!0)})};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:re["mc--card--actions--add-remove"],children:[s.has_wishlist_button&&n.jsx($f,{...a,product:t,handleSendEvent:e,onHandleRemove:h,ICONS:r,MINICART_CONFIG:s}),n.jsx(d.Button,{...a,adornment:{end:n.jsx(d.Icon,{name:r.delete,size:"small"})},underline:!0,variant:"secondary",state:"danger",onClick:()=>{h({texture:"mini-cart",title:`${s.messages.remove}`},f),e("remove_from_cart","skuEvents")},children:s.messages.remove_button})]}),s.has_gift_option&&n.jsx(Tt.Gift,{uniqueId:u,bundleItems:c,offerings:p,ICONS:r,MINICART_CONFIG:s})]})};Ll.displayName="MiniCart.Card.Actions";const Ml=({bundleItems:e,offerings:t,uniqueId:r,ICONS:s,MINICART_CONFIG:a})=>{const[o,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(r,String(p.id),f).then(()=>i(!1))}}},u=t[0],m=e.find(p=>p.id===u.id);return u&&"id"in u?n.jsx("div",{className:re["mc--card--actions--gift"],children:n.jsx(d.Checkbox,{adornment:n.jsx(d.Icon,{name:s.check}),checked:!!m,disabled:o,label:a.messages.giftPackage,onChange:l})}):null};Ml.displayName="MiniCart.Card.Gift";const Dl=({itemOffered:e})=>{const t=T.updatedResizedImg(e==null?void 0:e.image[0].url,{width:200,height:300});return n.jsx(Fe,{href:`${e==null?void 0:e.slug}`,className:re["mc--card--product-link"],children:n.jsx(we.Image,{alt:(e==null?void 0:e.image[0].alternateName)||"Produto",src:t||"",width:108,height:164,objectFit:"unset"})})};Dl.displayName="MiniCart.Card.Media";const Fl=({name:e,skuName:t,tagName:r,className:s})=>n.jsxs(n.Fragment,{children:[r&&n.jsx(d.Tag,{variant:"quaternary",title:r,style:{textTransform:"uppercase"},children:r}),n.jsx("p",{className:d.helpers.classNameConcat(re["mc--card--name"],s),children:T.getProductNameWithoutSku(e??"",t??"")})]});Fl.displayName="MiniCart.Card.Name";const zl=({total:e,totalList:t})=>n.jsx(d.ProductInfo.Root,{children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:re["mc--card--price"],children:n.jsx(d.ProductInfo.Wrapper,{className:re["mc--card--price--details"],size:"small",layout:"horizontal",children:t&&e!==t?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:T.formatPriceToCurrency(t),size:"small"}),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:T.formatPriceToCurrency(e),size:"small"})]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:T.formatPriceToCurrency(e),size:"small"})})})})});zl.displayName="MiniCart.ProductPrice";const Bl=({product:e,TEXTURE_IMAGE:t,TOGGLE_STYLE_MODIFIER:r})=>{var u;const[s,a]=g.useState(""),o=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){a(m);return}T.fetchProxy("/_v/proxy/catalog/product/info",{method:"POST",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){a(_.imageUrl);return}a(h.images[0].imageUrl)}}).catch(f=>{console.error(f)})},[i,c,e.id]);return g.useEffect(()=>{if(!o.current)return;const m=new IntersectionObserver(p=>{p[0].isIntersecting&&l()});return m.observe(o.current),()=>{m.disconnect()}},[l]),n.jsx("div",{ref:o,children:n.jsx(d.ToggleStyle.Wrapper,{size:"small",style:r,children:n.jsx(d.ToggleStyle.Texture,{children:s?n.jsx(we.Image,{alt:((u=e.itemOffered)==null?void 0:u.image[0].alternateName)??"Produto",src:s,width:164,height:164,style:r}):n.jsx(lc,{})})})})};Bl.displayName="MiniCart.Card.Style";const Ul=({product:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:a})=>{const{size:o}=T.getColorAndSizeFromSkuName(e.itemOffered.skuName??"",r);return n.jsxs(d.Utils.Row,{alignItems:"center",children:[n.jsx(Bl,{product:e,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:a}),n.jsx(d.Utils.Divider,{direction:"vertical",size:"small",style:{height:24}}),o&&n.jsx(d.ToggleSize.Wrapper,{size:t.product_card.sku.size??"small",variation:t.product_card.sku.variation??"fill",className:re["mc-container-actions--toggle-size-modifier"],style:{backgroundColor:`${re.brandPrimaryLighter}`},children:n.jsx(d.ToggleSize.Text,{children:o})})]})};Ul.displayName="MiniCart.Card.Sku";const Tt={Actions:Ll,Gift:Ml,Media:Dl,Name:Fl,Price:zl,Sku:Ul},Vf=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}},ql=({available:e=!0,index:t,product:r,ICONS:s,MINICART_CONFIG:a,NAME_SPLIT_SYMBOL:o,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c})=>{var p,f;const{sendDataLayerEvent:l}=ae(),u=Vf(r),m=(h,_)=>{const y={commonData:{...r,...u},customData:{index:t},event:h};if(_==="skuEvents"){const x={...r,...u};y.supportData={selectedSkus:[x]},y.commonData.products=[x]}l({functionKey:_,data:y})};return n.jsxs("div",{className:d.helpers.classNameConcat(re["mc--card"],e?"":re["mc--card--unavailable"]),children:[n.jsx(Tt.Media,{itemOffered:r.itemOffered}),n.jsxs("div",{className:re["mc--card--content-info"],children:[n.jsx(Tt.Name,{name:((p=r.itemOffered)==null?void 0:p.name)??"",skuName:(f=r.itemOffered)==null?void 0:f.skuName}),n.jsxs("div",{className:re["mc--card--details"],children:[n.jsx("div",{className:re["mc--card--actions"],children:e?n.jsx(Tt.Price,{total:u.price,totalList:u.listPrice}):n.jsx(d.Tag,{variant:"secondary",size:"small",children:"Indisponível"})}),n.jsxs("div",{className:re["mc--card--actions--secondary"],children:[e&&n.jsx(Tt.Sku,{product:r,MINICART_CONFIG:a,NAME_SPLIT_SYMBOL:o,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c}),n.jsx(Tt.Actions,{handleSendEvent:m,product:r,size:"small",variant:"tertiary",ICONS:s,MINICART_CONFIG:a})]})]})]})]})};ql.displayName="MiniCart.Card";const Hl=({type:e="positive",ICONS:t,MESSAGE_CASHBACK:r})=>{var o;const{toExpire:s}=Bt(),a=((o=s==null?void 0:s.cashback)==null?void 0:o.reduce((i,c)=>i+c.remaining_value,0))??0;return a>0?n.jsxs("div",{className:d.helpers.classNameConcat(re["mc--cashback"],re[`mc--cashback--${e}`]),children:[n.jsx(d.Icon,{name:t.alert_circle,size:"medium"}),n.jsxs("p",{children:[n.jsx("span",{children:T.formatPriceToCurrency(a)})," ",r.title]})]}):null};Hl.displayName="MiniCart.Cashback";const $l=({type:e,ICONS:t,MINICART_CONFIG:r})=>{const{addCouponSeller:s,removeCoupon:a,removeSellerCode:o,cartStore:{marketingData:i,openTextField:c}}=ve(),[l,u]=g.useState(!1),[m,p]=g.useState(!1),f=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(!!f()),y=async x=>{p(!0),!!f()&&(e==="coupon"?await a():await o(),_(!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(()=>p(!1))};return n.jsx(Me.Field,{hasError:l,hasSuccess:h,isLoading:m,onHandler:y,type:e,title:e==="coupon"?`${r.messages.descount_cupom_placeholder}`:`${r.messages.sellers_code_placeholder}`,value:f(),MINICART_CONFIG:r,ICONS:t})};$l.displayName="MiniCart.CouponSeller";const Vl=({ICONS:e,MINICART_CONFIG:t,PLP_NOT_RESULT:r})=>{const{router:s}=ce(),a=()=>{s.push(r.link)};return n.jsxs(d.Utils.Column,{alignContent:"center",alignItems:"center",gap:"24px",className:re["mc--body--empty--feedback"],children:[n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsxs("p",{className:`typography-style-body-xs ${re["mc--body--empty--text"]}`,children:[t.messages.empty_card," "]})})}),n.jsx(d.Button,{variant:"tertiary",size:"large",onClick:()=>a(),"data-close":!0,adornment:{end:n.jsx(d.Icon,{name:e.arrow_right,size:"medium"})},children:t.messages.empty_bag})]})};Vl.displayName="MiniCart.Feedback";const Wf=e=>{const t=e.replace(/\D/g,"");return t.length>5?`${t.slice(0,5)}-${t.slice(5,8)}`:t},Wl=({feedback:e,hasError:t,onHandler:r,hasSuccess:s,type:a,title:o,value:i,ICONS:c})=>{const[l,u]=g.useState(i);g.useEffect(()=>{t||u(i)},[i,t]);const m=()=>t?n.jsx(d.Icon,{name:c.delete_circle}):String(i).length&&s?n.jsx(d.Icon,{name:c.check_circle}):null,p=()=>{if(a==="seller"){const y=String(i).includes(" - ")?String(i).split(" - ")[0]:l;u(y)}},f=()=>{if(a==="seller"){const y=String(i).includes(" - ")?i:l;u(y)}},h=y=>{const x=y.currentTarget.value;if(x===""&&typeof r=="function"||s&&String(i).length>0&&x!==String(i)||t&&x!==String(i)){u(""),r("");return}if(a==="cep"){const C=Wf(x);u(C)}else u(x)},_=y=>{if(y.key.toLocaleLowerCase()==="enter"&&typeof r=="function"){const x=y.currentTarget.value;r(x)}};return n.jsx(d.TextField.Input,{adornment:{end:m()},mode:"over-label",label:o,feedback:e,value:l,type:"text",onFocus:p,onBlur:f,onChange:h,onKeyDown:_})};Wl.displayName="MiniCart.Field.Input";const Gl=({title:e,ICONS:t,MINICART_CONFIG:r,...s})=>{const a=g.useRef(null),{hasSuccess:o,hasError:i,isLoading:c,onHandler:l,type:u,value:m}=s,p=()=>i?"error":String(m).length&&o?"success":"none",f=g.useCallback(()=>{if(a.current){const y=a.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 n.jsx("div",{ref:a,children:n.jsx(d.TextField.Structure,{className:re["mc--field"],input:n.jsx(Wl,{...s,feedback:h,title:e,ICONS:t}),right:n.jsx(d.Button,{"data-has-success":!o,size:"medium",title:String(m).length&&o||i?"Remover":"Aplicar",onClick:()=>f(),disabled:c,children:String(m).length&&o||i?n.jsx(d.Icon,{name:"close",size:"small"}):`${r.messages.promo_code_button}`}),supportText:u==="cep"&&h==="success"?n.jsx(d.TextField.SupportText,{text:"Mais informações de frete na etapa a seguir",feedback:"success",title:"support"}):null})})};Gl.displayName="MiniCart.Field";const ea=e=>{const t=e*100;return Math.round(t)},Gf=e=>(e/100).toFixed(2).replace(".",","),Kf=(e,t)=>{const{valueType:r,remainingValueToActivate:s}=e;if(r==="quantity")return`Adicione mais ${s} ${s===1?"item":"itens"} ${t}`;if(r==="price"){const a=s===100?"Falta":"Faltam",o=Gf(s);return`${a} R$ ${o} ${t}`}return t},Kl=({ICONS:e})=>{var v;const{promotionRules:t,data:r,cartStore:s,cartStore:{items:a,marketingData:o},addCouponSeller:i,setIsOpen:c}=ve(),{sendDataLayerEvent:l}=ae(),u=(v=r==null?void 0:r.promotion)==null?void 0:v.promotionCart,m=g.useRef(!1),{router:p}=ce();if(g.useEffect(()=>{(u==null?void 0:u.selectPromotion)==="Cupom"&&(t==null?void 0:t.remainingValueToActivate)&&(t==null?void 0:t.remainingValueToActivate)<=0&&(u==null?void 0:u.cupom)&&!m.current&&(o==null?void 0:o.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,o==null?void 0:o.coupon,i]),!t||!u||u.selectPromotion==="Desativar"||a.length===0)return null;const f=u.title,h=u.subtitle,_=u.titleSuccess,y=u.subtitleSuccess,x=u.linkLabel;return n.jsxs("div",{className:re["mc--body--promotion"],children:[t.remainingValueToActivate>0&&n.jsx(d.Closeness,{className:re["mc--body--promotion--closeness"],title:Kf(t,f),subtitle:h,percentage:ea(t.completeness),iconLink:e.arrow_right,linkLabel:x,onClick:()=>{l({functionKey:"viewCartEvent",data:{event:"closeness_view_more",commonData:{cartStore:s}}}),p.push(`${u.link}`),c(!1)}}),t.remainingValueToActivate<=0&&n.jsx(d.Closeness,{className:`${re["mc--body--promotion--closeness"]} ${re["mc--body--promotion--closeness--success"]}`,title:_,subtitle:y,percentage:ea(t.completeness)})]})};Kl.displayName="MiniCart.Modal.Body.Promotion";const Xl=({TIPBAR_CONFIGS:e})=>{const{data:t,cartStore:r,cartStore:{items:s,marketingData:a},addCouponSeller:o}=ve(),i=t==null?void 0:t.flags.flagCart.flagCupom,c=(a==null?void 0:a.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(!r.items.length){p(!0);return}(await o(i==null?void 0:i.valueCupom,"coupon")).code!==200&&u(!0)};return n.jsxs("div",{className:re["mc--body--coupon-tag"],style:{backgroundColor:`${i.tagColor}`,color:`${i.textColor}`},children:[n.jsx("div",{className:re["mc--body--coupon-tag--text"],dangerouslySetInnerHTML:{__html:i.value}}),n.jsx("div",{className:re["mc--body--coupon-tag--button"],children:n.jsx(d.Button,{variant:"quaternary",mode:"inverse",onClick:f,disabled:c,children:c?"Cupom Aplicado":"Aplicar Cupom"})})]})};Xl.displayName="MiniCart.Modal.Body.CouponTag";const Yl=({children:e,ICONS:t,MINICART_CONFIG:r,NAME_SPLIT_SYMBOL:s,PLP_NOT_RESULT:a,TEXTURE_IMAGE:o,TIPBAR_CONFIGS:i,TOGGLE_STYLE_MODIFIER:c})=>{const{cartStore:{items:l,messages:u}}=ve();return n.jsxs(d.Modal.Body,{className:re["mc--body"],children:[e,n.jsx(Kl,{ICONS:t}),n.jsx(Xl,{TIPBAR_CONFIGS:i}),n.jsx("div",{className:re["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 n.jsx(Me.Card,{available:!m.availability.includes("outStock")||!f,index:p,product:m,ICONS:t,MINICART_CONFIG:r,NAME_SPLIT_SYMBOL:s,TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:c},`${m.id}-${m.itemOffered.sku}-${p}`)}):n.jsx(Me.Feedback,{ICONS:t,MINICART_CONFIG:r,PLP_NOT_RESULT:a})})]})};Yl.displayName="MiniCart.Body";const Ql=({children:e,storeConfig:t,MINICART_CONFIG:r})=>{const{cartStore:s}=ve();if(s.items.length===0)return null;const a=()=>{var i;const o=new URLSearchParams({orderFormId:s.id,...((i=s.marketingData)==null?void 0:i.utmCampaign)&&{utm_campaign:s.marketingData.utmCampaign}});window.location.href=`${t.checkoutUrl}?${o.toString()}#/cart`};return n.jsxs(d.Modal.Footer,{className:re["mc--footer"],children:[e,n.jsx("div",{className:re["mc--footer--actions"],children:n.jsx(d.Button,{variant:"primary",size:"large","data-close":!0,className:re["mc--footer--actions-button"],onClick:a,children:r.messages.checkout_button})})]})};Ql.displayName="MiniCart.Modal.Footer";const Zl=({children:e,ICONS:t,MINICART_CONFIG:r,Z_INDEX_WAR:s})=>{const[a,o]=g.useState(!1),i=g.useRef(null),c=()=>o(l=>!l);return n.jsxs(n.Fragment,{children:[a&&n.jsx(d.Tooltip.Root,{arrow:"right",position:"top",top:-3,left:-3,component:n.jsx("p",{children:"Código da vendedora, cupom ou cálculo do frete"}),id:"inputs--tooltip",className:re["inputs--tooltip"],style:{zIndex:s.modal},isOpen:!0,size:"medium",parent:i.current}),n.jsxs(d.Accordion.Wrapper,{className:re["mc--discount"],children:[n.jsx(d.Accordion.Header,{id:"frete",title:"Frete",closeIndicator:n.jsx(d.Icon,{name:t.arrow_up,size:"medium"}),openIndicator:n.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),className:d.helpers.classNameConcat(re["mc--discount--header"]),startOpen:r.promotion_input_starts_open,children:n.jsxs(d.TextStructure.Root,{children:[n.jsx(d.TextStructure.DivWrapper,{children:n.jsxs("h3",{className:"typography-style-body-sm",children:[r.messages.promo_code_title," "]})}),n.jsx("div",{ref:i,onMouseEnter:c,onMouseLeave:c,"aria-label":"Mostrar descrição",children:n.jsx(d.Icon,{name:t.alert_circle,size:"small"})})]})}),n.jsx(d.Accordion.Body,{className:re["mc--discount--body"],children:e})]})]})};Zl.displayName="MiniCart.Discount";const Jl=({discount:e,shipping:t,total:r})=>{var l,u;const{data:s}=ve(),a=(u=(l=s==null?void 0:s.flags)==null?void 0:l.flagCart)==null?void 0:u.flagTotal,o=r-Math.abs(e??0)+(t??0),i=t===0?"Frete Grátis":T.formatPriceToCurrency((t??0)/100),c=[{title:"Frete",value:t===void 0?"A calcular":i},{title:"Desconto",value:T.formatPriceToCurrency((e??0)/100)},{message:(a==null?void 0:a.value)??"",title:"Total",value:`1x de ${T.formatPriceToCurrency(o/100)}`}];return n.jsx("div",{className:re["mc--footer--total"],children:Array.isArray(c)&&c.map((m,p)=>n.jsxs("div",{className:re["mc--footer--total--info"],"data-discount":m.title==="Desconto",children:[n.jsx("p",{children:m.title}),n.jsxs("div",{className:re["mc--footer--total--info--content"],children:[m.message&&(a==null?void 0:a.active)==="Ativar"&&n.jsx(d.Tag,{variant:"primary",title:m.message,style:{backgroundColor:a==null?void 0:a.tagColor,color:a==null?void 0:a.textColor},children:m.message}),n.jsx(d.ProductInfo.Price,{className:re["mc--footer--total--info"],label:m.title,value:m.value})]})]},p))})};Jl.displayName="MiniCart.Modal.Footer.Resume.Items";const eu=()=>{var a,o,i;const{totalizers:e}=bt(),t=((a=e.find(c=>c.id==="Items"))==null?void 0:a.value)??0,r=(o=e.find(c=>c.id==="Discounts"))==null?void 0:o.value,s=(i=e.find(c=>c.id==="Shipping"))==null?void 0:i.value;return n.jsx(Jl,{discount:r??0,total:t,shipping:s})};eu.displayName="MiniCart.Modal.Footer.Totals";const tu=({ICONS:e,MINICART_CONFIG:t})=>{const{isMobile:r}=ne(),{cartStore:{items:s}}=ve(),a=s.reduce((o,i)=>o+(i.quantity??0),0);return n.jsx(d.Modal.Header,{navigation:"top",className:re["mc--header"],children:n.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!r,children:[n.jsx(d.Modal.Title,{navigation:"top",title:t.messages.title}),n.jsx("span",{className:re["mc--header--subtitle"],children:a!==1?`[${a}] Produtos`:`[${a}] Produto`}),n.jsx(d.Button,{"data-close":!0,iconNameStart:e.close,size:"small",variant:"tertiary"})]})})};tu.displayName="MiniCart.Modal.Header";const nu=({ICONS:e,MINICART_CONFIG:t})=>{const{cartStore:{shippingData:r},shipping:s,removeCEP:a}=ve(),{sendDataLayerEvent:o}=ae(),[i,c]=g.useState(!1),[l,u]=g.useState(!1),m=g.useCallback(()=>{var C;const v=((C=r==null?void 0:r.address)==null?void 0:C.postalCode)??"";return v.length===8&&!v.includes("-")?`${v.slice(0,5)}-${v.slice(5)}`:v},[r]),[p,f]=g.useState(!!m()),h=()=>{f(!1),c(!1)},_=v=>{var C;if(typeof v=="object"&&(v!=null&&v.logisticsInfo))return(C=v.logisticsInfo)==null?void 0:C.reduce((j,b)=>{var R;const w=(R=b==null?void 0:b.slas)==null?void 0:R.find(k=>(k==null?void 0:k.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 N=parseInt(j.delivery_time??"0");return S>N&&(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 v=>{const C=v.replace(/\D/g,"");if(C.length!==8)return!1;try{return!(await kt.get(`https://viacep.com.br/ws/${C}/json/`)).data.erro}catch{return!1}},x=async v=>{if(u(!0),!!m()||!(v!=null&&v.trim())){await a(),h(),u(!1);return}if(!await y(v)){c(!0),f(!1),u(!1);return}try{const w=await s(v);if(c(!1),w){f(!0);const S=_(w);S&&o({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:S}})}}catch{c(!0)}finally{u(!1)}};return n.jsx(Me.Field,{hasSuccess:p,hasError:i,isLoading:l,onHandler:x,title:`${t.messages.shipping_calculation_placeholder}`,type:"cep",value:m(),ICONS:e,MINICART_CONFIG:t})};nu.displayName="MiniCart.Shipping";const ru=()=>{var r,s;const{data:e}=ve(),t=(s=(r=e==null?void 0:e.flags)==null?void 0:r.flagCart)==null?void 0:s.flagHeader;return t!=null&&t.value?n.jsx(d.Tag,{variant:"tertiary",title:t==null?void 0:t.value,size:"small",adornment:{start:t!=null&&t.enableIcon&&(t!=null&&t.icon)?n.jsx(d.Icon,{name:t==null?void 0:t.icon,style:{color:t==null?void 0:t.iconColor}}):null},style:{background:t==null?void 0:t.tagColor,color:t==null?void 0:t.textColor,width:"100%"},children:t==null?void 0:t.value}):null};ru.displayName="MiniCart.TagMessage";const Me={Body:Yl,Card:ql,Cashback:Hl,CouponSeller:$l,Discount:Zl,Field:Gl,Feedback:Vl,Shipping:nu,Footer:Ql,Header:tu,TagMessage:ru,Totals:eu},Xf=({ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,PLP_NOT_RESULT:s,TEXTURE_IMAGE:a,TIPBAR_CONFIGS:o,TOGGLE_STYLE_MODIFIER:i,Z_INDEX_WAR:c,storeConfig:l,minicartStyleModifiers:u})=>{const{isOpen:m,setIsOpen:p}=ve(),{isMobile:f}=ne();return n.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(re["minicart--modal-modifier"],u),isMobile:!0,isOpen:m,setIsOpen:p,style:{zIndex:c.modal},variant:f?"sideBottom":"sideRight",children:[n.jsx(Me.Header,{ICONS:e,MINICART_CONFIG:t}),n.jsx(Me.Body,{ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,PLP_NOT_RESULT:s,TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:i,TIPBAR_CONFIGS:o,children:n.jsx(Me.TagMessage,{})}),n.jsxs(Me.Footer,{MINICART_CONFIG:t,storeConfig:l,children:[n.jsxs(Me.Discount,{ICONS:e,MINICART_CONFIG:t,Z_INDEX_WAR:c,children:[n.jsx(Me.CouponSeller,{type:"seller",ICONS:e,MINICART_CONFIG:t}),n.jsx(Me.CouponSeller,{type:"coupon",ICONS:e,MINICART_CONFIG:t}),n.jsx(Me.Shipping,{ICONS:e,MINICART_CONFIG:t})]}),n.jsx(Me.Totals,{})]}),n.jsx(Ol,{ICONS:e})]})},su=({tipBar:e,minicartStyleModifiers:t,menuV2:r,storeConfig:s,className:a})=>{const{structureRef:o,rootRef:i,CONSTANTS:c}=Ne(),{header:{HEADER_CONFIGS:l,Z_INDEX_WAR:u},minicart:m}=c;return n.jsx(d.Header.Structure,{innerRef:o,adornment:{start:e},style:{position:"sticky",top:0,zIndex:u.header},className:d.helpers.classNameConcat(Js["header-animation"],a),children:n.jsxs(d.Header.Root,{innerRef:i,style:{zIndex:u.header},variant:l.default_variant,interactiveVariant:l.interactive_variant,children:[r??n.jsxs(Tf,{children:[n.jsx("div",{className:T.responsive["responsive-mobile-block"],style:{height:"100%",width:"100%",zIndex:u.header_mobile},children:n.jsx(Al,{storeConfig:s})}),n.jsx("div",{className:T.responsive["responsive-desktop-block"],style:{height:"100%",width:"100%",zIndex:u.header_desktop},children:n.jsx(yl,{storeConfig:s})})]}),n.jsx(Bf,{children:n.jsx(Xf,{...m,minicartStyleModifiers:t})}),n.jsx(Ks,{title:"Produto adicionado à sua sacola!",CONSTANTS:c.addToCart})]})})};su.displayName="Header";const Yf="_shippingFreight_6z8rf_6",Qf="_shippingFreight__postalCodeGrid_6z8rf_10",Zf="_shippingFreight__grid_6z8rf_14",Jf="_shippingFreight__grid__title_6z8rf_18",eh="_shippingFreight__grid__remember_6z8rf_29",th="_postalCodeContainer_6z8rf_44",nh="_deliveryStatusBar__tag_6z8rf_49",rh="_deliveryStatusBarError__tag_6z8rf_66",sh="_deliveryInfo_6z8rf_74",oh="_deliveryInfo__content_6z8rf_78",ah="_deliveryInfo__text_6z8rf_84",ih="_deliveryInfo__title_6z8rf_89",ch="_deliveryInfo__subtitle_6z8rf_99",lh="_deliveryInfo__tooltipIcon_6z8rf_109",uh="_deliveryInfo__tooltip_6z8rf_109",dh="_freightGrid_6z8rf_148",mh="_freightContainer_6z8rf_155",ph="_freightOption__content_6z8rf_160",fh="_freightOption__value_6z8rf_166",hh="_freightOption__title_6z8rf_177",_h="_freightOption__title_item_6z8rf_181",gh="_freightOption__paragraph_6z8rf_192",ue={shippingFreight:Yf,shippingFreight__postalCodeGrid:Qf,shippingFreight__grid:Zf,shippingFreight__grid__title:Jf,shippingFreight__grid__remember:eh,postalCodeContainer:th,deliveryStatusBar__tag:nh,deliveryStatusBarError__tag:rh,deliveryInfo:sh,deliveryInfo__content:oh,deliveryInfo__text:ah,deliveryInfo__title:ih,deliveryInfo__subtitle:ch,deliveryInfo__tooltipIcon:lh,deliveryInfo__tooltip:uh,freightGrid:dh,freightContainer:mh,freightOption__content:ph,freightOption__value:fh,freightOption__title:hh,freightOption__title_item:_h,freightOption__paragraph:gh,"input-modifier":"_input-modifier_6z8rf_207","freight--tooltip":"_freight--tooltip_6z8rf_227"},yh=({icon:e,title:t,subtitle:r,packageCount:s,packageUnit:a="",labelDescription:o,freightConfig:i,toolTipZIndex:c})=>{const[l,u]=g.useState(!1),m=g.useRef(null),p=()=>u(f=>!f);return n.jsxs("div",{className:ue.deliveryInfo,ref:m,children:[n.jsx(d.Tooltip.Root,{arrow:"bottom",component:n.jsx("div",{children:n.jsx("p",{children:i.messages.select_size_tag})}),id:"freight--tooltip",className:ue["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:m.current}),n.jsxs("div",{className:ue.deliveryInfo__content,children:[n.jsx("div",{className:ue.deliveryInfo__icon,children:n.jsx(d.Icon,{name:e,size:"medium"})}),n.jsxs("div",{className:ue.deliveryInfo__text,children:[n.jsxs("span",{className:ue.deliveryInfo__title,children:[t," ",s," ",a]}),r&&n.jsx("span",{className:ue.deliveryInfo__subtitle,children:r})]}),o&&n.jsxs("div",{className:ue.deliveryInfo__tooltipIcon,onMouseEnter:p,onMouseLeave:p,"aria-label":"Mostrar descrição",children:[n.jsx("span",{children:n.jsx(d.Icon,{name:i.icons.feedback_help,size:"small"})}),l&&n.jsx("div",{className:ue.deliveryInfo__tooltip,children:o})]})]})]})},xh=({value:e,title:t,paragraph:r})=>n.jsx("div",{className:ue.freightOption,children:n.jsxs("div",{className:ue.freightOption__content,children:[n.jsx("span",{className:ue.freightOption__value,children:e}),n.jsx("span",{className:ue.freightOption__title,children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{className:ue.footer__item,children:[n.jsx("span",{className:ue.freightOption__title_item,children:t}),r&&n.jsx("span",{className:ue.freightOption__paragraph,children:r})]})})})]})}),vh=({children:e})=>n.jsx("div",{className:ue.freightContainer,children:e}),bh=({children:e})=>n.jsx("div",{className:ue.freightGrid,children:e}),jh=({children:e})=>n.jsx("div",{className:ue.postalCodeContainer,children:e}),ta=({message:e,seller:t="",size:r="small",setError:s})=>n.jsx("div",{className:s?ue.deliveryStatusBarError:ue.deliveryStatusBar,children:n.jsxs(d.Tag,{title:e,className:s?ue.deliveryStatusBarError__tag:ue.deliveryStatusBar__tag,size:r,children:[e," ",!s&&t]})}),Ch=e=>{const t=parseInt(e,10);return t===1?`${t} dia`:`${t} dias`},Sh=e=>{var r,s,a;const t=[];return(a=(s=(r=e==null?void 0:e.logisticsInfo)==null?void 0:r[0])==null?void 0:s.slas)==null||a.forEach(o=>{t.push({id:o.id,name:o.name,price:o.price,shippingEstimate:o.shippingEstimate})}),t},Ph=({component:e,parent:t,top:r,left:s,target:a,contentRef:o,freightConfig:i,toolTipZIndex:c=999,...l})=>{const{isMobile:u}=ne();return n.jsx(n.Fragment,{children:u?n.jsx(d.Tooltip.Root,{arrow:"bottom",component:n.jsxs("div",{...l,ref:o,children:[e,n.jsx("p",{children:i.messages.select_size_tag})]}),id:"freight--tooltip",className:ue["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:t}):n.jsx(d.Tooltip.Root,{arrow:"bottom",component:n.jsxs("div",{...l,ref:o,children:[e,n.jsx("p",{children:i.messages.select_size_tag})]}),id:"freight--tooltip",className:ue["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-110%",left:"3%",parent:t})})},wh=({onUpdateFreightItems:e,sellerId:t,size:r,skuId:s,quantity:a,setError:o,setIsButtonClicked:i,component:c,freightConfig:l,toolTipZIndex:u})=>{var O,M,X,D;const m=bt(),p=bt(q=>q.shipping),[f,h]=g.useState(),[_,y]=g.useState(!1),[x,v]=g.useState(!1),[C,j]=g.useState(!1),b=(M=(O=m.shippingData)==null?void 0:O.address)==null?void 0:M.postalCode,w=!(f!=null&&f.length)&&b?b:f,S=g.useRef(null),P=async q=>{const Q=q.target.value.replace(/\D/g,"").slice(0,8);Q.length>5?h(Q.replace(/^(\d{5})(\d{1,3})/,"$1-$2")):h(Q)},N=async q=>{const U=q.target.value.replace(/\D/g,"");try{if((await kt.get(`https://viacep.com.br/ws/${U}/json/`)).data.erro){o&&o(l.messages.cep_not_found),i(!1),v(!0);return}o&&o(""),v(!1)}catch{console.log("Erro ao validar o CEP. Tente novamente mais tarde.")}},R=async()=>{y(!0);try{const q=await kt.post("/api/checkout/simulation",{items:[{id:s,quantity:a,seller:t}],country:"BRA",postalCode:w});e(Sh(q.data))}catch(q){console.error("Erro ao atualizar o documento:",q)}finally{y(!1),p(w,"BRA")}},k=async()=>{if(!s){j(!0),setTimeout(()=>j(!1),1500);return}await N({target:{value:w}}),_||(R(),i(!0))};return n.jsxs("div",{ref:S,style:{position:"relative"},children:[!s&&C?n.jsx(Ph,{component:c,isOpen:C,parent:S.current,toolTipZIndex:u,freightConfig:l}):n.jsx(n.Fragment,{}),n.jsx("div",{style:{position:"relative"},children:n.jsx(d.TextField.Structure,{title:"structure",style:{width:"100%"},input:n.jsx(d.TextField.Input,{defaultValue:(D=(X=m.shippingData)==null?void 0:X.address)==null?void 0:D.postalCode,label:l.messages.text_input_label,title:"textfield",value:f,sizeVariant:r,onMouseOver:()=>s?null:j(!0),onMouseOut:()=>s?null:j(!1),mode:"simple",onChange:P,onKeyDown:q=>{q.key==="Enter"&&k()},className:ue["input-modifier"],feedback:x?"error":"none"}),right:n.jsx(d.Button,{onClick:k,size:r,title:"button",children:_?n.jsx(d.Spinner,{size:"small",indicatorColor:"#ffffff"}):l.messages.text_input_btn})})})]})},Nh=({children:e,freightConfig:t})=>n.jsxs("div",{className:ue.shippingFreight,children:[n.jsxs("div",{className:ue.shippingFreight__grid,children:[n.jsx("span",{className:ue.shippingFreight__grid__title,children:t.messages.title}),n.jsx("span",{className:ue.shippingFreight__grid__remember,children:n.jsx(Oe,{href:"https://buscacepinter.correios.com.br/app/endereco/index.php",passHref:!0,target:"_blank",rel:"noopener noreferrer",size:"x-small",disablePadding:!1,title:t.messages.remember_cep,children:t.messages.remember_cep})})]}),n.jsx("div",{className:ue.shippingFreight__postalCodeGrid,children:e})]}),Eh=({children:e})=>n.jsx("div",{className:ue.freightContainer,children:e}),ou=({className:e,sellerId:t,skuId:r,quantity:s,size:a,seller:o,local:i,CONSTANTS_PROPS:c})=>{const{sendDataLayerEvent:l}=ae(),[u,m]=g.useState(""),[p,f]=g.useState([]),[h,_]=g.useState(""),[y,x]=g.useState(!1),v=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 n.jsxs(Eh,{className:e,children:[n.jsxs(Nh,{freightConfig:c.freightConfig,children:[n.jsx(jh,{children:n.jsx(wh,{onUpdateFreightItems:C,skuId:r,quantity:s,size:a,sellerId:t,local:i,setError:_,setIsButtonClicked:x,freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex})}),h?n.jsx(ta,{size:a,message:h,setError:_}):p.length>0&&n.jsx(ta,{size:a,message:c.freightConfig.messages.delivered_by,seller:o})]}),y&&!h?p.length>0&&n.jsxs(vh,{children:[n.jsx(bh,{children:p.filter(({id:j})=>!j.includes("Retirada")).map(j=>n.jsx(xh,{id:j.id,value:T.freightParsePrice({valueInCents:j.price,hasFree:!1,freeTaxMessage:c.freightConfig.messages.free_tax}),title:j.name,paragraph:`${c.freightConfig.messages.prefix_days}${Ch(j.shippingEstimate)}`,radioValue:u,changeValue:v},j.id))}),c.deliveryInfoBoxesAllowed?n.jsx(yh,{icon:c.freightConfig.icons.delivery_truck,packageUnit:c.freightConfig.messages.unit_amout,title:c.freightConfig.messages.delivered_amount_packages,subtitle:"",packageCount:1,labelDescription:"Label",freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex??999}):n.jsx(n.Fragment,{})]}):null]})},Ct={"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"},Ih=({children:e,href:t,isLast:r,title:s,ICONS:a})=>n.jsx(d.BreadCrumb.Item,{adornment:{end:r&&n.jsx(d.Icon,{name:a.arrow_right})},children:r?n.jsx(Oe,{href:t??"/",size:"medium",title:s,disableUnderline:!0,children:e}):e}),au=()=>{var o;const{state:e}=ze(),{ICONS:t}=De(),r=e!=null&&e.term&&e.term.length>0?`/${e.term}`:"",s=decodeURIComponent((o=e==null?void 0:e.base)!=null&&o.length?e.base:r??r).slice(1).split("/"),a=Li(s);return n.jsx("div",{className:Ct["pcd-navigation--breadcrumb"],children:n.jsx(d.BreadCrumb.DivWrapper,{children:n.jsx(d.BreadCrumb.List,{children:Array.isArray(a)&&a.map((i,c)=>{var l,u;return g.createElement(Ih,{...i,isLast:c!==a.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," "))})})})})};au.displayName="PLPNavigation.BreadCrumb";const iu=({children:e,...t})=>n.jsxs("div",{...t,className:Ct["pdc-navigation--content"],children:[n.jsx(ht.Filters,{}),e]});iu.displayName="PLPNavigation.Content";const Rh="_sort_35wro_1",er={sort:Rh,"sort-list-wrapper":"_sort-list-wrapper_35wro_8","sort-list":"_sort-list_35wro_8","sort-button":"_sort-button_35wro_25"},Th=({children:e,sortListOpen:t,btnAdornment:r,style:s,...a})=>n.jsx(d.Button,{...a,adornment:{end:t?r==null?void 0:r.listOpen:r==null?void 0:r.listClosed},size:"small",variant:"tertiary",style:{...s,textDecoration:"none"},className:er["sort-button"],children:e}),Ah=e=>n.jsx(d.RadioButton.Radio,{...e}),kh=({children:e,className:t,name:r,...s})=>n.jsx(d.RadioButton.Group,{...s,name:r||"sort-group",className:d.helpers.classNameConcat(er["sort-list"],t),children:e}),Oh=({children:e,className:t,shadow:r=!0,padding:s="small",height:a="fit-content",...o})=>n.jsx(d.Card,{...o,shadow:r,className:d.helpers.classNameConcat(er["sort-list-wrapper"],t),padding:s,height:a,children:e}),cu=g.forwardRef(({children:e,className:t,...r},s)=>n.jsx("div",{...r,ref:s,className:d.helpers.classNameConcat(er.sort,t),children:e}));cu.displayName="SortRoot";const tr=({handleSelectValue:e,sortListOpen:t,setSortListOpen:r,searchParams:s,ICONS:a,...o})=>{var f;const i=(f=s==null?void 0:s.get("sort"))==null?void 0:f.replace(":","_"),[c,l]=g.useState(i),{sendDataLayerEvent:u}=ae();g.useEffect(()=>{l(i||void 0)},[i]);const{ref:m}=ml(()=>r(!1)),p=h=>{const _=h.target.value;l(_),typeof e=="function"&&e(_),u({functionKey:"filterEvent",data:{customData:{ordering:qt.options[_]}}}),r(!1)};return n.jsxs(cu,{...o,ref:m,children:[n.jsx(Th,{btnAdornment:{listOpen:n.jsx(d.Icon,{name:a.arrow_up,size:"small"}),listClosed:n.jsx(d.Icon,{name:a.arrow_down,size:"small"})},sortListOpen:t,onClick:()=>r(!t),children:c?qt.options[c]:qt.placeholder},"sort-button"),t&&n.jsx(Oh,{children:n.jsx(kh,{name:"sort-group",value:c??"",onChange:p,children:Object.keys(qt.options).map(h=>n.jsx(Ah,{label:qt.options[h],value:h},h))})})]})};tr.displayName="Sort";const lu=g.createContext({}),Lh=({children:e,...t})=>{const[r,s]=g.useState(!1);return n.jsx(lu.Provider,{value:g.useMemo(()=>({...t,openOrderBy:r,setOpenOrderBy:s}),[t,r,s]),children:e})},Mh=()=>{const e=g.useContext(lu);if(e===void 0)throw new Error("usePLPNavigationContext must be used within a PDCNavigationProvider");return e},uu=()=>{const{openOrderBy:e,onSort:t,setOpenFilters:r,setOpenOrderBy:s}=Mh(),{ICONS:a,PDC_NAVIGATION:o,searchParams:i}=De();return n.jsxs("div",{className:Ct["pdc-navigation--filters"],children:[n.jsx(ht.BreadCrumb,{}),n.jsxs("div",{className:Ct["pdc-navigation--filters--content"],children:[n.jsx(tr,{handleSelectValue:c=>t(c??"release_desc"),sortListOpen:e,setSortListOpen:s,ICONS:a,searchParams:i}),n.jsx(d.Button,{adornment:{end:n.jsx(d.Icon,{name:a.arrow_down})},onClick:()=>r(!0),size:"small",variant:"tertiary",children:o.filter_button}),n.jsx(ht.Total,{})]})]})};uu.displayName="PLPNavigation.Filters";const du=({children:e,onSort:t,setOpenFilters:r,style:s,...a})=>{const o=g.useRef(null);return n.jsx(Lh,{onSort:t,setOpenFilters:r,children:n.jsx("div",{...a,className:Ct["pdc-navigation"],ref:o,style:{...s},children:n.jsx(ht.Content,{children:e})})})};du.displayName="Root";const mu=({callback:e,selected:t,...r})=>n.jsx("div",{...r,className:Ct["pdc-navigation--selected"],children:n.jsx("div",{className:Ct["pdc-navigation--selected--container"],children:Array.isArray(t)?t.map(s=>s.key==="productclusterids"?null:n.jsx(ht.SelectedItem,{callback:e,facet:s},s.value)):null})});mu.displayName="PLPNavigation.Selected";const to=({key:e,PLP_FILTERS:t})=>t.some(r=>r.key===e)?e==="cores-filtraveis":!1,no=({value:e,PLP_FILTERS_COLORS:t})=>{var r;return((r=t.find(s=>s.value===e))==null?void 0:r.color)??"#F2F2F2"},pu=({key:e,PLP_FILTERS:t})=>{var r;return(r=t.find(s=>s.key===e))==null?void 0:r.label},fu=({key:e,PLP_FILTERS:t})=>{var r;return((r=t.find(s=>s.key===e))==null?void 0:r.order)??0},os=({value:e})=>{const[t,r]=e.split(":").length===2?e.split(":"):[0,0],s=T.formatPriceToCurrency(Number(r));return`${T.formatPriceToCurrency(Number(t))} até ${s}`},hu=({items:e})=>{const t=e.flatMap(a=>[a.range.from,a.range.to]),r=Math.min(...t.map(Math.abs)),s=Math.max(...t.map(Math.abs));return[r,s]},_u=Object.freeze(Object.defineProperty({__proto__:null,checkedColor:to,createTagPrice:os,getAbsoluteMinMax:hu,getColor:no,getName:pu,getOrder:fu},Symbol.toStringTag,{value:"Module"})),Ve={"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"},gu=({columns:e=2,CONSTANTS:t,...r})=>{var o;const{filters:s,onToggleFacet:a}=Ut();return n.jsxs("div",{...r,className:Ve["filter--modal--body--content"],children:[Array.isArray(s.facets)&&s.facets.map(i=>n.jsx(ct.Item,{columns:e,facet:i,onToggleFacet:a,CONSTANTS:t},i.key)),!((o=s.facets)!=null&&o.length)&&n.jsx(ct.Empty,{PLP_FILTERS_EMPTY:t.PLP_FILTERS_EMPTY})]})};gu.displayName="Filter.Item.Content";const yu=({PLP_FILTERS_EMPTY:e})=>{const t=()=>{window.history.back()};return n.jsxs("div",{className:Ve["filter--empty"],children:[n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h4",{children:e.title}),n.jsx("p",{children:e.subtitle})]}),n.jsx(d.Button,{onClick:()=>t(),variant:"tertiary",children:e.button})]})};yu.displayName="Filter.Empty";const xu=({columns:e,facet:t,onToggleFacet:r,CONSTANTS:s,...a})=>{const o=fu({key:t.key,PLP_FILTERS:s.PLP_FILTERS}),i=()=>{if(t.__typename==="FacetBoolean"){if(t.key==="cores-filtraveis")return n.jsx(ct.Colors,{onToggleFacet:r,values:t.values,PLP_FILTERS:s.PLP_FILTERS,PLP_FILTERS_COLORS:s.PLP_FILTERS_COLORS});if(t.key==="tamanho")return n.jsx(ct.Sizes,{onToggleFacet:r,values:t.values,PLP_SIZE_ORDER:s.PLP_SIZE_ORDER});if(t.key==="category-2")return n.jsx(ct.Toggle,{columns:e,facetKey:t.key,onToggleFacet:r,values:t.values,ICONS:s.ICONS})}return t.__typename==="FacetRange"?n.jsx(ct.Price,{facet:t}):n.jsx("p",{children:"Filter not support!!!"})};return n.jsx("div",{...a,className:Ve["filter--item"],style:{order:o},children:n.jsxs(d.Accordion.Wrapper,{style:{width:"100%"},children:[n.jsx(d.Accordion.Header,{id:t.key,closeIndicator:n.jsx(d.Icon,{name:s.ICONS.arrow_up}),openIndicator:n.jsx(d.Icon,{name:s.ICONS.arrow_down}),children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h4",{className:"typography-style-body-sm",children:pu({key:t.key,PLP_FILTERS:s.PLP_FILTERS})})})})}),n.jsx(d.Accordion.Body,{children:i()})]})})};xu.displayName="Filter.Item";const vu=({onToggleFacet:e,values:t,PLP_FILTERS:r,PLP_FILTERS_COLORS:s,...a})=>n.jsx(et.Root,{...a,children:n.jsx(et.List,{children:Array.isArray(t)&&t.map(({key:o,selected:i,value:c})=>n.jsx(et.Option,{active:i,"data-color":to({key:o,PLP_FILTERS:r}),fill:no({value:c,PLP_FILTERS_COLORS:s}),onClick:()=>e({key:o,value:c}),type:"color"},`${o}-${c}`))})});vu.displayName="Filter.Item.Color";const bu=({facet:e,...t})=>{var u,m;const{filters:{selected:r},price:s,onToggleFacet:a}=Ut(),[o,i]=(s==null?void 0:s.split(":").map(Number))??[0,100],[c,l]=((m=(u=r==null?void 0:r.find(({key:p})=>p==="price"))==null?void 0:u.value)==null?void 0:m.split(":").map(Number))??[o,i];return n.jsx("div",{...t,className:Ve["filter--item--price"],children:n.jsxs(d.Slider.SliderDual,{format:"price",initialValue:[c<o?o:c,l>i?i:l],min:o,max:i,type:"dual",step:1,onFinish:p=>{var f,h;p&&a({key:"price",value:`${(f=p.range)==null?void 0:f.min}:${(h=p.range)==null?void 0:h.max}`})},children:[n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{"data-min-value":!0})})}),n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{"data-max-value":!0})})})]})})};bu.displayName="Filter.Item.Price";const ju=({onToggleFacet:e,values:t,PLP_SIZE_ORDER:r,...s})=>{const a=[...t].sort((o,i)=>{const c=r.indexOf(o.name),l=r.indexOf(i.name);return c-l});return n.jsx(et.Root,{...s,children:n.jsx(et.List,{children:Array.isArray(a)&&a.map(({key:o,selected:i,value:c})=>n.jsx(et.Option,{active:i,text:c,type:"size",onClick:()=>e({key:o,value:c})},c))})})};ju.displayName="Filter.Item.Sizes";const Cu=({columns:e,facetKey:t,onToggleFacet:r,values:s,ICONS:a,...o})=>n.jsx("div",{...o,className:Ve["filter--item--toggle"],children:n.jsx("div",{className:Ve["filter--item--toggle--container"],style:{gridTemplateColumns:`repeat(${e}, 1fr)`},children:Array.isArray(s)&&s.map(i=>n.jsx(d.Checkbox,{label:(i==null?void 0:i.name)??"",adornment:n.jsx(d.Icon,{name:a.check}),checked:i.selected,onChange:()=>r(i)},i.value))})});Cu.displayName="Filter.Item.Toggle";const Su=({...e})=>{const{isLoading:t}=Ut();return n.jsx("div",{className:Ve["filter--loading"],"data-active":t,...e,children:n.jsx(d.Spinner,{indicatorColor:"#000",background:"#222"})})};Su.displayName="Filter.Loading";const Pu=({children:e,className:t,isMobile:r=!1,CONSTANTS:{PLP_FILTERS_TITLE:s,ICONS:a}})=>{var m;const{deleteAllFacets:o,filters:i,isOpen:c,target:l,setIsOpen:u}=Ut();return n.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(Ve["filter--modal"],t),isMobile:r??!1,isOpen:c,parent:l,setIsOpen:u,variant:r?"sideBottom":"sideRight",style:{zIndex:99},children:[n.jsxs(d.Modal.Header,{navigation:"top",children:[n.jsx(d.Modal.Controls,{navigation:"top",isMobile:r,children:n.jsx(d.Button,{"data-close":!0,iconNameStart:a.close,size:"small",variant:"tertiary",style:{marginLeft:"auto"}})}),n.jsx(d.Modal.Title,{navigation:"top",title:s})]}),n.jsxs(d.Modal.Body,{style:{width:500},children:[n.jsx("div",{className:Ve["filter--modal--body"],children:e}),n.jsx(ct.Loading,{})]}),n.jsx(d.Modal.Footer,{children:n.jsxs("div",{className:Ve["filter--modal--footer"],children:[n.jsx(d.Button,{"data-close":!0,size:"large",variant:"primary",children:(m=i.facets)!=null&&m.length?"ver resultados":"fechar"}),n.jsx(d.Button,{"data-close":!0,onClick:()=>o(),variant:"tertiary",children:"limpar filtros"})]})})]})};Pu.displayName="Filter.Modal";const wu=({children:e,className:t,isMobile:r,CONSTANTS:s,...a})=>n.jsx(Zi,{...a,PLP_FILTERS:s.PLP_FILTERS,children:n.jsx(ct.Modal,{className:t,isMobile:r,CONSTANTS:s,children:e})});wu.displayName="Filter.Root";const Nu=({ICONS:e,PLP_FILTERS_COLORS:t,PLP_FILTERS:r})=>{const{filters:s,onToggleFacet:a}=Ut();return n.jsx("div",{className:Ve["filter--selected"],children:n.jsx("div",{className:Ve["filter--selected--content"],children:Array.isArray(s.selected)&&s.selected.map(({key:o,value:i})=>o==="productclusterids"?null:n.jsx(d.Tag,{title:o==="price"?os({value:i}):i,adornment:{end:n.jsx(d.Icon,{name:e.close,size:"x-small"})},colorSquare:no({value:i,PLP_FILTERS_COLORS:t}),onClick:()=>a({key:o,value:i}),squareShow:to({key:o,PLP_FILTERS:r}),size:"medium",variant:"primary",children:o==="price"?os({value:i}):i},i))})})};Nu.displayName="Filter.Selected";const ct={Colors:vu,Content:gu,Empty:yu,Modal:Pu,Item:xu,Root:wu,Loading:Su,Selected:Nu,Price:bu,Sizes:ju,Toggle:Cu},{checkedColor:Dh,createTagPrice:na,getColor:Fh}=_u,Eu=({callback:e,facet:t})=>{const{ICONS:r,PLP_FILTERS_COLORS:s,PLP_FILTERS:a}=De();return n.jsx(d.Tag,{title:(t==null?void 0:t.key)==="price"?na({value:t.value}):t.value.toUpperCase(),adornment:{end:n.jsx(d.Icon,{name:r.close,size:"x-small"})},colorSquare:Fh({value:t.value,PLP_FILTERS_COLORS:s}),onClick:()=>{typeof e=="function"&&e(t,!0)},squareShow:Dh({key:t.key,PLP_FILTERS:a}),size:"medium",variant:"primary",children:(t==null?void 0:t.key)==="price"?na({value:t.value}):t.value.toUpperCase()})};Eu.displayName="PLPNavigation.Selected.Item";const Iu=()=>n.jsx(d.TextStructure.Root,{children:n.jsx("p",{id:"pdc-navigation--total"})});Iu.displayName="PLPNavigation.Total";const ht={BreadCrumb:au,Content:iu,Filters:uu,Root:du,Selected:mu,SelectedItem:Eu,Total:Iu},zh="_footer__bottom_198g6_2",Bh="_footer__wrapper_198g6_10",Uh="_footer__main_198g6_39",qh="_footer__legalInformation_198g6_55",Hh="_footer__column_198g6_77",$h="_footer__columnContent_198g6_87",Vh="_footer__item_198g6_91",Wh="_footer__itemLink_198g6_107",Gh="_footer__columnTitle_198g6_122",Kh="_footer__columnTitleIcon_198g6_134",Xh="_footer__iconList_198g6_147",Yh="_footer__itemSmallText_198g6_157",Qh="_payment_198g6_168",Zh="_footer__iconContainer_198g6_173",Jh="_footer__iconListSubHeader_198g6_178",e_="_accordionWrapper_198g6_200",t_="_accordionHeader_198g6_204",n_="_accordionTextWrapper_198g6_208",me={footer__bottom:zh,footer__wrapper:Bh,footer__main:Uh,footer__legalInformation:qh,footer__column:Hh,footer__columnContent:$h,footer__item:Vh,footer__itemLink:Wh,footer__columnTitle:Gh,footer__columnTitleIcon:Kh,footer__iconList:Xh,footer__itemSmallText:Yh,payment:Qh,footer__iconContainer:Zh,footer__iconListSubHeader:Jh,accordionWrapper:e_,accordionHeader:t_,accordionTextWrapper:n_,"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 Ru={},ro={},nr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"warnOnce",{enumerable:!0,get:function(){return t}});let t=r=>{};if(process.env.NODE_ENV!=="production"){const r=new Set;t=s=>{r.has(s)||console.warn(s),r.add(s)}}})(nr);var Tu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImageBlurSvg",{enumerable:!0,get:function(){return t}});function t(r){let{widthInt:s,heightInt:a,blurWidth:o,blurHeight:i,blurDataURL:c,objectFit:l}=r;const u=20,m=o?o*40:s,p=i?i*40:a,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"}})(Tu);var rr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,o){for(var i in o)Object.defineProperty(a,i,{enumerable:!0,get:o[i]})}t(e,{VALID_LOADERS:function(){return r},imageConfigDefault:function(){return s}});const r=["default","imgix","cloudinary","akamai","custom"],s={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",localPatterns:void 0,remotePatterns:[],qualities:void 0,unoptimized:!1}})(rr);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImgProps",{enumerable:!0,get:function(){return h}});const t=nr,r=Tu,s=rr,a=["lazy","eager",void 0];function o(_){return _.default!==void 0}function i(_){return _.src!==void 0}function c(_){return typeof _=="object"&&(o(_)||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,x){let{deviceSizes:v,allSizes:C}=_;if(x){const b=/(^|\s)(1?\d?\d)vw/g,w=[];for(let S;S=b.exec(x);S)w.push(parseInt(S[2]));if(w.length){const S=Math.min(...w)*.01;return{widths:C.filter(P=>P>=v[0]*S),kind:"w"}}return{widths:C,kind:"w"}}return typeof y!="number"?{widths:v,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:x,unoptimized:v,width:C,quality:j,sizes:b,loader:w}=_;if(v)return{src:x,srcSet:void 0,sizes:void 0};const{widths:S,kind:P}=p(y,C,b),N=S.length-1;return{sizes:!b&&P==="w"?"100vw":b,srcSet:S.map((R,k)=>w({config:y,src:x,quality:j,width:R})+" "+(P==="w"?R:k+1)+P).join(", "),src:w({config:y,src:x,quality:j,width:S[N]})}}function h(_,y){let{src:x,sizes:v,unoptimized:C=!1,priority:j=!1,loading:b,className:w,quality:S,width:P,height:N,fill:R=!1,style:k,overrideSrc:O,onLoad:M,onLoadingComplete:X,placeholder:D="empty",blurDataURL:q,fetchPriority:U,decoding:Q="async",layout:G,objectFit:H,objectPosition:J,lazyBoundary:se,lazyRoot:de,...oe}=_;const{imgConf:le,showAltText:F,blurComplete:ee,defaultLoader:E}=y;let W,ie=le||s.imageConfigDefault;if("allSizes"in ie)W=ie;else{var he;const K=[...ie.deviceSizes,...ie.imageSizes].sort((te,_e)=>te-_e),L=ie.deviceSizes.sort((te,_e)=>te-_e),B=(he=ie.qualities)==null?void 0:he.sort((te,_e)=>te-_e);W={...ie,allSizes:K,deviceSizes:L,qualities:B}}if(typeof E>"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 Kp=Object.defineProperty;var Za=e=>{throw TypeError(e)};var Qp=(e,t,r)=>t in e?Kp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var rr=(e,t,r)=>Qp(e,typeof t!="symbol"?t+"":t,r),Rs=(e,t,r)=>t.has(e)||Za("Cannot "+r);var E=(e,t,r)=>(Rs(e,t,"read from private field"),r?r.call(e):t.get(e)),re=(e,t,r)=>t.has(e)?Za("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),V=(e,t,r,s)=>(Rs(e,t,"write to private field"),s?s.call(e,r):t.set(e,r),r),de=(e,t,r)=>(Rs(e,t,"access private method"),r);var On=(e,t,r,s)=>({set _(o){V(e,t,o,r)},get _(){return E(e,t,s)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),y=require("react"),F=require("./index-D0PGMDh5.js"),yt=require("idb-keyval"),wr=require("zustand"),go=require("js-cookie"),d=require("@soma-vertical-web/core-components"),_r=require("axios"),_o=require("@date-fns/tz"),Xp=require("jose"),kr=require("@soma-vertical-web/foundations"),la=require("react-dom"),bt=require("draft-js"),Fc=require("react-intersection-observer");function Yp(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const lt=Yp(y),ua=y.createContext({}),Jp=({data:e,children:t})=>n.jsx(ua.Provider,{value:{tags:e==null?void 0:e.config},children:t}),Mt=()=>{const{tags:e}=y.useContext(ua),t=y.useCallback(r=>{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=r??[])==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=r??[])==null?void 0:p.find(h=>h.id===f.key)}),a=e==null?void 0:e.flagPdp,i=(r==null?void 0:r.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}},zc=({gridScrollBack:e})=>{y.useEffect(()=>{typeof window<"u"&&(e!=null&&e.refer)&&sessionStorage.setItem(e==null?void 0:e.refer,"true")},[])},Bc=y.createContext({}),Zp=({children:e,gridScrollBack:t})=>{const r=y.useRef(null);return zc({gridScrollBack:t}),n.jsx(Bc.Provider,{value:{sizesContainerRef:r},children:e})},Uc=()=>{const e=y.useContext(Bc);if(e===void 0)throw new Error("useContext(PDPContext) must be used within a PDPProvider");return e},zt=({event:e,data:t})=>{const r=(window==null?void 0:window.dataLayer)||[];t.ecommerce&&r.push({ecommerce:null}),r.push({...e&&{event:`custom_${e}`},...t})},Ae={configs:{PLP_FILTERS:[{key:"",label:"",eventLabel:"",order:0}],currency:"BRL",categoryOff:"bazar",storeUrl:"https://www.example.com",MAIN_IMAGE:"1",NAME_SPLIT_SYMBOL:"-",VENDOR_CODE:""},productEvents:(e,t)=>{const{event:r,commonData:s,customData:o,promotionInfo:a,itemList:i,outsideEcommerceData:c}=e,{availableSizes:l,sizes:u,price:m}=s,f={...r==="view_item"?{currency:Ae.configs.currency,value:m,grade_disponivel:l??(u?qc(u):"")}:{},...r==="add_to_wishlist"||r==="remove_from_wishlist"?{value:m,currency:Ae.configs.currency}:{}},p=Ln({data:s,customData:{...o,...i,...a},configs:Ae.configs});zt({event:r,data:{...c,ecommerce:{...i,...f,items:[p]}}}),typeof t=="function"&&t(p,f)},productListEvent:e=>{const{commonData:{products:t},promotionInfo:r,itemList:s,outsideEcommerceData:o,customData:a}=e;if(t.length===0)return;const i=t.map(({node:c},l)=>Ln({data:{...c},customData:{...r,index:l,...a!=null&&a.item_list_name?{item_list_name:a==null?void 0:a.item_list_name}:s},configs:Ae.configs}));zt({event:"view_item_list",data:{...o,ecommerce:{...a!=null&&a.item_list_name?{item_list_name:a==null?void 0:a.item_list_name}:s,items:i}}})},skuEvents:e=>{const{event:t,commonData:{products:r},customData:s,supportData:{selectedSkus:o,price:a},promotionInfo:i,itemList:c,outsideEcommerceData:l}=e;let u=0;const m=r.map(f=>{var _,v,x,C,j,b,w,S,P;const p=o==null?void 0:o.find(N=>(f.productId??f.id)===N.productId);let h={...i,...c};if(p){const N=$c(),R=Vc(N,p);R&&(h={...h,...R}),t==="add_to_cart"&&(i||c)&&yo({persistedData:N,type:"add",sku:(p==null?void 0:p.id)??(p==null?void 0:p.sku),newData:{promotionInfo:i,itemList:c}}),t==="remove_from_cart"&&yo({persistedData:N,type:"remove",sku:(p==null?void 0:p.id)??(p==null?void 0:p.sku)})}u+=f.price??((x=(v=(_=p==null?void 0:p.offers)==null?void 0:_.offers)==null?void 0:v[0])==null?void 0:x.price)??0;const g=(p==null?void 0:p.size)??F.getColorAndSizeFromSkuName((p==null?void 0:p.skuName)??(p==null?void 0:p.name)??((C=f.itemOffered)==null?void 0:C.skuName),Ae.configs.NAME_SPLIT_SYMBOL).size;return Ln({data:f,customData:{...s,...h??{...i,...c},item_sku:(p==null?void 0:p.id)??(p==null?void 0:p.sku)??((j=f.itemOffered)==null?void 0:j.sku),quantity:(s==null?void 0:s.quantity)??f.quantity??1,item_variant2:g,seller_id:(p==null?void 0:p.sellerId)??(p==null?void 0:p.seller)??((P=(S=(w=(b=p==null?void 0:p.offers)==null?void 0:b.offers)==null?void 0:w[0])==null?void 0:S.seller)==null?void 0:P.identifier)??f.seller},configs:Ae.configs})});zt({event:t,data:{...l,ecommerce:{value:a??u,currency:Ae.configs.currency,items:m}}})},filterEvent:e=>{var i;const{commonData:t,customData:r,outsideEcommerceData:s}=e,o={},a={};Array.isArray(t==null?void 0:t.selectedFacets)&&((i=t==null?void 0:t.selectedFacets)!=null&&i.length)&&((t==null?void 0:t.selectedFacets).forEach(({key:c,value:l})=>{var f;const u=((f=Ae.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(", "))),zt({event:"filter",data:{...s,...a,...r}})},viewCartEvent:e=>{var m,f,p,h,g,_,v,x,C,j;const{commonData:t,outsideEcommerceData:r}=e,{cartStore:s}=t;if(!s)return;const o=window.localStorage.getItem("persistedCartEventsData"),a=o?JSON.parse(o):{},i=s.items.map(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:Ae.configs})}),c=(((m=s.totalizers.find(b=>b.name==="Total dos Itens"))==null?void 0:m.value)??0)/100,l=(((f=s.totalizers.find(b=>b.name==="Total dos Descontos"))==null?void 0:f.value)??0)/100,u=((p=s.marketingData)==null?void 0:p.utmiCampaign)===Ae.configs.VENDOR_CODE?(h=s.marketingData)==null?void 0:h.utmCampaign:(_=String((g=s.openTextField)==null?void 0:g.value))==null?void 0:_.split(" - ")[0];zt({event:"view_cart",data:{...r,ecommerce:{currency:Ae.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:r}=e;zt({event:t,data:{...r}})}},qc=e=>e.reduce((t,r)=>(r.available&&t.push(r.value),t),[]).toString(),eh=e=>{const t=e.length;return{...e&&e.length>0?{item_category:e[0].includes(Ae.configs.categoryOff)?"Bazar":"Coleção",...e[1]?{item_category2:e[1]}:{},...t>2?{item_category3:e[t-1]}:{}}:{}}},Ln=({data:e,customData:t,configs:r})=>({...th(e,r==null?void 0:r.MAIN_IMAGE),...rh(e),...nh(e),...sh(e),...t}),Hc=()=>{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("_"))??[]:[]},$c=()=>{const e=window.localStorage.getItem("persistedCartEventsData");return e?JSON.parse(e):null},Vc=(e,t)=>e==null?void 0:e[t],yo=({persistedData:e,type:t,sku:r,newData:s})=>{if(!e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({[r]:s}));return}if(e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({...e,[r]:s}));return}e&&t==="remove"&&(delete e[r],window.localStorage.setItem("persistedCartEventsData",JSON.stringify(e)))},th=(e,t="1")=>{var a,i,c,l,u,m,f,p,h,g,_;const r=e.productReference??e.gtin??e.productRefId,s=e.image??((i=(a=e.items)==null?void 0:a[0])==null?void 0:i.images)??((c=e.itemOffered)==null?void 0:c.image),o=s==null?void 0:s.find(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)??((f=(m=e.itemOffered)==null?void 0:m.isVariationOf)==null?void 0:f.productGroupID),item_ref:/_\d$/.test(r)?r.slice(0,-2):r,item_name:e.productTitle??e.productName??e.name??F.splitNameAndSizeFromFullName((p=e.itemOffered)==null?void 0:p.name,Ae.configs.NAME_SPLIT_SYMBOL).name,item_brand:((h=e.brand)==null?void 0:h.brandName)??((g=e.brand)==null?void 0:g.name)??e.brand??((_=e.itemOffered)==null?void 0:_.brand.name),item_url:`${Ae.configs.storeUrl}${e.linkText}/p`,item_image:(o==null?void 0:o.url)??(o==null?void 0:o.imageUrl)}},ei=e=>Array.isArray(e)?e.reduce((t,r)=>(r.length>t.length&&(t=r),t),""):e,rh=e=>{var u,m;const{categories:t,categoriesIds:r}=e,s=t??((u=e.itemOffered)==null?void 0:u.categories),o=r??((m=e.itemOffered)==null?void 0:m.categoriesIds),a=ei(s),i=ei(o),c=a.slice(1,-1).split("/"),l=i.slice(1,-1).split("/");return{item_category:c[0].toLowerCase().includes(Ae.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]}}},nh=e=>{var o,a,i,c,l,u;const t=((o=e.itemOffered)==null?void 0:o.skuName)??((c=(i=(a=e.isVariantOf)==null?void 0:a.hasVariant)==null?void 0:i[0])==null?void 0:c.name)??((u=(l=e.items)==null?void 0:l[0])==null?void 0:u.name),{color:r,size:s}=F.getColorAndSizeFromSkuName(t,Ae.configs.NAME_SPLIT_SYMBOL);return{item_variant:r,...e.itemOffered&&{item_variant2:s}}},sh=e=>{var l,u;const{price:t,listPrice:r,installments:s}=e,o=t??((l=e.offers)==null?void 0:l.lowPrice)??0,a=r??((u=e.offers)==null?void 0:u.highPrice)??0,i=a?a-o:0,c=i%1===0?i:Number(i.toFixed(2));return{...t&&{price:o??a},...a&&{list_price:a,discount:c},...s&&{installments:s==null?void 0:s.count,installment_value:s==null?void 0:s.value},item_currency:Ae.configs.currency}},Wc=()=>{const[e,t]=Hc(),[r,s]=e.split("-"),o=r.includes("shop")||r.includes("sale")?r:"";return{page_category:o&&s?s:"",page_departament:o,id:t,name:e}},oh=Object.freeze(Object.defineProperty({__proto__:null,eventsFunctions:Ae,findDataInPersistedData:Vc,getAvailablesSizes:qc,getCategories:eh,getPageCategoryAndDepartmentFromSlug:Wc,getPersistedData:$c,getProductListInfoFromHead:Hc,pushDatalayer:zt,updatePersistedData:yo},Symbol.toStringTag,{value:"Module"})),Gc=y.createContext({}),ah=({children:e,evtFunctionsConfigs:t})=>{const r=y.useRef({}),s=y.useRef(null),o=y.useRef(null),a=y.useRef({}),i=y.useRef({trigger:!1,index:0}),c=({functionKey:m,data:f,callBack:p,timeout:h=100})=>{window.dataLayer||(window.dataLayer=[]),Ae.configs=t;try{typeof Ae[m]=="function"&&setTimeout(()=>{var g;f.promotionInfo=r.current,(g=o.current)!=null&&g.item_list_name&&(f.itemList=o.current),Ae[m](f,p)},h)}catch(g){zt({event:"error_event",data:{error_message:(g==null?void 0:g.message)??g}})}},l=({content:m})=>{c({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:m.replace("::",":")}}})},u=({updatePromotionRef:m,promotion:f,index:p})=>{m&&(r.current={...f}),c({functionKey:"readyEvents",data:{event:"select_promotion",readyData:{ecommerce:{...f,...p!==void 0&&{index:p}}}}})};return n.jsx(Gc.Provider,{value:{sendDataLayerEvent:c,triggerSelectItemEventRef:i,promotionEventRef:r,currentLocalRef:s,itemListRef:o,cartProductsFullDataRef:a,handleSelectContent:l,handleSelectPromotionEvent:u},children:e})},le=()=>y.useContext(Gc),Kc=y.createContext({}),ih=({children:e,productData:t,isKit:r,PDP_INFO:s,NAME_SPLIT_SYMBOL:o,TEXTURE_IMAGE:a})=>{var D,H;const{sendDataLayerEvent:i,triggerSelectItemEventRef:c}=le(),{productId:l,productName:u,items:m,items:[{images:f,Videos:p}],description:h,["Composição"]:g="",productReference:_,categories:[v]}=t,{getAvailableProductTag:x}=Mt(),C=x(Object.entries(t.clusterHighlights).map(X=>({id:X[0],name:X[1]}))),j=v.slice(1,-1).split("/"),{installments:b,price:w,listPrice:S,sizes:P,allSizesAvailable:N}=F.getSkuInfos({items:m,NAME_SPLIT_SYMBOL:o}),R=F.getThumbImage({images:f,TEXTURE_IMAGE:a}),I=[{label:`${s.product.description}`,value:"description",content:h},{label:`${s.product.materiais}`,value:"composition",content:g}],O=((H=F.getColorAndSizeFromSkuName((D=t.items)==null?void 0:D[0].name,o))==null?void 0:H.color)??t["Cores Filtráveis"][0]??"",L=()=>({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)}}),W=({sku:X,size:te})=>{const{commonData:Z,customData:q}=L();i({functionKey:"productEvents",data:{event:"view_item",commonData:Z,customData:{...q,...X&&{item_sku:X},...te&&{item_variant2:te}}}})};return y.useEffect(()=>{if(c.current.trigger){const{commonData:X,customData:te}=L();i({functionKey:"productEvents",data:{event:"select_item",commonData:X,customData:{...te,index:c.current.index}}}),c.current.trigger=!1}W({})},[]),n.jsx(Kc.Provider,{value:{productData:t,productId:l,productName:u,productReference:_,tag:C,items:m,sizes:P,allSizesAvailable:N,installments:b,price:w,listPrice:S,thumbImage:R,images:f,video:p[0],descriptionContent:I,breadcrumbList:j,isKit:r,colorName:O,handleViewItemEvent:W},children:e})},Xe=()=>{const e=y.useContext(Kc);if(e===void 0)throw new Error("useContext(PDPDataContext) must be used within a PDPDataProvider");return e},ch=()=>{const[e,t]=y.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}}]},Qc=()=>{y.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)}},[])},lh=typeof window>"u",uh=(e,t)=>{const[r,s]=y.useState(()=>{if(lh)return null;const a=localStorage.getItem(e);return a===null?t:JSON.parse(a||"{}")});return y.useEffect(()=>{const a=i=>{i.storageArea===localStorage&&i.key===e&&s(JSON.parse(i.newValue))};return window.addEventListener("storage",a),()=>{window.removeEventListener("storage",a)}},[e,t]),[r,a=>{s(i=>{const c=typeof a=="function"?a(i):a;return localStorage.setItem(e,JSON.stringify(c)),c})}]};function da(e,t,r){const[s,o]=y.useState(!1),{threshold:a}=r||{};return y.useEffect(()=>{if(!e.current)return()=>null;let i=null;const c=new IntersectionObserver(([l])=>{if(r!=null&&r.delay){i&&clearTimeout(i),i=setTimeout(()=>{o(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},r.delay);return}o(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},{threshold:a||1});return c.observe(e.current),()=>{c.disconnect()}},[e]),s}const ms=({callback:e,onEnterViewportOnce:t,options:r})=>{const s=y.useRef(null);return y.useEffect(()=>{const o=s.current;if(!o)return;const a=new IntersectionObserver(([i])=>{i.isIntersecting&&typeof e=="function"&&(e(),t&&(a.unobserve(o),a.disconnect()))},r);return a.observe(o),()=>{t&&a.unobserve(o),a.disconnect()}},[e,t,r]),{element:s}},Xc=({defaultScale:e=1,maxScale:t=3})=>{const r=y.useRef(null),s=y.useRef(null),[o,a]=y.useState(e),i=y.useRef(0),c=y.useRef({x:0,y:0}),l=y.useRef({x:0,y:0}),u=()=>{if(!s.current||!r.current)return{minX:0,maxX:0,minY:0,maxY:0};const h=r.current.getBoundingClientRect(),g=s.current.children[0].getBoundingClientRect(),_=g.width,v=g.height,x=Math.min(0,(h.width-_)/2),C=Math.max(0,(_-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,g,_)=>{if(s.current){const v=s.current.children[0];v&&requestAnimationFrame(()=>{v.style.transform=`translate(calc(-50% + ${h}px), calc(-50% + ${g}px)) scale(${_})`})}},f=y.useCallback(h=>{const{minX:g,maxX:_,minY:v,maxY:x}=u(),{x:C,y:j}=l.current,b=Math.max(g,Math.min(_,C)),w=Math.max(v,Math.min(x,j));if(h.touches.length>1){const S=h.touches[0],P=h.touches[1],N=S.pageX-P.pageX,R=S.pageY-P.pageY;i.current=Math.sqrt(N*N+R*R),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]),p=y.useCallback(h=>{if(!s.current||!r.current)return;const{minX:g,maxX:_,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,N=Math.max(1,Math.min(t,o*P));if(o===N)return;a(N);const R=(C.pageX+j.pageX)/2,I=(C.pageY+j.pageY)/2;let O=R-c.current.x,L=I-c.current.y;O=Math.max(g,Math.min(_,O)),L=Math.max(v,Math.min(x,L)),l.current={x:O,y:L},i.current=S,m(O,L,N)}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(g,Math.min(_,b)),w=Math.max(v,Math.min(x,w)),l.current={x:b,y:w},m(b,w,o)}},[t,o]);return y.useEffect(()=>(document.addEventListener("touchstart",f),document.addEventListener("touchmove",p,{passive:!1}),()=>{document.removeEventListener("touchstart",f),document.removeEventListener("touchmove",p)}),[p,f]),{containerRef:r,imgRef:s,scale:o}},dh={attachment:"ATTACHMENT",specification:"SPECIFICATION",attribute:"ATTRIBUTE"},at=Promise.resolve(!1),vo={id:"",isOpen:!1,items:[],loading:!1,marketingData:null,messages:[],openTextField:{},paymentData:null,shippingData:null,totalizers:[],itemMetadata:[],recentlyAddedProducts:[],addCoupon:()=>at,addItem:()=>at,addSellerCode:()=>at,addMarketingData:()=>at,emptyCart:()=>({}),removeItem:()=>at,setIsOpen:()=>({}),shipping:()=>at,shippingUpdate:()=>at,toggleServiceToProduct:()=>at,updateItemQuantity:()=>at,insertProfileEmail:()=>at,setRecentlyAddedProducts:()=>({})},fa=e=>e===0,Yc=(e,t)=>{if(!e||e.length===0)return[];let r="";const s=[],o=e.match(/\d+/g)??[];for(const a of o){const i=t[Number(a)];i&&(r+=(r?"/":"")+i,s.push(r))}return s},Jc=(e,t)=>{const{availability:r,additionalInfo:{brandName:s},bundleItems:o,id:a,uniqueId:i,detailUrl:c,ean:l,imageUrl:u,name:m,listPrice:f,quantity:p,price:h,priceDefinition:g,productCategories:_,productCategoryIds:v,productId:x,refId:C,seller:j,referenceId:b,offerings:w,productRefId:S,skuName:P,sellingPrice:N}=e;return{availability:r,bundleItems:o,referenceId:b,productRefId:S,id:a,ean:l,uniqueId:i,itemOffered:{additionalProperty:[],brand:{name:s},categories:Yc(v,_),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:f,quantity:p,offerings:w,price:h,priceDefinition:g,sellingPrice:N,seller:j}},Zc=(e,t)=>{const r=e.map(s=>({id:s.uniqueId,quantity:s.quantity,seller:s.seller}));return Array.isArray(t)?[...r,...t]:[...r,t]},el=(e,t)=>{const r=e.find(s=>s.id===t);if(r){const s=e.map((o,a)=>{var i,c;return{id:((i=o.itemOffered)==null?void 0:i.sku)??"",index:a,quantity:(r==null?void 0:r.id)===((c=o.itemOffered)==null?void 0:c.sku)?0:o.quantity,seller:o.seller??""}});return{updateItems:s,filterItems:s.filter(o=>o.id!==t)}}return{updateItems:[],filterItems:[]}},tl=(e,t,r)=>e.filter(s=>s.availability!=="withoutStock"&&s.availability!=="https://schema.org/OutOfStock").map((s,o)=>{var a,i;return s.id===t?{id:s.id,index:o,quantity:r,seller:s.seller,sku:((a=s.itemOffered)==null?void 0:a.sku)??""}:{id:s.id,index:o,quantity:s.quantity,seller:s.seller,sku:((i=s.itemOffered)==null?void 0:i.sku)??""}}),xo=(e,t)=>e.filter(r=>r.availability!=="withoutStock").findIndex(({id:r})=>r===t),fh=(e,t)=>{var r;return Array.isArray(e)?(((r=e==null?void 0:e.find(s=>{var o;return((o=s==null?void 0:s.id)==null?void 0:o.toLowerCase())===t}))==null?void 0:r.value)??0)/100:0},mh=e=>{const t=e.reduce((o,a)=>{const i=fa(a.price)?0:a.quantity;return o+i},0),r=e.reduce((o,a)=>o+a.price*a.quantity,0),s=e.reduce((o,a)=>o+a.listPrice*a.quantity,0);return{totalItems:t,total:r,subTotal:s}},ph=e=>Array.isArray(e)?e.filter(t=>t.availability!=="withoutStock").reduce((t,r)=>t+(fa(r==null?void 0:r.price)?0:r.quantity),0):0,rl=(e,t)=>{const{items:r,orderFormId:s,...o}=e;return{...o,id:s,items:Array.isArray(r)?r.map(a=>Jc(a,t)):[]}},nl=(e,t)=>{const r=e.find(s=>s.id===t);return r?r.availability==="unavailableItemFulfillment":!1},hh=(e,t)=>{const r=e.sku,s=e.isVariantOf.hasVariant.find(o=>o.sku===r);return s?s.name.split(t)[1]:"--"},Rr=(e,t,r=!1)=>!e&&t!==""?{code:300,value:t,statusOk:r}:e===t?{code:200,value:t,statusOk:r}:{code:400,value:t,statusOk:r},gh=(e,t)=>{const r=new Set;return[e,...t].filter(s=>!r.has(s)&&r.add(s),r)},sl=(e,t)=>t&&Array.isArray(t)&&t.find(s=>s.id===e)?Promise.resolve(e):Promise.resolve(!1),ol=(e,t)=>t?Promise.resolve(e[t]):Promise.resolve(!1),al=async e=>{try{const t=await e();if(typeof t!="boolean")return t}catch(t){console.error(`[Error orderForm]: ${t}`)}return!1},il=(e,t)=>{if(t!==-1){const r=Number(e);return r?r+1:1}return e??1},cl=(e,t)=>Array.isArray(e)?e.filter(r=>t==null?void 0:t.some(s=>s.id===r.id)):[],ll=async(e,t)=>e.then(r=>[...r??[],...t??[]]),$e=async(e,t,r,s)=>{const{priority:o="auto",body:a}=t;return fetch(e,{headers:{"Content-Type":"application/json"},priority:o,method:"POST",body:JSON.stringify(a)}).then(async i=>{const c=await i.json();return r?c:rl(c,s)})},ul=(e,t,r)=>({notifications:[...e.notifications,{id:Date.now(),message:t,callback:r}]}),dl=e=>[...Array.isArray(e)?e:[e],"faststore"],fl=e=>{const t=e.get("utm_source")||sr("utm_source"),r=e.get("utm_campaign")||sr("utm_campaign"),s=e.get("utm_medium")||sr("utm_medium"),o=e.get("utmi_cp")||sr("utmi_cp"),a=e.get("utmi_pc")||sr("utmi_pc"),i=e.get("utmi_p")||sr("utmi_p");return{...t&&{utmSource:t},...s&&{utmMedium:s},...r&&{utmCampaign:r},...o&&{utmiCampaign:o},...a&&{utmiPart:a},...i&&{utmipage:i}}},sr=e=>{if(!e||typeof window>"u")return;const t=window.location.href;e=e.replace(/[[\]]/g,"\\$&");const r=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)"),s=r.exec(t);return s?s[2]?decodeURIComponent(s[2].replace(/\+/g," ")):"":null},ml=(e,t,r="BR")=>{const s=t,o={country:r,addressType:"",postalCode:e||null,city:"",state:"",street:"",number:"",neighborhood:"",complement:"",reference:"",geoCoordinates:[]};if(s){const a=typeof s=="object"&&"latitude"in s?s.latitude:null,i=typeof s=="object"&&"longitude"in s?s.longitude:null;o.geoCoordinates=typeof a=="number"&&typeof i=="number"?{latitude:a,longitude:i}:null}return[o]},_h=Object.freeze(Object.defineProperty({__proto__:null,VALUE_REFERENCES:dh,addItemOrder:Zc,addNotification:ul,createItemOrder:Jc,createNewAddress:ml,fetchCartAPI:$e,findItemIndex:xo,findOptions:cl,findTotalizerValue:fh,getCategories:Yc,getCode:Rr,getQuantity:il,getRemoveId:sl,getSize:hh,getTotalItems:ph,getTotalizer:mh,getUrlParameter:sr,getValue:ol,initialState:vo,isGift:fa,marketingTagsBuilder:dl,mergeOptionsPromise:ll,mountMarketingData:fl,orderFormValues:rl,promiseDefault:at,removeQuantity:el,updateItemSellerExternal:nl,updateOrderFormPromise:al,updateQuantity:tl,wishlistArray:gh},Symbol.toStringTag,{value:"Module"})),yh=()=>{const e=async(h,g)=>$e("/api/checkout/order-form/coupon",{body:{orderFormId:h,coupon:g}}),t=async(h,g,_={},v)=>{if(v)if(g){const x=g.includes(" - ")?g.split(" - ")[0]:g,C=await $e("/api/checkout/order-form/seller-code",{body:{orderFormId:h,sellerCode:x}},!0);return C instanceof Object&&_.name in C&&C[_.status]===!0?$e("/api/checkout/order-form/attachments",{body:{orderFormId:h,sellerCode:x,sellerName:C[_.name]}}).then(b=>({...b,openTextField:{...(b==null?void 0:b.openTextField)??{},statusOk:!0}})):Promise.resolve({paymentData:null,openTextField:{statusOk:!1,value:x}})}else return $e("/api/checkout/order-form/attachments",{body:{orderFormId:h,sellerCode:"",sellerName:""}})},r=async(h,g)=>$e("/api/checkout/order-form/attachments/marketing-data",{body:{orderFormId:h,marketingData:g}}),s=async(h,g,_)=>$e("/api/checkout/order-form/items",{body:{orderFormId:h,orderItems:Zc(g,_)}}),o=async(h,g,_,v=!1)=>$e("/api/checkout/order-form/offerings",{body:{id:g,itemIndex:_,orderFormId:h,remove:v}}),a=async h=>$e("/api/checkout/order-form/items/remove-all",{body:{orderFormId:h}}),i=async(h,g="low")=>$e("/api/checkout/order-form",{priority:g,body:{orderFormId:h??""}}),c=async(h,g)=>$e("/api/checkout/order-form/profile",{body:{orderFormId:h,email:g}}),l=async(h,g,_)=>{const v=el(g,_);return $e("/api/checkout/order-form/items/update",{body:{orderItems:v.updateItems,orderFormId:h}})},u=async(h,g,_,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},(N,R)=>({itemIndex:R,selectedDeliveryChannel:(C==null?void 0:C.deliveryChannel)||null,selectedSla:(C==null?void 0:C.deliveryMethod)||null,deliveryWindow:b})),selectedAddresses:x,clearAddressIfPostalCodeNotFound:!0};return $e("/api/checkout/order-form/shipping",{body:{...w,orderFormId:h,country:_,postalCode:g}})},m=async(h,g,_)=>$e("/api/checkout/order-form/shipping/update",{body:{orderFormId:h,options:g,selectedAddresses:_}}),f=async(h,g,_,v)=>{const x=tl(g,_,v);return $e("/api/checkout/order-form/items/update",{body:{orderFormId:h,orderItems:x}})};return{addCoupon:e,addItem:s,addSellerCode:t,addMarketingData:r,giftItem:o,emptyCart:a,getOrderForm:i,insertProfileEmail:c,removeItem:l,shipping:u,shippingUpdate:m,updateItemQuantity:async(h,g,_,v,x)=>f(h,g,_,v).then(C=>C&&Array.isArray(C.items)?nl(C.items,_)?f(h,g,_,x):C:!1)}},ns="soma::cart",tn="soma::options",xr=wr.create((e,t)=>{const r=yh(),s=async(o,a,i)=>{e({loading:!0});const c=await al(o);if(typeof c!="boolean"){e({...c});const l=await ll(yt.get(tn),i);return yt.set(tn,l),ol(c,a).finally(()=>e({loading:!1,options:l}))}return at};if(typeof window<"u"){const o=async a=>{if(a){const i=await yt.get(tn).then(u=>cl(u,a.items));yt.set(ns,a),yt.set(tn,i),e({...a,options:i});const c=new URLSearchParams(window.location.search),l=c.get("utm_campaign")||c.get("utmi_campaign")||"";l&&s(()=>r.addSellerCode(t().id,l.toUpperCase()),"openTextField")}};return yt.get(ns).then(a=>r.getOrderForm(a?a.id:"").then(o)),{...vo,addCoupon:async a=>s(()=>r.addCoupon(t().id,a),"marketingData"),addItem:(a,i)=>{s(()=>r.addItem(t().id,t().items,a),"items",i)},addSellerCode:async(a,i)=>s(()=>r.addSellerCode(t().id,a,i,t().isOpen),"openTextField"),addMarketingData:async a=>s(()=>r.addMarketingData(t().id,a),"marketingData"),emptyCart:()=>{s(()=>r.emptyCart(t().id))},removeItem:async a=>{const i=await s(()=>r.removeItem(t().id,t().items,a),"items");return sl(a,i)},shipping:async(a,i="BR")=>s(()=>r.shipping(t().id,a??"",i,t().items.length,ml(a??"",null,i)),"shippingData"),shippingUpdate:async a=>s(()=>{var i;return r.shippingUpdate(t().id,a,(i=t().shippingData)==null?void 0:i.selectedAddresses)},"shippingData"),toggleServiceToProduct:async(a,i,c)=>s(()=>r.giftItem(t().id,a,i,c),"items"),updateItemQuantity:async(a,i,c)=>{const{id:l,items:u}=t();return s(()=>{var m;return r.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(()=>r.insertProfileEmail(t().id,a),"clientProfileData"),setIsOpen:a=>e({isOpen:a})}}return vo}),vh=()=>xr(e=>e),pl=wr.create(e=>({notifications:[],actions:{addNotification:(t,r)=>e(s=>ul(s,t,r)),removeNotification:t=>e(r=>({notifications:r.notifications.filter(s=>s.id!==t)}))}})),ma=()=>pl(e=>e.notifications),pa=()=>pl(e=>e.actions),xh=Object.freeze(Object.defineProperty({__proto__:null,KEY_INDEXED_OPTIONS:tn,KEY_INDEXED_STORE:ns,useCartStore:xr,useGetCartStoreState:vh,useGetNotificationActions:pa,useGetNotificationsStore:ma},Symbol.toStringTag,{value:"Module"})),bh=6e3,hl=y.createContext({}),gl=({children:e,...t})=>{const{items:r}=xr(),[s,o]=y.useState([]),a=y.useRef(null),i=y.useMemo(()=>Array.isArray(s)&&s.length>0?s.map(c=>r.find(l=>l.id===c.id)).filter(c=>c!==void 0):[],[r,s]);return y.useEffect(()=>{s.length&&(clearTimeout(a.current??0),a.current=setTimeout(()=>{o([])},bh))},[s]),n.jsx(hl.Provider,{value:y.useMemo(()=>({...t,setRecentlyAdded:o,recentlyAddedProducts:i}),[t,o,i]),children:e})},xn=()=>{const e=y.useContext(hl);if(e===void 0)throw new Error("useUIContext must be used within a UIProvider");return e};class _l{constructor(){rr(this,"events",{});rr(this,"prevData",{})}subscribe(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),()=>{this.events[t]=this.events[t].filter(s=>s!==r)}}publish(t,r){this.events[t]&&this.events[t].forEach(s=>{this.prevData[t]=r,s(r)})}}const yl=y.createContext({}),jh=({children:e,headerConfigs:t,pathname:r,...s})=>{const[o,a]=y.useState(!0),[i,c]=y.useState(!1),l=r==="/",u=y.useRef(new _l),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=y.useRef(f);return y.useEffect(()=>{var _;const h=((_=new URLSearchParams(window.location.search))==null?void 0:_.toString())??"";(h.includes("utm_")||h.includes("gclid"))&&(go.get("lastMedias")||go.set("lastMedias",`${h}`,{expires:1/24}));const g=()=>{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||g(),window.addEventListener("resize",g,{passive:!0}),()=>window.removeEventListener("resize",g)},[o,i]),y.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]),n.jsx(yl.Provider,{value:{isMobile:o,mediatorRef:u,currentHeaderConfigsRef:p,deviceValidated:i,...s},children:n.jsx(gl,{children:e})})},oe=()=>y.useContext(yl),vl=y.createContext({}),Ch=({children:e,...t})=>n.jsx(vl.Provider,{value:{...t},children:e}),pe=()=>y.useContext(vl),Pr=(e,t)=>wr.create(r=>{const s=()=>r({value:e});return t&&t instanceof Set&&t.add(s),{value:e,actions:{setValue:o=>r({value:o}),reset:s}}}),un={category:null,menuMobileIsOpen:!1,searchModalIsOpen:!1,userMenuIsOpen:!1},bn=new Set,Sh=()=>{bn.forEach(e=>{e()})},xl=wr.create((e,t)=>{const r=()=>e({value:un.category});return bn.add(r),{value:un.category,actions:{reset:r,setValue:s=>e(()=>({value:s})),updateValue:s=>{t().value!==s&&e({value:s})}}}}),bl=()=>xl(e=>e.value),jn=()=>xl(e=>e.actions),jl=Pr(un.menuMobileIsOpen,bn),Cl=()=>jl(e=>e.value),Sl=()=>jl(e=>e.actions),wl=Pr(un.searchModalIsOpen,bn),Pl=()=>wl(e=>e.value),ps=()=>wl(e=>e.actions),El=Pr(un.userMenuIsOpen,bn),ha=()=>El(e=>e.value),ga=()=>El(e=>e.actions),wh=Object.freeze(Object.defineProperty({__proto__:null,resetAllHeaderStores:Sh,useActionsHeaderCategory:jn,useActionsMenuMobileIsOpen:Sl,useActionsSearchModalIsOpen:ps,useActionsUserMenuIsOpen:ga,useGetHeaderCategoryStore:bl,useGetMenuMobileIsOpen:Cl,useGetSearchModalIsOpen:Pl,useGetUserMenuIsOpen:ha},Symbol.toStringTag,{value:"Module"})),Kr={selectedSkuInfo:{productId:"",name:"",size:"",sku:"",sellerId:"",sellerName:"",available:!1,quantity:1},openLetMeKnow:!1,openMeasurements:!1,showBottomNavigation:!1,showNotify:!1},Qr=new Set,Ph=()=>{Qr.forEach(e=>{e()})},Nl=wr.create(e=>{const t=()=>e({value:Kr.selectedSkuInfo});return Qr.add(t),{value:Kr.selectedSkuInfo,actions:{setValue:r=>e(s=>({value:{...s,...r}})),reset:t}}}),Cn=()=>Nl(e=>e.value),Il=()=>Nl(e=>e.actions),Rl=Pr(Kr.openLetMeKnow,Qr),Eh=()=>Rl(e=>e.value),Nh=()=>Rl(e=>e.actions),Tl=Pr(Kr.showNotify,Qr),Al=()=>Tl(e=>e.value),_a=()=>Tl(e=>e.actions),kl=Pr(Kr.showBottomNavigation,Qr),Ih=()=>kl(e=>e.value),Rh=()=>kl(e=>e.actions),Ol=Pr(Kr.openMeasurements,Qr),Ll=()=>Ol(e=>e.value),Ml=()=>Ol(e=>e.actions),Th=Object.freeze(Object.defineProperty({__proto__:null,resetAllPDPStores:Ph,useActionsPDPOpenLetMeKnow:Nh,useActionsPDPOpenMeasurements:Ml,useActionsPDPSelectedSkuInfo:Il,useActionsPDPShowBottomNavigation:Rh,useActionsPDPShowNotify:_a,useGetPDPOpenLetMeKnow:Eh,useGetPDPOpenMeasurements:Ll,useGetPDPSelectedSkuInfo:Cn,useGetPDPShowBottomNavigation:Ih,useGetPDPShowNotify:Al},Symbol.toStringTag,{value:"Module"})),ti={feedback:{active:!1,action:"add"},list:[]},ya=wr.create((e,t)=>({value:ti,actions:{reset:()=>e({value:ti}),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:""}}}))}})),Xr=()=>ya(e=>e.value.list),va=()=>ya(e=>e.value.feedback),Er=()=>ya(e=>e.actions),Ah=Object.freeze(Object.defineProperty({__proto__:null,useActionsWishlistStore:Er,useGetWishlistFeedbackStore:va,useGetWishlistStore:Xr},Symbol.toStringTag,{value:"Module"})),Dl=y.createContext({}),kh=({children:e,headerData:t,...r})=>{var m,f;const s=y.useRef(null),o=y.useRef(null),a=y.useRef(null),i=y.useRef(null),c=y.useRef(null),{mediatorRef:l,currentHeaderConfigsRef:u}=oe();return(m=l.current)==null||m.subscribe("header:change_variant",p=>{var x,C,j;if(p&&u.current&&(u.current.bannerVariant=p),!s.current)return;const g=document.body.scrollTop>0,_=s.current.getAttribute("data-interactiveVariant"),v=g?_:p??((x=u.current)==null?void 0:x.bannerVariant)??"default";v!==((C=u.current)==null?void 0:C.headerVariant)&&(s.current.setAttribute("data-bottomdivider",String(g)),s.current.setAttribute("data-variant",String(v)),(j=l.current)==null||j.publish("herobanner:change_controllers_variant",v),u.current&&(u.current.headerVariant=v))}),(f=l.current)==null||f.subscribe("header:change_position",p=>{s.current&&(s.current.style.position=p)}),y.useEffect(()=>{const p=new AbortController,h=d.helpers.throttle(()=>{var _;return(_=l.current)==null?void 0:_.publish("header:change_variant",null)},200);document.body.addEventListener("scroll",h,{passive:!0,signal:p.signal});const g=_=>{var x;(x=_.target.closest("a"))==null||x.blur()};return s.current&&(s.current.addEventListener("click",g,{signal:p.signal}),s.current.addEventListener("touchend",g,{signal:p.signal})),()=>{p.abort()}},[]),n.jsx(Dl.Provider,{value:{headerData:t,structureRef:o,rootRef:s,tipbarRef:a,userMenuMobileRef:i,userMenuDesktopRef:c,...r},children:e})},Ee=()=>y.useContext(Dl),Fl=y.createContext({}),zl=({children:e,...t})=>n.jsx(Fl.Provider,{value:y.useMemo(()=>t,[t]),children:e}),xa=()=>{const e=y.useContext(Fl);if(e===void 0)throw new Error("useMenuMobileContext must be used within a MenuMobileProvider");return e},Oh=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},Lh=(e,t,r)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const s=t.getBoundingClientRect(),o=e.getBoundingClientRect(),a=e!=null&&e.parentElement?Oh(e==null?void 0:e.parentElement):0;return{left:s.left+s.width/2-(o.width+a),top:s.top+s.height+r}},Bl=y.createContext({}),Ul=({children:e,delay:t=600,gap:r=20,...s})=>{const[o,a]=y.useState(!1),i=y.useRef(null),[c,l]=y.useState(!1),[u,m]=y.useState({left:0,top:0}),f=y.useCallback(()=>{l(!0),typeof window<"u"&&(i.current=window.setTimeout(()=>{a(!1),l(!1)},t))},[l,a,t]);return y.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:g,top:_}=Lh(h,p,r??0);m({left:g,top:_}),l(!1)}},[r,o]),n.jsx(Bl.Provider,{value:y.useMemo(()=>({...s,...u,handleClose:f,isLeaving:c,isOpen:o,setIsOpen:a,setIsLeaving:l}),[s,u,f,c,o,a,l]),children:e})},Jt=()=>{const e=y.useContext(Bl);if(e===void 0)throw new Error("useAddToCartContext must be used within a AddToCartProvider");return e},ql=y.createContext({}),Mh=({children:e,SELLER_CODE_VALIDATION_KEYS:t,CARTPROVIDER_MESSAGE_PRODUCT_REMOVE:r,data:s,...o})=>{var se,me,ce,he;const a=xr(),{setRecentlyAdded:i}=xn(),c=y.useRef(""),l=ma(),{addNotification:u,removeNotification:m}=pa(),[f,p]=y.useState(null),{addCoupon:h,addItem:g,addSellerCode:_,addMarketingData:v,emptyCart:x,isOpen:C,removeItem:j,shipping:b,shippingUpdate:w,toggleServiceToProduct:S,updateItemQuantity:P}=a;y.useEffect(()=>{(async()=>{var T,K;if(!a.id||!((K=(T=s==null?void 0:s.promotion)==null?void 0:T.promotionCart)!=null&&K.idPromotion))return;const ne=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(ue=>ue.json());p(ne)})()},[a.id,a.items.length,s==null?void 0:s.versionId,(me=(se=s==null?void 0:s.promotion)==null?void 0:se.promotionCart)==null?void 0:me.idPromotion,(he=(ce=s==null?void 0:s.promotion)==null?void 0:ce.promotionCart)==null?void 0:he.versionAPI]),y.useEffect(()=>{const z=go.get("lastMedias");if(a.id&&z&&c.current!==z){c.current=z;const ne=new URLSearchParams(z),T=fl(ne);v(T)}},[a,v]);const N=y.useCallback(async(z,ne)=>(ne==="coupon"?h(z):_(z,t??{})).then(K=>{if(typeof K!="boolean"&&K instanceof Object){if(ne==="seller"&&"value"in K){const{statusOk:ue,value:je}=K,A=String(je??"").split(" - ");return Rr((A==null?void 0:A[0])??"",z,!!ue)}return Rr(String(K.coupon),z,!0)}return Rr("","")}).catch(()=>Promise.resolve({code:400})),[h,_]),R=y.useCallback((z,ne,T)=>{const{id:K}=z;P(K,ne,T)},[P]),I=y.useCallback((z,ne,T=!1)=>{if(!z)return;const{id:K}=z,ue=xo(a.items,K);if(ue!==-1&&!T){const je=Number(a.items[ue].quantity),A=a.items[ue]?je+1:1;R(z,A,ne)}else g({id:K,quantity:(z==null?void 0:z.quantity)??1,seller:z.seller});C||i(je=>[...je,z])},[g,R,a.items,C,i]),O=y.useCallback((z,ne)=>{if(!z||!Array.isArray(z))return;i(K=>[...K,...z]);const T=z.map(K=>{const{id:ue,quantity:je,seller:A}=K,k=xo(a.items,ue),qe=il(je??1,k);return{id:ue,quantity:qe,seller:A}});g(T,ne)},[g,a.items,i]),L=y.useCallback(async(z,ne,T)=>z?j(z).then(()=>(u(ne??`${r}`,T),Rr(z,z))):Promise.resolve(Rr("","Product id required")),[u,j]),W=y.useCallback(()=>{a.items.length>0&&x()},[x,a.items]),D=y.useCallback((z,ne="BRA")=>b(z,ne),[b]),H=y.useCallback(z=>{z&&w(z)},[w]),X=y.useCallback(async(z,ne,T=!1)=>{const K=a.items.findIndex(je=>je.uniqueId===z);return a.items[K]&&K>=0?S(ne,K,T):!1},[a.items,S]),te=y.useCallback(async(z,ne)=>P(z,ne).then(T=>{if(Array.isArray(T)){const K=T.find(ue=>ue.id===z);if(K&&(K==null?void 0:K.quantity)<ne)return String(K.quantity)}return!1}),[P]),Z=y.useCallback(async()=>{await v({...a.marketingData,coupon:""})},[v,a.marketingData]),q=y.useCallback(async()=>{await v({...a.marketingData,utmiCampaign:"",utmCampaign:"",utmSource:"",utmMedium:""})},[v,a.marketingData]),ee=y.useCallback(async()=>{await b("","BRA")},[b]);return n.jsx(ql.Provider,{value:y.useMemo(()=>({...o,data:s,addCouponSeller:N,addToCart:I,addItemsToCart:O,cartStore:a,notifications:l,clearCart:W,addNotification:u,isOpen:a.isOpen,removeNotification:m,removeToCart:L,setIsOpen:a.setIsOpen,shipping:D,shippingUpdateOption:H,toggleGiftItemCart:X,updateItemQuantity:te,removeCoupon:Z,removeSellerCode:q,removeCEP:ee,promotionRules:f,setPromotionRules:p}),[o,s,N,I,O,l,W,u,a,m,L,D,H,X,te,Z,q,ee,f,p]),children:e})},Pe=()=>{const e=y.useContext(ql);if(e===void 0)throw new Error("useCartContext must be used within a CartProvider");return e},Hl=y.createContext({}),ba=({children:e,state:t,collectionId:r,brand:s,searchParams:o})=>{const a=y.useMemo(()=>{var i;return r?[{key:"productclusterids",value:r.toString()}]:s?[{key:"brand",value:s}]:(i=t.base)!=null&&i.length?t.base.slice(1).split("/").map((c,l)=>({key:`category-${l+1}`,value:c})):[]},[t.base,r]);return n.jsx(Hl.Provider,{value:y.useMemo(()=>({state:{...t,facets:[...a,...t.facets??[]]},searchParams:o}),[a,t,o]),children:e})},Fe=()=>{const e=y.useContext(Hl);if(e===void 0)throw new Error("useSearchContext must be used within a SearchProvider");return e};var Sn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Dh={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ct,ir,Nc,Fh=(Nc=class{constructor(){re(this,Ct,Dh);re(this,ir,!1)}setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&E(this,ir)&&e!==E(this,Ct)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:E(this,Ct),provider:e}),V(this,Ct,e),process.env.NODE_ENV!=="production"&&V(this,ir,!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&V(this,ir,!0),E(this,Ct).setTimeout(e,t)}clearTimeout(e){E(this,Ct).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&V(this,ir,!0),E(this,Ct).setInterval(e,t)}clearInterval(e){E(this,Ct).clearInterval(e)}},Ct=new WeakMap,ir=new WeakMap,Nc),or=new Fh;function zh(e){setTimeout(e,0)}var br=typeof window>"u"||"Deno"in globalThis;function Ze(){}function Bh(e,t){return typeof e=="function"?e(t):e}function bo(e){return typeof e=="number"&&e>=0&&e!==1/0}function $l(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Qt(e,t){return typeof e=="function"?e(t):e}function ct(e,t){return typeof e=="function"?e(t):e}function ri(e,t){const{type:r="all",exact:s,fetchStatus:o,predicate:a,queryKey:i,stale:c}=e;if(i){if(s){if(t.queryHash!==ja(i,t.options))return!1}else if(!fn(t.queryKey,i))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||o&&o!==t.state.fetchStatus||a&&!a(t))}function ni(e,t){const{exact:r,status:s,predicate:o,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(dn(t.options.mutationKey)!==dn(a))return!1}else if(!fn(t.options.mutationKey,a))return!1}return!(s&&t.state.status!==s||o&&!o(t))}function ja(e,t){return((t==null?void 0:t.queryKeyHashFn)||dn)(e)}function dn(e){return JSON.stringify(e,(t,r)=>So(r)?Object.keys(r).sort().reduce((s,o)=>(s[o]=r[o],s),{}):r)}function fn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>fn(e[r],t[r])):!1}var Uh=Object.prototype.hasOwnProperty;function jo(e,t){if(e===t)return e;const r=si(e)&&si(t);if(!r&&!(So(e)&&So(t)))return t;const o=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),i=a.length,c=r?new Array(i):{};let l=0;for(let u=0;u<i;u++){const m=r?u:a[u],f=e[m],p=t[m];if(f===p){c[m]=f,(r?u<o:Uh.call(e,m))&&l++;continue}if(f===null||p===null||typeof f!="object"||typeof p!="object"){c[m]=p;continue}const h=jo(f,p);c[m]=h,h===f&&l++}return o===i&&l===o?e:c}function Co(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function si(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function So(e){if(!oi(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!oi(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function oi(e){return Object.prototype.toString.call(e)==="[object Object]"}function qh(e){return new Promise(t=>{or.setTimeout(t,e)})}function wo(e,t,r){if(typeof r.structuralSharing=="function")return r.structuralSharing(e,t);if(r.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return jo(e,t)}catch(s){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${s}`),s}return jo(e,t)}return t}function Hh(e){return e}function $h(e,t,r=0){const s=[...e,t];return r&&s.length>r?s.slice(1):s}function Vh(e,t,r=0){const s=[t,...e];return r&&s.length>r?s.slice(0,-1):s}var ss=Symbol();function Vl(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===ss&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ss?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Wl(e,t){return typeof e=="function"?e(...t):!!e}function Wh(e,t,r){let s=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),s||(s=!0,o.aborted?r():o.addEventListener("abort",r,{once:!0})),o)}),e}var cr,qt,Mr,Ic,Gh=(Ic=class extends Sn{constructor(){super();re(this,cr);re(this,qt);re(this,Mr);V(this,Mr,t=>{if(!br&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){E(this,qt)||this.setEventListener(E(this,Mr))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,qt))==null||t.call(this),V(this,qt,void 0))}setEventListener(t){var r;V(this,Mr,t),(r=E(this,qt))==null||r.call(this),V(this,qt,t(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(t){E(this,cr)!==t&&(V(this,cr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof E(this,cr)=="boolean"?E(this,cr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},cr=new WeakMap,qt=new WeakMap,Mr=new WeakMap,Ic),Ca=new Gh;function Po(){let e,t;const r=new Promise((o,a)=>{e=o,t=a});r.status="pending",r.catch(()=>{});function s(o){Object.assign(r,o),delete r.resolve,delete r.reject}return r.resolve=o=>{s({status:"fulfilled",value:o}),e(o)},r.reject=o=>{s({status:"rejected",reason:o}),t(o)},r}var Kh=zh;function Qh(){let e=[],t=0,r=c=>{c()},s=c=>{c()},o=Kh;const a=c=>{t?e.push(c):o(()=>{r(c)})},i=()=>{const c=e;e=[],c.length&&o(()=>{s(()=>{c.forEach(l=>{r(l)})})})};return{batch:c=>{let l;t++;try{l=c()}finally{t--,t||i()}return l},batchCalls:c=>(...l)=>{a(()=>{c(...l)})},schedule:a,setNotifyFunction:c=>{r=c},setBatchNotifyFunction:c=>{s=c},setScheduler:c=>{o=c}}}var Be=Qh(),Dr,Ht,Fr,Rc,Xh=(Rc=class extends Sn{constructor(){super();re(this,Dr,!0);re(this,Ht);re(this,Fr);V(this,Fr,t=>{if(!br&&window.addEventListener){const r=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",s)}}})}onSubscribe(){E(this,Ht)||this.setEventListener(E(this,Fr))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,Ht))==null||t.call(this),V(this,Ht,void 0))}setEventListener(t){var r;V(this,Fr,t),(r=E(this,Ht))==null||r.call(this),V(this,Ht,t(this.setOnline.bind(this)))}setOnline(t){E(this,Dr)!==t&&(V(this,Dr,t),this.listeners.forEach(s=>{s(t)}))}isOnline(){return E(this,Dr)}},Dr=new WeakMap,Ht=new WeakMap,Fr=new WeakMap,Rc),os=new Xh;function Yh(e){return Math.min(1e3*2**e,3e4)}function Gl(e){return(e??"online")==="online"?os.isOnline():!0}var Eo=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Kl(e){let t=!1,r=0,s;const o=Po(),a=()=>o.status!=="pending",i=_=>{var v;if(!a()){const x=new Eo(_);p(x),(v=e.onCancel)==null||v.call(e,x)}},c=()=>{t=!0},l=()=>{t=!1},u=()=>Ca.isFocused()&&(e.networkMode==="always"||os.isOnline())&&e.canRun(),m=()=>Gl(e.networkMode)&&e.canRun(),f=_=>{a()||(s==null||s(),o.resolve(_))},p=_=>{a()||(s==null||s(),o.reject(_))},h=()=>new Promise(_=>{var v;s=x=>{(a()||u())&&_(x)},(v=e.onPause)==null||v.call(e)}).then(()=>{var _;s=void 0,a()||(_=e.onContinue)==null||_.call(e)}),g=()=>{if(a())return;let _;const v=r===0?e.initialPromise:void 0;try{_=v??e.fn()}catch(x){_=Promise.reject(x)}Promise.resolve(_).then(f).catch(x=>{var S;if(a())return;const C=e.retry??(br?0:3),j=e.retryDelay??Yh,b=typeof j=="function"?j(r,x):j,w=C===!0||typeof C=="number"&&r<C||typeof C=="function"&&C(r,x);if(t||!w){p(x);return}r++,(S=e.onFail)==null||S.call(e,r,x),qh(b).then(()=>u()?void 0:h()).then(()=>{t?p(x):g()})})};return{promise:o,status:()=>o.status,cancel:i,continue:()=>(s==null||s(),o),cancelRetry:c,continueRetry:l,canStart:m,start:()=>(m()?g():h().then(g),o)}}var lr,Tc,Ql=(Tc=class{constructor(){re(this,lr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),bo(this.gcTime)&&V(this,lr,or.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(br?1/0:5*60*1e3))}clearGcTimeout(){E(this,lr)&&(or.clearTimeout(E(this,lr)),V(this,lr,void 0))}},lr=new WeakMap,Tc),ur,zr,it,dr,De,hn,fr,gt,At,Ac,Jh=(Ac=class extends Ql{constructor(t){super();re(this,gt);re(this,ur);re(this,zr);re(this,it);re(this,dr);re(this,De);re(this,hn);re(this,fr);V(this,fr,!1),V(this,hn,t.defaultOptions),this.setOptions(t.options),this.observers=[],V(this,dr,t.client),V(this,it,E(this,dr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,V(this,ur,ii(this.options)),this.state=t.state??E(this,ur),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=E(this,De))==null?void 0:t.promise}setOptions(t){if(this.options={...E(this,hn),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=ii(this.options);r.data!==void 0&&(this.setState(ai(r.data,r.dataUpdatedAt)),V(this,ur,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&E(this,it).remove(this)}setData(t,r){const s=wo(this.state.data,t,this.options);return de(this,gt,At).call(this,{data:s,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),s}setState(t,r){de(this,gt,At).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var s,o;const r=(s=E(this,De))==null?void 0:s.promise;return(o=E(this,De))==null||o.cancel(t),r?r.then(Ze).catch(Ze):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(E(this,ur))}isActive(){return this.observers.some(t=>ct(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ss||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Qt(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!$l(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(s=>s.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=E(this,De))==null||r.continue()}onOnline(){var r;const t=this.observers.find(s=>s.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=E(this,De))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),E(this,it).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(E(this,De)&&(E(this,fr)?E(this,De).cancel({revert:!0}):E(this,De).cancelRetry()),this.scheduleGc()),E(this,it).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||de(this,gt,At).call(this,{type:"invalidate"})}async fetch(t,r){var l,u,m,f,p,h,g,_,v,x,C,j;if(this.state.fetchStatus!=="idle"&&((l=E(this,De))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(E(this,De))return E(this,De).continueRetry(),E(this,De).promise}if(t&&this.setOptions(t),!this.options.queryFn){const b=this.observers.find(w=>w.options.queryFn);b&&this.setOptions(b.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const s=new AbortController,o=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(V(this,fr,!0),s.signal)})},a=()=>{const b=Vl(this.options,r),S=(()=>{const P={client:E(this,dr),queryKey:this.queryKey,meta:this.meta};return o(P),P})();return V(this,fr,!1),this.options.persister?this.options.persister(b,S,this):b(S)},c=(()=>{const b={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:E(this,dr),state:this.state,fetchFn:a};return o(b),b})();(u=this.options.behavior)==null||u.onFetch(c,this),V(this,zr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=c.fetchOptions)==null?void 0:m.meta))&&de(this,gt,At).call(this,{type:"fetch",meta:(f=c.fetchOptions)==null?void 0:f.meta}),V(this,De,Kl({initialPromise:r==null?void 0:r.initialPromise,fn:c.fetchFn,onCancel:b=>{b instanceof Eo&&b.revert&&this.setState({...E(this,zr),fetchStatus:"idle"}),s.abort()},onFail:(b,w)=>{de(this,gt,At).call(this,{type:"failed",failureCount:b,error:w})},onPause:()=>{de(this,gt,At).call(this,{type:"pause"})},onContinue:()=>{de(this,gt,At).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const b=await E(this,De).start();if(b===void 0)throw process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(b),(h=(p=E(this,it).config).onSuccess)==null||h.call(p,b,this),(_=(g=E(this,it).config).onSettled)==null||_.call(g,b,this.state.error,this),b}catch(b){if(b instanceof Eo){if(b.silent)return E(this,De).promise;if(b.revert){if(this.state.data===void 0)throw b;return this.state.data}}throw de(this,gt,At).call(this,{type:"error",error:b}),(x=(v=E(this,it).config).onError)==null||x.call(v,b,this),(j=(C=E(this,it).config).onSettled)==null||j.call(C,this.state.data,b,this),b}finally{this.scheduleGc()}}},ur=new WeakMap,zr=new WeakMap,it=new WeakMap,dr=new WeakMap,De=new WeakMap,hn=new WeakMap,fr=new WeakMap,gt=new WeakSet,At=function(t){const r=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Xl(s.data,this.options),fetchMeta:t.meta??null};case"success":const o={...s,...ai(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return V(this,zr,t.manual?o:void 0),o;case"error":const a=t.error;return{...s,error:a,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=r(this.state),Be.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),E(this,it).notify({query:this,type:"updated",action:t})})},Ac);function Xl(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Gl(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ai(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ii(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,s=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Ye,fe,gn,Ve,mr,Br,kt,$t,_n,Ur,qr,pr,hr,Vt,Hr,xe,rn,No,Io,Ro,To,Ao,ko,Oo,Yl,kc,Zh=(kc=class extends Sn{constructor(t,r){super();re(this,xe);re(this,Ye);re(this,fe);re(this,gn);re(this,Ve);re(this,mr);re(this,Br);re(this,kt);re(this,$t);re(this,_n);re(this,Ur);re(this,qr);re(this,pr);re(this,hr);re(this,Vt);re(this,Hr,new Set);this.options=r,V(this,Ye,t),V(this,$t,null),V(this,kt,Po()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(E(this,fe).addObserver(this),ci(E(this,fe),this.options)?de(this,xe,rn).call(this):this.updateResult(),de(this,xe,To).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Lo(E(this,fe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Lo(E(this,fe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,de(this,xe,Ao).call(this),de(this,xe,ko).call(this),E(this,fe).removeObserver(this)}setOptions(t){const r=this.options,s=E(this,fe);if(this.options=E(this,Ye).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ct(this.options.enabled,E(this,fe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");de(this,xe,Oo).call(this),E(this,fe).setOptions(this.options),r._defaulted&&!Co(this.options,r)&&E(this,Ye).getQueryCache().notify({type:"observerOptionsUpdated",query:E(this,fe),observer:this});const o=this.hasListeners();o&&li(E(this,fe),s,this.options,r)&&de(this,xe,rn).call(this),this.updateResult(),o&&(E(this,fe)!==s||ct(this.options.enabled,E(this,fe))!==ct(r.enabled,E(this,fe))||Qt(this.options.staleTime,E(this,fe))!==Qt(r.staleTime,E(this,fe)))&&de(this,xe,No).call(this);const a=de(this,xe,Io).call(this);o&&(E(this,fe)!==s||ct(this.options.enabled,E(this,fe))!==ct(r.enabled,E(this,fe))||a!==E(this,Vt))&&de(this,xe,Ro).call(this,a)}getOptimisticResult(t){const r=E(this,Ye).getQueryCache().build(E(this,Ye),t),s=this.createResult(r,t);return tg(this,s)&&(V(this,Ve,s),V(this,Br,this.options),V(this,mr,E(this,fe).state)),s}getCurrentResult(){return E(this,Ve)}trackResult(t,r){return new Proxy(t,{get:(s,o)=>(this.trackProp(o),r==null||r(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&E(this,kt).status==="pending"&&E(this,kt).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,o))})}trackProp(t){E(this,Hr).add(t)}getCurrentQuery(){return E(this,fe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=E(this,Ye).defaultQueryOptions(t),s=E(this,Ye).getQueryCache().build(E(this,Ye),r);return s.fetch().then(()=>this.createResult(s,r))}fetch(t){return de(this,xe,rn).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),E(this,Ve)))}createResult(t,r){var R;const s=E(this,fe),o=this.options,a=E(this,Ve),i=E(this,mr),c=E(this,Br),u=t!==s?t.state:E(this,gn),{state:m}=t;let f={...m},p=!1,h;if(r._optimisticResults){const I=this.hasListeners(),O=!I&&ci(t,r),L=I&&li(t,s,r,o);(O||L)&&(f={...f,...Xl(m.data,t.options)}),r._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:g,errorUpdatedAt:_,status:v}=f;h=f.data;let x=!1;if(r.placeholderData!==void 0&&h===void 0&&v==="pending"){let I;a!=null&&a.isPlaceholderData&&r.placeholderData===(c==null?void 0:c.placeholderData)?(I=a.data,x=!0):I=typeof r.placeholderData=="function"?r.placeholderData((R=E(this,qr))==null?void 0:R.state.data,E(this,qr)):r.placeholderData,I!==void 0&&(v="success",h=wo(a==null?void 0:a.data,I,r),p=!0)}if(r.select&&h!==void 0&&!x)if(a&&h===(i==null?void 0:i.data)&&r.select===E(this,_n))h=E(this,Ur);else try{V(this,_n,r.select),h=r.select(h),h=wo(a==null?void 0:a.data,h,r),V(this,Ur,h),V(this,$t,null)}catch(I){V(this,$t,I)}E(this,$t)&&(g=E(this,$t),h=E(this,Ur),_=Date.now(),v="error");const C=f.fetchStatus==="fetching",j=v==="pending",b=v==="error",w=j&&C,S=h!==void 0,N={status:v,fetchStatus:f.fetchStatus,isPending:j,isSuccess:v==="success",isError:b,isInitialLoading:w,isLoading:w,data:h,dataUpdatedAt:f.dataUpdatedAt,error:g,errorUpdatedAt:_,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:C,isRefetching:C&&!j,isLoadingError:b&&!S,isPaused:f.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:b&&S,isStale:Sa(t,r),refetch:this.refetch,promise:E(this,kt),isEnabled:ct(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const I=W=>{N.status==="error"?W.reject(N.error):N.data!==void 0&&W.resolve(N.data)},O=()=>{const W=V(this,kt,N.promise=Po());I(W)},L=E(this,kt);switch(L.status){case"pending":t.queryHash===s.queryHash&&I(L);break;case"fulfilled":(N.status==="error"||N.data!==L.value)&&O();break;case"rejected":(N.status!=="error"||N.error!==L.reason)&&O();break}}return N}updateResult(){const t=E(this,Ve),r=this.createResult(E(this,fe),this.options);if(V(this,mr,E(this,fe).state),V(this,Br,this.options),E(this,mr).data!==void 0&&V(this,qr,E(this,fe)),Co(r,t))return;V(this,Ve,r);const s=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!E(this,Hr).size)return!0;const i=new Set(a??E(this,Hr));return this.options.throwOnError&&i.add("error"),Object.keys(E(this,Ve)).some(c=>{const l=c;return E(this,Ve)[l]!==t[l]&&i.has(l)})};de(this,xe,Yl).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&de(this,xe,To).call(this)}},Ye=new WeakMap,fe=new WeakMap,gn=new WeakMap,Ve=new WeakMap,mr=new WeakMap,Br=new WeakMap,kt=new WeakMap,$t=new WeakMap,_n=new WeakMap,Ur=new WeakMap,qr=new WeakMap,pr=new WeakMap,hr=new WeakMap,Vt=new WeakMap,Hr=new WeakMap,xe=new WeakSet,rn=function(t){de(this,xe,Oo).call(this);let r=E(this,fe).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Ze)),r},No=function(){de(this,xe,Ao).call(this);const t=Qt(this.options.staleTime,E(this,fe));if(br||E(this,Ve).isStale||!bo(t))return;const s=$l(E(this,Ve).dataUpdatedAt,t)+1;V(this,pr,or.setTimeout(()=>{E(this,Ve).isStale||this.updateResult()},s))},Io=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(E(this,fe)):this.options.refetchInterval)??!1},Ro=function(t){de(this,xe,ko).call(this),V(this,Vt,t),!(br||ct(this.options.enabled,E(this,fe))===!1||!bo(E(this,Vt))||E(this,Vt)===0)&&V(this,hr,or.setInterval(()=>{(this.options.refetchIntervalInBackground||Ca.isFocused())&&de(this,xe,rn).call(this)},E(this,Vt)))},To=function(){de(this,xe,No).call(this),de(this,xe,Ro).call(this,de(this,xe,Io).call(this))},Ao=function(){E(this,pr)&&(or.clearTimeout(E(this,pr)),V(this,pr,void 0))},ko=function(){E(this,hr)&&(or.clearInterval(E(this,hr)),V(this,hr,void 0))},Oo=function(){const t=E(this,Ye).getQueryCache().build(E(this,Ye),this.options);if(t===E(this,fe))return;const r=E(this,fe);V(this,fe,t),V(this,gn,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},Yl=function(t){Be.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(E(this,Ve))}),E(this,Ye).getQueryCache().notify({query:E(this,fe),type:"observerResultsUpdated"})})},kc);function eg(e,t){return ct(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ci(e,t){return eg(e,t)||e.state.data!==void 0&&Lo(e,t,t.refetchOnMount)}function Lo(e,t,r){if(ct(t.enabled,e)!==!1&&Qt(t.staleTime,e)!=="static"){const s=typeof r=="function"?r(e):r;return s==="always"||s!==!1&&Sa(e,t)}return!1}function li(e,t,r,s){return(e!==t||ct(s.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Sa(e,r)}function Sa(e,t){return ct(t.enabled,e)!==!1&&e.isStaleByTime(Qt(t.staleTime,e))}function tg(e,t){return!Co(e.getCurrentResult(),t)}function ui(e){return{onFetch:(t,r)=>{var m,f,p,h,g;const s=t.options,o=(p=(f=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:f.fetchMore)==null?void 0:p.direction,a=((h=t.state.data)==null?void 0:h.pages)||[],i=((g=t.state.data)==null?void 0:g.pageParams)||[];let c={pages:[],pageParams:[]},l=0;const u=async()=>{let _=!1;const v=j=>{Wh(j,()=>t.signal,()=>_=!0)},x=Vl(t.options,t.fetchOptions),C=async(j,b,w)=>{if(_)return Promise.reject();if(b==null&&j.pages.length)return Promise.resolve(j);const P=(()=>{const O={client:t.client,queryKey:t.queryKey,pageParam:b,direction:w?"backward":"forward",meta:t.options.meta};return v(O),O})(),N=await x(P),{maxPages:R}=t.options,I=w?Vh:$h;return{pages:I(j.pages,N,R),pageParams:I(j.pageParams,b,R)}};if(o&&a.length){const j=o==="backward",b=j?rg:di,w={pages:a,pageParams:i},S=b(s,w);c=await C(w,S,j)}else{const j=e??a.length;do{const b=l===0?i[0]??s.initialPageParam:di(s,c);if(l>0&&b==null)break;c=await C(c,b),l++}while(l<j)}return c};t.options.persister?t.fetchFn=()=>{var _,v;return(v=(_=t.options).persister)==null?void 0:v.call(_,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function di(e,{pages:t,pageParams:r}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,r[s],r):void 0}function rg(e,{pages:t,pageParams:r}){var s;return t.length>0?(s=e.getPreviousPageParam)==null?void 0:s.call(e,t[0],t,r[0],r):void 0}var yn,St,We,gr,wt,Ft,Oc,ng=(Oc=class extends Ql{constructor(t){super();re(this,wt);re(this,yn);re(this,St);re(this,We);re(this,gr);V(this,yn,t.client),this.mutationId=t.mutationId,V(this,We,t.mutationCache),V(this,St,[]),this.state=t.state||sg(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){E(this,St).includes(t)||(E(this,St).push(t),this.clearGcTimeout(),E(this,We).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){V(this,St,E(this,St).filter(r=>r!==t)),this.scheduleGc(),E(this,We).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){E(this,St).length||(this.state.status==="pending"?this.scheduleGc():E(this,We).remove(this))}continue(){var t;return((t=E(this,gr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,c,l,u,m,f,p,h,g,_,v,x,C,j,b,w,S,P,N,R;const r=()=>{de(this,wt,Ft).call(this,{type:"continue"})},s={client:E(this,yn),meta:this.options.meta,mutationKey:this.options.mutationKey};V(this,gr,Kl({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(I,O)=>{de(this,wt,Ft).call(this,{type:"failed",failureCount:I,error:O})},onPause:()=>{de(this,wt,Ft).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>E(this,We).canRun(this)}));const o=this.state.status==="pending",a=!E(this,gr).canStart();try{if(o)r();else{de(this,wt,Ft).call(this,{type:"pending",variables:t,isPaused:a}),await((c=(i=E(this,We).config).onMutate)==null?void 0:c.call(i,t,this,s));const O=await((u=(l=this.options).onMutate)==null?void 0:u.call(l,t,s));O!==this.state.context&&de(this,wt,Ft).call(this,{type:"pending",context:O,variables:t,isPaused:a})}const I=await E(this,gr).start();return await((f=(m=E(this,We).config).onSuccess)==null?void 0:f.call(m,I,t,this.state.context,this,s)),await((h=(p=this.options).onSuccess)==null?void 0:h.call(p,I,t,this.state.context,s)),await((_=(g=E(this,We).config).onSettled)==null?void 0:_.call(g,I,null,this.state.variables,this.state.context,this,s)),await((x=(v=this.options).onSettled)==null?void 0:x.call(v,I,null,t,this.state.context,s)),de(this,wt,Ft).call(this,{type:"success",data:I}),I}catch(I){try{await((j=(C=E(this,We).config).onError)==null?void 0:j.call(C,I,t,this.state.context,this,s))}catch(O){Promise.reject(O)}try{await((w=(b=this.options).onError)==null?void 0:w.call(b,I,t,this.state.context,s))}catch(O){Promise.reject(O)}try{await((P=(S=E(this,We).config).onSettled)==null?void 0:P.call(S,void 0,I,this.state.variables,this.state.context,this,s))}catch(O){Promise.reject(O)}try{await((R=(N=this.options).onSettled)==null?void 0:R.call(N,void 0,I,t,this.state.context,s))}catch(O){Promise.reject(O)}throw de(this,wt,Ft).call(this,{type:"error",error:I}),I}finally{E(this,We).runNext(this)}}},yn=new WeakMap,St=new WeakMap,We=new WeakMap,gr=new WeakMap,wt=new WeakSet,Ft=function(t){const r=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Be.batch(()=>{E(this,St).forEach(s=>{s.onMutationUpdate(t)}),E(this,We).notify({mutation:this,type:"updated",action:t})})},Oc);function sg(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ot,_t,vn,Lc,og=(Lc=class extends Sn{constructor(t={}){super();re(this,Ot);re(this,_t);re(this,vn);this.config=t,V(this,Ot,new Set),V(this,_t,new Map),V(this,vn,0)}build(t,r,s){const o=new ng({client:t,mutationCache:this,mutationId:++On(this,vn)._,options:t.defaultMutationOptions(r),state:s});return this.add(o),o}add(t){E(this,Ot).add(t);const r=Mn(t);if(typeof r=="string"){const s=E(this,_t).get(r);s?s.push(t):E(this,_t).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(E(this,Ot).delete(t)){const r=Mn(t);if(typeof r=="string"){const s=E(this,_t).get(r);if(s)if(s.length>1){const o=s.indexOf(t);o!==-1&&s.splice(o,1)}else s[0]===t&&E(this,_t).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Mn(t);if(typeof r=="string"){const s=E(this,_t).get(r),o=s==null?void 0:s.find(a=>a.state.status==="pending");return!o||o===t}else return!0}runNext(t){var s;const r=Mn(t);if(typeof r=="string"){const o=(s=E(this,_t).get(r))==null?void 0:s.find(a=>a!==t&&a.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Be.batch(()=>{E(this,Ot).forEach(t=>{this.notify({type:"removed",mutation:t})}),E(this,Ot).clear(),E(this,_t).clear()})}getAll(){return Array.from(E(this,Ot))}find(t){const r={exact:!0,...t};return this.getAll().find(s=>ni(r,s))}findAll(t={}){return this.getAll().filter(r=>ni(t,r))}notify(t){Be.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Be.batch(()=>Promise.all(t.map(r=>r.continue().catch(Ze))))}},Ot=new WeakMap,_t=new WeakMap,vn=new WeakMap,Lc);function Mn(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Pt,Mc,ag=(Mc=class extends Sn{constructor(t={}){super();re(this,Pt);this.config=t,V(this,Pt,new Map)}build(t,r,s){const o=r.queryKey,a=r.queryHash??ja(o,r);let i=this.get(a);return i||(i=new Jh({client:t,queryKey:o,queryHash:a,options:t.defaultQueryOptions(r),state:s,defaultOptions:t.getQueryDefaults(o)}),this.add(i)),i}add(t){E(this,Pt).has(t.queryHash)||(E(this,Pt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=E(this,Pt).get(t.queryHash);r&&(t.destroy(),r===t&&E(this,Pt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Be.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return E(this,Pt).get(t)}getAll(){return[...E(this,Pt).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(s=>ri(r,s))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(s=>ri(t,s)):r}notify(t){Be.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Be.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Be.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Pt=new WeakMap,Mc),Te,Wt,Gt,$r,Vr,Kt,Wr,Gr,Dc,Jl=(Dc=class{constructor(e={}){re(this,Te);re(this,Wt);re(this,Gt);re(this,$r);re(this,Vr);re(this,Kt);re(this,Wr);re(this,Gr);V(this,Te,e.queryCache||new ag),V(this,Wt,e.mutationCache||new og),V(this,Gt,e.defaultOptions||{}),V(this,$r,new Map),V(this,Vr,new Map),V(this,Kt,0)}mount(){On(this,Kt)._++,E(this,Kt)===1&&(V(this,Wr,Ca.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,Te).onFocus())})),V(this,Gr,os.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,Te).onOnline())})))}unmount(){var e,t;On(this,Kt)._--,E(this,Kt)===0&&((e=E(this,Wr))==null||e.call(this),V(this,Wr,void 0),(t=E(this,Gr))==null||t.call(this),V(this,Gr,void 0))}isFetching(e){return E(this,Te).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return E(this,Wt).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=E(this,Te).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=E(this,Te).build(this,t),s=r.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Qt(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return E(this,Te).findAll(e).map(({queryKey:t,state:r})=>{const s=r.data;return[t,s]})}setQueryData(e,t,r){const s=this.defaultQueryOptions({queryKey:e}),o=E(this,Te).get(s.queryHash),a=o==null?void 0:o.state.data,i=Bh(t,a);if(i!==void 0)return E(this,Te).build(this,s).setData(i,{...r,manual:!0})}setQueriesData(e,t,r){return Be.batch(()=>E(this,Te).findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=E(this,Te).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=E(this,Te);Be.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=E(this,Te);return Be.batch(()=>(r.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},s=Be.batch(()=>E(this,Te).findAll(e).map(o=>o.cancel(r)));return Promise.all(s).then(Ze).catch(Ze)}invalidateQueries(e,t={}){return Be.batch(()=>(E(this,Te).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},s=Be.batch(()=>E(this,Te).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let a=o.fetch(void 0,r);return r.throwOnError||(a=a.catch(Ze)),o.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(s).then(Ze)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=E(this,Te).build(this,t);return r.isStaleByTime(Qt(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ze).catch(Ze)}fetchInfiniteQuery(e){return e.behavior=ui(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ze).catch(Ze)}ensureInfiniteQueryData(e){return e.behavior=ui(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return os.isOnline()?E(this,Wt).resumePausedMutations():Promise.resolve()}getQueryCache(){return E(this,Te)}getMutationCache(){return E(this,Wt)}getDefaultOptions(){return E(this,Gt)}setDefaultOptions(e){V(this,Gt,e)}setQueryDefaults(e,t){E(this,$r).set(dn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...E(this,$r).values()],r={};return t.forEach(s=>{fn(e,s.queryKey)&&Object.assign(r,s.defaultOptions)}),r}setMutationDefaults(e,t){E(this,Vr).set(dn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...E(this,Vr).values()],r={};return t.forEach(s=>{fn(e,s.mutationKey)&&Object.assign(r,s.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...E(this,Gt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ja(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ss&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...E(this,Gt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){E(this,Te).clear(),E(this,Wt).clear()}},Te=new WeakMap,Wt=new WeakMap,Gt=new WeakMap,$r=new WeakMap,Vr=new WeakMap,Kt=new WeakMap,Wr=new WeakMap,Gr=new WeakMap,Dc),Zl=lt.createContext(void 0),ig=e=>{const t=lt.useContext(Zl);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},eu=({client:e,children:t})=>(lt.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),n.jsx(Zl.Provider,{value:e,children:t})),tu=lt.createContext(!1),cg=()=>lt.useContext(tu);tu.Provider;function lg(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var ug=lt.createContext(lg()),dg=()=>lt.useContext(ug),fg=(e,t,r)=>{const s=r!=null&&r.state.error&&typeof e.throwOnError=="function"?Wl(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||s)&&(t.isReset()||(e.retryOnMount=!1))},mg=e=>{lt.useEffect(()=>{e.clearReset()},[e])},pg=({result:e,errorResetBoundary:t,throwOnError:r,query:s,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(o&&e.data===void 0||Wl(r,[e.error,s])),hg=e=>{if(e.suspense){const r=o=>o==="static"?o:Math.max(o??1e3,1e3),s=e.staleTime;e.staleTime=typeof s=="function"?(...o)=>r(s(...o)):r(s),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},gg=(e,t)=>e.isLoading&&e.isFetching&&!t,_g=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,fi=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function yg(e,t,r){var p,h,g,_;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const s=cg(),o=dg(),a=ig(),i=a.defaultQueryOptions(e);(h=(p=a.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||h.call(p,i);const c=a.getQueryCache().get(i.queryHash);process.env.NODE_ENV!=="production"&&(i.queryFn||console.error(`[${i.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),i._optimisticResults=s?"isRestoring":"optimistic",hg(i),fg(i,o,c),mg(o);const l=!a.getQueryCache().get(i.queryHash),[u]=lt.useState(()=>new t(a,i)),m=u.getOptimisticResult(i),f=!s&&e.subscribed!==!1;if(lt.useSyncExternalStore(lt.useCallback(v=>{const x=f?u.subscribe(Be.batchCalls(v)):Ze;return u.updateResult(),x},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),lt.useEffect(()=>{u.setOptions(i)},[i,u]),_g(i,m))throw fi(i,u,o);if(pg({result:m,errorResetBoundary:o,throwOnError:i.throwOnError,query:c,suspense:i.suspense}))throw m.error;if((_=(g=a.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||_.call(g,i,m),i.experimental_prefetchInRender&&!br&&gg(m,s)){const v=l?fi(i,u,o):c==null?void 0:c.promise;v==null||v.catch(Ze).finally(()=>{u.updateResult()})}return i.notifyOnChangeProps?m:u.trackResult(m)}function vg(e,t){return yg(e,Zh)}const Jr={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"}},xg={nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"0",count:0,total:0},bg="Imagem do produto",mi=1,jg="Sair",Cg=e=>e.exit,pi=({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"}],Sg=(e,t)=>{const r=(t??"").split("@")[0];return e?`Olá${r.length?", ":" "}${r}!`:"Olá!"},wg=e=>"Seja bem vindo!",Pg="Marque a caixa para aceitar os termos de política de privacidade.",Eg="Algumas informações estão incorretas ou não foram preenchidas",Ng="Enviar",Ig=new Jl,ru=y.createContext({}),Rg=({brand:e,constants:t,collectionId:r,children:s,itemsPerPage:o=24,pathname:a,searchParams:i,slug:c,...l})=>{const{PLP_SORT_DEFAULT:u}=t,m=y.useRef(""),[f,p]=y.useState(!1),h=(i==null?void 0:i.toString())??"",g=y.useMemo(()=>{const _=new URLSearchParams(h),v=_.get("query"),x=Number(_.get("page")??1),C=Number(_.get("count")??o),j=_.get("sort"),b=_.getAll("facets"),w=j??(r?"":u);return{base:v?"":a,count:C,facets:F.selectedFacets(b),page:x,sort:w,term:v??null}},[h,a,o,r,u]);return y.useEffect(()=>{m.current!==a&&(m.current=a,window.document.body.scrollTo(0,0))},[a]),n.jsx(ru.Provider,{value:y.useMemo(()=>({...l,constants:t,openFilters:f,setOpenFilters:p}),[t,f,l]),children:n.jsx(eu,{client:Ig,children:n.jsx(ba,{brand:e,collectionId:r,state:g,searchParams:i??new URLSearchParams,children:s})})})},Me=()=>{const e=y.useContext(ru);if(e===void 0)throw new Error("usePLPContext must be used within a PLPProvider");return e},as=(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)=>as(o,t[a]));if(Array.isArray(t))return!1;const r=Object.keys(e),s=Object.keys(t);return r.length!==s.length?!1:r.every(o=>Object.prototype.hasOwnProperty.call(t,o)&&as(e[o],t[o]))},Tg=(e,t,r="page")=>Object.keys(t).some(s=>s===r?!1:!as(t[s],e[s])),Ag=async(e,t)=>{const r=await fetch(`https://${t}.myvtex.com/_v/proxy/search/product`,{method:"POST",body:JSON.stringify(e)});if(!r.ok)throw new Error("[FAILED TO FETCH DATA]");const s=await r.json();return s==null?void 0:s.data},nu=()=>({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}}}),su=(e,t,r,s=24)=>{const o=new Set,a=[];if(!Array.isArray(e)||e.length===0)return{taken:o,placedBanners:a};const i=t*s*r;for(const c of e){let l=Number(c.position_grid),u=!1;for(;l<i;){const m=l%r;if(m+c.columns>r){l+=r-m;continue}if(!Array.from({length:c.columns}).some((h,g)=>o.has(l+g))){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}},hs=(e,t,r,s=24)=>{const{placedBanners:o,taken:a}=su(e??[],t,r),i=[];let c=0;try{for(;i.length<t*s;)a.has(c)||i.push(c),c++;return{banners:o,products:i}}catch(l){console.info(`[PLP INFINITE FAILED TO GEN POSITIONS]: page=${t}`,l)}return{banners:[],products:i}},Mo=(e,t=!1)=>Array.from({length:e},(r,s)=>{const o=s+1;return{loading:t?!1:e===o,page:o}}),kg=(e,t)=>[...e,{loading:!1,page:t}],Og=(e=1,t=24)=>({nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"1",count:t,total:e}),Lg=(e,t,r,s,o)=>{const a=o,i=(e.length-1)*o+a-1,c=r[i];return t.filter((l,u)=>{const m=s[u];return m<=c||o>a&&m>c})},ou=(e,t)=>{const r=new Map;for(const o of e){const a=Math.floor(o/t);r.has(a)||r.set(a,[]),r.get(a).push(o)}const s=[];for(const[,o]of r){const a=o[Math.floor(Math.random()*o.length)];s.push(a)}return s},au=(e,t)=>{if(!e)return[];const r=e.map((s,o)=>s.video&&s.video!==""?o:null).filter(s=>s);return ou(r,t)},iu=e=>Array.isArray(e)?e.map((t,r)=>({href:`/${e.slice(0,r+1).join("/")}`,name:t})):[],Mg=Object.freeze(Object.defineProperty({__proto__:null,createBreadcrumb:iu,createPage:kg,createPages:Mo,createPagination:Og,createProduct:nu,deepEqual:as,fetchPage:Ag,getBanners:su,getPositions:hs,getProductsWithVideo:au,getRandomVideoPerRow:ou,getVisibleBanners:Lg,hasStateChangedExceptPage:Tg},Symbol.toStringTag,{value:"Module"})),Dg=(e,t,r,s=0)=>{if(!e.length)return[];let o=0;const a=[];for(let i=0;i<e.length;i+=r){const c=e.slice(i,i+r),l=c.findIndex(u=>{var 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(g=>g.position_grid===f+1),h=f+o+1;p&&(o+=p.columns),a.push({position:h,canPlayVideo:u===l})}}return a},cu=(e,t,r)=>{const s=(t-1)*r,o=t*r;return e>=s&&e<=o},wn=e=>{var t;return(t=e==null?void 0:e.map(r=>({disable:F.disableSKU(r),size:F.getSKUName(r),skuID:"sku"in r&&r.sku})))==null?void 0:t.filter(r=>r.disable)},Fg=Object.freeze(Object.defineProperty({__proto__:null,createGridPosAndVideo:Dg,getSkusNotify:wn,isPositionInCurrentPage:cu},Symbol.toStringTag,{value:"Module"})),lu=({isMobile:e,ICONS:t,NOTIFY_INFO:r})=>n.jsxs(n.Fragment,{children:[n.jsx(d.Modal.Controls,{navigation:e?"top":"middle",isMobile:e??!1,children:!e&&n.jsxs(n.Fragment,{children:[n.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),n.jsx(d.Button,{"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})}),n.jsx(d.Modal.Title,{navigation:e?"top":"middle",title:r.title})]});lu.displayName="Notify.Controls";const vt={"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 uu(e){const r=decodeURIComponent(window.document.cookie).split(";");for(const s of r){const[o,a]=s.trim().split("=");if(o===e)return a}}function wa(e,t,r={}){const o={...{path:"/",expires:new Date(Date.now()+36e5)},...r};let a=`${encodeURIComponent(e)}=${encodeURIComponent(t??"")}`;for(const i in o)o[i]!==void 0&&(a+=`; ${i}`,i==="expires"?a+=`=${o[i].toUTCString()}`:typeof o[i]=="boolean"?a+=`; ${o[i]?"true":"false"}`:a+=`=${o[i]}`);window.document.cookie=a}const du=y.createContext({amount:null,boxes:null,toExpire:null,loading:!0,logout:()=>null,getCurrentCredits:()=>({credits:0,cashback:0})}),zg=({children:e,AUTH_TOKEN_COOKIE:t})=>{var m;const{shipping:r,cartStore:s}=Pe(),[o,a]=y.useState({amount:null,boxes:null,toExpire:null,loading:!0}),i=y.useCallback(async()=>{try{await fetch("/api/user",{priority:"low"}).then(f=>f.json()).then(f=>{const{userCredits:p,userId:h,sub:g,..._}=f,{wishlist:v,...x}=_;a({amount:p==null?void 0:p.amount,boxes:p==null?void 0:p.boxes,toExpire:p==null?void 0:p.toExpire,user:{...x,userId:h,sub:g??""},loading:!1,wishlist:(typeof v=="string"?v.split(",").filter(Boolean):v)??[]})})}catch(f){console.error("user info and my credits request",f),a({...o,loading:!1})}},[a]),c=y.useCallback(()=>{wa(t),i()},[i]),l=y.useCallback(()=>o.boxes?o.boxes.reduce((f,p)=>p.gift_card_box.refid==="C1643"?(f.cashback+=p.amount,f):(f.credits+=p.amount,f),{cashback:0,credits:0}):{cashback:0,credits:0},[o]),u=y.useCallback(async()=>{var f,p,h;if((f=o.user)!=null&&f.postalCode&&(s!=null&&s.id)&&!(s!=null&&s.loading)&&!((h=(p=s==null?void 0:s.shippingData)==null?void 0:p.address)!=null&&h.postalCode))try{await r(o.user.postalCode)}catch(g){console.error("Error auto-filling CEP:",g)}},[(m=o.user)==null?void 0:m.postalCode]);return y.useEffect(()=>{i()},[i]),y.useEffect(()=>{u()},[u]),n.jsx(du.Provider,{value:y.useMemo(()=>({...o,getCurrentCredits:l,logout:c}),[o,l,c]),children:e})},Yr=()=>{const e=y.useContext(du);if(e===void 0)throw new Error("useContext(SessionContext) must be used within a SessionProvider");return e},fu=({color:e,delay:t=3e3,sku:r,setStatus:s,setIsLoading:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i})=>{const c=y.useRef(null),[l,u]=y.useState(null),{sendDataLayerEvent:m}=le(),{user:f}=Yr(),p=f!=null&&f.firstName?`${f==null?void 0:f.firstName} ${f==null?void 0:f.lastName}`:"";return n.jsx("div",{className:vt["notify--form"],children:n.jsxs("form",{action:"POST",onSubmit:async h=>{var v;h.preventDefault();const g=h.currentTarget,_=((v=g.querySelector("input"))==null?void 0:v.value)??"";fetch("/api/aviseme",{method:"POST",body:JSON.stringify({userName:p,email:_,sku:r==null?void 0:r.skuID})}).then(x=>s(x.ok)).finally(()=>{o(!1),g.reset(),m({functionKey:"readyEvents",data:{event:"notify_me",readyData:{size:r==null?void 0:r.size,item_id:r==null?void 0:r.skuID,color:e}}}),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{var x;(x=document.body)==null||x.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0})),u(!0),s(null)},t)})},children:[n.jsx(d.TextField.Structure,{input:n.jsx(d.TextField.Input,{feedback:typeof l=="boolean"&&l?"error":"none",type:"email",label:i.email_placeholder,mode:"over-label",variant:"outlined",sizeVariant:"large",onChange:h=>u(!h.target.validity.valid),required:!0}),supportText:typeof l=="boolean"&&l?n.jsx(d.TextField.SupportText,{text:a.messages.invalid_email,feedback:"error"}):n.jsx(n.Fragment,{})}),n.jsx(d.Button,{disabled:!(l===!1||!r)||!r,type:"submit",size:"large",children:i.button})]})})};fu.displayName="Notify.Form";const mu=({isLoading:e=!1})=>n.jsx("div",{className:vt["notify--loading"],"data-loading":e,children:n.jsx(d.Spinner,{})});mu.displayName="Notify.Loading";const Pa={"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"},pu=({children:e,...t})=>n.jsx("div",{...t,className:Pa["product-variation-list--list"],children:e});pu.displayName="ProductVariationList.List";const hu=({fill:e="#1352C7",src:t="",type:r="size",text:s,...o})=>{const{nextimage:a}=pe();return r==="size"?n.jsxs(d.ToggleSize.Wrapper,{...o,size:"large",variation:"ghost",children:[n.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-size"}),n.jsx(d.ToggleSize.Text,{children:s})]}):n.jsxs(d.ToggleStyle.Wrapper,{...o,size:"small",title:"wrapper-texture",children:[n.jsx(d.ToggleStyle.DisabledAdornment,{title:"disabled-adornment-texture"}),r==="color"?n.jsx(d.ToggleStyle.Color,{background:e,title:"color"}):n.jsx(d.ToggleStyle.Texture,{title:"texture",children:n.jsx(a,{alt:s??"image",height:40,src:t,width:40})})]})};hu.displayName="ProductVariationList.Option";const gu=({children:e,...t})=>n.jsx("div",{className:Pa["product-variation-list"],...t,children:e});gu.displayName="ProductVariationList.Root";const _u=({children:e,title:t,...r})=>n.jsxs("div",{...r,className:Pa["product-variation-list--title"],children:[t?n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.SectionWrapper,{children:n.jsx("p",{children:t})})}):n.jsx(n.Fragment,{}),e]});_u.displayName="ProductVariationList.Title";const jt={List:pu,Option:hu,Title:_u,Root:gu},Bg=(e,t)=>{if(!e||!t)return!1;const r=Object.keys(e);return r.length!==Object.keys(t).length?!1:r.every(s=>e[s]===t[s])},yu=({children:e,label:t="",skus:r,sku:s,setSku:o})=>n.jsxs(n.Fragment,{children:[n.jsx("div",{className:vt["notify--selector--header"],children:e}),n.jsxs(jt.Root,{className:vt["notify--selector"],children:[n.jsx(jt.Title,{title:t}),n.jsx(jt.List,{children:Array.isArray(r)&&r.map((a,i)=>{const c=Bg(s,a);return n.jsx(jt.Option,{active:c,onClick:()=>o(c?null:a),text:String(a.size),type:"size"},i)})})]})]});yu.displayName="Notify.Selector";const hi=({type:e,icon:t,title:r,subtitle:s})=>n.jsx("div",{className:vt[`notify--status--${e}`],children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:t,size:"large"})},children:n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h2",{children:r}),n.jsx("h3",{children:s})]})})}),vu=({status:e,ICONS:t,PRODUCT_CARD_TEXTS:r})=>n.jsxs("div",{className:vt["notify--status"],"data-status":e,children:[n.jsx(hi,{...r.success,icon:t.check_circle,type:"success"}),n.jsx(hi,{...r.error,icon:t.alert_circle,type:"error"})]});vu.displayName="Notify.Status";const Ea=({color:e,open:t,setVisible:r,skus:s,sku:o,setSku:a,ICONS:i,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l,PRODUCT_CARD_TEXTS:u,Z_INDEX_WAR:m})=>{const[f,p]=y.useState(!1),[h,g]=y.useState(null),{isMobile:_}=oe();return n.jsxs(d.Modal.Root,{isMobile:_??!1,isOpen:t,setIsOpen:r,variant:_?"sideBottom":"sideLeft",style:{zIndex:m.modal},className:vt["modal-modifier"],children:[n.jsx(d.Modal.Header,{navigation:"top",className:vt["notify--header-modifier"],children:n.jsx(lu,{isMobile:_??!1,ICONS:i,NOTIFY_INFO:l})}),n.jsxs(d.Modal.Body,{className:vt["notify--modal--body"],children:[n.jsxs("div",{className:vt["notify--container"],children:[n.jsxs(yu,{label:l.selector_label,sku:o,skus:s,setSku:a,children:[n.jsx("p",{children:l.subtitle}),n.jsx("span",{children:l.description})]}),n.jsx(fu,{delay:4e3,sku:o,setStatus:g,setIsLoading:p,color:e,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l}),n.jsx(mu,{isLoading:f}),n.jsx("div",{className:vt["notify--selector--header"],children:n.jsx("span",{children:l.legal})})]}),n.jsx(vu,{status:h,ICONS:i,PRODUCT_CARD_TEXTS:u})]})]})};Ea.displayName="Notify";const Pn=({skus:e,ICONS:t,NEWSLETTER_CONFIGS:r,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:a,...i})=>{const c=wn(e??[]);return n.jsx(Ea,{...i,skus:c,ICONS:t,NEWSLETTER_CONFIGS:r,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:a})};Pn.displayName="PDC.Notification";const Zt=wr.create(e=>({banners:[],load:!1,pages:[],products:[],createPagesScroll:(t,r)=>{e(s=>({...s,...r,pages:Mo(t)}))},trimPages:t=>{e(r=>r.pages.length?{...r,pages:r.pages.filter(s=>s.page<=t).map(s=>({...s,loading:!1}))}:r)},addPage:(t,r)=>{e(s=>s.pages.some(o=>o.page===t)?s:{...s,...r,pages:[...s.pages,{page:t,loading:!1}]})},reset:()=>e(()=>({pages:Mo(1,!0)})),setLoad:t=>e(r=>r.load===t?r:{load:t}),setPositions:t=>e({...t}),updateProducts:t=>{e(r=>r.pages.find(o=>o.page===t)?{...r,pages:r.pages.map(o=>o.page===t?{...o,loading:!0}:o)}:r)}})),xu=y.createContext({}),bu=({banners:e,children:t})=>{const{router:r}=pe(),{isMobile:s}=oe(),{searchParams:o}=Fe(),{addPage:a}=Zt(),{constants:i}=Me(),[c,l]=y.useState(!1),[u,m]=y.useState(null),[f,p]=y.useState([]),h=s?8:16,g=s?2:4,{ITEMS_PER_PAGE:_,ICONS:v,NEWSLETTER_CONFIGS:x,NOTIFY_INFO:C,PRODUCT_CARD_TEXTS:j,Z_INDEX_WAR:b}=i,w=y.useCallback((N,R,I=!1)=>{const O=N.page+1;if(I===!0&&O<=R){const L=hs(e,O,g,_);a(O,L)}},[a,e,g,_]),S=y.useCallback(N=>{const R=new URLSearchParams(o.toString()),I=Number(R.get("page")??1);N!==I&&(R.set("page",String(N)),r.replace(`?${R.toString()}`,{scroll:!1}))},[r,o]),P=y.useCallback((N,R)=>{const I=R?wn([R]):null;p(N),m(I!=null&&I.length?I[0]:null),l(!0)},[]);return n.jsxs(xu.Provider,{value:y.useMemo(()=>({addNewPage:w,gap:h,columns:g,handleNotify:P,updateParamPage:S}),[w,P,h,g,S]),children:[t,n.jsx(Pn,{open:c,sku:u,skus:f,setSku:m,setVisible:l,ICONS:v,NEWSLETTER_CONFIGS:x,NOTIFY_INFO:C,PRODUCT_CARD_TEXTS:j,Z_INDEX_WAR:b})]})},er=()=>{const e=y.useContext(xu);if(e===void 0)throw new Error("PLPInfiniteScrollContext must be used within a ScrollInfiniteProvider");return e},ju=y.createContext({gridBanners:void 0,banners:[]}),Ug=({children:e,data:t,device:r,SectionZone:s,COMMON_PAGE_COLUMN_GAP_PDC:o})=>{const{isMobile:a}=oe(),i=(t==null?void 0:t.sections.filter(f=>f.name!=="List Product Banners"))??[],c=i.slice(0,mi),l=i.slice(mi,i.length),u=t==null?void 0:t.sections.find(f=>f.name==="List Product Banners"),m=y.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&&r==="mobile"||!a&&r==="desktop"?n.jsxs(ju.Provider,{value:{gridBanners:u,banners:m},children:[n.jsx(s,{data:c??[]}),n.jsxs(d.Utils.Column,{gap:o,className:d.helpers.classNameConcat("utils-column-modifier"),children:[e,n.jsx(s,{data:l??[]})]})]}):n.jsx(n.Fragment,{})},En=()=>{const e=y.useContext(ju);return e===void 0&&console.error("Needs PLPContentContext on parent component"),e},Cu=y.createContext({}),Su=({children:e,filters:t,...r})=>{var a;const{constants:{PLP_FILTERS:s}}=Me(),o=(a=t.facets)==null?void 0:a.filter(i=>s.find(c=>c.key===i.key));return n.jsx(Cu.Provider,{value:y.useMemo(()=>({...r,filters:{...t,facets:o}}),[t,o,r]),children:e})},tr=()=>{const e=y.useContext(Cu);if(e===void 0)throw new Error("useFilterContext must be used within a FilterProvider");return e},wu=y.createContext({product:void 0}),qg=({children:e,data:t,productId:r,COMMON_PAGE_COLUMN_GAP:s,SectionZone:o})=>n.jsxs(wu.Provider,{value:{productId:r},children:[e,n.jsx(d.Utils.Column,{gap:s,className:d.helpers.classNameConcat("utils-column-modifier"),children:n.jsx(o,{data:(t==null?void 0:t.sections)??[]})})]}),Pu=()=>{const e=y.useContext(wu);return e||console.error("use this hook only inside PDPContentProvider hierarchy"),e},Do=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase().trim();function Hg(e,t=1e3){let r=!1;return(...s)=>{r||(e(...s),r=!0,setTimeout(()=>{r=!1},t))}}function $g(e,t=1e3){let r;return(...s)=>{clearTimeout(r),r=setTimeout(()=>{e(...s)},t)}}const Eu=(e,t)=>t.getTime()>e.getTime()?Math.abs(t.getTime()-e.getTime()):0,nn=(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),Vg=e=>{const t=Xp.decodeJwt(e??"");return{email:t.sub,userId:t.userId}},Wg=["name","email","phone","date","cpf","cep"],gi={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}$/},Nu=({type:e,input:t,required:r=!1})=>{if(typeof t!="string"||!r&&t===""||!gi[e])return!0;const s=t.trim();return gi[e].test(s)},Gg=e=>{const t=/\/(\d+)-\d+-\d+\/(.+?)\./,r=typeof e=="string"?e.match(t):null;return r?r[2].replace(/-/g," "):bg},Kg=Object.freeze(Object.defineProperty({__proto__:null,FieldTypes:Wg,debounce:$g,getAltTextFromUrl:Gg,getAuthenticatedUser:Vg,getCookie:uu,getDaysHoursMinutesSeconds:nn,getMilliSeconds:Eu,removeAccentsAndReplaceSpaces:Do,setCookie:wa,throttle:Hg,validateInput:Nu},Symbol.toStringTag,{value:"Module"})),Qg=({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}},Xg=({formData:e,mountedFields:t,inputsStatus:r,hasTermsAndConditions:s,checkboxRef:o,setFormStatus:a})=>{let i=!1,c=!1;const l={...r};return s&&!o.current&&(a("unchecked"),i=!0),e.forEach((u,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}Nu({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}},Iu=y.createContext({}),Ru=({children:e,masterDataEmailField:t,fields:r,variant:s,CONSTANTS:{MASTER_DATA_ENTITY:o,NEWSLETTER_CONFIGS:a}})=>{const{sendDataLayerEvent:i}=le(),c=a.hasTermsAndConditions,{mountedFields:l,mountedInputsStatus:u}=y.useMemo(()=>Qg({fields:r}),[r]),m=y.useRef(!1),[f,p]=y.useState("idle"),[h,g]=y.useState(u),_=async({searchFields:S,entity:P})=>{const N=await _r.post("/api/master-data/search",{body:{masterDataEntity:P,searchFields:S,headers:{"REST-Range":"resources=0-49"}}});return console.info(N),N.data},v=async({documentId:S,fieldsToBeUpdated:P,entity:N})=>(await _r.post("/api/master-data/update",{dataEntityName:N,documentId:S,fieldsToBeUpdated:P})).status,x=y.useCallback(async({payload:S,response:P},N,R)=>{var D;const{email:I,...O}=S,[L]=await _({searchFields:{[N]:I},entity:R??o.newsletter}),W=Array.isArray(L)?(D=L[0])==null?void 0:D.id:void 0;return L&&await v({documentId:W,fieldsToBeUpdated:O,entity:R??o.newsletter})!==204?{...P,status:"error"}:{...P,status:"success"}},[]),C=y.useCallback(async({formData:S},P,N)=>{const R={status:"idle",inputsStatus:{}},I={};S.forEach((O,L)=>{I[L]=O});try{const L=(await _r.post("/api/master-data",{body:{payload:I,masterDataEntity:P??o.newsletter}})).data;return(L==null?void 0:L.Message)==="duplicated entry"?x({payload:I,response:R},N,P):L!=null&&L.Id?{...R,status:"success"}:{...R,status:"error"}}catch(O){return console.error("error",O),{...R,status:"error"}}},[x]),j=y.useCallback(async(S,P,N)=>{S.preventDefault();const R=new FormData(S.target);if(R.append("acceptedTerms",m.current?"true":"false"),m.current){const O=new _o.TZDate(new Date,"America/Sao_Paulo").toISOString();R.append("termsAcceptedAt",O)}P&&Object.keys(P).forEach(O=>{R.append(O,P[O])});const I=await C({formData:R},N??"",t);I&&(p(I==null?void 0:I.status),g(I.inputsStatus),I.status==="success"&&i({functionKey:"readyEvents",data:{event:"generate_lead"}}))},[t,C,p,g,i]),b=y.useCallback(S=>{const P=new FormData(S.currentTarget.parentElement),{hasEmptyFields:N,hasErrors:R,inputStatusToUpdate:I}=Xg({formData:P,mountedFields:l,inputsStatus:h,hasTermsAndConditions:c,checkboxRef:m,setFormStatus:p});if(g(I),N||R){S.preventDefault();return}p("loading")},[l,h,c,m]),w=y.useCallback(()=>{p("idle"),g(u)},[u]);return n.jsx(Iu.Provider,{value:y.useMemo(()=>({formStatus:f,handleSubmit:j,setFormStatus:p,inputsStatus:h,setInputsStatus:g,hasTermsAndConditions:c,handleClickToSubmit:b,checkboxRef:m,masterDataEmailField:t,fields:r,variant:s,resetNewsletter:w}),[f,j,p,h,g,b,c,m,t,r,s,w]),children:e})},Na=()=>{const e=y.useContext(Iu);if(e===void 0)throw new Error("useNewsletterContext must be used within a NewsletterProvider");return e},Tu=y.createContext({}),Au=({children:e,data:t})=>{const[r,s]=y.useState(),[o,a]=y.useState(),i=y.useCallback(u=>{const m=t.filter(f=>f.cidade===u);s(m)},[t]),c=y.useCallback(u=>{a(u)},[]),l=y.useCallback(()=>{a("")},[]);return n.jsx(Tu.Provider,{value:y.useMemo(()=>({clearSelectedStore:l,data:t,handleSelectCity:i,handleSelectStore:c,selectedCity:r,selectedStore:o}),[l,t,i,c,r,o]),children:e})},gs=()=>{const e=y.useContext(Tu);if(e===void 0)throw new Error("useLPStoreContext must be used within a LPStoreProvider");return e},is={contexts:{addToCart:{hook:Jt,provider:Ul},cart:{hook:Pe,provider:Mh},cms:{FlagsAndTags:{context:ua,hook:Mt,provider:Jp}},newsletter:{hook:Na,provider:Ru},events:{hook:le,provider:ah},global:{hook:oe,provider:jh,mediator:_l},header:{hook:Ee,provider:kh},menuMobile:{hook:xa,provider:zl},next:{hook:pe,provider:Ch},pdp:{provider:Zp},PDPContent:{provider:qg,hook:Pu},plp:{provider:Rg,hook:Me},plpFilter:{hook:tr,provider:Su},PLPContent:{provider:Ug,hook:En},plpInfinite:{provider:bu,hook:er},pdpdata:{provider:ih},searchSearch:{hook:Fe,provider:ba},session:{hook:Yr,provider:zg},ui:{hook:xn,provider:gl},lpStore:{hook:gs,provider:Au}},hooks:{useBackPDC:zc,useClipboard:ch,useDisableZoom:Qc,useLocalStorage:uh,useOnScreen:da,useSentinel:ms,useTouchZoomPan:Xc},stores:{cart:xh,header:wh,pdp:Th,wishlist:Ah}},Yg={cart:_h,events:oh,plp:Mg,product:F.productHelpers,utils:Kg,search:F.search},Ia={helpers:Yg},ot={"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"},ku=({brand:e,className:t,name:r,...s})=>n.jsxs("div",{...s,className:d.helpers.classNameConcat(ot["add-to-cart--card--name"],t),children:[n.jsx(d.Tag,{style:{textTransform:"uppercase"},size:"small",variant:"quaternary",title:e,children:e}),n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:n.jsx("p",{className:"typography-style-body-md",children:r})})})]});ku.displayName="AddToCart.Card.Name";const Ou=({className:e,listPrice:t,price:r,quantity:s,productId:o,...a})=>{const i=F.formatPriceToCurrency(r/100),c=F.formatPriceToCurrency(t/100);return n.jsx("div",{...a,className:d.helpers.classNameConcat(ot["add-to-cart--card--price-quantity"],e),children:n.jsx(d.ProductInfo.Root,{size:"small",layout:"vertical",children:n.jsx(d.ProductInfo.Wrapper,{size:"small",layout:"vertical",children:n.jsx(d.ProductInfo.ValuesWrapper,{children:r!==t?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:i,size:"small"},"price-list"),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:c,size:"small"},"price-low")]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:c,size:"small"},"price-low")})})})})};Ou.displayName="AddToCart.Card.PriceQuantity";const Jg="_skeleton_12b79_1",Zg={skeleton:Jg},Lu=({style:e})=>n.jsx("div",{style:e,className:Zg.skeleton}),e_="_image_1y08u_1",t_={image:e_},r_=({alt:e,className:t,objectFit:r,...s})=>{const{nextimage:o}=pe();return n.jsx(o,{quality:90,...s,alt:e??"",className:d.helpers.classNameConcat(t_.image,t),"data-object-fit":r??"cover"})},n_=({videoRef:e,...t})=>n.jsx("video",{...t,ref:e,children:n.jsx("track",{kind:"captions"})}),Oe={Image:r_,Video:n_},Mu=({className:e,productGroupID:t,size:r,texture:s,storeId:o,...a})=>{const{CONSTANTS:{TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c}}=Jt(),[l,u]=y.useState(s??"");return y.useEffect(()=>{l||fetch(`https://${o}.myvtex.com/_v/proxy/catalog/product/info`,{method:"POST",body:JSON.stringify({ids:[t]})}).then(m=>m.json()).then(m=>{const f=m.data[0].items[0];if(f){const p=f.images.find(h=>i.includes(h.imageLabel));p!=null&&p.imageUrl?u(p.imageUrl):u(f.images[0].imageUrl)}}).catch(m=>{console.error(m)})},[l,t,o]),n.jsxs("div",{...a,className:d.helpers.classNameConcat(ot["add-to-cart--card--style-size"],e),children:[n.jsx(d.ToggleStyle.Wrapper,{size:"x-small",style:c,children:n.jsx(d.ToggleStyle.Texture,{children:l?n.jsx(Oe.Image,{alt:"",src:l??"",width:164,height:164,style:c}):n.jsx(Lu,{})})}),n.jsx(d.Utils.Divider,{direction:"vertical",size:"medium",style:{height:24}}),r&&n.jsxs(d.ToggleSize.Wrapper,{size:"small",title:"wrapper-texture",children:[n.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),n.jsx(d.ToggleSize.Text,{children:r})]})]})};Mu.displayName="AddToCart.Card.StyleSize";const{helpers:s_}=Ia,Du=({className:e,item:t,texture:r,storeId:s,...o})=>{const{itemOffered:{name:a,brand:i,skuName:c,isVariationOf:{productGroupID:l}},quantity:u,price:m,sellingPrice:f}=t,{CONSTANTS:{NAME_SPLIT_SYMBOL:p}}=Jt(),{size:h}=s_.product.getColorAndSizeFromSkuName(c??a,p);return n.jsxs("div",{...o,className:d.helpers.classNameConcat(ot["add-to-cart--card--content"],e),children:[n.jsx(ku,{brand:i.name,name:a}),n.jsx(Ou,{price:m,listPrice:f,quantity:u,productId:t.id}),n.jsx(Mu,{size:h,texture:r,productGroupID:l,storeId:s})]})};Du.displayName="AddToCart.Card.Content";const Fu=({image:e,thumbnail:t=!1})=>n.jsx(Oe.Image,{alt:e.alternateName??"image","data-thumbnail":t,height:t?152:120,src:e.url,width:t?152:94});Fu.displayName="AddToCart.Card";const zu=({className:e,item:t,texture:r,thumbnail:s,storeId:o,...a})=>{const{itemOffered:{image:[i]}}=t,c=F.updatedResizedImg(i.url,{width:200,height:300});return n.jsxs("div",{...a,className:d.helpers.classNameConcat(ot["add-to-cart--card"],e),children:[n.jsx(Fu,{image:{alternateName:i.alternateName||"Produto",url:c||""},thumbnail:s}),!s&&n.jsx(Du,{item:t,texture:r,storeId:o})]})};zu.displayName="AddToCart.Card";const Bu=({className:e,children:t,title:r,...s})=>n.jsxs("div",{...s,className:d.helpers.classNameConcat(ot["add-to-cart--content"],e),children:[n.jsx("div",{className:ot["add-to-cart--content--title"],children:r&&n.jsx("h2",{children:r})}),t,n.jsx(yr.Footer,{})]});Bu.displayName="AddToCart.Layout.Content";const Uu=({className:e,...t})=>{var h,g;const{isMobile:r,handleClose:s,CONSTANTS:{ADD_TO_CART:o}}=Jt(),{cartStore:{totalizers:a},setIsOpen:i}=Pe(),c=(h=a.find(_=>_.id==="Discounts"))==null?void 0:h.value,l=((g=a.find(_=>_.id==="Items"))==null?void 0:g.value)??0,u=a.find(_=>_.id==="Shipping"),f=(l-Math.abs(c??0)+((u==null?void 0:u.value)??0))/100,p=F.formatPriceToCurrency(f??0);return n.jsxs("div",{...t,className:d.helpers.classNameConcat(ot["add-to-cart--footer"],e),children:[n.jsxs("div",{className:ot["add-to-cart--footer--total"],children:[n.jsx("span",{children:"Subtotal:"}),n.jsx("span",{children:p})]}),n.jsx(d.Button,{size:"medium",variant:"primary","data-close":!0,onClick:()=>i(!0),children:o.footer.bag}),r?n.jsx(d.Button,{"data-close":!0,size:"medium",variant:"tertiary",children:o.footer.keep_buying}):n.jsx(d.Button,{onClick:()=>s(),size:"medium",variant:"tertiary",children:o.footer.keep_buying})]})};Uu.displayName="AddToCart.Layout.Footer";const qu=({children:e,className:t,thumbnail:r=!1,...s})=>{const{cartStore:{options:o}}=Pe(),{recentlyAddedProducts:a}=xn(),{CONSTANTS:{storeId:i}}=Jt(),c=a.length>3?4:a.length;return n.jsxs("div",{...s,className:ot["add-to-cart--items"],"data-thumbnail":r,children:[Array.isArray(a)&&a.filter((l,u)=>u<c).map(l=>{var m;const u=(m=o==null?void 0:o.find(f=>f.id===l.itemOffered.isVariationOf.productGroupID))==null?void 0:m.texture;return n.jsx(yr.Card,{item:l,thumbnail:r,texture:u,storeId:i},l.itemOffered.sku)}),e]})};qu.displayName="AddToCart.Layout.Items";const Hu=({children:e,Z_INDEX_WAR:t})=>{const{isOpen:r,setIsOpen:s}=Jt(),{isMobile:o}=oe();return n.jsxs(d.Modal.Root,{"data-modal":"add-to-cart--modal",className:ot["add-to-cart__modal"],isMobile:o??!1,isOpen:r,setIsOpen:s,variant:"sideBottom",style:{zIndex:t.modal},children:[n.jsx(d.Modal.Header,{navigation:"top",children:n.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0})}),n.jsx(d.Modal.Body,{children:e})]})};Hu.displayName="AddToCart.Modal";const o_=({children:e})=>{const{count:t,handleClose:r,setIsOpen:s}=Jt(),o=y.useRef(t);return y.useEffect(()=>{t>o.current&&s(!0),t<o.current&&o.current>=1&&r(),o.current=t},[t,r,s]),n.jsx(n.Fragment,{children:e})},$u=({children:e,component:t,CONSTANTS:r,...s})=>{const{recentlyAddedProducts:o}=xn(),{isMobile:a}=oe(),i=o.length>3?4:o.length;return n.jsx(Ul,{...s,count:i,isMobile:a,CONSTANTS:r,children:n.jsx(o_,{children:a?n.jsxs(n.Fragment,{children:[n.jsx(yr.Modal,{Z_INDEX_WAR:r.Z_INDEX_WAR,children:t}),e]}):n.jsx(yr.Tooltip,{component:t,style:{width:350},Z_INDEX_WAR:r.Z_INDEX_WAR,children:e})})})};$u.displayName="AddToCart.Root";const Vu=({children:e,component:t,Z_INDEX_WAR:r,...s})=>{const{contentRef:o,left:a,isLeaving:i,target:c,isOpen:l,top:u}=Jt();return n.jsx(d.Tooltip.Root,{arrow:"top-right",component:n.jsx("div",{...s,ref:o,children:t}),id:"add-to-cart--tooltip",className:ot["add-to-cart--tooltip"],style:{zIndex:r.modal},isLeaving:i,isOpen:l,left:a,size:"medium",position:"top",top:u,children:n.jsx("div",{className:ot["add-to-cart--tooltip"],ref:c,children:e})})};Vu.displayName="AddToCart.Tooltip";const yr={Card:zu,Content:Bu,Footer:Uu,Items:qu,Modal:Hu,Root:$u,Tooltip:Vu},Ra=({title:e,...t})=>{const{recentlyAddedProducts:r}=xn(),{isMobile:s}=oe(),o=r.length>3?4:r.length,a=r.length>(o??1),i=r.length>1;return n.jsx(yr.Root,{isMobile:s,count:r.length,component:n.jsx(yr.Content,{title:e,children:n.jsx(yr.Items,{thumbnail:i,children:a&&n.jsx(d.Badge.Count,{count:r.length-o,size:"medium",variant:"secondary"})})}),...t})};Ra.displayName="AddToCart";const _i={"backtotop-btn":"_backtotop-btn_vcjsm_1","card-modifier":"_card-modifier_vcjsm_29"},a_=({children:e,className:t,classNameButton:r,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 n.jsx(d.Card,{...c,shadow:!0,padding:"small",className:d.helpers.classNameConcat(_i["card-modifier"],t),style:{...i,padding:0},children:n.jsxs("button",{className:d.helpers.classNameConcat(_i["backtotop-btn"],r),onClick:f,style:{...m},"data-orientation":o,children:[s,e]})})},i_="_container_1sy8s_16",Ut={"carousel-container":"_carousel-container_1sy8s_1","add-cart-container":"_add-cart-container_1sy8s_8",container:i_,"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"},c_=({selectedProducts:e,handleAddAllToCart:t,CONSTANTS:r})=>{const s=Object.values(e.products).length;return n.jsxs("div",{className:Ut["add-itens-to-cart-container"],children:[n.jsxs("div",{className:Ut["add-itens-to-cart-container-values"],children:[n.jsx("div",{className:Ut["add-itens-to-cart-qty-products"],children:n.jsx("span",{children:s===0?r.BUY_PACKAGE.group_cart.select_all_product:`${s} ${s===1?r.BUY_PACKAGE.group_cart.select_product:r.BUY_PACKAGE.group_cart.select_product+"s"}`})}),n.jsx("div",{className:Ut["add-itens-to-cart-total"],children:n.jsx("span",{children:F.freightParsePrice({valueInCents:e.totalPrice*100,hasFree:!1,freeTaxMessage:r.FREIGHT_CALCULATION.messages.free_tax})})})]}),n.jsx(d.Button,{onClick:t,className:Ut["add-button"],size:"large",disabled:s===0,variant:"primary",children:r.BUY_BUTTON_LABELS.add_to_cart})]})},l_=e=>e.reduce((t,r)=>{var o;const s=t.find(a=>a.node.id===r.node.id);if(!s)return[...t,r];if((o=s==null?void 0:s.node.isVariantOf)!=null&&o.hasVariant){const a=s.node.isVariantOf.hasVariant,i=r.node.isVariantOf.hasVariant;a&&i&&(s.node.isVariantOf.hasVariant=[...a,...i])}return t},[]),u_=({selectedProduct:e,productId:t,prevState:r,mainSellerId:s})=>{const{products:o,totalPrice:a}=r;try{if(!e){const{[t]:u,...m}=o;return{...r,totalPrice:a-u.price,products:m}}const i=F.getValidOffer(e.offers.offers,s);if(!i)return r;const c=i.seller.identifier,l=i.price;if(o[t]){const{price:u}=o[t];return o[t]={...o[t],price:l,id:e.sku,seller:c},{totalPrice:a+l-u,products:{...o}}}return{totalPrice:a+l,products:{...o,[t]:{id:e.sku,price:l,seller:c,productId:t}}}}catch(i){return console.error("Error handling SKU selection:",i),r}},Wu=y.createContext({}),d_=({children:e,item:t,index:r,shelfTitle:s,...o})=>{const[a,i]=y.useState(null),c=y.useRef(null),l=y.useRef({availableSkus:[],priceInfo:{price:0,listPrice:0}}),{sendDataLayerEvent:u,itemListRef:m}=le(),f=_=>{u({functionKey:"productEvents",data:{commonData:{...t,availableSizes:l.current.availableSkus,...l.current.priceInfo},customData:{index:r+1},event:_}})},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:r}}})},g=()=>{s&&(m.current={item_list_name:s}),f("select_item")};return n.jsx(Wu.Provider,{value:y.useMemo(()=>({...o,index:r,item:t,element:c,selectedSku:a,setSelectedSku:i,eventDataRef:l,sendAddToWishlistEvent:p,sendSelectItemEvent:g,sendAddToCartEvent:h}),[o,t,c,a]),children:e})},mt=()=>{const e=y.useContext(Wu);if(e===void 0)throw new Error("useProductCardContext must be used within a ProductCardProvider");return e},Ue={"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"},Gu=({callback:e,children:t,className:r,data:s,isKit:o,...a})=>{const{item:{availability:{status:i},image:c}}=mt();return i?n.jsxs("div",{...a,className:d.helpers.classNameConcat(Ue["product-card--actions"],r),children:[n.jsxs(ve.Wrapper,{type:"actions--group",children:[n.jsx(ve.Price,{}),n.jsx("div",{className:Ue["product-card--actions--selectors"],children:!o&&n.jsx(ve.StyleSelector,{data:s,images:c,callback:e})})]}),t]}):null};Gu.displayName="ProductCard.Actions";const Ku=({className:e,isKit:t,...r})=>{const{addToCart:s}=Pe(),{isMobile:o=!1,selectedSku:a,outStock:i,item:c,sendAddToCartEvent:l,CONSTANTS:u}=mt(),m=()=>{var h;if(!a)return;const p=F.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(g=>u.TEXTURE_IMAGE.includes(g.alternateName)))==null?void 0:h.url}),l()},f=a?u.BUY_BUTTON_LABELS.add_to_cart:u.BUY_BUTTON_LABELS.select_size;return n.jsx(d.Button,{...r,className:d.helpers.classNameConcat(e,"buy-button"),disabled:!t&&!a&&!i,size:o?"medium":"large",variant:i?"secondary":"primary",onClick:i?r.onClick:m,children:i?"Avise-me quando chegar":f})};Ku.displayName="ProductCard.Actions.BuyButton";const f_={"snackbar-modifier":"_snackbar-modifier_1va2l_1"},Or=({size:e,adornment:t,title:r,subtitle:s,supportChildren:o,className:a,Z_INDEX_WAR:i,...c})=>n.jsxs(d.SnackBar.Structure,{...c,size:e,className:d.helpers.classNameConcat(f_["snackbar-modifier"],a),width:360,style:{zIndex:i.snackbar},children:[n.jsx(d.SnackBar.Content,{adornment:t,title:r,subtitle:s}),o&&n.jsx(d.SnackBar.Support,{children:o})]});Or.displayName="SnackBar";const an={"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 Fo={exports:{}},Ke={};Ke._=Ke._interop_require_default=m_;function m_(e){return e&&e.__esModule?e:{default:e}}var Dn={exports:{}},Ts={},yi;function Qu(){return yi||(yi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}t(e,{assign:function(){return a},searchParamsToUrlQuery:function(){return r},urlQueryToSearchParams:function(){return o}});function r(i){const c={};return i.forEach((l,u)=>{typeof c[u]>"u"?c[u]=l:Array.isArray(c[u])?c[u].push(l):c[u]=[c[u],l]}),c}function s(i){return typeof i=="string"||typeof i=="number"&&!isNaN(i)||typeof i=="boolean"?String(i):""}function o(i){const c=new URLSearchParams;return Object.entries(i).forEach(l=>{let[u,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}}(Ts)),Ts}var As={},jr={};function Xu(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(Xu=function(s){return s?r:t})(e)}jr._=jr._interop_require_wildcard=p_;function p_(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=Xu(t);if(r&&r.has(e))return r.get(e);var s={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(s,a,i):s[a]=e[a]}return s.default=e,r&&r.set(e,s),s}var vi;function Yu(){return vi||(vi=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=jr._(Qu()),o=/https?|ftp|gopher|file/;function a(l){let{auth:u,hostname:m}=l,f=l.protocol||"",p=l.pathname||"",h=l.hash||"",g=l.query||"",_=!1;u=u?encodeURIComponent(u).replace(/%3A/i,":")+"@":"",l.host?_=u+l.host:m&&(_=u+(~m.indexOf(":")?"["+m+"]":m),l.port&&(_+=":"+l.port)),g&&typeof g=="object"&&(g=String(s.urlQueryToSearchParams(g)));let v=l.search||g&&"?"+g||"";return f&&!f.endsWith(":")&&(f+=":"),l.slashes||(!f||o.test(f))&&_!==!1?(_="//"+(_||""),p&&p[0]!=="/"&&(p="/"+p)):_||(_=""),h&&h[0]!=="#"&&(h="#"+h),v&&v[0]!=="?"&&(v="?"+v),p=p.replace(/[?#]/g,encodeURIComponent),v=v.replace("#","%23"),""+f+_+p+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)}}(As)),As}var ks={},xi;function h_(){return xi||(xi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"omit",{enumerable:!0,get:function(){return t}});function t(r,s){const o={};return Object.keys(r).forEach(a=>{s.includes(a)||(o[a]=r[a])}),o}}(ks)),ks}var Os={},bi;function _s(){return bi||(bi=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 g},MiddlewareNotFoundError:function(){return C},MissingStaticPage:function(){return x},NormalizeError:function(){return _},PageNotFoundError:function(){return v},SP:function(){return p},ST:function(){return h},WEB_VITALS:function(){return r},execOnce:function(){return s},getDisplayName:function(){return l},getLocationOrigin:function(){return i},getURL:function(){return c},isAbsoluteUrl:function(){return a},isResSent:function(){return u},loadGetInitialProps:function(){return f},normalizeRepeatedSlashes:function(){return m},stringifyError:function(){return j}});const r=["CLS","FCP","FID","INP","LCP","TTFB"];function s(b){let w=!1,S;return function(){for(var P=arguments.length,N=new Array(P),R=0;R<P;R++)N[R]=arguments[R];return w||(w=!0,S=b(...N)),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 f(b,w){if(process.env.NODE_ENV!=="production"){var S;if((S=b.prototype)!=null&&S.getInitialProps){const R='"'+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(R)}}const P=w.res||w.ctx&&w.ctx.res;if(!b.getInitialProps)return w.ctx&&w.Component?{pageProps:await f(w.Component,w.ctx)}:{};const N=await b.getInitialProps(w);if(P&&u(P))return N;if(!N){const R='"'+l(b)+'.getInitialProps()" should resolve to an object. But found "'+N+'" instead.';throw new Error(R)}return process.env.NODE_ENV!=="production"&&Object.keys(N).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"),N}const p=typeof performance<"u",h=p&&["mark","measure","getEntriesByName"].every(b=>typeof performance[b]=="function");class g extends Error{}class _ 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})}}(Os)),Os}var Fn={exports:{}},ji;function ys(){return ji||(ji=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return o}});const r=F.removeTrailingSlash,s=F.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,r.removeTrailingSlash)(i)+c+l:i.endsWith("/")?""+i+c+l:i+"/"+c+l:""+(0,r.removeTrailingSlash)(i)+c+l};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Fn,Fn.exports)),Fn.exports}var Ls={},zn={exports:{}},Ci;function g_(){return Ci||(Ci=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return o}});const r=F.pathHasPrefix,s=process.env.__NEXT_ROUTER_BASEPATH||"";function o(a){return(0,r.pathHasPrefix)(a,s)}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(zn,zn.exports)),zn.exports}var Si;function Ju(){return Si||(Si=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isLocalURL",{enumerable:!0,get:function(){return s}});const t=_s(),r=g_();function s(o){if(!(0,t.isAbsoluteUrl)(o))return!0;try{const a=(0,t.getLocationOrigin)(),i=new URL(o,a);return i.origin===a&&(0,r.hasBasePath)(i.pathname)}catch{return!1}}}(Ls)),Ls}var Ms={},Ds={},wi;function __(){return wi||(wi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getSortedRoutes",{enumerable:!0,get:function(){return r}});class t{insert(o){this._insert(o.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(o){o===void 0&&(o="/");const a=[...this.children.keys()].sort();this.slugName!==null&&a.splice(a.indexOf("[]"),1),this.restSlugName!==null&&a.splice(a.indexOf("[...]"),1),this.optionalRestSlugName!==null&&a.splice(a.indexOf("[[...]]"),1);const i=a.map(c=>this.children.get(c)._smoosh(""+o+c+"/")).reduce((c,l)=>[...c,...l],[]);if(this.slugName!==null&&i.push(...this.children.get("[]")._smoosh(o+"["+this.slugName+"]/")),!this.placeholder){const c=o==="/"?"/":o.slice(0,-1);if(this.optionalRestSlugName!=null)throw new Error('You cannot define a route with the same specificity as a optional catch-all route ("'+c+'" and "'+c+"[[..."+this.optionalRestSlugName+']]").');i.unshift(c)}return this.restSlugName!==null&&i.push(...this.children.get("[...]")._smoosh(o+"[..."+this.restSlugName+"]/")),this.optionalRestSlugName!==null&&i.push(...this.children.get("[[...]]")._smoosh(o+"[[..."+this.optionalRestSlugName+"]]/")),i}_insert(o,a,i){if(o.length===0){this.placeholder=!1;return}if(i)throw new Error("Catch-all must be the last part of the URL.");let c=o[0];if(c.startsWith("[")&&c.endsWith("]")){let 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 r(s){const o=new t;return s.forEach(a=>o.insert(a)),o.smoosh()}}(Ds)),Ds}var Fs={},zs={},Bs={},Us={},Pi;function y_(){return Pi||(Pi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ensureLeadingSlash",{enumerable:!0,get:function(){return t}});function t(r){return r.startsWith("/")?r:"/"+r}}(Us)),Us}var Ta={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}t(e,{DEFAULT_SEGMENT_KEY:function(){return o},PAGE_SEGMENT_KEY:function(){return s},isGroupSegment:function(){return r}});function r(a){return a[0]==="("&&a.endsWith(")")}const s="__PAGE__",o="__DEFAULT__"})(Ta);var Ei;function v_(){return Ei||(Ei=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}t(e,{normalizeAppPath:function(){return o},normalizeRscURL:function(){return a}});const r=y_(),s=Ta;function o(i){return(0,r.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")}}(Bs)),Bs}var Ni;function Zu(){return Ni||(Ni=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}t(e,{INTERCEPTION_ROUTE_MARKERS:function(){return s},extractInterceptionRouteInformation:function(){return a},isInterceptionRouteAppPath:function(){return o}});const r=v_(),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,r.normalizeAppPath)(c),l){case"(.)":c==="/"?u=`/${u}`:u=c+"/"+u;break;case"(..)":if(c==="/")throw new Error(`Invalid interception route: ${i}. Cannot use (..) marker at the root level, use (.) instead.`);u=c.split("/").slice(0,-1).concat(u).join("/");break;case"(...)":u="/"+u;break;case"(..)(..)":const 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}}}(zs)),zs}var Ii;function x_(){return Ii||(Ii=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isDynamicRoute",{enumerable:!0,get:function(){return s}});const t=Zu(),r=/\/\[[^/]+?\](?=\/|$)/;function s(o){return(0,t.isInterceptionRouteAppPath)(o)&&(o=(0,t.extractInterceptionRouteInformation)(o).interceptedRoute),r.test(o)}}(Fs)),Fs}var Ri;function b_(){return Ri||(Ri=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(o,a){for(var i in a)Object.defineProperty(o,i,{enumerable:!0,get:a[i]})}t(e,{getSortedRoutes:function(){return r.getSortedRoutes},isDynamicRoute:function(){return s.isDynamicRoute}});const r=__(),s=x_()}(Ms)),Ms}var qs={},Hs={},Ti;function j_(){return Ti||(Ti=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getRouteMatcher",{enumerable:!0,get:function(){return r}});const t=_s();function r(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}}}(Hs)),Hs}var $s={},Vs={},Ai;function C_(){return Ai||(Ai=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"escapeStringRegexp",{enumerable:!0,get:function(){return s}});const t=/[|\\{}()[\]^$+*?.-]/,r=/[|\\{}()[\]^$+*?.-]/g;function s(o){return t.test(o)?o.replace(r,"\\$&"):o}}(Vs)),Vs}var ki;function S_(){return ki||(ki=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(g,_){for(var v in _)Object.defineProperty(g,v,{enumerable:!0,get:_[v]})}t(e,{getNamedMiddlewareRegex:function(){return h},getNamedRouteRegex:function(){return p},getRouteRegex:function(){return l},parseParameter:function(){return i}});const r=F.constants,s=Zu(),o=C_(),a=F.removeTrailingSlash;function i(g){const _=g.startsWith("[")&&g.endsWith("]");_&&(g=g.slice(1,-1));const v=g.startsWith("...");return v&&(g=g.slice(3)),{key:g,repeat:v,optional:_}}function c(g){const _=(0,a.removeTrailingSlash)(g).slice(1).split("/"),v={};let x=1;return{parameterizedRoute:_.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(g){const{parameterizedRoute:_,groups:v}=c(g);return{re:new RegExp("^"+_+"(?:/)?$"),groups:v}}function u(){let g=0;return()=>{let _="",v=++g;for(;v>0;)_+=String.fromCharCode(97+(v-1)%26),v=Math.floor((v-1)/26);return _}}function m(g){let{interceptionMarker:_,getSafeRouteKey:v,segment:x,routeKeys:C,keyPrefix:j}=g;const{key:b,optional:w,repeat:S}=i(x);let P=b.replace(/\W/g,"");j&&(P=""+j+P);let N=!1;(P.length===0||P.length>30)&&(N=!0),isNaN(parseInt(P.slice(0,1)))||(N=!0),N&&(P=v()),j?C[P]=""+j+b:C[P]=b;const R=_?(0,o.escapeStringRegexp)(_):"";return S?w?"(?:/"+R+"(?<"+P+">.+?))?":"/"+R+"(?<"+P+">.+?)":"/"+R+"(?<"+P+">[^/]+?)"}function f(g,_){const v=(0,a.removeTrailingSlash)(g).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:_?r.NEXT_INTERCEPTION_MARKER_PREFIX:void 0})}else return w?m({getSafeRouteKey:x,segment:w[1],routeKeys:C,keyPrefix:_?r.NEXT_QUERY_PARAM_PREFIX:void 0}):"/"+(0,o.escapeStringRegexp)(j)}).join(""),routeKeys:C}}function p(g,_){const v=f(g,_);return{...l(g),namedRegex:"^"+v.namedParameterizedRoute+"(?:/)?$",routeKeys:v.routeKeys}}function h(g,_){const{parameterizedRoute:v}=c(g),{catchAll:x=!0}=_;if(v==="/")return{namedRegex:"^/"+(x?".*":"")+"$"};const{namedParameterizedRoute:C}=f(g,!1);let j=x?"(?:(/.*)?)":"";return{namedRegex:"^"+C+j+"$"}}}($s)),$s}var Oi;function w_(){return Oi||(Oi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"interpolateAs",{enumerable:!0,get:function(){return s}});const t=j_(),r=S_();function s(o,a,i){let c="";const l=(0,r.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:g,optional:_}=u[p];let v="["+(g?"...":"")+p+"]";return _&&(v=(h?"":"/")+"["+v+"]"),g&&!Array.isArray(h)&&(h=[h]),(_||p in m)&&(c=c.replace(v,g?h.map(x=>encodeURIComponent(x)).join("/"):encodeURIComponent(h))||"/")})||(c=""),{params:f,result:c}}}(qs)),qs}var Li;function P_(){return Li||(Li=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return m}});const r=Qu(),s=Yu(),o=h_(),a=_s(),i=ys(),c=Ju(),l=b_(),u=w_();function m(f,p,h){let g,_=typeof p=="string"?p:(0,s.formatWithValidation)(p);const v=_.match(/^[a-zA-Z]{1,}:\/\//),x=v?_.slice(v[0].length):_;if((x.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+_+"' passed to next/router in page: '"+f.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");const j=(0,a.normalizeRepeatedSlashes)(x);_=(v?v[0]:"")+j}if(!(0,c.isLocalURL)(_))return h?[_]:_;try{g=new URL(_.startsWith("#")?f.asPath:f.pathname,"http://n")}catch{g=new URL("/","http://n")}try{const j=new URL(_,g);j.pathname=(0,i.normalizePathTrailingSlash)(j.pathname);let b="";if((0,l.isDynamicRoute)(j.pathname)&&j.searchParams&&h){const S=(0,r.searchParamsToUrlQuery)(j.searchParams),{result:P,params:N}=(0,u.interpolateAs)(j.pathname,j.pathname,S);P&&(b=(0,s.formatWithValidation)({pathname:P,hash:j.hash,query:(0,o.omit)(S,N)}))}const w=j.origin===g.origin?j.href.slice(j.origin.length):j.href;return h?[w,b||w]:w}catch{return h?[_]:_}}(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 Bn={exports:{}},Mi;function E_(){return Mi||(Mi=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return s}});const r=ys(),s=function(o){for(var a=arguments.length,i=new Array(a>1?a-1:0),c=1;c<a;c++)i[c-1]=arguments[c];return process.env.__NEXT_I18N_SUPPORT?(0,r.normalizePathTrailingSlash)(F.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)}(Bn,Bn.exports)),Bn.exports}var Ws={},Di;function ed(){return Di||(Di=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RouterContext",{enumerable:!0,get:function(){return s}});const s=Ke._(y).default.createContext(null);process.env.NODE_ENV!=="production"&&(s.displayName="RouterContext")}(Ws)),Ws}var Aa={};(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=Ke._(y),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)})(Aa);var Un={exports:{}},qn={exports:{}},Fi;function td(){return Fi||(Fi=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}r(t,{cancelIdleCallback:function(){return o},requestIdleCallback:function(){return s}});const s=typeof self<"u"&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(a){let i=Date.now();return self.setTimeout(function(){a({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-i))}})},1)},o=typeof self<"u"&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(a){return clearTimeout(a)};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(qn,qn.exports)),qn.exports}var zi;function N_(){return zi||(zi=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return u}});const r=y,s=td(),o=typeof IntersectionObserver=="function",a=new Map,i=[];function c(m){const f={root:m.root||null,margin:m.rootMargin||""},p=i.find(v=>v.root===f.root&&v.margin===f.margin);let h;if(p&&(h=a.get(p),h))return h;const g=new Map,_=new IntersectionObserver(v=>{v.forEach(x=>{const C=g.get(x.target),j=x.isIntersecting||x.intersectionRatio>0;C&&j&&C(j)})},m);return h={id:f,observer:_,elements:g},i.push(f),a.set(f,h),h}function l(m,f,p){const{id:h,observer:g,elements:_}=c(p);return _.set(m,f),g.observe(m),function(){if(_.delete(m),g.unobserve(m),_.size===0){g.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:f,rootMargin:p,disabled:h}=m;const g=h||!o,[_,v]=(0,r.useState)(!1),x=(0,r.useRef)(null),C=(0,r.useCallback)(b=>{x.current=b},[]);(0,r.useEffect)(()=>{if(o){if(g||_)return;const b=x.current;if(b&&b.tagName)return l(b,S=>S&&v(S),{root:f==null?void 0:f.current,rootMargin:p})}else if(!_){const b=(0,s.requestIdleCallback)(()=>v(!0));return()=>(0,s.cancelIdleCallback)(b)}},[g,p,f,_,x.current]);const j=(0,r.useCallback)(()=>{v(!1)},[]);return[C,_,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)}(Un,Un.exports)),Un.exports}var Hn={exports:{}},$n={exports:{}},Bi;function I_(){return Bi||(Bi=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return r}});const r=(s,o)=>process.env.__NEXT_I18N_SUPPORT?F.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)}($n,$n.exports)),$n.exports}var Vn={exports:{}},Ui;function R_(){return Ui||(Ui=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"detectDomainLocale",{enumerable:!0,get:function(){return r}});const r=function(){for(var s=arguments.length,o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];if(process.env.__NEXT_I18N_SUPPORT)return F.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)}(Vn,Vn.exports)),Vn.exports}var qi;function T_(){return qi||(qi=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return o}});const r=ys(),s=process.env.__NEXT_ROUTER_BASEPATH||"";function o(a,i,c,l){if(process.env.__NEXT_I18N_SUPPORT){const u=I_().normalizeLocalePath,m=R_().detectDomainLocale,f=i||u(a,c).detectedLocale,p=m(l,void 0,f);if(p){const h="http"+(p.http?"":"s")+"://",g=f===p.defaultLocale?"":"/"+f;return""+h+p.domain+(0,r.normalizePathTrailingSlash)(""+s+g+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)}(Hn,Hn.exports)),Hn.exports}var Wn={exports:{}},Hi;function A_(){return Hi||(Hi=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return a}});const r=F.addPathPrefix,s=ys(),o=process.env.__NEXT_ROUTER_BASEPATH||"";function a(i,c){return(0,s.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH&&!c?i:(0,r.addPathPrefix)(i,o))}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Wn,Wn.exports)),Wn.exports}var Gn={exports:{}},$i;function k_(){return $i||($i=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(h,g){for(var _ in g)Object.defineProperty(h,_,{enumerable:!0,get:g[_]})}r(t,{ACTION_FAST_REFRESH:function(){return l},ACTION_NAVIGATE:function(){return o},ACTION_PREFETCH:function(){return c},ACTION_REFRESH:function(){return s},ACTION_RESTORE:function(){return a},ACTION_SERVER_ACTION:function(){return u},ACTION_SERVER_PATCH:function(){return i},PrefetchCacheEntryStatus:function(){return f},PrefetchKind:function(){return 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)}(Gn,Gn.exports)),Gn.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return S}});const r=Ke,s=n,o=r._(y),a=P_(),i=Ju(),c=Yu(),l=_s(),u=E_(),m=ed(),f=Aa,p=N_(),h=T_(),g=A_(),_=k_(),v=new Set;function x(P,N,R,I,O,L){if(typeof window>"u"||!L&&!(0,i.isLocalURL)(N))return;if(!I.bypassPrefetchedCheck){const D=typeof I.locale<"u"?I.locale:"locale"in P?P.locale:void 0,H=N+"%"+R+"%"+D;if(v.has(H))return;v.add(H)}(async()=>L?P.prefetch(N,O):P.prefetch(N,R,I))().catch(D=>{if(process.env.NODE_ENV!=="production")throw D})}function C(P){const R=P.currentTarget.getAttribute("target");return R&&R!=="_self"||P.metaKey||P.ctrlKey||P.shiftKey||P.altKey||P.nativeEvent&&P.nativeEvent.which===2}function j(P,N,R,I,O,L,W,D,H){const{nodeName:X}=P.currentTarget;if(X.toUpperCase()==="A"&&(C(P)||!H&&!(0,i.isLocalURL)(R)))return;P.preventDefault();const Z=()=>{const q=W??!0;"beforePopState"in N?N[O?"replace":"push"](R,I,{shallow:L,locale:D,scroll:q}):N[O?"replace":"push"](I||R,{scroll:q})};H?o.default.startTransition(Z):Z()}function b(P){return typeof P=="string"?P:(0,c.formatUrl)(P)}const S=o.default.forwardRef(function(N,R){let I;const{href:O,as:L,children:W,prefetch:D=null,passHref:H,replace:X,shallow:te,scroll:Z,locale:q,onClick:ee,onMouseEnter:se,onTouchStart:me,legacyBehavior:ce=!1,...he}=N;I=W,ce&&(typeof I=="string"||typeof I=="number")&&(I=(0,s.jsx)("a",{children:I}));const z=o.default.useContext(m.RouterContext),ne=o.default.useContext(f.AppRouterContext),T=z??ne,K=!z,ue=D!==!1,je=D===null?_.PrefetchKind.AUTO:_.PrefetchKind.FULL;if(process.env.NODE_ENV!=="production"){let B=function(U){return new Error("Failed prop type: The prop `"+U.key+"` expects a "+U.expected+" in `<Link>`, but got `"+U.actual+"` instead."+(typeof window<"u"?`
|
|
2
|
+
Open your browser's console to view the Component stack trace.`:""))};Object.keys({href:!0}).forEach(U=>{if(U==="href"&&(N[U]==null||typeof N[U]!="string"&&typeof N[U]!="object"))throw B({key:U,expected:"`string` or `object`",actual:N[U]===null?"null":typeof N[U]})}),Object.keys({as:!0,replace:!0,scroll:!0,shallow:!0,passHref:!0,prefetch:!0,locale:!0,onClick:!0,onMouseEnter:!0,onTouchStart:!0,legacyBehavior:!0}).forEach(U=>{const ae=typeof N[U];if(U==="as"){if(N[U]&&ae!=="string"&&ae!=="object")throw B({key:U,expected:"`string` or `object`",actual:ae})}else if(U==="locale"){if(N[U]&&ae!=="string")throw B({key:U,expected:"`string`",actual:ae})}else if(U==="onClick"||U==="onMouseEnter"||U==="onTouchStart"){if(N[U]&&ae!=="function")throw B({key:U,expected:"`function`",actual:ae})}else if((U==="replace"||U==="scroll"||U==="shallow"||U==="passHref"||U==="prefetch"||U==="legacyBehavior")&&N[U]!=null&&ae!=="boolean")throw B({key:U,expected:"`boolean`",actual:ae})});const M=o.default.useRef(!1);N.prefetch&&!M.current&&!K&&(M.current=!0,console.warn("Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://nextjs.org/docs/messages/prefetch-true-deprecated"))}if(process.env.NODE_ENV!=="production"&&K&&!L){let B;if(typeof O=="string"?B=O:typeof O=="object"&&typeof O.pathname=="string"&&(B=O.pathname),B&&B.split("/").some(Se=>Se.startsWith("[")&&Se.endsWith("]")))throw new Error("Dynamic href `"+B+"` found in <Link> while using the `/app` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href")}const{href:A,as:k}=o.default.useMemo(()=>{if(!z){const Se=b(O);return{href:Se,as:L?b(L):Se}}const[B,ye]=(0,a.resolveHref)(z,O,!0);return{href:B,as:L?(0,a.resolveHref)(z,L):ye||B}},[z,O,L]),qe=o.default.useRef(A),G=o.default.useRef(k);let Y;if(ce)if(process.env.NODE_ENV==="development"){ee&&console.warn('"onClick" was passed to <Link> with `href` of `'+O+'` but "legacyBehavior" was set. The legacy behavior requires onClick be set on the child of next/link'),se&&console.warn('"onMouseEnter" was passed to <Link> with `href` of `'+O+'` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link');try{Y=o.default.Children.only(I)}catch{throw I?new Error("Multiple children were passed to <Link> with `href` of `"+O+"` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children"+(typeof window<"u"?`
|
|
3
|
+
Open your browser's console to view the Component stack trace.`:"")):new Error("No children were passed to <Link> with `href` of `"+O+"` but one child is required https://nextjs.org/docs/messages/link-no-children")}}else Y=o.default.Children.only(I);else if(process.env.NODE_ENV==="development"&&(I==null?void 0:I.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 Ne=ce?Y&&typeof Y=="object"&&Y.ref:R,[ze,Ie,Ce]=(0,p.useIntersection)({rootMargin:"200px"}),He=o.default.useCallback(B=>{(G.current!==k||qe.current!==A)&&(Ce(),G.current=k,qe.current=A),ze(B),Ne&&(typeof Ne=="function"?Ne(B):typeof Ne=="object"&&(Ne.current=B))},[k,Ne,A,Ce,ze]);o.default.useEffect(()=>{process.env.NODE_ENV==="production"&&T&&(!Ie||!ue||x(T,A,k,{locale:q},{kind:je},K))},[k,A,Ie,q,ue,z==null?void 0:z.locale,T,K,je]);const Re={ref:He,onClick(B){if(process.env.NODE_ENV!=="production"&&!B)throw new Error('Component rendered inside next/link has to pass click event to "onClick" prop.');!ce&&typeof ee=="function"&&ee(B),ce&&Y.props&&typeof Y.props.onClick=="function"&&Y.props.onClick(B),T&&(B.defaultPrevented||j(B,T,A,k,X,te,Z,q,K))},onMouseEnter(B){!ce&&typeof se=="function"&&se(B),ce&&Y.props&&typeof Y.props.onMouseEnter=="function"&&Y.props.onMouseEnter(B),T&&((!ue||process.env.NODE_ENV==="development")&&K||x(T,A,k,{locale:q,priority:!0,bypassPrefetchedCheck:!0},{kind:je},K))},onTouchStart:process.env.__NEXT_LINK_NO_TOUCH_START?void 0:function(ye){!ce&&typeof me=="function"&&me(ye),ce&&Y.props&&typeof Y.props.onTouchStart=="function"&&Y.props.onTouchStart(ye),T&&(!ue&&K||x(T,A,k,{locale:q,priority:!0,bypassPrefetchedCheck:!0},{kind:je},K))}};if((0,l.isAbsoluteUrl)(k))Re.href=k;else if(!ce||H||Y.type==="a"&&!("href"in Y.props)){const B=typeof q<"u"?q:z==null?void 0:z.locale,ye=(z==null?void 0:z.isLocaleDomain)&&(0,h.getDomainLocale)(k,B,z==null?void 0:z.locales,z==null?void 0:z.domainLocales);Re.href=ye||(0,g.addBasePath)((0,u.addLocale)(k,B,z==null?void 0:z.defaultLocale))}return ce?o.default.cloneElement(Y,Re):(0,s.jsx)("a",{...he,...Re,children:I})});(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)})(Fo,Fo.exports);var O_=Fo.exports,L_=O_;const et=F.getDefaultExportFromCjs(L_),M_="_link_w24h0_1",D_="_wrapper_w24h0_98",F_="_text_w24h0_106",Gs={link:M_,wrapper:D_,text:F_},Qe=({children:e,adornments:t,className:r,disableUnderline:s,href:o,mode:a,size:i,title:c,onClick:l,disablePadding:u,...m})=>{const f=d.helpers.ValidateProp({fieldTypes:kr.SizesSmallExtended,property:i,fallback:"medium"}),p=d.helpers.ValidateProp({fieldTypes:kr.Mode,property:a,fallback:"default"});return n.jsx(et,{...m,className:d.helpers.classNameConcat(Gs.link,r),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:n.jsxs("div",{className:Gs.wrapper,onClick:l,children:[t==null?void 0:t.start,n.jsx("p",{className:Gs.text,"data-size":f,children:e}),t==null?void 0:t.end]})})},z_=({ICONS:e})=>{const{resetFeedback:t}=Er();return n.jsxs("div",{className:an["wishlist--snack--actions"],children:[n.jsx(Qe,{href:"/favoritos",children:"Ver Favoritos"}),n.jsx(d.Button,{variant:"tertiary",size:"small",onClick:t,adornment:{start:n.jsx(d.Icon,{name:e.close})}})]})},ka=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:r})=>{const s=va(),{resetFeedback:o}=Er(),a=y.useRef(null);return y.useEffect(()=>{a.current&&clearTimeout(a.current),s&&(a.current=setTimeout(()=>{o()},5e3))},[s,o]),(s==null?void 0:s.active)&&n.jsx(Or,{Z_INDEX_WAR:r,className:an["wishlist--snack"],"data-action":s.action,title:s.action==="add"?e.messages.add:e.messages.remove,supportChildren:n.jsx(z_,{ICONS:t}),size:"medium"})};ka.displayName="WishList.Feedback";const Oa={"product-list--banner":"_product-list--banner_sfibj_1","product-list--card":"_product-list--card_sfibj_30","product-list":"_product-list_sfibj_1"},rd=({className:e,children:t,columns:r=1,isMobile:s=!1,gap:o=8,position_grid:a,totalColumns:i=4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,...l})=>{const u=y.useMemo(()=>r%i===0?"initial":s||r<2?c:c.split("/").reverse().join("/"),[r,i,s]);return n.jsx("div",{...l,className:d.helpers.classNameConcat(Oa["product-list--banner"],e),style:{aspectRatio:u,maxWidth:`${r/i*100}%`,order:a,padding:o/2},children:t})};rd.displayName="ProductList.Banner";class B_{constructor(){rr(this,"cache",new Map);rr(this,"pendingRequests",new Map);rr(this,"rafId",null)}request(t,r,s){const o=this.getCacheKey(t,s==null?void 0:s.filterTexture);if(this.cache.has(o)){r(this.cache.get(o));return}const a=this.pendingRequests.get(o);a?a.callbacks.push(r):this.pendingRequests.set(o,{productId:t,callbacks:[r],filterTexture:s.filterTexture,storeId:s.storeId}),this.rafId===null&&(this.rafId=requestAnimationFrame(()=>this.executeGroup()))}getCacheKey(t,r){return r!=null&&r.length?`${t}|${r.sort().join(",")}`:t}async executeGroup(){this.rafId=null;const t=this.pendingRequests;if(t.size===0)return;const r=[],s=[];if(t.forEach((a,i)=>{this.cache.has(i)?s.push([i,a]):r.push(a)}),s.forEach(([a,i])=>{const c=this.cache.get(a);c&&i.callbacks.forEach(l=>l(c)),t.delete(a)}),r.length===0)return;const o=new Map;r.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 r=t.map(i=>i.productId),s=t[0].filterTexture,a=`https://${t[0].storeId}.myvtex.com/_v/proxy/catalog/product/similars`;try{const i=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:r})});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?F.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 Vi=new B_;function La(e,t){const[r,s]=y.useState([]),o=y.useRef(!1);y.useEffect(()=>{o.current=!1},[e]);const a=y.useCallback(()=>{!e||o.current||(o.current=!0,Vi.request(e,s,t))},[e,t]),i=y.useCallback(()=>Vi.clearCache(),[]);return{items:r,loadSimilars:a,clearCache:i}}const nd=({isKit:e,parent:t,productId:r,setNotify:s,CONSTANTS:o})=>{const{router:a}=pe(),{items:i,loadSimilars:c}=La(r,{filterTexture:o.TEXTURE_IMAGE,storeId:o.storeId}),l=y.useRef(!1),u=y.useRef(null),m=h=>a.push(h??""),f=y.useCallback(h=>{!r||!h||c()},[r,c]),p=y.useCallback((h,g)=>{if(!h.isIntersecting){o.PLP_INFINITE_SCROLL&&u.current&&(clearTimeout(u.current),u.current=null);return}if(h.intersectionRatio>=g.threshold&&!l.current){if(o.PLP_INFINITE_SCROLL){u.current=setTimeout(()=>{f(!0)},o.PLP_PRODUCT_SIMILAR_DELAY);return}f(!0)}},[f]);return y.useEffect(()=>{if(e||!t.current)return;const h={root:null,threshold:.1},g=new IntersectionObserver(([_])=>{p(_,h)},h);return g.observe(t.current),()=>{u.current&&clearTimeout(u.current),g.disconnect()}},[p,t,e]),n.jsx(ve.Actions,{data:i,callback:m,isKit:e,children:!e&&n.jsx(ve.SizeSelector,{setNotify:s,PLP_SIZE_ORDER:o.PLP_SIZE_ORDER})})};nd.displayName="ProductList.Card.Actions";const sd=({className:e,children:t,gap:r=32,item:s,isMobile:o,order:a,tag:i,hasMaxWidth:c=!0,index:l,setSkuSelected:u,showVideo:m,CONSTANTS:f,...p})=>{const h=y.useRef(null),{availability:{status:g}}=s,_=y.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 n.jsxs("div",{...p,className:d.helpers.classNameConcat(Oa["product-list--card"],e),"data-mobile":o,"data-order":a,ref:h,style:{...c&&{maxWidth:o?"50%":"25%"},order:a,padding:r/2},children:[n.jsxs(ve.Root,{item:s,isMobile:o,index:l,size:o?"small":"medium",order:a,outStock:!g,CONSTANTS:f,children:[n.jsx(ve.Header,{product:s,tag:i==null?void 0:i.commercial}),n.jsx(ve.Media,{showVideo:m,hasPriority:!0}),n.jsxs(ve.Wrapper,{type:"body",children:[n.jsx(ve.Title,{tag:i==null?void 0:i.institucional}),n.jsx(nd,{productId:s.isVariantOf.productGroupID,parent:h,setNotify:_,isKit:v,CONSTANTS:f}),!v&&n.jsx(ve.OutStock,{callback:_})]}),n.jsx(ve.Wrapper,{type:"footer",children:g&&n.jsx(ve.BuyButton,{isKit:v})})]}),t]})};sd.displayName="ProductList.Card";const od=({children:e,className:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat(Oa["product-list"],t),children:e});od.displayName="ProductList.Grid";const nt={Banner:rd,Card:sd,Root:od,helpers:Fg},U_="_pdc_av7d8_1",Ge={"pdc--empty":"_pdc--empty_av7d8_1","pdc--grid":"_pdc--grid_av7d8_17","pdc--grid--content":"_pdc--grid--content_av7d8_26","pdc--infinite":"_pdc--infinite_av7d8_41","pdc--infinite--card--anchor-pdp":"_pdc--infinite--card--anchor-pdp_av7d8_44","pdc--infinite--loader":"_pdc--infinite--loader_av7d8_44","pdc--infinite--card--anchor-pdp--page":"_pdc--infinite--card--anchor-pdp--page_av7d8_52","pdc--infinite--loader--page":"_pdc--infinite--loader--page_av7d8_52","pdc--infinite--card--disabled":"_pdc--infinite--card--disabled_av7d8_62","pdc--infinite--next-page":"_pdc--infinite--next-page_av7d8_113","pdc--infinite--next-page--card":"_pdc--infinite--next-page--card_av7d8_123","pdc--infinite--next-page--spinner":"_pdc--infinite--next-page--spinner_av7d8_133","pdc--pagination":"_pdc--pagination_av7d8_140",pdc:U_},Ma=({className:e,ICONS:t,PLP_NOT_RESULT:r})=>{const{router:s}=pe(),{isMobile:o}=oe(),a=()=>{s.push(r==null?void 0:r.link)};return n.jsxs("div",{className:d.helpers.classNameConcat(Ge["pdc--empty"],e),children:[n.jsxs(d.TextStructure.DivWrapper,{className:Ge["pdc--empty-wrapper"],children:[n.jsx("span",{className:o?"typography-style-body-md":"typography-style-heading-sm",children:r.title}),n.jsx("p",{className:o?"typography-style-body-xs":"typography-style-body-sm",children:r.subtitle})]}),n.jsx(d.Button,{adornment:{end:n.jsx(d.Icon,{name:t.arrow_right})},className:"typography-style-body-sm-strong",onClick:()=>a(),variant:"tertiary",children:n.jsx("b",{children:r.text})})]})};Ma.displayName="PDC.Empty";const Da=e=>n.jsx("div",{...e,className:Ge["pdc--infinite--next-page"],children:n.jsx(d.Spinner,{className:Ge["pdc--infinite--next-page--spinner"]})});Da.displayName="PDC.Spinner";function ad({CONSTANTS:e}){const{sendDataLayerEvent:t}=le(),{isMobile:r}=oe(),{getAvailableProductTag:s}=Mt(),[o,a]=y.useState([]),[i,c]=y.useState(!0),l=Xr(),u=l.join(","),m=r?16:32;return y.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]),n.jsx("section",{className:an["wishlist-grid"],children:n.jsxs("div",{className:an["wishlist-grid--container"],children:[i&&n.jsx(Da,{}),!l.length&&!(o!=null&&o.length)&&!i&&n.jsx(Ma,{className:an["pdc-empty-modifier"],ICONS:e.ICONS,PLP_NOT_RESULT:e.WISHLIST_NOT_RESULT}),n.jsx(nt.Root,{children:Array.isArray(o)&&o.map((f,p)=>{const h=f.node.cluster.highlights||[],g=s(h);return n.jsx(nt.Card,{gap:m,isMobile:r??!1,item:f.node,tag:g,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)})})]})})}ad.displayName="Wishlist.Grid";const q_=e=>e.map(t=>{var r;return(r=t.isVariantOf)==null?void 0:r.productGroupID})??[],id=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:r})=>{const s=Yr(),o=Xr(),a=va(),{updateList:i}=Er();return y.useEffect(()=>{var l,u;a.active&&yt.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]),y.useEffect(()=>{var u;const c=async()=>{const m=await yt.get("fs::wishlist");m&&(m==null?void 0:m.length)!==o.length&&i(m)},l=async()=>{var h;const m=await yt.get("fs::wishlist")??[],f=s.wishlist?typeof s.wishlist[0]=="object"?q_(s.wishlist):s.wishlist:[],p=[...new Set([...m,...f])];i(p),yt.set("fs::wishlist",p),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(g=>{console.error("Error updating wishlist:",g)})};if((u=s.user)!=null&&u.id){l();return}c()},[s,i]),n.jsx(ka,{ICONS:t,Z_INDEX_WAR:r,WISHLIST_INFO:e})};id.displayName="Wishlist.Init";const cd=({product:e,priceInfo:t,size:r="medium",style:s,ICONS:o})=>{const{sendDataLayerEvent:a,currentLocalRef:i}=le(),c=Xr(),{toggleProduct:l}=Er(),{isVariantOf:{productGroupID:u}}=e;return n.jsx(d.Button,{adornment:{start:n.jsx(d.Icon,{size:r,name:c.includes(u)?o.favorite_true:o.favorite_false})},onClick:()=>{l(u),a({functionKey:"productEvents",data:{event:c.includes(u)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:i.current},commonData:{...e,...t}}})},style:{...s,border:"none"},variant:"tertiary"})};cd.displayName="WishList.Toggle";const ld={Feedback:ka,Toggle:cd,Grid:ad,Init:id},ud=({product:e,tag:t,size:r="small"})=>{const{CONSTANTS:s}=mt(),{tags:o}=Mt(),a=e.offers.offers[0],i=F.getDiscountPercent(a.listPrice,a.price),c=o==null?void 0:o.flagDiscount;return n.jsxs(ve.Wrapper,{type:"header",style:{zIndex:s.Z_INDEX_WAR.product_card_header},children:[i>0&&!t&&(c==null?void 0:c.enableTag)&&n.jsxs(d.Tag,{title:`${i}% ${c==null?void 0:c.tagText}`,variant:"quaternary",size:"small",style:{background:c==null?void 0:c.tagColor,color:c==null?void 0:c.tagTextColor},children:[i,"% ",c==null?void 0:c.tagText]}),t?n.jsx(d.Tag,{title:t.value,adornment:{start:t.enableIcon&&t.icon?n.jsx(d.Icon,{name:t.icon,size:"small",style:{color:t.iconColor}}):null},size:r,variant:"quaternary",style:{background:t.tagColor,color:t.textColor},children:t.value}):null,s.PRODUCT_CARD_TOP_WISHLIST_TOGGLE&&n.jsx(ld.Toggle,{product:e,priceInfo:{price:a.price,listPrice:a.listPrice},variant:"card",ICONS:s.ICONS})]})};ud.displayName="ProductCard.Actions.Header";const dd=({className:e,children:t,hasPriority:r=!1,showVideo:s=!1,...o})=>{const{element:a,index:i,item:{image:c,slug:l,video:u},sendSelectItemEvent:m,order:f,CONSTANTS:p}=mt(),h=F.getFirstImages({images:c,label:{first:p.MAIN_IMAGE,second:p.SECOND_IMAGE}});return n.jsxs("div",{...o,className:d.helpers.classNameConcat(Ue["product-card--image"],e),ref:a,style:{aspectRatio:p.PRODUCT_CARD_IMAGE_ASPECT_RATIO},children:[n.jsx(et,{href:`/${l}/p`,onClick:m,onMouseUp:g=>{g.button===1&&m(),p.PLP_INFINITE_SCROLL&&sessionStorage.setItem(p.PLP_GRID_SCROLL_BACK.order,String(f))},children:n.jsx("div",{className:Ue["product-card--image--container"],children:Array.isArray(h)&&h.map(({url:g,alternateName:_},v)=>y.createElement(Oe.Image,{...p.PRODUCT_IMAGE_DIMENSIONS.product_card,style:p.PRODUCT_IMAGE_DIMENSIONS.product_card,alt:_??"product image",key:v,...r&&{priority:v===0&&i<4},objectFit:"cover",src:g}))})}),p.PLP_SHOW_VIDEO_ON_PRODUCT_CARD&&s&&u&&n.jsx(ve.Video,{url:u,poster:h[0].url}),t]})};dd.displayName="ProductCard.Media.Media";const fd=({className:e,callback:t,children:r,...s})=>{const{isMobile:o,item:a,CONSTANTS:{PRODUCT_CARD_TEXTS:i}}=mt(),{availability:{status:c}}=a;return c?null:n.jsxs("div",{...s,className:d.helpers.classNameConcat(Ue["product-card--outstock"],e),children:[n.jsx(d.Tag,{size:"small",variant:"secondary",title:i.disabled,children:i.disabled}),n.jsx(d.Button,{className:d.helpers.classNameConcat(e,"buy-button"),size:o?"medium":"large",variant:"quaternary",onClick:()=>{typeof t=="function"&&t(a)},children:i.notify})]})};fd.displayName="ProductCard.OutStock";const md=({children:e,className:t="",index:r,isMobile:s=!1,item:o,size:a,order:i,outStock:c,shelfTitle:l,CONSTANTS:u,...m})=>n.jsx(d_,{item:o,isMobile:s,outStock:c,order:i,size:a,index:r,shelfTitle:l,CONSTANTS:u,children:n.jsx("div",{...m,className:d.helpers.classNameConcat(Ue["product-card--wrapper"],t),"data-size":a,children:e})});md.displayName="ProductCard.Root";const pd=({disabled:e,label:t,size:r,value:s,onClick:o,...a})=>n.jsxs(d.ToggleSize.Wrapper,{...a,disabled:!1,outOfStock:e,size:r,onClick:o,children:[n.jsx(d.ToggleSize.DisabledAdornment,{}),n.jsx(d.ToggleSize.Text,{children:t})]});pd.displayName="ProductCard.SizeSelector.Item";const hd=({active:e=!1,callback:t,selectedSku:r=null,item:s,setNotify:o})=>{const{item:a,isMobile:i,setSelectedSku:c,eventDataRef:l}=mt();s.productId=a.id;const u=F.disableSKU(s),m=F.getSKUName(s,"tamanho");!u&&!l.current.availableSkus.includes(m)&&l.current.availableSkus.push(m);const f=y.useCallback(h=>{const g=r===h?null:h;typeof c=="function"&&c(g),typeof t=="function"&&t(g)},[t,c,r]),p=y.useCallback(()=>{if(u&&typeof o=="function"){o(a,s);return}f(s)},[s,o,f,u,a]);return n.jsx(pd,{active:e,disabled:u,label:m,onClick:()=>p(),size:i?"x-small":"small",value:s})};hd.displayName="ProductCard.SizeSelector.SkuItem";const gd=({items:e,getLabel:t,PLP_SIZE_ORDER:r})=>Array.isArray(e)?[...e].sort((s,o)=>{const a=t(s).toUpperCase(),i=t(o).toUpperCase(),c=r.indexOf(a)-r.indexOf(i);return c!==0?c:a.localeCompare(i,"pt-BR")}):[],_d=({callback:e,className:t="",children:r,setNotify:s,PLP_SIZE_ORDER:o,...a})=>{const{isMobile:i,item:{isVariantOf:{hasVariant:c}},selectedSku:l}=mt(),u=y.useMemo(()=>Array.isArray(c)?gd({items:c,getLabel:m=>F.getSKUName(m,"tamanho"),PLP_SIZE_ORDER:o}):[],[c]);return n.jsxs("div",{...a,className:d.helpers.classNameConcat(Ue["product-card--selectors--size"],t),"data-mobile":i,children:[n.jsx("div",{className:Ue["product-card--selectors--size--skus"],children:u.map((m,f)=>n.jsx(hd,{active:l===m,callback:e,item:m,selectedSku:l,setNotify:s},`size--${f}--${m.sku}`))}),n.jsx("div",{className:Ue["product-card--selectors--size--button"],children:r})]})};_d.displayName="ProductCard.SizeSelector";const zo=({alt:e="",callback:t,more:r,total:s=4,src:o,url:a,...i})=>n.jsxs(d.ToggleStyle.Wrapper,{...i,onClick:()=>{typeof t=="function"&&t(a)},children:[n.jsx(d.ToggleStyle.DisabledAdornment,{}),n.jsxs(d.ToggleStyle.Texture,{children:[o&&n.jsx(Oe.Image,{alt:e??o,src:o,height:34,width:34}),r&&n.jsx(d.TextStructure.DivWrapper,{className:Ue["product-card--selectors--style--more"],children:n.jsxs("p",{children:["+ ",s]})})]})]}),H_=({children:e,callback:t,data:r,total:s=4,size:o,...a})=>{const{index:i}=mt(),{triggerSelectItemEventRef:c}=le();return n.jsxs("div",{...a,children:[e,Array.isArray(r)&&r.slice(0,s).map((l,u)=>n.jsx(zo,{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(r)&&(r==null?void 0:r.length)>s&&n.jsx(zo,{size:o,total:r.length-s,more:!0})]})},yd=({callback:e,className:t,data:r,images:s=[],findTexture:o,...a})=>{const{CONSTANTS:i}=mt(),c=o||i.TEXTURE_IMAGE,l=s==null?void 0:s.find(u=>c.includes(u.alternateName));return n.jsx(H_,{...a,callback:e,className:d.helpers.classNameConcat(Ue["product-card--selectors--style"],t),data:r,size:"x-small",children:l&&n.jsx(zo,{active:!0,size:"x-small",src:l.url})})};yd.displayName="ProductCard.StyleSelector";const vd=({className:e,hasDecimal:t,...r})=>{const{isMobile:s,item:{offers:{lowPrice:o,highPrice:a},installments:{count:i,value:c}},eventDataRef:l}=mt();l.current.priceInfo={price:o,listPrice:a};const u=F.formatPriceToCurrency(a,t),m=F.formatPriceToCurrency(o,t),f=F.formatPriceToCurrency(c??0),p=s?"horizontal":"stacked";return n.jsx("div",{...r,className:d.helpers.classNameConcat(Ue["product-card--price"],e),"data-mobile":s,children:n.jsx(d.ProductInfo.Root,{size:"small",layout:p,children:n.jsxs(d.ProductInfo.Wrapper,{size:"small",layout:p,children:[n.jsx(d.ProductInfo.ValuesWrapper,{children:m!==u?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:u,size:"small"}),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:m,size:"small"})]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:m,size:"small"})}),i&&i>1&&c?n.jsx(d.ProductInfo.Price,{label:"installment",value:`${i}x ${f}`,size:"small"}):null]})})})};vd.displayName="ProductCard.Price";const xd=({tag:e,className:t})=>{const{item:{name:r}}=mt();return n.jsxs("div",{className:d.helpers.classNameConcat(Ue["product-card--title"],t),children:[n.jsx("div",{className:Ue["product-card--title--tag"],children:e?n.jsx(d.Tag,{size:"small",title:e.value,variant:"quaternary",adornment:{start:e.enableIcon&&e.icon?n.jsx(d.Icon,{name:e.icon,style:{color:e.iconColor}}):null},style:{background:e.tagColor,color:e.textColor},children:e.value}):n.jsx("div",{})}),n.jsx("div",{className:Ue["product-card--title--content"],children:r&&n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h3",{children:r})})})})]})};xd.displayName="ProductCard.Title";const bd=({className:e,url:t,poster:r,...s})=>{const{element:o}=mt();return y.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=>{F.setVideoPlay(f.isIntersecting,i,t)})},{root:null,rootMargin:"0px",threshold:.5}),l=()=>{i.setAttribute("data-loaded","true")},u=()=>{a&&(c.observe(a),i.addEventListener("loadeddata",l))};return document.readyState==="complete"?u():window.addEventListener("load",u),()=>{c.disconnect(),window.removeEventListener("load",u)}}return()=>null},[t,o]),n.jsx("div",{...s,className:d.helpers.classNameConcat(Ue["product-card--video"],e),children:t&&n.jsx(Oe.Video,{autoPlay:!1,muted:!0,loop:!0,preload:"none",playsInline:!0,poster:r})})};bd.displayName="ProductCard.Media.Video";const jd=({children:e,className:t,type:r,...s})=>n.jsx("div",{...s,className:d.helpers.classNameConcat(Ue[`product-card--${r}`],t),children:e});jd.displayName="ProductCard.Wrapper";const ve={Actions:Gu,BuyButton:Ku,Header:ud,Media:dd,Root:md,OutStock:fd,Price:vd,SizeSelector:_d,StyleSelector:yd,Title:xd,Video:bd,Wrapper:jd},$_="_carousel_1egdv_1",V_="_shelf__container_1egdv_14",W_="_shelf_without_carousel_1egdv_34",G_="_card_container_1egdv_57",Ar={carousel:$_,"custom-controllers":"_custom-controllers_1egdv_5",shelf__container:V_,"controllers-arrows-bullets":"_controllers-arrows-bullets_1egdv_23",shelf_without_carousel:W_,card_container:G_},Wi=({title:e})=>n.jsx("div",{className:Ar.shelf__container,children:e&&n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h2",{className:d.helpers.classNameConcat("typography-style-body-md",F.responsive["responsive-mobile-flex"]),children:e}),n.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-md",F.responsive["responsive-desktop-flex"]),children:e})]})})}),K_=({children:e,ICONS:t,itemsPerPage:r,title:s})=>{const{isMobile:o}=oe(),a=r[o?"mobile":"desktop"],{initialize:i,controller:c,itemsStyles:l,pagination:u}=d.Carousel.useCarousel({itemsPerPage:a,gap:10,loop:!0,direction:"row"}),m=y.Children.toArray(e).length;return o||m>=4?n.jsxs(d.Carousel.Root,{innerRef:p=>{i(p)},className:Ar.carousel,children:[n.jsxs("div",{className:Ar["custom-controllers"],children:[s&&n.jsx(Wi,{title:s}),a<m&&n.jsxs(d.Carousel.Controller,{className:Ar["controllers-arrows-bullets"],children:[n.jsxs(d.Carousel.Arrows,{children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:n.jsx(d.Icon,{name:t.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:n.jsx(d.Icon,{name:t.arrow_right})}})]}),!o&&a>2&&n.jsx(d.Carousel.Bullets,{page:u.currentPage,total:u.totalPages,onBulletClick:p=>c==null?void 0:c.navigateTo(p)})]})]}),n.jsx(d.Carousel.Body,{children:y.Children.map(e,(p,h)=>n.jsx(d.Carousel.Item,{style:{...l,overflow:"hidden"},children:p},`${s}_${h}`))})]}):n.jsxs(n.Fragment,{children:[s&&n.jsx(Wi,{title:s}),n.jsx("div",{className:Ar.shelf_without_carousel,children:e})]})},Cd=({className:e,item:t,isMobile:r,size:s,shelfTitle:o,...a})=>{const i=y.useRef(null),{getAvailableProductTag:c}=Mt(),{availability:{status:l}}=t,u=f=>{const p=f.filter(h=>!a.CONSTANTS.TEXTURE_IMAGE.includes(h.keywords));return r?p.splice(0,2):p},m=c(t.cluster.highlights);return n.jsx("div",{ref:i,className:Ar.card_container,children:n.jsxs(ve.Root,{...a,item:{...t,image:u(t.image)},isMobile:r,size:r?"small":"medium",outStock:!l,shelfTitle:o,children:[n.jsx(ve.Header,{product:t,tag:m==null?void 0:m.commercial}),n.jsx(ve.Media,{}),n.jsxs(ve.Wrapper,{type:"body",children:[n.jsx(ve.Title,{tag:m==null?void 0:m.institucional}),n.jsx(ve.Actions,{})]}),n.jsx(ve.Wrapper,{type:"footer"})]})})};Cd.displayName="ProductList.Card";const mn={Shelf:K_,Card:Cd},Sd=({CONSTANTS:e,inView:t,products:r,innerRef:s})=>{const o=y.useMemo(()=>l_(r),[r]),{isMobile:a}=oe(),{addItemsToCart:i}=Pe(),{sendDataLayerEvent:c}=le(),{getAvailableProductTag:l}=Mt(),[u,m]=y.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(g=>{const _=o.find(v=>v.node.id===g.productId);return _==null?void 0:_.node})},supportData:{selectedSkus:h,price:u.totalPrice}}})},p=({selectedProduct:h,productId:g})=>{const _=u_({selectedProduct:h,productId:g,prevState:u,mainSellerId:e.StoreConfig_MainSellerId});m(_)};return y.useEffect(()=>{if(!t||o.length===0)return;const h=e.BUY_PACKAGE.header.title;c({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o},customData:{item_list_name:h},outsideEcommerceData:{item_list_name:h}}})},[t]),n.jsxs("div",{className:Ut.container,ref:s,children:[n.jsx("div",{className:Ut["carousel-container"],style:{width:o.length<=3?"max-content":"75%"},children:n.jsx(mn.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},g)=>{var x,C,j;const _=l(h.cluster.highlights),{availability:{status:v}}=h;return v?n.jsxs(ve.Root,{item:{...h,image:Ia.helpers.product.getFirstImages({images:h.image,label:{first:e.MAIN_IMAGE,second:e.SECOND_IMAGE}})},isMobile:a,size:"medium",index:g,shelfTitle:e.BUY_PACKAGE.header.title,CONSTANTS:e,children:[n.jsx(ve.Header,{product:h,tag:_.commercial}),n.jsx(ve.Media,{}),n.jsxs(ve.Wrapper,{type:"body",children:[n.jsx(ve.Title,{tag:{value:(x=_.institucional)==null?void 0:x.value,enableIcon:(C=_.institucional)==null?void 0:C.enableIcon,icon:(j=_.institucional)==null?void 0:j.icon}}),n.jsx(ve.Actions,{children:n.jsx(ve.SizeSelector,{callback:b=>p({selectedProduct:b,productId:h.id}),PLP_SIZE_ORDER:e.PLP_SIZE_ORDER})})]})]},h.id):null})})}),n.jsx("div",{className:Ut["add-cart-container"],children:n.jsx(c_,{handleAddAllToCart:f,selectedProducts:u,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,BUY_PACKAGE:e.BUY_PACKAGE,FREIGHT_CALCULATION:e.FREIGHT_CALCULATION}})})]})},Fa={"btn-login":"_btn-login_yas63_12","btn-header":"_btn-header_yas63_22","header-animation":"_header-animation_yas63_35"},za=({id:e})=>{const{setIsOpen:t,cartStore:{items:r}}=Pe(),{handleSelectContent:s}=le(),{CONSTANTS:o}=Ee(),a=r.reduce((i,c)=>i+(c.quantity??0),0);return n.jsx(d.Header.SupportItem,{onClick:()=>{t(!0),s({content:"header:minicart"})},id:e,children:n.jsxs(d.Badge.AutoPositioner,{children:[n.jsx(d.Badge.Count,{count:a,size:"medium",variant:"primary",style:{backgroundColor:"black",display:a>0?"flex":"none"}}),n.jsx(d.Icon,{name:o.header.ICONS.bag,size:"medium"})]})})};za.displayName="Header.Bag";const Nn=({children:e,href:t,...r})=>t&&t!=="#"?n.jsx(et,{href:t.startsWith("/")?t:`/${t}`,...r,children:e}):e,wd=()=>{const{headerData:e}=Ee(),{handleSelectContent:t}=le(),{reset:r,updateValue:s}=jn(),o=a=>{a?s(a):r()};return n.jsx(d.Header.Categories,{children:Array.isArray(e.categories)&&e.categories.map((a,i)=>n.jsx(Nn,{href:a.link,onMouseEnter:()=>o(a.submenuId),onFocus:()=>o(a.submenuId),children:n.jsx(d.Header.CategoryItem,{className:Fa["btn-header"],value:a.submenuId??null,adornment:{start:n.jsx(d.Icon,{name:a.iconStart}),end:n.jsx(d.Icon,{name:a.iconEnd})},style:{textWrap:"nowrap",gap:"0"},onClick:()=>{t({content:`header:${a.label}`})},children:a.label})},`category-${a.label}-${i}`))})};wd.displayName="Header.Categories";function Q_(){const{handleSelectContent:e}=le(),{CONSTANTS:t}=Ee(),{setValue:r}=ps();return n.jsx(d.Header.SupportItem,{onClick:()=>{r(!0),e({content:"header:search"})},children:n.jsx(d.Icon,{name:t.header.ICONS.search,size:"medium"})})}const X_={"menu-subcategories-container":"_menu-subcategories-container_a93cr_1"},Y_={"observer-wrapper":"_observer-wrapper_r43gk_1"},vs=({children:e,eventData:t,observerOptions:r,callBackWhenVisible:s,stopOnIntersection:o=!0,className:a,...i})=>{const c=y.useRef(null),l=da(c,o,r),{sendDataLayerEvent:u}=le();return y.useEffect(()=>{l&&(typeof s=="function"&&s(),t&&u({...t}))},[l]),n.jsx("div",{...i,ref:c,className:d.helpers.classNameConcat(Y_["observer-wrapper"],a),children:e})},Pd=({thumbnails:e,category:t,isMobile:r=!0,callBack:s})=>{const{handleSelectPromotionEvent:o}=le(),a=50/e.length;return n.jsx("div",{className:X_["menu-subcategories-container"],children:e.map((i,c)=>{const l=r?i.srcMobile:i.srcDesk;if(!l)return null;const u={creative_name:"banner-menu",creative_slot:`banner-menu:${t}:${c+1}`,promotion_id:l,promotion_name:i.promotion_name};return n.jsx(vs,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...u}}}},observerOptions:{delay:1e3},children:n.jsxs(et,{href:i.link??"#",onClick:()=>{typeof s=="function"&&s(),o({updatePromotionRef:!0,promotion:u})},children:[n.jsx(Oe.Image,{src:l,alt:i.label??l,width:500,height:500,sizes:`(max-width: 768px) 100vw, (max-width: 1023px) 75vw, ${a}vw`}),i.label&&n.jsx("p",{children:i.label})]})},`thumb-${i.label}-${c}`)})})};Pd.displayName="Menu.Thumbnail";const Bo={"menu-desktop":"_menu-desktop_1b799_1","menu-categories":"_menu-categories_1b799_12"},Ed=({children:e,dividerOnRight:t=!0,subMenu:r,...s})=>{var l;const{router:o}=pe(),{reset:a}=jn(),{handleSelectContent:i}=le(),{CONSTANTS:c}=Ee();return n.jsxs("div",{...s,className:Bo["menu-categories"],children:[(l=r==null?void 0:r.subCategories)==null?void 0:l.map((u,m)=>{var h,g,_,v;const f=u.listCollapseDesk&&!((h=u.see_all)!=null&&h.link)?{expandAfterRowsQty:u.rowsToShowDesk}:{},p=u.listCollapseDesk&&!((g=u.see_all)!=null&&g.link)?{expansivesAdornments:{open:c.header.ICONS.add,close:c.header.ICONS.minus},expansivesLabels:{open:c.header.COMPONENT_LIST.listExpandLabel,close:c.header.COMPONENT_LIST.listCollapseLabel},iconSize:"x-small"}:{adornment:{end:n.jsx(d.Icon,{name:c.header.ICONS.arrow_right,size:"small"})}};return n.jsxs(d.ComponentList.Structure,{children:[n.jsx(Nn,{href:u.linkLabel,title:u.label,onClick:()=>{u.linkLabel&&(a(),i({content:`menu:${u.label??""}:${r.label??""}`}))},children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h2",{children:u.label})})})}),n.jsx(d.ComponentList.List,{columns:1,...f,className:Bo["submenu-categories"],children:(_=u.items)==null?void 0:_.map((x,C)=>n.jsx(d.ComponentList.ListItem,{id:`list-item-${x.label}-${C}`,children:n.jsx(Qe,{href:x.link??"#",size:"x-small",title:x.label??"",disableUnderline:!0,disablePadding:!0,onClick:()=>{a(),i({content:`menu:${u.label??""}:${x.label??""}:${r.label??""}`})},children:x.label})},`list-item-${x.label}-${C}`))}),((v=u.see_all)==null?void 0:v.link)&&n.jsx(d.ComponentList.Support,{...p,size:"small",onClick:()=>{var x;(x=u.see_all)!=null&&x.link&&(a(),i({content:`menu:${u.label??""}:${r.label}`}),o.push(u.see_all.link))},children:u.see_all.link&&u.see_all.label})]},`list-${u.label}-${m}`)}),t&&n.jsx(d.Utils.Divider,{size:"small",direction:"vertical"})]})};Ed.displayName="Menu.Categories";const Nd=({children:e,dividerOnBottom:t=!0,...r})=>{const{CONSTANTS:s}=Ee();return n.jsxs(n.Fragment,{children:[n.jsx("div",{...r,className:Bo["menu-desktop"],style:{...r.style,justifyContent:s.header.ALIGNMENT_MENU},children:e}),t&&n.jsx(d.Utils.Divider,{size:"small"})]})};Nd.displayName="Menu.MenuRoot";const Ks={Root:Nd,Categories:Ed,Thumbnail:Pd},Id=()=>{const{headerData:e,CONSTANTS:t}=Ee(),r=bl(),{reset:s}=jn();return n.jsx(d.Header.SubMenu,{className:"header-desktop-submenu",children:Array.isArray(e.subMenus)&&e.subMenus.map((o,a)=>{const{thumbnails:i,label:c,id:l}=o,u=l===r,m=i==null?void 0:i.some(f=>!!f.srcDesk);return n.jsxs(Ks.Root,{id:l,style:u?{display:"flex",zIndex:t.header.Z_INDEX_WAR.menu_desktop}:{display:"none"},dividerOnBottom:u,children:[n.jsx(Ks.Categories,{dividerOnRight:!!m,subMenu:o}),Array.isArray(i)&&n.jsx(Ks.Thumbnail,{thumbnails:i,isMobile:!1,category:c,callBack:s})]},`submenu-${l}-${a}`)})})};Id.displayName="Header.SubMenu";const Rd=()=>{const{handleSelectContent:e}=le(),{CONSTANTS:t}=Ee();return n.jsx(et,{href:"/favoritos",children:n.jsx(d.Header.SupportItem,{onClick:()=>e({content:"header:wishlist"}),children:n.jsx(d.Icon,{name:t.header.ICONS.favorite_false,size:"medium"})})})};Rd.displayName="Header.WishList";const J_="_root_im5yf_125",ut={"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:J_},Td=({className:e,children:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat(ut["user-menu--content"],e),children:t});Td.displayName="UserMenu.Content";var Ad=(e=>(e.Account="account",e))(Ad||{});const kd=({className:e,cashBack:t,credits:r,link:s,total:o,...a})=>{const i=t?F.formatPriceToCurrency(t):void 0,c=r?F.formatPriceToCurrency(r):void 0,l=o?F.formatPriceToCurrency(o):void 0;return n.jsx(d.Credits.Account,{...a,className:d.helpers.classNameConcat(ut["user-menu--credits"],e),icon:"wallet",showIcon:!0,cashBackValue:i,creditsValue:c,linkMore:s,totalValue:l,type:Ad.Account})};kd.displayName="UserMenu.Credits";const Od=({className:e,children:t,description:r,text:s,...o})=>{const{isMobile:a}=oe();return n.jsx("div",{...o,className:d.helpers.classNameConcat(ut["user-menu--login"],e),"data-mobile":a,children:n.jsxs("div",{className:ut["user-menu--login--content"],children:[n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:[n.jsx("h3",{className:"typography-style-body-lg-strong",children:s}),n.jsx("p",{children:r})]})}),t]})})};Od.displayName="UserMenu.Login";const Ld=({className:e,isLogged:t,onLogoutClick:r,ICONS:s,storeConfig:o,isMobile:a})=>{const i=a?pi:pi({ICONS:s,storeConfig:o}).filter(c=>c.deviceShown==="both"||c.deviceShown===(a?"mobile":"desktop"));return n.jsxs("ul",{className:d.helpers.classNameConcat(ut["user-menu--menu"],e),children:[Array.isArray(i)&&i.map((c,l)=>n.jsx("li",{children:n.jsx(Qe,{href:c.href??"#",size:"small",disableUnderline:!0,adornments:{start:n.jsx(d.Icon,{name:c.icon??"delete"})},children:c.label})},l)),t?n.jsx("li",{children:n.jsx(Qe,{href:`${o.secureSubdomain}/api/vtexid/pub/logout?scope=mariafilo&returnUrl=${encodeURIComponent(`${o.storeUrl}`)}`,size:"small",disableUnderline:!0,onClick:r,adornments:{start:n.jsx(d.Icon,{name:Cg(s)})},children:jg})}):n.jsx(n.Fragment,{})]})};Ld.displayName="UserMenu.Menu";const Md=e=>{const t=y.useRef(null),r=y.useCallback(a=>{t.current&&!t.current.contains(a.target)&&e()},[e]),s=y.useCallback(a=>{t.current&&!t.current.contains(a.target)&&e()},[e]),o=y.useCallback(a=>{a.key==="Escape"&&e()},[e]);return y.useEffect(()=>(document.addEventListener("mousedown",r),document.addEventListener("keydown",o),document.addEventListener("touchstart",s),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("keydown",o),document.removeEventListener("touchstart",s)}),[r,o,s]),{ref:t}},Z_=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},ey=(e,t,r)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const{height:s,left:o,top:a,width:i}=t.getBoundingClientRect(),c=e.getBoundingClientRect(),l=e!=null&&e.parentElement?Z_(e==null?void 0:e.parentElement):0;return{left:o+i/2-(c.width+l*2),top:a+s+r}},Dd=y.createContext({}),ty=({children:e,delay:t=600,gap:r=20,isOpen:s,setIsOpen:o,target:a,...i})=>{const c=y.useRef(null),[l,u]=y.useState(!1),[m,f]=y.useState({left:0,top:0}),{ref:p}=Md(()=>{u(!0),typeof window<"u"&&(c.current=window.setTimeout(()=>{o(!1),u(!1)},t))});return y.useEffect(()=>{if(a&&(p!=null&&p.current)){const{left:h,top:g}=ey(p.current,a,r??0);f({left:h,top:g}),u(!1)}},[r,s,a,p]),n.jsx(Dd.Provider,{value:y.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})},Fd=()=>{const e=y.useContext(Dd);if(e===void 0)throw new Error("useUserMenuContext must be used within a UserMenuProvider");return e},zd=({children:e,isMobile:t=!1,Z_INDEX_WAR:r})=>{const{isOpen:s,setIsOpen:o}=Fd();return n.jsxs(d.Modal.Root,{"data-user":"user-menu--modal",isMobile:t??!1,isOpen:s,setIsOpen:o,variant:"sideBottom",className:ut["modal-root-modifier"],style:{zIndex:r.user_menu_mobile},children:[n.jsx(d.Modal.Header,{navigation:"top",className:ut["modal-header-modifier"],children:n.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0,className:ut["modal-controls-modifier"]})}),n.jsx(d.Modal.Body,{children:e})]})};zd.displayName="UserMenu.Modal";const Bd=({children:e,component:t,Z_INDEX_WAR:r,isMobile:s,...o})=>n.jsx(ty,{...o,className:ut.root,children:s?n.jsxs(n.Fragment,{children:[n.jsx(Bt.Modal,{Z_INDEX_WAR:r,children:t}),e]}):n.jsx(Bt.Tooltip,{component:t,style:{width:304,zIndex:r.user_menu},Z_INDEX_WAR:r,children:e})});Bd.displayName="UserMenu.Root";const Ud=({children:e,component:t,Z_INDEX_WAR:r,...s})=>{const{contentRef:o,left:a,isLeaving:i,isOpen:c,top:l}=Fd();return n.jsx(d.Tooltip.Root,{arrow:"top-right",component:n.jsx("div",{...s,ref:o,children:t}),className:d.helpers.classNameConcat(ut["user-menu--tooltip"],ut["tooltip-modifier"]),isLeaving:i,isOpen:c,left:a,size:"medium",position:"top",top:l,style:{zIndex:r.user_menu},children:n.jsx("div",{className:ut["user-menu--tooltip"],children:e})})};Ud.displayName="UserMenu.Tooltip";const Bt={Credits:kd,Content:Td,Login:Od,Menu:Ld,Modal:zd,Root:Bd,Tooltip:Ud},xs=({children:e,isOpen:t,setIsOpen:r,desktopUserMenuTarget:s,mobileUserMenuTarget:o,storeConfig:a})=>{var h,g,_;const{isMobile:i}=oe(),{CONSTANTS:c}=Ee(),l=Yr(),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}=y.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 n.jsx(Bt.Root,{component:n.jsxs(Bt.Content,{children:[n.jsx(Bt.Login,{description:wg(m),text:Sg(m,((g=l==null?void 0:l.user)==null?void 0:g.firstName)??((_=l==null?void 0:l.user)==null?void 0:_.email)),children:!m&&n.jsx(d.Button,{id:"conta",size:"medium",variant:"quaternary",onClick:()=>u(),children:c.header.MENU_INFO.login.button_text})}),p+f&&m?n.jsx(Bt.Credits,{credits:p,cashBack:f,link:`${a.secureSubdomain}/account#/meus-creditos`,total:p+f}):n.jsx(n.Fragment,{}),n.jsx(d.Utils.Divider,{}),n.jsx(Bt.Menu,{ICONS:c.header.ICONS,storeConfig:a,isLogged:m,className:F.responsive["responsive-desktop-flex"],onLogoutClick:()=>l.logout()}),n.jsx(Bt.Menu,{ICONS:c.header.ICONS,storeConfig:a,isMobile:!0,isLogged:m,className:F.responsive["responsive-mobile-flex"],onLogoutClick:()=>l.logout()})]}),isOpen:t,isMobile:i,setIsOpen:r,target:i?o:s,Z_INDEX_WAR:c.header.Z_INDEX_WAR,children:e})};xs.displayName="UserMenu";const qd=({storeConfig:e})=>{const{CONSTANTS:t}=Ee(),{handleSelectContent:r}=le(),{reset:s}=jn(),{setValue:o}=ga(),a=ha(),i=y.useRef(null);return n.jsxs(n.Fragment,{children:[n.jsxs(d.Header.Wrapper,{className:"header-desktop-wrapper",children:[n.jsx(d.Header.Logo,{style:{width:"100%"},children:n.jsx(et,{href:"/",onMouseEnter:s,children:n.jsx(d.Icon,{name:t.header.ICONS.logo,onClick:()=>{r({content:"header:logo"})}})})}),n.jsx(wd,{}),n.jsxs(d.Header.Support,{onMouseEnter:s,style:{justifyContent:"flex-end"},children:[n.jsx(Q_,{}),n.jsx(xs,{isOpen:a,setIsOpen:o,desktopUserMenuTarget:i.current,storeConfig:e,children:n.jsx(d.Header.SupportItem,{onClick:()=>{o(!0),r({content:"header:user_menu"})},className:Fa["btn-login"],innerRef:i,children:n.jsx(d.Icon,{name:t.header.ICONS.person,size:"medium"})})}),n.jsx(Rd,{}),n.jsx(za,{id:"cart-button"})]})]}),n.jsx(Id,{})]})};qd.displayName="Header.HeaderDesktopWrapper";const tt={"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"},Hd=({children:e,mobileBannerAlt:t,mobileBannerSrc:r,textColor:s,submenuId:o,label:a,...i})=>n.jsx("button",{...i,className:tt["menu--banners--item"],children:r?n.jsxs(d.Banner.Container,{children:[n.jsx(d.Banner.ImageWrapper,{children:n.jsx(Oe.Image,{alt:t??r,height:128,src:r,width:343,unoptimized:!0})}),n.jsx(d.Banner.Slot,{verticalAlignment:"end",horizontalAlignment:"center",children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:tt["menu--banners--item--text"],children:n.jsx("h2",{className:"typography-style-body-xs",style:s?{color:s}:{},children:e})})})})]}):n.jsx("h2",{...i,children:e})});Hd.displayName="Menu.Mobile.Category";const $d=({label:e,...t})=>{const{CONSTANTS:r}=Ee();return n.jsx(d.Button,{...t,adornment:{end:n.jsx(d.Icon,{name:r.header.ICONS.arrow_right,size:"medium"})},mode:"inverse",size:"medium",variant:"primary",children:e})};$d.displayName="Menu.Mobile.Body.Category";const Vd=({subCategory:e,submenuLabel:t,onHandleOut:r,...s})=>n.jsx("div",{...s,className:tt["menu--sub-category--list"],children:Array.isArray(e==null?void 0:e.items)&&(e==null?void 0:e.items.map((o,a)=>n.jsx(Qe,{disableUnderline:!0,disablePadding:!1,href:o.link??"#",onClick:()=>r(o.label,t),size:"medium",title:o.label??"",children:o.label},a)))});Vd.displayName="Menu.Mobile.List";const Wd=({current:e,onHandleOut:t})=>{var r;return e?n.jsx("div",{className:tt["menu--sub-category"],children:Array.isArray(e==null?void 0:e.subCategories)&&((r=e==null?void 0:e.subCategories)==null?void 0:r.map((s,o)=>n.jsxs("div",{className:tt["menu--sub-category--item"],children:[n.jsx(cn.Title,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id}),n.jsx(cn.List,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id})]},o)))}):n.jsx(n.Fragment,{})};Wd.displayName="Menu.Mobile.Body.SubCategory";const Gd=({subCategory:e,submenuLabel:t,onHandleOut:r,...s})=>{var c;const{router:o}=pe(),{handleSelectContent:a}=le(),{CONSTANTS:i}=Ee();return n.jsxs("div",{...s,className:tt["menu--categories--title"],children:[n.jsx(Nn,{href:e==null?void 0:e.linkLabel,title:e==null?void 0:e.linkLabel,onClick:()=>{a({content:`menu:${e.label??""}:${t}`})},children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h2",{className:"typography-style-body-md",children:e==null?void 0:e.label})})})}),((c=e==null?void 0:e.see_all)==null?void 0:c.link)&&n.jsx(d.ComponentList.Support,{adornment:{end:n.jsx(d.Icon,{name:i.header.ICONS.arrow_right,size:"small"})},size:"small",onClick:()=>{var l;r(e.label,t),(l=e==null?void 0:e.see_all)!=null&&l.link&&o.push(e.see_all.link)},children:e.see_all.label})]})};Gd.displayName="Menu.Mobile";const cn={Banner:Hd,Category:$d,List:Vd,SubCategory:Wd,Title:Gd},Kd=y.createContext({}),ry=({children:e})=>{const[t,r]=y.useState(null),s=y.useCallback(()=>{r(null)},[]),o=a=>{a!==t&&r(a)};return n.jsx(Kd.Provider,{value:{currentCategory:t,setCurrentCategory:r,handleCloseMenu:s,handleChangeSubMenuOpened:o},children:e})},Qd=()=>y.useContext(Kd),Xd=e=>{const{router:t}=pe(),{headerData:r}=Ee(),{handleSelectContent:s}=le(),{currentCategory:o,setCurrentCategory:a}=Qd(),i=y.useRef(null),c=()=>{if(i.current){const h=i.current;h&&(a(null),h==null||h.click())}},l=(h,g)=>{s({content:`menu:${h}`}),t.push(g),c()},u=(h,g)=>{s({content:`menu:${h}:${g}`}),c()},m=Array.isArray(r==null?void 0:r.categories)?r==null?void 0:r.categories:[],f=Array.isArray(r==null?void 0:r.subMenus)?r==null?void 0:r.subMenus:[],p=h=>{h.submenuId?a(h.submenuId):l(h.label,h.link)};return n.jsxs("div",{...e,className:tt["menu--body"],style:{transform:`translate3d(calc(-100% * ${o?1:0}), 0px, 0px)`},children:[n.jsx("button",{className:tt["menu--dummy-close"],ref:i,"data-close":!0}),n.jsxs("div",{className:tt["menu--step"],"data-active":"true",children:[n.jsx("div",{className:tt["menu--banners"],children:n.jsx("div",{className:tt["menu--banners--list"],children:m.map((h,g)=>y.createElement(cn.Banner,{...h,key:g,onClick:()=>l(h.label,h.link)},h.mobileBannerAlt))})}),n.jsx("div",{className:tt["menu--categories"],children:m.map((h,g)=>n.jsx(cn.Category,{label:h.label,onClick:()=>p(h)},g))})]}),n.jsx("div",{className:tt["menu--step"],"data-active":!!o,children:n.jsx(cn.SubCategory,{current:f.find(h=>h.id===o),onHandleOut:u})})]})};Xd.displayName="Menu.Mobile.Body";const ny={"menu--header":"_menu--header_1ozdf_1"},Yd=()=>{var o;const{headerData:e}=Ee(),{currentCategory:t,setCurrentCategory:r}=Qd(),s=(o=e==null?void 0:e.categories)==null?void 0:o.find(a=>a.submenuId===t);return n.jsxs("div",{className:ny["menu--header"],children:[n.jsx(d.Button,{"data-out":!s,iconNameStart:"arrow-left",mode:"inverse",onClick:()=>r(null)}),s&&n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{alignContent:"center",children:n.jsx("h2",{className:"typography-style-body-lg",children:s==null?void 0:s.label})})}),n.jsx(d.Button,{iconNameStart:"close","data-close":!0,"data-only":!s,mode:"inverse",onClick:()=>r(null)})]})};Yd.displayName="Menu.Mobile.Header";var Uo={exports:{}};function sy(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 Qs={},Xs={},Gi;function oy(){return Gi||(Gi=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"LoadableContext",{enumerable:!0,get:function(){return s}});const s=Ke._(y).default.createContext(null);process.env.NODE_ENV!=="production"&&(s.displayName="LoadableContext")}(Xs)),Xs}var Ki;function ay(){return Ki||(Ki=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return h}});const r=Ke._(y),s=oy();function o(g){return g&&g.default?g.default:g}const a=[],i=[];let c=!1;function l(g){let _=g(),v={loading:!0,loaded:null,error:null};return v.promise=_.then(x=>(v.loading=!1,v.loaded=x,x)).catch(x=>{throw v.loading=!1,v.error=x,x}),v}function u(g,_){let v=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},_),x=null;function C(){if(!x){const w=new m(g,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 sy.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=r.default.useContext(s.LoadableContext);w&&Array.isArray(v.modules)&&v.modules.forEach(S=>{w(S)})}function b(w,S){j();const P=r.default.useSyncExternalStore(x.subscribe,x.getCurrentValue,x.getCurrentValue);return r.default.useImperativeHandle(S,()=>({retry:x.retry}),[]),r.default.useMemo(()=>P.loading||P.error?r.default.createElement(v.loading,{isLoading:P.loading,pastDelay:P.pastDelay,timedOut:P.timedOut,error:P.error,retry:x.retry}):P.loaded?r.default.createElement(o(P.loaded),w):null,[w,P])}return b.preload=()=>C(),b.displayName="LoadableComponent",r.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:_,_opts:v}=this;_.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(_){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,..._},this._callbacks.forEach(v=>v())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(_){return this._callbacks.add(_),()=>{this._callbacks.delete(_)}}constructor(_,v){this._loadFn=_,this._opts=v,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function f(g){return u(l,g)}function p(g,_){let v=[];for(;g.length;){let x=g.pop();v.push(x(_))}return Promise.all(v).then(()=>{if(g.length)return p(g,_)})}f.preloadAll=()=>new Promise((g,_)=>{p(a).then(g,_)}),f.preloadReady=g=>(g===void 0&&(g=[]),new Promise(_=>{const v=()=>(c=!0,_());p(i,g).then(v,v)})),typeof window<"u"&&(window.__NEXT_PRELOADREADY=f.preloadReady);const h=f}(Qs)),Qs}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(m,f){for(var p in f)Object.defineProperty(m,p,{enumerable:!0,get:f[p]})}r(t,{default:function(){return u},noSSR:function(){return l}});const s=Ke,o=n,a=s._(ay()),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: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,...f};const g=h.loader,_=()=>g!=null?g().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:_})}(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)})(Uo,Uo.exports);var iy=Uo.exports,cy=iy;const Jd=F.getDefaultExportFromCjs(cy),cs={"modal-modifier":"_modal-modifier_10zw4_1","menu--navigation-bar":"_menu--navigation-bar_10zw4_15","menu--root":"_menu--root_10zw4_26"},Zd=({children:e})=>{const{menuIsOpen:t,setMenuIsOpen:r}=xa(),{CONSTANTS:s}=Ee();return n.jsxs(d.Modal.RootWithoutPortal,{className:d.helpers.classNameConcat(cs["modal-modifier"],"menu-mobile-root"),isOpen:t,setIsOpen:r,variant:"sideRight",style:{bottom:"unset",overflowY:"hidden",position:"fixed",top:0,zIndex:s.header.Z_INDEX_WAR.menu_mobile},children:[n.jsx(Yd,{}),n.jsx(d.Modal.Body,{className:cs["menu--root"],children:e})]})};Zd.displayName="Menu.MenuRoot";const ly=Jd(()=>Promise.resolve(Zd),{ssr:!1}),ef=({children:e,last:t=!1,...r})=>n.jsxs(n.Fragment,{children:[n.jsx(d.Button,{...r,"data-close":!0,size:"small",variant:"tertiary",children:e}),!t&&n.jsx(d.Utils.Divider,{direction:"vertical",size:"small",className:cs.divider})]});ef.displayName="Menu.NavigationBarItem";const tf=()=>{const{setUserMenuIsOpen:e}=xa(),{handleSelectContent:t}=le(),{CONSTANTS:r}=Ee(),{router:s}=pe(),o=[{iconNameStart:r.header.ICONS.person,onClick:()=>{e(!0),t({content:"menu:user_menu"})},text:r.header.MENU_INFO.login.button_text},{iconNameStart:r.header.MENU_INFO.bag.button_icon,onClick:()=>{t({content:"menu:wishlist"}),s.push("/favoritos")},text:r.header.MENU_INFO.bag.button_text},{last:!0,iconNameStart:r.header.MENU_INFO.store.button_icon,onClick:()=>{t({content:"menu:store"}),s.push("/institucional/lojas")},text:r.header.MENU_INFO.store.button_text}];return n.jsx(d.Card,{id:"menu-navigationbar",shadow:!0,className:cs["menu--navigation-bar"],style:{zIndex:r.header.Z_INDEX_WAR.menu_mobile_navigation_bar},children:Array.isArray(o)&&o.map((a,i)=>y.createElement(ef,{...a,key:i},a.text))})};tf.displayName="Menu.NavigationBar";const Ys={Body:Xd,NavigationBar:tf,Root:ly},rf=({storeConfig:e})=>{const t=y.useRef(null),{CONSTANTS:r}=Ee(),{MENU_NAVIGATION_BAR_ALLOWED:s,ICONS:o}=r.header,{handleSelectContent:a}=le(),{setValue:i}=ps(),{setValue:c}=Sl(),{setValue:l}=ga(),u=ha(),m=Cl(),{isMobile:f}=oe();return n.jsxs(n.Fragment,{children:[n.jsxs(d.Header.Wrapper,{className:"header-mobile-wrapper",children:[n.jsx(d.Header.Logo,{style:{width:"100%"},children:n.jsx(et,{href:"/",children:n.jsx(d.Icon,{name:o.logo,size:"x-large",onClick:()=>{a({content:"header:logo"})}})})}),n.jsxs(d.Header.Support,{children:[n.jsx(d.Header.SupportItem,{onClick:()=>{i(!0),a({content:"header:search"})},children:n.jsx(d.Icon,{name:o.search,size:"medium"})}),n.jsx(za,{}),n.jsxs(d.Header.SupportItem,{onClick:()=>c(!0),children:[n.jsx("span",{ref:t}),n.jsx(d.Icon,{name:o.menu,size:"medium"})]})]})]}),f&&n.jsx(zl,{menuIsOpen:m,setMenuIsOpen:c,userMenuIsOpen:m,setUserMenuIsOpen:l,children:n.jsx(xs,{storeConfig:e,isOpen:u,setIsOpen:l,mobileUserMenuTarget:t==null?void 0:t.current,children:n.jsxs(Ys.Root,{children:[n.jsx(Ys.Body,{}),s?n.jsx(Ys.NavigationBar,{}):n.jsx(n.Fragment,{})]})})})]})};rf.displayName="Header.HeaderMobileWrapper";const uy=y.createContext({}),dy=({children:e})=>{const{sendDataLayerEvent:t}=le(),{cartStore:r,isOpen:s}=Pe();y.useEffect(()=>{s&&t({functionKey:"viewCartEvent",data:{commonData:{cartStore:r}}})},[s]),y.useEffect(()=>{var a,i,c;if(r.id&&!((i=(a=r.marketingData)==null?void 0:a.marketingTags)!=null&&i.includes("faststore"))){const{id:l}=r;_r.post("/api/checkout/order-form/attachments/marketing-data",{orderFormId:l,marketingData:{...r==null?void 0:r.marketingData,marketingTags:dl(((c=r.marketingData)==null?void 0:c.marketingTags)??[])}}).catch(u=>{console.error(u)})}},[r]);const o=({cartItem:a,oldQuantity:i,newQuantity:c})=>{t({functionKey:"skuEvents",data:{event:i>c?"remove_from_cart":"add_to_cart",commonData:{products:[{...a,price:a.price/100,listPrice:a.listPrice/100}]},customData:{quantity:c},supportData:{selectedSkus:[a]}}})};return n.jsx(uy.Provider,{value:{handleUpdateItemQuantityEvent:o},children:e})},fy="var(--color-background-brand-primary-lighter)",my="_fadeInOut_1l5ow_1",py="_fadeOut_1l5ow_1",ie={brandPrimaryLighter:fy,"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:my,fadeOut:py,"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"},nf=({item:{id:e,message:t,callback:r},removeNotification:s,ICONS:o})=>{const a=y.useRef(null),i=()=>{var l;(l=a.current)==null||l.setAttribute("data-animation-out","true")},c=l=>{s(l)};return n.jsx("div",{className:ie["mc--notify--item"],ref:a,onAnimationEnd:()=>c(e),children:n.jsxs(d.SnackBar.Structure,{size:"medium",children:[n.jsx(d.SnackBar.Content,{title:t}),n.jsxs(d.SnackBar.Support,{children:[typeof r=="function"&&n.jsx(d.Button,{onClick:()=>{r(),i()},size:"small",variant:"tertiary",children:"Desfazer"}),n.jsx(d.Button,{iconNameStart:o.close,iconSize:"small",onClick:()=>i(),variant:"tertiary"})]})]})},e)};nf.displayName="MiniCart.Notify.Item";const sf=({ICONS:e})=>{const t=ma(),{removeNotification:r}=pa(),s=t.length?[...t].sort((o,a)=>a.id-o.id):[];return s.length?n.jsx("div",{className:ie["mc--notify"],children:n.jsx("div",{className:ie["mc--notify--content"],children:Array.isArray(s)&&s.map(o=>n.jsx(nf,{item:o,removeNotification:r,ICONS:e},o.id))})}):null};sf.displayName="MiniCart.Notifications";const hy=({handleSendEvent:e,onHandleRemove:t,product:r,MINICART_CONFIG:s,...o})=>{const a=Xr(),{toggleProduct:i}=Er(),{itemOffered:{isVariationOf:{productGroupID:c}},quantity:l}=r;return n.jsx(d.Button,{...o,adornment:{end:n.jsx(d.Icon,{name:`favorite-${a.includes(c)?"true":"false"}`,size:"small"})},onClick:()=>{i(c),a.includes(c)||t({texture:"mini-cart-wishlist",title:`${s.messages.add_wishlist}`},l,()=>i(c)),e(a.includes(c)?"remove_from_wishlist":"add_to_wishlist","productEvents")},children:s.messages.add_wishlist_button})},of=({handleSendEvent:e,product:t,ICONS:r,MINICART_CONFIG:s,...o})=>{const{addToCart:a,removeToCart:i}=Pe(),{bundleItems:c=[],id:l,uniqueId:u,seller:m,offerings:f,quantity:p}=t,h=(g,_,v)=>{i(l,g.title,()=>{typeof v=="function"&&v(),a({id:l,quantity:_,seller:m},{id:l,texture:g.texture},!0)})};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:ie["mc--card--actions--add-remove"],children:[s.has_wishlist_button&&n.jsx(hy,{...o,product:t,handleSendEvent:e,onHandleRemove:h,ICONS:r,MINICART_CONFIG:s}),n.jsx(d.Button,{...o,adornment:{end:n.jsx(d.Icon,{name:r.delete,size:"small"})},underline:!0,variant:"secondary",state:"danger",onClick:()=>{h({texture:"mini-cart",title:`${s.messages.remove}`},p),e("remove_from_cart","skuEvents")},children:s.messages.remove_button})]}),s.has_gift_option&&n.jsx(Tr.Gift,{uniqueId:u,bundleItems:c,offerings:f,ICONS:r,MINICART_CONFIG:s})]})};of.displayName="MiniCart.Card.Actions";const af=({bundleItems:e,offerings:t,uniqueId:r,ICONS:s,MINICART_CONFIG:o})=>{const[a,i]=y.useState(!1),{toggleGiftItemCart:c}=Pe(),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(r,String(f.id),p).then(()=>i(!1))}}},u=t[0],m=e.find(f=>f.id===u.id);return u&&"id"in u?n.jsx("div",{className:ie["mc--card--actions--gift"],children:n.jsx(d.Checkbox,{adornment:n.jsx(d.Icon,{name:s.check}),checked:!!m,disabled:a,label:o.messages.giftPackage,onChange:l})}):null};af.displayName="MiniCart.Card.Gift";const cf=({itemOffered:e})=>{const t=F.updatedResizedImg(e==null?void 0:e.image[0].url,{width:200,height:300});return n.jsx(et,{href:`${e==null?void 0:e.slug}`,className:ie["mc--card--product-link"],children:n.jsx(Oe.Image,{alt:(e==null?void 0:e.image[0].alternateName)||"Produto",src:t||"",width:108,height:164,objectFit:"unset"})})};cf.displayName="MiniCart.Card.Media";const lf=({name:e,skuName:t,tagName:r,className:s})=>n.jsxs(n.Fragment,{children:[r&&n.jsx(d.Tag,{variant:"quaternary",title:r,style:{textTransform:"uppercase"},children:r}),n.jsx("p",{className:d.helpers.classNameConcat(ie["mc--card--name"],s),children:F.getProductNameWithoutSku(e??"",t??"")})]});lf.displayName="MiniCart.Card.Name";const uf=({total:e,totalList:t})=>n.jsx(d.ProductInfo.Root,{children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:ie["mc--card--price"],children:n.jsx(d.ProductInfo.Wrapper,{className:ie["mc--card--price--details"],size:"small",layout:"horizontal",children:t&&e!==t?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:F.formatPriceToCurrency(t),size:"small"}),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:F.formatPriceToCurrency(e),size:"small"})]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:F.formatPriceToCurrency(e),size:"small"})})})})});uf.displayName="MiniCart.ProductPrice";const df=({product:e,TEXTURE_IMAGE:t,TOGGLE_STYLE_MODIFIER:r,storeId:s})=>{var m;const[o,a]=y.useState(""),i=y.useRef(null),{cartStore:{options:c}}=Pe(),l=e.itemOffered.isVariationOf.productGroupID,u=y.useCallback(()=>{var p;const f=(p=c==null?void 0:c.find(h=>h.id===l))==null?void 0:p.texture;if(f){a(f);return}fetch(`https://${s}.myvtex.com/_v/proxy/catalog/product/info`,{method:"POST",body:JSON.stringify({ids:[l]})}).then(h=>h.json()).then(h=>{const g=h.data[0].items.find(_=>_.itemId===e.id);if(g){const _=g.images.find(v=>t.includes(v.imageLabel));if(_!=null&&_.imageUrl){a(_.imageUrl);return}a(g.images[0].imageUrl)}}).catch(h=>{console.error(h)})},[c,l,e.id,s]);return y.useEffect(()=>{if(!i.current)return;const f=new IntersectionObserver(p=>{p[0].isIntersecting&&u()});return f.observe(i.current),()=>{f.disconnect()}},[u]),n.jsx("div",{ref:i,children:n.jsx(d.ToggleStyle.Wrapper,{size:"small",style:r,children:n.jsx(d.ToggleStyle.Texture,{children:o?n.jsx(Oe.Image,{alt:((m=e.itemOffered)==null?void 0:m.image[0].alternateName)??"Produto",src:o,width:164,height:164,style:r}):n.jsx(Lu,{})})})})};df.displayName="MiniCart.Card.Style";const ff=({product:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:o,storeId:a})=>{const{size:i}=F.getColorAndSizeFromSkuName(e.itemOffered.skuName??"",r);return n.jsxs(d.Utils.Row,{alignItems:"center",children:[n.jsx(df,{product:e,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:o,storeId:a}),n.jsx(d.Utils.Divider,{direction:"vertical",size:"small",style:{height:24}}),i&&n.jsx(d.ToggleSize.Wrapper,{size:t.product_card.sku.size??"small",variation:t.product_card.sku.variation??"fill",className:ie["mc-container-actions--toggle-size-modifier"],style:{backgroundColor:`${ie.brandPrimaryLighter}`},children:n.jsx(d.ToggleSize.Text,{children:i})})]})};ff.displayName="MiniCart.Card.Sku";const Tr={Actions:of,Gift:af,Media:cf,Name:lf,Price:uf,Sku:ff},gy=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}},mf=({available:e=!0,index:t,product:r,ICONS:s,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c,storeId:l})=>{var p,h;const{sendDataLayerEvent:u}=le(),m=gy(r),f=(g,_)=>{const v={commonData:{...r,...m},customData:{index:t},event:g};if(_==="skuEvents"){const x={...r,...m};v.supportData={selectedSkus:[x]},v.commonData.products=[x]}u({functionKey:_,data:v})};return n.jsxs("div",{className:d.helpers.classNameConcat(ie["mc--card"],e?"":ie["mc--card--unavailable"]),children:[n.jsx(Tr.Media,{itemOffered:r.itemOffered}),n.jsxs("div",{className:ie["mc--card--content-info"],children:[n.jsx(Tr.Name,{name:((p=r.itemOffered)==null?void 0:p.name)??"",skuName:(h=r.itemOffered)==null?void 0:h.skuName}),n.jsxs("div",{className:ie["mc--card--details"],children:[n.jsx("div",{className:ie["mc--card--actions"],children:e?n.jsx(Tr.Price,{total:m.price,totalList:m.listPrice}):n.jsx(d.Tag,{variant:"secondary",size:"small",children:"Indisponível"})}),n.jsxs("div",{className:ie["mc--card--actions--secondary"],children:[e&&n.jsx(Tr.Sku,{product:r,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c,storeId:l}),n.jsx(Tr.Actions,{handleSendEvent:f,product:r,size:"small",variant:"tertiary",ICONS:s,MINICART_CONFIG:o})]})]})]})]})};mf.displayName="MiniCart.Card";const pf=({type:e="positive",ICONS:t,MESSAGE_CASHBACK:r})=>{var a;const{toExpire:s}=Yr(),o=((a=s==null?void 0:s.cashback)==null?void 0:a.reduce((i,c)=>i+c.remaining_value,0))??0;return o>0?n.jsxs("div",{className:d.helpers.classNameConcat(ie["mc--cashback"],ie[`mc--cashback--${e}`]),children:[n.jsx(d.Icon,{name:t.alert_circle,size:"medium"}),n.jsxs("p",{children:[n.jsx("span",{children:F.formatPriceToCurrency(o)})," ",r.title]})]}):null};pf.displayName="MiniCart.Cashback";const hf=({type:e,ICONS:t,MINICART_CONFIG:r})=>{const{addCouponSeller:s,removeCoupon:o,removeSellerCode:a,cartStore:{marketingData:i,openTextField:c}}=Pe(),[l,u]=y.useState(!1),[m,f]=y.useState(!1),p=y.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]=y.useState(!!p()),_=async v=>{f(!0),!!p()&&(e==="coupon"?await o():await a(),g(!1),u(!1)),await s(v,e).then(C=>{if(!C.statusOk&&v||C.code!==200){v?(u(!0),g(!1)):u(!1);return}g(!0),u(!1)}).catch(()=>u(!0)).finally(()=>f(!1))};return n.jsx(Je.Field,{hasError:l,hasSuccess:h,isLoading:m,onHandler:_,type:e,title:e==="coupon"?`${r.messages.descount_cupom_placeholder}`:`${r.messages.sellers_code_placeholder}`,value:p(),MINICART_CONFIG:r,ICONS:t})};hf.displayName="MiniCart.CouponSeller";const gf=({ICONS:e,MINICART_CONFIG:t,PLP_NOT_RESULT:r})=>{const{router:s}=pe(),o=()=>{s.push(r.link)};return n.jsxs(d.Utils.Column,{alignContent:"center",alignItems:"center",gap:"24px",className:ie["mc--body--empty--feedback"],children:[n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsxs("p",{className:`typography-style-body-xs ${ie["mc--body--empty--text"]}`,children:[t.messages.empty_card," "]})})}),n.jsx(d.Button,{variant:"tertiary",size:"large",onClick:()=>o(),"data-close":!0,adornment:{end:n.jsx(d.Icon,{name:e.arrow_right,size:"medium"})},children:t.messages.empty_bag})]})};gf.displayName="MiniCart.Feedback";const _y=e=>{const t=e.replace(/\D/g,"");return t.length>5?`${t.slice(0,5)}-${t.slice(5,8)}`:t},_f=({feedback:e,hasError:t,onHandler:r,hasSuccess:s,type:o,title:a,value:i,ICONS:c})=>{const[l,u]=y.useState(i);y.useEffect(()=>{t||u(i)},[i,t]);const m=()=>t?n.jsx(d.Icon,{name:c.delete_circle}):String(i).length&&s?n.jsx(d.Icon,{name:c.check_circle}):null,f=()=>{if(o==="seller"){const _=String(i).includes(" - ")?String(i).split(" - ")[0]:l;u(_)}},p=()=>{if(o==="seller"){const _=String(i).includes(" - ")?i:l;u(_)}},h=_=>{const v=_.currentTarget.value;if(v===""&&typeof r=="function"||s&&String(i).length>0&&v!==String(i)||t&&v!==String(i)){u(""),r("");return}if(o==="cep"){const C=_y(v);u(C)}else u(v)},g=_=>{if(_.key.toLocaleLowerCase()==="enter"&&typeof r=="function"){const v=_.currentTarget.value;r(v)}};return n.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:g})};_f.displayName="MiniCart.Field.Input";const yf=({title:e,ICONS:t,MINICART_CONFIG:r,...s})=>{const o=y.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=y.useCallback(()=>{if(o.current){const _=o.current.querySelector("input");_&&typeof l=="function"&&(m!==""||i?(l(""),_.value=""):l((_==null?void 0:_.value)??""))}},[l,m,i]),h=f();return n.jsx("div",{ref:o,children:n.jsx(d.TextField.Structure,{className:ie["mc--field"],input:n.jsx(_f,{...s,feedback:h,title:e,ICONS:t}),right:n.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?n.jsx(d.Icon,{name:"close",size:"small"}):`${r.messages.promo_code_button}`}),supportText:u==="cep"&&h==="success"?n.jsx(d.TextField.SupportText,{text:"Mais informações de frete na etapa a seguir",feedback:"success",title:"support"}):null})})};yf.displayName="MiniCart.Field";const Qi=e=>{const t=e*100;return Math.round(t)},yy=e=>(e/100).toFixed(2).replace(".",","),vy=(e,t)=>{const{valueType:r,remainingValueToActivate:s}=e;if(r==="quantity")return`Adicione mais ${s} ${s===1?"item":"itens"} ${t}`;if(r==="price"){const o=s===100?"Falta":"Faltam",a=yy(s);return`${o} R$ ${a} ${t}`}return t},vf=({ICONS:e})=>{var x;const{promotionRules:t,data:r,cartStore:s,cartStore:{items:o,marketingData:a},addCouponSeller:i,setIsOpen:c}=Pe(),{sendDataLayerEvent:l}=le(),u=(x=r==null?void 0:r.promotion)==null?void 0:x.promotionCart,m=y.useRef(!1),{router:f}=pe();if(y.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,g=u.titleSuccess,_=u.subtitleSuccess,v=u.linkLabel;return n.jsxs("div",{className:ie["mc--body--promotion"],children:[t.remainingValueToActivate>0&&n.jsx(d.Closeness,{className:ie["mc--body--promotion--closeness"],title:vy(t,p),subtitle:h,percentage:Qi(t.completeness),iconLink:e.arrow_right,linkLabel:v,onClick:()=>{l({functionKey:"viewCartEvent",data:{event:"closeness_view_more",commonData:{cartStore:s}}}),f.push(`${u.link}`),c(!1)}}),t.remainingValueToActivate<=0&&n.jsx(d.Closeness,{className:`${ie["mc--body--promotion--closeness"]} ${ie["mc--body--promotion--closeness--success"]}`,title:g,subtitle:_,percentage:Qi(t.completeness)})]})};vf.displayName="MiniCart.Modal.Body.Promotion";const xf=({TIPBAR_CONFIGS:e})=>{const{data:t,cartStore:r,cartStore:{items:s,marketingData:o},addCouponSeller:a}=Pe(),i=t==null?void 0:t.flags.flagCart.flagCupom,c=(o==null?void 0:o.coupon)===(i==null?void 0:i.valueCupom),[l,u]=y.useState(!1),[m,f]=y.useState(!1);if(y.useEffect(()=>{l&&setTimeout(()=>{u(!1)},e.snackbar_timeout)},[l]),y.useEffect(()=>{m&&setTimeout(()=>{f(!1)},e.snackbar_timeout)},[m]),!i||i.active==="Desativar"||i.valueCupom===""||s.length===0)return null;const p=async()=>{if(!r.items.length){f(!0);return}(await a(i==null?void 0:i.valueCupom,"coupon")).code!==200&&u(!0)};return n.jsxs("div",{className:ie["mc--body--coupon-tag"],style:{backgroundColor:`${i.tagColor}`,color:`${i.textColor}`},children:[n.jsx("div",{className:ie["mc--body--coupon-tag--text"],dangerouslySetInnerHTML:{__html:i.value}}),n.jsx("div",{className:ie["mc--body--coupon-tag--button"],children:n.jsx(d.Button,{variant:"quaternary",mode:"inverse",onClick:p,disabled:c,children:c?"Cupom Aplicado":"Aplicar Cupom"})})]})};xf.displayName="MiniCart.Modal.Body.CouponTag";const bf=({children:e,ICONS:t,MINICART_CONFIG:r,NAME_SPLIT_SYMBOL:s,PLP_NOT_RESULT:o,TEXTURE_IMAGE:a,TIPBAR_CONFIGS:i,TOGGLE_STYLE_MODIFIER:c,storeId:l})=>{const{cartStore:{items:u,messages:m}}=Pe();return n.jsxs(d.Modal.Body,{className:ie["mc--body"],children:[e,n.jsx(vf,{ICONS:t}),n.jsx(xf,{TIPBAR_CONFIGS:i}),n.jsx("div",{className:ie["mc--body--products"],children:Array.isArray(u)&&u.length?u.map((f,p)=>{const h=m.find(g=>{var _;return g.code==="withoutStock"&&((_=g.fields)==null?void 0:_.ean)===f.ean})!==void 0;return n.jsx(Je.Card,{available:!f.availability.includes("outStock")||!h,index:p,product:f,ICONS:t,MINICART_CONFIG:r,NAME_SPLIT_SYMBOL:s,TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:c,storeId:l},`${f.id}-${f.itemOffered.sku}-${p}`)}):n.jsx(Je.Feedback,{ICONS:t,MINICART_CONFIG:r,PLP_NOT_RESULT:o})})]})};bf.displayName="MiniCart.Body";const jf=({children:e,storeConfig:t,MINICART_CONFIG:r})=>{const{cartStore:s}=Pe();if(s.items.length===0)return null;const o=()=>{var i;const a=new URLSearchParams({orderFormId:s.id,...((i=s.marketingData)==null?void 0:i.utmCampaign)&&{utm_campaign:s.marketingData.utmCampaign}});window.location.href=`${t.checkoutUrl}?${a.toString()}#/cart`};return n.jsxs(d.Modal.Footer,{className:ie["mc--footer"],children:[e,n.jsx("div",{className:ie["mc--footer--actions"],children:n.jsx(d.Button,{variant:"primary",size:"large","data-close":!0,className:ie["mc--footer--actions-button"],onClick:o,children:r.messages.checkout_button})})]})};jf.displayName="MiniCart.Modal.Footer";const Cf=({children:e,ICONS:t,MINICART_CONFIG:r,Z_INDEX_WAR:s})=>{const[o,a]=y.useState(!1),i=y.useRef(null),c=()=>a(l=>!l);return n.jsxs(n.Fragment,{children:[o&&n.jsx(d.Tooltip.Root,{arrow:"right",position:"top",top:-3,left:-3,component:n.jsx("p",{children:"Código da vendedora, cupom ou cálculo do frete"}),id:"inputs--tooltip",className:ie["inputs--tooltip"],style:{zIndex:s.modal},isOpen:!0,size:"medium",parent:i.current}),n.jsxs(d.Accordion.Wrapper,{className:ie["mc--discount"],children:[n.jsx(d.Accordion.Header,{id:"frete",title:"Frete",closeIndicator:n.jsx(d.Icon,{name:t.arrow_up,size:"medium"}),openIndicator:n.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),className:d.helpers.classNameConcat(ie["mc--discount--header"]),startOpen:r.promotion_input_starts_open,children:n.jsxs(d.TextStructure.Root,{children:[n.jsx(d.TextStructure.DivWrapper,{children:n.jsxs("h3",{className:"typography-style-body-sm",children:[r.messages.promo_code_title," "]})}),n.jsx("div",{ref:i,onMouseEnter:c,onMouseLeave:c,"aria-label":"Mostrar descrição",children:n.jsx(d.Icon,{name:t.alert_circle,size:"small"})})]})}),n.jsx(d.Accordion.Body,{className:ie["mc--discount--body"],children:e})]})]})};Cf.displayName="MiniCart.Discount";const Sf=({discount:e,shipping:t,total:r})=>{var l,u;const{data:s}=Pe(),o=(u=(l=s==null?void 0:s.flags)==null?void 0:l.flagCart)==null?void 0:u.flagTotal,a=r-Math.abs(e??0)+(t??0),i=t===0?"Frete Grátis":F.formatPriceToCurrency((t??0)/100),c=[{title:"Frete",value:t===void 0?"A calcular":i},{title:"Desconto",value:F.formatPriceToCurrency((e??0)/100)},{message:(o==null?void 0:o.value)??"",title:"Total",value:`1x de ${F.formatPriceToCurrency(a/100)}`}];return n.jsx("div",{className:ie["mc--footer--total"],children:Array.isArray(c)&&c.map((m,f)=>n.jsxs("div",{className:ie["mc--footer--total--info"],"data-discount":m.title==="Desconto",children:[n.jsx("p",{children:m.title}),n.jsxs("div",{className:ie["mc--footer--total--info--content"],children:[m.message&&(o==null?void 0:o.active)==="Ativar"&&n.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}),n.jsx(d.ProductInfo.Price,{className:ie["mc--footer--total--info"],label:m.title,value:m.value})]})]},f))})};Sf.displayName="MiniCart.Modal.Footer.Resume.Items";const wf=()=>{var o,a,i;const{totalizers:e}=xr(),t=((o=e.find(c=>c.id==="Items"))==null?void 0:o.value)??0,r=(a=e.find(c=>c.id==="Discounts"))==null?void 0:a.value,s=(i=e.find(c=>c.id==="Shipping"))==null?void 0:i.value;return n.jsx(Sf,{discount:r??0,total:t,shipping:s})};wf.displayName="MiniCart.Modal.Footer.Totals";const Pf=({ICONS:e,MINICART_CONFIG:t})=>{const{isMobile:r}=oe(),{cartStore:{items:s}}=Pe(),o=s.reduce((a,i)=>a+(i.quantity??0),0);return n.jsx(d.Modal.Header,{navigation:"top",className:ie["mc--header"],children:n.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!r,children:[n.jsx(d.Modal.Title,{navigation:"top",title:t.messages.title}),n.jsx("span",{className:ie["mc--header--subtitle"],children:o!==1?`[${o}] Produtos`:`[${o}] Produto`}),n.jsx(d.Button,{"data-close":!0,iconNameStart:e.close,size:"small",variant:"tertiary"})]})})};Pf.displayName="MiniCart.Modal.Header";const Ef=({ICONS:e,MINICART_CONFIG:t})=>{const{cartStore:{shippingData:r},shipping:s,removeCEP:o}=Pe(),{sendDataLayerEvent:a}=le(),[i,c]=y.useState(!1),[l,u]=y.useState(!1),m=y.useCallback(()=>{var C;const x=((C=r==null?void 0:r.address)==null?void 0:C.postalCode)??"";return x.length===8&&!x.includes("-")?`${x.slice(0,5)}-${x.slice(5)}`:x},[r]),[f,p]=y.useState(!!m()),h=()=>{p(!1),c(!1)},g=x=>{var C;if(typeof x=="object"&&(x!=null&&x.logisticsInfo))return(C=x.logisticsInfo)==null?void 0:C.reduce((j,b)=>{var R;const w=(R=b==null?void 0:b.slas)==null?void 0:R.find(I=>(I==null?void 0:I.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 N=parseInt(j.delivery_time??"0");return S>N&&(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"})},_=async x=>{const C=x.replace(/\D/g,"");if(C.length!==8)return!1;try{return!(await _r.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 _(x)){c(!0),p(!1),u(!1);return}try{const w=await s(x);if(c(!1),w){p(!0);const S=g(w);S&&a({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:S}})}}catch{c(!0)}finally{u(!1)}};return n.jsx(Je.Field,{hasSuccess:f,hasError:i,isLoading:l,onHandler:v,title:`${t.messages.shipping_calculation_placeholder}`,type:"cep",value:m(),ICONS:e,MINICART_CONFIG:t})};Ef.displayName="MiniCart.Shipping";const Nf=()=>{var r,s;const{data:e}=Pe(),t=(s=(r=e==null?void 0:e.flags)==null?void 0:r.flagCart)==null?void 0:s.flagHeader;return t!=null&&t.value?n.jsx(d.Tag,{variant:"tertiary",title:t==null?void 0:t.value,size:"small",adornment:{start:t!=null&&t.enableIcon&&(t!=null&&t.icon)?n.jsx(d.Icon,{name:t==null?void 0:t.icon,style:{color:t==null?void 0:t.iconColor}}):null},style:{background:t==null?void 0:t.tagColor,color:t==null?void 0:t.textColor,width:"100%"},children:t==null?void 0:t.value}):null};Nf.displayName="MiniCart.TagMessage";const Je={Body:bf,Card:mf,Cashback:pf,CouponSeller:hf,Discount:Cf,Field:yf,Feedback:gf,Shipping:Ef,Footer:jf,Header:Pf,TagMessage:Nf,Totals:wf},xy=({ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,PLP_NOT_RESULT:s,TEXTURE_IMAGE:o,TIPBAR_CONFIGS:a,TOGGLE_STYLE_MODIFIER:i,Z_INDEX_WAR:c,storeConfig:l,minicartStyleModifiers:u})=>{const{isOpen:m,setIsOpen:f}=Pe(),{isMobile:p}=oe();return n.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(ie["minicart--modal-modifier"],u),isMobile:!0,isOpen:m,setIsOpen:f,style:{zIndex:c.modal},variant:p?"sideBottom":"sideRight",children:[n.jsx(Je.Header,{ICONS:e,MINICART_CONFIG:t}),n.jsx(Je.Body,{ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,PLP_NOT_RESULT:s,TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:i,TIPBAR_CONFIGS:a,storeId:l.api.storeId,children:n.jsx(Je.TagMessage,{})}),n.jsxs(Je.Footer,{MINICART_CONFIG:t,storeConfig:l,children:[n.jsxs(Je.Discount,{ICONS:e,MINICART_CONFIG:t,Z_INDEX_WAR:c,children:[n.jsx(Je.CouponSeller,{type:"seller",ICONS:e,MINICART_CONFIG:t}),n.jsx(Je.CouponSeller,{type:"coupon",ICONS:e,MINICART_CONFIG:t}),n.jsx(Je.Shipping,{ICONS:e,MINICART_CONFIG:t})]}),n.jsx(Je.Totals,{})]}),n.jsx(sf,{ICONS:e})]})},If=({tipBar:e,minicartStyleModifiers:t,menuV2:r,storeConfig:s,className:o})=>{const{structureRef:a,rootRef:i,CONSTANTS:c}=Ee(),{header:{HEADER_CONFIGS:l,Z_INDEX_WAR:u},minicart:m}=c;return n.jsx(d.Header.Structure,{innerRef:a,adornment:{start:e},style:{position:"sticky",top:0,zIndex:u.header},className:d.helpers.classNameConcat(Fa["header-animation"],o),children:n.jsxs(d.Header.Root,{innerRef:i,style:{zIndex:u.header},variant:l.default_variant,interactiveVariant:l.interactive_variant,children:[r??n.jsxs(ry,{children:[n.jsx("div",{className:F.responsive["responsive-mobile-block"],style:{height:"100%",width:"100%",zIndex:u.header_mobile},children:n.jsx(rf,{storeConfig:s})}),n.jsx("div",{className:F.responsive["responsive-desktop-block"],style:{height:"100%",width:"100%",zIndex:u.header_desktop},children:n.jsx(qd,{storeConfig:s})})]}),n.jsx(dy,{children:n.jsx(xy,{...m,minicartStyleModifiers:t})}),n.jsx(Ra,{title:"Produto adicionado à sua sacola!",CONSTANTS:c.addToCart})]})})};If.displayName="Header";const by="_shippingFreight_6z8rf_6",jy="_shippingFreight__postalCodeGrid_6z8rf_10",Cy="_shippingFreight__grid_6z8rf_14",Sy="_shippingFreight__grid__title_6z8rf_18",wy="_shippingFreight__grid__remember_6z8rf_29",Py="_postalCodeContainer_6z8rf_44",Ey="_deliveryStatusBar__tag_6z8rf_49",Ny="_deliveryStatusBarError__tag_6z8rf_66",Iy="_deliveryInfo_6z8rf_74",Ry="_deliveryInfo__content_6z8rf_78",Ty="_deliveryInfo__text_6z8rf_84",Ay="_deliveryInfo__title_6z8rf_89",ky="_deliveryInfo__subtitle_6z8rf_99",Oy="_deliveryInfo__tooltipIcon_6z8rf_109",Ly="_deliveryInfo__tooltip_6z8rf_109",My="_freightGrid_6z8rf_148",Dy="_freightContainer_6z8rf_155",Fy="_freightOption__content_6z8rf_160",zy="_freightOption__value_6z8rf_166",By="_freightOption__title_6z8rf_177",Uy="_freightOption__title_item_6z8rf_181",qy="_freightOption__paragraph_6z8rf_192",ge={shippingFreight:by,shippingFreight__postalCodeGrid:jy,shippingFreight__grid:Cy,shippingFreight__grid__title:Sy,shippingFreight__grid__remember:wy,postalCodeContainer:Py,deliveryStatusBar__tag:Ey,deliveryStatusBarError__tag:Ny,deliveryInfo:Iy,deliveryInfo__content:Ry,deliveryInfo__text:Ty,deliveryInfo__title:Ay,deliveryInfo__subtitle:ky,deliveryInfo__tooltipIcon:Oy,deliveryInfo__tooltip:Ly,freightGrid:My,freightContainer:Dy,freightOption__content:Fy,freightOption__value:zy,freightOption__title:By,freightOption__title_item:Uy,freightOption__paragraph:qy,"input-modifier":"_input-modifier_6z8rf_207","freight--tooltip":"_freight--tooltip_6z8rf_227"},Hy=({icon:e,title:t,subtitle:r,packageCount:s,packageUnit:o="",labelDescription:a,freightConfig:i,toolTipZIndex:c})=>{const[l,u]=y.useState(!1),m=y.useRef(null),f=()=>u(p=>!p);return n.jsxs("div",{className:ge.deliveryInfo,ref:m,children:[n.jsx(d.Tooltip.Root,{arrow:"bottom",component:n.jsx("div",{children:n.jsx("p",{children:i.messages.select_size_tag})}),id:"freight--tooltip",className:ge["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:m.current}),n.jsxs("div",{className:ge.deliveryInfo__content,children:[n.jsx("div",{className:ge.deliveryInfo__icon,children:n.jsx(d.Icon,{name:e,size:"medium"})}),n.jsxs("div",{className:ge.deliveryInfo__text,children:[n.jsxs("span",{className:ge.deliveryInfo__title,children:[t," ",s," ",o]}),r&&n.jsx("span",{className:ge.deliveryInfo__subtitle,children:r})]}),a&&n.jsxs("div",{className:ge.deliveryInfo__tooltipIcon,onMouseEnter:f,onMouseLeave:f,"aria-label":"Mostrar descrição",children:[n.jsx("span",{children:n.jsx(d.Icon,{name:i.icons.feedback_help,size:"small"})}),l&&n.jsx("div",{className:ge.deliveryInfo__tooltip,children:a})]})]})]})},$y=({value:e,title:t,paragraph:r})=>n.jsx("div",{className:ge.freightOption,children:n.jsxs("div",{className:ge.freightOption__content,children:[n.jsx("span",{className:ge.freightOption__value,children:e}),n.jsx("span",{className:ge.freightOption__title,children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{className:ge.footer__item,children:[n.jsx("span",{className:ge.freightOption__title_item,children:t}),r&&n.jsx("span",{className:ge.freightOption__paragraph,children:r})]})})})]})}),Vy=({children:e})=>n.jsx("div",{className:ge.freightContainer,children:e}),Wy=({children:e})=>n.jsx("div",{className:ge.freightGrid,children:e}),Gy=({children:e})=>n.jsx("div",{className:ge.postalCodeContainer,children:e}),Xi=({message:e,seller:t="",size:r="small",setError:s})=>n.jsx("div",{className:s?ge.deliveryStatusBarError:ge.deliveryStatusBar,children:n.jsxs(d.Tag,{title:e,className:s?ge.deliveryStatusBarError__tag:ge.deliveryStatusBar__tag,size:r,children:[e," ",!s&&t]})}),Ky=e=>{const t=parseInt(e,10);return t===1?`${t} dia`:`${t} dias`},Qy=e=>{var r,s,o;const t=[];return(o=(s=(r=e==null?void 0:e.logisticsInfo)==null?void 0:r[0])==null?void 0:s.slas)==null||o.forEach(a=>{t.push({id:a.id,name:a.name,price:a.price,shippingEstimate:a.shippingEstimate})}),t},Xy=({component:e,parent:t,top:r,left:s,target:o,contentRef:a,freightConfig:i,toolTipZIndex:c=999,...l})=>{const{isMobile:u}=oe();return n.jsx(n.Fragment,{children:u?n.jsx(d.Tooltip.Root,{arrow:"bottom",component:n.jsxs("div",{...l,ref:a,children:[e,n.jsx("p",{children:i.messages.select_size_tag})]}),id:"freight--tooltip",className:ge["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:t}):n.jsx(d.Tooltip.Root,{arrow:"bottom",component:n.jsxs("div",{...l,ref:a,children:[e,n.jsx("p",{children:i.messages.select_size_tag})]}),id:"freight--tooltip",className:ge["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-110%",left:"3%",parent:t})})},Yy=({onUpdateFreightItems:e,sellerId:t,size:r,skuId:s,quantity:o,setError:a,setIsButtonClicked:i,component:c,freightConfig:l,toolTipZIndex:u})=>{var O,L,W,D;const m=xr(),f=xr(H=>H.shipping),[p,h]=y.useState(),[g,_]=y.useState(!1),[v,x]=y.useState(!1),[C,j]=y.useState(!1),b=(L=(O=m.shippingData)==null?void 0:O.address)==null?void 0:L.postalCode,w=!(p!=null&&p.length)&&b?b:p,S=y.useRef(null),P=async H=>{const te=H.target.value.replace(/\D/g,"").slice(0,8);te.length>5?h(te.replace(/^(\d{5})(\d{1,3})/,"$1-$2")):h(te)},N=async H=>{const X=H.target.value.replace(/\D/g,"");try{if((await _r.get(`https://viacep.com.br/ws/${X}/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.")}},R=async()=>{_(!0);try{const H=await _r.post("/api/checkout/simulation",{items:[{id:s,quantity:o,seller:t}],country:"BRA",postalCode:w});e(Qy(H.data))}catch(H){console.error("Erro ao atualizar o documento:",H)}finally{_(!1),f(w,"BRA")}},I=async()=>{if(!s){j(!0),setTimeout(()=>j(!1),1500);return}await N({target:{value:w}}),g||(R(),i(!0))};return n.jsxs("div",{ref:S,style:{position:"relative"},children:[!s&&C?n.jsx(Xy,{component:c,isOpen:C,parent:S.current,toolTipZIndex:u,freightConfig:l}):n.jsx(n.Fragment,{}),n.jsx("div",{style:{position:"relative"},children:n.jsx(d.TextField.Structure,{title:"structure",style:{width:"100%"},input:n.jsx(d.TextField.Input,{defaultValue:(D=(W=m.shippingData)==null?void 0:W.address)==null?void 0:D.postalCode,label:l.messages.text_input_label,title:"textfield",value:p,sizeVariant:r,onMouseOver:()=>s?null:j(!0),onMouseOut:()=>s?null:j(!1),mode:"simple",onChange:P,onKeyDown:H=>{H.key==="Enter"&&I()},className:ge["input-modifier"],feedback:v?"error":"none"}),right:n.jsx(d.Button,{onClick:I,size:r,title:"button",children:g?n.jsx(d.Spinner,{size:"small",indicatorColor:"#ffffff"}):l.messages.text_input_btn})})})]})},Jy=({children:e,freightConfig:t})=>n.jsxs("div",{className:ge.shippingFreight,children:[n.jsxs("div",{className:ge.shippingFreight__grid,children:[n.jsx("span",{className:ge.shippingFreight__grid__title,children:t.messages.title}),n.jsx("span",{className:ge.shippingFreight__grid__remember,children:n.jsx(Qe,{href:"https://buscacepinter.correios.com.br/app/endereco/index.php",passHref:!0,target:"_blank",rel:"noopener noreferrer",size:"x-small",disablePadding:!1,title:t.messages.remember_cep,children:t.messages.remember_cep})})]}),n.jsx("div",{className:ge.shippingFreight__postalCodeGrid,children:e})]}),Zy=({children:e})=>n.jsx("div",{className:ge.freightContainer,children:e}),Rf=({className:e,sellerId:t,skuId:r,quantity:s,size:o,seller:a,local:i,CONSTANTS_PROPS:c})=>{const{sendDataLayerEvent:l}=le(),[u,m]=y.useState(""),[f,p]=y.useState([]),[h,g]=y.useState(""),[_,v]=y.useState(!1),x=j=>m(j),C=j=>{p(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 n.jsxs(Zy,{className:e,children:[n.jsxs(Jy,{freightConfig:c.freightConfig,children:[n.jsx(Gy,{children:n.jsx(Yy,{onUpdateFreightItems:C,skuId:r,quantity:s,size:o,sellerId:t,local:i,setError:g,setIsButtonClicked:v,freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex})}),h?n.jsx(Xi,{size:o,message:h,setError:g}):f.length>0&&n.jsx(Xi,{size:o,message:c.freightConfig.messages.delivered_by,seller:a})]}),_&&!h?f.length>0&&n.jsxs(Vy,{children:[n.jsx(Wy,{children:f.filter(({id:j})=>!j.includes("Retirada")).map(j=>n.jsx($y,{id:j.id,value:F.freightParsePrice({valueInCents:j.price,hasFree:!1,freeTaxMessage:c.freightConfig.messages.free_tax}),title:j.name,paragraph:`${c.freightConfig.messages.prefix_days}${Ky(j.shippingEstimate)}`,radioValue:u,changeValue:x},j.id))}),c.deliveryInfoBoxesAllowed?n.jsx(Hy,{icon:c.freightConfig.icons.delivery_truck,packageUnit:c.freightConfig.messages.unit_amout,title:c.freightConfig.messages.delivered_amount_packages,subtitle:"",packageCount:1,labelDescription:"Label",freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex??999}):n.jsx(n.Fragment,{})]}):null]})},Cr={"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"},ev=({children:e,href:t,isLast:r,title:s})=>{const{constants:{ICONS:o}}=Me();return n.jsx(d.BreadCrumb.Item,{adornment:{end:r&&n.jsx(d.Icon,{name:o.arrow_right})},children:r?n.jsx(Qe,{href:t??"/",size:"medium",title:s,disableUnderline:!0,children:e}):e})},Tf=()=>{var o;const{state:e}=Fe(),t=e!=null&&e.term&&e.term.length>0?`/${e.term}`:"",r=decodeURIComponent((o=e==null?void 0:e.base)!=null&&o.length?e.base:t??t).slice(1).split("/"),s=iu(r);return n.jsx("div",{className:Cr["pcd-navigation--breadcrumb"],children:n.jsx(d.BreadCrumb.DivWrapper,{children:n.jsx(d.BreadCrumb.List,{children:Array.isArray(s)&&s.map((a,i)=>{var c,l;return y.createElement(ev,{...a,isLast:i!==s.length-1,key:a.href,title:(c=a.name)==null?void 0:c.replace(/-/g," ")},(l=a.name)==null?void 0:l.replace(/-/g," "))})})})})};Tf.displayName="PLPNavigation.BreadCrumb";const Af=({children:e,...t})=>n.jsxs("div",{...t,className:Cr["pdc-navigation--content"],children:[n.jsx(Yt.Filters,{}),e]});Af.displayName="PLPNavigation.Content";const tv="_sort_35wro_1",bs={sort:tv,"sort-list-wrapper":"_sort-list-wrapper_35wro_8","sort-list":"_sort-list_35wro_8","sort-button":"_sort-button_35wro_25"},rv=({children:e,sortListOpen:t,btnAdornment:r,style:s,...o})=>n.jsx(d.Button,{...o,adornment:{end:t?r==null?void 0:r.listOpen:r==null?void 0:r.listClosed},size:"small",variant:"tertiary",style:{...s,textDecoration:"none"},className:bs["sort-button"],children:e}),nv=e=>n.jsx(d.RadioButton.Radio,{...e}),sv=({children:e,className:t,name:r,...s})=>n.jsx(d.RadioButton.Group,{...s,name:r||"sort-group",className:d.helpers.classNameConcat(bs["sort-list"],t),children:e}),ov=({children:e,className:t,shadow:r=!0,padding:s="small",height:o="fit-content",...a})=>n.jsx(d.Card,{...a,shadow:r,className:d.helpers.classNameConcat(bs["sort-list-wrapper"],t),padding:s,height:o,children:e}),kf=y.forwardRef(({children:e,className:t,...r},s)=>n.jsx("div",{...r,ref:s,className:d.helpers.classNameConcat(bs.sort,t),children:e}));kf.displayName="SortRoot";const js=({handleSelectValue:e,sortListOpen:t,setSortListOpen:r,searchParams:s,ICONS:o,...a})=>{var p;const i=(p=s==null?void 0:s.get("sort"))==null?void 0:p.replace(":","_"),[c,l]=y.useState(i),{sendDataLayerEvent:u}=le();y.useEffect(()=>{l(i||void 0)},[i]);const{ref:m}=Md(()=>r(!1)),f=h=>{const g=h.target.value;l(g),typeof e=="function"&&e(g),u({functionKey:"filterEvent",data:{customData:{ordering:Jr.options[g]}}}),r(!1)};return n.jsxs(kf,{...a,ref:m,children:[n.jsx(rv,{btnAdornment:{listOpen:n.jsx(d.Icon,{name:o.arrow_up,size:"small"}),listClosed:n.jsx(d.Icon,{name:o.arrow_down,size:"small"})},sortListOpen:t,onClick:()=>r(!t),children:c?Jr.options[c]:Jr.placeholder},"sort-button"),t&&n.jsx(ov,{children:n.jsx(sv,{name:"sort-group",value:c??"",onChange:f,children:Object.keys(Jr.options).map(h=>n.jsx(nv,{label:Jr.options[h],value:h},h))})})]})};js.displayName="Sort";const Of=y.createContext({}),av=({children:e,...t})=>{const[r,s]=y.useState(!1);return n.jsx(Of.Provider,{value:y.useMemo(()=>({...t,openOrderBy:r,setOpenOrderBy:s}),[t,r,s]),children:e})},iv=()=>{const e=y.useContext(Of);if(e===void 0)throw new Error("usePLPNavigationContext must be used within a PDCNavigationProvider");return e},Lf=()=>{const{openOrderBy:e,onSort:t,setOpenFilters:r,setOpenOrderBy:s}=iv(),{constants:{ICONS:o,PDC_NAVIGATION:a}}=Me();return n.jsxs("div",{className:Cr["pdc-navigation--filters"],children:[n.jsx(Yt.BreadCrumb,{}),n.jsxs("div",{className:Cr["pdc-navigation--filters--content"],children:[n.jsx(js,{handleSelectValue:i=>t(i??"release_desc"),sortListOpen:e,setSortListOpen:s,ICONS:o,searchParams:new URLSearchParams}),n.jsx(d.Button,{adornment:{end:n.jsx(d.Icon,{name:o.arrow_down})},onClick:()=>r(!0),size:"small",variant:"tertiary",children:a.filter_button}),n.jsx(Yt.Total,{})]})]})};Lf.displayName="PLPNavigation.Filters";const Mf=({children:e,onSort:t,setOpenFilters:r,style:s,...o})=>{const a=y.useRef(null);return n.jsx(av,{onSort:t,setOpenFilters:r,children:n.jsx("div",{...o,className:Cr["pdc-navigation"],ref:a,style:{...s},children:n.jsx(Yt.Content,{children:e})})})};Mf.displayName="Root";const Df=({callback:e,selected:t,...r})=>n.jsx("div",{...r,className:Cr["pdc-navigation--selected"],children:n.jsx("div",{className:Cr["pdc-navigation--selected--container"],children:Array.isArray(t)?t.map(s=>s.key==="productclusterids"?null:n.jsx(Yt.SelectedItem,{callback:e,facet:s},s.value)):null})});Df.displayName="PLPNavigation.Selected";const Ba=({key:e,PLP_FILTERS:t})=>t.some(r=>r.key===e)?e==="cores-filtraveis":!1,Ua=({value:e,PLP_FILTERS_COLORS:t})=>{var r;return((r=t.find(s=>s.value===e))==null?void 0:r.color)??"#F2F2F2"},Ff=({key:e,PLP_FILTERS:t})=>{var r;return(r=t.find(s=>s.key===e))==null?void 0:r.label},zf=({key:e,PLP_FILTERS:t})=>{var r;return((r=t.find(s=>s.key===e))==null?void 0:r.order)??0},qo=({value:e})=>{const[t,r]=e.split(":").length===2?e.split(":"):[0,0],s=F.formatPriceToCurrency(Number(r));return`${F.formatPriceToCurrency(Number(t))} até ${s}`},Bf=({items:e})=>{const t=e.flatMap(o=>[o.range.from,o.range.to]),r=Math.min(...t.map(Math.abs)),s=Math.max(...t.map(Math.abs));return[r,s]},Uf=Object.freeze(Object.defineProperty({__proto__:null,checkedColor:Ba,createTagPrice:qo,getAbsoluteMinMax:Bf,getColor:Ua,getName:Ff,getOrder:zf},Symbol.toStringTag,{value:"Module"})),dt={"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"},qf=({columns:e=2,CONSTANTS:t,...r})=>{var a;const{filters:s,onToggleFacet:o}=tr();return n.jsxs("div",{...r,className:dt["filter--modal--body--content"],children:[Array.isArray(s.facets)&&s.facets.map(i=>n.jsx(Lt.Item,{columns:e,facet:i,onToggleFacet:o,CONSTANTS:t},i.key)),!((a=s.facets)!=null&&a.length)&&n.jsx(Lt.Empty,{PLP_FILTERS_EMPTY:t.PLP_FILTERS_EMPTY})]})};qf.displayName="Filter.Item.Content";const Hf=({PLP_FILTERS_EMPTY:e})=>{const t=()=>{window.history.back()};return n.jsxs("div",{className:dt["filter--empty"],children:[n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h4",{children:e.title}),n.jsx("p",{children:e.subtitle})]}),n.jsx(d.Button,{onClick:()=>t(),variant:"tertiary",children:e.button})]})};Hf.displayName="Filter.Empty";const $f=({columns:e,facet:t,onToggleFacet:r,CONSTANTS:s,...o})=>{const a=zf({key:t.key,PLP_FILTERS:s.PLP_FILTERS}),i=()=>{if(t.__typename==="FacetBoolean"){if(t.key==="cores-filtraveis")return n.jsx(Lt.Colors,{onToggleFacet:r,values:t.values,PLP_FILTERS:s.PLP_FILTERS,PLP_FILTERS_COLORS:s.PLP_FILTERS_COLORS});if(t.key==="tamanho")return n.jsx(Lt.Sizes,{onToggleFacet:r,values:t.values,PLP_SIZE_ORDER:s.PLP_SIZE_ORDER});if(t.key==="category-2")return n.jsx(Lt.Toggle,{columns:e,facetKey:t.key,onToggleFacet:r,values:t.values,ICONS:s.ICONS})}return t.__typename==="FacetRange"?n.jsx(Lt.Price,{facet:t}):n.jsx("p",{children:"Filter not support!!!"})};return n.jsx("div",{...o,className:dt["filter--item"],style:{order:a},children:n.jsxs(d.Accordion.Wrapper,{style:{width:"100%"},children:[n.jsx(d.Accordion.Header,{id:t.key,closeIndicator:n.jsx(d.Icon,{name:s.ICONS.arrow_up}),openIndicator:n.jsx(d.Icon,{name:s.ICONS.arrow_down}),children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h4",{className:"typography-style-body-sm",children:Ff({key:t.key,PLP_FILTERS:s.PLP_FILTERS})})})})}),n.jsx(d.Accordion.Body,{children:i()})]})})};$f.displayName="Filter.Item";const Vf=({onToggleFacet:e,values:t,PLP_FILTERS:r,PLP_FILTERS_COLORS:s,...o})=>{const{filters:{selected:a}}=tr();return n.jsx(jt.Root,{...o,children:n.jsx(jt.List,{children:Array.isArray(t)&&t.map(({key:i,value:c})=>n.jsx(jt.Option,{active:!!(a!=null&&a.find(l=>l.key===i&&l.value===c)),"data-color":Ba({key:i,PLP_FILTERS:r}),fill:Ua({value:c,PLP_FILTERS_COLORS:s}),onClick:()=>e({key:i,value:c}),type:"color"},`${i}-${c}`))})})};Vf.displayName="Filter.Item.Color";const Wf=({facet:e,...t})=>{var u,m;const{filters:{selected:r},price:s,onToggleFacet:o}=tr(),[a,i]=(s==null?void 0:s.split(":").map(Number))??[0,100],[c,l]=((m=(u=r==null?void 0:r.find(({key:f})=>f==="price"))==null?void 0:u.value)==null?void 0:m.split(":").map(Number))??[a,i];return n.jsx("div",{...t,className:dt["filter--item--price"],children:n.jsxs(d.Slider.SliderDual,{format:"price",initialValue:[c<a?a:c,l>i?i:l],min:a,max:i,type:"dual",step:1,onFinish:f=>{var p,h;f&&o({key:"price",value:`${(p=f.range)==null?void 0:p.min}:${(h=f.range)==null?void 0:h.max}`})},children:[n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{"data-min-value":!0})})}),n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{"data-max-value":!0})})})]})})};Wf.displayName="Filter.Item.Price";const Gf=({onToggleFacet:e,values:t,PLP_SIZE_ORDER:r,...s})=>{const{filters:{selected:o}}=tr(),a=[...t].sort((i,c)=>{const l=r.indexOf(i.name),u=r.indexOf(c.name);return l-u});return n.jsx(jt.Root,{...s,children:n.jsx(jt.List,{children:Array.isArray(a)&&a.map(({key:i,value:c})=>n.jsx(jt.Option,{active:!!(o!=null&&o.find(l=>l.key===i&&l.value===c)),text:c,type:"size",onClick:()=>e({key:i,value:c})},c))})})};Gf.displayName="Filter.Item.Sizes";const Kf=({columns:e,facetKey:t,onToggleFacet:r,values:s,ICONS:o,...a})=>n.jsx("div",{...a,className:dt["filter--item--toggle"],children:n.jsx("div",{className:dt["filter--item--toggle--container"],style:{gridTemplateColumns:`repeat(${e}, 1fr)`},children:Array.isArray(s)&&s.map(i=>n.jsx(d.Checkbox,{label:(i==null?void 0:i.name)??"",adornment:n.jsx(d.Icon,{name:o.check}),checked:i.selected,onChange:()=>r(i)},i.value))})});Kf.displayName="Filter.Item.Toggle";const Qf=({...e})=>{const{isLoading:t}=tr();return n.jsx("div",{className:dt["filter--loading"],"data-active":t,...e,children:n.jsx(d.Spinner,{indicatorColor:"#000",background:"#222"})})};Qf.displayName="Filter.Loading";const Xf=({children:e,className:t,isMobile:r=!1,CONSTANTS:{PLP_FILTERS_TITLE:s,ICONS:o}})=>{var m;const{deleteAllFacets:a,filters:i,isOpen:c,target:l,setIsOpen:u}=tr();return n.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(dt["filter--modal"],t),isMobile:r??!1,isOpen:c,parent:l,setIsOpen:u,variant:r?"sideBottom":"sideRight",style:{zIndex:99},children:[n.jsxs(d.Modal.Header,{navigation:"top",children:[n.jsx(d.Modal.Controls,{navigation:"top",isMobile:r,children:n.jsx(d.Button,{"data-close":!0,iconNameStart:o.close,size:"small",variant:"tertiary",style:{marginLeft:"auto"}})}),n.jsx(d.Modal.Title,{navigation:"top",title:s})]}),n.jsxs(d.Modal.Body,{style:{width:500},children:[n.jsx("div",{className:dt["filter--modal--body"],children:e}),n.jsx(Lt.Loading,{})]}),n.jsx(d.Modal.Footer,{children:n.jsxs("div",{className:dt["filter--modal--footer"],children:[n.jsx(d.Button,{"data-close":!0,size:"large",variant:"primary",children:(m=i.facets)!=null&&m.length?"ver resultados":"fechar"}),n.jsx(d.Button,{"data-close":!0,onClick:()=>a(),variant:"tertiary",children:"limpar filtros"})]})})]})};Xf.displayName="Filter.Modal";const Yf=({children:e,className:t,isMobile:r,CONSTANTS:s,...o})=>n.jsx(Su,{...o,PLP_FILTERS:s.PLP_FILTERS,children:n.jsx(Lt.Modal,{className:t,isMobile:r,CONSTANTS:s,children:e})});Yf.displayName="Filter.Root";const Jf=({ICONS:e,PLP_FILTERS_COLORS:t,PLP_FILTERS:r})=>{const{filters:s,onToggleFacet:o}=tr();return n.jsx("div",{className:dt["filter--selected"],children:n.jsx("div",{className:dt["filter--selected--content"],children:Array.isArray(s.selected)&&s.selected.map(({key:a,value:i})=>a==="productclusterids"?null:n.jsx(d.Tag,{title:a==="price"?qo({value:i}):i,adornment:{end:n.jsx(d.Icon,{name:e.close,size:"x-small"})},colorSquare:Ua({value:i,PLP_FILTERS_COLORS:t}),onClick:()=>o({key:a,value:i}),squareShow:Ba({key:a,PLP_FILTERS:r}),size:"medium",variant:"primary",children:a==="price"?qo({value:i}):i},i))})})};Jf.displayName="Filter.Selected";const Lt={Colors:Vf,Content:qf,Empty:Hf,Modal:Xf,Item:$f,Root:Yf,Loading:Qf,Selected:Jf,Price:Wf,Sizes:Gf,Toggle:Kf},{checkedColor:cv,createTagPrice:Yi,getColor:lv}=Uf,Zf=({callback:e,facet:t})=>{const{constants:{ICONS:r,PLP_FILTERS_COLORS:s,PLP_FILTERS:o}}=Me();return n.jsx(d.Tag,{title:(t==null?void 0:t.key)==="price"?Yi({value:t.value}):t.value.toUpperCase(),adornment:{end:n.jsx(d.Icon,{name:r.close,size:"x-small"})},colorSquare:lv({value:t.value,PLP_FILTERS_COLORS:s}),onClick:()=>{typeof e=="function"&&e(t,!0)},squareShow:cv({key:t.key,PLP_FILTERS:o}),size:"medium",variant:"primary",children:(t==null?void 0:t.key)==="price"?Yi({value:t.value}):t.value.toUpperCase()})};Zf.displayName="PLPNavigation.Selected.Item";const em=()=>n.jsx(d.TextStructure.Root,{children:n.jsx("p",{id:"pdc-navigation--total"})});em.displayName="PLPNavigation.Total";const Yt={BreadCrumb:Tf,Content:Af,Filters:Lf,Root:Mf,Selected:Df,SelectedItem:Zf,Total:em},uv="_footer__bottom_198g6_2",dv="_footer__wrapper_198g6_10",fv="_footer__main_198g6_39",mv="_footer__legalInformation_198g6_55",pv="_footer__column_198g6_77",hv="_footer__columnContent_198g6_87",gv="_footer__item_198g6_91",_v="_footer__itemLink_198g6_107",yv="_footer__columnTitle_198g6_122",vv="_footer__columnTitleIcon_198g6_134",xv="_footer__iconList_198g6_147",bv="_footer__itemSmallText_198g6_157",jv="_payment_198g6_168",Cv="_footer__iconContainer_198g6_173",Sv="_footer__iconListSubHeader_198g6_178",wv="_accordionWrapper_198g6_200",Pv="_accordionHeader_198g6_204",Ev="_accordionTextWrapper_198g6_208",_e={footer__bottom:uv,footer__wrapper:dv,footer__main:fv,footer__legalInformation:mv,footer__column:pv,footer__columnContent:hv,footer__item:gv,footer__itemLink:_v,footer__columnTitle:yv,footer__columnTitleIcon:vv,footer__iconList:xv,footer__itemSmallText:bv,payment:jv,footer__iconContainer:Cv,footer__iconListSubHeader:Sv,accordionWrapper:wv,accordionHeader:Pv,accordionTextWrapper:Ev,"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 tm={},qa={},Cs={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"warnOnce",{enumerable:!0,get:function(){return t}});let t=r=>{};if(process.env.NODE_ENV!=="production"){const r=new Set;t=s=>{r.has(s)||console.warn(s),r.add(s)}}})(Cs);var rm={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImageBlurSvg",{enumerable:!0,get:function(){return t}});function t(r){let{widthInt:s,heightInt:o,blurWidth:a,blurHeight:i,blurDataURL:c,objectFit:l}=r;const u=20,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"}})(rm);var Ss={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(o,a){for(var i in a)Object.defineProperty(o,i,{enumerable:!0,get:a[i]})}t(e,{VALID_LOADERS:function(){return r},imageConfigDefault:function(){return s}});const r=["default","imgix","cloudinary","akamai","custom"],s={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",localPatterns:void 0,remotePatterns:[],qualities:void 0,unoptimized:!1}})(Ss);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImgProps",{enumerable:!0,get:function(){return h}});const t=Cs,r=rm,s=Ss,o=["lazy","eager",void 0];function a(g){return g.default!==void 0}function i(g){return g.src!==void 0}function c(g){return typeof g=="object"&&(a(g)||i(g))}const l=new Map;let u;function m(g){return typeof g>"u"?g:typeof g=="number"?Number.isFinite(g)?g:NaN:typeof g=="string"&&/^[0-9]+$/.test(g)?parseInt(g,10):NaN}function f(g,_,v){let{deviceSizes:x,allSizes:C}=g;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 _!="number"?{widths:x,kind:"w"}:{widths:[...new Set([_,_*2].map(b=>C.find(w=>w>=b)||C[C.length-1]))],kind:"x"}}function p(g){let{config:_,src:v,unoptimized:x,width:C,quality:j,sizes:b,loader:w}=g;if(x)return{src:v,srcSet:void 0,sizes:void 0};const{widths:S,kind:P}=f(_,C,b),N=S.length-1;return{sizes:!b&&P==="w"?"100vw":b,srcSet:S.map((R,I)=>w({config:_,src:v,quality:j,width:R})+" "+(P==="w"?R:I+1)+P).join(", "),src:w({config:_,src:v,quality:j,width:S[N]})}}function h(g,_){let{src:v,sizes:x,unoptimized:C=!1,priority:j=!1,loading:b,className:w,quality:S,width:P,height:N,fill:R=!1,style:I,overrideSrc:O,onLoad:L,onLoadingComplete:W,placeholder:D="empty",blurDataURL:H,fetchPriority:X,decoding:te="async",layout:Z,objectFit:q,objectPosition:ee,lazyBoundary:se,lazyRoot:me,...ce}=g;const{imgConf:he,showAltText:z,blurComplete:ne,defaultLoader:T}=_;let K,ue=he||s.imageConfigDefault;if("allSizes"in ue)K=ue;else{var je;const Q=[...ue.deviceSizes,...ue.imageSizes].sort((ae,be)=>ae-be),M=ue.deviceSizes.sort((ae,be)=>ae-be),U=(je=ue.qualities)==null?void 0:je.sort((ae,be)=>ae-be);K={...ue,allSizes:Q,deviceSizes:M,qualities:U}}if(typeof T>"u")throw new Error(`images.loaderFile detected but the file is missing default export.
|
|
5
|
+
Read more: https://nextjs.org/docs/messages/invalid-images-config`);let A=ce.loader||T;delete ce.loader,delete ce.srcSet;const k="__next_img_default"in A;if(k){if(K.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 Q=A;A=M=>{const{config:U,...ae}=M;return Q(ae)}}if(Z){Z==="fill"&&(R=!0);const Q={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}},M={responsive:"100vw",fill:"100vw"},U=Q[Z];U&&(I={...I,...U});const ae=M[Z];ae&&!x&&(x=ae)}let qe="",G=m(P),Y=m(N),Ne,ze;if(c(v)){const Q=a(v)?v.default:v;if(!Q.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(Q));if(!Q.height||!Q.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(Q));if(Ne=Q.blurWidth,ze=Q.blurHeight,H=H||Q.blurDataURL,qe=Q.src,!R){if(!G&&!Y)G=Q.width,Y=Q.height;else if(G&&!Y){const M=G/Q.width;Y=Math.round(Q.height*M)}else if(!G&&Y){const M=Y/Q.height;G=Math.round(Q.width*M)}}}v=typeof v=="string"?v:qe;let Ie=!j&&(b==="lazy"||typeof b>"u");(!v||v.startsWith("data:")||v.startsWith("blob:"))&&(C=!0,Ie=!1),K.unoptimized&&(C=!0),k&&v.endsWith(".svg")&&!K.dangerouslyAllowSVG&&(C=!0),j&&(X="high");const Ce=m(S);if(process.env.NODE_ENV!=="production"){if(K.output==="export"&&k&&!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(R){if(P)throw new Error('Image with src "'+v+'" has both "width" and "fill" properties. Only one should be used.');if(N)throw new Error('Image with src "'+v+'" has both "height" and "fill" properties. Only one should be used.');if(I!=null&&I.position&&I.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(I!=null&&I.width&&I.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(I!=null&&I.height&&I.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 G>"u")throw new Error('Image with src "'+v+'" is missing required "width" property.');if(isNaN(G))throw new Error('Image with src "'+v+'" has invalid "width" property. Expected a numeric value in pixels but received "'+P+'".');if(typeof Y>"u")throw new Error('Image with src "'+v+'" is missing required "height" property.');if(isNaN(Y))throw new Error('Image with src "'+v+'" has invalid "height" property. Expected a numeric value in pixels but received "'+N+'".')}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"&&G&&Y&&G*Y<1600&&(0,t.warnOnce)('Image with src "'+v+'" is smaller than 40x40. Consider removing the "placeholder" property to improve performance.'),D==="blur"&&!H){const Q=["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: `+Q.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 S.type==="link"&&S.props.rel==="stylesheet"&&(0,
|
|
16
|
-
See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component`);return i.default.cloneElement(S,{key:N})})}function v(j){let{children:b}=j;const w=(0,i.useContext)(l.AmpStateContext),S=(0,i.useContext)(u.HeadManagerContext);return(0,o.jsx)(c.default,{reduceComponentsToState:x,headManager:S,inAmpMode:(0,m.isInAmpMode)(w),children:b})}const C=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)}(Sn,Sn.exports)),Sn.exports}var Mr={},ca;function i_(){return ca||(ca=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ImageConfigContext",{enumerable:!0,get:function(){return a}});const r=ke._(g),s=rr,a=r.default.createContext(s.imageConfigDefault);process.env.NODE_ENV!=="production"&&(a.displayName="ImageConfigContext")}(Mr)),Mr}var Dr={},Fr={},zr={exports:{}},la;function ku(){return la||(la=1,(()=>{var e={170:(a,o,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),a.exports=u},154:a=>{const o="\\\\/",i=`[^${o}]`,c="\\.",l="\\+",u="\\?",m="\\/",p="(?=.)",f="[^/]",h=`(?:${m}|$)`,_=`(?:^|${m})`,y=`${c}{1,2}${h}`,x=`(?!${c})`,v=`(?!${_}${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:x,NO_DOTS:v,NO_DOT_SLASH:C,NO_DOTS_SLASH:j,QMARK_NO_DOT:b,STAR:w,START_ANCHOR:_,SEP:"/"},N={...P,SLASH_LITERAL:`[${o}]`,QMARK:i,STAR:`${i}*?`,DOTS_SLASH:`${c}{1,2}(?:[${o}]|$)`,NO_DOT:`(?!${c})`,NO_DOTS:`(?!(?:^|[${o}])${c}{1,2}(?:[${o}]|$))`,NO_DOT_SLASH:`(?!${c}{0,1}(?:[${o}]|$))`,NO_DOTS_SLASH:`(?!${c}{1,2}(?:[${o}]|$))`,QMARK_NO_DOT:`[^.${o}]`,START_ANCHOR:`(?:^|[${o}])`,END_ANCHOR:`(?:[${o}]|$)`,SEP:"\\"},R={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"};a.exports={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:R,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(k){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${k.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(k){return k===!0?N:P}}},697:(a,o,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,_=(v,C)=>{if(typeof C.expandRange=="function")return C.expandRange(...v,C);v.sort();const j=`[${v.join("-")}]`;try{new RegExp(j)}catch{return v.map(w=>l.escapeRegex(w)).join("..")}return j},y=(v,C)=>`Missing ${v}: "${C}" - use "\\\\${C}" to match literal characters`,x=(v,C)=>{if(typeof v!="string")throw new TypeError("Expected a string");v=h[v]||v;const j={...C},b=typeof j.maxLength=="number"?Math.min(u,j.maxLength):u;let w=v.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],N=j.capture?"":"?:",R=c.globChars(j.windows),k=c.extglobChars(R),{DOT_LITERAL:O,PLUS_LITERAL:M,SLASH_LITERAL:X,ONE_CHAR:D,DOTS_SLASH:q,NO_DOT:U,NO_DOT_SLASH:Q,NO_DOTS_SLASH:G,QMARK:H,QMARK_NO_DOT:J,STAR:se,START_ANCHOR:de}=R,oe=$=>`(${N}(?:(?!${de}${$.dot?q:O}).)*?)`,le=j.dot?"":U,F=j.dot?H:J;let ee=j.bash===!0?oe(j):se;j.capture&&(ee=`(${ee})`),typeof j.noext=="boolean"&&(j.noextglob=j.noext);const E={input:v,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};v=l.removePrefix(v,E),w=v.length;const W=[],ie=[],he=[];let I=S,A;const Te=()=>E.index===w-1,V=E.peek=($=1)=>v[E.index+$],Y=E.advance=()=>v[++E.index]||"",be=()=>v.slice(E.index+1),Ie=($="",K=0)=>{E.consumed+=$,E.index+=K},je=$=>{E.output+=$.output!=null?$.output:$.value,Ie($.value)},ge=()=>{let $=1;for(;V()==="!"&&(V(2)!=="("||V(3)==="?");)Y(),E.start++,$++;return $%2===0?!1:(E.negated=!0,E.start++,!0)},Ae=$=>{E[$]++,he.push($)},Ce=$=>{E[$]--,he.pop()},z=$=>{if(I.type==="globstar"){const K=E.braces>0&&($.type==="comma"||$.type==="brace"),L=$.extglob===!0||W.length&&($.type==="pipe"||$.type==="paren");$.type!=="slash"&&$.type!=="paren"&&!K&&!L&&(E.output=E.output.slice(0,-I.output.length),I.type="star",I.value="*",I.output=ee,E.output+=I.output)}if(W.length&&$.type!=="paren"&&(W[W.length-1].inner+=$.value),($.value||$.output)&&je($),I&&I.type==="text"&&$.type==="text"){I.output=(I.output||I.value)+$.value,I.value+=$.value;return}$.prev=I,P.push($),I=$},pe=($,K)=>{const L={...k[K],conditions:1,inner:""};L.prev=I,L.parens=E.parens,L.output=E.output;const B=(j.capture?"(":"")+L.open;Ae("parens"),z({type:$,value:K,output:E.output?"":D}),z({type:"paren",extglob:!0,value:Y(),output:B}),W.push(L)},ye=$=>{let K=$.close+(j.capture?")":""),L;if($.type==="negate"){let B=ee;if($.inner&&$.inner.length>1&&$.inner.includes("/")&&(B=oe(j)),(B!==ee||Te()||/^\)+$/.test(be()))&&(K=$.close=`)$))${B}`),$.inner.includes("*")&&(L=be())&&/^\.[^\\/.]+$/.test(L)){const te=x(L,{...C,fastpaths:!1}).output;K=$.close=`)${te})${B})`}$.prev.type==="bos"&&(E.negatedExtglob=!0)}z({type:"paren",extglob:!0,value:A,output:K}),Ce("parens")};if(j.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(v)){let $=!1,K=v.replace(f,(L,B,te,_e,Ee,cr)=>_e==="\\"?($=!0,L):_e==="?"?B?B+_e+(Ee?H.repeat(Ee.length):""):cr===0?F+(Ee?H.repeat(Ee.length):""):H.repeat(te.length):_e==="."?O.repeat(te.length):_e==="*"?B?B+_e+(Ee?ee:""):ee:B?L:`\\${L}`);return $===!0&&(j.unescape===!0?K=K.replace(/\\/g,""):K=K.replace(/\\+/g,L=>L.length%2===0?"\\\\":L?"\\":"")),K===v&&j.contains===!0?(E.output=v,E):(E.output=l.wrapOutput(K,E,C),E)}for(;!Te();){if(A=Y(),A==="\0")continue;if(A==="\\"){const L=V();if(L==="/"&&j.bash!==!0||L==="."||L===";")continue;if(!L){A+="\\",z({type:"text",value:A});continue}const B=/^\\+/.exec(be());let te=0;if(B&&B[0].length>2&&(te=B[0].length,E.index+=te,te%2!==0&&(A+="\\")),j.unescape===!0?A=Y():A+=Y(),E.brackets===0){z({type:"text",value:A});continue}}if(E.brackets>0&&(A!=="]"||I.value==="["||I.value==="[^")){if(j.posix!==!1&&A===":"){const L=I.value.slice(1);if(L.includes("[")&&(I.posix=!0,L.includes(":"))){const B=I.value.lastIndexOf("["),te=I.value.slice(0,B),_e=I.value.slice(B+2),Ee=m[_e];if(Ee){I.value=te+Ee,E.backtrack=!0,Y(),!S.output&&P.indexOf(I)===1&&(S.output=D);continue}}}(A==="["&&V()!==":"||A==="-"&&V()==="]")&&(A=`\\${A}`),A==="]"&&(I.value==="["||I.value==="[^")&&(A=`\\${A}`),j.posix===!0&&A==="!"&&I.value==="["&&(A="^"),I.value+=A,je({value:A});continue}if(E.quotes===1&&A!=='"'){A=l.escapeRegex(A),I.value+=A,je({value:A});continue}if(A==='"'){E.quotes=E.quotes===1?0:1,j.keepQuotes===!0&&z({type:"text",value:A});continue}if(A==="("){Ae("parens"),z({type:"paren",value:A});continue}if(A===")"){if(E.parens===0&&j.strictBrackets===!0)throw new SyntaxError(y("opening","("));const L=W[W.length-1];if(L&&E.parens===L.parens+1){ye(W.pop());continue}z({type:"paren",value:A,output:E.parens?")":"\\)"}),Ce("parens");continue}if(A==="["){if(j.nobracket===!0||!be().includes("]")){if(j.nobracket!==!0&&j.strictBrackets===!0)throw new SyntaxError(y("closing","]"));A=`\\${A}`}else Ae("brackets");z({type:"bracket",value:A});continue}if(A==="]"){if(j.nobracket===!0||I&&I.type==="bracket"&&I.value.length===1){z({type:"text",value:A,output:`\\${A}`});continue}if(E.brackets===0){if(j.strictBrackets===!0)throw new SyntaxError(y("opening","["));z({type:"text",value:A,output:`\\${A}`});continue}Ce("brackets");const L=I.value.slice(1);if(I.posix!==!0&&L[0]==="^"&&!L.includes("/")&&(A=`/${A}`),I.value+=A,je({value:A}),j.literalBrackets===!1||l.hasRegexChars(L))continue;const B=l.escapeRegex(I.value);if(E.output=E.output.slice(0,-I.value.length),j.literalBrackets===!0){E.output+=B,I.value=B;continue}I.value=`(${N}${B}|${I.value})`,E.output+=I.value;continue}if(A==="{"&&j.nobrace!==!0){Ae("braces");const L={type:"brace",value:A,output:"(",outputIndex:E.output.length,tokensIndex:E.tokens.length};ie.push(L),z(L);continue}if(A==="}"){const L=ie[ie.length-1];if(j.nobrace===!0||!L){z({type:"text",value:A,output:A});continue}let B=")";if(L.dots===!0){const te=P.slice(),_e=[];for(let Ee=te.length-1;Ee>=0&&(P.pop(),te[Ee].type!=="brace");Ee--)te[Ee].type!=="dots"&&_e.unshift(te[Ee].value);B=_(_e,j),E.backtrack=!0}if(L.comma!==!0&&L.dots!==!0){const te=E.output.slice(0,L.outputIndex),_e=E.tokens.slice(L.tokensIndex);L.value=L.output="\\{",A=B="\\}",E.output=te;for(const Ee of _e)E.output+=Ee.output||Ee.value}z({type:"brace",value:A,output:B}),Ce("braces"),ie.pop();continue}if(A==="|"){W.length>0&&W[W.length-1].conditions++,z({type:"text",value:A});continue}if(A===","){let L=A;const B=ie[ie.length-1];B&&he[he.length-1]==="braces"&&(B.comma=!0,L="|"),z({type:"comma",value:A,output:L});continue}if(A==="/"){if(I.type==="dot"&&E.index===E.start+1){E.start=E.index+1,E.consumed="",E.output="",P.pop(),I=S;continue}z({type:"slash",value:A,output:X});continue}if(A==="."){if(E.braces>0&&I.type==="dot"){I.value==="."&&(I.output=O);const L=ie[ie.length-1];I.type="dots",I.output+=A,I.value+=A,L.dots=!0;continue}if(E.braces+E.parens===0&&I.type!=="bos"&&I.type!=="slash"){z({type:"text",value:A,output:O});continue}z({type:"dot",value:A,output:O});continue}if(A==="?"){if(!(I&&I.value==="(")&&j.noextglob!==!0&&V()==="("&&V(2)!=="?"){pe("qmark",A);continue}if(I&&I.type==="paren"){const B=V();let te=A;(I.value==="("&&!/[!=<:]/.test(B)||B==="<"&&!/<([!=]|\w+>)/.test(be()))&&(te=`\\${A}`),z({type:"text",value:A,output:te});continue}if(j.dot!==!0&&(I.type==="slash"||I.type==="bos")){z({type:"qmark",value:A,output:J});continue}z({type:"qmark",value:A,output:H});continue}if(A==="!"){if(j.noextglob!==!0&&V()==="("&&(V(2)!=="?"||!/[!=<:]/.test(V(3)))){pe("negate",A);continue}if(j.nonegate!==!0&&E.index===0){ge();continue}}if(A==="+"){if(j.noextglob!==!0&&V()==="("&&V(2)!=="?"){pe("plus",A);continue}if(I&&I.value==="("||j.regex===!1){z({type:"plus",value:A,output:M});continue}if(I&&(I.type==="bracket"||I.type==="paren"||I.type==="brace")||E.parens>0){z({type:"plus",value:A});continue}z({type:"plus",value:M});continue}if(A==="@"){if(j.noextglob!==!0&&V()==="("&&V(2)!=="?"){z({type:"at",extglob:!0,value:A,output:""});continue}z({type:"text",value:A});continue}if(A!=="*"){(A==="$"||A==="^")&&(A=`\\${A}`);const L=p.exec(be());L&&(A+=L[0],E.index+=L[0].length),z({type:"text",value:A});continue}if(I&&(I.type==="globstar"||I.star===!0)){I.type="star",I.star=!0,I.value+=A,I.output=ee,E.backtrack=!0,E.globstar=!0,Ie(A);continue}let $=be();if(j.noextglob!==!0&&/^\([^?]/.test($)){pe("star",A);continue}if(I.type==="star"){if(j.noglobstar===!0){Ie(A);continue}const L=I.prev,B=L.prev,te=L.type==="slash"||L.type==="bos",_e=B&&(B.type==="star"||B.type==="globstar");if(j.bash===!0&&(!te||$[0]&&$[0]!=="/")){z({type:"star",value:A,output:""});continue}const Ee=E.braces>0&&(L.type==="comma"||L.type==="brace"),cr=W.length&&(L.type==="pipe"||L.type==="paren");if(!te&&L.type!=="paren"&&!Ee&&!cr){z({type:"star",value:A,output:""});continue}for(;$.slice(0,3)==="/**";){const dn=v[E.index+4];if(dn&&dn!=="/")break;$=$.slice(3),Ie("/**",3)}if(L.type==="bos"&&Te()){I.type="globstar",I.value+=A,I.output=oe(j),E.output=I.output,E.globstar=!0,Ie(A);continue}if(L.type==="slash"&&L.prev.type!=="bos"&&!_e&&Te()){E.output=E.output.slice(0,-(L.output+I.output).length),L.output=`(?:${L.output}`,I.type="globstar",I.output=oe(j)+(j.strictSlashes?")":"|$)"),I.value+=A,E.globstar=!0,E.output+=L.output+I.output,Ie(A);continue}if(L.type==="slash"&&L.prev.type!=="bos"&&$[0]==="/"){const dn=$[1]!==void 0?"|$":"";E.output=E.output.slice(0,-(L.output+I.output).length),L.output=`(?:${L.output}`,I.type="globstar",I.output=`${oe(j)}${X}|${X}${dn})`,I.value+=A,E.output+=L.output+I.output,E.globstar=!0,Ie(A+Y()),z({type:"slash",value:"/",output:""});continue}if(L.type==="bos"&&$[0]==="/"){I.type="globstar",I.value+=A,I.output=`(?:^|${X}|${oe(j)}${X})`,E.output=I.output,E.globstar=!0,Ie(A+Y()),z({type:"slash",value:"/",output:""});continue}E.output=E.output.slice(0,-I.output.length),I.type="globstar",I.output=oe(j),I.value+=A,E.output+=I.output,E.globstar=!0,Ie(A);continue}const K={type:"star",value:A,output:ee};if(j.bash===!0){K.output=".*?",(I.type==="bos"||I.type==="slash")&&(K.output=le+K.output),z(K);continue}if(I&&(I.type==="bracket"||I.type==="paren")&&j.regex===!0){K.output=A,z(K);continue}(E.index===E.start||I.type==="slash"||I.type==="dot")&&(I.type==="dot"?(E.output+=Q,I.output+=Q):j.dot===!0?(E.output+=G,I.output+=G):(E.output+=le,I.output+=le),V()!=="*"&&(E.output+=D,I.output+=D)),z(K)}for(;E.brackets>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing","]"));E.output=l.escapeLast(E.output,"["),Ce("brackets")}for(;E.parens>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing",")"));E.output=l.escapeLast(E.output,"("),Ce("parens")}for(;E.braces>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing","}"));E.output=l.escapeLast(E.output,"{"),Ce("braces")}if(j.strictSlashes!==!0&&(I.type==="star"||I.type==="bracket")&&z({type:"maybe_slash",value:"",output:`${X}?`}),E.backtrack===!0){E.output="";for(const $ of E.tokens)E.output+=$.output!=null?$.output:$.value,$.suffix&&(E.output+=$.suffix)}return E};x.fastpaths=(v,C)=>{const j={...C},b=typeof j.maxLength=="number"?Math.min(u,j.maxLength):u,w=v.length;if(w>b)throw new SyntaxError(`Input length: ${w}, exceeds maximum allowed length: ${b}`);v=h[v]||v;const{DOT_LITERAL:S,SLASH_LITERAL:P,ONE_CHAR:N,DOTS_SLASH:R,NO_DOT:k,NO_DOTS:O,NO_DOTS_SLASH:M,STAR:X,START_ANCHOR:D}=c.globChars(j.windows),q=j.dot?O:k,U=j.dot?M:k,Q=j.capture?"":"?:",G={negated:!1,prefix:""};let H=j.bash===!0?".*?":X;j.capture&&(H=`(${H})`);const J=le=>le.noglobstar===!0?H:`(${Q}(?:(?!${D}${le.dot?R:S}).)*?)`,se=le=>{switch(le){case"*":return`${q}${N}${H}`;case".*":return`${S}${N}${H}`;case"*.*":return`${q}${H}${S}${N}${H}`;case"*/*":return`${q}${H}${P}${N}${U}${H}`;case"**":return q+J(j);case"**/*":return`(?:${q}${J(j)}${P})?${U}${N}${H}`;case"**/*.*":return`(?:${q}${J(j)}${P})?${U}${H}${S}${N}${H}`;case"**/.*":return`(?:${q}${J(j)}${P})?${S}${N}${H}`;default:{const F=/^(.*?)\.(\w+)$/.exec(le);if(!F)return;const ee=se(F[1]);return ee?ee+S+F[2]:void 0}}},de=l.removePrefix(v,G);let oe=se(de);return oe&&j.strictSlashes!==!0&&(oe+=`${P}?`),oe},a.exports=x},510:(a,o,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(R=>f(R,_,y));return R=>{for(const k of P){const O=k(R);if(O)return O}return!1}}const x=p(h)&&h.tokens&&h.input;if(h===""||typeof h!="string"&&!x)throw new TypeError("Expected pattern to be a non-empty string");const v=_||{},C=v.windows,j=x?f.compileRe(h,_):f.makeRe(h,_,!1,!0),b=j.state;delete j.state;let w=()=>!1;if(v.ignore){const P={..._,ignore:null,onMatch:null,onResult:null};w=f(v.ignore,P,y)}const S=(P,N=!1)=>{const{isMatch:R,match:k,output:O}=f.test(P,j,_,{glob:h,posix:C}),M={glob:h,state:b,regex:j,posix:C,input:P,output:O,match:k,isMatch:R};return typeof v.onResult=="function"&&v.onResult(M),R===!1?(M.isMatch=!1,N?M:!1):w(P)?(typeof v.onIgnore=="function"&&v.onIgnore(M),M.isMatch=!1,N?M:!1):(typeof v.onMatch=="function"&&v.onMatch(M),N?M:!0)};return y&&(S.state=b),S};f.test=(h,_,y,{glob:x,posix:v}={})=>{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||(v?u.toPosixSlashes:null);let b=h===x,w=b&&j?j(h):h;return b===!1&&(w=j?j(h):h,b=w===x),(b===!1||C.capture===!0)&&(C.matchBase===!0||C.basename===!0?b=f.matchBase(h,_,y,v):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,x=!1)=>{if(y===!0)return h.output;const v=_||{},C=v.contains?"":"^",j=v.contains?"":"$";let b=`${C}(?:${h.output})${j}`;h&&h.negated===!0&&(b=`^(?!${b}).*$`);const w=f.toRegex(b,_);return x===!0&&(w.state=h),w},f.makeRe=(h,_={},y=!1,x=!1)=>{if(!h||typeof h!="string")throw new TypeError("Expected a non-empty string");let v={negated:!1,fastpaths:!0};return _.fastpaths!==!1&&(h[0]==="."||h[0]==="*")&&(v.output=l.fastpaths(h,_)),v.output||(v=l(h,_)),f.compileRe(v,_,y,x)},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,a.exports=f},716:(a,o,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:x,CHAR_LEFT_SQUARE_BRACKET:v,CHAR_PLUS:C,CHAR_QUESTION_MARK:j,CHAR_RIGHT_CURLY_BRACE:b,CHAR_RIGHT_PARENTHESES:w,CHAR_RIGHT_SQUARE_BRACKET:S}=i(154),P=k=>k===_||k===m,N=k=>{k.isPrefix!==!0&&(k.depth=k.isGlobstar?1/0:1)},R=(k,O)=>{const M=O||{},X=k.length-1,D=M.parts===!0||M.scanToEnd===!0,q=[],U=[],Q=[];let G=k,H=-1,J=0,se=0,de=!1,oe=!1,le=!1,F=!1,ee=!1,E=!1,W=!1,ie=!1,he=!1,I=!1,A=0,Te,V,Y={value:"",depth:0,isGlob:!1};const be=()=>H>=X,Ie=()=>G.charCodeAt(H+1),je=()=>(Te=V,G.charCodeAt(++H));for(;H<X;){V=je();let pe;if(V===m){W=Y.backslashes=!0,V=je(),V===y&&(E=!0);continue}if(E===!0||V===y){for(A++;be()!==!0&&(V=je());){if(V===m){W=Y.backslashes=!0,je();continue}if(V===y){A++;continue}if(E!==!0&&V===f&&(V=je())===f){if(de=Y.isBrace=!0,le=Y.isGlob=!0,I=!0,D===!0)continue;break}if(E!==!0&&V===p){if(de=Y.isBrace=!0,le=Y.isGlob=!0,I=!0,D===!0)continue;break}if(V===b&&(A--,A===0)){E=!1,de=Y.isBrace=!0,I=!0;break}}if(D===!0)continue;break}if(V===_){if(q.push(H),U.push(Y),Y={value:"",depth:0,isGlob:!1},I===!0)continue;if(Te===f&&H===J+1){J+=2;continue}se=H+1;continue}if(M.noext!==!0&&(V===C||V===u||V===l||V===j||V===h)===!0&&Ie()===x){if(le=Y.isGlob=!0,F=Y.isExtglob=!0,I=!0,V===h&&H===J&&(he=!0),D===!0){for(;be()!==!0&&(V=je());){if(V===m){W=Y.backslashes=!0,V=je();continue}if(V===w){le=Y.isGlob=!0,I=!0;break}}continue}break}if(V===l){if(Te===l&&(ee=Y.isGlobstar=!0),le=Y.isGlob=!0,I=!0,D===!0)continue;break}if(V===j){if(le=Y.isGlob=!0,I=!0,D===!0)continue;break}if(V===v){for(;be()!==!0&&(pe=je());){if(pe===m){W=Y.backslashes=!0,je();continue}if(pe===S){oe=Y.isBracket=!0,le=Y.isGlob=!0,I=!0;break}}if(D===!0)continue;break}if(M.nonegate!==!0&&V===h&&H===J){ie=Y.negated=!0,J++;continue}if(M.noparen!==!0&&V===x){if(le=Y.isGlob=!0,D===!0){for(;be()!==!0&&(V=je());){if(V===x){W=Y.backslashes=!0,V=je();continue}if(V===w){I=!0;break}}continue}break}if(le===!0){if(I=!0,D===!0)continue;break}}M.noext===!0&&(F=!1,le=!1);let ge=G,Ae="",Ce="";J>0&&(Ae=G.slice(0,J),G=G.slice(J),se-=J),ge&&le===!0&&se>0?(ge=G.slice(0,se),Ce=G.slice(se)):le===!0?(ge="",Ce=G):ge=G,ge&&ge!==""&&ge!=="/"&&ge!==G&&P(ge.charCodeAt(ge.length-1))&&(ge=ge.slice(0,-1)),M.unescape===!0&&(Ce&&(Ce=c.removeBackslashes(Ce)),ge&&W===!0&&(ge=c.removeBackslashes(ge)));const z={prefix:Ae,input:k,start:J,base:ge,glob:Ce,isBrace:de,isBracket:oe,isGlob:le,isExtglob:F,isGlobstar:ee,negated:ie,negatedExtglob:he};if(M.tokens===!0&&(z.maxDepth=0,P(V)||U.push(Y),z.tokens=U),M.parts===!0||M.tokens===!0){let pe;for(let ye=0;ye<q.length;ye++){const $=pe?pe+1:J,K=q[ye],L=k.slice($,K);M.tokens&&(ye===0&&J!==0?(U[ye].isPrefix=!0,U[ye].value=Ae):U[ye].value=L,N(U[ye]),z.maxDepth+=U[ye].depth),(ye!==0||L!=="")&&Q.push(L),pe=K}if(pe&&pe+1<k.length){const ye=k.slice(pe+1);Q.push(ye),M.tokens&&(U[U.length-1].value=ye,N(U[U.length-1]),z.maxDepth+=U[U.length-1].depth)}z.slashes=q,z.parts=Q}return z};a.exports=R},96:(a,o,i)=>{const{REGEX_BACKSLASH:c,REGEX_REMOVE_BACKSLASH:l,REGEX_SPECIAL_CHARS:u,REGEX_SPECIAL_CHARS_GLOBAL:m}=i(154);o.isObject=p=>p!==null&&typeof p=="object"&&!Array.isArray(p),o.hasRegexChars=p=>u.test(p),o.isRegexChar=p=>p.length===1&&o.hasRegexChars(p),o.escapeRegex=p=>p.replace(m,"\\$1"),o.toPosixSlashes=p=>p.replace(c,"/"),o.removeBackslashes=p=>p.replace(l,f=>f==="\\"?"":f),o.escapeLast=(p,f,h)=>{const _=p.lastIndexOf(f,h);return _===-1?p:p[_-1]==="\\"?o.escapeLast(p,f,_-1):`${p.slice(0,_)}\\${p.slice(_)}`},o.removePrefix=(p,f={})=>{let h=p;return h.startsWith("./")&&(h=h.slice(2),f.prefix="./"),h},o.wrapOutput=(p,f={},h={})=>{const _=h.contains?"":"^",y=h.contains?"":"$";let x=`${_}(?:${p})${y}`;return f.negated===!0&&(x=`(?:^(?!${x}).*$)`),x},o.basename=(p,{windows:f}={})=>{const h=p.split(f?/[\\/]/:"/"),_=h[h.length-1];return _===""?h[h.length-2]:_}}},t={};function r(a){var o=t[a];if(o!==void 0)return o.exports;var i=t[a]={exports:{}},c=!0;try{e[a](i,i.exports,r),c=!1}finally{c&&delete t[a]}return i.exports}typeof r<"u"&&(r.ab=__dirname+"/");var s=r(170);zr.exports=s})()),zr.exports}var ua;function c_(){return ua||(ua=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(o,i){for(var c in i)Object.defineProperty(o,c,{enumerable:!0,get:i[c]})}t(e,{hasLocalMatch:function(){return a},matchLocalPattern:function(){return s}});const r=ku();function s(o,i){if(o.search!==void 0&&o.search!==i.search)return!1;var c;return!!(0,r.makeRe)((c=o.pathname)!=null?c:"**",{dot:!0}).test(i.pathname)}function a(o,i){if(!o)return!0;const c=new URL(i,"http://n");return o.some(l=>s(l,c))}}(Fr)),Fr}var Br={},da;function l_(){return da||(da=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(o,i){for(var c in i)Object.defineProperty(o,c,{enumerable:!0,get:i[c]})}t(e,{hasRemoteMatch:function(){return a},matchRemotePattern:function(){return s}});const r=ku();function s(o,i){if(o.protocol!==void 0){const l=i.protocol.slice(0,-1);if(o.protocol!==l)return!1}if(o.port!==void 0&&o.port!==i.port)return!1;if(o.hostname===void 0)throw new Error(`Pattern should define hostname but found
|
|
17
|
-
`+JSON.stringify(o));if(!(0,r.makeRe)(o.hostname).test(i.hostname)||o.search!==void 0&&o.search!==i.search)return!1;var c;return!!(0,r.makeRe)((c=o.pathname)!=null?c:"**",{dot:!0}).test(i.pathname)}function a(o,i,c){return o.some(l=>c.hostname===l)||i.some(l=>s(l,c))}}(Br)),Br}var ma;function Ou(){return ma||(ma=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return s}});const t=75;function r(a){let{config:o,src:i,width:c,quality:l}=a;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("/")&&o.localPatterns&&process.env.NODE_ENV!=="test"&&process.env.NEXT_RUNTIME!=="edge"){const{hasLocalMatch:f}=c_();if(!f(o.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("/")&&(o.domains||o.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}=l_();if(!h(o.domains,o.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&&o.qualities&&!o.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=o.qualities)==null?void 0:u.reduce((p,f)=>Math.abs(f-t)<Math.abs(p-t)?f:p))||t;return o.path+"?url="+encodeURIComponent(i)+"&w="+c+"&q="+m+(process.env.NEXT_DEPLOYMENT_ID?"&dpl="+process.env.NEXT_DEPLOYMENT_ID:"")}r.__next_img_default=!0;const s=r}(Dr)),Dr}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return j}});const r=ke,s=jt,a=n,o=s._(g),i=r._(ws),c=r._(a_()),l=ro,u=rr,m=i_(),p=nr,f=Ic(),h=r._(Ou()),_=process.env.__NEXT_IMAGE_OPTS;typeof window>"u"&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);function y(b,w,S,P,N,R,k){const O=b==null?void 0:b.src;if(!b||b["data-loaded-src"]===O)return;b["data-loaded-src"]=O,("decode"in b?b.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(!(!b.parentElement||!b.isConnected)){if(w!=="empty"&&N(!0),S!=null&&S.current){const X=new Event("load");Object.defineProperty(X,"target",{writable:!1,value:b});let D=!1,q=!1;S.current({...X,nativeEvent:X,currentTarget:b,target:b,isDefaultPrevented:()=>D,isPropagationStopped:()=>q,persist:()=>{},preventDefault:()=>{D=!0,X.preventDefault()},stopPropagation:()=>{q=!0,X.stopPropagation()}})}if(P!=null&&P.current&&P.current(b),process.env.NODE_ENV!=="production"){const X=new URL(O,"http://n").searchParams.get("url")||O;if(b.getAttribute("data-nimg")==="fill"){if(!R&&(!k||k==="100vw")&&b.getBoundingClientRect().width/window.innerWidth<.6&&(k==="100vw"?(0,p.warnOnce)('Image with src "'+X+'" 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 "'+X+'" 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),Q=["absolute","fixed","relative"];Q.includes(U)||(0,p.warnOnce)('Image with src "'+X+'" has "fill" and parent element with invalid "position". Provided "'+U+'" should be one of '+Q.map(String).join(",")+".")}b.height===0&&(0,p.warnOnce)('Image with src "'+X+'" 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 "'+X+`" 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(b){return o.use?{fetchPriority:b}:{fetchpriority:b}}const v=(0,o.forwardRef)((b,w)=>{let{src:S,srcSet:P,sizes:N,height:R,width:k,decoding:O,className:M,style:X,fetchPriority:D,placeholder:q,loading:U,unoptimized:Q,fill:G,onLoadRef:H,onLoadingCompleteRef:J,setBlurComplete:se,setShowAltText:de,sizesInput:oe,onLoad:le,onError:F,...ee}=b;return(0,a.jsx)("img",{...ee,...x(D),loading:U,width:k,height:R,decoding:O,"data-nimg":G?"fill":"1",className:M,style:X,sizes:N,srcSet:P,src:S,ref:(0,o.useCallback)(E=>{w&&(typeof w=="function"?w(E):typeof w=="object"&&(w.current=E)),E&&(F&&(E.src=E.src),process.env.NODE_ENV!=="production"&&(S||console.error('Image is missing required "src" property:',E),E.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.')),E.complete&&y(E,q,H,J,se,Q,oe))},[S,q,H,J,se,F,Q,oe,w]),onLoad:E=>{const W=E.currentTarget;y(W,q,H,J,se,Q,oe)},onError:E=>{de(!0),q!=="empty"&&se(!0),F&&F(E)}})});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,...x(S.fetchPriority)};return w&&i.default.preload?(i.default.preload(S.src,P),null):(0,a.jsx)(c.default,{children:(0,a.jsx)("link",{rel:"preload",href:S.srcSet?void 0:S.src,...P},"__nimg-"+S.src+S.srcSet+S.sizes)})}const j=(0,o.forwardRef)((b,w)=>{const P=!(0,o.useContext)(f.RouterContext),N=(0,o.useContext)(m.ImageConfigContext),R=(0,o.useMemo)(()=>{var J;const se=_||N||u.imageConfigDefault,de=[...se.deviceSizes,...se.imageSizes].sort((F,ee)=>F-ee),oe=se.deviceSizes.sort((F,ee)=>F-ee),le=(J=se.qualities)==null?void 0:J.sort((F,ee)=>F-ee);return{...se,allSizes:de,deviceSizes:oe,qualities:le}},[N]),{onLoad:k,onLoadingComplete:O}=b,M=(0,o.useRef)(k);(0,o.useEffect)(()=>{M.current=k},[k]);const X=(0,o.useRef)(O);(0,o.useEffect)(()=>{X.current=O},[O]);const[D,q]=(0,o.useState)(!1),[U,Q]=(0,o.useState)(!1),{props:G,meta:H}=(0,l.getImgProps)(b,{defaultLoader:h.default,imgConf:R,blurComplete:D,showAltText:U});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v,{...G,unoptimized:H.unoptimized,placeholder:H.placeholder,fill:H.fill,onLoadRef:M,onLoadingCompleteRef:X,setBlurComplete:q,setShowAltText:Q,sizesInput:b.sizes,ref:w}),H.priority?(0,a.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)})(as,as.exports);var u_=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 r=ke,s=ro,a=u_,o=r._(Ou());function i(l){const{props:u}=(0,s.getImgProps)(l,{defaultLoader:o.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=a.Image})(Ru);var d_=Ru;const en=T.getDefaultExportFromCjs(d_),m_=({item:e,CONSTANTS:t})=>{const r=e.icon?t.PAYMENT_FLAGS.includes(e.icon)?"payment":"social":null,s=r==="payment"?t.PAYMENT_FLAGS_DICTIONARY[e.icon]:e.icon;return e.link?n.jsxs(Fe,{href:e.link,target:"_blank",rel:"noopener noreferrer",className:me["support-item"],children:[e.image&&n.jsx("img",{src:e.image,alt:"",loading:"lazy"}),r==="payment"?n.jsx(en,{alt:s,src:`/assets/${s}.svg`,width:20,height:20}):n.jsx(d.Icon,{size:"small",name:s})]}):n.jsxs("div",{className:me["support-item"],children:[e.image&&n.jsx("img",{src:e.image,alt:"",loading:"lazy"}),r==="payment"?n.jsx(en,{alt:s,src:`/assets/${s}.svg`,width:20,height:20}):n.jsx(d.Icon,{size:"small",name:s})]})},p_=({content:e,CONSTANTS:t})=>n.jsx("div",{className:me["support-container"],children:e==null?void 0:e.map((r,s)=>n.jsxs("div",{"data-device":r.device,className:me["support-section"],children:[n.jsxs("div",{className:me["support-text"],children:[r.title&&n.jsx("h3",{children:r.title}),r.description&&n.jsx("p",{children:r.description})]}),Array.isArray(r.items)&&r.items.length&&n.jsx("div",{className:me["support-items"],"data-gap":r.gap,children:r.items.map((a,o)=>n.jsx(m_,{item:a,CONSTANTS:t},`footer-support-item-${o}`))})]},`footer-support-${s}`))}),f_=({name:e,nameIcon:t,maxWidth:r,rowAlignContent:s,columnAlignContent:a,columnAlignItems:o,textAlignContent:i,textAlignItems:c,children:l})=>n.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:s,alignItems:s},columnWrapper:{alignContent:a,alignItems:o}},children:n.jsxs(d.TextStructure.DivWrapper,{alignContent:i,alignItems:c,className:me.footer__column,children:[n.jsxs("div",{className:t?me.footer__columnTitleIcon:me.footer__columnTitle,children:[n.jsx(d.Icon,{name:`${t}`,size:"small"}),e&&n.jsx("div",{children:e})]}),n.jsx("div",{className:me.footer__columnContent,style:{maxWidth:`${r}px`},children:l})]})}),h_=({name:e,nameIcon:t,maxWidth:r,children:s,ICONS:a,...o})=>n.jsxs(d.Accordion.Wrapper,{className:me.accordionWrapper,title:"accordion-wrapper",...o,children:[n.jsx(d.Accordion.Header,{id:(o==null?void 0:o.id)??"",className:me.accordionHeader,closeIndicator:n.jsx(d.Icon,{name:a.arrow_up,size:"medium"}),openIndicator:n.jsx(d.Icon,{name:a.arrow_down,size:"medium"}),title:"accordion-header",children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{className:t?me.accordionTextWrapper:"",children:[n.jsx(d.Icon,{name:`${t}`,size:"medium"}),n.jsx("h2",{className:"typography-style-body-md",children:e})]})})}),n.jsx(d.Accordion.Body,{title:"accordion-body",children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:me.footer__columnContent,style:{maxWidth:`${r}px`},children:s})})})]}),Ur=e=>{const{isMobile:t}=ne();return t?n.jsx(h_,{...e}):n.jsx(f_,{...e})},Pn=({type:e,children:t,className:r,collumnName:s,collumnNameIcon:a,icons:o,iconLink:i,iconSize:c,link:l,paymentDisclaimer:u,paymentTitle:m,rowAlignContent:p,columnAlignContent:f,columnAlignItems:h,textAlignContent:_,textAlignItems:y,...x})=>{let v;const{handleSelectContent:C}=ae(),{nextimage:j}=ce();switch(e){case"menu":v=n.jsx(Fe,{className:me.footer__itemLink,href:l??"#",prefetch:!1,children:n.jsx("span",{onClick:()=>{C({content:`footer:${s}:${t}`})},children:t})});break;case"payment":v=n.jsxs("div",{className:d.helpers.classNameConcat(me.payment,me.footer__itemSmallText),...x,children:[u,n.jsxs("div",{className:d.helpers.classNameConcat(me.footer__iconContainer,me.footer__iconListSubHeader),children:[m,n.jsx("div",{className:me.footer__iconList,children:o==null?void 0:o.map((b,w)=>n.jsx(j,{alt:b,src:`/assets/${b}.svg`,width:c??20,height:c??20},w))})]})]});break;case"social-media":v=n.jsx("div",{className:me.footer__iconContainer,...x,children:n.jsx("div",{className:me.footer__iconList,children:i==null?void 0:i.map((b,w)=>n.jsx(Fe,{prefetch:!1,href:b.link??"#",target:"_blank",children:n.jsx(d.Icon,{size:"medium",name:b.icon,onClick:()=>C({content:`footer:redes-sociais:${b.icon}`})})},w))})});break;default:v=n.jsx("div",{className:r,...x,children:t})}return n.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:p,alignItems:p},columnWrapper:{alignContent:f,alignItems:h}},...x,children:n.jsx(d.TextStructure.DivWrapper,{alignContent:_,alignItems:y,className:d.helpers.classNameConcat(me.footer__item,r),children:v})})},__=({className:e,text:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat(me.footer__legalInformation,e),children:n.jsx("span",{children:t})}),Lu=()=>{const{nextimage:e}=ce();return n.jsx("div",{className:me["footer--stamps"],children:n.jsx(e,{alt:"Empresa B",className:me["footer--stamps--company"],src:"/images/Footer/new_certfB.png",width:56,height:64})})};Lu.displayName="Footer.Stamps";const Mu=({children:e,legalTextSlot:t,adornment:r,className:s,...a})=>{const{isMobile:o}=ne(),i=g.Children.toArray(e).filter(Boolean),c=i.length;return n.jsxs("div",{className:me.footer__main,children:[(r==null?void 0:r.top)&&n.jsx("div",{className:me.footer__top,children:r==null?void 0:r.top}),c>0&&n.jsx("div",{...a,className:d.helpers.classNameConcat(me.footer__wrapper,s),children:i.map((l,u)=>n.jsx("div",{style:{flexGrow:1,maxWidth:`calc(100% / ${o?1:"fit-content"})`},children:l},u))}),(r==null?void 0:r.bottom)&&n.jsx("div",{className:me.footer__bottom,children:r.bottom}),t&&n.jsx("div",{className:me.footer__legalText,children:t})]})};Mu.displayName="Footer.Wrapper";const Du=({data:{links:{links:e}},payments:t,socialInfo:r,socialMedias:s,adornment:a,LEGAL_INFORMATION_TEXT:o,ICONS:i,className:c,hasFooterStamps:l})=>{var u;return n.jsxs(Mu,{className:c,adornment:a,legalTextSlot:n.jsx(__,{text:o}),children:[Array.isArray(e.column)&&e.column.map((m,p)=>n.jsx(Ur,{id:`${p}column-menu`,name:m.name,nameIcon:m.nameIcon,ICONS:i,children:m.items.map((f,h)=>n.jsx(Pn,{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&&n.jsx(Ur,{id:"payment-column",name:t==null?void 0:t.title,nameIcon:t==null?void 0:t.titleIcon,maxWidth:150,ICONS:i,children:n.jsx(Pn,{type:"payment",paymentDisclaimer:t==null?void 0:t.text,paymentTitle:t==null?void 0:t.flagsTitle,iconSize:16,icons:t==null?void 0:t.acceptedFlags})}),n.jsxs(Ur,{id:"social-media-column",name:r==null?void 0:r.title,ICONS:i,children:[r!=null&&r.subTitle?n.jsx(Pn,{children:r==null?void 0:r.subTitle}):null,n.jsx(Pn,{type:"social-media",iconSize:24,iconLink:s}),l&&n.jsx(Lu,{})]})]})};Du.displayName="Footer";const g_=Object.freeze(Object.defineProperty({__proto__:null,Footer:Du,FooterSupport:p_},Symbol.toStringTag,{value:"Module"})),y_="_header_9xxjk_57",x_="_actions_9xxjk_131",v_="_breadcrumb_9xxjk_142",b_="_credits_9xxjk_157",j_="_pdplinks_9xxjk_185",C_="_similars_9xxjk_212",S_="_sizes_9xxjk_251",P_="_measurementTable_9xxjk_267",w_="_measurementHead_9xxjk_280",N_="_measurementRows_9xxjk_285",E_="_measurementRowsTitle_9xxjk_302",I_="_measurementRowsText_9xxjk_314",R_="_measurementImage_9xxjk_325",T_="_measurementImageContainer_9xxjk_328",A_="_measurementContent_9xxjk_337",k_="_measurementTitle_9xxjk_341",O_="_measurementClose_9xxjk_352",L_="_productref_9xxjk_417",M_="_slideOut_9xxjk_1",D_="_slideIn_9xxjk_1",F_="_content_9xxjk_397",z_="_pdp_9xxjk_185",B_="_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:y_,"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:x_,"add-to-cart":"_add-to-cart_9xxjk_138",breadcrumb:v_,"breadcrumb--active":"_breadcrumb--active_9xxjk_147",credits:b_,"gallery-carousel-modifier":"_gallery-carousel-modifier_9xxjk_162",pdplinks:j_,"links-wrapper":"_links-wrapper_9xxjk_195",similars:C_,"similars-info":"_similars-info_9xxjk_224","toggle-style-modifier":"_toggle-style-modifier_9xxjk_233","accessibility-info":"_accessibility-info_9xxjk_237",sizes:S_,"price-wrapper":"_price-wrapper_9xxjk_263",measurementTable:P_,measurementHead:w_,measurementRows:N_,measurementRowsTitle:E_,measurementRowsText:I_,measurementImage:R_,measurementImageContainer:T_,measurementContent:A_,measurementTitle:k_,measurementClose:O_,"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:L_,"tabs-panel":"_tabs-panel_9xxjk_428","tabs-panel-exit":"_tabs-panel-exit_9xxjk_434",slideOut:M_,"tabs-panel-enter":"_tabs-panel-enter_9xxjk_438",slideIn:D_,content:F_,pdp:z_,"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:B_,"breadcrumbs-desktop":"_breadcrumbs-desktop_9xxjk_580","breadcrumbs-mobile":"_breadcrumbs-mobile_9xxjk_589"},U_=({children:e,link:t,TOGGLE_STYLE_MODIFIER:r})=>{const{isMobile:s}=ne(),{router:a}=ce(),o=()=>{t&&a.push(t)},i=g.useRef(null);return n.jsx(d.ToggleStyle.Wrapper,{size:s?"medium":"small",style:{...r,border:`${i.current===t?"2":"1"}`,overflow:"hidden",padding:"0"},onClick:o,active:i.current===t,children:e})},Fu=({productId:e,similars:t,TOGGLE_STYLE_MODIFIER:r})=>{const{thumbImage:s}=Le(),a=[{productId:e,slug:"",textureImage:(s==null?void 0:s.imageUrl)??"",textureAlt:(s==null?void 0:s.imageText)??""},...t];return n.jsx("div",{children:a.map((o,i)=>o.textureImage?n.jsxs(U_,{link:o.slug?o.slug:null,TOGGLE_STYLE_MODIFIER:r,children:[n.jsx(d.ToggleStyle.DisabledAdornment,{}),n.jsx(d.ToggleStyle.Texture,{children:n.jsx(we.Image,{alt:o.textureAlt,src:o.textureImage,height:34,width:34,style:{borderRadius:0,height:"100%"}})})]},`similars-item-${i}`):null)})},q_=({children:e,storeId:t,productId:r,PDP_INFO:s,TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:o})=>{const{items:i,loadSimilars:c}=Qs(r,{filterTexture:a});return g.useEffect(()=>{c()},[c]),n.jsxs("div",{className:Z.similars,children:[n.jsxs("div",{className:Z["similars-info"],children:[n.jsx("span",{className:Z["sections-title"],children:s.product.color_title}),e]}),n.jsx(Fu,{productId:r,similars:i,TOGGLE_STYLE_MODIFIER:o})]})},H_=()=>{const{colorName:e}=Le();return n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:e.length===0?"":Z["accessibility-info"],children:n.jsx("p",{children:e})})})},sr=({className:e,titleId:t})=>{var a,o,i;const{productName:r,tag:s}=Le();return n.jsxs("div",{className:d.helpers.classNameConcat(Z.header,e),children:[s!=null&&s.commercial?n.jsx(d.Tag,{size:"small",title:(a=s.commercial)==null?void 0:a.value,variant:"quaternary",adornment:{start:(o=s.commercial)!=null&&o.icon?n.jsx(d.Icon,{name:s.commercial.icon}):null},children:(i=s.commercial)==null?void 0:i.value}):null,n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h1",{id:t,children:r})})})]})};sr.displayName="PDP.PDPHeader";const so=({layout:e="horizontal"})=>{const{price:t,listPrice:r,installments:s}=Le(),{count:a,value:o}=s,i=T.formatPriceToCurrency(r??0,!0),c=T.formatPriceToCurrency(t??0,!0),l=T.formatPriceToCurrency(o??0);return n.jsx(d.ProductInfo.Root,{size:"small",layout:e,children:n.jsxs(d.ProductInfo.Wrapper,{layout:e,size:"small",className:Z["price-wrapper"],children:[n.jsx(d.ProductInfo.ValuesWrapper,{children:t!==r?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:i.toString(),size:"small"}),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:c.toString(),size:"small"})]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:c.toString(),size:"small"})}),a&&a>1&&o?n.jsx(d.ProductInfo.Price,{label:"installment",value:`ou ${a}x ${l}`,size:"small"}):null]})})},is=({onAddCallBack:e,onDisabledClickCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s})=>{const a=sn(),{productId:o,productData:i,price:c,listPrice:l,thumbImage:u,isKit:m}=Le(),{isMobile:p}=ne(),{addToCart:f}=ve(),{sendDataLayerEvent:h}=ae(),_=!m&&(!a.sku||!a.available),y=()=>{if(_&&typeof t=="function"){t();return}typeof e=="function"&&e({id:a.sku,quantity:a.quantity,seller:a.sellerId,sku:o}),f({id:a.sku,quantity:a.quantity,seller:a.sellerId},{id:o,texture:u==null?void 0:u.imageUrl}),h({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...i,price:c,listPrice:l}]},supportData:{selectedSkus:[a]},customData:{quantity:a.quantity}}})};return n.jsx(d.Button,{className:Z["add-to-cart"],size:p?(r==null?void 0:r.mobile)??"large":(r==null?void 0:r.desktop)??"x-large",onClick:y,children:a.sku&&a.available?`${s.add_to_cart}`:`${s.select_size}`})},$_=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t})=>{const{isMobile:r}=ne(),s=sn(),{sizesContainerRef:a}=Ma(),{structureRef:o}=Ne();return s.sku&&s.available?n.jsx(is,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t}):n.jsx(d.Button,{className:Z["add-to-cart"],size:r?(e==null?void 0:e.mobile)??"large":(e==null?void 0:e.desktop)??"x-large",onClick:()=>{a.current&&o.current&&window.document.body.scrollTo({top:a.current.offsetTop-o.current.offsetHeight,behavior:"smooth"})},children:s.sku&&s.available?t.add_to_cart:t.select_size})},wn=({value:e,label:t,suppressHydrationWarning:r=!1},s)=>{const a={value:e,...r&&{suppressHydrationWarning:!0}},o=s==="compact"?a:{...a,label:t};return n.jsx(d.Timer.Digit,{...o})},zn=({dateEnd:e,dateInit:t,type:r="default",TIME_ZONE:s,...a})=>{const[o,i]=g.useState(tc(new Yr.TZDate(Date.now(),s),new Yr.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||o<=0)return n.jsx(n.Fragment,{});const u=Wt(o,"days"),m=Wt(o,"hours"),p=Wt(o,"minutes"),f=Wt(o);return n.jsxs(d.Timer.Root,{...a,children:[u?n.jsxs(n.Fragment,{children:[wn({value:u,label:"dias"},r),n.jsx(d.Timer.Separator,{})]}):null,wn({value:m,label:"horas"},r),n.jsx(d.Timer.Separator,{}),wn({value:p,label:"min"},r),n.jsx(d.Timer.Separator,{}),wn({value:f,label:"segs",suppressHydrationWarning:!0},r)]})},oo=({TIME_ZONE:e})=>{const{tag:t}=Le(),r=t==null?void 0:t.flagGoldenPdp,s=g.useMemo(()=>{var a;if((a=r==null?void 0:r.tagImage)!=null&&a.includes("player.vimeo")){const o=r.tagImage.split("?")[1],i=o==null?void 0:o.split("&"),c=i==null?void 0:i.filter(u=>u.includes("loc")||u.includes("signature")||u.includes("user_id")),l=c==null?void 0:c.join("&");return`${r.tagImage.split("?")[0]}?${l}`}return r==null?void 0:r.tagImage},[r==null?void 0:r.tagImage]);return r!=null&&r.enableTag?n.jsxs("div",{className:Z["golden-tag"],style:(r==null?void 0:r.backgroundSelect)==="color"?{backgroundColor:r==null?void 0:r.backgroundColor}:(r==null?void 0:r.backgroundSelect)==="image"?{backgroundImage:`url(${r==null?void 0:r.tagImage})`}:void 0,children:[(r==null?void 0:r.backgroundSelect)==="video"&&n.jsx("div",{className:Z["golden-tag-video"],children:n.jsx(we.Video,{src:s,autoPlay:!0,muted:!0,loop:!0,playsInline:!0})}),n.jsxs("div",{className:Z["golden-tag-content"],children:[n.jsx("span",{className:Z["golden-tag-content-text"],style:{color:r==null?void 0:r.textColor},children:r==null?void 0:r.value}),(r==null?void 0:r.countDownEndDate)&&n.jsx(zn,{mode:r==null?void 0:r.timerMode,size:"x-small",type:"compact",dateEnd:new Date((r==null?void 0:r.countDownEndDate)??""),TIME_ZONE:e})]})]}):null};oo.displayName="PDP.GoldenTag";const V_=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t,TIME_ZONE:r,Z_INDEX_WAR:s})=>{const{isMobile:a}=ne();return a?n.jsxs(d.Card,{className:Z["bottom-navigation"],shadow:!0,style:{zIndex:s.pdp_bottom_navigation},children:[n.jsxs("div",{className:Z["bottom-navigation__header"],children:[n.jsx(oo,{TIME_ZONE:r}),n.jsxs("div",{className:Z["bottom-navigation__header-content"],children:[n.jsx(sr,{}),n.jsx(so,{layout:"name-vertical"})]})]}),n.jsx($_,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t})]}):null},W_=({children:e,setShowBottomNavigation:t})=>{const r=g.useRef(null),s=Es(r),a=g.useRef(s);return g.useEffect(()=>{var i;const{top:o}=((i=r.current)==null?void 0:i.getBoundingClientRect())??{top:0};a.current!==s&&o>0&&(t(!s),a.current=s)},[s]),n.jsx("div",{ref:r,style:{width:"100%"},children:e})},G_=({ICONS:e})=>{const{isMobile:t}=ne(),{price:r,listPrice:s,productData:a,productId:o}=Le(),{sendDataLayerEvent:i}=ae(),c=zt(),{toggleProduct:l}=Nt();return n.jsx(d.Button,{adornment:{start:n.jsx(d.Icon,{name:e[c.includes(o)?"favorite_true":"favorite_false"],size:"medium"})},className:Z["add-to-wishlist"],size:t?"medium":"x-large",variant:"tertiary",onClick:()=>{l(o),i({functionKey:"productEvents",data:{event:c.includes(o)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:"PDP"},commonData:{...a,price:r,listPrice:s}}})}})},zu=({showWishlist:e=!0,callBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s,ICONS:a,TIME_ZONE:o,Z_INDEX_WAR:i})=>{const{isMobile:c}=ne(),[l,u]=g.useState(!0);return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:Z.actions,children:[c?n.jsx(W_,{setShowBottomNavigation:u,children:n.jsx(is,{onAddCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s})}):n.jsx(is,{onAddCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s}),e&&n.jsx(G_,{ICONS:a})]}),c&&l&&n.jsx(V_,{addToCartBtnSize:r,BUY_BUTTON_LABELS:s,Z_INDEX_WAR:i,TIME_ZONE:o})]})},Bu=({className:e,device:t,ICONS:r})=>{const{breadcrumbList:s,productName:a}=Le(),o=i=>i.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return n.jsx(d.BreadCrumb.DivWrapper,{className:d.helpers.classNameConcat(Z.breadcrumb,[t==="mobile"?Z["breadcrumbs-mobile"]:Z["breadcrumbs-desktop"],e]),children:n.jsxs(d.BreadCrumb.List,{children:[Array.isArray(s)&&s.map((i,c)=>{const l=o(s.slice(0,c+1).map(u=>u.replace(/\s/g,"-").toLowerCase()).join("/"));return n.jsx(d.BreadCrumb.Item,{adornment:{end:n.jsx(d.Icon,{name:r.arrow_right})},role:"listitem",children:n.jsx(Fe,{href:`/${l}`,children:i})},`pdp-breadcrumb-${l}-${c}`)}),n.jsx(d.BreadCrumb.Item,{role:"listitem",className:d.helpers.classNameConcat(Z["breadcrumb--active"],e),children:a},"pdp-breadcrumb-productName")]})})};Bu.displayName="PDP.BreadCrumb";const Uu=({className:e})=>{var s;const{tag:t}=Le(),r=t==null?void 0:t.flagPdp;return r&&((s=r==null?void 0:r.value)!=null&&s.length)?n.jsx(d.Tag,{className:d.helpers.classNameConcat(Z.credits,e),variant:"tertiary",title:r==null?void 0:r.value,size:"small",adornment:{start:r!=null&&r.enableIcon&&(r!=null&&r.icon)?n.jsx(d.Icon,{name:r==null?void 0:r.icon,style:{color:r==null?void 0:r.iconColor}}):null},style:{background:r==null?void 0:r.tagColor,color:r==null?void 0:r.textColor},children:r==null?void 0:r.value}):n.jsx(n.Fragment,{})};Uu.displayName="PDPCredits";const K_=()=>{const{descriptionContent:e,productReference:t}=Le(),[r,s]=g.useState("description");return n.jsxs(d.Tabs.Root,{className:Z["tabs-root-modifier"],children:[n.jsx(d.Tabs.TabList,{className:Z["tabs-list-modifier"],children:e==null?void 0:e.map(({label:a,value:o})=>n.jsx(d.Tabs.Item,{label:a,value:o,activeTab:r,onTabChange:s,size:"large",className:`${Z["tabs-item-modifier"]} ${r===o?Z["tabs-item-active"]:""}`},o))}),n.jsxs("div",{className:Z["content-wrapper"],children:[r==="description"?n.jsx("div",{children:n.jsxs("span",{className:Z.productref,children:["Ref:",t]})}):"",e==null?void 0:e.map(({value:a,content:o})=>r===a?n.jsx(d.Tabs.Panel,{className:`${Z["tabs-panel"]} ${r===a?Z["tabs-panel-enter"]:Z["tabs-panel-exit"]}`,children:n.jsx("div",{className:Z.content,dangerouslySetInnerHTML:{__html:o}})},a):null)]})]})},X_=({CURRENCY:e,DELIVERY_INFO_BOXES_ALLOWED:t,FREIGHT_CALCULATION:r,Z_INDEX_WAR:s})=>{const a=sn(),{isMobile:o}=ne();return n.jsxs(n.Fragment,{children:[o?n.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null,n.jsx(ou,{skuId:a.available?a.sku:"",size:o?r.inputSize.mobile:r.inputSize.desktop,quantity:a.quantity,sellerId:a.sellerId,seller:a.sellerName,local:"PDP",CONSTANTS_PROPS:{freightConfig:r,deliveryInfoBoxesAllowed:t,toolTipZIndex:s.modal,currency:e}}),o?n.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null]})},pa=({image:e,index:t,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:s})=>{const a=T.resizingImg(e.imageUrl,s.pdp),{nextimage:o}=ce();return n.jsx(o,{src:a,alt:e.imageLabel,objectFit:"contain",...s.pdp,...t<=1&&{priority:!0,loading:"eager"},onClick:()=>{r(t)}},t)},Y_=({video:e,productName:t,poster:r})=>{const{sendDataLayerEvent:s}=ae(),a=g.useRef(!1);return n.jsx(we.Video,{src:e,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,style:{zIndex:-1,aspectRatio:"2/3"},onPlaying:()=>{a.current||(a.current=!0,s({functionKey:"readyEvents",data:{event:"video_start",readyData:{product:t}}}))},poster:r})},qu=({images:e,video:t,handleZoom:r,productName:s,PRODUCT_IMAGE_DIMENSIONS:a})=>{var u,m;const{initialize:o,pagination:i,controller:c,itemsStyles:l}=d.Carousel.useCarousel({gap:0,itemsPerPage:1,loop:!1,direction:"row"});return n.jsxs(d.Carousel.Root,{innerRef:p=>{o(p)},className:Z["gallery-carousel-modifier"],children:[n.jsx(d.Carousel.Controller,{position:"absolute",top:"24px",bottom:"unset",left:"16px",children:n.jsx(d.Carousel.Bullets,{page:i.currentPage,total:e.length,onBulletClick:p=>c==null?void 0:c.navigateTo(p)})}),n.jsxs(d.Carousel.Body,{children:[n.jsx(d.Carousel.Item,{style:l,children:n.jsx(pa,{image:e[0],index:0,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:a})},"PDP_gallery_0"),t&&n.jsx(d.Carousel.Item,{style:l,children:n.jsx(Y_,{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:n.jsx(d.Carousel.Item,{style:l,children:n.jsx(pa,{image:p,index:f,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:a})},`PDP_gallery_${f}`))]})]})};qu.displayName="PDP.Carousel";const Q_="_thumbs_1954e_65",Z_="_selected_1954e_92",J_="_carousel_1954e_164",eg="_bullets_1954e_201",Pe={"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:Q_,selected:Z_,"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:J_,"carousel-controller":"_carousel-controller_1954e_169","arrow-left":"_arrow-left_1954e_179","arrow-right":"_arrow-right_1954e_180",bullets:eg,"zoom-popup":"_zoom-popup_1954e_212","image-zoom--mobile":"_image-zoom--mobile_1954e_252","image-zoom--image--img":"_image-zoom--image--img_1954e_282"},fa=({onClose:e,ICONS:t})=>n.jsx("div",{className:`${Pe["button-close-container"]}`,children:n.jsx(d.Button,{iconNameStart:t.close,iconSize:"medium",className:`${Pe["button-close"]}`,variant:"tertiary",state:"default",size:"medium",onClick:e,style:{textDecoration:"none"}})}),tg=({children:e,Z_INDEX_WAR:t,...r})=>n.jsx("div",{...r,className:Pe["image-zoom-wrapper-desktop"],style:{zIndex:t.pdp_image_zoom},children:e}),Hu=({images:e,setCurrent:t,setFirstImgLoaded:r,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:a})=>{const{nextimage:o}=ce();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=()=>{r(!0)};return g.useEffect(()=>{t(m.currentPage)},[m.currentPage,t]),n.jsxs(d.Carousel.Root,{innerRef:_=>{_&&!i&&(i=_,l(i))},className:Pe.carousel,children:[n.jsxs(d.Carousel.Controller,{className:Pe["carousel-controller"],children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.prevPage(),className:Pe["arrow-left"],adornment:{start:n.jsx(d.Icon,{name:s.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.nextPage(),className:Pe["arrow-right"],adornment:{start:n.jsx(d.Icon,{name:s.arrow_right})}})]}),n.jsx(d.Carousel.Body,{children:Array.isArray(e)&&e.map((_,y)=>n.jsx(d.Carousel.Item,{style:p,children:n.jsx(o,{...a.image_zoom.mobile,...y===0&&{priority:!0,loading:"eager"},ref:c,className:Pe.imageMobile,src:_.imageUrl,alt:_.imageText,quality:100,...y===0&&{onLoad:h}})},y))}),n.jsx(d.Carousel.Bullets,{className:Pe.bullets,page:m.currentPage,total:m.totalPages,onBulletClick:f})]})};Hu.displayName="ImageZoom.Mobile.Carousel";const $u=({imgRef:e,image:t,PRODUCT_IMAGE_DIMENSIONS:r})=>{$a();const{nextimage:s}=ce();return n.jsx("div",{className:Pe["image-zoom--image"],ref:e,children:n.jsx(s,{...r.image_zoom.mobile,alt:t.imageText,className:Pe["image-zoom--image--img"],quality:100,src:t.imageUrl})})};$u.displayName="ImageZoom.ImageZoom";const Vu=({loaded:e=!1})=>n.jsx("div",{className:Pe["zoom-popup"],"data-loaded":e,children:n.jsxs("svg",{width:"38",height:"39",viewBox:"0 0 38 39",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.93 5.382a3.711 3.711 0 0 1 2.55-1.007c.949 0 1.864.36 2.549 1.007a3.534 3.534 0 0 1 1.113 2.472v11.357l10.118 3.332c.587.193 1.1.56 1.465 1.053.366.494.565 1.089.566 1.7v.004c0 .22-.025.44-.075.653v.005l-2.98 12.52a.625.625 0 0 1-1.215-.29l2.977-12.515v-.002c.029-.122.043-.247.044-.372a1.619 1.619 0 0 0-.321-.958 1.729 1.729 0 0 0-.851-.61L24.32 20.257a.625.625 0 0 1-.43-.594V7.88a2.285 2.285 0 0 0-.72-1.59 2.462 2.462 0 0 0-1.691-.665c-.635 0-1.241.24-1.69.666a2.285 2.285 0 0 0-.722 1.59v19.04a.625.625 0 0 1-1.115.388l-.056-.071-.161-.202a178.922 178.922 0 0 0-2.333-2.858l-.002-.002a2.581 2.581 0 0 0-.897-.69 2.677 2.677 0 0 0-1.122-.25H12.37c-.307 0-.61.078-.874.225a1.712 1.712 0 0 0-.635.61 1.625 1.625 0 0 0-.016 1.653l7.128 12.296a.625.625 0 0 1-1.082.627L9.762 26.35a2.876 2.876 0 0 1 .027-2.924 2.962 2.962 0 0 1 1.098-1.057 3.05 3.05 0 0 1 1.482-.384h1.016c.57.002 1.133.127 1.648.368.515.24.97.59 1.33 1.024.514.614 1.026 1.239 1.455 1.768V7.855a3.535 3.535 0 0 1 1.113-2.473ZM6.446 10.22a.625.625 0 0 1 0 .884l-5.324 5.324a.625.625 0 0 1-.884-.884l5.324-5.324a.625.625 0 0 1 .884 0Z"}),n.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.68 12.033c.345 0 .625.28.625.625v2.703h2.702a.625.625 0 1 1 0 1.25H.68a.625.625 0 0 1-.625-.625v-3.328c0-.345.28-.625.625-.625ZM16.429.237a.625.625 0 0 1 0 .884l-5.325 5.324a.625.625 0 0 1-.884-.883L15.545.237a.625.625 0 0 1 .884 0Z"}),n.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.034.68c0-.346.28-.626.625-.626h3.328c.345 0 .625.28.625.625v3.328a.625.625 0 1 1-1.25 0V1.304h-2.703a.625.625 0 0 1-.625-.625Z"})]})});Vu.displayName="ImageZoom.ZoomPopup";const Wu=({images:e,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:r,...s})=>{const[a,o]=g.useState(!1),[i,c]=g.useState(0),{containerRef:l,imgRef:u,scale:m}=Va({defaultScale:1,maxScale:3});return n.jsxs("div",{...s,className:Pe["image-mobile"],"data-disable-carrousel-pan":m>1,children:[n.jsx(Vu,{loaded:a}),n.jsx(Hu,{images:e,setCurrent:c,setFirstImgLoaded:o,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:r}),n.jsx("div",{className:Pe["image-zoom--mobile"],ref:l,children:n.jsx($u,{imgRef:u,image:e[i],PRODUCT_IMAGE_DIMENSIONS:r})})]})};Wu.displayName="ImageZoom.ImageMobile";const ng=({children:e,Z_INDEX_WAR:t,...r})=>n.jsx("div",{...r,className:Pe["image-zoom-wrapper-mobile"],style:{zIndex:t.pdp_image_zoom},children:e}),rg="_modal_1u87b_1",nt={modal:rg,"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 sg({headerTitle:e,isMobile:t,ICONS:r}){return n.jsx(d.Modal.Header,{navigation:"top",className:nt["modal-header"],children:n.jsxs(d.Modal.Controls,{navigation:"top",isMobile:t,children:[n.jsx("div",{className:nt["modal-header__title"],children:n.jsx(d.Modal.Title,{navigation:"top",className:nt["quick-shop__title"],title:e})}),n.jsx(d.Button,{className:nt["modal-header__close-button"],"data-close":!0,iconNameStart:r.close,size:"small",variant:"tertiary"})]})})}const Gu=({PDP_INFO:e,PLP_SIZE_ORDER:t,ICONS:r,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:a,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:i})=>{const{sizes:c,productId:l,handleViewItemEvent:u}=Le(),m=g.useMemo(()=>c!=null&&c.length?Wc({items:c,getLabel:b=>b.value,PLP_SIZE_ORDER:t}):[],[c]),{sizesContainerRef:p}=Ma(),{isMobile:f}=ne(),h=sn(),_=ui(),{setValue:y}=ii(),{setValue:x}=ks(),v=g.useRef({}),[C,j]=g.useState(null);return n.jsxs("div",{ref:p,className:d.helpers.classNameConcat(Z.sizes,"PDP_sizes"),children:[n.jsx("span",{className:Z["sections-title"],children:e.product.size_title}),n.jsx("div",{children:m.map(b=>(!b.available&&!v.current[b.value]&&(v.current[b.value]={disable:!b.available,size:b.value,skuID:b.sku}),n.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}),x(!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:[n.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),n.jsx(d.ToggleSize.Text,{children:b==null?void 0:b.value})]},`sizes-${b.sku}-${b.value}`)))}),n.jsx(Vs,{open:_,setVisible:x,sku:C,setSku:j,skus:Object.values(v.current),ICONS:r,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:a,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:i})]})},Gt=({children:e,className:t,type:r})=>n.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main__info-subsection"],[Z[`subsection-${r}`],t]),children:e}),Ku=({children:e,className:t})=>{const{structureRef:r,tipbarRef:s}=Ne(),a=g.useMemo(()=>{var c,l;const o=((c=r.current)==null?void 0:c.clientHeight)||0,i=((l=s.current)==null?void 0:l.clientHeight)||0;return o+i},[r,s]);return n.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main__info"],t),id:"pdpmaininfo",style:{top:a},children:e})},Xu=({TEXTURE_IMAGE:e,TOGGLE_STYLE_MODIFIER:t})=>{const{productId:r}=Le(),{items:s,loadSimilars:a}=Qs(r,{filterTexture:e});return g.useEffect(()=>{a()},[a]),n.jsxs("div",{className:Z.similars,children:[n.jsx("span",{className:Z["sections-title"],children:"Cor"}),n.jsx(Fu,{productId:r,similars:s,TOGGLE_STYLE_MODIFIER:t})]})};Xu.displayName="PDP.Info.Similars";const og=({callBackProductAdded:e,BUY_BUTTON_LABELS:t,ICONS:r,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:a,PDP_INFO:o,PLP_SIZE_ORDER:i,PRODUCT_CARD_TEXTS:c,TEXTURE_IMAGE:l,TIME_ZONE:u,TOGGLE_STYLE_MODIFIER:m,Z_INDEX_WAR:p})=>n.jsx(d.Modal.Body,{className:nt["modal-product-body"],children:n.jsxs(Ku,{className:nt["pdp-main__info-modifier"],children:[n.jsxs(Gt,{type:"product-info",children:[n.jsx(sr,{}),n.jsx(so,{})]}),n.jsx(Gt,{type:"similars",children:n.jsx(Xu,{TEXTURE_IMAGE:l,TOGGLE_STYLE_MODIFIER:m})}),n.jsx(Gt,{type:"sizes",children:n.jsx(Gu,{ICONS:r,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:a,PDP_INFO:o,PLP_SIZE_ORDER:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:p})}),n.jsx(Gt,{type:"actions",children:n.jsx(zu,{showWishlist:!1,callBack:e,addToCartBtnSize:{mobile:"medium",desktop:"large"},BUY_BUTTON_LABELS:t,ICONS:r,TIME_ZONE:u,Z_INDEX_WAR:p})})]})});function ag({callBackProductAdded:e,QUICKSHOP:t,ICONS:r,...s}){const[a,o]=g.useState(!1),i=()=>o(c=>!c);return n.jsxs("div",{className:nt["quick-shop"],children:[n.jsx(d.Button,{onClick:i,size:"x-large",className:nt["shop-bag"],iconNameStart:r.bag,iconSize:"medium"}),n.jsxs(d.Modal.Root,{isOpen:a,setIsOpen:o,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:[n.jsx(sg,{headerTitle:t.title,ICONS:r}),n.jsx(og,{callBackProductAdded:e,ICONS:r,...s})]})]})}const ig=({image:e})=>n.jsx(en,{src:T.resizingImg(e.imageUrl,{width:50,height:75})||"",alt:e.imageText,className:Pe.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:10,style:{position:"absolute",inset:0,filter:"blur(10px)"}}),cg=({images:e,selectedImageIndex:t,PRODUCT_IMAGE_DIMENSIONS:r,...s})=>{const[a,o]=g.useState(!1),{nextimage:i}=ce();return n.jsx("div",{...s,className:Pe["main-image-container"],children:n.jsxs("div",{className:Pe["image-desktop"],children:[!a&&n.jsx(ig,{image:e==null?void 0:e[t]}),n.jsx(i,{src:T.resizingImg(e==null?void 0:e[t].imageUrl,{...r.image_zoom.desktop})||"",alt:e==null?void 0:e[t].imageText,className:Pe.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:100,onLoad:()=>{o(!0)}})]})})},lg=({images:e,onThumbnailClick:t,selectedImageIndex:r})=>{const{nextimage:s}=ce();return n.jsx("div",{className:Pe.thumbs,children:e.map((a,o)=>n.jsx("div",{role:"button",tabIndex:0,onClick:()=>t(o),onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&t(o)},className:o===r?Pe.selected:"",children:n.jsx(s,{src:a.imageUrl,alt:a.imageText,layout:"responsive",width:100,height:100,objectFit:"cover",priority:!1})},o))})},Yu=({images:e,initialSelectedImageIndex:t=0,setShowImageZoom:r,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:a,Z_INDEX_WAR:o,...i})=>{const{isMobile:c}=ne(),[l,u]=g.useState(t),m=p=>{u(p)};return c?n.jsxs(ng,{Z_INDEX_WAR:o,children:[n.jsx(fa,{onClose:()=>r({show:!1,initialIndex:0}),ICONS:s}),n.jsx(Wu,{images:e,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:a})]}):n.jsxs(tg,{Z_INDEX_WAR:o,children:[n.jsx(fa,{onClose:()=>r({show:!1,initialIndex:0}),ICONS:s}),n.jsx(cg,{images:e,selectedImageIndex:l,onThumbnailClick:m,PRODUCT_IMAGE_DIMENSIONS:a},e[l].imageId??`${e[l].imageText}-${l}`),n.jsx(lg,{images:e,selectedImageIndex:l,onThumbnailClick:m}),n.jsx(ag,{callBackProductAdded:()=>{r({initialIndex:0,show:!1})},ICONS:s,Z_INDEX_WAR:o,...i})]})};Yu.displayName="ImageZoom";const ug=({productImgs:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})=>{const{video:s,productName:a}=Le(),[o,i]=g.useState({show:!1,initialIndex:0});g.useEffect(()=>(o.show?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll"),()=>{document.body.classList.remove("no-scroll")}),[o]);const c=l=>{i({show:!0,initialIndex:l})};return n.jsxs(n.Fragment,{children:[n.jsx(qu,{images:e,video:s,handleZoom:c,productName:a,PRODUCT_IMAGE_DIMENSIONS:t}),o.show&&n.jsx(Yu,{images:e,initialSelectedImageIndex:o.initialIndex,setShowImageZoom:i,PRODUCT_IMAGE_DIMENSIONS:t,...r})]})},Qu=({TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})=>{const{images:s}=Le(),a=g.useMemo(()=>{const o=s.filter(i=>!e.includes(i.imageLabel));return o.length>0?o:s},[]);return n.jsx(ug,{productImgs:a,TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})};Qu.displayName="PDP.Gallery";const dg=({className:e,hasIcons:t=!0,ICONS:r,PDP_INFO:s})=>{const{allSizesAvailable:a,productId:o}=Le(),{setValue:i}=ks(),{sendDataLayerEvent:c}=ae();return n.jsx("div",{className:d.helpers.classNameConcat(Z.links,e),id:"pdp-container","data-product-id":o,children:n.jsxs("div",{className:Z["links-wrapper"],children:[!a&&n.jsx(d.Button,{adornment:t?{start:n.jsx(d.Icon,{name:r.product})}:{},size:"x-small",variant:"tertiary",onClick:()=>i(!0),underline:!0,children:s.links_and_stepper.size_out_of_stock}),n.jsx(d.Button,{adornment:t?{start:n.jsx(d.Icon,{name:r.ruler})}:{},size:"x-small",variant:"tertiary",underline:!0,onClick:()=>{var l,u;(u=window.SizebayParams)==null||u.openChart((l=window.SizebayParams)==null?void 0:l.id),c({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:"pdp:guia-de-medidas"}}})},children:s.links_and_stepper.size_table_title}),n.jsx(d.Button,{size:"x-small",variant:"tertiary",className:"sizebay",underline:!0,onClick:()=>{var l,u;return(u=window.SizebayParams)==null?void 0:u.openVFR((l=window.SizebayParams)==null?void 0:l.id)},children:s.links_and_stepper.sizebay})]})})},mg=({children:e})=>n.jsx("div",{className:Z["pdp-main__info-main-content"],children:e}),pg=({head:e,className:t})=>n.jsx("thead",{className:t,children:n.jsx("tr",{children:e.map((r,s)=>n.jsx("th",{children:r},`head-title-${s}`))})}),fg=({rows:e,className:t})=>n.jsx("tbody",{className:t,children:e.map((r,s)=>n.jsx("tr",{children:r.map(a=>typeof a=="string"&&a.includes("blocks")?JSON.parse(a).blocks.map(o=>`${o.text}
|
|
18
|
-
`):a).map((a,o)=>n.jsx("td",{children:a},`cell-content-${o}`))},`row-content-${s}`))}),hg="_tableContainer_1yxy2_1",_g={tableContainer:hg},gg=({children:e,className:t=""})=>n.jsx("table",{className:`${_g.tableContainer} ${t}`,children:e}),kn={Head:pg,Rows:fg,Root:gg},yg=({title:e,text:t})=>n.jsxs("p",{className:Z.measurementRowsText,children:[n.jsx("h1",{className:Z.measurementRowsTitle,children:e}),t]}),xg=({ICONS:e,SIZES:t,Z_INDEX_WAR:r})=>{const s=pi(),{setValue:a}=fi();return n.jsx(d.Modal.Root,{isMobile:!0,style:{zIndex:r.modal},setIsOpen:a,isOpen:s,className:Z.measurementModal,children:n.jsx(d.Modal.Body,{children:n.jsxs("div",{className:Z.measurementContainer,children:[n.jsx("h1",{className:Z.measurementTitle,children:t.title}),n.jsxs("div",{className:Z.measurementContent,children:[n.jsx("div",{className:Z.measurementImageContainer,children:n.jsx(en,{width:264,height:402,alt:"",className:Z.measurementImage,src:t.bannerImage})}),n.jsxs(kn.Root,{className:Z.measurementTable,children:[n.jsx(kn.Head,{className:Z.measurementHead,head:t.head}),n.jsx(kn.Rows,{className:Z.measurementRows,rows:t.rows.map((o,i)=>[n.jsx(yg,{title:t.descriptions[i].title,text:t.descriptions[i].text},i),...o])})]})]}),n.jsx(d.Button,{onClick:()=>a(!1),className:Z.measurementClose,variant:"tertiary",children:n.jsx(d.Icon,{name:e.close})})]})})},"minicart")},vg=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main__gallery-wrapper"],t),...r,children:e}),bg=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(Z.pdp,t),...r,children:e}),jg=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main"],t),...r,children:e}),Cg=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main__info-secondary-content"],t),...r,children:e}),Sg={gallery:vg,pdp:bg,main:jg,secondary:Cg},Pg=({className:e,...t})=>n.jsx(d.Utils.Divider,{...t,className:d.helpers.classNameConcat(Z.divider,e)}),wg=Object.freeze(Object.defineProperty({__proto__:null,AccessibilityInfo:H_,Actions:zu,BreadCrumb:Bu,Credits:Uu,DescriptionsTabs:K_,Divider:Pg,Freight:X_,Gallery:Qu,GoldenTag:oo,Header:sr,Links:dg,MainContent:mg,MainInfo:Ku,PDPSimilars:q_,Price:so,ProductMeasurements:xg,Sizes:Gu,SubSectionWrapper:Gt,containers:Sg},Symbol.toStringTag,{value:"Module"})),Ng=(e,t)=>{const[r,s]=hu({items:e}),[a,o]=t.split(":").map(Number);return isNaN(a)||isNaN(o)?[r,s]:[r<a?r:a,s>o?s:o]},Eg=()=>{var S;const{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:s,PLP_FILTERS_TITLE:a,PLP_SIZE_ORDER:o}=De(),[i,c]=g.useState("10000:0"),{isMobile:l}=ne(),{sendDataLayerEvent:u}=ae(),{openFilters:m,setOpenFilters:p}=Us(),{state:f}=ze(),{breadcrumb:h,deleteAllFacets:_,isLoading:y=!1,facets:x,onToggleFacet:v,selectedFacets:C}=Zt.contexts.searchFacets.hook(),j=g.useRef(""),b={isLast:!0,href:(S=f.term)!=null&&S.length?`/${f.term}`:"",name:f.term},w=T.filterNonRootFacets(C,f==null?void 0:f.base);return g.useEffect(()=>{const P=x.find(({key:N})=>N==="price");if(P){const[N,R]=Ng(P.values,i??"10000:0");c(`${N}:${R}`)}},[x,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]),n.jsxs(Ln.teamComponents.Filter.Root,{CONSTANTS:{ICONS:e,PLP_FILTERS_TITLE:a,PLP_FILTERS:t},breadcrumb:h.length?h:[b],deleteAllFacets:_,filters:{facets:T.filterNonCategorySelected(x,f==null?void 0:f.base),selected:w},isMobile:l??!1,isLoading:y,isOpen:m,price:i,onToggleFacet:v,setIsOpen:p,target:document.body,children:[n.jsx(Ln.teamComponents.Filter.Selected,{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r}),n.jsx(Ln.teamComponents.Filter.Content,{columns:2,CONSTANTS:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:s,PLP_SIZE_ORDER:o}})]})},Zu=()=>typeof document>"u"?null:n.jsx(Eg,{});Zu.displayName="Filters";const ao=({total:e=0})=>{const{SEARCH_TOTAL_PORTAL_ID:t}=De();if(typeof window>"u")return null;const r=document.getElementById(t);return r?ws.createPortal(n.jsxs("span",{children:["[",e,"] produto",e>1?"s":""]}),r):null};ao.displayName="PDC.Grid.NavigationTotal";const Ig=({productCount:e,PLP_GRID_SCROLL_BACK:t})=>{g.useEffect(()=>{var o;const s=new URLSearchParams(window.location.search).get("page");if(e){const[i,c]=((o=sessionStorage.getItem(t.key))==null?void 0:o.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 a=()=>{e>0&&window.document.body.scrollTop&&sessionStorage.setItem(t.key,`${window.document.body.scrollTop.toString()}-${s}`)};return window.document.body.addEventListener("scroll",a,{passive:!0}),()=>{window.document.body.removeEventListener("scroll",a)}},[e])},Rg=()=>{const{isMobile:e}=ne(),{isLoading:t,products:r,total:s}=on(),a=De();return Ig({productCount:r.length,PLP_GRID_SCROLL_BACK:a.PLP_GRID_SCROLL_BACK}),n.jsxs(n.Fragment,{children:[n.jsx(tt.Products,{isMobile:e??!1,items:r,...a}),!r.length&&!t&&n.jsx(tt.Empty,{ICONS:a.ICONS,PLP_NOT_RESULT:a.PLP_NOT_RESULT}),n.jsx(ao,{total:s})]})},Ju=({infinite:e=!1})=>n.jsx("div",{className:Ge["pdc--grid"],children:n.jsx("div",{className:Ge["pdc--grid--content"],children:e?n.jsx(tt.InfiniteScroller,{}):n.jsx(Rg,{})})});Ju.displayName="Grid";const It=e=>({centro:"center",esquerda:"start",direita:"end"})[e],ed=({children:e,contentState:t,entityKey:r})=>{const{url:s}=t.getEntity(r).getData();return s?n.jsx(Fe,{href:s,children:e}):e},Tg=(e,t,r)=>{e.findEntityRanges(s=>{const a=s.getEntity();return a===null?!1:r.getEntity(a).getType()==="LINK"},t)},Bn=e=>{const t=new Je.CompositeDecorator([{strategy:Tg,component:ed}]),r=Je.convertFromRaw(e);return Je.EditorState.createWithContent(r,t)},Ag=e=>Je.convertFromRaw(e),Un=Je.DefaultDraftBlockRenderMap.set("unstyled",{element:"div",aliasedElements:["div"]}),ha="superior-direita",Nn="dentro-inferior-centro",kg="inferior-direita",qr="dentro-inferior-esquerda",td=e=>({position:e===Nn||e===qr?"absolute":"default",shouldRender:[ha,Nn,qr].includes(e)?"top":"bottom",alignItems:[Nn].includes(e)?"center":[ha,kg].includes(e)?"flex-end":"flex-start",left:e===qr?"16px":e===Nn?"45%":"unset"}),Og=Object.freeze(Object.defineProperty({__proto__:null,CREATE_CONTENT:Bn,EXTENDED_BLOCK_RENDER_MAP:Un,GET_CONTENT_STATE:Ag,controllersPositionsAdapter:td},Symbol.toStringTag,{value:"Module"})),Lg=({expanded:e,content:t})=>n.jsxs("details",{open:e,children:[t.textStructureReduced?n.jsx("summary",{onClick:r=>r.preventDefault(),children:n.jsx(Je.Editor,{editorKey:"draft-editor-1",blockRenderMap:Un,editorState:t!=null&&t.textStructureReduced?Bn(JSON.parse(t.textStructureReduced)):Je.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):n.jsx(n.Fragment,{}),t.showTextStructureExpander&&t.textStructure?n.jsx(n.Fragment,{children:n.jsx(Je.Editor,{editorKey:"draft-editor-1",blockRenderMap:Un,editorState:t.textStructure?Bn(JSON.parse(t.textStructure)):Je.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):n.jsx(n.Fragment,{})]}),Mg="_textContentWrapper_176ht_5",Dg="_textContentSection_176ht_13",cs={"link-modifier":"_link-modifier_176ht_1",textContentWrapper:Mg,textContentSection:Dg},nd=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:r})=>{var o;const[s,a]=g.useState(!1);return n.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:It(e.textStructureAlignment),alignItems:It(e.textStructureAlignment)},columnWrapper:{alignContent:It(e.textStructureAlignment),alignItems:It(e.textStructureAlignment)}},adornment:{bottom:e.showTextStructureExpander&&e.textStructure?n.jsx(d.Button,{variant:"tertiary",adornment:{end:n.jsx(d.Icon,{name:s?`${t.arrow_up}`:`${t.arrow_down}`})},onClick:()=>a(i=>!i),size:"small",children:s?(r==null?void 0:r.less)??"Ver Menos":(r==null?void 0:r.more)??"Ver Mais"}):n.jsx(n.Fragment,{})},children:n.jsxs(d.Utils.Column,{className:cs.textContentWrapper,style:{alignItems:It(e.textStructureAlignment)},children:[n.jsx(d.TextStructure.DivWrapper,{style:{textAlign:It(e.textStructureAlignment)},mode:e.textStructureMode??"default",children:e.textStructureReduced?n.jsx(Lg,{content:e,expanded:s}):n.jsx(n.Fragment,{})}),e.textStructureButtonLabel?n.jsx(Oe,{mode:e.textStructureMode??"default",href:e.textStructureButtonHref??"#",size:e.textStructureButtonSize,className:cs["link-modifier"],adornments:(o=e.textStructureButtonIcon)!=null&&o.length&&e.enableIcon?{end:n.jsx(d.Icon,{name:e.textStructureButtonIcon})}:void 0,children:e.textStructureButtonLabel}):n.jsx(n.Fragment,{})]})})},Fg=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],_a=e=>({centro:"center",esquerda:"start",direita:"end"})[e],ga={"content-modifier":"_content-modifier_16y4u_5","banner-image-wrapper-modifier":"_banner-image-wrapper-modifier_16y4u_13"},ya=({data:e,videoUrl:t,priority:r,videoRef:s,ICONS:a,TEXTCONTENT_EXPANDED:o,TIME_ZONE:i,className:c,...l})=>{const{video:u,image:m,imageHref:p,imageOpacity:f,altImage:h,backgroundColor:_,position:y,contentAlignment:x,showTimer:v,contentOrder:C,timerMode:j,timerEnd:b,timerInit:w,textStructure:S,textStructureReduced:P}=e.banner,N=(p==null?void 0:p.trim())||(m==null?void 0:m.trim())||null,{nextimage:R}=ce();return n.jsxs(d.Banner.Container,{...l,children:[n.jsxs(d.Banner.ImageWrapper,{className:ga["banner-image-wrapper-modifier"],style:f?{background:_}:void 0,children:[u&&n.jsx(we.Video,{videoRef:s,src:t,autoPlay:r,loop:!0,playsInline:!0,muted:!0}),N&&!(u!=null&&u.length)&&n.jsx(R,{src:N,width:"1920",height:"1080",alt:h??m??"",...r?{priority:r}:{},style:f?{opacity:"0"}:void 0}),!m&&!(u!=null&&u.length)&&n.jsx("div",{style:{background:_}})]}),v||P||S?n.jsx(d.Banner.Slot,{...Fg(y??"centro"),className:d.helpers.classNameConcat(ga["content-modifier"],c),style:{textAlign:_a(x)},children:n.jsxs(d.Utils.Column,{gap:"16px",alignItems:_a(x),children:[v&&C==="timer-first"&&n.jsx(zn,{mode:j??"default",size:"small",dateEnd:b?new Date(b):new Date,dateInit:w?new Date(w):new Date,TIME_ZONE:i}),n.jsx(nd,{data:e.banner,ICONS:a,TEXTCONTENT_EXPANDED:o}),v&&C!=="timer-first"&&n.jsx(zn,{mode:j??"default",size:"small",dateEnd:b?new Date(b):new Date,dateInit:w?new Date(w):new Date,TIME_ZONE:i})]})}):n.jsx(n.Fragment,{})]})};class Xe extends g.Component{constructor(){super(...arguments);gt(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(){return{hasError:!0,error:null}}componentDidCatch(r,s){if(process.env.NODE_ENV!=="production"){if(this.props.debugger)debugger;console.groupCollapsed("Error Boundary CMS",this.props.name),console.log("Error:",(r==null?void 0:r.message)??r),console.log("Error Info:",s),console.groupEnd()}}render(){const{hasError:r}=this.state,{children:s,fallback:a}=this.props;return r&&process.env.NODE_ENV==="production"?null:r&&a!==void 0?a:s}}const cn=({data:e,className:t,priority:r,creative:s,name:a,...o})=>{const{handleSelectPromotionEvent:i,currentLocalRef:c}=ae(),{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 x;if((x=e.banner.video)!=null&&x.includes("player.vimeo")){const v=e.banner.video.split("?")[1],C=v==null?void 0:v.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 x;(x=h.current)!=null&&x.paused&&h.current.play()};return n.jsx(Xe,{name:a,children:n.jsx(Zn,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...f,index:u}}}},observerOptions:{delay:100,..._&&{threshold:.1}},..._&&{callBackWhenVisible:y},children:e.banner.href?n.jsx(Fe,{href:e.banner.href,onClick:()=>{i({updatePromotionRef:!0,promotion:f,index:u})},children:n.jsx(ya,{data:e,videoUrl:_,priority:r,videoRef:h,className:t,...o})}):n.jsx(ya,{data:e,videoUrl:_,priority:r,videoRef:h,className:t,...o})})})},io=e=>n.jsx(Xe,{name:e.name,children:n.jsx(cn,{...e})}),rd=({columns:e,count:t,gap:r,className:s})=>{var x;const{banners:a,pages:o,products:i}=lt(),{isMobile:c}=ne(),{banners:l}=Gn(),{ICONS:u,PRODUCT_CARD_IMAGE_ASPECT_RATIO:m,TEXTCONTENT_EXPANDED:p,TIME_ZONE:f}=De(),h=((x=o[o.length-1])==null?void 0:x.products.length)??t,_=i[(o.length-1)*t+h-1],y=l.filter((v,C)=>a[C]<_);return Array.isArray(y)?y.map((v,C)=>n.jsx(st.Banner,{columns:v.columns,gap:r,isMobile:c??!1,position_grid:a[C]+1,totalColumns:e,PRODUCT_CARD_IMAGE_ASPECT_RATIO:m,children:n.jsx(cn,{name:"Banner Carousel",data:{banner:v,componentIndex:C},creative:"banner_grid",ICONS:u,TEXTCONTENT_EXPANDED:p,TIME_ZONE:f,className:s})},`${v.position_grid}-${C}`)):null};rd.displayName="PDC.InfiniteScroller.Banners";const sd=e=>{var s;const{pages:t}=lt(),r=t[t.length-1];return(r==null?void 0:r.page)!==((s=r==null?void 0:r.pagination)==null?void 0:s.total)&&!(r!=null&&r.loading)?n.jsx(Qn,{...e}):null};sd.displayName="PDC.InfiniteScroller.Loading";const od=({page:e,...t})=>{const{updateParamPage:r}=lt(),{element:s}=Hn({callback:()=>r(e),options:{threshold:0}});return n.jsx("div",{...t,id:`pdc-scroll-infinite-${e.page}`,className:Ge["pdc--infinite--loader"],"data-page":e.page,ref:s})};od.displayName="PDC.Page.Anchor";const ad=({first:e,gap:t,isMobile:r=!1,item:s,index:a,last:o=!1,order:i,page:c,showVideo:l=!1})=>{const{load:u,handleNotify:m}=lt(),{getAvailableProductTag:p}=_t(),{BUY_BUTTON_LABELS:f,MAIN_IMAGE:h,PLP_GRID_SCROLL_BACK:_,PLP_INFINITE_SCROLL:y,PLP_PRODUCT_SIMILAR_DELAY:x,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:v,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:N,TEXTURE_IMAGE:R,Z_INDEX_WAR:k,ICONS:O}=De(),M=p(s==null?void 0:s.cluster.highlights);return n.jsx(st.Card,{className:s.id==="skeleton"?Ge["pdc--infinite--card--disabled"]:"",gap:t,isMobile:r??!1,item:s,order:i,tag:M,index:a,setSkuSelected:m,showVideo:l,CONSTANTS:{BUY_BUTTON_LABELS:f,MAIN_IMAGE:h,PLP_GRID_SCROLL_BACK:_,PLP_INFINITE_SCROLL:y,PLP_PRODUCT_SIMILAR_DELAY:x,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:v,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:N,TEXTURE_IMAGE:R,Z_INDEX_WAR:k,ICONS:O},children:c&&u&&n.jsxs(n.Fragment,{children:[e&&n.jsx(On.Anchor,{page:c}),!c.loading&&n.jsx(On.Loader,{page:c}),o&&c.loading&&n.jsx(On.NextPage,{page:c})]})})};ad.displayName="PDC.Page.Card";const id=({type:e="default",page:t,...r})=>{const{load:s,updatePage:a}=lt(),{element:o}=Hn({callback:()=>a(t),onEnterViewportOnce:!0,options:{threshold:1}});return s===!0&&n.jsx("div",{...r,className:Ge[`pdc--infinite--loader${e==="page"?"--page":""}`],ref:o})};id.displayName="PDC.Page.Loader";const cd=({page:e,...t})=>{var a;const{addNewPage:r}=lt(),{element:s}=Hn({callback:()=>{r(e)},onEnterViewportOnce:!0,options:{threshold:[.5,1]}});return((a=e==null?void 0:e.pagination)==null?void 0:a.nextPage)===!0&&e.loading===!0?n.jsx("div",{...t,className:Ge["pdc--infinite--next-page--card"],"data-next-page":!0,ref:s}):null};cd.displayName="PDC.Page.NextPage";const On={Anchor:od,Card:ad,Loader:id,NextPage:cd},ld=({count:e,gap:t,page:r})=>{const{isMobile:s}=ne(),{columns:a,products:o}=lt(),i=(r.page-1)*e,c=Oi(r.products,a);return Array.isArray(r.products)?r.products.map((l,u)=>n.jsx(On.Card,{first:u===0,last:u===r.products.length-1,gap:t,index:u,item:l.node,isMobile:s??!1,order:o[i+u]+1,page:u===0||u===r.products.length-1?r:void 0,showVideo:!!c.indexOf(u)},o[i+u]+1)):null};ld.displayName="PDC.Page";const zg=({pages:e,load:t,PLP_GRID_SCROLL_BACK:r})=>{const s=g.useRef(!1);g.useEffect(()=>{const a=e[e.length-1];if(t&&a&&!s.current){const o=sessionStorage.getItem(r.refer),i=sessionStorage.getItem(r.order),c=document.querySelector(o==="true"?`[data-order="${i}"]`:`#pdc-scroll-infinite-${a.page}`);c&&(s.current=!0,sessionStorage.setItem(r.refer,"false"),a.page>1&&c.scrollIntoView({behavior:"instant",block:"start"}))}if(!t&&s.current){s.current=!1;const o=document.querySelector("body > main");o&&o.scrollIntoView({behavior:"instant",block:"start"})}},[t,e])},Bg=()=>{var l,u;const{count:e}=ze(),{columns:t,gap:r,load:s,pages:a,total:o}=lt(),i=De(),{PLP_GRID_SCROLL_BACK:c}=De();return zg({pages:a,load:s,PLP_GRID_SCROLL_BACK:c}),n.jsxs(n.Fragment,{children:[s===!0&&((u=(l=a[0])==null?void 0:l.pagination)==null?void 0:u.count)===0&&n.jsx(tt.Empty,{ICONS:i.ICONS,PLP_NOT_RESULT:i.PLP_NOT_RESULT}),n.jsxs(st.Root,{children:[Array.isArray(a)&&a.map((m,p)=>n.jsx(ld,{count:e,gap:r,page:m},p)),n.jsx(rd,{columns:t,count:e,gap:r})]}),n.jsx(ao,{total:o}),n.jsx(sd,{})]})},ud=()=>{const{banners:e}=Gn();return n.jsx(Xi,{banners:e,children:n.jsx(Bg,{})})};ud.displayName="PDC.InfiniteScroller";const dd=()=>{const{setOpenFilters:e}=Us(),{selectedFacets:t,onToggleFacet:r,onSort:s}=wi(),{state:a}=ze(),{Z_INDEX_WAR:o}=De(),i=T.filterNonRootFacets(t,a==null?void 0:a.base);return n.jsx(ht.Root,{onSort:s,setOpenFilters:e,style:{zIndex:o.plp_navigation},children:n.jsx(ht.Selected,{callback:r,selected:i})})};dd.displayName="Navigation";const ls=({currentPage:e,callback:t,type:r,...s})=>n.jsx(d.Button,{...s,iconNameStart:`arrow-${r}`,onClick:()=>{typeof t=="function"&&t(r==="left"?"prev":"")},size:"large",variant:"tertiary"});ls.displayName="Arrow";const us=({active:e,prev:t,ellipses:r,page:s,selectedPage:a})=>n.jsxs(n.Fragment,{children:[r&&t&&n.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."}),e&&n.jsx(d.Pagination.Item,{isActive:!1,index:s,variant:"tertiary",onClick:()=>{typeof a=="function"&&a(s)},children:s}),r&&!t&&n.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."})]});us.displayName="PageEllipses";const md=({children:e,endPage:t,page:r,total:s,selectedPage:a,ITEMS_PER_SECTION:o})=>n.jsxs(n.Fragment,{children:[n.jsx(us,{active:r>=o&&s>o,selectedPage:a,currentPage:r,prev:!1,ellipses:r>o&&s>o,page:1}),e,n.jsx(us,{active:s-r>1&&s!==t,selectedPage:a,currentPage:r,prev:!0,ellipses:t<s-1,page:s})]});md.displayName="Pagination.Layout";const Ug=(e,t,r)=>{const s=new URLSearchParams(r);return s.set(e,t),s.toString()},qg=(e,t)=>{const r=[];for(let s=e;s<=t;s++)r.push(s);return r},Hg=({currentPage:e,total:t,maxVisiblePages:r,SEARCH_PAGE_ITEM_THRESHOLD:s})=>{const a=t>=s?s:t,o=Math.max(1,e===a?a-r+1:e-Math.floor(r/2)),i=Math.min(a,o+r-1);return{startPage:o,endPage:i,totalPages:a}},pd=({currentPage:e,pages:t,searchParams:r,VARIANT_PAGINATION:s})=>{const{router:a,pathname:o}=ce();return Array.isArray(t)?t.map(i=>n.jsx(d.Pagination.Item,{isActive:e===i,index:i,variant:e===i?s.active:s.default,onClick:()=>a.push(`${o}?${Ug("page",i.toString(),r)}`),children:i},i)):null};pd.displayName="Pages";const co=({query:e,type:t="default",searchParams:r,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:a,ITEMS_PER_PAGE:o,SEARCH_PAGE_ITEM_THRESHOLD:i,VARIANT_PAGINATION:c,...l})=>{const{router:u,pathname:m}=ce(),{state:{page:p=1}}=ze(),{pagination:{total:f}}=on(),{endPage:h,totalPages:_,startPage:y}=Hg({currentPage:p,total:f,maxVisiblePages:a,SEARCH_PAGE_ITEM_THRESHOLD:i}),x=C=>{const j=C.toString(),b=new URLSearchParams(r.toString());t==="default"&&b.set("page",j),t==="search"&&(b.set("query",e??""),b.set("count",o.toString()),b.set("page",j),s&&b.set("sort",s.replace("_",":")));const S=`${t==="search"?"/search":m}?${b.toString()}`;u.push(S)},v=C=>{x(C==="prev"?p-1:p+1)};return f?n.jsx("div",{...l,className:Ge["pdc--pagination"],children:n.jsx(d.Pagination.Wrapper,{adornment:{start:n.jsx(ls,{callback:v,currentPage:p,disabled:p<2,type:"left"}),end:n.jsx(ls,{callback:v,currentPage:p,disabled:p>=_,type:"right"})},children:n.jsx(md,{endPage:h,page:p,selectedPage:x,total:f,ITEMS_PER_SECTION:a,children:n.jsx(pd,{currentPage:p,pages:qg(y,h),searchParams:r,VARIANT_PAGINATION:c})})})}):n.jsx(n.Fragment,{})};co.displayName="Pagination";const fd=({gap:e,isMobile:t,className:r})=>{const{count:s,state:a}=ze(),{banners:o}=Gn(),{ICONS:i,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u}=De(),m=o.filter(p=>Mi(p.position_grid,a.page,s));return Array.isArray(m)?m.map((p,f)=>n.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:n.jsx(cn,{name:"Banner Carousel",data:{banner:p,componentIndex:f},creative:"banner_grid",ICONS:i,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u,className:r})},p.position_grid)):null};fd.displayName="PDC.Grid.Banners";const lo=({isMobile:e=!1,items:t,BUY_BUTTON_LABELS:r,ICONS:s,MAIN_IMAGE:a,NEWSLETTER_CONFIGS:o,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:x,StoreConfig_MainSellerId:v,TEXTURE_IMAGE:C,Z_INDEX_WAR:j})=>{const{getAvailableProductTag:b}=_t(),{count:w,state:S}=ze(),[P,N]=g.useState(!1),[R,k]=g.useState(null),[O,M]=g.useState([]),X=g.useCallback((Q,G)=>{const H=G?Vn([G]):null;M(Q),k(H!=null&&H.length?H[0]:null),N(!0)},[]),D=e?8:16,q=(S.page-1)*w,U=st.helpers.createGridPosAndVideo(t,[],e?2:4,S.page);return n.jsxs(n.Fragment,{children:[n.jsxs(st.Root,{children:[Array.isArray(t)&&t.map((Q,G)=>{var J,se;const H=b(Q.node.cluster.highlights);return n.jsx(st.Card,{gap:D,isMobile:e??!1,item:Q.node,order:q+(((J=U[G])==null?void 0:J.position)??0),tag:H,index:G,setSkuSelected:X,showVideo:(se=U[G])==null?void 0:se.canPlayVideo,CONSTANTS:{BUY_BUTTON_LABELS:r,MAIN_IMAGE:a,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:x,StoreConfig_MainSellerId:v,TEXTURE_IMAGE:C,Z_INDEX_WAR:j,ICONS:s}},Q.node.sku)}),t.length>0&&n.jsx(fd,{gap:D,isMobile:e??!1})]}),n.jsx(Wn,{open:P,sku:R,skus:O,setSku:k,setVisible:N,ICONS:s,NEWSLETTER_CONFIGS:o,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:h,Z_INDEX_WAR:j})]})};lo.displayName="PDC.Products";const tt={Empty:Zs,Filters:Zu,Grid:Ju,InfiniteScroller:ud,Spinner:Qn,Navigation:dd,Notification:Wn,Pagination:co,Products:lo},hd=({className:e,...t})=>{const{searchParams:r,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:a,ITEMS_PER_PAGE:o,PLP_INFINITE_SCROLL:i,SEARCH_PAGE_ITEM_THRESHOLD:c,VARIANT_PAGINATION:l}=t;return n.jsx(Km,{...t,children:n.jsxs("div",{className:d.helpers.classNameConcat(Ge.pdc,e),children:[n.jsxs(Pi,{forceUpdate:!0,children:[n.jsx(tt.Navigation,{}),n.jsx(tt.Filters,{})]}),i===!0?n.jsx(tt.Grid,{infinite:!0}):n.jsxs(Bs,{forceUpdate:!0,query:r.get("query")??void 0,children:[n.jsx(tt.Grid,{}),n.jsx(tt.Pagination,{searchParams:r,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:a,ITEMS_PER_PAGE:o,SEARCH_PAGE_ITEM_THRESHOLD:c,VARIANT_PAGINATION:l})]})]})})};hd.displayName="Templates.PDC";const _d=g.createContext({}),$g=({children:e,...t})=>n.jsx(_d.Provider,{value:t,children:e}),or=()=>{const e=g.useContext(_d);if(e===void 0)throw new Error("useSearchConstants must be used within a SearchConstantsProvider");return e},Vg="_grid_e75z7_21",Wg="_navigation_e75z7_44",Gg="_spinner_e75z7_70",Kg="_sort_e75z7_76",ft={"rearch-result--empty":"_rearch-result--empty_e75z7_1",grid:Vg,"grid-header":"_grid-header_e75z7_37",navigation:Wg,"result-disclaimer":"_result-disclaimer_e75z7_51",spinner:Gg,sort:Kg,"search-result":"_search-result_e75z7_91"},gd=({term:e})=>{const{router:t}=ce(),{SEARCH_RESULT:r,ICONS:s}=or(),a=()=>{t.push(r.EMPTY.ALL_TERMS)};return n.jsxs("div",{className:ft["rearch-result--empty"],children:[n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("div",{className:T.responsive["responsive-desktop-flex"],children:n.jsx("h2",{className:"typography-style-heading-sm",children:r.EMPTY.NOT_FOUND})}),n.jsx("div",{className:T.responsive["responsive-mobile-flex"],children:n.jsx("h2",{className:"typography-style-body-md",children:r.EMPTY.NOT_FOUND})}),n.jsxs("p",{children:[r.EMPTY.NOT_FOUND_P," ",`"${e}"`]})]}),n.jsx(d.Button,{onClick:()=>a(),variant:"tertiary",size:"medium",adornment:{end:n.jsx(d.Icon,{name:s.arrow_right,size:"medium"})},children:r.EMPTY.ALL_TERMS_LABEL})]})};gd.displayName="RearchResult.Empty";const Xg=e=>n.jsxs(n.Fragment,{children:[n.jsx("div",{className:T.responsive["responsive-desktop-flex"],children:n.jsx("h2",{className:"typography-style-heading-sm",children:e.SEARCH.SEARCHING})}),n.jsx("div",{className:T.responsive["responsive-mobile-flex"],children:n.jsx("h2",{className:"typography-style-body-md",children:e.SEARCH.SEARCHING})}),n.jsx(d.Spinner,{className:ft.spinner})]}),Yg=(e,t,r)=>n.jsxs(n.Fragment,{children:[n.jsx("div",{className:T.responsive["responsive-desktop-flex"],children:n.jsx("h2",{className:"typography-style-heading-sm",children:t.SEARCH.SEARCHED})}),n.jsx("div",{className:T.responsive["responsive-mobile-flex"],children:n.jsx("h2",{className:"typography-style-body-md",children:t.SEARCH.SEARCHED})}),n.jsxs("p",{children:[t.SEARCH.SEARCHED_P_START," ",e," ",t.SEARCH.SEARCHED_P_END," ",`"${r}"`]})]}),yd=({isLoading:e,quantity:t,term:r})=>{const{SEARCH_RESULT:s}=or();return n.jsx(d.TextStructure.DivWrapper,{children:e?Xg(s):Yg(t,s,r)})};yd.displayName="Search.Loading";const Qg=({term:e})=>{const[t,r]=g.useState(!1),{router:s}=ce(),{searchParams:a}=ze(),{ITEMS_DEFAULT_SORT:o,ITEMS_PER_PAGE:i,ICONS:c}=or(),l=u=>{T.navigateToSearchPage(s,e,i,1,u??o)};return n.jsx("div",{className:ft.sort,children:n.jsx(tr,{handleSelectValue:u=>l(u??"release_desc"),sortListOpen:t,setSortListOpen:r,searchParams:a,ICONS:c})})},Zg=({query:e})=>{const{isLoading:t,products:r,pagination:s}=on();return n.jsxs("div",{className:ft["grid-header"],children:[n.jsxs("div",{className:ft.navigation,children:[!t&&(r!=null&&r.length)?n.jsx(Qg,{term:e}):null,n.jsx(d.Utils.Divider,{})]}),!t&&(r!=null&&r.length)?n.jsx("div",{className:ft["result-disclaimer"],children:n.jsx(yd,{term:e,isLoading:t,quantity:s.count})}):null]})},xd=({isMobile:e=!1,query:t})=>{const{isLoading:r,products:s,pagination:a}=on(),{searchParams:o}=ze(),i=or(),{sendDataLayerEvent:c}=ae(),l=g.useRef({query:t,sended:!1}),u=g.useMemo(()=>!r&&s.length>0&&a.count>0,[r,s.length,a.count]);return g.useEffect(()=>{if(!r){if(l.current.query!==t){l.current.sended=!1,l.current.query=t;return}l.current.sended||(c({functionKey:"readyEvents",data:{event:"view_search_results",readyData:{search_term:t,search_found:(s==null?void 0:s.length)>0}}}),l.current.sended=!0)}},[t,s,r,c]),n.jsxs("div",{className:ft.grid,children:[u?n.jsx(Zg,{query:t}):n.jsx(n.Fragment,{}),!r&&(s!=null&&s.length)?n.jsx(lo,{isMobile:e??!1,items:s,...i}):n.jsx(n.Fragment,{}),(s==null?void 0:s.length)===0&&!r?n.jsx(gd,{term:t}):null,u&&n.jsx(co,{searchParams:o,...i})]})};xd.displayName="SearchResultContent";const Jg=({className:e})=>{const{state:t}=ze(),{isMobile:r}=ne();return n.jsx(Bs,{forceUpdate:!1,query:t.term??"",children:n.jsx("div",{className:d.helpers.classNameConcat(ft["search-result"],e),children:n.jsx(xd,{currentPage:t.page,isMobile:r??!1,query:t.term??""})})})},vd=({className:e,searchParams:t,CONSTANTS:r})=>{const s=new URLSearchParams(t??""),a=String((s==null?void 0:s.get("query"))??""),o=Number((s==null?void 0:s.get("count"))??0),i=Number((s==null?void 0:s.get("page"))??0),c=String((s==null?void 0:s.get("sort"))??"");return n.jsx($g,{...r,children:n.jsx(zs,{sort:c,state:{sort:c,base:"",facets:[],term:a,page:i,count:o},count:o,searchParams:s,ITEMS_PER_PAGE:r.ITEMS_PER_PAGE,children:n.jsx(Jg,{className:e})})})};vd.displayName="Search";const ey=({page:e,data:t})=>{const{pathname:r}=ce(),s=g.useRef(null),{sendDataLayerEvent:a,currentLocalRef:o,itemListRef:i,promotionEventRef:c}=ae();return g.useEffect(()=>{const l=Fi("login_event")||"{}",u=JSON.parse(l);if(u.name||u.method){const m=new Date(0);a({functionKey:"readyEvents",data:{event:u.name,readyData:{method:u.method}}}),Hs("login_event","",{expires:m})}},[]),g.useEffect(()=>{if(s.current===r)return;s.current=r;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}=Ua(),_=h,y=f;l={page_category:"lista_produtos",...p&&{page_departament:p}},i.current={item_list_name:r==="/search"?"busca":_??void 0,item_list_id:r==="/search"?void 0:y??void 0},p&&a({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};o.current=e,a({functionKey:"readyEvents",data:{readyData:{vtex_version:"fast",...u}},timeout:0})},[r]),null};var ds={exports:{}},En={exports:{}},xa;function ty(){return xa||(xa=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(l,u){for(var m in u)Object.defineProperty(l,m,{enumerable:!0,get:u[m]})}r(t,{DOMAttributeNames:function(){return s},default:function(){return c},isEqualNode:function(){return o}});const s={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function a(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 o(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 v=p[y].nextSibling;(v==null||(h=v.tagName)==null?void 0:h.toLowerCase())===l&&f.push(v)}const _=u.map(a).filter(y=>{for(let x=0,v=f.length;x<v;x++){const C=f[x];if(o(C,y))return f.splice(x,1),!1}return!0});f.forEach(y=>{var x;const v=y.previousSibling;if(v&&v.getAttribute("name")==="next-head"){var C;(C=y.parentNode)==null||C.removeChild(v)}(x=y.parentNode)==null||x.removeChild(y)}),_.forEach(y=>{var x;const v=document.createElement("meta");v.name="next-head",v.content="1",((x=y.tagName)==null?void 0:x.toLowerCase())==="meta"&&y.getAttribute("charset")||m.appendChild(v),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 x=0,v=p.previousElementSibling;x<f;x++,v=(v==null?void 0:v.previousElementSibling)||null){var _;(v==null||(_=v.tagName)==null?void 0:_.toLowerCase())===l&&h.push(v)}const y=u.map(a).filter(x=>{for(let v=0,C=h.length;v<C;v++){const j=h[v];if(o(j,x))return h.splice(v,1),!1}return!0});h.forEach(x=>{var v;return(v=x.parentNode)==null?void 0:v.removeChild(x)}),y.forEach(x=>m.insertBefore(x,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)}(En,En.exports)),En.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function r(S,P){for(var N in P)Object.defineProperty(S,N,{enumerable:!0,get:P[N]})}r(t,{default:function(){return w},handleClientScriptLoad:function(){return x},initScriptLoader:function(){return j}});const s=ke,a=jt,o=n,i=s._(ws),c=a._(g),l=Au(),u=ty(),m=Tc(),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(N=>{let R=document.createElement("link");R.type="text/css",R.rel="stylesheet",R.href=N,P.appendChild(R)})}},y=S=>{const{src:P,id:N,onLoad:R=()=>{},onReady:k=null,dangerouslySetInnerHTML:O,children:M="",strategy:X="afterInteractive",onError:D,stylesheets:q}=S,U=N||P;if(U&&f.has(U))return;if(p.has(P)){f.add(U),p.get(P).then(R,D);return}const Q=()=>{k&&k(),f.add(U)},G=document.createElement("script"),H=new Promise((J,se)=>{G.addEventListener("load",function(de){J(),R&&R.call(this,de),Q()}),G.addEventListener("error",function(de){se(de)})}).catch(function(J){D&&D(J)});O?(G.innerHTML=O.__html||"",Q()):M?(G.textContent=typeof M=="string"?M:Array.isArray(M)?M.join(""):"",Q()):P&&(G.src=P,p.set(P,H));for(const[J,se]of Object.entries(S)){if(se===void 0||h.includes(J))continue;const de=u.DOMAttributeNames[J]||J.toLowerCase();G.setAttribute(de,se)}X==="worker"&&G.setAttribute("type","text/partytown"),G.setAttribute("data-nscript",X),q&&_(q),document.body.appendChild(G)};function x(S){const{strategy:P="afterInteractive"}=S;P==="lazyOnload"?window.addEventListener("load",()=>{(0,m.requestIdleCallback)(()=>y(S))}):y(S)}function v(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 N=P.id||P.getAttribute("src");f.add(N)})}function j(S){S.forEach(x),C()}function b(S){const{id:P,src:N="",onLoad:R=()=>{},onReady:k=null,strategy:O="afterInteractive",onError:M,stylesheets:X,...D}=S,{updateScripts:q,scripts:U,getIsSsr:Q,appDir:G,nonce:H}=(0,c.useContext)(l.HeadManagerContext),J=(0,c.useRef)(!1);(0,c.useEffect)(()=>{const de=P||N;J.current||(k&&de&&f.has(de)&&k(),J.current=!0)},[k,P,N]);const se=(0,c.useRef)(!1);if((0,c.useEffect)(()=>{se.current||(O==="afterInteractive"?y(S):O==="lazyOnload"&&v(S),se.current=!0)},[S,O]),(O==="beforeInteractive"||O==="worker")&&(q?(U[O]=(U[O]||[]).concat([{id:P,src:N,onLoad:R,onReady:k,onError:M,...D}]),q(U)):Q&&Q()?f.add(P||N):Q&&!Q()&&y(S)),G){if(X&&X.forEach(de=>{i.default.preinit(de,{as:"style"})}),O==="beforeInteractive")return N?(i.default.preload(N,D.integrity?{as:"script",integrity:D.integrity,nonce:H,crossOrigin:D.crossOrigin}:{as:"script",nonce:H,crossOrigin:D.crossOrigin}),(0,o.jsx)("script",{nonce:H,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([N,{...D,id:P}])+")"}})):(D.dangerouslySetInnerHTML&&(D.children=D.dangerouslySetInnerHTML.__html,delete D.dangerouslySetInnerHTML),(0,o.jsx)("script",{nonce:H,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...D,id:P}])+")"}}));O==="afterInteractive"&&N&&i.default.preload(N,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)})(ds,ds.exports);var ny=ds.exports,ry=ny;const uo=T.getDefaultExportFromCjs(ry),sy=({children:e,ONE_TRUST:t})=>n.jsxs(n.Fragment,{children:[n.jsx(uo,{src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",defer:!0,strategy:"afterInteractive","data-domain-script":t.siteId,type:"text/javascript"}),e]}),oy=El(()=>Promise.resolve(sy),{ssr:!1}),ay="_lgpd_vffd3_82",iy="_success_vffd3_248",cy="_error_vffd3_312",xe={"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:ay,"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:iy,"text-structure-modifier":"_text-structure-modifier_vffd3_257","success-title":"_success-title_vffd3_297","close-button":"_close-button_vffd3_302",error:cy,"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"},bd=({invalid_message:e,master_data_field:t,placeholder:r,required:s=!1,CONSTANTS:a})=>{const{isMobile:o}=ne(),{inputsStatus:i,setInputsStatus:c,setFormStatus:l,variant:u}=Ws();return n.jsx(d.TextField.Structure,{className:`${xe["textfield-structure-modifier"]} ${u}`,input:n.jsx(d.TextField.Input,{mode:"simple",label:r,sizeVariant:o?a.NEWSLETTER_CONFIGS.interactionSizeMob:a.NEWSLETTER_CONFIGS.interactionSizeDesk,name:t,className:`${xe["input-wrapper-modifier"]} ${u}`,feedback:i[t]==="required"?"error":i[t],onChange:()=>{i[t]!=="none"&&(c(m=>({...m,[t]:"none"})),l("idle"))},required:s}),supportText:i[t]==="error"||i[t]==="required"?n.jsx("div",{className:u==="horizontal"?xe["support-text-modifier"]:"",children:n.jsx(d.TextField.SupportText,{text:i[t]==="error"?e??a.NEWSLETTER_CONFIGS.messages.invalid_generic:a.NEWSLETTER_CONFIGS.messages.required_field,feedback:"error"})}):null})};bd.displayName="Newsletter.Input";const jd=({formStatus:e,fields:t,CONSTANTS:r})=>n.jsxs(n.Fragment,{children:[Array.isArray(t)&&t.map((s,a)=>n.jsx(bd,{invalid_message:s.invalid_message,master_data_field:s.master_data_field,placeholder:s.placeholder,required:s.required,type:s.type,CONSTANTS:r},`nt-field-${s.master_data_field}-${a}`)),e==="error"&&n.jsx("div",{className:xe.error,children:n.jsx("p",{children:r.NEWSLETTER_CONFIGS.form.status.error})})]});jd.displayName="Newsletter.FormFields";const Cd=({formStatus:e,CONSTANTS:t,...r})=>{const{isMobile:s}=ne();return n.jsxs(d.Button,{...r,className:xe["submit-btn"],disabled:e==="success",size:s?"medium":"large",children:[n.jsx("span",{"data-loading":e==="loading","data-label":!0,children:t.NEWSLETTER_CONFIGS.submitLabel}),t.NEWSLETTER_CONFIGS.hasLoadingState&&e==="loading"&&n.jsx(d.Spinner,{className:xe["loading-spinner"],size:"small"})]})};Cd.displayName="Newsletter.SubmitButton";const Sd=({checkboxRef:e,formStatus:t,setFormStatus:r,CONSTANTS:s})=>{const a=o=>{o.target.checked?(e.current=!0,t==="unchecked"&&r("idle")):e.current=!1};return n.jsxs(n.Fragment,{children:[n.jsx(d.Checkbox,{adornment:n.jsx(d.Icon,{name:s.ICONS.check,size:"x-small"}),defaultChecked:e.current,disabled:t==="success",name:"terms-and-conditions",label:s.NEWSLETTER_CONFIGS.messages.accept_terms_and_conditions,onChange:a,sizeVariant:"small",className:xe["terms-and-conditions-checkbox"]}),t==="unchecked"&&n.jsx("div",{className:xe["terms-and-conditions-unchecked"],children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:s.ICONS.alert_circle,size:"small"})},children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{children:s.NEWSLETTER_CONFIGS.messages.terms_and_conditions_not_accepted})})})})]})};Sd.displayName="Newsletter.Terms";const Pd=({title:e,description:t,CONSTANTS:r})=>n.jsx("div",{className:xe.success,children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{className:xe["text-structure-modifier"],children:[n.jsxs("div",{className:xe["success-title"],children:[n.jsx(d.Icon,{name:r.ICONS.check_circle,size:"medium"}),n.jsx("h3",{children:e})]}),n.jsx("p",{children:t})]})})});Pd.displayName="Newsletter.Success";const wd=({formPayloadOptionals:e,masterDataEntity:t,banner:r,termsDescription:s,lgpdLinkLable:a,lgpdLink:o,variant:i,CONSTANTS:c})=>{const{checkboxRef:l,fields:u,formStatus:m,hasTermsAndConditions:p,handleClickToSubmit:f,handleSubmit:h,setFormStatus:_}=Ws();return n.jsx(n.Fragment,{children:m==="success"?n.jsx(Pd,{description:c.NEWSLETTER_CONFIGS.messages.success_description,title:c.NEWSLETTER_CONFIGS.messages.success_title,CONSTANTS:c}):n.jsxs(n.Fragment,{children:[n.jsxs("form",{className:xe["form-wrapper"],onSubmit:y=>h(y,e,t),children:[n.jsx(jd,{formStatus:m,fields:u,CONSTANTS:c}),p&&n.jsx(Sd,{checkboxRef:l,formStatus:m,setFormStatus:_,CONSTANTS:c}),n.jsx(Cd,{formStatus:m,type:"submit",variant:"primary",onClick:f,CONSTANTS:c})]}),(r||i==="vertical")&&n.jsxs("div",{className:xe.lgpd,children:[s&&n.jsx("p",{children:s}),a&&n.jsx(Oe,{href:o,children:a})]})]})})};wd.displayName="Newsletter.Form";const ly=["horizontal","vertical"],mo=({className:e,description:t,formPayloadOptionals:r,fields:s,masterDataEntity:a,masterDataEmailField:o,masterDataNameField:i,banner:c,altBanner:l,bannerBackground:u,termsDescription:m,lgpdLinkLable:p,lgpdLink:f,title:h,variant:_,borderTop:y,borderBottom:x,CONSTANTS:v,...C})=>{if(!o||!i)return null;const j=d.helpers.ValidateProp({fieldTypes:ly,property:_,fallback:"horizontal"});return n.jsxs("div",{className:c?u?xe["banner-background"]:xe["newsletter-wrapper"]:"",children:[c&&n.jsx(d.Banner.Container,{className:xe["banner-container"],children:n.jsx(d.Banner.ImageWrapper,{children:n.jsx(we.Image,{src:c,alt:l,width:"1920",height:"500"})})}),n.jsx("div",{className:c?xe["newsletter-provider-wrapper"+(u?"-background":"")]:"",children:n.jsx(sc,{fields:s,masterDataEmailField:o,masterDataNameField:i,variant:j,CONSTANTS:v,children:n.jsx("div",{...C,className:d.helpers.classNameConcat(xe["newsletter-root"+(c||j==="vertical"?"-banner":"")],[y&&xe["has-border-top"],x&&xe["has-border-bottom"],e].filter(Boolean)),"data-variant":j,children:n.jsxs("div",{className:c||j==="vertical"?xe["newsletter-container-banner"]:xe["newsletter-container"],children:[n.jsxs("div",{className:xe["content-text"],children:[n.jsx("h2",{children:h}),n.jsx("p",{children:t}),!c&&j==="horizontal"&&n.jsxs("div",{className:xe.lgpd,children:[n.jsx("p",{children:m}),p&&n.jsx(Oe,{target:"_blank",href:f,children:p})]})]}),n.jsx(wd,{formPayloadOptionals:r,masterDataEntity:a,CONSTANTS:v,banner:c,lgpdLink:f,lgpdLinkLable:p,termsDescription:m,variant:j})]})})})})]})};mo.displayName="Newsletter";const Nd=({children:e,...t})=>n.jsx("div",{...t,children:e});Nd.displayName="CallToAction";const uy="_wrapper_aejhu_1",dy="_body_aejhu_8",qn={wrapper:uy,body:dy,"wrapper-body":"_wrapper-body_aejhu_16","accordion-modifier":"_accordion-modifier_aejhu_32"},my=({children:e,className:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat(qn.wrapper,t),children:e}),py=({data:e,ICONS:t})=>{const[r,s]=g.useState(null),a=i=>{s(c=>c===i?null:i)},{router:o}=ce();return n.jsx("div",{className:d.helpers.classNameConcat(qn.body),children:Array.isArray(e)&&(e==null?void 0:e.map((i,c)=>{var p;const l=r===i.id,u=i.buttonHref&&i.buttonHref!=="#",m=i.buttonHref&&i.type==="button"&&u?{onClick:()=>{var f;if((f=i.buttonHref)!=null&&f.startsWith("/")){o.push(i.buttonHref);return}window.open(i.buttonHref,"_blank")}}:{};return n.jsx("div",{children:i.type==="button"?n.jsxs(n.Fragment,{children:[n.jsx(d.Button,{variant:"tertiary",mode:i.buttonMode??"default",size:i.buttonSize??"medium",iconNameStart:t[i.buttonIcon]??i.buttonIcon,...m,style:{marginTop:16},children:i.buttonLabel}),n.jsx(d.Utils.Divider,{direction:"horizontal",size:"small",style:{height:16}})]}):n.jsxs(d.Accordion.Wrapper,{className:d.helpers.classNameConcat(qn["accordion-modifier"]),children:[n.jsx(d.Accordion.Header,{id:`${c}-${i.title}`,closeIndicator:l?n.jsx(d.Icon,{name:t.arrow_up,size:"medium"}):void 0,openIndicator:l?void 0:n.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),title:"accordion-header",onClick:()=>a(i.id),children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h2",{className:"typography-style-body-sm",children:i.title})})})}),n.jsx(d.Accordion.Body,{title:"accordion-body",children:n.jsx(d.TextStructure.Root,{children:l&&n.jsxs(d.TextStructure.DivWrapper,{children:[i.subtitle?n.jsx("h3",{className:"typography-style-body-md",children:i.subtitle}):n.jsx(n.Fragment,{}),n.jsx("p",{className:"typography-style-caption",children:i.description}),i.buttonLabel&&i.buttonHref?n.jsx(Oe,{href:i.buttonHref??"#",mode:i.buttonMode??"default",size:i.buttonSize??"medium",adornments:(p=i.buttonIcon)!=null&&p.length?{end:n.jsx(d.Icon,{name:t[i.buttonIcon]??i.buttonIcon})}:void 0,children:i.buttonLabel}):n.jsx(n.Fragment,{})]})})})]})},i.id)}))})},fy=({className:e,data:t,ICONS:r,...s})=>{const[a,o]=g.useState(!1),[i,c]=g.useState(null);g.useEffect(()=>{!a&&!i&&t&&c(t)},[a,i]);const l=g.useCallback(()=>{o(u=>!u)},[]);return i?n.jsxs(my,{...s,className:e,children:[n.jsx("div",{className:qn["wrapper-body"],hidden:!a,children:a&&n.jsx(py,{data:i.content,ICONS:r})}),n.jsx(Nd,{children:n.jsx("div",{onClick:l,children:a?n.jsx(d.Button,{iconNameEnd:r.close,size:(i==null?void 0:i.helpButtonSize)??"x-large"}):n.jsx(d.Button,{iconNameStart:(i==null?void 0:i.iconLabel)??r.help,size:(i==null?void 0:i.helpButtonSize)??"x-large",children:i==null?void 0:i.label})})})]}):n.jsx(n.Fragment,{})},hy="_formContainer_zwlly_1",_y="_formFieldGroup_zwlly_6",gy="_formFieldGroupName_zwlly_10",yy="_formFieldWrapper_zwlly_20",xy="_formFieldInput_zwlly_30",vy="_success_zwlly_73",by="_button_zwlly_110",jy="_error_zwlly_114",ot={formContainer:hy,formFieldGroup:_y,formFieldGroupName:gy,formFieldWrapper:yy,formFieldInput:xy,success:vy,"text-structure-modifier":"_text-structure-modifier_zwlly_85",button:by,error:jy},Cy=({group:e,children:t,className:r})=>n.jsx(n.Fragment,{children:n.jsxs("div",{className:d.helpers.classNameConcat(ot.formFieldGroup,r),children:[n.jsx("h1",{className:ot.formFieldGroupName,children:e.groupLabel}),t]},e.groupLabel)});async function Sy(e){const t=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-1",t);return Array.from(new Uint8Array(r)).map(o=>o.toString(16).padStart(2,"0")).join("")}const Py=async e=>await fetch("/api/dito-ingest",{method:"POST",body:JSON.stringify(e)}).then(r=>r.json()),Ed=g.createContext({});function Id({children:e,groups:t,masterDataEntity:r,postFn:s,actionName:a="",originName:o="",POPUP_SUBMITTED_STORAGE:i}){const[c,l]=g.useState(!1),[u,m]=g.useState({}),[p,f]=g.useState([]),[h,_]=g.useState("idle"),[y,x]=g.useState(""),v=({target:{name:j,value:b}})=>{m({...u,[j]:b})},C=j=>{j.preventDefault(),s({body:{masterDataEntity:r,payload:u}}).then(async({Message:b})=>{if(b){const S=b.match(/'(.*?[^\\])'/g)||[];var w="-";for(const P of S){const N=P.substring(1,P.length-1),k=t.flatMap(O=>O.fields).find(({name:O})=>O===N);x(N),k&&(w=k.name)}return _("error"),f([w])}if(u.email){const S=await Sy(u.email||""),P=new Date().toISOString();Py([{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:a,timestamp:P,type:"TRACK",user_id:S,context:{user_agent:navigator.userAgent},properties:{custom_data:{email:u.email,nome:u.name,origem:o,...u}}}])}return window.localStorage.setItem(i,"true"),m({}),l(!0),_("success"),f([])})};return n.jsx(Ed.Provider,{value:{formErrors:p,handleInputChange:v,submitForm:C,formData:u,status:h,fieldMessage:y,success:c,setSuccess:l},children:e})}function ar(){return g.useContext(Ed)}const wy=({fields:e,className:t})=>{const{formData:r,handleInputChange:s,formErrors:a}=ar();return n.jsx("div",{className:d.helpers.classNameConcat(ot.formFieldWrapper,t),children:e.map(({label:o,name:i,required:c,width:l="medium"})=>n.jsx(d.TextField.Input,{label:`${o}${c?"*":""}`,title:i,value:r[i]||"",name:i,sizeVariant:"large",onChange:s,required:c,feedback:a.includes(i)?"error":"none",className:ot.formFieldInput,"data-inputsize":l},i))})},Ny=({FORM_CONFIGS:e,ICONS:t})=>{const{router:r}=ce();return n.jsxs("div",{className:ot.success,children:[n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:t.check_circle,size:"medium"})},children:n.jsx(d.TextStructure.DivWrapper,{className:ot["text-structure-modifier"],children:n.jsx("p",{children:e.successMessage})})}),n.jsx(d.Button,{size:"large",onClick:()=>r.push("/"),className:ot.button,children:e.returnButton})]})},Ey=({FORM_CONFIGS:e,ICONS:t})=>{const{fieldMessage:r}=ar();return n.jsx("div",{className:ot.error,children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:t.delete_circle,size:"small"})},children:n.jsx(d.TextStructure.DivWrapper,{className:ot["text-structure-modifier"],children:n.jsxs("p",{children:[e.errorMessage,r]})})})})},Iy=({children:e,className:t,ICONS:r,FORM_CONFIGS:s})=>{const{submitForm:a,status:o}=ar();return n.jsx("form",{onSubmit:a,className:d.helpers.classNameConcat(ot.formContainer,t),children:o==="success"?n.jsx(Ny,{ICONS:r,FORM_CONFIGS:s}):n.jsxs(n.Fragment,{children:[e,o==="error"&&n.jsx(Ey,{ICONS:r,FORM_CONFIGS:s})]})})},Ry=e=>{const{children:t,className:r}=e;return n.jsx(Id,{...e,children:n.jsx(Iy,{ICONS:e.ICONS,FORM_CONFIGS:e.FORM_CONFIGS,className:r,children:t})})},Mt={Root:Ry,FieldGroup:Cy,FieldWrapper:wy},Ty="_button_1e35m_39",yt={"banner-container":"_banner-container_1e35m_1","banner-background":"_banner-background_1e35m_6","form-root":"_form-root_1e35m_15",button:Ty,"form-fied-wrapper":"_form-fied-wrapper_1e35m_52"};function Ay({content:e,sections:t,FORM_CONFIGS:r,ICONS:s,postFn:a,POPUP_SUBMITTED_STORAGE:o}){var l;const{isMobile:i}=ne(),c=((l=t.find(({name:u})=>u==="Form"))==null?void 0:l.data)||{};return n.jsx("div",{children:n.jsxs(d.Banner.Container,{className:yt["banner-container"],children:[n.jsx(d.Banner.ImageWrapper,{children:n.jsx(we.Image,{className:yt["banner-background"],src:i?e.bannerMobile:e.bannerDesk,alt:e.altBanner,width:"1920",height:"500"})}),n.jsxs(Mt.Root,{postFn:a,ICONS:s,FORM_CONFIGS:r,groups:c.groups||[],masterDataEntity:c.masterDataEntity||"",className:yt["form-root"],POPUP_SUBMITTED_STORAGE:o,children:[c.groups.map(u=>n.jsx(Mt.FieldGroup,{group:u,children:n.jsx(Mt.FieldWrapper,{fields:u.fields,className:yt["form-fied-wrapper"]})},u.groupLabel)),n.jsxs("div",{children:[n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{className:"typography-style-body-xs",children:e.requiredMessage})}),n.jsx("div",{className:yt["button-wrapper"],children:n.jsx("div",{className:yt["button-frame"],children:n.jsx(d.Button,{size:"large",type:"submit",className:yt.button,children:e.buttonLabel})})})]})]})]})})}const ky="_content_1jj9i_36",Oy="_trends_1jj9i_47",Ly="_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:ky,trends:Oy,"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:Ly,"search-modal__modal":"_search-modal__modal_1jj9i_100"},Rd=g.createContext({}),My=({children:e,term:t})=>{const[r,s]=g.useState([]),[a,o]=g.useState(!1);return g.useEffect(()=>{if(!t){s([]);return}(async()=>{o(!0);try{const c=await T.fetchProxy("/_v/proxy/search/suggestedTerms",{method:"POST",body:JSON.stringify({query:t,locale:"pt-BR"})}),{data:l}=await c.json();s((l==null?void 0:l.searches)||[])}catch(c){console.error("Erro ao buscar sugestões:",c)}})()},[t]),n.jsx(Rd.Provider,{value:g.useMemo(()=>({suggestedTerms:r,loading:a,setLoading:o}),[r,a]),children:e})},Dy=({children:e,...t})=>n.jsx(My,{...t,children:e}),Fy=()=>{const e=g.useContext(Rd);if(!e)throw new Error("useSuggestedTermsContext must be used within a SuggestedTermsProvider");return e},Hr=(e,t,r=24,s=1,a="release:desc")=>{const o=`/search?query=${t??""}&count=${r}&page=${s}${a?`&sort=${a.replace("_",":")}`:""}`;e.push(o)},Td=({placeholder:e,noResultsTitle:t,noResultsLabel:r,noResultsTermText:s,handleClose:a,setTerm:o,ICONS:i,ITEMS_DEFAULT_SORT:c,ITEMS_PER_PAGE:l,SEARCH_MODAL:u})=>{const[m,p]=g.useState(""),{suggestedTerms:f,loading:h,setLoading:_}=Fy(),{router:y}=ce(),x=g.useRef(null),v=b=>{p(b.target.value),clearTimeout(x.current),b.target.value.length>2&&(o(b.target.value),x.current=setTimeout(()=>{o(b.target.value),_(!1)},2e3))},C=b=>{b.key==="Enter"&&(m==null?void 0:m.length)>2&&(a(),Hr(y,m,l,1,c))},j=b=>{a(),Hr(y,b,l,1,c)};return g.useEffect(()=>{if(clearTimeout(x.current),m.length<=2||f.length>0){_(!1);return}return _(!0),x.current=setTimeout(()=>{Hr(y,m,l,1,c),_(!1),a()},2e3),()=>{clearTimeout(x.current)}},[m,f]),n.jsx(d.DropDown.AutoComplete,{className:qe["modal-auto-complete"],onKeyDown:C,onInputChange:v,placeholder:e,stopClickPropagation:!1,adornment:{end:h?n.jsx(d.Spinner,{size:"small"}):n.jsx(d.Button,{variant:"tertiary",size:"small",iconNameStart:i.search,onClick:()=>{j(m)},disabled:!(m.length>2)})},children:(f==null?void 0:f.length)>0&&n.jsx(n.Fragment,{children:(f==null?void 0:f.length)>0&&(m==null?void 0:m.length)>2?n.jsx(d.DropDown.AutoCompleteList,{className:qe["modal-auto-complete__dropdown"],seeAll:n.jsx("span",{onClick:()=>j(m),children:s+m}),children:f.map((b,w)=>n.jsx(d.DropDown.ListItemWithLink,{children:n.jsx(Oe,{href:`/search?query=${b.term}&count=${l}&page=1`,size:"x-small",title:b.term,disableUnderline:!0,disablePadding:!1,onClick:S=>{S.preventDefault(),a()},children:b.term})},`key-${b.term}-${w}`))}):!h&&(m==null?void 0:m.length)>3&&(f==null?void 0:f.length)===0&&n.jsxs(d.DropDown.AutoCompleteList,{className:qe["modal-search-empty"],children:[n.jsx(d.DropDown.NotResults,{description:r,title:t}),n.jsx(d.Button,{className:"all-terms",onClick:()=>{a(),y.push(u.EMPTY.ALL_TERMS)},variant:"tertiary",size:"medium",title:u.EMPTY.ALL_TERMS_LABEL,adornment:{end:n.jsx(d.Icon,{name:i.arrow_right,size:"medium"})},children:u.EMPTY.ALL_TERMS_LABEL})]})})})};Td.displayName="SearchModal.AutoComplete";function zy({title:e,ICONS:t}){const{isMobile:r}=ne();return n.jsx(d.Modal.Header,{navigation:"top",className:qe["modal-header"],children:n.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!r,children:[n.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),n.jsx(d.Modal.Title,{navigation:"top",className:qe["search-modal__title"],title:e}),n.jsx(d.Button,{className:qe["modal-header__close-button"],"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})})}const Ad=g.createContext({searches:[],isLoading:!1,error:null});let $r=null;const By=({children:e})=>{const[t,r]=g.useState([]),[s,a]=g.useState(!0),[o,i]=g.useState(null);return g.useEffect(()=>{(async()=>{try{if(a(!0),$r){r($r),a(!1);return}const l=await T.fetchProxy("/_v/proxy/search/topSearch");if(!l.ok)throw new Error(`Erro ao buscar os dados: ${l.status}`);const m=(await l.json()).data.searches||[];$r=m,r(m)}catch(l){i(l instanceof Error?l.message:"Erro desconhecido")}finally{a(!1)}})()},[]),n.jsx(Ad.Provider,{value:g.useMemo(()=>({searches:t,isLoading:s,error:o}),[t,s,o]),children:e})},Uy=()=>{const e=g.useContext(Ad);if(!e)throw new Error("useTopSearches must be used within a TopSearchesProvider");return e},qy=({title:e,allTermsLabel:t,allTermsUrl:r,qtyTrends:s,handleClose:a,ICONS:o,ITEMS_PER_PAGE:i})=>{const{searches:c,isLoading:l}=Uy(),{router:u}=ce(),m=Array.isArray(c)?c:[];return n.jsx(n.Fragment,{children:!l&&m.length>0?n.jsx(d.ComponentList.Structure,{className:qe.trends,title:e,children:n.jsxs("div",{className:qe["trends-content"],children:[n.jsx(d.ComponentList.List,{columns:1,children:m.slice(0,s).map((p,f)=>n.jsx(d.ComponentList.ListItem,{className:qe["trends-item"],children:n.jsx(Oe,{href:`/search?query=${p.term}&count=${i}&page=1`,size:"x-small",adornments:{end:n.jsx(d.Icon,{name:o.arrow_right,size:"x-small"})},disableUnderline:!0,title:p.term,onClick:()=>a(),children:p.term})},`list-item-${f}`))}),n.jsx(d.Button,{className:"all-terms",variant:"tertiary",size:"x-small",underline:!1,onClick:()=>{a(),u.push(r)},adornment:{end:n.jsx(d.Icon,{name:o.arrow_right,size:"x-small"})},children:t})]})}):null})};function Hy({SectionZone:e}){var s;const[t,r]=g.useState(null);return g.useEffect(()=>{(async()=>{try{const o=await fetch("/api/cms/content-type-client",{method:"POST",body:JSON.stringify({contentType:"search"})});if(!o.ok)return;const i=await o.json();r(i)}catch(o){console.error("[CMS FETCH ERROR]",o)}})()},[]),n.jsx("div",{className:qe.content,children:t!==null&&n.jsx(e,{data:((s=t[0])==null?void 0:s.sections)??[],componentConfigs:{"Product Carousel":{searchModal:!0}}})})}const kd=({className:e,trends:t,CONSTANTS:r,SectionZone:s})=>{const[a,o]=g.useState(""),{isMobile:i}=ne(),c=si(),{setValue:l}=$n(),{SEARCH_MODAL:u,ICONS:m,ITEMS_PER_PAGE:p,ITEMS_DEFAULT_SORT:f}=r;return n.jsxs(d.Modal.Root,{isMobile:i??!1,variant:i?"sideBottom":"sideRight",isOpen:c,setIsOpen:l,className:`${qe.modal} ${qe["search-modal__modal"]} ${e??""}`,children:[n.jsx(zy,{title:u.HEADER.TITLE,ICONS:m}),n.jsxs(d.Modal.Body,{className:qe["modal-content-body"],children:[n.jsx(Dy,{term:a,children:n.jsx(Td,{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:o,ICONS:m,ITEMS_DEFAULT_SORT:f,ITEMS_PER_PAGE:p,SEARCH_MODAL:u})}),t?n.jsx(By,{children:n.jsx(qy,{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,n.jsx(Hy,{SectionZone:s})]})]})};kd.displayName="SearchModal";const We={"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"},Od=({LPLOJAS_TEMPLATE_RETURN_BUTTON:e,ICONS:t,showVendor:r})=>{const{selectedCity:s,selectedStore:a}=Kn();return n.jsx(d.Card,{padding:"small",shadow:!0,className:We["store--wrapper"],children:a?n.jsxs(n.Fragment,{children:[n.jsx(rt.ReturnButton,{ICONS:t,children:e}),n.jsx(rt.Details,{ICONS:t,showVendor:r,store:s==null?void 0:s.find(o=>o.nome===a)})]}):n.jsx(rt.Select,{ICONS:t})})};Od.displayName="LPStores.Content";const Kt=({title:e,text:t,type:r,...s})=>n.jsx(d.TextStructure.DivWrapper,{...s,children:r==="title"?n.jsx("h4",{className:We["store--details--title"],children:e}):n.jsxs(n.Fragment,{children:[n.jsx("h5",{className:We["store--details--subtitle"],children:e}),n.jsx("p",{className:We["store--details--text"],children:t})]})});Kt.displayName="LPStores.Details";const Ld=({vendor:e,ICONS:t})=>{const r=e?e.split(","):[];return n.jsxs(d.Accordion.Wrapper,{style:{width:"100%"},children:[n.jsx(d.Accordion.Header,{id:"accordion-header-vendor",closeIndicator:n.jsx(d.Icon,{name:t.arrow_up,size:"small"}),openIndicator:n.jsx(d.Icon,{name:t.arrow_down,size:"small"}),title:"Código de vendedor (A)",children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{gap:0,children:n.jsx("h3",{className:"typography-style-body-md",children:"Código de vendedor (A)"})})})}),n.jsx(d.Accordion.Body,{children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:We["store--details--vendor"],children:r.map((s,a)=>n.jsx("p",{className:"typography-style-body-sm",children:s.trim()},a))})})})]})};Ld.displayName="LPStores.Details";const Md=({store:e,showVendor:t,ICONS:r})=>n.jsxs("div",{className:We["store--details"],children:[n.jsx(Kt,{alignItems:"left",title:String(e==null?void 0:e.nome),type:"title"}),n.jsx(Kt,{title:"Endereço",text:String(e.endereco)}),e.telefone&&n.jsx(Kt,{title:"Telefone",text:String(e.telefone)}),e.horario&&n.jsx(Kt,{title:"Horário de funcionamento",text:String(e.horario)}),t&&n.jsx(Ld,{ICONS:r,vendor:String(e.vendedoras)})]});Md.displayName="LPStores.Details";const Dd=({ICONS:e,arrowDownIcon:t=n.jsx(d.Icon,{name:e.arrow_down,size:"small"}),arrowUpIcon:r=n.jsx(d.Icon,{name:e.arrow_up,size:"small"}),list:s,selectText:a,...o})=>n.jsx(d.DropDown.DefaultDropDown,{...o,"aria-placeholder":a,adornmentListClosed:{end:t},adornmentListOpened:{end:r},mode:"simple",placeholder:a,sizeVariant:"large",children:n.jsx(d.DropDown.DefaultDropDownList,{placeholder:a,supportText:a,maxHeight:400,children:Array.isArray(s)&&(s==null?void 0:s.map(i=>n.jsx(d.DropDown.ListItem,{value:i,children:i},i.replace(/\s/g,""))))})});Dd.displayName="LPStores.DropDown";const Fd=({children:e,ICONS:t})=>{const{clearSelectedStore:r}=Kn(),s=()=>{typeof r=="function"&&r()};return n.jsxs("button",{"aria-label":String(e),className:We["store--return-button"],onClick:s,onKeyDown:s,children:[n.jsx(d.Icon,{name:t.arrow_left,size:"small"}),e]})};Fd.displayName="LPStores.ReturnButton";const zd=({children:e,data:t})=>n.jsx(ac,{data:t,children:e});zd.displayName="LPStores.Root";const Bd=({children:e,imgAlt:t,imgSrcDesk:r,imgSrcMob:s})=>{const{isMobile:a}=ne();return n.jsxs("section",{className:We["store--section"],children:[n.jsx(en,{src:a?s:r,alt:t,fill:!0,className:We["store--section--img"]}),e]})};Bd.displayName="LPStores.Section";const Ud=({ICONS:e})=>{const{data:t,handleSelectCity:r,selectedCity:s,handleSelectStore:a}=Kn(),o=new Set(t.map(c=>c.cidade)),i=Array.from(o).filter(c=>typeof c=="string");return n.jsxs("div",{className:We["store--select"],children:[n.jsx(rt.DropDown,{selectText:"Selecione a cidade",handleSelectedValue:r,list:i,defaultValue:s==null?void 0:s[0].cidade,ICONS:e}),n.jsx(rt.DropDown,{"data-selected-city":!!s,selectText:"Selecione a loja",handleSelectedValue:a,list:s?s==null?void 0:s.map(c=>String(c.nome)):[],ICONS:e},s==null?void 0:s[0].cidade)]})};Ud.displayName="LPStores.Select";const qd=({children:e})=>n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:We["store--page-title"],children:n.jsx("h2",{className:We["store--page-title--title"],children:e})})});qd.displayName="LPStores.Title";const rt={Content:Od,Details:Md,DropDown:Dd,ReturnButton:Fd,Root:zd,Section:Bd,Select:Ud,Title:qd};var Hd={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 $y(e,t,r){const s=t.window,a=Object.assign({},t);if(delete a.window,s){s.dataLayer=s.dataLayer||[],s.dataLayer.push({event:e,ecommerce:a});return}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:e,ecommerce:a})}function Vy(e,t,r){console.log(`%c[DT - ${r}] EVENTO DISPARADO:%c `,`background: ${t}; color: white; font-weight: bold; padding: 2px 4px; border-radius: 3px;`,"color: #fff;",e||"")}var $d=[["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 Wy(e,t,r){Vy({id:e,custom_data:t},"#00c851",r)}var Gy={DataLayer:$y,Dito:Wy};async function Ky(e,t){const r=Hd[e];r&&await Promise.allSettled(r.destinations.map(async s=>{try{await Gy[s](e.toLowerCase(),t,s)}catch(a){console.error(`[DT] Failed to send ${e} to ${s}:`,a)}}))}async function Xy(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 Yy(e){try{const{pathname:t}=new URL(e,window.location.origin);return/\/p\/?$/.test(t)}catch{return!1}}function Vd(e){if(!e)return null;const t=(()=>{try{return new URL(e,location.origin).pathname}catch{return e.split("?")[0]}})(),r=decodeURIComponent(t).match(/(\d+-\d+)(?=\/p|$)/);return r?r[1].replace("-","_"):null}async function Qy(e){const t=Vd(e);if(!t)return console.error("Não foi possível extrair o RefId da URL"),null;try{const r=await fetch(`/api/catalog_system/pub/products/search?fq=alternateIds_RefId:${t}`);if(!r.ok)throw new Error(`Erro na API: ${r.status}`);const s=await r.json();return(s==null?void 0:s[0])||null}catch(r){return console.error("Erro ao buscar dados do produto:",r),null}}function Wd(e,t){var r,s,a,o;const i=(s=(r=e==null?void 0:e.shippingData)==null?void 0:r.logisticsInfo)==null?void 0:s.find(l=>l.itemId===t.id),c=(a=i==null?void 0:i.slas)==null?void 0:a.find(l=>l.id===i.selectedSla);return(o=c==null?void 0:c.pickupStoreInfo)!=null&&o.friendlyName?`retirada em loja: ${c.pickupStoreInfo.friendlyName}`:c!=null&&c.name?`Receba em casa: ${c.name}`:null}async function Gd(e){var t,r;const s=await Xy(e.productId||e.productID||e.item_group_id);return s.length&&(r=(t=s[0].items.find(a=>a.name===e.skuName))==null?void 0:t.itemId)!=null?r:null}function ir(e){return e.discount||e.discount===0?e.discount:parseFloat(Math.max(e.listPrice-e.sellingPrice,0).toFixed(2))/100||0}function St(e){const t=[()=>{var r;return((r=e==null?void 0:e.productCategories)==null?void 0:r[39])==="BAZAR"?"Sale":"Coleção"},()=>e.item_category||e.category,()=>e.categories[0]];for(const r of t){const s=r();if(s!=null)return s}return null}function ln(e){const t=[()=>Object.values((e==null?void 0:e.productCategories)||{}).pop(),()=>Object.values((e==null?void 0:e.categories)||{}).pop(),()=>{var r,s,a,o,i;return(i=(o=(a=(s=(r=e==null?void 0:e.category)==null?void 0:r.split)==null?void 0:s.call(r,">"))==null?void 0:a[1])==null?void 0:o.trim)==null?void 0:i.call(o)},()=>e.item_category2];for(const r of t){const s=r();if(s!=null)return s}return null}function Kd(e){var t;const r=((t=e==null?void 0:e.additionalInfo)==null?void 0:t.tags)||(e==null?void 0:e.tags);return Array.isArray(r)&&r.length?r.join(","):null}var Zy={farm:"farmrio","farm etc":"farmetc","farm rio":"farmrio"};function va(e){if(!e)return null;const t=e.toLowerCase().trim();return Zy[t]||null}function at(e){var t;let r=[];if(Array.isArray(e)&&e.every(o=>typeof o=="string"))r=e;else if(Array.isArray(e))r=e.map(o=>{var i;return((i=o.additionalInfo)==null?void 0:i.brandName)||o.brand});else if(typeof e=="object"&&e!==null&&"brand"in e)r=[((t=e.additionalInfo)==null?void 0:t.brandName)||e.brand];else return typeof e=="string"?va(e):null;const s=r.map(va).filter(o=>o!==null),a=[...new Set(s)].sort();return a.length>0?a.join("_"):null}function Jy(e){var t;if(!e.orderForm&&!((t=e.orderForm.items)!=null&&t.length))return null;const r=e.orderForm.items;return at(r)}function ex(e){var t;const{item:r}=e;return at(((t=r==null?void 0:r.additionalInfo)==null?void 0:t.brandName)||r.brand||r.item_brand)}function tx(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 Jy(e);case"ADD_TO_CART":case"REMOVE_FROM_CART":return ex(e);default:return null}}async function nx(e){var t;const r=((t=e.orderForm)==null?void 0:t.items)||[];return r.length?await Promise.all(r.map(async s=>{var a,o,i;return{item_id:s.productId,item_category2:ln(s),item_category4:Kd(s),item_shipping_tier:Wd(e.orderForm,s),price:parseFloat((s.price/100).toFixed(2))||0,quantity:s.quantity||1,item_ref:s.refId||null,item_brand:at((a=s.additionalInfo)==null?void 0:a.brandName)||((o=s.additionalInfo)==null?void 0:o.brandName)||null,item_sku:await Gd(s)||s.id||null,item_name:s.name||s.id||null,item_category:St(s)||null,item_variant:s.skuName.split(/[-/]/)[0].trim(),item_variant2:((i=s.skuName.split(/[-/]/).pop())==null?void 0:i.trim())||"",discount:ir(s)}})):[]}async function rx(e,t){var r,s,a;const{item:o,orderForm:i}=e;return[{index:0,quantity:1,item_id:o.productId||o.item_group_id||o.sku||null,item_category2:ln(o),item_category4:Kd(o),item_shipping_tier:t==="REMOVE_FROM_CART"?Wd(i,o):null,price:o.listPrice||parseFloat((o.price/100).toFixed(2))||0,item_ref:o.refId||o.item_ref||(o==null?void 0:o.additionalProperty.find(c=>c.name==="RefId").value)||null,item_brand:((r=o.additionalInfo)==null?void 0:r.brandName)||o.item_brand||o.brand.name||null,item_sku:o.sku||o.id||o.item_id||await Gd(o)||null,item_name:o.name||o.item_name||null,item_category:St(o)||null,item_variant:(o.skuName||o.item_variant||o.name).split(/[-/]/)[0].trim()||null,item_variant2:o.size||((s=o==null?void 0:o.itemAttributes)==null?void 0:s.size)||((a=(o.skuName||o.name).split(/[-/]/).pop())==null?void 0:a.trim())||null,discount:ir(o),item_list_name:St(o)||null,item_url:o.item_url||null}]}async function sx(e){return((e==null?void 0:e.list)||[]).map(t=>{var r,s,a,o,i;return{price:((r=t==null?void 0:t.price)==null?void 0:r.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((a=t==null?void 0:t.brand)==null?void 0:a.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)||((o=t==null?void 0:t.seo)==null?void 0:o.title)||null,item_category:St(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:ln(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:ir(t)||null,item_list_name:(e==null?void 0:e.itemListName)||St(t)||null}})}async function ox(e){var t,r,s;const{item:a}=e;return[{price:e.value||0,quantity:1,item_ref:a.ref||a.additionalProperty.find(o=>o.name==="RefId").value||null,item_brand:at(a.brand.name)||at(e.brand)||null,item_name:a.productName||a.alternateName||null,item_category:St(a)||null,item_variant:((t=a==null?void 0:a.name)==null?void 0:t.split("-")[0].trim())||null,item_category2:ln(a)||((s=(r=a==null?void 0:a.category)==null?void 0:r.split(">")[1])==null?void 0:s.trim())||null,item_id:(a==null?void 0:a.productID)||(a==null?void 0:a.productId)||a.item_group_id||null,discount:ir(a)||null,item_sku:(a==null?void 0:a.sku)||(a==null?void 0:a.productId)||null,item_url:a.url||a.item_url||null,seller_id:a.seller||null}]}async function ax(e){var t;if(!Yy(e==null?void 0:e.bannerUrl))return[];const s=await Qy(e==null?void 0:e.bannerUrl),a=s==null?void 0:s.items[0];return{price:(a==null?void 0:a.sellers[0].commertialOffer.Price)||0,quantity:1,item_ref:Vd(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:St(s)||null,item_variant:((t=a==null?void 0:a.name)==null?void 0:t.split("-").pop().trim())||null,item_category2:ln(s)||null,item_id:(s==null?void 0:s.productId)||null,discount:(a==null?void 0:a.sellers[0].commertialOffer.ListPrice)-(a==null?void 0:a.sellers[0].commertialOffer.Price)||null}}function ix(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 nx(e);case"ADD_TO_CART":case"ADD_TO_WISHLIST":case"REMOVE_FROM_CART":return rx(e,t);case"SELECT_ITEM":case"VIEW_ITEM_LIST":return sx(e);case"VIEW_ITEM":return ox(e);case"VIEW_PROMOTION":case"SELECT_PROMOTION":return ax(e);default:return null}}function cx(e){var t,r,s;if(!e.orderForm)return null;const a=((t=e.orderForm.paymentData)==null?void 0:t.payments)||[],o=((r=e.orderForm.paymentData)==null?void 0:r.paymentSystems)||[];if(!a.length||!o.length)return null;const i=a.find(p=>p==null?void 0:p.paymentSystem)||a[0],c=String((i==null?void 0:i.paymentSystem)||"").trim();if(!c)return null;const l=o.find(p=>String(p.id)===c),u=((s=l==null?void 0:l.name)==null?void 0:s.toLowerCase())||"",m=$d.find(([p])=>u.includes(p));return m?m[1]:null}function lx(e){var t,r,s,a;if(!e.orderForm)return null;const o=((t=e.orderForm.paymentData)==null?void 0:t.transactions)||[];if(!o.length)return null;const i=((r=o[0])==null?void 0:r.payments)||[];if(!i.length)return null;const c=((a=(s=i[0])==null?void 0:s.paymentSystemName)==null?void 0:a.toLowerCase())||"",l=$d.find(([u])=>c.includes(u));return l?l[1]:null}function ux(e,t){if(e!=null&&e.paymentType)return e.paymentType;switch(t){case"ORDER_REVIEWED":case"CUSTOM_ADD_PAYMENT_INFO":return cx(e);case"PURCHASE":case"CUSTOM_PURCHASE":return lx(e);default:return null}}var dx={brand:tx,items:ix,payment_type:ux,user_info:async(e,t)=>{var r;const a=(r={animale:{store:"https://www.animale.com.br",checkout:"https://secure.animale.com.br"},farm:{store:"https://lojafarm.myvtex.com"},mariafilo:{store:"https://mariafilo.myvtex.com",checkout:"https://secure.mariafilo.com.br"},lojacrisbarros:{store:"https://lojacrisbarros.myvtex.com",checkout:"https://secure.crisbarros.com.br"},lojaoffpremium:{store:"https://lojaoffpremium.myvtex.com",checkout:"https://secure.lojaoffpremium.com.br"}}[e.account||"https://www.animale.com.br"])==null?void 0:r[e.platform||"store"];if(!a)return{customer:{email:e.userEmail,id:e==null?void 0:e.userId},address:null};try{const o=`${a}/_v/user-info`,i=await fetch(o,{method:"POST",body:JSON.stringify({email:e.userEmail})});return i.status!==200?{customer:{email:e.userEmail,id:e==null?void 0:e.userId},address:null}:await i.json()}catch{return{customer:{email:e.userEmail,id:e==null?void 0:e.userId},address:null}}},content_type:(e,t)=>"regiao".concat(":"+e.category).concat(e.subcategory?":"+e.subcategory:"").concat(":"+e.componentName)||null,region:(e,t)=>e.region||null,line_items:(e,t)=>e!=null&&e.lineItems?e.lineItems:e!=null&&e.item?[e.item.productId||e.item.productID||e.item.item_id]:e!=null&&e.list?e.list.map(r=>r.productID||(r==null?void 0:r.id)):(e.orderForm.items||[]).map(r=>r.productId).join(","),currency:(e,t)=>{var r,s,a,o;return e!=null&&e.currency?e.currency:e!=null&&e.bannerUrl?"BRL":e!=null&&e.item?((s=(r=e.item)==null?void 0:r.offers)==null?void 0:s.priceCurrency)||"BRL":((o=(a=e.orderForm)==null?void 0:a.storePreferencesData)==null?void 0:o.currencyCode)||null},value:(e,t)=>{var r;return e!=null&&e.value?e.value:e.item?e.item.price:((r=e.orderForm)==null?void 0:r.value)!=null?e.orderForm.value/100:null},total_discount:(e,t)=>{var r,s;const o=(((r=e.orderForm)==null?void 0:r.totalizers)||((s=e.orderForm)==null?void 0:s.totals)||[]).find(i=>i.id==="Discounts");return o?Math.abs(o.value)/100:0},subtotal:(e,t)=>{var r,s;return(((r=e.orderForm)==null?void 0:r.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 r;if(e.couponMessage)return e.couponMessage;const s=((r=e.orderForm)==null?void 0:r.messages)||[];if(s.length===0)return null;const a=s.filter(o=>o.text.toLowerCase().includes("cupom"));return a.length===0?null:a.map(o=>o.text).join(" | ")},seller_cod_name:(e,t)=>e.appliedSellerCodName||(e==null?void 0:e.orderForm.marketingData.utmiCampaign)||null,coupon:(e,t)=>{var r,s;return e.appliedCoupon||((s=(r=e==null?void 0:e.orderForm)==null?void 0:r.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 r;const s=e.orderForm;return s?(((r=s.shippingData)==null?void 0:r.logisticsInfo)||[]).some(i=>{var c;return(c=i.slas)==null?void 0:c.some(l=>l.deliveryChannel==="pickup-in-point")}):null},shippings:(e,t)=>{const r=e.orderForm;if(!r)return null;const s={};for(const o of r.shippingData.logisticsInfo){const i=r.items[o.itemIndex];if(i)for(const c of o.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(o=>({shipping:o.shipping,shipping_tier:o.shipping_tier,delivery_time:o.delivery_time,line_items:o.line_items.join(",")}))||null},shipping:(e,t)=>{var r,s,a;return((a=(s=(r=e==null?void 0:e.orderForm)==null?void 0:r.shippingData)==null?void 0:s.logisticsInfo)!=null?a:[]).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 r,s,a,o;const c=((a=(s=(r=e==null?void 0:e.orderForm)==null?void 0:r.shippingData)==null?void 0:s.logisticsInfo)!=null?a:[]).find(f=>f.selectedSla);if(!c)return null;const l=(o=c.slas)==null?void 0:o.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 r,s;return((s=(r=e.orderForm)==null?void 0:r.orderGroup)==null?void 0:s.toString())||null},available_grid:(e,t)=>e.availableGrid||null};async function mx(e={},t){const r=Hd[t];return r?Object.fromEntries(await Promise.all(r.requiredParams.map(async a=>{const o=dx[a];return typeof o!="function"?(console.error(`[DT] Missing paramGetter for param: ${a}`),[a,null]):[a,await o(e,t)]}))):void 0}async function px(e,t={}){try{const r=await mx(t,e);return await Ky(e,Object.assign({},r,{window:t.window}))}catch(r){return console.error(`[DT] Error tracking event ${e}:`,r)}}var ms={exports:{}},Xd={};(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 o},PathnameContext:function(){return a},SearchParamsContext:function(){return s}});const r=g,s=(0,r.createContext)(null),a=(0,r.createContext)(null),o=(0,r.createContext)(null);process.env.NODE_ENV!=="production"&&(s.displayName="SearchParamsContext",a.displayName="PathnameContext",o.displayName="PathParamsContext")})(Xd);var ps={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return r}});function r(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)})(ps,ps.exports);var fx=ps.exports,fs={exports:{}},hs={exports:{}},_s={exports:{}},gs={exports:{}},ys={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return o}});const r=new Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class s{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}}const a=globalThis.AsyncLocalStorage;function o(){return a?new a: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)})(ys,ys.exports);var po=ys.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return s}});const s=(0,po.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)})(gs,gs.exports);var hx=gs.exports;(function(e,t){"TURBOPACK { transition: next-shared }";Object.defineProperty(t,"__esModule",{value:!0});function r(o,i){for(var c in i)Object.defineProperty(o,c,{enumerable:!0,get:i[c]})}r(t,{getExpectedRequestStore:function(){return a},requestAsyncStorage:function(){return s.requestAsyncStorage}});const s=hx;function a(o){const i=s.requestAsyncStorage.getStore();if(i)return i;throw new Error("`"+o+"` 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)})(_s,_s.exports);var _x=_s.exports,xs={exports:{}},vs={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return s}});const s=(0,po.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)})(vs,vs.exports);var gx=vs.exports;(function(e,t){"TURBOPACK { transition: next-shared }";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return r.actionAsyncStorage}});const r=gx;(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)})(xs,xs.exports);var yx=xs.exports,bs={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return r}});var r;(function(s){s[s.SeeOther=303]="SeeOther",s[s.TemporaryRedirect=307]="TemporaryRedirect",s[s.PermanentRedirect=308]="PermanentRedirect"})(r||(r={})),(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(bs,bs.exports);var xx=bs.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(y,x){for(var v in x)Object.defineProperty(y,v,{enumerable:!0,get:x[v]})}r(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=_x,a=yx,o=xx,i="NEXT_REDIRECT";var c;(function(y){y.push="push",y.replace="replace"})(c||(c={}));function l(y,x,v){v===void 0&&(v=o.RedirectStatusCode.TemporaryRedirect);const C=new Error(i);C.digest=i+";"+x+";"+y+";"+v+";";const j=s.requestAsyncStorage.getStore();return j&&(C.mutableCookies=j.mutableCookies),C}function u(y,x){x===void 0&&(x="replace");const v=a.actionAsyncStorage.getStore();throw l(y,x,v!=null&&v.isAction?o.RedirectStatusCode.SeeOther:o.RedirectStatusCode.TemporaryRedirect)}function m(y,x){x===void 0&&(x="replace");const v=a.actionAsyncStorage.getStore();throw l(y,x,v!=null&&v.isAction?o.RedirectStatusCode.SeeOther:o.RedirectStatusCode.PermanentRedirect)}function p(y){if(typeof y!="object"||y===null||!("digest"in y)||typeof y.digest!="string")return!1;const[x,v,C,j]=y.digest.split(";",4),b=Number(j);return x===i&&(v==="replace"||v==="push")&&typeof C=="string"&&!isNaN(b)&&b in o.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)})(hs,hs.exports);var vx=hs.exports,js={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}r(t,{isNotFoundError:function(){return o},notFound:function(){return a}});const s="NEXT_NOT_FOUND";function a(){const i=new Error(s);throw i.digest=s,i}function o(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)})(js,js.exports);var bx=js.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(c,l){for(var u in l)Object.defineProperty(c,u,{enumerable:!0,get:l[u]})}r(t,{ReadonlyURLSearchParams:function(){return i},RedirectType:function(){return s.RedirectType},notFound:function(){return a.notFound},permanentRedirect:function(){return s.permanentRedirect},redirect:function(){return s.redirect}});const s=vx,a=bx;class o 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 o}delete(){throw new o}set(){throw new o}sort(){throw new 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)})(fs,fs.exports);var jx=fs.exports,Yd={};(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 a},useServerInsertedHTML:function(){return o}});const s=jt._(g),a=s.default.createContext(null);function o(i){const c=(0,s.useContext)(a);c&&c(i)}})(Yd);var In={exports:{}},Vr={},ba;function Cx(){return ba||(ba=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(o,i){for(var c in i)Object.defineProperty(o,c,{enumerable:!0,get:i[c]})}t(e,{BailoutToCSRError:function(){return s},isBailoutToCSRError:function(){return a}});const r="BAILOUT_TO_CLIENT_SIDE_RENDERING";class s extends Error{constructor(i){super("Bail out to client-side rendering: "+i),this.reason=i,this.digest=r}}function a(o){return typeof o!="object"||o===null||!("digest"in o)?!1:o.digest===r}}(Vr)),Vr}var Rn={exports:{}},Tn={exports:{}},ja;function Sx(){return ja||(ja=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return s}});const s=(0,po.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)}(Tn,Tn.exports)),Tn.exports}var Ca;function Px(){return Ca||(Ca=1,function(e,t){"TURBOPACK { transition: next-shared }";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return r.staticGenerationAsyncStorage}});const r=Sx();(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Rn,Rn.exports)),Rn.exports}var Sa;function wx(){return Sa||(Sa=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"bailoutToClientRendering",{enumerable:!0,get:function(){return a}});const r=Cx(),s=Px();function a(o){const i=s.staticGenerationAsyncStorage.getStore();if(!(i!=null&&i.forceStatic)&&i!=null&&i.isStaticGeneration)throw new r.BailoutToCSRError(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)}(In,In.exports)),In.exports}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(v,C){for(var j in C)Object.defineProperty(v,j,{enumerable:!0,get:C[j]})}r(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 x},useSelectedLayoutSegments:function(){return y},useServerInsertedHTML:function(){return u.useServerInsertedHTML}});const s=g,a=Rc(),o=Xd,i=fx,c=Nc(),l=jx,u=Yd;function m(){const v=(0,s.useContext)(o.SearchParamsContext),C=(0,s.useMemo)(()=>v?new l.ReadonlyURLSearchParams(v):null,[v]);if(typeof window>"u"){const{bailoutToClientRendering:j}=wx();j("useSearchParams()")}return C}function p(){return(0,s.useContext)(o.PathnameContext)}function f(){const v=(0,s.useContext)(a.AppRouterContext);if(v===null)throw new Error("invariant expected app router to be mounted");return v}function h(){return(0,s.useContext)(o.PathParamsContext)}function _(v,C,j,b){j===void 0&&(j=!0),b===void 0&&(b=[]);let w;if(j)w=v[1][C];else{const R=v[1];var S;w=(S=R.children)!=null?S:Object.values(R)[0]}if(!w)return b;const P=w[0],N=(0,i.getSegmentValue)(P);return!N||N.startsWith(c.PAGE_SEGMENT_KEY)?b:(b.push(N),_(w,C,!1,b))}function y(v){v===void 0&&(v="children");const C=(0,s.useContext)(a.LayoutRouterContext);return C?_(C.tree,v):null}function x(v){v===void 0&&(v="children");const C=y(v);if(!C||C.length===0)return null;const j=v==="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)})(ms,ms.exports);var Nx=ms.exports,Pa=Nx;function Ex({accountName:e}){const{user:t}=Bt(),r=Pa.usePathname(),s=Pa.useSearchParams(),a=(t==null?void 0:t.sub)||(t==null?void 0:t.email),o=t==null?void 0:t.userId;return g.useEffect(()=>{a&&o?px("CUSTOM_USER_INFO",{userId:o,userEmail:a,platform:"store",account:e}):console.warn("[DT] Usuário deslogado ou sessão carregando...")},[r,s,a,o]),null}const Ix="_active_gk7mu_380",Rx="_banner_gk7mu_655",Tx="_container_gk7mu_689",Ax="_slugs_gk7mu_703",kx="_root_gk7mu_785",Ox="_otContainer_gk7mu_797",xt={active:Ix,banner:Rx,container:Tx,slugs:Ax,"content-page-modifier":"_content-page-modifier_gk7mu_741",root:kx,otContainer:Ox};function Lx({title:e,srcImages:t,children:r,className:s,...a}){const{isMobile:o}=ne(),i=o?t.mobile:t.desktop;return n.jsxs("div",{...a,className:d.helpers.classNameConcat(xt.banner,s),children:[n.jsx(we.Image,{src:i,alt:e,fill:!0}),r||n.jsx("h1",{children:e})]})}const Cs=({children:e,className:t})=>n.jsx("div",{className:d.helpers.classNameConcat(xt.container,t),children:e});Cs.displayName="Politicas.Container";const Mx=({oneTrust:e})=>{const t=()=>{window.OneTrust&&window.OneTrust.NoticeApi&&window.OneTrust.NoticeApi.Initialized&&window.OneTrust.NoticeApi.Initialized.then(function(){window.OneTrust.NoticeApi.LoadNotices([e.policyScript])})};return g.useEffect(()=>{window.OneTrust&&t()},[]),n.jsxs(n.Fragment,{children:[n.jsx(uo,{onLoad:t,id:"otprivacy-notice-script",src:"https://privacyportal-cdn.onetrust.com/privacy-notice-scripts/otnotice-1.0.min.js"}),n.jsx("div",{className:xt.otContainer,children:n.jsx("div",{id:"otnotice-container",children:n.jsx("div",{id:`otnotice-${e.policyId}`,className:"otnotice"})})})]})},wa={"card-image-wrapper":"_card-image-wrapper_10mul_1","card-image-container":"_card-image-container_10mul_9"},Qd=e=>{const{nextimage:t}=ce();return n.jsx(Xe,{name:e.name,children:e.data.banners.map((r,s)=>n.jsx("div",{className:wa["card-image-wrapper"],children:n.jsx("div",{className:wa["card-image-container"],children:n.jsx(t,{src:r.image,alt:r.altImage?r.altImage:"Banner Coleção",width:500,height:600})})},s))})},Dx="_embedLiveContainer_1ss0l_2",Fx="_embedLivePlayer_1ss0l_7",Na={embedLiveContainer:Dx,embedLivePlayer:Fx},Zd=({data:e,name:t})=>n.jsx(Xe,{name:t,children:n.jsx("div",{className:Na.embedLiveContainer,children:n.jsx("div",{className:Na.embedLivePlayer,children:e.banner.videosrc?n.jsx(we.Video,{src:e.banner.videosrc??"",playsInline:!0,autoPlay:!0,loop:!0,muted:!0,title:"Live",controls:!0}):n.jsxs("div",{children:[n.jsx("iframe",{src:e.banner.embed_source??"",allow:"autoplay; fullscreen; picture-in-picture; loop;",title:"Live"}),n.jsx(uo,{src:"https://player.vimeo.com/api/player.js",defer:!0,strategy:"lazyOnload"})]})})})}),Ss={"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 zx(e,t){const{mediatorRef:r}=ne();g.useEffect(()=>r.current.subscribe(e,t),[e,t])}const Ea=({prevOnClick:e,nextOnClick:t,onBulletClick:r,currentPage:s,totalPages:a,position:o,hideControllers:i,left:c,isFirst:l,ICONS:u})=>{const[m,p]=g.useState("default");return zx("herobanner:change_controllers_variant",f=>{l&&p(f.includes("white")?"inverse":"default")}),n.jsxs(d.Carousel.Controller,{className:Ss["carousel-controllers-modifier"],position:o??"absolute","data-hide-controllers":i,bottom:"16px",top:"unset",left:c,children:[n.jsxs(d.Carousel.Arrows,{className:Ss["carrousel-arrows-display-controller"],children:[n.jsx(d.Button,{variant:"tertiary",onClick:e,adornment:{start:n.jsx(d.Icon,{name:u.arrow_left})},mode:m}),n.jsx(d.Button,{variant:"tertiary",onClick:t,adornment:{start:n.jsx(d.Icon,{name:u.arrow_right})},mode:m})]}),n.jsx(d.Carousel.Bullets,{page:s,total:a,onBulletClick:r,mode:m})]})},Bx=({children:e,data:t,banner:r,...s})=>{const{mediatorRef:a}=ne();return t.data.first?n.jsx(Zn,{observerOptions:{threshold:.51},stopOnIntersection:!1,callBackWhenVisible:()=>{a.current.publish("header:change_variant",r.headerVariant)},...s,children:e}):n.jsx(n.Fragment,{children:e})},Jd=e=>{const{initialize:t,pagination:r,controller:s,itemsStyles:a}=d.Carousel.useCarousel({gap:e.data.config.gap,itemsPerPage:e.data.config.slidesPerView,direction:"row"}),o=g.useRef(void 0),i=g.useMemo(()=>td(e.data.config.controllerPosition??"dentro-inferior-centro"),[e]),c=g.useCallback(()=>{e.data.config.slideDuration&&r.totalPages>1&&(o.current=setInterval(()=>{s==null||s.nextPage()},e.data.config.slideDuration*1e3))},[s,e.data.config.slideDuration,r.totalPages]),l=g.useCallback(m=>{clearInterval(o.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:r.currentPage,totalPages:r.totalPages,position:i.position,hideControllers:((m=e.data.config)==null?void 0:m.hideControllers)??!1,left:i.left}},[r.currentPage,r.totalPages,i.position,e.data.config.hideControllers,l,s]);return g.useEffect(()=>(c(),()=>clearInterval(o.current)),[c]),n.jsx(Xe,{name:e.name,children:n.jsxs(d.Carousel.Root,{innerRef:m=>{t(m)},className:d.helpers.classNameConcat(Ss["custom-carousel"],e.data.config.fullWidth?"":"common-section"),"data-infinity-border":!0,style:{...e.data.config.marginTop!=="0px"&&{marginTop:`-${e.data.config.marginTop}`},...e.data.config.marginBottom!=="0px"&&{marginBottom:`-${e.data.config.marginBottom}`}},children:[i.shouldRender==="top"&&r.totalPages>1?n.jsx(Ea,{ICONS:e.ICONS,...u,isFirst:e.data.first}):n.jsx(n.Fragment,{}),n.jsx(d.Carousel.Body,{children:e==null?void 0:e.data.banners.map((m,p)=>n.jsx(d.Carousel.Item,{style:a,children:n.jsx(Bx,{data:e,banner:m,children:n.jsx(cn,{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"&&r.totalPages>1?n.jsx(Ea,{ICONS:e.ICONS,...u}):n.jsx(n.Fragment,{})]})})},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"},em=({data:e,name:t,CONSTANTS:r})=>{var m;const{isMobile:s}=ne(),a=e.config.size??"medium",o=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&&o?"column":"row"});return n.jsx(Xe,{name:t,children:n.jsx(d.Utils.Column,{style:{width:a==="small"?"70%":"100%"},alignContent:"center",justifyContent:"center",alignItems:"center",children:n.jsxs(d.Carousel.Root,{innerRef:p=>{i(p)},className:d.helpers.classNameConcat(Rt["carousel-modifier"],"common-section"),children:[a==="medium"?n.jsxs(d.TextStructure.Root,{children:[r.ACTIVE_BENNEFITS_BAR_TITLE&&n.jsx(d.TextStructure.DivWrapper,{className:Rt["carousel-title-modifier"],children:n.jsx("h2",{className:"typography-style-body-lg",children:r.BENNEFITS_BAR_TITLE})}),s&&c.totalPages>1&&n.jsx(d.Carousel.Controller,{className:d.helpers.classNameConcat(Rt["row-controller-modifier"],r.ACTIVE_BENNEFITS_BAR_TITLE?Rt["title-on"]:void 0),children:n.jsxs(d.Carousel.Arrows,{children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.prevPage(),adornment:{start:n.jsx(d.Icon,{name:r.ICONS.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.nextPage(),adornment:{start:n.jsx(d.Icon,{name:r.ICONS.arrow_right})}})]})})]}):n.jsx(n.Fragment,{}),n.jsx(d.Carousel.Body,{children:e.bennefit.map((p,f)=>n.jsx(d.Carousel.Item,{className:Rt["card-modifier"],style:u,children:n.jsx(d.Card,{stroke:!0,padding:"small",children:n.jsx(d.TextStructure.Root,{layoutProps:{columnWrapper:{alignContent:"start",alignItems:"start",justifyContent:"start"},textRow:{alignContent:"center",alignItems:"center",justifyContent:"center"}},adornment:{[a==="medium"?"top":"start"]:n.jsx(d.Icon,{name:p.icon,size:a==="medium"?"medium":"small"})},children:n.jsxs(d.TextStructure.DivWrapper,{alignItems:"start",children:[n.jsx("h3",{className:"typography-style-body-md",children:p.title}),p.subtitle&&p.subtitle.length?n.jsx("p",{className:"typography-style-body-xs",children:p.subtitle}):n.jsx(n.Fragment,{})]})})})},`bennefit=${f}`))}),!s&&c.totalPages>1?n.jsxs(d.Carousel.Controller,{className:Rt["row-controller-modifier"],children:[n.jsxs(d.Carousel.Arrows,{children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.prevPage(),adornment:{start:n.jsx(d.Icon,{name:r.ICONS.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.nextPage(),adornment:{start:n.jsx(d.Icon,{name:r.ICONS.arrow_right})}})]}),n.jsx(d.Carousel.Bullets,{page:c.currentPage,total:c.totalPages,onBulletClick:p=>l==null?void 0:l.navigateTo(p)})]}):n.jsx(n.Fragment,{})]})})})},tm=({data:{componentIndex:e,...t},name:r,CONSTANTS:s})=>n.jsx(Xe,{name:r,children:n.jsx(mo,{...t,CONSTANTS:s})}),nm=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:r,className:s,name:a})=>n.jsx(Xe,{name:a,children:n.jsx("div",{className:d.helpers.classNameConcat(cs.textContentSection,s??""),style:e.borderTop?{borderTop:"none"}:void 0,children:n.jsx(nd,{data:e,ICONS:t,TEXTCONTENT_EXPANDED:r})})}),Ia={"accordion-modifier":"_accordion-modifier_1we16_1","accordion-body-modifier":"_accordion-body-modifier_1we16_7"},rm=({data:e,id:t,ICONS:r,className:s,name:a})=>{var c;const[o,i]=g.useState([]);return n.jsx(Xe,{name:a,children:n.jsxs(d.Utils.Column,{gap:"var(--gap-vertical-sm)",className:s??"",children:[e.titleAccordion?n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-sm","common-section"),style:{fontWeight:500},children:e.titleAccordion})})}):n.jsx(n.Fragment,{}),(c=e.accordions)==null?void 0:c.map((l,u)=>n.jsxs(d.Accordion.Wrapper,{className:Ia["accordion-modifier"],children:[n.jsx(d.Accordion.Header,{id:`${t}-text-accordion-${u}`,openIndicator:n.jsx(d.Icon,{name:r.arrow_down}),closeIndicator:n.jsx(d.Icon,{name:r.arrow_up}),startOpen:o.includes(u),onClick:()=>i(m=>m.includes(u)?m.filter(p=>p!==u):[...m,u]),children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h3",{className:"typography-style-body-md-strong",children:l.title}),l.subtitle&&l.subtitle.length?n.jsx("h2",{children:l.subtitle}):n.jsx(n.Fragment,{})]})})}),n.jsx(d.Accordion.Body,{children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:Ia["accordion-body-modifier"],children:n.jsx(Je.Editor,{editorKey:`${t}-editor-${u}`,blockRenderMap:Un,editorState:l.text?Bn(JSON.parse(l.text)):Je.EditorState.createEmpty(),onChange:()=>null})})})})]},`${t}-accordion-${u}-${o.includes(u)}`))]})})},sm=async e=>{const{type:t}=e,r=t==="collectionSearch"?"/_v/proxy/search/product":"/_v/proxy/search/crosselling",s=JSON.stringify(t==="collectionSearch"?{...e.params,facets:e.facets,term:e.term,forceUpdate:!1}:e.facets);return(await T.fetchProxy(r,{method:"POST",headers:{"Content-Type":"application/json"},body:s}).then(o=>o.json()).then(o=>t==="collectionSearch"?o.data.products:o.products)).filter(o=>!!o.node.availability.status)},Ux="_shelf__container_bi04n_10",om={shelf__container:Ux},qx=({collectionSearch:e,title:t,CONSTANTS:r,searchModal:s})=>{const[a,o]=g.useState([]),{isMobile:i}=ne(),{ref:c,inView:l}=ka.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:u}=ae();return g.useEffect(()=>{if(!e)return;function m(){var p,f;sm({type:"collectionSearch",term:e==null?void 0:e.term,facets:e==null?void 0:e.facets,params:{count:((p=e==null?void 0:e.params)==null?void 0:p.count)??12,sort:((f=e==null?void 0:e.params)==null?void 0:f.sort)??r.ITEMS_DEFAULT_SORT}}).then(h=>{o(h)})}m()},[e]),g.useEffect(()=>{!l||a.length===0||u({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:a},customData:{item_list_name:t??"Você também pode gostar"}}})},[l,a]),a.length===0?null:n.jsx("div",{ref:c,className:om.shelf__container,children:n.jsx(Jt.Shelf,{title:t??"Você também pode gostar",itemsPerPage:s?{desktop:2,mobile:1.4}:{desktop:4.4,mobile:2.2},ICONS:r.ICONS,children:Array.isArray(a)&&a.map(({node:m},p)=>{const{availability:{status:f}}=m;return f?n.jsx(Jt.Card,{item:m,isMobile:i,size:"medium",index:p,shelfTitle:t??"Você também pode gostar",CONSTANTS:r},m.id):null})})})},Hx=({recommendationSearch:e,title:t,CONSTANTS:r})=>{const[s,a]=g.useState([]),{isMobile:o}=ne(),{ref:i,inView:c}=ka.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 p;sm({type:"recommendationSearch",facets:u,params:{count:((p=e==null?void 0:e.params)==null?void 0:p.count)??12,sort:r.ITEMS_DEFAULT_SORT}}).then(f=>a(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"?n.jsx(el,{products:s,innerRef:i,inView:c,CONSTANTS:r}):n.jsx("div",{ref:i,className:om.shelf__container,children:n.jsx(Jt.Shelf,{title:t??"Você também pode gostar",itemsPerPage:{desktop:4.4,mobile:2.2},ICONS:r.ICONS,children:Array.isArray(s)&&s.map(({node:m},p)=>{const{availability:{status:f}}=m;return f?n.jsx(Jt.Card,{item:m,isMobile:o,size:"medium",index:p,shelfTitle:t??"Você também pode gostar",CONSTANTS:r},m.id):null})})})},am=({data:e,name:t,CONSTANTS:r})=>{const{productId:s}=ec();return!(e!=null&&e.productLists)||e.productLists.length===0?null:e.productLists.map((a,o)=>n.jsx(Xe,{name:t,children:n.jsx(Hx,{title:a.title,recommendationSearch:{type:a.product_group_option,productId:s,params:{count:a.number_of_items,sort:"score:desc"}},CONSTANTS:r},`shelf=${o}`)}))},im=({data:e,CONSTANTS:t,searchModal:r,name:s})=>{var o;const a=(o=e==null?void 0:e.productLists)==null?void 0:o.filter(i=>!!i.collectionId||!!i.search_base_name);return!a||a.length===0?null:a.map((i,c)=>{const l=i.collectionId?{term:"",facets:[{key:"productclusterids",value:`${i.collectionId}`}]}:{term:i.search_base_name,facets:[]};return n.jsx(Xe,{name:s,children:n.jsx(qx,{title:i.title,collectionSearch:{params:{count:i.number_of_items,sort:i.sort},...l},searchModal:r,CONSTANTS:t},`shelf=${c}`)})})},$x="_popup_5taxs_9",Vx="_popup__overlay_5taxs_19",Wx="_popup__modal_5taxs_27",Ue={popup:$x,popup__overlay:Vx,popup__modal:Wx,"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"},Gx=e=>n.jsx("div",{className:Ue["popup__modal--success"],children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:e.ICONS.check_circle,size:"large"})},children:n.jsxs(d.TextStructure.DivWrapper,{className:Ue["text-structure-modifier"],children:[n.jsx("h3",{className:"typography-style-body-sm-strong",children:e.successTitle}),n.jsx("p",{className:"typography-style-body-caption",children:e.successDescription})]})})}),Kx=e=>{const{title:t,description:r,groups:s,ICONS:a}=e,{formErrors:o,submitForm:i,success:c}=ar(),[l,u]=g.useState(!1);return n.jsx("form",{onSubmit:i,className:Ue.formContainer,children:n.jsxs("div",{className:Ue["popup__modal--form"],children:[n.jsxs(d.TextStructure.DivWrapper,{className:Ue["popup__modal--header"],children:[n.jsx("strong",{className:"typography-style-body-md-strong",children:t}),n.jsx("p",{className:"typography-style-body-xs",children:r})]}),c?n.jsx(Gx,{...e}):n.jsxs(n.Fragment,{children:[s.map(m=>n.jsx(Mt.FieldGroup,{group:m,children:n.jsx(Mt.FieldWrapper,{fields:m.fields})},m.groupLabel)),n.jsx(d.Checkbox,{className:Ue["popup__modal--checkbox"],adornment:n.jsx(d.Icon,{name:a.check,size:"small"}),name:"terms-and-conditions",label:"Li e aceito os termos de política de privacidade abaixo.",sizeVariant:"small",checked:l,onChange:()=>u(!l)}),n.jsxs("div",{children:[!l&&n.jsx(d.TextStructure.DivWrapper,{className:Ue["popup__modal--status"],children:n.jsxs("p",{className:"typography-style-body-caption",children:[n.jsx(d.Icon,{size:"small",name:a.alert_circle}),np]})}),n.jsx(d.Button,{disabled:!l,size:"medium",type:"submit",children:sp}),o.length?n.jsx(d.TextStructure.DivWrapper,{className:Ue["popup__modal--status"],children:n.jsx("p",{className:d.helpers.classNameConcat(Ue.formSubmitWarning,"typography-style-body-xs"),children:rp})}):null]})]})]})})},cm=({data:e,name:t,CONSTANTS:r})=>{const[s,a]=g.useState(!1),o=typeof window<"u"?window.sessionStorage.getItem(r.POPUP_TRACK_STORAGE)||window.localStorage.getItem(r.POPUP_SUBMITTED_STORAGE):null,i=()=>{a(!1),window.sessionStorage.setItem(r.POPUP_TRACK_STORAGE,"true")};return g.useEffect(()=>{setTimeout(()=>!o&&a(!0),2e3)},[]),e.active&&s?n.jsx(Xe,{name:t,children:n.jsxs("div",{className:Ue.popup,children:[n.jsx("div",{onClick:i,className:Ue.popup__overlay}),n.jsxs("div",{className:Ue.popup__modal,children:[n.jsx(d.Button,{onClick:i,variant:"tertiary",className:Ue["popup__modal--close"],children:n.jsx(d.Icon,{style:{color:e.closeColor||"#000"},name:r.ICONS.close,size:"medium"})}),n.jsx("div",{children:n.jsx(we.Image,{src:e.imageUrl,width:"459",height:"418",alt:e.title})}),n.jsx(Id,{...e,children:n.jsx(Kx,{...e,ICONS:r.ICONS})})]})]})}):null},Xx={"Image Grid":Qd,"Embed Live":Zd,"Banner Carousel":Jd,Banner:io,"Bennefits Bar":em,newsletter:tm,TextContent:nm,TextAccordion:rm,"Product Carousel":im,"PDP Product Carousel":am,"Popup Modal":cm},lm=({data:e,identifyWhoIsFirst:t=!1,componentConfigs:r})=>e==null?void 0:e.map((s,a)=>{const o=Xx[s.name],i={...(r==null?void 0:r[s.name])??{}};return t&&a===0&&(s.data.first=!0),s.data.componentIndex=a,s.name==="TextAccordion"&&(i.id=`text-accordion-${a}`),o?n.jsx(o,{name:s.name,data:s.data,...i},`section-zone-component-${a}`):null});async function Yx({slug:e,pageData:t,tabsData:r,oneTrust:s}){var c,l,u,m;const o=(r?[...r].sort((p,f)=>p.config.tabConfig.order-f.config.tabConfig.order):[]).map(p=>({slug:p.config.seo.slug||es(p.config.tabConfig.title),title:p.config.tabConfig.title})),i=r==null?void 0:r.find(p=>p.config.seo.slug===`/${decodeURIComponent(e)}`);return i&&(i.id=es(i.config.seo.slug||"")),n.jsxs("div",{className:xt.root,children:[n.jsx(Cs,{children:n.jsx(Lx,{title:(c=t==null?void 0:t.config.banners)==null?void 0:c.altImageBackgroud,srcImages:{desktop:(l=t==null?void 0:t.config.banners)==null?void 0:l.imageBackgroudDesk,mobile:(m=(u=t==null?void 0:t.config)==null?void 0:u.banners)==null?void 0:m.imageBackgroudMobile}})}),n.jsxs(Cs,{children:[n.jsx("div",{className:xt.slugs,children:o.map(p=>n.jsx(Oe,{href:p.slug?`/politicas/${p.slug.replace(/^\/+/,"")}`:"#",className:p.slug===(i==null?void 0:i.id)?xt.active:"",title:p.title,scroll:!1,children:p.title},p.slug.replace(/^\/+/,"")))}),n.jsx("div",{className:xt["content-page-modifier"],children:e==="privacidade-e-seguranca"?n.jsx(Mx,{oneTrust:s}):n.jsx(lm,{data:(i==null?void 0:i.sections)??[]})})]})]})}const it={"banner-wrapper":"_banner-wrapper_jrphb_5","banner-image":"_banner-image_jrphb_15","banner-desktop":"_banner-desktop_jrphb_21","banner-mobile":"_banner-mobile_jrphb_24","text-wrapper":"_text-wrapper_jrphb_37","custom-row":"_custom-row_jrphb_53","text-area":"_text-area_jrphb_58","text-wrapper-modifier":"_text-wrapper-modifier_jrphb_68","text-area-modifier":"_text-area-modifier_jrphb_77"},um=({data:e,ERROR_TEMPLATE_RETURN_BUTTON:t})=>{const{router:r}=ce();return n.jsx("div",{children:n.jsxs(d.Banner.Container,{className:it["banner-wrapper"],children:[n.jsxs(d.Banner.ImageWrapper,{className:it["banner-image"],children:[n.jsx(we.Image,{className:it["banner-desktop"],alt:e.altImageBackgroud??e.imageBackgroudDesk,src:e.imageBackgroudDesk,width:1366,height:695,priority:!0}),n.jsx(we.Image,{className:it["banner-mobile"],alt:e.altImageBackgroud??e.imageBackgroudMobile,src:e.imageBackgroudMobile,width:375,height:755,priority:!0})]}),n.jsx(d.Banner.Slot,{className:d.helpers.classNameConcat(it["text-wrapper"],it["text-wrapper-modifier"]),margin:107,children:n.jsxs(d.TextStructure.Root,{layoutProps:{textRow:{className:it["custom-row"]}},children:[n.jsxs(d.TextStructure.DivWrapper,{className:d.helpers.classNameConcat(it["text-area"],it["text-area-modifier"]),children:[n.jsx("h1",{className:"typography-style-display-strong",children:e.title}),n.jsx("h2",{className:"typography-style-body-lg",children:e.subTitle}),n.jsx("p",{className:"typography-style-body-sm",children:e.description})]}),n.jsx(d.Button,{onClick:()=>r.push("/"),children:t})]})})]})})};um.displayName="ErrorTemplate";const Qx={codVenderoda:"",orderformId:"",cupom:"",setCodVendedora:()=>null,setCupom:()=>null,setOrderformId:()=>null,setConfiguration:()=>null,update:()=>!1,isValidSharedCart:()=>!1},Zx=g.createContext(Qx);function Jx(){return g.useContext(Zx)}function Wr(e,t=""){if(!e)return;if(!t)if(typeof window<"u")t=window.location.href;else return;e=e.replace(/[[\]]/g,"\\$&");const s=new RegExp(`[?&]${e}(=([^&#]*)|&|#|$)`).exec(t);return s?s[2]?decodeURIComponent(s[2].replace(/\+/g," ")):"":null}function Gr(){if(window){localStorage.getItem("cleverapp")&&(localStorage.removeItem("vendedora"),localStorage.removeItem("atendimento")),localStorage.getItem("atendimento")&&(localStorage.removeItem("vendedora"),localStorage.removeItem("televendas"));const{hostname:e,origin:t}=window.location;document.cookie=`checkout.vtex.com=;Domain=.${e};path=/;expires=Thu, 01-Jan-1970 00:00:01 GMT`,document.cookie=`checkout.vtex.com=;Domain=${e.replace("www","")};path=/;expires=Thu, 01-Jan-1970 00:00:01 GMT`,window.location.replace(`${t}`)}}const ev="_container_df1ql_11",Kr={"action-button":"_action-button_df1ql_1",container:ev,"container-icon":"_container-icon_df1ql_31"};function tv({icon:e,text:t,onClick:r,isActive:s=!1}){const a=o=>{o.preventDefault(),s&&r()};return n.jsxs("div",{className:d.helpers.classNameConcat(Kr["action-button"],s?"":"disable"),onClick:o=>a(o),children:[n.jsx("div",{className:d.helpers.classNameConcat(Kr["container-icon"],s?"":"disable"),children:n.jsx("img",{src:e,alt:"icon"})}),n.jsxs("div",{className:d.helpers.classNameConcat(Kr.container,s?"":"disable"),children:[n.jsx("span",{children:t}),n.jsx("img",{src:"/images/Widget_open/navigate_next-black-18dp.png",alt:"next"})]})]})}const nv="_container_k11me_1",rv="_header_k11me_18",sv="_body_k11me_45",Ht={container:nv,header:rv,body:sv,"copy-cart-button":"_copy-cart-button_k11me_78","reset-orderform-button":"_reset-orderform-button_k11me_110"};function ov(e,t=!1,r){const{base:s,orderformId:a}=e,o=r==null?void 0:r.split("codigo: ")[1],i=localStorage.getItem("maiscarrinho"),c={medium:t?"&utm_medium=carrinho_compartilhado":"&utm_medium=linkvendedor",campaign:`&utm_campaign=${encodeURIComponent(r??"")}`,cp:o?`&utmi_cp=${o}`:"",source:`&utm_source=${i}`};return t?`${s}/checkout/?orderFormId=${a}${c.source}${c.campaign}${c.cp}${c.medium}#/cart`:`${s}/checkout/?orderFormId=${a}${c.source}${c.campaign}${c.cp}${c.medium}#/payment`}function av(e){const t=`https://mais-carrinho-dkwr66gouq-uc.a.run.app/url-shortner/${encodeURIComponent(e)}`;return fetch(t).then(r=>r.json()).then(r=>r.url.shortLink).catch(()=>e)}function Ra({mode:e,config:t,newCart:r}){const[s,a]=g.useState(!1),[o,i]=g.useState(""),c=ov(t,e==="cart",t.sellerCode),{useClipboard:l}=Zt.hooks,[,u]=l();function m(){a(!0);const p=document.createElement("textArea");p.readOnly=!0,p.contentEditable="true",p.value=o,document.body.appendChild(p),p.select(),u(p.value),document.body.removeChild(p),setTimeout(()=>{a(!1)},3e3)}return g.useEffect(()=>{i(""),i("Gerando link..."),av(c).then(p=>i(p)).catch(()=>i("Algo deu errado, tente novamente mais tarde"))},[c]),n.jsxs("div",{className:Ht.container,children:[n.jsxs("div",{className:Ht.header,children:[n.jsx("img",{src:e==="cart"?"/images/Modal_compartilhar_sacola/ico_sacola_big.png":"/images/Modal_compartilhar_editavel/ico_form_big.png",alt:"close"}),n.jsxs("span",{className:"text",children:[" ",e==="cart"?"Compartilhar a Sacola":"Compartilhar link para pagamento"]})]}),n.jsxs("div",{className:Ht.body,children:[n.jsx("p",{children:e==="cart"?`Envie a sacola para um ou mais clientes usando o link abaixo ou
|
|
19
|
-
compartilhe direto por whatsapp`:"Envie a sacola para um cliente usando o link abaixo ou compartilhe direto por whatsapp"}),n.jsxs("form",{children:[n.jsx("input",{type:"text",disabled:!0,value:
|
|
11
|
+
Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url`)}if("ref"in ce&&(0,t.warnOnce)('Image with src "'+v+'" is using unsupported "ref" property. Consider using the "onLoad" property instead.'),!C&&!k){const Q=A({config:K,src:v,width:G||400,quality:Ce||75});let M;try{M=new URL(Q)}catch{}(Q===v||M&&M.pathname===v&&!M.search)&&(0,t.warnOnce)('Image with src "'+v+`" has a "loader" property that does not implement width. Please implement it or use the "unoptimized" property instead.
|
|
12
|
+
Read more: https://nextjs.org/docs/messages/next-image-missing-loader-width`)}W&&(0,t.warnOnce)('Image with src "'+v+'" is using deprecated "onLoadingComplete" property. Please use the "onLoad" property instead.');for(const[Q,M]of Object.entries({layout:Z,objectFit:q,objectPosition:ee,lazyBoundary:se,lazyRoot:me}))M&&(0,t.warnOnce)('Image with src "'+v+'" has legacy prop "'+Q+`". 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(Q=>{for(const U of Q.getEntries()){var M;const ae=(U==null||(M=U.element)==null?void 0:M.src)||"",be=l.get(ae);be&&!be.priority&&be.placeholder==="empty"&&!be.src.startsWith("data:")&&!be.src.startsWith("blob:")&&(0,t.warnOnce)('Image with src "'+be.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(Q){console.error(Q)}}}const He=Object.assign(R?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:q,objectPosition:ee}:{},z?{}:{color:"transparent"},I),Re=!ne&&D!=="empty"?D==="blur"?'url("data:image/svg+xml;charset=utf-8,'+(0,r.getImageBlurSvg)({widthInt:G,heightInt:Y,blurWidth:Ne,blurHeight:ze,blurDataURL:H||"",objectFit:He.objectFit})+'")':'url("'+D+'")':null;let B=Re?{backgroundSize:He.objectFit||"cover",backgroundPosition:He.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:Re}:{};process.env.NODE_ENV==="development"&&B.backgroundImage&&D==="blur"&&H!=null&&H.startsWith("/")&&(B.backgroundImage='url("'+H+'")');const ye=p({config:K,src:v,unoptimized:C,width:G,quality:Ce,sizes:x,loader:A});if(process.env.NODE_ENV!=="production"&&typeof window<"u"){let Q;try{Q=new URL(ye.src)}catch{Q=new URL(ye.src,window.location.href)}l.set(Q.href,{src:v,priority:j,placeholder:D})}return{props:{...ce,loading:Ie?"lazy":b,fetchPriority:X,width:G,height:Y,decoding:te,className:w,style:{...He,...B},sizes:ye.sizes,srcSet:ye.srcSet,src:O||ye.src},meta:{unoptimized:C,priority:j,placeholder:D,fill:R}}}})(qa);var Ho={exports:{}},Kn={exports:{}},Js={},Ji;function Nv(){return Ji||(Ji=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return a}});const t=y,r=typeof window>"u",s=r?()=>{}:t.useLayoutEffect,o=r?()=>{}:t.useEffect;function a(i){const{headManager:c,reduceComponentsToState:l}=i;function u(){if(c&&c.mountedInstances){const f=t.Children.toArray(Array.from(c.mountedInstances).filter(Boolean));c.updateHead(l(f,i))}}if(r){var m;c==null||(m=c.mountedInstances)==null||m.add(i.children),u()}return s(()=>{var f;return c==null||(f=c.mountedInstances)==null||f.add(i.children),()=>{var p;c==null||(p=c.mountedInstances)==null||p.delete(i.children)}}),s(()=>(c&&(c._pendingUpdate=u),()=>{c&&(c._pendingUpdate=u)})),o(()=>(c&&c._pendingUpdate&&(c._pendingUpdate(),c._pendingUpdate=null),()=>{c&&c._pendingUpdate&&(c._pendingUpdate(),c._pendingUpdate=null)})),null}}(Js)),Js}var Zs={},Zi;function Iv(){return Zi||(Zi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AmpStateContext",{enumerable:!0,get:function(){return s}});const s=Ke._(y).default.createContext({});process.env.NODE_ENV!=="production"&&(s.displayName="AmpStateContext")}(Zs)),Zs}var eo={},ec;function nm(){return ec||(ec=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"HeadManagerContext",{enumerable:!0,get:function(){return s}});const s=Ke._(y).default.createContext({});process.env.NODE_ENV!=="production"&&(s.displayName="HeadManagerContext")}(eo)),eo}var to={},tc;function Rv(){return tc||(tc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isInAmpMode",{enumerable:!0,get:function(){return t}});function t(r){let{ampFirst:s=!1,hybrid:o=!1,hasQuery:a=!1}=r===void 0?{}:r;return s||o&&a}}(to)),to}var rc;function Tv(){return rc||(rc=1,function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function r(j,b){for(var w in b)Object.defineProperty(j,w,{enumerable:!0,get:b[w]})}r(t,{default:function(){return C},defaultHead:function(){return p}});const s=Ke,o=jr,a=n,i=o._(y),c=s._(Nv()),l=Iv(),u=nm(),m=Rv(),f=Cs;function p(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 g=["name","httpEquiv","charSet","itemProp"];function _(){const j=new Set,b=new Set,w=new Set,S={};return P=>{let N=!0,R=!1;if(P.key&&typeof P.key!="number"&&P.key.indexOf("$")>0){R=!0;const I=P.key.slice(P.key.indexOf("$")+1);j.has(I)?N=!1:j.add(I)}switch(P.type){case"title":case"base":b.has(P.type)?N=!1:b.add(P.type);break;case"meta":for(let I=0,O=g.length;I<O;I++){const L=g[I];if(P.props.hasOwnProperty(L))if(L==="charSet")w.has(L)?N=!1:w.add(L);else{const W=P.props[L],D=S[L]||new Set;(L!=="name"||!R)&&D.has(W)?N=!1:(D.add(W),S[L]=D)}}break}return N}}function v(j,b){const{inAmpMode:w}=b;return j.reduce(h,[]).reverse().concat(p(w).reverse()).filter(_()).reverse().map((S,P)=>{const N=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(R=>S.props.href.startsWith(R))){const R={...S.props||{}};return R["data-href"]=R.href,R.href=void 0,R["data-optimized-fonts"]=!0,i.default.cloneElement(S,R)}if(process.env.NODE_ENV==="development")if(S.type==="script"&&S.props.type!=="application/ld+json"){const R=S.props.src?'<script> tag with src="'+S.props.src+'"':"inline <script>";(0,f.warnOnce)("Do not add <script> tags using next/head (see "+R+`). Use next/script instead.
|
|
15
|
+
See more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component`)}else S.type==="link"&&S.props.rel==="stylesheet"&&(0,f.warnOnce)('Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="'+S.props.href+`"). Use Document instead.
|
|
16
|
+
See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component`);return i.default.cloneElement(S,{key:N})})}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)}(Kn,Kn.exports)),Kn.exports}var ro={},nc;function Av(){return nc||(nc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ImageConfigContext",{enumerable:!0,get:function(){return o}});const r=Ke._(y),s=Ss,o=r.default.createContext(s.imageConfigDefault);process.env.NODE_ENV!=="production"&&(o.displayName="ImageConfigContext")}(ro)),ro}var no={},so={},oo={exports:{}},sc;function sm(){return sc||(sc=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}|$)`,g=`(?:^|${m})`,_=`${c}{1,2}${h}`,v=`(?!${c})`,x=`(?!${g}${_})`,C=`(?!${c}{0,1}${h})`,j=`(?!${_})`,b=`[^.${m}]`,w=`${p}*?`,P={DOT_LITERAL:c,PLUS_LITERAL:l,QMARK_LITERAL:u,SLASH_LITERAL:m,ONE_CHAR:f,QMARK:p,END_ANCHOR:h,DOTS_SLASH:_,NO_DOT:v,NO_DOTS:x,NO_DOT_SLASH:C,NO_DOTS_SLASH:j,QMARK_NO_DOT:b,STAR:w,START_ANCHOR:g,SEP:"/"},N={...P,SLASH_LITERAL:`[${a}]`,QMARK:i,STAR:`${i}*?`,DOTS_SLASH:`${c}{1,2}(?:[${a}]|$)`,NO_DOT:`(?!${c})`,NO_DOTS:`(?!(?:^|[${a}])${c}{1,2}(?:[${a}]|$))`,NO_DOT_SLASH:`(?!${c}{0,1}(?:[${a}]|$))`,NO_DOTS_SLASH:`(?!${c}{1,2}(?:[${a}]|$))`,QMARK_NO_DOT:`[^.${a}]`,START_ANCHOR:`(?:^|[${a}])`,END_ANCHOR:`(?:[${a}]|$)`,SEP:"\\"},R={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:R,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(I){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${I.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(I){return I===!0?N:P}}},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,g=(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},_=(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],N=j.capture?"":"?:",R=c.globChars(j.windows),I=c.extglobChars(R),{DOT_LITERAL:O,PLUS_LITERAL:L,SLASH_LITERAL:W,ONE_CHAR:D,DOTS_SLASH:H,NO_DOT:X,NO_DOT_SLASH:te,NO_DOTS_SLASH:Z,QMARK:q,QMARK_NO_DOT:ee,STAR:se,START_ANCHOR:me}=R,ce=$=>`(${N}(?:(?!${me}${$.dot?H:O}).)*?)`,he=j.dot?"":X,z=j.dot?q:ee;let ne=j.bash===!0?ce(j):se;j.capture&&(ne=`(${ne})`),typeof j.noext=="boolean"&&(j.noextglob=j.noext);const T={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,T),w=x.length;const K=[],ue=[],je=[];let A=S,k;const qe=()=>T.index===w-1,G=T.peek=($=1)=>x[T.index+$],Y=T.advance=()=>x[++T.index]||"",Ne=()=>x.slice(T.index+1),ze=($="",Q=0)=>{T.consumed+=$,T.index+=Q},Ie=$=>{T.output+=$.output!=null?$.output:$.value,ze($.value)},Ce=()=>{let $=1;for(;G()==="!"&&(G(2)!=="("||G(3)==="?");)Y(),T.start++,$++;return $%2===0?!1:(T.negated=!0,T.start++,!0)},He=$=>{T[$]++,je.push($)},Re=$=>{T[$]--,je.pop()},B=$=>{if(A.type==="globstar"){const Q=T.braces>0&&($.type==="comma"||$.type==="brace"),M=$.extglob===!0||K.length&&($.type==="pipe"||$.type==="paren");$.type!=="slash"&&$.type!=="paren"&&!Q&&!M&&(T.output=T.output.slice(0,-A.output.length),A.type="star",A.value="*",A.output=ne,T.output+=A.output)}if(K.length&&$.type!=="paren"&&(K[K.length-1].inner+=$.value),($.value||$.output)&&Ie($),A&&A.type==="text"&&$.type==="text"){A.output=(A.output||A.value)+$.value,A.value+=$.value;return}$.prev=A,P.push($),A=$},ye=($,Q)=>{const M={...I[Q],conditions:1,inner:""};M.prev=A,M.parens=T.parens,M.output=T.output;const U=(j.capture?"(":"")+M.open;He("parens"),B({type:$,value:Q,output:T.output?"":D}),B({type:"paren",extglob:!0,value:Y(),output:U}),K.push(M)},Se=$=>{let Q=$.close+(j.capture?")":""),M;if($.type==="negate"){let U=ne;if($.inner&&$.inner.length>1&&$.inner.includes("/")&&(U=ce(j)),(U!==ne||qe()||/^\)+$/.test(Ne()))&&(Q=$.close=`)$))${U}`),$.inner.includes("*")&&(M=Ne())&&/^\.[^\\/.]+$/.test(M)){const ae=v(M,{...C,fastpaths:!1}).output;Q=$.close=`)${ae})${U})`}$.prev.type==="bos"&&(T.negatedExtglob=!0)}B({type:"paren",extglob:!0,value:k,output:Q}),Re("parens")};if(j.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(x)){let $=!1,Q=x.replace(p,(M,U,ae,be,Le,Is)=>be==="\\"?($=!0,M):be==="?"?U?U+be+(Le?q.repeat(Le.length):""):Is===0?z+(Le?q.repeat(Le.length):""):q.repeat(ae.length):be==="."?O.repeat(ae.length):be==="*"?U?U+be+(Le?ne:""):ne:U?M:`\\${M}`);return $===!0&&(j.unescape===!0?Q=Q.replace(/\\/g,""):Q=Q.replace(/\\+/g,M=>M.length%2===0?"\\\\":M?"\\":"")),Q===x&&j.contains===!0?(T.output=x,T):(T.output=l.wrapOutput(Q,T,C),T)}for(;!qe();){if(k=Y(),k==="\0")continue;if(k==="\\"){const M=G();if(M==="/"&&j.bash!==!0||M==="."||M===";")continue;if(!M){k+="\\",B({type:"text",value:k});continue}const U=/^\\+/.exec(Ne());let ae=0;if(U&&U[0].length>2&&(ae=U[0].length,T.index+=ae,ae%2!==0&&(k+="\\")),j.unescape===!0?k=Y():k+=Y(),T.brackets===0){B({type:"text",value:k});continue}}if(T.brackets>0&&(k!=="]"||A.value==="["||A.value==="[^")){if(j.posix!==!1&&k===":"){const M=A.value.slice(1);if(M.includes("[")&&(A.posix=!0,M.includes(":"))){const U=A.value.lastIndexOf("["),ae=A.value.slice(0,U),be=A.value.slice(U+2),Le=m[be];if(Le){A.value=ae+Le,T.backtrack=!0,Y(),!S.output&&P.indexOf(A)===1&&(S.output=D);continue}}}(k==="["&&G()!==":"||k==="-"&&G()==="]")&&(k=`\\${k}`),k==="]"&&(A.value==="["||A.value==="[^")&&(k=`\\${k}`),j.posix===!0&&k==="!"&&A.value==="["&&(k="^"),A.value+=k,Ie({value:k});continue}if(T.quotes===1&&k!=='"'){k=l.escapeRegex(k),A.value+=k,Ie({value:k});continue}if(k==='"'){T.quotes=T.quotes===1?0:1,j.keepQuotes===!0&&B({type:"text",value:k});continue}if(k==="("){He("parens"),B({type:"paren",value:k});continue}if(k===")"){if(T.parens===0&&j.strictBrackets===!0)throw new SyntaxError(_("opening","("));const M=K[K.length-1];if(M&&T.parens===M.parens+1){Se(K.pop());continue}B({type:"paren",value:k,output:T.parens?")":"\\)"}),Re("parens");continue}if(k==="["){if(j.nobracket===!0||!Ne().includes("]")){if(j.nobracket!==!0&&j.strictBrackets===!0)throw new SyntaxError(_("closing","]"));k=`\\${k}`}else He("brackets");B({type:"bracket",value:k});continue}if(k==="]"){if(j.nobracket===!0||A&&A.type==="bracket"&&A.value.length===1){B({type:"text",value:k,output:`\\${k}`});continue}if(T.brackets===0){if(j.strictBrackets===!0)throw new SyntaxError(_("opening","["));B({type:"text",value:k,output:`\\${k}`});continue}Re("brackets");const M=A.value.slice(1);if(A.posix!==!0&&M[0]==="^"&&!M.includes("/")&&(k=`/${k}`),A.value+=k,Ie({value:k}),j.literalBrackets===!1||l.hasRegexChars(M))continue;const U=l.escapeRegex(A.value);if(T.output=T.output.slice(0,-A.value.length),j.literalBrackets===!0){T.output+=U,A.value=U;continue}A.value=`(${N}${U}|${A.value})`,T.output+=A.value;continue}if(k==="{"&&j.nobrace!==!0){He("braces");const M={type:"brace",value:k,output:"(",outputIndex:T.output.length,tokensIndex:T.tokens.length};ue.push(M),B(M);continue}if(k==="}"){const M=ue[ue.length-1];if(j.nobrace===!0||!M){B({type:"text",value:k,output:k});continue}let U=")";if(M.dots===!0){const ae=P.slice(),be=[];for(let Le=ae.length-1;Le>=0&&(P.pop(),ae[Le].type!=="brace");Le--)ae[Le].type!=="dots"&&be.unshift(ae[Le].value);U=g(be,j),T.backtrack=!0}if(M.comma!==!0&&M.dots!==!0){const ae=T.output.slice(0,M.outputIndex),be=T.tokens.slice(M.tokensIndex);M.value=M.output="\\{",k=U="\\}",T.output=ae;for(const Le of be)T.output+=Le.output||Le.value}B({type:"brace",value:k,output:U}),Re("braces"),ue.pop();continue}if(k==="|"){K.length>0&&K[K.length-1].conditions++,B({type:"text",value:k});continue}if(k===","){let M=k;const U=ue[ue.length-1];U&&je[je.length-1]==="braces"&&(U.comma=!0,M="|"),B({type:"comma",value:k,output:M});continue}if(k==="/"){if(A.type==="dot"&&T.index===T.start+1){T.start=T.index+1,T.consumed="",T.output="",P.pop(),A=S;continue}B({type:"slash",value:k,output:W});continue}if(k==="."){if(T.braces>0&&A.type==="dot"){A.value==="."&&(A.output=O);const M=ue[ue.length-1];A.type="dots",A.output+=k,A.value+=k,M.dots=!0;continue}if(T.braces+T.parens===0&&A.type!=="bos"&&A.type!=="slash"){B({type:"text",value:k,output:O});continue}B({type:"dot",value:k,output:O});continue}if(k==="?"){if(!(A&&A.value==="(")&&j.noextglob!==!0&&G()==="("&&G(2)!=="?"){ye("qmark",k);continue}if(A&&A.type==="paren"){const U=G();let ae=k;(A.value==="("&&!/[!=<:]/.test(U)||U==="<"&&!/<([!=]|\w+>)/.test(Ne()))&&(ae=`\\${k}`),B({type:"text",value:k,output:ae});continue}if(j.dot!==!0&&(A.type==="slash"||A.type==="bos")){B({type:"qmark",value:k,output:ee});continue}B({type:"qmark",value:k,output:q});continue}if(k==="!"){if(j.noextglob!==!0&&G()==="("&&(G(2)!=="?"||!/[!=<:]/.test(G(3)))){ye("negate",k);continue}if(j.nonegate!==!0&&T.index===0){Ce();continue}}if(k==="+"){if(j.noextglob!==!0&&G()==="("&&G(2)!=="?"){ye("plus",k);continue}if(A&&A.value==="("||j.regex===!1){B({type:"plus",value:k,output:L});continue}if(A&&(A.type==="bracket"||A.type==="paren"||A.type==="brace")||T.parens>0){B({type:"plus",value:k});continue}B({type:"plus",value:L});continue}if(k==="@"){if(j.noextglob!==!0&&G()==="("&&G(2)!=="?"){B({type:"at",extglob:!0,value:k,output:""});continue}B({type:"text",value:k});continue}if(k!=="*"){(k==="$"||k==="^")&&(k=`\\${k}`);const M=f.exec(Ne());M&&(k+=M[0],T.index+=M[0].length),B({type:"text",value:k});continue}if(A&&(A.type==="globstar"||A.star===!0)){A.type="star",A.star=!0,A.value+=k,A.output=ne,T.backtrack=!0,T.globstar=!0,ze(k);continue}let $=Ne();if(j.noextglob!==!0&&/^\([^?]/.test($)){ye("star",k);continue}if(A.type==="star"){if(j.noglobstar===!0){ze(k);continue}const M=A.prev,U=M.prev,ae=M.type==="slash"||M.type==="bos",be=U&&(U.type==="star"||U.type==="globstar");if(j.bash===!0&&(!ae||$[0]&&$[0]!=="/")){B({type:"star",value:k,output:""});continue}const Le=T.braces>0&&(M.type==="comma"||M.type==="brace"),Is=K.length&&(M.type==="pipe"||M.type==="paren");if(!ae&&M.type!=="paren"&&!Le&&!Is){B({type:"star",value:k,output:""});continue}for(;$.slice(0,3)==="/**";){const kn=x[T.index+4];if(kn&&kn!=="/")break;$=$.slice(3),ze("/**",3)}if(M.type==="bos"&&qe()){A.type="globstar",A.value+=k,A.output=ce(j),T.output=A.output,T.globstar=!0,ze(k);continue}if(M.type==="slash"&&M.prev.type!=="bos"&&!be&&qe()){T.output=T.output.slice(0,-(M.output+A.output).length),M.output=`(?:${M.output}`,A.type="globstar",A.output=ce(j)+(j.strictSlashes?")":"|$)"),A.value+=k,T.globstar=!0,T.output+=M.output+A.output,ze(k);continue}if(M.type==="slash"&&M.prev.type!=="bos"&&$[0]==="/"){const kn=$[1]!==void 0?"|$":"";T.output=T.output.slice(0,-(M.output+A.output).length),M.output=`(?:${M.output}`,A.type="globstar",A.output=`${ce(j)}${W}|${W}${kn})`,A.value+=k,T.output+=M.output+A.output,T.globstar=!0,ze(k+Y()),B({type:"slash",value:"/",output:""});continue}if(M.type==="bos"&&$[0]==="/"){A.type="globstar",A.value+=k,A.output=`(?:^|${W}|${ce(j)}${W})`,T.output=A.output,T.globstar=!0,ze(k+Y()),B({type:"slash",value:"/",output:""});continue}T.output=T.output.slice(0,-A.output.length),A.type="globstar",A.output=ce(j),A.value+=k,T.output+=A.output,T.globstar=!0,ze(k);continue}const Q={type:"star",value:k,output:ne};if(j.bash===!0){Q.output=".*?",(A.type==="bos"||A.type==="slash")&&(Q.output=he+Q.output),B(Q);continue}if(A&&(A.type==="bracket"||A.type==="paren")&&j.regex===!0){Q.output=k,B(Q);continue}(T.index===T.start||A.type==="slash"||A.type==="dot")&&(A.type==="dot"?(T.output+=te,A.output+=te):j.dot===!0?(T.output+=Z,A.output+=Z):(T.output+=he,A.output+=he),G()!=="*"&&(T.output+=D,A.output+=D)),B(Q)}for(;T.brackets>0;){if(j.strictBrackets===!0)throw new SyntaxError(_("closing","]"));T.output=l.escapeLast(T.output,"["),Re("brackets")}for(;T.parens>0;){if(j.strictBrackets===!0)throw new SyntaxError(_("closing",")"));T.output=l.escapeLast(T.output,"("),Re("parens")}for(;T.braces>0;){if(j.strictBrackets===!0)throw new SyntaxError(_("closing","}"));T.output=l.escapeLast(T.output,"{"),Re("braces")}if(j.strictSlashes!==!0&&(A.type==="star"||A.type==="bracket")&&B({type:"maybe_slash",value:"",output:`${W}?`}),T.backtrack===!0){T.output="";for(const $ of T.tokens)T.output+=$.output!=null?$.output:$.value,$.suffix&&(T.output+=$.suffix)}return T};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:N,DOTS_SLASH:R,NO_DOT:I,NO_DOTS:O,NO_DOTS_SLASH:L,STAR:W,START_ANCHOR:D}=c.globChars(j.windows),H=j.dot?O:I,X=j.dot?L:I,te=j.capture?"":"?:",Z={negated:!1,prefix:""};let q=j.bash===!0?".*?":W;j.capture&&(q=`(${q})`);const ee=he=>he.noglobstar===!0?q:`(${te}(?:(?!${D}${he.dot?R:S}).)*?)`,se=he=>{switch(he){case"*":return`${H}${N}${q}`;case".*":return`${S}${N}${q}`;case"*.*":return`${H}${q}${S}${N}${q}`;case"*/*":return`${H}${q}${P}${N}${X}${q}`;case"**":return H+ee(j);case"**/*":return`(?:${H}${ee(j)}${P})?${X}${N}${q}`;case"**/*.*":return`(?:${H}${ee(j)}${P})?${X}${q}${S}${N}${q}`;case"**/.*":return`(?:${H}${ee(j)}${P})?${S}${N}${q}`;default:{const z=/^(.*?)\.(\w+)$/.exec(he);if(!z)return;const ne=se(z[1]);return ne?ne+S+z[2]:void 0}}},me=l.removePrefix(x,Z);let ce=se(me);return ce&&j.strictSlashes!==!0&&(ce+=`${P}?`),ce},o.exports=v},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,g,_=!1)=>{if(Array.isArray(h)){const P=h.map(R=>p(R,g,_));return R=>{for(const I of P){const O=I(R);if(O)return O}return!1}}const v=f(h)&&h.tokens&&h.input;if(h===""||typeof h!="string"&&!v)throw new TypeError("Expected pattern to be a non-empty string");const x=g||{},C=x.windows,j=v?p.compileRe(h,g):p.makeRe(h,g,!1,!0),b=j.state;delete j.state;let w=()=>!1;if(x.ignore){const P={...g,ignore:null,onMatch:null,onResult:null};w=p(x.ignore,P,_)}const S=(P,N=!1)=>{const{isMatch:R,match:I,output:O}=p.test(P,j,g,{glob:h,posix:C}),L={glob:h,state:b,regex:j,posix:C,input:P,output:O,match:I,isMatch:R};return typeof x.onResult=="function"&&x.onResult(L),R===!1?(L.isMatch=!1,N?L:!1):w(P)?(typeof x.onIgnore=="function"&&x.onIgnore(L),L.isMatch=!1,N?L:!1):(typeof x.onMatch=="function"&&x.onMatch(L),N?L:!0)};return _&&(S.state=b),S};p.test=(h,g,_,{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=_||{},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=p.matchBase(h,g,_,x):b=g.exec(w)),{isMatch:!!b,match:b,output:w}},p.matchBase=(h,g,_)=>(g instanceof RegExp?g:p.makeRe(g,_)).test(u.basename(h)),p.isMatch=(h,g,_)=>p(g,_)(h),p.parse=(h,g)=>Array.isArray(h)?h.map(_=>p.parse(_,g)):l(h,{...g,fastpaths:!1}),p.scan=(h,g)=>c(h,g),p.compileRe=(h,g,_=!1,v=!1)=>{if(_===!0)return h.output;const x=g||{},C=x.contains?"":"^",j=x.contains?"":"$";let b=`${C}(?:${h.output})${j}`;h&&h.negated===!0&&(b=`^(?!${b}).*$`);const w=p.toRegex(b,g);return v===!0&&(w.state=h),w},p.makeRe=(h,g={},_=!1,v=!1)=>{if(!h||typeof h!="string")throw new TypeError("Expected a non-empty string");let x={negated:!1,fastpaths:!0};return g.fastpaths!==!1&&(h[0]==="."||h[0]==="*")&&(x.output=l.fastpaths(h,g)),x.output||(x=l(h,g)),p.compileRe(x,g,_,v)},p.toRegex=(h,g)=>{try{const _=g||{};return new RegExp(h,_.flags||(_.nocase?"i":""))}catch(_){if(g&&g.debug===!0)throw _;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:g,CHAR_LEFT_CURLY_BRACE:_,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=I=>I===g||I===m,N=I=>{I.isPrefix!==!0&&(I.depth=I.isGlobstar?1/0:1)},R=(I,O)=>{const L=O||{},W=I.length-1,D=L.parts===!0||L.scanToEnd===!0,H=[],X=[],te=[];let Z=I,q=-1,ee=0,se=0,me=!1,ce=!1,he=!1,z=!1,ne=!1,T=!1,K=!1,ue=!1,je=!1,A=!1,k=0,qe,G,Y={value:"",depth:0,isGlob:!1};const Ne=()=>q>=W,ze=()=>Z.charCodeAt(q+1),Ie=()=>(qe=G,Z.charCodeAt(++q));for(;q<W;){G=Ie();let ye;if(G===m){K=Y.backslashes=!0,G=Ie(),G===_&&(T=!0);continue}if(T===!0||G===_){for(k++;Ne()!==!0&&(G=Ie());){if(G===m){K=Y.backslashes=!0,Ie();continue}if(G===_){k++;continue}if(T!==!0&&G===p&&(G=Ie())===p){if(me=Y.isBrace=!0,he=Y.isGlob=!0,A=!0,D===!0)continue;break}if(T!==!0&&G===f){if(me=Y.isBrace=!0,he=Y.isGlob=!0,A=!0,D===!0)continue;break}if(G===b&&(k--,k===0)){T=!1,me=Y.isBrace=!0,A=!0;break}}if(D===!0)continue;break}if(G===g){if(H.push(q),X.push(Y),Y={value:"",depth:0,isGlob:!1},A===!0)continue;if(qe===p&&q===ee+1){ee+=2;continue}se=q+1;continue}if(L.noext!==!0&&(G===C||G===u||G===l||G===j||G===h)===!0&&ze()===v){if(he=Y.isGlob=!0,z=Y.isExtglob=!0,A=!0,G===h&&q===ee&&(je=!0),D===!0){for(;Ne()!==!0&&(G=Ie());){if(G===m){K=Y.backslashes=!0,G=Ie();continue}if(G===w){he=Y.isGlob=!0,A=!0;break}}continue}break}if(G===l){if(qe===l&&(ne=Y.isGlobstar=!0),he=Y.isGlob=!0,A=!0,D===!0)continue;break}if(G===j){if(he=Y.isGlob=!0,A=!0,D===!0)continue;break}if(G===x){for(;Ne()!==!0&&(ye=Ie());){if(ye===m){K=Y.backslashes=!0,Ie();continue}if(ye===S){ce=Y.isBracket=!0,he=Y.isGlob=!0,A=!0;break}}if(D===!0)continue;break}if(L.nonegate!==!0&&G===h&&q===ee){ue=Y.negated=!0,ee++;continue}if(L.noparen!==!0&&G===v){if(he=Y.isGlob=!0,D===!0){for(;Ne()!==!0&&(G=Ie());){if(G===v){K=Y.backslashes=!0,G=Ie();continue}if(G===w){A=!0;break}}continue}break}if(he===!0){if(A=!0,D===!0)continue;break}}L.noext===!0&&(z=!1,he=!1);let Ce=Z,He="",Re="";ee>0&&(He=Z.slice(0,ee),Z=Z.slice(ee),se-=ee),Ce&&he===!0&&se>0?(Ce=Z.slice(0,se),Re=Z.slice(se)):he===!0?(Ce="",Re=Z):Ce=Z,Ce&&Ce!==""&&Ce!=="/"&&Ce!==Z&&P(Ce.charCodeAt(Ce.length-1))&&(Ce=Ce.slice(0,-1)),L.unescape===!0&&(Re&&(Re=c.removeBackslashes(Re)),Ce&&K===!0&&(Ce=c.removeBackslashes(Ce)));const B={prefix:He,input:I,start:ee,base:Ce,glob:Re,isBrace:me,isBracket:ce,isGlob:he,isExtglob:z,isGlobstar:ne,negated:ue,negatedExtglob:je};if(L.tokens===!0&&(B.maxDepth=0,P(G)||X.push(Y),B.tokens=X),L.parts===!0||L.tokens===!0){let ye;for(let Se=0;Se<H.length;Se++){const $=ye?ye+1:ee,Q=H[Se],M=I.slice($,Q);L.tokens&&(Se===0&&ee!==0?(X[Se].isPrefix=!0,X[Se].value=He):X[Se].value=M,N(X[Se]),B.maxDepth+=X[Se].depth),(Se!==0||M!=="")&&te.push(M),ye=Q}if(ye&&ye+1<I.length){const Se=I.slice(ye+1);te.push(Se),L.tokens&&(X[X.length-1].value=Se,N(X[X.length-1]),B.maxDepth+=X[X.length-1].depth)}B.slashes=H,B.parts=te}return B};o.exports=R},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 g=f.lastIndexOf(p,h);return g===-1?f:f[g-1]==="\\"?a.escapeLast(f,p,g-1):`${f.slice(0,g)}\\${f.slice(g)}`},a.removePrefix=(f,p={})=>{let h=f;return h.startsWith("./")&&(h=h.slice(2),p.prefix="./"),h},a.wrapOutput=(f,p={},h={})=>{const g=h.contains?"":"^",_=h.contains?"":"$";let v=`${g}(?:${f})${_}`;return p.negated===!0&&(v=`(?:^(?!${v}).*$)`),v},a.basename=(f,{windows:p}={})=>{const h=f.split(p?/[\\/]/:"/"),g=h[h.length-1];return g===""?h[h.length-2]:g}}},t={};function r(o){var a=t[o];if(a!==void 0)return a.exports;var i=t[o]={exports:{}},c=!0;try{e[o](i,i.exports,r),c=!1}finally{c&&delete t[o]}return i.exports}typeof r<"u"&&(r.ab=__dirname+"/");var s=r(170);oo.exports=s})()),oo.exports}var oc;function kv(){return oc||(oc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}t(e,{hasLocalMatch:function(){return o},matchLocalPattern:function(){return s}});const r=sm();function s(a,i){if(a.search!==void 0&&a.search!==i.search)return!1;var c;return!!(0,r.makeRe)((c=a.pathname)!=null?c:"**",{dot:!0}).test(i.pathname)}function o(a,i){if(!a)return!0;const c=new URL(i,"http://n");return a.some(l=>s(l,c))}}(so)),so}var ao={},ac;function Ov(){return ac||(ac=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}t(e,{hasRemoteMatch:function(){return o},matchRemotePattern:function(){return s}});const r=sm();function s(a,i){if(a.protocol!==void 0){const l=i.protocol.slice(0,-1);if(a.protocol!==l)return!1}if(a.port!==void 0&&a.port!==i.port)return!1;if(a.hostname===void 0)throw new Error(`Pattern should define hostname but found
|
|
17
|
+
`+JSON.stringify(a));if(!(0,r.makeRe)(a.hostname).test(i.hostname)||a.search!==void 0&&a.search!==i.search)return!1;var c;return!!(0,r.makeRe)((c=a.pathname)!=null?c:"**",{dot:!0}).test(i.pathname)}function o(a,i,c){return a.some(l=>c.hostname===l)||i.some(l=>s(l,c))}}(ao)),ao}var ic;function om(){return ic||(ic=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return s}});const t=75;function r(o){let{config:a,src:i,width:c,quality:l}=o;var u;if(process.env.NODE_ENV!=="production"){const f=[];if(i||f.push("src"),c||f.push("width"),f.length>0)throw new Error("Next Image Optimization requires "+f.join(", ")+" to be provided. Make sure you pass them as props to the `next/image` component. Received: "+JSON.stringify({src:i,width:c,quality:l}));if(i.startsWith("//"))throw new Error('Failed to parse src "'+i+'" on `next/image`, protocol-relative URL (//) must be changed to an absolute URL (http:// or https://)');if(i.startsWith("/")&&a.localPatterns&&process.env.NODE_ENV!=="test"&&process.env.NEXT_RUNTIME!=="edge"){const{hasLocalMatch:p}=kv();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}=Ov();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:"")}r.__next_img_default=!0;const s=r}(no)),no}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return j}});const r=Ke,s=jr,o=n,a=s._(y),i=r._(la),c=r._(Tv()),l=qa,u=Ss,m=Av(),f=Cs,p=ed(),h=r._(om()),g=process.env.__NEXT_IMAGE_OPTS;typeof window>"u"&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);function _(b,w,S,P,N,R,I){const O=b==null?void 0:b.src;if(!b||b["data-loaded-src"]===O)return;b["data-loaded-src"]=O,("decode"in b?b.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(!(!b.parentElement||!b.isConnected)){if(w!=="empty"&&N(!0),S!=null&&S.current){const W=new Event("load");Object.defineProperty(W,"target",{writable:!1,value:b});let D=!1,H=!1;S.current({...W,nativeEvent:W,currentTarget:b,target:b,isDefaultPrevented:()=>D,isPropagationStopped:()=>H,persist:()=>{},preventDefault:()=>{D=!0,W.preventDefault()},stopPropagation:()=>{H=!0,W.stopPropagation()}})}if(P!=null&&P.current&&P.current(b),process.env.NODE_ENV!=="production"){const W=new URL(O,"http://n").searchParams.get("url")||O;if(b.getAttribute("data-nimg")==="fill"){if(!R&&(!I||I==="100vw")&&b.getBoundingClientRect().width/window.innerWidth<.6&&(I==="100vw"?(0,f.warnOnce)('Image with src "'+W+'" 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 "'+W+'" 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:X}=window.getComputedStyle(b.parentElement),te=["absolute","fixed","relative"];te.includes(X)||(0,f.warnOnce)('Image with src "'+W+'" has "fill" and parent element with invalid "position". Provided "'+X+'" should be one of '+te.map(String).join(",")+".")}b.height===0&&(0,f.warnOnce)('Image with src "'+W+'" 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"),H=b.width.toString()!==b.getAttribute("width");(D&&!H||!D&&H)&&(0,f.warnOnce)('Image with src "'+W+`" 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:N,height:R,width:I,decoding:O,className:L,style:W,fetchPriority:D,placeholder:H,loading:X,unoptimized:te,fill:Z,onLoadRef:q,onLoadingCompleteRef:ee,setBlurComplete:se,setShowAltText:me,sizesInput:ce,onLoad:he,onError:z,...ne}=b;return(0,o.jsx)("img",{...ne,...v(D),loading:X,width:I,height:R,decoding:O,"data-nimg":Z?"fill":"1",className:L,style:W,sizes:N,srcSet:P,src:S,ref:(0,a.useCallback)(T=>{w&&(typeof w=="function"?w(T):typeof w=="object"&&(w.current=T)),T&&(z&&(T.src=T.src),process.env.NODE_ENV!=="production"&&(S||console.error('Image is missing required "src" property:',T),T.getAttribute("alt")===null&&console.error('Image is missing required "alt" property. Please add Alternative Text to describe the image for screen readers and search engines.')),T.complete&&_(T,H,q,ee,se,te,ce))},[S,H,q,ee,se,z,te,ce,w]),onLoad:T=>{const K=T.currentTarget;_(K,H,q,ee,se,te,ce)},onError:T=>{me(!0),H!=="empty"&&se(!0),z&&z(T)}})});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)(p.RouterContext),N=(0,a.useContext)(m.ImageConfigContext),R=(0,a.useMemo)(()=>{var ee;const se=g||N||u.imageConfigDefault,me=[...se.deviceSizes,...se.imageSizes].sort((z,ne)=>z-ne),ce=se.deviceSizes.sort((z,ne)=>z-ne),he=(ee=se.qualities)==null?void 0:ee.sort((z,ne)=>z-ne);return{...se,allSizes:me,deviceSizes:ce,qualities:he}},[N]),{onLoad:I,onLoadingComplete:O}=b,L=(0,a.useRef)(I);(0,a.useEffect)(()=>{L.current=I},[I]);const W=(0,a.useRef)(O);(0,a.useEffect)(()=>{W.current=O},[O]);const[D,H]=(0,a.useState)(!1),[X,te]=(0,a.useState)(!1),{props:Z,meta:q}=(0,l.getImgProps)(b,{defaultLoader:h.default,imgConf:R,blurComplete:D,showAltText:X});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x,{...Z,unoptimized:q.unoptimized,placeholder:q.placeholder,fill:q.fill,onLoadRef:L,onLoadingCompleteRef:W,setBlurComplete:H,setShowAltText:te,sizesInput:b.sizes,ref:w}),q.priority?(0,o.jsx)(C,{isAppRouter:P,imgAttributes:Z}):null]})});(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(Ho,Ho.exports);var Lv=Ho.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 r=Ke,s=qa,o=Lv,a=r._(om());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})(tm);var Mv=tm;const pn=F.getDefaultExportFromCjs(Mv),Dv=({item:e,CONSTANTS:t})=>{const r=e.icon?t.PAYMENT_FLAGS.includes(e.icon)?"payment":"social":null,s=r==="payment"?t.PAYMENT_FLAGS_DICTIONARY[e.icon]:e.icon;return e.link?n.jsxs(et,{href:e.link,target:"_blank",rel:"noopener noreferrer",className:_e["support-item"],children:[e.image&&n.jsx("img",{src:e.image,alt:"",loading:"lazy"}),r==="payment"?n.jsx(pn,{alt:s,src:`/assets/${s}.svg`,width:20,height:20}):n.jsx(d.Icon,{size:"small",name:s})]}):n.jsxs("div",{className:_e["support-item"],children:[e.image&&n.jsx("img",{src:e.image,alt:"",loading:"lazy"}),r==="payment"?n.jsx(pn,{alt:s,src:`/assets/${s}.svg`,width:20,height:20}):n.jsx(d.Icon,{size:"small",name:s})]})},Fv=({content:e,CONSTANTS:t})=>n.jsx("div",{className:_e["support-container"],children:e==null?void 0:e.map((r,s)=>n.jsxs("div",{"data-device":r.device,className:_e["support-section"],children:[n.jsxs("div",{className:_e["support-text"],children:[r.title&&n.jsx("h3",{children:r.title}),r.description&&n.jsx("p",{children:r.description})]}),Array.isArray(r.items)&&r.items.length&&n.jsx("div",{className:_e["support-items"],"data-gap":r.gap,children:r.items.map((o,a)=>n.jsx(Dv,{item:o,CONSTANTS:t},`footer-support-item-${a}`))})]},`footer-support-${s}`))}),zv=({name:e,nameIcon:t,maxWidth:r,rowAlignContent:s,columnAlignContent:o,columnAlignItems:a,textAlignContent:i,textAlignItems:c,children:l})=>n.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:s,alignItems:s},columnWrapper:{alignContent:o,alignItems:a}},children:n.jsxs(d.TextStructure.DivWrapper,{alignContent:i,alignItems:c,className:_e.footer__column,children:[n.jsxs("div",{className:t?_e.footer__columnTitleIcon:_e.footer__columnTitle,children:[n.jsx(d.Icon,{name:`${t}`,size:"small"}),e&&n.jsx("div",{children:e})]}),n.jsx("div",{className:_e.footer__columnContent,style:{maxWidth:`${r}px`},children:l})]})}),Bv=({name:e,nameIcon:t,maxWidth:r,children:s,ICONS:o,...a})=>n.jsxs(d.Accordion.Wrapper,{className:_e.accordionWrapper,title:"accordion-wrapper",...a,children:[n.jsx(d.Accordion.Header,{id:(a==null?void 0:a.id)??"",className:_e.accordionHeader,closeIndicator:n.jsx(d.Icon,{name:o.arrow_up,size:"medium"}),openIndicator:n.jsx(d.Icon,{name:o.arrow_down,size:"medium"}),title:"accordion-header",children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{className:t?_e.accordionTextWrapper:"",children:[n.jsx(d.Icon,{name:`${t}`,size:"medium"}),n.jsx("h2",{className:"typography-style-body-md",children:e})]})})}),n.jsx(d.Accordion.Body,{title:"accordion-body",children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:_e.footer__columnContent,style:{maxWidth:`${r}px`},children:s})})})]}),io=e=>{const{isMobile:t}=oe();return t?n.jsx(Bv,{...e}):n.jsx(zv,{...e})},Qn=({type:e,children:t,className:r,collumnName:s,collumnNameIcon:o,icons:a,iconLink:i,iconSize:c,link:l,paymentDisclaimer:u,paymentTitle:m,rowAlignContent:f,columnAlignContent:p,columnAlignItems:h,textAlignContent:g,textAlignItems:_,...v})=>{let x;const{handleSelectContent:C}=le(),{nextimage:j}=pe();switch(e){case"menu":x=n.jsx(et,{className:_e.footer__itemLink,href:l??"#",prefetch:!1,children:n.jsx("span",{onClick:()=>{C({content:`footer:${s}:${t}`})},children:t})});break;case"payment":x=n.jsxs("div",{className:d.helpers.classNameConcat(_e.payment,_e.footer__itemSmallText),...v,children:[u,n.jsxs("div",{className:d.helpers.classNameConcat(_e.footer__iconContainer,_e.footer__iconListSubHeader),children:[m,n.jsx("div",{className:_e.footer__iconList,children:a==null?void 0:a.map((b,w)=>n.jsx(j,{alt:b,src:`/assets/${b}.svg`,width:c??20,height:c??20},w))})]})]});break;case"social-media":x=n.jsx("div",{className:_e.footer__iconContainer,...v,children:n.jsx("div",{className:_e.footer__iconList,children:i==null?void 0:i.map((b,w)=>n.jsx(et,{prefetch:!1,href:b.link??"#",target:"_blank",children:n.jsx(d.Icon,{size:"medium",name:b.icon,onClick:()=>C({content:`footer:redes-sociais:${b.icon}`})})},w))})});break;default:x=n.jsx("div",{className:r,...v,children:t})}return n.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:f,alignItems:f},columnWrapper:{alignContent:p,alignItems:h}},...v,children:n.jsx(d.TextStructure.DivWrapper,{alignContent:g,alignItems:_,className:d.helpers.classNameConcat(_e.footer__item,r),children:x})})},Uv=({className:e,text:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat(_e.footer__legalInformation,e),children:n.jsx("span",{children:t})}),am=()=>{const{nextimage:e}=pe();return n.jsx("div",{className:_e["footer--stamps"],children:n.jsx(e,{alt:"Empresa B",className:_e["footer--stamps--company"],src:"/images/Footer/new_certfB.png",width:56,height:64})})};am.displayName="Footer.Stamps";const im=({children:e,legalTextSlot:t,adornment:r,className:s,...o})=>{const{isMobile:a}=oe(),i=y.Children.toArray(e).filter(Boolean),c=i.length;return n.jsxs("div",{className:_e.footer__main,children:[(r==null?void 0:r.top)&&n.jsx("div",{className:_e.footer__top,children:r==null?void 0:r.top}),c>0&&n.jsx("div",{...o,className:d.helpers.classNameConcat(_e.footer__wrapper,s),children:i.map((l,u)=>n.jsx("div",{style:{flexGrow:1,maxWidth:`calc(100% / ${a?1:"fit-content"})`},children:l},u))}),(r==null?void 0:r.bottom)&&n.jsx("div",{className:_e.footer__bottom,children:r.bottom}),t&&n.jsx("div",{className:_e.footer__legalText,children:t})]})};im.displayName="Footer.Wrapper";const cm=({data:{links:{links:e}},payments:t,socialInfo:r,socialMedias:s,adornment:o,LEGAL_INFORMATION_TEXT:a,ICONS:i,className:c,hasFooterStamps:l})=>{var u;return n.jsxs(im,{className:c,adornment:o,legalTextSlot:n.jsx(Uv,{text:a}),children:[Array.isArray(e.column)&&e.column.map((m,f)=>n.jsx(io,{id:`${f}column-menu`,name:m.name,nameIcon:m.nameIcon,ICONS:i,children:m.items.map((p,h)=>n.jsx(Qn,{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&&n.jsx(io,{id:"payment-column",name:t==null?void 0:t.title,nameIcon:t==null?void 0:t.titleIcon,maxWidth:150,ICONS:i,children:n.jsx(Qn,{type:"payment",paymentDisclaimer:t==null?void 0:t.text,paymentTitle:t==null?void 0:t.flagsTitle,iconSize:16,icons:t==null?void 0:t.acceptedFlags})}),n.jsxs(io,{id:"social-media-column",name:r==null?void 0:r.title,ICONS:i,children:[r!=null&&r.subTitle?n.jsx(Qn,{children:r==null?void 0:r.subTitle}):null,n.jsx(Qn,{type:"social-media",iconSize:24,iconLink:s}),l&&n.jsx(am,{})]})]})};cm.displayName="Footer";const qv=Object.freeze(Object.defineProperty({__proto__:null,Footer:cm,FooterSupport:Fv},Symbol.toStringTag,{value:"Module"})),Hv="_header_9xxjk_57",$v="_actions_9xxjk_131",Vv="_breadcrumb_9xxjk_142",Wv="_credits_9xxjk_157",Gv="_pdplinks_9xxjk_185",Kv="_similars_9xxjk_212",Qv="_sizes_9xxjk_251",Xv="_measurementTable_9xxjk_267",Yv="_measurementHead_9xxjk_280",Jv="_measurementRows_9xxjk_285",Zv="_measurementRowsTitle_9xxjk_302",ex="_measurementRowsText_9xxjk_314",tx="_measurementImage_9xxjk_325",rx="_measurementImageContainer_9xxjk_328",nx="_measurementContent_9xxjk_337",sx="_measurementTitle_9xxjk_341",ox="_measurementClose_9xxjk_352",ax="_productref_9xxjk_417",ix="_slideOut_9xxjk_1",cx="_slideIn_9xxjk_1",lx="_content_9xxjk_397",ux="_pdp_9xxjk_185",dx="_divider_9xxjk_575",J={"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:Hv,"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:$v,"add-to-cart":"_add-to-cart_9xxjk_138",breadcrumb:Vv,"breadcrumb--active":"_breadcrumb--active_9xxjk_147",credits:Wv,"gallery-carousel-modifier":"_gallery-carousel-modifier_9xxjk_162",pdplinks:Gv,"links-wrapper":"_links-wrapper_9xxjk_195",similars:Kv,"similars-info":"_similars-info_9xxjk_224","toggle-style-modifier":"_toggle-style-modifier_9xxjk_233","accessibility-info":"_accessibility-info_9xxjk_237",sizes:Qv,"price-wrapper":"_price-wrapper_9xxjk_263",measurementTable:Xv,measurementHead:Yv,measurementRows:Jv,measurementRowsTitle:Zv,measurementRowsText:ex,measurementImage:tx,measurementImageContainer:rx,measurementContent:nx,measurementTitle:sx,measurementClose:ox,"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:ax,"tabs-panel":"_tabs-panel_9xxjk_428","tabs-panel-exit":"_tabs-panel-exit_9xxjk_434",slideOut:ix,"tabs-panel-enter":"_tabs-panel-enter_9xxjk_438",slideIn:cx,content:lx,pdp:ux,"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:dx,"breadcrumbs-desktop":"_breadcrumbs-desktop_9xxjk_580","breadcrumbs-mobile":"_breadcrumbs-mobile_9xxjk_589"},fx=({children:e,link:t,TOGGLE_STYLE_MODIFIER:r})=>{const{isMobile:s}=oe(),{router:o}=pe(),a=()=>{t&&o.push(t)},i=y.useRef(null);return n.jsx(d.ToggleStyle.Wrapper,{size:s?"medium":"small",style:{...r,border:`${i.current===t?"2":"1"}`,overflow:"hidden",padding:"0"},onClick:a,active:i.current===t,children:e})},lm=({productId:e,similars:t,TOGGLE_STYLE_MODIFIER:r})=>{const{thumbImage:s}=Xe(),o=[{productId:e,slug:"",textureImage:(s==null?void 0:s.imageUrl)??"",textureAlt:(s==null?void 0:s.imageText)??""},...t];return n.jsx("div",{children:o.map((a,i)=>a.textureImage?n.jsxs(fx,{link:a.slug?a.slug:null,TOGGLE_STYLE_MODIFIER:r,children:[n.jsx(d.ToggleStyle.DisabledAdornment,{}),n.jsx(d.ToggleStyle.Texture,{children:n.jsx(Oe.Image,{alt:a.textureAlt,src:a.textureImage,height:34,width:34,style:{borderRadius:0,height:"100%"}})})]},`similars-item-${i}`):null)})},mx=({children:e,storeId:t,productId:r,PDP_INFO:s,TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:a})=>{const{items:i,loadSimilars:c}=La(r,{filterTexture:o,storeId:t});return y.useEffect(()=>{c()},[c]),n.jsxs("div",{className:J.similars,children:[n.jsxs("div",{className:J["similars-info"],children:[n.jsx("span",{className:J["sections-title"],children:s.product.color_title}),e]}),n.jsx(lm,{productId:r,similars:i,TOGGLE_STYLE_MODIFIER:a})]})},px=()=>{const{colorName:e}=Xe();return n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:e.length===0?"":J["accessibility-info"],children:n.jsx("p",{children:e})})})},ws=({className:e,titleId:t})=>{var o,a,i;const{productName:r,tag:s}=Xe();return n.jsxs("div",{className:d.helpers.classNameConcat(J.header,e),children:[s!=null&&s.commercial?n.jsx(d.Tag,{size:"small",title:(o=s.commercial)==null?void 0:o.value,variant:"quaternary",adornment:{start:(a=s.commercial)!=null&&a.icon?n.jsx(d.Icon,{name:s.commercial.icon}):null},children:(i=s.commercial)==null?void 0:i.value}):null,n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h1",{id:t,children:r})})})]})};ws.displayName="PDP.PDPHeader";const Ha=({layout:e="horizontal"})=>{const{price:t,listPrice:r,installments:s}=Xe(),{count:o,value:a}=s,i=F.formatPriceToCurrency(r??0,!0),c=F.formatPriceToCurrency(t??0,!0),l=F.formatPriceToCurrency(a??0);return n.jsx(d.ProductInfo.Root,{size:"small",layout:e,children:n.jsxs(d.ProductInfo.Wrapper,{layout:e,size:"small",className:J["price-wrapper"],children:[n.jsx(d.ProductInfo.ValuesWrapper,{children:t!==r?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:i.toString(),size:"small"}),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:c.toString(),size:"small"})]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:c.toString(),size:"small"})}),o&&o>1&&a?n.jsx(d.ProductInfo.Price,{label:"installment",value:`ou ${o}x ${l}`,size:"small"}):null]})})},$o=({onAddCallBack:e,onDisabledClickCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s})=>{const o=Cn(),{productId:a,productData:i,price:c,listPrice:l,thumbImage:u,isKit:m}=Xe(),{isMobile:f}=oe(),{addToCart:p}=Pe(),{sendDataLayerEvent:h}=le(),g=!m&&(!o.sku||!o.available),_=()=>{if(g&&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 n.jsx(d.Button,{className:J["add-to-cart"],size:f?(r==null?void 0:r.mobile)??"large":(r==null?void 0:r.desktop)??"x-large",onClick:_,children:o.sku&&o.available?`${s.add_to_cart}`:`${s.select_size}`})},hx=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t})=>{const{isMobile:r}=oe(),s=Cn(),{sizesContainerRef:o}=Uc(),{structureRef:a}=Ee();return s.sku&&s.available?n.jsx($o,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t}):n.jsx(d.Button,{className:J["add-to-cart"],size:r?(e==null?void 0:e.mobile)??"large":(e==null?void 0:e.desktop)??"x-large",onClick:()=>{o.current&&a.current&&window.document.body.scrollTo({top:o.current.offsetTop-a.current.offsetHeight,behavior:"smooth"})},children:s.sku&&s.available?t.add_to_cart:t.select_size})},Xn=({value:e,label:t,suppressHydrationWarning:r=!1},s)=>{const o={value:e,...r&&{suppressHydrationWarning:!0}},a=s==="compact"?o:{...o,label:t};return n.jsx(d.Timer.Digit,{...a})},ls=({dateEnd:e,dateInit:t,type:r="default",TIME_ZONE:s,...o})=>{const[a,i]=y.useState(Eu(new _o.TZDate(Date.now(),s),new _o.TZDate(e,s))),[c,l]=y.useState(!1);if(y.useEffect(()=>{l(!0);const h=setInterval(()=>{i(g=>g<=0?(clearInterval(h),0):g-1e3)},1e3);return()=>clearInterval(h)},[]),!c||a<=0)return n.jsx(n.Fragment,{});const u=nn(a,"days"),m=nn(a,"hours"),f=nn(a,"minutes"),p=nn(a);return n.jsxs(d.Timer.Root,{...o,children:[u?n.jsxs(n.Fragment,{children:[Xn({value:u,label:"dias"},r),n.jsx(d.Timer.Separator,{})]}):null,Xn({value:m,label:"horas"},r),n.jsx(d.Timer.Separator,{}),Xn({value:f,label:"min"},r),n.jsx(d.Timer.Separator,{}),Xn({value:p,label:"segs",suppressHydrationWarning:!0},r)]})},$a=({TIME_ZONE:e})=>{const{tag:t}=Xe(),r=t==null?void 0:t.flagGoldenPdp,s=y.useMemo(()=>{var o;if((o=r==null?void 0:r.tagImage)!=null&&o.includes("player.vimeo")){const a=r.tagImage.split("?")[1],i=a==null?void 0:a.split("&"),c=i==null?void 0:i.filter(u=>u.includes("loc")||u.includes("signature")||u.includes("user_id")),l=c==null?void 0:c.join("&");return`${r.tagImage.split("?")[0]}?${l}`}return r==null?void 0:r.tagImage},[r==null?void 0:r.tagImage]);return r!=null&&r.enableTag?n.jsxs("div",{className:J["golden-tag"],style:(r==null?void 0:r.backgroundSelect)==="color"?{backgroundColor:r==null?void 0:r.backgroundColor}:(r==null?void 0:r.backgroundSelect)==="image"?{backgroundImage:`url(${r==null?void 0:r.tagImage})`}:void 0,children:[(r==null?void 0:r.backgroundSelect)==="video"&&n.jsx("div",{className:J["golden-tag-video"],children:n.jsx(Oe.Video,{src:s,autoPlay:!0,muted:!0,loop:!0,playsInline:!0})}),n.jsxs("div",{className:J["golden-tag-content"],children:[n.jsx("span",{className:J["golden-tag-content-text"],style:{color:r==null?void 0:r.textColor},children:r==null?void 0:r.value}),(r==null?void 0:r.countDownEndDate)&&n.jsx(ls,{mode:r==null?void 0:r.timerMode,size:"x-small",type:"compact",dateEnd:new Date((r==null?void 0:r.countDownEndDate)??""),TIME_ZONE:e})]})]}):null};$a.displayName="PDP.GoldenTag";const gx=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t,TIME_ZONE:r,Z_INDEX_WAR:s})=>{const{isMobile:o}=oe();return o?n.jsxs(d.Card,{className:J["bottom-navigation"],shadow:!0,style:{zIndex:s.pdp_bottom_navigation},children:[n.jsxs("div",{className:J["bottom-navigation__header"],children:[n.jsx($a,{TIME_ZONE:r}),n.jsxs("div",{className:J["bottom-navigation__header-content"],children:[n.jsx(ws,{}),n.jsx(Ha,{layout:"name-vertical"})]})]}),n.jsx(hx,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t})]}):null},_x=({children:e,setShowBottomNavigation:t})=>{const r=y.useRef(null),s=da(r),o=y.useRef(s);return y.useEffect(()=>{var i;const{top:a}=((i=r.current)==null?void 0:i.getBoundingClientRect())??{top:0};o.current!==s&&a>0&&(t(!s),o.current=s)},[s]),n.jsx("div",{ref:r,style:{width:"100%"},children:e})},yx=({ICONS:e})=>{const{isMobile:t}=oe(),{price:r,listPrice:s,productData:o,productId:a}=Xe(),{sendDataLayerEvent:i}=le(),c=Xr(),{toggleProduct:l}=Er();return n.jsx(d.Button,{adornment:{start:n.jsx(d.Icon,{name:e[c.includes(a)?"favorite_true":"favorite_false"],size:"medium"})},className:J["add-to-wishlist"],size:t?"medium":"x-large",variant:"tertiary",onClick:()=>{l(a),i({functionKey:"productEvents",data:{event:c.includes(a)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:"PDP"},commonData:{...o,price:r,listPrice:s}}})}})},um=({showWishlist:e=!0,callBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s,ICONS:o,TIME_ZONE:a,Z_INDEX_WAR:i})=>{const{isMobile:c}=oe(),[l,u]=y.useState(!0);return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:J.actions,children:[c?n.jsx(_x,{setShowBottomNavigation:u,children:n.jsx($o,{onAddCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s})}):n.jsx($o,{onAddCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s}),e&&n.jsx(yx,{ICONS:o})]}),c&&l&&n.jsx(gx,{addToCartBtnSize:r,BUY_BUTTON_LABELS:s,Z_INDEX_WAR:i,TIME_ZONE:a})]})},dm=({className:e,device:t,ICONS:r})=>{const{breadcrumbList:s,productName:o}=Xe(),a=i=>i.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return n.jsx(d.BreadCrumb.DivWrapper,{className:d.helpers.classNameConcat(J.breadcrumb,[t==="mobile"?J["breadcrumbs-mobile"]:J["breadcrumbs-desktop"],e]),children:n.jsxs(d.BreadCrumb.List,{children:[Array.isArray(s)&&s.map((i,c)=>{const l=a(s.slice(0,c+1).map(u=>u.replace(/\s/g,"-").toLowerCase()).join("/"));return n.jsx(d.BreadCrumb.Item,{adornment:{end:n.jsx(d.Icon,{name:r.arrow_right})},role:"listitem",children:n.jsx(et,{href:`/${l}`,children:i})},`pdp-breadcrumb-${l}-${c}`)}),n.jsx(d.BreadCrumb.Item,{role:"listitem",className:d.helpers.classNameConcat(J["breadcrumb--active"],e),children:o},"pdp-breadcrumb-productName")]})})};dm.displayName="PDP.BreadCrumb";const fm=({className:e})=>{var s;const{tag:t}=Xe(),r=t==null?void 0:t.flagPdp;return r&&((s=r==null?void 0:r.value)!=null&&s.length)?n.jsx(d.Tag,{className:d.helpers.classNameConcat(J.credits,e),variant:"tertiary",title:r==null?void 0:r.value,size:"small",adornment:{start:r!=null&&r.enableIcon&&(r!=null&&r.icon)?n.jsx(d.Icon,{name:r==null?void 0:r.icon,style:{color:r==null?void 0:r.iconColor}}):null},style:{background:r==null?void 0:r.tagColor,color:r==null?void 0:r.textColor},children:r==null?void 0:r.value}):n.jsx(n.Fragment,{})};fm.displayName="PDPCredits";const vx=()=>{const{descriptionContent:e,productReference:t}=Xe(),[r,s]=y.useState("description");return n.jsxs(d.Tabs.Root,{className:J["tabs-root-modifier"],children:[n.jsx(d.Tabs.TabList,{className:J["tabs-list-modifier"],children:e==null?void 0:e.map(({label:o,value:a})=>n.jsx(d.Tabs.Item,{label:o,value:a,activeTab:r,onTabChange:s,size:"large",className:`${J["tabs-item-modifier"]} ${r===a?J["tabs-item-active"]:""}`},a))}),n.jsxs("div",{className:J["content-wrapper"],children:[r==="description"?n.jsx("div",{children:n.jsxs("span",{className:J.productref,children:["Ref:",t]})}):"",e==null?void 0:e.map(({value:o,content:a})=>r===o?n.jsx(d.Tabs.Panel,{className:`${J["tabs-panel"]} ${r===o?J["tabs-panel-enter"]:J["tabs-panel-exit"]}`,children:n.jsx("div",{className:J.content,dangerouslySetInnerHTML:{__html:a}})},o):null)]})]})},xx=({CURRENCY:e,DELIVERY_INFO_BOXES_ALLOWED:t,FREIGHT_CALCULATION:r,Z_INDEX_WAR:s})=>{const o=Cn(),{isMobile:a}=oe();return n.jsxs(n.Fragment,{children:[a?n.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null,n.jsx(Rf,{skuId:o.available?o.sku:"",size:a?r.inputSize.mobile:r.inputSize.desktop,quantity:o.quantity,sellerId:o.sellerId,seller:o.sellerName,local:"PDP",CONSTANTS_PROPS:{freightConfig:r,deliveryInfoBoxesAllowed:t,toolTipZIndex:s.modal,currency:e}}),a?n.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null]})},cc=({image:e,index:t,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:s})=>{const o=F.resizingImg(e.imageUrl,s.pdp),{nextimage:a}=pe();return n.jsx(a,{src:o,alt:e.imageLabel,objectFit:"contain",...s.pdp,...t<=1&&{priority:!0,loading:"eager"},onClick:()=>{r(t)}},t)},bx=({video:e,productName:t,poster:r})=>{const{sendDataLayerEvent:s}=le(),o=y.useRef(!1);return n.jsx(Oe.Video,{src:e,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,style:{zIndex:-1,aspectRatio:"2/3"},onPlaying:()=>{o.current||(o.current=!0,s({functionKey:"readyEvents",data:{event:"video_start",readyData:{product:t}}}))},poster:r})},mm=({images:e,video:t,handleZoom:r,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 n.jsxs(d.Carousel.Root,{innerRef:f=>{a(f)},className:J["gallery-carousel-modifier"],children:[n.jsx(d.Carousel.Controller,{position:"absolute",top:"24px",bottom:"unset",left:"16px",children:n.jsx(d.Carousel.Bullets,{page:i.currentPage,total:e.length,onBulletClick:f=>c==null?void 0:c.navigateTo(f)})}),n.jsxs(d.Carousel.Body,{children:[n.jsx(d.Carousel.Item,{style:l,children:n.jsx(cc,{image:e[0],index:0,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:o})},"PDP_gallery_0"),t&&n.jsx(d.Carousel.Item,{style:l,children:n.jsx(bx,{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:n.jsx(d.Carousel.Item,{style:l,children:n.jsx(cc,{image:f,index:p,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:o})},`PDP_gallery_${p}`))]})]})};mm.displayName="PDP.Carousel";const jx="_thumbs_1954e_65",Cx="_selected_1954e_92",Sx="_carousel_1954e_164",wx="_bullets_1954e_201",ke={"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:jx,selected:Cx,"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:Sx,"carousel-controller":"_carousel-controller_1954e_169","arrow-left":"_arrow-left_1954e_179","arrow-right":"_arrow-right_1954e_180",bullets:wx,"zoom-popup":"_zoom-popup_1954e_212","image-zoom--mobile":"_image-zoom--mobile_1954e_252","image-zoom--image--img":"_image-zoom--image--img_1954e_282"},lc=({onClose:e,ICONS:t})=>n.jsx("div",{className:`${ke["button-close-container"]}`,children:n.jsx(d.Button,{iconNameStart:t.close,iconSize:"medium",className:`${ke["button-close"]}`,variant:"tertiary",state:"default",size:"medium",onClick:e,style:{textDecoration:"none"}})}),Px=({children:e,Z_INDEX_WAR:t,...r})=>n.jsx("div",{...r,className:ke["image-zoom-wrapper-desktop"],style:{zIndex:t.pdp_image_zoom},children:e}),pm=({images:e,setCurrent:t,setFirstImgLoaded:r,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o})=>{const{nextimage:a}=pe();let i=null;const c=y.useRef(null),{initialize:l,controller:u,pagination:m,itemsStyles:f}=d.Carousel.useCarousel({itemsPerPage:1,gap:10,loop:!1,direction:"row"}),p=g=>{u==null||u.navigateTo(g)},h=()=>{r(!0)};return y.useEffect(()=>{t(m.currentPage)},[m.currentPage,t]),n.jsxs(d.Carousel.Root,{innerRef:g=>{g&&!i&&(i=g,l(i))},className:ke.carousel,children:[n.jsxs(d.Carousel.Controller,{className:ke["carousel-controller"],children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.prevPage(),className:ke["arrow-left"],adornment:{start:n.jsx(d.Icon,{name:s.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.nextPage(),className:ke["arrow-right"],adornment:{start:n.jsx(d.Icon,{name:s.arrow_right})}})]}),n.jsx(d.Carousel.Body,{children:Array.isArray(e)&&e.map((g,_)=>n.jsx(d.Carousel.Item,{style:f,children:n.jsx(a,{...o.image_zoom.mobile,..._===0&&{priority:!0,loading:"eager"},ref:c,className:ke.imageMobile,src:g.imageUrl,alt:g.imageText,quality:100,..._===0&&{onLoad:h}})},_))}),n.jsx(d.Carousel.Bullets,{className:ke.bullets,page:m.currentPage,total:m.totalPages,onBulletClick:p})]})};pm.displayName="ImageZoom.Mobile.Carousel";const hm=({imgRef:e,image:t,PRODUCT_IMAGE_DIMENSIONS:r})=>{Qc();const{nextimage:s}=pe();return n.jsx("div",{className:ke["image-zoom--image"],ref:e,children:n.jsx(s,{...r.image_zoom.mobile,alt:t.imageText,className:ke["image-zoom--image--img"],quality:100,src:t.imageUrl})})};hm.displayName="ImageZoom.ImageZoom";const gm=({loaded:e=!1})=>n.jsx("div",{className:ke["zoom-popup"],"data-loaded":e,children:n.jsxs("svg",{width:"38",height:"39",viewBox:"0 0 38 39",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.93 5.382a3.711 3.711 0 0 1 2.55-1.007c.949 0 1.864.36 2.549 1.007a3.534 3.534 0 0 1 1.113 2.472v11.357l10.118 3.332c.587.193 1.1.56 1.465 1.053.366.494.565 1.089.566 1.7v.004c0 .22-.025.44-.075.653v.005l-2.98 12.52a.625.625 0 0 1-1.215-.29l2.977-12.515v-.002c.029-.122.043-.247.044-.372a1.619 1.619 0 0 0-.321-.958 1.729 1.729 0 0 0-.851-.61L24.32 20.257a.625.625 0 0 1-.43-.594V7.88a2.285 2.285 0 0 0-.72-1.59 2.462 2.462 0 0 0-1.691-.665c-.635 0-1.241.24-1.69.666a2.285 2.285 0 0 0-.722 1.59v19.04a.625.625 0 0 1-1.115.388l-.056-.071-.161-.202a178.922 178.922 0 0 0-2.333-2.858l-.002-.002a2.581 2.581 0 0 0-.897-.69 2.677 2.677 0 0 0-1.122-.25H12.37c-.307 0-.61.078-.874.225a1.712 1.712 0 0 0-.635.61 1.625 1.625 0 0 0-.016 1.653l7.128 12.296a.625.625 0 0 1-1.082.627L9.762 26.35a2.876 2.876 0 0 1 .027-2.924 2.962 2.962 0 0 1 1.098-1.057 3.05 3.05 0 0 1 1.482-.384h1.016c.57.002 1.133.127 1.648.368.515.24.97.59 1.33 1.024.514.614 1.026 1.239 1.455 1.768V7.855a3.535 3.535 0 0 1 1.113-2.473ZM6.446 10.22a.625.625 0 0 1 0 .884l-5.324 5.324a.625.625 0 0 1-.884-.884l5.324-5.324a.625.625 0 0 1 .884 0Z"}),n.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.68 12.033c.345 0 .625.28.625.625v2.703h2.702a.625.625 0 1 1 0 1.25H.68a.625.625 0 0 1-.625-.625v-3.328c0-.345.28-.625.625-.625ZM16.429.237a.625.625 0 0 1 0 .884l-5.325 5.324a.625.625 0 0 1-.884-.883L15.545.237a.625.625 0 0 1 .884 0Z"}),n.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.034.68c0-.346.28-.626.625-.626h3.328c.345 0 .625.28.625.625v3.328a.625.625 0 1 1-1.25 0V1.304h-2.703a.625.625 0 0 1-.625-.625Z"})]})});gm.displayName="ImageZoom.ZoomPopup";const _m=({images:e,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:r,...s})=>{const[o,a]=y.useState(!1),[i,c]=y.useState(0),{containerRef:l,imgRef:u,scale:m}=Xc({defaultScale:1,maxScale:3});return n.jsxs("div",{...s,className:ke["image-mobile"],"data-disable-carrousel-pan":m>1,children:[n.jsx(gm,{loaded:o}),n.jsx(pm,{images:e,setCurrent:c,setFirstImgLoaded:a,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:r}),n.jsx("div",{className:ke["image-zoom--mobile"],ref:l,children:n.jsx(hm,{imgRef:u,image:e[i],PRODUCT_IMAGE_DIMENSIONS:r})})]})};_m.displayName="ImageZoom.ImageMobile";const Ex=({children:e,Z_INDEX_WAR:t,...r})=>n.jsx("div",{...r,className:ke["image-zoom-wrapper-mobile"],style:{zIndex:t.pdp_image_zoom},children:e}),Nx="_modal_1u87b_1",Et={modal:Nx,"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 Ix({headerTitle:e,isMobile:t,ICONS:r}){return n.jsx(d.Modal.Header,{navigation:"top",className:Et["modal-header"],children:n.jsxs(d.Modal.Controls,{navigation:"top",isMobile:t,children:[n.jsx("div",{className:Et["modal-header__title"],children:n.jsx(d.Modal.Title,{navigation:"top",className:Et["quick-shop__title"],title:e})}),n.jsx(d.Button,{className:Et["modal-header__close-button"],"data-close":!0,iconNameStart:r.close,size:"small",variant:"tertiary"})]})})}const ym=({PDP_INFO:e,PLP_SIZE_ORDER:t,ICONS:r,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:i})=>{const{sizes:c,productId:l,handleViewItemEvent:u}=Xe(),m=y.useMemo(()=>c!=null&&c.length?gd({items:c,getLabel:b=>b.value,PLP_SIZE_ORDER:t}):[],[c]),{sizesContainerRef:f}=Uc(),{isMobile:p}=oe(),h=Cn(),g=Al(),{setValue:_}=Il(),{setValue:v}=_a(),x=y.useRef({}),[C,j]=y.useState(null);return n.jsxs("div",{ref:f,className:d.helpers.classNameConcat(J.sizes,"PDP_sizes"),children:[n.jsx("span",{className:J["sections-title"],children:e.product.size_title}),n.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}),n.jsxs(d.ToggleSize.Wrapper,{size:p?"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&&(_({...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:[n.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),n.jsx(d.ToggleSize.Text,{children:b==null?void 0:b.value})]},`sizes-${b.sku}-${b.value}`)))}),n.jsx(Ea,{open:g,setVisible:v,sku:C,setSku:j,skus:Object.values(x.current),ICONS:r,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:i})]})},sn=({children:e,className:t,type:r})=>n.jsx("div",{className:d.helpers.classNameConcat(J["pdp-main__info-subsection"],[J[`subsection-${r}`],t]),children:e}),vm=({children:e,className:t})=>{const{structureRef:r,tipbarRef:s}=Ee(),o=y.useMemo(()=>{var c,l;const a=((c=r.current)==null?void 0:c.clientHeight)||0,i=((l=s.current)==null?void 0:l.clientHeight)||0;return a+i},[r,s]);return n.jsx("div",{className:d.helpers.classNameConcat(J["pdp-main__info"],t),id:"pdpmaininfo",style:{top:o},children:e})},xm=({storeId:e,TEXTURE_IMAGE:t,TOGGLE_STYLE_MODIFIER:r})=>{const{productId:s}=Xe(),{items:o,loadSimilars:a}=La(s,{filterTexture:t,storeId:e});return y.useEffect(()=>{a()},[a]),n.jsxs("div",{className:J.similars,children:[n.jsx("span",{className:J["sections-title"],children:"Cor"}),n.jsx(lm,{productId:s,similars:o,TOGGLE_STYLE_MODIFIER:r})]})};xm.displayName="PDP.Info.Similars";const Rx=({callBackProductAdded:e,BUY_BUTTON_LABELS:t,ICONS:r,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PDP_INFO:a,PLP_SIZE_ORDER:i,PRODUCT_CARD_TEXTS:c,TEXTURE_IMAGE:l,TIME_ZONE:u,TOGGLE_STYLE_MODIFIER:m,Z_INDEX_WAR:f,storeId:p})=>n.jsx(d.Modal.Body,{className:Et["modal-product-body"],children:n.jsxs(vm,{className:Et["pdp-main__info-modifier"],children:[n.jsxs(sn,{type:"product-info",children:[n.jsx(ws,{}),n.jsx(Ha,{})]}),n.jsx(sn,{type:"similars",children:n.jsx(xm,{storeId:p,TEXTURE_IMAGE:l,TOGGLE_STYLE_MODIFIER:m})}),n.jsx(sn,{type:"sizes",children:n.jsx(ym,{ICONS:r,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PDP_INFO:a,PLP_SIZE_ORDER:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:f})}),n.jsx(sn,{type:"actions",children:n.jsx(um,{showWishlist:!1,callBack:e,addToCartBtnSize:{mobile:"medium",desktop:"large"},BUY_BUTTON_LABELS:t,ICONS:r,TIME_ZONE:u,Z_INDEX_WAR:f})})]})});function Tx({callBackProductAdded:e,QUICKSHOP:t,ICONS:r,...s}){const[o,a]=y.useState(!1),i=()=>a(c=>!c);return n.jsxs("div",{className:Et["quick-shop"],children:[n.jsx(d.Button,{onClick:i,size:"x-large",className:Et["shop-bag"],iconNameStart:r.bag,iconSize:"medium"}),n.jsxs(d.Modal.Root,{isOpen:o,setIsOpen:a,className:`${Et.modal} ${Et["quick-shop__modal"]}`,style:{position:"fixed",height:"100svh",width:"100%",top:0,zIndex:1e3,bottom:"unset",overflowY:"hidden"},variant:"sideRight",children:[n.jsx(Ix,{headerTitle:t.title,ICONS:r}),n.jsx(Rx,{callBackProductAdded:e,ICONS:r,...s})]})]})}const Ax=({image:e})=>n.jsx(pn,{src:F.resizingImg(e.imageUrl,{width:50,height:75})||"",alt:e.imageText,className:ke.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:10,style:{position:"absolute",inset:0,filter:"blur(10px)"}}),kx=({images:e,selectedImageIndex:t,PRODUCT_IMAGE_DIMENSIONS:r,...s})=>{const[o,a]=y.useState(!1),{nextimage:i}=pe();return n.jsx("div",{...s,className:ke["main-image-container"],children:n.jsxs("div",{className:ke["image-desktop"],children:[!o&&n.jsx(Ax,{image:e==null?void 0:e[t]}),n.jsx(i,{src:F.resizingImg(e==null?void 0:e[t].imageUrl,{...r.image_zoom.desktop})||"",alt:e==null?void 0:e[t].imageText,className:ke.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:100,onLoad:()=>{a(!0)}})]})})},Ox=({images:e,onThumbnailClick:t,selectedImageIndex:r})=>{const{nextimage:s}=pe();return n.jsx("div",{className:ke.thumbs,children:e.map((o,a)=>n.jsx("div",{role:"button",tabIndex:0,onClick:()=>t(a),onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&t(a)},className:a===r?ke.selected:"",children:n.jsx(s,{src:o.imageUrl,alt:o.imageText,layout:"responsive",width:100,height:100,objectFit:"cover",priority:!1})},a))})},bm=({images:e,initialSelectedImageIndex:t=0,setShowImageZoom:r,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o,Z_INDEX_WAR:a,...i})=>{const{isMobile:c}=oe(),[l,u]=y.useState(t),m=f=>{u(f)};return c?n.jsxs(Ex,{Z_INDEX_WAR:a,children:[n.jsx(lc,{onClose:()=>r({show:!1,initialIndex:0}),ICONS:s}),n.jsx(_m,{images:e,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o})]}):n.jsxs(Px,{Z_INDEX_WAR:a,children:[n.jsx(lc,{onClose:()=>r({show:!1,initialIndex:0}),ICONS:s}),n.jsx(kx,{images:e,selectedImageIndex:l,onThumbnailClick:m,PRODUCT_IMAGE_DIMENSIONS:o},e[l].imageId??`${e[l].imageText}-${l}`),n.jsx(Ox,{images:e,selectedImageIndex:l,onThumbnailClick:m}),n.jsx(Tx,{callBackProductAdded:()=>{r({initialIndex:0,show:!1})},ICONS:s,Z_INDEX_WAR:a,...i})]})};bm.displayName="ImageZoom";const Lx=({productImgs:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})=>{const{video:s,productName:o}=Xe(),[a,i]=y.useState({show:!1,initialIndex:0});y.useEffect(()=>(a.show?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll"),()=>{document.body.classList.remove("no-scroll")}),[a]);const c=l=>{i({show:!0,initialIndex:l})};return n.jsxs(n.Fragment,{children:[n.jsx(mm,{images:e,video:s,handleZoom:c,productName:o,PRODUCT_IMAGE_DIMENSIONS:t}),a.show&&n.jsx(bm,{images:e,initialSelectedImageIndex:a.initialIndex,setShowImageZoom:i,PRODUCT_IMAGE_DIMENSIONS:t,...r})]})},jm=({TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})=>{const{images:s}=Xe(),o=y.useMemo(()=>{const a=s.filter(i=>!e.includes(i.imageLabel));return a.length>0?a:s},[]);return n.jsx(Lx,{productImgs:o,TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})};jm.displayName="PDP.Gallery";const Mx=({className:e,hasIcons:t=!0,ICONS:r,PDP_INFO:s})=>{const{allSizesAvailable:o,productId:a}=Xe(),{setValue:i}=_a(),{sendDataLayerEvent:c}=le();return n.jsx("div",{className:d.helpers.classNameConcat(J.links,e),id:"pdp-container","data-product-id":a,children:n.jsxs("div",{className:J["links-wrapper"],children:[!o&&n.jsx(d.Button,{adornment:t?{start:n.jsx(d.Icon,{name:r.product})}:{},size:"x-small",variant:"tertiary",onClick:()=>i(!0),underline:!0,children:s.links_and_stepper.size_out_of_stock}),n.jsx(d.Button,{adornment:t?{start:n.jsx(d.Icon,{name:r.ruler})}:{},size:"x-small",variant:"tertiary",underline:!0,onClick:()=>{var l,u;(u=window.SizebayParams)==null||u.openChart((l=window.SizebayParams)==null?void 0:l.id),c({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:"pdp:guia-de-medidas"}}})},children:s.links_and_stepper.size_table_title}),n.jsx(d.Button,{size:"x-small",variant:"tertiary",className:"sizebay",underline:!0,onClick:()=>{var l,u;return(u=window.SizebayParams)==null?void 0:u.openVFR((l=window.SizebayParams)==null?void 0:l.id)},children:s.links_and_stepper.sizebay})]})})},Dx=({children:e})=>n.jsx("div",{className:J["pdp-main__info-main-content"],children:e}),Fx=({head:e,className:t})=>n.jsx("thead",{className:t,children:n.jsx("tr",{children:e.map((r,s)=>n.jsx("th",{children:r},`head-title-${s}`))})}),zx=({rows:e,className:t})=>n.jsx("tbody",{className:t,children:e.map((r,s)=>n.jsx("tr",{children:r.map(o=>typeof o=="string"&&o.includes("blocks")?JSON.parse(o).blocks.map(a=>`${a.text}
|
|
18
|
+
`):o).map((o,a)=>n.jsx("td",{children:o},`cell-content-${a}`))},`row-content-${s}`))}),Bx="_tableContainer_1yxy2_1",Ux={tableContainer:Bx},qx=({children:e,className:t=""})=>n.jsx("table",{className:`${Ux.tableContainer} ${t}`,children:e}),rs={Head:Fx,Rows:zx,Root:qx},Hx=({title:e,text:t})=>n.jsxs("p",{className:J.measurementRowsText,children:[n.jsx("h1",{className:J.measurementRowsTitle,children:e}),t]}),$x=({ICONS:e,SIZES:t,Z_INDEX_WAR:r})=>{const s=Ll(),{setValue:o}=Ml();return n.jsx(d.Modal.Root,{isMobile:!0,style:{zIndex:r.modal},setIsOpen:o,isOpen:s,className:J.measurementModal,children:n.jsx(d.Modal.Body,{children:n.jsxs("div",{className:J.measurementContainer,children:[n.jsx("h1",{className:J.measurementTitle,children:t.title}),n.jsxs("div",{className:J.measurementContent,children:[n.jsx("div",{className:J.measurementImageContainer,children:n.jsx(pn,{width:264,height:402,alt:"",className:J.measurementImage,src:t.bannerImage})}),n.jsxs(rs.Root,{className:J.measurementTable,children:[n.jsx(rs.Head,{className:J.measurementHead,head:t.head}),n.jsx(rs.Rows,{className:J.measurementRows,rows:t.rows.map((a,i)=>[n.jsx(Hx,{title:t.descriptions[i].title,text:t.descriptions[i].text},i),...a])})]})]}),n.jsx(d.Button,{onClick:()=>o(!1),className:J.measurementClose,variant:"tertiary",children:n.jsx(d.Icon,{name:e.close})})]})})},"minicart")},Vx=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(J["pdp-main__gallery-wrapper"],t),...r,children:e}),Wx=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(J.pdp,t),...r,children:e}),Gx=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(J["pdp-main"],t),...r,children:e}),Kx=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(J["pdp-main__info-secondary-content"],t),...r,children:e}),Qx={gallery:Vx,pdp:Wx,main:Gx,secondary:Kx},Xx=({className:e,...t})=>n.jsx(d.Utils.Divider,{...t,className:d.helpers.classNameConcat(J.divider,e)}),Yx=Object.freeze(Object.defineProperty({__proto__:null,AccessibilityInfo:px,Actions:um,BreadCrumb:dm,Credits:fm,DescriptionsTabs:vx,Divider:Xx,Freight:xx,Gallery:jm,GoldenTag:$a,Header:ws,Links:Mx,MainContent:Dx,MainInfo:vm,PDPSimilars:mx,Price:Ha,ProductMeasurements:$x,Sizes:ym,SubSectionWrapper:sn,containers:Qx},Symbol.toStringTag,{value:"Module"})),Cm=(e,t)=>{const[r,s]=Bf({items:e}),[o,a]=t.split(":").map(Number);return isNaN(o)||isNaN(a)?[r,s]:[r<o?r:o,s>a?s:a]},Sm=y.createContext({}),wm=({children:e,fetch:t,queryKey:r,options:s})=>{const{data:o,isLoading:a,isFetched:i,refetch:c,isRefetching:l,error:u}=vg({queryKey:r,queryFn:async()=>{const m=await t();if(!m.ok)throw new Error("[ROOT QUERY PROVIDER ERROR]: NOT LOAD!");return m.json()},...s});return n.jsx(Sm.Provider,{value:y.useMemo(()=>({data:o,refetch:c,isLoading:a,isFetched:i,isRefetching:l,isError:!!u}),[o,c,a,i,l,u]),children:e})},Pm=()=>{const e=y.useContext(Sm);if(e===void 0)throw new Error("useProductsContext must be used within a useRootContext");return e},Em=y.createContext({}),Jx=({children:e})=>{const{router:t}=pe(),{constants:{PLP_SORT_DEFAULT:r}}=Me(),{reset:s}=Zt(),{searchParams:o}=Fe(),{data:a,isLoading:i,...c}=Pm(),l=y.useCallback((g,_)=>{if(_){if(g.key.toLocaleLowerCase()==="price"){const v=_.getAll("facets");_.delete("facets"),v.forEach(x=>{const[C]=x.split("/");C!==g.key&&_.append("facets",x)})}_.set("page","1"),s(),_.append("facets",`${g.key}/${g.value}`),t.push(`?${_.toString()}`)}},[t,s]),u=y.useCallback(()=>{const g=new URLSearchParams;g.set("sort",r),g.set("page","1"),s(),t.push(`?${g.toString()}`)},[t,s,r]),m=y.useCallback((g,_)=>{if(!_||!_.has&&!_.has("facets"))return;const v=_.getAll("facets");_.delete("facets"),_.set("page","1"),v.forEach(x=>{const[C,j]=x.split("/");(C!==g.key||j!==g.value)&&_.append("facets",x)}),s(),t.push(`?${_.toString()}`)},[t,s]),f=y.useCallback(g=>{const _=o?new URLSearchParams(o):new URLSearchParams;for(const[,v]of _.entries()){const[x,C]=v.split("/");if(x===g.key&&C===g.value)return m(g,_)}return l(g,_)},[l,m,o]),p=y.useCallback(g=>{const _=o?new URLSearchParams(o):new URLSearchParams;_.set("sort",g.replace("_",":")),t.push(`?${_.toString()}`)},[t,o]),h=a&&"data"in a?a.data:null;return n.jsx(Em.Provider,{value:{...c,breadcrumb:(h==null?void 0:h.breadcrumb)??[],deleteAllFacets:u,facets:(h==null?void 0:h.facets)??[],isLoading:i,selectedFacets:F.getFacetsActiveSearchParams(o),onToggleFacet:f,onSort:p},children:e})},Nm=({children:e,enabled:t,storeId:r,...s})=>{const{state:o}=Fe(),a=c=>c==="productclusterids"||c.startsWith("category-"),i=o.facets.filter(({key:c})=>a(c));return n.jsx(wm,{fetch:()=>fetch(`https://${r}.myvtex.com/_v/proxy/search/facets`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...o,facets:i})}),queryKey:["facets",o.base,o.term],options:{enabled:t??!0,gcTime:1e3*60*30,refetchOnWindowFocus:!1,placeholderData:Hh,staleTime:1e3*60*30},children:n.jsx(Jx,{...s,storeId:r,children:e})})},Va=()=>{const e=y.useContext(Em);if(e===void 0)throw new Error("use QueryFacetsContext must be used within a QueryFacetsProvider");return e},Zx=()=>{var w;const{constants:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:s,PLP_FILTERS_TITLE:o,PLP_SIZE_ORDER:a},openFilters:i,setOpenFilters:c}=Me(),[l,u]=y.useState("10000:0"),{isMobile:m}=oe(),{sendDataLayerEvent:f}=le(),{state:p}=Fe(),{breadcrumb:h,deleteAllFacets:g,facets:_,isLoading:v,onToggleFacet:x}=Va(),C=y.useRef(""),j={isLast:!0,href:(w=p.term)!=null&&w.length?`/${p.term}`:"",name:p.term},b=F.filterNonRootFacets(p.facets,p==null?void 0:p.base);return y.useEffect(()=>{const S=_.find(({key:P})=>P==="price");if(S){const[P,N]=Cm(S.values,l??"10000:0");u(`${P}:${N}`)}},[_,l,u]),y.useEffect(()=>{if(!b.length)return;const S=JSON.stringify(b);C.current!==S&&(C.current=S,f({functionKey:"filterEvent",data:{commonData:{selectedFacets:b}}}))},[b]),n.jsxs(vr.teamComponents.Filter.Root,{CONSTANTS:{ICONS:e,PLP_FILTERS_TITLE:o,PLP_FILTERS:t},breadcrumb:h.length?h:[j],deleteAllFacets:g,filters:{facets:F.filterNonCategorySelected(_,p==null?void 0:p.base),selected:b},isMobile:m??!1,isLoading:v??!1,isOpen:i,price:l,onToggleFacet:x,setIsOpen:c,target:document.body,children:[n.jsx(vr.teamComponents.Filter.Selected,{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r}),n.jsx(vr.teamComponents.Filter.Content,{columns:2,CONSTANTS:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:s,PLP_SIZE_ORDER:a}})]})},Im=()=>typeof document>"u"?null:n.jsx(Zx,{});Im.displayName="Filters";const eb=({productCount:e,PLP_GRID_SCROLL_BACK:t})=>{y.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])},Rm=y.createContext({}),tb=({callback:e,children:t})=>{const{data:r,isLoading:s,...o}=Pm(),a=r&&"data"in r?r.data:null;return y.useEffect(()=>{a&&typeof e=="function"&&e({...a})},[a]),n.jsx(Rm.Provider,{value:{...o,isLoading:s,products:(a==null?void 0:a.products)??[],pagination:(a==null?void 0:a.pagination)??xg,total:(a==null?void 0:a.pagination.count)??0},children:t})},Wa=({callback:e,children:t,forceUpdate:r,storeId:s,options:o,state:a,queryKey:i})=>n.jsx(wm,{fetch:()=>fetch(`https://${s}.myvtex.com/_v/proxy/search/product`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,forceUpdate:r})}),queryKey:i,options:o,children:n.jsx(tb,{callback:e,children:t})}),In=()=>{const e=y.useContext(Rm);if(e===void 0)throw new Error("useQueryProductsContext must be used within a QueryProductsProvider");return e},Ga=({total:e=0})=>{const{constants:{SEARCH_TOTAL_PORTAL_ID:t}}=Me();if(typeof window>"u")return null;const r=document.getElementById(t);return r?la.createPortal(n.jsxs("span",{children:["[",e,"] produto",e>1?"s":""]}),r):null};Ga.displayName="PDC.Grid.NavigationTotal";const rb=()=>{const{isMobile:e}=oe(),{constants:t,mainSeller:r}=Me(),{isLoading:s,products:o,pagination:{total:a}}=In(),{ICONS:i,PLP_GRID_SCROLL_BACK:c,PLP_NOT_RESULT:l}=t;return eb({productCount:(o==null?void 0:o.length)??0,PLP_GRID_SCROLL_BACK:c}),o?n.jsxs(n.Fragment,{children:[n.jsx(xt.Products,{...t,isMobile:e??!1,items:o,StoreConfig_MainSellerId:r}),!o.length&&!s&&n.jsx(xt.Empty,{ICONS:i,PLP_NOT_RESULT:l}),n.jsx(Ga,{total:a})]}):null},Tm=({infinite:e=!1,storeId:t})=>e?n.jsx(xt.InfiniteScroller,{storeId:t}):n.jsx(rb,{});Tm.displayName="Grid";const Nr=e=>({centro:"center",esquerda:"start",direita:"end"})[e],Am=({children:e,contentState:t,entityKey:r})=>{const{url:s}=t.getEntity(r).getData();return s?n.jsx(et,{href:s,children:e}):e},nb=(e,t,r)=>{e.findEntityRanges(s=>{const o=s.getEntity();return o===null?!1:r.getEntity(o).getType()==="LINK"},t)},us=e=>{const t=new bt.CompositeDecorator([{strategy:nb,component:Am}]),r=bt.convertFromRaw(e);return bt.EditorState.createWithContent(r,t)},sb=e=>bt.convertFromRaw(e),ds=bt.DefaultDraftBlockRenderMap.set("unstyled",{element:"div",aliasedElements:["div"]}),uc="superior-direita",Yn="dentro-inferior-centro",ob="inferior-direita",co="dentro-inferior-esquerda",km=e=>({position:e===Yn||e===co?"absolute":"default",shouldRender:[uc,Yn,co].includes(e)?"top":"bottom",alignItems:[Yn].includes(e)?"center":[uc,ob].includes(e)?"flex-end":"flex-start",left:e===co?"16px":e===Yn?"45%":"unset"}),ab=Object.freeze(Object.defineProperty({__proto__:null,CREATE_CONTENT:us,EXTENDED_BLOCK_RENDER_MAP:ds,GET_CONTENT_STATE:sb,controllersPositionsAdapter:km},Symbol.toStringTag,{value:"Module"})),ib=({expanded:e,content:t})=>n.jsxs("details",{open:e,children:[t.textStructureReduced?n.jsx("summary",{onClick:r=>r.preventDefault(),children:n.jsx(bt.Editor,{editorKey:"draft-editor-1",blockRenderMap:ds,editorState:t!=null&&t.textStructureReduced?us(JSON.parse(t.textStructureReduced)):bt.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):n.jsx(n.Fragment,{}),t.showTextStructureExpander&&t.textStructure?n.jsx(n.Fragment,{children:n.jsx(bt.Editor,{editorKey:"draft-editor-1",blockRenderMap:ds,editorState:t.textStructure?us(JSON.parse(t.textStructure)):bt.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):n.jsx(n.Fragment,{})]}),cb="_textContentWrapper_176ht_5",lb="_textContentSection_176ht_13",Vo={"link-modifier":"_link-modifier_176ht_1",textContentWrapper:cb,textContentSection:lb},Om=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:r})=>{var a;const[s,o]=y.useState(!1);return n.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:Nr(e.textStructureAlignment),alignItems:Nr(e.textStructureAlignment)},columnWrapper:{alignContent:Nr(e.textStructureAlignment),alignItems:Nr(e.textStructureAlignment)}},adornment:{bottom:e.showTextStructureExpander&&e.textStructure?n.jsx(d.Button,{variant:"tertiary",adornment:{end:n.jsx(d.Icon,{name:s?`${t.arrow_up}`:`${t.arrow_down}`})},onClick:()=>o(i=>!i),size:"small",children:s?(r==null?void 0:r.less)??"Ver Menos":(r==null?void 0:r.more)??"Ver Mais"}):n.jsx(n.Fragment,{})},children:n.jsxs(d.Utils.Column,{className:Vo.textContentWrapper,style:{alignItems:Nr(e.textStructureAlignment)},children:[n.jsx(d.TextStructure.DivWrapper,{style:{textAlign:Nr(e.textStructureAlignment)},mode:e.textStructureMode??"default",children:e.textStructureReduced?n.jsx(ib,{content:e,expanded:s}):n.jsx(n.Fragment,{})}),e.textStructureButtonLabel?n.jsx(Qe,{mode:e.textStructureMode??"default",href:e.textStructureButtonHref??"#",size:e.textStructureButtonSize,className:Vo["link-modifier"],adornments:(a=e.textStructureButtonIcon)!=null&&a.length&&e.enableIcon?{end:n.jsx(d.Icon,{name:e.textStructureButtonIcon})}:void 0,children:e.textStructureButtonLabel}):n.jsx(n.Fragment,{})]})})},ub=e=>({centro:{verticalAlignment:"center",horizontalAlignment:"center"},"centro-esquerda":{verticalAlignment:"center",horizontalAlignment:"start"},"centro-direita":{verticalAlignment:"center",horizontalAlignment:"end"},"superior-centro":{verticalAlignment:"start",horizontalAlignment:"center"},"superior-esquerda":{verticalAlignment:"start",horizontalAlignment:"start"},"superior-direita":{verticalAlignment:"start",horizontalAlignment:"end"},"inferior-centro":{verticalAlignment:"end",horizontalAlignment:"center"},"inferior-esquerda":{verticalAlignment:"end",horizontalAlignment:"start"},"inferior-direita":{verticalAlignment:"end",horizontalAlignment:"end"}})[e],dc=e=>({centro:"center",esquerda:"start",direita:"end"})[e],fc={"content-modifier":"_content-modifier_16y4u_5","banner-image-wrapper-modifier":"_banner-image-wrapper-modifier_16y4u_13"},mc=({data:e,videoUrl:t,priority:r,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:g,position:_,contentAlignment:v,showTimer:x,contentOrder:C,timerMode:j,timerEnd:b,timerInit:w,textStructure:S,textStructureReduced:P}=e.banner,N=(f==null?void 0:f.trim())||(m==null?void 0:m.trim())||null,{nextimage:R}=pe();return n.jsxs(d.Banner.Container,{...l,children:[n.jsxs(d.Banner.ImageWrapper,{className:fc["banner-image-wrapper-modifier"],style:p?{background:g}:void 0,children:[u&&n.jsx(Oe.Video,{videoRef:s,src:t,autoPlay:r,loop:!0,playsInline:!0,muted:!0}),N&&!(u!=null&&u.length)&&n.jsx(R,{src:N,width:"1920",height:"1080",alt:h??m??"",...r?{priority:r}:{},style:p?{opacity:"0"}:void 0}),!m&&!(u!=null&&u.length)&&n.jsx("div",{style:{background:g}})]}),x||P||S?n.jsx(d.Banner.Slot,{...ub(_??"centro"),className:d.helpers.classNameConcat(fc["content-modifier"],c),style:{textAlign:dc(v)},children:n.jsxs(d.Utils.Column,{gap:"16px",alignItems:dc(v),children:[x&&C==="timer-first"&&n.jsx(ls,{mode:j??"default",size:"small",dateEnd:b?new Date(b):new Date,dateInit:w?new Date(w):new Date,TIME_ZONE:i}),n.jsx(Om,{data:e.banner,ICONS:o,TEXTCONTENT_EXPANDED:a}),x&&C!=="timer-first"&&n.jsx(ls,{mode:j??"default",size:"small",dateEnd:b?new Date(b):new Date,dateInit:w?new Date(w):new Date,TIME_ZONE:i})]})}):n.jsx(n.Fragment,{})]})};class pt extends y.Component{constructor(){super(...arguments);rr(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(){return{hasError:!0,error:null}}componentDidCatch(r,s){if(process.env.NODE_ENV!=="production"){if(this.props.debugger)debugger;console.groupCollapsed("Error Boundary CMS",this.props.name),console.log("Error:",(r==null?void 0:r.message)??r),console.log("Error Info:",s),console.groupEnd()}}render(){const{hasError:r}=this.state,{children:s,fallback:o}=this.props;return r&&process.env.NODE_ENV==="production"?null:r&&o!==void 0?o:s}}const Rn=({data:e,className:t,priority:r,creative:s,name:o,...a})=>{const{handleSelectPromotionEvent:i,currentLocalRef:c}=le(),{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=y.useRef(null),g=y.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]),_=()=>{var v;(v=h.current)!=null&&v.paused&&h.current.play()};return n.jsx(pt,{name:o,children:n.jsx(vs,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...p,index:u}}}},observerOptions:{delay:100,...g&&{threshold:.1}},...g&&{callBackWhenVisible:_},children:e.banner.href?n.jsx(et,{href:e.banner.href,onClick:()=>{i({updatePromotionRef:!0,promotion:p,index:u})},children:n.jsx(mc,{data:e,videoUrl:g,priority:r,videoRef:h,className:t,...a})}):n.jsx(mc,{data:e,videoUrl:g,priority:r,videoRef:h,className:t,...a})})})},Ka=e=>n.jsx(pt,{name:e.name,children:n.jsx(Rn,{...e})}),Lm=({columns:e,gap:t,className:r})=>{const{isMobile:s}=oe(),{banners:o}=En(),{constants:{ICONS:a,PRODUCT_CARD_IMAGE_ASPECT_RATIO:i,TEXTCONTENT_EXPANDED:c,TIME_ZONE:l}}=Me();return Array.isArray(o)?o.map((u,m)=>y.createElement(nt.Banner,{...u,columns:u.columns,gap:t,isMobile:s??!1,key:`${u.position_grid}-${m}`,totalColumns:e,PRODUCT_CARD_IMAGE_ASPECT_RATIO:i},n.jsx(Rn,{name:"Banner Carousel",data:{banner:u,componentIndex:m},creative:"banner_grid",ICONS:a,TEXTCONTENT_EXPANDED:c,TIME_ZONE:l,className:r}))):null};Lm.displayName="PDC.InfiniteScroller.Banners";const Mm=({page:e,...t})=>{var i;const{rootRef:r}=Ee(),{gap:s,updateParamPage:o}=er(),{element:a}=ms({callback:()=>o(e.page),options:{threshold:0}});return n.jsx("div",{...t,id:`pdc-scroll-infinite-${e==null?void 0:e.page}`,className:Ge["pdc--infinite--loader"],"data-page":e.page,ref:a,style:{top:(Number(((i=r==null?void 0:r.current)==null?void 0:i.offsetHeight)??0)+s*2)*-1}})};Mm.displayName="PDC.Page.Anchor";const Dm=e=>{var s;const{gap:t}=er(),{rootRef:r}=Ee();return n.jsx("div",{...e,className:Ge["pdc--infinite--card--anchor-pdp"],style:{top:(Number(((s=r==null?void 0:r.current)==null?void 0:s.offsetHeight)??0)+t*2)*-1}})};Dm.displayName="PDC.Page.AnchorPDP";const Fm=({first:e,gap:t,empty:r=!1,isMobile:s=!1,item:o,index:a,order:i,page:c,showVideo:l=!1})=>{const{handleNotify:u}=er(),{getAvailableProductTag:m}=Mt(),{constants:f,mainSeller:p}=Me(),{load:h}=Zt(),g=m(o==null?void 0:o.cluster.highlights);if(r)return;const{BUY_BUTTON_LABELS:_,MAIN_IMAGE:v,PLP_GRID_SCROLL_BACK:x,PLP_INFINITE_SCROLL:C,PLP_PRODUCT_SIMILAR_DELAY:j,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:b,PLP_SIZE_ORDER:w,PRODUCT_CARD_IMAGE_ASPECT_RATIO:S,PRODUCT_CARD_TEXTS:P,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:N,PRODUCT_IMAGE_DIMENSIONS:R,SECOND_IMAGE:I,TEXTURE_IMAGE:O,Z_INDEX_WAR:L,ICONS:W,storeId:D}=f;return n.jsxs(nt.Card,{"data-skeleton":o.id==="skeleton",className:Ge["pdc--infinite--card--disabled"],gap:t,isMobile:s??!1,item:o,order:i,tag:g,index:a,setSkuSelected:u,showVideo:l,CONSTANTS:{BUY_BUTTON_LABELS:_,MAIN_IMAGE:v,PLP_GRID_SCROLL_BACK:x,PLP_INFINITE_SCROLL:C,PLP_PRODUCT_SIMILAR_DELAY:j,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:b,PLP_SIZE_ORDER:w,PRODUCT_CARD_IMAGE_ASPECT_RATIO:S,PRODUCT_CARD_TEXTS:P,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:N,PRODUCT_IMAGE_DIMENSIONS:R,SECOND_IMAGE:I,StoreConfig_MainSellerId:p,TEXTURE_IMAGE:O,Z_INDEX_WAR:L,ICONS:W,storeId:D},children:[n.jsx(ln.AnchorPDP,{}),e&&c&&n.jsx(ln.Anchor,{page:c}),h&&c&&!(c!=null&&c.loading)?n.jsx(ln.Loader,{page:c}):null]})};Fm.displayName="PDC.Page.Card";const zm=({type:e="default",page:t,...r})=>{const{updateProducts:s}=Zt(),{element:o}=ms({callback:()=>{t.loading||s(t.page)},onEnterViewportOnce:!0,options:{threshold:[.2,.5]}});return n.jsx("div",{...r,className:Ge[`pdc--infinite--loader${e==="page"?"--page":""}`],ref:o})};zm.displayName="PDC.Page.Loader";const Bm=({nextPage:e=!1,page:t,total:r,...s})=>{const{addNewPage:o}=er(),{element:a}=ms({callback:()=>{o(t,r,e)},onEnterViewportOnce:!0,options:{threshold:[.1,.5]}});return e===!0&&t.loading===!0?n.jsx("div",{...s,className:Ge["pdc--infinite--next-page--card"],"data-next-page":!0,ref:a}):null};Bm.displayName="PDC.Page.NextPage";const ln={Anchor:Mm,AnchorPDP:Dm,Card:Fm,Loader:zm,NextPage:Bm},db=({page:e})=>{const{isMobile:t}=oe(),{gap:r,columns:s}=er(),{isLoading:o,pagination:a,products:i}=In(),{load:c,products:l,trimPages:u,setLoad:m}=Zt(),{constants:{ICONS:f,PLP_NOT_RESULT:p,ITEMS_PER_PAGE:h}}=Me(),{count:g,nextPage:_,total:v}=a,x=(e.page-1)*24;y.useEffect(()=>{o||m(!0)},[o,m]),y.useEffect(()=>{!o&&i.length===0&&e.loading&&e.page>v&&e.page>1&&u(v)},[o,e,i,v,u]);const C=e.page===v?g-h*(e.page-1):h,j=i.length>0?i:Array.from({length:C},()=>nu()),b=au(j.map(S=>S.node),s),w=c&&e.page===1&&!o&&a.total===0;return n.jsxs(n.Fragment,{children:[e.page===1&&n.jsx(Ga,{total:(a==null?void 0:a.count)??0}),w&&n.jsx(xt.Empty,{ICONS:f,PLP_NOT_RESULT:p}),Array.isArray(j)?j.map((S,P)=>{const N=l[x+P]+1;return n.jsx(ln.Card,{empty:e.loading&&e.page===1&&!o&&!i.length,first:P===0,gap:r,index:P,item:S.node,isMobile:t??!1,order:N,page:e,showVideo:b.indexOf(P)!==-1},N)}):null,c&&!o&&_&&i.length>0&&n.jsx(ln.NextPage,{page:e,nextPage:_,total:v})]})},Um=({page:e,storeId:t})=>{const{state:r}=Fe(),{sendDataLayerEvent:s}=le(),o=y.useCallback(a=>{s({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:a.products}}})},[s,r==null?void 0:r.query]);return n.jsx(Wa,{callback:o,state:{...r,page:e==null?void 0:e.page},storeId:t,queryKey:[String(e==null?void 0:e.page),r.sort,JSON.stringify(Object.entries(r.facets??{}).sort())],options:{enabled:e.loading,gcTime:1e3*60*30,staleTime:1e3*60*5,refetchOnWindowFocus:!1},children:n.jsx(db,{page:e})})};Um.displayName="PDC.Page";const fb=()=>{var j;const{constants:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:s,PLP_FILTERS_TITLE:o,PLP_SIZE_ORDER:a},openFilters:i,setOpenFilters:c}=Me(),[l,u]=y.useState("10000:0"),{isMobile:m}=oe(),{state:f}=Fe(),{breadcrumb:p,deleteAllFacets:h,facets:g,isLoading:_,onToggleFacet:v}=Va(),x={isLast:!0,href:(j=f.term)!=null&&j.length?`/${f.term}`:"",name:f.term},C=F.filterNonRootFacets(f.facets,f==null?void 0:f.base);return y.useEffect(()=>{const b=g.find(({key:w})=>w==="price");if(b){const[w,S]=Cm(b.values,l??"10000:0");u(`${w}:${S}`)}},[g,l,u]),n.jsxs(vr.teamComponents.Filter.Root,{CONSTANTS:{ICONS:e,PLP_FILTERS_TITLE:o,PLP_FILTERS:t},breadcrumb:p.length?p:[x],deleteAllFacets:h,filters:{facets:F.filterNonCategorySelected(g,f==null?void 0:f.base),selected:C},isMobile:m??!1,isLoading:_??!1,isOpen:i,price:l,onToggleFacet:v,setIsOpen:c,target:document.body,children:[n.jsx(vr.teamComponents.Filter.Selected,{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r}),n.jsx(vr.teamComponents.Filter.Content,{columns:2,CONSTANTS:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:s,PLP_SIZE_ORDER:a}})]})},qm=({sort:e,storeId:t,...r})=>{const{load:s}=Zt();return n.jsxs(Nm,{...r,enabled:s,storeId:t,children:[n.jsx(xt.Navigation,{}),n.jsx(fb,{})]})};qm.displayName="PDC.INFINITE-SCROLLER.FILTERS";const mb=({load:e,PLP_GRID_SCROLL_BACK:t})=>{const r=y.useRef(!1);y.useEffect(()=>{if(e&&!r.current){const s=sessionStorage.getItem(t.refer),o=sessionStorage.getItem(t.order);if(s==="true"){const a=document.querySelector(`[data-order="${o}"] > [class*="anchor-pdp"]`);a&&(a.scrollIntoView({behavior:"instant",block:"start"}),r.current=!0),sessionStorage.setItem(t.refer,"false")}else{const a=document.querySelectorAll('[id*="pdc-scroll-infinite"]');if(a.length>0){const i=a[a.length-1];a.length>1&&i.scrollIntoView({behavior:"instant",block:"start"}),r.current=!0}}}if(!e&&r.current){r.current=!1;const s=document.querySelector("body > main");s&&s.scrollIntoView({behavior:"instant",block:"start"})}},[e])},pb=({storeId:e})=>{const{constants:{PLP_GRID_SCROLL_BACK:t,ITEMS_PER_PAGE:r}}=Me(),{gap:s,columns:o}=er(),{load:a,pages:i}=Zt();return mb({load:a,PLP_GRID_SCROLL_BACK:t}),n.jsx("div",{className:Ge["pdc--grid--content"],children:n.jsxs(nt.Root,{children:[Array.isArray(i)&&i.map(c=>n.jsx(Um,{count:r,page:c,storeId:e},c.page)),n.jsx(Lm,{columns:o,count:r,gap:s})]})})},Hm=({storeId:e})=>{const{state:t}=Fe(),{banners:r}=En(),{columns:s}=er(),{constants:{ITEMS_PER_PAGE:o,PLP_SORT_DEFAULT:a}}=Me(),{createPagesScroll:i}=Zt(),c=y.useRef(!1);return y.useEffect(()=>{if(c.current)return;const l=hs(r,50,s,o);i(t.page,l),c.current=!0},[]),n.jsxs(bu,{banners:r,children:[n.jsx(qm,{state:t,sort:a,storeId:e}),n.jsx(pb,{storeId:e})]})};Hm.displayName="PDC.InfiniteScroller";const $m=()=>{const{state:e}=Fe(),{constants:{Z_INDEX_WAR:t},setOpenFilters:r}=Me(),{selectedFacets:s,onToggleFacet:o,onSort:a}=Va(),i=F.filterNonRootFacets(s,e==null?void 0:e.base);return n.jsx(Yt.Root,{onSort:a,setOpenFilters:r,style:{zIndex:t.plp_navigation},children:n.jsx(Yt.Selected,{callback:o,selected:i})})};$m.displayName="Navigation";const Wo=({currentPage:e,callback:t,type:r,...s})=>n.jsx(d.Button,{...s,iconNameStart:`arrow-${r}`,onClick:()=>{typeof t=="function"&&t(r==="left"?"prev":"")},size:"large",variant:"tertiary"});Wo.displayName="Arrow";const Go=({active:e,prev:t,ellipses:r,page:s,selectedPage:o})=>n.jsxs(n.Fragment,{children:[r&&t&&n.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."}),e&&n.jsx(d.Pagination.Item,{isActive:!1,index:s,variant:"tertiary",onClick:()=>{typeof o=="function"&&o(s)},children:s}),r&&!t&&n.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."})]});Go.displayName="PageEllipses";const Vm=({children:e,endPage:t,page:r,total:s,selectedPage:o,ITEMS_PER_SECTION:a})=>n.jsxs(n.Fragment,{children:[n.jsx(Go,{active:r>=a&&s>a,selectedPage:o,currentPage:r,prev:!1,ellipses:r>a&&s>a,page:1}),e,n.jsx(Go,{active:s-r>1&&s!==t,selectedPage:o,currentPage:r,prev:!0,ellipses:t<s-1,page:s})]});Vm.displayName="Pagination.Layout";const hb=(e,t,r)=>{const s=new URLSearchParams(r);return s.set(e,t),s.toString()},gb=(e,t)=>{const r=[];for(let s=e;s<=t;s++)r.push(s);return r},_b=({currentPage:e,total:t,maxVisiblePages:r,SEARCH_PAGE_ITEM_THRESHOLD:s})=>{const o=t>=s?s:t,a=Math.max(1,e===o?o-r+1:e-Math.floor(r/2)),i=Math.min(o,a+r-1);return{startPage:a,endPage:i,totalPages:o}},Wm=({currentPage:e,pages:t,searchParams:r,VARIANT_PAGINATION:s})=>{const{router:o,pathname:a}=pe();return Array.isArray(t)?t.map(i=>n.jsx(d.Pagination.Item,{isActive:e===i,index:i,variant:e===i?s.active:s.default,onClick:()=>o.push(`${a}?${hb("page",i.toString(),r)}`),children:i},i)):null};Wm.displayName="Pages";const Qa=({query:e,type:t="default",searchParams:r,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:a,SEARCH_PAGE_ITEM_THRESHOLD:i,VARIANT_PAGINATION:c,...l})=>{const{router:u,pathname:m}=pe(),{state:{page:f=1}}=Fe(),{pagination:{total:p}}=In(),{endPage:h,totalPages:g,startPage:_}=_b({currentPage:f,total:p,maxVisiblePages:o,SEARCH_PAGE_ITEM_THRESHOLD:i}),v=C=>{const j=C.toString(),b=new URLSearchParams(r.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"?f-1:f+1)};return p?n.jsx("div",{...l,className:Ge["pdc--pagination"],children:n.jsx(d.Pagination.Wrapper,{adornment:{start:n.jsx(Wo,{callback:x,currentPage:f,disabled:f<2,type:"left"}),end:n.jsx(Wo,{callback:x,currentPage:f,disabled:f>=g,type:"right"})},children:n.jsx(Vm,{endPage:h,page:f,selectedPage:v,total:p,ITEMS_PER_SECTION:o,children:n.jsx(Wm,{currentPage:f,pages:gb(_,h),searchParams:r,VARIANT_PAGINATION:c})})})}):null};Qa.displayName="Pagination";const Gm=({gap:e,isMobile:t,className:r})=>{const{state:s}=Fe(),{banners:o}=En(),{constants:a}=Me(),{ICONS:i,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u}=a,m=o.filter(f=>cu(f.position_grid,s.page,(s==null?void 0:s.count)??1));return Array.isArray(m)?m.map((f,p)=>n.jsx(nt.Banner,{columns:f.columns,gap:e,isMobile:t,position_grid:f.position_grid,totalColumns:t?2:4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,children:n.jsx(Rn,{name:"Banner Carousel",data:{banner:f,componentIndex:p},creative:"banner_grid",ICONS:i,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u,className:r})},f.position_grid)):null};Gm.displayName="PDC.Grid.Banners";const Km=({isMobile:e=!1,items:t,BUY_BUTTON_LABELS:r,ICONS:s,MAIN_IMAGE:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PLP_GRID_SCROLL_BACK:c,PLP_INFINITE_SCROLL:l,PLP_PRODUCT_SIMILAR_DELAY:u,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:m,PLP_SIZE_ORDER:f,PRODUCT_CARD_IMAGE_ASPECT_RATIO:p,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:g,PRODUCT_IMAGE_DIMENSIONS:_,SECOND_IMAGE:v,StoreConfig_MainSellerId:x,TEXTURE_IMAGE:C,Z_INDEX_WAR:j,storeId:b})=>{const{banners:w}=En(),{getAvailableProductTag:S}=Mt(),{state:P}=Fe(),[N,R]=y.useState(!1),[I,O]=y.useState(null),[L,W]=y.useState([]),D=y.useCallback((q,ee)=>{const se=ee?wn([ee]):null;W(q),O(se!=null&&se.length?se[0]:null),R(!0)},[]),H=e?8:16,X=(P.page-1)*((P==null?void 0:P.count)??1),te=nt.helpers.createGridPosAndVideo(t,w,e?2:4,P.page),Z=hs(w,P.page,e?2:4);return n.jsxs(n.Fragment,{children:[n.jsxs(nt.Root,{children:[Array.isArray(t)&&t.map((q,ee)=>{var me;const se=S(q.node.cluster.highlights);return n.jsx(nt.Card,{gap:H,isMobile:e??!1,item:q.node,order:Z.products[X+ee]+1,tag:se,index:ee,setSkuSelected:D,showVideo:(me=te[ee])==null?void 0:me.canPlayVideo,CONSTANTS:{BUY_BUTTON_LABELS:r,MAIN_IMAGE:o,PLP_GRID_SCROLL_BACK:c,PLP_INFINITE_SCROLL:l,PLP_PRODUCT_SIMILAR_DELAY:u,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:m,PLP_SIZE_ORDER:f,PRODUCT_CARD_IMAGE_ASPECT_RATIO:p,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:g,PRODUCT_IMAGE_DIMENSIONS:_,SECOND_IMAGE:v,StoreConfig_MainSellerId:x,TEXTURE_IMAGE:C,Z_INDEX_WAR:j,ICONS:s,storeId:b}},q.node.sku)}),t.length>0&&n.jsx(Gm,{gap:H,isMobile:e??!1})]}),n.jsx(Pn,{open:N,sku:I,skus:L,setSku:O,setVisible:R,ICONS:s,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:h,Z_INDEX_WAR:j})]})};Km.displayName="PDC.Products";const xt={Empty:Ma,Filters:Im,Grid:Tm,InfiniteScroller:Hm,Spinner:Da,Navigation:$m,Notification:Pn,Pagination:Qa,Products:Km},Qm=({className:e,storeId:t})=>{const{constants:r}=Me(),{state:s,searchParams:o}=Fe(),{ITEMS_DEFAULT_SORT:a,ITEMS_PER_SECTION:i,ITEMS_PER_PAGE:c,PLP_INFINITE_SCROLL:l,SEARCH_PAGE_ITEM_THRESHOLD:u,VARIANT_PAGINATION:m}=r;return n.jsx("div",{className:d.helpers.classNameConcat(Ge.pdc,e),children:l===!0?n.jsx("div",{className:Ge["pdc--grid"],children:n.jsx(xt.Grid,{infinite:!0,storeId:t})}):n.jsxs(n.Fragment,{children:[n.jsxs(Nm,{state:s,storeId:t,children:[n.jsx(xt.Navigation,{}),n.jsx(xt.Filters,{})]}),n.jsxs(Wa,{state:s,queryKey:["products",String(s==null?void 0:s.page),s.sort,JSON.stringify(Object.entries(s.facets??{}).sort())],options:{gcTime:1e3*60*30,staleTime:1e3*60*5,refetchOnWindowFocus:!1},storeId:t,children:[n.jsx("div",{className:Ge["pdc--grid"],children:n.jsx("div",{className:Ge["pdc--grid--content"],children:n.jsx(xt.Grid,{storeId:t})})}),n.jsx(xt.Pagination,{searchParams:o,ITEMS_DEFAULT_SORT:a,ITEMS_PER_SECTION:i,ITEMS_PER_PAGE:c,SEARCH_PAGE_ITEM_THRESHOLD:u,VARIANT_PAGINATION:m})]})]})})};Qm.displayName="Templates.PDC";const Xm=y.createContext({}),yb=({children:e,...t})=>n.jsx(Xm.Provider,{value:t,children:e}),Ps=()=>{const e=y.useContext(Xm);if(e===void 0)throw new Error("useSearchConstants must be used within a SearchConstantsProvider");return e},vb="_grid_e75z7_21",xb="_navigation_e75z7_44",bb="_spinner_e75z7_70",jb="_sort_e75z7_76",Xt={"rearch-result--empty":"_rearch-result--empty_e75z7_1",grid:vb,"grid-header":"_grid-header_e75z7_37",navigation:xb,"result-disclaimer":"_result-disclaimer_e75z7_51",spinner:bb,sort:jb,"search-result":"_search-result_e75z7_91"},Ym=({term:e})=>{const{router:t}=pe(),{SEARCH_RESULT:r,ICONS:s}=Ps(),o=()=>{t.push(r.EMPTY.ALL_TERMS)};return n.jsxs("div",{className:Xt["rearch-result--empty"],children:[n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("div",{className:F.responsive["responsive-desktop-flex"],children:n.jsx("h2",{className:"typography-style-heading-sm",children:r.EMPTY.NOT_FOUND})}),n.jsx("div",{className:F.responsive["responsive-mobile-flex"],children:n.jsx("h2",{className:"typography-style-body-md",children:r.EMPTY.NOT_FOUND})}),n.jsxs("p",{children:[r.EMPTY.NOT_FOUND_P," ",`"${e}"`]})]}),n.jsx(d.Button,{onClick:()=>o(),variant:"tertiary",size:"medium",adornment:{end:n.jsx(d.Icon,{name:s.arrow_right,size:"medium"})},children:r.EMPTY.ALL_TERMS_LABEL})]})};Ym.displayName="RearchResult.Empty";const Cb=e=>n.jsxs(n.Fragment,{children:[n.jsx("div",{className:F.responsive["responsive-desktop-flex"],children:n.jsx("h2",{className:"typography-style-heading-sm",children:e.SEARCH.SEARCHING})}),n.jsx("div",{className:F.responsive["responsive-mobile-flex"],children:n.jsx("h2",{className:"typography-style-body-md",children:e.SEARCH.SEARCHING})}),n.jsx(d.Spinner,{className:Xt.spinner})]}),Sb=(e,t,r)=>n.jsxs(n.Fragment,{children:[n.jsx("div",{className:F.responsive["responsive-desktop-flex"],children:n.jsx("h2",{className:"typography-style-heading-sm",children:t.SEARCH.SEARCHED})}),n.jsx("div",{className:F.responsive["responsive-mobile-flex"],children:n.jsx("h2",{className:"typography-style-body-md",children:t.SEARCH.SEARCHED})}),n.jsxs("p",{children:[t.SEARCH.SEARCHED_P_START," ",e," ",t.SEARCH.SEARCHED_P_END," ",`"${r}"`]})]}),Jm=({isLoading:e,quantity:t,term:r})=>{const{SEARCH_RESULT:s}=Ps();return n.jsx(d.TextStructure.DivWrapper,{children:e?Cb(s):Sb(t,s,r)})};Jm.displayName="Search.Loading";const wb=({term:e})=>{const[t,r]=y.useState(!1),{router:s}=pe(),{searchParams:o}=Fe(),{ITEMS_DEFAULT_SORT:a,ITEMS_PER_PAGE:i,ICONS:c}=Ps(),l=u=>{F.navigateToSearchPage(s,e,i,1,u??a)};return n.jsx("div",{className:Xt.sort,children:n.jsx(js,{handleSelectValue:u=>l(u??"release_desc"),sortListOpen:t,setSortListOpen:r,searchParams:o,ICONS:c})})},Pb=({query:e})=>{const{isLoading:t,products:r,pagination:s}=In();return n.jsxs("div",{className:Xt["grid-header"],children:[n.jsxs("div",{className:Xt.navigation,children:[!t&&(r!=null&&r.length)?n.jsx(wb,{term:e}):null,n.jsx(d.Utils.Divider,{})]}),!t&&(r!=null&&r.length)?n.jsx("div",{className:Xt["result-disclaimer"],children:n.jsx(Jm,{term:e,isLoading:t,quantity:s.count})}):null]})},Zm=({isMobile:e=!1,items:t,BUY_BUTTON_LABELS:r,ICONS:s,MAIN_IMAGE:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PLP_GRID_SCROLL_BACK:c,PLP_INFINITE_SCROLL:l,PLP_PRODUCT_SIMILAR_DELAY:u,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:m,PLP_SIZE_ORDER:f,PRODUCT_CARD_IMAGE_ASPECT_RATIO:p,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:g,PRODUCT_IMAGE_DIMENSIONS:_,SECOND_IMAGE:v,StoreConfig_MainSellerId:x,TEXTURE_IMAGE:C,Z_INDEX_WAR:j,storeId:b})=>{const{getAvailableProductTag:w}=Mt(),{state:S}=Fe(),[P,N]=y.useState(!1),[R,I]=y.useState(null),[O,L]=y.useState([]),W=y.useCallback((te,Z)=>{const q=Z?wn([Z]):null;L(te),I(q!=null&&q.length?q[0]:null),N(!0)},[]),D=e?8:16,H=(S.page-1)*((S==null?void 0:S.count)??1),X=nt.helpers.createGridPosAndVideo(t,[],e?2:4,S.page);return n.jsxs(n.Fragment,{children:[n.jsx(nt.Root,{children:Array.isArray(t)&&t.map((te,Z)=>{var ee,se;const q=w(te.node.cluster.highlights);return n.jsx(nt.Card,{gap:D,isMobile:e??!1,item:te.node,order:H+(((ee=X[Z])==null?void 0:ee.position)??0),tag:q,index:Z,setSkuSelected:W,showVideo:(se=X[Z])==null?void 0:se.canPlayVideo,CONSTANTS:{BUY_BUTTON_LABELS:r,MAIN_IMAGE:o,PLP_GRID_SCROLL_BACK:c,PLP_INFINITE_SCROLL:l,PLP_PRODUCT_SIMILAR_DELAY:u,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:m,PLP_SIZE_ORDER:f,PRODUCT_CARD_IMAGE_ASPECT_RATIO:p,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:g,PRODUCT_IMAGE_DIMENSIONS:_,SECOND_IMAGE:v,StoreConfig_MainSellerId:x,TEXTURE_IMAGE:C,Z_INDEX_WAR:j,ICONS:s,storeId:b}},te.node.sku)})}),n.jsx(Pn,{open:P,sku:R,skus:O,setSku:I,setVisible:N,ICONS:s,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:h,Z_INDEX_WAR:j})]})};Zm.displayName="PDC.Products";const ep=({isMobile:e=!1,query:t})=>{const{isLoading:r,products:s,pagination:o}=In(),{searchParams:a}=Fe(),i=Ps(),c=y.useMemo(()=>!r&&s.length>0&&o.count>0,[r,s.length,o.count]);return n.jsxs("div",{className:Xt.grid,children:[c&&n.jsx(Pb,{query:t}),!r&&(s!=null&&s.length)?n.jsx(Zm,{...i,isMobile:e??!1,items:s}):null,(s==null?void 0:s.length)===0&&!r?n.jsx(Ym,{term:t}):null,c&&n.jsx(Qa,{searchParams:a,...i})]})};ep.displayName="SearchResultContent";const Eb=({className:e,storeId:t})=>{const{state:r}=Fe(),{sendDataLayerEvent:s}=le(),{isMobile:o}=oe(),a=y.useCallback(i=>{var c;s({functionKey:"readyEvents",data:{event:"view_search_results",readyData:{search_term:r==null?void 0:r.query,search_found:((c=i==null?void 0:i.products)==null?void 0:c.length)>0}}})},[s,r==null?void 0:r.query]);return n.jsx(Wa,{storeId:t,callback:i=>a(i),forceUpdate:!1,queryKey:["search",r.query,r.term??"",String(r.page),r.sort],options:{gcTime:1e3*60*30,staleTime:1e3*60*5,refetchOnWindowFocus:!1},state:r,children:n.jsx("div",{className:d.helpers.classNameConcat(Xt["search-result"],e),children:n.jsx(ep,{currentPage:r.page,isMobile:o??!1,query:r.term??""})})})},Nb=new Jl,tp=({className:e,searchParams:t,storeId:r,CONSTANTS:s})=>{const o=new URLSearchParams(t??""),a=String((o==null?void 0:o.get("query"))??""),i=Number((o==null?void 0:o.get("count"))??0),c=Number((o==null?void 0:o.get("page"))??0),l=String((o==null?void 0:o.get("sort"))??"");return n.jsx(eu,{client:Nb,children:n.jsx(yb,{...s,children:n.jsx(ba,{state:{sort:l,query:a,base:"",facets:[],term:a,page:c,count:i},searchParams:o,children:n.jsx(Eb,{className:e,storeId:r})})})})};tp.displayName="Search";const Ib=({page:e,data:t})=>{const{pathname:r}=pe(),s=y.useRef(null),{sendDataLayerEvent:o,currentLocalRef:a,itemListRef:i,promotionEventRef:c}=le();return y.useEffect(()=>{const l=uu("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}}}),wa("login_event","",{expires:m})}},[]),y.useEffect(()=>{if(s.current===r)return;s.current=r;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}=Wc(),g=h,_=p;l={page_category:"lista_produtos",...f&&{page_departament:f}},i.current={item_list_name:r==="/search"?"busca":g??void 0,item_list_id:r==="/search"?void 0:_??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})},[r]),null};var Ko={exports:{}},Jn={exports:{}},pc;function Rb(){return pc||(pc=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(l,u){for(var m in u)Object.defineProperty(l,m,{enumerable:!0,get:u[m]})}r(t,{DOMAttributeNames:function(){return s},default:function(){return c},isEqualNode:function(){return a}});const s={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function o(l){let{type:u,props:m}=l;const f=document.createElement(u);for(const g in m){if(!m.hasOwnProperty(g)||g==="children"||g==="dangerouslySetInnerHTML"||m[g]===void 0)continue;const _=s[g]||g.toLowerCase();u==="script"&&(_==="async"||_==="defer"||_==="noModule")?f[_]=!!m[g]:f.setAttribute(_,m[g])}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 _=m.querySelector("meta[charset]");_&&p.push(_)}for(let _=0;_<f.length;_++){var h;const x=f[_].nextSibling;(x==null||(h=x.tagName)==null?void 0:h.toLowerCase())===l&&p.push(x)}const g=u.map(o).filter(_=>{for(let v=0,x=p.length;v<x;v++){const C=p[v];if(a(C,_))return p.splice(v,1),!1}return!0});p.forEach(_=>{var v;const x=_.previousSibling;if(x&&x.getAttribute("name")==="next-head"){var C;(C=_.parentNode)==null||C.removeChild(x)}(v=_.parentNode)==null||v.removeChild(_)}),g.forEach(_=>{var v;const x=document.createElement("meta");x.name="next-head",x.content="1",((v=_.tagName)==null?void 0:v.toLowerCase())==="meta"&&_.getAttribute("charset")||m.appendChild(x),m.appendChild(_)})}: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 v=0,x=f.previousElementSibling;v<p;v++,x=(x==null?void 0:x.previousElementSibling)||null){var g;(x==null||(g=x.tagName)==null?void 0:g.toLowerCase())===l&&h.push(x)}const _=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)}),_.forEach(v=>m.insertBefore(v,f)),f.content=(p-h.length+_.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)}(Jn,Jn.exports)),Jn.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function r(S,P){for(var N in P)Object.defineProperty(S,N,{enumerable:!0,get:P[N]})}r(t,{default:function(){return w},handleClientScriptLoad:function(){return v},initScriptLoader:function(){return j}});const s=Ke,o=jr,a=n,i=s._(la),c=o._(y),l=nm(),u=Rb(),m=td(),f=new Map,p=new Set,h=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],g=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(N=>{let R=document.createElement("link");R.type="text/css",R.rel="stylesheet",R.href=N,P.appendChild(R)})}},_=S=>{const{src:P,id:N,onLoad:R=()=>{},onReady:I=null,dangerouslySetInnerHTML:O,children:L="",strategy:W="afterInteractive",onError:D,stylesheets:H}=S,X=N||P;if(X&&p.has(X))return;if(f.has(P)){p.add(X),f.get(P).then(R,D);return}const te=()=>{I&&I(),p.add(X)},Z=document.createElement("script"),q=new Promise((ee,se)=>{Z.addEventListener("load",function(me){ee(),R&&R.call(this,me),te()}),Z.addEventListener("error",function(me){se(me)})}).catch(function(ee){D&&D(ee)});O?(Z.innerHTML=O.__html||"",te()):L?(Z.textContent=typeof L=="string"?L:Array.isArray(L)?L.join(""):"",te()):P&&(Z.src=P,f.set(P,q));for(const[ee,se]of Object.entries(S)){if(se===void 0||h.includes(ee))continue;const me=u.DOMAttributeNames[ee]||ee.toLowerCase();Z.setAttribute(me,se)}W==="worker"&&Z.setAttribute("type","text/partytown"),Z.setAttribute("data-nscript",W),H&&g(H),document.body.appendChild(Z)};function v(S){const{strategy:P="afterInteractive"}=S;P==="lazyOnload"?window.addEventListener("load",()=>{(0,m.requestIdleCallback)(()=>_(S))}):_(S)}function x(S){document.readyState==="complete"?(0,m.requestIdleCallback)(()=>_(S)):window.addEventListener("load",()=>{(0,m.requestIdleCallback)(()=>_(S))})}function C(){[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(P=>{const N=P.id||P.getAttribute("src");p.add(N)})}function j(S){S.forEach(v),C()}function b(S){const{id:P,src:N="",onLoad:R=()=>{},onReady:I=null,strategy:O="afterInteractive",onError:L,stylesheets:W,...D}=S,{updateScripts:H,scripts:X,getIsSsr:te,appDir:Z,nonce:q}=(0,c.useContext)(l.HeadManagerContext),ee=(0,c.useRef)(!1);(0,c.useEffect)(()=>{const me=P||N;ee.current||(I&&me&&p.has(me)&&I(),ee.current=!0)},[I,P,N]);const se=(0,c.useRef)(!1);if((0,c.useEffect)(()=>{se.current||(O==="afterInteractive"?_(S):O==="lazyOnload"&&x(S),se.current=!0)},[S,O]),(O==="beforeInteractive"||O==="worker")&&(H?(X[O]=(X[O]||[]).concat([{id:P,src:N,onLoad:R,onReady:I,onError:L,...D}]),H(X)):te&&te()?p.add(P||N):te&&!te()&&_(S)),Z){if(W&&W.forEach(me=>{i.default.preinit(me,{as:"style"})}),O==="beforeInteractive")return N?(i.default.preload(N,D.integrity?{as:"script",integrity:D.integrity,nonce:q,crossOrigin:D.crossOrigin}:{as:"script",nonce:q,crossOrigin:D.crossOrigin}),(0,a.jsx)("script",{nonce:q,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([N,{...D,id:P}])+")"}})):(D.dangerouslySetInnerHTML&&(D.children=D.dangerouslySetInnerHTML.__html,delete D.dangerouslySetInnerHTML),(0,a.jsx)("script",{nonce:q,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...D,id:P}])+")"}}));O==="afterInteractive"&&N&&i.default.preload(N,D.integrity?{as:"script",integrity:D.integrity,nonce:q,crossOrigin:D.crossOrigin}:{as:"script",nonce:q,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)})(Ko,Ko.exports);var Tb=Ko.exports,Ab=Tb;const Xa=F.getDefaultExportFromCjs(Ab),kb=({children:e,ONE_TRUST:t})=>n.jsxs(n.Fragment,{children:[n.jsx(Xa,{src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",defer:!0,strategy:"afterInteractive","data-domain-script":t.siteId,type:"text/javascript"}),e]}),Ob=Jd(()=>Promise.resolve(kb),{ssr:!1}),Lb="_lgpd_vffd3_82",Mb="_success_vffd3_248",Db="_error_vffd3_312",we={"newsletter-root":"_newsletter-root_vffd3_1","has-border-top":"_has-border-top_vffd3_9","has-border-bottom":"_has-border-bottom_vffd3_12","newsletter-container":"_newsletter-container_vffd3_20","content-text":"_content-text_vffd3_35","form-wrapper":"_form-wrapper_vffd3_39","newsletter-container-banner":"_newsletter-container-banner_vffd3_64",lgpd:Lb,"textfield-structure-modifier":"_textfield-structure-modifier_vffd3_190","input-wrapper-modifier":"_input-wrapper-modifier_vffd3_196","submit-btn":"_submit-btn_vffd3_200","loading-spinner":"_loading-spinner_vffd3_211","terms-and-conditions-checkbox":"_terms-and-conditions-checkbox_vffd3_217","terms-and-conditions-unchecked":"_terms-and-conditions-unchecked_vffd3_230","terms-and-conditions-checked":"_terms-and-conditions-checked_vffd3_244",success:Mb,"text-structure-modifier":"_text-structure-modifier_vffd3_257","success-title":"_success-title_vffd3_297","close-button":"_close-button_vffd3_302",error:Db,"newsletter-wrapper":"_newsletter-wrapper_vffd3_332","banner-container":"_banner-container_vffd3_345","newsletter-provider-wrapper":"_newsletter-provider-wrapper_vffd3_358","newsletter-root-banner":"_newsletter-root-banner_vffd3_371","banner-background":"_banner-background_vffd3_392","newsletter-provider-wrapper-background":"_newsletter-provider-wrapper-background_vffd3_401"},rp=({invalid_message:e,master_data_field:t,placeholder:r,required:s=!1,CONSTANTS:o})=>{const{isMobile:a}=oe(),{inputsStatus:i,setInputsStatus:c,setFormStatus:l,variant:u}=Na();return n.jsx(d.TextField.Structure,{className:`${we["textfield-structure-modifier"]} ${u}`,input:n.jsx(d.TextField.Input,{mode:"simple",label:r,sizeVariant:a?o.NEWSLETTER_CONFIGS.interactionSizeMob:o.NEWSLETTER_CONFIGS.interactionSizeDesk,name:t,className:`${we["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"?n.jsx("div",{className:u==="horizontal"?we["support-text-modifier"]:"",children:n.jsx(d.TextField.SupportText,{text:i[t]==="error"?e??o.NEWSLETTER_CONFIGS.messages.invalid_generic:o.NEWSLETTER_CONFIGS.messages.required_field,feedback:"error"})}):null})};rp.displayName="Newsletter.Input";const np=({formStatus:e,fields:t,CONSTANTS:r})=>n.jsxs(n.Fragment,{children:[Array.isArray(t)&&t.map((s,o)=>n.jsx(rp,{invalid_message:s.invalid_message,master_data_field:s.master_data_field,placeholder:s.placeholder,required:s.required,type:s.type,CONSTANTS:r},`nt-field-${s.master_data_field}-${o}`)),e==="error"&&n.jsx("div",{className:we.error,children:n.jsx("p",{children:r.NEWSLETTER_CONFIGS.form.status.error})})]});np.displayName="Newsletter.FormFields";const sp=({formStatus:e,CONSTANTS:t,...r})=>{const{isMobile:s}=oe();return n.jsxs(d.Button,{...r,className:we["submit-btn"],disabled:e==="success",size:s?"medium":"large",children:[n.jsx("span",{"data-loading":e==="loading","data-label":!0,children:t.NEWSLETTER_CONFIGS.submitLabel}),t.NEWSLETTER_CONFIGS.hasLoadingState&&e==="loading"&&n.jsx(d.Spinner,{className:we["loading-spinner"],size:"small"})]})};sp.displayName="Newsletter.SubmitButton";const op=({checkboxRef:e,formStatus:t,setFormStatus:r,CONSTANTS:s})=>{const o=a=>{a.target.checked?(e.current=!0,t==="unchecked"&&r("idle")):e.current=!1};return n.jsxs(n.Fragment,{children:[n.jsx(d.Checkbox,{adornment:n.jsx(d.Icon,{name:s.ICONS.check,size:"x-small"}),defaultChecked:e.current,disabled:t==="success",name:"terms-and-conditions",label:s.NEWSLETTER_CONFIGS.messages.accept_terms_and_conditions,onChange:o,sizeVariant:"small",className:we["terms-and-conditions-checkbox"]}),t==="unchecked"&&n.jsx("div",{className:we["terms-and-conditions-unchecked"],children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:s.ICONS.alert_circle,size:"small"})},children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{children:s.NEWSLETTER_CONFIGS.messages.terms_and_conditions_not_accepted})})})})]})};op.displayName="Newsletter.Terms";const ap=({title:e,description:t,CONSTANTS:r})=>n.jsx("div",{className:we.success,children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{className:we["text-structure-modifier"],children:[n.jsxs("div",{className:we["success-title"],children:[n.jsx(d.Icon,{name:r.ICONS.check_circle,size:"medium"}),n.jsx("h3",{children:e})]}),n.jsx("p",{children:t})]})})});ap.displayName="Newsletter.Success";const ip=({formPayloadOptionals:e,masterDataEntity:t,banner:r,termsDescription:s,lgpdLinkLable:o,lgpdLink:a,variant:i,CONSTANTS:c})=>{const{checkboxRef:l,fields:u,formStatus:m,hasTermsAndConditions:f,handleClickToSubmit:p,handleSubmit:h,setFormStatus:g}=Na();return n.jsx(n.Fragment,{children:m==="success"?n.jsx(ap,{description:c.NEWSLETTER_CONFIGS.messages.success_description,title:c.NEWSLETTER_CONFIGS.messages.success_title,CONSTANTS:c}):n.jsxs(n.Fragment,{children:[n.jsxs("form",{className:we["form-wrapper"],onSubmit:_=>h(_,e,t),children:[n.jsx(np,{formStatus:m,fields:u,CONSTANTS:c}),f&&n.jsx(op,{checkboxRef:l,formStatus:m,setFormStatus:g,CONSTANTS:c}),n.jsx(sp,{formStatus:m,type:"submit",variant:"primary",onClick:p,CONSTANTS:c})]}),(r||i==="vertical")&&n.jsxs("div",{className:we.lgpd,children:[s&&n.jsx("p",{children:s}),o&&n.jsx(Qe,{href:a,children:o})]})]})})};ip.displayName="Newsletter.Form";const Fb=["horizontal","vertical"],Ya=({className:e,description:t,formPayloadOptionals:r,fields:s,masterDataEntity:o,masterDataEmailField:a,masterDataNameField:i,banner:c,altBanner:l,bannerBackground:u,termsDescription:m,lgpdLinkLable:f,lgpdLink:p,title:h,variant:g,borderTop:_,borderBottom:v,CONSTANTS:x,...C})=>{if(!a||!i)return null;const j=d.helpers.ValidateProp({fieldTypes:Fb,property:g,fallback:"horizontal"});return n.jsxs("div",{className:c?u?we["banner-background"]:we["newsletter-wrapper"]:"",children:[c&&n.jsx(d.Banner.Container,{className:we["banner-container"],children:n.jsx(d.Banner.ImageWrapper,{children:n.jsx(Oe.Image,{src:c,alt:l,width:"1920",height:"500"})})}),n.jsx("div",{className:c?we["newsletter-provider-wrapper"+(u?"-background":"")]:"",children:n.jsx(Ru,{fields:s,masterDataEmailField:a,masterDataNameField:i,variant:j,CONSTANTS:x,children:n.jsx("div",{...C,className:d.helpers.classNameConcat(we["newsletter-root"+(c||j==="vertical"?"-banner":"")],[_&&we["has-border-top"],v&&we["has-border-bottom"],e].filter(Boolean)),"data-variant":j,children:n.jsxs("div",{className:c||j==="vertical"?we["newsletter-container-banner"]:we["newsletter-container"],children:[n.jsxs("div",{className:we["content-text"],children:[n.jsx("h2",{children:h}),n.jsx("p",{children:t}),!c&&j==="horizontal"&&n.jsxs("div",{className:we.lgpd,children:[n.jsx("p",{children:m}),f&&n.jsx(Qe,{target:"_blank",href:p,children:f})]})]}),n.jsx(ip,{formPayloadOptionals:r,masterDataEntity:o,CONSTANTS:x,banner:c,lgpdLink:p,lgpdLinkLable:f,termsDescription:m,variant:j})]})})})})]})};Ya.displayName="Newsletter";const cp=({children:e,...t})=>n.jsx("div",{...t,children:e});cp.displayName="CallToAction";const zb="_wrapper_aejhu_1",Bb="_body_aejhu_8",fs={wrapper:zb,body:Bb,"wrapper-body":"_wrapper-body_aejhu_16","accordion-modifier":"_accordion-modifier_aejhu_32"},Ub=({children:e,className:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat(fs.wrapper,t),children:e}),qb=({data:e,ICONS:t})=>{const[r,s]=y.useState(null),o=i=>{s(c=>c===i?null:i)},{router:a}=pe();return n.jsx("div",{className:d.helpers.classNameConcat(fs.body),children:Array.isArray(e)&&(e==null?void 0:e.map((i,c)=>{var f;const l=r===i.id,u=i.buttonHref&&i.buttonHref!=="#",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 n.jsx("div",{children:i.type==="button"?n.jsxs(n.Fragment,{children:[n.jsx(d.Button,{variant:"tertiary",mode:i.buttonMode??"default",size:i.buttonSize??"medium",iconNameStart:t[i.buttonIcon]??i.buttonIcon,...m,style:{marginTop:16},children:i.buttonLabel}),n.jsx(d.Utils.Divider,{direction:"horizontal",size:"small",style:{height:16}})]}):n.jsxs(d.Accordion.Wrapper,{className:d.helpers.classNameConcat(fs["accordion-modifier"]),children:[n.jsx(d.Accordion.Header,{id:`${c}-${i.title}`,closeIndicator:l?n.jsx(d.Icon,{name:t.arrow_up,size:"medium"}):void 0,openIndicator:l?void 0:n.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),title:"accordion-header",onClick:()=>o(i.id),children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h2",{className:"typography-style-body-sm",children:i.title})})})}),n.jsx(d.Accordion.Body,{title:"accordion-body",children:n.jsx(d.TextStructure.Root,{children:l&&n.jsxs(d.TextStructure.DivWrapper,{children:[i.subtitle?n.jsx("h3",{className:"typography-style-body-md",children:i.subtitle}):n.jsx(n.Fragment,{}),n.jsx("p",{className:"typography-style-caption",children:i.description}),i.buttonLabel&&i.buttonHref?n.jsx(Qe,{href:i.buttonHref??"#",mode:i.buttonMode??"default",size:i.buttonSize??"medium",adornments:(f=i.buttonIcon)!=null&&f.length?{end:n.jsx(d.Icon,{name:t[i.buttonIcon]??i.buttonIcon})}:void 0,children:i.buttonLabel}):n.jsx(n.Fragment,{})]})})})]})},i.id)}))})},Hb=({className:e,data:t,ICONS:r,...s})=>{const[o,a]=y.useState(!1),[i,c]=y.useState(null);y.useEffect(()=>{!o&&!i&&t&&c(t)},[o,i]);const l=y.useCallback(()=>{a(u=>!u)},[]);return i?n.jsxs(Ub,{...s,className:e,children:[n.jsx("div",{className:fs["wrapper-body"],hidden:!o,children:o&&n.jsx(qb,{data:i.content,ICONS:r})}),n.jsx(cp,{children:n.jsx("div",{onClick:l,children:o?n.jsx(d.Button,{iconNameEnd:r.close,size:(i==null?void 0:i.helpButtonSize)??"x-large"}):n.jsx(d.Button,{iconNameStart:(i==null?void 0:i.iconLabel)??r.help,size:(i==null?void 0:i.helpButtonSize)??"x-large",children:i==null?void 0:i.label})})})]}):n.jsx(n.Fragment,{})},$b="_formContainer_zwlly_1",Vb="_formFieldGroup_zwlly_6",Wb="_formFieldGroupName_zwlly_10",Gb="_formFieldWrapper_zwlly_20",Kb="_formFieldInput_zwlly_30",Qb="_success_zwlly_73",Xb="_button_zwlly_110",Yb="_error_zwlly_114",It={formContainer:$b,formFieldGroup:Vb,formFieldGroupName:Wb,formFieldWrapper:Gb,formFieldInput:Kb,success:Qb,"text-structure-modifier":"_text-structure-modifier_zwlly_85",button:Xb,error:Yb},Jb=({group:e,children:t,className:r})=>n.jsx(n.Fragment,{children:n.jsxs("div",{className:d.helpers.classNameConcat(It.formFieldGroup,r),children:[n.jsx("h1",{className:It.formFieldGroupName,children:e.groupLabel}),t]},e.groupLabel)});async function Zb(e){const t=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-1",t);return Array.from(new Uint8Array(r)).map(a=>a.toString(16).padStart(2,"0")).join("")}const ej=async e=>await fetch("/api/dito-ingest",{method:"POST",body:JSON.stringify(e)}).then(r=>r.json()),lp=y.createContext({});function up({children:e,groups:t,masterDataEntity:r,postFn:s,actionName:o="",originName:a="",POPUP_SUBMITTED_STORAGE:i}){const[c,l]=y.useState(!1),[u,m]=y.useState({}),[f,p]=y.useState([]),[h,g]=y.useState("idle"),[_,v]=y.useState(""),x=({target:{name:j,value:b}})=>{m({...u,[j]:b})},C=j=>{j.preventDefault(),s({body:{masterDataEntity:r,payload:u}}).then(async({Message:b})=>{if(b){const S=b.match(/'(.*?[^\\])'/g)||[];var w="-";for(const P of S){const N=P.substring(1,P.length-1),I=t.flatMap(O=>O.fields).find(({name:O})=>O===N);v(N),I&&(w=I.name)}return g("error"),p([w])}if(u.email){const S=await Zb(u.email||""),P=new Date().toISOString();ej([{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),g("success"),p([])})};return n.jsx(lp.Provider,{value:{formErrors:f,handleInputChange:x,submitForm:C,formData:u,status:h,fieldMessage:_,success:c,setSuccess:l},children:e})}function Es(){return y.useContext(lp)}const tj=({fields:e,className:t})=>{const{formData:r,handleInputChange:s,formErrors:o}=Es();return n.jsx("div",{className:d.helpers.classNameConcat(It.formFieldWrapper,t),children:e.map(({label:a,name:i,required:c,width:l="medium"})=>n.jsx(d.TextField.Input,{label:`${a}${c?"*":""}`,title:i,value:r[i]||"",name:i,sizeVariant:"large",onChange:s,required:c,feedback:o.includes(i)?"error":"none",className:It.formFieldInput,"data-inputsize":l},i))})},rj=({FORM_CONFIGS:e,ICONS:t})=>{const{router:r}=pe();return n.jsxs("div",{className:It.success,children:[n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:t.check_circle,size:"medium"})},children:n.jsx(d.TextStructure.DivWrapper,{className:It["text-structure-modifier"],children:n.jsx("p",{children:e.successMessage})})}),n.jsx(d.Button,{size:"large",onClick:()=>r.push("/"),className:It.button,children:e.returnButton})]})},nj=({FORM_CONFIGS:e,ICONS:t})=>{const{fieldMessage:r}=Es();return n.jsx("div",{className:It.error,children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:t.delete_circle,size:"small"})},children:n.jsx(d.TextStructure.DivWrapper,{className:It["text-structure-modifier"],children:n.jsxs("p",{children:[e.errorMessage,r]})})})})},sj=({children:e,className:t,ICONS:r,FORM_CONFIGS:s})=>{const{submitForm:o,status:a}=Es();return n.jsx("form",{onSubmit:o,className:d.helpers.classNameConcat(It.formContainer,t),children:a==="success"?n.jsx(rj,{ICONS:r,FORM_CONFIGS:s}):n.jsxs(n.Fragment,{children:[e,a==="error"&&n.jsx(nj,{ICONS:r,FORM_CONFIGS:s})]})})},oj=e=>{const{children:t,className:r}=e;return n.jsx(up,{...e,children:n.jsx(sj,{ICONS:e.ICONS,FORM_CONFIGS:e.FORM_CONFIGS,className:r,children:t})})},Lr={Root:oj,FieldGroup:Jb,FieldWrapper:tj},aj="_button_1e35m_39",nr={"banner-container":"_banner-container_1e35m_1","banner-background":"_banner-background_1e35m_6","form-root":"_form-root_1e35m_15",button:aj,"form-fied-wrapper":"_form-fied-wrapper_1e35m_52"};function ij({content:e,sections:t,FORM_CONFIGS:r,ICONS:s,postFn:o,POPUP_SUBMITTED_STORAGE:a}){var l;const{isMobile:i}=oe(),c=((l=t.find(({name:u})=>u==="Form"))==null?void 0:l.data)||{};return n.jsx("div",{children:n.jsxs(d.Banner.Container,{className:nr["banner-container"],children:[n.jsx(d.Banner.ImageWrapper,{children:n.jsx(Oe.Image,{className:nr["banner-background"],src:i?e.bannerMobile:e.bannerDesk,alt:e.altBanner,width:"1920",height:"500"})}),n.jsxs(Lr.Root,{postFn:o,ICONS:s,FORM_CONFIGS:r,groups:c.groups||[],masterDataEntity:c.masterDataEntity||"",className:nr["form-root"],POPUP_SUBMITTED_STORAGE:a,children:[c.groups.map(u=>n.jsx(Lr.FieldGroup,{group:u,children:n.jsx(Lr.FieldWrapper,{fields:u.fields,className:nr["form-fied-wrapper"]})},u.groupLabel)),n.jsxs("div",{children:[n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{className:"typography-style-body-xs",children:e.requiredMessage})}),n.jsx("div",{className:nr["button-wrapper"],children:n.jsx("div",{className:nr["button-frame"],children:n.jsx(d.Button,{size:"large",type:"submit",className:nr.button,children:e.buttonLabel})})})]})]})]})})}const cj="_content_1jj9i_36",lj="_trends_1jj9i_47",uj="_modal_1jj9i_1",st={"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:cj,trends:lj,"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:uj,"search-modal__modal":"_search-modal__modal_1jj9i_100"},dp=y.createContext({}),dj=({children:e,term:t,storeId:r})=>{const[s,o]=y.useState([]),[a,i]=y.useState(!1);return y.useEffect(()=>{if(!t){o([]);return}(async()=>{i(!0);try{const l=await fetch(`https://${r}.myvtex.com/_v/proxy/search/suggestedTerms`,{method:"POST",body:JSON.stringify({query:t,locale:"pt-BR"})}),{data:u}=await l.json();o((u==null?void 0:u.searches)||[])}catch(l){console.error("Erro ao buscar sugestões:",l)}})()},[t,r]),n.jsx(dp.Provider,{value:y.useMemo(()=>({suggestedTerms:s,loading:a,setLoading:i}),[s,a]),children:e})},fj=({children:e,...t})=>n.jsx(dj,{...t,children:e}),mj=()=>{const e=y.useContext(dp);if(!e)throw new Error("useSuggestedTermsContext must be used within a SuggestedTermsProvider");return e},lo=(e,t,r=24,s=1,o="release:desc")=>{const a=`/search?query=${t??""}&count=${r}&page=${s}${o?`&sort=${o.replace("_",":")}`:""}`;e.push(a)},fp=({placeholder:e,noResultsTitle:t,noResultsLabel:r,noResultsTermText:s,handleClose:o,setTerm:a,ICONS:i,ITEMS_DEFAULT_SORT:c,ITEMS_PER_PAGE:l,SEARCH_MODAL:u})=>{const[m,f]=y.useState(""),{suggestedTerms:p,loading:h,setLoading:g}=mj(),{router:_}=pe(),v=y.useRef(null),x=b=>{f(b.target.value),clearTimeout(v.current),b.target.value.length>2&&(a(b.target.value),v.current=setTimeout(()=>{a(b.target.value),g(!1)},2e3))},C=b=>{b.key==="Enter"&&(m==null?void 0:m.length)>2&&(o(),lo(_,m,l,1,c))},j=b=>{o(),lo(_,b,l,1,c)};return y.useEffect(()=>{if(clearTimeout(v.current),m.length<=2||p.length>0){g(!1);return}return g(!0),v.current=setTimeout(()=>{lo(_,m,l,1,c),g(!1),o()},2e3),()=>{clearTimeout(v.current)}},[m,p]),n.jsx(d.DropDown.AutoComplete,{className:st["modal-auto-complete"],onKeyDown:C,onInputChange:x,placeholder:e,stopClickPropagation:!1,adornment:{end:h?n.jsx(d.Spinner,{size:"small"}):n.jsx(d.Button,{variant:"tertiary",size:"small",iconNameStart:i.search,onClick:()=>{j(m)},disabled:!(m.length>2)})},children:(p==null?void 0:p.length)>0&&n.jsx(n.Fragment,{children:(p==null?void 0:p.length)>0&&(m==null?void 0:m.length)>2?n.jsx(d.DropDown.AutoCompleteList,{className:st["modal-auto-complete__dropdown"],seeAll:n.jsx("span",{onClick:()=>j(m),children:s+m}),children:p.map((b,w)=>n.jsx(d.DropDown.ListItemWithLink,{children:n.jsx(Qe,{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&&(p==null?void 0:p.length)===0&&n.jsxs(d.DropDown.AutoCompleteList,{className:st["modal-search-empty"],children:[n.jsx(d.DropDown.NotResults,{description:r,title:t}),n.jsx(d.Button,{className:"all-terms",onClick:()=>{o(),_.push(u.EMPTY.ALL_TERMS)},variant:"tertiary",size:"medium",title:u.EMPTY.ALL_TERMS_LABEL,adornment:{end:n.jsx(d.Icon,{name:i.arrow_right,size:"medium"})},children:u.EMPTY.ALL_TERMS_LABEL})]})})})};fp.displayName="SearchModal.AutoComplete";function pj({title:e,ICONS:t}){const{isMobile:r}=oe();return n.jsx(d.Modal.Header,{navigation:"top",className:st["modal-header"],children:n.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!r,children:[n.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),n.jsx(d.Modal.Title,{navigation:"top",className:st["search-modal__title"],title:e}),n.jsx(d.Button,{className:st["modal-header__close-button"],"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})})}const mp=y.createContext({searches:[],isLoading:!1,error:null});let uo=null;const hj=({children:e,storeId:t})=>{const[r,s]=y.useState([]),[o,a]=y.useState(!0),[i,c]=y.useState(null);return y.useEffect(()=>{(async()=>{try{if(a(!0),uo){s(uo),a(!1);return}const u=await fetch(`https://${t}.myvtex.com/_v/proxy/search/topSearch`);if(!u.ok)throw new Error(`Erro ao buscar os dados: ${u.status}`);const f=(await u.json()).data.searches||[];uo=f,s(f)}catch(u){c(u instanceof Error?u.message:"Erro desconhecido")}finally{a(!1)}})()},[t]),n.jsx(mp.Provider,{value:y.useMemo(()=>({searches:r,isLoading:o,error:i}),[r,o,i]),children:e})},gj=()=>{const e=y.useContext(mp);if(!e)throw new Error("useTopSearches must be used within a TopSearchesProvider");return e},_j=({title:e,allTermsLabel:t,allTermsUrl:r,qtyTrends:s,handleClose:o,ICONS:a,ITEMS_PER_PAGE:i})=>{const{searches:c,isLoading:l}=gj(),{router:u}=pe(),m=Array.isArray(c)?c:[];return n.jsx(n.Fragment,{children:!l&&m.length>0?n.jsx(d.ComponentList.Structure,{className:st.trends,title:e,children:n.jsxs("div",{className:st["trends-content"],children:[n.jsx(d.ComponentList.List,{columns:1,children:m.slice(0,s).map((f,p)=>n.jsx(d.ComponentList.ListItem,{className:st["trends-item"],children:n.jsx(Qe,{href:`/search?query=${f.term}&count=${i}&page=1`,size:"x-small",adornments:{end:n.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},disableUnderline:!0,title:f.term,onClick:()=>o(),children:f.term})},`list-item-${p}`))}),n.jsx(d.Button,{className:"all-terms",variant:"tertiary",size:"x-small",underline:!1,onClick:()=>{o(),u.push(r)},adornment:{end:n.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},children:t})]})}):null})};function yj({SectionZone:e}){var s;const[t,r]=y.useState(null);return y.useEffect(()=>{(async()=>{try{const a=await fetch("/api/cms/content-type-client",{method:"POST",body:JSON.stringify({contentType:"search"})});if(!a.ok)return;const i=await a.json();r(i)}catch(a){console.error("[CMS FETCH ERROR]",a)}})()},[]),n.jsx("div",{className:st.content,children:t!==null&&n.jsx(e,{data:((s=t[0])==null?void 0:s.sections)??[],componentConfigs:{"Product Carousel":{searchModal:!0}}})})}const pp=({className:e,trends:t,CONSTANTS:r,SectionZone:s})=>{const[o,a]=y.useState(""),{isMobile:i}=oe(),c=Pl(),{setValue:l}=ps(),{SEARCH_MODAL:u,ICONS:m,ITEMS_PER_PAGE:f,ITEMS_DEFAULT_SORT:p,storeId:h}=r;return n.jsxs(d.Modal.Root,{isMobile:i??!1,variant:i?"sideBottom":"sideRight",isOpen:c,setIsOpen:l,className:`${st.modal} ${st["search-modal__modal"]} ${e??""}`,children:[n.jsx(pj,{title:u.HEADER.TITLE,ICONS:m}),n.jsxs(d.Modal.Body,{className:st["modal-content-body"],children:[n.jsx(fj,{term:o,storeId:h,children:n.jsx(fp,{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?n.jsx(hj,{storeId:h,children:n.jsx(_j,{title:u.TRENDS.TITLE,allTermsUrl:u.TRENDS.ALL_TERMS_URL,allTermsLabel:u.TRENDS.ALL_TERMS_LABEL,qtyTrends:u.TRENDS.QTY_TERMS,handleClose:()=>l(!1),ICONS:m,ITEMS_PER_PAGE:f})}):null,n.jsx(yj,{SectionZone:s})]})]})};pp.displayName="SearchModal";const ft={"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"},hp=({LPLOJAS_TEMPLATE_RETURN_BUTTON:e,ICONS:t,showVendor:r})=>{const{selectedCity:s,selectedStore:o}=gs();return n.jsx(d.Card,{padding:"small",shadow:!0,className:ft["store--wrapper"],children:o?n.jsxs(n.Fragment,{children:[n.jsx(Nt.ReturnButton,{ICONS:t,children:e}),n.jsx(Nt.Details,{ICONS:t,showVendor:r,store:s==null?void 0:s.find(a=>a.nome===o)})]}):n.jsx(Nt.Select,{ICONS:t})})};hp.displayName="LPStores.Content";const on=({title:e,text:t,type:r,...s})=>n.jsx(d.TextStructure.DivWrapper,{...s,children:r==="title"?n.jsx("h4",{className:ft["store--details--title"],children:e}):n.jsxs(n.Fragment,{children:[n.jsx("h5",{className:ft["store--details--subtitle"],children:e}),n.jsx("p",{className:ft["store--details--text"],children:t})]})});on.displayName="LPStores.Details";const gp=({vendor:e,ICONS:t})=>{const r=e?e.split(","):[];return n.jsxs(d.Accordion.Wrapper,{style:{width:"100%"},children:[n.jsx(d.Accordion.Header,{id:"accordion-header-vendor",closeIndicator:n.jsx(d.Icon,{name:t.arrow_up,size:"small"}),openIndicator:n.jsx(d.Icon,{name:t.arrow_down,size:"small"}),title:"Código de vendedor (A)",children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{gap:0,children:n.jsx("h3",{className:"typography-style-body-md",children:"Código de vendedor (A)"})})})}),n.jsx(d.Accordion.Body,{children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:ft["store--details--vendor"],children:r.map((s,o)=>n.jsx("p",{className:"typography-style-body-sm",children:s.trim()},o))})})})]})};gp.displayName="LPStores.Details";const _p=({store:e,showVendor:t,ICONS:r})=>n.jsxs("div",{className:ft["store--details"],children:[n.jsx(on,{alignItems:"left",title:String(e==null?void 0:e.nome),type:"title"}),n.jsx(on,{title:"Endereço",text:String(e.endereco)}),e.telefone&&n.jsx(on,{title:"Telefone",text:String(e.telefone)}),e.horario&&n.jsx(on,{title:"Horário de funcionamento",text:String(e.horario)}),t&&n.jsx(gp,{ICONS:r,vendor:String(e.vendedoras)})]});_p.displayName="LPStores.Details";const yp=({ICONS:e,arrowDownIcon:t=n.jsx(d.Icon,{name:e.arrow_down,size:"small"}),arrowUpIcon:r=n.jsx(d.Icon,{name:e.arrow_up,size:"small"}),list:s,selectText:o,...a})=>n.jsx(d.DropDown.DefaultDropDown,{...a,"aria-placeholder":o,adornmentListClosed:{end:t},adornmentListOpened:{end:r},mode:"simple",placeholder:o,sizeVariant:"large",children:n.jsx(d.DropDown.DefaultDropDownList,{placeholder:o,supportText:o,maxHeight:400,children:Array.isArray(s)&&(s==null?void 0:s.map(i=>n.jsx(d.DropDown.ListItem,{value:i,children:i},i.replace(/\s/g,""))))})});yp.displayName="LPStores.DropDown";const vp=({children:e,ICONS:t})=>{const{clearSelectedStore:r}=gs(),s=()=>{typeof r=="function"&&r()};return n.jsxs("button",{"aria-label":String(e),className:ft["store--return-button"],onClick:s,onKeyDown:s,children:[n.jsx(d.Icon,{name:t.arrow_left,size:"small"}),e]})};vp.displayName="LPStores.ReturnButton";const xp=({children:e,data:t})=>n.jsx(Au,{data:t,children:e});xp.displayName="LPStores.Root";const bp=({children:e,imgAlt:t,imgSrcDesk:r,imgSrcMob:s})=>{const{isMobile:o}=oe();return n.jsxs("section",{className:ft["store--section"],children:[n.jsx(pn,{src:o?s:r,alt:t,fill:!0,className:ft["store--section--img"]}),e]})};bp.displayName="LPStores.Section";const jp=({ICONS:e})=>{const{data:t,handleSelectCity:r,selectedCity:s,handleSelectStore:o}=gs(),a=new Set(t.map(c=>c.cidade)),i=Array.from(a).filter(c=>typeof c=="string");return n.jsxs("div",{className:ft["store--select"],children:[n.jsx(Nt.DropDown,{selectText:"Selecione a cidade",handleSelectedValue:r,list:i,defaultValue:s==null?void 0:s[0].cidade,ICONS:e}),n.jsx(Nt.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)]})};jp.displayName="LPStores.Select";const Cp=({children:e})=>n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:ft["store--page-title"],children:n.jsx("h2",{className:ft["store--page-title--title"],children:e})})});Cp.displayName="LPStores.Title";const Nt={Content:hp,Details:_p,DropDown:yp,ReturnButton:vp,Root:xp,Section:bp,Select:jp,Title:Cp};var Sp={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 vj(e,t,r){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 xj(e,t,r){console.log(`%c[DT - ${r}] EVENTO DISPARADO:%c `,`background: ${t}; color: white; font-weight: bold; padding: 2px 4px; border-radius: 3px;`,"color: #fff;",e||"")}var wp=[["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 bj(e,t,r){xj({id:e,custom_data:t},"#00c851",r)}var jj={DataLayer:vj,Dito:bj};async function Cj(e,t){const r=Sp[e];r&&await Promise.allSettled(r.destinations.map(async s=>{try{await jj[s](e.toLowerCase(),t,s)}catch(o){console.error(`[DT] Failed to send ${e} to ${s}:`,o)}}))}async function Sj(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 wj(e){try{const{pathname:t}=new URL(e,window.location.origin);return/\/p\/?$/.test(t)}catch{return!1}}function Pp(e){if(!e)return null;const t=(()=>{try{return new URL(e,location.origin).pathname}catch{return e.split("?")[0]}})(),r=decodeURIComponent(t).match(/(\d+-\d+)(?=\/p|$)/);return r?r[1].replace("-","_"):null}async function Pj(e){const t=Pp(e);if(!t)return console.error("Não foi possível extrair o RefId da URL"),null;try{const r=await fetch(`/api/catalog_system/pub/products/search?fq=alternateIds_RefId:${t}`);if(!r.ok)throw new Error(`Erro na API: ${r.status}`);const s=await r.json();return(s==null?void 0:s[0])||null}catch(r){return console.error("Erro ao buscar dados do produto:",r),null}}function Ep(e,t){var r,s,o,a;const i=(s=(r=e==null?void 0:e.shippingData)==null?void 0:r.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 Np(e){var t,r;const s=await Sj(e.productId||e.productID||e.item_group_id);return s.length&&(r=(t=s[0].items.find(o=>o.name===e.skuName))==null?void 0:t.itemId)!=null?r:null}function Ns(e){return e.discount||e.discount===0?e.discount:parseFloat(Math.max(e.listPrice-e.sellingPrice,0).toFixed(2))/100||0}function Sr(e){const t=[()=>{var r;return((r=e==null?void 0:e.productCategories)==null?void 0:r[39])==="BAZAR"?"Sale":"Coleção"},()=>e.item_category||e.category,()=>e.categories[0]];for(const r of t){const s=r();if(s!=null)return s}return null}function Tn(e){const t=[()=>Object.values((e==null?void 0:e.productCategories)||{}).pop(),()=>Object.values((e==null?void 0:e.categories)||{}).pop(),()=>{var r,s,o,a,i;return(i=(a=(o=(s=(r=e==null?void 0:e.category)==null?void 0:r.split)==null?void 0:s.call(r,">"))==null?void 0:o[1])==null?void 0:a.trim)==null?void 0:i.call(a)},()=>e.item_category2];for(const r of t){const s=r();if(s!=null)return s}return null}function Ip(e){var t;const r=((t=e==null?void 0:e.additionalInfo)==null?void 0:t.tags)||(e==null?void 0:e.tags);return Array.isArray(r)&&r.length?r.join(","):null}var Ej={farm:"farmrio","farm etc":"farmetc","farm rio":"farmrio"};function hc(e){if(!e)return null;const t=e.toLowerCase().trim();return Ej[t]||null}function Rt(e){var t;let r=[];if(Array.isArray(e)&&e.every(a=>typeof a=="string"))r=e;else if(Array.isArray(e))r=e.map(a=>{var i;return((i=a.additionalInfo)==null?void 0:i.brandName)||a.brand});else if(typeof e=="object"&&e!==null&&"brand"in e)r=[((t=e.additionalInfo)==null?void 0:t.brandName)||e.brand];else return typeof e=="string"?hc(e):null;const s=r.map(hc).filter(a=>a!==null),o=[...new Set(s)].sort();return o.length>0?o.join("_"):null}function Nj(e){var t;if(!e.orderForm&&!((t=e.orderForm.items)!=null&&t.length))return null;const r=e.orderForm.items;return Rt(r)}function Ij(e){var t;const{item:r}=e;return Rt(((t=r==null?void 0:r.additionalInfo)==null?void 0:t.brandName)||r.brand||r.item_brand)}function Rj(e,t){if(e!=null&&e.brand)return Rt(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 Nj(e);case"ADD_TO_CART":case"REMOVE_FROM_CART":return Ij(e);default:return null}}async function Tj(e){var t;const r=((t=e.orderForm)==null?void 0:t.items)||[];return r.length?await Promise.all(r.map(async s=>{var o,a,i;return{item_id:s.productId,item_category2:Tn(s),item_category4:Ip(s),item_shipping_tier:Ep(e.orderForm,s),price:parseFloat((s.price/100).toFixed(2))||0,quantity:s.quantity||1,item_ref:s.refId||null,item_brand:Rt((o=s.additionalInfo)==null?void 0:o.brandName)||((a=s.additionalInfo)==null?void 0:a.brandName)||null,item_sku:await Np(s)||s.id||null,item_name:s.name||s.id||null,item_category:Sr(s)||null,item_variant:s.skuName.split(/[-/]/)[0].trim(),item_variant2:((i=s.skuName.split(/[-/]/).pop())==null?void 0:i.trim())||"",discount:Ns(s)}})):[]}async function Aj(e,t){var r,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:Tn(a),item_category4:Ip(a),item_shipping_tier:t==="REMOVE_FROM_CART"?Ep(i,a):null,price:a.listPrice||parseFloat((a.price/100).toFixed(2))||0,item_ref:a.refId||a.item_ref||(a==null?void 0:a.additionalProperty.find(c=>c.name==="RefId").value)||null,item_brand:((r=a.additionalInfo)==null?void 0:r.brandName)||a.item_brand||a.brand.name||null,item_sku:a.sku||a.id||a.item_id||await Np(a)||null,item_name:a.name||a.item_name||null,item_category:Sr(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:Ns(a),item_list_name:Sr(a)||null,item_url:a.item_url||null}]}async function kj(e){return((e==null?void 0:e.list)||[]).map(t=>{var r,s,o,a,i;return{price:((r=t==null?void 0:t.price)==null?void 0:r.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:Rt((o=t==null?void 0:t.brand)==null?void 0:o.name)||Rt(e.brand)||Rt(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:Sr(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:Tn(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:Ns(t)||null,item_list_name:(e==null?void 0:e.itemListName)||Sr(t)||null}})}async function Oj(e){var t,r,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:Rt(o.brand.name)||Rt(e.brand)||null,item_name:o.productName||o.alternateName||null,item_category:Sr(o)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-")[0].trim())||null,item_category2:Tn(o)||((s=(r=o==null?void 0:o.category)==null?void 0:r.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:Ns(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 Lj(e){var t;if(!wj(e==null?void 0:e.bannerUrl))return[];const s=await Pj(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:Pp(e==null?void 0:e.bannerUrl),item_brand:Rt(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:Sr(s)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-").pop().trim())||null,item_category2:Tn(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 Mj(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 Tj(e);case"ADD_TO_CART":case"ADD_TO_WISHLIST":case"REMOVE_FROM_CART":return Aj(e,t);case"SELECT_ITEM":case"VIEW_ITEM_LIST":return kj(e);case"VIEW_ITEM":return Oj(e);case"VIEW_PROMOTION":case"SELECT_PROMOTION":return Lj(e);default:return null}}function Dj(e){var t,r,s;if(!e.orderForm)return null;const o=((t=e.orderForm.paymentData)==null?void 0:t.payments)||[],a=((r=e.orderForm.paymentData)==null?void 0:r.paymentSystems)||[];if(!o.length||!a.length)return null;const i=o.find(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=wp.find(([f])=>u.includes(f));return m?m[1]:null}function Fj(e){var t,r,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=((r=a[0])==null?void 0:r.payments)||[];if(!i.length)return null;const c=((o=(s=i[0])==null?void 0:s.paymentSystemName)==null?void 0:o.toLowerCase())||"",l=wp.find(([u])=>c.includes(u));return l?l[1]:null}function zj(e,t){if(e!=null&&e.paymentType)return e.paymentType;switch(t){case"ORDER_REVIEWED":case"CUSTOM_ADD_PAYMENT_INFO":return Dj(e);case"PURCHASE":case"CUSTOM_PURCHASE":return Fj(e);default:return null}}var Bj={brand:Rj,items:Mj,payment_type:zj,user_info:async(e,t)=>{var r;const o=(r={animale:{store:"https://www.animale.com.br",checkout:"https://secure.animale.com.br"},farm:{store:"https://lojafarm.myvtex.com"},mariafilo:{store:"https://mariafilo.myvtex.com",checkout:"https://secure.mariafilo.com.br"},lojacrisbarros:{store:"https://lojacrisbarros.myvtex.com",checkout:"https://secure.crisbarros.com.br"},lojaoffpremium:{store:"https://lojaoffpremium.myvtex.com",checkout:"https://secure.lojaoffpremium.com.br"}}[e.account||"https://www.animale.com.br"])==null?void 0:r[e.platform||"store"];if(!o)return{customer:{email:e.userEmail,id:e==null?void 0:e.userId},address:null};try{const a=`${o}/_v/user-info`,i=await fetch(a,{method:"POST",body:JSON.stringify({email:e.userEmail})});return i.status!==200?{customer:{email:e.userEmail,id:e==null?void 0:e.userId},address:null}:await i.json()}catch{return{customer:{email:e.userEmail,id:e==null?void 0:e.userId},address:null}}},content_type:(e,t)=>"regiao".concat(":"+e.category).concat(e.subcategory?":"+e.subcategory:"").concat(":"+e.componentName)||null,region:(e,t)=>e.region||null,line_items:(e,t)=>e!=null&&e.lineItems?e.lineItems:e!=null&&e.item?[e.item.productId||e.item.productID||e.item.item_id]:e!=null&&e.list?e.list.map(r=>r.productID||(r==null?void 0:r.id)):(e.orderForm.items||[]).map(r=>r.productId).join(","),currency:(e,t)=>{var r,s,o,a;return e!=null&&e.currency?e.currency:e!=null&&e.bannerUrl?"BRL":e!=null&&e.item?((s=(r=e.item)==null?void 0:r.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 r;return e!=null&&e.value?e.value:e.item?e.item.price:((r=e.orderForm)==null?void 0:r.value)!=null?e.orderForm.value/100:null},total_discount:(e,t)=>{var r,s;const a=(((r=e.orderForm)==null?void 0:r.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 r,s;return(((r=e.orderForm)==null?void 0:r.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 r;if(e.couponMessage)return e.couponMessage;const s=((r=e.orderForm)==null?void 0:r.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 r,s;return e.appliedCoupon||((s=(r=e==null?void 0:e.orderForm)==null?void 0:r.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 r;const s=e.orderForm;return s?(((r=s.shippingData)==null?void 0:r.logisticsInfo)||[]).some(i=>{var c;return(c=i.slas)==null?void 0:c.some(l=>l.deliveryChannel==="pickup-in-point")}):null},shippings:(e,t)=>{const r=e.orderForm;if(!r)return null;const s={};for(const a of r.shippingData.logisticsInfo){const i=r.items[a.itemIndex];if(i)for(const c of a.slas){const l=c.name;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 r,s,o;return((o=(s=(r=e==null?void 0:e.orderForm)==null?void 0:r.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 r,s,o,a;const c=((o=(s=(r=e==null?void 0:e.orderForm)==null?void 0:r.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 r,s;return((s=(r=e.orderForm)==null?void 0:r.orderGroup)==null?void 0:s.toString())||null},available_grid:(e,t)=>e.availableGrid||null};async function Uj(e={},t){const r=Sp[t];return r?Object.fromEntries(await Promise.all(r.requiredParams.map(async o=>{const a=Bj[o];return typeof a!="function"?(console.error(`[DT] Missing paramGetter for param: ${o}`),[o,null]):[o,await a(e,t)]}))):void 0}async function qj(e,t={}){try{const r=await Uj(t,e);return await Cj(e,Object.assign({},r,{window:t.window}))}catch(r){return console.error(`[DT] Error tracking event ${e}:`,r)}}var Qo={exports:{}},Rp={};(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 r=y,s=(0,r.createContext)(null),o=(0,r.createContext)(null),a=(0,r.createContext)(null);process.env.NODE_ENV!=="production"&&(s.displayName="SearchParamsContext",o.displayName="PathnameContext",a.displayName="PathParamsContext")})(Rp);var Xo={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return r}});function r(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)})(Xo,Xo.exports);var Hj=Xo.exports,Yo={exports:{}},Jo={exports:{}},Zo={exports:{}},ea={exports:{}},ta={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return a}});const r=new Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class s{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}}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)})(ta,ta.exports);var Ja=ta.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return s}});const s=(0,Ja.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)})(ea,ea.exports);var $j=ea.exports;(function(e,t){"TURBOPACK { transition: next-shared }";Object.defineProperty(t,"__esModule",{value:!0});function r(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}r(t,{getExpectedRequestStore:function(){return o},requestAsyncStorage:function(){return s.requestAsyncStorage}});const s=$j;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)})(Zo,Zo.exports);var Vj=Zo.exports,ra={exports:{}},na={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return s}});const s=(0,Ja.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)})(na,na.exports);var Wj=na.exports;(function(e,t){"TURBOPACK { transition: next-shared }";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return r.actionAsyncStorage}});const r=Wj;(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)})(ra,ra.exports);var Gj=ra.exports,sa={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return r}});var r;(function(s){s[s.SeeOther=303]="SeeOther",s[s.TemporaryRedirect=307]="TemporaryRedirect",s[s.PermanentRedirect=308]="PermanentRedirect"})(r||(r={})),(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(sa,sa.exports);var Kj=sa.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(_,v){for(var x in v)Object.defineProperty(_,x,{enumerable:!0,get:v[x]})}r(t,{RedirectType:function(){return c},getRedirectError:function(){return l},getRedirectStatusCodeFromError:function(){return g},getRedirectTypeFromError:function(){return h},getURLFromRedirectError:function(){return p},isRedirectError:function(){return f},permanentRedirect:function(){return m},redirect:function(){return u}});const s=Vj,o=Gj,a=Kj,i="NEXT_REDIRECT";var c;(function(_){_.push="push",_.replace="replace"})(c||(c={}));function l(_,v,x){x===void 0&&(x=a.RedirectStatusCode.TemporaryRedirect);const C=new Error(i);C.digest=i+";"+v+";"+_+";"+x+";";const j=s.requestAsyncStorage.getStore();return j&&(C.mutableCookies=j.mutableCookies),C}function u(_,v){v===void 0&&(v="replace");const x=o.actionAsyncStorage.getStore();throw l(_,v,x!=null&&x.isAction?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.TemporaryRedirect)}function m(_,v){v===void 0&&(v="replace");const x=o.actionAsyncStorage.getStore();throw l(_,v,x!=null&&x.isAction?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.PermanentRedirect)}function f(_){if(typeof _!="object"||_===null||!("digest"in _)||typeof _.digest!="string")return!1;const[v,x,C,j]=_.digest.split(";",4),b=Number(j);return v===i&&(x==="replace"||x==="push")&&typeof C=="string"&&!isNaN(b)&&b in a.RedirectStatusCode}function p(_){return f(_)?_.digest.split(";",3)[2]:null}function h(_){if(!f(_))throw new Error("Not a redirect error");return _.digest.split(";",2)[1]}function g(_){if(!f(_))throw new Error("Not a redirect error");return Number(_.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)})(Jo,Jo.exports);var Qj=Jo.exports,oa={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}r(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)})(oa,oa.exports);var Xj=oa.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(c,l){for(var u in l)Object.defineProperty(c,u,{enumerable:!0,get:l[u]})}r(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=Qj,o=Xj;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)})(Yo,Yo.exports);var Yj=Yo.exports,Tp={};(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=jr._(y),o=s.default.createContext(null);function a(i){const c=(0,s.useContext)(o);c&&c(i)}})(Tp);var Zn={exports:{}},fo={},gc;function Jj(){return gc||(gc=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 r="BAILOUT_TO_CLIENT_SIDE_RENDERING";class s extends Error{constructor(i){super("Bail out to client-side rendering: "+i),this.reason=i,this.digest=r}}function o(a){return typeof a!="object"||a===null||!("digest"in a)?!1:a.digest===r}}(fo)),fo}var es={exports:{}},ts={exports:{}},_c;function Zj(){return _c||(_c=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return s}});const s=(0,Ja.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)}(ts,ts.exports)),ts.exports}var yc;function eC(){return yc||(yc=1,function(e,t){"TURBOPACK { transition: next-shared }";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return r.staticGenerationAsyncStorage}});const r=Zj();(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(es,es.exports)),es.exports}var vc;function tC(){return vc||(vc=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"bailoutToClientRendering",{enumerable:!0,get:function(){return o}});const r=Jj(),s=eC();function o(a){const i=s.staticGenerationAsyncStorage.getStore();if(!(i!=null&&i.forceStatic)&&i!=null&&i.isStaticGeneration)throw new r.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)}(Zn,Zn.exports)),Zn.exports}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(x,C){for(var j in C)Object.defineProperty(x,j,{enumerable:!0,get:C[j]})}r(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 f},useRouter:function(){return p},useSearchParams:function(){return m},useSelectedLayoutSegment:function(){return v},useSelectedLayoutSegments:function(){return _},useServerInsertedHTML:function(){return u.useServerInsertedHTML}});const s=y,o=Aa,a=Rp,i=Hj,c=Ta,l=Yj,u=Tp;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}=tC();j("useSearchParams()")}return C}function f(){return(0,s.useContext)(a.PathnameContext)}function p(){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 g(x,C,j,b){j===void 0&&(j=!0),b===void 0&&(b=[]);let w;if(j)w=x[1][C];else{const R=x[1];var S;w=(S=R.children)!=null?S:Object.values(R)[0]}if(!w)return b;const P=w[0],N=(0,i.getSegmentValue)(P);return!N||N.startsWith(c.PAGE_SEGMENT_KEY)?b:(b.push(N),g(w,C,!1,b))}function _(x){x===void 0&&(x="children");const C=(0,s.useContext)(o.LayoutRouterContext);return C?g(C.tree,x):null}function v(x){x===void 0&&(x="children");const C=_(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)})(Qo,Qo.exports);var rC=Qo.exports,xc=rC;function nC({accountName:e}){const{user:t}=Yr(),r=xc.usePathname(),s=xc.useSearchParams(),o=(t==null?void 0:t.sub)||(t==null?void 0:t.email),a=t==null?void 0:t.userId;return y.useEffect(()=>{o&&a?qj("CUSTOM_USER_INFO",{userId:a,userEmail:o,platform:"store",account:e}):console.warn("[DT] Usuário deslogado ou sessão carregando...")},[r,s,o,a]),null}const sC="_active_gk7mu_380",oC="_banner_gk7mu_655",aC="_container_gk7mu_689",iC="_slugs_gk7mu_703",cC="_root_gk7mu_785",lC="_otContainer_gk7mu_797",ar={active:sC,banner:oC,container:aC,slugs:iC,"content-page-modifier":"_content-page-modifier_gk7mu_741",root:cC,otContainer:lC};function uC({title:e,srcImages:t,children:r,className:s,...o}){const{isMobile:a}=oe(),i=a?t.mobile:t.desktop;return n.jsxs("div",{...o,className:d.helpers.classNameConcat(ar.banner,s),children:[n.jsx(Oe.Image,{src:i,alt:e,fill:!0}),r||n.jsx("h1",{children:e})]})}const aa=({children:e,className:t})=>n.jsx("div",{className:d.helpers.classNameConcat(ar.container,t),children:e});aa.displayName="Politicas.Container";const dC=({oneTrust:e})=>{const t=()=>{window.OneTrust&&window.OneTrust.NoticeApi&&window.OneTrust.NoticeApi.Initialized&&window.OneTrust.NoticeApi.Initialized.then(function(){window.OneTrust.NoticeApi.LoadNotices([e.policyScript])})};return y.useEffect(()=>{window.OneTrust&&t()},[]),n.jsxs(n.Fragment,{children:[n.jsx(Xa,{onLoad:t,id:"otprivacy-notice-script",src:"https://privacyportal-cdn.onetrust.com/privacy-notice-scripts/otnotice-1.0.min.js"}),n.jsx("div",{className:ar.otContainer,children:n.jsx("div",{id:"otnotice-container",children:n.jsx("div",{id:`otnotice-${e.policyId}`,className:"otnotice"})})})]})},bc={"card-image-wrapper":"_card-image-wrapper_10mul_1","card-image-container":"_card-image-container_10mul_9"},Ap=e=>{const{nextimage:t}=pe();return n.jsx(pt,{name:e.name,children:e.data.banners.map((r,s)=>n.jsx("div",{className:bc["card-image-wrapper"],children:n.jsx("div",{className:bc["card-image-container"],children:n.jsx(t,{src:r.image,alt:r.altImage?r.altImage:"Banner Coleção",width:500,height:600})})},s))})},fC="_embedLiveContainer_1ss0l_2",mC="_embedLivePlayer_1ss0l_7",jc={embedLiveContainer:fC,embedLivePlayer:mC},kp=({data:e,name:t})=>n.jsx(pt,{name:t,children:n.jsx("div",{className:jc.embedLiveContainer,children:n.jsx("div",{className:jc.embedLivePlayer,children:e.banner.videosrc?n.jsx(Oe.Video,{src:e.banner.videosrc??"",playsInline:!0,autoPlay:!0,loop:!0,muted:!0,title:"Live",controls:!0}):n.jsxs("div",{children:[n.jsx("iframe",{src:e.banner.embed_source??"",allow:"autoplay; fullscreen; picture-in-picture; loop;",title:"Live"}),n.jsx(Xa,{src:"https://player.vimeo.com/api/player.js",defer:!0,strategy:"lazyOnload"})]})})})}),ia={"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 pC(e,t){const{mediatorRef:r}=oe();y.useEffect(()=>r.current.subscribe(e,t),[e,t])}const Cc=({prevOnClick:e,nextOnClick:t,onBulletClick:r,currentPage:s,totalPages:o,position:a,hideControllers:i,left:c,isFirst:l,ICONS:u})=>{const[m,f]=y.useState("default");return pC("herobanner:change_controllers_variant",p=>{l&&f(p.includes("white")?"inverse":"default")}),n.jsxs(d.Carousel.Controller,{className:ia["carousel-controllers-modifier"],position:a??"absolute","data-hide-controllers":i,bottom:"16px",top:"unset",left:c,children:[n.jsxs(d.Carousel.Arrows,{className:ia["carrousel-arrows-display-controller"],children:[n.jsx(d.Button,{variant:"tertiary",onClick:e,adornment:{start:n.jsx(d.Icon,{name:u.arrow_left})},mode:m}),n.jsx(d.Button,{variant:"tertiary",onClick:t,adornment:{start:n.jsx(d.Icon,{name:u.arrow_right})},mode:m})]}),n.jsx(d.Carousel.Bullets,{page:s,total:o,onBulletClick:r,mode:m})]})},hC=({children:e,data:t,banner:r,...s})=>{const{mediatorRef:o}=oe();return t.data.first?n.jsx(vs,{observerOptions:{threshold:.51},stopOnIntersection:!1,callBackWhenVisible:()=>{o.current.publish("header:change_variant",r.headerVariant)},...s,children:e}):n.jsx(n.Fragment,{children:e})},Op=e=>{const{initialize:t,pagination:r,controller:s,itemsStyles:o}=d.Carousel.useCarousel({gap:e.data.config.gap,itemsPerPage:e.data.config.slidesPerView,direction:"row"}),a=y.useRef(void 0),i=y.useMemo(()=>km(e.data.config.controllerPosition??"dentro-inferior-centro"),[e]),c=y.useCallback(()=>{e.data.config.slideDuration&&r.totalPages>1&&(a.current=setInterval(()=>{s==null||s.nextPage()},e.data.config.slideDuration*1e3))},[s,e.data.config.slideDuration,r.totalPages]),l=y.useCallback(m=>{clearInterval(a.current),c(),m()},[c]),u=y.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:r.currentPage,totalPages:r.totalPages,position:i.position,hideControllers:((m=e.data.config)==null?void 0:m.hideControllers)??!1,left:i.left}},[r.currentPage,r.totalPages,i.position,e.data.config.hideControllers,l,s]);return y.useEffect(()=>(c(),()=>clearInterval(a.current)),[c]),n.jsx(pt,{name:e.name,children:n.jsxs(d.Carousel.Root,{innerRef:m=>{t(m)},className:d.helpers.classNameConcat(ia["custom-carousel"],e.data.config.fullWidth?"":"common-section"),"data-infinity-border":!0,style:{...e.data.config.marginTop!=="0px"&&{marginTop:`-${e.data.config.marginTop}`},...e.data.config.marginBottom!=="0px"&&{marginBottom:`-${e.data.config.marginBottom}`}},children:[i.shouldRender==="top"&&r.totalPages>1?n.jsx(Cc,{ICONS:e.ICONS,...u,isFirst:e.data.first}):n.jsx(n.Fragment,{}),n.jsx(d.Carousel.Body,{children:e==null?void 0:e.data.banners.map((m,f)=>n.jsx(d.Carousel.Item,{style:o,children:n.jsx(hC,{data:e,banner:m,children:n.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:f,componentIndex:e.data.componentIndex},creative:"banner-carousel",...e.data.first&&f===0&&{priority:!0}})})},`hero-banner-item-${f}`))}),i.shouldRender==="bottom"&&r.totalPages>1?n.jsx(Cc,{ICONS:e.ICONS,...u}):n.jsx(n.Fragment,{})]})})},Ir={"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"},Lp=({data:e,name:t,CONSTANTS:r})=>{var m;const{isMobile:s}=oe(),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 n.jsx(pt,{name:t,children:n.jsx(d.Utils.Column,{style:{width:o==="small"?"70%":"100%"},alignContent:"center",justifyContent:"center",alignItems:"center",children:n.jsxs(d.Carousel.Root,{innerRef:f=>{i(f)},className:d.helpers.classNameConcat(Ir["carousel-modifier"],"common-section"),children:[o==="medium"?n.jsxs(d.TextStructure.Root,{children:[r.ACTIVE_BENNEFITS_BAR_TITLE&&n.jsx(d.TextStructure.DivWrapper,{className:Ir["carousel-title-modifier"],children:n.jsx("h2",{className:"typography-style-body-lg",children:r.BENNEFITS_BAR_TITLE})}),s&&c.totalPages>1&&n.jsx(d.Carousel.Controller,{className:d.helpers.classNameConcat(Ir["row-controller-modifier"],r.ACTIVE_BENNEFITS_BAR_TITLE?Ir["title-on"]:void 0),children:n.jsxs(d.Carousel.Arrows,{children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.prevPage(),adornment:{start:n.jsx(d.Icon,{name:r.ICONS.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.nextPage(),adornment:{start:n.jsx(d.Icon,{name:r.ICONS.arrow_right})}})]})})]}):n.jsx(n.Fragment,{}),n.jsx(d.Carousel.Body,{children:e.bennefit.map((f,p)=>n.jsx(d.Carousel.Item,{className:Ir["card-modifier"],style:u,children:n.jsx(d.Card,{stroke:!0,padding:"small",children:n.jsx(d.TextStructure.Root,{layoutProps:{columnWrapper:{alignContent:"start",alignItems:"start",justifyContent:"start"},textRow:{alignContent:"center",alignItems:"center",justifyContent:"center"}},adornment:{[o==="medium"?"top":"start"]:n.jsx(d.Icon,{name:f.icon,size:o==="medium"?"medium":"small"})},children:n.jsxs(d.TextStructure.DivWrapper,{alignItems:"start",children:[n.jsx("h3",{className:"typography-style-body-md",children:f.title}),f.subtitle&&f.subtitle.length?n.jsx("p",{className:"typography-style-body-xs",children:f.subtitle}):n.jsx(n.Fragment,{})]})})})},`bennefit=${p}`))}),!s&&c.totalPages>1?n.jsxs(d.Carousel.Controller,{className:Ir["row-controller-modifier"],children:[n.jsxs(d.Carousel.Arrows,{children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.prevPage(),adornment:{start:n.jsx(d.Icon,{name:r.ICONS.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.nextPage(),adornment:{start:n.jsx(d.Icon,{name:r.ICONS.arrow_right})}})]}),n.jsx(d.Carousel.Bullets,{page:c.currentPage,total:c.totalPages,onBulletClick:f=>l==null?void 0:l.navigateTo(f)})]}):n.jsx(n.Fragment,{})]})})})},Mp=({data:{componentIndex:e,...t},name:r,CONSTANTS:s})=>n.jsx(pt,{name:r,children:n.jsx(Ya,{...t,CONSTANTS:s})}),Dp=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:r,className:s,name:o})=>n.jsx(pt,{name:o,children:n.jsx("div",{className:d.helpers.classNameConcat(Vo.textContentSection,s??""),style:e.borderTop?{borderTop:"none"}:void 0,children:n.jsx(Om,{data:e,ICONS:t,TEXTCONTENT_EXPANDED:r})})}),Sc={"accordion-modifier":"_accordion-modifier_1we16_1","accordion-body-modifier":"_accordion-body-modifier_1we16_7"},Fp=({data:e,id:t,ICONS:r,className:s,name:o})=>{var c;const[a,i]=y.useState([]);return n.jsx(pt,{name:o,children:n.jsxs(d.Utils.Column,{gap:"var(--gap-vertical-sm)",className:s??"",children:[e.titleAccordion?n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-sm","common-section"),style:{fontWeight:500},children:e.titleAccordion})})}):n.jsx(n.Fragment,{}),(c=e.accordions)==null?void 0:c.map((l,u)=>n.jsxs(d.Accordion.Wrapper,{className:Sc["accordion-modifier"],children:[n.jsx(d.Accordion.Header,{id:`${t}-text-accordion-${u}`,openIndicator:n.jsx(d.Icon,{name:r.arrow_down}),closeIndicator:n.jsx(d.Icon,{name:r.arrow_up}),startOpen:a.includes(u),onClick:()=>i(m=>m.includes(u)?m.filter(f=>f!==u):[...m,u]),children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h3",{className:"typography-style-body-md-strong",children:l.title}),l.subtitle&&l.subtitle.length?n.jsx("h2",{children:l.subtitle}):n.jsx(n.Fragment,{})]})})}),n.jsx(d.Accordion.Body,{children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:Sc["accordion-body-modifier"],children:n.jsx(bt.Editor,{editorKey:`${t}-editor-${u}`,blockRenderMap:ds,editorState:l.text?us(JSON.parse(l.text)):bt.EditorState.createEmpty(),onChange:()=>null})})})})]},`${t}-accordion-${u}-${a.includes(u)}`))]})})},zp=async e=>{const{type:t,storeId:r}=e,s=t==="collectionSearch"?`https://${r}.myvtex.com/_v/proxy/search/product`:`https://${r}.myvtex.com/_v/proxy/search/crosselling`,o=JSON.stringify(t==="collectionSearch"?{...e.params,facets:e.facets,term:e.term,forceUpdate:!1}:e.facets);return(await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:o}).then(i=>i.json()).then(i=>t==="collectionSearch"?i.data.products:i.products)).filter(i=>!!i.node.availability.status)},gC="_shelf__container_bi04n_10",Bp={shelf__container:gC},_C=({collectionSearch:e,title:t,CONSTANTS:r,searchModal:s})=>{const[o,a]=y.useState([]),{isMobile:i}=oe(),{ref:c,inView:l}=Fc.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:u}=le();return y.useEffect(()=>{if(!e)return;function m(){var f,p;zp({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)??r.ITEMS_DEFAULT_SORT},storeId:r.storeId}).then(h=>{a(h)})}m()},[e]),y.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:n.jsx("div",{ref:c,className:Bp.shelf__container,children:n.jsx(mn.Shelf,{title:t??"Você também pode gostar",itemsPerPage:s?{desktop:2,mobile:1.4}:{desktop:4.4,mobile:2.2},ICONS:r.ICONS,children:Array.isArray(o)&&o.map(({node:m},f)=>{const{availability:{status:p}}=m;return p?n.jsx(mn.Card,{item:m,isMobile:i,size:"medium",index:f,shelfTitle:t??"Você também pode gostar",CONSTANTS:r},m.id):null})})})},yC=({recommendationSearch:e,title:t,CONSTANTS:r})=>{const[s,o]=y.useState([]),{isMobile:a}=oe(),{ref:i,inView:c}=Fc.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:l}=le(),u=y.useMemo(()=>e?[{key:e.type,value:e.productId}]:[],[e]);return y.useEffect(()=>{if(!e)return;function m(){var f;zp({type:"recommendationSearch",facets:u,params:{count:((f=e==null?void 0:e.params)==null?void 0:f.count)??12,sort:r.ITEMS_DEFAULT_SORT},storeId:r.storeId}).then(p=>o(p))}m()},[u,e]),y.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"?n.jsx(Sd,{products:s,innerRef:i,inView:c,CONSTANTS:r}):n.jsx("div",{ref:i,className:Bp.shelf__container,children:n.jsx(mn.Shelf,{title:t??"Você também pode gostar",itemsPerPage:{desktop:4.4,mobile:2.2},ICONS:r.ICONS,children:Array.isArray(s)&&s.map(({node:m},f)=>{const{availability:{status:p}}=m;return p?n.jsx(mn.Card,{item:m,isMobile:a,size:"medium",index:f,shelfTitle:t??"Você também pode gostar",CONSTANTS:r},m.id):null})})})},Up=({data:e,name:t,CONSTANTS:r})=>{const{productId:s}=Pu();return!(e!=null&&e.productLists)||e.productLists.length===0?null:e.productLists.map((o,a)=>n.jsx(pt,{name:t,children:n.jsx(yC,{title:o.title,recommendationSearch:{type:o.product_group_option,productId:s,params:{count:o.number_of_items,sort:"score:desc"}},CONSTANTS:r},`shelf=${a}`)}))},qp=({data:e,CONSTANTS:t,searchModal:r,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 n.jsx(pt,{name:s,children:n.jsx(_C,{title:i.title,collectionSearch:{params:{count:i.number_of_items,sort:i.sort},...l},searchModal:r,CONSTANTS:t},`shelf=${c}`)})})},vC="_popup_5taxs_9",xC="_popup__overlay_5taxs_19",bC="_popup__modal_5taxs_27",rt={popup:vC,popup__overlay:xC,popup__modal:bC,"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"},jC=e=>n.jsx("div",{className:rt["popup__modal--success"],children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:e.ICONS.check_circle,size:"large"})},children:n.jsxs(d.TextStructure.DivWrapper,{className:rt["text-structure-modifier"],children:[n.jsx("h3",{className:"typography-style-body-sm-strong",children:e.successTitle}),n.jsx("p",{className:"typography-style-body-caption",children:e.successDescription})]})})}),CC=e=>{const{title:t,description:r,groups:s,ICONS:o}=e,{formErrors:a,submitForm:i,success:c}=Es(),[l,u]=y.useState(!1);return n.jsx("form",{onSubmit:i,className:rt.formContainer,children:n.jsxs("div",{className:rt["popup__modal--form"],children:[n.jsxs(d.TextStructure.DivWrapper,{className:rt["popup__modal--header"],children:[n.jsx("strong",{className:"typography-style-body-md-strong",children:t}),n.jsx("p",{className:"typography-style-body-xs",children:r})]}),c?n.jsx(jC,{...e}):n.jsxs(n.Fragment,{children:[s.map(m=>n.jsx(Lr.FieldGroup,{group:m,children:n.jsx(Lr.FieldWrapper,{fields:m.fields})},m.groupLabel)),n.jsx(d.Checkbox,{className:rt["popup__modal--checkbox"],adornment:n.jsx(d.Icon,{name:o.check,size:"small"}),name:"terms-and-conditions",label:"Li e aceito os termos de política de privacidade abaixo.",sizeVariant:"small",checked:l,onChange:()=>u(!l)}),n.jsxs("div",{children:[!l&&n.jsx(d.TextStructure.DivWrapper,{className:rt["popup__modal--status"],children:n.jsxs("p",{className:"typography-style-body-caption",children:[n.jsx(d.Icon,{size:"small",name:o.alert_circle}),Pg]})}),n.jsx(d.Button,{disabled:!l,size:"medium",type:"submit",children:Ng}),a.length?n.jsx(d.TextStructure.DivWrapper,{className:rt["popup__modal--status"],children:n.jsx("p",{className:d.helpers.classNameConcat(rt.formSubmitWarning,"typography-style-body-xs"),children:Eg})}):null]})]})]})})},Hp=({data:e,name:t,CONSTANTS:r})=>{const[s,o]=y.useState(!1),a=typeof window<"u"?window.sessionStorage.getItem(r.POPUP_TRACK_STORAGE)||window.localStorage.getItem(r.POPUP_SUBMITTED_STORAGE):null,i=()=>{o(!1),window.sessionStorage.setItem(r.POPUP_TRACK_STORAGE,"true")};return y.useEffect(()=>{setTimeout(()=>!a&&o(!0),2e3)},[]),e.active&&s?n.jsx(pt,{name:t,children:n.jsxs("div",{className:rt.popup,children:[n.jsx("div",{onClick:i,className:rt.popup__overlay}),n.jsxs("div",{className:rt.popup__modal,children:[n.jsx(d.Button,{onClick:i,variant:"tertiary",className:rt["popup__modal--close"],children:n.jsx(d.Icon,{style:{color:e.closeColor||"#000"},name:r.ICONS.close,size:"medium"})}),n.jsx("div",{children:n.jsx(Oe.Image,{src:e.imageUrl,width:"459",height:"418",alt:e.title})}),n.jsx(up,{...e,children:n.jsx(CC,{...e,ICONS:r.ICONS})})]})]})}):null},SC={"Image Grid":Ap,"Embed Live":kp,"Banner Carousel":Op,Banner:Ka,"Bennefits Bar":Lp,newsletter:Mp,TextContent:Dp,TextAccordion:Fp,"Product Carousel":qp,"PDP Product Carousel":Up,"Popup Modal":Hp},$p=({data:e,identifyWhoIsFirst:t=!1,componentConfigs:r})=>e==null?void 0:e.map((s,o)=>{const a=SC[s.name],i={...(r==null?void 0:r[s.name])??{}};return t&&o===0&&(s.data.first=!0),s.data.componentIndex=o,s.name==="TextAccordion"&&(i.id=`text-accordion-${o}`),a?n.jsx(a,{name:s.name,data:s.data,...i},`section-zone-component-${o}`):null});async function wC({slug:e,pageData:t,tabsData:r,oneTrust:s}){var c,l,u,m;const a=(r?[...r].sort((f,p)=>f.config.tabConfig.order-p.config.tabConfig.order):[]).map(f=>({slug:f.config.seo.slug||Do(f.config.tabConfig.title),title:f.config.tabConfig.title})),i=r==null?void 0:r.find(f=>f.config.seo.slug===`/${decodeURIComponent(e)}`);return i&&(i.id=Do(i.config.seo.slug||"")),n.jsxs("div",{className:ar.root,children:[n.jsx(aa,{children:n.jsx(uC,{title:(c=t==null?void 0:t.config.banners)==null?void 0:c.altImageBackgroud,srcImages:{desktop:(l=t==null?void 0:t.config.banners)==null?void 0:l.imageBackgroudDesk,mobile:(m=(u=t==null?void 0:t.config)==null?void 0:u.banners)==null?void 0:m.imageBackgroudMobile}})}),n.jsxs(aa,{children:[n.jsx("div",{className:ar.slugs,children:a.map(f=>n.jsx(Qe,{href:f.slug?`/politicas/${f.slug.replace(/^\/+/,"")}`:"#",className:f.slug===(i==null?void 0:i.id)?ar.active:"",title:f.title,scroll:!1,children:f.title},f.slug.replace(/^\/+/,"")))}),n.jsx("div",{className:ar["content-page-modifier"],children:e==="privacidade-e-seguranca"?n.jsx(dC,{oneTrust:s}):n.jsx($p,{data:(i==null?void 0:i.sections)??[]})})]})]})}const Tt={"banner-wrapper":"_banner-wrapper_jrphb_5","banner-image":"_banner-image_jrphb_15","banner-desktop":"_banner-desktop_jrphb_21","banner-mobile":"_banner-mobile_jrphb_24","text-wrapper":"_text-wrapper_jrphb_37","custom-row":"_custom-row_jrphb_53","text-area":"_text-area_jrphb_58","text-wrapper-modifier":"_text-wrapper-modifier_jrphb_68","text-area-modifier":"_text-area-modifier_jrphb_77"},Vp=({data:e,ERROR_TEMPLATE_RETURN_BUTTON:t})=>{const{router:r}=pe();return n.jsx("div",{children:n.jsxs(d.Banner.Container,{className:Tt["banner-wrapper"],children:[n.jsxs(d.Banner.ImageWrapper,{className:Tt["banner-image"],children:[n.jsx(Oe.Image,{className:Tt["banner-desktop"],alt:e.altImageBackgroud??e.imageBackgroudDesk,src:e.imageBackgroudDesk,width:1366,height:695,priority:!0}),n.jsx(Oe.Image,{className:Tt["banner-mobile"],alt:e.altImageBackgroud??e.imageBackgroudMobile,src:e.imageBackgroudMobile,width:375,height:755,priority:!0})]}),n.jsx(d.Banner.Slot,{className:d.helpers.classNameConcat(Tt["text-wrapper"],Tt["text-wrapper-modifier"]),margin:107,children:n.jsxs(d.TextStructure.Root,{layoutProps:{textRow:{className:Tt["custom-row"]}},children:[n.jsxs(d.TextStructure.DivWrapper,{className:d.helpers.classNameConcat(Tt["text-area"],Tt["text-area-modifier"]),children:[n.jsx("h1",{className:"typography-style-display-strong",children:e.title}),n.jsx("h2",{className:"typography-style-body-lg",children:e.subTitle}),n.jsx("p",{className:"typography-style-body-sm",children:e.description})]}),n.jsx(d.Button,{onClick:()=>r.push("/"),children:t})]})})]})})};Vp.displayName="ErrorTemplate";const PC={codVenderoda:"",orderformId:"",cupom:"",setCodVendedora:()=>null,setCupom:()=>null,setOrderformId:()=>null,setConfiguration:()=>null,update:()=>!1,isValidSharedCart:()=>!1},EC=y.createContext(PC);function NC(){return y.useContext(EC)}function mo(e,t=""){if(!e)return;if(!t)if(typeof window<"u")t=window.location.href;else return;e=e.replace(/[[\]]/g,"\\$&");const s=new RegExp(`[?&]${e}(=([^&#]*)|&|#|$)`).exec(t);return s?s[2]?decodeURIComponent(s[2].replace(/\+/g," ")):"":null}function po(){if(window){localStorage.getItem("cleverapp")&&(localStorage.removeItem("vendedora"),localStorage.removeItem("atendimento")),localStorage.getItem("atendimento")&&(localStorage.removeItem("vendedora"),localStorage.removeItem("televendas"));const{hostname:e,origin:t}=window.location;document.cookie=`checkout.vtex.com=;Domain=.${e};path=/;expires=Thu, 01-Jan-1970 00:00:01 GMT`,document.cookie=`checkout.vtex.com=;Domain=${e.replace("www","")};path=/;expires=Thu, 01-Jan-1970 00:00:01 GMT`,window.location.replace(`${t}`)}}const IC="_container_df1ql_11",ho={"action-button":"_action-button_df1ql_1",container:IC,"container-icon":"_container-icon_df1ql_31"};function RC({icon:e,text:t,onClick:r,isActive:s=!1}){const o=a=>{a.preventDefault(),s&&r()};return n.jsxs("div",{className:d.helpers.classNameConcat(ho["action-button"],s?"":"disable"),onClick:a=>o(a),children:[n.jsx("div",{className:d.helpers.classNameConcat(ho["container-icon"],s?"":"disable"),children:n.jsx("img",{src:e,alt:"icon"})}),n.jsxs("div",{className:d.helpers.classNameConcat(ho.container,s?"":"disable"),children:[n.jsx("span",{children:t}),n.jsx("img",{src:"/images/Widget_open/navigate_next-black-18dp.png",alt:"next"})]})]})}const TC="_container_k11me_1",AC="_header_k11me_18",kC="_body_k11me_45",Zr={container:TC,header:AC,body:kC,"copy-cart-button":"_copy-cart-button_k11me_78","reset-orderform-button":"_reset-orderform-button_k11me_110"};function OC(e,t=!1,r){const{base:s,orderformId:o}=e,a=r==null?void 0:r.split("codigo: ")[1],i=localStorage.getItem("maiscarrinho"),c={medium:t?"&utm_medium=carrinho_compartilhado":"&utm_medium=linkvendedor",campaign:`&utm_campaign=${encodeURIComponent(r??"")}`,cp:a?`&utmi_cp=${a}`:"",source:`&utm_source=${i}`};return t?`${s}/checkout/?orderFormId=${o}${c.source}${c.campaign}${c.cp}${c.medium}#/cart`:`${s}/checkout/?orderFormId=${o}${c.source}${c.campaign}${c.cp}${c.medium}#/payment`}function LC(e){const t=`https://mais-carrinho-dkwr66gouq-uc.a.run.app/url-shortner/${encodeURIComponent(e)}`;return fetch(t).then(r=>r.json()).then(r=>r.url.shortLink).catch(()=>e)}function wc({mode:e,config:t,newCart:r}){const[s,o]=y.useState(!1),[a,i]=y.useState(""),c=OC(t,e==="cart",t.sellerCode),{useClipboard:l}=is.hooks,[,u]=l();function m(){o(!0);const f=document.createElement("textArea");f.readOnly=!0,f.contentEditable="true",f.value=a,document.body.appendChild(f),f.select(),u(f.value),document.body.removeChild(f),setTimeout(()=>{o(!1)},3e3)}return y.useEffect(()=>{i(""),i("Gerando link..."),LC(c).then(f=>i(f)).catch(()=>i("Algo deu errado, tente novamente mais tarde"))},[c]),n.jsxs("div",{className:Zr.container,children:[n.jsxs("div",{className:Zr.header,children:[n.jsx("img",{src:e==="cart"?"/images/Modal_compartilhar_sacola/ico_sacola_big.png":"/images/Modal_compartilhar_editavel/ico_form_big.png",alt:"close"}),n.jsxs("span",{className:"text",children:[" ",e==="cart"?"Compartilhar a Sacola":"Compartilhar link para pagamento"]})]}),n.jsxs("div",{className:Zr.body,children:[n.jsx("p",{children:e==="cart"?`Envie a sacola para um ou mais clientes usando o link abaixo ou
|
|
19
|
+
compartilhe direto por whatsapp`:"Envie a sacola para um cliente usando o link abaixo ou compartilhe direto por whatsapp"}),n.jsxs("form",{children:[n.jsx("input",{type:"text",disabled:!0,value:a}),n.jsxs("div",{className:d.helpers.classNameConcat(Zr["copy-cart-button"],a?"active":""),children:[n.jsx("img",{src:"/images/Feedback_copiado/ico_share.png",alt:"share",className:"share",onClick:()=>a&&m()}),s&&n.jsx("div",{className:"share-input-copy-feedback",children:"Link Copiado"})]})]}),n.jsx("button",{className:Zr["reset-orderform-button"],onClick:()=>{yt.set(ns,{}),r()},children:"Novo Atendimento"})]})]})}const MC="_container_jla2u_1",DC="_header_jla2u_24",FC="_body_jla2u_56",en={container:MC,header:DC,"header-open":"_header-open_jla2u_29","close-btn":"_close-btn_jla2u_48",body:FC};var ht=(e=>(e.base="base",e.shareCart="shareCart",e.sharePayment="sharePayment",e))(ht||{});const Pc=({text:e,isActive:t,onClick:r,icon:s,iconDisabled:o})=>n.jsx(RC,{icon:t?s:o,text:t?e:"Preencha a sacola para compartilhar",onClick:r,isActive:t}),zC=({config:e,isshowing:t})=>{var S,P,N;const[r,s]=y.useState(!1),[o,a]=y.useState(""),{addCouponSeller:i,cartStore:c}=Pe(),[l,u]=y.useState(t??!1),{setOrderformId:m,update:f,isValidSharedCart:p,setConfiguration:h,setCodVendedora:g}=NC(),[_,v]=y.useState(ht.base),x=y.useMemo(()=>c,[c]),{marketingData:C}=is.stores.cart.useGetCartStoreState();y.useEffect(()=>{mo("cleverapp")==="true"&&(localStorage.setItem("maiscarrinho","cleverapp"),window.location.replace("/")),mo("televendas")==="true"&&(localStorage.setItem("maiscarrinho","televendas"),window.location.replace("/")),mo("vendedora")==="true"&&(localStorage.setItem("maiscarrinho","vendedora"),po())},[]),y.useEffect(()=>{var R,I,O,L,W;(R=x==null?void 0:x.openTextField)!=null&&R.value&&a(((I=x==null?void 0:x.openTextField)==null?void 0:I.value)??""),(O=x.openTextField)!=null&&O.value&&(g(String((L=x.openTextField)==null?void 0:L.value).split("codigo")[1]),i(String((W=x.openTextField)==null?void 0:W.value),"seller")),m(x.id),localStorage.getItem("maiscarrinho")&&u(!0)},[x.id,(S=x.openTextField)==null?void 0:S.value,g,m,i]);const j=()=>{h(e),v(ht.base),s(!r),m(x.id),setTimeout(()=>{p()&&f(x.id)},300)},{id:b}=is.stores.cart.useGetCartStoreState(),w=R=>{F.postMediaData({apiUrl:"/api/marketingData",body:{orderFormId:b,coupon:C==null?void 0:C.coupon,utmiCampaign:"codigodavendedora",utmSource:"widget",utmMedium:R===ht.sharePayment?"linkvendedor":"carrinho_compartilhado"}}),v(R)};return n.jsx(n.Fragment,{children:l&&n.jsxs("div",{className:d.helpers.classNameConcat(en.container,r?"open":""),children:[n.jsx("div",{className:d.helpers.classNameConcat(en.header,r?"open":""),onClick:j,children:r?n.jsxs("div",{className:en["header-open"],children:[n.jsx("div",{className:en["close-btn"],children:n.jsx("img",{src:"/images/Widget_open/close_grey_24x24.png",alt:"close",width:30,height:30})}),n.jsx("img",{src:"/images/Widget_compacto/ico_vendedora_big.png",alt:"close",width:30,height:30}),n.jsx("span",{className:"text",children:"Vendedor"})]}):n.jsx("img",{src:"/images/Widget_compacto/ico_vendedora_big.png",alt:"logo",width:30,height:30})}),r&&n.jsx("div",{className:en.body,children:n.jsxs(n.Fragment,{children:[_===ht.base&&n.jsxs(n.Fragment,{children:[n.jsx(Pc,{icon:"/images/Modal_compartilhar_sacola/ico_sacola_big.png",iconDisabled:"/images/Widget_open/ico_sacola_disabled.png",text:"Compartilhar a Sacola",onClick:()=>w(ht.shareCart),isActive:x.items.length>0&&!!((P=x==null?void 0:x.openTextField)!=null&&P.value)}),n.jsx(Pc,{icon:"/images/Modal_compartilhar_editavel/ico_form_big.png",iconDisabled:"/images/Widget_open_disabled/ico_form_disabled.png",text:"Compartilhar link para pagamento",onClick:()=>w(ht.sharePayment),isActive:x.items.length>0&&!!((N=x.openTextField)!=null&&N.value)})]}),_===ht.shareCart&&n.jsx(wc,{mode:"cart",config:{...e,sellerCode:o,orderformId:x.id},newCart:()=>{po(),v(ht.base)}}),_===ht.sharePayment&&n.jsx(wc,{mode:"payment",config:{...e,sellerCode:o,orderformId:x.id},newCart:()=>{po(),v(ht.base)}})]})})]})})},vr={teamComponents:{AddToCart:Ra,BackToTop:a_,HelpButton:Hb,BuyPackage:Sd,Filter:{...Lt,helpers:Uf},...qv,FreightCalculation:Rf,Header:If,Link:Qe,Media:Oe,PLPNavigation:Yt,ProductCard:ve,ProductList:nt,ProductVariationList:jt,Sort:js,UserMenu:xs,Newsletter:Ya,Form:Lr,Table:rs},template:{minicart:Je,pdc:Qm,pdc_composites:xt,pdp:Yx,searchResult:tp,wishList:ld,LPCadastro:ij,SearchModal:pp,LPStores:Nt,tracker:nC,Politicas:wC,ErrorTemplate:Vp,WidgetVendedora:zC},utils:{EventCollector:Ib,ExternalScripts:Ob,LinkOrNotLink:Nn,ObserverWrapper:vs,SnackBarComponent:Or,DraftJsLinkWrapper:Am}},BC=(e,t)=>{const r=e.map(o=>`'${o.source}'`).join(`,
|
|
20
20
|
`);return`
|
|
21
21
|
import type { NextRequest } from 'next/server'
|
|
22
22
|
import { NextResponse } from 'next/server'
|
|
@@ -56,4 +56,4 @@ See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-comp
|
|
|
56
56
|
${r}
|
|
57
57
|
]
|
|
58
58
|
}
|
|
59
|
-
`},mv=Object.freeze(Object.defineProperty({__proto__:null,generateMiddleware:dv},Symbol.toStringTag,{value:"Module"})),pv={helpers:mv},fv={Banner:io},dm=g.createContext({}),hv=({data:e,children:t,...r})=>{var _,y,x,v,C,j,b,w,S,P,N,R,k;const[s,a]=g.useState(!0),{initialize:o,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:(v=(x=e==null?void 0:e.staticConfig)==null?void 0:x.staticConfig)==null?void 0:v.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:((R=(N=e==null?void 0:e.content)==null?void 0:N.content)==null?void 0:R.items)??[]},u=(k=l.content)==null?void 0:k.filter(O=>!O.countDownEndDate||new Date(O.countDownEndDate)>new Date),m=u.length>1,p={...l.backgroundColor?{backgroundColor:l.backgroundColor}:{}},f=()=>{a(!1)},h=d.helpers.ValidateProp({fieldTypes:Ot.Mode,property:l.textColorVariant,fallback:"default"});return n.jsx(dm.Provider,{value:{isOpen:s,setIsOpen:a,hasCarousel:m,backgroundStyle:p,handleCloseTipbar:f,mode:h,slideTranstionTimer:l.slideTranstionTimer,showCarouselArrows:l.showCarouselArrows,hasCloseBtn:l.hasCloseBtn,slices:u,carouselProps:{initialize:o,controller:i,itemsStyles:c},...r},children:t})},ut=()=>g.useContext(dm),_v=({dateEnd:e,...t})=>{const{CONSTANTS:{TIME_ZONE:r}}=ut();return n.jsx(zn,{dateEnd:new Date(e),TIME_ZONE:r,...t})},gv="_tipbar_bt3p0_1",yv="_tipbar__carousel_bt3p0_15",un={tipbar:gv,tipbar__carousel:yv,"tipbar__close-btn":"_tipbar__close-btn_bt3p0_29","tipbar-item":"_tipbar-item_bt3p0_37","tipbar-item__coupon":"_tipbar-item__coupon_bt3p0_45"},xv=({coupon:e,feedbackTitle:t,feedbackDescription:r,...s})=>{const{CONSTANTS:a}=ut(),{addCouponSeller:o,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 o(e,"coupon")).code===200?l({status:!0,showSnackBar:!0}):m(!0)};return g.useEffect(()=>{c.showSnackBar&&setTimeout(()=>{l(_=>({..._,showSnackBar:!1}))},a.TIPBAR_CONFIGS.snackbar_timeout)},[c.showSnackBar]),g.useEffect(()=>{u&&setTimeout(()=>{m(!1)},a.TIPBAR_CONFIGS.snackbar_timeout)},[u]),g.useEffect(()=>{p&&setTimeout(()=>{f(!1)},a.TIPBAR_CONFIGS.snackbar_timeout)},[p]),n.jsxs(n.Fragment,{children:[n.jsx(d.Button,{...s,onClick:h,disabled:c.status,className:un["tipbar-item__coupon"],children:c.status?`${a.TIPBAR_CONFIGS.coupon_applied_message}`:`${a.TIPBAR_CONFIGS.coupon_default_message}`}),c.showSnackBar&&(t||r)&&n.jsx(Lt,{title:t,subtitle:r,Z_INDEX_WAR:a.Z_INDEX_WAR},`feedback-coupon-${e}`),u&&n.jsx(Lt,{title:a.TIPBAR_CONFIGS.coupon_error_title,subtitle:a.TIPBAR_CONFIGS.coupon_error_message,Z_INDEX_WAR:a.Z_INDEX_WAR},`error-coupon-${e}`),p&&n.jsx(Lt,{title:a.TIPBAR_CONFIGS.coupon_cart_empty_title,subtitle:a.TIPBAR_CONFIGS.coupon_cart_empty_message,Z_INDEX_WAR:a.Z_INDEX_WAR},`error-cart-empty-${e}`)]})},vv=({title:e,description:t,style:r,mode:s,className:a})=>n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{mode:s,className:a,children:[e&&n.jsx("h3",{className:"typography-style-body-sm",style:r,children:e}),t&&n.jsx("p",{className:"typography-style-caption",style:r,children:t})]})}),bv=({coupon:e,...t})=>{const{CONSTANTS:r}=ut();return n.jsx(d.Copy,{...t,iconCopy:r.ICONS.copy,iconSuccess:r.ICONS.check,children:e})},jv=({staticZone:e,type:t,className:r,description:s,title:a})=>{const{mode:o}=ut();if(t==="countdown")return n.jsx(_v,{dateEnd:e.countDownEndDate,size:"x-small",mode:o});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?n.jsx(xv,{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?n.jsx(bv,{coupon:e.coupon,mode:i}):null}return n.jsx(vv,{title:a,description:s,mode:o,className:r})},Aa=({handleCloseTipbar:e,mode:t})=>{const{CONSTANTS:r}=ut();return n.jsx(d.Button,{title:"fechar tipbar",className:un["tipbar__close-btn"],onClick:e,variant:"tertiary",mode:t,adornment:{start:n.jsx(d.Icon,{name:r.ICONS.close})}})},Cv=({children:e,mode:t="default",showCarouselArrows:r=!0,slideTranstionTimer:s})=>{const{carouselProps:a,CONSTANTS:o}=ut(),i=g.useRef(null),c=(u,m)=>{var p,f;u.stopPropagation(),u.preventDefault(),m==="prev"?(p=a.controller)==null||p.prevPage():(f=a.controller)==null||f.nextPage(),i.current&&(clearInterval(i.current),l())},l=g.useCallback(()=>{if(s&&a.controller){const u=setInterval(()=>{var m;(m=a.controller)==null||m.nextPage()},s);i.current=u}},[s,a]);return g.useEffect(()=>(l(),()=>{i.current&&clearInterval(i.current)}),[s,l]),n.jsxs(d.Carousel.Root,{innerRef:u=>{a.initialize(u)},className:un.tipbar__carousel,style:{flexDirection:"row",alignItems:"center"},children:[r&&n.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"prev"),adornment:{start:n.jsx(d.Icon,{name:o.ICONS.arrow_left})}}),n.jsx(d.Carousel.Body,{children:e}),r&&n.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"next"),adornment:{start:n.jsx(d.Icon,{name:o.ICONS.arrow_right})}})]})},Sv=({children:e,className:t})=>{const{hasCarousel:r,mode:s,hasCloseBtn:a,backgroundStyle:o,showCarouselArrows:i,slideTranstionTimer:c,handleCloseTipbar:l}=ut(),u=r&&i;return n.jsx("div",{style:o,"data-hasclosebtn":a,className:d.helpers.classNameConcat(un.tipbar,t),children:r?n.jsxs(n.Fragment,{children:[n.jsx(Cv,{mode:s,showCarouselArrows:u,slideTranstionTimer:c,children:e}),a&&n.jsx(Aa,{handleCloseTipbar:l,showCarouselArrows:u,mode:s})]}):n.jsxs(n.Fragment,{children:[e,a&&n.jsx(Aa,{handleCloseTipbar:l,mode:s})]})})},Pv=({children:e,highlightFirstSection:t,...r})=>{const{hasCarousel:s,carouselProps:a}=ut(),o=n.jsx("div",{...r,className:un["tipbar-item"],children:e});return s?n.jsx(d.Carousel.Item,{style:a.itemsStyles,children:o}):o},mm=({className:e})=>{const{isOpen:t,slices:r}=ut();return r.length&&t?n.jsx(Sv,{children:r.map((s,a)=>{var o;return n.jsx(n.Fragment,{children:n.jsx(an,{href:s.link,children:n.jsx(Pv,{highlightFirstSection:s.highlightFirstSection,"data-justifyhighlightedsection":s.horizontalAlignHighlightedSection?s.horizontalAlignHighlightedSection:"center",children:s&&((o=s==null?void 0:s.items)!=null&&o.length)?s.items.map((i,c)=>n.jsx(jv,{staticZone:s,type:i.type,title:i.title,description:i.description,className:e},`tipbar-slice-field-${c}`)):null})})},`tipbar-slice-${a}`)})}):null};mm.displayName="TipBar.Root";const Ps=({className:e,...t})=>n.jsx(hv,{...t,children:n.jsx(mm,{className:e})});Ps.displayName="TipBar";const wv=({CONSTANTS:e,data:t})=>{const{pathname:r}=ce(),{tipbarRef:s}=Ne(),a=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(r))});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)}))},o=a("desktop"),i=a("mobile");return n.jsxs("div",{ref:s,className:T.responsive["responsive-flex"],children:[i&&n.jsx("div",{className:T.responsive["responsive-mobile-flex"],children:n.jsx(Ps,{data:i,CONSTANTS:e})}),o&&n.jsx("div",{className:T.responsive["responsive-desktop-flex"],children:n.jsx(Ps,{data:o,CONSTANTS:e})})]})},Nv=({SectionZone:e,name:t,previewId:r})=>{const[s,a]=g.useState();return g.useEffect(()=>{s||T.fetchContentType("search",{name:t,previewId:r}).then(o=>{o!=null&&o.data&&Array.isArray(o.data)&&a(o.data[0])})},[]),n.jsx(e,{data:s??[]})},Ev=e=>{const t=Tv(Rv(e));return Iv(t)},Iv=e=>{const t=[];for(const r in e)t.push(...e[r]);return t},Rv=e=>!e||!Array.isArray(e)?{}:e==null?void 0:e.reduce((t,r)=>{if(r!=null&&r.cidade){let s=t[r==null?void 0:r.cidade];s===void 0&&(s=t[r==null?void 0:r.cidade]=[]),s.push(r)}return t},{}),Tv=e=>{if(!e||!Object.keys(e).length)return{};const t=Object.keys(e).sort((s,a)=>s.localeCompare(a)),r={};for(const s of t)r[s]=e[s];return r},Av=({content:e,data:t,showVendor:r,ICONS:s,entity:a,LPLOJAS_TEMPLATE_RETURN_BUTTON:o})=>{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:a,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(Ev(m))}catch(u){console.error(u)}})()},[a]),!Array.isArray(t)||!t.length?null:n.jsxs(rt.Root,{data:i,children:[n.jsx(rt.Title,{children:e.titlePage}),n.jsx(rt.Section,{imgSrcDesk:e.imageBackgroundDesk,imgSrcMob:e.imageBackgroundMob,imgAlt:e.altImageBackgroud,children:n.jsx(rt.Content,{showVendor:r,ICONS:s,LPLOJAS_TEMPLATE_RETURN_BUTTON:o})})]})},kv=({data:e,children:t,SectionZone:r,responsive:s,COMMON_PAGE_COLUMN_GAP:a})=>{var p,f;const o=((p=e==null?void 0:e.filter(h=>h.config.responsive.deviceType==="mobile")[0])==null?void 0:p.sections)||[],i=((f=e==null?void 0:e.filter(h=>h.config.responsive.deviceType==="desktop")[0])==null?void 0:f.sections)||[],c=o.slice(0,1),l=o.slice(1,o.length),u=i.slice(0,1),m=i.slice(1,i.length);return n.jsxs(n.Fragment,{children:[n.jsxs(d.Utils.Column,{className:d.helpers.classNameConcat(s["responsive-mobile-flex"],"utils-column-modifier"),children:[n.jsx(r,{data:c??[]}),n.jsxs(d.Utils.Column,{gap:a,children:[t,n.jsx(r,{data:l??[]})]})]}),n.jsxs(d.Utils.Column,{className:d.helpers.classNameConcat(s["responsive-desktop-flex"],"utils-column-modifier"),children:[n.jsx(r,{data:u??[]}),n.jsxs(d.Utils.Column,{gap:a,children:[t,n.jsx(r,{data:m??[]})]})]})]})},Ov={Banner:fv,BannerSection:cn,BennefitsBarSection:em,SingleBannerSection:io,TextContentSection:nm,BannerCarousel:Jd,TextAccordionSection:rm,TipbarScreening:wv,ImageGrid:Qd,SearchPageScreening:T.SearchPageScreening,SearchContent:Nv,NewsletterSection:tm,PDPProductCarousel:am,ProductCarousel:im,EmbedLive:Zd,PopupModalSection:cm,SectionZone:lm,LPStoresClientWrapper:Av,WishlistScreening:kv},Lv={Components:Ov,helpers:Og};exports.configureFetchProxy=T.configureFetchProxy;exports.fetchProxy=T.fetchProxy;exports.proxyCartAPI=T.proxyCartAPI;exports.cms=Lv;exports.contexts=Zt;exports.data=Gs;exports.layout=Ln;exports.scripts=pv;
|
|
59
|
+
`},UC=Object.freeze(Object.defineProperty({__proto__:null,generateMiddleware:BC},Symbol.toStringTag,{value:"Module"})),qC={helpers:UC},HC={Banner:Ka},Wp=y.createContext({}),$C=({data:e,children:t,...r})=>{var g,_,v,x,C,j,b,w,S,P,N,R,I;const[s,o]=y.useState(!0),{initialize:a,controller:i,itemsStyles:c}=d.Carousel.useCarousel({gap:0,itemsPerPage:1}),l={slideTranstionTimer:(_=(g=e==null?void 0:e.staticConfig)==null?void 0:g.staticConfig)==null?void 0:_.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:((R=(N=e==null?void 0:e.content)==null?void 0:N.content)==null?void 0:R.items)??[]},u=(I=l.content)==null?void 0:I.filter(O=>!O.countDownEndDate||new Date(O.countDownEndDate)>new Date),m=u.length>1,f={...l.backgroundColor?{backgroundColor:l.backgroundColor}:{}},p=()=>{o(!1)},h=d.helpers.ValidateProp({fieldTypes:kr.Mode,property:l.textColorVariant,fallback:"default"});return n.jsx(Wp.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},...r},children:t})},Dt=()=>y.useContext(Wp),VC=({dateEnd:e,...t})=>{const{CONSTANTS:{TIME_ZONE:r}}=Dt();return n.jsx(ls,{dateEnd:new Date(e),TIME_ZONE:r,...t})},WC="_tipbar_bt3p0_1",GC="_tipbar__carousel_bt3p0_15",An={tipbar:WC,tipbar__carousel:GC,"tipbar__close-btn":"_tipbar__close-btn_bt3p0_29","tipbar-item":"_tipbar-item_bt3p0_37","tipbar-item__coupon":"_tipbar-item__coupon_bt3p0_45"},KC=({coupon:e,feedbackTitle:t,feedbackDescription:r,...s})=>{const{CONSTANTS:o}=Dt(),{addCouponSeller:a,cartStore:i}=Pe(),[c,l]=y.useState({status:!1,showSnackBar:!1}),[u,m]=y.useState(!1),[f,p]=y.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 y.useEffect(()=>{c.showSnackBar&&setTimeout(()=>{l(g=>({...g,showSnackBar:!1}))},o.TIPBAR_CONFIGS.snackbar_timeout)},[c.showSnackBar]),y.useEffect(()=>{u&&setTimeout(()=>{m(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[u]),y.useEffect(()=>{f&&setTimeout(()=>{p(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[f]),n.jsxs(n.Fragment,{children:[n.jsx(d.Button,{...s,onClick:h,disabled:c.status,className:An["tipbar-item__coupon"],children:c.status?`${o.TIPBAR_CONFIGS.coupon_applied_message}`:`${o.TIPBAR_CONFIGS.coupon_default_message}`}),c.showSnackBar&&(t||r)&&n.jsx(Or,{title:t,subtitle:r,Z_INDEX_WAR:o.Z_INDEX_WAR},`feedback-coupon-${e}`),u&&n.jsx(Or,{title:o.TIPBAR_CONFIGS.coupon_error_title,subtitle:o.TIPBAR_CONFIGS.coupon_error_message,Z_INDEX_WAR:o.Z_INDEX_WAR},`error-coupon-${e}`),f&&n.jsx(Or,{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}`)]})},QC=({title:e,description:t,style:r,mode:s,className:o})=>n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{mode:s,className:o,children:[e&&n.jsx("h3",{className:"typography-style-body-sm",style:r,children:e}),t&&n.jsx("p",{className:"typography-style-caption",style:r,children:t})]})}),XC=({coupon:e,...t})=>{const{CONSTANTS:r}=Dt();return n.jsx(d.Copy,{...t,iconCopy:r.ICONS.copy,iconSuccess:r.ICONS.check,children:e})},YC=({staticZone:e,type:t,className:r,description:s,title:o})=>{const{mode:a}=Dt();if(t==="countdown")return n.jsx(VC,{dateEnd:e.countDownEndDate,size:"x-small",mode:a});if(t==="coupon"){const i=d.helpers.ValidateProp({fieldTypes:kr.Mode,property:e.couponButtonMode,fallback:"default"}),c=d.helpers.ValidateProp({fieldTypes:kr.VariantsExtended,property:e.couponButtonVariant,fallback:"primary"});return e.coupon?n.jsx(KC,{coupon:e.coupon,mode:i,variant:c,feedbackTitle:e.couponFeedbackTitle,feedbackDescription:e.couponFeedbackDescription}):null}if(t==="copy"){const i=d.helpers.ValidateProp({fieldTypes:kr.Mode,property:e.couponButtonMode,fallback:"default"});return e.coupon?n.jsx(XC,{coupon:e.coupon,mode:i}):null}return n.jsx(QC,{title:o,description:s,mode:a,className:r})},Ec=({handleCloseTipbar:e,mode:t})=>{const{CONSTANTS:r}=Dt();return n.jsx(d.Button,{title:"fechar tipbar",className:An["tipbar__close-btn"],onClick:e,variant:"tertiary",mode:t,adornment:{start:n.jsx(d.Icon,{name:r.ICONS.close})}})},JC=({children:e,mode:t="default",showCarouselArrows:r=!0,slideTranstionTimer:s})=>{const{carouselProps:o,CONSTANTS:a}=Dt(),i=y.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=y.useCallback(()=>{if(s&&o.controller){const u=setInterval(()=>{var m;(m=o.controller)==null||m.nextPage()},s);i.current=u}},[s,o]);return y.useEffect(()=>(l(),()=>{i.current&&clearInterval(i.current)}),[s,l]),n.jsxs(d.Carousel.Root,{innerRef:u=>{o.initialize(u)},className:An.tipbar__carousel,style:{flexDirection:"row",alignItems:"center"},children:[r&&n.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"prev"),adornment:{start:n.jsx(d.Icon,{name:a.ICONS.arrow_left})}}),n.jsx(d.Carousel.Body,{children:e}),r&&n.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"next"),adornment:{start:n.jsx(d.Icon,{name:a.ICONS.arrow_right})}})]})},ZC=({children:e,className:t})=>{const{hasCarousel:r,mode:s,hasCloseBtn:o,backgroundStyle:a,showCarouselArrows:i,slideTranstionTimer:c,handleCloseTipbar:l}=Dt(),u=r&&i;return n.jsx("div",{style:a,"data-hasclosebtn":o,className:d.helpers.classNameConcat(An.tipbar,t),children:r?n.jsxs(n.Fragment,{children:[n.jsx(JC,{mode:s,showCarouselArrows:u,slideTranstionTimer:c,children:e}),o&&n.jsx(Ec,{handleCloseTipbar:l,showCarouselArrows:u,mode:s})]}):n.jsxs(n.Fragment,{children:[e,o&&n.jsx(Ec,{handleCloseTipbar:l,mode:s})]})})},eS=({children:e,highlightFirstSection:t,...r})=>{const{hasCarousel:s,carouselProps:o}=Dt(),a=n.jsx("div",{...r,className:An["tipbar-item"],children:e});return s?n.jsx(d.Carousel.Item,{style:o.itemsStyles,children:a}):a},Gp=({className:e})=>{const{isOpen:t,slices:r}=Dt();return r.length&&t?n.jsx(ZC,{children:r.map((s,o)=>{var a;return n.jsx(n.Fragment,{children:n.jsx(Nn,{href:s.link,children:n.jsx(eS,{highlightFirstSection:s.highlightFirstSection,"data-justifyhighlightedsection":s.horizontalAlignHighlightedSection?s.horizontalAlignHighlightedSection:"center",children:s&&((a=s==null?void 0:s.items)!=null&&a.length)?s.items.map((i,c)=>n.jsx(YC,{staticZone:s,type:i.type,title:i.title,description:i.description,className:e},`tipbar-slice-field-${c}`)):null})})},`tipbar-slice-${o}`)})}):null};Gp.displayName="TipBar.Root";const ca=({className:e,...t})=>n.jsx($C,{...t,children:n.jsx(Gp,{className:e})});ca.displayName="TipBar";const tS=({CONSTANTS:e,data:t})=>{const{pathname:r}=pe(),{tipbarRef:s}=Ee(),o=c=>{const l=t==null?void 0:t.find(u=>{var m,f,p,h,g;return((f=(m=u.staticConfig)==null?void 0:m.staticConfig)==null?void 0:f.deviceType)===c&&((g=(h=(p=u.staticConfig)==null?void 0:p.staticConfig)==null?void 0:h.paths)==null?void 0:g.includes(r))});return l||(t==null?void 0:t.find(u=>{var m,f,p,h,g,_;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)||((_=(g=u.staticConfig)==null?void 0:g.staticConfig)==null?void 0:_.paths.length)===0)}))},a=o("desktop"),i=o("mobile");return n.jsxs("div",{ref:s,className:F.responsive["responsive-flex"],children:[i&&n.jsx("div",{className:F.responsive["responsive-mobile-flex"],children:n.jsx(ca,{data:i,CONSTANTS:e})}),a&&n.jsx("div",{className:F.responsive["responsive-desktop-flex"],children:n.jsx(ca,{data:a,CONSTANTS:e})})]})},rS=({SectionZone:e,name:t,storeId:r,previewId:s})=>{const[o,a]=y.useState();return y.useEffect(()=>{o||F.fetchContentType("search",{name:t,storeId:r,previewId:s}).then(i=>{i!=null&&i.data&&Array.isArray(i.data)&&a(i.data[0])})},[]),n.jsx(e,{data:o??[]})},nS=e=>{const t=aS(oS(e));return sS(t)},sS=e=>{const t=[];for(const r in e)t.push(...e[r]);return t},oS=e=>!e||!Array.isArray(e)?{}:e==null?void 0:e.reduce((t,r)=>{if(r!=null&&r.cidade){let s=t[r==null?void 0:r.cidade];s===void 0&&(s=t[r==null?void 0:r.cidade]=[]),s.push(r)}return t},{}),aS=e=>{if(!e||!Object.keys(e).length)return{};const t=Object.keys(e).sort((s,o)=>s.localeCompare(o)),r={};for(const s of t)r[s]=e[s];return r},iS=({content:e,data:t,showVendor:r,ICONS:s,entity:o,LPLOJAS_TEMPLATE_RETURN_BUTTON:a})=>{const[i,c]=y.useState([]);return y.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(nS(m))}catch(u){console.error(u)}})()},[o]),!Array.isArray(t)||!t.length?null:n.jsxs(Nt.Root,{data:i,children:[n.jsx(Nt.Title,{children:e.titlePage}),n.jsx(Nt.Section,{imgSrcDesk:e.imageBackgroundDesk,imgSrcMob:e.imageBackgroundMob,imgAlt:e.altImageBackgroud,children:n.jsx(Nt.Content,{showVendor:r,ICONS:s,LPLOJAS_TEMPLATE_RETURN_BUTTON:a})})]})},cS=({data:e,children:t,SectionZone:r,responsive:s,COMMON_PAGE_COLUMN_GAP:o})=>{var f,p;const a=((f=e==null?void 0:e.filter(h=>h.config.responsive.deviceType==="mobile")[0])==null?void 0:f.sections)||[],i=((p=e==null?void 0:e.filter(h=>h.config.responsive.deviceType==="desktop")[0])==null?void 0:p.sections)||[],c=a.slice(0,1),l=a.slice(1,a.length),u=i.slice(0,1),m=i.slice(1,i.length);return n.jsxs(n.Fragment,{children:[n.jsxs(d.Utils.Column,{className:d.helpers.classNameConcat(s["responsive-mobile-flex"],"utils-column-modifier"),children:[n.jsx(r,{data:c??[]}),n.jsxs(d.Utils.Column,{gap:o,children:[t,n.jsx(r,{data:l??[]})]})]}),n.jsxs(d.Utils.Column,{className:d.helpers.classNameConcat(s["responsive-desktop-flex"],"utils-column-modifier"),children:[n.jsx(r,{data:u??[]}),n.jsxs(d.Utils.Column,{gap:o,children:[t,n.jsx(r,{data:m??[]})]})]})]})},lS={Banner:HC,BannerSection:Rn,BennefitsBarSection:Lp,SingleBannerSection:Ka,TextContentSection:Dp,BannerCarousel:Op,TextAccordionSection:Fp,TipbarScreening:tS,ImageGrid:Ap,SearchPageScreening:F.SearchPageScreening,SearchContent:rS,NewsletterSection:Mp,PDPProductCarousel:Up,ProductCarousel:qp,EmbedLive:kp,PopupModalSection:Hp,SectionZone:$p,LPStoresClientWrapper:iS,WishlistScreening:cS},uS={Components:lS,helpers:ab};exports.cms=uS;exports.contexts=is;exports.data=Ia;exports.layout=vr;exports.scripts=qC;
|