!function(){"use strict";var e=function(){var e=setTimeout;function t(){}function n(e){if(!(this instanceof n))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],c(e,this)}function i(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,n._immediateFn((function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var i;try{i=n(e._value)}catch(e){return void o(t.promise,e)}r(t.promise,i)}else(1===e._state?r:o)(t.promise,e._value)}))):e._deferreds.push(t)}function r(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var i=t.then;if(t instanceof n)return e._state=3,e._value=t,void a(e);if("function"==typeof i)return void c((r=i,u=t,function(){r.apply(u,arguments)}),e)}e._state=1,e._value=t,a(e)}catch(t){o(e,t)}var r,u}function o(e,t){e._state=2,e._value=t,a(e)}function a(e){2===e._state&&0===e._deferreds.length&&n._immediateFn((function(){e._handled||n._unhandledRejectionFn(e._value)}));for(var t=0,r=e._deferreds.length;r>t;t++)i(e,e._deferreds[t]);e._deferreds=null}function u(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function c(e,t){var n=!1;try{e((function(e){n||(n=!0,r(t,e))}),(function(e){n||(n=!0,o(t,e))}))}catch(e){if(n)return;n=!0,o(t,e)}}n.prototype.catch=function(e){return this.then(null,e)},n.prototype.then=function(e,n){var r=new this.constructor(t);return i(this,new u(e,n,r)),r},n.prototype.finally=function(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){return t.reject(n)}))}))},n.all=function(e){return new n((function(t,n){if(!e||void 0===e.length)throw new TypeError("Promise.all accepts an array");var i=Array.prototype.slice.call(e);if(0===i.length)return t([]);var r=i.length;function o(e,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var u=a.then;if("function"==typeof u)return void u.call(a,(function(t){o(e,t)}),n)}i[e]=a,0==--r&&t(i)}catch(e){n(e)}}for(var a=0;i.length>a;a++)o(a,i[a])}))},n.resolve=function(e){return e&&"object"==typeof e&&e.constructor===n?e:new n((function(t){t(e)}))},n.reject=function(e){return new n((function(t,n){n(e)}))},n.race=function(e){return new n((function(t,n){for(var i=0,r=e.length;r>i;i++)e[i].then(t,n)}))},n._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(t){e(t,0)},n._unhandledRejectionFn=function(e){void 0!==console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var s=n;return/native code/.test(window.Promise)?window.Promise:s}();function t(e,t){return e+t}var n={}.hasOwnProperty;function i(e,t){return n.call(t,e)}function r(){return(r=Object.assign||function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];return n.forEach((function(t){for(var n in t)i(n,t)&&(e[n]=t[n])})),e}).apply(void 0,arguments)}function o(e){return Array.isArray(e)}function a(e){return"object"==typeof e&&null!==e&&!o(e)}function u(e){if("keys"in Object&&"function"==typeof Object.keys)return Object.keys(e);var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}function c(e,t){return u(t).reduce((function(n,i){return n[i]=e(t[i]),n}),{})}function s(e){return o(e)?e.map(s):a(e)?c(s,e):e}function d(e){return o(e)?e.filter((function(e){return null!=e&&!Number.isNaN(e)})):Object.keys(e).reduce((function(t,n){var i=e[n];return null==i||Number.isNaN(i)||(t[n]=i),t}),{})}function l(e,t){for(var n=0;t.length>n;n++){var i=t[n];if(e(i))return i}}function f(e,t){for(var n=t.length-1;n>=0;n--)if(e(t[n]))return t[n]}function p(e){return e}function m(e,t){return u(t).forEach((function(n){e(t[n],n)}))}function v(){return Math.random().toString(36).substring(2)}function h(e){var t=v();return i(t,e)?h(e):t}function g(e,t,n){var i=function(e,t){for(var n="string"==typeof e?e.split("."):e,i=0,r=t;r&&n.length>i;)r=r[n[i++]];return r}(t,n);return null!=i?i:e}function _(e,t){return-1!==t.indexOf(e)}function w(e){return 0===(o(e)?e:Object.keys(e)).length}function y(e){return!e}function b(e){return!!e}function k(e){return e.length>0?e[e.length-1]:void 0}function I(e,t){return u(t).reduce((function(n,i){return Object.defineProperty(n,e(i),{value:t[i],enumerable:!0}),n}),{})}function C(e,t){if(w(t))return e;var n={};return m((function(r,u){if(i(u,t))if(a(e[u])&&a(t[u]))n[u]=C(e[u],t[u]);else if(o(e[u])&&o(t[u])){var c=Math.max(e[u].length,t[u].length);n[u]=Array(c);for(var s=0;c>s;s++)s in t[u]?n[u][s]=t[u][s]:s in e[u]&&(n[u][s]=e[u][s])}else n[u]=t[u];else n[u]=e[u]}),e),m((function(e,r){i(r,n)||(n[r]=t[r])}),t),n}function E(e){if(0===e.length)return{};var t=e[0];return e.slice(1).reduce((function(e,t){return C(e,t)}),t)}function L(e){return function(e,t){var n={};return function(){var r=e.apply(void 0,arguments);if(i(r,n))return n[r];var o=t.apply(void 0,arguments);return n[r]=o,o}}(p,e)}function x(){}function A(e,t){return e.reduce((function(e,n){return e[n]=t[n],e}),{})}function z(){return(z=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function T(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function O(e,t){if(T(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(var r=0;n.length>r;r++)if(!i(n[r],t)||!T(e[n[r]],t[n[r]]))return!1;return!0}function P(e){return e.reduce(t,0)}function S(e){return Array.prototype.slice.call(e)}function M(e){return u(e).map((function(t){return[t,e[t]]}))}var j=function(e,t){m((function(e,n){t.style[n]=e}),e)},N=function(e,t){m((function(e,n){"style"!==n?t.setAttribute(n,e):j(e,t)}),e)},D=function(){return!!document.documentElement.currentStyle},q=function(e,t){var n=window.getComputedStyle(t),r="border-box"===n.boxSizing,o=A(e,n);D()&&r&&i("width",o)&&null!==o.width&&(o.width=P([o.width,n.paddingLeft,n.paddingRight,n.borderLeftWidth,n.borderRightWidth].map(parseFloat))+"px");D()&&r&&i("height",o)&&null!==o.height&&(o.height=P([o.height,n.paddingTop,n.paddingBottom,n.borderTopWidth,n.borderBottomWidth].map(parseFloat))+"px");return o};function F(){return new e((function(e){!function t(){document.body?e(document.body):setTimeout(t,100)}()}))}function W(e){var t=e.parentNode;t&&t.removeChild(e)}var H=function(e,t){var n=document.createElement(e);return N(t,n),n},B=function(e){return M(e).map((function(e){return e.map(encodeURIComponent).join("=")})).join("&")},R=function(e){return function(e){return e.reduce((function(e,t){return e[t[0]]=t[1],e}),{})}(e.split("&").filter(Boolean).map((function(e){return e.split("=").map((function(e){return decodeURIComponent(e.replace("+","%20"))}))})).map((function(e){return 2===e.length?e:[e[0],""]})))},V=/(?:[^:]+:\/\/)?([^/\s]+)/;var G=/[^:]+:\/\/[^(/|?)\s]+/,U=function(e){var t=e.match(G);return t&&t[0]},Y=/.*?\?([^#]+)/,J=function(e){var t=e.match(Y);return t?"?"+t[1]:""},X=function(e){return e.replace(/^\?/,"")},$=function(e){if(null===U(e))return R(X(e));var t=X(J(e));return t?R(t):{}},K=/^(?:https?:)?\/\/[^/]+\/([^?#]+)/,Q=function(e){var t=e.match(K);return"/"+(t&&t[1]||"")},Z=function(e){return e.replace(/\w/g,"$&[\\r\\n\\t]*")},ee=(RegExp("^[\0-]*("+Z("javascript")+"|"+Z("data")+"):","i"),/^((http(s)?:)?\/\/)/),te=function(e,t){if(-1===e.indexOf("?"))return e;var n=$(e);if(w(n))return e;if(Object.keys(n).every((function(e){return!t.includes(e)})))return e;t.forEach((function(e){return delete n[e]}));var i=function(e,t){if(0===Object.keys(t).length)return e;var n=U(e),i=Q(e),r=J(e)?$(e):{};return""+n+i+"?"+B(z({},r,t))}(e.split("?")[0],n);return e.indexOf("#")>-1?i+"#"+e.split("#")[1]:i},ne=function(e){return"https://"+function(e){return e.replace(ee,"")}(e)},ie=function(e){return function(t,n){if(0===t){if("function"!=typeof e)return n(0,(function(){})),void n(2);var i,r=!1;n(0,(function(e){r||(r=2===e)&&"function"==typeof i&&i()})),r||(i=e((function(e){r||n(1,e)}),(function(e){r||void 0===e||(r=!0,n(2,e))}),(function(){r||(r=!0,n(2))})))}}},re=function(e){return function(t,n){var i,r;0===t&&e(0,(function(e,t){if(0===e)i=t,n(0,o);else if(1===e){var a=t;r&&r(2),a(0,(function(e,t){0===e?(r=t)(1):1===e?n(1,t):2===e&&t?(i&&i(2),n(2,t)):2===e&&(i?(r=void 0,i(1)):n(2))}))}else 2===e&&t?(r&&r(2),n(2,t)):2===e&&(r?i=void 0:n(2))}));function o(e,t){1===e&&(r||i)(1,t),2===e&&(r&&r(2),i&&i(2))}}},oe=function(e,t){return e===t};function ae(e){return void 0===e&&(e=oe),function(t){return function(n,i){if(0===n){var r,o,a=!1;t(0,(function(t,n){0===t&&(o=n),1===t?a&&e(r,n)?o(1):(a=!0,r=n,i(1,n)):i(t,n)}))}}}}var ue=function(e){return function(t){return function(n,i){var r;0===n&&t(0,(function(t,n){0===t?(r=n,i(t,n)):1===t?e(n)?i(t,n):r(1):i(t,n)}))}}},ce=function(e){return function(t){var n;t(0,(function(t,i){0===t&&(n=i),1===t&&e(i),1!==t&&0!==t||n(1)}))}},se=function(e,t,n){return function(i,r){if(0===i){var o=!1,a=function(e){r(1,e)};r(0,(function(i){2===i&&(o=!0,e.removeEventListener(t,a,n))})),o||e.addEventListener(t,a,n)}}};var de=function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return function(e,n){if(0===e)for(var i=t.length,r=Array(i),o=0,a=0,u=function(e){if(0!==e)for(var t=0;i>t;t++)r[t]&&r[t](e)},c=function(e){t[e](0,(function(t,c){0===t?(r[e]=c,1==++o&&n(0,u)):2===t?(r[e]=void 0,++a===i&&n(2)):n(t,c)}))},s=0;i>s;s++)c(s)}};function le(e,t){return ie((function(n){return e.on(t,n),function(){e.off(t,n)}}))}!function(e){var t,n=e.Symbol;"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable"}("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")());var fe=function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];for(var i=t[0],r=1,o=t.length;o>r;r++)i=t[r](i);return i},pe=function(e){return function(t){return function(n,i){var r;0===n&&t(0,(function(t,n){0===t?(r=n,i(0,(function(e,t){0!==e&&r(e,t)})),i(1,e)):i(t,n)}))}}},me=function(e){return function(t){return function(n,i){0===n&&t(0,(function(t,n){i(t,1===t?e(n):n)}))}}};function ve(e){return function(t){return re(me(e)(t))}}var he=function(){};function ge(e,t){0===e&&t(0,he)}function _e(){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 we(e){return function(t,n){if(0===t){var i,r,o,a=0;e(0,(function(e,t){if(0===e&&(o=t),1===e){var u=[r,t];i=u[0],r=u[1],2>++a?o(1):n(1,[i,r])}else n(e,t)}))}}}var ye=function(){},be={};function ke(e){var t,n,i=[],r=!1,o=be;return function(a,u){if(0===a){if(o!==be)return u(0,ye),r&&u(1,n),void u(2,o);i.push(u);var c=function(e,n){if(2!==e)o===be&&t(e,n);else{var r=i.indexOf(u);-1!==r&&i.splice(r,1)}};1!==i.length?(u(0,c),r&&o===be&&u(1,n)):e(0,(function(e,a){if(0===e)return t=a,void u(0,c);1===e&&(r=!0,n=a);var s=i.slice(0);2===e&&(o=a,i=null),s.forEach((function(t){t(e,a)}))}))}}}var Ie=function(e){return function(t){return function(n,i){if(0===n){var r,o=0;t(0,(function(t,n){0===t?(r=n,i(t,n)):1===t&&e>o?(o++,r(1)):i(t,n)}))}}}},Ce=function(e){return void 0===e&&(e={}),function(t){"function"==typeof e&&(e={next:e});var n,i=e.next,r=e.error,o=e.complete;t(0,(function(e,t){0===e&&(n=t),1===e&&i&&i(t),1!==e&&0!==e||n(1),2===e&&!t&&o&&o(),2===e&&t&&r&&r(t)}));return function(){n&&n(2)}}},Ee=function(e){return function(t){return function(n,i){if(0===n){var r,o=0;t(0,(function(t,n){0===t?(r=n,i(0,a)):1===t?e>o&&(o++,i(t,n),o===e&&(i(2),r(2))):i(t,n)}))}function a(t,n){e>o&&r(t,n)}}}},Le={},xe=function(e){return function(t){return function(n,i){if(0===n){var r,o,a=!1,u=Le;t(0,(function(t,n){if(0===t)return r=n,e(0,(function(e,t){if(0!==e)return 1===e?(u=void 0,o(2),r(2),void(a&&i(2))):void(2===e&&(o=null,t&&(u=t,r(2),a&&i(e,t))));(o=t)(1)})),a=!0,i(0,(function(e,t){u===Le&&(2===e&&o&&o(2),r(e,t))})),void(u!==Le&&i(2,u));2===t&&o(2),i(t,n)}))}}}};function Ae(t){return new e((function(e,n){Ce({next:e,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,r,o=!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?(o=!0,r=t,void i(1)):void(2===e&&!t&&o&&(n(1,r),a)||n(e,t))}))}}}(t))}))}var ze=function(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},n.exports),n.exports}((function(e,t){function n(e,t){return e===t}function i(e,t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var i=t.length,r=0;i>r;r++)if(!e(t[r],n[r]))return!1;return!0}function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n,r=null,o=null;return function(){return i(t,r,arguments)||(o=e.apply(null,arguments)),r=arguments,o}}function o(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}function a(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(){for(var t=arguments.length,i=Array(t),a=0;t>a;a++)i[a]=arguments[a];var u=0,c=i.pop(),s=o(i),d=e.apply(void 0,[function(){return u++,c.apply(null,arguments)}].concat(n)),l=r((function(){for(var e=[],t=s.length,n=0;t>n;n++)e.push(s[n].apply(null,arguments));return d.apply(null,e)}));return l.resultFunc=c,l.recomputations=function(){return u},l.resetRecomputations=function(){return u=0},l}}t.__esModule=!0,t.defaultMemoize=r,t.createSelectorCreator=a,t.createStructuredSelector=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u;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 u=t.createSelector=a(r)})),Te=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Oe=function(){function e(){Te(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(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.cacheSize;if(Te(this,e),void 0===n)throw Error("Missing the required property `cacheSize`.");if(!Number.isInteger(n)||0>=n)throw Error("The `cacheSize` property must be a positive integer value.");this._cache={},this._cacheOrdering=[],this._cacheSize=n}e.prototype.set=function(e,t){(this._cache[e]=t,this._cacheOrdering.push(e),this._cacheOrdering.length>this._cacheSize)&&this.remove(this._cacheOrdering[0])},e.prototype.get=function(e){return this._cache[e]},e.prototype.remove=function(e){var t=this._cacheOrdering.indexOf(e);t>-1&&this._cacheOrdering.splice(t,1),delete this._cache[e]},e.prototype.clear=function(){this._cache={},this._cacheOrdering=[]}})(),function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.cacheSize;if(Te(this,e),void 0===n)throw Error("Missing the required property `cacheSize`.");if(!Number.isInteger(n)||0>=n)throw Error("The `cacheSize` property must be a positive integer value.");this._cache={},this._cacheOrdering=[],this._cacheSize=n}e.prototype.set=function(e,t){(this._cache[e]=t,this._registerCacheHit(e),this._cacheOrdering.length>this._cacheSize)&&this.remove(this._cacheOrdering[0])},e.prototype.get=function(e){return this._registerCacheHit(e),this._cache[e]},e.prototype.remove=function(e){this._deleteCacheHit(e),delete this._cache[e]},e.prototype.clear=function(){this._cache={},this._cacheOrdering=[]},e.prototype._registerCacheHit=function(e){this._deleteCacheHit(e),this._cacheOrdering.push(e)},e.prototype._deleteCacheHit=function(e){var t=this._cacheOrdering.indexOf(e);t>-1&&this._cacheOrdering.splice(t,1)}}();function Pe(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];var i=Oe;return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=void 0,o=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.'),r=new i,o=n):(r=n.cacheObject||new i,o=n.selectorCreator||ze.createSelector);var a=function(){var n=e.apply(void 0,arguments);if("string"==typeof n||"number"==typeof n){var i=r.get(n);return void 0===i&&(i=o.apply(void 0,t),r.set(n,i)),i.apply(void 0,arguments)}};return a.getMatchingSelector=function(){var t=e.apply(void 0,arguments);return r.get(t)},a.removeMatchingSelector=function(){var t=e.apply(void 0,arguments);r.remove(t)},a.clearCache=function(){r.clear()},a.resultFunc=t[t.length-1],a}}var Se=function(e,t){return t},Me=function(e,t){return function(e){return e.entities.chats.byIds}(e)[t]},je=Pe([function(e,t){return Me(e,t).events.orderedIds},function(e,t){return Me(e,t).events.byIds}],(function(e,t){return e.map((function(e){return t[e]}))}))(Se),Ne=Pe([Me,je],(function(e,t){return z({},e,{events:t})}))(Se),De=function(e){return e.entities.users.byIds},qe=function(e){return De(e)[function(e){return e.session.id}(e)]},Fe=function(e,t){return De(e)[t]},We=function(e){return qe(e).id},He=(Pe([je,We],(function(e,t){return f((function(e){return e.delivered&&e.author===t}),e)}))(Se),Pe([je,We],(function(e,t){return f((function(e){return e.seen&&e.author===t}),e)}))(Se),{boosters:!0,form:!0,system_message:!0});ze.createSelector([je,function(e){return qe(e).id}],(function(e,t){return function(e,t,n){for(var i=t;i>=0;i--)if(e(n[i]))return i;return-1}((function(e){return e.author===t&&"message"===e.type&&!(e.properties&&"file"===e.properties.serverType)||!0===e.seen&&!He[e.type]&&!!e.serverId}),(n=e).length-1,n);var n})),Pe([function(e,t){return Me(e,t).participants},De],(function(e,t){return e.map((function(e){return t[e]}))}))(Se);function Be(e,t){return void 0===t?e.application:e.application[t]}function Re(e,t){if(null==e)return{};var n,i,r={},o=Object.keys(e);for(i=0;o.length>i;i++)0>t.indexOf(n=o[i])&&(r[n]=e[n]);return r}var Ve="application/x-postmate-v1+json",Ge=0,Ue={handshake:1,"handshake-reply":1,call:1,emit:1,reply:1,request:1},Ye=function(e,t){return("string"!=typeof t||e.origin===t)&&(!!e.data&&("object"==typeof e.data&&("postmate"in e.data&&(e.data.type===Ve&&!!Ue[e.data.postmate]))))},Je=function(){function e(e){var t=this;this.parent=e.parent,this.frame=e.frame,this.child=e.child,this.childOrigin=e.childOrigin,this.events={},this.listener=function(e){if(!Ye(e,t.childOrigin))return!1;var n=((e||{}).data||{}).value||{},i=n.name;"emit"===e.data.postmate&&i in t.events&&t.events[i].call(t,n.data)},this.parent.addEventListener("message",this.listener,!1)}var t=e.prototype;return t.get=function(e){var t=this;return new $e.Promise((function(n){var i=++Ge;t.parent.addEventListener("message",(function e(r){r.data.uid===i&&"reply"===r.data.postmate&&(t.parent.removeEventListener("message",e,!1),n(r.data.value))}),!1),t.child.postMessage({postmate:"request",type:Ve,property:e,uid:i},t.childOrigin)}))},t.call=function(e,t){this.child.postMessage({postmate:"call",type:Ve,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}(),Xe=function(){function e(e){var t=this;this.model=e.model,this.parent=e.parent,this.parentOrigin=e.parentOrigin,this.child=e.child,this.child.addEventListener("message",(function(e){if(Ye(e,t.parentOrigin)){var n=e.data,i=n.property,r=n.uid,o=n.data;"call"!==e.data.postmate?function(e,t){var n="function"==typeof e[t]?e[t]():e[t];return $e.Promise.resolve(n)}(t.model,i).then((function(t){return e.source.postMessage({property:i,postmate:"reply",type:Ve,uid:r,value:t},e.origin)})):i in t.model&&"function"==typeof t.model[i]&&t.model[i].call(t,o)}}))}return e.prototype.emit=function(e,t){this.parent.postMessage({postmate:"emit",type:Ve,value:{name:e,data:t}},this.parentOrigin)},e}(),$e=function(){function e(e){var t=e.container,n=void 0===t?void 0!==n?n:document.body:t,i=e.model,r=e.url,o=e.iframeAllowedProperties;return this.parent=window,this.frame=document.createElement("iframe"),o&&(this.frame.allow=o),n.appendChild(this.frame),this.child=this.frame.contentWindow||this.frame.contentDocument.parentWindow,this.model=i||{},this.sendHandshake(r)}return e.prototype.sendHandshake=function(t){var n,i=this,r=function(e){var t=document.createElement("a");t.href=e;var n=t.protocol.length>4?t.protocol:window.location.protocol,i=t.host.length?"80"===t.port||"443"===t.port?t.hostname:t.host:window.location.host;return t.origin||n+"//"+i}(t),o=0;return new e.Promise((function(e,a){i.parent.addEventListener("message",(function t(o){return!!Ye(o,r)&&("handshake-reply"===o.data.postmate?(clearInterval(n),i.parent.removeEventListener("message",t,!1),i.childOrigin=o.origin,e(new Je(i))):a("Failed handshake"))}),!1);var u=function(){o++,i.child.postMessage({postmate:"handshake",type:Ve,model:i.model},r),5===o&&clearInterval(n)},c=function(){u(),n=setInterval(u,500)};i.frame.attachEvent?i.frame.attachEvent("onload",c):i.frame.addEventListener("load",c),i.frame.src=t}))},e}();$e.debug=!1,$e.Promise=function(){try{return window?window.Promise:e}catch(e){return null}}(),$e.Model=function(){function e(e){return this.child=window,this.model=e,this.parent=this.child.parent,this.sendHandshakeReply()}return e.prototype.sendHandshakeReply=function(){var e=this;return new $e.Promise((function(t,n){e.child.addEventListener("message",(function i(r){if(r.data.postmate){if("handshake"===r.data.postmate){e.child.removeEventListener("message",i,!1),r.source.postMessage({postmate:"handshake-reply",type:Ve},r.origin),e.parentOrigin=r.origin;var o=r.data.model;return o&&Object.keys(o).forEach((function(t){e.model[t]=o[t]})),t(new Xe(e))}return n("Handshake Reply Failed")}}),!1)}))},e}();var Ke=function(){var e,t={all:e=e||new Map,on:function(t,n){var i=e.get(t);i?i.push(n):e.set(t,[n])},off:function(t,n){var i=e.get(t);i&&(n?i.splice(i.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var i=e.get(t);i&&i.slice().map((function(e){e(n)})),(i=e.get("*"))&&i.slice().map((function(e){e(t,n)}))}},n=t.all,i=Re(t,["all"]);return z({},i,{off:function(e,t){e?i.off(e,t):n.clear()},once:function(e,t){i.on(e,(function n(r,o){i.off(e,n),t(r,o)}))}})};$e.Promise=e;var Qe=function(t){var n=t.methods,i=Re(t,["methods"]);return new $e(i).then((function(t){var i=t.on,o=t.call,a=function(){for(var e=arguments.length,n=Array(e),i=0;e>i;i++)n[i]=arguments[i];return o.apply(t,n)},u=Ke(),c={},s={};return n.resolveRemoteCall=function(e){var t=e.id,n=e.value,i=s[t];delete s[t],i(n)},t.on=function(e,n){u.on(e,n),c[e]||(c[e]=!0,function(){for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];i.apply(t,n)}(e,(function(t){u.emit(e,t)})))},t.off=u.off,t.on("remote-call",(function(e){var i=e.id,r=e.method,o="function"==typeof n[r]?n[r].apply(t,e.args):void 0;o&&"function"==typeof o.then?o.then((function(e){a("resolveRemoteCall",{id:i,value:e})})):a("resolveRemoteCall",{id:i,value:o})})),t.emit=function(e,t){a("emitEvent",{event:e,data:t})},t._emit=u.emit,t.call=function(t){for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;n>r;r++)i[r-1]=arguments[r];return new e((function(e){var n=h(s);s[n]=e,a("remoteCall",{id:n,method:t,args:i})}))},r(t,n)}))};function Ze(e,t){return null!=t&&null!=e&&"object"==typeof t&&"object"==typeof e?et(t,e):e}function et(e,t){var n;if(Array.isArray(e)){n=e.slice(0,t.length);for(var r=0;t.length>r;r++)void 0!==t[r]&&(n[r]=Ze(t[r],n[r]))}else for(var o in n=z({},e),t)i(o,t)&&(void 0===t[o]?delete n[o]:n[o]=Ze(t[o],n[o]));return n}var tt=function(t){return new e((function(e){t.on("state",(function n(i){t.off("state",n),t.state=i,e(i)})),t.on("state_diff",(function(e){t.state=et(t.state,e)})),t.on("store_event",(function(e){t._emit(e[0],e[1])})),t.call("startStateSync")}))},nt="chat-widget",it="chat-widget-minimized",rt="LiveChat chat widget",ot="OpenWidget widget",at={opacity:0,visibility:"hidden",zIndex:-1},ut={opacity:1,visibility:"visible",zIndex:2147483639},ct={id:nt+"-container",style:z({},at,{position:"fixed",bottom:0,width:0,height:0,maxWidth:"100%",maxHeight:"100%",minHeight:0,minWidth:0,backgroundColor:"transparent",border:0,overflow:"hidden"})},st=(z({},ct.style),{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"}}),dt={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)"}},lt={id:"livechat-eye-catcher-img",style:{display:"block",overflow:"hidden",cursor:"pointer"}},ft={alt:"",style:{display:"block",border:0,float:"right"}},pt={position:"absolute",top:"0px",left:"0px",bottom:"0px",right:"0px"},mt={allowtransparency:!0,id:nt,name:nt,title:rt,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":"normal"}},vt=z({},mt,{id:it,name:it}),ht=e.resolve(),gt=function(e){ht.then(e)},_t=function(e){return gt((function(){throw e}))},wt=function(e){return function(t){var n=window.LC_API||{};if("function"==typeof t&&t(n),"function"==typeof n[e])try{n[e]()}catch(e){_t(e)}}},yt=function(e,t){if(!e)return!0;var n=function(e){var t=e.match(V);return t&&t[1]}(t);return!!n&&[].concat(e,["livechatinc.com","lc.chat"]).some((function(e){var t=n.length-e.length;return-1!==n.indexOf(e,t)&&(n.length===e.length||"."===n.charAt(t-1))}))},bt=[],kt=function(e){30>bt.length||(bt=bt.slice(1));for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;t>i;i++)n[i-1]=arguments[i];bt.push({name:e,args:n})},It="always visible",Ct="always hide",Et="hide until it gets activated";function Lt(e,t,n){return function(i){var r,o=(void 0===i?{}:i).prettyPrint,a=void 0===o||o,c=t.analytics.googleAnalytics.trackerName,s=!yt(n.allowedDomains,document.location.href),d=[["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((function(e){return e[1]})).map((function(e){return e[0]})),l=u(mt.style).some((function(t){return e.frame.style.getPropertyValue(t)!==mt.style[t]})),f=function(e){var t="";return{desktopVisibility:t=e.initiallyHidden?e.disabledMinimized?Ct:Et:It,mobileVisibility:e.hasCustomMobileSettings?e.hiddenOnMobile?Ct:e.initiallyHiddenOnMobile?e.disabledMinimizedOnMobile?Ct:Et:It:t}}(n.__unsafeProperties.group),p=f.desktopVisibility,m=f.mobileVisibility,v=[{msg:"language: "+n.__unsafeProperties.group.language},{msg:"region: "+n.region},{msg:"license number: "+window.__lc.license},{msg:"group id: "+e.state.application.group},{msg:"hidden: "+(e.state.application.hidden?"yes":"no")},{msg:"tracker name: "+c},{msg:"desktop visibility: "+p,isNotStandard:p!==It},{msg:"mobile visibility: "+m,isNotStandard:m!==It},{msg:"chat between groups: "+(window.__lc.chat_between_groups?"yes":"no")},{msg:"is iframe inline style modified: "+(l?"yes":"no"),isNotStandard:l},{msg:"is current domain not allowed by the allowed domains: "+(s?"yes":"no"),isNotStandard:s},{msg:"overrides: "+(d.length>0?d.join(",\n"):"none"),isNotStandard:d.length>0},{msg:"call history: "+(bt.length>0?bt.map((function(e){return e.name+"("+e.args.join(", ")+")"})).join(",\n"):"none"),isNotStandard:bt.length>0}];if(!a)return v;var h=v.filter((function(e){return e.isNotStandard})),g=v.filter((function(e){return!e.isNotStandard})),_=[].concat(h,g);return-1!==d.indexOf("console.log")?_.map((function(e){return e.msg})).join("\n\n"):((r=console).log.apply(r,[_.map((function(e){return"%c"+e.msg})).join("\n\n")].concat(_.map((function(e){return e.isNotStandard?"color: red;":""})))),"")}}function xt(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(){"function"==typeof e&&e.apply(void 0,n)}}function At(e,t,n){return fe(le(e,n),ce((function(e){return gt(xt(t[n],e))})))}function zt(e){return E(e.filter(Boolean).map((function(e){var t;return(t={})[e.name]=e.value+"",t})))}function Tt(e,t){var n,r=l((function(e){return!e[1]}),M((n=t,["name","email"].reduce((function(e,t){return i(t,n)&&(e[t]=n[t]),e}),{}))));if(r){var o=r[1];console.error("[LiveChatWidget] Customer "+r[0]+" cannot be set to "+(""===o?"empty string":o))}else e.call("storeMethod",["requestUpdateUser",We(e.state),t])}function Ot(e,t){e.call("storeMethod",["requestSetUserProperties",We(e.state),t])}function Pt(e){return null!=e?e+"":null}var St=function(e,t){return Be(e,"visibility").state===t};function Mt(e,t){return re((n=function(){return fe(le(e,"state_diff"),me((function(){return e.state})),pe(e.state),me(t),ae(O),xe(le(e,"unbind")))},function(e,t){if(0===e){var i=!1;t(0,(function(e){2===e&&(i=!0)})),t(1,n()),i||t(2)}}));var n}var jt=function(e,t){return fe(Mt(e,t),Ie(1))};function Nt(e){return fe(Mt(e,(function(e){return Be(e,"availability")})),ue(b))}var Dt="liveChatChatId";function qt(e){return fe(Mt(e,(function(e){return Ne(e,Dt).active})),Ie(1),ve((function(t){return t?fe(Mt(e,(function(e){return Ne(e,Dt).properties.currentAgent})),ue(Boolean),me((function(){return t})),Ee(1)):_e(t)})))}function Ft(e,t){return fe(le(e,"state_diff"),me((function(){return Be(e.state,"readyState")})),ue((function(e){return e===t})),Ee(1),ke)}var Wt="not_ready",Ht="ready",Bt="bootstrapped",Rt=Object.freeze({__proto__:null,FRA_A:"fra-a",FRA_B:"fra-b",FRA:"fra",DAL:"dal"});function Vt(e,t){return fe(Ft(e,Ht),ve(t))}function Gt(e,t){return fe(Ft(e,Bt),ve(t))}function Ut(e,t){return fe(Mt(e,(function(e){return Be(e,"invitation")})),me((function(e){return e[t]})),ue(b),we,ue((function(e){return e[1].length>e[0].length})),me((function(e){return k(e[1])})))}var Yt=function(e){return e.actingAsDirectLink||e.isInCustomContainer},Jt="liveChatChatId",Xt=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 gt(xt.apply(void 0,[e].concat(n)))};function $t(e,t,n){window.LC_API=window.LC_API||{};var i=window.LC_API;fe(function(e){return fe(Mt(e,(function(e){return St(e,"maximized")})),ue(b))}(e),ce((function(){return Xt(i.on_chat_window_opened)}))),fe(Gt(e,(function(){return function(e){return fe(Mt(e,(function(e){return St(e,"minimized")})),Ie(1),ue(b))}(e)})),ce((function(){return Xt(i.on_chat_window_minimized)}))),fe(function(e){return fe(Mt(e,(function(e){return St(e,"hidden")})),ue(b))}(e),ce((function(){return Xt(i.on_chat_window_hidden)}))),fe(Nt(e),ce((function(e){return Xt(i.on_chat_state_changed,{state:"online"===e?"online_for_chat":"offline"})}))),fe(Gt(e,(function(){return qt(e)})),ue(b),ce((function(){return Xt(i.on_chat_started,{agent_name:Fe(e.state,Ne(e.state,Jt).properties.currentAgent).name})}))),fe(Gt(e,(function(){return qt(e)})),ue(y),ce((function(){return Xt(i.on_chat_ended)}))),fe(Gt(e,(function(){return le(e,"on_message")})),ce((function(e){return Xt(i.on_message,e)}))),fe(le(e,"widget_resize"),ce((function(e){return Xt(i.on_widget_resize,e.size)}))),fe(function(e){return fe(le(e,"add_event"),ue((function(e){return e.event.properties.invitation})),me((function(t){var n=t.event;return{event:n,author:Fe(e.state,n.author)}})))}(e),ce((function(e){var t=e.author,n=e.event,r=n.properties;Xt(i.on_message,{text:r.text,timestamp:n.timestamp,invitation:!0,user_type:"agent",agent_login:t.id,agent_name:t.name,received_first_time:r.receivedFirstTime})}))),At(e,i,"on_postchat_survey_submitted"),At(e,i,"on_prechat_survey_submitted"),At(e,i,"on_rating_comment_submitted"),At(e,i,"on_rating_submitted"),At(e,i,"on_ticket_created"),i.set_custom_variables=function(t){kt("LC_API.set_custom_variables",t),Ot(e,zt(t))},i.update_custom_variables=function(t){kt("LC_API.update_custom_variables",t),Tt(e,{properties:zt(t)})},i.set_visitor_name=function(t){kt("LC_API.set_visitor_name",t),Tt(e,{name:Pt(t)})},i.set_visitor_email=function(t){kt("LC_API.set_visitor_email",t),Tt(e,{email:Pt(t)})},i.open_chat_window=i.show_full_view=i.open_mobile_window=function(){kt("LC_API.open_chat_window"),e.maximize()},i.minimize_chat_window=function(){kt("LC_API.minimize_chat_window"),Yt(t)||e.minimize()},i.hide_eye_catcher=function(){kt("LC_API.hide_eye_catcher"),e.call("hideEyeCatcher")},i.hide_chat_window=function(){kt("LC_API.hide_chat_window"),Yt(t)||e.hide()},i.agents_are_available=function(){return kt("LC_API.agents_are_available"),"online"===Be(e.state,"availability")},i.chat_window_maximized=function(){return kt("LC_API.chat_window_maximized"),St(e.state,"maximized")},i.chat_window_minimized=function(){return kt("LC_API.chat_window_minimized"),St(e.state,"minimized")},i.chat_window_hidden=function(){return kt("LC_API.chat_window_hidden"),St(e.state,"hidden")},i.visitor_queued=function(){return kt("LC_API.visitor_queued"),Ne(e.state,Jt).properties.queued},i.chat_running=function(){return kt("LC_API.chat_running"),Ne(e.state,Jt).active},i.visitor_engaged=function(){return kt("LC_API.visitor_engaged"),i.visitor_queued()||i.chat_running()||!!Ne(e.state,Jt).properties.fakeAgentMessageId},i.get_window_type=function(){return kt("LC_API.get_window_type"),"embedded"},i.close_chat=function(){kt("LC_API.close_chat"),e.call("storeMethod",["requestUpdateChat",Jt,{active:!1}])},i.diagnose=Lt(e,t,n),i.get_last_visit_timestamp=function(){return Be(e.state).clientLastVisitTimestamp},i.get_visits_number=function(){return Be(e.state).clientVisitNumber},i.get_page_views_number=function(){return Be(e.state).clientPageViewsCount},i.get_chats_number=function(){return Be(e.state).clientChatNumber},i.get_visitor_id=function(){return qe(e.state).serverId},i.get_chat_id=function(){return Ne(e.state,Jt).serverId},i.trigger_sales_tracker=function(e,t){var n=o(t)?t:[];"string"==typeof e&&""!==e&&i.set_custom_variables([].concat(n,[{name:"__sales_tracker_"+e,value:"1"}]))},i.scriptTagVersion=function(){return"LiveChatWidget"in window?window.LiveChatWidget._v:"1.0"},["on","off","call","get"].forEach((function(e){i[e]=function(){var 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=x}var Kt={handler:null,setHandler:function(e){this.handler=e},navigate:function(e){var t=this;gt((function(){window.location.origin===U(e)&&"function"==typeof t.handler?t.handler(Q(e)):window.open(e,"_blank")}))}},Qt="liveChatChatId",Zt=function(e){var t,n=e.trackerId,i=e.orderId,r=e.orderPrice;return w(Re(e,["trackerId","orderId","orderPrice"]))||console.warn("When using trigger_sales_tracker, you can only pass 'trackerId', 'orderId' and 'orderPrice' as keys"),c(String,d(((t={})["__sales_tracker_"+n]="1",t.__order_id=i,t.__order_price=r,t)))},en=function(e){var t=e.id;return z({uniqueId:e.uniqueId},t&&{id:t})},tn=function(e,t){return g(null,"properties",f((function(e){return e.properties.uniqueId===t}),je(e.state,Qt)))},nn=function(e){return t=function(e){if("call"!==e[0])return"other";switch(e[1][0]){case"set_customer_email":return"email";case"set_customer_name":return"name";case"set_session_variables":case"trigger_sales_tracker":case"update_session_variables":return"fields";case"destroy":case"hide":case"maximize":case"minimize":return"visibility"}},Object.keys(n=e).reduce((function(e,i){var r=n[i],o=t(r);return e[o]=e[o]||[],e[o].push(r),e}),{});var t,n};function rn(e,t,n){var i,r=Ke(),o=window.LiveChatWidget||window.OpenWidget,a=function(e,t){var n;return(n={get:g,call:w,on:m,once:v,off:r.off})[e].apply(n,t)},u=function(e,t){return gt((function(){return r.emit(e,t)}))},d=function(e){void 0===e&&(e=[]);var t=k(e);if(t){var n=t[1];w(n[0],n[1])}},f=nn(o._q);function p(t,n,i){switch(n){case"new_event":case"form_submitted":case"greeting_hidden":case"rating_submitted":case"visibility_changed":case"greeting_displayed":case"availability_changed":case"customer_status_changed":case"rich_message_button_clicked":return void r[t](n,i);case"ready":return void(Be(e.state,"readyState")!==Wt?gt((function(){return i({state:h("state"),customerData:h("customer_data")})})):r[t](n,i));default:return void console.error('[LiveChatWidget] callback "'+n+'" does not exist.')}}function m(e,t){kt("LiveChatWidget.on","'"+e+"'",t),p("on",e,t)}function v(e,t){kt("LiveChatWidget.once","'"+e+"'",t),p("once",e,t)}function h(t){switch(t){case"state":var n=Be(e.state);return{availability:n.availability,visibility:n.visibility.state};case"chat_data":var i=Ne(e.state,Qt),r=i.properties;return{chatId:i.serverId||null,threadId:(i.active||r.ended)&&r.lastThread||null};case"customer_data":var o=qe(e.state),a=o.serverId,u=o.name,c=o.email,d=o.properties,f=Be(e.state).isReturning,p=Ne(e.state,Qt),m=p.active,v=p.properties,h=v.queued,g=v.fakeAgentMessageId,_=l((function(e){return e.id===g}),p.events);return{name:u,email:c,isReturning:f,sessionVariables:d,id:a,status:h?"queued":m?"chatting":_&&_.properties.invitation?"invited":"browsing"};case"features":return s(Be(e.state).config.features);default:return void console.error('[LiveChatWidget] property "'+t+'" not exists.')}}function g(e){return kt("LiveChatWidget.get","'"+e+"'"),h(e)}function w(n,i){switch(kt.apply(void 0,["LiveChatWidget.call","'"+n+"'"].concat(i)),n){case"hide":case"maximize":case"minimize":if(Yt(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 Ot(e,c(String,i));case"set_customer_name":return void Tt(e,{name:Pt(i)});case"set_customer_email":return void Tt(e,{email:Pt(i)});case"update_session_variables":return void Tt(e,{properties:c(String,i)});case"trigger_sales_tracker":return void Ot(e,Zt(i));case"hide_greeting":return void e.call("hideGreeting");case"set_navigation_handler":return void Kt.setHandler(i);default:return void console.error('[LiveChatWidget] method "'+n+'" not exists.')}}void 0===(i=f.other)&&(i=[]),i.forEach((function(e){a(e[0],e[1])})),d(f.visibility),d(f.name),d(f.email),function(e){var t,n=(void 0===(t=e)&&(t=[]),t.reduce((function(e,t){var n=t[1],i=n[1];switch(n[0]){case"set_session_variables":return e.mode="set",e.properties=i,e;case"trigger_sales_tracker":return e.mode="set",e.properties=Zt(i),e;case"update_session_variables":return"none"===e.mode&&(e.mode="update"),e.properties=z({},e.properties,i),e}}),{mode:"none"})),i=n.mode;"none"!==i&&w(i+"_session_variables",n.properties)}(f.fields),o._q=[],o._h=a,o.scriptTagVersion=function(){return o._v},o.diagnose=Lt(e,t,n),fe(Ft(e,Bt),ce((function(){var e;e=function(e){return"function"==typeof e&>((function(){return e(o)}))},Array.isArray(window.__lc_onready)&&(window.__lc_onready.forEach(e),window.__lc_onready={push:e}),u("ready",{state:h("state"),customerData:h("customer_data")})}))),fe(Gt(e,(function(){return Nt(e)})),ce((function(e){return u("availability_changed",{availability:e})}))),fe(Gt(e,(function(){return jt(e,(function(){return h("state").visibility}))})),ce((function(e){u("visibility_changed",{visibility:e})}))),fe(Gt(e,(function(){return jt(e,(function(){return h("customer_data").status}))})),ce((function(e){return u("customer_status_changed",{status:e})}))),fe(Gt(e,(function(){return Ut(e,"hiddenIds")})),me((function(t){return tn(e,t)})),ue(b),ce((function(e){return u("greeting_hidden",en(e))}))),fe(Gt(e,(function(){return Ut(e,"displayedIds")})),me((function(t){return tn(e,t)})),ue(b),ce((function(e){return u("greeting_displayed",en(e))}))),fe(le(e,"on_rating_submitted"),ce((function(e){return u("rating_submitted",e)}))),fe(de(le(e,"add_event"),le(e,"send_event")),ue((function(e){return _(e.event.type,["message","emoji","rich_message","file"])})),me((function(t){var n=t.event,i=n.timestamp,r=n.properties,o=Fe(e.state,n.author),a=!0===r.invitation;return z({timestamp:i,type:n.type,author:{id:o.serverId,type:o.id===We(e.state)?"customer":"agent"}},a&&{greeting:en(r)})})),ce((function(e){return u("new_event",e)}))),fe(de(fe(le(e,"send_event"),me((function(e){var t=e.event,n=t.type,i=t.properties;if("rich_message_postback"===n)return{postbackId:"postback"in i?i.postback.id:i.id,eventId:i.eventId};if("message"===n&&i.triggeredBy){var r=i.triggeredBy;return{postbackId:r.button.postbackId,eventId:r.event}}return null})),ue(b)),fe(le(e,"rich_greeting_button_clicked"),me((function(e){var t=e.event;return{eventId:t.id,postbackId:e.button.postbackId,greeting:en(t.properties)}})))),ce((function(e){return u("rich_message_button_clicked",e)}))),fe(de(fe(le(e,"on_ticket_created"),me((function(){return"ticket"}))),fe(le(e,"on_prechat_survey_submitted"),me((function(){return"prechat"}))),fe(le(e,"on_postchat_survey_submitted"),me((function(){return"postchat"})))),ce((function(e){return u("form_submitted",{type:e})})))}var on=function(){return window.GoogleAnalyticsObject||"ga"},an=function(e){var t=e.event,n=e.label,i=e.nonInteraction,r=e.trackerName,o=window[on()];o&&"function"==typeof o&&o([r,"send"].filter(Boolean).join("."),{hitType:"event",eventCategory:"LiveChat",eventAction:t,eventLabel:n,nonInteraction:i})},un={ga:an,gaAll:function(e){var t=window[on()];if(t&&"function"==typeof t.getAll){var n=t.getAll();o(n)&&n.forEach((function(t){an(z({},e,{trackerName:t&&"function"==typeof t.get?t.get("name"):null}))}))}},gaq:function(e){var t=window._gaq;t&&"function"==typeof t.push&&t.push(["_trackEvent","LiveChat",e.event,e.label,null,e.nonInteraction])},gtm:function(e){var t=window.dataLayer;t&&"function"==typeof t.push&&t.push({event:"LiveChat",eventCategory:"LiveChat",eventAction:e.event,eventLabel:e.label,nonInteraction:e.nonInteraction})},pageTracker:function(e){var t=window.pageTracker;t&&"function"==typeof t._trackEvent&&t._trackEvent("LiveChat",e.event,e.label,null,e.nonInteraction)},urchinTracker:function(e){var t=window.urchinTracker;t&&"function"==typeof t&&t(e.event)},gtag:function(e){var t=window.gtag;t&&"function"==typeof t&&t("event",e.event,{event_category:"LiveChat",event_label:e.label,non_interaction:e.nonInteraction})}},cn=function(e){var t=e.version,n=e.sendToAll;if(t&&"function"==typeof un[t])return n&&"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(!e.omitGtm&&"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 n?"gaAll":"ga";if("function"==typeof window.ga){var i=!1;if(window.ga((function(e){i="object"==typeof e})),i)return n?"gaAll":"ga"}return null},sn={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"},dn=function(){return window.mixpanel&&"function"==typeof window.mixpanel.track&&"function"==typeof window.mixpanel.register},ln={googleAnalytics:function(e){var t=e.trackerName;return t?un[t]:null},kissmetrics:function(){return null},mixpanel:function(){if(!dn())return null;return function(e){var t=e.event,n=e.eventData,i=e.persistentData;if(dn()){var r=window.mixpanel;i&&(r.register(i),!dn())||t in sn&&r.track(sn[t],n)}}}},fn=function(e,t){var n=t.analytics,i=Object.keys(n).filter((function(e){return n[e].enabled})).map((function(e){var t=n[e],i=ln[e];try{return i(t)}catch(e){return _t(e),null}})).filter(Boolean);if(0!==i.length){var r=function(t,n){var r=void 0===n?{}:n,o=r.group,a=void 0===o?Be(e.state,"group"):o,u=r.nonInteraction,c=void 0!==u&&u,s=r.eventData,d=void 0===s?{}:s,l=r.persistentData,f=void 0===l?null:l,p=r.useDataAsLabel,m=0!==a?"Group ID: "+a:"(no group)",v=void 0!==p&&p?M(d).map((function(e){return e[0]+": "+e[1]})).join(", "):m;i.forEach((function(e){try{e({event:t,nonInteraction:c,label:v,eventData:z({},d,{group:m}),persistentData:f})}catch(e){_t(e)}}))};fe(Mt(e,(function(e){return Be(e,"readyState")})),ue((function(e){return e===Ht})),Ee(1),ve((function(){return qt(e)})),ue(Boolean),ce((function(){var t=qe(e.state);r("Chat",{eventData:{email:t.email,name:t.name},persistentData:{"performed chat":!0}})}))),e.on("add_event",(function(e){var t=e.event.properties;t.invitation&&t.receivedFirstTime&&r("Automated greeting",{nonInteraction:!0})})),e.on("on_chat_booster_launched",(function(e){var t=e.title;r("Chat Booster Launched: "+t,{eventData:{appId:e.id,title:t}})})),e.on("on_prechat_survey_submitted",(function(){r("Pre-chat survey filled in")})),e.on("on_postchat_survey_submitted",(function(){r("Post-chat survey filled in")})),e.on("on_ticket_created",(function(e){r("Ticket form filled in",{eventData:{email:e.visitor_email}})})),e.on("rich_greeting_button_clicked",(function(e){r("Rich greeting button clicked",{eventData:{buttonText:e.button.text,greetingId:e.event.properties.id},useDataAsLabel:!0})})),["prechat","postchat","ticket","offline"].forEach((function(t){var n;fe(de(le(e,"set_default_view"),le(e,"set_current_view")),ue((function(e){return e.viewInfo&&"Chat"===e.viewInfo.view&&e.viewInfo.default===t})),xe(le(e,"unbind")),(n=function(){var n,i,r,o,a={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],u=a[0];return fe(function(){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=t.length;if(0===i)return n(0,(function(){})),void n(2);var r,o=0,a=function(e,t){r(e,t)};!function e(){o!==i?t[o](0,(function(t,i){0===t?(r=i,0===o?n(0,a):r(1)):2===t&&i?n(2,i):2===t?(o++,e()):n(t,i)})):n(2)}()}}}(_e(a[1]),ge),(n=fe(Mt(e,(function(e){return St(e,"maximized")})),ue(Boolean)),o=void 0===(r=(void 0===i?{}:i).size)?100:r,function(e){return function(t,i){var r=[];if(0===t){var a,u,c=!1;e(0,(function(e,t){if(0===e&&(a=t,n(0,(function(e,t){if(0===e)(u=t)(1);else if(1===e){c=!0,u(2);var n=r.slice();r.length=0,n.forEach((function(e){return i(1,e)}))}}))),1===e)return c?void i(1,t):(r.push(t),r.length>o&&r.shift(),void a(1));i(e,t)}))}}}),xe(le(e,u)))},function(e){return function(t,i){if(0===t){var r,o=null,a=function(e,t){if(0!==e)return 1===e?(i(1,t),void o(1)):void(2===e&&(o=null));(o=t)(1)},u=function(e,t){2===e&&null!==o&&o(2,t),r(e,t)};e(0,(function(e,t){if(0===e)return r=t,void i(0,u);if(1!==e){if(2===e){if(i(2,t),null===o)return;o(2,t)}}else{if(null!==o)return;n(t)(0,a)}}))}}}),ce((function(e){r(e)})))}))}},pn=/\.(\w+)$/i,mn=new Audio,vn={mp3:"audio/mpeg",ogg:"audio/ogg"},hn=function(e){var t,n=(t=e.match(pn))?t[1].toLowerCase():"";return n in vn&&""!==mn.canPlayType(vn[n])},gn=function(t){return new e((function(e,n){var i=new Audio(t);i.onloadeddata=function(){e(i)},i.onerror=n}))},_n=function(t){var n,i=t.play();return(n=i)&&"function"==typeof n.then?i:e.resolve()},wn=function(e){return"function"==typeof e.start&&"function"==typeof e.stop},yn=function(e){wn(e)?e.start(0):e.noteOn(0)},bn=function(){var t=new(window.AudioContext||window.webkitAudioContext),n=!0,i=[],r=function(n){return new e((function(e,i){t.decodeAudioData(n,e,i)}))},o=function(n){return{play:function(){var i=t.createBufferSource();return i.connect(t.destination),i.buffer=n,{playback:new e((function(e,n){if(i.onended=function(){return e()},yn(i),"running"!==t.state){var r=Error("Playback failed, AudioContext is in incorrect state '"+t.state+"'");r.name="PlaybackError",n(r)}})),stop:function(){!function(e){wn(e)?e.stop(0):e.noteOff(0)}(i)}}}}};return{preload:function(t){return function(t){return new e((function(e,n){var i=new XMLHttpRequest;i.onload=function(){e(i.response)},i.onerror=n,i.open("GET",t),i.responseType="arraybuffer",i.send()}))}(t).then(r).then(o)},playSound:function(e){var t=e.play();return n&&i.push(t),t.playback},unlock:function(){return new e((function(e){document.addEventListener("click",(function r(){var o,a;document.removeEventListener("click",r,!0),n&&(i.forEach((function(e){e.stop()})),i=[],n=!1),t.resume(),o=t.createBuffer(1,1,22050),(a=t.createBufferSource()).buffer=o,a.connect(t.destination),yn(a),e()}),!0)}))}}},kn=function(){return"function"==typeof window.webkitAudioContext||"function"==typeof window.AudioContext?(t=bn(),{play:function(e){var i=n(e).then(t.playSound);return i.catch(x),i},preload:n=L((function(e){var n=t.preload(e);return n.catch(x),n})),unlock:function(){return t.unlock()}}):function(){var t=L(gn);return{play:function(e){return t(e).then(_n)},preload:t,unlock:function(){return e.resolve()}}}();var t,n},In=function(e){return Object.keys(e).reduce((function(t,n){var i,r=l((function(e){return hn(e)}),o(i=e[n])?i:[i]);return t[n]=r,t}),{})},Cn="new_message",En=function(){var e,t,n,i,r=((e={}).new_message=["https://cdn.livechatinc.com/widget/static/media/new_message.34190d36.ogg","https://cdn.livechatinc.com/widget/static/media/new_message.f3efb3d2.mp3"],t=e,n=kn(),i=In(t),{play:function(e){n.play(i[e]).then(x,x)},preload:function(e){n.preload(i[e]).then(x,x)},unlock:function(){return n.unlock()}});return r.unlock().then((function(){return e=2e3,t=function(e){r.play(e)},n=0,function(){var i=Date.now();e>i-n||(n=Date.now(),t.apply(void 0,arguments))};var e,t,n}))},Ln=function(e,t){return void 0===t&&(t=!1),t&&e.__unsafeProperties.group.hasCustomMobileSettings},xn=function(e,t){var n=e.__unsafeProperties.group;return Ln(e,t)?n.screenPositionOnMobile:n.screenPosition},An=function(e,t){var n=e.__unsafeProperties.group;return Ln(e,t)?{x:n.offsetXOnMobile,y:n.offsetYOnMobile}:{x:n.offsetX,y:n.offsetY}},zn=function(e){return!!e&&/native code/.test(e+"")},Tn=function(){return _(navigator.platform,["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"])&&_("Version/15",navigator.userAgent)},On=function(){return/mobile/gi.test(navigator.userAgent)&&!("MacIntel"===navigator.platform&&_("iPad",navigator.userAgent))},Pn=function(){return _("Chrome",navigator.userAgent)},Sn=function(){return/Firefox/.test(navigator.userAgent)},Mn=function(e,t){var n=function(){t()||j(at,e)},i=function(){t()||j(ut,e)};if("onbeforeprint"in window)window.addEventListener("beforeprint",n),window.addEventListener("afterprint",i);else if(zn(window.matchMedia)){var r=window.matchMedia("print");r&&r.addListener((function(e){e.matches?n():i()}))}},jn=function(e,t,n){var i=t.__unsafeProperties.group.eyeCatcher;if(i.enabled&&!function(e,t){var n=e.__unsafeProperties.group;return Ln(e,t)?n.disabledMinimizedOnMobile:n.disabledMinimized}(t)){var r,o,a=function(e){var t=Be(e);return t.eyeCatcher.hidden||"minimized"!==t.visibility.state||"online"!==t.availability||t.readyState===Wt},u=function(){r&&(W(r),r=null),clearTimeout(o)},c=function(){var r,o=H("div",st),c=xn(t);j(((r={bottom:i.y+"px"})[c]=i.x+"px",r),o);var s,d=H("div",dt);15>i.x&&"right"===c&&j(((s={})[c]=10-i.x+"px",s),d);d.innerHTML="×";var l=H("div",lt),f=z({},ft,{src:i.src,alt:n.embedded_chat_now});i.srcset&&(f.srcset=M(i.srcset).map((function(e){return e[1]+" "+e[0]})).join(", "));var p=H("img",f);return l.appendChild(p),p.addEventListener("load",(function(){j({width:p.width+"px",height:p.height+"px"},p)})),p.addEventListener("error",u),o.appendChild(d),o.appendChild(l),Mn(o,(function(){return a(e.state)})),document.body.appendChild(o),zn(window.matchMedia)&&window.matchMedia("(hover: none)").matches?j({display:"block"},d):(o.addEventListener("mouseover",(function(){j({display:"block"},d)})),o.addEventListener("mouseout",(function(){j({display:"none"},d)}))),o.addEventListener("click",(function(t){t.stopPropagation(),t.preventDefault(),e.maximize()})),d.addEventListener("mouseover",(function(){j({color:"#444"},d)})),d.addEventListener("mouseout",(function(){j({color:"#000"},d)})),d.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),e.call("hideEyeCatcher")})),o};fe(Mt(e,a),Ce({next:function(e){e?u():o=setTimeout((function(){r=c()}),430)},complete:u}))}},Nn=function(e){e.innerHTML=""},Dn=function(e,t){var n=document.querySelectorAll(".livechat_button"),i=_(t.groupId,t.onlineGroupIds||[]);[].forEach.call(n,(function(n){var r=n.getAttribute("data-id"),o=l((function(e){return e.id===r}),t.buttons);if(o){var a=g("#","0.href",n);"image"===o.type?function(e,t){var n=e.text,i=e.url,r=e.src;Nn(t);var o=H("a",{href:i}),a=H("img",{src:r,alt:n,title:n});o.appendChild(a),t.appendChild(o)}({url:a,text:n.textContent,src:i?o.onlineValue:o.offlineValue},n):function(e,t){var n=e.text,i=e.url;Nn(t);var r=H("a",{href:i});r.appendChild(document.createTextNode(n)),t.appendChild(r)}({url:a,text:i?o.onlineValue:o.offlineValue},n),n.children[0].addEventListener("click",(function(t){t.preventDefault(),e.maximize()}))}}))},qn=function(e){return e.replace(/\?+$/,"")},Fn=function(){return{title:document.title,url:qn(document.location+""),referrer:document.referrer}},Wn=function(e){var t;fe((t=2e3,function(e,n){if(0===e){var i=0,r=setInterval((function(){n(1,i++)}),t);n(0,(function(e){2===e&&clearInterval(r)}))}}),me(Fn),ae((function(e,t){return e.url===t.url})),xe(le(e,"unbind")),ce((function(t){e.call("storeMethod",["setApplicationState",{page:t}])})))};var Hn=function(e){fe(Vt(e,(function(){return le(e,"add_event")})),ue((function(e){var t=e.event;return"custom"===t.type&&t.properties.customId&&-1!==t.properties.customId.indexOf("cyber-finger-snapshot-request-")})),ce((function(t){var n,i=t.event.properties.customId.replace("cyber-finger-snapshot-request-","");try{var r=(n=(void 0)[0],JSON.stringify(n));e.call("storeMethod",["emit","send_snapshot",{snapshot:r,requestId:i,screen:{width:window.innerWidth,height:window.innerHeight,scrollY:window.pageYOffset,scrollX:window.pageXOffset}}])}catch(e){}})))},Bn=window.Wix,Rn=function(){return new e((function(e){Bn.getSiteInfo((function(t){var n=t.url,i=t.referrer||t.referer||"";t.baseUrl&&-1===n.indexOf(t.baseUrl)&&(n=t.baseUrl),e({title:t.pageTitle,referrer:i,url:n})}))}))},Vn=function(e){var t,n,i,r;fe((t=function(){return!!document.hasFocus&&document.hasFocus()},n=function(e,n){if(0===e){var i=!1;n(0,(function(e){2===e&&(i=!0)})),n(1,t()),i||n(2)}},i=me((function(){return!0}))(se(window,"focus")),r=me((function(){return!1}))(se(window,"blur")),de(n,i,r)),xe(le(e,"unbind")),ce((function(t){e.emit("focus",t)})))};function Gn(){return e=/^Mac/,null!=window.navigator&&e.test(window.navigator.platform);var e}var Un=function(e){var t=!1;function n(n){t=!0,function(e){return!(e.metaKey||!Gn()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||"Alt-Meta"===e.key)}(n)&&e.call("setInteractionModality","keyboard")}function i(n){e.call("setInteractionModality","pointer"),"mousedown"!==n.type&&"pointerdown"!==n.type||(t=!0)}function r(n){n.target!==window&&n.target!==document&&(t||e.call("setInteractionModality","keyboard"),t=!1)}function o(){t=!1}return document.addEventListener("keydown",n,!0),document.addEventListener("keyup",n,!0),window.addEventListener("focus",r,!0),window.addEventListener("blur",o,!1),"undefined"!=typeof PointerEvent?(document.addEventListener("pointerdown",i,!0),document.addEventListener("pointermove",i,!0),document.addEventListener("pointerup",i,!0)):(document.addEventListener("mousedown",i,!0),document.addEventListener("mousemove",i,!0),document.addEventListener("mouseup",i,!0)),function(){document.removeEventListener("keydown",n,!0),document.removeEventListener("keyup",n,!0),window.removeEventListener("focus",r,!0),window.removeEventListener("blur",o,!1),"undefined"!=typeof PointerEvent?(document.removeEventListener("pointerdown",i,!0),document.removeEventListener("pointermove",i,!0),document.removeEventListener("pointerup",i,!0)):(document.removeEventListener("mousedown",i,!0),document.removeEventListener("mousemove",i,!0),document.removeEventListener("mouseup",i,!0))}};function Yn(e){if("Google Inc."===navigator.vendor&&"Win32"===navigator.platform){var t,n,i,r=e.frame,o=(t=100,n=function(){j(q(["width"],r),r),requestAnimationFrame((function(){j({width:mt.style.width},r)}))},function(){clearTimeout(i);for(var e=arguments.length,r=Array(e),o=0;e>o;o++)r[o]=arguments[o];i=setTimeout.apply(void 0,[n,t].concat(r))});document.addEventListener("scroll",o);e.on("unbind",(function t(){e.off("unbind",t),document.removeEventListener("scroll",o)}))}}var Jn={position:Tn()?"absolute":"fixed",height:Tn()?"calc(100vh - env(safe-area-inset-bottom))":"100%",width:"100%",top:0,right:0,bottom:0,left:0,overflowY:"hidden"},Xn=function(e){var t=document.querySelector('meta[name="viewport"]')||function(){var e=H("meta",{name:"viewport"});return document.getElementsByTagName("head")[0].appendChild(e),e}(),n=null,i=function(){var e,i=t.content,r=(e=document.body,Object.keys(Jn).reduce((function(t,n){return t[n]=e.style[n],t}),{})),o=document.documentElement.scrollTop;return t.content="width=device-width, initial-scale=1.0, maximum-scale=1.0",j(Jn,document.body),function(){n=null,j(r,document.body),t.content=i,document.documentElement.scrollTop=o}};St(e.state,"maximized")&&(n=i()),fe(Mt(e,(function(e){return St(e,"maximized")})),we,Ce({next:function(e){e[1]?n=i():n()},complete:function(){n&&n()}}))},$n=On(),Kn=function(e,t){if(e.iframeAddress)return e.iframeAddress;if(window.__ow)return"https://cdn.livechatinc.com/widget/openwidget.html";var n="https://secure"+((1520===e.licenseId?"-lc":"")+".livechatinc.com");return t.region&&(n=n.replace("secure","secure-"+t.region)),n+"/customer/action/open_chat"},Qn=function(e,t,n){var i=!!e.customContainer;return{page:t,license:e.licenseId,region:n.region,group:n.groupId,requestedGroup:e.requestedGroupId,customer:e.customer,hidden:!(e.actingAsDirectLink||i)&&function(e){var t=e.__unsafeProperties.group;return $n&&t.hasCustomMobileSettings?t.initiallyHiddenOnMobile:t.initiallyHidden}(n),uniqueGroups:e.uniqueGroups,analytics:{googleAnalytics:{enabled:!!n.integrations.analytics,trackerName:cn(e.gaParams)},kissmetrics:{enabled:!!n.integrations.kissmetrics},mixpanel:{enabled:!!n.integrations.mixpanel}},actingAsDirectLink:e.actingAsDirectLink,initMaximized:e.initMaximized,isInCustomContainer:i,clientLimitExceeded:n.clientLimitExceeded,integrationName:e.integrationName,iframeAddress:Kn(e,n)}},Zn=function(){var e="lc_get_time_"+v();window.performance&&"function"==typeof window.performance.mark&&window.performance.mark(e);var t=performance.getEntriesByName(e)[0].startTime;return performance.clearMarks(e),t},ei=function(){if("undefined"==typeof PerformanceObserver)return null;var t=Zn(),n=[],i=new PerformanceObserver((function(e){n.push.apply(n,e.getEntries())}));i.observe({entryTypes:["longtask"]});var r=function(){var e,i=k(n);return i?(e=i,Zn()-e.startTime+e.duration):Zn()-t};return{disconnect:function(){return i.disconnect()},getLongTasks:function(){return[].concat(n)},waitForIdle:function(t){return new e((function(e){!function o(){n.push.apply(n,i.takeRecords());var a=r();t>a?setTimeout(o,Math.ceil(t-a)):e()}()}))}}},ti=function(t){void 0===t&&(t="first-contentful-paint");var n,i=ei();return i?(n=t,new e((function(e){var t=performance.getEntriesByName(n);if(w(t))if("undefined"!=typeof PerformanceObserver){var i=setTimeout((function(){r.disconnect(),e(null)}),6e4),r=new PerformanceObserver((function(t){var o=l((function(e){return e.name===n}),t.getEntries());o&&(r.disconnect(),clearTimeout(i),e(o))}));r.observe({entryTypes:["paint"]})}else e(null);else e(t[0])}))).then((function(e){return e?i.waitForIdle(5e3).then((function(){return i.disconnect(),i.getLongTasks()})):null})):e.resolve(null)},ni=function(e){var t=performance.getEntriesByName(e);return 1!==t.length?null:t[0]},ii=function(e,t){return e&&t?Math.abs(t.startTime-e.startTime):null},ri=function(e){if(!e)return null;var t=performance.getEntriesByType("navigation");return e.startTime-(w(t)?performance.timing.domContentLoadedEventStart-performance.timing.navigationStart:t[0].domContentLoadedEventStart)},oi=function(){if(!Math.floor(1e3*Math.random())){var e=ti().then((function(e){return e?P(e.filter((function(e){return _(".livechatinc.com",e.attribution[0].containerSrc)})).map((function(e){return e.duration}))):null}));return{getLogs:function(){return e.then((function(e){var t,n=1!==(t=performance.getEntriesByType("resource").filter((function(e){return/livechatinc\.com\/(.+\/)?tracking.js/.test(e.name)}))).length?null:t[0],i=ni("lc_bridge_init"),r=ni("lc_bridge_ready");return c((function(e){return e&&Number(e.toFixed(2))}),{timeFromTrackingStart:ii(n,r),timeFromBridgeInit:ii(i,r),timeFromDomContentLoaded:ri(r),totalBlockingTimeContributedToOurScript:e})}))}}}};function ai(t,n){return n=n||{},new e((function(i,r){var o=new XMLHttpRequest,a=[],u=[],c={},s=function t(){return{ok:2==(o.status/100|0),statusText:o.statusText,status:o.status,url:o.responseURL,text:function(){return e.resolve(o.responseText)},json:function(){return e.resolve(o.responseText).then(JSON.parse)},blob:function(){return e.resolve(new Blob([o.response]))},clone:t,headers:{keys:function(){return a},entries:function(){return u},get:function(e){return c[e.toLowerCase()]},has:function(e){return e.toLowerCase()in c}}}};for(var d in o.open(n.method||"get",t,!0),o.onload=function(){o.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,n){a.push(t=t.toLowerCase()),u.push([t,n]),c[t]=c[t]?c[t]+","+n:n})),i(s())},o.onerror=r,o.withCredentials="include"==n.credentials,n.headers)o.setRequestHeader(d,n.headers[d]);o.send(n.body||null)}))}var ui={};function ci(t,n){var i=void 0===n?{}:n,r=i.query,o=void 0===r?{}:r,a=i.jsonpParam,u=void 0===a?"jsonp":a,c=i.callbackName;return new e((function(e,n){F().then((function(i){var r,a=document.createElement("script"),s=c||h(ui);ui[s]=!0;var d="__"+s;window[d]=function(t){delete ui[s],delete window[d],W(a),e(t)},a.src=t+"?"+B(z({},o,((r={})[u]=d,r))),a.addEventListener("error",(function(){setTimeout((function(){return n(Error("JSONP request failed."))}),100)})),i.appendChild(a)}))}))}var si,di="__test_storage_support__",li="@@test",fi=function(e){void 0===e&&(e="local");try{var t="session"===e?window.sessionStorage:window.localStorage;return t.setItem(di,li),t.getItem(di)!==li?!1:(t.removeItem(di),!0)}catch(e){return!1}},pi=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)}}}(),mi=(fi()&&window,Object.freeze({success:!0}),(si={}).CONNECTION_LOST="Connection lost.",si.MISDIRECTED_CONNECTION="Connected to wrong region.",function(e){return e.map((function(e){switch(e.type){case"group_chooser":return z({},e,{options:e.options.map((function(e){var t=e.group_id;return z({},Re(e,["group_id"]),{groupId:t})}))});case"rating":var t=e.comment_label;return z({},Re(e,["comment_label"]),{commentLabel:t});default:return e}}))}),vi=function(e){var t,n;return{id:e.id,fields:!("id"in e.fields[0])?(t=e.fields,n=t.map((function(e,t){return z({},e,{id:t+""})})),mi(n)):mi(e.fields)}},hi=/\.([a-z]{1,})$/i,gi=function(e){var t=e.__priv,n={enabled:!0,x:parseInt(t.group["embedded_chat.eye_grabber.x"])+15,y:parseInt(t.group["embedded_chat.eye_grabber.y"]),src:ne(t.group["embedded_chat.eye_grabber.path"])};if(-1!==n.src.indexOf("/default/eyeCatchers/")){var i=n.src.match(hi)[1];n.srcset={"1x":n.src,"2x":n.src.replace(RegExp("\\."+i,"i"),"-2x."+i)}}return n},_i=function(e,t){var n,i,r="get_dynamic_configuration"===e?"v3.6":"v3.4";return"https://api"+((i=(n=t).region)&&"dal"!==i?"-"+i:"")+function(e){return 1520===e?".staging":""}(n.licenseId)+".livechatinc.com/"+r+"/customer/action/"+e},wi=function e(t,n){var i=(void 0===n?{}:n).validateDefaultWidget,r=void 0===i||i;return ci(_i("get_dynamic_configuration",t),{query:z({license_id:t.licenseId,client_id:null!="c5e4f61e1a6c3b1521b541bc5c5a2ac5"?"c5e4f61e1a6c3b1521b541bc5c5a2ac5":"",url:te(t.url,["cw_configurator"])},"number"==typeof t.groupId&&{group_id:t.groupId},t.channelType&&{channel_type:t.channelType},t.skipCodeInstallationTracking&&{test:1})}).then((function(n){if(n.error)switch(n.error.type){case"misdirected_request":return e(z({},t,{region:n.error.data.region}));default:var i=Error(n.error.message);throw i.code=n.error.type.toUpperCase(),i}if(r&&"livechat"!==n.default_widget){var o=Error("The 'default_widget' is not 'livechat', but instead: '"+n.default_widget+"'");throw o.code="DEFAULT_WIDGET_NOT_LIVECHAT",o.organizationId=n.organization_id,o.defaultWidget=n.default_widget,o}if(!n.livechat_active){if("direct_link"===t.channelType){var a=B({utm_source:"expired_chat_link",utm_medium:"referral",utm_campaign:"lc_"+t.licenseId});window.location.replace("https://www.livechat.com/powered-by-livechat/?"+a)}var u=Error("License expired");throw u.code="LICENSE_EXPIRED",u}if(!n.livechat.domain_allowed){var c=Error("Current domain is not added to the allowlist.");throw c.code="DOMAIN_NOT_ALLOWED",c}return{organizationId:(s=n).organization_id,groupId:s.livechat.group_id,clientLimitExceeded:s.livechat.client_limit_exceeded,configVersion:s.livechat.config_version,localizationVersion:s.livechat.localization_version,onlineGroupIds:s.livechat.online_group_ids||[],region:t.region||null,language:s.livechat.language};var s}))},yi=function(e){var t,n,i="feade1d6c3f17748ae4c8d917a1e1068",r=!!(null==(t=e.properties.group[i])?void 0:t.forwardTicketFormToHelpdesk),o=null==(n=e.properties.license[i])?void 0:n.hdLicenseID;return"number"==typeof o&&o>-1&&(r||"1"===e.__priv.license["helpdesk.inbound_forwarding"])},bi=function(e){var t,n=e.buttons,i=e.allowed_domains,r=e.prechat_form,o=e.ticket_form,a=e.__priv,u=e.properties,c=Re(e,["buttons","allowed_domains","prechat_form","ticket_form","__priv","properties"]),s="0"===a.group.tickets_enabled,d=!!!a.disable_native_tickets&&!!o,l=yi(e),f=s||l||d;return z({},c,r&&{prechatForm:vi(r)},f&&o&&{ticketForm:vi(o)},{properties:u,buttons:n.map((function(e){return"image"===e.type?{id:e.id,type:e.type,onlineValue:ne(e.online_value),offlineValue:ne(e.offline_value)}:{id:e.id,type:e.type,onlineValue:e.online_value,offlineValue:e.offline_value}}))},i&&{allowedDomains:i},{__unsafeProperties:z({},a.s&&{s:!0},{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"]?gi(e):{enabled:!1},hasAgentAvatarsEnabled:"1"===a.group["chat_window.display_avatar"],hasCustomMobileSettings:"1"===a.group["chat_window.custom_mobile_settings"],hasHiddenTrademark:"1"===a.group["chat_window.hide_trademark"],hasSoundsEnabled:"0"===a.group["chat_window.disable_sounds"],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:a.group.language,linksUnfurlingEnabled:"1"===a.group.links_unfurling,logo:"1"===a.group["chat_window.display_logo"]?{enabled:!0,src:a.group["chat_window.logo_path"]}:{enabled:!1},minimizedType:a.group["chat_window.theme.minimized"],minimizedTypeOnMobile:a.group["chat_window.mobile_minimized_theme"],offlineMessagesEnabled:s,offsetX:parseInt(a.group["chat_window.offset_x"]),offsetXOnMobile:parseInt(a.group["chat_window.mobile_offset_x"]),offsetY:parseInt(a.group["chat_window.offset_y"]),offsetYOnMobile:parseInt(a.group["chat_window.mobile_offset_y"]),prechatFormAfterGreetingEnabled:"1"===a.group.pre_chat_survey_after_greeting,ratingEnabled:"1"===a.group["rate_me.enabled"],screenPosition:a.group["chat_window.screen_position"],screenPositionOnMobile:a.group["chat_window.mobile_screen_position"],transcriptButtonEnabled:"1"===a.group["chat_window.display_transcript_button"],theme:{name:a.group["chat_window.new_theme.name"],variant:a.group["chat_window.new_theme.variant"]||"light",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:a.group["chat_window.new_theme.background_color"],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=e,yi(t)?"helpdesk":"0"===t.__priv.group.tickets_enabled?"offline_message":"livechat")})})},ki=function(e,t){return ci("https://api.openwidget.com/v1.0/configuration/"+e,{callbackName:"ow_config",query:z({},t&&{integration_name:t})}).then((function(t){var n=t.staticConfig,i=t.localization;return z({},Re(t,["staticConfig","localization"]),bi(n),{localization:I((function(e){return e.toLowerCase()}),i),organizationId:e})}))},Ii=function(e){var t,n,i,r=e.allowVideoConferencing,o=e.allowClipboardWrite,a=e.allowDisplayCapture,c=["clipboard-read; clipboard-write;"];if(e.allowAutoplay&&!Sn()&&c.push("autoplay;"),a&&c.push("display-capture *;"),r){var s={"display-capture *;":!Pn()||(i=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),(i?parseInt(i[2],10):0)>=94),"picture-in-picture *;":"PictureInPictureEvent"in window,"fullscreen *;":"function"==typeof Element.prototype.requestFullscreen};c=[].concat(c,["microphone *;","camera *;"],Object.keys((t=Boolean,u(n=s).reduce((function(e,i){return t(n[i])&&(e[i]=n[i]),e}),{}))))}return o&&!Sn()&&c.push("clipboard-write *;"),c.join(" ")},Ci=function(e){var 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)},Ei="data-lc-focus",Li="data-lc-event",xi="data-lc-prop",Ai="data-lc-action",zi="data-lc-action-value",Ti="data-lc-action-success";function Oi(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Pi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pi(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0;return function(){return e.length>i?{done:!1,value:e[i++]}:{done:!0}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Pi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);t>n;n++)i[n]=e[n];return i}var Si=x;function Mi(e,t,n,i){var r,o=n.contentDocument,a=null!=(r=i.state.application.language)?r:"en";if(null===o)throw Error("Parameter `frame` needs to be inserted into any document before rendering");Pn()?(o.documentElement.lang=a,o.head.innerHTML=e,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());for(var u,c=o.documentElement,s=function(){var e=u.value,t=e.getAttribute(Li);if("string"!=typeof t)return"continue";for(var n,r=function(){var t=n.value.split(":"),r=t[0],o=t[1];if(!r||!o)return"continue";e.removeAttribute(Li),e.addEventListener(r,(function(t){var n,a,u,c,s,d,l,f,p,m;t.stopPropagation();var v,h={type:t.type,bubbles:!0,isTrusted:t.isTrusted,cancelBubble:t.cancelBubble,cancelable:t.cancelable,composed:t.composed,defaultPrevented:t.defaultPrevented,eventPhase:t.eventPhase,timeStamp:t.timeStamp,currentTarget:{value:null==(n=t.currentTarget)?void 0:n.value,checked:null==(a=t.currentTarget)?void 0:a.checked,disabled:null==(u=t.currentTarget)?void 0:u.disabled,draggable:null==(c=t.currentTarget)?void 0:c.draggable,hidden:null==(s=t.currentTarget)?void 0:s.hidden},target:{value:null==(d=t.target)?void 0:d.value,checked:null==(l=t.target)?void 0:l.checked,disabled:null==(f=t.target)?void 0:f.disabled,draggable:null==(p=t.target)?void 0:p.draggable,hidden:null==(m=t.target)?void 0:m.hidden}};if("click"===r&&"copy"===e.getAttribute(Ai))return v=e.getAttribute(zi),navigator.clipboard?navigator.clipboard.writeText(v).catch(Ci):Ci(v),void(e.innerHTML=e.getAttribute(Ti));i.call("crossFrameEvent",o,JSON.stringify(h))}))},o=Oi(t.split(";"));!(n=o()).done;)r()},d=Oi(S(c.querySelectorAll("["+Li+"]")));!(u=d()).done;)s();var l=c.querySelector("["+Ei+"]");if(l&&(l.removeAttribute(Ei),l.focus(),"INPUT"===l.nodeName)){l.setSelectionRange(l.value.length,l.value.length)}for(var f,p=[],m=function(){var e=f.value,t=e.getAttribute(xi);if("string"!=typeof t)return"continue";e.removeAttribute(xi);var n=t.split(":"),i=n[0],r=n[1];p.push((function(t){var n,o,a=null==(n=t.views)||null==(o=n.minimized)?void 0:o[r.replace("!","")];"string"==typeof a&&(a=a.trim()),"disabled"===i&&(a=r.includes("!")?!a:!!a),"boolean"==typeof a?e.toggleAttribute(i,a):a?e.setAttribute(i,a):e.removeAttribute(i)}))},v=Oi(S(c.querySelectorAll("["+xi+"]")));!(f=v()).done;)m();p.forEach((function(e){return e(i.state)})),i.off("state_diff",Si),i.on("state_diff",Si=function(e){var t;(null==e||null==(t=e.views)?void 0:t.minimized)&&p.forEach((function(t){return t(e)}))})}var ji=function(e){fe(function(e,t){return ie((function(n){var i=new MutationObserver(n);return i.observe(e,t),function(){i.disconnect()}}))}(document.body,{childList:!0,subtree:!0}),me(Fn),ae((function(e,t){return e.url===t.url})),xe(le(e,"unbind")),ce((function(t){e.call("storeMethod",["setApplicationState",{page:t}])})))},Ni=["maximize","minimize"],Di={maximize:[{name:"feature",values:u({faq:"FAQ","form-contact":"Form-contact","form-feedback":"Form-feedback","form-bugreport":"Form-bugreport",chat:"Chat"})}],minimize:null},qi=function(e,t){var n=e.target;if(n instanceof Element){var i=n.closest("[data-openwidget-action]");if(i){var r=i.getAttribute("data-openwidget-action");if(r)if(function(e){return _(e,Ni)}(r)){var o=function(e,t){var n={},i=Di[t];return i&&i.forEach((function(t){var i=e.getAttribute("data-openwidget-"+t.name);i&&(n[t.name]=i)})),n}(i,r);(function(e,t){var n=Di[e],i=function(i){var r,o=null==(r=n.find((function(e){return e.name===i})))?void 0:r.values,a=t[i];if(!o||!_(a,o))return console.error("OpenWidget: You cannot combine "+a+' feature with "'+e+'" method. You can only use: '+o),{v:!1}};for(var r in t){var o=i(r);if("object"==typeof o)return o.v}return!0})(r,o)&&t[r](o)}else console.error('OpenWidget: Action "'+r+'" is not allowed. Allowed actions: '+Ni.join(", "));else console.error("OpenWidget: Action attribute value not found.")}}},Fi=On(),Wi=function(e){return Fi?{width:"100%",height:"100%"}:"modern"===e.__unsafeProperties.group.theme.name?{width:"400px",height:"465px"}:{width:"392px",height:"714px"}},Hi=function(e,t){return Object.keys(e.properties.license).some((function(n){return e.properties.license[n][t]}))},Bi=function(e,t,n){var i,r,o,a=An(t,Fi);return!e&&n?((r={})[xn(t,Fi)]="0",r.bottom=a.y+"px",r.maxHeight="100%",r):Fi&&e?((o={})[xn(t,Fi)]="0",o.bottom="0",o.maxHeight="100%",o):((i={})[xn(t,Fi)]=a.x+"px",i.bottom=a.y+"px",i.maxHeight="calc(100% - "+a.y+"px)",i)},Ri=function(e){return e.style.setProperty("transition","none","important")},Vi=function(e,t){var n,i=H("div",ct),r=An(e,Fi),o=Bi(t,e),a=Wi(e);return j(z(((n={width:a.width,height:a.height})[xn(e,Fi)]=r.x+"px",n),o),i),i},Gi=function(t,n,i,r,o,a){var u,c,s=B(d(z({license_id:n.license,group:n.group,embedded:1,widget_version:3,unique_groups:Number(n.uniqueGroups)},!!r&&{custom_identity_provider:1},!!o&&{features:o},"openwidget"===a?{organizationId:n.organizationId}:{}))),f={kill:function(){this._emit("widget_resize",{size:{width:"0px",height:"0px"}}),this.unbind(),t.custom||W(t.element)},applyHiddenStyles:function(){j(at,t.element)},isFocused:function(){return!!document.hasFocus&&document.hasFocus()},resize:function(e){var n=void 0===e?{}:e,r={width:n.width,height:n.height},o=Bi(n.maximized,i,n.ignoreHorizontalOffset);j(z({},r,o),t.element);var a=q(["width","height"],t.element);this._emit("widget_resize",{size:r,computedSize:a})},show:function(){j(ut,t.element)},hide:function(){this.call("hide")},focusMinimized:function(){var e=document.getElementById(it);if(e&&e.contentDocument){var t=e.contentDocument.querySelector("button");t&&t.focus()}},minimize:function(){this.call("minimize")},maximize:function(e){var t=this,n=document.activeElement,i=window.event&&window.event.isTrusted?window.event.type:null;n.addEventListener("blur",(function e(){n.removeEventListener("blur",e),t.emit("host_focus_shifted")})),"openwidget"===a&&e?this.call("maximize",i,e):this.call("maximize",i)},unbind:function(){var e=this;this.hide(),this.destroy(),this._emit("unbind"),this.off(),this.call=x,Object.keys(f).forEach((function(t){e[t]=x}))},callIdentityProvider:function(e){return null==r?void 0:r[e]()},applyFramesStyle:function(e){var t=e.minimizedFrameStyle,n=e.maximizedFrameStyle,i=document.getElementById(nt),r=document.getElementById(it);i&&j(n,i),r&&j(t,r)},renderCrossFrameMarkup:function(e){var n=this,i=e[0],r=e[1],o=document.getElementById(it);o||(o=document.createElement("iframe"),N(z({},vt,{title:"openwidget"===a?ot:rt}),o),t.element.appendChild(o),o.contentDocument.fonts.ready.then((function(){return n.emit("minimized_frame_fonts_ready")})).catch(x)),Mi(i,r,o,this)},getMinimizedDimensions:function(){var e=document.getElementById(it).contentDocument.querySelector('[role="main"]');return q(["width","height"],e)},callElementMethod:function(e){var t,n,i=e[0],r=e[1],o=e.slice(2);null==(t=document.getElementById(it).contentDocument.querySelector(i))||null==(n=t[r])||n.call.apply(n,[t].concat(o))},getElementProperties:function(e){var t=e[0],n=e[1],i=document.getElementById(it),r=i&&i.contentDocument.querySelector(t);return r?A(n,r):{}}},p=n.iframeAddress+"?"+s,m=new MutationObserver((function(e){return e.forEach((function(e){var n=l((function(e){return"IFRAME"===e.tagName&&e.getAttribute("src")===p}),e.addedNodes);n&&function(e,t,n){N(z({},mt,{title:"openwidget"===n?ot:rt}),t),e.custom||j(pt,t)}(t,n,a)}))}));return m.observe(t.element,{childList:!0}),new Qe({container:t.element,url:p,methods:f,iframeAllowedProperties:Ii({allowAutoplay:!0,allowVideoConferencing:Hi(i,"microphone"),allowClipboardWrite:Hi(i,"clipboard_write"),allowDisplayCapture:1520===n.license||!1}),model:z({},n,{fullWidth:null==(u=t.size)?void 0:u.width,fullHeight:null==(c=t.size)?void 0:c.height,serverConfig:i,parentWidth:window.innerWidth,parentHeight:window.innerHeight})}).then((function(t){return e.all([t,tt(t)])})).then((function(e){var t=e[0];return m.disconnect(),t}))},Ui=function(e,t,n,i,r,o){e.call("storeMethod",["setLocalization",i]),Un(e),n.custom||Mn(n.element,(function(){return St(e.state,"hidden")})),Fi||"wix"===t.integrationName||jn(e,r,i),Ri(e.frame),function(e,t,n){$t(e,t,n),("LiveChatWidget"in window||"OpenWidget"in window)&&rn(e,t,n)}(e,t,r),fn(e,t),fe(Vt(e,(function(){return function(e){var t=!1;e.on("iframe_sound_unlocked",(function(){return t=!0})),En().then((function(n){t||(e.emit("bridge_sound_unlocked"),e.on("add_event",(function(t){var i=t.event;Be(e.state,"muted")||function(e,t){return"system"!==e.author&&!e.properties.welcomeMessage&&e.author!==t&&"custom"!==e.type}(i,We(e.state))&&n(Cn)})))}))}(e),ge})),ce(x)),"wix"===t.integrationName?function(e){Bn.addEventListener(Bn.Events.PAGE_NAVIGATION,(function(){Rn().then((function(t){return e.call("storeMethod",["setApplicationState",{page:t}])}))}))}(e):(Wn(e),"openwidget"===o&&(ji(e),function(e){var t=function(t){return qi(t,e)};fe(Mt(e,(function(e){return e.application.readyState})),ue((function(e){return e===Ht})),Ee(1),ce((function(){document.addEventListener("click",t)}))),fe(le(e,"unbind"),ce((function(){document.removeEventListener("click",t)})))}(e))),Vn(e),t.actingAsDirectLink||n.custom||function(e){fe(Mt(e,(function(e){return St(e,"hidden")})),Ie(1),ce((function(t){t?e.applyHiddenStyles():e.show()})))}(e),Yn(e),function(e){var t=function(){setTimeout((function(){document.addEventListener("touchstart",x),setTimeout((function(){document.removeEventListener("touchstart",x)}),500)}),500)};window.addEventListener("orientationchange",t),e.on("unbind",(function n(){e.off("unbind",n),window.removeEventListener("orientationchange",t)}))}(e),Dn(e,r),Fi&&Xn(e),Hn(e),e.on("rich_greeting_button_clicked",(function(e){var t=e.button;"url"===t.type&&Kt.navigate(t.value)})),e.on("open_in_new_tab",(function(e){Kt.navigate(e)}))},Yi=function(t){return wi(t).then((function(n){var i;return e.all([n,(i={organizationId:n.organizationId,licenseId:t.licenseId,groupId:n.groupId,region:n.region,version:n.configVersion},ci(_i("get_configuration",i),{callbackName:"lc_static_config",query:z({organization_id:i.organizationId,version:i.version},"number"==typeof i.groupId&&{group_id:i.groupId})}).then((function(e){return bi(e)})))]).then((function(e){return z({},e[0],e[1])}))}))},Ji=function(t,n){window.performance&&"function"==typeof window.performance.mark&&window.performance.mark("lc_bridge_init");var i=!1,r=t;window.LC_API=window.LC_API||{},window.LC_API.is_loaded=function(){return i};var o=n.region,a=n.organizationId,u=n.requestedGroupId,c=n.integrationName,s=n.customIdentityProviderInitializer,l=z({licenseId:n.licenseId,skipCodeInstallationTracking:n.skipCodeInstallationTracking,channelType:n.actingAsDirectLink?"direct_link":"code",url:qn(document.location+"")},"number"==typeof u&&{groupId:u},"string"==typeof o&&{region:o}),f="livechat"===r?Yi(l).catch((function(e){if("DEFAULT_WIDGET_NOT_LIVECHAT"===e.code&&"openwidget"===e.defaultWidget)return r=e.defaultWidget,window.__ow=window.__ow||{},window.__ow.organizationId=e.organizationId,window.OpenWidget=z({},window.LiveChatWidget),ki(e.organizationId);throw e})):ki(a,c);e.all([f,"wix"===c?Rn():Fn(),F()]).then((function(t){var o=t[0],u=t[1],c=t[2];if(yt(o.allowedDomains,window.top===window?window.location.hostname:document.referrer)){if(!Fi||!o.__unsafeProperties.group.disabledOnMobile||n.actingAsDirectLink){var l=oi(),f=function(e){if(null===e)return null;var 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}(s),p=Qn(n,u,o),m=function(e,t){return e.customContainer?{custom:!0,element:e.customContainer}:{custom:!1,element:Vi(t,e.actingAsDirectLink),size:Wi(t)}}(n,o),v={},h=!1,g=wt("on_before_load"),_=wt("on_after_load");g((function(e){e.disable_sounds=x,e.mobile_is_detected=function(){return Fi},e.chat_running=function(){return!1},e.visitor_engaged=function(){return!1},e.agents_are_available=function(){return-1!==o.onlineGroupIds.indexOf(o.groupId)},e.get_window_type=function(){return"embedded"},e.hide_chat_window=Yt(p)?x:function(){return h=!0},e.set_visitor_name=function(e){return v.name=Pt(e)},e.set_visitor_email=function(e){return v.email=Pt(e)},e.set_custom_variables=function(e){return v.properties=e?zt(e):{}},e.update_custom_variables=function(e){e&&(v.properties=z({},v.properties,zt(e)))}}));var w,y=z({},p,o.licenseId&&{license:o.licenseId},{customer:z({},p.customer,v),hidden:p.hidden||h},a?{organizationId:a}:{organizationId:o.organizationId});m.custom||c.appendChild(m.element),window.performance&&"function"==typeof window.performance.mark&&window.performance.mark("lc_bind_child"),e.all([Gi(m,y,o,f,null,r),"openwidget"===r?e.resolve(o.localization):(w={organizationId:y.organizationId,licenseId:y.license,groupId:y.group,region:y.region,version:o.localizationVersion,language:o.__unsafeProperties.group.language},ci(_i("get_localization",w),{callbackName:"lc_localization",query:z({organization_id:w.organizationId,version:w.version,language:w.language},"number"==typeof w.groupId&&{group_id:w.groupId})}).then((function(e){return I((function(e){return e.toLowerCase()}),e)})))]).then((function(e){var t=e[0],n=e[1];return m.custom||Ri(m.element),Ui(t,y,m,n,o,r),fe(Mt(t,(function(e){return Be(e,"readyState")})),ue((function(e){return e===Ht})),Ee(1),me((function(){return t})),Ae)})).then((function(e){window.performance&&"function"==typeof window.performance.mark&&window.performance.mark("lc_bridge_ready"),l&&l.getLogs().then((function(t){e.call("logInfo","loading_time_measured",d(t))})),_((function(){return i=!0})),"openwidget"===r||Math.floor(10*Math.random())||setTimeout((function(){(function(e){return ai(_i("get_localization",e)+"?"+B(z({organization_id:e.organizationId,version:e.version,language:e.language},"number"==typeof e.groupId&&{group_id:e.groupId}))).then((function(e){return e.json()})).then((function(e){return I((function(e){return e.toLowerCase()}),e)}))})({organizationId:y.organizationId,licenseId:p.license,groupId:p.group,region:p.region,version:o.localizationVersion,language:o.__unsafeProperties.group.language}).catch((function(){e.call("logInfo","potential_csp_problem",{url:window.location+""})}))}),1e4)}))}}else console.log("[LiveChat] Current domain is not added to the allowed domains. LiveChat has been disabled.")})).catch((function(e){switch(null==e?void 0:e.code){case"ACCESS_NOT_RESOLVED":case"CUSTOMER_BANNED":return void console.warn("[LiveChat] "+e.message);default:throw e}}))};function Xi(){F().then((function(e){var t=document.createElement("iframe");j({display:"none"},t),e.appendChild(t),Sn()&&(t.contentDocument.open(),t.contentDocument.close());var n=t.contentDocument.head;["https://cdn.livechatinc.com/widget/static/js/runtime-configurator.db7c33de.js","https://cdn.livechatinc.com/widget/static/js/0.36010c68.chunk.js","https://cdn.livechatinc.com/widget/static/js/1.a5eff93c.chunk.js","https://cdn.livechatinc.com/widget/static/js/configurator.bc1b87a7.chunk.js"].forEach((function(e){!function(e,t){var n=document.createElement("script");N({src:t,charset:"utf-8"},n),e.appendChild(n)}(n,e)}))}))}var $i=function(e){return function(e){return"number"==typeof e&&e>=0}(n="string"==typeof(t=void 0!==e.group?e.group:e.skill)?parseInt(t,10):t)?n:null;var t,n},Ki=function(e,t){var n={name:null,email:null,properties:{}};if("object"==typeof e&&e){var i=e.name,r=e.email;"string"==typeof i&&(n.name=i),"string"==typeof r&&(n.email=r)}return Array.isArray(t)&&(n.properties=zt(t)),n},Qi=function(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((function(e){var t;return null==(t=e.textContent)?void 0:t.startsWith("window.__lc")})))return"potentially_gtm"}catch(e){}return null},Zi=function(){return e="cw_configurator",t=window.location.search,$(t)[e]||fi("session")&&!!window.sessionStorage.getItem("cw_configurator");var e,t};window.__lc_inited||function(){if(window.__lc_inited=!0,"msCrypto"in window)console.error("[LiveChat] We no longer support Internet Explorer");else if(3===[1].reduce((function(e,t){return e+t}),2)){var e,t,n=(e=window.__lc,{licenseId:parseInt(e.license),requestedGroupId:$i(e),uniqueGroups:!1===e.chat_between_groups,customer:Ki(e.visitor,e.params),skipCodeInstallationTracking:1===e.test,integrationName:Qi(e),actingAsDirectLink:!0===e.direct_link,initMaximized:!0===e.init_maximized,customContainer:e.custom_container||null,gaParams:{version:"string"==typeof e.ga_version?e.ga_version:null,omitGtm:!!e.ga_omit_gtm,sendToAll:!!e.ga_send_to_all_trackers},customIdentityProviderInitializer:"function"==typeof e.custom_identity_provider?e.custom_identity_provider:null,iframeAddress:null,region:_(e.region,(t=Rt,u(t).map((function(e){return t[e]}))))?e.region+"":null});n.actingAsDirectLink||!Zi()?Ji("livechat",n):Xi()}else 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.")}()}();