@soma-vertical-web/multi-lib 1.0.39 → 1.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +13 -13
- package/index.mjs +2203 -2201
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";var _y=Object.defineProperty;var Gl=e=>{throw TypeError(e)};var gy=(e,t,r)=>t in e?_y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Gr=(e,t,r)=>gy(e,typeof t!="symbol"?t+"":t,r),Oi=(e,t,r)=>t.has(e)||Gl("Cannot "+r);var k=(e,t,r)=>(Oi(e,t,"read from private field"),r?r.call(e):t.get(e)),ye=(e,t,r)=>t.has(e)?Gl("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ue=(e,t,r,n)=>(Oi(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Re=(e,t,r)=>(Oi(e,t,"access private method"),r);var ro=(e,t,r,n)=>({set _(o){ue(e,t,o,r)},get _(){return k(e,t,n)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),j=require("react"),U=require("./index-HEA7MkPc.js"),Zt=require("idb-keyval"),yn=require("zustand"),Ao=require("js-cookie"),p=require("@soma-vertical-web/core-components"),Ln=require("axios"),xa=require("@date-fns/tz");require("jose");const Dn=require("@soma-vertical-web/foundations"),lc=require("react-dom"),ln=require("draft-js"),zd=require("react-intersection-observer");function yy(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Ht=yy(j),uc=j.createContext({}),vy=({data:e,children:t})=>s.jsx(uc.Provider,{value:{tags:e==null?void 0:e.config},children:t}),jr=()=>{const{tags:e}=j.useContext(uc),t=j.useCallback(r=>{var l,u,d,h;const n=(u=(l=e==null?void 0:e.commercial)==null?void 0:l.items)==null?void 0:u.find(m=>{var _;return(_=r??[])==null?void 0:_.find(g=>g.id===m.key)}),o=(h=(d=e==null?void 0:e.institucional)==null?void 0:d.items)==null?void 0:h.find(m=>{var _;return(_=r??[])==null?void 0:_.find(g=>g.id===m.key)}),i=e==null?void 0:e.flagPdp,c=(r==null?void 0:r.find(m=>{var _;return m.id===((_=e==null?void 0:e.flagGoldenPdp)==null?void 0:_.key)}))&&(e==null?void 0:e.flagGoldenPdp);return{commercial:n,institucional:o,flagPdp:i,flagGoldenPdp:c}},[e]);return{tags:e,getAvailableProductTag:t}},qd=({gridScrollBack:e})=>{j.useEffect(()=>{typeof window<"u"&&(e!=null&&e.refer)&&sessionStorage.setItem(e==null?void 0:e.refer,"true")},[])},Bd=j.createContext({}),xy=({children:e,gridScrollBack:t})=>{const r=j.useRef(null);return qd({gridScrollBack:t}),s.jsx(Bd.Provider,{value:{sizesContainerRef:r},children:e})},Ud=()=>{const e=j.useContext(Bd);if(e===void 0)throw new Error("useContext(PDPContext) must be used within a PDPProvider");return e},Nr=({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})},st={configs:{PLP_FILTERS:[{key:"",label:"",eventLabel:"",order:0}],currency:"BRL",categoryOff:"bazar",storeUrl:"https://www.example.com",MAIN_IMAGE:"1",NAME_SPLIT_SYMBOL:"-",VENDOR_CODE:""},productEvents:(e,t)=>{const{event:r,commonData:n,customData:o,promotionInfo:i,itemList:c,outsideEcommerceData:l}=e,{availableSizes:u,sizes:d,price:h}=n,m={...r==="view_item"?{currency:st.configs.currency,value:h,grade_disponivel:u??(d?Hd(d):"")}:{},...r==="add_to_wishlist"||r==="remove_from_wishlist"?{value:h,currency:st.configs.currency}:{}},_=no({data:n,customData:{...o,...c,...i},configs:st.configs});Nr({event:r,data:{...l,ecommerce:{...c,...m,items:[_]}}}),typeof t=="function"&&t(_,m)},productListEvent:e=>{const{commonData:{products:t},promotionInfo:r,itemList:n,outsideEcommerceData:o,customData:i}=e;if(t.length===0)return;const c=t.map(({node:l},u)=>no({data:{...l},customData:{...r,index:u,...i!=null&&i.item_list_name?{item_list_name:i==null?void 0:i.item_list_name}:n},configs:st.configs}));Nr({event:"view_item_list",data:{...o,ecommerce:{...i!=null&&i.item_list_name?{item_list_name:i==null?void 0:i.item_list_name}:n,items:c}}})},skuEvents:e=>{const{event:t,commonData:{products:r},customData:n,supportData:{selectedSkus:o,price:i},promotionInfo:c,itemList:l,outsideEcommerceData:u}=e;let d=0;const h=r.map(m=>{var x,S,w,P,I,C,N,T,O;const _=o==null?void 0:o.find(M=>(m.productId??m.id)===M.productId);let g={...c,...l};if(_){const M=Wd(),z=Vd(M,_);z&&(g={...g,...z}),t==="add_to_cart"&&(c||l)&&ba({persistedData:M,type:"add",sku:(_==null?void 0:_.id)??(_==null?void 0:_.sku),newData:{promotionInfo:c,itemList:l}}),t==="remove_from_cart"&&ba({persistedData:M,type:"remove",sku:(_==null?void 0:_.id)??(_==null?void 0:_.sku)})}d+=m.price??((w=(S=(x=_==null?void 0:_.offers)==null?void 0:x.offers)==null?void 0:S[0])==null?void 0:w.price)??0;const v=(_==null?void 0:_.size)??U.getColorAndSizeFromSkuName((_==null?void 0:_.skuName)??(_==null?void 0:_.name)??((P=m.itemOffered)==null?void 0:P.skuName),st.configs.NAME_SPLIT_SYMBOL).size;return no({data:m,customData:{...n,...g??{...c,...l},item_sku:(_==null?void 0:_.id)??(_==null?void 0:_.sku)??((I=m.itemOffered)==null?void 0:I.sku),quantity:(n==null?void 0:n.quantity)??m.quantity??1,item_variant2:v,seller_id:(_==null?void 0:_.sellerId)??(_==null?void 0:_.seller)??((O=(T=(N=(C=_==null?void 0:_.offers)==null?void 0:C.offers)==null?void 0:N[0])==null?void 0:T.seller)==null?void 0:O.identifier)??m.seller},configs:st.configs})});Nr({event:t,data:{...u,ecommerce:{value:i??d,currency:st.configs.currency,items:h}}})},filterEvent:e=>{var c;const{commonData:t,customData:r,outsideEcommerceData:n}=e,o={},i={};Array.isArray(t==null?void 0:t.selectedFacets)&&((c=t==null?void 0:t.selectedFacets)!=null&&c.length)&&((t==null?void 0:t.selectedFacets).forEach(({key:l,value:u})=>{var m;const d=((m=st.configs.PLP_FILTERS.find(_=>_.key===l))==null?void 0:m.eventLabel)??l,h=(o==null?void 0:o[d])||[];d==="price_range"&&u.replace(":","-"),o[d]=[...h,u]}),Object.keys(o).forEach(l=>i[l]=o[l].join(", "))),Nr({event:"filter",data:{...n,...i,...r}})},viewCartEvent:e=>{var h,m,_,g,v,x,S,w,P,I;const{commonData:t,outsideEcommerceData:r}=e,{cartStore:n}=t;if(!n)return;const o=window.localStorage.getItem("persistedCartEventsData"),i=o?JSON.parse(o):{},c=n.items.map(C=>{const{promotionInfo:N,itemList:T}=i[C.id]??{};return no({data:{...C,price:C.price/100,listPrice:C.listPrice/100},customData:{...N,...T,item_sku:C.id??C.itemOffered.sku,quantity:C.quantity??1},configs:st.configs})}),l=(((h=n.totalizers.find(C=>C.name==="Total dos Itens"))==null?void 0:h.value)??0)/100,u=(((m=n.totalizers.find(C=>C.name==="Total dos Descontos"))==null?void 0:m.value)??0)/100,d=((_=n.marketingData)==null?void 0:_.utmiCampaign)===st.configs.VENDOR_CODE?(g=n.marketingData)==null?void 0:g.utmCampaign:(x=String((v=n.openTextField)==null?void 0:v.value))==null?void 0:x.split(" - ")[0];Nr({event:"view_cart",data:{...r,ecommerce:{currency:st.configs.currency,value:l+u,total_discount:Math.abs(u),cep_preenchido:!!((w=(S=n.shippingData)==null?void 0:S.address)!=null&&w.postalCode),...d?{seller_coupon_name:d}:{},...((P=n.marketingData)==null?void 0:P.coupon)&&{sale_coupon_name:(I=n.marketingData)==null?void 0:I.coupon},subtotal:l,items:c}}})},readyEvents:e=>{const{event:t,readyData:r}=e;Nr({event:t,data:{...r}})}},Hd=e=>e.reduce((t,r)=>(r.available&&t.push(r.value),t),[]).toString(),by=e=>{const t=e.length;return{...e&&e.length>0?{item_category:e[0].includes(st.configs.categoryOff)?"Bazar":"Coleção",...e[1]?{item_category2:e[1]}:{},...t>2?{item_category3:e[t-1]}:{}}:{}}},no=({data:e,customData:t,configs:r})=>({...jy(e,r==null?void 0:r.MAIN_IMAGE),...Sy(e),...Cy(e),...wy(e),...t}),$d=()=>{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("_"))??[]:[]},Wd=()=>{const e=window.localStorage.getItem("persistedCartEventsData");return e?JSON.parse(e):null},Vd=(e,t)=>e==null?void 0:e[t],ba=({persistedData:e,type:t,sku:r,newData:n})=>{if(!e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({[r]:n}));return}if(e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({...e,[r]:n}));return}e&&t==="remove"&&(delete e[r],window.localStorage.setItem("persistedCartEventsData",JSON.stringify(e)))},jy=(e,t="1")=>{var i,c,l,u,d,h,m,_,g,v,x;const r=e.productReference??e.gtin??e.productRefId,n=e.image??((c=(i=e.items)==null?void 0:i[0])==null?void 0:c.images)??((l=e.itemOffered)==null?void 0:l.image),o=n==null?void 0:n.find(S=>S.alternateName===t||S.imageLabel===t||S.keywords===t);return{item_id:e.productId??((u=e.isVariantOf)==null?void 0:u.productGroupID)??((d=e.isVariationOf)==null?void 0:d.productGroupID)??((m=(h=e.itemOffered)==null?void 0:h.isVariationOf)==null?void 0:m.productGroupID),item_ref:/_\d$/.test(r)?r.slice(0,-2):r,item_name:e.productTitle??e.productName??e.name??U.splitNameAndSizeFromFullName((_=e.itemOffered)==null?void 0:_.name,st.configs.NAME_SPLIT_SYMBOL).name,item_brand:((g=e.brand)==null?void 0:g.brandName)??((v=e.brand)==null?void 0:v.name)??e.brand??((x=e.itemOffered)==null?void 0:x.brand.name),item_url:`${st.configs.storeUrl}${e.linkText}/p`,item_image:(o==null?void 0:o.url)??(o==null?void 0:o.imageUrl)}},Kl=e=>Array.isArray(e)?e.reduce((t,r)=>(r.length>t.length&&(t=r),t),""):e,Sy=e=>{var d,h;const{categories:t,categoriesIds:r}=e,n=t??((d=e.itemOffered)==null?void 0:d.categories),o=r??((h=e.itemOffered)==null?void 0:h.categoriesIds),i=Kl(n),c=Kl(o),l=i.slice(1,-1).split("/"),u=c.slice(1,-1).split("/");return{item_category:l[0].toLowerCase().includes(st.configs.categoryOff)?"Bazar":"Coleção",...l[1]&&{item_category2:l[1]},...l.length>2&&{item_category3:l[l.length-1]},item_category_id:u[u.length-1],...u.length>1&&{item_parent_category_id:u[u.length-2]}}},Cy=e=>{var o,i,c,l,u,d;const t=((o=e.itemOffered)==null?void 0:o.skuName)??((l=(c=(i=e.isVariantOf)==null?void 0:i.hasVariant)==null?void 0:c[0])==null?void 0:l.name)??((d=(u=e.items)==null?void 0:u[0])==null?void 0:d.name),{color:r,size:n}=U.getColorAndSizeFromSkuName(t,st.configs.NAME_SPLIT_SYMBOL);return{item_variant:r,...e.itemOffered&&{item_variant2:n}}},wy=e=>{var u,d;const{price:t,listPrice:r,installments:n}=e,o=t??((u=e.offers)==null?void 0:u.lowPrice)??0,i=r??((d=e.offers)==null?void 0:d.highPrice)??0,c=i?i-o:0,l=c%1===0?c:Number(c.toFixed(2));return{...t&&{price:o??i},...i&&{list_price:i,discount:l},...n&&{installments:n==null?void 0:n.count,installment_value:n==null?void 0:n.value},item_currency:st.configs.currency}},Gd=()=>{const[e,t]=$d(),[r,n]=e.split("-"),o=r.includes("shop")||r.includes("sale")?r:"";return{page_category:o&&n?n:"",page_departament:o,id:t,name:e}},Ey=Object.freeze(Object.defineProperty({__proto__:null,eventsFunctions:st,findDataInPersistedData:Vd,getAvailablesSizes:Hd,getCategories:by,getPageCategoryAndDepartmentFromSlug:Gd,getPersistedData:Wd,getProductListInfoFromHead:$d,pushDatalayer:Nr,updatePersistedData:ba},Symbol.toStringTag,{value:"Module"})),Kd=j.createContext({}),Iy=({children:e,evtFunctionsConfigs:t})=>{const r=j.useRef({}),n=j.useRef(null),o=j.useRef(null),i=j.useRef({}),c=j.useRef({trigger:!1,index:0}),l=({functionKey:h,data:m,callBack:_,timeout:g=100})=>{window.dataLayer||(window.dataLayer=[]),st.configs=t;try{typeof st[h]=="function"&&setTimeout(()=>{var v;m.promotionInfo=r.current,(v=o.current)!=null&&v.item_list_name&&(m.itemList=o.current),st[h](m,_)},g)}catch(v){Nr({event:"error_event",data:{error_message:(v==null?void 0:v.message)??v}})}},u=({content:h})=>{l({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:h.replace("::",":")}}})},d=({updatePromotionRef:h,promotion:m,index:_})=>{h&&(r.current={...m}),l({functionKey:"readyEvents",data:{event:"select_promotion",readyData:{ecommerce:{...m,..._!==void 0&&{index:_}}}}})};return s.jsx(Kd.Provider,{value:{sendDataLayerEvent:l,triggerSelectItemEventRef:c,promotionEventRef:r,currentLocalRef:n,itemListRef:o,cartProductsFullDataRef:i,handleSelectContent:u,handleSelectPromotionEvent:d},children:e})},Ee=()=>j.useContext(Kd),Qd=j.createContext({}),Py=({children:e,productData:t,isKit:r,PDP_INFO:n,NAME_SPLIT_SYMBOL:o,TEXTURE_IMAGE:i})=>{var Y,X;const{sendDataLayerEvent:c,triggerSelectItemEventRef:l}=Ee(),{productId:u,productName:d,items:h,items:[{images:m,Videos:_}],description:g,["Composição"]:v="",productReference:x,categories:[S]}=t,{getAvailableProductTag:w}=jr(),P=w(Object.entries(t.clusterHighlights).map(Z=>({id:Z[0],name:Z[1]}))),I=S.slice(1,-1).split("/"),{installments:C,price:N,listPrice:T,sizes:O,allSizesAvailable:M}=U.getSkuInfos({items:h,NAME_SPLIT_SYMBOL:o}),z=U.getThumbImage({images:m,TEXTURE_IMAGE:i}),D=[{label:`${n.product.description}`,value:"description",content:g},{label:`${n.product.materiais}`,value:"composition",content:v}],B=((X=U.getColorAndSizeFromSkuName((Y=t.items)==null?void 0:Y[0].name,o))==null?void 0:X.color)??t["Cores Filtráveis"][0]??"",G=()=>({commonData:{...t,sizes:O,price:N,listPrice:T,installments:C},customData:{installments:C==null?void 0:C.count,installment_value:Number(C==null?void 0:C.value).toFixed(2)}}),J=({sku:Z,size:he})=>{const{commonData:fe,customData:ee}=G();c({functionKey:"productEvents",data:{event:"view_item",commonData:fe,customData:{...ee,...Z&&{item_sku:Z},...he&&{item_variant2:he}}}})};return j.useEffect(()=>{if(l.current.trigger){const{commonData:Z,customData:he}=G();c({functionKey:"productEvents",data:{event:"select_item",commonData:Z,customData:{...he,index:l.current.index}}}),l.current.trigger=!1}J({})},[]),s.jsx(Qd.Provider,{value:{productData:t,productId:u,productName:d,productReference:x,tag:P,items:h,sizes:O,allSizesAvailable:M,installments:C,price:N,listPrice:T,thumbImage:z,images:m,video:_[0],descriptionContent:D,breadcrumbList:I,isKit:r,colorName:B,handleViewItemEvent:J},children:e})},Et=()=>{const e=j.useContext(Qd);if(e===void 0)throw new Error("useContext(PDPDataContext) must be used within a PDPDataProvider");return e},Ny=()=>{const[e,t]=j.useState(null);return[e,async n=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(n),t(n),!0}catch(o){return console.warn("Copy failed",o),t(null),!1}}]},Yd=()=>{j.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)}},[])},Ry=typeof window>"u",Ty=(e,t)=>{const[r,n]=j.useState(()=>{if(Ry)return null;const i=localStorage.getItem(e);return i===null?t:JSON.parse(i||"{}")});return j.useEffect(()=>{const i=c=>{c.storageArea===localStorage&&c.key===e&&n(JSON.parse(c.newValue))};return window.addEventListener("storage",i),()=>{window.removeEventListener("storage",i)}},[e,t]),[r,i=>{n(c=>{const l=typeof i=="function"?i(c):i;return localStorage.setItem(e,JSON.stringify(l)),l})}]};function dc(e,t,r){const[n,o]=j.useState(!1),{threshold:i}=r||{};return j.useEffect(()=>{if(!e.current)return()=>null;let c=null;const l=new IntersectionObserver(([u])=>{if(r!=null&&r.delay){c&&clearTimeout(c),c=setTimeout(()=>{o(u.isIntersecting),t&&u.isIntersecting&&l.unobserve(e.current)},r.delay);return}o(u.isIntersecting),t&&u.isIntersecting&&l.unobserve(e.current)},{threshold:i||1});return l.observe(e.current),()=>{l.disconnect()}},[e]),n}const Uo=({callback:e,onEnterViewportOnce:t,options:r})=>{const n=j.useRef(null);return j.useEffect(()=>{const o=n.current;if(!o)return;const i=new IntersectionObserver(([c])=>{c.isIntersecting&&typeof e=="function"&&(e(),t&&(i.unobserve(o),i.disconnect()))},r);return i.observe(o),()=>{t&&i.unobserve(o),i.disconnect()}},[e,t,r]),{element:n}},Xd=({defaultScale:e=1,maxScale:t=3})=>{const r=j.useRef(null),n=j.useRef(null),[o,i]=j.useState(e),c=j.useRef(0),l=j.useRef({x:0,y:0}),u=j.useRef({x:0,y:0}),d=()=>{if(!n.current||!r.current)return{minX:0,maxX:0,minY:0,maxY:0};const g=r.current.getBoundingClientRect(),v=n.current.children[0].getBoundingClientRect(),x=v.width,S=v.height,w=Math.min(0,(g.width-x)/2),P=Math.max(0,(x-g.width)/2),I=Math.min(0,(g.height-S)/2),C=Math.max(0,(S-g.height)/2);return{minX:w,maxX:P,minY:I,maxY:C}},h=(g,v,x)=>{if(n.current){const S=n.current.children[0];S&&requestAnimationFrame(()=>{S.style.transform=`translate(calc(-50% + ${g}px), calc(-50% + ${v}px)) scale(${x})`})}},m=j.useCallback(g=>{const{minX:v,maxX:x,minY:S,maxY:w}=d(),{x:P,y:I}=u.current,C=Math.max(v,Math.min(x,P)),N=Math.max(S,Math.min(w,I));if(g.touches.length>1){const T=g.touches[0],O=g.touches[1],M=T.pageX-O.pageX,z=T.pageY-O.pageY;c.current=Math.sqrt(M*M+z*z),l.current={x:(T.pageX+O.pageX)/2,y:(T.pageY+O.pageY)/2}}else g.touches.length===1&&(l.current={x:g.touches[0].pageX-C,y:g.touches[0].pageY-N})},[o,u]),_=j.useCallback(g=>{if(!n.current||!r.current)return;const{minX:v,maxX:x,minY:S,maxY:w}=d();if(g.touches.length>1){g.preventDefault();const P=g.touches[0],I=g.touches[1],C=P.pageX-I.pageX,N=P.pageY-I.pageY,T=Math.sqrt(C*C+N*N);if(!c.current){c.current=T;return}const O=T/c.current,M=Math.max(1,Math.min(t,o*O));if(o===M)return;i(M);const z=(P.pageX+I.pageX)/2,D=(P.pageY+I.pageY)/2;let B=z-l.current.x,G=D-l.current.y;B=Math.max(v,Math.min(x,B)),G=Math.max(S,Math.min(w,G)),u.current={x:B,y:G},c.current=T,h(B,G,M)}else if(g.touches.length===1){const P=g.touches[0].pageX,I=g.touches[0].pageY;let C=P-l.current.x,N=I-l.current.y;C=Math.max(v,Math.min(x,C)),N=Math.max(S,Math.min(w,N)),u.current={x:C,y:N},h(C,N,o)}},[t,o]);return j.useEffect(()=>(document.addEventListener("touchstart",m),document.addEventListener("touchmove",_,{passive:!1}),()=>{document.removeEventListener("touchstart",m),document.removeEventListener("touchmove",_)}),[_,m]),{containerRef:r,imgRef:n,scale:o}},Oy=()=>{const e=async(g,v)=>U.proxyCartAPI("/_v/proxy/checkout/order-form/coupon",{body:{orderFormId:g,coupon:v}}),t=async(g,v,x={},S)=>{if(S)if(v){const w=v.includes(" - ")?v.split(" - ")[0]:v,P=await U.proxyCartAPI("/_v/proxy/checkout/order-form/seller-code",{body:{orderFormId:g,sellerCode:w}});return P instanceof Object&&x.name in P&&P[x.status]===!0?U.proxyCartAPI("/_v/proxy/checkout/order-form/attachments",{body:{orderFormId:g,sellerCode:w,sellerName:P[x.name]}}).then(C=>({...C,openTextField:{...(C==null?void 0:C.openTextField)??{},statusOk:!0}})):Promise.resolve({paymentData:null,openTextField:{statusOk:!1,value:w}})}else return U.proxyCartAPI("/_v/proxy/checkout/order-form/attachments",{body:{orderFormId:g,sellerCode:"",sellerName:""}})},r=async(g,v)=>U.proxyCartAPI("/_v/proxy/checkout/order-form/attachments/marketing-data",{body:{orderFormId:g,marketingData:v}}),n=async(g,v,x)=>U.proxyCartAPI("/_v/proxy/checkout/order-form/items",{body:{orderFormId:g,orderItems:U.addItemOrder(v,x)}}),o=async(g,v,x,S=!1)=>U.proxyCartAPI("/_v/proxy/checkout/order-form/offerings",{body:{id:v,itemIndex:x,orderFormId:g,remove:S}}),i=async g=>U.proxyCartAPI("/_v/proxy/checkout/order-form/items/remove-all",{body:{orderFormId:g}}),c=async g=>U.proxyCartAPI("/_v/proxy/checkout/order-form",{body:{orderFormId:g??""}}),l=async(g,v)=>U.proxyCartAPI("/_v/proxy/checkout/order-form/profile",{body:{orderFormId:g,email:v}}),u=async(g,v,x)=>{const S=U.removeQuantity(v,x);return U.proxyCartAPI("/_v/proxy/checkout/order-form/items/update",{body:{orderItems:S.updateItems,orderFormId:g}})},d=async(g,v,x,S,w,P,I)=>{var T,O;const C=I?{startDateUtc:(T=P==null?void 0:P.deliveryWindow)==null?void 0:T.startDate,endDateUtc:(O=P==null?void 0:P.deliveryWindow)==null?void 0:O.endDate}:null,N={logisticsInfo:Array.from({length:S},(M,z)=>({itemIndex:z,selectedDeliveryChannel:(P==null?void 0:P.deliveryChannel)||null,selectedSla:(P==null?void 0:P.deliveryMethod)||null,deliveryWindow:C})),selectedAddresses:w,clearAddressIfPostalCodeNotFound:!0};return U.proxyCartAPI("/_v/proxy/checkout/order-form/shipping",{body:{...N,orderFormId:g,country:x,postalCode:v}})},h=async(g,v,x)=>U.proxyCartAPI("/_v/proxy/checkout/order-form/shipping/update",{body:{orderFormId:g,options:v,selectedAddresses:x}}),m=async(g,v,x,S)=>{const w=U.updateQuantity(v,x,S);return U.proxyCartAPI("/_v/proxy/checkout/order-form/items/update",{body:{orderFormId:g,orderItems:w}})};return{addCoupon:e,addItem:n,addSellerCode:t,addMarketingData:r,giftItem:o,emptyCart:i,getOrderForm:c,insertProfileEmail:l,removeItem:u,shipping:d,shippingUpdate:h,updateItemQuantity:async(g,v,x,S,w)=>m(g,v,x,S).then(P=>P&&Array.isArray(P.items)?U.updateItemSellerExternal(P.items,x)?m(g,v,x,w):P:!1)}},ko="soma::cart",hs="soma::options",fn=yn.create((e,t)=>{const r=Oy(),n=async(o,i,c)=>{e({loading:!0});const l=await U.updateOrderFormPromise(o);if(typeof l!="boolean"){e({...l});const u=await U.mergeOptionsPromise(Zt.get(hs),c);return Zt.set(hs,u),U.getValue(l,i).finally(()=>e({loading:!1,options:u}))}return U.promiseDefault};if(typeof window<"u"){const o=async i=>{if(i){const c=await Zt.get(hs).then(d=>U.findOptions(d,i.items));Zt.set(ko,i),Zt.set(hs,c),e({...i,options:c});const l=new URLSearchParams(window.location.search),u=l.get("utm_campaign")||l.get("utmi_campaign")||"";u&&n(()=>r.addSellerCode(t().id,u.toUpperCase()),"openTextField")}};return Zt.get(ko).then(i=>r.getOrderForm(i?i.id:"").then(o)),{...U.initialState,addCoupon:async i=>n(()=>r.addCoupon(t().id,i),"marketingData"),addItem:(i,c)=>{n(()=>r.addItem(t().id,t().items,i),"items",c)},addSellerCode:async(i,c)=>n(()=>r.addSellerCode(t().id,i,c,t().isOpen),"openTextField"),addMarketingData:async i=>n(()=>r.addMarketingData(t().id,i),"marketingData"),emptyCart:()=>{n(()=>r.emptyCart(t().id))},removeItem:async i=>{const c=await n(()=>r.removeItem(t().id,t().items,i),"items");return U.getRemoveId(i,c)},shipping:async(i,c="BR")=>n(()=>r.shipping(t().id,i??"",c,t().items.length,U.createNewAddress(i??"",null,c)),"shippingData"),shippingUpdate:async i=>n(()=>{var c;return r.shippingUpdate(t().id,i,(c=t().shippingData)==null?void 0:c.selectedAddresses)},"shippingData"),toggleServiceToProduct:async(i,c,l)=>n(()=>r.giftItem(t().id,i,c,l),"items"),updateItemQuantity:async(i,c,l)=>{const{id:u,items:d}=t();return n(()=>{var h;return r.updateItemQuantity(u,d,i,c,((h=d.find(m=>m.id===i))==null?void 0:h.quantity)??1)},"items",l?[l]:void 0)},insertProfileEmail:async i=>n(()=>r.insertProfileEmail(t().id,i),"clientProfileData"),setIsOpen:i=>e({isOpen:i})}}return U.initialState}),Ay=()=>fn(e=>e),Jd=yn.create(e=>({notifications:[],actions:{addNotification:(t,r)=>e(n=>U.addNotification(n,t,r)),removeNotification:t=>e(r=>({notifications:r.notifications.filter(n=>n.id!==t)}))}})),fc=()=>Jd(e=>e.notifications),pc=()=>Jd(e=>e.actions),ky=Object.freeze(Object.defineProperty({__proto__:null,KEY_INDEXED_OPTIONS:hs,KEY_INDEXED_STORE:ko,useCartStore:fn,useGetCartStoreState:Ay,useGetNotificationActions:pc,useGetNotificationsStore:fc},Symbol.toStringTag,{value:"Module"})),My=6e3,Zd=j.createContext({}),ef=({children:e,...t})=>{const{items:r}=fn(),[n,o]=j.useState([]),i=j.useRef(null),c=j.useMemo(()=>Array.isArray(n)&&n.length>0?n.map(l=>r.find(u=>u.id===l.id)).filter(l=>l!==void 0):[],[r,n]);return j.useEffect(()=>{n.length&&(clearTimeout(i.current??0),i.current=setTimeout(()=>{o([])},My))},[n]),s.jsx(Zd.Provider,{value:j.useMemo(()=>({...t,setRecentlyAdded:o,recentlyAddedProducts:c}),[t,o,c]),children:e})},Os=()=>{const e=j.useContext(Zd);if(e===void 0)throw new Error("useUIContext must be used within a UIProvider");return e};class tf{constructor(){Gr(this,"events",{});Gr(this,"prevData",{})}subscribe(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),()=>{this.events[t]=this.events[t].filter(n=>n!==r)}}publish(t,r){this.events[t]&&this.events[t].forEach(n=>{this.prevData[t]=r,n(r)})}}const rf=j.createContext({}),Ly=({children:e,headerConfigs:t,pathname:r,storeId:n,...o})=>{U.configureFetchProxy(n);const[i,c]=j.useState(!0),[l,u]=j.useState(!1),d=r==="/",h=j.useRef(new tf),m=v=>v?{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},_=m(d),g=j.useRef(_);return j.useEffect(()=>{var S;const v=((S=new URLSearchParams(window.location.search))==null?void 0:S.toString())??"";(v.includes("utm_")||v.includes("gclid"))&&(Ao.get("lastMedias")||Ao.set("lastMedias",`${v}`,{expires:1/24}));const x=()=>{const w=typeof(window==null?void 0:window.navigator)>"u"?"":navigator==null?void 0:navigator.userAgent,P=window.innerWidth<1024||!!w.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i);l||u(!0),i!==P&&(c(P),u(!0))};return l||x(),window.addEventListener("resize",x,{passive:!0}),()=>window.removeEventListener("resize",x)},[i,l]),j.useEffect(()=>{const v=m(d);h.current.publish("header:change_variant",v.headerVariant),h.current.publish("header:change_position",v.position),g.current=v},[d]),s.jsx(rf.Provider,{value:{isMobile:i,mediatorRef:h,currentHeaderConfigsRef:g,deviceValidated:l,...o},children:s.jsx(ef,{children:e})})},xe=()=>j.useContext(rf),nf=j.createContext({}),Dy=({children:e,...t})=>s.jsx(nf.Provider,{value:{...t},children:e}),Ae=()=>j.useContext(nf),vn=(e,t)=>yn.create(r=>{const n=()=>r({value:e});return t&&t instanceof Set&&t.add(n),{value:e,actions:{setValue:o=>r({value:o}),reset:n}}}),js={category:null,menuMobileIsOpen:!1,searchModalIsOpen:!1,userMenuIsOpen:!1},As=new Set,Fy=()=>{As.forEach(e=>{e()})},sf=yn.create((e,t)=>{const r=()=>e({value:js.category});return As.add(r),{value:js.category,actions:{reset:r,setValue:n=>e(()=>({value:n})),updateValue:n=>{t().value!==n&&e({value:n})}}}}),of=()=>sf(e=>e.value),ks=()=>sf(e=>e.actions),af=vn(js.menuMobileIsOpen,As),cf=()=>af(e=>e.value),lf=()=>af(e=>e.actions),uf=vn(js.searchModalIsOpen,As),df=()=>uf(e=>e.value),Ho=()=>uf(e=>e.actions),ff=vn(js.userMenuIsOpen,As),hc=()=>ff(e=>e.value),mc=()=>ff(e=>e.actions),zy=Object.freeze(Object.defineProperty({__proto__:null,resetAllHeaderStores:Fy,useActionsHeaderCategory:ks,useActionsMenuMobileIsOpen:lf,useActionsSearchModalIsOpen:Ho,useActionsUserMenuIsOpen:mc,useGetHeaderCategoryStore:of,useGetMenuMobileIsOpen:cf,useGetSearchModalIsOpen:df,useGetUserMenuIsOpen:hc},Symbol.toStringTag,{value:"Module"})),Jn={selectedSkuInfo:{productId:"",name:"",size:"",sku:"",sellerId:"",sellerName:"",available:!1,quantity:1},openLetMeKnow:!1,openMeasurements:!1,showBottomNavigation:!1,showNotify:!1},es=new Set,qy=()=>{es.forEach(e=>{e()})},pf=yn.create(e=>{const t=()=>e({value:Jn.selectedSkuInfo});return es.add(t),{value:Jn.selectedSkuInfo,actions:{setValue:r=>e(n=>({value:{...n,...r}})),reset:t}}}),Ms=()=>pf(e=>e.value),hf=()=>pf(e=>e.actions),mf=vn(Jn.openLetMeKnow,es),By=()=>mf(e=>e.value),Uy=()=>mf(e=>e.actions),_f=vn(Jn.showNotify,es),gf=()=>_f(e=>e.value),_c=()=>_f(e=>e.actions),yf=vn(Jn.showBottomNavigation,es),Hy=()=>yf(e=>e.value),$y=()=>yf(e=>e.actions),vf=vn(Jn.openMeasurements,es),xf=()=>vf(e=>e.value),bf=()=>vf(e=>e.actions),Wy=Object.freeze(Object.defineProperty({__proto__:null,resetAllPDPStores:qy,useActionsPDPOpenLetMeKnow:Uy,useActionsPDPOpenMeasurements:bf,useActionsPDPSelectedSkuInfo:hf,useActionsPDPShowBottomNavigation:$y,useActionsPDPShowNotify:_c,useGetPDPOpenLetMeKnow:By,useGetPDPOpenMeasurements:xf,useGetPDPSelectedSkuInfo:Ms,useGetPDPShowBottomNavigation:Hy,useGetPDPShowNotify:gf},Symbol.toStringTag,{value:"Module"})),Ql={feedback:{active:!1,action:"add"},list:[]},gc=yn.create((e,t)=>({value:Ql,actions:{reset:()=>e({value:Ql}),setValue:n=>e(()=>({value:n})),toggleProduct:n=>e(o=>o.value.list.includes(n)?{value:{feedback:{active:!0,action:"remove"},list:o.value.list.filter(i=>i!==n)}}:{value:{feedback:{active:!0,action:"add"},list:[...o.value.list,n]}}),updateList:n=>e(o=>({value:{...o.value,list:n}})),resetFeedback:()=>e(n=>({value:{...n.value,feedback:{active:!1,action:""}}}))}})),ts=()=>gc(e=>e.value.list),yc=()=>gc(e=>e.value.feedback),xn=()=>gc(e=>e.actions),Vy=Object.freeze(Object.defineProperty({__proto__:null,useActionsWishlistStore:xn,useGetWishlistFeedbackStore:yc,useGetWishlistStore:ts},Symbol.toStringTag,{value:"Module"})),jf=j.createContext({}),Gy=({children:e,headerData:t,...r})=>{var h,m;const n=j.useRef(null),o=j.useRef(null),i=j.useRef(null),c=j.useRef(null),l=j.useRef(null),{mediatorRef:u,currentHeaderConfigsRef:d}=xe();return(h=u.current)==null||h.subscribe("header:change_variant",_=>{var w,P,I;if(_&&d.current&&(d.current.bannerVariant=_),!n.current)return;const v=document.body.scrollTop>0,x=n.current.getAttribute("data-interactiveVariant"),S=v?x:_??((w=d.current)==null?void 0:w.bannerVariant)??"default";S!==((P=d.current)==null?void 0:P.headerVariant)&&(n.current.setAttribute("data-bottomdivider",String(v)),n.current.setAttribute("data-variant",String(S)),(I=u.current)==null||I.publish("herobanner:change_controllers_variant",S),d.current&&(d.current.headerVariant=S))}),(m=u.current)==null||m.subscribe("header:change_position",_=>{n.current&&(n.current.style.position=_)}),j.useEffect(()=>{const _=new AbortController,g=p.helpers.throttle(()=>{var x;return(x=u.current)==null?void 0:x.publish("header:change_variant",null)},200);document.body.addEventListener("scroll",g,{passive:!0,signal:_.signal});const v=x=>{var w;(w=x.target.closest("a"))==null||w.blur()};return n.current&&(n.current.addEventListener("click",v,{signal:_.signal}),n.current.addEventListener("touchend",v,{signal:_.signal})),()=>{_.abort()}},[]),s.jsx(jf.Provider,{value:{headerData:t,structureRef:o,rootRef:n,tipbarRef:i,userMenuMobileRef:c,userMenuDesktopRef:l,...r},children:e})},Ze=()=>j.useContext(jf),Sf=j.createContext({}),Cf=({children:e,...t})=>s.jsx(Sf.Provider,{value:j.useMemo(()=>t,[t]),children:e}),vc=()=>{const e=j.useContext(Sf);if(e===void 0)throw new Error("useMenuMobileContext must be used within a MenuMobileProvider");return e},Ky=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},Qy=(e,t,r)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const n=t.getBoundingClientRect(),o=e.getBoundingClientRect(),i=e!=null&&e.parentElement?Ky(e==null?void 0:e.parentElement):0;return{left:n.left+n.width/2-(o.width+i),top:n.top+n.height+r}},wf=j.createContext({}),Ef=({children:e,delay:t=600,gap:r=20,...n})=>{const[o,i]=j.useState(!1),c=j.useRef(null),[l,u]=j.useState(!1),[d,h]=j.useState({left:0,top:0}),m=j.useCallback(()=>{u(!0),typeof window<"u"&&(c.current=window.setTimeout(()=>{i(!1),u(!1)},t))},[u,i,t]);return j.useEffect(()=>{if(typeof window>"u")return;const _=window.document.querySelector("#cart-button"),g=window.document.querySelector("#add-to-cart--tooltip");if(_&&g){const{left:v,top:x}=Qy(g,_,r??0);h({left:v,top:x}),u(!1)}},[r,o]),s.jsx(wf.Provider,{value:j.useMemo(()=>({...n,...d,handleClose:m,isLeaving:l,isOpen:o,setIsOpen:i,setIsLeaving:u}),[n,d,m,l,o,i,u]),children:e})},bn=()=>{const e=j.useContext(wf);if(e===void 0)throw new Error("useAddToCartContext must be used within a AddToCartProvider");return e},If=j.createContext({}),Yy=({children:e,SELLER_CODE_VALIDATION_KEYS:t,CARTPROVIDER_MESSAGE_PRODUCT_REMOVE:r,data:n,...o})=>{var _e,Ce,ge,we;const i=fn(),{setRecentlyAdded:c}=Os(),l=j.useRef(""),u=fc(),{addNotification:d,removeNotification:h}=pc(),[m,_]=j.useState(null),{addCoupon:g,addItem:v,addSellerCode:x,addMarketingData:S,emptyCart:w,isOpen:P,removeItem:I,shipping:C,shippingUpdate:N,toggleServiceToProduct:T,updateItemQuantity:O}=i;j.useEffect(()=>{(async()=>{var F,ce,je,Oe;if(!i.id||!((ce=(F=n==null?void 0:n.promotion)==null?void 0:F.promotionCart)!=null&&ce.idPromotion)||((Oe=(je=n==null?void 0:n.promotion)==null?void 0:je.promotionCart)==null?void 0:Oe.selectPromotion)==="Desativar")return;const oe=await fetch("/api/buywin",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({orderFormId:i.id,promotionId:n.promotion.promotionCart.idPromotion,web:(n==null?void 0:n.promotion.promotionCart.versionAPI)==="Original"})}).then(q=>q.json());_(oe)})()},[i.id,i.items.length,n==null?void 0:n.versionId,(Ce=(_e=n==null?void 0:n.promotion)==null?void 0:_e.promotionCart)==null?void 0:Ce.idPromotion,(we=(ge=n==null?void 0:n.promotion)==null?void 0:ge.promotionCart)==null?void 0:we.versionAPI]),j.useEffect(()=>{const V=Ao.get("lastMedias");if(i.id&&V&&l.current!==V){l.current=V;const oe=new URLSearchParams(V),F=U.mountMarketingData(oe);S(F)}},[i,S]);const M=j.useCallback(async(V,oe)=>(oe==="coupon"?g(V):x(V,t??{})).then(ce=>{if(typeof ce!="boolean"&&ce instanceof Object){if(oe==="seller"&&"value"in ce){const{statusOk:je,value:Oe}=ce,q=String(Oe??"").split(" - ");return U.getCode((q==null?void 0:q[0])??"",V,!!je)}return U.getCode(String(ce.coupon),V,!0)}return U.getCode("","")}).catch(()=>Promise.resolve({code:400})),[g,x]),z=j.useCallback((V,oe,F)=>{const{id:ce}=V;O(ce,oe,F)},[O]),D=j.useCallback((V,oe,F=!1)=>{if(!V)return;const{id:ce}=V,je=U.findItemIndex(i.items,ce);if(je!==-1&&!F){const Oe=Number(i.items[je].quantity),q=i.items[je]?Oe+1:1;z(V,q,oe)}else v({id:ce,quantity:(V==null?void 0:V.quantity)??1,seller:V.seller});P||c(Oe=>[...Oe,V])},[v,z,i.items,P,c]),B=j.useCallback((V,oe)=>{if(!V||!Array.isArray(V))return;c(ce=>[...ce,...V]);const F=V.map(ce=>{const{id:je,quantity:Oe,seller:q}=ce,$=U.findItemIndex(i.items,je),Pe=U.getQuantity(Oe??1,$);return{id:je,quantity:Pe,seller:q}});v(F,oe)},[v,i.items,c]),G=j.useCallback(async(V,oe,F)=>V?I(V).then(()=>(d(oe??`${r}`,F),U.getCode(V,V))):Promise.resolve(U.getCode("","Product id required")),[d,I]),J=j.useCallback(()=>{i.items.length>0&&w()},[w,i.items]),Y=j.useCallback((V,oe="BRA")=>C(V,oe),[C]),X=j.useCallback(V=>{V&&N(V)},[N]),Z=j.useCallback(async(V,oe,F=!1)=>{const ce=i.items.findIndex(Oe=>Oe.uniqueId===V);return i.items[ce]&&ce>=0?T(oe,ce,F):!1},[i.items,T]),he=j.useCallback(async(V,oe)=>O(V,oe).then(F=>{if(Array.isArray(F)){const ce=F.find(je=>je.id===V);if(ce&&(ce==null?void 0:ce.quantity)<oe)return String(ce.quantity)}return!1}),[O]),fe=j.useCallback(async()=>{await S({...i.marketingData,coupon:""})},[S,i.marketingData]),ee=j.useCallback(async()=>{await S({...i.marketingData,utmiCampaign:"",utmCampaign:"",utmSource:"",utmMedium:""})},[S,i.marketingData]),ie=j.useCallback(async()=>{await C("","BRA")},[C]);return s.jsx(If.Provider,{value:j.useMemo(()=>({...o,data:n,addCouponSeller:M,addToCart:D,addItemsToCart:B,cartStore:i,notifications:u,clearCart:J,addNotification:d,isOpen:i.isOpen,removeNotification:h,removeToCart:G,setIsOpen:i.setIsOpen,shipping:Y,shippingUpdateOption:X,toggleGiftItemCart:Z,updateItemQuantity:he,removeCoupon:fe,removeSellerCode:ee,removeCEP:ie,promotionRules:m,setPromotionRules:_}),[o,n,M,D,B,u,J,d,i,h,G,Y,X,Z,he,fe,ee,ie,m,_]),children:e})},Xe=()=>{const e=j.useContext(If);if(e===void 0)throw new Error("useCartContext must be used within a CartProvider");return e},Pf=j.createContext({}),xc=({children:e,state:t,collectionId:r,brand:n,searchParams:o})=>{const i=j.useMemo(()=>{var c;return r?[{key:"productclusterids",value:r.toString()}]:n?[{key:"brand",value:n}]:(c=t.base)!=null&&c.length?t.base.slice(1).split("/").map((l,u)=>({key:`category-${u+1}`,value:l})):[]},[t.base,r]);return s.jsx(Pf.Provider,{value:j.useMemo(()=>({state:{...t,facets:[...i,...t.facets??[]]},searchParams:o}),[i,t,o]),children:e})},ft=()=>{const e=j.useContext(Pf);if(e===void 0)throw new Error("useSearchContext must be used within a SearchProvider");return e};var Ls=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(){}},Xy={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},cr,Jr,Nd,Jy=(Nd=class{constructor(){ye(this,cr,Xy);ye(this,Jr,!1)}setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&k(this,Jr)&&e!==k(this,cr)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:k(this,cr),provider:e}),ue(this,cr,e),process.env.NODE_ENV!=="production"&&ue(this,Jr,!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&ue(this,Jr,!0),k(this,cr).setTimeout(e,t)}clearTimeout(e){k(this,cr).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&ue(this,Jr,!0),k(this,cr).setInterval(e,t)}clearInterval(e){k(this,cr).clearInterval(e)}},cr=new WeakMap,Jr=new WeakMap,Nd),Yr=new Jy;function Zy(e){setTimeout(e,0)}var pn=typeof window>"u"||"Deno"in globalThis;function Nt(){}function ev(e,t){return typeof e=="function"?e(t):e}function ja(e){return typeof e=="number"&&e>=0&&e!==1/0}function Nf(e,t){return Math.max(e+(t||0)-Date.now(),0)}function zr(e,t){return typeof e=="function"?e(t):e}function Ut(e,t){return typeof e=="function"?e(t):e}function Yl(e,t){const{type:r="all",exact:n,fetchStatus:o,predicate:i,queryKey:c,stale:l}=e;if(c){if(n){if(t.queryHash!==bc(c,t.options))return!1}else if(!Cs(t.queryKey,c))return!1}if(r!=="all"){const u=t.isActive();if(r==="active"&&!u||r==="inactive"&&u)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||o&&o!==t.state.fetchStatus||i&&!i(t))}function Xl(e,t){const{exact:r,status:n,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(Ss(t.options.mutationKey)!==Ss(i))return!1}else if(!Cs(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||o&&!o(t))}function bc(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ss)(e)}function Ss(e){return JSON.stringify(e,(t,r)=>wa(r)?Object.keys(r).sort().reduce((n,o)=>(n[o]=r[o],n),{}):r)}function Cs(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Cs(e[r],t[r])):!1}var tv=Object.prototype.hasOwnProperty;function Sa(e,t){if(e===t)return e;const r=Jl(e)&&Jl(t);if(!r&&!(wa(e)&&wa(t)))return t;const o=(r?e:Object.keys(e)).length,i=r?t:Object.keys(t),c=i.length,l=r?new Array(c):{};let u=0;for(let d=0;d<c;d++){const h=r?d:i[d],m=e[h],_=t[h];if(m===_){l[h]=m,(r?d<o:tv.call(e,h))&&u++;continue}if(m===null||_===null||typeof m!="object"||typeof _!="object"){l[h]=_;continue}const g=Sa(m,_);l[h]=g,g===m&&u++}return o===c&&u===o?e:l}function Ca(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 Jl(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function wa(e){if(!Zl(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Zl(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Zl(e){return Object.prototype.toString.call(e)==="[object Object]"}function rv(e){return new Promise(t=>{Yr.setTimeout(t,e)})}function Ea(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 Sa(e,t)}catch(n){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${n}`),n}return Sa(e,t)}return t}function nv(e){return e}function sv(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function ov(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Mo=Symbol();function Rf(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Mo&&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===Mo?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Tf(e,t){return typeof e=="function"?e(...t):!!e}function iv(e,t,r){let n=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),n||(n=!0,o.aborted?r():o.addEventListener("abort",r,{once:!0})),o)}),e}var Zr,Or,qn,Rd,av=(Rd=class extends Ls{constructor(){super();ye(this,Zr);ye(this,Or);ye(this,qn);ue(this,qn,t=>{if(!pn&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){k(this,Or)||this.setEventListener(k(this,qn))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,Or))==null||t.call(this),ue(this,Or,void 0))}setEventListener(t){var r;ue(this,qn,t),(r=k(this,Or))==null||r.call(this),ue(this,Or,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){k(this,Zr)!==t&&(ue(this,Zr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof k(this,Zr)=="boolean"?k(this,Zr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Zr=new WeakMap,Or=new WeakMap,qn=new WeakMap,Rd),jc=new av;function Ia(){let e,t;const r=new Promise((o,i)=>{e=o,t=i});r.status="pending",r.catch(()=>{});function n(o){Object.assign(r,o),delete r.resolve,delete r.reject}return r.resolve=o=>{n({status:"fulfilled",value:o}),e(o)},r.reject=o=>{n({status:"rejected",reason:o}),t(o)},r}var cv=Zy;function lv(){let e=[],t=0,r=l=>{l()},n=l=>{l()},o=cv;const i=l=>{t?e.push(l):o(()=>{r(l)})},c=()=>{const l=e;e=[],l.length&&o(()=>{n(()=>{l.forEach(u=>{r(u)})})})};return{batch:l=>{let u;t++;try{u=l()}finally{t--,t||c()}return u},batchCalls:l=>(...u)=>{i(()=>{l(...u)})},schedule:i,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{o=l}}}var ht=lv(),Bn,Ar,Un,Td,uv=(Td=class extends Ls{constructor(){super();ye(this,Bn,!0);ye(this,Ar);ye(this,Un);ue(this,Un,t=>{if(!pn&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){k(this,Ar)||this.setEventListener(k(this,Un))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,Ar))==null||t.call(this),ue(this,Ar,void 0))}setEventListener(t){var r;ue(this,Un,t),(r=k(this,Ar))==null||r.call(this),ue(this,Ar,t(this.setOnline.bind(this)))}setOnline(t){k(this,Bn)!==t&&(ue(this,Bn,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return k(this,Bn)}},Bn=new WeakMap,Ar=new WeakMap,Un=new WeakMap,Td),Lo=new uv;function dv(e){return Math.min(1e3*2**e,3e4)}function Of(e){return(e??"online")==="online"?Lo.isOnline():!0}var Pa=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Af(e){let t=!1,r=0,n;const o=Ia(),i=()=>o.status!=="pending",c=x=>{var S;if(!i()){const w=new Pa(x);_(w),(S=e.onCancel)==null||S.call(e,w)}},l=()=>{t=!0},u=()=>{t=!1},d=()=>jc.isFocused()&&(e.networkMode==="always"||Lo.isOnline())&&e.canRun(),h=()=>Of(e.networkMode)&&e.canRun(),m=x=>{i()||(n==null||n(),o.resolve(x))},_=x=>{i()||(n==null||n(),o.reject(x))},g=()=>new Promise(x=>{var S;n=w=>{(i()||d())&&x(w)},(S=e.onPause)==null||S.call(e)}).then(()=>{var x;n=void 0,i()||(x=e.onContinue)==null||x.call(e)}),v=()=>{if(i())return;let x;const S=r===0?e.initialPromise:void 0;try{x=S??e.fn()}catch(w){x=Promise.reject(w)}Promise.resolve(x).then(m).catch(w=>{var T;if(i())return;const P=e.retry??(pn?0:3),I=e.retryDelay??dv,C=typeof I=="function"?I(r,w):I,N=P===!0||typeof P=="number"&&r<P||typeof P=="function"&&P(r,w);if(t||!N){_(w);return}r++,(T=e.onFail)==null||T.call(e,r,w),rv(C).then(()=>d()?void 0:g()).then(()=>{t?_(w):v()})})};return{promise:o,status:()=>o.status,cancel:c,continue:()=>(n==null||n(),o),cancelRetry:l,continueRetry:u,canStart:h,start:()=>(h()?v():g().then(v),o)}}var en,Od,kf=(Od=class{constructor(){ye(this,en)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ja(this.gcTime)&&ue(this,en,Yr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(pn?1/0:5*60*1e3))}clearGcTimeout(){k(this,en)&&(Yr.clearTimeout(k(this,en)),ue(this,en,void 0))}},en=new WeakMap,Od),tn,Hn,Bt,rn,dt,Is,nn,Xt,yr,Ad,fv=(Ad=class extends kf{constructor(t){super();ye(this,Xt);ye(this,tn);ye(this,Hn);ye(this,Bt);ye(this,rn);ye(this,dt);ye(this,Is);ye(this,nn);ue(this,nn,!1),ue(this,Is,t.defaultOptions),this.setOptions(t.options),this.observers=[],ue(this,rn,t.client),ue(this,Bt,k(this,rn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ue(this,tn,tu(this.options)),this.state=t.state??k(this,tn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=k(this,dt))==null?void 0:t.promise}setOptions(t){if(this.options={...k(this,Is),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=tu(this.options);r.data!==void 0&&(this.setState(eu(r.data,r.dataUpdatedAt)),ue(this,tn,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&k(this,Bt).remove(this)}setData(t,r){const n=Ea(this.state.data,t,this.options);return Re(this,Xt,yr).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Re(this,Xt,yr).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,o;const r=(n=k(this,dt))==null?void 0:n.promise;return(o=k(this,dt))==null||o.cancel(t),r?r.then(Nt).catch(Nt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(k(this,tn))}isActive(){return this.observers.some(t=>Ut(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Mo||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>zr(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:!Nf(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=k(this,dt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=k(this,dt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),k(this,Bt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(k(this,dt)&&(k(this,nn)?k(this,dt).cancel({revert:!0}):k(this,dt).cancelRetry()),this.scheduleGc()),k(this,Bt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Re(this,Xt,yr).call(this,{type:"invalidate"})}async fetch(t,r){var u,d,h,m,_,g,v,x,S,w,P,I;if(this.state.fetchStatus!=="idle"&&((u=k(this,dt))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(k(this,dt))return k(this,dt).continueRetry(),k(this,dt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const C=this.observers.find(N=>N.options.queryFn);C&&this.setOptions(C.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,o=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(ue(this,nn,!0),n.signal)})},i=()=>{const C=Rf(this.options,r),T=(()=>{const O={client:k(this,rn),queryKey:this.queryKey,meta:this.meta};return o(O),O})();return ue(this,nn,!1),this.options.persister?this.options.persister(C,T,this):C(T)},l=(()=>{const C={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:k(this,rn),state:this.state,fetchFn:i};return o(C),C})();(d=this.options.behavior)==null||d.onFetch(l,this),ue(this,Hn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=l.fetchOptions)==null?void 0:h.meta))&&Re(this,Xt,yr).call(this,{type:"fetch",meta:(m=l.fetchOptions)==null?void 0:m.meta}),ue(this,dt,Af({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,onCancel:C=>{C instanceof Pa&&C.revert&&this.setState({...k(this,Hn),fetchStatus:"idle"}),n.abort()},onFail:(C,N)=>{Re(this,Xt,yr).call(this,{type:"failed",failureCount:C,error:N})},onPause:()=>{Re(this,Xt,yr).call(this,{type:"pause"})},onContinue:()=>{Re(this,Xt,yr).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const C=await k(this,dt).start();if(C===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(C),(g=(_=k(this,Bt).config).onSuccess)==null||g.call(_,C,this),(x=(v=k(this,Bt).config).onSettled)==null||x.call(v,C,this.state.error,this),C}catch(C){if(C instanceof Pa){if(C.silent)return k(this,dt).promise;if(C.revert){if(this.state.data===void 0)throw C;return this.state.data}}throw Re(this,Xt,yr).call(this,{type:"error",error:C}),(w=(S=k(this,Bt).config).onError)==null||w.call(S,C,this),(I=(P=k(this,Bt).config).onSettled)==null||I.call(P,this.state.data,C,this),C}finally{this.scheduleGc()}}},tn=new WeakMap,Hn=new WeakMap,Bt=new WeakMap,rn=new WeakMap,dt=new WeakMap,Is=new WeakMap,nn=new WeakMap,Xt=new WeakSet,yr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Mf(n.data,this.options),fetchMeta:t.meta??null};case"success":const o={...n,...eu(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ue(this,Hn,t.manual?o:void 0),o;case"error":const i=t.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),ht.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),k(this,Bt).notify({query:this,type:"updated",action:t})})},Ad);function Mf(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Of(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function eu(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function tu(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var It,Te,Ps,bt,sn,$n,vr,kr,Ns,Wn,Vn,on,an,Mr,Gn,He,ms,Na,Ra,Ta,Oa,Aa,ka,Ma,Lf,kd,pv=(kd=class extends Ls{constructor(t,r){super();ye(this,He);ye(this,It);ye(this,Te);ye(this,Ps);ye(this,bt);ye(this,sn);ye(this,$n);ye(this,vr);ye(this,kr);ye(this,Ns);ye(this,Wn);ye(this,Vn);ye(this,on);ye(this,an);ye(this,Mr);ye(this,Gn,new Set);this.options=r,ue(this,It,t),ue(this,kr,null),ue(this,vr,Ia()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(k(this,Te).addObserver(this),ru(k(this,Te),this.options)?Re(this,He,ms).call(this):this.updateResult(),Re(this,He,Oa).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return La(k(this,Te),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return La(k(this,Te),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Re(this,He,Aa).call(this),Re(this,He,ka).call(this),k(this,Te).removeObserver(this)}setOptions(t){const r=this.options,n=k(this,Te);if(this.options=k(this,It).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ut(this.options.enabled,k(this,Te))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Re(this,He,Ma).call(this),k(this,Te).setOptions(this.options),r._defaulted&&!Ca(this.options,r)&&k(this,It).getQueryCache().notify({type:"observerOptionsUpdated",query:k(this,Te),observer:this});const o=this.hasListeners();o&&nu(k(this,Te),n,this.options,r)&&Re(this,He,ms).call(this),this.updateResult(),o&&(k(this,Te)!==n||Ut(this.options.enabled,k(this,Te))!==Ut(r.enabled,k(this,Te))||zr(this.options.staleTime,k(this,Te))!==zr(r.staleTime,k(this,Te)))&&Re(this,He,Na).call(this);const i=Re(this,He,Ra).call(this);o&&(k(this,Te)!==n||Ut(this.options.enabled,k(this,Te))!==Ut(r.enabled,k(this,Te))||i!==k(this,Mr))&&Re(this,He,Ta).call(this,i)}getOptimisticResult(t){const r=k(this,It).getQueryCache().build(k(this,It),t),n=this.createResult(r,t);return mv(this,n)&&(ue(this,bt,n),ue(this,$n,this.options),ue(this,sn,k(this,Te).state)),n}getCurrentResult(){return k(this,bt)}trackResult(t,r){return new Proxy(t,{get:(n,o)=>(this.trackProp(o),r==null||r(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&k(this,vr).status==="pending"&&k(this,vr).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,o))})}trackProp(t){k(this,Gn).add(t)}getCurrentQuery(){return k(this,Te)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=k(this,It).defaultQueryOptions(t),n=k(this,It).getQueryCache().build(k(this,It),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Re(this,He,ms).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),k(this,bt)))}createResult(t,r){var z;const n=k(this,Te),o=this.options,i=k(this,bt),c=k(this,sn),l=k(this,$n),d=t!==n?t.state:k(this,Ps),{state:h}=t;let m={...h},_=!1,g;if(r._optimisticResults){const D=this.hasListeners(),B=!D&&ru(t,r),G=D&&nu(t,n,r,o);(B||G)&&(m={...m,...Mf(h.data,t.options)}),r._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:v,errorUpdatedAt:x,status:S}=m;g=m.data;let w=!1;if(r.placeholderData!==void 0&&g===void 0&&S==="pending"){let D;i!=null&&i.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData)?(D=i.data,w=!0):D=typeof r.placeholderData=="function"?r.placeholderData((z=k(this,Vn))==null?void 0:z.state.data,k(this,Vn)):r.placeholderData,D!==void 0&&(S="success",g=Ea(i==null?void 0:i.data,D,r),_=!0)}if(r.select&&g!==void 0&&!w)if(i&&g===(c==null?void 0:c.data)&&r.select===k(this,Ns))g=k(this,Wn);else try{ue(this,Ns,r.select),g=r.select(g),g=Ea(i==null?void 0:i.data,g,r),ue(this,Wn,g),ue(this,kr,null)}catch(D){ue(this,kr,D)}k(this,kr)&&(v=k(this,kr),g=k(this,Wn),x=Date.now(),S="error");const P=m.fetchStatus==="fetching",I=S==="pending",C=S==="error",N=I&&P,T=g!==void 0,M={status:S,fetchStatus:m.fetchStatus,isPending:I,isSuccess:S==="success",isError:C,isInitialLoading:N,isLoading:N,data:g,dataUpdatedAt:m.dataUpdatedAt,error:v,errorUpdatedAt:x,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:P,isRefetching:P&&!I,isLoadingError:C&&!T,isPaused:m.fetchStatus==="paused",isPlaceholderData:_,isRefetchError:C&&T,isStale:Sc(t,r),refetch:this.refetch,promise:k(this,vr),isEnabled:Ut(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const D=J=>{M.status==="error"?J.reject(M.error):M.data!==void 0&&J.resolve(M.data)},B=()=>{const J=ue(this,vr,M.promise=Ia());D(J)},G=k(this,vr);switch(G.status){case"pending":t.queryHash===n.queryHash&&D(G);break;case"fulfilled":(M.status==="error"||M.data!==G.value)&&B();break;case"rejected":(M.status!=="error"||M.error!==G.reason)&&B();break}}return M}updateResult(){const t=k(this,bt),r=this.createResult(k(this,Te),this.options);if(ue(this,sn,k(this,Te).state),ue(this,$n,this.options),k(this,sn).data!==void 0&&ue(this,Vn,k(this,Te)),Ca(r,t))return;ue(this,bt,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,i=typeof o=="function"?o():o;if(i==="all"||!i&&!k(this,Gn).size)return!0;const c=new Set(i??k(this,Gn));return this.options.throwOnError&&c.add("error"),Object.keys(k(this,bt)).some(l=>{const u=l;return k(this,bt)[u]!==t[u]&&c.has(u)})};Re(this,He,Lf).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Re(this,He,Oa).call(this)}},It=new WeakMap,Te=new WeakMap,Ps=new WeakMap,bt=new WeakMap,sn=new WeakMap,$n=new WeakMap,vr=new WeakMap,kr=new WeakMap,Ns=new WeakMap,Wn=new WeakMap,Vn=new WeakMap,on=new WeakMap,an=new WeakMap,Mr=new WeakMap,Gn=new WeakMap,He=new WeakSet,ms=function(t){Re(this,He,Ma).call(this);let r=k(this,Te).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Nt)),r},Na=function(){Re(this,He,Aa).call(this);const t=zr(this.options.staleTime,k(this,Te));if(pn||k(this,bt).isStale||!ja(t))return;const n=Nf(k(this,bt).dataUpdatedAt,t)+1;ue(this,on,Yr.setTimeout(()=>{k(this,bt).isStale||this.updateResult()},n))},Ra=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(k(this,Te)):this.options.refetchInterval)??!1},Ta=function(t){Re(this,He,ka).call(this),ue(this,Mr,t),!(pn||Ut(this.options.enabled,k(this,Te))===!1||!ja(k(this,Mr))||k(this,Mr)===0)&&ue(this,an,Yr.setInterval(()=>{(this.options.refetchIntervalInBackground||jc.isFocused())&&Re(this,He,ms).call(this)},k(this,Mr)))},Oa=function(){Re(this,He,Na).call(this),Re(this,He,Ta).call(this,Re(this,He,Ra).call(this))},Aa=function(){k(this,on)&&(Yr.clearTimeout(k(this,on)),ue(this,on,void 0))},ka=function(){k(this,an)&&(Yr.clearInterval(k(this,an)),ue(this,an,void 0))},Ma=function(){const t=k(this,It).getQueryCache().build(k(this,It),this.options);if(t===k(this,Te))return;const r=k(this,Te);ue(this,Te,t),ue(this,Ps,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},Lf=function(t){ht.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(k(this,bt))}),k(this,It).getQueryCache().notify({query:k(this,Te),type:"observerResultsUpdated"})})},kd);function hv(e,t){return Ut(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ru(e,t){return hv(e,t)||e.state.data!==void 0&&La(e,t,t.refetchOnMount)}function La(e,t,r){if(Ut(t.enabled,e)!==!1&&zr(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Sc(e,t)}return!1}function nu(e,t,r,n){return(e!==t||Ut(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Sc(e,r)}function Sc(e,t){return Ut(t.enabled,e)!==!1&&e.isStaleByTime(zr(t.staleTime,e))}function mv(e,t){return!Ca(e.getCurrentResult(),t)}function su(e){return{onFetch:(t,r)=>{var h,m,_,g,v;const n=t.options,o=(_=(m=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:m.fetchMore)==null?void 0:_.direction,i=((g=t.state.data)==null?void 0:g.pages)||[],c=((v=t.state.data)==null?void 0:v.pageParams)||[];let l={pages:[],pageParams:[]},u=0;const d=async()=>{let x=!1;const S=I=>{iv(I,()=>t.signal,()=>x=!0)},w=Rf(t.options,t.fetchOptions),P=async(I,C,N)=>{if(x)return Promise.reject();if(C==null&&I.pages.length)return Promise.resolve(I);const O=(()=>{const B={client:t.client,queryKey:t.queryKey,pageParam:C,direction:N?"backward":"forward",meta:t.options.meta};return S(B),B})(),M=await w(O),{maxPages:z}=t.options,D=N?ov:sv;return{pages:D(I.pages,M,z),pageParams:D(I.pageParams,C,z)}};if(o&&i.length){const I=o==="backward",C=I?_v:ou,N={pages:i,pageParams:c},T=C(n,N);l=await P(N,T,I)}else{const I=e??i.length;do{const C=u===0?c[0]??n.initialPageParam:ou(n,l);if(u>0&&C==null)break;l=await P(l,C),u++}while(u<I)}return l};t.options.persister?t.fetchFn=()=>{var x,S;return(S=(x=t.options).persister)==null?void 0:S.call(x,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=d}}}function ou(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function _v(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Rs,lr,jt,cn,ur,Pr,Md,gv=(Md=class extends kf{constructor(t){super();ye(this,ur);ye(this,Rs);ye(this,lr);ye(this,jt);ye(this,cn);ue(this,Rs,t.client),this.mutationId=t.mutationId,ue(this,jt,t.mutationCache),ue(this,lr,[]),this.state=t.state||yv(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){k(this,lr).includes(t)||(k(this,lr).push(t),this.clearGcTimeout(),k(this,jt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ue(this,lr,k(this,lr).filter(r=>r!==t)),this.scheduleGc(),k(this,jt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){k(this,lr).length||(this.state.status==="pending"?this.scheduleGc():k(this,jt).remove(this))}continue(){var t;return((t=k(this,cn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var c,l,u,d,h,m,_,g,v,x,S,w,P,I,C,N,T,O,M,z;const r=()=>{Re(this,ur,Pr).call(this,{type:"continue"})},n={client:k(this,Rs),meta:this.options.meta,mutationKey:this.options.mutationKey};ue(this,cn,Af({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(D,B)=>{Re(this,ur,Pr).call(this,{type:"failed",failureCount:D,error:B})},onPause:()=>{Re(this,ur,Pr).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>k(this,jt).canRun(this)}));const o=this.state.status==="pending",i=!k(this,cn).canStart();try{if(o)r();else{Re(this,ur,Pr).call(this,{type:"pending",variables:t,isPaused:i}),await((l=(c=k(this,jt).config).onMutate)==null?void 0:l.call(c,t,this,n));const B=await((d=(u=this.options).onMutate)==null?void 0:d.call(u,t,n));B!==this.state.context&&Re(this,ur,Pr).call(this,{type:"pending",context:B,variables:t,isPaused:i})}const D=await k(this,cn).start();return await((m=(h=k(this,jt).config).onSuccess)==null?void 0:m.call(h,D,t,this.state.context,this,n)),await((g=(_=this.options).onSuccess)==null?void 0:g.call(_,D,t,this.state.context,n)),await((x=(v=k(this,jt).config).onSettled)==null?void 0:x.call(v,D,null,this.state.variables,this.state.context,this,n)),await((w=(S=this.options).onSettled)==null?void 0:w.call(S,D,null,t,this.state.context,n)),Re(this,ur,Pr).call(this,{type:"success",data:D}),D}catch(D){try{await((I=(P=k(this,jt).config).onError)==null?void 0:I.call(P,D,t,this.state.context,this,n))}catch(B){Promise.reject(B)}try{await((N=(C=this.options).onError)==null?void 0:N.call(C,D,t,this.state.context,n))}catch(B){Promise.reject(B)}try{await((O=(T=k(this,jt).config).onSettled)==null?void 0:O.call(T,void 0,D,this.state.variables,this.state.context,this,n))}catch(B){Promise.reject(B)}try{await((z=(M=this.options).onSettled)==null?void 0:z.call(M,void 0,D,t,this.state.context,n))}catch(B){Promise.reject(B)}throw Re(this,ur,Pr).call(this,{type:"error",error:D}),D}finally{k(this,jt).runNext(this)}}},Rs=new WeakMap,lr=new WeakMap,jt=new WeakMap,cn=new WeakMap,ur=new WeakSet,Pr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),ht.batch(()=>{k(this,lr).forEach(n=>{n.onMutationUpdate(t)}),k(this,jt).notify({mutation:this,type:"updated",action:t})})},Md);function yv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var xr,Jt,Ts,Ld,vv=(Ld=class extends Ls{constructor(t={}){super();ye(this,xr);ye(this,Jt);ye(this,Ts);this.config=t,ue(this,xr,new Set),ue(this,Jt,new Map),ue(this,Ts,0)}build(t,r,n){const o=new gv({client:t,mutationCache:this,mutationId:++ro(this,Ts)._,options:t.defaultMutationOptions(r),state:n});return this.add(o),o}add(t){k(this,xr).add(t);const r=so(t);if(typeof r=="string"){const n=k(this,Jt).get(r);n?n.push(t):k(this,Jt).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(k(this,xr).delete(t)){const r=so(t);if(typeof r=="string"){const n=k(this,Jt).get(r);if(n)if(n.length>1){const o=n.indexOf(t);o!==-1&&n.splice(o,1)}else n[0]===t&&k(this,Jt).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=so(t);if(typeof r=="string"){const n=k(this,Jt).get(r),o=n==null?void 0:n.find(i=>i.state.status==="pending");return!o||o===t}else return!0}runNext(t){var n;const r=so(t);if(typeof r=="string"){const o=(n=k(this,Jt).get(r))==null?void 0:n.find(i=>i!==t&&i.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ht.batch(()=>{k(this,xr).forEach(t=>{this.notify({type:"removed",mutation:t})}),k(this,xr).clear(),k(this,Jt).clear()})}getAll(){return Array.from(k(this,xr))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Xl(r,n))}findAll(t={}){return this.getAll().filter(r=>Xl(t,r))}notify(t){ht.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return ht.batch(()=>Promise.all(t.map(r=>r.continue().catch(Nt))))}},xr=new WeakMap,Jt=new WeakMap,Ts=new WeakMap,Ld);function so(e){var t;return(t=e.options.scope)==null?void 0:t.id}var dr,Dd,xv=(Dd=class extends Ls{constructor(t={}){super();ye(this,dr);this.config=t,ue(this,dr,new Map)}build(t,r,n){const o=r.queryKey,i=r.queryHash??bc(o,r);let c=this.get(i);return c||(c=new fv({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(o)}),this.add(c)),c}add(t){k(this,dr).has(t.queryHash)||(k(this,dr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=k(this,dr).get(t.queryHash);r&&(t.destroy(),r===t&&k(this,dr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ht.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return k(this,dr).get(t)}getAll(){return[...k(this,dr).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Yl(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Yl(t,n)):r}notify(t){ht.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){ht.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ht.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},dr=new WeakMap,Dd),et,Lr,Dr,Kn,Qn,Fr,Yn,Xn,Fd,Df=(Fd=class{constructor(e={}){ye(this,et);ye(this,Lr);ye(this,Dr);ye(this,Kn);ye(this,Qn);ye(this,Fr);ye(this,Yn);ye(this,Xn);ue(this,et,e.queryCache||new xv),ue(this,Lr,e.mutationCache||new vv),ue(this,Dr,e.defaultOptions||{}),ue(this,Kn,new Map),ue(this,Qn,new Map),ue(this,Fr,0)}mount(){ro(this,Fr)._++,k(this,Fr)===1&&(ue(this,Yn,jc.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,et).onFocus())})),ue(this,Xn,Lo.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,et).onOnline())})))}unmount(){var e,t;ro(this,Fr)._--,k(this,Fr)===0&&((e=k(this,Yn))==null||e.call(this),ue(this,Yn,void 0),(t=k(this,Xn))==null||t.call(this),ue(this,Xn,void 0))}isFetching(e){return k(this,et).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return k(this,Lr).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=k(this,et).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=k(this,et).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(zr(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return k(this,et).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),o=k(this,et).get(n.queryHash),i=o==null?void 0:o.state.data,c=ev(t,i);if(c!==void 0)return k(this,et).build(this,n).setData(c,{...r,manual:!0})}setQueriesData(e,t,r){return ht.batch(()=>k(this,et).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=k(this,et).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=k(this,et);ht.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=k(this,et);return ht.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=ht.batch(()=>k(this,et).findAll(e).map(o=>o.cancel(r)));return Promise.all(n).then(Nt).catch(Nt)}invalidateQueries(e,t={}){return ht.batch(()=>(k(this,et).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=ht.batch(()=>k(this,et).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,r);return r.throwOnError||(i=i.catch(Nt)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(Nt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=k(this,et).build(this,t);return r.isStaleByTime(zr(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Nt).catch(Nt)}fetchInfiniteQuery(e){return e.behavior=su(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Nt).catch(Nt)}ensureInfiniteQueryData(e){return e.behavior=su(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Lo.isOnline()?k(this,Lr).resumePausedMutations():Promise.resolve()}getQueryCache(){return k(this,et)}getMutationCache(){return k(this,Lr)}getDefaultOptions(){return k(this,Dr)}setDefaultOptions(e){ue(this,Dr,e)}setQueryDefaults(e,t){k(this,Kn).set(Ss(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...k(this,Kn).values()],r={};return t.forEach(n=>{Cs(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){k(this,Qn).set(Ss(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...k(this,Qn).values()],r={};return t.forEach(n=>{Cs(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...k(this,Dr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=bc(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===Mo&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...k(this,Dr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){k(this,et).clear(),k(this,Lr).clear()}},et=new WeakMap,Lr=new WeakMap,Dr=new WeakMap,Kn=new WeakMap,Qn=new WeakMap,Fr=new WeakMap,Yn=new WeakMap,Xn=new WeakMap,Fd),Ff=Ht.createContext(void 0),bv=e=>{const t=Ht.useContext(Ff);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},zf=({client:e,children:t})=>(Ht.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),s.jsx(Ff.Provider,{value:e,children:t})),qf=Ht.createContext(!1),jv=()=>Ht.useContext(qf);qf.Provider;function Sv(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Cv=Ht.createContext(Sv()),wv=()=>Ht.useContext(Cv),Ev=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?Tf(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},Iv=e=>{Ht.useEffect(()=>{e.clearReset()},[e])},Pv=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(o&&e.data===void 0||Tf(r,[e.error,n])),Nv=e=>{if(e.suspense){const r=o=>o==="static"?o:Math.max(o??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...o)=>r(n(...o)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Rv=(e,t)=>e.isLoading&&e.isFetching&&!t,Tv=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,iu=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Ov(e,t,r){var _,g,v,x;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const n=jv(),o=wv(),i=bv(),c=i.defaultQueryOptions(e);(g=(_=i.getDefaultOptions().queries)==null?void 0:_._experimental_beforeQuery)==null||g.call(_,c);const l=i.getQueryCache().get(c.queryHash);process.env.NODE_ENV!=="production"&&(c.queryFn||console.error(`[${c.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`)),c._optimisticResults=n?"isRestoring":"optimistic",Nv(c),Ev(c,o,l),Iv(o);const u=!i.getQueryCache().get(c.queryHash),[d]=Ht.useState(()=>new t(i,c)),h=d.getOptimisticResult(c),m=!n&&e.subscribed!==!1;if(Ht.useSyncExternalStore(Ht.useCallback(S=>{const w=m?d.subscribe(ht.batchCalls(S)):Nt;return d.updateResult(),w},[d,m]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),Ht.useEffect(()=>{d.setOptions(c)},[c,d]),Tv(c,h))throw iu(c,d,o);if(Pv({result:h,errorResetBoundary:o,throwOnError:c.throwOnError,query:l,suspense:c.suspense}))throw h.error;if((x=(v=i.getDefaultOptions().queries)==null?void 0:v._experimental_afterQuery)==null||x.call(v,c,h),c.experimental_prefetchInRender&&!pn&&Rv(h,n)){const S=u?iu(c,d,o):l==null?void 0:l.promise;S==null||S.catch(Nt).finally(()=>{d.updateResult()})}return c.notifyOnChangeProps?h:d.trackResult(h)}function Av(e,t){return Ov(e,pv)}const ds={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"}},kv={nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"0",count:0,total:0},Mv="Imagem do produto",au=1,Lv="Marque a caixa para aceitar os termos de política de privacidade.",Dv="Algumas informações estão incorretas ou não foram preenchidas",Fv="Enviar",zv="ditoTrackedProfile",qv=new Df,Bf=j.createContext({}),Bv=({brand:e,constants:t,collectionId:r,children:n,itemsPerPage:o=24,pathname:i,searchParams:c,slug:l,...u})=>{const{PLP_SORT_DEFAULT:d}=t,h=j.useRef(""),[m,_]=j.useState(!1),g=(c==null?void 0:c.toString())??"",v=j.useMemo(()=>{const x=new URLSearchParams(g),S=x.get("query"),w=Number(x.get("page")??1),P=Number(x.get("count")??o),I=x.get("sort"),C=x.getAll("facets"),N=I??(r?"":d);return{base:S?"":i,count:P,facets:U.selectedFacets(C),page:w,sort:N,term:S??null}},[g,i,o,r,d]);return j.useEffect(()=>{h.current!==i&&(h.current=i,window.document.body.scrollTo(0,0))},[i]),s.jsx(Bf.Provider,{value:j.useMemo(()=>({...u,constants:t,openFilters:m,setOpenFilters:_}),[t,m,u]),children:s.jsx(zf,{client:qv,children:s.jsx(xc,{brand:e,collectionId:r,state:v,searchParams:c??new URLSearchParams,children:n})})})},ut=()=>{const e=j.useContext(Bf);if(e===void 0)throw new Error("usePLPContext must be used within a PLPProvider");return e},Do=(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,i)=>Do(o,t[i]));if(Array.isArray(t))return!1;const r=Object.keys(e),n=Object.keys(t);return r.length!==n.length?!1:r.every(o=>Object.prototype.hasOwnProperty.call(t,o)&&Do(e[o],t[o]))},Uv=(e,t,r="page")=>Object.keys(t).some(n=>n===r?!1:!Do(t[n],e[n])),Hv=async e=>{const t=await U.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},Uf=()=>({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}}}),Hf=(e,t,r,n=24)=>{const o=new Set,i=[];if(!Array.isArray(e)||e.length===0)return{taken:o,placedBanners:i};const c=t*n*r;for(const l of e){let u=Number(l.position_grid),d=!1;for(;u<c;){const h=u%r;if(h+l.columns>r){u+=r-h;continue}if(!Array.from({length:l.columns}).some((g,v)=>o.has(u+v))){for(let g=0;g<l.columns;g++)o.add(u+g);i.push(u),d=!0;break}u++}d||console.info(`[PLP INFINITE FAILED BANNER POSITION]: pos=${l.position_grid}, cols=${l.columns}`)}return{taken:o,placedBanners:i}},$o=(e,t,r,n=24)=>{const{placedBanners:o,taken:i}=Hf(e??[],t,r),c=[];let l=0;try{for(;c.length<t*n;)i.has(l)||c.push(l),l++;return{banners:o,products:c}}catch(u){console.info(`[PLP INFINITE FAILED TO GEN POSITIONS]: page=${t}`,u)}return{banners:[],products:c}},Da=(e,t=!1)=>Array.from({length:e},(r,n)=>{const o=n+1;return{loading:t?!1:e===o,page:o}}),$v=(e,t)=>[...e,{loading:!1,page:t}],Wv=(e=1,t=24)=>({nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"1",count:t,total:e}),Vv=(e,t,r,n,o)=>{const i=o,c=(e.length-1)*o+i-1,l=r[c];return t.filter((u,d)=>{const h=n[d];return h<=l||o>i&&h>l})},$f=(e,t)=>{const r=new Map;for(const o of e){const i=Math.floor(o/t);r.has(i)||r.set(i,[]),r.get(i).push(o)}const n=[];for(const[,o]of r){const i=o[Math.floor(Math.random()*o.length)];n.push(i)}return n},Wf=(e,t)=>{if(!e)return[];const r=e.map((n,o)=>n.video&&n.video!==""?o:null).filter(n=>n);return $f(r,t)},Vf=e=>Array.isArray(e)?e.map((t,r)=>({href:`/${e.slice(0,r+1).join("/")}`,name:t})):[],Gv=Object.freeze(Object.defineProperty({__proto__:null,createBreadcrumb:Vf,createPage:$v,createPages:Da,createPagination:Wv,createProduct:Uf,deepEqual:Do,fetchPage:Hv,getBanners:Hf,getPositions:$o,getProductsWithVideo:Wf,getRandomVideoPerRow:$f,getVisibleBanners:Vv,hasStateChangedExceptPage:Uv},Symbol.toStringTag,{value:"Module"})),Kv=(e,t,r,n=0)=>{if(!e.length)return[];let o=0;const i=[];for(let c=0;c<e.length;c+=r){const l=e.slice(c,c+r),u=l.findIndex(d=>{var h;return(h=d.node)==null?void 0:h.video});for(let d=0;d<l.length;d++){const h=c+d,m=n+h,_=t.find(v=>v.position_grid===m+1),g=m+o+1;_&&(o+=_.columns),i.push({position:g,canPlayVideo:d===u})}}return i},Gf=(e,t,r)=>{const n=(t-1)*r,o=t*r;return e>=n&&e<=o},Ds=e=>{var t;return(t=e==null?void 0:e.map(r=>({disable:U.disableSKU(r),size:U.getSKUName(r),skuID:"sku"in r&&r.sku})))==null?void 0:t.filter(r=>r.disable)},Qv=Object.freeze(Object.defineProperty({__proto__:null,createGridPosAndVideo:Kv,getSkusNotify:Ds,isPositionInCurrentPage:Gf},Symbol.toStringTag,{value:"Module"})),Kf=({isMobile:e,ICONS:t,NOTIFY_INFO:r})=>s.jsxs(s.Fragment,{children:[s.jsx(p.Modal.Controls,{navigation:e?"top":"middle",isMobile:e??!1,children:!e&&s.jsxs(s.Fragment,{children:[s.jsx(p.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),s.jsx(p.Button,{"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})}),s.jsx(p.Modal.Title,{navigation:e?"top":"middle",title:r.title})]});Kf.displayName="Notify.Controls";const er={"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 Qf(e){const r=decodeURIComponent(window.document.cookie).split(";");for(const n of r){const[o,i]=n.trim().split("=");if(o===e)return i}}function Cc(e,t,r={}){const o={...{path:"/",expires:new Date(Date.now()+36e5)},...r};let i=`${encodeURIComponent(e)}=${encodeURIComponent(t??"")}`;for(const c in o)o[c]!==void 0&&(i+=`; ${c}`,c==="expires"?i+=`=${o[c].toUTCString()}`:typeof o[c]=="boolean"?i+=`; ${o[c]?"true":"false"}`:i+=`=${o[c]}`);window.document.cookie=i}const Yf=j.createContext({amount:null,boxes:null,toExpire:null,loading:!0,logout:()=>null,getCurrentCredits:()=>({credits:0,cashback:0})}),Yv=({children:e,AUTH_TOKEN_COOKIE:t})=>{var h;const{shipping:r,cartStore:n}=Xe(),[o,i]=j.useState({amount:null,boxes:null,toExpire:null,loading:!0}),c=j.useCallback(async()=>{try{await fetch("/api/user",{priority:"low"}).then(m=>m.json()).then(m=>{const{userCredits:_,userId:g,sub:v,...x}=m,{wishlist:S,...w}=x;i({amount:_==null?void 0:_.amount,boxes:_==null?void 0:_.boxes,toExpire:_==null?void 0:_.toExpire,user:{...w,userId:g,sub:v??""},loading:!1,wishlist:(typeof S=="string"?S.split(",").filter(Boolean):S)??[]})})}catch(m){console.error("user info and my credits request",m),i({...o,loading:!1})}},[i]),l=j.useCallback(()=>{Cc(t),c()},[c]),u=j.useCallback(()=>o.boxes?o.boxes.reduce((m,_)=>_.gift_card_box.refid==="C1643"?(m.cashback+=_.amount,m):(m.credits+=_.amount,m),{cashback:0,credits:0}):{cashback:0,credits:0},[o]),d=j.useCallback(async()=>{var m,_,g;if((m=o.user)!=null&&m.postalCode&&(n!=null&&n.id)&&!(n!=null&&n.loading)&&!((g=(_=n==null?void 0:n.shippingData)==null?void 0:_.address)!=null&&g.postalCode))try{await r(o.user.postalCode)}catch(v){console.error("Error auto-filling CEP:",v)}},[(h=o.user)==null?void 0:h.postalCode]);return j.useEffect(()=>{c()},[c]),j.useEffect(()=>{d()},[d]),s.jsx(Yf.Provider,{value:j.useMemo(()=>({...o,getCurrentCredits:u,logout:l}),[o,u,l]),children:e})},rs=()=>{const e=j.useContext(Yf);if(e===void 0)throw new Error("useContext(SessionContext) must be used within a SessionProvider");return e},Xf=({color:e,delay:t=3e3,sku:r,setStatus:n,setIsLoading:o,NEWSLETTER_CONFIGS:i,NOTIFY_INFO:c})=>{const l=j.useRef(null),[u,d]=j.useState(null),{sendDataLayerEvent:h}=Ee(),{user:m}=rs(),_=m!=null&&m.firstName?`${m==null?void 0:m.firstName} ${m==null?void 0:m.lastName}`:"";return s.jsx("div",{className:er["notify--form"],children:s.jsxs("form",{action:"POST",onSubmit:async g=>{var S;g.preventDefault();const v=g.currentTarget,x=((S=v.querySelector("input"))==null?void 0:S.value)??"";fetch("/api/aviseme",{method:"POST",body:JSON.stringify({userName:_,email:x,sku:r==null?void 0:r.skuID})}).then(w=>n(w.ok)).finally(()=>{o(!1),v.reset(),h({functionKey:"readyEvents",data:{event:"notify_me",readyData:{size:r==null?void 0:r.size,item_id:r==null?void 0:r.skuID,color:e}}}),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{var w;(w=document.body)==null||w.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0})),d(!0),n(null)},t)})},children:[s.jsx(p.TextField.Structure,{input:s.jsx(p.TextField.Input,{feedback:typeof u=="boolean"&&u?"error":"none",type:"email",label:c.email_placeholder,mode:"over-label",variant:"outlined",sizeVariant:"large",onChange:g=>d(!g.target.validity.valid),required:!0}),supportText:typeof u=="boolean"&&u?s.jsx(p.TextField.SupportText,{text:i.messages.invalid_email,feedback:"error"}):s.jsx(s.Fragment,{})}),s.jsx(p.Button,{disabled:!(u===!1||!r)||!r,type:"submit",size:"large",children:c.button})]})})};Xf.displayName="Notify.Form";const Jf=({isLoading:e=!1})=>s.jsx("div",{className:er["notify--loading"],"data-loading":e,children:s.jsx(p.Spinner,{})});Jf.displayName="Notify.Loading";const wc={"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"},Zf=({children:e,...t})=>s.jsx("div",{...t,className:wc["product-variation-list--list"],children:e});Zf.displayName="ProductVariationList.List";const ep=({fill:e="#1352C7",src:t="",type:r="size",text:n,...o})=>{const{nextimage:i}=Ae();return r==="size"?s.jsxs(p.ToggleSize.Wrapper,{...o,size:"large",variation:"ghost",children:[s.jsx(p.ToggleSize.DisabledAdornment,{title:"disabled-adornment-size"}),s.jsx(p.ToggleSize.Text,{children:n})]}):s.jsxs(p.ToggleStyle.Wrapper,{...o,size:"small",title:"wrapper-texture",children:[s.jsx(p.ToggleStyle.DisabledAdornment,{title:"disabled-adornment-texture"}),r==="color"?s.jsx(p.ToggleStyle.Color,{background:e,title:"color"}):s.jsx(p.ToggleStyle.Texture,{title:"texture",children:s.jsx(i,{alt:n??"image",height:40,src:t,width:40})})]})};ep.displayName="ProductVariationList.Option";const tp=({children:e,...t})=>s.jsx("div",{className:wc["product-variation-list"],...t,children:e});tp.displayName="ProductVariationList.Root";const rp=({children:e,title:t,...r})=>s.jsxs("div",{...r,className:wc["product-variation-list--title"],children:[t?s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.SectionWrapper,{children:s.jsx("p",{children:t})})}):s.jsx(s.Fragment,{}),e]});rp.displayName="ProductVariationList.Title";const rr={List:Zf,Option:ep,Title:rp,Root:tp},Xv=(e,t)=>{if(!e||!t)return!1;const r=Object.keys(e);return r.length!==Object.keys(t).length?!1:r.every(n=>e[n]===t[n])},np=({children:e,label:t="",skus:r,sku:n,setSku:o})=>s.jsxs(s.Fragment,{children:[s.jsx("div",{className:er["notify--selector--header"],children:e}),s.jsxs(rr.Root,{className:er["notify--selector"],children:[s.jsx(rr.Title,{title:t}),s.jsx(rr.List,{children:Array.isArray(r)&&r.map((i,c)=>{const l=Xv(n,i);return s.jsx(rr.Option,{active:l,onClick:()=>o(l?null:i),text:String(i.size),type:"size"},c)})})]})]});np.displayName="Notify.Selector";const cu=({type:e,icon:t,title:r,subtitle:n})=>s.jsx("div",{className:er[`notify--status--${e}`],children:s.jsx(p.TextStructure.Root,{adornment:{start:s.jsx(p.Icon,{name:t,size:"large"})},children:s.jsxs(p.TextStructure.DivWrapper,{children:[s.jsx("h2",{children:r}),s.jsx("h3",{children:n})]})})}),sp=({status:e,ICONS:t,PRODUCT_CARD_TEXTS:r})=>s.jsxs("div",{className:er["notify--status"],"data-status":e,children:[s.jsx(cu,{...r.success,icon:t.check_circle,type:"success"}),s.jsx(cu,{...r.error,icon:t.alert_circle,type:"error"})]});sp.displayName="Notify.Status";const Ec=({color:e,open:t,setVisible:r,skus:n,sku:o,setSku:i,ICONS:c,NEWSLETTER_CONFIGS:l,NOTIFY_INFO:u,PRODUCT_CARD_TEXTS:d,Z_INDEX_WAR:h})=>{const[m,_]=j.useState(!1),[g,v]=j.useState(null),{isMobile:x}=xe();return s.jsxs(p.Modal.Root,{isMobile:x??!1,isOpen:t,setIsOpen:r,variant:x?"sideBottom":"sideLeft",style:{zIndex:h.modal},className:er["modal-modifier"],children:[s.jsx(p.Modal.Header,{navigation:"top",className:er["notify--header-modifier"],children:s.jsx(Kf,{isMobile:x??!1,ICONS:c,NOTIFY_INFO:u})}),s.jsxs(p.Modal.Body,{className:er["notify--modal--body"],children:[s.jsxs("div",{className:er["notify--container"],children:[s.jsxs(np,{label:u.selector_label,sku:o,skus:n,setSku:i,children:[s.jsx("p",{children:u.subtitle}),s.jsx("span",{children:u.description})]}),s.jsx(Xf,{delay:4e3,sku:o,setStatus:v,setIsLoading:_,color:e,NEWSLETTER_CONFIGS:l,NOTIFY_INFO:u}),s.jsx(Jf,{isLoading:m}),s.jsx("div",{className:er["notify--selector--header"],children:s.jsx("span",{children:u.legal})})]}),s.jsx(sp,{status:g,ICONS:c,PRODUCT_CARD_TEXTS:d})]})]})};Ec.displayName="Notify";const Fs=({skus:e,ICONS:t,NEWSLETTER_CONFIGS:r,NOTIFY_INFO:n,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:i,...c})=>{const l=Ds(e??[]);return s.jsx(Ec,{...c,skus:l,ICONS:t,NEWSLETTER_CONFIGS:r,NOTIFY_INFO:n,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:i})};Fs.displayName="PDC.Notification";const Ur=yn.create(e=>({banners:[],load:!1,pages:[],products:[],createPagesScroll:(t,r)=>{e(n=>({...n,...r,pages:Da(t)}))},trimPages:t=>{e(r=>r.pages.length?{...r,pages:r.pages.filter(n=>n.page<=t).map(n=>({...n,loading:!1}))}:r)},addPage:(t,r)=>{e(n=>n.pages.some(o=>o.page===t)?n:{...n,...r,pages:[...n.pages,{page:t,loading:!1}]})},reset:()=>e(()=>({pages:Da(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)}})),op=j.createContext({}),ip=({banners:e,children:t})=>{const{router:r}=Ae(),{isMobile:n}=xe(),{searchParams:o}=ft(),{addPage:i}=Ur(),{constants:c}=ut(),[l,u]=j.useState(!1),[d,h]=j.useState(null),[m,_]=j.useState([]),g=n?8:16,v=n?2:4,{ITEMS_PER_PAGE:x,ICONS:S,NEWSLETTER_CONFIGS:w,NOTIFY_INFO:P,PRODUCT_CARD_TEXTS:I,Z_INDEX_WAR:C}=c,N=j.useCallback((M,z,D=!1)=>{const B=M.page+1;if(D===!0&&B<=z){const G=$o(e,B,v,x);i(B,G)}},[i,e,v,x]),T=j.useCallback(M=>{const z=new URLSearchParams(o.toString()),D=Number(z.get("page")??1);M!==D&&(z.set("page",String(M)),r.replace(`?${z.toString()}`,{scroll:!1}))},[r,o]),O=j.useCallback((M,z)=>{const D=z?Ds([z]):null;_(M),h(D!=null&&D.length?D[0]:null),u(!0)},[]);return s.jsxs(op.Provider,{value:j.useMemo(()=>({addNewPage:N,gap:g,columns:v,handleNotify:O,updateParamPage:T}),[N,O,g,v,T]),children:[t,s.jsx(Fs,{open:l,sku:d,skus:m,setSku:h,setVisible:u,ICONS:S,NEWSLETTER_CONFIGS:w,NOTIFY_INFO:P,PRODUCT_CARD_TEXTS:I,Z_INDEX_WAR:C})]})},Hr=()=>{const e=j.useContext(op);if(e===void 0)throw new Error("PLPInfiniteScrollContext must be used within a ScrollInfiniteProvider");return e},ap=j.createContext({gridBanners:void 0,banners:[]}),Jv=({children:e,data:t,device:r,SectionZone:n,COMMON_PAGE_COLUMN_GAP_PDC:o})=>{const{isMobile:i}=xe(),c=(t==null?void 0:t.sections.filter(m=>m.name!=="List Product Banners"))??[],l=c.slice(0,au),u=c.slice(au,c.length),d=t==null?void 0:t.sections.find(m=>m.name==="List Product Banners"),h=j.useMemo(()=>{var m,_;return((_=(m=d==null?void 0:d.data)==null?void 0:m.banners)==null?void 0:_.map(g=>({...g.banner,columns:g.bannerWidth,position_grid:g.bannerPosition})))??[]},[d]);return i&&r==="mobile"||!i&&r==="desktop"?s.jsxs(ap.Provider,{value:{gridBanners:d,banners:h},children:[s.jsx(n,{data:l??[]}),s.jsxs(p.Utils.Column,{gap:o,className:p.helpers.classNameConcat("utils-column-modifier"),children:[e,s.jsx(n,{data:u??[]})]})]}):s.jsx(s.Fragment,{})},zs=()=>{const e=j.useContext(ap);return e===void 0&&console.error("Needs PLPContentContext on parent component"),e},cp=j.createContext({}),lp=({children:e,filters:t,...r})=>{var i;const{constants:{PLP_FILTERS:n}}=ut(),o=(i=t.facets)==null?void 0:i.filter(c=>n.find(l=>l.key===c.key));return s.jsx(cp.Provider,{value:j.useMemo(()=>({...r,filters:{...t,facets:o}}),[t,o,r]),children:e})},$r=()=>{const e=j.useContext(cp);if(e===void 0)throw new Error("useFilterContext must be used within a FilterProvider");return e},up=j.createContext({product:void 0}),Zv=({children:e,data:t,productId:r,COMMON_PAGE_COLUMN_GAP:n,SectionZone:o})=>s.jsxs(up.Provider,{value:{productId:r},children:[e,s.jsx(p.Utils.Column,{gap:n,className:p.helpers.classNameConcat("utils-column-modifier"),children:s.jsx(o,{data:(t==null?void 0:t.sections)??[]})})]}),dp=()=>{const e=j.useContext(up);return e||console.error("use this hook only inside PDPContentProvider hierarchy"),e},Fa=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase().trim();function ex(e,t=1e3){let r=!1;return(...n)=>{r||(e(...n),r=!0,setTimeout(()=>{r=!1},t))}}function tx(e,t=1e3){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>{e(...n)},t)}}const fp=(e,t)=>t.getTime()>e.getTime()?Math.abs(t.getTime()-e.getTime()):0,_s=(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),rx=["name","email","phone","date","cpf","cep"],lu={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}$/},pp=({type:e,input:t,required:r=!1})=>{if(typeof t!="string"||!r&&t===""||!lu[e])return!0;const n=t.trim();return lu[e].test(n)},nx=e=>{const t=/\/(\d+)-\d+-\d+\/(.+?)\./,r=typeof e=="string"?e.match(t):null;return r?r[2].replace(/-/g," "):Mv},sx=Object.freeze(Object.defineProperty({__proto__:null,FieldTypes:rx,debounce:tx,getAltTextFromUrl:nx,getAuthenticatedUser:U.getAuthenticatedUser,getCookie:Qf,getDaysHoursMinutesSeconds:_s,getMilliSeconds:fp,removeAccentsAndReplaceSpaces:Fa,setCookie:Cc,throttle:ex,validateInput:pp},Symbol.toStringTag,{value:"Module"})),ox=({fields:e})=>{const t={};return{mountedFields:(e==null?void 0:e.reduce((n,o)=>(t[o.master_data_field]="none",{...n,[o.master_data_field]:o}),{}))??{},mountedInputsStatus:t}},ix=({formData:e,mountedFields:t,inputsStatus:r,hasTermsAndConditions:n,checkboxRef:o,setFormStatus:i})=>{let c=!1,l=!1;const u={...r};return n&&!o.current&&(i("unchecked"),c=!0),e.forEach((d,h)=>{var g;if(h==="terms-and-conditions")return;const m=(g=t[h])==null?void 0:g.required;if(m&&!d){u[h]="required",c=!0;return}pp({type:t[h].type,input:d,required:m})||(u[h]="error",l=!0),typeof d=="string"&&e.set(h,d.toString().trim())}),{hasEmptyFields:c,hasErrors:l,inputStatusToUpdate:u}};async function hp(e){const t=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-1",t);return Array.from(new Uint8Array(r)).map(i=>i.toString(16).padStart(2,"0")).join("")}const mp=async e=>await fetch("/api/dito-ingest",{method:"POST",body:JSON.stringify(e)}).then(r=>r.json()),_p=j.createContext({}),gp=({children:e,masterDataEmailField:t,fields:r,variant:n,dito:o,CONSTANTS:{MASTER_DATA_ENTITY:i,NEWSLETTER_CONFIGS:c}})=>{const{sendDataLayerEvent:l}=Ee(),u=c.hasTermsAndConditions,{mountedFields:d,mountedInputsStatus:h}=j.useMemo(()=>ox({fields:r}),[r]),m=j.useRef(!1),[_,g]=j.useState("idle"),[v,x]=j.useState(h),S=async({searchFields:O,entity:M})=>{const z=await Ln.post("/api/master-data/search",{body:{masterDataEntity:M,searchFields:O,headers:{"REST-Range":"resources=0-49"}}});return console.info(z),z.data},w=async({documentId:O,fieldsToBeUpdated:M,entity:z})=>(await Ln.post("/api/master-data/update",{dataEntityName:z,documentId:O,fieldsToBeUpdated:M})).status,P=j.useCallback(async({payload:O,response:M},z,D)=>{var X;const{email:B,...G}=O,[J]=await S({searchFields:{[z]:B},entity:D??i.newsletter}),Y=Array.isArray(J)?(X=J[0])==null?void 0:X.id:void 0;return J&&await w({documentId:Y,fieldsToBeUpdated:G,entity:D??i.newsletter})!==204?{...M,status:"error"}:{...M,status:"success"}},[]),I=j.useCallback(async({formData:O},M,z)=>{const D={status:"idle",inputsStatus:{}},B={};O.forEach((X,Z)=>{B[Z]=X});const G=await hp(B.email||""),J=new Date().toISOString(),Y=[{action:o==null?void 0:o.actionName,timestamp:J,type:"TRACK",user_id:G,context:{user_agent:navigator.userAgent},properties:{custom_data:{email:B.email||z,nome:B.name,origem:o==null?void 0:o.originName}}}];G&&(Y.push({user_id:G,timestamp:J,type:"IDENTIFY",traits:{id:G,created_at:J,name:B.name,email:B.email||z,phone:B==null?void 0:B.phone}}),Ao.set(zv,G));try{const X=await Ln.post("/api/master-data",{body:{payload:B,masterDataEntity:M??i.newsletter}});mp(Y);const Z=X.data;return(Z==null?void 0:Z.Message)==="duplicated entry"?P({payload:B,response:D},z,M):Z!=null&&Z.Id?{...D,status:"success"}:{...D,status:"error"}}catch(X){return console.error("error",X),{...D,status:"error"}}},[P]),C=j.useCallback(async(O,M,z)=>{O.preventDefault();const D=new FormData(O.target);if(D.append("acceptedTerms",m.current?"true":"false"),m.current){const G=new xa.TZDate(new Date,"America/Sao_Paulo").toISOString();D.append("termsAcceptedAt",G)}M&&Object.keys(M).forEach(G=>{D.append(G,M[G])});const B=await I({formData:D},z??"",t);B&&(g(B==null?void 0:B.status),x(B.inputsStatus),B.status==="success"&&l({functionKey:"readyEvents",data:{event:"generate_lead"}}))},[t,I,g,x,l]),N=j.useCallback(O=>{const M=new FormData(O.currentTarget.parentElement),{hasEmptyFields:z,hasErrors:D,inputStatusToUpdate:B}=ix({formData:M,mountedFields:d,inputsStatus:v,hasTermsAndConditions:u,checkboxRef:m,setFormStatus:g});if(x(B),z||D){O.preventDefault();return}g("loading")},[d,v,u,m]),T=j.useCallback(()=>{g("idle"),x(h)},[h]);return s.jsx(_p.Provider,{value:j.useMemo(()=>({formStatus:_,handleSubmit:C,setFormStatus:g,inputsStatus:v,setInputsStatus:x,hasTermsAndConditions:u,handleClickToSubmit:N,checkboxRef:m,masterDataEmailField:t,fields:r,variant:n,resetNewsletter:T}),[_,C,g,v,x,N,u,m,t,r,n,T]),children:e})},Ic=()=>{const e=j.useContext(_p);if(e===void 0)throw new Error("useNewsletterContext must be used within a NewsletterProvider");return e},yp=j.createContext({}),vp=({children:e,data:t})=>{const[r,n]=j.useState(),[o,i]=j.useState(),c=j.useCallback(d=>{const h=t.filter(m=>m.cidade===d);n(h)},[t]),l=j.useCallback(d=>{i(d)},[]),u=j.useCallback(()=>{i("")},[]);return s.jsx(yp.Provider,{value:j.useMemo(()=>({clearSelectedStore:u,data:t,handleSelectCity:c,handleSelectStore:l,selectedCity:r,selectedStore:o}),[u,t,c,l,r,o]),children:e})},Wo=()=>{const e=j.useContext(yp);if(e===void 0)throw new Error("useLPStoreContext must be used within a LPStoreProvider");return e},Fo={contexts:{addToCart:{hook:bn,provider:Ef},cart:{hook:Xe,provider:Yy},cms:{FlagsAndTags:{context:uc,hook:jr,provider:vy}},newsletter:{hook:Ic,provider:gp},events:{hook:Ee,provider:Iy},global:{hook:xe,provider:Ly,mediator:tf},header:{hook:Ze,provider:Gy},menuMobile:{hook:vc,provider:Cf},next:{hook:Ae,provider:Dy},pdp:{provider:xy},PDPContent:{provider:Zv,hook:dp},plp:{provider:Bv,hook:ut},plpFilter:{hook:$r,provider:lp},PLPContent:{provider:Jv,hook:zs},plpInfinite:{provider:ip,hook:Hr},pdpdata:{provider:Py},searchSearch:{hook:ft,provider:xc},session:{hook:rs,provider:Yv},ui:{hook:Os,provider:ef},lpStore:{hook:Wo,provider:vp}},hooks:{useBackPDC:qd,useClipboard:Ny,useDisableZoom:Yd,useLocalStorage:Ty,useOnScreen:dc,useSentinel:Uo,useTouchZoomPan:Xd},stores:{cart:ky,header:zy,pdp:Wy,wishlist:Vy}},ax={cart:U.cart,events:Ey,plp:Gv,product:U.productHelpers,utils:sx,search:U.search},Pc={helpers:ax},zt={"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"},xp=({brand:e,className:t,name:r,...n})=>s.jsxs("div",{...n,className:p.helpers.classNameConcat(zt["add-to-cart--card--name"],t),children:[s.jsx(p.Tag,{style:{textTransform:"uppercase"},size:"small",variant:"quaternary",title:e,children:e}),s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:s.jsx("p",{className:"typography-style-body-md",children:r})})})]});xp.displayName="AddToCart.Card.Name";const bp=({className:e,listPrice:t,price:r,quantity:n,productId:o,...i})=>{const c=U.formatPriceToCurrency(r/100),l=U.formatPriceToCurrency(t/100);return s.jsx("div",{...i,className:p.helpers.classNameConcat(zt["add-to-cart--card--price-quantity"],e),children:s.jsx(p.ProductInfo.Root,{size:"small",layout:"vertical",children:s.jsx(p.ProductInfo.Wrapper,{size:"small",layout:"vertical",children:s.jsx(p.ProductInfo.ValuesWrapper,{children:r!==t?s.jsxs(s.Fragment,{children:[s.jsx(p.ProductInfo.Price,{label:"originalPrice",value:c,size:"small"},"price-list"),s.jsx(p.ProductInfo.Price,{label:"discountPrice",value:l,size:"small"},"price-low")]}):s.jsx(p.ProductInfo.Price,{label:"defaultPrice",value:l,size:"small"},"price-low")})})})})};bp.displayName="AddToCart.Card.PriceQuantity";const cx="_skeleton_12b79_1",lx={skeleton:cx},jp=({style:e})=>s.jsx("div",{style:e,className:lx.skeleton}),ux="_image_1y08u_1",dx={image:ux},fx=({alt:e,className:t,objectFit:r,...n})=>{const{nextimage:o}=Ae();return s.jsx(o,{quality:90,...n,alt:e??"",className:p.helpers.classNameConcat(dx.image,t),"data-object-fit":r??"cover"})},px=({videoRef:e,...t})=>s.jsx("video",{...t,ref:e,children:s.jsx("track",{kind:"captions"})}),at={Image:fx,Video:px},Sp=({className:e,productGroupID:t,size:r,texture:n,...o})=>{const{CONSTANTS:{TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c}}=bn(),[l,u]=j.useState(n??"");return j.useEffect(()=>{l||U.fetchProxy("/_v/proxy/catalog/product/info",{method:"POST",body:JSON.stringify({ids:[t]})}).then(d=>d.json()).then(d=>{const h=d.data[0].items[0];if(h){const m=h.images.find(_=>i.includes(_.imageLabel));m!=null&&m.imageUrl?u(m.imageUrl):u(h.images[0].imageUrl)}}).catch(d=>{console.error(d)})},[l,t]),s.jsxs("div",{...o,className:p.helpers.classNameConcat(zt["add-to-cart--card--style-size"],e),children:[s.jsx(p.ToggleStyle.Wrapper,{size:"x-small",style:c,children:s.jsx(p.ToggleStyle.Texture,{children:l?s.jsx(at.Image,{alt:"",src:l??"",width:164,height:164,style:c}):s.jsx(jp,{})})}),s.jsx(p.Utils.Divider,{direction:"vertical",size:"medium",style:{height:24}}),r&&s.jsxs(p.ToggleSize.Wrapper,{size:"small",title:"wrapper-texture",children:[s.jsx(p.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),s.jsx(p.ToggleSize.Text,{children:r})]})]})};Sp.displayName="AddToCart.Card.StyleSize";const{helpers:hx}=Pc,Cp=({className:e,item:t,texture:r,...n})=>{const{itemOffered:{name:o,brand:i,skuName:c,isVariationOf:{productGroupID:l}},quantity:u,price:d,sellingPrice:h}=t,{CONSTANTS:{NAME_SPLIT_SYMBOL:m}}=bn(),{size:_}=hx.product.getColorAndSizeFromSkuName(c??o,m);return s.jsxs("div",{...n,className:p.helpers.classNameConcat(zt["add-to-cart--card--content"],e),children:[s.jsx(xp,{brand:i.name,name:o}),s.jsx(bp,{price:d,listPrice:h,quantity:u,productId:t.id}),s.jsx(Sp,{size:_,texture:r,productGroupID:l})]})};Cp.displayName="AddToCart.Card.Content";const wp=({image:e,thumbnail:t=!1})=>s.jsx(at.Image,{alt:e.alternateName??"image","data-thumbnail":t,height:t?152:120,src:e.url,width:t?152:94});wp.displayName="AddToCart.Card";const Ep=({className:e,item:t,texture:r,thumbnail:n,...o})=>{const{itemOffered:{image:[i]}}=t,c=U.updatedResizedImg(i.url,{width:200,height:300});return s.jsxs("div",{...o,className:p.helpers.classNameConcat(zt["add-to-cart--card"],e),children:[s.jsx(wp,{image:{alternateName:i.alternateName||"Produto",url:c||""},thumbnail:n}),!n&&s.jsx(Cp,{item:t,texture:r})]})};Ep.displayName="AddToCart.Card";const Ip=({className:e,children:t,title:r,...n})=>s.jsxs("div",{...n,className:p.helpers.classNameConcat(zt["add-to-cart--content"],e),children:[s.jsx("div",{className:zt["add-to-cart--content--title"],children:r&&s.jsx("h2",{children:r})}),t,s.jsx(un.Footer,{})]});Ip.displayName="AddToCart.Layout.Content";const Pp=({className:e,...t})=>{var g,v;const{isMobile:r,handleClose:n,CONSTANTS:{ADD_TO_CART:o}}=bn(),{cartStore:{totalizers:i},setIsOpen:c}=Xe(),l=(g=i.find(x=>x.id==="Discounts"))==null?void 0:g.value,u=((v=i.find(x=>x.id==="Items"))==null?void 0:v.value)??0,d=i.find(x=>x.id==="Shipping"),m=(u-Math.abs(l??0)+((d==null?void 0:d.value)??0))/100,_=U.formatPriceToCurrency(m??0);return s.jsxs("div",{...t,className:p.helpers.classNameConcat(zt["add-to-cart--footer"],e),children:[s.jsxs("div",{className:zt["add-to-cart--footer--total"],children:[s.jsx("span",{children:"Subtotal:"}),s.jsx("span",{children:_})]}),s.jsx(p.Button,{size:"medium",variant:"primary","data-close":!0,onClick:()=>c(!0),children:o.footer.bag}),r?s.jsx(p.Button,{"data-close":!0,size:"medium",variant:"tertiary",children:o.footer.keep_buying}):s.jsx(p.Button,{onClick:()=>n(),size:"medium",variant:"tertiary",children:o.footer.keep_buying})]})};Pp.displayName="AddToCart.Layout.Footer";const Np=({children:e,className:t,thumbnail:r=!1,...n})=>{const{cartStore:{options:o}}=Xe(),{recentlyAddedProducts:i}=Os(),c=i.length>3?4:i.length;return s.jsxs("div",{...n,className:zt["add-to-cart--items"],"data-thumbnail":r,children:[Array.isArray(i)&&i.filter((l,u)=>u<c).map(l=>{var d;const u=(d=o==null?void 0:o.find(h=>h.id===l.itemOffered.isVariationOf.productGroupID))==null?void 0:d.texture;return s.jsx(un.Card,{item:l,thumbnail:r,texture:u},l.itemOffered.sku)}),e]})};Np.displayName="AddToCart.Layout.Items";const Rp=({children:e,Z_INDEX_WAR:t})=>{const{isOpen:r,setIsOpen:n}=bn(),{isMobile:o}=xe();return s.jsxs(p.Modal.Root,{"data-modal":"add-to-cart--modal",className:zt["add-to-cart__modal"],isMobile:o??!1,isOpen:r,setIsOpen:n,variant:"sideBottom",style:{zIndex:t.modal},children:[s.jsx(p.Modal.Header,{navigation:"top",children:s.jsx(p.Modal.Controls,{navigation:"top",isMobile:!0})}),s.jsx(p.Modal.Body,{children:e})]})};Rp.displayName="AddToCart.Modal";const mx=({children:e})=>{const{count:t,handleClose:r,setIsOpen:n}=bn(),o=j.useRef(t);return j.useEffect(()=>{t>o.current&&n(!0),t<o.current&&o.current>=1&&r(),o.current=t},[t,r,n]),s.jsx(s.Fragment,{children:e})},Tp=({children:e,component:t,CONSTANTS:r,...n})=>{const{recentlyAddedProducts:o}=Os(),{isMobile:i}=xe(),c=o.length>3?4:o.length;return s.jsx(Ef,{...n,count:c,isMobile:i,CONSTANTS:r,children:s.jsx(mx,{children:i?s.jsxs(s.Fragment,{children:[s.jsx(un.Modal,{Z_INDEX_WAR:r.Z_INDEX_WAR,children:t}),e]}):s.jsx(un.Tooltip,{component:t,style:{width:350},Z_INDEX_WAR:r.Z_INDEX_WAR,children:e})})})};Tp.displayName="AddToCart.Root";const Op=({children:e,component:t,Z_INDEX_WAR:r,...n})=>{const{contentRef:o,left:i,isLeaving:c,target:l,isOpen:u,top:d}=bn();return s.jsx(p.Tooltip.Root,{arrow:"top-right",component:s.jsx("div",{...n,ref:o,children:t}),id:"add-to-cart--tooltip",className:zt["add-to-cart--tooltip"],style:{zIndex:r.modal},isLeaving:c,isOpen:u,left:i,size:"medium",position:"top",top:d,children:s.jsx("div",{className:zt["add-to-cart--tooltip"],ref:l,children:e})})};Op.displayName="AddToCart.Tooltip";const un={Card:Ep,Content:Ip,Footer:Pp,Items:Np,Modal:Rp,Root:Tp,Tooltip:Op},Nc=({title:e,...t})=>{const{recentlyAddedProducts:r}=Os(),{isMobile:n}=xe(),o=r.length>3?4:r.length,i=r.length>(o??1),c=r.length>1;return s.jsx(un.Root,{isMobile:n,count:r.length,component:s.jsx(un.Content,{title:e,children:s.jsx(un.Items,{thumbnail:c,children:i&&s.jsx(p.Badge.Count,{count:r.length-o,size:"medium",variant:"secondary"})})}),...t})};Nc.displayName="AddToCart";const uu={"backtotop-btn":"_backtotop-btn_vcjsm_1","card-modifier":"_card-modifier_vcjsm_29"},_x=({children:e,className:t,classNameButton:r,adornment:n,iconPosition:o,scrollToOptions:i,style:c,...l})=>{const u={top:(i==null?void 0:i.top)??0,left:(i==null?void 0:i.left)??0,behavior:(i==null?void 0:i.behavior)??"smooth"},h=o&&n?{flexDirection:{top:"column",bottom:"column-reverse",left:"row",right:"row-reverse"}[o]}:{},m=()=>{window&&window.document.body.scrollTo({...u})};return s.jsx(p.Card,{...l,shadow:!0,padding:"small",className:p.helpers.classNameConcat(uu["card-modifier"],t),style:{...c,padding:0},children:s.jsxs("button",{className:p.helpers.classNameConcat(uu["backtotop-btn"],r),onClick:m,style:{...h},"data-orientation":o,children:[n,e]})})},gx="_container_1sy8s_16",Tr={"carousel-container":"_carousel-container_1sy8s_1","add-cart-container":"_add-cart-container_1sy8s_8",container:gx,"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"},yx=({selectedProducts:e,handleAddAllToCart:t,CONSTANTS:r})=>{const n=Object.values(e.products).length;return s.jsxs("div",{className:Tr["add-itens-to-cart-container"],children:[s.jsxs("div",{className:Tr["add-itens-to-cart-container-values"],children:[s.jsx("div",{className:Tr["add-itens-to-cart-qty-products"],children:s.jsx("span",{children:n===0?r.BUY_PACKAGE.group_cart.select_all_product:`${n} ${n===1?r.BUY_PACKAGE.group_cart.select_product:r.BUY_PACKAGE.group_cart.select_product+"s"}`})}),s.jsx("div",{className:Tr["add-itens-to-cart-total"],children:s.jsx("span",{children:U.freightParsePrice({valueInCents:e.totalPrice*100,hasFree:!1,freeTaxMessage:r.FREIGHT_CALCULATION.messages.free_tax})})})]}),s.jsx(p.Button,{onClick:t,className:Tr["add-button"],size:"large",disabled:n===0,variant:"primary",children:r.BUY_BUTTON_LABELS.add_to_cart})]})},vx=e=>e.reduce((t,r)=>{var o;const n=t.find(i=>i.node.id===r.node.id);if(!n)return[...t,r];if((o=n==null?void 0:n.node.isVariantOf)!=null&&o.hasVariant){const i=n.node.isVariantOf.hasVariant,c=r.node.isVariantOf.hasVariant;i&&c&&(n.node.isVariantOf.hasVariant=[...i,...c])}return t},[]),xx=({selectedProduct:e,productId:t,prevState:r,mainSellerId:n})=>{const{products:o,totalPrice:i}=r;try{if(!e){const{[t]:d,...h}=o;return{...r,totalPrice:i-d.price,products:h}}const c=U.getValidOffer(e.offers.offers,n);if(!c)return r;const l=c.seller.identifier,u=c.price;if(o[t]){const{price:d}=o[t];return o[t]={...o[t],price:u,id:e.sku,seller:l},{totalPrice:i+u-d,products:{...o}}}return{totalPrice:i+u,products:{...o,[t]:{id:e.sku,price:u,seller:l,productId:t}}}}catch(c){return console.error("Error handling SKU selection:",c),r}},Ap=j.createContext({}),bx=({children:e,item:t,index:r,shelfTitle:n,...o})=>{const[i,c]=j.useState(null),l=j.useRef(null),u=j.useRef({availableSkus:[],priceInfo:{price:0,listPrice:0}}),{sendDataLayerEvent:d,itemListRef:h}=Ee(),m=x=>{d({functionKey:"productEvents",data:{commonData:{...t,availableSizes:u.current.availableSkus,...u.current.priceInfo},customData:{index:r+1},event:x}})},_=()=>{m("add_to_wishlist")},g=()=>{d({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...t,...u.current.priceInfo}]},supportData:{selectedSku:i,selectedSkus:[i]},customData:{index:r}}})},v=()=>{n&&(h.current={item_list_name:n}),m("select_item")};return s.jsx(Ap.Provider,{value:j.useMemo(()=>({...o,index:r,item:t,element:l,selectedSku:i,setSelectedSku:c,eventDataRef:u,sendAddToWishlistEvent:_,sendSelectItemEvent:v,sendAddToCartEvent:g}),[o,t,l,i]),children:e})},Gt=()=>{const e=j.useContext(Ap);if(e===void 0)throw new Error("useProductCardContext must be used within a ProductCardProvider");return e},mt={"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"},kp=({callback:e,children:t,className:r,data:n,isKit:o,...i})=>{const{item:{availability:{status:c},image:l}}=Gt();return c?s.jsxs("div",{...i,className:p.helpers.classNameConcat(mt["product-card--actions"],r),children:[s.jsxs(Ue.Wrapper,{type:"actions--group",children:[s.jsx(Ue.Price,{}),s.jsx("div",{className:mt["product-card--actions--selectors"],children:!o&&s.jsx(Ue.StyleSelector,{data:n,images:l,callback:e})})]}),t]}):null};kp.displayName="ProductCard.Actions";const Mp=({className:e,isKit:t,...r})=>{const{addToCart:n}=Xe(),{isMobile:o=!1,selectedSku:i,outStock:c,item:l,sendAddToCartEvent:u,CONSTANTS:d}=Gt(),h=()=>{var g;if(!i)return;const _=U.getValidOffer(i.offers.offers,d.StoreConfig_MainSellerId);_&&n({id:i==null?void 0:i.sku,quantity:1,seller:_.seller.identifier},{id:l.id,texture:(g=l==null?void 0:l.image.find(v=>d.TEXTURE_IMAGE.includes(v.alternateName)))==null?void 0:g.url}),u()},m=i?d.BUY_BUTTON_LABELS.add_to_cart:d.BUY_BUTTON_LABELS.select_size;return s.jsx(p.Button,{...r,className:p.helpers.classNameConcat(e,"buy-button"),disabled:!t&&!i&&!c,size:o?"medium":"large",variant:c?"secondary":"primary",onClick:c?r.onClick:h,children:c?"Avise-me quando chegar":m})};Mp.displayName="ProductCard.Actions.BuyButton";const jx={"snackbar-modifier":"_snackbar-modifier_1va2l_1"},Fn=({size:e,adornment:t,title:r,subtitle:n,supportChildren:o,className:i,Z_INDEX_WAR:c,...l})=>s.jsxs(p.SnackBar.Structure,{...l,size:e,className:p.helpers.classNameConcat(jx["snackbar-modifier"],i),width:360,style:{zIndex:c.snackbar},children:[s.jsx(p.SnackBar.Content,{adornment:t,title:r,subtitle:n}),o&&s.jsx(p.SnackBar.Support,{children:o})]});Fn.displayName="SnackBar";const vs={"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 za={exports:{}},Ct={};Ct._=Ct._interop_require_default=Sx;function Sx(e){return e&&e.__esModule?e:{default:e}}var oo={exports:{}},Ai={},du;function Lp(){return du||(du=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(c,l){for(var u in l)Object.defineProperty(c,u,{enumerable:!0,get:l[u]})}t(e,{assign:function(){return i},searchParamsToUrlQuery:function(){return r},urlQueryToSearchParams:function(){return o}});function r(c){const l={};return c.forEach((u,d)=>{typeof l[d]>"u"?l[d]=u:Array.isArray(l[d])?l[d].push(u):l[d]=[l[d],u]}),l}function n(c){return typeof c=="string"||typeof c=="number"&&!isNaN(c)||typeof c=="boolean"?String(c):""}function o(c){const l=new URLSearchParams;return Object.entries(c).forEach(u=>{let[d,h]=u;Array.isArray(h)?h.forEach(m=>l.append(d,n(m))):l.set(d,n(h))}),l}function i(c){for(var l=arguments.length,u=new Array(l>1?l-1:0),d=1;d<l;d++)u[d-1]=arguments[d];return u.forEach(h=>{Array.from(h.keys()).forEach(m=>c.delete(m)),h.forEach((m,_)=>c.append(_,m))}),c}}(Ai)),Ai}var ki={},hn={};function Dp(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(Dp=function(n){return n?r:t})(e)}hn._=hn._interop_require_wildcard=Cx;function Cx(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=Dp(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var c=o?Object.getOwnPropertyDescriptor(e,i):null;c&&(c.get||c.set)?Object.defineProperty(n,i,c):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}var fu;function Fp(){return fu||(fu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(u,d){for(var h in d)Object.defineProperty(u,h,{enumerable:!0,get:d[h]})}t(e,{formatUrl:function(){return i},formatWithValidation:function(){return l},urlObjectKeys:function(){return c}});const n=hn._(Lp()),o=/https?|ftp|gopher|file/;function i(u){let{auth:d,hostname:h}=u,m=u.protocol||"",_=u.pathname||"",g=u.hash||"",v=u.query||"",x=!1;d=d?encodeURIComponent(d).replace(/%3A/i,":")+"@":"",u.host?x=d+u.host:h&&(x=d+(~h.indexOf(":")?"["+h+"]":h),u.port&&(x+=":"+u.port)),v&&typeof v=="object"&&(v=String(n.urlQueryToSearchParams(v)));let S=u.search||v&&"?"+v||"";return m&&!m.endsWith(":")&&(m+=":"),u.slashes||(!m||o.test(m))&&x!==!1?(x="//"+(x||""),_&&_[0]!=="/"&&(_="/"+_)):x||(x=""),g&&g[0]!=="#"&&(g="#"+g),S&&S[0]!=="?"&&(S="?"+S),_=_.replace(/[?#]/g,encodeURIComponent),S=S.replace("#","%23"),""+m+x+_+S+g}const c=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function l(u){return process.env.NODE_ENV==="development"&&u!==null&&typeof u=="object"&&Object.keys(u).forEach(d=>{c.includes(d)||console.warn("Unknown key passed via urlObject into url.format: "+d)}),i(u)}}(ki)),ki}var Mi={},pu;function wx(){return pu||(pu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"omit",{enumerable:!0,get:function(){return t}});function t(r,n){const o={};return Object.keys(r).forEach(i=>{n.includes(i)||(o[i]=r[i])}),o}}(Mi)),Mi}var Li={},hu;function Vo(){return hu||(hu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(C,N){for(var T in N)Object.defineProperty(C,T,{enumerable:!0,get:N[T]})}t(e,{DecodeError:function(){return v},MiddlewareNotFoundError:function(){return P},MissingStaticPage:function(){return w},NormalizeError:function(){return x},PageNotFoundError:function(){return S},SP:function(){return _},ST:function(){return g},WEB_VITALS:function(){return r},execOnce:function(){return n},getDisplayName:function(){return u},getLocationOrigin:function(){return c},getURL:function(){return l},isAbsoluteUrl:function(){return i},isResSent:function(){return d},loadGetInitialProps:function(){return m},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return I}});const r=["CLS","FCP","FID","INP","LCP","TTFB"];function n(C){let N=!1,T;return function(){for(var O=arguments.length,M=new Array(O),z=0;z<O;z++)M[z]=arguments[z];return N||(N=!0,T=C(...M)),T}}const o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,i=C=>o.test(C);function c(){const{protocol:C,hostname:N,port:T}=window.location;return C+"//"+N+(T?":"+T:"")}function l(){const{href:C}=window.location,N=c();return C.substring(N.length)}function u(C){return typeof C=="string"?C:C.displayName||C.name||"Unknown"}function d(C){return C.finished||C.headersSent}function h(C){const N=C.split("?");return N[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(N[1]?"?"+N.slice(1).join("?"):"")}async function m(C,N){if(process.env.NODE_ENV!=="production"){var T;if((T=C.prototype)!=null&&T.getInitialProps){const z='"'+u(C)+'.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(z)}}const O=N.res||N.ctx&&N.ctx.res;if(!C.getInitialProps)return N.ctx&&N.Component?{pageProps:await m(N.Component,N.ctx)}:{};const M=await C.getInitialProps(N);if(O&&d(O))return M;if(!M){const z='"'+u(C)+'.getInitialProps()" should resolve to an object. But found "'+M+'" instead.';throw new Error(z)}return process.env.NODE_ENV!=="production"&&Object.keys(M).length===0&&!N.ctx&&console.warn(""+u(C)+" returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps"),M}const _=typeof performance<"u",g=_&&["mark","measure","getEntriesByName"].every(C=>typeof performance[C]=="function");class v extends Error{}class x extends Error{}class S extends Error{constructor(N){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+N}}class w extends Error{constructor(N,T){super(),this.message="Failed to load static file for page: "+N+" "+T}}class P extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function I(C){return JSON.stringify({message:C.message,stack:C.stack})}}(Li)),Li}var io={exports:{}},mu;function Go(){return mu||(mu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return o}});const r=U.removeTrailingSlash,n=U.parsePath,o=i=>{if(!i.startsWith("/")||process.env.__NEXT_MANUAL_TRAILING_SLASH)return i;const{pathname:c,query:l,hash:u}=(0,n.parsePath)(i);return process.env.__NEXT_TRAILING_SLASH?/\.[^/]+\/?$/.test(c)?""+(0,r.removeTrailingSlash)(c)+l+u:c.endsWith("/")?""+c+l+u:c+"/"+l+u:""+(0,r.removeTrailingSlash)(c)+l+u};(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)}(io,io.exports)),io.exports}var Di={},ao={exports:{}},_u;function Ex(){return _u||(_u=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return o}});const r=U.pathHasPrefix,n=process.env.__NEXT_ROUTER_BASEPATH||"";function o(i){return(0,r.pathHasPrefix)(i,n)}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(ao,ao.exports)),ao.exports}var gu;function zp(){return gu||(gu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isLocalURL",{enumerable:!0,get:function(){return n}});const t=Vo(),r=Ex();function n(o){if(!(0,t.isAbsoluteUrl)(o))return!0;try{const i=(0,t.getLocationOrigin)(),c=new URL(o,i);return c.origin===i&&(0,r.hasBasePath)(c.pathname)}catch{return!1}}}(Di)),Di}var Fi={},zi={},yu;function Ix(){return yu||(yu=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 i=[...this.children.keys()].sort();this.slugName!==null&&i.splice(i.indexOf("[]"),1),this.restSlugName!==null&&i.splice(i.indexOf("[...]"),1),this.optionalRestSlugName!==null&&i.splice(i.indexOf("[[...]]"),1);const c=i.map(l=>this.children.get(l)._smoosh(""+o+l+"/")).reduce((l,u)=>[...l,...u],[]);if(this.slugName!==null&&c.push(...this.children.get("[]")._smoosh(o+"["+this.slugName+"]/")),!this.placeholder){const l=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 ("'+l+'" and "'+l+"[[..."+this.optionalRestSlugName+']]").');c.unshift(l)}return this.restSlugName!==null&&c.push(...this.children.get("[...]")._smoosh(o+"[..."+this.restSlugName+"]/")),this.optionalRestSlugName!==null&&c.push(...this.children.get("[[...]]")._smoosh(o+"[[..."+this.optionalRestSlugName+"]]/")),c}_insert(o,i,c){if(o.length===0){this.placeholder=!1;return}if(c)throw new Error("Catch-all must be the last part of the URL.");let l=o[0];if(l.startsWith("[")&&l.endsWith("]")){let h=function(m,_){if(m!==null&&m!==_)throw new Error("You cannot use different slug names for the same dynamic path ('"+m+"' !== '"+_+"').");i.forEach(g=>{if(g===_)throw new Error('You cannot have the same slug name "'+_+'" repeat within a single dynamic path');if(g.replace(/\W/g,"")===l.replace(/\W/g,""))throw new Error('You cannot have the slug names "'+g+'" and "'+_+'" differ only by non-word symbols within a single dynamic path')}),i.push(_)},u=l.slice(1,-1),d=!1;if(u.startsWith("[")&&u.endsWith("]")&&(u=u.slice(1,-1),d=!0),u.startsWith("...")&&(u=u.substring(3),c=!0),u.startsWith("[")||u.endsWith("]"))throw new Error("Segment names may not start or end with extra brackets ('"+u+"').");if(u.startsWith("."))throw new Error("Segment names may not start with erroneous periods ('"+u+"').");if(c)if(d){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]+'" ).');h(this.optionalRestSlugName,u),this.optionalRestSlugName=u,l="[[...]]"}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]+'").');h(this.restSlugName,u),this.restSlugName=u,l="[...]"}else{if(d)throw new Error('Optional route parameters are not yet supported ("'+o[0]+'").');h(this.slugName,u),this.slugName=u,l="[]"}}this.children.has(l)||this.children.set(l,new t),this.children.get(l)._insert(o.slice(1),i,c)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function r(n){const o=new t;return n.forEach(i=>o.insert(i)),o.smoosh()}}(zi)),zi}var qi={},Bi={},Ui={},Hi={},vu;function Px(){return vu||(vu=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}}(Hi)),Hi}var Rc={};(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,{DEFAULT_SEGMENT_KEY:function(){return o},PAGE_SEGMENT_KEY:function(){return n},isGroupSegment:function(){return r}});function r(i){return i[0]==="("&&i.endsWith(")")}const n="__PAGE__",o="__DEFAULT__"})(Rc);var xu;function Nx(){return xu||(xu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(c,l){for(var u in l)Object.defineProperty(c,u,{enumerable:!0,get:l[u]})}t(e,{normalizeAppPath:function(){return o},normalizeRscURL:function(){return i}});const r=Px(),n=Rc;function o(c){return(0,r.ensureLeadingSlash)(c.split("/").reduce((l,u,d,h)=>!u||(0,n.isGroupSegment)(u)||u[0]==="@"||(u==="page"||u==="route")&&d===h.length-1?l:l+"/"+u,""))}function i(c){return c.replace(/\.rsc($|\?)/,"$1")}}(Ui)),Ui}var bu;function qp(){return bu||(bu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(c,l){for(var u in l)Object.defineProperty(c,u,{enumerable:!0,get:l[u]})}t(e,{INTERCEPTION_ROUTE_MARKERS:function(){return n},extractInterceptionRouteInformation:function(){return i},isInterceptionRouteAppPath:function(){return o}});const r=Nx(),n=["(..)(..)","(.)","(..)","(...)"];function o(c){return c.split("/").find(l=>n.find(u=>l.startsWith(u)))!==void 0}function i(c){let l,u,d;for(const h of c.split("/"))if(u=n.find(m=>h.startsWith(m)),u){[l,d]=c.split(u,2);break}if(!l||!u||!d)throw new Error(`Invalid interception route: ${c}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`);switch(l=(0,r.normalizeAppPath)(l),u){case"(.)":l==="/"?d=`/${d}`:d=l+"/"+d;break;case"(..)":if(l==="/")throw new Error(`Invalid interception route: ${c}. Cannot use (..) marker at the root level, use (.) instead.`);d=l.split("/").slice(0,-1).concat(d).join("/");break;case"(...)":d="/"+d;break;case"(..)(..)":const h=l.split("/");if(h.length<=2)throw new Error(`Invalid interception route: ${c}. Cannot use (..)(..) marker at the root level or one level up.`);d=h.slice(0,-2).concat(d).join("/");break;default:throw new Error("Invariant: unexpected marker")}return{interceptingRoute:l,interceptedRoute:d}}}(Bi)),Bi}var ju;function Rx(){return ju||(ju=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isDynamicRoute",{enumerable:!0,get:function(){return n}});const t=qp(),r=/\/\[[^/]+?\](?=\/|$)/;function n(o){return(0,t.isInterceptionRouteAppPath)(o)&&(o=(0,t.extractInterceptionRouteInformation)(o).interceptedRoute),r.test(o)}}(qi)),qi}var Su;function Tx(){return Su||(Su=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,{getSortedRoutes:function(){return r.getSortedRoutes},isDynamicRoute:function(){return n.isDynamicRoute}});const r=Ix(),n=Rx()}(Fi)),Fi}var $i={},Wi={},Cu;function Ox(){return Cu||(Cu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getRouteMatcher",{enumerable:!0,get:function(){return r}});const t=Vo();function r(n){let{re:o,groups:i}=n;return c=>{const l=o.exec(c);if(!l)return!1;const u=h=>{try{return decodeURIComponent(h)}catch{throw new t.DecodeError("failed to decode param")}},d={};return Object.keys(i).forEach(h=>{const m=i[h],_=l[m.pos];_!==void 0&&(d[h]=~_.indexOf("/")?_.split("/").map(g=>u(g)):m.repeat?[u(_)]:u(_))}),d}}}(Wi)),Wi}var Vi={},Gi={},wu;function Ax(){return wu||(wu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"escapeStringRegexp",{enumerable:!0,get:function(){return n}});const t=/[|\\{}()[\]^$+*?.-]/,r=/[|\\{}()[\]^$+*?.-]/g;function n(o){return t.test(o)?o.replace(r,"\\$&"):o}}(Gi)),Gi}var Eu;function kx(){return Eu||(Eu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(v,x){for(var S in x)Object.defineProperty(v,S,{enumerable:!0,get:x[S]})}t(e,{getNamedMiddlewareRegex:function(){return g},getNamedRouteRegex:function(){return _},getRouteRegex:function(){return u},parseParameter:function(){return c}});const r=U.constants,n=qp(),o=Ax(),i=U.removeTrailingSlash;function c(v){const x=v.startsWith("[")&&v.endsWith("]");x&&(v=v.slice(1,-1));const S=v.startsWith("...");return S&&(v=v.slice(3)),{key:v,repeat:S,optional:x}}function l(v){const x=(0,i.removeTrailingSlash)(v).slice(1).split("/"),S={};let w=1;return{parameterizedRoute:x.map(P=>{const I=n.INTERCEPTION_ROUTE_MARKERS.find(N=>P.startsWith(N)),C=P.match(/\[((?:\[.*\])|.+)\]/);if(I&&C){const{key:N,optional:T,repeat:O}=c(C[1]);return S[N]={pos:w++,repeat:O,optional:T},"/"+(0,o.escapeStringRegexp)(I)+"([^/]+?)"}else if(C){const{key:N,repeat:T,optional:O}=c(C[1]);return S[N]={pos:w++,repeat:T,optional:O},T?O?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}else return"/"+(0,o.escapeStringRegexp)(P)}).join(""),groups:S}}function u(v){const{parameterizedRoute:x,groups:S}=l(v);return{re:new RegExp("^"+x+"(?:/)?$"),groups:S}}function d(){let v=0;return()=>{let x="",S=++v;for(;S>0;)x+=String.fromCharCode(97+(S-1)%26),S=Math.floor((S-1)/26);return x}}function h(v){let{interceptionMarker:x,getSafeRouteKey:S,segment:w,routeKeys:P,keyPrefix:I}=v;const{key:C,optional:N,repeat:T}=c(w);let O=C.replace(/\W/g,"");I&&(O=""+I+O);let M=!1;(O.length===0||O.length>30)&&(M=!0),isNaN(parseInt(O.slice(0,1)))||(M=!0),M&&(O=S()),I?P[O]=""+I+C:P[O]=C;const z=x?(0,o.escapeStringRegexp)(x):"";return T?N?"(?:/"+z+"(?<"+O+">.+?))?":"/"+z+"(?<"+O+">.+?)":"/"+z+"(?<"+O+">[^/]+?)"}function m(v,x){const S=(0,i.removeTrailingSlash)(v).slice(1).split("/"),w=d(),P={};return{namedParameterizedRoute:S.map(I=>{const C=n.INTERCEPTION_ROUTE_MARKERS.some(T=>I.startsWith(T)),N=I.match(/\[((?:\[.*\])|.+)\]/);if(C&&N){const[T]=I.split(N[0]);return h({getSafeRouteKey:w,interceptionMarker:T,segment:N[1],routeKeys:P,keyPrefix:x?r.NEXT_INTERCEPTION_MARKER_PREFIX:void 0})}else return N?h({getSafeRouteKey:w,segment:N[1],routeKeys:P,keyPrefix:x?r.NEXT_QUERY_PARAM_PREFIX:void 0}):"/"+(0,o.escapeStringRegexp)(I)}).join(""),routeKeys:P}}function _(v,x){const S=m(v,x);return{...u(v),namedRegex:"^"+S.namedParameterizedRoute+"(?:/)?$",routeKeys:S.routeKeys}}function g(v,x){const{parameterizedRoute:S}=l(v),{catchAll:w=!0}=x;if(S==="/")return{namedRegex:"^/"+(w?".*":"")+"$"};const{namedParameterizedRoute:P}=m(v,!1);let I=w?"(?:(/.*)?)":"";return{namedRegex:"^"+P+I+"$"}}}(Vi)),Vi}var Iu;function Mx(){return Iu||(Iu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"interpolateAs",{enumerable:!0,get:function(){return n}});const t=Ox(),r=kx();function n(o,i,c){let l="";const u=(0,r.getRouteRegex)(o),d=u.groups,h=(i!==o?(0,t.getRouteMatcher)(u)(i):"")||c;l=o;const m=Object.keys(d);return m.every(_=>{let g=h[_]||"";const{repeat:v,optional:x}=d[_];let S="["+(v?"...":"")+_+"]";return x&&(S=(g?"":"/")+"["+S+"]"),v&&!Array.isArray(g)&&(g=[g]),(x||_ in h)&&(l=l.replace(S,v?g.map(w=>encodeURIComponent(w)).join("/"):encodeURIComponent(g))||"/")})||(l=""),{params:m,result:l}}}($i)),$i}var Pu;function Lx(){return Pu||(Pu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return h}});const r=Lp(),n=Fp(),o=wx(),i=Vo(),c=Go(),l=zp(),u=Tx(),d=Mx();function h(m,_,g){let v,x=typeof _=="string"?_:(0,n.formatWithValidation)(_);const S=x.match(/^[a-zA-Z]{1,}:\/\//),w=S?x.slice(S[0].length):x;if((w.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+x+"' passed to next/router in page: '"+m.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");const I=(0,i.normalizeRepeatedSlashes)(w);x=(S?S[0]:"")+I}if(!(0,l.isLocalURL)(x))return g?[x]:x;try{v=new URL(x.startsWith("#")?m.asPath:m.pathname,"http://n")}catch{v=new URL("/","http://n")}try{const I=new URL(x,v);I.pathname=(0,c.normalizePathTrailingSlash)(I.pathname);let C="";if((0,u.isDynamicRoute)(I.pathname)&&I.searchParams&&g){const T=(0,r.searchParamsToUrlQuery)(I.searchParams),{result:O,params:M}=(0,d.interpolateAs)(I.pathname,I.pathname,T);O&&(C=(0,n.formatWithValidation)({pathname:O,hash:I.hash,query:(0,o.omit)(T,M)}))}const N=I.origin===v.origin?I.href.slice(I.origin.length):I.href;return g?[N,C||N]:N}catch{return g?[x]: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)}(oo,oo.exports)),oo.exports}var co={exports:{}},Nu;function Dx(){return Nu||(Nu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return n}});const r=Go(),n=function(o){for(var i=arguments.length,c=new Array(i>1?i-1:0),l=1;l<i;l++)c[l-1]=arguments[l];return process.env.__NEXT_I18N_SUPPORT?(0,r.normalizePathTrailingSlash)(U.addLocale.addLocale(o,...c)):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)}(co,co.exports)),co.exports}var Ki={},Ru;function Bp(){return Ru||(Ru=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RouterContext",{enumerable:!0,get:function(){return n}});const n=Ct._(j).default.createContext(null);process.env.NODE_ENV!=="production"&&(n.displayName="RouterContext")}(Ki)),Ki}var Tc={};(function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(d,h){for(var m in h)Object.defineProperty(d,m,{enumerable:!0,get:h[m]})}t(e,{AppRouterContext:function(){return o},GlobalLayoutRouterContext:function(){return c},LayoutRouterContext:function(){return i},MissingSlotContext:function(){return u},TemplateContext:function(){return l}});const n=Ct._(j),o=n.default.createContext(null),i=n.default.createContext(null),c=n.default.createContext(null),l=n.default.createContext(null);process.env.NODE_ENV!=="production"&&(o.displayName="AppRouterContext",i.displayName="LayoutRouterContext",c.displayName="GlobalLayoutRouterContext",l.displayName="TemplateContext");const u=n.default.createContext(new Set)})(Tc);var lo={exports:{}},uo={exports:{}},Tu;function Up(){return Tu||(Tu=1,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,{cancelIdleCallback:function(){return o},requestIdleCallback:function(){return n}});const n=typeof self<"u"&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(i){let c=Date.now();return self.setTimeout(function(){i({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-c))}})},1)},o=typeof self<"u"&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(i){return clearTimeout(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)}(uo,uo.exports)),uo.exports}var Ou;function Fx(){return Ou||(Ou=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return d}});const r=j,n=Up(),o=typeof IntersectionObserver=="function",i=new Map,c=[];function l(h){const m={root:h.root||null,margin:h.rootMargin||""},_=c.find(S=>S.root===m.root&&S.margin===m.margin);let g;if(_&&(g=i.get(_),g))return g;const v=new Map,x=new IntersectionObserver(S=>{S.forEach(w=>{const P=v.get(w.target),I=w.isIntersecting||w.intersectionRatio>0;P&&I&&P(I)})},h);return g={id:m,observer:x,elements:v},c.push(m),i.set(m,g),g}function u(h,m,_){const{id:g,observer:v,elements:x}=l(_);return x.set(h,m),v.observe(h),function(){if(x.delete(h),v.unobserve(h),x.size===0){v.disconnect(),i.delete(g);const w=c.findIndex(P=>P.root===g.root&&P.margin===g.margin);w>-1&&c.splice(w,1)}}}function d(h){let{rootRef:m,rootMargin:_,disabled:g}=h;const v=g||!o,[x,S]=(0,r.useState)(!1),w=(0,r.useRef)(null),P=(0,r.useCallback)(C=>{w.current=C},[]);(0,r.useEffect)(()=>{if(o){if(v||x)return;const C=w.current;if(C&&C.tagName)return u(C,T=>T&&S(T),{root:m==null?void 0:m.current,rootMargin:_})}else if(!x){const C=(0,n.requestIdleCallback)(()=>S(!0));return()=>(0,n.cancelIdleCallback)(C)}},[v,_,m,x,w.current]);const I=(0,r.useCallback)(()=>{S(!1)},[]);return[P,x,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)}(lo,lo.exports)),lo.exports}var fo={exports:{}},po={exports:{}},Au;function zx(){return Au||(Au=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return r}});const r=(n,o)=>process.env.__NEXT_I18N_SUPPORT?U.normalizeLocalePath.normalizeLocalePath(n,o):{pathname:n,detectedLocale:void 0};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(po,po.exports)),po.exports}var ho={exports:{}},ku;function qx(){return ku||(ku=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"detectDomainLocale",{enumerable:!0,get:function(){return r}});const r=function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];if(process.env.__NEXT_I18N_SUPPORT)return U.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)}(ho,ho.exports)),ho.exports}var Mu;function Bx(){return Mu||(Mu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return o}});const r=Go(),n=process.env.__NEXT_ROUTER_BASEPATH||"";function o(i,c,l,u){if(process.env.__NEXT_I18N_SUPPORT){const d=zx().normalizeLocalePath,h=qx().detectDomainLocale,m=c||d(i,l).detectedLocale,_=h(u,void 0,m);if(_){const g="http"+(_.http?"":"s")+"://",v=m===_.defaultLocale?"":"/"+m;return""+g+_.domain+(0,r.normalizePathTrailingSlash)(""+n+v+i)}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)}(fo,fo.exports)),fo.exports}var mo={exports:{}},Lu;function Ux(){return Lu||(Lu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return i}});const r=U.addPathPrefix,n=Go(),o=process.env.__NEXT_ROUTER_BASEPATH||"";function i(c,l){return(0,n.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH&&!l?c:(0,r.addPathPrefix)(c,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)}(mo,mo.exports)),mo.exports}var _o={exports:{}},Du;function Hx(){return Du||(Du=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(g,v){for(var x in v)Object.defineProperty(g,x,{enumerable:!0,get:v[x]})}r(t,{ACTION_FAST_REFRESH:function(){return u},ACTION_NAVIGATE:function(){return o},ACTION_PREFETCH:function(){return l},ACTION_REFRESH:function(){return n},ACTION_RESTORE:function(){return i},ACTION_SERVER_ACTION:function(){return d},ACTION_SERVER_PATCH:function(){return c},PrefetchCacheEntryStatus:function(){return m},PrefetchKind:function(){return h},isThenable:function(){return _}});const n="refresh",o="navigate",i="restore",c="server-patch",l="prefetch",u="fast-refresh",d="server-action";var h;(function(g){g.AUTO="auto",g.FULL="full",g.TEMPORARY="temporary"})(h||(h={}));var m;(function(g){g.fresh="fresh",g.reusable="reusable",g.expired="expired",g.stale="stale"})(m||(m={}));function _(g){return g&&(typeof g=="object"||typeof g=="function")&&typeof g.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)}(_o,_o.exports)),_o.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return T}});const r=Ct,n=s,o=r._(j),i=Lx(),c=zp(),l=Fp(),u=Vo(),d=Dx(),h=Bp(),m=Tc,_=Fx(),g=Bx(),v=Ux(),x=Hx(),S=new Set;function w(O,M,z,D,B,G){if(typeof window>"u"||!G&&!(0,c.isLocalURL)(M))return;if(!D.bypassPrefetchedCheck){const Y=typeof D.locale<"u"?D.locale:"locale"in O?O.locale:void 0,X=M+"%"+z+"%"+Y;if(S.has(X))return;S.add(X)}(async()=>G?O.prefetch(M,B):O.prefetch(M,z,D))().catch(Y=>{if(process.env.NODE_ENV!=="production")throw Y})}function P(O){const z=O.currentTarget.getAttribute("target");return z&&z!=="_self"||O.metaKey||O.ctrlKey||O.shiftKey||O.altKey||O.nativeEvent&&O.nativeEvent.which===2}function I(O,M,z,D,B,G,J,Y,X){const{nodeName:Z}=O.currentTarget;if(Z.toUpperCase()==="A"&&(P(O)||!X&&!(0,c.isLocalURL)(z)))return;O.preventDefault();const fe=()=>{const ee=J??!0;"beforePopState"in M?M[B?"replace":"push"](z,D,{shallow:G,locale:Y,scroll:ee}):M[B?"replace":"push"](D||z,{scroll:ee})};X?o.default.startTransition(fe):fe()}function C(O){return typeof O=="string"?O:(0,l.formatUrl)(O)}const T=o.default.forwardRef(function(M,z){let D;const{href:B,as:G,children:J,prefetch:Y=null,passHref:X,replace:Z,shallow:he,scroll:fe,locale:ee,onClick:ie,onMouseEnter:_e,onTouchStart:Ce,legacyBehavior:ge=!1,...we}=M;D=J,ge&&(typeof D=="string"||typeof D=="number")&&(D=(0,n.jsx)("a",{children:D}));const V=o.default.useContext(h.RouterContext),oe=o.default.useContext(m.AppRouterContext),F=V??oe,ce=!V,je=Y!==!1,Oe=Y===null?x.PrefetchKind.AUTO:x.PrefetchKind.FULL;if(process.env.NODE_ENV!=="production"){let re=function(se){return new Error("Failed prop type: The prop `"+se.key+"` expects a "+se.expected+" in `<Link>`, but got `"+se.actual+"` instead."+(typeof window<"u"?`
|
|
1
|
+
"use strict";var yy=Object.defineProperty;var Gl=e=>{throw TypeError(e)};var vy=(e,t,r)=>t in e?yy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Gr=(e,t,r)=>vy(e,typeof t!="symbol"?t+"":t,r),Oi=(e,t,r)=>t.has(e)||Gl("Cannot "+r);var k=(e,t,r)=>(Oi(e,t,"read from private field"),r?r.call(e):t.get(e)),ye=(e,t,r)=>t.has(e)?Gl("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ue=(e,t,r,n)=>(Oi(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Re=(e,t,r)=>(Oi(e,t,"access private method"),r);var ro=(e,t,r,n)=>({set _(o){ue(e,t,o,r)},get _(){return k(e,t,n)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),j=require("react"),U=require("./index-HEA7MkPc.js"),Zt=require("idb-keyval"),yn=require("zustand"),Ao=require("js-cookie"),p=require("@soma-vertical-web/core-components"),Ln=require("axios"),ba=require("@date-fns/tz");require("jose");const Dn=require("@soma-vertical-web/foundations"),uc=require("react-dom"),ln=require("draft-js"),qd=require("react-intersection-observer");function xy(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Ht=xy(j),dc=j.createContext({}),by=({data:e,children:t})=>s.jsx(dc.Provider,{value:{tags:e==null?void 0:e.config},children:t}),jr=()=>{const{tags:e}=j.useContext(dc),t=j.useCallback(r=>{var l,u,d,h;const n=(u=(l=e==null?void 0:e.commercial)==null?void 0:l.items)==null?void 0:u.find(m=>{var _;return(_=r??[])==null?void 0:_.find(g=>g.id===m.key)}),o=(h=(d=e==null?void 0:e.institucional)==null?void 0:d.items)==null?void 0:h.find(m=>{var _;return(_=r??[])==null?void 0:_.find(g=>g.id===m.key)}),i=e==null?void 0:e.flagPdp,c=(r==null?void 0:r.find(m=>{var _;return m.id===((_=e==null?void 0:e.flagGoldenPdp)==null?void 0:_.key)}))&&(e==null?void 0:e.flagGoldenPdp);return{commercial:n,institucional:o,flagPdp:i,flagGoldenPdp:c}},[e]);return{tags:e,getAvailableProductTag:t}},Bd=({gridScrollBack:e})=>{j.useEffect(()=>{typeof window<"u"&&(e!=null&&e.refer)&&sessionStorage.setItem(e==null?void 0:e.refer,"true")},[])},Ud=j.createContext({}),jy=({children:e,gridScrollBack:t})=>{const r=j.useRef(null);return Bd({gridScrollBack:t}),s.jsx(Ud.Provider,{value:{sizesContainerRef:r},children:e})},Hd=()=>{const e=j.useContext(Ud);if(e===void 0)throw new Error("useContext(PDPContext) must be used within a PDPProvider");return e},Nr=({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})},st={configs:{PLP_FILTERS:[{key:"",label:"",eventLabel:"",order:0}],currency:"BRL",categoryOff:"bazar",storeUrl:"https://www.example.com",MAIN_IMAGE:"1",NAME_SPLIT_SYMBOL:"-",VENDOR_CODE:""},productEvents:(e,t)=>{const{event:r,commonData:n,customData:o,promotionInfo:i,itemList:c,outsideEcommerceData:l}=e,{availableSizes:u,sizes:d,price:h}=n,m={...r==="view_item"?{currency:st.configs.currency,value:h,grade_disponivel:u??(d?$d(d):"")}:{},...r==="add_to_wishlist"||r==="remove_from_wishlist"?{value:h,currency:st.configs.currency}:{}},_=no({data:n,customData:{...o,...c,...i},configs:st.configs});Nr({event:r,data:{...l,ecommerce:{...c,...m,items:[_]}}}),typeof t=="function"&&t(_,m)},productListEvent:e=>{const{commonData:{products:t},promotionInfo:r,itemList:n,outsideEcommerceData:o,customData:i}=e;if(t.length===0)return;const c=t.map(({node:l},u)=>no({data:{...l},customData:{...r,index:u,...i!=null&&i.item_list_name?{item_list_name:i==null?void 0:i.item_list_name}:n},configs:st.configs}));Nr({event:"view_item_list",data:{...o,ecommerce:{...i!=null&&i.item_list_name?{item_list_name:i==null?void 0:i.item_list_name}:n,items:c}}})},skuEvents:e=>{const{event:t,commonData:{products:r},customData:n,supportData:{selectedSkus:o,price:i},promotionInfo:c,itemList:l,outsideEcommerceData:u}=e;let d=0;const h=r.map(m=>{var x,S,w,P,I,C,N,T,O;const _=o==null?void 0:o.find(M=>(m.productId??m.id)===M.productId);let g={...c,...l};if(_){const M=Vd(),z=Gd(M,_);z&&(g={...g,...z}),t==="add_to_cart"&&(c||l)&&ja({persistedData:M,type:"add",sku:(_==null?void 0:_.id)??(_==null?void 0:_.sku),newData:{promotionInfo:c,itemList:l}}),t==="remove_from_cart"&&ja({persistedData:M,type:"remove",sku:(_==null?void 0:_.id)??(_==null?void 0:_.sku)})}d+=m.price??((w=(S=(x=_==null?void 0:_.offers)==null?void 0:x.offers)==null?void 0:S[0])==null?void 0:w.price)??0;const v=(_==null?void 0:_.size)??U.getColorAndSizeFromSkuName((_==null?void 0:_.skuName)??(_==null?void 0:_.name)??((P=m.itemOffered)==null?void 0:P.skuName),st.configs.NAME_SPLIT_SYMBOL).size;return no({data:m,customData:{...n,...g??{...c,...l},item_sku:(_==null?void 0:_.id)??(_==null?void 0:_.sku)??((I=m.itemOffered)==null?void 0:I.sku),quantity:(n==null?void 0:n.quantity)??m.quantity??1,item_variant2:v,seller_id:(_==null?void 0:_.sellerId)??(_==null?void 0:_.seller)??((O=(T=(N=(C=_==null?void 0:_.offers)==null?void 0:C.offers)==null?void 0:N[0])==null?void 0:T.seller)==null?void 0:O.identifier)??m.seller},configs:st.configs})});Nr({event:t,data:{...u,ecommerce:{value:i??d,currency:st.configs.currency,items:h}}})},filterEvent:e=>{var c;const{commonData:t,customData:r,outsideEcommerceData:n}=e,o={},i={};Array.isArray(t==null?void 0:t.selectedFacets)&&((c=t==null?void 0:t.selectedFacets)!=null&&c.length)&&((t==null?void 0:t.selectedFacets).forEach(({key:l,value:u})=>{var m;const d=((m=st.configs.PLP_FILTERS.find(_=>_.key===l))==null?void 0:m.eventLabel)??l,h=(o==null?void 0:o[d])||[];d==="price_range"&&u.replace(":","-"),o[d]=[...h,u]}),Object.keys(o).forEach(l=>i[l]=o[l].join(", "))),Nr({event:"filter",data:{...n,...i,...r}})},viewCartEvent:e=>{var h,m,_,g,v,x,S,w,P,I;const{commonData:t,outsideEcommerceData:r}=e,{cartStore:n}=t;if(!n)return;const o=window.localStorage.getItem("persistedCartEventsData"),i=o?JSON.parse(o):{},c=n.items.map(C=>{const{promotionInfo:N,itemList:T}=i[C.id]??{};return no({data:{...C,price:C.price/100,listPrice:C.listPrice/100},customData:{...N,...T,item_sku:C.id??C.itemOffered.sku,quantity:C.quantity??1},configs:st.configs})}),l=(((h=n.totalizers.find(C=>C.name==="Total dos Itens"))==null?void 0:h.value)??0)/100,u=(((m=n.totalizers.find(C=>C.name==="Total dos Descontos"))==null?void 0:m.value)??0)/100,d=((_=n.marketingData)==null?void 0:_.utmiCampaign)===st.configs.VENDOR_CODE?(g=n.marketingData)==null?void 0:g.utmCampaign:(x=String((v=n.openTextField)==null?void 0:v.value))==null?void 0:x.split(" - ")[0];Nr({event:"view_cart",data:{...r,ecommerce:{currency:st.configs.currency,value:l+u,total_discount:Math.abs(u),cep_preenchido:!!((w=(S=n.shippingData)==null?void 0:S.address)!=null&&w.postalCode),...d?{seller_coupon_name:d}:{},...((P=n.marketingData)==null?void 0:P.coupon)&&{sale_coupon_name:(I=n.marketingData)==null?void 0:I.coupon},subtotal:l,items:c}}})},readyEvents:e=>{const{event:t,readyData:r}=e;Nr({event:t,data:{...r}})}},$d=e=>e.reduce((t,r)=>(r.available&&t.push(r.value),t),[]).toString(),Sy=e=>{const t=e.length;return{...e&&e.length>0?{item_category:e[0].includes(st.configs.categoryOff)?"Bazar":"Coleção",...e[1]?{item_category2:e[1]}:{},...t>2?{item_category3:e[t-1]}:{}}:{}}},no=({data:e,customData:t,configs:r})=>({...Cy(e,r==null?void 0:r.MAIN_IMAGE),...wy(e),...Ey(e),...Iy(e),...t}),Wd=()=>{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("_"))??[]:[]},Vd=()=>{const e=window.localStorage.getItem("persistedCartEventsData");return e?JSON.parse(e):null},Gd=(e,t)=>e==null?void 0:e[t],ja=({persistedData:e,type:t,sku:r,newData:n})=>{if(!e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({[r]:n}));return}if(e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({...e,[r]:n}));return}e&&t==="remove"&&(delete e[r],window.localStorage.setItem("persistedCartEventsData",JSON.stringify(e)))},Cy=(e,t="1")=>{var i,c,l,u,d,h,m,_,g,v,x;const r=e.productReference??e.gtin??e.productRefId,n=e.image??((c=(i=e.items)==null?void 0:i[0])==null?void 0:c.images)??((l=e.itemOffered)==null?void 0:l.image),o=n==null?void 0:n.find(S=>S.alternateName===t||S.imageLabel===t||S.keywords===t);return{item_id:e.productId??((u=e.isVariantOf)==null?void 0:u.productGroupID)??((d=e.isVariationOf)==null?void 0:d.productGroupID)??((m=(h=e.itemOffered)==null?void 0:h.isVariationOf)==null?void 0:m.productGroupID),item_ref:/_\d$/.test(r)?r.slice(0,-2):r,item_name:e.productTitle??e.productName??e.name??U.splitNameAndSizeFromFullName((_=e.itemOffered)==null?void 0:_.name,st.configs.NAME_SPLIT_SYMBOL).name,item_brand:((g=e.brand)==null?void 0:g.brandName)??((v=e.brand)==null?void 0:v.name)??e.brand??((x=e.itemOffered)==null?void 0:x.brand.name),item_url:`${st.configs.storeUrl}${e.linkText}/p`,item_image:(o==null?void 0:o.url)??(o==null?void 0:o.imageUrl)}},Kl=e=>Array.isArray(e)?e.reduce((t,r)=>(r.length>t.length&&(t=r),t),""):e,wy=e=>{var d,h;const{categories:t,categoriesIds:r}=e,n=t??((d=e.itemOffered)==null?void 0:d.categories),o=r??((h=e.itemOffered)==null?void 0:h.categoriesIds),i=Kl(n),c=Kl(o),l=i.slice(1,-1).split("/"),u=c.slice(1,-1).split("/");return{item_category:l[0].toLowerCase().includes(st.configs.categoryOff)?"Bazar":"Coleção",...l[1]&&{item_category2:l[1]},...l.length>2&&{item_category3:l[l.length-1]},item_category_id:u[u.length-1],...u.length>1&&{item_parent_category_id:u[u.length-2]}}},Ey=e=>{var o,i,c,l,u,d;const t=((o=e.itemOffered)==null?void 0:o.skuName)??((l=(c=(i=e.isVariantOf)==null?void 0:i.hasVariant)==null?void 0:c[0])==null?void 0:l.name)??((d=(u=e.items)==null?void 0:u[0])==null?void 0:d.name),{color:r,size:n}=U.getColorAndSizeFromSkuName(t,st.configs.NAME_SPLIT_SYMBOL);return{item_variant:r,...e.itemOffered&&{item_variant2:n}}},Iy=e=>{var u,d;const{price:t,listPrice:r,installments:n}=e,o=t??((u=e.offers)==null?void 0:u.lowPrice)??0,i=r??((d=e.offers)==null?void 0:d.highPrice)??0,c=i?i-o:0,l=c%1===0?c:Number(c.toFixed(2));return{...t&&{price:o??i},...i&&{list_price:i,discount:l},...n&&{installments:n==null?void 0:n.count,installment_value:n==null?void 0:n.value},item_currency:st.configs.currency}},Kd=()=>{const[e,t]=Wd(),[r,n]=e.split("-"),o=r.includes("shop")||r.includes("sale")?r:"";return{page_category:o&&n?n:"",page_departament:o,id:t,name:e}},Py=Object.freeze(Object.defineProperty({__proto__:null,eventsFunctions:st,findDataInPersistedData:Gd,getAvailablesSizes:$d,getCategories:Sy,getPageCategoryAndDepartmentFromSlug:Kd,getPersistedData:Vd,getProductListInfoFromHead:Wd,pushDatalayer:Nr,updatePersistedData:ja},Symbol.toStringTag,{value:"Module"})),Qd=j.createContext({}),Ny=({children:e,evtFunctionsConfigs:t})=>{const r=j.useRef({}),n=j.useRef(null),o=j.useRef(null),i=j.useRef({}),c=j.useRef({trigger:!1,index:0}),l=({functionKey:h,data:m,callBack:_,timeout:g=100})=>{window.dataLayer||(window.dataLayer=[]),st.configs=t;try{typeof st[h]=="function"&&setTimeout(()=>{var v;m.promotionInfo=r.current,(v=o.current)!=null&&v.item_list_name&&(m.itemList=o.current),st[h](m,_)},g)}catch(v){Nr({event:"error_event",data:{error_message:(v==null?void 0:v.message)??v}})}},u=({content:h})=>{l({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:h.replace("::",":")}}})},d=({updatePromotionRef:h,promotion:m,index:_})=>{h&&(r.current={...m}),l({functionKey:"readyEvents",data:{event:"select_promotion",readyData:{ecommerce:{...m,..._!==void 0&&{index:_}}}}})};return s.jsx(Qd.Provider,{value:{sendDataLayerEvent:l,triggerSelectItemEventRef:c,promotionEventRef:r,currentLocalRef:n,itemListRef:o,cartProductsFullDataRef:i,handleSelectContent:u,handleSelectPromotionEvent:d},children:e})},Ee=()=>j.useContext(Qd),Yd=j.createContext({}),Ry=({children:e,productData:t,isKit:r,PDP_INFO:n,NAME_SPLIT_SYMBOL:o,TEXTURE_IMAGE:i})=>{var Y,X;const{sendDataLayerEvent:c,triggerSelectItemEventRef:l}=Ee(),{productId:u,productName:d,items:h,items:[{images:m,Videos:_}],description:g,["Composição"]:v="",productReference:x,categories:[S]}=t,{getAvailableProductTag:w}=jr(),P=w(Object.entries(t.clusterHighlights).map(Z=>({id:Z[0],name:Z[1]}))),I=S.slice(1,-1).split("/"),{installments:C,price:N,listPrice:T,sizes:O,allSizesAvailable:M}=U.getSkuInfos({items:h,NAME_SPLIT_SYMBOL:o}),z=U.getThumbImage({images:m,TEXTURE_IMAGE:i}),D=[{label:`${n.product.description}`,value:"description",content:g},{label:`${n.product.materiais}`,value:"composition",content:v}],B=((X=U.getColorAndSizeFromSkuName((Y=t.items)==null?void 0:Y[0].name,o))==null?void 0:X.color)??t["Cores Filtráveis"][0]??"",G=()=>({commonData:{...t,sizes:O,price:N,listPrice:T,installments:C},customData:{installments:C==null?void 0:C.count,installment_value:Number(C==null?void 0:C.value).toFixed(2)}}),J=({sku:Z,size:he})=>{const{commonData:fe,customData:ee}=G();c({functionKey:"productEvents",data:{event:"view_item",commonData:fe,customData:{...ee,...Z&&{item_sku:Z},...he&&{item_variant2:he}}}})};return j.useEffect(()=>{if(l.current.trigger){const{commonData:Z,customData:he}=G();c({functionKey:"productEvents",data:{event:"select_item",commonData:Z,customData:{...he,index:l.current.index}}}),l.current.trigger=!1}J({})},[]),s.jsx(Yd.Provider,{value:{productData:t,productId:u,productName:d,productReference:x,tag:P,items:h,sizes:O,allSizesAvailable:M,installments:C,price:N,listPrice:T,thumbImage:z,images:m,video:_[0],descriptionContent:D,breadcrumbList:I,isKit:r,colorName:B,handleViewItemEvent:J},children:e})},Et=()=>{const e=j.useContext(Yd);if(e===void 0)throw new Error("useContext(PDPDataContext) must be used within a PDPDataProvider");return e},Ty=()=>{const[e,t]=j.useState(null);return[e,async n=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(n),t(n),!0}catch(o){return console.warn("Copy failed",o),t(null),!1}}]},Xd=()=>{j.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)}},[])},Oy=typeof window>"u",Ay=(e,t)=>{const[r,n]=j.useState(()=>{if(Oy)return null;const i=localStorage.getItem(e);return i===null?t:JSON.parse(i||"{}")});return j.useEffect(()=>{const i=c=>{c.storageArea===localStorage&&c.key===e&&n(JSON.parse(c.newValue))};return window.addEventListener("storage",i),()=>{window.removeEventListener("storage",i)}},[e,t]),[r,i=>{n(c=>{const l=typeof i=="function"?i(c):i;return localStorage.setItem(e,JSON.stringify(l)),l})}]};function fc(e,t,r){const[n,o]=j.useState(!1),{threshold:i}=r||{};return j.useEffect(()=>{if(!e.current)return()=>null;let c=null;const l=new IntersectionObserver(([u])=>{if(r!=null&&r.delay){c&&clearTimeout(c),c=setTimeout(()=>{o(u.isIntersecting),t&&u.isIntersecting&&l.unobserve(e.current)},r.delay);return}o(u.isIntersecting),t&&u.isIntersecting&&l.unobserve(e.current)},{threshold:i||1});return l.observe(e.current),()=>{l.disconnect()}},[e]),n}const Uo=({callback:e,onEnterViewportOnce:t,options:r})=>{const n=j.useRef(null);return j.useEffect(()=>{const o=n.current;if(!o)return;const i=new IntersectionObserver(([c])=>{c.isIntersecting&&typeof e=="function"&&(e(),t&&(i.unobserve(o),i.disconnect()))},r);return i.observe(o),()=>{t&&i.unobserve(o),i.disconnect()}},[e,t,r]),{element:n}},Jd=({defaultScale:e=1,maxScale:t=3})=>{const r=j.useRef(null),n=j.useRef(null),[o,i]=j.useState(e),c=j.useRef(0),l=j.useRef({x:0,y:0}),u=j.useRef({x:0,y:0}),d=()=>{if(!n.current||!r.current)return{minX:0,maxX:0,minY:0,maxY:0};const g=r.current.getBoundingClientRect(),v=n.current.children[0].getBoundingClientRect(),x=v.width,S=v.height,w=Math.min(0,(g.width-x)/2),P=Math.max(0,(x-g.width)/2),I=Math.min(0,(g.height-S)/2),C=Math.max(0,(S-g.height)/2);return{minX:w,maxX:P,minY:I,maxY:C}},h=(g,v,x)=>{if(n.current){const S=n.current.children[0];S&&requestAnimationFrame(()=>{S.style.transform=`translate(calc(-50% + ${g}px), calc(-50% + ${v}px)) scale(${x})`})}},m=j.useCallback(g=>{const{minX:v,maxX:x,minY:S,maxY:w}=d(),{x:P,y:I}=u.current,C=Math.max(v,Math.min(x,P)),N=Math.max(S,Math.min(w,I));if(g.touches.length>1){const T=g.touches[0],O=g.touches[1],M=T.pageX-O.pageX,z=T.pageY-O.pageY;c.current=Math.sqrt(M*M+z*z),l.current={x:(T.pageX+O.pageX)/2,y:(T.pageY+O.pageY)/2}}else g.touches.length===1&&(l.current={x:g.touches[0].pageX-C,y:g.touches[0].pageY-N})},[o,u]),_=j.useCallback(g=>{if(!n.current||!r.current)return;const{minX:v,maxX:x,minY:S,maxY:w}=d();if(g.touches.length>1){g.preventDefault();const P=g.touches[0],I=g.touches[1],C=P.pageX-I.pageX,N=P.pageY-I.pageY,T=Math.sqrt(C*C+N*N);if(!c.current){c.current=T;return}const O=T/c.current,M=Math.max(1,Math.min(t,o*O));if(o===M)return;i(M);const z=(P.pageX+I.pageX)/2,D=(P.pageY+I.pageY)/2;let B=z-l.current.x,G=D-l.current.y;B=Math.max(v,Math.min(x,B)),G=Math.max(S,Math.min(w,G)),u.current={x:B,y:G},c.current=T,h(B,G,M)}else if(g.touches.length===1){const P=g.touches[0].pageX,I=g.touches[0].pageY;let C=P-l.current.x,N=I-l.current.y;C=Math.max(v,Math.min(x,C)),N=Math.max(S,Math.min(w,N)),u.current={x:C,y:N},h(C,N,o)}},[t,o]);return j.useEffect(()=>(document.addEventListener("touchstart",m),document.addEventListener("touchmove",_,{passive:!1}),()=>{document.removeEventListener("touchstart",m),document.removeEventListener("touchmove",_)}),[_,m]),{containerRef:r,imgRef:n,scale:o}},ky=()=>{const e=async(g,v)=>U.proxyCartAPI("/_v/proxy/checkout/order-form/coupon",{body:{orderFormId:g,coupon:v}}),t=async(g,v,x={},S)=>{if(S)if(v){const w=v.includes(" - ")?v.split(" - ")[0]:v,P=await U.proxyCartAPI("/_v/proxy/checkout/order-form/seller-code",{body:{orderFormId:g,sellerCode:w}});return P instanceof Object&&x.name in P&&P[x.status]===!0?U.proxyCartAPI("/_v/proxy/checkout/order-form/attachments",{body:{orderFormId:g,sellerCode:w,sellerName:P[x.name]}}).then(C=>({...C,openTextField:{...(C==null?void 0:C.openTextField)??{},statusOk:!0}})):Promise.resolve({paymentData:null,openTextField:{statusOk:!1,value:w}})}else return U.proxyCartAPI("/_v/proxy/checkout/order-form/attachments",{body:{orderFormId:g,sellerCode:"",sellerName:""}})},r=async(g,v)=>U.proxyCartAPI("/_v/proxy/checkout/order-form/attachments/marketing-data",{body:{orderFormId:g,marketingData:v}}),n=async(g,v,x)=>U.proxyCartAPI("/_v/proxy/checkout/order-form/items",{body:{orderFormId:g,orderItems:U.addItemOrder(v,x)}}),o=async(g,v,x,S=!1)=>U.proxyCartAPI("/_v/proxy/checkout/order-form/offerings",{body:{id:v,itemIndex:x,orderFormId:g,remove:S}}),i=async g=>U.proxyCartAPI("/_v/proxy/checkout/order-form/items/remove-all",{body:{orderFormId:g}}),c=async g=>U.proxyCartAPI("/_v/proxy/checkout/order-form",{body:{orderFormId:g??""}}),l=async(g,v)=>U.proxyCartAPI("/_v/proxy/checkout/order-form/profile",{body:{orderFormId:g,email:v}}),u=async(g,v,x)=>{const S=U.removeQuantity(v,x);return U.proxyCartAPI("/_v/proxy/checkout/order-form/items/update",{body:{orderItems:S.updateItems,orderFormId:g}})},d=async(g,v,x,S,w,P,I)=>{var T,O;const C=I?{startDateUtc:(T=P==null?void 0:P.deliveryWindow)==null?void 0:T.startDate,endDateUtc:(O=P==null?void 0:P.deliveryWindow)==null?void 0:O.endDate}:null,N={logisticsInfo:Array.from({length:S},(M,z)=>({itemIndex:z,selectedDeliveryChannel:(P==null?void 0:P.deliveryChannel)||null,selectedSla:(P==null?void 0:P.deliveryMethod)||null,deliveryWindow:C})),selectedAddresses:w,clearAddressIfPostalCodeNotFound:!0};return U.proxyCartAPI("/_v/proxy/checkout/order-form/shipping",{body:{...N,orderFormId:g,country:x,postalCode:v}})},h=async(g,v,x)=>U.proxyCartAPI("/_v/proxy/checkout/order-form/shipping/update",{body:{orderFormId:g,options:v,selectedAddresses:x}}),m=async(g,v,x,S)=>{const w=U.updateQuantity(v,x,S);return U.proxyCartAPI("/_v/proxy/checkout/order-form/items/update",{body:{orderFormId:g,orderItems:w}})};return{addCoupon:e,addItem:n,addSellerCode:t,addMarketingData:r,giftItem:o,emptyCart:i,getOrderForm:c,insertProfileEmail:l,removeItem:u,shipping:d,shippingUpdate:h,updateItemQuantity:async(g,v,x,S,w)=>m(g,v,x,S).then(P=>P&&Array.isArray(P.items)?U.updateItemSellerExternal(P.items,x)?m(g,v,x,w):P:!1)}},ko="soma::cart",hs="soma::options",fn=yn.create((e,t)=>{const r=ky(),n=async(o,i,c)=>{e({loading:!0});const l=await U.updateOrderFormPromise(o);if(typeof l!="boolean"){e({...l});const u=await U.mergeOptionsPromise(Zt.get(hs),c);return Zt.set(hs,u),U.getValue(l,i).finally(()=>e({loading:!1,options:u}))}return U.promiseDefault};if(typeof window<"u"){const o=async i=>{if(i){const c=await Zt.get(hs).then(d=>U.findOptions(d,i.items));Zt.set(ko,i),Zt.set(hs,c),e({...i,options:c});const l=new URLSearchParams(window.location.search),u=l.get("utm_campaign")||l.get("utmi_campaign")||"";u&&n(()=>r.addSellerCode(t().id,u.toUpperCase()),"openTextField")}};return Zt.get(ko).then(i=>r.getOrderForm(i?i.id:"").then(o)),{...U.initialState,addCoupon:async i=>n(()=>r.addCoupon(t().id,i),"marketingData"),addItem:(i,c)=>{n(()=>r.addItem(t().id,t().items,i),"items",c)},addSellerCode:async(i,c)=>n(()=>r.addSellerCode(t().id,i,c,t().isOpen),"openTextField"),addMarketingData:async i=>n(()=>r.addMarketingData(t().id,i),"marketingData"),emptyCart:()=>{n(()=>r.emptyCart(t().id))},removeItem:async i=>{const c=await n(()=>r.removeItem(t().id,t().items,i),"items");return U.getRemoveId(i,c)},shipping:async(i,c="BR")=>n(()=>r.shipping(t().id,i??"",c,t().items.length,U.createNewAddress(i??"",null,c)),"shippingData"),shippingUpdate:async i=>n(()=>{var c;return r.shippingUpdate(t().id,i,(c=t().shippingData)==null?void 0:c.selectedAddresses)},"shippingData"),toggleServiceToProduct:async(i,c,l)=>n(()=>r.giftItem(t().id,i,c,l),"items"),updateItemQuantity:async(i,c,l)=>{const{id:u,items:d}=t();return n(()=>{var h;return r.updateItemQuantity(u,d,i,c,((h=d.find(m=>m.id===i))==null?void 0:h.quantity)??1)},"items",l?[l]:void 0)},insertProfileEmail:async i=>n(()=>r.insertProfileEmail(t().id,i),"clientProfileData"),setIsOpen:i=>e({isOpen:i})}}return U.initialState}),My=()=>fn(e=>e),Zd=yn.create(e=>({notifications:[],actions:{addNotification:(t,r)=>e(n=>U.addNotification(n,t,r)),removeNotification:t=>e(r=>({notifications:r.notifications.filter(n=>n.id!==t)}))}})),pc=()=>Zd(e=>e.notifications),hc=()=>Zd(e=>e.actions),Ly=Object.freeze(Object.defineProperty({__proto__:null,KEY_INDEXED_OPTIONS:hs,KEY_INDEXED_STORE:ko,useCartStore:fn,useGetCartStoreState:My,useGetNotificationActions:hc,useGetNotificationsStore:pc},Symbol.toStringTag,{value:"Module"})),Dy=6e3,ef=j.createContext({}),tf=({children:e,...t})=>{const{items:r}=fn(),[n,o]=j.useState([]),i=j.useRef(null),c=j.useMemo(()=>Array.isArray(n)&&n.length>0?n.map(l=>r.find(u=>u.id===l.id)).filter(l=>l!==void 0):[],[r,n]);return j.useEffect(()=>{n.length&&(clearTimeout(i.current??0),i.current=setTimeout(()=>{o([])},Dy))},[n]),s.jsx(ef.Provider,{value:j.useMemo(()=>({...t,setRecentlyAdded:o,recentlyAddedProducts:c}),[t,o,c]),children:e})},Os=()=>{const e=j.useContext(ef);if(e===void 0)throw new Error("useUIContext must be used within a UIProvider");return e};class rf{constructor(){Gr(this,"events",{});Gr(this,"prevData",{})}subscribe(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),()=>{this.events[t]=this.events[t].filter(n=>n!==r)}}publish(t,r){this.events[t]&&this.events[t].forEach(n=>{this.prevData[t]=r,n(r)})}}const nf=j.createContext({}),Fy=({children:e,headerConfigs:t,pathname:r,storeId:n,...o})=>{U.configureFetchProxy(n);const[i,c]=j.useState(!0),[l,u]=j.useState(!1),d=r==="/",h=j.useRef(new rf),m=v=>v?{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},_=m(d),g=j.useRef(_);return j.useEffect(()=>{var S;const v=((S=new URLSearchParams(window.location.search))==null?void 0:S.toString())??"";(v.includes("utm_")||v.includes("gclid"))&&(Ao.get("lastMedias")||Ao.set("lastMedias",`${v}`,{expires:1/24}));const x=()=>{const w=typeof(window==null?void 0:window.navigator)>"u"?"":navigator==null?void 0:navigator.userAgent,P=window.innerWidth<1024||!!w.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i);l||u(!0),i!==P&&(c(P),u(!0))};return l||x(),window.addEventListener("resize",x,{passive:!0}),()=>window.removeEventListener("resize",x)},[i,l]),j.useEffect(()=>{const v=m(d);h.current.publish("header:change_variant",v.headerVariant),h.current.publish("header:change_position",v.position),g.current=v},[d]),s.jsx(nf.Provider,{value:{isMobile:i,mediatorRef:h,currentHeaderConfigsRef:g,deviceValidated:l,...o},children:s.jsx(tf,{children:e})})},xe=()=>j.useContext(nf),sf=j.createContext({}),zy=({children:e,...t})=>s.jsx(sf.Provider,{value:{...t},children:e}),Ae=()=>j.useContext(sf),vn=(e,t)=>yn.create(r=>{const n=()=>r({value:e});return t&&t instanceof Set&&t.add(n),{value:e,actions:{setValue:o=>r({value:o}),reset:n}}}),js={category:null,menuMobileIsOpen:!1,searchModalIsOpen:!1,userMenuIsOpen:!1},As=new Set,qy=()=>{As.forEach(e=>{e()})},of=yn.create((e,t)=>{const r=()=>e({value:js.category});return As.add(r),{value:js.category,actions:{reset:r,setValue:n=>e(()=>({value:n})),updateValue:n=>{t().value!==n&&e({value:n})}}}}),af=()=>of(e=>e.value),ks=()=>of(e=>e.actions),cf=vn(js.menuMobileIsOpen,As),lf=()=>cf(e=>e.value),uf=()=>cf(e=>e.actions),df=vn(js.searchModalIsOpen,As),ff=()=>df(e=>e.value),Ho=()=>df(e=>e.actions),pf=vn(js.userMenuIsOpen,As),mc=()=>pf(e=>e.value),_c=()=>pf(e=>e.actions),By=Object.freeze(Object.defineProperty({__proto__:null,resetAllHeaderStores:qy,useActionsHeaderCategory:ks,useActionsMenuMobileIsOpen:uf,useActionsSearchModalIsOpen:Ho,useActionsUserMenuIsOpen:_c,useGetHeaderCategoryStore:af,useGetMenuMobileIsOpen:lf,useGetSearchModalIsOpen:ff,useGetUserMenuIsOpen:mc},Symbol.toStringTag,{value:"Module"})),Jn={selectedSkuInfo:{productId:"",name:"",size:"",sku:"",sellerId:"",sellerName:"",available:!1,quantity:1},openLetMeKnow:!1,openMeasurements:!1,showBottomNavigation:!1,showNotify:!1},es=new Set,Uy=()=>{es.forEach(e=>{e()})},hf=yn.create(e=>{const t=()=>e({value:Jn.selectedSkuInfo});return es.add(t),{value:Jn.selectedSkuInfo,actions:{setValue:r=>e(n=>({value:{...n,...r}})),reset:t}}}),Ms=()=>hf(e=>e.value),mf=()=>hf(e=>e.actions),_f=vn(Jn.openLetMeKnow,es),Hy=()=>_f(e=>e.value),$y=()=>_f(e=>e.actions),gf=vn(Jn.showNotify,es),yf=()=>gf(e=>e.value),gc=()=>gf(e=>e.actions),vf=vn(Jn.showBottomNavigation,es),Wy=()=>vf(e=>e.value),Vy=()=>vf(e=>e.actions),xf=vn(Jn.openMeasurements,es),bf=()=>xf(e=>e.value),jf=()=>xf(e=>e.actions),Gy=Object.freeze(Object.defineProperty({__proto__:null,resetAllPDPStores:Uy,useActionsPDPOpenLetMeKnow:$y,useActionsPDPOpenMeasurements:jf,useActionsPDPSelectedSkuInfo:mf,useActionsPDPShowBottomNavigation:Vy,useActionsPDPShowNotify:gc,useGetPDPOpenLetMeKnow:Hy,useGetPDPOpenMeasurements:bf,useGetPDPSelectedSkuInfo:Ms,useGetPDPShowBottomNavigation:Wy,useGetPDPShowNotify:yf},Symbol.toStringTag,{value:"Module"})),Ql={feedback:{active:!1,action:"add"},list:[]},yc=yn.create((e,t)=>({value:Ql,actions:{reset:()=>e({value:Ql}),setValue:n=>e(()=>({value:n})),toggleProduct:n=>e(o=>o.value.list.includes(n)?{value:{feedback:{active:!0,action:"remove"},list:o.value.list.filter(i=>i!==n)}}:{value:{feedback:{active:!0,action:"add"},list:[...o.value.list,n]}}),updateList:n=>e(o=>({value:{...o.value,list:n}})),resetFeedback:()=>e(n=>({value:{...n.value,feedback:{active:!1,action:""}}}))}})),ts=()=>yc(e=>e.value.list),vc=()=>yc(e=>e.value.feedback),xn=()=>yc(e=>e.actions),Ky=Object.freeze(Object.defineProperty({__proto__:null,useActionsWishlistStore:xn,useGetWishlistFeedbackStore:vc,useGetWishlistStore:ts},Symbol.toStringTag,{value:"Module"})),Sf=j.createContext({}),Qy=({children:e,headerData:t,...r})=>{var h,m;const n=j.useRef(null),o=j.useRef(null),i=j.useRef(null),c=j.useRef(null),l=j.useRef(null),{mediatorRef:u,currentHeaderConfigsRef:d}=xe();return(h=u.current)==null||h.subscribe("header:change_variant",_=>{var w,P,I;if(_&&d.current&&(d.current.bannerVariant=_),!n.current)return;const v=document.body.scrollTop>0,x=n.current.getAttribute("data-interactiveVariant"),S=v?x:_??((w=d.current)==null?void 0:w.bannerVariant)??"default";S!==((P=d.current)==null?void 0:P.headerVariant)&&(n.current.setAttribute("data-bottomdivider",String(v)),n.current.setAttribute("data-variant",String(S)),(I=u.current)==null||I.publish("herobanner:change_controllers_variant",S),d.current&&(d.current.headerVariant=S))}),(m=u.current)==null||m.subscribe("header:change_position",_=>{n.current&&(n.current.style.position=_)}),j.useEffect(()=>{const _=new AbortController,g=p.helpers.throttle(()=>{var x;return(x=u.current)==null?void 0:x.publish("header:change_variant",null)},200);document.body.addEventListener("scroll",g,{passive:!0,signal:_.signal});const v=x=>{var w;(w=x.target.closest("a"))==null||w.blur()};return n.current&&(n.current.addEventListener("click",v,{signal:_.signal}),n.current.addEventListener("touchend",v,{signal:_.signal})),()=>{_.abort()}},[]),s.jsx(Sf.Provider,{value:{headerData:t,structureRef:o,rootRef:n,tipbarRef:i,userMenuMobileRef:c,userMenuDesktopRef:l,...r},children:e})},Ze=()=>j.useContext(Sf),Cf=j.createContext({}),wf=({children:e,...t})=>s.jsx(Cf.Provider,{value:j.useMemo(()=>t,[t]),children:e}),xc=()=>{const e=j.useContext(Cf);if(e===void 0)throw new Error("useMenuMobileContext must be used within a MenuMobileProvider");return e},Yy=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},Xy=(e,t,r)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const n=t.getBoundingClientRect(),o=e.getBoundingClientRect(),i=e!=null&&e.parentElement?Yy(e==null?void 0:e.parentElement):0;return{left:n.left+n.width/2-(o.width+i),top:n.top+n.height+r}},Ef=j.createContext({}),If=({children:e,delay:t=600,gap:r=20,...n})=>{const[o,i]=j.useState(!1),c=j.useRef(null),[l,u]=j.useState(!1),[d,h]=j.useState({left:0,top:0}),m=j.useCallback(()=>{u(!0),typeof window<"u"&&(c.current=window.setTimeout(()=>{i(!1),u(!1)},t))},[u,i,t]);return j.useEffect(()=>{if(typeof window>"u")return;const _=window.document.querySelector("#cart-button"),g=window.document.querySelector("#add-to-cart--tooltip");if(_&&g){const{left:v,top:x}=Xy(g,_,r??0);h({left:v,top:x}),u(!1)}},[r,o]),s.jsx(Ef.Provider,{value:j.useMemo(()=>({...n,...d,handleClose:m,isLeaving:l,isOpen:o,setIsOpen:i,setIsLeaving:u}),[n,d,m,l,o,i,u]),children:e})},bn=()=>{const e=j.useContext(Ef);if(e===void 0)throw new Error("useAddToCartContext must be used within a AddToCartProvider");return e},Pf=j.createContext({}),Jy=({children:e,SELLER_CODE_VALIDATION_KEYS:t,CARTPROVIDER_MESSAGE_PRODUCT_REMOVE:r,data:n,...o})=>{var _e,Ce,ge,we;const i=fn(),{setRecentlyAdded:c}=Os(),l=j.useRef(""),u=pc(),{addNotification:d,removeNotification:h}=hc(),[m,_]=j.useState(null),{addCoupon:g,addItem:v,addSellerCode:x,addMarketingData:S,emptyCart:w,isOpen:P,removeItem:I,shipping:C,shippingUpdate:N,toggleServiceToProduct:T,updateItemQuantity:O}=i;j.useEffect(()=>{(async()=>{var F,ce,je,Oe;if(!i.id||!((ce=(F=n==null?void 0:n.promotion)==null?void 0:F.promotionCart)!=null&&ce.idPromotion)||((Oe=(je=n==null?void 0:n.promotion)==null?void 0:je.promotionCart)==null?void 0:Oe.selectPromotion)==="Desativar")return;const oe=await fetch("/api/buywin",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({orderFormId:i.id,promotionId:n.promotion.promotionCart.idPromotion,web:(n==null?void 0:n.promotion.promotionCart.versionAPI)==="Original"})}).then(q=>q.json());_(oe)})()},[i.id,i.items.length,n==null?void 0:n.versionId,(Ce=(_e=n==null?void 0:n.promotion)==null?void 0:_e.promotionCart)==null?void 0:Ce.idPromotion,(we=(ge=n==null?void 0:n.promotion)==null?void 0:ge.promotionCart)==null?void 0:we.versionAPI]),j.useEffect(()=>{const V=Ao.get("lastMedias");if(i.id&&V&&l.current!==V){l.current=V;const oe=new URLSearchParams(V),F=U.mountMarketingData(oe);S(F)}},[i,S]);const M=j.useCallback(async(V,oe)=>(oe==="coupon"?g(V):x(V,t??{})).then(ce=>{if(typeof ce!="boolean"&&ce instanceof Object){if(oe==="seller"&&"value"in ce){const{statusOk:je,value:Oe}=ce,q=String(Oe??"").split(" - ");return U.getCode((q==null?void 0:q[0])??"",V,!!je)}return U.getCode(String(ce.coupon),V,!0)}return U.getCode("","")}).catch(()=>Promise.resolve({code:400})),[g,x]),z=j.useCallback((V,oe,F)=>{const{id:ce}=V;O(ce,oe,F)},[O]),D=j.useCallback((V,oe,F=!1)=>{if(!V)return;const{id:ce}=V,je=U.findItemIndex(i.items,ce);if(je!==-1&&!F){const Oe=Number(i.items[je].quantity),q=i.items[je]?Oe+1:1;z(V,q,oe)}else v({id:ce,quantity:(V==null?void 0:V.quantity)??1,seller:V.seller});P||c(Oe=>[...Oe,V])},[v,z,i.items,P,c]),B=j.useCallback((V,oe)=>{if(!V||!Array.isArray(V))return;c(ce=>[...ce,...V]);const F=V.map(ce=>{const{id:je,quantity:Oe,seller:q}=ce,$=U.findItemIndex(i.items,je),Pe=U.getQuantity(Oe??1,$);return{id:je,quantity:Pe,seller:q}});v(F,oe)},[v,i.items,c]),G=j.useCallback(async(V,oe,F)=>V?I(V).then(()=>(d(oe??`${r}`,F),U.getCode(V,V))):Promise.resolve(U.getCode("","Product id required")),[d,I]),J=j.useCallback(()=>{i.items.length>0&&w()},[w,i.items]),Y=j.useCallback((V,oe="BRA")=>C(V,oe),[C]),X=j.useCallback(V=>{V&&N(V)},[N]),Z=j.useCallback(async(V,oe,F=!1)=>{const ce=i.items.findIndex(Oe=>Oe.uniqueId===V);return i.items[ce]&&ce>=0?T(oe,ce,F):!1},[i.items,T]),he=j.useCallback(async(V,oe)=>O(V,oe).then(F=>{if(Array.isArray(F)){const ce=F.find(je=>je.id===V);if(ce&&(ce==null?void 0:ce.quantity)<oe)return String(ce.quantity)}return!1}),[O]),fe=j.useCallback(async()=>{await S({...i.marketingData,coupon:""})},[S,i.marketingData]),ee=j.useCallback(async()=>{await S({...i.marketingData,utmiCampaign:"",utmCampaign:"",utmSource:"",utmMedium:""})},[S,i.marketingData]),ie=j.useCallback(async()=>{await C("","BRA")},[C]);return s.jsx(Pf.Provider,{value:j.useMemo(()=>({...o,data:n,addCouponSeller:M,addToCart:D,addItemsToCart:B,cartStore:i,notifications:u,clearCart:J,addNotification:d,isOpen:i.isOpen,removeNotification:h,removeToCart:G,setIsOpen:i.setIsOpen,shipping:Y,shippingUpdateOption:X,toggleGiftItemCart:Z,updateItemQuantity:he,removeCoupon:fe,removeSellerCode:ee,removeCEP:ie,promotionRules:m,setPromotionRules:_}),[o,n,M,D,B,u,J,d,i,h,G,Y,X,Z,he,fe,ee,ie,m,_]),children:e})},Xe=()=>{const e=j.useContext(Pf);if(e===void 0)throw new Error("useCartContext must be used within a CartProvider");return e},Nf=j.createContext({}),bc=({children:e,state:t,collectionId:r,brand:n,searchParams:o})=>{const i=j.useMemo(()=>{var c;return r?[{key:"productclusterids",value:r.toString()}]:n?[{key:"brand",value:n}]:(c=t.base)!=null&&c.length?t.base.slice(1).split("/").map((l,u)=>({key:`category-${u+1}`,value:l})):[]},[t.base,r]);return s.jsx(Nf.Provider,{value:j.useMemo(()=>({state:{...t,facets:[...i,...t.facets??[]]},searchParams:o}),[i,t,o]),children:e})},ft=()=>{const e=j.useContext(Nf);if(e===void 0)throw new Error("useSearchContext must be used within a SearchProvider");return e};var Ls=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(){}},Zy={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},cr,Jr,Rd,ev=(Rd=class{constructor(){ye(this,cr,Zy);ye(this,Jr,!1)}setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&k(this,Jr)&&e!==k(this,cr)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:k(this,cr),provider:e}),ue(this,cr,e),process.env.NODE_ENV!=="production"&&ue(this,Jr,!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&ue(this,Jr,!0),k(this,cr).setTimeout(e,t)}clearTimeout(e){k(this,cr).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&ue(this,Jr,!0),k(this,cr).setInterval(e,t)}clearInterval(e){k(this,cr).clearInterval(e)}},cr=new WeakMap,Jr=new WeakMap,Rd),Yr=new ev;function tv(e){setTimeout(e,0)}var pn=typeof window>"u"||"Deno"in globalThis;function Nt(){}function rv(e,t){return typeof e=="function"?e(t):e}function Sa(e){return typeof e=="number"&&e>=0&&e!==1/0}function Rf(e,t){return Math.max(e+(t||0)-Date.now(),0)}function zr(e,t){return typeof e=="function"?e(t):e}function Ut(e,t){return typeof e=="function"?e(t):e}function Yl(e,t){const{type:r="all",exact:n,fetchStatus:o,predicate:i,queryKey:c,stale:l}=e;if(c){if(n){if(t.queryHash!==jc(c,t.options))return!1}else if(!Cs(t.queryKey,c))return!1}if(r!=="all"){const u=t.isActive();if(r==="active"&&!u||r==="inactive"&&u)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||o&&o!==t.state.fetchStatus||i&&!i(t))}function Xl(e,t){const{exact:r,status:n,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(Ss(t.options.mutationKey)!==Ss(i))return!1}else if(!Cs(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||o&&!o(t))}function jc(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ss)(e)}function Ss(e){return JSON.stringify(e,(t,r)=>Ea(r)?Object.keys(r).sort().reduce((n,o)=>(n[o]=r[o],n),{}):r)}function Cs(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Cs(e[r],t[r])):!1}var nv=Object.prototype.hasOwnProperty;function Ca(e,t){if(e===t)return e;const r=Jl(e)&&Jl(t);if(!r&&!(Ea(e)&&Ea(t)))return t;const o=(r?e:Object.keys(e)).length,i=r?t:Object.keys(t),c=i.length,l=r?new Array(c):{};let u=0;for(let d=0;d<c;d++){const h=r?d:i[d],m=e[h],_=t[h];if(m===_){l[h]=m,(r?d<o:nv.call(e,h))&&u++;continue}if(m===null||_===null||typeof m!="object"||typeof _!="object"){l[h]=_;continue}const g=Ca(m,_);l[h]=g,g===m&&u++}return o===c&&u===o?e:l}function wa(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 Jl(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ea(e){if(!Zl(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Zl(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Zl(e){return Object.prototype.toString.call(e)==="[object Object]"}function sv(e){return new Promise(t=>{Yr.setTimeout(t,e)})}function Ia(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 Ca(e,t)}catch(n){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${n}`),n}return Ca(e,t)}return t}function ov(e){return e}function iv(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function av(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Mo=Symbol();function Tf(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Mo&&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===Mo?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Of(e,t){return typeof e=="function"?e(...t):!!e}function cv(e,t,r){let n=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),n||(n=!0,o.aborted?r():o.addEventListener("abort",r,{once:!0})),o)}),e}var Zr,Or,qn,Td,lv=(Td=class extends Ls{constructor(){super();ye(this,Zr);ye(this,Or);ye(this,qn);ue(this,qn,t=>{if(!pn&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){k(this,Or)||this.setEventListener(k(this,qn))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,Or))==null||t.call(this),ue(this,Or,void 0))}setEventListener(t){var r;ue(this,qn,t),(r=k(this,Or))==null||r.call(this),ue(this,Or,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){k(this,Zr)!==t&&(ue(this,Zr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof k(this,Zr)=="boolean"?k(this,Zr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Zr=new WeakMap,Or=new WeakMap,qn=new WeakMap,Td),Sc=new lv;function Pa(){let e,t;const r=new Promise((o,i)=>{e=o,t=i});r.status="pending",r.catch(()=>{});function n(o){Object.assign(r,o),delete r.resolve,delete r.reject}return r.resolve=o=>{n({status:"fulfilled",value:o}),e(o)},r.reject=o=>{n({status:"rejected",reason:o}),t(o)},r}var uv=tv;function dv(){let e=[],t=0,r=l=>{l()},n=l=>{l()},o=uv;const i=l=>{t?e.push(l):o(()=>{r(l)})},c=()=>{const l=e;e=[],l.length&&o(()=>{n(()=>{l.forEach(u=>{r(u)})})})};return{batch:l=>{let u;t++;try{u=l()}finally{t--,t||c()}return u},batchCalls:l=>(...u)=>{i(()=>{l(...u)})},schedule:i,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{o=l}}}var ht=dv(),Bn,Ar,Un,Od,fv=(Od=class extends Ls{constructor(){super();ye(this,Bn,!0);ye(this,Ar);ye(this,Un);ue(this,Un,t=>{if(!pn&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){k(this,Ar)||this.setEventListener(k(this,Un))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,Ar))==null||t.call(this),ue(this,Ar,void 0))}setEventListener(t){var r;ue(this,Un,t),(r=k(this,Ar))==null||r.call(this),ue(this,Ar,t(this.setOnline.bind(this)))}setOnline(t){k(this,Bn)!==t&&(ue(this,Bn,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return k(this,Bn)}},Bn=new WeakMap,Ar=new WeakMap,Un=new WeakMap,Od),Lo=new fv;function pv(e){return Math.min(1e3*2**e,3e4)}function Af(e){return(e??"online")==="online"?Lo.isOnline():!0}var Na=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function kf(e){let t=!1,r=0,n;const o=Pa(),i=()=>o.status!=="pending",c=x=>{var S;if(!i()){const w=new Na(x);_(w),(S=e.onCancel)==null||S.call(e,w)}},l=()=>{t=!0},u=()=>{t=!1},d=()=>Sc.isFocused()&&(e.networkMode==="always"||Lo.isOnline())&&e.canRun(),h=()=>Af(e.networkMode)&&e.canRun(),m=x=>{i()||(n==null||n(),o.resolve(x))},_=x=>{i()||(n==null||n(),o.reject(x))},g=()=>new Promise(x=>{var S;n=w=>{(i()||d())&&x(w)},(S=e.onPause)==null||S.call(e)}).then(()=>{var x;n=void 0,i()||(x=e.onContinue)==null||x.call(e)}),v=()=>{if(i())return;let x;const S=r===0?e.initialPromise:void 0;try{x=S??e.fn()}catch(w){x=Promise.reject(w)}Promise.resolve(x).then(m).catch(w=>{var T;if(i())return;const P=e.retry??(pn?0:3),I=e.retryDelay??pv,C=typeof I=="function"?I(r,w):I,N=P===!0||typeof P=="number"&&r<P||typeof P=="function"&&P(r,w);if(t||!N){_(w);return}r++,(T=e.onFail)==null||T.call(e,r,w),sv(C).then(()=>d()?void 0:g()).then(()=>{t?_(w):v()})})};return{promise:o,status:()=>o.status,cancel:c,continue:()=>(n==null||n(),o),cancelRetry:l,continueRetry:u,canStart:h,start:()=>(h()?v():g().then(v),o)}}var en,Ad,Mf=(Ad=class{constructor(){ye(this,en)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Sa(this.gcTime)&&ue(this,en,Yr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(pn?1/0:5*60*1e3))}clearGcTimeout(){k(this,en)&&(Yr.clearTimeout(k(this,en)),ue(this,en,void 0))}},en=new WeakMap,Ad),tn,Hn,Bt,rn,dt,Is,nn,Xt,yr,kd,hv=(kd=class extends Mf{constructor(t){super();ye(this,Xt);ye(this,tn);ye(this,Hn);ye(this,Bt);ye(this,rn);ye(this,dt);ye(this,Is);ye(this,nn);ue(this,nn,!1),ue(this,Is,t.defaultOptions),this.setOptions(t.options),this.observers=[],ue(this,rn,t.client),ue(this,Bt,k(this,rn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ue(this,tn,tu(this.options)),this.state=t.state??k(this,tn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=k(this,dt))==null?void 0:t.promise}setOptions(t){if(this.options={...k(this,Is),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=tu(this.options);r.data!==void 0&&(this.setState(eu(r.data,r.dataUpdatedAt)),ue(this,tn,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&k(this,Bt).remove(this)}setData(t,r){const n=Ia(this.state.data,t,this.options);return Re(this,Xt,yr).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Re(this,Xt,yr).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,o;const r=(n=k(this,dt))==null?void 0:n.promise;return(o=k(this,dt))==null||o.cancel(t),r?r.then(Nt).catch(Nt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(k(this,tn))}isActive(){return this.observers.some(t=>Ut(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Mo||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>zr(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:!Rf(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=k(this,dt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=k(this,dt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),k(this,Bt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(k(this,dt)&&(k(this,nn)?k(this,dt).cancel({revert:!0}):k(this,dt).cancelRetry()),this.scheduleGc()),k(this,Bt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Re(this,Xt,yr).call(this,{type:"invalidate"})}async fetch(t,r){var u,d,h,m,_,g,v,x,S,w,P,I;if(this.state.fetchStatus!=="idle"&&((u=k(this,dt))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(k(this,dt))return k(this,dt).continueRetry(),k(this,dt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const C=this.observers.find(N=>N.options.queryFn);C&&this.setOptions(C.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,o=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(ue(this,nn,!0),n.signal)})},i=()=>{const C=Tf(this.options,r),T=(()=>{const O={client:k(this,rn),queryKey:this.queryKey,meta:this.meta};return o(O),O})();return ue(this,nn,!1),this.options.persister?this.options.persister(C,T,this):C(T)},l=(()=>{const C={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:k(this,rn),state:this.state,fetchFn:i};return o(C),C})();(d=this.options.behavior)==null||d.onFetch(l,this),ue(this,Hn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=l.fetchOptions)==null?void 0:h.meta))&&Re(this,Xt,yr).call(this,{type:"fetch",meta:(m=l.fetchOptions)==null?void 0:m.meta}),ue(this,dt,kf({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,onCancel:C=>{C instanceof Na&&C.revert&&this.setState({...k(this,Hn),fetchStatus:"idle"}),n.abort()},onFail:(C,N)=>{Re(this,Xt,yr).call(this,{type:"failed",failureCount:C,error:N})},onPause:()=>{Re(this,Xt,yr).call(this,{type:"pause"})},onContinue:()=>{Re(this,Xt,yr).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const C=await k(this,dt).start();if(C===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(C),(g=(_=k(this,Bt).config).onSuccess)==null||g.call(_,C,this),(x=(v=k(this,Bt).config).onSettled)==null||x.call(v,C,this.state.error,this),C}catch(C){if(C instanceof Na){if(C.silent)return k(this,dt).promise;if(C.revert){if(this.state.data===void 0)throw C;return this.state.data}}throw Re(this,Xt,yr).call(this,{type:"error",error:C}),(w=(S=k(this,Bt).config).onError)==null||w.call(S,C,this),(I=(P=k(this,Bt).config).onSettled)==null||I.call(P,this.state.data,C,this),C}finally{this.scheduleGc()}}},tn=new WeakMap,Hn=new WeakMap,Bt=new WeakMap,rn=new WeakMap,dt=new WeakMap,Is=new WeakMap,nn=new WeakMap,Xt=new WeakSet,yr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Lf(n.data,this.options),fetchMeta:t.meta??null};case"success":const o={...n,...eu(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ue(this,Hn,t.manual?o:void 0),o;case"error":const i=t.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),ht.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),k(this,Bt).notify({query:this,type:"updated",action:t})})},kd);function Lf(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Af(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function eu(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function tu(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var It,Te,Ps,bt,sn,$n,vr,kr,Ns,Wn,Vn,on,an,Mr,Gn,He,ms,Ra,Ta,Oa,Aa,ka,Ma,La,Df,Md,mv=(Md=class extends Ls{constructor(t,r){super();ye(this,He);ye(this,It);ye(this,Te);ye(this,Ps);ye(this,bt);ye(this,sn);ye(this,$n);ye(this,vr);ye(this,kr);ye(this,Ns);ye(this,Wn);ye(this,Vn);ye(this,on);ye(this,an);ye(this,Mr);ye(this,Gn,new Set);this.options=r,ue(this,It,t),ue(this,kr,null),ue(this,vr,Pa()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(k(this,Te).addObserver(this),ru(k(this,Te),this.options)?Re(this,He,ms).call(this):this.updateResult(),Re(this,He,Aa).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Da(k(this,Te),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Da(k(this,Te),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Re(this,He,ka).call(this),Re(this,He,Ma).call(this),k(this,Te).removeObserver(this)}setOptions(t){const r=this.options,n=k(this,Te);if(this.options=k(this,It).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ut(this.options.enabled,k(this,Te))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Re(this,He,La).call(this),k(this,Te).setOptions(this.options),r._defaulted&&!wa(this.options,r)&&k(this,It).getQueryCache().notify({type:"observerOptionsUpdated",query:k(this,Te),observer:this});const o=this.hasListeners();o&&nu(k(this,Te),n,this.options,r)&&Re(this,He,ms).call(this),this.updateResult(),o&&(k(this,Te)!==n||Ut(this.options.enabled,k(this,Te))!==Ut(r.enabled,k(this,Te))||zr(this.options.staleTime,k(this,Te))!==zr(r.staleTime,k(this,Te)))&&Re(this,He,Ra).call(this);const i=Re(this,He,Ta).call(this);o&&(k(this,Te)!==n||Ut(this.options.enabled,k(this,Te))!==Ut(r.enabled,k(this,Te))||i!==k(this,Mr))&&Re(this,He,Oa).call(this,i)}getOptimisticResult(t){const r=k(this,It).getQueryCache().build(k(this,It),t),n=this.createResult(r,t);return gv(this,n)&&(ue(this,bt,n),ue(this,$n,this.options),ue(this,sn,k(this,Te).state)),n}getCurrentResult(){return k(this,bt)}trackResult(t,r){return new Proxy(t,{get:(n,o)=>(this.trackProp(o),r==null||r(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&k(this,vr).status==="pending"&&k(this,vr).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,o))})}trackProp(t){k(this,Gn).add(t)}getCurrentQuery(){return k(this,Te)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=k(this,It).defaultQueryOptions(t),n=k(this,It).getQueryCache().build(k(this,It),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Re(this,He,ms).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),k(this,bt)))}createResult(t,r){var z;const n=k(this,Te),o=this.options,i=k(this,bt),c=k(this,sn),l=k(this,$n),d=t!==n?t.state:k(this,Ps),{state:h}=t;let m={...h},_=!1,g;if(r._optimisticResults){const D=this.hasListeners(),B=!D&&ru(t,r),G=D&&nu(t,n,r,o);(B||G)&&(m={...m,...Lf(h.data,t.options)}),r._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:v,errorUpdatedAt:x,status:S}=m;g=m.data;let w=!1;if(r.placeholderData!==void 0&&g===void 0&&S==="pending"){let D;i!=null&&i.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData)?(D=i.data,w=!0):D=typeof r.placeholderData=="function"?r.placeholderData((z=k(this,Vn))==null?void 0:z.state.data,k(this,Vn)):r.placeholderData,D!==void 0&&(S="success",g=Ia(i==null?void 0:i.data,D,r),_=!0)}if(r.select&&g!==void 0&&!w)if(i&&g===(c==null?void 0:c.data)&&r.select===k(this,Ns))g=k(this,Wn);else try{ue(this,Ns,r.select),g=r.select(g),g=Ia(i==null?void 0:i.data,g,r),ue(this,Wn,g),ue(this,kr,null)}catch(D){ue(this,kr,D)}k(this,kr)&&(v=k(this,kr),g=k(this,Wn),x=Date.now(),S="error");const P=m.fetchStatus==="fetching",I=S==="pending",C=S==="error",N=I&&P,T=g!==void 0,M={status:S,fetchStatus:m.fetchStatus,isPending:I,isSuccess:S==="success",isError:C,isInitialLoading:N,isLoading:N,data:g,dataUpdatedAt:m.dataUpdatedAt,error:v,errorUpdatedAt:x,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:P,isRefetching:P&&!I,isLoadingError:C&&!T,isPaused:m.fetchStatus==="paused",isPlaceholderData:_,isRefetchError:C&&T,isStale:Cc(t,r),refetch:this.refetch,promise:k(this,vr),isEnabled:Ut(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const D=J=>{M.status==="error"?J.reject(M.error):M.data!==void 0&&J.resolve(M.data)},B=()=>{const J=ue(this,vr,M.promise=Pa());D(J)},G=k(this,vr);switch(G.status){case"pending":t.queryHash===n.queryHash&&D(G);break;case"fulfilled":(M.status==="error"||M.data!==G.value)&&B();break;case"rejected":(M.status!=="error"||M.error!==G.reason)&&B();break}}return M}updateResult(){const t=k(this,bt),r=this.createResult(k(this,Te),this.options);if(ue(this,sn,k(this,Te).state),ue(this,$n,this.options),k(this,sn).data!==void 0&&ue(this,Vn,k(this,Te)),wa(r,t))return;ue(this,bt,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,i=typeof o=="function"?o():o;if(i==="all"||!i&&!k(this,Gn).size)return!0;const c=new Set(i??k(this,Gn));return this.options.throwOnError&&c.add("error"),Object.keys(k(this,bt)).some(l=>{const u=l;return k(this,bt)[u]!==t[u]&&c.has(u)})};Re(this,He,Df).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Re(this,He,Aa).call(this)}},It=new WeakMap,Te=new WeakMap,Ps=new WeakMap,bt=new WeakMap,sn=new WeakMap,$n=new WeakMap,vr=new WeakMap,kr=new WeakMap,Ns=new WeakMap,Wn=new WeakMap,Vn=new WeakMap,on=new WeakMap,an=new WeakMap,Mr=new WeakMap,Gn=new WeakMap,He=new WeakSet,ms=function(t){Re(this,He,La).call(this);let r=k(this,Te).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Nt)),r},Ra=function(){Re(this,He,ka).call(this);const t=zr(this.options.staleTime,k(this,Te));if(pn||k(this,bt).isStale||!Sa(t))return;const n=Rf(k(this,bt).dataUpdatedAt,t)+1;ue(this,on,Yr.setTimeout(()=>{k(this,bt).isStale||this.updateResult()},n))},Ta=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(k(this,Te)):this.options.refetchInterval)??!1},Oa=function(t){Re(this,He,Ma).call(this),ue(this,Mr,t),!(pn||Ut(this.options.enabled,k(this,Te))===!1||!Sa(k(this,Mr))||k(this,Mr)===0)&&ue(this,an,Yr.setInterval(()=>{(this.options.refetchIntervalInBackground||Sc.isFocused())&&Re(this,He,ms).call(this)},k(this,Mr)))},Aa=function(){Re(this,He,Ra).call(this),Re(this,He,Oa).call(this,Re(this,He,Ta).call(this))},ka=function(){k(this,on)&&(Yr.clearTimeout(k(this,on)),ue(this,on,void 0))},Ma=function(){k(this,an)&&(Yr.clearInterval(k(this,an)),ue(this,an,void 0))},La=function(){const t=k(this,It).getQueryCache().build(k(this,It),this.options);if(t===k(this,Te))return;const r=k(this,Te);ue(this,Te,t),ue(this,Ps,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},Df=function(t){ht.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(k(this,bt))}),k(this,It).getQueryCache().notify({query:k(this,Te),type:"observerResultsUpdated"})})},Md);function _v(e,t){return Ut(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ru(e,t){return _v(e,t)||e.state.data!==void 0&&Da(e,t,t.refetchOnMount)}function Da(e,t,r){if(Ut(t.enabled,e)!==!1&&zr(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Cc(e,t)}return!1}function nu(e,t,r,n){return(e!==t||Ut(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Cc(e,r)}function Cc(e,t){return Ut(t.enabled,e)!==!1&&e.isStaleByTime(zr(t.staleTime,e))}function gv(e,t){return!wa(e.getCurrentResult(),t)}function su(e){return{onFetch:(t,r)=>{var h,m,_,g,v;const n=t.options,o=(_=(m=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:m.fetchMore)==null?void 0:_.direction,i=((g=t.state.data)==null?void 0:g.pages)||[],c=((v=t.state.data)==null?void 0:v.pageParams)||[];let l={pages:[],pageParams:[]},u=0;const d=async()=>{let x=!1;const S=I=>{cv(I,()=>t.signal,()=>x=!0)},w=Tf(t.options,t.fetchOptions),P=async(I,C,N)=>{if(x)return Promise.reject();if(C==null&&I.pages.length)return Promise.resolve(I);const O=(()=>{const B={client:t.client,queryKey:t.queryKey,pageParam:C,direction:N?"backward":"forward",meta:t.options.meta};return S(B),B})(),M=await w(O),{maxPages:z}=t.options,D=N?av:iv;return{pages:D(I.pages,M,z),pageParams:D(I.pageParams,C,z)}};if(o&&i.length){const I=o==="backward",C=I?yv:ou,N={pages:i,pageParams:c},T=C(n,N);l=await P(N,T,I)}else{const I=e??i.length;do{const C=u===0?c[0]??n.initialPageParam:ou(n,l);if(u>0&&C==null)break;l=await P(l,C),u++}while(u<I)}return l};t.options.persister?t.fetchFn=()=>{var x,S;return(S=(x=t.options).persister)==null?void 0:S.call(x,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=d}}}function ou(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function yv(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Rs,lr,jt,cn,ur,Pr,Ld,vv=(Ld=class extends Mf{constructor(t){super();ye(this,ur);ye(this,Rs);ye(this,lr);ye(this,jt);ye(this,cn);ue(this,Rs,t.client),this.mutationId=t.mutationId,ue(this,jt,t.mutationCache),ue(this,lr,[]),this.state=t.state||xv(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){k(this,lr).includes(t)||(k(this,lr).push(t),this.clearGcTimeout(),k(this,jt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ue(this,lr,k(this,lr).filter(r=>r!==t)),this.scheduleGc(),k(this,jt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){k(this,lr).length||(this.state.status==="pending"?this.scheduleGc():k(this,jt).remove(this))}continue(){var t;return((t=k(this,cn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var c,l,u,d,h,m,_,g,v,x,S,w,P,I,C,N,T,O,M,z;const r=()=>{Re(this,ur,Pr).call(this,{type:"continue"})},n={client:k(this,Rs),meta:this.options.meta,mutationKey:this.options.mutationKey};ue(this,cn,kf({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(D,B)=>{Re(this,ur,Pr).call(this,{type:"failed",failureCount:D,error:B})},onPause:()=>{Re(this,ur,Pr).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>k(this,jt).canRun(this)}));const o=this.state.status==="pending",i=!k(this,cn).canStart();try{if(o)r();else{Re(this,ur,Pr).call(this,{type:"pending",variables:t,isPaused:i}),await((l=(c=k(this,jt).config).onMutate)==null?void 0:l.call(c,t,this,n));const B=await((d=(u=this.options).onMutate)==null?void 0:d.call(u,t,n));B!==this.state.context&&Re(this,ur,Pr).call(this,{type:"pending",context:B,variables:t,isPaused:i})}const D=await k(this,cn).start();return await((m=(h=k(this,jt).config).onSuccess)==null?void 0:m.call(h,D,t,this.state.context,this,n)),await((g=(_=this.options).onSuccess)==null?void 0:g.call(_,D,t,this.state.context,n)),await((x=(v=k(this,jt).config).onSettled)==null?void 0:x.call(v,D,null,this.state.variables,this.state.context,this,n)),await((w=(S=this.options).onSettled)==null?void 0:w.call(S,D,null,t,this.state.context,n)),Re(this,ur,Pr).call(this,{type:"success",data:D}),D}catch(D){try{await((I=(P=k(this,jt).config).onError)==null?void 0:I.call(P,D,t,this.state.context,this,n))}catch(B){Promise.reject(B)}try{await((N=(C=this.options).onError)==null?void 0:N.call(C,D,t,this.state.context,n))}catch(B){Promise.reject(B)}try{await((O=(T=k(this,jt).config).onSettled)==null?void 0:O.call(T,void 0,D,this.state.variables,this.state.context,this,n))}catch(B){Promise.reject(B)}try{await((z=(M=this.options).onSettled)==null?void 0:z.call(M,void 0,D,t,this.state.context,n))}catch(B){Promise.reject(B)}throw Re(this,ur,Pr).call(this,{type:"error",error:D}),D}finally{k(this,jt).runNext(this)}}},Rs=new WeakMap,lr=new WeakMap,jt=new WeakMap,cn=new WeakMap,ur=new WeakSet,Pr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),ht.batch(()=>{k(this,lr).forEach(n=>{n.onMutationUpdate(t)}),k(this,jt).notify({mutation:this,type:"updated",action:t})})},Ld);function xv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var xr,Jt,Ts,Dd,bv=(Dd=class extends Ls{constructor(t={}){super();ye(this,xr);ye(this,Jt);ye(this,Ts);this.config=t,ue(this,xr,new Set),ue(this,Jt,new Map),ue(this,Ts,0)}build(t,r,n){const o=new vv({client:t,mutationCache:this,mutationId:++ro(this,Ts)._,options:t.defaultMutationOptions(r),state:n});return this.add(o),o}add(t){k(this,xr).add(t);const r=so(t);if(typeof r=="string"){const n=k(this,Jt).get(r);n?n.push(t):k(this,Jt).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(k(this,xr).delete(t)){const r=so(t);if(typeof r=="string"){const n=k(this,Jt).get(r);if(n)if(n.length>1){const o=n.indexOf(t);o!==-1&&n.splice(o,1)}else n[0]===t&&k(this,Jt).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=so(t);if(typeof r=="string"){const n=k(this,Jt).get(r),o=n==null?void 0:n.find(i=>i.state.status==="pending");return!o||o===t}else return!0}runNext(t){var n;const r=so(t);if(typeof r=="string"){const o=(n=k(this,Jt).get(r))==null?void 0:n.find(i=>i!==t&&i.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ht.batch(()=>{k(this,xr).forEach(t=>{this.notify({type:"removed",mutation:t})}),k(this,xr).clear(),k(this,Jt).clear()})}getAll(){return Array.from(k(this,xr))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Xl(r,n))}findAll(t={}){return this.getAll().filter(r=>Xl(t,r))}notify(t){ht.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return ht.batch(()=>Promise.all(t.map(r=>r.continue().catch(Nt))))}},xr=new WeakMap,Jt=new WeakMap,Ts=new WeakMap,Dd);function so(e){var t;return(t=e.options.scope)==null?void 0:t.id}var dr,Fd,jv=(Fd=class extends Ls{constructor(t={}){super();ye(this,dr);this.config=t,ue(this,dr,new Map)}build(t,r,n){const o=r.queryKey,i=r.queryHash??jc(o,r);let c=this.get(i);return c||(c=new hv({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(o)}),this.add(c)),c}add(t){k(this,dr).has(t.queryHash)||(k(this,dr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=k(this,dr).get(t.queryHash);r&&(t.destroy(),r===t&&k(this,dr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ht.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return k(this,dr).get(t)}getAll(){return[...k(this,dr).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Yl(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Yl(t,n)):r}notify(t){ht.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){ht.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ht.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},dr=new WeakMap,Fd),et,Lr,Dr,Kn,Qn,Fr,Yn,Xn,zd,Ff=(zd=class{constructor(e={}){ye(this,et);ye(this,Lr);ye(this,Dr);ye(this,Kn);ye(this,Qn);ye(this,Fr);ye(this,Yn);ye(this,Xn);ue(this,et,e.queryCache||new jv),ue(this,Lr,e.mutationCache||new bv),ue(this,Dr,e.defaultOptions||{}),ue(this,Kn,new Map),ue(this,Qn,new Map),ue(this,Fr,0)}mount(){ro(this,Fr)._++,k(this,Fr)===1&&(ue(this,Yn,Sc.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,et).onFocus())})),ue(this,Xn,Lo.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,et).onOnline())})))}unmount(){var e,t;ro(this,Fr)._--,k(this,Fr)===0&&((e=k(this,Yn))==null||e.call(this),ue(this,Yn,void 0),(t=k(this,Xn))==null||t.call(this),ue(this,Xn,void 0))}isFetching(e){return k(this,et).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return k(this,Lr).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=k(this,et).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=k(this,et).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(zr(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return k(this,et).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),o=k(this,et).get(n.queryHash),i=o==null?void 0:o.state.data,c=rv(t,i);if(c!==void 0)return k(this,et).build(this,n).setData(c,{...r,manual:!0})}setQueriesData(e,t,r){return ht.batch(()=>k(this,et).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=k(this,et).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=k(this,et);ht.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=k(this,et);return ht.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=ht.batch(()=>k(this,et).findAll(e).map(o=>o.cancel(r)));return Promise.all(n).then(Nt).catch(Nt)}invalidateQueries(e,t={}){return ht.batch(()=>(k(this,et).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=ht.batch(()=>k(this,et).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,r);return r.throwOnError||(i=i.catch(Nt)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(Nt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=k(this,et).build(this,t);return r.isStaleByTime(zr(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Nt).catch(Nt)}fetchInfiniteQuery(e){return e.behavior=su(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Nt).catch(Nt)}ensureInfiniteQueryData(e){return e.behavior=su(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Lo.isOnline()?k(this,Lr).resumePausedMutations():Promise.resolve()}getQueryCache(){return k(this,et)}getMutationCache(){return k(this,Lr)}getDefaultOptions(){return k(this,Dr)}setDefaultOptions(e){ue(this,Dr,e)}setQueryDefaults(e,t){k(this,Kn).set(Ss(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...k(this,Kn).values()],r={};return t.forEach(n=>{Cs(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){k(this,Qn).set(Ss(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...k(this,Qn).values()],r={};return t.forEach(n=>{Cs(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...k(this,Dr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=jc(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===Mo&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...k(this,Dr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){k(this,et).clear(),k(this,Lr).clear()}},et=new WeakMap,Lr=new WeakMap,Dr=new WeakMap,Kn=new WeakMap,Qn=new WeakMap,Fr=new WeakMap,Yn=new WeakMap,Xn=new WeakMap,zd),zf=Ht.createContext(void 0),Sv=e=>{const t=Ht.useContext(zf);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},qf=({client:e,children:t})=>(Ht.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),s.jsx(zf.Provider,{value:e,children:t})),Bf=Ht.createContext(!1),Cv=()=>Ht.useContext(Bf);Bf.Provider;function wv(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ev=Ht.createContext(wv()),Iv=()=>Ht.useContext(Ev),Pv=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?Of(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},Nv=e=>{Ht.useEffect(()=>{e.clearReset()},[e])},Rv=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(o&&e.data===void 0||Of(r,[e.error,n])),Tv=e=>{if(e.suspense){const r=o=>o==="static"?o:Math.max(o??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...o)=>r(n(...o)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Ov=(e,t)=>e.isLoading&&e.isFetching&&!t,Av=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,iu=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function kv(e,t,r){var _,g,v,x;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const n=Cv(),o=Iv(),i=Sv(),c=i.defaultQueryOptions(e);(g=(_=i.getDefaultOptions().queries)==null?void 0:_._experimental_beforeQuery)==null||g.call(_,c);const l=i.getQueryCache().get(c.queryHash);process.env.NODE_ENV!=="production"&&(c.queryFn||console.error(`[${c.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`)),c._optimisticResults=n?"isRestoring":"optimistic",Tv(c),Pv(c,o,l),Nv(o);const u=!i.getQueryCache().get(c.queryHash),[d]=Ht.useState(()=>new t(i,c)),h=d.getOptimisticResult(c),m=!n&&e.subscribed!==!1;if(Ht.useSyncExternalStore(Ht.useCallback(S=>{const w=m?d.subscribe(ht.batchCalls(S)):Nt;return d.updateResult(),w},[d,m]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),Ht.useEffect(()=>{d.setOptions(c)},[c,d]),Av(c,h))throw iu(c,d,o);if(Rv({result:h,errorResetBoundary:o,throwOnError:c.throwOnError,query:l,suspense:c.suspense}))throw h.error;if((x=(v=i.getDefaultOptions().queries)==null?void 0:v._experimental_afterQuery)==null||x.call(v,c,h),c.experimental_prefetchInRender&&!pn&&Ov(h,n)){const S=u?iu(c,d,o):l==null?void 0:l.promise;S==null||S.catch(Nt).finally(()=>{d.updateResult()})}return c.notifyOnChangeProps?h:d.trackResult(h)}function Mv(e,t){return kv(e,mv)}const ds={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"}},Lv={nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"0",count:0,total:0},Dv="Imagem do produto",au=1,Fv="Marque a caixa para aceitar os termos de política de privacidade.",zv="Algumas informações estão incorretas ou não foram preenchidas",qv="Enviar",Bv="ditoTrackedProfile",Uv=new Ff,Uf=j.createContext({}),Hv=({brand:e,constants:t,collectionId:r,children:n,itemsPerPage:o=24,pathname:i,searchParams:c,slug:l,...u})=>{const{PLP_SORT_DEFAULT:d}=t,h=j.useRef(""),[m,_]=j.useState(!1),g=(c==null?void 0:c.toString())??"",v=j.useMemo(()=>{const x=new URLSearchParams(g),S=x.get("query"),w=Number(x.get("page")??1),P=Number(x.get("count")??o),I=x.get("sort"),C=x.getAll("facets"),N=I??(r?"":d);return{base:S?"":i,count:P,facets:U.selectedFacets(C),page:w,sort:N,term:S??null}},[g,i,o,r,d]);return j.useEffect(()=>{h.current!==i&&(h.current=i,window.document.body.scrollTo(0,0))},[i]),s.jsx(Uf.Provider,{value:j.useMemo(()=>({...u,constants:t,openFilters:m,setOpenFilters:_}),[t,m,u]),children:s.jsx(qf,{client:Uv,children:s.jsx(bc,{brand:e,collectionId:r,state:v,searchParams:c??new URLSearchParams,children:n})})})},ut=()=>{const e=j.useContext(Uf);if(e===void 0)throw new Error("usePLPContext must be used within a PLPProvider");return e},Do=(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,i)=>Do(o,t[i]));if(Array.isArray(t))return!1;const r=Object.keys(e),n=Object.keys(t);return r.length!==n.length?!1:r.every(o=>Object.prototype.hasOwnProperty.call(t,o)&&Do(e[o],t[o]))},$v=(e,t,r="page")=>Object.keys(t).some(n=>n===r?!1:!Do(t[n],e[n])),Wv=async e=>{const t=await U.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},Hf=()=>({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}}}),$f=(e,t,r,n=24)=>{const o=new Set,i=[];if(!Array.isArray(e)||e.length===0)return{taken:o,placedBanners:i};const c=t*n*r;for(const l of e){let u=Number(l.position_grid),d=!1;for(;u<c;){const h=u%r;if(h+l.columns>r){u+=r-h;continue}if(!Array.from({length:l.columns}).some((g,v)=>o.has(u+v))){for(let g=0;g<l.columns;g++)o.add(u+g);i.push(u),d=!0;break}u++}d||console.info(`[PLP INFINITE FAILED BANNER POSITION]: pos=${l.position_grid}, cols=${l.columns}`)}return{taken:o,placedBanners:i}},$o=(e,t,r,n=24)=>{const{placedBanners:o,taken:i}=$f(e??[],t,r),c=[];let l=0;try{for(;c.length<t*n;)i.has(l)||c.push(l),l++;return{banners:o,products:c}}catch(u){console.info(`[PLP INFINITE FAILED TO GEN POSITIONS]: page=${t}`,u)}return{banners:[],products:c}},Fa=(e,t=!1)=>Array.from({length:e},(r,n)=>{const o=n+1;return{loading:t?!1:e===o,page:o}}),Vv=(e,t)=>[...e,{loading:!1,page:t}],Gv=(e=1,t=24)=>({nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"1",count:t,total:e}),Kv=(e,t,r,n,o)=>{const i=o,c=(e.length-1)*o+i-1,l=r[c];return t.filter((u,d)=>{const h=n[d];return h<=l||o>i&&h>l})},Wf=(e,t)=>{const r=new Map;for(const o of e){const i=Math.floor(o/t);r.has(i)||r.set(i,[]),r.get(i).push(o)}const n=[];for(const[,o]of r){const i=o[Math.floor(Math.random()*o.length)];n.push(i)}return n},Vf=(e,t)=>{if(!e)return[];const r=e.map((n,o)=>n.video&&n.video!==""?o:null).filter(n=>n);return Wf(r,t)},Gf=e=>Array.isArray(e)?e.map((t,r)=>({href:`/${e.slice(0,r+1).join("/")}`,name:t})):[],Qv=Object.freeze(Object.defineProperty({__proto__:null,createBreadcrumb:Gf,createPage:Vv,createPages:Fa,createPagination:Gv,createProduct:Hf,deepEqual:Do,fetchPage:Wv,getBanners:$f,getPositions:$o,getProductsWithVideo:Vf,getRandomVideoPerRow:Wf,getVisibleBanners:Kv,hasStateChangedExceptPage:$v},Symbol.toStringTag,{value:"Module"})),Yv=(e,t,r,n=0)=>{if(!e.length)return[];let o=0;const i=[];for(let c=0;c<e.length;c+=r){const l=e.slice(c,c+r),u=l.findIndex(d=>{var h;return(h=d.node)==null?void 0:h.video});for(let d=0;d<l.length;d++){const h=c+d,m=n+h,_=t.find(v=>v.position_grid===m+1),g=m+o+1;_&&(o+=_.columns),i.push({position:g,canPlayVideo:d===u})}}return i},Kf=(e,t,r)=>{const n=(t-1)*r,o=t*r;return e>=n&&e<=o},Ds=e=>{var t;return(t=e==null?void 0:e.map(r=>({disable:U.disableSKU(r),size:U.getSKUName(r),skuID:"sku"in r&&r.sku})))==null?void 0:t.filter(r=>r.disable)},Xv=Object.freeze(Object.defineProperty({__proto__:null,createGridPosAndVideo:Yv,getSkusNotify:Ds,isPositionInCurrentPage:Kf},Symbol.toStringTag,{value:"Module"})),Qf=({isMobile:e,ICONS:t,NOTIFY_INFO:r})=>s.jsxs(s.Fragment,{children:[s.jsx(p.Modal.Controls,{navigation:e?"top":"middle",isMobile:e??!1,children:!e&&s.jsxs(s.Fragment,{children:[s.jsx(p.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),s.jsx(p.Button,{"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})}),s.jsx(p.Modal.Title,{navigation:e?"top":"middle",title:r.title})]});Qf.displayName="Notify.Controls";const er={"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 Yf(e){const r=decodeURIComponent(window.document.cookie).split(";");for(const n of r){const[o,i]=n.trim().split("=");if(o===e)return i}}function wc(e,t,r={}){const o={...{path:"/",expires:new Date(Date.now()+36e5)},...r};let i=`${encodeURIComponent(e)}=${encodeURIComponent(t??"")}`;for(const c in o)o[c]!==void 0&&(i+=`; ${c}`,c==="expires"?i+=`=${o[c].toUTCString()}`:typeof o[c]=="boolean"?i+=`; ${o[c]?"true":"false"}`:i+=`=${o[c]}`);window.document.cookie=i}const Xf=j.createContext({amount:null,boxes:null,toExpire:null,loading:!0,logout:()=>null,getCurrentCredits:()=>({credits:0,cashback:0})}),Jv=({children:e,AUTH_TOKEN_COOKIE:t})=>{var h;const{shipping:r,cartStore:n}=Xe(),[o,i]=j.useState({amount:null,boxes:null,toExpire:null,loading:!0}),c=j.useCallback(async()=>{try{await fetch("/api/user",{priority:"low"}).then(m=>m.json()).then(m=>{const{userCredits:_,userId:g,sub:v,...x}=m,{wishlist:S,...w}=x;i({amount:_==null?void 0:_.amount,boxes:_==null?void 0:_.boxes,toExpire:_==null?void 0:_.toExpire,user:{...w,userId:g,sub:v??""},loading:!1,wishlist:(typeof S=="string"?S.split(",").filter(Boolean):S)??[]})})}catch(m){console.error("user info and my credits request",m),i({...o,loading:!1})}},[i]),l=j.useCallback(()=>{wc(t),c()},[c]),u=j.useCallback(()=>o.boxes?o.boxes.reduce((m,_)=>_.gift_card_box.refid==="C1643"?(m.cashback+=_.amount,m):(m.credits+=_.amount,m),{cashback:0,credits:0}):{cashback:0,credits:0},[o]),d=j.useCallback(async()=>{var m,_,g;if((m=o.user)!=null&&m.postalCode&&(n!=null&&n.id)&&!(n!=null&&n.loading)&&!((g=(_=n==null?void 0:n.shippingData)==null?void 0:_.address)!=null&&g.postalCode))try{await r(o.user.postalCode)}catch(v){console.error("Error auto-filling CEP:",v)}},[(h=o.user)==null?void 0:h.postalCode]);return j.useEffect(()=>{c()},[c]),j.useEffect(()=>{d()},[d]),s.jsx(Xf.Provider,{value:j.useMemo(()=>({...o,getCurrentCredits:u,logout:l}),[o,u,l]),children:e})},rs=()=>{const e=j.useContext(Xf);if(e===void 0)throw new Error("useContext(SessionContext) must be used within a SessionProvider");return e},Jf=({color:e,delay:t=3e3,sku:r,setStatus:n,setIsLoading:o,NEWSLETTER_CONFIGS:i,NOTIFY_INFO:c})=>{const l=j.useRef(null),[u,d]=j.useState(null),{sendDataLayerEvent:h}=Ee(),{user:m}=rs(),_=m!=null&&m.firstName?`${m==null?void 0:m.firstName} ${m==null?void 0:m.lastName}`:"";return s.jsx("div",{className:er["notify--form"],children:s.jsxs("form",{action:"POST",onSubmit:async g=>{var S;g.preventDefault();const v=g.currentTarget,x=((S=v.querySelector("input"))==null?void 0:S.value)??"";fetch("/api/aviseme",{method:"POST",body:JSON.stringify({userName:_,email:x,sku:r==null?void 0:r.skuID})}).then(w=>n(w.ok)).finally(()=>{o(!1),v.reset(),h({functionKey:"readyEvents",data:{event:"notify_me",readyData:{size:r==null?void 0:r.size,item_id:r==null?void 0:r.skuID,color:e}}}),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{var w;(w=document.body)==null||w.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0})),d(!0),n(null)},t)})},children:[s.jsx(p.TextField.Structure,{input:s.jsx(p.TextField.Input,{feedback:typeof u=="boolean"&&u?"error":"none",type:"email",label:c.email_placeholder,mode:"over-label",variant:"outlined",sizeVariant:"large",onChange:g=>d(!g.target.validity.valid),required:!0}),supportText:typeof u=="boolean"&&u?s.jsx(p.TextField.SupportText,{text:i.messages.invalid_email,feedback:"error"}):s.jsx(s.Fragment,{})}),s.jsx(p.Button,{disabled:!(u===!1||!r)||!r,type:"submit",size:"large",children:c.button})]})})};Jf.displayName="Notify.Form";const Zf=({isLoading:e=!1})=>s.jsx("div",{className:er["notify--loading"],"data-loading":e,children:s.jsx(p.Spinner,{})});Zf.displayName="Notify.Loading";const Ec={"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"},ep=({children:e,...t})=>s.jsx("div",{...t,className:Ec["product-variation-list--list"],children:e});ep.displayName="ProductVariationList.List";const tp=({fill:e="#1352C7",src:t="",type:r="size",text:n,...o})=>{const{nextimage:i}=Ae();return r==="size"?s.jsxs(p.ToggleSize.Wrapper,{...o,size:"large",variation:"ghost",children:[s.jsx(p.ToggleSize.DisabledAdornment,{title:"disabled-adornment-size"}),s.jsx(p.ToggleSize.Text,{children:n})]}):s.jsxs(p.ToggleStyle.Wrapper,{...o,size:"small",title:"wrapper-texture",children:[s.jsx(p.ToggleStyle.DisabledAdornment,{title:"disabled-adornment-texture"}),r==="color"?s.jsx(p.ToggleStyle.Color,{background:e,title:"color"}):s.jsx(p.ToggleStyle.Texture,{title:"texture",children:s.jsx(i,{alt:n??"image",height:40,src:t,width:40})})]})};tp.displayName="ProductVariationList.Option";const rp=({children:e,...t})=>s.jsx("div",{className:Ec["product-variation-list"],...t,children:e});rp.displayName="ProductVariationList.Root";const np=({children:e,title:t,...r})=>s.jsxs("div",{...r,className:Ec["product-variation-list--title"],children:[t?s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.SectionWrapper,{children:s.jsx("p",{children:t})})}):s.jsx(s.Fragment,{}),e]});np.displayName="ProductVariationList.Title";const rr={List:ep,Option:tp,Title:np,Root:rp},Zv=(e,t)=>{if(!e||!t)return!1;const r=Object.keys(e);return r.length!==Object.keys(t).length?!1:r.every(n=>e[n]===t[n])},sp=({children:e,label:t="",skus:r,sku:n,setSku:o})=>s.jsxs(s.Fragment,{children:[s.jsx("div",{className:er["notify--selector--header"],children:e}),s.jsxs(rr.Root,{className:er["notify--selector"],children:[s.jsx(rr.Title,{title:t}),s.jsx(rr.List,{children:Array.isArray(r)&&r.map((i,c)=>{const l=Zv(n,i);return s.jsx(rr.Option,{active:l,onClick:()=>o(l?null:i),text:String(i.size),type:"size"},c)})})]})]});sp.displayName="Notify.Selector";const cu=({type:e,icon:t,title:r,subtitle:n})=>s.jsx("div",{className:er[`notify--status--${e}`],children:s.jsx(p.TextStructure.Root,{adornment:{start:s.jsx(p.Icon,{name:t,size:"large"})},children:s.jsxs(p.TextStructure.DivWrapper,{children:[s.jsx("h2",{children:r}),s.jsx("h3",{children:n})]})})}),op=({status:e,ICONS:t,PRODUCT_CARD_TEXTS:r})=>s.jsxs("div",{className:er["notify--status"],"data-status":e,children:[s.jsx(cu,{...r.success,icon:t.check_circle,type:"success"}),s.jsx(cu,{...r.error,icon:t.alert_circle,type:"error"})]});op.displayName="Notify.Status";const Ic=({color:e,open:t,setVisible:r,skus:n,sku:o,setSku:i,ICONS:c,NEWSLETTER_CONFIGS:l,NOTIFY_INFO:u,PRODUCT_CARD_TEXTS:d,Z_INDEX_WAR:h})=>{const[m,_]=j.useState(!1),[g,v]=j.useState(null),{isMobile:x}=xe();return s.jsxs(p.Modal.Root,{isMobile:x??!1,isOpen:t,setIsOpen:r,variant:x?"sideBottom":"sideLeft",style:{zIndex:h.modal},className:er["modal-modifier"],children:[s.jsx(p.Modal.Header,{navigation:"top",className:er["notify--header-modifier"],children:s.jsx(Qf,{isMobile:x??!1,ICONS:c,NOTIFY_INFO:u})}),s.jsxs(p.Modal.Body,{className:er["notify--modal--body"],children:[s.jsxs("div",{className:er["notify--container"],children:[s.jsxs(sp,{label:u.selector_label,sku:o,skus:n,setSku:i,children:[s.jsx("p",{children:u.subtitle}),s.jsx("span",{children:u.description})]}),s.jsx(Jf,{delay:4e3,sku:o,setStatus:v,setIsLoading:_,color:e,NEWSLETTER_CONFIGS:l,NOTIFY_INFO:u}),s.jsx(Zf,{isLoading:m}),s.jsx("div",{className:er["notify--selector--header"],children:s.jsx("span",{children:u.legal})})]}),s.jsx(op,{status:g,ICONS:c,PRODUCT_CARD_TEXTS:d})]})]})};Ic.displayName="Notify";const Fs=({skus:e,ICONS:t,NEWSLETTER_CONFIGS:r,NOTIFY_INFO:n,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:i,...c})=>{const l=Ds(e??[]);return s.jsx(Ic,{...c,skus:l,ICONS:t,NEWSLETTER_CONFIGS:r,NOTIFY_INFO:n,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:i})};Fs.displayName="PDC.Notification";const Ur=yn.create(e=>({banners:[],load:!1,pages:[],products:[],createPagesScroll:(t,r)=>{e(n=>({...n,...r,pages:Fa(t)}))},trimPages:t=>{e(r=>r.pages.length?{...r,pages:r.pages.filter(n=>n.page<=t).map(n=>({...n,loading:!1}))}:r)},addPage:(t,r)=>{e(n=>n.pages.some(o=>o.page===t)?n:{...n,...r,pages:[...n.pages,{page:t,loading:!1}]})},reset:()=>e(()=>({pages:Fa(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)}})),ip=j.createContext({}),ap=({banners:e,children:t})=>{const{router:r}=Ae(),{isMobile:n}=xe(),{searchParams:o}=ft(),{addPage:i}=Ur(),{constants:c}=ut(),[l,u]=j.useState(!1),[d,h]=j.useState(null),[m,_]=j.useState([]),g=n?8:16,v=n?2:4,{ITEMS_PER_PAGE:x,ICONS:S,NEWSLETTER_CONFIGS:w,NOTIFY_INFO:P,PRODUCT_CARD_TEXTS:I,Z_INDEX_WAR:C}=c,N=j.useCallback((M,z,D=!1)=>{const B=M.page+1;if(D===!0&&B<=z){const G=$o(e,B,v,x);i(B,G)}},[i,e,v,x]),T=j.useCallback(M=>{const z=new URLSearchParams(o.toString()),D=Number(z.get("page")??1);M!==D&&(z.set("page",String(M)),r.replace(`?${z.toString()}`,{scroll:!1}))},[r,o]),O=j.useCallback((M,z)=>{const D=z?Ds([z]):null;_(M),h(D!=null&&D.length?D[0]:null),u(!0)},[]);return s.jsxs(ip.Provider,{value:j.useMemo(()=>({addNewPage:N,gap:g,columns:v,handleNotify:O,updateParamPage:T}),[N,O,g,v,T]),children:[t,s.jsx(Fs,{open:l,sku:d,skus:m,setSku:h,setVisible:u,ICONS:S,NEWSLETTER_CONFIGS:w,NOTIFY_INFO:P,PRODUCT_CARD_TEXTS:I,Z_INDEX_WAR:C})]})},Hr=()=>{const e=j.useContext(ip);if(e===void 0)throw new Error("PLPInfiniteScrollContext must be used within a ScrollInfiniteProvider");return e},cp=j.createContext({gridBanners:void 0,banners:[]}),ex=({children:e,data:t,device:r,SectionZone:n,COMMON_PAGE_COLUMN_GAP_PDC:o})=>{const{isMobile:i}=xe(),c=(t==null?void 0:t.sections.filter(m=>m.name!=="List Product Banners"))??[],l=c.slice(0,au),u=c.slice(au,c.length),d=t==null?void 0:t.sections.find(m=>m.name==="List Product Banners"),h=j.useMemo(()=>{var m,_;return((_=(m=d==null?void 0:d.data)==null?void 0:m.banners)==null?void 0:_.map(g=>({...g.banner,columns:g.bannerWidth,position_grid:g.bannerPosition})))??[]},[d]);return i&&r==="mobile"||!i&&r==="desktop"?s.jsxs(cp.Provider,{value:{gridBanners:d,banners:h},children:[s.jsx(n,{data:l??[]}),s.jsxs(p.Utils.Column,{gap:o,className:p.helpers.classNameConcat("utils-column-modifier"),children:[e,s.jsx(n,{data:u??[]})]})]}):s.jsx(s.Fragment,{})},zs=()=>{const e=j.useContext(cp);return e===void 0&&console.error("Needs PLPContentContext on parent component"),e},lp=j.createContext({}),up=({children:e,filters:t,...r})=>{var i;const{constants:{PLP_FILTERS:n}}=ut(),o=(i=t.facets)==null?void 0:i.filter(c=>n.find(l=>l.key===c.key));return s.jsx(lp.Provider,{value:j.useMemo(()=>({...r,filters:{...t,facets:o}}),[t,o,r]),children:e})},$r=()=>{const e=j.useContext(lp);if(e===void 0)throw new Error("useFilterContext must be used within a FilterProvider");return e},dp=j.createContext({product:void 0}),tx=({children:e,data:t,productId:r,COMMON_PAGE_COLUMN_GAP:n,SectionZone:o})=>s.jsxs(dp.Provider,{value:{productId:r},children:[e,s.jsx(p.Utils.Column,{gap:n,className:p.helpers.classNameConcat("utils-column-modifier"),children:s.jsx(o,{data:(t==null?void 0:t.sections)??[]})})]}),fp=()=>{const e=j.useContext(dp);return e||console.error("use this hook only inside PDPContentProvider hierarchy"),e},za=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase().trim();function rx(e,t=1e3){let r=!1;return(...n)=>{r||(e(...n),r=!0,setTimeout(()=>{r=!1},t))}}function nx(e,t=1e3){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>{e(...n)},t)}}const pp=(e,t)=>t.getTime()>e.getTime()?Math.abs(t.getTime()-e.getTime()):0,_s=(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),sx=["name","email","phone","date","cpf","cep"],lu={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}$/},hp=({type:e,input:t,required:r=!1})=>{if(typeof t!="string"||!r&&t===""||!lu[e])return!0;const n=t.trim();return lu[e].test(n)},ox=e=>{const t=/\/(\d+)-\d+-\d+\/(.+?)\./,r=typeof e=="string"?e.match(t):null;return r?r[2].replace(/-/g," "):Dv},ix=Object.freeze(Object.defineProperty({__proto__:null,FieldTypes:sx,debounce:nx,getAltTextFromUrl:ox,getAuthenticatedUser:U.getAuthenticatedUser,getCookie:Yf,getDaysHoursMinutesSeconds:_s,getMilliSeconds:pp,removeAccentsAndReplaceSpaces:za,setCookie:wc,throttle:rx,validateInput:hp},Symbol.toStringTag,{value:"Module"})),ax=({fields:e})=>{const t={};return{mountedFields:(e==null?void 0:e.reduce((n,o)=>(t[o.master_data_field]="none",{...n,[o.master_data_field]:o}),{}))??{},mountedInputsStatus:t}},cx=({formData:e,mountedFields:t,inputsStatus:r,hasTermsAndConditions:n,checkboxRef:o,setFormStatus:i})=>{let c=!1,l=!1;const u={...r};return n&&!o.current&&(i("unchecked"),c=!0),e.forEach((d,h)=>{var g;if(h==="terms-and-conditions")return;const m=(g=t[h])==null?void 0:g.required;if(m&&!d){u[h]="required",c=!0;return}hp({type:t[h].type,input:d,required:m})||(u[h]="error",l=!0),typeof d=="string"&&e.set(h,d.toString().trim())}),{hasEmptyFields:c,hasErrors:l,inputStatusToUpdate:u}};async function mp(e){const t=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-1",t);return Array.from(new Uint8Array(r)).map(i=>i.toString(16).padStart(2,"0")).join("")}const _p=async e=>await fetch("/api/dito-ingest",{method:"POST",body:JSON.stringify(e)}).then(r=>r.json()),gp=j.createContext({}),yp=({children:e,masterDataEmailField:t,fields:r,variant:n,dito:o,CONSTANTS:{MASTER_DATA_ENTITY:i,NEWSLETTER_CONFIGS:c}})=>{const{sendDataLayerEvent:l}=Ee(),u=c.hasTermsAndConditions,{mountedFields:d,mountedInputsStatus:h}=j.useMemo(()=>ax({fields:r}),[r]),m=j.useRef(!1),[_,g]=j.useState("idle"),[v,x]=j.useState(h),S=async({searchFields:O,entity:M})=>{const z=await Ln.post("/api/master-data/search",{body:{masterDataEntity:M,searchFields:O,headers:{"REST-Range":"resources=0-49"}}});return console.info(z),z.data},w=async({documentId:O,fieldsToBeUpdated:M,entity:z})=>(await Ln.post("/api/master-data/update",{dataEntityName:z,documentId:O,fieldsToBeUpdated:M})).status,P=j.useCallback(async({payload:O,response:M},z,D)=>{var X;const{email:B,...G}=O,[J]=await S({searchFields:{[z]:B},entity:D??i.newsletter}),Y=Array.isArray(J)?(X=J[0])==null?void 0:X.id:void 0;return J&&await w({documentId:Y,fieldsToBeUpdated:G,entity:D??i.newsletter})!==204?{...M,status:"error"}:{...M,status:"success"}},[]),I=j.useCallback(async({formData:O},M,z)=>{const D={status:"idle",inputsStatus:{}},B={};O.forEach((X,Z)=>{B[Z]=X});const G=await mp(B.email||""),J=new Date().toISOString(),Y=[{action:o==null?void 0:o.actionName,timestamp:J,type:"TRACK",user_id:G,context:{user_agent:navigator.userAgent},properties:{custom_data:{email:B.email||z,nome:B.name,origem:o==null?void 0:o.originName}}}];G&&(Y.push({user_id:G,timestamp:J,type:"IDENTIFY",traits:{id:G,created_at:J,name:B.name,email:B.email||z,phone:B==null?void 0:B.phone}}),Ao.set(Bv,G));try{const X=await Ln.post("/api/master-data",{body:{payload:B,masterDataEntity:M??i.newsletter}});_p(Y);const Z=X.data;return(Z==null?void 0:Z.Message)==="duplicated entry"?P({payload:B,response:D},z,M):Z!=null&&Z.Id?{...D,status:"success"}:{...D,status:"error"}}catch(X){return console.error("error",X),{...D,status:"error"}}},[P]),C=j.useCallback(async(O,M,z)=>{O.preventDefault();const D=new FormData(O.target);if(D.append("acceptedTerms",m.current?"true":"false"),m.current){const G=new ba.TZDate(new Date,"America/Sao_Paulo").toISOString();D.append("termsAcceptedAt",G)}M&&Object.keys(M).forEach(G=>{D.append(G,M[G])});const B=await I({formData:D},z??"",t);B&&(g(B==null?void 0:B.status),x(B.inputsStatus),B.status==="success"&&l({functionKey:"readyEvents",data:{event:"generate_lead"}}))},[t,I,g,x,l]),N=j.useCallback(O=>{const M=new FormData(O.currentTarget.parentElement),{hasEmptyFields:z,hasErrors:D,inputStatusToUpdate:B}=cx({formData:M,mountedFields:d,inputsStatus:v,hasTermsAndConditions:u,checkboxRef:m,setFormStatus:g});if(x(B),z||D){O.preventDefault();return}g("loading")},[d,v,u,m]),T=j.useCallback(()=>{g("idle"),x(h)},[h]);return s.jsx(gp.Provider,{value:j.useMemo(()=>({formStatus:_,handleSubmit:C,setFormStatus:g,inputsStatus:v,setInputsStatus:x,hasTermsAndConditions:u,handleClickToSubmit:N,checkboxRef:m,masterDataEmailField:t,fields:r,variant:n,resetNewsletter:T}),[_,C,g,v,x,N,u,m,t,r,n,T]),children:e})},Pc=()=>{const e=j.useContext(gp);if(e===void 0)throw new Error("useNewsletterContext must be used within a NewsletterProvider");return e},vp=j.createContext({}),xp=({children:e,data:t})=>{const[r,n]=j.useState(),[o,i]=j.useState(),c=j.useCallback(d=>{const h=t.filter(m=>m.cidade===d);n(h)},[t]),l=j.useCallback(d=>{i(d)},[]),u=j.useCallback(()=>{i("")},[]);return s.jsx(vp.Provider,{value:j.useMemo(()=>({clearSelectedStore:u,data:t,handleSelectCity:c,handleSelectStore:l,selectedCity:r,selectedStore:o}),[u,t,c,l,r,o]),children:e})},Wo=()=>{const e=j.useContext(vp);if(e===void 0)throw new Error("useLPStoreContext must be used within a LPStoreProvider");return e},Fo={contexts:{addToCart:{hook:bn,provider:If},cart:{hook:Xe,provider:Jy},cms:{FlagsAndTags:{context:dc,hook:jr,provider:by}},newsletter:{hook:Pc,provider:yp},events:{hook:Ee,provider:Ny},global:{hook:xe,provider:Fy,mediator:rf},header:{hook:Ze,provider:Qy},menuMobile:{hook:xc,provider:wf},next:{hook:Ae,provider:zy},pdp:{provider:jy},PDPContent:{provider:tx,hook:fp},plp:{provider:Hv,hook:ut},plpFilter:{hook:$r,provider:up},PLPContent:{provider:ex,hook:zs},plpInfinite:{provider:ap,hook:Hr},pdpdata:{provider:Ry},searchSearch:{hook:ft,provider:bc},session:{hook:rs,provider:Jv},ui:{hook:Os,provider:tf},lpStore:{hook:Wo,provider:xp}},hooks:{useBackPDC:Bd,useClipboard:Ty,useDisableZoom:Xd,useLocalStorage:Ay,useOnScreen:fc,useSentinel:Uo,useTouchZoomPan:Jd},stores:{cart:Ly,header:By,pdp:Gy,wishlist:Ky}},lx={cart:U.cart,events:Py,plp:Qv,product:U.productHelpers,utils:ix,search:U.search},Nc={helpers:lx},zt={"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"},bp=({brand:e,className:t,name:r,...n})=>s.jsxs("div",{...n,className:p.helpers.classNameConcat(zt["add-to-cart--card--name"],t),children:[s.jsx(p.Tag,{style:{textTransform:"uppercase"},size:"small",variant:"quaternary",title:e,children:e}),s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:s.jsx("p",{className:"typography-style-body-md",children:r})})})]});bp.displayName="AddToCart.Card.Name";const jp=({className:e,listPrice:t,price:r,quantity:n,productId:o,...i})=>{const c=U.formatPriceToCurrency(r/100),l=U.formatPriceToCurrency(t/100);return s.jsx("div",{...i,className:p.helpers.classNameConcat(zt["add-to-cart--card--price-quantity"],e),children:s.jsx(p.ProductInfo.Root,{size:"small",layout:"vertical",children:s.jsx(p.ProductInfo.Wrapper,{size:"small",layout:"vertical",children:s.jsx(p.ProductInfo.ValuesWrapper,{children:r!==t?s.jsxs(s.Fragment,{children:[s.jsx(p.ProductInfo.Price,{label:"originalPrice",value:c,size:"small"},"price-list"),s.jsx(p.ProductInfo.Price,{label:"discountPrice",value:l,size:"small"},"price-low")]}):s.jsx(p.ProductInfo.Price,{label:"defaultPrice",value:l,size:"small"},"price-low")})})})})};jp.displayName="AddToCart.Card.PriceQuantity";const ux="_skeleton_12b79_1",dx={skeleton:ux},Sp=({style:e})=>s.jsx("div",{style:e,className:dx.skeleton}),fx="_image_1y08u_1",px={image:fx},hx=({alt:e,className:t,objectFit:r,...n})=>{const{nextimage:o}=Ae();return s.jsx(o,{quality:90,...n,alt:e??"",className:p.helpers.classNameConcat(px.image,t),"data-object-fit":r??"cover"})},mx=({videoRef:e,...t})=>s.jsx("video",{...t,ref:e,children:s.jsx("track",{kind:"captions"})}),at={Image:hx,Video:mx},Cp=({className:e,productGroupID:t,size:r,texture:n,...o})=>{const{CONSTANTS:{TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c}}=bn(),[l,u]=j.useState(n??"");return j.useEffect(()=>{l||U.fetchProxy("/_v/proxy/catalog/product/info",{method:"POST",body:JSON.stringify({ids:[t]})}).then(d=>d.json()).then(d=>{const h=d.data[0].items[0];if(h){const m=h.images.find(_=>i.includes(_.imageLabel));m!=null&&m.imageUrl?u(m.imageUrl):u(h.images[0].imageUrl)}}).catch(d=>{console.error(d)})},[l,t]),s.jsxs("div",{...o,className:p.helpers.classNameConcat(zt["add-to-cart--card--style-size"],e),children:[s.jsx(p.ToggleStyle.Wrapper,{size:"x-small",style:c,children:s.jsx(p.ToggleStyle.Texture,{children:l?s.jsx(at.Image,{alt:"",src:l??"",width:164,height:164,style:c}):s.jsx(Sp,{})})}),s.jsx(p.Utils.Divider,{direction:"vertical",size:"medium",style:{height:24}}),r&&s.jsxs(p.ToggleSize.Wrapper,{size:"small",title:"wrapper-texture",children:[s.jsx(p.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),s.jsx(p.ToggleSize.Text,{children:r})]})]})};Cp.displayName="AddToCart.Card.StyleSize";const{helpers:_x}=Nc,wp=({className:e,item:t,texture:r,...n})=>{const{itemOffered:{name:o,brand:i,skuName:c,isVariationOf:{productGroupID:l}},quantity:u,price:d,sellingPrice:h}=t,{CONSTANTS:{NAME_SPLIT_SYMBOL:m}}=bn(),{size:_}=_x.product.getColorAndSizeFromSkuName(c??o,m);return s.jsxs("div",{...n,className:p.helpers.classNameConcat(zt["add-to-cart--card--content"],e),children:[s.jsx(bp,{brand:i.name,name:o}),s.jsx(jp,{price:d,listPrice:h,quantity:u,productId:t.id}),s.jsx(Cp,{size:_,texture:r,productGroupID:l})]})};wp.displayName="AddToCart.Card.Content";const Ep=({image:e,thumbnail:t=!1})=>s.jsx(at.Image,{alt:e.alternateName??"image","data-thumbnail":t,height:t?152:120,src:e.url,width:t?152:94});Ep.displayName="AddToCart.Card";const Ip=({className:e,item:t,texture:r,thumbnail:n,...o})=>{const{itemOffered:{image:[i]}}=t,c=U.updatedResizedImg(i.url,{width:200,height:300});return s.jsxs("div",{...o,className:p.helpers.classNameConcat(zt["add-to-cart--card"],e),children:[s.jsx(Ep,{image:{alternateName:i.alternateName||"Produto",url:c||""},thumbnail:n}),!n&&s.jsx(wp,{item:t,texture:r})]})};Ip.displayName="AddToCart.Card";const Pp=({className:e,children:t,title:r,...n})=>s.jsxs("div",{...n,className:p.helpers.classNameConcat(zt["add-to-cart--content"],e),children:[s.jsx("div",{className:zt["add-to-cart--content--title"],children:r&&s.jsx("h2",{children:r})}),t,s.jsx(un.Footer,{})]});Pp.displayName="AddToCart.Layout.Content";const Np=({className:e,...t})=>{var g,v;const{isMobile:r,handleClose:n,CONSTANTS:{ADD_TO_CART:o}}=bn(),{cartStore:{totalizers:i},setIsOpen:c}=Xe(),l=(g=i.find(x=>x.id==="Discounts"))==null?void 0:g.value,u=((v=i.find(x=>x.id==="Items"))==null?void 0:v.value)??0,d=i.find(x=>x.id==="Shipping"),m=(u-Math.abs(l??0)+((d==null?void 0:d.value)??0))/100,_=U.formatPriceToCurrency(m??0);return s.jsxs("div",{...t,className:p.helpers.classNameConcat(zt["add-to-cart--footer"],e),children:[s.jsxs("div",{className:zt["add-to-cart--footer--total"],children:[s.jsx("span",{children:"Subtotal:"}),s.jsx("span",{children:_})]}),s.jsx(p.Button,{size:"medium",variant:"primary","data-close":!0,onClick:()=>c(!0),children:o.footer.bag}),r?s.jsx(p.Button,{"data-close":!0,size:"medium",variant:"tertiary",children:o.footer.keep_buying}):s.jsx(p.Button,{onClick:()=>n(),size:"medium",variant:"tertiary",children:o.footer.keep_buying})]})};Np.displayName="AddToCart.Layout.Footer";const Rp=({children:e,className:t,thumbnail:r=!1,...n})=>{const{cartStore:{options:o}}=Xe(),{recentlyAddedProducts:i}=Os(),c=i.length>3?4:i.length;return s.jsxs("div",{...n,className:zt["add-to-cart--items"],"data-thumbnail":r,children:[Array.isArray(i)&&i.filter((l,u)=>u<c).map(l=>{var d;const u=(d=o==null?void 0:o.find(h=>h.id===l.itemOffered.isVariationOf.productGroupID))==null?void 0:d.texture;return s.jsx(un.Card,{item:l,thumbnail:r,texture:u},l.itemOffered.sku)}),e]})};Rp.displayName="AddToCart.Layout.Items";const Tp=({children:e,Z_INDEX_WAR:t})=>{const{isOpen:r,setIsOpen:n}=bn(),{isMobile:o}=xe();return s.jsxs(p.Modal.Root,{"data-modal":"add-to-cart--modal",className:zt["add-to-cart__modal"],isMobile:o??!1,isOpen:r,setIsOpen:n,variant:"sideBottom",style:{zIndex:t.modal},children:[s.jsx(p.Modal.Header,{navigation:"top",children:s.jsx(p.Modal.Controls,{navigation:"top",isMobile:!0})}),s.jsx(p.Modal.Body,{children:e})]})};Tp.displayName="AddToCart.Modal";const gx=({children:e})=>{const{count:t,handleClose:r,setIsOpen:n}=bn(),o=j.useRef(t);return j.useEffect(()=>{t>o.current&&n(!0),t<o.current&&o.current>=1&&r(),o.current=t},[t,r,n]),s.jsx(s.Fragment,{children:e})},Op=({children:e,component:t,CONSTANTS:r,...n})=>{const{recentlyAddedProducts:o}=Os(),{isMobile:i}=xe(),c=o.length>3?4:o.length;return s.jsx(If,{...n,count:c,isMobile:i,CONSTANTS:r,children:s.jsx(gx,{children:i?s.jsxs(s.Fragment,{children:[s.jsx(un.Modal,{Z_INDEX_WAR:r.Z_INDEX_WAR,children:t}),e]}):s.jsx(un.Tooltip,{component:t,style:{width:350},Z_INDEX_WAR:r.Z_INDEX_WAR,children:e})})})};Op.displayName="AddToCart.Root";const Ap=({children:e,component:t,Z_INDEX_WAR:r,...n})=>{const{contentRef:o,left:i,isLeaving:c,target:l,isOpen:u,top:d}=bn();return s.jsx(p.Tooltip.Root,{arrow:"top-right",component:s.jsx("div",{...n,ref:o,children:t}),id:"add-to-cart--tooltip",className:zt["add-to-cart--tooltip"],style:{zIndex:r.modal},isLeaving:c,isOpen:u,left:i,size:"medium",position:"top",top:d,children:s.jsx("div",{className:zt["add-to-cart--tooltip"],ref:l,children:e})})};Ap.displayName="AddToCart.Tooltip";const un={Card:Ip,Content:Pp,Footer:Np,Items:Rp,Modal:Tp,Root:Op,Tooltip:Ap},Rc=({title:e,...t})=>{const{recentlyAddedProducts:r}=Os(),{isMobile:n}=xe(),o=r.length>3?4:r.length,i=r.length>(o??1),c=r.length>1;return s.jsx(un.Root,{isMobile:n,count:r.length,component:s.jsx(un.Content,{title:e,children:s.jsx(un.Items,{thumbnail:c,children:i&&s.jsx(p.Badge.Count,{count:r.length-o,size:"medium",variant:"secondary"})})}),...t})};Rc.displayName="AddToCart";const uu={"backtotop-btn":"_backtotop-btn_vcjsm_1","card-modifier":"_card-modifier_vcjsm_29"},yx=({children:e,className:t,classNameButton:r,adornment:n,iconPosition:o,scrollToOptions:i,style:c,...l})=>{const u={top:(i==null?void 0:i.top)??0,left:(i==null?void 0:i.left)??0,behavior:(i==null?void 0:i.behavior)??"smooth"},h=o&&n?{flexDirection:{top:"column",bottom:"column-reverse",left:"row",right:"row-reverse"}[o]}:{},m=()=>{window&&window.document.body.scrollTo({...u})};return s.jsx(p.Card,{...l,shadow:!0,padding:"small",className:p.helpers.classNameConcat(uu["card-modifier"],t),style:{...c,padding:0},children:s.jsxs("button",{className:p.helpers.classNameConcat(uu["backtotop-btn"],r),onClick:m,style:{...h},"data-orientation":o,children:[n,e]})})},vx="_container_1sy8s_16",Tr={"carousel-container":"_carousel-container_1sy8s_1","add-cart-container":"_add-cart-container_1sy8s_8",container:vx,"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"},xx=({selectedProducts:e,handleAddAllToCart:t,CONSTANTS:r})=>{const n=Object.values(e.products).length;return s.jsxs("div",{className:Tr["add-itens-to-cart-container"],children:[s.jsxs("div",{className:Tr["add-itens-to-cart-container-values"],children:[s.jsx("div",{className:Tr["add-itens-to-cart-qty-products"],children:s.jsx("span",{children:n===0?r.BUY_PACKAGE.group_cart.select_all_product:`${n} ${n===1?r.BUY_PACKAGE.group_cart.select_product:r.BUY_PACKAGE.group_cart.select_product+"s"}`})}),s.jsx("div",{className:Tr["add-itens-to-cart-total"],children:s.jsx("span",{children:U.freightParsePrice({valueInCents:e.totalPrice*100,hasFree:!1,freeTaxMessage:r.FREIGHT_CALCULATION.messages.free_tax})})})]}),s.jsx(p.Button,{onClick:t,className:Tr["add-button"],size:"large",disabled:n===0,variant:"primary",children:r.BUY_BUTTON_LABELS.add_to_cart})]})},bx=e=>e.reduce((t,r)=>{var o;const n=t.find(i=>i.node.id===r.node.id);if(!n)return[...t,r];if((o=n==null?void 0:n.node.isVariantOf)!=null&&o.hasVariant){const i=n.node.isVariantOf.hasVariant,c=r.node.isVariantOf.hasVariant;i&&c&&(n.node.isVariantOf.hasVariant=[...i,...c])}return t},[]),jx=({selectedProduct:e,productId:t,prevState:r,mainSellerId:n})=>{const{products:o,totalPrice:i}=r;try{if(!e){const{[t]:d,...h}=o;return{...r,totalPrice:i-d.price,products:h}}const c=U.getValidOffer(e.offers.offers,n);if(!c)return r;const l=c.seller.identifier,u=c.price;if(o[t]){const{price:d}=o[t];return o[t]={...o[t],price:u,id:e.sku,seller:l},{totalPrice:i+u-d,products:{...o}}}return{totalPrice:i+u,products:{...o,[t]:{id:e.sku,price:u,seller:l,productId:t}}}}catch(c){return console.error("Error handling SKU selection:",c),r}},kp=j.createContext({}),Sx=({children:e,item:t,index:r,shelfTitle:n,...o})=>{const[i,c]=j.useState(null),l=j.useRef(null),u=j.useRef({availableSkus:[],priceInfo:{price:0,listPrice:0}}),{sendDataLayerEvent:d,itemListRef:h}=Ee(),m=x=>{d({functionKey:"productEvents",data:{commonData:{...t,availableSizes:u.current.availableSkus,...u.current.priceInfo},customData:{index:r+1},event:x}})},_=()=>{m("add_to_wishlist")},g=()=>{d({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...t,...u.current.priceInfo}]},supportData:{selectedSku:i,selectedSkus:[i]},customData:{index:r}}})},v=()=>{n&&(h.current={item_list_name:n}),m("select_item")};return s.jsx(kp.Provider,{value:j.useMemo(()=>({...o,index:r,item:t,element:l,selectedSku:i,setSelectedSku:c,eventDataRef:u,sendAddToWishlistEvent:_,sendSelectItemEvent:v,sendAddToCartEvent:g}),[o,t,l,i]),children:e})},Gt=()=>{const e=j.useContext(kp);if(e===void 0)throw new Error("useProductCardContext must be used within a ProductCardProvider");return e},mt={"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"},Mp=({callback:e,children:t,className:r,data:n,isKit:o,...i})=>{const{item:{availability:{status:c},image:l}}=Gt();return c?s.jsxs("div",{...i,className:p.helpers.classNameConcat(mt["product-card--actions"],r),children:[s.jsxs(Ue.Wrapper,{type:"actions--group",children:[s.jsx(Ue.Price,{}),s.jsx("div",{className:mt["product-card--actions--selectors"],children:!o&&s.jsx(Ue.StyleSelector,{data:n,images:l,callback:e})})]}),t]}):null};Mp.displayName="ProductCard.Actions";const Lp=({className:e,isKit:t,...r})=>{const{addToCart:n}=Xe(),{isMobile:o=!1,selectedSku:i,outStock:c,item:l,sendAddToCartEvent:u,CONSTANTS:d}=Gt(),h=()=>{var g;if(!i)return;const _=U.getValidOffer(i.offers.offers,d.StoreConfig_MainSellerId);_&&n({id:i==null?void 0:i.sku,quantity:1,seller:_.seller.identifier},{id:l.id,texture:(g=l==null?void 0:l.image.find(v=>d.TEXTURE_IMAGE.includes(v.alternateName)))==null?void 0:g.url}),u()},m=i?d.BUY_BUTTON_LABELS.add_to_cart:d.BUY_BUTTON_LABELS.select_size;return s.jsx(p.Button,{...r,className:p.helpers.classNameConcat(e,"buy-button"),disabled:!t&&!i&&!c,size:o?"medium":"large",variant:c?"secondary":"primary",onClick:c?r.onClick:h,children:c?"Avise-me quando chegar":m})};Lp.displayName="ProductCard.Actions.BuyButton";const Cx={"snackbar-modifier":"_snackbar-modifier_1va2l_1"},Fn=({size:e,adornment:t,title:r,subtitle:n,supportChildren:o,className:i,Z_INDEX_WAR:c,...l})=>s.jsxs(p.SnackBar.Structure,{...l,size:e,className:p.helpers.classNameConcat(Cx["snackbar-modifier"],i),width:360,style:{zIndex:c.snackbar},children:[s.jsx(p.SnackBar.Content,{adornment:t,title:r,subtitle:n}),o&&s.jsx(p.SnackBar.Support,{children:o})]});Fn.displayName="SnackBar";const vs={"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 qa={exports:{}},Ct={};Ct._=Ct._interop_require_default=wx;function wx(e){return e&&e.__esModule?e:{default:e}}var oo={exports:{}},Ai={},du;function Dp(){return du||(du=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(c,l){for(var u in l)Object.defineProperty(c,u,{enumerable:!0,get:l[u]})}t(e,{assign:function(){return i},searchParamsToUrlQuery:function(){return r},urlQueryToSearchParams:function(){return o}});function r(c){const l={};return c.forEach((u,d)=>{typeof l[d]>"u"?l[d]=u:Array.isArray(l[d])?l[d].push(u):l[d]=[l[d],u]}),l}function n(c){return typeof c=="string"||typeof c=="number"&&!isNaN(c)||typeof c=="boolean"?String(c):""}function o(c){const l=new URLSearchParams;return Object.entries(c).forEach(u=>{let[d,h]=u;Array.isArray(h)?h.forEach(m=>l.append(d,n(m))):l.set(d,n(h))}),l}function i(c){for(var l=arguments.length,u=new Array(l>1?l-1:0),d=1;d<l;d++)u[d-1]=arguments[d];return u.forEach(h=>{Array.from(h.keys()).forEach(m=>c.delete(m)),h.forEach((m,_)=>c.append(_,m))}),c}}(Ai)),Ai}var ki={},hn={};function Fp(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(Fp=function(n){return n?r:t})(e)}hn._=hn._interop_require_wildcard=Ex;function Ex(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=Fp(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var c=o?Object.getOwnPropertyDescriptor(e,i):null;c&&(c.get||c.set)?Object.defineProperty(n,i,c):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}var fu;function zp(){return fu||(fu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(u,d){for(var h in d)Object.defineProperty(u,h,{enumerable:!0,get:d[h]})}t(e,{formatUrl:function(){return i},formatWithValidation:function(){return l},urlObjectKeys:function(){return c}});const n=hn._(Dp()),o=/https?|ftp|gopher|file/;function i(u){let{auth:d,hostname:h}=u,m=u.protocol||"",_=u.pathname||"",g=u.hash||"",v=u.query||"",x=!1;d=d?encodeURIComponent(d).replace(/%3A/i,":")+"@":"",u.host?x=d+u.host:h&&(x=d+(~h.indexOf(":")?"["+h+"]":h),u.port&&(x+=":"+u.port)),v&&typeof v=="object"&&(v=String(n.urlQueryToSearchParams(v)));let S=u.search||v&&"?"+v||"";return m&&!m.endsWith(":")&&(m+=":"),u.slashes||(!m||o.test(m))&&x!==!1?(x="//"+(x||""),_&&_[0]!=="/"&&(_="/"+_)):x||(x=""),g&&g[0]!=="#"&&(g="#"+g),S&&S[0]!=="?"&&(S="?"+S),_=_.replace(/[?#]/g,encodeURIComponent),S=S.replace("#","%23"),""+m+x+_+S+g}const c=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function l(u){return process.env.NODE_ENV==="development"&&u!==null&&typeof u=="object"&&Object.keys(u).forEach(d=>{c.includes(d)||console.warn("Unknown key passed via urlObject into url.format: "+d)}),i(u)}}(ki)),ki}var Mi={},pu;function Ix(){return pu||(pu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"omit",{enumerable:!0,get:function(){return t}});function t(r,n){const o={};return Object.keys(r).forEach(i=>{n.includes(i)||(o[i]=r[i])}),o}}(Mi)),Mi}var Li={},hu;function Vo(){return hu||(hu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(C,N){for(var T in N)Object.defineProperty(C,T,{enumerable:!0,get:N[T]})}t(e,{DecodeError:function(){return v},MiddlewareNotFoundError:function(){return P},MissingStaticPage:function(){return w},NormalizeError:function(){return x},PageNotFoundError:function(){return S},SP:function(){return _},ST:function(){return g},WEB_VITALS:function(){return r},execOnce:function(){return n},getDisplayName:function(){return u},getLocationOrigin:function(){return c},getURL:function(){return l},isAbsoluteUrl:function(){return i},isResSent:function(){return d},loadGetInitialProps:function(){return m},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return I}});const r=["CLS","FCP","FID","INP","LCP","TTFB"];function n(C){let N=!1,T;return function(){for(var O=arguments.length,M=new Array(O),z=0;z<O;z++)M[z]=arguments[z];return N||(N=!0,T=C(...M)),T}}const o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,i=C=>o.test(C);function c(){const{protocol:C,hostname:N,port:T}=window.location;return C+"//"+N+(T?":"+T:"")}function l(){const{href:C}=window.location,N=c();return C.substring(N.length)}function u(C){return typeof C=="string"?C:C.displayName||C.name||"Unknown"}function d(C){return C.finished||C.headersSent}function h(C){const N=C.split("?");return N[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(N[1]?"?"+N.slice(1).join("?"):"")}async function m(C,N){if(process.env.NODE_ENV!=="production"){var T;if((T=C.prototype)!=null&&T.getInitialProps){const z='"'+u(C)+'.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(z)}}const O=N.res||N.ctx&&N.ctx.res;if(!C.getInitialProps)return N.ctx&&N.Component?{pageProps:await m(N.Component,N.ctx)}:{};const M=await C.getInitialProps(N);if(O&&d(O))return M;if(!M){const z='"'+u(C)+'.getInitialProps()" should resolve to an object. But found "'+M+'" instead.';throw new Error(z)}return process.env.NODE_ENV!=="production"&&Object.keys(M).length===0&&!N.ctx&&console.warn(""+u(C)+" returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps"),M}const _=typeof performance<"u",g=_&&["mark","measure","getEntriesByName"].every(C=>typeof performance[C]=="function");class v extends Error{}class x extends Error{}class S extends Error{constructor(N){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+N}}class w extends Error{constructor(N,T){super(),this.message="Failed to load static file for page: "+N+" "+T}}class P extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function I(C){return JSON.stringify({message:C.message,stack:C.stack})}}(Li)),Li}var io={exports:{}},mu;function Go(){return mu||(mu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return o}});const r=U.removeTrailingSlash,n=U.parsePath,o=i=>{if(!i.startsWith("/")||process.env.__NEXT_MANUAL_TRAILING_SLASH)return i;const{pathname:c,query:l,hash:u}=(0,n.parsePath)(i);return process.env.__NEXT_TRAILING_SLASH?/\.[^/]+\/?$/.test(c)?""+(0,r.removeTrailingSlash)(c)+l+u:c.endsWith("/")?""+c+l+u:c+"/"+l+u:""+(0,r.removeTrailingSlash)(c)+l+u};(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)}(io,io.exports)),io.exports}var Di={},ao={exports:{}},_u;function Px(){return _u||(_u=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return o}});const r=U.pathHasPrefix,n=process.env.__NEXT_ROUTER_BASEPATH||"";function o(i){return(0,r.pathHasPrefix)(i,n)}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(ao,ao.exports)),ao.exports}var gu;function qp(){return gu||(gu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isLocalURL",{enumerable:!0,get:function(){return n}});const t=Vo(),r=Px();function n(o){if(!(0,t.isAbsoluteUrl)(o))return!0;try{const i=(0,t.getLocationOrigin)(),c=new URL(o,i);return c.origin===i&&(0,r.hasBasePath)(c.pathname)}catch{return!1}}}(Di)),Di}var Fi={},zi={},yu;function Nx(){return yu||(yu=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 i=[...this.children.keys()].sort();this.slugName!==null&&i.splice(i.indexOf("[]"),1),this.restSlugName!==null&&i.splice(i.indexOf("[...]"),1),this.optionalRestSlugName!==null&&i.splice(i.indexOf("[[...]]"),1);const c=i.map(l=>this.children.get(l)._smoosh(""+o+l+"/")).reduce((l,u)=>[...l,...u],[]);if(this.slugName!==null&&c.push(...this.children.get("[]")._smoosh(o+"["+this.slugName+"]/")),!this.placeholder){const l=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 ("'+l+'" and "'+l+"[[..."+this.optionalRestSlugName+']]").');c.unshift(l)}return this.restSlugName!==null&&c.push(...this.children.get("[...]")._smoosh(o+"[..."+this.restSlugName+"]/")),this.optionalRestSlugName!==null&&c.push(...this.children.get("[[...]]")._smoosh(o+"[[..."+this.optionalRestSlugName+"]]/")),c}_insert(o,i,c){if(o.length===0){this.placeholder=!1;return}if(c)throw new Error("Catch-all must be the last part of the URL.");let l=o[0];if(l.startsWith("[")&&l.endsWith("]")){let h=function(m,_){if(m!==null&&m!==_)throw new Error("You cannot use different slug names for the same dynamic path ('"+m+"' !== '"+_+"').");i.forEach(g=>{if(g===_)throw new Error('You cannot have the same slug name "'+_+'" repeat within a single dynamic path');if(g.replace(/\W/g,"")===l.replace(/\W/g,""))throw new Error('You cannot have the slug names "'+g+'" and "'+_+'" differ only by non-word symbols within a single dynamic path')}),i.push(_)},u=l.slice(1,-1),d=!1;if(u.startsWith("[")&&u.endsWith("]")&&(u=u.slice(1,-1),d=!0),u.startsWith("...")&&(u=u.substring(3),c=!0),u.startsWith("[")||u.endsWith("]"))throw new Error("Segment names may not start or end with extra brackets ('"+u+"').");if(u.startsWith("."))throw new Error("Segment names may not start with erroneous periods ('"+u+"').");if(c)if(d){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]+'" ).');h(this.optionalRestSlugName,u),this.optionalRestSlugName=u,l="[[...]]"}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]+'").');h(this.restSlugName,u),this.restSlugName=u,l="[...]"}else{if(d)throw new Error('Optional route parameters are not yet supported ("'+o[0]+'").');h(this.slugName,u),this.slugName=u,l="[]"}}this.children.has(l)||this.children.set(l,new t),this.children.get(l)._insert(o.slice(1),i,c)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function r(n){const o=new t;return n.forEach(i=>o.insert(i)),o.smoosh()}}(zi)),zi}var qi={},Bi={},Ui={},Hi={},vu;function Rx(){return vu||(vu=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}}(Hi)),Hi}var Tc={};(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,{DEFAULT_SEGMENT_KEY:function(){return o},PAGE_SEGMENT_KEY:function(){return n},isGroupSegment:function(){return r}});function r(i){return i[0]==="("&&i.endsWith(")")}const n="__PAGE__",o="__DEFAULT__"})(Tc);var xu;function Tx(){return xu||(xu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(c,l){for(var u in l)Object.defineProperty(c,u,{enumerable:!0,get:l[u]})}t(e,{normalizeAppPath:function(){return o},normalizeRscURL:function(){return i}});const r=Rx(),n=Tc;function o(c){return(0,r.ensureLeadingSlash)(c.split("/").reduce((l,u,d,h)=>!u||(0,n.isGroupSegment)(u)||u[0]==="@"||(u==="page"||u==="route")&&d===h.length-1?l:l+"/"+u,""))}function i(c){return c.replace(/\.rsc($|\?)/,"$1")}}(Ui)),Ui}var bu;function Bp(){return bu||(bu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(c,l){for(var u in l)Object.defineProperty(c,u,{enumerable:!0,get:l[u]})}t(e,{INTERCEPTION_ROUTE_MARKERS:function(){return n},extractInterceptionRouteInformation:function(){return i},isInterceptionRouteAppPath:function(){return o}});const r=Tx(),n=["(..)(..)","(.)","(..)","(...)"];function o(c){return c.split("/").find(l=>n.find(u=>l.startsWith(u)))!==void 0}function i(c){let l,u,d;for(const h of c.split("/"))if(u=n.find(m=>h.startsWith(m)),u){[l,d]=c.split(u,2);break}if(!l||!u||!d)throw new Error(`Invalid interception route: ${c}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`);switch(l=(0,r.normalizeAppPath)(l),u){case"(.)":l==="/"?d=`/${d}`:d=l+"/"+d;break;case"(..)":if(l==="/")throw new Error(`Invalid interception route: ${c}. Cannot use (..) marker at the root level, use (.) instead.`);d=l.split("/").slice(0,-1).concat(d).join("/");break;case"(...)":d="/"+d;break;case"(..)(..)":const h=l.split("/");if(h.length<=2)throw new Error(`Invalid interception route: ${c}. Cannot use (..)(..) marker at the root level or one level up.`);d=h.slice(0,-2).concat(d).join("/");break;default:throw new Error("Invariant: unexpected marker")}return{interceptingRoute:l,interceptedRoute:d}}}(Bi)),Bi}var ju;function Ox(){return ju||(ju=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isDynamicRoute",{enumerable:!0,get:function(){return n}});const t=Bp(),r=/\/\[[^/]+?\](?=\/|$)/;function n(o){return(0,t.isInterceptionRouteAppPath)(o)&&(o=(0,t.extractInterceptionRouteInformation)(o).interceptedRoute),r.test(o)}}(qi)),qi}var Su;function Ax(){return Su||(Su=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,{getSortedRoutes:function(){return r.getSortedRoutes},isDynamicRoute:function(){return n.isDynamicRoute}});const r=Nx(),n=Ox()}(Fi)),Fi}var $i={},Wi={},Cu;function kx(){return Cu||(Cu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getRouteMatcher",{enumerable:!0,get:function(){return r}});const t=Vo();function r(n){let{re:o,groups:i}=n;return c=>{const l=o.exec(c);if(!l)return!1;const u=h=>{try{return decodeURIComponent(h)}catch{throw new t.DecodeError("failed to decode param")}},d={};return Object.keys(i).forEach(h=>{const m=i[h],_=l[m.pos];_!==void 0&&(d[h]=~_.indexOf("/")?_.split("/").map(g=>u(g)):m.repeat?[u(_)]:u(_))}),d}}}(Wi)),Wi}var Vi={},Gi={},wu;function Mx(){return wu||(wu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"escapeStringRegexp",{enumerable:!0,get:function(){return n}});const t=/[|\\{}()[\]^$+*?.-]/,r=/[|\\{}()[\]^$+*?.-]/g;function n(o){return t.test(o)?o.replace(r,"\\$&"):o}}(Gi)),Gi}var Eu;function Lx(){return Eu||(Eu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(v,x){for(var S in x)Object.defineProperty(v,S,{enumerable:!0,get:x[S]})}t(e,{getNamedMiddlewareRegex:function(){return g},getNamedRouteRegex:function(){return _},getRouteRegex:function(){return u},parseParameter:function(){return c}});const r=U.constants,n=Bp(),o=Mx(),i=U.removeTrailingSlash;function c(v){const x=v.startsWith("[")&&v.endsWith("]");x&&(v=v.slice(1,-1));const S=v.startsWith("...");return S&&(v=v.slice(3)),{key:v,repeat:S,optional:x}}function l(v){const x=(0,i.removeTrailingSlash)(v).slice(1).split("/"),S={};let w=1;return{parameterizedRoute:x.map(P=>{const I=n.INTERCEPTION_ROUTE_MARKERS.find(N=>P.startsWith(N)),C=P.match(/\[((?:\[.*\])|.+)\]/);if(I&&C){const{key:N,optional:T,repeat:O}=c(C[1]);return S[N]={pos:w++,repeat:O,optional:T},"/"+(0,o.escapeStringRegexp)(I)+"([^/]+?)"}else if(C){const{key:N,repeat:T,optional:O}=c(C[1]);return S[N]={pos:w++,repeat:T,optional:O},T?O?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}else return"/"+(0,o.escapeStringRegexp)(P)}).join(""),groups:S}}function u(v){const{parameterizedRoute:x,groups:S}=l(v);return{re:new RegExp("^"+x+"(?:/)?$"),groups:S}}function d(){let v=0;return()=>{let x="",S=++v;for(;S>0;)x+=String.fromCharCode(97+(S-1)%26),S=Math.floor((S-1)/26);return x}}function h(v){let{interceptionMarker:x,getSafeRouteKey:S,segment:w,routeKeys:P,keyPrefix:I}=v;const{key:C,optional:N,repeat:T}=c(w);let O=C.replace(/\W/g,"");I&&(O=""+I+O);let M=!1;(O.length===0||O.length>30)&&(M=!0),isNaN(parseInt(O.slice(0,1)))||(M=!0),M&&(O=S()),I?P[O]=""+I+C:P[O]=C;const z=x?(0,o.escapeStringRegexp)(x):"";return T?N?"(?:/"+z+"(?<"+O+">.+?))?":"/"+z+"(?<"+O+">.+?)":"/"+z+"(?<"+O+">[^/]+?)"}function m(v,x){const S=(0,i.removeTrailingSlash)(v).slice(1).split("/"),w=d(),P={};return{namedParameterizedRoute:S.map(I=>{const C=n.INTERCEPTION_ROUTE_MARKERS.some(T=>I.startsWith(T)),N=I.match(/\[((?:\[.*\])|.+)\]/);if(C&&N){const[T]=I.split(N[0]);return h({getSafeRouteKey:w,interceptionMarker:T,segment:N[1],routeKeys:P,keyPrefix:x?r.NEXT_INTERCEPTION_MARKER_PREFIX:void 0})}else return N?h({getSafeRouteKey:w,segment:N[1],routeKeys:P,keyPrefix:x?r.NEXT_QUERY_PARAM_PREFIX:void 0}):"/"+(0,o.escapeStringRegexp)(I)}).join(""),routeKeys:P}}function _(v,x){const S=m(v,x);return{...u(v),namedRegex:"^"+S.namedParameterizedRoute+"(?:/)?$",routeKeys:S.routeKeys}}function g(v,x){const{parameterizedRoute:S}=l(v),{catchAll:w=!0}=x;if(S==="/")return{namedRegex:"^/"+(w?".*":"")+"$"};const{namedParameterizedRoute:P}=m(v,!1);let I=w?"(?:(/.*)?)":"";return{namedRegex:"^"+P+I+"$"}}}(Vi)),Vi}var Iu;function Dx(){return Iu||(Iu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"interpolateAs",{enumerable:!0,get:function(){return n}});const t=kx(),r=Lx();function n(o,i,c){let l="";const u=(0,r.getRouteRegex)(o),d=u.groups,h=(i!==o?(0,t.getRouteMatcher)(u)(i):"")||c;l=o;const m=Object.keys(d);return m.every(_=>{let g=h[_]||"";const{repeat:v,optional:x}=d[_];let S="["+(v?"...":"")+_+"]";return x&&(S=(g?"":"/")+"["+S+"]"),v&&!Array.isArray(g)&&(g=[g]),(x||_ in h)&&(l=l.replace(S,v?g.map(w=>encodeURIComponent(w)).join("/"):encodeURIComponent(g))||"/")})||(l=""),{params:m,result:l}}}($i)),$i}var Pu;function Fx(){return Pu||(Pu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return h}});const r=Dp(),n=zp(),o=Ix(),i=Vo(),c=Go(),l=qp(),u=Ax(),d=Dx();function h(m,_,g){let v,x=typeof _=="string"?_:(0,n.formatWithValidation)(_);const S=x.match(/^[a-zA-Z]{1,}:\/\//),w=S?x.slice(S[0].length):x;if((w.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+x+"' passed to next/router in page: '"+m.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");const I=(0,i.normalizeRepeatedSlashes)(w);x=(S?S[0]:"")+I}if(!(0,l.isLocalURL)(x))return g?[x]:x;try{v=new URL(x.startsWith("#")?m.asPath:m.pathname,"http://n")}catch{v=new URL("/","http://n")}try{const I=new URL(x,v);I.pathname=(0,c.normalizePathTrailingSlash)(I.pathname);let C="";if((0,u.isDynamicRoute)(I.pathname)&&I.searchParams&&g){const T=(0,r.searchParamsToUrlQuery)(I.searchParams),{result:O,params:M}=(0,d.interpolateAs)(I.pathname,I.pathname,T);O&&(C=(0,n.formatWithValidation)({pathname:O,hash:I.hash,query:(0,o.omit)(T,M)}))}const N=I.origin===v.origin?I.href.slice(I.origin.length):I.href;return g?[N,C||N]:N}catch{return g?[x]: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)}(oo,oo.exports)),oo.exports}var co={exports:{}},Nu;function zx(){return Nu||(Nu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return n}});const r=Go(),n=function(o){for(var i=arguments.length,c=new Array(i>1?i-1:0),l=1;l<i;l++)c[l-1]=arguments[l];return process.env.__NEXT_I18N_SUPPORT?(0,r.normalizePathTrailingSlash)(U.addLocale.addLocale(o,...c)):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)}(co,co.exports)),co.exports}var Ki={},Ru;function Up(){return Ru||(Ru=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RouterContext",{enumerable:!0,get:function(){return n}});const n=Ct._(j).default.createContext(null);process.env.NODE_ENV!=="production"&&(n.displayName="RouterContext")}(Ki)),Ki}var Qi={},Tu;function Hp(){return Tu||(Tu=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(d,h){for(var m in h)Object.defineProperty(d,m,{enumerable:!0,get:h[m]})}t(e,{AppRouterContext:function(){return o},GlobalLayoutRouterContext:function(){return c},LayoutRouterContext:function(){return i},MissingSlotContext:function(){return u},TemplateContext:function(){return l}});const n=Ct._(j),o=n.default.createContext(null),i=n.default.createContext(null),c=n.default.createContext(null),l=n.default.createContext(null);process.env.NODE_ENV!=="production"&&(o.displayName="AppRouterContext",i.displayName="LayoutRouterContext",c.displayName="GlobalLayoutRouterContext",l.displayName="TemplateContext");const u=n.default.createContext(new Set)}(Qi)),Qi}var lo={exports:{}},uo={exports:{}},Ou;function $p(){return Ou||(Ou=1,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,{cancelIdleCallback:function(){return o},requestIdleCallback:function(){return n}});const n=typeof self<"u"&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(i){let c=Date.now();return self.setTimeout(function(){i({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-c))}})},1)},o=typeof self<"u"&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(i){return clearTimeout(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)}(uo,uo.exports)),uo.exports}var Au;function qx(){return Au||(Au=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return d}});const r=j,n=$p(),o=typeof IntersectionObserver=="function",i=new Map,c=[];function l(h){const m={root:h.root||null,margin:h.rootMargin||""},_=c.find(S=>S.root===m.root&&S.margin===m.margin);let g;if(_&&(g=i.get(_),g))return g;const v=new Map,x=new IntersectionObserver(S=>{S.forEach(w=>{const P=v.get(w.target),I=w.isIntersecting||w.intersectionRatio>0;P&&I&&P(I)})},h);return g={id:m,observer:x,elements:v},c.push(m),i.set(m,g),g}function u(h,m,_){const{id:g,observer:v,elements:x}=l(_);return x.set(h,m),v.observe(h),function(){if(x.delete(h),v.unobserve(h),x.size===0){v.disconnect(),i.delete(g);const w=c.findIndex(P=>P.root===g.root&&P.margin===g.margin);w>-1&&c.splice(w,1)}}}function d(h){let{rootRef:m,rootMargin:_,disabled:g}=h;const v=g||!o,[x,S]=(0,r.useState)(!1),w=(0,r.useRef)(null),P=(0,r.useCallback)(C=>{w.current=C},[]);(0,r.useEffect)(()=>{if(o){if(v||x)return;const C=w.current;if(C&&C.tagName)return u(C,T=>T&&S(T),{root:m==null?void 0:m.current,rootMargin:_})}else if(!x){const C=(0,n.requestIdleCallback)(()=>S(!0));return()=>(0,n.cancelIdleCallback)(C)}},[v,_,m,x,w.current]);const I=(0,r.useCallback)(()=>{S(!1)},[]);return[P,x,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)}(lo,lo.exports)),lo.exports}var fo={exports:{}},po={exports:{}},ku;function Bx(){return ku||(ku=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return r}});const r=(n,o)=>process.env.__NEXT_I18N_SUPPORT?U.normalizeLocalePath.normalizeLocalePath(n,o):{pathname:n,detectedLocale:void 0};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(po,po.exports)),po.exports}var ho={exports:{}},Mu;function Ux(){return Mu||(Mu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"detectDomainLocale",{enumerable:!0,get:function(){return r}});const r=function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];if(process.env.__NEXT_I18N_SUPPORT)return U.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)}(ho,ho.exports)),ho.exports}var Lu;function Hx(){return Lu||(Lu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return o}});const r=Go(),n=process.env.__NEXT_ROUTER_BASEPATH||"";function o(i,c,l,u){if(process.env.__NEXT_I18N_SUPPORT){const d=Bx().normalizeLocalePath,h=Ux().detectDomainLocale,m=c||d(i,l).detectedLocale,_=h(u,void 0,m);if(_){const g="http"+(_.http?"":"s")+"://",v=m===_.defaultLocale?"":"/"+m;return""+g+_.domain+(0,r.normalizePathTrailingSlash)(""+n+v+i)}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)}(fo,fo.exports)),fo.exports}var mo={exports:{}},Du;function $x(){return Du||(Du=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return i}});const r=U.addPathPrefix,n=Go(),o=process.env.__NEXT_ROUTER_BASEPATH||"";function i(c,l){return(0,n.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH&&!l?c:(0,r.addPathPrefix)(c,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)}(mo,mo.exports)),mo.exports}var _o={exports:{}},Fu;function Wx(){return Fu||(Fu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(g,v){for(var x in v)Object.defineProperty(g,x,{enumerable:!0,get:v[x]})}r(t,{ACTION_FAST_REFRESH:function(){return u},ACTION_NAVIGATE:function(){return o},ACTION_PREFETCH:function(){return l},ACTION_REFRESH:function(){return n},ACTION_RESTORE:function(){return i},ACTION_SERVER_ACTION:function(){return d},ACTION_SERVER_PATCH:function(){return c},PrefetchCacheEntryStatus:function(){return m},PrefetchKind:function(){return h},isThenable:function(){return _}});const n="refresh",o="navigate",i="restore",c="server-patch",l="prefetch",u="fast-refresh",d="server-action";var h;(function(g){g.AUTO="auto",g.FULL="full",g.TEMPORARY="temporary"})(h||(h={}));var m;(function(g){g.fresh="fresh",g.reusable="reusable",g.expired="expired",g.stale="stale"})(m||(m={}));function _(g){return g&&(typeof g=="object"||typeof g=="function")&&typeof g.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)}(_o,_o.exports)),_o.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return T}});const r=Ct,n=s,o=r._(j),i=Fx(),c=qp(),l=zp(),u=Vo(),d=zx(),h=Up(),m=Hp(),_=qx(),g=Hx(),v=$x(),x=Wx(),S=new Set;function w(O,M,z,D,B,G){if(typeof window>"u"||!G&&!(0,c.isLocalURL)(M))return;if(!D.bypassPrefetchedCheck){const Y=typeof D.locale<"u"?D.locale:"locale"in O?O.locale:void 0,X=M+"%"+z+"%"+Y;if(S.has(X))return;S.add(X)}(async()=>G?O.prefetch(M,B):O.prefetch(M,z,D))().catch(Y=>{if(process.env.NODE_ENV!=="production")throw Y})}function P(O){const z=O.currentTarget.getAttribute("target");return z&&z!=="_self"||O.metaKey||O.ctrlKey||O.shiftKey||O.altKey||O.nativeEvent&&O.nativeEvent.which===2}function I(O,M,z,D,B,G,J,Y,X){const{nodeName:Z}=O.currentTarget;if(Z.toUpperCase()==="A"&&(P(O)||!X&&!(0,c.isLocalURL)(z)))return;O.preventDefault();const fe=()=>{const ee=J??!0;"beforePopState"in M?M[B?"replace":"push"](z,D,{shallow:G,locale:Y,scroll:ee}):M[B?"replace":"push"](D||z,{scroll:ee})};X?o.default.startTransition(fe):fe()}function C(O){return typeof O=="string"?O:(0,l.formatUrl)(O)}const T=o.default.forwardRef(function(M,z){let D;const{href:B,as:G,children:J,prefetch:Y=null,passHref:X,replace:Z,shallow:he,scroll:fe,locale:ee,onClick:ie,onMouseEnter:_e,onTouchStart:Ce,legacyBehavior:ge=!1,...we}=M;D=J,ge&&(typeof D=="string"||typeof D=="number")&&(D=(0,n.jsx)("a",{children:D}));const V=o.default.useContext(h.RouterContext),oe=o.default.useContext(m.AppRouterContext),F=V??oe,ce=!V,je=Y!==!1,Oe=Y===null?x.PrefetchKind.AUTO:x.PrefetchKind.FULL;if(process.env.NODE_ENV!=="production"){let re=function(se){return new Error("Failed prop type: The prop `"+se.key+"` expects a "+se.expected+" in `<Link>`, but got `"+se.actual+"` instead."+(typeof window<"u"?`
|
|
2
2
|
Open your browser's console to view the Component stack trace.`:""))};Object.keys({href:!0}).forEach(se=>{if(se==="href"&&(M[se]==null||typeof M[se]!="string"&&typeof M[se]!="object"))throw re({key:se,expected:"`string` or `object`",actual:M[se]===null?"null":typeof M[se]})}),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(se=>{const ve=typeof M[se];if(se==="as"){if(M[se]&&ve!=="string"&&ve!=="object")throw re({key:se,expected:"`string` or `object`",actual:ve})}else if(se==="locale"){if(M[se]&&ve!=="string")throw re({key:se,expected:"`string`",actual:ve})}else if(se==="onClick"||se==="onMouseEnter"||se==="onTouchStart"){if(M[se]&&ve!=="function")throw re({key:se,expected:"`function`",actual:ve})}else if((se==="replace"||se==="scroll"||se==="shallow"||se==="passHref"||se==="prefetch"||se==="legacyBehavior")&&M[se]!=null&&ve!=="boolean")throw re({key:se,expected:"`boolean`",actual:ve})});const Q=o.default.useRef(!1);M.prefetch&&!Q.current&&!ce&&(Q.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"&&ce&&!G){let re;if(typeof B=="string"?re=B:typeof B=="object"&&typeof B.pathname=="string"&&(re=B.pathname),re&&re.split("/").some($e=>$e.startsWith("[")&&$e.endsWith("]")))throw new Error("Dynamic href `"+re+"` 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:q,as:$}=o.default.useMemo(()=>{if(!V){const $e=C(B);return{href:$e,as:G?C(G):$e}}const[re,De]=(0,i.resolveHref)(V,B,!0);return{href:re,as:G?(0,i.resolveHref)(V,G):De||re}},[V,B,G]),Pe=o.default.useRef(q),ne=o.default.useRef($);let te;if(ge)if(process.env.NODE_ENV==="development"){ie&&console.warn('"onClick" was passed to <Link> with `href` of `'+B+'` but "legacyBehavior" was set. The legacy behavior requires onClick be set on the child of next/link'),_e&&console.warn('"onMouseEnter" was passed to <Link> with `href` of `'+B+'` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link');try{te=o.default.Children.only(D)}catch{throw D?new Error("Multiple children were passed to <Link> with `href` of `"+B+"` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children"+(typeof window<"u"?`
|
|
3
3
|
Open your browser's console to view the Component stack trace.`:"")):new Error("No children were passed to <Link> with `href` of `"+B+"` but one child is required https://nextjs.org/docs/messages/link-no-children")}}else te=o.default.Children.only(D);else if(process.env.NODE_ENV==="development"&&(D==null?void 0:D.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 ke=ge?te&&typeof te=="object"&&te.ref:z,[ct,Me,Le]=(0,_.useIntersection)({rootMargin:"200px"}),tt=o.default.useCallback(re=>{(ne.current!==$||Pe.current!==q)&&(Le(),ne.current=$,Pe.current=q),ct(re),ke&&(typeof ke=="function"?ke(re):typeof ke=="object"&&(ke.current=re))},[$,ke,q,Le,ct]);o.default.useEffect(()=>{process.env.NODE_ENV==="production"&&F&&(!Me||!je||w(F,q,$,{locale:ee},{kind:Oe},ce))},[$,q,Me,ee,je,V==null?void 0:V.locale,F,ce,Oe]);const We={ref:tt,onClick(re){if(process.env.NODE_ENV!=="production"&&!re)throw new Error('Component rendered inside next/link has to pass click event to "onClick" prop.');!ge&&typeof ie=="function"&&ie(re),ge&&te.props&&typeof te.props.onClick=="function"&&te.props.onClick(re),F&&(re.defaultPrevented||I(re,F,q,$,Z,he,fe,ee,ce))},onMouseEnter(re){!ge&&typeof _e=="function"&&_e(re),ge&&te.props&&typeof te.props.onMouseEnter=="function"&&te.props.onMouseEnter(re),F&&((!je||process.env.NODE_ENV==="development")&&ce||w(F,q,$,{locale:ee,priority:!0,bypassPrefetchedCheck:!0},{kind:Oe},ce))},onTouchStart:process.env.__NEXT_LINK_NO_TOUCH_START?void 0:function(De){!ge&&typeof Ce=="function"&&Ce(De),ge&&te.props&&typeof te.props.onTouchStart=="function"&&te.props.onTouchStart(De),F&&(!je&&ce||w(F,q,$,{locale:ee,priority:!0,bypassPrefetchedCheck:!0},{kind:Oe},ce))}};if((0,u.isAbsoluteUrl)($))We.href=$;else if(!ge||X||te.type==="a"&&!("href"in te.props)){const re=typeof ee<"u"?ee:V==null?void 0:V.locale,De=(V==null?void 0:V.isLocaleDomain)&&(0,g.getDomainLocale)($,re,V==null?void 0:V.locales,V==null?void 0:V.domainLocales);We.href=De||(0,v.addBasePath)((0,d.addLocale)($,re,V==null?void 0:V.defaultLocale))}return ge?o.default.cloneElement(te,We):(0,n.jsx)("a",{...we,...We,children:D})});(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)})(za,za.exports);var $x=za.exports,Wx=$x;const Tt=U.getDefaultExportFromCjs(Wx),Vx="_link_w24h0_1",Gx="_wrapper_w24h0_98",Kx="_text_w24h0_106",Qi={link:Vx,wrapper:Gx,text:Kx},wt=({children:e,adornments:t,className:r,disableUnderline:n,href:o,mode:i,size:c,title:l,onClick:u,disablePadding:d,...h})=>{const m=p.helpers.ValidateProp({fieldTypes:Dn.SizesSmallExtended,property:c,fallback:"medium"}),_=p.helpers.ValidateProp({fieldTypes:Dn.Mode,property:i,fallback:"default"});return s.jsx(Tt,{...h,className:p.helpers.classNameConcat(Qi.link,r),href:o&&o.length>0?o:"#","data-size":m,"data-variant":_,title:l||"NextLink","data-disable-underline":n??!1,"data-disable-padding":d??!0,children:s.jsxs("div",{className:Qi.wrapper,onClick:u,children:[t==null?void 0:t.start,s.jsx("p",{className:Qi.text,"data-size":m,children:e}),t==null?void 0:t.end]})})},Qx=({ICONS:e})=>{const{resetFeedback:t}=xn();return s.jsxs("div",{className:vs["wishlist--snack--actions"],children:[s.jsx(wt,{href:"/favoritos",children:"Ver Favoritos"}),s.jsx(p.Button,{variant:"tertiary",size:"small",onClick:t,adornment:{start:s.jsx(p.Icon,{name:e.close})}})]})},Oc=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:r})=>{const n=yc(),{resetFeedback:o}=xn(),i=j.useRef(null);return j.useEffect(()=>{i.current&&clearTimeout(i.current),n&&(i.current=setTimeout(()=>{o()},5e3))},[n,o]),(n==null?void 0:n.active)&&s.jsx(Fn,{Z_INDEX_WAR:r,className:vs["wishlist--snack"],"data-action":n.action,title:n.action==="add"?e.messages.add:e.messages.remove,supportChildren:s.jsx(Qx,{ICONS:t}),size:"medium"})};Oc.displayName="WishList.Feedback";const Ac={"product-list--banner":"_product-list--banner_sfibj_1","product-list--card":"_product-list--card_sfibj_30","product-list":"_product-list_sfibj_1"},Hp=({className:e,children:t,columns:r=1,isMobile:n=!1,gap:o=8,position_grid:i,totalColumns:c=4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:l,...u})=>{const d=j.useMemo(()=>r%c===0?"initial":n||r<2?l:l.split("/").reverse().join("/"),[r,c,n]);return s.jsx("div",{...u,className:p.helpers.classNameConcat(Ac["product-list--banner"],e),style:{aspectRatio:d,maxWidth:`${r/c*100}%`,order:i,padding:o/2},children:t})};Hp.displayName="ProductList.Banner";class Yx{constructor(){Gr(this,"cache",new Map);Gr(this,"pendingRequests",new Map);Gr(this,"rafId",null)}request(t,r,n){const o=this.getCacheKey(t,n==null?void 0:n.filterTexture);if(this.cache.has(o)){r(this.cache.get(o));return}const i=this.pendingRequests.get(o);i?i.callbacks.push(r):this.pendingRequests.set(o,{productId:t,callbacks:[r],filterTexture:n.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=[],n=[];if(t.forEach((i,c)=>{this.cache.has(c)?n.push([c,i]):r.push(i)}),n.forEach(([i,c])=>{const l=this.cache.get(i);l&&c.callbacks.forEach(u=>u(l)),t.delete(i)}),r.length===0)return;const o=new Map;r.forEach(i=>{var u;const c=((u=i.filterTexture)==null?void 0:u.sort().join(","))||"no-filter",l=o.get(c)||[];l.push(i),o.set(c,l)}),await Promise.all(Array.from(o.values()).map(i=>this.executeGroupRequest(i)))}async executeGroupRequest(t){const r=t.map(o=>o.productId),n=t[0].filterTexture;try{const o=await U.fetchProxy("/_v/proxy/catalog/product/similars",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:r})});if(!o.ok)throw new Error("Erro ao buscar similares.");const i=await o.json();t.forEach(c=>{const l=i[c.productId]||[],u=n&&l.length?U.formattedSimilars(l,n):l,d=this.getCacheKey(c.productId,n);this.cache.set(d,u),c.callbacks.forEach(h=>h(u)),this.pendingRequests.delete(d)})}catch(o){console.error("Erro ao buscar similares:",o),t.forEach(i=>{const c=this.getCacheKey(i.productId,n);i.callbacks.forEach(l=>l([])),this.pendingRequests.delete(c)})}}clearCache(){this.cache.clear()}}const Fu=new Yx;function kc(e,t){const[r,n]=j.useState([]),o=j.useRef(!1);j.useEffect(()=>{o.current=!1},[e]);const i=j.useCallback(()=>{!e||o.current||(o.current=!0,Fu.request(e,n,t))},[e,t]),c=j.useCallback(()=>Fu.clearCache(),[]);return{items:r,loadSimilars:i,clearCache:c}}const $p=({isKit:e,parent:t,productId:r,setNotify:n,CONSTANTS:o})=>{const{router:i}=Ae(),{items:c,loadSimilars:l}=kc(r,{filterTexture:o.TEXTURE_IMAGE}),u=j.useRef(!1),d=j.useRef(null),h=g=>i.push(g??""),m=j.useCallback(g=>{!r||!g||l()},[r,l]),_=j.useCallback((g,v)=>{if(!g.isIntersecting){o.PLP_INFINITE_SCROLL&&d.current&&(clearTimeout(d.current),d.current=null);return}if(g.intersectionRatio>=v.threshold&&!u.current){if(o.PLP_INFINITE_SCROLL){d.current=setTimeout(()=>{m(!0)},o.PLP_PRODUCT_SIMILAR_DELAY);return}m(!0)}},[m]);return j.useEffect(()=>{if(e||!t.current)return;const g={root:null,threshold:.1},v=new IntersectionObserver(([x])=>{_(x,g)},g);return v.observe(t.current),()=>{d.current&&clearTimeout(d.current),v.disconnect()}},[_,t,e]),s.jsx(Ue.Actions,{data:c,callback:h,isKit:e,children:!e&&s.jsx(Ue.SizeSelector,{setNotify:n,PLP_SIZE_ORDER:o.PLP_SIZE_ORDER})})};$p.displayName="ProductList.Card.Actions";const Wp=({className:e,children:t,gap:r=32,item:n,isMobile:o,order:i,tag:c,hasMaxWidth:l=!0,index:u,setSkuSelected:d,showVideo:h,CONSTANTS:m,..._})=>{const g=j.useRef(null),{availability:{status:v}}=n,x=j.useCallback((w,P)=>{var I;typeof d=="function"&&d((I=w.isVariantOf)==null?void 0:I.hasVariant,P)},[d]),S=n.name.substring(0,4).toLowerCase()==="kit ";return s.jsxs("div",{..._,className:p.helpers.classNameConcat(Ac["product-list--card"],e),"data-mobile":o,"data-order":i,ref:g,style:{...l&&{maxWidth:o?"50%":"25%"},order:i,padding:r/2},children:[s.jsxs(Ue.Root,{item:n,isMobile:o,index:u,size:o?"small":"medium",order:i,outStock:!v,CONSTANTS:m,children:[s.jsx(Ue.Header,{product:n,tag:c==null?void 0:c.commercial}),s.jsx(Ue.Media,{showVideo:h,hasPriority:!0}),s.jsxs(Ue.Wrapper,{type:"body",children:[s.jsx(Ue.Title,{tag:c==null?void 0:c.institucional}),s.jsx($p,{productId:n.isVariantOf.productGroupID,parent:g,setNotify:x,isKit:S,CONSTANTS:m}),!S&&s.jsx(Ue.OutStock,{callback:x})]}),s.jsx(Ue.Wrapper,{type:"footer",children:v&&s.jsx(Ue.BuyButton,{isKit:S})})]}),t]})};Wp.displayName="ProductList.Card";const Vp=({children:e,className:t,...r})=>s.jsx("div",{...r,className:p.helpers.classNameConcat(Ac["product-list"],t),children:e});Vp.displayName="ProductList.Grid";const Dt={Banner:Hp,Card:Wp,Root:Vp,helpers:Qv},Xx="_pdc_av7d8_1",St={"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:Xx},Mc=({className:e,ICONS:t,PLP_NOT_RESULT:r})=>{const{router:n}=Ae(),{isMobile:o}=xe(),i=()=>{n.push(r==null?void 0:r.link)};return s.jsxs("div",{className:p.helpers.classNameConcat(St["pdc--empty"],e),children:[s.jsxs(p.TextStructure.DivWrapper,{className:St["pdc--empty-wrapper"],children:[s.jsx("span",{className:o?"typography-style-body-md":"typography-style-heading-sm",children:r.title}),s.jsx("p",{className:o?"typography-style-body-xs":"typography-style-body-sm",children:r.subtitle})]}),s.jsx(p.Button,{adornment:{end:s.jsx(p.Icon,{name:t.arrow_right})},className:"typography-style-body-sm-strong",onClick:()=>i(),variant:"tertiary",children:s.jsx("b",{children:r.text})})]})};Mc.displayName="PDC.Empty";const Lc=e=>s.jsx("div",{...e,className:St["pdc--infinite--next-page"],children:s.jsx(p.Spinner,{className:St["pdc--infinite--next-page--spinner"]})});Lc.displayName="PDC.Spinner";function Gp({CONSTANTS:e}){const{sendDataLayerEvent:t}=Ee(),{isMobile:r}=xe(),{getAvailableProductTag:n}=jr(),[o,i]=j.useState([]),[c,l]=j.useState(!0),u=ts(),d=u.join(","),h=r?16:32;return j.useEffect(()=>{const m=async()=>{u.length?await fetch("/api/wishlist/products",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({productIds:u})}).then(_=>_.json()).then(_=>{i(_),t({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:_}}})}).catch(_=>console.error(_)):i([]),l(!1)};if(u.length){m();return}if(u.length===0&&o.length===0){l(!1);return}i([]),l(!1)},[d]),s.jsx("section",{className:vs["wishlist-grid"],children:s.jsxs("div",{className:vs["wishlist-grid--container"],children:[c&&s.jsx(Lc,{}),!u.length&&!(o!=null&&o.length)&&!c&&s.jsx(Mc,{className:vs["pdc-empty-modifier"],ICONS:e.ICONS,PLP_NOT_RESULT:e.WISHLIST_NOT_RESULT}),s.jsx(Dt.Root,{children:Array.isArray(o)&&o.map((m,_)=>{const g=m.node.cluster.highlights||[],v=n(g);return s.jsx(Dt.Card,{gap:h,isMobile:r??!1,item:m.node,tag:v,index:_,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}},m.node.sku)})})]})})}Gp.displayName="Wishlist.Grid";const Jx=e=>e.map(t=>{var r;return(r=t.isVariantOf)==null?void 0:r.productGroupID})??[],Kp=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:r})=>{const n=rs(),o=ts(),i=yc(),{updateList:c}=xn();return j.useEffect(()=>{var u,d;i.active&&Zt.set("fs::wishlist",o);const l=async()=>{var h;await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:o,docId:(h=n==null?void 0:n.user)==null?void 0:h.id})}).catch(m=>{console.error("Error updating wishlist:",m)})};i.active&&((u=n.user)!=null&&u.id)&&o.length!==((d=n.wishlist)==null?void 0:d.length)&&l()},[i,n,o]),j.useEffect(()=>{var d;const l=async()=>{const h=await Zt.get("fs::wishlist");h&&(h==null?void 0:h.length)!==o.length&&c(h)},u=async()=>{var g;const h=await Zt.get("fs::wishlist")??[],m=n.wishlist?typeof n.wishlist[0]=="object"?Jx(n.wishlist):n.wishlist:[],_=[...new Set([...h,...m])];c(_),Zt.set("fs::wishlist",_),m.length!==_.length&&await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:_,docId:(g=n.user)==null?void 0:g.id})}).catch(v=>{console.error("Error updating wishlist:",v)})};if((d=n.user)!=null&&d.id){u();return}l()},[n,c]),s.jsx(Oc,{ICONS:t,Z_INDEX_WAR:r,WISHLIST_INFO:e})};Kp.displayName="Wishlist.Init";const Qp=({product:e,priceInfo:t,size:r="medium",style:n,ICONS:o})=>{const{sendDataLayerEvent:i,currentLocalRef:c}=Ee(),l=ts(),{toggleProduct:u}=xn(),{isVariantOf:{productGroupID:d}}=e;return s.jsx(p.Button,{adornment:{start:s.jsx(p.Icon,{size:r,name:l.includes(d)?o.favorite_true:o.favorite_false})},onClick:()=>{u(d),i({functionKey:"productEvents",data:{event:l.includes(d)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:c.current},commonData:{...e,...t}}})},style:{...n,border:"none"},variant:"tertiary"})};Qp.displayName="WishList.Toggle";const Yp={Feedback:Oc,Toggle:Qp,Grid:Gp,Init:Kp},Xp=({product:e,tag:t,size:r="small"})=>{const{CONSTANTS:n}=Gt(),{tags:o}=jr(),i=e.offers.offers[0],c=U.getDiscountPercent(i.listPrice,i.price),l=o==null?void 0:o.flagDiscount;return s.jsxs(Ue.Wrapper,{type:"header",style:{zIndex:n.Z_INDEX_WAR.product_card_header},children:[c>0&&!t&&(l==null?void 0:l.enableTag)&&s.jsxs(p.Tag,{title:`${c}% ${l==null?void 0:l.tagText}`,variant:"quaternary",size:"small",style:{background:l==null?void 0:l.tagColor,color:l==null?void 0:l.tagTextColor},children:[c,"% ",l==null?void 0:l.tagText]}),t?s.jsx(p.Tag,{title:t.value,adornment:{start:t.enableIcon&&t.icon?s.jsx(p.Icon,{name:t.icon,size:"small",style:{color:t.iconColor}}):null},size:r,variant:"quaternary",style:{background:t.tagColor,color:t.textColor},children:t.value}):null,n.PRODUCT_CARD_TOP_WISHLIST_TOGGLE&&s.jsx(Yp.Toggle,{product:e,priceInfo:{price:i.price,listPrice:i.listPrice},variant:"card",ICONS:n.ICONS})]})};Xp.displayName="ProductCard.Actions.Header";const Jp=({className:e,children:t,hasPriority:r=!1,showVideo:n=!1,...o})=>{const{element:i,index:c,item:{image:l,slug:u,video:d},sendSelectItemEvent:h,order:m,CONSTANTS:_}=Gt(),g=U.getFirstImages({images:l,label:{first:_.MAIN_IMAGE,second:_.SECOND_IMAGE}});return s.jsxs("div",{...o,className:p.helpers.classNameConcat(mt["product-card--image"],e),ref:i,style:{aspectRatio:_.PRODUCT_CARD_IMAGE_ASPECT_RATIO},children:[s.jsx(Tt,{href:`/${u}/p`,onClick:h,onMouseUp:v=>{v.button===1&&h(),_.PLP_INFINITE_SCROLL&&sessionStorage.setItem(_.PLP_GRID_SCROLL_BACK.order,String(m))},children:s.jsx("div",{className:mt["product-card--image--container"],children:Array.isArray(g)&&g.map(({url:v,alternateName:x},S)=>j.createElement(at.Image,{..._.PRODUCT_IMAGE_DIMENSIONS.product_card,style:_.PRODUCT_IMAGE_DIMENSIONS.product_card,alt:x??"product image",key:S,...r&&{priority:S===0&&c<4},objectFit:"cover",src:v}))})}),_.PLP_SHOW_VIDEO_ON_PRODUCT_CARD&&n&&d&&s.jsx(Ue.Video,{url:d,poster:g[0].url}),t]})};Jp.displayName="ProductCard.Media.Media";const Zp=({className:e,callback:t,children:r,...n})=>{const{isMobile:o,item:i,CONSTANTS:{PRODUCT_CARD_TEXTS:c}}=Gt(),{availability:{status:l}}=i;return l?null:s.jsxs("div",{...n,className:p.helpers.classNameConcat(mt["product-card--outstock"],e),children:[s.jsx(p.Tag,{size:"small",variant:"secondary",title:c.disabled,children:c.disabled}),s.jsx(p.Button,{className:p.helpers.classNameConcat(e,"buy-button"),size:o?"medium":"large",variant:"quaternary",onClick:()=>{typeof t=="function"&&t(i)},children:c.notify})]})};Zp.displayName="ProductCard.OutStock";const eh=({children:e,className:t="",index:r,isMobile:n=!1,item:o,size:i,order:c,outStock:l,shelfTitle:u,CONSTANTS:d,...h})=>s.jsx(bx,{item:o,isMobile:n,outStock:l,order:c,size:i,index:r,shelfTitle:u,CONSTANTS:d,children:s.jsx("div",{...h,className:p.helpers.classNameConcat(mt["product-card--wrapper"],t),"data-size":i,children:e})});eh.displayName="ProductCard.Root";const th=({disabled:e,label:t,size:r,value:n,onClick:o,...i})=>s.jsxs(p.ToggleSize.Wrapper,{...i,disabled:!1,outOfStock:e,size:r,onClick:o,children:[s.jsx(p.ToggleSize.DisabledAdornment,{}),s.jsx(p.ToggleSize.Text,{children:t})]});th.displayName="ProductCard.SizeSelector.Item";const rh=({active:e=!1,callback:t,selectedSku:r=null,item:n,setNotify:o})=>{const{item:i,isMobile:c,setSelectedSku:l,eventDataRef:u}=Gt();n.productId=i.id;const d=U.disableSKU(n),h=U.getSKUName(n,"tamanho");!d&&!u.current.availableSkus.includes(h)&&u.current.availableSkus.push(h);const m=j.useCallback(g=>{const v=r===g?null:g;typeof l=="function"&&l(v),typeof t=="function"&&t(v)},[t,l,r]),_=j.useCallback(()=>{if(d&&typeof o=="function"){o(i,n);return}m(n)},[n,o,m,d,i]);return s.jsx(th,{active:e,disabled:d,label:h,onClick:()=>_(),size:c?"x-small":"small",value:n})};rh.displayName="ProductCard.SizeSelector.SkuItem";const nh=({items:e,getLabel:t,PLP_SIZE_ORDER:r})=>Array.isArray(e)?[...e].sort((n,o)=>{const i=t(n).toUpperCase(),c=t(o).toUpperCase(),l=r.indexOf(i)-r.indexOf(c);return l!==0?l:i.localeCompare(c,"pt-BR")}):[],sh=({callback:e,className:t="",children:r,setNotify:n,PLP_SIZE_ORDER:o,...i})=>{const{isMobile:c,item:{isVariantOf:{hasVariant:l}},selectedSku:u}=Gt(),d=j.useMemo(()=>Array.isArray(l)?nh({items:l,getLabel:h=>U.getSKUName(h,"tamanho"),PLP_SIZE_ORDER:o}):[],[l]);return s.jsxs("div",{...i,className:p.helpers.classNameConcat(mt["product-card--selectors--size"],t),"data-mobile":c,children:[s.jsx("div",{className:mt["product-card--selectors--size--skus"],children:d.map((h,m)=>s.jsx(rh,{active:u===h,callback:e,item:h,selectedSku:u,setNotify:n},`size--${m}--${h.sku}`))}),s.jsx("div",{className:mt["product-card--selectors--size--button"],children:r})]})};sh.displayName="ProductCard.SizeSelector";const qa=({alt:e="",callback:t,more:r,total:n=4,src:o,url:i,...c})=>s.jsxs(p.ToggleStyle.Wrapper,{...c,onClick:()=>{typeof t=="function"&&t(i)},children:[s.jsx(p.ToggleStyle.DisabledAdornment,{}),s.jsxs(p.ToggleStyle.Texture,{children:[o&&s.jsx(at.Image,{alt:e??o,src:o,height:34,width:34}),r&&s.jsx(p.TextStructure.DivWrapper,{className:mt["product-card--selectors--style--more"],children:s.jsxs("p",{children:["+ ",n]})})]})]}),Zx=({children:e,callback:t,data:r,total:n=4,size:o,...i})=>{const{index:c}=Gt(),{triggerSelectItemEventRef:l}=Ee();return s.jsxs("div",{...i,children:[e,Array.isArray(r)&&r.slice(0,n).map((u,d)=>s.jsx(qa,{callback:h=>{l.current.trigger=!0,l.current.index=c,typeof t=="function"&&t(h)},src:(u==null?void 0:u.textureImage)??"",alt:u==null?void 0:u.textureAlt,url:u==null?void 0:u.slug,size:o},d)),Array.isArray(r)&&(r==null?void 0:r.length)>n&&s.jsx(qa,{size:o,total:r.length-n,more:!0})]})},oh=({callback:e,className:t,data:r,images:n=[],findTexture:o,...i})=>{const{CONSTANTS:c}=Gt(),l=o||c.TEXTURE_IMAGE,u=n==null?void 0:n.find(d=>l.includes(d.alternateName));return s.jsx(Zx,{...i,callback:e,className:p.helpers.classNameConcat(mt["product-card--selectors--style"],t),data:r,size:"x-small",children:u&&s.jsx(qa,{active:!0,size:"x-small",src:u.url})})};oh.displayName="ProductCard.StyleSelector";const ih=({className:e,hasDecimal:t,...r})=>{const{isMobile:n,item:{offers:{lowPrice:o,highPrice:i},installments:{count:c,value:l}},eventDataRef:u}=Gt();u.current.priceInfo={price:o,listPrice:i};const d=U.formatPriceToCurrency(i,t),h=U.formatPriceToCurrency(o,t),m=U.formatPriceToCurrency(l??0),_=n?"horizontal":"stacked";return s.jsx("div",{...r,className:p.helpers.classNameConcat(mt["product-card--price"],e),"data-mobile":n,children:s.jsx(p.ProductInfo.Root,{size:"small",layout:_,children:s.jsxs(p.ProductInfo.Wrapper,{size:"small",layout:_,children:[s.jsx(p.ProductInfo.ValuesWrapper,{children:h!==d?s.jsxs(s.Fragment,{children:[s.jsx(p.ProductInfo.Price,{label:"originalPrice",value:d,size:"small"}),s.jsx(p.ProductInfo.Price,{label:"discountPrice",value:h,size:"small"})]}):s.jsx(p.ProductInfo.Price,{label:"defaultPrice",value:h,size:"small"})}),c&&c>1&&l?s.jsx(p.ProductInfo.Price,{label:"installment",value:`${c}x ${m}`,size:"small"}):null]})})})};ih.displayName="ProductCard.Price";const ah=({tag:e,className:t})=>{const{item:{name:r}}=Gt();return s.jsxs("div",{className:p.helpers.classNameConcat(mt["product-card--title"],t),children:[s.jsx("div",{className:mt["product-card--title--tag"],children:e?s.jsx(p.Tag,{size:"small",title:e.value,variant:"quaternary",adornment:{start:e.enableIcon&&e.icon?s.jsx(p.Icon,{name:e.icon,style:{color:e.iconColor}}):null},style:{background:e.tagColor,color:e.textColor},children:e.value}):s.jsx("div",{})}),s.jsx("div",{className:mt["product-card--title--content"],children:r&&s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h3",{children:r})})})})]})};ah.displayName="ProductCard.Title";const ch=({className:e,url:t,poster:r,...n})=>{const{element:o}=Gt();return j.useEffect(()=>{if(!(o!=null&&o.current))return;const i=o.current,c=i.querySelector("video");if(c){const l=new IntersectionObserver(h=>{h.forEach(m=>{U.setVideoPlay(m.isIntersecting,c,t)})},{root:null,rootMargin:"0px",threshold:.5}),u=()=>{c.setAttribute("data-loaded","true")},d=()=>{i&&(l.observe(i),c.addEventListener("loadeddata",u))};return document.readyState==="complete"?d():window.addEventListener("load",d),()=>{l.disconnect(),window.removeEventListener("load",d)}}return()=>null},[t,o]),s.jsx("div",{...n,className:p.helpers.classNameConcat(mt["product-card--video"],e),children:t&&s.jsx(at.Video,{autoPlay:!1,muted:!0,loop:!0,preload:"none",playsInline:!0,poster:r})})};ch.displayName="ProductCard.Media.Video";const lh=({children:e,className:t,type:r,...n})=>s.jsx("div",{...n,className:p.helpers.classNameConcat(mt[`product-card--${r}`],t),children:e});lh.displayName="ProductCard.Wrapper";const Ue={Actions:kp,BuyButton:Mp,Header:Xp,Media:Jp,Root:eh,OutStock:Zp,Price:ih,SizeSelector:sh,StyleSelector:oh,Title:ah,Video:ch,Wrapper:lh},eb="_carousel_1egdv_1",tb="_shelf__container_1egdv_14",rb="_shelf_without_carousel_1egdv_34",nb="_card_container_1egdv_57",Mn={carousel:eb,"custom-controllers":"_custom-controllers_1egdv_5",shelf__container:tb,"controllers-arrows-bullets":"_controllers-arrows-bullets_1egdv_23",shelf_without_carousel:rb,card_container:nb},zu=({title:e})=>s.jsx("div",{className:Mn.shelf__container,children:e&&s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{children:[s.jsx("h2",{className:p.helpers.classNameConcat("typography-style-body-md",U.responsive["responsive-mobile-flex"]),children:e}),s.jsx("h2",{className:p.helpers.classNameConcat("typography-style-heading-md",U.responsive["responsive-desktop-flex"]),children:e})]})})}),sb=({children:e,ICONS:t,itemsPerPage:r,title:n})=>{const{isMobile:o}=xe(),i=r[o?"mobile":"desktop"],{initialize:c,controller:l,itemsStyles:u,pagination:d}=p.Carousel.useCarousel({itemsPerPage:i,gap:10,loop:!0,direction:"row"}),h=j.Children.toArray(e).length;return o||h>=4?s.jsxs(p.Carousel.Root,{innerRef:_=>{c(_)},className:Mn.carousel,children:[s.jsxs("div",{className:Mn["custom-controllers"],children:[n&&s.jsx(zu,{title:n}),i<h&&s.jsxs(p.Carousel.Controller,{className:Mn["controllers-arrows-bullets"],children:[s.jsxs(p.Carousel.Arrows,{children:[s.jsx(p.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.prevPage(),adornment:{start:s.jsx(p.Icon,{name:t.arrow_left})}}),s.jsx(p.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.nextPage(),adornment:{start:s.jsx(p.Icon,{name:t.arrow_right})}})]}),!o&&i>2&&s.jsx(p.Carousel.Bullets,{page:d.currentPage,total:d.totalPages,onBulletClick:_=>l==null?void 0:l.navigateTo(_)})]})]}),s.jsx(p.Carousel.Body,{children:j.Children.map(e,(_,g)=>s.jsx(p.Carousel.Item,{style:{...u,overflow:"hidden"},children:_},`${n}_${g}`))})]}):s.jsxs(s.Fragment,{children:[n&&s.jsx(zu,{title:n}),s.jsx("div",{className:Mn.shelf_without_carousel,children:e})]})},uh=({className:e,item:t,isMobile:r,size:n,shelfTitle:o,...i})=>{const c=j.useRef(null),{getAvailableProductTag:l}=jr(),{availability:{status:u}}=t,d=m=>{const _=m.filter(g=>!i.CONSTANTS.TEXTURE_IMAGE.includes(g.keywords));return r?_.splice(0,2):_},h=l(t.cluster.highlights);return s.jsx("div",{ref:c,className:Mn.card_container,children:s.jsxs(Ue.Root,{...i,item:{...t,image:d(t.image)},isMobile:r,size:r?"small":"medium",outStock:!u,shelfTitle:o,children:[s.jsx(Ue.Header,{product:t,tag:h==null?void 0:h.commercial}),s.jsx(Ue.Media,{}),s.jsxs(Ue.Wrapper,{type:"body",children:[s.jsx(Ue.Title,{tag:h==null?void 0:h.institucional}),s.jsx(Ue.Actions,{})]}),s.jsx(Ue.Wrapper,{type:"footer"})]})})};uh.displayName="ProductList.Card";const ws={Shelf:sb,Card:uh},dh=({CONSTANTS:e,inView:t,products:r,innerRef:n})=>{const o=j.useMemo(()=>vx(r),[r]),{isMobile:i}=xe(),{addItemsToCart:c}=Xe(),{sendDataLayerEvent:l}=Ee(),{getAvailableProductTag:u}=jr(),[d,h]=j.useState({totalPrice:0,products:{}}),m=()=>{const g=Object.values(d.products);c(g),l({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:g.map(v=>{const x=o.find(S=>S.node.id===v.productId);return x==null?void 0:x.node})},supportData:{selectedSkus:g,price:d.totalPrice}}})},_=({selectedProduct:g,productId:v})=>{const x=xx({selectedProduct:g,productId:v,prevState:d,mainSellerId:e.StoreConfig_MainSellerId});h(x)};return j.useEffect(()=>{if(!t||o.length===0)return;const g=e.BUY_PACKAGE.header.title;l({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o},customData:{item_list_name:g},outsideEcommerceData:{item_list_name:g}}})},[t]),s.jsxs("div",{className:Tr.container,ref:n,children:[s.jsx("div",{className:Tr["carousel-container"],style:{width:o.length<=3?"max-content":"75%"},children:s.jsx(ws.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:g},v)=>{var w,P,I;const x=u(g.cluster.highlights),{availability:{status:S}}=g;return S?s.jsxs(Ue.Root,{item:{...g,image:Pc.helpers.product.getFirstImages({images:g.image,label:{first:e.MAIN_IMAGE,second:e.SECOND_IMAGE}})},isMobile:i,size:"medium",index:v,shelfTitle:e.BUY_PACKAGE.header.title,CONSTANTS:e,children:[s.jsx(Ue.Header,{product:g,tag:x.commercial}),s.jsx(Ue.Media,{}),s.jsxs(Ue.Wrapper,{type:"body",children:[s.jsx(Ue.Title,{tag:{value:(w=x.institucional)==null?void 0:w.value,enableIcon:(P=x.institucional)==null?void 0:P.enableIcon,icon:(I=x.institucional)==null?void 0:I.icon}}),s.jsx(Ue.Actions,{children:s.jsx(Ue.SizeSelector,{callback:C=>_({selectedProduct:C,productId:g.id}),PLP_SIZE_ORDER:e.PLP_SIZE_ORDER})})]})]},g.id):null})})}),s.jsx("div",{className:Tr["add-cart-container"],children:s.jsx(yx,{handleAddAllToCart:m,selectedProducts:d,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,BUY_PACKAGE:e.BUY_PACKAGE,FREIGHT_CALCULATION:e.FREIGHT_CALCULATION}})})]})},Dc={"btn-login":"_btn-login_yas63_12","btn-header":"_btn-header_yas63_22","header-animation":"_header-animation_yas63_35"},Fc=({id:e})=>{const{setIsOpen:t,cartStore:{items:r}}=Xe(),{handleSelectContent:n}=Ee(),{CONSTANTS:o}=Ze(),i=r.reduce((c,l)=>c+(l.quantity??0),0);return s.jsx(p.Header.SupportItem,{onClick:()=>{t(!0),n({content:"header:minicart"})},id:e,children:s.jsxs(p.Badge.AutoPositioner,{children:[s.jsx(p.Badge.Count,{count:i,size:"medium",variant:"primary",style:{backgroundColor:"black",display:i>0?"flex":"none"}}),s.jsx(p.Icon,{name:o.header.ICONS.bag,size:"medium"})]})})};Fc.displayName="Header.Bag";const mn=({children:e,href:t,...r})=>t&&t!=="#"?s.jsx(Tt,{href:t.startsWith("/")?t:`/${t}`,...r,children:e}):e,fh=()=>{const{headerData:e}=Ze(),{handleSelectContent:t}=Ee(),{reset:r,updateValue:n}=ks(),o=i=>{i?n(i):r()};return s.jsx(p.Header.Categories,{children:Array.isArray(e.categories)&&e.categories.map((i,c)=>s.jsx(mn,{href:i.link,onMouseEnter:()=>o(i.submenuId),onFocus:()=>o(i.submenuId),children:s.jsx(p.Header.CategoryItem,{className:Dc["btn-header"],value:i.submenuId??null,adornment:{start:s.jsx(p.Icon,{name:i.iconStart}),end:s.jsx(p.Icon,{name:i.iconEnd})},style:{textWrap:"nowrap",gap:"0"},onClick:()=>{t({content:`header:${i.label}`})},children:i.label})},`category-${i.label}-${c}`))})};fh.displayName="Header.Categories";function ob(){const{handleSelectContent:e}=Ee(),{CONSTANTS:t}=Ze(),{setValue:r}=Ho();return s.jsx(p.Header.SupportItem,{onClick:()=>{r(!0),e({content:"header:search"})},children:s.jsx(p.Icon,{name:t.header.ICONS.search,size:"medium"})})}const ib={"menu-subcategories-container":"_menu-subcategories-container_a93cr_1"},ab={"observer-wrapper":"_observer-wrapper_r43gk_1"},Ko=({children:e,eventData:t,observerOptions:r,callBackWhenVisible:n,stopOnIntersection:o=!0,className:i,...c})=>{const l=j.useRef(null),u=dc(l,o,r),{sendDataLayerEvent:d}=Ee();return j.useEffect(()=>{u&&(typeof n=="function"&&n(),t&&d({...t}))},[u]),s.jsx("div",{...c,ref:l,className:p.helpers.classNameConcat(ab["observer-wrapper"],i),children:e})},ph=({thumbnails:e,category:t,isMobile:r=!0,callBack:n})=>{const{handleSelectPromotionEvent:o}=Ee(),i=50/e.length;return s.jsx("div",{className:ib["menu-subcategories-container"],children:e.map((c,l)=>{const u=r?c.srcMobile:c.srcDesk;if(!u)return null;const d={creative_name:"banner-menu",creative_slot:`banner-menu:${t}:${l+1}`,promotion_id:u,promotion_name:c.promotion_name};return s.jsx(Ko,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...d}}}},observerOptions:{delay:1e3},children:s.jsxs(Tt,{href:c.link??"#",onClick:()=>{typeof n=="function"&&n(),o({updatePromotionRef:!0,promotion:d})},children:[s.jsx(at.Image,{src:u,alt:c.label??u,width:500,height:500,sizes:`(max-width: 768px) 100vw, (max-width: 1023px) 75vw, ${i}vw`}),c.label&&s.jsx("p",{children:c.label})]})},`thumb-${c.label}-${l}`)})})};ph.displayName="Menu.Thumbnail";const To={"menu-desktop":"_menu-desktop_c3fq0_1","menu-categories":"_menu-categories_c3fq0_12","menu-categories--see-all":"_menu-categories--see-all_c3fq0_30"},hh=({children:e,dividerOnRight:t=!0,subMenu:r,...n})=>{var u;const{router:o}=Ae(),{reset:i}=ks(),{handleSelectContent:c}=Ee(),{CONSTANTS:l}=Ze();return s.jsxs("div",{...n,className:To["menu-categories"],children:[(u=r==null?void 0:r.subCategories)==null?void 0:u.map((d,h)=>{var g,v,x,S;const m=d.listCollapseDesk&&!((g=d.see_all)!=null&&g.link)?{expandAfterRowsQty:d.rowsToShowDesk}:{},_=d.listCollapseDesk&&!((v=d.see_all)!=null&&v.link)?{expansivesAdornments:{open:l.header.ICONS.add,close:l.header.ICONS.minus},expansivesLabels:{open:l.header.COMPONENT_LIST.listExpandLabel,close:l.header.COMPONENT_LIST.listCollapseLabel},iconSize:"x-small"}:"";return s.jsxs(p.ComponentList.Structure,{children:[s.jsx(mn,{href:d.linkLabel,title:d.label,onClick:()=>{d.linkLabel&&(i(),c({content:`menu:${d.label??""}:${r.label??""}`}))},children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h2",{children:d.label})})})}),s.jsx(p.ComponentList.List,{columns:1,...m,className:To["submenu-categories"],children:(x=d.items)==null?void 0:x.map((w,P)=>s.jsx(p.ComponentList.ListItem,{id:`list-item-${w.label}-${P}`,children:s.jsx(wt,{href:w.link??"#",size:"x-small",title:w.label??"",disableUnderline:!0,disablePadding:!0,onClick:()=>{i(),c({content:`menu:${d.label??""}:${w.label??""}:${r.label??""}`})},children:w.label})},`list-item-${w.label}-${P}`))}),((S=d.see_all)==null?void 0:S.link)&&s.jsx(mn,{href:d.see_all.link,title:d.see_all.link,onClick:()=>{var w;(w=d.see_all)!=null&&w.link&&(i(),c({content:`menu:${d.label??""}:${r.label}`}),o.push(d.see_all.link))},children:s.jsx(p.TextStructure.Root,{..._,children:s.jsxs("span",{className:To["menu-categories--see-all"],children:[d.see_all.link&&d.see_all.label,s.jsx(p.Icon,{name:l.header.ICONS.arrow_right,size:"small"})]})})})]},`list-${d.label}-${h}`)}),t&&s.jsx(p.Utils.Divider,{size:"small",direction:"vertical"})]})};hh.displayName="Menu.Categories";const mh=({children:e,dividerOnBottom:t=!0,...r})=>{const{CONSTANTS:n}=Ze();return s.jsxs(s.Fragment,{children:[s.jsx("div",{...r,className:To["menu-desktop"],style:{...r.style,justifyContent:n.header.ALIGNMENT_MENU},children:e}),t&&s.jsx(p.Utils.Divider,{size:"small"})]})};mh.displayName="Menu.MenuRoot";const Yi={Root:mh,Categories:hh,Thumbnail:ph},_h=()=>{const{headerData:e,CONSTANTS:t}=Ze(),r=of(),{reset:n}=ks();return s.jsx(p.Header.SubMenu,{className:"header-desktop-submenu",children:Array.isArray(e.subMenus)&&e.subMenus.map((o,i)=>{const{thumbnails:c,label:l,id:u}=o,d=u===r,h=c==null?void 0:c.some(m=>!!m.srcDesk);return s.jsxs(Yi.Root,{id:u,style:d?{display:"flex",zIndex:t.header.Z_INDEX_WAR.menu_desktop}:{display:"none"},dividerOnBottom:d,children:[s.jsx(Yi.Categories,{dividerOnRight:!!h,subMenu:o}),Array.isArray(c)&&s.jsx(Yi.Thumbnail,{thumbnails:c,isMobile:!1,category:l,callBack:n})]},`submenu-${u}-${i}`)})})};_h.displayName="Header.SubMenu";const gh=()=>{const{handleSelectContent:e}=Ee(),{CONSTANTS:t}=Ze();return s.jsx(Tt,{href:"/favoritos",children:s.jsx(p.Header.SupportItem,{onClick:()=>e({content:"header:wishlist"}),children:s.jsx(p.Icon,{name:t.header.ICONS.favorite_false,size:"medium"})})})};gh.displayName="Header.WishList";const cb="_root_im5yf_125",$t={"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:cb},yh=({className:e,children:t,...r})=>s.jsx("div",{...r,className:p.helpers.classNameConcat($t["user-menu--content"],e),children:t});yh.displayName="UserMenu.Content";var vh=(e=>(e.Account="account",e))(vh||{});const xh=({className:e,cashBack:t,credits:r,link:n,total:o,...i})=>{const c=t?U.formatPriceToCurrency(t):void 0,l=r?U.formatPriceToCurrency(r):void 0,u=o?U.formatPriceToCurrency(o):void 0;return s.jsx(p.Credits.Account,{...i,className:p.helpers.classNameConcat($t["user-menu--credits"],e),icon:"wallet",showIcon:!0,cashBackValue:c,creditsValue:l,linkMore:n,totalValue:u,type:vh.Account})};xh.displayName="UserMenu.Credits";const bh=({className:e,children:t,description:r,text:n,...o})=>{const{isMobile:i}=xe();return s.jsx("div",{...o,className:p.helpers.classNameConcat($t["user-menu--login"],e),"data-mobile":i,children:s.jsxs("div",{className:$t["user-menu--login--content"],children:[s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:[s.jsx("h3",{className:"typography-style-body-lg-strong",children:n}),s.jsx("p",{children:r})]})}),t]})})};bh.displayName="UserMenu.Login";const jh=({className:e,isLogged:t,onLogoutClick:r,storeConfig:n,isMobile:o,LOGOUT_TEXT:i,LOGOUT_ICON:c,LOGIN_MENU_OPTIONS_ARRAY:l})=>{const u=o?l:l.filter(d=>d.deviceShown==="both"||d.deviceShown===(o?"mobile":"desktop"));return s.jsxs("ul",{className:p.helpers.classNameConcat($t["user-menu--menu"],e),children:[Array.isArray(u)&&u.map((d,h)=>s.jsx("li",{children:s.jsx(wt,{href:d.href??"#",size:"small",disableUnderline:!0,adornments:{start:s.jsx(p.Icon,{name:d.icon??"delete"})},children:d.label})},h)),t?s.jsx("li",{children:s.jsx(wt,{href:`${n.secureSubdomain}/api/vtexid/pub/logout?scope=mariafilo&returnUrl=${encodeURIComponent(`${n.storeUrl}`)}`,size:"small",disableUnderline:!0,onClick:r,adornments:{start:s.jsx(p.Icon,{name:c})},children:i})}):s.jsx(s.Fragment,{})]})};jh.displayName="UserMenu.Menu";const Sh=e=>{const t=j.useRef(null),r=j.useCallback(i=>{t.current&&!t.current.contains(i.target)&&e()},[e]),n=j.useCallback(i=>{t.current&&!t.current.contains(i.target)&&e()},[e]),o=j.useCallback(i=>{i.key==="Escape"&&e()},[e]);return j.useEffect(()=>(document.addEventListener("mousedown",r),document.addEventListener("keydown",o),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("keydown",o),document.removeEventListener("touchstart",n)}),[r,o,n]),{ref:t}},lb=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},ub=(e,t,r)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const{height:n,left:o,top:i,width:c}=t.getBoundingClientRect(),l=e.getBoundingClientRect(),u=e!=null&&e.parentElement?lb(e==null?void 0:e.parentElement):0;return{left:o+c/2-(l.width+u*2),top:i+n+r}},Ch=j.createContext({}),db=({children:e,delay:t=600,gap:r=20,isOpen:n,setIsOpen:o,target:i,...c})=>{const l=j.useRef(null),[u,d]=j.useState(!1),[h,m]=j.useState({left:0,top:0}),{ref:_}=Sh(()=>{d(!0),typeof window<"u"&&(l.current=window.setTimeout(()=>{o(!1),d(!1)},t))});return j.useEffect(()=>{if(i&&(_!=null&&_.current)){const{left:g,top:v}=ub(_.current,i,r??0);m({left:g,top:v}),d(!1)}},[r,n,i,_]),s.jsx(Ch.Provider,{value:j.useMemo(()=>({...c,...h,contentRef:_,isLeaving:u,isOpen:n,setIsOpen:o,setIsLeaving:d,target:i}),[c,h,_,u,n,o,d,i]),children:e})},wh=()=>{const e=j.useContext(Ch);if(e===void 0)throw new Error("useUserMenuContext must be used within a UserMenuProvider");return e},Eh=({children:e,isMobile:t=!1,Z_INDEX_WAR:r})=>{const{isOpen:n,setIsOpen:o}=wh();return s.jsxs(p.Modal.Root,{"data-user":"user-menu--modal",isMobile:t??!1,isOpen:n,setIsOpen:o,variant:"sideBottom",className:$t["modal-root-modifier"],style:{zIndex:r.user_menu_mobile},children:[s.jsx(p.Modal.Header,{navigation:"top",className:$t["modal-header-modifier"],children:s.jsx(p.Modal.Controls,{navigation:"top",isMobile:!0,className:$t["modal-controls-modifier"]})}),s.jsx(p.Modal.Body,{children:e})]})};Eh.displayName="UserMenu.Modal";const Ih=({children:e,component:t,Z_INDEX_WAR:r,isMobile:n,...o})=>s.jsx(db,{...o,className:$t.root,children:n?s.jsxs(s.Fragment,{children:[s.jsx(Rr.Modal,{Z_INDEX_WAR:r,children:t}),e]}):s.jsx(Rr.Tooltip,{component:t,style:{width:304,zIndex:r.user_menu},Z_INDEX_WAR:r,children:e})});Ih.displayName="UserMenu.Root";const Ph=({children:e,component:t,Z_INDEX_WAR:r,...n})=>{const{contentRef:o,left:i,isLeaving:c,isOpen:l,top:u}=wh();return s.jsx(p.Tooltip.Root,{arrow:"top-right",component:s.jsx("div",{...n,ref:o,children:t}),className:p.helpers.classNameConcat($t["user-menu--tooltip"],$t["tooltip-modifier"]),isLeaving:c,isOpen:l,left:i,size:"medium",position:"top",top:u,style:{zIndex:r.user_menu},children:s.jsx("div",{className:$t["user-menu--tooltip"],children:e})})};Ph.displayName="UserMenu.Tooltip";const Rr={Credits:xh,Content:yh,Login:bh,Menu:jh,Modal:Eh,Root:Ih,Tooltip:Ph},Qo=({children:e,isOpen:t,setIsOpen:r,desktopUserMenuTarget:n,mobileUserMenuTarget:o,storeConfig:i})=>{var g,v,x;const{isMobile:c}=xe(),{CONSTANTS:l}=Ze(),u=rs(),d=()=>{window.location.href=`${i.secureSubdomain}/api/io/login?returnUrl=${encodeURIComponent(`${window.location.href}`)}`},h=!!((g=u.user)!=null&&g.userId),{cashback:m,credits:_}=j.useMemo(()=>{var S,w;return{credits:((S=u==null?void 0:u.getCurrentCredits())==null?void 0:S.credits)??0,cashback:((w=u==null?void 0:u.getCurrentCredits())==null?void 0:w.cashback)??0}},[u]);return s.jsx(Rr.Root,{component:s.jsxs(Rr.Content,{children:[s.jsx(Rr.Login,{description:l.session.LOGIN_MENU_DESCRIPTION(h),text:l.session.LOGIN_MENU_TITLE(h,((v=u==null?void 0:u.user)==null?void 0:v.firstName)??((x=u==null?void 0:u.user)==null?void 0:x.email)),children:!h&&s.jsx(p.Button,{id:"conta",size:"medium",variant:"quaternary",onClick:()=>d(),children:l.header.MENU_INFO.login.button_text})}),_+m&&h?s.jsx(Rr.Credits,{credits:_,cashBack:m,link:`${i.secureSubdomain}/account#/meus-creditos`,total:_+m}):s.jsx(s.Fragment,{}),s.jsx(p.Utils.Divider,{}),s.jsx(Rr.Menu,{ICONS:l.header.ICONS,storeConfig:i,isLogged:h,className:U.responsive["responsive-desktop-flex"],onLogoutClick:()=>u.logout(),LOGOUT_TEXT:l.session.LOGOUT_TEXT,LOGOUT_ICON:l.session.LOGOUT_ICON,LOGIN_MENU_OPTIONS_ARRAY:l.session.LOGIN_MENU_OPTIONS_ARRAY}),s.jsx(Rr.Menu,{ICONS:l.header.ICONS,storeConfig:i,isMobile:!0,isLogged:h,className:U.responsive["responsive-mobile-flex"],onLogoutClick:()=>u.logout(),LOGOUT_TEXT:l.session.LOGOUT_TEXT,LOGOUT_ICON:l.session.LOGOUT_ICON,LOGIN_MENU_OPTIONS_ARRAY:l.session.LOGIN_MENU_OPTIONS_ARRAY})]}),isOpen:t,isMobile:c,setIsOpen:r,target:c?o:n,Z_INDEX_WAR:l.header.Z_INDEX_WAR,children:e})};Qo.displayName="UserMenu";const Nh=({storeConfig:e})=>{const{CONSTANTS:t}=Ze(),{handleSelectContent:r}=Ee(),{reset:n}=ks(),{setValue:o}=mc(),i=hc(),c=j.useRef(null);return s.jsxs(s.Fragment,{children:[s.jsxs(p.Header.Wrapper,{className:"header-desktop-wrapper",children:[s.jsx(p.Header.Logo,{style:{width:"100%"},children:s.jsx(Tt,{href:"/",onMouseEnter:n,children:s.jsx(p.Icon,{name:t.header.ICONS.logo,onClick:()=>{r({content:"header:logo"})}})})}),s.jsx(fh,{}),s.jsxs(p.Header.Support,{onMouseEnter:n,style:{justifyContent:"flex-end"},children:[s.jsx(ob,{}),s.jsx(Qo,{isOpen:i,setIsOpen:o,desktopUserMenuTarget:c.current,storeConfig:e,children:s.jsx(p.Header.SupportItem,{onClick:()=>{o(!0),r({content:"header:user_menu"})},className:Dc["btn-login"],innerRef:c,children:s.jsx(p.Icon,{name:t.header.ICONS.person,size:"medium"})})}),s.jsx(gh,{}),s.jsx(Fc,{id:"cart-button"})]})]}),s.jsx(_h,{})]})};Nh.displayName="Header.HeaderDesktopWrapper";const Rt={"menu--banners":"_menu--banners_1cg51_1","menu--banners--item":"_menu--banners--item_1cg51_6","menu--banners--item--text":"_menu--banners--item--text_1cg51_17","menu--banners--list":"_menu--banners--list_1cg51_21","menu--dummy-close":"_menu--dummy-close_1cg51_46","menu--body":"_menu--body_1cg51_54","menu--categories":"_menu--categories_1cg51_67","menu--categories--title":"_menu--categories--title_1cg51_80","menu--categories--see-all":"_menu--categories--see-all_1cg51_92","menu--step":"_menu--step_1cg51_101","menu--sub-category":"_menu--sub-category_1cg51_117","menu--sub-category--item":"_menu--sub-category--item_1cg51_124","menu--sub-category--list":"_menu--sub-category--list_1cg51_130"},Rh=({children:e,mobileBannerAlt:t,mobileBannerSrc:r,textColor:n,submenuId:o,label:i,...c})=>s.jsx("button",{...c,className:Rt["menu--banners--item"],children:r?s.jsxs(p.Banner.Container,{children:[s.jsx(p.Banner.ImageWrapper,{children:s.jsx(at.Image,{alt:t??r,height:128,src:r,width:343,unoptimized:!0})}),s.jsx(p.Banner.Slot,{verticalAlignment:"end",horizontalAlignment:"center",children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:Rt["menu--banners--item--text"],children:s.jsx("h2",{className:"typography-style-body-xs",style:n?{color:n}:{},children:e})})})})]}):s.jsx("h2",{...c,children:e})});Rh.displayName="Menu.Mobile.Category";const Th=({label:e,...t})=>{const{CONSTANTS:r}=Ze();return s.jsx(p.Button,{...t,adornment:{end:s.jsx(p.Icon,{name:r.header.ICONS.arrow_right,size:"medium"})},mode:"inverse",size:"medium",variant:"primary",children:e})};Th.displayName="Menu.Mobile.Body.Category";const Oh=({subCategory:e,submenuLabel:t,onHandleOut:r,...n})=>s.jsx("div",{...n,className:Rt["menu--sub-category--list"],children:Array.isArray(e==null?void 0:e.items)&&(e==null?void 0:e.items.map((o,i)=>s.jsx(wt,{disableUnderline:!0,disablePadding:!1,href:o.link??"#",onClick:()=>r(o.label,t),size:"medium",title:o.label??"",children:o.label},i)))});Oh.displayName="Menu.Mobile.List";const Ah=({current:e,onHandleOut:t})=>{var r;return e?s.jsx("div",{className:Rt["menu--sub-category"],children:Array.isArray(e==null?void 0:e.subCategories)&&((r=e==null?void 0:e.subCategories)==null?void 0:r.map((n,o)=>s.jsxs("div",{className:Rt["menu--sub-category--item"],children:[s.jsx(xs.Title,{onHandleOut:t,subCategory:n,submenuLabel:e==null?void 0:e.id}),s.jsx(xs.List,{onHandleOut:t,subCategory:n,submenuLabel:e==null?void 0:e.id})]},o)))}):s.jsx(s.Fragment,{})};Ah.displayName="Menu.Mobile.Body.SubCategory";const kh=({subCategory:e,submenuLabel:t,onHandleOut:r,...n})=>{var l;const{router:o}=Ae(),{handleSelectContent:i}=Ee(),{CONSTANTS:c}=Ze();return s.jsxs("div",{...n,className:Rt["menu--categories--title"],children:[s.jsx(mn,{href:e==null?void 0:e.linkLabel,title:e==null?void 0:e.linkLabel,onClick:()=>{i({content:`menu:${e.label??""}:${t}`})},children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h2",{className:"typography-style-body-md",style:e!=null&&e.linkLabel?{cursor:"pointer"}:void 0,children:e==null?void 0:e.label})})})}),((l=e==null?void 0:e.see_all)==null?void 0:l.link)&&s.jsx(mn,{href:e.see_all.link,title:e.see_all.link,onClick:()=>{var u;r(e.label,t),(u=e==null?void 0:e.see_all)!=null&&u.link&&o.push(e.see_all.link)},children:s.jsx(p.TextStructure.Root,{children:s.jsxs("span",{className:Rt["menu--categories--see-all"],children:[e.see_all.label,s.jsx(p.Icon,{name:c.header.ICONS.arrow_right,size:"small"})]})})})]})};kh.displayName="Menu.Mobile";const xs={Banner:Rh,Category:Th,List:Oh,SubCategory:Ah,Title:kh},Mh=j.createContext({}),fb=({children:e})=>{const[t,r]=j.useState(null),n=j.useCallback(()=>{r(null)},[]),o=i=>{i!==t&&r(i)};return s.jsx(Mh.Provider,{value:{currentCategory:t,setCurrentCategory:r,handleCloseMenu:n,handleChangeSubMenuOpened:o},children:e})},Lh=()=>j.useContext(Mh),Dh=e=>{const{router:t}=Ae(),{headerData:r}=Ze(),{handleSelectContent:n}=Ee(),{currentCategory:o,setCurrentCategory:i}=Lh(),c=j.useRef(null),l=()=>{if(c.current){const g=c.current;g&&(i(null),g==null||g.click())}},u=(g,v)=>{n({content:`menu:${g}`}),t.push(v),l()},d=(g,v)=>{n({content:`menu:${g}:${v}`}),l()},h=Array.isArray(r==null?void 0:r.categories)?r==null?void 0:r.categories:[],m=Array.isArray(r==null?void 0:r.subMenus)?r==null?void 0:r.subMenus:[],_=g=>{g.submenuId?i(g.submenuId):u(g.label,g.link)};return s.jsxs("div",{...e,className:Rt["menu--body"],style:{transform:`translate3d(calc(-100% * ${o?1:0}), 0px, 0px)`},children:[s.jsx("button",{className:Rt["menu--dummy-close"],ref:c,"data-close":!0}),s.jsxs("div",{className:Rt["menu--step"],"data-active":"true",children:[s.jsx("div",{className:Rt["menu--banners"],children:s.jsx("div",{className:Rt["menu--banners--list"],children:h.map((g,v)=>j.createElement(xs.Banner,{...g,key:v,onClick:()=>u(g.label,g.link)},g.mobileBannerAlt))})}),s.jsx("div",{className:Rt["menu--categories"],children:h.map((g,v)=>s.jsx(xs.Category,{label:g.label,onClick:()=>_(g)},v))})]}),s.jsx("div",{className:Rt["menu--step"],"data-active":!!o,children:s.jsx(xs.SubCategory,{current:m.find(g=>g.id===o),onHandleOut:d})})]})};Dh.displayName="Menu.Mobile.Body";const pb={"menu--header":"_menu--header_1ozdf_1"},Fh=()=>{var o;const{headerData:e}=Ze(),{currentCategory:t,setCurrentCategory:r}=Lh(),n=(o=e==null?void 0:e.categories)==null?void 0:o.find(i=>i.submenuId===t);return s.jsxs("div",{className:pb["menu--header"],children:[s.jsx(p.Button,{"data-out":!n,iconNameStart:"arrow-left",mode:"inverse",onClick:()=>r(null)}),n&&s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{alignContent:"center",children:s.jsx("h2",{className:"typography-style-body-lg",children:n==null?void 0:n.label})})}),s.jsx(p.Button,{iconNameStart:"close","data-close":!0,"data-only":!n,mode:"inverse",onClick:()=>r(null)})]})};Fh.displayName="Menu.Mobile.Header";var Ba={exports:{}};function hb(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 Xi={},Ji={},qu;function mb(){return qu||(qu=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"LoadableContext",{enumerable:!0,get:function(){return n}});const n=Ct._(j).default.createContext(null);process.env.NODE_ENV!=="production"&&(n.displayName="LoadableContext")}(Ji)),Ji}var Bu;function _b(){return Bu||(Bu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return g}});const r=Ct._(j),n=mb();function o(v){return v&&v.default?v.default:v}const i=[],c=[];let l=!1;function u(v){let x=v(),S={loading:!0,loaded:null,error:null};return S.promise=x.then(w=>(S.loading=!1,S.loaded=w,w)).catch(w=>{throw S.loading=!1,S.error=w,w}),S}function d(v,x){let S=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},x),w=null;function P(){if(!w){const N=new h(v,S);w={getCurrentValue:N.getCurrentValue.bind(N),subscribe:N.subscribe.bind(N),retry:N.retry.bind(N),promise:N.promise.bind(N)}}return w.promise()}if(typeof window>"u"&&i.push(P),!l&&typeof window<"u"){const N=S.webpack&&typeof hb.resolveWeak=="function"?S.webpack():S.modules;N&&c.push(T=>{for(const O of N)if(T.includes(O))return P()})}function I(){P();const N=r.default.useContext(n.LoadableContext);N&&Array.isArray(S.modules)&&S.modules.forEach(T=>{N(T)})}function C(N,T){I();const O=r.default.useSyncExternalStore(w.subscribe,w.getCurrentValue,w.getCurrentValue);return r.default.useImperativeHandle(T,()=>({retry:w.retry}),[]),r.default.useMemo(()=>O.loading||O.error?r.default.createElement(S.loading,{isLoading:O.loading,pastDelay:O.pastDelay,timedOut:O.timedOut,error:O.error,retry:w.retry}):O.loaded?r.default.createElement(o(O.loaded),N):null,[N,O])}return C.preload=()=>P(),C.displayName="LoadableComponent",r.default.forwardRef(C)}class h{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};const{_res:x,_opts:S}=this;x.loading&&(typeof S.delay=="number"&&(S.delay===0?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},S.delay)),typeof S.timeout=="number"&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},S.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(w=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(x){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...x},this._callbacks.forEach(S=>S())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(x){return this._callbacks.add(x),()=>{this._callbacks.delete(x)}}constructor(x,S){this._loadFn=x,this._opts=S,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function m(v){return d(u,v)}function _(v,x){let S=[];for(;v.length;){let w=v.pop();S.push(w(x))}return Promise.all(S).then(()=>{if(v.length)return _(v,x)})}m.preloadAll=()=>new Promise((v,x)=>{_(i).then(v,x)}),m.preloadReady=v=>(v===void 0&&(v=[]),new Promise(x=>{const S=()=>(l=!0,x());_(c,v).then(S,S)})),typeof window<"u"&&(window.__NEXT_PRELOADREADY=m.preloadReady);const g=m}(Xi)),Xi}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(h,m){for(var _ in m)Object.defineProperty(h,_,{enumerable:!0,get:m[_]})}r(t,{default:function(){return d},noSSR:function(){return u}});const n=Ct,o=s,i=n._(_b()),c=typeof window>"u";function l(h){return{default:(h==null?void 0:h.default)||h}}function u(h,m){if(delete m.webpack,delete m.modules,!c)return h(m);const _=m.loading;return()=>(0,o.jsx)(_,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}function d(h,m){let _=i.default,g={loading:S=>{let{error:w,isLoading:P,pastDelay:I}=S;if(!I)return null;if(process.env.NODE_ENV!=="production"){if(P)return null;if(w)return(0,o.jsxs)("p",{children:[w.message,(0,o.jsx)("br",{}),w.stack]})}return null}};h instanceof Promise?g.loader=()=>h:typeof h=="function"?g.loader=h:typeof h=="object"&&(g={...g,...h}),g={...g,...m};const v=g.loader,x=()=>v!=null?v().then(l):Promise.resolve(l(()=>null));return g.loadableGenerated&&(g={...g,...g.loadableGenerated},delete g.loadableGenerated),typeof g.ssr=="boolean"&&!g.ssr?(delete g.webpack,delete g.modules,u(_,g)):_({...g,loader: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)})(Ba,Ba.exports);var gb=Ba.exports,yb=gb;const zh=U.getDefaultExportFromCjs(yb),zo={"modal-modifier":"_modal-modifier_10zw4_1","menu--navigation-bar":"_menu--navigation-bar_10zw4_15","menu--root":"_menu--root_10zw4_26"},qh=({children:e})=>{const{menuIsOpen:t,setMenuIsOpen:r}=vc(),{CONSTANTS:n}=Ze();return s.jsxs(p.Modal.RootWithoutPortal,{className:p.helpers.classNameConcat(zo["modal-modifier"],"menu-mobile-root"),isOpen:t,setIsOpen:r,variant:"sideRight",style:{bottom:"unset",overflowY:"hidden",position:"fixed",top:0,zIndex:n.header.Z_INDEX_WAR.menu_mobile},children:[s.jsx(Fh,{}),s.jsx(p.Modal.Body,{className:zo["menu--root"],children:e})]})};qh.displayName="Menu.MenuRoot";const vb=zh(()=>Promise.resolve(qh),{ssr:!1}),Bh=({children:e,last:t=!1,...r})=>s.jsxs(s.Fragment,{children:[s.jsx(p.Button,{...r,"data-close":!0,size:"small",variant:"tertiary",children:e}),!t&&s.jsx(p.Utils.Divider,{direction:"vertical",size:"small",className:zo.divider})]});Bh.displayName="Menu.NavigationBarItem";const Uh=()=>{const{setUserMenuIsOpen:e}=vc(),{handleSelectContent:t}=Ee(),{CONSTANTS:r}=Ze(),{router:n}=Ae(),o=[{iconNameStart:r.header.ICONS.person,onClick:()=>{e(!0),t({content:"menu:user_menu"})},text:r.header.MENU_INFO.login.button_text},{iconNameStart:r.header.MENU_INFO.bag.button_icon,onClick:()=>{t({content:"menu:wishlist"}),n.push("/favoritos")},text:r.header.MENU_INFO.bag.button_text},{last:!0,iconNameStart:r.header.MENU_INFO.store.button_icon,onClick:()=>{t({content:"menu:store"}),n.push("/institucional/lojas")},text:r.header.MENU_INFO.store.button_text}];return s.jsx(p.Card,{id:"menu-navigationbar",shadow:!0,className:zo["menu--navigation-bar"],style:{zIndex:r.header.Z_INDEX_WAR.menu_mobile_navigation_bar},children:Array.isArray(o)&&o.map((i,c)=>j.createElement(Bh,{...i,key:c},i.text))})};Uh.displayName="Menu.NavigationBar";const Zi={Body:Dh,NavigationBar:Uh,Root:vb},Hh=({storeConfig:e})=>{const t=j.useRef(null),{CONSTANTS:r}=Ze(),{MENU_NAVIGATION_BAR_ALLOWED:n,ICONS:o}=r.header,{handleSelectContent:i}=Ee(),{setValue:c}=Ho(),{setValue:l}=lf(),{setValue:u}=mc(),d=hc(),h=cf(),{isMobile:m}=xe();return s.jsxs(s.Fragment,{children:[s.jsxs(p.Header.Wrapper,{className:"header-mobile-wrapper",children:[s.jsx(p.Header.Logo,{style:{width:"100%"},children:s.jsx(Tt,{href:"/",children:s.jsx(p.Icon,{name:o.logo,size:"x-large",onClick:()=>{i({content:"header:logo"})}})})}),s.jsxs(p.Header.Support,{children:[s.jsx(p.Header.SupportItem,{onClick:()=>{c(!0),i({content:"header:search"})},children:s.jsx(p.Icon,{name:o.search,size:"medium"})}),s.jsx(Fc,{}),s.jsxs(p.Header.SupportItem,{onClick:()=>l(!0),children:[s.jsx("span",{ref:t}),s.jsx(p.Icon,{name:o.menu,size:"medium"})]})]})]}),m&&s.jsx(Cf,{menuIsOpen:h,setMenuIsOpen:l,userMenuIsOpen:h,setUserMenuIsOpen:u,children:s.jsx(Qo,{storeConfig:e,isOpen:d,setIsOpen:u,mobileUserMenuTarget:t==null?void 0:t.current,children:s.jsxs(Zi.Root,{children:[s.jsx(Zi.Body,{}),n?s.jsx(Zi.NavigationBar,{}):s.jsx(s.Fragment,{})]})})})]})};Hh.displayName="Header.HeaderMobileWrapper";const xb=j.createContext({}),bb=({children:e})=>{const{sendDataLayerEvent:t}=Ee(),{cartStore:r,isOpen:n}=Xe();j.useEffect(()=>{n&&t({functionKey:"viewCartEvent",data:{commonData:{cartStore:r}}})},[n]),j.useEffect(()=>{var i,c,l;if(r.id&&!((c=(i=r.marketingData)==null?void 0:i.marketingTags)!=null&&c.includes("faststore"))){const{id:u}=r;U.proxyCartAPI("/_v/proxy/checkout/order-form/attachments/marketing-data",{body:{orderFormId:u,marketingData:{...r==null?void 0:r.marketingData,marketingTags:U.marketingTagsBuilder(((l=r.marketingData)==null?void 0:l.marketingTags)??[])}}}).catch(d=>{console.error(d)})}},[r]);const o=({cartItem:i,oldQuantity:c,newQuantity:l})=>{t({functionKey:"skuEvents",data:{event:c>l?"remove_from_cart":"add_to_cart",commonData:{products:[{...i,price:i.price/100,listPrice:i.listPrice/100}]},customData:{quantity:l},supportData:{selectedSkus:[i]}}})};return s.jsx(xb.Provider,{value:{handleUpdateItemQuantityEvent:o},children:e})},jb="var(--color-background-brand-primary-lighter)",Sb="_fadeInOut_1l5ow_1",Cb="_fadeOut_1l5ow_1",be={brandPrimaryLighter:jb,"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:Sb,fadeOut:Cb,"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"},$h=({item:{id:e,message:t,callback:r},removeNotification:n,ICONS:o})=>{const i=j.useRef(null),c=()=>{var u;(u=i.current)==null||u.setAttribute("data-animation-out","true")},l=u=>{n(u)};return s.jsx("div",{className:be["mc--notify--item"],ref:i,onAnimationEnd:()=>l(e),children:s.jsxs(p.SnackBar.Structure,{size:"medium",children:[s.jsx(p.SnackBar.Content,{title:t}),s.jsxs(p.SnackBar.Support,{children:[typeof r=="function"&&s.jsx(p.Button,{onClick:()=>{r(),c()},size:"small",variant:"tertiary",children:"Desfazer"}),s.jsx(p.Button,{iconNameStart:o.close,iconSize:"small",onClick:()=>c(),variant:"tertiary"})]})]})},e)};$h.displayName="MiniCart.Notify.Item";const Wh=({ICONS:e})=>{const t=fc(),{removeNotification:r}=pc(),n=t.length?[...t].sort((o,i)=>i.id-o.id):[];return n.length?s.jsx("div",{className:be["mc--notify"],children:s.jsx("div",{className:be["mc--notify--content"],children:Array.isArray(n)&&n.map(o=>s.jsx($h,{item:o,removeNotification:r,ICONS:e},o.id))})}):null};Wh.displayName="MiniCart.Notifications";const wb=({handleSendEvent:e,onHandleRemove:t,product:r,MINICART_CONFIG:n,...o})=>{const i=ts(),{toggleProduct:c}=xn(),{itemOffered:{isVariationOf:{productGroupID:l}},quantity:u}=r;return s.jsx(p.Button,{...o,adornment:{end:s.jsx(p.Icon,{name:`favorite-${i.includes(l)?"true":"false"}`,size:"small"})},onClick:()=>{c(l),i.includes(l)||t({texture:"mini-cart-wishlist",title:`${n.messages.add_wishlist}`},u,()=>c(l)),e(i.includes(l)?"remove_from_wishlist":"add_to_wishlist","productEvents")},children:n.messages.add_wishlist_button})},Vh=({handleSendEvent:e,product:t,ICONS:r,MINICART_CONFIG:n,...o})=>{const{addToCart:i,removeToCart:c}=Xe(),{bundleItems:l=[],id:u,uniqueId:d,seller:h,offerings:m,quantity:_}=t,g=(v,x,S)=>{c(u,v.title,()=>{typeof S=="function"&&S(),i({id:u,quantity:x,seller:h},{id:u,texture:v.texture},!0)})};return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:be["mc--card--actions--add-remove"],children:[n.has_wishlist_button&&s.jsx(wb,{...o,product:t,handleSendEvent:e,onHandleRemove:g,ICONS:r,MINICART_CONFIG:n}),s.jsx(p.Button,{...o,adornment:{end:s.jsx(p.Icon,{name:r.delete,size:"small"})},underline:!0,variant:"secondary",state:"danger",onClick:()=>{g({texture:"mini-cart",title:`${n.messages.remove}`},_),e("remove_from_cart","skuEvents")},children:n.messages.remove_button})]}),n.has_gift_option&&s.jsx(kn.Gift,{uniqueId:d,bundleItems:l,offerings:m,ICONS:r,MINICART_CONFIG:n})]})};Vh.displayName="MiniCart.Card.Actions";const Gh=({bundleItems:e,offerings:t,uniqueId:r,ICONS:n,MINICART_CONFIG:o})=>{const[i,c]=j.useState(!1),{toggleGiftItemCart:l}=Xe(),u=()=>{if(t instanceof Object&&Array.isArray(t)){const[m]=t;if(m){c(!0);const _=e.some(g=>g.id===m.id);l(r,String(m.id),_).then(()=>c(!1))}}},d=t[0],h=e.find(m=>m.id===d.id);return d&&"id"in d?s.jsx("div",{className:be["mc--card--actions--gift"],children:s.jsx(p.Checkbox,{adornment:s.jsx(p.Icon,{name:n.check}),checked:!!h,disabled:i,label:o.messages.giftPackage,onChange:u})}):null};Gh.displayName="MiniCart.Card.Gift";const Kh=({itemOffered:e})=>{const t=U.updatedResizedImg(e==null?void 0:e.image[0].url,{width:200,height:300});return s.jsx(Tt,{href:`${e==null?void 0:e.slug}`,className:be["mc--card--product-link"],children:s.jsx(at.Image,{alt:(e==null?void 0:e.image[0].alternateName)||"Produto",src:t||"",width:108,height:164,objectFit:"unset"})})};Kh.displayName="MiniCart.Card.Media";const Qh=({name:e,skuName:t,tagName:r,className:n})=>s.jsxs(s.Fragment,{children:[r&&s.jsx(p.Tag,{variant:"quaternary",title:r,style:{textTransform:"uppercase"},children:r}),s.jsx("p",{className:p.helpers.classNameConcat(be["mc--card--name"],n),children:U.getProductNameWithoutSku(e??"",t??"")})]});Qh.displayName="MiniCart.Card.Name";const Yh=({total:e,totalList:t})=>s.jsx(p.ProductInfo.Root,{children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:be["mc--card--price"],children:s.jsx(p.ProductInfo.Wrapper,{className:be["mc--card--price--details"],size:"small",layout:"horizontal",children:t&&e!==t?s.jsxs(s.Fragment,{children:[s.jsx(p.ProductInfo.Price,{label:"originalPrice",value:U.formatPriceToCurrency(t),size:"small"}),s.jsx(p.ProductInfo.Price,{label:"discountPrice",value:U.formatPriceToCurrency(e),size:"small"})]}):s.jsx(p.ProductInfo.Price,{label:"defaultPrice",value:U.formatPriceToCurrency(e),size:"small"})})})})});Yh.displayName="MiniCart.ProductPrice";const Xh=({product:e,TEXTURE_IMAGE:t,TOGGLE_STYLE_MODIFIER:r})=>{var d;const[n,o]=j.useState(""),i=j.useRef(null),{cartStore:{options:c}}=Xe(),l=e.itemOffered.isVariationOf.productGroupID,u=j.useCallback(()=>{var m;const h=(m=c==null?void 0:c.find(_=>_.id===l))==null?void 0:m.texture;if(h){o(h);return}U.fetchProxy("/_v/proxy/catalog/product/info",{method:"POST",body:JSON.stringify({ids:[l]})}).then(_=>_.json()).then(_=>{const g=_.data[0].items.find(v=>v.itemId===e.id);if(g){const v=g.images.find(x=>t.includes(x.imageLabel));if(v!=null&&v.imageUrl){o(v.imageUrl);return}o(g.images[0].imageUrl)}}).catch(_=>{console.error(_)})},[c,l,e.id]);return j.useEffect(()=>{if(!i.current)return;const h=new IntersectionObserver(m=>{m[0].isIntersecting&&u()});return h.observe(i.current),()=>{h.disconnect()}},[u]),s.jsx("div",{ref:i,children:s.jsx(p.ToggleStyle.Wrapper,{size:"small",style:r,children:s.jsx(p.ToggleStyle.Texture,{children:n?s.jsx(at.Image,{alt:((d=e.itemOffered)==null?void 0:d.image[0].alternateName)??"Produto",src:n,width:164,height:164,style:r}):s.jsx(jp,{})})})})};Xh.displayName="MiniCart.Card.Style";const Jh=({product:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,TEXTURE_IMAGE:n,TOGGLE_STYLE_MODIFIER:o})=>{const{size:i}=U.getColorAndSizeFromSkuName(e.itemOffered.skuName??"",r);return s.jsxs(p.Utils.Row,{alignItems:"center",children:[s.jsx(Xh,{product:e,TEXTURE_IMAGE:n,TOGGLE_STYLE_MODIFIER:o}),s.jsx(p.Utils.Divider,{direction:"vertical",size:"small",style:{height:24}}),i&&s.jsx(p.ToggleSize.Wrapper,{size:t.product_card.sku.size??"small",variation:t.product_card.sku.variation??"fill",className:be["mc-container-actions--toggle-size-modifier"],style:{backgroundColor:`${be.brandPrimaryLighter}`},children:s.jsx(p.ToggleSize.Text,{children:i})})]})};Jh.displayName="MiniCart.Card.Sku";const kn={Actions:Vh,Gift:Gh,Media:Kh,Name:Qh,Price:Yh,Sku:Jh},Eb=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}},Zh=({available:e=!0,index:t,product:r,ICONS:n,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:i,TEXTURE_IMAGE:c,TOGGLE_STYLE_MODIFIER:l})=>{var m,_;const{sendDataLayerEvent:u}=Ee(),d=Eb(r),h=(g,v)=>{const x={commonData:{...r,...d},customData:{index:t},event:g};if(v==="skuEvents"){const S={...r,...d};x.supportData={selectedSkus:[S]},x.commonData.products=[S]}u({functionKey:v,data:x})};return s.jsxs("div",{className:p.helpers.classNameConcat(be["mc--card"],e?"":be["mc--card--unavailable"]),children:[s.jsx(kn.Media,{itemOffered:r.itemOffered}),s.jsxs("div",{className:be["mc--card--content-info"],children:[s.jsx(kn.Name,{name:((m=r.itemOffered)==null?void 0:m.name)??"",skuName:(_=r.itemOffered)==null?void 0:_.skuName}),s.jsxs("div",{className:be["mc--card--details"],children:[s.jsx("div",{className:be["mc--card--actions"],children:e?s.jsx(kn.Price,{total:d.price,totalList:d.listPrice}):s.jsx(p.Tag,{variant:"secondary",size:"small",children:"Indisponível"})}),s.jsxs("div",{className:be["mc--card--actions--secondary"],children:[e&&s.jsx(kn.Sku,{product:r,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:i,TEXTURE_IMAGE:c,TOGGLE_STYLE_MODIFIER:l}),s.jsx(kn.Actions,{handleSendEvent:h,product:r,size:"small",variant:"tertiary",ICONS:n,MINICART_CONFIG:o})]})]})]})]})};Zh.displayName="MiniCart.Card";const em=({type:e="positive",ICONS:t,MESSAGE_CASHBACK:r})=>{var i;const{toExpire:n}=rs(),o=((i=n==null?void 0:n.cashback)==null?void 0:i.reduce((c,l)=>c+l.remaining_value,0))??0;return o>0?s.jsxs("div",{className:p.helpers.classNameConcat(be["mc--cashback"],be[`mc--cashback--${e}`]),children:[s.jsx(p.Icon,{name:t.alert_circle,size:"medium"}),s.jsxs("p",{children:[s.jsx("span",{children:U.formatPriceToCurrency(o)})," ",r.title]})]}):null};em.displayName="MiniCart.Cashback";const tm=({type:e,ICONS:t,MINICART_CONFIG:r})=>{const{addCouponSeller:n,removeCoupon:o,removeSellerCode:i,cartStore:{marketingData:c,openTextField:l}}=Xe(),[u,d]=j.useState(!1),[h,m]=j.useState(!1),_=j.useCallback(()=>{let S="";return e==="coupon"?S=(c==null?void 0:c.coupon)??"":S=String((l==null?void 0:l.value)??""),S.toUpperCase()??""},[c,l,e]),[g,v]=j.useState(!!_()),x=async S=>{m(!0),!!_()&&(e==="coupon"?await o():await i(),v(!1),d(!1)),await n(S,e).then(P=>{if(!P.statusOk&&S||P.code!==200){S?(d(!0),v(!1)):d(!1);return}v(!0),d(!1)}).catch(()=>d(!0)).finally(()=>m(!1))};return s.jsx(Pt.Field,{hasError:u,hasSuccess:g,isLoading:h,onHandler:x,type:e,title:e==="coupon"?`${r.messages.descount_cupom_placeholder}`:`${r.messages.sellers_code_placeholder}`,value:_(),MINICART_CONFIG:r,ICONS:t})};tm.displayName="MiniCart.CouponSeller";const rm=({ICONS:e,MINICART_CONFIG:t,PLP_NOT_RESULT:r})=>{const{router:n}=Ae(),o=()=>{n.push(r.link)};return s.jsxs(p.Utils.Column,{alignContent:"center",alignItems:"center",gap:"24px",className:be["mc--body--empty--feedback"],children:[s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsxs("p",{className:`typography-style-body-xs ${be["mc--body--empty--text"]}`,children:[t.messages.empty_card," "]})})}),s.jsx(p.Button,{variant:"tertiary",size:"large",onClick:()=>o(),"data-close":!0,adornment:{end:s.jsx(p.Icon,{name:e.arrow_right,size:"medium"})},children:t.messages.empty_bag})]})};rm.displayName="MiniCart.Feedback";const Ib=e=>{const t=e.replace(/\D/g,"");return t.length>5?`${t.slice(0,5)}-${t.slice(5,8)}`:t},nm=({feedback:e,hasError:t,onHandler:r,hasSuccess:n,type:o,title:i,value:c,ICONS:l})=>{const[u,d]=j.useState(c);j.useEffect(()=>{t||d(c)},[c,t]);const h=()=>t?s.jsx(p.Icon,{name:l.delete_circle}):String(c).length&&n?s.jsx(p.Icon,{name:l.check_circle}):null,m=()=>{if(o==="seller"){const x=String(c).includes(" - ")?String(c).split(" - ")[0]:u;d(x)}},_=()=>{if(o==="seller"){const x=String(c).includes(" - ")?c:u;d(x)}},g=x=>{const S=x.currentTarget.value;if(S===""&&typeof r=="function"||n&&String(c).length>0&&S!==String(c)||t&&S!==String(c)){d(""),r("");return}if(o==="cep"){const P=Ib(S);d(P)}else d(S)},v=x=>{if(x.key.toLocaleLowerCase()==="enter"&&typeof r=="function"){const S=x.currentTarget.value;r(S)}};return s.jsx(p.TextField.Input,{adornment:{end:h()},mode:"over-label",label:i,feedback:e,value:u,type:"text",onFocus:m,onBlur:_,onChange:g,onKeyDown:v})};nm.displayName="MiniCart.Field.Input";const sm=({title:e,ICONS:t,MINICART_CONFIG:r,...n})=>{const o=j.useRef(null),{hasSuccess:i,hasError:c,isLoading:l,onHandler:u,type:d,value:h}=n,m=()=>c?"error":String(h).length&&i?"success":"none",_=j.useCallback(()=>{if(o.current){const x=o.current.querySelector("input");x&&typeof u=="function"&&(h!==""||c?(u(""),x.value=""):u((x==null?void 0:x.value)??""))}},[u,h,c]),g=m();return s.jsx("div",{ref:o,children:s.jsx(p.TextField.Structure,{className:be["mc--field"],input:s.jsx(nm,{...n,feedback:g,title:e,ICONS:t}),right:s.jsx(p.Button,{"data-has-success":!i,size:"medium",title:String(h).length&&i||c?"Remover":"Aplicar",onClick:()=>_(),disabled:l,children:String(h).length&&i||c?s.jsx(p.Icon,{name:"close",size:"small"}):`${r.messages.promo_code_button}`}),supportText:d==="cep"&&g==="success"?s.jsx(p.TextField.SupportText,{text:"Mais informações de frete na etapa a seguir",feedback:"success",title:"support"}):null})})};sm.displayName="MiniCart.Field";const Uu=e=>{const t=e*100;return Math.round(t)},Pb=e=>(e/100).toFixed(2).replace(".",","),Nb=(e,t)=>{const{valueType:r,remainingValueToActivate:n}=e;if(r==="quantity")return`Adicione mais ${n} ${n===1?"item":"itens"} ${t}`;if(r==="price"){const o=n===100?"Falta":"Faltam",i=Pb(n);return`${o} R$ ${i} ${t}`}return t},om=({ICONS:e})=>{var w;const{promotionRules:t,data:r,cartStore:n,cartStore:{items:o,marketingData:i},addCouponSeller:c,setIsOpen:l}=Xe(),{sendDataLayerEvent:u}=Ee(),d=(w=r==null?void 0:r.promotion)==null?void 0:w.promotionCart,h=j.useRef(!1),{router:m}=Ae();if(j.useEffect(()=>{(d==null?void 0:d.selectPromotion)==="Cupom"&&(t==null?void 0:t.remainingValueToActivate)&&(t==null?void 0:t.remainingValueToActivate)<=0&&(d==null?void 0:d.cupom)&&!h.current&&(i==null?void 0:i.coupon)!==d.cupom&&(h.current=!0,c(d.cupom,"coupon")),t!=null&&t.remainingValueToActivate&&(t==null?void 0:t.remainingValueToActivate)<=0&&u({functionKey:"viewCartEvent",data:{event:"closeness_filled",commonData:{cartStore:n}}}),t!=null&&t.remainingValueToActivate&&(t==null?void 0:t.remainingValueToActivate)>0&&(h.current=!1)},[d==null?void 0:d.selectPromotion,t==null?void 0:t.remainingValueToActivate,d==null?void 0:d.cupom,i==null?void 0:i.coupon,c]),!t||!d||d.selectPromotion==="Desativar"||o.length===0)return null;const _=d.title,g=d.subtitle,v=d.titleSuccess,x=d.subtitleSuccess,S=d.linkLabel;return s.jsxs("div",{className:be["mc--body--promotion"],children:[t.remainingValueToActivate>0&&s.jsx(p.Closeness,{className:be["mc--body--promotion--closeness"],title:Nb(t,_),subtitle:g,percentage:Uu(t.completeness),iconLink:e.arrow_right,linkLabel:S,onClick:()=>{u({functionKey:"viewCartEvent",data:{event:"closeness_view_more",commonData:{cartStore:n}}}),m.push(`${d.link}`),l(!1)}}),t.remainingValueToActivate<=0&&s.jsx(p.Closeness,{className:`${be["mc--body--promotion--closeness"]} ${be["mc--body--promotion--closeness--success"]}`,title:v,subtitle:x,percentage:Uu(t.completeness)})]})};om.displayName="MiniCart.Modal.Body.Promotion";const im=({TIPBAR_CONFIGS:e})=>{const{data:t,cartStore:r,cartStore:{items:n,marketingData:o},addCouponSeller:i}=Xe(),c=t==null?void 0:t.flags.flagCart.flagCupom,l=(o==null?void 0:o.coupon)===(c==null?void 0:c.valueCupom),[u,d]=j.useState(!1),[h,m]=j.useState(!1);if(j.useEffect(()=>{u&&setTimeout(()=>{d(!1)},e.snackbar_timeout)},[u]),j.useEffect(()=>{h&&setTimeout(()=>{m(!1)},e.snackbar_timeout)},[h]),!c||c.active==="Desativar"||c.valueCupom===""||n.length===0)return null;const _=async()=>{if(!r.items.length){m(!0);return}(await i(c==null?void 0:c.valueCupom,"coupon")).code!==200&&d(!0)};return s.jsxs("div",{className:be["mc--body--coupon-tag"],style:{backgroundColor:`${c.tagColor}`,color:`${c.textColor}`},children:[s.jsx("div",{className:be["mc--body--coupon-tag--text"],dangerouslySetInnerHTML:{__html:c.value}}),s.jsx("div",{className:be["mc--body--coupon-tag--button"],children:s.jsx(p.Button,{variant:"quaternary",mode:"inverse",onClick:_,disabled:l,children:l?"Cupom Aplicado":"Aplicar Cupom"})})]})};im.displayName="MiniCart.Modal.Body.CouponTag";const am=({children:e,ICONS:t,MINICART_CONFIG:r,NAME_SPLIT_SYMBOL:n,PLP_NOT_RESULT:o,TEXTURE_IMAGE:i,TIPBAR_CONFIGS:c,TOGGLE_STYLE_MODIFIER:l})=>{const{cartStore:{items:u,messages:d}}=Xe();return s.jsxs(p.Modal.Body,{className:be["mc--body"],children:[e,s.jsx(om,{ICONS:t}),s.jsx(im,{TIPBAR_CONFIGS:c}),s.jsx("div",{className:be["mc--body--products"],children:Array.isArray(u)&&u.length?u.map((h,m)=>{const _=d.find(g=>{var v;return g.code==="withoutStock"&&((v=g.fields)==null?void 0:v.ean)===h.ean})!==void 0;return s.jsx(Pt.Card,{available:!h.availability.includes("outStock")||!_,index:m,product:h,ICONS:t,MINICART_CONFIG:r,NAME_SPLIT_SYMBOL:n,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:l},`${h.id}-${h.itemOffered.sku}-${m}`)}):s.jsx(Pt.Feedback,{ICONS:t,MINICART_CONFIG:r,PLP_NOT_RESULT:o})})]})};am.displayName="MiniCart.Body";const cm=({children:e,storeConfig:t,MINICART_CONFIG:r})=>{const{cartStore:n}=Xe();if(n.items.length===0)return null;const o=()=>{var c;const i=new URLSearchParams({orderFormId:n.id,...((c=n.marketingData)==null?void 0:c.utmCampaign)&&{utm_campaign:n.marketingData.utmCampaign}});window.location.href=`${t.checkoutUrl}?${i.toString()}#/cart`};return s.jsxs(p.Modal.Footer,{className:be["mc--footer"],children:[e,s.jsx("div",{className:be["mc--footer--actions"],children:s.jsx(p.Button,{variant:"primary",size:"large","data-close":!0,className:be["mc--footer--actions-button"],onClick:o,children:r.messages.checkout_button})})]})};cm.displayName="MiniCart.Modal.Footer";const lm=({children:e,ICONS:t,MINICART_CONFIG:r,Z_INDEX_WAR:n})=>{const[o,i]=j.useState(!1),c=j.useRef(null),l=()=>i(u=>!u);return s.jsxs(s.Fragment,{children:[o&&s.jsx(p.Tooltip.Root,{arrow:"right",position:"top",top:-3,left:-3,component:s.jsx("p",{children:"Código da vendedora, cupom ou cálculo do frete"}),id:"inputs--tooltip",className:be["inputs--tooltip"],style:{zIndex:n.modal},isOpen:!0,size:"medium",parent:c.current}),s.jsxs(p.Accordion.Wrapper,{className:be["mc--discount"],children:[s.jsx(p.Accordion.Header,{id:"frete",title:"Frete",closeIndicator:s.jsx(p.Icon,{name:t.arrow_up,size:"medium"}),openIndicator:s.jsx(p.Icon,{name:t.arrow_down,size:"medium"}),className:p.helpers.classNameConcat(be["mc--discount--header"]),startOpen:r.promotion_input_starts_open,children:s.jsxs(p.TextStructure.Root,{children:[s.jsx(p.TextStructure.DivWrapper,{children:s.jsxs("h3",{className:"typography-style-body-sm",children:[r.messages.promo_code_title," "]})}),s.jsx("div",{ref:c,onMouseEnter:l,onMouseLeave:l,"aria-label":"Mostrar descrição",children:s.jsx(p.Icon,{name:t.alert_circle,size:"small"})})]})}),s.jsx(p.Accordion.Body,{className:be["mc--discount--body"],children:e})]})]})};lm.displayName="MiniCart.Discount";const um=({discount:e,shipping:t,total:r})=>{var u,d;const{data:n}=Xe(),o=(d=(u=n==null?void 0:n.flags)==null?void 0:u.flagCart)==null?void 0:d.flagTotal,i=r-Math.abs(e??0)+(t??0),c=t===0?"Frete Grátis":U.formatPriceToCurrency((t??0)/100),l=[{title:"Frete",value:t===void 0?"A calcular":c},{title:"Desconto",value:U.formatPriceToCurrency((e??0)/100)},{message:(o==null?void 0:o.value)??"",title:"Total",value:`1x de ${U.formatPriceToCurrency(i/100)}`}];return s.jsx("div",{className:be["mc--footer--total"],children:Array.isArray(l)&&l.map((h,m)=>s.jsxs("div",{className:be["mc--footer--total--info"],"data-discount":h.title==="Desconto",children:[s.jsx("p",{children:h.title}),s.jsxs("div",{className:be["mc--footer--total--info--content"],children:[h.message&&(o==null?void 0:o.active)==="Ativar"&&s.jsx(p.Tag,{variant:"primary",title:h.message,style:{backgroundColor:o==null?void 0:o.tagColor,color:o==null?void 0:o.textColor},children:h.message}),s.jsx(p.ProductInfo.Price,{className:be["mc--footer--total--info"],label:h.title,value:h.value})]})]},m))})};um.displayName="MiniCart.Modal.Footer.Resume.Items";const dm=()=>{var o,i,c;const{totalizers:e}=fn(),t=((o=e.find(l=>l.id==="Items"))==null?void 0:o.value)??0,r=(i=e.find(l=>l.id==="Discounts"))==null?void 0:i.value,n=(c=e.find(l=>l.id==="Shipping"))==null?void 0:c.value;return s.jsx(um,{discount:r??0,total:t,shipping:n})};dm.displayName="MiniCart.Modal.Footer.Totals";const fm=({ICONS:e,MINICART_CONFIG:t})=>{const{isMobile:r}=xe(),{cartStore:{items:n}}=Xe(),o=n.reduce((i,c)=>i+(c.quantity??0),0);return s.jsx(p.Modal.Header,{navigation:"top",className:be["mc--header"],children:s.jsxs(p.Modal.Controls,{navigation:"top",isMobile:!!r,children:[s.jsx(p.Modal.Title,{navigation:"top",title:t.messages.title}),s.jsx("span",{className:be["mc--header--subtitle"],children:o!==1?`[${o}] Produtos`:`[${o}] Produto`}),s.jsx(p.Button,{"data-close":!0,iconNameStart:e.close,size:"small",variant:"tertiary"})]})})};fm.displayName="MiniCart.Modal.Header";const pm=({ICONS:e,MINICART_CONFIG:t})=>{const{cartStore:{shippingData:r},shipping:n,removeCEP:o}=Xe(),{sendDataLayerEvent:i}=Ee(),[c,l]=j.useState(!1),[u,d]=j.useState(!1),h=j.useCallback(()=>{var P;const w=((P=r==null?void 0:r.address)==null?void 0:P.postalCode)??"";return w.length===8&&!w.includes("-")?`${w.slice(0,5)}-${w.slice(5)}`:w},[r]),[m,_]=j.useState(!!h()),g=()=>{_(!1),l(!1)},v=w=>{var P;if(typeof w=="object"&&(w!=null&&w.logisticsInfo))return(P=w.logisticsInfo)==null?void 0:P.reduce((I,C)=>{var z;const N=(z=C==null?void 0:C.slas)==null?void 0:z.find(D=>(D==null?void 0:D.id)===(C==null?void 0:C.selectedSla));if(!N)return I;const T=parseInt(String((N==null?void 0:N.shippingEstimate)??"").replace("bd","")),O=Number((((N==null?void 0:N.price)??0)/100).toFixed(2));if(I.shipping_tier===void 0)return I.shipping_tier=C==null?void 0:C.selectedSla,I.delivery_time=T.toString(),I.shipping=O,I.flag_retirada=(C==null?void 0:C.selectedDeliveryChannel)==="delivery"?"false":"true",I;const M=parseInt(I.delivery_time??"0");return T>M&&(I.delivery_time=T.toString()),I.shipping=(I.shipping??0)+O,I},{shipping_tier:void 0,delivery_time:void 0,flag_retirada:void 0,shipping:void 0,currency:"BRL"})},x=async w=>{const P=w.replace(/\D/g,"");if(P.length!==8)return!1;try{return!(await Ln.get(`https://viacep.com.br/ws/${P}/json/`)).data.erro}catch{return!1}},S=async w=>{if(d(!0),!!h()||!(w!=null&&w.trim())){await o(),g(),d(!1);return}if(!await x(w)){l(!0),_(!1),d(!1);return}try{const N=await n(w);if(l(!1),N){_(!0);const T=v(N);T&&i({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:T}})}}catch{l(!0)}finally{d(!1)}};return s.jsx(Pt.Field,{hasSuccess:m,hasError:c,isLoading:u,onHandler:S,title:`${t.messages.shipping_calculation_placeholder}`,type:"cep",value:h(),ICONS:e,MINICART_CONFIG:t})};pm.displayName="MiniCart.Shipping";const hm=()=>{var r,n;const{data:e}=Xe(),t=(n=(r=e==null?void 0:e.flags)==null?void 0:r.flagCart)==null?void 0:n.flagHeader;return t!=null&&t.value?s.jsx(p.Tag,{variant:"tertiary",title:t==null?void 0:t.value,size:"small",adornment:{start:t!=null&&t.enableIcon&&(t!=null&&t.icon)?s.jsx(p.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};hm.displayName="MiniCart.TagMessage";const Pt={Body:am,Card:Zh,Cashback:em,CouponSeller:tm,Discount:lm,Field:sm,Feedback:rm,Shipping:pm,Footer:cm,Header:fm,TagMessage:hm,Totals:dm},Rb=({ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,PLP_NOT_RESULT:n,TEXTURE_IMAGE:o,TIPBAR_CONFIGS:i,TOGGLE_STYLE_MODIFIER:c,Z_INDEX_WAR:l,storeConfig:u,minicartStyleModifiers:d})=>{const{isOpen:h,setIsOpen:m}=Xe(),{isMobile:_}=xe();return s.jsxs(p.Modal.Root,{className:p.helpers.classNameConcat(be["minicart--modal-modifier"],d),isMobile:!0,isOpen:h,setIsOpen:m,style:{zIndex:l.modal},variant:_?"sideBottom":"sideRight",children:[s.jsx(Pt.Header,{ICONS:e,MINICART_CONFIG:t}),s.jsx(Pt.Body,{ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,PLP_NOT_RESULT:n,TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:c,TIPBAR_CONFIGS:i,children:s.jsx(Pt.TagMessage,{})}),s.jsxs(Pt.Footer,{MINICART_CONFIG:t,storeConfig:u,children:[s.jsxs(Pt.Discount,{ICONS:e,MINICART_CONFIG:t,Z_INDEX_WAR:l,children:[s.jsx(Pt.CouponSeller,{type:"seller",ICONS:e,MINICART_CONFIG:t}),s.jsx(Pt.CouponSeller,{type:"coupon",ICONS:e,MINICART_CONFIG:t}),s.jsx(Pt.Shipping,{ICONS:e,MINICART_CONFIG:t})]}),s.jsx(Pt.Totals,{})]}),s.jsx(Wh,{ICONS:e})]})},mm=({tipBar:e,minicartStyleModifiers:t,menuV2:r,storeConfig:n,className:o})=>{const{structureRef:i,rootRef:c,CONSTANTS:l}=Ze(),{header:{HEADER_CONFIGS:u,Z_INDEX_WAR:d},minicart:h}=l;return s.jsx(p.Header.Structure,{innerRef:i,adornment:{start:e},style:{position:"sticky",top:0,zIndex:d.header},className:p.helpers.classNameConcat(Dc["header-animation"],o),children:s.jsxs(p.Header.Root,{innerRef:c,style:{zIndex:d.header},variant:u.default_variant,interactiveVariant:u.interactive_variant,children:[r??s.jsxs(fb,{children:[s.jsx("div",{className:U.responsive["responsive-mobile-block"],style:{height:"100%",width:"100%",zIndex:d.header_mobile},children:s.jsx(Hh,{storeConfig:n})}),s.jsx("div",{className:U.responsive["responsive-desktop-block"],style:{height:"100%",width:"100%",zIndex:d.header_desktop},children:s.jsx(Nh,{storeConfig:n})})]}),s.jsx(bb,{children:s.jsx(Rb,{...h,minicartStyleModifiers:t})}),s.jsx(Nc,{title:"Produto adicionado à sua sacola!",CONSTANTS:l.addToCart})]})})};mm.displayName="Header";const Tb="_shippingFreight_6z8rf_6",Ob="_shippingFreight__postalCodeGrid_6z8rf_10",Ab="_shippingFreight__grid_6z8rf_14",kb="_shippingFreight__grid__title_6z8rf_18",Mb="_shippingFreight__grid__remember_6z8rf_29",Lb="_postalCodeContainer_6z8rf_44",Db="_deliveryStatusBar__tag_6z8rf_49",Fb="_deliveryStatusBarError__tag_6z8rf_66",zb="_deliveryInfo_6z8rf_74",qb="_deliveryInfo__content_6z8rf_78",Bb="_deliveryInfo__text_6z8rf_84",Ub="_deliveryInfo__title_6z8rf_89",Hb="_deliveryInfo__subtitle_6z8rf_99",$b="_deliveryInfo__tooltipIcon_6z8rf_109",Wb="_deliveryInfo__tooltip_6z8rf_109",Vb="_freightGrid_6z8rf_148",Gb="_freightContainer_6z8rf_155",Kb="_freightOption__content_6z8rf_160",Qb="_freightOption__value_6z8rf_166",Yb="_freightOption__title_6z8rf_177",Xb="_freightOption__title_item_6z8rf_181",Jb="_freightOption__paragraph_6z8rf_192",ze={shippingFreight:Tb,shippingFreight__postalCodeGrid:Ob,shippingFreight__grid:Ab,shippingFreight__grid__title:kb,shippingFreight__grid__remember:Mb,postalCodeContainer:Lb,deliveryStatusBar__tag:Db,deliveryStatusBarError__tag:Fb,deliveryInfo:zb,deliveryInfo__content:qb,deliveryInfo__text:Bb,deliveryInfo__title:Ub,deliveryInfo__subtitle:Hb,deliveryInfo__tooltipIcon:$b,deliveryInfo__tooltip:Wb,freightGrid:Vb,freightContainer:Gb,freightOption__content:Kb,freightOption__value:Qb,freightOption__title:Yb,freightOption__title_item:Xb,freightOption__paragraph:Jb,"input-modifier":"_input-modifier_6z8rf_207","freight--tooltip":"_freight--tooltip_6z8rf_227"},Zb=({icon:e,title:t,subtitle:r,packageCount:n,packageUnit:o="",labelDescription:i,freightConfig:c,toolTipZIndex:l})=>{const[u,d]=j.useState(!1),h=j.useRef(null),m=()=>d(_=>!_);return s.jsxs("div",{className:ze.deliveryInfo,ref:h,children:[s.jsx(p.Tooltip.Root,{arrow:"bottom",component:s.jsx("div",{children:s.jsx("p",{children:c.messages.select_size_tag})}),id:"freight--tooltip",className:ze["freight--tooltip"],style:{zIndex:l},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:h.current}),s.jsxs("div",{className:ze.deliveryInfo__content,children:[s.jsx("div",{className:ze.deliveryInfo__icon,children:s.jsx(p.Icon,{name:e,size:"medium"})}),s.jsxs("div",{className:ze.deliveryInfo__text,children:[s.jsxs("span",{className:ze.deliveryInfo__title,children:[t," ",n," ",o]}),r&&s.jsx("span",{className:ze.deliveryInfo__subtitle,children:r})]}),i&&s.jsxs("div",{className:ze.deliveryInfo__tooltipIcon,onMouseEnter:m,onMouseLeave:m,"aria-label":"Mostrar descrição",children:[s.jsx("span",{children:s.jsx(p.Icon,{name:c.icons.feedback_help,size:"small"})}),u&&s.jsx("div",{className:ze.deliveryInfo__tooltip,children:i})]})]})]})},ej=({value:e,title:t,paragraph:r})=>s.jsx("div",{className:ze.freightOption,children:s.jsxs("div",{className:ze.freightOption__content,children:[s.jsx("span",{className:ze.freightOption__value,children:e}),s.jsx("span",{className:ze.freightOption__title,children:s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{className:ze.footer__item,children:[s.jsx("span",{className:ze.freightOption__title_item,children:t}),r&&s.jsx("span",{className:ze.freightOption__paragraph,children:r})]})})})]})}),tj=({children:e})=>s.jsx("div",{className:ze.freightContainer,children:e}),rj=({children:e})=>s.jsx("div",{className:ze.freightGrid,children:e}),nj=({children:e})=>s.jsx("div",{className:ze.postalCodeContainer,children:e}),Hu=({message:e,seller:t="",size:r="small",setError:n})=>s.jsx("div",{className:n?ze.deliveryStatusBarError:ze.deliveryStatusBar,children:s.jsxs(p.Tag,{title:e,className:n?ze.deliveryStatusBarError__tag:ze.deliveryStatusBar__tag,size:r,children:[e," ",!n&&t]})}),sj=e=>{const t=parseInt(e,10);return t===1?`${t} dia`:`${t} dias`},oj=e=>{var r,n,o;const t=[];return(o=(n=(r=e==null?void 0:e.logisticsInfo)==null?void 0:r[0])==null?void 0:n.slas)==null||o.forEach(i=>{t.push({id:i.id,name:i.name,price:i.price,shippingEstimate:i.shippingEstimate})}),t},ij=({component:e,parent:t,top:r,left:n,target:o,contentRef:i,freightConfig:c,toolTipZIndex:l=999,...u})=>{const{isMobile:d}=xe();return s.jsx(s.Fragment,{children:d?s.jsx(p.Tooltip.Root,{arrow:"bottom",component:s.jsxs("div",{...u,ref:i,children:[e,s.jsx("p",{children:c.messages.select_size_tag})]}),id:"freight--tooltip",className:ze["freight--tooltip"],style:{zIndex:l},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:t}):s.jsx(p.Tooltip.Root,{arrow:"bottom",component:s.jsxs("div",{...u,ref:i,children:[e,s.jsx("p",{children:c.messages.select_size_tag})]}),id:"freight--tooltip",className:ze["freight--tooltip"],style:{zIndex:l},isOpen:!0,size:"medium",position:"top",top:"-110%",left:"3%",parent:t})})},aj=({onUpdateFreightItems:e,sellerId:t,size:r,skuId:n,quantity:o,setError:i,setIsButtonClicked:c,component:l,freightConfig:u,toolTipZIndex:d})=>{var B,G,J,Y;const h=fn(),m=fn(X=>X.shipping),[_,g]=j.useState(),[v,x]=j.useState(!1),[S,w]=j.useState(!1),[P,I]=j.useState(!1),C=(G=(B=h.shippingData)==null?void 0:B.address)==null?void 0:G.postalCode,N=!(_!=null&&_.length)&&C?C:_,T=j.useRef(null),O=async X=>{const he=X.target.value.replace(/\D/g,"").slice(0,8);he.length>5?g(he.replace(/^(\d{5})(\d{1,3})/,"$1-$2")):g(he)},M=async X=>{const Z=X.target.value.replace(/\D/g,"");try{if((await Ln.get(`https://viacep.com.br/ws/${Z}/json/`)).data.erro){i&&i(u.messages.cep_not_found),c(!1),w(!0);return}i&&i(""),w(!1)}catch{console.log("Erro ao validar o CEP. Tente novamente mais tarde.")}},z=async()=>{x(!0);try{const X=await Ln.post("/api/checkout/simulation",{items:[{id:n,quantity:o,seller:t}],country:"BRA",postalCode:N});e(oj(X.data))}catch(X){console.error("Erro ao atualizar o documento:",X)}finally{x(!1),m(N,"BRA")}},D=async()=>{if(!n){I(!0),setTimeout(()=>I(!1),1500);return}await M({target:{value:N}}),v||(z(),c(!0))};return s.jsxs("div",{ref:T,style:{position:"relative"},children:[!n&&P?s.jsx(ij,{component:l,isOpen:P,parent:T.current,toolTipZIndex:d,freightConfig:u}):s.jsx(s.Fragment,{}),s.jsx("div",{style:{position:"relative"},children:s.jsx(p.TextField.Structure,{title:"structure",style:{width:"100%"},input:s.jsx(p.TextField.Input,{defaultValue:(Y=(J=h.shippingData)==null?void 0:J.address)==null?void 0:Y.postalCode,label:u.messages.text_input_label,title:"textfield",value:_,sizeVariant:r,onMouseOver:()=>n?null:I(!0),onMouseOut:()=>n?null:I(!1),mode:"simple",onChange:O,onKeyDown:X=>{X.key==="Enter"&&D()},className:ze["input-modifier"],feedback:S?"error":"none"}),right:s.jsx(p.Button,{onClick:D,size:r,title:"button",children:v?s.jsx(p.Spinner,{size:"small",indicatorColor:"#ffffff"}):u.messages.text_input_btn})})})]})},cj=({children:e,freightConfig:t})=>s.jsxs("div",{className:ze.shippingFreight,children:[s.jsxs("div",{className:ze.shippingFreight__grid,children:[s.jsx("span",{className:ze.shippingFreight__grid__title,children:t.messages.title}),s.jsx("span",{className:ze.shippingFreight__grid__remember,children:s.jsx(wt,{href:"https://buscacepinter.correios.com.br/app/endereco/index.php",passHref:!0,target:"_blank",rel:"noopener noreferrer",size:"x-small",disablePadding:!1,title:t.messages.remember_cep,children:t.messages.remember_cep})})]}),s.jsx("div",{className:ze.shippingFreight__postalCodeGrid,children:e})]}),lj=({children:e})=>s.jsx("div",{className:ze.freightContainer,children:e}),_m=({className:e,sellerId:t,skuId:r,quantity:n,size:o,seller:i,local:c,CONSTANTS_PROPS:l})=>{const{sendDataLayerEvent:u}=Ee(),[d,h]=j.useState(""),[m,_]=j.useState([]),[g,v]=j.useState(""),[x,S]=j.useState(!1),w=I=>h(I),P=I=>{_(I),u({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:{shippings:I.map(C=>({shipping_tier:C.id,delivery_time:C.shippingEstimate.replace("bd",""),flag_pickup:C.name.toLowerCase().includes("retirada")?"true":"false",shipping:C.price,currency:l.currency||"BRL"}))}}})};return s.jsxs(lj,{className:e,children:[s.jsxs(cj,{freightConfig:l.freightConfig,children:[s.jsx(nj,{children:s.jsx(aj,{onUpdateFreightItems:P,skuId:r,quantity:n,size:o,sellerId:t,local:c,setError:v,setIsButtonClicked:S,freightConfig:l.freightConfig,toolTipZIndex:l.toolTipZIndex})}),g?s.jsx(Hu,{size:o,message:g,setError:v}):m.length>0&&s.jsx(Hu,{size:o,message:l.freightConfig.messages.delivered_by,seller:i})]}),x&&!g?m.length>0&&s.jsxs(tj,{children:[s.jsx(rj,{children:m.filter(({id:I})=>!I.includes("Retirada")).map(I=>s.jsx(ej,{id:I.id,value:U.freightParsePrice({valueInCents:I.price,hasFree:!1,freeTaxMessage:l.freightConfig.messages.free_tax}),title:I.name,paragraph:`${l.freightConfig.messages.prefix_days}${sj(I.shippingEstimate)}`,radioValue:d,changeValue:w},I.id))}),l.deliveryInfoBoxesAllowed?s.jsx(Zb,{icon:l.freightConfig.icons.delivery_truck,packageUnit:l.freightConfig.messages.unit_amout,title:l.freightConfig.messages.delivered_amount_packages,subtitle:"",packageCount:1,labelDescription:"Label",freightConfig:l.freightConfig,toolTipZIndex:l.toolTipZIndex??999}):s.jsx(s.Fragment,{})]}):null]})},_n={"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"},uj=({children:e,href:t,isLast:r,title:n})=>{const{constants:{ICONS:o}}=ut();return s.jsx(p.BreadCrumb.Item,{adornment:{end:r&&s.jsx(p.Icon,{name:o.arrow_right})},children:r?s.jsx(wt,{href:t??"/",size:"medium",title:n,disableUnderline:!0,children:e}):e})},gm=()=>{var o;const{state:e}=ft(),t=e!=null&&e.term&&e.term.length>0?`/${e.term}`:"",r=decodeURIComponent((o=e==null?void 0:e.base)!=null&&o.length?e.base:t??t).slice(1).split("/"),n=Vf(r);return s.jsx("div",{className:_n["pcd-navigation--breadcrumb"],children:s.jsx(p.BreadCrumb.DivWrapper,{children:s.jsx(p.BreadCrumb.List,{children:Array.isArray(n)&&n.map((i,c)=>{var l,u;return j.createElement(uj,{...i,isLast:c!==n.length-1,key:i.href,title:(l=i.name)==null?void 0:l.replace(/-/g," ")},(u=i.name)==null?void 0:u.replace(/-/g," "))})})})})};gm.displayName="PLPNavigation.BreadCrumb";const ym=({children:e,...t})=>s.jsxs("div",{...t,className:_n["pdc-navigation--content"],children:[s.jsx(Br.Filters,{}),e]});ym.displayName="PLPNavigation.Content";const dj="_sort_35wro_1",Yo={sort:dj,"sort-list-wrapper":"_sort-list-wrapper_35wro_8","sort-list":"_sort-list_35wro_8","sort-button":"_sort-button_35wro_25"},fj=({children:e,sortListOpen:t,btnAdornment:r,style:n,...o})=>s.jsx(p.Button,{...o,adornment:{end:t?r==null?void 0:r.listOpen:r==null?void 0:r.listClosed},size:"small",variant:"tertiary",style:{...n,textDecoration:"none"},className:Yo["sort-button"],children:e}),pj=e=>s.jsx(p.RadioButton.Radio,{...e}),hj=({children:e,className:t,name:r,...n})=>s.jsx(p.RadioButton.Group,{...n,name:r||"sort-group",className:p.helpers.classNameConcat(Yo["sort-list"],t),children:e}),mj=({children:e,className:t,shadow:r=!0,padding:n="small",height:o="fit-content",...i})=>s.jsx(p.Card,{...i,shadow:r,className:p.helpers.classNameConcat(Yo["sort-list-wrapper"],t),padding:n,height:o,children:e}),vm=j.forwardRef(({children:e,className:t,...r},n)=>s.jsx("div",{...r,ref:n,className:p.helpers.classNameConcat(Yo.sort,t),children:e}));vm.displayName="SortRoot";const Xo=({handleSelectValue:e,sortListOpen:t,setSortListOpen:r,searchParams:n,ICONS:o,...i})=>{var _;const c=(_=n==null?void 0:n.get("sort"))==null?void 0:_.replace(":","_"),[l,u]=j.useState(c),{sendDataLayerEvent:d}=Ee();j.useEffect(()=>{u(c||void 0)},[c]);const{ref:h}=Sh(()=>r(!1)),m=g=>{const v=g.target.value;u(v),typeof e=="function"&&e(v),d({functionKey:"filterEvent",data:{customData:{ordering:ds.options[v]}}}),r(!1)};return s.jsxs(vm,{...i,ref:h,children:[s.jsx(fj,{btnAdornment:{listOpen:s.jsx(p.Icon,{name:o.arrow_up,size:"small"}),listClosed:s.jsx(p.Icon,{name:o.arrow_down,size:"small"})},sortListOpen:t,onClick:()=>r(!t),children:l?ds.options[l]:ds.placeholder},"sort-button"),t&&s.jsx(mj,{children:s.jsx(hj,{name:"sort-group",value:l??"",onChange:m,children:Object.keys(ds.options).map(g=>s.jsx(pj,{label:ds.options[g],value:g},g))})})]})};Xo.displayName="Sort";const xm=j.createContext({}),_j=({children:e,...t})=>{const[r,n]=j.useState(!1);return s.jsx(xm.Provider,{value:j.useMemo(()=>({...t,openOrderBy:r,setOpenOrderBy:n}),[t,r,n]),children:e})},gj=()=>{const e=j.useContext(xm);if(e===void 0)throw new Error("usePLPNavigationContext must be used within a PDCNavigationProvider");return e},bm=()=>{const{openOrderBy:e,onSort:t,setOpenFilters:r,setOpenOrderBy:n}=gj(),{constants:{ICONS:o,PDC_NAVIGATION:i}}=ut();return s.jsxs("div",{className:_n["pdc-navigation--filters"],children:[s.jsx(Br.BreadCrumb,{}),s.jsxs("div",{className:_n["pdc-navigation--filters--content"],children:[s.jsx(Xo,{handleSelectValue:c=>t(c??"release_desc"),sortListOpen:e,setSortListOpen:n,ICONS:o,searchParams:new URLSearchParams}),s.jsx(p.Button,{adornment:{end:s.jsx(p.Icon,{name:o.arrow_down})},onClick:()=>r(!0),size:"small",variant:"tertiary",children:i.filter_button}),s.jsx(Br.Total,{})]})]})};bm.displayName="PLPNavigation.Filters";const jm=({children:e,onSort:t,setOpenFilters:r,style:n,...o})=>{const i=j.useRef(null);return s.jsx(_j,{onSort:t,setOpenFilters:r,children:s.jsx("div",{...o,className:_n["pdc-navigation"],ref:i,style:{...n},children:s.jsx(Br.Content,{children:e})})})};jm.displayName="Root";const Sm=({callback:e,selected:t,...r})=>s.jsx("div",{...r,className:_n["pdc-navigation--selected"],children:s.jsx("div",{className:_n["pdc-navigation--selected--container"],children:Array.isArray(t)?t.map(n=>n.key==="productclusterids"?null:s.jsx(Br.SelectedItem,{callback:e,facet:n},n.value)):null})});Sm.displayName="PLPNavigation.Selected";const zc=({key:e,PLP_FILTERS:t})=>t.some(r=>r.key===e)?e==="cores-filtraveis":!1,qc=({value:e,PLP_FILTERS_COLORS:t})=>{var r;return((r=t.find(n=>n.value===e))==null?void 0:r.color)??"#F2F2F2"},Cm=({key:e,PLP_FILTERS:t})=>{var r;return(r=t.find(n=>n.key===e))==null?void 0:r.label},wm=({key:e,PLP_FILTERS:t})=>{var r;return((r=t.find(n=>n.key===e))==null?void 0:r.order)??0},Ua=({value:e})=>{const[t,r]=e.split(":").length===2?e.split(":"):[0,0],n=U.formatPriceToCurrency(Number(r));return`${U.formatPriceToCurrency(Number(t))} até ${n}`},Em=({items:e})=>{const t=e.flatMap(o=>[o.range.from,o.range.to]),r=Math.min(...t.map(Math.abs)),n=Math.max(...t.map(Math.abs));return[r,n]},Im=Object.freeze(Object.defineProperty({__proto__:null,checkedColor:zc,createTagPrice:Ua,getAbsoluteMinMax:Em,getColor:qc,getName:Cm,getOrder:wm},Symbol.toStringTag,{value:"Module"})),Wt={"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"},Pm=({columns:e=2,CONSTANTS:t,...r})=>{var i;const{filters:n,onToggleFacet:o}=$r();return s.jsxs("div",{...r,className:Wt["filter--modal--body--content"],children:[Array.isArray(n.facets)&&n.facets.map(c=>s.jsx(br.Item,{columns:e,facet:c,onToggleFacet:o,CONSTANTS:t},c.key)),!((i=n.facets)!=null&&i.length)&&s.jsx(br.Empty,{PLP_FILTERS_EMPTY:t.PLP_FILTERS_EMPTY})]})};Pm.displayName="Filter.Item.Content";const Nm=({PLP_FILTERS_EMPTY:e})=>{const t=()=>{window.history.back()};return s.jsxs("div",{className:Wt["filter--empty"],children:[s.jsxs(p.TextStructure.DivWrapper,{children:[s.jsx("h4",{children:e.title}),s.jsx("p",{children:e.subtitle})]}),s.jsx(p.Button,{onClick:()=>t(),variant:"tertiary",children:e.button})]})};Nm.displayName="Filter.Empty";const Rm=({columns:e,facet:t,onToggleFacet:r,CONSTANTS:n,...o})=>{const i=wm({key:t.key,PLP_FILTERS:n.PLP_FILTERS}),c=()=>{if(t.__typename==="FacetBoolean"){if(t.key==="cores-filtraveis")return s.jsx(br.Colors,{onToggleFacet:r,values:t.values,PLP_FILTERS:n.PLP_FILTERS,PLP_FILTERS_COLORS:n.PLP_FILTERS_COLORS});if(t.key==="tamanho")return s.jsx(br.Sizes,{onToggleFacet:r,values:t.values,PLP_SIZE_ORDER:n.PLP_SIZE_ORDER});if(t.key==="category-2"||t.key==="tecido")return s.jsx(br.Toggle,{columns:e,facetKey:t.key,onToggleFacet:r,values:t.values,ICONS:n.ICONS})}return t.__typename==="FacetRange"?s.jsx(br.Price,{facet:t}):s.jsx("p",{children:"Filter not support!!!"})};return s.jsx("div",{...o,className:Wt["filter--item"],style:{order:i},children:s.jsxs(p.Accordion.Wrapper,{style:{width:"100%"},children:[s.jsx(p.Accordion.Header,{id:t.key,closeIndicator:s.jsx(p.Icon,{name:n.ICONS.arrow_up}),openIndicator:s.jsx(p.Icon,{name:n.ICONS.arrow_down}),children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h4",{className:"typography-style-body-sm",children:Cm({key:t.key,PLP_FILTERS:n.PLP_FILTERS})})})})}),s.jsx(p.Accordion.Body,{children:c()})]})})};Rm.displayName="Filter.Item";const Tm=({onToggleFacet:e,values:t,PLP_FILTERS:r,PLP_FILTERS_COLORS:n,...o})=>{const{filters:{selected:i}}=$r();return s.jsx(rr.Root,{...o,children:s.jsx(rr.List,{children:Array.isArray(t)&&t.map(({key:c,value:l})=>s.jsx(rr.Option,{active:!!(i!=null&&i.find(u=>u.key===c&&u.value===l)),"data-color":zc({key:c,PLP_FILTERS:r}),fill:qc({value:l,PLP_FILTERS_COLORS:n}),onClick:()=>e({key:c,value:l}),type:"color"},`${c}-${l}`))})})};Tm.displayName="Filter.Item.Color";const Om=({facet:e,...t})=>{var d,h;const{filters:{selected:r},price:n,onToggleFacet:o}=$r(),[i,c]=(n==null?void 0:n.split(":").map(Number))??[0,100],[l,u]=((h=(d=r==null?void 0:r.find(({key:m})=>m==="price"))==null?void 0:d.value)==null?void 0:h.split(":").map(Number))??[i,c];return s.jsx("div",{...t,className:Wt["filter--item--price"],children:s.jsxs(p.Slider.SliderDual,{format:"price",initialValue:[l<i?i:l,u>c?c:u],min:i,max:c,type:"dual",step:1,onFinish:m=>{var _,g;m&&o({key:"price",value:`${(_=m.range)==null?void 0:_.min}:${(g=m.range)==null?void 0:g.max}`})},children:[s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("p",{"data-min-value":!0})})}),s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("p",{"data-max-value":!0})})})]})})};Om.displayName="Filter.Item.Price";const Am=({onToggleFacet:e,values:t,PLP_SIZE_ORDER:r,...n})=>{const{filters:{selected:o}}=$r(),i=[...t].sort((c,l)=>{const u=r.indexOf(c.name),d=r.indexOf(l.name);return u-d});return s.jsx(rr.Root,{...n,children:s.jsx(rr.List,{children:Array.isArray(i)&&i.map(({key:c,value:l})=>s.jsx(rr.Option,{active:!!(o!=null&&o.find(u=>u.key===c&&u.value===l)),text:l,type:"size",onClick:()=>e({key:c,value:l})},l))})})};Am.displayName="Filter.Item.Sizes";const km=({columns:e,facetKey:t,onToggleFacet:r,values:n,ICONS:o,...i})=>s.jsx("div",{...i,className:Wt["filter--item--toggle"],children:s.jsx("div",{className:Wt["filter--item--toggle--container"],style:{gridTemplateColumns:`repeat(${e}, 1fr)`},children:Array.isArray(n)&&n.map(c=>s.jsx(p.Checkbox,{label:(c==null?void 0:c.name)??"",adornment:s.jsx(p.Icon,{name:o.check}),checked:c.selected,onChange:()=>r(c)},c.value))})});km.displayName="Filter.Item.Toggle";const Mm=({...e})=>{const{isLoading:t}=$r();return s.jsx("div",{className:Wt["filter--loading"],"data-active":t,...e,children:s.jsx(p.Spinner,{indicatorColor:"#000",background:"#222"})})};Mm.displayName="Filter.Loading";const Lm=({children:e,className:t,isMobile:r=!1,CONSTANTS:{PLP_FILTERS_TITLE:n,ICONS:o}})=>{var d;const{deleteAllFacets:i,filters:c,isOpen:l,setIsOpen:u}=$r();return s.jsxs(p.Modal.Root,{className:p.helpers.classNameConcat(Wt["filter--modal"],t),isMobile:r??!1,isOpen:l,setIsOpen:u,variant:r?"sideBottom":"sideRight",style:{zIndex:99},children:[s.jsxs(p.Modal.Header,{navigation:"top",children:[s.jsx(p.Modal.Controls,{navigation:"top",isMobile:r,children:s.jsx(p.Button,{"data-close":!0,iconNameStart:o.close,size:"small",variant:"tertiary",style:{marginLeft:"auto"}})}),s.jsx(p.Modal.Title,{navigation:"top",title:n})]}),s.jsxs(p.Modal.Body,{style:{width:500},children:[s.jsx("div",{className:Wt["filter--modal--body"],children:e}),s.jsx(br.Loading,{})]}),s.jsx(p.Modal.Footer,{children:s.jsxs("div",{className:Wt["filter--modal--footer"],children:[s.jsx(p.Button,{"data-close":!0,size:"large",variant:"primary",children:(d=c.facets)!=null&&d.length?"ver resultados":"fechar"}),s.jsx(p.Button,{"data-close":!0,onClick:()=>i(),variant:"tertiary",children:"limpar filtros"})]})})]})};Lm.displayName="Filter.Modal";const Dm=({children:e,className:t,isMobile:r,CONSTANTS:n,...o})=>s.jsx(lp,{...o,PLP_FILTERS:n.PLP_FILTERS,children:s.jsx(br.Modal,{className:t,isMobile:r,CONSTANTS:n,children:e})});Dm.displayName="Filter.Root";const Fm=({ICONS:e,PLP_FILTERS_COLORS:t,PLP_FILTERS:r})=>{const{filters:n,onToggleFacet:o}=$r();return s.jsx("div",{className:Wt["filter--selected"],children:s.jsx("div",{className:Wt["filter--selected--content"],children:Array.isArray(n.selected)&&n.selected.map(({key:i,value:c})=>i==="productclusterids"?null:s.jsx(p.Tag,{title:i==="price"?Ua({value:c}):c,adornment:{end:s.jsx(p.Icon,{name:e.close,size:"x-small"})},colorSquare:qc({value:c,PLP_FILTERS_COLORS:t}),onClick:()=>o({key:i,value:c}),squareShow:zc({key:i,PLP_FILTERS:r}),size:"medium",variant:"primary",children:i==="price"?Ua({value:c}):c},c))})})};Fm.displayName="Filter.Selected";const br={Colors:Tm,Content:Pm,Empty:Nm,Modal:Lm,Item:Rm,Root:Dm,Loading:Mm,Selected:Fm,Price:Om,Sizes:Am,Toggle:km},{checkedColor:yj,createTagPrice:$u,getColor:vj}=Im,zm=({callback:e,facet:t})=>{const{constants:{ICONS:r,PLP_FILTERS_COLORS:n,PLP_FILTERS:o}}=ut();return s.jsx(p.Tag,{title:(t==null?void 0:t.key)==="price"?$u({value:t.value}):t.value.toUpperCase(),adornment:{end:s.jsx(p.Icon,{name:r.close,size:"x-small"})},colorSquare:vj({value:t.value,PLP_FILTERS_COLORS:n}),onClick:()=>{typeof e=="function"&&e(t,!0)},squareShow:yj({key:t.key,PLP_FILTERS:o}),size:"medium",variant:"primary",children:(t==null?void 0:t.key)==="price"?$u({value:t.value}):t.value.toUpperCase()})};zm.displayName="PLPNavigation.Selected.Item";const qm=()=>s.jsx(p.TextStructure.Root,{children:s.jsx("p",{id:"pdc-navigation--total"})});qm.displayName="PLPNavigation.Total";const Br={BreadCrumb:gm,Content:ym,Filters:bm,Root:jm,Selected:Sm,SelectedItem:zm,Total:qm},xj="_footer__bottom_198g6_2",bj="_footer__wrapper_198g6_10",jj="_footer__main_198g6_39",Sj="_footer__legalInformation_198g6_55",Cj="_footer__column_198g6_77",wj="_footer__columnContent_198g6_87",Ej="_footer__item_198g6_91",Ij="_footer__itemLink_198g6_107",Pj="_footer__columnTitle_198g6_122",Nj="_footer__columnTitleIcon_198g6_134",Rj="_footer__iconList_198g6_147",Tj="_footer__itemSmallText_198g6_157",Oj="_payment_198g6_168",Aj="_footer__iconContainer_198g6_173",kj="_footer__iconListSubHeader_198g6_178",Mj="_accordionWrapper_198g6_200",Lj="_accordionHeader_198g6_204",Dj="_accordionTextWrapper_198g6_208",Be={footer__bottom:xj,footer__wrapper:bj,footer__main:jj,footer__legalInformation:Sj,footer__column:Cj,footer__columnContent:wj,footer__item:Ej,footer__itemLink:Ij,footer__columnTitle:Pj,footer__columnTitleIcon:Nj,footer__iconList:Rj,footer__itemSmallText:Tj,payment:Oj,footer__iconContainer:Aj,footer__iconListSubHeader:kj,accordionWrapper:Mj,accordionHeader:Lj,accordionTextWrapper:Dj,"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 Bm={},Bc={},Jo={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"warnOnce",{enumerable:!0,get:function(){return t}});let t=r=>{};if(process.env.NODE_ENV!=="production"){const r=new Set;t=n=>{r.has(n)||console.warn(n),r.add(n)}}})(Jo);var Um={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImageBlurSvg",{enumerable:!0,get:function(){return t}});function t(r){let{widthInt:n,heightInt:o,blurWidth:i,blurHeight:c,blurDataURL:l,objectFit:u}=r;const d=20,h=i?i*40:n,m=c?c*40:o,_=h&&m?"viewBox='0 0 "+h+" "+m+"'":"",g=_?"none":u==="contain"?"xMidYMid":u==="cover"?"xMidYMid slice":"none";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+_+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='"+d+"'/%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='"+d+"'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+g+"' style='filter: url(%23b);' href='"+l+"'/%3E%3C/svg%3E"}})(Um);var Zo={};(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,{VALID_LOADERS:function(){return r},imageConfigDefault:function(){return n}});const r=["default","imgix","cloudinary","akamai","custom"],n={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",localPatterns:void 0,remotePatterns:[],qualities:void 0,unoptimized:!1}})(Zo);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImgProps",{enumerable:!0,get:function(){return g}});const t=Jo,r=Um,n=Zo,o=["lazy","eager",void 0];function i(v){return v.default!==void 0}function c(v){return v.src!==void 0}function l(v){return typeof v=="object"&&(i(v)||c(v))}const u=new Map;let d;function h(v){return typeof v>"u"?v:typeof v=="number"?Number.isFinite(v)?v:NaN:typeof v=="string"&&/^[0-9]+$/.test(v)?parseInt(v,10):NaN}function m(v,x,S){let{deviceSizes:w,allSizes:P}=v;if(S){const C=/(^|\s)(1?\d?\d)vw/g,N=[];for(let T;T=C.exec(S);T)N.push(parseInt(T[2]));if(N.length){const T=Math.min(...N)*.01;return{widths:P.filter(O=>O>=w[0]*T),kind:"w"}}return{widths:P,kind:"w"}}return typeof x!="number"?{widths:w,kind:"w"}:{widths:[...new Set([x,x*2].map(C=>P.find(N=>N>=C)||P[P.length-1]))],kind:"x"}}function _(v){let{config:x,src:S,unoptimized:w,width:P,quality:I,sizes:C,loader:N}=v;if(w)return{src:S,srcSet:void 0,sizes:void 0};const{widths:T,kind:O}=m(x,P,C),M=T.length-1;return{sizes:!C&&O==="w"?"100vw":C,srcSet:T.map((z,D)=>N({config:x,src:S,quality:I,width:z})+" "+(O==="w"?z:D+1)+O).join(", "),src:N({config:x,src:S,quality:I,width:T[M]})}}function g(v,x){let{src:S,sizes:w,unoptimized:P=!1,priority:I=!1,loading:C,className:N,quality:T,width:O,height:M,fill:z=!1,style:D,overrideSrc:B,onLoad:G,onLoadingComplete:J,placeholder:Y="empty",blurDataURL:X,fetchPriority:Z,decoding:he="async",layout:fe,objectFit:ee,objectPosition:ie,lazyBoundary:_e,lazyRoot:Ce,...ge}=v;const{imgConf:we,showAltText:V,blurComplete:oe,defaultLoader:F}=x;let ce,je=we||n.imageConfigDefault;if("allSizes"in je)ce=je;else{var Oe;const de=[...je.deviceSizes,...je.imageSizes].sort((ve,qe)=>ve-qe),Q=je.deviceSizes.sort((ve,qe)=>ve-qe),se=(Oe=je.qualities)==null?void 0:Oe.sort((ve,qe)=>ve-qe);ce={...je,allSizes:de,deviceSizes:Q,qualities:se}}if(typeof F>"u")throw new Error(`images.loaderFile detected but the file is missing default export.
|
|
4
|
+
Learn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor`);const ke=ge?te&&typeof te=="object"&&te.ref:z,[ct,Me,Le]=(0,_.useIntersection)({rootMargin:"200px"}),tt=o.default.useCallback(re=>{(ne.current!==$||Pe.current!==q)&&(Le(),ne.current=$,Pe.current=q),ct(re),ke&&(typeof ke=="function"?ke(re):typeof ke=="object"&&(ke.current=re))},[$,ke,q,Le,ct]);o.default.useEffect(()=>{process.env.NODE_ENV==="production"&&F&&(!Me||!je||w(F,q,$,{locale:ee},{kind:Oe},ce))},[$,q,Me,ee,je,V==null?void 0:V.locale,F,ce,Oe]);const We={ref:tt,onClick(re){if(process.env.NODE_ENV!=="production"&&!re)throw new Error('Component rendered inside next/link has to pass click event to "onClick" prop.');!ge&&typeof ie=="function"&&ie(re),ge&&te.props&&typeof te.props.onClick=="function"&&te.props.onClick(re),F&&(re.defaultPrevented||I(re,F,q,$,Z,he,fe,ee,ce))},onMouseEnter(re){!ge&&typeof _e=="function"&&_e(re),ge&&te.props&&typeof te.props.onMouseEnter=="function"&&te.props.onMouseEnter(re),F&&((!je||process.env.NODE_ENV==="development")&&ce||w(F,q,$,{locale:ee,priority:!0,bypassPrefetchedCheck:!0},{kind:Oe},ce))},onTouchStart:process.env.__NEXT_LINK_NO_TOUCH_START?void 0:function(De){!ge&&typeof Ce=="function"&&Ce(De),ge&&te.props&&typeof te.props.onTouchStart=="function"&&te.props.onTouchStart(De),F&&(!je&&ce||w(F,q,$,{locale:ee,priority:!0,bypassPrefetchedCheck:!0},{kind:Oe},ce))}};if((0,u.isAbsoluteUrl)($))We.href=$;else if(!ge||X||te.type==="a"&&!("href"in te.props)){const re=typeof ee<"u"?ee:V==null?void 0:V.locale,De=(V==null?void 0:V.isLocaleDomain)&&(0,g.getDomainLocale)($,re,V==null?void 0:V.locales,V==null?void 0:V.domainLocales);We.href=De||(0,v.addBasePath)((0,d.addLocale)($,re,V==null?void 0:V.defaultLocale))}return ge?o.default.cloneElement(te,We):(0,n.jsx)("a",{...we,...We,children:D})});(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)})(qa,qa.exports);var Vx=qa.exports,Gx=Vx;const Tt=U.getDefaultExportFromCjs(Gx),Kx="_link_w24h0_1",Qx="_wrapper_w24h0_98",Yx="_text_w24h0_106",Yi={link:Kx,wrapper:Qx,text:Yx},wt=({children:e,adornments:t,className:r,disableUnderline:n,href:o,mode:i,size:c,title:l,onClick:u,disablePadding:d,...h})=>{const m=p.helpers.ValidateProp({fieldTypes:Dn.SizesSmallExtended,property:c,fallback:"medium"}),_=p.helpers.ValidateProp({fieldTypes:Dn.Mode,property:i,fallback:"default"});return s.jsx(Tt,{...h,className:p.helpers.classNameConcat(Yi.link,r),href:o&&o.length>0?o:"#","data-size":m,"data-variant":_,title:l||"NextLink","data-disable-underline":n??!1,"data-disable-padding":d??!0,children:s.jsxs("div",{className:Yi.wrapper,onClick:u,children:[t==null?void 0:t.start,s.jsx("p",{className:Yi.text,"data-size":m,children:e}),t==null?void 0:t.end]})})},Xx=({ICONS:e})=>{const{resetFeedback:t}=xn();return s.jsxs("div",{className:vs["wishlist--snack--actions"],children:[s.jsx(wt,{href:"/favoritos",children:"Ver Favoritos"}),s.jsx(p.Button,{variant:"tertiary",size:"small",onClick:t,adornment:{start:s.jsx(p.Icon,{name:e.close})}})]})},Oc=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:r})=>{const n=vc(),{resetFeedback:o}=xn(),i=j.useRef(null);return j.useEffect(()=>{i.current&&clearTimeout(i.current),n&&(i.current=setTimeout(()=>{o()},5e3))},[n,o]),(n==null?void 0:n.active)&&s.jsx(Fn,{Z_INDEX_WAR:r,className:vs["wishlist--snack"],"data-action":n.action,title:n.action==="add"?e.messages.add:e.messages.remove,supportChildren:s.jsx(Xx,{ICONS:t}),size:"medium"})};Oc.displayName="WishList.Feedback";const Ac={"product-list--banner":"_product-list--banner_sfibj_1","product-list--card":"_product-list--card_sfibj_30","product-list":"_product-list_sfibj_1"},Wp=({className:e,children:t,columns:r=1,isMobile:n=!1,gap:o=8,position_grid:i,totalColumns:c=4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:l,...u})=>{const d=j.useMemo(()=>r%c===0?"initial":n||r<2?l:l.split("/").reverse().join("/"),[r,c,n]);return s.jsx("div",{...u,className:p.helpers.classNameConcat(Ac["product-list--banner"],e),style:{aspectRatio:d,maxWidth:`${r/c*100}%`,order:i,padding:o/2},children:t})};Wp.displayName="ProductList.Banner";class Jx{constructor(){Gr(this,"cache",new Map);Gr(this,"pendingRequests",new Map);Gr(this,"rafId",null)}request(t,r,n){const o=this.getCacheKey(t,n==null?void 0:n.filterTexture);if(this.cache.has(o)){r(this.cache.get(o));return}const i=this.pendingRequests.get(o);i?i.callbacks.push(r):this.pendingRequests.set(o,{productId:t,callbacks:[r],filterTexture:n.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=[],n=[];if(t.forEach((i,c)=>{this.cache.has(c)?n.push([c,i]):r.push(i)}),n.forEach(([i,c])=>{const l=this.cache.get(i);l&&c.callbacks.forEach(u=>u(l)),t.delete(i)}),r.length===0)return;const o=new Map;r.forEach(i=>{var u;const c=((u=i.filterTexture)==null?void 0:u.sort().join(","))||"no-filter",l=o.get(c)||[];l.push(i),o.set(c,l)}),await Promise.all(Array.from(o.values()).map(i=>this.executeGroupRequest(i)))}async executeGroupRequest(t){const r=t.map(o=>o.productId),n=t[0].filterTexture;try{const o=await U.fetchProxy("/_v/proxy/catalog/product/similars",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:r})});if(!o.ok)throw new Error("Erro ao buscar similares.");const i=await o.json();t.forEach(c=>{const l=i[c.productId]||[],u=n&&l.length?U.formattedSimilars(l,n):l,d=this.getCacheKey(c.productId,n);this.cache.set(d,u),c.callbacks.forEach(h=>h(u)),this.pendingRequests.delete(d)})}catch(o){console.error("Erro ao buscar similares:",o),t.forEach(i=>{const c=this.getCacheKey(i.productId,n);i.callbacks.forEach(l=>l([])),this.pendingRequests.delete(c)})}}clearCache(){this.cache.clear()}}const zu=new Jx;function kc(e,t){const[r,n]=j.useState([]),o=j.useRef(!1);j.useEffect(()=>{o.current=!1},[e]);const i=j.useCallback(()=>{!e||o.current||(o.current=!0,zu.request(e,n,t))},[e,t]),c=j.useCallback(()=>zu.clearCache(),[]);return{items:r,loadSimilars:i,clearCache:c}}const Vp=({isKit:e,parent:t,productId:r,setNotify:n,CONSTANTS:o})=>{const{router:i}=Ae(),{items:c,loadSimilars:l}=kc(r,{filterTexture:o.TEXTURE_IMAGE}),u=j.useRef(!1),d=j.useRef(null),h=g=>i.push(g??""),m=j.useCallback(g=>{!r||!g||l()},[r,l]),_=j.useCallback((g,v)=>{if(!g.isIntersecting){o.PLP_INFINITE_SCROLL&&d.current&&(clearTimeout(d.current),d.current=null);return}if(g.intersectionRatio>=v.threshold&&!u.current){if(o.PLP_INFINITE_SCROLL){d.current=setTimeout(()=>{m(!0)},o.PLP_PRODUCT_SIMILAR_DELAY);return}m(!0)}},[m]);return j.useEffect(()=>{if(e||!t.current)return;const g={root:null,threshold:.1},v=new IntersectionObserver(([x])=>{_(x,g)},g);return v.observe(t.current),()=>{d.current&&clearTimeout(d.current),v.disconnect()}},[_,t,e]),s.jsx(Ue.Actions,{data:c,callback:h,isKit:e,children:!e&&s.jsx(Ue.SizeSelector,{setNotify:n,PLP_SIZE_ORDER:o.PLP_SIZE_ORDER})})};Vp.displayName="ProductList.Card.Actions";const Gp=({className:e,children:t,gap:r=32,item:n,isMobile:o,order:i,tag:c,hasMaxWidth:l=!0,index:u,setSkuSelected:d,showVideo:h,CONSTANTS:m,..._})=>{const g=j.useRef(null),{availability:{status:v}}=n,x=j.useCallback((w,P)=>{var I;typeof d=="function"&&d((I=w.isVariantOf)==null?void 0:I.hasVariant,P)},[d]),S=n.name.substring(0,4).toLowerCase()==="kit ";return s.jsxs("div",{..._,className:p.helpers.classNameConcat(Ac["product-list--card"],e),"data-mobile":o,"data-order":i,ref:g,style:{...l&&{maxWidth:o?"50%":"25%"},order:i,padding:r/2},children:[s.jsxs(Ue.Root,{item:n,isMobile:o,index:u,size:o?"small":"medium",order:i,outStock:!v,CONSTANTS:m,children:[s.jsx(Ue.Header,{product:n,tag:c==null?void 0:c.commercial}),s.jsx(Ue.Media,{showVideo:h,hasPriority:!0}),s.jsxs(Ue.Wrapper,{type:"body",children:[s.jsx(Ue.Title,{tag:c==null?void 0:c.institucional}),s.jsx(Vp,{productId:n.isVariantOf.productGroupID,parent:g,setNotify:x,isKit:S,CONSTANTS:m}),!S&&s.jsx(Ue.OutStock,{callback:x})]}),s.jsx(Ue.Wrapper,{type:"footer",children:v&&s.jsx(Ue.BuyButton,{isKit:S})})]}),t]})};Gp.displayName="ProductList.Card";const Kp=({children:e,className:t,...r})=>s.jsx("div",{...r,className:p.helpers.classNameConcat(Ac["product-list"],t),children:e});Kp.displayName="ProductList.Grid";const Dt={Banner:Wp,Card:Gp,Root:Kp,helpers:Xv},Zx="_pdc_av7d8_1",St={"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:Zx},Mc=({className:e,ICONS:t,PLP_NOT_RESULT:r})=>{const{router:n}=Ae(),{isMobile:o}=xe(),i=()=>{n.push(r==null?void 0:r.link)};return s.jsxs("div",{className:p.helpers.classNameConcat(St["pdc--empty"],e),children:[s.jsxs(p.TextStructure.DivWrapper,{className:St["pdc--empty-wrapper"],children:[s.jsx("span",{className:o?"typography-style-body-md":"typography-style-heading-sm",children:r.title}),s.jsx("p",{className:o?"typography-style-body-xs":"typography-style-body-sm",children:r.subtitle})]}),s.jsx(p.Button,{adornment:{end:s.jsx(p.Icon,{name:t.arrow_right})},className:"typography-style-body-sm-strong",onClick:()=>i(),variant:"tertiary",children:s.jsx("b",{children:r.text})})]})};Mc.displayName="PDC.Empty";const Lc=e=>s.jsx("div",{...e,className:St["pdc--infinite--next-page"],children:s.jsx(p.Spinner,{className:St["pdc--infinite--next-page--spinner"]})});Lc.displayName="PDC.Spinner";function Qp({CONSTANTS:e}){const{sendDataLayerEvent:t}=Ee(),{isMobile:r}=xe(),{getAvailableProductTag:n}=jr(),[o,i]=j.useState([]),[c,l]=j.useState(!0),u=ts(),d=u.join(","),h=r?16:32;return j.useEffect(()=>{const m=async()=>{u.length?await fetch("/api/wishlist/products",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({productIds:u})}).then(_=>_.json()).then(_=>{i(_),t({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:_}}})}).catch(_=>console.error(_)):i([]),l(!1)};if(u.length){m();return}if(u.length===0&&o.length===0){l(!1);return}i([]),l(!1)},[d]),s.jsx("section",{className:vs["wishlist-grid"],children:s.jsxs("div",{className:vs["wishlist-grid--container"],children:[c&&s.jsx(Lc,{}),!u.length&&!(o!=null&&o.length)&&!c&&s.jsx(Mc,{className:vs["pdc-empty-modifier"],ICONS:e.ICONS,PLP_NOT_RESULT:e.WISHLIST_NOT_RESULT}),s.jsx(Dt.Root,{children:Array.isArray(o)&&o.map((m,_)=>{const g=m.node.cluster.highlights||[],v=n(g);return s.jsx(Dt.Card,{gap:h,isMobile:r??!1,item:m.node,tag:v,index:_,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}},m.node.sku)})})]})})}Qp.displayName="Wishlist.Grid";const eb=e=>e.map(t=>{var r;return(r=t.isVariantOf)==null?void 0:r.productGroupID})??[],Yp=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:r})=>{const n=rs(),o=ts(),i=vc(),{updateList:c}=xn();return j.useEffect(()=>{var u,d;i.active&&Zt.set("fs::wishlist",o);const l=async()=>{var h;await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:o,docId:(h=n==null?void 0:n.user)==null?void 0:h.id})}).catch(m=>{console.error("Error updating wishlist:",m)})};i.active&&((u=n.user)!=null&&u.id)&&o.length!==((d=n.wishlist)==null?void 0:d.length)&&l()},[i,n,o]),j.useEffect(()=>{var d;const l=async()=>{const h=await Zt.get("fs::wishlist");h&&(h==null?void 0:h.length)!==o.length&&c(h)},u=async()=>{var g;const h=await Zt.get("fs::wishlist")??[],m=n.wishlist?typeof n.wishlist[0]=="object"?eb(n.wishlist):n.wishlist:[],_=[...new Set([...h,...m])];c(_),Zt.set("fs::wishlist",_),m.length!==_.length&&await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:_,docId:(g=n.user)==null?void 0:g.id})}).catch(v=>{console.error("Error updating wishlist:",v)})};if((d=n.user)!=null&&d.id){u();return}l()},[n,c]),s.jsx(Oc,{ICONS:t,Z_INDEX_WAR:r,WISHLIST_INFO:e})};Yp.displayName="Wishlist.Init";const Xp=({product:e,priceInfo:t,size:r="medium",style:n,ICONS:o})=>{const{sendDataLayerEvent:i,currentLocalRef:c}=Ee(),l=ts(),{toggleProduct:u}=xn(),{isVariantOf:{productGroupID:d}}=e;return s.jsx(p.Button,{adornment:{start:s.jsx(p.Icon,{size:r,name:l.includes(d)?o.favorite_true:o.favorite_false})},onClick:()=>{u(d),i({functionKey:"productEvents",data:{event:l.includes(d)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:c.current},commonData:{...e,...t}}})},style:{...n,border:"none"},variant:"tertiary"})};Xp.displayName="WishList.Toggle";const Jp={Feedback:Oc,Toggle:Xp,Grid:Qp,Init:Yp},Zp=({product:e,tag:t,size:r="small"})=>{const{CONSTANTS:n}=Gt(),{tags:o}=jr(),i=e.offers.offers[0],c=U.getDiscountPercent(i.listPrice,i.price),l=o==null?void 0:o.flagDiscount;return s.jsxs(Ue.Wrapper,{type:"header",style:{zIndex:n.Z_INDEX_WAR.product_card_header},children:[c>0&&!t&&(l==null?void 0:l.enableTag)&&s.jsxs(p.Tag,{title:`${c}% ${l==null?void 0:l.tagText}`,variant:"quaternary",size:"small",style:{background:l==null?void 0:l.tagColor,color:l==null?void 0:l.tagTextColor},children:[c,"% ",l==null?void 0:l.tagText]}),t?s.jsx(p.Tag,{title:t.value,adornment:{start:t.enableIcon&&t.icon?s.jsx(p.Icon,{name:t.icon,size:"small",style:{color:t.iconColor}}):null},size:r,variant:"quaternary",style:{background:t.tagColor,color:t.textColor},children:t.value}):null,n.PRODUCT_CARD_TOP_WISHLIST_TOGGLE&&s.jsx(Jp.Toggle,{product:e,priceInfo:{price:i.price,listPrice:i.listPrice},variant:"card",ICONS:n.ICONS})]})};Zp.displayName="ProductCard.Actions.Header";const eh=({className:e,children:t,hasPriority:r=!1,showVideo:n=!1,...o})=>{const{element:i,index:c,item:{image:l,slug:u,video:d},sendSelectItemEvent:h,order:m,CONSTANTS:_}=Gt(),g=U.getFirstImages({images:l,label:{first:_.MAIN_IMAGE,second:_.SECOND_IMAGE}});return s.jsxs("div",{...o,className:p.helpers.classNameConcat(mt["product-card--image"],e),ref:i,style:{aspectRatio:_.PRODUCT_CARD_IMAGE_ASPECT_RATIO},children:[s.jsx(Tt,{href:`/${u}/p`,onClick:h,onMouseUp:v=>{v.button===1&&h(),_.PLP_INFINITE_SCROLL&&sessionStorage.setItem(_.PLP_GRID_SCROLL_BACK.order,String(m))},children:s.jsx("div",{className:mt["product-card--image--container"],children:Array.isArray(g)&&g.map(({url:v,alternateName:x},S)=>j.createElement(at.Image,{..._.PRODUCT_IMAGE_DIMENSIONS.product_card,style:_.PRODUCT_IMAGE_DIMENSIONS.product_card,alt:x??"product image",key:S,...r&&{priority:S===0&&c<4},objectFit:"cover",src:v}))})}),_.PLP_SHOW_VIDEO_ON_PRODUCT_CARD&&n&&d&&s.jsx(Ue.Video,{url:d,poster:g[0].url}),t]})};eh.displayName="ProductCard.Media.Media";const th=({className:e,callback:t,children:r,...n})=>{const{isMobile:o,item:i,CONSTANTS:{PRODUCT_CARD_TEXTS:c}}=Gt(),{availability:{status:l}}=i;return l?null:s.jsxs("div",{...n,className:p.helpers.classNameConcat(mt["product-card--outstock"],e),children:[s.jsx(p.Tag,{size:"small",variant:"secondary",title:c.disabled,children:c.disabled}),s.jsx(p.Button,{className:p.helpers.classNameConcat(e,"buy-button"),size:o?"medium":"large",variant:"quaternary",onClick:()=>{typeof t=="function"&&t(i)},children:c.notify})]})};th.displayName="ProductCard.OutStock";const rh=({children:e,className:t="",index:r,isMobile:n=!1,item:o,size:i,order:c,outStock:l,shelfTitle:u,CONSTANTS:d,...h})=>s.jsx(Sx,{item:o,isMobile:n,outStock:l,order:c,size:i,index:r,shelfTitle:u,CONSTANTS:d,children:s.jsx("div",{...h,className:p.helpers.classNameConcat(mt["product-card--wrapper"],t),"data-size":i,children:e})});rh.displayName="ProductCard.Root";const nh=({disabled:e,label:t,size:r,value:n,onClick:o,...i})=>s.jsxs(p.ToggleSize.Wrapper,{...i,disabled:!1,outOfStock:e,size:r,onClick:o,children:[s.jsx(p.ToggleSize.DisabledAdornment,{}),s.jsx(p.ToggleSize.Text,{children:t})]});nh.displayName="ProductCard.SizeSelector.Item";const sh=({active:e=!1,callback:t,selectedSku:r=null,item:n,setNotify:o})=>{const{item:i,isMobile:c,setSelectedSku:l,eventDataRef:u}=Gt();n.productId=i.id;const d=U.disableSKU(n),h=U.getSKUName(n,"tamanho");!d&&!u.current.availableSkus.includes(h)&&u.current.availableSkus.push(h);const m=j.useCallback(g=>{const v=r===g?null:g;typeof l=="function"&&l(v),typeof t=="function"&&t(v)},[t,l,r]),_=j.useCallback(()=>{if(d&&typeof o=="function"){o(i,n);return}m(n)},[n,o,m,d,i]);return s.jsx(nh,{active:e,disabled:d,label:h,onClick:()=>_(),size:c?"x-small":"small",value:n})};sh.displayName="ProductCard.SizeSelector.SkuItem";const oh=({items:e,getLabel:t,PLP_SIZE_ORDER:r})=>Array.isArray(e)?[...e].sort((n,o)=>{const i=t(n).toUpperCase(),c=t(o).toUpperCase(),l=r.indexOf(i)-r.indexOf(c);return l!==0?l:i.localeCompare(c,"pt-BR")}):[],ih=({callback:e,className:t="",children:r,setNotify:n,PLP_SIZE_ORDER:o,...i})=>{const{isMobile:c,item:{isVariantOf:{hasVariant:l}},selectedSku:u}=Gt(),d=j.useMemo(()=>Array.isArray(l)?oh({items:l,getLabel:h=>U.getSKUName(h,"tamanho"),PLP_SIZE_ORDER:o}):[],[l]);return s.jsxs("div",{...i,className:p.helpers.classNameConcat(mt["product-card--selectors--size"],t),"data-mobile":c,children:[s.jsx("div",{className:mt["product-card--selectors--size--skus"],children:d.map((h,m)=>s.jsx(sh,{active:u===h,callback:e,item:h,selectedSku:u,setNotify:n},`size--${m}--${h.sku}`))}),s.jsx("div",{className:mt["product-card--selectors--size--button"],children:r})]})};ih.displayName="ProductCard.SizeSelector";const Ba=({alt:e="",callback:t,more:r,total:n=4,src:o,url:i,...c})=>s.jsxs(p.ToggleStyle.Wrapper,{...c,onClick:()=>{typeof t=="function"&&t(i)},children:[s.jsx(p.ToggleStyle.DisabledAdornment,{}),s.jsxs(p.ToggleStyle.Texture,{children:[o&&s.jsx(at.Image,{alt:e??o,src:o,height:34,width:34}),r&&s.jsx(p.TextStructure.DivWrapper,{className:mt["product-card--selectors--style--more"],children:s.jsxs("p",{children:["+ ",n]})})]})]}),tb=({children:e,callback:t,data:r,total:n=4,size:o,...i})=>{const{index:c}=Gt(),{triggerSelectItemEventRef:l}=Ee();return s.jsxs("div",{...i,children:[e,Array.isArray(r)&&r.slice(0,n).map((u,d)=>s.jsx(Ba,{callback:h=>{l.current.trigger=!0,l.current.index=c,typeof t=="function"&&t(h)},src:(u==null?void 0:u.textureImage)??"",alt:u==null?void 0:u.textureAlt,url:u==null?void 0:u.slug,size:o},d)),Array.isArray(r)&&(r==null?void 0:r.length)>n&&s.jsx(Ba,{size:o,total:r.length-n,more:!0})]})},ah=({callback:e,className:t,data:r,images:n=[],findTexture:o,...i})=>{const{CONSTANTS:c}=Gt(),l=o||c.TEXTURE_IMAGE,u=n==null?void 0:n.find(d=>l.includes(d.alternateName));return s.jsx(tb,{...i,callback:e,className:p.helpers.classNameConcat(mt["product-card--selectors--style"],t),data:r,size:"x-small",children:u&&s.jsx(Ba,{active:!0,size:"x-small",src:u.url})})};ah.displayName="ProductCard.StyleSelector";const ch=({className:e,hasDecimal:t,...r})=>{const{isMobile:n,item:{offers:{lowPrice:o,highPrice:i},installments:{count:c,value:l}},eventDataRef:u}=Gt();u.current.priceInfo={price:o,listPrice:i};const d=U.formatPriceToCurrency(i,t),h=U.formatPriceToCurrency(o,t),m=U.formatPriceToCurrency(l??0),_=n?"horizontal":"stacked";return s.jsx("div",{...r,className:p.helpers.classNameConcat(mt["product-card--price"],e),"data-mobile":n,children:s.jsx(p.ProductInfo.Root,{size:"small",layout:_,children:s.jsxs(p.ProductInfo.Wrapper,{size:"small",layout:_,children:[s.jsx(p.ProductInfo.ValuesWrapper,{children:h!==d?s.jsxs(s.Fragment,{children:[s.jsx(p.ProductInfo.Price,{label:"originalPrice",value:d,size:"small"}),s.jsx(p.ProductInfo.Price,{label:"discountPrice",value:h,size:"small"})]}):s.jsx(p.ProductInfo.Price,{label:"defaultPrice",value:h,size:"small"})}),c&&c>1&&l?s.jsx(p.ProductInfo.Price,{label:"installment",value:`${c}x ${m}`,size:"small"}):null]})})})};ch.displayName="ProductCard.Price";const lh=({tag:e,className:t})=>{const{item:{name:r}}=Gt();return s.jsxs("div",{className:p.helpers.classNameConcat(mt["product-card--title"],t),children:[s.jsx("div",{className:mt["product-card--title--tag"],children:e?s.jsx(p.Tag,{size:"small",title:e.value,variant:"quaternary",adornment:{start:e.enableIcon&&e.icon?s.jsx(p.Icon,{name:e.icon,style:{color:e.iconColor}}):null},style:{background:e.tagColor,color:e.textColor},children:e.value}):s.jsx("div",{})}),s.jsx("div",{className:mt["product-card--title--content"],children:r&&s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h3",{children:r})})})})]})};lh.displayName="ProductCard.Title";const uh=({className:e,url:t,poster:r,...n})=>{const{element:o}=Gt();return j.useEffect(()=>{if(!(o!=null&&o.current))return;const i=o.current,c=i.querySelector("video");if(c){const l=new IntersectionObserver(h=>{h.forEach(m=>{U.setVideoPlay(m.isIntersecting,c,t)})},{root:null,rootMargin:"0px",threshold:.5}),u=()=>{c.setAttribute("data-loaded","true")},d=()=>{i&&(l.observe(i),c.addEventListener("loadeddata",u))};return document.readyState==="complete"?d():window.addEventListener("load",d),()=>{l.disconnect(),window.removeEventListener("load",d)}}return()=>null},[t,o]),s.jsx("div",{...n,className:p.helpers.classNameConcat(mt["product-card--video"],e),children:t&&s.jsx(at.Video,{autoPlay:!1,muted:!0,loop:!0,preload:"none",playsInline:!0,poster:r})})};uh.displayName="ProductCard.Media.Video";const dh=({children:e,className:t,type:r,...n})=>s.jsx("div",{...n,className:p.helpers.classNameConcat(mt[`product-card--${r}`],t),children:e});dh.displayName="ProductCard.Wrapper";const Ue={Actions:Mp,BuyButton:Lp,Header:Zp,Media:eh,Root:rh,OutStock:th,Price:ch,SizeSelector:ih,StyleSelector:ah,Title:lh,Video:uh,Wrapper:dh},rb="_carousel_1egdv_1",nb="_shelf__container_1egdv_14",sb="_shelf_without_carousel_1egdv_34",ob="_card_container_1egdv_57",Mn={carousel:rb,"custom-controllers":"_custom-controllers_1egdv_5",shelf__container:nb,"controllers-arrows-bullets":"_controllers-arrows-bullets_1egdv_23",shelf_without_carousel:sb,card_container:ob},qu=({title:e})=>s.jsx("div",{className:Mn.shelf__container,children:e&&s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{children:[s.jsx("h2",{className:p.helpers.classNameConcat("typography-style-body-md",U.responsive["responsive-mobile-flex"]),children:e}),s.jsx("h2",{className:p.helpers.classNameConcat("typography-style-heading-md",U.responsive["responsive-desktop-flex"]),children:e})]})})}),ib=({children:e,ICONS:t,itemsPerPage:r,title:n})=>{const{isMobile:o}=xe(),i=r[o?"mobile":"desktop"],{initialize:c,controller:l,itemsStyles:u,pagination:d}=p.Carousel.useCarousel({itemsPerPage:i,gap:10,loop:!0,direction:"row"}),h=j.Children.toArray(e).length;return o||h>=4?s.jsxs(p.Carousel.Root,{innerRef:_=>{c(_)},className:Mn.carousel,children:[s.jsxs("div",{className:Mn["custom-controllers"],children:[n&&s.jsx(qu,{title:n}),i<h&&s.jsxs(p.Carousel.Controller,{className:Mn["controllers-arrows-bullets"],children:[s.jsxs(p.Carousel.Arrows,{children:[s.jsx(p.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.prevPage(),adornment:{start:s.jsx(p.Icon,{name:t.arrow_left})}}),s.jsx(p.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.nextPage(),adornment:{start:s.jsx(p.Icon,{name:t.arrow_right})}})]}),!o&&i>2&&s.jsx(p.Carousel.Bullets,{page:d.currentPage,total:d.totalPages,onBulletClick:_=>l==null?void 0:l.navigateTo(_)})]})]}),s.jsx(p.Carousel.Body,{children:j.Children.map(e,(_,g)=>s.jsx(p.Carousel.Item,{style:{...u,overflow:"hidden"},children:_},`${n}_${g}`))})]}):s.jsxs(s.Fragment,{children:[n&&s.jsx(qu,{title:n}),s.jsx("div",{className:Mn.shelf_without_carousel,children:e})]})},fh=({className:e,item:t,isMobile:r,size:n,shelfTitle:o,...i})=>{const c=j.useRef(null),{getAvailableProductTag:l}=jr(),{availability:{status:u}}=t,d=m=>{const _=m.filter(g=>!i.CONSTANTS.TEXTURE_IMAGE.includes(g.keywords));return r?_.splice(0,2):_},h=l(t.cluster.highlights);return s.jsx("div",{ref:c,className:Mn.card_container,children:s.jsxs(Ue.Root,{...i,item:{...t,image:d(t.image)},isMobile:r,size:r?"small":"medium",outStock:!u,shelfTitle:o,children:[s.jsx(Ue.Header,{product:t,tag:h==null?void 0:h.commercial}),s.jsx(Ue.Media,{}),s.jsxs(Ue.Wrapper,{type:"body",children:[s.jsx(Ue.Title,{tag:h==null?void 0:h.institucional}),s.jsx(Ue.Actions,{})]}),s.jsx(Ue.Wrapper,{type:"footer"})]})})};fh.displayName="ProductList.Card";const ws={Shelf:ib,Card:fh},ph=({CONSTANTS:e,inView:t,products:r,innerRef:n})=>{const o=j.useMemo(()=>bx(r),[r]),{isMobile:i}=xe(),{addItemsToCart:c}=Xe(),{sendDataLayerEvent:l}=Ee(),{getAvailableProductTag:u}=jr(),[d,h]=j.useState({totalPrice:0,products:{}}),m=()=>{const g=Object.values(d.products);c(g),l({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:g.map(v=>{const x=o.find(S=>S.node.id===v.productId);return x==null?void 0:x.node})},supportData:{selectedSkus:g,price:d.totalPrice}}})},_=({selectedProduct:g,productId:v})=>{const x=jx({selectedProduct:g,productId:v,prevState:d,mainSellerId:e.StoreConfig_MainSellerId});h(x)};return j.useEffect(()=>{if(!t||o.length===0)return;const g=e.BUY_PACKAGE.header.title;l({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o},customData:{item_list_name:g},outsideEcommerceData:{item_list_name:g}}})},[t]),s.jsxs("div",{className:Tr.container,ref:n,children:[s.jsx("div",{className:Tr["carousel-container"],style:{width:o.length<=3?"max-content":"75%"},children:s.jsx(ws.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:g},v)=>{var w,P,I;const x=u(g.cluster.highlights),{availability:{status:S}}=g;return S?s.jsxs(Ue.Root,{item:{...g,image:Nc.helpers.product.getFirstImages({images:g.image,label:{first:e.MAIN_IMAGE,second:e.SECOND_IMAGE}})},isMobile:i,size:"medium",index:v,shelfTitle:e.BUY_PACKAGE.header.title,CONSTANTS:e,children:[s.jsx(Ue.Header,{product:g,tag:x.commercial}),s.jsx(Ue.Media,{}),s.jsxs(Ue.Wrapper,{type:"body",children:[s.jsx(Ue.Title,{tag:{value:(w=x.institucional)==null?void 0:w.value,enableIcon:(P=x.institucional)==null?void 0:P.enableIcon,icon:(I=x.institucional)==null?void 0:I.icon}}),s.jsx(Ue.Actions,{children:s.jsx(Ue.SizeSelector,{callback:C=>_({selectedProduct:C,productId:g.id}),PLP_SIZE_ORDER:e.PLP_SIZE_ORDER})})]})]},g.id):null})})}),s.jsx("div",{className:Tr["add-cart-container"],children:s.jsx(xx,{handleAddAllToCart:m,selectedProducts:d,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,BUY_PACKAGE:e.BUY_PACKAGE,FREIGHT_CALCULATION:e.FREIGHT_CALCULATION}})})]})},Dc={"btn-login":"_btn-login_yas63_12","btn-header":"_btn-header_yas63_22","header-animation":"_header-animation_yas63_35"},Fc=({id:e})=>{const{setIsOpen:t,cartStore:{items:r}}=Xe(),{handleSelectContent:n}=Ee(),{CONSTANTS:o}=Ze(),i=r.reduce((c,l)=>c+(l.quantity??0),0);return s.jsx(p.Header.SupportItem,{onClick:()=>{t(!0),n({content:"header:minicart"})},id:e,children:s.jsxs(p.Badge.AutoPositioner,{children:[s.jsx(p.Badge.Count,{count:i,size:"medium",variant:"primary",style:{backgroundColor:"black",display:i>0?"flex":"none"}}),s.jsx(p.Icon,{name:o.header.ICONS.bag,size:"medium"})]})})};Fc.displayName="Header.Bag";const mn=({children:e,href:t,...r})=>t&&t!=="#"?s.jsx(Tt,{href:t.startsWith("/")?t:`/${t}`,...r,children:e}):e,hh=()=>{const{headerData:e}=Ze(),{handleSelectContent:t}=Ee(),{reset:r,updateValue:n}=ks(),o=i=>{i?n(i):r()};return s.jsx(p.Header.Categories,{children:Array.isArray(e.categories)&&e.categories.map((i,c)=>s.jsx(mn,{href:i.link,onMouseEnter:()=>o(i.submenuId),onFocus:()=>o(i.submenuId),children:s.jsx(p.Header.CategoryItem,{className:Dc["btn-header"],value:i.submenuId??null,adornment:{start:s.jsx(p.Icon,{name:i.iconStart}),end:s.jsx(p.Icon,{name:i.iconEnd})},style:{textWrap:"nowrap",gap:"0"},onClick:()=>{t({content:`header:${i.label}`})},children:i.label})},`category-${i.label}-${c}`))})};hh.displayName="Header.Categories";function ab(){const{handleSelectContent:e}=Ee(),{CONSTANTS:t}=Ze(),{setValue:r}=Ho();return s.jsx(p.Header.SupportItem,{onClick:()=>{r(!0),e({content:"header:search"})},children:s.jsx(p.Icon,{name:t.header.ICONS.search,size:"medium"})})}const cb={"menu-subcategories-container":"_menu-subcategories-container_a93cr_1"},lb={"observer-wrapper":"_observer-wrapper_r43gk_1"},Ko=({children:e,eventData:t,observerOptions:r,callBackWhenVisible:n,stopOnIntersection:o=!0,className:i,...c})=>{const l=j.useRef(null),u=fc(l,o,r),{sendDataLayerEvent:d}=Ee();return j.useEffect(()=>{u&&(typeof n=="function"&&n(),t&&d({...t}))},[u]),s.jsx("div",{...c,ref:l,className:p.helpers.classNameConcat(lb["observer-wrapper"],i),children:e})},mh=({thumbnails:e,category:t,isMobile:r=!0,callBack:n})=>{const{handleSelectPromotionEvent:o}=Ee(),i=50/e.length;return s.jsx("div",{className:cb["menu-subcategories-container"],children:e.map((c,l)=>{const u=r?c.srcMobile:c.srcDesk;if(!u)return null;const d={creative_name:"banner-menu",creative_slot:`banner-menu:${t}:${l+1}`,promotion_id:u,promotion_name:c.promotion_name};return s.jsx(Ko,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...d}}}},observerOptions:{delay:1e3},children:s.jsxs(Tt,{href:c.link??"#",onClick:()=>{typeof n=="function"&&n(),o({updatePromotionRef:!0,promotion:d})},children:[s.jsx(at.Image,{src:u,alt:c.label??u,width:500,height:500,sizes:`(max-width: 768px) 100vw, (max-width: 1023px) 75vw, ${i}vw`}),c.label&&s.jsx("p",{children:c.label})]})},`thumb-${c.label}-${l}`)})})};mh.displayName="Menu.Thumbnail";const To={"menu-desktop":"_menu-desktop_c3fq0_1","menu-categories":"_menu-categories_c3fq0_12","menu-categories--see-all":"_menu-categories--see-all_c3fq0_30"},_h=({children:e,dividerOnRight:t=!0,subMenu:r,...n})=>{var u;const{router:o}=Ae(),{reset:i}=ks(),{handleSelectContent:c}=Ee(),{CONSTANTS:l}=Ze();return s.jsxs("div",{...n,className:To["menu-categories"],children:[(u=r==null?void 0:r.subCategories)==null?void 0:u.map((d,h)=>{var g,v,x,S;const m=d.listCollapseDesk&&!((g=d.see_all)!=null&&g.link)?{expandAfterRowsQty:d.rowsToShowDesk}:{},_=d.listCollapseDesk&&!((v=d.see_all)!=null&&v.link)?{expansivesAdornments:{open:l.header.ICONS.add,close:l.header.ICONS.minus},expansivesLabels:{open:l.header.COMPONENT_LIST.listExpandLabel,close:l.header.COMPONENT_LIST.listCollapseLabel},iconSize:"x-small"}:"";return s.jsxs(p.ComponentList.Structure,{children:[s.jsx(mn,{href:d.linkLabel,title:d.label,onClick:()=>{d.linkLabel&&(i(),c({content:`menu:${d.label??""}:${r.label??""}`}))},children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h2",{children:d.label})})})}),s.jsx(p.ComponentList.List,{columns:1,...m,className:To["submenu-categories"],children:(x=d.items)==null?void 0:x.map((w,P)=>s.jsx(p.ComponentList.ListItem,{id:`list-item-${w.label}-${P}`,children:s.jsx(wt,{href:w.link??"#",size:"x-small",title:w.label??"",disableUnderline:!0,disablePadding:!0,onClick:()=>{i(),c({content:`menu:${d.label??""}:${w.label??""}:${r.label??""}`})},children:w.label})},`list-item-${w.label}-${P}`))}),((S=d.see_all)==null?void 0:S.link)&&s.jsx(mn,{href:d.see_all.link,title:d.see_all.link,onClick:()=>{var w;(w=d.see_all)!=null&&w.link&&(i(),c({content:`menu:${d.label??""}:${r.label}`}),o.push(d.see_all.link))},children:s.jsx(p.TextStructure.Root,{..._,children:s.jsxs("span",{className:To["menu-categories--see-all"],children:[d.see_all.link&&d.see_all.label,s.jsx(p.Icon,{name:l.header.ICONS.arrow_right,size:"small"})]})})})]},`list-${d.label}-${h}`)}),t&&s.jsx(p.Utils.Divider,{size:"small",direction:"vertical"})]})};_h.displayName="Menu.Categories";const gh=({children:e,dividerOnBottom:t=!0,...r})=>{const{CONSTANTS:n}=Ze();return s.jsxs(s.Fragment,{children:[s.jsx("div",{...r,className:To["menu-desktop"],style:{...r.style,justifyContent:n.header.ALIGNMENT_MENU},children:e}),t&&s.jsx(p.Utils.Divider,{size:"small"})]})};gh.displayName="Menu.MenuRoot";const Xi={Root:gh,Categories:_h,Thumbnail:mh},yh=()=>{const{headerData:e,CONSTANTS:t}=Ze(),r=af(),{reset:n}=ks();return s.jsx(p.Header.SubMenu,{className:"header-desktop-submenu",children:Array.isArray(e.subMenus)&&e.subMenus.map((o,i)=>{const{thumbnails:c,label:l,id:u}=o,d=u===r,h=c==null?void 0:c.some(m=>!!m.srcDesk);return s.jsxs(Xi.Root,{id:u,style:d?{display:"flex",zIndex:t.header.Z_INDEX_WAR.menu_desktop}:{display:"none"},dividerOnBottom:d,children:[s.jsx(Xi.Categories,{dividerOnRight:!!h,subMenu:o}),Array.isArray(c)&&s.jsx(Xi.Thumbnail,{thumbnails:c,isMobile:!1,category:l,callBack:n})]},`submenu-${u}-${i}`)})})};yh.displayName="Header.SubMenu";const vh=()=>{const{handleSelectContent:e}=Ee(),{CONSTANTS:t}=Ze();return s.jsx(Tt,{href:"/favoritos",children:s.jsx(p.Header.SupportItem,{onClick:()=>e({content:"header:wishlist"}),children:s.jsx(p.Icon,{name:t.header.ICONS.favorite_false,size:"medium"})})})};vh.displayName="Header.WishList";const ub="_root_im5yf_125",$t={"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:ub},xh=({className:e,children:t,...r})=>s.jsx("div",{...r,className:p.helpers.classNameConcat($t["user-menu--content"],e),children:t});xh.displayName="UserMenu.Content";var bh=(e=>(e.Account="account",e))(bh||{});const jh=({className:e,cashBack:t,credits:r,link:n,total:o,...i})=>{const c=t?U.formatPriceToCurrency(t):void 0,l=r?U.formatPriceToCurrency(r):void 0,u=o?U.formatPriceToCurrency(o):void 0;return s.jsx(p.Credits.Account,{...i,className:p.helpers.classNameConcat($t["user-menu--credits"],e),icon:"wallet",showIcon:!0,cashBackValue:c,creditsValue:l,linkMore:n,totalValue:u,type:bh.Account})};jh.displayName="UserMenu.Credits";const Sh=({className:e,children:t,description:r,text:n,...o})=>{const{isMobile:i}=xe();return s.jsx("div",{...o,className:p.helpers.classNameConcat($t["user-menu--login"],e),"data-mobile":i,children:s.jsxs("div",{className:$t["user-menu--login--content"],children:[s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:[s.jsx("h3",{className:"typography-style-body-lg-strong",children:n}),s.jsx("p",{children:r})]})}),t]})})};Sh.displayName="UserMenu.Login";const Ch=({className:e,isLogged:t,onLogoutClick:r,storeConfig:n,isMobile:o,LOGOUT_TEXT:i,LOGOUT_ICON:c,LOGIN_MENU_OPTIONS_ARRAY:l})=>{const u=o?l:l.filter(d=>d.deviceShown==="both"||d.deviceShown===(o?"mobile":"desktop"));return s.jsxs("ul",{className:p.helpers.classNameConcat($t["user-menu--menu"],e),children:[Array.isArray(u)&&u.map((d,h)=>s.jsx("li",{children:s.jsx(wt,{href:d.href??"#",size:"small",disableUnderline:!0,adornments:{start:s.jsx(p.Icon,{name:d.icon??"delete"})},children:d.label})},h)),t?s.jsx("li",{children:s.jsx(wt,{href:`${n.secureSubdomain}/api/vtexid/pub/logout?scope=mariafilo&returnUrl=${encodeURIComponent(`${n.storeUrl}`)}`,size:"small",disableUnderline:!0,onClick:r,adornments:{start:s.jsx(p.Icon,{name:c})},children:i})}):s.jsx(s.Fragment,{})]})};Ch.displayName="UserMenu.Menu";const wh=e=>{const t=j.useRef(null),r=j.useCallback(i=>{t.current&&!t.current.contains(i.target)&&e()},[e]),n=j.useCallback(i=>{t.current&&!t.current.contains(i.target)&&e()},[e]),o=j.useCallback(i=>{i.key==="Escape"&&e()},[e]);return j.useEffect(()=>(document.addEventListener("mousedown",r),document.addEventListener("keydown",o),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("keydown",o),document.removeEventListener("touchstart",n)}),[r,o,n]),{ref:t}},db=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},fb=(e,t,r)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const{height:n,left:o,top:i,width:c}=t.getBoundingClientRect(),l=e.getBoundingClientRect(),u=e!=null&&e.parentElement?db(e==null?void 0:e.parentElement):0;return{left:o+c/2-(l.width+u*2),top:i+n+r}},Eh=j.createContext({}),pb=({children:e,delay:t=600,gap:r=20,isOpen:n,setIsOpen:o,target:i,...c})=>{const l=j.useRef(null),[u,d]=j.useState(!1),[h,m]=j.useState({left:0,top:0}),{ref:_}=wh(()=>{d(!0),typeof window<"u"&&(l.current=window.setTimeout(()=>{o(!1),d(!1)},t))});return j.useEffect(()=>{if(i&&(_!=null&&_.current)){const{left:g,top:v}=fb(_.current,i,r??0);m({left:g,top:v}),d(!1)}},[r,n,i,_]),s.jsx(Eh.Provider,{value:j.useMemo(()=>({...c,...h,contentRef:_,isLeaving:u,isOpen:n,setIsOpen:o,setIsLeaving:d,target:i}),[c,h,_,u,n,o,d,i]),children:e})},Ih=()=>{const e=j.useContext(Eh);if(e===void 0)throw new Error("useUserMenuContext must be used within a UserMenuProvider");return e},Ph=({children:e,isMobile:t=!1,Z_INDEX_WAR:r})=>{const{isOpen:n,setIsOpen:o}=Ih();return s.jsxs(p.Modal.Root,{"data-user":"user-menu--modal",isMobile:t??!1,isOpen:n,setIsOpen:o,variant:"sideBottom",className:$t["modal-root-modifier"],style:{zIndex:r.user_menu_mobile},children:[s.jsx(p.Modal.Header,{navigation:"top",className:$t["modal-header-modifier"],children:s.jsx(p.Modal.Controls,{navigation:"top",isMobile:!0,className:$t["modal-controls-modifier"]})}),s.jsx(p.Modal.Body,{children:e})]})};Ph.displayName="UserMenu.Modal";const Nh=({children:e,component:t,Z_INDEX_WAR:r,isMobile:n,...o})=>s.jsx(pb,{...o,className:$t.root,children:n?s.jsxs(s.Fragment,{children:[s.jsx(Rr.Modal,{Z_INDEX_WAR:r,children:t}),e]}):s.jsx(Rr.Tooltip,{component:t,style:{width:304,zIndex:r.user_menu},Z_INDEX_WAR:r,children:e})});Nh.displayName="UserMenu.Root";const Rh=({children:e,component:t,Z_INDEX_WAR:r,...n})=>{const{contentRef:o,left:i,isLeaving:c,isOpen:l,top:u}=Ih();return s.jsx(p.Tooltip.Root,{arrow:"top-right",component:s.jsx("div",{...n,ref:o,children:t}),className:p.helpers.classNameConcat($t["user-menu--tooltip"],$t["tooltip-modifier"]),isLeaving:c,isOpen:l,left:i,size:"medium",position:"top",top:u,style:{zIndex:r.user_menu},children:s.jsx("div",{className:$t["user-menu--tooltip"],children:e})})};Rh.displayName="UserMenu.Tooltip";const Rr={Credits:jh,Content:xh,Login:Sh,Menu:Ch,Modal:Ph,Root:Nh,Tooltip:Rh},Qo=({children:e,isOpen:t,setIsOpen:r,desktopUserMenuTarget:n,mobileUserMenuTarget:o,storeConfig:i})=>{var g,v,x;const{isMobile:c}=xe(),{CONSTANTS:l}=Ze(),u=rs(),d=()=>{window.location.href=`${i.secureSubdomain}/api/io/login?returnUrl=${encodeURIComponent(`${window.location.href}`)}`},h=!!((g=u.user)!=null&&g.userId),{cashback:m,credits:_}=j.useMemo(()=>{var S,w;return{credits:((S=u==null?void 0:u.getCurrentCredits())==null?void 0:S.credits)??0,cashback:((w=u==null?void 0:u.getCurrentCredits())==null?void 0:w.cashback)??0}},[u]);return s.jsx(Rr.Root,{component:s.jsxs(Rr.Content,{children:[s.jsx(Rr.Login,{description:l.session.LOGIN_MENU_DESCRIPTION(h),text:l.session.LOGIN_MENU_TITLE(h,((v=u==null?void 0:u.user)==null?void 0:v.firstName)??((x=u==null?void 0:u.user)==null?void 0:x.email)),children:!h&&s.jsx(p.Button,{id:"conta",size:"medium",variant:"quaternary",onClick:()=>d(),children:l.header.MENU_INFO.login.button_text})}),_+m&&h?s.jsx(Rr.Credits,{credits:_,cashBack:m,link:`${i.secureSubdomain}/account#/meus-creditos`,total:_+m}):s.jsx(s.Fragment,{}),s.jsx(p.Utils.Divider,{}),s.jsx(Rr.Menu,{ICONS:l.header.ICONS,storeConfig:i,isLogged:h,className:U.responsive["responsive-desktop-flex"],onLogoutClick:()=>u.logout(),LOGOUT_TEXT:l.session.LOGOUT_TEXT,LOGOUT_ICON:l.session.LOGOUT_ICON,LOGIN_MENU_OPTIONS_ARRAY:l.session.LOGIN_MENU_OPTIONS_ARRAY}),s.jsx(Rr.Menu,{ICONS:l.header.ICONS,storeConfig:i,isMobile:!0,isLogged:h,className:U.responsive["responsive-mobile-flex"],onLogoutClick:()=>u.logout(),LOGOUT_TEXT:l.session.LOGOUT_TEXT,LOGOUT_ICON:l.session.LOGOUT_ICON,LOGIN_MENU_OPTIONS_ARRAY:l.session.LOGIN_MENU_OPTIONS_ARRAY})]}),isOpen:t,isMobile:c,setIsOpen:r,target:c?o:n,Z_INDEX_WAR:l.header.Z_INDEX_WAR,children:e})};Qo.displayName="UserMenu";const Th=({storeConfig:e})=>{const{CONSTANTS:t}=Ze(),{handleSelectContent:r}=Ee(),{reset:n}=ks(),{setValue:o}=_c(),i=mc(),c=j.useRef(null);return s.jsxs(s.Fragment,{children:[s.jsxs(p.Header.Wrapper,{className:"header-desktop-wrapper",children:[s.jsx(p.Header.Logo,{style:{width:"100%"},children:s.jsx(Tt,{href:"/",onMouseEnter:n,children:s.jsx(p.Icon,{name:t.header.ICONS.logo,onClick:()=>{r({content:"header:logo"})}})})}),s.jsx(hh,{}),s.jsxs(p.Header.Support,{onMouseEnter:n,style:{justifyContent:"flex-end"},children:[s.jsx(ab,{}),s.jsx(Qo,{isOpen:i,setIsOpen:o,desktopUserMenuTarget:c.current,storeConfig:e,children:s.jsx(p.Header.SupportItem,{onClick:()=>{o(!0),r({content:"header:user_menu"})},className:Dc["btn-login"],innerRef:c,children:s.jsx(p.Icon,{name:t.header.ICONS.person,size:"medium"})})}),s.jsx(vh,{}),s.jsx(Fc,{id:"cart-button"})]})]}),s.jsx(yh,{})]})};Th.displayName="Header.HeaderDesktopWrapper";const Rt={"menu--banners":"_menu--banners_1cg51_1","menu--banners--item":"_menu--banners--item_1cg51_6","menu--banners--item--text":"_menu--banners--item--text_1cg51_17","menu--banners--list":"_menu--banners--list_1cg51_21","menu--dummy-close":"_menu--dummy-close_1cg51_46","menu--body":"_menu--body_1cg51_54","menu--categories":"_menu--categories_1cg51_67","menu--categories--title":"_menu--categories--title_1cg51_80","menu--categories--see-all":"_menu--categories--see-all_1cg51_92","menu--step":"_menu--step_1cg51_101","menu--sub-category":"_menu--sub-category_1cg51_117","menu--sub-category--item":"_menu--sub-category--item_1cg51_124","menu--sub-category--list":"_menu--sub-category--list_1cg51_130"},Oh=({children:e,mobileBannerAlt:t,mobileBannerSrc:r,textColor:n,submenuId:o,label:i,...c})=>s.jsx("button",{...c,className:Rt["menu--banners--item"],children:r?s.jsxs(p.Banner.Container,{children:[s.jsx(p.Banner.ImageWrapper,{children:s.jsx(at.Image,{alt:t??r,height:128,src:r,width:343,unoptimized:!0})}),s.jsx(p.Banner.Slot,{verticalAlignment:"end",horizontalAlignment:"center",children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:Rt["menu--banners--item--text"],children:s.jsx("h2",{className:"typography-style-body-xs",style:n?{color:n}:{},children:e})})})})]}):s.jsx("h2",{...c,children:e})});Oh.displayName="Menu.Mobile.Category";const Ah=({label:e,...t})=>{const{CONSTANTS:r}=Ze();return s.jsx(p.Button,{...t,adornment:{end:s.jsx(p.Icon,{name:r.header.ICONS.arrow_right,size:"medium"})},mode:"inverse",size:"medium",variant:"primary",children:e})};Ah.displayName="Menu.Mobile.Body.Category";const kh=({subCategory:e,submenuLabel:t,onHandleOut:r,...n})=>s.jsx("div",{...n,className:Rt["menu--sub-category--list"],children:Array.isArray(e==null?void 0:e.items)&&(e==null?void 0:e.items.map((o,i)=>s.jsx(wt,{disableUnderline:!0,disablePadding:!1,href:o.link??"#",onClick:()=>r(o.label,t),size:"medium",title:o.label??"",children:o.label},i)))});kh.displayName="Menu.Mobile.List";const Mh=({current:e,onHandleOut:t})=>{var r;return e?s.jsx("div",{className:Rt["menu--sub-category"],children:Array.isArray(e==null?void 0:e.subCategories)&&((r=e==null?void 0:e.subCategories)==null?void 0:r.map((n,o)=>s.jsxs("div",{className:Rt["menu--sub-category--item"],children:[s.jsx(xs.Title,{onHandleOut:t,subCategory:n,submenuLabel:e==null?void 0:e.id}),s.jsx(xs.List,{onHandleOut:t,subCategory:n,submenuLabel:e==null?void 0:e.id})]},o)))}):s.jsx(s.Fragment,{})};Mh.displayName="Menu.Mobile.Body.SubCategory";const Lh=({subCategory:e,submenuLabel:t,onHandleOut:r,...n})=>{var l;const{router:o}=Ae(),{handleSelectContent:i}=Ee(),{CONSTANTS:c}=Ze();return s.jsxs("div",{...n,className:Rt["menu--categories--title"],children:[s.jsx(mn,{href:e==null?void 0:e.linkLabel,title:e==null?void 0:e.linkLabel,onClick:()=>{i({content:`menu:${e.label??""}:${t}`})},children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h2",{className:"typography-style-body-md",style:e!=null&&e.linkLabel?{cursor:"pointer"}:void 0,children:e==null?void 0:e.label})})})}),((l=e==null?void 0:e.see_all)==null?void 0:l.link)&&s.jsx(mn,{href:e.see_all.link,title:e.see_all.link,onClick:()=>{var u;r(e.label,t),(u=e==null?void 0:e.see_all)!=null&&u.link&&o.push(e.see_all.link)},children:s.jsx(p.TextStructure.Root,{children:s.jsxs("span",{className:Rt["menu--categories--see-all"],children:[e.see_all.label,s.jsx(p.Icon,{name:c.header.ICONS.arrow_right,size:"small"})]})})})]})};Lh.displayName="Menu.Mobile";const xs={Banner:Oh,Category:Ah,List:kh,SubCategory:Mh,Title:Lh},Dh=j.createContext({}),hb=({children:e})=>{const[t,r]=j.useState(null),n=j.useCallback(()=>{r(null)},[]),o=i=>{i!==t&&r(i)};return s.jsx(Dh.Provider,{value:{currentCategory:t,setCurrentCategory:r,handleCloseMenu:n,handleChangeSubMenuOpened:o},children:e})},Fh=()=>j.useContext(Dh),zh=e=>{const{router:t}=Ae(),{headerData:r}=Ze(),{handleSelectContent:n}=Ee(),{currentCategory:o,setCurrentCategory:i}=Fh(),c=j.useRef(null),l=()=>{if(c.current){const g=c.current;g&&(i(null),g==null||g.click())}},u=(g,v)=>{n({content:`menu:${g}`}),t.push(v),l()},d=(g,v)=>{n({content:`menu:${g}:${v}`}),l()},h=Array.isArray(r==null?void 0:r.categories)?r==null?void 0:r.categories:[],m=Array.isArray(r==null?void 0:r.subMenus)?r==null?void 0:r.subMenus:[],_=g=>{g.submenuId?i(g.submenuId):u(g.label,g.link)};return s.jsxs("div",{...e,className:Rt["menu--body"],style:{transform:`translate3d(calc(-100% * ${o?1:0}), 0px, 0px)`},children:[s.jsx("button",{className:Rt["menu--dummy-close"],ref:c,"data-close":!0}),s.jsxs("div",{className:Rt["menu--step"],"data-active":"true",children:[s.jsx("div",{className:Rt["menu--banners"],children:s.jsx("div",{className:Rt["menu--banners--list"],children:h.map((g,v)=>j.createElement(xs.Banner,{...g,key:v,onClick:()=>u(g.label,g.link)},g.mobileBannerAlt))})}),s.jsx("div",{className:Rt["menu--categories"],children:h.map((g,v)=>s.jsx(xs.Category,{label:g.label,onClick:()=>_(g)},v))})]}),s.jsx("div",{className:Rt["menu--step"],"data-active":!!o,children:s.jsx(xs.SubCategory,{current:m.find(g=>g.id===o),onHandleOut:d})})]})};zh.displayName="Menu.Mobile.Body";const mb={"menu--header":"_menu--header_1ozdf_1"},qh=()=>{var o;const{headerData:e}=Ze(),{currentCategory:t,setCurrentCategory:r}=Fh(),n=(o=e==null?void 0:e.categories)==null?void 0:o.find(i=>i.submenuId===t);return s.jsxs("div",{className:mb["menu--header"],children:[s.jsx(p.Button,{"data-out":!n,iconNameStart:"arrow-left",mode:"inverse",onClick:()=>r(null)}),n&&s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{alignContent:"center",children:s.jsx("h2",{className:"typography-style-body-lg",children:n==null?void 0:n.label})})}),s.jsx(p.Button,{iconNameStart:"close","data-close":!0,"data-only":!n,mode:"inverse",onClick:()=>r(null)})]})};qh.displayName="Menu.Mobile.Header";var Ua={exports:{}};function _b(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 Ji={},Zi={},Bu;function gb(){return Bu||(Bu=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"LoadableContext",{enumerable:!0,get:function(){return n}});const n=Ct._(j).default.createContext(null);process.env.NODE_ENV!=="production"&&(n.displayName="LoadableContext")}(Zi)),Zi}var Uu;function yb(){return Uu||(Uu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return g}});const r=Ct._(j),n=gb();function o(v){return v&&v.default?v.default:v}const i=[],c=[];let l=!1;function u(v){let x=v(),S={loading:!0,loaded:null,error:null};return S.promise=x.then(w=>(S.loading=!1,S.loaded=w,w)).catch(w=>{throw S.loading=!1,S.error=w,w}),S}function d(v,x){let S=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},x),w=null;function P(){if(!w){const N=new h(v,S);w={getCurrentValue:N.getCurrentValue.bind(N),subscribe:N.subscribe.bind(N),retry:N.retry.bind(N),promise:N.promise.bind(N)}}return w.promise()}if(typeof window>"u"&&i.push(P),!l&&typeof window<"u"){const N=S.webpack&&typeof _b.resolveWeak=="function"?S.webpack():S.modules;N&&c.push(T=>{for(const O of N)if(T.includes(O))return P()})}function I(){P();const N=r.default.useContext(n.LoadableContext);N&&Array.isArray(S.modules)&&S.modules.forEach(T=>{N(T)})}function C(N,T){I();const O=r.default.useSyncExternalStore(w.subscribe,w.getCurrentValue,w.getCurrentValue);return r.default.useImperativeHandle(T,()=>({retry:w.retry}),[]),r.default.useMemo(()=>O.loading||O.error?r.default.createElement(S.loading,{isLoading:O.loading,pastDelay:O.pastDelay,timedOut:O.timedOut,error:O.error,retry:w.retry}):O.loaded?r.default.createElement(o(O.loaded),N):null,[N,O])}return C.preload=()=>P(),C.displayName="LoadableComponent",r.default.forwardRef(C)}class h{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};const{_res:x,_opts:S}=this;x.loading&&(typeof S.delay=="number"&&(S.delay===0?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},S.delay)),typeof S.timeout=="number"&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},S.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(w=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(x){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...x},this._callbacks.forEach(S=>S())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(x){return this._callbacks.add(x),()=>{this._callbacks.delete(x)}}constructor(x,S){this._loadFn=x,this._opts=S,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function m(v){return d(u,v)}function _(v,x){let S=[];for(;v.length;){let w=v.pop();S.push(w(x))}return Promise.all(S).then(()=>{if(v.length)return _(v,x)})}m.preloadAll=()=>new Promise((v,x)=>{_(i).then(v,x)}),m.preloadReady=v=>(v===void 0&&(v=[]),new Promise(x=>{const S=()=>(l=!0,x());_(c,v).then(S,S)})),typeof window<"u"&&(window.__NEXT_PRELOADREADY=m.preloadReady);const g=m}(Ji)),Ji}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(h,m){for(var _ in m)Object.defineProperty(h,_,{enumerable:!0,get:m[_]})}r(t,{default:function(){return d},noSSR:function(){return u}});const n=Ct,o=s,i=n._(yb()),c=typeof window>"u";function l(h){return{default:(h==null?void 0:h.default)||h}}function u(h,m){if(delete m.webpack,delete m.modules,!c)return h(m);const _=m.loading;return()=>(0,o.jsx)(_,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}function d(h,m){let _=i.default,g={loading:S=>{let{error:w,isLoading:P,pastDelay:I}=S;if(!I)return null;if(process.env.NODE_ENV!=="production"){if(P)return null;if(w)return(0,o.jsxs)("p",{children:[w.message,(0,o.jsx)("br",{}),w.stack]})}return null}};h instanceof Promise?g.loader=()=>h:typeof h=="function"?g.loader=h:typeof h=="object"&&(g={...g,...h}),g={...g,...m};const v=g.loader,x=()=>v!=null?v().then(l):Promise.resolve(l(()=>null));return g.loadableGenerated&&(g={...g,...g.loadableGenerated},delete g.loadableGenerated),typeof g.ssr=="boolean"&&!g.ssr?(delete g.webpack,delete g.modules,u(_,g)):_({...g,loader: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)})(Ua,Ua.exports);var vb=Ua.exports,xb=vb;const Bh=U.getDefaultExportFromCjs(xb),zo={"modal-modifier":"_modal-modifier_10zw4_1","menu--navigation-bar":"_menu--navigation-bar_10zw4_15","menu--root":"_menu--root_10zw4_26"},Uh=({children:e})=>{const{menuIsOpen:t,setMenuIsOpen:r}=xc(),{CONSTANTS:n}=Ze();return s.jsxs(p.Modal.RootWithoutPortal,{className:p.helpers.classNameConcat(zo["modal-modifier"],"menu-mobile-root"),isOpen:t,setIsOpen:r,variant:"sideRight",style:{bottom:"unset",overflowY:"hidden",position:"fixed",top:0,zIndex:n.header.Z_INDEX_WAR.menu_mobile},children:[s.jsx(qh,{}),s.jsx(p.Modal.Body,{className:zo["menu--root"],children:e})]})};Uh.displayName="Menu.MenuRoot";const bb=Bh(()=>Promise.resolve(Uh),{ssr:!1}),Hh=({children:e,last:t=!1,...r})=>s.jsxs(s.Fragment,{children:[s.jsx(p.Button,{...r,"data-close":!0,size:"small",variant:"tertiary",children:e}),!t&&s.jsx(p.Utils.Divider,{direction:"vertical",size:"small",className:zo.divider})]});Hh.displayName="Menu.NavigationBarItem";const $h=()=>{const{setUserMenuIsOpen:e}=xc(),{handleSelectContent:t}=Ee(),{CONSTANTS:r}=Ze(),{router:n}=Ae(),o=[{iconNameStart:r.header.ICONS.person,onClick:()=>{e(!0),t({content:"menu:user_menu"})},text:r.header.MENU_INFO.login.button_text},{iconNameStart:r.header.MENU_INFO.bag.button_icon,onClick:()=>{t({content:"menu:wishlist"}),n.push("/favoritos")},text:r.header.MENU_INFO.bag.button_text},{last:!0,iconNameStart:r.header.MENU_INFO.store.button_icon,onClick:()=>{t({content:"menu:store"}),n.push("/institucional/lojas")},text:r.header.MENU_INFO.store.button_text}];return s.jsx(p.Card,{id:"menu-navigationbar",shadow:!0,className:zo["menu--navigation-bar"],style:{zIndex:r.header.Z_INDEX_WAR.menu_mobile_navigation_bar},children:Array.isArray(o)&&o.map((i,c)=>j.createElement(Hh,{...i,key:c},i.text))})};$h.displayName="Menu.NavigationBar";const ea={Body:zh,NavigationBar:$h,Root:bb},Wh=({storeConfig:e})=>{const t=j.useRef(null),{CONSTANTS:r}=Ze(),{MENU_NAVIGATION_BAR_ALLOWED:n,ICONS:o}=r.header,{handleSelectContent:i}=Ee(),{setValue:c}=Ho(),{setValue:l}=uf(),{setValue:u}=_c(),d=mc(),h=lf(),{isMobile:m}=xe();return s.jsxs(s.Fragment,{children:[s.jsxs(p.Header.Wrapper,{className:"header-mobile-wrapper",children:[s.jsx(p.Header.Logo,{style:{width:"100%"},children:s.jsx(Tt,{href:"/",children:s.jsx(p.Icon,{name:o.logo,size:"x-large",onClick:()=>{i({content:"header:logo"})}})})}),s.jsxs(p.Header.Support,{children:[s.jsx(p.Header.SupportItem,{onClick:()=>{c(!0),i({content:"header:search"})},children:s.jsx(p.Icon,{name:o.search,size:"medium"})}),s.jsx(Fc,{}),s.jsxs(p.Header.SupportItem,{onClick:()=>l(!0),children:[s.jsx("span",{ref:t}),s.jsx(p.Icon,{name:o.menu,size:"medium"})]})]})]}),m&&s.jsx(wf,{menuIsOpen:h,setMenuIsOpen:l,userMenuIsOpen:h,setUserMenuIsOpen:u,children:s.jsx(Qo,{storeConfig:e,isOpen:d,setIsOpen:u,mobileUserMenuTarget:t==null?void 0:t.current,children:s.jsxs(ea.Root,{children:[s.jsx(ea.Body,{}),n?s.jsx(ea.NavigationBar,{}):s.jsx(s.Fragment,{})]})})})]})};Wh.displayName="Header.HeaderMobileWrapper";const jb=j.createContext({}),Sb=({children:e})=>{const{sendDataLayerEvent:t}=Ee(),{cartStore:r,isOpen:n}=Xe();j.useEffect(()=>{n&&t({functionKey:"viewCartEvent",data:{commonData:{cartStore:r}}})},[n]),j.useEffect(()=>{var i,c,l;if(r.id&&!((c=(i=r.marketingData)==null?void 0:i.marketingTags)!=null&&c.includes("faststore"))){const{id:u}=r;U.proxyCartAPI("/_v/proxy/checkout/order-form/attachments/marketing-data",{body:{orderFormId:u,marketingData:{...r==null?void 0:r.marketingData,marketingTags:U.marketingTagsBuilder(((l=r.marketingData)==null?void 0:l.marketingTags)??[])}}}).catch(d=>{console.error(d)})}},[r]);const o=({cartItem:i,oldQuantity:c,newQuantity:l})=>{t({functionKey:"skuEvents",data:{event:c>l?"remove_from_cart":"add_to_cart",commonData:{products:[{...i,price:i.price/100,listPrice:i.listPrice/100}]},customData:{quantity:l},supportData:{selectedSkus:[i]}}})};return s.jsx(jb.Provider,{value:{handleUpdateItemQuantityEvent:o},children:e})},Cb="var(--color-background-brand-primary-lighter)",wb="_fadeInOut_1l5ow_1",Eb="_fadeOut_1l5ow_1",be={brandPrimaryLighter:Cb,"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:wb,fadeOut:Eb,"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"},Vh=({item:{id:e,message:t,callback:r},removeNotification:n,ICONS:o})=>{const i=j.useRef(null),c=()=>{var u;(u=i.current)==null||u.setAttribute("data-animation-out","true")},l=u=>{n(u)};return s.jsx("div",{className:be["mc--notify--item"],ref:i,onAnimationEnd:()=>l(e),children:s.jsxs(p.SnackBar.Structure,{size:"medium",children:[s.jsx(p.SnackBar.Content,{title:t}),s.jsxs(p.SnackBar.Support,{children:[typeof r=="function"&&s.jsx(p.Button,{onClick:()=>{r(),c()},size:"small",variant:"tertiary",children:"Desfazer"}),s.jsx(p.Button,{iconNameStart:o.close,iconSize:"small",onClick:()=>c(),variant:"tertiary"})]})]})},e)};Vh.displayName="MiniCart.Notify.Item";const Gh=({ICONS:e})=>{const t=pc(),{removeNotification:r}=hc(),n=t.length?[...t].sort((o,i)=>i.id-o.id):[];return n.length?s.jsx("div",{className:be["mc--notify"],children:s.jsx("div",{className:be["mc--notify--content"],children:Array.isArray(n)&&n.map(o=>s.jsx(Vh,{item:o,removeNotification:r,ICONS:e},o.id))})}):null};Gh.displayName="MiniCart.Notifications";const Ib=({handleSendEvent:e,onHandleRemove:t,product:r,MINICART_CONFIG:n,...o})=>{const i=ts(),{toggleProduct:c}=xn(),{itemOffered:{isVariationOf:{productGroupID:l}},quantity:u}=r;return s.jsx(p.Button,{...o,adornment:{end:s.jsx(p.Icon,{name:`favorite-${i.includes(l)?"true":"false"}`,size:"small"})},onClick:()=>{c(l),i.includes(l)||t({texture:"mini-cart-wishlist",title:`${n.messages.add_wishlist}`},u,()=>c(l)),e(i.includes(l)?"remove_from_wishlist":"add_to_wishlist","productEvents")},children:n.messages.add_wishlist_button})},Kh=({handleSendEvent:e,product:t,ICONS:r,MINICART_CONFIG:n,...o})=>{const{addToCart:i,removeToCart:c}=Xe(),{bundleItems:l=[],id:u,uniqueId:d,seller:h,offerings:m,quantity:_}=t,g=(v,x,S)=>{c(u,v.title,()=>{typeof S=="function"&&S(),i({id:u,quantity:x,seller:h},{id:u,texture:v.texture},!0)})};return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:be["mc--card--actions--add-remove"],children:[n.has_wishlist_button&&s.jsx(Ib,{...o,product:t,handleSendEvent:e,onHandleRemove:g,ICONS:r,MINICART_CONFIG:n}),s.jsx(p.Button,{...o,adornment:{end:s.jsx(p.Icon,{name:r.delete,size:"small"})},underline:!0,variant:"secondary",state:"danger",onClick:()=>{g({texture:"mini-cart",title:`${n.messages.remove}`},_),e("remove_from_cart","skuEvents")},children:n.messages.remove_button})]}),n.has_gift_option&&s.jsx(kn.Gift,{uniqueId:d,bundleItems:l,offerings:m,ICONS:r,MINICART_CONFIG:n})]})};Kh.displayName="MiniCart.Card.Actions";const Qh=({bundleItems:e,offerings:t,uniqueId:r,ICONS:n,MINICART_CONFIG:o})=>{const[i,c]=j.useState(!1),{toggleGiftItemCart:l}=Xe(),u=()=>{if(t instanceof Object&&Array.isArray(t)){const[m]=t;if(m){c(!0);const _=e.some(g=>g.id===m.id);l(r,String(m.id),_).then(()=>c(!1))}}},d=t[0],h=e.find(m=>m.id===d.id);return d&&"id"in d?s.jsx("div",{className:be["mc--card--actions--gift"],children:s.jsx(p.Checkbox,{adornment:s.jsx(p.Icon,{name:n.check}),checked:!!h,disabled:i,label:o.messages.giftPackage,onChange:u})}):null};Qh.displayName="MiniCart.Card.Gift";const Yh=({itemOffered:e})=>{const t=U.updatedResizedImg(e==null?void 0:e.image[0].url,{width:200,height:300});return s.jsx(Tt,{href:`${e==null?void 0:e.slug}`,className:be["mc--card--product-link"],children:s.jsx(at.Image,{alt:(e==null?void 0:e.image[0].alternateName)||"Produto",src:t||"",width:108,height:164,objectFit:"unset"})})};Yh.displayName="MiniCart.Card.Media";const Xh=({name:e,skuName:t,tagName:r,className:n})=>s.jsxs(s.Fragment,{children:[r&&s.jsx(p.Tag,{variant:"quaternary",title:r,style:{textTransform:"uppercase"},children:r}),s.jsx("p",{className:p.helpers.classNameConcat(be["mc--card--name"],n),children:U.getProductNameWithoutSku(e??"",t??"")})]});Xh.displayName="MiniCart.Card.Name";const Jh=({total:e,totalList:t})=>s.jsx(p.ProductInfo.Root,{children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:be["mc--card--price"],children:s.jsx(p.ProductInfo.Wrapper,{className:be["mc--card--price--details"],size:"small",layout:"horizontal",children:t&&e!==t?s.jsxs(s.Fragment,{children:[s.jsx(p.ProductInfo.Price,{label:"originalPrice",value:U.formatPriceToCurrency(t),size:"small"}),s.jsx(p.ProductInfo.Price,{label:"discountPrice",value:U.formatPriceToCurrency(e),size:"small"})]}):s.jsx(p.ProductInfo.Price,{label:"defaultPrice",value:U.formatPriceToCurrency(e),size:"small"})})})})});Jh.displayName="MiniCart.ProductPrice";const Zh=({product:e,TEXTURE_IMAGE:t,TOGGLE_STYLE_MODIFIER:r})=>{var d;const[n,o]=j.useState(""),i=j.useRef(null),{cartStore:{options:c}}=Xe(),l=e.itemOffered.isVariationOf.productGroupID,u=j.useCallback(()=>{var m;const h=(m=c==null?void 0:c.find(_=>_.id===l))==null?void 0:m.texture;if(h){o(h);return}U.fetchProxy("/_v/proxy/catalog/product/info",{method:"POST",body:JSON.stringify({ids:[l]})}).then(_=>_.json()).then(_=>{const g=_.data[0].items.find(v=>v.itemId===e.id);if(g){const v=g.images.find(x=>t.includes(x.imageLabel));if(v!=null&&v.imageUrl){o(v.imageUrl);return}o(g.images[0].imageUrl)}}).catch(_=>{console.error(_)})},[c,l,e.id]);return j.useEffect(()=>{if(!i.current)return;const h=new IntersectionObserver(m=>{m[0].isIntersecting&&u()});return h.observe(i.current),()=>{h.disconnect()}},[u]),s.jsx("div",{ref:i,children:s.jsx(p.ToggleStyle.Wrapper,{size:"small",style:r,children:s.jsx(p.ToggleStyle.Texture,{children:n?s.jsx(at.Image,{alt:((d=e.itemOffered)==null?void 0:d.image[0].alternateName)??"Produto",src:n,width:164,height:164,style:r}):s.jsx(Sp,{})})})})};Zh.displayName="MiniCart.Card.Style";const em=({product:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,TEXTURE_IMAGE:n,TOGGLE_STYLE_MODIFIER:o})=>{const{size:i}=U.getColorAndSizeFromSkuName(e.itemOffered.skuName??"",r);return s.jsxs(p.Utils.Row,{alignItems:"center",children:[s.jsx(Zh,{product:e,TEXTURE_IMAGE:n,TOGGLE_STYLE_MODIFIER:o}),s.jsx(p.Utils.Divider,{direction:"vertical",size:"small",style:{height:24}}),i&&s.jsx(p.ToggleSize.Wrapper,{size:t.product_card.sku.size??"small",variation:t.product_card.sku.variation??"fill",className:be["mc-container-actions--toggle-size-modifier"],style:{backgroundColor:`${be.brandPrimaryLighter}`},children:s.jsx(p.ToggleSize.Text,{children:i})})]})};em.displayName="MiniCart.Card.Sku";const kn={Actions:Kh,Gift:Qh,Media:Yh,Name:Xh,Price:Jh,Sku:em},Pb=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}},tm=({available:e=!0,index:t,product:r,ICONS:n,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:i,TEXTURE_IMAGE:c,TOGGLE_STYLE_MODIFIER:l})=>{var m,_;const{sendDataLayerEvent:u}=Ee(),d=Pb(r),h=(g,v)=>{const x={commonData:{...r,...d},customData:{index:t},event:g};if(v==="skuEvents"){const S={...r,...d};x.supportData={selectedSkus:[S]},x.commonData.products=[S]}u({functionKey:v,data:x})};return s.jsxs("div",{className:p.helpers.classNameConcat(be["mc--card"],e?"":be["mc--card--unavailable"]),children:[s.jsx(kn.Media,{itemOffered:r.itemOffered}),s.jsxs("div",{className:be["mc--card--content-info"],children:[s.jsx(kn.Name,{name:((m=r.itemOffered)==null?void 0:m.name)??"",skuName:(_=r.itemOffered)==null?void 0:_.skuName}),s.jsxs("div",{className:be["mc--card--details"],children:[s.jsx("div",{className:be["mc--card--actions"],children:e?s.jsx(kn.Price,{total:d.price,totalList:d.listPrice}):s.jsx(p.Tag,{variant:"secondary",size:"small",children:"Indisponível"})}),s.jsxs("div",{className:be["mc--card--actions--secondary"],children:[e&&s.jsx(kn.Sku,{product:r,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:i,TEXTURE_IMAGE:c,TOGGLE_STYLE_MODIFIER:l}),s.jsx(kn.Actions,{handleSendEvent:h,product:r,size:"small",variant:"tertiary",ICONS:n,MINICART_CONFIG:o})]})]})]})]})};tm.displayName="MiniCart.Card";const rm=({type:e="positive",ICONS:t,MESSAGE_CASHBACK:r})=>{var i;const{toExpire:n}=rs(),o=((i=n==null?void 0:n.cashback)==null?void 0:i.reduce((c,l)=>c+l.remaining_value,0))??0;return o>0?s.jsxs("div",{className:p.helpers.classNameConcat(be["mc--cashback"],be[`mc--cashback--${e}`]),children:[s.jsx(p.Icon,{name:t.alert_circle,size:"medium"}),s.jsxs("p",{children:[s.jsx("span",{children:U.formatPriceToCurrency(o)})," ",r.title]})]}):null};rm.displayName="MiniCart.Cashback";const nm=({type:e,ICONS:t,MINICART_CONFIG:r})=>{const{addCouponSeller:n,removeCoupon:o,removeSellerCode:i,cartStore:{marketingData:c,openTextField:l}}=Xe(),[u,d]=j.useState(!1),[h,m]=j.useState(!1),_=j.useCallback(()=>{let S="";return e==="coupon"?S=(c==null?void 0:c.coupon)??"":S=String((l==null?void 0:l.value)??""),S.toUpperCase()??""},[c,l,e]),[g,v]=j.useState(!!_()),x=async S=>{m(!0),!!_()&&(e==="coupon"?await o():await i(),v(!1),d(!1)),await n(S,e).then(P=>{if(!P.statusOk&&S||P.code!==200){S?(d(!0),v(!1)):d(!1);return}v(!0),d(!1)}).catch(()=>d(!0)).finally(()=>m(!1))};return s.jsx(Pt.Field,{hasError:u,hasSuccess:g,isLoading:h,onHandler:x,type:e,title:e==="coupon"?`${r.messages.descount_cupom_placeholder}`:`${r.messages.sellers_code_placeholder}`,value:_(),MINICART_CONFIG:r,ICONS:t})};nm.displayName="MiniCart.CouponSeller";const sm=({ICONS:e,MINICART_CONFIG:t,PLP_NOT_RESULT:r})=>{const{router:n}=Ae(),o=()=>{n.push(r.link)};return s.jsxs(p.Utils.Column,{alignContent:"center",alignItems:"center",gap:"24px",className:be["mc--body--empty--feedback"],children:[s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsxs("p",{className:`typography-style-body-xs ${be["mc--body--empty--text"]}`,children:[t.messages.empty_card," "]})})}),s.jsx(p.Button,{variant:"tertiary",size:"large",onClick:()=>o(),"data-close":!0,adornment:{end:s.jsx(p.Icon,{name:e.arrow_right,size:"medium"})},children:t.messages.empty_bag})]})};sm.displayName="MiniCart.Feedback";const Nb=e=>{const t=e.replace(/\D/g,"");return t.length>5?`${t.slice(0,5)}-${t.slice(5,8)}`:t},om=({feedback:e,hasError:t,onHandler:r,hasSuccess:n,type:o,title:i,value:c,ICONS:l})=>{const[u,d]=j.useState(c);j.useEffect(()=>{t||d(c)},[c,t]);const h=()=>t?s.jsx(p.Icon,{name:l.delete_circle}):String(c).length&&n?s.jsx(p.Icon,{name:l.check_circle}):null,m=()=>{if(o==="seller"){const x=String(c).includes(" - ")?String(c).split(" - ")[0]:u;d(x)}},_=()=>{if(o==="seller"){const x=String(c).includes(" - ")?c:u;d(x)}},g=x=>{const S=x.currentTarget.value;if(S===""&&typeof r=="function"||n&&String(c).length>0&&S!==String(c)||t&&S!==String(c)){d(""),r("");return}if(o==="cep"){const P=Nb(S);d(P)}else d(S)},v=x=>{if(x.key.toLocaleLowerCase()==="enter"&&typeof r=="function"){const S=x.currentTarget.value;r(S)}};return s.jsx(p.TextField.Input,{adornment:{end:h()},mode:"over-label",label:i,feedback:e,value:u,type:"text",onFocus:m,onBlur:_,onChange:g,onKeyDown:v})};om.displayName="MiniCart.Field.Input";const im=({title:e,ICONS:t,MINICART_CONFIG:r,...n})=>{const o=j.useRef(null),{hasSuccess:i,hasError:c,isLoading:l,onHandler:u,type:d,value:h}=n,m=()=>c?"error":String(h).length&&i?"success":"none",_=j.useCallback(()=>{if(o.current){const x=o.current.querySelector("input");x&&typeof u=="function"&&(h!==""||c?(u(""),x.value=""):u((x==null?void 0:x.value)??""))}},[u,h,c]),g=m();return s.jsx("div",{ref:o,children:s.jsx(p.TextField.Structure,{className:be["mc--field"],input:s.jsx(om,{...n,feedback:g,title:e,ICONS:t}),right:s.jsx(p.Button,{"data-has-success":!i,size:"medium",title:String(h).length&&i||c?"Remover":"Aplicar",onClick:()=>_(),disabled:l,children:String(h).length&&i||c?s.jsx(p.Icon,{name:"close",size:"small"}):`${r.messages.promo_code_button}`}),supportText:d==="cep"&&g==="success"?s.jsx(p.TextField.SupportText,{text:"Mais informações de frete na etapa a seguir",feedback:"success",title:"support"}):null})})};im.displayName="MiniCart.Field";const Hu=e=>{const t=e*100;return Math.round(t)},Rb=e=>(e/100).toFixed(2).replace(".",","),Tb=(e,t)=>{const{valueType:r,remainingValueToActivate:n}=e;if(r==="quantity")return`Adicione mais ${n} ${n===1?"item":"itens"} ${t}`;if(r==="price"){const o=n===100?"Falta":"Faltam",i=Rb(n);return`${o} R$ ${i} ${t}`}return t},am=({ICONS:e})=>{var w;const{promotionRules:t,data:r,cartStore:n,cartStore:{items:o,marketingData:i},addCouponSeller:c,setIsOpen:l}=Xe(),{sendDataLayerEvent:u}=Ee(),d=(w=r==null?void 0:r.promotion)==null?void 0:w.promotionCart,h=j.useRef(!1),{router:m}=Ae();if(j.useEffect(()=>{(d==null?void 0:d.selectPromotion)==="Cupom"&&(t==null?void 0:t.remainingValueToActivate)&&(t==null?void 0:t.remainingValueToActivate)<=0&&(d==null?void 0:d.cupom)&&!h.current&&(i==null?void 0:i.coupon)!==d.cupom&&(h.current=!0,c(d.cupom,"coupon")),t!=null&&t.remainingValueToActivate&&(t==null?void 0:t.remainingValueToActivate)<=0&&u({functionKey:"viewCartEvent",data:{event:"closeness_filled",commonData:{cartStore:n}}}),t!=null&&t.remainingValueToActivate&&(t==null?void 0:t.remainingValueToActivate)>0&&(h.current=!1)},[d==null?void 0:d.selectPromotion,t==null?void 0:t.remainingValueToActivate,d==null?void 0:d.cupom,i==null?void 0:i.coupon,c]),!t||!d||d.selectPromotion==="Desativar"||o.length===0)return null;const _=d.title,g=d.subtitle,v=d.titleSuccess,x=d.subtitleSuccess,S=d.linkLabel;return s.jsxs("div",{className:be["mc--body--promotion"],children:[t.remainingValueToActivate>0&&s.jsx(p.Closeness,{className:be["mc--body--promotion--closeness"],title:Tb(t,_),subtitle:g,percentage:Hu(t.completeness),iconLink:e.arrow_right,linkLabel:S,onClick:()=>{u({functionKey:"viewCartEvent",data:{event:"closeness_view_more",commonData:{cartStore:n}}}),m.push(`${d.link}`),l(!1)}}),t.remainingValueToActivate<=0&&s.jsx(p.Closeness,{className:`${be["mc--body--promotion--closeness"]} ${be["mc--body--promotion--closeness--success"]}`,title:v,subtitle:x,percentage:Hu(t.completeness)})]})};am.displayName="MiniCart.Modal.Body.Promotion";const cm=({TIPBAR_CONFIGS:e})=>{const{data:t,cartStore:r,cartStore:{items:n,marketingData:o},addCouponSeller:i}=Xe(),c=t==null?void 0:t.flags.flagCart.flagCupom,l=(o==null?void 0:o.coupon)===(c==null?void 0:c.valueCupom),[u,d]=j.useState(!1),[h,m]=j.useState(!1);if(j.useEffect(()=>{u&&setTimeout(()=>{d(!1)},e.snackbar_timeout)},[u]),j.useEffect(()=>{h&&setTimeout(()=>{m(!1)},e.snackbar_timeout)},[h]),!c||c.active==="Desativar"||c.valueCupom===""||n.length===0)return null;const _=async()=>{if(!r.items.length){m(!0);return}(await i(c==null?void 0:c.valueCupom,"coupon")).code!==200&&d(!0)};return s.jsxs("div",{className:be["mc--body--coupon-tag"],style:{backgroundColor:`${c.tagColor}`,color:`${c.textColor}`},children:[s.jsx("div",{className:be["mc--body--coupon-tag--text"],dangerouslySetInnerHTML:{__html:c.value}}),s.jsx("div",{className:be["mc--body--coupon-tag--button"],children:s.jsx(p.Button,{variant:"quaternary",mode:"inverse",onClick:_,disabled:l,children:l?"Cupom Aplicado":"Aplicar Cupom"})})]})};cm.displayName="MiniCart.Modal.Body.CouponTag";const lm=({children:e,ICONS:t,MINICART_CONFIG:r,NAME_SPLIT_SYMBOL:n,PLP_NOT_RESULT:o,TEXTURE_IMAGE:i,TIPBAR_CONFIGS:c,TOGGLE_STYLE_MODIFIER:l})=>{const{cartStore:{items:u,messages:d}}=Xe();return s.jsxs(p.Modal.Body,{className:be["mc--body"],children:[e,s.jsx(am,{ICONS:t}),s.jsx(cm,{TIPBAR_CONFIGS:c}),s.jsx("div",{className:be["mc--body--products"],children:Array.isArray(u)&&u.length?u.map((h,m)=>{const _=d.find(g=>{var v;return g.code==="withoutStock"&&((v=g.fields)==null?void 0:v.ean)===h.ean})!==void 0;return s.jsx(Pt.Card,{available:!h.availability.includes("outStock")||!_,index:m,product:h,ICONS:t,MINICART_CONFIG:r,NAME_SPLIT_SYMBOL:n,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:l},`${h.id}-${h.itemOffered.sku}-${m}`)}):s.jsx(Pt.Feedback,{ICONS:t,MINICART_CONFIG:r,PLP_NOT_RESULT:o})})]})};lm.displayName="MiniCart.Body";const um=({children:e,storeConfig:t,MINICART_CONFIG:r})=>{const{cartStore:n}=Xe();if(n.items.length===0)return null;const o=()=>{var c;const i=new URLSearchParams({orderFormId:n.id,...((c=n.marketingData)==null?void 0:c.utmCampaign)&&{utm_campaign:n.marketingData.utmCampaign}});window.location.href=`${t.checkoutUrl}?${i.toString()}#/cart`};return s.jsxs(p.Modal.Footer,{className:be["mc--footer"],children:[e,s.jsx("div",{className:be["mc--footer--actions"],children:s.jsx(p.Button,{variant:"primary",size:"large","data-close":!0,className:be["mc--footer--actions-button"],onClick:o,children:r.messages.checkout_button})})]})};um.displayName="MiniCart.Modal.Footer";const dm=({children:e,ICONS:t,MINICART_CONFIG:r,Z_INDEX_WAR:n})=>{const[o,i]=j.useState(!1),c=j.useRef(null),l=()=>i(u=>!u);return s.jsxs(s.Fragment,{children:[o&&s.jsx(p.Tooltip.Root,{arrow:"right",position:"top",top:-3,left:-3,component:s.jsx("p",{children:"Código da vendedora, cupom ou cálculo do frete"}),id:"inputs--tooltip",className:be["inputs--tooltip"],style:{zIndex:n.modal},isOpen:!0,size:"medium",parent:c.current}),s.jsxs(p.Accordion.Wrapper,{className:be["mc--discount"],children:[s.jsx(p.Accordion.Header,{id:"frete",title:"Frete",closeIndicator:s.jsx(p.Icon,{name:t.arrow_up,size:"medium"}),openIndicator:s.jsx(p.Icon,{name:t.arrow_down,size:"medium"}),className:p.helpers.classNameConcat(be["mc--discount--header"]),startOpen:r.promotion_input_starts_open,children:s.jsxs(p.TextStructure.Root,{children:[s.jsx(p.TextStructure.DivWrapper,{children:s.jsxs("h3",{className:"typography-style-body-sm",children:[r.messages.promo_code_title," "]})}),s.jsx("div",{ref:c,onMouseEnter:l,onMouseLeave:l,"aria-label":"Mostrar descrição",children:s.jsx(p.Icon,{name:t.alert_circle,size:"small"})})]})}),s.jsx(p.Accordion.Body,{className:be["mc--discount--body"],children:e})]})]})};dm.displayName="MiniCart.Discount";const fm=({discount:e,shipping:t,total:r})=>{var u,d;const{data:n}=Xe(),o=(d=(u=n==null?void 0:n.flags)==null?void 0:u.flagCart)==null?void 0:d.flagTotal,i=r-Math.abs(e??0)+(t??0),c=t===0?"Frete Grátis":U.formatPriceToCurrency((t??0)/100),l=[{title:"Frete",value:t===void 0?"A calcular":c},{title:"Desconto",value:U.formatPriceToCurrency((e??0)/100)},{message:(o==null?void 0:o.value)??"",title:"Total",value:`1x de ${U.formatPriceToCurrency(i/100)}`}];return s.jsx("div",{className:be["mc--footer--total"],children:Array.isArray(l)&&l.map((h,m)=>s.jsxs("div",{className:be["mc--footer--total--info"],"data-discount":h.title==="Desconto",children:[s.jsx("p",{children:h.title}),s.jsxs("div",{className:be["mc--footer--total--info--content"],children:[h.message&&(o==null?void 0:o.active)==="Ativar"&&s.jsx(p.Tag,{variant:"primary",title:h.message,style:{backgroundColor:o==null?void 0:o.tagColor,color:o==null?void 0:o.textColor},children:h.message}),s.jsx(p.ProductInfo.Price,{className:be["mc--footer--total--info"],label:h.title,value:h.value})]})]},m))})};fm.displayName="MiniCart.Modal.Footer.Resume.Items";const pm=()=>{var o,i,c;const{totalizers:e}=fn(),t=((o=e.find(l=>l.id==="Items"))==null?void 0:o.value)??0,r=(i=e.find(l=>l.id==="Discounts"))==null?void 0:i.value,n=(c=e.find(l=>l.id==="Shipping"))==null?void 0:c.value;return s.jsx(fm,{discount:r??0,total:t,shipping:n})};pm.displayName="MiniCart.Modal.Footer.Totals";const hm=({ICONS:e,MINICART_CONFIG:t})=>{const{isMobile:r}=xe(),{cartStore:{items:n}}=Xe(),o=n.reduce((i,c)=>i+(c.quantity??0),0);return s.jsx(p.Modal.Header,{navigation:"top",className:be["mc--header"],children:s.jsxs(p.Modal.Controls,{navigation:"top",isMobile:!!r,children:[s.jsx(p.Modal.Title,{navigation:"top",title:t.messages.title}),s.jsx("span",{className:be["mc--header--subtitle"],children:o!==1?`[${o}] Produtos`:`[${o}] Produto`}),s.jsx(p.Button,{"data-close":!0,iconNameStart:e.close,size:"small",variant:"tertiary"})]})})};hm.displayName="MiniCart.Modal.Header";const mm=({ICONS:e,MINICART_CONFIG:t})=>{const{cartStore:{shippingData:r},shipping:n,removeCEP:o}=Xe(),{sendDataLayerEvent:i}=Ee(),[c,l]=j.useState(!1),[u,d]=j.useState(!1),h=j.useCallback(()=>{var P;const w=((P=r==null?void 0:r.address)==null?void 0:P.postalCode)??"";return w.length===8&&!w.includes("-")?`${w.slice(0,5)}-${w.slice(5)}`:w},[r]),[m,_]=j.useState(!!h()),g=()=>{_(!1),l(!1)},v=w=>{var P;if(typeof w=="object"&&(w!=null&&w.logisticsInfo))return(P=w.logisticsInfo)==null?void 0:P.reduce((I,C)=>{var z;const N=(z=C==null?void 0:C.slas)==null?void 0:z.find(D=>(D==null?void 0:D.id)===(C==null?void 0:C.selectedSla));if(!N)return I;const T=parseInt(String((N==null?void 0:N.shippingEstimate)??"").replace("bd","")),O=Number((((N==null?void 0:N.price)??0)/100).toFixed(2));if(I.shipping_tier===void 0)return I.shipping_tier=C==null?void 0:C.selectedSla,I.delivery_time=T.toString(),I.shipping=O,I.flag_retirada=(C==null?void 0:C.selectedDeliveryChannel)==="delivery"?"false":"true",I;const M=parseInt(I.delivery_time??"0");return T>M&&(I.delivery_time=T.toString()),I.shipping=(I.shipping??0)+O,I},{shipping_tier:void 0,delivery_time:void 0,flag_retirada:void 0,shipping:void 0,currency:"BRL"})},x=async w=>{const P=w.replace(/\D/g,"");if(P.length!==8)return!1;try{return!(await Ln.get(`https://viacep.com.br/ws/${P}/json/`)).data.erro}catch{return!1}},S=async w=>{if(d(!0),!!h()||!(w!=null&&w.trim())){await o(),g(),d(!1);return}if(!await x(w)){l(!0),_(!1),d(!1);return}try{const N=await n(w);if(l(!1),N){_(!0);const T=v(N);T&&i({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:T}})}}catch{l(!0)}finally{d(!1)}};return s.jsx(Pt.Field,{hasSuccess:m,hasError:c,isLoading:u,onHandler:S,title:`${t.messages.shipping_calculation_placeholder}`,type:"cep",value:h(),ICONS:e,MINICART_CONFIG:t})};mm.displayName="MiniCart.Shipping";const _m=()=>{var r,n;const{data:e}=Xe(),t=(n=(r=e==null?void 0:e.flags)==null?void 0:r.flagCart)==null?void 0:n.flagHeader;return t!=null&&t.value?s.jsx(p.Tag,{variant:"tertiary",title:t==null?void 0:t.value,size:"small",adornment:{start:t!=null&&t.enableIcon&&(t!=null&&t.icon)?s.jsx(p.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};_m.displayName="MiniCart.TagMessage";const Pt={Body:lm,Card:tm,Cashback:rm,CouponSeller:nm,Discount:dm,Field:im,Feedback:sm,Shipping:mm,Footer:um,Header:hm,TagMessage:_m,Totals:pm},Ob=({ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,PLP_NOT_RESULT:n,TEXTURE_IMAGE:o,TIPBAR_CONFIGS:i,TOGGLE_STYLE_MODIFIER:c,Z_INDEX_WAR:l,storeConfig:u,minicartStyleModifiers:d})=>{const{isOpen:h,setIsOpen:m}=Xe(),{isMobile:_}=xe();return s.jsxs(p.Modal.Root,{className:p.helpers.classNameConcat(be["minicart--modal-modifier"],d),isMobile:!0,isOpen:h,setIsOpen:m,style:{zIndex:l.modal},variant:_?"sideBottom":"sideRight",children:[s.jsx(Pt.Header,{ICONS:e,MINICART_CONFIG:t}),s.jsx(Pt.Body,{ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,PLP_NOT_RESULT:n,TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:c,TIPBAR_CONFIGS:i,children:s.jsx(Pt.TagMessage,{})}),s.jsxs(Pt.Footer,{MINICART_CONFIG:t,storeConfig:u,children:[s.jsxs(Pt.Discount,{ICONS:e,MINICART_CONFIG:t,Z_INDEX_WAR:l,children:[s.jsx(Pt.CouponSeller,{type:"seller",ICONS:e,MINICART_CONFIG:t}),s.jsx(Pt.CouponSeller,{type:"coupon",ICONS:e,MINICART_CONFIG:t}),s.jsx(Pt.Shipping,{ICONS:e,MINICART_CONFIG:t})]}),s.jsx(Pt.Totals,{})]}),s.jsx(Gh,{ICONS:e})]})},gm=({tipBar:e,minicartStyleModifiers:t,menuV2:r,storeConfig:n,className:o})=>{const{structureRef:i,rootRef:c,CONSTANTS:l}=Ze(),{header:{HEADER_CONFIGS:u,Z_INDEX_WAR:d},minicart:h}=l;return s.jsx(p.Header.Structure,{innerRef:i,adornment:{start:e},style:{position:"sticky",top:0,zIndex:d.header},className:p.helpers.classNameConcat(Dc["header-animation"],o),children:s.jsxs(p.Header.Root,{innerRef:c,style:{zIndex:d.header},variant:u.default_variant,interactiveVariant:u.interactive_variant,children:[r??s.jsxs(hb,{children:[s.jsx("div",{className:U.responsive["responsive-mobile-block"],style:{height:"100%",width:"100%",zIndex:d.header_mobile},children:s.jsx(Wh,{storeConfig:n})}),s.jsx("div",{className:U.responsive["responsive-desktop-block"],style:{height:"100%",width:"100%",zIndex:d.header_desktop},children:s.jsx(Th,{storeConfig:n})})]}),s.jsx(Sb,{children:s.jsx(Ob,{...h,minicartStyleModifiers:t})}),s.jsx(Rc,{title:"Produto adicionado à sua sacola!",CONSTANTS:l.addToCart})]})})};gm.displayName="Header";const Ab="_shippingFreight_6z8rf_6",kb="_shippingFreight__postalCodeGrid_6z8rf_10",Mb="_shippingFreight__grid_6z8rf_14",Lb="_shippingFreight__grid__title_6z8rf_18",Db="_shippingFreight__grid__remember_6z8rf_29",Fb="_postalCodeContainer_6z8rf_44",zb="_deliveryStatusBar__tag_6z8rf_49",qb="_deliveryStatusBarError__tag_6z8rf_66",Bb="_deliveryInfo_6z8rf_74",Ub="_deliveryInfo__content_6z8rf_78",Hb="_deliveryInfo__text_6z8rf_84",$b="_deliveryInfo__title_6z8rf_89",Wb="_deliveryInfo__subtitle_6z8rf_99",Vb="_deliveryInfo__tooltipIcon_6z8rf_109",Gb="_deliveryInfo__tooltip_6z8rf_109",Kb="_freightGrid_6z8rf_148",Qb="_freightContainer_6z8rf_155",Yb="_freightOption__content_6z8rf_160",Xb="_freightOption__value_6z8rf_166",Jb="_freightOption__title_6z8rf_177",Zb="_freightOption__title_item_6z8rf_181",ej="_freightOption__paragraph_6z8rf_192",ze={shippingFreight:Ab,shippingFreight__postalCodeGrid:kb,shippingFreight__grid:Mb,shippingFreight__grid__title:Lb,shippingFreight__grid__remember:Db,postalCodeContainer:Fb,deliveryStatusBar__tag:zb,deliveryStatusBarError__tag:qb,deliveryInfo:Bb,deliveryInfo__content:Ub,deliveryInfo__text:Hb,deliveryInfo__title:$b,deliveryInfo__subtitle:Wb,deliveryInfo__tooltipIcon:Vb,deliveryInfo__tooltip:Gb,freightGrid:Kb,freightContainer:Qb,freightOption__content:Yb,freightOption__value:Xb,freightOption__title:Jb,freightOption__title_item:Zb,freightOption__paragraph:ej,"input-modifier":"_input-modifier_6z8rf_207","freight--tooltip":"_freight--tooltip_6z8rf_227"},tj=({icon:e,title:t,subtitle:r,packageCount:n,packageUnit:o="",labelDescription:i,freightConfig:c,toolTipZIndex:l})=>{const[u,d]=j.useState(!1),h=j.useRef(null),m=()=>d(_=>!_);return s.jsxs("div",{className:ze.deliveryInfo,ref:h,children:[s.jsx(p.Tooltip.Root,{arrow:"bottom",component:s.jsx("div",{children:s.jsx("p",{children:c.messages.select_size_tag})}),id:"freight--tooltip",className:ze["freight--tooltip"],style:{zIndex:l},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:h.current}),s.jsxs("div",{className:ze.deliveryInfo__content,children:[s.jsx("div",{className:ze.deliveryInfo__icon,children:s.jsx(p.Icon,{name:e,size:"medium"})}),s.jsxs("div",{className:ze.deliveryInfo__text,children:[s.jsxs("span",{className:ze.deliveryInfo__title,children:[t," ",n," ",o]}),r&&s.jsx("span",{className:ze.deliveryInfo__subtitle,children:r})]}),i&&s.jsxs("div",{className:ze.deliveryInfo__tooltipIcon,onMouseEnter:m,onMouseLeave:m,"aria-label":"Mostrar descrição",children:[s.jsx("span",{children:s.jsx(p.Icon,{name:c.icons.feedback_help,size:"small"})}),u&&s.jsx("div",{className:ze.deliveryInfo__tooltip,children:i})]})]})]})},rj=({value:e,title:t,paragraph:r})=>s.jsx("div",{className:ze.freightOption,children:s.jsxs("div",{className:ze.freightOption__content,children:[s.jsx("span",{className:ze.freightOption__value,children:e}),s.jsx("span",{className:ze.freightOption__title,children:s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{className:ze.footer__item,children:[s.jsx("span",{className:ze.freightOption__title_item,children:t}),r&&s.jsx("span",{className:ze.freightOption__paragraph,children:r})]})})})]})}),nj=({children:e})=>s.jsx("div",{className:ze.freightContainer,children:e}),sj=({children:e})=>s.jsx("div",{className:ze.freightGrid,children:e}),oj=({children:e})=>s.jsx("div",{className:ze.postalCodeContainer,children:e}),$u=({message:e,seller:t="",size:r="small",setError:n})=>s.jsx("div",{className:n?ze.deliveryStatusBarError:ze.deliveryStatusBar,children:s.jsxs(p.Tag,{title:e,className:n?ze.deliveryStatusBarError__tag:ze.deliveryStatusBar__tag,size:r,children:[e," ",!n&&t]})}),ij=e=>{const t=parseInt(e,10);return t===1?`${t} dia`:`${t} dias`},aj=e=>{var r,n,o;const t=[];return(o=(n=(r=e==null?void 0:e.logisticsInfo)==null?void 0:r[0])==null?void 0:n.slas)==null||o.forEach(i=>{t.push({id:i.id,name:i.name,price:i.price,shippingEstimate:i.shippingEstimate})}),t},cj=({component:e,parent:t,top:r,left:n,target:o,contentRef:i,freightConfig:c,toolTipZIndex:l=999,...u})=>{const{isMobile:d}=xe();return s.jsx(s.Fragment,{children:d?s.jsx(p.Tooltip.Root,{arrow:"bottom",component:s.jsxs("div",{...u,ref:i,children:[e,s.jsx("p",{children:c.messages.select_size_tag})]}),id:"freight--tooltip",className:ze["freight--tooltip"],style:{zIndex:l},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:t}):s.jsx(p.Tooltip.Root,{arrow:"bottom",component:s.jsxs("div",{...u,ref:i,children:[e,s.jsx("p",{children:c.messages.select_size_tag})]}),id:"freight--tooltip",className:ze["freight--tooltip"],style:{zIndex:l},isOpen:!0,size:"medium",position:"top",top:"-110%",left:"3%",parent:t})})},lj=({onUpdateFreightItems:e,sellerId:t,size:r,skuId:n,quantity:o,setError:i,setIsButtonClicked:c,component:l,freightConfig:u,toolTipZIndex:d})=>{var B,G,J,Y;const h=fn(),m=fn(X=>X.shipping),[_,g]=j.useState(),[v,x]=j.useState(!1),[S,w]=j.useState(!1),[P,I]=j.useState(!1),C=(G=(B=h.shippingData)==null?void 0:B.address)==null?void 0:G.postalCode,N=!(_!=null&&_.length)&&C?C:_,T=j.useRef(null),O=async X=>{const he=X.target.value.replace(/\D/g,"").slice(0,8);he.length>5?g(he.replace(/^(\d{5})(\d{1,3})/,"$1-$2")):g(he)},M=async X=>{const Z=X.target.value.replace(/\D/g,"");try{if((await Ln.get(`https://viacep.com.br/ws/${Z}/json/`)).data.erro){i&&i(u.messages.cep_not_found),c(!1),w(!0);return}i&&i(""),w(!1)}catch{console.log("Erro ao validar o CEP. Tente novamente mais tarde.")}},z=async()=>{x(!0);try{const X=await Ln.post("/api/checkout/simulation",{items:[{id:n,quantity:o,seller:t}],country:"BRA",postalCode:N});e(aj(X.data))}catch(X){console.error("Erro ao atualizar o documento:",X)}finally{x(!1),m(N,"BRA")}},D=async()=>{if(!n){I(!0),setTimeout(()=>I(!1),1500);return}await M({target:{value:N}}),v||(z(),c(!0))};return s.jsxs("div",{ref:T,style:{position:"relative"},children:[!n&&P?s.jsx(cj,{component:l,isOpen:P,parent:T.current,toolTipZIndex:d,freightConfig:u}):s.jsx(s.Fragment,{}),s.jsx("div",{style:{position:"relative"},children:s.jsx(p.TextField.Structure,{title:"structure",style:{width:"100%"},input:s.jsx(p.TextField.Input,{defaultValue:(Y=(J=h.shippingData)==null?void 0:J.address)==null?void 0:Y.postalCode,label:u.messages.text_input_label,title:"textfield",value:_,sizeVariant:r,onMouseOver:()=>n?null:I(!0),onMouseOut:()=>n?null:I(!1),mode:"simple",onChange:O,onKeyDown:X=>{X.key==="Enter"&&D()},className:ze["input-modifier"],feedback:S?"error":"none"}),right:s.jsx(p.Button,{onClick:D,size:r,title:"button",children:v?s.jsx(p.Spinner,{size:"small",indicatorColor:"#ffffff"}):u.messages.text_input_btn})})})]})},uj=({children:e,freightConfig:t})=>s.jsxs("div",{className:ze.shippingFreight,children:[s.jsxs("div",{className:ze.shippingFreight__grid,children:[s.jsx("span",{className:ze.shippingFreight__grid__title,children:t.messages.title}),s.jsx("span",{className:ze.shippingFreight__grid__remember,children:s.jsx(wt,{href:"https://buscacepinter.correios.com.br/app/endereco/index.php",passHref:!0,target:"_blank",rel:"noopener noreferrer",size:"x-small",disablePadding:!1,title:t.messages.remember_cep,children:t.messages.remember_cep})})]}),s.jsx("div",{className:ze.shippingFreight__postalCodeGrid,children:e})]}),dj=({children:e})=>s.jsx("div",{className:ze.freightContainer,children:e}),ym=({className:e,sellerId:t,skuId:r,quantity:n,size:o,seller:i,local:c,CONSTANTS_PROPS:l})=>{const{sendDataLayerEvent:u}=Ee(),[d,h]=j.useState(""),[m,_]=j.useState([]),[g,v]=j.useState(""),[x,S]=j.useState(!1),w=I=>h(I),P=I=>{_(I),u({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:{shippings:I.map(C=>({shipping_tier:C.id,delivery_time:C.shippingEstimate.replace("bd",""),flag_pickup:C.name.toLowerCase().includes("retirada")?"true":"false",shipping:C.price,currency:l.currency||"BRL"}))}}})};return s.jsxs(dj,{className:e,children:[s.jsxs(uj,{freightConfig:l.freightConfig,children:[s.jsx(oj,{children:s.jsx(lj,{onUpdateFreightItems:P,skuId:r,quantity:n,size:o,sellerId:t,local:c,setError:v,setIsButtonClicked:S,freightConfig:l.freightConfig,toolTipZIndex:l.toolTipZIndex})}),g?s.jsx($u,{size:o,message:g,setError:v}):m.length>0&&s.jsx($u,{size:o,message:l.freightConfig.messages.delivered_by,seller:i})]}),x&&!g?m.length>0&&s.jsxs(nj,{children:[s.jsx(sj,{children:m.filter(({id:I})=>!I.includes("Retirada")).map(I=>s.jsx(rj,{id:I.id,value:U.freightParsePrice({valueInCents:I.price,hasFree:!1,freeTaxMessage:l.freightConfig.messages.free_tax}),title:I.name,paragraph:`${l.freightConfig.messages.prefix_days}${ij(I.shippingEstimate)}`,radioValue:d,changeValue:w},I.id))}),l.deliveryInfoBoxesAllowed?s.jsx(tj,{icon:l.freightConfig.icons.delivery_truck,packageUnit:l.freightConfig.messages.unit_amout,title:l.freightConfig.messages.delivered_amount_packages,subtitle:"",packageCount:1,labelDescription:"Label",freightConfig:l.freightConfig,toolTipZIndex:l.toolTipZIndex??999}):s.jsx(s.Fragment,{})]}):null]})},_n={"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"},fj=({children:e,href:t,isLast:r,title:n})=>{const{constants:{ICONS:o}}=ut();return s.jsx(p.BreadCrumb.Item,{adornment:{end:r&&s.jsx(p.Icon,{name:o.arrow_right})},children:r?s.jsx(wt,{href:t??"/",size:"medium",title:n,disableUnderline:!0,children:e}):e})},vm=()=>{var o;const{state:e}=ft(),t=e!=null&&e.term&&e.term.length>0?`/${e.term}`:"",r=decodeURIComponent((o=e==null?void 0:e.base)!=null&&o.length?e.base:t??t).slice(1).split("/"),n=Gf(r);return s.jsx("div",{className:_n["pcd-navigation--breadcrumb"],children:s.jsx(p.BreadCrumb.DivWrapper,{children:s.jsx(p.BreadCrumb.List,{children:Array.isArray(n)&&n.map((i,c)=>{var l,u;return j.createElement(fj,{...i,isLast:c!==n.length-1,key:i.href,title:(l=i.name)==null?void 0:l.replace(/-/g," ")},(u=i.name)==null?void 0:u.replace(/-/g," "))})})})})};vm.displayName="PLPNavigation.BreadCrumb";const xm=({children:e,...t})=>s.jsxs("div",{...t,className:_n["pdc-navigation--content"],children:[s.jsx(Br.Filters,{}),e]});xm.displayName="PLPNavigation.Content";const pj="_sort_35wro_1",Yo={sort:pj,"sort-list-wrapper":"_sort-list-wrapper_35wro_8","sort-list":"_sort-list_35wro_8","sort-button":"_sort-button_35wro_25"},hj=({children:e,sortListOpen:t,btnAdornment:r,style:n,...o})=>s.jsx(p.Button,{...o,adornment:{end:t?r==null?void 0:r.listOpen:r==null?void 0:r.listClosed},size:"small",variant:"tertiary",style:{...n,textDecoration:"none"},className:Yo["sort-button"],children:e}),mj=e=>s.jsx(p.RadioButton.Radio,{...e}),_j=({children:e,className:t,name:r,...n})=>s.jsx(p.RadioButton.Group,{...n,name:r||"sort-group",className:p.helpers.classNameConcat(Yo["sort-list"],t),children:e}),gj=({children:e,className:t,shadow:r=!0,padding:n="small",height:o="fit-content",...i})=>s.jsx(p.Card,{...i,shadow:r,className:p.helpers.classNameConcat(Yo["sort-list-wrapper"],t),padding:n,height:o,children:e}),bm=j.forwardRef(({children:e,className:t,...r},n)=>s.jsx("div",{...r,ref:n,className:p.helpers.classNameConcat(Yo.sort,t),children:e}));bm.displayName="SortRoot";const Xo=({handleSelectValue:e,sortListOpen:t,setSortListOpen:r,searchParams:n,ICONS:o,...i})=>{var _;const c=(_=n==null?void 0:n.get("sort"))==null?void 0:_.replace(":","_"),[l,u]=j.useState(c),{sendDataLayerEvent:d}=Ee();j.useEffect(()=>{u(c||void 0)},[c]);const{ref:h}=wh(()=>r(!1)),m=g=>{const v=g.target.value;u(v),typeof e=="function"&&e(v),d({functionKey:"filterEvent",data:{customData:{ordering:ds.options[v]}}}),r(!1)};return s.jsxs(bm,{...i,ref:h,children:[s.jsx(hj,{btnAdornment:{listOpen:s.jsx(p.Icon,{name:o.arrow_up,size:"small"}),listClosed:s.jsx(p.Icon,{name:o.arrow_down,size:"small"})},sortListOpen:t,onClick:()=>r(!t),children:l?ds.options[l]:ds.placeholder},"sort-button"),t&&s.jsx(gj,{children:s.jsx(_j,{name:"sort-group",value:l??"",onChange:m,children:Object.keys(ds.options).map(g=>s.jsx(mj,{label:ds.options[g],value:g},g))})})]})};Xo.displayName="Sort";const jm=j.createContext({}),yj=({children:e,...t})=>{const[r,n]=j.useState(!1);return s.jsx(jm.Provider,{value:j.useMemo(()=>({...t,openOrderBy:r,setOpenOrderBy:n}),[t,r,n]),children:e})},vj=()=>{const e=j.useContext(jm);if(e===void 0)throw new Error("usePLPNavigationContext must be used within a PDCNavigationProvider");return e},Sm=()=>{const{openOrderBy:e,onSort:t,setOpenFilters:r,setOpenOrderBy:n}=vj(),{constants:{ICONS:o,PDC_NAVIGATION:i}}=ut();return s.jsxs("div",{className:_n["pdc-navigation--filters"],children:[s.jsx(Br.BreadCrumb,{}),s.jsxs("div",{className:_n["pdc-navigation--filters--content"],children:[s.jsx(Xo,{handleSelectValue:c=>t(c??"release_desc"),sortListOpen:e,setSortListOpen:n,ICONS:o,searchParams:new URLSearchParams}),s.jsx(p.Button,{adornment:{end:s.jsx(p.Icon,{name:o.arrow_down})},onClick:()=>r(!0),size:"small",variant:"tertiary",children:i.filter_button}),s.jsx(Br.Total,{})]})]})};Sm.displayName="PLPNavigation.Filters";const Cm=({children:e,onSort:t,setOpenFilters:r,style:n,...o})=>{const i=j.useRef(null);return s.jsx(yj,{onSort:t,setOpenFilters:r,children:s.jsx("div",{...o,className:_n["pdc-navigation"],ref:i,style:{...n},children:s.jsx(Br.Content,{children:e})})})};Cm.displayName="Root";const wm=({callback:e,selected:t,...r})=>s.jsx("div",{...r,className:_n["pdc-navigation--selected"],children:s.jsx("div",{className:_n["pdc-navigation--selected--container"],children:Array.isArray(t)?t.map(n=>n.key==="productclusterids"?null:s.jsx(Br.SelectedItem,{callback:e,facet:n},n.value)):null})});wm.displayName="PLPNavigation.Selected";const zc=({key:e,PLP_FILTERS:t})=>t.some(r=>r.key===e)?e==="cores-filtraveis":!1,qc=({value:e,PLP_FILTERS_COLORS:t})=>{var r;return((r=t.find(n=>n.value===e))==null?void 0:r.color)??"#F2F2F2"},Em=({key:e,PLP_FILTERS:t})=>{var r;return(r=t.find(n=>n.key===e))==null?void 0:r.label},Im=({key:e,PLP_FILTERS:t})=>{var r;return((r=t.find(n=>n.key===e))==null?void 0:r.order)??0},Ha=({value:e})=>{const[t,r]=e.split(":").length===2?e.split(":"):[0,0],n=U.formatPriceToCurrency(Number(r));return`${U.formatPriceToCurrency(Number(t))} até ${n}`},Pm=({items:e})=>{const t=e.flatMap(o=>[o.range.from,o.range.to]),r=Math.min(...t.map(Math.abs)),n=Math.max(...t.map(Math.abs));return[r,n]},Nm=Object.freeze(Object.defineProperty({__proto__:null,checkedColor:zc,createTagPrice:Ha,getAbsoluteMinMax:Pm,getColor:qc,getName:Em,getOrder:Im},Symbol.toStringTag,{value:"Module"})),Wt={"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"},Rm=({columns:e=2,CONSTANTS:t,...r})=>{var i;const{filters:n,onToggleFacet:o}=$r();return s.jsxs("div",{...r,className:Wt["filter--modal--body--content"],children:[Array.isArray(n.facets)&&n.facets.map(c=>s.jsx(br.Item,{columns:e,facet:c,onToggleFacet:o,CONSTANTS:t},c.key)),!((i=n.facets)!=null&&i.length)&&s.jsx(br.Empty,{PLP_FILTERS_EMPTY:t.PLP_FILTERS_EMPTY})]})};Rm.displayName="Filter.Item.Content";const Tm=({PLP_FILTERS_EMPTY:e})=>{const t=()=>{window.history.back()};return s.jsxs("div",{className:Wt["filter--empty"],children:[s.jsxs(p.TextStructure.DivWrapper,{children:[s.jsx("h4",{children:e.title}),s.jsx("p",{children:e.subtitle})]}),s.jsx(p.Button,{onClick:()=>t(),variant:"tertiary",children:e.button})]})};Tm.displayName="Filter.Empty";const Om=({columns:e,facet:t,onToggleFacet:r,CONSTANTS:n,...o})=>{const i=Im({key:t.key,PLP_FILTERS:n.PLP_FILTERS}),c=()=>{if(t.__typename==="FacetBoolean"){if(t.key==="cores-filtraveis")return s.jsx(br.Colors,{onToggleFacet:r,values:t.values,PLP_FILTERS:n.PLP_FILTERS,PLP_FILTERS_COLORS:n.PLP_FILTERS_COLORS});if(t.key==="tamanho")return s.jsx(br.Sizes,{onToggleFacet:r,values:t.values,PLP_SIZE_ORDER:n.PLP_SIZE_ORDER});if(t.key==="category-3"||t.key==="tecido")return s.jsx(br.Toggle,{columns:e,facetKey:t.key,onToggleFacet:r,values:t.values,ICONS:n.ICONS})}return t.__typename==="FacetRange"?s.jsx(br.Price,{facet:t}):s.jsx("p",{children:"Filter not support!!!"})};return s.jsx("div",{...o,className:Wt["filter--item"],style:{order:i},children:s.jsxs(p.Accordion.Wrapper,{style:{width:"100%"},children:[s.jsx(p.Accordion.Header,{id:t.key,closeIndicator:s.jsx(p.Icon,{name:n.ICONS.arrow_up}),openIndicator:s.jsx(p.Icon,{name:n.ICONS.arrow_down}),children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h4",{className:"typography-style-body-sm",children:Em({key:t.key,PLP_FILTERS:n.PLP_FILTERS})})})})}),s.jsx(p.Accordion.Body,{children:c()})]})})};Om.displayName="Filter.Item";const Am=({onToggleFacet:e,values:t,PLP_FILTERS:r,PLP_FILTERS_COLORS:n,...o})=>{const{filters:{selected:i}}=$r();return s.jsx(rr.Root,{...o,children:s.jsx(rr.List,{children:Array.isArray(t)&&t.map(({key:c,value:l})=>s.jsx(rr.Option,{active:!!(i!=null&&i.find(u=>u.key===c&&u.value===l)),"data-color":zc({key:c,PLP_FILTERS:r}),fill:qc({value:l,PLP_FILTERS_COLORS:n}),onClick:()=>e({key:c,value:l}),type:"color"},`${c}-${l}`))})})};Am.displayName="Filter.Item.Color";const km=({facet:e,...t})=>{var d,h;const{filters:{selected:r},price:n,onToggleFacet:o}=$r(),[i,c]=(n==null?void 0:n.split(":").map(Number))??[0,100],[l,u]=((h=(d=r==null?void 0:r.find(({key:m})=>m==="price"))==null?void 0:d.value)==null?void 0:h.split(":").map(Number))??[i,c];return s.jsx("div",{...t,className:Wt["filter--item--price"],children:s.jsxs(p.Slider.SliderDual,{format:"price",initialValue:[l<i?i:l,u>c?c:u],min:i,max:c,type:"dual",step:1,onFinish:m=>{var _,g;m&&o({key:"price",value:`${(_=m.range)==null?void 0:_.min}:${(g=m.range)==null?void 0:g.max}`})},children:[s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("p",{"data-min-value":!0})})}),s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("p",{"data-max-value":!0})})})]})})};km.displayName="Filter.Item.Price";const Mm=({onToggleFacet:e,values:t,PLP_SIZE_ORDER:r,...n})=>{const{filters:{selected:o}}=$r(),i=[...t].sort((c,l)=>{const u=r.indexOf(c.name),d=r.indexOf(l.name);return u-d});return s.jsx(rr.Root,{...n,children:s.jsx(rr.List,{children:Array.isArray(i)&&i.map(({key:c,value:l})=>s.jsx(rr.Option,{active:!!(o!=null&&o.find(u=>u.key===c&&u.value===l)),text:l,type:"size",onClick:()=>e({key:c,value:l})},l))})})};Mm.displayName="Filter.Item.Sizes";const Lm=({columns:e,facetKey:t,onToggleFacet:r,values:n,ICONS:o,...i})=>s.jsx("div",{...i,className:Wt["filter--item--toggle"],children:s.jsx("div",{className:Wt["filter--item--toggle--container"],style:{gridTemplateColumns:`repeat(${e}, 1fr)`},children:Array.isArray(n)&&n.map(c=>s.jsx(p.Checkbox,{label:(c==null?void 0:c.name)??"",adornment:s.jsx(p.Icon,{name:o.check}),checked:c.selected,onChange:()=>r(c)},c.value))})});Lm.displayName="Filter.Item.Toggle";const Dm=({...e})=>{const{isLoading:t}=$r();return s.jsx("div",{className:Wt["filter--loading"],"data-active":t,...e,children:s.jsx(p.Spinner,{indicatorColor:"#000",background:"#222"})})};Dm.displayName="Filter.Loading";const Fm=({children:e,className:t,isMobile:r=!1,CONSTANTS:{PLP_FILTERS_TITLE:n,ICONS:o}})=>{var d;const{deleteAllFacets:i,filters:c,isOpen:l,setIsOpen:u}=$r();return s.jsxs(p.Modal.Root,{className:p.helpers.classNameConcat(Wt["filter--modal"],t),isMobile:r??!1,isOpen:l,setIsOpen:u,variant:r?"sideBottom":"sideRight",style:{zIndex:99},children:[s.jsxs(p.Modal.Header,{navigation:"top",children:[s.jsx(p.Modal.Controls,{navigation:"top",isMobile:r,children:s.jsx(p.Button,{"data-close":!0,iconNameStart:o.close,size:"small",variant:"tertiary",style:{marginLeft:"auto"}})}),s.jsx(p.Modal.Title,{navigation:"top",title:n})]}),s.jsxs(p.Modal.Body,{style:{width:500},children:[s.jsx("div",{className:Wt["filter--modal--body"],children:e}),s.jsx(br.Loading,{})]}),s.jsx(p.Modal.Footer,{children:s.jsxs("div",{className:Wt["filter--modal--footer"],children:[s.jsx(p.Button,{"data-close":!0,size:"large",variant:"primary",children:(d=c.facets)!=null&&d.length?"ver resultados":"fechar"}),s.jsx(p.Button,{"data-close":!0,onClick:()=>i(),variant:"tertiary",children:"limpar filtros"})]})})]})};Fm.displayName="Filter.Modal";const zm=({children:e,className:t,isMobile:r,CONSTANTS:n,...o})=>s.jsx(up,{...o,PLP_FILTERS:n.PLP_FILTERS,children:s.jsx(br.Modal,{className:t,isMobile:r,CONSTANTS:n,children:e})});zm.displayName="Filter.Root";const qm=({ICONS:e,PLP_FILTERS_COLORS:t,PLP_FILTERS:r})=>{const{filters:n,onToggleFacet:o}=$r();return s.jsx("div",{className:Wt["filter--selected"],children:s.jsx("div",{className:Wt["filter--selected--content"],children:Array.isArray(n.selected)&&n.selected.map(({key:i,value:c})=>i==="productclusterids"?null:s.jsx(p.Tag,{title:i==="price"?Ha({value:c}):c,adornment:{end:s.jsx(p.Icon,{name:e.close,size:"x-small"})},colorSquare:qc({value:c,PLP_FILTERS_COLORS:t}),onClick:()=>o({key:i,value:c}),squareShow:zc({key:i,PLP_FILTERS:r}),size:"medium",variant:"primary",children:i==="price"?Ha({value:c}):c},c))})})};qm.displayName="Filter.Selected";const br={Colors:Am,Content:Rm,Empty:Tm,Modal:Fm,Item:Om,Root:zm,Loading:Dm,Selected:qm,Price:km,Sizes:Mm,Toggle:Lm},{checkedColor:xj,createTagPrice:Wu,getColor:bj}=Nm,Bm=({callback:e,facet:t})=>{const{constants:{ICONS:r,PLP_FILTERS_COLORS:n,PLP_FILTERS:o}}=ut();return s.jsx(p.Tag,{title:(t==null?void 0:t.key)==="price"?Wu({value:t.value}):t.value.toUpperCase(),adornment:{end:s.jsx(p.Icon,{name:r.close,size:"x-small"})},colorSquare:bj({value:t.value,PLP_FILTERS_COLORS:n}),onClick:()=>{typeof e=="function"&&e(t,!0)},squareShow:xj({key:t.key,PLP_FILTERS:o}),size:"medium",variant:"primary",children:(t==null?void 0:t.key)==="price"?Wu({value:t.value}):t.value.toUpperCase()})};Bm.displayName="PLPNavigation.Selected.Item";const Um=()=>s.jsx(p.TextStructure.Root,{children:s.jsx("p",{id:"pdc-navigation--total"})});Um.displayName="PLPNavigation.Total";const Br={BreadCrumb:vm,Content:xm,Filters:Sm,Root:Cm,Selected:wm,SelectedItem:Bm,Total:Um},jj="_footer__bottom_198g6_2",Sj="_footer__wrapper_198g6_10",Cj="_footer__main_198g6_39",wj="_footer__legalInformation_198g6_55",Ej="_footer__column_198g6_77",Ij="_footer__columnContent_198g6_87",Pj="_footer__item_198g6_91",Nj="_footer__itemLink_198g6_107",Rj="_footer__columnTitle_198g6_122",Tj="_footer__columnTitleIcon_198g6_134",Oj="_footer__iconList_198g6_147",Aj="_footer__itemSmallText_198g6_157",kj="_payment_198g6_168",Mj="_footer__iconContainer_198g6_173",Lj="_footer__iconListSubHeader_198g6_178",Dj="_accordionWrapper_198g6_200",Fj="_accordionHeader_198g6_204",zj="_accordionTextWrapper_198g6_208",Be={footer__bottom:jj,footer__wrapper:Sj,footer__main:Cj,footer__legalInformation:wj,footer__column:Ej,footer__columnContent:Ij,footer__item:Pj,footer__itemLink:Nj,footer__columnTitle:Rj,footer__columnTitleIcon:Tj,footer__iconList:Oj,footer__itemSmallText:Aj,payment:kj,footer__iconContainer:Mj,footer__iconListSubHeader:Lj,accordionWrapper:Dj,accordionHeader:Fj,accordionTextWrapper:zj,"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 Hm={},Bc={},Jo={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"warnOnce",{enumerable:!0,get:function(){return t}});let t=r=>{};if(process.env.NODE_ENV!=="production"){const r=new Set;t=n=>{r.has(n)||console.warn(n),r.add(n)}}})(Jo);var $m={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImageBlurSvg",{enumerable:!0,get:function(){return t}});function t(r){let{widthInt:n,heightInt:o,blurWidth:i,blurHeight:c,blurDataURL:l,objectFit:u}=r;const d=20,h=i?i*40:n,m=c?c*40:o,_=h&&m?"viewBox='0 0 "+h+" "+m+"'":"",g=_?"none":u==="contain"?"xMidYMid":u==="cover"?"xMidYMid slice":"none";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+_+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='"+d+"'/%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='"+d+"'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+g+"' style='filter: url(%23b);' href='"+l+"'/%3E%3C/svg%3E"}})($m);var Zo={};(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,{VALID_LOADERS:function(){return r},imageConfigDefault:function(){return n}});const r=["default","imgix","cloudinary","akamai","custom"],n={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",localPatterns:void 0,remotePatterns:[],qualities:void 0,unoptimized:!1}})(Zo);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImgProps",{enumerable:!0,get:function(){return g}});const t=Jo,r=$m,n=Zo,o=["lazy","eager",void 0];function i(v){return v.default!==void 0}function c(v){return v.src!==void 0}function l(v){return typeof v=="object"&&(i(v)||c(v))}const u=new Map;let d;function h(v){return typeof v>"u"?v:typeof v=="number"?Number.isFinite(v)?v:NaN:typeof v=="string"&&/^[0-9]+$/.test(v)?parseInt(v,10):NaN}function m(v,x,S){let{deviceSizes:w,allSizes:P}=v;if(S){const C=/(^|\s)(1?\d?\d)vw/g,N=[];for(let T;T=C.exec(S);T)N.push(parseInt(T[2]));if(N.length){const T=Math.min(...N)*.01;return{widths:P.filter(O=>O>=w[0]*T),kind:"w"}}return{widths:P,kind:"w"}}return typeof x!="number"?{widths:w,kind:"w"}:{widths:[...new Set([x,x*2].map(C=>P.find(N=>N>=C)||P[P.length-1]))],kind:"x"}}function _(v){let{config:x,src:S,unoptimized:w,width:P,quality:I,sizes:C,loader:N}=v;if(w)return{src:S,srcSet:void 0,sizes:void 0};const{widths:T,kind:O}=m(x,P,C),M=T.length-1;return{sizes:!C&&O==="w"?"100vw":C,srcSet:T.map((z,D)=>N({config:x,src:S,quality:I,width:z})+" "+(O==="w"?z:D+1)+O).join(", "),src:N({config:x,src:S,quality:I,width:T[M]})}}function g(v,x){let{src:S,sizes:w,unoptimized:P=!1,priority:I=!1,loading:C,className:N,quality:T,width:O,height:M,fill:z=!1,style:D,overrideSrc:B,onLoad:G,onLoadingComplete:J,placeholder:Y="empty",blurDataURL:X,fetchPriority:Z,decoding:he="async",layout:fe,objectFit:ee,objectPosition:ie,lazyBoundary:_e,lazyRoot:Ce,...ge}=v;const{imgConf:we,showAltText:V,blurComplete:oe,defaultLoader:F}=x;let ce,je=we||n.imageConfigDefault;if("allSizes"in je)ce=je;else{var Oe;const de=[...je.deviceSizes,...je.imageSizes].sort((ve,qe)=>ve-qe),Q=je.deviceSizes.sort((ve,qe)=>ve-qe),se=(Oe=je.qualities)==null?void 0:Oe.sort((ve,qe)=>ve-qe);ce={...je,allSizes:de,deviceSizes:Q,qualities:se}}if(typeof F>"u")throw new Error(`images.loaderFile detected but the file is missing default export.
|
|
5
5
|
Read more: https://nextjs.org/docs/messages/invalid-images-config`);let q=ge.loader||F;delete ge.loader,delete ge.srcSet;const $="__next_img_default"in q;if($){if(ce.loader==="custom")throw new Error('Image with src "'+S+`" is missing "loader" prop.
|
|
6
6
|
Read more: https://nextjs.org/docs/messages/next-image-missing-loader`)}else{const de=q;q=Q=>{const{config:se,...ve}=Q;return de(ve)}}if(fe){fe==="fill"&&(z=!0);const de={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}},Q={responsive:"100vw",fill:"100vw"},se=de[fe];se&&(D={...D,...se});const ve=Q[fe];ve&&!w&&(w=ve)}let Pe="",ne=h(O),te=h(M),ke,ct;if(l(S)){const de=i(S)?S.default:S;if(!de.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(de));if(!de.height||!de.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(de));if(ke=de.blurWidth,ct=de.blurHeight,X=X||de.blurDataURL,Pe=de.src,!z){if(!ne&&!te)ne=de.width,te=de.height;else if(ne&&!te){const Q=ne/de.width;te=Math.round(de.height*Q)}else if(!ne&&te){const Q=te/de.height;ne=Math.round(de.width*Q)}}}S=typeof S=="string"?S:Pe;let Me=!I&&(C==="lazy"||typeof C>"u");(!S||S.startsWith("data:")||S.startsWith("blob:"))&&(P=!0,Me=!1),ce.unoptimized&&(P=!0),$&&S.endsWith(".svg")&&!ce.dangerouslyAllowSVG&&(P=!0),I&&(Z="high");const Le=h(T);if(process.env.NODE_ENV!=="production"){if(ce.output==="export"&&$&&!P)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(!S)P=!0;else if(z){if(O)throw new Error('Image with src "'+S+'" has both "width" and "fill" properties. Only one should be used.');if(M)throw new Error('Image with src "'+S+'" has both "height" and "fill" properties. Only one should be used.');if(D!=null&&D.position&&D.position!=="absolute")throw new Error('Image with src "'+S+'" has both "fill" and "style.position" properties. Images with "fill" always use position absolute - it cannot be modified.');if(D!=null&&D.width&&D.width!=="100%")throw new Error('Image with src "'+S+'" has both "fill" and "style.width" properties. Images with "fill" always use width 100% - it cannot be modified.');if(D!=null&&D.height&&D.height!=="100%")throw new Error('Image with src "'+S+'" has both "fill" and "style.height" properties. Images with "fill" always use height 100% - it cannot be modified.')}else{if(typeof ne>"u")throw new Error('Image with src "'+S+'" is missing required "width" property.');if(isNaN(ne))throw new Error('Image with src "'+S+'" has invalid "width" property. Expected a numeric value in pixels but received "'+O+'".');if(typeof te>"u")throw new Error('Image with src "'+S+'" is missing required "height" property.');if(isNaN(te))throw new Error('Image with src "'+S+'" has invalid "height" property. Expected a numeric value in pixels but received "'+M+'".')}if(!o.includes(C))throw new Error('Image with src "'+S+'" has invalid "loading" property. Provided "'+C+'" should be one of '+o.map(String).join(",")+".");if(I&&C==="lazy")throw new Error('Image with src "'+S+`" has both "priority" and "loading='lazy'" properties. Only one should be used.`);if(Y!=="empty"&&Y!=="blur"&&!Y.startsWith("data:image/"))throw new Error('Image with src "'+S+'" has invalid "placeholder" property "'+Y+'".');if(Y!=="empty"&&ne&&te&&ne*te<1600&&(0,t.warnOnce)('Image with src "'+S+'" is smaller than 40x40. Consider removing the "placeholder" property to improve performance.'),Y==="blur"&&!X){const de=["jpeg","png","webp","avif"];throw new Error('Image with src "'+S+`" has "placeholder='blur'" property but is missing the "blurDataURL" property.
|
|
7
7
|
Possible solutions:
|
|
@@ -11,20 +11,20 @@ Read more: https://nextjs.org/docs/messages/next-image-missing-loader`)}else{con
|
|
|
11
11
|
Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url`)}if("ref"in ge&&(0,t.warnOnce)('Image with src "'+S+'" is using unsupported "ref" property. Consider using the "onLoad" property instead.'),!P&&!$){const de=q({config:ce,src:S,width:ne||400,quality:Le||75});let Q;try{Q=new URL(de)}catch{}(de===S||Q&&Q.pathname===S&&!Q.search)&&(0,t.warnOnce)('Image with src "'+S+`" has a "loader" property that does not implement width. Please implement it or use the "unoptimized" property instead.
|
|
12
12
|
Read more: https://nextjs.org/docs/messages/next-image-missing-loader-width`)}J&&(0,t.warnOnce)('Image with src "'+S+'" is using deprecated "onLoadingComplete" property. Please use the "onLoad" property instead.');for(const[de,Q]of Object.entries({layout:fe,objectFit:ee,objectPosition:ie,lazyBoundary:_e,lazyRoot:Ce}))Q&&(0,t.warnOnce)('Image with src "'+S+'" has legacy prop "'+de+`". Did you forget to run the codemod?
|
|
13
13
|
Read more: https://nextjs.org/docs/messages/next-image-upgrade-to-13`);if(typeof window<"u"&&!d&&window.PerformanceObserver){d=new PerformanceObserver(de=>{for(const se of de.getEntries()){var Q;const ve=(se==null||(Q=se.element)==null?void 0:Q.src)||"",qe=u.get(ve);qe&&!qe.priority&&qe.placeholder==="empty"&&!qe.src.startsWith("data:")&&!qe.src.startsWith("blob:")&&(0,t.warnOnce)('Image with src "'+qe.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{d.observe({type:"largest-contentful-paint",buffered:!0})}catch(de){console.error(de)}}}const tt=Object.assign(z?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:ee,objectPosition:ie}:{},V?{}:{color:"transparent"},D),We=!oe&&Y!=="empty"?Y==="blur"?'url("data:image/svg+xml;charset=utf-8,'+(0,r.getImageBlurSvg)({widthInt:ne,heightInt:te,blurWidth:ke,blurHeight:ct,blurDataURL:X||"",objectFit:tt.objectFit})+'")':'url("'+Y+'")':null;let re=We?{backgroundSize:tt.objectFit||"cover",backgroundPosition:tt.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:We}:{};process.env.NODE_ENV==="development"&&re.backgroundImage&&Y==="blur"&&X!=null&&X.startsWith("/")&&(re.backgroundImage='url("'+X+'")');const De=_({config:ce,src:S,unoptimized:P,width:ne,quality:Le,sizes:w,loader:q});if(process.env.NODE_ENV!=="production"&&typeof window<"u"){let de;try{de=new URL(De.src)}catch{de=new URL(De.src,window.location.href)}u.set(de.href,{src:S,priority:I,placeholder:Y})}return{props:{...ge,loading:Me?"lazy":C,fetchPriority:Z,width:ne,height:te,decoding:he,className:N,style:{...tt,...re},sizes:De.sizes,srcSet:De.srcSet,src:B||De.src},meta:{unoptimized:P,priority:I,placeholder:Y,fill:z}}}})(Bc);var
|
|
14
|
+
Read more: https://nextjs.org/docs/api-reference/next/image#priority`)}});try{d.observe({type:"largest-contentful-paint",buffered:!0})}catch(de){console.error(de)}}}const tt=Object.assign(z?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:ee,objectPosition:ie}:{},V?{}:{color:"transparent"},D),We=!oe&&Y!=="empty"?Y==="blur"?'url("data:image/svg+xml;charset=utf-8,'+(0,r.getImageBlurSvg)({widthInt:ne,heightInt:te,blurWidth:ke,blurHeight:ct,blurDataURL:X||"",objectFit:tt.objectFit})+'")':'url("'+Y+'")':null;let re=We?{backgroundSize:tt.objectFit||"cover",backgroundPosition:tt.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:We}:{};process.env.NODE_ENV==="development"&&re.backgroundImage&&Y==="blur"&&X!=null&&X.startsWith("/")&&(re.backgroundImage='url("'+X+'")');const De=_({config:ce,src:S,unoptimized:P,width:ne,quality:Le,sizes:w,loader:q});if(process.env.NODE_ENV!=="production"&&typeof window<"u"){let de;try{de=new URL(De.src)}catch{de=new URL(De.src,window.location.href)}u.set(de.href,{src:S,priority:I,placeholder:Y})}return{props:{...ge,loading:Me?"lazy":C,fetchPriority:Z,width:ne,height:te,decoding:he,className:N,style:{...tt,...re},sizes:De.sizes,srcSet:De.srcSet,src:B||De.src},meta:{unoptimized:P,priority:I,placeholder:Y,fill:z}}}})(Bc);var $a={exports:{}},go={exports:{}},ta={},Vu;function qj(){return Vu||(Vu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i}});const t=j,r=typeof window>"u",n=r?()=>{}:t.useLayoutEffect,o=r?()=>{}:t.useEffect;function i(c){const{headManager:l,reduceComponentsToState:u}=c;function d(){if(l&&l.mountedInstances){const m=t.Children.toArray(Array.from(l.mountedInstances).filter(Boolean));l.updateHead(u(m,c))}}if(r){var h;l==null||(h=l.mountedInstances)==null||h.add(c.children),d()}return n(()=>{var m;return l==null||(m=l.mountedInstances)==null||m.add(c.children),()=>{var _;l==null||(_=l.mountedInstances)==null||_.delete(c.children)}}),n(()=>(l&&(l._pendingUpdate=d),()=>{l&&(l._pendingUpdate=d)})),o(()=>(l&&l._pendingUpdate&&(l._pendingUpdate(),l._pendingUpdate=null),()=>{l&&l._pendingUpdate&&(l._pendingUpdate(),l._pendingUpdate=null)})),null}}(ta)),ta}var ra={},Gu;function Bj(){return Gu||(Gu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AmpStateContext",{enumerable:!0,get:function(){return n}});const n=Ct._(j).default.createContext({});process.env.NODE_ENV!=="production"&&(n.displayName="AmpStateContext")}(ra)),ra}var na={},Ku;function Wm(){return Ku||(Ku=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"HeadManagerContext",{enumerable:!0,get:function(){return n}});const n=Ct._(j).default.createContext({});process.env.NODE_ENV!=="production"&&(n.displayName="HeadManagerContext")}(na)),na}var sa={},Qu;function Uj(){return Qu||(Qu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isInAmpMode",{enumerable:!0,get:function(){return t}});function t(r){let{ampFirst:n=!1,hybrid:o=!1,hasQuery:i=!1}=r===void 0?{}:r;return n||o&&i}}(sa)),sa}var Yu;function Hj(){return Yu||(Yu=1,function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function r(I,C){for(var N in C)Object.defineProperty(I,N,{enumerable:!0,get:C[N]})}r(t,{default:function(){return P},defaultHead:function(){return _}});const n=Ct,o=hn,i=s,c=o._(j),l=n._(qj()),u=Bj(),d=Wm(),h=Uj(),m=Jo;function _(I){I===void 0&&(I=!1);const C=[(0,i.jsx)("meta",{charSet:"utf-8"})];return I||C.push((0,i.jsx)("meta",{name:"viewport",content:"width=device-width"})),C}function g(I,C){return typeof C=="string"||typeof C=="number"?I:C.type===c.default.Fragment?I.concat(c.default.Children.toArray(C.props.children).reduce((N,T)=>typeof T=="string"||typeof T=="number"?N:N.concat(T),[])):I.concat(C)}const v=["name","httpEquiv","charSet","itemProp"];function x(){const I=new Set,C=new Set,N=new Set,T={};return O=>{let M=!0,z=!1;if(O.key&&typeof O.key!="number"&&O.key.indexOf("$")>0){z=!0;const D=O.key.slice(O.key.indexOf("$")+1);I.has(D)?M=!1:I.add(D)}switch(O.type){case"title":case"base":C.has(O.type)?M=!1:C.add(O.type);break;case"meta":for(let D=0,B=v.length;D<B;D++){const G=v[D];if(O.props.hasOwnProperty(G))if(G==="charSet")N.has(G)?M=!1:N.add(G);else{const J=O.props[G],Y=T[G]||new Set;(G!=="name"||!z)&&Y.has(J)?M=!1:(Y.add(J),T[G]=Y)}}break}return M}}function S(I,C){const{inAmpMode:N}=C;return I.reduce(g,[]).reverse().concat(_(N).reverse()).filter(x()).reverse().map((T,O)=>{const M=T.key||O;if(process.env.NODE_ENV!=="development"&&process.env.__NEXT_OPTIMIZE_FONTS&&!N&&T.type==="link"&&T.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(z=>T.props.href.startsWith(z))){const z={...T.props||{}};return z["data-href"]=z.href,z.href=void 0,z["data-optimized-fonts"]=!0,c.default.cloneElement(T,z)}if(process.env.NODE_ENV==="development")if(T.type==="script"&&T.props.type!=="application/ld+json"){const z=T.props.src?'<script> tag with src="'+T.props.src+'"':"inline <script>";(0,m.warnOnce)("Do not add <script> tags using next/head (see "+z+`). Use next/script instead.
|
|
15
15
|
See more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component`)}else T.type==="link"&&T.props.rel==="stylesheet"&&(0,m.warnOnce)('Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="'+T.props.href+`"). Use Document instead.
|
|
16
|
-
See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component`);return c.default.cloneElement(T,{key:M})})}function w(I){let{children:C}=I;const N=(0,c.useContext)(u.AmpStateContext),T=(0,c.useContext)(d.HeadManagerContext);return(0,i.jsx)(l.default,{reduceComponentsToState:S,headManager:T,inAmpMode:(0,h.isInAmpMode)(N),children:C})}const P=w;(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)}(go,go.exports)),go.exports}var sa={},Yu;function Uj(){return Yu||(Yu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ImageConfigContext",{enumerable:!0,get:function(){return o}});const r=Ct._(j),n=Zo,o=r.default.createContext(n.imageConfigDefault);process.env.NODE_ENV!=="production"&&(o.displayName="ImageConfigContext")}(sa)),sa}var oa={},ia={},aa={exports:{}},Xu;function $m(){return Xu||(Xu=1,(()=>{var e={170:(o,i,c)=>{const l=c(510),u=()=>{if(typeof navigator<"u"&&navigator.platform){const h=navigator.platform.toLowerCase();return h==="win32"||h==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};function d(h,m,_=!1){return m&&(m.windows===null||m.windows===void 0)&&(m={...m,windows:u()}),l(h,m,_)}Object.assign(d,l),o.exports=d},154:o=>{const i="\\\\/",c=`[^${i}]`,l="\\.",u="\\+",d="\\?",h="\\/",m="(?=.)",_="[^/]",g=`(?:${h}|$)`,v=`(?:^|${h})`,x=`${l}{1,2}${g}`,S=`(?!${l})`,w=`(?!${v}${x})`,P=`(?!${l}{0,1}${g})`,I=`(?!${x})`,C=`[^.${h}]`,N=`${_}*?`,O={DOT_LITERAL:l,PLUS_LITERAL:u,QMARK_LITERAL:d,SLASH_LITERAL:h,ONE_CHAR:m,QMARK:_,END_ANCHOR:g,DOTS_SLASH:x,NO_DOT:S,NO_DOTS:w,NO_DOT_SLASH:P,NO_DOTS_SLASH:I,QMARK_NO_DOT:C,STAR:N,START_ANCHOR:v,SEP:"/"},M={...O,SLASH_LITERAL:`[${i}]`,QMARK:c,STAR:`${c}*?`,DOTS_SLASH:`${l}{1,2}(?:[${i}]|$)`,NO_DOT:`(?!${l})`,NO_DOTS:`(?!(?:^|[${i}])${l}{1,2}(?:[${i}]|$))`,NO_DOT_SLASH:`(?!${l}{0,1}(?:[${i}]|$))`,NO_DOTS_SLASH:`(?!${l}{1,2}(?:[${i}]|$))`,QMARK_NO_DOT:`[^.${i}]`,START_ANCHOR:`(?:^|[${i}])`,END_ANCHOR:`(?:[${i}]|$)`,SEP:"\\"},z={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:z,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(D){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${D.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(D){return D===!0?M:O}}},697:(o,i,c)=>{const l=c(154),u=c(96),{MAX_LENGTH:d,POSIX_REGEX_SOURCE:h,REGEX_NON_SPECIAL_CHARS:m,REGEX_SPECIAL_CHARS_BACKREF:_,REPLACEMENTS:g}=l,v=(w,P)=>{if(typeof P.expandRange=="function")return P.expandRange(...w,P);w.sort();const I=`[${w.join("-")}]`;try{new RegExp(I)}catch{return w.map(N=>u.escapeRegex(N)).join("..")}return I},x=(w,P)=>`Missing ${w}: "${P}" - use "\\\\${P}" to match literal characters`,S=(w,P)=>{if(typeof w!="string")throw new TypeError("Expected a string");w=g[w]||w;const I={...P},C=typeof I.maxLength=="number"?Math.min(d,I.maxLength):d;let N=w.length;if(N>C)throw new SyntaxError(`Input length: ${N}, exceeds maximum allowed length: ${C}`);const T={type:"bos",value:"",output:I.prepend||""},O=[T],M=I.capture?"":"?:",z=l.globChars(I.windows),D=l.extglobChars(z),{DOT_LITERAL:B,PLUS_LITERAL:G,SLASH_LITERAL:J,ONE_CHAR:Y,DOTS_SLASH:X,NO_DOT:Z,NO_DOT_SLASH:he,NO_DOTS_SLASH:fe,QMARK:ee,QMARK_NO_DOT:ie,STAR:_e,START_ANCHOR:Ce}=z,ge=ae=>`(${M}(?:(?!${Ce}${ae.dot?X:B}).)*?)`,we=I.dot?"":Z,V=I.dot?ee:ie;let oe=I.bash===!0?ge(I):_e;I.capture&&(oe=`(${oe})`),typeof I.noext=="boolean"&&(I.noextglob=I.noext);const F={input:w,index:-1,start:0,dot:I.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:O};w=u.removePrefix(w,F),N=w.length;const ce=[],je=[],Oe=[];let q=T,$;const Pe=()=>F.index===N-1,ne=F.peek=(ae=1)=>w[F.index+ae],te=F.advance=()=>w[++F.index]||"",ke=()=>w.slice(F.index+1),ct=(ae="",de=0)=>{F.consumed+=ae,F.index+=de},Me=ae=>{F.output+=ae.output!=null?ae.output:ae.value,ct(ae.value)},Le=()=>{let ae=1;for(;ne()==="!"&&(ne(2)!=="("||ne(3)==="?");)te(),F.start++,ae++;return ae%2===0?!1:(F.negated=!0,F.start++,!0)},tt=ae=>{F[ae]++,Oe.push(ae)},We=ae=>{F[ae]--,Oe.pop()},re=ae=>{if(q.type==="globstar"){const de=F.braces>0&&(ae.type==="comma"||ae.type==="brace"),Q=ae.extglob===!0||ce.length&&(ae.type==="pipe"||ae.type==="paren");ae.type!=="slash"&&ae.type!=="paren"&&!de&&!Q&&(F.output=F.output.slice(0,-q.output.length),q.type="star",q.value="*",q.output=oe,F.output+=q.output)}if(ce.length&&ae.type!=="paren"&&(ce[ce.length-1].inner+=ae.value),(ae.value||ae.output)&&Me(ae),q&&q.type==="text"&&ae.type==="text"){q.output=(q.output||q.value)+ae.value,q.value+=ae.value;return}ae.prev=q,O.push(ae),q=ae},De=(ae,de)=>{const Q={...D[de],conditions:1,inner:""};Q.prev=q,Q.parens=F.parens,Q.output=F.output;const se=(I.capture?"(":"")+Q.open;tt("parens"),re({type:ae,value:de,output:F.output?"":Y}),re({type:"paren",extglob:!0,value:te(),output:se}),ce.push(Q)},$e=ae=>{let de=ae.close+(I.capture?")":""),Q;if(ae.type==="negate"){let se=oe;if(ae.inner&&ae.inner.length>1&&ae.inner.includes("/")&&(se=ge(I)),(se!==oe||Pe()||/^\)+$/.test(ke()))&&(de=ae.close=`)$))${se}`),ae.inner.includes("*")&&(Q=ke())&&/^\.[^\\/.]+$/.test(Q)){const ve=S(Q,{...P,fastpaths:!1}).output;de=ae.close=`)${ve})${se})`}ae.prev.type==="bos"&&(F.negatedExtglob=!0)}re({type:"paren",extglob:!0,value:$,output:de}),We("parens")};if(I.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(w)){let ae=!1,de=w.replace(_,(Q,se,ve,qe,Je,Wr)=>qe==="\\"?(ae=!0,Q):qe==="?"?se?se+qe+(Je?ee.repeat(Je.length):""):Wr===0?V+(Je?ee.repeat(Je.length):""):ee.repeat(ve.length):qe==="."?B.repeat(ve.length):qe==="*"?se?se+qe+(Je?oe:""):oe:se?Q:`\\${Q}`);return ae===!0&&(I.unescape===!0?de=de.replace(/\\/g,""):de=de.replace(/\\+/g,Q=>Q.length%2===0?"\\\\":Q?"\\":"")),de===w&&I.contains===!0?(F.output=w,F):(F.output=u.wrapOutput(de,F,P),F)}for(;!Pe();){if($=te(),$==="\0")continue;if($==="\\"){const Q=ne();if(Q==="/"&&I.bash!==!0||Q==="."||Q===";")continue;if(!Q){$+="\\",re({type:"text",value:$});continue}const se=/^\\+/.exec(ke());let ve=0;if(se&&se[0].length>2&&(ve=se[0].length,F.index+=ve,ve%2!==0&&($+="\\")),I.unescape===!0?$=te():$+=te(),F.brackets===0){re({type:"text",value:$});continue}}if(F.brackets>0&&($!=="]"||q.value==="["||q.value==="[^")){if(I.posix!==!1&&$===":"){const Q=q.value.slice(1);if(Q.includes("[")&&(q.posix=!0,Q.includes(":"))){const se=q.value.lastIndexOf("["),ve=q.value.slice(0,se),qe=q.value.slice(se+2),Je=h[qe];if(Je){q.value=ve+Je,F.backtrack=!0,te(),!T.output&&O.indexOf(q)===1&&(T.output=Y);continue}}}($==="["&&ne()!==":"||$==="-"&&ne()==="]")&&($=`\\${$}`),$==="]"&&(q.value==="["||q.value==="[^")&&($=`\\${$}`),I.posix===!0&&$==="!"&&q.value==="["&&($="^"),q.value+=$,Me({value:$});continue}if(F.quotes===1&&$!=='"'){$=u.escapeRegex($),q.value+=$,Me({value:$});continue}if($==='"'){F.quotes=F.quotes===1?0:1,I.keepQuotes===!0&&re({type:"text",value:$});continue}if($==="("){tt("parens"),re({type:"paren",value:$});continue}if($===")"){if(F.parens===0&&I.strictBrackets===!0)throw new SyntaxError(x("opening","("));const Q=ce[ce.length-1];if(Q&&F.parens===Q.parens+1){$e(ce.pop());continue}re({type:"paren",value:$,output:F.parens?")":"\\)"}),We("parens");continue}if($==="["){if(I.nobracket===!0||!ke().includes("]")){if(I.nobracket!==!0&&I.strictBrackets===!0)throw new SyntaxError(x("closing","]"));$=`\\${$}`}else tt("brackets");re({type:"bracket",value:$});continue}if($==="]"){if(I.nobracket===!0||q&&q.type==="bracket"&&q.value.length===1){re({type:"text",value:$,output:`\\${$}`});continue}if(F.brackets===0){if(I.strictBrackets===!0)throw new SyntaxError(x("opening","["));re({type:"text",value:$,output:`\\${$}`});continue}We("brackets");const Q=q.value.slice(1);if(q.posix!==!0&&Q[0]==="^"&&!Q.includes("/")&&($=`/${$}`),q.value+=$,Me({value:$}),I.literalBrackets===!1||u.hasRegexChars(Q))continue;const se=u.escapeRegex(q.value);if(F.output=F.output.slice(0,-q.value.length),I.literalBrackets===!0){F.output+=se,q.value=se;continue}q.value=`(${M}${se}|${q.value})`,F.output+=q.value;continue}if($==="{"&&I.nobrace!==!0){tt("braces");const Q={type:"brace",value:$,output:"(",outputIndex:F.output.length,tokensIndex:F.tokens.length};je.push(Q),re(Q);continue}if($==="}"){const Q=je[je.length-1];if(I.nobrace===!0||!Q){re({type:"text",value:$,output:$});continue}let se=")";if(Q.dots===!0){const ve=O.slice(),qe=[];for(let Je=ve.length-1;Je>=0&&(O.pop(),ve[Je].type!=="brace");Je--)ve[Je].type!=="dots"&&qe.unshift(ve[Je].value);se=v(qe,I),F.backtrack=!0}if(Q.comma!==!0&&Q.dots!==!0){const ve=F.output.slice(0,Q.outputIndex),qe=F.tokens.slice(Q.tokensIndex);Q.value=Q.output="\\{",$=se="\\}",F.output=ve;for(const Je of qe)F.output+=Je.output||Je.value}re({type:"brace",value:$,output:se}),We("braces"),je.pop();continue}if($==="|"){ce.length>0&&ce[ce.length-1].conditions++,re({type:"text",value:$});continue}if($===","){let Q=$;const se=je[je.length-1];se&&Oe[Oe.length-1]==="braces"&&(se.comma=!0,Q="|"),re({type:"comma",value:$,output:Q});continue}if($==="/"){if(q.type==="dot"&&F.index===F.start+1){F.start=F.index+1,F.consumed="",F.output="",O.pop(),q=T;continue}re({type:"slash",value:$,output:J});continue}if($==="."){if(F.braces>0&&q.type==="dot"){q.value==="."&&(q.output=B);const Q=je[je.length-1];q.type="dots",q.output+=$,q.value+=$,Q.dots=!0;continue}if(F.braces+F.parens===0&&q.type!=="bos"&&q.type!=="slash"){re({type:"text",value:$,output:B});continue}re({type:"dot",value:$,output:B});continue}if($==="?"){if(!(q&&q.value==="(")&&I.noextglob!==!0&&ne()==="("&&ne(2)!=="?"){De("qmark",$);continue}if(q&&q.type==="paren"){const se=ne();let ve=$;(q.value==="("&&!/[!=<:]/.test(se)||se==="<"&&!/<([!=]|\w+>)/.test(ke()))&&(ve=`\\${$}`),re({type:"text",value:$,output:ve});continue}if(I.dot!==!0&&(q.type==="slash"||q.type==="bos")){re({type:"qmark",value:$,output:ie});continue}re({type:"qmark",value:$,output:ee});continue}if($==="!"){if(I.noextglob!==!0&&ne()==="("&&(ne(2)!=="?"||!/[!=<:]/.test(ne(3)))){De("negate",$);continue}if(I.nonegate!==!0&&F.index===0){Le();continue}}if($==="+"){if(I.noextglob!==!0&&ne()==="("&&ne(2)!=="?"){De("plus",$);continue}if(q&&q.value==="("||I.regex===!1){re({type:"plus",value:$,output:G});continue}if(q&&(q.type==="bracket"||q.type==="paren"||q.type==="brace")||F.parens>0){re({type:"plus",value:$});continue}re({type:"plus",value:G});continue}if($==="@"){if(I.noextglob!==!0&&ne()==="("&&ne(2)!=="?"){re({type:"at",extglob:!0,value:$,output:""});continue}re({type:"text",value:$});continue}if($!=="*"){($==="$"||$==="^")&&($=`\\${$}`);const Q=m.exec(ke());Q&&($+=Q[0],F.index+=Q[0].length),re({type:"text",value:$});continue}if(q&&(q.type==="globstar"||q.star===!0)){q.type="star",q.star=!0,q.value+=$,q.output=oe,F.backtrack=!0,F.globstar=!0,ct($);continue}let ae=ke();if(I.noextglob!==!0&&/^\([^?]/.test(ae)){De("star",$);continue}if(q.type==="star"){if(I.noglobstar===!0){ct($);continue}const Q=q.prev,se=Q.prev,ve=Q.type==="slash"||Q.type==="bos",qe=se&&(se.type==="star"||se.type==="globstar");if(I.bash===!0&&(!ve||ae[0]&&ae[0]!=="/")){re({type:"star",value:$,output:""});continue}const Je=F.braces>0&&(Q.type==="comma"||Q.type==="brace"),Wr=ce.length&&(Q.type==="pipe"||Q.type==="paren");if(!ve&&Q.type!=="paren"&&!Je&&!Wr){re({type:"star",value:$,output:""});continue}for(;ae.slice(0,3)==="/**";){const Cr=w[F.index+4];if(Cr&&Cr!=="/")break;ae=ae.slice(3),ct("/**",3)}if(Q.type==="bos"&&Pe()){q.type="globstar",q.value+=$,q.output=ge(I),F.output=q.output,F.globstar=!0,ct($);continue}if(Q.type==="slash"&&Q.prev.type!=="bos"&&!qe&&Pe()){F.output=F.output.slice(0,-(Q.output+q.output).length),Q.output=`(?:${Q.output}`,q.type="globstar",q.output=ge(I)+(I.strictSlashes?")":"|$)"),q.value+=$,F.globstar=!0,F.output+=Q.output+q.output,ct($);continue}if(Q.type==="slash"&&Q.prev.type!=="bos"&&ae[0]==="/"){const Cr=ae[1]!==void 0?"|$":"";F.output=F.output.slice(0,-(Q.output+q.output).length),Q.output=`(?:${Q.output}`,q.type="globstar",q.output=`${ge(I)}${J}|${J}${Cr})`,q.value+=$,F.output+=Q.output+q.output,F.globstar=!0,ct($+te()),re({type:"slash",value:"/",output:""});continue}if(Q.type==="bos"&&ae[0]==="/"){q.type="globstar",q.value+=$,q.output=`(?:^|${J}|${ge(I)}${J})`,F.output=q.output,F.globstar=!0,ct($+te()),re({type:"slash",value:"/",output:""});continue}F.output=F.output.slice(0,-q.output.length),q.type="globstar",q.output=ge(I),q.value+=$,F.output+=q.output,F.globstar=!0,ct($);continue}const de={type:"star",value:$,output:oe};if(I.bash===!0){de.output=".*?",(q.type==="bos"||q.type==="slash")&&(de.output=we+de.output),re(de);continue}if(q&&(q.type==="bracket"||q.type==="paren")&&I.regex===!0){de.output=$,re(de);continue}(F.index===F.start||q.type==="slash"||q.type==="dot")&&(q.type==="dot"?(F.output+=he,q.output+=he):I.dot===!0?(F.output+=fe,q.output+=fe):(F.output+=we,q.output+=we),ne()!=="*"&&(F.output+=Y,q.output+=Y)),re(de)}for(;F.brackets>0;){if(I.strictBrackets===!0)throw new SyntaxError(x("closing","]"));F.output=u.escapeLast(F.output,"["),We("brackets")}for(;F.parens>0;){if(I.strictBrackets===!0)throw new SyntaxError(x("closing",")"));F.output=u.escapeLast(F.output,"("),We("parens")}for(;F.braces>0;){if(I.strictBrackets===!0)throw new SyntaxError(x("closing","}"));F.output=u.escapeLast(F.output,"{"),We("braces")}if(I.strictSlashes!==!0&&(q.type==="star"||q.type==="bracket")&&re({type:"maybe_slash",value:"",output:`${J}?`}),F.backtrack===!0){F.output="";for(const ae of F.tokens)F.output+=ae.output!=null?ae.output:ae.value,ae.suffix&&(F.output+=ae.suffix)}return F};S.fastpaths=(w,P)=>{const I={...P},C=typeof I.maxLength=="number"?Math.min(d,I.maxLength):d,N=w.length;if(N>C)throw new SyntaxError(`Input length: ${N}, exceeds maximum allowed length: ${C}`);w=g[w]||w;const{DOT_LITERAL:T,SLASH_LITERAL:O,ONE_CHAR:M,DOTS_SLASH:z,NO_DOT:D,NO_DOTS:B,NO_DOTS_SLASH:G,STAR:J,START_ANCHOR:Y}=l.globChars(I.windows),X=I.dot?B:D,Z=I.dot?G:D,he=I.capture?"":"?:",fe={negated:!1,prefix:""};let ee=I.bash===!0?".*?":J;I.capture&&(ee=`(${ee})`);const ie=we=>we.noglobstar===!0?ee:`(${he}(?:(?!${Y}${we.dot?z:T}).)*?)`,_e=we=>{switch(we){case"*":return`${X}${M}${ee}`;case".*":return`${T}${M}${ee}`;case"*.*":return`${X}${ee}${T}${M}${ee}`;case"*/*":return`${X}${ee}${O}${M}${Z}${ee}`;case"**":return X+ie(I);case"**/*":return`(?:${X}${ie(I)}${O})?${Z}${M}${ee}`;case"**/*.*":return`(?:${X}${ie(I)}${O})?${Z}${ee}${T}${M}${ee}`;case"**/.*":return`(?:${X}${ie(I)}${O})?${T}${M}${ee}`;default:{const V=/^(.*?)\.(\w+)$/.exec(we);if(!V)return;const oe=_e(V[1]);return oe?oe+T+V[2]:void 0}}},Ce=u.removePrefix(w,fe);let ge=_e(Ce);return ge&&I.strictSlashes!==!0&&(ge+=`${O}?`),ge},o.exports=S},510:(o,i,c)=>{const l=c(716),u=c(697),d=c(96),h=c(154),m=g=>g&&typeof g=="object"&&!Array.isArray(g),_=(g,v,x=!1)=>{if(Array.isArray(g)){const O=g.map(z=>_(z,v,x));return z=>{for(const D of O){const B=D(z);if(B)return B}return!1}}const S=m(g)&&g.tokens&&g.input;if(g===""||typeof g!="string"&&!S)throw new TypeError("Expected pattern to be a non-empty string");const w=v||{},P=w.windows,I=S?_.compileRe(g,v):_.makeRe(g,v,!1,!0),C=I.state;delete I.state;let N=()=>!1;if(w.ignore){const O={...v,ignore:null,onMatch:null,onResult:null};N=_(w.ignore,O,x)}const T=(O,M=!1)=>{const{isMatch:z,match:D,output:B}=_.test(O,I,v,{glob:g,posix:P}),G={glob:g,state:C,regex:I,posix:P,input:O,output:B,match:D,isMatch:z};return typeof w.onResult=="function"&&w.onResult(G),z===!1?(G.isMatch=!1,M?G:!1):N(O)?(typeof w.onIgnore=="function"&&w.onIgnore(G),G.isMatch=!1,M?G:!1):(typeof w.onMatch=="function"&&w.onMatch(G),M?G:!0)};return x&&(T.state=C),T};_.test=(g,v,x,{glob:S,posix:w}={})=>{if(typeof g!="string")throw new TypeError("Expected input to be a string");if(g==="")return{isMatch:!1,output:""};const P=x||{},I=P.format||(w?d.toPosixSlashes:null);let C=g===S,N=C&&I?I(g):g;return C===!1&&(N=I?I(g):g,C=N===S),(C===!1||P.capture===!0)&&(P.matchBase===!0||P.basename===!0?C=_.matchBase(g,v,x,w):C=v.exec(N)),{isMatch:!!C,match:C,output:N}},_.matchBase=(g,v,x)=>(v instanceof RegExp?v:_.makeRe(v,x)).test(d.basename(g)),_.isMatch=(g,v,x)=>_(v,x)(g),_.parse=(g,v)=>Array.isArray(g)?g.map(x=>_.parse(x,v)):u(g,{...v,fastpaths:!1}),_.scan=(g,v)=>l(g,v),_.compileRe=(g,v,x=!1,S=!1)=>{if(x===!0)return g.output;const w=v||{},P=w.contains?"":"^",I=w.contains?"":"$";let C=`${P}(?:${g.output})${I}`;g&&g.negated===!0&&(C=`^(?!${C}).*$`);const N=_.toRegex(C,v);return S===!0&&(N.state=g),N},_.makeRe=(g,v={},x=!1,S=!1)=>{if(!g||typeof g!="string")throw new TypeError("Expected a non-empty string");let w={negated:!1,fastpaths:!0};return v.fastpaths!==!1&&(g[0]==="."||g[0]==="*")&&(w.output=u.fastpaths(g,v)),w.output||(w=u(g,v)),_.compileRe(w,v,x,S)},_.toRegex=(g,v)=>{try{const x=v||{};return new RegExp(g,x.flags||(x.nocase?"i":""))}catch(x){if(v&&v.debug===!0)throw x;return/$^/}},_.constants=h,o.exports=_},716:(o,i,c)=>{const l=c(96),{CHAR_ASTERISK:u,CHAR_AT:d,CHAR_BACKWARD_SLASH:h,CHAR_COMMA:m,CHAR_DOT:_,CHAR_EXCLAMATION_MARK:g,CHAR_FORWARD_SLASH:v,CHAR_LEFT_CURLY_BRACE:x,CHAR_LEFT_PARENTHESES:S,CHAR_LEFT_SQUARE_BRACKET:w,CHAR_PLUS:P,CHAR_QUESTION_MARK:I,CHAR_RIGHT_CURLY_BRACE:C,CHAR_RIGHT_PARENTHESES:N,CHAR_RIGHT_SQUARE_BRACKET:T}=c(154),O=D=>D===v||D===h,M=D=>{D.isPrefix!==!0&&(D.depth=D.isGlobstar?1/0:1)},z=(D,B)=>{const G=B||{},J=D.length-1,Y=G.parts===!0||G.scanToEnd===!0,X=[],Z=[],he=[];let fe=D,ee=-1,ie=0,_e=0,Ce=!1,ge=!1,we=!1,V=!1,oe=!1,F=!1,ce=!1,je=!1,Oe=!1,q=!1,$=0,Pe,ne,te={value:"",depth:0,isGlob:!1};const ke=()=>ee>=J,ct=()=>fe.charCodeAt(ee+1),Me=()=>(Pe=ne,fe.charCodeAt(++ee));for(;ee<J;){ne=Me();let De;if(ne===h){ce=te.backslashes=!0,ne=Me(),ne===x&&(F=!0);continue}if(F===!0||ne===x){for($++;ke()!==!0&&(ne=Me());){if(ne===h){ce=te.backslashes=!0,Me();continue}if(ne===x){$++;continue}if(F!==!0&&ne===_&&(ne=Me())===_){if(Ce=te.isBrace=!0,we=te.isGlob=!0,q=!0,Y===!0)continue;break}if(F!==!0&&ne===m){if(Ce=te.isBrace=!0,we=te.isGlob=!0,q=!0,Y===!0)continue;break}if(ne===C&&($--,$===0)){F=!1,Ce=te.isBrace=!0,q=!0;break}}if(Y===!0)continue;break}if(ne===v){if(X.push(ee),Z.push(te),te={value:"",depth:0,isGlob:!1},q===!0)continue;if(Pe===_&&ee===ie+1){ie+=2;continue}_e=ee+1;continue}if(G.noext!==!0&&(ne===P||ne===d||ne===u||ne===I||ne===g)===!0&&ct()===S){if(we=te.isGlob=!0,V=te.isExtglob=!0,q=!0,ne===g&&ee===ie&&(Oe=!0),Y===!0){for(;ke()!==!0&&(ne=Me());){if(ne===h){ce=te.backslashes=!0,ne=Me();continue}if(ne===N){we=te.isGlob=!0,q=!0;break}}continue}break}if(ne===u){if(Pe===u&&(oe=te.isGlobstar=!0),we=te.isGlob=!0,q=!0,Y===!0)continue;break}if(ne===I){if(we=te.isGlob=!0,q=!0,Y===!0)continue;break}if(ne===w){for(;ke()!==!0&&(De=Me());){if(De===h){ce=te.backslashes=!0,Me();continue}if(De===T){ge=te.isBracket=!0,we=te.isGlob=!0,q=!0;break}}if(Y===!0)continue;break}if(G.nonegate!==!0&&ne===g&&ee===ie){je=te.negated=!0,ie++;continue}if(G.noparen!==!0&&ne===S){if(we=te.isGlob=!0,Y===!0){for(;ke()!==!0&&(ne=Me());){if(ne===S){ce=te.backslashes=!0,ne=Me();continue}if(ne===N){q=!0;break}}continue}break}if(we===!0){if(q=!0,Y===!0)continue;break}}G.noext===!0&&(V=!1,we=!1);let Le=fe,tt="",We="";ie>0&&(tt=fe.slice(0,ie),fe=fe.slice(ie),_e-=ie),Le&&we===!0&&_e>0?(Le=fe.slice(0,_e),We=fe.slice(_e)):we===!0?(Le="",We=fe):Le=fe,Le&&Le!==""&&Le!=="/"&&Le!==fe&&O(Le.charCodeAt(Le.length-1))&&(Le=Le.slice(0,-1)),G.unescape===!0&&(We&&(We=l.removeBackslashes(We)),Le&&ce===!0&&(Le=l.removeBackslashes(Le)));const re={prefix:tt,input:D,start:ie,base:Le,glob:We,isBrace:Ce,isBracket:ge,isGlob:we,isExtglob:V,isGlobstar:oe,negated:je,negatedExtglob:Oe};if(G.tokens===!0&&(re.maxDepth=0,O(ne)||Z.push(te),re.tokens=Z),G.parts===!0||G.tokens===!0){let De;for(let $e=0;$e<X.length;$e++){const ae=De?De+1:ie,de=X[$e],Q=D.slice(ae,de);G.tokens&&($e===0&&ie!==0?(Z[$e].isPrefix=!0,Z[$e].value=tt):Z[$e].value=Q,M(Z[$e]),re.maxDepth+=Z[$e].depth),($e!==0||Q!=="")&&he.push(Q),De=de}if(De&&De+1<D.length){const $e=D.slice(De+1);he.push($e),G.tokens&&(Z[Z.length-1].value=$e,M(Z[Z.length-1]),re.maxDepth+=Z[Z.length-1].depth)}re.slashes=X,re.parts=he}return re};o.exports=z},96:(o,i,c)=>{const{REGEX_BACKSLASH:l,REGEX_REMOVE_BACKSLASH:u,REGEX_SPECIAL_CHARS:d,REGEX_SPECIAL_CHARS_GLOBAL:h}=c(154);i.isObject=m=>m!==null&&typeof m=="object"&&!Array.isArray(m),i.hasRegexChars=m=>d.test(m),i.isRegexChar=m=>m.length===1&&i.hasRegexChars(m),i.escapeRegex=m=>m.replace(h,"\\$1"),i.toPosixSlashes=m=>m.replace(l,"/"),i.removeBackslashes=m=>m.replace(u,_=>_==="\\"?"":_),i.escapeLast=(m,_,g)=>{const v=m.lastIndexOf(_,g);return v===-1?m:m[v-1]==="\\"?i.escapeLast(m,_,v-1):`${m.slice(0,v)}\\${m.slice(v)}`},i.removePrefix=(m,_={})=>{let g=m;return g.startsWith("./")&&(g=g.slice(2),_.prefix="./"),g},i.wrapOutput=(m,_={},g={})=>{const v=g.contains?"":"^",x=g.contains?"":"$";let S=`${v}(?:${m})${x}`;return _.negated===!0&&(S=`(?:^(?!${S}).*$)`),S},i.basename=(m,{windows:_}={})=>{const g=m.split(_?/[\\/]/:"/"),v=g[g.length-1];return v===""?g[g.length-2]:v}}},t={};function r(o){var i=t[o];if(i!==void 0)return i.exports;var c=t[o]={exports:{}},l=!0;try{e[o](c,c.exports,r),l=!1}finally{l&&delete t[o]}return c.exports}typeof r<"u"&&(r.ab=__dirname+"/");var n=r(170);aa.exports=n})()),aa.exports}var Ju;function Hj(){return Ju||(Ju=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,{hasLocalMatch:function(){return o},matchLocalPattern:function(){return n}});const r=$m();function n(i,c){if(i.search!==void 0&&i.search!==c.search)return!1;var l;return!!(0,r.makeRe)((l=i.pathname)!=null?l:"**",{dot:!0}).test(c.pathname)}function o(i,c){if(!i)return!0;const l=new URL(c,"http://n");return i.some(u=>n(u,l))}}(ia)),ia}var ca={},Zu;function $j(){return Zu||(Zu=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,{hasRemoteMatch:function(){return o},matchRemotePattern:function(){return n}});const r=$m();function n(i,c){if(i.protocol!==void 0){const u=c.protocol.slice(0,-1);if(i.protocol!==u)return!1}if(i.port!==void 0&&i.port!==c.port)return!1;if(i.hostname===void 0)throw new Error(`Pattern should define hostname but found
|
|
17
|
-
`+JSON.stringify(i));if(!(0,r.makeRe)(i.hostname).test(c.hostname)||i.search!==void 0&&i.search!==c.search)return!1;var l;return!!(0,r.makeRe)((l=i.pathname)!=null?l:"**",{dot:!0}).test(c.pathname)}function o(i,c,l){return i.some(u=>l.hostname===u)||c.some(u=>n(u,l))}}(ca)),ca}var ed;function Wm(){return ed||(ed=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}});const t=75;function r(o){let{config:i,src:c,width:l,quality:u}=o;var d;if(process.env.NODE_ENV!=="production"){const m=[];if(c||m.push("src"),l||m.push("width"),m.length>0)throw new Error("Next Image Optimization requires "+m.join(", ")+" to be provided. Make sure you pass them as props to the `next/image` component. Received: "+JSON.stringify({src:c,width:l,quality:u}));if(c.startsWith("//"))throw new Error('Failed to parse src "'+c+'" on `next/image`, protocol-relative URL (//) must be changed to an absolute URL (http:// or https://)');if(c.startsWith("/")&&i.localPatterns&&process.env.NODE_ENV!=="test"&&process.env.NEXT_RUNTIME!=="edge"){const{hasLocalMatch:_}=Hj();if(!_(i.localPatterns,c))throw new Error("Invalid src prop ("+c+") 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(!c.startsWith("/")&&(i.domains||i.remotePatterns)){let _;try{_=new URL(c)}catch(g){throw console.error(g),new Error('Failed to parse src "'+c+'" 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:g}=$j();if(!g(i.domains,i.remotePatterns,_))throw new Error("Invalid src prop ("+c+') on `next/image`, hostname "'+_.hostname+'" is not configured under images in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-host')}}if(u&&i.qualities&&!i.qualities.includes(u))throw new Error("Invalid quality prop ("+u+") 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 h=u||((d=i.qualities)==null?void 0:d.reduce((m,_)=>Math.abs(_-t)<Math.abs(m-t)?_:m))||t;return i.path+"?url="+encodeURIComponent(c)+"&w="+l+"&q="+h+(process.env.NEXT_DEPLOYMENT_ID?"&dpl="+process.env.NEXT_DEPLOYMENT_ID:"")}r.__next_img_default=!0;const n=r}(oa)),oa}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return I}});const r=Ct,n=hn,o=s,i=n._(j),c=r._(lc),l=r._(Bj()),u=Bc,d=Zo,h=Uj(),m=Jo,_=Bp(),g=r._(Wm()),v=process.env.__NEXT_IMAGE_OPTS;typeof window>"u"&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);function x(C,N,T,O,M,z,D){const B=C==null?void 0:C.src;if(!C||C["data-loaded-src"]===B)return;C["data-loaded-src"]=B,("decode"in C?C.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(!(!C.parentElement||!C.isConnected)){if(N!=="empty"&&M(!0),T!=null&&T.current){const J=new Event("load");Object.defineProperty(J,"target",{writable:!1,value:C});let Y=!1,X=!1;T.current({...J,nativeEvent:J,currentTarget:C,target:C,isDefaultPrevented:()=>Y,isPropagationStopped:()=>X,persist:()=>{},preventDefault:()=>{Y=!0,J.preventDefault()},stopPropagation:()=>{X=!0,J.stopPropagation()}})}if(O!=null&&O.current&&O.current(C),process.env.NODE_ENV!=="production"){const J=new URL(B,"http://n").searchParams.get("url")||B;if(C.getAttribute("data-nimg")==="fill"){if(!z&&(!D||D==="100vw")&&C.getBoundingClientRect().width/window.innerWidth<.6&&(D==="100vw"?(0,m.warnOnce)('Image with src "'+J+'" 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,m.warnOnce)('Image with src "'+J+'" 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')),C.parentElement){const{position:Z}=window.getComputedStyle(C.parentElement),he=["absolute","fixed","relative"];he.includes(Z)||(0,m.warnOnce)('Image with src "'+J+'" has "fill" and parent element with invalid "position". Provided "'+Z+'" should be one of '+he.map(String).join(",")+".")}C.height===0&&(0,m.warnOnce)('Image with src "'+J+'" 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 Y=C.height.toString()!==C.getAttribute("height"),X=C.width.toString()!==C.getAttribute("width");(Y&&!X||!Y&&X)&&(0,m.warnOnce)('Image with src "'+J+`" 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 S(C){return i.use?{fetchPriority:C}:{fetchpriority:C}}const w=(0,i.forwardRef)((C,N)=>{let{src:T,srcSet:O,sizes:M,height:z,width:D,decoding:B,className:G,style:J,fetchPriority:Y,placeholder:X,loading:Z,unoptimized:he,fill:fe,onLoadRef:ee,onLoadingCompleteRef:ie,setBlurComplete:_e,setShowAltText:Ce,sizesInput:ge,onLoad:we,onError:V,...oe}=C;return(0,o.jsx)("img",{...oe,...S(Y),loading:Z,width:D,height:z,decoding:B,"data-nimg":fe?"fill":"1",className:G,style:J,sizes:M,srcSet:O,src:T,ref:(0,i.useCallback)(F=>{N&&(typeof N=="function"?N(F):typeof N=="object"&&(N.current=F)),F&&(V&&(F.src=F.src),process.env.NODE_ENV!=="production"&&(T||console.error('Image is missing required "src" property:',F),F.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.')),F.complete&&x(F,X,ee,ie,_e,he,ge))},[T,X,ee,ie,_e,V,he,ge,N]),onLoad:F=>{const ce=F.currentTarget;x(ce,X,ee,ie,_e,he,ge)},onError:F=>{Ce(!0),X!=="empty"&&_e(!0),V&&V(F)}})});function P(C){let{isAppRouter:N,imgAttributes:T}=C;const O={as:"image",imageSrcSet:T.srcSet,imageSizes:T.sizes,crossOrigin:T.crossOrigin,referrerPolicy:T.referrerPolicy,...S(T.fetchPriority)};return N&&c.default.preload?(c.default.preload(T.src,O),null):(0,o.jsx)(l.default,{children:(0,o.jsx)("link",{rel:"preload",href:T.srcSet?void 0:T.src,...O},"__nimg-"+T.src+T.srcSet+T.sizes)})}const I=(0,i.forwardRef)((C,N)=>{const O=!(0,i.useContext)(_.RouterContext),M=(0,i.useContext)(h.ImageConfigContext),z=(0,i.useMemo)(()=>{var ie;const _e=v||M||d.imageConfigDefault,Ce=[..._e.deviceSizes,..._e.imageSizes].sort((V,oe)=>V-oe),ge=_e.deviceSizes.sort((V,oe)=>V-oe),we=(ie=_e.qualities)==null?void 0:ie.sort((V,oe)=>V-oe);return{..._e,allSizes:Ce,deviceSizes:ge,qualities:we}},[M]),{onLoad:D,onLoadingComplete:B}=C,G=(0,i.useRef)(D);(0,i.useEffect)(()=>{G.current=D},[D]);const J=(0,i.useRef)(B);(0,i.useEffect)(()=>{J.current=B},[B]);const[Y,X]=(0,i.useState)(!1),[Z,he]=(0,i.useState)(!1),{props:fe,meta:ee}=(0,u.getImgProps)(C,{defaultLoader:g.default,imgConf:z,blurComplete:Y,showAltText:Z});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(w,{...fe,unoptimized:ee.unoptimized,placeholder:ee.placeholder,fill:ee.fill,onLoadRef:G,onLoadingCompleteRef:J,setBlurComplete:X,setShowAltText:he,sizesInput:C.sizes,ref:N}),ee.priority?(0,o.jsx)(P,{isAppRouter:O,imgAttributes:fe}):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)})(Ha,Ha.exports);var Wj=Ha.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(u,d){for(var h in d)Object.defineProperty(u,h,{enumerable:!0,get:d[h]})}t(e,{default:function(){return l},getImageProps:function(){return c}});const r=Ct,n=Bc,o=Wj,i=r._(Wm());function c(u){const{props:d}=(0,n.getImgProps)(u,{defaultLoader:i.default,imgConf:process.env.__NEXT_IMAGE_OPTS});for(const[h,m]of Object.entries(d))m===void 0&&delete d[h];return{props:d}}const l=o.Image})(Bm);var Vj=Bm;const Es=U.getDefaultExportFromCjs(Vj),Gj=({item:e,CONSTANTS:t})=>{const r=e.icon?t.PAYMENT_FLAGS.includes(e.icon)?"payment":"social":null,n=r==="payment"?t.PAYMENT_FLAGS_DICTIONARY[e.icon]:e.icon;return e.link?s.jsxs(Tt,{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Be["support-item"],children:[e.image&&s.jsx("img",{src:e.image,alt:"",loading:"lazy"}),r==="payment"?s.jsx(Es,{alt:n,src:`/assets/${n}.svg`,width:20,height:20}):s.jsx(p.Icon,{size:"small",name:n})]}):s.jsxs("div",{className:Be["support-item"],children:[e.image&&s.jsx("img",{src:e.image,alt:"",loading:"lazy"}),r==="payment"?s.jsx(Es,{alt:n,src:`/assets/${n}.svg`,width:20,height:20}):s.jsx(p.Icon,{size:"small",name:n})]})},Kj=({content:e,CONSTANTS:t})=>s.jsx("div",{className:Be["support-container"],children:e==null?void 0:e.map((r,n)=>s.jsxs("div",{"data-device":r.device,className:Be["support-section"],children:[s.jsxs("div",{className:Be["support-text"],children:[r.title&&s.jsx("h3",{children:r.title}),r.description&&s.jsx("p",{children:r.description})]}),Array.isArray(r.items)&&r.items.length&&s.jsx("div",{className:Be["support-items"],"data-gap":r.gap,children:r.items.map((o,i)=>s.jsx(Gj,{item:o,CONSTANTS:t},`footer-support-item-${i}`))})]},`footer-support-${n}`))}),Qj=({name:e,nameIcon:t,maxWidth:r,rowAlignContent:n,columnAlignContent:o,columnAlignItems:i,textAlignContent:c,textAlignItems:l,children:u})=>s.jsx(p.TextStructure.Root,{layoutProps:{textRow:{alignContent:n,alignItems:n},columnWrapper:{alignContent:o,alignItems:i}},children:s.jsxs(p.TextStructure.DivWrapper,{alignContent:c,alignItems:l,className:Be.footer__column,children:[s.jsxs("div",{className:t?Be.footer__columnTitleIcon:Be.footer__columnTitle,children:[s.jsx(p.Icon,{name:`${t}`,size:"small"}),e&&s.jsx("div",{children:e})]}),s.jsx("div",{className:Be.footer__columnContent,style:{maxWidth:`${r}px`},children:u})]})}),Yj=({name:e,nameIcon:t,maxWidth:r,children:n,ICONS:o,...i})=>s.jsxs(p.Accordion.Wrapper,{className:Be.accordionWrapper,title:"accordion-wrapper",...i,children:[s.jsx(p.Accordion.Header,{id:(i==null?void 0:i.id)??"",className:Be.accordionHeader,closeIndicator:s.jsx(p.Icon,{name:o.arrow_up,size:"medium"}),openIndicator:s.jsx(p.Icon,{name:o.arrow_down,size:"medium"}),title:"accordion-header",children:s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{className:t?Be.accordionTextWrapper:"",children:[s.jsx(p.Icon,{name:`${t}`,size:"medium"}),s.jsx("h2",{className:"typography-style-body-md",children:e})]})})}),s.jsx(p.Accordion.Body,{title:"accordion-body",children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:Be.footer__columnContent,style:{maxWidth:`${r}px`},children:n})})})]}),la=e=>{const{isMobile:t}=xe();return t?s.jsx(Yj,{...e}):s.jsx(Qj,{...e})},yo=({type:e,children:t,className:r,collumnName:n,collumnNameIcon:o,icons:i,iconLink:c,iconSize:l,link:u,paymentDisclaimer:d,paymentTitle:h,rowAlignContent:m,columnAlignContent:_,columnAlignItems:g,textAlignContent:v,textAlignItems:x,...S})=>{let w;const{handleSelectContent:P}=Ee(),{nextimage:I}=Ae();switch(e){case"menu":w=s.jsx(Tt,{className:Be.footer__itemLink,href:u??"#",prefetch:!1,children:s.jsx("span",{onClick:()=>{P({content:`footer:${n}:${t}`})},children:t})});break;case"payment":w=s.jsxs("div",{className:p.helpers.classNameConcat(Be.payment,Be.footer__itemSmallText),...S,children:[d,s.jsxs("div",{className:p.helpers.classNameConcat(Be.footer__iconContainer,Be.footer__iconListSubHeader),children:[h,s.jsx("div",{className:Be.footer__iconList,children:i==null?void 0:i.map((C,N)=>s.jsx(I,{alt:C,src:`/assets/${C}.svg`,width:l??20,height:l??20},N))})]})]});break;case"social-media":w=s.jsx("div",{className:Be.footer__iconContainer,...S,children:s.jsx("div",{className:Be.footer__iconList,children:c==null?void 0:c.map((C,N)=>s.jsx(Tt,{prefetch:!1,href:C.link??"#",target:"_blank",children:s.jsx(p.Icon,{size:"medium",name:C.icon,onClick:()=>P({content:`footer:redes-sociais:${C.icon}`})})},N))})});break;default:w=s.jsx("div",{className:r,...S,children:t})}return s.jsx(p.TextStructure.Root,{layoutProps:{textRow:{alignContent:m,alignItems:m},columnWrapper:{alignContent:_,alignItems:g}},...S,children:s.jsx(p.TextStructure.DivWrapper,{alignContent:v,alignItems:x,className:p.helpers.classNameConcat(Be.footer__item,r),children:w})})},Xj=({className:e,text:t,...r})=>s.jsx("div",{...r,className:p.helpers.classNameConcat(Be.footer__legalInformation,e),children:s.jsx("span",{children:t})}),Vm=()=>{const{nextimage:e}=Ae();return s.jsx("div",{className:Be["footer--stamps"],children:s.jsx(e,{alt:"Empresa B",className:Be["footer--stamps--company"],src:"/images/Footer/new_certfB.png",width:56,height:64})})};Vm.displayName="Footer.Stamps";const Gm=({children:e,legalTextSlot:t,adornment:r,className:n,...o})=>{const{isMobile:i}=xe(),c=j.Children.toArray(e).filter(Boolean),l=c.length;return s.jsxs("div",{className:Be.footer__main,children:[(r==null?void 0:r.top)&&s.jsx("div",{className:Be.footer__top,children:r==null?void 0:r.top}),l>0&&s.jsx("div",{...o,className:p.helpers.classNameConcat(Be.footer__wrapper,n),children:c.map((u,d)=>s.jsx("div",{style:{flexGrow:1,maxWidth:`calc(100% / ${i?1:"fit-content"})`},children:u},d))}),(r==null?void 0:r.bottom)&&s.jsx("div",{className:Be.footer__bottom,children:r.bottom}),t&&s.jsx("div",{className:Be.footer__legalText,children:t})]})};Gm.displayName="Footer.Wrapper";const Km=({data:{links:{links:e}},payments:t,socialInfo:r,socialMedias:n,adornment:o,LEGAL_INFORMATION_TEXT:i,ICONS:c,className:l,hasFooterStamps:u})=>{var d;return s.jsxs(Gm,{className:l,adornment:o,legalTextSlot:s.jsx(Xj,{text:i}),children:[Array.isArray(e.column)&&e.column.map((h,m)=>s.jsx(la,{id:`${m}column-menu`,name:h.name,nameIcon:h.nameIcon,ICONS:c,children:h.items.map((_,g)=>s.jsx(yo,{type:"menu",link:_.link,collumnName:h.name,collumnNameIcon:h.nameIcon,children:_.text},g))},m)),t&&((d=t.acceptedFlags)==null?void 0:d.length)>0&&s.jsx(la,{id:"payment-column",name:t==null?void 0:t.title,nameIcon:t==null?void 0:t.titleIcon,maxWidth:150,ICONS:c,children:s.jsx(yo,{type:"payment",paymentDisclaimer:t==null?void 0:t.text,paymentTitle:t==null?void 0:t.flagsTitle,iconSize:16,icons:t==null?void 0:t.acceptedFlags})}),s.jsxs(la,{id:"social-media-column",name:r==null?void 0:r.title,ICONS:c,children:[r!=null&&r.subTitle?s.jsx(yo,{children:r==null?void 0:r.subTitle}):null,s.jsx(yo,{type:"social-media",iconSize:24,iconLink:n}),u&&s.jsx(Vm,{})]})]})};Km.displayName="Footer";const Jj=Object.freeze(Object.defineProperty({__proto__:null,Footer:Km,FooterSupport:Kj},Symbol.toStringTag,{value:"Module"})),Zj="_header_9xxjk_57",eS="_actions_9xxjk_131",tS="_breadcrumb_9xxjk_142",rS="_credits_9xxjk_157",nS="_pdplinks_9xxjk_185",sS="_similars_9xxjk_212",oS="_sizes_9xxjk_251",iS="_measurementTable_9xxjk_267",aS="_measurementHead_9xxjk_280",cS="_measurementRows_9xxjk_285",lS="_measurementRowsTitle_9xxjk_302",uS="_measurementRowsText_9xxjk_314",dS="_measurementImage_9xxjk_325",fS="_measurementImageContainer_9xxjk_328",pS="_measurementContent_9xxjk_337",hS="_measurementTitle_9xxjk_341",mS="_measurementClose_9xxjk_352",_S="_productref_9xxjk_417",gS="_slideOut_9xxjk_1",yS="_slideIn_9xxjk_1",vS="_content_9xxjk_397",xS="_pdp_9xxjk_185",bS="_divider_9xxjk_575",me={"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:Zj,"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:eS,"add-to-cart":"_add-to-cart_9xxjk_138",breadcrumb:tS,"breadcrumb--active":"_breadcrumb--active_9xxjk_147",credits:rS,"gallery-carousel-modifier":"_gallery-carousel-modifier_9xxjk_162",pdplinks:nS,"links-wrapper":"_links-wrapper_9xxjk_195",similars:sS,"similars-info":"_similars-info_9xxjk_224","toggle-style-modifier":"_toggle-style-modifier_9xxjk_233","accessibility-info":"_accessibility-info_9xxjk_237",sizes:oS,"price-wrapper":"_price-wrapper_9xxjk_263",measurementTable:iS,measurementHead:aS,measurementRows:cS,measurementRowsTitle:lS,measurementRowsText:uS,measurementImage:dS,measurementImageContainer:fS,measurementContent:pS,measurementTitle:hS,measurementClose:mS,"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:_S,"tabs-panel":"_tabs-panel_9xxjk_428","tabs-panel-exit":"_tabs-panel-exit_9xxjk_434",slideOut:gS,"tabs-panel-enter":"_tabs-panel-enter_9xxjk_438",slideIn:yS,content:vS,pdp:xS,"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:bS,"breadcrumbs-desktop":"_breadcrumbs-desktop_9xxjk_580","breadcrumbs-mobile":"_breadcrumbs-mobile_9xxjk_589"},jS=({children:e,link:t,TOGGLE_STYLE_MODIFIER:r})=>{const{isMobile:n}=xe(),{router:o}=Ae(),i=()=>{t&&o.push(t)},c=j.useRef(null);return s.jsx(p.ToggleStyle.Wrapper,{size:n?"medium":"small",style:{...r,border:`${c.current===t?"2":"1"}`,overflow:"hidden",padding:"0"},onClick:i,active:c.current===t,children:e})},Qm=({productId:e,similars:t,TOGGLE_STYLE_MODIFIER:r})=>{const{thumbImage:n}=Et(),o=[{productId:e,slug:"",textureImage:(n==null?void 0:n.imageUrl)??"",textureAlt:(n==null?void 0:n.imageText)??""},...t];return s.jsx("div",{children:o.map((i,c)=>i.textureImage?s.jsxs(jS,{link:i.slug?i.slug:null,TOGGLE_STYLE_MODIFIER:r,children:[s.jsx(p.ToggleStyle.DisabledAdornment,{}),s.jsx(p.ToggleStyle.Texture,{children:s.jsx(at.Image,{alt:i.textureAlt,src:i.textureImage,height:34,width:34,style:{borderRadius:0,height:"100%"}})})]},`similars-item-${c}`):null)})},SS=({children:e,productId:t,PDP_INFO:r,TEXTURE_IMAGE:n,TOGGLE_STYLE_MODIFIER:o})=>{const{items:i,loadSimilars:c}=kc(t,{filterTexture:n});return j.useEffect(()=>{c()},[c]),s.jsxs("div",{className:me.similars,children:[s.jsxs("div",{className:me["similars-info"],children:[s.jsx("span",{className:me["sections-title"],children:r.product.color_title}),e]}),s.jsx(Qm,{productId:t,similars:i,TOGGLE_STYLE_MODIFIER:o})]})},CS=()=>{const{colorName:e}=Et();return s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:e.length===0?"":me["accessibility-info"],children:s.jsx("p",{children:e})})})},ei=({className:e,titleId:t})=>{var o,i,c;const{productName:r,tag:n}=Et();return s.jsxs("div",{className:p.helpers.classNameConcat(me.header,e),children:[n!=null&&n.commercial?s.jsx(p.Tag,{size:"small",title:(o=n.commercial)==null?void 0:o.value,variant:"quaternary",adornment:{start:(i=n.commercial)!=null&&i.icon?s.jsx(p.Icon,{name:n.commercial.icon}):null},children:(c=n.commercial)==null?void 0:c.value}):null,s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h1",{id:t,children:r})})})]})};ei.displayName="PDP.PDPHeader";const Uc=({layout:e="horizontal"})=>{const{price:t,listPrice:r,installments:n}=Et(),{count:o,value:i}=n,c=U.formatPriceToCurrency(r??0,!0),l=U.formatPriceToCurrency(t??0,!0),u=U.formatPriceToCurrency(i??0);return s.jsx(p.ProductInfo.Root,{size:"small",layout:e,children:s.jsxs(p.ProductInfo.Wrapper,{layout:e,size:"small",className:me["price-wrapper"],children:[s.jsx(p.ProductInfo.ValuesWrapper,{children:t!==r?s.jsxs(s.Fragment,{children:[s.jsx(p.ProductInfo.Price,{label:"originalPrice",value:c.toString(),size:"small"}),s.jsx(p.ProductInfo.Price,{label:"discountPrice",value:l.toString(),size:"small"})]}):s.jsx(p.ProductInfo.Price,{label:"defaultPrice",value:l.toString(),size:"small"})}),o&&o>1&&i?s.jsx(p.ProductInfo.Price,{label:"installment",value:`ou ${o}x ${u}`,size:"small"}):null]})})},$a=({onAddCallBack:e,onDisabledClickCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:n})=>{const o=Ms(),{productId:i,productData:c,price:l,listPrice:u,thumbImage:d,isKit:h}=Et(),{isMobile:m}=xe(),{addToCart:_}=Xe(),{sendDataLayerEvent:g}=Ee(),v=!h&&(!o.sku||!o.available),x=()=>{if(v&&typeof t=="function"){t();return}typeof e=="function"&&e({id:o.sku,quantity:o.quantity,seller:o.sellerId,sku:i}),_({id:o.sku,quantity:o.quantity,seller:o.sellerId},{id:i,texture:d==null?void 0:d.imageUrl}),g({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...c,price:l,listPrice:u}]},supportData:{selectedSkus:[o]},customData:{quantity:o.quantity}}})};return s.jsx(p.Button,{className:me["add-to-cart"],size:m?(r==null?void 0:r.mobile)??"large":(r==null?void 0:r.desktop)??"x-large",onClick:x,children:o.sku&&o.available?`${n.add_to_cart}`:`${n.select_size}`})},wS=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t})=>{const{isMobile:r}=xe(),n=Ms(),{sizesContainerRef:o}=Ud(),{structureRef:i}=Ze();return n.sku&&n.available?s.jsx($a,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t}):s.jsx(p.Button,{className:me["add-to-cart"],size:r?(e==null?void 0:e.mobile)??"large":(e==null?void 0:e.desktop)??"x-large",onClick:()=>{o.current&&i.current&&window.document.body.scrollTo({top:o.current.offsetTop-i.current.offsetHeight,behavior:"smooth"})},children:n.sku&&n.available?t.add_to_cart:t.select_size})},vo=({value:e,label:t,suppressHydrationWarning:r=!1},n)=>{const o={value:e,...r&&{suppressHydrationWarning:!0}},i=n==="compact"?o:{...o,label:t};return s.jsx(p.Timer.Digit,{...i})},qo=({dateEnd:e,dateInit:t,type:r="default",TIME_ZONE:n,...o})=>{const[i,c]=j.useState(fp(new xa.TZDate(Date.now(),n),new xa.TZDate(e,n))),[l,u]=j.useState(!1);if(j.useEffect(()=>{u(!0);const g=setInterval(()=>{c(v=>v<=0?(clearInterval(g),0):v-1e3)},1e3);return()=>clearInterval(g)},[]),!l||i<=0)return s.jsx(s.Fragment,{});const d=_s(i,"days"),h=_s(i,"hours"),m=_s(i,"minutes"),_=_s(i);return s.jsxs(p.Timer.Root,{...o,children:[d?s.jsxs(s.Fragment,{children:[vo({value:d,label:"dias"},r),s.jsx(p.Timer.Separator,{})]}):null,vo({value:h,label:"horas"},r),s.jsx(p.Timer.Separator,{}),vo({value:m,label:"min"},r),s.jsx(p.Timer.Separator,{}),vo({value:_,label:"segs",suppressHydrationWarning:!0},r)]})},Hc=({TIME_ZONE:e})=>{const{tag:t}=Et(),r=t==null?void 0:t.flagGoldenPdp,n=j.useMemo(()=>{var o;if((o=r==null?void 0:r.tagImage)!=null&&o.includes("player.vimeo")){const i=r.tagImage.split("?")[1],c=i==null?void 0:i.split("&"),l=c==null?void 0:c.filter(d=>d.includes("loc")||d.includes("signature")||d.includes("user_id")),u=l==null?void 0:l.join("&");return`${r.tagImage.split("?")[0]}?${u}`}return r==null?void 0:r.tagImage},[r==null?void 0:r.tagImage]);return r!=null&&r.enableTag?s.jsxs("div",{className:me["golden-tag"],style:(r==null?void 0:r.backgroundSelect)==="color"?{backgroundColor:r==null?void 0:r.backgroundColor}:(r==null?void 0:r.backgroundSelect)==="image"?{backgroundImage:`url(${r==null?void 0:r.tagImage})`}:void 0,children:[(r==null?void 0:r.backgroundSelect)==="video"&&s.jsx("div",{className:me["golden-tag-video"],children:s.jsx(at.Video,{src:n,autoPlay:!0,muted:!0,loop:!0,playsInline:!0})}),s.jsxs("div",{className:me["golden-tag-content"],children:[s.jsx("span",{className:me["golden-tag-content-text"],style:{color:r==null?void 0:r.textColor},children:r==null?void 0:r.value}),(r==null?void 0:r.countDownEndDate)&&s.jsx(qo,{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};Hc.displayName="PDP.GoldenTag";const ES=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t,TIME_ZONE:r,Z_INDEX_WAR:n})=>{const{isMobile:o}=xe();return o?s.jsxs(p.Card,{className:me["bottom-navigation"],shadow:!0,style:{zIndex:n.pdp_bottom_navigation},children:[s.jsxs("div",{className:me["bottom-navigation__header"],children:[s.jsx(Hc,{TIME_ZONE:r}),s.jsxs("div",{className:me["bottom-navigation__header-content"],children:[s.jsx(ei,{}),s.jsx(Uc,{layout:"name-vertical"})]})]}),s.jsx(wS,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t})]}):null},IS=({children:e,setShowBottomNavigation:t})=>{const r=j.useRef(null),n=dc(r),o=j.useRef(n);return j.useEffect(()=>{var c;const{top:i}=((c=r.current)==null?void 0:c.getBoundingClientRect())??{top:0};o.current!==n&&i>0&&(t(!n),o.current=n)},[n]),s.jsx("div",{ref:r,style:{width:"100%"},children:e})},PS=({ICONS:e})=>{const{isMobile:t}=xe(),{price:r,listPrice:n,productData:o,productId:i}=Et(),{sendDataLayerEvent:c}=Ee(),l=ts(),{toggleProduct:u}=xn();return s.jsx(p.Button,{adornment:{start:s.jsx(p.Icon,{name:e[l.includes(i)?"favorite_true":"favorite_false"],size:"medium"})},className:me["add-to-wishlist"],size:t?"medium":"x-large",variant:"tertiary",onClick:()=>{u(i),c({functionKey:"productEvents",data:{event:l.includes(i)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:"PDP"},commonData:{...o,price:r,listPrice:n}}})}})},Ym=({showWishlist:e=!0,callBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:n,ICONS:o,TIME_ZONE:i,Z_INDEX_WAR:c})=>{const{isMobile:l}=xe(),[u,d]=j.useState(!0);return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:me.actions,children:[l?s.jsx(IS,{setShowBottomNavigation:d,children:s.jsx($a,{onAddCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:n})}):s.jsx($a,{onAddCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:n}),e&&s.jsx(PS,{ICONS:o})]}),l&&u&&s.jsx(ES,{addToCartBtnSize:r,BUY_BUTTON_LABELS:n,Z_INDEX_WAR:c,TIME_ZONE:i})]})},Xm=({className:e,device:t,ICONS:r})=>{const{breadcrumbList:n,productName:o}=Et(),i=c=>c.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return s.jsx(p.BreadCrumb.DivWrapper,{className:p.helpers.classNameConcat(me.breadcrumb,[t==="mobile"?me["breadcrumbs-mobile"]:me["breadcrumbs-desktop"],e]),children:s.jsxs(p.BreadCrumb.List,{children:[Array.isArray(n)&&n.map((c,l)=>{const u=i(n.slice(0,l+1).map(d=>d.replace(/\s/g,"-").toLowerCase()).join("/"));return s.jsx(p.BreadCrumb.Item,{adornment:{end:s.jsx(p.Icon,{name:r.arrow_right})},role:"listitem",children:s.jsx(Tt,{href:`/${u}`,children:c})},`pdp-breadcrumb-${u}-${l}`)}),s.jsx(p.BreadCrumb.Item,{role:"listitem",className:p.helpers.classNameConcat(me["breadcrumb--active"],e),children:o},"pdp-breadcrumb-productName")]})})};Xm.displayName="PDP.BreadCrumb";const Jm=({className:e})=>{var n;const{tag:t}=Et(),r=t==null?void 0:t.flagPdp;return r&&((n=r==null?void 0:r.value)!=null&&n.length)?s.jsx(p.Tag,{className:p.helpers.classNameConcat(me.credits,e),variant:"tertiary",title:r==null?void 0:r.value,size:"small",adornment:{start:r!=null&&r.enableIcon&&(r!=null&&r.icon)?s.jsx(p.Icon,{name:r==null?void 0:r.icon,style:{color:r==null?void 0:r.iconColor}}):null},style:{background:r==null?void 0:r.tagColor,color:r==null?void 0:r.textColor},children:r==null?void 0:r.value}):s.jsx(s.Fragment,{})};Jm.displayName="PDPCredits";const NS=()=>{const{descriptionContent:e,productReference:t}=Et(),[r,n]=j.useState("description");return s.jsxs(p.Tabs.Root,{className:me["tabs-root-modifier"],children:[s.jsx(p.Tabs.TabList,{className:me["tabs-list-modifier"],children:e==null?void 0:e.map(({label:o,value:i})=>s.jsx(p.Tabs.Item,{label:o,value:i,activeTab:r,onTabChange:n,size:"large",className:`${me["tabs-item-modifier"]} ${r===i?me["tabs-item-active"]:""}`},i))}),s.jsxs("div",{className:me["content-wrapper"],children:[r==="description"?s.jsx("div",{children:s.jsxs("span",{className:me.productref,children:["Ref:",t]})}):"",e==null?void 0:e.map(({value:o,content:i})=>r===o?s.jsx(p.Tabs.Panel,{className:`${me["tabs-panel"]} ${r===o?me["tabs-panel-enter"]:me["tabs-panel-exit"]}`,children:s.jsx("div",{className:me.content,dangerouslySetInnerHTML:{__html:i}})},o):null)]})]})},RS=({CURRENCY:e,DELIVERY_INFO_BOXES_ALLOWED:t,FREIGHT_CALCULATION:r,Z_INDEX_WAR:n})=>{const o=Ms(),{isMobile:i}=xe();return s.jsxs(s.Fragment,{children:[i?s.jsx(p.Utils.Divider,{direction:"horizontal",size:"small"}):null,s.jsx(_m,{skuId:o.available?o.sku:"",size:i?r.inputSize.mobile:r.inputSize.desktop,quantity:o.quantity,sellerId:o.sellerId,seller:o.sellerName,local:"PDP",CONSTANTS_PROPS:{freightConfig:r,deliveryInfoBoxesAllowed:t,toolTipZIndex:n.modal,currency:e}}),i?s.jsx(p.Utils.Divider,{direction:"horizontal",size:"small"}):null]})},td=({image:e,index:t,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:n})=>{const o=U.resizingImg(e.imageUrl,n.pdp),{nextimage:i}=Ae();return s.jsx(i,{src:o,alt:e.imageLabel,objectFit:"contain",...n.pdp,...t<=1&&{priority:!0,loading:"eager"},onClick:()=>{r(t)}},t)},TS=({video:e,productName:t,poster:r})=>{const{sendDataLayerEvent:n}=Ee(),o=j.useRef(!1);return s.jsx(at.Video,{src:e,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,style:{zIndex:-1,aspectRatio:"2/3"},onPlaying:()=>{o.current||(o.current=!0,n({functionKey:"readyEvents",data:{event:"video_start",readyData:{product:t}}}))},poster:r})},Zm=({images:e,video:t,handleZoom:r,productName:n,PRODUCT_IMAGE_DIMENSIONS:o})=>{var d,h;const{initialize:i,pagination:c,controller:l,itemsStyles:u}=p.Carousel.useCarousel({gap:0,itemsPerPage:1,loop:!1,direction:"row"});return s.jsxs(p.Carousel.Root,{innerRef:m=>{i(m)},className:me["gallery-carousel-modifier"],children:[s.jsx(p.Carousel.Controller,{position:"absolute",top:"24px",bottom:"unset",left:"16px",children:s.jsx(p.Carousel.Bullets,{page:c.currentPage,total:e.length,onBulletClick:m=>l==null?void 0:l.navigateTo(m)})}),s.jsxs(p.Carousel.Body,{children:[s.jsx(p.Carousel.Item,{style:u,children:s.jsx(td,{image:e[0],index:0,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:o})},"PDP_gallery_0"),t&&s.jsx(p.Carousel.Item,{style:u,children:s.jsx(TS,{video:t,productName:n,...((d=e[1])==null?void 0:d.imageUrl)&&{poster:(h=e[1])==null?void 0:h.imageUrl}})},"PDP_gallery_video"),e.map((m,_)=>_===0?null:s.jsx(p.Carousel.Item,{style:u,children:s.jsx(td,{image:m,index:_,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:o})},`PDP_gallery_${_}`))]})]})};Zm.displayName="PDP.Carousel";const OS="_thumbs_1954e_65",AS="_selected_1954e_92",kS="_carousel_1954e_164",MS="_bullets_1954e_201",it={"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:OS,selected:AS,"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:kS,"carousel-controller":"_carousel-controller_1954e_169","arrow-left":"_arrow-left_1954e_179","arrow-right":"_arrow-right_1954e_180",bullets:MS,"zoom-popup":"_zoom-popup_1954e_212","image-zoom--mobile":"_image-zoom--mobile_1954e_252","image-zoom--image--img":"_image-zoom--image--img_1954e_282"},rd=({onClose:e,ICONS:t})=>s.jsx("div",{className:`${it["button-close-container"]}`,children:s.jsx(p.Button,{iconNameStart:t.close,iconSize:"medium",className:`${it["button-close"]}`,variant:"tertiary",state:"default",size:"medium",onClick:e,style:{textDecoration:"none"}})}),LS=({children:e,Z_INDEX_WAR:t,...r})=>s.jsx("div",{...r,className:it["image-zoom-wrapper-desktop"],style:{zIndex:t.pdp_image_zoom},children:e}),e_=({images:e,setCurrent:t,setFirstImgLoaded:r,ICONS:n,PRODUCT_IMAGE_DIMENSIONS:o})=>{const{nextimage:i}=Ae();let c=null;const l=j.useRef(null),{initialize:u,controller:d,pagination:h,itemsStyles:m}=p.Carousel.useCarousel({itemsPerPage:1,gap:10,loop:!1,direction:"row"}),_=v=>{d==null||d.navigateTo(v)},g=()=>{r(!0)};return j.useEffect(()=>{t(h.currentPage)},[h.currentPage,t]),s.jsxs(p.Carousel.Root,{innerRef:v=>{v&&!c&&(c=v,u(c))},className:it.carousel,children:[s.jsxs(p.Carousel.Controller,{className:it["carousel-controller"],children:[s.jsx(p.Button,{variant:"tertiary",onClick:()=>d==null?void 0:d.prevPage(),className:it["arrow-left"],adornment:{start:s.jsx(p.Icon,{name:n.arrow_left})}}),s.jsx(p.Button,{variant:"tertiary",onClick:()=>d==null?void 0:d.nextPage(),className:it["arrow-right"],adornment:{start:s.jsx(p.Icon,{name:n.arrow_right})}})]}),s.jsx(p.Carousel.Body,{children:Array.isArray(e)&&e.map((v,x)=>s.jsx(p.Carousel.Item,{style:m,children:s.jsx(i,{...o.image_zoom.mobile,...x===0&&{priority:!0,loading:"eager"},ref:l,className:it.imageMobile,src:v.imageUrl,alt:v.imageText,quality:100,...x===0&&{onLoad:g}})},x))}),s.jsx(p.Carousel.Bullets,{className:it.bullets,page:h.currentPage,total:h.totalPages,onBulletClick:_})]})};e_.displayName="ImageZoom.Mobile.Carousel";const t_=({imgRef:e,image:t,PRODUCT_IMAGE_DIMENSIONS:r})=>{Yd();const{nextimage:n}=Ae();return s.jsx("div",{className:it["image-zoom--image"],ref:e,children:s.jsx(n,{...r.image_zoom.mobile,alt:t.imageText,className:it["image-zoom--image--img"],quality:100,src:t.imageUrl})})};t_.displayName="ImageZoom.ImageZoom";const r_=({loaded:e=!1})=>s.jsx("div",{className:it["zoom-popup"],"data-loaded":e,children:s.jsxs("svg",{width:"38",height:"39",viewBox:"0 0 38 39",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.93 5.382a3.711 3.711 0 0 1 2.55-1.007c.949 0 1.864.36 2.549 1.007a3.534 3.534 0 0 1 1.113 2.472v11.357l10.118 3.332c.587.193 1.1.56 1.465 1.053.366.494.565 1.089.566 1.7v.004c0 .22-.025.44-.075.653v.005l-2.98 12.52a.625.625 0 0 1-1.215-.29l2.977-12.515v-.002c.029-.122.043-.247.044-.372a1.619 1.619 0 0 0-.321-.958 1.729 1.729 0 0 0-.851-.61L24.32 20.257a.625.625 0 0 1-.43-.594V7.88a2.285 2.285 0 0 0-.72-1.59 2.462 2.462 0 0 0-1.691-.665c-.635 0-1.241.24-1.69.666a2.285 2.285 0 0 0-.722 1.59v19.04a.625.625 0 0 1-1.115.388l-.056-.071-.161-.202a178.922 178.922 0 0 0-2.333-2.858l-.002-.002a2.581 2.581 0 0 0-.897-.69 2.677 2.677 0 0 0-1.122-.25H12.37c-.307 0-.61.078-.874.225a1.712 1.712 0 0 0-.635.61 1.625 1.625 0 0 0-.016 1.653l7.128 12.296a.625.625 0 0 1-1.082.627L9.762 26.35a2.876 2.876 0 0 1 .027-2.924 2.962 2.962 0 0 1 1.098-1.057 3.05 3.05 0 0 1 1.482-.384h1.016c.57.002 1.133.127 1.648.368.515.24.97.59 1.33 1.024.514.614 1.026 1.239 1.455 1.768V7.855a3.535 3.535 0 0 1 1.113-2.473ZM6.446 10.22a.625.625 0 0 1 0 .884l-5.324 5.324a.625.625 0 0 1-.884-.884l5.324-5.324a.625.625 0 0 1 .884 0Z"}),s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.68 12.033c.345 0 .625.28.625.625v2.703h2.702a.625.625 0 1 1 0 1.25H.68a.625.625 0 0 1-.625-.625v-3.328c0-.345.28-.625.625-.625ZM16.429.237a.625.625 0 0 1 0 .884l-5.325 5.324a.625.625 0 0 1-.884-.883L15.545.237a.625.625 0 0 1 .884 0Z"}),s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.034.68c0-.346.28-.626.625-.626h3.328c.345 0 .625.28.625.625v3.328a.625.625 0 1 1-1.25 0V1.304h-2.703a.625.625 0 0 1-.625-.625Z"})]})});r_.displayName="ImageZoom.ZoomPopup";const n_=({images:e,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:r,...n})=>{const[o,i]=j.useState(!1),[c,l]=j.useState(0),{containerRef:u,imgRef:d,scale:h}=Xd({defaultScale:1,maxScale:3});return s.jsxs("div",{...n,className:it["image-mobile"],"data-disable-carrousel-pan":h>1,children:[s.jsx(r_,{loaded:o}),s.jsx(e_,{images:e,setCurrent:l,setFirstImgLoaded:i,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:r}),s.jsx("div",{className:it["image-zoom--mobile"],ref:u,children:s.jsx(t_,{imgRef:d,image:e[c],PRODUCT_IMAGE_DIMENSIONS:r})})]})};n_.displayName="ImageZoom.ImageMobile";const DS=({children:e,Z_INDEX_WAR:t,...r})=>s.jsx("div",{...r,className:it["image-zoom-wrapper-mobile"],style:{zIndex:t.pdp_image_zoom},children:e}),FS="_modal_1u87b_1",fr={modal:FS,"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 zS({headerTitle:e,isMobile:t,ICONS:r}){return s.jsx(p.Modal.Header,{navigation:"top",className:fr["modal-header"],children:s.jsxs(p.Modal.Controls,{navigation:"top",isMobile:t,children:[s.jsx("div",{className:fr["modal-header__title"],children:s.jsx(p.Modal.Title,{navigation:"top",className:fr["quick-shop__title"],title:e})}),s.jsx(p.Button,{className:fr["modal-header__close-button"],"data-close":!0,iconNameStart:r.close,size:"small",variant:"tertiary"})]})})}const s_=({PDP_INFO:e,PLP_SIZE_ORDER:t,ICONS:r,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:i,Z_INDEX_WAR:c})=>{const{sizes:l,productId:u,handleViewItemEvent:d}=Et(),h=j.useMemo(()=>l!=null&&l.length?nh({items:l,getLabel:C=>C.value,PLP_SIZE_ORDER:t}):[],[l]),{sizesContainerRef:m}=Ud(),{isMobile:_}=xe(),g=Ms(),v=gf(),{setValue:x}=hf(),{setValue:S}=_c(),w=j.useRef({}),[P,I]=j.useState(null);return s.jsxs("div",{ref:m,className:p.helpers.classNameConcat(me.sizes,"PDP_sizes"),children:[s.jsx("span",{className:me["sections-title"],children:e.product.size_title}),s.jsx("div",{children:h.map(C=>(!C.available&&!w.current[C.value]&&(w.current[C.value]={disable:!C.available,size:C.value,skuID:C.sku}),s.jsxs(p.ToggleSize.Wrapper,{size:_?"medium":"large",title:C.value,outOfStock:!C.available,onClick:()=>{C.available||(I({skuID:C.sku,size:C.value,disable:!0}),S(!0)),g.sku!==C.sku&&(x({...g,productId:u,name:C.name,size:C.value,sku:C.sku,sellerId:C.sellerId,sellerName:C.sellerName,available:C.available}),d({sku:C.sku,size:C.value}))},active:g.sku===C.sku,children:[s.jsx(p.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),s.jsx(p.ToggleSize.Text,{children:C==null?void 0:C.value})]},`sizes-${C.sku}-${C.value}`)))}),s.jsx(Ec,{open:v,setVisible:S,sku:P,setSku:I,skus:Object.values(w.current),ICONS:r,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:i,Z_INDEX_WAR:c})]})},gs=({children:e,className:t,type:r})=>s.jsx("div",{className:p.helpers.classNameConcat(me["pdp-main__info-subsection"],[me[`subsection-${r}`],t]),children:e}),o_=({children:e,className:t})=>{const{structureRef:r,tipbarRef:n}=Ze(),o=j.useMemo(()=>{var l,u;const i=((l=r.current)==null?void 0:l.clientHeight)||0,c=((u=n.current)==null?void 0:u.clientHeight)||0;return i+c},[r,n]);return s.jsx("div",{className:p.helpers.classNameConcat(me["pdp-main__info"],t),id:"pdpmaininfo",style:{top:o},children:e})},i_=({TEXTURE_IMAGE:e,TOGGLE_STYLE_MODIFIER:t})=>{const{productId:r}=Et(),{items:n,loadSimilars:o}=kc(r,{filterTexture:e});return j.useEffect(()=>{o()},[o]),s.jsxs("div",{className:me.similars,children:[s.jsx("span",{className:me["sections-title"],children:"Cor"}),s.jsx(Qm,{productId:r,similars:n,TOGGLE_STYLE_MODIFIER:t})]})};i_.displayName="PDP.Info.Similars";const qS=({callBackProductAdded:e,BUY_BUTTON_LABELS:t,ICONS:r,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:o,PDP_INFO:i,PLP_SIZE_ORDER:c,PRODUCT_CARD_TEXTS:l,TEXTURE_IMAGE:u,TIME_ZONE:d,TOGGLE_STYLE_MODIFIER:h,Z_INDEX_WAR:m})=>s.jsx(p.Modal.Body,{className:fr["modal-product-body"],children:s.jsxs(o_,{className:fr["pdp-main__info-modifier"],children:[s.jsxs(gs,{type:"product-info",children:[s.jsx(ei,{}),s.jsx(Uc,{})]}),s.jsx(gs,{type:"similars",children:s.jsx(i_,{TEXTURE_IMAGE:u,TOGGLE_STYLE_MODIFIER:h})}),s.jsx(gs,{type:"sizes",children:s.jsx(s_,{ICONS:r,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:o,PDP_INFO:i,PLP_SIZE_ORDER:c,PRODUCT_CARD_TEXTS:l,Z_INDEX_WAR:m})}),s.jsx(gs,{type:"actions",children:s.jsx(Ym,{showWishlist:!1,callBack:e,addToCartBtnSize:{mobile:"medium",desktop:"large"},BUY_BUTTON_LABELS:t,ICONS:r,TIME_ZONE:d,Z_INDEX_WAR:m})})]})});function BS({callBackProductAdded:e,QUICKSHOP:t,ICONS:r,...n}){const[o,i]=j.useState(!1),c=()=>i(l=>!l);return s.jsxs("div",{className:fr["quick-shop"],children:[s.jsx(p.Button,{onClick:c,size:"x-large",className:fr["shop-bag"],iconNameStart:r.bag,iconSize:"medium"}),s.jsxs(p.Modal.Root,{isOpen:o,setIsOpen:i,className:`${fr.modal} ${fr["quick-shop__modal"]}`,style:{position:"fixed",height:"100svh",width:"100%",top:0,zIndex:1e3,bottom:"unset",overflowY:"hidden"},variant:"sideRight",children:[s.jsx(zS,{headerTitle:t.title,ICONS:r}),s.jsx(qS,{callBackProductAdded:e,ICONS:r,...n})]})]})}const US=({image:e})=>s.jsx(Es,{src:U.resizingImg(e.imageUrl,{width:50,height:75})||"",alt:e.imageText,className:it.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:10,style:{position:"absolute",inset:0,filter:"blur(10px)"}}),HS=({images:e,selectedImageIndex:t,PRODUCT_IMAGE_DIMENSIONS:r,...n})=>{const[o,i]=j.useState(!1),{nextimage:c}=Ae();return s.jsx("div",{...n,className:it["main-image-container"],children:s.jsxs("div",{className:it["image-desktop"],children:[!o&&s.jsx(US,{image:e==null?void 0:e[t]}),s.jsx(c,{src:U.resizingImg(e==null?void 0:e[t].imageUrl,{...r.image_zoom.desktop})||"",alt:e==null?void 0:e[t].imageText,className:it.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:100,onLoad:()=>{i(!0)}})]})})},$S=({images:e,onThumbnailClick:t,selectedImageIndex:r})=>{const{nextimage:n}=Ae();return s.jsx("div",{className:it.thumbs,children:e.map((o,i)=>s.jsx("div",{role:"button",tabIndex:0,onClick:()=>t(i),onKeyDown:c=>{(c.key==="Enter"||c.key===" ")&&t(i)},className:i===r?it.selected:"",children:s.jsx(n,{src:o.imageUrl,alt:o.imageText,layout:"responsive",width:100,height:100,objectFit:"cover",priority:!1})},i))})},a_=({images:e,initialSelectedImageIndex:t=0,setShowImageZoom:r,ICONS:n,PRODUCT_IMAGE_DIMENSIONS:o,Z_INDEX_WAR:i,...c})=>{const{isMobile:l}=xe(),[u,d]=j.useState(t),h=m=>{d(m)};return l?s.jsxs(DS,{Z_INDEX_WAR:i,children:[s.jsx(rd,{onClose:()=>r({show:!1,initialIndex:0}),ICONS:n}),s.jsx(n_,{images:e,ICONS:n,PRODUCT_IMAGE_DIMENSIONS:o})]}):s.jsxs(LS,{Z_INDEX_WAR:i,children:[s.jsx(rd,{onClose:()=>r({show:!1,initialIndex:0}),ICONS:n}),s.jsx(HS,{images:e,selectedImageIndex:u,onThumbnailClick:h,PRODUCT_IMAGE_DIMENSIONS:o},e[u].imageId??`${e[u].imageText}-${u}`),s.jsx($S,{images:e,selectedImageIndex:u,onThumbnailClick:h}),s.jsx(BS,{callBackProductAdded:()=>{r({initialIndex:0,show:!1})},ICONS:n,Z_INDEX_WAR:i,...c})]})};a_.displayName="ImageZoom";const WS=({productImgs:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})=>{const{video:n,productName:o}=Et(),[i,c]=j.useState({show:!1,initialIndex:0});j.useEffect(()=>(i.show?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll"),()=>{document.body.classList.remove("no-scroll")}),[i]);const l=u=>{c({show:!0,initialIndex:u})};return s.jsxs(s.Fragment,{children:[s.jsx(Zm,{images:e,video:n,handleZoom:l,productName:o,PRODUCT_IMAGE_DIMENSIONS:t}),i.show&&s.jsx(a_,{images:e,initialSelectedImageIndex:i.initialIndex,setShowImageZoom:c,PRODUCT_IMAGE_DIMENSIONS:t,...r})]})},c_=({TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})=>{const{images:n}=Et(),o=j.useMemo(()=>{const i=n.filter(c=>!e.includes(c.imageLabel));return i.length>0?i:n},[]);return s.jsx(WS,{productImgs:o,TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})};c_.displayName="PDP.Gallery";const VS=({className:e,hasIcons:t=!0,ICONS:r,PDP_INFO:n})=>{const{allSizesAvailable:o,productId:i}=Et(),{setValue:c}=_c(),{sendDataLayerEvent:l}=Ee();return s.jsx("div",{className:p.helpers.classNameConcat(me.links,e),id:"pdp-container","data-product-id":i,children:s.jsxs("div",{className:me["links-wrapper"],children:[!o&&s.jsx(p.Button,{adornment:t?{start:s.jsx(p.Icon,{name:r.product})}:{},size:"x-small",variant:"tertiary",onClick:()=>c(!0),underline:!0,children:n.links_and_stepper.size_out_of_stock}),s.jsx(p.Button,{adornment:t?{start:s.jsx(p.Icon,{name:r.ruler})}:{},size:"x-small",variant:"tertiary",underline:!0,onClick:()=>{var u,d;(d=window.SizebayParams)==null||d.openChart((u=window.SizebayParams)==null?void 0:u.id),l({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:"pdp:guia-de-medidas"}}})},children:n.links_and_stepper.size_table_title}),s.jsx(p.Button,{size:"x-small",variant:"tertiary",className:"sizebay",underline:!0,onClick:()=>{var u,d;return(d=window.SizebayParams)==null?void 0:d.openVFR((u=window.SizebayParams)==null?void 0:u.id)},children:n.links_and_stepper.sizebay})]})})},GS=({children:e})=>s.jsx("div",{className:me["pdp-main__info-main-content"],children:e}),KS=({head:e,className:t})=>s.jsx("thead",{className:t,children:s.jsx("tr",{children:e.map((r,n)=>s.jsx("th",{children:r},`head-title-${n}`))})}),QS=({rows:e,className:t})=>s.jsx("tbody",{className:t,children:e.map((r,n)=>s.jsx("tr",{children:r.map(o=>typeof o=="string"&&o.includes("blocks")?JSON.parse(o).blocks.map(i=>`${i.text}
|
|
18
|
-
`):o).map((o,i)=>s.jsx("td",{children:o},`cell-content-${i}`))},`row-content-${n}`))}),YS="_tableContainer_1yxy2_1",XS={tableContainer:YS},JS=({children:e,className:t=""})=>s.jsx("table",{className:`${XS.tableContainer} ${t}`,children:e}),Oo={Head:KS,Rows:QS,Root:JS},ZS=({title:e,text:t})=>s.jsxs("p",{className:me.measurementRowsText,children:[s.jsx("h1",{className:me.measurementRowsTitle,children:e}),t]}),eC=({ICONS:e,SIZES:t,Z_INDEX_WAR:r})=>{const n=xf(),{setValue:o}=bf();return s.jsx(p.Modal.Root,{isMobile:!0,style:{zIndex:r.modal},setIsOpen:o,isOpen:n,className:me.measurementModal,children:s.jsx(p.Modal.Body,{children:s.jsxs("div",{className:me.measurementContainer,children:[s.jsx("h1",{className:me.measurementTitle,children:t.title}),s.jsxs("div",{className:me.measurementContent,children:[s.jsx("div",{className:me.measurementImageContainer,children:s.jsx(Es,{width:264,height:402,alt:"",className:me.measurementImage,src:t.bannerImage})}),s.jsxs(Oo.Root,{className:me.measurementTable,children:[s.jsx(Oo.Head,{className:me.measurementHead,head:t.head}),s.jsx(Oo.Rows,{className:me.measurementRows,rows:t.rows.map((i,c)=>[s.jsx(ZS,{title:t.descriptions[c].title,text:t.descriptions[c].text},c),...i])})]})]}),s.jsx(p.Button,{onClick:()=>o(!1),className:me.measurementClose,variant:"tertiary",children:s.jsx(p.Icon,{name:e.close})})]})})},"minicart")},tC=({children:e,className:t,...r})=>s.jsx("div",{className:p.helpers.classNameConcat(me["pdp-main__gallery-wrapper"],t),...r,children:e}),rC=({children:e,className:t,...r})=>s.jsx("div",{className:p.helpers.classNameConcat(me.pdp,t),...r,children:e}),nC=({children:e,className:t,...r})=>s.jsx("div",{className:p.helpers.classNameConcat(me["pdp-main"],t),...r,children:e}),sC=({children:e,className:t,...r})=>s.jsx("div",{className:p.helpers.classNameConcat(me["pdp-main__info-secondary-content"],t),...r,children:e}),oC={gallery:tC,pdp:rC,main:nC,secondary:sC},iC=({className:e,...t})=>s.jsx(p.Utils.Divider,{...t,className:p.helpers.classNameConcat(me.divider,e)}),aC=Object.freeze(Object.defineProperty({__proto__:null,AccessibilityInfo:CS,Actions:Ym,BreadCrumb:Xm,Credits:Jm,DescriptionsTabs:NS,Divider:iC,Freight:RS,Gallery:c_,GoldenTag:Hc,Header:ei,Links:VS,MainContent:GS,MainInfo:o_,PDPSimilars:SS,Price:Uc,ProductMeasurements:eC,Sizes:s_,SubSectionWrapper:gs,containers:oC},Symbol.toStringTag,{value:"Module"})),l_=(e,t)=>{const[r,n]=Em({items:e}),[o,i]=t.split(":").map(Number);return isNaN(o)||isNaN(i)?[r,n]:[r<o?r:o,n>i?n:i]},u_=j.createContext({}),d_=({children:e,fetch:t,queryKey:r,options:n})=>{const{data:o,isLoading:i,isFetched:c,refetch:l,isRefetching:u,error:d}=Av({queryKey:r,queryFn:async()=>{const h=await t();if(!h.ok)throw new Error("[ROOT QUERY PROVIDER ERROR]: NOT LOAD!");return h.json()},...n});return s.jsx(u_.Provider,{value:j.useMemo(()=>({data:o,refetch:l,isLoading:i,isFetched:c,isRefetching:u,isError:!!d}),[o,l,i,c,u,d]),children:e})},f_=()=>{const e=j.useContext(u_);if(e===void 0)throw new Error("useProductsContext must be used within a useRootContext");return e},p_=j.createContext({}),cC=({children:e})=>{const{router:t}=Ae(),{constants:{PLP_SORT_DEFAULT:r}}=ut(),{reset:n}=Ur(),{searchParams:o}=ft(),{data:i,isLoading:c,...l}=f_(),u=j.useCallback((v,x)=>{if(x){if(v.key.toLocaleLowerCase()==="price"){const S=x.getAll("facets");x.delete("facets"),S.forEach(w=>{const[P]=w.split("/");P!==v.key&&x.append("facets",w)})}x.set("page","1"),n(),x.append("facets",`${v.key}/${v.value}`),t.push(`?${x.toString()}`)}},[t,n]),d=j.useCallback(()=>{const v=new URLSearchParams;v.set("sort",r),v.set("page","1"),n(),t.push(`?${v.toString()}`)},[t,n,r]),h=j.useCallback((v,x)=>{if(!x||!x.has&&!x.has("facets"))return;const S=x.getAll("facets");x.delete("facets"),x.set("page","1"),S.forEach(w=>{const[P,I]=w.split("/");(P!==v.key||I!==v.value)&&x.append("facets",w)}),n(),t.push(`?${x.toString()}`)},[t,n]),m=j.useCallback(v=>{const x=o?new URLSearchParams(o):new URLSearchParams;for(const[,S]of x.entries()){const[w,P]=S.split("/");if(w===v.key&&P===v.value)return h(v,x)}return u(v,x)},[u,h,o]),_=j.useCallback(v=>{const x=o?new URLSearchParams(o):new URLSearchParams;x.set("sort",v.replace("_",":")),t.push(`?${x.toString()}`)},[t,o]),g=i&&"data"in i?i.data:null;return s.jsx(p_.Provider,{value:{...l,breadcrumb:(g==null?void 0:g.breadcrumb)??[],deleteAllFacets:d,facets:(g==null?void 0:g.facets)??[],isLoading:c,selectedFacets:U.getFacetsActiveSearchParams(o),onToggleFacet:m,onSort:_},children:e})},h_=({children:e,enabled:t,...r})=>{const{state:n}=ft(),o=c=>c==="productclusterids"||c.startsWith("category-"),i=n.facets.filter(({key:c})=>o(c));return s.jsx(d_,{fetch:()=>U.fetchProxy("/_v/proxy/search/facets",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,facets:i})}),queryKey:["facets",n.base,n.term],options:{enabled:t??!0,gcTime:1e3*60*30,refetchOnWindowFocus:!1,placeholderData:nv,staleTime:1e3*60*30},children:s.jsx(cC,{...r,children:e})})},$c=()=>{const e=j.useContext(p_);if(e===void 0)throw new Error("use QueryFacetsContext must be used within a QueryFacetsProvider");return e},lC=()=>{var N;const{constants:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:n,PLP_FILTERS_TITLE:o,PLP_SIZE_ORDER:i},openFilters:c,setOpenFilters:l}=ut(),[u,d]=j.useState("10000:0"),{isMobile:h}=xe(),{sendDataLayerEvent:m}=Ee(),{state:_}=ft(),{breadcrumb:g,deleteAllFacets:v,facets:x,isLoading:S,onToggleFacet:w}=$c(),P=j.useRef(""),I={isLast:!0,href:(N=_.term)!=null&&N.length?`/${_.term}`:"",name:_.term},C=U.filterNonRootFacets(_.facets,_==null?void 0:_.base);return j.useEffect(()=>{const T=x.find(({key:O})=>O==="price");if(T){const[O,M]=l_(T.values,u??"10000:0");d(`${O}:${M}`)}},[x,u,d]),j.useEffect(()=>{if(!C.length)return;const T=JSON.stringify(C);P.current!==T&&(P.current=T,m({functionKey:"filterEvent",data:{commonData:{selectedFacets:C}}}))},[C]),s.jsxs(dn.teamComponents.Filter.Root,{CONSTANTS:{ICONS:e,PLP_FILTERS_TITLE:o,PLP_FILTERS:t},breadcrumb:g.length?g:[I],deleteAllFacets:v,filters:{facets:U.filterNonCategorySelected(x,_==null?void 0:_.base),selected:C},isMobile:h??!1,isLoading:S??!1,isOpen:c,price:u,onToggleFacet:w,setIsOpen:l,children:[s.jsx(dn.teamComponents.Filter.Selected,{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r}),s.jsx(dn.teamComponents.Filter.Content,{columns:2,CONSTANTS:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:n,PLP_SIZE_ORDER:i}})]})},m_=()=>typeof document>"u"?null:s.jsx(lC,{});m_.displayName="Filters";const uC=({productCount:e,PLP_GRID_SCROLL_BACK:t})=>{j.useEffect(()=>{var i;const n=new URLSearchParams(window.location.search).get("page");if(e){const[c,l]=((i=sessionStorage.getItem(t.key))==null?void 0:i.split("-"))??["0",null],u=sessionStorage.getItem(t.refer);c&&u==="true"&&(l===(n||"null")&&window.document.body.scrollTo({top:parseInt(c,10),behavior:"smooth"}),sessionStorage.setItem(t.refer,"false"))}const o=()=>{e>0&&window.document.body.scrollTop&&sessionStorage.setItem(t.key,`${window.document.body.scrollTop.toString()}-${n}`)};return window.document.body.addEventListener("scroll",o,{passive:!0}),()=>{window.document.body.removeEventListener("scroll",o)}},[e])},__=j.createContext({}),dC=({callback:e,children:t})=>{const{data:r,isLoading:n,...o}=f_(),i=r&&"data"in r?r.data:null;return j.useEffect(()=>{i&&typeof e=="function"&&e({...i})},[i]),s.jsx(__.Provider,{value:{...o,isLoading:n,products:(i==null?void 0:i.products)??[],pagination:(i==null?void 0:i.pagination)??kv,total:(i==null?void 0:i.pagination.count)??0},children:t})},Wc=({callback:e,children:t,forceUpdate:r,options:n,state:o,queryKey:i})=>s.jsx(d_,{fetch:()=>U.fetchProxy("/_v/proxy/search/product",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...o,forceUpdate:r})}),queryKey:i,options:n,children:s.jsx(dC,{callback:e,children:t})}),qs=()=>{const e=j.useContext(__);if(e===void 0)throw new Error("useQueryProductsContext must be used within a QueryProductsProvider");return e},Vc=({total:e=0})=>{const{constants:{SEARCH_TOTAL_PORTAL_ID:t}}=ut();if(typeof window>"u")return null;const r=document.getElementById(t);return r?lc.createPortal(s.jsxs("span",{children:["[",e,"] produto",e>1?"s":""]}),r):null};Vc.displayName="PDC.Grid.NavigationTotal";const fC=()=>{const{isMobile:e}=xe(),{constants:t,mainSeller:r}=ut(),{isLoading:n,products:o,pagination:{count:i}}=qs(),{ICONS:c,PLP_GRID_SCROLL_BACK:l,PLP_NOT_RESULT:u}=t;return uC({productCount:(o==null?void 0:o.length)??0,PLP_GRID_SCROLL_BACK:l}),o?s.jsxs(s.Fragment,{children:[s.jsx(tr.Products,{...t,isMobile:e??!1,items:o,StoreConfig_MainSellerId:r}),!o.length&&!n&&s.jsx(tr.Empty,{ICONS:c,PLP_NOT_RESULT:u}),s.jsx(Vc,{total:i})]}):null},g_=({infinite:e=!1})=>e?s.jsx(tr.InfiniteScroller,{}):s.jsx(fC,{});g_.displayName="Grid";const Tn=e=>({centro:"center",esquerda:"start",direita:"end"})[e],y_=({children:e,contentState:t,entityKey:r})=>{const{url:n}=t.getEntity(r).getData();return n?s.jsx(Tt,{href:n,children:e}):e},pC=(e,t,r)=>{e.findEntityRanges(n=>{const o=n.getEntity();return o===null?!1:r.getEntity(o).getType()==="LINK"},t)},Gc=e=>{const t=new ln.CompositeDecorator([{strategy:pC,component:y_}]),r=ln.convertFromRaw(e);return ln.EditorState.createWithContent(r,t)},hC=e=>ln.convertFromRaw(e),v_=ln.DefaultDraftBlockRenderMap.set("unstyled",{element:"div",aliasedElements:["div"]}),nd="superior-direita",xo="dentro-inferior-centro",mC="inferior-direita",ua="dentro-inferior-esquerda",x_=e=>({position:e===xo||e===ua?"absolute":"default",shouldRender:[nd,xo,ua].includes(e)?"top":"bottom",alignItems:[xo].includes(e)?"center":[nd,mC].includes(e)?"flex-end":"flex-start",left:e===ua?"16px":e===xo?"45%":"unset"}),_C=Object.freeze(Object.defineProperty({__proto__:null,CREATE_CONTENT:Gc,EXTENDED_BLOCK_RENDER_MAP:v_,GET_CONTENT_STATE:hC,controllersPositionsAdapter:x_},Symbol.toStringTag,{value:"Module"}));function gC(e){return xC(e)||vC(e)||yC()}function yC(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function vC(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function xC(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}function sd(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(e)),t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r}function od(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sd(r,!0).forEach(function(n){bC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sd(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bC(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jC(e,t){return wC(e)||CC(e,t)||SC()}function SC(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function CC(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var c=e[Symbol.iterator](),l;!(n=(l=c.next()).done)&&(r.push(l.value),!(t&&r.length===t));n=!0);}catch(u){o=!0,i=u}finally{try{!n&&c.return!=null&&c.return()}finally{if(o)throw i}}return r}function wC(e){if(Array.isArray(e))return e}function EC(e,t){if(e==null)return t;for(var r=jC(t,2),n=r[0],o=r[1],i=od({},n),c=gC(o),l=0,u=Object.keys(e);l<u.length;l++){var d=u[l];if(n.hasOwnProperty(d)){var h=n[d];i[d]=od({},h,{},e[d])}else i[d]=e[d],c.push(d)}return[i,c]}var id={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"};function da(e){if(e==null)return e;for(var t={},r=!1,n=0,o=Object.keys(e);n<o.length;n++){var i=o[n],c=i;id.hasOwnProperty(i)&&(c=id[i],r=!0),t[c]=e[i]}return r?t:e}var IC=/^(moz|ms|o|webkit)-/,PC=/^\d+$/,NC=/([A-Z])/g,RC={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function TC(e){return e.replace(NC,"-$1").toLowerCase().replace(IC,"-$1-")}function OC(e,t){var r;return typeof t=="string"?r=PC.test(t):(r=!0,t=String(t)),!r||t==="0"||RC[e]===!0?t:t+"px"}function bo(e){return Object.keys(e).map(function(t){var r=OC(t,e[t]),n=TC(t);return"".concat(n,": ").concat(r)}).join("; ")}var vt={UNSTYLED:"unstyled",HEADER_ONE:"header-one",HEADER_TWO:"header-two",HEADER_THREE:"header-three",HEADER_FOUR:"header-four",HEADER_FIVE:"header-five",HEADER_SIX:"header-six",UNORDERED_LIST_ITEM:"unordered-list-item",ORDERED_LIST_ITEM:"ordered-list-item",BLOCKQUOTE:"blockquote",PULLQUOTE:"pullquote",CODE:"code-block",ATOMIC:"atomic"},Zn={LINK:"LINK",IMAGE:"IMAGE"},Bs={BOLD:"BOLD",CODE:"CODE",ITALIC:"ITALIC",STRIKETHROUGH:"STRIKETHROUGH",UNDERLINE:"UNDERLINE"},b_={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(U.commonjsGlobal,function(){var r=Array.prototype.slice;function n(a,f){f&&(a.prototype=Object.create(f.prototype)),a.prototype.constructor=a}function o(a){return u(a)?a:Pe(a)}n(i,o);function i(a){return d(a)?a:ne(a)}n(c,o);function c(a){return h(a)?a:te(a)}n(l,o);function l(a){return u(a)&&!m(a)?a:ke(a)}function u(a){return!!(a&&a[g])}function d(a){return!!(a&&a[v])}function h(a){return!!(a&&a[x])}function m(a){return d(a)||h(a)}function _(a){return!!(a&&a[S])}o.isIterable=u,o.isKeyed=d,o.isIndexed=h,o.isAssociative=m,o.isOrdered=_,o.Keyed=i,o.Indexed=c,o.Set=l;var g="@@__IMMUTABLE_ITERABLE__@@",v="@@__IMMUTABLE_KEYED__@@",x="@@__IMMUTABLE_INDEXED__@@",S="@@__IMMUTABLE_ORDERED__@@",w="delete",P=5,I=1<<P,C=I-1,N={},T={value:!1},O={value:!1};function M(a){return a.value=!1,a}function z(a){a&&(a.value=!0)}function D(){}function B(a,f){f=f||0;for(var y=Math.max(0,a.length-f),b=new Array(y),E=0;E<y;E++)b[E]=a[E+f];return b}function G(a){return a.size===void 0&&(a.size=a.__iterate(Y)),a.size}function J(a,f){if(typeof f!="number"){var y=f>>>0;if(""+y!==f||y===4294967295)return NaN;f=y}return f<0?G(a)+f:f}function Y(){return!0}function X(a,f,y){return(a===0||y!==void 0&&a<=-y)&&(f===void 0||y!==void 0&&f>=y)}function Z(a,f){return fe(a,f,0)}function he(a,f){return fe(a,f,f)}function fe(a,f,y){return a===void 0?y:a<0?Math.max(0,f+a):f===void 0?a:Math.min(f,a)}var ee=0,ie=1,_e=2,Ce=typeof Symbol=="function"&&Symbol.iterator,ge="@@iterator",we=Ce||ge;function V(a){this.next=a}V.prototype.toString=function(){return"[Iterator]"},V.KEYS=ee,V.VALUES=ie,V.ENTRIES=_e,V.prototype.inspect=V.prototype.toSource=function(){return this.toString()},V.prototype[we]=function(){return this};function oe(a,f,y,b){var E=a===0?f:a===1?y:[f,y];return b?b.value=E:b={value:E,done:!1},b}function F(){return{value:void 0,done:!0}}function ce(a){return!!q(a)}function je(a){return a&&typeof a.next=="function"}function Oe(a){var f=q(a);return f&&f.call(a)}function q(a){var f=a&&(Ce&&a[Ce]||a[ge]);if(typeof f=="function")return f}function $(a){return a&&typeof a.length=="number"}n(Pe,o);function Pe(a){return a==null?$e():u(a)?a.toSeq():Q(a)}Pe.of=function(){return Pe(arguments)},Pe.prototype.toSeq=function(){return this},Pe.prototype.toString=function(){return this.__toString("Seq {","}")},Pe.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},Pe.prototype.__iterate=function(a,f){return ve(this,a,f,!0)},Pe.prototype.__iterator=function(a,f){return qe(this,a,f,!0)},n(ne,Pe);function ne(a){return a==null?$e().toKeyedSeq():u(a)?d(a)?a.toSeq():a.fromEntrySeq():ae(a)}ne.prototype.toKeyedSeq=function(){return this},n(te,Pe);function te(a){return a==null?$e():u(a)?d(a)?a.entrySeq():a.toIndexedSeq():de(a)}te.of=function(){return te(arguments)},te.prototype.toIndexedSeq=function(){return this},te.prototype.toString=function(){return this.__toString("Seq [","]")},te.prototype.__iterate=function(a,f){return ve(this,a,f,!1)},te.prototype.__iterator=function(a,f){return qe(this,a,f,!1)},n(ke,Pe);function ke(a){return(a==null?$e():u(a)?d(a)?a.entrySeq():a:de(a)).toSetSeq()}ke.of=function(){return ke(arguments)},ke.prototype.toSetSeq=function(){return this},Pe.isSeq=re,Pe.Keyed=ne,Pe.Set=ke,Pe.Indexed=te;var ct="@@__IMMUTABLE_SEQ__@@";Pe.prototype[ct]=!0,n(Me,te);function Me(a){this._array=a,this.size=a.length}Me.prototype.get=function(a,f){return this.has(a)?this._array[J(this,a)]:f},Me.prototype.__iterate=function(a,f){for(var y=this._array,b=y.length-1,E=0;E<=b;E++)if(a(y[f?b-E:E],E,this)===!1)return E+1;return E},Me.prototype.__iterator=function(a,f){var y=this._array,b=y.length-1,E=0;return new V(function(){return E>b?F():oe(a,E,y[f?b-E++:E++])})},n(Le,ne);function Le(a){var f=Object.keys(a);this._object=a,this._keys=f,this.size=f.length}Le.prototype.get=function(a,f){return f!==void 0&&!this.has(a)?f:this._object[a]},Le.prototype.has=function(a){return this._object.hasOwnProperty(a)},Le.prototype.__iterate=function(a,f){for(var y=this._object,b=this._keys,E=b.length-1,R=0;R<=E;R++){var A=b[f?E-R:R];if(a(y[A],A,this)===!1)return R+1}return R},Le.prototype.__iterator=function(a,f){var y=this._object,b=this._keys,E=b.length-1,R=0;return new V(function(){var A=b[f?E-R:R];return R++>E?F():oe(a,A,y[A])})},Le.prototype[S]=!0,n(tt,te);function tt(a){this._iterable=a,this.size=a.length||a.size}tt.prototype.__iterateUncached=function(a,f){if(f)return this.cacheResult().__iterate(a,f);var y=this._iterable,b=Oe(y),E=0;if(je(b))for(var R;!(R=b.next()).done&&a(R.value,E++,this)!==!1;);return E},tt.prototype.__iteratorUncached=function(a,f){if(f)return this.cacheResult().__iterator(a,f);var y=this._iterable,b=Oe(y);if(!je(b))return new V(F);var E=0;return new V(function(){var R=b.next();return R.done?R:oe(a,E++,R.value)})},n(We,te);function We(a){this._iterator=a,this._iteratorCache=[]}We.prototype.__iterateUncached=function(a,f){if(f)return this.cacheResult().__iterate(a,f);for(var y=this._iterator,b=this._iteratorCache,E=0;E<b.length;)if(a(b[E],E++,this)===!1)return E;for(var R;!(R=y.next()).done;){var A=R.value;if(b[E]=A,a(A,E++,this)===!1)break}return E},We.prototype.__iteratorUncached=function(a,f){if(f)return this.cacheResult().__iterator(a,f);var y=this._iterator,b=this._iteratorCache,E=0;return new V(function(){if(E>=b.length){var R=y.next();if(R.done)return R;b[E]=R.value}return oe(a,E,b[E++])})};function re(a){return!!(a&&a[ct])}var De;function $e(){return De||(De=new Me([]))}function ae(a){var f=Array.isArray(a)?new Me(a).fromEntrySeq():je(a)?new We(a).fromEntrySeq():ce(a)?new tt(a).fromEntrySeq():typeof a=="object"?new Le(a):void 0;if(!f)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+a);return f}function de(a){var f=se(a);if(!f)throw new TypeError("Expected Array or iterable object of values: "+a);return f}function Q(a){var f=se(a)||typeof a=="object"&&new Le(a);if(!f)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+a);return f}function se(a){return $(a)?new Me(a):je(a)?new We(a):ce(a)?new tt(a):void 0}function ve(a,f,y,b){var E=a._cache;if(E){for(var R=E.length-1,A=0;A<=R;A++){var L=E[y?R-A:A];if(f(L[1],b?L[0]:A,a)===!1)return A+1}return A}return a.__iterateUncached(f,y)}function qe(a,f,y,b){var E=a._cache;if(E){var R=E.length-1,A=0;return new V(function(){var L=E[y?R-A:A];return A++>R?F():oe(f,b?L[0]:A-1,L[1])})}return a.__iteratorUncached(f,y)}function Je(a,f){return f?Wr(f,a,"",{"":a}):Cr(a)}function Wr(a,f,y,b){return Array.isArray(f)?a.call(b,y,te(f).map(function(E,R){return Wr(a,E,R,f)})):el(f)?a.call(b,y,ne(f).map(function(E,R){return Wr(a,E,R,f)})):f}function Cr(a){return Array.isArray(a)?te(a).map(Cr).toList():el(a)?ne(a).map(Cr).toMap():a}function el(a){return a&&(a.constructor===Object||a.constructor===void 0)}function rt(a,f){if(a===f||a!==a&&f!==f)return!0;if(!a||!f)return!1;if(typeof a.valueOf=="function"&&typeof f.valueOf=="function"){if(a=a.valueOf(),f=f.valueOf(),a===f||a!==a&&f!==f)return!0;if(!a||!f)return!1}return!!(typeof a.equals=="function"&&typeof f.equals=="function"&&a.equals(f))}function si(a,f){if(a===f)return!0;if(!u(f)||a.size!==void 0&&f.size!==void 0&&a.size!==f.size||a.__hash!==void 0&&f.__hash!==void 0&&a.__hash!==f.__hash||d(a)!==d(f)||h(a)!==h(f)||_(a)!==_(f))return!1;if(a.size===0&&f.size===0)return!0;var y=!m(a);if(_(a)){var b=a.entries();return f.every(function(H,W){var K=b.next().value;return K&&rt(K[1],H)&&(y||rt(K[0],W))})&&b.next().done}var E=!1;if(a.size===void 0)if(f.size===void 0)typeof a.cacheResult=="function"&&a.cacheResult();else{E=!0;var R=a;a=f,f=R}var A=!0,L=f.__iterate(function(H,W){if(y?!a.has(H):E?!rt(H,a.get(W,N)):!rt(a.get(W,N),H))return A=!1,!1});return A&&a.size===L}n(_t,te);function _t(a,f){if(!(this instanceof _t))return new _t(a,f);if(this._value=a,this.size=f===void 0?1/0:Math.max(0,f),this.size===0){if(oi)return oi;oi=this}}_t.prototype.toString=function(){return this.size===0?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},_t.prototype.get=function(a,f){return this.has(a)?this._value:f},_t.prototype.includes=function(a){return rt(this._value,a)},_t.prototype.slice=function(a,f){var y=this.size;return X(a,f,y)?this:new _t(this._value,he(f,y)-Z(a,y))},_t.prototype.reverse=function(){return this},_t.prototype.indexOf=function(a){return rt(this._value,a)?0:-1},_t.prototype.lastIndexOf=function(a){return rt(this._value,a)?this.size:-1},_t.prototype.__iterate=function(a,f){for(var y=0;y<this.size;y++)if(a(this._value,y,this)===!1)return y+1;return y},_t.prototype.__iterator=function(a,f){var y=this,b=0;return new V(function(){return b<y.size?oe(a,b++,y._value):F()})},_t.prototype.equals=function(a){return a instanceof _t?rt(this._value,a._value):si(a)};var oi;function Ws(a,f){if(!a)throw new Error(f)}n(gt,te);function gt(a,f,y){if(!(this instanceof gt))return new gt(a,f,y);if(Ws(y!==0,"Cannot step a Range by 0"),a=a||0,f===void 0&&(f=1/0),y=y===void 0?1:Math.abs(y),f<a&&(y=-y),this._start=a,this._end=f,this._step=y,this.size=Math.max(0,Math.ceil((f-a)/y-1)+1),this.size===0){if(ii)return ii;ii=this}}gt.prototype.toString=function(){return this.size===0?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},gt.prototype.get=function(a,f){return this.has(a)?this._start+J(this,a)*this._step:f},gt.prototype.includes=function(a){var f=(a-this._start)/this._step;return f>=0&&f<this.size&&f===Math.floor(f)},gt.prototype.slice=function(a,f){return X(a,f,this.size)?this:(a=Z(a,this.size),f=he(f,this.size),f<=a?new gt(0,0):new gt(this.get(a,this._end),this.get(f,this._end),this._step))},gt.prototype.indexOf=function(a){var f=a-this._start;if(f%this._step===0){var y=f/this._step;if(y>=0&&y<this.size)return y}return-1},gt.prototype.lastIndexOf=function(a){return this.indexOf(a)},gt.prototype.__iterate=function(a,f){for(var y=this.size-1,b=this._step,E=f?this._start+y*b:this._start,R=0;R<=y;R++){if(a(E,R,this)===!1)return R+1;E+=f?-b:b}return R},gt.prototype.__iterator=function(a,f){var y=this.size-1,b=this._step,E=f?this._start+y*b:this._start,R=0;return new V(function(){var A=E;return E+=f?-b:b,R>y?F():oe(a,R++,A)})},gt.prototype.equals=function(a){return a instanceof gt?this._start===a._start&&this._end===a._end&&this._step===a._step:si(this,a)};var ii;n(wr,o);function wr(){throw TypeError("Abstract")}n(ns,wr);function ns(){}n(jn,wr);function jn(){}n(Vs,wr);function Vs(){}wr.Keyed=ns,wr.Indexed=jn,wr.Set=Vs;var ss=typeof Math.imul=="function"&&Math.imul(4294967295,2)===-2?Math.imul:function(f,y){f=f|0,y=y|0;var b=f&65535,E=y&65535;return b*E+((f>>>16)*E+b*(y>>>16)<<16>>>0)|0};function ai(a){return a>>>1&1073741824|a&3221225471}function Ot(a){if(a===!1||a===null||a===void 0||typeof a.valueOf=="function"&&(a=a.valueOf(),a===!1||a===null||a===void 0))return 0;if(a===!0)return 1;var f=typeof a;if(f==="number"){var y=a|0;for(y!==a&&(y^=a*4294967295);a>4294967295;)a/=4294967295,y^=a;return ai(y)}if(f==="string")return a.length>Wg?Ug(a):ci(a);if(typeof a.hashCode=="function")return a.hashCode();if(f==="object")return Hg(a);if(typeof a.toString=="function")return ci(a.toString());throw new Error("Value type "+f+" cannot be hashed.")}function Ug(a){var f=pi[a];return f===void 0&&(f=ci(a),fi===Vg&&(fi=0,pi={}),fi++,pi[a]=f),f}function ci(a){for(var f=0,y=0;y<a.length;y++)f=31*f+a.charCodeAt(y)|0;return ai(f)}function Hg(a){var f;if(li&&(f=ui.get(a),f!==void 0)||(f=a[Vr],f!==void 0)||!rl&&(f=a.propertyIsEnumerable&&a.propertyIsEnumerable[Vr],f!==void 0||(f=$g(a),f!==void 0)))return f;if(f=++di,di&1073741824&&(di=0),li)ui.set(a,f);else{if(tl!==void 0&&tl(a)===!1)throw new Error("Non-extensible objects are not allowed as keys.");if(rl)Object.defineProperty(a,Vr,{enumerable:!1,configurable:!1,writable:!1,value:f});else if(a.propertyIsEnumerable!==void 0&&a.propertyIsEnumerable===a.constructor.prototype.propertyIsEnumerable)a.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},a.propertyIsEnumerable[Vr]=f;else if(a.nodeType!==void 0)a[Vr]=f;else throw new Error("Unable to set a non-enumerable property on object.")}return f}var tl=Object.isExtensible,rl=function(){try{return Object.defineProperty({},"@",{}),!0}catch{return!1}}();function $g(a){if(a&&a.nodeType>0)switch(a.nodeType){case 1:return a.uniqueID;case 9:return a.documentElement&&a.documentElement.uniqueID}}var li=typeof WeakMap=="function",ui;li&&(ui=new WeakMap);var di=0,Vr="__immutablehash__";typeof Symbol=="function"&&(Vr=Symbol(Vr));var Wg=16,Vg=255,fi=0,pi={};function At(a){Ws(a!==1/0,"Cannot perform this action with an infinite size.")}n(Fe,ns);function Fe(a){return a==null?nr():hi(a)&&!_(a)?a:nr().withMutations(function(f){var y=i(a);At(y.size),y.forEach(function(b,E){return f.set(E,b)})})}Fe.prototype.toString=function(){return this.__toString("Map {","}")},Fe.prototype.get=function(a,f){return this._root?this._root.get(0,void 0,a,f):f},Fe.prototype.set=function(a,f){return il(this,a,f)},Fe.prototype.setIn=function(a,f){return this.updateIn(a,N,function(){return f})},Fe.prototype.remove=function(a){return il(this,a,N)},Fe.prototype.deleteIn=function(a){return this.updateIn(a,function(){return N})},Fe.prototype.update=function(a,f,y){return arguments.length===1?a(this):this.updateIn([a],f,y)},Fe.prototype.updateIn=function(a,f,y){y||(y=f,f=void 0);var b=dl(this,Ol(a),f,y);return b===N?void 0:b},Fe.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):nr()},Fe.prototype.merge=function(){return Gs(this,void 0,arguments)},Fe.prototype.mergeWith=function(a){var f=r.call(arguments,1);return Gs(this,a,f)},Fe.prototype.mergeIn=function(a){var f=r.call(arguments,1);return this.updateIn(a,nr(),function(y){return typeof y.merge=="function"?y.merge.apply(y,f):f[f.length-1]})},Fe.prototype.mergeDeep=function(){return Gs(this,cl,arguments)},Fe.prototype.mergeDeepWith=function(a){var f=r.call(arguments,1);return Gs(this,ll(a),f)},Fe.prototype.mergeDeepIn=function(a){var f=r.call(arguments,1);return this.updateIn(a,nr(),function(y){return typeof y.mergeDeep=="function"?y.mergeDeep.apply(y,f):f[f.length-1]})},Fe.prototype.sort=function(a){return nt(Nn(this,a))},Fe.prototype.sortBy=function(a,f){return nt(Nn(this,f,a))},Fe.prototype.withMutations=function(a){var f=this.asMutable();return a(f),f.wasAltered()?f.__ensureOwner(this.__ownerID):this},Fe.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new D)},Fe.prototype.asImmutable=function(){return this.__ensureOwner()},Fe.prototype.wasAltered=function(){return this.__altered},Fe.prototype.__iterator=function(a,f){return new mi(this,a,f)},Fe.prototype.__iterate=function(a,f){var y=this,b=0;return this._root&&this._root.iterate(function(E){return b++,a(E[1],E[0],y)},f),b},Fe.prototype.__ensureOwner=function(a){return a===this.__ownerID?this:a?gi(this.size,this._root,a,this.__hash):(this.__ownerID=a,this.__altered=!1,this)};function hi(a){return!!(a&&a[nl])}Fe.isMap=hi;var nl="@@__IMMUTABLE_MAP__@@",Ne=Fe.prototype;Ne[nl]=!0,Ne[w]=Ne.remove,Ne.removeIn=Ne.deleteIn;function os(a,f){this.ownerID=a,this.entries=f}os.prototype.get=function(a,f,y,b){for(var E=this.entries,R=0,A=E.length;R<A;R++)if(rt(y,E[R][0]))return E[R][1];return b},os.prototype.update=function(a,f,y,b,E,R,A){for(var L=E===N,H=this.entries,W=0,K=H.length;W<K&&!rt(b,H[W][0]);W++);var le=W<K;if(le?H[W][1]===E:L)return this;if(z(A),(L||!le)&&z(R),!(L&&H.length===1)){if(!le&&!L&&H.length>=Jg)return Gg(a,H,b,E);var pe=a&&a===this.ownerID,Se=pe?H:B(H);return le?L?W===K-1?Se.pop():Se[W]=Se.pop():Se[W]=[b,E]:Se.push([b,E]),pe?(this.entries=Se,this):new os(a,Se)}};function Sn(a,f,y){this.ownerID=a,this.bitmap=f,this.nodes=y}Sn.prototype.get=function(a,f,y,b){f===void 0&&(f=Ot(y));var E=1<<((a===0?f:f>>>a)&C),R=this.bitmap;return R&E?this.nodes[fl(R&E-1)].get(a+P,f,y,b):b},Sn.prototype.update=function(a,f,y,b,E,R,A){y===void 0&&(y=Ot(b));var L=(f===0?y:y>>>f)&C,H=1<<L,W=this.bitmap,K=(W&H)!==0;if(!K&&E===N)return this;var le=fl(W&H-1),pe=this.nodes,Se=K?pe[le]:void 0,Ie=yi(Se,a,f+P,y,b,E,R,A);if(Ie===Se)return this;if(!K&&Ie&&pe.length>=Zg)return Qg(a,pe,W,L,Ie);if(K&&!Ie&&pe.length===2&&al(pe[le^1]))return pe[le^1];if(K&&Ie&&pe.length===1&&al(Ie))return Ie;var Qe=a&&a===this.ownerID,Qt=K?Ie?W:W^H:W|H,ar=K?Ie?pl(pe,le,Ie,Qe):Xg(pe,le,Qe):Yg(pe,le,Ie,Qe);return Qe?(this.bitmap=Qt,this.nodes=ar,this):new Sn(a,Qt,ar)};function is(a,f,y){this.ownerID=a,this.count=f,this.nodes=y}is.prototype.get=function(a,f,y,b){f===void 0&&(f=Ot(y));var E=(a===0?f:f>>>a)&C,R=this.nodes[E];return R?R.get(a+P,f,y,b):b},is.prototype.update=function(a,f,y,b,E,R,A){y===void 0&&(y=Ot(b));var L=(f===0?y:y>>>f)&C,H=E===N,W=this.nodes,K=W[L];if(H&&!K)return this;var le=yi(K,a,f+P,y,b,E,R,A);if(le===K)return this;var pe=this.count;if(!K)pe++;else if(!le&&(pe--,pe<ey))return Kg(a,W,pe,L);var Se=a&&a===this.ownerID,Ie=pl(W,L,le,Se);return Se?(this.count=pe,this.nodes=Ie,this):new is(a,pe,Ie)};function Cn(a,f,y){this.ownerID=a,this.keyHash=f,this.entries=y}Cn.prototype.get=function(a,f,y,b){for(var E=this.entries,R=0,A=E.length;R<A;R++)if(rt(y,E[R][0]))return E[R][1];return b},Cn.prototype.update=function(a,f,y,b,E,R,A){y===void 0&&(y=Ot(b));var L=E===N;if(y!==this.keyHash)return L?this:(z(A),z(R),vi(this,a,f,y,[b,E]));for(var H=this.entries,W=0,K=H.length;W<K&&!rt(b,H[W][0]);W++);var le=W<K;if(le?H[W][1]===E:L)return this;if(z(A),(L||!le)&&z(R),L&&K===2)return new _r(a,this.keyHash,H[W^1]);var pe=a&&a===this.ownerID,Se=pe?H:B(H);return le?L?W===K-1?Se.pop():Se[W]=Se.pop():Se[W]=[b,E]:Se.push([b,E]),pe?(this.entries=Se,this):new Cn(a,this.keyHash,Se)};function _r(a,f,y){this.ownerID=a,this.keyHash=f,this.entry=y}_r.prototype.get=function(a,f,y,b){return rt(y,this.entry[0])?this.entry[1]:b},_r.prototype.update=function(a,f,y,b,E,R,A){var L=E===N,H=rt(b,this.entry[0]);if(H?E===this.entry[1]:L)return this;if(z(A),L){z(R);return}return H?a&&a===this.ownerID?(this.entry[1]=E,this):new _r(a,this.keyHash,[b,E]):(z(R),vi(this,a,f,Ot(b),[b,E]))},os.prototype.iterate=Cn.prototype.iterate=function(a,f){for(var y=this.entries,b=0,E=y.length-1;b<=E;b++)if(a(y[f?E-b:b])===!1)return!1},Sn.prototype.iterate=is.prototype.iterate=function(a,f){for(var y=this.nodes,b=0,E=y.length-1;b<=E;b++){var R=y[f?E-b:b];if(R&&R.iterate(a,f)===!1)return!1}},_r.prototype.iterate=function(a,f){return a(this.entry)},n(mi,V);function mi(a,f,y){this._type=f,this._reverse=y,this._stack=a._root&&sl(a._root)}mi.prototype.next=function(){for(var a=this._type,f=this._stack;f;){var y=f.node,b=f.index++,E;if(y.entry){if(b===0)return _i(a,y.entry)}else if(y.entries){if(E=y.entries.length-1,b<=E)return _i(a,y.entries[this._reverse?E-b:b])}else if(E=y.nodes.length-1,b<=E){var R=y.nodes[this._reverse?E-b:b];if(R){if(R.entry)return _i(a,R.entry);f=this._stack=sl(R,f)}continue}f=this._stack=this._stack.__prev}return F()};function _i(a,f){return oe(a,f[0],f[1])}function sl(a,f){return{node:a,index:0,__prev:f}}function gi(a,f,y,b){var E=Object.create(Ne);return E.size=a,E._root=f,E.__ownerID=y,E.__hash=b,E.__altered=!1,E}var ol;function nr(){return ol||(ol=gi(0))}function il(a,f,y){var b,E;if(a._root){var R=M(T),A=M(O);if(b=yi(a._root,a.__ownerID,0,void 0,f,y,R,A),!A.value)return a;E=a.size+(R.value?y===N?-1:1:0)}else{if(y===N)return a;E=1,b=new os(a.__ownerID,[[f,y]])}return a.__ownerID?(a.size=E,a._root=b,a.__hash=void 0,a.__altered=!0,a):b?gi(E,b):nr()}function yi(a,f,y,b,E,R,A,L){return a?a.update(f,y,b,E,R,A,L):R===N?a:(z(L),z(A),new _r(f,b,[E,R]))}function al(a){return a.constructor===_r||a.constructor===Cn}function vi(a,f,y,b,E){if(a.keyHash===b)return new Cn(f,b,[a.entry,E]);var R=(y===0?a.keyHash:a.keyHash>>>y)&C,A=(y===0?b:b>>>y)&C,L,H=R===A?[vi(a,f,y+P,b,E)]:(L=new _r(f,b,E),R<A?[a,L]:[L,a]);return new Sn(f,1<<R|1<<A,H)}function Gg(a,f,y,b){a||(a=new D);for(var E=new _r(a,Ot(y),[y,b]),R=0;R<f.length;R++){var A=f[R];E=E.update(a,0,void 0,A[0],A[1])}return E}function Kg(a,f,y,b){for(var E=0,R=0,A=new Array(y),L=0,H=1,W=f.length;L<W;L++,H<<=1){var K=f[L];K!==void 0&&L!==b&&(E|=H,A[R++]=K)}return new Sn(a,E,A)}function Qg(a,f,y,b,E){for(var R=0,A=new Array(I),L=0;y!==0;L++,y>>>=1)A[L]=y&1?f[R++]:void 0;return A[b]=E,new is(a,R+1,A)}function Gs(a,f,y){for(var b=[],E=0;E<y.length;E++){var R=y[E],A=i(R);u(R)||(A=A.map(function(L){return Je(L)})),b.push(A)}return ul(a,f,b)}function cl(a,f,y){return a&&a.mergeDeep&&u(f)?a.mergeDeep(f):rt(a,f)?a:f}function ll(a){return function(f,y,b){if(f&&f.mergeDeepWith&&u(y))return f.mergeDeepWith(a,y);var E=a(f,y,b);return rt(f,E)?f:E}}function ul(a,f,y){return y=y.filter(function(b){return b.size!==0}),y.length===0?a:a.size===0&&!a.__ownerID&&y.length===1?a.constructor(y[0]):a.withMutations(function(b){for(var E=f?function(A,L){b.update(L,N,function(H){return H===N?A:f(H,A,L)})}:function(A,L){b.set(L,A)},R=0;R<y.length;R++)y[R].forEach(E)})}function dl(a,f,y,b){var E=a===N,R=f.next();if(R.done){var A=E?y:a,L=b(A);return L===A?a:L}Ws(E||a&&a.set,"invalid keyPath");var H=R.value,W=E?N:a.get(H,N),K=dl(W,f,y,b);return K===W?a:K===N?a.remove(H):(E?nr():a).set(H,K)}function fl(a){return a=a-(a>>1&1431655765),a=(a&858993459)+(a>>2&858993459),a=a+(a>>4)&252645135,a=a+(a>>8),a=a+(a>>16),a&127}function pl(a,f,y,b){var E=b?a:B(a);return E[f]=y,E}function Yg(a,f,y,b){var E=a.length+1;if(b&&f+1===E)return a[f]=y,a;for(var R=new Array(E),A=0,L=0;L<E;L++)L===f?(R[L]=y,A=-1):R[L]=a[L+A];return R}function Xg(a,f,y){var b=a.length-1;if(y&&f===b)return a.pop(),a;for(var E=new Array(b),R=0,A=0;A<b;A++)A===f&&(R=1),E[A]=a[A+R];return E}var Jg=I/4,Zg=I/2,ey=I/4;n(Ge,jn);function Ge(a){var f=xi();if(a==null)return f;if(hl(a))return a;var y=c(a),b=y.size;return b===0?f:(At(b),b>0&&b<I?cs(0,b,P,null,new Er(y.toArray())):f.withMutations(function(E){E.setSize(b),y.forEach(function(R,A){return E.set(A,R)})}))}Ge.of=function(){return this(arguments)},Ge.prototype.toString=function(){return this.__toString("List [","]")},Ge.prototype.get=function(a,f){if(a=J(this,a),a>=0&&a<this.size){a+=this._origin;var y=yl(this,a);return y&&y.array[a&C]}return f},Ge.prototype.set=function(a,f){return ty(this,a,f)},Ge.prototype.remove=function(a){return this.has(a)?a===0?this.shift():a===this.size-1?this.pop():this.splice(a,1):this},Ge.prototype.insert=function(a,f){return this.splice(a,0,f)},Ge.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=P,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):xi()},Ge.prototype.push=function(){var a=arguments,f=this.size;return this.withMutations(function(y){Ir(y,0,f+a.length);for(var b=0;b<a.length;b++)y.set(f+b,a[b])})},Ge.prototype.pop=function(){return Ir(this,0,-1)},Ge.prototype.unshift=function(){var a=arguments;return this.withMutations(function(f){Ir(f,-a.length);for(var y=0;y<a.length;y++)f.set(y,a[y])})},Ge.prototype.shift=function(){return Ir(this,1)},Ge.prototype.merge=function(){return Ks(this,void 0,arguments)},Ge.prototype.mergeWith=function(a){var f=r.call(arguments,1);return Ks(this,a,f)},Ge.prototype.mergeDeep=function(){return Ks(this,cl,arguments)},Ge.prototype.mergeDeepWith=function(a){var f=r.call(arguments,1);return Ks(this,ll(a),f)},Ge.prototype.setSize=function(a){return Ir(this,0,a)},Ge.prototype.slice=function(a,f){var y=this.size;return X(a,f,y)?this:Ir(this,Z(a,y),he(f,y))},Ge.prototype.__iterator=function(a,f){var y=0,b=_l(this,f);return new V(function(){var E=b();return E===as?F():oe(a,y++,E)})},Ge.prototype.__iterate=function(a,f){for(var y=0,b=_l(this,f),E;(E=b())!==as&&a(E,y++,this)!==!1;);return y},Ge.prototype.__ensureOwner=function(a){return a===this.__ownerID?this:a?cs(this._origin,this._capacity,this._level,this._root,this._tail,a,this.__hash):(this.__ownerID=a,this)};function hl(a){return!!(a&&a[ml])}Ge.isList=hl;var ml="@@__IMMUTABLE_LIST__@@",xt=Ge.prototype;xt[ml]=!0,xt[w]=xt.remove,xt.setIn=Ne.setIn,xt.deleteIn=xt.removeIn=Ne.removeIn,xt.update=Ne.update,xt.updateIn=Ne.updateIn,xt.mergeIn=Ne.mergeIn,xt.mergeDeepIn=Ne.mergeDeepIn,xt.withMutations=Ne.withMutations,xt.asMutable=Ne.asMutable,xt.asImmutable=Ne.asImmutable,xt.wasAltered=Ne.wasAltered;function Er(a,f){this.array=a,this.ownerID=f}Er.prototype.removeBefore=function(a,f,y){if(y===f?1<<f:this.array.length===0)return this;var b=y>>>f&C;if(b>=this.array.length)return new Er([],a);var E=b===0,R;if(f>0){var A=this.array[b];if(R=A&&A.removeBefore(a,f-P,y),R===A&&E)return this}if(E&&!R)return this;var L=wn(this,a);if(!E)for(var H=0;H<b;H++)L.array[H]=void 0;return R&&(L.array[b]=R),L},Er.prototype.removeAfter=function(a,f,y){if(y===(f?1<<f:0)||this.array.length===0)return this;var b=y-1>>>f&C;if(b>=this.array.length)return this;var E;if(f>0){var R=this.array[b];if(E=R&&R.removeAfter(a,f-P,y),E===R&&b===this.array.length-1)return this}var A=wn(this,a);return A.array.splice(b+1),E&&(A.array[b]=E),A};var as={};function _l(a,f){var y=a._origin,b=a._capacity,E=ls(b),R=a._tail;return A(a._root,a._level,0);function A(W,K,le){return K===0?L(W,le):H(W,K,le)}function L(W,K){var le=K===E?R&&R.array:W&&W.array,pe=K>y?0:y-K,Se=b-K;return Se>I&&(Se=I),function(){if(pe===Se)return as;var Ie=f?--Se:pe++;return le&&le[Ie]}}function H(W,K,le){var pe,Se=W&&W.array,Ie=le>y?0:y-le>>K,Qe=(b-le>>K)+1;return Qe>I&&(Qe=I),function(){do{if(pe){var Qt=pe();if(Qt!==as)return Qt;pe=null}if(Ie===Qe)return as;var ar=f?--Qe:Ie++;pe=A(Se&&Se[ar],K-P,le+(ar<<K))}while(!0)}}}function cs(a,f,y,b,E,R,A){var L=Object.create(xt);return L.size=f-a,L._origin=a,L._capacity=f,L._level=y,L._root=b,L._tail=E,L.__ownerID=R,L.__hash=A,L.__altered=!1,L}var gl;function xi(){return gl||(gl=cs(0,0,P))}function ty(a,f,y){if(f=J(a,f),f!==f)return a;if(f>=a.size||f<0)return a.withMutations(function(A){f<0?Ir(A,f).set(0,y):Ir(A,0,f+1).set(f,y)});f+=a._origin;var b=a._tail,E=a._root,R=M(O);return f>=ls(a._capacity)?b=bi(b,a.__ownerID,0,f,y,R):E=bi(E,a.__ownerID,a._level,f,y,R),R.value?a.__ownerID?(a._root=E,a._tail=b,a.__hash=void 0,a.__altered=!0,a):cs(a._origin,a._capacity,a._level,E,b):a}function bi(a,f,y,b,E,R){var A=b>>>y&C,L=a&&A<a.array.length;if(!L&&E===void 0)return a;var H;if(y>0){var W=a&&a.array[A],K=bi(W,f,y-P,b,E,R);return K===W?a:(H=wn(a,f),H.array[A]=K,H)}return L&&a.array[A]===E?a:(z(R),H=wn(a,f),E===void 0&&A===H.array.length-1?H.array.pop():H.array[A]=E,H)}function wn(a,f){return f&&a&&f===a.ownerID?a:new Er(a?a.array.slice():[],f)}function yl(a,f){if(f>=ls(a._capacity))return a._tail;if(f<1<<a._level+P){for(var y=a._root,b=a._level;y&&b>0;)y=y.array[f>>>b&C],b-=P;return y}}function Ir(a,f,y){f!==void 0&&(f=f|0),y!==void 0&&(y=y|0);var b=a.__ownerID||new D,E=a._origin,R=a._capacity,A=E+f,L=y===void 0?R:y<0?R+y:E+y;if(A===E&&L===R)return a;if(A>=L)return a.clear();for(var H=a._level,W=a._root,K=0;A+K<0;)W=new Er(W&&W.array.length?[void 0,W]:[],b),H+=P,K+=1<<H;K&&(A+=K,E+=K,L+=K,R+=K);for(var le=ls(R),pe=ls(L);pe>=1<<H+P;)W=new Er(W&&W.array.length?[W]:[],b),H+=P;var Se=a._tail,Ie=pe<le?yl(a,L-1):pe>le?new Er([],b):Se;if(Se&&pe>le&&A<R&&Se.array.length){W=wn(W,b);for(var Qe=W,Qt=H;Qt>P;Qt-=P){var ar=le>>>Qt&C;Qe=Qe.array[ar]=wn(Qe.array[ar],b)}Qe.array[le>>>P&C]=Se}if(L<R&&(Ie=Ie&&Ie.removeAfter(b,0,L)),A>=pe)A-=pe,L-=pe,H=P,W=null,Ie=Ie&&Ie.removeBefore(b,0,A);else if(A>E||pe<le){for(K=0;W;){var to=A>>>H&C;if(to!==pe>>>H&C)break;to&&(K+=(1<<H)*to),H-=P,W=W.array[to]}W&&A>E&&(W=W.removeBefore(b,H,A-K)),W&&pe<le&&(W=W.removeAfter(b,H,pe-K)),K&&(A-=K,L-=K)}return a.__ownerID?(a.size=L-A,a._origin=A,a._capacity=L,a._level=H,a._root=W,a._tail=Ie,a.__hash=void 0,a.__altered=!0,a):cs(A,L,H,W,Ie)}function Ks(a,f,y){for(var b=[],E=0,R=0;R<y.length;R++){var A=y[R],L=c(A);L.size>E&&(E=L.size),u(A)||(L=L.map(function(H){return Je(H)})),b.push(L)}return E>a.size&&(a=a.setSize(E)),ul(a,f,b)}function ls(a){return a<I?0:a-1>>>P<<P}n(nt,Fe);function nt(a){return a==null?Qs():vl(a)?a:Qs().withMutations(function(f){var y=i(a);At(y.size),y.forEach(function(b,E){return f.set(E,b)})})}nt.of=function(){return this(arguments)},nt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},nt.prototype.get=function(a,f){var y=this._map.get(a);return y!==void 0?this._list.get(y)[1]:f},nt.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Qs()},nt.prototype.set=function(a,f){return bl(this,a,f)},nt.prototype.remove=function(a){return bl(this,a,N)},nt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},nt.prototype.__iterate=function(a,f){var y=this;return this._list.__iterate(function(b){return b&&a(b[1],b[0],y)},f)},nt.prototype.__iterator=function(a,f){return this._list.fromEntrySeq().__iterator(a,f)},nt.prototype.__ensureOwner=function(a){if(a===this.__ownerID)return this;var f=this._map.__ensureOwner(a),y=this._list.__ensureOwner(a);return a?ji(f,y,a,this.__hash):(this.__ownerID=a,this._map=f,this._list=y,this)};function vl(a){return hi(a)&&_(a)}nt.isOrderedMap=vl,nt.prototype[S]=!0,nt.prototype[w]=nt.prototype.remove;function ji(a,f,y,b){var E=Object.create(nt.prototype);return E.size=a?a.size:0,E._map=a,E._list=f,E.__ownerID=y,E.__hash=b,E}var xl;function Qs(){return xl||(xl=ji(nr(),xi()))}function bl(a,f,y){var b=a._map,E=a._list,R=b.get(f),A=R!==void 0,L,H;if(y===N){if(!A)return a;E.size>=I&&E.size>=b.size*2?(H=E.filter(function(W,K){return W!==void 0&&R!==K}),L=H.toKeyedSeq().map(function(W){return W[0]}).flip().toMap(),a.__ownerID&&(L.__ownerID=H.__ownerID=a.__ownerID)):(L=b.remove(f),H=R===E.size-1?E.pop():E.set(R,void 0))}else if(A){if(y===E.get(R)[1])return a;L=b,H=E.set(R,[f,y])}else L=b.set(f,E.size),H=E.set(E.size,[f,y]);return a.__ownerID?(a.size=L.size,a._map=L,a._list=H,a.__hash=void 0,a):ji(L,H)}n(qt,ne);function qt(a,f){this._iter=a,this._useKeys=f,this.size=a.size}qt.prototype.get=function(a,f){return this._iter.get(a,f)},qt.prototype.has=function(a){return this._iter.has(a)},qt.prototype.valueSeq=function(){return this._iter.valueSeq()},qt.prototype.reverse=function(){var a=this,f=Si(this,!0);return this._useKeys||(f.valueSeq=function(){return a._iter.toSeq().reverse()}),f},qt.prototype.map=function(a,f){var y=this,b=Sl(this,a,f);return this._useKeys||(b.valueSeq=function(){return y._iter.toSeq().map(a,f)}),b},qt.prototype.__iterate=function(a,f){var y=this,b;return this._iter.__iterate(this._useKeys?function(E,R){return a(E,R,y)}:(b=f?Nl(this):0,function(E){return a(E,f?--b:b++,y)}),f)},qt.prototype.__iterator=function(a,f){if(this._useKeys)return this._iter.__iterator(a,f);var y=this._iter.__iterator(ie,f),b=f?Nl(this):0;return new V(function(){var E=y.next();return E.done?E:oe(a,f?--b:b++,E.value,E)})},qt.prototype[S]=!0,n(En,te);function En(a){this._iter=a,this.size=a.size}En.prototype.includes=function(a){return this._iter.includes(a)},En.prototype.__iterate=function(a,f){var y=this,b=0;return this._iter.__iterate(function(E){return a(E,b++,y)},f)},En.prototype.__iterator=function(a,f){var y=this._iter.__iterator(ie,f),b=0;return new V(function(){var E=y.next();return E.done?E:oe(a,b++,E.value,E)})},n(In,ke);function In(a){this._iter=a,this.size=a.size}In.prototype.has=function(a){return this._iter.includes(a)},In.prototype.__iterate=function(a,f){var y=this;return this._iter.__iterate(function(b){return a(b,b,y)},f)},In.prototype.__iterator=function(a,f){var y=this._iter.__iterator(ie,f);return new V(function(){var b=y.next();return b.done?b:oe(a,b.value,b.value,b)})},n(Pn,ne);function Pn(a){this._iter=a,this.size=a.size}Pn.prototype.entrySeq=function(){return this._iter.toSeq()},Pn.prototype.__iterate=function(a,f){var y=this;return this._iter.__iterate(function(b){if(b){Pl(b);var E=u(b);return a(E?b.get(1):b[1],E?b.get(0):b[0],y)}},f)},Pn.prototype.__iterator=function(a,f){var y=this._iter.__iterator(ie,f);return new V(function(){for(;;){var b=y.next();if(b.done)return b;var E=b.value;if(E){Pl(E);var R=u(E);return oe(a,R?E.get(0):E[0],R?E.get(1):E[1],b)}}})},En.prototype.cacheResult=qt.prototype.cacheResult=In.prototype.cacheResult=Pn.prototype.cacheResult=Ei;function jl(a){var f=sr(a);return f._iter=a,f.size=a.size,f.flip=function(){return a},f.reverse=function(){var y=a.reverse.apply(this);return y.flip=function(){return a.reverse()},y},f.has=function(y){return a.includes(y)},f.includes=function(y){return a.has(y)},f.cacheResult=Ei,f.__iterateUncached=function(y,b){var E=this;return a.__iterate(function(R,A){return y(A,R,E)!==!1},b)},f.__iteratorUncached=function(y,b){if(y===_e){var E=a.__iterator(y,b);return new V(function(){var R=E.next();if(!R.done){var A=R.value[0];R.value[0]=R.value[1],R.value[1]=A}return R})}return a.__iterator(y===ie?ee:ie,b)},f}function Sl(a,f,y){var b=sr(a);return b.size=a.size,b.has=function(E){return a.has(E)},b.get=function(E,R){var A=a.get(E,N);return A===N?R:f.call(y,A,E,a)},b.__iterateUncached=function(E,R){var A=this;return a.__iterate(function(L,H,W){return E(f.call(y,L,H,W),H,A)!==!1},R)},b.__iteratorUncached=function(E,R){var A=a.__iterator(_e,R);return new V(function(){var L=A.next();if(L.done)return L;var H=L.value,W=H[0];return oe(E,W,f.call(y,H[1],W,a),L)})},b}function Si(a,f){var y=sr(a);return y._iter=a,y.size=a.size,y.reverse=function(){return a},a.flip&&(y.flip=function(){var b=jl(a);return b.reverse=function(){return a.flip()},b}),y.get=function(b,E){return a.get(f?b:-1-b,E)},y.has=function(b){return a.has(f?b:-1-b)},y.includes=function(b){return a.includes(b)},y.cacheResult=Ei,y.__iterate=function(b,E){var R=this;return a.__iterate(function(A,L){return b(A,L,R)},!E)},y.__iterator=function(b,E){return a.__iterator(b,!E)},y}function Cl(a,f,y,b){var E=sr(a);return b&&(E.has=function(R){var A=a.get(R,N);return A!==N&&!!f.call(y,A,R,a)},E.get=function(R,A){var L=a.get(R,N);return L!==N&&f.call(y,L,R,a)?L:A}),E.__iterateUncached=function(R,A){var L=this,H=0;return a.__iterate(function(W,K,le){if(f.call(y,W,K,le))return H++,R(W,b?K:H-1,L)},A),H},E.__iteratorUncached=function(R,A){var L=a.__iterator(_e,A),H=0;return new V(function(){for(;;){var W=L.next();if(W.done)return W;var K=W.value,le=K[0],pe=K[1];if(f.call(y,pe,le,a))return oe(R,b?le:H++,pe,W)}})},E}function ry(a,f,y){var b=Fe().asMutable();return a.__iterate(function(E,R){b.update(f.call(y,E,R,a),0,function(A){return A+1})}),b.asImmutable()}function ny(a,f,y){var b=d(a),E=(_(a)?nt():Fe()).asMutable();a.__iterate(function(A,L){E.update(f.call(y,A,L,a),function(H){return H=H||[],H.push(b?[L,A]:A),H})});var R=Rl(a);return E.map(function(A){return Ve(a,R(A))})}function Ci(a,f,y,b){var E=a.size;if(f!==void 0&&(f=f|0),y!==void 0&&(y=y|0),X(f,y,E))return a;var R=Z(f,E),A=he(y,E);if(R!==R||A!==A)return Ci(a.toSeq().cacheResult(),f,y,b);var L=A-R,H;L===L&&(H=L<0?0:L);var W=sr(a);return W.size=H===0?H:a.size&&H||void 0,!b&&re(a)&&H>=0&&(W.get=function(K,le){return K=J(this,K),K>=0&&K<H?a.get(K+R,le):le}),W.__iterateUncached=function(K,le){var pe=this;if(H===0)return 0;if(le)return this.cacheResult().__iterate(K,le);var Se=0,Ie=!0,Qe=0;return a.__iterate(function(Qt,ar){if(!(Ie&&(Ie=Se++<R)))return Qe++,K(Qt,b?ar:Qe-1,pe)!==!1&&Qe!==H}),Qe},W.__iteratorUncached=function(K,le){if(H!==0&&le)return this.cacheResult().__iterator(K,le);var pe=H!==0&&a.__iterator(K,le),Se=0,Ie=0;return new V(function(){for(;Se++<R;)pe.next();if(++Ie>H)return F();var Qe=pe.next();return b||K===ie?Qe:K===ee?oe(K,Ie-1,void 0,Qe):oe(K,Ie-1,Qe.value[1],Qe)})},W}function sy(a,f,y){var b=sr(a);return b.__iterateUncached=function(E,R){var A=this;if(R)return this.cacheResult().__iterate(E,R);var L=0;return a.__iterate(function(H,W,K){return f.call(y,H,W,K)&&++L&&E(H,W,A)}),L},b.__iteratorUncached=function(E,R){var A=this;if(R)return this.cacheResult().__iterator(E,R);var L=a.__iterator(_e,R),H=!0;return new V(function(){if(!H)return F();var W=L.next();if(W.done)return W;var K=W.value,le=K[0],pe=K[1];return f.call(y,pe,le,A)?E===_e?W:oe(E,le,pe,W):(H=!1,F())})},b}function wl(a,f,y,b){var E=sr(a);return E.__iterateUncached=function(R,A){var L=this;if(A)return this.cacheResult().__iterate(R,A);var H=!0,W=0;return a.__iterate(function(K,le,pe){if(!(H&&(H=f.call(y,K,le,pe))))return W++,R(K,b?le:W-1,L)}),W},E.__iteratorUncached=function(R,A){var L=this;if(A)return this.cacheResult().__iterator(R,A);var H=a.__iterator(_e,A),W=!0,K=0;return new V(function(){var le,pe,Se;do{if(le=H.next(),le.done)return b||R===ie?le:R===ee?oe(R,K++,void 0,le):oe(R,K++,le.value[1],le);var Ie=le.value;pe=Ie[0],Se=Ie[1],W&&(W=f.call(y,Se,pe,L))}while(W);return R===_e?le:oe(R,pe,Se,le)})},E}function oy(a,f){var y=d(a),b=[a].concat(f).map(function(A){return u(A)?y&&(A=i(A)):A=y?ae(A):de(Array.isArray(A)?A:[A]),A}).filter(function(A){return A.size!==0});if(b.length===0)return a;if(b.length===1){var E=b[0];if(E===a||y&&d(E)||h(a)&&h(E))return E}var R=new Me(b);return y?R=R.toKeyedSeq():h(a)||(R=R.toSetSeq()),R=R.flatten(!0),R.size=b.reduce(function(A,L){if(A!==void 0){var H=L.size;if(H!==void 0)return A+H}},0),R}function El(a,f,y){var b=sr(a);return b.__iterateUncached=function(E,R){var A=0,L=!1;function H(W,K){var le=this;W.__iterate(function(pe,Se){return(!f||K<f)&&u(pe)?H(pe,K+1):E(pe,y?Se:A++,le)===!1&&(L=!0),!L},R)}return H(a,0),A},b.__iteratorUncached=function(E,R){var A=a.__iterator(E,R),L=[],H=0;return new V(function(){for(;A;){var W=A.next();if(W.done!==!1){A=L.pop();continue}var K=W.value;if(E===_e&&(K=K[1]),(!f||L.length<f)&&u(K))L.push(A),A=K.__iterator(E,R);else return y?W:oe(E,H++,K,W)}return F()})},b}function iy(a,f,y){var b=Rl(a);return a.toSeq().map(function(E,R){return b(f.call(y,E,R,a))}).flatten(!0)}function ay(a,f){var y=sr(a);return y.size=a.size&&a.size*2-1,y.__iterateUncached=function(b,E){var R=this,A=0;return a.__iterate(function(L,H){return(!A||b(f,A++,R)!==!1)&&b(L,A++,R)!==!1},E),A},y.__iteratorUncached=function(b,E){var R=a.__iterator(ie,E),A=0,L;return new V(function(){return(!L||A%2)&&(L=R.next(),L.done)?L:A%2?oe(b,A++,f):oe(b,A++,L.value,L)})},y}function Nn(a,f,y){f||(f=Tl);var b=d(a),E=0,R=a.toSeq().map(function(A,L){return[L,A,E++,y?y(A,L,a):A]}).toArray();return R.sort(function(A,L){return f(A[3],L[3])||A[2]-L[2]}).forEach(b?function(A,L){R[L].length=2}:function(A,L){R[L]=A[1]}),b?ne(R):h(a)?te(R):ke(R)}function Ys(a,f,y){if(f||(f=Tl),y){var b=a.toSeq().map(function(E,R){return[E,y(E,R,a)]}).reduce(function(E,R){return Il(f,E[1],R[1])?R:E});return b&&b[0]}else return a.reduce(function(E,R){return Il(f,E,R)?R:E})}function Il(a,f,y){var b=a(y,f);return b===0&&y!==f&&(y==null||y!==y)||b>0}function wi(a,f,y){var b=sr(a);return b.size=new Me(y).map(function(E){return E.size}).min(),b.__iterate=function(E,R){for(var A=this.__iterator(ie,R),L,H=0;!(L=A.next()).done&&E(L.value,H++,this)!==!1;);return H},b.__iteratorUncached=function(E,R){var A=y.map(function(W){return W=o(W),Oe(R?W.reverse():W)}),L=0,H=!1;return new V(function(){var W;return H||(W=A.map(function(K){return K.next()}),H=W.some(function(K){return K.done})),H?F():oe(E,L++,f.apply(null,W.map(function(K){return K.value})))})},b}function Ve(a,f){return re(a)?f:a.constructor(f)}function Pl(a){if(a!==Object(a))throw new TypeError("Expected [K, V] tuple: "+a)}function Nl(a){return At(a.size),G(a)}function Rl(a){return d(a)?i:h(a)?c:l}function sr(a){return Object.create((d(a)?ne:h(a)?te:ke).prototype)}function Ei(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Pe.prototype.cacheResult.call(this)}function Tl(a,f){return a>f?1:a<f?-1:0}function Ol(a){var f=Oe(a);if(!f){if(!$(a))throw new TypeError("Expected iterable or array-like: "+a);f=Oe(o(a))}return f}n(kt,ns);function kt(a,f){var y,b=function(A){if(A instanceof b)return A;if(!(this instanceof b))return new b(A);if(!y){y=!0;var L=Object.keys(a);cy(E,L),E.size=L.length,E._name=f,E._keys=L,E._defaultValues=a}this._map=Fe(A)},E=b.prototype=Object.create(pt);return E.constructor=b,b}kt.prototype.toString=function(){return this.__toString(Al(this)+" {","}")},kt.prototype.has=function(a){return this._defaultValues.hasOwnProperty(a)},kt.prototype.get=function(a,f){if(!this.has(a))return f;var y=this._defaultValues[a];return this._map?this._map.get(a,y):y},kt.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var a=this.constructor;return a._empty||(a._empty=Xs(this,nr()))},kt.prototype.set=function(a,f){if(!this.has(a))throw new Error('Cannot set unknown key "'+a+'" on '+Al(this));var y=this._map&&this._map.set(a,f);return this.__ownerID||y===this._map?this:Xs(this,y)},kt.prototype.remove=function(a){if(!this.has(a))return this;var f=this._map&&this._map.remove(a);return this.__ownerID||f===this._map?this:Xs(this,f)},kt.prototype.wasAltered=function(){return this._map.wasAltered()},kt.prototype.__iterator=function(a,f){var y=this;return i(this._defaultValues).map(function(b,E){return y.get(E)}).__iterator(a,f)},kt.prototype.__iterate=function(a,f){var y=this;return i(this._defaultValues).map(function(b,E){return y.get(E)}).__iterate(a,f)},kt.prototype.__ensureOwner=function(a){if(a===this.__ownerID)return this;var f=this._map&&this._map.__ensureOwner(a);return a?Xs(this,f,a):(this.__ownerID=a,this._map=f,this)};var pt=kt.prototype;pt[w]=pt.remove,pt.deleteIn=pt.removeIn=Ne.removeIn,pt.merge=Ne.merge,pt.mergeWith=Ne.mergeWith,pt.mergeIn=Ne.mergeIn,pt.mergeDeep=Ne.mergeDeep,pt.mergeDeepWith=Ne.mergeDeepWith,pt.mergeDeepIn=Ne.mergeDeepIn,pt.setIn=Ne.setIn,pt.update=Ne.update,pt.updateIn=Ne.updateIn,pt.withMutations=Ne.withMutations,pt.asMutable=Ne.asMutable,pt.asImmutable=Ne.asImmutable;function Xs(a,f,y){var b=Object.create(Object.getPrototypeOf(a));return b._map=f,b.__ownerID=y,b}function Al(a){return a._name||a.constructor.name||"Record"}function cy(a,f){try{f.forEach(ly.bind(void 0,a))}catch{}}function ly(a,f){Object.defineProperty(a,f,{get:function(){return this.get(f)},set:function(y){Ws(this.__ownerID,"Cannot set on an immutable record."),this.set(f,y)}})}n(Ke,Vs);function Ke(a){return a==null?Ni():Ii(a)&&!_(a)?a:Ni().withMutations(function(f){var y=l(a);At(y.size),y.forEach(function(b){return f.add(b)})})}Ke.of=function(){return this(arguments)},Ke.fromKeys=function(a){return this(i(a).keySeq())},Ke.prototype.toString=function(){return this.__toString("Set {","}")},Ke.prototype.has=function(a){return this._map.has(a)},Ke.prototype.add=function(a){return Pi(this,this._map.set(a,!0))},Ke.prototype.remove=function(a){return Pi(this,this._map.remove(a))},Ke.prototype.clear=function(){return Pi(this,this._map.clear())},Ke.prototype.union=function(){var a=r.call(arguments,0);return a=a.filter(function(f){return f.size!==0}),a.length===0?this:this.size===0&&!this.__ownerID&&a.length===1?this.constructor(a[0]):this.withMutations(function(f){for(var y=0;y<a.length;y++)l(a[y]).forEach(function(b){return f.add(b)})})},Ke.prototype.intersect=function(){var a=r.call(arguments,0);if(a.length===0)return this;a=a.map(function(y){return l(y)});var f=this;return this.withMutations(function(y){f.forEach(function(b){a.every(function(E){return E.includes(b)})||y.remove(b)})})},Ke.prototype.subtract=function(){var a=r.call(arguments,0);if(a.length===0)return this;a=a.map(function(y){return l(y)});var f=this;return this.withMutations(function(y){f.forEach(function(b){a.some(function(E){return E.includes(b)})&&y.remove(b)})})},Ke.prototype.merge=function(){return this.union.apply(this,arguments)},Ke.prototype.mergeWith=function(a){var f=r.call(arguments,1);return this.union.apply(this,f)},Ke.prototype.sort=function(a){return or(Nn(this,a))},Ke.prototype.sortBy=function(a,f){return or(Nn(this,f,a))},Ke.prototype.wasAltered=function(){return this._map.wasAltered()},Ke.prototype.__iterate=function(a,f){var y=this;return this._map.__iterate(function(b,E){return a(E,E,y)},f)},Ke.prototype.__iterator=function(a,f){return this._map.map(function(y,b){return b}).__iterator(a,f)},Ke.prototype.__ensureOwner=function(a){if(a===this.__ownerID)return this;var f=this._map.__ensureOwner(a);return a?this.__make(f,a):(this.__ownerID=a,this._map=f,this)};function Ii(a){return!!(a&&a[kl])}Ke.isSet=Ii;var kl="@@__IMMUTABLE_SET__@@",Mt=Ke.prototype;Mt[kl]=!0,Mt[w]=Mt.remove,Mt.mergeDeep=Mt.merge,Mt.mergeDeepWith=Mt.mergeWith,Mt.withMutations=Ne.withMutations,Mt.asMutable=Ne.asMutable,Mt.asImmutable=Ne.asImmutable,Mt.__empty=Ni,Mt.__make=Ml;function Pi(a,f){return a.__ownerID?(a.size=f.size,a._map=f,a):f===a._map?a:f.size===0?a.__empty():a.__make(f)}function Ml(a,f){var y=Object.create(Mt);return y.size=a?a.size:0,y._map=a,y.__ownerID=f,y}var Ll;function Ni(){return Ll||(Ll=Ml(nr()))}n(or,Ke);function or(a){return a==null?Ri():Dl(a)?a:Ri().withMutations(function(f){var y=l(a);At(y.size),y.forEach(function(b){return f.add(b)})})}or.of=function(){return this(arguments)},or.fromKeys=function(a){return this(i(a).keySeq())},or.prototype.toString=function(){return this.__toString("OrderedSet {","}")};function Dl(a){return Ii(a)&&_(a)}or.isOrderedSet=Dl;var Js=or.prototype;Js[S]=!0,Js.__empty=Ri,Js.__make=Fl;function Fl(a,f){var y=Object.create(Js);return y.size=a?a.size:0,y._map=a,y.__ownerID=f,y}var zl;function Ri(){return zl||(zl=Fl(Qs()))}n(lt,jn);function lt(a){return a==null?Ti():ql(a)?a:Ti().unshiftAll(a)}lt.of=function(){return this(arguments)},lt.prototype.toString=function(){return this.__toString("Stack [","]")},lt.prototype.get=function(a,f){var y=this._head;for(a=J(this,a);y&&a--;)y=y.next;return y?y.value:f},lt.prototype.peek=function(){return this._head&&this._head.value},lt.prototype.push=function(){if(arguments.length===0)return this;for(var a=this.size+arguments.length,f=this._head,y=arguments.length-1;y>=0;y--)f={value:arguments[y],next:f};return this.__ownerID?(this.size=a,this._head=f,this.__hash=void 0,this.__altered=!0,this):us(a,f)},lt.prototype.pushAll=function(a){if(a=c(a),a.size===0)return this;At(a.size);var f=this.size,y=this._head;return a.reverse().forEach(function(b){f++,y={value:b,next:y}}),this.__ownerID?(this.size=f,this._head=y,this.__hash=void 0,this.__altered=!0,this):us(f,y)},lt.prototype.pop=function(){return this.slice(1)},lt.prototype.unshift=function(){return this.push.apply(this,arguments)},lt.prototype.unshiftAll=function(a){return this.pushAll(a)},lt.prototype.shift=function(){return this.pop.apply(this,arguments)},lt.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Ti()},lt.prototype.slice=function(a,f){if(X(a,f,this.size))return this;var y=Z(a,this.size),b=he(f,this.size);if(b!==this.size)return jn.prototype.slice.call(this,a,f);for(var E=this.size-y,R=this._head;y--;)R=R.next;return this.__ownerID?(this.size=E,this._head=R,this.__hash=void 0,this.__altered=!0,this):us(E,R)},lt.prototype.__ensureOwner=function(a){return a===this.__ownerID?this:a?us(this.size,this._head,a,this.__hash):(this.__ownerID=a,this.__altered=!1,this)},lt.prototype.__iterate=function(a,f){if(f)return this.reverse().__iterate(a);for(var y=0,b=this._head;b&&a(b.value,y++,this)!==!1;)b=b.next;return y},lt.prototype.__iterator=function(a,f){if(f)return this.reverse().__iterator(a);var y=0,b=this._head;return new V(function(){if(b){var E=b.value;return b=b.next,oe(a,y++,E)}return F()})};function ql(a){return!!(a&&a[Bl])}lt.isStack=ql;var Bl="@@__IMMUTABLE_STACK__@@",Rn=lt.prototype;Rn[Bl]=!0,Rn.withMutations=Ne.withMutations,Rn.asMutable=Ne.asMutable,Rn.asImmutable=Ne.asImmutable,Rn.wasAltered=Ne.wasAltered;function us(a,f,y,b){var E=Object.create(Rn);return E.size=a,E._head=f,E.__ownerID=y,E.__hash=b,E.__altered=!1,E}var Ul;function Ti(){return Ul||(Ul=us(0))}function ir(a,f){var y=function(b){a.prototype[b]=f[b]};return Object.keys(f).forEach(y),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(f).forEach(y),a}o.Iterator=V,ir(o,{toArray:function(){At(this.size);var a=new Array(this.size||0);return this.valueSeq().__iterate(function(f,y){a[y]=f}),a},toIndexedSeq:function(){return new En(this)},toJS:function(){return this.toSeq().map(function(a){return a&&typeof a.toJS=="function"?a.toJS():a}).__toJS()},toJSON:function(){return this.toSeq().map(function(a){return a&&typeof a.toJSON=="function"?a.toJSON():a}).__toJS()},toKeyedSeq:function(){return new qt(this,!0)},toMap:function(){return Fe(this.toKeyedSeq())},toObject:function(){At(this.size);var a={};return this.__iterate(function(f,y){a[y]=f}),a},toOrderedMap:function(){return nt(this.toKeyedSeq())},toOrderedSet:function(){return or(d(this)?this.valueSeq():this)},toSet:function(){return Ke(d(this)?this.valueSeq():this)},toSetSeq:function(){return new In(this)},toSeq:function(){return h(this)?this.toIndexedSeq():d(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return lt(d(this)?this.valueSeq():this)},toList:function(){return Ge(d(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(a,f){return this.size===0?a+f:a+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+f},concat:function(){var a=r.call(arguments,0);return Ve(this,oy(this,a))},includes:function(a){return this.some(function(f){return rt(f,a)})},entries:function(){return this.__iterator(_e)},every:function(a,f){At(this.size);var y=!0;return this.__iterate(function(b,E,R){if(!a.call(f,b,E,R))return y=!1,!1}),y},filter:function(a,f){return Ve(this,Cl(this,a,f,!0))},find:function(a,f,y){var b=this.findEntry(a,f);return b?b[1]:y},findEntry:function(a,f){var y;return this.__iterate(function(b,E,R){if(a.call(f,b,E,R))return y=[E,b],!1}),y},findLastEntry:function(a,f){return this.toSeq().reverse().findEntry(a,f)},forEach:function(a,f){return At(this.size),this.__iterate(f?a.bind(f):a)},join:function(a){At(this.size),a=a!==void 0?""+a:",";var f="",y=!0;return this.__iterate(function(b){y?y=!1:f+=a,f+=b!=null?b.toString():""}),f},keys:function(){return this.__iterator(ee)},map:function(a,f){return Ve(this,Sl(this,a,f))},reduce:function(a,f,y){At(this.size);var b,E;return arguments.length<2?E=!0:b=f,this.__iterate(function(R,A,L){E?(E=!1,b=R):b=a.call(y,b,R,A,L)}),b},reduceRight:function(a,f,y){var b=this.toKeyedSeq().reverse();return b.reduce.apply(b,arguments)},reverse:function(){return Ve(this,Si(this,!0))},slice:function(a,f){return Ve(this,Ci(this,a,f,!0))},some:function(a,f){return!this.every(eo(a),f)},sort:function(a){return Ve(this,Nn(this,a))},values:function(){return this.__iterator(ie)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return this.size!==void 0?this.size===0:!this.some(function(){return!0})},count:function(a,f){return G(a?this.toSeq().filter(a,f):this)},countBy:function(a,f){return ry(this,a,f)},equals:function(a){return si(this,a)},entrySeq:function(){var a=this;if(a._cache)return new Me(a._cache);var f=a.toSeq().map(dy).toIndexedSeq();return f.fromEntrySeq=function(){return a.toSeq()},f},filterNot:function(a,f){return this.filter(eo(a),f)},findLast:function(a,f,y){return this.toKeyedSeq().reverse().find(a,f,y)},first:function(){return this.find(Y)},flatMap:function(a,f){return Ve(this,iy(this,a,f))},flatten:function(a){return Ve(this,El(this,a,!0))},fromEntrySeq:function(){return new Pn(this)},get:function(a,f){return this.find(function(y,b){return rt(b,a)},void 0,f)},getIn:function(a,f){for(var y=this,b=Ol(a),E;!(E=b.next()).done;){var R=E.value;if(y=y&&y.get?y.get(R,N):N,y===N)return f}return y},groupBy:function(a,f){return ny(this,a,f)},has:function(a){return this.get(a,N)!==N},hasIn:function(a){return this.getIn(a,N)!==N},isSubset:function(a){return a=typeof a.includes=="function"?a:o(a),this.every(function(f){return a.includes(f)})},isSuperset:function(a){return a=typeof a.isSubset=="function"?a:o(a),a.isSubset(this)},keySeq:function(){return this.toSeq().map(uy).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(a){return Ys(this,a)},maxBy:function(a,f){return Ys(this,f,a)},min:function(a){return Ys(this,a?Hl(a):Wl)},minBy:function(a,f){return Ys(this,f?Hl(f):Wl,a)},rest:function(){return this.slice(1)},skip:function(a){return this.slice(Math.max(0,a))},skipLast:function(a){return Ve(this,this.toSeq().reverse().skip(a).reverse())},skipWhile:function(a,f){return Ve(this,wl(this,a,f,!0))},skipUntil:function(a,f){return this.skipWhile(eo(a),f)},sortBy:function(a,f){return Ve(this,Nn(this,f,a))},take:function(a){return this.slice(0,Math.max(0,a))},takeLast:function(a){return Ve(this,this.toSeq().reverse().take(a).reverse())},takeWhile:function(a,f){return Ve(this,sy(this,a,f))},takeUntil:function(a,f){return this.takeWhile(eo(a),f)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=py(this))}});var yt=o.prototype;yt[g]=!0,yt[we]=yt.values,yt.__toJS=yt.toArray,yt.__toStringMapper=$l,yt.inspect=yt.toSource=function(){return this.toString()},yt.chain=yt.flatMap,yt.contains=yt.includes,function(){try{Object.defineProperty(yt,"length",{get:function(){if(!o.noLengthWarning){var a;try{throw new Error}catch(f){a=f.stack}if(a.indexOf("_wrapObject")===-1)return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+a),this.size}}})}catch{}}(),ir(i,{flip:function(){return Ve(this,jl(this))},findKey:function(a,f){var y=this.findEntry(a,f);return y&&y[0]},findLastKey:function(a,f){return this.toSeq().reverse().findKey(a,f)},keyOf:function(a){return this.findKey(function(f){return rt(f,a)})},lastKeyOf:function(a){return this.findLastKey(function(f){return rt(f,a)})},mapEntries:function(a,f){var y=this,b=0;return Ve(this,this.toSeq().map(function(E,R){return a.call(f,[R,E],b++,y)}).fromEntrySeq())},mapKeys:function(a,f){var y=this;return Ve(this,this.toSeq().flip().map(function(b,E){return a.call(f,b,E,y)}).flip())}});var Zs=i.prototype;Zs[v]=!0,Zs[we]=yt.entries,Zs.__toJS=yt.toObject,Zs.__toStringMapper=function(a,f){return JSON.stringify(f)+": "+$l(a)},ir(c,{toKeyedSeq:function(){return new qt(this,!1)},filter:function(a,f){return Ve(this,Cl(this,a,f,!1))},findIndex:function(a,f){var y=this.findEntry(a,f);return y?y[0]:-1},indexOf:function(a){var f=this.toKeyedSeq().keyOf(a);return f===void 0?-1:f},lastIndexOf:function(a){var f=this.toKeyedSeq().reverse().keyOf(a);return f===void 0?-1:f},reverse:function(){return Ve(this,Si(this,!1))},slice:function(a,f){return Ve(this,Ci(this,a,f,!1))},splice:function(a,f){var y=arguments.length;if(f=Math.max(f|0,0),y===0||y===2&&!f)return this;a=Z(a,a<0?this.count():this.size);var b=this.slice(0,a);return Ve(this,y===1?b:b.concat(B(arguments,2),this.slice(a+f)))},findLastIndex:function(a,f){var y=this.toKeyedSeq().findLastKey(a,f);return y===void 0?-1:y},first:function(){return this.get(0)},flatten:function(a){return Ve(this,El(this,a,!1))},get:function(a,f){return a=J(this,a),a<0||this.size===1/0||this.size!==void 0&&a>this.size?f:this.find(function(y,b){return b===a},void 0,f)},has:function(a){return a=J(this,a),a>=0&&(this.size!==void 0?this.size===1/0||a<this.size:this.indexOf(a)!==-1)},interpose:function(a){return Ve(this,ay(this,a))},interleave:function(){var a=[this].concat(B(arguments)),f=wi(this.toSeq(),te.of,a),y=f.flatten(!0);return f.size&&(y.size=f.size*a.length),Ve(this,y)},last:function(){return this.get(-1)},skipWhile:function(a,f){return Ve(this,wl(this,a,f,!1))},zip:function(){var a=[this].concat(B(arguments));return Ve(this,wi(this,fy,a))},zipWith:function(a){var f=B(arguments);return f[0]=this,Ve(this,wi(this,a,f))}}),c.prototype[x]=!0,c.prototype[S]=!0,ir(l,{get:function(a,f){return this.has(a)?a:f},includes:function(a){return this.has(a)},keySeq:function(){return this.valueSeq()}}),l.prototype.has=yt.includes,ir(ne,i.prototype),ir(te,c.prototype),ir(ke,l.prototype),ir(ns,i.prototype),ir(jn,c.prototype),ir(Vs,l.prototype);function uy(a,f){return f}function dy(a,f){return[f,a]}function eo(a){return function(){return!a.apply(this,arguments)}}function Hl(a){return function(){return-a.apply(this,arguments)}}function $l(a){return typeof a=="string"?JSON.stringify(a):a}function fy(){return B(arguments)}function Wl(a,f){return a<f?1:a>f?-1:0}function py(a){if(a.size===1/0)return 0;var f=_(a),y=d(a),b=f?1:0,E=a.__iterate(y?f?function(R,A){b=31*b+Vl(Ot(R),Ot(A))|0}:function(R,A){b=b+Vl(Ot(R),Ot(A))|0}:f?function(R){b=31*b+Ot(R)|0}:function(R){b=b+Ot(R)|0});return hy(E,b)}function hy(a,f){return f=ss(f,3432918353),f=ss(f<<15|f>>>-15,461845907),f=ss(f<<13|f>>>-13,5),f=(f+3864292196|0)^a,f=ss(f^f>>>16,2246822507),f=ss(f^f>>>13,3266489909),f=ai(f^f>>>16),f}function Vl(a,f){return a^f+2654435769+(a<<6)+(a>>2)|0}var my={Iterable:o,Seq:Pe,Collection:wr,Map:Fe,OrderedMap:nt,List:Ge,Stack:lt,Set:Ke,OrderedSet:or,Record:kt,Range:gt,Repeat:_t,is:rt,fromJS:Je};return my})})(b_);var j_=b_.exports,fa=new j_.OrderedSet;function AC(e,t){for(var r=null,n=null,o=[],i=0,c=0,l=e.length;c<l;c++){n=r;var u=t.get(c);r=u?u.getEntity():null,c>0&&r!==n&&(o.push([n,ad(e.slice(i,c),t.slice(i,c))]),i=c)}return o.push([r,ad(e.slice(i),t.slice(i))]),o}function ad(e,t){for(var r=fa,n=fa,o=[],i=0,c=0,l=e.length;c<l;c++){n=r;var u=t.get(c);r=u?u.getStyle():fa,c>0&&!j_.is(r,n)&&(o.push([e.slice(i,c),n]),i=c)}return o.push([e.slice(i),r]),o}var Kr,jo,So;function cd(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(e)),t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r}function Co(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cd(r,!0).forEach(function(n){ot(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cd(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pa(e,t){return LC(e)||MC(e,t)||kC()}function kC(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function MC(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var c=e[Symbol.iterator](),l;!(n=(l=c.next()).done)&&(r.push(l.value),!(t&&r.length===t));n=!0);}catch(u){o=!0,i=u}finally{try{!n&&c.return!=null&&c.return()}finally{if(o)throw i}}return r}function LC(e){if(Array.isArray(e))return e}function DC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function zC(e,t,r){return t&&FC(e.prototype,t),e}function ot(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var S_=Bs.BOLD,Kc=Bs.CODE,C_=Bs.ITALIC,w_=Bs.STRIKETHROUGH,E_=Bs.UNDERLINE,qC=" ",I_="<br>",ld=/^data-([a-z0-9-]+)$/,BC=(Kr={},ot(Kr,S_,{element:"strong"}),ot(Kr,Kc,{element:"code"}),ot(Kr,C_,{element:"em"}),ot(Kr,w_,{element:"del"}),ot(Kr,E_,{element:"u"}),Kr),UC=[S_,C_,E_,w_,Kc],wo=(jo={},ot(jo,Zn.LINK,{url:"href",href:"href",rel:"rel",target:"target",title:"title",className:"class"}),ot(jo,Zn.IMAGE,{src:"src",height:"height",width:"width",alt:"alt",className:"class"}),jo),Eo=(So={},ot(So,Zn.LINK,function(e,t){for(var r=wo.hasOwnProperty(e)?wo[e]:{},n=t.getData(),o={},i=0,c=Object.keys(n);i<c.length;i++){var l=c[i],u=n[l];if(r.hasOwnProperty(l)){var d=r[l];o[d]=u}else ld.test(l)&&(o[l]=u)}return o}),ot(So,Zn.IMAGE,function(e,t){for(var r=wo.hasOwnProperty(e)?wo[e]:{},n=t.getData(),o={},i=0,c=Object.keys(n);i<c.length;i++){var l=c[i],u=n[l];if(r.hasOwnProperty(l)){var d=r[l];o[d]=u}else ld.test(l)&&(o[l]=u)}return o}),So);function ud(e,t){switch(e){case vt.HEADER_ONE:return["h1"];case vt.HEADER_TWO:return["h2"];case vt.HEADER_THREE:return["h3"];case vt.HEADER_FOUR:return["h4"];case vt.HEADER_FIVE:return["h5"];case vt.HEADER_SIX:return["h6"];case vt.UNORDERED_LIST_ITEM:case vt.ORDERED_LIST_ITEM:return["li"];case vt.BLOCKQUOTE:return["blockquote"];case vt.CODE:return["pre","code"];case vt.ATOMIC:return["figure"];default:return t===null?[]:[t||"p"]}}function HC(e){switch(e){case vt.UNORDERED_LIST_ITEM:return"ul";case vt.ORDERED_LIST_ITEM:return"ol";default:return null}}var $C=function(){function e(t,r){DC(this,e),ot(this,"blocks",void 0),ot(this,"contentState",void 0),ot(this,"currentBlock",void 0),ot(this,"indentLevel",void 0),ot(this,"output",void 0),ot(this,"totalBlocks",void 0),ot(this,"wrapperTag",void 0),ot(this,"options",void 0),ot(this,"inlineStyles",void 0),ot(this,"inlineStyleFn",void 0),ot(this,"styleOrder",void 0),r==null&&(r={}),this.contentState=t,this.options=r;var n=EC(r.inlineStyles,[BC,UC]),o=pa(n,2),i=o[0],c=o[1];this.inlineStyles=i,this.inlineStyleFn=r.inlineStyleFn,this.styleOrder=c}return zC(e,[{key:"generate",value:function(){for(this.output=[],this.blocks=this.contentState.getBlocksAsArray(),this.totalBlocks=this.blocks.length,this.currentBlock=0,this.indentLevel=0,this.wrapperTag=null;this.currentBlock<this.totalBlocks;)this.processBlock();return this.closeWrapperTag(),this.output.join("").trim()}},{key:"processBlock",value:function(){var r=this.options,n=r.blockRenderers,o=r.defaultBlockTag,i=this.blocks[this.currentBlock],c=i.getType(),l=HC(c);this.wrapperTag!==l&&(this.wrapperTag&&this.closeWrapperTag(),l&&this.openWrapperTag(l)),this.indent();var u=n!=null&&n.hasOwnProperty(c)?n[c]:null,d=u?u(i):null;if(d!=null){this.output.push(d),this.output.push(`
|
|
19
|
-
`),this.currentBlock+=1;return}this.writeStartTag(i,o),this.output.push(this.renderBlockContent(i));var h=this.getNextBlock();if(
|
|
20
|
-
`);var m=this.wrapperTag;this.wrapperTag=null,this.indentLevel+=1,this.currentBlock+=1,this.processBlocksAtDepth(h.getDepth()),this.wrapperTag=m,this.indentLevel-=1,this.indent()}else this.currentBlock+=1;this.writeEndTag(i,o)}},{key:"processBlocksAtDepth",value:function(r){for(var n=this.blocks[this.currentBlock];n&&n.getDepth()===r;)this.processBlock(),n=this.blocks[this.currentBlock];this.closeWrapperTag()}},{key:"getNextBlock",value:function(){return this.blocks[this.currentBlock+1]}},{key:"writeStartTag",value:function(r,n){var o=
|
|
16
|
+
See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component`);return c.default.cloneElement(T,{key:M})})}function w(I){let{children:C}=I;const N=(0,c.useContext)(u.AmpStateContext),T=(0,c.useContext)(d.HeadManagerContext);return(0,i.jsx)(l.default,{reduceComponentsToState:S,headManager:T,inAmpMode:(0,h.isInAmpMode)(N),children:C})}const P=w;(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)}(go,go.exports)),go.exports}var oa={},Xu;function $j(){return Xu||(Xu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ImageConfigContext",{enumerable:!0,get:function(){return o}});const r=Ct._(j),n=Zo,o=r.default.createContext(n.imageConfigDefault);process.env.NODE_ENV!=="production"&&(o.displayName="ImageConfigContext")}(oa)),oa}var ia={},aa={},ca={exports:{}},Ju;function Vm(){return Ju||(Ju=1,(()=>{var e={170:(o,i,c)=>{const l=c(510),u=()=>{if(typeof navigator<"u"&&navigator.platform){const h=navigator.platform.toLowerCase();return h==="win32"||h==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};function d(h,m,_=!1){return m&&(m.windows===null||m.windows===void 0)&&(m={...m,windows:u()}),l(h,m,_)}Object.assign(d,l),o.exports=d},154:o=>{const i="\\\\/",c=`[^${i}]`,l="\\.",u="\\+",d="\\?",h="\\/",m="(?=.)",_="[^/]",g=`(?:${h}|$)`,v=`(?:^|${h})`,x=`${l}{1,2}${g}`,S=`(?!${l})`,w=`(?!${v}${x})`,P=`(?!${l}{0,1}${g})`,I=`(?!${x})`,C=`[^.${h}]`,N=`${_}*?`,O={DOT_LITERAL:l,PLUS_LITERAL:u,QMARK_LITERAL:d,SLASH_LITERAL:h,ONE_CHAR:m,QMARK:_,END_ANCHOR:g,DOTS_SLASH:x,NO_DOT:S,NO_DOTS:w,NO_DOT_SLASH:P,NO_DOTS_SLASH:I,QMARK_NO_DOT:C,STAR:N,START_ANCHOR:v,SEP:"/"},M={...O,SLASH_LITERAL:`[${i}]`,QMARK:c,STAR:`${c}*?`,DOTS_SLASH:`${l}{1,2}(?:[${i}]|$)`,NO_DOT:`(?!${l})`,NO_DOTS:`(?!(?:^|[${i}])${l}{1,2}(?:[${i}]|$))`,NO_DOT_SLASH:`(?!${l}{0,1}(?:[${i}]|$))`,NO_DOTS_SLASH:`(?!${l}{1,2}(?:[${i}]|$))`,QMARK_NO_DOT:`[^.${i}]`,START_ANCHOR:`(?:^|[${i}])`,END_ANCHOR:`(?:[${i}]|$)`,SEP:"\\"},z={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:z,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(D){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${D.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(D){return D===!0?M:O}}},697:(o,i,c)=>{const l=c(154),u=c(96),{MAX_LENGTH:d,POSIX_REGEX_SOURCE:h,REGEX_NON_SPECIAL_CHARS:m,REGEX_SPECIAL_CHARS_BACKREF:_,REPLACEMENTS:g}=l,v=(w,P)=>{if(typeof P.expandRange=="function")return P.expandRange(...w,P);w.sort();const I=`[${w.join("-")}]`;try{new RegExp(I)}catch{return w.map(N=>u.escapeRegex(N)).join("..")}return I},x=(w,P)=>`Missing ${w}: "${P}" - use "\\\\${P}" to match literal characters`,S=(w,P)=>{if(typeof w!="string")throw new TypeError("Expected a string");w=g[w]||w;const I={...P},C=typeof I.maxLength=="number"?Math.min(d,I.maxLength):d;let N=w.length;if(N>C)throw new SyntaxError(`Input length: ${N}, exceeds maximum allowed length: ${C}`);const T={type:"bos",value:"",output:I.prepend||""},O=[T],M=I.capture?"":"?:",z=l.globChars(I.windows),D=l.extglobChars(z),{DOT_LITERAL:B,PLUS_LITERAL:G,SLASH_LITERAL:J,ONE_CHAR:Y,DOTS_SLASH:X,NO_DOT:Z,NO_DOT_SLASH:he,NO_DOTS_SLASH:fe,QMARK:ee,QMARK_NO_DOT:ie,STAR:_e,START_ANCHOR:Ce}=z,ge=ae=>`(${M}(?:(?!${Ce}${ae.dot?X:B}).)*?)`,we=I.dot?"":Z,V=I.dot?ee:ie;let oe=I.bash===!0?ge(I):_e;I.capture&&(oe=`(${oe})`),typeof I.noext=="boolean"&&(I.noextglob=I.noext);const F={input:w,index:-1,start:0,dot:I.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:O};w=u.removePrefix(w,F),N=w.length;const ce=[],je=[],Oe=[];let q=T,$;const Pe=()=>F.index===N-1,ne=F.peek=(ae=1)=>w[F.index+ae],te=F.advance=()=>w[++F.index]||"",ke=()=>w.slice(F.index+1),ct=(ae="",de=0)=>{F.consumed+=ae,F.index+=de},Me=ae=>{F.output+=ae.output!=null?ae.output:ae.value,ct(ae.value)},Le=()=>{let ae=1;for(;ne()==="!"&&(ne(2)!=="("||ne(3)==="?");)te(),F.start++,ae++;return ae%2===0?!1:(F.negated=!0,F.start++,!0)},tt=ae=>{F[ae]++,Oe.push(ae)},We=ae=>{F[ae]--,Oe.pop()},re=ae=>{if(q.type==="globstar"){const de=F.braces>0&&(ae.type==="comma"||ae.type==="brace"),Q=ae.extglob===!0||ce.length&&(ae.type==="pipe"||ae.type==="paren");ae.type!=="slash"&&ae.type!=="paren"&&!de&&!Q&&(F.output=F.output.slice(0,-q.output.length),q.type="star",q.value="*",q.output=oe,F.output+=q.output)}if(ce.length&&ae.type!=="paren"&&(ce[ce.length-1].inner+=ae.value),(ae.value||ae.output)&&Me(ae),q&&q.type==="text"&&ae.type==="text"){q.output=(q.output||q.value)+ae.value,q.value+=ae.value;return}ae.prev=q,O.push(ae),q=ae},De=(ae,de)=>{const Q={...D[de],conditions:1,inner:""};Q.prev=q,Q.parens=F.parens,Q.output=F.output;const se=(I.capture?"(":"")+Q.open;tt("parens"),re({type:ae,value:de,output:F.output?"":Y}),re({type:"paren",extglob:!0,value:te(),output:se}),ce.push(Q)},$e=ae=>{let de=ae.close+(I.capture?")":""),Q;if(ae.type==="negate"){let se=oe;if(ae.inner&&ae.inner.length>1&&ae.inner.includes("/")&&(se=ge(I)),(se!==oe||Pe()||/^\)+$/.test(ke()))&&(de=ae.close=`)$))${se}`),ae.inner.includes("*")&&(Q=ke())&&/^\.[^\\/.]+$/.test(Q)){const ve=S(Q,{...P,fastpaths:!1}).output;de=ae.close=`)${ve})${se})`}ae.prev.type==="bos"&&(F.negatedExtglob=!0)}re({type:"paren",extglob:!0,value:$,output:de}),We("parens")};if(I.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(w)){let ae=!1,de=w.replace(_,(Q,se,ve,qe,Je,Wr)=>qe==="\\"?(ae=!0,Q):qe==="?"?se?se+qe+(Je?ee.repeat(Je.length):""):Wr===0?V+(Je?ee.repeat(Je.length):""):ee.repeat(ve.length):qe==="."?B.repeat(ve.length):qe==="*"?se?se+qe+(Je?oe:""):oe:se?Q:`\\${Q}`);return ae===!0&&(I.unescape===!0?de=de.replace(/\\/g,""):de=de.replace(/\\+/g,Q=>Q.length%2===0?"\\\\":Q?"\\":"")),de===w&&I.contains===!0?(F.output=w,F):(F.output=u.wrapOutput(de,F,P),F)}for(;!Pe();){if($=te(),$==="\0")continue;if($==="\\"){const Q=ne();if(Q==="/"&&I.bash!==!0||Q==="."||Q===";")continue;if(!Q){$+="\\",re({type:"text",value:$});continue}const se=/^\\+/.exec(ke());let ve=0;if(se&&se[0].length>2&&(ve=se[0].length,F.index+=ve,ve%2!==0&&($+="\\")),I.unescape===!0?$=te():$+=te(),F.brackets===0){re({type:"text",value:$});continue}}if(F.brackets>0&&($!=="]"||q.value==="["||q.value==="[^")){if(I.posix!==!1&&$===":"){const Q=q.value.slice(1);if(Q.includes("[")&&(q.posix=!0,Q.includes(":"))){const se=q.value.lastIndexOf("["),ve=q.value.slice(0,se),qe=q.value.slice(se+2),Je=h[qe];if(Je){q.value=ve+Je,F.backtrack=!0,te(),!T.output&&O.indexOf(q)===1&&(T.output=Y);continue}}}($==="["&&ne()!==":"||$==="-"&&ne()==="]")&&($=`\\${$}`),$==="]"&&(q.value==="["||q.value==="[^")&&($=`\\${$}`),I.posix===!0&&$==="!"&&q.value==="["&&($="^"),q.value+=$,Me({value:$});continue}if(F.quotes===1&&$!=='"'){$=u.escapeRegex($),q.value+=$,Me({value:$});continue}if($==='"'){F.quotes=F.quotes===1?0:1,I.keepQuotes===!0&&re({type:"text",value:$});continue}if($==="("){tt("parens"),re({type:"paren",value:$});continue}if($===")"){if(F.parens===0&&I.strictBrackets===!0)throw new SyntaxError(x("opening","("));const Q=ce[ce.length-1];if(Q&&F.parens===Q.parens+1){$e(ce.pop());continue}re({type:"paren",value:$,output:F.parens?")":"\\)"}),We("parens");continue}if($==="["){if(I.nobracket===!0||!ke().includes("]")){if(I.nobracket!==!0&&I.strictBrackets===!0)throw new SyntaxError(x("closing","]"));$=`\\${$}`}else tt("brackets");re({type:"bracket",value:$});continue}if($==="]"){if(I.nobracket===!0||q&&q.type==="bracket"&&q.value.length===1){re({type:"text",value:$,output:`\\${$}`});continue}if(F.brackets===0){if(I.strictBrackets===!0)throw new SyntaxError(x("opening","["));re({type:"text",value:$,output:`\\${$}`});continue}We("brackets");const Q=q.value.slice(1);if(q.posix!==!0&&Q[0]==="^"&&!Q.includes("/")&&($=`/${$}`),q.value+=$,Me({value:$}),I.literalBrackets===!1||u.hasRegexChars(Q))continue;const se=u.escapeRegex(q.value);if(F.output=F.output.slice(0,-q.value.length),I.literalBrackets===!0){F.output+=se,q.value=se;continue}q.value=`(${M}${se}|${q.value})`,F.output+=q.value;continue}if($==="{"&&I.nobrace!==!0){tt("braces");const Q={type:"brace",value:$,output:"(",outputIndex:F.output.length,tokensIndex:F.tokens.length};je.push(Q),re(Q);continue}if($==="}"){const Q=je[je.length-1];if(I.nobrace===!0||!Q){re({type:"text",value:$,output:$});continue}let se=")";if(Q.dots===!0){const ve=O.slice(),qe=[];for(let Je=ve.length-1;Je>=0&&(O.pop(),ve[Je].type!=="brace");Je--)ve[Je].type!=="dots"&&qe.unshift(ve[Je].value);se=v(qe,I),F.backtrack=!0}if(Q.comma!==!0&&Q.dots!==!0){const ve=F.output.slice(0,Q.outputIndex),qe=F.tokens.slice(Q.tokensIndex);Q.value=Q.output="\\{",$=se="\\}",F.output=ve;for(const Je of qe)F.output+=Je.output||Je.value}re({type:"brace",value:$,output:se}),We("braces"),je.pop();continue}if($==="|"){ce.length>0&&ce[ce.length-1].conditions++,re({type:"text",value:$});continue}if($===","){let Q=$;const se=je[je.length-1];se&&Oe[Oe.length-1]==="braces"&&(se.comma=!0,Q="|"),re({type:"comma",value:$,output:Q});continue}if($==="/"){if(q.type==="dot"&&F.index===F.start+1){F.start=F.index+1,F.consumed="",F.output="",O.pop(),q=T;continue}re({type:"slash",value:$,output:J});continue}if($==="."){if(F.braces>0&&q.type==="dot"){q.value==="."&&(q.output=B);const Q=je[je.length-1];q.type="dots",q.output+=$,q.value+=$,Q.dots=!0;continue}if(F.braces+F.parens===0&&q.type!=="bos"&&q.type!=="slash"){re({type:"text",value:$,output:B});continue}re({type:"dot",value:$,output:B});continue}if($==="?"){if(!(q&&q.value==="(")&&I.noextglob!==!0&&ne()==="("&&ne(2)!=="?"){De("qmark",$);continue}if(q&&q.type==="paren"){const se=ne();let ve=$;(q.value==="("&&!/[!=<:]/.test(se)||se==="<"&&!/<([!=]|\w+>)/.test(ke()))&&(ve=`\\${$}`),re({type:"text",value:$,output:ve});continue}if(I.dot!==!0&&(q.type==="slash"||q.type==="bos")){re({type:"qmark",value:$,output:ie});continue}re({type:"qmark",value:$,output:ee});continue}if($==="!"){if(I.noextglob!==!0&&ne()==="("&&(ne(2)!=="?"||!/[!=<:]/.test(ne(3)))){De("negate",$);continue}if(I.nonegate!==!0&&F.index===0){Le();continue}}if($==="+"){if(I.noextglob!==!0&&ne()==="("&&ne(2)!=="?"){De("plus",$);continue}if(q&&q.value==="("||I.regex===!1){re({type:"plus",value:$,output:G});continue}if(q&&(q.type==="bracket"||q.type==="paren"||q.type==="brace")||F.parens>0){re({type:"plus",value:$});continue}re({type:"plus",value:G});continue}if($==="@"){if(I.noextglob!==!0&&ne()==="("&&ne(2)!=="?"){re({type:"at",extglob:!0,value:$,output:""});continue}re({type:"text",value:$});continue}if($!=="*"){($==="$"||$==="^")&&($=`\\${$}`);const Q=m.exec(ke());Q&&($+=Q[0],F.index+=Q[0].length),re({type:"text",value:$});continue}if(q&&(q.type==="globstar"||q.star===!0)){q.type="star",q.star=!0,q.value+=$,q.output=oe,F.backtrack=!0,F.globstar=!0,ct($);continue}let ae=ke();if(I.noextglob!==!0&&/^\([^?]/.test(ae)){De("star",$);continue}if(q.type==="star"){if(I.noglobstar===!0){ct($);continue}const Q=q.prev,se=Q.prev,ve=Q.type==="slash"||Q.type==="bos",qe=se&&(se.type==="star"||se.type==="globstar");if(I.bash===!0&&(!ve||ae[0]&&ae[0]!=="/")){re({type:"star",value:$,output:""});continue}const Je=F.braces>0&&(Q.type==="comma"||Q.type==="brace"),Wr=ce.length&&(Q.type==="pipe"||Q.type==="paren");if(!ve&&Q.type!=="paren"&&!Je&&!Wr){re({type:"star",value:$,output:""});continue}for(;ae.slice(0,3)==="/**";){const Cr=w[F.index+4];if(Cr&&Cr!=="/")break;ae=ae.slice(3),ct("/**",3)}if(Q.type==="bos"&&Pe()){q.type="globstar",q.value+=$,q.output=ge(I),F.output=q.output,F.globstar=!0,ct($);continue}if(Q.type==="slash"&&Q.prev.type!=="bos"&&!qe&&Pe()){F.output=F.output.slice(0,-(Q.output+q.output).length),Q.output=`(?:${Q.output}`,q.type="globstar",q.output=ge(I)+(I.strictSlashes?")":"|$)"),q.value+=$,F.globstar=!0,F.output+=Q.output+q.output,ct($);continue}if(Q.type==="slash"&&Q.prev.type!=="bos"&&ae[0]==="/"){const Cr=ae[1]!==void 0?"|$":"";F.output=F.output.slice(0,-(Q.output+q.output).length),Q.output=`(?:${Q.output}`,q.type="globstar",q.output=`${ge(I)}${J}|${J}${Cr})`,q.value+=$,F.output+=Q.output+q.output,F.globstar=!0,ct($+te()),re({type:"slash",value:"/",output:""});continue}if(Q.type==="bos"&&ae[0]==="/"){q.type="globstar",q.value+=$,q.output=`(?:^|${J}|${ge(I)}${J})`,F.output=q.output,F.globstar=!0,ct($+te()),re({type:"slash",value:"/",output:""});continue}F.output=F.output.slice(0,-q.output.length),q.type="globstar",q.output=ge(I),q.value+=$,F.output+=q.output,F.globstar=!0,ct($);continue}const de={type:"star",value:$,output:oe};if(I.bash===!0){de.output=".*?",(q.type==="bos"||q.type==="slash")&&(de.output=we+de.output),re(de);continue}if(q&&(q.type==="bracket"||q.type==="paren")&&I.regex===!0){de.output=$,re(de);continue}(F.index===F.start||q.type==="slash"||q.type==="dot")&&(q.type==="dot"?(F.output+=he,q.output+=he):I.dot===!0?(F.output+=fe,q.output+=fe):(F.output+=we,q.output+=we),ne()!=="*"&&(F.output+=Y,q.output+=Y)),re(de)}for(;F.brackets>0;){if(I.strictBrackets===!0)throw new SyntaxError(x("closing","]"));F.output=u.escapeLast(F.output,"["),We("brackets")}for(;F.parens>0;){if(I.strictBrackets===!0)throw new SyntaxError(x("closing",")"));F.output=u.escapeLast(F.output,"("),We("parens")}for(;F.braces>0;){if(I.strictBrackets===!0)throw new SyntaxError(x("closing","}"));F.output=u.escapeLast(F.output,"{"),We("braces")}if(I.strictSlashes!==!0&&(q.type==="star"||q.type==="bracket")&&re({type:"maybe_slash",value:"",output:`${J}?`}),F.backtrack===!0){F.output="";for(const ae of F.tokens)F.output+=ae.output!=null?ae.output:ae.value,ae.suffix&&(F.output+=ae.suffix)}return F};S.fastpaths=(w,P)=>{const I={...P},C=typeof I.maxLength=="number"?Math.min(d,I.maxLength):d,N=w.length;if(N>C)throw new SyntaxError(`Input length: ${N}, exceeds maximum allowed length: ${C}`);w=g[w]||w;const{DOT_LITERAL:T,SLASH_LITERAL:O,ONE_CHAR:M,DOTS_SLASH:z,NO_DOT:D,NO_DOTS:B,NO_DOTS_SLASH:G,STAR:J,START_ANCHOR:Y}=l.globChars(I.windows),X=I.dot?B:D,Z=I.dot?G:D,he=I.capture?"":"?:",fe={negated:!1,prefix:""};let ee=I.bash===!0?".*?":J;I.capture&&(ee=`(${ee})`);const ie=we=>we.noglobstar===!0?ee:`(${he}(?:(?!${Y}${we.dot?z:T}).)*?)`,_e=we=>{switch(we){case"*":return`${X}${M}${ee}`;case".*":return`${T}${M}${ee}`;case"*.*":return`${X}${ee}${T}${M}${ee}`;case"*/*":return`${X}${ee}${O}${M}${Z}${ee}`;case"**":return X+ie(I);case"**/*":return`(?:${X}${ie(I)}${O})?${Z}${M}${ee}`;case"**/*.*":return`(?:${X}${ie(I)}${O})?${Z}${ee}${T}${M}${ee}`;case"**/.*":return`(?:${X}${ie(I)}${O})?${T}${M}${ee}`;default:{const V=/^(.*?)\.(\w+)$/.exec(we);if(!V)return;const oe=_e(V[1]);return oe?oe+T+V[2]:void 0}}},Ce=u.removePrefix(w,fe);let ge=_e(Ce);return ge&&I.strictSlashes!==!0&&(ge+=`${O}?`),ge},o.exports=S},510:(o,i,c)=>{const l=c(716),u=c(697),d=c(96),h=c(154),m=g=>g&&typeof g=="object"&&!Array.isArray(g),_=(g,v,x=!1)=>{if(Array.isArray(g)){const O=g.map(z=>_(z,v,x));return z=>{for(const D of O){const B=D(z);if(B)return B}return!1}}const S=m(g)&&g.tokens&&g.input;if(g===""||typeof g!="string"&&!S)throw new TypeError("Expected pattern to be a non-empty string");const w=v||{},P=w.windows,I=S?_.compileRe(g,v):_.makeRe(g,v,!1,!0),C=I.state;delete I.state;let N=()=>!1;if(w.ignore){const O={...v,ignore:null,onMatch:null,onResult:null};N=_(w.ignore,O,x)}const T=(O,M=!1)=>{const{isMatch:z,match:D,output:B}=_.test(O,I,v,{glob:g,posix:P}),G={glob:g,state:C,regex:I,posix:P,input:O,output:B,match:D,isMatch:z};return typeof w.onResult=="function"&&w.onResult(G),z===!1?(G.isMatch=!1,M?G:!1):N(O)?(typeof w.onIgnore=="function"&&w.onIgnore(G),G.isMatch=!1,M?G:!1):(typeof w.onMatch=="function"&&w.onMatch(G),M?G:!0)};return x&&(T.state=C),T};_.test=(g,v,x,{glob:S,posix:w}={})=>{if(typeof g!="string")throw new TypeError("Expected input to be a string");if(g==="")return{isMatch:!1,output:""};const P=x||{},I=P.format||(w?d.toPosixSlashes:null);let C=g===S,N=C&&I?I(g):g;return C===!1&&(N=I?I(g):g,C=N===S),(C===!1||P.capture===!0)&&(P.matchBase===!0||P.basename===!0?C=_.matchBase(g,v,x,w):C=v.exec(N)),{isMatch:!!C,match:C,output:N}},_.matchBase=(g,v,x)=>(v instanceof RegExp?v:_.makeRe(v,x)).test(d.basename(g)),_.isMatch=(g,v,x)=>_(v,x)(g),_.parse=(g,v)=>Array.isArray(g)?g.map(x=>_.parse(x,v)):u(g,{...v,fastpaths:!1}),_.scan=(g,v)=>l(g,v),_.compileRe=(g,v,x=!1,S=!1)=>{if(x===!0)return g.output;const w=v||{},P=w.contains?"":"^",I=w.contains?"":"$";let C=`${P}(?:${g.output})${I}`;g&&g.negated===!0&&(C=`^(?!${C}).*$`);const N=_.toRegex(C,v);return S===!0&&(N.state=g),N},_.makeRe=(g,v={},x=!1,S=!1)=>{if(!g||typeof g!="string")throw new TypeError("Expected a non-empty string");let w={negated:!1,fastpaths:!0};return v.fastpaths!==!1&&(g[0]==="."||g[0]==="*")&&(w.output=u.fastpaths(g,v)),w.output||(w=u(g,v)),_.compileRe(w,v,x,S)},_.toRegex=(g,v)=>{try{const x=v||{};return new RegExp(g,x.flags||(x.nocase?"i":""))}catch(x){if(v&&v.debug===!0)throw x;return/$^/}},_.constants=h,o.exports=_},716:(o,i,c)=>{const l=c(96),{CHAR_ASTERISK:u,CHAR_AT:d,CHAR_BACKWARD_SLASH:h,CHAR_COMMA:m,CHAR_DOT:_,CHAR_EXCLAMATION_MARK:g,CHAR_FORWARD_SLASH:v,CHAR_LEFT_CURLY_BRACE:x,CHAR_LEFT_PARENTHESES:S,CHAR_LEFT_SQUARE_BRACKET:w,CHAR_PLUS:P,CHAR_QUESTION_MARK:I,CHAR_RIGHT_CURLY_BRACE:C,CHAR_RIGHT_PARENTHESES:N,CHAR_RIGHT_SQUARE_BRACKET:T}=c(154),O=D=>D===v||D===h,M=D=>{D.isPrefix!==!0&&(D.depth=D.isGlobstar?1/0:1)},z=(D,B)=>{const G=B||{},J=D.length-1,Y=G.parts===!0||G.scanToEnd===!0,X=[],Z=[],he=[];let fe=D,ee=-1,ie=0,_e=0,Ce=!1,ge=!1,we=!1,V=!1,oe=!1,F=!1,ce=!1,je=!1,Oe=!1,q=!1,$=0,Pe,ne,te={value:"",depth:0,isGlob:!1};const ke=()=>ee>=J,ct=()=>fe.charCodeAt(ee+1),Me=()=>(Pe=ne,fe.charCodeAt(++ee));for(;ee<J;){ne=Me();let De;if(ne===h){ce=te.backslashes=!0,ne=Me(),ne===x&&(F=!0);continue}if(F===!0||ne===x){for($++;ke()!==!0&&(ne=Me());){if(ne===h){ce=te.backslashes=!0,Me();continue}if(ne===x){$++;continue}if(F!==!0&&ne===_&&(ne=Me())===_){if(Ce=te.isBrace=!0,we=te.isGlob=!0,q=!0,Y===!0)continue;break}if(F!==!0&&ne===m){if(Ce=te.isBrace=!0,we=te.isGlob=!0,q=!0,Y===!0)continue;break}if(ne===C&&($--,$===0)){F=!1,Ce=te.isBrace=!0,q=!0;break}}if(Y===!0)continue;break}if(ne===v){if(X.push(ee),Z.push(te),te={value:"",depth:0,isGlob:!1},q===!0)continue;if(Pe===_&&ee===ie+1){ie+=2;continue}_e=ee+1;continue}if(G.noext!==!0&&(ne===P||ne===d||ne===u||ne===I||ne===g)===!0&&ct()===S){if(we=te.isGlob=!0,V=te.isExtglob=!0,q=!0,ne===g&&ee===ie&&(Oe=!0),Y===!0){for(;ke()!==!0&&(ne=Me());){if(ne===h){ce=te.backslashes=!0,ne=Me();continue}if(ne===N){we=te.isGlob=!0,q=!0;break}}continue}break}if(ne===u){if(Pe===u&&(oe=te.isGlobstar=!0),we=te.isGlob=!0,q=!0,Y===!0)continue;break}if(ne===I){if(we=te.isGlob=!0,q=!0,Y===!0)continue;break}if(ne===w){for(;ke()!==!0&&(De=Me());){if(De===h){ce=te.backslashes=!0,Me();continue}if(De===T){ge=te.isBracket=!0,we=te.isGlob=!0,q=!0;break}}if(Y===!0)continue;break}if(G.nonegate!==!0&&ne===g&&ee===ie){je=te.negated=!0,ie++;continue}if(G.noparen!==!0&&ne===S){if(we=te.isGlob=!0,Y===!0){for(;ke()!==!0&&(ne=Me());){if(ne===S){ce=te.backslashes=!0,ne=Me();continue}if(ne===N){q=!0;break}}continue}break}if(we===!0){if(q=!0,Y===!0)continue;break}}G.noext===!0&&(V=!1,we=!1);let Le=fe,tt="",We="";ie>0&&(tt=fe.slice(0,ie),fe=fe.slice(ie),_e-=ie),Le&&we===!0&&_e>0?(Le=fe.slice(0,_e),We=fe.slice(_e)):we===!0?(Le="",We=fe):Le=fe,Le&&Le!==""&&Le!=="/"&&Le!==fe&&O(Le.charCodeAt(Le.length-1))&&(Le=Le.slice(0,-1)),G.unescape===!0&&(We&&(We=l.removeBackslashes(We)),Le&&ce===!0&&(Le=l.removeBackslashes(Le)));const re={prefix:tt,input:D,start:ie,base:Le,glob:We,isBrace:Ce,isBracket:ge,isGlob:we,isExtglob:V,isGlobstar:oe,negated:je,negatedExtglob:Oe};if(G.tokens===!0&&(re.maxDepth=0,O(ne)||Z.push(te),re.tokens=Z),G.parts===!0||G.tokens===!0){let De;for(let $e=0;$e<X.length;$e++){const ae=De?De+1:ie,de=X[$e],Q=D.slice(ae,de);G.tokens&&($e===0&&ie!==0?(Z[$e].isPrefix=!0,Z[$e].value=tt):Z[$e].value=Q,M(Z[$e]),re.maxDepth+=Z[$e].depth),($e!==0||Q!=="")&&he.push(Q),De=de}if(De&&De+1<D.length){const $e=D.slice(De+1);he.push($e),G.tokens&&(Z[Z.length-1].value=$e,M(Z[Z.length-1]),re.maxDepth+=Z[Z.length-1].depth)}re.slashes=X,re.parts=he}return re};o.exports=z},96:(o,i,c)=>{const{REGEX_BACKSLASH:l,REGEX_REMOVE_BACKSLASH:u,REGEX_SPECIAL_CHARS:d,REGEX_SPECIAL_CHARS_GLOBAL:h}=c(154);i.isObject=m=>m!==null&&typeof m=="object"&&!Array.isArray(m),i.hasRegexChars=m=>d.test(m),i.isRegexChar=m=>m.length===1&&i.hasRegexChars(m),i.escapeRegex=m=>m.replace(h,"\\$1"),i.toPosixSlashes=m=>m.replace(l,"/"),i.removeBackslashes=m=>m.replace(u,_=>_==="\\"?"":_),i.escapeLast=(m,_,g)=>{const v=m.lastIndexOf(_,g);return v===-1?m:m[v-1]==="\\"?i.escapeLast(m,_,v-1):`${m.slice(0,v)}\\${m.slice(v)}`},i.removePrefix=(m,_={})=>{let g=m;return g.startsWith("./")&&(g=g.slice(2),_.prefix="./"),g},i.wrapOutput=(m,_={},g={})=>{const v=g.contains?"":"^",x=g.contains?"":"$";let S=`${v}(?:${m})${x}`;return _.negated===!0&&(S=`(?:^(?!${S}).*$)`),S},i.basename=(m,{windows:_}={})=>{const g=m.split(_?/[\\/]/:"/"),v=g[g.length-1];return v===""?g[g.length-2]:v}}},t={};function r(o){var i=t[o];if(i!==void 0)return i.exports;var c=t[o]={exports:{}},l=!0;try{e[o](c,c.exports,r),l=!1}finally{l&&delete t[o]}return c.exports}typeof r<"u"&&(r.ab=__dirname+"/");var n=r(170);ca.exports=n})()),ca.exports}var Zu;function Wj(){return Zu||(Zu=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,{hasLocalMatch:function(){return o},matchLocalPattern:function(){return n}});const r=Vm();function n(i,c){if(i.search!==void 0&&i.search!==c.search)return!1;var l;return!!(0,r.makeRe)((l=i.pathname)!=null?l:"**",{dot:!0}).test(c.pathname)}function o(i,c){if(!i)return!0;const l=new URL(c,"http://n");return i.some(u=>n(u,l))}}(aa)),aa}var la={},ed;function Vj(){return ed||(ed=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,{hasRemoteMatch:function(){return o},matchRemotePattern:function(){return n}});const r=Vm();function n(i,c){if(i.protocol!==void 0){const u=c.protocol.slice(0,-1);if(i.protocol!==u)return!1}if(i.port!==void 0&&i.port!==c.port)return!1;if(i.hostname===void 0)throw new Error(`Pattern should define hostname but found
|
|
17
|
+
`+JSON.stringify(i));if(!(0,r.makeRe)(i.hostname).test(c.hostname)||i.search!==void 0&&i.search!==c.search)return!1;var l;return!!(0,r.makeRe)((l=i.pathname)!=null?l:"**",{dot:!0}).test(c.pathname)}function o(i,c,l){return i.some(u=>l.hostname===u)||c.some(u=>n(u,l))}}(la)),la}var td;function Gm(){return td||(td=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}});const t=75;function r(o){let{config:i,src:c,width:l,quality:u}=o;var d;if(process.env.NODE_ENV!=="production"){const m=[];if(c||m.push("src"),l||m.push("width"),m.length>0)throw new Error("Next Image Optimization requires "+m.join(", ")+" to be provided. Make sure you pass them as props to the `next/image` component. Received: "+JSON.stringify({src:c,width:l,quality:u}));if(c.startsWith("//"))throw new Error('Failed to parse src "'+c+'" on `next/image`, protocol-relative URL (//) must be changed to an absolute URL (http:// or https://)');if(c.startsWith("/")&&i.localPatterns&&process.env.NODE_ENV!=="test"&&process.env.NEXT_RUNTIME!=="edge"){const{hasLocalMatch:_}=Wj();if(!_(i.localPatterns,c))throw new Error("Invalid src prop ("+c+") 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(!c.startsWith("/")&&(i.domains||i.remotePatterns)){let _;try{_=new URL(c)}catch(g){throw console.error(g),new Error('Failed to parse src "'+c+'" 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:g}=Vj();if(!g(i.domains,i.remotePatterns,_))throw new Error("Invalid src prop ("+c+') on `next/image`, hostname "'+_.hostname+'" is not configured under images in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-host')}}if(u&&i.qualities&&!i.qualities.includes(u))throw new Error("Invalid quality prop ("+u+") 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 h=u||((d=i.qualities)==null?void 0:d.reduce((m,_)=>Math.abs(_-t)<Math.abs(m-t)?_:m))||t;return i.path+"?url="+encodeURIComponent(c)+"&w="+l+"&q="+h+(process.env.NEXT_DEPLOYMENT_ID?"&dpl="+process.env.NEXT_DEPLOYMENT_ID:"")}r.__next_img_default=!0;const n=r}(ia)),ia}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return I}});const r=Ct,n=hn,o=s,i=n._(j),c=r._(uc),l=r._(Hj()),u=Bc,d=Zo,h=$j(),m=Jo,_=Up(),g=r._(Gm()),v=process.env.__NEXT_IMAGE_OPTS;typeof window>"u"&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);function x(C,N,T,O,M,z,D){const B=C==null?void 0:C.src;if(!C||C["data-loaded-src"]===B)return;C["data-loaded-src"]=B,("decode"in C?C.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(!(!C.parentElement||!C.isConnected)){if(N!=="empty"&&M(!0),T!=null&&T.current){const J=new Event("load");Object.defineProperty(J,"target",{writable:!1,value:C});let Y=!1,X=!1;T.current({...J,nativeEvent:J,currentTarget:C,target:C,isDefaultPrevented:()=>Y,isPropagationStopped:()=>X,persist:()=>{},preventDefault:()=>{Y=!0,J.preventDefault()},stopPropagation:()=>{X=!0,J.stopPropagation()}})}if(O!=null&&O.current&&O.current(C),process.env.NODE_ENV!=="production"){const J=new URL(B,"http://n").searchParams.get("url")||B;if(C.getAttribute("data-nimg")==="fill"){if(!z&&(!D||D==="100vw")&&C.getBoundingClientRect().width/window.innerWidth<.6&&(D==="100vw"?(0,m.warnOnce)('Image with src "'+J+'" 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,m.warnOnce)('Image with src "'+J+'" 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')),C.parentElement){const{position:Z}=window.getComputedStyle(C.parentElement),he=["absolute","fixed","relative"];he.includes(Z)||(0,m.warnOnce)('Image with src "'+J+'" has "fill" and parent element with invalid "position". Provided "'+Z+'" should be one of '+he.map(String).join(",")+".")}C.height===0&&(0,m.warnOnce)('Image with src "'+J+'" 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 Y=C.height.toString()!==C.getAttribute("height"),X=C.width.toString()!==C.getAttribute("width");(Y&&!X||!Y&&X)&&(0,m.warnOnce)('Image with src "'+J+`" 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 S(C){return i.use?{fetchPriority:C}:{fetchpriority:C}}const w=(0,i.forwardRef)((C,N)=>{let{src:T,srcSet:O,sizes:M,height:z,width:D,decoding:B,className:G,style:J,fetchPriority:Y,placeholder:X,loading:Z,unoptimized:he,fill:fe,onLoadRef:ee,onLoadingCompleteRef:ie,setBlurComplete:_e,setShowAltText:Ce,sizesInput:ge,onLoad:we,onError:V,...oe}=C;return(0,o.jsx)("img",{...oe,...S(Y),loading:Z,width:D,height:z,decoding:B,"data-nimg":fe?"fill":"1",className:G,style:J,sizes:M,srcSet:O,src:T,ref:(0,i.useCallback)(F=>{N&&(typeof N=="function"?N(F):typeof N=="object"&&(N.current=F)),F&&(V&&(F.src=F.src),process.env.NODE_ENV!=="production"&&(T||console.error('Image is missing required "src" property:',F),F.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.')),F.complete&&x(F,X,ee,ie,_e,he,ge))},[T,X,ee,ie,_e,V,he,ge,N]),onLoad:F=>{const ce=F.currentTarget;x(ce,X,ee,ie,_e,he,ge)},onError:F=>{Ce(!0),X!=="empty"&&_e(!0),V&&V(F)}})});function P(C){let{isAppRouter:N,imgAttributes:T}=C;const O={as:"image",imageSrcSet:T.srcSet,imageSizes:T.sizes,crossOrigin:T.crossOrigin,referrerPolicy:T.referrerPolicy,...S(T.fetchPriority)};return N&&c.default.preload?(c.default.preload(T.src,O),null):(0,o.jsx)(l.default,{children:(0,o.jsx)("link",{rel:"preload",href:T.srcSet?void 0:T.src,...O},"__nimg-"+T.src+T.srcSet+T.sizes)})}const I=(0,i.forwardRef)((C,N)=>{const O=!(0,i.useContext)(_.RouterContext),M=(0,i.useContext)(h.ImageConfigContext),z=(0,i.useMemo)(()=>{var ie;const _e=v||M||d.imageConfigDefault,Ce=[..._e.deviceSizes,..._e.imageSizes].sort((V,oe)=>V-oe),ge=_e.deviceSizes.sort((V,oe)=>V-oe),we=(ie=_e.qualities)==null?void 0:ie.sort((V,oe)=>V-oe);return{..._e,allSizes:Ce,deviceSizes:ge,qualities:we}},[M]),{onLoad:D,onLoadingComplete:B}=C,G=(0,i.useRef)(D);(0,i.useEffect)(()=>{G.current=D},[D]);const J=(0,i.useRef)(B);(0,i.useEffect)(()=>{J.current=B},[B]);const[Y,X]=(0,i.useState)(!1),[Z,he]=(0,i.useState)(!1),{props:fe,meta:ee}=(0,u.getImgProps)(C,{defaultLoader:g.default,imgConf:z,blurComplete:Y,showAltText:Z});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(w,{...fe,unoptimized:ee.unoptimized,placeholder:ee.placeholder,fill:ee.fill,onLoadRef:G,onLoadingCompleteRef:J,setBlurComplete:X,setShowAltText:he,sizesInput:C.sizes,ref:N}),ee.priority?(0,o.jsx)(P,{isAppRouter:O,imgAttributes:fe}):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)})($a,$a.exports);var Gj=$a.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(u,d){for(var h in d)Object.defineProperty(u,h,{enumerable:!0,get:d[h]})}t(e,{default:function(){return l},getImageProps:function(){return c}});const r=Ct,n=Bc,o=Gj,i=r._(Gm());function c(u){const{props:d}=(0,n.getImgProps)(u,{defaultLoader:i.default,imgConf:process.env.__NEXT_IMAGE_OPTS});for(const[h,m]of Object.entries(d))m===void 0&&delete d[h];return{props:d}}const l=o.Image})(Hm);var Kj=Hm;const Es=U.getDefaultExportFromCjs(Kj),Qj=({item:e,CONSTANTS:t})=>{const r=e.icon?t.PAYMENT_FLAGS.includes(e.icon)?"payment":"social":null,n=r==="payment"?t.PAYMENT_FLAGS_DICTIONARY[e.icon]:e.icon;return e.link?s.jsxs(Tt,{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Be["support-item"],children:[e.image&&s.jsx("img",{src:e.image,alt:"",loading:"lazy"}),r==="payment"?s.jsx(Es,{alt:n,src:`/assets/${n}.svg`,width:20,height:20}):s.jsx(p.Icon,{size:"small",name:n})]}):s.jsxs("div",{className:Be["support-item"],children:[e.image&&s.jsx("img",{src:e.image,alt:"",loading:"lazy"}),r==="payment"?s.jsx(Es,{alt:n,src:`/assets/${n}.svg`,width:20,height:20}):s.jsx(p.Icon,{size:"small",name:n})]})},Yj=({content:e,CONSTANTS:t})=>s.jsx("div",{className:Be["support-container"],children:e==null?void 0:e.map((r,n)=>s.jsxs("div",{"data-device":r.device,className:Be["support-section"],children:[s.jsxs("div",{className:Be["support-text"],children:[r.title&&s.jsx("h3",{children:r.title}),r.description&&s.jsx("p",{children:r.description})]}),Array.isArray(r.items)&&r.items.length&&s.jsx("div",{className:Be["support-items"],"data-gap":r.gap,children:r.items.map((o,i)=>s.jsx(Qj,{item:o,CONSTANTS:t},`footer-support-item-${i}`))})]},`footer-support-${n}`))}),Xj=({name:e,nameIcon:t,maxWidth:r,rowAlignContent:n,columnAlignContent:o,columnAlignItems:i,textAlignContent:c,textAlignItems:l,children:u})=>s.jsx(p.TextStructure.Root,{layoutProps:{textRow:{alignContent:n,alignItems:n},columnWrapper:{alignContent:o,alignItems:i}},children:s.jsxs(p.TextStructure.DivWrapper,{alignContent:c,alignItems:l,className:Be.footer__column,children:[s.jsxs("div",{className:t?Be.footer__columnTitleIcon:Be.footer__columnTitle,children:[s.jsx(p.Icon,{name:`${t}`,size:"small"}),e&&s.jsx("div",{children:e})]}),s.jsx("div",{className:Be.footer__columnContent,style:{maxWidth:`${r}px`},children:u})]})}),Jj=({name:e,nameIcon:t,maxWidth:r,children:n,ICONS:o,...i})=>s.jsxs(p.Accordion.Wrapper,{className:Be.accordionWrapper,title:"accordion-wrapper",...i,children:[s.jsx(p.Accordion.Header,{id:(i==null?void 0:i.id)??"",className:Be.accordionHeader,closeIndicator:s.jsx(p.Icon,{name:o.arrow_up,size:"medium"}),openIndicator:s.jsx(p.Icon,{name:o.arrow_down,size:"medium"}),title:"accordion-header",children:s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{className:t?Be.accordionTextWrapper:"",children:[s.jsx(p.Icon,{name:`${t}`,size:"medium"}),s.jsx("h2",{className:"typography-style-body-md",children:e})]})})}),s.jsx(p.Accordion.Body,{title:"accordion-body",children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:Be.footer__columnContent,style:{maxWidth:`${r}px`},children:n})})})]}),ua=e=>{const{isMobile:t}=xe();return t?s.jsx(Jj,{...e}):s.jsx(Xj,{...e})},yo=({type:e,children:t,className:r,collumnName:n,collumnNameIcon:o,icons:i,iconLink:c,iconSize:l,link:u,paymentDisclaimer:d,paymentTitle:h,rowAlignContent:m,columnAlignContent:_,columnAlignItems:g,textAlignContent:v,textAlignItems:x,...S})=>{let w;const{handleSelectContent:P}=Ee(),{nextimage:I}=Ae();switch(e){case"menu":w=s.jsx(Tt,{className:Be.footer__itemLink,href:u??"#",prefetch:!1,children:s.jsx("span",{onClick:()=>{P({content:`footer:${n}:${t}`})},children:t})});break;case"payment":w=s.jsxs("div",{className:p.helpers.classNameConcat(Be.payment,Be.footer__itemSmallText),...S,children:[d,s.jsxs("div",{className:p.helpers.classNameConcat(Be.footer__iconContainer,Be.footer__iconListSubHeader),children:[h,s.jsx("div",{className:Be.footer__iconList,children:i==null?void 0:i.map((C,N)=>s.jsx(I,{alt:C,src:`/assets/${C}.svg`,width:l??20,height:l??20},N))})]})]});break;case"social-media":w=s.jsx("div",{className:Be.footer__iconContainer,...S,children:s.jsx("div",{className:Be.footer__iconList,children:c==null?void 0:c.map((C,N)=>s.jsx(Tt,{prefetch:!1,href:C.link??"#",target:"_blank",children:s.jsx(p.Icon,{size:"medium",name:C.icon,onClick:()=>P({content:`footer:redes-sociais:${C.icon}`})})},N))})});break;default:w=s.jsx("div",{className:r,...S,children:t})}return s.jsx(p.TextStructure.Root,{layoutProps:{textRow:{alignContent:m,alignItems:m},columnWrapper:{alignContent:_,alignItems:g}},...S,children:s.jsx(p.TextStructure.DivWrapper,{alignContent:v,alignItems:x,className:p.helpers.classNameConcat(Be.footer__item,r),children:w})})},Zj=({className:e,text:t,...r})=>s.jsx("div",{...r,className:p.helpers.classNameConcat(Be.footer__legalInformation,e),children:s.jsx("span",{children:t})}),Km=()=>{const{nextimage:e}=Ae();return s.jsx("div",{className:Be["footer--stamps"],children:s.jsx(e,{alt:"Empresa B",className:Be["footer--stamps--company"],src:"/images/Footer/new_certfB.png",width:56,height:64})})};Km.displayName="Footer.Stamps";const Qm=({children:e,legalTextSlot:t,adornment:r,className:n,...o})=>{const{isMobile:i}=xe(),c=j.Children.toArray(e).filter(Boolean),l=c.length;return s.jsxs("div",{className:Be.footer__main,children:[(r==null?void 0:r.top)&&s.jsx("div",{className:Be.footer__top,children:r==null?void 0:r.top}),l>0&&s.jsx("div",{...o,className:p.helpers.classNameConcat(Be.footer__wrapper,n),children:c.map((u,d)=>s.jsx("div",{style:{flexGrow:1,maxWidth:`calc(100% / ${i?1:"fit-content"})`},children:u},d))}),(r==null?void 0:r.bottom)&&s.jsx("div",{className:Be.footer__bottom,children:r.bottom}),t&&s.jsx("div",{className:Be.footer__legalText,children:t})]})};Qm.displayName="Footer.Wrapper";const Ym=({data:{links:{links:e}},payments:t,socialInfo:r,socialMedias:n,adornment:o,LEGAL_INFORMATION_TEXT:i,ICONS:c,className:l,hasFooterStamps:u})=>{var d;return s.jsxs(Qm,{className:l,adornment:o,legalTextSlot:s.jsx(Zj,{text:i}),children:[Array.isArray(e.column)&&e.column.map((h,m)=>s.jsx(ua,{id:`${m}column-menu`,name:h.name,nameIcon:h.nameIcon,ICONS:c,children:h.items.map((_,g)=>s.jsx(yo,{type:"menu",link:_.link,collumnName:h.name,collumnNameIcon:h.nameIcon,children:_.text},g))},m)),t&&((d=t.acceptedFlags)==null?void 0:d.length)>0&&s.jsx(ua,{id:"payment-column",name:t==null?void 0:t.title,nameIcon:t==null?void 0:t.titleIcon,maxWidth:150,ICONS:c,children:s.jsx(yo,{type:"payment",paymentDisclaimer:t==null?void 0:t.text,paymentTitle:t==null?void 0:t.flagsTitle,iconSize:16,icons:t==null?void 0:t.acceptedFlags})}),s.jsxs(ua,{id:"social-media-column",name:r==null?void 0:r.title,ICONS:c,children:[r!=null&&r.subTitle?s.jsx(yo,{children:r==null?void 0:r.subTitle}):null,s.jsx(yo,{type:"social-media",iconSize:24,iconLink:n}),u&&s.jsx(Km,{})]})]})};Ym.displayName="Footer";const eS=Object.freeze(Object.defineProperty({__proto__:null,Footer:Ym,FooterSupport:Yj},Symbol.toStringTag,{value:"Module"})),tS="_header_9xxjk_57",rS="_actions_9xxjk_131",nS="_breadcrumb_9xxjk_142",sS="_credits_9xxjk_157",oS="_pdplinks_9xxjk_185",iS="_similars_9xxjk_212",aS="_sizes_9xxjk_251",cS="_measurementTable_9xxjk_267",lS="_measurementHead_9xxjk_280",uS="_measurementRows_9xxjk_285",dS="_measurementRowsTitle_9xxjk_302",fS="_measurementRowsText_9xxjk_314",pS="_measurementImage_9xxjk_325",hS="_measurementImageContainer_9xxjk_328",mS="_measurementContent_9xxjk_337",_S="_measurementTitle_9xxjk_341",gS="_measurementClose_9xxjk_352",yS="_productref_9xxjk_417",vS="_slideOut_9xxjk_1",xS="_slideIn_9xxjk_1",bS="_content_9xxjk_397",jS="_pdp_9xxjk_185",SS="_divider_9xxjk_575",me={"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:tS,"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:rS,"add-to-cart":"_add-to-cart_9xxjk_138",breadcrumb:nS,"breadcrumb--active":"_breadcrumb--active_9xxjk_147",credits:sS,"gallery-carousel-modifier":"_gallery-carousel-modifier_9xxjk_162",pdplinks:oS,"links-wrapper":"_links-wrapper_9xxjk_195",similars:iS,"similars-info":"_similars-info_9xxjk_224","toggle-style-modifier":"_toggle-style-modifier_9xxjk_233","accessibility-info":"_accessibility-info_9xxjk_237",sizes:aS,"price-wrapper":"_price-wrapper_9xxjk_263",measurementTable:cS,measurementHead:lS,measurementRows:uS,measurementRowsTitle:dS,measurementRowsText:fS,measurementImage:pS,measurementImageContainer:hS,measurementContent:mS,measurementTitle:_S,measurementClose:gS,"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:yS,"tabs-panel":"_tabs-panel_9xxjk_428","tabs-panel-exit":"_tabs-panel-exit_9xxjk_434",slideOut:vS,"tabs-panel-enter":"_tabs-panel-enter_9xxjk_438",slideIn:xS,content:bS,pdp:jS,"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:SS,"breadcrumbs-desktop":"_breadcrumbs-desktop_9xxjk_580","breadcrumbs-mobile":"_breadcrumbs-mobile_9xxjk_589"},CS=({children:e,link:t,TOGGLE_STYLE_MODIFIER:r})=>{const{isMobile:n}=xe(),{router:o}=Ae(),i=()=>{t&&o.push(t)},c=j.useRef(null);return s.jsx(p.ToggleStyle.Wrapper,{size:n?"medium":"small",style:{...r,border:`${c.current===t?"2":"1"}`,overflow:"hidden",padding:"0"},onClick:i,active:c.current===t,children:e})},Xm=({productId:e,similars:t,TOGGLE_STYLE_MODIFIER:r})=>{const{thumbImage:n}=Et(),o=[{productId:e,slug:"",textureImage:(n==null?void 0:n.imageUrl)??"",textureAlt:(n==null?void 0:n.imageText)??""},...t];return s.jsx("div",{children:o.map((i,c)=>i.textureImage?s.jsxs(CS,{link:i.slug?i.slug:null,TOGGLE_STYLE_MODIFIER:r,children:[s.jsx(p.ToggleStyle.DisabledAdornment,{}),s.jsx(p.ToggleStyle.Texture,{children:s.jsx(at.Image,{alt:i.textureAlt,src:i.textureImage,height:34,width:34,style:{borderRadius:0,height:"100%"}})})]},`similars-item-${c}`):null)})},wS=({children:e,productId:t,PDP_INFO:r,TEXTURE_IMAGE:n,TOGGLE_STYLE_MODIFIER:o})=>{const{items:i,loadSimilars:c}=kc(t,{filterTexture:n});return j.useEffect(()=>{c()},[c]),s.jsxs("div",{className:me.similars,children:[s.jsxs("div",{className:me["similars-info"],children:[s.jsx("span",{className:me["sections-title"],children:r.product.color_title}),e]}),s.jsx(Xm,{productId:t,similars:i,TOGGLE_STYLE_MODIFIER:o})]})},ES=()=>{const{colorName:e}=Et();return s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:e.length===0?"":me["accessibility-info"],children:s.jsx("p",{children:e})})})},ei=({className:e,titleId:t})=>{var o,i,c;const{productName:r,tag:n}=Et();return s.jsxs("div",{className:p.helpers.classNameConcat(me.header,e),children:[n!=null&&n.commercial?s.jsx(p.Tag,{size:"small",title:(o=n.commercial)==null?void 0:o.value,variant:"quaternary",adornment:{start:(i=n.commercial)!=null&&i.icon?s.jsx(p.Icon,{name:n.commercial.icon}):null},children:(c=n.commercial)==null?void 0:c.value}):null,s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h1",{id:t,children:r})})})]})};ei.displayName="PDP.PDPHeader";const Uc=({layout:e="horizontal"})=>{const{price:t,listPrice:r,installments:n}=Et(),{count:o,value:i}=n,c=U.formatPriceToCurrency(r??0,!0),l=U.formatPriceToCurrency(t??0,!0),u=U.formatPriceToCurrency(i??0);return s.jsx(p.ProductInfo.Root,{size:"small",layout:e,children:s.jsxs(p.ProductInfo.Wrapper,{layout:e,size:"small",className:me["price-wrapper"],children:[s.jsx(p.ProductInfo.ValuesWrapper,{children:t!==r?s.jsxs(s.Fragment,{children:[s.jsx(p.ProductInfo.Price,{label:"originalPrice",value:c.toString(),size:"small"}),s.jsx(p.ProductInfo.Price,{label:"discountPrice",value:l.toString(),size:"small"})]}):s.jsx(p.ProductInfo.Price,{label:"defaultPrice",value:l.toString(),size:"small"})}),o&&o>1&&i?s.jsx(p.ProductInfo.Price,{label:"installment",value:`ou ${o}x ${u}`,size:"small"}):null]})})},Wa=({onAddCallBack:e,onDisabledClickCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:n})=>{const o=Ms(),{productId:i,productData:c,price:l,listPrice:u,thumbImage:d,isKit:h}=Et(),{isMobile:m}=xe(),{addToCart:_}=Xe(),{sendDataLayerEvent:g}=Ee(),v=!h&&(!o.sku||!o.available),x=()=>{if(v&&typeof t=="function"){t();return}typeof e=="function"&&e({id:o.sku,quantity:o.quantity,seller:o.sellerId,sku:i}),_({id:o.sku,quantity:o.quantity,seller:o.sellerId},{id:i,texture:d==null?void 0:d.imageUrl}),g({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...c,price:l,listPrice:u}]},supportData:{selectedSkus:[o]},customData:{quantity:o.quantity}}})};return s.jsx(p.Button,{className:me["add-to-cart"],size:m?(r==null?void 0:r.mobile)??"large":(r==null?void 0:r.desktop)??"x-large",onClick:x,children:o.sku&&o.available?`${n.add_to_cart}`:`${n.select_size}`})},IS=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t})=>{const{isMobile:r}=xe(),n=Ms(),{sizesContainerRef:o}=Hd(),{structureRef:i}=Ze();return n.sku&&n.available?s.jsx(Wa,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t}):s.jsx(p.Button,{className:me["add-to-cart"],size:r?(e==null?void 0:e.mobile)??"large":(e==null?void 0:e.desktop)??"x-large",onClick:()=>{o.current&&i.current&&window.document.body.scrollTo({top:o.current.offsetTop-i.current.offsetHeight,behavior:"smooth"})},children:n.sku&&n.available?t.add_to_cart:t.select_size})},vo=({value:e,label:t,suppressHydrationWarning:r=!1},n)=>{const o={value:e,...r&&{suppressHydrationWarning:!0}},i=n==="compact"?o:{...o,label:t};return s.jsx(p.Timer.Digit,{...i})},qo=({dateEnd:e,dateInit:t,type:r="default",TIME_ZONE:n,...o})=>{const[i,c]=j.useState(pp(new ba.TZDate(Date.now(),n),new ba.TZDate(e,n))),[l,u]=j.useState(!1);if(j.useEffect(()=>{u(!0);const g=setInterval(()=>{c(v=>v<=0?(clearInterval(g),0):v-1e3)},1e3);return()=>clearInterval(g)},[]),!l||i<=0)return s.jsx(s.Fragment,{});const d=_s(i,"days"),h=_s(i,"hours"),m=_s(i,"minutes"),_=_s(i);return s.jsxs(p.Timer.Root,{...o,children:[d?s.jsxs(s.Fragment,{children:[vo({value:d,label:"dias"},r),s.jsx(p.Timer.Separator,{})]}):null,vo({value:h,label:"horas"},r),s.jsx(p.Timer.Separator,{}),vo({value:m,label:"min"},r),s.jsx(p.Timer.Separator,{}),vo({value:_,label:"segs",suppressHydrationWarning:!0},r)]})},Hc=({TIME_ZONE:e})=>{const{tag:t}=Et(),r=t==null?void 0:t.flagGoldenPdp,n=j.useMemo(()=>{var o;if((o=r==null?void 0:r.tagImage)!=null&&o.includes("player.vimeo")){const i=r.tagImage.split("?")[1],c=i==null?void 0:i.split("&"),l=c==null?void 0:c.filter(d=>d.includes("loc")||d.includes("signature")||d.includes("user_id")),u=l==null?void 0:l.join("&");return`${r.tagImage.split("?")[0]}?${u}`}return r==null?void 0:r.tagImage},[r==null?void 0:r.tagImage]);return r!=null&&r.enableTag?s.jsxs("div",{className:me["golden-tag"],style:(r==null?void 0:r.backgroundSelect)==="color"?{backgroundColor:r==null?void 0:r.backgroundColor}:(r==null?void 0:r.backgroundSelect)==="image"?{backgroundImage:`url(${r==null?void 0:r.tagImage})`}:void 0,children:[(r==null?void 0:r.backgroundSelect)==="video"&&s.jsx("div",{className:me["golden-tag-video"],children:s.jsx(at.Video,{src:n,autoPlay:!0,muted:!0,loop:!0,playsInline:!0})}),s.jsxs("div",{className:me["golden-tag-content"],children:[s.jsx("span",{className:me["golden-tag-content-text"],style:{color:r==null?void 0:r.textColor},children:r==null?void 0:r.value}),(r==null?void 0:r.countDownEndDate)&&s.jsx(qo,{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};Hc.displayName="PDP.GoldenTag";const PS=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t,TIME_ZONE:r,Z_INDEX_WAR:n})=>{const{isMobile:o}=xe();return o?s.jsxs(p.Card,{className:me["bottom-navigation"],shadow:!0,style:{zIndex:n.pdp_bottom_navigation},children:[s.jsxs("div",{className:me["bottom-navigation__header"],children:[s.jsx(Hc,{TIME_ZONE:r}),s.jsxs("div",{className:me["bottom-navigation__header-content"],children:[s.jsx(ei,{}),s.jsx(Uc,{layout:"name-vertical"})]})]}),s.jsx(IS,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t})]}):null},NS=({children:e,setShowBottomNavigation:t})=>{const r=j.useRef(null),n=fc(r),o=j.useRef(n);return j.useEffect(()=>{var c;const{top:i}=((c=r.current)==null?void 0:c.getBoundingClientRect())??{top:0};o.current!==n&&i>0&&(t(!n),o.current=n)},[n]),s.jsx("div",{ref:r,style:{width:"100%"},children:e})},RS=({ICONS:e})=>{const{isMobile:t}=xe(),{price:r,listPrice:n,productData:o,productId:i}=Et(),{sendDataLayerEvent:c}=Ee(),l=ts(),{toggleProduct:u}=xn();return s.jsx(p.Button,{adornment:{start:s.jsx(p.Icon,{name:e[l.includes(i)?"favorite_true":"favorite_false"],size:"medium"})},className:me["add-to-wishlist"],size:t?"medium":"x-large",variant:"tertiary",onClick:()=>{u(i),c({functionKey:"productEvents",data:{event:l.includes(i)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:"PDP"},commonData:{...o,price:r,listPrice:n}}})}})},Jm=({showWishlist:e=!0,callBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:n,ICONS:o,TIME_ZONE:i,Z_INDEX_WAR:c})=>{const{isMobile:l}=xe(),[u,d]=j.useState(!0);return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:me.actions,children:[l?s.jsx(NS,{setShowBottomNavigation:d,children:s.jsx(Wa,{onAddCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:n})}):s.jsx(Wa,{onAddCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:n}),e&&s.jsx(RS,{ICONS:o})]}),l&&u&&s.jsx(PS,{addToCartBtnSize:r,BUY_BUTTON_LABELS:n,Z_INDEX_WAR:c,TIME_ZONE:i})]})},Zm=({className:e,device:t,ICONS:r})=>{const{breadcrumbList:n,productName:o}=Et(),i=c=>c.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return s.jsx(p.BreadCrumb.DivWrapper,{className:p.helpers.classNameConcat(me.breadcrumb,[t==="mobile"?me["breadcrumbs-mobile"]:me["breadcrumbs-desktop"],e]),children:s.jsxs(p.BreadCrumb.List,{children:[Array.isArray(n)&&n.map((c,l)=>{const u=i(n.slice(0,l+1).map(d=>d.replace(/\s/g,"-").toLowerCase()).join("/"));return s.jsx(p.BreadCrumb.Item,{adornment:{end:s.jsx(p.Icon,{name:r.arrow_right})},role:"listitem",children:s.jsx(Tt,{href:`/${u}`,children:c})},`pdp-breadcrumb-${u}-${l}`)}),s.jsx(p.BreadCrumb.Item,{role:"listitem",className:p.helpers.classNameConcat(me["breadcrumb--active"],e),children:o},"pdp-breadcrumb-productName")]})})};Zm.displayName="PDP.BreadCrumb";const e_=({className:e})=>{var n;const{tag:t}=Et(),r=t==null?void 0:t.flagPdp;return r&&((n=r==null?void 0:r.value)!=null&&n.length)?s.jsx(p.Tag,{className:p.helpers.classNameConcat(me.credits,e),variant:"tertiary",title:r==null?void 0:r.value,size:"small",adornment:{start:r!=null&&r.enableIcon&&(r!=null&&r.icon)?s.jsx(p.Icon,{name:r==null?void 0:r.icon,style:{color:r==null?void 0:r.iconColor}}):null},style:{background:r==null?void 0:r.tagColor,color:r==null?void 0:r.textColor},children:r==null?void 0:r.value}):s.jsx(s.Fragment,{})};e_.displayName="PDPCredits";const TS=()=>{const{descriptionContent:e,productReference:t}=Et(),[r,n]=j.useState("description");return s.jsxs(p.Tabs.Root,{className:me["tabs-root-modifier"],children:[s.jsx(p.Tabs.TabList,{className:me["tabs-list-modifier"],children:e==null?void 0:e.map(({label:o,value:i})=>s.jsx(p.Tabs.Item,{label:o,value:i,activeTab:r,onTabChange:n,size:"large",className:`${me["tabs-item-modifier"]} ${r===i?me["tabs-item-active"]:""}`},i))}),s.jsxs("div",{className:me["content-wrapper"],children:[r==="description"?s.jsx("div",{children:s.jsxs("span",{className:me.productref,children:["Ref:",t]})}):"",e==null?void 0:e.map(({value:o,content:i})=>r===o?s.jsx(p.Tabs.Panel,{className:`${me["tabs-panel"]} ${r===o?me["tabs-panel-enter"]:me["tabs-panel-exit"]}`,children:s.jsx("div",{className:me.content,dangerouslySetInnerHTML:{__html:i}})},o):null)]})]})},OS=({CURRENCY:e,DELIVERY_INFO_BOXES_ALLOWED:t,FREIGHT_CALCULATION:r,Z_INDEX_WAR:n})=>{const o=Ms(),{isMobile:i}=xe();return s.jsxs(s.Fragment,{children:[i?s.jsx(p.Utils.Divider,{direction:"horizontal",size:"small"}):null,s.jsx(ym,{skuId:o.available?o.sku:"",size:i?r.inputSize.mobile:r.inputSize.desktop,quantity:o.quantity,sellerId:o.sellerId,seller:o.sellerName,local:"PDP",CONSTANTS_PROPS:{freightConfig:r,deliveryInfoBoxesAllowed:t,toolTipZIndex:n.modal,currency:e}}),i?s.jsx(p.Utils.Divider,{direction:"horizontal",size:"small"}):null]})},rd=({image:e,index:t,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:n})=>{const o=U.resizingImg(e.imageUrl,n.pdp),{nextimage:i}=Ae();return s.jsx(i,{src:o,alt:e.imageLabel,objectFit:"contain",...n.pdp,...t<=1&&{priority:!0,loading:"eager"},onClick:()=>{r(t)}},t)},AS=({video:e,productName:t,poster:r})=>{const{sendDataLayerEvent:n}=Ee(),o=j.useRef(!1);return s.jsx(at.Video,{src:e,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,style:{zIndex:-1,aspectRatio:"2/3"},onPlaying:()=>{o.current||(o.current=!0,n({functionKey:"readyEvents",data:{event:"video_start",readyData:{product:t}}}))},poster:r})},t_=({images:e,video:t,handleZoom:r,productName:n,PRODUCT_IMAGE_DIMENSIONS:o})=>{var d,h;const{initialize:i,pagination:c,controller:l,itemsStyles:u}=p.Carousel.useCarousel({gap:0,itemsPerPage:1,loop:!1,direction:"row"});return s.jsxs(p.Carousel.Root,{innerRef:m=>{i(m)},className:me["gallery-carousel-modifier"],children:[s.jsx(p.Carousel.Controller,{position:"absolute",top:"24px",bottom:"unset",left:"16px",children:s.jsx(p.Carousel.Bullets,{page:c.currentPage,total:e.length,onBulletClick:m=>l==null?void 0:l.navigateTo(m)})}),s.jsxs(p.Carousel.Body,{children:[s.jsx(p.Carousel.Item,{style:u,children:s.jsx(rd,{image:e[0],index:0,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:o})},"PDP_gallery_0"),t&&s.jsx(p.Carousel.Item,{style:u,children:s.jsx(AS,{video:t,productName:n,...((d=e[1])==null?void 0:d.imageUrl)&&{poster:(h=e[1])==null?void 0:h.imageUrl}})},"PDP_gallery_video"),e.map((m,_)=>_===0?null:s.jsx(p.Carousel.Item,{style:u,children:s.jsx(rd,{image:m,index:_,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:o})},`PDP_gallery_${_}`))]})]})};t_.displayName="PDP.Carousel";const kS="_thumbs_1954e_65",MS="_selected_1954e_92",LS="_carousel_1954e_164",DS="_bullets_1954e_201",it={"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:kS,selected:MS,"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:LS,"carousel-controller":"_carousel-controller_1954e_169","arrow-left":"_arrow-left_1954e_179","arrow-right":"_arrow-right_1954e_180",bullets:DS,"zoom-popup":"_zoom-popup_1954e_212","image-zoom--mobile":"_image-zoom--mobile_1954e_252","image-zoom--image--img":"_image-zoom--image--img_1954e_282"},nd=({onClose:e,ICONS:t})=>s.jsx("div",{className:`${it["button-close-container"]}`,children:s.jsx(p.Button,{iconNameStart:t.close,iconSize:"medium",className:`${it["button-close"]}`,variant:"tertiary",state:"default",size:"medium",onClick:e,style:{textDecoration:"none"}})}),FS=({children:e,Z_INDEX_WAR:t,...r})=>s.jsx("div",{...r,className:it["image-zoom-wrapper-desktop"],style:{zIndex:t.pdp_image_zoom},children:e}),r_=({images:e,setCurrent:t,setFirstImgLoaded:r,ICONS:n,PRODUCT_IMAGE_DIMENSIONS:o})=>{const{nextimage:i}=Ae();let c=null;const l=j.useRef(null),{initialize:u,controller:d,pagination:h,itemsStyles:m}=p.Carousel.useCarousel({itemsPerPage:1,gap:10,loop:!1,direction:"row"}),_=v=>{d==null||d.navigateTo(v)},g=()=>{r(!0)};return j.useEffect(()=>{t(h.currentPage)},[h.currentPage,t]),s.jsxs(p.Carousel.Root,{innerRef:v=>{v&&!c&&(c=v,u(c))},className:it.carousel,children:[s.jsxs(p.Carousel.Controller,{className:it["carousel-controller"],children:[s.jsx(p.Button,{variant:"tertiary",onClick:()=>d==null?void 0:d.prevPage(),className:it["arrow-left"],adornment:{start:s.jsx(p.Icon,{name:n.arrow_left})}}),s.jsx(p.Button,{variant:"tertiary",onClick:()=>d==null?void 0:d.nextPage(),className:it["arrow-right"],adornment:{start:s.jsx(p.Icon,{name:n.arrow_right})}})]}),s.jsx(p.Carousel.Body,{children:Array.isArray(e)&&e.map((v,x)=>s.jsx(p.Carousel.Item,{style:m,children:s.jsx(i,{...o.image_zoom.mobile,...x===0&&{priority:!0,loading:"eager"},ref:l,className:it.imageMobile,src:v.imageUrl,alt:v.imageText,quality:100,...x===0&&{onLoad:g}})},x))}),s.jsx(p.Carousel.Bullets,{className:it.bullets,page:h.currentPage,total:h.totalPages,onBulletClick:_})]})};r_.displayName="ImageZoom.Mobile.Carousel";const n_=({imgRef:e,image:t,PRODUCT_IMAGE_DIMENSIONS:r})=>{Xd();const{nextimage:n}=Ae();return s.jsx("div",{className:it["image-zoom--image"],ref:e,children:s.jsx(n,{...r.image_zoom.mobile,alt:t.imageText,className:it["image-zoom--image--img"],quality:100,src:t.imageUrl})})};n_.displayName="ImageZoom.ImageZoom";const s_=({loaded:e=!1})=>s.jsx("div",{className:it["zoom-popup"],"data-loaded":e,children:s.jsxs("svg",{width:"38",height:"39",viewBox:"0 0 38 39",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.93 5.382a3.711 3.711 0 0 1 2.55-1.007c.949 0 1.864.36 2.549 1.007a3.534 3.534 0 0 1 1.113 2.472v11.357l10.118 3.332c.587.193 1.1.56 1.465 1.053.366.494.565 1.089.566 1.7v.004c0 .22-.025.44-.075.653v.005l-2.98 12.52a.625.625 0 0 1-1.215-.29l2.977-12.515v-.002c.029-.122.043-.247.044-.372a1.619 1.619 0 0 0-.321-.958 1.729 1.729 0 0 0-.851-.61L24.32 20.257a.625.625 0 0 1-.43-.594V7.88a2.285 2.285 0 0 0-.72-1.59 2.462 2.462 0 0 0-1.691-.665c-.635 0-1.241.24-1.69.666a2.285 2.285 0 0 0-.722 1.59v19.04a.625.625 0 0 1-1.115.388l-.056-.071-.161-.202a178.922 178.922 0 0 0-2.333-2.858l-.002-.002a2.581 2.581 0 0 0-.897-.69 2.677 2.677 0 0 0-1.122-.25H12.37c-.307 0-.61.078-.874.225a1.712 1.712 0 0 0-.635.61 1.625 1.625 0 0 0-.016 1.653l7.128 12.296a.625.625 0 0 1-1.082.627L9.762 26.35a2.876 2.876 0 0 1 .027-2.924 2.962 2.962 0 0 1 1.098-1.057 3.05 3.05 0 0 1 1.482-.384h1.016c.57.002 1.133.127 1.648.368.515.24.97.59 1.33 1.024.514.614 1.026 1.239 1.455 1.768V7.855a3.535 3.535 0 0 1 1.113-2.473ZM6.446 10.22a.625.625 0 0 1 0 .884l-5.324 5.324a.625.625 0 0 1-.884-.884l5.324-5.324a.625.625 0 0 1 .884 0Z"}),s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.68 12.033c.345 0 .625.28.625.625v2.703h2.702a.625.625 0 1 1 0 1.25H.68a.625.625 0 0 1-.625-.625v-3.328c0-.345.28-.625.625-.625ZM16.429.237a.625.625 0 0 1 0 .884l-5.325 5.324a.625.625 0 0 1-.884-.883L15.545.237a.625.625 0 0 1 .884 0Z"}),s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.034.68c0-.346.28-.626.625-.626h3.328c.345 0 .625.28.625.625v3.328a.625.625 0 1 1-1.25 0V1.304h-2.703a.625.625 0 0 1-.625-.625Z"})]})});s_.displayName="ImageZoom.ZoomPopup";const o_=({images:e,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:r,...n})=>{const[o,i]=j.useState(!1),[c,l]=j.useState(0),{containerRef:u,imgRef:d,scale:h}=Jd({defaultScale:1,maxScale:3});return s.jsxs("div",{...n,className:it["image-mobile"],"data-disable-carrousel-pan":h>1,children:[s.jsx(s_,{loaded:o}),s.jsx(r_,{images:e,setCurrent:l,setFirstImgLoaded:i,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:r}),s.jsx("div",{className:it["image-zoom--mobile"],ref:u,children:s.jsx(n_,{imgRef:d,image:e[c],PRODUCT_IMAGE_DIMENSIONS:r})})]})};o_.displayName="ImageZoom.ImageMobile";const zS=({children:e,Z_INDEX_WAR:t,...r})=>s.jsx("div",{...r,className:it["image-zoom-wrapper-mobile"],style:{zIndex:t.pdp_image_zoom},children:e}),qS="_modal_1u87b_1",fr={modal:qS,"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 BS({headerTitle:e,isMobile:t,ICONS:r}){return s.jsx(p.Modal.Header,{navigation:"top",className:fr["modal-header"],children:s.jsxs(p.Modal.Controls,{navigation:"top",isMobile:t,children:[s.jsx("div",{className:fr["modal-header__title"],children:s.jsx(p.Modal.Title,{navigation:"top",className:fr["quick-shop__title"],title:e})}),s.jsx(p.Button,{className:fr["modal-header__close-button"],"data-close":!0,iconNameStart:r.close,size:"small",variant:"tertiary"})]})})}const i_=({PDP_INFO:e,PLP_SIZE_ORDER:t,ICONS:r,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:i,Z_INDEX_WAR:c})=>{const{sizes:l,productId:u,handleViewItemEvent:d}=Et(),h=j.useMemo(()=>l!=null&&l.length?oh({items:l,getLabel:C=>C.value,PLP_SIZE_ORDER:t}):[],[l]),{sizesContainerRef:m}=Hd(),{isMobile:_}=xe(),g=Ms(),v=yf(),{setValue:x}=mf(),{setValue:S}=gc(),w=j.useRef({}),[P,I]=j.useState(null);return s.jsxs("div",{ref:m,className:p.helpers.classNameConcat(me.sizes,"PDP_sizes"),children:[s.jsx("span",{className:me["sections-title"],children:e.product.size_title}),s.jsx("div",{children:h.map(C=>(!C.available&&!w.current[C.value]&&(w.current[C.value]={disable:!C.available,size:C.value,skuID:C.sku}),s.jsxs(p.ToggleSize.Wrapper,{size:_?"medium":"large",title:C.value,outOfStock:!C.available,onClick:()=>{C.available||(I({skuID:C.sku,size:C.value,disable:!0}),S(!0)),g.sku!==C.sku&&(x({...g,productId:u,name:C.name,size:C.value,sku:C.sku,sellerId:C.sellerId,sellerName:C.sellerName,available:C.available}),d({sku:C.sku,size:C.value}))},active:g.sku===C.sku,children:[s.jsx(p.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),s.jsx(p.ToggleSize.Text,{children:C==null?void 0:C.value})]},`sizes-${C.sku}-${C.value}`)))}),s.jsx(Ic,{open:v,setVisible:S,sku:P,setSku:I,skus:Object.values(w.current),ICONS:r,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:i,Z_INDEX_WAR:c})]})},gs=({children:e,className:t,type:r})=>s.jsx("div",{className:p.helpers.classNameConcat(me["pdp-main__info-subsection"],[me[`subsection-${r}`],t]),children:e}),a_=({children:e,className:t})=>{const{structureRef:r,tipbarRef:n}=Ze(),o=j.useMemo(()=>{var l,u;const i=((l=r.current)==null?void 0:l.clientHeight)||0,c=((u=n.current)==null?void 0:u.clientHeight)||0;return i+c},[r,n]);return s.jsx("div",{className:p.helpers.classNameConcat(me["pdp-main__info"],t),id:"pdpmaininfo",style:{top:o},children:e})},c_=({TEXTURE_IMAGE:e,TOGGLE_STYLE_MODIFIER:t})=>{const{productId:r}=Et(),{items:n,loadSimilars:o}=kc(r,{filterTexture:e});return j.useEffect(()=>{o()},[o]),s.jsxs("div",{className:me.similars,children:[s.jsx("span",{className:me["sections-title"],children:"Cor"}),s.jsx(Xm,{productId:r,similars:n,TOGGLE_STYLE_MODIFIER:t})]})};c_.displayName="PDP.Info.Similars";const US=({callBackProductAdded:e,BUY_BUTTON_LABELS:t,ICONS:r,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:o,PDP_INFO:i,PLP_SIZE_ORDER:c,PRODUCT_CARD_TEXTS:l,TEXTURE_IMAGE:u,TIME_ZONE:d,TOGGLE_STYLE_MODIFIER:h,Z_INDEX_WAR:m})=>s.jsx(p.Modal.Body,{className:fr["modal-product-body"],children:s.jsxs(a_,{className:fr["pdp-main__info-modifier"],children:[s.jsxs(gs,{type:"product-info",children:[s.jsx(ei,{}),s.jsx(Uc,{})]}),s.jsx(gs,{type:"similars",children:s.jsx(c_,{TEXTURE_IMAGE:u,TOGGLE_STYLE_MODIFIER:h})}),s.jsx(gs,{type:"sizes",children:s.jsx(i_,{ICONS:r,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:o,PDP_INFO:i,PLP_SIZE_ORDER:c,PRODUCT_CARD_TEXTS:l,Z_INDEX_WAR:m})}),s.jsx(gs,{type:"actions",children:s.jsx(Jm,{showWishlist:!1,callBack:e,addToCartBtnSize:{mobile:"medium",desktop:"large"},BUY_BUTTON_LABELS:t,ICONS:r,TIME_ZONE:d,Z_INDEX_WAR:m})})]})});function HS({callBackProductAdded:e,QUICKSHOP:t,ICONS:r,...n}){const[o,i]=j.useState(!1),c=()=>i(l=>!l);return s.jsxs("div",{className:fr["quick-shop"],children:[s.jsx(p.Button,{onClick:c,size:"x-large",className:fr["shop-bag"],iconNameStart:r.bag,iconSize:"medium"}),s.jsxs(p.Modal.Root,{isOpen:o,setIsOpen:i,className:`${fr.modal} ${fr["quick-shop__modal"]}`,style:{position:"fixed",height:"100svh",width:"100%",top:0,zIndex:1e3,bottom:"unset",overflowY:"hidden"},variant:"sideRight",children:[s.jsx(BS,{headerTitle:t.title,ICONS:r}),s.jsx(US,{callBackProductAdded:e,ICONS:r,...n})]})]})}const $S=({image:e})=>s.jsx(Es,{src:U.resizingImg(e.imageUrl,{width:50,height:75})||"",alt:e.imageText,className:it.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:10,style:{position:"absolute",inset:0,filter:"blur(10px)"}}),WS=({images:e,selectedImageIndex:t,PRODUCT_IMAGE_DIMENSIONS:r,...n})=>{const[o,i]=j.useState(!1),{nextimage:c}=Ae();return s.jsx("div",{...n,className:it["main-image-container"],children:s.jsxs("div",{className:it["image-desktop"],children:[!o&&s.jsx($S,{image:e==null?void 0:e[t]}),s.jsx(c,{src:U.resizingImg(e==null?void 0:e[t].imageUrl,{...r.image_zoom.desktop})||"",alt:e==null?void 0:e[t].imageText,className:it.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:100,onLoad:()=>{i(!0)}})]})})},VS=({images:e,onThumbnailClick:t,selectedImageIndex:r})=>{const{nextimage:n}=Ae();return s.jsx("div",{className:it.thumbs,children:e.map((o,i)=>s.jsx("div",{role:"button",tabIndex:0,onClick:()=>t(i),onKeyDown:c=>{(c.key==="Enter"||c.key===" ")&&t(i)},className:i===r?it.selected:"",children:s.jsx(n,{src:o.imageUrl,alt:o.imageText,layout:"responsive",width:100,height:100,objectFit:"cover",priority:!1})},i))})},l_=({images:e,initialSelectedImageIndex:t=0,setShowImageZoom:r,ICONS:n,PRODUCT_IMAGE_DIMENSIONS:o,Z_INDEX_WAR:i,...c})=>{const{isMobile:l}=xe(),[u,d]=j.useState(t),h=m=>{d(m)};return l?s.jsxs(zS,{Z_INDEX_WAR:i,children:[s.jsx(nd,{onClose:()=>r({show:!1,initialIndex:0}),ICONS:n}),s.jsx(o_,{images:e,ICONS:n,PRODUCT_IMAGE_DIMENSIONS:o})]}):s.jsxs(FS,{Z_INDEX_WAR:i,children:[s.jsx(nd,{onClose:()=>r({show:!1,initialIndex:0}),ICONS:n}),s.jsx(WS,{images:e,selectedImageIndex:u,onThumbnailClick:h,PRODUCT_IMAGE_DIMENSIONS:o},e[u].imageId??`${e[u].imageText}-${u}`),s.jsx(VS,{images:e,selectedImageIndex:u,onThumbnailClick:h}),s.jsx(HS,{callBackProductAdded:()=>{r({initialIndex:0,show:!1})},ICONS:n,Z_INDEX_WAR:i,...c})]})};l_.displayName="ImageZoom";const GS=({productImgs:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})=>{const{video:n,productName:o}=Et(),[i,c]=j.useState({show:!1,initialIndex:0});j.useEffect(()=>(i.show?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll"),()=>{document.body.classList.remove("no-scroll")}),[i]);const l=u=>{c({show:!0,initialIndex:u})};return s.jsxs(s.Fragment,{children:[s.jsx(t_,{images:e,video:n,handleZoom:l,productName:o,PRODUCT_IMAGE_DIMENSIONS:t}),i.show&&s.jsx(l_,{images:e,initialSelectedImageIndex:i.initialIndex,setShowImageZoom:c,PRODUCT_IMAGE_DIMENSIONS:t,...r})]})},u_=({TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})=>{const{images:n}=Et(),o=j.useMemo(()=>{const i=n.filter(c=>!e.includes(c.imageLabel));return i.length>0?i:n},[]);return s.jsx(GS,{productImgs:o,TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})};u_.displayName="PDP.Gallery";const KS=({className:e,hasIcons:t=!0,ICONS:r,PDP_INFO:n})=>{const{allSizesAvailable:o,productId:i}=Et(),{setValue:c}=gc(),{sendDataLayerEvent:l}=Ee();return s.jsx("div",{className:p.helpers.classNameConcat(me.links,e),id:"pdp-container","data-product-id":i,children:s.jsxs("div",{className:me["links-wrapper"],children:[!o&&s.jsx(p.Button,{adornment:t?{start:s.jsx(p.Icon,{name:r.product})}:{},size:"x-small",variant:"tertiary",onClick:()=>c(!0),underline:!0,children:n.links_and_stepper.size_out_of_stock}),s.jsx(p.Button,{adornment:t?{start:s.jsx(p.Icon,{name:r.ruler})}:{},size:"x-small",variant:"tertiary",underline:!0,onClick:()=>{var u,d;(d=window.SizebayParams)==null||d.openChart((u=window.SizebayParams)==null?void 0:u.id),l({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:"pdp:guia-de-medidas"}}})},children:n.links_and_stepper.size_table_title}),s.jsx(p.Button,{size:"x-small",variant:"tertiary",className:"sizebay",underline:!0,onClick:()=>{var u,d;return(d=window.SizebayParams)==null?void 0:d.openVFR((u=window.SizebayParams)==null?void 0:u.id)},children:n.links_and_stepper.sizebay})]})})},QS=({children:e})=>s.jsx("div",{className:me["pdp-main__info-main-content"],children:e}),YS=({head:e,className:t})=>s.jsx("thead",{className:t,children:s.jsx("tr",{children:e.map((r,n)=>s.jsx("th",{children:r},`head-title-${n}`))})}),XS=({rows:e,className:t})=>s.jsx("tbody",{className:t,children:e.map((r,n)=>s.jsx("tr",{children:r.map(o=>typeof o=="string"&&o.includes("blocks")?JSON.parse(o).blocks.map(i=>`${i.text}
|
|
18
|
+
`):o).map((o,i)=>s.jsx("td",{children:o},`cell-content-${i}`))},`row-content-${n}`))}),JS="_tableContainer_1yxy2_1",ZS={tableContainer:JS},eC=({children:e,className:t=""})=>s.jsx("table",{className:`${ZS.tableContainer} ${t}`,children:e}),Oo={Head:YS,Rows:XS,Root:eC},tC=({title:e,text:t})=>s.jsxs("p",{className:me.measurementRowsText,children:[s.jsx("h1",{className:me.measurementRowsTitle,children:e}),t]}),rC=({ICONS:e,SIZES:t,Z_INDEX_WAR:r})=>{const n=bf(),{setValue:o}=jf();return s.jsx(p.Modal.Root,{isMobile:!0,style:{zIndex:r.modal},setIsOpen:o,isOpen:n,className:me.measurementModal,children:s.jsx(p.Modal.Body,{children:s.jsxs("div",{className:me.measurementContainer,children:[s.jsx("h1",{className:me.measurementTitle,children:t.title}),s.jsxs("div",{className:me.measurementContent,children:[s.jsx("div",{className:me.measurementImageContainer,children:s.jsx(Es,{width:264,height:402,alt:"",className:me.measurementImage,src:t.bannerImage})}),s.jsxs(Oo.Root,{className:me.measurementTable,children:[s.jsx(Oo.Head,{className:me.measurementHead,head:t.head}),s.jsx(Oo.Rows,{className:me.measurementRows,rows:t.rows.map((i,c)=>[s.jsx(tC,{title:t.descriptions[c].title,text:t.descriptions[c].text},c),...i])})]})]}),s.jsx(p.Button,{onClick:()=>o(!1),className:me.measurementClose,variant:"tertiary",children:s.jsx(p.Icon,{name:e.close})})]})})},"minicart")},nC=({children:e,className:t,...r})=>s.jsx("div",{className:p.helpers.classNameConcat(me["pdp-main__gallery-wrapper"],t),...r,children:e}),sC=({children:e,className:t,...r})=>s.jsx("div",{className:p.helpers.classNameConcat(me.pdp,t),...r,children:e}),oC=({children:e,className:t,...r})=>s.jsx("div",{className:p.helpers.classNameConcat(me["pdp-main"],t),...r,children:e}),iC=({children:e,className:t,...r})=>s.jsx("div",{className:p.helpers.classNameConcat(me["pdp-main__info-secondary-content"],t),...r,children:e}),aC={gallery:nC,pdp:sC,main:oC,secondary:iC},cC=({className:e,...t})=>s.jsx(p.Utils.Divider,{...t,className:p.helpers.classNameConcat(me.divider,e)}),lC=Object.freeze(Object.defineProperty({__proto__:null,AccessibilityInfo:ES,Actions:Jm,BreadCrumb:Zm,Credits:e_,DescriptionsTabs:TS,Divider:cC,Freight:OS,Gallery:u_,GoldenTag:Hc,Header:ei,Links:KS,MainContent:QS,MainInfo:a_,PDPSimilars:wS,Price:Uc,ProductMeasurements:rC,Sizes:i_,SubSectionWrapper:gs,containers:aC},Symbol.toStringTag,{value:"Module"})),d_=(e,t)=>{const[r,n]=Pm({items:e}),[o,i]=t.split(":").map(Number);return isNaN(o)||isNaN(i)?[r,n]:[r<o?r:o,n>i?n:i]},f_=j.createContext({}),p_=({children:e,fetch:t,queryKey:r,options:n})=>{const{data:o,isLoading:i,isFetched:c,refetch:l,isRefetching:u,error:d}=Mv({queryKey:r,queryFn:async()=>{const h=await t();if(!h.ok)throw new Error("[ROOT QUERY PROVIDER ERROR]: NOT LOAD!");return h.json()},...n});return s.jsx(f_.Provider,{value:j.useMemo(()=>({data:o,refetch:l,isLoading:i,isFetched:c,isRefetching:u,isError:!!d}),[o,l,i,c,u,d]),children:e})},h_=()=>{const e=j.useContext(f_);if(e===void 0)throw new Error("useProductsContext must be used within a useRootContext");return e},m_=j.createContext({}),uC=({children:e})=>{const{router:t}=Ae(),{constants:{PLP_SORT_DEFAULT:r}}=ut(),{reset:n}=Ur(),{searchParams:o}=ft(),{data:i,isLoading:c,...l}=h_(),u=j.useCallback((v,x)=>{if(x){if(v.key.toLocaleLowerCase()==="price"){const S=x.getAll("facets");x.delete("facets"),S.forEach(w=>{const[P]=w.split("/");P!==v.key&&x.append("facets",w)})}x.set("page","1"),n(),x.append("facets",`${v.key}/${v.value}`),t.push(`?${x.toString()}`)}},[t,n]),d=j.useCallback(()=>{const v=new URLSearchParams;v.set("sort",r),v.set("page","1"),n(),t.push(`?${v.toString()}`)},[t,n,r]),h=j.useCallback((v,x)=>{if(!x||!x.has&&!x.has("facets"))return;const S=x.getAll("facets");x.delete("facets"),x.set("page","1"),S.forEach(w=>{const[P,I]=w.split("/");(P!==v.key||I!==v.value)&&x.append("facets",w)}),n(),t.push(`?${x.toString()}`)},[t,n]),m=j.useCallback(v=>{const x=o?new URLSearchParams(o):new URLSearchParams;for(const[,S]of x.entries()){const[w,P]=S.split("/");if(w===v.key&&P===v.value)return h(v,x)}return u(v,x)},[u,h,o]),_=j.useCallback(v=>{const x=o?new URLSearchParams(o):new URLSearchParams;x.set("sort",v.replace("_",":")),t.push(`?${x.toString()}`)},[t,o]),g=i&&"data"in i?i.data:null;return s.jsx(m_.Provider,{value:{...l,breadcrumb:(g==null?void 0:g.breadcrumb)??[],deleteAllFacets:d,facets:(g==null?void 0:g.facets)??[],isLoading:c,selectedFacets:U.getFacetsActiveSearchParams(o),onToggleFacet:m,onSort:_},children:e})},__=({children:e,enabled:t,...r})=>{const{state:n}=ft(),o=c=>c==="productclusterids"||c.startsWith("category-"),i=n.facets.filter(({key:c})=>o(c));return s.jsx(p_,{fetch:()=>U.fetchProxy("/_v/proxy/search/facets",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,facets:i})}),queryKey:["facets",n.base,n.term],options:{enabled:t??!0,gcTime:1e3*60*30,refetchOnWindowFocus:!1,placeholderData:ov,staleTime:1e3*60*30},children:s.jsx(uC,{...r,children:e})})},$c=()=>{const e=j.useContext(m_);if(e===void 0)throw new Error("use QueryFacetsContext must be used within a QueryFacetsProvider");return e},dC=()=>{var N;const{constants:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:n,PLP_FILTERS_TITLE:o,PLP_SIZE_ORDER:i},openFilters:c,setOpenFilters:l}=ut(),[u,d]=j.useState("10000:0"),{isMobile:h}=xe(),{sendDataLayerEvent:m}=Ee(),{state:_}=ft(),{breadcrumb:g,deleteAllFacets:v,facets:x,isLoading:S,onToggleFacet:w}=$c(),P=j.useRef(""),I={isLast:!0,href:(N=_.term)!=null&&N.length?`/${_.term}`:"",name:_.term},C=U.filterNonRootFacets(_.facets,_==null?void 0:_.base);return j.useEffect(()=>{const T=x.find(({key:O})=>O==="price");if(T){const[O,M]=d_(T.values,u??"10000:0");d(`${O}:${M}`)}},[x,u,d]),j.useEffect(()=>{if(!C.length)return;const T=JSON.stringify(C);P.current!==T&&(P.current=T,m({functionKey:"filterEvent",data:{commonData:{selectedFacets:C}}}))},[C]),s.jsxs(dn.teamComponents.Filter.Root,{CONSTANTS:{ICONS:e,PLP_FILTERS_TITLE:o,PLP_FILTERS:t},breadcrumb:g.length?g:[I],deleteAllFacets:v,filters:{facets:U.filterNonCategorySelected(x,_==null?void 0:_.base),selected:C},isMobile:h??!1,isLoading:S??!1,isOpen:c,price:u,onToggleFacet:w,setIsOpen:l,children:[s.jsx(dn.teamComponents.Filter.Selected,{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r}),s.jsx(dn.teamComponents.Filter.Content,{columns:2,CONSTANTS:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:n,PLP_SIZE_ORDER:i}})]})},g_=()=>typeof document>"u"?null:s.jsx(dC,{});g_.displayName="Filters";const fC=({productCount:e,PLP_GRID_SCROLL_BACK:t})=>{j.useEffect(()=>{var i;const n=new URLSearchParams(window.location.search).get("page");if(e){const[c,l]=((i=sessionStorage.getItem(t.key))==null?void 0:i.split("-"))??["0",null],u=sessionStorage.getItem(t.refer);c&&u==="true"&&(l===(n||"null")&&window.document.body.scrollTo({top:parseInt(c,10),behavior:"smooth"}),sessionStorage.setItem(t.refer,"false"))}const o=()=>{e>0&&window.document.body.scrollTop&&sessionStorage.setItem(t.key,`${window.document.body.scrollTop.toString()}-${n}`)};return window.document.body.addEventListener("scroll",o,{passive:!0}),()=>{window.document.body.removeEventListener("scroll",o)}},[e])},y_=j.createContext({}),pC=({callback:e,children:t})=>{const{data:r,isLoading:n,...o}=h_(),i=r&&"data"in r?r.data:null;return j.useEffect(()=>{i&&typeof e=="function"&&e({...i})},[i]),s.jsx(y_.Provider,{value:{...o,isLoading:n,products:(i==null?void 0:i.products)??[],pagination:(i==null?void 0:i.pagination)??Lv,total:(i==null?void 0:i.pagination.count)??0},children:t})},Wc=({callback:e,children:t,forceUpdate:r,options:n,state:o,queryKey:i})=>s.jsx(p_,{fetch:()=>U.fetchProxy("/_v/proxy/search/product",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...o,forceUpdate:r})}),queryKey:i,options:n,children:s.jsx(pC,{callback:e,children:t})}),qs=()=>{const e=j.useContext(y_);if(e===void 0)throw new Error("useQueryProductsContext must be used within a QueryProductsProvider");return e},Vc=({total:e=0})=>{const{constants:{SEARCH_TOTAL_PORTAL_ID:t}}=ut();if(typeof window>"u")return null;const r=document.getElementById(t);return r?uc.createPortal(s.jsxs("span",{children:["[",e,"] produto",e>1?"s":""]}),r):null};Vc.displayName="PDC.Grid.NavigationTotal";const hC=()=>{const{isMobile:e}=xe(),{constants:t,mainSeller:r}=ut(),{isLoading:n,products:o,pagination:{count:i}}=qs(),{ICONS:c,PLP_GRID_SCROLL_BACK:l,PLP_NOT_RESULT:u}=t;return fC({productCount:(o==null?void 0:o.length)??0,PLP_GRID_SCROLL_BACK:l}),o?s.jsxs(s.Fragment,{children:[s.jsx(tr.Products,{...t,isMobile:e??!1,items:o,StoreConfig_MainSellerId:r}),!o.length&&!n&&s.jsx(tr.Empty,{ICONS:c,PLP_NOT_RESULT:u}),s.jsx(Vc,{total:i})]}):null},v_=({infinite:e=!1})=>e?s.jsx(tr.InfiniteScroller,{}):s.jsx(hC,{});v_.displayName="Grid";const Tn=e=>({centro:"center",esquerda:"start",direita:"end"})[e],x_=({children:e,contentState:t,entityKey:r})=>{const{url:n}=t.getEntity(r).getData();return n?s.jsx(Tt,{href:n,children:e}):e},mC=(e,t,r)=>{e.findEntityRanges(n=>{const o=n.getEntity();return o===null?!1:r.getEntity(o).getType()==="LINK"},t)},Gc=e=>{const t=new ln.CompositeDecorator([{strategy:mC,component:x_}]),r=ln.convertFromRaw(e);return ln.EditorState.createWithContent(r,t)},_C=e=>ln.convertFromRaw(e),b_=ln.DefaultDraftBlockRenderMap.set("unstyled",{element:"div",aliasedElements:["div"]}),sd="superior-direita",xo="dentro-inferior-centro",gC="inferior-direita",da="dentro-inferior-esquerda",j_=e=>({position:e===xo||e===da?"absolute":"default",shouldRender:[sd,xo,da].includes(e)?"top":"bottom",alignItems:[xo].includes(e)?"center":[sd,gC].includes(e)?"flex-end":"flex-start",left:e===da?"16px":e===xo?"45%":"unset"}),yC=Object.freeze(Object.defineProperty({__proto__:null,CREATE_CONTENT:Gc,EXTENDED_BLOCK_RENDER_MAP:b_,GET_CONTENT_STATE:_C,controllersPositionsAdapter:j_},Symbol.toStringTag,{value:"Module"}));function vC(e){return jC(e)||bC(e)||xC()}function xC(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function bC(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function jC(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}function od(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(e)),t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r}function id(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?od(r,!0).forEach(function(n){SC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):od(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function SC(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function CC(e,t){return IC(e)||EC(e,t)||wC()}function wC(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function EC(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var c=e[Symbol.iterator](),l;!(n=(l=c.next()).done)&&(r.push(l.value),!(t&&r.length===t));n=!0);}catch(u){o=!0,i=u}finally{try{!n&&c.return!=null&&c.return()}finally{if(o)throw i}}return r}function IC(e){if(Array.isArray(e))return e}function PC(e,t){if(e==null)return t;for(var r=CC(t,2),n=r[0],o=r[1],i=id({},n),c=vC(o),l=0,u=Object.keys(e);l<u.length;l++){var d=u[l];if(n.hasOwnProperty(d)){var h=n[d];i[d]=id({},h,{},e[d])}else i[d]=e[d],c.push(d)}return[i,c]}var ad={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"};function fa(e){if(e==null)return e;for(var t={},r=!1,n=0,o=Object.keys(e);n<o.length;n++){var i=o[n],c=i;ad.hasOwnProperty(i)&&(c=ad[i],r=!0),t[c]=e[i]}return r?t:e}var NC=/^(moz|ms|o|webkit)-/,RC=/^\d+$/,TC=/([A-Z])/g,OC={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function AC(e){return e.replace(TC,"-$1").toLowerCase().replace(NC,"-$1-")}function kC(e,t){var r;return typeof t=="string"?r=RC.test(t):(r=!0,t=String(t)),!r||t==="0"||OC[e]===!0?t:t+"px"}function bo(e){return Object.keys(e).map(function(t){var r=kC(t,e[t]),n=AC(t);return"".concat(n,": ").concat(r)}).join("; ")}var vt={UNSTYLED:"unstyled",HEADER_ONE:"header-one",HEADER_TWO:"header-two",HEADER_THREE:"header-three",HEADER_FOUR:"header-four",HEADER_FIVE:"header-five",HEADER_SIX:"header-six",UNORDERED_LIST_ITEM:"unordered-list-item",ORDERED_LIST_ITEM:"ordered-list-item",BLOCKQUOTE:"blockquote",PULLQUOTE:"pullquote",CODE:"code-block",ATOMIC:"atomic"},Zn={LINK:"LINK",IMAGE:"IMAGE"},Bs={BOLD:"BOLD",CODE:"CODE",ITALIC:"ITALIC",STRIKETHROUGH:"STRIKETHROUGH",UNDERLINE:"UNDERLINE"},S_={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(U.commonjsGlobal,function(){var r=Array.prototype.slice;function n(a,f){f&&(a.prototype=Object.create(f.prototype)),a.prototype.constructor=a}function o(a){return u(a)?a:Pe(a)}n(i,o);function i(a){return d(a)?a:ne(a)}n(c,o);function c(a){return h(a)?a:te(a)}n(l,o);function l(a){return u(a)&&!m(a)?a:ke(a)}function u(a){return!!(a&&a[g])}function d(a){return!!(a&&a[v])}function h(a){return!!(a&&a[x])}function m(a){return d(a)||h(a)}function _(a){return!!(a&&a[S])}o.isIterable=u,o.isKeyed=d,o.isIndexed=h,o.isAssociative=m,o.isOrdered=_,o.Keyed=i,o.Indexed=c,o.Set=l;var g="@@__IMMUTABLE_ITERABLE__@@",v="@@__IMMUTABLE_KEYED__@@",x="@@__IMMUTABLE_INDEXED__@@",S="@@__IMMUTABLE_ORDERED__@@",w="delete",P=5,I=1<<P,C=I-1,N={},T={value:!1},O={value:!1};function M(a){return a.value=!1,a}function z(a){a&&(a.value=!0)}function D(){}function B(a,f){f=f||0;for(var y=Math.max(0,a.length-f),b=new Array(y),E=0;E<y;E++)b[E]=a[E+f];return b}function G(a){return a.size===void 0&&(a.size=a.__iterate(Y)),a.size}function J(a,f){if(typeof f!="number"){var y=f>>>0;if(""+y!==f||y===4294967295)return NaN;f=y}return f<0?G(a)+f:f}function Y(){return!0}function X(a,f,y){return(a===0||y!==void 0&&a<=-y)&&(f===void 0||y!==void 0&&f>=y)}function Z(a,f){return fe(a,f,0)}function he(a,f){return fe(a,f,f)}function fe(a,f,y){return a===void 0?y:a<0?Math.max(0,f+a):f===void 0?a:Math.min(f,a)}var ee=0,ie=1,_e=2,Ce=typeof Symbol=="function"&&Symbol.iterator,ge="@@iterator",we=Ce||ge;function V(a){this.next=a}V.prototype.toString=function(){return"[Iterator]"},V.KEYS=ee,V.VALUES=ie,V.ENTRIES=_e,V.prototype.inspect=V.prototype.toSource=function(){return this.toString()},V.prototype[we]=function(){return this};function oe(a,f,y,b){var E=a===0?f:a===1?y:[f,y];return b?b.value=E:b={value:E,done:!1},b}function F(){return{value:void 0,done:!0}}function ce(a){return!!q(a)}function je(a){return a&&typeof a.next=="function"}function Oe(a){var f=q(a);return f&&f.call(a)}function q(a){var f=a&&(Ce&&a[Ce]||a[ge]);if(typeof f=="function")return f}function $(a){return a&&typeof a.length=="number"}n(Pe,o);function Pe(a){return a==null?$e():u(a)?a.toSeq():Q(a)}Pe.of=function(){return Pe(arguments)},Pe.prototype.toSeq=function(){return this},Pe.prototype.toString=function(){return this.__toString("Seq {","}")},Pe.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},Pe.prototype.__iterate=function(a,f){return ve(this,a,f,!0)},Pe.prototype.__iterator=function(a,f){return qe(this,a,f,!0)},n(ne,Pe);function ne(a){return a==null?$e().toKeyedSeq():u(a)?d(a)?a.toSeq():a.fromEntrySeq():ae(a)}ne.prototype.toKeyedSeq=function(){return this},n(te,Pe);function te(a){return a==null?$e():u(a)?d(a)?a.entrySeq():a.toIndexedSeq():de(a)}te.of=function(){return te(arguments)},te.prototype.toIndexedSeq=function(){return this},te.prototype.toString=function(){return this.__toString("Seq [","]")},te.prototype.__iterate=function(a,f){return ve(this,a,f,!1)},te.prototype.__iterator=function(a,f){return qe(this,a,f,!1)},n(ke,Pe);function ke(a){return(a==null?$e():u(a)?d(a)?a.entrySeq():a:de(a)).toSetSeq()}ke.of=function(){return ke(arguments)},ke.prototype.toSetSeq=function(){return this},Pe.isSeq=re,Pe.Keyed=ne,Pe.Set=ke,Pe.Indexed=te;var ct="@@__IMMUTABLE_SEQ__@@";Pe.prototype[ct]=!0,n(Me,te);function Me(a){this._array=a,this.size=a.length}Me.prototype.get=function(a,f){return this.has(a)?this._array[J(this,a)]:f},Me.prototype.__iterate=function(a,f){for(var y=this._array,b=y.length-1,E=0;E<=b;E++)if(a(y[f?b-E:E],E,this)===!1)return E+1;return E},Me.prototype.__iterator=function(a,f){var y=this._array,b=y.length-1,E=0;return new V(function(){return E>b?F():oe(a,E,y[f?b-E++:E++])})},n(Le,ne);function Le(a){var f=Object.keys(a);this._object=a,this._keys=f,this.size=f.length}Le.prototype.get=function(a,f){return f!==void 0&&!this.has(a)?f:this._object[a]},Le.prototype.has=function(a){return this._object.hasOwnProperty(a)},Le.prototype.__iterate=function(a,f){for(var y=this._object,b=this._keys,E=b.length-1,R=0;R<=E;R++){var A=b[f?E-R:R];if(a(y[A],A,this)===!1)return R+1}return R},Le.prototype.__iterator=function(a,f){var y=this._object,b=this._keys,E=b.length-1,R=0;return new V(function(){var A=b[f?E-R:R];return R++>E?F():oe(a,A,y[A])})},Le.prototype[S]=!0,n(tt,te);function tt(a){this._iterable=a,this.size=a.length||a.size}tt.prototype.__iterateUncached=function(a,f){if(f)return this.cacheResult().__iterate(a,f);var y=this._iterable,b=Oe(y),E=0;if(je(b))for(var R;!(R=b.next()).done&&a(R.value,E++,this)!==!1;);return E},tt.prototype.__iteratorUncached=function(a,f){if(f)return this.cacheResult().__iterator(a,f);var y=this._iterable,b=Oe(y);if(!je(b))return new V(F);var E=0;return new V(function(){var R=b.next();return R.done?R:oe(a,E++,R.value)})},n(We,te);function We(a){this._iterator=a,this._iteratorCache=[]}We.prototype.__iterateUncached=function(a,f){if(f)return this.cacheResult().__iterate(a,f);for(var y=this._iterator,b=this._iteratorCache,E=0;E<b.length;)if(a(b[E],E++,this)===!1)return E;for(var R;!(R=y.next()).done;){var A=R.value;if(b[E]=A,a(A,E++,this)===!1)break}return E},We.prototype.__iteratorUncached=function(a,f){if(f)return this.cacheResult().__iterator(a,f);var y=this._iterator,b=this._iteratorCache,E=0;return new V(function(){if(E>=b.length){var R=y.next();if(R.done)return R;b[E]=R.value}return oe(a,E,b[E++])})};function re(a){return!!(a&&a[ct])}var De;function $e(){return De||(De=new Me([]))}function ae(a){var f=Array.isArray(a)?new Me(a).fromEntrySeq():je(a)?new We(a).fromEntrySeq():ce(a)?new tt(a).fromEntrySeq():typeof a=="object"?new Le(a):void 0;if(!f)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+a);return f}function de(a){var f=se(a);if(!f)throw new TypeError("Expected Array or iterable object of values: "+a);return f}function Q(a){var f=se(a)||typeof a=="object"&&new Le(a);if(!f)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+a);return f}function se(a){return $(a)?new Me(a):je(a)?new We(a):ce(a)?new tt(a):void 0}function ve(a,f,y,b){var E=a._cache;if(E){for(var R=E.length-1,A=0;A<=R;A++){var L=E[y?R-A:A];if(f(L[1],b?L[0]:A,a)===!1)return A+1}return A}return a.__iterateUncached(f,y)}function qe(a,f,y,b){var E=a._cache;if(E){var R=E.length-1,A=0;return new V(function(){var L=E[y?R-A:A];return A++>R?F():oe(f,b?L[0]:A-1,L[1])})}return a.__iteratorUncached(f,y)}function Je(a,f){return f?Wr(f,a,"",{"":a}):Cr(a)}function Wr(a,f,y,b){return Array.isArray(f)?a.call(b,y,te(f).map(function(E,R){return Wr(a,E,R,f)})):el(f)?a.call(b,y,ne(f).map(function(E,R){return Wr(a,E,R,f)})):f}function Cr(a){return Array.isArray(a)?te(a).map(Cr).toList():el(a)?ne(a).map(Cr).toMap():a}function el(a){return a&&(a.constructor===Object||a.constructor===void 0)}function rt(a,f){if(a===f||a!==a&&f!==f)return!0;if(!a||!f)return!1;if(typeof a.valueOf=="function"&&typeof f.valueOf=="function"){if(a=a.valueOf(),f=f.valueOf(),a===f||a!==a&&f!==f)return!0;if(!a||!f)return!1}return!!(typeof a.equals=="function"&&typeof f.equals=="function"&&a.equals(f))}function si(a,f){if(a===f)return!0;if(!u(f)||a.size!==void 0&&f.size!==void 0&&a.size!==f.size||a.__hash!==void 0&&f.__hash!==void 0&&a.__hash!==f.__hash||d(a)!==d(f)||h(a)!==h(f)||_(a)!==_(f))return!1;if(a.size===0&&f.size===0)return!0;var y=!m(a);if(_(a)){var b=a.entries();return f.every(function(H,W){var K=b.next().value;return K&&rt(K[1],H)&&(y||rt(K[0],W))})&&b.next().done}var E=!1;if(a.size===void 0)if(f.size===void 0)typeof a.cacheResult=="function"&&a.cacheResult();else{E=!0;var R=a;a=f,f=R}var A=!0,L=f.__iterate(function(H,W){if(y?!a.has(H):E?!rt(H,a.get(W,N)):!rt(a.get(W,N),H))return A=!1,!1});return A&&a.size===L}n(_t,te);function _t(a,f){if(!(this instanceof _t))return new _t(a,f);if(this._value=a,this.size=f===void 0?1/0:Math.max(0,f),this.size===0){if(oi)return oi;oi=this}}_t.prototype.toString=function(){return this.size===0?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},_t.prototype.get=function(a,f){return this.has(a)?this._value:f},_t.prototype.includes=function(a){return rt(this._value,a)},_t.prototype.slice=function(a,f){var y=this.size;return X(a,f,y)?this:new _t(this._value,he(f,y)-Z(a,y))},_t.prototype.reverse=function(){return this},_t.prototype.indexOf=function(a){return rt(this._value,a)?0:-1},_t.prototype.lastIndexOf=function(a){return rt(this._value,a)?this.size:-1},_t.prototype.__iterate=function(a,f){for(var y=0;y<this.size;y++)if(a(this._value,y,this)===!1)return y+1;return y},_t.prototype.__iterator=function(a,f){var y=this,b=0;return new V(function(){return b<y.size?oe(a,b++,y._value):F()})},_t.prototype.equals=function(a){return a instanceof _t?rt(this._value,a._value):si(a)};var oi;function Ws(a,f){if(!a)throw new Error(f)}n(gt,te);function gt(a,f,y){if(!(this instanceof gt))return new gt(a,f,y);if(Ws(y!==0,"Cannot step a Range by 0"),a=a||0,f===void 0&&(f=1/0),y=y===void 0?1:Math.abs(y),f<a&&(y=-y),this._start=a,this._end=f,this._step=y,this.size=Math.max(0,Math.ceil((f-a)/y-1)+1),this.size===0){if(ii)return ii;ii=this}}gt.prototype.toString=function(){return this.size===0?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},gt.prototype.get=function(a,f){return this.has(a)?this._start+J(this,a)*this._step:f},gt.prototype.includes=function(a){var f=(a-this._start)/this._step;return f>=0&&f<this.size&&f===Math.floor(f)},gt.prototype.slice=function(a,f){return X(a,f,this.size)?this:(a=Z(a,this.size),f=he(f,this.size),f<=a?new gt(0,0):new gt(this.get(a,this._end),this.get(f,this._end),this._step))},gt.prototype.indexOf=function(a){var f=a-this._start;if(f%this._step===0){var y=f/this._step;if(y>=0&&y<this.size)return y}return-1},gt.prototype.lastIndexOf=function(a){return this.indexOf(a)},gt.prototype.__iterate=function(a,f){for(var y=this.size-1,b=this._step,E=f?this._start+y*b:this._start,R=0;R<=y;R++){if(a(E,R,this)===!1)return R+1;E+=f?-b:b}return R},gt.prototype.__iterator=function(a,f){var y=this.size-1,b=this._step,E=f?this._start+y*b:this._start,R=0;return new V(function(){var A=E;return E+=f?-b:b,R>y?F():oe(a,R++,A)})},gt.prototype.equals=function(a){return a instanceof gt?this._start===a._start&&this._end===a._end&&this._step===a._step:si(this,a)};var ii;n(wr,o);function wr(){throw TypeError("Abstract")}n(ns,wr);function ns(){}n(jn,wr);function jn(){}n(Vs,wr);function Vs(){}wr.Keyed=ns,wr.Indexed=jn,wr.Set=Vs;var ss=typeof Math.imul=="function"&&Math.imul(4294967295,2)===-2?Math.imul:function(f,y){f=f|0,y=y|0;var b=f&65535,E=y&65535;return b*E+((f>>>16)*E+b*(y>>>16)<<16>>>0)|0};function ai(a){return a>>>1&1073741824|a&3221225471}function Ot(a){if(a===!1||a===null||a===void 0||typeof a.valueOf=="function"&&(a=a.valueOf(),a===!1||a===null||a===void 0))return 0;if(a===!0)return 1;var f=typeof a;if(f==="number"){var y=a|0;for(y!==a&&(y^=a*4294967295);a>4294967295;)a/=4294967295,y^=a;return ai(y)}if(f==="string")return a.length>Gg?$g(a):ci(a);if(typeof a.hashCode=="function")return a.hashCode();if(f==="object")return Wg(a);if(typeof a.toString=="function")return ci(a.toString());throw new Error("Value type "+f+" cannot be hashed.")}function $g(a){var f=pi[a];return f===void 0&&(f=ci(a),fi===Kg&&(fi=0,pi={}),fi++,pi[a]=f),f}function ci(a){for(var f=0,y=0;y<a.length;y++)f=31*f+a.charCodeAt(y)|0;return ai(f)}function Wg(a){var f;if(li&&(f=ui.get(a),f!==void 0)||(f=a[Vr],f!==void 0)||!rl&&(f=a.propertyIsEnumerable&&a.propertyIsEnumerable[Vr],f!==void 0||(f=Vg(a),f!==void 0)))return f;if(f=++di,di&1073741824&&(di=0),li)ui.set(a,f);else{if(tl!==void 0&&tl(a)===!1)throw new Error("Non-extensible objects are not allowed as keys.");if(rl)Object.defineProperty(a,Vr,{enumerable:!1,configurable:!1,writable:!1,value:f});else if(a.propertyIsEnumerable!==void 0&&a.propertyIsEnumerable===a.constructor.prototype.propertyIsEnumerable)a.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},a.propertyIsEnumerable[Vr]=f;else if(a.nodeType!==void 0)a[Vr]=f;else throw new Error("Unable to set a non-enumerable property on object.")}return f}var tl=Object.isExtensible,rl=function(){try{return Object.defineProperty({},"@",{}),!0}catch{return!1}}();function Vg(a){if(a&&a.nodeType>0)switch(a.nodeType){case 1:return a.uniqueID;case 9:return a.documentElement&&a.documentElement.uniqueID}}var li=typeof WeakMap=="function",ui;li&&(ui=new WeakMap);var di=0,Vr="__immutablehash__";typeof Symbol=="function"&&(Vr=Symbol(Vr));var Gg=16,Kg=255,fi=0,pi={};function At(a){Ws(a!==1/0,"Cannot perform this action with an infinite size.")}n(Fe,ns);function Fe(a){return a==null?nr():hi(a)&&!_(a)?a:nr().withMutations(function(f){var y=i(a);At(y.size),y.forEach(function(b,E){return f.set(E,b)})})}Fe.prototype.toString=function(){return this.__toString("Map {","}")},Fe.prototype.get=function(a,f){return this._root?this._root.get(0,void 0,a,f):f},Fe.prototype.set=function(a,f){return il(this,a,f)},Fe.prototype.setIn=function(a,f){return this.updateIn(a,N,function(){return f})},Fe.prototype.remove=function(a){return il(this,a,N)},Fe.prototype.deleteIn=function(a){return this.updateIn(a,function(){return N})},Fe.prototype.update=function(a,f,y){return arguments.length===1?a(this):this.updateIn([a],f,y)},Fe.prototype.updateIn=function(a,f,y){y||(y=f,f=void 0);var b=dl(this,Ol(a),f,y);return b===N?void 0:b},Fe.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):nr()},Fe.prototype.merge=function(){return Gs(this,void 0,arguments)},Fe.prototype.mergeWith=function(a){var f=r.call(arguments,1);return Gs(this,a,f)},Fe.prototype.mergeIn=function(a){var f=r.call(arguments,1);return this.updateIn(a,nr(),function(y){return typeof y.merge=="function"?y.merge.apply(y,f):f[f.length-1]})},Fe.prototype.mergeDeep=function(){return Gs(this,cl,arguments)},Fe.prototype.mergeDeepWith=function(a){var f=r.call(arguments,1);return Gs(this,ll(a),f)},Fe.prototype.mergeDeepIn=function(a){var f=r.call(arguments,1);return this.updateIn(a,nr(),function(y){return typeof y.mergeDeep=="function"?y.mergeDeep.apply(y,f):f[f.length-1]})},Fe.prototype.sort=function(a){return nt(Nn(this,a))},Fe.prototype.sortBy=function(a,f){return nt(Nn(this,f,a))},Fe.prototype.withMutations=function(a){var f=this.asMutable();return a(f),f.wasAltered()?f.__ensureOwner(this.__ownerID):this},Fe.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new D)},Fe.prototype.asImmutable=function(){return this.__ensureOwner()},Fe.prototype.wasAltered=function(){return this.__altered},Fe.prototype.__iterator=function(a,f){return new mi(this,a,f)},Fe.prototype.__iterate=function(a,f){var y=this,b=0;return this._root&&this._root.iterate(function(E){return b++,a(E[1],E[0],y)},f),b},Fe.prototype.__ensureOwner=function(a){return a===this.__ownerID?this:a?gi(this.size,this._root,a,this.__hash):(this.__ownerID=a,this.__altered=!1,this)};function hi(a){return!!(a&&a[nl])}Fe.isMap=hi;var nl="@@__IMMUTABLE_MAP__@@",Ne=Fe.prototype;Ne[nl]=!0,Ne[w]=Ne.remove,Ne.removeIn=Ne.deleteIn;function os(a,f){this.ownerID=a,this.entries=f}os.prototype.get=function(a,f,y,b){for(var E=this.entries,R=0,A=E.length;R<A;R++)if(rt(y,E[R][0]))return E[R][1];return b},os.prototype.update=function(a,f,y,b,E,R,A){for(var L=E===N,H=this.entries,W=0,K=H.length;W<K&&!rt(b,H[W][0]);W++);var le=W<K;if(le?H[W][1]===E:L)return this;if(z(A),(L||!le)&&z(R),!(L&&H.length===1)){if(!le&&!L&&H.length>=ey)return Qg(a,H,b,E);var pe=a&&a===this.ownerID,Se=pe?H:B(H);return le?L?W===K-1?Se.pop():Se[W]=Se.pop():Se[W]=[b,E]:Se.push([b,E]),pe?(this.entries=Se,this):new os(a,Se)}};function Sn(a,f,y){this.ownerID=a,this.bitmap=f,this.nodes=y}Sn.prototype.get=function(a,f,y,b){f===void 0&&(f=Ot(y));var E=1<<((a===0?f:f>>>a)&C),R=this.bitmap;return R&E?this.nodes[fl(R&E-1)].get(a+P,f,y,b):b},Sn.prototype.update=function(a,f,y,b,E,R,A){y===void 0&&(y=Ot(b));var L=(f===0?y:y>>>f)&C,H=1<<L,W=this.bitmap,K=(W&H)!==0;if(!K&&E===N)return this;var le=fl(W&H-1),pe=this.nodes,Se=K?pe[le]:void 0,Ie=yi(Se,a,f+P,y,b,E,R,A);if(Ie===Se)return this;if(!K&&Ie&&pe.length>=ty)return Xg(a,pe,W,L,Ie);if(K&&!Ie&&pe.length===2&&al(pe[le^1]))return pe[le^1];if(K&&Ie&&pe.length===1&&al(Ie))return Ie;var Qe=a&&a===this.ownerID,Qt=K?Ie?W:W^H:W|H,ar=K?Ie?pl(pe,le,Ie,Qe):Zg(pe,le,Qe):Jg(pe,le,Ie,Qe);return Qe?(this.bitmap=Qt,this.nodes=ar,this):new Sn(a,Qt,ar)};function is(a,f,y){this.ownerID=a,this.count=f,this.nodes=y}is.prototype.get=function(a,f,y,b){f===void 0&&(f=Ot(y));var E=(a===0?f:f>>>a)&C,R=this.nodes[E];return R?R.get(a+P,f,y,b):b},is.prototype.update=function(a,f,y,b,E,R,A){y===void 0&&(y=Ot(b));var L=(f===0?y:y>>>f)&C,H=E===N,W=this.nodes,K=W[L];if(H&&!K)return this;var le=yi(K,a,f+P,y,b,E,R,A);if(le===K)return this;var pe=this.count;if(!K)pe++;else if(!le&&(pe--,pe<ry))return Yg(a,W,pe,L);var Se=a&&a===this.ownerID,Ie=pl(W,L,le,Se);return Se?(this.count=pe,this.nodes=Ie,this):new is(a,pe,Ie)};function Cn(a,f,y){this.ownerID=a,this.keyHash=f,this.entries=y}Cn.prototype.get=function(a,f,y,b){for(var E=this.entries,R=0,A=E.length;R<A;R++)if(rt(y,E[R][0]))return E[R][1];return b},Cn.prototype.update=function(a,f,y,b,E,R,A){y===void 0&&(y=Ot(b));var L=E===N;if(y!==this.keyHash)return L?this:(z(A),z(R),vi(this,a,f,y,[b,E]));for(var H=this.entries,W=0,K=H.length;W<K&&!rt(b,H[W][0]);W++);var le=W<K;if(le?H[W][1]===E:L)return this;if(z(A),(L||!le)&&z(R),L&&K===2)return new _r(a,this.keyHash,H[W^1]);var pe=a&&a===this.ownerID,Se=pe?H:B(H);return le?L?W===K-1?Se.pop():Se[W]=Se.pop():Se[W]=[b,E]:Se.push([b,E]),pe?(this.entries=Se,this):new Cn(a,this.keyHash,Se)};function _r(a,f,y){this.ownerID=a,this.keyHash=f,this.entry=y}_r.prototype.get=function(a,f,y,b){return rt(y,this.entry[0])?this.entry[1]:b},_r.prototype.update=function(a,f,y,b,E,R,A){var L=E===N,H=rt(b,this.entry[0]);if(H?E===this.entry[1]:L)return this;if(z(A),L){z(R);return}return H?a&&a===this.ownerID?(this.entry[1]=E,this):new _r(a,this.keyHash,[b,E]):(z(R),vi(this,a,f,Ot(b),[b,E]))},os.prototype.iterate=Cn.prototype.iterate=function(a,f){for(var y=this.entries,b=0,E=y.length-1;b<=E;b++)if(a(y[f?E-b:b])===!1)return!1},Sn.prototype.iterate=is.prototype.iterate=function(a,f){for(var y=this.nodes,b=0,E=y.length-1;b<=E;b++){var R=y[f?E-b:b];if(R&&R.iterate(a,f)===!1)return!1}},_r.prototype.iterate=function(a,f){return a(this.entry)},n(mi,V);function mi(a,f,y){this._type=f,this._reverse=y,this._stack=a._root&&sl(a._root)}mi.prototype.next=function(){for(var a=this._type,f=this._stack;f;){var y=f.node,b=f.index++,E;if(y.entry){if(b===0)return _i(a,y.entry)}else if(y.entries){if(E=y.entries.length-1,b<=E)return _i(a,y.entries[this._reverse?E-b:b])}else if(E=y.nodes.length-1,b<=E){var R=y.nodes[this._reverse?E-b:b];if(R){if(R.entry)return _i(a,R.entry);f=this._stack=sl(R,f)}continue}f=this._stack=this._stack.__prev}return F()};function _i(a,f){return oe(a,f[0],f[1])}function sl(a,f){return{node:a,index:0,__prev:f}}function gi(a,f,y,b){var E=Object.create(Ne);return E.size=a,E._root=f,E.__ownerID=y,E.__hash=b,E.__altered=!1,E}var ol;function nr(){return ol||(ol=gi(0))}function il(a,f,y){var b,E;if(a._root){var R=M(T),A=M(O);if(b=yi(a._root,a.__ownerID,0,void 0,f,y,R,A),!A.value)return a;E=a.size+(R.value?y===N?-1:1:0)}else{if(y===N)return a;E=1,b=new os(a.__ownerID,[[f,y]])}return a.__ownerID?(a.size=E,a._root=b,a.__hash=void 0,a.__altered=!0,a):b?gi(E,b):nr()}function yi(a,f,y,b,E,R,A,L){return a?a.update(f,y,b,E,R,A,L):R===N?a:(z(L),z(A),new _r(f,b,[E,R]))}function al(a){return a.constructor===_r||a.constructor===Cn}function vi(a,f,y,b,E){if(a.keyHash===b)return new Cn(f,b,[a.entry,E]);var R=(y===0?a.keyHash:a.keyHash>>>y)&C,A=(y===0?b:b>>>y)&C,L,H=R===A?[vi(a,f,y+P,b,E)]:(L=new _r(f,b,E),R<A?[a,L]:[L,a]);return new Sn(f,1<<R|1<<A,H)}function Qg(a,f,y,b){a||(a=new D);for(var E=new _r(a,Ot(y),[y,b]),R=0;R<f.length;R++){var A=f[R];E=E.update(a,0,void 0,A[0],A[1])}return E}function Yg(a,f,y,b){for(var E=0,R=0,A=new Array(y),L=0,H=1,W=f.length;L<W;L++,H<<=1){var K=f[L];K!==void 0&&L!==b&&(E|=H,A[R++]=K)}return new Sn(a,E,A)}function Xg(a,f,y,b,E){for(var R=0,A=new Array(I),L=0;y!==0;L++,y>>>=1)A[L]=y&1?f[R++]:void 0;return A[b]=E,new is(a,R+1,A)}function Gs(a,f,y){for(var b=[],E=0;E<y.length;E++){var R=y[E],A=i(R);u(R)||(A=A.map(function(L){return Je(L)})),b.push(A)}return ul(a,f,b)}function cl(a,f,y){return a&&a.mergeDeep&&u(f)?a.mergeDeep(f):rt(a,f)?a:f}function ll(a){return function(f,y,b){if(f&&f.mergeDeepWith&&u(y))return f.mergeDeepWith(a,y);var E=a(f,y,b);return rt(f,E)?f:E}}function ul(a,f,y){return y=y.filter(function(b){return b.size!==0}),y.length===0?a:a.size===0&&!a.__ownerID&&y.length===1?a.constructor(y[0]):a.withMutations(function(b){for(var E=f?function(A,L){b.update(L,N,function(H){return H===N?A:f(H,A,L)})}:function(A,L){b.set(L,A)},R=0;R<y.length;R++)y[R].forEach(E)})}function dl(a,f,y,b){var E=a===N,R=f.next();if(R.done){var A=E?y:a,L=b(A);return L===A?a:L}Ws(E||a&&a.set,"invalid keyPath");var H=R.value,W=E?N:a.get(H,N),K=dl(W,f,y,b);return K===W?a:K===N?a.remove(H):(E?nr():a).set(H,K)}function fl(a){return a=a-(a>>1&1431655765),a=(a&858993459)+(a>>2&858993459),a=a+(a>>4)&252645135,a=a+(a>>8),a=a+(a>>16),a&127}function pl(a,f,y,b){var E=b?a:B(a);return E[f]=y,E}function Jg(a,f,y,b){var E=a.length+1;if(b&&f+1===E)return a[f]=y,a;for(var R=new Array(E),A=0,L=0;L<E;L++)L===f?(R[L]=y,A=-1):R[L]=a[L+A];return R}function Zg(a,f,y){var b=a.length-1;if(y&&f===b)return a.pop(),a;for(var E=new Array(b),R=0,A=0;A<b;A++)A===f&&(R=1),E[A]=a[A+R];return E}var ey=I/4,ty=I/2,ry=I/4;n(Ge,jn);function Ge(a){var f=xi();if(a==null)return f;if(hl(a))return a;var y=c(a),b=y.size;return b===0?f:(At(b),b>0&&b<I?cs(0,b,P,null,new Er(y.toArray())):f.withMutations(function(E){E.setSize(b),y.forEach(function(R,A){return E.set(A,R)})}))}Ge.of=function(){return this(arguments)},Ge.prototype.toString=function(){return this.__toString("List [","]")},Ge.prototype.get=function(a,f){if(a=J(this,a),a>=0&&a<this.size){a+=this._origin;var y=yl(this,a);return y&&y.array[a&C]}return f},Ge.prototype.set=function(a,f){return ny(this,a,f)},Ge.prototype.remove=function(a){return this.has(a)?a===0?this.shift():a===this.size-1?this.pop():this.splice(a,1):this},Ge.prototype.insert=function(a,f){return this.splice(a,0,f)},Ge.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=P,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):xi()},Ge.prototype.push=function(){var a=arguments,f=this.size;return this.withMutations(function(y){Ir(y,0,f+a.length);for(var b=0;b<a.length;b++)y.set(f+b,a[b])})},Ge.prototype.pop=function(){return Ir(this,0,-1)},Ge.prototype.unshift=function(){var a=arguments;return this.withMutations(function(f){Ir(f,-a.length);for(var y=0;y<a.length;y++)f.set(y,a[y])})},Ge.prototype.shift=function(){return Ir(this,1)},Ge.prototype.merge=function(){return Ks(this,void 0,arguments)},Ge.prototype.mergeWith=function(a){var f=r.call(arguments,1);return Ks(this,a,f)},Ge.prototype.mergeDeep=function(){return Ks(this,cl,arguments)},Ge.prototype.mergeDeepWith=function(a){var f=r.call(arguments,1);return Ks(this,ll(a),f)},Ge.prototype.setSize=function(a){return Ir(this,0,a)},Ge.prototype.slice=function(a,f){var y=this.size;return X(a,f,y)?this:Ir(this,Z(a,y),he(f,y))},Ge.prototype.__iterator=function(a,f){var y=0,b=_l(this,f);return new V(function(){var E=b();return E===as?F():oe(a,y++,E)})},Ge.prototype.__iterate=function(a,f){for(var y=0,b=_l(this,f),E;(E=b())!==as&&a(E,y++,this)!==!1;);return y},Ge.prototype.__ensureOwner=function(a){return a===this.__ownerID?this:a?cs(this._origin,this._capacity,this._level,this._root,this._tail,a,this.__hash):(this.__ownerID=a,this)};function hl(a){return!!(a&&a[ml])}Ge.isList=hl;var ml="@@__IMMUTABLE_LIST__@@",xt=Ge.prototype;xt[ml]=!0,xt[w]=xt.remove,xt.setIn=Ne.setIn,xt.deleteIn=xt.removeIn=Ne.removeIn,xt.update=Ne.update,xt.updateIn=Ne.updateIn,xt.mergeIn=Ne.mergeIn,xt.mergeDeepIn=Ne.mergeDeepIn,xt.withMutations=Ne.withMutations,xt.asMutable=Ne.asMutable,xt.asImmutable=Ne.asImmutable,xt.wasAltered=Ne.wasAltered;function Er(a,f){this.array=a,this.ownerID=f}Er.prototype.removeBefore=function(a,f,y){if(y===f?1<<f:this.array.length===0)return this;var b=y>>>f&C;if(b>=this.array.length)return new Er([],a);var E=b===0,R;if(f>0){var A=this.array[b];if(R=A&&A.removeBefore(a,f-P,y),R===A&&E)return this}if(E&&!R)return this;var L=wn(this,a);if(!E)for(var H=0;H<b;H++)L.array[H]=void 0;return R&&(L.array[b]=R),L},Er.prototype.removeAfter=function(a,f,y){if(y===(f?1<<f:0)||this.array.length===0)return this;var b=y-1>>>f&C;if(b>=this.array.length)return this;var E;if(f>0){var R=this.array[b];if(E=R&&R.removeAfter(a,f-P,y),E===R&&b===this.array.length-1)return this}var A=wn(this,a);return A.array.splice(b+1),E&&(A.array[b]=E),A};var as={};function _l(a,f){var y=a._origin,b=a._capacity,E=ls(b),R=a._tail;return A(a._root,a._level,0);function A(W,K,le){return K===0?L(W,le):H(W,K,le)}function L(W,K){var le=K===E?R&&R.array:W&&W.array,pe=K>y?0:y-K,Se=b-K;return Se>I&&(Se=I),function(){if(pe===Se)return as;var Ie=f?--Se:pe++;return le&&le[Ie]}}function H(W,K,le){var pe,Se=W&&W.array,Ie=le>y?0:y-le>>K,Qe=(b-le>>K)+1;return Qe>I&&(Qe=I),function(){do{if(pe){var Qt=pe();if(Qt!==as)return Qt;pe=null}if(Ie===Qe)return as;var ar=f?--Qe:Ie++;pe=A(Se&&Se[ar],K-P,le+(ar<<K))}while(!0)}}}function cs(a,f,y,b,E,R,A){var L=Object.create(xt);return L.size=f-a,L._origin=a,L._capacity=f,L._level=y,L._root=b,L._tail=E,L.__ownerID=R,L.__hash=A,L.__altered=!1,L}var gl;function xi(){return gl||(gl=cs(0,0,P))}function ny(a,f,y){if(f=J(a,f),f!==f)return a;if(f>=a.size||f<0)return a.withMutations(function(A){f<0?Ir(A,f).set(0,y):Ir(A,0,f+1).set(f,y)});f+=a._origin;var b=a._tail,E=a._root,R=M(O);return f>=ls(a._capacity)?b=bi(b,a.__ownerID,0,f,y,R):E=bi(E,a.__ownerID,a._level,f,y,R),R.value?a.__ownerID?(a._root=E,a._tail=b,a.__hash=void 0,a.__altered=!0,a):cs(a._origin,a._capacity,a._level,E,b):a}function bi(a,f,y,b,E,R){var A=b>>>y&C,L=a&&A<a.array.length;if(!L&&E===void 0)return a;var H;if(y>0){var W=a&&a.array[A],K=bi(W,f,y-P,b,E,R);return K===W?a:(H=wn(a,f),H.array[A]=K,H)}return L&&a.array[A]===E?a:(z(R),H=wn(a,f),E===void 0&&A===H.array.length-1?H.array.pop():H.array[A]=E,H)}function wn(a,f){return f&&a&&f===a.ownerID?a:new Er(a?a.array.slice():[],f)}function yl(a,f){if(f>=ls(a._capacity))return a._tail;if(f<1<<a._level+P){for(var y=a._root,b=a._level;y&&b>0;)y=y.array[f>>>b&C],b-=P;return y}}function Ir(a,f,y){f!==void 0&&(f=f|0),y!==void 0&&(y=y|0);var b=a.__ownerID||new D,E=a._origin,R=a._capacity,A=E+f,L=y===void 0?R:y<0?R+y:E+y;if(A===E&&L===R)return a;if(A>=L)return a.clear();for(var H=a._level,W=a._root,K=0;A+K<0;)W=new Er(W&&W.array.length?[void 0,W]:[],b),H+=P,K+=1<<H;K&&(A+=K,E+=K,L+=K,R+=K);for(var le=ls(R),pe=ls(L);pe>=1<<H+P;)W=new Er(W&&W.array.length?[W]:[],b),H+=P;var Se=a._tail,Ie=pe<le?yl(a,L-1):pe>le?new Er([],b):Se;if(Se&&pe>le&&A<R&&Se.array.length){W=wn(W,b);for(var Qe=W,Qt=H;Qt>P;Qt-=P){var ar=le>>>Qt&C;Qe=Qe.array[ar]=wn(Qe.array[ar],b)}Qe.array[le>>>P&C]=Se}if(L<R&&(Ie=Ie&&Ie.removeAfter(b,0,L)),A>=pe)A-=pe,L-=pe,H=P,W=null,Ie=Ie&&Ie.removeBefore(b,0,A);else if(A>E||pe<le){for(K=0;W;){var to=A>>>H&C;if(to!==pe>>>H&C)break;to&&(K+=(1<<H)*to),H-=P,W=W.array[to]}W&&A>E&&(W=W.removeBefore(b,H,A-K)),W&&pe<le&&(W=W.removeAfter(b,H,pe-K)),K&&(A-=K,L-=K)}return a.__ownerID?(a.size=L-A,a._origin=A,a._capacity=L,a._level=H,a._root=W,a._tail=Ie,a.__hash=void 0,a.__altered=!0,a):cs(A,L,H,W,Ie)}function Ks(a,f,y){for(var b=[],E=0,R=0;R<y.length;R++){var A=y[R],L=c(A);L.size>E&&(E=L.size),u(A)||(L=L.map(function(H){return Je(H)})),b.push(L)}return E>a.size&&(a=a.setSize(E)),ul(a,f,b)}function ls(a){return a<I?0:a-1>>>P<<P}n(nt,Fe);function nt(a){return a==null?Qs():vl(a)?a:Qs().withMutations(function(f){var y=i(a);At(y.size),y.forEach(function(b,E){return f.set(E,b)})})}nt.of=function(){return this(arguments)},nt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},nt.prototype.get=function(a,f){var y=this._map.get(a);return y!==void 0?this._list.get(y)[1]:f},nt.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Qs()},nt.prototype.set=function(a,f){return bl(this,a,f)},nt.prototype.remove=function(a){return bl(this,a,N)},nt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},nt.prototype.__iterate=function(a,f){var y=this;return this._list.__iterate(function(b){return b&&a(b[1],b[0],y)},f)},nt.prototype.__iterator=function(a,f){return this._list.fromEntrySeq().__iterator(a,f)},nt.prototype.__ensureOwner=function(a){if(a===this.__ownerID)return this;var f=this._map.__ensureOwner(a),y=this._list.__ensureOwner(a);return a?ji(f,y,a,this.__hash):(this.__ownerID=a,this._map=f,this._list=y,this)};function vl(a){return hi(a)&&_(a)}nt.isOrderedMap=vl,nt.prototype[S]=!0,nt.prototype[w]=nt.prototype.remove;function ji(a,f,y,b){var E=Object.create(nt.prototype);return E.size=a?a.size:0,E._map=a,E._list=f,E.__ownerID=y,E.__hash=b,E}var xl;function Qs(){return xl||(xl=ji(nr(),xi()))}function bl(a,f,y){var b=a._map,E=a._list,R=b.get(f),A=R!==void 0,L,H;if(y===N){if(!A)return a;E.size>=I&&E.size>=b.size*2?(H=E.filter(function(W,K){return W!==void 0&&R!==K}),L=H.toKeyedSeq().map(function(W){return W[0]}).flip().toMap(),a.__ownerID&&(L.__ownerID=H.__ownerID=a.__ownerID)):(L=b.remove(f),H=R===E.size-1?E.pop():E.set(R,void 0))}else if(A){if(y===E.get(R)[1])return a;L=b,H=E.set(R,[f,y])}else L=b.set(f,E.size),H=E.set(E.size,[f,y]);return a.__ownerID?(a.size=L.size,a._map=L,a._list=H,a.__hash=void 0,a):ji(L,H)}n(qt,ne);function qt(a,f){this._iter=a,this._useKeys=f,this.size=a.size}qt.prototype.get=function(a,f){return this._iter.get(a,f)},qt.prototype.has=function(a){return this._iter.has(a)},qt.prototype.valueSeq=function(){return this._iter.valueSeq()},qt.prototype.reverse=function(){var a=this,f=Si(this,!0);return this._useKeys||(f.valueSeq=function(){return a._iter.toSeq().reverse()}),f},qt.prototype.map=function(a,f){var y=this,b=Sl(this,a,f);return this._useKeys||(b.valueSeq=function(){return y._iter.toSeq().map(a,f)}),b},qt.prototype.__iterate=function(a,f){var y=this,b;return this._iter.__iterate(this._useKeys?function(E,R){return a(E,R,y)}:(b=f?Nl(this):0,function(E){return a(E,f?--b:b++,y)}),f)},qt.prototype.__iterator=function(a,f){if(this._useKeys)return this._iter.__iterator(a,f);var y=this._iter.__iterator(ie,f),b=f?Nl(this):0;return new V(function(){var E=y.next();return E.done?E:oe(a,f?--b:b++,E.value,E)})},qt.prototype[S]=!0,n(En,te);function En(a){this._iter=a,this.size=a.size}En.prototype.includes=function(a){return this._iter.includes(a)},En.prototype.__iterate=function(a,f){var y=this,b=0;return this._iter.__iterate(function(E){return a(E,b++,y)},f)},En.prototype.__iterator=function(a,f){var y=this._iter.__iterator(ie,f),b=0;return new V(function(){var E=y.next();return E.done?E:oe(a,b++,E.value,E)})},n(In,ke);function In(a){this._iter=a,this.size=a.size}In.prototype.has=function(a){return this._iter.includes(a)},In.prototype.__iterate=function(a,f){var y=this;return this._iter.__iterate(function(b){return a(b,b,y)},f)},In.prototype.__iterator=function(a,f){var y=this._iter.__iterator(ie,f);return new V(function(){var b=y.next();return b.done?b:oe(a,b.value,b.value,b)})},n(Pn,ne);function Pn(a){this._iter=a,this.size=a.size}Pn.prototype.entrySeq=function(){return this._iter.toSeq()},Pn.prototype.__iterate=function(a,f){var y=this;return this._iter.__iterate(function(b){if(b){Pl(b);var E=u(b);return a(E?b.get(1):b[1],E?b.get(0):b[0],y)}},f)},Pn.prototype.__iterator=function(a,f){var y=this._iter.__iterator(ie,f);return new V(function(){for(;;){var b=y.next();if(b.done)return b;var E=b.value;if(E){Pl(E);var R=u(E);return oe(a,R?E.get(0):E[0],R?E.get(1):E[1],b)}}})},En.prototype.cacheResult=qt.prototype.cacheResult=In.prototype.cacheResult=Pn.prototype.cacheResult=Ei;function jl(a){var f=sr(a);return f._iter=a,f.size=a.size,f.flip=function(){return a},f.reverse=function(){var y=a.reverse.apply(this);return y.flip=function(){return a.reverse()},y},f.has=function(y){return a.includes(y)},f.includes=function(y){return a.has(y)},f.cacheResult=Ei,f.__iterateUncached=function(y,b){var E=this;return a.__iterate(function(R,A){return y(A,R,E)!==!1},b)},f.__iteratorUncached=function(y,b){if(y===_e){var E=a.__iterator(y,b);return new V(function(){var R=E.next();if(!R.done){var A=R.value[0];R.value[0]=R.value[1],R.value[1]=A}return R})}return a.__iterator(y===ie?ee:ie,b)},f}function Sl(a,f,y){var b=sr(a);return b.size=a.size,b.has=function(E){return a.has(E)},b.get=function(E,R){var A=a.get(E,N);return A===N?R:f.call(y,A,E,a)},b.__iterateUncached=function(E,R){var A=this;return a.__iterate(function(L,H,W){return E(f.call(y,L,H,W),H,A)!==!1},R)},b.__iteratorUncached=function(E,R){var A=a.__iterator(_e,R);return new V(function(){var L=A.next();if(L.done)return L;var H=L.value,W=H[0];return oe(E,W,f.call(y,H[1],W,a),L)})},b}function Si(a,f){var y=sr(a);return y._iter=a,y.size=a.size,y.reverse=function(){return a},a.flip&&(y.flip=function(){var b=jl(a);return b.reverse=function(){return a.flip()},b}),y.get=function(b,E){return a.get(f?b:-1-b,E)},y.has=function(b){return a.has(f?b:-1-b)},y.includes=function(b){return a.includes(b)},y.cacheResult=Ei,y.__iterate=function(b,E){var R=this;return a.__iterate(function(A,L){return b(A,L,R)},!E)},y.__iterator=function(b,E){return a.__iterator(b,!E)},y}function Cl(a,f,y,b){var E=sr(a);return b&&(E.has=function(R){var A=a.get(R,N);return A!==N&&!!f.call(y,A,R,a)},E.get=function(R,A){var L=a.get(R,N);return L!==N&&f.call(y,L,R,a)?L:A}),E.__iterateUncached=function(R,A){var L=this,H=0;return a.__iterate(function(W,K,le){if(f.call(y,W,K,le))return H++,R(W,b?K:H-1,L)},A),H},E.__iteratorUncached=function(R,A){var L=a.__iterator(_e,A),H=0;return new V(function(){for(;;){var W=L.next();if(W.done)return W;var K=W.value,le=K[0],pe=K[1];if(f.call(y,pe,le,a))return oe(R,b?le:H++,pe,W)}})},E}function sy(a,f,y){var b=Fe().asMutable();return a.__iterate(function(E,R){b.update(f.call(y,E,R,a),0,function(A){return A+1})}),b.asImmutable()}function oy(a,f,y){var b=d(a),E=(_(a)?nt():Fe()).asMutable();a.__iterate(function(A,L){E.update(f.call(y,A,L,a),function(H){return H=H||[],H.push(b?[L,A]:A),H})});var R=Rl(a);return E.map(function(A){return Ve(a,R(A))})}function Ci(a,f,y,b){var E=a.size;if(f!==void 0&&(f=f|0),y!==void 0&&(y=y|0),X(f,y,E))return a;var R=Z(f,E),A=he(y,E);if(R!==R||A!==A)return Ci(a.toSeq().cacheResult(),f,y,b);var L=A-R,H;L===L&&(H=L<0?0:L);var W=sr(a);return W.size=H===0?H:a.size&&H||void 0,!b&&re(a)&&H>=0&&(W.get=function(K,le){return K=J(this,K),K>=0&&K<H?a.get(K+R,le):le}),W.__iterateUncached=function(K,le){var pe=this;if(H===0)return 0;if(le)return this.cacheResult().__iterate(K,le);var Se=0,Ie=!0,Qe=0;return a.__iterate(function(Qt,ar){if(!(Ie&&(Ie=Se++<R)))return Qe++,K(Qt,b?ar:Qe-1,pe)!==!1&&Qe!==H}),Qe},W.__iteratorUncached=function(K,le){if(H!==0&&le)return this.cacheResult().__iterator(K,le);var pe=H!==0&&a.__iterator(K,le),Se=0,Ie=0;return new V(function(){for(;Se++<R;)pe.next();if(++Ie>H)return F();var Qe=pe.next();return b||K===ie?Qe:K===ee?oe(K,Ie-1,void 0,Qe):oe(K,Ie-1,Qe.value[1],Qe)})},W}function iy(a,f,y){var b=sr(a);return b.__iterateUncached=function(E,R){var A=this;if(R)return this.cacheResult().__iterate(E,R);var L=0;return a.__iterate(function(H,W,K){return f.call(y,H,W,K)&&++L&&E(H,W,A)}),L},b.__iteratorUncached=function(E,R){var A=this;if(R)return this.cacheResult().__iterator(E,R);var L=a.__iterator(_e,R),H=!0;return new V(function(){if(!H)return F();var W=L.next();if(W.done)return W;var K=W.value,le=K[0],pe=K[1];return f.call(y,pe,le,A)?E===_e?W:oe(E,le,pe,W):(H=!1,F())})},b}function wl(a,f,y,b){var E=sr(a);return E.__iterateUncached=function(R,A){var L=this;if(A)return this.cacheResult().__iterate(R,A);var H=!0,W=0;return a.__iterate(function(K,le,pe){if(!(H&&(H=f.call(y,K,le,pe))))return W++,R(K,b?le:W-1,L)}),W},E.__iteratorUncached=function(R,A){var L=this;if(A)return this.cacheResult().__iterator(R,A);var H=a.__iterator(_e,A),W=!0,K=0;return new V(function(){var le,pe,Se;do{if(le=H.next(),le.done)return b||R===ie?le:R===ee?oe(R,K++,void 0,le):oe(R,K++,le.value[1],le);var Ie=le.value;pe=Ie[0],Se=Ie[1],W&&(W=f.call(y,Se,pe,L))}while(W);return R===_e?le:oe(R,pe,Se,le)})},E}function ay(a,f){var y=d(a),b=[a].concat(f).map(function(A){return u(A)?y&&(A=i(A)):A=y?ae(A):de(Array.isArray(A)?A:[A]),A}).filter(function(A){return A.size!==0});if(b.length===0)return a;if(b.length===1){var E=b[0];if(E===a||y&&d(E)||h(a)&&h(E))return E}var R=new Me(b);return y?R=R.toKeyedSeq():h(a)||(R=R.toSetSeq()),R=R.flatten(!0),R.size=b.reduce(function(A,L){if(A!==void 0){var H=L.size;if(H!==void 0)return A+H}},0),R}function El(a,f,y){var b=sr(a);return b.__iterateUncached=function(E,R){var A=0,L=!1;function H(W,K){var le=this;W.__iterate(function(pe,Se){return(!f||K<f)&&u(pe)?H(pe,K+1):E(pe,y?Se:A++,le)===!1&&(L=!0),!L},R)}return H(a,0),A},b.__iteratorUncached=function(E,R){var A=a.__iterator(E,R),L=[],H=0;return new V(function(){for(;A;){var W=A.next();if(W.done!==!1){A=L.pop();continue}var K=W.value;if(E===_e&&(K=K[1]),(!f||L.length<f)&&u(K))L.push(A),A=K.__iterator(E,R);else return y?W:oe(E,H++,K,W)}return F()})},b}function cy(a,f,y){var b=Rl(a);return a.toSeq().map(function(E,R){return b(f.call(y,E,R,a))}).flatten(!0)}function ly(a,f){var y=sr(a);return y.size=a.size&&a.size*2-1,y.__iterateUncached=function(b,E){var R=this,A=0;return a.__iterate(function(L,H){return(!A||b(f,A++,R)!==!1)&&b(L,A++,R)!==!1},E),A},y.__iteratorUncached=function(b,E){var R=a.__iterator(ie,E),A=0,L;return new V(function(){return(!L||A%2)&&(L=R.next(),L.done)?L:A%2?oe(b,A++,f):oe(b,A++,L.value,L)})},y}function Nn(a,f,y){f||(f=Tl);var b=d(a),E=0,R=a.toSeq().map(function(A,L){return[L,A,E++,y?y(A,L,a):A]}).toArray();return R.sort(function(A,L){return f(A[3],L[3])||A[2]-L[2]}).forEach(b?function(A,L){R[L].length=2}:function(A,L){R[L]=A[1]}),b?ne(R):h(a)?te(R):ke(R)}function Ys(a,f,y){if(f||(f=Tl),y){var b=a.toSeq().map(function(E,R){return[E,y(E,R,a)]}).reduce(function(E,R){return Il(f,E[1],R[1])?R:E});return b&&b[0]}else return a.reduce(function(E,R){return Il(f,E,R)?R:E})}function Il(a,f,y){var b=a(y,f);return b===0&&y!==f&&(y==null||y!==y)||b>0}function wi(a,f,y){var b=sr(a);return b.size=new Me(y).map(function(E){return E.size}).min(),b.__iterate=function(E,R){for(var A=this.__iterator(ie,R),L,H=0;!(L=A.next()).done&&E(L.value,H++,this)!==!1;);return H},b.__iteratorUncached=function(E,R){var A=y.map(function(W){return W=o(W),Oe(R?W.reverse():W)}),L=0,H=!1;return new V(function(){var W;return H||(W=A.map(function(K){return K.next()}),H=W.some(function(K){return K.done})),H?F():oe(E,L++,f.apply(null,W.map(function(K){return K.value})))})},b}function Ve(a,f){return re(a)?f:a.constructor(f)}function Pl(a){if(a!==Object(a))throw new TypeError("Expected [K, V] tuple: "+a)}function Nl(a){return At(a.size),G(a)}function Rl(a){return d(a)?i:h(a)?c:l}function sr(a){return Object.create((d(a)?ne:h(a)?te:ke).prototype)}function Ei(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Pe.prototype.cacheResult.call(this)}function Tl(a,f){return a>f?1:a<f?-1:0}function Ol(a){var f=Oe(a);if(!f){if(!$(a))throw new TypeError("Expected iterable or array-like: "+a);f=Oe(o(a))}return f}n(kt,ns);function kt(a,f){var y,b=function(A){if(A instanceof b)return A;if(!(this instanceof b))return new b(A);if(!y){y=!0;var L=Object.keys(a);uy(E,L),E.size=L.length,E._name=f,E._keys=L,E._defaultValues=a}this._map=Fe(A)},E=b.prototype=Object.create(pt);return E.constructor=b,b}kt.prototype.toString=function(){return this.__toString(Al(this)+" {","}")},kt.prototype.has=function(a){return this._defaultValues.hasOwnProperty(a)},kt.prototype.get=function(a,f){if(!this.has(a))return f;var y=this._defaultValues[a];return this._map?this._map.get(a,y):y},kt.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var a=this.constructor;return a._empty||(a._empty=Xs(this,nr()))},kt.prototype.set=function(a,f){if(!this.has(a))throw new Error('Cannot set unknown key "'+a+'" on '+Al(this));var y=this._map&&this._map.set(a,f);return this.__ownerID||y===this._map?this:Xs(this,y)},kt.prototype.remove=function(a){if(!this.has(a))return this;var f=this._map&&this._map.remove(a);return this.__ownerID||f===this._map?this:Xs(this,f)},kt.prototype.wasAltered=function(){return this._map.wasAltered()},kt.prototype.__iterator=function(a,f){var y=this;return i(this._defaultValues).map(function(b,E){return y.get(E)}).__iterator(a,f)},kt.prototype.__iterate=function(a,f){var y=this;return i(this._defaultValues).map(function(b,E){return y.get(E)}).__iterate(a,f)},kt.prototype.__ensureOwner=function(a){if(a===this.__ownerID)return this;var f=this._map&&this._map.__ensureOwner(a);return a?Xs(this,f,a):(this.__ownerID=a,this._map=f,this)};var pt=kt.prototype;pt[w]=pt.remove,pt.deleteIn=pt.removeIn=Ne.removeIn,pt.merge=Ne.merge,pt.mergeWith=Ne.mergeWith,pt.mergeIn=Ne.mergeIn,pt.mergeDeep=Ne.mergeDeep,pt.mergeDeepWith=Ne.mergeDeepWith,pt.mergeDeepIn=Ne.mergeDeepIn,pt.setIn=Ne.setIn,pt.update=Ne.update,pt.updateIn=Ne.updateIn,pt.withMutations=Ne.withMutations,pt.asMutable=Ne.asMutable,pt.asImmutable=Ne.asImmutable;function Xs(a,f,y){var b=Object.create(Object.getPrototypeOf(a));return b._map=f,b.__ownerID=y,b}function Al(a){return a._name||a.constructor.name||"Record"}function uy(a,f){try{f.forEach(dy.bind(void 0,a))}catch{}}function dy(a,f){Object.defineProperty(a,f,{get:function(){return this.get(f)},set:function(y){Ws(this.__ownerID,"Cannot set on an immutable record."),this.set(f,y)}})}n(Ke,Vs);function Ke(a){return a==null?Ni():Ii(a)&&!_(a)?a:Ni().withMutations(function(f){var y=l(a);At(y.size),y.forEach(function(b){return f.add(b)})})}Ke.of=function(){return this(arguments)},Ke.fromKeys=function(a){return this(i(a).keySeq())},Ke.prototype.toString=function(){return this.__toString("Set {","}")},Ke.prototype.has=function(a){return this._map.has(a)},Ke.prototype.add=function(a){return Pi(this,this._map.set(a,!0))},Ke.prototype.remove=function(a){return Pi(this,this._map.remove(a))},Ke.prototype.clear=function(){return Pi(this,this._map.clear())},Ke.prototype.union=function(){var a=r.call(arguments,0);return a=a.filter(function(f){return f.size!==0}),a.length===0?this:this.size===0&&!this.__ownerID&&a.length===1?this.constructor(a[0]):this.withMutations(function(f){for(var y=0;y<a.length;y++)l(a[y]).forEach(function(b){return f.add(b)})})},Ke.prototype.intersect=function(){var a=r.call(arguments,0);if(a.length===0)return this;a=a.map(function(y){return l(y)});var f=this;return this.withMutations(function(y){f.forEach(function(b){a.every(function(E){return E.includes(b)})||y.remove(b)})})},Ke.prototype.subtract=function(){var a=r.call(arguments,0);if(a.length===0)return this;a=a.map(function(y){return l(y)});var f=this;return this.withMutations(function(y){f.forEach(function(b){a.some(function(E){return E.includes(b)})&&y.remove(b)})})},Ke.prototype.merge=function(){return this.union.apply(this,arguments)},Ke.prototype.mergeWith=function(a){var f=r.call(arguments,1);return this.union.apply(this,f)},Ke.prototype.sort=function(a){return or(Nn(this,a))},Ke.prototype.sortBy=function(a,f){return or(Nn(this,f,a))},Ke.prototype.wasAltered=function(){return this._map.wasAltered()},Ke.prototype.__iterate=function(a,f){var y=this;return this._map.__iterate(function(b,E){return a(E,E,y)},f)},Ke.prototype.__iterator=function(a,f){return this._map.map(function(y,b){return b}).__iterator(a,f)},Ke.prototype.__ensureOwner=function(a){if(a===this.__ownerID)return this;var f=this._map.__ensureOwner(a);return a?this.__make(f,a):(this.__ownerID=a,this._map=f,this)};function Ii(a){return!!(a&&a[kl])}Ke.isSet=Ii;var kl="@@__IMMUTABLE_SET__@@",Mt=Ke.prototype;Mt[kl]=!0,Mt[w]=Mt.remove,Mt.mergeDeep=Mt.merge,Mt.mergeDeepWith=Mt.mergeWith,Mt.withMutations=Ne.withMutations,Mt.asMutable=Ne.asMutable,Mt.asImmutable=Ne.asImmutable,Mt.__empty=Ni,Mt.__make=Ml;function Pi(a,f){return a.__ownerID?(a.size=f.size,a._map=f,a):f===a._map?a:f.size===0?a.__empty():a.__make(f)}function Ml(a,f){var y=Object.create(Mt);return y.size=a?a.size:0,y._map=a,y.__ownerID=f,y}var Ll;function Ni(){return Ll||(Ll=Ml(nr()))}n(or,Ke);function or(a){return a==null?Ri():Dl(a)?a:Ri().withMutations(function(f){var y=l(a);At(y.size),y.forEach(function(b){return f.add(b)})})}or.of=function(){return this(arguments)},or.fromKeys=function(a){return this(i(a).keySeq())},or.prototype.toString=function(){return this.__toString("OrderedSet {","}")};function Dl(a){return Ii(a)&&_(a)}or.isOrderedSet=Dl;var Js=or.prototype;Js[S]=!0,Js.__empty=Ri,Js.__make=Fl;function Fl(a,f){var y=Object.create(Js);return y.size=a?a.size:0,y._map=a,y.__ownerID=f,y}var zl;function Ri(){return zl||(zl=Fl(Qs()))}n(lt,jn);function lt(a){return a==null?Ti():ql(a)?a:Ti().unshiftAll(a)}lt.of=function(){return this(arguments)},lt.prototype.toString=function(){return this.__toString("Stack [","]")},lt.prototype.get=function(a,f){var y=this._head;for(a=J(this,a);y&&a--;)y=y.next;return y?y.value:f},lt.prototype.peek=function(){return this._head&&this._head.value},lt.prototype.push=function(){if(arguments.length===0)return this;for(var a=this.size+arguments.length,f=this._head,y=arguments.length-1;y>=0;y--)f={value:arguments[y],next:f};return this.__ownerID?(this.size=a,this._head=f,this.__hash=void 0,this.__altered=!0,this):us(a,f)},lt.prototype.pushAll=function(a){if(a=c(a),a.size===0)return this;At(a.size);var f=this.size,y=this._head;return a.reverse().forEach(function(b){f++,y={value:b,next:y}}),this.__ownerID?(this.size=f,this._head=y,this.__hash=void 0,this.__altered=!0,this):us(f,y)},lt.prototype.pop=function(){return this.slice(1)},lt.prototype.unshift=function(){return this.push.apply(this,arguments)},lt.prototype.unshiftAll=function(a){return this.pushAll(a)},lt.prototype.shift=function(){return this.pop.apply(this,arguments)},lt.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Ti()},lt.prototype.slice=function(a,f){if(X(a,f,this.size))return this;var y=Z(a,this.size),b=he(f,this.size);if(b!==this.size)return jn.prototype.slice.call(this,a,f);for(var E=this.size-y,R=this._head;y--;)R=R.next;return this.__ownerID?(this.size=E,this._head=R,this.__hash=void 0,this.__altered=!0,this):us(E,R)},lt.prototype.__ensureOwner=function(a){return a===this.__ownerID?this:a?us(this.size,this._head,a,this.__hash):(this.__ownerID=a,this.__altered=!1,this)},lt.prototype.__iterate=function(a,f){if(f)return this.reverse().__iterate(a);for(var y=0,b=this._head;b&&a(b.value,y++,this)!==!1;)b=b.next;return y},lt.prototype.__iterator=function(a,f){if(f)return this.reverse().__iterator(a);var y=0,b=this._head;return new V(function(){if(b){var E=b.value;return b=b.next,oe(a,y++,E)}return F()})};function ql(a){return!!(a&&a[Bl])}lt.isStack=ql;var Bl="@@__IMMUTABLE_STACK__@@",Rn=lt.prototype;Rn[Bl]=!0,Rn.withMutations=Ne.withMutations,Rn.asMutable=Ne.asMutable,Rn.asImmutable=Ne.asImmutable,Rn.wasAltered=Ne.wasAltered;function us(a,f,y,b){var E=Object.create(Rn);return E.size=a,E._head=f,E.__ownerID=y,E.__hash=b,E.__altered=!1,E}var Ul;function Ti(){return Ul||(Ul=us(0))}function ir(a,f){var y=function(b){a.prototype[b]=f[b]};return Object.keys(f).forEach(y),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(f).forEach(y),a}o.Iterator=V,ir(o,{toArray:function(){At(this.size);var a=new Array(this.size||0);return this.valueSeq().__iterate(function(f,y){a[y]=f}),a},toIndexedSeq:function(){return new En(this)},toJS:function(){return this.toSeq().map(function(a){return a&&typeof a.toJS=="function"?a.toJS():a}).__toJS()},toJSON:function(){return this.toSeq().map(function(a){return a&&typeof a.toJSON=="function"?a.toJSON():a}).__toJS()},toKeyedSeq:function(){return new qt(this,!0)},toMap:function(){return Fe(this.toKeyedSeq())},toObject:function(){At(this.size);var a={};return this.__iterate(function(f,y){a[y]=f}),a},toOrderedMap:function(){return nt(this.toKeyedSeq())},toOrderedSet:function(){return or(d(this)?this.valueSeq():this)},toSet:function(){return Ke(d(this)?this.valueSeq():this)},toSetSeq:function(){return new In(this)},toSeq:function(){return h(this)?this.toIndexedSeq():d(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return lt(d(this)?this.valueSeq():this)},toList:function(){return Ge(d(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(a,f){return this.size===0?a+f:a+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+f},concat:function(){var a=r.call(arguments,0);return Ve(this,ay(this,a))},includes:function(a){return this.some(function(f){return rt(f,a)})},entries:function(){return this.__iterator(_e)},every:function(a,f){At(this.size);var y=!0;return this.__iterate(function(b,E,R){if(!a.call(f,b,E,R))return y=!1,!1}),y},filter:function(a,f){return Ve(this,Cl(this,a,f,!0))},find:function(a,f,y){var b=this.findEntry(a,f);return b?b[1]:y},findEntry:function(a,f){var y;return this.__iterate(function(b,E,R){if(a.call(f,b,E,R))return y=[E,b],!1}),y},findLastEntry:function(a,f){return this.toSeq().reverse().findEntry(a,f)},forEach:function(a,f){return At(this.size),this.__iterate(f?a.bind(f):a)},join:function(a){At(this.size),a=a!==void 0?""+a:",";var f="",y=!0;return this.__iterate(function(b){y?y=!1:f+=a,f+=b!=null?b.toString():""}),f},keys:function(){return this.__iterator(ee)},map:function(a,f){return Ve(this,Sl(this,a,f))},reduce:function(a,f,y){At(this.size);var b,E;return arguments.length<2?E=!0:b=f,this.__iterate(function(R,A,L){E?(E=!1,b=R):b=a.call(y,b,R,A,L)}),b},reduceRight:function(a,f,y){var b=this.toKeyedSeq().reverse();return b.reduce.apply(b,arguments)},reverse:function(){return Ve(this,Si(this,!0))},slice:function(a,f){return Ve(this,Ci(this,a,f,!0))},some:function(a,f){return!this.every(eo(a),f)},sort:function(a){return Ve(this,Nn(this,a))},values:function(){return this.__iterator(ie)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return this.size!==void 0?this.size===0:!this.some(function(){return!0})},count:function(a,f){return G(a?this.toSeq().filter(a,f):this)},countBy:function(a,f){return sy(this,a,f)},equals:function(a){return si(this,a)},entrySeq:function(){var a=this;if(a._cache)return new Me(a._cache);var f=a.toSeq().map(py).toIndexedSeq();return f.fromEntrySeq=function(){return a.toSeq()},f},filterNot:function(a,f){return this.filter(eo(a),f)},findLast:function(a,f,y){return this.toKeyedSeq().reverse().find(a,f,y)},first:function(){return this.find(Y)},flatMap:function(a,f){return Ve(this,cy(this,a,f))},flatten:function(a){return Ve(this,El(this,a,!0))},fromEntrySeq:function(){return new Pn(this)},get:function(a,f){return this.find(function(y,b){return rt(b,a)},void 0,f)},getIn:function(a,f){for(var y=this,b=Ol(a),E;!(E=b.next()).done;){var R=E.value;if(y=y&&y.get?y.get(R,N):N,y===N)return f}return y},groupBy:function(a,f){return oy(this,a,f)},has:function(a){return this.get(a,N)!==N},hasIn:function(a){return this.getIn(a,N)!==N},isSubset:function(a){return a=typeof a.includes=="function"?a:o(a),this.every(function(f){return a.includes(f)})},isSuperset:function(a){return a=typeof a.isSubset=="function"?a:o(a),a.isSubset(this)},keySeq:function(){return this.toSeq().map(fy).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(a){return Ys(this,a)},maxBy:function(a,f){return Ys(this,f,a)},min:function(a){return Ys(this,a?Hl(a):Wl)},minBy:function(a,f){return Ys(this,f?Hl(f):Wl,a)},rest:function(){return this.slice(1)},skip:function(a){return this.slice(Math.max(0,a))},skipLast:function(a){return Ve(this,this.toSeq().reverse().skip(a).reverse())},skipWhile:function(a,f){return Ve(this,wl(this,a,f,!0))},skipUntil:function(a,f){return this.skipWhile(eo(a),f)},sortBy:function(a,f){return Ve(this,Nn(this,f,a))},take:function(a){return this.slice(0,Math.max(0,a))},takeLast:function(a){return Ve(this,this.toSeq().reverse().take(a).reverse())},takeWhile:function(a,f){return Ve(this,iy(this,a,f))},takeUntil:function(a,f){return this.takeWhile(eo(a),f)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=my(this))}});var yt=o.prototype;yt[g]=!0,yt[we]=yt.values,yt.__toJS=yt.toArray,yt.__toStringMapper=$l,yt.inspect=yt.toSource=function(){return this.toString()},yt.chain=yt.flatMap,yt.contains=yt.includes,function(){try{Object.defineProperty(yt,"length",{get:function(){if(!o.noLengthWarning){var a;try{throw new Error}catch(f){a=f.stack}if(a.indexOf("_wrapObject")===-1)return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+a),this.size}}})}catch{}}(),ir(i,{flip:function(){return Ve(this,jl(this))},findKey:function(a,f){var y=this.findEntry(a,f);return y&&y[0]},findLastKey:function(a,f){return this.toSeq().reverse().findKey(a,f)},keyOf:function(a){return this.findKey(function(f){return rt(f,a)})},lastKeyOf:function(a){return this.findLastKey(function(f){return rt(f,a)})},mapEntries:function(a,f){var y=this,b=0;return Ve(this,this.toSeq().map(function(E,R){return a.call(f,[R,E],b++,y)}).fromEntrySeq())},mapKeys:function(a,f){var y=this;return Ve(this,this.toSeq().flip().map(function(b,E){return a.call(f,b,E,y)}).flip())}});var Zs=i.prototype;Zs[v]=!0,Zs[we]=yt.entries,Zs.__toJS=yt.toObject,Zs.__toStringMapper=function(a,f){return JSON.stringify(f)+": "+$l(a)},ir(c,{toKeyedSeq:function(){return new qt(this,!1)},filter:function(a,f){return Ve(this,Cl(this,a,f,!1))},findIndex:function(a,f){var y=this.findEntry(a,f);return y?y[0]:-1},indexOf:function(a){var f=this.toKeyedSeq().keyOf(a);return f===void 0?-1:f},lastIndexOf:function(a){var f=this.toKeyedSeq().reverse().keyOf(a);return f===void 0?-1:f},reverse:function(){return Ve(this,Si(this,!1))},slice:function(a,f){return Ve(this,Ci(this,a,f,!1))},splice:function(a,f){var y=arguments.length;if(f=Math.max(f|0,0),y===0||y===2&&!f)return this;a=Z(a,a<0?this.count():this.size);var b=this.slice(0,a);return Ve(this,y===1?b:b.concat(B(arguments,2),this.slice(a+f)))},findLastIndex:function(a,f){var y=this.toKeyedSeq().findLastKey(a,f);return y===void 0?-1:y},first:function(){return this.get(0)},flatten:function(a){return Ve(this,El(this,a,!1))},get:function(a,f){return a=J(this,a),a<0||this.size===1/0||this.size!==void 0&&a>this.size?f:this.find(function(y,b){return b===a},void 0,f)},has:function(a){return a=J(this,a),a>=0&&(this.size!==void 0?this.size===1/0||a<this.size:this.indexOf(a)!==-1)},interpose:function(a){return Ve(this,ly(this,a))},interleave:function(){var a=[this].concat(B(arguments)),f=wi(this.toSeq(),te.of,a),y=f.flatten(!0);return f.size&&(y.size=f.size*a.length),Ve(this,y)},last:function(){return this.get(-1)},skipWhile:function(a,f){return Ve(this,wl(this,a,f,!1))},zip:function(){var a=[this].concat(B(arguments));return Ve(this,wi(this,hy,a))},zipWith:function(a){var f=B(arguments);return f[0]=this,Ve(this,wi(this,a,f))}}),c.prototype[x]=!0,c.prototype[S]=!0,ir(l,{get:function(a,f){return this.has(a)?a:f},includes:function(a){return this.has(a)},keySeq:function(){return this.valueSeq()}}),l.prototype.has=yt.includes,ir(ne,i.prototype),ir(te,c.prototype),ir(ke,l.prototype),ir(ns,i.prototype),ir(jn,c.prototype),ir(Vs,l.prototype);function fy(a,f){return f}function py(a,f){return[f,a]}function eo(a){return function(){return!a.apply(this,arguments)}}function Hl(a){return function(){return-a.apply(this,arguments)}}function $l(a){return typeof a=="string"?JSON.stringify(a):a}function hy(){return B(arguments)}function Wl(a,f){return a<f?1:a>f?-1:0}function my(a){if(a.size===1/0)return 0;var f=_(a),y=d(a),b=f?1:0,E=a.__iterate(y?f?function(R,A){b=31*b+Vl(Ot(R),Ot(A))|0}:function(R,A){b=b+Vl(Ot(R),Ot(A))|0}:f?function(R){b=31*b+Ot(R)|0}:function(R){b=b+Ot(R)|0});return _y(E,b)}function _y(a,f){return f=ss(f,3432918353),f=ss(f<<15|f>>>-15,461845907),f=ss(f<<13|f>>>-13,5),f=(f+3864292196|0)^a,f=ss(f^f>>>16,2246822507),f=ss(f^f>>>13,3266489909),f=ai(f^f>>>16),f}function Vl(a,f){return a^f+2654435769+(a<<6)+(a>>2)|0}var gy={Iterable:o,Seq:Pe,Collection:wr,Map:Fe,OrderedMap:nt,List:Ge,Stack:lt,Set:Ke,OrderedSet:or,Record:kt,Range:gt,Repeat:_t,is:rt,fromJS:Je};return gy})})(S_);var C_=S_.exports,pa=new C_.OrderedSet;function MC(e,t){for(var r=null,n=null,o=[],i=0,c=0,l=e.length;c<l;c++){n=r;var u=t.get(c);r=u?u.getEntity():null,c>0&&r!==n&&(o.push([n,cd(e.slice(i,c),t.slice(i,c))]),i=c)}return o.push([r,cd(e.slice(i),t.slice(i))]),o}function cd(e,t){for(var r=pa,n=pa,o=[],i=0,c=0,l=e.length;c<l;c++){n=r;var u=t.get(c);r=u?u.getStyle():pa,c>0&&!C_.is(r,n)&&(o.push([e.slice(i,c),n]),i=c)}return o.push([e.slice(i),r]),o}var Kr,jo,So;function ld(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(e)),t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r}function Co(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ld(r,!0).forEach(function(n){ot(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ld(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ha(e,t){return FC(e)||DC(e,t)||LC()}function LC(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function DC(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var c=e[Symbol.iterator](),l;!(n=(l=c.next()).done)&&(r.push(l.value),!(t&&r.length===t));n=!0);}catch(u){o=!0,i=u}finally{try{!n&&c.return!=null&&c.return()}finally{if(o)throw i}}return r}function FC(e){if(Array.isArray(e))return e}function zC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function BC(e,t,r){return t&&qC(e.prototype,t),e}function ot(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var w_=Bs.BOLD,Kc=Bs.CODE,E_=Bs.ITALIC,I_=Bs.STRIKETHROUGH,P_=Bs.UNDERLINE,UC=" ",N_="<br>",ud=/^data-([a-z0-9-]+)$/,HC=(Kr={},ot(Kr,w_,{element:"strong"}),ot(Kr,Kc,{element:"code"}),ot(Kr,E_,{element:"em"}),ot(Kr,I_,{element:"del"}),ot(Kr,P_,{element:"u"}),Kr),$C=[w_,E_,P_,I_,Kc],wo=(jo={},ot(jo,Zn.LINK,{url:"href",href:"href",rel:"rel",target:"target",title:"title",className:"class"}),ot(jo,Zn.IMAGE,{src:"src",height:"height",width:"width",alt:"alt",className:"class"}),jo),Eo=(So={},ot(So,Zn.LINK,function(e,t){for(var r=wo.hasOwnProperty(e)?wo[e]:{},n=t.getData(),o={},i=0,c=Object.keys(n);i<c.length;i++){var l=c[i],u=n[l];if(r.hasOwnProperty(l)){var d=r[l];o[d]=u}else ud.test(l)&&(o[l]=u)}return o}),ot(So,Zn.IMAGE,function(e,t){for(var r=wo.hasOwnProperty(e)?wo[e]:{},n=t.getData(),o={},i=0,c=Object.keys(n);i<c.length;i++){var l=c[i],u=n[l];if(r.hasOwnProperty(l)){var d=r[l];o[d]=u}else ud.test(l)&&(o[l]=u)}return o}),So);function dd(e,t){switch(e){case vt.HEADER_ONE:return["h1"];case vt.HEADER_TWO:return["h2"];case vt.HEADER_THREE:return["h3"];case vt.HEADER_FOUR:return["h4"];case vt.HEADER_FIVE:return["h5"];case vt.HEADER_SIX:return["h6"];case vt.UNORDERED_LIST_ITEM:case vt.ORDERED_LIST_ITEM:return["li"];case vt.BLOCKQUOTE:return["blockquote"];case vt.CODE:return["pre","code"];case vt.ATOMIC:return["figure"];default:return t===null?[]:[t||"p"]}}function WC(e){switch(e){case vt.UNORDERED_LIST_ITEM:return"ul";case vt.ORDERED_LIST_ITEM:return"ol";default:return null}}var VC=function(){function e(t,r){zC(this,e),ot(this,"blocks",void 0),ot(this,"contentState",void 0),ot(this,"currentBlock",void 0),ot(this,"indentLevel",void 0),ot(this,"output",void 0),ot(this,"totalBlocks",void 0),ot(this,"wrapperTag",void 0),ot(this,"options",void 0),ot(this,"inlineStyles",void 0),ot(this,"inlineStyleFn",void 0),ot(this,"styleOrder",void 0),r==null&&(r={}),this.contentState=t,this.options=r;var n=PC(r.inlineStyles,[HC,$C]),o=ha(n,2),i=o[0],c=o[1];this.inlineStyles=i,this.inlineStyleFn=r.inlineStyleFn,this.styleOrder=c}return BC(e,[{key:"generate",value:function(){for(this.output=[],this.blocks=this.contentState.getBlocksAsArray(),this.totalBlocks=this.blocks.length,this.currentBlock=0,this.indentLevel=0,this.wrapperTag=null;this.currentBlock<this.totalBlocks;)this.processBlock();return this.closeWrapperTag(),this.output.join("").trim()}},{key:"processBlock",value:function(){var r=this.options,n=r.blockRenderers,o=r.defaultBlockTag,i=this.blocks[this.currentBlock],c=i.getType(),l=WC(c);this.wrapperTag!==l&&(this.wrapperTag&&this.closeWrapperTag(),l&&this.openWrapperTag(l)),this.indent();var u=n!=null&&n.hasOwnProperty(c)?n[c]:null,d=u?u(i):null;if(d!=null){this.output.push(d),this.output.push(`
|
|
19
|
+
`),this.currentBlock+=1;return}this.writeStartTag(i,o),this.output.push(this.renderBlockContent(i));var h=this.getNextBlock();if(GC(c)&&h&&h.getDepth()===i.getDepth()+1){this.output.push(`
|
|
20
|
+
`);var m=this.wrapperTag;this.wrapperTag=null,this.indentLevel+=1,this.currentBlock+=1,this.processBlocksAtDepth(h.getDepth()),this.wrapperTag=m,this.indentLevel-=1,this.indent()}else this.currentBlock+=1;this.writeEndTag(i,o)}},{key:"processBlocksAtDepth",value:function(r){for(var n=this.blocks[this.currentBlock];n&&n.getDepth()===r;)this.processBlock(),n=this.blocks[this.currentBlock];this.closeWrapperTag()}},{key:"getNextBlock",value:function(){return this.blocks[this.currentBlock+1]}},{key:"writeStartTag",value:function(r,n){var o=dd(r.getType(),n),i;if(this.options.blockStyleFn){var c=this.options.blockStyleFn(r)||{},l=c.attributes,u=c.style;if(l=fa(l),u!=null){var d=bo(u);l=l==null?{style:d}:Co({},l,{style:d})}i=On(l)}else i="";var h=!0,m=!1,_=void 0;try{for(var g=o[Symbol.iterator](),v;!(h=(v=g.next()).done);h=!0){var x=v.value;this.output.push("<".concat(x).concat(i,">"))}}catch(S){m=!0,_=S}finally{try{!h&&g.return!=null&&g.return()}finally{if(m)throw _}}}},{key:"writeEndTag",value:function(r,n){var o=dd(r.getType(),n);if(o.length===1)this.output.push("</".concat(o[0],`>
|
|
21
21
|
`));else{var i=[],c=!0,l=!1,u=void 0;try{for(var d=o[Symbol.iterator](),h;!(c=(h=d.next()).done);c=!0){var m=h.value;i.unshift("</".concat(m,">"))}}catch(_){l=!0,u=_}finally{try{!c&&d.return!=null&&d.return()}finally{if(l)throw u}}this.output.push(i.join("")+`
|
|
22
22
|
`)}}},{key:"openWrapperTag",value:function(r){this.wrapperTag=r,this.indent(),this.output.push("<".concat(r,`>
|
|
23
23
|
`)),this.indentLevel+=1}},{key:"closeWrapperTag",value:function(){var r=this.wrapperTag;r&&(this.indentLevel-=1,this.indent(),this.output.push("</".concat(r,`>
|
|
24
|
-
`)),this.wrapperTag=null)}},{key:"indent",value:function(){this.output.push(
|
|
25
|
-
`).join(
|
|
26
|
-
`)}function GC(e){return e.split("&").join("&").split("<").join("<").split(">").join(">").split('"').join(""")}function KC(e,t){return new $C(e,t).generate()}const dd=e=>{const r=Gc(JSON.parse(e)).getCurrentContent();return KC(r)},QC=({expanded:e,content:t})=>{const r=t.textStructureReduced?dd(t.textStructureReduced):null,n=t.showTextStructureExpander&&t.textStructure?dd(t.textStructure):null;return s.jsxs("details",{open:e,children:[r&&s.jsx("summary",{onClick:o=>o.preventDefault(),dangerouslySetInnerHTML:{__html:r}}),n&&s.jsx("div",{dangerouslySetInnerHTML:{__html:n}})]})},YC="_textContentWrapper_176ht_5",XC="_textContentSection_176ht_13",Wa={"link-modifier":"_link-modifier_176ht_1",textContentWrapper:YC,textContentSection:XC},P_=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:r})=>{var i;const[n,o]=j.useState(!1);return s.jsx(p.TextStructure.Root,{layoutProps:{textRow:{alignContent:Tn(e.textStructureAlignment),alignItems:Tn(e.textStructureAlignment)},columnWrapper:{alignContent:Tn(e.textStructureAlignment),alignItems:Tn(e.textStructureAlignment)}},adornment:{bottom:e.showTextStructureExpander&&e.textStructure?s.jsx(p.Button,{variant:"tertiary",adornment:{end:s.jsx(p.Icon,{name:n?`${t.arrow_up}`:`${t.arrow_down}`})},onClick:()=>o(c=>!c),size:"small",children:n?(r==null?void 0:r.less)??"Ver Menos":(r==null?void 0:r.more)??"Ver Mais"}):s.jsx(s.Fragment,{})},children:s.jsxs(p.Utils.Column,{className:Wa.textContentWrapper,style:{alignItems:Tn(e.textStructureAlignment)},children:[s.jsx(p.TextStructure.DivWrapper,{style:{textAlign:Tn(e.textStructureAlignment)},mode:e.textStructureMode??"default",children:e.textStructureReduced?s.jsx(QC,{content:e,expanded:n}):s.jsx(s.Fragment,{})}),e.textStructureButtonLabel?s.jsx(wt,{mode:e.textStructureMode??"default",href:e.textStructureButtonHref??"#",size:e.textStructureButtonSize,className:Wa["link-modifier"],adornments:(i=e.textStructureButtonIcon)!=null&&i.length&&e.enableIcon?{end:s.jsx(p.Icon,{name:e.textStructureButtonIcon})}:void 0,children:e.textStructureButtonLabel}):s.jsx(s.Fragment,{})]})})},JC=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],fd=e=>({centro:"center",esquerda:"start",direita:"end"})[e],pd={"content-modifier":"_content-modifier_16y4u_5","banner-image-wrapper-modifier":"_banner-image-wrapper-modifier_16y4u_13"},hd=({data:e,videoUrl:t,priority:r,videoRef:n,ICONS:o,TEXTCONTENT_EXPANDED:i,TIME_ZONE:c,className:l,...u})=>{const{video:d,image:h,imageHref:m,imageOpacity:_,altImage:g,backgroundColor:v,position:x,contentAlignment:S,showTimer:w,contentOrder:P,timerMode:I,timerEnd:C,timerInit:N,textStructure:T,textStructureReduced:O}=e.banner,M=(m==null?void 0:m.trim())||(h==null?void 0:h.trim())||null,{nextimage:z}=Ae();return s.jsxs(p.Banner.Container,{...u,children:[s.jsxs(p.Banner.ImageWrapper,{className:pd["banner-image-wrapper-modifier"],style:_?{background:v}:void 0,children:[d&&s.jsx(at.Video,{videoRef:n,src:t,autoPlay:r,loop:!0,playsInline:!0,muted:!0}),M&&!(d!=null&&d.length)&&s.jsx(z,{src:M,width:"1920",height:"1080",alt:g??h??"",...r?{priority:r}:{},style:_?{opacity:"0"}:void 0}),!h&&!(d!=null&&d.length)&&s.jsx("div",{style:{background:v}})]}),w||O||T?s.jsx(p.Banner.Slot,{...JC(x??"centro"),className:p.helpers.classNameConcat(pd["content-modifier"],l),style:{textAlign:fd(S)},children:s.jsxs(p.Utils.Column,{gap:"16px",alignItems:fd(S),children:[w&&P==="timer-first"&&s.jsx(qo,{mode:I??"default",size:"small",dateEnd:C?new Date(C):new Date,dateInit:N?new Date(N):new Date,TIME_ZONE:c}),s.jsx(P_,{data:e.banner,ICONS:o,TEXTCONTENT_EXPANDED:i}),w&&P!=="timer-first"&&s.jsx(qo,{mode:I??"default",size:"small",dateEnd:C?new Date(C):new Date,dateInit:N?new Date(N):new Date,TIME_ZONE:c})]})}):s.jsx(s.Fragment,{})]})};class Kt extends j.Component{constructor(){super(...arguments);Gr(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(){return{hasError:!0,error:null}}componentDidCatch(r,n){if(process.env.NODE_ENV!=="production"){if(this.props.debugger)debugger;console.groupCollapsed("Error Boundary CMS",this.props.name),console.log("Error:",(r==null?void 0:r.message)??r),console.log("Error Info:",n),console.groupEnd()}}render(){const{hasError:r}=this.state,{children:n,fallback:o}=this.props;return r&&process.env.NODE_ENV==="production"?null:r&&o!==void 0?o:n}}const Us=({data:e,className:t,priority:r,creative:n,name:o,...i})=>{const{handleSelectPromotionEvent:c,currentLocalRef:l}=Ee(),{banner:{promotion_name:u},index:d,componentIndex:h}=e,m=typeof d=="number"?`:${d+1}`:"",_={creative_name:n,creative_slot:`${n}-${l.current}:${h+1}${m}`,promotion_id:e.banner.href,promotion_name:u},g=j.useRef(null),v=j.useMemo(()=>{var S;if((S=e.banner.video)!=null&&S.includes("player.vimeo")){const w=e.banner.video.split("?")[1],P=w==null?void 0:w.split("&"),I=P==null?void 0:P.filter(N=>N.includes("loc")||N.includes("signature")||N.includes("user_id")),C=I==null?void 0:I.join("&");return`${e.banner.video.split("?")[0]}?${C}`}return e.banner.video},[e]),x=()=>{var S;(S=g.current)!=null&&S.paused&&g.current.play()};return s.jsx(Kt,{name:o,children:s.jsx(Ko,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{..._,index:d}}}},observerOptions:{delay:100,...v&&{threshold:.1}},...v&&{callBackWhenVisible:x},children:e.banner.href?s.jsx(Tt,{href:e.banner.href,onClick:()=>{c({updatePromotionRef:!0,promotion:_,index:d})},children:s.jsx(hd,{data:e,videoUrl:v,priority:r,videoRef:g,className:t,...i})}):s.jsx(hd,{data:e,videoUrl:v,priority:r,videoRef:g,className:t,...i})})})},Qc=e=>s.jsx(Kt,{name:e.name,children:s.jsx(Us,{...e})}),N_=({columns:e,gap:t,className:r})=>{const{isMobile:n}=xe(),{banners:o}=zs(),{constants:{ICONS:i,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u}}=ut();return Array.isArray(o)?o.map((d,h)=>j.createElement(Dt.Banner,{...d,columns:d.columns,gap:t,isMobile:n??!1,key:`${d.position_grid}-${h}`,totalColumns:e,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c},s.jsx(Us,{name:"Banner Carousel",data:{banner:d,componentIndex:h},creative:"banner_grid",ICONS:i,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u,className:r}))):null};N_.displayName="PDC.InfiniteScroller.Banners";const R_=({page:e,...t})=>{var c;const{rootRef:r}=Ze(),{gap:n,updateParamPage:o}=Hr(),{element:i}=Uo({callback:()=>o(e.page),options:{threshold:0}});return s.jsx("div",{...t,id:`pdc-scroll-infinite-${e==null?void 0:e.page}`,className:St["pdc--infinite--loader"],"data-page":e.page,ref:i,style:{top:(Number(((c=r==null?void 0:r.current)==null?void 0:c.offsetHeight)??0)+n*2)*-1}})};R_.displayName="PDC.Page.Anchor";const T_=e=>{var n;const{gap:t}=Hr(),{rootRef:r}=Ze();return s.jsx("div",{...e,className:St["pdc--infinite--card--anchor-pdp"],style:{top:(Number(((n=r==null?void 0:r.current)==null?void 0:n.offsetHeight)??0)+t*2)*-1}})};T_.displayName="PDC.Page.AnchorPDP";const O_=({first:e,gap:t,empty:r=!1,isMobile:n=!1,item:o,index:i,order:c,page:l,showVideo:u=!1})=>{const{handleNotify:d}=Hr(),{getAvailableProductTag:h}=jr(),{constants:m,mainSeller:_}=ut(),{load:g}=Ur(),v=h(o==null?void 0:o.cluster.highlights);if(r)return;const{BUY_BUTTON_LABELS:x,MAIN_IMAGE:S,PLP_GRID_SCROLL_BACK:w,PLP_INFINITE_SCROLL:P,PLP_PRODUCT_SIMILAR_DELAY:I,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:C,PLP_SIZE_ORDER:N,PRODUCT_CARD_IMAGE_ASPECT_RATIO:T,PRODUCT_CARD_TEXTS:O,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:M,PRODUCT_IMAGE_DIMENSIONS:z,SECOND_IMAGE:D,TEXTURE_IMAGE:B,Z_INDEX_WAR:G,ICONS:J}=m;return s.jsxs(Dt.Card,{"data-skeleton":o.id==="skeleton",className:St["pdc--infinite--card--disabled"],gap:t,isMobile:n??!1,item:o,order:c,tag:v,index:i,setSkuSelected:d,showVideo:u,CONSTANTS:{BUY_BUTTON_LABELS:x,MAIN_IMAGE:S,PLP_GRID_SCROLL_BACK:w,PLP_INFINITE_SCROLL:P,PLP_PRODUCT_SIMILAR_DELAY:I,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:C,PLP_SIZE_ORDER:N,PRODUCT_CARD_IMAGE_ASPECT_RATIO:T,PRODUCT_CARD_TEXTS:O,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:M,PRODUCT_IMAGE_DIMENSIONS:z,SECOND_IMAGE:D,StoreConfig_MainSellerId:_,TEXTURE_IMAGE:B,Z_INDEX_WAR:G,ICONS:J},children:[s.jsx(bs.AnchorPDP,{}),e&&l&&s.jsx(bs.Anchor,{page:l}),g&&l&&!(l!=null&&l.loading)?s.jsx(bs.Loader,{page:l}):null]})};O_.displayName="PDC.Page.Card";const A_=({type:e="default",page:t,...r})=>{const{updateProducts:n}=Ur(),{element:o}=Uo({callback:()=>{t.loading||n(t.page)},onEnterViewportOnce:!0,options:{threshold:[.2,.5]}});return s.jsx("div",{...r,className:St[`pdc--infinite--loader${e==="page"?"--page":""}`],ref:o})};A_.displayName="PDC.Page.Loader";const k_=({nextPage:e=!1,page:t,total:r,...n})=>{const{addNewPage:o}=Hr(),{element:i}=Uo({callback:()=>{o(t,r,e)},onEnterViewportOnce:!0,options:{threshold:[.1,.5]}});return e===!0&&t.loading===!0?s.jsx("div",{...n,className:St["pdc--infinite--next-page--card"],"data-next-page":!0,ref:i}):null};k_.displayName="PDC.Page.NextPage";const bs={Anchor:R_,AnchorPDP:T_,Card:O_,Loader:A_,NextPage:k_},ZC=({page:e})=>{const{isMobile:t}=xe(),{gap:r,columns:n}=Hr(),{isLoading:o,pagination:i,products:c}=qs(),{load:l,products:u,trimPages:d,setLoad:h}=Ur(),{constants:{ICONS:m,PLP_NOT_RESULT:_,ITEMS_PER_PAGE:g}}=ut(),{count:v,nextPage:x,total:S}=i,w=(e.page-1)*24;j.useEffect(()=>{o||h(!0)},[o,h]),j.useEffect(()=>{!o&&c.length===0&&e.loading&&e.page>S&&e.page>1&&d(S)},[o,e,c,S,d]);const P=e.page===S?v-g*(e.page-1):g,I=c.length>0?c:Array.from({length:P},()=>Uf()),C=Wf(I.map(T=>T.node),n),N=l&&e.page===1&&!o&&i.total===0;return s.jsxs(s.Fragment,{children:[e.page===1&&s.jsx(Vc,{total:(i==null?void 0:i.count)??0}),N&&s.jsx(tr.Empty,{ICONS:m,PLP_NOT_RESULT:_}),Array.isArray(I)?I.map((T,O)=>{const M=u[w+O]+1;return s.jsx(bs.Card,{empty:e.loading&&e.page===1&&!o&&!c.length,first:O===0,gap:r,index:O,item:T.node,isMobile:t??!1,order:M,page:e,showVideo:C.indexOf(O)!==-1},M)}):null,l&&!o&&x&&c.length>0&&s.jsx(bs.NextPage,{page:e,nextPage:x,total:S})]})},M_=({page:e})=>{const{state:t}=ft(),{sendDataLayerEvent:r}=Ee(),n=j.useCallback(o=>{r({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o.products}}})},[r,t==null?void 0:t.query]);return s.jsx(Wc,{callback:n,state:{...t,page:e==null?void 0:e.page},queryKey:[String(e==null?void 0:e.page),t.sort,JSON.stringify(Object.entries(t.facets??{}).sort())],options:{enabled:e.loading,gcTime:1e3*60*30,staleTime:1e3*60*5,refetchOnWindowFocus:!1},children:s.jsx(ZC,{page:e})})};M_.displayName="PDC.Page";const ew=()=>{var I;const{constants:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:n,PLP_FILTERS_TITLE:o,PLP_SIZE_ORDER:i},openFilters:c,setOpenFilters:l}=ut(),[u,d]=j.useState("10000:0"),{isMobile:h}=xe(),{state:m}=ft(),{breadcrumb:_,deleteAllFacets:g,facets:v,isLoading:x,onToggleFacet:S}=$c(),w={isLast:!0,href:(I=m.term)!=null&&I.length?`/${m.term}`:"",name:m.term},P=U.filterNonRootFacets(m.facets,m==null?void 0:m.base);return j.useEffect(()=>{const C=v.find(({key:N})=>N==="price");if(C){const[N,T]=l_(C.values,u??"10000:0");d(`${N}:${T}`)}},[v,u,d]),s.jsxs(dn.teamComponents.Filter.Root,{CONSTANTS:{ICONS:e,PLP_FILTERS_TITLE:o,PLP_FILTERS:t},breadcrumb:_.length?_:[w],deleteAllFacets:g,filters:{facets:U.filterNonCategorySelected(v,m==null?void 0:m.base),selected:P},isMobile:h??!1,isLoading:x??!1,isOpen:c,price:u,onToggleFacet:S,setIsOpen:l,children:[s.jsx(dn.teamComponents.Filter.Selected,{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r}),s.jsx(dn.teamComponents.Filter.Content,{columns:2,CONSTANTS:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:n,PLP_SIZE_ORDER:i}})]})},L_=({sort:e,...t})=>{const{load:r}=Ur();return s.jsxs(h_,{...t,enabled:r,children:[s.jsx(tr.Navigation,{}),s.jsx(ew,{})]})};L_.displayName="PDC.INFINITE-SCROLLER.FILTERS";const tw=({load:e,PLP_GRID_SCROLL_BACK:t})=>{const r=j.useRef(!1);j.useEffect(()=>{if(e&&!r.current){const n=sessionStorage.getItem(t.refer),o=sessionStorage.getItem(t.order);if(n==="true"){const i=document.querySelector(`[data-order="${o}"] > [class*="anchor-pdp"]`);i&&(i.scrollIntoView({behavior:"instant",block:"start"}),r.current=!0),sessionStorage.setItem(t.refer,"false")}else{const i=document.querySelectorAll('[id*="pdc-scroll-infinite"]');if(i.length>0){const c=i[i.length-1];i.length>1&&c.scrollIntoView({behavior:"instant",block:"start"}),r.current=!0}}}if(!e&&r.current){r.current=!1;const n=document.querySelector("body > main");n&&n.scrollIntoView({behavior:"instant",block:"start"})}},[e])},rw=e=>{const{constants:{PLP_GRID_SCROLL_BACK:t,ITEMS_PER_PAGE:r}}=ut(),{gap:n,columns:o}=Hr(),{load:i,pages:c}=Ur();return tw({load:i,PLP_GRID_SCROLL_BACK:t}),s.jsx("div",{className:St["pdc--grid--content"],children:s.jsxs(Dt.Root,{children:[Array.isArray(c)&&c.map(l=>s.jsx(M_,{count:r,page:l},l.page)),s.jsx(N_,{columns:o,count:r,gap:n})]})})},D_=e=>{const{state:t}=ft(),{banners:r}=zs(),{columns:n}=Hr(),{constants:{ITEMS_PER_PAGE:o,PLP_SORT_DEFAULT:i}}=ut(),{createPagesScroll:c}=Ur(),l=j.useRef(!1);return j.useEffect(()=>{if(l.current)return;const u=$o(r,50,n,o);c(t.page,u),l.current=!0},[]),s.jsxs(ip,{banners:r,children:[s.jsx(L_,{state:t,sort:i}),s.jsx(rw,{})]})};D_.displayName="PDC.InfiniteScroller";const F_=()=>{const{state:e}=ft(),{constants:{Z_INDEX_WAR:t},setOpenFilters:r}=ut(),{selectedFacets:n,onToggleFacet:o,onSort:i}=$c(),c=U.filterNonRootFacets(n,e==null?void 0:e.base);return s.jsx(Br.Root,{onSort:i,setOpenFilters:r,style:{zIndex:t.plp_navigation},children:s.jsx(Br.Selected,{callback:o,selected:c})})};F_.displayName="Navigation";const Va=({currentPage:e,callback:t,type:r,...n})=>s.jsx(p.Button,{...n,iconNameStart:`arrow-${r}`,onClick:()=>{typeof t=="function"&&t(r==="left"?"prev":"")},size:"large",variant:"tertiary"});Va.displayName="Arrow";const Ga=({active:e,prev:t,ellipses:r,page:n,selectedPage:o})=>s.jsxs(s.Fragment,{children:[r&&t&&s.jsx(p.Button,{size:"large",variant:"tertiary",children:"..."}),e&&s.jsx(p.Pagination.Item,{isActive:!1,index:n,variant:"tertiary",onClick:()=>{typeof o=="function"&&o(n)},children:n}),r&&!t&&s.jsx(p.Button,{size:"large",variant:"tertiary",children:"..."})]});Ga.displayName="PageEllipses";const z_=({children:e,endPage:t,page:r,total:n,selectedPage:o,ITEMS_PER_SECTION:i})=>s.jsxs(s.Fragment,{children:[s.jsx(Ga,{active:r>=i&&n>i,selectedPage:o,currentPage:r,prev:!1,ellipses:r>i&&n>i,page:1}),e,s.jsx(Ga,{active:n-r>1&&n!==t,selectedPage:o,currentPage:r,prev:!0,ellipses:t<n-1,page:n})]});z_.displayName="Pagination.Layout";const nw=(e,t,r)=>{const n=new URLSearchParams(r);return n.set(e,t),n.toString()},sw=(e,t)=>{const r=[];for(let n=e;n<=t;n++)r.push(n);return r},ow=({currentPage:e,total:t,maxVisiblePages:r,SEARCH_PAGE_ITEM_THRESHOLD:n})=>{const o=t>=n?n:t,i=Math.max(1,e===o?o-r+1:e-Math.floor(r/2)),c=Math.min(o,i+r-1);return{startPage:i,endPage:c,totalPages:o}},q_=({currentPage:e,pages:t,searchParams:r,VARIANT_PAGINATION:n})=>{const{router:o,pathname:i}=Ae();return Array.isArray(t)?t.map(c=>s.jsx(p.Pagination.Item,{isActive:e===c,index:c,variant:e===c?n.active:n.default,onClick:()=>o.push(`${i}?${nw("page",c.toString(),r)}`),children:c},c)):null};q_.displayName="Pages";const Yc=({query:e,type:t="default",searchParams:r,ITEMS_DEFAULT_SORT:n,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:i,SEARCH_PAGE_ITEM_THRESHOLD:c,VARIANT_PAGINATION:l,...u})=>{const{router:d,pathname:h}=Ae(),{state:{page:m=1}}=ft(),{pagination:{total:_}}=qs(),{endPage:g,totalPages:v,startPage:x}=ow({currentPage:m,total:_,maxVisiblePages:o,SEARCH_PAGE_ITEM_THRESHOLD:c}),S=P=>{const I=P.toString(),C=new URLSearchParams(r.toString());t==="default"&&C.set("page",I),t==="search"&&(C.set("query",e??""),C.set("count",i.toString()),C.set("page",I),n&&C.set("sort",n.replace("_",":")));const T=`${t==="search"?"/search":h}?${C.toString()}`;d.push(T)},w=P=>{S(P==="prev"?m-1:m+1)};return _?s.jsx("div",{...u,className:St["pdc--pagination"],children:s.jsx(p.Pagination.Wrapper,{adornment:{start:s.jsx(Va,{callback:w,currentPage:m,disabled:m<2,type:"left"}),end:s.jsx(Va,{callback:w,currentPage:m,disabled:m>=v,type:"right"})},children:s.jsx(z_,{endPage:g,page:m,selectedPage:S,total:_,ITEMS_PER_SECTION:o,children:s.jsx(q_,{currentPage:m,pages:sw(x,g),searchParams:r,VARIANT_PAGINATION:l})})})}):null};Yc.displayName="Pagination";const B_=({gap:e,isMobile:t,className:r})=>{const{state:n}=ft(),{banners:o}=zs(),{constants:i}=ut(),{ICONS:c,PRODUCT_CARD_IMAGE_ASPECT_RATIO:l,TEXTCONTENT_EXPANDED:u,TIME_ZONE:d}=i,h=o.filter(m=>Gf(m.position_grid,n.page,(n==null?void 0:n.count)??1));return Array.isArray(h)?h.map((m,_)=>s.jsx(Dt.Banner,{columns:m.columns,gap:e,isMobile:t,position_grid:m.position_grid,totalColumns:t?2:4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:l,children:s.jsx(Us,{name:"Banner Carousel",data:{banner:m,componentIndex:_},creative:"banner_grid",ICONS:c,TEXTCONTENT_EXPANDED:u,TIME_ZONE:d,className:r})},m.position_grid)):null};B_.displayName="PDC.Grid.Banners";const U_=({isMobile:e=!1,items:t,BUY_BUTTON_LABELS:r,ICONS:n,MAIN_IMAGE:o,NEWSLETTER_CONFIGS:i,NOTIFY_INFO:c,PLP_GRID_SCROLL_BACK:l,PLP_INFINITE_SCROLL:u,PLP_PRODUCT_SIMILAR_DELAY:d,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:h,PLP_SIZE_ORDER:m,PRODUCT_CARD_IMAGE_ASPECT_RATIO:_,PRODUCT_CARD_TEXTS:g,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:v,PRODUCT_IMAGE_DIMENSIONS:x,SECOND_IMAGE:S,StoreConfig_MainSellerId:w,TEXTURE_IMAGE:P,Z_INDEX_WAR:I})=>{const{banners:C}=zs(),{getAvailableProductTag:N}=jr(),{state:T}=ft(),[O,M]=j.useState(!1),[z,D]=j.useState(null),[B,G]=j.useState([]),J=j.useCallback((fe,ee)=>{const ie=ee?Ds([ee]):null;G(fe),D(ie!=null&&ie.length?ie[0]:null),M(!0)},[]),Y=e?8:16,X=(T.page-1)*((T==null?void 0:T.count)??1),Z=Dt.helpers.createGridPosAndVideo(t,C,e?2:4,T.page),he=$o(C,T.page,e?2:4);return s.jsxs(s.Fragment,{children:[s.jsxs(Dt.Root,{children:[Array.isArray(t)&&t.map((fe,ee)=>{var _e;const ie=N(fe.node.cluster.highlights);return s.jsx(Dt.Card,{gap:Y,isMobile:e??!1,item:fe.node,order:he.products[X+ee]+1,tag:ie,index:ee,setSkuSelected:J,showVideo:(_e=Z[ee])==null?void 0:_e.canPlayVideo,CONSTANTS:{BUY_BUTTON_LABELS:r,MAIN_IMAGE:o,PLP_GRID_SCROLL_BACK:l,PLP_INFINITE_SCROLL:u,PLP_PRODUCT_SIMILAR_DELAY:d,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:h,PLP_SIZE_ORDER:m,PRODUCT_CARD_IMAGE_ASPECT_RATIO:_,PRODUCT_CARD_TEXTS:g,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:v,PRODUCT_IMAGE_DIMENSIONS:x,SECOND_IMAGE:S,StoreConfig_MainSellerId:w,TEXTURE_IMAGE:P,Z_INDEX_WAR:I,ICONS:n}},fe.node.sku)}),t.length>0&&s.jsx(B_,{gap:Y,isMobile:e??!1})]}),s.jsx(Fs,{open:O,sku:z,skus:B,setSku:D,setVisible:M,ICONS:n,NEWSLETTER_CONFIGS:i,NOTIFY_INFO:c,PRODUCT_CARD_TEXTS:g,Z_INDEX_WAR:I})]})};U_.displayName="PDC.Products";const tr={Empty:Mc,Filters:m_,Grid:g_,InfiniteScroller:D_,Spinner:Lc,Navigation:F_,Notification:Fs,Pagination:Yc,Products:U_},H_=({className:e})=>{const{constants:t}=ut(),{state:r,searchParams:n}=ft(),{sendDataLayerEvent:o}=Ee(),i=j.useCallback(_=>{o({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:_.products}}})},[o]),{ITEMS_DEFAULT_SORT:c,ITEMS_PER_SECTION:l,ITEMS_PER_PAGE:u,PLP_INFINITE_SCROLL:d,SEARCH_PAGE_ITEM_THRESHOLD:h,VARIANT_PAGINATION:m}=t;return s.jsx("div",{className:p.helpers.classNameConcat(St.pdc,e),children:d===!0?s.jsx("div",{className:St["pdc--grid"],children:s.jsx(tr.Grid,{infinite:!0})}):s.jsxs(s.Fragment,{children:[s.jsxs(h_,{state:r,children:[s.jsx(tr.Navigation,{}),s.jsx(tr.Filters,{})]}),s.jsxs(Wc,{callback:i,state:r,queryKey:["products",String(r==null?void 0:r.page),r.sort,JSON.stringify(Object.entries(r.facets??{}).sort())],options:{gcTime:1e3*60*30,staleTime:1e3*60*5,refetchOnWindowFocus:!1},children:[s.jsx("div",{className:St["pdc--grid"],children:s.jsx("div",{className:St["pdc--grid--content"],children:s.jsx(tr.Grid,{})})}),s.jsx(tr.Pagination,{searchParams:n,ITEMS_DEFAULT_SORT:c,ITEMS_PER_SECTION:l,ITEMS_PER_PAGE:u,SEARCH_PAGE_ITEM_THRESHOLD:h,VARIANT_PAGINATION:m})]})]})})};H_.displayName="Templates.PDC";const $_=j.createContext({}),iw=({children:e,...t})=>s.jsx($_.Provider,{value:t,children:e}),ti=()=>{const e=j.useContext($_);if(e===void 0)throw new Error("useSearchConstants must be used within a SearchConstantsProvider");return e},aw="_grid_e75z7_21",cw="_navigation_e75z7_44",lw="_spinner_e75z7_70",uw="_sort_e75z7_76",qr={"rearch-result--empty":"_rearch-result--empty_e75z7_1",grid:aw,"grid-header":"_grid-header_e75z7_37",navigation:cw,"result-disclaimer":"_result-disclaimer_e75z7_51",spinner:lw,sort:uw,"search-result":"_search-result_e75z7_91"},W_=({term:e})=>{const{router:t}=Ae(),{SEARCH_RESULT:r,ICONS:n}=ti(),o=()=>{t.push(r.EMPTY.ALL_TERMS)};return s.jsxs("div",{className:qr["rearch-result--empty"],children:[s.jsxs(p.TextStructure.DivWrapper,{children:[s.jsx("div",{className:U.responsive["responsive-desktop-flex"],children:s.jsx("h2",{className:"typography-style-heading-sm",children:r.EMPTY.NOT_FOUND})}),s.jsx("div",{className:U.responsive["responsive-mobile-flex"],children:s.jsx("h2",{className:"typography-style-body-md",children:r.EMPTY.NOT_FOUND})}),s.jsxs("p",{children:[r.EMPTY.NOT_FOUND_P," ",`"${e}"`]})]}),s.jsx(p.Button,{onClick:()=>o(),variant:"tertiary",size:"medium",adornment:{end:s.jsx(p.Icon,{name:n.arrow_right,size:"medium"})},children:r.EMPTY.ALL_TERMS_LABEL})]})};W_.displayName="RearchResult.Empty";const dw=e=>s.jsxs(s.Fragment,{children:[s.jsx("div",{className:U.responsive["responsive-desktop-flex"],children:s.jsx("h2",{className:"typography-style-heading-sm",children:e.SEARCH.SEARCHING})}),s.jsx("div",{className:U.responsive["responsive-mobile-flex"],children:s.jsx("h2",{className:"typography-style-body-md",children:e.SEARCH.SEARCHING})}),s.jsx(p.Spinner,{className:qr.spinner})]}),fw=(e,t,r)=>s.jsxs(s.Fragment,{children:[s.jsx("div",{className:U.responsive["responsive-desktop-flex"],children:s.jsx("h2",{className:"typography-style-heading-sm",children:t.SEARCH.SEARCHED})}),s.jsx("div",{className:U.responsive["responsive-mobile-flex"],children:s.jsx("h2",{className:"typography-style-body-md",children:t.SEARCH.SEARCHED})}),s.jsxs("p",{children:[t.SEARCH.SEARCHED_P_START," ",e," ",t.SEARCH.SEARCHED_P_END," ",`"${r}"`]})]}),V_=({isLoading:e,quantity:t,term:r})=>{const{SEARCH_RESULT:n}=ti();return s.jsx(p.TextStructure.DivWrapper,{children:e?dw(n):fw(t,n,r)})};V_.displayName="Search.Loading";const pw=({term:e})=>{const[t,r]=j.useState(!1),{router:n}=Ae(),{searchParams:o}=ft(),{ITEMS_DEFAULT_SORT:i,ITEMS_PER_PAGE:c,ICONS:l}=ti(),u=d=>{U.navigateToSearchPage(n,e,c,1,d??i)};return s.jsx("div",{className:qr.sort,children:s.jsx(Xo,{handleSelectValue:d=>u(d??"release_desc"),sortListOpen:t,setSortListOpen:r,searchParams:o,ICONS:l})})},hw=({query:e})=>{const{isLoading:t,products:r,pagination:n}=qs();return s.jsxs("div",{className:qr["grid-header"],children:[s.jsxs("div",{className:qr.navigation,children:[!t&&(r!=null&&r.length)?s.jsx(pw,{term:e}):null,s.jsx(p.Utils.Divider,{})]}),!t&&(r!=null&&r.length)?s.jsx("div",{className:qr["result-disclaimer"],children:s.jsx(V_,{term:e,isLoading:t,quantity:n.count})}):null]})},G_=({isMobile:e=!1,items:t,BUY_BUTTON_LABELS:r,ICONS:n,MAIN_IMAGE:o,NEWSLETTER_CONFIGS:i,NOTIFY_INFO:c,PLP_GRID_SCROLL_BACK:l,PLP_INFINITE_SCROLL:u,PLP_PRODUCT_SIMILAR_DELAY:d,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:h,PLP_SIZE_ORDER:m,PRODUCT_CARD_IMAGE_ASPECT_RATIO:_,PRODUCT_CARD_TEXTS:g,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:v,PRODUCT_IMAGE_DIMENSIONS:x,SECOND_IMAGE:S,StoreConfig_MainSellerId:w,TEXTURE_IMAGE:P,Z_INDEX_WAR:I})=>{const{getAvailableProductTag:C}=jr(),{state:N}=ft(),[T,O]=j.useState(!1),[M,z]=j.useState(null),[D,B]=j.useState([]),G=j.useCallback((Z,he)=>{const fe=he?Ds([he]):null;B(Z),z(fe!=null&&fe.length?fe[0]:null),O(!0)},[]),J=e?8:16,Y=(N.page-1)*((N==null?void 0:N.count)??1),X=Dt.helpers.createGridPosAndVideo(t,[],e?2:4,N.page);return s.jsxs(s.Fragment,{children:[s.jsx(Dt.Root,{children:Array.isArray(t)&&t.map((Z,he)=>{var ee,ie;const fe=C(Z.node.cluster.highlights);return s.jsx(Dt.Card,{gap:J,isMobile:e??!1,item:Z.node,order:Y+(((ee=X[he])==null?void 0:ee.position)??0),tag:fe,index:he,setSkuSelected:G,showVideo:(ie=X[he])==null?void 0:ie.canPlayVideo,CONSTANTS:{BUY_BUTTON_LABELS:r,MAIN_IMAGE:o,PLP_GRID_SCROLL_BACK:l,PLP_INFINITE_SCROLL:u,PLP_PRODUCT_SIMILAR_DELAY:d,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:h,PLP_SIZE_ORDER:m,PRODUCT_CARD_IMAGE_ASPECT_RATIO:_,PRODUCT_CARD_TEXTS:g,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:v,PRODUCT_IMAGE_DIMENSIONS:x,SECOND_IMAGE:S,StoreConfig_MainSellerId:w,TEXTURE_IMAGE:P,Z_INDEX_WAR:I,ICONS:n}},Z.node.sku)})}),s.jsx(Fs,{open:T,sku:M,skus:D,setSku:z,setVisible:O,ICONS:n,NEWSLETTER_CONFIGS:i,NOTIFY_INFO:c,PRODUCT_CARD_TEXTS:g,Z_INDEX_WAR:I})]})};G_.displayName="PDC.Products";const K_=({isMobile:e=!1,query:t})=>{const{isLoading:r,products:n,pagination:o}=qs(),{searchParams:i}=ft(),c=ti(),l=j.useMemo(()=>!r&&n.length>0&&o.count>0,[r,n.length,o.count]);return s.jsxs("div",{className:qr.grid,children:[l&&s.jsx(hw,{query:t}),!r&&(n!=null&&n.length)?s.jsx(G_,{...c,isMobile:e??!1,items:n}):null,(n==null?void 0:n.length)===0&&!r?s.jsx(W_,{term:t}):null,l&&s.jsx(Yc,{searchParams:i,...c})]})};K_.displayName="SearchResultContent";const mw=({className:e})=>{const{state:t}=ft(),{sendDataLayerEvent:r}=Ee(),{isMobile:n}=xe(),o=j.useCallback(i=>{var c;r({functionKey:"readyEvents",data:{event:"view_search_results",readyData:{search_term:t==null?void 0:t.query,search_found:((c=i==null?void 0:i.products)==null?void 0:c.length)>0}}})},[r,t==null?void 0:t.query]);return s.jsx(Wc,{callback:i=>o(i),forceUpdate:!1,queryKey:["search",t.query,t.term??"",String(t.page),t.sort],options:{gcTime:1e3*60*30,staleTime:1e3*60*5,refetchOnWindowFocus:!1},state:t,children:s.jsx("div",{className:p.helpers.classNameConcat(qr["search-result"],e),children:s.jsx(K_,{currentPage:t.page,isMobile:n??!1,query:t.term??""})})})},_w=new Df,Q_=({className:e,searchParams:t,CONSTANTS:r})=>{const n=new URLSearchParams(t??""),o=String((n==null?void 0:n.get("query"))??""),i=Number((n==null?void 0:n.get("count"))??0),c=Number((n==null?void 0:n.get("page"))??0),l=String((n==null?void 0:n.get("sort"))??"");return s.jsx(zf,{client:_w,children:s.jsx(iw,{...r,children:s.jsx(xc,{state:{sort:l,query:o,base:"",facets:[],term:o,page:c,count:i},searchParams:n,children:s.jsx(mw,{className:e})})})})};Q_.displayName="Search";const gw=({page:e,data:t})=>{const{pathname:r}=Ae(),n=j.useRef(null),{sendDataLayerEvent:o,currentLocalRef:i,itemListRef:c,promotionEventRef:l}=Ee();return j.useEffect(()=>{const u=Qf("login_event")||"{}",d=JSON.parse(u);if(d.name||d.method){const h=new Date(0);o({functionKey:"readyEvents",data:{event:d.name,readyData:{method:d.method}}}),Cc("login_event","",{expires:h})}},[]),j.useEffect(()=>{if(n.current===r)return;n.current=r;let u={};switch(e){case"PDP":{const h=t,m={};if(!h){u={page_category:"pdp"};break}h.items.forEach(({itemId:_,sellers:g})=>m[_]=g[0].commertialOffer.AvailableQuantity),u={page_category:"pdp",seller_ids:h.items.map(({sellers:_})=>_[0].sellerId).join(),skuStocks:m,product_reference_id:h.productReference};break}case"PDC":{const{page_category:h,page_departament:m,id:_,name:g}=Gd(),v=g,x=_;u={page_category:"lista_produtos",...m&&{page_departament:m}},c.current={item_list_name:r==="/search"?"busca":v??void 0,item_list_id:r==="/search"?void 0:x??void 0},m&&o({functionKey:"readyEvents",data:{event:"view_category",readyData:{page_category:h,page_departament:m}}});break}default:u={page_category:e},l.current={},c.current={};break}const d={region:e,...u};i.current=e,o({functionKey:"readyEvents",data:{readyData:{vtex_version:"fast",...d}},timeout:0})},[r]),null};var Ka={exports:{}},Io={exports:{}},md;function yw(){return md||(md=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(u,d){for(var h in d)Object.defineProperty(u,h,{enumerable:!0,get:d[h]})}r(t,{DOMAttributeNames:function(){return n},default:function(){return l},isEqualNode:function(){return i}});const n={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function o(u){let{type:d,props:h}=u;const m=document.createElement(d);for(const v in h){if(!h.hasOwnProperty(v)||v==="children"||v==="dangerouslySetInnerHTML"||h[v]===void 0)continue;const x=n[v]||v.toLowerCase();d==="script"&&(x==="async"||x==="defer"||x==="noModule")?m[x]=!!h[v]:m.setAttribute(x,h[v])}const{children:_,dangerouslySetInnerHTML:g}=h;return g?m.innerHTML=g.__html||"":_&&(m.textContent=typeof _=="string"?_:Array.isArray(_)?_.join(""):""),m}function i(u,d){if(u instanceof HTMLElement&&d instanceof HTMLElement){const h=d.getAttribute("nonce");if(h&&!u.getAttribute("nonce")){const m=d.cloneNode(!0);return m.setAttribute("nonce",""),m.nonce=h,h===u.nonce&&u.isEqualNode(m)}}return u.isEqualNode(d)}let c;process.env.__NEXT_STRICT_NEXT_HEAD?c=(u,d)=>{const h=document.querySelector("head");if(!h)return;const m=h.querySelectorAll('meta[name="next-head"]')||[],_=[];if(u==="meta"){const x=h.querySelector("meta[charset]");x&&_.push(x)}for(let x=0;x<m.length;x++){var g;const w=m[x].nextSibling;(w==null||(g=w.tagName)==null?void 0:g.toLowerCase())===u&&_.push(w)}const v=d.map(o).filter(x=>{for(let S=0,w=_.length;S<w;S++){const P=_[S];if(i(P,x))return _.splice(S,1),!1}return!0});_.forEach(x=>{var S;const w=x.previousSibling;if(w&&w.getAttribute("name")==="next-head"){var P;(P=x.parentNode)==null||P.removeChild(w)}(S=x.parentNode)==null||S.removeChild(x)}),v.forEach(x=>{var S;const w=document.createElement("meta");w.name="next-head",w.content="1",((S=x.tagName)==null?void 0:S.toLowerCase())==="meta"&&x.getAttribute("charset")||h.appendChild(w),h.appendChild(x)})}:c=(u,d)=>{const h=document.getElementsByTagName("head")[0],m=h.querySelector("meta[name=next-head-count]");if(process.env.NODE_ENV!=="production"&&!m){console.error("Warning: next-head-count is missing. https://nextjs.org/docs/messages/next-head-count-missing");return}const _=Number(m.content),g=[];for(let S=0,w=m.previousElementSibling;S<_;S++,w=(w==null?void 0:w.previousElementSibling)||null){var v;(w==null||(v=w.tagName)==null?void 0:v.toLowerCase())===u&&g.push(w)}const x=d.map(o).filter(S=>{for(let w=0,P=g.length;w<P;w++){const I=g[w];if(i(I,S))return g.splice(w,1),!1}return!0});g.forEach(S=>{var w;return(w=S.parentNode)==null?void 0:w.removeChild(S)}),x.forEach(S=>h.insertBefore(S,m)),m.content=(_-g.length+x.length).toString()};function l(){return{mountedInstances:new Set,updateHead:u=>{const d={};u.forEach(_=>{if(_.type==="link"&&_.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+_.props["data-href"]+'"]'))return;_.props.href=_.props["data-href"],_.props["data-href"]=void 0}const g=d[_.type]||[];g.push(_),d[_.type]=g});const h=d.title?d.title[0]:null;let m="";if(h){const{children:_}=h.props;m=typeof _=="string"?_:Array.isArray(_)?_.join(""):""}m!==document.title&&(document.title=m),["meta","base","link","style","script"].forEach(_=>{c(_,d[_]||[])})}}}(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)}(Io,Io.exports)),Io.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function r(T,O){for(var M in O)Object.defineProperty(T,M,{enumerable:!0,get:O[M]})}r(t,{default:function(){return N},handleClientScriptLoad:function(){return S},initScriptLoader:function(){return I}});const n=Ct,o=hn,i=s,c=n._(lc),l=o._(j),u=Hm(),d=yw(),h=Up(),m=new Map,_=new Set,g=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],v=T=>{if(c.default.preinit){T.forEach(O=>{c.default.preinit(O,{as:"style"})});return}if(typeof window<"u"){let O=document.head;T.forEach(M=>{let z=document.createElement("link");z.type="text/css",z.rel="stylesheet",z.href=M,O.appendChild(z)})}},x=T=>{const{src:O,id:M,onLoad:z=()=>{},onReady:D=null,dangerouslySetInnerHTML:B,children:G="",strategy:J="afterInteractive",onError:Y,stylesheets:X}=T,Z=M||O;if(Z&&_.has(Z))return;if(m.has(O)){_.add(Z),m.get(O).then(z,Y);return}const he=()=>{D&&D(),_.add(Z)},fe=document.createElement("script"),ee=new Promise((ie,_e)=>{fe.addEventListener("load",function(Ce){ie(),z&&z.call(this,Ce),he()}),fe.addEventListener("error",function(Ce){_e(Ce)})}).catch(function(ie){Y&&Y(ie)});B?(fe.innerHTML=B.__html||"",he()):G?(fe.textContent=typeof G=="string"?G:Array.isArray(G)?G.join(""):"",he()):O&&(fe.src=O,m.set(O,ee));for(const[ie,_e]of Object.entries(T)){if(_e===void 0||g.includes(ie))continue;const Ce=d.DOMAttributeNames[ie]||ie.toLowerCase();fe.setAttribute(Ce,_e)}J==="worker"&&fe.setAttribute("type","text/partytown"),fe.setAttribute("data-nscript",J),X&&v(X),document.body.appendChild(fe)};function S(T){const{strategy:O="afterInteractive"}=T;O==="lazyOnload"?window.addEventListener("load",()=>{(0,h.requestIdleCallback)(()=>x(T))}):x(T)}function w(T){document.readyState==="complete"?(0,h.requestIdleCallback)(()=>x(T)):window.addEventListener("load",()=>{(0,h.requestIdleCallback)(()=>x(T))})}function P(){[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(O=>{const M=O.id||O.getAttribute("src");_.add(M)})}function I(T){T.forEach(S),P()}function C(T){const{id:O,src:M="",onLoad:z=()=>{},onReady:D=null,strategy:B="afterInteractive",onError:G,stylesheets:J,...Y}=T,{updateScripts:X,scripts:Z,getIsSsr:he,appDir:fe,nonce:ee}=(0,l.useContext)(u.HeadManagerContext),ie=(0,l.useRef)(!1);(0,l.useEffect)(()=>{const Ce=O||M;ie.current||(D&&Ce&&_.has(Ce)&&D(),ie.current=!0)},[D,O,M]);const _e=(0,l.useRef)(!1);if((0,l.useEffect)(()=>{_e.current||(B==="afterInteractive"?x(T):B==="lazyOnload"&&w(T),_e.current=!0)},[T,B]),(B==="beforeInteractive"||B==="worker")&&(X?(Z[B]=(Z[B]||[]).concat([{id:O,src:M,onLoad:z,onReady:D,onError:G,...Y}]),X(Z)):he&&he()?_.add(O||M):he&&!he()&&x(T)),fe){if(J&&J.forEach(Ce=>{c.default.preinit(Ce,{as:"style"})}),B==="beforeInteractive")return M?(c.default.preload(M,Y.integrity?{as:"script",integrity:Y.integrity,nonce:ee,crossOrigin:Y.crossOrigin}:{as:"script",nonce:ee,crossOrigin:Y.crossOrigin}),(0,i.jsx)("script",{nonce:ee,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([M,{...Y,id:O}])+")"}})):(Y.dangerouslySetInnerHTML&&(Y.children=Y.dangerouslySetInnerHTML.__html,delete Y.dangerouslySetInnerHTML),(0,i.jsx)("script",{nonce:ee,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...Y,id:O}])+")"}}));B==="afterInteractive"&&M&&c.default.preload(M,Y.integrity?{as:"script",integrity:Y.integrity,nonce:ee,crossOrigin:Y.crossOrigin}:{as:"script",nonce:ee,crossOrigin:Y.crossOrigin})}return null}Object.defineProperty(C,"__nextScript",{value:!0});const N=C;(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)})(Ka,Ka.exports);var vw=Ka.exports,xw=vw;const Xc=U.getDefaultExportFromCjs(xw),bw=({children:e,ONE_TRUST:t})=>s.jsxs(s.Fragment,{children:[s.jsx(Xc,{src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",defer:!0,strategy:"afterInteractive","data-domain-script":t.siteId,type:"text/javascript"}),e]}),jw=zh(()=>Promise.resolve(bw),{ssr:!1}),Sw="_lgpd_vffd3_82",Cw="_success_vffd3_248",ww="_error_vffd3_312",Ye={"newsletter-root":"_newsletter-root_vffd3_1","has-border-top":"_has-border-top_vffd3_9","has-border-bottom":"_has-border-bottom_vffd3_12","newsletter-container":"_newsletter-container_vffd3_20","content-text":"_content-text_vffd3_35","form-wrapper":"_form-wrapper_vffd3_39","newsletter-container-banner":"_newsletter-container-banner_vffd3_64",lgpd:Sw,"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:Cw,"text-structure-modifier":"_text-structure-modifier_vffd3_257","success-title":"_success-title_vffd3_297","close-button":"_close-button_vffd3_302",error:ww,"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"},Y_=({invalid_message:e,master_data_field:t,placeholder:r,required:n=!1,CONSTANTS:o})=>{const{isMobile:i}=xe(),{inputsStatus:c,setInputsStatus:l,setFormStatus:u,variant:d}=Ic();return s.jsx(p.TextField.Structure,{className:`${Ye["textfield-structure-modifier"]} ${d}`,input:s.jsx(p.TextField.Input,{mode:"simple",label:r,sizeVariant:i?o.NEWSLETTER_CONFIGS.interactionSizeMob:o.NEWSLETTER_CONFIGS.interactionSizeDesk,name:t,className:`${Ye["input-wrapper-modifier"]} ${d}`,feedback:c[t]==="required"?"error":c[t],onChange:()=>{c[t]!=="none"&&(l(h=>({...h,[t]:"none"})),u("idle"))},required:n}),supportText:c[t]==="error"||c[t]==="required"?s.jsx("div",{className:d==="horizontal"?Ye["support-text-modifier"]:"",children:s.jsx(p.TextField.SupportText,{text:c[t]==="error"?e??o.NEWSLETTER_CONFIGS.messages.invalid_generic:o.NEWSLETTER_CONFIGS.messages.required_field,feedback:"error"})}):null})};Y_.displayName="Newsletter.Input";const X_=({formStatus:e,fields:t,CONSTANTS:r})=>s.jsxs(s.Fragment,{children:[Array.isArray(t)&&t.map((n,o)=>s.jsx(Y_,{invalid_message:n.invalid_message,master_data_field:n.master_data_field,placeholder:n.placeholder,required:n.required,type:n.type,CONSTANTS:r},`nt-field-${n.master_data_field}-${o}`)),e==="error"&&s.jsx("div",{className:Ye.error,children:s.jsx("p",{children:r.NEWSLETTER_CONFIGS.form.status.error})})]});X_.displayName="Newsletter.FormFields";const J_=({formStatus:e,CONSTANTS:t,...r})=>{const{isMobile:n}=xe();return s.jsxs(p.Button,{...r,className:Ye["submit-btn"],disabled:e==="success",size:n?"medium":"large",children:[s.jsx("span",{"data-loading":e==="loading","data-label":!0,children:t.NEWSLETTER_CONFIGS.submitLabel}),t.NEWSLETTER_CONFIGS.hasLoadingState&&e==="loading"&&s.jsx(p.Spinner,{className:Ye["loading-spinner"],size:"small"})]})};J_.displayName="Newsletter.SubmitButton";const Z_=({checkboxRef:e,formStatus:t,setFormStatus:r,CONSTANTS:n})=>{const o=i=>{i.target.checked?(e.current=!0,t==="unchecked"&&r("idle")):e.current=!1};return s.jsxs(s.Fragment,{children:[s.jsx(p.Checkbox,{adornment:s.jsx(p.Icon,{name:n.ICONS.check,size:"x-small"}),defaultChecked:e.current,disabled:t==="success",name:"terms-and-conditions",label:n.NEWSLETTER_CONFIGS.messages.accept_terms_and_conditions,onChange:o,sizeVariant:"small",className:Ye["terms-and-conditions-checkbox"]}),t==="unchecked"&&s.jsx("div",{className:Ye["terms-and-conditions-unchecked"],children:s.jsx(p.TextStructure.Root,{adornment:{start:s.jsx(p.Icon,{name:n.ICONS.alert_circle,size:"small"})},children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("p",{children:n.NEWSLETTER_CONFIGS.messages.terms_and_conditions_not_accepted})})})})]})};Z_.displayName="Newsletter.Terms";const eg=({title:e,description:t,CONSTANTS:r})=>s.jsx("div",{className:Ye.success,children:s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{className:Ye["text-structure-modifier"],children:[s.jsxs("div",{className:Ye["success-title"],children:[s.jsx(p.Icon,{name:r.ICONS.check_circle,size:"medium"}),s.jsx("h3",{children:e})]}),s.jsx("p",{children:t})]})})});eg.displayName="Newsletter.Success";const tg=({formPayloadOptionals:e,masterDataEntity:t,banner:r,termsDescription:n,lgpdLinkLable:o,lgpdLink:i,variant:c,CONSTANTS:l})=>{const{checkboxRef:u,fields:d,formStatus:h,hasTermsAndConditions:m,handleClickToSubmit:_,handleSubmit:g,setFormStatus:v}=Ic();return s.jsx(s.Fragment,{children:h==="success"?s.jsx(eg,{description:l.NEWSLETTER_CONFIGS.messages.success_description,title:l.NEWSLETTER_CONFIGS.messages.success_title,CONSTANTS:l}):s.jsxs(s.Fragment,{children:[s.jsxs("form",{className:Ye["form-wrapper"],onSubmit:x=>g(x,e,t),children:[s.jsx(X_,{formStatus:h,fields:d,CONSTANTS:l}),m&&s.jsx(Z_,{checkboxRef:u,formStatus:h,setFormStatus:v,CONSTANTS:l}),s.jsx(J_,{formStatus:h,type:"submit",variant:"primary",onClick:_,CONSTANTS:l})]}),(r||c==="vertical")&&s.jsxs("div",{className:Ye.lgpd,children:[n&&s.jsx("p",{children:n}),o&&s.jsx(wt,{href:i,children:o})]})]})})};tg.displayName="Newsletter.Form";const Ew=["horizontal","vertical"],Jc=({className:e,description:t,formPayloadOptionals:r,fields:n,masterDataEntity:o,masterDataEmailField:i,masterDataNameField:c,banner:l,altBanner:u,bannerBackground:d,termsDescription:h,lgpdLinkLable:m,lgpdLink:_,title:g,variant:v,borderTop:x,borderBottom:S,CONSTANTS:w,actionName:P="cadastrou-newsletter",originName:I="",...C})=>{if(!i||!c)return null;const N=p.helpers.ValidateProp({fieldTypes:Ew,property:v,fallback:"horizontal"});return s.jsxs("div",{className:l?d?Ye["banner-background"]:Ye["newsletter-wrapper"]:"",children:[l&&s.jsx(p.Banner.Container,{className:Ye["banner-container"],children:s.jsx(p.Banner.ImageWrapper,{children:s.jsx(at.Image,{src:l,alt:u,width:"1920",height:"500"})})}),s.jsx("div",{className:l?Ye["newsletter-provider-wrapper"+(d?"-background":"")]:"",children:s.jsx(gp,{dito:{actionName:P,originName:I},fields:n,masterDataEmailField:i,masterDataNameField:c,variant:N,CONSTANTS:w,children:s.jsx("div",{...C,className:p.helpers.classNameConcat(Ye["newsletter-root"+(l||N==="vertical"?"-banner":"")],[x&&Ye["has-border-top"],S&&Ye["has-border-bottom"],e].filter(Boolean)),"data-variant":N,children:s.jsxs("div",{className:l||N==="vertical"?Ye["newsletter-container-banner"]:Ye["newsletter-container"],children:[s.jsxs("div",{className:Ye["content-text"],children:[s.jsx("h2",{children:g}),s.jsx("p",{children:t}),!l&&N==="horizontal"&&s.jsxs("div",{className:Ye.lgpd,children:[s.jsx("p",{children:h}),m&&s.jsx(wt,{target:"_blank",href:_,children:m})]})]}),s.jsx(tg,{formPayloadOptionals:r,masterDataEntity:o,CONSTANTS:w,banner:l,lgpdLink:_,lgpdLinkLable:m,termsDescription:h,variant:N})]})})})})]})};Jc.displayName="Newsletter";const rg=({children:e,...t})=>s.jsx("div",{...t,children:e});rg.displayName="CallToAction";const Iw="_wrapper_aejhu_1",Pw="_body_aejhu_8",Bo={wrapper:Iw,body:Pw,"wrapper-body":"_wrapper-body_aejhu_16","accordion-modifier":"_accordion-modifier_aejhu_32"},Nw=({children:e,className:t,...r})=>s.jsx("div",{...r,className:p.helpers.classNameConcat(Bo.wrapper,t),children:e}),Rw=({data:e,ICONS:t})=>{const[r,n]=j.useState(null),o=c=>{n(l=>l===c?null:c)},{router:i}=Ae();return s.jsx("div",{className:p.helpers.classNameConcat(Bo.body),children:Array.isArray(e)&&(e==null?void 0:e.map((c,l)=>{var m;const u=r===c.id,d=c.buttonHref&&c.buttonHref!=="#",h=c.buttonHref&&c.type==="button"&&d?{onClick:()=>{var _;if((_=c.buttonHref)!=null&&_.startsWith("/")){i.push(c.buttonHref);return}window.open(c.buttonHref,"_blank")}}:{};return s.jsx("div",{children:c.type==="button"?s.jsxs(s.Fragment,{children:[s.jsx(p.Button,{variant:"tertiary",mode:c.buttonMode??"default",size:c.buttonSize??"medium",iconNameStart:t[c.buttonIcon]??c.buttonIcon,...h,style:{marginTop:16},children:c.buttonLabel}),s.jsx(p.Utils.Divider,{direction:"horizontal",size:"small",style:{height:16}})]}):s.jsxs(p.Accordion.Wrapper,{className:p.helpers.classNameConcat(Bo["accordion-modifier"]),children:[s.jsx(p.Accordion.Header,{id:`${l}-${c.title}`,closeIndicator:u?s.jsx(p.Icon,{name:t.arrow_up,size:"medium"}):void 0,openIndicator:u?void 0:s.jsx(p.Icon,{name:t.arrow_down,size:"medium"}),title:"accordion-header",onClick:()=>o(c.id),children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h2",{className:"typography-style-body-sm",children:c.title})})})}),s.jsx(p.Accordion.Body,{title:"accordion-body",children:s.jsx(p.TextStructure.Root,{children:u&&s.jsxs(p.TextStructure.DivWrapper,{children:[c.subtitle?s.jsx("h3",{className:"typography-style-body-md",children:c.subtitle}):s.jsx(s.Fragment,{}),s.jsx("p",{className:"typography-style-caption",children:c.description}),c.buttonLabel&&c.buttonHref?s.jsx(wt,{href:c.buttonHref??"#",mode:c.buttonMode??"default",size:c.buttonSize??"medium",adornments:(m=c.buttonIcon)!=null&&m.length?{end:s.jsx(p.Icon,{name:t[c.buttonIcon]??c.buttonIcon})}:void 0,children:c.buttonLabel}):s.jsx(s.Fragment,{})]})})})]})},c.id)}))})},Tw=({className:e,data:t,ICONS:r,...n})=>{const[o,i]=j.useState(!1),[c,l]=j.useState(null);j.useEffect(()=>{!o&&!c&&t&&l(t)},[o,c]);const u=j.useCallback(()=>{i(d=>!d)},[]);return c?s.jsxs(Nw,{...n,className:e,children:[s.jsx("div",{className:Bo["wrapper-body"],hidden:!o,children:o&&s.jsx(Rw,{data:c.content,ICONS:r})}),s.jsx(rg,{children:s.jsx("div",{onClick:u,children:o?s.jsx(p.Button,{iconNameEnd:r.close,size:(c==null?void 0:c.helpButtonSize)??"x-large"}):s.jsx(p.Button,{iconNameStart:(c==null?void 0:c.iconLabel)??r.help,size:(c==null?void 0:c.helpButtonSize)??"x-large",children:c==null?void 0:c.label})})})]}):s.jsx(s.Fragment,{})},Ow="_formContainer_zwlly_1",Aw="_formFieldGroup_zwlly_6",kw="_formFieldGroupName_zwlly_10",Mw="_formFieldWrapper_zwlly_20",Lw="_formFieldInput_zwlly_30",Dw="_success_zwlly_73",Fw="_button_zwlly_110",zw="_error_zwlly_114",hr={formContainer:Ow,formFieldGroup:Aw,formFieldGroupName:kw,formFieldWrapper:Mw,formFieldInput:Lw,success:Dw,"text-structure-modifier":"_text-structure-modifier_zwlly_85",button:Fw,error:zw},qw=({group:e,children:t,className:r})=>s.jsx(s.Fragment,{children:s.jsxs("div",{className:p.helpers.classNameConcat(hr.formFieldGroup,r),children:[s.jsx("h1",{className:hr.formFieldGroupName,children:e.groupLabel}),t]},e.groupLabel)}),ng=j.createContext({});function sg({children:e,groups:t,masterDataEntity:r,postFn:n,actionName:o="",originName:i="",POPUP_SUBMITTED_STORAGE:c}){const[l,u]=j.useState(!1),[d,h]=j.useState({}),[m,_]=j.useState([]),[g,v]=j.useState("idle"),[x,S]=j.useState(""),w=({target:{name:I,value:C}})=>{h({...d,[I]:C})},P=I=>{I.preventDefault(),n({body:{masterDataEntity:r,payload:d}}).then(async({Message:C})=>{if(C){const T=C.match(/'(.*?[^\\])'/g)||[];var N="-";for(const O of T){const M=O.substring(1,O.length-1),D=t.flatMap(B=>B.fields).find(({name:B})=>B===M);S(M),D&&(N=D.name)}return v("error"),_([N])}if(d.email){const T=await hp(d.email||""),O=new Date().toISOString();mp([{user_id:T,timestamp:O,type:"IDENTIFY",traits:{id:T,created_at:O,name:d.name,email:d.email,phone:d==null?void 0:d.phone}},{action:o,timestamp:O,type:"TRACK",user_id:T,context:{user_agent:navigator.userAgent},properties:{custom_data:{email:d.email,nome:d.name,origem:i,...d}}}])}return window.localStorage.setItem(c,"true"),h({}),u(!0),v("success"),_([])})};return s.jsx(ng.Provider,{value:{formErrors:m,handleInputChange:w,submitForm:P,formData:d,status:g,fieldMessage:x,success:l,setSuccess:u},children:e})}function ri(){return j.useContext(ng)}const Bw=({fields:e,className:t})=>{const{formData:r,handleInputChange:n,formErrors:o}=ri();return s.jsx("div",{className:p.helpers.classNameConcat(hr.formFieldWrapper,t),children:e.map(({label:i,name:c,required:l,width:u="medium"})=>s.jsx(p.TextField.Input,{label:`${i}${l?"*":""}`,title:c,value:r[c]||"",name:c,sizeVariant:"large",onChange:n,required:l,feedback:o.includes(c)?"error":"none",className:hr.formFieldInput,"data-inputsize":u},c))})},Uw=({FORM_CONFIGS:e,ICONS:t})=>{const{router:r}=Ae();return s.jsxs("div",{className:hr.success,children:[s.jsx(p.TextStructure.Root,{adornment:{start:s.jsx(p.Icon,{name:t.check_circle,size:"medium"})},children:s.jsx(p.TextStructure.DivWrapper,{className:hr["text-structure-modifier"],children:s.jsx("p",{children:e.successMessage})})}),s.jsx(p.Button,{size:"large",onClick:()=>r.push("/"),className:hr.button,children:e.returnButton})]})},Hw=({FORM_CONFIGS:e,ICONS:t})=>{const{fieldMessage:r}=ri();return s.jsx("div",{className:hr.error,children:s.jsx(p.TextStructure.Root,{adornment:{start:s.jsx(p.Icon,{name:t.delete_circle,size:"small"})},children:s.jsx(p.TextStructure.DivWrapper,{className:hr["text-structure-modifier"],children:s.jsxs("p",{children:[e.errorMessage,r]})})})})},$w=({children:e,className:t,ICONS:r,FORM_CONFIGS:n})=>{const{submitForm:o,status:i}=ri();return s.jsx("form",{onSubmit:o,className:p.helpers.classNameConcat(hr.formContainer,t),children:i==="success"?s.jsx(Uw,{ICONS:r,FORM_CONFIGS:n}):s.jsxs(s.Fragment,{children:[e,i==="error"&&s.jsx(Hw,{ICONS:r,FORM_CONFIGS:n})]})})},Ww=e=>{const{children:t,className:r}=e;return s.jsx(sg,{...e,children:s.jsx($w,{ICONS:e.ICONS,FORM_CONFIGS:e.FORM_CONFIGS,className:r,children:t})})},zn={Root:Ww,FieldGroup:qw,FieldWrapper:Bw},Vw="_button_1e35m_39",Qr={"banner-container":"_banner-container_1e35m_1","banner-background":"_banner-background_1e35m_6","form-root":"_form-root_1e35m_15",button:Vw,"form-fied-wrapper":"_form-fied-wrapper_1e35m_52"};function Gw({content:e,sections:t,FORM_CONFIGS:r,ICONS:n,postFn:o,POPUP_SUBMITTED_STORAGE:i}){var u;const{isMobile:c}=xe(),l=((u=t.find(({name:d})=>d==="Form"))==null?void 0:u.data)||{};return s.jsx("div",{children:s.jsxs(p.Banner.Container,{className:Qr["banner-container"],children:[s.jsx(p.Banner.ImageWrapper,{children:s.jsx(at.Image,{className:Qr["banner-background"],src:c?e.bannerMobile:e.bannerDesk,alt:e.altBanner,width:"1920",height:"500"})}),s.jsxs(zn.Root,{postFn:o,ICONS:n,FORM_CONFIGS:r,groups:l.groups||[],masterDataEntity:l.masterDataEntity||"",className:Qr["form-root"],POPUP_SUBMITTED_STORAGE:i,children:[l.groups.map(d=>s.jsx(zn.FieldGroup,{group:d,children:s.jsx(zn.FieldWrapper,{fields:d.fields,className:Qr["form-fied-wrapper"]})},d.groupLabel)),s.jsxs("div",{children:[s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("p",{className:"typography-style-body-xs",children:e.requiredMessage})}),s.jsx("div",{className:Qr["button-wrapper"],children:s.jsx("div",{className:Qr["button-frame"],children:s.jsx(p.Button,{size:"large",type:"submit",className:Qr.button,children:e.buttonLabel})})})]})]})]})})}const Kw="_content_1jj9i_36",Qw="_trends_1jj9i_47",Yw="_modal_1jj9i_1",Ft={"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:Kw,trends:Qw,"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:Yw,"search-modal__modal":"_search-modal__modal_1jj9i_100"},og=j.createContext({}),Xw=({children:e,term:t})=>{const[r,n]=j.useState([]),[o,i]=j.useState(!1);return j.useEffect(()=>{if(!t){n([]);return}(async()=>{i(!0);try{const l=await U.fetchProxy("/_v/proxy/search/suggestedTerms",{method:"POST",body:JSON.stringify({query:t,locale:"pt-BR"})}),{data:u}=await l.json();n((u==null?void 0:u.searches)||[])}catch(l){console.error("Erro ao buscar sugestões:",l)}})()},[t]),s.jsx(og.Provider,{value:j.useMemo(()=>({suggestedTerms:r,loading:o,setLoading:i}),[r,o]),children:e})},Jw=({children:e,...t})=>s.jsx(Xw,{...t,children:e}),Zw=()=>{const e=j.useContext(og);if(!e)throw new Error("useSuggestedTermsContext must be used within a SuggestedTermsProvider");return e},ha=(e,t,r=24,n=1,o="release:desc")=>{const i=`/search?query=${t??""}&count=${r}&page=${n}${o?`&sort=${o.replace("_",":")}`:""}`;e.push(i)},ig=({placeholder:e,noResultsTitle:t,noResultsLabel:r,noResultsTermText:n,handleClose:o,setTerm:i,ICONS:c,ITEMS_DEFAULT_SORT:l,ITEMS_PER_PAGE:u,SEARCH_MODAL:d})=>{const[h,m]=j.useState(""),{suggestedTerms:_,loading:g,setLoading:v}=Zw(),{router:x}=Ae(),S=j.useRef(null),w=C=>{m(C.target.value),clearTimeout(S.current),C.target.value.length>2&&(i(C.target.value),S.current=setTimeout(()=>{i(C.target.value),v(!1)},2e3))},P=C=>{C.key==="Enter"&&(h==null?void 0:h.length)>2&&(o(),ha(x,h,u,1,l))},I=C=>{o(),ha(x,C,u,1,l)};return j.useEffect(()=>{if(clearTimeout(S.current),h.length<=2||_.length>0){v(!1);return}return v(!0),S.current=setTimeout(()=>{ha(x,h,u,1,l),v(!1),o()},2e3),()=>{clearTimeout(S.current)}},[h,_]),s.jsx(p.DropDown.AutoComplete,{className:Ft["modal-auto-complete"],onKeyDown:P,onInputChange:w,placeholder:e,stopClickPropagation:!1,adornment:{end:g?s.jsx(p.Spinner,{size:"small"}):s.jsx(p.Button,{variant:"tertiary",size:"small",iconNameStart:c.search,onClick:()=>{I(h)},disabled:!(h.length>2)})},children:(_==null?void 0:_.length)>0&&s.jsx(s.Fragment,{children:(_==null?void 0:_.length)>0&&(h==null?void 0:h.length)>2?s.jsx(p.DropDown.AutoCompleteList,{className:Ft["modal-auto-complete__dropdown"],seeAll:s.jsx("span",{onClick:()=>I(h),children:n+h}),children:_.map((C,N)=>s.jsx(p.DropDown.ListItemWithLink,{children:s.jsx(wt,{href:`/search?query=${C.term}&count=${u}&page=1`,size:"x-small",title:C.term,disableUnderline:!0,disablePadding:!1,onClick:T=>{T.preventDefault(),o()},children:C.term})},`key-${C.term}-${N}`))}):!g&&(h==null?void 0:h.length)>3&&(_==null?void 0:_.length)===0&&s.jsxs(p.DropDown.AutoCompleteList,{className:Ft["modal-search-empty"],children:[s.jsx(p.DropDown.NotResults,{description:r,title:t}),s.jsx(p.Button,{className:"all-terms",onClick:()=>{o(),x.push(d.EMPTY.ALL_TERMS)},variant:"tertiary",size:"medium",title:d.EMPTY.ALL_TERMS_LABEL,adornment:{end:s.jsx(p.Icon,{name:c.arrow_right,size:"medium"})},children:d.EMPTY.ALL_TERMS_LABEL})]})})})};ig.displayName="SearchModal.AutoComplete";function eE({title:e,ICONS:t}){const{isMobile:r}=xe();return s.jsx(p.Modal.Header,{navigation:"top",className:Ft["modal-header"],children:s.jsxs(p.Modal.Controls,{navigation:"top",isMobile:!!r,children:[s.jsx(p.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),s.jsx(p.Modal.Title,{navigation:"top",className:Ft["search-modal__title"],title:e}),s.jsx(p.Button,{className:Ft["modal-header__close-button"],"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})})}const ag=j.createContext({searches:[],isLoading:!1,error:null});let ma=null;const tE=({children:e})=>{const[t,r]=j.useState([]),[n,o]=j.useState(!0),[i,c]=j.useState(null);return j.useEffect(()=>{(async()=>{try{if(o(!0),ma){r(ma),o(!1);return}const u=await U.fetchProxy("/_v/proxy/search/topSearch");if(!u.ok)throw new Error(`Erro ao buscar os dados: ${u.status}`);const h=(await u.json()).data.searches||[];ma=h,r(h)}catch(u){c(u instanceof Error?u.message:"Erro desconhecido")}finally{o(!1)}})()},[]),s.jsx(ag.Provider,{value:j.useMemo(()=>({searches:t,isLoading:n,error:i}),[t,n,i]),children:e})},rE=()=>{const e=j.useContext(ag);if(!e)throw new Error("useTopSearches must be used within a TopSearchesProvider");return e},nE=({title:e,allTermsLabel:t,allTermsUrl:r,qtyTrends:n,handleClose:o,ICONS:i,ITEMS_PER_PAGE:c})=>{const{searches:l,isLoading:u}=rE(),{router:d}=Ae(),h=Array.isArray(l)?l:[];return s.jsx(s.Fragment,{children:!u&&h.length>0?s.jsx(p.ComponentList.Structure,{className:Ft.trends,title:e,children:s.jsxs("div",{className:Ft["trends-content"],children:[s.jsx(p.ComponentList.List,{columns:1,children:h.slice(0,n).map((m,_)=>s.jsx(p.ComponentList.ListItem,{className:Ft["trends-item"],children:s.jsx(wt,{href:`/search?query=${m.term}&count=${c}&page=1`,size:"x-small",adornments:{end:s.jsx(p.Icon,{name:i.arrow_right,size:"x-small"})},disableUnderline:!0,title:m.term,onClick:()=>o(),children:m.term})},`list-item-${_}`))}),s.jsx(p.Button,{className:"all-terms",variant:"tertiary",size:"x-small",underline:!1,onClick:()=>{o(),d.push(r)},adornment:{end:s.jsx(p.Icon,{name:i.arrow_right,size:"x-small"})},children:t})]})}):null})};function sE({SectionZone:e}){var n;const[t,r]=j.useState(null);return j.useEffect(()=>{(async()=>{try{const i=await fetch("/api/cms/content-type-client",{method:"POST",body:JSON.stringify({contentType:"search"})});if(!i.ok)return;const c=await i.json();r(c)}catch(i){console.error("[CMS FETCH ERROR]",i)}})()},[]),s.jsx("div",{className:Ft.content,children:t!==null&&s.jsx(e,{data:((n=t[0])==null?void 0:n.sections)??[],componentConfigs:{"Product Carousel":{searchModal:!0}}})})}const cg=({className:e,trends:t,CONSTANTS:r,SectionZone:n})=>{const[o,i]=j.useState(""),{isMobile:c}=xe(),l=df(),{setValue:u}=Ho(),{SEARCH_MODAL:d,ICONS:h,ITEMS_PER_PAGE:m,ITEMS_DEFAULT_SORT:_}=r;return s.jsxs(p.Modal.Root,{isMobile:c??!1,variant:c?"sideBottom":"sideRight",isOpen:l,setIsOpen:u,className:`${Ft.modal} ${Ft["search-modal__modal"]} ${e??""}`,children:[s.jsx(eE,{title:d.HEADER.TITLE,ICONS:h}),s.jsxs(p.Modal.Body,{className:Ft["modal-content-body"],children:[s.jsx(Jw,{term:o,children:s.jsx(ig,{placeholder:d.AUTOCOMPLETE.PLACEHOLDER,noResultsTitle:d.EMPTY.NOT_FOUND,noResultsLabel:d.EMPTY.NOT_FOUND_P,noResultsTermUrl:d.AUTOCOMPLETE.NO_RESULTS.NO_RESULTS_TERM_URL,noResultsTermText:d.AUTOCOMPLETE.NO_RESULTS.NO_RESULTS_TERM_TEXT,handleClose:()=>u(!1),setTerm:i,ICONS:h,ITEMS_DEFAULT_SORT:_,ITEMS_PER_PAGE:m,SEARCH_MODAL:d})}),t?s.jsx(tE,{children:s.jsx(nE,{title:d.TRENDS.TITLE,allTermsUrl:d.TRENDS.ALL_TERMS_URL,allTermsLabel:d.TRENDS.ALL_TERMS_LABEL,qtyTrends:d.TRENDS.QTY_TERMS,handleClose:()=>u(!1),ICONS:h,ITEMS_PER_PAGE:m})}):null,s.jsx(sE,{SectionZone:n})]})]})};cg.displayName="SearchModal";const Vt={"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"},lg=({LPLOJAS_TEMPLATE_RETURN_BUTTON:e,ICONS:t,showVendor:r})=>{const{selectedCity:n,selectedStore:o}=Wo();return s.jsx(p.Card,{padding:"small",shadow:!0,className:Vt["store--wrapper"],children:o?s.jsxs(s.Fragment,{children:[s.jsx(pr.ReturnButton,{ICONS:t,children:e}),s.jsx(pr.Details,{ICONS:t,showVendor:r,store:n==null?void 0:n.find(i=>i.nome===o)})]}):s.jsx(pr.Select,{ICONS:t})})};lg.displayName="LPStores.Content";const ys=({title:e,text:t,type:r,...n})=>s.jsx(p.TextStructure.DivWrapper,{...n,children:r==="title"?s.jsx("h4",{className:Vt["store--details--title"],children:e}):s.jsxs(s.Fragment,{children:[s.jsx("h5",{className:Vt["store--details--subtitle"],children:e}),s.jsx("p",{className:Vt["store--details--text"],children:t})]})});ys.displayName="LPStores.Details";const ug=({vendor:e,ICONS:t})=>{const r=e?e.split(","):[];return s.jsxs(p.Accordion.Wrapper,{style:{width:"100%"},children:[s.jsx(p.Accordion.Header,{id:"accordion-header-vendor",closeIndicator:s.jsx(p.Icon,{name:t.arrow_up,size:"small"}),openIndicator:s.jsx(p.Icon,{name:t.arrow_down,size:"small"}),title:"Código de vendedor (A)",children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{gap:0,children:s.jsx("h3",{className:"typography-style-body-md",children:"Código de vendedor (A)"})})})}),s.jsx(p.Accordion.Body,{children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:Vt["store--details--vendor"],children:r.map((n,o)=>s.jsx("p",{className:"typography-style-body-sm",children:n.trim()},o))})})})]})};ug.displayName="LPStores.Details";const dg=({store:e,showVendor:t,ICONS:r})=>s.jsxs("div",{className:Vt["store--details"],children:[s.jsx(ys,{alignItems:"left",title:String(e==null?void 0:e.nome),type:"title"}),s.jsx(ys,{title:"Endereço",text:String(e.endereco)}),e.telefone&&s.jsx(ys,{title:"Telefone",text:String(e.telefone)}),e.horario&&s.jsx(ys,{title:"Horário de funcionamento",text:String(e.horario)}),t&&s.jsx(ug,{ICONS:r,vendor:String(e.vendedoras)})]});dg.displayName="LPStores.Details";const fg=({ICONS:e,arrowDownIcon:t=s.jsx(p.Icon,{name:e.arrow_down,size:"small"}),arrowUpIcon:r=s.jsx(p.Icon,{name:e.arrow_up,size:"small"}),list:n,selectText:o,...i})=>s.jsx(p.DropDown.DefaultDropDown,{...i,"aria-placeholder":o,adornmentListClosed:{end:t},adornmentListOpened:{end:r},mode:"simple",placeholder:o,sizeVariant:"large",children:s.jsx(p.DropDown.DefaultDropDownList,{placeholder:o,supportText:o,maxHeight:400,children:Array.isArray(n)&&(n==null?void 0:n.map(c=>s.jsx(p.DropDown.ListItem,{value:c,children:c},c.replace(/\s/g,""))))})});fg.displayName="LPStores.DropDown";const pg=({children:e,ICONS:t})=>{const{clearSelectedStore:r}=Wo(),n=()=>{typeof r=="function"&&r()};return s.jsxs("button",{"aria-label":String(e),className:Vt["store--return-button"],onClick:n,onKeyDown:n,children:[s.jsx(p.Icon,{name:t.arrow_left,size:"small"}),e]})};pg.displayName="LPStores.ReturnButton";const hg=({children:e,data:t})=>s.jsx(vp,{data:t,children:e});hg.displayName="LPStores.Root";const mg=({children:e,imgAlt:t,imgSrcDesk:r,imgSrcMob:n})=>{const{isMobile:o}=xe();return s.jsxs("section",{className:Vt["store--section"],children:[s.jsx(Es,{src:o?n:r,alt:t,fill:!0,className:Vt["store--section--img"]}),e]})};mg.displayName="LPStores.Section";const _g=({ICONS:e})=>{const{data:t,handleSelectCity:r,selectedCity:n,handleSelectStore:o}=Wo(),i=new Set(t.map(l=>l.cidade)),c=Array.from(i).filter(l=>typeof l=="string");return s.jsxs("div",{className:Vt["store--select"],children:[s.jsx(pr.DropDown,{selectText:"Selecione a cidade",handleSelectedValue:r,list:c,defaultValue:n==null?void 0:n[0].cidade,ICONS:e}),s.jsx(pr.DropDown,{"data-selected-city":!!n,selectText:"Selecione a loja",handleSelectedValue:o,list:n?n==null?void 0:n.map(l=>String(l.nome)):[],ICONS:e},n==null?void 0:n[0].cidade)]})};_g.displayName="LPStores.Select";const gg=({children:e})=>s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:Vt["store--page-title"],children:s.jsx("h2",{className:Vt["store--page-title--title"],children:e})})});gg.displayName="LPStores.Title";const pr={Content:lg,Details:dg,DropDown:fg,ReturnButton:pg,Root:hg,Section:mg,Select:_g,Title:gg};var yg={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 oE(e,t,r){const n=t.window,o=Object.assign({},t);if(delete o.window,n){n.dataLayer=n.dataLayer||[],n.dataLayer.push({event:e,ecommerce:o});return}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:e,ecommerce:o})}function iE(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 vg=[["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 aE(e,t,r){iE({id:e,custom_data:t},"#00c851",r)}var cE={DataLayer:oE,Dito:aE};async function lE(e,t){const r=yg[e];r&&await Promise.allSettled(r.destinations.map(async n=>{try{await cE[n](e.toLowerCase(),t,n)}catch(o){console.error(`[DT] Failed to send ${e} to ${n}:`,o)}}))}async function uE(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 dE(e){try{const{pathname:t}=new URL(e,window.location.origin);return/\/p\/?$/.test(t)}catch{return!1}}function xg(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 fE(e){const t=xg(e);if(!t)return console.error("Não foi possível extrair o RefId da URL"),null;try{const r=await fetch(`/api/catalog_system/pub/products/search?fq=alternateIds_RefId:${t}`);if(!r.ok)throw new Error(`Erro na API: ${r.status}`);const n=await r.json();return(n==null?void 0:n[0])||null}catch(r){return console.error("Erro ao buscar dados do produto:",r),null}}function bg(e,t){var r,n,o,i;const c=(n=(r=e==null?void 0:e.shippingData)==null?void 0:r.logisticsInfo)==null?void 0:n.find(u=>u.itemId===t.id),l=(o=c==null?void 0:c.slas)==null?void 0:o.find(u=>u.id===c.selectedSla);return(i=l==null?void 0:l.pickupStoreInfo)!=null&&i.friendlyName?`retirada em loja: ${l.pickupStoreInfo.friendlyName}`:l!=null&&l.name?`Receba em casa: ${l.name}`:null}async function jg(e){var t,r;const n=await uE(e.productId||e.productID||e.item_group_id);return n.length&&(r=(t=n[0].items.find(o=>o.name===e.skuName))==null?void 0:t.itemId)!=null?r:null}function ni(e){return e.discount||e.discount===0?e.discount:parseFloat(Math.max(e.listPrice-e.sellingPrice,0).toFixed(2))/100||0}function gn(e){const t=[()=>{var r;return((r=e==null?void 0:e.productCategories)==null?void 0:r[39])==="BAZAR"?"Sale":"Coleção"},()=>e.item_category||e.category,()=>e.categories[0]];for(const r of t){const n=r();if(n!=null)return n}return null}function Hs(e){const t=[()=>Object.values((e==null?void 0:e.productCategories)||{}).pop(),()=>Object.values((e==null?void 0:e.categories)||{}).pop(),()=>{var r,n,o,i,c;return(c=(i=(o=(n=(r=e==null?void 0:e.category)==null?void 0:r.split)==null?void 0:n.call(r,">"))==null?void 0:o[1])==null?void 0:i.trim)==null?void 0:c.call(i)},()=>e.item_category2];for(const r of t){const n=r();if(n!=null)return n}return null}function Sg(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 pE={farm:"farmrio","farm etc":"farmetc","farm rio":"farmrio"};function _d(e){if(!e)return null;const t=e.toLowerCase().trim();return pE[t]||null}function mr(e){var t;let r=[];if(Array.isArray(e)&&e.every(i=>typeof i=="string"))r=e;else if(Array.isArray(e))r=e.map(i=>{var c;return((c=i.additionalInfo)==null?void 0:c.brandName)||i.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"?_d(e):null;const n=r.map(_d).filter(i=>i!==null),o=[...new Set(n)].sort();return o.length>0?o.join("_"):null}function hE(e){var t;if(!e.orderForm&&!((t=e.orderForm.items)!=null&&t.length))return null;const r=e.orderForm.items;return mr(r)}function mE(e){var t;const{item:r}=e;return mr(((t=r==null?void 0:r.additionalInfo)==null?void 0:t.brandName)||r.brand||r.item_brand)}function _E(e,t){if(e!=null&&e.brand)return mr(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 hE(e);case"ADD_TO_CART":case"REMOVE_FROM_CART":return mE(e);default:return null}}async function gE(e){var t;const r=((t=e.orderForm)==null?void 0:t.items)||[];return r.length?await Promise.all(r.map(async n=>{var o,i,c;return{item_id:n.productId,item_category2:Hs(n),item_category4:Sg(n),item_shipping_tier:bg(e.orderForm,n),price:parseFloat((n.price/100).toFixed(2))||0,quantity:n.quantity||1,item_ref:n.refId||null,item_brand:mr((o=n.additionalInfo)==null?void 0:o.brandName)||((i=n.additionalInfo)==null?void 0:i.brandName)||null,item_sku:await jg(n)||n.id||null,item_name:n.name||n.id||null,item_category:gn(n)||null,item_variant:n.skuName.split(/[-/]/)[0].trim(),item_variant2:((c=n.skuName.split(/[-/]/).pop())==null?void 0:c.trim())||"",discount:ni(n)}})):[]}async function yE(e,t){var r,n,o;const{item:i,orderForm:c}=e;return[{index:0,quantity:1,item_id:i.productId||i.item_group_id||i.sku||null,item_category2:Hs(i),item_category4:Sg(i),item_shipping_tier:t==="REMOVE_FROM_CART"?bg(c,i):null,price:i.listPrice||parseFloat((i.price/100).toFixed(2))||0,item_ref:i.refId||i.item_ref||(i==null?void 0:i.additionalProperty.find(l=>l.name==="RefId").value)||null,item_brand:((r=i.additionalInfo)==null?void 0:r.brandName)||i.item_brand||i.brand.name||null,item_sku:i.sku||i.id||i.item_id||await jg(i)||null,item_name:i.name||i.item_name||null,item_category:gn(i)||null,item_variant:(i.skuName||i.item_variant||i.name).split(/[-/]/)[0].trim()||null,item_variant2:i.size||((n=i==null?void 0:i.itemAttributes)==null?void 0:n.size)||((o=(i.skuName||i.name).split(/[-/]/).pop())==null?void 0:o.trim())||null,discount:ni(i),item_list_name:gn(i)||null,item_url:i.item_url||null}]}async function vE(e){return((e==null?void 0:e.list)||[]).map(t=>{var r,n,o,i,c;return{price:((r=t==null?void 0:t.price)==null?void 0:r.list)||(t==null?void 0:t.price)||((n=t==null?void 0:t.offers)==null?void 0:n.lowPrice)||0,quantity:1,item_ref:(t==null?void 0:t.ref)||(t==null?void 0:t.item_ref)||(t==null?void 0:t.referenceId[0].Value)||(t==null?void 0:t.additionalProperty.find(l=>l.name==="RefId").value)||null,index:typeof(e==null?void 0:e.index)=="number"?e.index:null,item_brand:mr((o=t==null?void 0:t.brand)==null?void 0:o.name)||mr(e.brand)||mr(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)||((i=t==null?void 0:t.seo)==null?void 0:i.title)||null,item_category:gn(t)||null,item_variant:((c=t==null?void 0:t.name)==null?void 0:c.split("-")[0].trim())||(t==null?void 0:t.item_variant)||null,item_category2:Hs(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:ni(t)||null,item_list_name:(e==null?void 0:e.itemListName)||gn(t)||null}})}async function xE(e){var t,r,n;const{item:o}=e;return[{price:e.value||0,quantity:1,item_ref:o.ref||o.additionalProperty.find(i=>i.name==="RefId").value||null,item_brand:mr(o.brand.name)||mr(e.brand)||null,item_name:o.productName||o.alternateName||null,item_category:gn(o)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-")[0].trim())||null,item_category2:Hs(o)||((n=(r=o==null?void 0:o.category)==null?void 0:r.split(">")[1])==null?void 0:n.trim())||null,item_id:(o==null?void 0:o.productID)||(o==null?void 0:o.productId)||o.item_group_id||null,discount:ni(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 bE(e){var t;if(!dE(e==null?void 0:e.bannerUrl))return[];const n=await fE(e==null?void 0:e.bannerUrl),o=n==null?void 0:n.items[0];return{price:(o==null?void 0:o.sellers[0].commertialOffer.Price)||0,quantity:1,item_ref:xg(e==null?void 0:e.bannerUrl),item_brand:mr(n.brand)||null,item_name:(n==null?void 0:n.productName)||(n==null?void 0:n.alternateName)||(n==null?void 0:n.item_name)||null,item_category:gn(n)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-").pop().trim())||null,item_category2:Hs(n)||null,item_id:(n==null?void 0:n.productId)||null,discount:(o==null?void 0:o.sellers[0].commertialOffer.ListPrice)-(o==null?void 0:o.sellers[0].commertialOffer.Price)||null}}function jE(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 gE(e);case"ADD_TO_CART":case"ADD_TO_WISHLIST":case"REMOVE_FROM_CART":return yE(e,t);case"SELECT_ITEM":case"VIEW_ITEM_LIST":return vE(e);case"VIEW_ITEM":return xE(e);case"VIEW_PROMOTION":case"SELECT_PROMOTION":return bE(e);default:return null}}function SE(e){var t,r,n;if(!e.orderForm)return null;const o=((t=e.orderForm.paymentData)==null?void 0:t.payments)||[],i=((r=e.orderForm.paymentData)==null?void 0:r.paymentSystems)||[];if(!o.length||!i.length)return null;const c=o.find(m=>m==null?void 0:m.paymentSystem)||o[0],l=String((c==null?void 0:c.paymentSystem)||"").trim();if(!l)return null;const u=i.find(m=>String(m.id)===l),d=((n=u==null?void 0:u.name)==null?void 0:n.toLowerCase())||"",h=vg.find(([m])=>d.includes(m));return h?h[1]:null}function CE(e){var t,r,n,o;if(!e.orderForm)return null;const i=((t=e.orderForm.paymentData)==null?void 0:t.transactions)||[];if(!i.length)return null;const c=((r=i[0])==null?void 0:r.payments)||[];if(!c.length)return null;const l=((o=(n=c[0])==null?void 0:n.paymentSystemName)==null?void 0:o.toLowerCase())||"",u=vg.find(([d])=>l.includes(d));return u?u[1]:null}function wE(e,t){if(e!=null&&e.paymentType)return e.paymentType;switch(t){case"ORDER_REVIEWED":case"CUSTOM_ADD_PAYMENT_INFO":return SE(e);case"PURCHASE":case"CUSTOM_PURCHASE":return CE(e);default:return null}}var EE={brand:_E,items:jE,payment_type:wE,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 i=`${o}/_v/user-info`,c=await fetch(i,{method:"POST",body:JSON.stringify({email:e.userEmail})});return c.status!==200?{customer:{email:e.userEmail,id:e==null?void 0:e.userId},address:null}:await c.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,n,o,i;return e!=null&&e.currency?e.currency:e!=null&&e.bannerUrl?"BRL":e!=null&&e.item?((n=(r=e.item)==null?void 0:r.offers)==null?void 0:n.priceCurrency)||"BRL":((i=(o=e.orderForm)==null?void 0:o.storePreferencesData)==null?void 0:i.currencyCode)||null},value:(e,t)=>{var r;return e!=null&&e.value?e.value:e.item?e.item.price:((r=e.orderForm)==null?void 0:r.value)!=null?e.orderForm.value/100:null},total_discount:(e,t)=>{var r,n;const i=(((r=e.orderForm)==null?void 0:r.totalizers)||((n=e.orderForm)==null?void 0:n.totals)||[]).find(c=>c.id==="Discounts");return i?Math.abs(i.value)/100:0},subtotal:(e,t)=>{var r,n;return(((r=e.orderForm)==null?void 0:r.totalizers)||((n=e.orderForm)==null?void 0:n.totals)||[]).filter(c=>c.id==="Items").reduce((c,l)=>c+(l.value||0),0)/100||0},coupon_message:(e,t)=>{var r;if(e.couponMessage)return e.couponMessage;const n=((r=e.orderForm)==null?void 0:r.messages)||[];if(n.length===0)return null;const o=n.filter(i=>i.text.toLowerCase().includes("cupom"));return o.length===0?null:o.map(i=>i.text).join(" | ")},seller_cod_name:(e,t)=>e.appliedSellerCodName||(e==null?void 0:e.orderForm.marketingData.utmiCampaign)||null,coupon:(e,t)=>{var r,n;return e.appliedCoupon||((n=(r=e==null?void 0:e.orderForm)==null?void 0:r.marketingData)==null?void 0:n.coupon)||null},pre_filled:(e,t)=>!!e.preFilled,search_term:(e,t)=>e.searchTerm||null,search_found:(e,t)=>!!e.searchFound,search_quantity:(e,t)=>e.searchQuantity||0,promotion_name:(e,t)=>e.promotionName||null,creative_name:(e,t)=>e.creativeName||null,creative_slot:(e,t)=>e.creativeSlot||null,zipcode:(e,t)=>e.zipCode||null,size:(e,t)=>e.size||null,item_ref:(e,t)=>e.itemRef||null,flag_pickup:(e,t)=>{var r;const n=e.orderForm;return n?(((r=n.shippingData)==null?void 0:r.logisticsInfo)||[]).some(c=>{var l;return(l=c.slas)==null?void 0:l.some(u=>u.deliveryChannel==="pickup-in-point")}):null},shippings:(e,t)=>{const r=e.orderForm;if(!r)return null;const n={};for(const i of r.shippingData.logisticsInfo){const c=r.items[i.itemIndex];if(c)for(const l of i.slas){const u=l.name;n[u]||(n[u]={shipping_tier:l.name,delivery_time:parseInt(l.shippingEstimate),shipping:parseFloat((l.price/100).toFixed(1)),line_items:[]}),n[u].line_items.push(c.id)}}return Object.values(n).map(i=>({shipping:i.shipping,shipping_tier:i.shipping_tier,delivery_time:i.delivery_time,line_items:i.line_items.join(",")}))||null},shipping:(e,t)=>{var r,n,o;return((o=(n=(r=e==null?void 0:e.orderForm)==null?void 0:r.shippingData)==null?void 0:n.logisticsInfo)!=null?o:[]).reduce((c,l)=>{var u,d;const h=(u=l.slas)==null?void 0:u.find(m=>m.id===l.selectedSla);return c+((d=h==null?void 0:h.price)!=null?d:0)},0)},shipping_tier:(e,t)=>{var r,n,o,i;const l=((o=(n=(r=e==null?void 0:e.orderForm)==null?void 0:r.shippingData)==null?void 0:n.logisticsInfo)!=null?o:[]).find(_=>_.selectedSla);if(!l)return null;const u=(i=l.slas)==null?void 0:i.find(_=>_.id===l.selectedSla);if(!u)return null;const{deliveryChannel:d,name:h,pickupStoreInfo:m}=u;return d==="pickup-in-point"?`retirada em loja${m!=null&&m.friendlyName?`: ${m.friendlyName}`:""}`:d==="delivery"?`receba em casa${h?`: ${h}`:""}`:null},transaction_id:(e,t)=>{var r,n;return((n=(r=e.orderForm)==null?void 0:r.orderGroup)==null?void 0:n.toString())||null},available_grid:(e,t)=>e.availableGrid||null};async function IE(e={},t){const r=yg[t];return r?Object.fromEntries(await Promise.all(r.requiredParams.map(async o=>{const i=EE[o];return typeof i!="function"?(console.error(`[DT] Missing paramGetter for param: ${o}`),[o,null]):[o,await i(e,t)]}))):void 0}async function PE(e,t={}){try{const r=await IE(t,e);return await lE(e,Object.assign({},r,{window:t.window}))}catch(r){return console.error(`[DT] Error tracking event ${e}:`,r)}}var Qa={exports:{}},Cg={};(function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(c,l){for(var u in l)Object.defineProperty(c,u,{enumerable:!0,get:l[u]})}t(e,{PathParamsContext:function(){return i},PathnameContext:function(){return o},SearchParamsContext:function(){return n}});const r=j,n=(0,r.createContext)(null),o=(0,r.createContext)(null),i=(0,r.createContext)(null);process.env.NODE_ENV!=="production"&&(n.displayName="SearchParamsContext",o.displayName="PathnameContext",i.displayName="PathParamsContext")})(Cg);var Ya={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return r}});function r(n){return Array.isArray(n)?n[1]:n}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(Ya,Ya.exports);var NE=Ya.exports,Xa={exports:{}},Ja={exports:{}},Za={exports:{}},ec={exports:{}},tc={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return i}});const r=new Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class n{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}}const o=globalThis.AsyncLocalStorage;function i(){return o?new o:new n}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(tc,tc.exports);var Zc=tc.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return n}});const n=(0,Zc.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)})(ec,ec.exports);var RE=ec.exports;(function(e,t){"TURBOPACK { transition: next-shared }";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,{getExpectedRequestStore:function(){return o},requestAsyncStorage:function(){return n.requestAsyncStorage}});const n=RE;function o(i){const c=n.requestAsyncStorage.getStore();if(c)return c;throw new Error("`"+i+"` 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)})(Za,Za.exports);var TE=Za.exports,rc={exports:{}},nc={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return n}});const n=(0,Zc.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)})(nc,nc.exports);var OE=nc.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=OE;(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)})(rc,rc.exports);var AE=rc.exports,sc={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return r}});var r;(function(n){n[n.SeeOther=303]="SeeOther",n[n.TemporaryRedirect=307]="TemporaryRedirect",n[n.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)})(sc,sc.exports);var kE=sc.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(x,S){for(var w in S)Object.defineProperty(x,w,{enumerable:!0,get:S[w]})}r(t,{RedirectType:function(){return l},getRedirectError:function(){return u},getRedirectStatusCodeFromError:function(){return v},getRedirectTypeFromError:function(){return g},getURLFromRedirectError:function(){return _},isRedirectError:function(){return m},permanentRedirect:function(){return h},redirect:function(){return d}});const n=TE,o=AE,i=kE,c="NEXT_REDIRECT";var l;(function(x){x.push="push",x.replace="replace"})(l||(l={}));function u(x,S,w){w===void 0&&(w=i.RedirectStatusCode.TemporaryRedirect);const P=new Error(c);P.digest=c+";"+S+";"+x+";"+w+";";const I=n.requestAsyncStorage.getStore();return I&&(P.mutableCookies=I.mutableCookies),P}function d(x,S){S===void 0&&(S="replace");const w=o.actionAsyncStorage.getStore();throw u(x,S,w!=null&&w.isAction?i.RedirectStatusCode.SeeOther:i.RedirectStatusCode.TemporaryRedirect)}function h(x,S){S===void 0&&(S="replace");const w=o.actionAsyncStorage.getStore();throw u(x,S,w!=null&&w.isAction?i.RedirectStatusCode.SeeOther:i.RedirectStatusCode.PermanentRedirect)}function m(x){if(typeof x!="object"||x===null||!("digest"in x)||typeof x.digest!="string")return!1;const[S,w,P,I]=x.digest.split(";",4),C=Number(I);return S===c&&(w==="replace"||w==="push")&&typeof P=="string"&&!isNaN(C)&&C in i.RedirectStatusCode}function _(x){return m(x)?x.digest.split(";",3)[2]:null}function g(x){if(!m(x))throw new Error("Not a redirect error");return x.digest.split(";",2)[1]}function v(x){if(!m(x))throw new Error("Not a redirect error");return Number(x.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)})(Ja,Ja.exports);var ME=Ja.exports,oc={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,{isNotFoundError:function(){return i},notFound:function(){return o}});const n="NEXT_NOT_FOUND";function o(){const c=new Error(n);throw c.digest=n,c}function i(c){return typeof c!="object"||c===null||!("digest"in c)?!1:c.digest===n}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(oc,oc.exports);var LE=oc.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(l,u){for(var d in u)Object.defineProperty(l,d,{enumerable:!0,get:u[d]})}r(t,{ReadonlyURLSearchParams:function(){return c},RedirectType:function(){return n.RedirectType},notFound:function(){return o.notFound},permanentRedirect:function(){return n.permanentRedirect},redirect:function(){return n.redirect}});const n=ME,o=LE;class i extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class c extends URLSearchParams{append(){throw new i}delete(){throw new i}set(){throw new i}sort(){throw new 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)})(Xa,Xa.exports);var DE=Xa.exports,wg={};(function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(c,l){for(var u in l)Object.defineProperty(c,u,{enumerable:!0,get:l[u]})}t(e,{ServerInsertedHTMLContext:function(){return o},useServerInsertedHTML:function(){return i}});const n=hn._(j),o=n.default.createContext(null);function i(c){const l=(0,n.useContext)(o);l&&l(c)}})(wg);var Po={exports:{}},_a={},gd;function FE(){return gd||(gd=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,{BailoutToCSRError:function(){return n},isBailoutToCSRError:function(){return o}});const r="BAILOUT_TO_CLIENT_SIDE_RENDERING";class n extends Error{constructor(c){super("Bail out to client-side rendering: "+c),this.reason=c,this.digest=r}}function o(i){return typeof i!="object"||i===null||!("digest"in i)?!1:i.digest===r}}(_a)),_a}var No={exports:{}},Ro={exports:{}},yd;function zE(){return yd||(yd=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return n}});const n=(0,Zc.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)}(Ro,Ro.exports)),Ro.exports}var vd;function qE(){return vd||(vd=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=zE();(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)}(No,No.exports)),No.exports}var xd;function BE(){return xd||(xd=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"bailoutToClientRendering",{enumerable:!0,get:function(){return o}});const r=FE(),n=qE();function o(i){const c=n.staticGenerationAsyncStorage.getStore();if(!(c!=null&&c.forceStatic)&&c!=null&&c.isStaticGeneration)throw new r.BailoutToCSRError(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)}(Po,Po.exports)),Po.exports}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(w,P){for(var I in P)Object.defineProperty(w,I,{enumerable:!0,get:P[I]})}r(t,{ReadonlyURLSearchParams:function(){return u.ReadonlyURLSearchParams},RedirectType:function(){return u.RedirectType},ServerInsertedHTMLContext:function(){return d.ServerInsertedHTMLContext},notFound:function(){return u.notFound},permanentRedirect:function(){return u.permanentRedirect},redirect:function(){return u.redirect},useParams:function(){return g},usePathname:function(){return m},useRouter:function(){return _},useSearchParams:function(){return h},useSelectedLayoutSegment:function(){return S},useSelectedLayoutSegments:function(){return x},useServerInsertedHTML:function(){return d.useServerInsertedHTML}});const n=j,o=Tc,i=Cg,c=NE,l=Rc,u=DE,d=wg;function h(){const w=(0,n.useContext)(i.SearchParamsContext),P=(0,n.useMemo)(()=>w?new u.ReadonlyURLSearchParams(w):null,[w]);if(typeof window>"u"){const{bailoutToClientRendering:I}=BE();I("useSearchParams()")}return P}function m(){return(0,n.useContext)(i.PathnameContext)}function _(){const w=(0,n.useContext)(o.AppRouterContext);if(w===null)throw new Error("invariant expected app router to be mounted");return w}function g(){return(0,n.useContext)(i.PathParamsContext)}function v(w,P,I,C){I===void 0&&(I=!0),C===void 0&&(C=[]);let N;if(I)N=w[1][P];else{const z=w[1];var T;N=(T=z.children)!=null?T:Object.values(z)[0]}if(!N)return C;const O=N[0],M=(0,c.getSegmentValue)(O);return!M||M.startsWith(l.PAGE_SEGMENT_KEY)?C:(C.push(M),v(N,P,!1,C))}function x(w){w===void 0&&(w="children");const P=(0,n.useContext)(o.LayoutRouterContext);return P?v(P.tree,w):null}function S(w){w===void 0&&(w="children");const P=x(w);if(!P||P.length===0)return null;const I=w==="children"?P[0]:P[P.length-1];return I===l.DEFAULT_SEGMENT_KEY?null: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)})(Qa,Qa.exports);var UE=Qa.exports,bd=UE;function HE({accountName:e}){const{user:t}=rs(),r=bd.usePathname(),n=bd.useSearchParams(),o=(t==null?void 0:t.sub)||(t==null?void 0:t.email),i=t==null?void 0:t.userId;return j.useEffect(()=>{o&&i?PE("CUSTOM_USER_INFO",{userId:i,userEmail:o,platform:"store",account:e}):console.warn("[DT] Usuário deslogado ou sessão carregando...")},[r,n,o,i]),null}const $E="_active_gk7mu_380",WE="_banner_gk7mu_655",VE="_container_gk7mu_689",GE="_slugs_gk7mu_703",KE="_root_gk7mu_785",QE="_otContainer_gk7mu_797",Xr={active:$E,banner:WE,container:VE,slugs:GE,"content-page-modifier":"_content-page-modifier_gk7mu_741",root:KE,otContainer:QE};function YE({title:e,srcImages:t,children:r,className:n,...o}){const{isMobile:i}=xe(),c=i?t.mobile:t.desktop;return s.jsxs("div",{...o,className:p.helpers.classNameConcat(Xr.banner,n),children:[s.jsx(at.Image,{src:c,alt:e,fill:!0}),r||s.jsx("h1",{children:e})]})}const ic=({children:e,className:t})=>s.jsx("div",{className:p.helpers.classNameConcat(Xr.container,t),children:e});ic.displayName="Politicas.Container";const XE=({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 j.useEffect(()=>{window.OneTrust&&t()},[]),s.jsxs(s.Fragment,{children:[s.jsx(Xc,{onLoad:t,id:"otprivacy-notice-script",src:"https://privacyportal-cdn.onetrust.com/privacy-notice-scripts/otnotice-1.0.min.js"}),s.jsx("div",{className:Xr.otContainer,children:s.jsx("div",{id:"otnotice-container",children:s.jsx("div",{id:`otnotice-${e.policyId}`,className:"otnotice"})})})]})},jd={"card-image-wrapper":"_card-image-wrapper_10mul_1","card-image-container":"_card-image-container_10mul_9"},Eg=e=>{const{nextimage:t}=Ae();return s.jsx(Kt,{name:e.name,children:e.data.banners.map((r,n)=>s.jsx("div",{className:jd["card-image-wrapper"],children:s.jsx("div",{className:jd["card-image-container"],children:s.jsx(t,{src:r.image,alt:r.altImage?r.altImage:"Banner Coleção",width:500,height:600})})},n))})},JE="_embedLiveContainer_1ss0l_2",ZE="_embedLivePlayer_1ss0l_7",Sd={embedLiveContainer:JE,embedLivePlayer:ZE},Ig=({data:e,name:t})=>s.jsx(Kt,{name:t,children:s.jsx("div",{className:Sd.embedLiveContainer,children:s.jsx("div",{className:Sd.embedLivePlayer,children:e.banner.videosrc?s.jsx(at.Video,{src:e.banner.videosrc??"",playsInline:!0,autoPlay:!0,loop:!0,muted:!0,title:"Live",controls:!0}):s.jsxs("div",{children:[s.jsx("iframe",{src:e.banner.embed_source??"",allow:"autoplay; fullscreen; picture-in-picture; loop;",title:"Live"}),s.jsx(Xc,{src:"https://player.vimeo.com/api/player.js",defer:!0,strategy:"lazyOnload"})]})})})}),ac={"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 e0(e,t){const{mediatorRef:r}=xe();j.useEffect(()=>r.current.subscribe(e,t),[e,t])}const Cd=({prevOnClick:e,nextOnClick:t,onBulletClick:r,currentPage:n,totalPages:o,position:i,hideControllers:c,left:l,isFirst:u,ICONS:d})=>{const[h,m]=j.useState("default");return e0("herobanner:change_controllers_variant",_=>{u&&m(_.includes("white")?"inverse":"default")}),s.jsxs(p.Carousel.Controller,{className:ac["carousel-controllers-modifier"],position:i??"absolute","data-hide-controllers":c,bottom:"16px",top:"unset",left:l,children:[s.jsxs(p.Carousel.Arrows,{className:ac["carrousel-arrows-display-controller"],children:[s.jsx(p.Button,{variant:"tertiary",onClick:e,adornment:{start:s.jsx(p.Icon,{name:d.arrow_left})},mode:h}),s.jsx(p.Button,{variant:"tertiary",onClick:t,adornment:{start:s.jsx(p.Icon,{name:d.arrow_right})},mode:h})]}),s.jsx(p.Carousel.Bullets,{page:n,total:o,onBulletClick:r,mode:h})]})},t0=({children:e,data:t,banner:r,...n})=>{const{mediatorRef:o}=xe();return t.data.first?s.jsx(Ko,{observerOptions:{threshold:.51},stopOnIntersection:!1,callBackWhenVisible:()=>{o.current.publish("header:change_variant",r.headerVariant)},...n,children:e}):s.jsx(s.Fragment,{children:e})},Pg=e=>{const{initialize:t,pagination:r,controller:n,itemsStyles:o}=p.Carousel.useCarousel({gap:e.data.config.gap,itemsPerPage:e.data.config.slidesPerView,direction:"row"}),i=j.useRef(void 0),c=j.useMemo(()=>x_(e.data.config.controllerPosition??"dentro-inferior-centro"),[e]),l=j.useCallback(()=>{e.data.config.slideDuration&&r.totalPages>1&&(i.current=setInterval(()=>{n==null||n.nextPage()},e.data.config.slideDuration*1e3))},[n,e.data.config.slideDuration,r.totalPages]),u=j.useCallback(h=>{clearInterval(i.current),l(),h()},[l]),d=j.useMemo(()=>{var h;return{nextOnClick:()=>u(()=>n==null?void 0:n.nextPage()),prevOnClick:()=>u(()=>n==null?void 0:n.prevPage()),onBulletClick:m=>u(()=>n==null?void 0:n.navigateTo(m)),currentPage:r.currentPage,totalPages:r.totalPages,position:c.position,hideControllers:((h=e.data.config)==null?void 0:h.hideControllers)??!1,left:c.left}},[r.currentPage,r.totalPages,c.position,e.data.config.hideControllers,u,n]);return j.useEffect(()=>(l(),()=>clearInterval(i.current)),[l]),s.jsx(Kt,{name:e.name,children:s.jsxs(p.Carousel.Root,{innerRef:h=>{t(h)},className:p.helpers.classNameConcat(ac["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:[c.shouldRender==="top"&&r.totalPages>1?s.jsx(Cd,{ICONS:e.ICONS,...d,isFirst:e.data.first}):s.jsx(s.Fragment,{}),s.jsx(p.Carousel.Body,{children:e==null?void 0:e.data.banners.map((h,m)=>s.jsx(p.Carousel.Item,{style:o,children:s.jsx(t0,{data:e,banner:h,children:s.jsx(Us,{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:h,index:m,componentIndex:e.data.componentIndex},creative:"banner-carousel",...e.data.first&&m===0&&{priority:!0}})})},`hero-banner-item-${m}`))}),c.shouldRender==="bottom"&&r.totalPages>1?s.jsx(Cd,{ICONS:e.ICONS,...d}):s.jsx(s.Fragment,{})]})})},An={"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"},Ng=({data:e,name:t,CONSTANTS:r})=>{var h;const{isMobile:n}=xe(),o=e.config.size??"medium",i=e.config.disableCarouselMobile??!1,{initialize:c,pagination:l,controller:u,itemsStyles:d}=p.Carousel.useCarousel({itemsPerPage:n?e==null?void 0:e.config.slidesPerViewMobile:(h=e==null?void 0:e.config)==null?void 0:h.slidesPerView,gap:n?e.config.gapMobile:e.config.gap,direction:n&&i?"column":"row"});return s.jsx(Kt,{name:t,children:s.jsx(p.Utils.Column,{style:{width:o==="small"?"70%":"100%"},alignContent:"center",justifyContent:"center",alignItems:"center",children:s.jsxs(p.Carousel.Root,{innerRef:m=>{c(m)},className:p.helpers.classNameConcat(An["carousel-modifier"],"common-section"),children:[o==="medium"?s.jsxs(p.TextStructure.Root,{children:[r.ACTIVE_BENNEFITS_BAR_TITLE&&s.jsx(p.TextStructure.DivWrapper,{className:An["carousel-title-modifier"],children:s.jsx("h2",{className:"typography-style-body-lg",children:r.BENNEFITS_BAR_TITLE})}),n&&l.totalPages>1&&s.jsx(p.Carousel.Controller,{className:p.helpers.classNameConcat(An["row-controller-modifier"],r.ACTIVE_BENNEFITS_BAR_TITLE?An["title-on"]:void 0),children:s.jsxs(p.Carousel.Arrows,{children:[s.jsx(p.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.prevPage(),adornment:{start:s.jsx(p.Icon,{name:r.ICONS.arrow_left})}}),s.jsx(p.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.nextPage(),adornment:{start:s.jsx(p.Icon,{name:r.ICONS.arrow_right})}})]})})]}):s.jsx(s.Fragment,{}),s.jsx(p.Carousel.Body,{children:e.bennefit.map((m,_)=>s.jsx(p.Carousel.Item,{className:An["card-modifier"],style:d,children:s.jsx(p.Card,{stroke:!0,padding:"small",children:s.jsx(p.TextStructure.Root,{layoutProps:{columnWrapper:{alignContent:"start",alignItems:"start",justifyContent:"start"},textRow:{alignContent:"center",alignItems:"center",justifyContent:"center"}},adornment:{[o==="medium"?"top":"start"]:s.jsx(p.Icon,{name:m.icon,size:o==="medium"?"medium":"small"})},children:s.jsxs(p.TextStructure.DivWrapper,{alignItems:"start",children:[s.jsx("h3",{className:"typography-style-body-md",children:m.title}),m.subtitle&&m.subtitle.length?s.jsx("p",{className:"typography-style-body-xs",children:m.subtitle}):s.jsx(s.Fragment,{})]})})})},`bennefit=${_}`))}),!n&&l.totalPages>1?s.jsxs(p.Carousel.Controller,{className:An["row-controller-modifier"],children:[s.jsxs(p.Carousel.Arrows,{children:[s.jsx(p.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.prevPage(),adornment:{start:s.jsx(p.Icon,{name:r.ICONS.arrow_left})}}),s.jsx(p.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.nextPage(),adornment:{start:s.jsx(p.Icon,{name:r.ICONS.arrow_right})}})]}),s.jsx(p.Carousel.Bullets,{page:l.currentPage,total:l.totalPages,onBulletClick:m=>u==null?void 0:u.navigateTo(m)})]}):s.jsx(s.Fragment,{})]})})})},Rg=({data:{componentIndex:e,...t},name:r,CONSTANTS:n})=>s.jsx(Kt,{name:r,children:s.jsx(Jc,{...t,CONSTANTS:n})}),Tg=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:r,className:n,name:o})=>s.jsx(Kt,{name:o,children:s.jsx("div",{className:p.helpers.classNameConcat(Wa.textContentSection,n??""),style:e.borderTop?{borderTop:"none"}:void 0,children:s.jsx(P_,{data:e,ICONS:t,TEXTCONTENT_EXPANDED:r})})}),wd={"accordion-modifier":"_accordion-modifier_1we16_1","accordion-body-modifier":"_accordion-body-modifier_1we16_7"},Og=({data:e,id:t,ICONS:r,className:n,name:o})=>{var l;const[i,c]=j.useState([]);return s.jsx(Kt,{name:o,children:s.jsxs(p.Utils.Column,{gap:"var(--gap-vertical-sm)",className:n??"",children:[e.titleAccordion?s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h2",{className:p.helpers.classNameConcat("typography-style-heading-sm","common-section"),style:{fontWeight:500},children:e.titleAccordion})})}):s.jsx(s.Fragment,{}),(l=e.accordions)==null?void 0:l.map((u,d)=>s.jsxs(p.Accordion.Wrapper,{className:wd["accordion-modifier"],children:[s.jsx(p.Accordion.Header,{id:`${t}-text-accordion-${d}`,openIndicator:s.jsx(p.Icon,{name:r.arrow_down}),closeIndicator:s.jsx(p.Icon,{name:r.arrow_up}),startOpen:i.includes(d),onClick:()=>c(h=>h.includes(d)?h.filter(m=>m!==d):[...h,d]),children:s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{children:[s.jsx("h3",{className:"typography-style-body-md-strong",children:u.title}),u.subtitle&&u.subtitle.length?s.jsx("h2",{children:u.subtitle}):s.jsx(s.Fragment,{})]})})}),s.jsx(p.Accordion.Body,{children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:wd["accordion-body-modifier"],children:s.jsx(ln.Editor,{editorKey:`${t}-editor-${d}`,blockRenderMap:v_,editorState:u.text?Gc(JSON.parse(u.text)):ln.EditorState.createEmpty(),onChange:()=>null})})})})]},`${t}-accordion-${d}-${i.includes(d)}`))]})})},Ag=async e=>{const{type:t}=e,r=t==="collectionSearch"?"/_v/proxy/search/product":"/_v/proxy/search/crosselling",n=JSON.stringify(t==="collectionSearch"?{...e.params,facets:e.facets,term:e.term,forceUpdate:!1}:e.facets);return(await U.fetchProxy(r,{method:"POST",headers:{"Content-Type":"application/json"},body:n}).then(i=>i.json()).then(i=>t==="collectionSearch"?i.data.products:i.products)).filter(i=>!!i.node.availability.status)},r0="_shelf__container_bi04n_10",kg={shelf__container:r0},n0=({collectionSearch:e,title:t,CONSTANTS:r,searchModal:n})=>{const[o,i]=j.useState([]),{isMobile:c}=xe(),{ref:l,inView:u}=zd.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:d}=Ee();return j.useEffect(()=>{if(!e)return;function h(){var m,_;Ag({type:"collectionSearch",term:e==null?void 0:e.term,facets:e==null?void 0:e.facets,params:{count:((m=e==null?void 0:e.params)==null?void 0:m.count)??12,sort:((_=e==null?void 0:e.params)==null?void 0:_.sort)??r.ITEMS_DEFAULT_SORT}}).then(g=>{i(g)})}h()},[e]),j.useEffect(()=>{!u||o.length===0||d({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o},customData:{item_list_name:t??"Você também pode gostar"}}})},[u,o]),o.length===0?null:s.jsx("div",{ref:l,className:kg.shelf__container,children:s.jsx(ws.Shelf,{title:t??"Você também pode gostar",itemsPerPage:n?{desktop:2,mobile:1.4}:{desktop:4.4,mobile:2.2},ICONS:r.ICONS,children:Array.isArray(o)&&o.map(({node:h},m)=>{const{availability:{status:_}}=h;return _?s.jsx(ws.Card,{item:h,isMobile:c,size:"medium",index:m,shelfTitle:t??"Você também pode gostar",CONSTANTS:r},h.id):null})})})},s0=({recommendationSearch:e,title:t,CONSTANTS:r})=>{const[n,o]=j.useState([]),{isMobile:i}=xe(),{ref:c,inView:l}=zd.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:u}=Ee(),d=j.useMemo(()=>e?[{key:e.type,value:e.productId}]:[],[e]);return j.useEffect(()=>{if(!e)return;function h(){var m;Ag({type:"recommendationSearch",facets:d,params:{count:((m=e==null?void 0:e.params)==null?void 0:m.count)??12,sort:r.ITEMS_DEFAULT_SORT}}).then(_=>o(_))}h()},[d,e]),j.useEffect(()=>{if(!l||n.length===0||(e==null?void 0:e.type)==="suggestions")return;const h=t??"Você também pode gostar";u({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:n},customData:{item_list_name:h},outsideEcommerceData:{item_list_name:h}}})},[l,n]),(n==null?void 0:n.length)===0?null:(e==null?void 0:e.type)==="suggestions"?s.jsx(dh,{products:n,innerRef:c,inView:l,CONSTANTS:r}):s.jsx("div",{ref:c,className:kg.shelf__container,children:s.jsx(ws.Shelf,{title:t??"Você também pode gostar",itemsPerPage:{desktop:4.4,mobile:2.2},ICONS:r.ICONS,children:Array.isArray(n)&&n.map(({node:h},m)=>{const{availability:{status:_}}=h;return _?s.jsx(ws.Card,{item:h,isMobile:i,size:"medium",index:m,shelfTitle:t??"Você também pode gostar",CONSTANTS:r},h.id):null})})})},Mg=({data:e,name:t,CONSTANTS:r})=>{const{productId:n}=dp();return!(e!=null&&e.productLists)||e.productLists.length===0?null:e.productLists.map((o,i)=>s.jsx(Kt,{name:t,children:s.jsx(s0,{title:o.title,recommendationSearch:{type:o.product_group_option,productId:n,params:{count:o.number_of_items,sort:"score:desc"}},CONSTANTS:r},`shelf=${i}`)}))},Lg=({data:e,CONSTANTS:t,searchModal:r,name:n})=>{var i;const o=(i=e==null?void 0:e.productLists)==null?void 0:i.filter(c=>!!c.collectionId||!!c.search_base_name);return!o||o.length===0?null:o.map((c,l)=>{const u=c.collectionId?{term:"",facets:[{key:"productclusterids",value:`${c.collectionId}`}]}:{term:c.search_base_name,facets:[]};return s.jsx(Kt,{name:n,children:s.jsx(n0,{title:c.title,collectionSearch:{params:{count:c.number_of_items,sort:c.sort},...u},searchModal:r,CONSTANTS:t},`shelf=${l}`)})})},o0="_popup_5taxs_9",i0="_popup__overlay_5taxs_19",a0="_popup__modal_5taxs_27",Lt={popup:o0,popup__overlay:i0,popup__modal:a0,"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"},c0=e=>s.jsx("div",{className:Lt["popup__modal--success"],children:s.jsx(p.TextStructure.Root,{adornment:{start:s.jsx(p.Icon,{name:e.ICONS.check_circle,size:"large"})},children:s.jsxs(p.TextStructure.DivWrapper,{className:Lt["text-structure-modifier"],children:[s.jsx("h3",{className:"typography-style-body-sm-strong",children:e.successTitle}),s.jsx("p",{className:"typography-style-body-caption",children:e.successDescription})]})})}),l0=e=>{const{title:t,description:r,groups:n,ICONS:o}=e,{formErrors:i,submitForm:c,success:l}=ri(),[u,d]=j.useState(!1);return s.jsx("form",{onSubmit:c,className:Lt.formContainer,children:s.jsxs("div",{className:Lt["popup__modal--form"],children:[s.jsxs(p.TextStructure.DivWrapper,{className:Lt["popup__modal--header"],children:[s.jsx("strong",{className:"typography-style-body-md-strong",children:t}),s.jsx("p",{className:"typography-style-body-xs",children:r})]}),l?s.jsx(c0,{...e}):s.jsxs(s.Fragment,{children:[n.map(h=>s.jsx(zn.FieldGroup,{group:h,children:s.jsx(zn.FieldWrapper,{fields:h.fields})},h.groupLabel)),s.jsx(p.Checkbox,{className:Lt["popup__modal--checkbox"],adornment:s.jsx(p.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:u,onChange:()=>d(!u)}),s.jsxs("div",{children:[!u&&s.jsx(p.TextStructure.DivWrapper,{className:Lt["popup__modal--status"],children:s.jsxs("p",{className:"typography-style-body-caption",children:[s.jsx(p.Icon,{size:"small",name:o.alert_circle}),Lv]})}),s.jsx(p.Button,{disabled:!u,size:"medium",type:"submit",children:Fv}),i.length?s.jsx(p.TextStructure.DivWrapper,{className:Lt["popup__modal--status"],children:s.jsx("p",{className:p.helpers.classNameConcat(Lt.formSubmitWarning,"typography-style-body-xs"),children:Dv})}):null]})]})]})})},Dg=({data:e,name:t,CONSTANTS:r})=>{const[n,o]=j.useState(!1),i=typeof window<"u"?window.sessionStorage.getItem(r.POPUP_TRACK_STORAGE)||window.localStorage.getItem(r.POPUP_SUBMITTED_STORAGE):null,c=()=>{o(!1),window.sessionStorage.setItem(r.POPUP_TRACK_STORAGE,"true")};return j.useEffect(()=>{setTimeout(()=>!i&&o(!0),2e3)},[]),e.active&&n?s.jsx(Kt,{name:t,children:s.jsxs("div",{className:Lt.popup,children:[s.jsx("div",{onClick:c,className:Lt.popup__overlay}),s.jsxs("div",{className:Lt.popup__modal,children:[s.jsx(p.Button,{onClick:c,variant:"tertiary",className:Lt["popup__modal--close"],children:s.jsx(p.Icon,{style:{color:e.closeColor||"#000"},name:r.ICONS.close,size:"medium"})}),s.jsx("div",{children:s.jsx(at.Image,{src:e.imageUrl,width:"459",height:"418",alt:e.title})}),s.jsx(sg,{...e,children:s.jsx(l0,{...e,ICONS:r.ICONS})})]})]})}):null},u0={"Image Grid":Eg,"Embed Live":Ig,"Banner Carousel":Pg,Banner:Qc,"Bennefits Bar":Ng,newsletter:Rg,TextContent:Tg,TextAccordion:Og,"Product Carousel":Lg,"PDP Product Carousel":Mg,"Popup Modal":Dg},Fg=({data:e,identifyWhoIsFirst:t=!1,componentConfigs:r})=>e==null?void 0:e.map((n,o)=>{const i=u0[n.name],c={...(r==null?void 0:r[n.name])??{}};return t&&o===0&&(n.data.first=!0),n.data.componentIndex=o,n.name==="TextAccordion"&&(c.id=`text-accordion-${o}`),i?s.jsx(i,{name:n.name,data:n.data,...c},`section-zone-component-${o}`):null});async function d0({slug:e,pageData:t,tabsData:r,oneTrust:n}){var l,u,d,h;const i=(r?[...r].sort((m,_)=>m.config.tabConfig.order-_.config.tabConfig.order):[]).map(m=>({slug:m.config.seo.slug||Fa(m.config.tabConfig.title),title:m.config.tabConfig.title})),c=r==null?void 0:r.find(m=>m.config.seo.slug===`/${decodeURIComponent(e)}`);return c&&(c.id=Fa(c.config.seo.slug||"")),s.jsxs("div",{className:Xr.root,children:[s.jsx(ic,{children:s.jsx(YE,{title:(l=t==null?void 0:t.config.banners)==null?void 0:l.altImageBackgroud,srcImages:{desktop:(u=t==null?void 0:t.config.banners)==null?void 0:u.imageBackgroudDesk,mobile:(h=(d=t==null?void 0:t.config)==null?void 0:d.banners)==null?void 0:h.imageBackgroudMobile}})}),s.jsxs(ic,{children:[s.jsx("div",{className:Xr.slugs,children:i.map(m=>s.jsx(wt,{href:m.slug?`/politicas/${m.slug.replace(/^\/+/,"")}`:"#",className:m.slug===(c==null?void 0:c.id)?Xr.active:"",title:m.title,scroll:!1,children:m.title},m.slug.replace(/^\/+/,"")))}),s.jsx("div",{className:Xr["content-page-modifier"],children:e==="privacidade-e-seguranca"?s.jsx(XE,{oneTrust:n}):s.jsx(Fg,{data:(c==null?void 0:c.sections)??[]})})]})]})}const gr={"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"},zg=({data:e,ERROR_TEMPLATE_RETURN_BUTTON:t})=>{const{router:r}=Ae();return s.jsx("div",{children:s.jsxs(p.Banner.Container,{className:gr["banner-wrapper"],children:[s.jsxs(p.Banner.ImageWrapper,{className:gr["banner-image"],children:[s.jsx(at.Image,{className:gr["banner-desktop"],alt:e.altImageBackgroud??e.imageBackgroudDesk,src:e.imageBackgroudDesk,width:1366,height:695,priority:!0}),s.jsx(at.Image,{className:gr["banner-mobile"],alt:e.altImageBackgroud??e.imageBackgroudMobile,src:e.imageBackgroudMobile,width:375,height:755,priority:!0})]}),s.jsx(p.Banner.Slot,{className:p.helpers.classNameConcat(gr["text-wrapper"],gr["text-wrapper-modifier"]),margin:107,children:s.jsxs(p.TextStructure.Root,{layoutProps:{textRow:{className:gr["custom-row"]}},children:[s.jsxs(p.TextStructure.DivWrapper,{className:p.helpers.classNameConcat(gr["text-area"],gr["text-area-modifier"]),children:[s.jsx("h1",{className:"typography-style-display-strong",children:e.title}),s.jsx("h2",{className:"typography-style-body-lg",children:e.subTitle}),s.jsx("p",{className:"typography-style-body-sm",children:e.description})]}),s.jsx(p.Button,{onClick:()=>r.push("/"),children:t})]})})]})})};zg.displayName="ErrorTemplate";const f0={codVenderoda:"",orderformId:"",cupom:"",setCodVendedora:()=>null,setCupom:()=>null,setOrderformId:()=>null,setConfiguration:()=>null,update:()=>!1,isValidSharedCart:()=>!1},p0=j.createContext(f0);function h0(){return j.useContext(p0)}function ga(e,t=""){if(!e)return;if(!t)if(typeof window<"u")t=window.location.href;else return;e=e.replace(/[[\]]/g,"\\$&");const n=new RegExp(`[?&]${e}(=([^&#]*)|&|#|$)`).exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null}function ya(){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 m0="_container_df1ql_11",va={"action-button":"_action-button_df1ql_1",container:m0,"container-icon":"_container-icon_df1ql_31"};function _0({icon:e,text:t,onClick:r,isActive:n=!1}){const o=i=>{i.preventDefault(),n&&r()};return s.jsxs("div",{className:p.helpers.classNameConcat(va["action-button"],n?"":"disable"),onClick:i=>o(i),children:[s.jsx("div",{className:p.helpers.classNameConcat(va["container-icon"],n?"":"disable"),children:s.jsx("img",{src:e,alt:"icon"})}),s.jsxs("div",{className:p.helpers.classNameConcat(va.container,n?"":"disable"),children:[s.jsx("span",{children:t}),s.jsx("img",{src:"/images/Widget_open/navigate_next-black-18dp.png",alt:"next"})]})]})}const g0="_container_k11me_1",y0="_header_k11me_18",v0="_body_k11me_45",fs={container:g0,header:y0,body:v0,"copy-cart-button":"_copy-cart-button_k11me_78","reset-orderform-button":"_reset-orderform-button_k11me_110"};function x0(e,t=!1,r){const{base:n,orderformId:o}=e,i=r==null?void 0:r.split("codigo: ")[1],c=localStorage.getItem("maiscarrinho"),l={medium:t?"&utm_medium=carrinho_compartilhado":"&utm_medium=linkvendedor",campaign:`&utm_campaign=${encodeURIComponent(r??"")}`,cp:i?`&utmi_cp=${i}`:"",source:`&utm_source=${c}`};return t?`${n}/checkout/?orderFormId=${o}${l.source}${l.campaign}${l.cp}${l.medium}#/cart`:`${n}/checkout/?orderFormId=${o}${l.source}${l.campaign}${l.cp}${l.medium}#/payment`}function b0(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 Ed({mode:e,config:t,newCart:r}){const[n,o]=j.useState(!1),[i,c]=j.useState(""),l=x0(t,e==="cart",t.sellerCode),{useClipboard:u}=Fo.hooks,[,d]=u();function h(){o(!0);const m=document.createElement("textArea");m.readOnly=!0,m.contentEditable="true",m.value=i,document.body.appendChild(m),m.select(),d(m.value),document.body.removeChild(m),setTimeout(()=>{o(!1)},3e3)}return j.useEffect(()=>{c(""),c("Gerando link..."),b0(l).then(m=>c(m)).catch(()=>c("Algo deu errado, tente novamente mais tarde"))},[l]),s.jsxs("div",{className:fs.container,children:[s.jsxs("div",{className:fs.header,children:[s.jsx("img",{src:e==="cart"?"/images/Modal_compartilhar_sacola/ico_sacola_big.png":"/images/Modal_compartilhar_editavel/ico_form_big.png",alt:"close"}),s.jsxs("span",{className:"text",children:[" ",e==="cart"?"Compartilhar a Sacola":"Compartilhar link para pagamento"]})]}),s.jsxs("div",{className:fs.body,children:[s.jsx("p",{children:e==="cart"?`Envie a sacola para um ou mais clientes usando o link abaixo ou
|
|
27
|
-
compartilhe direto por whatsapp`:"Envie a sacola para um cliente usando o link abaixo ou compartilhe direto por whatsapp"}),s.jsxs("form",{children:[s.jsx("input",{type:"text",disabled:!0,value:i}),s.jsxs("div",{className:p.helpers.classNameConcat(fs["copy-cart-button"],i?"active":""),children:[s.jsx("img",{src:"/images/Feedback_copiado/ico_share.png",alt:"share",className:"share",onClick:()=>i&&h()}),n&&s.jsx("div",{className:"share-input-copy-feedback",children:"Link Copiado"})]})]}),s.jsx("button",{className:fs["reset-orderform-button"],onClick:()=>{Zt.set(ko,{}),r()},children:"Novo Atendimento"})]})]})}const
|
|
24
|
+
`)),this.wrapperTag=null)}},{key:"indent",value:function(){this.output.push(UC.repeat(this.indentLevel))}},{key:"withCustomInlineStyles",value:function(r,n){if(!this.inlineStyleFn)return r;var o=this.inlineStyleFn(n);if(!o)return r;var i=o.element,c=i===void 0?"span":i,l=o.attributes,u=o.style,d=On(Co({},l,{style:u&&bo(u)}));return"<".concat(c).concat(d,">").concat(r,"</").concat(c,">")}},{key:"renderBlockContent",value:function(r){var n=this,o=r.getType(),i=r.getText();if(i==="")return N_;i=this.preserveWhitespace(i);var c=r.getCharacterList(),l=MC(i,c);return l.map(function(u){var d=ha(u,2),h=d[0],m=d[1],_=m.map(function(D){var B=ha(D,2),G=B[0],J=B[1],Y=KC(G),X=!0,Z=!1,he=void 0;try{for(var fe=n.styleOrder[Symbol.iterator](),ee;!(X=(ee=fe.next()).done);X=!0){var ie=ee.value;if(!(ie===Kc&&o===vt.CODE)&&J.has(ie)){var _e=n.inlineStyles[ie],Ce=_e.element,ge=_e.attributes,we=_e.style;if(Ce==null&&(Ce="span"),ge=fa(ge),we!=null){var V=bo(we);ge=ge==null?{style:V}:Co({},ge,{style:V})}var oe=On(ge);Y="<".concat(Ce).concat(oe,">").concat(Y,"</").concat(Ce,">")}}}catch(F){Z=!0,he=F}finally{try{!X&&fe.return!=null&&fe.return()}finally{if(Z)throw he}}return n.withCustomInlineStyles(Y,J)}).join(""),g=h?n.contentState.getEntity(h):null,v=g==null?null:g.getType().toUpperCase(),x;if(g!=null&&n.options.entityStyleFn&&(x=n.options.entityStyleFn(g))){var S=x,w=S.element,P=S.attributes,I=S.style;if(w==null&&(w="span"),P=fa(P),I!=null){var C=bo(I);P=P==null?{style:C}:Co({},P,{style:C})}var N=On(P);return"<".concat(w).concat(N,">").concat(_,"</").concat(w,">")}else if(v!=null&&v===Zn.LINK){var T=Eo.hasOwnProperty(v)?Eo[v](v,g):null,O=On(T);return"<a".concat(O,">").concat(_,"</a>")}else if(v!=null&&v===Zn.IMAGE){var M=Eo.hasOwnProperty(v)?Eo[v](v,g):null,z=On(M);return"<img".concat(z,"/>")}else return _}).join("")}},{key:"preserveWhitespace",value:function(r){for(var n=r.length,o=new Array(n),i=0;i<n;i++)r[i]===" "&&(i===0||i===n-1||r[i-1]===" ")?o[i]=" ":o[i]=r[i];return o.join("")}}]),e}();function On(e){if(e==null)return"";for(var t=[],r=0,n=Object.keys(e);r<n.length;r++){var o=n[r],i=e[o];i!=null&&t.push(" ".concat(o,'="').concat(QC(i+""),'"'))}return t.join("")}function GC(e){switch(e){case vt.UNORDERED_LIST_ITEM:case vt.ORDERED_LIST_ITEM:return!0;default:return!1}}function KC(e){return e.split("&").join("&").split("<").join("<").split(">").join(">").split(" ").join(" ").split(`
|
|
25
|
+
`).join(N_+`
|
|
26
|
+
`)}function QC(e){return e.split("&").join("&").split("<").join("<").split(">").join(">").split('"').join(""")}function YC(e,t){return new VC(e,t).generate()}const fd=e=>{const r=Gc(JSON.parse(e)).getCurrentContent();return YC(r)},XC=({expanded:e,content:t})=>{const r=t.textStructureReduced?fd(t.textStructureReduced):null,n=t.showTextStructureExpander&&t.textStructure?fd(t.textStructure):null;return s.jsxs("details",{open:e,children:[r&&s.jsx("summary",{onClick:o=>o.preventDefault(),dangerouslySetInnerHTML:{__html:r}}),n&&s.jsx("div",{dangerouslySetInnerHTML:{__html:n}})]})},JC="_textContentWrapper_176ht_5",ZC="_textContentSection_176ht_13",Va={"link-modifier":"_link-modifier_176ht_1",textContentWrapper:JC,textContentSection:ZC},R_=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:r})=>{var i;const[n,o]=j.useState(!1);return s.jsx(p.TextStructure.Root,{layoutProps:{textRow:{alignContent:Tn(e.textStructureAlignment),alignItems:Tn(e.textStructureAlignment)},columnWrapper:{alignContent:Tn(e.textStructureAlignment),alignItems:Tn(e.textStructureAlignment)}},adornment:{bottom:e.showTextStructureExpander&&e.textStructure?s.jsx(p.Button,{variant:"tertiary",adornment:{end:s.jsx(p.Icon,{name:n?`${t.arrow_up}`:`${t.arrow_down}`})},onClick:()=>o(c=>!c),size:"small",children:n?(r==null?void 0:r.less)??"Ver Menos":(r==null?void 0:r.more)??"Ver Mais"}):s.jsx(s.Fragment,{})},children:s.jsxs(p.Utils.Column,{className:Va.textContentWrapper,style:{alignItems:Tn(e.textStructureAlignment)},children:[s.jsx(p.TextStructure.DivWrapper,{style:{textAlign:Tn(e.textStructureAlignment)},mode:e.textStructureMode??"default",children:e.textStructureReduced?s.jsx(XC,{content:e,expanded:n}):s.jsx(s.Fragment,{})}),e.textStructureButtonLabel?s.jsx(wt,{mode:e.textStructureMode??"default",href:e.textStructureButtonHref??"#",size:e.textStructureButtonSize,className:Va["link-modifier"],adornments:(i=e.textStructureButtonIcon)!=null&&i.length&&e.enableIcon?{end:s.jsx(p.Icon,{name:e.textStructureButtonIcon})}:void 0,children:e.textStructureButtonLabel}):s.jsx(s.Fragment,{})]})})},ew=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],pd=e=>({centro:"center",esquerda:"start",direita:"end"})[e],hd={"content-modifier":"_content-modifier_16y4u_5","banner-image-wrapper-modifier":"_banner-image-wrapper-modifier_16y4u_13"},md=({data:e,videoUrl:t,priority:r,videoRef:n,ICONS:o,TEXTCONTENT_EXPANDED:i,TIME_ZONE:c,className:l,...u})=>{const{video:d,image:h,imageHref:m,imageOpacity:_,altImage:g,backgroundColor:v,position:x,contentAlignment:S,showTimer:w,contentOrder:P,timerMode:I,timerEnd:C,timerInit:N,textStructure:T,textStructureReduced:O}=e.banner,M=(m==null?void 0:m.trim())||(h==null?void 0:h.trim())||null,{nextimage:z}=Ae();return s.jsxs(p.Banner.Container,{...u,children:[s.jsxs(p.Banner.ImageWrapper,{className:hd["banner-image-wrapper-modifier"],style:_?{background:v}:void 0,children:[d&&s.jsx(at.Video,{videoRef:n,src:t,autoPlay:r,loop:!0,playsInline:!0,muted:!0}),M&&!(d!=null&&d.length)&&s.jsx(z,{src:M,width:"1920",height:"1080",alt:g??h??"",...r?{priority:r}:{},style:_?{opacity:"0"}:void 0}),!h&&!(d!=null&&d.length)&&s.jsx("div",{style:{background:v}})]}),w||O||T?s.jsx(p.Banner.Slot,{...ew(x??"centro"),className:p.helpers.classNameConcat(hd["content-modifier"],l),style:{textAlign:pd(S)},children:s.jsxs(p.Utils.Column,{gap:"16px",alignItems:pd(S),children:[w&&P==="timer-first"&&s.jsx(qo,{mode:I??"default",size:"small",dateEnd:C?new Date(C):new Date,dateInit:N?new Date(N):new Date,TIME_ZONE:c}),s.jsx(R_,{data:e.banner,ICONS:o,TEXTCONTENT_EXPANDED:i}),w&&P!=="timer-first"&&s.jsx(qo,{mode:I??"default",size:"small",dateEnd:C?new Date(C):new Date,dateInit:N?new Date(N):new Date,TIME_ZONE:c})]})}):s.jsx(s.Fragment,{})]})};class Kt extends j.Component{constructor(){super(...arguments);Gr(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(){return{hasError:!0,error:null}}componentDidCatch(r,n){if(process.env.NODE_ENV!=="production"){if(this.props.debugger)debugger;console.groupCollapsed("Error Boundary CMS",this.props.name),console.log("Error:",(r==null?void 0:r.message)??r),console.log("Error Info:",n),console.groupEnd()}}render(){const{hasError:r}=this.state,{children:n,fallback:o}=this.props;return r&&process.env.NODE_ENV==="production"?null:r&&o!==void 0?o:n}}const Us=({data:e,className:t,priority:r,creative:n,name:o,...i})=>{const{handleSelectPromotionEvent:c,currentLocalRef:l}=Ee(),{banner:{promotion_name:u},index:d,componentIndex:h}=e,m=typeof d=="number"?`:${d+1}`:"",_={creative_name:n,creative_slot:`${n}-${l.current}:${h+1}${m}`,promotion_id:e.banner.href,promotion_name:u},g=j.useRef(null),v=j.useMemo(()=>{var S;if((S=e.banner.video)!=null&&S.includes("player.vimeo")){const w=e.banner.video.split("?")[1],P=w==null?void 0:w.split("&"),I=P==null?void 0:P.filter(N=>N.includes("loc")||N.includes("signature")||N.includes("user_id")),C=I==null?void 0:I.join("&");return`${e.banner.video.split("?")[0]}?${C}`}return e.banner.video},[e]),x=()=>{var S;(S=g.current)!=null&&S.paused&&g.current.play()};return s.jsx(Kt,{name:o,children:s.jsx(Ko,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{..._,index:d}}}},observerOptions:{delay:100,...v&&{threshold:.1}},...v&&{callBackWhenVisible:x},children:e.banner.href?s.jsx(Tt,{href:e.banner.href,onClick:()=>{c({updatePromotionRef:!0,promotion:_,index:d})},children:s.jsx(md,{data:e,videoUrl:v,priority:r,videoRef:g,className:t,...i})}):s.jsx(md,{data:e,videoUrl:v,priority:r,videoRef:g,className:t,...i})})})},Qc=e=>s.jsx(Kt,{name:e.name,children:s.jsx(Us,{...e})}),T_=({columns:e,gap:t,className:r})=>{const{isMobile:n}=xe(),{banners:o}=zs(),{constants:{ICONS:i,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u}}=ut();return Array.isArray(o)?o.map((d,h)=>j.createElement(Dt.Banner,{...d,columns:d.columns,gap:t,isMobile:n??!1,key:`${d.position_grid}-${h}`,totalColumns:e,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c},s.jsx(Us,{name:"Banner Carousel",data:{banner:d,componentIndex:h},creative:"banner_grid",ICONS:i,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u,className:r}))):null};T_.displayName="PDC.InfiniteScroller.Banners";const O_=({page:e,...t})=>{var c;const{rootRef:r}=Ze(),{gap:n,updateParamPage:o}=Hr(),{element:i}=Uo({callback:()=>o(e.page),options:{threshold:0}});return s.jsx("div",{...t,id:`pdc-scroll-infinite-${e==null?void 0:e.page}`,className:St["pdc--infinite--loader"],"data-page":e.page,ref:i,style:{top:(Number(((c=r==null?void 0:r.current)==null?void 0:c.offsetHeight)??0)+n*2)*-1}})};O_.displayName="PDC.Page.Anchor";const A_=e=>{var n;const{gap:t}=Hr(),{rootRef:r}=Ze();return s.jsx("div",{...e,className:St["pdc--infinite--card--anchor-pdp"],style:{top:(Number(((n=r==null?void 0:r.current)==null?void 0:n.offsetHeight)??0)+t*2)*-1}})};A_.displayName="PDC.Page.AnchorPDP";const k_=({first:e,gap:t,empty:r=!1,isMobile:n=!1,item:o,index:i,order:c,page:l,showVideo:u=!1})=>{const{handleNotify:d}=Hr(),{getAvailableProductTag:h}=jr(),{constants:m,mainSeller:_}=ut(),{load:g}=Ur(),v=h(o==null?void 0:o.cluster.highlights);if(r)return;const{BUY_BUTTON_LABELS:x,MAIN_IMAGE:S,PLP_GRID_SCROLL_BACK:w,PLP_INFINITE_SCROLL:P,PLP_PRODUCT_SIMILAR_DELAY:I,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:C,PLP_SIZE_ORDER:N,PRODUCT_CARD_IMAGE_ASPECT_RATIO:T,PRODUCT_CARD_TEXTS:O,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:M,PRODUCT_IMAGE_DIMENSIONS:z,SECOND_IMAGE:D,TEXTURE_IMAGE:B,Z_INDEX_WAR:G,ICONS:J}=m;return s.jsxs(Dt.Card,{"data-skeleton":o.id==="skeleton",className:St["pdc--infinite--card--disabled"],gap:t,isMobile:n??!1,item:o,order:c,tag:v,index:i,setSkuSelected:d,showVideo:u,CONSTANTS:{BUY_BUTTON_LABELS:x,MAIN_IMAGE:S,PLP_GRID_SCROLL_BACK:w,PLP_INFINITE_SCROLL:P,PLP_PRODUCT_SIMILAR_DELAY:I,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:C,PLP_SIZE_ORDER:N,PRODUCT_CARD_IMAGE_ASPECT_RATIO:T,PRODUCT_CARD_TEXTS:O,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:M,PRODUCT_IMAGE_DIMENSIONS:z,SECOND_IMAGE:D,StoreConfig_MainSellerId:_,TEXTURE_IMAGE:B,Z_INDEX_WAR:G,ICONS:J},children:[s.jsx(bs.AnchorPDP,{}),e&&l&&s.jsx(bs.Anchor,{page:l}),g&&l&&!(l!=null&&l.loading)?s.jsx(bs.Loader,{page:l}):null]})};k_.displayName="PDC.Page.Card";const M_=({type:e="default",page:t,...r})=>{const{updateProducts:n}=Ur(),{element:o}=Uo({callback:()=>{t.loading||n(t.page)},onEnterViewportOnce:!0,options:{threshold:[.2,.5]}});return s.jsx("div",{...r,className:St[`pdc--infinite--loader${e==="page"?"--page":""}`],ref:o})};M_.displayName="PDC.Page.Loader";const L_=({nextPage:e=!1,page:t,total:r,...n})=>{const{addNewPage:o}=Hr(),{element:i}=Uo({callback:()=>{o(t,r,e)},onEnterViewportOnce:!0,options:{threshold:[.1,.5]}});return e===!0&&t.loading===!0?s.jsx("div",{...n,className:St["pdc--infinite--next-page--card"],"data-next-page":!0,ref:i}):null};L_.displayName="PDC.Page.NextPage";const bs={Anchor:O_,AnchorPDP:A_,Card:k_,Loader:M_,NextPage:L_},tw=({page:e})=>{const{isMobile:t}=xe(),{gap:r,columns:n}=Hr(),{isLoading:o,pagination:i,products:c}=qs(),{load:l,products:u,trimPages:d,setLoad:h}=Ur(),{constants:{ICONS:m,PLP_NOT_RESULT:_,ITEMS_PER_PAGE:g}}=ut(),{count:v,nextPage:x,total:S}=i,w=(e.page-1)*24;j.useEffect(()=>{o||h(!0)},[o,h]),j.useEffect(()=>{!o&&c.length===0&&e.loading&&e.page>S&&e.page>1&&d(S)},[o,e,c,S,d]);const P=e.page===S?v-g*(e.page-1):g,I=c.length>0?c:Array.from({length:P},()=>Hf()),C=Vf(I.map(T=>T.node),n),N=l&&e.page===1&&!o&&i.total===0;return s.jsxs(s.Fragment,{children:[e.page===1&&s.jsx(Vc,{total:(i==null?void 0:i.count)??0}),N&&s.jsx(tr.Empty,{ICONS:m,PLP_NOT_RESULT:_}),Array.isArray(I)?I.map((T,O)=>{const M=u[w+O]+1;return s.jsx(bs.Card,{empty:e.loading&&e.page===1&&!o&&!c.length,first:O===0,gap:r,index:O,item:T.node,isMobile:t??!1,order:M,page:e,showVideo:C.indexOf(O)!==-1},M)}):null,l&&!o&&x&&c.length>0&&s.jsx(bs.NextPage,{page:e,nextPage:x,total:S})]})},D_=({page:e})=>{const{state:t}=ft(),{sendDataLayerEvent:r}=Ee(),n=j.useCallback(o=>{r({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o.products}}})},[r,t==null?void 0:t.query]);return s.jsx(Wc,{callback:n,state:{...t,page:e==null?void 0:e.page},queryKey:[String(e==null?void 0:e.page),t.sort,JSON.stringify(Object.entries(t.facets??{}).sort())],options:{enabled:e.loading,gcTime:1e3*60*30,staleTime:1e3*60*5,refetchOnWindowFocus:!1},children:s.jsx(tw,{page:e})})};D_.displayName="PDC.Page";const rw=()=>{var I;const{constants:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:n,PLP_FILTERS_TITLE:o,PLP_SIZE_ORDER:i},openFilters:c,setOpenFilters:l}=ut(),[u,d]=j.useState("10000:0"),{isMobile:h}=xe(),{state:m}=ft(),{breadcrumb:_,deleteAllFacets:g,facets:v,isLoading:x,onToggleFacet:S}=$c(),w={isLast:!0,href:(I=m.term)!=null&&I.length?`/${m.term}`:"",name:m.term},P=U.filterNonRootFacets(m.facets,m==null?void 0:m.base);return j.useEffect(()=>{const C=v.find(({key:N})=>N==="price");if(C){const[N,T]=d_(C.values,u??"10000:0");d(`${N}:${T}`)}},[v,u,d]),s.jsxs(dn.teamComponents.Filter.Root,{CONSTANTS:{ICONS:e,PLP_FILTERS_TITLE:o,PLP_FILTERS:t},breadcrumb:_.length?_:[w],deleteAllFacets:g,filters:{facets:U.filterNonCategorySelected(v,m==null?void 0:m.base),selected:P},isMobile:h??!1,isLoading:x??!1,isOpen:c,price:u,onToggleFacet:S,setIsOpen:l,children:[s.jsx(dn.teamComponents.Filter.Selected,{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r}),s.jsx(dn.teamComponents.Filter.Content,{columns:2,CONSTANTS:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:n,PLP_SIZE_ORDER:i}})]})},F_=({sort:e,...t})=>{const{load:r}=Ur();return s.jsxs(__,{...t,enabled:r,children:[s.jsx(tr.Navigation,{}),s.jsx(rw,{})]})};F_.displayName="PDC.INFINITE-SCROLLER.FILTERS";const nw=({load:e,PLP_GRID_SCROLL_BACK:t})=>{const r=j.useRef(!1);j.useEffect(()=>{if(e&&!r.current){const n=sessionStorage.getItem(t.refer),o=sessionStorage.getItem(t.order);if(n==="true"){const i=document.querySelector(`[data-order="${o}"] > [class*="anchor-pdp"]`);i&&(i.scrollIntoView({behavior:"instant",block:"start"}),r.current=!0),sessionStorage.setItem(t.refer,"false")}else{const i=document.querySelectorAll('[id*="pdc-scroll-infinite"]');if(i.length>0){const c=i[i.length-1];i.length>1&&c.scrollIntoView({behavior:"instant",block:"start"}),r.current=!0}}}if(!e&&r.current){r.current=!1;const n=document.querySelector("body > main");n&&n.scrollIntoView({behavior:"instant",block:"start"})}},[e])},sw=e=>{const{constants:{PLP_GRID_SCROLL_BACK:t,ITEMS_PER_PAGE:r}}=ut(),{gap:n,columns:o}=Hr(),{load:i,pages:c}=Ur();return nw({load:i,PLP_GRID_SCROLL_BACK:t}),s.jsx("div",{className:St["pdc--grid--content"],children:s.jsxs(Dt.Root,{children:[Array.isArray(c)&&c.map(l=>s.jsx(D_,{count:r,page:l},l.page)),s.jsx(T_,{columns:o,count:r,gap:n})]})})},z_=e=>{const{state:t}=ft(),{banners:r}=zs(),{columns:n}=Hr(),{constants:{ITEMS_PER_PAGE:o,PLP_SORT_DEFAULT:i}}=ut(),{createPagesScroll:c}=Ur(),l=j.useRef(!1);return j.useEffect(()=>{if(l.current)return;const u=$o(r,50,n,o);c(t.page,u),l.current=!0},[]),s.jsxs(ap,{banners:r,children:[s.jsx(F_,{state:t,sort:i}),s.jsx(sw,{})]})};z_.displayName="PDC.InfiniteScroller";const q_=()=>{const{state:e}=ft(),{constants:{Z_INDEX_WAR:t},setOpenFilters:r}=ut(),{selectedFacets:n,onToggleFacet:o,onSort:i}=$c(),c=U.filterNonRootFacets(n,e==null?void 0:e.base);return s.jsx(Br.Root,{onSort:i,setOpenFilters:r,style:{zIndex:t.plp_navigation},children:s.jsx(Br.Selected,{callback:o,selected:c})})};q_.displayName="Navigation";const Ga=({currentPage:e,callback:t,type:r,...n})=>s.jsx(p.Button,{...n,iconNameStart:`arrow-${r}`,onClick:()=>{typeof t=="function"&&t(r==="left"?"prev":"")},size:"large",variant:"tertiary"});Ga.displayName="Arrow";const Ka=({active:e,prev:t,ellipses:r,page:n,selectedPage:o})=>s.jsxs(s.Fragment,{children:[r&&t&&s.jsx(p.Button,{size:"large",variant:"tertiary",children:"..."}),e&&s.jsx(p.Pagination.Item,{isActive:!1,index:n,variant:"tertiary",onClick:()=>{typeof o=="function"&&o(n)},children:n}),r&&!t&&s.jsx(p.Button,{size:"large",variant:"tertiary",children:"..."})]});Ka.displayName="PageEllipses";const B_=({children:e,endPage:t,page:r,total:n,selectedPage:o,ITEMS_PER_SECTION:i})=>s.jsxs(s.Fragment,{children:[s.jsx(Ka,{active:r>=i&&n>i,selectedPage:o,currentPage:r,prev:!1,ellipses:r>i&&n>i,page:1}),e,s.jsx(Ka,{active:n-r>1&&n!==t,selectedPage:o,currentPage:r,prev:!0,ellipses:t<n-1,page:n})]});B_.displayName="Pagination.Layout";const ow=(e,t,r)=>{const n=new URLSearchParams(r);return n.set(e,t),n.toString()},iw=(e,t)=>{const r=[];for(let n=e;n<=t;n++)r.push(n);return r},aw=({currentPage:e,total:t,maxVisiblePages:r,SEARCH_PAGE_ITEM_THRESHOLD:n})=>{const o=t>=n?n:t,i=Math.max(1,e===o?o-r+1:e-Math.floor(r/2)),c=Math.min(o,i+r-1);return{startPage:i,endPage:c,totalPages:o}},U_=({currentPage:e,pages:t,searchParams:r,VARIANT_PAGINATION:n})=>{const{router:o,pathname:i}=Ae();return Array.isArray(t)?t.map(c=>s.jsx(p.Pagination.Item,{isActive:e===c,index:c,variant:e===c?n.active:n.default,onClick:()=>o.push(`${i}?${ow("page",c.toString(),r)}`),children:c},c)):null};U_.displayName="Pages";const Yc=({query:e,type:t="default",searchParams:r,ITEMS_DEFAULT_SORT:n,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:i,SEARCH_PAGE_ITEM_THRESHOLD:c,VARIANT_PAGINATION:l,...u})=>{const{router:d,pathname:h}=Ae(),{state:{page:m=1}}=ft(),{pagination:{total:_}}=qs(),{endPage:g,totalPages:v,startPage:x}=aw({currentPage:m,total:_,maxVisiblePages:o,SEARCH_PAGE_ITEM_THRESHOLD:c}),S=P=>{const I=P.toString(),C=new URLSearchParams(r.toString());t==="default"&&C.set("page",I),t==="search"&&(C.set("query",e??""),C.set("count",i.toString()),C.set("page",I),n&&C.set("sort",n.replace("_",":")));const T=`${t==="search"?"/search":h}?${C.toString()}`;d.push(T)},w=P=>{S(P==="prev"?m-1:m+1)};return _?s.jsx("div",{...u,className:St["pdc--pagination"],children:s.jsx(p.Pagination.Wrapper,{adornment:{start:s.jsx(Ga,{callback:w,currentPage:m,disabled:m<2,type:"left"}),end:s.jsx(Ga,{callback:w,currentPage:m,disabled:m>=v,type:"right"})},children:s.jsx(B_,{endPage:g,page:m,selectedPage:S,total:_,ITEMS_PER_SECTION:o,children:s.jsx(U_,{currentPage:m,pages:iw(x,g),searchParams:r,VARIANT_PAGINATION:l})})})}):null};Yc.displayName="Pagination";const H_=({gap:e,isMobile:t,className:r})=>{const{state:n}=ft(),{banners:o}=zs(),{constants:i}=ut(),{ICONS:c,PRODUCT_CARD_IMAGE_ASPECT_RATIO:l,TEXTCONTENT_EXPANDED:u,TIME_ZONE:d}=i,h=o.filter(m=>Kf(m.position_grid,n.page,(n==null?void 0:n.count)??1));return Array.isArray(h)?h.map((m,_)=>s.jsx(Dt.Banner,{columns:m.columns,gap:e,isMobile:t,position_grid:m.position_grid,totalColumns:t?2:4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:l,children:s.jsx(Us,{name:"Banner Carousel",data:{banner:m,componentIndex:_},creative:"banner_grid",ICONS:c,TEXTCONTENT_EXPANDED:u,TIME_ZONE:d,className:r})},m.position_grid)):null};H_.displayName="PDC.Grid.Banners";const $_=({isMobile:e=!1,items:t,BUY_BUTTON_LABELS:r,ICONS:n,MAIN_IMAGE:o,NEWSLETTER_CONFIGS:i,NOTIFY_INFO:c,PLP_GRID_SCROLL_BACK:l,PLP_INFINITE_SCROLL:u,PLP_PRODUCT_SIMILAR_DELAY:d,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:h,PLP_SIZE_ORDER:m,PRODUCT_CARD_IMAGE_ASPECT_RATIO:_,PRODUCT_CARD_TEXTS:g,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:v,PRODUCT_IMAGE_DIMENSIONS:x,SECOND_IMAGE:S,StoreConfig_MainSellerId:w,TEXTURE_IMAGE:P,Z_INDEX_WAR:I})=>{const{banners:C}=zs(),{getAvailableProductTag:N}=jr(),{state:T}=ft(),[O,M]=j.useState(!1),[z,D]=j.useState(null),[B,G]=j.useState([]),J=j.useCallback((fe,ee)=>{const ie=ee?Ds([ee]):null;G(fe),D(ie!=null&&ie.length?ie[0]:null),M(!0)},[]),Y=e?8:16,X=(T.page-1)*((T==null?void 0:T.count)??1),Z=Dt.helpers.createGridPosAndVideo(t,C,e?2:4,T.page),he=$o(C,T.page,e?2:4);return s.jsxs(s.Fragment,{children:[s.jsxs(Dt.Root,{children:[Array.isArray(t)&&t.map((fe,ee)=>{var _e;const ie=N(fe.node.cluster.highlights);return s.jsx(Dt.Card,{gap:Y,isMobile:e??!1,item:fe.node,order:he.products[X+ee]+1,tag:ie,index:ee,setSkuSelected:J,showVideo:(_e=Z[ee])==null?void 0:_e.canPlayVideo,CONSTANTS:{BUY_BUTTON_LABELS:r,MAIN_IMAGE:o,PLP_GRID_SCROLL_BACK:l,PLP_INFINITE_SCROLL:u,PLP_PRODUCT_SIMILAR_DELAY:d,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:h,PLP_SIZE_ORDER:m,PRODUCT_CARD_IMAGE_ASPECT_RATIO:_,PRODUCT_CARD_TEXTS:g,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:v,PRODUCT_IMAGE_DIMENSIONS:x,SECOND_IMAGE:S,StoreConfig_MainSellerId:w,TEXTURE_IMAGE:P,Z_INDEX_WAR:I,ICONS:n}},fe.node.sku)}),t.length>0&&s.jsx(H_,{gap:Y,isMobile:e??!1})]}),s.jsx(Fs,{open:O,sku:z,skus:B,setSku:D,setVisible:M,ICONS:n,NEWSLETTER_CONFIGS:i,NOTIFY_INFO:c,PRODUCT_CARD_TEXTS:g,Z_INDEX_WAR:I})]})};$_.displayName="PDC.Products";const tr={Empty:Mc,Filters:g_,Grid:v_,InfiniteScroller:z_,Spinner:Lc,Navigation:q_,Notification:Fs,Pagination:Yc,Products:$_},W_=({className:e})=>{const{constants:t}=ut(),{state:r,searchParams:n}=ft(),{sendDataLayerEvent:o}=Ee(),i=j.useCallback(_=>{o({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:_.products}}})},[o]),{ITEMS_DEFAULT_SORT:c,ITEMS_PER_SECTION:l,ITEMS_PER_PAGE:u,PLP_INFINITE_SCROLL:d,SEARCH_PAGE_ITEM_THRESHOLD:h,VARIANT_PAGINATION:m}=t;return s.jsx("div",{className:p.helpers.classNameConcat(St.pdc,e),children:d===!0?s.jsx("div",{className:St["pdc--grid"],children:s.jsx(tr.Grid,{infinite:!0})}):s.jsxs(s.Fragment,{children:[s.jsxs(__,{state:r,children:[s.jsx(tr.Navigation,{}),s.jsx(tr.Filters,{})]}),s.jsxs(Wc,{callback:i,state:r,queryKey:["products",String(r==null?void 0:r.page),r.sort,JSON.stringify(Object.entries(r.facets??{}).sort())],options:{gcTime:1e3*60*30,staleTime:1e3*60*5,refetchOnWindowFocus:!1},children:[s.jsx("div",{className:St["pdc--grid"],children:s.jsx("div",{className:St["pdc--grid--content"],children:s.jsx(tr.Grid,{})})}),s.jsx(tr.Pagination,{searchParams:n,ITEMS_DEFAULT_SORT:c,ITEMS_PER_SECTION:l,ITEMS_PER_PAGE:u,SEARCH_PAGE_ITEM_THRESHOLD:h,VARIANT_PAGINATION:m})]})]})})};W_.displayName="Templates.PDC";const V_=j.createContext({}),cw=({children:e,...t})=>s.jsx(V_.Provider,{value:t,children:e}),ti=()=>{const e=j.useContext(V_);if(e===void 0)throw new Error("useSearchConstants must be used within a SearchConstantsProvider");return e},lw="_grid_e75z7_21",uw="_navigation_e75z7_44",dw="_spinner_e75z7_70",fw="_sort_e75z7_76",qr={"rearch-result--empty":"_rearch-result--empty_e75z7_1",grid:lw,"grid-header":"_grid-header_e75z7_37",navigation:uw,"result-disclaimer":"_result-disclaimer_e75z7_51",spinner:dw,sort:fw,"search-result":"_search-result_e75z7_91"},G_=({term:e})=>{const{router:t}=Ae(),{SEARCH_RESULT:r,ICONS:n}=ti(),o=()=>{t.push(r.EMPTY.ALL_TERMS)};return s.jsxs("div",{className:qr["rearch-result--empty"],children:[s.jsxs(p.TextStructure.DivWrapper,{children:[s.jsx("div",{className:U.responsive["responsive-desktop-flex"],children:s.jsx("h2",{className:"typography-style-heading-sm",children:r.EMPTY.NOT_FOUND})}),s.jsx("div",{className:U.responsive["responsive-mobile-flex"],children:s.jsx("h2",{className:"typography-style-body-md",children:r.EMPTY.NOT_FOUND})}),s.jsxs("p",{children:[r.EMPTY.NOT_FOUND_P," ",`"${e}"`]})]}),s.jsx(p.Button,{onClick:()=>o(),variant:"tertiary",size:"medium",adornment:{end:s.jsx(p.Icon,{name:n.arrow_right,size:"medium"})},children:r.EMPTY.ALL_TERMS_LABEL})]})};G_.displayName="RearchResult.Empty";const pw=e=>s.jsxs(s.Fragment,{children:[s.jsx("div",{className:U.responsive["responsive-desktop-flex"],children:s.jsx("h2",{className:"typography-style-heading-sm",children:e.SEARCH.SEARCHING})}),s.jsx("div",{className:U.responsive["responsive-mobile-flex"],children:s.jsx("h2",{className:"typography-style-body-md",children:e.SEARCH.SEARCHING})}),s.jsx(p.Spinner,{className:qr.spinner})]}),hw=(e,t,r)=>s.jsxs(s.Fragment,{children:[s.jsx("div",{className:U.responsive["responsive-desktop-flex"],children:s.jsx("h2",{className:"typography-style-heading-sm",children:t.SEARCH.SEARCHED})}),s.jsx("div",{className:U.responsive["responsive-mobile-flex"],children:s.jsx("h2",{className:"typography-style-body-md",children:t.SEARCH.SEARCHED})}),s.jsxs("p",{children:[t.SEARCH.SEARCHED_P_START," ",e," ",t.SEARCH.SEARCHED_P_END," ",`"${r}"`]})]}),K_=({isLoading:e,quantity:t,term:r})=>{const{SEARCH_RESULT:n}=ti();return s.jsx(p.TextStructure.DivWrapper,{children:e?pw(n):hw(t,n,r)})};K_.displayName="Search.Loading";const mw=({term:e})=>{const[t,r]=j.useState(!1),{router:n}=Ae(),{searchParams:o}=ft(),{ITEMS_DEFAULT_SORT:i,ITEMS_PER_PAGE:c,ICONS:l}=ti(),u=d=>{U.navigateToSearchPage(n,e,c,1,d??i)};return s.jsx("div",{className:qr.sort,children:s.jsx(Xo,{handleSelectValue:d=>u(d??"release_desc"),sortListOpen:t,setSortListOpen:r,searchParams:o,ICONS:l})})},_w=({query:e})=>{const{isLoading:t,products:r,pagination:n}=qs();return s.jsxs("div",{className:qr["grid-header"],children:[s.jsxs("div",{className:qr.navigation,children:[!t&&(r!=null&&r.length)?s.jsx(mw,{term:e}):null,s.jsx(p.Utils.Divider,{})]}),!t&&(r!=null&&r.length)?s.jsx("div",{className:qr["result-disclaimer"],children:s.jsx(K_,{term:e,isLoading:t,quantity:n.count})}):null]})},Q_=({isMobile:e=!1,items:t,BUY_BUTTON_LABELS:r,ICONS:n,MAIN_IMAGE:o,NEWSLETTER_CONFIGS:i,NOTIFY_INFO:c,PLP_GRID_SCROLL_BACK:l,PLP_INFINITE_SCROLL:u,PLP_PRODUCT_SIMILAR_DELAY:d,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:h,PLP_SIZE_ORDER:m,PRODUCT_CARD_IMAGE_ASPECT_RATIO:_,PRODUCT_CARD_TEXTS:g,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:v,PRODUCT_IMAGE_DIMENSIONS:x,SECOND_IMAGE:S,StoreConfig_MainSellerId:w,TEXTURE_IMAGE:P,Z_INDEX_WAR:I})=>{const{getAvailableProductTag:C}=jr(),{state:N}=ft(),[T,O]=j.useState(!1),[M,z]=j.useState(null),[D,B]=j.useState([]),G=j.useCallback((Z,he)=>{const fe=he?Ds([he]):null;B(Z),z(fe!=null&&fe.length?fe[0]:null),O(!0)},[]),J=e?8:16,Y=(N.page-1)*((N==null?void 0:N.count)??1),X=Dt.helpers.createGridPosAndVideo(t,[],e?2:4,N.page);return s.jsxs(s.Fragment,{children:[s.jsx(Dt.Root,{children:Array.isArray(t)&&t.map((Z,he)=>{var ee,ie;const fe=C(Z.node.cluster.highlights);return s.jsx(Dt.Card,{gap:J,isMobile:e??!1,item:Z.node,order:Y+(((ee=X[he])==null?void 0:ee.position)??0),tag:fe,index:he,setSkuSelected:G,showVideo:(ie=X[he])==null?void 0:ie.canPlayVideo,CONSTANTS:{BUY_BUTTON_LABELS:r,MAIN_IMAGE:o,PLP_GRID_SCROLL_BACK:l,PLP_INFINITE_SCROLL:u,PLP_PRODUCT_SIMILAR_DELAY:d,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:h,PLP_SIZE_ORDER:m,PRODUCT_CARD_IMAGE_ASPECT_RATIO:_,PRODUCT_CARD_TEXTS:g,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:v,PRODUCT_IMAGE_DIMENSIONS:x,SECOND_IMAGE:S,StoreConfig_MainSellerId:w,TEXTURE_IMAGE:P,Z_INDEX_WAR:I,ICONS:n}},Z.node.sku)})}),s.jsx(Fs,{open:T,sku:M,skus:D,setSku:z,setVisible:O,ICONS:n,NEWSLETTER_CONFIGS:i,NOTIFY_INFO:c,PRODUCT_CARD_TEXTS:g,Z_INDEX_WAR:I})]})};Q_.displayName="PDC.Products";const Y_=({isMobile:e=!1,query:t})=>{const{isLoading:r,products:n,pagination:o}=qs(),{searchParams:i}=ft(),c=ti(),l=j.useMemo(()=>!r&&n.length>0&&o.count>0,[r,n.length,o.count]);return s.jsxs("div",{className:qr.grid,children:[l&&s.jsx(_w,{query:t}),!r&&(n!=null&&n.length)?s.jsx(Q_,{...c,isMobile:e??!1,items:n}):null,(n==null?void 0:n.length)===0&&!r?s.jsx(G_,{term:t}):null,l&&s.jsx(Yc,{searchParams:i,...c})]})};Y_.displayName="SearchResultContent";const gw=({className:e})=>{const{state:t}=ft(),{sendDataLayerEvent:r}=Ee(),{isMobile:n}=xe(),o=j.useCallback(i=>{var c;r({functionKey:"readyEvents",data:{event:"view_search_results",readyData:{search_term:t==null?void 0:t.query,search_found:((c=i==null?void 0:i.products)==null?void 0:c.length)>0}}})},[r,t==null?void 0:t.query]);return s.jsx(Wc,{callback:i=>o(i),forceUpdate:!1,queryKey:["search",t.query,t.term??"",String(t.page),t.sort],options:{gcTime:1e3*60*30,staleTime:1e3*60*5,refetchOnWindowFocus:!1},state:t,children:s.jsx("div",{className:p.helpers.classNameConcat(qr["search-result"],e),children:s.jsx(Y_,{currentPage:t.page,isMobile:n??!1,query:t.term??""})})})},yw=new Ff,X_=({className:e,searchParams:t,CONSTANTS:r})=>{const n=new URLSearchParams(t??""),o=String((n==null?void 0:n.get("query"))??""),i=Number((n==null?void 0:n.get("count"))??0),c=Number((n==null?void 0:n.get("page"))??0),l=String((n==null?void 0:n.get("sort"))??"");return s.jsx(qf,{client:yw,children:s.jsx(cw,{...r,children:s.jsx(bc,{state:{sort:l,query:o,base:"",facets:[],term:o,page:c,count:i},searchParams:n,children:s.jsx(gw,{className:e})})})})};X_.displayName="Search";const vw=({page:e,data:t})=>{const{pathname:r}=Ae(),n=j.useRef(null),{sendDataLayerEvent:o,currentLocalRef:i,itemListRef:c,promotionEventRef:l}=Ee();return j.useEffect(()=>{const u=Yf("login_event")||"{}",d=JSON.parse(u);if(d.name||d.method){const h=new Date(0);o({functionKey:"readyEvents",data:{event:d.name,readyData:{method:d.method}}}),wc("login_event","",{expires:h})}},[]),j.useEffect(()=>{if(n.current===r)return;n.current=r;let u={};switch(e){case"PDP":{const h=t,m={};if(!h){u={page_category:"pdp"};break}h.items.forEach(({itemId:_,sellers:g})=>m[_]=g[0].commertialOffer.AvailableQuantity),u={page_category:"pdp",seller_ids:h.items.map(({sellers:_})=>_[0].sellerId).join(),skuStocks:m,product_reference_id:h.productReference};break}case"PDC":{const{page_category:h,page_departament:m,id:_,name:g}=Kd(),v=g,x=_;u={page_category:"lista_produtos",...m&&{page_departament:m}},c.current={item_list_name:r==="/search"?"busca":v??void 0,item_list_id:r==="/search"?void 0:x??void 0},m&&o({functionKey:"readyEvents",data:{event:"view_category",readyData:{page_category:h,page_departament:m}}});break}default:u={page_category:e},l.current={},c.current={};break}const d={region:e,...u};i.current=e,o({functionKey:"readyEvents",data:{readyData:{vtex_version:"fast",...d}},timeout:0})},[r]),null};var Qa={exports:{}},Io={exports:{}},_d;function xw(){return _d||(_d=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(u,d){for(var h in d)Object.defineProperty(u,h,{enumerable:!0,get:d[h]})}r(t,{DOMAttributeNames:function(){return n},default:function(){return l},isEqualNode:function(){return i}});const n={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function o(u){let{type:d,props:h}=u;const m=document.createElement(d);for(const v in h){if(!h.hasOwnProperty(v)||v==="children"||v==="dangerouslySetInnerHTML"||h[v]===void 0)continue;const x=n[v]||v.toLowerCase();d==="script"&&(x==="async"||x==="defer"||x==="noModule")?m[x]=!!h[v]:m.setAttribute(x,h[v])}const{children:_,dangerouslySetInnerHTML:g}=h;return g?m.innerHTML=g.__html||"":_&&(m.textContent=typeof _=="string"?_:Array.isArray(_)?_.join(""):""),m}function i(u,d){if(u instanceof HTMLElement&&d instanceof HTMLElement){const h=d.getAttribute("nonce");if(h&&!u.getAttribute("nonce")){const m=d.cloneNode(!0);return m.setAttribute("nonce",""),m.nonce=h,h===u.nonce&&u.isEqualNode(m)}}return u.isEqualNode(d)}let c;process.env.__NEXT_STRICT_NEXT_HEAD?c=(u,d)=>{const h=document.querySelector("head");if(!h)return;const m=h.querySelectorAll('meta[name="next-head"]')||[],_=[];if(u==="meta"){const x=h.querySelector("meta[charset]");x&&_.push(x)}for(let x=0;x<m.length;x++){var g;const w=m[x].nextSibling;(w==null||(g=w.tagName)==null?void 0:g.toLowerCase())===u&&_.push(w)}const v=d.map(o).filter(x=>{for(let S=0,w=_.length;S<w;S++){const P=_[S];if(i(P,x))return _.splice(S,1),!1}return!0});_.forEach(x=>{var S;const w=x.previousSibling;if(w&&w.getAttribute("name")==="next-head"){var P;(P=x.parentNode)==null||P.removeChild(w)}(S=x.parentNode)==null||S.removeChild(x)}),v.forEach(x=>{var S;const w=document.createElement("meta");w.name="next-head",w.content="1",((S=x.tagName)==null?void 0:S.toLowerCase())==="meta"&&x.getAttribute("charset")||h.appendChild(w),h.appendChild(x)})}:c=(u,d)=>{const h=document.getElementsByTagName("head")[0],m=h.querySelector("meta[name=next-head-count]");if(process.env.NODE_ENV!=="production"&&!m){console.error("Warning: next-head-count is missing. https://nextjs.org/docs/messages/next-head-count-missing");return}const _=Number(m.content),g=[];for(let S=0,w=m.previousElementSibling;S<_;S++,w=(w==null?void 0:w.previousElementSibling)||null){var v;(w==null||(v=w.tagName)==null?void 0:v.toLowerCase())===u&&g.push(w)}const x=d.map(o).filter(S=>{for(let w=0,P=g.length;w<P;w++){const I=g[w];if(i(I,S))return g.splice(w,1),!1}return!0});g.forEach(S=>{var w;return(w=S.parentNode)==null?void 0:w.removeChild(S)}),x.forEach(S=>h.insertBefore(S,m)),m.content=(_-g.length+x.length).toString()};function l(){return{mountedInstances:new Set,updateHead:u=>{const d={};u.forEach(_=>{if(_.type==="link"&&_.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+_.props["data-href"]+'"]'))return;_.props.href=_.props["data-href"],_.props["data-href"]=void 0}const g=d[_.type]||[];g.push(_),d[_.type]=g});const h=d.title?d.title[0]:null;let m="";if(h){const{children:_}=h.props;m=typeof _=="string"?_:Array.isArray(_)?_.join(""):""}m!==document.title&&(document.title=m),["meta","base","link","style","script"].forEach(_=>{c(_,d[_]||[])})}}}(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)}(Io,Io.exports)),Io.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function r(T,O){for(var M in O)Object.defineProperty(T,M,{enumerable:!0,get:O[M]})}r(t,{default:function(){return N},handleClientScriptLoad:function(){return S},initScriptLoader:function(){return I}});const n=Ct,o=hn,i=s,c=n._(uc),l=o._(j),u=Wm(),d=xw(),h=$p(),m=new Map,_=new Set,g=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],v=T=>{if(c.default.preinit){T.forEach(O=>{c.default.preinit(O,{as:"style"})});return}if(typeof window<"u"){let O=document.head;T.forEach(M=>{let z=document.createElement("link");z.type="text/css",z.rel="stylesheet",z.href=M,O.appendChild(z)})}},x=T=>{const{src:O,id:M,onLoad:z=()=>{},onReady:D=null,dangerouslySetInnerHTML:B,children:G="",strategy:J="afterInteractive",onError:Y,stylesheets:X}=T,Z=M||O;if(Z&&_.has(Z))return;if(m.has(O)){_.add(Z),m.get(O).then(z,Y);return}const he=()=>{D&&D(),_.add(Z)},fe=document.createElement("script"),ee=new Promise((ie,_e)=>{fe.addEventListener("load",function(Ce){ie(),z&&z.call(this,Ce),he()}),fe.addEventListener("error",function(Ce){_e(Ce)})}).catch(function(ie){Y&&Y(ie)});B?(fe.innerHTML=B.__html||"",he()):G?(fe.textContent=typeof G=="string"?G:Array.isArray(G)?G.join(""):"",he()):O&&(fe.src=O,m.set(O,ee));for(const[ie,_e]of Object.entries(T)){if(_e===void 0||g.includes(ie))continue;const Ce=d.DOMAttributeNames[ie]||ie.toLowerCase();fe.setAttribute(Ce,_e)}J==="worker"&&fe.setAttribute("type","text/partytown"),fe.setAttribute("data-nscript",J),X&&v(X),document.body.appendChild(fe)};function S(T){const{strategy:O="afterInteractive"}=T;O==="lazyOnload"?window.addEventListener("load",()=>{(0,h.requestIdleCallback)(()=>x(T))}):x(T)}function w(T){document.readyState==="complete"?(0,h.requestIdleCallback)(()=>x(T)):window.addEventListener("load",()=>{(0,h.requestIdleCallback)(()=>x(T))})}function P(){[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(O=>{const M=O.id||O.getAttribute("src");_.add(M)})}function I(T){T.forEach(S),P()}function C(T){const{id:O,src:M="",onLoad:z=()=>{},onReady:D=null,strategy:B="afterInteractive",onError:G,stylesheets:J,...Y}=T,{updateScripts:X,scripts:Z,getIsSsr:he,appDir:fe,nonce:ee}=(0,l.useContext)(u.HeadManagerContext),ie=(0,l.useRef)(!1);(0,l.useEffect)(()=>{const Ce=O||M;ie.current||(D&&Ce&&_.has(Ce)&&D(),ie.current=!0)},[D,O,M]);const _e=(0,l.useRef)(!1);if((0,l.useEffect)(()=>{_e.current||(B==="afterInteractive"?x(T):B==="lazyOnload"&&w(T),_e.current=!0)},[T,B]),(B==="beforeInteractive"||B==="worker")&&(X?(Z[B]=(Z[B]||[]).concat([{id:O,src:M,onLoad:z,onReady:D,onError:G,...Y}]),X(Z)):he&&he()?_.add(O||M):he&&!he()&&x(T)),fe){if(J&&J.forEach(Ce=>{c.default.preinit(Ce,{as:"style"})}),B==="beforeInteractive")return M?(c.default.preload(M,Y.integrity?{as:"script",integrity:Y.integrity,nonce:ee,crossOrigin:Y.crossOrigin}:{as:"script",nonce:ee,crossOrigin:Y.crossOrigin}),(0,i.jsx)("script",{nonce:ee,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([M,{...Y,id:O}])+")"}})):(Y.dangerouslySetInnerHTML&&(Y.children=Y.dangerouslySetInnerHTML.__html,delete Y.dangerouslySetInnerHTML),(0,i.jsx)("script",{nonce:ee,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...Y,id:O}])+")"}}));B==="afterInteractive"&&M&&c.default.preload(M,Y.integrity?{as:"script",integrity:Y.integrity,nonce:ee,crossOrigin:Y.crossOrigin}:{as:"script",nonce:ee,crossOrigin:Y.crossOrigin})}return null}Object.defineProperty(C,"__nextScript",{value:!0});const N=C;(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)})(Qa,Qa.exports);var bw=Qa.exports,jw=bw;const Xc=U.getDefaultExportFromCjs(jw),Sw=({children:e,ONE_TRUST:t})=>s.jsxs(s.Fragment,{children:[s.jsx(Xc,{src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",defer:!0,strategy:"afterInteractive","data-domain-script":t.siteId,type:"text/javascript"}),e]}),Cw=Bh(()=>Promise.resolve(Sw),{ssr:!1}),ww="_lgpd_vffd3_82",Ew="_success_vffd3_248",Iw="_error_vffd3_312",Ye={"newsletter-root":"_newsletter-root_vffd3_1","has-border-top":"_has-border-top_vffd3_9","has-border-bottom":"_has-border-bottom_vffd3_12","newsletter-container":"_newsletter-container_vffd3_20","content-text":"_content-text_vffd3_35","form-wrapper":"_form-wrapper_vffd3_39","newsletter-container-banner":"_newsletter-container-banner_vffd3_64",lgpd:ww,"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:Ew,"text-structure-modifier":"_text-structure-modifier_vffd3_257","success-title":"_success-title_vffd3_297","close-button":"_close-button_vffd3_302",error:Iw,"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"},J_=({invalid_message:e,master_data_field:t,placeholder:r,required:n=!1,CONSTANTS:o})=>{const{isMobile:i}=xe(),{inputsStatus:c,setInputsStatus:l,setFormStatus:u,variant:d}=Pc();return s.jsx(p.TextField.Structure,{className:`${Ye["textfield-structure-modifier"]} ${d}`,input:s.jsx(p.TextField.Input,{mode:"simple",label:r,sizeVariant:i?o.NEWSLETTER_CONFIGS.interactionSizeMob:o.NEWSLETTER_CONFIGS.interactionSizeDesk,name:t,className:`${Ye["input-wrapper-modifier"]} ${d}`,feedback:c[t]==="required"?"error":c[t],onChange:()=>{c[t]!=="none"&&(l(h=>({...h,[t]:"none"})),u("idle"))},required:n}),supportText:c[t]==="error"||c[t]==="required"?s.jsx("div",{className:d==="horizontal"?Ye["support-text-modifier"]:"",children:s.jsx(p.TextField.SupportText,{text:c[t]==="error"?e??o.NEWSLETTER_CONFIGS.messages.invalid_generic:o.NEWSLETTER_CONFIGS.messages.required_field,feedback:"error"})}):null})};J_.displayName="Newsletter.Input";const Z_=({formStatus:e,fields:t,CONSTANTS:r})=>s.jsxs(s.Fragment,{children:[Array.isArray(t)&&t.map((n,o)=>s.jsx(J_,{invalid_message:n.invalid_message,master_data_field:n.master_data_field,placeholder:n.placeholder,required:n.required,type:n.type,CONSTANTS:r},`nt-field-${n.master_data_field}-${o}`)),e==="error"&&s.jsx("div",{className:Ye.error,children:s.jsx("p",{children:r.NEWSLETTER_CONFIGS.form.status.error})})]});Z_.displayName="Newsletter.FormFields";const eg=({formStatus:e,CONSTANTS:t,...r})=>{const{isMobile:n}=xe();return s.jsxs(p.Button,{...r,className:Ye["submit-btn"],disabled:e==="success",size:n?"medium":"large",children:[s.jsx("span",{"data-loading":e==="loading","data-label":!0,children:t.NEWSLETTER_CONFIGS.submitLabel}),t.NEWSLETTER_CONFIGS.hasLoadingState&&e==="loading"&&s.jsx(p.Spinner,{className:Ye["loading-spinner"],size:"small"})]})};eg.displayName="Newsletter.SubmitButton";const tg=({checkboxRef:e,formStatus:t,setFormStatus:r,CONSTANTS:n})=>{const o=i=>{i.target.checked?(e.current=!0,t==="unchecked"&&r("idle")):e.current=!1};return s.jsxs(s.Fragment,{children:[s.jsx(p.Checkbox,{adornment:s.jsx(p.Icon,{name:n.ICONS.check,size:"x-small"}),defaultChecked:e.current,disabled:t==="success",name:"terms-and-conditions",label:n.NEWSLETTER_CONFIGS.messages.accept_terms_and_conditions,onChange:o,sizeVariant:"small",className:Ye["terms-and-conditions-checkbox"]}),t==="unchecked"&&s.jsx("div",{className:Ye["terms-and-conditions-unchecked"],children:s.jsx(p.TextStructure.Root,{adornment:{start:s.jsx(p.Icon,{name:n.ICONS.alert_circle,size:"small"})},children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("p",{children:n.NEWSLETTER_CONFIGS.messages.terms_and_conditions_not_accepted})})})})]})};tg.displayName="Newsletter.Terms";const rg=({title:e,description:t,CONSTANTS:r})=>s.jsx("div",{className:Ye.success,children:s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{className:Ye["text-structure-modifier"],children:[s.jsxs("div",{className:Ye["success-title"],children:[s.jsx(p.Icon,{name:r.ICONS.check_circle,size:"medium"}),s.jsx("h3",{children:e})]}),s.jsx("p",{children:t})]})})});rg.displayName="Newsletter.Success";const ng=({formPayloadOptionals:e,masterDataEntity:t,banner:r,termsDescription:n,lgpdLinkLable:o,lgpdLink:i,variant:c,CONSTANTS:l})=>{const{checkboxRef:u,fields:d,formStatus:h,hasTermsAndConditions:m,handleClickToSubmit:_,handleSubmit:g,setFormStatus:v}=Pc();return s.jsx(s.Fragment,{children:h==="success"?s.jsx(rg,{description:l.NEWSLETTER_CONFIGS.messages.success_description,title:l.NEWSLETTER_CONFIGS.messages.success_title,CONSTANTS:l}):s.jsxs(s.Fragment,{children:[s.jsxs("form",{className:Ye["form-wrapper"],onSubmit:x=>g(x,e,t),children:[s.jsx(Z_,{formStatus:h,fields:d,CONSTANTS:l}),m&&s.jsx(tg,{checkboxRef:u,formStatus:h,setFormStatus:v,CONSTANTS:l}),s.jsx(eg,{formStatus:h,type:"submit",variant:"primary",onClick:_,CONSTANTS:l})]}),(r||c==="vertical")&&s.jsxs("div",{className:Ye.lgpd,children:[n&&s.jsx("p",{children:n}),o&&s.jsx(wt,{href:i,children:o})]})]})})};ng.displayName="Newsletter.Form";const Pw=["horizontal","vertical"],Jc=({className:e,description:t,formPayloadOptionals:r,fields:n,masterDataEntity:o,masterDataEmailField:i,masterDataNameField:c,banner:l,altBanner:u,bannerBackground:d,termsDescription:h,lgpdLinkLable:m,lgpdLink:_,title:g,variant:v,borderTop:x,borderBottom:S,CONSTANTS:w,actionName:P="cadastrou-newsletter",originName:I="",...C})=>{if(!i||!c)return null;const N=p.helpers.ValidateProp({fieldTypes:Pw,property:v,fallback:"horizontal"});return s.jsxs("div",{className:l?d?Ye["banner-background"]:Ye["newsletter-wrapper"]:"",children:[l&&s.jsx(p.Banner.Container,{className:Ye["banner-container"],children:s.jsx(p.Banner.ImageWrapper,{children:s.jsx(at.Image,{src:l,alt:u,width:"1920",height:"500"})})}),s.jsx("div",{className:l?Ye["newsletter-provider-wrapper"+(d?"-background":"")]:"",children:s.jsx(yp,{dito:{actionName:P,originName:I},fields:n,masterDataEmailField:i,masterDataNameField:c,variant:N,CONSTANTS:w,children:s.jsx("div",{...C,className:p.helpers.classNameConcat(Ye["newsletter-root"+(l||N==="vertical"?"-banner":"")],[x&&Ye["has-border-top"],S&&Ye["has-border-bottom"],e].filter(Boolean)),"data-variant":N,children:s.jsxs("div",{className:l||N==="vertical"?Ye["newsletter-container-banner"]:Ye["newsletter-container"],children:[s.jsxs("div",{className:Ye["content-text"],children:[s.jsx("h2",{children:g}),s.jsx("p",{children:t}),!l&&N==="horizontal"&&s.jsxs("div",{className:Ye.lgpd,children:[s.jsx("p",{children:h}),m&&s.jsx(wt,{target:"_blank",href:_,children:m})]})]}),s.jsx(ng,{formPayloadOptionals:r,masterDataEntity:o,CONSTANTS:w,banner:l,lgpdLink:_,lgpdLinkLable:m,termsDescription:h,variant:N})]})})})})]})};Jc.displayName="Newsletter";const sg=({children:e,...t})=>s.jsx("div",{...t,children:e});sg.displayName="CallToAction";const Nw="_wrapper_aejhu_1",Rw="_body_aejhu_8",Bo={wrapper:Nw,body:Rw,"wrapper-body":"_wrapper-body_aejhu_16","accordion-modifier":"_accordion-modifier_aejhu_32"},Tw=({children:e,className:t,...r})=>s.jsx("div",{...r,className:p.helpers.classNameConcat(Bo.wrapper,t),children:e}),Ow=({data:e,ICONS:t})=>{const[r,n]=j.useState(null),o=c=>{n(l=>l===c?null:c)},{router:i}=Ae();return s.jsx("div",{className:p.helpers.classNameConcat(Bo.body),children:Array.isArray(e)&&(e==null?void 0:e.map((c,l)=>{var m;const u=r===c.id,d=c.buttonHref&&c.buttonHref!=="#",h=c.buttonHref&&c.type==="button"&&d?{onClick:()=>{var _;if((_=c.buttonHref)!=null&&_.startsWith("/")){i.push(c.buttonHref);return}window.open(c.buttonHref,"_blank")}}:{};return s.jsx("div",{children:c.type==="button"?s.jsxs(s.Fragment,{children:[s.jsx(p.Button,{variant:"tertiary",mode:c.buttonMode??"default",size:c.buttonSize??"medium",iconNameStart:t[c.buttonIcon]??c.buttonIcon,...h,style:{marginTop:16},children:c.buttonLabel}),s.jsx(p.Utils.Divider,{direction:"horizontal",size:"small",style:{height:16}})]}):s.jsxs(p.Accordion.Wrapper,{className:p.helpers.classNameConcat(Bo["accordion-modifier"]),children:[s.jsx(p.Accordion.Header,{id:`${l}-${c.title}`,closeIndicator:u?s.jsx(p.Icon,{name:t.arrow_up,size:"medium"}):void 0,openIndicator:u?void 0:s.jsx(p.Icon,{name:t.arrow_down,size:"medium"}),title:"accordion-header",onClick:()=>o(c.id),children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h2",{className:"typography-style-body-sm",children:c.title})})})}),s.jsx(p.Accordion.Body,{title:"accordion-body",children:s.jsx(p.TextStructure.Root,{children:u&&s.jsxs(p.TextStructure.DivWrapper,{children:[c.subtitle?s.jsx("h3",{className:"typography-style-body-md",children:c.subtitle}):s.jsx(s.Fragment,{}),s.jsx("p",{className:"typography-style-caption",children:c.description}),c.buttonLabel&&c.buttonHref?s.jsx(wt,{href:c.buttonHref??"#",mode:c.buttonMode??"default",size:c.buttonSize??"medium",adornments:(m=c.buttonIcon)!=null&&m.length?{end:s.jsx(p.Icon,{name:t[c.buttonIcon]??c.buttonIcon})}:void 0,children:c.buttonLabel}):s.jsx(s.Fragment,{})]})})})]})},c.id)}))})},Aw=({className:e,data:t,ICONS:r,...n})=>{const[o,i]=j.useState(!1),[c,l]=j.useState(null);j.useEffect(()=>{!o&&!c&&t&&l(t)},[o,c]);const u=j.useCallback(()=>{i(d=>!d)},[]);return c?s.jsxs(Tw,{...n,className:e,children:[s.jsx("div",{className:Bo["wrapper-body"],hidden:!o,children:o&&s.jsx(Ow,{data:c.content,ICONS:r})}),s.jsx(sg,{children:s.jsx("div",{onClick:u,children:o?s.jsx(p.Button,{iconNameEnd:r.close,size:(c==null?void 0:c.helpButtonSize)??"x-large"}):s.jsx(p.Button,{iconNameStart:(c==null?void 0:c.iconLabel)??r.help,size:(c==null?void 0:c.helpButtonSize)??"x-large",children:c==null?void 0:c.label})})})]}):s.jsx(s.Fragment,{})},kw="_formContainer_zwlly_1",Mw="_formFieldGroup_zwlly_6",Lw="_formFieldGroupName_zwlly_10",Dw="_formFieldWrapper_zwlly_20",Fw="_formFieldInput_zwlly_30",zw="_success_zwlly_73",qw="_button_zwlly_110",Bw="_error_zwlly_114",hr={formContainer:kw,formFieldGroup:Mw,formFieldGroupName:Lw,formFieldWrapper:Dw,formFieldInput:Fw,success:zw,"text-structure-modifier":"_text-structure-modifier_zwlly_85",button:qw,error:Bw},Uw=({group:e,children:t,className:r})=>s.jsx(s.Fragment,{children:s.jsxs("div",{className:p.helpers.classNameConcat(hr.formFieldGroup,r),children:[s.jsx("h1",{className:hr.formFieldGroupName,children:e.groupLabel}),t]},e.groupLabel)}),og=j.createContext({});function ig({children:e,groups:t,masterDataEntity:r,postFn:n,actionName:o="",originName:i="",POPUP_SUBMITTED_STORAGE:c}){const[l,u]=j.useState(!1),[d,h]=j.useState({}),[m,_]=j.useState([]),[g,v]=j.useState("idle"),[x,S]=j.useState(""),w=({target:{name:I,value:C}})=>{h({...d,[I]:C})},P=I=>{I.preventDefault(),n({body:{masterDataEntity:r,payload:d}}).then(async({Message:C})=>{if(C){const T=C.match(/'(.*?[^\\])'/g)||[];var N="-";for(const O of T){const M=O.substring(1,O.length-1),D=t.flatMap(B=>B.fields).find(({name:B})=>B===M);S(M),D&&(N=D.name)}return v("error"),_([N])}if(d.email){const T=await mp(d.email||""),O=new Date().toISOString();_p([{user_id:T,timestamp:O,type:"IDENTIFY",traits:{id:T,created_at:O,name:d.name,email:d.email,phone:d==null?void 0:d.phone}},{action:o,timestamp:O,type:"TRACK",user_id:T,context:{user_agent:navigator.userAgent},properties:{custom_data:{email:d.email,nome:d.name,origem:i,...d}}}])}return window.localStorage.setItem(c,"true"),h({}),u(!0),v("success"),_([])})};return s.jsx(og.Provider,{value:{formErrors:m,handleInputChange:w,submitForm:P,formData:d,status:g,fieldMessage:x,success:l,setSuccess:u},children:e})}function ri(){return j.useContext(og)}const Hw=({fields:e,className:t})=>{const{formData:r,handleInputChange:n,formErrors:o}=ri();return s.jsx("div",{className:p.helpers.classNameConcat(hr.formFieldWrapper,t),children:e.map(({label:i,name:c,required:l,width:u="medium"})=>s.jsx(p.TextField.Input,{label:`${i}${l?"*":""}`,title:c,value:r[c]||"",name:c,sizeVariant:"large",onChange:n,required:l,feedback:o.includes(c)?"error":"none",className:hr.formFieldInput,"data-inputsize":u},c))})},$w=({FORM_CONFIGS:e,ICONS:t})=>{const{router:r}=Ae();return s.jsxs("div",{className:hr.success,children:[s.jsx(p.TextStructure.Root,{adornment:{start:s.jsx(p.Icon,{name:t.check_circle,size:"medium"})},children:s.jsx(p.TextStructure.DivWrapper,{className:hr["text-structure-modifier"],children:s.jsx("p",{children:e.successMessage})})}),s.jsx(p.Button,{size:"large",onClick:()=>r.push("/"),className:hr.button,children:e.returnButton})]})},Ww=({FORM_CONFIGS:e,ICONS:t})=>{const{fieldMessage:r}=ri();return s.jsx("div",{className:hr.error,children:s.jsx(p.TextStructure.Root,{adornment:{start:s.jsx(p.Icon,{name:t.delete_circle,size:"small"})},children:s.jsx(p.TextStructure.DivWrapper,{className:hr["text-structure-modifier"],children:s.jsxs("p",{children:[e.errorMessage,r]})})})})},Vw=({children:e,className:t,ICONS:r,FORM_CONFIGS:n})=>{const{submitForm:o,status:i}=ri();return s.jsx("form",{onSubmit:o,className:p.helpers.classNameConcat(hr.formContainer,t),children:i==="success"?s.jsx($w,{ICONS:r,FORM_CONFIGS:n}):s.jsxs(s.Fragment,{children:[e,i==="error"&&s.jsx(Ww,{ICONS:r,FORM_CONFIGS:n})]})})},Gw=e=>{const{children:t,className:r}=e;return s.jsx(ig,{...e,children:s.jsx(Vw,{ICONS:e.ICONS,FORM_CONFIGS:e.FORM_CONFIGS,className:r,children:t})})},zn={Root:Gw,FieldGroup:Uw,FieldWrapper:Hw},Kw="_button_1e35m_39",Qr={"banner-container":"_banner-container_1e35m_1","banner-background":"_banner-background_1e35m_6","form-root":"_form-root_1e35m_15",button:Kw,"form-fied-wrapper":"_form-fied-wrapper_1e35m_52"};function Qw({content:e,sections:t,FORM_CONFIGS:r,ICONS:n,postFn:o,POPUP_SUBMITTED_STORAGE:i}){var u;const{isMobile:c}=xe(),l=((u=t.find(({name:d})=>d==="Form"))==null?void 0:u.data)||{};return s.jsx("div",{children:s.jsxs(p.Banner.Container,{className:Qr["banner-container"],children:[s.jsx(p.Banner.ImageWrapper,{children:s.jsx(at.Image,{className:Qr["banner-background"],src:c?e.bannerMobile:e.bannerDesk,alt:e.altBanner,width:"1920",height:"500"})}),s.jsxs(zn.Root,{postFn:o,ICONS:n,FORM_CONFIGS:r,groups:l.groups||[],masterDataEntity:l.masterDataEntity||"",className:Qr["form-root"],POPUP_SUBMITTED_STORAGE:i,children:[l.groups.map(d=>s.jsx(zn.FieldGroup,{group:d,children:s.jsx(zn.FieldWrapper,{fields:d.fields,className:Qr["form-fied-wrapper"]})},d.groupLabel)),s.jsxs("div",{children:[s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("p",{className:"typography-style-body-xs",children:e.requiredMessage})}),s.jsx("div",{className:Qr["button-wrapper"],children:s.jsx("div",{className:Qr["button-frame"],children:s.jsx(p.Button,{size:"large",type:"submit",className:Qr.button,children:e.buttonLabel})})})]})]})]})})}const Yw="_content_1jj9i_36",Xw="_trends_1jj9i_47",Jw="_modal_1jj9i_1",Ft={"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:Yw,trends:Xw,"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:Jw,"search-modal__modal":"_search-modal__modal_1jj9i_100"},ag=j.createContext({}),Zw=({children:e,term:t})=>{const[r,n]=j.useState([]),[o,i]=j.useState(!1);return j.useEffect(()=>{if(!t){n([]);return}(async()=>{i(!0);try{const l=await U.fetchProxy("/_v/proxy/search/suggestedTerms",{method:"POST",body:JSON.stringify({query:t,locale:"pt-BR"})}),{data:u}=await l.json();n((u==null?void 0:u.searches)||[])}catch(l){console.error("Erro ao buscar sugestões:",l)}})()},[t]),s.jsx(ag.Provider,{value:j.useMemo(()=>({suggestedTerms:r,loading:o,setLoading:i}),[r,o]),children:e})},eE=({children:e,...t})=>s.jsx(Zw,{...t,children:e}),tE=()=>{const e=j.useContext(ag);if(!e)throw new Error("useSuggestedTermsContext must be used within a SuggestedTermsProvider");return e},ma=(e,t,r=24,n=1,o="release:desc")=>{const i=`/search?query=${t??""}&count=${r}&page=${n}${o?`&sort=${o.replace("_",":")}`:""}`;e.push(i)},cg=({placeholder:e,noResultsTitle:t,noResultsLabel:r,noResultsTermText:n,handleClose:o,setTerm:i,ICONS:c,ITEMS_DEFAULT_SORT:l,ITEMS_PER_PAGE:u,SEARCH_MODAL:d})=>{const[h,m]=j.useState(""),{suggestedTerms:_,loading:g,setLoading:v}=tE(),{router:x}=Ae(),S=j.useRef(null),w=C=>{m(C.target.value),clearTimeout(S.current),C.target.value.length>2&&(i(C.target.value),S.current=setTimeout(()=>{i(C.target.value),v(!1)},2e3))},P=C=>{C.key==="Enter"&&(h==null?void 0:h.length)>2&&(o(),ma(x,h,u,1,l))},I=C=>{o(),ma(x,C,u,1,l)};return j.useEffect(()=>{if(clearTimeout(S.current),h.length<=2||_.length>0){v(!1);return}return v(!0),S.current=setTimeout(()=>{ma(x,h,u,1,l),v(!1),o()},2e3),()=>{clearTimeout(S.current)}},[h,_]),s.jsx(p.DropDown.AutoComplete,{className:Ft["modal-auto-complete"],onKeyDown:P,onInputChange:w,placeholder:e,stopClickPropagation:!1,adornment:{end:g?s.jsx(p.Spinner,{size:"small"}):s.jsx(p.Button,{variant:"tertiary",size:"small",iconNameStart:c.search,onClick:()=>{I(h)},disabled:!(h.length>2)})},children:(_==null?void 0:_.length)>0&&s.jsx(s.Fragment,{children:(_==null?void 0:_.length)>0&&(h==null?void 0:h.length)>2?s.jsx(p.DropDown.AutoCompleteList,{className:Ft["modal-auto-complete__dropdown"],seeAll:s.jsx("span",{onClick:()=>I(h),children:n+h}),children:_.map((C,N)=>s.jsx(p.DropDown.ListItemWithLink,{children:s.jsx(wt,{href:`/search?query=${C.term}&count=${u}&page=1`,size:"x-small",title:C.term,disableUnderline:!0,disablePadding:!1,onClick:T=>{T.preventDefault(),o()},children:C.term})},`key-${C.term}-${N}`))}):!g&&(h==null?void 0:h.length)>3&&(_==null?void 0:_.length)===0&&s.jsxs(p.DropDown.AutoCompleteList,{className:Ft["modal-search-empty"],children:[s.jsx(p.DropDown.NotResults,{description:r,title:t}),s.jsx(p.Button,{className:"all-terms",onClick:()=>{o(),x.push(d.EMPTY.ALL_TERMS)},variant:"tertiary",size:"medium",title:d.EMPTY.ALL_TERMS_LABEL,adornment:{end:s.jsx(p.Icon,{name:c.arrow_right,size:"medium"})},children:d.EMPTY.ALL_TERMS_LABEL})]})})})};cg.displayName="SearchModal.AutoComplete";function rE({title:e,ICONS:t}){const{isMobile:r}=xe();return s.jsx(p.Modal.Header,{navigation:"top",className:Ft["modal-header"],children:s.jsxs(p.Modal.Controls,{navigation:"top",isMobile:!!r,children:[s.jsx(p.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),s.jsx(p.Modal.Title,{navigation:"top",className:Ft["search-modal__title"],title:e}),s.jsx(p.Button,{className:Ft["modal-header__close-button"],"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})})}const lg=j.createContext({searches:[],isLoading:!1,error:null});let _a=null;const nE=({children:e})=>{const[t,r]=j.useState([]),[n,o]=j.useState(!0),[i,c]=j.useState(null);return j.useEffect(()=>{(async()=>{try{if(o(!0),_a){r(_a),o(!1);return}const u=await U.fetchProxy("/_v/proxy/search/topSearch");if(!u.ok)throw new Error(`Erro ao buscar os dados: ${u.status}`);const h=(await u.json()).data.searches||[];_a=h,r(h)}catch(u){c(u instanceof Error?u.message:"Erro desconhecido")}finally{o(!1)}})()},[]),s.jsx(lg.Provider,{value:j.useMemo(()=>({searches:t,isLoading:n,error:i}),[t,n,i]),children:e})},sE=()=>{const e=j.useContext(lg);if(!e)throw new Error("useTopSearches must be used within a TopSearchesProvider");return e},oE=({title:e,allTermsLabel:t,allTermsUrl:r,qtyTrends:n,handleClose:o,ICONS:i,ITEMS_PER_PAGE:c})=>{const{searches:l,isLoading:u}=sE(),{router:d}=Ae(),h=Array.isArray(l)?l:[];return s.jsx(s.Fragment,{children:!u&&h.length>0?s.jsx(p.ComponentList.Structure,{className:Ft.trends,title:e,children:s.jsxs("div",{className:Ft["trends-content"],children:[s.jsx(p.ComponentList.List,{columns:1,children:h.slice(0,n).map((m,_)=>s.jsx(p.ComponentList.ListItem,{className:Ft["trends-item"],children:s.jsx(wt,{href:`/search?query=${m.term}&count=${c}&page=1`,size:"x-small",adornments:{end:s.jsx(p.Icon,{name:i.arrow_right,size:"x-small"})},disableUnderline:!0,title:m.term,onClick:()=>o(),children:m.term})},`list-item-${_}`))}),s.jsx(p.Button,{className:"all-terms",variant:"tertiary",size:"x-small",underline:!1,onClick:()=>{o(),d.push(r)},adornment:{end:s.jsx(p.Icon,{name:i.arrow_right,size:"x-small"})},children:t})]})}):null})};function iE({SectionZone:e}){var n;const[t,r]=j.useState(null);return j.useEffect(()=>{(async()=>{try{const i=await fetch("/api/cms/content-type-client",{method:"POST",body:JSON.stringify({contentType:"search"})});if(!i.ok)return;const c=await i.json();r(c)}catch(i){console.error("[CMS FETCH ERROR]",i)}})()},[]),s.jsx("div",{className:Ft.content,children:t!==null&&s.jsx(e,{data:((n=t[0])==null?void 0:n.sections)??[],componentConfigs:{"Product Carousel":{searchModal:!0}}})})}const ug=({className:e,trends:t,CONSTANTS:r,SectionZone:n})=>{const[o,i]=j.useState(""),{isMobile:c}=xe(),l=ff(),{setValue:u}=Ho(),{SEARCH_MODAL:d,ICONS:h,ITEMS_PER_PAGE:m,ITEMS_DEFAULT_SORT:_}=r;return s.jsxs(p.Modal.Root,{isMobile:c??!1,variant:c?"sideBottom":"sideRight",isOpen:l,setIsOpen:u,className:`${Ft.modal} ${Ft["search-modal__modal"]} ${e??""}`,children:[s.jsx(rE,{title:d.HEADER.TITLE,ICONS:h}),s.jsxs(p.Modal.Body,{className:Ft["modal-content-body"],children:[s.jsx(eE,{term:o,children:s.jsx(cg,{placeholder:d.AUTOCOMPLETE.PLACEHOLDER,noResultsTitle:d.EMPTY.NOT_FOUND,noResultsLabel:d.EMPTY.NOT_FOUND_P,noResultsTermUrl:d.AUTOCOMPLETE.NO_RESULTS.NO_RESULTS_TERM_URL,noResultsTermText:d.AUTOCOMPLETE.NO_RESULTS.NO_RESULTS_TERM_TEXT,handleClose:()=>u(!1),setTerm:i,ICONS:h,ITEMS_DEFAULT_SORT:_,ITEMS_PER_PAGE:m,SEARCH_MODAL:d})}),t?s.jsx(nE,{children:s.jsx(oE,{title:d.TRENDS.TITLE,allTermsUrl:d.TRENDS.ALL_TERMS_URL,allTermsLabel:d.TRENDS.ALL_TERMS_LABEL,qtyTrends:d.TRENDS.QTY_TERMS,handleClose:()=>u(!1),ICONS:h,ITEMS_PER_PAGE:m})}):null,s.jsx(iE,{SectionZone:n})]})]})};ug.displayName="SearchModal";const Vt={"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"},dg=({LPLOJAS_TEMPLATE_RETURN_BUTTON:e,ICONS:t,showVendor:r})=>{const{selectedCity:n,selectedStore:o}=Wo();return s.jsx(p.Card,{padding:"small",shadow:!0,className:Vt["store--wrapper"],children:o?s.jsxs(s.Fragment,{children:[s.jsx(pr.ReturnButton,{ICONS:t,children:e}),s.jsx(pr.Details,{ICONS:t,showVendor:r,store:n==null?void 0:n.find(i=>i.nome===o)})]}):s.jsx(pr.Select,{ICONS:t})})};dg.displayName="LPStores.Content";const ys=({title:e,text:t,type:r,...n})=>s.jsx(p.TextStructure.DivWrapper,{...n,children:r==="title"?s.jsx("h4",{className:Vt["store--details--title"],children:e}):s.jsxs(s.Fragment,{children:[s.jsx("h5",{className:Vt["store--details--subtitle"],children:e}),s.jsx("p",{className:Vt["store--details--text"],children:t})]})});ys.displayName="LPStores.Details";const fg=({vendor:e,ICONS:t})=>{const r=e?e.split(","):[];return s.jsxs(p.Accordion.Wrapper,{style:{width:"100%"},children:[s.jsx(p.Accordion.Header,{id:"accordion-header-vendor",closeIndicator:s.jsx(p.Icon,{name:t.arrow_up,size:"small"}),openIndicator:s.jsx(p.Icon,{name:t.arrow_down,size:"small"}),title:"Código de vendedor (A)",children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{gap:0,children:s.jsx("h3",{className:"typography-style-body-md",children:"Código de vendedor (A)"})})})}),s.jsx(p.Accordion.Body,{children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:Vt["store--details--vendor"],children:r.map((n,o)=>s.jsx("p",{className:"typography-style-body-sm",children:n.trim()},o))})})})]})};fg.displayName="LPStores.Details";const pg=({store:e,showVendor:t,ICONS:r})=>s.jsxs("div",{className:Vt["store--details"],children:[s.jsx(ys,{alignItems:"left",title:String(e==null?void 0:e.nome),type:"title"}),s.jsx(ys,{title:"Endereço",text:String(e.endereco)}),e.telefone&&s.jsx(ys,{title:"Telefone",text:String(e.telefone)}),e.horario&&s.jsx(ys,{title:"Horário de funcionamento",text:String(e.horario)}),t&&s.jsx(fg,{ICONS:r,vendor:String(e.vendedoras)})]});pg.displayName="LPStores.Details";const hg=({ICONS:e,arrowDownIcon:t=s.jsx(p.Icon,{name:e.arrow_down,size:"small"}),arrowUpIcon:r=s.jsx(p.Icon,{name:e.arrow_up,size:"small"}),list:n,selectText:o,...i})=>s.jsx(p.DropDown.DefaultDropDown,{...i,"aria-placeholder":o,adornmentListClosed:{end:t},adornmentListOpened:{end:r},mode:"simple",placeholder:o,sizeVariant:"large",children:s.jsx(p.DropDown.DefaultDropDownList,{placeholder:o,supportText:o,maxHeight:400,children:Array.isArray(n)&&(n==null?void 0:n.map(c=>s.jsx(p.DropDown.ListItem,{value:c,children:c},c.replace(/\s/g,""))))})});hg.displayName="LPStores.DropDown";const mg=({children:e,ICONS:t})=>{const{clearSelectedStore:r}=Wo(),n=()=>{typeof r=="function"&&r()};return s.jsxs("button",{"aria-label":String(e),className:Vt["store--return-button"],onClick:n,onKeyDown:n,children:[s.jsx(p.Icon,{name:t.arrow_left,size:"small"}),e]})};mg.displayName="LPStores.ReturnButton";const _g=({children:e,data:t})=>s.jsx(xp,{data:t,children:e});_g.displayName="LPStores.Root";const gg=({children:e,imgAlt:t,imgSrcDesk:r,imgSrcMob:n})=>{const{isMobile:o}=xe();return s.jsxs("section",{className:Vt["store--section"],children:[s.jsx(Es,{src:o?n:r,alt:t,fill:!0,className:Vt["store--section--img"]}),e]})};gg.displayName="LPStores.Section";const yg=({ICONS:e})=>{const{data:t,handleSelectCity:r,selectedCity:n,handleSelectStore:o}=Wo(),i=new Set(t.map(l=>l.cidade)),c=Array.from(i).filter(l=>typeof l=="string");return s.jsxs("div",{className:Vt["store--select"],children:[s.jsx(pr.DropDown,{selectText:"Selecione a cidade",handleSelectedValue:r,list:c,defaultValue:n==null?void 0:n[0].cidade,ICONS:e}),s.jsx(pr.DropDown,{"data-selected-city":!!n,selectText:"Selecione a loja",handleSelectedValue:o,list:n?n==null?void 0:n.map(l=>String(l.nome)):[],ICONS:e},n==null?void 0:n[0].cidade)]})};yg.displayName="LPStores.Select";const vg=({children:e})=>s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:Vt["store--page-title"],children:s.jsx("h2",{className:Vt["store--page-title--title"],children:e})})});vg.displayName="LPStores.Title";const pr={Content:dg,Details:pg,DropDown:hg,ReturnButton:mg,Root:_g,Section:gg,Select:yg,Title:vg};var xg={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 aE(e,t,r){const n=t.window,o=Object.assign({},t);if(delete o.window,n){n.dataLayer=n.dataLayer||[],n.dataLayer.push({event:e,ecommerce:o});return}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:e,ecommerce:o})}function cE(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 bg=[["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 lE(e,t,r){cE({id:e,custom_data:t},"#00c851",r)}var uE={DataLayer:aE,Dito:lE};async function dE(e,t){const r=xg[e];r&&await Promise.allSettled(r.destinations.map(async n=>{try{await uE[n](e.toLowerCase(),t,n)}catch(o){console.error(`[DT] Failed to send ${e} to ${n}:`,o)}}))}async function fE(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 pE(e){try{const{pathname:t}=new URL(e,window.location.origin);return/\/p\/?$/.test(t)}catch{return!1}}function jg(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 hE(e){const t=jg(e);if(!t)return console.error("Não foi possível extrair o RefId da URL"),null;try{const r=await fetch(`/api/catalog_system/pub/products/search?fq=alternateIds_RefId:${t}`);if(!r.ok)throw new Error(`Erro na API: ${r.status}`);const n=await r.json();return(n==null?void 0:n[0])||null}catch(r){return console.error("Erro ao buscar dados do produto:",r),null}}function Sg(e,t){var r,n,o,i;const c=(n=(r=e==null?void 0:e.shippingData)==null?void 0:r.logisticsInfo)==null?void 0:n.find(u=>u.itemId===t.id),l=(o=c==null?void 0:c.slas)==null?void 0:o.find(u=>u.id===c.selectedSla);return(i=l==null?void 0:l.pickupStoreInfo)!=null&&i.friendlyName?`retirada em loja: ${l.pickupStoreInfo.friendlyName}`:l!=null&&l.name?`Receba em casa: ${l.name}`:null}async function Cg(e){var t,r;const n=await fE(e.productId||e.productID||e.item_group_id);return n.length&&(r=(t=n[0].items.find(o=>o.name===e.skuName))==null?void 0:t.itemId)!=null?r:null}function ni(e){return e.discount||e.discount===0?e.discount:parseFloat(Math.max(e.listPrice-e.sellingPrice,0).toFixed(2))/100||0}function gn(e){const t=[()=>{var r;return((r=e==null?void 0:e.productCategories)==null?void 0:r[39])==="BAZAR"?"Sale":"Coleção"},()=>e.item_category||e.category,()=>e.categories[0]];for(const r of t){const n=r();if(n!=null)return n}return null}function Hs(e){const t=[()=>Object.values((e==null?void 0:e.productCategories)||{}).pop(),()=>Object.values((e==null?void 0:e.categories)||{}).pop(),()=>{var r,n,o,i,c;return(c=(i=(o=(n=(r=e==null?void 0:e.category)==null?void 0:r.split)==null?void 0:n.call(r,">"))==null?void 0:o[1])==null?void 0:i.trim)==null?void 0:c.call(i)},()=>e.item_category2];for(const r of t){const n=r();if(n!=null)return n}return null}function wg(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 mE={farm:"farmrio","farm etc":"farmetc","farm rio":"farmrio"};function gd(e){if(!e)return null;const t=e.toLowerCase().trim();return mE[t]||null}function mr(e){var t;let r=[];if(Array.isArray(e)&&e.every(i=>typeof i=="string"))r=e;else if(Array.isArray(e))r=e.map(i=>{var c;return((c=i.additionalInfo)==null?void 0:c.brandName)||i.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"?gd(e):null;const n=r.map(gd).filter(i=>i!==null),o=[...new Set(n)].sort();return o.length>0?o.join("_"):null}function _E(e){var t;if(!e.orderForm&&!((t=e.orderForm.items)!=null&&t.length))return null;const r=e.orderForm.items;return mr(r)}function gE(e){var t;const{item:r}=e;return mr(((t=r==null?void 0:r.additionalInfo)==null?void 0:t.brandName)||r.brand||r.item_brand)}function yE(e,t){if(e!=null&&e.brand)return mr(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 _E(e);case"ADD_TO_CART":case"REMOVE_FROM_CART":return gE(e);default:return null}}async function vE(e){var t;const r=((t=e.orderForm)==null?void 0:t.items)||[];return r.length?await Promise.all(r.map(async n=>{var o,i,c;return{item_id:n.productId,item_category2:Hs(n),item_category4:wg(n),item_shipping_tier:Sg(e.orderForm,n),price:parseFloat((n.price/100).toFixed(2))||0,quantity:n.quantity||1,item_ref:n.refId||null,item_brand:mr((o=n.additionalInfo)==null?void 0:o.brandName)||((i=n.additionalInfo)==null?void 0:i.brandName)||null,item_sku:await Cg(n)||n.id||null,item_name:n.name||n.id||null,item_category:gn(n)||null,item_variant:n.skuName.split(/[-/]/)[0].trim(),item_variant2:((c=n.skuName.split(/[-/]/).pop())==null?void 0:c.trim())||"",discount:ni(n)}})):[]}async function xE(e,t){var r,n,o;const{item:i,orderForm:c}=e;return[{index:0,quantity:1,item_id:i.productId||i.item_group_id||i.sku||null,item_category2:Hs(i),item_category4:wg(i),item_shipping_tier:t==="REMOVE_FROM_CART"?Sg(c,i):null,price:i.listPrice||parseFloat((i.price/100).toFixed(2))||0,item_ref:i.refId||i.item_ref||(i==null?void 0:i.additionalProperty.find(l=>l.name==="RefId").value)||null,item_brand:((r=i.additionalInfo)==null?void 0:r.brandName)||i.item_brand||i.brand.name||null,item_sku:i.sku||i.id||i.item_id||await Cg(i)||null,item_name:i.name||i.item_name||null,item_category:gn(i)||null,item_variant:(i.skuName||i.item_variant||i.name).split(/[-/]/)[0].trim()||null,item_variant2:i.size||((n=i==null?void 0:i.itemAttributes)==null?void 0:n.size)||((o=(i.skuName||i.name).split(/[-/]/).pop())==null?void 0:o.trim())||null,discount:ni(i),item_list_name:gn(i)||null,item_url:i.item_url||null}]}async function bE(e){return((e==null?void 0:e.list)||[]).map(t=>{var r,n,o,i,c;return{price:((r=t==null?void 0:t.price)==null?void 0:r.list)||(t==null?void 0:t.price)||((n=t==null?void 0:t.offers)==null?void 0:n.lowPrice)||0,quantity:1,item_ref:(t==null?void 0:t.ref)||(t==null?void 0:t.item_ref)||(t==null?void 0:t.referenceId[0].Value)||(t==null?void 0:t.additionalProperty.find(l=>l.name==="RefId").value)||null,index:typeof(e==null?void 0:e.index)=="number"?e.index:null,item_brand:mr((o=t==null?void 0:t.brand)==null?void 0:o.name)||mr(e.brand)||mr(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)||((i=t==null?void 0:t.seo)==null?void 0:i.title)||null,item_category:gn(t)||null,item_variant:((c=t==null?void 0:t.name)==null?void 0:c.split("-")[0].trim())||(t==null?void 0:t.item_variant)||null,item_category2:Hs(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:ni(t)||null,item_list_name:(e==null?void 0:e.itemListName)||gn(t)||null}})}async function jE(e){var t,r,n;const{item:o}=e;return[{price:e.value||0,quantity:1,item_ref:o.ref||o.additionalProperty.find(i=>i.name==="RefId").value||null,item_brand:mr(o.brand.name)||mr(e.brand)||null,item_name:o.productName||o.alternateName||null,item_category:gn(o)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-")[0].trim())||null,item_category2:Hs(o)||((n=(r=o==null?void 0:o.category)==null?void 0:r.split(">")[1])==null?void 0:n.trim())||null,item_id:(o==null?void 0:o.productID)||(o==null?void 0:o.productId)||o.item_group_id||null,discount:ni(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 SE(e){var t;if(!pE(e==null?void 0:e.bannerUrl))return[];const n=await hE(e==null?void 0:e.bannerUrl),o=n==null?void 0:n.items[0];return{price:(o==null?void 0:o.sellers[0].commertialOffer.Price)||0,quantity:1,item_ref:jg(e==null?void 0:e.bannerUrl),item_brand:mr(n.brand)||null,item_name:(n==null?void 0:n.productName)||(n==null?void 0:n.alternateName)||(n==null?void 0:n.item_name)||null,item_category:gn(n)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-").pop().trim())||null,item_category2:Hs(n)||null,item_id:(n==null?void 0:n.productId)||null,discount:(o==null?void 0:o.sellers[0].commertialOffer.ListPrice)-(o==null?void 0:o.sellers[0].commertialOffer.Price)||null}}function CE(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 vE(e);case"ADD_TO_CART":case"ADD_TO_WISHLIST":case"REMOVE_FROM_CART":return xE(e,t);case"SELECT_ITEM":case"VIEW_ITEM_LIST":return bE(e);case"VIEW_ITEM":return jE(e);case"VIEW_PROMOTION":case"SELECT_PROMOTION":return SE(e);default:return null}}function wE(e){var t,r,n;if(!e.orderForm)return null;const o=((t=e.orderForm.paymentData)==null?void 0:t.payments)||[],i=((r=e.orderForm.paymentData)==null?void 0:r.paymentSystems)||[];if(!o.length||!i.length)return null;const c=o.find(m=>m==null?void 0:m.paymentSystem)||o[0],l=String((c==null?void 0:c.paymentSystem)||"").trim();if(!l)return null;const u=i.find(m=>String(m.id)===l),d=((n=u==null?void 0:u.name)==null?void 0:n.toLowerCase())||"",h=bg.find(([m])=>d.includes(m));return h?h[1]:null}function EE(e){var t,r,n,o;if(!e.orderForm)return null;const i=((t=e.orderForm.paymentData)==null?void 0:t.transactions)||[];if(!i.length)return null;const c=((r=i[0])==null?void 0:r.payments)||[];if(!c.length)return null;const l=((o=(n=c[0])==null?void 0:n.paymentSystemName)==null?void 0:o.toLowerCase())||"",u=bg.find(([d])=>l.includes(d));return u?u[1]:null}function IE(e,t){if(e!=null&&e.paymentType)return e.paymentType;switch(t){case"ORDER_REVIEWED":case"CUSTOM_ADD_PAYMENT_INFO":return wE(e);case"PURCHASE":case"CUSTOM_PURCHASE":return EE(e);default:return null}}var PE={brand:yE,items:CE,payment_type:IE,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 i=`${o}/_v/user-info`,c=await fetch(i,{method:"POST",body:JSON.stringify({email:e.userEmail})});return c.status!==200?{customer:{email:e.userEmail,id:e==null?void 0:e.userId},address:null}:await c.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,n,o,i;return e!=null&&e.currency?e.currency:e!=null&&e.bannerUrl?"BRL":e!=null&&e.item?((n=(r=e.item)==null?void 0:r.offers)==null?void 0:n.priceCurrency)||"BRL":((i=(o=e.orderForm)==null?void 0:o.storePreferencesData)==null?void 0:i.currencyCode)||null},value:(e,t)=>{var r;return e!=null&&e.value?e.value:e.item?e.item.price:((r=e.orderForm)==null?void 0:r.value)!=null?e.orderForm.value/100:null},total_discount:(e,t)=>{var r,n;const i=(((r=e.orderForm)==null?void 0:r.totalizers)||((n=e.orderForm)==null?void 0:n.totals)||[]).find(c=>c.id==="Discounts");return i?Math.abs(i.value)/100:0},subtotal:(e,t)=>{var r,n;return(((r=e.orderForm)==null?void 0:r.totalizers)||((n=e.orderForm)==null?void 0:n.totals)||[]).filter(c=>c.id==="Items").reduce((c,l)=>c+(l.value||0),0)/100||0},coupon_message:(e,t)=>{var r;if(e.couponMessage)return e.couponMessage;const n=((r=e.orderForm)==null?void 0:r.messages)||[];if(n.length===0)return null;const o=n.filter(i=>i.text.toLowerCase().includes("cupom"));return o.length===0?null:o.map(i=>i.text).join(" | ")},seller_cod_name:(e,t)=>e.appliedSellerCodName||(e==null?void 0:e.orderForm.marketingData.utmiCampaign)||null,coupon:(e,t)=>{var r,n;return e.appliedCoupon||((n=(r=e==null?void 0:e.orderForm)==null?void 0:r.marketingData)==null?void 0:n.coupon)||null},pre_filled:(e,t)=>!!e.preFilled,search_term:(e,t)=>e.searchTerm||null,search_found:(e,t)=>!!e.searchFound,search_quantity:(e,t)=>e.searchQuantity||0,promotion_name:(e,t)=>e.promotionName||null,creative_name:(e,t)=>e.creativeName||null,creative_slot:(e,t)=>e.creativeSlot||null,zipcode:(e,t)=>e.zipCode||null,size:(e,t)=>e.size||null,item_ref:(e,t)=>e.itemRef||null,flag_pickup:(e,t)=>{var r;const n=e.orderForm;return n?(((r=n.shippingData)==null?void 0:r.logisticsInfo)||[]).some(c=>{var l;return(l=c.slas)==null?void 0:l.some(u=>u.deliveryChannel==="pickup-in-point")}):null},shippings:(e,t)=>{const r=e.orderForm;if(!r)return null;const n={};for(const i of r.shippingData.logisticsInfo){const c=r.items[i.itemIndex];if(c)for(const l of i.slas){const u=l.name;n[u]||(n[u]={shipping_tier:l.name,delivery_time:parseInt(l.shippingEstimate),shipping:parseFloat((l.price/100).toFixed(1)),line_items:[]}),n[u].line_items.push(c.id)}}return Object.values(n).map(i=>({shipping:i.shipping,shipping_tier:i.shipping_tier,delivery_time:i.delivery_time,line_items:i.line_items.join(",")}))||null},shipping:(e,t)=>{var r,n,o;return((o=(n=(r=e==null?void 0:e.orderForm)==null?void 0:r.shippingData)==null?void 0:n.logisticsInfo)!=null?o:[]).reduce((c,l)=>{var u,d;const h=(u=l.slas)==null?void 0:u.find(m=>m.id===l.selectedSla);return c+((d=h==null?void 0:h.price)!=null?d:0)},0)},shipping_tier:(e,t)=>{var r,n,o,i;const l=((o=(n=(r=e==null?void 0:e.orderForm)==null?void 0:r.shippingData)==null?void 0:n.logisticsInfo)!=null?o:[]).find(_=>_.selectedSla);if(!l)return null;const u=(i=l.slas)==null?void 0:i.find(_=>_.id===l.selectedSla);if(!u)return null;const{deliveryChannel:d,name:h,pickupStoreInfo:m}=u;return d==="pickup-in-point"?`retirada em loja${m!=null&&m.friendlyName?`: ${m.friendlyName}`:""}`:d==="delivery"?`receba em casa${h?`: ${h}`:""}`:null},transaction_id:(e,t)=>{var r,n;return((n=(r=e.orderForm)==null?void 0:r.orderGroup)==null?void 0:n.toString())||null},available_grid:(e,t)=>e.availableGrid||null};async function NE(e={},t){const r=xg[t];return r?Object.fromEntries(await Promise.all(r.requiredParams.map(async o=>{const i=PE[o];return typeof i!="function"?(console.error(`[DT] Missing paramGetter for param: ${o}`),[o,null]):[o,await i(e,t)]}))):void 0}async function RE(e,t={}){try{const r=await NE(t,e);return await dE(e,Object.assign({},r,{window:t.window}))}catch(r){return console.error(`[DT] Error tracking event ${e}:`,r)}}var Ya={exports:{}},Eg={};(function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(c,l){for(var u in l)Object.defineProperty(c,u,{enumerable:!0,get:l[u]})}t(e,{PathParamsContext:function(){return i},PathnameContext:function(){return o},SearchParamsContext:function(){return n}});const r=j,n=(0,r.createContext)(null),o=(0,r.createContext)(null),i=(0,r.createContext)(null);process.env.NODE_ENV!=="production"&&(n.displayName="SearchParamsContext",o.displayName="PathnameContext",i.displayName="PathParamsContext")})(Eg);var Xa={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return r}});function r(n){return Array.isArray(n)?n[1]:n}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(Xa,Xa.exports);var TE=Xa.exports,Ja={exports:{}},Za={exports:{}},ec={exports:{}},tc={exports:{}},rc={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return i}});const r=new Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class n{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}}const o=globalThis.AsyncLocalStorage;function i(){return o?new o:new n}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(rc,rc.exports);var Zc=rc.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return n}});const n=(0,Zc.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)})(tc,tc.exports);var OE=tc.exports;(function(e,t){"TURBOPACK { transition: next-shared }";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,{getExpectedRequestStore:function(){return o},requestAsyncStorage:function(){return n.requestAsyncStorage}});const n=OE;function o(i){const c=n.requestAsyncStorage.getStore();if(c)return c;throw new Error("`"+i+"` 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)})(ec,ec.exports);var AE=ec.exports,nc={exports:{}},sc={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return n}});const n=(0,Zc.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)})(sc,sc.exports);var kE=sc.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=kE;(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)})(nc,nc.exports);var ME=nc.exports,oc={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return r}});var r;(function(n){n[n.SeeOther=303]="SeeOther",n[n.TemporaryRedirect=307]="TemporaryRedirect",n[n.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)})(oc,oc.exports);var LE=oc.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(x,S){for(var w in S)Object.defineProperty(x,w,{enumerable:!0,get:S[w]})}r(t,{RedirectType:function(){return l},getRedirectError:function(){return u},getRedirectStatusCodeFromError:function(){return v},getRedirectTypeFromError:function(){return g},getURLFromRedirectError:function(){return _},isRedirectError:function(){return m},permanentRedirect:function(){return h},redirect:function(){return d}});const n=AE,o=ME,i=LE,c="NEXT_REDIRECT";var l;(function(x){x.push="push",x.replace="replace"})(l||(l={}));function u(x,S,w){w===void 0&&(w=i.RedirectStatusCode.TemporaryRedirect);const P=new Error(c);P.digest=c+";"+S+";"+x+";"+w+";";const I=n.requestAsyncStorage.getStore();return I&&(P.mutableCookies=I.mutableCookies),P}function d(x,S){S===void 0&&(S="replace");const w=o.actionAsyncStorage.getStore();throw u(x,S,w!=null&&w.isAction?i.RedirectStatusCode.SeeOther:i.RedirectStatusCode.TemporaryRedirect)}function h(x,S){S===void 0&&(S="replace");const w=o.actionAsyncStorage.getStore();throw u(x,S,w!=null&&w.isAction?i.RedirectStatusCode.SeeOther:i.RedirectStatusCode.PermanentRedirect)}function m(x){if(typeof x!="object"||x===null||!("digest"in x)||typeof x.digest!="string")return!1;const[S,w,P,I]=x.digest.split(";",4),C=Number(I);return S===c&&(w==="replace"||w==="push")&&typeof P=="string"&&!isNaN(C)&&C in i.RedirectStatusCode}function _(x){return m(x)?x.digest.split(";",3)[2]:null}function g(x){if(!m(x))throw new Error("Not a redirect error");return x.digest.split(";",2)[1]}function v(x){if(!m(x))throw new Error("Not a redirect error");return Number(x.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)})(Za,Za.exports);var DE=Za.exports,ic={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,{isNotFoundError:function(){return i},notFound:function(){return o}});const n="NEXT_NOT_FOUND";function o(){const c=new Error(n);throw c.digest=n,c}function i(c){return typeof c!="object"||c===null||!("digest"in c)?!1:c.digest===n}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(ic,ic.exports);var FE=ic.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(l,u){for(var d in u)Object.defineProperty(l,d,{enumerable:!0,get:u[d]})}r(t,{ReadonlyURLSearchParams:function(){return c},RedirectType:function(){return n.RedirectType},notFound:function(){return o.notFound},permanentRedirect:function(){return n.permanentRedirect},redirect:function(){return n.redirect}});const n=DE,o=FE;class i extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class c extends URLSearchParams{append(){throw new i}delete(){throw new i}set(){throw new i}sort(){throw new 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)})(Ja,Ja.exports);var zE=Ja.exports,Ig={};(function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(c,l){for(var u in l)Object.defineProperty(c,u,{enumerable:!0,get:l[u]})}t(e,{ServerInsertedHTMLContext:function(){return o},useServerInsertedHTML:function(){return i}});const n=hn._(j),o=n.default.createContext(null);function i(c){const l=(0,n.useContext)(o);l&&l(c)}})(Ig);var Po={exports:{}},ga={},yd;function qE(){return yd||(yd=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,{BailoutToCSRError:function(){return n},isBailoutToCSRError:function(){return o}});const r="BAILOUT_TO_CLIENT_SIDE_RENDERING";class n extends Error{constructor(c){super("Bail out to client-side rendering: "+c),this.reason=c,this.digest=r}}function o(i){return typeof i!="object"||i===null||!("digest"in i)?!1:i.digest===r}}(ga)),ga}var No={exports:{}},Ro={exports:{}},vd;function BE(){return vd||(vd=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return n}});const n=(0,Zc.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)}(Ro,Ro.exports)),Ro.exports}var xd;function UE(){return xd||(xd=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=BE();(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)}(No,No.exports)),No.exports}var bd;function HE(){return bd||(bd=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"bailoutToClientRendering",{enumerable:!0,get:function(){return o}});const r=qE(),n=UE();function o(i){const c=n.staticGenerationAsyncStorage.getStore();if(!(c!=null&&c.forceStatic)&&c!=null&&c.isStaticGeneration)throw new r.BailoutToCSRError(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)}(Po,Po.exports)),Po.exports}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(w,P){for(var I in P)Object.defineProperty(w,I,{enumerable:!0,get:P[I]})}r(t,{ReadonlyURLSearchParams:function(){return u.ReadonlyURLSearchParams},RedirectType:function(){return u.RedirectType},ServerInsertedHTMLContext:function(){return d.ServerInsertedHTMLContext},notFound:function(){return u.notFound},permanentRedirect:function(){return u.permanentRedirect},redirect:function(){return u.redirect},useParams:function(){return g},usePathname:function(){return m},useRouter:function(){return _},useSearchParams:function(){return h},useSelectedLayoutSegment:function(){return S},useSelectedLayoutSegments:function(){return x},useServerInsertedHTML:function(){return d.useServerInsertedHTML}});const n=j,o=Hp(),i=Eg,c=TE,l=Tc,u=zE,d=Ig;function h(){const w=(0,n.useContext)(i.SearchParamsContext),P=(0,n.useMemo)(()=>w?new u.ReadonlyURLSearchParams(w):null,[w]);if(typeof window>"u"){const{bailoutToClientRendering:I}=HE();I("useSearchParams()")}return P}function m(){return(0,n.useContext)(i.PathnameContext)}function _(){const w=(0,n.useContext)(o.AppRouterContext);if(w===null)throw new Error("invariant expected app router to be mounted");return w}function g(){return(0,n.useContext)(i.PathParamsContext)}function v(w,P,I,C){I===void 0&&(I=!0),C===void 0&&(C=[]);let N;if(I)N=w[1][P];else{const z=w[1];var T;N=(T=z.children)!=null?T:Object.values(z)[0]}if(!N)return C;const O=N[0],M=(0,c.getSegmentValue)(O);return!M||M.startsWith(l.PAGE_SEGMENT_KEY)?C:(C.push(M),v(N,P,!1,C))}function x(w){w===void 0&&(w="children");const P=(0,n.useContext)(o.LayoutRouterContext);return P?v(P.tree,w):null}function S(w){w===void 0&&(w="children");const P=x(w);if(!P||P.length===0)return null;const I=w==="children"?P[0]:P[P.length-1];return I===l.DEFAULT_SEGMENT_KEY?null: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)})(Ya,Ya.exports);var $E=Ya.exports,jd=$E;function WE({accountName:e}){const{user:t}=rs(),r=jd.usePathname(),n=jd.useSearchParams(),o=(t==null?void 0:t.sub)||(t==null?void 0:t.email),i=t==null?void 0:t.userId;return j.useEffect(()=>{o&&i?RE("CUSTOM_USER_INFO",{userId:i,userEmail:o,platform:"store",account:e}):console.warn("[DT] Usuário deslogado ou sessão carregando...")},[r,n,o,i]),null}const VE="_active_gk7mu_380",GE="_banner_gk7mu_655",KE="_container_gk7mu_689",QE="_slugs_gk7mu_703",YE="_root_gk7mu_785",XE="_otContainer_gk7mu_797",Xr={active:VE,banner:GE,container:KE,slugs:QE,"content-page-modifier":"_content-page-modifier_gk7mu_741",root:YE,otContainer:XE};function JE({title:e,srcImages:t,children:r,className:n,...o}){const{isMobile:i}=xe(),c=i?t.mobile:t.desktop;return s.jsxs("div",{...o,className:p.helpers.classNameConcat(Xr.banner,n),children:[s.jsx(at.Image,{src:c,alt:e,fill:!0}),r||s.jsx("h1",{children:e})]})}const ac=({children:e,className:t})=>s.jsx("div",{className:p.helpers.classNameConcat(Xr.container,t),children:e});ac.displayName="Politicas.Container";const ZE=({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 j.useEffect(()=>{window.OneTrust&&t()},[]),s.jsxs(s.Fragment,{children:[s.jsx(Xc,{onLoad:t,id:"otprivacy-notice-script",src:"https://privacyportal-cdn.onetrust.com/privacy-notice-scripts/otnotice-1.0.min.js"}),s.jsx("div",{className:Xr.otContainer,children:s.jsx("div",{id:"otnotice-container",children:s.jsx("div",{id:`otnotice-${e.policyId}`,className:"otnotice"})})})]})},Sd={"card-image-wrapper":"_card-image-wrapper_10mul_1","card-image-container":"_card-image-container_10mul_9"},Pg=e=>{const{nextimage:t}=Ae();return s.jsx(Kt,{name:e.name,children:e.data.banners.map((r,n)=>s.jsx("div",{className:Sd["card-image-wrapper"],children:s.jsx("div",{className:Sd["card-image-container"],children:s.jsx(t,{src:r.image,alt:r.altImage?r.altImage:"Banner Coleção",width:500,height:600})})},n))})},e0="_embedLiveContainer_1ss0l_2",t0="_embedLivePlayer_1ss0l_7",Cd={embedLiveContainer:e0,embedLivePlayer:t0},Ng=({data:e,name:t})=>s.jsx(Kt,{name:t,children:s.jsx("div",{className:Cd.embedLiveContainer,children:s.jsx("div",{className:Cd.embedLivePlayer,children:e.banner.videosrc?s.jsx(at.Video,{src:e.banner.videosrc??"",playsInline:!0,autoPlay:!0,loop:!0,muted:!0,title:"Live",controls:!0}):s.jsxs("div",{children:[s.jsx("iframe",{src:e.banner.embed_source??"",allow:"autoplay; fullscreen; picture-in-picture; loop;",title:"Live"}),s.jsx(Xc,{src:"https://player.vimeo.com/api/player.js",defer:!0,strategy:"lazyOnload"})]})})})}),cc={"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 r0(e,t){const{mediatorRef:r}=xe();j.useEffect(()=>r.current.subscribe(e,t),[e,t])}const wd=({prevOnClick:e,nextOnClick:t,onBulletClick:r,currentPage:n,totalPages:o,position:i,hideControllers:c,left:l,isFirst:u,ICONS:d})=>{const[h,m]=j.useState("default");return r0("herobanner:change_controllers_variant",_=>{u&&m(_.includes("white")?"inverse":"default")}),s.jsxs(p.Carousel.Controller,{className:cc["carousel-controllers-modifier"],position:i??"absolute","data-hide-controllers":c,bottom:"16px",top:"unset",left:l,children:[s.jsxs(p.Carousel.Arrows,{className:cc["carrousel-arrows-display-controller"],children:[s.jsx(p.Button,{variant:"tertiary",onClick:e,adornment:{start:s.jsx(p.Icon,{name:d.arrow_left})},mode:h}),s.jsx(p.Button,{variant:"tertiary",onClick:t,adornment:{start:s.jsx(p.Icon,{name:d.arrow_right})},mode:h})]}),s.jsx(p.Carousel.Bullets,{page:n,total:o,onBulletClick:r,mode:h})]})},n0=({children:e,data:t,banner:r,...n})=>{const{mediatorRef:o}=xe();return t.data.first?s.jsx(Ko,{observerOptions:{threshold:.51},stopOnIntersection:!1,callBackWhenVisible:()=>{o.current.publish("header:change_variant",r.headerVariant)},...n,children:e}):s.jsx(s.Fragment,{children:e})},Rg=e=>{const{initialize:t,pagination:r,controller:n,itemsStyles:o}=p.Carousel.useCarousel({gap:e.data.config.gap,itemsPerPage:e.data.config.slidesPerView,direction:"row"}),i=j.useRef(void 0),c=j.useMemo(()=>j_(e.data.config.controllerPosition??"dentro-inferior-centro"),[e]),l=j.useCallback(()=>{e.data.config.slideDuration&&r.totalPages>1&&(i.current=setInterval(()=>{n==null||n.nextPage()},e.data.config.slideDuration*1e3))},[n,e.data.config.slideDuration,r.totalPages]),u=j.useCallback(h=>{clearInterval(i.current),l(),h()},[l]),d=j.useMemo(()=>{var h;return{nextOnClick:()=>u(()=>n==null?void 0:n.nextPage()),prevOnClick:()=>u(()=>n==null?void 0:n.prevPage()),onBulletClick:m=>u(()=>n==null?void 0:n.navigateTo(m)),currentPage:r.currentPage,totalPages:r.totalPages,position:c.position,hideControllers:((h=e.data.config)==null?void 0:h.hideControllers)??!1,left:c.left}},[r.currentPage,r.totalPages,c.position,e.data.config.hideControllers,u,n]);return j.useEffect(()=>(l(),()=>clearInterval(i.current)),[l]),s.jsx(Kt,{name:e.name,children:s.jsxs(p.Carousel.Root,{innerRef:h=>{t(h)},className:p.helpers.classNameConcat(cc["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:[c.shouldRender==="top"&&r.totalPages>1?s.jsx(wd,{ICONS:e.ICONS,...d,isFirst:e.data.first}):s.jsx(s.Fragment,{}),s.jsx(p.Carousel.Body,{children:e==null?void 0:e.data.banners.map((h,m)=>s.jsx(p.Carousel.Item,{style:o,children:s.jsx(n0,{data:e,banner:h,children:s.jsx(Us,{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:h,index:m,componentIndex:e.data.componentIndex},creative:"banner-carousel",...e.data.first&&m===0&&{priority:!0}})})},`hero-banner-item-${m}`))}),c.shouldRender==="bottom"&&r.totalPages>1?s.jsx(wd,{ICONS:e.ICONS,...d}):s.jsx(s.Fragment,{})]})})},An={"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"},Tg=({data:e,name:t,CONSTANTS:r})=>{var h;const{isMobile:n}=xe(),o=e.config.size??"medium",i=e.config.disableCarouselMobile??!1,{initialize:c,pagination:l,controller:u,itemsStyles:d}=p.Carousel.useCarousel({itemsPerPage:n?e==null?void 0:e.config.slidesPerViewMobile:(h=e==null?void 0:e.config)==null?void 0:h.slidesPerView,gap:n?e.config.gapMobile:e.config.gap,direction:n&&i?"column":"row"});return s.jsx(Kt,{name:t,children:s.jsx(p.Utils.Column,{style:{width:o==="small"?"70%":"100%"},alignContent:"center",justifyContent:"center",alignItems:"center",children:s.jsxs(p.Carousel.Root,{innerRef:m=>{c(m)},className:p.helpers.classNameConcat(An["carousel-modifier"],"common-section"),children:[o==="medium"?s.jsxs(p.TextStructure.Root,{children:[r.ACTIVE_BENNEFITS_BAR_TITLE&&s.jsx(p.TextStructure.DivWrapper,{className:An["carousel-title-modifier"],children:s.jsx("h2",{className:"typography-style-body-lg",children:r.BENNEFITS_BAR_TITLE})}),n&&l.totalPages>1&&s.jsx(p.Carousel.Controller,{className:p.helpers.classNameConcat(An["row-controller-modifier"],r.ACTIVE_BENNEFITS_BAR_TITLE?An["title-on"]:void 0),children:s.jsxs(p.Carousel.Arrows,{children:[s.jsx(p.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.prevPage(),adornment:{start:s.jsx(p.Icon,{name:r.ICONS.arrow_left})}}),s.jsx(p.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.nextPage(),adornment:{start:s.jsx(p.Icon,{name:r.ICONS.arrow_right})}})]})})]}):s.jsx(s.Fragment,{}),s.jsx(p.Carousel.Body,{children:e.bennefit.map((m,_)=>s.jsx(p.Carousel.Item,{className:An["card-modifier"],style:d,children:s.jsx(p.Card,{stroke:!0,padding:"small",children:s.jsx(p.TextStructure.Root,{layoutProps:{columnWrapper:{alignContent:"start",alignItems:"start",justifyContent:"start"},textRow:{alignContent:"center",alignItems:"center",justifyContent:"center"}},adornment:{[o==="medium"?"top":"start"]:s.jsx(p.Icon,{name:m.icon,size:o==="medium"?"medium":"small"})},children:s.jsxs(p.TextStructure.DivWrapper,{alignItems:"start",children:[s.jsx("h3",{className:"typography-style-body-md",children:m.title}),m.subtitle&&m.subtitle.length?s.jsx("p",{className:"typography-style-body-xs",children:m.subtitle}):s.jsx(s.Fragment,{})]})})})},`bennefit=${_}`))}),!n&&l.totalPages>1?s.jsxs(p.Carousel.Controller,{className:An["row-controller-modifier"],children:[s.jsxs(p.Carousel.Arrows,{children:[s.jsx(p.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.prevPage(),adornment:{start:s.jsx(p.Icon,{name:r.ICONS.arrow_left})}}),s.jsx(p.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.nextPage(),adornment:{start:s.jsx(p.Icon,{name:r.ICONS.arrow_right})}})]}),s.jsx(p.Carousel.Bullets,{page:l.currentPage,total:l.totalPages,onBulletClick:m=>u==null?void 0:u.navigateTo(m)})]}):s.jsx(s.Fragment,{})]})})})},Og=({data:{componentIndex:e,...t},name:r,CONSTANTS:n})=>s.jsx(Kt,{name:r,children:s.jsx(Jc,{...t,CONSTANTS:n})}),Ag=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:r,className:n,name:o})=>s.jsx(Kt,{name:o,children:s.jsx("div",{className:p.helpers.classNameConcat(Va.textContentSection,n??""),style:e.borderTop?{borderTop:"none"}:void 0,children:s.jsx(R_,{data:e,ICONS:t,TEXTCONTENT_EXPANDED:r})})}),Ed={"accordion-modifier":"_accordion-modifier_1we16_1","accordion-body-modifier":"_accordion-body-modifier_1we16_7"},kg=({data:e,id:t,ICONS:r,className:n,name:o})=>{var l;const[i,c]=j.useState([]);return s.jsx(Kt,{name:o,children:s.jsxs(p.Utils.Column,{gap:"var(--gap-vertical-sm)",className:n??"",children:[e.titleAccordion?s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h2",{className:p.helpers.classNameConcat("typography-style-heading-sm","common-section"),style:{fontWeight:500},children:e.titleAccordion})})}):s.jsx(s.Fragment,{}),(l=e.accordions)==null?void 0:l.map((u,d)=>s.jsxs(p.Accordion.Wrapper,{className:Ed["accordion-modifier"],children:[s.jsx(p.Accordion.Header,{id:`${t}-text-accordion-${d}`,openIndicator:s.jsx(p.Icon,{name:r.arrow_down}),closeIndicator:s.jsx(p.Icon,{name:r.arrow_up}),startOpen:i.includes(d),onClick:()=>c(h=>h.includes(d)?h.filter(m=>m!==d):[...h,d]),children:s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{children:[s.jsx("h3",{className:"typography-style-body-md-strong",children:u.title}),u.subtitle&&u.subtitle.length?s.jsx("h2",{children:u.subtitle}):s.jsx(s.Fragment,{})]})})}),s.jsx(p.Accordion.Body,{children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:Ed["accordion-body-modifier"],children:s.jsx(ln.Editor,{editorKey:`${t}-editor-${d}`,blockRenderMap:b_,editorState:u.text?Gc(JSON.parse(u.text)):ln.EditorState.createEmpty(),onChange:()=>null})})})})]},`${t}-accordion-${d}-${i.includes(d)}`))]})})},Mg=async e=>{const{type:t}=e,r=t==="collectionSearch"?"/_v/proxy/search/product":"/_v/proxy/search/crosselling",n=JSON.stringify(t==="collectionSearch"?{...e.params,facets:e.facets,term:e.term,forceUpdate:!1}:e.facets);return(await U.fetchProxy(r,{method:"POST",headers:{"Content-Type":"application/json"},body:n}).then(i=>i.json()).then(i=>t==="collectionSearch"?i.data.products:i.products)).filter(i=>!!i.node.availability.status)},s0="_shelf__container_bi04n_10",Lg={shelf__container:s0},o0=({collectionSearch:e,title:t,CONSTANTS:r,searchModal:n})=>{const[o,i]=j.useState([]),{isMobile:c}=xe(),{ref:l,inView:u}=qd.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:d}=Ee();return j.useEffect(()=>{if(!e)return;function h(){var m,_;Mg({type:"collectionSearch",term:e==null?void 0:e.term,facets:e==null?void 0:e.facets,params:{count:((m=e==null?void 0:e.params)==null?void 0:m.count)??12,sort:((_=e==null?void 0:e.params)==null?void 0:_.sort)??r.ITEMS_DEFAULT_SORT}}).then(g=>{i(g)})}h()},[e]),j.useEffect(()=>{!u||o.length===0||d({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o},customData:{item_list_name:t??"Você também pode gostar"}}})},[u,o]),o.length===0?null:s.jsx("div",{ref:l,className:Lg.shelf__container,children:s.jsx(ws.Shelf,{title:t??"Você também pode gostar",itemsPerPage:n?{desktop:2,mobile:1.4}:{desktop:4.4,mobile:2.2},ICONS:r.ICONS,children:Array.isArray(o)&&o.map(({node:h},m)=>{const{availability:{status:_}}=h;return _?s.jsx(ws.Card,{item:h,isMobile:c,size:"medium",index:m,shelfTitle:t??"Você também pode gostar",CONSTANTS:r},h.id):null})})})},i0=({recommendationSearch:e,title:t,CONSTANTS:r})=>{const[n,o]=j.useState([]),{isMobile:i}=xe(),{ref:c,inView:l}=qd.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:u}=Ee(),d=j.useMemo(()=>e?[{key:e.type,value:e.productId}]:[],[e]);return j.useEffect(()=>{if(!e)return;function h(){var m;Mg({type:"recommendationSearch",facets:d,params:{count:((m=e==null?void 0:e.params)==null?void 0:m.count)??12,sort:r.ITEMS_DEFAULT_SORT}}).then(_=>o(_))}h()},[d,e]),j.useEffect(()=>{if(!l||n.length===0||(e==null?void 0:e.type)==="suggestions")return;const h=t??"Você também pode gostar";u({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:n},customData:{item_list_name:h},outsideEcommerceData:{item_list_name:h}}})},[l,n]),(n==null?void 0:n.length)===0?null:(e==null?void 0:e.type)==="suggestions"?s.jsx(ph,{products:n,innerRef:c,inView:l,CONSTANTS:r}):s.jsx("div",{ref:c,className:Lg.shelf__container,children:s.jsx(ws.Shelf,{title:t??"Você também pode gostar",itemsPerPage:{desktop:4.4,mobile:2.2},ICONS:r.ICONS,children:Array.isArray(n)&&n.map(({node:h},m)=>{const{availability:{status:_}}=h;return _?s.jsx(ws.Card,{item:h,isMobile:i,size:"medium",index:m,shelfTitle:t??"Você também pode gostar",CONSTANTS:r},h.id):null})})})},Dg=({data:e,name:t,CONSTANTS:r})=>{const{productId:n}=fp();return!(e!=null&&e.productLists)||e.productLists.length===0?null:e.productLists.map((o,i)=>s.jsx(Kt,{name:t,children:s.jsx(i0,{title:o.title,recommendationSearch:{type:o.product_group_option,productId:n,params:{count:o.number_of_items,sort:"score:desc"}},CONSTANTS:r},`shelf=${i}`)}))},Fg=({data:e,CONSTANTS:t,searchModal:r,name:n})=>{var i;const o=(i=e==null?void 0:e.productLists)==null?void 0:i.filter(c=>!!c.collectionId||!!c.search_base_name);return!o||o.length===0?null:o.map((c,l)=>{const u=c.collectionId?{term:"",facets:[{key:"productclusterids",value:`${c.collectionId}`}]}:{term:c.search_base_name,facets:[]};return s.jsx(Kt,{name:n,children:s.jsx(o0,{title:c.title,collectionSearch:{params:{count:c.number_of_items,sort:c.sort},...u},searchModal:r,CONSTANTS:t},`shelf=${l}`)})})},a0="_popup_5taxs_9",c0="_popup__overlay_5taxs_19",l0="_popup__modal_5taxs_27",Lt={popup:a0,popup__overlay:c0,popup__modal:l0,"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"},u0=e=>s.jsx("div",{className:Lt["popup__modal--success"],children:s.jsx(p.TextStructure.Root,{adornment:{start:s.jsx(p.Icon,{name:e.ICONS.check_circle,size:"large"})},children:s.jsxs(p.TextStructure.DivWrapper,{className:Lt["text-structure-modifier"],children:[s.jsx("h3",{className:"typography-style-body-sm-strong",children:e.successTitle}),s.jsx("p",{className:"typography-style-body-caption",children:e.successDescription})]})})}),d0=e=>{const{title:t,description:r,groups:n,ICONS:o}=e,{formErrors:i,submitForm:c,success:l}=ri(),[u,d]=j.useState(!1);return s.jsx("form",{onSubmit:c,className:Lt.formContainer,children:s.jsxs("div",{className:Lt["popup__modal--form"],children:[s.jsxs(p.TextStructure.DivWrapper,{className:Lt["popup__modal--header"],children:[s.jsx("strong",{className:"typography-style-body-md-strong",children:t}),s.jsx("p",{className:"typography-style-body-xs",children:r})]}),l?s.jsx(u0,{...e}):s.jsxs(s.Fragment,{children:[n.map(h=>s.jsx(zn.FieldGroup,{group:h,children:s.jsx(zn.FieldWrapper,{fields:h.fields})},h.groupLabel)),s.jsx(p.Checkbox,{className:Lt["popup__modal--checkbox"],adornment:s.jsx(p.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:u,onChange:()=>d(!u)}),s.jsxs("div",{children:[!u&&s.jsx(p.TextStructure.DivWrapper,{className:Lt["popup__modal--status"],children:s.jsxs("p",{className:"typography-style-body-caption",children:[s.jsx(p.Icon,{size:"small",name:o.alert_circle}),Fv]})}),s.jsx(p.Button,{disabled:!u,size:"medium",type:"submit",children:qv}),i.length?s.jsx(p.TextStructure.DivWrapper,{className:Lt["popup__modal--status"],children:s.jsx("p",{className:p.helpers.classNameConcat(Lt.formSubmitWarning,"typography-style-body-xs"),children:zv})}):null]})]})]})})},zg=({data:e,name:t,CONSTANTS:r})=>{const[n,o]=j.useState(!1),i=typeof window<"u"?window.sessionStorage.getItem(r.POPUP_TRACK_STORAGE)||window.localStorage.getItem(r.POPUP_SUBMITTED_STORAGE):null,c=()=>{o(!1),window.sessionStorage.setItem(r.POPUP_TRACK_STORAGE,"true")};return j.useEffect(()=>{setTimeout(()=>!i&&o(!0),2e3)},[]),e.active&&n?s.jsx(Kt,{name:t,children:s.jsxs("div",{className:Lt.popup,children:[s.jsx("div",{onClick:c,className:Lt.popup__overlay}),s.jsxs("div",{className:Lt.popup__modal,children:[s.jsx(p.Button,{onClick:c,variant:"tertiary",className:Lt["popup__modal--close"],children:s.jsx(p.Icon,{style:{color:e.closeColor||"#000"},name:r.ICONS.close,size:"medium"})}),s.jsx("div",{children:s.jsx(at.Image,{src:e.imageUrl,width:"459",height:"418",alt:e.title})}),s.jsx(ig,{...e,children:s.jsx(d0,{...e,ICONS:r.ICONS})})]})]})}):null},f0={"Image Grid":Pg,"Embed Live":Ng,"Banner Carousel":Rg,Banner:Qc,"Bennefits Bar":Tg,newsletter:Og,TextContent:Ag,TextAccordion:kg,"Product Carousel":Fg,"PDP Product Carousel":Dg,"Popup Modal":zg},qg=({data:e,identifyWhoIsFirst:t=!1,componentConfigs:r})=>e==null?void 0:e.map((n,o)=>{const i=f0[n.name],c={...(r==null?void 0:r[n.name])??{}};return t&&o===0&&(n.data.first=!0),n.data.componentIndex=o,n.name==="TextAccordion"&&(c.id=`text-accordion-${o}`),i?s.jsx(i,{name:n.name,data:n.data,...c},`section-zone-component-${o}`):null});async function p0({slug:e,pageData:t,tabsData:r,oneTrust:n}){var l,u,d,h;const i=(r?[...r].sort((m,_)=>m.config.tabConfig.order-_.config.tabConfig.order):[]).map(m=>({slug:m.config.seo.slug||za(m.config.tabConfig.title),title:m.config.tabConfig.title})),c=r==null?void 0:r.find(m=>m.config.seo.slug===`/${decodeURIComponent(e)}`);return c&&(c.id=za(c.config.seo.slug||"")),s.jsxs("div",{className:Xr.root,children:[s.jsx(ac,{children:s.jsx(JE,{title:(l=t==null?void 0:t.config.banners)==null?void 0:l.altImageBackgroud,srcImages:{desktop:(u=t==null?void 0:t.config.banners)==null?void 0:u.imageBackgroudDesk,mobile:(h=(d=t==null?void 0:t.config)==null?void 0:d.banners)==null?void 0:h.imageBackgroudMobile}})}),s.jsxs(ac,{children:[s.jsx("div",{className:Xr.slugs,children:i.map(m=>s.jsx(wt,{href:m.slug?`/politicas/${m.slug.replace(/^\/+/,"")}`:"#",className:m.slug===(c==null?void 0:c.id)?Xr.active:"",title:m.title,scroll:!1,children:m.title},m.slug.replace(/^\/+/,"")))}),s.jsx("div",{className:Xr["content-page-modifier"],children:e==="privacidade-e-seguranca"?s.jsx(ZE,{oneTrust:n}):s.jsx(qg,{data:(c==null?void 0:c.sections)??[]})})]})]})}const gr={"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"},Bg=({data:e,ERROR_TEMPLATE_RETURN_BUTTON:t})=>{const{router:r}=Ae();return s.jsx("div",{children:s.jsxs(p.Banner.Container,{className:gr["banner-wrapper"],children:[s.jsxs(p.Banner.ImageWrapper,{className:gr["banner-image"],children:[s.jsx(at.Image,{className:gr["banner-desktop"],alt:e.altImageBackgroud??e.imageBackgroudDesk,src:e.imageBackgroudDesk,width:1366,height:695,priority:!0}),s.jsx(at.Image,{className:gr["banner-mobile"],alt:e.altImageBackgroud??e.imageBackgroudMobile,src:e.imageBackgroudMobile,width:375,height:755,priority:!0})]}),s.jsx(p.Banner.Slot,{className:p.helpers.classNameConcat(gr["text-wrapper"],gr["text-wrapper-modifier"]),margin:107,children:s.jsxs(p.TextStructure.Root,{layoutProps:{textRow:{className:gr["custom-row"]}},children:[s.jsxs(p.TextStructure.DivWrapper,{className:p.helpers.classNameConcat(gr["text-area"],gr["text-area-modifier"]),children:[s.jsx("h1",{className:"typography-style-display-strong",children:e.title}),s.jsx("h2",{className:"typography-style-body-lg",children:e.subTitle}),s.jsx("p",{className:"typography-style-body-sm",children:e.description})]}),s.jsx(p.Button,{onClick:()=>r.push("/"),children:t})]})})]})})};Bg.displayName="ErrorTemplate";const h0={codVenderoda:"",orderformId:"",cupom:"",setCodVendedora:()=>null,setCupom:()=>null,setOrderformId:()=>null,setConfiguration:()=>null,update:()=>!1,isValidSharedCart:()=>!1},m0=j.createContext(h0);function _0(){return j.useContext(m0)}function ya(e,t=""){if(!e)return;if(!t)if(typeof window<"u")t=window.location.href;else return;e=e.replace(/[[\]]/g,"\\$&");const n=new RegExp(`[?&]${e}(=([^&#]*)|&|#|$)`).exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null}function va(){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 g0="_container_df1ql_11",xa={"action-button":"_action-button_df1ql_1",container:g0,"container-icon":"_container-icon_df1ql_31"};function y0({icon:e,text:t,onClick:r,isActive:n=!1}){const o=i=>{i.preventDefault(),n&&r()};return s.jsxs("div",{className:p.helpers.classNameConcat(xa["action-button"],n?"":"disable"),onClick:i=>o(i),children:[s.jsx("div",{className:p.helpers.classNameConcat(xa["container-icon"],n?"":"disable"),children:s.jsx("img",{src:e,alt:"icon"})}),s.jsxs("div",{className:p.helpers.classNameConcat(xa.container,n?"":"disable"),children:[s.jsx("span",{children:t}),s.jsx("img",{src:"/images/Widget_open/navigate_next-black-18dp.png",alt:"next"})]})]})}const v0="_container_k11me_1",x0="_header_k11me_18",b0="_body_k11me_45",fs={container:v0,header:x0,body:b0,"copy-cart-button":"_copy-cart-button_k11me_78","reset-orderform-button":"_reset-orderform-button_k11me_110"};function j0(e,t=!1,r){const{base:n,orderformId:o}=e,i=r==null?void 0:r.split("codigo: ")[1],c=localStorage.getItem("maiscarrinho"),l={medium:t?"&utm_medium=carrinho_compartilhado":"&utm_medium=linkvendedor",campaign:`&utm_campaign=${encodeURIComponent(r??"")}`,cp:i?`&utmi_cp=${i}`:"",source:`&utm_source=${c}`};return t?`${n}/checkout/?orderFormId=${o}${l.source}${l.campaign}${l.cp}${l.medium}#/cart`:`${n}/checkout/?orderFormId=${o}${l.source}${l.campaign}${l.cp}${l.medium}#/payment`}function S0(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 Id({mode:e,config:t,newCart:r}){const[n,o]=j.useState(!1),[i,c]=j.useState(""),l=j0(t,e==="cart",t.sellerCode),{useClipboard:u}=Fo.hooks,[,d]=u();function h(){o(!0);const m=document.createElement("textArea");m.readOnly=!0,m.contentEditable="true",m.value=i,document.body.appendChild(m),m.select(),d(m.value),document.body.removeChild(m),setTimeout(()=>{o(!1)},3e3)}return j.useEffect(()=>{c(""),c("Gerando link..."),S0(l).then(m=>c(m)).catch(()=>c("Algo deu errado, tente novamente mais tarde"))},[l]),s.jsxs("div",{className:fs.container,children:[s.jsxs("div",{className:fs.header,children:[s.jsx("img",{src:e==="cart"?"/images/Modal_compartilhar_sacola/ico_sacola_big.png":"/images/Modal_compartilhar_editavel/ico_form_big.png",alt:"close"}),s.jsxs("span",{className:"text",children:[" ",e==="cart"?"Compartilhar a Sacola":"Compartilhar link para pagamento"]})]}),s.jsxs("div",{className:fs.body,children:[s.jsx("p",{children:e==="cart"?`Envie a sacola para um ou mais clientes usando o link abaixo ou
|
|
27
|
+
compartilhe direto por whatsapp`:"Envie a sacola para um cliente usando o link abaixo ou compartilhe direto por whatsapp"}),s.jsxs("form",{children:[s.jsx("input",{type:"text",disabled:!0,value:i}),s.jsxs("div",{className:p.helpers.classNameConcat(fs["copy-cart-button"],i?"active":""),children:[s.jsx("img",{src:"/images/Feedback_copiado/ico_share.png",alt:"share",className:"share",onClick:()=>i&&h()}),n&&s.jsx("div",{className:"share-input-copy-feedback",children:"Link Copiado"})]})]}),s.jsx("button",{className:fs["reset-orderform-button"],onClick:()=>{Zt.set(ko,{}),r()},children:"Novo Atendimento"})]})]})}const C0="_container_jla2u_1",w0="_header_jla2u_24",E0="_body_jla2u_56",ps={container:C0,header:w0,"header-open":"_header-open_jla2u_29","close-btn":"_close-btn_jla2u_48",body:E0};var Yt=(e=>(e.base="base",e.shareCart="shareCart",e.sharePayment="sharePayment",e))(Yt||{});const Pd=({text:e,isActive:t,onClick:r,icon:n,iconDisabled:o})=>s.jsx(y0,{icon:t?n:o,text:t?e:"Preencha a sacola para compartilhar",onClick:r,isActive:t}),I0=({config:e,isshowing:t})=>{var T,O,M;const[r,n]=j.useState(!1),[o,i]=j.useState(""),{addCouponSeller:c,cartStore:l}=Xe(),[u,d]=j.useState(t??!1),{setOrderformId:h,update:m,isValidSharedCart:_,setConfiguration:g,setCodVendedora:v}=_0(),[x,S]=j.useState(Yt.base),w=j.useMemo(()=>l,[l]),{marketingData:P}=Fo.stores.cart.useGetCartStoreState();j.useEffect(()=>{ya("cleverapp")==="true"&&(localStorage.setItem("maiscarrinho","cleverapp"),window.location.replace("/")),ya("televendas")==="true"&&(localStorage.setItem("maiscarrinho","televendas"),window.location.replace("/")),ya("vendedora")==="true"&&(localStorage.setItem("maiscarrinho","vendedora"),va())},[]),j.useEffect(()=>{var z,D,B,G,J;(z=w==null?void 0:w.openTextField)!=null&&z.value&&i(((D=w==null?void 0:w.openTextField)==null?void 0:D.value)??""),(B=w.openTextField)!=null&&B.value&&(v(String((G=w.openTextField)==null?void 0:G.value).split("codigo")[1]),c(String((J=w.openTextField)==null?void 0:J.value),"seller")),h(w.id),localStorage.getItem("maiscarrinho")&&d(!0)},[w.id,(T=w.openTextField)==null?void 0:T.value,v,h,c]);const I=()=>{g(e),S(Yt.base),n(!r),h(w.id),setTimeout(()=>{_()&&m(w.id)},300)},{id:C}=Fo.stores.cart.useGetCartStoreState(),N=z=>{U.postMediaData({apiUrl:"/api/marketingData",body:{orderFormId:C,coupon:P==null?void 0:P.coupon,utmiCampaign:"codigodavendedora",utmSource:"widget",utmMedium:z===Yt.sharePayment?"linkvendedor":"carrinho_compartilhado"}}),S(z)};return s.jsx(s.Fragment,{children:u&&s.jsxs("div",{className:p.helpers.classNameConcat(ps.container,r?"open":""),children:[s.jsx("div",{className:p.helpers.classNameConcat(ps.header,r?"open":""),onClick:I,children:r?s.jsxs("div",{className:ps["header-open"],children:[s.jsx("div",{className:ps["close-btn"],children:s.jsx("img",{src:"/images/Widget_open/close_grey_24x24.png",alt:"close",width:30,height:30})}),s.jsx("img",{src:"/images/Widget_compacto/ico_vendedora_big.png",alt:"close",width:30,height:30}),s.jsx("span",{className:"text",children:"Vendedor"})]}):s.jsx("img",{src:"/images/Widget_compacto/ico_vendedora_big.png",alt:"logo",width:30,height:30})}),r&&s.jsx("div",{className:ps.body,children:s.jsxs(s.Fragment,{children:[x===Yt.base&&s.jsxs(s.Fragment,{children:[s.jsx(Pd,{icon:"/images/Modal_compartilhar_sacola/ico_sacola_big.png",iconDisabled:"/images/Widget_open/ico_sacola_disabled.png",text:"Compartilhar a Sacola",onClick:()=>N(Yt.shareCart),isActive:w.items.length>0&&!!((O=w==null?void 0:w.openTextField)!=null&&O.value)}),s.jsx(Pd,{icon:"/images/Modal_compartilhar_editavel/ico_form_big.png",iconDisabled:"/images/Widget_open_disabled/ico_form_disabled.png",text:"Compartilhar link para pagamento",onClick:()=>N(Yt.sharePayment),isActive:w.items.length>0&&!!((M=w.openTextField)!=null&&M.value)})]}),x===Yt.shareCart&&s.jsx(Id,{mode:"cart",config:{...e,sellerCode:o,orderformId:w.id},newCart:()=>{va(),S(Yt.base)}}),x===Yt.sharePayment&&s.jsx(Id,{mode:"payment",config:{...e,sellerCode:o,orderformId:w.id},newCart:()=>{va(),S(Yt.base)}})]})})]})})},dn={teamComponents:{AddToCart:Rc,BackToTop:yx,HelpButton:Aw,BuyPackage:ph,Filter:{...br,helpers:Nm},...eS,FreightCalculation:ym,Header:gm,Link:wt,Media:at,PLPNavigation:Br,ProductCard:Ue,ProductList:Dt,ProductVariationList:rr,Sort:Xo,UserMenu:Qo,Newsletter:Jc,Form:zn,Table:Oo},template:{minicart:Pt,pdc:W_,pdc_composites:tr,pdp:lC,searchResult:X_,wishList:Jp,LPCadastro:Qw,SearchModal:ug,LPStores:pr,tracker:WE,Politicas:p0,ErrorTemplate:Bg,WidgetVendedora:I0},utils:{EventCollector:vw,ExternalScripts:Cw,LinkOrNotLink:mn,ObserverWrapper:Ko,SnackBarComponent:Fn,DraftJsLinkWrapper:x_}},P0=(e,t)=>{const r=e.map(o=>`'${o.source}'`).join(`,
|
|
28
28
|
`);return`
|
|
29
29
|
import type { NextRequest } from 'next/server'
|
|
30
30
|
import { NextResponse } from 'next/server'
|
|
@@ -64,4 +64,4 @@ See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-comp
|
|
|
64
64
|
${r}
|
|
65
65
|
]
|
|
66
66
|
}
|
|
67
|
-
`},I0=Object.freeze(Object.defineProperty({__proto__:null,generateMiddleware:E0},Symbol.toStringTag,{value:"Module"})),P0={helpers:I0},N0={Banner:Qc},qg=j.createContext({}),R0=({data:e,children:t,...r})=>{var v,x,S,w,P,I,C,N,T,O,M,z,D;const[n,o]=j.useState(!0),{initialize:i,controller:c,itemsStyles:l}=p.Carousel.useCarousel({gap:0,itemsPerPage:1}),u={slideTranstionTimer:(x=(v=e==null?void 0:e.staticConfig)==null?void 0:v.staticConfig)==null?void 0:x.slideTranstionTimer,showCarouselArrows:(w=(S=e==null?void 0:e.staticConfig)==null?void 0:S.staticConfig)==null?void 0:w.showCarouselArrows,hasCloseBtn:(I=(P=e==null?void 0:e.staticConfig)==null?void 0:P.staticConfig)==null?void 0:I.hasCloseBtn,backgroundColor:(N=(C=e==null?void 0:e.staticConfig)==null?void 0:C.staticConfig)==null?void 0:N.backgroundColor,textColorVariant:(O=(T=e==null?void 0:e.staticConfig)==null?void 0:T.staticConfig)==null?void 0:O.textColorVariant,content:((z=(M=e==null?void 0:e.content)==null?void 0:M.content)==null?void 0:z.items)??[]},d=(D=u.content)==null?void 0:D.filter(B=>!B.countDownEndDate||new Date(B.countDownEndDate)>new Date),h=d.length>1,m={...u.backgroundColor?{backgroundColor:u.backgroundColor}:{}},_=()=>{o(!1)},g=p.helpers.ValidateProp({fieldTypes:Dn.Mode,property:u.textColorVariant,fallback:"default"});return s.jsx(qg.Provider,{value:{isOpen:n,setIsOpen:o,hasCarousel:h,backgroundStyle:m,handleCloseTipbar:_,mode:g,slideTranstionTimer:u.slideTranstionTimer,showCarouselArrows:u.showCarouselArrows,hasCloseBtn:u.hasCloseBtn,slices:d,carouselProps:{initialize:i,controller:c,itemsStyles:l},...r},children:t})},Sr=()=>j.useContext(qg),T0=({dateEnd:e,...t})=>{const{CONSTANTS:{TIME_ZONE:r}}=Sr();return s.jsx(qo,{dateEnd:new Date(e),TIME_ZONE:r,...t})},O0="_tipbar_bt3p0_1",A0="_tipbar__carousel_bt3p0_15",$s={tipbar:O0,tipbar__carousel:A0,"tipbar__close-btn":"_tipbar__close-btn_bt3p0_29","tipbar-item":"_tipbar-item_bt3p0_37","tipbar-item__coupon":"_tipbar-item__coupon_bt3p0_45"},k0=({coupon:e,feedbackTitle:t,feedbackDescription:r,...n})=>{const{CONSTANTS:o}=Sr(),{addCouponSeller:i,cartStore:c}=Xe(),[l,u]=j.useState({status:!1,showSnackBar:!1}),[d,h]=j.useState(!1),[m,_]=j.useState(!1),g=async()=>{if(!c.items.length){_(!0);return}(await i(e,"coupon")).code===200?u({status:!0,showSnackBar:!0}):h(!0)};return j.useEffect(()=>{l.showSnackBar&&setTimeout(()=>{u(v=>({...v,showSnackBar:!1}))},o.TIPBAR_CONFIGS.snackbar_timeout)},[l.showSnackBar]),j.useEffect(()=>{d&&setTimeout(()=>{h(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[d]),j.useEffect(()=>{m&&setTimeout(()=>{_(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[m]),s.jsxs(s.Fragment,{children:[s.jsx(p.Button,{...n,onClick:g,disabled:l.status,className:$s["tipbar-item__coupon"],children:l.status?`${o.TIPBAR_CONFIGS.coupon_applied_message}`:`${o.TIPBAR_CONFIGS.coupon_default_message}`}),l.showSnackBar&&(t||r)&&s.jsx(Fn,{title:t,subtitle:r,Z_INDEX_WAR:o.Z_INDEX_WAR},`feedback-coupon-${e}`),d&&s.jsx(Fn,{title:o.TIPBAR_CONFIGS.coupon_error_title,subtitle:o.TIPBAR_CONFIGS.coupon_error_message,Z_INDEX_WAR:o.Z_INDEX_WAR},`error-coupon-${e}`),m&&s.jsx(Fn,{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}`)]})},M0=({title:e,description:t,style:r,mode:n,className:o})=>s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{mode:n,className:o,children:[e&&s.jsx("h3",{className:"typography-style-body-sm",style:r,children:e}),t&&s.jsx("p",{className:"typography-style-caption",style:r,children:t})]})}),L0=({coupon:e,...t})=>{const{CONSTANTS:r}=Sr();return s.jsx(p.Copy,{...t,iconCopy:r.ICONS.copy,iconSuccess:r.ICONS.check,children:e})},D0=({staticZone:e,type:t,className:r,description:n,title:o})=>{const{mode:i}=Sr();if(t==="countdown")return s.jsx(T0,{dateEnd:e.countDownEndDate,size:"x-small",mode:i});if(t==="coupon"){const c=p.helpers.ValidateProp({fieldTypes:Dn.Mode,property:e.couponButtonMode,fallback:"default"}),l=p.helpers.ValidateProp({fieldTypes:Dn.VariantsExtended,property:e.couponButtonVariant,fallback:"primary"});return e.coupon?s.jsx(k0,{coupon:e.coupon,mode:c,variant:l,feedbackTitle:e.couponFeedbackTitle,feedbackDescription:e.couponFeedbackDescription}):null}if(t==="copy"){const c=p.helpers.ValidateProp({fieldTypes:Dn.Mode,property:e.couponButtonMode,fallback:"default"});return e.coupon?s.jsx(L0,{coupon:e.coupon,mode:c}):null}return s.jsx(M0,{title:o,description:n,mode:i,className:r})},Pd=({handleCloseTipbar:e,mode:t})=>{const{CONSTANTS:r}=Sr();return s.jsx(p.Button,{title:"fechar tipbar",className:$s["tipbar__close-btn"],onClick:e,variant:"tertiary",mode:t,adornment:{start:s.jsx(p.Icon,{name:r.ICONS.close})}})},F0=({children:e,mode:t="default",showCarouselArrows:r=!0,slideTranstionTimer:n})=>{const{carouselProps:o,CONSTANTS:i}=Sr(),c=j.useRef(null),l=(d,h)=>{var m,_;d.stopPropagation(),d.preventDefault(),h==="prev"?(m=o.controller)==null||m.prevPage():(_=o.controller)==null||_.nextPage(),c.current&&(clearInterval(c.current),u())},u=j.useCallback(()=>{if(n&&o.controller){const d=setInterval(()=>{var h;(h=o.controller)==null||h.nextPage()},n);c.current=d}},[n,o]);return j.useEffect(()=>(u(),()=>{c.current&&clearInterval(c.current)}),[n,u]),s.jsxs(p.Carousel.Root,{innerRef:d=>{o.initialize(d)},className:$s.tipbar__carousel,style:{flexDirection:"row",alignItems:"center"},children:[r&&s.jsx(p.Button,{variant:"tertiary",mode:t,onClick:d=>l(d,"prev"),adornment:{start:s.jsx(p.Icon,{name:i.ICONS.arrow_left})}}),s.jsx(p.Carousel.Body,{children:e}),r&&s.jsx(p.Button,{variant:"tertiary",mode:t,onClick:d=>l(d,"next"),adornment:{start:s.jsx(p.Icon,{name:i.ICONS.arrow_right})}})]})},z0=({children:e,className:t})=>{const{hasCarousel:r,mode:n,hasCloseBtn:o,backgroundStyle:i,showCarouselArrows:c,slideTranstionTimer:l,handleCloseTipbar:u}=Sr(),d=r&&c;return s.jsx("div",{style:i,"data-hasclosebtn":o,className:p.helpers.classNameConcat($s.tipbar,t),children:r?s.jsxs(s.Fragment,{children:[s.jsx(F0,{mode:n,showCarouselArrows:d,slideTranstionTimer:l,children:e}),o&&s.jsx(Pd,{handleCloseTipbar:u,showCarouselArrows:d,mode:n})]}):s.jsxs(s.Fragment,{children:[e,o&&s.jsx(Pd,{handleCloseTipbar:u,mode:n})]})})},q0=({children:e,highlightFirstSection:t,...r})=>{const{hasCarousel:n,carouselProps:o}=Sr(),i=s.jsx("div",{...r,className:$s["tipbar-item"],children:e});return n?s.jsx(p.Carousel.Item,{style:o.itemsStyles,children:i}):i},Bg=({className:e})=>{const{isOpen:t,slices:r}=Sr();return r.length&&t?s.jsx(z0,{children:r.map((n,o)=>{var i;return s.jsx(s.Fragment,{children:s.jsx(mn,{href:n.link,children:s.jsx(q0,{highlightFirstSection:n.highlightFirstSection,"data-justifyhighlightedsection":n.horizontalAlignHighlightedSection?n.horizontalAlignHighlightedSection:"center",children:n&&((i=n==null?void 0:n.items)!=null&&i.length)?n.items.map((c,l)=>s.jsx(D0,{staticZone:n,type:c.type,title:c.title,description:c.description,className:e},`tipbar-slice-field-${l}`)):null})})},`tipbar-slice-${o}`)})}):null};Bg.displayName="TipBar.Root";const cc=({className:e,...t})=>s.jsx(R0,{...t,children:s.jsx(Bg,{className:e})});cc.displayName="TipBar";const B0=({CONSTANTS:e,data:t})=>{const{pathname:r}=Ae(),{tipbarRef:n}=Ze(),o=l=>{const u=t==null?void 0:t.find(d=>{var h,m,_,g,v;return((m=(h=d.staticConfig)==null?void 0:h.staticConfig)==null?void 0:m.deviceType)===l&&((v=(g=(_=d.staticConfig)==null?void 0:_.staticConfig)==null?void 0:g.paths)==null?void 0:v.includes(r))});return u||(t==null?void 0:t.find(d=>{var h,m,_,g,v,x;return((m=(h=d.staticConfig)==null?void 0:h.staticConfig)==null?void 0:m.deviceType)===l&&(!((g=(_=d.staticConfig)==null?void 0:_.staticConfig)!=null&&g.paths)||((x=(v=d.staticConfig)==null?void 0:v.staticConfig)==null?void 0:x.paths.length)===0)}))},i=o("desktop"),c=o("mobile");return s.jsxs("div",{ref:n,className:U.responsive["responsive-flex"],children:[c&&s.jsx("div",{className:U.responsive["responsive-mobile-flex"],children:s.jsx(cc,{data:c,CONSTANTS:e})}),i&&s.jsx("div",{className:U.responsive["responsive-desktop-flex"],children:s.jsx(cc,{data:i,CONSTANTS:e})})]})},U0=({SectionZone:e,name:t,previewId:r})=>{const[n,o]=j.useState();return j.useEffect(()=>{n||U.fetchContentType("search",{name:t,previewId:r}).then(i=>{i!=null&&i.data&&Array.isArray(i.data)&&o(i.data[0])})},[]),s.jsx(e,{data:n??[]})},H0=e=>{const t=V0(W0(e));return $0(t)},$0=e=>{const t=[];for(const r in e)t.push(...e[r]);return t},W0=e=>!e||!Array.isArray(e)?{}:e==null?void 0:e.reduce((t,r)=>{if(r!=null&&r.cidade){let n=t[r==null?void 0:r.cidade];n===void 0&&(n=t[r==null?void 0:r.cidade]=[]),n.push(r)}return t},{}),V0=e=>{if(!e||!Object.keys(e).length)return{};const t=Object.keys(e).sort((n,o)=>n.localeCompare(o)),r={};for(const n of t)r[n]=e[n];return r},G0=({content:e,data:t,showVendor:r,ICONS:n,entity:o,LPLOJAS_TEMPLATE_RETURN_BUTTON:i})=>{const[c,l]=j.useState([]);return j.useEffect(()=>{(async()=>{try{const d=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(!d.ok)throw new Error(`[LPStoresClientWrapper] MasterData error ${d.status}`);const h=await d.json();l(H0(h))}catch(d){console.error(d)}})()},[o]),!Array.isArray(t)||!t.length?null:s.jsxs(pr.Root,{data:c,children:[s.jsx(pr.Title,{children:e.titlePage}),s.jsx(pr.Section,{imgSrcDesk:e.imageBackgroundDesk,imgSrcMob:e.imageBackgroundMob,imgAlt:e.altImageBackgroud,children:s.jsx(pr.Content,{showVendor:r,ICONS:n,LPLOJAS_TEMPLATE_RETURN_BUTTON:i})})]})},K0=({data:e,children:t,SectionZone:r,responsive:n,COMMON_PAGE_COLUMN_GAP:o})=>{var m,_;const i=((m=e==null?void 0:e.filter(g=>g.config.responsive.deviceType==="mobile")[0])==null?void 0:m.sections)||[],c=((_=e==null?void 0:e.filter(g=>g.config.responsive.deviceType==="desktop")[0])==null?void 0:_.sections)||[],l=i.slice(0,1),u=i.slice(1,i.length),d=c.slice(0,1),h=c.slice(1,c.length);return s.jsxs(s.Fragment,{children:[s.jsxs(p.Utils.Column,{className:p.helpers.classNameConcat(n["responsive-mobile-flex"],"utils-column-modifier"),children:[s.jsx(r,{data:l??[]}),s.jsxs(p.Utils.Column,{gap:o,children:[t,s.jsx(r,{data:u??[]})]})]}),s.jsxs(p.Utils.Column,{className:p.helpers.classNameConcat(n["responsive-desktop-flex"],"utils-column-modifier"),children:[s.jsx(r,{data:d??[]}),s.jsxs(p.Utils.Column,{gap:o,children:[t,s.jsx(r,{data:h??[]})]})]})]})},Q0={Banner:N0,BannerSection:Us,BennefitsBarSection:Ng,SingleBannerSection:Qc,TextContentSection:Tg,BannerCarousel:Pg,TextAccordionSection:Og,TipbarScreening:B0,ImageGrid:Eg,SearchPageScreening:U.SearchPageScreening,SearchContent:U0,NewsletterSection:Rg,PDPProductCarousel:Mg,ProductCarousel:Lg,EmbedLive:Ig,PopupModalSection:Dg,SectionZone:Fg,LPStoresClientWrapper:G0,WishlistScreening:K0},Y0={Components:Q0,helpers:_C};exports.configureFetchProxy=U.configureFetchProxy;exports.fetchProxy=U.fetchProxy;exports.proxyCartAPI=U.proxyCartAPI;exports.cms=Y0;exports.contexts=Fo;exports.data=Pc;exports.layout=dn;exports.scripts=P0;
|
|
67
|
+
`},N0=Object.freeze(Object.defineProperty({__proto__:null,generateMiddleware:P0},Symbol.toStringTag,{value:"Module"})),R0={helpers:N0},T0={Banner:Qc},Ug=j.createContext({}),O0=({data:e,children:t,...r})=>{var v,x,S,w,P,I,C,N,T,O,M,z,D;const[n,o]=j.useState(!0),{initialize:i,controller:c,itemsStyles:l}=p.Carousel.useCarousel({gap:0,itemsPerPage:1}),u={slideTranstionTimer:(x=(v=e==null?void 0:e.staticConfig)==null?void 0:v.staticConfig)==null?void 0:x.slideTranstionTimer,showCarouselArrows:(w=(S=e==null?void 0:e.staticConfig)==null?void 0:S.staticConfig)==null?void 0:w.showCarouselArrows,hasCloseBtn:(I=(P=e==null?void 0:e.staticConfig)==null?void 0:P.staticConfig)==null?void 0:I.hasCloseBtn,backgroundColor:(N=(C=e==null?void 0:e.staticConfig)==null?void 0:C.staticConfig)==null?void 0:N.backgroundColor,textColorVariant:(O=(T=e==null?void 0:e.staticConfig)==null?void 0:T.staticConfig)==null?void 0:O.textColorVariant,content:((z=(M=e==null?void 0:e.content)==null?void 0:M.content)==null?void 0:z.items)??[]},d=(D=u.content)==null?void 0:D.filter(B=>!B.countDownEndDate||new Date(B.countDownEndDate)>new Date),h=d.length>1,m={...u.backgroundColor?{backgroundColor:u.backgroundColor}:{}},_=()=>{o(!1)},g=p.helpers.ValidateProp({fieldTypes:Dn.Mode,property:u.textColorVariant,fallback:"default"});return s.jsx(Ug.Provider,{value:{isOpen:n,setIsOpen:o,hasCarousel:h,backgroundStyle:m,handleCloseTipbar:_,mode:g,slideTranstionTimer:u.slideTranstionTimer,showCarouselArrows:u.showCarouselArrows,hasCloseBtn:u.hasCloseBtn,slices:d,carouselProps:{initialize:i,controller:c,itemsStyles:l},...r},children:t})},Sr=()=>j.useContext(Ug),A0=({dateEnd:e,...t})=>{const{CONSTANTS:{TIME_ZONE:r}}=Sr();return s.jsx(qo,{dateEnd:new Date(e),TIME_ZONE:r,...t})},k0="_tipbar_bt3p0_1",M0="_tipbar__carousel_bt3p0_15",$s={tipbar:k0,tipbar__carousel:M0,"tipbar__close-btn":"_tipbar__close-btn_bt3p0_29","tipbar-item":"_tipbar-item_bt3p0_37","tipbar-item__coupon":"_tipbar-item__coupon_bt3p0_45"},L0=({coupon:e,feedbackTitle:t,feedbackDescription:r,...n})=>{const{CONSTANTS:o}=Sr(),{addCouponSeller:i,cartStore:c}=Xe(),[l,u]=j.useState({status:!1,showSnackBar:!1}),[d,h]=j.useState(!1),[m,_]=j.useState(!1),g=async()=>{if(!c.items.length){_(!0);return}(await i(e,"coupon")).code===200?u({status:!0,showSnackBar:!0}):h(!0)};return j.useEffect(()=>{l.showSnackBar&&setTimeout(()=>{u(v=>({...v,showSnackBar:!1}))},o.TIPBAR_CONFIGS.snackbar_timeout)},[l.showSnackBar]),j.useEffect(()=>{d&&setTimeout(()=>{h(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[d]),j.useEffect(()=>{m&&setTimeout(()=>{_(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[m]),s.jsxs(s.Fragment,{children:[s.jsx(p.Button,{...n,onClick:g,disabled:l.status,className:$s["tipbar-item__coupon"],children:l.status?`${o.TIPBAR_CONFIGS.coupon_applied_message}`:`${o.TIPBAR_CONFIGS.coupon_default_message}`}),l.showSnackBar&&(t||r)&&s.jsx(Fn,{title:t,subtitle:r,Z_INDEX_WAR:o.Z_INDEX_WAR},`feedback-coupon-${e}`),d&&s.jsx(Fn,{title:o.TIPBAR_CONFIGS.coupon_error_title,subtitle:o.TIPBAR_CONFIGS.coupon_error_message,Z_INDEX_WAR:o.Z_INDEX_WAR},`error-coupon-${e}`),m&&s.jsx(Fn,{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}`)]})},D0=({title:e,description:t,style:r,mode:n,className:o})=>s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{mode:n,className:o,children:[e&&s.jsx("h3",{className:"typography-style-body-sm",style:r,children:e}),t&&s.jsx("p",{className:"typography-style-caption",style:r,children:t})]})}),F0=({coupon:e,...t})=>{const{CONSTANTS:r}=Sr();return s.jsx(p.Copy,{...t,iconCopy:r.ICONS.copy,iconSuccess:r.ICONS.check,children:e})},z0=({staticZone:e,type:t,className:r,description:n,title:o})=>{const{mode:i}=Sr();if(t==="countdown")return s.jsx(A0,{dateEnd:e.countDownEndDate,size:"x-small",mode:i});if(t==="coupon"){const c=p.helpers.ValidateProp({fieldTypes:Dn.Mode,property:e.couponButtonMode,fallback:"default"}),l=p.helpers.ValidateProp({fieldTypes:Dn.VariantsExtended,property:e.couponButtonVariant,fallback:"primary"});return e.coupon?s.jsx(L0,{coupon:e.coupon,mode:c,variant:l,feedbackTitle:e.couponFeedbackTitle,feedbackDescription:e.couponFeedbackDescription}):null}if(t==="copy"){const c=p.helpers.ValidateProp({fieldTypes:Dn.Mode,property:e.couponButtonMode,fallback:"default"});return e.coupon?s.jsx(F0,{coupon:e.coupon,mode:c}):null}return s.jsx(D0,{title:o,description:n,mode:i,className:r})},Nd=({handleCloseTipbar:e,mode:t})=>{const{CONSTANTS:r}=Sr();return s.jsx(p.Button,{title:"fechar tipbar",className:$s["tipbar__close-btn"],onClick:e,variant:"tertiary",mode:t,adornment:{start:s.jsx(p.Icon,{name:r.ICONS.close})}})},q0=({children:e,mode:t="default",showCarouselArrows:r=!0,slideTranstionTimer:n})=>{const{carouselProps:o,CONSTANTS:i}=Sr(),c=j.useRef(null),l=(d,h)=>{var m,_;d.stopPropagation(),d.preventDefault(),h==="prev"?(m=o.controller)==null||m.prevPage():(_=o.controller)==null||_.nextPage(),c.current&&(clearInterval(c.current),u())},u=j.useCallback(()=>{if(n&&o.controller){const d=setInterval(()=>{var h;(h=o.controller)==null||h.nextPage()},n);c.current=d}},[n,o]);return j.useEffect(()=>(u(),()=>{c.current&&clearInterval(c.current)}),[n,u]),s.jsxs(p.Carousel.Root,{innerRef:d=>{o.initialize(d)},className:$s.tipbar__carousel,style:{flexDirection:"row",alignItems:"center"},children:[r&&s.jsx(p.Button,{variant:"tertiary",mode:t,onClick:d=>l(d,"prev"),adornment:{start:s.jsx(p.Icon,{name:i.ICONS.arrow_left})}}),s.jsx(p.Carousel.Body,{children:e}),r&&s.jsx(p.Button,{variant:"tertiary",mode:t,onClick:d=>l(d,"next"),adornment:{start:s.jsx(p.Icon,{name:i.ICONS.arrow_right})}})]})},B0=({children:e,className:t})=>{const{hasCarousel:r,mode:n,hasCloseBtn:o,backgroundStyle:i,showCarouselArrows:c,slideTranstionTimer:l,handleCloseTipbar:u}=Sr(),d=r&&c;return s.jsx("div",{style:i,"data-hasclosebtn":o,className:p.helpers.classNameConcat($s.tipbar,t),children:r?s.jsxs(s.Fragment,{children:[s.jsx(q0,{mode:n,showCarouselArrows:d,slideTranstionTimer:l,children:e}),o&&s.jsx(Nd,{handleCloseTipbar:u,showCarouselArrows:d,mode:n})]}):s.jsxs(s.Fragment,{children:[e,o&&s.jsx(Nd,{handleCloseTipbar:u,mode:n})]})})},U0=({children:e,highlightFirstSection:t,...r})=>{const{hasCarousel:n,carouselProps:o}=Sr(),i=s.jsx("div",{...r,className:$s["tipbar-item"],children:e});return n?s.jsx(p.Carousel.Item,{style:o.itemsStyles,children:i}):i},Hg=({className:e})=>{const{isOpen:t,slices:r}=Sr();return r.length&&t?s.jsx(B0,{children:r.map((n,o)=>{var i;return s.jsx(s.Fragment,{children:s.jsx(mn,{href:n.link,children:s.jsx(U0,{highlightFirstSection:n.highlightFirstSection,"data-justifyhighlightedsection":n.horizontalAlignHighlightedSection?n.horizontalAlignHighlightedSection:"center",children:n&&((i=n==null?void 0:n.items)!=null&&i.length)?n.items.map((c,l)=>s.jsx(z0,{staticZone:n,type:c.type,title:c.title,description:c.description,className:e},`tipbar-slice-field-${l}`)):null})})},`tipbar-slice-${o}`)})}):null};Hg.displayName="TipBar.Root";const lc=({className:e,...t})=>s.jsx(O0,{...t,children:s.jsx(Hg,{className:e})});lc.displayName="TipBar";const H0=({CONSTANTS:e,data:t})=>{const{pathname:r}=Ae(),{tipbarRef:n}=Ze(),o=l=>{const u=t==null?void 0:t.find(d=>{var h,m,_,g,v;return((m=(h=d.staticConfig)==null?void 0:h.staticConfig)==null?void 0:m.deviceType)===l&&((v=(g=(_=d.staticConfig)==null?void 0:_.staticConfig)==null?void 0:g.paths)==null?void 0:v.includes(r))});return u||(t==null?void 0:t.find(d=>{var h,m,_,g,v,x;return((m=(h=d.staticConfig)==null?void 0:h.staticConfig)==null?void 0:m.deviceType)===l&&(!((g=(_=d.staticConfig)==null?void 0:_.staticConfig)!=null&&g.paths)||((x=(v=d.staticConfig)==null?void 0:v.staticConfig)==null?void 0:x.paths.length)===0)}))},i=o("desktop"),c=o("mobile");return s.jsxs("div",{ref:n,className:U.responsive["responsive-flex"],children:[c&&s.jsx("div",{className:U.responsive["responsive-mobile-flex"],children:s.jsx(lc,{data:c,CONSTANTS:e})}),i&&s.jsx("div",{className:U.responsive["responsive-desktop-flex"],children:s.jsx(lc,{data:i,CONSTANTS:e})})]})},$0=({SectionZone:e,name:t,previewId:r})=>{const[n,o]=j.useState();return j.useEffect(()=>{n||U.fetchContentType("search",{name:t,previewId:r}).then(i=>{i!=null&&i.data&&Array.isArray(i.data)&&o(i.data[0])})},[]),s.jsx(e,{data:n??[]})},W0=e=>{const t=K0(G0(e));return V0(t)},V0=e=>{const t=[];for(const r in e)t.push(...e[r]);return t},G0=e=>!e||!Array.isArray(e)?{}:e==null?void 0:e.reduce((t,r)=>{if(r!=null&&r.cidade){let n=t[r==null?void 0:r.cidade];n===void 0&&(n=t[r==null?void 0:r.cidade]=[]),n.push(r)}return t},{}),K0=e=>{if(!e||!Object.keys(e).length)return{};const t=Object.keys(e).sort((n,o)=>n.localeCompare(o)),r={};for(const n of t)r[n]=e[n];return r},Q0=({content:e,data:t,showVendor:r,ICONS:n,entity:o,LPLOJAS_TEMPLATE_RETURN_BUTTON:i})=>{const[c,l]=j.useState([]);return j.useEffect(()=>{(async()=>{try{const d=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(!d.ok)throw new Error(`[LPStoresClientWrapper] MasterData error ${d.status}`);const h=await d.json();l(W0(h))}catch(d){console.error(d)}})()},[o]),!Array.isArray(t)||!t.length?null:s.jsxs(pr.Root,{data:c,children:[s.jsx(pr.Title,{children:e.titlePage}),s.jsx(pr.Section,{imgSrcDesk:e.imageBackgroundDesk,imgSrcMob:e.imageBackgroundMob,imgAlt:e.altImageBackgroud,children:s.jsx(pr.Content,{showVendor:r,ICONS:n,LPLOJAS_TEMPLATE_RETURN_BUTTON:i})})]})},Y0=({data:e,children:t,SectionZone:r,responsive:n,COMMON_PAGE_COLUMN_GAP:o})=>{var m,_;const i=((m=e==null?void 0:e.filter(g=>g.config.responsive.deviceType==="mobile")[0])==null?void 0:m.sections)||[],c=((_=e==null?void 0:e.filter(g=>g.config.responsive.deviceType==="desktop")[0])==null?void 0:_.sections)||[],l=i.slice(0,1),u=i.slice(1,i.length),d=c.slice(0,1),h=c.slice(1,c.length);return s.jsxs(s.Fragment,{children:[s.jsxs(p.Utils.Column,{className:p.helpers.classNameConcat(n["responsive-mobile-flex"],"utils-column-modifier"),children:[s.jsx(r,{data:l??[]}),s.jsxs(p.Utils.Column,{gap:o,children:[t,s.jsx(r,{data:u??[]})]})]}),s.jsxs(p.Utils.Column,{className:p.helpers.classNameConcat(n["responsive-desktop-flex"],"utils-column-modifier"),children:[s.jsx(r,{data:d??[]}),s.jsxs(p.Utils.Column,{gap:o,children:[t,s.jsx(r,{data:h??[]})]})]})]})},X0={Banner:T0,BannerSection:Us,BennefitsBarSection:Tg,SingleBannerSection:Qc,TextContentSection:Ag,BannerCarousel:Rg,TextAccordionSection:kg,TipbarScreening:H0,ImageGrid:Pg,SearchPageScreening:U.SearchPageScreening,SearchContent:$0,NewsletterSection:Og,PDPProductCarousel:Dg,ProductCarousel:Fg,EmbedLive:Ng,PopupModalSection:zg,SectionZone:qg,LPStoresClientWrapper:Q0,WishlistScreening:Y0},J0={Components:X0,helpers:yC};exports.configureFetchProxy=U.configureFetchProxy;exports.fetchProxy=U.fetchProxy;exports.proxyCartAPI=U.proxyCartAPI;exports.cms=J0;exports.contexts=Fo;exports.data=Nc;exports.layout=dn;exports.scripts=R0;
|