(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[122],{CHaO:function(t,e,n){"use strict";n.r(e);var i=n("nKUr"),o=n("q1tI"),c=n.n(o),a=n("doQp"),r=n.n(a),l=n("mI/f"),s=n("GgB/"),u=n("R/WZ"),d=n("yP8F"),g=Object(u.a)((function(t){return{container:{color:"#fff",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",position:"fixed",bottom:"50px",right:"22px",border:"none",outline:"none",background:"none",zIndex:999,flexDirection:"column","@media (max-width: 767px)":{right:5}},iconWrapper:{display:"flex",padding:"0",marginTop:10,alignItems:"center"},icon:{cursor:"pointer",color:d.b}}}));e.default=function(t){var e=t.isProductPage,n=g(e),a=Object(o.useState)(!1),u=a[0],d=a[1],h=Object(o.useState)(!1),p=h[0],v=h[1],f=Object(o.useState)({x:0,y:0}),w=f[0],b=f[1],m=Object(o.useState)(null),x=m[0],j=m[1],O=Object(o.useState)(!1),y=O[0],N=O[1],_=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;try{var i="function"==typeof s.a?Object(s.a)():"";if(!i)return t;var o="".concat(Object(l.getHost)()).concat(t),c=e&&n?"".concat(e,"x").concat(n):"0x0";return"".concat(i,"/unsafe/").concat(c,"/filters:format(webp):quality(100)/").concat(o)}catch(e){return t}};return Object(o.useEffect)((function(){var t=function(){N(window.innerWidth<=767)};return t(),window.addEventListener("resize",t),function(){return window.removeEventListener("resize",t)}}),[]),c.a.useEffect((function(){var t=setTimeout((function(){d(!0)}),6e3);return function(){return clearTimeout(t)}}),[]),Object(i.jsx)(i.Fragment,{children:u?Object(i.jsx)(r.a,{axis:"both",bounds:{top:-500,bottom:0,left:-150,right:0},onStart:function(t){var e,n,i,o,c,a;v(!1),b({x:t.clientX||(null!==(e=null===(n=t.touches)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.clientX)&&void 0!==e?e:0),y:t.clientY||(null!==(o=null===(c=t.touches)||void 0===c||null===(a=c[0])||void 0===a?void 0:a.clientY)&&void 0!==o?o:0)});var r=t.target.closest(".icon-wa, .icon-livechat");r&&j(r.classList.contains("icon-wa")?"wa":"livechat")},onDrag:function(t){Math.sqrt(Math.pow(t.x-w.x,2)+Math.pow(t.y-w.y,2))>5&&v(!0)},onStop:function(){var t;!p&&x&&("wa"===x?window.open("https://wa.me/6287800021010","_blank"):"livechat"===x&&(null===(t=window.YellowMessengerPlugin)||void 0===t?void 0:t.toggleChat)&&window.YellowMessengerPlugin.toggleChat()),j(null),v(!1)},children:Object(i.jsx)("div",{className:n.container,style:y?{bottom:e?134:74}:{},children:Object(i.jsxs)("div",{className:n.iconWrapper,children:[Object(i.jsx)("div",{className:"".concat(n.iconContainer," icon-livechat"),children:Object(i.jsx)("img",{src:_("/assets/img/icon_live_chat.png",512,512),alt:"Live Chat",className:"draggable-image hidden-mobile icon-livechat",loading:"lazy",style:{width:"95px",height:"95px"}})}),Object(i.jsx)("div",{className:"".concat(n.iconContainer," icon-wa"),children:Object(i.jsx)("img",{src:_("/assets/img/icon_wa.png",512,512),alt:"WhatsApp",className:"draggable-image icon-wa",loading:"lazy",style:{width:"65px",height:"65px"}})})]})})}):null})}}}]);