!function(t){function e(e){for(var r,u,a=e[0],c=e[1],l=e[2],s=0,d=[];st.length)&&(e=t.length);for(var n=0,r=new Array(e);n0;){var r=s;s=new Set,r.forEach((function(e){o.has(e)||(o.add(e),(t[e]||new Set).forEach((function(e){s.add(e)})))}))}return o.forEach((function(i){var t=a(e,i);t&&n.definitions.push(t)})),n}(n,"Profile")},,,,function(e,i,n){e.exports={iconSize:"vtex-wish-list-1-x-iconSize",fill:"vtex-wish-list-1-x-fill",outline:"vtex-wish-list-1-x-outline",clearLink:"vtex-wish-list-1-x-clearLink"}},,,,,,,,function(e,i){e.exports=__RENDER_8_COMPONENTS__["vtex.product-context@0.x/ProductContext"]},function(e,i){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/Button"]},function(e,i){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/ToastContext"]},function(e,i){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"CheckItem"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"shopperId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"productId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sku"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[{kind:"Directive",name:{kind:"Name",value:"context"},arguments:[{kind:"Argument",name:{kind:"Name",value:"sender"},value:{kind:"StringValue",value:"vtex.wish-list@1.18.2",block:!1}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"checkList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"shopperId"},value:{kind:"Variable",name:{kind:"Name",value:"shopperId"}}},{kind:"Argument",name:{kind:"Name",value:"productId"},value:{kind:"Variable",name:{kind:"Name",value:"productId"}}},{kind:"Argument",name:{kind:"Name",value:"sku"},value:{kind:"Variable",name:{kind:"Name",value:"sku"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"runtimeMeta"},arguments:[{kind:"Argument",name:{kind:"Name",value:"hash"},value:{kind:"StringValue",value:"b83f1b8b01e40466f97a33cbb1c32b980a4c715f4e567fb79efe5c3d2ed34baf",block:!1}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"inList"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"listNames"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"listIds"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:344}};n.loc.source={body:'query CheckItem($shopperId: String!, $productId: String!, $sku: String) @context(sender: "vtex.wish-list@1.18.2") {\n checkList(shopperId: $shopperId, productId: $productId, sku: $sku) @runtimeMeta(hash: "b83f1b8b01e40466f97a33cbb1c32b980a4c715f4e567fb79efe5c3d2ed34baf") {\n inList\n listNames\n listIds\n message\n __typename\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var t={};function a(e,i){for(var n=0;n0;){var r=s;s=new Set,r.forEach((function(e){o.has(e)||(o.add(e),(t[e]||new Set).forEach((function(e){s.add(e)})))}))}return o.forEach((function(i){var t=a(e,i);t&&n.definitions.push(t)})),n}(n,"CheckItem")},function(e,i){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddToList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"listItem"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ListItemInputType"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"shopperId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[{kind:"Directive",name:{kind:"Name",value:"context"},arguments:[{kind:"Argument",name:{kind:"Name",value:"sender"},value:{kind:"StringValue",value:"vtex.wish-list@1.18.2",block:!1}}]},{kind:"Directive",name:{kind:"Name",value:"runtimeMeta"},arguments:[{kind:"Argument",name:{kind:"Name",value:"hash"},value:{kind:"StringValue",value:"996e55ed3e6fe9d4195c58f9491c5687226a5094396638fa88944a113ebc67ed",block:!1}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addToList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"listItem"},value:{kind:"Variable",name:{kind:"Name",value:"listItem"}}},{kind:"Argument",name:{kind:"Name",value:"shopperId"},value:{kind:"Variable",name:{kind:"Name",value:"shopperId"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],directives:[]}]}}],loc:{start:0,end:289}};n.loc.source={body:'mutation AddToList($listItem: ListItemInputType!, $shopperId: String!, $name: String!) @context(sender: "vtex.wish-list@1.18.2") @runtimeMeta(hash: "996e55ed3e6fe9d4195c58f9491c5687226a5094396638fa88944a113ebc67ed") {\n addToList(listItem: $listItem, shopperId: $shopperId, name: $name)\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var t={};function a(e,i){for(var n=0;n0;){var r=s;s=new Set,r.forEach((function(e){o.has(e)||(o.add(e),(t[e]||new Set).forEach((function(e){s.add(e)})))}))}return o.forEach((function(i){var t=a(e,i);t&&n.definitions.push(t)})),n}(n,"AddToList")},function(e,i){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RemoveFromList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"shopperId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[{kind:"Directive",name:{kind:"Name",value:"context"},arguments:[{kind:"Argument",name:{kind:"Name",value:"sender"},value:{kind:"StringValue",value:"vtex.wish-list@1.18.2",block:!1}}]},{kind:"Directive",name:{kind:"Name",value:"runtimeMeta"},arguments:[{kind:"Argument",name:{kind:"Name",value:"hash"},value:{kind:"StringValue",value:"9aed358e26ce21ab217ccc495a954aca608506e22f2d2d06af6051874cda8f6e",block:!1}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeFromList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"shopperId"},value:{kind:"Variable",name:{kind:"Name",value:"shopperId"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],directives:[]}]}}],loc:{start:0,end:265}};n.loc.source={body:'mutation RemoveFromList($shopperId: String!, $id: ID!, $name: String) @context(sender: "vtex.wish-list@1.18.2") @runtimeMeta(hash: "9aed358e26ce21ab217ccc495a954aca608506e22f2d2d06af6051874cda8f6e") {\n removeFromList(id: $id, shopperId: $shopperId, name: $name)\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var t={};function a(e,i){for(var n=0;n0;){var r=s;s=new Set,r.forEach((function(e){o.has(e)||(o.add(e),(t[e]||new Set).forEach((function(e){s.add(e)})))}))}return o.forEach((function(i){var t=a(e,i);t&&n.definitions.push(t)})),n}(n,"RemoveFromList")},,,,,,,,,,,,,,,,,,function(e,i,n){"use strict";n.r(i),function(e){var i=n(2);n.p=Object(i.getPublicPath)("vtex.wish-list@1.18.2");var t=Object(i.register)((function(){return n(48)}),e,"vtex.wish-list@1.18.2","vtex.wish-list@1.x","AddProductBtn");t.renderHotReload,t.setupHMR}.call(this,n(6)(e))},function(e,i,n){"use strict";n.r(i);var t,a,d,o,s=n(1),r=n(0),l=n.n(r),u=n(3),c=n(4),m=n(24),v=n.n(m),f=n(25),k=n.n(f),p=n(26),h=n.n(p),g=n(5),b=n(8),N=n.n(b),S=n(9),I=n.n(S),w=n(10),_=n(11),y=n(27),x=n.n(y),E=n(28),O=n.n(E),D=n(12),L=n.n(D),T=n(29),V=n.n(T),A=n(16),P=n.n(A),R=Object(_.a)((function(){return sessionStorage})),j=["wishlistIconContainer","wishlistIcon"],F=null!==(t=JSON.parse(String(R.getItem("wishlist_isAuthenticated"))))&&void 0!==t&&t,C=null!==(a=R.getItem("wishlist_shopperId"))&&void 0!==a?a:null,M=null!==(d=R.getItem("wishlist_addAfterLogin"))&&void 0!==d?d:null,$=null!==(o=JSON.parse(R.getItem("wishlist_wishlisted")))&&void 0!==o?o:[],q={},W="Wishlist",z=Object(c.defineMessages)({addButton:{id:"store/wishlist.addButton"},seeLists:{id:"store/wishlist-see-lists"},productAddedToList:{id:"store/wishlist-product-added-to-list"},addProductFail:{id:"store/wishlist-add-product-fail"},listNameDefault:{id:"store/wishlist-default-list-name"},login:{id:"store/wishlist-login"},notLogged:{id:"store/wishlist-not-logged"}}),J=function(e,i){void 0===$.find((function(n){return n.productId&&n.sku&&n.productId===e&&n.sku===i}))&&$.push({productId:e,sku:i}),Q($)},Q=function(e){return R.setItem("wishlist_wishlisted",JSON.stringify(e)),e};i.default=function(e){var i,n,t,a,d,o,m,f,p,b,S,_,y,E,D,T,A,B,G,U=e.toastURL,H=void 0===U?"/account/#wishlist":U,K=Object(c.useIntl)(),X=Object(r.useState)({isLoading:!0,isWishlistPage:null}),Y=Object(s.a)(X,2),Z=Y[0],ee=Y[1],ie=Object(u.useMutation)(V.a,{onCompleted:function(){var e=String(ke.productId).split("-"),i=Object(s.a)(e,1)[0];q[i]&&(q[i]={isWishlisted:!1,wishListId:"",sku:""}),$=$.filter((function(e){return e.productId!==i&&e.sku!==Ee})),Q($),ee(Object.assign(Object.assign({},Z),{isWishlistPage:!1}))}}),ne=Object(s.a)(ie,2),te=ne[0],ae=ne[1].loading,de=Object(g.useRuntime)(),oe=de.navigate,se=de.history,re=de.route,le=de.account,ue=I()().push,ce=N()(j),me=Object(r.useContext)(h.a).showToast,ve=Object(r.useContext)(v.a),fe=ve.selectedItem,ke=ve.product,pe=(D=Object(r.useState)(),T=Object(s.a)(D,2),A=T[0],B=T[1],G=Object(w.a)(),Object(r.useEffect)((function(){G&&G.then((function(e){var i=e.response;B(i)}))}),[G]),A),he=Object(u.useLazyQuery)(x.a),ge=Object(s.a)(he,2),be=ge[0],Ne=ge[1],Se=Ne.data,Ie=Ne.loading,we=Ne.called,_e=Object(u.useQuery)(L.a,{ssr:!1}).data,ye=String(null==ke?void 0:ke.productId).split("-"),xe=Object(s.a)(ye,1)[0],Ee=null===(i=null==ke?void 0:ke.sku)||void 0===i?void 0:i.itemId;$=null!==(n=JSON.parse(R.getItem("wishlist_wishlisted")))&&void 0!==n?n:[];var Oe=function(e,i){var n;"notLogged"===e&&(n={label:K.formatMessage(z.login),onClick:function(){var e,i;return oe({page:"store.login",query:"returnUrl=".concat(encodeURIComponent(String(null===(e=null==se?void 0:se.location)||void 0===e?void 0:e.pathname)+String(null===(i=null==se?void 0:se.location)||void 0===i?void 0:i.search)))})}}),"productAddedToList"===e&&(n={label:K.formatMessage(z.seeLists),onClick:function(){return oe({to:i,fetchPage:!0})}}),me({message:K.formatMessage(z[e]),action:n})},De=Object(u.useMutation)(O.a,{onCompleted:function(e){q[xe]={wishListId:e.addToList,isWishlisted:!0,sku:Ee},J(xe,Ee),Oe("productAddedToList",H)}}),Le=Object(s.a)(De,2),Te=Le[0],Ve=Le[1],Ae=Ve.loading;Ve.error&&Oe("addProductFail",H),pe&&(F="true"===(null===(d=null===(a=null===(t=null==pe?void 0:pe.namespaces)||void 0===t?void 0:t.profile)||void 0===a?void 0:a.isAuthenticated)||void 0===d?void 0:d.value),C=(null===(o=null==_e?void 0:_e.profile)||void 0===o?void 0:o.pii)?null!==(y=null===(_=null===(S=null===(b=null==pe?void 0:pe.namespaces)||void 0===b?void 0:b.profile)||void 0===S?void 0:S.id)||void 0===_?void 0:_.value)&&void 0!==y?y:null:null===(p=null===(f=null===(m=null==pe?void 0:pe.namespaces)||void 0===m?void 0:m.profile)||void 0===f?void 0:f.email)||void 0===p?void 0:p.value,R.setItem("wishlist_isAuthenticated",JSON.stringify(F)),R.setItem("wishlist_shopperId",String(C)),F||C||R.getItem("wishlist_wishlisted")&&R.removeItem("wishlist_wishlisted"));var Pe=Z.isWishlistPage;if(!ke)return null;null===Pe&&(null==ke?void 0:ke.wishlistPage)&&ee(Object.assign(Object.assign({},Z),{isWishlistPage:!0}));F&&ke&&!we&&C&&(F&&M&&M===xe?(Te({variables:{listItem:{productId:xe,title:ke.productName,sku:fe.itemId},shopperId:C,name:W}}),M=null,R.removeItem("wishlist_addAfterLogin")):be({variables:{shopperId:String(C),productId:xe,sku:Ee}}));var Re,je,Fe,Ce=function(){var e,i,n;return"false"!==(null===(n=null===(i=null===(e=null==pe?void 0:pe.namespaces)||void 0===e?void 0:e.profile)||void 0===i?void 0:i.isAuthenticated)||void 0===n?void 0:n.value)&&void 0!==$.find((function(e){return e.productId===xe}))};if((null===(E=null==Se?void 0:Se.checkList)||void 0===E?void 0:E.inList)&&(!q[xe]||null===q[xe].wishListId)){var Me=(Re=W,je=Se.checkList,Fe=je.listNames.findIndex((function(e){return Re===e})),je.listIds[Fe]);q[xe]={isWishlisted:Se.checkList.inList,wishListId:Me,sku:Ee},Se.checkList.inList&&void 0===$.find((function(e){return e.productId===xe&&e.sku===Ee}))&&xe&&Ee&&J(xe,Ee)}return(null==Se?void 0:Se.checkList)&&!0!==Se.checkList.inList&&void 0===q[xe]&&void 0!==$.find((function(e){return e.productId===xe&&e.sku===Ee}))&&($=$.filter((function(e){return e.productId!==xe&&e.sku!==Ee})),Q($),ee(Object.assign(Object.assign({},Z),{isWishlistPage:!1}))),l.a.createElement(g.NoSSR,null,l.a.createElement("div",{className:ce.wishlistIconContainer},l.a.createElement(k.a,{variation:"tertiary",onClick:function(e){var i;if(e.preventDefault(),e.stopPropagation(),F){var n={list:null===(i=null==re?void 0:re.canonicalPath)||void 0===i?void 0:i.replace("/",""),items:{product:ke,selectedItem:fe,account:le}};Ce()&&C?(te({variables:{id:q[xe].wishListId,shopperId:C,name:W}}),n.event="removeToWishlist"):(Te({variables:{listItem:{productId:xe,title:ke.productName,sku:fe.itemId},shopperId:C,name:W}}),n.event="addToWishlist"),ue(n)}else R.setItem("wishlist_addAfterLogin",String(xe)),Oe("notLogged",H)},isLoading:Ie||Ae||ae},l.a.createElement("span",{className:"".concat(ce.wishlistIcon," ").concat(Ce()?P.a.fill:P.a.outline," ").concat(P.a.iconSize)}))))}}],[[47,"common"]]]);; !function(e){function t(t){for(var n,u,a=t[0],c=t[1],l=t[2],d=0,s=[];de.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re?e:t},_=function(t,e){var n=parseInt(t,10);return Number.isNaN(n)?1:y(parseInt(t,10),e)},f=["quantitySelectorDropdownMobileContainer","quantitySelectorDropdownContainer","quantitySelectorInputMobileContainer","quantitySelectorInputContainer"],b=function(t){var e=t.itemId,n=t.selectedQuantity,o=t.size,r=void 0===o?"small":o,l=t.onChange,d=t.availableQuantity,v=Object(a.useState)("dropdown"),b=Object(c.a)(v,2),h=b[0],x=b[1],E=Object(a.useState)("".concat(n)),N=Object(c.a)(E,2),q=N[0],S=N[1],w=m()().isMobile,C=u()(f),g=function(t){for(var e=Math.min(9,t),n=[],a=1;a<=e;++a)n.push({value:a,label:"".concat(a)});return t>=10&&n.push({value:10,label:"".concat(10,"+")}),n}(d),M=function(t){var e=_(t,d),n=function(t,e){var n=parseInt(t,10);return Number.isNaN(n)||n<1?"":"".concat(y(n,e))}(t,d);"dropdown"===h&&e>=Math.min(d+1,10)&&x("input"),S(n),l({value:e})};return"dropdown"===h?i.a.createElement("div",{className:w?C.quantitySelectorDropdownMobileContainer:C.quantitySelectorDropdownContainer},i.a.createElement(s.a,{id:"".concat(w?"quantity-dropdown-mobile":"quantity-dropdown","-").concat(e),testId:"".concat(w?"quantity-dropdown-mobile":"quantity-dropdown","-").concat(e),options:g,size:r,value:n,onChange:function(t){return M(t.target.value)},placeholder:" "})):i.a.createElement("div",{className:w?C.quantitySelectorInputMobileContainer:C.quantitySelectorInputContainer},i.a.createElement(p.a,{id:"".concat(w?"quantity-input-mobile":"quantity-input","-").concat(e),size:r,value:q,maxLength:5,onChange:function(t){return M(t.target.value)},onBlur:function(){""===q&&S("1");var t=_(q,d);te.length)&&(t=e.length);for(var r=0,n=new Array(t);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0?r=o[i=d]:0!==n?(i=0,r=0):e&&(r=o[i=d]),l&&l({type:"SLIDE",payload:{currentSlide:i,transform:r}}),s({type:"SLIDE",payload:{transform:r,currentSlide:i}})}}},j=function(e){var t=Object(r.useState)(!1),n=Object(g.a)(t,2),i=n[0],a=n[1],o=Object(S.useSliderGroupState)(),s=Object(S.useSliderGroupDispatch)();return Object(r.useEffect)((function(){var t=function(){null==s||s({type:"HOVER",payload:{isHovering:!0}}),a(!0)},n=function(){null==s||s({type:"HOVER",payload:{isHovering:!1}}),a(!1)};return(null==e?void 0:e.current)&&(e.current.addEventListener("mouseenter",t),e.current.addEventListener("mouseleave",n)),function(){var i=e.current;i&&(i.removeEventListener("mouseenter",t),i.removeEventListener("mouseleave",n))}}),[e,s]),(null==o?void 0:o.isHovering)?{isHovering:!0}:{isHovering:i}},T=n(14),_=n.n(T)()(X),I=_.CssHandlesProvider,M=_.useContextCssHandles,N=function(e,t){return t%e==0?"firstVisible":(t+1)%e==0?"lastVisible":""},x=function(e){return a.a.Children.toArray(a.a.Children.map(e,(function(e){return"string"==typeof e||"number"==typeof e?e:Object(r.cloneElement)(e,Object.assign(Object.assign({},e.props),{__isDuplicated:!0}))})))},C=function(e){var t=e.infinite,n=e.usePagination,s=e.centerMode,l=e.centerModeSlidesGap,d=e.totalItems,c=e.children,u=P(),f=u.slideWidth,v=u.slidesPerPage,p=u.currentSlide,m=u.isOnTouchMove,g=u.useSlidingTransitionEffect,y=u.slideTransition,h=y.speed,b=y.timing,O=y.delay,w=u.transformMap,j=u.transform,T=E(),_=Object(o.useIntl)(),I=Object(S.useSliderGroupDispatch)(),C=M(),D=C.handles,R=C.withModifiers,A=function(e){var t=e.currentSlide,n=e.slidesPerPage,i=e.totalItems,a=e.centerMode,o=Object(r.useRef)(new Set);Object(r.useEffect)((function(){for(var e=0;e=n&&t=n&&t+1=n&&t-1=r)}({index:e,currentSlide:t,slidesToShow:n,totalItems:i,centerMode:a})};return{shouldRenderItem:function(e){return o.current.has(e)||s(e)},isItemVisible:s}}({currentSlide:p,slidesPerPage:v,totalItems:d,centerMode:s}),L=A.shouldRenderItem,k=A.isItemVisible,H=t&&c?x(c).slice(0,v):[],U=(t&&c?x(c).slice(c.length-v):[]).concat(null!=c?c:[],H),G=v<=d?"".concat(100*U.length/v,"%"):"100%";return a.a.createElement("div",{"data-testid":"slider-track",className:"".concat(D.sliderTrack," flex ").concat("disabled"!==s?"":"justify-around"," relative pa0 ma0"),style:{transition:m||!g?void 0:"transform ".concat(h,"ms ").concat(b," ").concat(O,"ms"),transform:"translate3d(".concat(m?j:w[p],"%, 0, 0)"),width:G},onTransitionEnd:function(){T({type:"DISABLE_TRANSITION"}),p>=d&&(T({type:"ADJUST_CURRENT_SLIDE",payload:{currentSlide:0,transform:w[0]}}),null==I||I({type:"SLIDE",payload:{currentSlide:0,transform:w[0]}})),p<0&&(T({type:"ADJUST_CURRENT_SLIDE",payload:{currentSlide:p+d,transform:w[p+d]}}),null==I||I({type:"SLIDE",payload:{currentSlide:p+d,transform:w[p+d]}}))},"aria-atomic":"false","aria-live":"polite"},U.map((function(e,r){var o=r-(t?v:0),c={width:"".concat(f,"%"),marginLeft:"disabled"===s||l?void 0:"".concat(f/(8*v),"%"),marginRight:"disabled"===s||l?void 0:"".concat(f/(8*v),"%"),paddingLeft:"disabled"!==s&&l?l/2:void 0,paddingRight:"disabled"!==s&&l?l/2:void 0};return a.a.createElement("div",Object(i.a)({key:o},function(e){var t=e.visible,n=e.index,i=e.totalItems,r=e.intl;return n<0||n>=i?{"aria-hidden":!t,role:"none presentation"}:{"aria-hidden":!t,role:"group","aria-roledescription":"slide","aria-label":"".concat(r.formatMessage({id:"store/slider-layout.sliderTrack.aria-label"},{slide:n+1,total:i}))}}({visible:k(o),index:o,totalItems:d,intl:_}),{className:"".concat(R("slide",[N(v,o),k(o)?"visible":"hidden"])," flex relative"),"data-index":o>=0&&o0?u(i):c(i)};return a.a.createElement("div",{className:"".concat(p.paginationDotsContainer," flex absolute justify-center pa0 ma0 bottom-0 left-0 right-0"),role:"group","aria-label":"Slider pagination dots"},S.map((function(e){var n=e===H(g,s,o);return a.a.createElement("div",{className:"".concat(m("paginationDot",n?"isActive":"")," ").concat(n?"bg-emphasis":"bg-muted-3"," grow dib br-100 pa2 mr2 ml2 bw0 pointer outline-0"),style:{height:"".concat(.625,"rem"),width:"".concat(.625,"rem")},key:e,tabIndex:n?0:-1,onKeyDown:function(t){return y(t,e)},onClick:function(t){return y(t,e)},role:"button","aria-controls":t,"aria-label":"Dot ".concat(e+1," of ").concat(S.length),"data-testid":"paginationDot"})})))},G=Object(r.memo)(U),W=["sliderLayoutContainer","sliderTrackContainer"].concat(Object(v.a)(["sliderTrack","slide","slideChildrenContainer"]),Object(v.a)(["sliderLeftArrow","sliderRightArrow","sliderArrows"]),Object(v.a)(["paginationDotsContainer","paginationDot"])),z=function(e){var t=e.children,n=e.totalItems,i=e.infinite,o=void 0!==i&&i,s=e.showNavigationArrows,l=e.showPaginationDots,d=e.usePagination,c=void 0===d||d,u=e.arrowSize,f=e.fullWidth,v=e.itemsPerPage,p=e.centerMode,S=e.centerModeSlidesGap,y=M().handles,h=m()().isMobile,b=P(),O=b.label,T=void 0===O?"slider":O,_=b.slidesPerPage,I=Object(r.useRef)(null),N=function(e){var t=e.infinite,n=e.centerMode,i=E(),a=P().transform,o=w(t),s=o.goForward,l=o.goBack,d=Object(r.useState)({touchStartX:0,touchInitialTransform:a}),c=Object(g.a)(d,2),u=c[0],f=c[1];return{onTouchEnd:function(e){var t=e.changedTouches[0].clientX-u.touchStartX;Math.abs(t)>75?(t>0&&l(),t<0&&s()):i({type:"TOUCH",payload:{transform:u.touchInitialTransform,isOnTouchMove:!1}}),f({touchStartX:0,touchInitialTransform:a}),i({type:"TOUCH",payload:{isOnTouchMove:!1}})},onTouchStart:function(e){var t=e.touches[0].clientX;f({touchStartX:t,touchInitialTransform:a})},onTouchMove:function(e){var t=e.touches[0].clientX-u.touchStartX,r=u.touchInitialTransform+t/(25*("disabled"!==n?2:1));i({type:"TOUCH",payload:{transform:r,isOnTouchMove:!0}})}}}({infinite:o,centerMode:p}),x=N.onTouchEnd,D=N.onTouchStart,R=N.onTouchMove;!function(e,t){var n=P().autoplay,i=j(t).isHovering,a=(null==n?void 0:n.stopOnHover)&&i,o=w(e).goForward;Object(r.useEffect)((function(){if(n){var e=setTimeout((function(){o()}),n.timeout);return a&&clearTimeout(e),function(){return clearTimeout(e)}}}),[o,a,n])}(o,I),function(e,t){var n=P(),i=n.navigationStep,a=n.isPageNavigationStep,o=n.totalItems,s=E();Object(r.useEffect)((function(){var n=o<=t?o:t,r=a?n:i,l=function(e){s({type:"ADJUST_ON_RESIZE",payload:{shouldCorrectItemPosition:e,slidesPerPage:n,navigationStep:r}})},d=function(t){l(!t||e)};return l(!1),window.addEventListener("resize",d),function(){return window.removeEventListener("resize",d)}}),[e,s,o,t,a,i])}(o,v);var A=_>=n,L="".concat(T.toLowerCase().trim().replace(/ /g,"-"),"-items-").concat(Math.random().toString(36).substring(2,9)),H=Boolean(("always"===s||"mobileOnly"===s&&h||"desktopOnly"===s&&!h)&&!A),U=Boolean(("always"===l||"mobileOnly"===l&&h||"desktopOnly"===l&&!h)&&!A);return a.a.createElement("section",{onTouchStart:function(e){return c&&!A?D(e):null},onTouchEnd:function(e){return c&&!A?x(e):null},onTouchMove:function(e){return c&&!A?R(e):null},"aria-label":T,id:L,style:{WebkitOverflowScrolling:c?void 0:"touch",paddingLeft:f?void 0:2*u,paddingRight:f?void 0:2*u,touchAction:"pan-y"},className:"w-100 flex items-center relative ".concat(y.sliderLayoutContainer)},a.a.createElement("div",{className:"w-100 ".concat(y.sliderTrackContainer," ").concat(c?"overflow-hidden":"overflow-x-scroll"),ref:I},a.a.createElement(C,{centerMode:p,centerModeSlidesGap:S,infinite:o,totalItems:n,usePagination:c},t)),H&&c&&a.a.createElement(r.Fragment,null,a.a.createElement(k,{totalItems:n,orientation:"left",controls:L,infinite:o,arrowSize:u}),a.a.createElement(k,{totalItems:n,orientation:"right",controls:L,infinite:o,arrowSize:u})),U&&c&&a.a.createElement(G,{totalItems:n,controls:L,infinite:o}))},F=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);rt.length)&&(e=t.length);for(var n=0,r=new Array(e);n");return e},c=function(e){var t=e.value,n=e.children;return o.a.createElement(a.Provider,{value:t},n)};t.default={DrawerContextProvider:c,useDrawer:i}},,function(e,t){e.exports=ReactDOM},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@0.x/applyModifiers"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.store-icons@0.x/IconClose"]},function(e,t,n){"use strict";n.r(t);var r=n(7),o=n.n(r),a=n(4);t.default=function(e){var t,n=e.children,r=null===(t=null===window||void 0===window?void 0:window.document)||void 0===t?void 0:t.body,i=Object(a.useSSR)();return!r||i?null:o.a.createPortal(n,r)}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),a=n(2),i=n.n(a),c=n(8),s=n.n(c),l=["overlay"],u=function(e,t){var n=e.visible,r=e.onClick,a=e.zIndex,c=void 0===a?999:a,u=i()(l),d=n?"false":"true";return o.a.createElement("div",{ref:t,"aria-hidden":d,role:"presentation",onClick:r,style:{opacity:n?.5:0,pointerEvents:n?"auto":"none",zIndex:c},className:"".concat(s()(u.overlay,n?"visible":"")," bg-base--inverted z-999 fixed top-0 bottom-0 left-0 right-0")})};t.default=o.a.forwardRef(u)},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),a=n(2),i=n.n(a),c=n(9),s=n.n(c),l=n(5),u=["closeIconButton"];t.default=function(e){var t=e.size,n=void 0===t?30:t,r=e.type,a=void 0===r?"line":r,c=e.text,d=Object(l.useDrawer)().close,f=i()(u);return o.a.createElement("button",{className:"".concat(f.closeIconButton," pa4 pointer bg-transparent transparent bn pointer"),onClick:d},null!=c?c:o.a.createElement(s.a,{size:n,type:a}))}},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.pixel-manager@1.x/usePixelEventCallback"]},,,,function(e,t){e.exports=ReactIntl},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.store-icons@0.x/IconMenu"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.responsive-values@0.x/useResponsiveValue"]},,,,,,function(e,t,n){"use strict";n.r(t),function(e){var t=n(1);n.p=Object(t.getPublicPath)("vtex.store-drawer@0.18.1");var r=Object(t.register)((function(){return n(36)}),e,"vtex.store-drawer@0.18.1","vtex.store-drawer@0.x","Drawer");r.renderHotReload,r.setupHMR}.call(this,n(6)(e))},,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(15),o=n(16),a=n(3),i=n(0),c=n.n(i),s=n(17),l=n(18),u=n.n(l),d=n(2),f=n.n(d),v=n(4),p=n(13),b=n.n(p),m=n(19),x=n.n(m),O=n(10),w=n(11),_=function(){var e=Object(i.useState)(!1),t=Object(a.a)(e,2),n=t[0],r=t[1],o=Object(i.useRef)("");return Object(i.useEffect)((function(){return n&&(o.current=document.body.style.overflow),document.body.style.overflow=n?"hidden":o.current,function(){n&&(document.body.style.overflow=o.current)}}),[n]),r},E=n(12),h=n(5);function g(e){return"tagName"in e}function N(e,t){if(!e||!g(e))return!1;if("A"===String(e.tagName).toUpperCase())return!0;var n=e.parentNode;return!(!n||!g(n)||"BODY"===n.tagName.toUpperCase()||t&&n===t)&&N(n,t)}var C=c.a.lazy((function(){return n.e(0).then(n.bind(null,35))})),j={isOpen:!1,hasBeenOpened:!1};function R(e,t){switch(t.type){case"open":return Object.assign(Object.assign({},e),{isOpen:!0,hasBeenOpened:!0});case"close":return Object.assign(Object.assign({},e),{isOpen:!1});default:return e}}var y=["openIconContainer","drawer","opened","closed","moving","drawerContent","childrenContainer","closeIconContainer"];function D(e){var t,n,s,l,d,p,m=e.width,g=e.header,D=e.children,I=e.customIcon,M=e.isFullWidth,P=e.maxWidth,S=void 0===P?450:P,k=e.slideDirection,z=void 0===k?"horizontal":k,B=e.backdropMode,T=void 0===B?"visible":B,W=e.renderingStrategy,U=void 0===W?"lazy":W,F=e.customPixelEventId,H=e.customPixelEventName,J=e.onVisibilityChanged,V=e.zIndex,A=void 0===V?999:V,L=f()(y),Y=x()(T),q=Boolean(Object(v.useChildBlock)({id:"drawer-trigger"})),G=Boolean(Object(v.useChildBlock)({id:"drawer-header"})),K=(t=Object(i.useReducer)(R,j),n=Object(a.a)(t,2),s=n[0],l=n[1],d=_(),p=function(e){l({type:e?"open":"close"}),d(e)},{state:s,openMenu:function(){return p(!0)},closeMenu:function(){return p(!1)}}),Q=K.state,X=K.openMenu,Z=K.closeMenu,$=Q.isOpen,ee=Q.hasBeenOpened,te=Object(i.useState)("eager"===U),ne=Object(a.a)(te,2),re=ne[0],oe=ne[1],ae=Object(i.useState)(!1),ie=Object(a.a)(ae,2),ce=ie[0],se=ie[1];b()({eventId:F,handler:X,eventName:"openDrawer"}),b()({eventId:F,handler:X,eventName:H}),Object(i.useEffect)((function(){void 0!==J&&J($)}),[J,$]);var le="horizontal"===z||"leftToRight"===z?"left":"right",ue="left"===le?"onSwipeLeft":"onSwipeRight",de=Object(i.useMemo)((function(){return{isOpen:$,open:X,close:Z}}),[$,X,Z]),fe="visible"===Y&&$;return Object(i.useEffect)((function(){($||ee||"eager"===U)&&oe(!0)}),[ee,U,oe,$]),c.a.createElement(h.DrawerContextProvider,{value:de},c.a.createElement("div",{onClick:X,role:"presentation","aria-hidden":$?"false":"true",className:"pa4 pointer ".concat(L.openIconContainer)},q?c.a.createElement(v.ExtensionPoint,{id:"drawer-trigger"}):null!=I?I:c.a.createElement(u.a,{size:20})),c.a.createElement(O.default,null,c.a.createElement(w.default,{visible:fe,onClick:Z,zIndex:A}),c.a.createElement(i.Suspense,{fallback:c.a.createElement(c.a.Fragment,null)},c.a.createElement(C,Object(r.a)({},Object(o.a)({},ue,Z),{enabled:$,position:$?"center":le,allowOutsideDrag:!0,onUpdateOffset:function(e){se(!("0%"===e||"-100%"===e))},className:"".concat(L.drawer," ").concat($?L.opened:L.closed," ").concat(ce?L.moving:""," ").concat("right"===le?"right-0":"left-0"," fixed top-0 bottom-0 bg-base z-999 flex flex-column"),style:{width:null!=m?m:M?"100%":"85%",maxWidth:S,minWidth:280,pointerEvents:$?"auto":"none",zIndex:A}}),c.a.createElement("div",{className:"".concat(L.drawerContent," overflow-y-auto"),style:{WebkitOverflowScrolling:"touch"}},G?c.a.createElement(v.ExtensionPoint,{id:"drawer-header"}):null!=g?g:c.a.createElement("div",{className:"flex ".concat(L.closeIconContainer)},c.a.createElement(E.default,null)),c.a.createElement("div",{className:"".concat(L.childrenContainer," flex flex-grow-1"),onClick:function(e){N(e.target,e.currentTarget)&&Z()}},re?D:c.a.createElement(c.a.Fragment,null)))))))}var I=Object(s.defineMessages)({title:{id:"admin/editor.drawer.title"}});D.schema={title:I.title.id};t.default=D}],[[25,"common"]]]);; !function(t){function n(n){for(var r,u,c=n[0],a=n[1],f=n[2],s=0,d=[];st.length)&&(n=t.length);for(var e=0,r=new Array(n);e=0||(o[e]=t[e]);return o}e.d(n,"a",(function(){return r}))},function(t,n,e){"use strict";function r(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n}e.d(n,"a",(function(){return r}))}]);; (window.webpackJsonpvtex_modal_layout_0_14_1=window.webpackJsonpvtex_modal_layout_0_14_1||[]).push([["ModalContext"],{0:function(t,e){t.exports=React},2:function(t,e,n){"use strict";n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return l})),n.d(e,"c",(function(){return O}));var o=n(4),a=n(0),r=n.n(a),c={open:!1,endOfContent:!1},u=Object(a.createContext)(c),i=Object(a.createContext)((function(){}));function s(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"OPEN_MODAL":return Object.assign(Object.assign({},t),{open:!0});case"CLOSE_MODAL":return Object.assign(Object.assign({},t),{open:!1});case"SET_END_OF_CONTENT":return Object.assign(Object.assign({},t),{endOfContent:e.payload.endOfContent});default:return t}}function d(t){var e=t.children,n=t.initialState,d=void 0===n?void 0:n,l=Object(a.useReducer)(s,null!=d?d:c),O=Object(o.a)(l,2),v=O[0],b=O[1];return r.a.createElement(u.Provider,{value:v},r.a.createElement(i.Provider,{value:b},e))}function l(){return Object(a.useContext)(i)}function O(){var t=Object(a.useContext)(u);if(void 0===t)throw Error("useModalState must be used within a ModalStateContext");return t}},34:function(t,e,n){"use strict";n.r(e),function(t){var e=n(1);n.p=Object(e.getPublicPath)("vtex.modal-layout@0.14.1");var o=Object(e.register)((function(){return n(35)}),t,"vtex.modal-layout@0.14.1","vtex.modal-layout@0.x","ModalContext");o.renderHotReload,o.setupHMR}.call(this,n(7)(t))},35:function(t,e,n){"use strict";n.r(e);var o=n(2);e.default={useModalDispatch:o.b,ModalContextProvider:o.a}}},[[34,"common"]]]);; (window.webpackJsonpvtex_modal_layout_0_14_1=window.webpackJsonpvtex_modal_layout_0_14_1||[]).push([["ModalTrigger"],{0:function(e,t){e.exports=React},11:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.pixel-manager@1.x/usePixelEventCallback"]},2:function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return O}));var a=n(4),o=n(0),r=n.n(o),c={open:!1,endOfContent:!1},i=Object(o.createContext)(c),s=Object(o.createContext)((function(){}));function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"OPEN_MODAL":return Object.assign(Object.assign({},e),{open:!0});case"CLOSE_MODAL":return Object.assign(Object.assign({},e),{open:!1});case"SET_END_OF_CONTENT":return Object.assign(Object.assign({},e),{endOfContent:t.payload.endOfContent});default:return e}}function l(e){var t=e.children,n=e.initialState,l=void 0===n?void 0:n,d=Object(o.useReducer)(u,null!=l?l:c),O=Object(a.a)(d,2),f=O[0],v=O[1];return r.a.createElement(i.Provider,{value:f},r.a.createElement(s.Provider,{value:v},t))}function d(){return Object(o.useContext)(s)}function O(){var e=Object(o.useContext)(i);if(void 0===e)throw Error("useModalState must be used within a ModalStateContext");return e}},38:function(e,t,n){"use strict";n.r(t),function(e){var t=n(1);n.p=Object(t.getPublicPath)("vtex.modal-layout@0.14.1");var a=Object(t.register)((function(){return n(39)}),e,"vtex.modal-layout@0.14.1","vtex.modal-layout@0.x","ModalTrigger");a.renderHotReload,a.setupHMR}.call(this,n(7)(e))},39:function(e,t,n){"use strict";n.r(t);var a=n(4),o=n(0),r=n.n(o),c=n(5),i=n.n(c),s=n(11),u=n.n(s),l=n(2),d=["triggerContainer"];function O(e){var t=e.children,n=e.trigger,c=void 0===n?"click":n,s=e.customPixelEventId,O=e.customPixelEventName,f=e.classes,v=Object(l.b)(),_=i()(d,{classes:f}).handles,b=Object(o.useState)(!1),p=Object(a.a)(b,2),g=p[0],E=p[1];u()({eventId:s,eventName:O,handler:function(){v({type:"OPEN_MODAL"})}}),Object(o.useEffect)((function(){if(!g&&v){if("load-session"===c){if("true"===sessionStorage.getItem("hasOpenedModal"))return;sessionStorage.setItem("hasOpenedModal","true")}"load-session"!==c&&"load"!==c||(v({type:"OPEN_MODAL"}),E(!0))}}),[c,v,g]);return"click"===c?r.a.createElement("div",{tabIndex:0,role:"button",onKeyDown:function(e){"Enter"===e.key&&(e.stopPropagation(),v&&v({type:"OPEN_MODAL"}))},onClick:function(e){e.preventDefault(),e.stopPropagation(),v&&v({type:"OPEN_MODAL"})},className:"".concat(_.triggerContainer," bg-transparent pa0 bw0 dib")},t):r.a.createElement(r.a.Fragment,null,t)}t.default=function(e){return r.a.createElement(l.a,null,r.a.createElement(O,e,e.children))}},5:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@1.x/useCssHandles"]}},[[38,"common"]]]);; (window.webpackJsonpvtex_modal_layout_0_14_1=window.webpackJsonpvtex_modal_layout_0_14_1||[]).push([[1],{18:function(t,n,e){"use strict";e.d(n,"b",(function(){return c})),e.d(n,"a",(function(){return d}));var i=e(23),o=e(24),s=(e(19),e(0)),a=e.n(s),r=e(8),u=e.n(r),p=!1,l=a.a.createContext(null),c="entering",d="entered",h=function(t){function n(n,e){var i;i=t.call(this,n,e)||this;var o,s=e&&!e.isMounting?n.enter:n.appear;return i.appearStatus=null,n.in?s?(o="exited",i.appearStatus=c):o=d:o=n.unmountOnExit||n.mountOnEnter?"unmounted":"exited",i.state={status:o},i.nextCallback=null,i}Object(o.a)(n,t),n.getDerivedStateFromProps=function(t,n){return t.in&&"unmounted"===n.status?{status:"exited"}:null};var e=n.prototype;return e.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},e.componentDidUpdate=function(t){var n=null;if(t!==this.props){var e=this.state.status;this.props.in?e!==c&&e!==d&&(n=c):e!==c&&e!==d||(n="exiting")}this.updateStatus(!1,n)},e.componentWillUnmount=function(){this.cancelNextCallback()},e.getTimeouts=function(){var t,n,e,i=this.props.timeout;return t=n=e=i,null!=i&&"number"!=typeof i&&(t=i.exit,n=i.enter,e=void 0!==i.appear?i.appear:n),{exit:t,enter:n,appear:e}},e.updateStatus=function(t,n){void 0===t&&(t=!1),null!==n?(this.cancelNextCallback(),n===c?this.performEnter(t):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},e.performEnter=function(t){var n=this,e=this.props.enter,i=this.context?this.context.isMounting:t,o=this.props.nodeRef?[i]:[u.a.findDOMNode(this),i],s=o[0],a=o[1],r=this.getTimeouts(),l=i?r.appear:r.enter;!t&&!e||p?this.safeSetState({status:d},(function(){n.props.onEntered(s)})):(this.props.onEnter(s,a),this.safeSetState({status:c},(function(){n.props.onEntering(s,a),n.onTransitionEnd(l,(function(){n.safeSetState({status:d},(function(){n.props.onEntered(s,a)}))}))})))},e.performExit=function(){var t=this,n=this.props.exit,e=this.getTimeouts(),i=this.props.nodeRef?void 0:u.a.findDOMNode(this);n&&!p?(this.props.onExit(i),this.safeSetState({status:"exiting"},(function(){t.props.onExiting(i),t.onTransitionEnd(e.exit,(function(){t.safeSetState({status:"exited"},(function(){t.props.onExited(i)}))}))}))):this.safeSetState({status:"exited"},(function(){t.props.onExited(i)}))},e.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},e.safeSetState=function(t,n){n=this.setNextCallback(n),this.setState(t,n)},e.setNextCallback=function(t){var n=this,e=!0;return this.nextCallback=function(i){e&&(e=!1,n.nextCallback=null,t(i))},this.nextCallback.cancel=function(){e=!1},this.nextCallback},e.onTransitionEnd=function(t,n){this.setNextCallback(n);var e=this.props.nodeRef?this.props.nodeRef.current:u.a.findDOMNode(this),i=null==t&&!this.props.addEndListener;if(e&&!i){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[e,this.nextCallback],s=o[0],a=o[1];this.props.addEndListener(s,a)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},e.render=function(){var t=this.state.status;if("unmounted"===t)return null;var n=this.props,e=n.children,o=(n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef,Object(i.a)(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return a.a.createElement(l.Provider,{value:null},"function"==typeof e?e(t,o):a.a.cloneElement(a.a.Children.only(e),o))},n}(a.a.Component);function x(){}h.contextType=l,h.propTypes={},h.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:x,onEntering:x,onEntered:x,onExit:x,onExiting:x,onExited:x},h.UNMOUNTED="unmounted",h.EXITED="exited",h.ENTERING=c,h.ENTERED=d,h.EXITING="exiting";n.c=h}}]);; (window.webpackJsonpvtex_modal_layout_0_14_1=window.webpackJsonpvtex_modal_layout_0_14_1||[]).push([[0],{14:function(e,t,n){"use strict";n.r(t),n.d(t,"CSS_HANDLES",(function(){return D})),n.d(t,"default",(function(){return T}));var o=n(9),r=n(4),a=n(15),i=n(0),c=n.n(i),l=n(3),u=n.n(l),s=function(e){var t=e.children,n=e.open,o=Object(i.useRef)();return Object(i.useEffect)((function(){n&&o.current&&o.current.focus()}),[n]),c.a.createElement(c.a.Fragment,null,c.a.cloneElement(t,{ref:o}))},d=n(20),f=n(21);function p(e){var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:window.document}var m=n(6),v=n.n(m);function h(e){var t,n,o=p(e);return o.body===e?(t=o,null!==(n=p(t).defaultView)&&void 0!==n?n:window).innerWidth>o.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function y(e,t){var n=-1;return e.some((function(e,o){return!!t(e)&&(n=o,!0)})),n}function b(e){var t,n=e.container,o=[];if(h(n)){var r=function(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}();o.push({value:n.style.paddingRight,key:"padding-right",el:n}),n.style.paddingRight="".concat((t=n,(parseInt(window.getComputedStyle(t).paddingRight,10)||0)+r),"px")}var a=n.parentElement,i="HTML"===(null==a?void 0:a.nodeName)&&"scroll"===window.getComputedStyle(a).overflowY?a:n;o.push({value:v.a.hiddenContainer,key:"className",el:i}),i.classList.add(v.a.hiddenContainer);return function(){o.forEach((function(e){var t=e.value,n=e.el,o=e.key;"className"===o?n.classList.remove(v.a.hiddenContainer):t?n.style.setProperty(o,t):n.style.removeProperty(o)}))}}var O=function(){function e(){Object(d.a)(this,e),this.modals=[],this.closeMethods=[],this.containers=[]}return Object(f.a)(e,[{key:"add",value:function(e,t,n){var o=this.modals.indexOf(e);if(-1!==o)return o;o=this.modals.length,this.modals.push(e),this.closeMethods.push(n);var r=y(this.containers,(function(e){return e.container===t}));return-1!==r?(this.containers[r].modals.push(e),o):(this.containers.push({modals:[e],container:t,restore:null}),o)}},{key:"mount",value:function(e){var t=y(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),n=this.containers[t];n.restore||(n.restore=b(n))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1!==t){var n=y(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),o=this.containers[n];return this.modals.splice(t,1),this.closeMethods.splice(t,1),o.modals.splice(o.modals.indexOf(e),1),0===o.modals.length&&(o.restore&&o.restore(),this.containers.splice(n,1)),t}}},{key:"removeTopModal",value:function(){return 0===this.modals.length?-1:this.remove(this.modals[this.modals.length-1])}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}(),x=n(16);function g(e){var t=e.children,n=e.open,o=e.onClick,r=e.transitionDuration,a=e.handles,i=c.a.useRef(null);return c.a.createElement(x.a,{in:n,timeout:r,ref:i},c.a.createElement("div",{className:"".concat(a.backdropContainer," ").concat(v.a.backdropContainer),"data-testid":"modal-backdrop-container"},c.a.createElement("div",{role:"presentation",onClick:function(e){o&&o(e)},className:"".concat(a.backdrop," bg-base--inverted o-50 h-100")},t)))}var k=c.a.memo(g),w=function(){};function E(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.delay,o=void 0===n?0:n,r=t.easing,a=void 0===r?u:r,i=t.duration,c=void 0===i?l:i;return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof c?c:d(c)," ").concat(a," ").concat("string"==typeof o?o:d(o))})).join(",")}var p=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r0&&void 0!==arguments[0]?arguments[0]:r,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"OPEN_MODAL":return Object.assign(Object.assign({},e),{open:!0});case"CLOSE_MODAL":return Object.assign(Object.assign({},e),{open:!1});case"SET_END_OF_CONTENT":return Object.assign(Object.assign({},e),{endOfContent:t.payload.endOfContent});default:return e}}function u(e){var t=e.children,n=e.initialState,u=void 0===n?void 0:n,d=Object(a.useReducer)(s,null!=u?u:r),p=Object(o.a)(d,2),f=p[0],v=p[1];return c.a.createElement(l.Provider,{value:f},c.a.createElement(i.Provider,{value:v},t))}function d(){return Object(a.useContext)(i)}function p(){var e=Object(a.useContext)(l);if(void 0===e)throw Error("useModalState must be used within a ModalStateContext");return e}},25:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.responsive-values@0.x/useResponsiveValues"]},3:function(e,t){e.exports=Classnames},30:function(e,t,n){"use strict";n.r(t),function(e){var t=n(1);n.p=Object(t.getPublicPath)("vtex.modal-layout@0.14.1");var o=Object(t.register)((function(){return n(41)}),e,"vtex.modal-layout@0.14.1","vtex.modal-layout@0.x","Modal");o.renderHotReload,o.setupHMR}.call(this,n(7)(e))},41:function(e,t,n){"use strict";n.r(t);var o=n(15),a=n(0),c=n.n(a),r=n(3),l=n.n(r),i=n(5),s=n.n(i),u=n(25),d=n.n(u),p=n(11),f=n.n(p),v=n(6),b=n.n(v),_=n(14),O=n(16),x=n(2),E=n(10),m=["modal","paper","topRow","container","closeButton"].concat(Object(o.a)(_.CSS_HANDLES));function C(e){var t=e.children,n=e.classes,o=e.scroll,r=void 0===o?"content":o,i=e.customPixelEventId,u=e.customPixelEventName,p=e.disableEscapeKeyDown,v=void 0!==p&&p,C=d()({backdrop:e.backdrop,fullScreen:e.fullScreen}),j=C.fullScreen,N=void 0!==j&&j,S=C.backdrop,h=void 0===S?"clickable":S,y=s()(m,{classes:n}).handles,R=Object(x.c)().open,w=Object(x.b)();f()({eventId:i,eventName:u,handler:function(){w({type:"CLOSE_MODAL"})}});var M,k,g,D,P,L,T=function(){w&&w({type:"CLOSE_MODAL"})};M={fn:function(){w({type:"CLOSE_MODAL"})},skip:!R},k=[R,w],g=M.fn,D=M.skip,P=Object(E.useRuntime)().history,L=Object(a.useCallback)(g,k),Object(a.useEffect)((function(){if(!D)return null==P?void 0:P.listen(L)}),[D,L,P]);var A=function(e){e.target===e.currentTarget&&"clickable"===h&&T()},H=l()(y.container,"outline-0 h-100",{body:"overflow-y-auto overflow-x-hidden tc",content:"flex items-center justify-center"}[r]),I=l()(y.paper,"bg-base relative br2",N?["".concat(b.a.fullScreenModal," w-100 mw-100 br0"),{content:"h-100",body:"min-h-100"}[r]]:[b.a.paperNotFullScreen,"content"===r&&b.a.paperScrollContent],{body:"dib tl v-mid",content:"".concat(b.a.paperScrollContent," flex flex-column")}[r]);return c.a.createElement(_.default,{handles:y,open:R,backdrop:h,onClose:T,onBackdropClick:A,disableEscapeKeyDown:v},c.a.createElement(O.a,{in:R},c.a.createElement("div",{tabIndex:-1,className:H,onClick:A},c.a.createElement("div",{className:I},t))))}var j=c.a.memo(C);t.default=j},5:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@1.x/useCssHandles"]},8:function(e,t){e.exports=ReactDOM}},[[30,"common",1,0]]]);; (window.webpackJsonpvtex_modal_layout_0_14_1=window.webpackJsonpvtex_modal_layout_0_14_1||[]).push([["ModalHeader"],{0:function(e,t){e.exports=React},2:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return v}));var o=n(4),a=n(0),r=n.n(a),l={open:!1,endOfContent:!1},c=Object(a.createContext)(l),s=Object(a.createContext)((function(){}));function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"OPEN_MODAL":return Object.assign(Object.assign({},e),{open:!0});case"CLOSE_MODAL":return Object.assign(Object.assign({},e),{open:!1});case"SET_END_OF_CONTENT":return Object.assign(Object.assign({},e),{endOfContent:t.payload.endOfContent});default:return e}}function u(e){var t=e.children,n=e.initialState,u=void 0===n?void 0:n,d=Object(a.useReducer)(i,null!=u?u:l),v=Object(o.a)(d,2),x=v[0],p=v[1];return r.a.createElement(c.Provider,{value:x},r.a.createElement(s.Provider,{value:p},t))}function d(){return Object(a.useContext)(s)}function v(){var e=Object(a.useContext)(c);if(void 0===e)throw Error("useModalState must be used within a ModalStateContext");return e}},26:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.store-icons@0.x/IconClose"]},27:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.responsive-values@0.x/useResponsiveValue"]},3:function(e,t){e.exports=Classnames},36:function(e,t,n){"use strict";n.r(t),function(e){var t=n(1);n.p=Object(t.getPublicPath)("vtex.modal-layout@0.14.1");var o=Object(t.register)((function(){return n(37)}),e,"vtex.modal-layout@0.14.1","vtex.modal-layout@0.x","ModalHeader");o.renderHotReload,o.setupHMR}.call(this,n(7)(e))},37:function(e,t,n){"use strict";n.r(t);var o=n(0),a=n.n(o),r=n(3),l=n.n(r),c=n(26),s=n.n(c),i=n(5),u=n.n(i),d=n(27),v=n.n(d),x=n(6),p=n.n(x),C=n(2),f=["headerContainer","closeButton","headerContent","closeButtonContainer"];t.default=a.a.memo((function(e){var t=e.children,n=e.iconCloseSize,o=void 0===n?32:n,r=e.showCloseButton,c=void 0===r||r,i=e.classes,d=v()(c),x=u()(f,{classes:i}).handles,_=Object(C.b)(),m=Boolean(t),O=l()(p.a.headerContainer,x.headerContainer,"flex items-start bb b--muted-3 flex-shrink-0 flex-grow-0 z-5",m?"justify-between":"justify-end");return a.a.createElement("div",{className:O},m&&a.a.createElement("div",{className:x.headerContent},t),d&&a.a.createElement("div",{className:x.closeButtonContainer},a.a.createElement("button",{onClick:function(){_&&_({type:"CLOSE_MODAL"})},className:"".concat(x.closeButton," ma0 bg-transparent pointer bw0 pa3")},a.a.createElement(s.a,{size:o,type:"line"}))))}))},5:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@1.x/useCssHandles"]},6:function(e,t,n){e.exports={backdropContainer:"vtex-modal-layout-0-x-backdropContainer",paperScrollContent:"vtex-modal-layout-0-x-paperScrollContent",paperNotFullScreen:"vtex-modal-layout-0-x-paperNotFullScreen",contentScroll:"vtex-modal-layout-0-x-contentScroll",fullScreenModal:"vtex-modal-layout-0-x-fullScreenModal",headerContainer:"vtex-modal-layout-0-x-headerContainer",hiddenContainer:"vtex-modal-layout-0-x-hiddenContainer"}}},[[36,"common"]]]);; (window.webpackJsonpvtex_modal_layout_0_14_1=window.webpackJsonpvtex_modal_layout_0_14_1||[]).push([["ModalContent"],{0:function(e,t){e.exports=React},2:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return f}));var o=n(4),a=n(0),r=n.n(a),c={open:!1,endOfContent:!1},l=Object(a.createContext)(c),u=Object(a.createContext)((function(){}));function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"OPEN_MODAL":return Object.assign(Object.assign({},e),{open:!0});case"CLOSE_MODAL":return Object.assign(Object.assign({},e),{open:!1});case"SET_END_OF_CONTENT":return Object.assign(Object.assign({},e),{endOfContent:t.payload.endOfContent});default:return e}}function s(e){var t=e.children,n=e.initialState,s=void 0===n?void 0:n,d=Object(a.useReducer)(i,null!=s?s:c),f=Object(o.a)(d,2),v=f[0],b=f[1];return r.a.createElement(l.Provider,{value:v},r.a.createElement(u.Provider,{value:b},t))}function d(){return Object(a.useContext)(u)}function f(){var e=Object(a.useContext)(l);if(void 0===e)throw Error("useModalState must be used within a ModalStateContext");return e}},3:function(e,t){e.exports=Classnames},33:function(e,t,n){"use strict";n.r(t),function(e){var t=n(1);n.p=Object(t.getPublicPath)("vtex.modal-layout@0.14.1");var o=Object(t.register)((function(){return n(42)}),e,"vtex.modal-layout@0.14.1","vtex.modal-layout@0.x","ModalContent");o.renderHotReload,o.setupHMR}.call(this,n(7)(e))},42:function(e,t,n){"use strict";n.r(t);var o=n(0),a=n.n(o),r=n(3),c=n.n(r),l=n(5),u=n.n(l),i=n(6),s=n.n(i),d=n(2);var f=["contentContainer"];t.default=function(e){var t=e.children,n=e.classes,r=Object(o.useRef)(null),l=Object(o.useRef)(null),i=u()(f,{classes:n}).handles,v=Object(d.b)();return function(e){var t=e.callback,n=e.intersectionRef,a=e.sentinelRef,r=Object(o.useCallback)((function(e){e[0]&&t(e[0].isIntersecting)}),[t]);Object(o.useEffect)((function(){return IntersectionObserver&&(n.current=new IntersectionObserver(r),a.current&&n.current.observe(a.current)),function(){n.current&&n.current.disconnect()}}),[r])}({sentinelRef:l,intersectionRef:r,callback:Object(o.useCallback)((function(e){v({type:"SET_END_OF_CONTENT",payload:{endOfContent:e}})}),[v])}),a.a.createElement("div",{className:c()(i.contentContainer,s.a.contentScroll,"overflow-y-auto pa5 relative")},t,a.a.createElement("div",{className:"absolute bottom-0 right-0",style:{height:1,width:1},ref:l}))}},5:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@1.x/useCssHandles"]},6:function(e,t,n){e.exports={backdropContainer:"vtex-modal-layout-0-x-backdropContainer",paperScrollContent:"vtex-modal-layout-0-x-paperScrollContent",paperNotFullScreen:"vtex-modal-layout-0-x-paperNotFullScreen",contentScroll:"vtex-modal-layout-0-x-contentScroll",fullScreenModal:"vtex-modal-layout-0-x-fullScreenModal",headerContainer:"vtex-modal-layout-0-x-headerContainer",hiddenContainer:"vtex-modal-layout-0-x-hiddenContainer"}}},[[33,"common"]]]);; (window.webpackJsonpvtex_modal_layout_0_14_1=window.webpackJsonpvtex_modal_layout_0_14_1||[]).push([["ModalActions"],{0:function(t,e){t.exports=React},2:function(t,e,n){"use strict";n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return l})),n.d(e,"c",(function(){return O}));var a=n(4),o=n(0),r=n.n(o),c={open:!1,endOfContent:!1},s=Object(o.createContext)(c),i=Object(o.createContext)((function(){}));function u(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"OPEN_MODAL":return Object.assign(Object.assign({},t),{open:!0});case"CLOSE_MODAL":return Object.assign(Object.assign({},t),{open:!1});case"SET_END_OF_CONTENT":return Object.assign(Object.assign({},t),{endOfContent:e.payload.endOfContent});default:return t}}function d(t){var e=t.children,n=t.initialState,d=void 0===n?void 0:n,l=Object(o.useReducer)(u,null!=d?d:c),O=Object(a.a)(l,2),f=O[0],v=O[1];return r.a.createElement(s.Provider,{value:f},r.a.createElement(i.Provider,{value:v},e))}function l(){return Object(o.useContext)(i)}function O(){var t=Object(o.useContext)(s);if(void 0===t)throw Error("useModalState must be used within a ModalStateContext");return t}},3:function(t,e){t.exports=Classnames},31:function(t,e,n){"use strict";n.r(e),function(t){var e=n(1);n.p=Object(e.getPublicPath)("vtex.modal-layout@0.14.1");var a=Object(e.register)((function(){return n(32)}),t,"vtex.modal-layout@0.14.1","vtex.modal-layout@0.x","ModalActions");a.renderHotReload,a.setupHMR}.call(this,n(7)(t))},32:function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return l}));var a=n(0),o=n.n(a),r=n(5),c=n.n(r),s=n(3),i=n.n(s),u=n(2),d=["actionsContainer","actionsContentWrapper","actionsContainerEndOfContent"];function l(t){var e=t.children,n=t.classes,a=c()(d,{classes:n}).handles,r=Object(u.c)().endOfContent,s=i()(a.actionsContainer,r&&a.actionsContainerEndOfContent);return o.a.createElement("div",{className:s},o.a.createElement("div",{className:a.actionsContentWrapper},e))}},5:function(t,e){t.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@1.x/useCssHandles"]}},[[31,"common"]]]);;