!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 h(e,t){return a(t).forEach(n=>{e(t[n],n)})}function g(){return Math.random().toString(36).substring(2)}function f(e){const t=g();return n(t,e)?f(e):t}function v(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}function _(e,t,n){const i=v(t,n);return null!=i?i:e}function w(e,t){return-1!==t.indexOf(e)}function b(e){return 0===(o(e)?e:Object.keys(e)).length}function y(e){return!e}function x(e){return!!e}function E(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 I(e,t){if(b(t))return e;const i={};return h((a,s)=>{if(n(s,t))if(r(e[s])&&r(t[s]))i[s]=I(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),h((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)=>I(e,t),t)}function L(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 A(){}function T(e,t){return e.reduce((e,n)=>(e[n]=t[n],e),{})}function z(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function P(e,t){if(z(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)||!z(e[i[o]],t[i[o]]))return!1;return!0}function S(t){return t.reduce(e,0)}function M(e){return Array.prototype.slice.call(e)}function O(e){return a(e).map(t=>[t,e[t]])}const N=(()=>{try{return"undefined"!=typeof window&&!!(window.Cypress||window.parent?.Cypress||window.top?.Cypress)}catch{return!1}})(),D=new Set(["search","select","radio","checkbox"]),B=new Set(["email","tel"]),j="4c8c0751-837f-4a11-928e-047b2d095307",W="not_ready",q="ready",$="bootstrapped",F="eu-west3";var H=Object.freeze({__proto__:null,FRA_A:"fra-a",FRA_B:"fra-b",FRA:"fra",EU_WEST3:F,DAL:"dal"});const R=/^\+?[1-9]\d{7,14}$/,V=e=>"string"==typeof e&&R.test(e),U=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 G="__test_storage_support__",Y="@@test",J=function(e){void 0===e&&(e="local");try{var t="session"===e?window.sessionStorage:window.localStorage;return t.setItem(G,Y),t.getItem(G)===Y&&(t.removeItem(G),!0)}catch(e){return!1}},X=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 K=e=>O(e).map(e=>e.map(encodeURIComponent).join("=")).join("&"),Q=e=>e.split("&").filter(Boolean).map(e=>e.split("=").map(e=>decodeURIComponent(e.replace("+","%20")))).map(e=>2===e.length?e:[e[0],""]).reduce((e,t)=>{let[n,i]=t;return e[n]=i,e},{}),Z=/(?:[^:]+:\/\/)?([^/\s]+)/,ee=/[^:]+:\/\/[^(/|?)\s]+/,te=e=>{const t=e.match(ee);return t&&t[0]},ne=/.*?\?([^#]+)/,ie=e=>{const t=e.match(ne);return t?"?"+t[1]:""},oe=e=>e.replace(/^\?/,""),re=e=>{if(null===te(e))return Q(oe(e));const t=oe(ie(e));return t?Q(t):{}},ae=(e,t)=>re(t)[e],se=/^(?:https?:)?\/\/[^/]+\/([^?#]+)/,ce=e=>{const t=e.match(se);return"/"+(t&&t[1]||"")},le=e=>e.replace(/\w/g,"$&[\\r\\n\\t]*");RegExp(`^[\0-]*(${le("javascript")}|${le("data")}):`,"i");const de=/^((http(s)?:)?\/\/)/,ue=/^((http(s)?:)?\/\/)/,me=e=>{const t=e.match(ue);return t?t[2]:null},pe=(e,t)=>{if(-1===e.indexOf("?"))return e;const n=re(e);if(b(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=te(e),i=ce(e),o=ie(e)?re(e):{},r=K({...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},he=e=>"https://"+(e=>e.replace(de,""))(e),ge="cw_configurator";var fe=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 ve=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 _e=function(e,t){return e===t};function we(e){return void 0===e&&(e=_e),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 be=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)})},ye=e=>t=>{let n;t(0,(t,i)=>{0===t&&(n=i),1===t&&e(i),1!==t&&0!==t||n(1)})};const xe=(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 Ee,ke,Ie=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 Ce(e,t){return fe(n=>(e.on(t,n),()=>{e.off(t,n)}))}"function"==typeof(ke=("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")()).Symbol)?ke.observable?Ee=ke.observable:(Ee=ke("observable"),ke.observable=Ee):Ee="@@observable";var Le=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},Ae=e=>t=>(n,i)=>{0===n&&t(0,(t,n)=>{i(t,1===t?e(n):n)})};function Te(e){return t=>ve(Ae(e)(t))}var ze=function(){};function Pe(e,t){0===e&&t(0,ze)}function Se(){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 Me(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 Oe=function(){},Ne={};function De(e){var t,n,i=[],o=!1,r=Ne;return function(a,s){if(0===a){if(r!==Ne)return s(0,Oe),o&&s(1,n),void s(2,r);i.push(s);var c=function(e,n){if(2!==e)r===Ne&&t(e,n);else{var o=i.indexOf(s);-1!==o&&i.splice(o,1)}};1!==i.length?(s(0,c),o&&r===Ne&&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 Be=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 je=function(e){return void 0===e&&(e={}),t=>{"function"==typeof e&&(e={next:e});let n,{next:i,error:o,complete:r}=e;return 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)}),()=>{n&&n(2)}}};var We=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 qe={},$e=e=>t=>(n,i)=>{if(0!==n)return;let o,r,a=!1,s=qe;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===qe&&(2===e&&r&&r(2),o(e,t))}),void(s!==qe&&i(2,s));2===t&&r(2),i(t,n)})};function Fe(e){return new Promise(function(t,n){je({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 He=function(e,t,n){return 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)}(n={path:void 0,exports:{},require:function(e,t){return function(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},n.exports),n.exports}(),Re=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 Ve(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];var i=Re;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||He.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 Ue=(e,t)=>t,Ge=(e,t)=>(e=>e.entities.chats.byIds)(e)[t],Ye=Ve([(e,t)=>Ge(e,t).events.orderedIds,(e,t)=>Ge(e,t).events.byIds],(e,t)=>e.map(e=>t[e]))(Ue),Je=Ve([Ge,Ye],(e,t)=>({...e,events:t}))(Ue),Xe=e=>e.entities.users.byIds,Ke=e=>Xe(e)[(e=>e.session.id)(e)],Qe=(e,t)=>Xe(e)[t],Ze=e=>Ke(e).id;Ve([Ye,Ze],(e,t)=>m(e=>{let{delivered:n,author:i}=e;return n&&i===t},e))(Ue),Ve([Ye,Ze],(e,t)=>m(e=>{let{seen:n,author:i}=e;return n&&i===t},e))(Ue);const et={boosters:!0,form:!0,system_message:!0};function tt(e,t){return void 0===t?e.application:e.application[t]}He.createSelector([Ye,e=>Ke(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&&!et[e.type]&&!!e.serverId,(n=e).length-1,n);var n}),Ve([(e,t)=>Ge(e,t).participants,Xe],(e,t)=>e.map(e=>t[e]))(Ue);var nt=(e,t)=>{Object.assign(t.style,e)},it=(e,t)=>{h((e,n)=>{"style"!==n?t.setAttribute(n,e):nt(e,t)},e)};const ot=()=>!!document.documentElement.currentStyle,rt=(e,t)=>{const i=window.getComputedStyle(t),o="border-box"===i.boxSizing,r=T(e,i);return ot()&&o&&n("width",r)&&null!==r.width&&(r.width=S([r.width,i.paddingLeft,i.paddingRight,i.borderLeftWidth,i.borderRightWidth].map(parseFloat))+"px"),ot()&&o&&n("height",r)&&null!==r.height&&(r.height=S([r.height,i.paddingTop,i.paddingBottom,i.borderTopWidth,i.borderBottomWidth].map(parseFloat))+"px"),r};function at(){return new Promise(e=>{const t=()=>{document.body?e(document.body):setTimeout(t,100)};t()})}function st(e){const{parentNode:t}=e;t&&t.removeChild(e)}const ct=(e,t)=>{const n=document.createElement(e);return it(t,n),n},lt="chat-widget",dt="chat-widget-minimized",ut="chat-widget-lightbox",mt="LiveChat chat widget",pt="OpenWidget widget",ht={opacity:0,visibility:"hidden",zIndex:-1},gt={opacity:1,visibility:"visible",zIndex:2147483639},ft={id:lt+"-container",style:{...ht,position:"fixed",bottom:0,width:0,height:0,maxWidth:"100%",maxHeight:"100%",minHeight:0,minWidth:0,backgroundColor:"transparent",border:0,overflow:"hidden"}},vt={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"}},_t={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)"}},wt={id:"livechat-eye-catcher-img",style:{display:"block",overflow:"hidden",cursor:"pointer"}},bt={alt:"",style:{display:"block",border:0,float:"right"}},yt={position:"absolute",top:"0px",left:"0px",bottom:"0px",right:"0px"},xt={id:lt,name:lt,title:mt,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"}},Et={id:ut,name:ut,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"}},kt={...xt,id:dt,name:dt},It=e=>"lc-aria-announcer-"+e,Ct="new_message",Lt=e=>"function"==typeof e.start&&"function"==typeof e.stop,At=e=>{Lt(e)?e.start(0):e.noteOn(0)},Tt=/\.(\w+)$/i,zt=new Audio,Pt={mp3:"audio/mpeg",ogg:"audio/ogg"},St=e=>new Promise((t,n)=>{const i=new Audio(e);i.onloadeddata=()=>{t(i)},i.onerror=n}),Mt=e=>{const t=e.play();return(n=t)&&"function"==typeof n.then?t:Promise.resolve();var n},Ot=()=>{const e=(e=>{const t="function"==typeof window.webkitAudioContext||"function"==typeof window.AudioContext?(()=>{const e=(()=>{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();return n.connect(e.destination),n.buffer=t,{playback:new Promise((t,i)=>{if(n.onended=()=>t(),At(n),"running"!==e.state){const t=Error(`Playback failed, AudioContext is in incorrect state '${e.state}'`);t.name="PlaybackError",i(t)}}),stop(){(e=>{Lt(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),At(n)})(),i()};document.addEventListener("click",o,!0)})}})(),t=L(t=>{const n=e.preload(t);return n.catch(A),n});return{play:n=>{const i=t(n).then(e.playSound);return i.catch(A),i},preload:t,unlock:()=>e.unlock()}})():(()=>{const e=L(St);return{play:t=>e(t).then(Mt),preload:e,unlock:()=>Promise.resolve()}})(),n=(e=>Object.keys(e).reduce((t,n)=>{const i=u(e=>(e=>{const t=(e=>{const t=e.match(Tt);return t?t[1].toLowerCase():""})(e);return t in Pt&&"function"==typeof zt.canPlayType&&""!==zt.canPlayType(Pt[t])})(e),o(r=e[n])?r:[r]);var r;return t[n]=i,t},{}))(e);return{play:e=>{const i=n[e];if(!i)return Promise.resolve();t.play(i).then(A,A)},preload:e=>{const i=n[e];if(!i)return Promise.resolve();t.preload(i).then(A,A)},unlock:()=>t.unlock()}})({[Ct]:["https://cdn.livechatinc.com/widget/static/media/new_message.CTorF0S8.ogg","https://cdn.livechatinc.com/widget/static/media/new_message.C32z5SiC.mp3"]});return N&&(window.parent.soundPlayer=e),e.unlock().then(()=>function(e,t){let n=0;return function(){2e3>Date.now()-n||(n=Date.now(),t.apply(void 0,arguments))}}(0,t=>{e.play(t)}))},Nt={isBridgeActive:!1,isIframeActive:null,hasIframeUnlocked:!1},Dt=e=>!!e&&/native code/.test(e+""),Bt=()=>"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||w("iPad",navigator.userAgent),jt=()=>w(navigator.platform,["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"])&&w("Version/15",navigator.userAgent),Wt=()=>/mobile/gi.test(navigator.userAgent)&&!Bt(),qt=()=>w("Chrome",navigator.userAgent),$t=()=>{const e=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);return e?parseInt(e[2],10):0},Ft=()=>/Firefox/.test(navigator.userAgent),Ht=()=>!qt()&&/Safari/.test(navigator.userAgent),Rt=(e,t)=>tt(e,"visibility").state===t,Vt="#FFFFFF",Ut="#F8F8F8",Gt="#E3E3E3",Yt="#333333",Jt="#111111";!function(){try{return window.localStorage}catch(e){return J()?window.localStorage:X}}();const Xt=()=>{const{all:e,...t}={all:n=n||new Map,on:function(e,t){var i=n.get(e);i?i.push(t):n.set(e,[t])},off:function(e,t){var i=n.get(e);i&&(t?i.splice(i.indexOf(t)>>>0,1):n.set(e,[]))},emit:function(e,t){var i=n.get(e);i&&i.slice().map(function(e){e(t)}),(i=n.get("*"))&&i.slice().map(function(n){n(e,t)})}};var n;return{...t,off:(n,i)=>{n?t.off(n,i):e.clear()},once:(e,n)=>{t.on(e,function i(o,r){t.off(e,i),n(o,r)})}}};Object.freeze({success:!0});const Kt=e=>e.map(e=>{switch(e.type){case"group_chooser":return{...e,options:e.options.map(e=>{let{group_id:t,...n}=e;return{...n,groupId:t}})};case"rating":{const{comment_label:t,...n}=e;return{...n,commentLabel:t}}default:return e}}),Qt=e=>{const t=e.map((e,t)=>({...e,id:t+""}));return Kt(t)},Zt=e=>({id:e.id,fields:"id"in e.fields[0]?Kt(e.fields):Qt(e.fields)}),en={};function tn(e,t){let{query:n={},jsonpParam:i="jsonp",callbackName:o}=void 0===t?{}:t;return new Promise((t,r)=>{at().then(a=>{const s=document.createElement("script"),c=o||f(en);en[c]=!0;const l="__"+c,d=window;d[l]=e=>{delete en[c],delete d[l],st(s),t(e)},s.src=`${e}?${K({...n,[i]:l})}`,s.addEventListener("error",()=>{setTimeout(()=>{const e=Error("JSONP request failed.");e.code="JSONP_REQUEST_FAILED",r(e)},100)}),a.appendChild(s)})})}const nn=/\.([a-z]{1,})$/i,on=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:he(t.group["embedded_chat.eye_grabber.path"])};if(-1!==n.src.indexOf("/default/eyeCatchers/")){const e=n.src.match(nn)[1];n.srcset={"1x":n.src,"2x":n.src.replace(RegExp("\\."+e,"i"),"-2x."+e)}}return n},rn=e=>({"x-region":e.region??""}),an=(e,t)=>`${(e=>{let{region:t}=e;return`https://api${(e=>"fra"===e||e===F?"-fra":"")(t)}.livechatinc.com`})(t)}/v3.6/customer/action/${e}`,sn=["ACCESS_NOT_RESOLVED","CUSTOMER_BANNED","FETCH_REGION_FAILED","JSONP_REQUEST_FAILED"],cn=e=>{if(!sn.includes(e?.code))throw e;console.warn("[LiveChat] "+e.message)},ln=function(e,t){let{validateDefaultWidget:n=!0}=void 0===t?{}:t;return tn(an("get_dynamic_configuration",e),{query:{...rn(e),...e.organizationId?{organization_id:e.organizationId}:{},...e.licenseId?{license_id:e.licenseId}:{},client_id:"c5e4f61e1a6c3b1521b541bc5c5a2ac5",url:pe(e.url,["cw_configurator","dev_language","dev_enable_textapp","dev_theme_variant","dev_theme_name","dev_minimized_type","dev_screen_position","dev_offset_x","dev_offset_y","dev_show_logo","dev_show_avatar","dev_sounds_enabled","dev_rating_enabled","dev_transcript_enabled","dev_company_logo_url","dev_agent_avatar_url"]),..."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 ln({...e,region:t.error.data.region});case"license_not_found":{if("direct_link"===e.channelType){const t=K({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&&e.organizationId!==j||(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=K({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,aiAgentActive:i.livechat.ai_agent_active};var i})},dn=e=>{const t="feade1d6c3f17748ae4c8d917a1e1068",n=!!e.properties.group[t]?.forwardTicketFormToHelpdesk,i="1"===e.__priv.license["helpdesk.inbound_forwarding"],o=e.properties.license[t]?.hdLicenseID;return"number"==typeof o&&o>-1&&(n||i)},un=(e,t)=>t.includes(e)?e:t[0],mn=(e,t)=>e,pn=e=>{const t="1"===ae("enable_text",window.location.search)?(e=>({...e,__priv:{...e.__priv,enable_textapp:!0,group:{...e.__priv.group,"chat_window.new_theme.name":"smooth","chat_window.theme.minimized":"circle","chat_window.mobile_minimized_theme":"circle","embedded_chat.display_eye_catcher":"0"}}}))(e):e,{buttons:n,allowed_domains:i,prechat_form:o,ticket_form:r,__priv:a,properties:s,...c}=t,l=a.group,d=mn("boolean"==typeof a.enable_textapp?a.enable_textapp:void 0),u=mn(un(l["chat_window.new_theme.name"],["smooth","modern"])),m=mn(un(l["chat_window.new_theme.variant"],["light","dark"])),p=l["chat_window.new_theme.background_color"],h=mn(un(l["chat_window.theme.minimized"],["circle","bar"])),g=mn("1"===l["chat_window.display_avatar"]),f=mn("0"===l["chat_window.disable_sounds"]),v=mn("1"===l["rate_me.enabled"]),_=mn("1"===l["chat_window.display_transcript_button"]),w=mn("1"===l["chat_window.display_logo"]),b=mn(l["chat_window.logo_path"]),y=mn(l.language),x=mn(un(l["chat_window.screen_position"],["right","left"])),E=mn(parseInt(l["chat_window.offset_x"])),k=mn(parseInt(l["chat_window.offset_y"])),I="0"===a.group.tickets_enabled,C=!a.disable_native_tickets&&!!r,L=dn(t),A=d?!!r:I||L||C;return{...c,...o&&{prechatForm:Zt(o)},...A&&r&&{ticketForm:Zt(r)},properties:s,buttons:n.map(e=>"image"===e.type?{id:e.id,type:e.type,onlineValue:he(e.online_value),offlineValue:he(e.offline_value)}:{id:e.id,type:e.type,onlineValue:e.online_value,offlineValue:e.offline_value}),...i&&{allowedDomains:i},__unsafeProperties:{...a.s&&{s:!0},..."boolean"==typeof d?{enableTextApp:d}:{},group:{chatBoosters:a.group.chat_boosters,disabledMinimized:"1"===a.group["chat_window.disable_minimized"],disabledMinimizedOnMobile:"1"===a.group["chat_window.mobile_disable_minimized"],disabledOnMobile:"1"===a.group["chat_window.hide_on_mobile"],eyeCatcher:"1"===a.group["embedded_chat.display_eye_catcher"]?on(t):{enabled:!1},hasAgentAvatarsEnabled:g,hasCustomMobileSettings:"1"===a.group["chat_window.custom_mobile_settings"],hasHiddenTrademark:"1"===a.group["chat_window.hide_trademark"],hasSoundsEnabled:f,initiallyHidden:"1"===a.group["chat_window.hide_on_init"]||"1"===a.group["chat_window.disable_minimized"],initiallyHiddenOnMobile:"1"===a.group["chat_window.mobile_hide_on_init"]||"1"===a.group["chat_window.mobile_disable_minimized"],hideOnInit:"1"===a.group["chat_window.hide_on_init"],language:y,linksUnfurlingEnabled:"1"===a.group.links_unfurling,privacyPolicy:{enabled:"1"===a.group["privacy_policy.enabled"],text:a.group["privacy_policy.text"]},logo:w?{enabled:!0,src:b}:{enabled:!1},minimizedType:h,minimizedTypeOnMobile:a.group["chat_window.mobile_minimized_theme"],offlineMessagesEnabled:I,offsetX:E,offsetXOnMobile:parseInt(a.group["chat_window.mobile_offset_x"]),offsetY:k,offsetYOnMobile:parseInt(a.group["chat_window.mobile_offset_y"]),prechatFormAfterGreetingEnabled:"1"===a.group.pre_chat_survey_after_greeting,ratingEnabled:v,screenPosition:x,screenPositionOnMobile:un(a.group["chat_window.mobile_screen_position"],["right","left"]),transcriptButtonEnabled:_,theme:{name:u,variant:m,customJson:a.group["chat_window.new_theme.custom_json"],agentbarBackgroundColor:a.group["chat_window.new_theme.agentbar_background_color"],agentbarText:a.group["chat_window.new_theme.agentbar_text"],agentMessageColorBackground:a.group["chat_window.new_theme.agent_message_color_background"],agentMessageColorText:a.group["chat_window.new_theme.agent_message_color_text"],backgroundColor:p,ctaColor:a.group["chat_window.new_theme.cta_color"],minimizedColorBackground:a.group["chat_window.new_theme.minimized_color_background"],minimizedColorIcon:a.group["chat_window.new_theme.minimized_color_icon"],minimizedColorText:a.group["chat_window.new_theme.minimized_color_text"],systemMessageColor:a.group["chat_window.new_theme.system_message_color"],titlebarBackgroundColor:a.group["chat_window.new_theme.titlebar_background_color"],titlebarText:a.group["chat_window.new_theme.titlebar_text"],visitorMessageColorBackground:a.group["chat_window.new_theme.visitor_message_color_background"],visitorMessageColorText:a.group["chat_window.new_theme.visitor_message_color_text"]}},license:{creditCardMaskingEnabled:"1"===a.license.mask_credit_cards,nonProfit:"1"===a.license.non_profit,licenseinboundForwardingToHelpdeskEnabled:"1"===a.license["helpdesk.inbound_forwarding"]},helpdeskIntegrationEnabled:L,ticketFormMode:(T=t,z=!!d,void 0===z&&(z=!!T.__priv.enable_textapp),z?"1"===T.__priv.group.tickets_enabled?"helpdesk":"offline_message":dn(T)?"helpdesk":"0"===T.__priv.group.tickets_enabled?"offline_message":"livechat")}};var T,z},hn=(e,t,n,i,o)=>{const r="https://api.openwidget.com/v1.0/configuration/"+e;return function(a,s){let{retriesCount:c=1/0,minTime:l=100,maxTime:d=1e4}=s;const u=(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:l,max:d,jitter:0});return new Promise((a,s)=>{let l=0;const d=()=>tn(r,{callbackName:"ow_config",query:{...t&&{integration_name:t},...n&&{tid:n},...i&&{test:!0},...o&&{url:o}}}).then(t=>{let{staticConfig:n,localization:i,...o}=t;return{...o,...pn(n),localization:k(e=>e.toLowerCase(),i),organizationId:e}}).then(a,()=>{c===1/0||l++{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)},fn={id:"data-lc-id",focus:"data-lc-focus",event:"data-lc-event",prop:"data-lc-prop",preserve:"data-lc-preserve",action:"data-lc-action",actionValue:"data-lc-action-value",actionSuccess:"data-lc-action-success",hydrated:"data-lc-hydrated",focusTarget:"data-lc-focus-target"};let vn=A,_n=new Set,wn=!1;function bn(e,t,n,i){const o=e,r=o.src;return _n.has(r)||n.has(r)?(n.add(r),!0):!(!o.complete||0>=o.naturalWidth||(n.add(r),i.call("crossFrameEvent",t,JSON.stringify({type:"load",bubbles:!0,isTrusted:!1,currentTarget:{naturalWidth:o.naturalWidth,naturalHeight:o.naturalHeight,clientWidth:o.clientWidth,clientHeight:o.clientHeight},target:{}})),0))}function yn(e,t,n,i){const o=n.contentDocument,r=i.state.application.language??"en";if(null===o)throw Error("Parameter `frame` needs to be inserted into any document before rendering");const a=new Map;if(o.body){const e=M(o.body.querySelectorAll(`[${fn.preserve}]`));for(const t of e){const e=t.getAttribute(fn.preserve);e&&a.set(e,t)}}qt()?(o.documentElement.lang=r,o.head.innerHTML=e,N&&o.body.removeAttribute(fn.hydrated),o.body.innerHTML=t):(o.open(),o.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`),o.close());const s=o.documentElement,c=M(s.querySelectorAll(`[${fn.event}]`)),l=new Set;for(const e of c){const t=e.getAttribute(fn.event);if("string"==typeof t)for(const n of t.split(";")){const[t,o]=n.split(":");if(t&&o){if(e.removeAttribute(fn.event),"load"===t&&"IMG"===e.tagName&&Ht()&&bn(e,o,l,i))continue;e.addEventListener(t,n=>{"load"===t&&"IMG"===e.tagName&&Ht()&&_n.add(e.src),n.stopPropagation();const r=n.currentTarget,a=n.target,s={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,..."clientX"in n&&{clientX:n.clientX,clientY:n.clientY},...("blur"===t||"focusout"===t)&&{relatedTargetIsFocusTarget:wn||!!n.relatedTarget?.hasAttribute?.(fn.focusTarget)},currentTarget:{value:r?.value,checked:r?.checked,disabled:r?.disabled,draggable:r?.draggable,hidden:r?.hidden,naturalWidth:r?.naturalWidth,naturalHeight:r?.naturalHeight,clientWidth:r?.clientWidth,clientHeight:r?.clientHeight,..."function"==typeof r?.getBoundingClientRect&&{boundingClientRect:r.getBoundingClientRect().toJSON()}},target:{value:a?.value,checked:a?.checked,disabled:a?.disabled,draggable:a?.draggable,hidden:a?.hidden}};if("click"===t&&"copy"===e.getAttribute(fn.action)){c=e.getAttribute(fn.actionValue),navigator.clipboard?navigator.clipboard.writeText(c).catch(gn):gn(c);const t=e.getAttribute(fn.actionSuccess);return t&&(e.innerHTML=t),void i.call("crossFrameEvent",o,JSON.stringify(s))}var c;i.call("crossFrameEvent",o,JSON.stringify(s))})}}}Ht()&&(_n=l);for(const e of M(s.querySelectorAll(`[${fn.focusTarget}]`)))e.addEventListener("mousedown",()=>{wn=!0,setTimeout(()=>{wn=!1},0)});if(a.size>0){const e=M(s.querySelectorAll(`[${fn.preserve}]`)),t=new Set(Object.values(fn));for(const n of e){const e=n.getAttribute(fn.preserve);if(!e)continue;const i=a.get(e);if(i&&n.parentNode){for(const e of M(n.attributes))t.has(e.name)||i.getAttribute(e.name)!==e.value&&i.setAttribute(e.name,e.value);for(const e of M(i.attributes))t.has(e.name)||n.hasAttribute(e.name)||i.removeAttribute(e.name);n.parentNode.replaceChild(i,n)}}}const d=s.querySelector(`[${fn.focus}]`);d&&(d.removeAttribute(fn.focus),d.focus({preventScroll:!0}),"INPUT"===d.nodeName)&&d.setSelectionRange(d.value.length,d.value.length);const u=[],m=M(s.querySelectorAll(`[${fn.prop}]`));for(const e of m){const t=e.getAttribute(fn.prop);if("string"!=typeof t)continue;e.removeAttribute(fn.prop);const[n,i]=t.split(":");u.push(t=>{let o=t.views?.minimized?.[i.replace("!","")];"string"==typeof o&&(o=o.trim()),"disabled"===n&&(o=i.includes("!")?!o:!!o),"boolean"==typeof o?e.toggleAttribute(n,o):o?e.setAttribute(n,o):e.removeAttribute(n)})}u.forEach(e=>e(i.state)),i.off("state_diff",vn),vn=e=>{e?.views?.minimized&&u.forEach(t=>t(e))},i.on("state_diff",vn),N&&o.body.setAttribute(fn.hydrated,"true")}const xn=e=>{let{allowAutoplay:t,allowVideoConferencing:n,allowClipboardWrite:i,allowDisplayCapture:o}=e,r=["clipboard-read; clipboard-write;"];if(t&&!Ft()&&r.push("autoplay;"),o&&r.push("display-capture *;"),n){const e={"display-capture *;":!qt()||$t()>=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&&!Ft()&&r.push("clipboard-write *;"),r.join(" ")},En=e=>e.replace(/\?+$/,""),kn="cubic-bezier(0.25, 1, 0.5, 1)",In=`width 300ms ${kn}, height 300ms ${kn}`,Cn=N?100:2e3;let Ln=null;const An=()=>{if(!Ln)throw Error("Title notification service not initialized");return Ln},Tn=e=>{const t=["http:","https:"];return!t.includes(me(e)??"")&&t.includes(me(document.referrer)??"")?document.referrer:e},zn=()=>({title:Ln?Ln.getOriginalPageTitle():document.title,url:En(Tn(document.location+"")),referrer:document.referrer}),Pn="lightbox-images-container",Sn="application/x-postmate-v1+json";let Mn=0;const On={handshake:1,"handshake-reply":1,call:1,emit:1,reply:1,request:1},Nn=(e,t)=>("string"!=typeof t||e.origin===t)&&!!e.data&&"object"==typeof e.data&&"postmate"in e.data&&e.data.type===Sn&&!!On[e.data.postmate];let Dn=function(){function e(e){this.parent=e.parent,this.frame=e.frame,this.child=e.child,this.childOrigin=e.childOrigin,this.events={},this.listener=e=>{if(!Nn(e,this.childOrigin))return!1;const{data:t,name:n}=((e||{}).data||{}).value||{};"emit"===e.data.postmate&&n in this.events&&this.events[n].call(this,t)},this.parent.addEventListener("message",this.listener,!1)}var t=e.prototype;return t.get=function(e){return new jn.Promise(t=>{const n=++Mn,i=e=>{e.data.uid===n&&"reply"===e.data.postmate&&(this.parent.removeEventListener("message",i,!1),t(e.data.value))};this.parent.addEventListener("message",i,!1),this.child.postMessage({postmate:"request",type:Sn,property:e,uid:n},this.childOrigin)})},t.call=function(e,t){this.child.postMessage({postmate:"call",type:Sn,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}(),Bn=function(){function e(e){this.model=e.model,this.parent=e.parent,this.parentOrigin=e.parentOrigin,this.child=e.child,this.child.addEventListener("message",e=>{if(!Nn(e,this.parentOrigin))return;const{property:t,uid:n,data:i}=e.data;"call"!==e.data.postmate?((e,t)=>{const n="function"==typeof e[t]?e[t]():e[t];return jn.Promise.resolve(n)})(this.model,t).then(i=>e.source.postMessage({property:t,postmate:"reply",type:Sn,uid:n,value:i},e.origin)):t in this.model&&"function"==typeof this.model[t]&&this.model[t].call(this,i)})}return e.prototype.emit=function(e,t){this.parent.postMessage({postmate:"emit",type:Sn,value:{name:e,data:t}},this.parentOrigin)},e}(),jn=function(){function e(e){let{container:t=(void 0!==t?t:document.body),model:n,url:i,iframeAllowedProperties:o}=e;return this.parent=window,this.frame=document.createElement("iframe"),o&&(this.frame.allow=o),t.appendChild(this.frame),this.child=this.frame.contentWindow||this.frame.contentDocument.parentWindow,this.model=n||{},this.sendHandshake(i)}return e.prototype.sendHandshake=function(t){const n=(e=>{const t=document.createElement("a");t.href=e;const 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);let i,o=0;return new e.Promise((e,r)=>{const a=t=>!!Nn(t,n)&&("handshake-reply"===t.data.postmate?(clearInterval(i),this.parent.removeEventListener("message",a,!1),this.childOrigin=t.origin,e(new Dn(this))):r(Error("Failed handshake")));this.parent.addEventListener("message",a,!1);const s=()=>{o++,this.child.postMessage({postmate:"handshake",type:Sn,model:this.model},n),5===o&&clearInterval(i)},c=()=>{s(),i=setInterval(s,500)};this.frame.attachEvent?this.frame.attachEvent("onload",c):this.frame.addEventListener("load",c),this.frame.src=t})},e}();jn.debug=!1,jn.Promise=(()=>{try{return window?window.Promise:Promise}catch{return null}})(),jn.Model=function(){function e(e){return this.child=window,this.model=e,this.parent=this.child.parent,this.sendHandshakeReply()}return e.prototype.sendHandshakeReply=function(){return new jn.Promise((e,t)=>{const n=i=>{if(i.data.postmate){if("handshake"===i.data.postmate){this.child.removeEventListener("message",n,!1),i.source.postMessage({postmate:"handshake-reply",type:Sn},i.origin),this.parentOrigin=i.origin;const t=i.data.model;return t&&Object.keys(t).forEach(e=>{this.model[e]=t[e]}),e(new Bn(this))}return t(Error("Handshake Reply Failed"))}};this.child.addEventListener("message",n,!1)})},e}(),jn.Promise=Promise;let Wn=function(e){let{methods:t,...n}=e;return new jn(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=Xt(),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=f(c);c[i]=t,r("remoteCall",{id:i,method:e,args:n})})},i(e,t)})};const qn=window.Wix;var $n=()=>new Promise(e=>{qn.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 Fn=Promise.resolve(),Hn=e=>{Fn.then(e)},Rn=e=>Hn(()=>{throw e});function Vn(e,t){return ve((n=()=>{return Le(Ce(e,"state_diff"),Ae(()=>e.state),(n=e.state,e=>(t,i)=>{if(0!==t)return;let o;e(0,(e,t)=>{0===e?(o=t,i(0,(e,t)=>{0!==e&&o(e,t)}),i(1,n)):i(e,t)})}),Ae(t),we(P),$e(Ce(e,"unbind")));var n},(e,t)=>{if(0===e){let e=!1;t(0,t=>{2===t&&(e=!0)}),t(1,n()),e||t(2)}}));var n}const Un=(e,t)=>Le(Vn(e,t),Be(1));function Gn(e){return Le(Vn(e,e=>tt(e,"availability")),be(x))}const Yn="liveChatChatId";function Jn(e){return Le(Vn(e,e=>Je(e,Yn).active),Be(1),Te(t=>t?Le(Vn(e,e=>Je(e,Yn).properties.currentAgent),be(Boolean),Ae(()=>t),We(1)):Se(t)))}function Xn(e,t){return Le(Ce(e,"state_diff"),Ae(()=>tt(e.state,"readyState")),be(e=>e===t),We(1),De)}function Kn(e,t){return Le(Xn(e,q),Te(t))}function Qn(e,t){return Le(Xn(e,$),Te(t))}function Zn(e,t){return Le(Vn(e,e=>tt(e,"invitation")),Ae(e=>e[t]),be(x),Me,be(e=>{let[t,n]=e;return n.length>t.length}),Ae(e=>{let[,t]=e;return E(t)}))}const ei=()=>window.GoogleAnalyticsObject||"ga",ti=e=>{let{event:t,label:n,nonInteraction:i,trackerName:o}=e;const r=window[ei()];r&&"function"==typeof r&&r([o,"send"].filter(Boolean).join("."),{hitType:"event",eventCategory:"LiveChat",eventAction:t,eventLabel:n,nonInteraction:i})},ni={ga:ti,gaAll:e=>{const t=window[ei()];if(!t||"function"!=typeof t.getAll)return;const n=t.getAll();o(n)&&n.forEach(t=>{ti({...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})}},ii=e=>{let{version:t,omitGtm:n,sendToAll:i}=e;if(t&&"function"==typeof ni[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},oi={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"},ri=()=>window.mixpanel&&"function"==typeof window.mixpanel.track&&"function"==typeof window.mixpanel.register,ai={googleAnalytics:e=>{let{trackerName:t}=e;return t?ni[t]:null},kissmetrics:()=>null,mixpanel:()=>ri()?e=>{let{event:t,eventData:n,persistentData:i}=e;if(!ri())return;const{mixpanel:o}=window;i&&(o.register(i),!ri())||t in oi&&o.track(oi[t],n)}:null},si=e=>{let{actingAsDirectLink:t,isInCustomContainer:n}=e;return t||n},ci=()=>{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},li=e=>{const t=performance.getEntriesByName(e);return 1!==t.length?null:t[0]},di=(e,t)=>e&&t?Math.abs(t.startTime-e.startTime):null,ui=e=>{if(!e)return null;const t=performance.getEntriesByType("navigation");return e.startTime-(b(t)?performance.timing.domContentLoadedEventStart-performance.timing.navigationStart:t[0].domContentLoadedEventStart)},mi=()=>{if(Math.floor(1e3*Math.random()))return;const e=function(e){void 0===e&&(e="first-contentful-paint");const t=(()=>{if("undefined"==typeof PerformanceObserver)return null;const e=ci(),t=[],n=new PerformanceObserver(e=>{t.push.apply(t,e.getEntries())});return n.observe({entryTypes:["longtask"]}),{disconnect:()=>n.disconnect(),getLongTasks:()=>[].concat(t),waitForIdle:i=>new Promise(o=>{const r=()=>{t.push.apply(t,n.takeRecords());const a=(()=>{const n=E(t);return n?(i=n,ci()-i.startTime+i.duration):ci()-e;var i})();i>a?setTimeout(r,Math.ceil(i-a)):o()};r()})}})();return t?(n=e,new Promise(e=>{const t=performance.getEntriesByName(n);if(!b(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}().then(e=>e?S(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=li("lc_bridge_init"),i=li("lc_bridge_ready");return s(e=>e&&Number(e.toFixed(2)),{timeFromTrackingStart:di(t,i),timeFromBridgeInit:di(n,i),timeFromDomContentLoaded:ui(i),totalBlockingTimeContributedToOurScript:e})})}},pi=e=>{e.innerHTML=""},hi=(e,t)=>{const n=()=>{t()||nt(ht,e)},i=()=>{t()||nt(gt,e)};if("onbeforeprint"in window)window.addEventListener("beforeprint",n),window.addEventListener("afterprint",i);else if(Dt(window.matchMedia)){const e=window.matchMedia("print");e&&e.addListener(e=>{e.matches?n():i()})}},gi=function(e,t){return void 0===t&&(t=!1),t&&e.__unsafeProperties.group.hasCustomMobileSettings},fi=(e,t)=>{const n=e.__unsafeProperties.group;return gi(e,t)?n.screenPositionOnMobile:n.screenPosition},vi=(e,t)=>{const n=e.__unsafeProperties.group;return gi(e,t)?{x:n.offsetXOnMobile,y:n.offsetYOnMobile}:{x:n.offsetX,y:n.offsetY}},_i=(e,t)=>Object.keys(e.properties.license).some(n=>e.properties.license[n][t]);const wi=Wt(),bi=(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"},yi="chat-widget-exit-intent-overlay";let xi;const Ei=e=>{const t=document.getElementById(yi);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",xi)};let ki;const Ii={livechat:{attributePrefixes:["data-livechat","data-text"],widgetName:"LiveChat",allowedActions:["maximize","minimize","send_message"],allowedParams:{maximize:["startChat","messageDraft"],minimize:[],send_message:["messageText"]}},openwidget:{attributePrefixes:["data-openwidget"],widgetName:"OpenWidget",allowedActions:["maximize","minimize"],allowedParams:{maximize:["feature","messageDraft"],minimize:[]}}};var Ci=(e,t)=>{if(!e)return!0;const n=function(e){const t=e.match(Z);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 Li=e=>t=>{const n=window.LC_API||{};if("function"==typeof t&&t(n),"function"==typeof n[e])try{n[e]()}catch(e){Rn(e)}};let Ai=[];const Ti=function(e){30>Ai.length||(Ai=Ai.slice(1));for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;t>i;i++)n[i-1]=arguments[i];Ai.push({name:e,args:n})},zi="always visible",Pi="always hide",Si="hide until it gets activated";function Mi(e,t,n){return function(i){var o;let{prettyPrint:r=!0}=void 0===i?{}:i;const{trackerName:s}=t.analytics.googleAnalytics,c=!Ci(n.allowedDomains,document.location.href),l=[["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}),d=a(xt.style).some(t=>e.frame.style.getPropertyValue(t)!==xt.style[t]),{desktopVisibility:u,mobileVisibility:m}=(e=>{let{disabledMinimized:t,disabledMinimizedOnMobile:n,hasCustomMobileSettings:i,hiddenOnMobile:o,initiallyHidden:r,initiallyHiddenOnMobile:a}=e,s="",c="";return s=r?t?Pi:Si:zi,c=i?o?Pi:a?n?Pi:Si:zi:s,{desktopVisibility:s,mobileVisibility:c}})(n.__unsafeProperties.group),p=[{msg:"language: "+n.__unsafeProperties.group.language},{msg:"region: "+n.region}].concat(window.__lc?.license?[{msg:"license number: "+window.__lc.license}]:[],window.__lc?.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: "+s},{msg:"desktop visibility: "+u,isNotStandard:u!==zi},{msg:"mobile visibility: "+m,isNotStandard:m!==zi},{msg:"chat between groups: "+(window.__lc.chat_between_groups?"yes":"no")},{msg:"is iframe inline style modified: "+(d?"yes":"no"),isNotStandard:d},{msg:"is current domain not allowed by the allowed domains: "+(c?"yes":"no"),isNotStandard:c},{msg:"overrides: "+(l.length>0?l.join(",\n"):"none"),isNotStandard:l.length>0},{msg:"call history: "+(Ai.length>0?Ai.map(e=>{let{name:t,args:n}=e;return`${t}(${n.join(", ")})`}).join(",\n"):"none"),isNotStandard:Ai.length>0}]);if(!r)return p;const h=p.filter(e=>{let{isNotStandard:t}=e;return t}),g=p.filter(e=>{let{isNotStandard:t}=e;return!t}),f=[].concat(h,g);return-1!==l.indexOf("console.log")?f.map(e=>{let{msg:t}=e;return t}).join("\n\n"):((o=console).log.apply(o,[f.map(e=>{let{msg:t}=e;return"%c"+t}).join("\n\n")].concat(f.map(e=>{let{isNotStandard:t}=e;return t?"color: red;":""}))),"")}}function Oi(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 Ni(e,t,n){return Le(Ce(e,n),ye(e=>Hn(Oi(t[n],e))))}function Di(e){return C(e.filter(Boolean).map(e=>{let{name:t,value:n}=e;return{[t]:n+""}}))}function Bi(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}`)}!("phoneNumber"in t)||V(t.phoneNumber)?e.call("storeMethod",["requestUpdateUser",Ze(e.state),t]):console.error("[LiveChatWidget] Customer phone number is not a valid E.164 formatted phone number (e.g. +14155552671) and was not set.")}function ji(e,t){e.call("storeMethod",["requestSetUserProperties",Ze(e.state),t])}function Wi(e){return null!=e?e+"":null}const qi="liveChatChatId",$i=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 Hn(Oi.apply(void 0,[e].concat(n)))},Fi={handler:null,setHandler(e){this.handler=e},navigate(e,t){void 0===t&&(t="_blank"),Hn(()=>{window.location.origin===te(e)&&"function"==typeof this.handler?this.handler(ce(e)):window.open(e,t)})}},Hi=e=>{let{uniqueId:t,id:n,subtype:i,addon:o,isExitIntent:r}=e;return{uniqueId:t,...n&&{id:n},...i&&{subtype:i},...null!=o&&{addon:o},...null!=r&&{isExitIntent:r}}},Ri=e=>{const t=Hi(e);if(e.card){const{card:n}=e;return{...t,...n.title&&{title:n.title},...n.subtitle&&{subtitle:n.subtitle},...n.image&&{image:{url:n.image.url,...n.image.name&&{name:n.image.name},...n.image.alternativeText&&{alternativeText:n.image.alternativeText}}},...n.buttons&&n.buttons.length>0&&{buttons:n.buttons.map(e=>{let{type:t,text:n,postbackId:i,value:o,role:r}=e;return{...t&&{type:t},text:n,postbackId:i,...o&&{value:o},...r&&{role:r}}})}}}if(e.quickReplies){const n=e.quickReplies.map(e=>{let{type:t,text:n,postbackId:i,value:o,role:r}=e;return{...t&&{type:t},text:n,postbackId:i,...o&&{value:o},...r&&{role:r}}});return{...t,...e.text&&{title:e.text},...n.length>0&&{buttons:n}}}return e.text?{...t,title:e.text}:t},Vi="liveChatChatId",Ui=e=>{let{trackerId:t,orderId:n,orderPrice:i,...o}=e;return b(o)||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}))},Gi=(e,t)=>e||t||"custom",Yi=(e,t)=>{if(!r(e)||b(e))return{};const{platform:n}=e,i=Gi(n,t),o=JSON.stringify(e);return{__text_platform:i,cca_platform:i,_text_cart:o,cca_cart_content:o}},Ji=(e,t)=>_(null,"properties",m(e=>{let{properties:n}=e;return n.uniqueId===t},Ye(e.state,Vi)));const Xi={position:jt()?"absolute":"fixed",height:jt()?"calc(100vh - env(safe-area-inset-bottom))":"100%",width:"100%",top:0,right:0,bottom:0,left:0,overflowY:"hidden"};function Ki(e,t){return null!=t&&null!=e&&"object"==typeof t&&"object"==typeof e?Qi(t,e):e}function Qi(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]=Ki(t[e],i[e]))}else{i={...e};for(const e in t)n(e,t)&&(void 0===t[e]?delete i[e]:i[e]=Ki(t[e],i[e]))}return i}var Zi=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=Qi(e.state,t)}),e.on("store_event",t=>{let[n,i]=t;e._emit(n,i)}),e.call("startStateSync")});const eo=Wt(),to=e=>{if(eo)return{width:"100%",height:"100%"};const t=e?.__unsafeProperties?.group?.theme?.name,n=e?.__unsafeProperties?.enableTextApp;let i="default";return n?i="ta-default":"modern"===t&&(i="modern"),(e=>{switch(e){case"ta-large":return{width:"640px",height:"max(calc(100vh - 100px), 800px)"};case"ta-default":return{width:"420px",height:"800px"};case"modern":return{width:"400px",height:"465px"};case"full-viewport":return{width:"100%",height:"100%"};default:return{width:"392px",height:"714px"}}})(i)},no=(e,t,n)=>{const i=vi(t,eo);return!e&&n?{[fi(t,eo)]:"0",bottom:i.y+"px",maxHeight:"100%"}:eo&&e?{[fi(t,eo)]:"0",bottom:"0",maxHeight:"100%"}:{[fi(t,eo)]:i.x+"px",bottom:i.y+"px",maxHeight:`calc(100% - ${i.y}px)`}},io=e=>e.style.setProperty("transition","none","important"),oo=e=>{const t=document.createElement("div");return it((e=>({"aria-live":e,id:It(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},ro=(e,t)=>{const n=ct("div",ft),i=vi(e,eo),o=no(t,e),{width:r,height:a}=to(e);return nt({width:r,height:a,[fi(e,eo)]:i.x+"px",...o},n),n},ao=(e,t,n,i,o,r,a,s)=>{let c=K(l({...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},...rn(n)}));(()=>{if(Ln)throw Error("Title notification service already initialized");Ln=(()=>{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},Cn))},clearTitleNotification:()=>{document.title=t,clearInterval(e),n=null},getOriginalPageTitle:()=>t}}catch(e){return console.error("Error while creating title notification service",e),null}})()})();const d={kill(){this._emit("widget_resize",{size:{width:"0px",height:"0px"}}),this.unbind(),e.custom||st(e.element)},applyHiddenStyles(){nt(ht,e.element)},isFocused:()=>!!document.hasFocus&&document.hasFocus(),resize(t){let{width:i,height:o,maximized:r,ignoreHorizontalOffset:a,animated:s}=void 0===t?{}:t;const c={width:i,height:o},l=no(r,n,a);e.element.style.transition=s?In:"none",nt({...c,...l},e.element);const d=rt(["width","height"],e.element);this._emit("widget_resize",{size:c,computedSize:d})},show(){nt(gt,e.element)},hide(){this.call("hide")},focusMinimized(){const e=document.getElementById(dt);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=A,Object.keys(d).forEach(e=>{this[e]=A})},callIdentityProvider:e=>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 o?.[e](...n)},applyFramesStyle(e){let{minimizedFrameStyle:t,maximizedFrameStyle:n}=e;const i=document.getElementById(lt),o=document.getElementById(dt);i&&nt(n,i),o&&nt(t,o)},setLiveAnnouncerMessage(e){let{message:t,ariaLevel:n}=e;const i=document.getElementById(It(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(dt);o||(o=document.createElement("iframe"),it({...kt,title:"openwidget"===a?pt:mt},o),e.element.appendChild(o),e.element.appendChild(oo("polite")),e.element.appendChild(oo("assertive")),o.contentDocument.fonts.ready.then(()=>this.emit("minimized_frame_fonts_ready")).catch(A)),yn(n,i,o,this)},renderLightboxMarkup(e){let[t,n]=e,i=document.getElementById(Et.id);this.handleLightboxKeydown=e=>(e=>{const{updateLightboxState:t,event:n,state:i}=e;if("Escape"===n.key)return t({...i,state:"closing"}),void n.stopPropagation();if("ArrowLeft"===n.key||"ArrowRight"===n.key){n.preventDefault();const e=("product"===i.mode?i.productImages||{}:i.images||{}).orderedEventIds||[],o=i.currentImageEventId;if(!o||1>=e.length)return;const r=function(e,t,n,i){void 0===i&&(i=!1);const o=e.indexOf(t);if(-1===o)return null;let r;return r="previous"===n?i?(o-1+e.length)%e.length:o-1:i?(o+1)%e.length:o+1,e[r]??null}(e,o,"ArrowLeft"===n.key?"previous":"next",!0);t({...i,currentImageEventId:r,imagesScrollPosition:void 0,state:"loading",skipEnterAnimations:!0})}})({event:e,updateLightboxState:e=>this.call("storeMethod",["setApplicationState",{lightbox:{...this.state.application.lightbox||{},...e}}]),state:this.state.application.lightbox||{}}),i||(i=document.createElement("iframe"),it(Et,i),document.body.appendChild(i),i.focus(),Ft()||Ht()?i.onload=()=>{i.contentDocument.addEventListener("keydown",this.handleLightboxKeydown)}:i.contentDocument.addEventListener("keydown",this.handleLightboxKeydown));const o=i.contentDocument?.querySelector("#"+Pn),r=o?.scrollLeft??0;if(yn(t,n,i,this),r>0){const e=i.contentDocument?.querySelector("#"+Pn);e&&(e.scrollLeft=r)}},removeLightboxMarkup(){const e=document.getElementById(Et.id);e&&(e.contentDocument?.activeElement?.blur(),this.handleLightboxKeydown&&(e.contentDocument.removeEventListener("keydown",this.handleLightboxKeydown),this.handleLightboxKeydown=null),e.remove())},getMinimizedDimensions(){if(!e.element.offsetWidth)return null;const t=document.getElementById(dt).contentDocument.querySelector('[role="main"]');return rt(["width","height"],t)},callElementMethod(e){let[t,n,...i]=e;const o=document.getElementById(dt);o.contentDocument.querySelector(t)?.[n]?.(...i)},callLightboxElementMethod(e){let[t,n,...i]=e;const o=document.getElementById(Et.id);o&&o.contentDocument.querySelector(t)?.[n]?.(...i)},getLightboxElementProperties(e){let[t,n]=e;const i=document.getElementById(Et.id),o=i&&i.contentDocument.querySelector(t);return o?T(n,o):{}},refreshPage(){window.location.reload()},getElementProperties(e){let[t,n]=e;const i=document.getElementById(dt),o=i&&i.contentDocument.querySelector(t);return o?T(n,o):{}},setTitleNotification(e){const t=An();e?t.setTitleNotification(e):t.clearTitleNotification()}},m=`${t.iframeAddress}?${c}`,p=new MutationObserver(t=>t.forEach(t=>{const n=u(e=>"IFRAME"===e.tagName&&e.getAttribute("src")===m,t.addedNodes);n&&((e,t,n)=>{it({...xt,title:"openwidget"===n?pt:mt},t),e.custom||nt(yt,t)})(e,n,a)}));p.observe(e.element,{childList:!0});let h=!0;return"openwidget"===a&&(h=!!n.features.find(e=>"forms"===e.name)?.properties?.templates?.bugreport),new Wn({container:e.element,url:m,methods:d,iframeAllowedProperties:xn({allowAutoplay:!0,allowVideoConferencing:_i(n,"microphone"),allowClipboardWrite:_i(n,"clipboard_write"),allowDisplayCapture:h}),model:{...t,fullWidth:e.size?.width,fullHeight:e.size?.height,serverConfig:n,parentWidth:window.innerWidth,parentHeight:window.innerHeight,defaultWidget:a,newMinimizedLayout:s}}).then(e=>Promise.all([e,Zi(e)])).then(e=>{let[t]=e;return p.disconnect(),t})},so=(e,t,n,i,r,a,m)=>{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)}document.addEventListener("keydown",o,!0),document.addEventListener("keyup",o,!0),window.addEventListener("focus",function(e){e.target!==window&&e.target!==document&&(t||i("keyboard"),t=!1)},!0),window.addEventListener("blur",function(){t=!1},!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||hi(n.element,()=>Rt(e.state,"hidden")),eo||"wix"===t.integrationName||((e,t,n)=>{const{eyeCatcher:i}=t.__unsafeProperties.group;if(!i.enabled||(e=>{const t=e.__unsafeProperties.group;return gi(e,void 0)?t.disabledMinimizedOnMobile:t.disabledMinimized})(t))return;let o,r;const a=e=>{const{visibility:t,eyeCatcher:n,availability:i,readyState:o}=tt(e);return n.hidden||"minimized"!==t.state||"online"!==i||o===W},s=()=>{o&&(st(o),o=null),clearTimeout(r)};Le(Vn(e,a),je({next:c=>{c?s():r=setTimeout(()=>{o=(()=>{const o=ct("div",vt),r=fi(t);nt({bottom:i.y+"px",[r]:i.x+"px"},o);const c=ct("div",_t);15>i.x&&"right"===r&&nt({[r]:10-i.x+"px"},c),c.innerHTML="×";const l=ct("div",wt),d={...bt,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=ct("img",d);return l.appendChild(u),u.addEventListener("load",()=>{const{width:e,height:t}=u;nt({width:e+"px",height:t+"px"},u)}),u.addEventListener("error",s),o.appendChild(c),o.appendChild(l),hi(o,()=>a(e.state)),document.body.appendChild(o),Dt(window.matchMedia)&&window.matchMedia("(hover: none)").matches?nt({display:"block"},c):(o.addEventListener("mouseover",()=>{nt({display:"block"},c)}),o.addEventListener("mouseout",()=>{nt({display:"none"},c)})),o.addEventListener("click",t=>{t.stopPropagation(),t.preventDefault(),e.maximize()}),c.addEventListener("mouseover",()=>{nt({color:"#444"},c)}),c.addEventListener("mouseout",()=>{nt({color:"#000"},c)}),c.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),e.call("hideEyeCatcher")}),o})()},430)},complete:s}))})(e,r,i),io(e.frame),function(e,t,n){(function(e,t,n){window.LC_API=window.LC_API||{};const i=window.LC_API;Le(function(e){return Le(Vn(e,e=>Rt(e,"maximized")),be(x))}(e),ye(()=>$i(i.on_chat_window_opened))),Le(Qn(e,()=>function(e){return Le(Vn(e,e=>Rt(e,"minimized")),Be(1),be(x))}(e)),ye(()=>$i(i.on_chat_window_minimized))),Le(function(e){return Le(Vn(e,e=>Rt(e,"hidden")),be(x))}(e),ye(()=>$i(i.on_chat_window_hidden))),Le(Gn(e),ye(e=>$i(i.on_chat_state_changed,{state:"online"===e?"online_for_chat":"offline"}))),Le(Qn(e,()=>Jn(e)),be(x),ye(()=>$i(i.on_chat_started,{agent_name:Qe(e.state,Je(e.state,qi).properties.currentAgent).name}))),Le(Qn(e,()=>Jn(e)),be(y),ye(()=>$i(i.on_chat_ended))),Le(Qn(e,()=>Ce(e,"on_message")),ye(e=>$i(i.on_message,e))),Le(Ce(e,"widget_resize"),ye(e=>{let{size:t}=e;return $i(i.on_widget_resize,t)})),Le(function(e){return Le(Ce(e,"add_event"),be(e=>{let{event:t}=e;return t.properties.invitation}),Ae(t=>{let{event:n}=t;return{event:n,author:Qe(e.state,n.author)}}))}(e),ye(e=>{let{author:t,event:{timestamp:n,properties:{text:o,receivedFirstTime:r}}}=e;$i(i.on_message,{text:o,timestamp:n,invitation:!0,user_type:"agent",agent_login:t.id,agent_name:t.name,received_first_time:r})})),Ni(e,i,"on_postchat_survey_submitted"),Ni(e,i,"on_prechat_survey_submitted"),Ni(e,i,"on_rating_comment_submitted"),Ni(e,i,"on_rating_submitted"),Ni(e,i,"on_ticket_created"),i.set_custom_variables=t=>{Ti("LC_API.set_custom_variables",t),ji(e,Di(t))},i.update_custom_variables=t=>{Ti("LC_API.update_custom_variables",t),Bi(e,{properties:Di(t)})},i.set_visitor_name=t=>{Ti("LC_API.set_visitor_name",t),Bi(e,{name:Wi(t)})},i.set_visitor_email=t=>{Ti("LC_API.set_visitor_email",t),Bi(e,{email:Wi(t)})},i.open_chat_window=i.show_full_view=i.open_mobile_window=()=>{Ti("LC_API.open_chat_window"),e.maximize()},i.minimize_chat_window=()=>{Ti("LC_API.minimize_chat_window"),si(t)||e.minimize()},i.hide_eye_catcher=()=>{Ti("LC_API.hide_eye_catcher"),e.call("hideEyeCatcher")},i.hide_chat_window=()=>{Ti("LC_API.hide_chat_window"),si(t)||e.hide()},i.agents_are_available=()=>(Ti("LC_API.agents_are_available"),"online"===tt(e.state,"availability")),i.chat_window_maximized=()=>(Ti("LC_API.chat_window_maximized"),Rt(e.state,"maximized")),i.chat_window_minimized=()=>(Ti("LC_API.chat_window_minimized"),Rt(e.state,"minimized")),i.chat_window_hidden=()=>(Ti("LC_API.chat_window_hidden"),Rt(e.state,"hidden")),i.visitor_queued=()=>(Ti("LC_API.visitor_queued"),Je(e.state,qi).properties.queued),i.chat_running=()=>(Ti("LC_API.chat_running"),Je(e.state,qi).active),i.visitor_engaged=()=>(Ti("LC_API.visitor_engaged"),i.visitor_queued()||i.chat_running()||!!Je(e.state,qi).properties.fakeAgentMessageId),i.get_window_type=()=>(Ti("LC_API.get_window_type"),"embedded"),i.close_chat=()=>{Ti("LC_API.close_chat"),e.call("storeMethod",["requestUpdateChat",qi,{active:!1}])},i.diagnose=Mi(e,t,n),i.get_last_visit_timestamp=()=>tt(e.state).clientLastVisitTimestamp,i.get_visits_number=()=>tt(e.state).clientVisitNumber,i.get_page_views_number=()=>tt(e.state).clientPageViewsCount,i.get_chats_number=()=>tt(e.state).clientChatNumber,i.get_visitor_id=()=>Ke(e.state).serverId,i.get_chat_id=()=>Je(e.state,qi).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=A})(e,t,n),("LiveChatWidget"in window||"OpenWidget"in window)&&function(e,t,n){const i=Xt(),o=window.LiveChatWidget||window.OpenWidget,r=(e,t)=>{var n;return(n={get:b,call:y,on:f,once:v,off:i.off})[e].apply(n,t)},a=(e,t)=>Hn(()=>i.emit(e,t)),d=function(e){void 0===e&&(e=[]);const t=E(e);if(!t)return;const[,[n,i]]=t;y(n,i)},m=function(e){void 0===e&&(e=[]),e.forEach(e=>{const[t,n]=e;r(t,n)})},p=(h=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_customer_phone_number":return"phoneNumber";case"set_session_variables":case"trigger_sales_tracker":case"set_customer_cart":case"update_session_variables":return"fields";case"destroy":case"hide":case"maximize":case"minimize":return"visibility";case"hide_greeting":return"greeting";case"track_sales_event":return"salesEvents"}},Object.values(o._q).reduce((e,t)=>{const n=h(t);return e[n]=e[n]||[],e[n].push(t),e},{}));var h;function g(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"customer_data_changed":case"rich_message_button_clicked":return void i[t](n,o);case"ready":return void(tt(e.state,"readyState")!==W?Hn(()=>o({state:_("state"),customerData:_("customer_data")})):i[t](n,o));default:return void console.error(`[LiveChatWidget] callback "${n}" does not exist.`)}}function f(e,t){Ti("LiveChatWidget.on",`'${e}'`,t),g("on",e,t)}function v(e,t){Ti("LiveChatWidget.once",`'${e}'`,t),g("once",e,t)}function _(t){switch(t){case"state":{const{availability:t,visibility:n}=tt(e.state);return{availability:t,visibility:n.state}}case"chat_data":{const{serverId:t,active:n,properties:i}=Je(e.state,Vi);return{chatId:t||null,threadId:(n||i.ended)&&i.lastThread||null}}case"customer_data":{const{serverId:t,name:n,email:i,properties:o}=Ke(e.state),{isReturning:r}=tt(e.state),{active:a,properties:s,events:c}=Je(e.state,Vi),{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(tt(e.state).config.features);default:return void console.error(`[LiveChatWidget] property "${t}" not exists.`)}}function b(e){return Ti("LiveChatWidget.get",`'${e}'`),_(e)}function y(n,i,o){switch(Ti.apply(void 0,["LiveChatWidget.call",`'${n}'`].concat(i)),n){case"hide":case"maximize":case"minimize":if(si(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 ji(e,s(String,i));case"set_customer_name":return void Bi(e,{name:Wi(i)});case"set_customer_email":return void Bi(e,{email:Wi(i)});case"set_customer_phone_number":return void Bi(e,{phoneNumber:Wi(i)});case"update_session_variables":return void Bi(e,{properties:s(String,i)});case"trigger_sales_tracker":return void ji(e,Ui(i));case"set_customer_cart":return void Bi(e,{properties:Yi(i,t.ecommercePlatform)});case"track_sales_event":return void e.call("trackSalesEvent",{...i,platform:Gi(i?.platform,t.ecommercePlatform),...o?.websiteId?{websiteId:o.websiteId}:{}});case"hide_greeting":return void e.call("hideGreeting");case"send_message":return void e.call("sendMessage",i);case"set_navigation_handler":return void Fi.setHandler(i);default:return void console.error(`[LiveChatWidget] method "${n}" not exists.`)}}m(p.other),m(p.salesEvents),d(p.visibility),d(p.greeting),d(p.name),d(p.email),d(p.phoneNumber),(e=>{const{mode:n,properties:i}=function(e,t){return void 0===e&&(e=[]),e.reduce((e,n)=>{let[,[i,o]]=n;switch(i){case"set_session_variables":return e.mode="set",e.properties=o,e;case"trigger_sales_tracker":return e.mode="set",e.properties=Ui(o),e;case"set_customer_cart":return"none"===e.mode&&(e.mode="update"),e.properties={...e.properties,...Yi(o,t.ecommercePlatform)},e;case"update_session_variables":return"none"===e.mode&&(e.mode="update"),e.properties={...e.properties,...o},e}},{mode:"none"})}(e,t);"none"!==n&&y(n+"_session_variables",i)})(p.fields),o._q=[],o._h=r,o.scriptTagVersion=()=>o._v,o.diagnose=Mi(e,t,n),Le(Xn(e,$),ye(()=>{!function(){const e=e=>"function"==typeof e&&Hn(()=>e(o));Array.isArray(window.__lc_onready)&&(window.__lc_onready.forEach(e),window.__lc_onready={push:e})}(),a("ready",{state:_("state"),customerData:_("customer_data")})})),Le(Qn(e,()=>Gn(e)),ye(e=>a("availability_changed",{availability:e}))),Le(Qn(e,()=>Un(e,()=>_("state").visibility)),ye(e=>{a("visibility_changed",{visibility:e})})),Le(Qn(e,()=>Un(e,()=>_("customer_data").status)),ye(e=>a("customer_status_changed",{status:e}))),Le(Qn(e,()=>Un(e,()=>_("customer_data"))),ye(e=>a("customer_data_changed",e))),Le(Qn(e,()=>Zn(e,"hiddenIds")),Ae(t=>Ji(e,t)),be(x),ye(e=>a("greeting_hidden",Hi(e)))),Le(Qn(e,()=>Zn(e,"displayedIds")),Ae(t=>Ji(e,t)),be(x),ye(e=>a("greeting_displayed",Hi(e)))),Le(Ce(e,"on_rating_submitted"),ye(e=>a("rating_submitted",e))),Le(Ie(Ce(e,"add_event"),Ce(e,"send_event")),be(e=>{let{event:t}=e;return w(t.type,["message","emoji","rich_message","file","custom"])}),Ae(t=>{let{event:n}=t;const{author:i,timestamp:o,properties:r,content:a}=n,s=Qe(e.state,i),c=!0===r.invitation,l="custom"===n.type;return{timestamp:o,type:n.type,author:{id:s.serverId,type:s.id===Ze(e.state)?"customer":"agent",...s.name&&{name:s.name},...s.avatar&&{avatar:s.avatar}},...c&&{greeting:Ri(r)},...l&&{customId:r?.customId,...void 0!==a&&{content:a}}}}),ye(e=>a("new_event",e))),Le(Ie(Le(Ce(e,"send_event"),Ae(e=>{let{event:t}=e;const{type:n,properties:i}=t;if("rich_message_postback"===n){const{eventId:e,postback:t}=i;return{postbackId:t.id,eventId:e,...t.ecommerce&&{ecommerce:l({productId:t.ecommerce.product_id,variantId:t.ecommerce.option_id,quantity:t.ecommerce.quantity})}}}if("message"===n&&i.triggeredBy){const{event:e,button:t}=i.triggeredBy,{postbackId:n}=t;return{postbackId:n,eventId:e}}return null}),be(x)),Le(Ce(e,"rich_greeting_button_clicked"),Ae(e=>{let{event:t,button:n}=e;const{id:i,properties:o}=t,{postbackId:r}=n;return{eventId:i,postbackId:r,greeting:Hi(o)}}))),ye(e=>a("rich_message_button_clicked",e))),Le(Ie(Le(Ce(e,"on_ticket_created"),Ae(()=>"ticket")),Le(Ce(e,"on_prechat_survey_submitted"),Ae(()=>"prechat")),Le(Ce(e,"on_postchat_survey_submitted"),Ae(()=>"postchat"))),ye(e=>a("form_submitted",{type:e})))}(e,t,n)}(e,t,r),((e,t)=>{let{analytics:n}=t;const i=Object.keys(n).filter(e=>n[e].enabled).map(e=>{const t=n[e],i=ai[e];try{return i(t)}catch(e){return Rn(e),null}}).filter(Boolean);if(0===i.length)return;const o=function(t,n){let{group:o=tt(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:{...a,group:l},persistentData:s})}catch(e){Rn(e)}})};Le(Vn(e,e=>tt(e,"readyState")),be(e=>e===q),We(1),Te(()=>Jn(e)),be(Boolean),ye(()=>{const{email:t,name:n}=Ke(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;Le(Ie(Ce(e,"set_default_view"),Ce(e,"set_current_view")),be(e=>e.viewInfo&&"Chat"===e.viewInfo.view&&e.viewInfo.default===t),$e(Ce(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 Le(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)}()}}(Se(i),Pe),(o=Le(Vn(e,e=>Rt(e,"maximized")),be(Boolean)),a=void 0===(r={}.size)?100:r,function(e){return function(t,n){var i=[];if(0===t){var r,s,c=!1;e(0,function(e,t){if(0===e&&(r=t,o(0,function(e,t){if(0===e)(s=t)(1);else if(1===e){c=!0,s(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>a&&i.shift(),void r(1));n(e,t)})}}}),$e(Ce(e,n)));var o,r,a},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()(0,a)}})}}}),ye(e=>{o(e)}))})})(e,t),Le(Kn(e,()=>((e=>{Ot().then(t=>{e.call("shouldBridgeHandleAudio").then(n=>{n&&(Nt.isBridgeActive=!0,e.on("add_event",n=>{let{event:i}=n;Nt.isBridgeActive&&(tt(e.state,"muted")||((e,t)=>"system"!==e.author&&!e.properties.welcomeMessage&&e.author!==t&&"custom"!==e.type)(i,Ze(e.state))&&t(Ct))}),e.on("reaction_received",n=>{let{event:i}=n;Nt.isBridgeActive&&(tt(e.state,"muted")||Ze(e.state)===i.author&&t(Ct))}))})})})(e),Pe)),ye(A)),"wix"===t.integrationName?(e=>{qn.addEventListener(qn.Events.PAGE_NAVIGATION,()=>{$n().then(t=>e.call("storeMethod",["setApplicationState",{page:t}]))})})(e):((e=>{Le((e,t)=>{if(0!==e)return;let n=0;const i=setInterval(()=>{t(1,n++)},2e3);t(0,e=>{2===e&&clearInterval(i)})},Ae(zn),we((e,t)=>e.url===t.url),$e(Ce(e,"unbind")),ye(t=>{e.call("storeMethod",["setApplicationState",{page:t}])}))})(e),"openwidget"===a&&(e=>{Le(function(e,t){return fe(n=>{const i=new MutationObserver(n);return i.observe(e,t),()=>{i.disconnect()}})}(document.body,{childList:!0,subtree:!0}),Ae(zn),we((e,t)=>e.url===t.url),$e(Ce(e,"unbind")),ye(t=>{e.call("storeMethod",["setApplicationState",{page:t}])}))})(e),((e,t)=>{const n=((e,t,n)=>i=>{const o=i.target;if(!(o instanceof Element))return;const r=t.attributePrefixes.map(e=>`[${e}-action]`).join(",");if(!r)return;const a=o.closest(r);if(!a)return;let s;for(const e of t.attributePrefixes){const t=a.getAttribute(e+"-action");if(t){s=t;break}}if(!s)return void console.error(t.widgetName+": Action attribute value not found.");if(!w(s,t.allowedActions))return void console.error(`${t.widgetName}: Action "${s}" is not allowed. Allowed actions: ${t.allowedActions.join(", ")}`);const c=((e,t,n)=>{const i={},o=n.allowedParams[t];return o&&o.forEach(t=>{for(const o of n.attributePrefixes){const n=e.getAttribute(`${o}-${t}`);if(n){i[t]=n;break}}}),i})(a,s,t);((e,t,n,i)=>{if("send_message"===t&&"livechat"===i){const t=n.messageText;return void(t&&e.call("sendMessage",{text:t}))}if("maximize"===t){const t={};return n.messageDraft&&(t.messageDraft=n.messageDraft),"livechat"===i&&n.startChat&&(t.startChat="true"===n.startChat),"openwidget"===i&&n.feature&&(t.feature=n.feature),void e.maximize(t)}"minimize"!==t||e.minimize()})(e,s,c,n)})(e,Ii[t],t);Le(Vn(e,e=>e.application.readyState),be(e=>e===q),We(1),ye(()=>{document.addEventListener("click",n)})),Le(Ce(e,"unbind"),ye(()=>{document.removeEventListener("click",n)}))})(e,a)),(e=>{Le(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=Ae(()=>!0)(xe(window,"focus")),i=Ae(()=>!1)(xe(window,"blur"));return Ie(e,n,i)}(),$e(Ce(e,"unbind")),ye(t=>{e.emit("focus",t)}))})(e),"livechat"===a&&m(t,e,r),t.actingAsDirectLink||n.custom||function(e){Le(Vn(e,e=>Rt(e,"hidden")),Be(1),ye(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,()=>{nt(rt(["width"],t),t),requestAnimationFrame(()=>{nt({width:xt.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",A),setTimeout(()=>{document.removeEventListener("touchstart",A)},500)},500)};window.addEventListener("orientationchange",t);const n=()=>{e.off("unbind",n),window.removeEventListener("orientationchange",t)};e.on("unbind",n)}(e),((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=_("#","0.href",n);"image"===r.type?((e,t)=>{let{text:n,url:i,src:o}=e;pi(t);const r=ct("a",{href:i}),a=ct("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;pi(t);const o=ct("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()})})})(e,r),eo&&!n.custom&&((e,t)=>{const n=document.querySelector('meta[name="viewport"]')||(()=>{const e=ct("meta",{name:"viewport"});return document.getElementsByTagName("head")[0].appendChild(e),e})();let i=null;const o=()=>{const o=n.content,r=(a=document.body,Object.keys(Xi).reduce((e,t)=>(e[t]=a.style[t],e),{}));var a;const{scrollTop:s}=document.documentElement;n.content="width=device-width, initial-scale=1.0, maximum-scale=1.0",nt(Xi,document.body);const c=((e,t)=>{const{visualViewport:n}=window;if(!n)return A;let i=0,o=null;const r=()=>{(()=>{if(Math.abs(n.scale-1)>.01)return!1;const e=Math.max(document.documentElement.clientHeight,window.innerHeight),i=Math.max(0,e-n.height),o=Math.min(Math.max(0,n.offsetTop),i),r=Math.round(n.height)+"px",a=`translateY(${Math.round(o)}px)`;return(t.style.height!==r||t.style.transform!==a)&&(nt({top:0,height:r,transform:a,transition:"none"},t),!0)})()&&(i=Date.now()+600),o=Date.now(){i=Date.now()+600,null===o&&r()};return n.addEventListener("resize",a),n.addEventListener("scroll",a),t.addEventListener("focusin",a),window.addEventListener("blur",a),e.on("widget_resize",a),()=>{n.removeEventListener("resize",a),n.removeEventListener("scroll",a),t.removeEventListener("focusin",a),window.removeEventListener("blur",a),e.off("widget_resize",a),cancelAnimationFrame(o),nt({top:"",transform:""},t)}})(e,t);return()=>{i=null,c(),nt(r,document.body),n.content=o,document.documentElement.scrollTop=s}};Rt(e.state,"maximized")&&(i=o()),Le(Vn(e,e=>Rt(e,"maximized")),Me,je({next:e=>{let[,t]=e;t?i=o():i()},complete:()=>{i&&i()}}))})(e,n.element),(e=>{Le(Kn(e,()=>Ce(e,"add_event")),be(e=>{let{event:t}=e;return"custom"===t.type&&t.properties.customId&&-1!==t.properties.customId.indexOf("cyber-finger-snapshot-request-")}),ye(t=>{let{event:n}=t;const i=n.properties.customId.replace("cyber-finger-snapshot-request-","");try{const t=(()=>{const e=(void 0)[0];return JSON.stringify(e)})();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){}}))})(e),e.on("rich_greeting_button_clicked",e=>{let{button:t}=e;"url"===t.type&&Fi.navigate(t.value,"current"===t.target?"_parent":"_blank")}),e.on("open_in_new_tab",e=>{Fi.navigate(e)}),e.on("register_exit_intent_listener",()=>{const t=(e=>{const n=n=>{n.currentTarget&&n.relatedTarget||(e.call("storeMethod",["emit","exit_intent_detected"]),t())};return window&&(ki&&window.removeEventListener("mouseout",ki),window.addEventListener("mouseout",n),ki=n),()=>{window&&window.removeEventListener("mouseout",n)}})(e)}),e.on("apply_exit_intent_shade",()=>{((e,t)=>{t.call("storeMethod",["setApplicationState",{isExitIntentShadeDisplayed:!0}]);const n=document.createElement("div");n.id=yi,nt((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),xi&&window.removeEventListener("mouseover",xi),xi=()=>Ei(t),window.addEventListener("mouseover",xi)})(fi(r,!1),e)}),e.on("remove_exit_intent_shade",()=>{Ei(e)}),e.on("refresh-page",()=>{window.location.reload()}),e.on("open_phone_number",e=>{window.location.href="tel:"+e}),n.custom||function(e,t){let n=!1;const i=new IntersectionObserver(t=>{const i=t[0];if(!i)return;const o=i.isIntersecting;o&&n&&e.emit("container_became_visible"),n=!o});i.observe(t);const o=()=>{e.off("unbind",o),i.disconnect()};e.on("unbind",o)}(e,n.element)};const co={light:{widgetBackground:Ut,primaryTextColor:Jt,secondaryButtonBackground:Gt},dark:{widgetBackground:Jt,primaryTextColor:Vt,secondaryButtonBackground:Yt}},lo=(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=xn({allowAutoplay:!0,allowVideoConferencing:_i(n,"microphone"),allowClipboardWrite:_i(n,"clipboard_write"),allowDisplayCapture:!0}),o.addEventListener("load",()=>{i.remove()}),t.document.body.append(o),t.resizeTo(360,682)},uo="liveChatChatId",mo=e=>{const t=getComputedStyle(e);return"hidden"!==t.visibility&&"none"!==t.pointerEvents},po=(e,t)=>!(t.left>e.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom),ho=e=>e.left>=e.right||e.top>=e.bottom,go=e=>"hidden"===e||"clip"===e||"auto"===e||"scroll"===e,fo=e=>{const t=e.getBoundingClientRect();let n={top:t.top,bottom:t.bottom,left:t.left,right:t.right};if("fixed"!==getComputedStyle(e).position)for(let t=e.parentElement;t;t=t.parentElement){const e=getComputedStyle(t),i=go(e.overflowX||e.overflow),o=go(e.overflowY||e.overflow);if(!i&&!o)continue;const r=t.getBoundingClientRect();if(n={top:o?Math.max(n.top,r.top):n.top,bottom:o?Math.min(n.bottom,r.bottom):n.bottom,left:i?Math.max(n.left,r.left):n.left,right:i?Math.min(n.right,r.right):n.right},ho(n))return null}const i={top:Math.max(n.top,0),bottom:Math.min(n.bottom,window.innerHeight),left:Math.max(n.left,0),right:Math.min(n.right,window.innerWidth)};return ho(i)?null:i},vo=()=>Math.max(document.documentElement.scrollHeight,document.body.scrollHeight)>window.innerHeight,_o=N?2e3:15e3,wo=e=>{const{minimizedMessageInput:t}=tt(e);return!!t.deferred},bo=e=>(e=>{const t=tt(e,"config"),n=!!t.features.textApp?.enabled,i=!!tt(e,"enableMinimizedMessageInputLayout");return(n||i||(e=>{const{organizationId:t,group:n}=tt(e);return t===j&&void 0!==n&&(e=>1===e||5===e)(n)})(e))&&"circle"===(e=>{const t=tt(e,"config");return!0===tt(e,"mobile")?t.mobileMinimizedType:t.minimizedType})(e)&&"smooth"===t.theme.name})(e)&&(e=>{const t=tt(e,"config");return(e=>tt(e,"mobile")&&tt(e,"config").hasCustomMobileSettings)(e)?t.mobileMinimizedInputEnabled:t.minimizedInputEnabled})(e),yo=e=>!!tt(e).minimizedInputUrlRestricted,xo=e=>{if(!wo(e.state))return;e.call("storeMethod",["setApplicationState",{isNonScrollablePage:!1}]);const{minimizedMessageInput:t}=tt(e.state),n="hidden"!==t.state;e.call("storeMethod",["setApplicationState",{minimizedMessageInput:{...t,state:n?t.state:"entering",deferred:!1}}]).then(()=>{n||Rt(e.state,"maximized")||e.call("storeMethod",["emit","render-minimized"])})},Eo=e=>!!(e=>v("minimized",e.views))(e)?.messageInput?.trim(),ko=(e,t)=>{const n=window.scrollY;let i=null,o=!1;const r=()=>{null!==i&&(clearTimeout(i),i=null)},a=function(e,t){let n,i=Date.now()-200;const o=function(){i=Date.now(),t.apply(void 0,arguments)},r=()=>clearTimeout(n),a=function(){const e=Date.now();for(var t=arguments.length,a=Array(t),s=0;t>s;s++)a[s]=arguments[s];100>e-i?(r(),n=setTimeout.apply(void 0,[o,i-e+100].concat(a))):o.apply(void 0,a)};return a.cancel=r,a}(0,()=>{o||(e=>{if(e>0)return Math.abs(window.scrollY-e)>=30;const t=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight,document.documentElement.clientHeight,document.body.clientHeight),n=window.innerHeight;return t>3*n?window.scrollY>=1.5*n:t>2*n?window.scrollY>=.75*n:window.scrollY>=30})(n)&&(o=!0,r(),xo(e))});i=setTimeout(()=>{i=null;const t=tt(e.state),n=t.config?.screenPosition,o=t.config?.screenOffset;n&&o&&!vo()&&((e,t,n)=>{const i=((e,t,n)=>{const i=window.innerHeight-n,o="right"===e?window.innerWidth-t:t+320,r="right"===e?window.innerWidth-t-320:t;return{top:i-116,bottom:i,left:Math.max(0,r),right:Math.min(window.innerWidth,o)}})(e,t,n);return Array.from(document.querySelectorAll('button, input, select, textarea, a[href], [role="button"], [role="link"], [role="textbox"], [role="combobox"], [role="checkbox"], [role="radio"]')).filter(e=>po(i,e.getBoundingClientRect())).filter(mo).map(fo).filter(e=>null!==e&&po(i,e)).length>0})(n,o.x,o.y)||xo(e)},_o),Le(xe(window,"scroll"),$e(t),ye(a)),Le(Vn(e,Eo),be(Boolean),We(1),$e(t),ye(()=>{r(),xo(e)})),Le(t,We(1),ye(()=>{a.cancel(),r()}))},Io=N?0:300,Co=N?0:400,Lo=new Set([2,4,6,8,10,12,14,16,18,27]),Ao={passive:!0},To=e=>{if(!e)return!1;const t=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;return t instanceof HTMLElement&&t.isContentEditable},zo=e=>To(e.anchorNode)||To(e.focusNode),Po=e=>{const{showTextSelectionTracking:t,minimizedMessageInput:n}=tt(e);return!(!t||"hidden"===n?.state&&!n.deferred||Rt(e,"maximized")||"undefined"!=typeof document&&document.hidden)},So=e=>{const t=e.getAttribute("aria-label")||void 0,n=e.selectedOptions[0]?.textContent||void 0;return{tag:"select",type:"select",id:e.id,name:e.getAttribute("name")||"",...t&&{aria_label:t},...n&&{text:n}}},Mo=(e,t)=>{t&&e.call("trackUserAction",t)},Oo=(e,t,n)=>{"documentPictureInPicture"in window&&(e=>!!e.properties.license.bb9e5b2f1ab480e4a715977b7b1b4279?.detached_mode_enabled)(n)&&((e,t)=>{let n=null,i=tt(t.state).pipConsent;const o=K(l({...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=Je(t.state,"liveChatChatId").active,s="maximized"===tt(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}=tt(t.state);e.document.body.style.backgroundColor=co[s.theme.variant].widgetBackground,e.document.body.style.color=co[s.theme.variant].primaryTextColor,n.addEventListener("pagehide",()=>{document.hidden&&"allow"===i&&(i="dismissed",t.call("setPipConsent",null))}),i||((n,o,r,s,c,l)=>{const d=n.document.createElement("div");d.id="container",d.dir=l?"rtl":"ltr";const u=n.document.createElement("h1");u.textContent=s("detached_window_consent_title");const m=n.document.createElement("p");m.textContent=s("detached_window_consent_caption",{origin:new URL(n.origin).host});const p=n.document.createElement("button");p.textContent=s("open_in_separate_window"),p.style.backgroundColor=c.theme.colors.cta,p.style.color=c.theme.colors.ctaText;const h=n.document.createElement("button");h.textContent=s("cancel"),h.style.backgroundColor=co[c.theme.variant].secondaryButtonBackground,h.style.color=co[c.theme.variant].primaryTextColor,d.append(u,m,p,h),n.document.body.append(d),n.document.body.addEventListener("click",n=>{n.target===p&&(o(),d.remove()),n.target===h&&(i="deny",t.call("setPipConsent","deny"),e?.close(),a("picture_in_picture_consent_denied"))})})(e,()=>{i="allow",t.call("setPipConsent","allow"),e&&lo(r,e,s),a("picture_in_picture_consent_allowed")},0,(e,n)=>((e,t,n)=>{let i=e.localization[t];const o=e.application.language;return void 0===i?"":"object"==typeof i&&o?i[new Intl.PluralRules(o).select(1)]:n?Object.keys(n).reduce((e,t)=>e.replace(RegExp(`%${t}%`,"g"),n[t]),i):i})(t.state,e,n),s,c),"allow"===i&&lo(r,e,s)}).catch(A)});let u=!0;s.addEventListener("message",()=>{u=!1,window.documentPictureInPicture.window&&window.documentPictureInPicture.window.close()}),window.addEventListener("visibilitychange",()=>{s.postMessage(""),c()})})(e,t),(e=>{if((e=>{const{organizationId:t,group:n}=tt(e.state);return t===j&&Lo.has(n)})(e))return;let t=null;const n=()=>{t&&(t(),t=null)};Le(Ie(Vn(e,Po),Le(xe(document,"visibilitychange"),Ae(()=>Po(e.state)))),we(),$e(Ce(e,"unbind")),ye(i=>{i&&!t?t=(e=>{const{mobile:t}=tt(e.state),n=t?"touchstart":"mousedown",i=t?"touchend":"mouseup",o=t?300:100;let r=!1,a=null,s=null,c=null,l=null;const d=()=>{const{messageDraft:t,initialMessageDraft:n}=tt(e.state);return!t&&!n},u=t=>{const n=tt(e.state).websiteTextSelection??{};e.call("storeMethod",["setApplicationState",{websiteTextSelection:{...n,...t}}])},m=()=>{try{const t=document.getSelection();if(!t||t.isCollapsed||0===t.rangeCount)return;if(zo(t))return;const n=(e=>{const t=e??document.getSelection();return t?.toString().trim()??""})(t);if(!n)return;const i=t.getRangeAt(0).getBoundingClientRect();if(0===i.width&&0===i.height)return;a&&clearTimeout(a),s&&(clearTimeout(s),s=null);const o=!!tt(e.state).websiteTextSelection?.text;a=setTimeout(()=>{u({text:n,state:"enter"}),a=null},o?0:Io)}catch(e){console.error("[LiveChatWidget - TextSelectionTracker] Error showing button:",e)}},p=()=>{const t=tt(e.state).websiteTextSelection;a&&(clearTimeout(a),a=null),t?.text&&(s&&clearTimeout(s),u({state:"exit"}),s=setTimeout(()=>{u({text:"",state:"hidden"}),s=null},Co))},h=()=>{l&&clearTimeout(l),l=setTimeout(()=>{if(l=null,r)return;if(!d())return;const e=document.getSelection();e&&!e.isCollapsed&&(zo(e)||m())},o)},g=()=>{c&&(clearTimeout(c),c=null),r=!0},f=()=>{r&&(r=!1,c&&clearTimeout(c),c=setTimeout(()=>{c=null;const e=document.getSelection();e&&!e.isCollapsed?zo(e)?p():d()?m():p():p()},o))},v=()=>{const e=document.getSelection();e&&!e.isCollapsed||p()};return document.addEventListener("selectionchange",h,Ao),document.addEventListener(n,g,Ao),document.addEventListener(i,f,Ao),document.addEventListener("click",v,Ao),()=>{document.removeEventListener("selectionchange",h,Ao),document.removeEventListener(n,g,Ao),document.removeEventListener(i,f,Ao),document.removeEventListener("click",v,Ao),a&&(clearTimeout(a),a=null),s&&(clearTimeout(s),s=null),c&&(clearTimeout(c),c=null),l&&(clearTimeout(l),l=null),r=!1,tt(e.state).websiteTextSelection?.text&&u({text:"",state:"hidden"})}})(e):!i&&t&&n()})),Le(Ce(e,"unbind"),We(1),ye(()=>{n()}))})(t),(e=>{const t=Wt()||Bt(),n=vo();!t&&n||(t||n||e.call("storeMethod",["setApplicationState",{isNonScrollablePage:!0}]),Le(Vn(e,bo),be(Boolean),We(1),$e(Ce(e,"unbind")),ye(()=>{Le(Vn(e,wo),be(Boolean),We(1),$e(Ce(e,"unbind")),ye(()=>{t?(e=>{Le(Vn(e,yo),be(e=>!e),$e(Ce(e,"unbind")),ye(()=>{const t=Le(Vn(e,yo),Be(1),be(Boolean),We(1));ko(e,Ie(Ce(e,"unbind"),t))}))})(e):(e=>{const t=()=>{const t=document.getElementById(dt);if(!t)return;const n=()=>xo(e);t.addEventListener("mouseenter",n,{once:!0}),Le(Ce(e,"unbind"),We(1),ye(()=>t.removeEventListener("mouseenter",n)))};document.getElementById(dt)?t():Le(Ce(e,"minimized_frame_fonts_ready"),We(1),$e(Ce(e,"unbind")),ye(t))})(e)}))})))})(t),(e=>{const{actingAsDirectLink:t,embedded:n,mobileWrapper:i}=tt(e.state);if(t||!n||i)return;let o=null,r=null;const a=Le(xe(document,"visibilitychange"),be(()=>"maximized"===tt(e.state).visibility.state),Ae(()=>!document.hidden));Le(a,$e(Ce(e,"unbind")),ye(t=>{!t&&Je(e.state,uo).active?o=Date.now():o&&(r=Date.now()-o)})),Le(Ce(e,"add_event"),be(e=>{let{event:t}=e;return"client_inactive"===t.properties?.systemMessageType}),be(()=>!!r&&Je(e.state,uo).properties.ended),We(1),ye(()=>{Math.floor(100*Math.random())||e.call("logInfo","inactivity_duration",{duration:r,mobile:tt(e.state).mobile}),r=null}))})(t);const i=n?.__unsafeProperties?.enableTextApp;i&&(e=>{const t=t=>{Mo(e,(e=>{const t=e.target;if(!(t instanceof Element))return null;const n=t.closest("a, button, input[type=button], [role=button], [role=link], [role=tab]");if(!n)return null;if(n instanceof HTMLButtonElement&&"submit"===n.type&&n.form)return null;const i=n.id||void 0,o=n.getAttribute("aria-label")||void 0,r=n.textContent||void 0;return{type:"click",timestamp:(new Date).toISOString(),properties:{element:{tag:n.tagName.toLowerCase(),role:(a=n,a.getAttribute("role")||(a instanceof HTMLAnchorElement?"link":a instanceof HTMLButtonElement||a instanceof HTMLInputElement&&"button"===a.type.toLowerCase()?"button":"")),href:n instanceof HTMLAnchorElement&&n.getAttribute("href")||"",...i&&{id:i},...o&&{aria_label:o},...r&&{text:r}}}};var a})(t))},n=t=>{Mo(e,(e=>{const t=e.target;if(!(t instanceof HTMLFormElement))return null;const n=Array.from(t.elements).flatMap(e=>{if(e instanceof HTMLSelectElement)return[So(e)];if(e instanceof HTMLInputElement){const t=(e=>{const t=e.getAttribute("type"),n=(null===t?"text":t).toLowerCase(),i=e.getAttribute("name")||"";if(!((e,t)=>D.has(e)||B.has(e)||"text"===e&&"name"===t)(n,i))return null;const o=n;if(("radio"===o||"checkbox"===o)&&!e.checked)return null;const r=e.getAttribute("aria-label")||void 0,a=e.value||void 0;return{tag:"input",type:o,id:e.id,name:i,...r&&{aria_label:r},...a&&{text:a}}})(e);return t?[t]:[]}return[]}),i=(e=>{const t=e.getAttribute("action");if(t)try{return new URL(t,window.location.href).pathname||""}catch{return t}})(t),o=t.getAttribute("name")||void 0;return{type:"submit",timestamp:(new Date).toISOString(),properties:{...i&&{action_path:i},method:(t.getAttribute("method")||"get").toLowerCase(),form_id:t.getAttribute("id")||"",...o&&{form_name:o},...n.length?{fields:n}:{}}}})(t)),e.call("flushUserActions")},i=()=>{e.call("flushUserActions")},o=()=>{e.call("flushUserActions")},r=()=>{"hidden"===document.visibilityState&&e.call("flushUserActions")};document.addEventListener("click",t,!0),document.addEventListener("submit",n,!0),window.addEventListener("pagehide",i),window.addEventListener("beforeunload",o),document.addEventListener("visibilitychange",r),e.on("unbind",()=>{document.removeEventListener("click",t,!0),document.removeEventListener("submit",n,!0),window.removeEventListener("pagehide",i),window.removeEventListener("beforeunload",o),document.removeEventListener("visibilitychange",r)})})(t)},No=(e,t)=>{const n={name:null,email:null,phoneNumber:null,properties:{}};if("object"==typeof e&&e){const t=e.name,i=e.email,o=e.phoneNumber;"string"==typeof t&&(n.name=t),"string"==typeof i&&(n.email=i),null!=o&&(V(o)?n.phoneNumber=o:console.error("[LiveChatWidget] Customer phone number is not a valid E.164 formatted phone number (e.g. +14155552671) and was not set."))}return Array.isArray(t)&&(n.properties=Di(t)),n},Do=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=>e.textContent?.startsWith("window.__lc")))return"potentially_gtm"}catch{}return null};window.__lc_inited||(()=>{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:U(t),uniqueGroups:!1===t.chat_between_groups,customer:No(t.visitor,t.params),skipCodeInstallationTracking:1===t.test,integrationName:Do(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,ecommercePlatform:"string"==typeof t.__text_platform?t.__text_platform:null,iframeAddress:null,region:w(t.region,(n=H,a(n).map(e=>n[e])))?t.region+"":null,isInShopifyCheckoutUI:!0===t.is_shopify_checkout_ui};var t,n;e.actingAsDirectLink||!(ae(ge,window.location.search)||J("session")&&window.sessionStorage.getItem(ge))?function(e,t,n){void 0===n&&(n=A),window.performance&&"function"==typeof window.performance.mark&&window.performance.mark("lc_bridge_init");let i=!1,o=e;window.LC_API=window.LC_API||{},window.LC_API.is_loaded=()=>i;const{region:r,licenseId:a,organizationId:s,requestedGroupId:c,actingAsDirectLink:d,skipCodeInstallationTracking:u,integrationName:m,productName:p,customIdentityProviderInitializer:h,templateId:g}=t,f={...s?{organizationId:s}:{licenseId:a},skipCodeInstallationTracking:u,productName:p,integrationName:m,channelType:d?"direct_link":"code",url:En(document.location+""),..."number"==typeof c&&{groupId:c},..."string"==typeof r&&{region:r}},v="livechat"===o?(e=>(e=>{let{licenseId:t,organizationId:n}=e;return tn(`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=>ln({...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},tn(an("get_configuration",n),{callbackName:"lc_static_config",query:{organization_id:n.organizationId,version:n.version,...rn(n),..."number"==typeof n.groupId&&{group_id:n.groupId}}}).then(e=>pn(e)))]).then(e=>{let[t,n]=e;return{...t,...n}});var n})))(f).catch(e=>{if("DEFAULT_WIDGET_NOT_LIVECHAT"===e.code&&"openwidget"===e.defaultWidget)return o=e.defaultWidget,window.__ow=window.__ow||{},window.__ow.organizationId=e.organizationId,window.OpenWidget={...window.LiveChatWidget},hn(e.organizationId,m,null,u);throw e}):hn(s,m,g,u,f.url);Promise.all([v,"wix"===m?$n():zn(),at()]).then(e=>{let[r,a,s]=e;if(!Ci(r.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"===o&&!1===r.isWidgetEnabled)return;if(eo&&r.__unsafeProperties.group.disabledOnMobile&&!t.actingAsDirectLink)return;const c=mi(),d=(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})(h),u=window.localStorage,m=((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,ecommercePlatform:e.ecommercePlatform,analytics:{googleAnalytics:{enabled:!!n.integrations.analytics,trackerName:ii(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:bi(e,n),isInShopifyCheckoutUI:e.isInShopifyCheckoutUI}})(t,a,r),p=((e,t)=>e.customContainer?{custom:!0,element:e.customContainer}:{custom:!1,element:ro(t,e.actingAsDirectLink),size:to(t)})(t,r),g="true"===ae("new_minimized_layout",window.location.search),f={};let v=!1;const _=Li("on_before_load"),w=Li("on_after_load");_(e=>{e.disable_sounds=A,e.mobile_is_detected=()=>eo,e.chat_running=()=>!1,e.visitor_engaged=()=>!1,e.agents_are_available=()=>-1!==r.onlineGroupIds.indexOf(r.groupId),e.get_window_type=()=>"embedded",e.hide_chat_window=si(m)?A:()=>v=!0,e.set_visitor_name=e=>f.name=Wi(e),e.set_visitor_email=e=>f.email=Wi(e),e.set_custom_variables=e=>f.properties=e?Di(e):{},e.update_custom_variables=e=>{e&&(f.properties={...f.properties,...Di(e)})}});const b={...m,...r.licenseId&&{license:r.licenseId},customer:{...m.customer,...f},hidden:m.hidden||v,organizationId:r.organizationId};var y;p.custom||s.appendChild(p.element),window.performance&&"function"==typeof window.performance.mark&&window.performance.mark("lc_bind_child"),Promise.all([ao(p,b,r,d,u,null,o,g),"openwidget"===o?Promise.resolve(r.localization):(y={organizationId:b.organizationId,licenseId:b.license,groupId:b.group,region:b.region,version:r.localizationVersion,language:r.__unsafeProperties.group.language},tn(an("get_localization",y),{callbackName:"lc_localization",query:{organization_id:y.organizationId,version:y.version,language:y.language,...rn(y),..."number"==typeof y.groupId&&{group_id:y.groupId}}}).then(e=>k(e=>e.toLowerCase(),e)))]).then(e=>{let[t,i]=e;return p.custom||io(p.element),so(t,b,p,i,r,o,n),Le(Vn(t,e=>tt(e,"readyState")),be(e=>e===q),We(1),Ae(()=>t),Fe)}).then(e=>{window.performance&&"function"==typeof window.performance.mark&&window.performance.mark("lc_bridge_ready"),c&&c.getLogs().then(t=>{e.call("logInfo","loading_time_measured",l(t))}),w(()=>i=!0)})}).catch(cn)}("livechat",e,Oo):at().then(e=>{["https://cdn.livechatinc.com/widget/static/js/configurator.peIMgu3Y.js"].forEach(t=>{((e,t)=>{const n=document.createElement("script");it({src:t,type:"module",charset:"utf-8"},n),e.appendChild(n)})(e.ownerDocument.head,t)})})})()}();