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at.js","webpack://_N_E/"],"sourcesContent":["export const AnalyticsConstants = Object.freeze({\n collapseText: 'Collapse Link',\n expandText: 'Expand Link',\n learnMoreText: 'Learn More',\n countrySelectorText: 'Open Country Selector Panel',\n openVideoText: 'Open Video',\n buttonPriceText: 'Open Price Panel',\n contentVideoOverlayText: 'Outside Panel',\n videoPlayText: 'Play',\n videoPauseText: 'Pause',\n videoMuteText: 'Sound: Off',\n videoUnmuteText: 'Sound: On',\n videoCloseCaptionsOnText: 'Caption: On',\n videoCloseCaptionsOffText: 'Caption: Off',\n videoFullscreenOnText: 'Full Screen: On',\n videoFullscreenOffText: 'Full Screen: Off',\n dropdownMenu: 'Dropdown Menu',\n rotationView: '360 View',\n facebook: 'Facebook',\n twitter: 'Twitter',\n openLiveChat: 'Open Live Chat',\n expandFaq: 'Expand FAQ',\n previousPage: 'Previous Page',\n nextPage: 'Next Page',\n promoRedeem: 'Redeem: '\n});","import PropTypes from 'prop-types';\nimport React, { useEffect, useState } from 'react';\nimport dynamic from 'next/dynamic';\nconst Icon = dynamic(() => import('../Icon/Icon'));\nimport {PypestreamChatConstants} from '../../adapters/helpers/Constants';\nimport { AnalyticsConstants } from '../../adapters/helpers/ConstantsGA';\nimport Modal from 'react-modal';\nconst Image = dynamic(() => import('../Image/Image'))\n\nlet windowObjectReference = null;\n\nfunction PypestreamChat(props) {\n /* global Pypestream */\n\n const modalDelay = props.document?.fields?.modalDelay;\n const popUpDisabled = props.document?.fields?.popUpDisabled || false;\n const moduleId = props.document?.fields?.moduleId;\n const modalTitle = props.document?.fields?.modalTitle;\n const modalContent = props.document?.fields?.modalContent;\n const modalBackgroundImage = props.document?.fields?.modalBackgroundImage;\n const modalAcceptButtonLabel = props.document?.fields?.modalAcceptButtonLabel;\n const modalDeclineButtonLabel = props.document?.fields?.modalDeclineButtonLabel;\n const toggleChatLabel = props.document?.fields?.toggleChatLabel;\n const toggleButtonIcon = props.document?.fields?.toggleButtonIcon;\n const apiScript = props.document?.fields?.apiScriptUrl;\n const configId = props.document?.fields?.configId;\n const configDomain = props.document?.fields?.configDomain;\n const configEnv = props.document?.fields?.configEnv;\n const configBeta = props.document?.fields?.configBeta;\n const localStorageVariable = PypestreamChatConstants.persistentChatTriggered + moduleId;\n const proChat = props.document?.fields?.proChat;\n const closeButtonIcon = props.document?.fields?.closeModel;\n\n const customModalStyles = {\n overlay: {\n backgroundColor: 'rgba(0, 0, 0, 0.5)',\n zIndex: 200\n },\n content : {\n background : 'none',\n border : 'none',\n borderRadius : '0',\n top : '50%',\n left : '50%',\n right : 'auto',\n bottom : 'auto',\n fontSize : '1.4rem',\n lineHeight : '2.1rem',\n marginRight : '-50%',\n padding : '0',\n maxWidth : '530px',\n transform : 'translate(-50%, -50%)',\n width : '90%'\n }\n };\n\n const [modalIsOpen, setModalIsOpen] = useState(false);\n const [modalWasVisited, setModalWasVisited] = useState(false);\n const [proChatVisited, setProChatVisited] = useState(false);\n const [visibility, setVisibility] = useState(true);\n const [macStyle, setMacStyle] = useState(false);\n const [isBusinessHours, setIsBusinessHours] = useState(false);\n const [chatUrl, setChatUrl] = useState('');\n const [isAgentActive, setIsAgentActive] = useState(false);\n\n const launchChat = () => {\n let chatContainer = document.getElementById(moduleId +'-module-container');\n\n closeModal();\n\n Pypestream('config', {\n domain: configDomain,\n env: configEnv,\n beta: configBeta\n });\n\n Pypestream('boot', {\n APP_ID: configId\n }, chatContainer);\n };\n\n const toggleChatLink = () => {\n window.open(apiScript, 'newwindow', 'width=300,height=400, bottom=0')\n };\n\n const toggleChat = () => {\n if(chatWasVisited) {\n Pypestream('toggle');\n } else {\n launchChat();\n }\n };\n\n const closeChatBot = (e) => {\n setModalWasVisited(false);\n e.stopPropagation();\n };\n\n const closeModal = () => {\n setModalIsOpen(false);\n setModalWasVisited(true);\n localStorage.setItem(localStorageVariable, true);\n };\n\n const appendScript = () => {\n const script = document.createElement('script');\n script.src = apiScript;\n script.async = true;\n document.head.appendChild(script);\n };\n\n const openChart = () => { \n console.log('openChart log'); \n if(windowObjectReference == null || windowObjectReference.closed) {\n windowObjectReference = window.open(apiScript, '', 'width=400,height=600,top=150,left=10');\n } else {\n windowObjectReference.focus();\n }\n }\n\n useEffect(() => {\n fetch(process.env.LIVECHAT_IFRAME_URL)\n .then(res => res.json())\n .then((result) => {\n setIsBusinessHours(result.withinBusinessHours);\n setChatUrl(result.chatUrl);\n setIsAgentActive(result.isAgentActive);\n }).catch((error) => {\n console.error(error);\n });\n appendScript();\n const persistentChatTriggered = localStorage.getItem(localStorageVariable);\n const macOs = navigator && navigator.userAgent && navigator.userAgent.indexOf('Mac OS X') != -1;\n setMacStyle(macOs);\n\n \n\n if (popUpDisabled) {\n setTimeout(() => {\n setModalIsOpen(true);\n setModalWasVisited(true);\n }, (modalDelay*1000));\n }\n }, []);\n\n let chatStatus = isBusinessHours && isAgentActive ? PypestreamChatConstants.chatNow : isBusinessHours && !isAgentActive ? PypestreamChatConstants.chatBusy : !isBusinessHours && !isAgentActive ? PypestreamChatConstants.chatClosed : '';\n\n return (\n
\n {modalWasVisited && \n
\n
setVisibility()} onKeyDown={() => setVisibility()} \n aria-label={'close'}>\n \n
\n
proChat ? isBusinessHours && isAgentActive ? openChart() : '' : toggleChat()}>\n
\n {modalTitle &&\n

{modalTitle}

\n }\n {modalContent &&
\n

{modalContent}

\n

{PypestreamChatConstants.chatIsOpen}

\n

{PypestreamChatConstants.chatTime}

\n }\n \n
\n \n
\n
\n }\n \n\n
\n
\n\n {!modalWasVisited &&\n \n
\n \n
\n
\n {modalTitle &&\n

{modalTitle}

\n }\n {modalContent &&\n

{modalContent}

\n }\n
\n\n
\n \n\n \n
\n
\n \n
\n \n }\n
\n );\n}\n\nexport default PypestreamChat;\n\nPypestreamChat.propTypes = {\n document: PropTypes.object\n};","\"use strict\";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[45],{75176:function(e,t,n){n.d(t,{k:function(){return o}});var o=Object.freeze({collapseText:\"Collapse Link\",expandText:\"Expand Link\",learnMoreText:\"Learn More\",countrySelectorText:\"Open Country Selector Panel\",openVideoText:\"Open Video\",buttonPriceText:\"Open Price Panel\",contentVideoOverlayText:\"Outside Panel\",videoPlayText:\"Play\",videoPauseText:\"Pause\",videoMuteText:\"Sound: Off\",videoUnmuteText:\"Sound: On\",videoCloseCaptionsOnText:\"Caption: On\",videoCloseCaptionsOffText:\"Caption: Off\",videoFullscreenOnText:\"Full Screen: On\",videoFullscreenOffText:\"Full Screen: Off\",dropdownMenu:\"Dropdown Menu\",rotationView:\"360 View\",facebook:\"Facebook\",twitter:\"Twitter\",openLiveChat:\"Open Live Chat\",expandFaq:\"Expand FAQ\",previousPage:\"Previous Page\",nextPage:\"Next Page\",promoRedeem:\"Redeem: \"})},10045:function(e,t,n){n.r(t);var o=n(67294),l=n(5152),a=n.n(l),i=n(24036),s=n(75176),c=n(83253),d=n.n(c),r=n(85893),u=(a()((function(){return Promise.resolve().then(n.bind(n,80713))}),{loadableGenerated:{webpack:function(){return[80713]}}}),a()((function(){return Promise.all([n.e(7776),n.e(8689)]).then(n.bind(n,68689))}),{loadableGenerated:{webpack:function(){return[68689]}}})),m=null;t.default=function(e){var t,n,l,a,c,p,h,b,f,v,x,g,y,N,C,j,k,w,O,P,T,S,I,_,L,A,B,E,M,D,F,V,z,R,U=null==(t=e.document)||null==(n=t.fields)?void 0:n.modalDelay,q=(null==(l=e.document)||null==(a=l.fields)?void 0:a.popUpDisabled)||!1,G=null==(c=e.document)||null==(p=c.fields)?void 0:p.moduleId,H=null==(h=e.document)||null==(b=h.fields)?void 0:b.modalTitle,W=null==(f=e.document)||null==(v=f.fields)?void 0:v.modalContent,K=null==(x=e.document)||null==(g=x.fields)?void 0:g.modalBackgroundImage,Q=null==(y=e.document)||null==(N=y.fields)?void 0:N.modalAcceptButtonLabel,X=null==(C=e.document)||null==(j=C.fields)?void 0:j.modalDeclineButtonLabel,J=null==(k=e.document)||null==(w=k.fields)?void 0:w.toggleChatLabel,Y=null==(O=e.document)||null==(P=O.fields)?void 0:P.toggleButtonIcon,Z=null==(T=e.document)||null==(S=T.fields)?void 0:S.apiScriptUrl,$=null==(I=e.document)||null==(_=I.fields)?void 0:_.configId,ee=null==(L=e.document)||null==(A=L.fields)?void 0:A.configDomain,te=null==(B=e.document)||null==(E=B.fields)?void 0:E.configEnv,ne=null==(M=e.document)||null==(D=M.fields)?void 0:D.configBeta,oe=i.hN.persistentChatTriggered+G,le=null==(F=e.document)||null==(V=F.fields)?void 0:V.proChat,ae=null==(z=e.document)||null==(R=z.fields)?void 0:R.closeModel,ie=(0,o.useState)(!1),se=ie[0],ce=ie[1],de=(0,o.useState)(!1),re=de[0],ue=de[1],me=(0,o.useState)(!1),pe=(me[0],me[1],(0,o.useState)(!0)),he=pe[0],be=pe[1],fe=(0,o.useState)(!1),ve=fe[0],xe=fe[1],ge=(0,o.useState)(!1),ye=ge[0],Ne=ge[1],Ce=(0,o.useState)(\"\"),je=(Ce[0],Ce[1]),ke=(0,o.useState)(!1),we=ke[0],Oe=ke[1],Pe=function(){var e=document.getElementById(G+\"-module-container\");Te(),Pypestream(\"config\",{domain:ee,env:te,beta:ne}),Pypestream(\"boot\",{APP_ID:$},e)},Te=function(){ce(!1),ue(!0),localStorage.setItem(oe,!0)};(0,o.useEffect)((function(){var e;fetch(\"https://kardia.azure-api.net/ChatAvail/v1?brand=oral-b&country=za&language=en\").then((function(e){return e.json()})).then((function(e){Ne(e.withinBusinessHours),je(e.chatUrl),Oe(e.isAgentActive)})).catch((function(e){console.error(e)})),(e=document.createElement(\"script\")).src=Z,e.async=!0,document.head.appendChild(e);localStorage.getItem(oe);var t=navigator&&navigator.userAgent&&-1!=navigator.userAgent.indexOf(\"Mac OS X\");xe(t),q&&setTimeout((function(){ce(!0),ue(!0)}),1e3*U)}),[]);var Se=ye&&we?i.hN.chatNow:ye&&!we?i.hN.chatBusy:ye||we?\"\":i.hN.chatClosed;return(0,r.jsxs)(\"div\",{children:[re&&(0,r.jsxs)(\"div\",{className:\" \".concat(ve?\"mac-pypestream-toggle\":\"\",\" ob-pypestream-toggle-button event_button_click \").concat(he?\"display-block\":\"hidden-block\"),\"data-action-detail\":s.k.openLiveChat,children:[(0,r.jsx)(\"div\",{id:\"close_pypestream\",role:\"button\",tabIndex:0,className:\"ob-app-store__close-button event_button_click\",onClick:function(){return be()},onKeyDown:function(){return be()},\"aria-label\":\"close\",children:(0,r.jsx)(u,{image:ae})}),(0,r.jsxs)(\"div\",{tabIndex:0,\"aria-label\":J.fields.text,className:Se===i.hN.chatNow?\"ob-pystream-cursorpoint\":\"ob-pystream-cursorarrow\",onClick:function(){return le?ye&&we?(console.log(\"openChart log\"),void(null==m||m.closed?m=window.open(Z,\"\",\"width=400,height=600,top=150,left=10\"):m.focus())):\"\":void(chatWasVisited?Pypestream(\"toggle\"):Pe())},children:[(0,r.jsxs)(\"div\",{className:\"ob-pystream-chat-content\",children:[H&&(0,r.jsx)(\"p\",{className:\"ob-pystream-title\",children:H}),W&&(0,r.jsxs)(\"div\",{children:[(0,r.jsx)(\"p\",{className:\"ob-pystream-subtitle\",children:W}),(0,r.jsx)(\"p\",{className:\"ob-pystream-chatstatus\",children:i.hN.chatIsOpen}),(0,r.jsx)(\"p\",{className:\"ob-pystream-subchatstatus\",children:i.hN.chatTime})]}),(0,r.jsx)(\"button\",{className:\"ob-chat-btn-status \".concat(Se===i.hN.chatNow?\"ob-pystream-cursorpoint\":\"ob-pystream-cursorarrow\"),children:Se})]}),(0,r.jsx)(u,{image:Y})]})]}),(0,r.jsx)(\"div\",{className:\"ob-pypestream-chat-container\",id:G+\"-module-container\"}),!re&&(0,r.jsx)(d(),{isOpen:se,onRequestClose:Te,closeTimeoutMS:250,style:{overlay:{backgroundColor:\"rgba(0, 0, 0, 0.5)\",zIndex:200},content:{background:\"none\",border:\"none\",borderRadius:\"0\",top:\"50%\",left:\"50%\",right:\"auto\",bottom:\"auto\",fontSize:\"1.4rem\",lineHeight:\"2.1rem\",marginRight:\"-50%\",padding:\"0\",maxWidth:\"530px\",transform:\"translate(-50%, -50%)\",width:\"90%\"}},children:(0,r.jsx)(\"div\",{className:\"ob-pypestream-modal\",children:(0,r.jsx)(u,{image:K,children:(0,r.jsxs)(\"div\",{className:\"ob-pypestream-modal-content\",children:[(0,r.jsxs)(\"div\",{className:\"ob-pypestream-modal-copy\",children:[H&&(0,r.jsx)(\"p\",{children:H}),W&&(0,r.jsx)(\"p\",{children:W})]}),(0,r.jsxs)(\"div\",{className:\"ob-pypestream-modal-button-container\",children:[(0,r.jsx)(\"button\",{\"aria-label\":Q,className:\"ob-pypestream-modal-button launch\",onClick:Pe,children:Q}),(0,r.jsx)(\"button\",{\"aria-label\":X,className:\"ob-pypestream-modal-button close\",onClick:Te,children:X})]})]})})})})]})}}}]);"],"names":["self","webpackChunk_N_E","push","e","t","n","d","k","o","Object","freeze","collapseText","expandText","learnMoreText","countrySelectorText","openVideoText","buttonPriceText","contentVideoOverlayText","videoPlayText","videoPauseText","videoMuteText","videoUnmuteText","videoCloseCaptionsOnText","videoCloseCaptionsOffText","videoFullscreenOnText","videoFullscreenOffText","dropdownMenu","rotationView","facebook","twitter","openLiveChat","expandFaq","previousPage","nextPage","promoRedeem","r","l","a","i","s","c","u","Promise","resolve","then","bind","loadableGenerated","webpack","all","m","default","p","h","b","f","v","x","g","y","N","C","j","w","O","P","T","S","I","_","L","A","B","E","M","D","F","V","z","R","U","document","fields","modalDelay","q","popUpDisabled","G","moduleId","H","modalTitle","W","modalContent","K","modalBackgroundImage","Q","modalAcceptButtonLabel","X","modalDeclineButtonLabel","J","toggleChatLabel","Y","toggleButtonIcon","Z","apiScriptUrl","$","configId","ee","configDomain","te","configEnv","ne","configBeta","oe","hN","persistentChatTriggered","le","proChat","ae","closeModel","ie","useState","se","ce","de","re","ue","me","pe","he","be","fe","ve","xe","ge","ye","Ne","Ce","je","ke","we","Oe","Pe","getElementById","Te","Pypestream","domain","env","beta","APP_ID","localStorage","setItem","useEffect","fetch","json","withinBusinessHours","chatUrl","isAgentActive","catch","console","error","createElement","src","async","head","appendChild","getItem","navigator","userAgent","indexOf","setTimeout","Se","chatNow","chatBusy","chatClosed","jsxs","children","className","concat","jsx","id","role","tabIndex","onClick","onKeyDown","image","text","log","closed","window","open","focus","chatWasVisited","chatIsOpen","chatTime","isOpen","onRequestClose","closeTimeoutMS","style","overlay","backgroundColor","zIndex","content","background","border","borderRadius","top","left","right","bottom","fontSize","lineHeight","marginRight","padding","maxWidth","transform","width"],"sourceRoot":""}