(window.zowieJsonp=window.zowieJsonp||[]).push([[8],{17:function(e,t,n){"use strict";var a=n(12),o=n.n(a),i=n(30),r=n.n(i),s=n(34),c=n.n(s),l=n(35),d=n.n(l),p=n(36),u=n.n(p),h=n(37),m=n.n(h),f=n(38),g=n.n(f),b=n(39),V=n.n(b),v=n(40),C=n.n(v),w=function(e){return e.active?o.a.createElement("svg",{width:"60",height:"60",viewBox:"0 0 60 60",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{"max-width":"none",height:"100%",width:"100%"}},o.a.createElement("rect",{width:"60",height:"60",rx:"8",fill:"white"}),o.a.createElement("g",{filter:"url(#filter0_d)"},o.a.createElement("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M30 45C38.2843 45 45 38.2843 45 30C45 21.7157 38.2843 15 30 15C21.7157 15 15 21.7157 15 30C15 32.6662 15.6955 35.1698 16.9151 37.3395L15 45L22.6605 43.0849C24.8302 44.3045 27.3338 45 30 45ZM28.75 30C28.75 31.3808 27.6308 32.5 26.25 32.5C24.8692 32.5 23.75 31.3808 23.75 30C23.75 28.6192 24.8692 27.5 26.25 27.5C27.6308 27.5 28.75 28.6192 28.75 30ZM33.75 32.5C35.1308 32.5 36.25 31.3808 36.25 30C36.25 28.6192 35.1308 27.5 33.75 27.5C32.3692 27.5 31.25 28.6192 31.25 30C31.25 31.3808 32.3692 32.5 33.75 32.5Z",fill:e.color})),o.a.createElement("defs",null,o.a.createElement("filter",{id:"filter0_d",x:"9",y:"11",width:"42",height:"42",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB"},o.a.createElement("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),o.a.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),o.a.createElement("feOffset",{dy:"2"}),o.a.createElement("feGaussianBlur",{stdDeviation:"3"}),o.a.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"}),o.a.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),o.a.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))):o.a.createElement("svg",{width:"60",height:"60",viewBox:"0 0 60 60",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{"max-width":"none",height:"100%",width:"100%"}},o.a.createElement("rect",{width:"60",height:"60",rx:"8",fill:e.color}),o.a.createElement("g",{filter:"url(#filter0_d)"},o.a.createElement("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M30 45C38.2843 45 45 38.2843 45 30C45 21.7157 38.2843 15 30 15C21.7157 15 15 21.7157 15 30C15 32.6662 15.6955 35.1698 16.9151 37.3395L15 45L22.6605 43.0849C24.8302 44.3045 27.3338 45 30 45ZM28.75 30C28.75 31.3808 27.6308 32.5 26.25 32.5C24.8692 32.5 23.75 31.3808 23.75 30C23.75 28.6192 24.8692 27.5 26.25 27.5C27.6308 27.5 28.75 28.6192 28.75 30ZM33.75 32.5C35.1308 32.5 36.25 31.3808 36.25 30C36.25 28.6192 35.1308 27.5 33.75 27.5C32.3692 27.5 31.25 28.6192 31.25 30C31.25 31.3808 32.3692 32.5 33.75 32.5Z",fill:"white"})),o.a.createElement("defs",null,o.a.createElement("filter",{id:"filter0_d",x:"9",y:"11",width:"42",height:"42",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB"},o.a.createElement("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),o.a.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),o.a.createElement("feOffset",{dy:"2"}),o.a.createElement("feGaussianBlur",{stdDeviation:"3"}),o.a.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"}),o.a.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),o.a.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"}))))},A=function(e){return e.visible?e.value<1?null:o.a.createElement("div",{id:"zowieBadgeStyled",style:{bottom:e.isMobile?"38px":"45px"}},e.value>9?9:e.value):null},x=function(e){return o.a.createElement("svg",{width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:function(t){t.stopPropagation(),e.onClick()}},o.a.createElement("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.63385 10.6366L14.7195 16.7223L16.6904 14.7515L10.6047 8.66582L16.6903 2.5802L14.7195 0.609397L8.63385 6.69502L2.54822 0.609378L0.577409 2.58018L6.66305 8.66582L0.577339 14.7515L2.54814 16.7223L8.63385 10.6366Z",fill:"white"}))},k=function(e){return o.a.createElement("svg",{height:"100px",width:"100px",fill:"#333333",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",version:"1.1",x:"0px",y:"0px",id:"zowieHideIcon",style:{opacity:e.visible?1:0},onClick:function(t){t.stopPropagation(),e.onClick()}},o.a.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},o.a.createElement("path",{d:"M13.4142136,12 L17.6568542,16.2426407 C18.0473785,16.633165 18.0473785,17.26633 17.6568542,17.6568542 C17.26633,18.0473785 16.633165,18.0473785 16.2426407,17.6568542 L12,13.4142136 L7.75735931,17.6568542 C7.36683502,18.0473785 6.73367004,18.0473785 6.34314575,17.6568542 C5.95262146,17.26633 5.95262146,16.633165 6.34314575,16.2426407 L10.5857864,12 L6.34314575,7.75735931 C5.95262146,7.36683502 5.95262146,6.73367004 6.34314575,6.34314575 C6.73367004,5.95262146 7.36683502,5.95262146 7.75735931,6.34314575 L12,10.5857864 L16.2426407,6.34314575 C16.633165,5.95262146 17.26633,5.95262146 17.6568542,6.34314575 C18.0473785,6.73367004 18.0473785,7.36683502 17.6568542,7.75735931 L13.4142136,12 Z",fill:"#333333"})))},y=function(){return o.a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.a.createElement("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10 18C14.4183 18 18 14.4183 18 10C18 5.58171 14.4183 2 10 2C5.58171 2 2 5.58171 2 10C2 11.422 2.37093 12.7572 3.0214 13.9144L2 18L6.08561 16.9786C7.24276 17.6291 8.57804 18 10 18ZM9.33333 10C9.33333 10.7364 8.73641 11.3333 8 11.3333C7.26359 11.3333 6.66667 10.7364 6.66667 10C6.66667 9.26359 7.26359 8.66667 8 8.66667C8.73641 8.66667 9.33333 9.26359 9.33333 10ZM12 11.3333C12.7364 11.3333 13.3333 10.7364 13.3333 10C13.3333 9.26359 12.7364 8.66667 12 8.66667C11.2636 8.66667 10.6667 9.26359 10.6667 10C10.6667 10.7364 11.2636 11.3333 12 11.3333Z",fill:"#181628"}))},S=function(e){return o.a.createElement("svg",{height:"100px",width:"100px",fill:"#FFF",id:"zowieCloseIcon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",version:"1.1",onClick:function(t){t.stopPropagation(),e.onClick()},x:"0px",y:"0px"},o.a.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},o.a.createElement("path",{d:"M13.4142136,12 L17.6568542,16.2426407 C18.0473785,16.633165 18.0473785,17.26633 17.6568542,17.6568542 C17.26633,18.0473785 16.633165,18.0473785 16.2426407,17.6568542 L12,13.4142136 L7.75735931,17.6568542 C7.36683502,18.0473785 6.73367004,18.0473785 6.34314575,17.6568542 C5.95262146,17.26633 5.95262146,16.633165 6.34314575,16.2426407 L10.5857864,12 L6.34314575,7.75735931 C5.95262146,7.36683502 5.95262146,6.73367004 6.34314575,6.34314575 C6.73367004,5.95262146 7.36683502,5.95262146 7.75735931,6.34314575 L12,10.5857864 L16.2426407,6.34314575 C16.633165,5.95262146 17.26633,5.95262146 17.6568542,6.34314575 C18.0473785,6.73367004 18.0473785,7.36683502 17.6568542,7.75735931 L13.4142136,12 Z",fill:"#FFF"})))},E=function(e){switch(e.type){case"instagram":return o.a.createElement("img",{alt:"Instagram",src:c.a});case"messenger":return o.a.createElement("img",{alt:"Messenger",src:d.a});case"signal":return o.a.createElement("img",{alt:"Signal",src:u.a});case"telegram":return o.a.createElement("img",{alt:"Telegram",src:m.a});case"viber":return o.a.createElement("img",{alt:"Viber",src:g.a});case"wechat":return o.a.createElement("img",{alt:"WeChat",src:V.a});case"whatsapp":return o.a.createElement("img",{alt:"WhatsApp",src:C.a});default:return null}},z=function(){return o.a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.a.createElement("g",{filter:"url(#filter0_d_14095_236973)"},o.a.createElement("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 19C16.4183 19 20 15.4183 20 11C20 6.58171 16.4183 3 12 3C7.58171 3 4 6.58171 4 11C4 12.422 4.37093 13.7572 5.0214 14.9144L4 19L8.08561 17.9786C9.24276 18.6291 10.578 19 12 19ZM11.3333 11C11.3333 11.7364 10.7364 12.3333 10 12.3333C9.26359 12.3333 8.66667 11.7364 8.66667 11C8.66667 10.2636 9.26359 9.66667 10 9.66667C10.7364 9.66667 11.3333 10.2636 11.3333 11ZM14 12.3333C14.7364 12.3333 15.3333 11.7364 15.3333 11C15.3333 10.2636 14.7364 9.66667 14 9.66667C13.2636 9.66667 12.6667 10.2636 12.6667 11C12.6667 11.7364 13.2636 12.3333 14 12.3333Z",fill:"white"})),o.a.createElement("defs",null,o.a.createElement("filter",{id:"filter0_d_14095_236973",x:"0.8",y:"0.866666",width:"22.4",height:"22.4",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB"},o.a.createElement("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),o.a.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),o.a.createElement("feOffset",{dy:"1.06667"}),o.a.createElement("feGaussianBlur",{stdDeviation:"1.6"}),o.a.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"}),o.a.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_14095_236973"}),o.a.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_14095_236973",result:"shape"}))))},O=n(1),T=n(41),I=n.n(T),M=n(42),B=n.n(M),P={insert:"head",singleton:!1},L=(I()(B.a,P),B.a.locals,n(44)),D=n.n(L);n.d(t,"a",function(){return ce});var N=function(){function e(e,t){for(var n=0;n0){var b=!1;u.forEach(function(e){var t="AND"===e.operator;e.conditions.forEach(function(n){"OR"===e.operator&&!1===t?t=Object(O.a)(n,h):"AND"===e.operator&&!0===t&&(t=Object(O.a)(n,h))}),t&&(b=!0)}),g&&!b&&(g=!1)}if(Object(O.g)("Show after showMetadataConditions",g,u),void 0!==h&&d.length>0){var V=!1;d.forEach(function(e){var t="AND"===e.operator;e.conditions.forEach(function(n){"OR"===e.operator&&!1===t?t=Object(O.a)(n,h):"AND"===e.operator&&!0===t&&(t=Object(O.a)(n,h))}),t&&(V=!0)}),g&&V&&(g=!1)}if(Object(O.g)("Show after hideMetadataConditions",g,d),void 0!==h&&p.length>0&&"started"!==m){var v=!1;p.forEach(function(e){var t="AND"===e.operator;e.conditions.forEach(function(n){"OR"===e.operator&&!1===t?t=Object(O.a)(n,h):"AND"===e.operator&&!0===t&&(t=Object(O.a)(n,h))}),t&&(v=!0)}),g&&!v&&(g=!1)}return Object(O.g)("Show after startMetadataConditions",g,p),g},i.calculatePolicy=function(){i.isAvailable()?i.show():i.hide()},i.state={originalTitle:q(),initialized:!1,iframeLoaded:!1,visible:!1,opened:!1,widgetOffScreen:!0,noRender:!0,ctaOffScreen:!0,ctaActivated:!1,alreadyActivated:!1,alreadyOpened:!1,alreadyStarted:!1,alternativeChannelsOffScreen:!0,alternativeChannelsActivated:!1,width:0,height:0,theme:e.theme,iframeVisible:!1,currentUrl:window.location.href,unreadMessageBadge:-1,hideCtaVisible:!1,iconActive:!1,invalidSession:!1,conversationState:function(){switch(sessionStorage.getItem(F)){case"started":return"started";default:return"unknown"}}(),waitingForGetToken:!1,ecommerceWatchStarted:!1,sessionTerminated:!1,formVisible:!1,localMetadata:{firstName:"",lastName:"",email:"",phoneNumber:""},lastTabFocusMillis:Date.now(),lastVisitTimeMillis:(a=localStorage.getItem(Y),a?Number(a):Date.now()),ctaListenersRegistered:!1,ctaActiveConfig:i.getDefaultCta(),ctaTriggered:[]},i}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a["Component"]),N(t,[{key:"componentDidMount",value:function(){var e=this;Object(O.g)("Zowie Widget - mounting started.");var t=this.props,a=t.handleLogoutCallback,o=t.handleShowCallback,i=t.handleHideCallback,s=t.handleStartCallback,c=t.handleCloseCallback,l=t.handleOpenCallback,d=t.handleIsAvailableCallback,p=t.handleGetAccessTokenCallback,u=t.handleTrackVisitedProduct,h=t.handleUpdateCartCallback,m=t.handleTrackPurchased,f=t.handleTrackCartUpdated,g=t.handleGetMobileCtaCallback,b=t.handleGetDesktopCtaCallback,V=t.widgetShowDelay,v=t.showOnLoad,C=t.keepOnLoad,w=t.onLoaded,A=r.a.parse(window.location.search).herochat,x=C&&("open"===A||"opened"===ee())&&!Object(O.b)();Object(O.g)("Zowie Widget - saved status is:",ee()),this.updateWindowSize(),window.addEventListener("resize",function(){return e.updateWindowSize()}),setInterval(function(){return e.tryUpdateUrl()},1e3),setInterval(function(){return e.watchTabFocus()},1e3),x?this.setState({alreadyStarted:!0},function(){e.calculatePolicy(),setTimeout(function(){return e.start()},300)}):v&&setTimeout(function(){return e.calculatePolicy()},1e3*Number(V)),o&&o(function(){return e.show()}),a&&a(function(){return e.logout()}),i&&i(function(){return e.hide()}),s&&s(function(t){t&&e.setState({pendingReferral:t}),e.start()}),c&&c(function(){return e.close()}),l&&l(function(){return e.open()}),d&&d(function(){return e.isAvailable()}),p&&p(function(t){e.setState({getToken:t})}),u&&u(function(t){Promise.all([n.e(0),n.e(1)]).then(n.bind(null,0)).then(function(n){return n.createAPI(e.props.instanceId,e.props.trackingSessionDuration).trackVisitedProduct(t)}),e.props.onEcommerceProductVisited&&e.props.onEcommerceProductVisited()}),f&&f(function(t){Promise.all([n.e(0),n.e(1)]).then(n.bind(null,0)).then(function(n){return n.createAPI(e.props.instanceId,e.props.trackingSessionDuration).trackCartUpdated(t)})}),m&&m(function(t,a,o,i){Promise.all([n.e(0),n.e(1)]).then(n.bind(null,0)).then(function(n){return n.createAPI(e.props.instanceId,e.props.trackingSessionDuration).trackPurchased(t,a,void 0,void 0,void 0,void 0,o,i)}),e.props.onEcommercePurchased&&e.props.onEcommercePurchased(o,i)}),h&&h(function(){return e.ecommerceUpdateCart()}),b&&b(function(){return e.state.ctaActiveConfig.desktop}),g&&g(function(){return e.state.ctaActiveConfig.mobile}),w&&w();try{this.ecommerceConfigure(),this.ecommerceTrackVisitedUrl(),this.ecommerceTrackVisitedProduct(),this.ecommerceWatchCart(),this.ecommerceWatchPurchase()}catch(e){Object(O.f)(e)}this.showForm(),this.triggerCta(x),setInterval(function(){return e.triggerCta(x)},1e3),localStorage.setItem(Y,String(Date.now()));var k=function(){e.props.isPersonalizeAgentExperimentEnabled&&Promise.all([n.e(0),n.e(1)]).then(n.bind(null,0)).then(function(t){return t.createAPI(e.props.instanceId,e.props.trackingSessionDuration).trackAbTestRegistered("personalize-agents-more",e.props.shouldPersonalizeAgent?"variant":"control")})},y=function(){e.props.isAddButtonsToProactiveChatsExperimentEnabled&&Promise.all([n.e(0),n.e(1)]).then(n.bind(null,0)).then(function(t){return t.createAPI(e.props.instanceId,e.props.trackingSessionDuration).trackAbTestRegistered("add-buttons-to-proactive-chats",e.props.shouldAddButtonsToProactiveChats?"variant":"control")})};window.addEventListener("new-tracking-session",function(){k(),y()}),k(),y(),Object(O.g)("Zowie Widget - mounting finished.")}},{key:"componentWillUnmount",value:function(){this.stopTitleChange()}},{key:"hideCta",value:function(){this.setState({ctaActivated:!1,pendingReferral:void 0,ctaOffScreen:!0,ctaActiveConfig:this.getDefaultCta()}),this.stopTitleChange(),this.setState({ctaTriggered:[]})}},{key:"showCta",value:function(e){var t=this,n=e.desktop,a=e.mobile,o=e.sound,i=e.titleChange,r=e.referral,s=0;Object(O.b)()||(s=n.showDelay||0),Object(O.b)()&&(s=a.showDelay||0),r?this.setState(function(e){return Object.assign({},e,{ctaTriggered:[].concat(W(e.ctaTriggered),[r])})}):this.setState(function(e){return Object.assign({},e,{ctaTriggered:[].concat(W(e.ctaTriggered),["default"])})}),setTimeout(function(){t.setState({ctaActivated:!0,pendingReferral:r,ctaOffScreen:!1,ctaActiveConfig:e}),r&&t.ecommerceTrackPractiveChatSeen(r),o&&t.playSound(),i&&t.startTitleChange(i)},1e3*Number(s))}},{key:"triggerCta",value:function(e){var t=this,n=this.props,a=n.proactiveChatConfigs,o=n.metadata,i=n.disableDesktopCta,r=n.disableMobileCta,s=n.mobileCta,c=n.desktopCta,l=this.state,d=l.opened,p=l.ctaListenersRegistered,u=l.ctaTriggered;if("enabled"===te()&&!d&&!0!==e){var h=window.location.href,m=[this.getDefaultCta()],f=a.filter(function(e){var t=0===e.triggerUrls.length&&0===e.triggerMetadataGroups.length&&Object(O.e)(e.schedule),n=Object(O.i)(e.triggerUrls,h)&&Object(O.e)(e.schedule),a=void 0!==e.triggerMetadataGroups.find(function(t){var n=void 0;return t.conditions.forEach(function(e){("OR"!==t.operator||!1!==n&&void 0!==n||!o)&&("AND"!==t.operator||!0!==n&&void 0!==n||!o)||(n=Object(O.a)(e,o))}),!0===n&&Object(O.e)(e.schedule)});return t||n||a}).map(function(e){return{desktop:i?{mode:"HIDDEN",header:"",text:""}:e.desktopCta?e.desktopCta:c,mobile:r?{mode:"HIDDEN",lines:[]}:e.mobileCta?e.mobileCta:s,triggerEvents:e.triggerEvents,sound:e.sound,titleChange:e.titleChange,referral:e.id}});0!==f.length&&(m=f),m.filter(function(e){return!u.includes(e.referral?e.referral:"default")}).forEach(function(e){e.triggerEvents.forEach(function(n){if("PageVisited"===n.name)t.showCta(e),Object(O.g)("Zowie Widget - triggered page visited.");else if("PageInactive"===n.name){var a=n.durationMillis;a&&t.state.lastTabFocusMillis<=Date.now()-a&&(t.showCta(e),Object(O.g)("Zowie Widget - triggered page inactive."))}else if("PageReturned"===n.name){var o=n.durationMillis;o&&t.state.lastVisitTimeMillis<=Date.now()-o&&(t.showCta(e),Object(O.g)("Zowie Widget - triggered page returned."))}else if("ElementHover"===n.name){var i=n.selector;if(i&&!p){var r=document.querySelector(i);r&&r.addEventListener("mouseover",function(){t.showCta(e),Object(O.g)("Zowie Widget - triggered element hover.")},!1)}}else if("ElementClick"===n.name){var s=n.selector;if(s&&!p){var c=document.querySelector(s);c&&c.addEventListener("click",function(){t.showCta(e),Object(O.g)("Zowie Widget - triggered element click.")},!1)}}else"EcommerceCartUpdatedProductAdded"===n.name?sessionStorage.getItem(H)&&(sessionStorage.removeItem(H),t.showCta(e),Object(O.g)("Zowie Widget - triggered cart product added.")):"EcommerceCartUpdatedProductRemoved"===n.name?sessionStorage.getItem(G)&&(sessionStorage.removeItem(G),t.showCta(e),Object(O.g)("Zowie Widget - triggered cart product removed.")):"EcommerceCartUpdatedProductVisited"===n.name&&sessionStorage.getItem(Z)&&(sessionStorage.removeItem(Z),t.showCta(e),Object(O.g)("Zowie Widget - triggered cart product visited."))})}),this.setState({ctaListenersRegistered:!0})}}},{key:"ecommerceTrackVisitedUrl",value:function(){var e=this;(this.props.ecommerceShopifyTracking||this.props.ecommerceMagentoTracking||this.props.ecommerceBigcommerceTracking||this.props.ecommerceNopcommerceTracking||this.props.ecommerceCustomTracking)&&Promise.all([n.e(0),n.e(1)]).then(n.bind(null,0)).then(function(t){return t.createAPI(e.props.instanceId,e.props.trackingSessionDuration).trackVisitedUrl(window.location.href,document.title,navigator.userAgent,navigator.appVersion)})}},{key:"ecommerceTrackConversationStarted",value:function(e){var t=this;Promise.all([n.e(0),n.e(1)]).then(n.bind(null,0)).then(function(n){return n.createAPI(t.props.instanceId,t.props.trackingSessionDuration).trackConversationStarted(e)}),this.props.onEcommerceConversationStarted&&this.props.onEcommerceConversationStarted()}},{key:"ecommerceTrackVisitedProduct",value:function(){var e=this;this.props.ecommerceShopifyTracking&&Promise.all([n.e(0),n.e(2)]).then(n.bind(null,55)).then(function(t){return t.trackVisitedProduct(e.props.instanceId,e.props.trackingSessionDuration,function(){$(),e.props.onEcommerceProductVisited&&e.props.onEcommerceProductVisited()})}),this.props.ecommerceBigcommerceTracking&&Promise.all([n.e(0),n.e(3)]).then(n.bind(null,56)).then(function(t){return t.trackVisitedProduct(e.props.instanceId,e.props.trackingSessionDuration,function(){$(),e.props.onEcommerceProductVisited&&e.props.onEcommerceProductVisited()})}),this.props.ecommerceMagentoTracking&&Promise.all([n.e(0),n.e(4)]).then(n.bind(null,57)).then(function(t){return t.trackVisitedProduct(e.props.instanceId,e.props.trackingSessionDuration,function(){$(),e.props.onEcommerceProductVisited&&e.props.onEcommerceProductVisited()})}),this.props.ecommerceNopcommerceTracking&&Promise.all([n.e(0),n.e(5)]).then(n.bind(null,58)).then(function(t){return t.trackVisitedProduct(e.props.instanceId,e.props.trackingSessionDuration,function(){$(),e.props.onEcommerceProductVisited&&e.props.onEcommerceProductVisited()})})}},{key:"ecommerceTrackPractiveChatClicked",value:function(e){var t=this;Promise.all([n.e(0),n.e(1)]).then(n.bind(null,0)).then(function(n){return n.createAPI(t.props.instanceId,t.props.trackingSessionDuration).trackProactiveChatClicked(e)}),this.props.onEcommerceProactiveChatClicked&&this.props.onEcommerceProactiveChatClicked()}},{key:"ecommerceTrackPractiveChatSeen",value:function(e){var t=this;Promise.all([n.e(0),n.e(1)]).then(n.bind(null,0)).then(function(n){return n.createAPI(t.props.instanceId,t.props.trackingSessionDuration).trackProactiveChatSeen(e)}),this.props.onEcommerceProactiveChatSeen&&this.props.onEcommerceProactiveChatSeen()}},{key:"showForm",value:function(){"started"!==this.state.conversationState&&!0===this.props.showPreChatForm&&this.setState({formVisible:!0})}},{key:"ecommerceClearCart",value:function(){var e=this;Promise.all([n.e(0),n.e(1)]).then(n.bind(null,0)).then(function(t){return t.createAPI(e.props.instanceId,e.props.trackingSessionDuration).trackCartUpdated([])})}},{key:"ecommerceWatchCart",value:function(){var e=this;this.state.ecommerceWatchStarted||this.props.ecommerceCartWatchEnabled&&(this.setState({ecommerceWatchStarted:!0}),this.props.ecommerceShopifyTracking&&Promise.all([n.e(0),n.e(2)]).then(n.bind(null,55)).then(function(t){return t.startCartWatch(e.props.instanceId,e.props.trackingSessionDuration,function(){return K()},function(){return X()})}),this.props.ecommerceBigcommerceTracking&&Promise.all([n.e(0),n.e(3)]).then(n.bind(null,56)).then(function(t){return t.startCartWatch(e.props.instanceId,e.props.trackingSessionDuration,function(){return K()},function(){return X()})}),this.props.ecommerceMagentoTracking&&Promise.all([n.e(0),n.e(4)]).then(n.bind(null,57)).then(function(t){return t.startCartWatch(e.props.instanceId,e.props.trackingSessionDuration,function(){return K()},function(){return X()})}),this.props.ecommerceNopcommerceTracking&&Promise.all([n.e(0),n.e(5)]).then(n.bind(null,58)).then(function(t){return t.startCartWatch(e.props.instanceId,e.props.trackingSessionDuration,function(){return K()},function(){return X()})}))}},{key:"ecommerceUpdateCart",value:function(){var e=this;this.props.ecommerceShopifyTracking&&Promise.all([n.e(0),n.e(2)]).then(n.bind(null,55)).then(function(t){return t.updateCart(e.props.instanceId,e.props.trackingSessionDuration,function(){return K()},function(){return X()})})}},{key:"ecommerceConfigure",value:function(){var e=this,t=this;this.props.ecommerceBigcommerceTracking&&Promise.all([n.e(0),n.e(3)]).then(n.bind(null,56)).then(function(n){n.configure(e.props.instanceId,e.props.trackingSessionDuration,function(){return t.ecommerceClearCart()},function(e,n){t.props.onEcommercePurchased&&t.props.onEcommercePurchased(e,n)})})}},{key:"ecommerceWatchPurchase",value:function(){var e=this,t=this;this.props.ecommerceShopifyTracking&&Promise.all([n.e(0),n.e(2)]).then(n.bind(null,55)).then(function(n){return n.startWatchPurchase(e.props.instanceId,e.props.trackingSessionDuration,function(){return t.ecommerceClearCart()},function(e,n){t.props.onEcommercePurchased&&t.props.onEcommercePurchased(e,n)})}),this.props.ecommerceBigcommerceTracking&&Promise.all([n.e(0),n.e(3)]).then(n.bind(null,56)).then(function(t){t.startWatchPurchase(e.props.instanceId,e.props.trackingSessionDuration)}),this.props.ecommerceMagentoTracking&&Promise.all([n.e(0),n.e(4)]).then(n.bind(null,57)).then(function(n){n.startWatchPurchase(e.props.instanceId,e.props.trackingSessionDuration,function(){return t.ecommerceClearCart()},function(e,n){t.props.onEcommercePurchased&&t.props.onEcommercePurchased(e,n)})}),this.props.ecommerceNopcommerceTracking&&Promise.all([n.e(0),n.e(5)]).then(n.bind(null,58)).then(function(n){n.startWatchPurchase(e.props.instanceId,e.props.trackingSessionDuration,function(e,n){t.props.onEcommercePurchased&&t.props.onEcommercePurchased(e,n)})})}},{key:"render",value:function(){var e=this,t=this.props,n=t.position,i=t.iconCloseUrl,r=t.iconOpenUrl,s=t.preload,c=t.alternativeChannels,l=this.state,d=l.opened,p=l.alreadyOpened,u=l.widgetOffScreen,h=l.noRender,m=l.visible,f=l.ctaOffScreen,g=l.imagePreviewUrl,b=l.unreadMessageBadge,V=l.ctaActivated,v=l.ctaActiveConfig,C=l.iframeVisible,w=l.hideCtaVisible,A=l.iconActive,x=l.sessionTerminated,z=l.alternativeChannelsOffScreen,T=l.alternativeChannelsActivated,I=l.formVisible,M=n||{desktopBottom:25,desktopRight:25,mobileBottom:20,mobileRight:20,mobileOffset:470},B=this.state.width a {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n text-decoration: none;\n padding: 14px 18px;\n margin: 0;\n width: 100%;\n box-sizing: border-box;\n}\n\n#zowieAlternativeChannelsButton {\n border-radius: 4px;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n padding: 12px 14px;\n margin: 8px;\n cursor: pointer;\n}\n\n#zowieAlternativeChannelsButton > p {\n font-family: "Segoe UI", "Avenir Next", Helvetica, Arial;\n font-size: 16px;\n line-height: 20px;\n font-weight: 500;\n margin: 0;\n padding: 0;\n margin-left: 12px;\n color: #181628;\n}\n\n#zowieAlternativeChannelsList > a:hover {\n background-color: #f7f7f7;\n}\n\n#zowieAlternativeChannelsList > a > p {\n font-family: "Segoe UI", "Avenir Next", Helvetica, Arial;\n font-size: 15px;\n line-height: 20px;\n color: #4d4d5c;\n font-weight: 400;\n padding: 8px 16px;\n margin: 0;\n padding: 0;\n margin-left: 12px;\n}\n\n#zowieCallToAction {\n cursor: pointer;\n position: fixed;\n transition: opacity 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);\n opacity: 1;\n z-index: 30002;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n}\n\n#zowieCallToAction .ctaDesktopHeader {\n margin: 0;\n padding: 0;\n font-size: 14px;\n line-height: 15px;\n font-family: "Segoe UI", "Avenir Next", Helvetica, Arial;\n font-weight: 500;\n color: #000;\n border-radius: 8px;\n background-color: #fff;\n box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.15);\n padding: 14px;\n text-align: right;\n text-transform: none;\n max-width: 210px;\n}\n\n#zowieCallToAction .ctaDesktopText {\n text-align: right;\n margin: 0;\n padding: 0;\n font-size: 14px;\n line-height: 15px;\n font-family: "Segoe UI", "Avenir Next", Helvetica, Arial;\n font-weight: 500;\n color: #000;\n margin-top: 8px;\n line-height: 18px;\n border-radius: 8px;\n background-color: #fff;\n box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.15);\n padding: 14px;\n max-width: 210px;\n text-transform: none;\n}\n\n#zowieProactiveButtons {\n position: fixed;\n transition: opacity 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);\n opacity: 1;\n z-index: 30002;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n}\n\n#zowieProactiveButtons .element {\n margin: 0;\n font-size: 14px;\n line-height: 15px;\n font-family: "Segoe UI", "Avenir Next", Helvetica, Arial;\n font-weight: 500;\n border-radius: 8px;\n box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.15);\n padding: 14px;\n text-align: right;\n text-transform: none;\n max-width: 210px;\n}\n\n#zowieProactiveButtons .header { \n color: #000;\n background-color: #fff;\n}\n\n#zowieProactiveButtons .button { \n cursor: pointer;\n color: #fff;\n margin-left: 8px;\n margin-top: 8px;\n}\n\n#zowieShadow {\n position: fixed;\n bottom: 0;\n right: 0;\n z-index: 30000;\n transition: all 1s cubic-bezier(0.25, 0.8, 0.25, 1);\n background: radial-gradient(\n at right bottom,\n rgba(29, 39, 54, 0.16) 0%,\n rgba(29, 39, 54, 0) 72%\n );\n}\n\n#zowieChatBar {\n position: fixed;\n width: 100%;\n height: 36px;\n left: 0;\n transition: all 0.3s ease-in-out;\n z-index: 30003;\n overflow: hidden;\n}\n\n#zowieChatBar p {\n width: calc(100% - 80px);\n position: absolute;\n top: 0;\n left: 40px;\n transition: opacity 0.8s ease-in-out;\n color: #fff;\n font-size: 13px;\n font-family: "Segoe UI", "Avenir Next", Helvetica, Arial;\n padding: 10px 0px;\n font-weight: 500;\n display: block;\n margin: 0;\n line-height: 16px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n#zowieChatBarIcon {\n position: absolute;\n left: 12px;\n top: 6px;\n}\n\n#zowieChatBarClose {\n position: absolute;\n right: 12px;\n top: 9px;\n}\n\n#zowieBadgeStyled {\n width: 24px;\n height: 24px;\n border-radius: 100%;\n background-color: #eb5249;\n color: #fff;\n display: block;\n text-align: center;\n font-family: "Segoe UI", "Avenir Next", Helvetica, Arial;\n font-size: 12px;\n line-height: 13px;\n padding: 4px 0;\n box-sizing: border-box;\n position: absolute;\n right: -9px;\n font-weight: 400;\n border: 2px solid #fff;\n z-index: 30006;\n}\n\n#zowieHideIcon {\n width: 12px;\n height: 12px;\n position: absolute;\n top: 4px;\n right: 4px;\n}\n\n#zowieCloseIcon {\n width: 28px;\n height: 28px;\n opacity: 0.8;\n margin: 0 20px;\n cursor: pointer;\n}\n\n#zowieCloseIcon:hover {\n opacity: 1;\n}\n\n#chatbotize-iframe {\n width: 100% !important;\n height: 100% !important;\n}\n\n#zowieMetadataWrapper {\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n background-color: #fff;\n padding: 20px;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n overflow-y: scroll;\n color: #000;\n}\n\n#zowieMetadataWrapper .fields {\n width: 100%;\n}\n\n#zowieMetadataWrapper .fields .field {\n margin-bottom: 12px;\n}\n\n#zowieMetadataWrapper label {\n display: block;\n width: 100%;\n font-family: "Segoe UI", "Avenir Next", Helvetica, Arial;\n font-size: 13px;\n line-height: 20px;\n font-weight: 400;\n margin-bottom: 3px;\n}\n\n#zowieMetadataWrapper .cta1 {\n width: 100%; \n text-align: center; \n display: block; \n font-family: "Segoe UI", "Avenir Next", Helvetica, Arial;\n font-size: 18px;\n line-height: 28px;\n font-weight: 400;\n margin-top: 10px;\n}\n\n#zowieMetadataWrapper .cta2 {\n width: 100%; \n text-align: center; \n display: block; \n font-family: "Segoe UI", "Avenir Next", Helvetica, Arial;\n font-size: 14px;\n line-height: 24px;\n font-weight: 400;\n margin-top: 10px;\n margin-bottom: 10px; \n}\n\n#zowieMetadataWrapper .details {\n width: 100%; \n text-align: left; \n display: block; \n font-family: "Segoe UI", "Avenir Next", Helvetica, Arial;\n font-size: 12px;\n line-height: 20px;\n font-weight: 400;\n margin-top: 20px;\n}\n\n#zowieMetadataWrapper .details ul {\n margin: 0;\n margin-bottom: 20px;\n}\n\n#zowieMetadataWrapper .details ul li {\n margin: 0;\n}\n\n#zowieMetadataWrapper .details a {\n color: #000;\n text-decoration: none;\n}\n\n#zowieMetadataWrapper input {\n width: 100%;\n padding: 8px;\n border-radius: 8px;\n box-sizing: border-box;\n display: block;\n border: none;\n font-family: "Segoe UI", "Avenir Next", Helvetica, Arial;\n font-size: 13px;\n line-height: 18px;\n font-weight: 300;\n border: 1px solid #ebecee; \n\n}\n\n#zowieMetadataWrapper button {\n width: 100%;\n padding: 16px 8px;\n border-radius: 8px;\n box-sizing: border-box;\n display: block;\n border: none;\n font-family: "Segoe UI", "Avenir Next", Helvetica, Arial;\n font-size: 16px;\n line-height: 20px;\n font-weight: 500;\n color: #fff;\n cursor: pointer;\n}\n\n#zowieMetadataWrapper button:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}',""])},44:function(e,t){e.exports="data:audio/mpeg;base64,SUQzBAAAAAAAfFRYWFgAAAASAAADbWFqb3JfYnJhbmQAcXQgIABUWFhYAAAAEQAAA21pbm9yX3ZlcnNpb24AMABUWFhYAAAAGAAAA2NvbXBhdGlibGVfYnJhbmRzAHF0ICAAVFNTRQAAAA8AAANMYXZmNTguNzYuMTAwAAAAAAAAAAAAAAD/+1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYaW5nAAAADwAAAAUAAAfxAGlpaWlpaWlpaWlpaWlpaWlpaWmdnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dndLS0tLS0tLS0tLS0tLS0tLS0tLS8vLy8vLy8vLy8vLy8vLy8vLy8vL//////////////////////////wAAAABMYXZjNTguMTMAAAAAAAAAAAAAAAAkBIAAAAAAAAAH8YfBBckAAAAAAAAAAAAAAAAAAAAA//uwZAAAAJsAxeUEAAgAAA/woAABCFCXFZmIgACAjiL3BHAAttBgAABgAAEAQDDQQMf///8EAxsPDdQGBgMB2AAABgzQm+bCAhQGYOHFmhQYyEHkL9scySTtrAQ/7t+QcBkDP/4yYs4MugKf/xcauiWC+vrGQ6xywzIAoAqAgkDoEAAAAAAAH6PquxxZ/JeqzAfv9sqMsOf+GwABADJXIEIIUd4wAAAAAADPFQza90zAhzTt8mTAQYDwR+DGoDDI4LDJcUy+5lUCgMAMwTGEMC4OJJT4OIYwYAgKAwwOUQYHgUTEoxUEmDwKcNXJhUFCg0MIipiiLQkHpxPkYJhnWTmK2cxUwoRjIQXNRBOGHTVavgzGWAMFWp28jMKrDhVc/xCBMv/60pvZPdkgAxhauyiC0AAAAAAAAd7y6HxNxBl1RguNrwQ25MswOKkEYAIAXGBJgRxgdIO4YY2KXGRYjWxr4wfYZH+LEmGmCfBhSgBSYN0DMGBEAx5hRoNaCQJIwBoAQMAgAfDAYwA8SAeVVRYgMf5A1IYD20wmdA6zsC3QDAOAOtsA0rIDDHQN4ONUh8B8wEg4cGCYwD4EQyKGqRZJVIcITBl4QVEojMkFLqP+Xzf03//9NB/9FzTV/s+n///KfZhj6aocAADAyLLgAAB2vO2EwGEIY+W9/RbmLf6LxBgNl2VxUA8JJMSVIXIIALmDACKYDYBkGBgg45g/wiEZbmnqG7Gz4hwOLWGaNMsBGpzlHJiIoN4YXABRncQAcwcQQPTCYaMOBkGAJM0CE0ZHhns0Fsw4Cu0Sog2ohTGQHMLAcDAltaa++r6MuaMWeW//+5Bk7AAEeSBM/neIgCABqa/BnIAT1MMeffoAIJIMJv+MoAVFbWOX/RH/9AXERo4+PP+d/58NfkRdn8Mt/VO/7f//U3//6CAABwBBwAABzLHVOOiRp0kedSGuHGpPH+6AoQeTcRcRGCPdrM6wBSjCrbyy/7FLBa74H7+Emy//Ko4FK//EFhlBmoEAlKmdMABF4MpHg5wFhszYCNVCzmBcw/wtDKyW1N/qe04X6cjpPOKNyoZYyUS7zF5DJMFUCQM4LjsshxhKAVAK8ucoAqhywJ8NnkNqlyx//+qpWpe4ECf+8Ju3+ewBwANb5WhkCBoymriLzgZCGNH+ZkhJWVjB3T8IUxzLQSE+Vz7nf/8eNVVC66WFbFTF0pLOX1YSMgGgmBDiAoIkWcXZFSpBEAAAGSQ4AAAZKY+mGGghi5kHNQcyG32Bp5WY66GBNZjCDhmFOa8aRaFxmZkrGNKEge6GZkYhzS7Rxa1Cm3qSmJb3r//f///5aUvcFSA8P/UD6hVp2wgBecAAAAZUr/PCAUiJwgbKGTOlAoptSgKFbABCFhn/+5Bk8QUUQCFGm/w66EdjGP1vWTlLBGMjTfsk4RWMI13NYUVSyaZXufVw+KqwvAClhWe2SBMzk8x0qT4Q5osNw9huxEOjoSu3HATRGCDZcDEzKZOAk2YBCuACTVkOeMTqAA0wgsyQsdCA4VKXLRNbtRg1XNz+dM8w8609qYdg5D3JuBoex1a8IqGcxcA4QH/EkPTyvIiF5pwpjDoButDRVLKX9E7sb/5syptbTmL2a0CYDJWLVRgfgIBmAhVX5wkWAQCEzzSOf/BYVX4CAEyEYSmiRYBAITPcjn/w3UxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+2Bk+QESphjG+37SGD9i+N1lj3cIlGUX7OmIwLkMY32RMZxVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+xBE5g/wngtBwAMwMBLhaDgAJggAAAGkAAAAIAAANIAAAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQ=="},5:function(e,t,n){"use strict";n.r(t),n.d(t,"init",function(){return f});var a=n(12),o=n.n(a),i=n(22),r=n(7),s=n(1),c=n(17),l=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,o=!1,i=void 0;try{for(var r,s=e[Symbol.iterator]();!(a=(r=s.next()).done)&&(n.push(r.value),!t||n.length!==t);a=!0);}catch(e){o=!0,i=e}finally{try{!a&&s.return&&s.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),d="add-buttons-to-proactive-chats",p="personalize-agent",u=function(){window.DD_LOGS&&window.DD_LOGS.getInitConfiguration()||r.a.init({clientToken:"pubb30704b9371a0643686e8f03a0b19e9b",site:"datadoghq.eu",env:"prod",forwardErrorsToLogs:!1})};function h(e){var t=e.instanceId;Object(s.g)("Zowie Widget - initializing - "+e.instanceId,e),e.metadata&&Object(s.g)("Zowie Widget - initializing with metadata: ",e.metadata);var n=o.a.useState(e.position),a=l(n,2),i=a[0],r=a[1];o.a.useEffect(function(){e.handleUpdatePositionCallback&&e.handleUpdatePositionCallback(function(e){return r(e)})});var h=e.metadata?e.metadata:{locale:Object(s.c)(),timezone:Object(s.d)()},f=h&&h.locale?h.locale:Object(s.c)(),g=e.configuration.default;if(f){var b=f.slice(0,2).toLowerCase(),V=f.slice(3,5).toLowerCase();""===V&&(V=void 0),"zh-tw"===f.toLowerCase()&&(b="zhtw"),"zhtw-cn"===f.toLowerCase()&&(b="zhtw",V="cn");var v=e.configuration.locales.find(function(e){return e.language.toLowerCase()===b&&(!(e.countries.length>0&&void 0!==V)||-1!==e.countries.map(function(e){return e.toLowerCase()}).indexOf(V))});v&&(g=v)}var C=!1,w=!1;"fb64e04d80d141adb1c062f1ed177662"!==t&&"0187725d0e98488baf9839f4c3babb8b"!==t&&u(),void 0!==e.disableMobileCta&&(C=e.disableMobileCta),void 0!==e.disableDesktopCta&&(w=e.disableDesktopCta);var A=e.primaryLeftColor||e.primaryColor||g.basic.primaryColor||"#3D34BE",x=e.primaryRightColor||e.primaryColor||g.basic.primaryColor||"#3D34BE",k=e.secondaryLeftColor||e.secondaryColor||g.basic.secondaryColor||"#3D34BE",y=e.secondaryRightColor||e.secondaryColor||g.basic.secondaryColor||"#3D34BE",S=e.iconCloseUrl,E=e.iconOpenUrl,z=e.headerMode,O=e.allowDownloadTranscript,T=e.agentAvatar,I=e.chatbotAvatar,M=e.sessionTimeout,B=void 0,P=void 0,L=!0,D=500,N=e.surface||"desktop-mobile";"90fdf73dfa654cef907452c8231b6254"!==t&&"55ba5f792e694813b99f99671946396a"!==t&&"72b1b6f431d24fa28ba2f00585dd250d"!==t||(M=864e5,A="#FFA666",k="#FFA666",x="#FF6B00",y="#FF6B00",S="https://files.chatbotize.com/empik/icon_close.png",E="https://files.chatbotize.com/empik/icon_open.png",z="white"),"0d923b5e3d2744719c765663d581f9d5"===t&&(M=9e5),"f6222d5ef2484aa48890b6fdc3facbc8"===t&&(M=18e5),"265cc3ff3816493290879fef2fb5b1de"===t&&(M=24192e5),"a54f077e26054bf7b470e8c4c7da015c"===t&&(S="https://files.chatbotize.com/mig/chat-close.svg",E="https://files.chatbotize.com/mig/chat-open.svg"),"21f8c27529bd458f89c9351a9f4bed06"===t&&(S="https://files.chatbotize.com/answear/chat-close.svg",E="https://files.chatbotize.com/answear/chat-open.svg"),"c779d7852f2f4a11b8a9a6e2d7103445"===t&&(S="https://files.chatbotize.com/costco/chat-close.svg",E="https://files.chatbotize.com/costco/chat-open.svg",M=864e5),"inpostdemo"===t&&(O=!1),"265cc3ff3816493290879fef2fb5b1de"===t&&(T="https://files.chatbotize.com/msqc-chuck.png",I="https://files.chatbotize.com/msqc-chuck.png"),"fb64e04d80d141adb1c062f1ed177662"===t&&(T="https://files.chatbotize.com/euro/consultant.svg",I="https://files.chatbotize.com/euro/chatbot.svg"),"0187725d0e98488baf9839f4c3babb8b"===t&&(T="https://files.chatbotize.com/oleole/consultant.svg",I="https://files.chatbotize.com/oleole/chatbot.svg");var R=!!e.showPreChatForm&&e.showPreChatForm,W=e.content?e.content:void 0,j=!!e.allowEndChat&&e.allowEndChat,U=e.restartReferral?e.restartReferral:void 0;"f1c3ca86cdd3491099618510dbf8c3b4"!==t&&"3dfa76dadef542079d6536510a149289"!==t||(B="appsflyer",P=300,U="start",W={endChatQuestion:"Would you like to finish this conversation and remove history?",endChatButtonYesCaption:"Yes",endChatButtonNoCaption:"No",endChatButtonCaption:"End chat",downloadTranscriptButtonCaption:"Download transcript"}),"732e347282da4de586f9992392764a7b"===t&&(L=!1),"ce0a0a8ecc3d41809bbf4dfa34f10056"===t&&(D=1e3);var F=!!e.ecommerceShopifyTracking&&e.ecommerceShopifyTracking,_=!!e.ecommerceBigcommerceTracking&&e.ecommerceBigcommerceTracking,H=!!e.ecommerceMagentoTracking&&e.ecommerceMagentoTracking,G=!!e.ecommerceNopcommerceTracking&&e.ecommerceNopcommerceTracking,Z=!!e.ecommerceCustomTracking&&e.ecommerceCustomTracking,Y=!e.ecommerceCartWatchEnabled||e.ecommerceCartWatchEnabled;window.Shopify&&(F=!0),"31abf33e41d14051b7a8d66c6bb44171"===t&&(_=!0);"5ba46bb7bc2b4627992752a2ed836fa0"!==t&&"bf2a9fba26b346d3aea3f9d916a8eb93"!==t||(H=!0),"94f883c194b7419591afe1180cee0875"===t&&(G=!0),"1e95020a619049a1825a8ee240d8c72b"===t&&(W={endChatQuestion:"Would you like to close this chat?",endChatButtonYesCaption:"Yes",endChatButtonNoCaption:"No",endChatButtonCaption:"End chat",downloadTranscriptButtonCaption:"Download transcript"},j=!0,M=36e5,H=!0);var J=!1;"4c893f6e4ee94e02b06a992026dc53c4"===t&&(J=!0),"9be065adf1534e498deb9d682ad2eef5"!==t&&"172a4aca9e4540ccbfc6c29f2535ceed"!==t||(Z=!0);var Q=!!e.allowToDisableCta&&e.allowToDisableCta;"fb64e04d80d141adb1c062f1ed177662"!==t&&"0187725d0e98488baf9839f4c3babb8b"!==t&&"abbcfc29333d44dfa2891f1f33e27829"!==t||(Q=!0);var q=!!e.preload&&e.preload;"4c893f6e4ee94e02b06a992026dc53c4"===t&&(q=!0);var K="265cc3ff3816493290879fef2fb5b1de"===t||"a706498318d74caf80c7bacd8bd7beb4"===t,X=function(){if(!K)return!1;var e=function(){switch(localStorage.getItem(p)){case"true":return!0;case"false":return!1;default:return}}();if(void 0===e){var t=Math.random()<.5;return localStorage.setItem(p,JSON.stringify(t)),t}return e}(),$="9ccb8390bac644349674b2532a5b56f9"===t,ee=function(){if(!$)return!1;var e=function(){switch(localStorage.getItem(d)){case"true":return!0;case"false":return!1;default:return}}();if(void 0===e){var t=Math.random()<.5;return localStorage.setItem(d,JSON.stringify(t)),t}return e}();return o.a.createElement(c.b,Object.assign({desktopCta:g.desktopCta,mobileCta:g.mobileCta,disableDesktopCta:w,disableMobileCta:C,proactiveChatConfigs:e.configuration.proactiveChats,metadata:h,surface:N,whitelist:m(g.placement.whitelist),blacklist:m(g.placement.blacklist),startOnWhitelist:m(g.placement.startWhitelist),startOnBlacklist:m(g.placement.startBlacklist),continueOnWhitelist:m(g.placement.continueOnWhitelist),continueOnBlacklist:m(g.placement.continueOnBlacklist),name:g.basic.name,description:g.basic.description,logoUrl:g.basic.logoUrl,engagementMessage:g.basic.engagementMessage,tabNotificationTitle:g.notifications.tabNotificationTitleEnabled?g.notifications.tabNotificationTitle:void 0,webpushNotificationTitleEnabled:g.notifications.webpushNotificationTitleEnabled,hideMetadataConditions:g.hideMetadataConditions,startMetadataConditions:g.startMetadataConditions,showMetadataConditions:g.showMetadataConditions,webpushSoundOn:g.notifications.webpushSoundOn,widgetShowDelay:g.basic.showDelay,authorMode:g.basic.authorMode,availability:g.availability,showOnLoad:!e.showOnLoad||e.showOnLoad,keepOnLoad:!e.keepOnLoad||e.keepOnLoad,startOnOpen:!e.startOnOpen||e.startOnOpen,position:i,sessionTimeout:M,iconCloseUrl:S,iconOpenUrl:E,allowToDisableCta:Q,allowEndChat:j,restartReferral:U,submitOnEnter:!e.submitOnEnter||e.submitOnEnter,allowDownloadTranscript:O,agentAvatar:T,chatbotAvatar:I,trackActivity:L,preload:q,sendReferralDelay:D,ecommerceShopifyTracking:F,ecommerceBigcommerceTracking:_,ecommerceMagentoTracking:H,ecommerceNopcommerceTracking:G,ecommerceCustomTracking:Z,ecommerceCartWatchEnabled:Y,trackingSessionDuration:e.configuration.sessionDurationMinutes,slug:e.configuration.slug,showPreChatForm:R,gorgiasPassReferral:J,content:W},e,{isPersonalizeAgentExperimentEnabled:K,shouldPersonalizeAgent:X,isAddButtonsToProactiveChatsExperimentEnabled:$,shouldAddButtonsToProactiveChats:ee,theme:{primaryColor:x,headerBackgroundLeftColor:e.headerBackgroundLeftColor?e.headerBackgroundLeftColor:A,headerBackgroundRightColor:e.headerBackgroundRightColor?e.headerBackgroundRightColor:x,headerTextColor:e.headerTextColor?e.headerTextColor:"#fff",userTextPrimaryColor:e.userTextPrimaryColor?e.userTextPrimaryColor:y,userTextSecondaryColor:e.userTextSecondaryColor?e.userTextSecondaryColor:"#fff",userBackgroundLeftColor:e.userBackgroundLeftColor?e.userBackgroundLeftColor:k,userBackgroundRightColor:e.userBackgroundRightColor?e.userBackgroundRightColor:y,agentTextColor:e.agentTextColor?e.agentTextColor:"#000",agentBackgroundColor:e.agentBackgroundColor?e.agentBackgroundColor:"#F6F6F6",messageWidth:e.messageWidth?e.messageWidth:void 0,headerMode:z,iconsMode:B,fontWeight:P}}))}function m(e){return Array.isArray(e)&&0===e.length?void 0:e}function f(e,t,n,a){var r=Object(i.createRoot)(e);n.disabled?console.log("Chat disabled"):r.render(o.a.createElement(h,Object.assign({},t,{configuration:n,handleShowCallback:function(e){a.show=e},handleHideCallback:function(e){a.hide=e},handleStartCallback:function(e){a.start=e},handleOpenCallback:function(e){a.open=e},handleCloseCallback:function(e){a.close=e},handleIsAvailableCallback:function(e){a.isAvailable=e},handleLogoutCallback:function(e){a.logout=e},handleGetAccessTokenCallback:function(e){a.setAccessTokenCallback=e},handleUpdatePositionCallback:function(e){a.updatePosition=e},handleTrackVisitedProduct:function(e){a.trackVisitedProduct=e},handleTrackCartUpdated:function(e){a.trackCartUpdated=e},handleTrackPurchased:function(e){a.trackPurchased=e},handleUpdateCartCallback:function(e){a.updateCart=e},handleGetDesktopCtaCallback:function(e){a.getDesktopCta=e},handleGetMobileCtaCallback:function(e){a.getMobileCta=e}})))}}}]);