"use strict";(self.zowieJsonp=self.zowieJsonp||[]).push([[832],{2380:(e,t,i)=>{i.r(t),i.d(t,{init:()=>At});var a=i(6540),n=i(5338),o=i(9565),r=i(8574),s=i(6663),l=i(2565);function c(e){let{condition:t,value:i}=e;if(void 0===i||null===i)return!1;switch(t.operator){case"EQUALS":return i===t.value;case"NOT_EQUALS":return i!==t.value;case"CONTAINS":return-1!==i.indexOf(t.value);case"NOT_CONTAINS":return-1===i.indexOf(t.value);default:return!1}}function d(e){let{condition:t,metadata:i}=e;switch(t.parameter){case"locale":return c({condition:t,value:i.locale});case"timezone":return c({condition:t,value:i.timezone});case"url":return(e=>{let{condition:t,metadata:i}=e;return c({condition:t,value:window.location.href})})({condition:t,metadata:i});case"custom":return(0,l.Xr)({condition:t,metadata:i})?(0,l.ce)({condition:t,metadata:i}):!!(e=>{let{condition:t,metadata:i}=e;return t.parameterName&&i.extraParams})({condition:t,metadata:i})&&(e=>{let{condition:t,metadata:i}=e;return c({condition:t,value:i.extraParams&&t.parameterName&&i.extraParams[t.parameterName]})})({condition:t,metadata:i});default:return!1}}const h="herochat-cta-product-added",p="herochat-cta-product-removed",m="herochat-cta-product-visited";const u=e=>{let{config:t,event:i,state:a,callback:n}=e;const o=i.selector;if(o&&!a.ctaListenersRegistered){if((0,l.Mr)({event:i}))return void(0,l.Xg)({event:i,callback:()=>n(t)});(e=>{let{selector:t,callback:i,config:a}=e;const n=document.querySelector(t);n&&n.addEventListener("mouseover",(()=>{i(a)}),!1)})({selector:o,callback:n,config:t})}},g=e=>{let{config:t,event:i,state:a,callback:n}=e;const o=i.selector;o&&!a.ctaListenersRegistered&&(e=>{let{selector:t,callback:i,config:a}=e;const n=document.querySelector(t);n&&n.addEventListener("click",(()=>{i(a)}),!1)})({selector:o,callback:n,config:t})},f=e=>{let{config:t,event:i,state:a,callback:n}=e;sessionStorage.getItem(h)&&(sessionStorage.removeItem(h),n(t))},b=e=>{let{config:t,event:i,state:a,callback:n}=e;sessionStorage.getItem(p)&&(sessionStorage.removeItem(p),n(t))},v=e=>{let{config:t,event:i,state:a,callback:n}=e;sessionStorage.getItem(m)&&(sessionStorage.removeItem(m),n(t))},x=e=>{const{event:{name:t}}=e;"PageVisited"!==t?"PageInactive"!==t?"PageReturned"!==t?"ElementHover"!==t?"ElementClick"!==t?"EcommerceCartUpdatedProductAdded"!==t?"EcommerceCartUpdatedProductRemoved"!==t?"EcommerceCartUpdatedProductVisited"!==t||v(e):b(e):f(e):g(e):u(e):(e=>{let{config:t,event:i,state:a,callback:n}=e;i.durationMillis&&a.lastVisitTimeMillis<=Date.now()-i.durationMillis&&n(t)})(e):(e=>{let{config:t,event:i,state:a,callback:n}=e;i.durationMillis&&a.lastTabFocusMillis<=Date.now()-i.durationMillis&&n(t)})(e):(e=>{let{config:t,event:i,state:a,callback:n}=e;n(t)})(e)},C=e=>{let{config:t,path:i,metadata:a}=e;const{schedule:n,triggerUrls:o,triggerMetadataGroups:r}=t;return!!function(e){if(!e)return!0;const t=new Date,i=t.getTimezoneOffset(),a=t.getTime();if(e.startTimeMillis&&new Date(e.startTimeMillis+60*i*1e3)>t)return!1;if(e.stopTimeMillis&&new Date(e.stopTimeMillis+60*i*1e3)=s.startInMinutes&&l<=s.stopInMinutes}(n)&&(!!(e=>{let{urlPatterns:t,path:i}=e;return!t||!t.length||!!t.find((e=>{if(e.startsWith("r|")&&e.endsWith("|r")){const t=e.slice(2,-2);return new RegExp(t).test(i)}return i.includes(e)}))})({urlPatterns:o,path:i})||!!(e=>{let{metadataConditionsGroups:t,metadata:i}=e;return 0===t.length||t.some((e=>{let{conditions:t,operator:a}=e;return"AND"===a?t.every((e=>d({condition:e,metadata:i}))):"OR"===a&&t.some((e=>d({condition:e,metadata:i})))}))})({metadataConditionsGroups:r,metadata:a}))},w=i.p+"8cbf35c17b1bf0811a3f.svg",V=i.p+"517d90809bb6c6e7df56.svg",k=i.p+"d33561f2b5664e2b901c.svg",y=i.p+"8aa6b462d791b41295ae.svg",A=i.p+"e5d669fb97989b75fb98.svg",S=i.p+"c0fe71cf68b1cab9707c.svg",E=i.p+"064bb5c5bc4d63025ba1.svg",I=e=>e.active?a.createElement("svg",{width:"60",height:"60",viewBox:"0 0 60 60",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{maxWidth:"none",height:"100%",width:"100%",filter:"drop-shadow(0px 2px 3px rgba(0, 0, 0, 0.08))"},"aria-hidden":"true"},a.createElement("rect",{width:"60",height:"60",rx:"8",fill:"white"}),a.createElement("g",null,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}))):a.createElement("svg",{width:"60",height:"60",viewBox:"0 0 60 60",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{maxWidth:"none",height:"100%",width:"100%",filter:"drop-shadow(0px 2px 3px rgba(0, 0, 0, 0.08))"},"aria-hidden":"true"},a.createElement("rect",{width:"60",height:"60",rx:"8",fill:e.color}),a.createElement("g",null,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"}))),T=e=>e.active?a.createElement("svg",{width:"60",height:"60",viewBox:"0 0 60 60",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{maxWidth:"none",height:"100%",width:"100%",filter:"drop-shadow(0px 2px 3px rgba(0, 0, 0, 0.08))"},"aria-hidden":"true"},a.createElement("rect",{width:"60",height:"60",rx:"12",fill:"white"}),a.createElement("g",{transform:"translate(16, 15.5)"},a.createElement("path",{d:"M27.3333 20.6697C27.332 24.4975 24.6421 27.6969 21.0496 28.4822L20.1989 25.9302C21.8043 25.6682 23.1687 24.6895 23.9532 23.3334H20.6667C19.1939 23.3334 18 22.1395 18 20.6667V15.3334C18 13.8606 19.1939 12.6667 20.6667 12.6667H24.5841C23.928 7.405 19.4395 3.33341 14 3.33341C8.56051 3.33341 4.07199 7.405 3.41586 12.6667H7.33334C8.8061 12.6667 10 13.8606 10 15.3334V20.6667C10 22.1395 8.8061 23.3334 7.33334 23.3334H3.33334C1.86058 23.3334 0.666672 22.1395 0.666672 20.6667V14.0001C0.666672 6.63628 6.63621 0.666748 14 0.666748C21.3637 0.666748 27.3333 6.63628 27.3333 14.0001V15.3317V15.3334V20.6667V20.6697Z",fill:e.color}))):a.createElement("svg",{width:"60",height:"60",viewBox:"0 0 60 60",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{maxWidth:"none",height:"100%",width:"100%",filter:"drop-shadow(0px 2px 3px rgba(0, 0, 0, 0.08))"},"aria-hidden":"true"},a.createElement("rect",{width:"60",height:"60",rx:"12",fill:e.color}),a.createElement("g",{transform:"translate(16, 15.5)"},a.createElement("path",{d:"M27.3333 20.6697C27.332 24.4975 24.6421 27.6969 21.0496 28.4822L20.1989 25.9302C21.8043 25.6682 23.1687 24.6895 23.9532 23.3334H20.6667C19.1939 23.3334 18 22.1395 18 20.6667V15.3334C18 13.8606 19.1939 12.6667 20.6667 12.6667H24.5841C23.928 7.405 19.4395 3.33341 14 3.33341C8.56051 3.33341 4.07199 7.405 3.41586 12.6667H7.33334C8.8061 12.6667 10 13.8606 10 15.3334V20.6667C10 22.1395 8.8061 23.3334 7.33334 23.3334H3.33334C1.86058 23.3334 0.666672 22.1395 0.666672 20.6667V14.0001C0.666672 6.63628 6.63621 0.666748 14 0.666748C21.3637 0.666748 27.3333 6.63628 27.3333 14.0001V15.3317V15.3334V20.6667V20.6697Z",fill:"white"}))),R=e=>e.visible?e.value<1?null:a.createElement("div",{id:"zowieBadgeStyled",style:{bottom:e.isMobile?"38px":"45px"}},e.value>9?9:e.value):null,M=e=>a.createElement("svg",{width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:t=>{t.stopPropagation(),e.onClick()}},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"})),P=e=>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:t=>{t.stopPropagation(),e.onClick()}},a.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},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"}))),z=()=>a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},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"})),D=e=>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:t=>{t.stopPropagation(),e.onClick()},x:"0px",y:"0px"},a.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},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"}))),B=e=>{switch(e.type){case"instagram":return a.createElement("img",{alt:"Instagram",src:w});case"messenger":return a.createElement("img",{alt:"Messenger",src:V});case"signal":return a.createElement("img",{alt:"Signal",src:k});case"telegram":return a.createElement("img",{alt:"Telegram",src:y});case"viber":return a.createElement("img",{alt:"Viber",src:A});case"wechat":return a.createElement("img",{alt:"WeChat",src:S});case"whatsapp":return a.createElement("img",{alt:"WhatsApp",src:E});default:return null}},L=()=>a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{filter:"drop-shadow(0px 1.06667px 1.6px rgba(0, 0, 0, 0.08))"},"aria-hidden":"true"},a.createElement("g",{filter:"url(#filter0_d_14095_236973)"},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"})),a.createElement("defs",null,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"},a.createElement("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),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"}),a.createElement("feOffset",{dy:"1.06667"}),a.createElement("feGaussianBlur",{stdDeviation:"1.6"}),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"}),a.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_14095_236973"}),a.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_14095_236973",result:"shape"}))));var N=i(9994);const O="avatar-index",W=["https://files.chatbotize.com/widget/avatars/avatar_andrya.png","https://files.chatbotize.com/widget/avatars/avatar_asinthia.png","https://files.chatbotize.com/widget/avatars/avatar_christa-tate.png","https://files.chatbotize.com/widget/avatars/avatar_glenette-myers.png","https://files.chatbotize.com/widget/avatars/avatar_jeanne-robertson.png","https://files.chatbotize.com/widget/avatars/avatar_jenn-wiedmaier.png","https://files.chatbotize.com/widget/avatars/avatar_kaitlyn-cooley.png","https://files.chatbotize.com/widget/avatars/avatar_kassi-carr.png","https://files.chatbotize.com/widget/avatars/avatar_katie-herbord.png","https://files.chatbotize.com/widget/avatars/avatar_kelly-gallion.png","https://files.chatbotize.com/widget/avatars/avatar_lila.png","https://files.chatbotize.com/widget/avatars/avatar_lisa-riggins.png","https://files.chatbotize.com/widget/avatars/avatar_michael-henry.png","https://files.chatbotize.com/widget/avatars/avatar_pam-harman.png","https://files.chatbotize.com/widget/avatars/avatar_patricia-stiller.png","https://files.chatbotize.com/widget/avatars/avatar_rachel-peery.png","https://files.chatbotize.com/widget/avatars/avatar_rogene-hollis.png","https://files.chatbotize.com/widget/avatars/avatar_shawn-rose.png","https://files.chatbotize.com/widget/avatars/avatar_sheniqua-anderson.png","https://files.chatbotize.com/widget/avatars/avatar_stella.png","https://files.chatbotize.com/widget/avatars/avatar_stephanie-henry.png","https://files.chatbotize.com/widget/avatars/avatar_steve-sanders.png","https://files.chatbotize.com/widget/avatars/avatar_tamara-mcnickle.png","https://files.chatbotize.com/widget/avatars/avatar_tammy-noel.png","https://files.chatbotize.com/widget/avatars/avatar_virginia-mckinley.png","https://files.chatbotize.com/widget/avatars/avatar_wendi-mills.png","https://files.chatbotize.com/widget/avatars/avatar_wendy-witmer.png"];function U(){let e=0;return null===localStorage.getItem(O)&&(e=Math.floor(27*Math.random()),localStorage.setItem(O,e.toString())),W[e]}const H=function(e){let t=void 0===e.iconCloseUrl||void 0===e.iconOpenUrl;return a.createElement(N.P.div,{id:e.isMobile?"zowieFloatingButtonMobile":"zowieFloatingButton",whileHover:{scale:e.voiceExperienceEnabled?1.05:1},whileTap:{scale:e.voiceExperienceEnabled?.95:1},style:{display:"flex",alignItems:"center",justifyContent:"center",bottom:e.offScreen?"-1000px":e.isMobile?e.position.mobileBottom+"px":e.position.desktopBottom+"px",right:e.isMobile?e.position.mobileRight?e.position.mobileRight+"px":void 0:e.position.desktopRight?e.position.desktopRight+"px":void 0,left:e.isMobile?e.position.mobileLeft?e.position.mobileLeft+"px":void 0:e.position.desktopLeft?e.position.desktopLeft+"px":void 0,boxShadow:t?"0 0px 40px rgba(0, 0, 0, 0.3)":"none",borderRadius:e.voiceExperienceEnabled?"100px":t?e.personalized?"30px":"8px":"none"},"aria-label":"Chat","aria-expanded":e.iconActive,role:"button",tabIndex:"0",onClick:()=>e.onClick(),onMouseEnter:()=>e.onMouseEnter(),onMouseLeave:()=>e.onMouseLeave(),isMobile:e.isMobile,position:e.position,offScreen:e.offScreen},void 0!==e.badge?a.createElement(R,{visible:!e.badgeVisible,isMobile:e.isMobile,value:e.badge}):null,e.iconCloseUrl&&e.iconOpenUrl?e.iconActive?a.createElement("img",{src:e.iconCloseUrl,alt:"Close Icon","aria-hidden":"true"}):a.createElement("img",{src:e.iconOpenUrl,alt:"Open Icon","aria-hidden":"true"}):a.createElement(a.Fragment,null,e.personalized&&e.isProactiveChatActive?a.createElement(a.Fragment,null,e.iconActive?a.createElement("div",{style:{display:"flex",overflow:"hidden",borderRadius:"30px"}},a.createElement(I,{color:e.theme.primaryColor,active:!0})):a.createElement("img",{src:U(),alt:""})):a.createElement(a.Fragment,null,e.voiceExperienceEnabled?a.createElement(T,{color:e.theme.primaryColor,active:e.iconActive}):a.createElement(I,{color:e.theme.primaryColor,active:e.iconActive}))))};var F=i(5072),_=i.n(F),G=i(225),Z={insert:"head",singleton:!1};_()(G.A,Z);G.A.locals;const j="searchTracking",J=[[j,["56d629ea7afc4b13b646fdee72c39ac4","265595cda16a4d5eb1dd340819df6a69","06e47d9dfc034fe3901afb5adfdd3e50","db2ad30789ab49f2a6b457563be01e4b","f196cb3b39f34e65b7c3d18f6ec24d54","265cc3ff3816493290879fef2fb5b1de"]]],Y=e=>{let{featureFlag:t,instanceId:i}=e;return(e=>{let{instanceId:t}=e;return J.reduce(((e,i)=>{let[a,n]=i;return n.includes(t)&&(e[a]=!0),e}),{})})({instanceId:i})[t]||!1},$=e=>{if(e.form){const t=e.form.getAttribute("action");return null!==t&&t.toLowerCase().includes("/search")}return!1},q="ZowieListenerRegistered",Q=e=>{const t=document.querySelectorAll("input, textarea"),i=((e,t)=>{let i;return function(){for(var a=arguments.length,n=new Array(a),o=0;oe(...n)),t)}})(e,1e3);t.forEach((e=>{(e=>{const t=(e,t)=>t&&t.toLowerCase().includes(e);return["search","query","find","szukaj"].some((i=>t(i,e.name)||t(i,e.id)||t(i,e.className)||t(i,e.placeholder)||t(i,e.title)||t(i,e.getAttribute("aria-label"))||t(i,e.type)||$(e)))})(e)&&(e.dataset[q]||(e.addEventListener("input",(e=>{const t=e.target;i(t.value)})),e.dataset[q]="true"))}))};var K=i(6221),X=i(6782),ee=i(961),te=i(9437),ie=i(4922),ae=i(7986);const ne=i.p+"b2c85f53bced5c500eca.png",oe=new ae.Noise(Math.random()),re={blur:{name:"Blur",defaultValue:8,unit:"px",cssName:"blur"},saturate:{name:"Saturate",defaultValue:150,unit:"%",cssName:"saturate"},contrast:{name:"Contrast",defaultValue:130,unit:"%",cssName:"contrast"},brightness:{name:"Brightness",defaultValue:110,unit:"%",cssName:"brightness"},hueRotate:{name:"Hue Rotate",defaultValue:15,unit:"deg",cssName:"hue-rotate"}},se={silence:{baseScale:1},user:{baseScale:.8},agent:{baseScale:1}};function le(e){let{analyser:t,speakingState:i="silence"}=e;const n=(0,a.useRef)(null),o=(0,a.useRef)(null),r=(0,a.useRef)(null),s=(0,a.useRef)(null),l=(0,a.useRef)(null),c=(0,a.useRef)(null),d=(0,a.useRef)(null),h=(0,a.useRef)([]),p=(0,a.useRef)(0),m=(0,a.useRef)(se.silence.baseScale),u=(0,a.useRef)(i),[g,f]=(0,a.useState)({blur:!0,saturate:!1,contrast:!1,brightness:!1,hueRotate:!1});Object.entries(g).filter((e=>{let[,t]=e;return t})).map((e=>{let[t]=e;const i=re[t];return`${i.cssName}(${i.defaultValue}${i.unit})`})).join(" ");return(0,a.useEffect)((()=>{u.current=i}),[i]),(0,a.useEffect)((()=>{if(!n.current)return void console.error("Canvas element not found.");const e=n.current;let i=e.offsetWidth,a=e.offsetHeight;const g=new te.JeP({canvas:e,antialias:!0,alpha:!0});g.setPixelRatio(window.devicePixelRatio),g.setSize(i,a),g.setClearColor(0,0),g.shadowMap.enabled=!1,s.current=g;const f=new ie.Z58;l.current=f;const b=new ie.ubm(100,i/a,.1,1e4);b.position.set(0,0,300),c.current=b;const v=new ie.dth(16777215,0,.5);f.add(v);const x=new ie.ZyN(16748310,.4);x.position.set(0,450,350),f.add(x);const C=new ie.ZyN(16773456,.25);C.position.set(-600,350,350),f.add(C);const w=new ie.ZyN(16773456,.15);w.position.set(0,-250,300),f.add(w);const V=new ie.$p8(16777215,1);f.add(V);const k=new ie.HiM(16777215,.6,500);k.position.set(200,200,200),f.add(k);const y=new ie.HiM(16777215,.6,500);y.position.set(-200,-200,200),f.add(y);const A=i>575?128:64,S=new ie.Gu$(150,A,A),E=[],I=S.attributes.position;for(let t=0;t{console.error(`Failed to load texture '${ne}'. Check import and build process.`)})),R.wrapS=ie.GJx,R.wrapT=ie.GJx,R.flipY=!1}catch(L){console.error("Error initiating texture loading:",L)}let M=null;if(R){const e="\n varying vec3 vNormal;\n varying vec3 vPosition;\n varying vec2 vUv;\n\n void main() {\n vNormal = normalize(normalMatrix * normal);\n vPosition = position;\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n ",t="\n uniform float time;\n uniform sampler2D textureMap;\n varying vec3 vNormal;\n varying vec3 vPosition;\n varying vec2 vUv;\n\n void main() {\n // Apply properly scaled spherical coordinates to avoid distortion\n float u = 0.5 + atan(vPosition.z, vPosition.x) / (2.0 * 3.14159265);\n float v = 0.5 - asin(vPosition.y / length(vPosition)) / 3.14159265;\n\n // Scale coordinates to repeat the texture a few times with animated offset\n float scale = 4.0; // Increased scale for higher texture density\n float animSpeed = 0.05;\n float scaledU = mod(u * scale + time * animSpeed * 0.1, 1.0);\n float scaledV = mod(v * scale - time * animSpeed * 0.05, 1.0);\n\n // Sample texture with scaled coordinates for noise pattern\n vec4 texColor = texture2D(textureMap, vec2(scaledU, scaledV));\n\n // Use position and time to create a smooth pattern for color blending\n float pattern = sin(vPosition.x * 0.02 + time * 0.5) * cos(vPosition.y * 0.02 + time * 0.3);\n // Normalize pattern to 0-1 range for smoother blending\n float normalizedPattern = (pattern + 1.0) * 0.5;\n\n // Define shades of the orange color with more saturation\n vec3 baseOrange = vec3(1.0, 0.45, 0.15); // More saturated orange base\n vec3 lighterOrange = vec3(1.0, 0.6, 0.25); // Brighter orange highlight\n vec3 darkerOrange = vec3(0.95, 0.35, 0.05); // Deep orange for shadows\n\n // Create a smooth gradient between the shades\n vec3 color;\n if (normalizedPattern < 0.5) {\n // Blend between darker and base orange\n float t = normalizedPattern * 2.0; // Scale to 0-1 for first half\n color = mix(darkerOrange, baseOrange, t);\n } else {\n // Blend between base and lighter orange\n float t = (normalizedPattern - 0.5) * 2.0; // Scale to 0-1 for second half\n color = mix(baseOrange, lighterOrange, t);\n }\n\n // Add bright highlights based on viewing angle\n float fresnel = pow(1.0 - abs(dot(vNormal, vec3(0.0, 0.0, 1.0))), 3.0);\n vec3 highlightColor = vec3(1.0, 0.85, 0.5); // Yellow-orange tinted highlight\n\n // Convert texture color to brightness value\n float brightness = dot(texColor.rgb, vec3(0.299, 0.587, 0.114));\n\n // Create more detailed texture by mixing multiple noise scales\n float detailNoise = dot(\n texture2D(textureMap, vec2(scaledU * 1.5, scaledV * 1.5)).rgb,\n vec3(0.299, 0.587, 0.114)\n );\n\n // Combine different noise scales for more detail\n brightness = mix(brightness, detailNoise, 0.3);\n\n // Use the colorful noise texture for color variation\n vec3 noiseColor = mix(\n darkerOrange * 0.9, // Dark base\n lighterOrange * 1.25, // Bright highlights\n brightness // Use brightness for main variation\n );\n\n // Add a subtle color tint from the actual texture color but keep orange dominant\n noiseColor = mix(\n noiseColor, // Orange-based noise color\n texColor.rgb * vec3(1.3, 0.7, 0.3), // Stronger orange tint from texture\n 0.25 // Increased influence for more texture detail (25%)\n );\n\n // Blend base orange gradient with noise-based coloring\n vec3 blendedColor = mix(\n color, // Base orange gradient\n noiseColor, // Noise-based coloring with subtle color variation\n 0.8 // 80% noise influence for more texture\n );\n\n // Add the fresnel highlights\n vec3 finalColor = mix(blendedColor, highlightColor, fresnel * 0.6);\n\n gl_FragColor = vec4(finalColor, 0.95); // Use 0.95 alpha for slight transparency\n }\n ";M=new ie.BKk({uniforms:{time:{value:0},textureMap:{value:R}},vertexShader:e,fragmentShader:t,side:ie.$EB,transparent:!0})}else M=new ie.V9B({color:16748310,wireframe:!0,transparent:!0,opacity:.5}),console.log("Texture not available (yet?), using fallback wireframe material.");const P=new ie.eaF(S,M);f.add(P),d.current=P;const z=e=>{if(o.current=requestAnimationFrame(z),(e=>{if(!d.current||!h.current||0===h.current.length)return;const i=d.current,a=i.geometry,n=i.material,o=h.current;n instanceof ie.BKk&&(n.uniforms.time.value=.001*e);let r=0;if(t&&t instanceof AnalyserNode&&"agent"===u.current)try{const e=new Uint8Array(t.frequencyBinCount);t.getByteFrequencyData(e);const i=e.reduce(((e,t)=>e+t),0)/e.length;r=Math.min(i/128,1)}catch(L){console.error("Error getting analyser data:",L),r=0}else r=0;p.current=.95*p.current+.05*r;const s=a.attributes.position;for(let t=0;t.01&&(d=.25*p.current);const h=r*n*.175,m=Math.max(.1,l+c+d+h);s.setXYZ(t,i.x*m,i.y*m,i.z*m)}s.needsUpdate=!0,i.rotation.y+=.002,i.rotation.x+=.001})(e),s.current&&l.current&&c.current&&d.current){const e=se[u.current]?.baseScale||se.silence.baseScale,t=.05;m.current=ie.cj9.lerp(m.current,e,t),d.current.scale.set(m.current,m.current,m.current),s.current.render(l.current,c.current)}};o.current=requestAnimationFrame(z);const D=()=>{if(!n.current||!s.current||!c.current)return;const e=n.current.parentElement;if(!e)return;const t=e.offsetWidth,i=e.offsetHeight;n.current.style.width=`${t}px`,n.current.style.height=`${i}px`,c.current.aspect=t/i,c.current.updateProjectionMatrix(),s.current.setSize(t,i)},B=()=>{r.current&&clearTimeout(r.current),r.current=window.setTimeout(D,200)};return D(),window.addEventListener("resize",B),()=>{window.removeEventListener("resize",B),o.current&&cancelAnimationFrame(o.current),r.current&&clearTimeout(r.current),s.current&&s.current.dispose(),d.current&&(d.current.geometry&&d.current.geometry.dispose(),d.current.material&&(d.current.material instanceof ie.BKk&&d.current.material.uniforms.textureMap.value&&d.current.material.uniforms.textureMap.value.dispose(),Array.isArray(d.current.material)?d.current.material.forEach((e=>e.dispose())):d.current.material.dispose())),l.current=null,c.current=null,s.current=null,d.current=null,h.current=[]}}),[t]),a.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},a.createElement(N.P.canvas,{ref:n,initial:{opacity:0,scale:1},animate:{opacity:1},transition:{opacity:{duration:.8,ease:"easeInOut"}},id:"blob-canvas",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",display:"block",zIndex:0}}),a.createElement("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:1,backdropFilter:"blur(8px) saturate(150%)",WebkitBackdropFilter:"blur(8px) saturate(150%)",maskImage:"linear-gradient(to top, black 10%, transparent 100%)",WebkitMaskImage:"linear-gradient(to top, black 10%, transparent 100%)",pointerEvents:"none"}}))}const ce=i.p+"3e236d5ac46fda5a6a49.svg",de=i.p+"52e2bd2d6690523d227c.svg",he=i.p+"d667b60fe44d30d0a354.svg",pe=i.p+"6be67d0a82ac8d07c9be.svg",me=e=>{let{imageUrl:t,rating:i,category:n,title:o,price:r,shopUrl:s}=e;return a.createElement("div",{style:{position:"relative",display:"flex",flexDirection:"row",alignItems:"center",width:"320px",borderRadius:"10px",backgroundColor:"#fff",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)",overflow:"hidden",fontFamily:"Segoe UI, Avenir Next, Helvetica, Arial",padding:"8px",gap:"12px"}},t&&a.createElement("div",{style:{width:"100px",height:"100px",flexShrink:0}},a.createElement("img",{src:t,alt:o,style:{width:"100%",height:"100%",borderRadius:"8px",objectFit:"cover"}})),a.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"4px",flexGrow:1}},n&&a.createElement("div",{style:{fontSize:"14px",color:"#999"}},n),o&&a.createElement("div",{style:{fontSize:"16px",fontWeight:"500",color:"#333"}},o),r&&a.createElement("div",{style:{fontSize:"16px",color:"#333"}},r)),i&&a.createElement("div",{style:{position:"absolute",top:"8px",right:"8px",backgroundColor:"#fff",borderRadius:"999px",border:"1px solid #f1f1f1",padding:"4px 8px",display:"flex",alignItems:"center",justifyContent:"center"}},a.createElement("span",{style:{color:"#FBBF24",marginRight:"4px",marginTop:"1px"}},a.createElement("img",{src:he,alt:"Star Icon",style:{width:"14px"}})),a.createElement("span",{style:{fontSize:"14px",fontWeight:500}},i)),s&&a.createElement("div",{style:{position:"absolute",right:"8px",bottom:"4px"}},a.createElement("a",{href:s,style:{color:"#888"}},a.createElement("img",{src:pe,alt:"Arrow Icon",style:{width:"24px"}}))))},ue={visible:{transition:{staggerChildren:.2}},hidden:{transition:{staggerDirection:-1}},exit:{opacity:0}},ge={visible:{opacity:1,y:0,transition:{duration:.3}},hidden:{opacity:0,y:20},exit:{opacity:0,transition:{duration:0}}},fe=e=>{let{items:t,renderItem:i,listTitle:n,onItemClick:o}=e;return a.createElement(N.P.div,{style:{fontFamily:"Segoe UI, Avenir Next, Helvetica, Arial",display:"flex",flexDirection:"column",gap:"8px",marginTop:"12px",fontSize:"14px",fontWeight:500},variants:ue,initial:"hidden",animate:"visible",exit:"exit",layout:!0},n&&a.createElement(N.P.p,{style:{textAlign:"center"},initial:{opacity:0},animate:{opacity:1},transition:{duration:.3}},n),t.map(((e,t)=>{const n=i(e),r=o&&e.onClickMessage,s=()=>{r?o(e.onClickMessage):o&&!e.onClickMessage&&console.warn("onItemClick handler provided but itemData.onClickMessage is missing for item:",e)},l=a.cloneElement(n,{onCardClick:r?s:void 0});return a.createElement(N.P.div,{key:e.id||t,style:{width:"100%",cursor:r?"pointer":"default"},variants:ge,whileHover:r?{scale:1.02}:{},whileTap:r?{scale:.98}:{},onClick:r?s:void 0},l)})))},be=e=>{let{title:t,items:i,onClick:n}=e;return a.createElement(fe,{items:i,renderItem:e=>a.createElement(me,e),listTitle:t,onItemClick:n})},ve=i.p+"c1c3004d3bd720a94b21.svg",xe=e=>{let{date:t,time:i}=e;return a.createElement("div",{style:{display:"flex",alignItems:"center",width:"320px",height:"40px",borderRadius:"8px",backgroundColor:"#fff",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.08)",fontFamily:"Segoe UI, Avenir Next, Helvetica, Arial",padding:"8px 12px",gap:"10px"}},a.createElement("img",{src:ve,alt:"Calendar Icon",style:{width:"20px",height:"20px",flexShrink:0}}),t&&a.createElement("div",{style:{fontSize:"14px",color:"#333",fontWeight:500}},t),i&&a.createElement("div",{style:{fontSize:"14px",color:"#555",marginLeft:"auto"}},i))},Ce=e=>{let{isVisible:t,items:i,title:n}=e;return a.createElement(fe,{isVisible:t,items:i,renderItem:e=>a.createElement(xe,e),listTitle:n})},we=i.p+"5f0ed50bd498e67bba0f.svg";var Ve=i(5084);const ke=i.p+"73c53b1ee50eadae1872.svg",ye=i.p+"7249d34099daa825460e.svg",Ae={enter:e=>({x:e>0?300:-300,opacity:0}),center:{zIndex:1,x:0,opacity:1},exit:e=>({zIndex:0,x:e<0?300:-300,opacity:0})},Se=(e,t)=>({position:"absolute",top:"50%",transform:"translateY(-50%)",[e]:"8px",backgroundColor:"rgba(0, 0, 0, 0.4)",border:"none",borderRadius:"50%",width:"30px",height:"30px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:2,padding:0,opacity:t?1:0,transition:"opacity 0.2s ease-in-out",pointerEvents:t?"auto":"none","> img":{filter:"brightness(0) invert(1)"}}),Ee={position:"absolute",bottom:"8px",left:"50%",transform:"translateX(-50%)",display:"flex",zIndex:2},Ie=e=>({width:"8px",height:"8px",borderRadius:"50%",backgroundColor:e?"rgba(255, 255, 255, 0.9)":"rgba(255, 255, 255, 0.5)",margin:"0 3px",transition:"background-color 0.3s ease"}),Te=e=>{let{imageUrls:t,altTextPrefix:i="Image",containerHeight:n="220px",containerWidth:o="100%",autoAdvanceDelay:r=3e3,onImageClick:s,objectFit:l="cover"}=e;const[c,d]=(0,a.useState)(0),[h,p]=(0,a.useState)(1),[m,u]=(0,a.useState)(!1),g=(0,a.useRef)(null),[f,b]=(0,a.useState)(!1),v=Array.isArray(t)?t:t?[t]:[],x=v.length,C=e=>{m||u(!0),g.current&&(clearInterval(g.current),g.current=null),p(e),d((t=>(t+e+x)%x))},w=()=>{m||x<=1||!r||r<=0?g.current&&(clearInterval(g.current),g.current=null):(g.current&&clearInterval(g.current),g.current=setInterval((()=>{m?g.current&&(clearInterval(g.current),g.current=null):(p(1),d((e=>(e+1)%x)))}),r))};(0,a.useEffect)((()=>(w(),()=>{g.current&&clearInterval(g.current)})),[x,m,r]);return a.createElement("div",{onMouseEnter:()=>{b(!0),g.current&&r>0&&(clearInterval(g.current),g.current=null)},onMouseLeave:()=>{b(!1),!m&&r>0&&x>1&&w()},style:{position:"relative",width:o,height:n,overflow:"hidden",borderRadius:"8px"}},a.createElement(Ve.N,{initial:!1,custom:h},v.length>0&&a.createElement(N.P.img,{key:c,src:v[c],alt:`${i} ${c+1}`,custom:h,variants:Ae,initial:"enter",animate:"center",exit:"exit",transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}},style:{position:"absolute",width:"100%",height:"100%",objectFit:l,backgroundColor:"#f7f7f7",cursor:s?"pointer":"default"},drag:"x",dragConstraints:{left:0,right:0},dragElastic:1,onDragEnd:(e,t)=>{let{offset:i,velocity:a}=t;const n=((e,t)=>Math.abs(e)*t)(i.x,a.x);n<-1e4?C(1):n>1e4&&C(-1)},onClick:()=>{return e=c,void(s&&s(e));var e}}),0===v.length&&a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#f7f7f7",color:"#888",fontSize:"14px"}},"No image available")),x>1&&a.createElement(a.Fragment,null,a.createElement("button",{onClick:e=>{e.stopPropagation(),C(-1)},style:Se("left",f),"aria-label":"Previous image"},a.createElement("img",{src:ke,alt:"Previous",width:16,height:16})),a.createElement("button",{onClick:e=>{e.stopPropagation(),C(1)},style:Se("right",f),"aria-label":"Next image"},a.createElement("img",{src:ye,alt:"Next",width:16,height:16})),a.createElement("div",{style:Ee},v.map(((e,t)=>a.createElement("div",{key:t,style:Ie(c===t)}))))))},Re=e=>{let{imageUrls:t,rating:i,reviews:n,name:o,labels:r,price:s,dates:l,url:c}=e;return a.createElement("div",{style:{position:"relative",width:"340px",height:"320px",borderRadius:"10px",backgroundColor:"#fff",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)",overflow:"hidden",fontFamily:"Segoe UI, Avenir Next, Helvetica, Arial",padding:"8px",display:"flex",flexDirection:"column",gap:"8px"}},a.createElement("div",{style:{position:"relative",width:"100%",height:"220px",flexShrink:0}},a.createElement(Te,{imageUrls:t,altTextPrefix:o||"Booking image",containerHeight:"100%",containerWidth:"100%"}),i&&a.createElement("div",{style:{position:"absolute",top:"8px",right:"8px",backgroundColor:"#fff",borderRadius:"999px",border:"1px solid #e0e0e0",padding:"4px 8px",display:"flex",alignItems:"center",gap:"4px",fontSize:"14px",fontWeight:500,zIndex:3}},a.createElement("img",{src:we,alt:"Star",style:{width:"14px",height:"14px"}}),a.createElement("span",null,i),n&&a.createElement("span",{style:{color:"#666",marginLeft:"2px"}},"(",n,")"))),a.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"6px",flexGrow:1,padding:"0 4px"}},o&&a.createElement("div",{style:{fontSize:"18px",fontWeight:"500",color:"#333"}},o),r&&r.length>0&&a.createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:"6px"}},r.map(((e,t)=>a.createElement("div",{key:t,style:{backgroundColor:"#fff",borderRadius:"999px",border:"1px solid #e0e0e0",padding:"4px 10px",fontSize:"12px",color:"#555",whiteSpace:"nowrap"}},e)))),a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:"auto"}},a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"6px",fontSize:"14px",color:"#444"}},s&&a.createElement("span",null,s),s&&l&&a.createElement("span",{style:{color:"#999",padding:"0 2px"}},"\u2022"),l&&a.createElement("span",null,l)),c&&a.createElement("a",{href:c,target:"_blank",rel:"noopener noreferrer",style:{color:"#888",display:"flex",alignItems:"center"},title:"Go to booking"},a.createElement("img",{src:pe,alt:"Arrow",style:{width:"24px",height:"24px"}})))))},Me=e=>{let{title:t,data:i}=e;return a.createElement(fe,{listTitle:t,items:[i],renderItem:e=>a.createElement(Re,{key:e.id,imageUrls:e.imageUrls,rating:e.rating,reviews:e.reviews,name:e.name,labels:e.labels,price:e.price,dates:e.dates,url:e.url})})},Pe=e=>{let{discountAmount:t,totalAmount:i}=e;return a.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"8px",padding:"12px",marginTop:"8px",backgroundColor:"#fff",borderRadius:"10px",border:"1px solid #eee",boxSizing:"border-box"}},a.createElement("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"14px",color:"#666"}},a.createElement("span",null,"Discount"),a.createElement("span",null,t)),a.createElement("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"16px",fontWeight:"600",color:"#333"}},a.createElement("span",null,"Total"),a.createElement("span",null,i)))},ze=e=>{let{title:t,items:i,discountAmount:n,totalAmount:o}=e;const r=[...i,{id:"cart-summary",type:"summary",discountAmount:n,totalAmount:o}];return a.createElement(fe,{items:r,renderItem:e=>"summary"===e.type?a.createElement(Pe,e):a.createElement(me,e),listTitle:t})},De=e=>e||"$0.00",Be={smallCard:{width:"360px",paddingTop:"12px",marginTop:"12px",paddingBottom:"12px",paddingLeft:"16px",paddingRight:"16px",backgroundColor:"#fff",borderRadius:"12px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",fontFamily:"'Segoe UI', 'Avenir Next', Helvetica, Arial, sans-serif",display:"flex",flexDirection:"column",color:"#333",boxSizing:"border-box",gap:"4px"},card:{width:"360px",minHeight:"200px",maxHeight:"80vh",overflow:"hidden",borderRadius:"12px",backgroundColor:"#fff",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",fontFamily:"'Segoe UI', 'Avenir Next', Helvetica, Arial, sans-serif",display:"flex",flexDirection:"column",color:"#333",boxSizing:"border-box"},contentWrapper:{padding:"8px 0",display:"flex",flexDirection:"column",gap:"6px",overflowY:"auto",flexGrow:1,minHeight:0},orderNumber:{fontSize:"13px",fontWeight:"600",color:"#555",whiteSpace:"nowrap",padding:"0 16px"},statusBadge:{fontSize:"12px",fontWeight:"600",color:"#fff",padding:"4px 0",whiteSpace:"nowrap",width:"100%",textAlign:"center",flexShrink:0,boxSizing:"border-box",borderBottomLeftRadius:"12px",borderBottomRightRadius:"12px"},carouselContainer:{width:"calc(100% - 16px)",height:"100%",borderRadius:"8px",overflow:"hidden",backgroundColor:"#f0f0f0",flexShrink:0,marginBottom:"6px",marginLeft:"8px",marginRight:"8px"},section:{display:"flex",flexDirection:"column",fontSize:"12px"},sectionContent:{paddingTop:"6px",borderTop:"1px solid #eee",display:"flex",flexDirection:"column",gap:"8px",marginLeft:"16px",marginRight:"16px"},sectionTitle:{fontWeight:"600",color:"#666",marginBottom:"4px"},itemDetail:{display:"flex",justifyContent:"space-between",alignItems:"center",color:"#444"},itemText:{flex:"1",marginRight:"8px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},itemPrice:{fontWeight:"500",whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:"4px"},quantityBadge:{display:"inline-block",backgroundColor:"#eee",borderRadius:"4px",padding:"2px 3px",minWidth:"1em",textAlign:"center",marginRight:"4px",fontSize:"11px",color:"#555",lineHeight:"1.2"},infoSection:{display:"flex",flexWrap:"wrap",gap:"10px",padding:"0 16px"},infoItem:{display:"flex",flexDirection:"row",alignItems:"center",lineHeight:"1.4",border:"1px solid #eee",borderRadius:"999px",padding:"1px 5px",gap:"4px",fontSize:"12px"},infoCaption:{color:"#777",fontWeight:"400"},infoValue:{color:"#333"},summaryLine:{display:"flex",justifyContent:"space-between",color:"#555",lineHeight:"1.5"},smallCardTitle:{fontSize:"11px",fontWeight:"600",color:"#666",marginBottom:"2px"},smallCardValue:{fontSize:"12px",color:"#333",lineHeight:"1.4"}},Le=e=>{let{data:t}=e;if(!t)return null;const{title:i="Order Status",orderNumber:n,items:o=[],labels:r=[],cards:s=[],subtotalAmount:l,shippingAmount:c,discountAmount:d,taxAmount:h,totalAmount:p,status:m}=t,u=o?.map((e=>e.imageUrl)).filter(Boolean)||[],g=o?.[0]?.title||"Order item";return a.createElement("div",null,a.createElement("div",{style:Be.card},a.createElement("div",{style:Be.contentWrapper},u.length>0&&a.createElement("div",{style:Be.carouselContainer},a.createElement(Te,{imageUrls:u,altTextPrefix:g,containerHeight:"160px",containerWidth:"100%",objectFit:"scale-down"})),n&&a.createElement("span",{style:Be.orderNumber},n),r.length>0&&a.createElement("div",{style:Be.infoSection},[...r].map(((e,t)=>a.createElement("div",{key:t,style:Be.infoItem},a.createElement("span",{style:Be.infoCaption},e.caption),a.createElement("span",{style:Be.infoValue},e.value))))),o.length>0&&a.createElement("div",{style:Be.section},a.createElement("div",{style:Be.sectionContent}," ",o.map(((e,t)=>a.createElement("div",{key:t,style:Be.itemDetail},a.createElement("span",{style:Be.itemText},e.title),a.createElement("div",{style:Be.itemPrice},a.createElement("span",{style:Be.quantityBadge},e.quantity),a.createElement("span",null," x "),De(e.price))))))),a.createElement("div",{style:Be.section},a.createElement("div",{style:Be.sectionContent}," ",p&&"$0.00"!==De(p)&&a.createElement("div",{style:Be.summaryLine},a.createElement("span",null,"Total price"),a.createElement("span",null,De(p))))))," ",m&&m.label&&a.createElement("span",{style:{...Be.statusBadge,backgroundColor:m.color||"#777"}},m.label)),(()=>{const e=s?.find((e=>"Shipping address"===e.caption));return e?a.createElement("div",{style:Be.smallCard},a.createElement("span",{style:Be.smallCardTitle},"Shipping Address"),a.createElement("span",{style:Be.smallCardValue},e.value)):null})())},Ne=e=>{let{title:t,data:i}=e;return a.createElement(fe,{listTitle:t,items:[i],renderItem:e=>a.createElement(Le,{data:e})})},Oe=e=>{let{titleLeft:t,titleRight:i,subtitleLeft:n,subtitleRight:o}=e;const r={display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"},s={fontSize:"14px",color:"#333",fontWeight:500},l={fontSize:"12px",color:"#555",fontWeight:400},c=t||i,d=n||o;return a.createElement("div",{style:{display:"flex",flexDirection:"column",width:"320px",minHeight:"40px",borderRadius:"8px",backgroundColor:"#fff",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.08)",fontFamily:"Segoe UI, Avenir Next, Helvetica, Arial",padding:"8px 12px",gap:"4px"}},c&&a.createElement("div",{style:r},t&&a.createElement("span",{style:s},t),i&&a.createElement("span",{style:s},i)),d&&a.createElement("div",{style:r},n&&a.createElement("span",{style:l},n),o&&a.createElement("span",{style:l},o)))},We=e=>{let{items:t,title:i,onClick:n}=e;return a.createElement(fe,{items:t,renderItem:e=>a.createElement(Oe,e),listTitle:i,onItemClick:n})},Ue=window&&window._chatbotize_env_&&window._chatbotize_env_.REACT_APP_VOICE_WEBSOCKET,He={title:"The Cottages Hotel",labels:["2 guests","1 bedroom","breakfast included"],price:"$980",dates:"13th - 18th April",url:"https://www.booking.com/Share-XkHBRjE",imageUrls:["https://cf.bstatic.com/xdata/images/hotel/max1024x768/489590370.jpg?k=c85297c5ade9d46ef41a66e3e63af4fc64cc92a6235fd63760e5b28f927ef9a7&o=","https://cf.bstatic.com/xdata/images/hotel/max1280x900/489590226.jpg?k=604d3aaf4b14be96554d3aee53e2293f94f33f76ceeab3af8c63f55e1fac0fc1&o=&hp=1","https://cf.bstatic.com/xdata/images/hotel/max1280x900/489590345.jpg?k=f20350d57c567c863cdee06e07a2e9e02df0af980f96ff3b5e97ffa1b4632c59&o=&hp=1"],rating:"4.9",reviews:"326",onClickMessage:"Book The Cottages Hotel"},Fe={title:"Recent Orders",items:[{id:"order1",titleLeft:"#ORD-1123",titleRight:"Amount",subtitleLeft:"2024-07-28",subtitleRight:"$150.00",onClickMessage:"Show details for order #ORD-1123"},{id:"order2",titleLeft:"#ORD-1124",titleRight:"Amount",subtitleLeft:"2024-07-29",subtitleRight:"$85.50"},{id:"order3",titleLeft:"#ORD-1125",titleRight:"Amount",subtitleLeft:"2024-07-30",subtitleRight:"$210.75",onClickMessage:"Show details for order #ORD-1125"}]},_e={title:"Your Order Status",orderNumber:"#825832",items:[{title:"Aluminum Carry-On Plus",imageUrl:"https://monos.com/cdn/shop/files/PDP_1_Luggage_Aluminum_CarryOnPlus_ChampagneGold_Front_2048x.jpg?v=1741909878",price:"$665",quantity:1,onClickMessage:"Tell me more about the Aluminum Carry-On Plus"},{title:"Aluminum Check-In Medium",category:"Aluminum Collection",imageUrl:"https://monos.com/cdn/shop/files/PDP_1_Luggage_Aluminum_CheckInM_ChampagneGold_Front_2048x.jpg?v=1741909726",price:"$725",quantity:3,onClickMessage:"Tell me more about the Aluminum Check-In Medium"},{title:"Aluminum Check-In Large",category:"Aluminum Collection",imageUrl:"https://monos.com/cdn/shop/files/PDP_1_Luggage_Aluminum_CheckInL_ChampagneGold_Front_2048x.jpg?v=1741927341",price:"$755",quantity:2,onClickMessage:"Tell me more about the Aluminum Check-In Large"}],labels:[{caption:"Created at:",value:"1/10/25"},{caption:"Shipped at:",value:"4/10/25"}],cards:[{caption:"Shipping address",value:"1759 Andell Road, Westerville, OH 43081"},{caption:"Billing address",value:"5 S 5th, Brooklyn, NY 11249"}],subtotalAmount:"$320.00",shippingAmount:"$20.00",discountAmount:"$20.00",taxAmount:"$20.00",totalAmount:"$869.00",status:{label:"Delivered",color:"#17b92b"},cartData:null,orderStatusData:null,accommodationData:null},Ge={id:1,title:"Product recommendations",items:[{id:1,imageUrl:"https://lw-cdn.com/images/53950A87AD8F/k_a0e5ea2e6a5d878732b1d56174aed6eb;w_805;h_805;q_90/8603002.webp",rating:"4.8",category:"Example category A",title:"Portable Lamp A",price:"$59.00",shopUrl:"#product1",onClickMessage:"Add Portable Lamp A to cart"},{id:2,imageUrl:"https://lw-cdn.com/images/8912F4844646/k_ed8e06efc6301e9d56d4ad617918084a;w_1600;h_1600;q_90/2616465.webp",rating:"4.5",category:"Example category B",title:"Classic Lamp B",price:"$79.00",shopUrl:"#product2",onClickMessage:"Add Classic Lamp B to cart"}]};class Ze extends a.Component{state={analyserNode:null,isStreaming:!1,isMicActive:!0,isSpeechActive:!1,cardProducts:null,cardTimeSlots:null,cartData:null,orderStatusData:null,accommodationData:null,customListData:null,currentSpeakingState:"silence",shadowRootContainer:null};audioContextRef=(()=>a.createRef())();inputAudioContextRef=(()=>a.createRef())();inputMicStreamRef=(()=>a.createRef())();socketRef=(()=>a.createRef())();activeSourcesRef=(()=>a.createRef())();nextPlayTimeRef=(()=>a.createRef())();agentSpeechEndTimerRef=(()=>a.createRef())();agentSpeechBackupTimerRef=(()=>a.createRef())();shadowHostRef=(()=>a.createRef())();constructor(e){super(e),this.audioContextRef.current=null,this.inputAudioContextRef.current=null,this.inputMicStreamRef.current=null,this.socketRef.current=null,this.activeSourcesRef.current=new Set,this.agentSpeechBackupTimerRef.current=null,this.handleCardClick=this.handleCardClick.bind(this),this.state={...this.state,isMicActive:void 0===e.isMicActiveOnStart||e.isMicActiveOnStart}}componentDidMount(){const e=document.getElementById("test");if(e&&(e.onclick=()=>{this.socketRef.current&&this.socketRef.current.readyState===WebSocket.OPEN?this.socketRef.current.send("Say hello to me please!"):console.warn("WebSocket not open, cannot send test message.")}),this.shadowHostRef.current&&!this.shadowHostRef.current.shadowRoot){const e=this.shadowHostRef.current.attachShadow({mode:"open"}),t=document.createElement("div");t.style.width="100%",t.style.height="100%",t.style.position="relative",e.appendChild(t),this.setState({shadowRootContainer:t})}this.activeSourcesRef.current=new Set,this.startSocket()}componentWillUnmount(){this.socketRef.current&&(this.socketRef.current.close(),this.socketRef.current=null),this.audioContextRef.current&&this.audioContextRef.current.close().then((()=>{this.audioContextRef.current=null})),this.stopStreaming(),this.agentSpeechEndTimerRef.current&&clearTimeout(this.agentSpeechEndTimerRef.current),this.agentSpeechBackupTimerRef.current&&clearTimeout(this.agentSpeechBackupTimerRef.current)}setupAudioResources=async()=>{if(console.log("Attempting to set up audio resources..."),this.inputAudioContextRef.current){if("suspended"===this.inputAudioContextRef.current.state)try{await this.inputAudioContextRef.current.resume(),console.log("Resumed existing Input AudioContext.")}catch(t){return console.error("Failed to resume Input AudioContext:",t),alert("Failed to resume audio context. Check console."),!1}try{await this.inputAudioContextRef.current.audioWorklet.addModule(new URL(i(9765),i.b))}catch(t){console.warn("Error checking/re-adding worklet on reused context:",t)}}else try{const e=new(window.AudioContext||window.webkitAudioContext)({sampleRate:24e3});this.inputAudioContextRef.current=e,await e.audioWorklet.addModule(new URL(i(9765),i.b)),console.log("Input AudioContext and worklet loaded.")}catch(t){return console.error("Error during Input AudioContext creation or loading worklet:",t),alert("Error initializing audio processor. Check console for details."),this.inputAudioContextRef.current&&await this.inputAudioContextRef.current.close().catch(console.error),this.inputAudioContextRef.current=null,!1}const e=this.inputAudioContextRef.current;if(!e)return console.error("Input AudioContext is null after setup attempts."),alert("Failed to initialize audio system."),!1;console.log("Requesting microphone access...");try{const t=await navigator.mediaDevices.getUserMedia({audio:!0});console.log("Microphone access granted."),this.inputMicStreamRef.current=t;const a=e.createMediaStreamSource(t);console.log("Creating AudioWorkletNode mic-processor...");const n=new AudioWorkletNode(e,"mic-processor");console.log("AudioWorkletNode created."),console.log("Connecting audio nodes: source -> audioNode"),a.connect(n),n.port.onmessage=e=>{this.state.isMicActive&&this.socketRef.current&&this.socketRef.current.readyState===WebSocket.OPEN&&this.socketRef.current.send(e.data)};const o=await i.e(937).then(i.t.bind(i,6937,23));return(await o.MicVAD.new({stream:t,model:"v5",redemptionFrames:30,onSpeechStart:()=>{console.log("onSpeechStart"),this.state.isMicActive&&(this.socketRef.current&&this.socketRef.current.readyState===WebSocket.OPEN&&this.socketRef.current.send(JSON.stringify({event:"speech_started"})),this.setState({isSpeechActive:!0,currentSpeakingState:"user"}),this.agentSpeechEndTimerRef.current&&clearTimeout(this.agentSpeechEndTimerRef.current),this.agentSpeechBackupTimerRef.current&&clearTimeout(this.agentSpeechBackupTimerRef.current),this.stopAllPlayback())},onSpeechEnd:e=>{console.log("onSpeechEnd"),this.state.isMicActive&&(this.socketRef.current&&this.socketRef.current.readyState===WebSocket.OPEN&&this.socketRef.current.send(JSON.stringify({event:"speech_finished"})),this.setState({isSpeechActive:!1,currentSpeakingState:"silence"}))}})).start(),console.log("VAD started."),console.log("Audio resources setup complete."),!0}catch(a){return console.error("Error getting user media or setting up input/VAD:",a),alert("Could not access microphone. Please check permissions."),await this.stopStreaming(),!1}};startSocket=async()=>{const{instanceId:e,conversationId:t}=this.props,i=Ue+"/instances/"+e+"/conversations/"+t;if(!await this.setupAudioResources())return void console.error("Failed to set up audio resources. Aborting WebSocket connection.");try{const e=new(window.AudioContext||window.webkitAudioContext)({sampleRate:24e3});this.audioContextRef.current=e,this.nextPlayTimeRef.current=e.currentTime;const t=e.createAnalyser();t.fftSize=256,t.connect(e.destination),this.setState({analyserNode:t}),console.log("Playback AudioContext and Analyser setup complete.")}catch(n){return console.error("Failed to create playback AudioContext or Analyser:",n),void alert("Error initializing audio playback system. Check console.")}console.log("Attempting to establish WebSocket connection...");const a=new WebSocket(i);a.binaryType="arraybuffer",this.socketRef.current=a,a.onopen=()=>{console.log("WebSocket connection opened."),this.setState({isStreaming:!0})},a.onmessage=e=>{if("string"===typeof e.data){const t=JSON.parse(e.data);let i={};if(i=void 0!==t.voicewidgetCart&&null!==t.voicewidgetCart&&"null"!==t.voicewidgetCart?{cartData:JSON.parse(t.voicewidgetCart),cardProducts:null,cardTimeSlots:null,orderStatusData:null,accommodationData:null,customListData:null}:void 0!==t.voicewidgetProducts&&null!==t.voicewidgetProducts&&"null"!==t.voicewidgetProducts?{cardProducts:JSON.parse(t.voicewidgetProducts),cartData:null,cardTimeSlots:null,orderStatusData:null,accommodationData:null,customListData:null}:void 0!==t.voicewidgetTimeSlots&&null!==t.voicewidgetTimeSlots&&"null"!==t.voicewidgetTimeSlots?{cardTimeSlots:JSON.parse(t.voicewidgetTimeSlots),cardProducts:null,cartData:null,orderStatusData:null,accommodationData:null,customListData:null}:void 0!==t.voicewidgetOrder&&null!==t.voicewidgetOrder&&"null"!==t.voicewidgetOrder?{orderStatusData:JSON.parse(t.voicewidgetOrder),cardProducts:null,cardTimeSlots:null,cartData:null,accommodationData:null,customListData:null}:void 0!==t.voicewidgetAccomodation&&null!==t.voicewidgetAccomodation&&"null"!==t.voicewidgetAccomodation?{accommodationData:JSON.parse(t.voicewidgetAccomodation),cardProducts:null,cardTimeSlots:null,cartData:null,orderStatusData:null,customListData:null}:void 0!==t.voicewidgetCustomList&&null!==t.voicewidgetCustomList&&"null"!==t.voicewidgetCustomList?{customListData:JSON.parse(t.voicewidgetCustomList),cardProducts:null,cardTimeSlots:null,cartData:null,orderStatusData:null,accommodationData:null}:{cardProducts:null,cardTimeSlots:null,cartData:null,orderStatusData:null,accommodationData:null,customListData:null},void 0!==t.voicewidgetAddToCartAction&&null!==t.voicewidgetAddToCartAction&&"null"!==t.voicewidgetAddToCartAction){const e=JSON.parse(t.voicewidgetAddToCartAction);if(console.log("Zowie - Add To Cart Received: ",e),"shopify_cart"===e.mechanism&&window.Shopify){let t={items:[{id:Number(e.payload.variantId),quantity:1}]};console.log("Zowie - Add To Cart via Shopify: ",t),fetch(window.Shopify.routes.root+"cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then((t=>{window.location.replace(e.payload.redirect)})).catch((e=>{console.error("Error:",e)}))}}if(void 0!==t.voicewidgetRedirectAction&&null!==t.voicewidgetRedirectAction&&"null"!==t.voicewidgetRedirectAction){const e=JSON.parse(t.voicewidgetRedirectAction);console.log("Zowie - Redirect Received: ",e),setTimeout((function(){window.location.replace(e.payload.url)}),e.payload.timeout)}Object.keys(i).length>0&&this.setState(i)}else if(e.data instanceof ArrayBuffer){if(!this.audioContextRef.current||!this.state.analyserNode)return;this.agentSpeechEndTimerRef.current&&clearTimeout(this.agentSpeechEndTimerRef.current),this.agentSpeechBackupTimerRef.current&&clearTimeout(this.agentSpeechBackupTimerRef.current),this.state.isSpeechActive||this.setState({currentSpeakingState:"agent"});const t=this.audioContextRef.current,i=this.state.analyserNode,a=function(e){const t=new Int16Array(e),i=new Float32Array(t.length);for(let a=0;a{if(!this.state.isSpeechActive&&"agent"===this.state.currentSpeakingState){try{window.parent.postMessage({type:"AI_AGENT_STOPPED_SPEAKING",timestamp:Date.now()},"*")}catch(e){console.warn("Failed to send postMessage to parent:",e)}this.setState({currentSpeakingState:"silence"})}}),d),o.onended=()=>{if(o.disconnect(),r.disconnect(),this.activeSourcesRef.current.delete(c),0===this.activeSourcesRef.current.size){this.agentSpeechBackupTimerRef.current&&clearTimeout(this.agentSpeechBackupTimerRef.current);try{window.parent.postMessage({type:"AI_AGENT_STOPPED_SPEAKING",timestamp:Date.now()},"*")}catch(e){console.warn("Failed to send postMessage to parent:",e)}this.audioContextRef.current&&"running"===this.audioContextRef.current.state&&!this.state.isSpeechActive&&(this.agentSpeechEndTimerRef.current=setTimeout((()=>{this.state.isSpeechActive||"agent"!==this.state.currentSpeakingState||this.setState({currentSpeakingState:"silence"})}),500),this.nextPlayTimeRef.current=this.audioContextRef.current.currentTime)}}}},a.onclose=()=>{console.log("WebSocket connection closed."),this.setState({isStreaming:!1}),this.audioContextRef.current&&"closed"!==this.audioContextRef.current.state&&(console.log("Closing playback audio context due to WebSocket closure."),this.audioContextRef.current.close().catch(console.error),this.audioContextRef.current=null,this.setState({analyserNode:null}))},a.onerror=e=>{console.error("WebSocket error:",e),this.setState({isStreaming:!1}),this.audioContextRef.current&&"closed"!==this.audioContextRef.current.state&&(console.log("Closing playback audio context due to WebSocket error."),this.audioContextRef.current.close().catch(console.error),this.audioContextRef.current=null,this.setState({analyserNode:null}))}};stopAllPlayback=()=>{const e=this.audioContextRef.current;if(!e||"closed"===e.state)return void console.log("Audio context not available or closed for stopping.");console.log(`Stopping ${this.activeSourcesRef.current.size} active/scheduled sources...`);const t=e.currentTime;Array.from(this.activeSourcesRef.current).forEach((e=>{const{source:i,gainNode:a,startTime:n}=e;try{if(n<=t+.5){const e=t+.5;a.gain.cancelScheduledValues(t),a.gain.setValueAtTime(a.gain.value,t),a.gain.linearRampToValueAtTime(0,e),i.stop(e)}else i.stop(0),i.onended=null,i.disconnect(),a.disconnect()}catch(o){console.warn("Error processing source stop/fade:",o.message,e);try{i.onended=null}catch(o){}try{i.disconnect()}catch(o){}try{a.disconnect()}catch(o){}}})),this.activeSourcesRef.current.clear(),console.log("Active sources cleared."),this.nextPlayTimeRef.current=e.currentTime,console.log("Next play time reset to:",this.nextPlayTimeRef.current)};stopSocket=()=>{this.socketRef.current&&(this.socketRef.current.close(),this.socketRef.current=null,console.log("WebSocket connection explicitly stopped."),this.audioContextRef.current&&"closed"!==this.audioContextRef.current.state&&(console.log("Closing playback audio context due to explicit socket stop."),this.audioContextRef.current.close().catch(console.error),this.audioContextRef.current=null,this.setState({analyserNode:null}))),this.setState({isStreaming:!1})};stopStreaming=async()=>{if(console.log("Stopping input audio stream and context..."),this.inputMicStreamRef.current&&(this.inputMicStreamRef.current.getTracks().forEach((e=>e.stop())),this.inputMicStreamRef.current=null),this.inputAudioContextRef.current){try{await this.inputAudioContextRef.current.close(),console.log("Input AudioContext closed.")}catch(e){console.error("Error closing Input AudioContext:",e)}this.inputAudioContextRef.current=null}console.log("Stream stopped.")};handleCardClick=e=>{if(this.socketRef.current&&this.socketRef.current.readyState===WebSocket.OPEN&&e){console.log("Card clicked, sending message:",e);const t={event:"card_click",message:e};this.socketRef.current.send(JSON.stringify(t))}else console.warn("WebSocket not open or no onClickMessage provided, cannot send card click event.",{socketReady:this.socketRef.current?.readyState===WebSocket.OPEN,message:e})};toggleProductRecommendations=()=>{this.setState((e=>({cardTimeSlots:null,cartData:null,orderStatusData:null,accommodationData:null,customListData:null,cardProducts:null!==e.cardProducts?null:Ge})))};toggleAppointments=()=>{this.setState((e=>({cardProducts:null,cartData:null,cardTimeSlots:null!==e.cardTimeSlots?null:{title:"Available time slots",items:[{date:"Monday",time:"10:00 AM"},{date:"Tuesday",time:"2:30 PM"},{date:"Wednesday",time:"9:15 AM"}]}})))};toggleCart=()=>{this.setState((e=>({cardProducts:null,cardTimeSlots:null,cartData:null!==e.cartData?null:{title:"Your shopping cart",items:[{id:"cartItem1",title:"Aluminum Check-In Medium",category:"Aluminum Collection",imageUrl:"https://monos.com/cdn/shop/files/PDP_1_Luggage_Aluminum_CheckInM_ChampagneGold_Front_2048x.jpg?v=1741909726",price:"$725",shopUrl:"https://monos.com/collections/aluminum/products/aluminum-check-in-medium?variant=44949548892359",rating:"4.8",description:"Luxury meets function in the Aluminum Check-In Medium, our most elevated offering yet. Crafted from anodized and electroplated aluminum with a refined brushed finish, its hard shell is designed to withstand the demands of travel and evolve with every journey. Inherent to aluminum, the surface will develop a patina over time \u2013 each mark adding character, making your suitcase entirely unique to you. For effortless travel, a zipperless frame with TSA-Accepted latch locks keeps your belongings secure, while a telescopic handle, soft-release side handle, and ergonomic grab handle ensure smooth maneuvering. Inside, the black quilted taffeta lining, embossed with our signature dot pattern, adds a refined touch, while a compression system keeps everything in place. Thoughtful details, like an integrated luggage tag attachment on the side, add convenience to every journey.",specification:'Exterior measurements: 26.3" \xd7 18.7" \xd7 10.5". 7\u201318 days trip length. Weight: 14.7 lb. Capacity: 61.6 L | Volume: 70 L.'}],discountAmount:"-$20",totalAmount:"$705"}})))};toggleOrderStatus=()=>{this.setState((e=>({cardProducts:null,cardTimeSlots:null,cartData:null,accommodationData:null,orderStatusData:null!==e.orderStatusData?null:_e})))};toggleAccommodation=()=>{this.setState((e=>({cardProducts:null,cardTimeSlots:null,cartData:null,orderStatusData:null,accommodationData:null!==e.accommodationData?null:He,customListData:null})))};toggleCustomList=()=>{this.setState((e=>({cardProducts:null,cardTimeSlots:null,cartData:null,orderStatusData:null,accommodationData:null,customListData:null!==e.customListData?null:Fe})))};toggleMicActive=()=>{this.setState((e=>({isMicActive:!e.isMicActive})),(()=>{console.log("Mic active state:",this.state.isMicActive)}))};render(){const{width:e,height:t,onClose:i,onWidgetClose:n,conversationId:o,isMobile:r}=this.props,{analyserNode:s,cardProducts:l,cardTimeSlots:c,isMicActive:d,cartData:h,orderStatusData:p,accommodationData:m,customListData:u,currentSpeakingState:g,shadowRootContainer:f}=this.state,b={width:e,height:t,boxSizing:"border-box",display:"flex",position:"relative"},v={position:"absolute",bottom:"0px",left:"80%",transform:"translateX(-50%)",zIndex:2,width:"50px",height:"50px",borderRadius:"50%",backgroundColor:"white",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease",borderWidth:"4px",borderStyle:"solid",borderColor:"rgb(235,235,235)"},x={...v,backgroundColor:v.backgroundColor,borderColor:v.borderColor},C={...v,left:"20%"},w=a.createElement("div",{style:{width:"100%",height:"100%",padding:"10px",paddingBottom:"12px",boxSizing:"border-box",display:"flex",flexDirection:"column",position:"relative"}},a.createElement("div",{id:"events",style:{position:"absolute",zIndex:1e3,left:"50%",top:"0%",transform:"translate(-50%, 0%)",width:"auto",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"}},a.createElement(Ve.N,{mode:"wait",initial:!1},null!==l&&a.createElement(be,{key:l.id||"product-recommendations",items:l.items,title:l.title,onClick:this.handleCardClick}),null!==c&&a.createElement(Ce,{key:c.id||"appointments",title:c.title,items:c.items}),null!==h&&a.createElement(ze,{key:h.id||"cart-list",title:h.title,items:h.items,discountAmount:h.discountAmount,totalAmount:h.totalAmount}),null!==p&&a.createElement(Ne,{key:p.id||"order-status",title:p.title,data:p}),null!==m&&a.createElement(Me,{key:m.id||"accommodation-list",title:m.title,data:m}),null!==u&&a.createElement(We,{key:u.id||"custom-list",title:u.title,items:u.items,onClick:this.handleCardClick}))),a.createElement("div",{style:{position:"relative",width:"100%",backgroundImage:"linear-gradient(to bottom, #e9e9e9, #fdfdfd, #e9e9e9)",borderRadius:"10px",overflow:"hidden",display:"flex",flexDirection:"column",flexGrow:1}},r&&a.createElement("div",{style:{position:"absolute",top:"15px",right:"15px",zIndex:1001,width:"30px",height:"30px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.2)",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",border:"none"},onClick:n,role:"button",title:"Close Widget"},a.createElement("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M1 1L13 13M13 1L1 13",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))),a.createElement("div",{style:{position:"relative",flexGrow:1,width:"100%",overflow:"hidden"}},s&&a.createElement(le,{analyser:s,speakingState:g}),a.createElement("div",{style:x,onClick:this.toggleMicActive,role:"button","aria-pressed":d,title:d?"Mute Microphone":"Unmute Microphone"},a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M12 1C11.2044 1 10.4413 1.31607 9.87868 1.87868C9.31607 2.44129 9 3.20435 9 4V12C9 12.7956 9.31607 13.5587 9.87868 14.1213C10.4413 14.6839 11.2044 15 12 15C12.7956 15 13.5587 14.6839 14.1213 14.1213C14.6839 13.5587 15 12.7956 15 12V4C15 3.20435 14.6839 2.44129 14.1213 1.87868C13.5587 1.31607 12.7956 1 12 1Z",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M19 10V12C19 13.8565 18.2625 15.637 16.9497 16.9497C15.637 18.2625 13.8565 19 12 19C10.1435 19 8.36301 18.2625 7.05025 16.9497C5.7375 15.637 5 13.8565 5 12V10",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 19V23",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M8 23H16",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),!d&&a.createElement("path",{d:"M6 6L18 18",stroke:"black",strokeWidth:"2",strokeLinecap:"round"}))),a.createElement("div",{style:C,onClick:i,role:"button",title:"Close Widget"},a.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.5 8.50394L16.5 8.50003L16.5 8.04339C16.3965 6.34229 15.6742 4.73727 14.4685 3.53155C13.2628 2.32583 11.6577 1.60349 9.95664 1.50003H9.49609C8.41247 1.4972 7.34352 1.75037 6.37628 2.23893L6.37059 2.2418C5.20798 2.82285 4.23009 3.71611 3.54647 4.82153C2.86286 5.92696 2.5005 7.20088 2.5 8.50061L2.5 8.50394C2.49717 9.58755 2.75034 10.6565 3.2389 11.6237C3.41921 11.9807 3.4495 12.395 3.32302 12.7744L2.37171 15.6283L5.22566 14.677C5.60508 14.5505 6.01929 14.5808 6.37628 14.7611C7.34351 15.2497 8.41247 15.5029 9.49609 15.5L9.49942 15.5C10.7991 15.4995 12.0731 15.1372 13.1785 14.4536C14.2839 13.7699 15.1772 12.7921 15.7582 11.6294L15.7611 11.6237C16.2497 10.6565 16.5028 9.58755 16.5 8.50394ZM0 18L1.9 12.3C1.30493 11.1219 0.996559 9.8199 1 8.50003C1.00061 6.92179 1.44061 5.37488 2.27072 4.03258C3.10083 2.69028 4.28825 1.6056 5.7 0.900029C6.87812 0.30496 8.18013 -0.00341276 9.5 2.84881e-05H10C12.0843 0.11502 14.053 0.99479 15.5291 2.47089C17.0052 3.94699 17.885 5.91568 18 8.00003V8.50003C18.0034 9.8199 17.6951 11.1219 17.1 12.3C16.3944 13.7118 15.3098 14.8992 13.9674 15.7293C12.6251 16.5594 11.0782 16.9994 9.5 17C8.18013 17.0035 6.87812 16.6951 5.7 16.1L0 18Z",fill:"black"})))),a.createElement("div",{style:{textAlign:"center",flexShrink:0,paddingBottom:"8px"}},a.createElement("img",{src:ce,alt:"Footer Design",style:{height:"20px",display:"inline-block",userSelect:"none"}}))),a.createElement("div",{style:{textAlign:"center",paddingTop:"10px",flexShrink:0}},a.createElement("img",{src:de,alt:"Bottom Design",style:{height:"7px",display:"inline-block",userSelect:"none"}})));return a.createElement("div",{ref:this.shadowHostRef,style:b},f&&ee.createPortal(w,f))}}const je=e=>{let{onClick:t,themeColor:i}=e;return a.createElement(X.P.div,{style:{position:"absolute",left:"16px",bottom:"46px"}},a.createElement(X.P.button,{initial:{opacity:0},animate:{opacity:1},onClick:t,style:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",backgroundColor:i,border:"none",width:"34px",height:"34px",padding:0,appearance:"none"},"aria-label":"Switch to Voice AI"},a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M4.16668 5.83335H5.83334V14.1667H4.16668V5.83335ZM0.833344 8.33335H2.50001V11.6667H0.833344V8.33335ZM7.50001 1.66669H9.16668V16.6667H7.50001V1.66669ZM10.8333 3.33335H12.5V18.3334H10.8333V3.33335ZM14.1667 5.83335H15.8333V14.1667H14.1667V5.83335ZM17.5 8.33335H19.1667V11.6667H17.5V8.33335Z",fill:"#fff"}))))},Je=e=>{let{isVisible:t,handleVoiceClose:i,handleVoiceShow:n,instanceId:o,voiceConversationId:r,chatWidth:s,chatHeight:l,theme:c,iframeLoaded:d,isMobile:h,onWidgetClose:p,isMicActiveOnStart:m}=e;return a.createElement(a.Fragment,null,a.createElement(K.N,null,t&&a.createElement(X.P.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},style:{height:`${l}px`,width:`${s}px`,position:"absolute",top:0,left:0,backgroundColor:"#fff",zIndex:1}},a.createElement(Ze,{instanceId:o,conversationId:r,height:l,width:s,onClose:()=>i(),onWidgetClose:p,isMobile:h,isMicActiveOnStart:m}))),d&&a.createElement(je,{onClick:()=>n(),themeColor:c.primaryColor}))},Ye=e=>{let{onVoiceClick:t,onChatClick:i,theme:n,buttonPosition:o,isMobile:r}=e;const[s,l]=(0,a.useState)(!1),c="20px";return a.createElement(N.P.div,{initial:{width:"0px",height:"0px"},animate:{width:"280px",height:"170px"},style:(()=>{const e={overflow:"clip",display:"flex",flexGrow:1,flexDirection:"column",gap:"12px",position:"fixed",backgroundColor:"#fff",border:"1px solid #E4E4E4",borderRadius:"16px",boxSizing:"border-box",paddingTop:"16px",paddingLeft:"16px",paddingRight:"16px",paddingBottom:"16px",boxShadow:"1px 1px 6px rgba(0, 0, 0, 0.1)",zIndex:100,fontFamily:"Segoe UI, Avenir Next, Helvetica, Arial"};if(!o)return{...e,bottom:"100px",right:"25px"};const t=r?{bottom:(o.mobileBottom||0)+70-10+"px",right:void 0!==o.mobileRight?o.mobileRight<10?c:`${o.mobileRight}px`:void 0,left:void 0!==o.mobileLeft?o.mobileLeft<10?c:`${o.mobileLeft}px`:void 0}:{bottom:`${(o.desktopBottom||0)+70}px`,right:void 0!==o.desktopRight?`${o.desktopRight}px`:void 0,left:void 0!==o.desktopLeft?`${o.desktopLeft}px`:void 0};return Object.keys(t).forEach((e=>{void 0===t[e]&&delete t[e]})),{...e,...t}})()},a.createElement(N.P.h1,{style:{lineHeight:"0",fontSize:"16px",fontFamily:"Segoe UI, Avenir Next, Helvetica, Arial",fontWeight:400,whiteSpace:"nowrap",textAlign:"center",color:"black",marginTop:"12px",marginBottom:"12px"},initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1}},"How do you want to connect?"),a.createElement(N.P.div,{initial:{opacity:0},animate:{opacity:1,transition:{delay:.3,duration:.5}},style:{position:"relative"}},a.createElement(N.P.div,{initial:"initial",animate:s?"hover":"initial",variants:{initial:{opacity:0,scale:.8,y:"-50%",x:"-50%"},hover:{opacity:1,scale:1,y:"-50%",x:"-50%"}},style:{position:"absolute",top:0,left:"50%",display:"flex",alignItems:"center",justifyContent:"center",gap:"4px",backgroundColor:n||"red",color:"white",padding:"4px 8px",borderRadius:"8px",fontSize:"10px",fontWeight:"bold",pointerEvents:"none"}},a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"8",height:"8",viewBox:"0 0 24 24",fill:"white",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-sparkle-icon lucide-sparkle"},a.createElement("path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"})),"NEW"),a.createElement(N.P.button,{style:{backgroundColor:"#ffffff",color:"black",border:"1px solid #e5e5e5",borderRadius:"12px",padding:"10px 20px",cursor:"pointer",fontSize:"16px",width:"100%",fontWeight:500,fontFamily:"Segoe UI, Avenir Next, Helvetica, Arial"},whileHover:{backgroundColor:"#f5f5f5",transition:{delay:0,duration:.2}},onHoverStart:()=>l(!0),onHoverEnd:()=>l(!1),onClick:t},"Voice chat")),a.createElement(N.P.button,{initial:{opacity:0},animate:{opacity:1,transition:{delay:.4,duration:.5}},style:{backgroundColor:"#ffffff",color:"black",border:"1px solid #e5e5e5",borderRadius:"12px",padding:"10px 20px",cursor:"pointer",fontWeight:500,fontSize:"16px",fontFamily:"Segoe UI, Avenir Next, Helvetica, Arial"},whileHover:{backgroundColor:"#f5f5f5",transition:{delay:0,duration:.2}},onClick:i},"Text chat"))},$e=new Audio("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=="),qe="herochat-status",Qe="herochat-state",Ke="herochat-cta",Xe="herochat-cta-product-added",et="herochat-cta-product-removed",tt="herochat-cta-product-visited",it="herochat-last-visit-time",at="herochat-chat-reacted",nt="herochat-last-locale";function ot(){return void 0!==document.title?document.title:""}function rt(){sessionStorage.setItem(Xe,"true")}function st(){sessionStorage.setItem(et,"true")}function lt(){sessionStorage.setItem(tt,"true")}function ct(){const e=localStorage.getItem(it);return e?Number(e):Date.now()}function dt(){return"opened"===localStorage.getItem(qe)?"opened":"closed"}function ht(){return"disabled"===sessionStorage.getItem(Ke)?"disabled":"enabled"}function pt(e){localStorage.setItem(qe,e)}function mt(e){sessionStorage.setItem(Qe,e)}function ut(e){localStorage.setItem(at,JSON.stringify(e))}const gt=window&&window._chatbotize_env_&&window._chatbotize_env_.REACT_APP_WIDGET_IFRAME_URL;function ft(e){const[t,i]=a.useState(0),n=a.useRef(null);a.useEffect((()=>{i(0);const t=setInterval((()=>{i((t=>t===e.lines.length-1?0:t+1))}),3e3);return()=>clearInterval(t)}),[e.lines.length]);return(()=>{if(e.selector&&""!==e.selector.trim()&&(i=e.selector,/^([a-zA-Z0-9._-]+|#[a-zA-Z0-9._-]+)$/.test(i))){const i=document.querySelector(e.selector);if(i){const o=i.getBoundingClientRect(),r="TOP"===e.mode?`${window.scrollY+o.bottom}px`:"",s="BOTTOM"===e.mode?e.visible?window.scrollY+o.top-36+"px":`${window.scrollY+o.top}px`:void 0;return a.createElement("div",{id:"zowieChatBar",ref:n,style:{position:"absolute",top:"TOP"===e.mode?r:s,backgroundColor:e.color,height:e.visible?"36px":"0px",transition:"height 0.3s ease-in-out, top 0.3s ease-in-out",overflow:"hidden"},onClick:()=>e.onClick()},a.createElement("div",{id:"zowieChatBarIcon"},a.createElement(L,null)),e.lines.map(((e,i)=>a.createElement("p",{key:i,style:{opacity:i===t?1:0}},e))),e.showHideButton&&a.createElement("div",{id:"zowieChatBarClose"},a.createElement(M,{onClick:()=>e.onHide()})))}}var i;return null})()||a.createElement("div",{id:"zowieChatBar",style:{top:"TOP"===e.mode?e.visible?"0px":"-36px":"",bottom:"BOTTOM"===e.mode?e.visible?"0px":"-36px":"",backgroundColor:e.color},onClick:()=>e.onClick()},a.createElement("div",{id:"zowieChatBarIcon"},a.createElement(L,null)),e.lines.map(((e,i)=>a.createElement("p",{key:i,style:{opacity:i===t?1:0}},e))),e.showHideButton&&a.createElement("div",{id:"zowieChatBarClose"},a.createElement(M,{onClick:()=>e.onHide()})))}function bt(){let e;return"undefined"!==typeof document.hidden?e="hidden":"undefined"!==typeof document.msHidden?e="msHidden":"undefined"!==typeof document.webkitHidden&&(e="webkitHidden"),!document[e]}class vt extends a.Component{iframe=(()=>a.createRef())();constructor(e){super(e),this.state={originalTitle:ot(),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:"started"===sessionStorage.getItem(Qe)?"started":"unknown",waitingForGetToken:!1,ecommerceWatchStarted:!1,sessionTerminated:!1,dialogVisible:!1,formVisible:!1,localMetadata:{firstName:"",lastName:"",name:"",email:"",phoneNumber:""},lastTabFocusMillis:Date.now(),lastVisitTimeMillis:ct(),ctaListenersRegistered:!1,ctaActiveConfig:this.getDefaultCta(),mobileIconConfig:{},ctaTriggered:[],ctaDisabled:[],preventUserInitiatedChatClose:!1,isVoiceVisible:e.voiceExperienceEnabled,voiceExperienceEnabled:e.voiceExperienceEnabled,mobileModeEnabled:e.mobileModeEnabled,conversationId:""}}initializeZowieEvents(){(0,r.c)("Initializing Zowie events"),window.zowieEvents=window.zowieEvents||[];let e=new Set;const t=(e,t,a,n)=>{Promise.all([i.e(61),i.e(353)]).then(i.bind(i,3353)).then((i=>i.createAPI(this.props.instanceId,this.props.trackingSessionDuration).trackPurchased(e,t,void 0,void 0,void 0,void 0,a,n))).catch((e=>console.error("Error importing tracking API:",e))),this.props.onEcommercePurchased&&this.props.onEcommercePurchased(a,n)};setInterval((()=>{window.zowieEvents.forEach((i=>{e.has(i)||((e=>{const{orderId:i,lineItems:a,total:n,currency:o}=e.payload;"trackPurchased"===e.event_type?t(i,a,n,o):(0,r.c)(`Unknown event type: ${e.event_type}`)})(i),e.add(i))}))}),500)}updateWindowSize=()=>{this.setState({width:window.innerWidth,height:window.innerHeight})};getDefaultCta=()=>{const{disableDesktopCta:e,disableMobileCta:t,desktopCta:i,mobileCta:a,mobileIcon:n}=this.props;return{desktop:e?{mode:"HIDDEN",header:"",text:""}:i,mobile:t?{mode:"HIDDEN",lines:[]}:a,mobileIcon:n,triggerEvents:[{name:"PageVisited"}],sound:void 0,titleChange:void 0,referral:void 0,source:"default"}};componentDidMount(){(0,r.c)("Zowie Widget - mounting started.");const{handleLogoutCallback:e,handleShowCallback:t,handleHideCallback:a,handleStartCallback:n,handleCloseCallback:o,handleOpenCallback:c,handleIsAvailableCallback:d,handleGetAccessTokenCallback:h,handleTrackVisitedProduct:p,handleUpdateCartCallback:m,handleTrackPurchased:u,handleTrackCartUpdated:g,handleGetMobileCtaCallback:f,handleGetDesktopCtaCallback:b,widgetShowDelay:v,showOnLoad:x,keepOnLoad:C,onLoaded:w,instanceId:V,handleGetConversationIdCallback:k}=this.props;k&&k(this.getConversationId);const{herochat:y}=s.parse(window.location.search),A=C&&("open"===y||"opened"===dt())&&!(0,r.nu)();(0,r.c)("Zowie Widget - saved status is:",dt()),this.updateWindowSize(),window.addEventListener("resize",(()=>this.updateWindowSize())),setInterval((()=>this.tryUpdateUrl()),1e3),setInterval((()=>this.watchTabFocus()),1e3),A?this.setState({alreadyStarted:!0},(()=>{this.calculatePolicy(),setTimeout((()=>this.start()),300)})):x&&setTimeout((()=>this.calculatePolicy()),1e3*Number(v)),t&&t((()=>this.show())),e&&e((()=>this.logout())),a&&a((()=>this.hide())),n&&n((e=>{e&&this.setState({pendingReferral:e}),this.start()})),o&&o((()=>this.close())),c&&c((()=>this.open())),d&&d((()=>this.isAvailable())),h&&h((e=>{this.setState({getToken:e})})),p&&p((e=>{Promise.all([i.e(61),i.e(353)]).then(i.bind(i,3353)).then((t=>t.createAPI(this.props.instanceId,this.props.trackingSessionDuration).trackVisitedProduct(e))),this.props.onEcommerceProductVisited&&this.props.onEcommerceProductVisited()})),g&&g((e=>{Promise.all([i.e(61),i.e(353)]).then(i.bind(i,3353)).then((t=>t.createAPI(this.props.instanceId,this.props.trackingSessionDuration).trackCartUpdated(e)))})),u&&u(((e,t,a,n)=>{Promise.all([i.e(61),i.e(353)]).then(i.bind(i,3353)).then((i=>i.createAPI(this.props.instanceId,this.props.trackingSessionDuration).trackPurchased(e,t,void 0,void 0,void 0,void 0,a,n))),this.props.onEcommercePurchased&&this.props.onEcommercePurchased(a,n)})),m&&m((()=>this.ecommerceUpdateCart())),b&&b((()=>this.state.ctaActiveConfig.desktop)),f&&f((()=>this.state.ctaActiveConfig.mobile)),w&&w();try{this.ecommerceConfigure(),this.ecommerceTrackVisitedUrl(),this.ecommerceTrackVisitedProduct(),this.ecommerceWatchCart(),this.ecommerceWatchPurchase()}catch(T){(0,r.Iv)(T)}try{(e=>{let{featureFlag:t,instanceId:i,callback:a}=e;try{Y({featureFlag:t,instanceId:i})&&a()}catch(T){console.warn(`safeCallWhenFlagIsSet - ${t} - ${T.message}`)}})({featureFlag:j,instanceId:V,callback:()=>Q(this.trackSearchPerformed.bind(this))})}catch{}this.showForm(),this.triggerCta(A),setInterval((()=>this.triggerCta(A)),1e3),localStorage.setItem(it,String(Date.now()));const S=()=>{this.props.isPersonalizeAgentExperimentEnabled&&Promise.all([i.e(61),i.e(353)]).then(i.bind(i,3353)).then((e=>e.createAPI(this.props.instanceId,this.props.trackingSessionDuration).trackAbTestRegistered("personalize-agents-more",this.props.shouldPersonalizeAgent?"variant":"control")))},E=()=>{this.props.isAddButtonsToProactiveChatsExperimentEnabled&&Promise.all([i.e(61),i.e(353)]).then(i.bind(i,3353)).then((e=>e.createAPI(this.props.instanceId,this.props.trackingSessionDuration).trackAbTestRegistered("add-buttons-to-proactive-chats",this.props.shouldAddButtonsToProactiveChats?"variant":"control")))},I=()=>{const e=(0,l.XW)({proactiveChatConfigs:this.props.proactiveChatConfigs,metadata:this.props.metadata});e&&Promise.all([i.e(61),i.e(353)]).then(i.bind(i,3353)).then((t=>t.createAPI(this.props.instanceId,this.props.trackingSessionDuration).trackAbTestRegistered(e.name,(0,l.mM)(e)?"variant":"control")))};window.addEventListener("new-tracking-session",(()=>{S(),E(),I()})),S(),E(),I(),this.props.metadata&&this.setState({localMetadata:{firstName:this.props.metadata.firstName||"",lastName:this.props.metadata.lastName||"",name:this.props.metadata.name||"",email:this.props.metadata.email||"",phoneNumber:this.props.metadata.phoneNumber||""}}),window.addEventListener("keydown",this.onKeyDown.bind(this)),this.initializeZowieEvents(),(0,r.c)("Zowie Widget - mounting finished.")}componentWillUnmount(){this.stopTitleChange(),window.removeEventListener("keydown",this.onKeyDown.bind(this))}onKeyDown(e){"Escape"===e.key&&this.close()}hideCta(){this.setState({ctaActivated:!1,pendingReferral:void 0,ctaOffScreen:!0,ctaActiveConfig:this.getDefaultCta()}),this.stopTitleChange(),this.setState({ctaTriggered:[]})}showCta(e){(0,r.c)("Showing CTA with config: ",e);const{desktop:t,mobile:i,sound:a,titleChange:n,referral:o}=e;let s=0;(0,r.nu)()||(s=t.showDelay||0),(0,r.nu)()&&(s=i.showDelay||0),o?this.setState((e=>({...e,ctaTriggered:[...e.ctaTriggered,o]}))):this.setState((e=>({...e,ctaTriggered:[...e.ctaTriggered,"default"]}))),setTimeout((()=>{this.setState({ctaActivated:!0,pendingReferral:o,ctaOffScreen:!1,ctaActiveConfig:e}),o&&this.ecommerceTrackPractiveChatSeen(o),a&&this.playSound(),n&&this.startTitleChange(n)}),1e3*Number(s))}triggerCta(e){const{proactiveChatConfigs:t,metadata:i,disableDesktopCta:a,disableMobileCta:n,mobileCta:o,desktopCta:s,allowToDisableCtaOmitProactiveChats:c}=this.props,{opened:d,ctaListenersRegistered:h,ctaTriggered:p,ctaDisabled:m}=this.state;if(d||!0===e)return;const u=window.location.href;let g=[this.getDefaultCta()],f=(0,l.sE)({configs:t,metadata:i})?(e=>{let{configs:t,metadata:i}=e;const a=window.location.href;return t.filter((e=>C({config:e,path:a,metadata:i})))})({configs:t,metadata:i}):t.filter((e=>{let t=0===e.triggerUrls.length&&0===e.triggerMetadataGroups.length&&(0,r.vQ)(e.schedule),a=(0,r.AW)(e.triggerUrls,u)&&(0,r.vQ)(e.schedule),n=void 0!==e.triggerMetadataGroups.find((t=>{let a;return t.conditions.forEach((e=>{("OR"!==t.operator||!1!==a&&void 0!==a||!i)&&("AND"!==t.operator||!0!==a&&void 0!==a||!i)||(a=(0,r.pv)(e,i))})),!0===a&&(0,r.vQ)(e.schedule)}));return t||a||n}));f=f.map((e=>({desktop:a?{mode:"HIDDEN",header:"",text:""}:e.desktopCta?e.desktopCta:s,mobile:n?{mode:"HIDDEN",lines:[]}:e.mobileCta?e.mobileCta:o,triggerEvents:e.triggerEvents,sound:e.sound,titleChange:e.titleChange,referral:e.id,source:"proactive"})));const b=0===f.length;if("disabled"===ht()&&b)return;if("disabled"===ht()&&!c)return;b||(g=f);const v=g.filter((e=>!p.includes(e.referral?e.referral:"default")&&!m.includes(e.referral?e.referral:"default")));(0,l.sE)({configs:t,metadata:i})?(e=>{let{configs:t,metadata:i,state:a,callback:n}=e;t.forEach((e=>{e.triggerEvents.forEach((t=>{x({config:e,state:a,event:t,callback:n})}))}))})({configs:v,metadata:i,state:{lastVisitTimeMillis:this.state.lastVisitTimeMillis,lastTabFocusMillis:this.state.lastTabFocusMillis,ctaListenersRegistered:this.state.ctaListenersRegistered},callback:e=>this.showCta(e)}):v.forEach((e=>{e.triggerEvents.forEach((t=>{if("PageVisited"===t.name)this.showCta(e),(0,r.c)("Zowie Widget - triggered page visited.");else if("PageInactive"===t.name){const{durationMillis:i}=t;i&&this.state.lastTabFocusMillis<=Date.now()-i&&(this.showCta(e),(0,r.c)("Zowie Widget - triggered page inactive."))}else if("PageReturned"===t.name){const{durationMillis:i}=t;i&&this.state.lastVisitTimeMillis<=Date.now()-i&&(this.showCta(e),(0,r.c)("Zowie Widget - triggered page returned."))}else if("ElementHover"===t.name){const{selector:i}=t;if(i&&!h)if((0,l.Mr)({event:t}))(0,l.Xg)({event:t,callback:()=>this.showCta(e)});else{const t=document.querySelector(i);t&&t.addEventListener("mouseover",(()=>{this.showCta(e),(0,r.c)("Zowie Widget - triggered element hover.")}),!1)}}else if("ElementClick"===t.name){const{selector:i}=t;if(i&&!h){const t=document.querySelector(i);t&&t.addEventListener("click",(()=>{this.showCta(e),(0,r.c)("Zowie Widget - triggered element click.")}),!1)}}else"EcommerceCartUpdatedProductAdded"===t.name?sessionStorage.getItem(Xe)&&(sessionStorage.removeItem(Xe),this.showCta(e),(0,r.c)("Zowie Widget - triggered cart product added.")):"EcommerceCartUpdatedProductRemoved"===t.name?sessionStorage.getItem(et)&&(sessionStorage.removeItem(et),this.showCta(e),(0,r.c)("Zowie Widget - triggered cart product removed.")):"EcommerceCartUpdatedProductVisited"===t.name&&sessionStorage.getItem(tt)&&(sessionStorage.removeItem(tt),this.showCta(e),(0,r.c)("Zowie Widget - triggered cart product visited."))}))})),this.setState({ctaListenersRegistered:!0})}trackSearchPerformed(e,t,a){Promise.all([i.e(61),i.e(353)]).then(i.bind(i,3353)).then((i=>i.createAPI(this.props.instanceId,this.props.trackingSessionDuration).trackSearchPerformed(e,t,a)))}ecommerceTrackVisitedUrl(){(this.props.ecommerceShopifyTracking||this.props.ecommerceMagentoTracking||this.props.ecommerceBigcommerceTracking||this.props.ecommerceNopcommerceTracking||this.props.ecommerceCustomTracking)&&Promise.all([i.e(61),i.e(353)]).then(i.bind(i,3353)).then((e=>e.createAPI(this.props.instanceId,this.props.trackingSessionDuration).trackVisitedUrl(window.location.href,document.title,navigator.userAgent,navigator.appVersion)))}ecommerceTrackConversationStarted(e){Promise.all([i.e(61),i.e(353)]).then(i.bind(i,3353)).then((t=>t.createAPI(this.props.instanceId,this.props.trackingSessionDuration).trackConversationStarted(e))),this.props.onEcommerceConversationStarted&&this.props.onEcommerceConversationStarted()}ecommerceTrackVisitedProduct(){this.props.ecommerceShopifyTracking&&Promise.all([i.e(61),i.e(951)]).then(i.bind(i,8951)).then((e=>e.trackVisitedProduct(this.props.instanceId,this.props.trackingSessionDuration,(()=>{lt(),this.props.onEcommerceProductVisited&&this.props.onEcommerceProductVisited()})))),this.props.ecommerceBigcommerceTracking&&Promise.all([i.e(61),i.e(348)]).then(i.bind(i,8348)).then((e=>e.trackVisitedProduct(this.props.instanceId,this.props.trackingSessionDuration,(()=>{lt(),this.props.onEcommerceProductVisited&&this.props.onEcommerceProductVisited()})))),this.props.ecommerceMagentoTracking&&Promise.all([i.e(61),i.e(96)]).then(i.bind(i,2096)).then((e=>e.trackVisitedProduct(this.props.instanceId,this.props.trackingSessionDuration,(()=>{lt(),this.props.onEcommerceProductVisited&&this.props.onEcommerceProductVisited()})))),this.props.ecommerceNopcommerceTracking&&Promise.all([i.e(61),i.e(471)]).then(i.bind(i,6471)).then((e=>e.trackVisitedProduct(this.props.instanceId,this.props.trackingSessionDuration,(()=>{lt(),this.props.onEcommerceProductVisited&&this.props.onEcommerceProductVisited()}))))}ecommerceTrackPractiveChatClicked(e){Promise.all([i.e(61),i.e(353)]).then(i.bind(i,3353)).then((t=>t.createAPI(this.props.instanceId,this.props.trackingSessionDuration).trackProactiveChatClicked(e))),this.props.onEcommerceProactiveChatClicked&&this.props.onEcommerceProactiveChatClicked()}ecommerceTrackPractiveChatSeen(e){Promise.all([i.e(61),i.e(353)]).then(i.bind(i,3353)).then((t=>t.createAPI(this.props.instanceId,this.props.trackingSessionDuration).trackProactiveChatSeen(e))),this.props.onEcommerceProactiveChatSeen&&this.props.onEcommerceProactiveChatSeen()}showForm(){"started"!==this.state.conversationState&&!0===this.props.showPreChatForm&&this.setState({formVisible:!0})}ecommerceClearCart(){Promise.all([i.e(61),i.e(353)]).then(i.bind(i,3353)).then((e=>e.createAPI(this.props.instanceId,this.props.trackingSessionDuration).trackCartUpdated([])))}ecommerceWatchCart(){this.state.ecommerceWatchStarted||this.props.ecommerceCartWatchEnabled&&(this.setState({ecommerceWatchStarted:!0}),this.props.ecommerceShopifyTracking&&Promise.all([i.e(61),i.e(951)]).then(i.bind(i,8951)).then((e=>e.startCartWatch(this.props.instanceId,this.props.trackingSessionDuration,(()=>rt()),(()=>st())))),this.props.ecommerceBigcommerceTracking&&Promise.all([i.e(61),i.e(348)]).then(i.bind(i,8348)).then((e=>e.startCartWatch(this.props.instanceId,this.props.trackingSessionDuration,(()=>rt()),(()=>st())))),this.props.ecommerceMagentoTracking&&Promise.all([i.e(61),i.e(96)]).then(i.bind(i,2096)).then((e=>e.startCartWatch(this.props.instanceId,this.props.trackingSessionDuration,(()=>rt()),(()=>st())))),this.props.ecommerceNopcommerceTracking&&Promise.all([i.e(61),i.e(471)]).then(i.bind(i,6471)).then((e=>e.startCartWatch(this.props.instanceId,this.props.trackingSessionDuration,(()=>rt()),(()=>st())))))}ecommerceUpdateCart(){this.props.ecommerceShopifyTracking&&Promise.all([i.e(61),i.e(951)]).then(i.bind(i,8951)).then((e=>e.updateCart(this.props.instanceId,this.props.trackingSessionDuration,(()=>rt()),(()=>st()))))}ecommerceConfigure(){let e=this;this.props.ecommerceBigcommerceTracking&&Promise.all([i.e(61),i.e(348)]).then(i.bind(i,8348)).then((t=>{t.configure(this.props.instanceId,this.props.trackingSessionDuration,(()=>e.ecommerceClearCart()),((t,i)=>{e.props.onEcommercePurchased&&e.props.onEcommercePurchased(t,i)}))}))}ecommerceWatchPurchase(){let e=this;this.props.ecommerceBigcommerceTracking&&Promise.all([i.e(61),i.e(348)]).then(i.bind(i,8348)).then((e=>{e.startWatchPurchase(this.props.instanceId,this.props.trackingSessionDuration)})),this.props.ecommerceMagentoTracking&&Promise.all([i.e(61),i.e(96)]).then(i.bind(i,2096)).then((t=>{t.startWatchPurchase(this.props.instanceId,this.props.trackingSessionDuration,(()=>e.ecommerceClearCart()),((t,i)=>{e.props.onEcommercePurchased&&e.props.onEcommercePurchased(t,i)}))})),this.props.ecommerceNopcommerceTracking&&Promise.all([i.e(61),i.e(471)]).then(i.bind(i,6471)).then((t=>{t.startWatchPurchase(this.props.instanceId,this.props.trackingSessionDuration,((t,i)=>{e.props.onEcommercePurchased&&e.props.onEcommercePurchased(t,i)}))}))}watchTabFocus=()=>{this.state.opened&&this.sendCommand(JSON.stringify({action:"focus",payload:{value:bt()}})),bt()&&this.setState({lastTabFocusMillis:Date.now()})};tryUpdateUrl=()=>{const{showOnLoad:e}=this.props,t=window.location.href,i=ot();this.state.currentUrl!==t&&(!0===e&&this.setState({currentUrl:t},this.calculatePolicy),this.state.initialized&&this.sendCommand(JSON.stringify({action:"updatePageUrl",payload:{url:t,title:i}})),this.setState({originalTitle:i},this.hideCta))};logout=()=>{const{iframeVisible:e}=this.state,{instanceId:t}=this.props;e&&this.sendCommand(JSON.stringify({action:"logout",payload:{instanceId:t}}))};start=()=>{const{opened:e,visible:t}=this.state;"9be065adf1534e498deb9d682ad2eef5"!==this.props.instanceId||t||this.show(),e||this.toggleChat()};close=()=>{this.state.opened&&this.toggleChat()};open=()=>{this.state.opened||this.toggleChat()};show=()=>{const{onShow:e,instanceId:t}=this.props;this.setState({noRender:!1}),setTimeout((()=>{this.setState({visible:!0}),"fb64e04d80d141adb1c062f1ed177662"===t||"0187725d0e98488baf9839f4c3babb8b"===t?setInterval((function(){var e=ht(),t=document.querySelector(".content"),i=document.querySelector(".search-container__backdrop"),a=document.querySelector(".comparison-footer-widget"),n=document.querySelector(".navigation"),o=document.getElementById("zowieChatBar"),r=document.querySelector(".header--fadein"),s=document.getElementById("header"),l=document.querySelector(".cdk-global-overlay-wrapper");null===a?window.Chatbotize.updatePosition({desktopBottom:20,desktopRight:20,mobileBottom:20,mobileRight:25,mobileOffset:425}):window.Chatbotize.updatePosition({desktopBottom:120,desktopRight:20,mobileBottom:20,mobileRight:25,mobileOffset:425}),"disabled"===e&&null!==o?(o.style.display="none",o.style.top="none",null!==t&&(t.style.paddingTop="0px"),null!==r&&(r.style.top="0px"),null!==s&&(s.style.marginTop="0px")):null!==o&&o.parentElement&&"1"!==getComputedStyle(o.parentElement).opacity?(null!==t&&(t.style.paddingTop="0px"),null!==r&&(r.style.top="0px"),null!==s&&(s.style.marginTop="0px")):null!==n&&null!==o&&"none"===getComputedStyle(n).transform||null!==l&&null!==o||null!==i&&null!==o?o.style.display="none":null!==o&&null!==t?(o.style.display="block",o.style.top="3px",t.style.paddingTop="32px",null!==r&&(r.style.top="38px")):null!==o&&null!==s?s.style.marginTop="36px":null!==r&&(r.style.top="0px")}),100):e&&e()}),1e3),i.e(153).then(i.bind(i,7153)).then((e=>{let t=this.props.instanceId,i=e.getConversationId(t),a=this.props.zendeskAccountKey;a&&i&&e.keepAlive({accountKey:a,conversationId:i,instanceId:t})}))};hide=()=>{const{onHide:e}=this.props;this.setState({visible:!1}),setTimeout((()=>{this.setState({noRender:!0}),e&&e()}),1e3)};sendCommand=e=>{this.iframe.current.contentWindow&&this.iframe.current.contentWindow.postMessage(e,"*")};initialize=()=>{const{iframeLoaded:e,iframeVisible:t}=this.state;t||(this.setState({iframeVisible:!0,ctaActivated:!1,widgetOffScreen:!1,unreadMessageBadge:0,opened:!0},(()=>{e&&this.onLoad()})),this.timeout=setTimeout((()=>{this.setState({ctaOffScreen:!0})}),500))};onCtaClicked=()=>{const{alternativeChannelsActivated:e,alreadyOpened:t,opened:i,preventUserInitiatedChatClose:a,voiceExperienceEnabled:n}=this.state,{alternativeChannels:o}=this.props;return i&&a?this.sendCommand(JSON.stringify({action:"preventedUserInitiatedChatClose"})):o&&!t?"mobile"===o.surface&&!1===(0,r.nu)()||"desktop"===o.surface&&!0===(0,r.nu)()?void this.toggleChat():void this.setState({alternativeChannelsOffScreen:!1,alternativeChannelsActivated:!e,iconActive:!e,ctaOffScreen:!0,ctaActivated:!1}):void(i?this.toggleChat():n?this.toggleDialogMenu():this.toggleChat())};onProactiveButtonClick=e=>{this.setState({pendingReferral:e}),this.onCtaClicked()};sendReferral=e=>{(0,r.c)("Zowie Widget - triggering referral with value:",e),this.sendCommand(JSON.stringify({action:"sendReferral",payload:{value:e}})),"start"!==e&&this.ecommerceTrackPractiveChatClicked(e)};toggleDialogMenu=()=>{this.setState({dialogVisible:!this.state.dialogVisible})};handleVoiceChatDialogButton=()=>{this.setState({isVoiceVisible:!0}),this.toggleChat(),this.toggleDialogMenu()};handleTextChatDialogButton=()=>{this.setState({isVoiceVisible:!1}),this.toggleChat(),this.toggleDialogMenu()};toggleChat=()=>{const{opened:e,alreadyOpened:t,initialized:i,getToken:a,invalidSession:n,conversationState:o,waitingForGetToken:s}=this.state;if(this.setState({alternativeChannelsActivated:!1}),setTimeout((()=>{this.setState({alternativeChannelsOffScreen:!0})}),1e3),s)return;if(!i&&!n)return a?(this.setState({waitingForGetToken:!0}),a((e=>{this.setState({waitingForGetToken:!1,accessToken:e}),this.initialize()}),(e=>{this.setState({waitingForGetToken:!1,iconActive:!1}),(0,r.c)("Zowie Widget - Error while initializing chat "+e)}))):this.initialize(),void this.setState({iconActive:!0});e?this.setState({iconActive:!1}):this.setState({iconActive:!0}),this.timeout&&clearTimeout(this.timeout);const{requestWebPush:l,onOpen:c,onClose:d}=this.props;let h=!e;n||(this.sendCommand(JSON.stringify({action:e?"deactivate":"activate"})),e||this.sendCommand(JSON.stringify({action:"focus",payload:{value:!0}})),"started"===o&&this.setState({alreadyStarted:!0}),!1!==l&&this.props.webpushNotificationTitleEnabled||"started"===o||setTimeout((()=>this.sendCommand(JSON.stringify({action:"disableNotifications"}))),100)),h?this.setState({widgetOffScreen:!1,unreadMessageBadge:0,opened:!0}):(this.setState({opened:!1,unreadMessageBadge:0}),this.timeout=setTimeout((()=>{this.setState({widgetOffScreen:!0})}),1e3)),h?(pt("opened"),c&&c()):(pt("closed"),d&&d(),this.state.isVoiceVisible&&this.handleCloseVoice()),!t&&h&&this.setState({alreadyOpened:!0})};handlePreventUserInitiatedChatCloseEvent(e){this.setState({preventUserInitiatedChatClose:"true"===e})}onLoad=()=>{const{iframeVisible:e}=this.state,{instanceId:t,name:a,description:n,logoUrl:o,engagementMessage:l,resetSession:c,sessionTimeout:d,allowFileUpload:h,allowPickEmoji:p,allowDownloadTranscript:m,multipleConversationsEnabled:u,allowFileExtensions:g,agentAvatar:f,chatbotAvatar:b,onClose:v,onEndChat:x,onStart:C,onMessageSent:w,onChatReacted:V,onMessageReceived:k,onMetadataUpdated:y,onLinkClicked:A,zendeskAccountKey:S,gorgiasApplicationId:E,gorgiasPassReferral:I,context:T,sendReferralDelay:R,slug:M}=this.props,{zowieParam:P}=s.parse(window.location.search),z=M?`https://${M}.api.getzowie.com`:(D=window._chatbotize_env_.DATACENTER_API_URL).endsWith("/")?D.substring(0,D.length-1):D;var D;if(this.setState({iframeLoaded:!0}),!e)return;const B=e=>{try{const o=JSON.parse(e.data);if(o&&"subscribeToNotifications"===o.event)Promise.all([i.e(581),i.e(306)]).then(i.bind(i,2306)).then((e=>{e.setup({serviceWorkerPath:this.props.serviceWorkerPath||"/herochat-sw.js",onSuccess:e=>{this.sendCommand(JSON.stringify({action:"enableNotifications",payload:{deviceToken:e}}))},onError:()=>{this.sendCommand(JSON.stringify({action:"disableNotifications"}))}})}));else if(o&&"initialized"===o.event){const e=o.data||{};if("unknown"===this.state.conversationState&&this.ecommerceTrackConversationStarted(e.conversationId),this.ecommerceWatchCart(),this.setState({voiceConversationId:e.conversationId}),mt(e.conversationStatus),"39964f3d7cb245db9df0c7a647408146"===t&&(this.state.lastVisitTimeMillis<=Date.now()-36e5&&this.setState({pendingReferral:"start"}),this.props.metadata&&this.props.metadata.locale)){const e=this.props.metadata.locale,t=localStorage.getItem(nt)||null;null!==t&&null!==e&&t!==e&&this.setState({pendingReferral:"start"}),a=e,localStorage.setItem(nt,a)}this.setState({initialized:!0,invalidSession:!1,opened:!1,conversationState:e.conversationStatus,alreadyStarted:"unknown"!==e.conversationStatus&&this.state.alreadyStarted},(()=>this.toggleChat())),S&&i.e(153).then(i.bind(i,7153)).then((i=>{i.setup({accountKey:S,conversationId:e.conversationId,instanceId:t,apiBaseUrl:z})})),E&&i.e(193).then(i.bind(i,7193)).then((i=>{i.setup({applicationId:E,conversationId:e.conversationId,instanceId:t,referral:I?this.state.pendingReferral:void 0,apiBaseUrl:z})}))}else if(o&&"sessionInvalid"===o.event)(0,r.c)("Zowie Widget - session invalid."),this.setState({iconActive:!0,widgetOffScreen:!1,invalidSession:!0,opened:!0,alreadyStarted:!1});else if(o&&"sessionEnd"===o.event)(0,r.c)("Zowie Widget - session end."),this.setState({pendingReferral:"start"});else if(o&&"sessionRestarted"===o.event)(0,r.c)("Zowie Widget - session restarted."),this.setState({alreadyStarted:!1,conversationState:"unknown"},(()=>{mt("unknown"),ut(!1),this.showForm()}));else if(o&&"sessionTerminated"===o.event){if((0,r.c)("Zowie Widget - session terminated."),this.setState({initialized:!1,opened:!1,alreadyActivated:!1,alreadyOpened:!1,alreadyStarted:!1,iframeVisible:!1,iframeLoaded:!1,iconActive:!1,conversationState:"unknown",sessionTerminated:!0,voiceConversationId:void 0},(()=>{window.removeEventListener("message",B),pt("closed"),mt("unknown"),ut(!1),this.showForm(),v&&v(),x&&x()})),S){(0,r.c)("Zowie Widget - terminating Zendesk session");try{"f73676c1b7324596877572ffaeb45c15"!==t&&"5ecd1106-c9d5-47d1-943e-ecc6c8656a27"!==t||window.zChat.addTags(["zowie_amo_en"]),window.zChat.endChat({clear_dept_id_on_chat_ended:!0})}catch(n){(0,r.Iv)(n)}}}else if(o&&"activated"===o.event){const{alreadyStarted:e,alreadyActivated:t,pendingReferral:i}=this.state,{startOnOpen:a}=this.props;t||(this.sendMetadataCommands(),this.setState({alreadyActivated:!0})),i?(setTimeout((()=>{this.sendReferral(i)}),R),this.setState({pendingReferral:void 0})):!e&&a&&setTimeout((()=>this.sendReferral("start")),R),!e&&a&&(C&&C(),this.setState({alreadyStarted:!0})),mt("started"),this.setState({conversationState:"started"}),this.sendCommand(JSON.stringify({action:"enableParentImagePreview"}))}else if(o&&"showImagePreview"===o.event)this.setState({imagePreviewUrl:o.data.url});else if(o&&"messageSent"===o.event)w&&w(o.value),"true"!==localStorage.getItem(at)&&(ut(!0),V&&V());else if(o&&"messageReceived"===o.event)k&&k(o.value),this.displayNotification(),this.setState((e=>({unreadMessageBadge:e.unreadMessageBadge+1})));else if(o&&"handleLink"===o.event)A&&A(o.url);else if(o&&"metadataUpdated"===o.event){let e,t,i,a;""!==o.firstName&&(e=o.firstName),""!==o.lastName&&(t=o.lastName),""!==o.email&&(i=o.email),""!==o.phoneNumber&&(a=o.phoneNumber),y&&y({firstName:e,lastName:t,email:i,phoneNumber:a})}else o&&"chatbotInteraction"===o.event?Promise.all([i.e(61),i.e(353)]).then(i.bind(i,3353)).then((e=>e.createAPI(this.props.instanceId,this.props.trackingSessionDuration).trackChatbotInteraction())):o&&"agentInteraction"===o.event?Promise.all([i.e(61),i.e(353)]).then(i.bind(i,3353)).then((e=>e.createAPI(this.props.instanceId,this.props.trackingSessionDuration).trackAgentInteraction(o.userId))):o&&"imageSent"===o.event?Promise.all([i.e(61),i.e(353)]).then(i.bind(i,3353)).then((e=>e.createAPI(this.props.instanceId,this.props.trackingSessionDuration).trackImageSent())):o&&"linkSent"===o.event?Promise.all([i.e(61),i.e(353)]).then(i.bind(i,3353)).then((e=>e.createAPI(this.props.instanceId,this.props.trackingSessionDuration).trackLinkSent())):o&&"carouselSent"===o.event?((0,r.c)("carouselSent: ",o.event),"f73676c1b7324596877572ffaeb45c15"!==t&&"5794c3553d15488b89484fc1f45dccb1"!==t||((0,r.c)("pushing zowie_salesbot_started to dataLayer: ",o.event),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"zowie_salesbot_started"})),Promise.all([i.e(61),i.e(353)]).then(i.bind(i,3353)).then((e=>e.createAPI(this.props.instanceId,this.props.trackingSessionDuration).trackCarouselSent()))):o&&"linkClicked"===o.event?Promise.all([i.e(61),i.e(353)]).then(i.bind(i,3353)).then((e=>e.createAPI(this.props.instanceId,this.props.trackingSessionDuration).trackLinkClicked(o.url))):o&&"carouselClicked"===o.event?Promise.all([i.e(61),i.e(353)]).then(i.bind(i,3353)).then((e=>e.createAPI(this.props.instanceId,this.props.trackingSessionDuration).trackCarouselClicked(o.url))):o&&"close"===o.event?this.toggleChat():o&&"preventChatClose"===o.event&&o.value&&this.handlePreventUserInitiatedChatCloseEvent(o.value)}catch(o){}var a};window.addEventListener("message",B);let L=T;"9be065adf1534e498deb9d682ad2eef5"===t&&this.state.pendingReferral&&((0,r.c)("Overriding context to: experts"),L="experts"),setTimeout((()=>{this.sendCommand(JSON.stringify({action:"init",payload:{instanceId:t,name:a,description:n,logoUrl:o,resetSession:c,sessionTimeout:d,allowFileUpload:h,allowPickEmoji:p,allowDownloadTranscript:m,multipleConversationsEnabled:u,allowFileExtensions:g,agentAvatar:f,chatbotAvatar:b,engagementMessage:l,theme:this.state.theme,accessToken:this.props.accessToken||this.state.accessToken,userId:this.props.userId,allowClose:!0,allowEndChat:this.props.allowEndChat,submitOnEnter:this.props.submitOnEnter,chatWithAgentReferral:this.props.chatWithAgentReferral,restartReferral:this.props.restartReferral,authorMode:this.props.authorMode,avatarRounded:void 0!==this.props.zendeskAccountKey,zowieParam:P,context:L,content:this.props.content,shouldPersonalizeAgent:this.props.shouldPersonalizeAgent,locale:this.props.metadata?.locale,externalLinkHandler:void 0!==A,voiceExperienceEnabled:this.props.voiceExperienceEnabled,mobileModeEnabled:this.props.mobileModeEnabled}}))}),250)};stopTitleChange=()=>{clearInterval(this.titleChangeIntervalId),clearTimeout(this.titleChangeTimeoutId),document.title=this.state.originalTitle};playSound=()=>{if(!bt())try{$e.play()}catch(e){(0,r.c)("Error while playing notification",e)}};startTitleChange=e=>{bt()||(this.stopTitleChange(),document.title=e,this.titleChangeIntervalId=setInterval((()=>{bt()&&this.stopTitleChange(),document.title=e,this.titleChangeTimeoutId=setTimeout((()=>{document.title=this.state.originalTitle}),1e3)}),2e3))};displayNotification=()=>{this.props.tabNotificationTitle&&this.startTitleChange(this.props.tabNotificationTitle),this.props.webpushSoundOn&&this.playSound()};showCtaHideIcon=()=>{this.setState({hideCtaVisible:!0})};hideCtaHideIcon=()=>{this.setState({hideCtaVisible:!1})};disableCta=()=>{const{ctaActiveConfig:e}=this.state;var t;this.setState({ctaActivated:!1}),setTimeout((()=>this.setState({ctaOffScreen:!0})),500),t="disabled",sessionStorage.setItem(Ke,t);const i=e.referral;i&&this.setState((e=>({...e,ctaDisabled:[...e.ctaDisabled,i]}))),this.props.onCtaDisabled&&this.props.onCtaDisabled()};onHoverHideCta=()=>{const{ctaActiveConfig:e}=this.state;"HOVER"===e.desktop.mode&&this.setState({ctaActivated:!1,ctaOffScreen:!0})};onHoverShowCta=()=>{const{ctaActiveConfig:e}=this.state;"HOVER"===e.desktop.mode&&this.setState({ctaActivated:!0,ctaOffScreen:!1})};sendMetadataCommands=()=>{const e=this.props.trackActivity;if(e){const e=this.props.metadata||{};this.sendCommand(JSON.stringify({action:"updateMetadata",payload:{firstName:e.firstName,lastName:e.lastName,name:e.name,imageFileId:e.imageFileId,locale:e.locale,timezone:e.timezone,phoneNumber:e.phoneNumber,email:e.email,customParams:e.extraParams?Object.entries(e.extraParams).filter((e=>{let[t,i]=e;return null!==i&&void 0!==i})).map((e=>{let[t,i]=e;return{name:t,value:i}})):void 0}}))}if(e){const e=new URLSearchParams(window.location.search);e.set("herochat","open");const t=window.location.origin+window.location.pathname+"?"+e.toString();this.sendCommand(JSON.stringify({action:"updatePageUrl",payload:{url:t,title:this.state.originalTitle}}))}this.sendCommand(JSON.stringify({action:"focus",payload:{value:!0}}))};onSubmitLocalMetadata=()=>{this.sendCommand(JSON.stringify({action:"updateMetadata",payload:{firstName:this.state.localMetadata.firstName||void 0,lastName:this.state.localMetadata.lastName||void 0,name:this.state.localMetadata.name||void 0,email:this.state.localMetadata.email||void 0,phoneNumber:this.state.localMetadata.phoneNumber||void 0}})),this.setState({formVisible:!1,localMetadata:{email:"",firstName:"",lastName:"",name:"",phoneNumber:""}})};isAvailable=()=>{const{whitelist:e,blacklist:t,startOnWhitelist:i,startOnBlacklist:a,continueOnWhitelist:n,continueOnBlacklist:o,availability:s,surface:l,hideMetadataConditions:c,startMetadataConditions:d,showMetadataConditions:h,metadata:p}=this.props,{conversationState:m}=this.state,u=window.location.href;let g=!0;if((0,r.vQ)(s)||(g=!1),e&&((0,r.AW)(e,u)||(g=!1)),(0,r.c)("Show after access list: ",g,e),t&&(0,r.AW)(t,u)&&(g=!1),(0,r.c)("Show after deny list: ",g,t),i&&"started"!==m&&((0,r.AW)(i,u)||(g=!1)),(0,r.c)("Show after start access list: ",g,i),a&&"started"!==m&&(0,r.AW)(a,u)&&(g=!1),(0,r.c)("Show after start deny list: ",g,a),n&&"started"===m&&((0,r.AW)(n,u)||(g=!1)),(0,r.c)("Show after continue acccess list: ",g,n),o&&"started"===m&&(0,r.AW)(o,u)&&(g=!1),(0,r.c)("Show after continue deny list: ",g,o),"mobile"===l&&!1===(0,r.nu)()&&(g=!1),(0,r.c)("Show after surface mobile ",g,l),"desktop"===l&&!0===(0,r.nu)()&&(g=!1),(0,r.c)("Show after surface desktop ",g,l),void 0!==p&&h.length>0){let e=!1;h.forEach((t=>{let i="AND"===t.operator;t.conditions.forEach((e=>{("OR"===t.operator&&!1===i||"AND"===t.operator&&!0===i)&&(i=(0,r.pv)(e,p))})),i&&(e=!0)})),g&&!e&&(g=!1)}if((0,r.c)("Show after showMetadataConditions",g,h),void 0!==p&&c.length>0){let e=!1;c.forEach((t=>{let i="AND"===t.operator;t.conditions.forEach((e=>{("OR"===t.operator&&!1===i||"AND"===t.operator&&!0===i)&&(i=(0,r.pv)(e,p))})),i&&(e=!0)})),g&&e&&(g=!1)}if((0,r.c)("Show after hideMetadataConditions",g,c),void 0!==p&&d.length>0&&"started"!==m){let e=!1;d.forEach((t=>{let i="AND"===t.operator;t.conditions.forEach((e=>{("OR"===t.operator&&!1===i||"AND"===t.operator&&!0===i)&&(i=(0,r.pv)(e,p))})),i&&(e=!0)})),g&&!e&&(g=!1)}return(0,r.c)("Show after startMetadataConditions",g,d),g};calculatePolicy=()=>{this.isAvailable()?this.show():this.hide()};handleCloseVoice=()=>{this.setState({isVoiceVisible:!1})};handleWidgetClose=()=>{this.close()};render(){const{instanceId:e,position:t,iconCloseUrl:i,iconOpenUrl:n,preload:o,alternativeChannels:s}=this.props,{opened:l,alreadyOpened:c,widgetOffScreen:d,noRender:h,visible:p,ctaOffScreen:m,imagePreviewUrl:u,unreadMessageBadge:g,ctaActivated:f,ctaActiveConfig:b,iframeVisible:v,hideCtaVisible:x,iconActive:C,sessionTerminated:w,alternativeChannelsOffScreen:V,alternativeChannelsActivated:k,formVisible:y,isVoiceVisible:A,voiceConversationId:S,theme:E,dialogVisible:I,mobileModeEnabled:T}=this.state,R=b.mobileIcon||this.props.mobileIcon,M=t||{desktopBottom:25,desktopRight:25,mobileBottom:R?R.offsetPx:20,mobileRight:R&&R.mode&&"BOTTOM_RIGHT"===R.mode?20:"FLAG_RIGHT"===R.mode?-4:void 0,mobileLeft:R&&R.mode&&"BOTTOM_LEFT"===R.mode?20:"FLAG_LEFT"===R.mode?-4:void 0,mobileOffset:470,desktopIconOffset:75},L=this.state.width(e.desktopCta&&e.desktopCta.header)===(b.desktop&&b.desktop.header)&&(e.desktopCta&&e.desktopCta.text)===(b.desktop&&b.desktop.text))),$=b.desktop&&"Cze\u015b\u0107 :) Jak mog\u0119 Ci pom\xf3c?"===b.desktop.header&&!b.desktop.text,q=!(0,r.nu)()||(0,r.nu)()&&"HIDDEN"!==J.mode,Q=!(0,r.nu)()&&"HIDDEN"!==Z.mode,K=(0,r.nu)()&&("TOP"===j.mode||"BOTTOM"===j.mode),X=this.props.slug?`https://${this.props.slug}.chat.getzowie.com/web/core-chat/`:gt;return a.createElement(a.Fragment,null,a.createElement("div",{style:{opacity:p?1:0,transition:"all 1s cubic-bezier(0.25, 0.8, 0.25, 1)",bottom:h?"-1000px":"unset"},visible:p,offScreen:h},a.createElement("div",{id:"zowieChatbotWrapper",style:{left:O?"0px":M.desktopLeft?M.desktopLeft+"px":void 0,right:O?"0px":M.desktopRight?M.desktopRight+"px":void 0,height:`${G}px`,width:`${F}px`,borderRadius:O?"0px":"8px",opacity:l?1:0,visibility:l?"visible":"hidden",bottom:d||h?"-1000px":l&&O?"0px":l&&!O?`${M.desktopBottom+(M.desktopIconOffset?M.desktopIconOffset:75)}px`:!l&&O?"0px":"80px"},offScreen:d||h,opened:l,width:F,height:G,isMobile:O,position:M},(v||!w&&o)&&a.createElement("iframe",{border:"0",title:"chatbot",frameBorder:"0",width:"100%",height:"100%",onLoad:()=>this.onLoad(),ref:this.iframe,id:"chatbotize-iframe",src:`${X}?headerColorLeft=${encodeURIComponent(this.state.theme.headerBackgroundLeftColor)}&headerColorRight=${encodeURIComponent(this.state.theme.headerBackgroundRightColor)}`,allow:"geolocation"}),_&&S&&a.createElement(Je,{isVisible:A,handleVoiceShow:this.handleShowVoice,handleVoiceClose:this.handleCloseVoice,onWidgetClose:this.handleWidgetClose,chatHeight:G,chatWidth:F,theme:this.state.theme,instanceId:e,voiceConversationId:S,iframeLoaded:this.state.iframeLoaded,isMobile:O,isMicActiveOnStart:this.props.isMicActiveOnStart})),Q&&this.props.isAddButtonsToProactiveChatsExperimentEnabled&&this.props.shouldAddButtonsToProactiveChats&&Y&&$?a.createElement("div",{id:"zowieProactiveButtons",style:{bottom:N||m||h?"-1000px":N?`${M.mobileBottom+50}px`:`${M.desktopBottom+70}px`,right:N?M.mobileRight?M.mobileRight+"px":void 0:M.desktopRight?M.desktopRight+"px":void 0,left:N?M.mobileLeft?M.mobileLeft+"px":void 0:M.desktopLeft?M.desktopLeft+"px":void 0,opacity:!c&&f?1:0,alignItems:N?M.mobileRight?"flex-end":"flex-start":M.desktopRight?"flex-end":"flex-start"},onMouseEnter:this.showCtaHideIcon,onMouseLeave:this.hideCtaHideIcon},a.createElement("span",{className:"element header"},"Wybierz temat"),a.createElement("div",{style:{display:"flex"}},a.createElement("span",{className:"element button",style:{backgroundColor:this.state.theme.primaryColor},role:"img","aria-label":"shipping",onClick:()=>this.onProactiveButtonClick("dodaj_paragon")},"\ud83e\uddfe Dodaj paragon"),a.createElement("span",{className:"element button",style:{backgroundColor:this.state.theme.primaryColor},role:"img","aria-label":"returns",onClick:()=>this.onProactiveButtonClick("zwroty")},"\ud83d\udce6 Zwroty")),a.createElement("span",{className:"element button",style:{backgroundColor:this.state.theme.primaryColor},role:"img","aria-label":"membership",onClick:()=>this.onProactiveButtonClick("program_lojalnosciowy")},"\ud83c\udf1f Program lojalno\u015bciowy")):Q?a.createElement(a.Fragment,null,a.createElement("div",{id:"zowieCallToAction",style:{bottom:N||m||c||!f||h?"-1000px":N?`${M.mobileBottom+50}px`:`${M.desktopBottom+70}px`,right:N?M.mobileRight?M.mobileRight+"px":void 0:M.desktopRight?M.desktopRight+"px":void 0,left:N?M.mobileLeft?M.mobileLeft+"px":void 0:M.desktopLeft?M.desktopLeft+"px":void 0,opacity:!c&&f?1:0,alignItems:N?M.mobileRight?"flex-end":"flex-start":M.desktopRight?"flex-end":"flex-start"},onMouseEnter:this.showCtaHideIcon,onMouseLeave:this.hideCtaHideIcon,onClick:this.onCtaClicked},Z.header&&a.createElement("span",{className:"ctaDesktopHeader"},Z.header),Z.text&&a.createElement("span",{className:"ctaDesktopText"},Z.text),this.props.allowToDisableCta&&a.createElement(P,{visible:x&&("VISIBLE"===Z.mode||"ELEMENT_CLICK"===Z.mode||"ELEMENT_HOVER"===Z.mode),onClick:this.disableCta}))):a.createElement(a.Fragment,null),q&&a.createElement(a.Fragment,null,I&&a.createElement(Ye,{onChatClick:this.handleTextChatDialogButton,onVoiceClick:this.handleVoiceChatDialogButton,theme:this.state.theme.primaryColor,buttonPosition:M,isMobile:O}),a.createElement(H,{position:M,badgeVisible:!d,iconActive:C,isMobile:O,onClick:this.onCtaClicked,onMouseEnter:this.onHoverShowCta,onMouseLeave:this.onHoverHideCta,theme:this.state.theme,offScreen:h,badge:O?-1:g,iconOpenUrl:n,iconCloseUrl:i,personalized:this.props.shouldPersonalizeAgent,isProactiveChatActive:Y,voiceExperienceEnabled:_})),s&&a.createElement("div",{id:"zowieAlternativeChannels",style:{bottom:V||h?"-1000px":N?`${M.mobileBottom+50}px`:`${M.desktopBottom+70}px`,right:N?M.mobileRight?M.mobileRight+"px":void 0:M.desktopRight?M.desktopRight+"px":void 0,left:N?M.mobileLeft?M.mobileLeft+"px":void 0:M.desktopLeft?M.desktopLeft+"px":void 0,opacity:!c&&k?1:0}},a.createElement("p",{id:"zowieAlternativeChannelsHeader"},s.headerText),a.createElement("div",{id:"zowieAlternativeChannelsList"},s.channels.map((e=>a.createElement("a",{href:e.url,key:e.type,target:"_blank"},a.createElement(B,{type:e.type}),a.createElement("p",null,e.title))))),a.createElement("div",{id:"zowieAlternativeChannelsButton",style:{backgroundColor:this.state.theme.primaryColor},onClick:this.toggleChat},a.createElement(z,null),a.createElement("p",null,s.chatButtonCaption))),K&&a.createElement(ft,{color:this.state.theme.primaryColor,mode:j.mode,lines:j.lines,visible:!c&&f||c&&d,onClick:this.toggleChat,onHide:this.disableCta,showHideButton:this.props.allowToDisableCta,selector:j.offset}),a.createElement("div",{id:"zowieShadow",style:{height:`${G}px`,width:`${F}px`,visibility:l?"visible":"hidden",opacity:l?1:0,bottom:d||h?"-1000px":"0"},height:G,opened:l,width:F,offScreen:d||h})),a.createElement("div",{id:"zowieImagePreviewModal",style:{width:u?"100vw":"0px",height:u?"100vh":"0px",bottom:u?"0":"0px",right:u?"0":"0px",backgroundColor:u?"rgba(0, 0, 0, 0.8)":"rgba(0, 0, 0, 0)"},display:u?"block":"none",onClick:()=>this.setState({imagePreviewUrl:void 0})},u&&a.createElement("div",{id:"zowieImagePreviewCloseBar",style:{opacity:u?"1":"0"},display:u?"block":"none",onClick:()=>this.setState({imagePreviewUrl:void 0})},a.createElement(D,{onClick:()=>this.setState({imagePreviewUrl:void 0})})),u&&a.createElement("img",{id:"zowieImagePreview",src:u,alt:"Preview"})))}handleShowVoice=()=>{this.setState({isVoiceVisible:!0})};getConversationId=()=>this.state.voiceConversationId}function xt(){return xt=Object.assign?Object.assign.bind():function(e){for(var t=1;t{window.DD_LOGS&&window.DD_LOGS.getInitConfiguration()||o.yf.init({clientToken:"pubb30704b9371a0643686e8f03a0b19e9b",site:"datadoghq.eu",env:"prod",forwardErrorsToLogs:!1})};function kt(e){const t=e.instanceId;(0,r.c)("Zowie Widget - initializing - "+e.instanceId,e),e.metadata&&(0,r.c)("Zowie Widget - initializing with metadata: ",e.metadata);const[i,n]=a.useState(e.position);a.useEffect((()=>{e.handleUpdatePositionCallback&&e.handleUpdatePositionCallback((e=>n(e)))}));const o=e.metadata?e.metadata:{locale:(0,r.JK)(),timezone:(0,r.Md)()},s=o&&o.locale?o.locale:(0,r.JK)();let l=e.configuration.default;if(s){let t=s.slice(0,2).toLowerCase(),i=s.slice(3,5).toLowerCase();""===i&&(i=void 0),"zh-tw"===s.toLowerCase()&&(t="zhtw"),"zhtw-cn"===s.toLowerCase()&&(t="zhtw",i="cn");const a=e.configuration.locales.find((e=>e.language.toLowerCase()===t&&(!(e.countries.length>0&&void 0!==i)||-1!==e.countries.map((e=>e.toLowerCase())).indexOf(i))));a&&(l=a)}let c=!1,d=!1;"fb64e04d80d141adb1c062f1ed177662"!==t&&"0187725d0e98488baf9839f4c3babb8b"!==t&&"8ab22ee8ec8344a994947ca5868a8e0f"!==t&&"c779d7852f2f4a11b8a9a6e2d7103445"!==t&&"1bce97e58ffe4e6a92bb580a50874822"!==t&&"2b9783e2058440509e1b2c52f84fed7c"!==t&&"52e43e32ea644a109593a4ee18a9915e"!==t&&"3ec3c6fb3e7442b08447dbae2725229e"!==t&&"66604a7daf4a4db894df81dbdd867fd9"!==t&&"c2918d70b2b04f3aa03dd03bf753153a"!==t&&"3590f4ea61fd4b7895bb7a3b924ffb66"!==t&&"9010c514f5cc41d09359ae3b2e938988"!==t&&"432e7ff69c52482b9228904581fc19da"!==t&&"4022f2572992409dacabdd02b8545f50"!==t&&Vt();const h=["configuration","metadata","accessToken","zendeskAccountKey"];Object.fromEntries(Object.entries(e).filter((e=>{let[t,i]=e;return"function"!==typeof i&&!h.includes(t)}))),["55ba5f792e694813b99f99671946396a","6e3950ab36064d0a83af215c0a0be34f","d936d5b23c6e42e6b9ec10b7de1298f5","9be065adf1534e498deb9d682ad2eef5","172a4aca9e4540ccbfc6c29f2535ceed","9109b879d9fb4c81939faf6e7c02bd4d","3dfa76dadef542079d6536510a149289","6c4737ebe00341a8ac37fec8b11aa829","06e47d9dfc034fe3901afb5adfdd3e50","c01a7b0d4c2e46fe893de7b83a04ee21","62cccb5bb8664f38891528c387dec2e7","b3197f4baba94e49bf18d24fdec3fbef","3a974f00361a4e458f736d567e8ae564","9ee6c331ed3f4a0b87075be29e3c760b","18a1e2253c3740ef8cf5ccf553b8e943","fa77bc5416184ff0b497cbb9997fd912","f1d160cf97674a7592a7ffaac24a8c5d","db2ad30789ab49f2a6b457563be01e4b","f196cb3b39f34e65b7c3d18f6ec24d54","ea1aa4935dda466292cca40eae3e4c3a","2bedd937b17c48a0a9eb3bcaf21a8c73","51a18a05eaa24622add74e62aee2b205","2c388f4a949048978720c5684b199ad3","4d73430a424d4c728ca7f806bfd2f04a"].includes(t);void 0!==e.disableMobileCta&&(c=e.disableMobileCta),void 0!==e.disableDesktopCta&&(d=e.disableDesktopCta);let p,m,u=e.primaryLeftColor||e.primaryColor||l.basic.primaryColor||"#3D34BE",g=e.primaryRightColor||e.primaryColor||l.basic.primaryColor||"#3D34BE",f=e.secondaryLeftColor||e.secondaryColor||l.basic.secondaryColor||"#3D34BE",b=e.secondaryRightColor||e.secondaryColor||l.basic.secondaryColor||"#3D34BE",v=e.iconCloseUrl,x=e.iconOpenUrl,C=e.headerMode,w=e.allowDownloadTranscript,V=e.agentAvatar,k=e.chatbotAvatar,y=e.sessionTimeout,A=!0,S=500;const E=e.surface||"desktop-mobile";"90fdf73dfa654cef907452c8231b6254"!==t&&"55ba5f792e694813b99f99671946396a"!==t&&"72b1b6f431d24fa28ba2f00585dd250d"!==t||(y=864e5,u="#FFA666",f="#FFA666",g="#FF6B00",b="#FF6B00",v="https://files.chatbotize.com/empik/icon_close.png",x="https://files.chatbotize.com/empik/icon_open.png",C="white"),"0d923b5e3d2744719c765663d581f9d5"===t&&(y=9e5),"f6222d5ef2484aa48890b6fdc3facbc8"===t&&(y=18e5),"265cc3ff3816493290879fef2fb5b1de"===t&&(y=24192e5),"a54f077e26054bf7b470e8c4c7da015c"===t&&(v="https://files.chatbotize.com/mig/chat-close.svg",x="https://files.chatbotize.com/mig/chat-open.svg"),"21f8c27529bd458f89c9351a9f4bed06"===t&&(v="https://files.chatbotize.com/answear/chat-close.svg",x="https://files.chatbotize.com/answear/chat-open.svg"),"c779d7852f2f4a11b8a9a6e2d7103445"===t&&(v="https://files.chatbotize.com/costco/chat-close.svg",x="https://files.chatbotize.com/costco/chat-open.svg",y=864e5),"inpostdemo"===t&&(w=!1),"265cc3ff3816493290879fef2fb5b1de"===t&&(V="https://files.chatbotize.com/msqc-chuck.png",k="https://files.chatbotize.com/msqc-chuck.png"),"fb64e04d80d141adb1c062f1ed177662"===t&&(V="https://files.chatbotize.com/euro/consultant.svg",k="https://files.chatbotize.com/euro/chatbot.svg"),"0187725d0e98488baf9839f4c3babb8b"===t&&(V="https://files.chatbotize.com/oleole/consultant.svg",k="https://files.chatbotize.com/oleole/chatbot.svg");let I=!!e.showPreChatForm&&e.showPreChatForm;"cfbd880be39b41f8bb29bb92943506ce"!==t&&"1a97e5e1aa4944e3b28a628783d036fc"!==t||(I=!0);let T=e.content?e.content:void 0,R=!!e.allowEndChat&&e.allowEndChat,M=!!e.voiceExperienceEnabled&&e.voiceExperienceEnabled,P=!!e.mobileModeEnabled&&e.mobileModeEnabled,z=e.restartReferral?e.restartReferral:void 0;"f1c3ca86cdd3491099618510dbf8c3b4"!==t&&"3dfa76dadef542079d6536510a149289"!==t||(p="appsflyer",m=300,z="start",T={endChatQuestion:"Would you like to finish and close this widget session? You can continue to correspond on your open tickets via your email.",endChatButtonYesCaption:"Yes",endChatButtonNoCaption:"No",endChatButtonCaption:"End chat",downloadTranscriptButtonCaption:"Download transcript"}),"732e347282da4de586f9992392764a7b"===t&&(A=!1),"ce0a0a8ecc3d41809bbf4dfa34f10056"===t&&(S=1e3);let D=!!e.ecommerceShopifyTracking&&e.ecommerceShopifyTracking||e.configuration.capabilities.ecommerceShopifyTracking,B=!!e.ecommerceBigcommerceTracking&&e.ecommerceBigcommerceTracking,L=!!e.ecommerceMagentoTracking&&e.ecommerceMagentoTracking,N=!!e.ecommerceNopcommerceTracking&&e.ecommerceNopcommerceTracking,O=!!e.ecommerceCustomTracking&&e.ecommerceCustomTracking,W=!e.ecommerceCartWatchEnabled||e.ecommerceCartWatchEnabled;window.Shopify&&(D=!0),"31abf33e41d14051b7a8d66c6bb44171"===t&&(B=!0);"5ba46bb7bc2b4627992752a2ed836fa0"!==t&&"bf2a9fba26b346d3aea3f9d916a8eb93"!==t||(L=!0),"94f883c194b7419591afe1180cee0875"===t&&(N=!0),"1e95020a619049a1825a8ee240d8c72b"===t&&(T={endChatQuestion:"Would you like to close this chat?",endChatButtonYesCaption:"Yes",endChatButtonNoCaption:"No",endChatButtonCaption:"End chat",downloadTranscriptButtonCaption:"Download transcript"},R=!0,y=36e5,L=!0);let U=!1;"4c893f6e4ee94e02b06a992026dc53c4"===t&&(U=!0);let H=!1;"9109b879d9fb4c81939faf6e7c02bd4d"===t&&(H=!0),"9be065adf1534e498deb9d682ad2eef5"!==t&&"172a4aca9e4540ccbfc6c29f2535ceed"!==t||(O=!0);let F=!!e.allowToDisableCta&&e.allowToDisableCta;"fb64e04d80d141adb1c062f1ed177662"!==t&&"0187725d0e98488baf9839f4c3babb8b"!==t&&"abbcfc29333d44dfa2891f1f33e27829"!==t||(F=!0);let _=!!e.preload&&e.preload;"4c893f6e4ee94e02b06a992026dc53c4"===t&&(_=!0);const G="265cc3ff3816493290879fef2fb5b1de"===t||"a706498318d74caf80c7bacd8bd7beb4"===t;let Z=(()=>{if(!G)return!1;const e=(()=>{switch(localStorage.getItem(wt)){case"true":return!0;case"false":return!1;default:return null}})();if(null===e){const e=Math.random()<.5;return localStorage.setItem(wt,JSON.stringify(e)),e}return e})();const j="9ccb8390bac644349674b2532a5b56f9"===t;let J=(()=>{if(!j)return!1;const e=(()=>{switch(localStorage.getItem(Ct)){case"true":return!0;case"false":return!1;default:return}})();if(void 0===e){const e=Math.random()<.5;return localStorage.setItem(Ct,JSON.stringify(e)),e}return e})();return a.createElement(vt,xt({desktopCta:l.desktopCta,mobileCta:l.mobileCta,disableDesktopCta:d,disableMobileCta:c,mobileIcon:l.mobileIcon,proactiveChatConfigs:e.configuration.proactiveChats,metadata:o,surface:E,whitelist:yt(l.placement.whitelist),blacklist:yt(l.placement.blacklist),startOnWhitelist:yt(l.placement.startWhitelist),startOnBlacklist:yt(l.placement.startBlacklist),continueOnWhitelist:yt(l.placement.continueOnWhitelist),continueOnBlacklist:yt(l.placement.continueOnBlacklist),name:l.basic.name,description:l.basic.description,logoUrl:l.basic.logoUrl,engagementMessage:l.basic.engagementMessage,tabNotificationTitle:l.notifications.tabNotificationTitleEnabled?l.notifications.tabNotificationTitle:void 0,webpushNotificationTitleEnabled:l.notifications.webpushNotificationTitleEnabled,hideMetadataConditions:l.hideMetadataConditions,startMetadataConditions:l.startMetadataConditions,showMetadataConditions:l.showMetadataConditions,webpushSoundOn:l.notifications.webpushSoundOn,widgetShowDelay:l.basic.showDelay,authorMode:l.basic.authorMode,availability:l.availability,showOnLoad:!e.showOnLoad||e.showOnLoad,keepOnLoad:!e.keepOnLoad||e.keepOnLoad,startOnOpen:!e.startOnOpen||e.startOnOpen,position:i,sessionTimeout:y,iconCloseUrl:v,iconOpenUrl:x,allowToDisableCta:F,allowToDisableCtaOmitProactiveChats:H,allowEndChat:R,restartReferral:z,submitOnEnter:!e.submitOnEnter||e.submitOnEnter,allowDownloadTranscript:w,agentAvatar:V,chatbotAvatar:k,trackActivity:A,preload:_,sendReferralDelay:S,ecommerceShopifyTracking:D,ecommerceBigcommerceTracking:B,ecommerceMagentoTracking:L,ecommerceNopcommerceTracking:N,ecommerceCustomTracking:O,ecommerceCartWatchEnabled:W,trackingSessionDuration:e.configuration.sessionDurationMinutes,slug:e.configuration.slug,showPreChatForm:I,gorgiasPassReferral:U,content:T,voiceExperienceEnabled:M,mobileModeEnabled:P},e,{isPersonalizeAgentExperimentEnabled:G,shouldPersonalizeAgent:Z,isAddButtonsToProactiveChatsExperimentEnabled:j,shouldAddButtonsToProactiveChats:J,theme:{primaryColor:g,headerBackgroundLeftColor:e.headerBackgroundLeftColor?e.headerBackgroundLeftColor:u,headerBackgroundRightColor:e.headerBackgroundRightColor?e.headerBackgroundRightColor:g,headerTextColor:e.headerTextColor?e.headerTextColor:"#fff",userTextPrimaryColor:e.userTextPrimaryColor?e.userTextPrimaryColor:b,userTextSecondaryColor:e.userTextSecondaryColor?e.userTextSecondaryColor:"#fff",userBackgroundLeftColor:e.userBackgroundLeftColor?e.userBackgroundLeftColor:f,userBackgroundRightColor:e.userBackgroundRightColor?e.userBackgroundRightColor:b,agentTextColor:e.agentTextColor?e.agentTextColor:"#000",agentBackgroundColor:e.agentBackgroundColor?e.agentBackgroundColor:"#F6F6F6",messageWidth:e.messageWidth?e.messageWidth:void 0,headerMode:C,iconsMode:p,fontWeight:m}}))}function yt(e){return Array.isArray(e)&&0===e.length?void 0:e}function At(e,t,i,o){const r=(0,n.H)(e);i.disabled?console.log("Chat disabled"):r.render(a.createElement(kt,xt({},t,{configuration:i,handleShowCallback:e=>{o.show=e},handleHideCallback:e=>{o.hide=e},handleStartCallback:e=>{o.start=e},handleOpenCallback:e=>{o.open=e},handleCloseCallback:e=>{o.close=e},handleIsAvailableCallback:e=>{o.isAvailable=e},handleLogoutCallback:e=>{o.logout=e},handleGetAccessTokenCallback:e=>{o.setAccessTokenCallback=e},handleUpdatePositionCallback:e=>{o.updatePosition=e},handleTrackVisitedProduct:e=>{o.trackVisitedProduct=e},handleTrackCartUpdated:e=>{o.trackCartUpdated=e},handleTrackPurchased:e=>{o.trackPurchased=e},handleUpdateCartCallback:e=>{o.updateCart=e},handleGetDesktopCtaCallback:e=>{o.getDesktopCta=e},handleGetMobileCtaCallback:e=>{o.getMobileCta=e},handleGetConversationIdCallback:e=>{o.getConversationId=e}})))}},225:(e,t,i)=>{i.d(t,{A:()=>s});var a=i(1601),n=i.n(a),o=i(6314),r=i.n(o)()(n());r.push([e.id,'#zowieImagePreviewModal {\n position: fixed;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 30007;\n transition: all 0.5s;\n}\n\n#zowieImagePreviewCloseBar {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n position: absolute;\n top: 0;\n left: 0;\n width: 100vw;\n height: 70px;\n transition: all 0.5s;\n z-index: 30005;\n}\n\n#zowieImagePreview {\n height: auto;\n width: auto;\n max-height: 100%;\n max-width: 100%;\n user-select: none;\n margin: auto;\n z-index: 30004;\n}\n\n#zowieFloatingButton {\n cursor: pointer;\n position: fixed;\n z-index: 30001;\n background-color: transparent;\n width: 60px;\n height: 60px;\n padding: 0;\n margin: 0;\n}\n\n#zowieFloatingButton .background,\n#zowieFloatingButton img {\n width: 60px;\n height: 60px;\n}\n\n#zowieFloatingButtonMobile {\n cursor: pointer;\n position: fixed;\n z-index: 30001;\n background-color: transparent;\n width: 45px;\n height: 45px;\n}\n\n#zowieFloatingButtonMobile .background,\n#zowieFloatingButtonMobile svg,\n#zowieFloatingButtonMobile img {\n width: 45px;\n height: 45px;\n}\n\n#zowieChatbotWrapper {\n position: fixed;\n z-index: -1;\n background-color: white;\n box-shadow: 0 0px 40px rgba(0, 0, 0, 0.15);\n display: flex;\n align-items: center;\n flex-direction: column;\n transition: bottom 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s linear 0.1s;\n z-index: 30005;\n border-radius: 8px;\n overflow: hidden;\n}\n\n#zowieAlternativeChannels {\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 width: 260px;\n background-color: #fff;\n border: 1px solid #e3e3e6;\n box-shadow: 0px 2px 32px rgba(0, 0, 0, 0.12);\n border-radius: 4px;\n}\n\n#zowieAlternativeChannelsHeader {\n font-family: "Segoe UI", "Avenir Next", Helvetica, Arial;\n font-size: 14px;\n line-height: 22px;\n font-weight: 500;\n padding: 8px 16px;\n margin: 0;\n color: #4d4d5c;\n}\n\n#zowieAlternativeChannelsList {\n border-top: 1px solid #e3e3e6;\n border-bottom: 1px solid #e3e3e6;\n display: flex;\n align-items: flex-start;\n flex-direction: column;\n}\n\n#zowieAlternativeChannelsList>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(at right bottom,\n rgba(29, 39, 54, 0.16) 0%,\n rgba(29, 39, 54, 0) 72%);\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}',""]);const s=r},9765:(e,t,i)=>{e.exports=i.p+"32b19ebfe9330482eb7d.js"}}]);