@moveo-ai/web-client 0.74.0 → 0.75.0-true.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.html CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  * {
11
11
  outline: 0;
12
- }</style><title>Widget</title></head><body><script src="iframe.min.js?434d84eb3888629a9459"></script><script>const queryString = window.location.search;
12
+ }</style><title>Widget</title></head><body><script src="iframe.min.js?699cf2337f4b4a2c822a"></script><script>const queryString = window.location.search;
13
13
  const urlParams = new URLSearchParams(queryString);
14
14
  const widgetId = urlParams.get('widgetId');
15
15
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @moveo-ai/web-client v0.74.0
3
+ * @moveo-ai/web-client v0.75.0-true.2
4
4
  * Copyright (c) Moveo.ai (TM)
5
5
  *
6
6
  */
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see web-client.min.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("MoveoAI",[],t):"object"==typeof exports?exports.MoveoAI=t():e.MoveoAI=t()}(self,(function(){return function(){var e={6384:function(e,t,n){"use strict";var o=n(5516),i=n.n(o),r=n(1364),s=n.n(r)()(i());s.push([e.id,".web-client-container{position:fixed;bottom:0;right:0;cursor:pointer;z-index:10022;max-height:99%}.web-client-container.embed{position:static;width:100% !important;height:100% !important}.web-client-container.full{width:100% !important;height:100% !important;inset:0 !important;max-height:initial}","",{version:3,sources:["webpack://./src/styles/web-client.scss"],names:[],mappings:"AAIA,sBAIE,cAAA,CACA,QAAA,CACA,OAAA,CACA,cAAA,CACA,aAPiB,CAQjB,cAPoB,CASpB,4BACE,eAAA,CACA,qBAAA,CACA,sBAAA,CAIF,2BACE,qBAAA,CACA,sBAAA,CACA,kBAAA,CACA,kBAAA",sourceRoot:""}]),t.A=s},1364:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,o,i,r){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(s[c]=!0)}for(var d=0;d<e.length;d++){var u=[].concat(e[d]);o&&s[u[0]]||(void 0!==r&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=r),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),t.push(u))}},t}},5516:function(e){"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),r="/*# ".concat(i," */");return[t].concat([r]).join("\n")}return[t].join("\n")}},1931:function(e,t,n){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let o=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(o++,"%c"===e&&(i=o))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(4582)(t);const{formatters:o}=e.exports;o.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},4582:function(e,t,n){e.exports=function(e){function t(e){let n,i,r,s=null;function a(...e){if(!a.enabled)return;const o=a,i=Number(new Date),r=i-(n||i);o.diff=r,o.prev=n,o.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";s++;const r=t.formatters[i];if("function"==typeof r){const t=e[s];n=r.call(o,t),e.splice(s,1),s--}return n})),t.formatArgs.call(o,e),(o.log||t.log).apply(o,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=o,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==t.namespaces&&(i=t.namespaces,r=t.enabled(e)),r),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function o(e,n){const o=t(this.namespace+(void 0===n?":":n)+e);return o.log=this.log,o}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const o=("string"==typeof e?e:"").split(/[\s,]+/),i=o.length;for(n=0;n<i;n++)o[n]&&("-"===(e=o[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,o;for(n=0,o=t.skips.length;n<o;n++)if(t.skips[n].test(e))return!1;for(n=0,o=t.names.length;n<o;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(6151),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},7967:function(e,t,n){var o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,u=c||d||Function("return this")(),l=Object.prototype.toString,f=Math.max,p=Math.min,m=function(){return u.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==l.call(e)}(e))return NaN;if(h(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=h(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=r.test(e);return n||s.test(e)?a(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var o,i,r,s,a,c,d=0,u=!1,l=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=o,r=i;return o=i=void 0,d=t,s=e.apply(r,n)}function w(e){var n=e-c;return void 0===c||n>=t||n<0||l&&e-d>=r}function b(){var e=m();if(w(e))return C(e);a=setTimeout(b,function(e){var n=t-(e-c);return l?p(n,r-(e-d)):n}(e))}function C(e){return a=void 0,g&&o?y(e):(o=i=void 0,s)}function A(){var e=m(),n=w(e);if(o=arguments,i=this,c=e,n){if(void 0===a)return function(e){return d=e,a=setTimeout(b,t),u?y(e):s}(c);if(l)return a=setTimeout(b,t),y(c)}return void 0===a&&(a=setTimeout(b,t)),s}return t=v(t)||0,h(n)&&(u=!!n.leading,r=(l="maxWait"in n)?f(v(n.maxWait)||0,t):r,g="trailing"in n?!!n.trailing:g),A.cancel=function(){void 0!==a&&clearTimeout(a),d=0,o=c=i=a=void 0},A.flush=function(){return void 0===a?s:C(m())},A}},9572:function(e,t,n){var o="Expected a function",i=NaN,r="[object Symbol]",s=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,d=/^0o[0-7]+$/i,u=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,f="object"==typeof self&&self&&self.Object===Object&&self,p=l||f||Function("return this")(),m=Object.prototype.toString,h=Math.max,v=Math.min,g=function(){return p.Date.now()};function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function w(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&m.call(e)==r}(e))return i;if(y(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=y(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var n=c.test(e);return n||d.test(e)?u(e.slice(2),n?2:8):a.test(e)?i:+e}e.exports=function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new TypeError(o);return y(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),function(e,t,n){var i,r,s,a,c,d,u=0,l=!1,f=!1,p=!0;if("function"!=typeof e)throw new TypeError(o);function m(t){var n=i,o=r;return i=r=void 0,u=t,a=e.apply(o,n)}function b(e){var n=e-d;return void 0===d||n>=t||n<0||f&&e-u>=s}function C(){var e=g();if(b(e))return A(e);c=setTimeout(C,function(e){var n=t-(e-d);return f?v(n,s-(e-u)):n}(e))}function A(e){return c=void 0,p&&i?m(e):(i=r=void 0,a)}function F(){var e=g(),n=b(e);if(i=arguments,r=this,d=e,n){if(void 0===c)return function(e){return u=e,c=setTimeout(C,t),l?m(e):a}(d);if(f)return c=setTimeout(C,t),m(d)}return void 0===c&&(c=setTimeout(C,t)),a}return t=w(t)||0,y(n)&&(l=!!n.leading,s=(f="maxWait"in n)?h(w(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p),F.cancel=function(){void 0!==c&&clearTimeout(c),u=0,i=d=r=c=void 0},F.flush=function(){return void 0===c?a:A(g())},F}(e,t,{leading:i,maxWait:t,trailing:r})}},6151:function(e){var t=1e3,n=60*t,o=60*n,i=24*o;function r(e,t,n,o){var i=t>=1.5*n;return Math.round(e/n)+" "+o+(i?"s":"")}e.exports=function(e,s){s=s||{};var a,c,d=typeof e;if("string"===d&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var r=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(r){var s=parseFloat(r[1]);switch((r[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===d&&isFinite(e))return s.long?(a=e,(c=Math.abs(a))>=i?r(a,c,i,"day"):c>=o?r(a,c,o,"hour"):c>=n?r(a,c,n,"minute"):c>=t?r(a,c,t,"second"):a+" ms"):function(e){var r=Math.abs(e);return r>=i?Math.round(e/i)+"d":r>=o?Math.round(e/o)+"h":r>=n?Math.round(e/n)+"m":r>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},6186:function(e){"use strict";var t=[];function n(e){for(var n=-1,o=0;o<t.length;o++)if(t[o].identifier===e){n=o;break}return n}function o(e,o){for(var r={},s=[],a=0;a<e.length;a++){var c=e[a],d=o.base?c[0]+o.base:c[0],u=r[d]||0,l="".concat(d," ").concat(u);r[d]=u+1;var f=n(l),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==f)t[f].references++,t[f].updater(p);else{var m=i(p,o);o.byIndex=a,t.splice(a,0,{identifier:l,updater:m,references:1})}s.push(l)}return s}function i(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var r=o(e=e||[],i=i||{});return function(e){e=e||[];for(var s=0;s<r.length;s++){var a=n(r[s]);t[a].references--}for(var c=o(e,i),d=0;d<r.length;d++){var u=n(r[d]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}r=c}}},7433:function(e){"use strict";var t={};e.exports=function(e,n){var o=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},8990:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},8626:function(e,t,n){"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},2155:function(e){"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var o="";n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,i&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},9827:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var r=t[o]={id:o,exports:{}};return e[o](r,r.exports,n),r.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var o={};return function(){"use strict";n.r(o),n.d(o,{init:function(){return B}});var e=n(1931),t=n.n(e);const i=e=>{if("object"==typeof e&&null!==e){if("function"==typeof Object.getPrototypeOf){const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}return"[object Object]"===Object.prototype.toString.call(e)}return!1},r=(...e)=>e.reduce(((e,t)=>{if(Array.isArray(t))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(t).forEach((n=>{["__proto__","constructor","prototype"].includes(n)||(Array.isArray(e[n])&&Array.isArray(t[n])?e[n]=r.options.mergeArrays?r.options.uniqueArrayItems?Array.from(new Set(e[n].concat(t[n]))):[...e[n],...t[n]]:t[n]:i(e[n])&&i(t[n])?e[n]=r(e[n],t[n]):e[n]=void 0===t[n]?r.options.allowUndefinedOverrides?t[n]:e[n]:t[n])})),e}),{}),s={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};r.options=s,r.withOptions=(e,...t)=>{r.options=Object.assign(Object.assign({},s),e);const n=r(...t);return r.options=s,n};var a=r;const c="https://channels-ws.moveo.ai",d="https://web-client.dev.moveo.ai",u=()=>window.innerWidth<650||window.innerHeight<550&&window.innerWidth<1e3,l=(e,t)=>{var n,o;const i=null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.type;return"string"==typeof i&&i.startsWith(e)?{type:i.replace(e,""),data:null===(o=t.data)||void 0===o?void 0:o.data}:null};var f,p=/bot|crawl|http|lighthouse|scan|search|spider/i;var m,h,v,g,y,w=n(7967),b=n.n(w),C=n(9572),A=n.n(C);!function(e){e.Open="open",e.Resolved="closed",e.Expired="expired",e.Spam="spam",e.Trash="trash"}(m||(m={})),function(e){e.IframeLoaded="moveo-iframe-loaded",e.IframeError="moveo-iframe-error",e.WidgetLoaded="moveo-widget-loaded",e.WidgetError="moveo-widget-error",e.Opened="moveo-widget-opened",e.Closed="moveo-widget-closed",e.Resize="moveo-widget-resize",e.LocaleChanged="moveo-widget-locale-changed",e.SessionCreated="moveo-widget-session-created",e.SessionReconnected="moveo-widget-session-reconnected",e.SessionClosed="moveo-widget-session-closed",e.ConversationClosed="moveo-widget-conversation-closed",e.LinkClicked="moveo-widget-link-clicked",e.ConversationUnreadMessages="moveo-conversation-unread-messages",e.ConversationNoUnreadMessages="moveo-conversation-no-unread-messages",e.UserWayInit="moveo-userway-init"}(h||(h={})),function(e){e.SetConfig="moveo-set-config",e.SetLocale="moveo-set-locale",e.SetCssVariables="moveo-set-css-variables",e.Open="moveo-open",e.Close="moveo-close",e.CloseConversation="moveo-close-conversation",e.SendMessage="moveo-send-message",e.UpdateContext="moveo-update-context",e.WindowResize="moveo-resize",e.SessionActivity="session-activity",e.UserWayDisabled="userway-disabled",e.UserWayEnabled="userway-enabled",e.LinkClicked="link-clicked"}(v||(v={})),function(e){e.Expired="expired",e.Survey="survey",e.SurveyFull="survey-full",e.Closing="closing",e.Resolved="closed",e.Inactivity="inactivity"}(g||(g={})),function(e){e.MinimizeButton="minimize-btn",e.CloseButton="close-btn",e.EndSessionButton="end-btn",e.LauncherButton="launcher-btn",e.MessageInput="message-input",e.DisclaimerCheck="disclaimer-check",e.DisclaimerContainer="disclaimer-container",e.HeaderContainer="header-container",e.ImageButton="image-btn"}(y||(y={}));const F=["s2","s3","s4","s6","s7","s10","s12","s13","s14","s15","s16","s17","s19","s23"];class E{constructor(e){this.detectUserway=()=>{F.forEach((e=>{document.addEventListener(`userway:feature_enabled_${e}`,(()=>{var t;const n=null!==(t=localStorage.getItem(`userway-${e}`))&&void 0!==t?t:"";this.sendEventToIframe({type:v.UserWayEnabled,data:{eventType:e,value:n}})})),document.addEventListener(`userway:feature_disabled_${e}`,(()=>{this.sendEventToIframe({type:v.UserWayDisabled,data:{eventType:e}})}))}))},this.initUserway=()=>{const e=Object.assign({},localStorage);Object.keys(e).forEach((t=>{const n=(e[t],e[t]);if(t.includes("userway-s")&&(!isNaN(parseInt(n))||"true"===n)){const e=t.split("-")[1];"0"===n?this.sendEventToIframe({type:v.UserWayDisabled,data:{eventType:e}}):this.sendEventToIframe({type:v.UserWayEnabled,data:{eventType:e,value:n}})}}))},this.detectMobile=()=>{this.sendEventToIframe({type:v.WindowResize,data:{is_mobile:u(),width:window.innerWidth,height:window.innerHeight}}),this.isMobile=u()},this.trackActivity=()=>{const e=A()((()=>{this.sendEventToIframe({type:v.SessionActivity,data:"active"})}),3e3);window.onload=e,window.onmousemove=e,window.onmousedown=e,window.ontouchstart=e,window.ontouchmove=e,window.onclick=e,window.onkeydown=e,window.addEventListener("scroll",e,!0)},this.config=e,this.id=e.widgetId,this.initialized=!1,this.log=t()(`moveo:web-client:${this.id}`),this.iframe=this.createIframe(),this.isMobile=null}createIframe(){const e=document.createElement("iframe");return e.width="1px",e.height="1px",e.title="Moveo webchat",e.id=this.id,e.name=this.id,e.allow="geolocation",e.style.border="0",e.classList.add("web-client-container"),"embed"===this.config.widget_position&&e.classList.add("embed"),e.setAttribute("src",(e=>{let t="";const n=document.querySelectorAll("script"),o=/@moveo-ai\/web-client.*next/;n&&n.forEach((e=>{var n;(null===(n=e.src)||void 0===n?void 0:n.match(o))&&(t=d)}));const{origin:i}=window.location;return t||(t=i.match(/localhost:8880/)||i.match(/web-client.*moveo-ai\.vercel\.app/)?i:i.match(/web-client\.dev/)?d:"https://web-client.moveo.ai"),`${t}?widgetId=${e}`})(this.id)),e}handleEvents(e,t){return n=>{const o=l(this.id,n);if(o)switch(o.type){case h.IframeLoaded:this.sendEventToIframe({type:v.SetConfig,data:this.config});break;case h.IframeError:return t(o.data);case h.UserWayInit:this.initUserway(),this.detectUserway();case h.WidgetLoaded:setTimeout((()=>{this.detectMobile(),e(this)}),0);break;case h.WidgetError:this.notify(o);break;case h.Opened:(o.data.isFull||o.data.is_mobile)&&this.iframe.classList.add("full");break;case h.Closed:o.data.isFull&&this.iframe.classList.remove("full");break;case h.Resize:this.iframe.style.width=o.data.width,this.iframe.style.height=o.data.height,this.iframe.style.left=o.data.left;break;default:this.log(`Unhandle event: ${o.type}`)}}}init(){return new Promise(((e,t)=>{var n,o,i;if(i=navigator.userAgent,Boolean(i)&&function(){if(f instanceof RegExp)return f;try{f=new RegExp(" daum[ /]| deusu/| yadirectfetcher|(?:^|[^g])news(?!sapphire)|(?<! (?:channel/|google/))google(?!(app|/google| pixel))|(?<! cu)bots?(?:\\b|_)|(?<!(?:lib))http|(?<![hg]m)score|@[a-z][\\w-]+\\.|\\(\\)|\\.com\\b|\\btime/|^<|^[\\w \\.\\-\\(?:\\):]+(?:/v?\\d+(?:\\.\\d+)?(?:\\.\\d{1,10})*?)?(?:,|$)|^[^ ]{50,}$|^\\d+\\b|^\\w*search\\b|^\\w+/[\\w\\(\\)]*$|^active|^ad muncher|^amaya|^avsdevicesdk/|^biglotron|^bot|^bw/|^clamav[ /]|^client/|^cobweb/|^custom|^ddg[_-]android|^discourse|^dispatch/\\d|^downcast/|^duckduckgo|^facebook|^getright/|^gozilla/|^hobbit|^hotzonu|^hwcdn/|^jeode/|^jetty/|^jigsaw|^microsoft bits|^movabletype|^mozilla/5\\.0\\s[a-z\\.-]+$|^mozilla/\\d\\.\\d \\(compatible;?\\)$|^mozilla/\\d\\.\\d \\w*$|^navermailapp|^netsurf|^offline|^owler|^php|^postman|^python|^rank|^read|^reed|^rest|^rss|^snapchat|^space bison|^svn|^swcd |^taringa|^thumbor/|^track|^valid|^w3c|^webbandit/|^webcopier|^wget|^whatsapp|^wordpress|^xenu link sleuth|^yahoo|^yandex|^zdm/\\d|^zoom marketplace/|^{{.*}}$|adscanner/|analyzer|archive|ask jeeves/teoma|bit\\.ly/|bluecoat drtr|browsex|burpcollaborator|capture|catch|check\\b|checker|chrome-lighthouse|chromeframe|classifier|cloudflare|convertify|crawl|cypress/|dareboost|datanyze|dejaclick|detect|dmbrowser|download|evc-batch/|exaleadcloudview|feed|firephp|functionize|gomezagent|headless|httrack|hubspot marketing grader|hydra|ibisbrowser|images|infrawatch|insight|inspect|iplabel|ips-agent|java(?!;)|jsjcw_scanner|library|linkcheck|mail\\.ru/|manager|measure|neustar wpm|node|nutch|offbyone|optimize|pageburst|pagespeed|parser|perl|phantomjs|pingdom|powermarks|preview|proxy|ptst[ /]\\d|reputation|resolver|retriever|rexx;|rigor|rss\\b|scanner\\.|scrape|server|sogou|sparkler/|speedcurve|spider|splash|statuscake|supercleaner|synapse|synthetic|tools|torrent|trace|transcoder|url|virtuoso|wappalyzer|webglance|webkit2png|whatcms/|zgrab","i")}catch(e){f=p}return f}().test(i))throw new Error(`Widget ${this.id} was not initialized because user-agent is a bot`);if(this.initialized)throw new Error(`Widget ${this.id} was already initialized`);if(window.addEventListener("message",this.handleEvents(e,t)),window.addEventListener("resize",b()(this.detectMobile,100)),this.trackActivity(),"embed"===this.config.widget_position){let e=(null===(n=this.config)||void 0===n?void 0:n.element)||null;if("string"==typeof e&&(e=document.getElementById(e),!e))throw new Error(`Element with id: ${e} not found`);null==e||e.appendChild(this.iframe)}else null===(o=window.document.querySelector("body"))||void 0===o||o.appendChild(this.iframe);this.initialized=!0,this.detectMobile()}))}sendEventToIframe(e){var t;this.iframe&&this.iframe.contentWindow?(this.log(`Event to iframe: ${e.type}`,e),e.type===v.SetConfig&&(null===(t=e.data)||void 0===t?void 0:t.element)&&delete e.data.element,this.iframe.contentWindow.postMessage(Object.assign(Object.assign({},e),{type:`${this.id}${e.type}`}),"*")):this.log("Error: Cannot find iframe to send event")}notify(e){this.log(`notify ${e.type}:`,e)}notifyParent(e,t){window.addEventListener("message",(n=>{const o=l(this.id,n);o&&(this.log(`Event from iframe: ${o.type}`,o),o.type===e&&("data"in o?t(o.data):t()))}))}openWindow(){this.sendEventToIframe({type:v.Open})}async destroy(){this.closeConversation({hide:!0}),await(4e3,new Promise((e=>setTimeout(e,4e3))));const e=document.getElementById(this.id);e&&(e.remove(),this.initialized=!1)}closeConversation({hide:e}){this.sendEventToIframe({type:v.CloseConversation,data:{hide:e}})}closeWindow(){this.sendEventToIframe({type:v.Close})}sendMessage(e){this.sendEventToIframe({type:v.SendMessage,data:e})}updateContext(e){this.sendEventToIframe({type:v.UpdateContext,data:e})}setCSSVariables(e){this.sendEventToIframe({type:v.SetCssVariables,data:e})}setLocale(e){this.sendEventToIframe({type:v.SetLocale,data:e})}onSessionCreated(e){this.notifyParent(h.SessionCreated,e)}onSessionClosed(e){this.notifyParent(h.SessionClosed,e)}onConversationClosed(e){this.notifyParent(h.ConversationClosed,e)}onSessionReconnected(e){this.notifyParent(h.SessionReconnected,e)}onNoUnreadMessages(e){this.notifyParent(h.ConversationNoUnreadMessages,e)}onUnreadMessages(e){this.notifyParent(h.ConversationUnreadMessages,e)}onLinkClicked(e){this.notifyParent(h.LinkClicked,e)}}var x=n(6186),j=n.n(x),I=n(2155),k=n.n(I),S=n(7433),O=n.n(S),T=n(8626),M=n.n(T),$=n(8990),z=n.n($),L=n(9827),U=n.n(L),W=n(6384),_={};_.styleTagTransform=U(),_.setAttributes=M(),_.insert=O().bind(null,"head"),_.domAPI=k(),_.insertStyleElement=z(),j()(W.A,_),W.A&&W.A.locals&&W.A.locals;let N=t()("moveo:web-client");const P=async e=>{const t=`moveo-${((e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t})(5)}`,n=window.location.href;if(N=N.extend(`:${t}`),!(null==e?void 0:e.integrationId))throw new Error("integrationId is required.\n Call MoveoAI.init({ integrationId: YOUR_INTEGRATION_HERE })");const o=await(async(e,t)=>{const n=t||c,o=await fetch(`${n}/v1/web/${e}`),i=await o.text();if(o.ok)return JSON.parse(i);throw new Error(`Error loading config from: ${n}/${e}`)})(e.integrationId,e.host);return N("Loaded integration configuration:",o),Object.assign(Object.assign({},a(Object.assign({},o),e)),{clientUrl:n,widgetId:t})},B=async e=>{await new Promise((e=>{if("complete"===document.readyState)return e();window.addEventListener("load",(()=>e()))}));const t=await P(e);if(N("Configuration:",t),"embed"===t.widget_position&&!t.element)throw new Error("element is not defined but required by embed widget");const n=new E(t);N("Initializing");const o=await n.init();return N("Initialized"),o}}(),o}()}));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("MoveoAI",[],t):"object"==typeof exports?exports.MoveoAI=t():e.MoveoAI=t()}(self,(function(){return function(){var e={6384:function(e,t,n){"use strict";var o=n(5516),r=n.n(o),i=n(1364),s=n.n(i)()(r());s.push([e.id,".web-client-container{position:fixed;bottom:0;right:0;cursor:pointer;z-index:10022;max-height:99%}.web-client-container.embed{position:static;width:100% !important;height:100% !important}.web-client-container.full{width:100% !important;height:100% !important;inset:0 !important;max-height:initial}","",{version:3,sources:["webpack://./src/styles/web-client.scss"],names:[],mappings:"AAIA,sBAIE,cAAA,CACA,QAAA,CACA,OAAA,CACA,cAAA,CACA,aAPiB,CAQjB,cAPoB,CASpB,4BACE,eAAA,CACA,qBAAA,CACA,sBAAA,CAIF,2BACE,qBAAA,CACA,sBAAA,CACA,kBAAA,CACA,kBAAA",sourceRoot:""}]),t.A=s},1364:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,o,r,i){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(s[c]=!0)}for(var u=0;u<e.length;u++){var f=[].concat(e[u]);o&&s[f[0]]||(void 0!==i&&(void 0===f[5]||(f[1]="@layer".concat(f[5].length>0?" ".concat(f[5]):""," {").concat(f[1],"}")),f[5]=i),n&&(f[2]?(f[1]="@media ".concat(f[2]," {").concat(f[1],"}"),f[2]=n):f[2]=n),r&&(f[4]?(f[1]="@supports (".concat(f[4],") {").concat(f[1],"}"),f[4]=r):f[4]="".concat(r)),t.push(f))}},t}},5516:function(e){"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),i="/*# ".concat(r," */");return[t].concat([i]).join("\n")}return[t].join("\n")}},1931:function(e,t,n){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let o=0,r=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(o++,"%c"===e&&(r=o))})),t.splice(r,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(4582)(t);const{formatters:o}=e.exports;o.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},4582:function(e,t,n){e.exports=function(e){function t(e){let n,r,i,s=null;function a(...e){if(!a.enabled)return;const o=a,r=Number(new Date),i=r-(n||r);o.diff=i,o.prev=n,o.curr=r,n=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,r)=>{if("%%"===n)return"%";s++;const i=t.formatters[r];if("function"==typeof i){const t=e[s];n=i.call(o,t),e.splice(s,1),s--}return n})),t.formatArgs.call(o,e),(o.log||t.log).apply(o,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=o,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(r!==t.namespaces&&(r=t.namespaces,i=t.enabled(e)),i),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function o(e,n){const o=t(this.namespace+(void 0===n?":":n)+e);return o.log=this.log,o}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const o=("string"==typeof e?e:"").split(/[\s,]+/),r=o.length;for(n=0;n<r;n++)o[n]&&("-"===(e=o[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,o;for(n=0,o=t.skips.length;n<o;n++)if(t.skips[n].test(e))return!1;for(n=0,o=t.names.length;n<o;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(6151),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},7967:function(e,t,n){var o=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,f=c||u||Function("return this")(),d=Object.prototype.toString,l=Math.max,p=Math.min,v=function(){return f.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(h(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=h(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=i.test(e);return n||s.test(e)?a(e.slice(2),n?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var o,r,i,s,a,c,u=0,f=!1,d=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=o,i=r;return o=r=void 0,u=t,s=e.apply(i,n)}function b(e){var n=e-c;return void 0===c||n>=t||n<0||d&&e-u>=i}function w(){var e=v();if(b(e))return C(e);a=setTimeout(w,function(e){var n=t-(e-c);return d?p(n,i-(e-u)):n}(e))}function C(e){return a=void 0,g&&o?y(e):(o=r=void 0,s)}function x(){var e=v(),n=b(e);if(o=arguments,r=this,c=e,n){if(void 0===a)return function(e){return u=e,a=setTimeout(w,t),f?y(e):s}(c);if(d)return a=setTimeout(w,t),y(c)}return void 0===a&&(a=setTimeout(w,t)),s}return t=m(t)||0,h(n)&&(f=!!n.leading,i=(d="maxWait"in n)?l(m(n.maxWait)||0,t):i,g="trailing"in n?!!n.trailing:g),x.cancel=function(){void 0!==a&&clearTimeout(a),u=0,o=c=r=a=void 0},x.flush=function(){return void 0===a?s:C(v())},x}},9572:function(e,t,n){var o="Expected a function",r=NaN,i="[object Symbol]",s=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,u=/^0o[0-7]+$/i,f=parseInt,d="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l="object"==typeof self&&self&&self.Object===Object&&self,p=d||l||Function("return this")(),v=Object.prototype.toString,h=Math.max,m=Math.min,g=function(){return p.Date.now()};function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function b(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&v.call(e)==i}(e))return r;if(y(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=y(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var n=c.test(e);return n||u.test(e)?f(e.slice(2),n?2:8):a.test(e)?r:+e}e.exports=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError(o);return y(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),function(e,t,n){var r,i,s,a,c,u,f=0,d=!1,l=!1,p=!0;if("function"!=typeof e)throw new TypeError(o);function v(t){var n=r,o=i;return r=i=void 0,f=t,a=e.apply(o,n)}function w(e){var n=e-u;return void 0===u||n>=t||n<0||l&&e-f>=s}function C(){var e=g();if(w(e))return x(e);c=setTimeout(C,function(e){var n=t-(e-u);return l?m(n,s-(e-f)):n}(e))}function x(e){return c=void 0,p&&r?v(e):(r=i=void 0,a)}function A(){var e=g(),n=w(e);if(r=arguments,i=this,u=e,n){if(void 0===c)return function(e){return f=e,c=setTimeout(C,t),d?v(e):a}(u);if(l)return c=setTimeout(C,t),v(u)}return void 0===c&&(c=setTimeout(C,t)),a}return t=b(t)||0,y(n)&&(d=!!n.leading,s=(l="maxWait"in n)?h(b(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p),A.cancel=function(){void 0!==c&&clearTimeout(c),f=0,r=u=i=c=void 0},A.flush=function(){return void 0===c?a:x(g())},A}(e,t,{leading:r,maxWait:t,trailing:i})}},3435:function(e,t,n){var o=n(6890),r=n(9484),i=n(7215),s=n(7811),a=n(747);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}c.prototype.clear=o,c.prototype.delete=r,c.prototype.get=i,c.prototype.has=s,c.prototype.set=a,e.exports=c},5217:function(e,t,n){var o=n(4412),r=n(8522),i=n(469),s=n(1161),a=n(1441);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}c.prototype.clear=o,c.prototype.delete=r,c.prototype.get=i,c.prototype.has=s,c.prototype.set=a,e.exports=c},5661:function(e,t,n){var o=n(3984)(n(9107),"Map");e.exports=o},3287:function(e,t,n){var o=n(8206),r=n(9768),i=n(6827),s=n(663),a=n(5135);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}c.prototype.clear=o,c.prototype.delete=r,c.prototype.get=i,c.prototype.has=s,c.prototype.set=a,e.exports=c},5963:function(e,t,n){var o=n(3984)(n(9107),"Set");e.exports=o},1641:function(e,t,n){var o=n(3287),r=n(2486),i=n(9361);function s(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new o;++t<n;)this.add(e[t])}s.prototype.add=s.prototype.push=r,s.prototype.has=i,e.exports=s},6711:function(e,t,n){var o=n(9107).Symbol;e.exports=o},3271:function(e,t,n){var o=n(8357);e.exports=function(e,t){return!(null==e||!e.length)&&o(e,t,0)>-1}},7599:function(e){e.exports=function(e,t,n){for(var o=-1,r=null==e?0:e.length;++o<r;)if(n(t,e[o]))return!0;return!1}},14:function(e){e.exports=function(e,t){for(var n=-1,o=null==e?0:e.length,r=Array(o);++n<o;)r[n]=t(e[n],n,e);return r}},4121:function(e,t,n){var o=n(1171)("length");e.exports=o},6008:function(e){e.exports=function(e){return e.split("")}},4767:function(e,t,n){var o=n(8330);e.exports=function(e,t){for(var n=e.length;n--;)if(o(e[n][0],t))return n;return-1}},6917:function(e){e.exports=function(e,t,n,o){for(var r=e.length,i=n+(o?1:-1);o?i--:++i<r;)if(t(e[i],i,e))return i;return-1}},6522:function(e,t,n){var o=n(6711),r=n(905),i=n(2588),s=o?o.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?r(e):i(e)}},8357:function(e,t,n){var o=n(6917),r=n(3001),i=n(5957);e.exports=function(e,t,n){return t==t?i(e,t,n):o(e,r,n)}},3001:function(e){e.exports=function(e){return e!=e}},2249:function(e,t,n){var o=n(8148),r=n(1398),i=n(5603),s=n(1543),a=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,f=c.toString,d=u.hasOwnProperty,l=RegExp("^"+f.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||r(e))&&(o(e)?l:a).test(s(e))}},131:function(e,t,n){var o=n(6522),r=n(2620);e.exports=function(e){return r(e)&&"[object RegExp]"==o(e)}},1171:function(e){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},4198:function(e){e.exports=function(e,t,n){var o=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(n=n>r?r:n)<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(r);++o<r;)i[o]=e[o+t];return i}},8354:function(e,t,n){var o=n(6711),r=n(14),i=n(2003),s=n(6596),a=o?o.prototype:void 0,c=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return r(t,e)+"";if(s(t))return c?c.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},9070:function(e,t,n){var o=n(8882),r=/^\s+/;e.exports=function(e){return e?e.slice(0,o(e)+1).replace(r,""):e}},2347:function(e){e.exports=function(e){return function(t){return e(t)}}},7971:function(e,t,n){var o=n(1641),r=n(3271),i=n(7599),s=n(7585),a=n(7455),c=n(5841);e.exports=function(e,t,n){var u=-1,f=r,d=e.length,l=!0,p=[],v=p;if(n)l=!1,f=i;else if(d>=200){var h=t?null:a(e);if(h)return c(h);l=!1,f=s,v=new o}else v=t?[]:p;e:for(;++u<d;){var m=e[u],g=t?t(m):m;if(m=n||0!==m?m:0,l&&g==g){for(var y=v.length;y--;)if(v[y]===g)continue e;t&&v.push(g),p.push(m)}else f(v,g,n)||(v!==p&&v.push(g),p.push(m))}return p}},7585:function(e){e.exports=function(e,t){return e.has(t)}},9304:function(e,t,n){var o=n(4198);e.exports=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:o(e,t,n)}},3887:function(e,t,n){var o=n(9107)["__core-js_shared__"];e.exports=o},7455:function(e,t,n){var o=n(5963),r=n(1700),i=n(5841),s=o&&1/i(new o([,-0]))[1]==1/0?function(e){return new o(e)}:r;e.exports=s},2718:function(e,t,n){var o="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=o},6929:function(e,t,n){var o=n(9732);e.exports=function(e,t){var n=e.__data__;return o(t)?n["string"==typeof t?"string":"hash"]:n.map}},3984:function(e,t,n){var o=n(2249),r=n(1074);e.exports=function(e,t){var n=r(e,t);return o(n)?n:void 0}},905:function(e,t,n){var o=n(6711),r=Object.prototype,i=r.hasOwnProperty,s=r.toString,a=o?o.toStringTag:void 0;e.exports=function(e){var t=i.call(e,a),n=e[a];try{e[a]=void 0;var o=!0}catch(e){}var r=s.call(e);return o&&(t?e[a]=n:delete e[a]),r}},1074:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},4188:function(e){var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},6890:function(e,t,n){var o=n(6060);e.exports=function(){this.__data__=o?o(null):{},this.size=0}},9484:function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},7215:function(e,t,n){var o=n(6060),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(o){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return r.call(t,e)?t[e]:void 0}},7811:function(e,t,n){var o=n(6060),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return o?void 0!==t[e]:r.call(t,e)}},747:function(e,t,n){var o=n(6060);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=o&&void 0===t?"__lodash_hash_undefined__":t,this}},9732:function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},1398:function(e,t,n){var o,r=n(3887),i=(o=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"";e.exports=function(e){return!!i&&i in e}},4412:function(e){e.exports=function(){this.__data__=[],this.size=0}},8522:function(e,t,n){var o=n(4767),r=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=o(t,e);return!(n<0||(n==t.length-1?t.pop():r.call(t,n,1),--this.size,0))}},469:function(e,t,n){var o=n(4767);e.exports=function(e){var t=this.__data__,n=o(t,e);return n<0?void 0:t[n][1]}},1161:function(e,t,n){var o=n(4767);e.exports=function(e){return o(this.__data__,e)>-1}},1441:function(e,t,n){var o=n(4767);e.exports=function(e,t){var n=this.__data__,r=o(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}},8206:function(e,t,n){var o=n(3435),r=n(5217),i=n(5661);e.exports=function(){this.size=0,this.__data__={hash:new o,map:new(i||r),string:new o}}},9768:function(e,t,n){var o=n(6929);e.exports=function(e){var t=o(this,e).delete(e);return this.size-=t?1:0,t}},6827:function(e,t,n){var o=n(6929);e.exports=function(e){return o(this,e).get(e)}},663:function(e,t,n){var o=n(6929);e.exports=function(e){return o(this,e).has(e)}},5135:function(e,t,n){var o=n(6929);e.exports=function(e,t){var n=o(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}},6060:function(e,t,n){var o=n(3984)(Object,"create");e.exports=o},8315:function(e,t,n){e=n.nmd(e);var o=n(2718),r=t&&!t.nodeType&&t,i=r&&e&&!e.nodeType&&e,s=i&&i.exports===r&&o.process,a=function(){try{return i&&i.require&&i.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a},2588:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9107:function(e,t,n){var o=n(2718),r="object"==typeof self&&self&&self.Object===Object&&self,i=o||r||Function("return this")();e.exports=i},2486:function(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},9361:function(e){e.exports=function(e){return this.__data__.has(e)}},5841:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},5957:function(e){e.exports=function(e,t,n){for(var o=n-1,r=e.length;++o<r;)if(e[o]===t)return o;return-1}},627:function(e,t,n){var o=n(4121),r=n(4188),i=n(1313);e.exports=function(e){return r(e)?i(e):o(e)}},2562:function(e,t,n){var o=n(6008),r=n(4188),i=n(9712);e.exports=function(e){return r(e)?i(e):o(e)}},1543:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},8882:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},1313:function(e){var t="\\ud800-\\udfff",n="["+t+"]",o="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",i="[^"+t+"]",s="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",c="(?:"+o+"|"+r+")?",u="[\\ufe0e\\ufe0f]?",f=u+c+"(?:\\u200d(?:"+[i,s,a].join("|")+")"+u+c+")*",d="(?:"+[i+o+"?",o,s,a,n].join("|")+")",l=RegExp(r+"(?="+r+")|"+d+f,"g");e.exports=function(e){for(var t=l.lastIndex=0;l.test(e);)++t;return t}},9712:function(e){var t="\\ud800-\\udfff",n="["+t+"]",o="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",i="[^"+t+"]",s="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",c="(?:"+o+"|"+r+")?",u="[\\ufe0e\\ufe0f]?",f=u+c+"(?:\\u200d(?:"+[i,s,a].join("|")+")"+u+c+")*",d="(?:"+[i+o+"?",o,s,a,n].join("|")+")",l=RegExp(r+"(?="+r+")|"+d+f,"g");e.exports=function(e){return e.match(l)||[]}},8330:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},2003:function(e){var t=Array.isArray;e.exports=t},8148:function(e,t,n){var o=n(6522),r=n(5603);e.exports=function(e){if(!r(e))return!1;var t=o(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},5603:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},2620:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},3773:function(e,t,n){var o=n(131),r=n(2347),i=n(8315),s=i&&i.isRegExp,a=s?r(s):o;e.exports=a},6596:function(e,t,n){var o=n(6522),r=n(2620);e.exports=function(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==o(e)}},1700:function(e){e.exports=function(){}},3950:function(e,t,n){var o=n(3920);e.exports=function(e){return e?Infinity===(e=o(e))||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},8007:function(e,t,n){var o=n(3950);e.exports=function(e){var t=o(e),n=t%1;return t==t?n?t-n:t:0}},3920:function(e,t,n){var o=n(9070),r=n(5603),i=n(6596),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=o(e);var n=a.test(e);return n||c.test(e)?u(e.slice(2),n?2:8):s.test(e)?NaN:+e}},7060:function(e,t,n){var o=n(8354);e.exports=function(e){return null==e?"":o(e)}},9442:function(e,t,n){var o=n(8354),r=n(9304),i=n(4188),s=n(5603),a=n(3773),c=n(627),u=n(2562),f=n(8007),d=n(7060),l=/\w*$/;e.exports=function(e,t){var n=30,p="...";if(s(t)){var v="separator"in t?t.separator:v;n="length"in t?f(t.length):n,p="omission"in t?o(t.omission):p}var h=(e=d(e)).length;if(i(e)){var m=u(e);h=m.length}if(n>=h)return e;var g=n-c(p);if(g<1)return p;var y=m?r(m,0,g).join(""):e.slice(0,g);if(void 0===v)return y+p;if(m&&(g+=y.length-g),a(v)){if(e.slice(g).search(v)){var b,w=y;for(v.global||(v=RegExp(v.source,d(l.exec(v))+"g")),v.lastIndex=0;b=v.exec(w);)var C=b.index;y=y.slice(0,void 0===C?g:C)}}else if(e.indexOf(o(v),g)!=g){var x=y.lastIndexOf(v);x>-1&&(y=y.slice(0,x))}return y+p}},1285:function(e,t,n){var o=n(7971);e.exports=function(e){return e&&e.length?o(e):[]}},6151:function(e){var t=1e3,n=60*t,o=60*n,r=24*o;function i(e,t,n,o){var r=t>=1.5*n;return Math.round(e/n)+" "+o+(r?"s":"")}e.exports=function(e,s){s=s||{};var a,c,u=typeof e;if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var i=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(i){var s=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*r;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===u&&isFinite(e))return s.long?(a=e,(c=Math.abs(a))>=r?i(a,c,r,"day"):c>=o?i(a,c,o,"hour"):c>=n?i(a,c,n,"minute"):c>=t?i(a,c,t,"second"):a+" ms"):function(e){var i=Math.abs(e);return i>=r?Math.round(e/r)+"d":i>=o?Math.round(e/o)+"h":i>=n?Math.round(e/n)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},6186:function(e){"use strict";var t=[];function n(e){for(var n=-1,o=0;o<t.length;o++)if(t[o].identifier===e){n=o;break}return n}function o(e,o){for(var i={},s=[],a=0;a<e.length;a++){var c=e[a],u=o.base?c[0]+o.base:c[0],f=i[u]||0,d="".concat(u," ").concat(f);i[u]=f+1;var l=n(d),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==l)t[l].references++,t[l].updater(p);else{var v=r(p,o);o.byIndex=a,t.splice(a,0,{identifier:d,updater:v,references:1})}s.push(d)}return s}function r(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,r){var i=o(e=e||[],r=r||{});return function(e){e=e||[];for(var s=0;s<i.length;s++){var a=n(i[s]);t[a].references--}for(var c=o(e,r),u=0;u<i.length;u++){var f=n(i[u]);0===t[f].references&&(t[f].updater(),t.splice(f,1))}i=c}}},7433:function(e){"use strict";var t={};e.exports=function(e,n){var o=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},8990:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},8626:function(e,t,n){"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},2155:function(e){"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var o="";n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,r&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},9827:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={id:o,loaded:!1,exports:{}};return e[o](i,i.exports,n),i.loaded=!0,i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},n.nc=void 0;var o={};return function(){"use strict";n.r(o),n.d(o,{init:function(){return N}});var e=n(1931),t=n.n(e);const r=e=>{if("object"==typeof e&&null!==e){if("function"==typeof Object.getPrototypeOf){const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}return"[object Object]"===Object.prototype.toString.call(e)}return!1},i=(...e)=>e.reduce(((e,t)=>{if(Array.isArray(t))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(t).forEach((n=>{["__proto__","constructor","prototype"].includes(n)||(Array.isArray(e[n])&&Array.isArray(t[n])?e[n]=i.options.mergeArrays?i.options.uniqueArrayItems?Array.from(new Set(e[n].concat(t[n]))):[...e[n],...t[n]]:t[n]:r(e[n])&&r(t[n])?e[n]=i(e[n],t[n]):e[n]=void 0===t[n]?i.options.allowUndefinedOverrides?t[n]:e[n]:t[n])})),e}),{}),s={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};i.options=s,i.withOptions=(e,...t)=>{i.options=Object.assign(Object.assign({},s),e);const n=i(...t);return i.options=s,n};var a=i;n(9442),n(1285);const c="https://channels-ws.moveo.ai",u="https://web-client.dev.moveo.ai",f=()=>window.innerWidth<650||window.innerHeight<550&&window.innerWidth<1e3,d=(e,t)=>{var n,o;const r=null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.type;return"string"==typeof r&&r.startsWith(e)?{type:r.replace(e,""),data:null===(o=t.data)||void 0===o?void 0:o.data}:null};var l,p=/bot|crawl|http|lighthouse|scan|search|spider/i;var v,h,m,g,y,b=n(7967),w=n.n(b),C=n(9572),x=n.n(C);!function(e){e.Open="open",e.Resolved="closed",e.Expired="expired",e.Spam="spam",e.Trash="trash"}(v||(v={})),function(e){e.IframeLoaded="moveo-iframe-loaded",e.IframeError="moveo-iframe-error",e.WidgetLoaded="moveo-widget-loaded",e.WidgetError="moveo-widget-error",e.Opened="moveo-widget-opened",e.Closed="moveo-widget-closed",e.Resize="moveo-widget-resize",e.LocaleChanged="moveo-widget-locale-changed",e.SessionCreated="moveo-widget-session-created",e.SessionReconnected="moveo-widget-session-reconnected",e.SessionClosed="moveo-widget-session-closed",e.ConversationClosed="moveo-widget-conversation-closed",e.LinkClicked="moveo-widget-link-clicked",e.ConversationUnreadMessages="moveo-conversation-unread-messages",e.ConversationNoUnreadMessages="moveo-conversation-no-unread-messages",e.UserWayInit="moveo-userway-init"}(h||(h={})),function(e){e.SetConfig="moveo-set-config",e.SetLocale="moveo-set-locale",e.SetCssVariables="moveo-set-css-variables",e.Open="moveo-open",e.Close="moveo-close",e.CloseConversation="moveo-close-conversation",e.SendMessage="moveo-send-message",e.UpdateContext="moveo-update-context",e.WindowResize="moveo-resize",e.SessionActivity="session-activity",e.UserWayDisabled="userway-disabled",e.UserWayEnabled="userway-enabled",e.LinkClicked="link-clicked"}(m||(m={})),function(e){e.Expired="expired",e.Survey="survey",e.SurveyFull="survey-full",e.Closing="closing",e.Resolved="closed",e.Inactivity="inactivity"}(g||(g={})),function(e){e.MinimizeButton="minimize-btn",e.CloseButton="close-btn",e.EndSessionButton="end-btn",e.LauncherButton="launcher-btn",e.MessageInput="message-input",e.DisclaimerCheck="disclaimer-check",e.DisclaimerContainer="disclaimer-container",e.HeaderContainer="header-container",e.ImageButton="image-btn"}(y||(y={}));const A=["s2","s3","s4","s6","s7","s10","s12","s13","s14","s15","s16","s17","s19","s23"];class _{constructor(e){this.detectUserway=()=>{A.forEach((e=>{document.addEventListener(`userway:feature_enabled_${e}`,(()=>{var t;const n=null!==(t=localStorage.getItem(`userway-${e}`))&&void 0!==t?t:"";this.sendEventToIframe({type:m.UserWayEnabled,data:{eventType:e,value:n}})})),document.addEventListener(`userway:feature_disabled_${e}`,(()=>{this.sendEventToIframe({type:m.UserWayDisabled,data:{eventType:e}})}))}))},this.initUserway=()=>{const e=Object.assign({},localStorage);Object.keys(e).forEach((t=>{const n=(e[t],e[t]);if(t.includes("userway-s")&&(!isNaN(parseInt(n))||"true"===n)){const e=t.split("-")[1];"0"===n?this.sendEventToIframe({type:m.UserWayDisabled,data:{eventType:e}}):this.sendEventToIframe({type:m.UserWayEnabled,data:{eventType:e,value:n}})}}))},this.detectMobile=()=>{this.sendEventToIframe({type:m.WindowResize,data:{is_mobile:f(),width:window.innerWidth,height:window.innerHeight}}),this.isMobile=f()},this.trackActivity=()=>{const e=x()((()=>{this.sendEventToIframe({type:m.SessionActivity,data:"active"})}),3e3);window.onload=e,window.onmousemove=e,window.onmousedown=e,window.ontouchstart=e,window.ontouchmove=e,window.onclick=e,window.onkeydown=e,window.addEventListener("scroll",e,!0)},this.config=e,this.id=e.widgetId,this.initialized=!1,this.log=t()(`moveo:web-client:${this.id}`),this.iframe=this.createIframe(),this.isMobile=null}createIframe(){const e=document.createElement("iframe");return e.width="1px",e.height="1px",e.title="Moveo webchat",e.id=this.id,e.name=this.id,e.allow="geolocation",e.style.border="0",e.classList.add("web-client-container"),"embed"===this.config.widget_position&&e.classList.add("embed"),e.setAttribute("src",(e=>{let t="";const n=document.querySelectorAll("script"),o=/@moveo-ai\/web-client.*next/;n&&n.forEach((e=>{var n;(null===(n=e.src)||void 0===n?void 0:n.match(o))&&(t=u)}));const{origin:r}=window.location;return t||(t=r.match(/localhost:8880/)||r.match(/web-client.*moveo-ai\.vercel\.app/)?r:r.match(/web-client\.dev/)?u:"https://web-client.moveo.ai"),`${t}?widgetId=${e}`})(this.id)),e}handleEvents(e,t){return n=>{const o=d(this.id,n);if(o)switch(o.type){case h.IframeLoaded:this.sendEventToIframe({type:m.SetConfig,data:this.config});break;case h.IframeError:return t(o.data);case h.UserWayInit:this.initUserway(),this.detectUserway();case h.WidgetLoaded:setTimeout((()=>{this.detectMobile(),e(this)}),0);break;case h.WidgetError:this.notify(o);break;case h.Opened:(o.data.isFull||o.data.is_mobile)&&this.iframe.classList.add("full");break;case h.Closed:o.data.isFull&&this.iframe.classList.remove("full");break;case h.Resize:this.iframe.style.width=o.data.width,this.iframe.style.height=o.data.height,this.iframe.style.left=o.data.left;break;default:this.log(`Unhandle event: ${o.type}`)}}}init(){return new Promise(((e,t)=>{var n,o,r;if(r=navigator.userAgent,Boolean(r)&&function(){if(l instanceof RegExp)return l;try{l=new RegExp(" daum[ /]| deusu/| yadirectfetcher|(?:^|[^g])news(?!sapphire)|(?<! (?:channel/|google/))google(?!(app|/google| pixel))|(?<! cu)bots?(?:\\b|_)|(?<!(?:lib))http|(?<![hg]m)score|@[a-z][\\w-]+\\.|\\(\\)|\\.com\\b|\\btime/|^<|^[\\w \\.\\-\\(?:\\):]+(?:/v?\\d+(?:\\.\\d+)?(?:\\.\\d{1,10})*?)?(?:,|$)|^[^ ]{50,}$|^\\d+\\b|^\\w*search\\b|^\\w+/[\\w\\(\\)]*$|^active|^ad muncher|^amaya|^avsdevicesdk/|^biglotron|^bot|^bw/|^clamav[ /]|^client/|^cobweb/|^custom|^ddg[_-]android|^discourse|^dispatch/\\d|^downcast/|^duckduckgo|^facebook|^getright/|^gozilla/|^hobbit|^hotzonu|^hwcdn/|^jeode/|^jetty/|^jigsaw|^microsoft bits|^movabletype|^mozilla/5\\.0\\s[a-z\\.-]+$|^mozilla/\\d\\.\\d \\(compatible;?\\)$|^mozilla/\\d\\.\\d \\w*$|^navermailapp|^netsurf|^offline|^owler|^php|^postman|^python|^rank|^read|^reed|^rest|^rss|^snapchat|^space bison|^svn|^swcd |^taringa|^thumbor/|^track|^valid|^w3c|^webbandit/|^webcopier|^wget|^whatsapp|^wordpress|^xenu link sleuth|^yahoo|^yandex|^zdm/\\d|^zoom marketplace/|^{{.*}}$|adscanner/|analyzer|archive|ask jeeves/teoma|bit\\.ly/|bluecoat drtr|browsex|burpcollaborator|capture|catch|check\\b|checker|chrome-lighthouse|chromeframe|classifier|cloudflare|convertify|crawl|cypress/|dareboost|datanyze|dejaclick|detect|dmbrowser|download|evc-batch/|exaleadcloudview|feed|firephp|functionize|gomezagent|headless|httrack|hubspot marketing grader|hydra|ibisbrowser|images|infrawatch|insight|inspect|iplabel|ips-agent|java(?!;)|jsjcw_scanner|library|linkcheck|mail\\.ru/|manager|measure|neustar wpm|node|nutch|offbyone|optimize|pageburst|pagespeed|parser|perl|phantomjs|pingdom|powermarks|preview|proxy|ptst[ /]\\d|reputation|resolver|retriever|rexx;|rigor|rss\\b|scanner\\.|scrape|server|sogou|sparkler/|speedcurve|spider|splash|statuscake|supercleaner|synapse|synthetic|tools|torrent|trace|transcoder|url|virtuoso|wappalyzer|webglance|webkit2png|whatcms/|zgrab","i")}catch(e){l=p}return l}().test(r))throw new Error(`Widget ${this.id} was not initialized because user-agent is a bot`);if(this.initialized)throw new Error(`Widget ${this.id} was already initialized`);if(window.addEventListener("message",this.handleEvents(e,t)),window.addEventListener("resize",w()(this.detectMobile,100)),this.trackActivity(),"embed"===this.config.widget_position){let e=(null===(n=this.config)||void 0===n?void 0:n.element)||null;if("string"==typeof e&&(e=document.getElementById(e),!e))throw new Error(`Element with id: ${e} not found`);null==e||e.appendChild(this.iframe)}else null===(o=window.document.querySelector("body"))||void 0===o||o.appendChild(this.iframe);this.initialized=!0,this.detectMobile()}))}sendEventToIframe(e){var t;this.iframe&&this.iframe.contentWindow?(this.log(`Event to iframe: ${e.type}`,e),e.type===m.SetConfig&&(null===(t=e.data)||void 0===t?void 0:t.element)&&delete e.data.element,this.iframe.contentWindow.postMessage(Object.assign(Object.assign({},e),{type:`${this.id}${e.type}`}),"*")):this.log("Error: Cannot find iframe to send event")}notify(e){this.log(`notify ${e.type}:`,e)}notifyParent(e,t){window.addEventListener("message",(n=>{const o=d(this.id,n);o&&(this.log(`Event from iframe: ${o.type}`,o),o.type===e&&("data"in o?t(o.data):t()))}))}openWindow(){this.sendEventToIframe({type:m.Open})}async destroy(){this.closeConversation({hide:!0}),await(4e3,new Promise((e=>setTimeout(e,4e3))));const e=document.getElementById(this.id);e&&(e.remove(),this.initialized=!1)}closeConversation({hide:e}){this.sendEventToIframe({type:m.CloseConversation,data:{hide:e}})}closeWindow(){this.sendEventToIframe({type:m.Close})}sendMessage(e){this.sendEventToIframe({type:m.SendMessage,data:e})}updateContext(e){this.sendEventToIframe({type:m.UpdateContext,data:e})}setCSSVariables(e){this.sendEventToIframe({type:m.SetCssVariables,data:e})}setLocale(e){this.sendEventToIframe({type:m.SetLocale,data:e})}onSessionCreated(e){this.notifyParent(h.SessionCreated,e)}onSessionClosed(e){this.notifyParent(h.SessionClosed,e)}onConversationClosed(e){this.notifyParent(h.ConversationClosed,e)}onSessionReconnected(e){this.notifyParent(h.SessionReconnected,e)}onNoUnreadMessages(e){this.notifyParent(h.ConversationNoUnreadMessages,e)}onUnreadMessages(e){this.notifyParent(h.ConversationUnreadMessages,e)}onLinkClicked(e){this.notifyParent(h.LinkClicked,e)}}var j=n(6186),E=n.n(j),F=n(2155),O=n.n(F),I=n(7433),S=n.n(I),k=n(8626),T=n.n(k),z=n(8990),$=n.n(z),M=n(9827),L=n.n(M),U=n(6384),P={};P.styleTagTransform=L(),P.setAttributes=T(),P.insert=S().bind(null,"head"),P.domAPI=O(),P.insertStyleElement=$(),E()(U.A,P),U.A&&U.A.locals&&U.A.locals;let R=t()("moveo:web-client");const W=async e=>{const t=`moveo-${((e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t})(5)}`,n=window.location.href;if(R=R.extend(`:${t}`),!(null==e?void 0:e.integrationId))throw new Error("integrationId is required.\n Call MoveoAI.init({ integrationId: YOUR_INTEGRATION_HERE })");const o=await(async(e,t)=>{const n=t||c,o=await fetch(`${n}/v1/web/${e}`),r=await o.text();if(o.ok)return JSON.parse(r);throw new Error(`Error loading config from: ${n}/${e}`)})(e.integrationId,e.host);return R("Loaded integration configuration:",o),Object.assign(Object.assign({},a(Object.assign({},o),e)),{clientUrl:n,widgetId:t})},N=async e=>{await new Promise((e=>{if("complete"===document.readyState)return e();window.addEventListener("load",(()=>e()))}));const t=await W(e);if(R("Configuration:",t),"embed"===t.widget_position&&!t.element)throw new Error("element is not defined but required by embed widget");const n=new _(t);R("Initializing");const o=await n.init();return R("Initialized"),o}}(),o}()}));
3
3
  //# sourceMappingURL=web-client.min.js.map
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @moveo-ai/web-client v0.74.0
3
+ * @moveo-ai/web-client v0.75.0-true.2
4
4
  * Copyright (c) Moveo.ai (TM)
5
5
  *
6
6
  */