!function(){"use strict";function e(e,t){return e+t}const{hasOwnProperty:t}={};function n(e,n){return t.call(n,e)}function i(){return i=Object.assign||function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),o=1;t>o;o++)i[o-1]=arguments[o];return i.forEach(t=>{for(const i in t)n(i,t)&&(e[i]=t[i])}),e},i.apply(void 0,arguments)}function o(e){return Array.isArray(e)}function r(e){return"object"==typeof e&&null!==e&&!o(e)}function a(e){if("keys"in Object&&"function"==typeof Object.keys)return Object.keys(e);const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}function s(e,t){return a(t).reduce((n,i)=>(n[i]=e(t[i]),n),{})}function c(e){return o(e)?e.map(c):r(e)?s(c,e):e}function l(e){return o(e)?e.filter(e=>null!=e&&!Number.isNaN(e)):Object.keys(e).reduce((t,n)=>{const i=e[n];return null==i||Number.isNaN(i)||(t[n]=i),t},{})}function d(e,t){let n;return function(){clearTimeout(n);for(var i=arguments.length,o=Array(i),r=0;i>r;r++)o[r]=arguments[r];n=setTimeout.apply(void 0,[t,e].concat(o))}}function u(e,t){for(let n=0;t.length>n;n++){const i=t[n];if(e(i))return i}}function m(e,t){for(let n=t.length-1;n>=0;n--)if(e(t[n]))return t[n]}function p(e){return e}function f(e,t){return a(t).forEach(n=>{e(t[n],n)})}function g(){return Math.random().toString(36).substring(2)}function h(e){const t=g();return n(t,e)?h(e):t}function v(e,t,n){const i=function(e,t){const n="string"==typeof e?e.split("."):e;let i=0,o=t;for(;o&&n.length>i;)o=o[n[i++]];return o}(t,n);return null!=i?i:e}function w(e,t){return-1!==t.indexOf(e)}function _(e){return 0===(o(e)?e:Object.keys(e)).length}function y(e){return!e}function b(e){return!!e}function x(e){return e.length>0?e[e.length-1]:void 0}function k(e,t){return a(t).reduce((n,i)=>(Object.defineProperty(n,e(i),{value:t[i],enumerable:!0}),n),{})}function E(e,t){if(_(t))return e;const i={};return f((a,s)=>{if(n(s,t))if(r(e[s])&&r(t[s]))i[s]=E(e[s],t[s]);else if(o(e[s])&&o(t[s])){const n=Math.max(e[s].length,t[s].length);i[s]=Array(n);for(let o=0;n>o;o++)o in t[s]?i[s][o]=t[s][o]:o in e[s]&&(i[s][o]=e[s][o])}else i[s]=t[s];else i[s]=e[s]},e),f((e,o)=>{n(o,i)||(i[o]=t[o])},t),i}function C(e){if(0===e.length)return{};const[t,...n]=e;return n.reduce((e,t)=>E(e,t),t)}function I(e){return function(e,t){const i={};return function(){const o=e.apply(void 0,arguments);if(n(o,i))return i[o];const r=t.apply(void 0,arguments);return i[o]=r,r}}(p,e)}function L(){}function A(e,t){return e.reduce((e,n)=>(e[n]=t[n],e),{})}function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},T.apply(null,arguments)}function P(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function z(e,t){if(P(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const i=Object.keys(e);if(i.length!==Object.keys(t).length)return!1;for(let o=0;i.length>o;o++)if(!n(i[o],t)||!P(e[i[o]],t[i[o]]))return!1;return!0}function M(t){return t.reduce(e,0)}function S(e){return Array.prototype.slice.call(e)}function O(e){return a(e).map(t=>[t,e[t]])}const D=(()=>{try{return!1}catch(e){return!1}})(),F="not_ready",N="ready",B="bootstrapped",j="eu-west3";var W=Object.freeze({__proto__:null,FRA_A:"fra-a",FRA_B:"fra-b",FRA:"fra",EU_WEST3:j,DAL:"dal"});const H=e=>(e=>{const t="string"==typeof e?parseInt(e,10):e;return(e=>"number"==typeof e&&e>=0)(t)?t:null})(void 0!==e.group?e.group:e.skill);var q="__test_storage_support__",V="@@test",R=function(e){void 0===e&&(e="local");try{var t="session"===e?window.sessionStorage:window.localStorage;return t.setItem(q,V),t.getItem(q)!==V?!1:(t.removeItem(q),!0)}catch(e){return!1}},G=function(){var e=Object.create(null);return{getItem:function(t){var n=e[t];return"string"==typeof n?n:null},setItem:function(t,n){e[t]=n},removeItem:function(t){delete e[t]},clear:function(){e=Object.create(null)}}}();const Y=e=>O(e).map(e=>e.map(encodeURIComponent).join("=")).join("&"),U=e=>{const t=function(e){return e.reduce((e,t)=>{let[n,i]=t;return e[n]=i,e},{})}(e.split("&").filter(Boolean).map(e=>e.split("=").map(e=>decodeURIComponent(e.replace("+","%20")))).map(e=>2===e.length?e:[e[0],""]));return t},X=/(?:[^:]+:\/\/)?([^/\s]+)/;const J=/[^:]+:\/\/[^(/|?)\s]+/,K=e=>{const t=e.match(J);return t&&t[0]},$=/.*?\?([^#]+)/,Z=e=>{const t=e.match($);return t?"?"+t[1]:""},Q=e=>e.replace(/^\?/,""),ee=e=>{if(null===K(e))return U(Q(e));const t=Q(Z(e));return t?U(t):{}},te=(e,t)=>ee(t)[e],ne=/^(?:https?:)?\/\/[^/]+\/([^?#]+)/,ie=e=>{const t=e.match(ne);return"/"+(t&&t[1]||"")},oe=e=>e.replace(/\w/g,"$&[\\r\\n\\t]*");RegExp("^[\0-]*("+oe("javascript")+"|"+oe("data")+"):","i");const re=/^((http(s)?:)?\/\/)/,ae=/^((http(s)?:)?\/\/)/,se=e=>{const t=e.match(ae);return t?t[2]:null},ce=(e,t)=>{if(-1===e.indexOf("?"))return e;const n=ee(e);if(_(n))return e;if(Object.keys(n).every(e=>!t.includes(e)))return e;t.forEach(e=>delete n[e]);const[i]=e.split("?"),o=((e,t)=>{if(0===Object.keys(t).length)return e;const n=K(e),i=ie(e),o=Z(e)?ee(e):{},r=Y(T({},o,t));return e.indexOf("#")>-1?""+n+i+"?"+r+"#"+e.split("#")[1]:""+n+i+"?"+r})(i,n);return e.indexOf("#")>-1?o+"#"+e.split("#")[1]:o},le=e=>"https://"+(e=>e.replace(re,""))(e),de="cw_configurator";var ue=e=>(t,n)=>{if(0!==t)return;if("function"!=typeof e)return n(0,()=>{}),void n(2);let i,o=!1;n(0,e=>{o||(o=2===e,o&&"function"==typeof i&&i())}),o||(i=e(e=>{o||n(1,e)},e=>{o||void 0===e||(o=!0,n(2,e))},()=>{o||(o=!0,n(2))}))};const me=e=>(t,n)=>{if(0!==t)return;let i,o;function r(e,t){1===e&&(o||i)(1,t),2===e&&(o&&o(2),i&&i(2))}e(0,(e,t)=>{if(0===e)i=t,n(0,r);else if(1===e){const e=t;o&&o(2),e(0,(e,t)=>{0===e?(o=t,o(1)):1===e?n(1,t):2===e&&t?(i&&i(2),n(2,t)):2===e&&(i?(o=void 0,i(1)):n(2))})}else 2===e&&t?(o&&o(2),n(2,t)):2===e&&(o?i=void 0:n(2))})};var pe=function(e,t){return e===t};function fe(e){return void 0===e&&(e=pe),function(t){return function(n,i){if(0===n){var o,r,a=!1;t(0,function(t,n){0===t&&(r=n),1===t?a&&e(o,n)?r(1):(a=!0,o=n,i(1,n)):i(t,n)})}}}}var ge=e=>t=>(n,i)=>{if(0!==n)return;let o;t(0,(t,n)=>{0===t?(o=n,i(t,n)):1===t?e(n)?i(t,n):o(1):i(t,n)})};var he=e=>t=>{let n;t(0,(t,i)=>{0===t&&(n=i),1===t&&e(i),1!==t&&0!==t||n(1)})};const ve=(e,t,n)=>(i,o)=>{if(0!==i)return;let r=!1;const a=e=>{o(1,e)};o(0,i=>{2===i&&(r=!0,e.removeEventListener(t,a,n))}),r||e.addEventListener(t,a,n)};var we=function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return(e,n)=>{if(0!==e)return;const i=t.length,o=Array(i);let r=0,a=0;const s=e=>{if(0!==e)for(let t=0;i>t;t++)o[t]&&o[t](e)};for(let e=0;i>e;e++)t[e](0,(t,c)=>{0===t?(o[e]=c,1===++r&&n(0,s)):2===t?(o[e]=void 0,++a===i&&n(2)):n(t,c)})}};function _e(e,t){return ue(n=>(e.on(t,n),()=>{e.off(t,n)}))}!function(e){var t,n=e.Symbol;"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable"}("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")());var ye=function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];let i=t[0];for(let e=1,n=t.length;n>e;e++)i=t[e](i);return i};var be=e=>t=>(n,i)=>{if(0!==n)return;let o;t(0,(t,n)=>{0===t?(o=n,i(0,(e,t)=>{0!==e&&o(e,t)}),i(1,e)):i(t,n)})};var xe=e=>t=>(n,i)=>{0===n&&t(0,(t,n)=>{i(t,1===t?e(n):n)})};function ke(e){return t=>me(xe(e)(t))}var Ee=function(){};function Ce(e,t){0===e&&t(0,Ee)}function Ie(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return function(e,n){if(0===e){var i=!1;for(n(0,function(e){2===e&&(i=!0,t.length=0)});0!==t.length;)n(1,t.shift());i||n(2)}}}function Le(e){return function(t,n){if(0===t){var i,o,r,a=0;e(0,function(e,t){if(0===e&&(r=t),1===e){var s=[o,t];i=s[0],o=s[1],2>++a?r(1):n(1,[i,o])}else n(e,t)})}}}var Ae=function(){},Te={};function Pe(e){var t,n,i=[],o=!1,r=Te;return function(a,s){if(0===a){if(r!==Te)return s(0,Ae),o&&s(1,n),void s(2,r);i.push(s);var c=function(e,n){if(2!==e)r===Te&&t(e,n);else{var o=i.indexOf(s);-1!==o&&i.splice(o,1)}};1!==i.length?(s(0,c),o&&r===Te&&s(1,n)):e(0,function(e,a){if(0===e)return t=a,void s(0,c);1===e&&(o=!0,n=a);var l=i.slice(0);2===e&&(r=a,i=null),l.forEach(function(t){t(e,a)})})}}}var ze=e=>t=>(n,i)=>{if(0!==n)return;let o,r=0;t(0,(t,n)=>{0===t?(o=n,i(t,n)):1===t&&e>r?(r++,o(1)):i(t,n)})};const Me=function(e){return void 0===e&&(e={}),t=>{"function"==typeof e&&(e={next:e});let n,{next:i,error:o,complete:r}=e;t(0,(e,t)=>{0===e&&(n=t),1===e&&i&&i(t),1!==e&&0!==e||n(1),2===e&&!t&&r&&r(),2===e&&t&&o&&o(t)});return()=>{n&&n(2)}}};var Se=e=>t=>(n,i)=>{if(0!==n)return;let o,r=0;function a(t,n){e>r&&o(t,n)}t(0,(t,n)=>{0===t?(o=n,i(0,a)):1===t?e>r&&(r++,i(t,n),r===e&&(i(2),o(2))):i(t,n)})};const Oe={},De=e=>t=>(n,i)=>{if(0!==n)return;let o,r,a=!1,s=Oe;t(0,(t,n)=>{if(0===t)return o=n,e(0,(e,t)=>0===e?(r=t,void r(1)):1===e?(s=void 0,r(2),o(2),void(a&&i(2))):void(2===e&&(r=null,t&&(s=t,o(2),a&&i(e,t))))),a=!0,i(0,(e,t)=>{s===Oe&&(2===e&&r&&r(2),o(e,t))}),void(s!==Oe&&i(2,s));2===t&&r(2),i(t,n)})};function Fe(e){return new Promise(function(t,n){Me({next:t,error:n,complete:function(){var e=Error("No elements in sequence.");e.code="NO_ELEMENTS",n(e)}})(function(e){return function(t,n){if(0===t){var i,o,r=!1,a=!1;e(0,function(e,t){return 0===e?(i=t,void n(0,function(e,t){2===e&&(a=!0),i(e,t)})):1===e?(r=!0,o=t,void i(1)):void(2===e&&!t&&r&&(n(1,o),a)||n(e,t))})}}}(e))})}var Ne=function(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},n.exports),n.exports}(function(e,t){function n(e,t){return e===t}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n,i=null,o=null;return function(){return function(e,t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var i=t.length,o=0;i>o;o++)if(!e(t[o],n[o]))return!1;return!0}(t,i,arguments)||(o=e.apply(null,arguments)),i=arguments,o}}function o(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;t>o;o++)n[o-1]=arguments[o];return function(){for(var t=arguments.length,o=Array(t),r=0;t>r;r++)o[r]=arguments[r];var a=0,s=o.pop(),c=function(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(e){return"function"==typeof e})){var n=t.map(function(e){return typeof e}).join(", ");throw Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+n+"]")}return t}(o),l=e.apply(void 0,[function(){return a++,s.apply(null,arguments)}].concat(n)),d=i(function(){for(var e=[],t=c.length,n=0;t>n;n++)e.push(c[n].apply(null,arguments));return l.apply(null,e)});return d.resultFunc=s,d.recomputations=function(){return a},d.resetRecomputations=function(){return a=0},d}}t.__esModule=!0,t.defaultMemoize=i,t.createSelectorCreator=o,t.createStructuredSelector=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r;if("object"!=typeof e)throw Error("createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);var n=Object.keys(e);return t(n.map(function(t){return e[t]}),function(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];return t.reduce(function(e,t,i){return e[n[i]]=t,e},{})})};var r=t.createSelector=o(i)}),Be=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._cache={}}return e.prototype.set=function(e,t){this._cache[e]=t},e.prototype.get=function(e){return this._cache[e]},e.prototype.remove=function(e){delete this._cache[e]},e.prototype.clear=function(){this._cache={}},e}();function je(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];var i=Be;return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=void 0,r=void 0;"function"==typeof n?(console.warn('[re-reselect] Deprecation warning: "selectorCreator" argument is discouraged and will be removed in the upcoming major release. Please use "options.selectorCreator" instead.'),o=new i,r=n):(o=n.cacheObject||new i,r=n.selectorCreator||Ne.createSelector);var a=function(){var n=e.apply(void 0,arguments);if("string"==typeof n||"number"==typeof n){var i=o.get(n);return void 0===i&&(i=r.apply(void 0,t),o.set(n,i)),i.apply(void 0,arguments)}};return a.getMatchingSelector=function(){var t=e.apply(void 0,arguments);return o.get(t)},a.removeMatchingSelector=function(){var t=e.apply(void 0,arguments);o.remove(t)},a.clearCache=function(){o.clear()},a.resultFunc=t[t.length-1],a}}const We=(e,t)=>t,He=(e,t)=>(e=>e.entities.chats.byIds)(e)[t],qe=je([(e,t)=>He(e,t).events.orderedIds,(e,t)=>He(e,t).events.byIds],(e,t)=>e.map(e=>t[e]))(We),Ve=je([He,qe],(e,t)=>T({},e,{events:t}))(We),Re=e=>e.entities.users.byIds,Ge=e=>Re(e)[(e=>e.session.id)(e)],Ye=(e,t)=>Re(e)[t],Ue=e=>Ge(e).id;je([qe,Ue],(e,t)=>m(e=>{let{delivered:n,author:i}=e;return n&&i===t},e))(We),je([qe,Ue],(e,t)=>m(e=>{let{seen:n,author:i}=e;return n&&i===t},e))(We);const Xe={boosters:!0,form:!0,system_message:!0};Ne.createSelector([qe,e=>Ge(e).id],(e,t)=>{return function(e,t,n){for(let i=t;i>=0;i--)if(e(n[i]))return i;return-1}(e=>e.author===t&&"message"===e.type&&!(e.properties&&"file"===e.properties.serverType)||!0===e.seen&&!Xe[e.type]&&!!e.serverId,(n=e).length-1,n);var n}),je([(e,t)=>He(e,t).participants,Re],(e,t)=>e.map(e=>t[e]))(We);function Je(e,t){if(void 0===t)return e.application;return e.application[t]}var Ke=(e,t)=>{f((e,n)=>{t.style[n]=e},e)},$e=(e,t)=>{f((e,n)=>{"style"!==n?t.setAttribute(n,e):Ke(e,t)},e)};const Ze=()=>!!document.documentElement.currentStyle,Qe=(e,t)=>{const i=window.getComputedStyle(t),o="border-box"===i.boxSizing,r=A(e,i);if(Ze()&&o&&n("width",r)&&null!==r.width){r.width=M([r.width,i.paddingLeft,i.paddingRight,i.borderLeftWidth,i.borderRightWidth].map(parseFloat))+"px"}if(Ze()&&o&&n("height",r)&&null!==r.height){r.height=M([r.height,i.paddingTop,i.paddingBottom,i.borderTopWidth,i.borderBottomWidth].map(parseFloat))+"px"}return r};function et(){return new Promise(e=>{const t=()=>{document.body?e(document.body):setTimeout(t,100)};t()})}function tt(e){const{parentNode:t}=e;t&&t.removeChild(e)}const nt=(e,t)=>{const n=document.createElement(e);return $e(t,n),n},it="chat-widget",ot="chat-widget-minimized",rt="chat-widget-lightbox",at="LiveChat chat widget",st="OpenWidget widget",ct={opacity:0,visibility:"hidden",zIndex:-1},lt={opacity:1,visibility:"visible",zIndex:2147483639},dt={id:it+"-container",style:T({},ct,{position:"fixed",bottom:0,width:0,height:0,maxWidth:"100%",maxHeight:"100%",minHeight:0,minWidth:0,backgroundColor:"transparent",border:0,overflow:"hidden"})};T({},dt.style);const ut={id:"livechat-eye-catcher",style:{position:"fixed",visibility:"visible",zIndex:2147483639,background:"transparent",border:0,padding:"10px 10px 0 0",float:"left",marginRight:"-10px",webkitBackfaceVisibility:"hidden"}},mt={style:{position:"absolute",display:"none",top:"-5px",right:"-5px",width:"16px",lineHeight:"16px",textAlign:"center",cursor:"pointer",textDecoration:"none",color:"#000",fontSize:"20px",fontFamily:"Arial, sans-serif",borderRadius:"50%",backgroundColor:"rgba(255, 255, 255, 0.5)"}},pt={id:"livechat-eye-catcher-img",style:{display:"block",overflow:"hidden",cursor:"pointer"}},ft={alt:"",style:{display:"block",border:0,float:"right"}},gt={position:"absolute",top:"0px",left:"0px",bottom:"0px",right:"0px"},ht={id:it,name:it,title:at,scrolling:"no",style:{width:"100%",height:"100%","min-height":"0px","min-width":"0px",margin:"0px",padding:"0px","background-image":"none","background-position-x":"0%","background-position-y":"0%","background-size":"initial","background-attachment":"scroll","background-origin":"initial","background-clip":"initial","background-color":"rgba(0, 0, 0, 0)","border-width":"0px",float:"none","color-scheme":"light"}},vt={id:rt,name:rt,title:"Lightbox image preview",scrolling:"no",style:{position:"fixed",top:"0px",left:"0px",width:"100%",height:"100%",border:"none","z-index":"2147483647",background:"transparent","aria-hidden":"false",tabindex:"0"}},wt=T({},ht,{id:ot,name:ot}),_t=e=>"lc-aria-announcer-"+e;const yt="new_message",bt=e=>"function"==typeof e.start&&"function"==typeof e.stop,xt=e=>{bt(e)?e.start(0):e.noteOn(0)},kt=()=>{const e=new(window.AudioContext||window.webkitAudioContext);let t=!0,n=[];const i=t=>new Promise((n,i)=>{e.decodeAudioData(t,n,i)}),o=t=>({play:()=>{const n=e.createBufferSource();n.connect(e.destination),n.buffer=t;return{playback:new Promise((t,i)=>{if(n.onended=()=>t(),xt(n),"running"!==e.state){const t=Error("Playback failed, AudioContext is in incorrect state '"+e.state+"'");t.name="PlaybackError",i(t)}}),stop(){(e=>{bt(e)?e.stop(0):e.noteOff(0)})(n)}}}});return{preload:e=>(e=>new Promise((t,n)=>{const i=new XMLHttpRequest;i.onload=()=>{t(i.response)},i.onerror=n,i.open("GET",e),i.responseType="arraybuffer",i.send()}))(e).then(i).then(o),playSound:e=>{const i=e.play();return t&&n.push(i),i.playback},unlock:()=>new Promise(i=>{const o=()=>{document.removeEventListener("click",o,!0),t&&(n.forEach(e=>{e.stop()}),n=[],t=!1),e.resume(),(()=>{const t=e.createBuffer(1,1,22050),n=e.createBufferSource();n.buffer=t,n.connect(e.destination),xt(n)})(),i()};document.addEventListener("click",o,!0)})}};const Et=/\.(\w+)$/i,Ct=new Audio,It={mp3:"audio/mpeg",ogg:"audio/ogg"},Lt=e=>{const t=(e=>{const t=e.match(Et);return t?t[1].toLowerCase():""})(e);return t in It&&""!==Ct.canPlayType(It[t])},At=e=>new Promise((t,n)=>{const i=new Audio(e);i.onloadeddata=()=>{t(i)},i.onerror=n}),Tt=e=>{const t=e.play();return(n=t)&&"function"==typeof n.then?t:Promise.resolve();var n};const Pt=()=>"function"==typeof window.webkitAudioContext||"function"==typeof window.AudioContext?(()=>{const e=kt(),t=I(t=>{const n=e.preload(t);return n.catch(L),n});return{play:n=>{const i=t(n).then(e.playSound);return i.catch(L),i},preload:t,unlock:()=>e.unlock()}})():(()=>{const e=I(At);return{play:t=>e(t).then(Tt),preload:e,unlock:()=>Promise.resolve()}})(),zt=e=>Object.keys(e).reduce((t,n)=>{const i=u(e=>Lt(e),o(r=e[n])?r:[r]);var r;return t[n]=i,t},{});const Mt=()=>{const e=(e=>{const t=Pt(),n=zt(e);return{play:e=>{t.play(n[e]).then(L,L)},preload:e=>{t.preload(n[e]).then(L,L)},unlock:()=>t.unlock()}})({[yt]:["https://cdn.livechatinc.com/widget/static/media/new_message.CTorF0S8.ogg","https://cdn.livechatinc.com/widget/static/media/new_message.C32z5SiC.mp3"]});return D&&(window.parent.soundPlayer=e),e.unlock().then(()=>function(e,t){let n=0;return function(){const i=Date.now();e>i-n||(n=Date.now(),t.apply(void 0,arguments))}}(2e3,t=>{e.play(t)}))},St={isBridgeActive:!1,isIframeActive:null,hasIframeUnlocked:!1},Ot=e=>!!e&&/native code/.test(e+""),Dt=()=>w(navigator.platform,["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"])&&w("Version/15",navigator.userAgent),Ft=()=>/mobile/gi.test(navigator.userAgent)&&!("MacIntel"===navigator.platform&&w("iPad",navigator.userAgent)),Nt=()=>w("Chrome",navigator.userAgent),Bt=()=>{const e=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);return e?parseInt(e[2],10):0},jt=()=>/Firefox/.test(navigator.userAgent),Wt=(e,t)=>Je(e,"visibility").state===t;function Ht(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}!function(e){const t=function(e){try{return window.localStorage}catch(t){return"SecurityError"===t.name&&e?e:R()?window.localStorage:G}}(e)}();const qt=["all"],Vt=()=>{const e={all:i=i||new Map,on:function(e,t){var n=i.get(e);n?n.push(t):i.set(e,[t])},off:function(e,t){var n=i.get(e);n&&(t?n.splice(n.indexOf(t)>>>0,1):i.set(e,[]))},emit:function(e,t){var n=i.get(e);n&&n.slice().map(function(e){e(t)}),(n=i.get("*"))&&n.slice().map(function(n){n(e,t)})}},{all:t}=e,n=Ht(e,qt);var i;return T({},n,{off:(e,i)=>{e?n.off(e,i):t.clear()},once:(e,t)=>{n.on(e,function i(o,r){n.off(e,i),t(o,r)})}})};function Rt(e,t){let{retriesCount:n=1/0,minTime:i=100,maxTime:o=1e4}=void 0===t?{}:t;const r=(e=>{let{min:t=1e3,max:n=5e3,jitter:i=.5}=e,o=0;return{duration:()=>{let e=t*Math.pow(2,o++);if(i){const t=Math.random(),n=Math.floor(t*i*e);e=1&Math.floor(10*t)?e+n:e-n}return 0|Math.min(e,n)},reset:()=>{o=0}}})({min:i,max:o,jitter:0});return new Promise((t,i)=>{let o=0;const a=()=>e().then(t,()=>{n===1/0||o++e.map(e=>{switch(e.type){case"group_chooser":return T({},e,{options:e.options.map(e=>{let{group_id:t}=e;return T({},Ht(e,Gt),{groupId:t})})});case"rating":{const{comment_label:t}=e;return T({},Ht(e,Yt),{commentLabel:t})}default:return e}}),Xt=e=>{const t=e.map((e,t)=>T({},e,{id:t+""}));return Ut(t)},Jt=e=>({id:e.id,fields:!("id"in e.fields[0])?Xt(e.fields):Ut(e.fields)}),Kt={};function $t(e,t){let{query:n={},jsonpParam:i="jsonp",callbackName:o}=void 0===t?{}:t;return new Promise((t,r)=>{et().then(a=>{const s=document.createElement("script"),c=o||h(Kt);Kt[c]=!0;const l="__"+c;window[l]=e=>{delete Kt[c],delete window[l],tt(s),t(e)},s.src=e+"?"+Y(T({},n,{[i]:l})),s.addEventListener("error",()=>{setTimeout(()=>r(Error("JSONP request failed.")),100)}),a.appendChild(s)})})}const Zt=["buttons","allowed_domains","prechat_form","ticket_form","__priv","properties"],Qt=["staticConfig","localization"],en=/\.([a-z]{1,})$/i,tn=e=>{let{__priv:t}=e;const n={enabled:!0,x:parseInt(t.group["embedded_chat.eye_grabber.x"])+15,y:parseInt(t.group["embedded_chat.eye_grabber.y"]),src:le(t.group["embedded_chat.eye_grabber.path"])};if(-1!==n.src.indexOf("/default/eyeCatchers/")){const e=n.src.match(en)[1];n.srcset={"1x":n.src,"2x":n.src.replace(RegExp("\\."+e,"i"),"-2x."+e)}}return n},nn=e=>{var t;return{"x-region":null!=(t=e.region)?t:""}},on=e=>{let{region:t}=e;return"https://api"+(e=>"fra"===e||e===j?"-fra":"")(t)+".livechatinc.com"},rn=(e,t)=>{const n="get_dynamic_configuration"===e?"v3.6":"v3.5";return on(t)+"/"+n+"/customer/action/"+e},an=function(e,t){let{validateDefaultWidget:n=!0}=void 0===t?{}:t;return $t(rn("get_dynamic_configuration",e),{query:T({},nn(e),e.organizationId?{organization_id:e.organizationId}:{},e.licenseId?{license_id:e.licenseId}:{},{client_id:null!="c5e4f61e1a6c3b1521b541bc5c5a2ac5"?"c5e4f61e1a6c3b1521b541bc5c5a2ac5":"",url:ce(e.url,["cw_configurator"])},"number"==typeof e.groupId&&{group_id:e.groupId},e.channelType&&{channel_type:e.channelType},e.skipCodeInstallationTracking&&{test:1},e.productName&&{origin:e.productName},e.integrationName&&{implementation_type:e.integrationName})}).then(t=>{if(t.error)switch(t.error.type){case"misdirected_request":return an(T({},e,{region:t.error.data.region}));case"license_not_found":{if("direct_link"===e.channelType){const t=Y({utm_source:"expired_chat_link",utm_medium:"referral",utm_campaign:"lc_"+e.licenseId});window.location.replace("https://www.livechat.com/expired-chat-link/?"+t)}const t=Error("License not found");throw t.code="LICENSE_NOT_FOUND",t}default:{const e=Error(t.error.message);throw e.code=t.error.type.toUpperCase(),e}}if(19196658!==e.licenseId&&"4c8c0751-837f-4a11-928e-047b2d095307"!==e.organizationId||(t.default_widget="livechat"),n&&"livechat"!==t.default_widget){const e=Error("The 'default_widget' is not 'livechat', but instead: '"+t.default_widget+"'");throw e.code="DEFAULT_WIDGET_NOT_LIVECHAT",e.organizationId=t.organization_id,e.defaultWidget=t.default_widget,e}if(!t.livechat_active){if("direct_link"===e.channelType){const t=Y({utm_source:"expired_chat_link",utm_medium:"referral",utm_campaign:"lc_"+e.licenseId});window.location.replace("https://www.livechat.com/expired-chat-link/?"+t)}const t=Error("License expired");throw t.code="LICENSE_EXPIRED",t}if(!t.livechat.domain_allowed){const e=Error("Current domain is not added to the allowlist.");throw e.code="DOMAIN_NOT_ALLOWED",e}return{organizationId:(i=t).organization_id,groupId:i.livechat.group_id,clientLimitExceeded:i.livechat.client_limit_exceeded,configVersion:i.livechat.config_version,localizationVersion:i.livechat.localization_version,onlineGroupIds:i.livechat.online_group_ids||[],region:e.region||null,language:i.livechat.language};var i})},sn=e=>{var t,n;const i="feade1d6c3f17748ae4c8d917a1e1068",o=!!(null==(t=e.properties.group[i])?void 0:t.forwardTicketFormToHelpdesk),r=null==(n=e.properties.license[i])?void 0:n.hdLicenseID;return"number"==typeof r&&r>-1&&(o||"1"===e.__priv.license["helpdesk.inbound_forwarding"])},cn=(e,t)=>t.includes(e)?e:t[0],ln=e=>{const{buttons:t,allowed_domains:n,prechat_form:i,ticket_form:o,__priv:r,properties:a}=e,s=Ht(e,Zt),c="0"===r.group.tickets_enabled,l=!!!r.disable_native_tickets&&!!o,d=sn(e),u=c||d||l;return T({},s,i&&{prechatForm:Jt(i)},u&&o&&{ticketForm:Jt(o)},{properties:a,buttons:t.map(e=>"image"===e.type?{id:e.id,type:e.type,onlineValue:le(e.online_value),offlineValue:le(e.offline_value)}:{id:e.id,type:e.type,onlineValue:e.online_value,offlineValue:e.offline_value})},n&&{allowedDomains:n},{__unsafeProperties:T({},r.s&&{s:!0},r.enable_textapp&&{enableTextApp:!0},{group:{chatBoosters:r.group.chat_boosters,disabledMinimized:"1"===r.group["chat_window.disable_minimized"],disabledMinimizedOnMobile:"1"===r.group["chat_window.mobile_disable_minimized"],disabledOnMobile:"1"===r.group["chat_window.hide_on_mobile"],eyeCatcher:"1"===r.group["embedded_chat.display_eye_catcher"]?tn(e):{enabled:!1},hasAgentAvatarsEnabled:"1"===r.group["chat_window.display_avatar"],hasCustomMobileSettings:"1"===r.group["chat_window.custom_mobile_settings"],hasHiddenTrademark:"1"===r.group["chat_window.hide_trademark"],hasSoundsEnabled:"0"===r.group["chat_window.disable_sounds"],initiallyHidden:"1"===r.group["chat_window.hide_on_init"]||"1"===r.group["chat_window.disable_minimized"],initiallyHiddenOnMobile:"1"===r.group["chat_window.mobile_hide_on_init"]||"1"===r.group["chat_window.mobile_disable_minimized"],hideOnInit:"1"===r.group["chat_window.hide_on_init"],language:r.group.language,linksUnfurlingEnabled:"1"===r.group.links_unfurling,privacyPolicy:{enabled:"1"===r.group["privacy_policy.enabled"],text:r.group["privacy_policy.text"]},logo:"1"===r.group["chat_window.display_logo"]?{enabled:!0,src:r.group["chat_window.logo_path"]}:{enabled:!1},minimizedType:cn(r.group["chat_window.theme.minimized"],["circle","bar"]),minimizedTypeOnMobile:r.group["chat_window.mobile_minimized_theme"],offlineMessagesEnabled:c,offsetX:parseInt(r.group["chat_window.offset_x"]),offsetXOnMobile:parseInt(r.group["chat_window.mobile_offset_x"]),offsetY:parseInt(r.group["chat_window.offset_y"]),offsetYOnMobile:parseInt(r.group["chat_window.mobile_offset_y"]),prechatFormAfterGreetingEnabled:"1"===r.group.pre_chat_survey_after_greeting,ratingEnabled:"1"===r.group["rate_me.enabled"],screenPosition:cn(r.group["chat_window.screen_position"],["right","left"]),screenPositionOnMobile:cn(r.group["chat_window.mobile_screen_position"],["right","left"]),transcriptButtonEnabled:"1"===r.group["chat_window.display_transcript_button"],theme:{name:cn(r.group["chat_window.new_theme.name"],["smooth","modern"]),variant:cn(r.group["chat_window.new_theme.variant"],["light","dark"]),customJson:r.group["chat_window.new_theme.custom_json"],agentbarBackgroundColor:r.group["chat_window.new_theme.agentbar_background_color"],agentbarText:r.group["chat_window.new_theme.agentbar_text"],agentMessageColorBackground:r.group["chat_window.new_theme.agent_message_color_background"],agentMessageColorText:r.group["chat_window.new_theme.agent_message_color_text"],backgroundColor:r.group["chat_window.new_theme.background_color"],ctaColor:r.group["chat_window.new_theme.cta_color"],minimizedColorBackground:r.group["chat_window.new_theme.minimized_color_background"],minimizedColorIcon:r.group["chat_window.new_theme.minimized_color_icon"],minimizedColorText:r.group["chat_window.new_theme.minimized_color_text"],systemMessageColor:r.group["chat_window.new_theme.system_message_color"],titlebarBackgroundColor:r.group["chat_window.new_theme.titlebar_background_color"],titlebarText:r.group["chat_window.new_theme.titlebar_text"],visitorMessageColorBackground:r.group["chat_window.new_theme.visitor_message_color_background"],visitorMessageColorText:r.group["chat_window.new_theme.visitor_message_color_text"]}},license:{creditCardMaskingEnabled:"1"===r.license.mask_credit_cards,nonProfit:"1"===r.license.non_profit,licenseinboundForwardingToHelpdeskEnabled:"1"===r.license["helpdesk.inbound_forwarding"]},helpdeskIntegrationEnabled:d,ticketFormMode:(m=e,sn(m)?"helpdesk":"0"===m.__priv.group.tickets_enabled?"offline_message":"livechat")})});var m},dn=(e,t,n,i,o)=>{const r="https://api.openwidget.com/v1.0/configuration/"+e;return Rt(()=>$t(r,{callbackName:"ow_config",query:T({},t&&{integration_name:t},n&&{tid:n},i&&{test:!0},o&&{url:o})}).then(t=>{let{staticConfig:n,localization:i}=t;return T({},Ht(t,Qt),ln(n),{localization:k(e=>e.toLowerCase(),i),organizationId:e})}),{minTime:500,maxTime:5e3,retriesCount:20})},un=e=>{const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.top="0",t.style.left="0",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)},mn="data-lc-focus",pn="data-lc-event",fn="data-lc-prop",gn="data-lc-action",hn="data-lc-action-value",vn="data-lc-action-success";let wn=L;function _n(e,t,n,i){var o;const r=n.contentDocument,a=null!=(o=i.state.application.language)?o:"en";if(null===r)throw Error("Parameter `frame` needs to be inserted into any document before rendering");Nt()?(r.documentElement.lang=a,r.head.innerHTML=e,r.body.innerHTML=t):(r.open(),r.write('\n\t\t\t\n\t\t\t\n\t\t\t\t'+e+"\n\t\t\t\t"+t+"\n\t\t\t\n\t\t"),r.close());const s=r.documentElement,c=S(s.querySelectorAll("["+pn+"]"));for(const e of c){const t=e.getAttribute(pn);if("string"==typeof t)for(const n of t.split(";")){const[t,o]=n.split(":");t&&o&&(e.removeAttribute(pn),e.addEventListener(t,n=>{var r,a,s,c,l,d,u,m,p,f;n.stopPropagation();const g={type:n.type,bubbles:!0,isTrusted:n.isTrusted,cancelBubble:n.cancelBubble,cancelable:n.cancelable,composed:n.composed,defaultPrevented:n.defaultPrevented,eventPhase:n.eventPhase,timeStamp:n.timeStamp,currentTarget:{value:null==(r=n.currentTarget)?void 0:r.value,checked:null==(a=n.currentTarget)?void 0:a.checked,disabled:null==(s=n.currentTarget)?void 0:s.disabled,draggable:null==(c=n.currentTarget)?void 0:c.draggable,hidden:null==(l=n.currentTarget)?void 0:l.hidden},target:{value:null==(d=n.target)?void 0:d.value,checked:null==(u=n.target)?void 0:u.checked,disabled:null==(m=n.target)?void 0:m.disabled,draggable:null==(p=n.target)?void 0:p.draggable,hidden:null==(f=n.target)?void 0:f.hidden}};if("click"===t&&"copy"===e.getAttribute(gn))return h=e.getAttribute(hn),navigator.clipboard?navigator.clipboard.writeText(h).catch(un):un(h),void(e.innerHTML=e.getAttribute(vn));var h;i.call("crossFrameEvent",o,JSON.stringify(g))}))}}const l=s.querySelector("["+mn+"]");if(l&&(l.removeAttribute(mn),l.focus(),"INPUT"===l.nodeName)){l.setSelectionRange(l.value.length,l.value.length)}const d=[],u=S(s.querySelectorAll("["+fn+"]"));for(const e of u){const t=e.getAttribute(fn);if("string"!=typeof t)continue;e.removeAttribute(fn);const[n,i]=t.split(":");d.push(t=>{var o;let r=null==(o=t.views)||null==(o=o.minimized)?void 0:o[i.replace("!","")];"string"==typeof r&&(r=r.trim()),"disabled"===n&&(r=i.includes("!")?!r:!!r),"boolean"==typeof r?e.toggleAttribute(n,r):r?e.setAttribute(n,r):e.removeAttribute(n)})}d.forEach(e=>e(i.state)),i.off("state_diff",wn),wn=e=>{var t;null!=e&&null!=(t=e.views)&&t.minimized&&d.forEach(t=>t(e))},i.on("state_diff",wn)}const yn=e=>{let{allowAutoplay:t,allowVideoConferencing:n,allowClipboardWrite:i,allowDisplayCapture:o}=e,r=["clipboard-read; clipboard-write;"];if(t&&!jt()&&r.push("autoplay;"),o&&r.push("display-capture *;"),n){const e={"display-capture *;":!Nt()||Bt()>=94,"picture-in-picture *;":"PictureInPictureEvent"in window,"fullscreen *;":"function"==typeof Element.prototype.requestFullscreen};r=[].concat(r,["microphone *;","camera *;"],Object.keys((s=Boolean,a(c=e).reduce((e,t)=>(s(c[t])&&(e[t]=c[t]),e),{}))))}var s,c;return i&&!jt()&&r.push("clipboard-write *;"),r.join(" ")},bn=e=>e.replace(/\?+$/,"");function xn(e,t){return me((n=()=>ye(_e(e,"state_diff"),xe(()=>e.state),be(e.state),xe(t),fe(z),De(_e(e,"unbind"))),(e,t)=>{if(0===e){let e=!1;t(0,t=>{2===t&&(e=!0)}),t(1,n()),e||t(2)}}));var n}const kn=(e,t)=>ye(xn(e,t),ze(1)),En=["maximize","minimize"],Cn={maximize:["feature","messageDraft"],minimize:[]},In=(e,t)=>{const n=e.target;if(!(n instanceof Element))return;const i=n.closest("[data-openwidget-action]");if(!i)return;const o=i.getAttribute("data-openwidget-action");if(!o)return void console.error("OpenWidget: Action attribute value not found.");if(!(e=>w(e,En))(o))return void console.error('OpenWidget: Action "'+o+'" is not allowed. Allowed actions: '+En.join(", "));const r=((e,t)=>{const n={},i=Cn[t];return i&&i.forEach(t=>{const i=e.getAttribute("data-openwidget-"+t);i&&(n[t]=i)}),n})(i,o);t[o](r)},Ln=D?100:2e3;let An=null;const Tn=()=>{if(An)throw Error("Title notification service already initialized");An=(()=>{try{let e,t=document.title,n=null;const i=document.querySelector("title");return i&&new MutationObserver(e=>{const i=e[0].target.textContent;i&&![t,n].includes(i)&&(t=i)}).observe(i,{subtree:!0,characterData:!0,childList:!0}),{setTitleNotification:i=>{i!==n&&(n=i,t=document.title,document.title=n,clearInterval(e),e=window.setInterval(()=>{document.title=document.title===t&&n?n:t},Ln))},clearTitleNotification:()=>{document.title=t,clearInterval(e),n=null},getOriginalPageTitle:()=>t}}catch(e){return console.error("Error while creating title notification service",e),null}})()},Pn=()=>{if(!An)throw Error("Title notification service not initialized");return An},zn=e=>{var t,n;const i=["http:","https:"];return!i.includes(null!=(t=se(e))?t:"")&&i.includes(null!=(n=se(document.referrer))?n:"")?document.referrer:e},Mn=()=>({title:An?An.getOriginalPageTitle():document.title,url:bn(zn(document.location+"")),referrer:document.referrer}),Sn=e=>{ye(function(e,t){return ue(n=>{const i=new MutationObserver(n);return i.observe(e,t),()=>{i.disconnect()}})}(document.body,{childList:!0,subtree:!0}),xe(Mn),fe((e,t)=>e.url===t.url),De(_e(e,"unbind")),he(t=>{e.call("storeMethod",["setApplicationState",{page:t}])}))};var On="application/x-postmate-v1+json",Dn=0,Fn={handshake:1,"handshake-reply":1,call:1,emit:1,reply:1,request:1},Nn=function(e,t){return("string"!=typeof t||e.origin===t)&&(!!e.data&&("object"==typeof e.data&&("postmate"in e.data&&(e.data.type===On&&!!Fn[e.data.postmate]))))},Bn=function(){function e(e){var t=this;this.parent=e.parent,this.frame=e.frame,this.child=e.child,this.childOrigin=e.childOrigin,this.events={},this.listener=function(e){if(!Nn(e,t.childOrigin))return!1;var n=((e||{}).data||{}).value||{},i=n.name;"emit"===e.data.postmate&&i in t.events&&t.events[i].call(t,n.data)},this.parent.addEventListener("message",this.listener,!1)}var t=e.prototype;return t.get=function(e){var t=this;return new Wn.Promise(function(n){var i=++Dn;t.parent.addEventListener("message",function e(o){o.data.uid===i&&"reply"===o.data.postmate&&(t.parent.removeEventListener("message",e,!1),n(o.data.value))},!1),t.child.postMessage({postmate:"request",type:On,property:e,uid:i},t.childOrigin)})},t.call=function(e,t){this.child.postMessage({postmate:"call",type:On,property:e,data:t},this.childOrigin)},t.on=function(e,t){this.events[e]=t},t.destroy=function(){window.removeEventListener("message",this.listener,!1),this.frame.parentNode.removeChild(this.frame)},e}(),jn=function(){function e(e){var t=this;this.model=e.model,this.parent=e.parent,this.parentOrigin=e.parentOrigin,this.child=e.child,this.child.addEventListener("message",function(e){if(Nn(e,t.parentOrigin)){var n=e.data,i=n.property,o=n.uid,r=n.data;"call"!==e.data.postmate?function(e,t){var n="function"==typeof e[t]?e[t]():e[t];return Wn.Promise.resolve(n)}(t.model,i).then(function(t){return e.source.postMessage({property:i,postmate:"reply",type:On,uid:o,value:t},e.origin)}):i in t.model&&"function"==typeof t.model[i]&&t.model[i].call(t,r)}})}return e.prototype.emit=function(e,t){this.parent.postMessage({postmate:"emit",type:On,value:{name:e,data:t}},this.parentOrigin)},e}(),Wn=function(){function e(e){var t=e.container,n=void 0===t?void 0!==n?n:document.body:t,i=e.model,o=e.url,r=e.iframeAllowedProperties;return this.parent=window,this.frame=document.createElement("iframe"),r&&(this.frame.allow=r),n.appendChild(this.frame),this.child=this.frame.contentWindow||this.frame.contentDocument.parentWindow,this.model=i||{},this.sendHandshake(o)}return e.prototype.sendHandshake=function(t){var n,i=this,o=function(e){var t=document.createElement("a");t.href=e;var n=t.protocol.length>4?t.protocol:window.location.protocol,i=t.host.length?"80"===t.port||"443"===t.port?t.hostname:t.host:window.location.host;return t.origin||n+"//"+i}(t),r=0;return new e.Promise(function(e,a){i.parent.addEventListener("message",function t(r){return!!Nn(r,o)&&("handshake-reply"===r.data.postmate?(clearInterval(n),i.parent.removeEventListener("message",t,!1),i.childOrigin=r.origin,e(new Bn(i))):a("Failed handshake"))},!1);var s=function(){r++,i.child.postMessage({postmate:"handshake",type:On,model:i.model},o),5===r&&clearInterval(n)},c=function(){s(),n=setInterval(s,500)};i.frame.attachEvent?i.frame.attachEvent("onload",c):i.frame.addEventListener("load",c),i.frame.src=t})},e}();Wn.debug=!1,Wn.Promise=function(){try{return window?window.Promise:Promise}catch(e){return null}}(),Wn.Model=function(){function e(e){return this.child=window,this.model=e,this.parent=this.child.parent,this.sendHandshakeReply()}return e.prototype.sendHandshakeReply=function(){var e=this;return new Wn.Promise(function(t,n){e.child.addEventListener("message",function i(o){if(o.data.postmate){if("handshake"===o.data.postmate){e.child.removeEventListener("message",i,!1),o.source.postMessage({postmate:"handshake-reply",type:On},o.origin),e.parentOrigin=o.origin;var r=o.data.model;return r&&Object.keys(r).forEach(function(t){e.model[t]=r[t]}),t(new jn(e))}return n("Handshake Reply Failed")}},!1)})},e}();const Hn=["methods"];Wn.Promise=Promise;let qn=function(e){let{methods:t}=e,n=Ht(e,Hn);return new Wn(n).then(e=>{const n=e.on,o=e.call,r=function(){for(var t=arguments.length,n=Array(t),i=0;t>i;i++)n[i]=arguments[i];return o.apply(e,n)},a=Vt(),s={},c={};return t.resolveRemoteCall=e=>{let{id:t,value:n}=e;const i=c[t];delete c[t],i(n)},e.on=(t,i)=>{a.on(t,i),s[t]||(s[t]=!0,function(){for(var t=arguments.length,i=Array(t),o=0;t>o;o++)i[o]=arguments[o];n.apply(e,i)}(t,e=>{a.emit(t,e)}))},e.off=a.off,e.on("remote-call",n=>{let{id:i,method:o,args:a}=n;const s="function"==typeof t[o]?t[o].apply(e,a):void 0;s&&"function"==typeof s.then?s.then(e=>{r("resolveRemoteCall",{id:i,value:e})}):r("resolveRemoteCall",{id:i,value:s})}),e.emit=(e,t)=>{r("emitEvent",{event:e,data:t})},e._emit=a.emit,e.call=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;t>i;i++)n[i-1]=arguments[i];return new Promise(t=>{const i=h(c);c[i]=t,r("remoteCall",{id:i,method:e,args:n})})},i(e,t)})};const Vn=window.Wix;var Rn=()=>new Promise(e=>{Vn.getSiteInfo(t=>{let n=t.url;const i=t.referrer||t.referer||"";t.baseUrl&&-1===n.indexOf(t.baseUrl)&&(n=t.baseUrl);e({title:t.pageTitle,referrer:i,url:n})})});const Gn=Promise.resolve(),Yn=e=>{Gn.then(e)},Un=e=>Yn(()=>{throw e});function Xn(e){return ye(xn(e,e=>Je(e,"availability")),ge(b))}const Jn="liveChatChatId";function Kn(e){return ye(xn(e,e=>Ve(e,Jn).active),ze(1),ke(t=>t?ye(xn(e,e=>Ve(e,Jn).properties.currentAgent),ge(Boolean),xe(()=>t),Se(1)):Ie(t)))}function $n(e,t){return ye(_e(e,"state_diff"),xe(()=>Je(e.state,"readyState")),ge(e=>e===t),Se(1),Pe)}function Zn(e,t){return ye($n(e,N),ke(t))}function Qn(e,t){return ye($n(e,B),ke(t))}function ei(e,t){return ye(xn(e,e=>Je(e,"invitation")),xe(e=>e[t]),ge(b),Le,ge(e=>{let[t,n]=e;return n.length>t.length}),xe(e=>{let[,t]=e;return x(t)}))}const ti=()=>window.GoogleAnalyticsObject||"ga",ni=e=>{let{event:t,label:n,nonInteraction:i,trackerName:o}=e;const r=window[ti()];r&&"function"==typeof r&&r([o,"send"].filter(Boolean).join("."),{hitType:"event",eventCategory:"LiveChat",eventAction:t,eventLabel:n,nonInteraction:i})},ii={ga:ni,gaAll:e=>{const t=window[ti()];if(!t||"function"!=typeof t.getAll)return;const n=t.getAll();o(n)&&n.forEach(t=>{ni(T({},e,{trackerName:t&&"function"==typeof t.get?t.get("name"):null}))})},gaq:e=>{let{event:t,label:n,nonInteraction:i}=e;const o=window._gaq;o&&"function"==typeof o.push&&o.push(["_trackEvent","LiveChat",t,n,null,i])},gtm:e=>{let{event:t,label:n,nonInteraction:i}=e;const o=window.dataLayer;o&&"function"==typeof o.push&&o.push({event:"LiveChat",eventCategory:"LiveChat",eventAction:t,eventLabel:n,nonInteraction:i})},pageTracker:e=>{let{event:t,label:n,nonInteraction:i}=e;const o=window.pageTracker;o&&"function"==typeof o._trackEvent&&o._trackEvent("LiveChat",t,n,null,i)},urchinTracker:e=>{let{event:t}=e;const n=window.urchinTracker;n&&"function"==typeof n&&n(t)},gtag:e=>{let{event:t,label:n,nonInteraction:i}=e;const o=window.gtag;o&&"function"==typeof o&&o("event",t,{event_category:"LiveChat",event_label:n,non_interaction:i})}},oi=e=>{let{version:t,omitGtm:n,sendToAll:i}=e;if(t&&"function"==typeof ii[t])return i&&"ga"===t?"gaAll":t;if("object"==typeof window.pageTracker&&"function"==typeof window.pageTracker._trackEvent)return"pageTracker";if("function"==typeof window.urchinTracker)return"urchinTracker";if("function"==typeof window.gtag)return"gtag";if(!n&&"object"==typeof window.dataLayer&&"function"==typeof window.dataLayer.push)return"gtm";if("object"==typeof window._gaq)return"gaq";if(window.GoogleAnalyticsObject&&"string"==typeof window.GoogleAnalyticsObject)return i?"gaAll":"ga";if("function"==typeof window.ga){let e=!1;if(window.ga(t=>{e="object"==typeof t}),e)return i?"gaAll":"ga"}return null},ri={Chat:"LiveChat Chat started","Automated greeting":"LiveChat Automated greeting displayed","Ticket form":"LiveChat Ticket form displayed","Ticket form filled in":"LiveChat Ticket form filled in","Pre-chat survey":"LiveChat Pre-chat survey displayed","Pre-chat survey filled in":"LiveChat Pre-chat survey filled in","Post-chat survey":"LiveChat Post-chat survey displayed","Post-chat survey filled in":"LiveChat Post-chat survey filled in"},ai=()=>window.mixpanel&&"function"==typeof window.mixpanel.track&&"function"==typeof window.mixpanel.register,si={googleAnalytics:e=>{let{trackerName:t}=e;return t?ii[t]:null},kissmetrics:()=>null,mixpanel:()=>{if(!ai())return null;return e=>{let{event:t,eventData:n,persistentData:i}=e;if(!ai())return;const{mixpanel:o}=window;i&&(o.register(i),!ai())||t in ri&&o.track(ri[t],n)}}};var ci=(e,t)=>{let{analytics:n}=t;const i=Object.keys(n).filter(e=>n[e].enabled).map(e=>{const t=n[e],i=si[e];try{return i(t)}catch(e){return Un(e),null}}).filter(Boolean);if(0===i.length)return;const o=function(t,n){let{group:o=Je(e.state,"group"),nonInteraction:r=!1,eventData:a={},persistentData:s=null,useDataAsLabel:c=!1}=void 0===n?{}:n;const l=0!==o?"Group ID: "+o:"(no group)",d=c?O(a).map(e=>{let[t,n]=e;return t+": "+n}).join(", "):l;i.forEach(e=>{try{e({event:t,nonInteraction:r,label:d,eventData:T({},a,{group:l}),persistentData:s})}catch(e){Un(e)}})};ye(xn(e,e=>Je(e,"readyState")),ge(e=>e===N),Se(1),ke(()=>Kn(e)),ge(Boolean),he(()=>{const{email:t,name:n}=Ge(e.state);o("Chat",{eventData:{email:t,name:n},persistentData:{"performed chat":!0}})})),e.on("add_event",e=>{let{event:{properties:t}}=e;t.invitation&&t.receivedFirstTime&&o("Automated greeting",{nonInteraction:!0})}),e.on("on_chat_booster_launched",e=>{let{id:t,title:n}=e;o("Chat Booster Launched: "+n,{eventData:{appId:t,title:n}})}),e.on("on_prechat_survey_submitted",()=>{o("Pre-chat survey filled in")}),e.on("on_postchat_survey_submitted",()=>{o("Post-chat survey filled in")}),e.on("on_ticket_created",e=>{let{visitor_email:t}=e;o("Ticket form filled in",{eventData:{email:t}})}),e.on("rich_greeting_button_clicked",e=>{let{button:t,event:n}=e;o("Rich greeting button clicked",{eventData:{buttonText:t.text,greetingId:n.properties.id},useDataAsLabel:!0})}),["prechat","postchat","ticket","offline"].forEach(t=>{var n;ye(we(_e(e,"set_default_view"),_e(e,"set_current_view")),ge(e=>e.viewInfo&&"Chat"===e.viewInfo.view&&e.viewInfo.default===t),De(_e(e,"unbind")),(n=()=>{const[n,i]={prechat:["on_prechat_survey_submitted","Pre-chat survey"],postchat:["on_postchat_survey_submitted","Post-chat survey"],ticket:["on_ticket_created","Ticket form"],offline:["on_ticket_created","Ticket form"]}[t];return ye(function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return(e,n)=>{if(0!==e)return;const i=t.length;if(0===i)return n(0,()=>{}),void n(2);let o,r=0;const a=(e,t)=>{o(e,t)};!function e(){r!==i?t[r](0,(t,i)=>{0===t?(o=i,0===r?n(0,a):o(1)):2===t&&i?n(2,i):2===t?(r++,e()):n(t,i)}):n(2)}()}}(Ie(i),Ce),(o=ye(xn(e,e=>Wt(e,"maximized")),ge(Boolean)),s=void 0===(a=(void 0===r?{}:r).size)?100:a,function(e){return function(t,n){var i=[];if(0===t){var r,a,c=!1;e(0,function(e,t){if(0===e&&(r=t,o(0,function(e,t){if(0===e)(a=t)(1);else if(1===e){c=!0,a(2);var o=i.slice();i.length=0,o.forEach(function(e){return n(1,e)})}})),1===e)return c?void n(1,t):(i.push(t),i.length>s&&i.shift(),void r(1));n(e,t)})}}}),De(_e(e,n)));var o,r,a,s},function(e){return function(t,i){if(0===t){var o,r=null,a=function(e,t){if(0!==e)return 1===e?(i(1,t),void r(1)):void(2===e&&(r=null));(r=t)(1)},s=function(e,t){2===e&&null!==r&&r(2,t),o(e,t)};e(0,function(e,t){if(0===e)return o=t,void i(0,s);if(1!==e){if(2===e){if(i(2,t),null===r)return;r(2,t)}}else{if(null!==r)return;n(t)(0,a)}})}}}),he(e=>{o(e)}))})};const li=e=>{let{actingAsDirectLink:t,isInCustomContainer:n}=e;return t||n},di=()=>{const e="lc_get_time_"+g();window.performance&&"function"==typeof window.performance.mark&&window.performance.mark(e);const[{startTime:t}]=performance.getEntriesByName(e);return performance.clearMarks(e),t},ui=()=>{if("undefined"==typeof PerformanceObserver)return null;const e=di(),t=[],n=new PerformanceObserver(e=>{t.push.apply(t,e.getEntries())});n.observe({entryTypes:["longtask"]});const i=()=>{const n=x(t);return n?(i=n,di()-i.startTime+i.duration):di()-e;var i};return{disconnect:()=>n.disconnect(),getLongTasks:()=>[].concat(t),waitForIdle:e=>new Promise(o=>{const r=()=>{t.push.apply(t,n.takeRecords());const a=i();e>a?setTimeout(r,Math.ceil(e-a)):o()};r()})}},mi=function(e){void 0===e&&(e="first-contentful-paint");const t=ui();return t?(n=e,new Promise(e=>{const t=performance.getEntriesByName(n);if(!_(t))return void e(t[0]);if("undefined"==typeof PerformanceObserver)return void e(null);const i=setTimeout(()=>{o.disconnect(),e(null)},6e4),o=new PerformanceObserver(t=>{const r=u(e=>e.name===n,t.getEntries());r&&(o.disconnect(),clearTimeout(i),e(r))});o.observe({entryTypes:["paint"]})})).then(e=>e?t.waitForIdle(5e3).then(()=>(t.disconnect(),t.getLongTasks())):null):Promise.resolve(null);var n},pi=e=>{const t=performance.getEntriesByName(e);return 1!==t.length?null:t[0]},fi=(e,t)=>e&&t?Math.abs(t.startTime-e.startTime):null,gi=e=>{if(!e)return null;const t=performance.getEntriesByType("navigation");return e.startTime-(_(t)?performance.timing.domContentLoadedEventStart-performance.timing.navigationStart:t[0].domContentLoadedEventStart)},hi=()=>{if(Math.floor(1e3*Math.random()))return;const e=mi().then(e=>e?M(e.filter(e=>w(".livechatinc.com",e.attribution[0].containerSrc)).map(e=>e.duration)):null);return{getLogs:()=>e.then(e=>{const t=(()=>{const e=performance.getEntriesByType("resource").filter(e=>/livechatinc\.com\/(.+\/)?tracking.js/.test(e.name));return 1!==e.length?null:e[0]})(),n=pi("lc_bridge_init"),i=pi("lc_bridge_ready");return s(e=>e&&Number(e.toFixed(2)),{timeFromTrackingStart:fi(t,i),timeFromBridgeInit:fi(n,i),timeFromDomContentLoaded:gi(i),totalBlockingTimeContributedToOurScript:e})})}},vi=e=>{e.innerHTML=""};var wi=(e,t)=>{const n=document.querySelectorAll(".livechat_button"),i=w(t.groupId,t.onlineGroupIds||[]);[].forEach.call(n,n=>{const o=n.getAttribute("data-id"),r=u(e=>e.id===o,t.buttons);if(!r)return;const a=v("#","0.href",n);"image"===r.type?((e,t)=>{let{text:n,url:i,src:o}=e;vi(t);const r=nt("a",{href:i}),a=nt("img",{src:o,alt:n,title:n});r.appendChild(a),t.appendChild(r)})({url:a,text:n.textContent,src:i?r.onlineValue:r.offlineValue},n):((e,t)=>{let{text:n,url:i}=e;vi(t);const o=nt("a",{href:i});o.appendChild(document.createTextNode(n)),t.appendChild(o)})({url:a,text:i?r.onlineValue:r.offlineValue},n),n.children[0].addEventListener("click",t=>{t.preventDefault(),e.maximize()})})};const _i=["America/","Europe/"],yi=(e,t)=>{const n=e.target;if(!(n instanceof HTMLElement))return;const i=n.closest("a, button");if(!i)return;if(Math.random()>=.01)return;const o=(e=>{var t;const n=e.getAttribute("aria-label"),i=T({clickElementTagType:e.tagName.toLowerCase()},e.id&&{clickElementId:e.id},e.className&&{clickElementClassNames:e.className},(null==(t=e.textContent)?void 0:t.trim())&&{clickElementLabel:e.textContent.trim()},n&&{clickElementAriaLabel:n});return e instanceof HTMLAnchorElement?T({},i,e.href&&{clickElementHref:e.href}):e instanceof HTMLButtonElement?T({},i,e.type&&{clickElementType:e.type},e.name&&{clickElementName:e.name},e.value&&{clickElementValue:e.value}):i})(i),r=Mn();t.call("logInfo","button_click",T({},o,r))},bi=(e,t,n)=>{const{actingAsDirectLink:i}=t;if(i||!n.__unsafeProperties.s||!(()=>{const e=Intl.DateTimeFormat().resolvedOptions().timeZone;return _i.some(t=>e.startsWith(t))})())return;const o=t=>yi(t,e);document.addEventListener("click",o),e.on("unbind",()=>{document.removeEventListener("click",o)})},xi={25:"#EDDDBF",50:"#FFFAE5",100:"#F7C56E",500:"#FFD000",700:"#7B664C",800:"#3A352C"},ki={100:"#FF7C6B",500:"#D93311"},Ei={100:"#77Cf9D",500:"#268750"},Ci={100:"#FA6681",500:"#E30D34"},Ii={0:"#FFFFFF",15:"#F6F6F7",25:"#F0F0F0",50:"#F8F8F8",75:"#EDEDED",100:"#E3E3E3",200:"#D5D5D5",300:"#C0C0C0",400:"#B3B3B3",425:"#A6A4A4",450:"#949494",500:"#757575",525:"#707070",550:"#6E6E6E",600:"#575757",625:"#474747",650:"#333333",700:"#2E2E2E",800:"#252525",900:"#111111"};var Li=Object.freeze({__proto__:null,yellow:xi,red:ki,green:Ei,ruby:Ci,accent:"#2000F0",webkitOutline:"#3B99FC",grayscale:Ii,brand:{orange:"#FF5100",black:"#1B1B20"}});const Ai=T({},Li,{border:Ii[500],borderSubtle:Ii[100],divider:Ii[100],error:ki[500],errorContrast:Ii[0],errorSurface:"#FFFAFA",subtleFeedback:xi[50],subtleFeedbackContrast:Ii[900],caution:"#FFAE21",cautionDimmed:"#FFF3D6",cautionContrast:Ii[900],cautionDesaturated:xi[25],success:Ei[500],successContrast:Ii[0],successSurface:Ii[0],primaryTextColor:Ii[900],secondaryTextColor:Ii[550],tertiaryTextColor:Ii[400],surface:Ii[0],surfaceVariant:Ii[25],surfaceVariantHover:"#E6E6E6",surfaceInteractive:Ii[50],surfaceInteractivePressed:Ii[600],surfaceDecorative:Ii[100],surfaceDimmed:"#E6E4E1",surfaceFade:Ii[15],hintSurface:Ii[800],floatSurface:Ii[0],pressedElement:Ii[300],notification:Ci[500],notificationContrast:Ii[0],widgetBackground:Ii[50],disabled:Ii[100],disabledContrast:Ii[600],inactiveElement:Ii[450],formIconColor:Ii[50],trademarkFooterText:Ii[600],itemHover:Ii[625],successHover:"#2FA763",inactiveElementHover:Ii[425],secondaryButtonBackground:Ii[100],secondaryButtonBackgroundHover:Ii[200],primaryTimelineSurface:Ii[0],decorations:{decorOne:"#FFDAB9",decorTwo:"#D9CCFA",decorThree:"#FACCCC",decorFour:"#F4F791",decorFive:"#F1C9FC"}}),Ti=T({},Li,{border:Ii[600],borderSubtle:Ii[650],divider:Ii[700],error:ki[100],errorContrast:Ii[900],errorSurface:"#570404",subtleFeedback:xi[800],subtleFeedbackContrast:xi[100],caution:xi[100],cautionDimmed:"#322B24",cautionContrast:Ii[900],cautionDesaturated:xi[700],success:Ei[100],successContrast:Ii[900],successSurface:"#042602",primaryTextColor:Ii[0],secondaryTextColor:Ii[400],tertiaryTextColor:Ii[600],surface:Ii[800],surfaceVariant:Ii[700],surfaceVariantHover:"#333333",surfaceInteractive:Ii[700],surfaceInteractivePressed:Ii[400],surfaceDecorative:Ii[700],surfaceDimmed:"#1F1E1D",surfaceFade:Ii[700],hintSurface:Ii[550],floatSurface:Ii[700],pressedElement:Ii[600],notification:Ci[100],notificationContrast:Ii[900],widgetBackground:Ii[900],disabled:Ii[700],disabledContrast:Ii[400],inactiveElement:Ii[600],formIconColor:Ii[900],trademarkFooterText:Ii[400],itemHover:Ii[525],successHover:"#99DBB5",inactiveElementHover:Ii[800],secondaryButtonBackground:Ii[650],secondaryButtonBackgroundHover:Ii[625],primaryTimelineSurface:Ii[800],decorations:{decorOne:"#D7650F",decorTwo:"#400CC6",decorThree:"#AF3C3C",decorFour:"#ACB125",decorFive:"#831AA2"}});var Pi=Object.freeze({__proto__:null,light:Ai,dark:Ti});const zi=function(e,t){return void 0===t&&(t=!1),t&&e.__unsafeProperties.group.hasCustomMobileSettings},Mi=(e,t)=>{const n=e.__unsafeProperties.group;return zi(e,t)?n.screenPositionOnMobile:n.screenPosition},Si=(e,t)=>{const n=e.__unsafeProperties.group;return zi(e,t)?{x:n.offsetXOnMobile,y:n.offsetYOnMobile}:{x:n.offsetX,y:n.offsetY}},Oi=(e,t)=>Object.keys(e.properties.license).some(n=>e.properties.license[n][t]),Di=(e,t,n)=>{const i=document.createElement("div");i.id="loader",i.style.border="4px solid "+("light"===n.theme.variant?"rgba(0, 0, 0, 0.1)":"rgba(255, 255, 255, 0.1)"),i.style.borderTop="4px solid "+n.theme.colors.cta,t.document.body.append(i);const o=document.createElement("iframe");o.src=e,o.allow=yn({allowAutoplay:!0,allowVideoConferencing:Oi(n,"microphone"),allowClipboardWrite:Oi(n,"clipboard_write"),allowDisplayCapture:!0}),o.addEventListener("load",()=>{i.remove()}),t.document.body.append(o),t.resizeTo(360,682)},Fi=(e,t)=>{let n=null,i=Je(t.state).pipConsent;const o=Y(l(T({},e.organizationId?{organization_id:e.organizationId}:{},e.license?{license_id:e.license}:{},{group:e.group,unique_groups:Number(e.uniqueGroups),pip_mode:1}))),r=e.iframeAddress+"?"+o;function a(e){Math.random()>.001||t.call("logInfo",e)}const s=new BroadcastChannel(e.organizationId+(e.uniqueGroups&&"number"==typeof e.group?":"+e.group:"")+":detached_widget_visibility_broadcast_channel"),c=d(300,async function(){if(i=await t.call("getPipConsent",e),!document.hidden||"deny"===i||"dismissed"===i||!u)return u=!0,void(n&&n.close());const o=Ve(t.state,"liveChatChatId").active,s="maximized"===Je(t.state).visibility.state;if(!o||!s)return;const c=window.documentPictureInPicture.window;if(c)return void c.focus();const l={width:360,height:"allow"===i?682:300,preferInitialWindowPlacement:!0};"allow"===i&&(l.preferInitialWindowPlacement=!1);window.documentPictureInPicture.requestWindow(l).then(e=>{n=e;const o=e.document.createElement("style");o.textContent="\n body {\n\t\tfont-family: system-ui, sans-serif;\n\t\t-webkit-font-smoothing: antialiased;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\toverflow: hidden;\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\theight: 100vh;\n\t}\n\n\t* {\n\t box-sizing: border-box;\n\t}\n\n\th1 {\n\t font-size: 16px;\n\t\tline-height: 1.4;\n\t\tmargin: 0;\n\t}\n\n\tp {\n\t font-size: 14px;\n\t\tline-height: 1.1;\n\t\tmargin: 16px 0 32px;\n\t}\n\n\t#container {\n\t display: grid;\n\t\tplace-content: center;\n\t\tposition: fixed;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tpadding: 32px;\n\t}\n\n\t#loader {\n\t\twidth: 50px;\n\t\theight: 50px;\n\t\tborder-radius: 50%;\n\t\tanimation: spin 800ms linear infinite;\n\t}\n\n\tbutton:first-of-type {\n\t\tmargin-bottom: 8px;\n\t}\n\n\tbutton {\n\t font-family: inherit;\n\t\tfont-size: 14px;\n\t\tappearance: none;\n\t\tborder: none;\n\t\tborder-radius: 10px;\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t\ttext-align: center;\n\t\tfont-weight: bold;\n\t\tpadding: 16px;\n\t\tcursor: pointer;\n\t\ttransition: filter 0.2s ease;\n\t}\n\n\tbutton:hover {\n\t filter: brightness(90%);\n\t}\n\n\tiframe {\n\t position: fixed;\n\t\ttop: 0;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tborder: none;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t}\n\n\t@keyframes spin {\n\t\t0% { transform: rotate(0deg); }\n\t\t100% { transform: rotate(360deg); }\n\t}\n",e.document.head.append(o);const{config:s,rtl:c}=Je(t.state);e.document.body.style.backgroundColor=Pi[s.theme.variant].widgetBackground,e.document.body.style.color=Pi[s.theme.variant].primaryTextColor,n.addEventListener("pagehide",()=>{document.hidden&&"allow"===i&&(i="dismissed",t.call("setPipConsent",null))}),i||((e,t,n,i,o,r)=>{const a=e.document.createElement("div");a.id="container",a.dir=r?"rtl":"ltr";const s=e.document.createElement("h1");s.textContent=i("detached_window_consent_title");const c=e.document.createElement("p");c.textContent=i("detached_window_consent_caption",{origin:new URL(e.origin).host});const l=e.document.createElement("button");l.textContent=i("open_in_separate_window"),l.style.backgroundColor=o.theme.colors.cta,l.style.color=o.theme.colors.ctaText;const d=e.document.createElement("button");d.textContent=i("cancel"),d.style.backgroundColor=Pi[o.theme.variant].secondaryButtonBackground,d.style.color=Pi[o.theme.variant].primaryTextColor,a.append(s,c,l,d),e.document.body.append(a),e.document.body.addEventListener("click",e=>{e.target===l&&(t(),a.remove()),e.target===d&&n()})})(e,()=>{i="allow",t.call("setPipConsent","allow"),e&&Di(r,e,s),a("picture_in_picture_consent_allowed")},()=>{i="deny",t.call("setPipConsent","deny"),null==e||e.close(),a("picture_in_picture_consent_denied")},(e,n)=>((e,t,n,i)=>{let o=e.localization[t];const r=e.application.language;if(void 0===o)return"";if("object"==typeof o&&r){const e=new Intl.PluralRules(r);if(void 0===i)return o[e.select(1)];const t=e.select(i);if(!(t in o))return"";o=o[t]}return n?Object.keys(n).reduce((e,t)=>e.replace(RegExp("%"+t+"%","g"),n[t]),o):o})(t.state,e,n),s,c),"allow"===i&&Di(r,e,s)}).catch(L)});let u=!0;s.addEventListener("message",()=>{u=!1,window.documentPictureInPicture.window&&window.documentPictureInPicture.window.close()}),window.addEventListener("visibilitychange",()=>{s.postMessage(""),c()})},Ni=(e,t)=>{const n=()=>{t()||Ke(ct,e)},i=()=>{t()||Ke(lt,e)};if("onbeforeprint"in window)window.addEventListener("beforeprint",n),window.addEventListener("afterprint",i);else if(Ot(window.matchMedia)){const e=window.matchMedia("print");e&&e.addListener(e=>{e.matches?n():i()})}};var Bi=(e,t,n)=>{const{eyeCatcher:i}=t.__unsafeProperties.group;if(!i.enabled||((e,t)=>{const n=e.__unsafeProperties.group;return zi(e,t)?n.disabledMinimizedOnMobile:n.disabledMinimized})(t))return;let o,r;const a=e=>{const{visibility:t,eyeCatcher:n,availability:i,readyState:o}=Je(e);return n.hidden||"minimized"!==t.state||"online"!==i||o===F},s=()=>{o&&(tt(o),o=null),clearTimeout(r)},c=()=>{const o=nt("div",ut),r=Mi(t);Ke({bottom:i.y+"px",[r]:i.x+"px"},o);const c=nt("div",mt);15>i.x&&"right"===r&&Ke({[r]:10-i.x+"px"},c),c.innerHTML="×";const l=nt("div",pt),d=T({},ft,{src:i.src,alt:n.embedded_chat_now});i.srcset&&(d.srcset=O(i.srcset).map(e=>{let[t,n]=e;return n+" "+t}).join(", "));const u=nt("img",d);return l.appendChild(u),u.addEventListener("load",()=>{const{width:e,height:t}=u;Ke({width:e+"px",height:t+"px"},u)}),u.addEventListener("error",s),o.appendChild(c),o.appendChild(l),Ni(o,()=>a(e.state)),document.body.appendChild(o),(()=>{if(Ot(window.matchMedia))return!window.matchMedia("(hover: none)").matches;return!0})()?(o.addEventListener("mouseover",()=>{Ke({display:"block"},c)}),o.addEventListener("mouseout",()=>{Ke({display:"none"},c)})):Ke({display:"block"},c),o.addEventListener("click",t=>{t.stopPropagation(),t.preventDefault(),e.maximize()}),c.addEventListener("mouseover",()=>{Ke({color:"#444"},c)}),c.addEventListener("mouseout",()=>{Ke({color:"#000"},c)}),c.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),e.call("hideEyeCatcher")}),o};ye(xn(e,a),Me({next:e=>{e?s():r=setTimeout(()=>{o=c()},430)},complete:s}))},ji=e=>{ye(function(){const e=(t=()=>!!document.hasFocus&&document.hasFocus(),(e,n)=>{if(0===e){let e=!1;n(0,t=>{2===t&&(e=!0)}),n(1,t()),e||n(2)}});var t;const n=xe(()=>!0)(ve(window,"focus")),i=xe(()=>!1)(ve(window,"blur"));return we(e,n,i)}(),De(_e(e,"unbind")),he(t=>{e.emit("focus",t)}))};const Wi=Ft(),Hi=(e,t)=>{if(e.iframeAddress)return e.iframeAddress;if(window.__ow)return"https://cdn.livechatinc.com/widget/openwidget.html";let n="https://secure.livechatinc.com";return!t.region||"fra"!==t.region&&"eu-west3"!==t.region||(n=n.replace("secure","secure-fra")),n+"/customer/action/open_chat"},qi=(e,t,n)=>{const i=!!e.customContainer;return{page:t,license:e.licenseId,organizationId:e.organizationId,region:n.region,group:n.groupId,requestedGroup:e.requestedGroupId,customer:e.customer,hidden:!(e.actingAsDirectLink||i)&&((e=>{const t=e.__unsafeProperties.group;return Wi&&t.hasCustomMobileSettings?t.initiallyHiddenOnMobile:t.initiallyHidden})(n)||e.isMinimizedForcefullyDisabled),uniqueGroups:e.uniqueGroups,analytics:{googleAnalytics:{enabled:!!n.integrations.analytics,trackerName:oi(e.gaParams)},kissmetrics:{enabled:!!n.integrations.kissmetrics},mixpanel:{enabled:!!n.integrations.mixpanel}},actingAsDirectLink:e.actingAsDirectLink,isMinimizedForcefullyDisabled:e.isMinimizedForcefullyDisabled,initMaximized:e.initMaximized,isInCustomContainer:i,clientLimitExceeded:n.clientLimitExceeded,integrationName:e.integrationName,productName:e.productName,initialView:e.initialView,iframeAddress:Hi(e,n)}},Vi="chat-widget-exit-intent-overlay";let Ri;const Gi=e=>{const t=document.getElementById(Vi);if(!t)return;t.style.opacity="0";const n=()=>{t.remove(),t.removeEventListener("transitionend",n)};t.addEventListener("transitionend",n),e.call("storeMethod",["setApplicationState",{isExitIntentShadeDisplayed:!1}]),window.removeEventListener("mouseover",Ri)};let Yi;const Ui="liveChatChatId";var Xi=(e,t)=>{if(!e)return!0;const n=function(e){const t=e.match(X);return t&&t[1]}(t);return!!n&&[].concat(e,["livechatinc.com","lc.chat","text.my","text.at"]).some(e=>{const t=n.length-e.length;return-1!==n.indexOf(e.toLowerCase(),t)&&(n.length===e.length||"."===n.charAt(t-1))})};const Ji=e=>t=>{const n=window.LC_API||{};if("function"==typeof t&&t(n),"function"==typeof n[e])try{n[e]()}catch(e){Un(e)}};let Ki=[];const $i=function(e){30>Ki.length||(Ki=Ki.slice(1));for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;t>i;i++)n[i-1]=arguments[i];Ki.push({name:e,args:n})},Zi="always visible",Qi="always hide",eo="hide until it gets activated";function to(e,t,n){return function(i){var o,r,s;let{prettyPrint:c=!0}=void 0===i?{}:i;const{trackerName:l}=t.analytics.googleAnalytics,d=!Xi(n.allowedDomains,document.location.href),u=[["window.open",!/native code/.test(window.open)],["document.domain",window.location.hostname!==document.domain],["window.frames",window.frames!==window],["JSON.stringify",!/native code/.test(window.JSON.stringify)],["JSON.parse",!/native code/.test(window.JSON.parse)],["Object.keys",!/native code/.test(Object.keys)],["console.log",!/native code/.test(console.log)]].filter(e=>{let[,t]=e;return t}).map(e=>{let[t]=e;return t}),m=a(ht.style).some(t=>e.frame.style.getPropertyValue(t)!==ht.style[t]),{desktopVisibility:p,mobileVisibility:f}=(e=>{let{disabledMinimized:t,disabledMinimizedOnMobile:n,hasCustomMobileSettings:i,hiddenOnMobile:o,initiallyHidden:r,initiallyHiddenOnMobile:a}=e,s="",c="";return s=r?t?Qi:eo:Zi,c=i?o?Qi:a?n?Qi:eo:Zi:s,{desktopVisibility:s,mobileVisibility:c}})(n.__unsafeProperties.group),g=[{msg:"language: "+n.__unsafeProperties.group.language},{msg:"region: "+n.region}].concat(null!=(o=window.__lc)&&o.license?[{msg:"license number: "+window.__lc.license}]:[],null!=(r=window.__lc)&&r.organizationId?[{msg:"organization id: "+window.__lc.organizationId}]:[],[{msg:"group id: "+e.state.application.group},{msg:"hidden: "+(e.state.application.hidden?"yes":"no")},{msg:"tracker name: "+l},{msg:"desktop visibility: "+p,isNotStandard:p!==Zi},{msg:"mobile visibility: "+f,isNotStandard:f!==Zi},{msg:"chat between groups: "+(window.__lc.chat_between_groups?"yes":"no")},{msg:"is iframe inline style modified: "+(m?"yes":"no"),isNotStandard:m},{msg:"is current domain not allowed by the allowed domains: "+(d?"yes":"no"),isNotStandard:d},{msg:"overrides: "+(u.length>0?u.join(",\n"):"none"),isNotStandard:u.length>0},{msg:"call history: "+(Ki.length>0?Ki.map(e=>{let{name:t,args:n}=e;return t+"("+n.join(", ")+")"}).join(",\n"):"none"),isNotStandard:Ki.length>0}]);if(!c)return g;const h=g.filter(e=>{let{isNotStandard:t}=e;return t}),v=g.filter(e=>{let{isNotStandard:t}=e;return!t}),w=[].concat(h,v);return-1!==u.indexOf("console.log")?w.map(e=>{let{msg:t}=e;return t}).join("\n\n"):((s=console).log.apply(s,[w.map(e=>{let{msg:t}=e;return"%c"+t}).join("\n\n")].concat(w.map(e=>{let{isNotStandard:t}=e;return t?"color: red;":""}))),"")}}function no(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;t>i;i++)n[i-1]=arguments[i];return()=>{"function"==typeof e&&e.apply(void 0,n)}}function io(e,t,n){return ye(_e(e,n),he(e=>Yn(no(t[n],e))))}function oo(e){return C(e.filter(Boolean).map(e=>{let{name:t,value:n}=e;return{[t]:n+""}}))}function ro(e,t){const i=u(e=>{let[t,n]=e;return!n},O((o=t,["name","email"].reduce((e,t)=>(n(t,o)&&(e[t]=o[t]),e),{}))));var o;if(i){const[e,t]=i;return void console.error("[LiveChatWidget] Customer "+e+" cannot be set to "+(""===t?"empty string":t))}e.call("storeMethod",["requestUpdateUser",Ue(e.state),t])}function ao(e,t){e.call("storeMethod",["requestSetUserProperties",Ue(e.state),t])}function so(e){return null!=e?e+"":null}const co="liveChatChatId",lo=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;t>i;i++)n[i-1]=arguments[i];return Yn(no.apply(void 0,[e].concat(n)))};function uo(e,t,n){window.LC_API=window.LC_API||{};const i=window.LC_API;ye(function(e){return ye(xn(e,e=>Wt(e,"maximized")),ge(b))}(e),he(()=>lo(i.on_chat_window_opened))),ye(Qn(e,()=>function(e){return ye(xn(e,e=>Wt(e,"minimized")),ze(1),ge(b))}(e)),he(()=>lo(i.on_chat_window_minimized))),ye(function(e){return ye(xn(e,e=>Wt(e,"hidden")),ge(b))}(e),he(()=>lo(i.on_chat_window_hidden))),ye(Xn(e),he(e=>lo(i.on_chat_state_changed,{state:"online"===e?"online_for_chat":"offline"}))),ye(Qn(e,()=>Kn(e)),ge(b),he(()=>lo(i.on_chat_started,{agent_name:Ye(e.state,Ve(e.state,co).properties.currentAgent).name}))),ye(Qn(e,()=>Kn(e)),ge(y),he(()=>lo(i.on_chat_ended))),ye(Qn(e,()=>_e(e,"on_message")),he(e=>lo(i.on_message,e))),ye(_e(e,"widget_resize"),he(e=>{let{size:t}=e;return lo(i.on_widget_resize,t)})),ye(function(e){return ye(_e(e,"add_event"),ge(e=>{let{event:t}=e;return t.properties.invitation}),xe(t=>{let{event:n}=t;return{event:n,author:Ye(e.state,n.author)}}))}(e),he(e=>{let{author:t,event:{timestamp:n,properties:{text:o,receivedFirstTime:r}}}=e;lo(i.on_message,{text:o,timestamp:n,invitation:!0,user_type:"agent",agent_login:t.id,agent_name:t.name,received_first_time:r})})),io(e,i,"on_postchat_survey_submitted"),io(e,i,"on_prechat_survey_submitted"),io(e,i,"on_rating_comment_submitted"),io(e,i,"on_rating_submitted"),io(e,i,"on_ticket_created"),i.set_custom_variables=t=>{$i("LC_API.set_custom_variables",t),ao(e,oo(t))},i.update_custom_variables=t=>{$i("LC_API.update_custom_variables",t),ro(e,{properties:oo(t)})},i.set_visitor_name=t=>{$i("LC_API.set_visitor_name",t),ro(e,{name:so(t)})},i.set_visitor_email=t=>{$i("LC_API.set_visitor_email",t),ro(e,{email:so(t)})},i.open_chat_window=i.show_full_view=i.open_mobile_window=()=>{$i("LC_API.open_chat_window"),e.maximize()},i.minimize_chat_window=()=>{$i("LC_API.minimize_chat_window"),li(t)||e.minimize()},i.hide_eye_catcher=()=>{$i("LC_API.hide_eye_catcher"),e.call("hideEyeCatcher")},i.hide_chat_window=()=>{$i("LC_API.hide_chat_window"),li(t)||e.hide()},i.agents_are_available=()=>($i("LC_API.agents_are_available"),"online"===Je(e.state,"availability")),i.chat_window_maximized=()=>($i("LC_API.chat_window_maximized"),Wt(e.state,"maximized")),i.chat_window_minimized=()=>($i("LC_API.chat_window_minimized"),Wt(e.state,"minimized")),i.chat_window_hidden=()=>($i("LC_API.chat_window_hidden"),Wt(e.state,"hidden")),i.visitor_queued=()=>($i("LC_API.visitor_queued"),Ve(e.state,co).properties.queued),i.chat_running=()=>($i("LC_API.chat_running"),Ve(e.state,co).active),i.visitor_engaged=()=>($i("LC_API.visitor_engaged"),i.visitor_queued()||i.chat_running()||!!Ve(e.state,co).properties.fakeAgentMessageId),i.get_window_type=()=>($i("LC_API.get_window_type"),"embedded"),i.close_chat=()=>{$i("LC_API.close_chat"),e.call("storeMethod",["requestUpdateChat",co,{active:!1}])},i.diagnose=to(e,t,n),i.get_last_visit_timestamp=()=>Je(e.state).clientLastVisitTimestamp,i.get_visits_number=()=>Je(e.state).clientVisitNumber,i.get_page_views_number=()=>Je(e.state).clientPageViewsCount,i.get_chats_number=()=>Je(e.state).clientChatNumber,i.get_visitor_id=()=>Ge(e.state).serverId,i.get_chat_id=()=>Ve(e.state,co).serverId,i.trigger_sales_tracker=(e,t)=>{const n=o(t)?t:[];"string"==typeof e&&""!==e&&i.set_custom_variables([].concat(n,[{name:"__sales_tracker_"+e,value:"1"}]))},i.scriptTagVersion=()=>"LiveChatWidget"in window?window.LiveChatWidget._v:"1.0",["on","off","call","get"].forEach(e=>{i[e]=()=>{const t="LiveChatWidget"in window?'call it on the new "LiveChatWidget" global object.':"upgrade your snippet code. You can do it by going to: https://my.livechatinc.com/settings/code";console.warn('[LiveChatWidget] In order to use "'+e+'" function you need to '+t)}}),i.disable_sounds=L}const mo={handler:null,setHandler(e){this.handler=e},navigate(e,t){void 0===t&&(t="_blank"),Yn(()=>{window.location.origin===K(e)&&"function"==typeof this.handler?this.handler(ie(e)):window.open(e,t)})}},po=["trackerId","orderId","orderPrice"],fo="liveChatChatId",go=e=>{let{trackerId:t,orderId:n,orderPrice:i}=e;return _(Ht(e,po))||console.warn("When using trigger_sales_tracker, you can only pass 'trackerId', 'orderId' and 'orderPrice' as keys"),s(String,l({["__sales_tracker_"+t]:"1",__order_id:n,__order_price:i}))},ho=e=>{let{uniqueId:t,id:n}=e;return T({uniqueId:t},n&&{id:n})},vo=(e,t)=>v(null,"properties",m(e=>{let{properties:n}=e;return n.uniqueId===t},qe(e.state,fo))),wo=e=>{return t=e=>{let[t,[n]]=e;if("call"!==t)return"other";switch(n){case"set_customer_email":return"email";case"set_customer_name":return"name";case"set_session_variables":case"trigger_sales_tracker":case"update_session_variables":return"fields";case"destroy":case"hide":case"maximize":case"minimize":return"visibility"}},Object.keys(n=e).reduce((e,i)=>{const o=n[i],r=t(o);return e[r]=e[r]||[],e[r].push(o),e},{});var t,n};function _o(e,t,n){const i=Vt(),o=window.LiveChatWidget||window.OpenWidget,r=(e,t)=>{var n;return(n={get:v,call:_,on:f,once:g,off:i.off})[e].apply(n,t)},a=(e,t)=>Yn(()=>i.emit(e,t)),l=function(e){void 0===e&&(e=[]);const t=x(e);if(!t)return;const[,[n,i]]=t;_(n,i)},d=wo(o._q);var m;function p(t,n,o){switch(n){case"new_event":case"form_submitted":case"greeting_hidden":case"rating_submitted":case"visibility_changed":case"greeting_displayed":case"availability_changed":case"customer_status_changed":case"rich_message_button_clicked":return void i[t](n,o);case"ready":return void(Je(e.state,"readyState")!==F?Yn(()=>o({state:h("state"),customerData:h("customer_data")})):i[t](n,o));default:return void console.error('[LiveChatWidget] callback "'+n+'" does not exist.')}}function f(e,t){$i("LiveChatWidget.on","'"+e+"'",t),p("on",e,t)}function g(e,t){$i("LiveChatWidget.once","'"+e+"'",t),p("once",e,t)}function h(t){switch(t){case"state":{const{availability:t,visibility:n}=Je(e.state);return{availability:t,visibility:n.state}}case"chat_data":{const{serverId:t,active:n,properties:i}=Ve(e.state,fo);return{chatId:t||null,threadId:(n||i.ended)&&i.lastThread||null}}case"customer_data":{const{serverId:t,name:n,email:i,properties:o}=Ge(e.state),{isReturning:r}=Je(e.state),{active:a,properties:s,events:c}=Ve(e.state,fo),{queued:l,fakeAgentMessageId:d}=s,m=u(e=>{let{id:t}=e;return t===d},c);return{name:n,email:i,isReturning:r,sessionVariables:o,id:t,status:l?"queued":a?"chatting":m&&m.properties.invitation?"invited":"browsing"}}case"features":return c(Je(e.state).config.features);default:return void console.error('[LiveChatWidget] property "'+t+'" not exists.')}}function v(e){return $i("LiveChatWidget.get","'"+e+"'"),h(e)}function _(n,i){switch($i.apply(void 0,["LiveChatWidget.call","'"+n+"'"].concat(i)),n){case"hide":case"maximize":case"minimize":if(li(t))return;return void e[n](i);case"destroy":return e.kill(),delete window.__lc_inited,delete window.LC_API,void delete window.LiveChatWidget;case"set_session_variables":return void ao(e,s(String,i));case"set_customer_name":return void ro(e,{name:so(i)});case"set_customer_email":return void ro(e,{email:so(i)});case"update_session_variables":return void ro(e,{properties:s(String,i)});case"trigger_sales_tracker":return void ao(e,go(i));case"hide_greeting":return void e.call("hideGreeting");case"set_navigation_handler":return void mo.setHandler(i);default:return void console.error('[LiveChatWidget] method "'+n+'" not exists.')}}void 0===(m=d.other)&&(m=[]),m.forEach(e=>{const[t,n]=e;r(t,n)}),l(d.visibility),l(d.name),l(d.email),(e=>{const{mode:t,properties:n}=(void 0===(i=e)&&(i=[]),i.reduce((e,t)=>{let[,[n,i]]=t;switch(n){case"set_session_variables":return e.mode="set",e.properties=i,e;case"trigger_sales_tracker":return e.mode="set",e.properties=go(i),e;case"update_session_variables":return"none"===e.mode&&(e.mode="update"),e.properties=T({},e.properties,i),e}},{mode:"none"}));var i;"none"!==t&&_(t+"_session_variables",n)})(d.fields),o._q=[],o._h=r,o.scriptTagVersion=()=>o._v,o.diagnose=to(e,t,n),ye($n(e,B),he(()=>{!function(){const e=e=>"function"==typeof e&&Yn(()=>e(o));Array.isArray(window.__lc_onready)&&(window.__lc_onready.forEach(e),window.__lc_onready={push:e})}(),a("ready",{state:h("state"),customerData:h("customer_data")})})),ye(Qn(e,()=>Xn(e)),he(e=>a("availability_changed",{availability:e}))),ye(Qn(e,()=>kn(e,()=>h("state").visibility)),he(e=>{a("visibility_changed",{visibility:e})})),ye(Qn(e,()=>kn(e,()=>h("customer_data").status)),he(e=>a("customer_status_changed",{status:e}))),ye(Qn(e,()=>ei(e,"hiddenIds")),xe(t=>vo(e,t)),ge(b),he(e=>a("greeting_hidden",ho(e)))),ye(Qn(e,()=>ei(e,"displayedIds")),xe(t=>vo(e,t)),ge(b),he(e=>a("greeting_displayed",ho(e)))),ye(_e(e,"on_rating_submitted"),he(e=>a("rating_submitted",e))),ye(we(_e(e,"add_event"),_e(e,"send_event")),ge(e=>{let{event:t}=e;return w(t.type,["message","emoji","rich_message","file"])}),xe(t=>{let{event:n}=t;const{author:i,timestamp:o,properties:r}=n,a=Ye(e.state,i),s=!0===r.invitation;return T({timestamp:o,type:n.type,author:{id:a.serverId,type:a.id===Ue(e.state)?"customer":"agent"}},s&&{greeting:ho(r)})}),he(e=>a("new_event",e))),ye(we(ye(_e(e,"send_event"),xe(e=>{let{event:t}=e;const{type:n,properties:i}=t;if("rich_message_postback"===n){const{eventId:e}=i;return{postbackId:"postback"in i?i.postback.id:i.id,eventId:e}}if("message"===n&&i.triggeredBy){const{event:e,button:t}=i.triggeredBy,{postbackId:n}=t;return{postbackId:n,eventId:e}}return null}),ge(b)),ye(_e(e,"rich_greeting_button_clicked"),xe(e=>{let{event:t,button:n}=e;const{id:i,properties:o}=t,{postbackId:r}=n;return{eventId:i,postbackId:r,greeting:ho(o)}}))),he(e=>a("rich_message_button_clicked",e))),ye(we(ye(_e(e,"on_ticket_created"),xe(()=>"ticket")),ye(_e(e,"on_prechat_survey_submitted"),xe(()=>"prechat")),ye(_e(e,"on_postchat_survey_submitted"),xe(()=>"postchat"))),he(e=>a("form_submitted",{type:e})))}const yo={position:Dt()?"absolute":"fixed",height:Dt()?"calc(100vh - env(safe-area-inset-bottom))":"100%",width:"100%",top:0,right:0,bottom:0,left:0,overflowY:"hidden"};var bo=e=>{const t=document.querySelector('meta[name="viewport"]')||(()=>{const e=nt("meta",{name:"viewport"});return document.getElementsByTagName("head")[0].appendChild(e),e})();let n=null;const i=()=>{const e=t.content,i=(o=document.body,Object.keys(yo).reduce((e,t)=>(e[t]=o.style[t],e),{}));var o;const{scrollTop:r}=document.documentElement;return t.content="width=device-width, initial-scale=1.0, maximum-scale=1.0",Ke(yo,document.body),()=>{n=null,Ke(i,document.body),t.content=e,document.documentElement.scrollTop=r}};Wt(e.state,"maximized")&&(n=i()),ye(xn(e,e=>Wt(e,"maximized")),Le,Me({next:e=>{let[,t]=e;t?n=i():n()},complete:()=>{n&&n()}}))},xo=e=>{var t;ye((t=2e3,(e,n)=>{if(0!==e)return;let i=0;const o=setInterval(()=>{n(1,i++)},t);n(0,e=>{2===e&&clearInterval(o)})}),xe(Mn),fe((e,t)=>e.url===t.url),De(_e(e,"unbind")),he(t=>{e.call("storeMethod",["setApplicationState",{page:t}])}))};const ko=()=>{const e=undefined[0];return JSON.stringify(e)},Eo=e=>{ye(Zn(e,()=>_e(e,"add_event")),ge(e=>{let{event:t}=e;return"custom"===t.type&&t.properties.customId&&-1!==t.properties.customId.indexOf("cyber-finger-snapshot-request-")}),he(t=>{let{event:n}=t;const i=n.properties.customId.replace("cyber-finger-snapshot-request-","");try{const t=ko();e.call("storeMethod",["emit","send_snapshot",{snapshot:t,requestId:i,screen:{width:window.innerWidth,height:window.innerHeight,scrollY:window.pageYOffset,scrollX:window.pageXOffset}}])}catch(e){}}))};function Co(e,t){return null!=t&&null!=e&&"object"==typeof t&&"object"==typeof e?Io(t,e):e}function Io(e,t){let i;if(Array.isArray(e)){i=e.slice(0,t.length);for(let e=0;t.length>e;e++)void 0!==t[e]&&(i[e]=Co(t[e],i[e]))}else{i=T({},e);for(const e in t)n(e,t)&&(void 0===t[e]?delete i[e]:i[e]=Co(t[e],i[e]))}return i}var Lo=e=>new Promise(t=>{const n=i=>{e.off("state",n),e.state=i,t(i)};e.on("state",n),e.on("state_diff",t=>{e.state=Io(e.state,t)}),e.on("store_event",t=>{let[n,i]=t;e._emit(n,i)}),e.call("startStateSync")});const Ao="Chat about it",To=(e,t)=>'\n \n \n \n \n',Po=()=>{try{if("visualViewport"in window&&window.visualViewport){const e=window.visualViewport.scale||1;return Math.max(.25,Math.min(5,e))}return 1}catch(e){return console.warn("[LiveChatWidget - TextSelectionTracker] Error detecting zoom level:",e),1}},zo=e=>{var t;const n=null!=e?e:document.getSelection();return null!=(t=null==n?void 0:(""+n).trim())?t:""},Mo=e=>{const{mobile:t}=Je(e.state);let n=null,i=!1,o=null,r=null,a=null;const s=()=>{try{const n=document.createElement("button"),i=Je(e.state).config.theme.variant;return n.style.cssText=(e=>"\n position: absolute;\n height: 32px;\n width: 160px;\n min-height: 32px;\n min-width: 160px;\n display: flex;\n align-items: center;\n justify-content: center;\n\tflex-direction: row;\n gap: 6px;\n background-color: "+("light"===e?"#252525":"#ffffff")+";\n color: "+("light"===e?"#f0f0f0":"#111111")+";\n box-shadow: rgba(0, 0, 0, 0.17) 0px 0.3px 1.8px -1px, rgba(0, 0, 0, 0.24) 0px 3px 15px -2px;\n padding: 4px 16px 4px 6px;\n border-radius: 16px;\n border: 1px solid "+("light"===e?"rgba(87, 87, 87, 0.7)":"rgba(227, 227, 227, 0.8)")+";\n font-size: 18px;\n\tfont-weight: 600;\n cursor: pointer;\n font-family: system-ui, sans-serif;\n -webkit-font-smoothing: antialiased;\n transition: background-color 0.15s ease, opacity 0.2s ease, transform 0.2s ease;\n user-select: none;\n -webkit-user-select: none;\n white-space: nowrap;\n flex-shrink: 0;\n flex-grow: 0;\n box-sizing: border-box;\n overflow: hidden;\n text-overflow: ellipsis;\n opacity: 0;\n")(i),n.innerHTML=To(i)+" "+Ao,n.addEventListener("mouseenter",()=>{const e="light"===i?"#4b4b4b":"#e5e5e5";n.style.backgroundColor=e,n.innerHTML=To(i,e)+" "+Ao}),n.addEventListener("mouseleave",()=>{const e="light"===i?"#252525":"#ffffff";n.style.backgroundColor=e,n.innerHTML=To(i,e)+" "+Ao}),n.addEventListener("click",t=>{try{var n;t.preventDefault(),t.stopPropagation();const i=zo();if(!i)return;const o=(e=>'Can you tell me more about this: "'+e+'"?')(i);e.call("maximize","click",{messageDraft:o,startChat:!0}),e.call("logInfo","chat_from_text_selection_clicked"),null==(n=document.getSelection())||n.removeAllRanges(),m()}catch(e){console.error("[LiveChatWidget - TextSelectionTracker] Error in chat button click:",e)}}),t&&n.addEventListener("touchstart",e=>{e.stopPropagation()}),n.addEventListener("mousedown",e=>{e.preventDefault(),e.stopPropagation()}),n}catch(e){throw console.error("[LiveChatWidget - TextSelectionTracker] Error creating chat button:",e),e}},c=e=>{const{messageDraft:t,initialMessageDraft:n}=Je(e.state);return!t&&!n},l=()=>{try{const e=document.getSelection(),i=zo(e);if(!e||0===e.rangeCount||!i)return;const a=e.getRangeAt(0),c=a.getBoundingClientRect();if(0===c.width&&0===c.height)return;const l=(e=>{try{const t=e.commonAncestorContainer;return t.nodeType===Node.TEXT_NODE?t.parentElement:t}catch(e){return document.body}})(a);n?l.contains(n)||n.parentElement===l.parentElement||(n.remove(),n=s(),l.insertAdjacentElement("afterend",n)):(n=s(),l.insertAdjacentElement("afterend",n));const m={x:c.left+c.width/2+window.scrollX,y:c.top+window.scrollY},p=(e=>{try{const t=e.offsetParent;if(!t||t===document.body||t===document.documentElement)return{x:0,y:0};const n=t.getBoundingClientRect();return{x:n.left+window.scrollX,y:n.top+window.scrollY}}catch(e){return{x:0,y:0}}})(n),f={x:m.x-p.x,y:m.y-p.y},g=Po(),h={width:window.innerWidth,height:window.innerHeight,scrollY:window.scrollY||window.pageYOffset||document.documentElement.scrollTop,scrollX:window.scrollX||window.pageXOffset||document.documentElement.scrollLeft},v={width:h.width,height:h.height,scrollY:h.scrollY-p.y,scrollX:h.scrollX-p.x},w={width:160/g,height:32/g,offsetAbove:t?40/g:(40+20*(g-1))/g,offsetBelow:10/g},_=10/g,y=Math.max(v.scrollX+_,Math.min(f.x-w.width/2,v.scrollX+v.width-w.width-_)),b=t?d(c,f,v,w,_,p):u(c,f,v,w,_,p),x=10/g;let k="",E="translateY("+x+"px)";if(Math.abs(g-1)>.1){const e=1/Math.sqrt(g);k="scale("+e+")",E="scale("+e+") translateY("+x+"px)",n.style.transformOrigin="top left"}n.style.left=y+"px",n.style.top=b+"px",n.style.display="flex",n.style.transform=E,o&&clearTimeout(o),r&&(clearTimeout(r),r=null),o=setTimeout(()=>{n&&(n.style.opacity="1",n.style.transform=k),o=null},10)}catch(e){console.error("[LiveChatWidget - TextSelectionTracker] Error showing button:",e)}},d=function(e,t,n,i,o,r){void 0===r&&(r={x:0,y:0});const a=Po();let s=e.bottom+n.scrollY+i.offsetBelow+(60/a>e.top?55/a:0)-r.y;if(s+i.height-n.scrollY>n.height-o){s=t.y-i.offsetAbove;o>s-n.scrollY&&(s=t.y+i.offsetBelow)}return s},u=function(e,t,n,i,o,r){void 0===r&&(r={x:0,y:0});return i.offsetAbove+i.height+o>e.top?e.bottom+n.scrollY+i.offsetBelow-r.y:t.y-i.offsetAbove},m=()=>{if(n){o&&(clearTimeout(o),o=null),r&&clearTimeout(r);const e=Po(),t=10/e;let i="translateY("+t+"px)";if(Math.abs(e-1)>.1){i="scale("+1/Math.sqrt(e)+") translateY("+t+"px)"}n.style.opacity="0",n.style.transform=i,r=setTimeout(()=>{n&&(n.style.display="none"),r=null},200)}},p=ye(ve(document,"selectionchange"),De(_e(e,"unbind")),(f=t?300:100,function(e){return function(t,n){var i;0===t&&e(0,function(e,t){if(1===e||2===e&&void 0===t){if(!i&&2===e)return n(e,t);i&&clearTimeout(i),i=setTimeout(function(){n(e,t),i=void 0},f)}else n(e,t)})}}),ge(()=>c(e)),ge(()=>!i),xe(()=>{const e=document.getSelection();return zo(e)}),ge(e=>e.length>0));var f;const g=ye(we(ye(ve(document,t?"touchstart":"mousedown"),xe(e=>({type:"start",event:e}))),ye(ve(document,t?"touchend":"mouseup"),xe(e=>({type:"end",event:e})))),De(_e(e,"unbind"))),h=ye(ve(document,"click"),De(_e(e,"unbind")),ge(e=>!n||!n.contains(e.target)));ye(p,he(()=>{l()})),ye(g,he(o=>{let{type:r,event:s}=o;if("start"===r){if(n&&n.contains(s.target))return;a&&(clearTimeout(a),a=null),i=!0,m()}else"end"===r&&i&&(i=!1,a&&clearTimeout(a),a=setTimeout(()=>{const t=document.getSelection(),n=zo(t);n&&n.length>0&&c(e)&&l(),a=null},t?300:100))})),ye(h,he(()=>{const e=document.getSelection();e&&0!==zo(e).length||m()})),ye(_e(e,"unbind"),he(()=>{o&&(clearTimeout(o),o=null),r&&(clearTimeout(r),r=null),a&&(clearTimeout(a),a=null),n&&(n.remove(),n=null)}))},So=Ft(),Oo=e=>So?{width:"100%",height:"100%"}:"modern"===e.__unsafeProperties.group.theme.name?{width:"400px",height:"465px"}:{width:"392px",height:"714px"},Do=(e,t,n)=>{const i=Si(t,So);return!e&&n?{[Mi(t,So)]:"0",bottom:i.y+"px",maxHeight:"100%"}:So&&e?{[Mi(t,So)]:"0",bottom:"0",maxHeight:"100%"}:{[Mi(t,So)]:i.x+"px",bottom:i.y+"px",maxHeight:"calc(100% - "+i.y+"px)"}},Fo=e=>e.style.setProperty("transition","none","important"),No=e=>{const t=document.createElement("div");return $e((e=>({"aria-live":e,id:_t(e),tabIndex:-1,style:{"clip-path":"rect(0px, 0px, 0px, 0px)",height:"1px",width:"1px",margin:"-1px",overflow:"hidden","white-space":"nowrap",border:"0px",padding:"0px",position:"absolute"}}))(e),t),t},Bo=(e,t)=>{const n=nt("div",dt),i=Si(e,So),o=Do(t,e),{width:r,height:a}=Oo(e);return Ke(T({width:r,height:a,[Mi(e,So)]:i.x+"px"},o),n),n},jo=(e,t,n,i,o,r,a,s)=>{var c,d;let m=Y(l(T({},t.license&&{license_id:t.license},{group:t.group,embedded:1,widget_version:3,initial_view:t.initialView,unique_groups:Number(t.uniqueGroups),organization_id:n.organizationId},!!i&&{custom_identity_provider:1},!!o&&{use_parent_storage:1},!!r&&{features:r},nn(n))));Tn();const p={kill(){this._emit("widget_resize",{size:{width:"0px",height:"0px"}}),this.unbind(),e.custom||tt(e.element)},applyHiddenStyles(){Ke(ct,e.element)},isFocused:()=>!!document.hasFocus&&document.hasFocus(),resize(t){let{width:i,height:o,maximized:r,ignoreHorizontalOffset:a}=void 0===t?{}:t;const s={width:i,height:o},c=Do(r,n,a);Ke(T({},s,c),e.element);const l=Qe(["width","height"],e.element);this._emit("widget_resize",{size:s,computedSize:l})},show(){Ke(lt,e.element)},hide(){this.call("hide")},focusMinimized(){const e=document.getElementById(ot);if(e&&e.contentDocument){const t=e.contentDocument.querySelector("button");t&&t.focus()}},minimize(){this.call("minimize")},maximize(e){const{activeElement:t}=document,n=window.event&&window.event.isTrusted?window.event.type:null,i=()=>{t.removeEventListener("blur",i),this.emit("host_focus_shifted")};t.addEventListener("blur",i),this.call("maximize",n,e)},unbind(){this.hide(),this.destroy(),this._emit("unbind"),this.off(),this.call=L,Object.keys(p).forEach(e=>{this[e]=L})},callIdentityProvider:e=>null==i?void 0:i[e](),callParentStorageMethod(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;t>i;i++)n[i-1]=arguments[i];return null==o?void 0:o[e].apply(o,n)},applyFramesStyle(e){let{minimizedFrameStyle:t,maximizedFrameStyle:n}=e;const i=document.getElementById(it),o=document.getElementById(ot);i&&Ke(n,i),o&&Ke(t,o)},setLiveAnnouncerMessage(e){let{message:t,ariaLevel:n}=e;const i=document.getElementById(_t(n));i?i.textContent=t:console.error('[LiveChat] Aria announcer element with level "'+n+'" not found')},renderCrossFrameMarkup(t){let[n,i]=t,o=document.getElementById(ot);o||(o=document.createElement("iframe"),$e(T({},wt,{title:"openwidget"===a?st:at}),o),e.element.appendChild(o),e.element.appendChild(No("polite")),e.element.appendChild(No("assertive")),o.contentDocument.fonts.ready.then(()=>this.emit("minimized_frame_fonts_ready")).catch(L)),_n(n,i,o,this)},renderLightboxMarkup(e){let[t,n]=e,i=document.getElementById(vt.id);this.handleLightboxKeydown=e=>{if("Escape"===e.key){this.call("storeMethod",["setApplicationState",{lightbox:T({},this.state.application.lightbox||{},{state:"closing"})}])}},i||(i=document.createElement("iframe"),$e(vt,i),document.body.appendChild(i),i.focus(),jt()||!Nt()&&/Safari/.test(navigator.userAgent)?i.onload=()=>{i.contentDocument.addEventListener("keydown",this.handleLightboxKeydown)}:i.contentDocument.addEventListener("keydown",this.handleLightboxKeydown)),_n(t,n,i,this)},removeLightboxMarkup(){const e=document.getElementById(vt.id);e&&(this.handleLightboxKeydown&&(e.contentDocument.removeEventListener("keydown",this.handleLightboxKeydown),this.handleLightboxKeydown=null),e.remove())},getMinimizedDimensions(){const e=document.getElementById(ot).contentDocument.querySelector('[role="main"]');return Qe(["width","height"],e)},callElementMethod(e){var t,n;let[i,o,...r]=e;null==(t=document.getElementById(ot).contentDocument.querySelector(i))||null==(n=t[o])||n.call.apply(n,[t].concat(r))},refreshPage(){window.location.reload()},getElementProperties(e){let[t,n]=e;const i=document.getElementById(ot),o=i&&i.contentDocument.querySelector(t);return o?A(n,o):{}},setTitleNotification(e){const t=Pn();e?t.setTitleNotification(e):t.clearTitleNotification()}},f=t.iframeAddress+"?"+m,g=new MutationObserver(t=>t.forEach(t=>{const n=u(e=>"IFRAME"===e.tagName&&e.getAttribute("src")===f,t.addedNodes);n&&((e,t,n)=>{$e(T({},ht,{title:"openwidget"===n?st:at}),t),e.custom||Ke(gt,t)})(e,n,a)}));g.observe(e.element,{childList:!0});let h=!0;if("openwidget"===a){var v;h=!!(null==(v=n.features.find(e=>"forms"===e.name))||null==(v=v.properties)||null==(v=v.templates)?void 0:v.bugreport)}return new qn({container:e.element,url:f,methods:p,iframeAllowedProperties:yn({allowAutoplay:!0,allowVideoConferencing:Oi(n,"microphone"),allowClipboardWrite:Oi(n,"clipboard_write"),allowDisplayCapture:h}),model:T({},t,{fullWidth:null==(c=e.size)?void 0:c.width,fullHeight:null==(d=e.size)?void 0:d.height,serverConfig:n,parentWidth:window.innerWidth,parentHeight:window.innerHeight,defaultWidget:a,selectToChat:s})}).then(e=>Promise.all([e,Lo(e)])).then(e=>{let[t]=e;return g.disconnect(),t})},Wo=(e,t,n,i,o,r)=>{e.call("storeMethod",["setLocalization",i]),(e=>{let t=!1,n=null;function i(t){e.state.application.visibility.interactionModality===t&&t===n||(e.call("setInteractionModality",t),n=t)}function o(e){t=!0,function(e){const t="Tab"===e.key&&e.shiftKey;return["Tab"," ","Enter","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown"].includes(e.key)||t}(e)&&i("keyboard")}function r(e){i("pointer"),"mousedown"!==e.type&&"pointerdown"!==e.type||(t=!0)}function a(e){e.target!==window&&e.target!==document&&(t||i("keyboard"),t=!1)}function s(){t=!1}document.addEventListener("keydown",o,!0),document.addEventListener("keyup",o,!0),window.addEventListener("focus",a,!0),window.addEventListener("blur",s,!1),"undefined"!=typeof PointerEvent?(document.addEventListener("pointerdown",r,!0),document.addEventListener("pointermove",r,!0),document.addEventListener("pointerup",r,!0)):(document.addEventListener("mousedown",r,!0),document.addEventListener("mousemove",r,!0),document.addEventListener("mouseup",r,!0))})(e),n.custom||Ni(n.element,()=>Wt(e.state,"hidden")),So||"wix"===t.integrationName||Bi(e,o,i),Fo(e.frame),function(e,t,n){uo(e,t,n),("LiveChatWidget"in window||"OpenWidget"in window)&&_o(e,t,n)}(e,t,o),ci(e,t),ye(Zn(e,()=>((e=>{Mt().then(t=>{e.call("shouldBridgeHandleAudio").then(n=>{n&&(St.isBridgeActive=!0,e.on("add_event",n=>{let{event:i}=n;St.isBridgeActive&&(Je(e.state,"muted")||((e,t)=>"system"!==e.author&&!e.properties.welcomeMessage&&e.author!==t&&"custom"!==e.type)(i,Ue(e.state))&&t(yt))}),e.on("reaction_received",n=>{let{event:i}=n;St.isBridgeActive&&(Je(e.state,"muted")||Ue(e.state)===i.author&&t(yt))}))})})})(e),Ce)),he(L)),"wix"===t.integrationName?(e=>{Vn.addEventListener(Vn.Events.PAGE_NAVIGATION,()=>{Rn().then(t=>e.call("storeMethod",["setApplicationState",{page:t}]))})})(e):(xo(e),"openwidget"===r&&(Sn(e),(e=>{const t=t=>In(t,e);ye(xn(e,e=>e.application.readyState),ge(e=>e===N),Se(1),he(()=>{document.addEventListener("click",t)})),ye(_e(e,"unbind"),he(()=>{document.removeEventListener("click",t)}))})(e))),ji(e),"livechat"===r&&("documentPictureInPicture"in window&&(e=>{var t;return!!(null==(t=e.properties.license.bb9e5b2f1ab480e4a715977b7b1b4279)?void 0:t.detached_mode_enabled)})(o)&&Fi(t,e),(e=>{ye(xn(e,e=>Je(e).showTextSelectionTracking),ge(Boolean),Se(1),he(()=>{Mo(e)}))})(e),(e=>{const{actingAsDirectLink:t,embedded:n,mobileWrapper:i}=Je(e.state);if(t||!n||i)return;let o=null,r=null;const a=ye(ve(document,"visibilitychange"),ge(()=>"maximized"===Je(e.state).visibility.state),xe(()=>!document.hidden));ye(a,De(_e(e,"unbind")),he(t=>{!t&&Ve(e.state,Ui).active?o=Date.now():o&&(r=Date.now()-o)})),ye(_e(e,"add_event"),ge(e=>{var t;let{event:n}=e;return"client_inactive"===(null==(t=n.properties)?void 0:t.systemMessageType)}),ge(()=>r&&Ve(e.state,Ui).properties.ended),Se(1),he(()=>{Math.floor(100*Math.random())||e.call("logInfo","inactivity_duration",{duration:r,mobile:Je(e.state).mobile}),r=null}))})(e),bi(e,t,o));t.actingAsDirectLink||n.custom||function(e){ye(xn(e,e=>Wt(e,"hidden")),ze(1),he(t=>{t?e.applyHiddenStyles():e.show()}))}(e),function(e){if("Google Inc."!==navigator.vendor||"Win32"!==navigator.platform)return;const{frame:t}=e,n=d(100,()=>{Ke(Qe(["width"],t),t),requestAnimationFrame(()=>{Ke({width:ht.style.width},t)})});document.addEventListener("scroll",n);const i=()=>{e.off("unbind",i),document.removeEventListener("scroll",n)};e.on("unbind",i)}(e),function(e){const t=()=>{setTimeout(()=>{document.addEventListener("touchstart",L),setTimeout(()=>{document.removeEventListener("touchstart",L)},500)},500)};window.addEventListener("orientationchange",t);const n=()=>{e.off("unbind",n),window.removeEventListener("orientationchange",t)};e.on("unbind",n)}(e),wi(e,o),So&&!n.custom&&bo(e),Eo(e),e.on("rich_greeting_button_clicked",e=>{let{button:t}=e;"url"===t.type&&mo.navigate(t.value,"current"===t.target?"_parent":"_blank")}),e.on("open_in_new_tab",e=>{mo.navigate(e)}),e.on("register_exit_intent_listener",()=>{const t=((e,t)=>{const n=n=>{n.currentTarget&&n.relatedTarget||(e.call("storeMethod",["emit","exit_intent_detected"]),t())};return window&&(Yi&&window.removeEventListener("mouseout",Yi),window.addEventListener("mouseout",n),Yi=n),()=>{window&&window.removeEventListener("mouseout",n)}})(e,()=>{t()})}),e.on("apply_exit_intent_shade",()=>{((e,t)=>{t.call("storeMethod",["setApplicationState",{isExitIntentShadeDisplayed:!0}]);const n=document.createElement("div");n.id=Vi,Ke((e=>({position:"fixed",bottom:"0",[e]:"0",width:"100%",height:"100%",background:"linear-gradient(to "+("left"===e?"right":"left")+" top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0))",zIndex:999999,"pointer-events":"none",opacity:0,transition:"opacity 100ms ease-in-out"}))(e),n),document.body.appendChild(n),setTimeout(()=>{n.style.opacity="1"},0),Ri&&window.removeEventListener("mouseover",Ri),Ri=()=>Gi(t),window.addEventListener("mouseover",Ri)})(Mi(o,!1),e)}),e.on("remove_exit_intent_shade",()=>{Gi(e)}),e.on("refresh-page",()=>{window.location.reload()}),e.on("open_phone_number",e=>{window.location.href="tel:"+e})},Ho=e=>(e=>{let{licenseId:t,organizationId:n}=e;return $t("https://api.livechatinc.com/global-mapper/"+(t?"lc_license_id/"+t:"organization_id/"+n)+"/region",{callbackName:"lc_region"}).then(e=>e.region).catch(()=>{const e=Error("Fetch region failed");throw e.code="FETCH_REGION_FAILED",e})})(e).then(t=>an(T({},e,{region:t})).then(t=>{return Promise.all([t,(n={region:t.region,organizationId:t.organizationId,licenseId:e.licenseId,groupId:t.groupId,version:t.configVersion},$t(rn("get_configuration",n),{callbackName:"lc_static_config",query:T({organization_id:n.organizationId,version:n.version},nn(n),"number"==typeof n.groupId&&{group_id:n.groupId})}).then(e=>ln(e)))]).then(e=>{let[t,n]=e;return T({},t,n)});var n}));var qo=(e,t)=>{window.performance&&"function"==typeof window.performance.mark&&window.performance.mark("lc_bridge_init");let n=!1,i=e;window.LC_API=window.LC_API||{},window.LC_API.is_loaded=()=>n;const{region:o,licenseId:r,organizationId:a,requestedGroupId:s,actingAsDirectLink:c,skipCodeInstallationTracking:d,integrationName:u,productName:m,customIdentityProviderInitializer:p,templateId:f}=t,g=T({},a?{organizationId:a}:{licenseId:r},{skipCodeInstallationTracking:d,productName:m,integrationName:u,channelType:c?"direct_link":"code",url:bn(document.location+"")},"number"==typeof s&&{groupId:s},"string"==typeof o&&{region:o}),h="livechat"===i?Ho(g).catch(e=>{if("DEFAULT_WIDGET_NOT_LIVECHAT"===e.code&&"openwidget"===e.defaultWidget)return i=e.defaultWidget,window.__ow=window.__ow||{},window.__ow.organizationId=e.organizationId,window.OpenWidget=T({},window.LiveChatWidget),dn(e.organizationId,u,null,d);throw e}):dn(a,u,f,d,g.url);Promise.all([h,"wix"===u?Rn():Mn(),et()]).then(e=>{let[o,r,a]=e;if(!Xi(o.allowedDomains,window.top===window?window.location.hostname:document.referrer))return void console.log("[LiveChat] Current domain is not added to the allowed domains. LiveChat has been disabled.");if("openwidget"===i&&!1===o.isWidgetEnabled)return;if(So&&o.__unsafeProperties.group.disabledOnMobile&&!t.actingAsDirectLink)return;const s=hi(),c=(e=>{if(null===e)return null;const t=e();return"object"!=typeof t||"function"!=typeof t.getToken||"function"!=typeof t.getFreshToken||"function"!=typeof t.hasToken||"function"!=typeof t.invalidate?(console.error("custom_identity_provider() does not return proper handlers. ({getFreshToken: () => Promise, getToken: () => Promise, hasToken: () => Promise, invalidate: () => Promise })"),null):t})(p),d=window.localStorage,u=qi(t,r,o),m=((e,t)=>e.customContainer?{custom:!0,element:e.customContainer}:{custom:!1,element:Bo(t,e.actingAsDirectLink),size:Oo(t)})(t,o),f="true"===te("select_to_chat",window.location.search),g={};let h=!1;const v=Ji("on_before_load"),w=Ji("on_after_load");v(e=>{e.disable_sounds=L,e.mobile_is_detected=()=>So,e.chat_running=()=>!1,e.visitor_engaged=()=>!1,e.agents_are_available=()=>-1!==o.onlineGroupIds.indexOf(o.groupId),e.get_window_type=()=>"embedded",e.hide_chat_window=li(u)?L:()=>h=!0,e.set_visitor_name=e=>g.name=so(e),e.set_visitor_email=e=>g.email=so(e),e.set_custom_variables=e=>g.properties=e?oo(e):{},e.update_custom_variables=e=>{e&&(g.properties=T({},g.properties,oo(e)))}});const _=T({},u,o.licenseId&&{license:o.licenseId},{customer:T({},u.customer,g),hidden:u.hidden||h,organizationId:o.organizationId});var y;m.custom||a.appendChild(m.element),window.performance&&"function"==typeof window.performance.mark&&window.performance.mark("lc_bind_child"),Promise.all([jo(m,_,o,c,d,null,i,f),"openwidget"===i?Promise.resolve(o.localization):(y={organizationId:_.organizationId,licenseId:_.license,groupId:_.group,region:_.region,version:o.localizationVersion,language:o.__unsafeProperties.group.language},$t(rn("get_localization",y),{callbackName:"lc_localization",query:T({organization_id:y.organizationId,version:y.version,language:y.language},nn(y),"number"==typeof y.groupId&&{group_id:y.groupId})}).then(e=>k(e=>e.toLowerCase(),e)))]).then(e=>{let[t,n]=e;return m.custom||Fo(m.element),Wo(t,_,m,n,o,i),ye(xn(t,e=>Je(e,"readyState")),ge(e=>e===N),Se(1),xe(()=>t),Fe)}).then(e=>{window.performance&&"function"==typeof window.performance.mark&&window.performance.mark("lc_bridge_ready"),s&&s.getLogs().then(t=>{e.call("logInfo","loading_time_measured",l(t))}),w(()=>n=!0)})}).catch(e=>{switch(null==e?void 0:e.code){case"ACCESS_NOT_RESOLVED":case"CUSTOMER_BANNED":case"FETCH_REGION_FAILED":return void console.warn("[LiveChat] "+e.message);default:throw e}})};function Vo(){et().then(e=>{["https://cdn.livechatinc.com/widget/static/js/configurator.uiMy6DHN.js"].forEach(t=>{((e,t)=>{const n=document.createElement("script");$e({src:t,type:"module",charset:"utf-8"},n),e.appendChild(n)})(e.ownerDocument.head,t)})})}const Ro=(e,t)=>{const n={name:null,email:null,properties:{}};if("object"==typeof e&&e){const t=e.name,i=e.email;"string"==typeof t&&(n.name=t),"string"==typeof i&&(n.email=i)}return Array.isArray(t)&&(n.properties=oo(t)),n},Go=e=>{if(e.wix)return"wix";if("string"==typeof e.integration_name)return e.integration_name;if("google_tag_manager"in window)try{if(void 0!==Array.from(document.getElementsByTagName("script")).find(e=>{var t;return null==(t=e.textContent)?void 0:t.startsWith("window.__lc")}))return"potentially_gtm"}catch(e){}return null},Yo=()=>{if(window.__lc_inited=!0,"msCrypto"in window)return void console.error("[LiveChat] We no longer support Internet Explorer");if(3!==[1].reduce((e,t)=>e+t,2))return void console.error("[LiveChat] This site has overriden Array.prototype.reduce (for example by using Prototype library) to a version that is not compatible with Web standards. LiveChat code couldn't be initialized because of this.");const e={licenseId:(t=window.__lc).license?parseInt(t.license):null,organizationId:"string"==typeof t.organizationId?t.organizationId:null,requestedGroupId:H(t),uniqueGroups:!1===t.chat_between_groups,customer:Ro(t.visitor,t.params),skipCodeInstallationTracking:1===t.test,integrationName:Go(t),productName:t.product_name||null,actingAsDirectLink:!0===t.direct_link,isMinimizedForcefullyDisabled:!0===t.disable_minimized,initMaximized:!0===t.init_maximized,initialView:"string"==typeof t.initial_view?t.initial_view:null,customContainer:t.custom_container||null,gaParams:{version:"string"==typeof t.ga_version?t.ga_version:null,omitGtm:!!t.ga_omit_gtm,sendToAll:!!t.ga_send_to_all_trackers},customIdentityProviderInitializer:"function"==typeof t.custom_identity_provider?t.custom_identity_provider:null,iframeAddress:null,region:w(t.region,(n=W,a(n).map(e=>n[e])))?t.region+"":null};var t,n;e.actingAsDirectLink||!(te(de,window.location.search)||R("session")&&window.sessionStorage.getItem(de))?qo("livechat",e):Vo()};window.__lc_inited||Yo()}();