(window.webpackJsonpvtex_store_components_3_178_4=window.webpackJsonpvtex_store_components_3_178_4||[]).push([[3],{22:function(e,t,a){e.exports={priceContainer:"vtex-store-components-3-x-priceContainer",listPrice:"vtex-store-components-3-x-listPrice",listPriceLabel:"vtex-store-components-3-x-listPriceLabel",listPriceValue:"vtex-store-components-3-x-listPriceValue",sellingPriceContainer:"vtex-store-components-3-x-sellingPriceContainer",sellingPrice:"vtex-store-components-3-x-sellingPrice",sellingPriceLabel:"vtex-store-components-3-x-sellingPriceLabel",sellingPriceValue:"vtex-store-components-3-x-sellingPriceValue","sellingPriceValue--range":"vtex-store-components-3-x-sellingPriceValue--range",savingPrice:"vtex-store-components-3-x-savingPrice",savingPriceValue:"vtex-store-components-3-x-savingPriceValue",installmentsPrice:"vtex-store-components-3-x-installmentsPrice",interestRatePrice:"vtex-store-components-3-x-interestRatePrice",priceLoaderContainer:"vtex-store-components-3-x-priceLoaderContainer",listPriceLoader:"vtex-store-components-3-x-listPriceLoader",sellingPriceLabelLoader:"vtex-store-components-3-x-sellingPriceLabelLoader",sellingPriceLoader:"vtex-store-components-3-x-sellingPriceLoader",installmentsPriceLoader:"vtex-store-components-3-x-installmentsPriceLoader",savingsPriceLoader:"vtex-store-components-3-x-savingsPriceLoader"}},33:function(e,t,a){"use strict";var i=a(0);function r(){return(r=Object.assign||function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,["animate","ariaLabel","children","className","height","preserveAspectRatio","primaryColor","primaryOpacity","rtl","secondaryColor","secondaryOpacity","speed","style","uniquekey","width"]),C=v?v+"-idClip":n(),L=v?v+"-idGradient":n(),O=p?["1; -3","2; -2","3; -1"]:["-3; 1","-2; 2","-1; 3"];return Object(i.createElement)("svg",r({role:"img",style:b,className:l,"aria-labelledby":a||null,viewBox:"0 0 "+h+" "+c,preserveAspectRatio:o},f),a?Object(i.createElement)("title",null,a):null,Object(i.createElement)("rect",{x:"0",y:"0",width:h,height:c,clipPath:"url(#"+C+")",style:{fill:"url(#"+L+")"}}),Object(i.createElement)("defs",null,Object(i.createElement)("clipPath",{id:C},s),Object(i.createElement)("linearGradient",{id:L},Object(i.createElement)("stop",{offset:"0%",stopColor:m,stopOpacity:u},t&&Object(i.createElement)("animate",{attributeName:"offset",values:O[0],dur:P+"s",repeatCount:"indefinite"})),Object(i.createElement)("stop",{offset:"50%",stopColor:g,stopOpacity:d},t&&Object(i.createElement)("animate",{attributeName:"offset",values:O[1],dur:P+"s",repeatCount:"indefinite"})),Object(i.createElement)("stop",{offset:"100%",stopColor:m,stopOpacity:u},t&&Object(i.createElement)("animate",{attributeName:"offset",values:O[2],dur:P+"s",repeatCount:"indefinite"})))))},l={animate:!0,ariaLabel:"Loading interface...",height:130,preserveAspectRatio:"xMidYMid meet",primaryColor:"#f0f0f0",primaryOpacity:1,rtl:!1,secondaryColor:"#e0e0e0",secondaryOpacity:1,speed:2,width:400},c=function(e){return Object(i.createElement)("rect",{x:"0",y:"0",rx:"5",ry:"5",width:e.width,height:e.height})},o=function(e){var t=r({},l,e),a=e.children?e.children:Object(i.createElement)(c,t);return Object(i.createElement)(s,t,a)};t.a=o},45:function(e,t,a){"use strict";var i=a(10),r=a(9),n=a(0),s=a.n(n),l=a(6),c=a.n(l),o=a(1),m=a(4),u=a(38),p=a.n(u),g=a(8),d=a(58),P=a.n(d),b=a(7),v=a.n(b),h=a(57),f=a(33),C=a(22),L=a.n(C),O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.loaderClass,a=Object(h.a)(e,["loaderClass"]);return s.a.createElement("div",{className:c()(L.a.priceContainer,L.a.priceLoaderContainer,t)},s.a.createElement(f.a,Object(i.a)({style:{width:"100%",height:"100%"},width:300,height:70,preserveAspectRatio:"xMinYMin meet"},a),s.a.createElement("rect",Object(i.a)({height:"0.75em",width:"50%",x:"25%"},e[L.a.listPriceLoader])),s.a.createElement("rect",e[L.a.sellingPriceLabelLoader]),s.a.createElement("rect",Object(i.a)({height:"1em",width:"70%",x:"15%",y:"1.25em"},e[L.a.sellingPriceLoader])),s.a.createElement("rect",Object(i.a)({height:"0.75em",width:"80%",x:"10%",y:"2.75em"},e[L.a.installmentsPriceLoader])),s.a.createElement("rect",e[L.a.savingsPriceLoader])))},y=a(2),w=a.n(y),x=(w.a.arrayOf(w.a.number),w.a.arrayOf(w.a.number),w.a.number,w.a.number,w.a.bool.isRequired,w.a.bool.isRequired,w.a.bool.isRequired,w.a.bool.isRequired,w.a.bool.isRequired,w.a.bool,w.a.string,w.a.string,w.a.arrayOf(w.a.shape({Value:w.a.number.isRequired,InterestRate:w.a.number.isRequired,TotalValuePlusInterestRate:w.a.number,NumberOfInstallments:w.a.number.isRequired,Name:w.a.string})),w.a.string,w.a.string,w.a.string,w.a.string,w.a.string,w.a.string,w.a.string,w.a.string,w.a.string,w.a.string,w.a.string,w.a.string,w.a.string,w.a.string,w.a.string,w.a.object,w.a.object.isRequired,Object(m.injectIntl)((function(e){var t=e.showLabels,a=e.installments,i=void 0===a?[]:a,l=e.className,u=e.installmentClass,p=e.interestRateClass,d=e.intl,b=Object(g.useRuntime)().culture;if(!i||Object(o.isEmpty)(i.filter((function(e){return e.NumberOfInstallments>1}))))return null;var v=i.filter((function(e){return!e.InterestRate&&e.NumberOfInstallments>1})),h=(Object(o.isEmpty)(v)?i:v).reduce((function(e,t){return e.NumberOfInstallments>t.NumberOfInstallments?e:t})),f=P()({intl:d,culture:b,value:h.Value}),C=[h.NumberOfInstallments,f,s.a.createElement(n.Fragment,{key:"x"},"x")].map((function(e,t){return s.a.createElement("span",{className:u,key:t},e)})),O=Object(r.a)(C,3),y=O[0],w=O[1],x=O[2];return s.a.createElement("div",{className:c()(L.a.installmentsPrice,l)},t?s.a.createElement(m.FormattedMessage,{id:"store/pricing.installment-display",values:{installments:y,installmentPrice:w,times:x}}):s.a.createElement(n.Fragment,null,y,x," ",w),!h.InterestRate&&s.a.createElement("div",{className:c()(L.a.interestRatePrice,p)},s.a.createElement(m.FormattedMessage,{id:"store/pricing.interest-free"})))}))),R=a(60),E=a.n(R),j=Object(m.injectIntl)((function(e){var t=e.showPriceRange,a=e.priceRange,i=e.price,n=e.rangeContainerClasses,l=e.singleContainerClasses,c=e.intl,o=Object(g.useRuntime)().culture;return t&&a&&function(e){var t=Object(r.a)(e,2),a=t[0],i=t[1];return 2===e.length&&a!==i}(a)?s.a.createElement("span",{className:n},function(e,t,a){return(a||[]).map((function(a){return P()({intl:e,culture:t,value:a})})).join(" - ")}(c,o,a)):s.a.createElement("span",{className:l},s.a.createElement(E.a,{value:i}))})),_=["price_className","price_loader","price_listPriceContainer","price_listPriceLabel","price_listPrice","price_listPriceRange","price_sellingPriceRange","price_sellingPriceContainer","price_sellingPriceLabel","price_sellingPrice","price_savingsContainer","price_savings","price_savings_value","price_installment","price_interestRate","price_installmentContainer"],N=function(e){var t=Object(r.a)(e,2),a=t[0],i=t[1];return 2===e.length&&a!==i},I=function(e){var t=Object(o.sort)((function(e,t){return e-t}),e);return[Object(o.head)(t),Object(o.last)(t)]},V=Object(m.injectIntl)((function(e){var t=e.sellingPriceList,a=e.sellingPrice,r=e.listPrice,n=e.listPriceList,l=e.showListPrice,u=e.showSellingPriceRange,d=e.showListPriceRange,b=e.showInstallments,h=e.showLabels,f=e.showSavings,C=e.labelSellingPrice,y=e.labelListPrice,w=e.className,R=e.loaderClass,E=e.listPriceContainerClass,V=e.listPriceLabelClass,S=e.listPriceClass,q=e.listPriceRangeClass,M=e.sellingPriceRangeClass,k=e.sellingPriceContainerClass,A=e.sellingPriceLabelClass,F=e.sellingPriceClass,G=e.savingsContainerClass,J=e.savingsClass,Y=e.installments,B=e.installmentClass,T=e.interestRateClass,z=e.installmentContainerClass,D=e.styles,H=e.intl,K=Object(g.useRuntime)().culture,Q=v()(_).handles;if(l&&Object(o.isNil)(r)||Object(o.isNil)(a))return s.a.createElement(O,Object(i.a)({loaderClass:"".concat(R," ").concat(Q.price_loader)},D));var U=function(e){var t=e.sellingPriceList,a=e.sellingPrice,i=e.listPrice,r=e.listPriceList,n=e.showListPrice,s=e.showListPriceRange,l=e.showSellingPriceRange;if(!n)return!1;var c=t&&I(t)||[],m=r&&I(r)||[],u=l&&N(c)?c:a,p=s&&N(m)?m:i;return!Object(o.equals)(p,u)}(e),W=t&&I(t),X=n&&I(n);return s.a.createElement("div",{className:c()(L.a.priceContainer,w,Q.price_className)},U&&s.a.createElement("div",{className:c()(L.a.listPrice,E,Q.price_listPriceContainer)},h&&s.a.createElement("div",{className:c()(L.a.listPriceLabel,V,Q.price_listPriceLabel,"dib ph2 t-small-ns t-mini")},s.a.createElement(p.a,{id:y})),s.a.createElement(j,{showPriceRange:d,priceRange:X,price:r,rangeContainerClasses:c()(L.a.listPriceValue,q,Q.price_listPriceRange),singleContainerClasses:c()(L.a.listPriceValue,S,Q.price_listPrice)})),s.a.createElement("div",{className:c()(L.a.sellingPrice,L.a.sellingPriceContainer,k,Q.price_sellingPriceContainer)},h&&U&&s.a.createElement("div",{className:c()(L.a.sellingPriceLabel,A,Q.price_sellingPriceLabel)},s.a.createElement(p.a,{id:C})),s.a.createElement(j,{showPriceRange:u,priceRange:W,price:a,rangeContainerClasses:c()(L.a.sellingPrice,L.a.sellingPriceValue,L.a["sellingPriceValue--range"],M,Q.price_sellingPriceRange),singleContainerClasses:c()(L.a.sellingPrice,L.a.sellingPriceValue,F,Q.price_sellingPrice)})),b&&s.a.createElement(x,{installments:Y,showLabels:h,className:"".concat(z," ").concat(Q.price_installmentContainer),interestRateClass:"".concat(T," ").concat(Q.price_interestRate),installmentClass:"".concat(B," ").concat(Q.price_installment)}),U&&f&&r-a>0&&s.a.createElement("div",{className:c()(L.a.savingPrice,G,Q.price_savingsContainer)},s.a.createElement("div",{className:c()(L.a.savingPriceValue,J,Q.price_savings)},s.a.createElement(m.FormattedMessage,{id:"store/pricing.savings",values:{savings:s.a.createElement("span",{className:Q.price_savings_value},P()({intl:H,culture:K,value:r-a}))}}))))}));V.defaultProps={showSellingPriceRange:!1,showListPriceRange:!1,showListPrice:!0,showLabels:!0,showInstallments:!1,showSavings:!1,labelSellingPrice:null,labelListPrice:null},V.schema={title:"admin/editor.productPrice.title",description:"admin/editor.productPrice.description",type:"object",properties:{showSellingPriceRange:{type:"boolean",title:"admin/editor.productPrice.showSellingPriceRange",default:V.defaultProps.showSellingPriceRange,isLayout:!0},showListPriceRange:{type:"boolean",title:"admin/editor.productPrice.showListPriceRange",default:V.defaultProps.showListPriceRange,isLayout:!0},showListPrice:{type:"boolean",title:"admin/editor.productPrice.showListPrice",default:V.defaultProps.showListPrice,isLayout:!0},showLabels:{type:"boolean",title:"admin/editor.productPrice.showLabels",default:V.defaultProps.showLabels,isLayout:!0},showInstallments:{type:"boolean",title:"admin/editor.productPrice.showInstallments",default:V.defaultProps.showInstallments,isLayout:!0},showSavings:{type:"boolean",title:"admin/editor.productPrice.showSavings",default:V.defaultProps.showSavings,isLayout:!0}}};t.a=V}}]);; (window.webpackJsonpvtex_store_components_3_178_4=window.webpackJsonpvtex_store_components_3_178_4||[]).push([["ProductPrice"],{0:function(e,t){e.exports=React},1:function(e,t){e.exports=R},192:function(e,t,s){"use strict";s.r(t),function(e){var t=s(3);s.p=Object(t.getPublicPath)("vtex.store-components@3.178.4");var i=Object(t.register)((function(){return s(237)}),e,"vtex.store-components@3.178.4","vtex.store-components@3.x","ProductPrice");i.renderHotReload,i.setupHMR}.call(this,s(15)(e))},2:function(e,t){e.exports=PropTypes},237:function(e,t,s){"use strict";s.r(t);var i=s(5),l=s(57),r=s(0),n=s.n(r),a=s(47),o=s.n(a),c=s(1),u=s(8),d=s(34),p=s(45);function P(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,i)}return s}function b(e){for(var t=1;t0},f=function(e){var t=e.labelSellingPrice,s=e.showListPrice,i=e.showInstallments,a=e.showLabels,P=e.showSavings,f=Object(l.a)(e,["labelSellingPrice","showListPrice","showInstallments","showLabels","showSavings"]),g=Object(r.useContext)(o.a),w=function(e){var t,s,i=Object(u.useRuntime)(),l=e.selectedItem,r=null===(t=null==i?void 0:i.getSettings)||void 0===t?void 0:t.call(i,"vtex.store");return(null==r?void 0:r.enableDefaultSeller)?null===(s=Object(d.a)(null==l?void 0:l.sellers))||void 0===s?void 0:s.commertialOffer:(console.warn("In feature releases the enableDefaultSeller setting will be removed, and the commercialOffer will be calculated only by defaultSeller"),Object(c.path)(["sellers",0,"commertialOffer"],l))}(g),v=f.className,_=f.listPriceContainerClass,O=f.listPriceLabelClass,y=f.listPriceClass,C=f.sellingPriceContainerClass,x=f.sellingPriceLabelClass,L=f.sellingPriceClass,j=f.savingsContainerClass,S=f.savingsClass,R=f.interestRateClass,E=f.installmentContainerClass,N=f.installmentClass,D=f.loaderClass,I=f.listPrice,M=f.sellingPrice,T=f.installments,k=!g||Object(c.isEmpty)(g)||!Object(c.has)("query",f)&&!Object(c.has)("params",f)?b(b({},f),{},{labelSellingPrice:t,showListPrice:s,showInstallments:i,showLabels:a,showSavings:P,showProductPrice:!0}):b(b({},f),{},{styles:f.styles||h,className:v||"",listPriceContainerClass:_||"t-small-s t-small-ns c-muted-2 mb2",sellingPriceLabelClass:x||"t-heading-6-s t-heading-5-ns dib",listPriceLabelClass:O||"dib strike",listPriceClass:y||"ph2 dib strike",sellingPriceContainerClass:C||"pv1 b c-on-base",sellingPriceClass:L||"t-heading-2-s dib ph2",installmentContainerClass:E||"t-mini-s t-small-ns c-on-base",installmentClass:N||"t-body",interestRateClass:R||"dib ph2",savingsContainerClass:j||"c-success mt3",savingsClass:S||"dib t-small",loaderClass:D||"h4-s mw6-s pt2-s",listPrice:I||Object(c.path)(["ListPrice"],w),sellingPrice:M||Object(c.path)(["Price"],w),installments:T||Object(c.path)(["Installments"],w),labelSellingPrice:t,showLabels:a,showInstallments:i,showListPrice:s,showSavings:P,showProductPrice:m(w)}),H=k.showProductPrice,A=Object(l.a)(k,["showProductPrice"]);return H?n.a.createElement(p.a,A):null};f.schema={title:"admin/editor.productPrice.title",description:"admin/editor.productPrice.description",type:"object",properties:{labelSellingPrice:{type:"string",title:"admin/editor.productPrice.labelSellingPrice",default:p.a.defaultProps.labelSellingPrice,isLayout:!1},labelListPrice:{type:"string",title:"admin/editor.productPrice.labelListPrice",default:p.a.defaultProps.labelListPrice,isLayout:!1},showSellingPriceRange:{type:"boolean",title:"admin/editor.productPrice.showSellingPriceRange",default:p.a.defaultProps.showSellingPriceRange,isLayout:!0},showListPriceRange:{type:"boolean",title:"admin/editor.productPrice.showListPriceRange",default:p.a.defaultProps.showListPriceRange,isLayout:!0},showListPrice:{type:"boolean",title:"admin/editor.productPrice.showListPrice",default:p.a.defaultProps.showListPrice,isLayout:!0},showLabels:{type:"boolean",title:"admin/editor.productPrice.showLabels",default:p.a.defaultProps.showLabels,isLayout:!0},showInstallments:{type:"boolean",title:"admin/editor.productPrice.showInstallments",default:p.a.defaultProps.showInstallments,isLayout:!0},showSavings:{type:"boolean",title:"admin/editor.productPrice.showSavings",default:p.a.defaultProps.showSavings,isLayout:!0}}};var g=f;t.default=g},34:function(e,t,s){"use strict";function i(e){if(e&&0!==e.length){var t=e.find((function(e){return e.sellerDefault}));return t||e[0]}}s.d(t,"a",(function(){return i}))},38:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.native-types@0.x/IOMessage"]},4:function(e,t){e.exports=ReactIntl},47:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-context@0.x/ProductContext"]},58:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.format-currency@0.x/formatCurrency"]},6:function(e,t){e.exports=Classnames},60:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.format-currency@0.x/FormattedCurrency"]},7:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@1.x/useCssHandles"]},8:function(e,t){e.exports=__RENDER_8_RUNTIME__}},[[192,"common",3]]]);; !function(e){function t(t){for(var n,a,u=t[0],c=t[1],l=t[2],d=0,s=[];de.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?"repeat(4, 1fr)":"repeat(5, 1fr)")}},departament.children.map((function(e){return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:handles["menu-dropdown__categorie"]},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(vtex_render_runtime__WEBPACK_IMPORTED_MODULE_1__.Link,{to:e.href,className:handles["menu-dropdown__categorie-link"]},e.name),e.hasChildren&&e.children.length&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:handles["menu-dropdown__subcategories"]},e.children.map((function(e){return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(vtex_render_runtime__WEBPACK_IMPORTED_MODULE_1__.Link,{to:e.href,className:"".concat(handles["menu-dropdown__subcategorie"]," ").concat(e.sale?handles["menu-dropdown__subcategorie-active"]:"")},e.name)}))))}))),visibleButtons&&(null==visibleButtons?void 0:visibleButtons.length)>0&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"".concat(handles["buttons-fixed"])},(null===(_c=null==departament?void 0:departament.fixedButtons)||void 0===_c?void 0:_c.title)&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"".concat(handles["buttons-fixed__title"])},null===(_d=null==departament?void 0:departament.fixedButtons)||void 0===_d?void 0:_d.title),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"".concat(handles["buttons-fixed__wrapper"])},null==visibleButtons?void 0:visibleButtons.map((function(e,_){var n,t;return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a",{key:_,role:"button",onClick:handleSecureLinkClick(null==e?void 0:e.href),className:"".concat(handles["buttons-fixed__btn"]," flex items-center no-underline pointer:hover"),style:{backgroundColor:null==e?void 0:e.backgroundColor}},(null===(n=null==e?void 0:e.icon)||void 0===n?void 0:n.src)?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("img",{src:null===(t=null==e?void 0:e.icon)||void 0===t?void 0:t.src,className:"".concat(handles.icon)}):null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"".concat(handles.text," no-underline"),style:{color:null==e?void 0:e.fontColor}},null==e?void 0:e.name))}))))),departament.image&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:handles["menu-dropdown__banner"]},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(vtex_render_runtime__WEBPACK_IMPORTED_MODULE_1__.Link,{to:departament.imageLink,className:handles["menu-dropdown__banner-link"]},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(vtex_store_image_Image__WEBPACK_IMPORTED_MODULE_2___default.a,{src:departament.image,className:handles["menu-dropdown__banner-image"]}))))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:handles["menu-dropdown__overlay"],onMouseEnter:function(){return closeDropdown()}})))};__webpack_exports__.a=Dropdown},function(e,_){e.exports=__RENDER_8_COMPONENTS__["vtex.store-image@0.x/Image"]},,,function(e,_,n){"use strict";n.r(_),function(e){var _=n(1);n.p=Object(_.getPublicPath)("alfagresalfa.menu@0.0.21");var t=Object(_.register)((function(){return n(13)}),e,"alfagresalfa.menu@0.0.21","alfagresalfa.menu@0.x","MenuDesktop");t.renderHotReload,t.setupHMR}.call(this,n(5)(e))},,function(e,_,n){"use strict";n.r(_);var t=n(6),a=n(0),r=n.n(a),o=n(4),l=n.n(o),d=n(3),c=n(7),s=n(2),u=["menu","menu-departament","menu-departament-active","menu-departament__selected","menu-departament-icon","menu-departament-link","menu-departaments"],i=function(e){var _,n=Object(a.useContext)(s.default).newCategories,o=Object(a.useState)(!1),i=Object(t.a)(o,2),m=i[0],E=i[1],p=Object(a.useState)(),f=Object(t.a)(p,2),v=f[0],D=f[1],O=function(){E(!1),D(void 0)},M=l()(u).handles;return r.a.createElement("div",{onMouseEnter:function(){return E(!0)},onMouseLeave:O,className:M.menu},r.a.createElement("div",{className:M["menu-departaments"]},null==n?void 0:n.filter((function(e){return!e.dontShow})).map((function(e){return r.a.createElement("div",{key:e.name,onMouseEnter:function(){return function(e){return D(e)}(e)},className:"".concat(M["menu-departament"]," ").concat(m&&v===e?M["menu-departament__selected"]:""),style:{backgroundColor:"".concat((null==e?void 0:e.backgroundColor)||"")}},r.a.createElement(d.Link,{to:e.href,className:"".concat(M["menu-departament-link"]," ").concat(e.sale?M["menu-departament-active"]:""),style:{color:"".concat((null==e?void 0:e.fontColor)||""),fontWeight:(null==e?void 0:e.fontWeight)||"600"}},e.name))})),e.children),m&&v&&v.hasChildren&&(null===(_=null==v?void 0:v.children)||void 0===_?void 0:_.length)&&r.a.createElement(c.a,{departament:v,closeDropdown:O}))};_.default=i}],[[11,"common"]]]);; !function(t){function e(e){for(var r,u,c=e[0],a=e[1],f=e[2],s=0,p=[];st.length)&&(e=t.length);for(var n=0,r=new Array(e);n-1}));if(a){var u=a.split("="),p=Object(r.a)(u,2)[1];return p&&";"===p[p.length-1]?p.substring(0,p.length-1):p}}}function a(){var n,t=null===(n=window)||void 0===n?void 0:n.__RUNTIME__.segmentToken;if(t)return JSON.parse(atob(t)).countryCode}function u(){var n=localStorage.getItem("orderform");if(n)return JSON.parse(n||"{}").id}}}]);; (window.webpackJsonpvtex_shipping_option_components_1_9_0=window.webpackJsonpvtex_shipping_option_components_1_9_0||[]).push([[1],{19:function(e,t,n){"use strict";n.d(t,"a",(function(){return B})),n.d(t,"c",(function(){return C})),n.d(t,"b",(function(){return _}));var i=n(0),r=n.n(i),o=n(68),a=n(69),c=n(74),p=n(73),s=n(60);function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=Object(s.a)(e);if(t){var r=Object(s.a)(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Object(p.a)(this,n)}}var l=function(e){Object(c.a)(n,e);var t=u(n);function n(){var e;return Object(o.a)(this,n),(e=t.apply(this,arguments)).state={hasError:!1},e}return Object(a.a)(n,[{key:"render",value:function(){return this.state.hasError?this.props.fallback:this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0}}}]),n}(i.Component),d=n(8),b=n.n(d),f=n(13),v=n(5),h=n(31),O=n(7),g=n(38),k=n(33),j=n.n(k),m=n(20),S=n(23),I=n(2),y=n(21),x=function(e){var t=e.children,n=function(){var e=Object(i.useState)(),t=Object(v.a)(e,2),n=t[0],r=t[1],o=Object(i.useState)(!0),a=Object(v.a)(o,2),c=a[0],p=a[1],s=Object(i.useState)(),u=Object(v.a)(s,2),l=u[0],d=u[1],k=Object(i.useState)(),x=Object(v.a)(k,2),P=x[0],D=x[1],z=Object(i.useState)(),B=Object(v.a)(z,2),C=B[0],_=B[1],E=Object(i.useState)([]),M=Object(v.a)(E,2),L=M[0],T=M[1],w=Object(i.useState)(),A=Object(v.a)(w,2),N=A[0],R=A[1],U=Object(i.useState)(),F=Object(v.a)(U,2),H=F[0],V=F[1],G=Object(i.useState)(),J=Object(v.a)(G,2),K=J[0],X=J[1],Y=Object(i.useState)(),Z=Object(v.a)(Y,2),q=Z[0],Q=Z[1],W=Object(i.useState)([]),$=Object(v.a)(W,2),ee=$[0],te=$[1],ne=Object(i.useState)(),ie=Object(v.a)(ne,2),re=ie[0],oe=ie[1],ae=Object(i.useState)(),ce=Object(v.a)(ae,2),pe=ce[0],se=ce[1],ue=Object(i.useState)(),le=Object(v.a)(ue,2),de=le[0],be=le[1],fe=Object(h.useRuntime)().account,ve=Object(h.useSSR)(),he=Object(O.useIntl)(),Oe=Object(g.useOrderItems)().addItems;j()({eventId:y.SHIPPING_MODAL_PIXEL_EVENT_ID,handler:function(e){oe(e.data.addToCartInfo)}});var ge=Object(i.useCallback)(function(){var e=Object(f.a)(b.a.mark((function e(t,n,i,r){var o,a,c,s,u,l=arguments;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=l.length>4&&void 0!==l[4]&&l[4],e.next=3,Object(m.getPickups)(t,n,fe);case 3:if(c=e.sent,T(null!==(a=null==c?void 0:c.items)&&void 0!==a?a:[]),0!==(null==c?void 0:c.items.length)){e.next=8;break}return p(!1),e.abrupt("return");case 8:if(!(s=Object(S.b)("pickupPoint"))){e.next=14;break}return u=c.items.find((function(e){return e.pickupPoint.id===s})),R(u),e.next=14,Object(m.updateSession)(t,n,i,u,r);case 14:o||p(!1);case 15:case"end":return e.stop()}}),e)})));return function(t,n,i,r){return e.apply(this,arguments)}}(),[fe]);Object(i.useEffect)((function(){if(!ve){var e=Object(S.b)("zip-code"),t=Object(S.a)(),n=Object(S.b)("shipping");if(r(e),Q(n),d(t),e)try{Object(m.getAddress)(t,e,fe).then((function(i){_(i.city),V(i.geoCoordinates),ge(t,e,i.geoCoordinates,n)}))}catch(e){p(!1)}else p(!1)}}),[fe,ve,ge]);var ke=function(e,t){D({code:e,message:t}),p(!1),setTimeout((function(){D(void 0)}),3e3)},je=function(){var e=Object(f.a)(b.a.mark((function e(t){var n,i,r,o,a,c;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return p(!0),e.prev=1,n=Object(S.c)(),e.next=5,Object(m.getCartProducts)(n);case 5:return i=e.sent,r=i.map((function(e){return e.id})),e.next=9,t(r);case 9:return o=e.sent,a=o.unavailableProducts,c=i.map((function(e,t){return{cartItemIndex:t,product:e}})).filter((function(e){return a.some((function(t){return t===e.product.id}))})),te(c),p(!1),e.abrupt("return",c);case 17:return e.prev=17,e.t0=e.catch(1),p(!1),te([]),e.abrupt("return",[]);case 22:case"end":return e.stop()}}),e,null,[[1,17]])})));return function(t){return e.apply(this,arguments)}}(),me=function(){var e=Object(f.a)(b.a.mark((function e(){return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:te([]);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Se=function(){var e=Object(f.a)(b.a.mark((function e(){var t;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Object(S.c)(),e.next=3,Object(m.removeCartProductsById)(t,ee.map((function(e){return e.cartItemIndex})));case 3:de&&de();case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ie=function(){var e=Object(f.a)(b.a.mark((function e(t){var n,i,o,a,c,s,u=arguments;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!(u.length>1&&void 0!==u[1])||u[1],t){e.next=4;break}return ke("POSTAL_CODE_NOT_FOUND",he.formatMessage(I.default.postalCodeInputPlaceHolder)),e.abrupt("return");case 4:if(l){e.next=6;break}return e.abrupt("return");case 6:return p(!0),e.prev=7,e.next=10,Object(m.getAddress)(l,t,fe);case 10:if(i=e.sent,o=i.geoCoordinates,a=i.city,0!==o.length){e.next=16;break}return ke("INVALID_POSTAL_CODE",he.formatMessage(I.default.postalCodeInputError)),e.abrupt("return");case 16:return e.next=18,Object(m.getCatalogCount)(t,o);case 18:if(c=e.sent,0!==c.total){e.next=23;break}return ke(y.PRODUCTS_NOT_FOUND_ERROR_CODE,he.formatMessage(I.default.noPickupsStateDescription,{postalCode:" ".concat(t)})),e.abrupt("return");case 23:if(!(s=Object(S.c)())){e.next=27;break}return e.next=27,Object(m.updateOrderForm)(l,t,s);case 27:return _(a),V(o),r(t),e.next=32,Object(m.updateSession)(l,t,o,N,"delivery");case 32:return e.next=34,ge(l,t,o,q,!0);case 34:e.next=40;break;case 36:return e.prev=36,e.t0=e.catch(7),ke("INVALID_POSTAL_CODE",he.formatMessage(I.default.postalCodeInputError)),e.abrupt("return");case 40:Q(void 0),R(void 0),n||p(!1),n&&location.reload();case 44:case"end":return e.stop()}}),e,null,[[7,36]])})));return function(t){return e.apply(this,arguments)}}(),ye=function(){var e=Object(f.a)(b.a.mark((function e(t){var i,r=arguments;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=!(r.length>1&&void 0!==r[1])||r[1],l&&n&&H){e.next=3;break}return e.abrupt("return");case 3:return R(t),e.next=6,Object(m.updateSession)(l,n,H,t,i?"pickup-in-point":q);case 6:location.reload();case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),xe=function(){var e=Object(f.a)(b.a.mark((function e(){return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l&&n&&H){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,Object(m.updateSession)(l,n,H,N,"delivery");case 4:location.reload();case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Object(i.useEffect)((function(){X(C?"".concat(C,", ").concat(n):n)}),[n,C]);var Pe=function(){var e=Object(f.a)(b.a.mark((function e(t){var i,r,o,a,c,p;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.type,e.next="UPDATE_ZIPCODE"===e.t0?3:"UPDATE_PICKUP"===e.t0?13:"SELECT_DELIVERY_SHIPPING_OPTION"===e.t0?28:"ABORT_UNAVAILABLE_ITEMS_ACTION"===e.t0?42:"CONTINUE_UNAVAILABLE_ITEMS_ACTION"===e.t0?44:46;break;case 3:return i=t.args,r=i.zipcode,o=i.reload,e.next=6,je(function(){var e=Object(f.a)(b.a.mark((function e(t){return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(m.validateProductAvailability)(r,l,t,fe));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 6:if(0!==e.sent.length){e.next=10;break}return Ie(r,o),e.abrupt("break",47);case 10:return se(he.formatMessage(I.default.unavailableItemsModalDescription,{addressLabel:K})),be((function(){return function(){return Ie(r,o)}})),e.abrupt("break",47);case 13:return a=t.args,c=a.pickup,p=a.shouldPersistFacet,se("pickup"),e.next=17,je(function(){var e=Object(f.a)(b.a.mark((function e(t){return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(m.validateProductAvailabilityByPickup)(c.pickupPoint.id,t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 17:if(0!==e.sent.length){e.next=25;break}if(ye(c,p),!re){e.next=24;break}return e.next=23,Oe(re.skuItems,re.options);case 23:oe(void 0);case 24:return e.abrupt("break",47);case 25:return se(he.formatMessage(I.default.unavailableItemsModalForPickupDescription,{pickupLabel:null==N?void 0:N.pickupPoint.friendlyName})),be((function(){return function(){return ye(c,p)}})),e.abrupt("break",47);case 28:return se("delivery"),e.next=31,je(function(){var e=Object(f.a)(b.a.mark((function e(t){return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(m.validateProductAvailabilityByDelivery)(n,l,t,fe));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 31:if(0!==e.sent.length){e.next=39;break}if(xe(),!re){e.next=38;break}return e.next=37,Oe(re.skuItems,re.options);case 37:oe(void 0);case 38:return e.abrupt("break",47);case 39:return se(he.formatMessage(I.default.unavailableItemsModalForDeliveryDescription,{addressLabel:K})),be((function(){return function(){return xe()}})),e.abrupt("break",47);case 42:return me(),e.abrupt("break",47);case 44:return Se(),e.abrupt("break",47);case 46:return e.abrupt("break",47);case 47:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),De=ee.length>0;return{dispatch:Pe,state:{zipcode:n,isLoading:c,countryCode:l,submitErrorMessage:P,city:C,pickups:L,selectedPickup:N,geoCoordinates:H,addressLabel:K,shippingOption:q,areThereUnavailableCartItems:De,unavailableCartItems:ee,unavailabilityMessage:pe}}}(),o=n.dispatch,a=n.state;return r.a.createElement(D.Provider,{value:a},r.a.createElement(z.Provider,{value:o},t))},P={pickups:[],isLoading:!0,areThereUnavailableCartItems:!1,unavailableCartItems:[]},D=Object(i.createContext)(P),z=Object(i.createContext)((function(e){})),B=function(e){var t=e.children;return r.a.createElement(l,{fallback:t},r.a.createElement(x,null,t))},C=function(){return Object(i.useContext)(D)},_=function(){return Object(i.useContext)(z)}},2:function(e,t,n){"use strict";n.r(t);var i=n(7),r=Object(i.defineMessages)({deliverToButtonLabel:{id:"store/shipping-option-zipcode.deliverToButton.label"},deliverToButtonPlaceholder:{id:"store/shipping-option-zipcode.deliverToButton.placeholder"},storeButtonLabel:{id:"store/shipping-option-zipcode.storeButton.label"},storeButtonPlaceHolder:{id:"store/shipping-option-zipcode.storeButton.placeholder"},storeDeliverDrawerTitle:{id:"store/shipping-option-zipcode.deliverDrawer.title"},pickupDrawerTitleEmpty:{id:"store/shipping-option-zipcode.pickupDrawer.title.empty"},pickupDrawerTitleFilled:{id:"store/shipping-option-zipcode.pickupDrawer.title.filled"},postalCodeInputPlaceHolder:{id:"store/shipping-option-zipcode.postalCodeInput.placeholder"},postalCodeInputError:{id:"store/shipping-option-zipcode.postalCodeInput.error"},updateButtonLabel:{id:"store/shipping-option-zipcode.updateButton.label"},popoverButtonLabel:{id:"store/shipping-option-zipcode.popoverButton.label"},popoverSubmitButtonLabel:{id:"store/shipping-option-zipcode.deliveryPopover.submitButton.label"},popoverDescription:{id:"store/shipping-option-zipcode.popover.description"},popoverPostalCodeInputPlaceHolder:{id:"store/shipping-option-zipcode.deliveryPopover.postalCodeInput.placeholder"},popoverPostalCodeLink:{id:"store/shipping-option-zipcode.popover.postalCodeLink"},locationModalTitle:{id:"store/shipping-option-zipcode.locationModal.title"},locationModalDescription:{id:"store/shipping-option-zipcode.locationModal.description"},noPickupsStateTitle:{id:"store/shipping-option-zipcode.locationModal.noPickupsState.title"},noPickupsStateDescription:{id:"store/shipping-option-zipcode.locationModal.noPickupsState.description"},noPickupsStateButtonLabel:{id:"store/shipping-option-zipcode.locationModal.noPickupsState.button.label"},noStoresStateTitle:{id:"store/shipping-option-zipcode.pickupSelection.noStoresState.title"},noStoresStateDescription:{id:"store/shipping-option-zipcode.pickupSelection.noStoresState.description"},noStoresStateButton:{id:"store/shipping-option-zipcode.pickupSelection.noStoresState.button.label"},shippingSelectionModalTitle:{id:"store/shipping-option-zipcode.shippingSelectionModal.title"},shippingSelectionModalDescription:{id:"store/shipping-option-zipcode.shippingSelectionModal.description"},shippingSelectionModalDeliveryButton:{id:"store/shipping-option-zipcode.shippingSelectionModal.deliveryButton.label"},shippingSelectionModalPickupButton:{id:"store/shipping-option-zipcode.shippingSelectionModal.pickupButton.label"},pickupSelectionTitle:{id:"store/shipping-option-zipcode.pickupSelection.title"},deliveryAvailableBadge:{id:"store/shipping-option-zipcode.availabilityBadge.deliveryAvailable"},deliveryUnavailableBadge:{id:"store/shipping-option-zipcode.availabilityBadge.deliveryUnavailable"},pickupUnavailableBadge:{id:"store/shipping-option-zipcode.availabilityBadge.pickupUnavailable"},pickupAtBadge:{id:"store/shipping-option-zipcode.availabilityBadge.pickupAt"},unavailableItemsModalRemoveButton:{id:"store/shipping-option-zipcode.unavailableItems.removeItemsButton.label"},unavailableItemsModalRetryButton:{id:"store/shipping-option-zipcode.unavailableItems.retryButton.label"},unavailableItemsModalTitle:{id:"store/shipping-option-zipcode.unavailableItems.title"},unavailableItemsModalDescription:{id:"store/shipping-option-zipcode.unavailableItems.description"},unavailableItemsModalForPickupDescription:{id:"store/shipping-option-zipcode.unavailableItems.forPickup.description"},unavailableItemsModalForDeliveryDescription:{id:"store/shipping-option-zipcode.unavailableItems.forDelivery.description"},LocationDetectorButtonTitle:{id:"store/shipping-option-zipcode.LocationDetectorButton.title"},LocationDetectorButtonLoadingDescription:{id:"store/shipping-option-zipcode.LocationDetectorButtonLoading.description"},LocationDetectorButtonErrorDescription:{id:"store/shipping-option-zipcode.LocationDetectorButtonError.description"}});t.default=r}}]);; (window.webpackJsonpvtex_shipping_option_components_1_9_0=window.webpackJsonpvtex_shipping_option_components_1_9_0||[]).push([["ShippingOptionContext"],{0:function(t,n){t.exports=React},31:function(t,n){t.exports=__RENDER_8_RUNTIME__},33:function(t,n){t.exports=__RENDER_8_COMPONENTS__["vtex.pixel-manager@1.x/usePixelEventCallback"]},37:function(t,n){t.exports=regeneratorRuntime},38:function(t,n){t.exports=__RENDER_8_COMPONENTS__["vtex.order-items@0.x/OrderItems"]},7:function(t,n){t.exports=ReactIntl},90:function(t,n,e){"use strict";e.r(n),function(t){var n=e(14);e.p=Object(n.getPublicPath)("vtex.shipping-option-components@1.9.0");var o=Object(n.register)((function(){return e(91)}),t,"vtex.shipping-option-components@1.9.0","vtex.shipping-option-components@1.x","ShippingOptionContext");o.renderHotReload,o.setupHMR}.call(this,e(32)(t))},91:function(t,n,e){"use strict";e.r(n);var o=e(19);n.default={ShippingOptionProvider:o.a,useShippingOptionDispatch:o.b,useShippingOptionState:o.c}}},[[90,"common",0,1]]]);; !function(e){function t(t){for(var n,o,u=t[0],c=t[1],l=t[2],s=0,d=[];s=0||(o[r]=e[r]);return o}},32:function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},33:function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},6:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))},7:function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{},n=e.hideEmptyCols,o=void 0!==n&&n,r=t.reduce((function(t,e){var n="grow"===e.width,o="number"==typeof e.width?t.availableWidth-e.width:0;return{availableWidth:n?0:o,remainingColsNum:t.remainingColsNum+(e.hasDefinedWidth?0:1),hasAnyWidthGrow:t.hasAnyWidthGrow||n}}),{availableWidth:100,remainingColsNum:0,hasAnyWidthGrow:!1}),i=r.availableWidth,a=r.remainingColsNum,c=r.hasAnyWidthGrow;if(i<0&&!c){var d=-100/i;t=t.map((function(t){return Object.assign(Object.assign({},t),{width:"number"==typeof t.width?t.width*d:t.width})}))}return t.map((function(t){var e="number"==typeof t.width?"".concat(t.width,"%"):t.width;return{element:t.element,width:t.hasDefinedWidth?e:"".concat(Math.floor(Math.max(0,i)/(o?1:a)),"%"),hasDefinedWidth:t.hasDefinedWidth}}))};var m,w,v,g=n(14),O=n.n(g);!function(t){t.equal="equal",t.auto="auto"}(w||(w={})),function(t){t.between="between",t.around="around",t.left="left",t.right="right",t.center="center"}(v||(v={}));var j=(m={},Object(r.a)(m,v.between,"justify-between"),Object(r.a)(m,v.around,"justify-around"),Object(r.a)(m,v.left,"justify-start"),Object(r.a)(m,v.center,"justify-center"),Object(r.a)(m,v.right,"justify-end"),m),y=["flexRowContent"],W=function(t){var e=t.children,n=t.colGap,r=t.rowGap,i=t.marginTop,c=t.marginBottom,d=t.paddingTop,p=t.paddingBottom,m=t.border,g=t.borderWidth,W=t.borderColor,x=t.preserveLayoutOnMobile,C=t.preventHorizontalStretch,G=t.preventVerticalStretch,k=t.horizontalAlign,R=t.colSizing,E=t.colJustify,D=void 0===E?v.between:E,N=t.experimentalHideEmptyCols,_=void 0!==N&&N,M=Object(u.c)(),A=l()(y),B=Object(f.d)({colGap:null!=n?n:M.colGap,rowGap:null!=r?r:M.rowGap}),L=Object(f.b)({marginTop:i,marginBottom:c}),P=Object(f.c)({paddingTop:d,paddingBottom:p}),T=Object(f.a)({border:m,borderWidth:g,borderColor:W}),S=function(t,e){var n="phone"===h()().device,o=e||{},r=o.preserveLayoutOnMobile,i=void 0!==r&&r,c=o.hideEmptyCols,d=void 0!==c&&c,l=a.a.Children.toArray(t).map((function(t){if(!(e=t)||!e.props)return{element:t,width:0,hasDefinedWidth:!1,isResponsive:!0};var e,o=Object(f.e)(t.props.width||t.props.blockProps&&t.props.blockProps.width);return o&&"object"===Object(s.a)(o)?{element:t,width:n?o.mobile||0:o.desktop||0,hasDefinedWidth:!0,isResponsive:!0}:!i&&n?{element:t,width:0,hasDefinedWidth:!1,isResponsive:!1}:"number"==typeof o||"string"==typeof o?{element:t,width:o,hasDefinedWidth:!0,isResponsive:!1}:{element:t,width:0,hasDefinedWidth:!1,isResponsive:!0}})),u=l.some((function(t){return t.isResponsive})),p=!i&&n&&!u;return{cols:b(l,{hideEmptyCols:d}),breakOnMobile:p}}(e,{preserveLayoutOnMobile:x,hideEmptyCols:_}),I=S.cols,z=S.breakOnMobile,J=R===w.auto,q=J?j[D]:j.left;return null!=k&&(q=j[k]),a.a.createElement(u.a,Object(o.a)({parent:u.b.ROW},B),a.a.createElement("div",{className:"".concat(z?"flex-none flex-ns":"flex"," ").concat(L," ").concat(P," ").concat(T," ").concat(q," ").concat(A.flexRowContent," items-stretch w-100")},I.map((function(t,e){var n=e===I.length-1,o=n?0:B.colGap,r=n?0:B.rowGap;return a.a.createElement("div",{key:e,className:"".concat(z?"pr".concat(o,"-ns pb").concat(r," pb0-ns"):"pr".concat(o)," ").concat(G?"":"items-stretch"," ").concat(C?"":O.a.stretchChildrenWidth," ").concat("grow"===t.width?"flex-grow-1":""," ").concat(_?O.a.col:""," flex"),style:{width:C||J&&!t.hasDefinedWidth?"auto":z?"100%":t.width}},t.element)}))))},x=Object(c.defineMessages)({title:{id:"admin/editor.row.title"},description:{id:"admin/editor.row.description"}});W.schema={title:x.title.id,description:x.description.id};e.default=W},14:function(t,e,n){t.exports={stretchChildrenWidth:"vtex-flex-layout-0-x-stretchChildrenWidth",col:"vtex-flex-layout-0-x-col"}},2:function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return c})),n.d(e,"c",(function(){return d}));var o,r=n(0),i=n.n(r);!function(t){t.NONE="none",t.ROW="row",t.COL="col"}(o||(o={}));var a=i.a.createContext({parent:o.NONE,colGap:0,rowGap:0}),c=function(t){var e=t.parent,n=t.colGap,o=t.rowGap,c=t.children,d=Object(r.useMemo)((function(){return{parent:e,colGap:n,rowGap:o}}),[e,n,o]);return i.a.createElement(a.Provider,{value:d},c)},d=function(){return Object(r.useContext)(a)}},3:function(t,e,n){"use strict";n.d(e,"d",(function(){return c})),n.d(e,"e",(function(){return l})),n.d(e,"c",(function(){return s})),n.d(e,"b",(function(){return p})),n.d(e,"a",(function(){return f}));var o,r=n(7),i=n(1),a=function(t,e){return t?Object(i.range)(0,12).map(String).includes(String(t))?"string"==typeof t?parseInt(t,10):t:(e&&console.warn("Invalid ".concat(e,' value ("').concat(t,'"). It should be an integer between 0 and ').concat(11,".")),0):0},c=function(t){var e=Object(i.toPairs)(t).map((function(t){var e=Object(r.a)(t,2),n=e[0],o=e[1];return[n,a(o,n)]}));return Object(i.fromPairs)(e)},d=function(t){if("string"!=typeof t)return null;if("grow"===t)return"grow";var e=t.match(new RegExp("(\\d*)(".concat(["%"].join("|"),")")));if(!e)return null;var n=e[1];return null==n?null:parseInt(n,10)},l=(o=d,function(t){return function(t){return t&&null!=t.mobile&&null!=t.desktop}(t)?{mobile:o(t.mobile),desktop:o(t.desktop)}:o(t)}),u=function(t){return function(e){var n=Object(i.pick)(Object.keys(t),e),o=c(n);return Object(i.toPairs)(o).map((function(e){var n=Object(r.a)(e,2),o=n[0],i=n[1];return"".concat(t[o]).concat(i)})).join(" ")}},s=u({paddingTop:"pt",paddingBottom:"pb",paddingLeft:"pl",paddingRight:"pr"}),p=u({marginTop:"mt",marginBottom:"mb",marginLeft:"ml",marginRight:"mr"}),h={top:"bt",right:"br",bottom:"bb",left:"bl",all:"ba"},f=function(t){var e=t.border,n=t.borderWidth,o=t.borderColor,r=e?[].concat(e).map((function(t){return h[t]})).join(" "):"",i=n?"bw".concat(a(n,"bw")):"",c=o?"b--".concat(o.split(" ")[0]):"";return"".concat(r," ").concat(i," ").concat(c)}}}]);; (window.webpackJsonpvtex_flex_layout_0_21_5=window.webpackJsonpvtex_flex_layout_0_21_5||[]).push([["FlexLayout"],[function(e,t){e.exports=React},function(e,t){e.exports=R},,,,function(e,t){e.exports=ReactIntl},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@0.x/useCssHandles"]},,,function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.responsive-values@0.x/useResponsiveValues"]},,,function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.device-detector@0.x/useDevice"]},,,function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.store-components@3.x/Container"]},,,,function(e,t,n){"use strict";n.r(t),function(e){var t=n(4);n.p=Object(t.getPublicPath)("vtex.flex-layout@0.21.5");var o=Object(t.register)((function(){return n(20)}),e,"vtex.flex-layout@0.21.5","vtex.flex-layout@0.x","FlexLayout");o.renderHotReload,o.setupHMR}.call(this,n(10)(e))},function(e,t,n){"use strict";n.r(t);var o=n(0),i=n.n(o),a=n(5),l=n(6),s=n.n(l),r=n(15),c=n.n(r),u=n(9),_=n.n(u),x=n(2),d=n(13),f=["flexRow"],p=function(e){var t=_()(e),n=t.arialabel,o=t.fullWidth,l=t.htmlId,r=Object(x.c)(),u=s()(f),p=Object(a.useIntl)(),v=i.a.createElement(d.default,t),E=r.parent===x.b.NONE,R=!o&&E?i.a.createElement(c.a,null,v):v;return i.a.createElement("div",{className:u.flexRow,id:l,"aria-label":n||p.formatMessage({id:"store/flex-layout.flexLayout-row.aria-label"},{sectionId:null!=l?l:"row"})},R)},v=Object(a.defineMessages)({title:{id:"admin/editor.row.title"},description:{id:"admin/editor.row.description"}});p.schema={title:v.title.id,description:v.description.id},t.default=p}],[[19,"common",0]]]);; (window.webpackJsonpvtex_flex_layout_0_21_5=window.webpackJsonpvtex_flex_layout_0_21_5||[]).push([["Col"],[function(t,n){t.exports=React},function(t,n){t.exports=R},function(t,n,e){"use strict";e.d(n,"b",(function(){return r})),e.d(n,"a",(function(){return a})),e.d(n,"c",(function(){return u}));var r,o=e(0),c=e.n(o);!function(t){t.NONE="none",t.ROW="row",t.COL="col"}(r||(r={}));var i=c.a.createContext({parent:r.NONE,colGap:0,rowGap:0}),a=function(t){var n=t.parent,e=t.colGap,r=t.rowGap,a=t.children,u=Object(o.useMemo)((function(){return{parent:n,colGap:e,rowGap:r}}),[n,e,r]);return c.a.createElement(i.Provider,{value:u},a)},u=function(){return Object(o.useContext)(i)}},function(t,n,e){"use strict";e.d(n,"d",(function(){return a})),e.d(n,"e",(function(){return l})),e.d(n,"c",(function(){return f})),e.d(n,"b",(function(){return p})),e.d(n,"a",(function(){return b}));var r,o=e(7),c=e(1),i=function(t,n){return t?Object(c.range)(0,12).map(String).includes(String(t))?"string"==typeof t?parseInt(t,10):t:(n&&console.warn("Invalid ".concat(n,' value ("').concat(t,'"). It should be an integer between 0 and ').concat(11,".")),0):0},a=function(t){var n=Object(c.toPairs)(t).map((function(t){var n=Object(o.a)(t,2),e=n[0],r=n[1];return[e,i(r,e)]}));return Object(c.fromPairs)(n)},u=function(t){if("string"!=typeof t)return null;if("grow"===t)return"grow";var n=t.match(new RegExp("(\\d*)(".concat(["%"].join("|"),")")));if(!n)return null;var e=n[1];return null==e?null:parseInt(e,10)},l=(r=u,function(t){return function(t){return t&&null!=t.mobile&&null!=t.desktop}(t)?{mobile:r(t.mobile),desktop:r(t.desktop)}:r(t)}),d=function(t){return function(n){var e=Object(c.pick)(Object.keys(t),n),r=a(e);return Object(c.toPairs)(r).map((function(n){var e=Object(o.a)(n,2),r=e[0],c=e[1];return"".concat(t[r]).concat(c)})).join(" ")}},f=d({paddingTop:"pt",paddingBottom:"pb",paddingLeft:"pl",paddingRight:"pr"}),p=d({marginTop:"mt",marginBottom:"mb",marginLeft:"ml",marginRight:"mr"}),s={top:"bt",right:"br",bottom:"bb",left:"bl",all:"ba"},b=function(t){var n=t.border,e=t.borderWidth,r=t.borderColor,o=n?[].concat(n).map((function(t){return s[t]})).join(" "):"",c=e?"bw".concat(i(e,"bw")):"",a=r?"b--".concat(r.split(" ")[0]):"";return"".concat(o," ").concat(c," ").concat(a)}},,function(t,n){t.exports=ReactIntl},function(t,n){t.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@0.x/useCssHandles"]},,,function(t,n){t.exports=__RENDER_8_COMPONENTS__["vtex.responsive-values@0.x/useResponsiveValues"]},,,,,,,,function(t,n,e){"use strict";e.r(n),function(t){var n=e(4);e.p=Object(n.getPublicPath)("vtex.flex-layout@0.21.5");var r=Object(n.register)((function(){return e(18)}),t,"vtex.flex-layout@0.21.5","vtex.flex-layout@0.x","Col");r.renderHotReload,r.setupHMR}.call(this,e(10)(t))},function(t,n,e){"use strict";e.r(n);var r,o,c=e(11),i=e(0),a=e.n(i),u=e(5),l=e(9),d=e.n(l),f=e(6),p=e.n(f),s=e(2),b=e(3),m=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);ot.length)&&(n=t.length);for(var e=0,r=new Array(n);e0?o.sku.seller=null!==(n=o.sku.sellers.find((function(e){return e.sellerDefault})))&&void 0!==n?n:o.sku.sellers[0]:o.sku.seller={commertialOffer:{Price:0,ListPrice:0}},o.sku.image=t.sku.image,r(o)}}})},C=n(38),R=n.n(C),j=n(61),T=n.n(j),k=g.a.useProductSummaryDispatch;var L=function(){var e,t=(null!==(e=R()())&&void 0!==e?e:{}).selectedItem,n=k(),r=T()();return function(e){var i=t&&e.items.find((function(e){return e.itemId===t.itemId}));n({type:"SET_PRODUCT",args:{product:e}}),null==r||r({type:"SET_PRODUCT",args:{product:e}}),null==r||r({type:"SET_SELECTED_ITEM",args:{item:i}})}};var D=function(e){var t=e.product,n=e.inView,r=e.children,i=e.priceBehavior,a=g.a.useProductSummaryDispatch(),o=L();return S({product:t,inView:n,priceBehavior:i,onError:function(){a({type:"SET_PRICE_LOADING",args:{isPriceLoading:!1}})},onComplete:function(e){o(e),a({type:"SET_PRICE_LOADING",args:{isPriceLoading:!1}})}}),u.a.createElement(u.a.Fragment,null,r)},w=n(32),M=n.n(w),A=["sponsoredBadgeContainer","sponsoredBadgeText"],B=function(e){var t=e.label,n=void 0===t?"store/sponsoredBadge.title":t,r=s()(A).handles,i=a()(r.sponsoredBadgeContainer,"absolute z-1"),o=a()(r.sponsoredBadgeText,"c-muted-1 t-mini-s");return u.a.createElement("div",{className:i},u.a.createElement("span",{className:o},u.a.createElement(M.a,{id:n})))},V=function(e){var t,n=e.product,r=e.position,i=e.placement;if(!(null===(t=n.advertisement)||void 0===t?void 0:t.adId))return{};var a=n.productId,o=n.productName,u=n.advertisement;return{"data-van-prod-id":a,"data-van-prod-name":o,"data-van-position":r,"data-van-aid":u.adId,"data-van-cid":u.campaignId,"data-van-req-id":u.adRequestId,"data-van-res-id":u.adResponseId,"data-van-cpc":u.actionCost,"data-van-placement":i}},U=n(22),H=n(39),q=g.a.ProductSummaryProvider,Q=g.a.useProductSummaryDispatch,W=g.a.useProductSummary,F=["container","containerNormal","element","clearLink"];function G(e){var t,n,i,c=e.product,l=e.actionOnClick,m=e.children,p=e.href,_=e.priceBehavior,g=void 0===_?"default":_,b=e.placement,x=e.position,I=e.classes,P=W(),y=P.isLoading,N=P.isHovering,S=P.selectedItem,C=P.listName,R=P.query,j=P.inView,T=P.sponsoredBadge,k=Q(),L=s()(F,{classes:I}).handles,w=(0,Object(E.useRuntime)().getSettings)("vtex.store"),M=null===(t=null==w?void 0:w.advancedSettings)||void 0===t?void 0:t.a11ySemanticHtmlMigration,A=v.a.useProductListDispatch(),U=v.a.useProductListState(),q="autocomplete-result-list"===(null==U?void 0:U.listName),G=Object(o.useRef)(null),J=Object(o.useCallback)((function(){null==A||A({type:"SEND_IMPRESSION",args:{product:c,position:x}}),k({type:"SET_IN_VIEW",args:{inView:!0}})}),[k,A,c,x]);d()({ref:G,once:!0,onView:J}),Object(o.useEffect)((function(){c&&k({type:"SET_PRODUCT",args:{product:c}})}),[c,k]),Object(o.useEffect)((function(){x&&k({type:"SET_POSITION",args:{position:x}})}),[x,k]);var z=Object(o.useCallback)((function(){k({type:"SET_HOVER",args:{isHovering:!1}})}),[k]),K=Object(o.useCallback)((function(){k({type:"SET_HOVER",args:{isHovering:!0}})}),[k]),X=Object(o.useCallback)((function(e){k({type:"SET_LOADING",args:{isLoading:e}})}),[k]),Y=Object(o.useMemo)((function(){return{product:c,isLoading:y,isHovering:N,handleItemsStateUpdate:X}}),[c,y,N,X]),Z=a()(L.container,L.containerNormal,"br3 h-100 w-100 flex flex-column justify-between center tc",!M&&"overflow-hidden"),$=a()(L.element,"pointer pt3 pb4 flex flex-column h-100"),ee=a()(L.clearLink,"h-100 flex flex-column",M&&"focus-visible:outline-2 focus-visible:outline-blue-500"),te=null!==(n=null==S?void 0:S.itemId)&&void 0!==n?n:null===(i=null==c?void 0:c.sku)||void 0===i?void 0:i.itemId,ne=p?{to:p,onClick:q?l:void 0,onClickCapture:q?void 0:l,"aria-label":"View product details for ".concat((null==c?void 0:c.productName)||"product")}:{page:"store.product",params:{slug:null==c?void 0:c.linkText,id:null==c?void 0:c.productId,__listName:C},query:R,onClick:q?l:void 0,onClickCapture:q?void 0:l,"aria-label":"View product details for ".concat((null==c?void 0:c.productName)||"product")},re=V({product:c,position:x,placement:b}),ie=Object(H.a)(c,null==T?void 0:T.position,"containerTopLeft"),ae=Object(O.useIntl)();return u.a.createElement(h.default.Provider,{value:Y},u.a.createElement(f.a,{product:c,query:{skuId:te}},u.a.createElement(D,{product:c,inView:j,priceBehavior:g},u.a.createElement("section",Object(r.a)({"aria-label":ae.formatMessage({id:"store/product-summary.shelf.aria-label"},{productName:c.productName}),className:Z,onMouseEnter:K,onMouseLeave:z,style:{maxWidth:300},ref:G},re),u.a.createElement(E.Link,Object(r.a)({className:ee},ne),u.a.createElement("article",{className:$},ie?u.a.createElement(B,{label:null==T?void 0:T.label}):null,m))))))}function J(e){var t=e.product,n=e.actionOnClick,r=e.href,i=e.priceBehavior,a=void 0===i?"default":i,o=e.trackListName,c=void 0===o||o,s=e.listName,l=e.position,d=e.sponsoredBadgePosition,m=e.sponsoredBadgeLabel,f=e.placement,p=e.classes,v=e.children,_={position:d,label:m};return u.a.createElement(q,{product:t,listName:c?s:void 0,sponsoredBadge:_,isPriceLoading:"async"===a||"asyncOnly1P"===a},u.a.createElement(G,{product:t,href:r,actionOnClick:n,priceBehavior:a,position:l,placement:f,classes:p},v))}J.schema={title:"admin/editor.productSummary.title",description:"admin/editor.productSummary.description"},J.mapCatalogProductToProductSummary=U.b;t.default=J},20:function(e,t,n){"use strict";function r(e){if(e&&0!==e.length){var t=e.find((function(e){return e.sellerDefault}));return t||e[0]}}n.d(t,"a",(function(){return r}))},21:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-list-context@0.x/ProductListContext"]},22:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return b}));var r=n(11),i=n(37),a=n(20),o=new RegExp(/.+ids\/(\d+)/),u=new RegExp(/http:\/\//);function c(e,t,n){if(!e.includes("/arquivos/ids/"))return e;var r=function(e){var t,n,r,i,a=o.exec(e),u=(n="v",null===(i=null!==(r=null==(t=e)?void 0:t.split("".concat(n,"="))[1])&&void 0!==r?r:"")||void 0===i?void 0:i.split("&")[0]);return a&&a.length>0?{cleanUrl:a[0],vParam:u}:{cleanUrl:e}}(e),i=r.vParam,a=r.cleanUrl;return i?"".concat(a,"-").concat(t,"-").concat(n,"?v=").concat(i):"".concat(a,"-").concat(t,"-").concat(n)}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto";if(e){"number"==typeof t&&(t=Math.min(t,3e3)),"number"==typeof n&&(n=Math.min(n,4e3));var r=c(e,t,n),i=r.includes("?")?"&":"?";return"".concat(r).concat(i,"width=").concat(t,"&height=").concat(n,"&aspect=true")}}function l(e){return e.commertialOffer.Price}function d(e){var t=e.commertialOffer.AvailableQuantity;return null!=t&&t>0}function m(e,t){var n=e.filter(p);if(0===n.length)return e[0];if(1===n.length)return n[0];var r=n.map((function(e){return function(e,t){var n=e.sellers;if(1===n.length)return n[0].commertialOffer.Price;var r=n.filter(d).map(l);return"highest"===t?r.reduce((function(e,t){return t>e?t:e})):r.reduce((function(e,t){return tr[e]?n:e}),0):r.reduce((function(e,t,n){return t1&&void 0!==arguments[1]?arguments[1]:"FIRST_AVAILABLE",c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:500;if(!e)return null;var s,l=Object.assign({},e),d=l.items||[],m=l.properties||[],f=null!==(t=m.find((function(e){return"DefaultSKUSelected"===e.name})))&&void 0!==t?t:null;if(s=1===d.length?d[0]:f?v(d,f.values,u):_(d,u)){var p=null!==(n=Object(a.a)(null==s?void 0:s.sellers))&&void 0!==n?n:O,b=null!==(i=null==s?void 0:s.referenceId)&&void 0!==i?i:[],x=Object(r.a)(b,1),I=x[0],P=void 0===I?E:I,y=null!==(o=null==s?void 0:s.images)&&void 0!==o?o:[],N=y.map((function(e){return Object.assign(Object.assign({},e),{imageUrl:h(e.imageUrl,c)})})),S=Object(r.a)(N,1),C=S[0],R=void 0===C?g:C;l.sku=Object.assign(Object.assign({},s),{seller:p,referenceId:P,image:R,images:N})}return l}},29:function(e,t){e.exports=ReactApollo},32:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.native-types@0.x/IOMessage"]},38:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-context@0.x/useProduct"]},39:function(e,t,n){"use strict";t.a=function(e,t,n){var r;return!!(null===(r=null==e?void 0:e.advertisement)||void 0===r?void 0:r.adId)&&t===n}},44:function(e,t,n){"use strict";n.r(t);var r=n(0),i=n.n(r),a=i.a.createContext(void 0),o=a.Consumer;a.Consumer=function(e){return console.error("If you are seeing this, a component it's using ProductSummaryContext from vtex.product-summary, which is deprecated. Please see the issue https://github.com/vtex-apps/store-issues#28 on how to migrate to the new component."),i.a.createElement(o,e)},t.default=a},5:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@1.x/useCssHandles"]},58:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.on-view@1.x/useOnView"]},59:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-context@0.x/ProductContextProvider"]},6:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-summary-context@0.x/ProductSummaryContext"]},60:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.store-resources@0.x/QueryItemsWithSimulation"]},61:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-context@0.x/useProductDispatch"]},7:function(e,t){e.exports=Classnames},8:function(e,t){e.exports=__RENDER_8_RUNTIME__},85:function(e,t,n){"use strict";n.r(t),function(e){var t=n(4);n.p=Object(t.getPublicPath)("vtex.product-summary@2.90.9");var r=Object(t.register)((function(){return n(105)}),e,"vtex.product-summary@2.90.9","vtex.product-summary@2.x","ProductSummaryCustom");r.renderHotReload,r.setupHMR}.call(this,n(13)(e))}},[[85,"common"]]]);; (window.webpackJsonpvtex_product_summary_2_90_9=window.webpackJsonpvtex_product_summary_2_90_9||[]).push([[0],{20:function(e,n,t){"use strict";function r(e){if(e&&0!==e.length){var n=e.find((function(e){return e.sellerDefault}));return n||e[0]}}t.d(n,"a",(function(){return r}))},22:function(e,n,t){"use strict";t.d(n,"a",(function(){return l})),t.d(n,"b",(function(){return _}));var r=t(11),i=t(37),c=t(20),u=new RegExp(/.+ids\/(\d+)/),a=new RegExp(/http:\/\//);function o(e,n,t){if(!e.includes("/arquivos/ids/"))return e;var r=function(e){var n,t,r,i,c=u.exec(e),a=(t="v",null===(i=null!==(r=null==(n=e)?void 0:n.split("".concat(t,"="))[1])&&void 0!==r?r:"")||void 0===i?void 0:i.split("&")[0]);return c&&c.length>0?{cleanUrl:c[0],vParam:a}:{cleanUrl:e}}(e),i=r.vParam,c=r.cleanUrl;return i?"".concat(c,"-").concat(n,"-").concat(t,"?v=").concat(i):"".concat(c,"-").concat(n,"-").concat(t)}function l(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto";if(e){"number"==typeof n&&(n=Math.min(n,3e3)),"number"==typeof t&&(t=Math.min(t,4e3));var r=o(e,n,t),i=r.includes("?")?"&":"?";return"".concat(r).concat(i,"width=").concat(n,"&height=").concat(t,"&aspect=true")}}function s(e){return e.commertialOffer.Price}function f(e){var n=e.commertialOffer.AvailableQuantity;return null!=n&&n>0}function d(e,n){var t=e.filter(v);if(0===t.length)return e[0];if(1===t.length)return t[0];var r=t.map((function(e){return function(e,n){var t=e.sellers;if(1===t.length)return t[0].commertialOffer.Price;var r=t.filter(f).map(s);return"highest"===n?r.reduce((function(e,n){return n>e?n:e})):r.reduce((function(e,n){return nr[e]?t:e}),0):r.reduce((function(e,n,t){return n1&&void 0!==arguments[1]?arguments[1]:"FIRST_AVAILABLE",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:500;if(!e)return null;var l,s=Object.assign({},e),f=s.items||[],d=s.properties||[],m=null!==(n=d.find((function(e){return"DefaultSKUSelected"===e.name})))&&void 0!==n?n:null;if(l=1===f.length?f[0]:m?p(f,m.values,a):h(f,a)){var v=null!==(t=Object(c.a)(null==l?void 0:l.sellers))&&void 0!==t?t:P,_=null!==(i=null==l?void 0:l.referenceId)&&void 0!==i?i:[],E=Object(r.a)(_,1),S=E[0],y=void 0===S?O:S,A=null!==(u=null==l?void 0:l.images)&&void 0!==u?u:[],I=A.map((function(e){return Object.assign(Object.assign({},e),{imageUrl:b(e.imageUrl,o)})})),j=Object(r.a)(I,1),L=j[0],w=void 0===L?g:L;s.sku=Object.assign(Object.assign({},l),{seller:v,referenceId:y,image:w,images:I})}return s}},49:function(e,n,t){"use strict";t.r(n),t.d(n,"PRODUCT_LIST_PLACEMENT",(function(){return g}));var r=t(0),i=t.n(r),c=t(50),u=t.n(c),a=t(51),o=t.n(a),l=t(21),s=t.n(l),f=t(8),d=t(52),m=t.n(d);var v=function(){return m()(),null},p=t(22),h=s.a.ProductListProvider,g="home_shelf";function O(e){var n=e.children,t=e.products,c=e.ProductSummary,a=e.listName,l=e.actionOnProductClick,s=e.preferredSKU,d=o()().list,m=Object(f.useTreePath)().treePath,v=Object(r.useMemo)((function(){var e=null==t?void 0:t.map((function(e,n){var t=Object(p.b)(e,s),r=d.length+n+1,u=function(){"function"==typeof l&&l(t,{position:r})};return"function"==typeof c?i.a.createElement(c,{key:t.cacheId,product:t,listName:a,actionOnClick:u,position:r,placement:g}):i.a.createElement(f.ExtensionPoint,{id:"product-summary",key:e.cacheId,treePath:m,product:t,listName:a,actionOnClick:u,position:r,placement:g})}));return d.concat(null!=e?e:[])}),[t,d,s,c,m,a,l]);return i.a.createElement(u.a,{list:v},n)}n.default=function(e){var n=e.children,t=e.products,r=e.listName,c=e.ProductSummary,u=e.actionOnProductClick,a=e.preferredSKU;return i.a.createElement(h,{listName:null!=r?r:""},i.a.createElement(O,{preferredSKU:a,products:t,listName:r,ProductSummary:c,actionOnProductClick:u},n),i.a.createElement(v,null))}}}]);; (window.webpackJsonpvtex_product_summary_2_90_9=window.webpackJsonpvtex_product_summary_2_90_9||[]).push([["ProductSummaryList"],{0:function(t,e){t.exports=React},109:function(t,e,r){"use strict";r.r(e);var i=r(31),o=r.n(i),n=r(36),a=r(11),s=r(0),u=r.n(s),d=r(29),c=r(70),m=r.n(c),p=r(71),l=r.n(p),y=r(72),S=r.n(y),_=r(2),v=r(8),E=r(49),L=function(){var t=Object(v.useRuntime)().rootPath;return{getShippingOptionFromSession:Object(s.useCallback)(Object(n.a)(o.a.mark((function e(){var r,i,n,a,s,u,d,c;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(s=new Headers).append("Content-Type","application/json"),u={method:"GET",headers:s,redirect:"follow"},e.next=5,fetch("".concat(null!=t?t:"","/api/sessions?items=public.shippingOption"),u);case 5:return d=e.sent,e.next=8,d.json();case 8:if(c=e.sent,null===(n=null===(i=null===(r=null==c?void 0:c.namespaces)||void 0===r?void 0:r.public)||void 0===i?void 0:i.shippingOption)||void 0===n?void 0:n.value){e.next=11;break}return e.abrupt("return",null);case 11:return e.abrupt("return",null===(a=JSON.parse(c.namespaces.public.shippingOption.value))||void 0===a?void 0:a.map((function(t){return t.value})));case 12:case"end":return e.stop()}}),e)}))),[t])}},f={RELEVANCE:{name:"admin/editor.productSummaryList.orderType.relevance",value:""},TOP_SALE_DESC:{name:"admin/editor.productSummaryList.orderType.sales",value:"OrderByTopSaleDESC"},PRICE_DESC:{name:"admin/editor.productSummaryList.orderType.priceDesc",value:"OrderByPriceDESC"},PRICE_ASC:{name:"admin/editor.productSummaryList.orderType.priceAsc",value:"OrderByPriceASC"},NAME_ASC:{name:"admin/editor.productSummaryList.orderType.nameAsc",value:"OrderByNameASC"},NAME_DESC:{name:"admin/editor.productSummaryList.orderType.nameDesc",value:"OrderByNameDESC"},RELEASE_DATE_DESC:{name:"admin/editor.productSummaryList.orderType.releaseDate",value:"OrderByReleaseDateDESC"},BEST_DISCOUNT_DESC:{name:"admin/editor.productSummaryList.orderType.discount",value:"OrderByBestDiscountDESC"}};function x(t){if(!v.canUseDOM)return null;for(var e="".concat(t,"="),r=decodeURIComponent(document.cookie).split(";"),i=0;i