enqueueScripts([function(){ !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}}}]); },function(){ (window.webpackJsonpvtex_shipping_option_components_1_6_0=window.webpackJsonpvtex_shipping_option_components_1_6_0||[]).push([[1],{19:function(e,t,n){"use strict";n.d(t,"a",(function(){return z})),n.d(t,"c",(function(){return B})),n.d(t,"b",(function(){return _}));var r=n(0),i=n.n(r),a=n(66),o=n(67),c=n(72),p=n(71),s=n(58);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,r=Object(s.a)(e);if(t){var i=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.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(a.a)(this,n),(e=t.apply(this,arguments)).state={hasError:!1},e}return Object(o.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}(r.Component),d=n(9),b=n.n(d),f=n(15),v=n(5),h=n(35),O=n(4),g=n(39),k=n(32),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(r.useState)(),t=Object(v.a)(e,2),n=t[0],i=t[1],a=Object(r.useState)(!0),o=Object(v.a)(a,2),c=o[0],p=o[1],s=Object(r.useState)(),u=Object(v.a)(s,2),l=u[0],d=u[1],k=Object(r.useState)(),x=Object(v.a)(k,2),P=x[0],C=x[1],D=Object(r.useState)(),z=Object(v.a)(D,2),B=z[0],_=z[1],M=Object(r.useState)([]),E=Object(v.a)(M,2),w=E[0],T=E[1],L=Object(r.useState)(),A=Object(v.a)(L,2),N=A[0],R=A[1],U=Object(r.useState)(),F=Object(v.a)(U,2),H=F[0],V=F[1],G=Object(r.useState)(),J=Object(v.a)(G,2),K=J[0],X=J[1],Y=Object(r.useState)(),Z=Object(v.a)(Y,2),q=Z[0],Q=Z[1],W=Object(r.useState)([]),$=Object(v.a)(W,2),ee=$[0],te=$[1],ne=Object(r.useState)(),re=Object(v.a)(ne,2),ie=re[0],ae=re[1],oe=Object(r.useState)(),ce=Object(v.a)(oe,2),pe=ce[0],se=ce[1],ue=Object(r.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){ae(e.data.addToCartInfo)}});var ge=Object(r.useCallback)(function(){var e=Object(f.a)(b.a.mark((function e(t,n,r,i){var a,o,c,s,u,l=arguments;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=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!==(o=null==c?void 0:c.items)&&void 0!==o?o:[]),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,r,u,i);case 14:a||p(!1);case 15:case"end":return e.stop()}}),e)})));return function(t,n,r,i){return e.apply(this,arguments)}}(),[fe]);Object(r.useEffect)((function(){if(!ve){var e=Object(S.b)("zip-code"),t=Object(S.a)(),n=Object(S.b)("shipping");if(i(e),Q(n),d(t),e)try{Object(m.getAddress)(t,e,fe).then((function(r){_(r.city),V(r.geoCoordinates),ge(t,e,r.geoCoordinates,n)}))}catch(e){p(!1)}else p(!1)}}),[fe,ve,ge]);var ke=function(e,t){C({code:e,message:t}),p(!1),setTimeout((function(){C(void 0)}),3e3)},je=function(){var e=Object(f.a)(b.a.mark((function e(t){var n,r,i,a,o,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 r=e.sent,i=r.map((function(e){return e.id})),e.next=9,t(i);case 9:return a=e.sent,o=a.unavailableProducts,c=r.map((function(e,t){return{cartItemIndex:t,product:e}})).filter((function(e){return o.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,r,a,o,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(r=e.sent,a=r.geoCoordinates,o=r.city,0!==a.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,a);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 _(o),V(a),i(t),e.next=32,Object(m.updateSession)(l,t,a);case 32:return e.next=34,ge(l,t,a,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 r,i=arguments;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=!(i.length>1&&void 0!==i[1])||i[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,r?"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(r.useEffect)((function(){X(B?"".concat(B,", ").concat(n):n)}),[n,B]);var Pe=function(){var e=Object(f.a)(b.a.mark((function e(t){var r,i,a,o,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 r=t.args,i=r.zipcode,a=r.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)(i,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(i,a),e.abrupt("break",47);case 10:return se(he.formatMessage(I.default.unavailableItemsModalDescription,{addressLabel:K})),be((function(){return function(){return Ie(i,a)}})),e.abrupt("break",47);case 13:return o=t.args,c=o.pickup,p=o.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),!ie){e.next=24;break}return e.next=23,Oe(ie.skuItems,ie.options);case 23:ae(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(),!ie){e.next=38;break}return e.next=37,Oe(ie.skuItems,ie.options);case 37:ae(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)}}(),Ce=ee.length>0;return{dispatch:Pe,state:{zipcode:n,isLoading:c,countryCode:l,submitErrorMessage:P,city:B,pickups:w,selectedPickup:N,geoCoordinates:H,addressLabel:K,shippingOption:q,areThereUnavailableCartItems:Ce,unavailableCartItems:ee,unavailabilityMessage:pe}}}(),a=n.dispatch,o=n.state;return i.a.createElement(C.Provider,{value:o},i.a.createElement(D.Provider,{value:a},t))},P={pickups:[],isLoading:!0,areThereUnavailableCartItems:!1,unavailableCartItems:[]},C=Object(r.createContext)(P),D=Object(r.createContext)((function(e){})),z=function(e){var t=e.children;return i.a.createElement(l,{fallback:t},i.a.createElement(x,null,t))},B=function(){return Object(r.useContext)(C)},_=function(){return Object(r.useContext)(D)}},2:function(e,t,n){"use strict";n.r(t);var r=n(4),i=Object(r.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"}});t.default=i}}]); },function(){ (window.webpackJsonpvtex_shipping_option_components_1_6_0=window.webpackJsonpvtex_shipping_option_components_1_6_0||[]).push([["ShippingOptionContext"],{0:function(t,n){t.exports=React},32:function(t,n){t.exports=__RENDER_8_COMPONENTS__["vtex.pixel-manager@1.x/usePixelEventCallback"]},35:function(t,n){t.exports=__RENDER_8_RUNTIME__},38:function(t,n){t.exports=regeneratorRuntime},39:function(t,n){t.exports=__RENDER_8_COMPONENTS__["vtex.order-items@0.x/OrderItems"]},4:function(t,n){t.exports=ReactIntl},88:function(t,n,e){"use strict";e.r(n),function(t){var n=e(13);e.p=Object(n.getPublicPath)("vtex.shipping-option-components@1.6.0");var o=Object(n.register)((function(){return e(89)}),t,"vtex.shipping-option-components@1.6.0","vtex.shipping-option-components@1.x","ShippingOptionContext");o.renderHotReload,o.setupHMR}.call(this,e(31)(t))},89:function(t,n,e){"use strict";e.r(n);var o=e(19);n.default={ShippingOptionProvider:o.a,useShippingOptionDispatch:o.b,useShippingOptionState:o.c}}},[[88,"common",0,1]]]); },function(){ !function(t){function e(e){for(var r,u,c=e[0],a=e[1],f=e[2],s=0,d=[];st.length)&&(e=t.length);for(var n=0,r=new Array(e);nn&&(n=(t=t.trim()).charCodeAt(0)),n){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*r&&0c.charCodeAt(8))break;case 115:a=a.replace(c,"-webkit-"+c)+";"+a;break;case 207:case 102:a=a.replace(c,"-webkit-"+(102s.charCodeAt(0)&&(s=s.trim()),s=[s],0h)&&(M=(X=X.replace(" ",":")).length),01)for(var r=1;r1?t-1:0),n=1;n0?" Args: "+r.join(", "):""))}var E=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,r=0;r=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,o=n;e>=o;)(o<<=1)<0&&C(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(r),this.length=o;for(var i=n;i=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),o=n+r,i=n;i=O&&(O=t+1),P.set(e,t),x.set(t,e)},R="style["+w+'][data-styled-version="5.3.5"]',j=new RegExp("^"+w+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),N=function(e,t,r){for(var n,o=r.split(","),i=0,a=o.length;i=0;r--){var n=t[r];if(n&&1===n.nodeType&&n.hasAttribute(w))return n}}(r),i=void 0!==o?o.nextSibling:null;n.setAttribute(w,"active"),n.setAttribute("data-styled-version","5.3.5");var a=$();return a&&n.setAttribute("nonce",a),r.insertBefore(n,i),n},z=function(){function e(e){var t=this.element=V(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,r=0,n=t.length;r=0){var r=document.createTextNode(t),n=this.nodes[e];return this.element.insertBefore(r,n||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e0&&(l+=e+",")})),n+=""+s+c+'{content:"'+l+'"}/*!sc*/\n'}}}return n}(this)},e}(),G=/(a)(d)/gi,H=function(e){return String.fromCharCode(e+(e>25?39:97))};function Y(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=H(t%52)+r;return(H(t%52)+r).replace(G,"$1-$2")}var U=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},W=function(e){return U(5381,e)};function q(e){for(var t=0;t>>0);if(!t.hasNameForId(n,a)){var s=r(i,"."+a,void 0,n);t.insertRules(n,a,s)}o.push(a),this.staticRulesId=a}else{for(var c=this.rules.length,l=U(this.baseHash,r.hash),u="",f=0;f>>0);if(!t.hasNameForId(n,m)){var g=r(u,"."+m,void 0,n);t.insertRules(n,m,g)}o.push(m)}}return o.join(" ")},e}(),K=/^\s*\/\/.*$/gm,Q=[":","[",".","#"];function ee(e){var t,r,n,o,i=void 0===e?y:e,a=i.options,s=void 0===a?y:a,l=i.plugins,u=void 0===l?g:l,f=new c.a(s),d=[],h=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(r,n,o,i,a,s,c,l,u,f){switch(r){case 1:if(0===u&&64===n.charCodeAt(0))return e(n+";"),"";break;case 2:if(0===l)return n+"/*|*/";break;case 3:switch(l){case 102:case 112:return e(o[0]+n),"";default:return n+(0===f?"/*|*/":"")}case-2:n.split("/*|*/}").forEach(t)}}}((function(e){d.push(e)})),p=function(e,n,i){return 0===n&&-1!==Q.indexOf(i[r.length])||i.match(o)?e:"."+t};function m(e,i,a,s){void 0===s&&(s="&");var c=e.replace(K,""),l=i&&a?a+" "+i+" { "+c+" }":c;return t=s,r=i,n=new RegExp("\\"+r+"\\b","g"),o=new RegExp("(\\"+r+"\\b){2,}"),f(a||!i?"":i,l)}return f.use([].concat(u,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(r)>0&&(o[0]=o[0].replace(n,p))},h,function(e){if(-2===e){var t=d;return d=[],t}}])),m.hash=u.length?u.reduce((function(e,t){return t.name||C(15),U(e,t.name)}),5381).toString():"",m}var te=i.a.createContext(),re=(te.Consumer,i.a.createContext()),ne=(re.Consumer,new B),oe=ee();function ie(){return Object(o.useContext)(te)||ne}function ae(){return Object(o.useContext)(re)||oe}function se(e){var t=Object(o.useState)(e.stylisPlugins),r=t[0],n=t[1],a=ie(),c=Object(o.useMemo)((function(){var t=a;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),l=Object(o.useMemo)((function(){return ee({options:{prefix:!e.disableVendorPrefixes},plugins:r})}),[e.disableVendorPrefixes,r]);return Object(o.useEffect)((function(){s()(r,e.stylisPlugins)||n(e.stylisPlugins)}),[e.stylisPlugins]),i.a.createElement(te.Provider,{value:c},i.a.createElement(re.Provider,{value:l},e.children))}var ce=function(){function e(e,t){var r=this;this.inject=function(e,t){void 0===t&&(t=oe);var n=r.name+t.hash;e.hasNameForId(r.id,n)||e.insertRules(r.id,n,t(r.rules,n,"@keyframes"))},this.toString=function(){return C(12,String(r.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=oe),this.name+e.hash},e}(),le=/([A-Z])/,ue=/([A-Z])/g,fe=/^ms-/,de=function(e){return"-"+e.toLowerCase()};function he(e){return le.test(e)?e.replace(ue,de).replace(fe,"-ms-"):e}var pe=function(e){return null==e||!1===e||""===e};function me(e,t,r,n){if(Array.isArray(e)){for(var o,i=[],a=0,s=e.length;a1?t-1:0),n=1;n?@[\\\]^`{|}~-]+/g,Se=/(^-|-$)/g;function we(e){return e.replace(ve,"-").replace(Se,"")}var ke=function(e){return Y(W(e)>>>0)};function Ae(e){return"string"==typeof e&&!0}var Ce=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Ee=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function Pe(e,t,r){var n=e[r];Ce(t)&&Ce(n)?xe(n,t):e[r]=t}function xe(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=0||(o[r]=e[r]);return o}(t,["componentId"]),i=n&&n+"-"+(Ae(e)?e:we(v(e)));return Ie(e,h({},o,{attrs:k,componentId:i}),r)},Object.defineProperty(C,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=n?xe({},e.defaultProps,t):t}}),C.toString=function(){return"."+C.styledComponentId},a&&d()(C,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),C}var Te=function(e){return function e(t,r,o){if(void 0===o&&(o=y),!Object(n.isValidElementType)(r))return C(1,String(r));var i=function(){return t(r,o,ye.apply(void 0,arguments))};return i.withConfig=function(n){return e(t,r,h({},o,{},n))},i.attrs=function(n){return e(t,r,h({},o,{attrs:Array.prototype.concat(o.attrs,n).filter(Boolean)}))},i}(Ie,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){Te[e]=Te(e)}));!function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=q(e),B.registerId(this.componentId+1)}var t=e.prototype;t.createStyles=function(e,t,r,n){var o=n(me(this.rules,t,r,n).join(""),""),i=this.componentId+e;r.insertRules(i,i,o)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,r,n){e>2&&B.registerId(this.componentId+e),this.removeStyles(e,r),this.createStyles(e,t,r,n)}}();!function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var r=$();return""},this.getStyleTags=function(){return e.sealed?C(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return C(2);var r=((t={})[w]="",t["data-styled-version"]="5.3.5",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),n=$();return n&&(r.nonce=n),[i.a.createElement("style",h({},r,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new B({isServer:!0}),this.sealed=!1}var t=e.prototype;t.collectStyles=function(e){return this.sealed?C(2):i.a.createElement(se,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return C(3)}}();t.a=Te}).call(this,r(194))},68:function(e,t,r){"use strict";e.exports=r(195)},82:function(e,t,r){"use strict";var n=r(68),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return n.isMemo(e)?a:s[e.$$typeof]||o}s[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[n.Memo]=a;var l=Object.defineProperty,u=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,r,n){if("string"!=typeof r){if(p){var o=h(r);o&&o!==p&&e(t,o,n)}var a=u(r);f&&(a=a.concat(f(r)));for(var s=c(t),m=c(r),g=0;g0;){var c=l;l=new Set,c.forEach((function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach((function(e){l.add(e)})))}))}return o.forEach((function(n){var a=i(e,n);a&&t.definitions.push(a)})),t}(t,"subscribeNewsletter")},18:function(e,n){e.exports=ReactIntl},191:function(e,n,t){"use strict";t.r(n),function(e){var n=t(1);t.p=Object(n.getPublicPath)("electrobello.electro-theme@1.0.108");var a=Object(n.register)((function(){return t(212)}),e,"electrobello.electro-theme@1.0.108","electrobello.electro-theme@1.x","Subscribe");a.renderHotReload,a.setupHMR}.call(this,t(6)(e))},192:function(e,n){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/Checkbox"]},193:function(e,n,t){},212:function(e,n,t){"use strict";t.r(n);var a=t(39),i=t(40),r=t(11),o=t(42),l=t(43),c=t(29),s=t(4),u=t(0),d=t.n(u),m=t(3),p=t(32),f=t(18),b=t(49),h=t.n(b),g=t(33),x=t.n(g),v=t(50),w=t.n(v),E=t(135),O=t.n(E),k=(t(192),t(193),t(25)),y=t(26);function j(){var e=Object(k.a)(["\n background: #FFFFFF;\n border: 1px solid #E0E0E0;\n box-sizing: border-box;\n border-radius: 18px;\n font-weight: bold;\n font-size: 14px;\n line-height: 16px;\n text-align: center;\n color: #23231E;\n flex: none;\n order: 0;\n flex-grow: 0;\n padding: 12px 15px;\n max-width: 143px;\n cursor: pointer;\n transition: all 0.3s ease;\n\n &:hover {\n background: #F8F8F8;\n box-shadow: 4px 4px 8px rgb(0 0 0 / 15%), inset 2px 2px 8px rgb(0 0 0 / 5%);\n border-radius: 18px;\n color: #00A3E0;\n }\n\n @media screen and (max-width: 50rem) {\n width: 100%;\n max-width: initial;\n\n}\n"]);return j=function(){return e},e}function S(){var e=Object(k.a)(["\n background: linear-gradient(\n 180deg, #FFED00 0%, #FFD523 100%);\n border-radius: 18px;\n border: none;\n font-weight: bold;\n font-size: 14px;\n line-height: 16px;\n text-align: center;\n color: #23231E;\n padding: 12px 15px;\n max-width: 143px;\n cursor: pointer;\n transition: all 0.3s ease;\n\n &:hover {\n color: #FFED00;\n background: #23231E;\n }\n\n &:disabled {\n opacity: 0.5;\n pointer-events: none;\n }\n\n @media screen and (max-width: 50rem) {\n width: 100%;\n max-width: initial;\n}\n\n"]);return S=function(){return e},e}function N(){var e=Object(k.a)(["\n display: flex;\n justify-content: center;\n margin-top: 10px;\n gap: 20px;\n\n @media screen and (max-width: 50rem) {\n flex-direction: column;\n}\n\n"]);return N=function(){return e},e}function _(){var e=Object(k.a)(["\n background: #FFFFFF;\n border: 1px solid #BDBDBD;\n box-sizing: border-box;\n border-radius: 18px;\n width: 100%;\n padding: 8px 8px 8px 18px;\n margin-bottom: 10px;\n"]);return _=function(){return e},e}function F(){var e=Object(k.a)(["\n font-weight: normal;\n font-size: 12px;\n line-height: 16px;\n display: flex;\n align-items: center;\n color: #23231E;\n"]);return F=function(){return e},e}function D(){var e=Object(k.a)(["\n display: flex;\n align-items: center;\n text-align: left;\n gap: 10px;\n font-weight: normal;\n font-size: 12px;\n line-height: 16px;\n display: flex;\n align-items: center;\n color: #23231E;\n cursor: pointer;\n"]);return D=function(){return e},e}function R(){var e=Object(k.a)(["\nbackground: #FFFFFF;\nborder: 1px solid #BDBDBD;\nbox-sizing: border-box;\nborder-radius: 18px;\n"]);return R=function(){return e},e}function C(){var e=Object(k.a)(["\nfont-style: normal;\nfont-weight: bold;\nfont-size: 14px;\nline-height: 16px;\ndisplay: flex;\nmargin-bottom: 10px; \n"]);return C=function(){return e},e}function z(){var e=Object(k.a)(["\nbackground: #23231e;\ncolor: white;\ndisplay: inline-block;\npadding: 5px;\nmargin: 0;\n"]);return z=function(){return e},e}function P(){var e=Object(k.a)(["\nfont-style: normal;\nfont-weight: normal;\nfont-size: 16px;\nline-height: 18px;\ncolor: #23231E;\nmargin-bottom: 22px;\n"]);return P=function(){return e},e}function A(){var e=Object(k.a)(["\n font-style: normal;\nfont-weight: bold;\nfont-size: 25px;\nline-height: 25px;\ncolor: #00A3E0;\nmargin-bottom: 10px;\npadding-top: 20px;\n\n@media screen and (max-width: 50rem) {\n padding-top: 0;\n margin-top: 0;\n}\n"]);return A=function(){return e},e}function M(){var e=Object(k.a)(["\n display: block;\n padding: 1rem 1.5rem;\n @media screen and (max-width: 50rem) {\n padding: 2rem;\n}\n"]);return M=function(){return e},e}function T(){var e=Object(k.a)(["\n display: flex;\n width: 100%;\n"]);return T=function(){return e},e}function L(){var e=Object(k.a)(["\n display: grid;\n grid-template-columns: 45% 55%;\n\n @media screen and (max-width: 50rem) {\n display: block;\n }\n\n"]);return L=function(){return e},e}var I=y.a.div(L()),B=y.a.div(T()),V=y.a.div(M()),q=y.a.h3(A()),G=(y.a.p(P()),y.a.p(z()),y.a.label(C())),H=(y.a.input(R()),y.a.label(D())),$=y.a.input(F()),J=y.a.input(_()),W=y.a.div(N()),Q=y.a.button(S()),U=(y.a.input(j()),t(139)),K=t.n(U);function X(e){var n=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 t,a=Object(c.a)(e);if(n){var i=Object(c.a)(this).constructor;t=Reflect.construct(a,arguments,i)}else t=a.apply(this,arguments);return Object(l.a)(this,t)}}var Y=/^[A-z0-9+_-]+(?:\.[A-z0-9+_-]+)*@(?:[A-z0-9](?:[A-z0-9-]*[A-z0-9])?\.)+[A-z0-9](?:[A-z0-9-]*[A-z0-9])?$/,Z=function(e){Object(o.a)(t,e);var n=X(t);function t(){var e;Object(a.a)(this,t);for(var i=arguments.length,o=new Array(i),l=0;l720?a:t})),d.a.createElement(V,null,d.a.createElement("div",null,d.a.createElement("div",{className:"handles.newsletter".concat(" ",this.state.success?"handles.confirmation":""," w-100")},d.a.createElement("div",{className:""},this.state.success?d.a.createElement(d.a.Fragment,null,d.a.createElement(q,null,"¡Gracias por registrarte! #bellolovers!")):d.a.createElement(d.a.Fragment,null,d.a.createElement(q,null,"¡Regístrate!"),d.a.createElement("form",{className:""},d.a.createElement(G,{className:"",htmlFor:"newsletter-input"},"Email:"),d.a.createElement(J,{ref:this.inputRef,id:"newsletter-input",errorMessage:this.state.invalidEmail?i:null,placeholder:"correo@correo.com",name:"newsletter",value:this.state.email,onChange:this.handleChangeEmail,className:"br10"}),d.a.createElement(H,null,d.a.createElement($,{onChange:this.handleChangeCheckbox,type:"checkbox",checked:this.state.acceptPolicies}),"Acepto políticas de tratamientos de datos y Términos y condiciones."),d.a.createElement(W,{className:""},d.a.createElement(Q,{variation:"primary",type:"submit",onClick:this.handleSubmit,isLoading:this.state.loading,disabled:!this.state.acceptPolicies},"Suscribirme")),this.state.error&&d.a.createElement("div",{className:"handles.error".concat(" c-danger t-body pt5")},r)))))))))}}]),t}(u.Component),ee=Object(p.compose)(Object(m.graphql)(K.a,{name:"subscribeNewsletter"}),h()(["newsletter","confirmation","container","confirmationTitle","confirmationText","form","inputGroup","buttonContainer","label","error"]),f.injectIntl,w.a.withPixel)(Z);Z.defaultProps={hideLabel:!1,showTerms:!1},ee.schema={title:"Administrador News Letter",description:"Cambio de imagenes news letter",type:"object",properties:{imgDesktop:{title:"Imagen news letter desktop",description:"Tamaño de la imagen: 329px 400px",type:"string",widget:{"ui:widget":"image-uploader"}},imgMobile:{title:"Imagen news letter mobile",description:"Tamaño de la imagen: 320px 216px",type:"string",widget:{"ui:widget":"image-uploader"}},textFinishPromo:{title:"Texto Finalización Promoción",description:"Aquí va el texto de finalización de la promoción cuando el cliente se registra",type:"string"}}};var ne=ee;n.default=ne},3:function(e,n){e.exports=ReactApollo},32:function(e,n){e.exports=R},33:function(e,n){e.exports=__RENDER_8_COMPONENTS__["vtex.native-types@0.x/formatIOMessage"]},49:function(e,n){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@0.x/withCssHandles"]},50:function(e,n){e.exports=__RENDER_8_COMPONENTS__["vtex.pixel-manager@1.x/PixelContext"]}},[[191,"common",3]]]); },function(){ (window.webpackJsonpelectrobello_electro_theme_1_0_108=window.webpackJsonpelectrobello_electro_theme_1_0_108||[]).push([[0],{144:function(e,t,r){"use strict";var n,o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&(console.log("paso esta queri si"),!(!(null==o?void 0:o.login)||"show"!==(null==o?void 0:o.login))&&(console.log("ultima validacion de query"),!0))};return m?(console.log("openLoginQuery",m),l.a.createElement(u.a,{idModal:"".concat(r.a.modalLoginContent),closeButton:!0,opemModal:m,maxWidth:"400",actionClose:b},l.a.createElement(s.a,{blockClass:"ModalLogin",optionsTitle:"Ingresa a tu cuenta",hasIdentifierExtension:!0}))):""};t.default=d},27:function(e,t){e.exports=ReactDOM},31:function(e,t,o){"use strict";var n=o(2),c=o(0),l=o.n(c),a=o(38),r=o.n(a),i=o(14),_=o.n(i);t.a=function(e){var t=e.children,o=e.idModal,a=e.closeButton,i=e.opemModal,s=e.maxWidth,u=e.actionClose,d=Object(c.useState)(!0),m=Object(n.a)(d,2),b=(m[0],m[1]),f=r()().Portal;return l.a.createElement(f,null,l.a.createElement("div",{id:"".concat(o,"--ModalN"),className:"".concat(_.a.ModalN__container," ").concat(o),style:{display:i?"flex":"none"}},l.a.createElement("div",{className:"".concat(_.a.ModalN__container__cont),style:{maxWidth:s?"".concat(s,"px"):""}},l.a.createElement("button",{className:"".concat(_.a.ModalN__container__closeButton),type:"button",style:{display:a?"block":"none"},onClick:function(e){e.preventDefault(),b(!1),u&&u(!1)}}),l.a.createElement("div",{className:"".concat(_.a.ModalN__container__box__content)},t))))}},5:function(e,t){e.exports=__RENDER_8_RUNTIME__}},[[163,"common",0]]]); },function(){ (window.webpackJsonpelectrobello_electro_theme_1_0_108=window.webpackJsonpelectrobello_electro_theme_1_0_108||[]).push([["BtnWhatsapp"],{0:function(e,t){e.exports=React},146:function(e,t,n){"use strict";n.r(t),function(e){var t=n(1);n.p=Object(t.getPublicPath)("electrobello.electro-theme@1.0.108");var o=Object(t.register)((function(){return n(214)}),e,"electrobello.electro-theme@1.0.108","electrobello.electro-theme@1.x","BtnWhatsapp");o.renderHotReload,o.setupHMR}.call(this,n(6)(e))},20:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@0.x/useCssHandles"]},214:function(e,t,n){"use strict";n.r(t);var o=n(0),r=n.n(o),a=n(20),l=n.n(a),i=["container-wp"],c=function(e){var t=e.logo,n=e.phone,o=e.message,a=e.width,c=e.height,s=o.replace(/ /g,"%20"),p=l()(i);return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:"".concat(p["container-wp"])},r.a.createElement("a",{href:"https://api.whatsapp.com/send?phone=".concat(n,"&text=").concat(s),target:"_blank",rel:"noreferrer noopener"},r.a.createElement("img",{src:t,width:a,height:c,alt:"Logo de WhatsApp"}))))};c.defaultProps={logo:"/arquivos/wp-icon.png",phone:"573127352091",message:"Hola, me gustaría recibir información.",width:64,height:64},c.schema={title:"WhatsApp Button",type:"object",properties:{logo:{title:"Icono",type:"string",widget:{"ui:widget":"image-uploader"}},phone:{title:"Teléfono",description:"Agrega el número de teléfono",type:"string"},message:{title:"Mensaje",description:"Agrega el mensaje que se verá en Whatsapp",type:"string",widget:{"ui:widget":"textarea"}},width:{title:"Ancho del botón",description:"Ingrese el ancho que tendrá el botón",type:"number"},height:{title:"Alto del botón",description:"Ingrese la altura que tendrá el botón",type:"number"}}};var s=c;t.default=s}},[[146,"common"]]]); },function(){ (window.webpackJsonpelectrobello_electro_theme_1_0_108=window.webpackJsonpelectrobello_electro_theme_1_0_108||[]).push([["CustomContainer"],{0:function(e,t){e.exports=React},151:function(e,t,o){"use strict";o.r(t),function(e){var t=o(1);o.p=Object(t.getPublicPath)("electrobello.electro-theme@1.0.108");var c=Object(t.register)((function(){return o(218)}),e,"electrobello.electro-theme@1.0.108","electrobello.electro-theme@1.x","CustomContainer");c.renderHotReload,c.setupHMR}.call(this,o(6)(e))},20:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@0.x/useCssHandles"]},218:function(e,t,o){"use strict";o.r(t);var c=o(0),n=o.n(c),r=o(20),a=o.n(r),i=["CustomContainer"],l=function(e){var t=e.active,o=void 0===t||t,c=e.type,r=void 0===c?"div":c,l=e.classes,s=e.id,u=e.children,d=a()(i);return n.a.createElement(n.a.Fragment,null,o&&"section"===r&&n.a.createElement("section",{className:"".concat(d.CustomContainer," ").concat(l||""),id:s||""},u),o&&"div"===r&&n.a.createElement("div",{className:"".concat(d.CustomContainer," ").concat(l||""),id:s||""},u))};l.schema={title:"Contenedor de sección",type:"object",properties:{active:{title:"Activar o desactivar sección",type:"boolean"}}};var s=l;t.default=s}},[[151,"common"]]]); },function(){ (window.webpackJsonpelectrobello_electro_theme_1_0_108=window.webpackJsonpelectrobello_electro_theme_1_0_108||[]).push([["DataVitrine"],{0:function(e,n){e.exports=React},108:function(e,n){e.exports=__RENDER_8_COMPONENTS__["vtex.product-summary-context@0.x/ProductSummaryContext"]},109:function(e,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ProductBySKU"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ID"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[{kind:"Directive",name:{kind:"Name",value:"context"},arguments:[{kind:"Argument",name:{kind:"Name",value:"sender"},value:{kind:"StringValue",value:"electrobello.electro-theme@1.0.108",block:!1}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"product"},arguments:[{kind:"Argument",name:{kind:"Name",value:"identifier"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"EnumValue",value:"sku"}},{kind:"ObjectField",name:{kind:"Name",value:"value"},value:{kind:"Variable",name:{kind:"Name",value:"ID"}}}]}}],directives:[{kind:"Directive",name:{kind:"Name",value:"runtimeMeta"},arguments:[{kind:"Argument",name:{kind:"Name",value:"hash"},value:{kind:"StringValue",value:"53f448325f41ece62296f11298bc96184b6fb4f2deb959d39661bd82722194f3",block:!1}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"itemId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sellers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"commertialOffer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"AvailableQuantity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:431}};i.loc.source={body:'query ProductBySKU($ID: ID!) @context(sender: "electrobello.electro-theme@1.0.108") {\n product(identifier: {field: sku, value: $ID}) @runtimeMeta(hash: "53f448325f41ece62296f11298bc96184b6fb4f2deb959d39661bd82722194f3") {\n items {\n itemId\n name\n sellers {\n commertialOffer {\n AvailableQuantity\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var t={};function a(e,n){for(var i=0;i0;){var r=o;o=new Set,r.forEach((function(e){d.has(e)||(d.add(e),(t[e]||new Set).forEach((function(e){o.add(e)})))}))}return d.forEach((function(n){var t=a(e,n);t&&i.definitions.push(t)})),i}(i,"ProductBySKU")},152:function(e,n,i){"use strict";i.r(n),function(e){var n=i(1);i.p=Object(n.getPublicPath)("electrobello.electro-theme@1.0.108");var t=Object(n.register)((function(){return i(219)}),e,"electrobello.electro-theme@1.0.108","electrobello.electro-theme@1.x","DataVitrine");t.renderHotReload,t.setupHMR}.call(this,i(6)(e))},20:function(e,n){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@0.x/useCssHandles"]},219:function(e,n,i){"use strict";i.r(n);var t=i(0),a=i.n(t),l=i(108),d=i.n(l),o=i(3),r=i(20),u=i.n(r),c=i(109),s=i.n(c),m=["ultimasUnidades"],v=function(){var e,n,i,t,l,r,c,v=d.a.useProductSummary().product,f=null==v||null===(e=v.sku)||void 0===e?void 0:e.itemId,k=u()(m),b=Object(o.useQuery)(s.a,{skip:!f,variables:{ID:f}}).data,p=null==b||null===(n=b.product)||void 0===n||null===(i=n.items)||void 0===i||null===(t=i[0])||void 0===t||null===(l=t.sellers)||void 0===l||null===(r=l[0])||void 0===r||null===(c=r.commertialOffer)||void 0===c?void 0:c.AvailableQuantity;return console.log("skuId,qtySku"),console.log("skuId: ".concat(f," - qtySku: ").concat(p)),p<5?a.a.createElement("span",{className:"".concat(k.ultimasUnidades)},"Últimas unidades"):null};n.default=v},3:function(e,n){e.exports=ReactApollo}},[[152,"common"]]]); },function(){ !function(t){function e(e){for(var r,u,c=e[0],a=e[1],f=e[2],s=0,p=[];s3&&void 0!==arguments[3]?arguments[3]:"/",i="";if(n&&n>0){var o=new Date;o.setTime((new Date).getTime()+n),i="expires=".concat(o.toUTCString(),";")}document.cookie="".concat(e,"=").concat(encodeURIComponent(t),";").concat(i,"path=").concat(r)}var f=function(){function e(t){Object(a.a)(this,e),this.client=t,this.historyKey="biggy-search-history"}var t,n,r;return Object(s.a)(e,[{key:"topSearches",value:(r=Object(o.a)(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.query({query:d.a}));case 1:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"suggestionSearches",value:(n=Object(o.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.query({query:p.a,variables:{fullText:t}}));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"suggestionProducts",value:(t=Object(o.a)(i.a.mark((function e(t,n,r){var o,a,s,c,l,p,m,d=arguments;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=d.length>3&&void 0!==d[3]&&d[3],a=d.length>4&&void 0!==d[4]?d[4]:"default",s=d.length>5&&void 0!==d[5]&&d[5],c=d.length>6?d[6]:void 0,l=d.length>7?d[7]:void 0,p=d.length>8?d[8]:void 0,m=d.length>9?d[9]:void 0,e.abrupt("return",this.client.query({query:u.a,variables:{simulationBehavior:a,advertisementOptions:m,hideUnavailableItems:s,orderBy:c,fullText:t,facetKey:n,facetValue:r,productOriginVtex:o,count:l,shippingOptions:p,variant:h("sp-variant")},fetchPolicy:"network-only"}));case 8:case"end":return e.stop()}}),e,this)}))),function(e,n,r){return t.apply(this,arguments)})},{key:"searchHistory",value:function(){return(h(this.historyKey)||"").split(",").filter((function(e){return!!e}))}},{key:"prependSearchHistory",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if(null!=e&&""!==e.trim()){var n=this.searchHistory();n.indexOf(e)<0&&(n.unshift(e),n=n.slice(0,t)),v(this.historyKey,n.join(","))}}}]),e}()},,,function(e,t){e.exports=regeneratorRuntime},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/IconClose"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/IconClock"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-list-context@0.x/ProductListContext"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.device-detector@0.x/withDevice"]},function(e,t){function n(e,t,n){var r,i,o,a,s;function c(){var u=Date.now()-a;u=0?r=setTimeout(c,t-u):(r=null,n||(s=e.apply(o,i),o=i=null))}null==t&&(t=100);var u=function(){o=this,i=arguments,a=Date.now();var u=n&&!r;return r||(r=setTimeout(c,t)),u&&(s=e.apply(o,i),o=i=null),s};return u.clear=function(){r&&(clearTimeout(r),r=null)},u.flush=function(){r&&(s=e.apply(o,i),o=i=null,clearTimeout(r),r=null)},u}n.debounce=n,e.exports=n},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.pixel-manager@1.x/PixelContext"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/Spinner"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-summary@2.x/ProductSummaryCustom"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-price@1.x/SellingPrice"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-price@1.x/ListPrice"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-context@0.x/ProductContextProvider"]},,,,,function(e,t,n){"use strict";n.r(t),function(e){var t=n(4);n.p=Object(t.getPublicPath)("vtex.search@2.18.3");var r=Object(t.register)((function(){return n(46)}),e,"vtex.search@2.18.3","vtex.search@2.x","Autocomplete");r.renderHotReload,r.setupHMR}.call(this,n(16)(e))},,,,,,function(e,t,n){"use strict";n.r(t);var r=n(1),i=n.n(r),o=n(5),a=n(9),s=n(10),c=n(23),u=n(22),l=n(13),p=n(0),m=n.n(p),d=n(7),h=n(3),v=n(25),f=n.n(v),g=n(26),x=n.n(g),y=n(27),E=n.n(y),_=n(28),b=n.n(_),k=n(29),S=n.n(k),L=n(30),O=n(21),P=n(14),N=n.n(P),T=n(2),w=n(31),C=n.n(w),I=n(32),M=n.n(I),R=n(11),H=n.n(R),j=n(33),D=n.n(j),F=n(34),V=n.n(F),q=n(35),A=n.n(q),W=n(12),U=n.n(W),B=function(e){var t,n,r,i,o=e.product,a=e.onClick,s=null==o?void 0:o.sku,c=null===(r=null===(n=null===(t=null==s?void 0:s.sellers)||void 0===t?void 0:t[0])||void 0===n?void 0:n.commertialOffer)||void 0===r?void 0:r.taxPercentage;return m.a.createElement("div",null,m.a.createElement(T.Link,{params:{slug:null==o?void 0:o.linkText,id:null==o?void 0:o.productId},page:"store.product",className:"no-underline",onClick:a},m.a.createElement("article",{className:"".concat(U.a.element," flex flex-row justify-start items-center pa3 bg-animate hover-bg-light-gray")},m.a.createElement("div",{className:"".concat(U.a.imageContainer," h3")},m.a.createElement("img",{className:"".concat(U.a.image," h-100 w-auto mw-none"),src:null===(i=null==s?void 0:s.image)||void 0===i?void 0:i.imageUrl})),m.a.createElement("div",{className:"".concat(U.a.information," flex flex-column justify-between items-start ml4")},m.a.createElement("div",{className:U.a.productNameContainer},m.a.createElement("span",{className:"".concat(U.a.productBrand," f5 c-on-base")},o.productName)),m.a.createElement("div",{className:U.a.priceContainer},m.a.createElement(A.a,{product:o,query:{skuId:null==s?void 0:s.itemId}},m.a.createElement("span",{className:"db f7 c-muted-2"},m.a.createElement(V.a,{message:c?"{listPriceWithTax}":"{listPriceValue}"})),m.a.createElement("span",{className:"dib t-small c-muted-2"},m.a.createElement(D.a,{message:c?"{sellingPriceWithTax}":"{sellingPriceValue}"}))))))))},z=function(e){var t=e.term,n=e.title,r=e.products,i=e.showTitle,o=e.totalProducts,a=e.layout,s=e.isLoading,c=e.onProductClick,u=e.onSeeAllClick,l=e.HorizontalProductSummary,p=e.customPage;return 0!==r.length||s?m.a.createElement("section",{className:H.a.tileList},i?m.a.createElement("p",{className:"".concat(H.a.tileListTitle," c-on-base")},n):null,s?m.a.createElement("div",{className:H.a.tileListSpinner},m.a.createElement(C.a,null)):m.a.createElement(m.a.Fragment,null,m.a.createElement("ul",{className:H.a.tileListList,style:{flexDirection:a===re.Horizontal?"column":"row"}},r.map((function(e,n){var r=M.a.mapCatalogProductToProductSummary(e);return m.a.createElement("li",{key:e.productId,className:H.a.tileListItem},a===re.Horizontal?l?m.a.createElement(l,{product:r,placement:"autocomplete",actionOnClick:function(){c(r.productId,n,t)}}):m.a.createElement(B,{product:r,onClick:function(){c(r.productId,n,t)}}):m.a.createElement(T.ExtensionPoint,{id:"product-summary",product:r,placement:"autocomplete",actionOnClick:function(){c(r.productId,n,t)}}))}))),m.a.createElement("footer",{className:H.a.tileListFooter},o>0?m.a.createElement(T.Link,{query:"map=ft&_q=".concat(t),params:{term:t},page:p||"store.search",className:H.a.tileListSeeMore,onClick:function(){return u(t)}},m.a.createElement(h.FormattedMessage,{id:"store/seeMore",values:{count:o}})):null))):null};var Q=n(6),K=n.n(Q),J=function(e){var t;return(null===(t=e.item)||void 0===t?void 0:t.attributes)?m.a.createElement("ul",{className:K.a.itemListSubList},e.item.attributes.map((function(t,n){return m.a.createElement("li",{key:n,className:"".concat(K.a.itemListSubItem," c-on-base pointer"),onMouseOver:function(n){return e.onMouseOver(n,t)},onFocus:function(n){return e.onMouseOver(n,t)},onMouseOut:function(){return e.onMouseOut()},onBlur:function(){return e.onMouseOut()}},m.a.createElement(T.Link,{className:"".concat(K.a.itemListSubItemLink," c-on-base"),to:"/".concat(e.item.value,"/").concat(t.value),query:"map=ft,".concat(t.key),onClick:function(){e.closeModal(),e.onItemClick(t.label,n)}},t.label))}))):null};function $(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,r=Object(l.a)(e);if(t){var i=Object(l.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(u.a)(this,n)}}var G=function(e){Object(c.a)(n,e);var t=$(n);function n(){var e;return Object(a.a)(this,n),(e=t.apply(this,arguments)).state={currentTimeoutId:null},e.handleMouseOver=function(t,n){if(t.stopPropagation(),!e.state.currentTimeoutId){var r=setTimeout((function(){e.props.onItemHover&&e.props.onItemHover(n),e.setState({currentTimeoutId:null})}),100);e.setState({currentTimeoutId:r})}},e.handleMouseOut=function(){var t=e.state.currentTimeoutId;t&&(clearTimeout(t),e.setState({currentTimeoutId:null}))},e}return Object(s.a)(n,[{key:"render",value:function(){var e=this;if(0===this.props.items.length&&!this.props.showTitleOnEmpty)return null;var t=this.props.modifier?K.a["itemList--".concat(this.props.modifier)]:"";return p.createElement("article",{className:"".concat(K.a.itemList," ").concat(t)},this.props.showTitle?p.createElement("p",{className:"".concat(K.a.itemListTitle," c-on-base")},this.props.title):null,this.props.items.length>0&&p.createElement("ol",{className:K.a.itemListList},this.props.items.map((function(t,n){var r;return p.createElement("li",{key:t.value,className:"".concat(K.a.itemListItem),onMouseOver:function(n){return e.handleMouseOver(n,t)},onFocus:function(n){return e.handleMouseOver(n,t)},onMouseOut:function(){return e.handleMouseOut()},onBlur:function(){return e.handleMouseOut()}},p.createElement(T.Link,{page:null!==(r=e.props.customPage)&&void 0!==r?r:"store.search",params:{term:t.value},query:"map=ft&_q=".concat(t.value),onClick:function(){return e.props.onItemClick(t.value,n)},className:K.a.itemListLink},t.icon?p.createElement("span",{className:K.a.itemListIcon},t.icon):null,t.prefix?p.createElement("span",{className:K.a.itemListPrefix},t.prefix):null,p.createElement("span",{className:"".concat(K.a.itemListLinkTitle," c-on-base")},t.label)),p.createElement(J,{item:t,onMouseOver:e.handleMouseOver,onMouseOut:e.handleMouseOut,closeModal:e.props.closeModal,onItemClick:e.props.onItemClick}))}))))}}]),n}(p.Component),X=n(36);var Z;function Y(e,t,n){return function(r,i){e({page:t,event:"autocomplete",eventType:n,search:{term:r,position:i}})}}function ee(e,t,n,r,i){try{e({event:"autocomplete",eventType:Z.Search,search:{operator:t,misspelled:n,text:decodeURI(i),match:r}})}catch(o){e({event:"autocomplete",eventType:Z.Search,search:{operator:t,misspelled:n,text:i,match:r}})}}!function(e){e.ProductClick="product_click",e.SearchSuggestionClick="search_suggestion_click",e.TopSearchClick="top_search_click",e.HistoryClick="history_click",e.Search="search",e.SeeAllClick="see_all_click"}(Z||(Z={}));var te=function(){var e=Object(o.a)(i.a.mark((function e(t){var n,r,o,a,s,c,u;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(a=new Headers).append("Content-Type","application/json"),s={method:"GET",headers:a,redirect:"follow"},e.next=5,fetch("".concat(t||"","/api/sessions?items=public.shippingOption"),s);case 5:return c=e.sent,e.next=8,c.json();case 8:if(u=e.sent,null===(o=null===(r=null===(n=null==u?void 0:u.namespaces)||void 0===n?void 0:n.public)||void 0===r?void 0:r.shippingOption)||void 0===o?void 0:o.value){e.next=11;break}return e.abrupt("return",null);case 11:return e.abrupt("return",JSON.parse(u.namespaces.public.shippingOption.value));case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function ne(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,r=Object(l.a)(e);if(t){var i=Object(l.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(u.a)(this,n)}}var re;!function(e){e.Horizontal="HORIZONTAL",e.Vertical="VERTICAL"}(re||(re={}));var ie,oe=E.a.ProductListProvider,ae=function(e){Object(c.a)(l,e);var t,n,r,u=ne(l);function l(e){var t;return Object(a.a)(this,l),(t=u.call(this,e)).state={topSearchedItems:[],history:[],products:[],suggestionItems:[],totalProducts:0,queryFromHover:{},dynamicTerm:"",isProductsLoading:!1,currentHeightWhenOpen:0},t.handleItemHover=function(e){"groupValue"in e?(t.setState({dynamicTerm:e.groupValue,queryFromHover:{key:e.key,value:e.value}}),t.updateProducts(e.groupValue)):(t.setState({dynamicTerm:e.value,queryFromHover:{key:void 0,value:void 0}}),t.updateProducts(e.value))},t.getProductLayout=function(){var e=t.props,n=e.productLayout,r=e.isMobile;return void 0!==n?n:r?re.Horizontal:re.Vertical},t.client=new O.a(t.props.client),t.autocompleteRef=m.a.createRef(),t.isIOS=navigator&&!!navigator.userAgent.match(/(iPod|iPhone|iPad)/),t}return Object(s.a)(l,[{key:"fitAutocompleteInWindow",value:function(){if(window&&this.autocompleteRef.current&&this.props.isMobile&&!this.isIOS){var e=window.innerHeight,t=this.autocompleteRef.current.getBoundingClientRect().y,n=this.autocompleteRef.current.offsetHeight,r=n-(t+n-e);this.autocompleteRef.current.style.maxHeight="".concat(r,"px")}}},{key:"addEvents",value:function(){window.addEventListener("resize",S()(this.fitAutocompleteInWindow.bind(this),100))}},{key:"componentDidMount",value:function(){this.updateTopSearches(),this.updateHistory(),this.addEvents()}},{key:"shouldUpdate",value:function(e){return e.inputValue!==this.props.inputValue||!e.isOpen&&this.props.isOpen}},{key:"addTermToHistory",value:function(){var e=window.location.href.split("_q=");if(e[1]){var t=e[1].split("&")[0];try{return this.client.prependSearchHistory(decodeURI(t))}catch(e){return this.client.prependSearchHistory(t)}}}},{key:"closeModal",value:function(){this.props.closeMenu&&this.props.closeMenu()}},{key:"componentDidUpdate",value:function(e){var t=this;if(this.shouldUpdate(e)){this.addTermToHistory(),this.fitAutocompleteInWindow();var n=this.props.inputValue;this.setState({dynamicTerm:n,queryFromHover:void 0}),null===n||""===n?(this.updateTopSearches(),this.updateHistory(),this.setState({suggestionItems:[],products:[]})):this.updateSuggestions().then((function(){return t.fitAutocompleteInWindow(),t.updateProducts(n)})).then((function(){return t.fitAutocompleteInWindow()}))}}},{key:"highlightTerm",value:function(e,t){var n=e.split(t);return m.a.createElement(m.a.Fragment,null,n.map((function(e,r){return m.a.createElement(m.a.Fragment,null,e,r!==n.length-1?m.a.createElement("span",{className:"b"},t):null)})))}},{key:"updateSuggestions",value:(r=Object(o.a)(i.a.mark((function e(){var t,n,r,o,a,s,c=this;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client.suggestionSearches(this.props.inputValue);case 2:t=e.sent,n=t.data.autocompleteSearchSuggestions.searches,r=this.props.maxSuggestedTerms,o=void 0===r?5:r,a=n.slice(0,o).map((function(e){var t=e.attributes||[];return{term:e.term,attributes:t.map((function(t){return{label:t.labelValue,value:t.value,link:"/".concat(e.term,"/").concat(t.value,"/?map=ft,").concat(t.key),groupValue:e.term,key:t.key}}))}})),s=a.map((function(e){return{label:c.highlightTerm(e.term.toLowerCase(),c.props.inputValue.toLocaleLowerCase()),value:e.term,groupValue:e.term,link:"/".concat(e.term,"?map=ft"),attributes:e.attributes}})),this.setState({suggestionItems:s});case 8:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"updateProducts",value:(n=Object(o.a)(i.a.mark((function e(t){var n,r,o,a,s,c,u,l,p,m,d,h,v,f,g,x,y,E,_,b,k,S;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t,o=this.props,a=o.__unstableProductOrigin,s=o.__unstableProductOriginVtex,c=void 0!==s&&s,u=o.simulationBehavior,l=void 0===u?"default":u,p=o.hideUnavailableItems,m=void 0!==p&&p,d=o.orderBy,h=this.state.queryFromHover,r){e.next=6;break}return this.setState({products:[],totalProducts:0}),e.abrupt("return");case 6:return a&&console.warn("The prop `__unstableProductOrigin` has been deprecated. Use the boolean prop `__unstableProductOriginVtex` instead."),this.setState({isProductsLoading:!0}),e.next=10,te(this.props.runtime.rootPath);case 10:return v=e.sent,f=null!==(n=null==v?void 0:v.map((function(e){return e.value})))&&void 0!==n?n:[],g={showSponsored:!0,sponsoredCount:2,repeatSponsoredProducts:!1,advertisementPlacement:"autocomplete"},e.next=15,this.client.suggestionProducts(r,h?h.key:void 0,h?h.value:void 0,"VTEX"===a||c,l,m,d,this.props.maxSuggestedProducts||3,f,g);case 15:x=e.sent,h||(y=x.data.productSuggestions,E=y.count,_=y.operator,b=y.misspelled,ee(this.props.push,_,b,E,r)),this.setState({isProductsLoading:!1}),k=x.data.productSuggestions,S=k.products.slice(0,this.getProductCount()),this.setState({products:S,totalProducts:k.count});case 21:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"updateTopSearches",value:(t=Object(o.a)(i.a.mark((function e(){var t,n,r,o,a;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client.topSearches();case 2:t=e.sent,n=t.data.topSearches.searches,r=this.props.maxTopSearches,o=void 0===r?10:r,a=n.slice(0,o).map((function(e,t){return{prefix:m.a.createElement(m.a.Fragment,null,"".concat(t+1),m.a.createElement(h.FormattedMessage,{id:"store/ordinalNumber"})),value:e.term,label:e.term,link:"/".concat(e.term,"?map=ft")}})),this.setState({topSearchedItems:a});case 7:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"updateHistory",value:function(){var e=this.client.searchHistory().slice(0,this.props.maxHistory||5).map((function(e){return{label:(t=e,t.replace(/\$2F/gi,"/")),value:e,link:"/".concat(e,"?map=ft"),icon:m.a.createElement(x.a,null)};var t}));this.setState({history:e})}},{key:"renderSuggestions",value:function(){var e=this,t=!!this.state.suggestionItems&&this.state.suggestionItems.length>0,n=t?m.a.createElement(h.FormattedMessage,{id:"store/suggestions"}):m.a.createElement(h.FormattedMessage,{id:"store/emptySuggestion"});return m.a.createElement(G,{title:n,items:this.state.suggestionItems||[],modifier:"suggestion",showTitle:!t||!this.props.hideTitles,onItemHover:this.handleItemHover,showTitleOnEmpty:0!==this.props.maxSuggestedTerms,onItemClick:function(t,n){Y(e.props.push,e.props.runtime.page,Z.SearchSuggestionClick)(t,n),e.closeModal()},customPage:this.props.customPage,closeModal:function(){return e.closeModal()}})}},{key:"contentWhenQueryIsEmpty",value:function(){var e=this;return m.a.createElement("div",{className:N.a["history-and-top-wrapper"],style:{flexDirection:this.props.historyFirst?"row-reverse":"row"}},!this.props.isMobile||this.props.isMobile&&!this.props.historyFirst||0===this.state.history.length?m.a.createElement(G,{modifier:"top-search",title:m.a.createElement(h.FormattedMessage,{id:"store/topSearches"}),items:this.state.topSearchedItems||[],showTitle:!this.props.hideTitles,onItemClick:function(t,n){Y(e.props.push,e.props.runtime.page,Z.TopSearchClick)(t,n),e.closeModal()},customPage:this.props.customPage,closeModal:function(){return e.closeModal()}}):null,!this.props.isMobile||this.props.isMobile&&this.props.historyFirst?m.a.createElement(G,{modifier:"history",title:m.a.createElement(h.FormattedMessage,{id:"store/history"}),items:this.state.history||[],showTitle:!this.props.hideTitles,onItemClick:function(t,n){Y(e.props.push,e.props.runtime.page,Z.HistoryClick)(t,n),e.closeModal()},customPage:this.props.customPage,closeModal:function(){return e.closeModal()}}):null)}},{key:"contentWhenQueryIsNotEmpty",value:function(){var e=this,t=this.state,n=t.products,r=t.totalProducts,i=t.isProductsLoading,o=this.props,a=o.hideTitles,s=o.push,c=o.runtime,u=o.inputValue,l=u.replace(/\//gi,"$2F");return m.a.createElement(m.a.Fragment,null,this.renderSuggestions(),m.a.createElement(z,{term:l||"",customPage:this.props.customPage,shelfProductCount:this.getProductCount(),title:m.a.createElement(h.FormattedMessage,{id:"store/suggestedProducts",values:{term:u}}),products:n||[],showTitle:!a,totalProducts:r||0,layout:this.getProductLayout(),isLoading:i,onProductClick:function(t,n,r){!function(e,t){return function(n,r,i){return e({page:t,event:"autocomplete",eventType:Z.ProductClick,product:{productId:n,position:r},term:i})}}(s,c.page)(t,n,r),e.closeModal()},onSeeAllClick:function(t){!function(e,t){return function(n){return e({page:t,event:"autocomplete",eventType:Z.SeeAllClick,search:{term:n}})}}(s,c.page)(t),e.closeModal()},HorizontalProductSummary:this.props.HorizontalProductSummary}))}},{key:"renderContent",value:function(){var e=this.props.inputValue.trim();return e&&""!==e?this.contentWhenQueryIsNotEmpty():this.contentWhenQueryIsEmpty()}},{key:"hasContent",value:function(){var e=this.state,t=e.topSearchedItems,n=e.suggestionItems,r=e.history,i=e.products;return t.length>0||n.length>0||r.length>0||i.length>0}},{key:"getProductCount",value:function(){var e=this.props,t=e.customBreakpoints,n=e.isMobile,r=e.maxSuggestedProducts,i=void 0===r?3:r;if(!window||n||!t)return i;var o=window.innerWidth;return t.md&&t.lg&&t.xlg?o>=t.xlg.width?t.xlg.maxSuggestedProducts:o>=t.lg.width?t.lg.maxSuggestedProducts:o>=t.md.width?t.md.maxSuggestedProducts:i:i}},{key:"render",value:function(){var e=this,t=this.props.isOpen&&this.hasContent()?"":N.a["biggy-js-container--hidden"];return m.a.createElement("div",{className:N.a["biggy-autocomplete-wrapper"],style:{width:this.props.autocompleteWidth?"".concat(this.props.autocompleteWidth,"vw"):void 0}},m.a.createElement("section",{ref:this.autocompleteRef,className:"".concat(N.a["biggy-autocomplete"]," ").concat(t," w-100"),style:{flexDirection:this.getProductLayout()===re.Horizontal?"column":"row"}},m.a.createElement(oe,{listName:"autocomplete-result-list"},this.renderContent(),this.props.isMobile?m.a.createElement("button",{onClick:function(){return e.closeModal()},className:N.a["close-btn"]},m.a.createElement(f.a,null)):null)))}}]),l}(m.a.Component),se=Object(L.withPixel)(b()(Object(d.withApollo)((ie=ae,function(e){return m.a.createElement(ie,Object(X.a)({},e,{runtime:Object(T.useRuntime)()}))}))));t.default=se}],[[40,"common"]]]); },function(){ !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)}}}]); },function(){ (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]]]); }], document.currentScript.dataset.index)