���ѧۧݧ�ӧ�� �ާ֧ߧ֧էا֧� - ���֧էѧܧ�ڧ��ӧѧ�� - /home/alphpwcp/public_html/us/alphachat/design/defaulttheme/js/widgetv2/react.app.js
���ѧ٧ѧ�
/*! For license information please see react.app.js.LICENSE.txt */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.LHCReactAPP=t():e.LHCReactAPP=t()}(self,(function(){return function(){var __webpack_modules__={45:function(e,t,a){"use strict";a.d(t,{A:function(){return i}});var n=a(8587);function i(e,t){if(null==e)return{};var a,i,r=(0,n.A)(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)a=s[i],-1===t.indexOf(a)&&{}.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}},201:function(e,t,a){"use strict";a.d(t,{A:function(){return i}});var n=a(4467);function i(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?Object(arguments[t]):{},i=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable}))),i.forEach((function(t){(0,n.A)(e,t,a[t])}))}return e}},296:function(e,t,a){"use strict";a.d(t,{A:function(){return i}});var n=a(7800);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,i,r,s,o=[],c=!0,l=!1;try{if(r=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;c=!1}else for(;!(c=(n=r.call(a)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=a.return&&(s=a.return(),Object(s)!==s))return}finally{if(l)throw i}}return o}}(e,t)||(0,n.A)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},321:function(e,t,a){"use strict";var n=a(8168),i=a(3029),r=a(2901),s=a(6822),o=a(3954),c=a(5361),l=a(4467),d=a(6540),u=a(1083),h=a(900),p=a(6524),g=a(3422),_=a.n(g),f=a(961);function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}var v=function(e){function t(e){var a,n,r,c;return(0,i.A)(this,t),n=this,r=t,c=[e],r=(0,o.A)(r),a=(0,s.A)(n,m()?Reflect.construct(r,c||[],(0,o.A)(n).constructor):r.apply(n,c)),(0,l.A)(a,"state",{body:null}),(0,l.A)(a,"dismissModal",(function(e){a.props.toggle(),e&&e.stopPropagation()})),(0,l.A)(a,"generalOnClick",(function(e){var t=a.props.t,n=e["data-bb-code"];if(e["data-promt"]&&"img"==e["data-promt"])n=(i=prompt(t("bbcode.img_link")))?"["+n+"]"+i+"[/"+n+"]":"";else if(e["data-promt"]&&"url"==e["data-promt"]){var i;n=(i=prompt(t("bbcode.link")))?"[url="+i+"]"+t("bbcode.link_here")+"[/url]":""}a.props.insertText(n),a.props.toggle()})),(0,l.A)(a,"generalDataActionClick",(function(e,t){e["data-action"]&&a.props[e["data-action"]]&&a.props[e["data-action"]](e["data-action-arg"]||null),t&&t.stopPropagation()})),a}return(0,c.A)(t,e),(0,r.A)(t,[{key:"componentDidMount",value:function(){var e=this;u.A.get(window.lhcChat.base_url+this.props.dataUrl).then((function(t){(0,f.flushSync)((function(){e.setState({body:t.data})}));var n=document.getElementById("dialog-content"),i=a(4395),r=n.querySelectorAll('[data-bs-toggle="tab"]');if(r.length>0){var s=0;Array.prototype.forEach.call(r,(function(e){e.tabItem=new i(e)}));var o=new(_())(".tab-content");o.onSwipeLeft((function(){s=s<r.length-1?s+1:0,r[s].tabItem.show()})),o.onSwipeRight((function(){s=s>0?s-1:r.length-1,r[s].tabItem.show()}))}})).catch((function(e){console.log(e)}))}},{key:"render",value:function(){var e=this;return d.createElement(d.Fragment,null,null!==this.state.body&&d.createElement("div",{className:"fade modal-backdrop show"}),null!==this.state.body&&d.createElement("div",{role:"dialog",id:"dialog-content","aria-modal":"true",className:"fade modal show d-block",tabIndex:"-1"},(0,h.Ay)(this.state.body,{replace:function(t){if(t.attribs&&"react-close-modal"===t.attribs.id)return d.createElement("button",{tabIndex:"0",type:"button",className:"btn-close float-end","data-bs-dismiss":"modal",onClick:e.dismissModal,"aria-label":"Close"});if(t.attribs&&t.attribs.linkaction)return t.attribs.class&&(t.attribs.className=t.attribs.class,delete t.attribs.class),d.createElement("a",(0,n.A)({},t.attribs,{onClick:function(a){return e.generalDataActionClick(t.attribs,a)}}),(0,h.zd)(t.children));if(t.attribs&&t.attribs.bbitem)return t.attribs.class&&(t.attribs.className=t.attribs.class,delete t.attribs.class),d.createElement("a",(0,n.A)({},t.attribs,{onKeyDown:function(a){"Enter"===a.key&&(a.preventDefault(),e.generalOnClick(t.attribs))},onClick:function(a){return e.generalOnClick(t.attribs)}}),(0,h.zd)(t.children));if(t.type&&"tag"===t.type&&t.name&&"input"==t.name&&t.attribs&&t.attribs.type&&"button"==t.attribs.type)return t.attribs.class&&(t.attribs.className=t.attribs.class,delete t.attribs.class),d.createElement("input",(0,n.A)({},t.attribs,{onClick:function(a){return e.generalDataActionClick(t.attribs,a)}}));if(t.type&&"script"===t.type){if(t.children.length>0)setTimeout((function(){var e=document.createElement("script");e.appendChild(document.createTextNode(t.children[0].data)),document.getElementsByTagName("head").item(0).appendChild(e)}),500);else if(t.attribs&&t.attribs.src){var a=document.createElement("script");a.src=t.attribs.src,a.type="text/javascript",document.getElementsByTagName("head").item(0).appendChild(a)}return d.createElement(d.Fragment,null)}}})))}}])}(d.PureComponent);t.A=(0,p.C)()(v)},467:function(e,t,a){"use strict";function n(e,t,a,n,i,r,s){try{var o=e[r](s),c=o.value}catch(e){return void a(e)}o.done?t(c):Promise.resolve(c).then(n,i)}function i(e){return function(){var t=this,a=arguments;return new Promise((function(i,r){var s=e.apply(t,a);function o(e){n(s,i,r,o,c,"next",e)}function c(e){n(s,i,r,o,c,"throw",e)}o(void 0)}))}}a.d(t,{A:function(){return i}})},579:function(e,t,a){var n=a(3738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],a=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}}}throw new TypeError(n(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},816:function(e,t,a){"use strict";a.d(t,{A:function(){return i}});var n=a(2284);function i(e){var t=function(e){if("object"!=(0,n.A)(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var a=t.call(e,"string");if("object"!=(0,n.A)(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==(0,n.A)(t)?t:t+""}},887:function(e,t,a){var n=a(6993),i=a(1791);e.exports=function(e,t,a,r,s){return new i(n().w(e,t,a,r),s||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},951:function(e,t,a){"use strict";var n=a(3029),i=a(2901),r=a(6822),s=a(3954),o=a(5361),c=a(6540);function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}var d=function(e){function t(){return(0,n.A)(this,t),e=this,a=t,i=arguments,a=(0,s.A)(a),(0,r.A)(e,l()?Reflect.construct(a,i||[],(0,s.A)(e).constructor):a.apply(e,i));var e,a,i}return(0,o.A)(t,e),(0,i.A)(t,[{key:"render",value:function(){var e=this.props,t=e.text,a=e.onTextChange,n=e.textareaRef,i=e.classNameText,r=e.textPlaceholder,s=e.onTextKeyDown,o=e.onTextFocus,l=e.textAutoFocus,d=e.textMaxLength,u=e.onTextTouchStart,h=e.onTextKeyUp,p=e.textReadOnly;return c.createElement("textarea",{onChange:a,"aria-label":"Type your message here...",id:"CSChatMessage",rows:"1",onTouchStart:u,maxLength:d,autoFocus:l,ref:n,value:t,onKeyUp:h,onKeyDown:s,onFocus:o,className:i,placeholder:r,readOnly:p})}}])}(c.Component);t.A=d},1133:function(e,t,a){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var a=null;if(!e||"string"!=typeof e)return a;var n=(0,i.default)(e),r="function"==typeof t;return n.forEach((function(e){if("declaration"===e.type){var n=e.property,i=e.value;r?t(n,i,e):i&&((a=a||{})[n]=i)}})),a};var i=n(a(9788))},1141:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){void 0===n&&(n=a);var i=Object.getOwnPropertyDescriptor(t,a);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(e,n,i)}:function(e,t,a,n){void 0===n&&(n=a),e[n]=t[a]}),i=this&&this.__exportStar||function(e,t){for(var a in e)"default"===a||Object.prototype.hasOwnProperty.call(t,a)||n(t,e,a)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var r=a(5413),s=a(6957);i(a(6957),t);var o={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},c=function(){function e(e,t,a){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(a=t,t=o),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:o,this.elementCB=null!=a?a:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var a=this.options.xmlMode?r.ElementType.Tag:void 0,n=new s.Element(e,t,void 0,a);this.addNode(n),this.tagStack.push(n)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===r.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var a=new s.Text(e);this.addNode(a),this.lastNode=a}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===r.ElementType.Comment)this.lastNode.data+=e;else{var t=new s.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new s.Text(""),t=new s.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var a=new s.ProcessingInstruction(e,t);this.addNode(a)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],a=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),a&&(e.prev=a,a.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=c,t.default=c},1708:function(e,t,a){"use strict";var n=a(3029),i=a(2901),r=a(6822),s=a(3954),o=a(5361),c=a(4467),l=a(6540),d=a(6524);function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}var h=function(e){function t(e){var a,i,o,l;return(0,n.A)(this,t),i=this,o=t,l=[e],o=(0,s.A)(o),a=(0,r.A)(i,u()?Reflect.construct(o,l||[],(0,s.A)(i).constructor):o.apply(i,l)),(0,c.A)(a,"state",{hiddenIfPrefilled:!1}),a.onchangeAttr=a.onchangeAttr.bind(a),a.onFileAdded=a.onFileAdded.bind(a),a}return(0,o.A)(t,e),(0,i.A)(t,[{key:"onchangeAttr",value:function(e){if(this.props.onChangeContent({id:this.props.field.get("name"),value:e.value,field:this.props.field}),"dropdown"==this.props.field.get("type")){var t=parseInt(e.target.options[e.target.selectedIndex].getAttribute("dep-id"));t>0&&this.props.onChangeContent({id:"DepartamentID",value:t,subject_id:e.target.options[e.target.selectedIndex].getAttribute("subject-id")})}}},{key:"onFileAdded",value:function(e){for(var t=this,a=e.target.files,n=[],i=0;i<a.length;i++)n.push(a.item(i));if(0==a.length)return null;var r=new RegExp("(.|/)("+this.props.field.get("ft_us")+")$","i"),s=this.props.t,o=[];n.forEach((function(e){r.test(e.type)||r.test(e.name)||o.push(e.name+": "+s("file.incorrect_type")),e.size>t.props.field.get("fs")&&o.push(e.name+": "+s("file.to_big_file"))})),o.length>0?alert(o.join("\n")):this.props.onChangeContent({id:this.props.field.get("name"),value:n[0],field:this.props.field})}},{key:"componentDidMount",value:function(){var e=this;"checkbox"==this.props.field.get("type")&&1==this.props.field.get("default")?this.props.onChangeContent({id:this.props.field.get("name"),value:!0}):"dropdown"!=this.props.field.get("type")&&"text"!=this.props.field.get("type")||(this.props.onChangeContent({id:this.props.field.get("name"),value:this.props.defaultValueField}),this.props.field.has("hide_prefilled")&&1==this.props.field.get("hide_prefilled")&&!1===this.props.isInvalid&&this.props.field.get("value")&&this.setState({hiddenIfPrefilled:!0}),"dropdown"==this.props.field.get("type")&&this.props.field.get("options").map((function(t){t.get("value")==e.props.defaultValueField&&t.get("dep_id")&&e.props.onChangeContent({set_default:!0,id:"DepartamentID",subject_id:t.has("subject_id")?t.get("subject_id"):null,value:t.get("dep_id")})}))),this.props.attrPrefill&&(this.props.attrPrefill.attr_prefill_admin&&this.props.attrPrefill.attr_prefill_admin.forEach((function(t){(t.index==e.props.field.get("identifier")||e.props.field.has("identifier_prefill")&&t.index==e.props.field.get("identifier_prefill"))&&(e.props.onChangeContent({id:e.props.field.get("name"),value:t.value}),e.props.field.has("hide_prefilled")&&1==e.props.field.get("hide_prefilled")&&!1===e.props.isInvalid&&e.setState({hiddenIfPrefilled:!0}))})),this.props.attrPrefill.attr_prefill&&this.props.attrPrefill.attr_prefill.forEach((function(t){if(e.props.field.has("identifier")){var a=e.props.field.get("identifier");t[a[0].toUpperCase()+a.slice(1)]&&e.props.field.has("hide_prefilled")&&1==e.props.field.get("hide_prefilled")&&!1===e.props.isInvalid&&e.setState({hiddenIfPrefilled:!0})}})))}},{key:"render",value:function(){var e=this;if(!0===this.state.hiddenIfPrefilled&&!0!==this.props.isInvalid)return null;var t="col-"+this.props.field.get("width"),a=!0===this.props.field.get("required"),n=[];if(""!=this.props.field.get("class")&&n.push(this.props.field.get("class")),!0===this.props.isInvalid&&n.push("is-invalid"),"text"==this.props.field.get("type"))return l.createElement("div",{className:t},l.createElement("div",{className:"form-group"},l.createElement("label",{className:"control-label"},this.props.field.get("label"),!0===a?"*":""),l.createElement("input",{type:"text",className:n.join(" "),required:a,onChange:function(t){return e.onchangeAttr({value:t.target.value})},name:this.props.field.get("name"),defaultValue:this.props.defaultValueField,placeholder:this.props.field.get("placeholder")}),!0===this.props.validationError?l.createElement("div",{class:"invalid-feedback"},this.props.validationError):""));if("password"==this.props.field.get("type"))return l.createElement("div",{className:t},l.createElement("div",{className:"form-group"},l.createElement("label",{className:"control-label"},this.props.field.get("label"),!0===a?"*":""),l.createElement("input",{type:"password",autocomplete:"new-password",className:n.join(" "),required:a,onChange:function(t){return e.onchangeAttr({value:t.target.value})},name:this.props.field.get("name"),defaultValue:this.props.defaultValueField,placeholder:this.props.field.get("placeholder")}),!0===this.props.validationError&&this.props.validationError?l.createElement("div",{class:"invalid-feedback"},this.props.validationError):""));if("textarea"==this.props.field.get("type"))return l.createElement("div",{className:t},l.createElement("div",{className:"form-group"},!this.props.chatUI.has("hide_message_label")&&"question"==this.props.field.get("identifier")&&l.createElement("label",{className:"control-label"},this.props.field.get("label"),!0===a?"*":""),l.createElement("textarea",{maxLength:"Question"==this.props.field.get("name")?this.props.chatUI.get("max_length"):null,className:n.join(" "),required:a,onChange:function(t){return e.onchangeAttr({value:t.target.value})},name:this.props.field.get("name"),defaultValue:this.props.defaultValueField,placeholder:this.props.field.get("placeholder")}),this.props.validationError?l.createElement("div",{class:"invalid-feedback"},this.props.validationError):""));if("file"==this.props.field.get("type"))return l.createElement("div",{className:t},l.createElement("div",{className:"form-group overflow-hidden"},l.createElement("label",{className:"control-label"},this.props.field.get("label"),!0===a?"*":""),l.createElement("input",{type:"file",onChange:function(t){return e.onFileAdded(t)},className:this.props.field.get("class"),required:a,name:this.props.field.get("name")}),this.props.validationError?l.createElement("div",{class:"invalid-feedback"},this.props.validationError):""));if("checkbox"==this.props.field.get("type"))return l.createElement("div",{className:t},l.createElement("div",{className:"form-group"},l.createElement("div",{className:"form-check"},l.createElement("input",{className:n.join(" "),id:"check-for-"+this.props.field.get("name"),defaultChecked:this.props.field.get("default"),type:"checkbox",value:"on",onChange:function(t){return e.onchangeAttr({value:t.target.checked})},required:a,name:this.props.field.get("name")}),l.createElement("label",{className:"form-check-label",for:"check-for-"+this.props.field.get("name"),dangerouslySetInnerHTML:{__html:this.props.field.get("label")}}),!0===this.props.validationError?l.createElement("div",{class:"invalid-feedback"},this.props.validationError):"")));if("hidden"==this.props.field.get("type"))return l.createElement("input",{type:"hidden",className:n.join(" "),required:a,onChange:function(t){return e.onchangeAttr({value:t.target.value})},name:this.props.field.get("name"),defaultValue:this.props.defaultValueField,placeholder:this.props.field.get("placeholder")});if("dropdown"==this.props.field.get("type")){var i=this.props.field.get("options").map((function(t){return l.createElement("option",{key:"opt-drop-"+t.get("value"),"subject-id":t.has("subject_id")?t.get("subject_id"):null,"dep-id":t.get("dep_id"),selected:e.props.defaultValueField==t.get("value"),value:t.get("value")},t.get("name"))}));return l.createElement("div",{className:t},l.createElement("div",{className:"form-group"},l.createElement("label",{className:"control-label"},this.props.field.get("label"),!0===a?"*":""),l.createElement("select",{className:n.join(" "),required:a,onChange:function(t){return e.onchangeAttr({target:t.target,value:t.target.value})},name:this.props.field.get("name"),defaultValue:this.props.defaultValueField},i),!0===this.props.validationError?l.createElement("div",{class:"invalid-feedback"},this.props.validationError):""))}return console.log("Unknown field"),null}}])}(l.Component);t.A=(0,d.C)()(h)},1791:function(e,t,a){var n=a(5172),i=a(5546);e.exports=function e(t,a){function r(e,i,s,o){try{var c=t[e](i),l=c.value;return l instanceof n?a.resolve(l.v).then((function(e){r("next",e,s,o)}),(function(e){r("throw",e,s,o)})):a.resolve(l).then((function(e){c.value=e,s(c)}),(function(e){return r("throw",e,s,o)}))}catch(e){o(e)}}var s;this.next||(i(e.prototype),i(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",(function(){return this}))),i(this,"_invoke",(function(e,t,n){function i(){return new a((function(t,a){r(e,n,t,a)}))}return s=s?s.then(i,i):i()}),!0)},e.exports.__esModule=!0,e.exports.default=e.exports},2210:function(e,t,a){var n;!function(t){"use strict";function i(){}var r=i.prototype,s=t.EventEmitter;function o(e,t){for(var a=e.length;a--;)if(e[a].listener===t)return a;return-1}function c(e){return function(){return this[e].apply(this,arguments)}}function l(e){return"function"==typeof e||e instanceof RegExp||!(!e||"object"!=typeof e)&&l(e.listener)}r.getListeners=function(e){var t,a,n=this._getEvents();if(e instanceof RegExp)for(a in t={},n)n.hasOwnProperty(a)&&e.test(a)&&(t[a]=n[a]);else t=n[e]||(n[e]=[]);return t},r.flattenListeners=function(e){var t,a=[];for(t=0;t<e.length;t+=1)a.push(e[t].listener);return a},r.getListenersAsObject=function(e){var t,a=this.getListeners(e);return a instanceof Array&&((t={})[e]=a),t||a},r.addListener=function(e,t){if(!l(t))throw new TypeError("listener must be a function");var a,n=this.getListenersAsObject(e),i="object"==typeof t;for(a in n)n.hasOwnProperty(a)&&-1===o(n[a],t)&&n[a].push(i?t:{listener:t,once:!1});return this},r.on=c("addListener"),r.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},r.once=c("addOnceListener"),r.defineEvent=function(e){return this.getListeners(e),this},r.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},r.removeListener=function(e,t){var a,n,i=this.getListenersAsObject(e);for(n in i)i.hasOwnProperty(n)&&-1!==(a=o(i[n],t))&&i[n].splice(a,1);return this},r.off=c("removeListener"),r.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},r.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},r.manipulateListeners=function(e,t,a){var n,i,r=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(n=a.length;n--;)r.call(this,t,a[n]);else for(n in t)t.hasOwnProperty(n)&&(i=t[n])&&("function"==typeof i?r.call(this,n,i):s.call(this,n,i));return this},r.removeEvent=function(e){var t,a=typeof e,n=this._getEvents();if("string"===a)delete n[e];else if(e instanceof RegExp)for(t in n)n.hasOwnProperty(t)&&e.test(t)&&delete n[t];else delete this._events;return this},r.removeAllListeners=c("removeEvent"),r.emitEvent=function(e,t){var a,n,i,r,s=this.getListenersAsObject(e);for(r in s)if(s.hasOwnProperty(r))for(a=s[r].slice(0),i=0;i<a.length;i++)!0===(n=a[i]).once&&this.removeListener(e,n.listener),n.listener.apply(this,t||[])===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},r.trigger=c("emitEvent"),r.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},r.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},r._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},r._getEvents=function(){return this._events||(this._events={})},i.noConflict=function(){return t.EventEmitter=s,i},void 0===(n=function(){return i}.call(t,a,t,e))||(e.exports=n)}("undefined"!=typeof window?window:this||{})},2284:function(e,t,a){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}a.d(t,{A:function(){return n}})},2374:function(e,t,a){"use strict";var n=a(296),i=a(3029),r=a(2901),s=a(6822),o=a(3954),c=a(5361),l=a(6540);function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}a(1225);var u=function(e){function t(e){return(0,i.A)(this,t),a=this,n=t,r=[e],n=(0,o.A)(n),(0,s.A)(a,d()?Reflect.construct(n,r||[],(0,o.A)(a).constructor):n.apply(a,r));var a,n,r}return(0,c.A)(t,e),(0,r.A)(t,[{key:"render",value:function(){var e=this.props.errors.mapEntries((function(e){var t=(0,n.A)(e,2),a=t[0],i=t[1];if("captcha"==a||"blocked_user"==a||!isNaN(a))return[l.createElement("li",null,i)]}));return e.size>0?l.createElement("div",{"data-alert":"",className:"mt-2 ps-4 py-1 alert alert-danger alert-dismissible fade show"},l.createElement("ul",{className:"ps-1 m-0"},e)):null}}])}(l.Component);t.A=u},2471:function(e,t,a){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(s),a=t?t[1]:void 0;return(0,r.formatDOM)((0,i.default)(e),null,a)};var i=n(a(5496)),r=a(7731),s=/<(![a-zA-Z\s]+)>/},2799:function(e,t){"use strict";var a=60103,n=60106,i=60107,r=60108,s=60114,o=60109,c=60110,l=60112,d=60113,u=60120,h=60115,p=60116;if("function"==typeof Symbol&&Symbol.for){var g=Symbol.for;a=g("react.element"),n=g("react.portal"),i=g("react.fragment"),r=g("react.strict_mode"),s=g("react.profiler"),o=g("react.provider"),c=g("react.context"),l=g("react.forward_ref"),d=g("react.suspense"),u=g("react.suspense_list"),h=g("react.memo"),p=g("react.lazy"),g("react.block"),g("react.server.block"),g("react.fundamental"),g("react.debug_trace_mode"),g("react.legacy_hidden")}t.isContextConsumer=function(e){return function(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case a:switch(e=e.type){case i:case s:case r:case d:case u:return e;default:switch(e=e&&e.$$typeof){case c:case l:case p:case h:case o:return e;default:return t}}case n:return t}}}(e)===c}},2812:function(e,t,a){"use strict";var n=a(3029),i=a(2901),r=a(6822),s=a(3954),o=a(5361),c=a(6540),l=a(6524),d=a(5580),u=a(1225);function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}var p=function(e){function t(e){var a,i,o,c;return(0,n.A)(this,t),i=this,o=t,c=[e],o=(0,s.A)(o),(a=(0,r.A)(i,h()?Reflect.construct(o,c||[],(0,s.A)(i).constructor):o.apply(i,c))).onchangeAttr=a.onchangeAttr.bind(a),a.onchangeAttrProduct=a.onchangeAttrProduct.bind(a),a}return(0,o.A)(t,e),(0,i.A)(t,[{key:"onchangeAttr",value:function(e){this.props.onChangeContent({id:"DepartamentID",value:e.value}),!0===this.props.departments.getIn(["settings","product_by_department"])&&this.props.dispatch((0,d.d$)({dep_id:e.value}))}},{key:"onchangeAttrProduct",value:function(e){this.props.onChangeContent({id:"ProductID",value:e.value})}},{key:"componentDidMount",value:function(){!0!==this.props.departments.getIn(["settings","product"])||!0!==this.props.departments.getIn(["settings","product_by_department"])&&!this.props.departments.has("products")||this.props.onChangeContent({id:"HasProductID",value:!0}),0!=this.props.departments.get("departments").size&&(1!=this.props.departments.get("departments").size&&this.props.departments.hasIn(["settings","optional"])?this.props.departments.get("departments").size>1&&this.onchangeAttr({value:-1}):this.onchangeAttr({value:this.props.setDefaultValue||this.props.departments.getIn(["departments",0]).get("value")}))}},{key:"render",value:function(){var e=this,t=this.props.t,a=null;if(this.props.departments.get("departments").size>1&&!this.props.departments.hasIn(["settings","hide_department"])){var n=["form-control","form-control-sm"];!0===this.props.isInvalid&&n.push("is-invalid");var i=this.props.departments.get("departments").map((function(e){return c.createElement("option",{key:"dep-"+e.get("value"),value:e.get("value")},e.get("name")," ",e.get("online")?"":t("department.offline"))}));a=c.createElement("div",{className:"form-group"},c.createElement("label",{className:"control-label"},this.props.departments.getIn(["settings","label"]),"*"),c.createElement("select",{id:"id-department-field",defaultValue:this.props.setDefaultValue||this.props.defaultValueField,className:n.join(" "),onChange:function(t){return e.onchangeAttr({value:t.target.value})}},this.props.departments.hasIn(["settings","optional"])&&c.createElement("option",{value:"-1"},this.props.departments.getIn(["settings","optional"])),i))}var r=null;if(!0===this.props.departments.getIn(["settings","product"])){var s=["form-control","form-control-sm"];!0===this.props.isInvalidProduct&&s.push("is-invalid");var o=this.props.departments.has("products")?this.props.departments.get("products").map((function(e){return c.createElement("option",{key:"product-"+e.get("value"),value:e.get("value")},e.get("name"))})):"";this.props.departments.has("products")&&this.props.departments.get("products").size>0&&(r=c.createElement("div",{className:"form-group"},c.createElement("label",{className:"control-label"},t("department.product"),!0===this.props.departments.getIn(["settings","product_required"])?"*":""),c.createElement("select",{className:s.join(" "),onChange:function(t){return e.onchangeAttrProduct({value:t.target.value})}},c.createElement("option",{value:""},t("department.choose_a_product")),o)))}return null!==r||null!==a?c.createElement("div",{className:"col-12"},a,r):null}}])}(c.Component);t.A=(0,u.Ng)()((0,l.C)()(p))},2828:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(8168),_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(3029),_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(2901),_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(6822),_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(3954),_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(5361),_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(4467),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(6540),html_react_parser__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(900),react_redux__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(1225),_actions_chatActions__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(5580),_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(7912),_dec,_class;function _callSuper(e,t,a){return t=(0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_0__.A)(t),(0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_1__.A)(e,_isNativeReflectConstruct()?Reflect.construct(t,a||[],(0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_0__.A)(e).constructor):t.apply(e,a))}function _isNativeReflectConstruct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_isNativeReflectConstruct=function(){return!!e})()}var ChatBotIntroMessage=(_dec=(0,react_redux__WEBPACK_IMPORTED_MODULE_4__.Ng)((function(e){return{chatwidget:e.chatwidget}})),_dec(_class=function(_PureComponent){function ChatBotIntroMessage(e){var t;return(0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_7__.A)(this,ChatBotIntroMessage),t=_callSuper(this,ChatBotIntroMessage,[e]),(0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__.A)(t,"state",{value:""}),t.abstractClick=t.abstractClick.bind(t),t.updateTriggerClicked=t.updateTriggerClicked.bind(t),t.processBotAction=t.processBotAction.bind(t),t.disableEditor=!1,t}return(0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_9__.A)(ChatBotIntroMessage,_PureComponent),(0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_10__.A)(ChatBotIntroMessage,[{key:"getDirectInnerText",value:function(e){for(var t=e.childNodes,a="",n=0;n<t.length;n++)3==t[n].nodeType&&(a+=t[n].data.trim());return a}},{key:"addLoader",value:function(e,t){1!=this.props.printButton||e["data-no-msg"]||"button"!=e.type&&"A"!==t.tagName||(this.setState({value:this.getDirectInnerText(t)}),"A"!==t.tagName&&this.removeMetaMessage(e["data-id"])),e["data-no-msg"]&&!e["data-no-change"]&&"button"==e.type&&(t.setAttribute("disabled","disabled"),t.innerHTML='<i class="material-icons"></i>'+t.innerHTML)}},{key:"removeMetaMessage",value:function(e){var t=document.getElementById("messages-scroll");if(t){var a,n=t.getElementsByClassName("meta-message-"+e);for(a=0;a<n.length;a++)n[a].parentNode.removeChild(n[a])}}},{key:"abstractClick",value:function(e,t){var a=this.props.t;if(this.addLoader(e,t.target),-1!==e.onclick.indexOf("lhinst.updateTriggerClicked"))this.updateTriggerClicked({type:"triggerclicked"},e,t.target);else if(-1!==e.onclick.indexOf("notificationsLHC.sendNotification"));else if(-1!==e.onclick.indexOf("lhinst.buttonClicked"))this.updateTriggerClicked({type:""},e,t.target);else if(-1!==e.onclick.indexOf("lhinst.updateChatClicked"))this.updateTriggerClicked({type:"",mainType:"updatebuttonclicked"},e,t.target);else if(-1!==e.onclick.indexOf("lhinst.executeJS"))(0,_actions_chatActions__WEBPACK_IMPORTED_MODULE_5__.tl)(e,this);else if(-1!==e.onclick.indexOf("lhinst.editGenericStep"))this.updateTriggerClicked({type:"editgenericstep"},e,t.target);else if(-1!==e.onclick.indexOf("lhinst.dropdownClicked")){var n=document.getElementById("id_generic_list-"+e["data-id"]);n&&"0"!=n.value&&""!=n.value?(e["data-payload"]=n.value,this.updateTriggerClicked({type:"valueclicked"},e,t.target)):alert(a("bot.please_choose"))}else _lib_helperFunctions__WEBPACK_IMPORTED_MODULE_6__.q.emitEvent("MessageClick",[e,this.props.dispatch]),console.log("Unknown click event: "+e.onclick);t.preventDefault()}},{key:"updateTriggerClicked",value:function(e,t,a){this.props.setBotPayload({type:e.type,payload:t["data-payload"],id:t["data-id"],processed:void 0===t["data-keep"]})}},{key:"processBotAction",value:function processBotAction(domNode){var attr=domNode.attribs;"lhinst.disableVisitorEditor"==attr["data-bot-action"]?(this.disableEditor=!0,this.props.setTextAreaHidden&&this.props.setTextAreaHidden()):"lhinst.setDelay"==attr["data-bot-action"]||"execute-js"==attr["data-bot-action"]&&eval(domNode.children[0].data)}},{key:"render",value:function(){var e=this,t=(0,html_react_parser__WEBPACK_IMPORTED_MODULE_3__.Ay)(this.props.content,{replace:function(t){if(t.attribs){var a=Object.assign({},t.attribs);if(t.attribs.onclick&&delete t.attribs.onclick,t.attribs.class&&(t.attribs.className=t.attribs.class,-1!==t.attribs.className.indexOf("message-row")&&(t.attribs.className+=" index-row-0"),delete t.attribs.class),t.name&&"button"===t.name){if(a.onclick)return react__WEBPACK_IMPORTED_MODULE_2__.createElement("button",(0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_11__.A)({},t.attribs,{onClick:function(t){return e.abstractClick(a,t)}}),(0,html_react_parser__WEBPACK_IMPORTED_MODULE_3__.zd)(t.children))}else if(t.name&&"a"===t.name){if(a.onclick)return react__WEBPACK_IMPORTED_MODULE_2__.createElement("a",(0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_11__.A)({},t.attribs,{onClick:function(t){return e.abstractClick(a,t)}}),(0,html_react_parser__WEBPACK_IMPORTED_MODULE_3__.zd)(t.children));if(e.props.embedMode&&"widget"==e.props.embedMode&&e.props.targetSame&&a.target&&"_blank"==a.target&&t.attribs.href){var n=t.attribs.href,i=window.parent.location.host;if(n.startsWith("http://".concat(i))||n.startsWith("https://".concat(i)))return t.attribs.target="_top",e.props.isMobile?react__WEBPACK_IMPORTED_MODULE_2__.createElement("a",(0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_11__.A)({},t.attribs,{onClick:function(t){return e.props.minimizeWidget()}}),(0,html_react_parser__WEBPACK_IMPORTED_MODULE_3__.zd)(t.children)):react__WEBPACK_IMPORTED_MODULE_2__.createElement("a",t.attribs,(0,html_react_parser__WEBPACK_IMPORTED_MODULE_3__.zd)(t.children))}}else t.name&&"script"===t.name&&t.attribs["data-bot-action"]&&e.processBotAction(t)}}});return react__WEBPACK_IMPORTED_MODULE_2__.createElement(react__WEBPACK_IMPORTED_MODULE_2__.Fragment,null,t,""!=this.state.value&&react__WEBPACK_IMPORTED_MODULE_2__.createElement("div",{"data-op-id":"0",className:"message-row response msg-to-store index-row-0"},react__WEBPACK_IMPORTED_MODULE_2__.createElement("div",{className:"msg-body"},this.state.value.split("\n").map((function(e,t){return react__WEBPACK_IMPORTED_MODULE_2__.createElement(react__WEBPACK_IMPORTED_MODULE_2__.Fragment,{key:t},e,react__WEBPACK_IMPORTED_MODULE_2__.createElement("br",null))})))))}}])}(react__WEBPACK_IMPORTED_MODULE_2__.PureComponent))||_class);__webpack_exports__.A=ChatBotIntroMessage},2901:function(e,t,a){"use strict";a.d(t,{A:function(){return r}});var n=a(816);function i(e,t){for(var a=0;a<t.length;a++){var i=t[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(0,n.A)(i.key),i)}}function r(e,t,a){return t&&i(e.prototype,t),a&&i(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}},3029:function(e,t,a){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}a.d(t,{A:function(){return n}})},3044:function(e,t,a){"use strict";a.d(t,{A:function(){return O}});var n=a(3029),i=a(2901),r=a(6822),s=a(3954),o=a(5361),c=a(4467),l=a(6540),d=a(1225),u=a(6524),h=a(1708),p=a(2374),g=a(2812),_=a(321);function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(f=function(){return!!e})()}var m=function(e){function t(e){return(0,n.A)(this,t),a=this,i=t,o=[e],i=(0,s.A)(i),(0,r.A)(a,f()?Reflect.construct(i,o||[],(0,s.A)(a).constructor):i.apply(a,o));var a,i,o}return(0,o.A)(t,e),(0,i.A)(t,[{key:"componentDidMount",value:function(){(this.props.bbEnabled?1:0)+(this.props.langEnabled?1:0)>1&&new(a(8943))(document.getElementById("chat-dropdown-options"))}},{key:"render",value:function(){var e=this,t=this.props.t;if(1==(this.props.bbEnabled?1:0)+(this.props.langEnabled?1:0)){if(this.props.bbEnabled)return l.createElement("div",{className:"disable-select ps-1 pt-2"},l.createElement("button",{onClick:function(t){return e.props.toggleModal()},title:t("button.bb_code"),type:"button",className:"border-0 p-0 material-icons settings text-muted bbcode-ico",id:"chat-dropdown-options",role:"button",tabIndex:"0"},""));if(this.props.langEnabled)return l.createElement("div",{className:"disable-select ps-1 pt-2"},l.createElement("button",{onClick:function(t){return e.props.changeLanguage()},title:t("button.lang"),type:"button",className:"border-0 p-0 material-icons settings text-muted lang-ico",id:"chat-dropdown-options",role:"button",tabIndex:"0"},""))}return l.createElement("div",{className:"btn-group dropup disable-select ps-1 pt-2"},l.createElement("button",{type:"button",className:"border-0 p-0 material-icons settings text-muted",id:"chat-dropdown-options",role:"button","data-bs-toggle":"dropdown",tabIndex:"0","aria-haspopup":"true","aria-expanded":"false"},""),l.createElement("div",{className:"dropdown-menu shadow bg-white lhc-dropdown-menu rounded ms-1"},l.createElement("div",{className:"d-flex flex-row px-1"},this.props.bbEnabled&&l.createElement("a",{tabIndex:"0",onKeyPress:function(t){"Enter"===t.key&&e.props.toggleModal()},onClick:function(t){return e.props.toggleModal()},title:t("button.bb_code")},l.createElement("i",{className:"material-icons chat-setting-item text-muted me-0 bbcode-ico"},"")),this.props.langEnabled&&l.createElement("a",{tabIndex:"0",onKeyPress:function(t){"Enter"===t.key&&e.props.changeLanguage()},onClick:this.props.changeLanguage,title:t("button.lang")},l.createElement("i",{className:"material-icons chat-setting-item text-muted me-0 lang-ico"},"")))))}}])}(l.PureComponent),v=(0,u.C)()(m),w=a(7912),y=a(2828);function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}var E,I=function(e){function t(e){return(0,n.A)(this,t),a=this,i=t,o=[e],i=(0,s.A)(i),(0,r.A)(a,b()?Reflect.construct(i,o||[],(0,s.A)(a).constructor):i.apply(a,o));var a,i,o}return(0,o.A)(t,e),(0,i.A)(t,[{key:"componentDidMount",value:function(){w.q.sendMessageParent("readInvitation",[{name:this.props.invitation.invitation_name||"Manual"}])}},{key:"render",value:function(){return"message"==this.props.mode?l.createElement(l.Fragment,null,this.props.invitation.prev_msg&&l.createElement(y.A,{printButton:!1,setBotPayload:this.props.setBotPayload,content:this.props.invitation.prev_msg}),this.props.invitation.message&&l.createElement("div",{className:"message-row message-admin"},l.createElement("span",{className:"usr-tit op-tit"},l.createElement("i",{title:this.props.invitation.name_support||this.props.invitation.extra_profile,className:"chat-operators mi-fs15 me-0"},this.props.invitation.bubble&&this.props.invitation.photo&&l.createElement("img",{src:this.props.invitation.photo,alt:"",className:"profile-msg-pic"}),(!this.props.invitation.photo||!this.props.invitation.bubble)&&l.createElement("i",{className:"material-icons "+(this.props.invitation.bubble?"icon-assistant me-0":"")},"")),!this.props.invitation.bubble&&(this.props.invitation.name_support||this.props.invitation.extra_profile)),l.createElement("div",{className:"msg-body",dangerouslySetInnerHTML:{__html:this.props.invitation.message}})),this.props.invitation.message_full&&l.createElement(y.A,{printButton:!1,setBotPayload:this.props.setBotPayload,content:this.props.invitation.message_full})):l.createElement(l.Fragment,null,l.createElement("div",{id:"lhc-profile-body"},l.createElement("div",{id:"chat-status-container",className:"operator-info d-flex border-bottom p-2"},l.createElement("div",null,this.props.invitation.photo&&l.createElement("img",{width:"48",height:"48",src:this.props.invitation.photo,title:this.props.invitation.photo_title,alt:""}),!this.props.invitation.photo&&l.createElement("i",{className:"icon-assistant material-icons me-0"},"")),l.createElement("div",{className:"p-1 ps-2 w-100"},this.props.invitation.name_support&&!this.props.invitation.hide_name&&l.createElement("div",{className:"fw-bold"},this.props.invitation.name_support),this.props.invitation.extra_profile&&l.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.invitation.extra_profile}})))),"profile_only"!=this.props.mode&&this.props.invitation.message&&l.createElement("div",{id:"messagesBlock"},l.createElement("div",{className:"bottom-message position-relative"},l.createElement("div",{className:"message-row message-admin pt-1 text-left ms-3"},l.createElement("div",{className:"msg-body",dangerouslySetInnerHTML:{__html:this.props.invitation.message}})))))}}])}(l.PureComponent),A=a(5802),S=a(951),D=a(5580);function x(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function C(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?x(Object(a),!0).forEach((function(t){(0,c.A)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):x(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(T=function(){return!!e})()}var k=(0,d.Ng)((function(e){return{chatwidget:e.chatwidget}}))(E=function(e){function t(e){var a,i,o,d;return(0,n.A)(this,t),i=this,o=t,d=[e],o=(0,s.A)(o),a=(0,r.A)(i,T()?Reflect.construct(o,d||[],(0,s.A)(i).constructor):o.apply(i,d)),(0,c.A)(a,"insertText",(function(e){var t=a.textMessageRef.current.selectionStart;a.setState({Question:a.state.Question.substring(0,t)+e+a.state.Question.substring(t)})})),a.apiLoaded=!1,a.customHTMLPriority=!1,a.state={showBBCode:null,Question:"",changeLanguage:!1,hasBotData:!1,textAreaHidden:!1},a.botPayload=null,a.handleSubmit=a.handleSubmit.bind(a),a.enterKeyDown=a.enterKeyDown.bind(a),a.handleContentChange=a.handleContentChange.bind(a),a.handleContentChangeCustom=a.handleContentChangeCustom.bind(a),a.setBotPayload=a.setBotPayload.bind(a),a.toggleModal=a.toggleModal.bind(a),a.setLanguageAction=a.setLanguageAction.bind(a),a.changeLanguage=a.changeLanguage.bind(a),a.textMessageRef=a.props.textMessageRef,a.messagesAreaRef=l.createRef(),w.q.eventEmitter.addListener("startChat",(function(){return a.handleSubmit()})),a}return(0,o.A)(t,e),(0,i.A)(t,[{key:"changeLanguage",value:function(){this.setState({changeLanguage:!this.state.changeLanguage})}},{key:"setLanguageAction",value:function(e){w.q.setLocalStorage("_lng",e),this.setState({changeLanguage:!1}),w.q.emitEvent("change_language",[e])}},{key:"toggleModal",value:function(){this.setState({showBBCode:!this.state.showBBCode})}},{key:"enterKeyDown",value:function(e){"Enter"!==e.key||e.shiftKey||(this.handleSubmit(e),e.preventDefault())}},{key:"handleSubmit",value:function(e){if(0==this.props.chatwidget.get("processStatus")){var t=document.getElementById("CSChatMessage");null!==t&&(t.focus(),this.props.setHideMessageField(!1));var a=C({},this.state);a.jsvar=this.props.chatwidget.get("jsVars"),a.vars_encrypted=this.props.chatwidget.get("vars_encrypted"),a["captcha_"+this.props.chatwidget.getIn(["captcha","hash"])]=this.props.chatwidget.getIn(["captcha","ts"]),a.tscaptcha=this.props.chatwidget.getIn(["captcha","ts"]),a.user_timezone=w.q.getTimeZone(),a.URLRefer="";try{var n=window.parent.location!==window.parent.parent.location;if(void 0===window.lhcChat||"popup"!=window.lhcChat.mode&&"embed"!=window.lhcChat.mode||null===window.opener&&window.parent.opener,n)a.URLRefer=parent.location.href.substring(parent.location.protocol.length);else{var i=null;i=null!==window.opener?window.opener:window.parent,a.URLRefer=i.location.href.substring(i.location.protocol.length)}}catch(e){try{a.URLRefer=String(window.document.location)}catch(e){}}"blank"==a.URLRefer&&(a.URLRefer=""),a.r=this.props.chatwidget.get("ses_ref"),""!=this.props.chatwidget.get("subject_id")&&(a.subject_id=this.props.chatwidget.get("subject_id")),""!=this.props.chatwidget.get("bot_id")&&(a.bot_id=this.props.chatwidget.get("bot_id")),""!=this.props.chatwidget.get("trigger_id")&&(a.trigger_id=this.props.chatwidget.get("trigger_id")),""!=this.props.chatwidget.get("operator")&&(a.operator=this.props.chatwidget.get("operator")),null!==this.props.chatwidget.get("pvhash")&&(a.pvhash=this.props.chatwidget.get("pvhash")),null!==this.props.chatwidget.get("priority")&&(a.priority=this.props.chatwidget.get("priority")),null!==this.props.chatwidget.get("phash")&&(a.phash=this.props.chatwidget.get("phash"));var r=w.q.getCustomFieldsSubmit(this.props.chatwidget.getIn(["customData","fields"]));null!==r&&(a=C(C({},a),r));var s="";try{s=window.parent.location.origin}catch(e){}var o={department:this.props.chatwidget.get("department"),theme:this.props.chatwidget.get("theme"),mode:this.props.chatwidget.get("mode"),vid:this.props.chatwidget.get("vid"),fields:a,host:s};w.q.setSessionStorage("_ttxt",""),this.botPayload?(o.bpayload=this.botPayload,this.botPayload=null,this.setState({hasBotData:!0}),o.fields.Question&&(w.q.setSessionStorage("_ttxt",o.fields.Question),o.fields.Question="")):this.setState({hasBotData:!1}),!0===this.props.chatwidget.hasIn(["proactive","data","invitation_id"])&&(o.invitation_id=this.props.chatwidget.getIn(["proactive","data","invitation_id"])),this.props.dispatch((0,D.ag)(o)),e&&e.preventDefault()}}},{key:"handleContentChange",value:function(e){var t=this;if(0==this.props.chatwidget.get("processStatus")){var a=this.state;a[e.id]=e.value,this.setState(a),"DepartamentID"==e.id&&(e.set_default&&this.props.dispatch({type:"dep_default",data:e.value}),e.subject_id?this.props.dispatch({type:"subject_id",data:e.subject_id}):this.props.dispatch({type:"subject_id",data:""}),this.props.chatwidget.getIn(["onlineData","department","departments"]).size>0&&this.props.chatwidget.getIn(["onlineData","department","departments"]).map((function(a){a.get("value")==e.value&&(0==a.get("online")&&(t.props.dispatch({type:"dep_default",data:e.value}),t.props.dispatch({type:"onlineStatus",data:!1})),t.props.chatwidget.getIn(["onlineData","dep_forms"])!=e.value&&t.updateOnlineFieldsInit(e.value))}))),"Question"==e.id&&(!0===this.props.chatwidget.getIn(["proactive","has"])&&""!=e.value&&1===this.props.chatwidget.getIn(["chat_ui","proactive_once_typed"])&&1===this.props.chatwidget.getIn(["chat_ui","custom_html_priority"])?(this.props.dispatch({type:"attr_set",attr:["chat_ui","custom_html_priority"],data:0}),this.customHTMLPriority=!0):""==e.value&&1==this.customHTMLPriority&&this.props.dispatch({type:"attr_set",attr:["chat_ui","custom_html_priority"],data:1}))}}},{key:"handleContentChangeCustom",value:function(e){this.props.dispatch({type:"CUSTOM_FIELDS_ITEM",data:{id:e.field.get("index"),value:e.value}})}},{key:"componentDidMount",value:function(){var e=this;w.q.prefillFields(this),this.updateOnlineFields(),null!==this.props.botPayload&&setTimeout((function(){e.setBotPayload(e.props.botPayload)}),10)}},{key:"componentWillUnmount",value:function(){null===document.getElementById("CSChatMessage")?this.props.setHideMessageField(!0):this.props.setHideMessageField(!1)}},{key:"setBotPayload",value:function(e){this.botPayload=e,this.handleSubmit()}},{key:"updateOnlineFieldsInit",value:function(e){this.props.dispatch((0,D._t)({department:this.props.chatwidget.get("department"),product:this.props.chatwidget.get("product"),theme:this.props.chatwidget.get("theme"),mode:this.props.chatwidget.get("mode"),pvhash:this.props.chatwidget.get("pvhash"),phash:this.props.chatwidget.get("phash"),bot_id:this.props.chatwidget.get("bot_id"),trigger_id:this.props.chatwidget.get("trigger_id"),vid:this.props.chatwidget.get("vid"),dep_default:e||this.props.chatwidget.get("departmentDefault")||0,online:1,chat_ui:this.props.chatwidget.get("chat_ui")}))}},{key:"updateOnlineFields",value:function(){!1===this.props.chatwidget.getIn(["onlineData","fetched"])&&this.updateOnlineFieldsInit()}},{key:"componentDidUpdate",value:function(e,t,a){if(this.updateOnlineFields(),document.getElementById("id-container-fluid")&&w.q.sendMessageParent("widgetHeight",[{height:document.getElementById("id-container-fluid").offsetHeight+40}]),1===this.props.chatwidget.get("processStatus")&&1!==e.chatwidget.get("processStatus")){var n=document.getElementById("messagesBlock");null!==n&&(this.props.setMessages(n.innerHTML),this.scrollBottom());var i=document.getElementById("lhc-profile-body");null!==i&&this.props.setProfile(i.innerHTML)}var r=!1;if(!1===this.apiLoaded&&null!==this.props.chatwidget.get("api_data")&&(this.apiLoaded=!0,this.setState(C(C({},this.state),this.props.chatwidget.get("api_data"))),r=!0),(!0===r||0==this.props.chatwidget.get("isMobile")&&!1===e.chatwidget.get("shown")&&!0===this.props.chatwidget.get("shown"))&&"widget"==this.props.chatwidget.get("mode")&&this.textMessageRef.current&&(this.textMessageRef.current.focus(),this.scrollBottom()),!0===this.props.chatwidget.getIn(["onlineData","fetched"])&&!1===e.chatwidget.getIn(["onlineData","fetched"])&&(this.props.chatwidget.hasIn(["chat_ui","uprev"])&&w.q.emitEvent("play_sound",[{type:"new_message",sound_on:!0===this.props.chatwidget.getIn(["usersettings","soundOn"]),widget_open:this.props.chatwidget.get("shown")&&"widget"==this.props.chatwidget.get("mode")||document.hasFocus()}]),this.scrollBottom()),this.props.chatwidget.get("departmentDefault")!==e.chatwidget.get("departmentDefault")){this.setState({DepartamentID:this.props.chatwidget.get("departmentDefault")});var s=document.getElementById("id-department-field");null!==s&&(s.value=this.props.chatwidget.get("departmentDefault")),this.updateOnlineFieldsInit()}}},{key:"scrollBottom",value:function(){var e=this;this.messagesAreaRef.current&&(this.messagesAreaRef.current.scrollTop=this.messagesAreaRef.current.scrollHeight+1e3,setTimeout((function(){e.messagesAreaRef.current&&(e.messagesAreaRef.current.scrollTop=e.messagesAreaRef.current.scrollHeight+1e3)}),450))}},{key:"moveCaretAtEnd",value:function(e){var t=e.target.value;e.target.value="",e.target.value=t}},{key:"render",value:function(){var e=this,t=this.props.t;if(!0===this.props.chatwidget.getIn(["onlineData","fetched"])&&!0===this.props.chatwidget.getIn(["onlineData","disabled"]))return l.createElement("div",{className:"alert alert-danger m-2",role:"alert"},t("start_chat.cant_start_a_chat"));if(!1===this.props.chatwidget.getIn(["onlineData","fetched"])||!0===this.props.chatwidget.getIn(["chat_ui","auto_start"]))return null;if(this.props.chatwidget.getIn(["onlineData","fields"]).size>0&&(!this.props.chatwidget.hasIn(["chat_ui","show_messages_box"])||1!=this.props.chatwidget.getIn(["onlineData","fields_visible"])||0!=this.props.chatwidget.getIn(["customData","fields"]).size))var a=this.props.chatwidget.getIn(["onlineData","fields"]).map((function(t){return l.createElement(h.A,{chatUI:e.props.chatwidget.get("chat_ui"),key:t.get("identifier"),validationError:e.props.chatwidget.hasIn(["validationErrors",t.get("identifier")])?e.props.chatwidget.getIn(["validationErrors",t.get("identifier")]):null,isInvalid:e.props.chatwidget.hasIn(["validationErrors",t.get("identifier")]),defaultValueField:e.state[t.get("name")]||t.get("value"),attrPrefill:{attr_prefill_admin:e.props.chatwidget.get("attr_prefill_admin"),attr_prefill:e.props.chatwidget.get("attr_prefill")},onChangeContent:e.handleContentChange,field:t})}));else a="";var n=!1,i="";if(this.props.chatwidget.getIn(["customData","fields"]).size>0&&(this.props.chatwidget.getIn(["customData","fields"]).map((function(e){return n=!e.has("type")||"hidden"!==e.get("type")||n})),1==n&&(i=this.props.chatwidget.getIn(["customData","fields"]).map((function(t){return l.createElement(h.A,{chatUI:e.props.chatwidget.get("chat_ui"),key:t.get("identifier"),validationError:e.props.chatwidget.hasIn(["validationErrors",t.get("identifier")])?e.props.chatwidget.getIn(["validationErrors",t.get("identifier")]):null,isInvalid:e.props.chatwidget.hasIn(["validationErrors",t.get("identifier")]),defaultValueField:t.get("value"),onChangeContent:e.handleContentChangeCustom,field:t})})))),this.props.chatwidget.hasIn(["onlineData","paid","error"])&&this.props.chatwidget.getIn(["onlineData","paid","error"]))return l.createElement("p",{className:"p-2"},this.props.chatwidget.getIn(["onlineData","paid","message"]));if(this.props.chatwidget.getIn(["chat_ui","disabled"]))return l.createElement(A.A,{closeText:t("button.close"),full_height:!0,close:function(t){return e.props.dispatch((0,D.fJ)(!0))},as_html:!0,text:this.props.chatwidget.getIn(["chat_ui","disabled"])});if(this.props.chatwidget.hasIn(["validationErrors","blocked_user"]))return l.createElement(A.A,{closeText:t("button.close"),full_height:!0,close:function(t){return e.props.dispatch((0,D.fJ)(!0))},as_html:!0,text:this.props.chatwidget.getIn(["validationErrors","blocked_user"])});if(0==this.props.chatwidget.get("processStatus")||1==this.props.chatwidget.get("processStatus")){if(this.props.chatwidget.hasIn(["chat_ui","show_messages_box"])&&this.props.chatwidget.getIn(["onlineData","department","departments"]).size<=1&&this.props.chatwidget.getIn(["onlineData","fields_visible"])<=1&&(0==this.props.chatwidget.getIn(["customData","fields"]).size||!1===n)){var r=this.props.chatwidget.hasIn(["chat_ui","taw"])?this.props.chatwidget.getIn(["chat_ui","taw"]):8.6,s=(!this.props.chatwidget.hasIn(["chat_ui","bbc_btnh"])||this.props.chatwidget.hasIn(["chat_ui","lng_btnh"])?"ps-0":"ps-2")+" no-outline form-control rounded-0 form-control rounded-start-0 rounded-end-0 border-0 "+(!0===this.props.chatwidget.get("shown")&&this.textMessageRef.current&&(/\r|\n/.exec(this.state.Question)||this.state.Question.length>this.textMessageRef.current.offsetWidth/r)?"msg-two-line":"msg-one-line"),o="flex-grow-1 overflow-scroll position-relative",c="bottom-message px-1";return this.props.chatwidget.hasIn(["chat_ui","msg_expand"])&&"embed"==this.props.chatwidget.get("mode")&&(o="overflow-scroll position-relative",c+=" position-relative"),l.createElement(l.Fragment,null,this.state.showBBCode&&l.createElement(_.A,{showModal:this.state.showBBCode,insertText:this.insertText,toggle:this.toggleModal,dataUrl:"/chat/bbcodeinsert?react=1"}),this.state.changeLanguage&&l.createElement(_.A,{showModal:this.state.changeLanguage,setLanguage:this.setLanguageAction,toggle:this.changeLanguage,dataUrl:"/widgetrestapi/chooselanguage"}),!0===this.props.chatwidget.getIn(["proactive","has"])&&!this.props.chatwidget.hasIn(["proactive","data","std_header"])&&l.createElement(I,{mode:"profile_only",invitation:this.props.chatwidget.getIn(["proactive","data"])})||(this.props.chatwidget.hasIn(["chat_ui","pre_chat_html"])||this.props.chatwidget.hasIn(["chat_ui","operator_profile"])&&""!=this.props.chatwidget.getIn(["chat_ui","operator_profile"]))&&l.createElement("div",{id:"lhc-profile-body"},l.createElement("div",{id:"chat-status-container",className:"p-2 border-bottom",dangerouslySetInnerHTML:{__html:(this.props.chatwidget.hasIn(["chat_ui","pre_chat_html"])?this.props.chatwidget.getIn(["chat_ui","pre_chat_html"]):"")+(this.props.chatwidget.hasIn(["chat_ui","operator_profile"])?this.props.chatwidget.getIn(["chat_ui","operator_profile"]):"")}})),l.createElement("div",{className:o,id:"messagesBlock"},l.createElement("div",{className:c,id:"messages-scroll",ref:this.messagesAreaRef},!0===this.props.chatwidget.getIn(["proactive","has"])&&!this.props.chatwidget.getIn(["chat_ui","custom_html_priority"])&&l.createElement(I,{mode:"message",setBotPayload:this.setBotPayload,invitation:this.props.chatwidget.getIn(["proactive","data"])}),!this.props.chatwidget.getIn(["proactive","has"])&&this.props.chatwidget.hasIn(["chat_ui","cmmsg_widget"])&&l.createElement(y.A,{minimizeWidget:function(t){return e.props.dispatch((0,D.fJ)())},isMobile:this.props.chatwidget.get("isMobile"),embedMode:this.props.chatwidget.get("mode"),targetSame:this.props.chatwidget.getIn(["chat_ui","same_target_link"]),setTextAreaHidden:function(t){!1===e.state.textAreaHidden&&e.setState({textAreaHidden:!0})},printButton:this.props.chatwidget.getIn(["chat_ui","print_btn_msg"]),processStatus:this.props.chatwidget.get("processStatus"),setBotPayload:this.setBotPayload,content:this.props.chatwidget.getIn(["chat_ui","cmmsg_widget"])}),1==this.props.chatwidget.get("processStatus")&&""!=this.state.Question&&l.createElement("div",{"data-op-id":"0",className:"message-row response msg-to-store"},this.props.chatwidget.hasIn(["chat_ui","show_ts"])&&!this.props.chatwidget.hasIn(["chat_ui","show_ts_below"])&&l.createElement("div",{className:"msg-date"}," "),l.createElement("span",{title:"",className:"usr-tit vis-tit"},l.createElement("i",{title:t("start_chat.visitor"),className:"material-icons chat-operators mi-fs15 me-0"},""),l.createElement("span",{className:"user-nick-title"},t("start_chat.visitor"))),l.createElement("div",{className:"msg-body"},this.state.Question),this.props.chatwidget.hasIn(["chat_ui","show_ts"])&&this.props.chatwidget.hasIn(["chat_ui","show_ts_below"])&&l.createElement("div",{className:"msg-date"}," ")))),(!this.props.chatwidget.getIn(["proactive","has"])||1===this.props.chatwidget.getIn(["chat_ui","custom_html_priority"]))&&this.props.chatwidget.hasIn(["chat_ui","custom_html_widget"])&&l.createElement("div",{className:"custom-html-container "+(""!=this.state.Question?"visitor-started-type":""),dangerouslySetInnerHTML:{__html:this.props.chatwidget.getIn(["chat_ui","custom_html_widget"])}}),(1==this.props.chatwidget.getIn(["onlineData","fields_visible"])||0==this.props.chatwidget.getIn(["onlineData","fields_visible"])&&!this.props.chatwidget.hasIn(["chat_ui","hstr_btn"]))&&!1===this.state.textAreaHidden&&l.createElement("div",{className:"d-flex flex-row border-top position-relative message-send-area"},this.props.chatwidget.hasIn(["validationErrors","question"])&&l.createElement("div",{id:"id-operator-typing",className:"bg-white ps-1"},this.props.chatwidget.getIn(["validationErrors","question"])),1==this.props.chatwidget.getIn(["onlineData","fields_visible"])&&l.createElement(l.Fragment,null,(!this.props.chatwidget.hasIn(["chat_ui","bbc_btnh"])||this.props.chatwidget.hasIn(["chat_ui","lng_btnh"]))&&l.createElement(v,{bbEnabled:!this.props.chatwidget.hasIn(["chat_ui","bbc_btnh"]),langEnabled:this.props.chatwidget.hasIn(["chat_ui","lng_btnh"]),changeLanguage:this.changeLanguage,toggleModal:this.toggleModal}),l.createElement("div",{className:"mx-auto w-100"},l.createElement(S.A,{text:1==this.props.chatwidget.get("processStatus")&&!1===this.state.hasBotData?"":this.state.Question,textMaxLength:this.props.chatwidget.getIn(["chat_ui","max_length"]),textAutoFocus:0==this.props.chatwidget.get("isMobile")&&"widget"==this.props.chatwidget.get("mode")&&!0===this.props.chatwidget.get("shown"),onTextChange:function(t){return e.handleContentChange({id:"Question",value:t.target.value})},onTextKeyDown:this.enterKeyDown,onTextFocus:this.moveCaretAtEnd,classNameText:s,textPlaceholder:this.props.chatwidget.hasIn(["chat_ui","placeholder_message"])?this.props.chatwidget.getIn(["chat_ui","placeholder_message"]):t("chat.type_here"),textareaRef:this.props.textMessageRef})),l.createElement("div",{className:"disable-select",id:"send-button-wrapper"},l.createElement("div",{className:"user-chatwidget-buttons pt-2",id:"ChatSendButtonContainer"},1!=this.props.chatwidget.get("processStatus")&&l.createElement("a",{tabIndex:"0",onKeyPress:function(t){"Enter"===t.key&&e.handleSubmit()},onClick:this.handleSubmit,title:t("button.start_chat")},l.createElement("i",{className:"send-icon material-icons settings"+(0==this.state.Question.length?" text-muted-light":" text-muted")},"")),1==this.props.chatwidget.get("processStatus")&&l.createElement("i",{className:"in-progress-icon material-icons text-muted settings me-0"},"")))),0==this.props.chatwidget.getIn(["onlineData","fields_visible"])&&!this.props.chatwidget.hasIn(["chat_ui","hstr_btn"])&&l.createElement("button",{className:"mx-auto pb-1 w-100 btn btn-light rounded-0",onClick:this.handleSubmit,title:t("button.start_chat")},this.props.chatwidget.getIn(["chat_ui","custom_start_button"])||t("button.start_chat_With_us"))))}return l.createElement("div",{id:"id-container-fluid"},!0===this.props.chatwidget.getIn(["proactive","has"])&&l.createElement(I,{mode:"profile",invitation:this.props.chatwidget.getIn(["proactive","data"])})||(this.props.chatwidget.hasIn(["chat_ui","pre_chat_html"])||this.props.chatwidget.hasIn(["chat_ui","operator_profile"])&&""!=this.props.chatwidget.getIn(["chat_ui","operator_profile"]))&&l.createElement("div",{id:"lhc-profile-body"},l.createElement("div",{id:"chat-status-container",className:"p-2"+(this.props.chatwidget.hasIn(["chat_ui","np_border"])?"":" border-bottom"),dangerouslySetInnerHTML:{__html:(this.props.chatwidget.hasIn(["chat_ui","pre_chat_html"])?this.props.chatwidget.getIn(["chat_ui","pre_chat_html"]):"")+(this.props.chatwidget.hasIn(["chat_ui","operator_profile"])?this.props.chatwidget.getIn(["chat_ui","operator_profile"]):"")}})),l.createElement("div",{className:"container-fluid"},l.createElement(p.A,{errors:this.props.chatwidget.get("validationErrors")}),!this.props.chatwidget.getIn(["proactive","has"])&&this.props.chatwidget.hasIn(["chat_ui","custom_html_widget"])&&l.createElement("div",{className:"custom-html-container",dangerouslySetInnerHTML:{__html:this.props.chatwidget.getIn(["chat_ui","custom_html_widget"])}}),l.createElement("form",{onSubmit:this.handleSubmit},l.createElement("div",{className:"row pt-2"},a,i,this.props.chatwidget.hasIn(["onlineData","department"])&&l.createElement(g.A,{defaultValueField:this.state.DepartamentID,setDefaultValue:this.props.chatwidget.get("departmentDefault"),onChangeContent:this.handleContentChange,isInvalidProduct:this.props.chatwidget.hasIn(["validationErrors","ProductID"]),isInvalid:this.props.chatwidget.hasIn(["validationErrors","department"]),departments:this.props.chatwidget.getIn(["onlineData","department"])})),(!this.props.chatwidget.hasIn(["chat_ui","hstr_btn"])||""!==i||""!==a||!0===this.props.chatwidget.getIn(["proactive","has"]))&&l.createElement("div",{className:"row"},l.createElement("div",{className:"col-12 pb-3"},l.createElement("button",{disabled:1==this.props.chatwidget.get("processStatus"),type:"submit",className:"btn btn-secondary btn-sm"},this.props.chatwidget.getIn(["chat_ui","custom_start_button"])||t("button.start_chat")))))))}return 2==this.props.chatwidget.get("processStatus")?l.createElement("div",{className:"container-fluid",id:"id-container-fluid"},l.createElement("div",{className:"row"},l.createElement("div",{className:"col-12"},l.createElement("p",null,t("start_chat.thank_you_for_feedback"))))):void 0}}],[{key:"getDerivedStateFromProps",value:function(e,t){if(e.chatwidget.getIn(["chat_ui","auto_start"])&&0==e.chatwidget.get("processStatus")&&("embed"==e.chatwidget.get("mode")||"popup"==e.chatwidget.get("mode")||"widget"==e.chatwidget.get("mode")&&1==e.chatwidget.get("shown"))){var a=t;a.jsvar=e.chatwidget.get("jsVars"),a["captcha_"+e.chatwidget.getIn(["captcha","hash"])]=e.chatwidget.getIn(["captcha","ts"]),a.tscaptcha=e.chatwidget.getIn(["captcha","ts"]),a.user_timezone=w.q.getTimeZone(),a.URLRefer=window.location.href.substring(window.location.protocol.length),a.r=e.chatwidget.get("ses_ref"),""!=e.chatwidget.get("bot_id")&&(a.bot_id=e.chatwidget.get("bot_id")),""!=e.chatwidget.get("subject_id")&&(a.subject_id=e.chatwidget.get("subject_id")),""!=e.chatwidget.get("trigger_id")&&(a.trigger_id=e.chatwidget.get("trigger_id")),""!=e.chatwidget.get("operator")&&(a.operator=e.chatwidget.get("operator")),null!==e.chatwidget.get("priority")&&(a.priority=e.chatwidget.get("priority")),null!==e.chatwidget.get("pvhash")&&(a.pvhash=e.chatwidget.get("pvhash")),null!==e.chatwidget.get("phash")&&(a.phash=e.chatwidget.get("phash"));var n=w.q.getCustomFieldsSubmit(e.chatwidget.getIn(["customData","fields"]));null!==n&&(a=C(C({},a),n)),null!==e.chatwidget.get("api_data")&&(a=C(C({},a),e.chatwidget.get("api_data")));var i={department:e.chatwidget.get("department"),theme:e.chatwidget.get("theme"),mode:e.chatwidget.get("mode"),vid:e.chatwidget.get("vid"),fields:a};null!==e.botPayload&&(i.bpayload=e.botPayload),!0===e.chatwidget.hasIn(["proactive","data","invitation_id"])&&(i.invitation_id=e.chatwidget.getIn(["proactive","data","invitation_id"])),e.dispatch((0,D.ag)(i))}return null}}])}(l.Component))||E,O=(0,u.C)()(k)},3072:function(e,t){"use strict";var a="function"==typeof Symbol&&Symbol.for,n=a?Symbol.for("react.element"):60103,i=a?Symbol.for("react.portal"):60106,r=a?Symbol.for("react.fragment"):60107,s=a?Symbol.for("react.strict_mode"):60108,o=a?Symbol.for("react.profiler"):60114,c=a?Symbol.for("react.provider"):60109,l=a?Symbol.for("react.context"):60110,d=a?Symbol.for("react.async_mode"):60111,u=a?Symbol.for("react.concurrent_mode"):60111,h=a?Symbol.for("react.forward_ref"):60112,p=a?Symbol.for("react.suspense"):60113,g=a?Symbol.for("react.suspense_list"):60120,_=a?Symbol.for("react.memo"):60115,f=a?Symbol.for("react.lazy"):60116,m=a?Symbol.for("react.block"):60121,v=a?Symbol.for("react.fundamental"):60117,w=a?Symbol.for("react.responder"):60118,y=a?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case d:case u:case r:case o:case s:case p:return e;default:switch(e=e&&e.$$typeof){case l:case h:case f:case _:case c:return e;default:return t}}case i:return t}}}function E(e){return b(e)===u}t.AsyncMode=d,t.ConcurrentMode=u,t.ContextConsumer=l,t.ContextProvider=c,t.Element=n,t.ForwardRef=h,t.Fragment=r,t.Lazy=f,t.Memo=_,t.Portal=i,t.Profiler=o,t.StrictMode=s,t.Suspense=p,t.isAsyncMode=function(e){return E(e)||b(e)===d},t.isConcurrentMode=E,t.isContextConsumer=function(e){return b(e)===l},t.isContextProvider=function(e){return b(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return b(e)===h},t.isFragment=function(e){return b(e)===r},t.isLazy=function(e){return b(e)===f},t.isMemo=function(e){return b(e)===_},t.isPortal=function(e){return b(e)===i},t.isProfiler=function(e){return b(e)===o},t.isStrictMode=function(e){return b(e)===s},t.isSuspense=function(e){return b(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===o||e===s||e===p||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===_||e.$$typeof===c||e.$$typeof===l||e.$$typeof===h||e.$$typeof===v||e.$$typeof===w||e.$$typeof===y||e.$$typeof===m)},t.typeOf=b},3145:function(e,t,a){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=Array(t);a<t;a++)n[a]=e[a];return n}a.d(t,{A:function(){return n}})},3404:function(e,t,a){"use strict";e.exports=a(3072)},3422:function(e){"use strict";function t(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function a(e){for(var a,i=1;i<arguments.length;i++)a=null==arguments[i]?{}:arguments[i],i%2?t(Object(a),!0).forEach((function(t){n(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):t(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}));return e}function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}const i={threshold:50,passive:!1};e.exports=class{constructor(e,t={}){this.options=a(a({},i),t),this.element=null,this.touchStartX=0,this.touchStartY=0,this.touchEndX=0,this.touchEndY=0,this.onSwipeLeftAgent=null,this.onSwipeRightAgent=null,this.onSwipeUpAgent=null,this.onSwipeDownAgent=null,this.onTapAgent=null,this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.onSwipeLeft=this.onSwipeLeft.bind(this),this.onSwipeRight=this.onSwipeRight.bind(this),this.onSwipeUp=this.onSwipeUp.bind(this),this.onSwipeDown=this.onSwipeDown.bind(this),this.onTap=this.onTap.bind(this),this.destroy=this.destroy.bind(this),this.handleGesture=this.handleGesture.bind(this);let n=!!this.options.passive&&{passive:!0};this.element=e instanceof EventTarget?e:document.querySelector(e),this.element.addEventListener("touchstart",this.onTouchStart,n),this.element.addEventListener("touchend",this.onTouchEnd,n)}onTouchStart(e){this.touchStartX=e.changedTouches[0].screenX,this.touchStartY=e.changedTouches[0].screenY}onTouchEnd(e){this.touchEndX=e.changedTouches[0].screenX,this.touchEndY=e.changedTouches[0].screenY,this.handleGesture()}onSwipeLeft(e){this.onSwipeLeftAgent=e}onSwipeRight(e){this.onSwipeRightAgent=e}onSwipeUp(e){this.onSwipeUpAgent=e}onSwipeDown(e){this.onSwipeDownAgent=e}onTap(e){this.onTapAgent=e}destroy(){this.element.removeEventListener("touchstart",this.onTouchStart),this.element.removeEventListener("touchend",this.onTouchEnd)}handleGesture(){return this.touchEndX+this.options.threshold<=this.touchStartX?(this.onSwipeLeftAgent&&this.onSwipeLeftAgent(),"swiped left"):this.touchEndX-this.options.threshold>=this.touchStartX?(this.onSwipeRightAgent&&this.onSwipeRightAgent(),"swiped right"):this.touchEndY+this.options.threshold<=this.touchStartY?(this.onSwipeUpAgent&&this.onSwipeUpAgent(),"swiped up"):this.touchEndY-this.options.threshold>=this.touchStartY?(this.onSwipeDownAgent&&this.onSwipeDownAgent(),"swiped down"):this.touchEndY===this.touchStartY?(this.onTapAgent&&this.onTapAgent(),"tap"):void 0}}},3738:function(e){function t(a){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(a)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},3954:function(e,t,a){"use strict";function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}a.d(t,{A:function(){return n}})},4146:function(e,t,a){"use strict";var n=a(3404),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};function c(e){return n.isMemo(e)?s:o[e.$$typeof]||i}o[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o[n.Memo]=s;var l=Object.defineProperty,d=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,g=Object.prototype;e.exports=function e(t,a,n){if("string"!=typeof a){if(g){var i=p(a);i&&i!==g&&e(t,i,n)}var s=d(a);u&&(s=s.concat(u(a)));for(var o=c(t),_=c(a),f=0;f<s.length;++f){var m=s[f];if(!(r[m]||n&&n[m]||_&&_[m]||o&&o[m])){var v=h(a,m);try{l(t,m,v)}catch(e){}}}}return t}},4196:function(e,t,a){var n;!function(){"use strict";var i=function(){this.init()};i.prototype={init:function(){var e=this||r;return e._counter=1e3,e._html5AudioPool=[],e.html5PoolSize=10,e._codecs={},e._howls=[],e._muted=!1,e._volume=1,e._canPlayEvent="canplaythrough",e._navigator="undefined"!=typeof window&&window.navigator?window.navigator:null,e.masterGain=null,e.noAudio=!1,e.usingWebAudio=!0,e.autoSuspend=!0,e.ctx=null,e.autoUnlock=!0,e._setup(),e},volume:function(e){var t=this||r;if(e=parseFloat(e),t.ctx||p(),void 0!==e&&e>=0&&e<=1){if(t._volume=e,t._muted)return t;t.usingWebAudio&&t.masterGain.gain.setValueAtTime(e,r.ctx.currentTime);for(var a=0;a<t._howls.length;a++)if(!t._howls[a]._webAudio)for(var n=t._howls[a]._getSoundIds(),i=0;i<n.length;i++){var s=t._howls[a]._soundById(n[i]);s&&s._node&&(s._node.volume=s._volume*e)}return t}return t._volume},mute:function(e){var t=this||r;t.ctx||p(),t._muted=e,t.usingWebAudio&&t.masterGain.gain.setValueAtTime(e?0:t._volume,r.ctx.currentTime);for(var a=0;a<t._howls.length;a++)if(!t._howls[a]._webAudio)for(var n=t._howls[a]._getSoundIds(),i=0;i<n.length;i++){var s=t._howls[a]._soundById(n[i]);s&&s._node&&(s._node.muted=!!e||s._muted)}return t},stop:function(){for(var e=this||r,t=0;t<e._howls.length;t++)e._howls[t].stop();return e},unload:function(){for(var e=this||r,t=e._howls.length-1;t>=0;t--)e._howls[t].unload();return e.usingWebAudio&&e.ctx&&void 0!==e.ctx.close&&(e.ctx.close(),e.ctx=null,p()),e},codecs:function(e){return(this||r)._codecs[e.replace(/^x-/,"")]},_setup:function(){var e=this||r;if(e.state=e.ctx&&e.ctx.state||"suspended",e._autoSuspend(),!e.usingWebAudio)if("undefined"!=typeof Audio)try{void 0===(new Audio).oncanplaythrough&&(e._canPlayEvent="canplay")}catch(t){e.noAudio=!0}else e.noAudio=!0;try{(new Audio).muted&&(e.noAudio=!0)}catch(e){}return e.noAudio||e._setupCodecs(),e},_setupCodecs:function(){var e=this||r,t=null;try{t="undefined"!=typeof Audio?new Audio:null}catch(t){return e}if(!t||"function"!=typeof t.canPlayType)return e;var a=t.canPlayType("audio/mpeg;").replace(/^no$/,""),n=e._navigator?e._navigator.userAgent:"",i=n.match(/OPR\/(\d+)/g),s=i&&parseInt(i[0].split("/")[1],10)<33,o=-1!==n.indexOf("Safari")&&-1===n.indexOf("Chrome"),c=n.match(/Version\/(.*?) /),l=o&&c&&parseInt(c[1],10)<15;return e._codecs={mp3:!(s||!a&&!t.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!a,opus:!!t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(t.canPlayType('audio/wav; codecs="1"')||t.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!t.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!t.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/m4a;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(t.canPlayType("audio/x-m4b;")||t.canPlayType("audio/m4b;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(t.canPlayType("audio/x-mp4;")||t.canPlayType("audio/mp4;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!(l||!t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!(l||!t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!t.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(t.canPlayType("audio/x-flac;")||t.canPlayType("audio/flac;")).replace(/^no$/,"")},e},_unlockAudio:function(){var e=this||r;if(!e._audioUnlocked&&e.ctx){e._audioUnlocked=!1,e.autoUnlock=!1,e._mobileUnloaded||44100===e.ctx.sampleRate||(e._mobileUnloaded=!0,e.unload()),e._scratchBuffer=e.ctx.createBuffer(1,1,22050);var t=function(a){for(;e._html5AudioPool.length<e.html5PoolSize;)try{var n=new Audio;n._unlocked=!0,e._releaseHtml5Audio(n)}catch(a){e.noAudio=!0;break}for(var i=0;i<e._howls.length;i++)if(!e._howls[i]._webAudio)for(var r=e._howls[i]._getSoundIds(),s=0;s<r.length;s++){var o=e._howls[i]._soundById(r[s]);o&&o._node&&!o._node._unlocked&&(o._node._unlocked=!0,o._node.load())}e._autoResume();var c=e.ctx.createBufferSource();c.buffer=e._scratchBuffer,c.connect(e.ctx.destination),void 0===c.start?c.noteOn(0):c.start(0),"function"==typeof e.ctx.resume&&e.ctx.resume(),c.onended=function(){c.disconnect(0),e._audioUnlocked=!0,document.removeEventListener("touchstart",t,!0),document.removeEventListener("touchend",t,!0),document.removeEventListener("click",t,!0),document.removeEventListener("keydown",t,!0);for(var a=0;a<e._howls.length;a++)e._howls[a]._emit("unlock")}};return document.addEventListener("touchstart",t,!0),document.addEventListener("touchend",t,!0),document.addEventListener("click",t,!0),document.addEventListener("keydown",t,!0),e}},_obtainHtml5Audio:function(){var e=this||r;if(e._html5AudioPool.length)return e._html5AudioPool.pop();var t=(new Audio).play();return t&&"undefined"!=typeof Promise&&(t instanceof Promise||"function"==typeof t.then)&&t.catch((function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.")})),new Audio},_releaseHtml5Audio:function(e){var t=this||r;return e._unlocked&&t._html5AudioPool.push(e),t},_autoSuspend:function(){var e=this;if(e.autoSuspend&&e.ctx&&void 0!==e.ctx.suspend&&r.usingWebAudio){for(var t=0;t<e._howls.length;t++)if(e._howls[t]._webAudio)for(var a=0;a<e._howls[t]._sounds.length;a++)if(!e._howls[t]._sounds[a]._paused)return e;return e._suspendTimer&&clearTimeout(e._suspendTimer),e._suspendTimer=setTimeout((function(){if(e.autoSuspend){e._suspendTimer=null,e.state="suspending";var t=function(){e.state="suspended",e._resumeAfterSuspend&&(delete e._resumeAfterSuspend,e._autoResume())};e.ctx.suspend().then(t,t)}}),3e4),e}},_autoResume:function(){var e=this;if(e.ctx&&void 0!==e.ctx.resume&&r.usingWebAudio)return"running"===e.state&&"interrupted"!==e.ctx.state&&e._suspendTimer?(clearTimeout(e._suspendTimer),e._suspendTimer=null):"suspended"===e.state||"running"===e.state&&"interrupted"===e.ctx.state?(e.ctx.resume().then((function(){e.state="running";for(var t=0;t<e._howls.length;t++)e._howls[t]._emit("resume")})),e._suspendTimer&&(clearTimeout(e._suspendTimer),e._suspendTimer=null)):"suspending"===e.state&&(e._resumeAfterSuspend=!0),e}};var r=new i,s=function(e){e.src&&0!==e.src.length?this.init(e):console.error("An array of source files must be passed with any new Howl.")};s.prototype={init:function(e){var t=this;return r.ctx||p(),t._autoplay=e.autoplay||!1,t._format="string"!=typeof e.format?e.format:[e.format],t._html5=e.html5||!1,t._muted=e.mute||!1,t._loop=e.loop||!1,t._pool=e.pool||5,t._preload="boolean"!=typeof e.preload&&"metadata"!==e.preload||e.preload,t._rate=e.rate||1,t._sprite=e.sprite||{},t._src="string"!=typeof e.src?e.src:[e.src],t._volume=void 0!==e.volume?e.volume:1,t._xhr={method:e.xhr&&e.xhr.method?e.xhr.method:"GET",headers:e.xhr&&e.xhr.headers?e.xhr.headers:null,withCredentials:!(!e.xhr||!e.xhr.withCredentials)&&e.xhr.withCredentials},t._duration=0,t._state="unloaded",t._sounds=[],t._endTimers={},t._queue=[],t._playLock=!1,t._onend=e.onend?[{fn:e.onend}]:[],t._onfade=e.onfade?[{fn:e.onfade}]:[],t._onload=e.onload?[{fn:e.onload}]:[],t._onloaderror=e.onloaderror?[{fn:e.onloaderror}]:[],t._onplayerror=e.onplayerror?[{fn:e.onplayerror}]:[],t._onpause=e.onpause?[{fn:e.onpause}]:[],t._onplay=e.onplay?[{fn:e.onplay}]:[],t._onstop=e.onstop?[{fn:e.onstop}]:[],t._onmute=e.onmute?[{fn:e.onmute}]:[],t._onvolume=e.onvolume?[{fn:e.onvolume}]:[],t._onrate=e.onrate?[{fn:e.onrate}]:[],t._onseek=e.onseek?[{fn:e.onseek}]:[],t._onunlock=e.onunlock?[{fn:e.onunlock}]:[],t._onresume=[],t._webAudio=r.usingWebAudio&&!t._html5,void 0!==r.ctx&&r.ctx&&r.autoUnlock&&r._unlockAudio(),r._howls.push(t),t._autoplay&&t._queue.push({event:"play",action:function(){t.play()}}),t._preload&&"none"!==t._preload&&t.load(),t},load:function(){var e=this,t=null;if(r.noAudio)e._emit("loaderror",null,"No audio support.");else{"string"==typeof e._src&&(e._src=[e._src]);for(var a=0;a<e._src.length;a++){var n,i;if(e._format&&e._format[a])n=e._format[a];else{if("string"!=typeof(i=e._src[a])){e._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}(n=/^data:audio\/([^;,]+);/i.exec(i))||(n=/\.([^.]+)$/.exec(i.split("?",1)[0])),n&&(n=n[1].toLowerCase())}if(n||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),n&&r.codecs(n)){t=e._src[a];break}}if(t)return e._src=t,e._state="loading","https:"===window.location.protocol&&"http:"===t.slice(0,5)&&(e._html5=!0,e._webAudio=!1),new o(e),e._webAudio&&l(e),e;e._emit("loaderror",null,"No codec support for selected audio sources.")}},play:function(e,t){var a=this,n=null;if("number"==typeof e)n=e,e=null;else{if("string"==typeof e&&"loaded"===a._state&&!a._sprite[e])return null;if(void 0===e&&(e="__default",!a._playLock)){for(var i=0,s=0;s<a._sounds.length;s++)a._sounds[s]._paused&&!a._sounds[s]._ended&&(i++,n=a._sounds[s]._id);1===i?e=null:n=null}}var o=n?a._soundById(n):a._inactiveSound();if(!o)return null;if(n&&!e&&(e=o._sprite||"__default"),"loaded"!==a._state){o._sprite=e,o._ended=!1;var c=o._id;return a._queue.push({event:"play",action:function(){a.play(c)}}),c}if(n&&!o._paused)return t||a._loadQueue("play"),o._id;a._webAudio&&r._autoResume();var l=Math.max(0,o._seek>0?o._seek:a._sprite[e][0]/1e3),d=Math.max(0,(a._sprite[e][0]+a._sprite[e][1])/1e3-l),u=1e3*d/Math.abs(o._rate),h=a._sprite[e][0]/1e3,p=(a._sprite[e][0]+a._sprite[e][1])/1e3;o._sprite=e,o._ended=!1;var g=function(){o._paused=!1,o._seek=l,o._start=h,o._stop=p,o._loop=!(!o._loop&&!a._sprite[e][2])};if(!(l>=p)){var _=o._node;if(a._webAudio){var f=function(){a._playLock=!1,g(),a._refreshBuffer(o);var e=o._muted||a._muted?0:o._volume;_.gain.setValueAtTime(e,r.ctx.currentTime),o._playStart=r.ctx.currentTime,void 0===_.bufferSource.start?o._loop?_.bufferSource.noteGrainOn(0,l,86400):_.bufferSource.noteGrainOn(0,l,d):o._loop?_.bufferSource.start(0,l,86400):_.bufferSource.start(0,l,d),u!==1/0&&(a._endTimers[o._id]=setTimeout(a._ended.bind(a,o),u)),t||setTimeout((function(){a._emit("play",o._id),a._loadQueue()}),0)};"running"===r.state&&"interrupted"!==r.ctx.state?f():(a._playLock=!0,a.once("resume",f),a._clearTimer(o._id))}else{var m=function(){_.currentTime=l,_.muted=o._muted||a._muted||r._muted||_.muted,_.volume=o._volume*r.volume(),_.playbackRate=o._rate;try{var n=_.play();if(n&&"undefined"!=typeof Promise&&(n instanceof Promise||"function"==typeof n.then)?(a._playLock=!0,g(),n.then((function(){a._playLock=!1,_._unlocked=!0,t?a._loadQueue():a._emit("play",o._id)})).catch((function(){a._playLock=!1,a._emit("playerror",o._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),o._ended=!0,o._paused=!0}))):t||(a._playLock=!1,g(),a._emit("play",o._id)),_.playbackRate=o._rate,_.paused)return void a._emit("playerror",o._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");"__default"!==e||o._loop?a._endTimers[o._id]=setTimeout(a._ended.bind(a,o),u):(a._endTimers[o._id]=function(){a._ended(o),_.removeEventListener("ended",a._endTimers[o._id],!1)},_.addEventListener("ended",a._endTimers[o._id],!1))}catch(e){a._emit("playerror",o._id,e)}};"data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"===_.src&&(_.src=a._src,_.load());var v=window&&window.ejecta||!_.readyState&&r._navigator.isCocoonJS;if(_.readyState>=3||v)m();else{a._playLock=!0,a._state="loading";var w=function(){a._state="loaded",m(),_.removeEventListener(r._canPlayEvent,w,!1)};_.addEventListener(r._canPlayEvent,w,!1),a._clearTimer(o._id)}}return o._id}a._ended(o)},pause:function(e){var t=this;if("loaded"!==t._state||t._playLock)return t._queue.push({event:"pause",action:function(){t.pause(e)}}),t;for(var a=t._getSoundIds(e),n=0;n<a.length;n++){t._clearTimer(a[n]);var i=t._soundById(a[n]);if(i&&!i._paused&&(i._seek=t.seek(a[n]),i._rateSeek=0,i._paused=!0,t._stopFade(a[n]),i._node))if(t._webAudio){if(!i._node.bufferSource)continue;void 0===i._node.bufferSource.stop?i._node.bufferSource.noteOff(0):i._node.bufferSource.stop(0),t._cleanBuffer(i._node)}else isNaN(i._node.duration)&&i._node.duration!==1/0||i._node.pause();arguments[1]||t._emit("pause",i?i._id:null)}return t},stop:function(e,t){var a=this;if("loaded"!==a._state||a._playLock)return a._queue.push({event:"stop",action:function(){a.stop(e)}}),a;for(var n=a._getSoundIds(e),i=0;i<n.length;i++){a._clearTimer(n[i]);var r=a._soundById(n[i]);r&&(r._seek=r._start||0,r._rateSeek=0,r._paused=!0,r._ended=!0,a._stopFade(n[i]),r._node&&(a._webAudio?r._node.bufferSource&&(void 0===r._node.bufferSource.stop?r._node.bufferSource.noteOff(0):r._node.bufferSource.stop(0),a._cleanBuffer(r._node)):isNaN(r._node.duration)&&r._node.duration!==1/0||(r._node.currentTime=r._start||0,r._node.pause(),r._node.duration===1/0&&a._clearSound(r._node))),t||a._emit("stop",r._id))}return a},mute:function(e,t){var a=this;if("loaded"!==a._state||a._playLock)return a._queue.push({event:"mute",action:function(){a.mute(e,t)}}),a;if(void 0===t){if("boolean"!=typeof e)return a._muted;a._muted=e}for(var n=a._getSoundIds(t),i=0;i<n.length;i++){var s=a._soundById(n[i]);s&&(s._muted=e,s._interval&&a._stopFade(s._id),a._webAudio&&s._node?s._node.gain.setValueAtTime(e?0:s._volume,r.ctx.currentTime):s._node&&(s._node.muted=!!r._muted||e),a._emit("mute",s._id))}return a},volume:function(){var e,t,a,n=this,i=arguments;if(0===i.length)return n._volume;if(1===i.length||2===i.length&&void 0===i[1]?n._getSoundIds().indexOf(i[0])>=0?t=parseInt(i[0],10):e=parseFloat(i[0]):i.length>=2&&(e=parseFloat(i[0]),t=parseInt(i[1],10)),!(void 0!==e&&e>=0&&e<=1))return(a=t?n._soundById(t):n._sounds[0])?a._volume:0;if("loaded"!==n._state||n._playLock)return n._queue.push({event:"volume",action:function(){n.volume.apply(n,i)}}),n;void 0===t&&(n._volume=e),t=n._getSoundIds(t);for(var s=0;s<t.length;s++)(a=n._soundById(t[s]))&&(a._volume=e,i[2]||n._stopFade(t[s]),n._webAudio&&a._node&&!a._muted?a._node.gain.setValueAtTime(e,r.ctx.currentTime):a._node&&!a._muted&&(a._node.volume=e*r.volume()),n._emit("volume",a._id));return n},fade:function(e,t,a,n){var i=this;if("loaded"!==i._state||i._playLock)return i._queue.push({event:"fade",action:function(){i.fade(e,t,a,n)}}),i;e=Math.min(Math.max(0,parseFloat(e)),1),t=Math.min(Math.max(0,parseFloat(t)),1),a=parseFloat(a),i.volume(e,n);for(var s=i._getSoundIds(n),o=0;o<s.length;o++){var c=i._soundById(s[o]);if(c){if(n||i._stopFade(s[o]),i._webAudio&&!c._muted){var l=r.ctx.currentTime,d=l+a/1e3;c._volume=e,c._node.gain.setValueAtTime(e,l),c._node.gain.linearRampToValueAtTime(t,d)}i._startFadeInterval(c,e,t,a,s[o],void 0===n)}}return i},_startFadeInterval:function(e,t,a,n,i,r){var s=this,o=t,c=a-t,l=Math.abs(c/.01),d=Math.max(4,l>0?n/l:n),u=Date.now();e._fadeTo=a,e._interval=setInterval((function(){var i=(Date.now()-u)/n;u=Date.now(),o+=c*i,o=Math.round(100*o)/100,o=c<0?Math.max(a,o):Math.min(a,o),s._webAudio?e._volume=o:s.volume(o,e._id,!0),r&&(s._volume=o),(a<t&&o<=a||a>t&&o>=a)&&(clearInterval(e._interval),e._interval=null,e._fadeTo=null,s.volume(a,e._id),s._emit("fade",e._id))}),d)},_stopFade:function(e){var t=this,a=t._soundById(e);return a&&a._interval&&(t._webAudio&&a._node.gain.cancelScheduledValues(r.ctx.currentTime),clearInterval(a._interval),a._interval=null,t.volume(a._fadeTo,e),a._fadeTo=null,t._emit("fade",e)),t},loop:function(){var e,t,a,n=this,i=arguments;if(0===i.length)return n._loop;if(1===i.length){if("boolean"!=typeof i[0])return!!(a=n._soundById(parseInt(i[0],10)))&&a._loop;e=i[0],n._loop=e}else 2===i.length&&(e=i[0],t=parseInt(i[1],10));for(var r=n._getSoundIds(t),s=0;s<r.length;s++)(a=n._soundById(r[s]))&&(a._loop=e,n._webAudio&&a._node&&a._node.bufferSource&&(a._node.bufferSource.loop=e,e&&(a._node.bufferSource.loopStart=a._start||0,a._node.bufferSource.loopEnd=a._stop,n.playing(r[s])&&(n.pause(r[s],!0),n.play(r[s],!0)))));return n},rate:function(){var e,t,a,n=this,i=arguments;if(0===i.length?t=n._sounds[0]._id:1===i.length?n._getSoundIds().indexOf(i[0])>=0?t=parseInt(i[0],10):e=parseFloat(i[0]):2===i.length&&(e=parseFloat(i[0]),t=parseInt(i[1],10)),"number"!=typeof e)return(a=n._soundById(t))?a._rate:n._rate;if("loaded"!==n._state||n._playLock)return n._queue.push({event:"rate",action:function(){n.rate.apply(n,i)}}),n;void 0===t&&(n._rate=e),t=n._getSoundIds(t);for(var s=0;s<t.length;s++)if(a=n._soundById(t[s])){n.playing(t[s])&&(a._rateSeek=n.seek(t[s]),a._playStart=n._webAudio?r.ctx.currentTime:a._playStart),a._rate=e,n._webAudio&&a._node&&a._node.bufferSource?a._node.bufferSource.playbackRate.setValueAtTime(e,r.ctx.currentTime):a._node&&(a._node.playbackRate=e);var o=n.seek(t[s]),c=1e3*((n._sprite[a._sprite][0]+n._sprite[a._sprite][1])/1e3-o)/Math.abs(a._rate);!n._endTimers[t[s]]&&a._paused||(n._clearTimer(t[s]),n._endTimers[t[s]]=setTimeout(n._ended.bind(n,a),c)),n._emit("rate",a._id)}return n},seek:function(){var e,t,a=this,n=arguments;if(0===n.length?a._sounds.length&&(t=a._sounds[0]._id):1===n.length?a._getSoundIds().indexOf(n[0])>=0?t=parseInt(n[0],10):a._sounds.length&&(t=a._sounds[0]._id,e=parseFloat(n[0])):2===n.length&&(e=parseFloat(n[0]),t=parseInt(n[1],10)),void 0===t)return 0;if("number"==typeof e&&("loaded"!==a._state||a._playLock))return a._queue.push({event:"seek",action:function(){a.seek.apply(a,n)}}),a;var i=a._soundById(t);if(i){if(!("number"==typeof e&&e>=0)){if(a._webAudio){var s=a.playing(t)?r.ctx.currentTime-i._playStart:0,o=i._rateSeek?i._rateSeek-i._seek:0;return i._seek+(o+s*Math.abs(i._rate))}return i._node.currentTime}var c=a.playing(t);c&&a.pause(t,!0),i._seek=e,i._ended=!1,a._clearTimer(t),a._webAudio||!i._node||isNaN(i._node.duration)||(i._node.currentTime=e);var l=function(){c&&a.play(t,!0),a._emit("seek",t)};if(c&&!a._webAudio){var d=function(){a._playLock?setTimeout(d,0):l()};setTimeout(d,0)}else l()}return a},playing:function(e){var t=this;if("number"==typeof e){var a=t._soundById(e);return!!a&&!a._paused}for(var n=0;n<t._sounds.length;n++)if(!t._sounds[n]._paused)return!0;return!1},duration:function(e){var t=this,a=t._duration,n=t._soundById(e);return n&&(a=t._sprite[n._sprite][1]/1e3),a},state:function(){return this._state},unload:function(){for(var e=this,t=e._sounds,a=0;a<t.length;a++)t[a]._paused||e.stop(t[a]._id),e._webAudio||(e._clearSound(t[a]._node),t[a]._node.removeEventListener("error",t[a]._errorFn,!1),t[a]._node.removeEventListener(r._canPlayEvent,t[a]._loadFn,!1),t[a]._node.removeEventListener("ended",t[a]._endFn,!1),r._releaseHtml5Audio(t[a]._node)),delete t[a]._node,e._clearTimer(t[a]._id);var n=r._howls.indexOf(e);n>=0&&r._howls.splice(n,1);var i=!0;for(a=0;a<r._howls.length;a++)if(r._howls[a]._src===e._src||e._src.indexOf(r._howls[a]._src)>=0){i=!1;break}return c&&i&&delete c[e._src],r.noAudio=!1,e._state="unloaded",e._sounds=[],e=null,null},on:function(e,t,a,n){var i=this["_on"+e];return"function"==typeof t&&i.push(n?{id:a,fn:t,once:n}:{id:a,fn:t}),this},off:function(e,t,a){var n=this,i=n["_on"+e],r=0;if("number"==typeof t&&(a=t,t=null),t||a)for(r=0;r<i.length;r++){var s=a===i[r].id;if(t===i[r].fn&&s||!t&&s){i.splice(r,1);break}}else if(e)n["_on"+e]=[];else{var o=Object.keys(n);for(r=0;r<o.length;r++)0===o[r].indexOf("_on")&&Array.isArray(n[o[r]])&&(n[o[r]]=[])}return n},once:function(e,t,a){return this.on(e,t,a,1),this},_emit:function(e,t,a){for(var n=this,i=n["_on"+e],r=i.length-1;r>=0;r--)i[r].id&&i[r].id!==t&&"load"!==e||(setTimeout(function(e){e.call(this,t,a)}.bind(n,i[r].fn),0),i[r].once&&n.off(e,i[r].fn,i[r].id));return n._loadQueue(e),n},_loadQueue:function(e){var t=this;if(t._queue.length>0){var a=t._queue[0];a.event===e&&(t._queue.shift(),t._loadQueue()),e||a.action()}return t},_ended:function(e){var t=this,a=e._sprite;if(!t._webAudio&&e._node&&!e._node.paused&&!e._node.ended&&e._node.currentTime<e._stop)return setTimeout(t._ended.bind(t,e),100),t;var n=!(!e._loop&&!t._sprite[a][2]);if(t._emit("end",e._id),!t._webAudio&&n&&t.stop(e._id,!0).play(e._id),t._webAudio&&n){t._emit("play",e._id),e._seek=e._start||0,e._rateSeek=0,e._playStart=r.ctx.currentTime;var i=1e3*(e._stop-e._start)/Math.abs(e._rate);t._endTimers[e._id]=setTimeout(t._ended.bind(t,e),i)}return t._webAudio&&!n&&(e._paused=!0,e._ended=!0,e._seek=e._start||0,e._rateSeek=0,t._clearTimer(e._id),t._cleanBuffer(e._node),r._autoSuspend()),t._webAudio||n||t.stop(e._id,!0),t},_clearTimer:function(e){var t=this;if(t._endTimers[e]){if("function"!=typeof t._endTimers[e])clearTimeout(t._endTimers[e]);else{var a=t._soundById(e);a&&a._node&&a._node.removeEventListener("ended",t._endTimers[e],!1)}delete t._endTimers[e]}return t},_soundById:function(e){for(var t=this,a=0;a<t._sounds.length;a++)if(e===t._sounds[a]._id)return t._sounds[a];return null},_inactiveSound:function(){var e=this;e._drain();for(var t=0;t<e._sounds.length;t++)if(e._sounds[t]._ended)return e._sounds[t].reset();return new o(e)},_drain:function(){var e=this,t=e._pool,a=0,n=0;if(!(e._sounds.length<t)){for(n=0;n<e._sounds.length;n++)e._sounds[n]._ended&&a++;for(n=e._sounds.length-1;n>=0;n--){if(a<=t)return;e._sounds[n]._ended&&(e._webAudio&&e._sounds[n]._node&&e._sounds[n]._node.disconnect(0),e._sounds.splice(n,1),a--)}}},_getSoundIds:function(e){if(void 0===e){for(var t=[],a=0;a<this._sounds.length;a++)t.push(this._sounds[a]._id);return t}return[e]},_refreshBuffer:function(e){return e._node.bufferSource=r.ctx.createBufferSource(),e._node.bufferSource.buffer=c[this._src],e._panner?e._node.bufferSource.connect(e._panner):e._node.bufferSource.connect(e._node),e._node.bufferSource.loop=e._loop,e._loop&&(e._node.bufferSource.loopStart=e._start||0,e._node.bufferSource.loopEnd=e._stop||0),e._node.bufferSource.playbackRate.setValueAtTime(e._rate,r.ctx.currentTime),this},_cleanBuffer:function(e){var t=r._navigator&&r._navigator.vendor.indexOf("Apple")>=0;if(!e.bufferSource)return this;if(r._scratchBuffer&&e.bufferSource&&(e.bufferSource.onended=null,e.bufferSource.disconnect(0),t))try{e.bufferSource.buffer=r._scratchBuffer}catch(e){}return e.bufferSource=null,this},_clearSound:function(e){/MSIE |Trident\//.test(r._navigator&&r._navigator.userAgent)||(e.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var o=function(e){this._parent=e,this.init()};o.prototype={init:function(){var e=this,t=e._parent;return e._muted=t._muted,e._loop=t._loop,e._volume=t._volume,e._rate=t._rate,e._seek=0,e._paused=!0,e._ended=!0,e._sprite="__default",e._id=++r._counter,t._sounds.push(e),e.create(),e},create:function(){var e=this,t=e._parent,a=r._muted||e._muted||e._parent._muted?0:e._volume;return t._webAudio?(e._node=void 0===r.ctx.createGain?r.ctx.createGainNode():r.ctx.createGain(),e._node.gain.setValueAtTime(a,r.ctx.currentTime),e._node.paused=!0,e._node.connect(r.masterGain)):r.noAudio||(e._node=r._obtainHtml5Audio(),e._errorFn=e._errorListener.bind(e),e._node.addEventListener("error",e._errorFn,!1),e._loadFn=e._loadListener.bind(e),e._node.addEventListener(r._canPlayEvent,e._loadFn,!1),e._endFn=e._endListener.bind(e),e._node.addEventListener("ended",e._endFn,!1),e._node.src=t._src,e._node.preload=!0===t._preload?"auto":t._preload,e._node.volume=a*r.volume(),e._node.load()),e},reset:function(){var e=this,t=e._parent;return e._muted=t._muted,e._loop=t._loop,e._volume=t._volume,e._rate=t._rate,e._seek=0,e._rateSeek=0,e._paused=!0,e._ended=!0,e._sprite="__default",e._id=++r._counter,e},_errorListener:function(){var e=this;e._parent._emit("loaderror",e._id,e._node.error?e._node.error.code:0),e._node.removeEventListener("error",e._errorFn,!1)},_loadListener:function(){var e=this,t=e._parent;t._duration=Math.ceil(10*e._node.duration)/10,0===Object.keys(t._sprite).length&&(t._sprite={__default:[0,1e3*t._duration]}),"loaded"!==t._state&&(t._state="loaded",t._emit("load"),t._loadQueue()),e._node.removeEventListener(r._canPlayEvent,e._loadFn,!1)},_endListener:function(){var e=this,t=e._parent;t._duration===1/0&&(t._duration=Math.ceil(10*e._node.duration)/10,t._sprite.__default[1]===1/0&&(t._sprite.__default[1]=1e3*t._duration),t._ended(e)),e._node.removeEventListener("ended",e._endFn,!1)}};var c={},l=function(e){var t=e._src;if(c[t])return e._duration=c[t].duration,void h(e);if(/^data:[^;]+;base64,/.test(t)){for(var a=atob(t.split(",")[1]),n=new Uint8Array(a.length),i=0;i<a.length;++i)n[i]=a.charCodeAt(i);u(n.buffer,e)}else{var r=new XMLHttpRequest;r.open(e._xhr.method,t,!0),r.withCredentials=e._xhr.withCredentials,r.responseType="arraybuffer",e._xhr.headers&&Object.keys(e._xhr.headers).forEach((function(t){r.setRequestHeader(t,e._xhr.headers[t])})),r.onload=function(){var t=(r.status+"")[0];"0"===t||"2"===t||"3"===t?u(r.response,e):e._emit("loaderror",null,"Failed loading audio file with status: "+r.status+".")},r.onerror=function(){e._webAudio&&(e._html5=!0,e._webAudio=!1,e._sounds=[],delete c[t],e.load())},d(r)}},d=function(e){try{e.send()}catch(t){e.onerror()}},u=function(e,t){var a=function(){t._emit("loaderror",null,"Decoding audio data failed.")},n=function(e){e&&t._sounds.length>0?(c[t._src]=e,h(t,e)):a()};"undefined"!=typeof Promise&&1===r.ctx.decodeAudioData.length?r.ctx.decodeAudioData(e).then(n).catch(a):r.ctx.decodeAudioData(e,n,a)},h=function(e,t){t&&!e._duration&&(e._duration=t.duration),0===Object.keys(e._sprite).length&&(e._sprite={__default:[0,1e3*e._duration]}),"loaded"!==e._state&&(e._state="loaded",e._emit("load"),e._loadQueue())},p=function(){if(r.usingWebAudio){try{"undefined"!=typeof AudioContext?r.ctx=new AudioContext:"undefined"!=typeof webkitAudioContext?r.ctx=new webkitAudioContext:r.usingWebAudio=!1}catch(e){r.usingWebAudio=!1}r.ctx||(r.usingWebAudio=!1);var e=/iP(hone|od|ad)/.test(r._navigator&&r._navigator.platform),t=r._navigator&&r._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),a=t?parseInt(t[1],10):null;if(e&&a&&a<9){var n=/safari/.test(r._navigator&&r._navigator.userAgent.toLowerCase());r._navigator&&!n&&(r.usingWebAudio=!1)}r.usingWebAudio&&(r.masterGain=void 0===r.ctx.createGain?r.ctx.createGainNode():r.ctx.createGain(),r.masterGain.gain.setValueAtTime(r._muted?0:r._volume,r.ctx.currentTime),r.masterGain.connect(r.ctx.destination)),r._setup()}};void 0===(n=function(){return{Howler:r,Howl:s}}.apply(t,[]))||(e.exports=n),t.Howler=r,t.Howl=s,void 0!==a.g?(a.g.HowlerGlobal=i,a.g.Howler=r,a.g.Howl=s,a.g.Sound=o):"undefined"!=typeof window&&(window.HowlerGlobal=i,window.Howler=r,window.Howl=s,window.Sound=o)}(),function(){"use strict";var e;HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(e){var t=this;if(!t.ctx||!t.ctx.listener)return t;for(var a=t._howls.length-1;a>=0;a--)t._howls[a].stereo(e);return t},HowlerGlobal.prototype.pos=function(e,t,a){var n=this;return n.ctx&&n.ctx.listener?(t="number"!=typeof t?n._pos[1]:t,a="number"!=typeof a?n._pos[2]:a,"number"!=typeof e?n._pos:(n._pos=[e,t,a],void 0!==n.ctx.listener.positionX?(n.ctx.listener.positionX.setTargetAtTime(n._pos[0],Howler.ctx.currentTime,.1),n.ctx.listener.positionY.setTargetAtTime(n._pos[1],Howler.ctx.currentTime,.1),n.ctx.listener.positionZ.setTargetAtTime(n._pos[2],Howler.ctx.currentTime,.1)):n.ctx.listener.setPosition(n._pos[0],n._pos[1],n._pos[2]),n)):n},HowlerGlobal.prototype.orientation=function(e,t,a,n,i,r){var s=this;if(!s.ctx||!s.ctx.listener)return s;var o=s._orientation;return t="number"!=typeof t?o[1]:t,a="number"!=typeof a?o[2]:a,n="number"!=typeof n?o[3]:n,i="number"!=typeof i?o[4]:i,r="number"!=typeof r?o[5]:r,"number"!=typeof e?o:(s._orientation=[e,t,a,n,i,r],void 0!==s.ctx.listener.forwardX?(s.ctx.listener.forwardX.setTargetAtTime(e,Howler.ctx.currentTime,.1),s.ctx.listener.forwardY.setTargetAtTime(t,Howler.ctx.currentTime,.1),s.ctx.listener.forwardZ.setTargetAtTime(a,Howler.ctx.currentTime,.1),s.ctx.listener.upX.setTargetAtTime(n,Howler.ctx.currentTime,.1),s.ctx.listener.upY.setTargetAtTime(i,Howler.ctx.currentTime,.1),s.ctx.listener.upZ.setTargetAtTime(r,Howler.ctx.currentTime,.1)):s.ctx.listener.setOrientation(e,t,a,n,i,r),s)},Howl.prototype.init=(e=Howl.prototype.init,function(t){var a=this;return a._orientation=t.orientation||[1,0,0],a._stereo=t.stereo||null,a._pos=t.pos||null,a._pannerAttr={coneInnerAngle:void 0!==t.coneInnerAngle?t.coneInnerAngle:360,coneOuterAngle:void 0!==t.coneOuterAngle?t.coneOuterAngle:360,coneOuterGain:void 0!==t.coneOuterGain?t.coneOuterGain:0,distanceModel:void 0!==t.distanceModel?t.distanceModel:"inverse",maxDistance:void 0!==t.maxDistance?t.maxDistance:1e4,panningModel:void 0!==t.panningModel?t.panningModel:"HRTF",refDistance:void 0!==t.refDistance?t.refDistance:1,rolloffFactor:void 0!==t.rolloffFactor?t.rolloffFactor:1},a._onstereo=t.onstereo?[{fn:t.onstereo}]:[],a._onpos=t.onpos?[{fn:t.onpos}]:[],a._onorientation=t.onorientation?[{fn:t.onorientation}]:[],e.call(this,t)}),Howl.prototype.stereo=function(e,a){var n=this;if(!n._webAudio)return n;if("loaded"!==n._state)return n._queue.push({event:"stereo",action:function(){n.stereo(e,a)}}),n;var i=void 0===Howler.ctx.createStereoPanner?"spatial":"stereo";if(void 0===a){if("number"!=typeof e)return n._stereo;n._stereo=e,n._pos=[e,0,0]}for(var r=n._getSoundIds(a),s=0;s<r.length;s++){var o=n._soundById(r[s]);if(o){if("number"!=typeof e)return o._stereo;o._stereo=e,o._pos=[e,0,0],o._node&&(o._pannerAttr.panningModel="equalpower",o._panner&&o._panner.pan||t(o,i),"spatial"===i?void 0!==o._panner.positionX?(o._panner.positionX.setValueAtTime(e,Howler.ctx.currentTime),o._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),o._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):o._panner.setPosition(e,0,0):o._panner.pan.setValueAtTime(e,Howler.ctx.currentTime)),n._emit("stereo",o._id)}}return n},Howl.prototype.pos=function(e,a,n,i){var r=this;if(!r._webAudio)return r;if("loaded"!==r._state)return r._queue.push({event:"pos",action:function(){r.pos(e,a,n,i)}}),r;if(a="number"!=typeof a?0:a,n="number"!=typeof n?-.5:n,void 0===i){if("number"!=typeof e)return r._pos;r._pos=[e,a,n]}for(var s=r._getSoundIds(i),o=0;o<s.length;o++){var c=r._soundById(s[o]);if(c){if("number"!=typeof e)return c._pos;c._pos=[e,a,n],c._node&&(c._panner&&!c._panner.pan||t(c,"spatial"),void 0!==c._panner.positionX?(c._panner.positionX.setValueAtTime(e,Howler.ctx.currentTime),c._panner.positionY.setValueAtTime(a,Howler.ctx.currentTime),c._panner.positionZ.setValueAtTime(n,Howler.ctx.currentTime)):c._panner.setPosition(e,a,n)),r._emit("pos",c._id)}}return r},Howl.prototype.orientation=function(e,a,n,i){var r=this;if(!r._webAudio)return r;if("loaded"!==r._state)return r._queue.push({event:"orientation",action:function(){r.orientation(e,a,n,i)}}),r;if(a="number"!=typeof a?r._orientation[1]:a,n="number"!=typeof n?r._orientation[2]:n,void 0===i){if("number"!=typeof e)return r._orientation;r._orientation=[e,a,n]}for(var s=r._getSoundIds(i),o=0;o<s.length;o++){var c=r._soundById(s[o]);if(c){if("number"!=typeof e)return c._orientation;c._orientation=[e,a,n],c._node&&(c._panner||(c._pos||(c._pos=r._pos||[0,0,-.5]),t(c,"spatial")),void 0!==c._panner.orientationX?(c._panner.orientationX.setValueAtTime(e,Howler.ctx.currentTime),c._panner.orientationY.setValueAtTime(a,Howler.ctx.currentTime),c._panner.orientationZ.setValueAtTime(n,Howler.ctx.currentTime)):c._panner.setOrientation(e,a,n)),r._emit("orientation",c._id)}}return r},Howl.prototype.pannerAttr=function(){var e,a,n,i=this,r=arguments;if(!i._webAudio)return i;if(0===r.length)return i._pannerAttr;if(1===r.length){if("object"!=typeof r[0])return(n=i._soundById(parseInt(r[0],10)))?n._pannerAttr:i._pannerAttr;e=r[0],void 0===a&&(e.pannerAttr||(e.pannerAttr={coneInnerAngle:e.coneInnerAngle,coneOuterAngle:e.coneOuterAngle,coneOuterGain:e.coneOuterGain,distanceModel:e.distanceModel,maxDistance:e.maxDistance,refDistance:e.refDistance,rolloffFactor:e.rolloffFactor,panningModel:e.panningModel}),i._pannerAttr={coneInnerAngle:void 0!==e.pannerAttr.coneInnerAngle?e.pannerAttr.coneInnerAngle:i._coneInnerAngle,coneOuterAngle:void 0!==e.pannerAttr.coneOuterAngle?e.pannerAttr.coneOuterAngle:i._coneOuterAngle,coneOuterGain:void 0!==e.pannerAttr.coneOuterGain?e.pannerAttr.coneOuterGain:i._coneOuterGain,distanceModel:void 0!==e.pannerAttr.distanceModel?e.pannerAttr.distanceModel:i._distanceModel,maxDistance:void 0!==e.pannerAttr.maxDistance?e.pannerAttr.maxDistance:i._maxDistance,refDistance:void 0!==e.pannerAttr.refDistance?e.pannerAttr.refDistance:i._refDistance,rolloffFactor:void 0!==e.pannerAttr.rolloffFactor?e.pannerAttr.rolloffFactor:i._rolloffFactor,panningModel:void 0!==e.pannerAttr.panningModel?e.pannerAttr.panningModel:i._panningModel})}else 2===r.length&&(e=r[0],a=parseInt(r[1],10));for(var s=i._getSoundIds(a),o=0;o<s.length;o++)if(n=i._soundById(s[o])){var c=n._pannerAttr;c={coneInnerAngle:void 0!==e.coneInnerAngle?e.coneInnerAngle:c.coneInnerAngle,coneOuterAngle:void 0!==e.coneOuterAngle?e.coneOuterAngle:c.coneOuterAngle,coneOuterGain:void 0!==e.coneOuterGain?e.coneOuterGain:c.coneOuterGain,distanceModel:void 0!==e.distanceModel?e.distanceModel:c.distanceModel,maxDistance:void 0!==e.maxDistance?e.maxDistance:c.maxDistance,refDistance:void 0!==e.refDistance?e.refDistance:c.refDistance,rolloffFactor:void 0!==e.rolloffFactor?e.rolloffFactor:c.rolloffFactor,panningModel:void 0!==e.panningModel?e.panningModel:c.panningModel};var l=n._panner;l||(n._pos||(n._pos=i._pos||[0,0,-.5]),t(n,"spatial"),l=n._panner),l.coneInnerAngle=c.coneInnerAngle,l.coneOuterAngle=c.coneOuterAngle,l.coneOuterGain=c.coneOuterGain,l.distanceModel=c.distanceModel,l.maxDistance=c.maxDistance,l.refDistance=c.refDistance,l.rolloffFactor=c.rolloffFactor,l.panningModel=c.panningModel}return i},Sound.prototype.init=function(e){return function(){var t=this,a=t._parent;t._orientation=a._orientation,t._stereo=a._stereo,t._pos=a._pos,t._pannerAttr=a._pannerAttr,e.call(this),t._stereo?a.stereo(t._stereo):t._pos&&a.pos(t._pos[0],t._pos[1],t._pos[2],t._id)}}(Sound.prototype.init),Sound.prototype.reset=function(e){return function(){var t=this,a=t._parent;return t._orientation=a._orientation,t._stereo=a._stereo,t._pos=a._pos,t._pannerAttr=a._pannerAttr,t._stereo?a.stereo(t._stereo):t._pos?a.pos(t._pos[0],t._pos[1],t._pos[2],t._id):t._panner&&(t._panner.disconnect(0),t._panner=void 0,a._refreshBuffer(t)),e.call(this)}}(Sound.prototype.reset);var t=function(e,t){"spatial"===(t=t||"spatial")?(e._panner=Howler.ctx.createPanner(),e._panner.coneInnerAngle=e._pannerAttr.coneInnerAngle,e._panner.coneOuterAngle=e._pannerAttr.coneOuterAngle,e._panner.coneOuterGain=e._pannerAttr.coneOuterGain,e._panner.distanceModel=e._pannerAttr.distanceModel,e._panner.maxDistance=e._pannerAttr.maxDistance,e._panner.refDistance=e._pannerAttr.refDistance,e._panner.rolloffFactor=e._pannerAttr.rolloffFactor,e._panner.panningModel=e._pannerAttr.panningModel,void 0!==e._panner.positionX?(e._panner.positionX.setValueAtTime(e._pos[0],Howler.ctx.currentTime),e._panner.positionY.setValueAtTime(e._pos[1],Howler.ctx.currentTime),e._panner.positionZ.setValueAtTime(e._pos[2],Howler.ctx.currentTime)):e._panner.setPosition(e._pos[0],e._pos[1],e._pos[2]),void 0!==e._panner.orientationX?(e._panner.orientationX.setValueAtTime(e._orientation[0],Howler.ctx.currentTime),e._panner.orientationY.setValueAtTime(e._orientation[1],Howler.ctx.currentTime),e._panner.orientationZ.setValueAtTime(e._orientation[2],Howler.ctx.currentTime)):e._panner.setOrientation(e._orientation[0],e._orientation[1],e._orientation[2])):(e._panner=Howler.ctx.createStereoPanner(),e._panner.pan.setValueAtTime(e._stereo,Howler.ctx.currentTime)),e._panner.connect(e._node),e._paused||e._parent.pause(e._id,!0).play(e._id,!0)}}()},4210:function(e,t,a){"use strict";function n(e,t,a,n,i,r,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=a,this.propertyName=e,this.type=t,this.sanitizeURL=r,this.removeEmptyString=s}const i={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{i[e]=new n(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{i[e]=new n(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{i[e]=new n(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{i[e]=new n(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{i[e]=new n(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{i[e]=new n(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{i[e]=new n(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{i[e]=new n(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{i[e]=new n(e,5,!1,e.toLowerCase(),null,!1,!1)}));const r=/[\-\:]([a-z])/g,s=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(r,s);i[t]=new n(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(r,s);i[t]=new n(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(r,s);i[t]=new n(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{i[e]=new n(e,1,!1,e.toLowerCase(),null,!1,!1)})),i.xlinkHref=new n("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{i[e]=new n(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:o,SAME:c,possibleStandardNames:l}=a(6811),d=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),u=Object.keys(l).reduce(((e,t)=>{const a=l[t];return a===c?e[t]=t:a===o?e[t.toLowerCase()]=t:e[t]=a,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return i.hasOwnProperty(e)?i[e]:null},t.isCustomAttribute=d,t.possibleStandardNames=u},4363:function(e,t,a){"use strict";e.exports=a(2799)},4373:function(e){e.exports=function(e){var t=Object(e),a=[];for(var n in t)a.unshift(n);return function e(){for(;a.length;)if((n=a.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},4467:function(e,t,a){"use strict";a.d(t,{A:function(){return i}});var n=a(816);function i(e,t,a){return(t=(0,n.A)(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}},4633:function(e,t,a){var n=a(5172),i=a(6993),r=a(5869),s=a(887),o=a(1791),c=a(4373),l=a(579);function d(){"use strict";var t=i(),a=t.m(d),u=(Object.getPrototypeOf?Object.getPrototypeOf(a):a.__proto__).constructor;function h(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===u||"GeneratorFunction"===(t.displayName||t.name))}var p={throw:1,return:2,break:3,continue:3};function g(e){var t,a;return function(n){t||(t={stop:function(){return a(n.a,2)},catch:function(){return n.v},abrupt:function(e,t){return a(n.a,p[e],t)},delegateYield:function(e,i,r){return t.resultName=i,a(n.d,l(e),r)},finish:function(e){return a(n.f,e)}},a=function(e,a,i){n.p=t.prev,n.n=t.next;try{return e(a,i)}finally{t.next=n.n}}),t.resultName&&(t[t.resultName]=n.v,t.resultName=void 0),t.sent=n.v,t.next=n.n;try{return e.call(this,t)}finally{n.p=t.prev,n.n=t.next}}}return(e.exports=d=function(){return{wrap:function(e,a,n,i){return t.w(g(e),a,n,i&&i.reverse())},isGeneratorFunction:h,mark:t.m,awrap:function(e,t){return new n(e,t)},AsyncIterator:o,async:function(e,t,a,n,i){return(h(t)?s:r)(g(e),t,a,n,i)},keys:c,values:l}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=d,e.exports.__esModule=!0,e.exports.default=e.exports},4756:function(e,t,a){var n=a(4633)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},4945:function(e,t){var a="undefined"!=typeof self?self:this,n=function(){function e(){this.fetch=!1,this.DOMException=a.DOMException}return e.prototype=a,new e}();!function(e){!function(t){var a="URLSearchParams"in e,n="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),r="FormData"in e,s="ArrayBuffer"in e;if(s)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&o.indexOf(Object.prototype.toString.call(e))>-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function u(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function g(e){return new Promise((function(t,a){e.onload=function(){t(e.result)},e.onerror=function(){a(e.error)}}))}function _(e){var t=new FileReader,a=g(t);return t.readAsArrayBuffer(e),a}function f(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:r&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:a&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=f(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=f(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(_)}),this.text=function(){var e,t,a,n=p(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,a=g(t=new FileReader),t.readAsText(e),a;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),a=new Array(t.length),n=0;n<t.length;n++)a[n]=String.fromCharCode(t[n]);return a.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},r&&(this.formData=function(){return this.text().then(y)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(e,t){e=l(e),t=d(t);var a=this.map[e];this.map[e]=a?a+", "+t:t},h.prototype.delete=function(e){delete this.map[l(e)]},h.prototype.get=function(e){return e=l(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(l(e))},h.prototype.set=function(e,t){this.map[l(e)]=d(t)},h.prototype.forEach=function(e,t){for(var a in this.map)this.map.hasOwnProperty(a)&&e.call(t,this.map[a],a,this)},h.prototype.keys=function(){var e=[];return this.forEach((function(t,a){e.push(a)})),u(e)},h.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),u(e)},h.prototype.entries=function(){var e=[];return this.forEach((function(t,a){e.push([a,t])})),u(e)},n&&(h.prototype[Symbol.iterator]=h.prototype.entries);var v=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function w(e,t){var a,n,i=(t=t||{}).body;if(e instanceof w){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new h(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new h(t.headers)),this.method=(n=(a=t.method||this.method||"GET").toUpperCase(),v.indexOf(n)>-1?n:a),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function y(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var a=e.split("="),n=a.shift().replace(/\+/g," "),i=a.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function b(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},m.call(w.prototype),m.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},b.error=function(){var e=new b(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];b.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new b(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var a=Error(e);this.stack=a.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function I(e,a){return new Promise((function(n,r){var s=new w(e,a);if(s.signal&&s.signal.aborted)return r(new t.DOMException("Aborted","AbortError"));var o=new XMLHttpRequest;function c(){o.abort()}o.onload=function(){var e,t,a={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var a=e.split(":"),n=a.shift().trim();if(n){var i=a.join(":").trim();t.append(n,i)}})),t)};a.url="responseURL"in o?o.responseURL:a.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;n(new b(i,a))},o.onerror=function(){r(new TypeError("Network request failed"))},o.ontimeout=function(){r(new TypeError("Network request failed"))},o.onabort=function(){r(new t.DOMException("Aborted","AbortError"))},o.open(s.method,s.url,!0),"include"===s.credentials?o.withCredentials=!0:"omit"===s.credentials&&(o.withCredentials=!1),"responseType"in o&&i&&(o.responseType="blob"),s.headers.forEach((function(e,t){o.setRequestHeader(t,e)})),s.signal&&(s.signal.addEventListener("abort",c),o.onreadystatechange=function(){4===o.readyState&&s.signal.removeEventListener("abort",c)}),o.send(void 0===s._bodyInit?null:s._bodyInit)}))}I.polyfill=!0,e.fetch||(e.fetch=I,e.Headers=h,e.Request=w,e.Response=b),t.Headers=h,t.Request=w,t.Response=b,t.fetch=I,Object.defineProperty(t,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t},5172:function(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},5229:function(e,t,a){"use strict";var n=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(a(1133)),i=a(8917);function r(e,t){var a={};return e&&"string"==typeof e?((0,n.default)(e,(function(e,n){e&&n&&(a[(0,i.camelCase)(e,t)]=n)})),a):a}r.default=r,e.exports=r},5270:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CARRIAGE_RETURN_PLACEHOLDER_REGEX=t.CARRIAGE_RETURN_PLACEHOLDER=t.CARRIAGE_RETURN_REGEX=t.CARRIAGE_RETURN=t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{}),t.CARRIAGE_RETURN="\r",t.CARRIAGE_RETURN_REGEX=new RegExp(t.CARRIAGE_RETURN,"g"),t.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(),"__"),t.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(t.CARRIAGE_RETURN_PLACEHOLDER,"g")},5361:function(e,t,a){"use strict";function n(e,t){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},n(e,t)}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n(e,t)}a.d(t,{A:function(){return i}})},5413:function(e,t){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(a=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===a.Tag||e.type===a.Script||e.type===a.Style},t.Root=a.Root,t.Text=a.Text,t.Directive=a.Directive,t.Comment=a.Comment,t.Script=a.Script,t.Style=a.Style,t.Tag=a.Tag,t.CDATA=a.CDATA,t.Doctype=a.Doctype},5496:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,a,h=(e=(0,n.escapeSpecialCharacters)(e)).match(o),p=h&&h[1]?h[1].toLowerCase():"";switch(p){case i:var g=u(e);return c.test(e)||null===(t=null==(m=g.querySelector(r))?void 0:m.parentNode)||void 0===t||t.removeChild(m),l.test(e)||null===(a=null==(m=g.querySelector(s))?void 0:m.parentNode)||void 0===a||a.removeChild(m),g.querySelectorAll(i);case r:case s:var f=d(e).querySelectorAll(p);return l.test(e)&&c.test(e)?f[0].parentNode.childNodes:f;default:return _?_(e):(m=d(e,s).querySelector(s)).childNodes;var m}};var n=a(7731),i="html",r="head",s="body",o=/<([a-zA-Z]+[0-9]?)/,c=/<head[^]*>/i,l=/<body[^]*>/i,d=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},u=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},h="object"==typeof window&&window.DOMParser;if("function"==typeof h){var p=new h;d=u=function(e,t){return t&&(e="<".concat(t,">").concat(e,"</").concat(t,">")),p.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var g=document.implementation.createHTMLDocument();d=function(e,t){if(t){var a=g.documentElement.querySelector(t);return a&&(a.innerHTML=e),g}return g.documentElement.innerHTML=e,g}}var _,f="object"==typeof document&&document.createElement("template");f&&f.content&&(_=function(e){return f.innerHTML=e,f.content.childNodes})},5546:function(e){function t(a,n,i,r){var s=Object.defineProperty;try{s({},"",{})}catch(a){s=0}e.exports=t=function(e,a,n,i){if(a)s?s(e,a,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[a]=n;else{var r=function(a,n){t(e,a,(function(e){return this._invoke(a,n,e)}))};r("next",0),r("throw",1),r("return",2)}},e.exports.__esModule=!0,e.exports.default=e.exports,t(a,n,i,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},5580:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{HF:function(){return pageUnload},Kb:function(){return submitOfflineForm},Ox:function(){return hideInvitation},TG:function(){return voteAction},VC:function(){return subscribeNotifications},WL:function(){return setSiteAccess},X:function(){return updateMessageData},Ys:function(){return transferToHumanAction},Yt:function(){return initProactive},ZG:function(){return updateTriggerClicked},_0:function(){return endChat},_t:function(){return initOnlineForm},_y:function(){return initOfflineForm},ag:function(){return submitOnlineForm},cT:function(){return storeSubscriber},d$:function(){return getProducts},d1:function(){return checkChatStatus},fJ:function(){return minimizeWidget},fd:function(){return removeFilePreview},g4:function(){return cancelPresurvey},lj:function(){return fetchMessages},nc:function(){return updateMessage},sw:function(){return submitInlineSurvey},tQ:function(){return userTyping},tj:function(){return addMessage},tl:function(){return parseScript},tz:function(){return initChatUI}});var axios__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1083),_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(7912),_constants_chat_status__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(8068);window.lhcAxios=axios__WEBPACK_IMPORTED_MODULE_1__.A;var syncStatus={msg:!1,add_msg:!1,add_msg_pending:[],status:!1,error_counter:0,auto_close_timeout:null},defaultHeaders={headers:{"Content-Type":"application/x-www-form-urlencoded"}};function closeWidget(){return function(e){e({type:"closeWidget"})}}function abtractAction(e){return function(t){t(e)}}function hideInvitation(e,t){return function(a,n){var i=n();_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.sendMessageParent("closeWidget",[{sender:"closeButton"}]),_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.sendMessageParent("cancelInvitation",[{name:i.chatwidget.getIn(["proactive","data","invitation_name"])}]),axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+"chat/chatwidgetclosed/(vid)/"+i.chatwidget.get("vid")+(!0===t?"/(conversion)/true":""),null,defaultHeaders).then((function(t){a(e?{type:"CANCEL_INVITATION"}:{type:"HIDE_INVITATION"})})).catch((function(e){console.log(e)}))}}function minimizeWidget(e){return function(t,a){!0===a().chatwidget.getIn(["proactive","has"])?hideInvitation()(t,a):_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.sendMessageParent("closeWidget",[{sender:"closeButton"}]),!e||"popup"!=window.lhcChat.mode&&"embed"!=window.lhcChat.mode||(_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.removeSessionStorage("_chat"),_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.removeSessionStorage("_reset_chat"),window.close())}}function cancelPresurvey(e){return function(t,a){var n=a(),i="";n.chatwidget.get("theme")&&(i=i+"/(theme)/"+n.chatwidget.get("theme")),!0===e&&(i+="/(confirm)/true"),axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+n.chatwidget.getIn(["chat_ui","pre_survey_url"])+n.chatwidget.getIn(["chatData","id"])+"/"+n.chatwidget.getIn(["chatData","hash"])+i,null,defaultHeaders).then((function(a){(!1===e||a.data.confirmed)&&(t({type:"UI_STATE",data:{attr:"pre_survey_done",val:2}}),n.chatwidget.hasIn(["chat_ui","survey_id"])||_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.sendMessageParent("endChat",[{sender:"endButton"}]))})).catch((function(e){console.log(e)}))}}function endChat(e,t){return t=t||"t",function(a,n){clearTimeout(syncStatus.auto_close_timeout),axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+"chat/chatwidgetclosed/(eclose)/"+t+"/(hash)/"+e.chat.id+"_"+e.chat.hash+"/(vid)/"+e.vid+"/(close)/"+(e.noClose?"0":"1"),null,defaultHeaders).then((function(t){e.noClose?a({type:"INIT_CLOSE",data:e}):"popup"==window.lhcChat.mode?(_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.removeSessionStorage("_chat"),_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.removeSessionStorage("_reset_chat"),window.close(),_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.eventEmitter.emitEvent("endedChat",[{chat_id:e.chat.id,hash:e.chat.hash}])):_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.sendMessageParent("endChat",[{show_start:e.show_start,sender:"endButton"}])})).catch((function(e){console.log(e)}))}}function setSiteAccess(e){return axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+"widgetrestapi/setsiteaccess/",JSON.stringify(e),defaultHeaders)}function getProducts(e){return function(t){axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+"widgetrestapi/getproducts/"+e.dep_id,null,defaultHeaders).then((function(e){t({type:"INIT_PRODUCTS",data:e.data})})).catch((function(e){console.log(e)}))}}function voteAction(e){return axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+"chat/voteaction/"+e.id+"/"+e.hash+"/"+e.type,null,defaultHeaders)}function updateMessageData(e,t){return axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+"chat/updatemessagedata/"+e.id+"/"+e.hash+"/"+e.msg_id,JSON.stringify(t),defaultHeaders)}function transferToHumanAction(e){return axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+"chat/transfertohuman/"+e.id+"/"+e.hash,null,defaultHeaders)}function initProactive(e){return function(t,a){var n=a(),i={invitation:e.invitation,vid_id:e.vid_id,uts:(new Date).getTime()};n.chatwidget.get("theme")&&(i.theme=n.chatwidget.get("theme")),n.chatwidget.get("vid")&&(i.vid=n.chatwidget.get("vid")),axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+"widgetrestapi/getinvitation",JSON.stringify(i),defaultHeaders).then((function(e){e.data.chat_id&&e.data.chat_hash?(t({type:"ONLINE_SUBMITTED",data:{success:!0,chatLiveData:{message_id_first:e.data.message_id_first},chatData:{id:e.data.chat_id,hash:e.data.chat_hash}}}),showMessageSnippet({id:e.data.chat_id,hash:e.data.chat_hash})(t,a)):t({type:"PROACTIVE",data:e.data})}))}}function showMessageSnippet(e){return function(t,a){axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+"widgetrestapi/getmessagesnippet",JSON.stringify(e),defaultHeaders).then((function(e){_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.sendMessageParent("msgSnippet",[e.data]);var t=a();_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.emitEvent("play_sound",[{type:"new_chat",sound_on:!0===t.chatwidget.getIn(["usersettings","soundOn"]),widget_open:!1}])})).catch((function(e){}))}}function storeSubscriber(e){return function(t,a){var n=a(),i="/(action)/sub";n.chatwidget.hasIn(["chatData","id"])&&n.chatwidget.hasIn(["chatData","hash"])&&(i=i+"/(hash)/"+n.chatwidget.getIn(["chatData","id"])+"_"+n.chatwidget.getIn(["chatData","hash"])),n.chatwidget.get("theme")&&(i=i+"/(theme)/"+n.chatwidget.get("theme")),n.chatwidget.get("vid")&&(i=i+"/(vid)/"+n.chatwidget.get("vid")),axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+"notifications/subscribe"+i,JSON.stringify({data:e}),defaultHeaders).then((function(e){n.chatwidget.hasIn(["chatData","id"])&&n.chatwidget.hasIn(["chatData","hash"])&&t(fetchMessages({chat_id:n.chatwidget.getIn(["chatData","id"]),hash:n.chatwidget.getIn(["chatData","hash"]),lmgsid:n.chatwidget.getIn(["chatLiveData","lmsgid"]),theme:n.chatwidget.get("theme"),active_widget:!0}))}))}}function updateTriggerClicked(e,t){return function(a,n){var i=n();return axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+"genericbot/"+(e.mainType?e.mainType:"buttonclicked")+"/"+i.chatwidget.getIn(["chatData","id"])+"/"+i.chatwidget.getIn(["chatData","hash"])+e.type,JSON.stringify(t),defaultHeaders)}}function subscribeNotifications(e){return function(e,t){var a=t();_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.sendMessageParent("subscribeEvent",[{pk:a.chatwidget.getIn(["chat_ui","notifications_pk"])}])}}function initOfflineForm(e){return function(t){axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+"widgetrestapi/onlinesettings",JSON.stringify(e),defaultHeaders).then((function(e){t({type:"OFFLINE_FIELDS_UPDATED",data:e.data}),_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.sendMessageParent("widgetRendered",[])})).catch((function(e){t({type:"OFFLINE_FIELDS_REJECTED",data:e}),console.error(e)}))}}function initOnlineForm(e){return function(t){axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+"widgetrestapi/onlinesettings",JSON.stringify(e),defaultHeaders).then((function(e){e.data.paid.continue&&!0===e.data.paid.continue?t({type:"ONLINE_SUBMITTED",data:{success:!0,chatLiveData:{message_id_first:0},chatData:{id:e.data.paid.id,hash:e.data.paid.hash}}}):t({type:"ONLINE_FIELDS_UPDATED",data:e.data}),_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.sendMessageParent("widgetRendered",[])})).catch((function(e){t({type:"ONLINE_FIELDS_REJECTED",data:e}),console.error(e)}))}}function getCaptcha(e,t,a,n){var i=new Date,r=Math.round(i.getTime()/1e3);axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+"captcha/captchastring/fake/"+r,null,defaultHeaders).then((function(i){if(e({type:"captcha",data:{hash:i.data.result,ts:r}}),a instanceof FormData){var s=JSON.parse(a.get("document"));s.fields["captcha_"+i.data.result]=r,s.fields.tscaptcha=r,s.fields.tscaptcha_resubmit?(delete s.fields.tscaptcha_resubmit,a.set("document",JSON.stringify(s))):(s.fields.tscaptcha_resubmit=1,a.set("document",JSON.stringify(s)),t(a)(e,n))}else a.fields["captcha_"+i.data.result]=r,a.fields.tscaptcha=r,a.fields.tscaptcha_resubmit?delete a.fields.tscaptcha_resubmit:(a.fields.tscaptcha_resubmit=1,t(a)(e,n))}))}function submitOnlineForm(e){return function(t,a){0==a().chatwidget.get("processStatus")&&(t({type:"ONLINE_SUBMITTING"}),axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+"widgetrestapi/submitonline",JSON.stringify(e),{withCredentials:!0,headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then((function(n){!1===n.data.success&&n.data.errors.captcha&&(t({type:"processStatus",data:0}),getCaptcha(t,submitOnlineForm,e,a),!e.fields.tscaptcha_resubmit)||(t({type:"ONLINE_SUBMITTED",data:n.data}),n.data.t&&_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.sendMessageParent("botTrigger",[{trigger:n.data.t}]))})).catch((function(e){t({type:"ONLINE_SUBMITT_REJECTED",data:e})})))}}function submitOfflineForm(e){return function(t,a){t({type:"OFFLINE_SUBMITTING"}),axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+"widgetrestapi/submitoffline",e instanceof FormData?e:JSON.stringify(e),{withCredentials:!0,headers:{"Content-Type":e instanceof FormData?"multipart/form-data":"application/x-www-form-urlencoded"}}).then((function(n){!1===n.data.success&&n.data.errors.captcha&&(getCaptcha(t,submitOfflineForm,e,a),!e.fields.tscaptcha_resubmit)||t({type:"OFFLINE_SUBMITTED",data:n.data})})).catch((function(e){t({type:"OFFLINE_SUBMITT_REJECTED",data:e})}))}}function updateUISettings(e){return function(t,a){axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+"widgetrestapi/uisettings",JSON.stringify(e),defaultHeaders).then((function(e){t({type:"REFRESH_UI_COMPLETED",data:e.data})})).catch((function(e){console.log(e),t({type:"REFRESH_UI_REJECTED",data:e})}))}}function initChatUI(e){return syncStatus.status=!1,function(t,a){axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+"widgetrestapi/initchat",JSON.stringify(e),defaultHeaders).then((function(e){t({type:"INIT_CHAT_SUBMITTED",data:e.data}),e.data.init_calls&&e.data.init_calls.forEach((function(e){"nodeJSChat"===e.extension?Promise.all([__webpack_require__.e(923),__webpack_require__.e(277)]).then(__webpack_require__.bind(__webpack_require__,1277)).then((function(n){n.nodeJSChat.bootstrap(e.params,t,a)})):e.extension})),_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.sendMessageParent("widgetRendered",[])})).catch((function(e){console.log(e),t({type:"INIT_CHAT_REJECTED",data:e})}))}}function processResponseCheckStatus(e,t,a){e.op&&e.op.forEach((function(e){var n=e.split(":")[0];if("lhc_chat_redirect"==n)_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.sendMessageParent("location",[e.split(":")[1].replace(new RegExp("__SPLIT__","g"),":")]);else if("lhc_screenshot"==n){var i=t(),r="";i.chatwidget.hasIn(["chatData","id"])&&(r=r+"/(hash)/"+i.chatwidget.getIn(["chatData","id"])+"_"+i.chatwidget.getIn(["chatData","hash"])),i.chatwidget.get("vid")&&(r=r+"/(vid)/"+i.chatwidget.get("vid")),_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.sendMessageParent("screenshot",[window.lhcChat.base_url+"file/storescreenshot"+r])}else if("lhc_cobrowse"==n)_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.sendMessageParent("screenshare",[]);else if("lhc_cobrowse_cmd"==n)_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.sendMessageParent("screenshareCommand",[e]);else if("lhc_ui_refresh"==n){var s=t();updateUISettings({id:s.chatwidget.getIn(["chatData","id"]),hash:s.chatwidget.getIn(["chatData","hash"])})(a,t)}else if(-1!==n.indexOf("lhinst.updateMessageRow")){var o=t();updateMessage({msg_id:n.replace("lhinst.updateMessageRow(","").replace(")","").replace(";",""),lmgsid:o.chatwidget.getIn(["chatLiveData","lmsgid"]),mode:o.chatwidget.get("mode"),theme:o.chatwidget.get("theme"),id:o.chatwidget.getIn(["chatData","id"]),hash:o.chatwidget.getIn(["chatData","hash"])})(a,t)}}))}function updateMessage(e){return function(t,a){a(),axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+"widgetrestapi/fetchmessage",JSON.stringify(e),defaultHeaders).then((function(a){var n=document.getElementById("msg-"+a.data.id),i=null;if(null!==n&&(i=n.className),t({type:"FETCH_MESSAGE_SUBMITTED",data:a.data}),(n=document.getElementById("msg-"+a.data.id))&&null!==i&&(n.className=i),!e.no_scroll||e.lmgsid&&e.msg_id==e.lmgsid){var r=document.getElementById("messages-scroll");null!==r&&(r.scrollTop=r.scrollHeight+1e3,setTimeout((function(){null!==r&&(r.scrollTop=r.scrollHeight+1e3)}),150))}})).catch((function(e){console.log(e)}))}}function parseScript(domNode,inst,obj,dispatch,getState){var attr=domNode.attribs||domNode;if("lhinst.disableVisitorEditor"==attr["data-bot-action"])inst.disableEditor=!0;else if("lhinst.setDelay"==attr["data-bot-action"])inst.delayData.push(JSON.parse(attr["data-bot-args"]));else if("button-click"==attr["data-bot-action"])dispatch(updateTriggerClicked({type:"/(type)/"+attr["data-action-type"]+(obj.theme?"/(theme)/"+obj.theme:"")},{"payload-id":void 0===attr["data-identifier"]?null:attr["data-identifier"],payload:attr["data-payload"],id:attr["data-id"],processed:void 0===attr["data-keep"]})).then((function(e){if(e.data.t&&_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.sendMessageParent("botTrigger",[{trigger:e.data.t}]),e.data.update_message){var t=getState();updateMessage({no_scroll:!0,msg_id:attr["data-id"],lmgsid:t.chatwidget.getIn(["chatLiveData","lmsgid"]),mode:t.chatwidget.get("mode"),theme:t.chatwidget.get("theme"),id:t.chatwidget.getIn(["chatData","id"]),hash:t.chatwidget.getIn(["chatData","hash"])})(dispatch,getState)}else fetchMessages({theme:obj.theme,chat_id:obj.id,lmgsid:obj.lmgsid,hash:obj.hash})(dispatch,getState),checkChatStatus({chat_id:obj.id,hash:obj.hash,theme:obj.theme,mode:obj.mode})}));else if("execute-js"==attr["data-bot-action"])if(attr["data-bot-extension"]){var args={};void 0!==attr["data-bot-args"]&&(args=JSON.parse(attr["data-bot-args"])),_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.emitEvent("extensionExecute",[attr["data-bot-extension"],[args]])}else if(attr["data-bot-emit"]){var args={};void 0!==attr["data-bot-args"]&&(args=JSON.parse(attr["data-bot-args"])),attr["data-bot-emit-parent"]?"minWidget"==attr["data-bot-emit"]?inst.props.dispatch(minimizeWidget()):_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.sendMessageParent(attr["data-bot-emit"],[args]):_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.emitEvent(attr["data-bot-emit"],[args])}else if(attr["data-bot-event"])inst.props[attr["data-bot-event"]]();else if(attr.src){var th=document.getElementsByTagName("head")[0],s=document.createElement("script");s.setAttribute("type","text/javascript"),s.setAttribute("src",attr.src),th.appendChild(s)}else void 0!==domNode.children[0]&&void 0!==domNode.children[0].data&&eval(domNode.children[0].data)}function isNetworkError(e){return!!e.isAxiosError&&!e.response}function fetchMessages(e){return function(t,a){1!=syncStatus.msg&&1!=syncStatus.add_msg&&(syncStatus.msg=!0,axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+"widgetrestapi/fetchmessages",JSON.stringify(e),defaultHeaders).then((function(n){try{t({type:"FETCH_MESSAGES_SUBMITTED",data:n.data}),processResponseCheckStatus(n.data,a,t),_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.emitEvent("chat.fetch_messages",[n.data,t,a]),(n.data.cs||n.data.closed&&!0===n.data.closed)&&axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+"widgetrestapi/checkchatstatus",JSON.stringify(e),defaultHeaders).then((function(e){e.data.deleted?(_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.sendMessageParent("endChat",[{sender:"endButton"}]),clearTimeout(syncStatus.auto_close_timeout)):(t({type:"CHECK_CHAT_STATUS_FINISHED",data:e.data}),_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.emitEvent("chat.check_status",[e.data,t,a])),e.data.closed&&!0===e.data.closed&&!e.data.deleted&&setAutoClose(a)})).catch((function(e){t({type:"CHECK_CHAT_STATUS_REJECTED",data:e})}))}catch(e){throw e}finally{syncStatus.msg=!1}})).catch((function(e){isNetworkError(e)&&t({type:"NO_CONNECTION",data:!0}),syncStatus.msg=!1})))}}function checkChatStatus(e){return function(t,a){1!=syncStatus.status&&(syncStatus.status=!0,axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+"widgetrestapi/checkchatstatus",JSON.stringify(e),defaultHeaders).then((function(e){e.data.deleted?(_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.sendMessageParent("endChat",[{sender:"endButton"}]),clearTimeout(syncStatus.auto_close_timeout)):(syncStatus.status=!1,t({type:"CHECK_CHAT_STATUS_FINISHED",data:e.data}),_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.emitEvent("chat.check_status",[e.data,t,a])),e.data.closed&&!0===e.data.closed&&!e.data.deleted&&setAutoClose(a)})).catch((function(e){syncStatus.status=!1})))}}function setAutoClose(e){var t=e();t.chatwidget.hasIn(["chat_ui","open_timeout"])&&(clearTimeout(syncStatus.auto_close_timeout),syncStatus.auto_close_timeout=setTimeout((function(){_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.sendMessageParent("endChat",[{sender:"endButton"}]),clearTimeout(syncStatus.auto_close_timeout)}),1e3*t.chatwidget.getIn(["chat_ui","open_timeout"])))}function pageUnload(){return function(e,t){var a=t(),n=!1,i=a.chatwidget.hasIn(["chatLiveData","status_sub"])&&(a.chatwidget.getIn(["chatLiveData","status_sub"])==_constants_chat_status__WEBPACK_IMPORTED_MODULE_2__.ag||a.chatwidget.getIn(["chatLiveData","status_sub"])==_constants_chat_status__WEBPACK_IMPORTED_MODULE_2__.Z9||a.chatwidget.getIn(["chatLiveData","status_sub"])==_constants_chat_status__WEBPACK_IMPORTED_MODULE_2__.Km&&(a.chatwidget.getIn(["chatLiveData","uid"])>0||a.chatwidget.getIn(["chatLiveData","status"])===_constants_chat_status__WEBPACK_IMPORTED_MODULE_2__.oF)),r=a.chatwidget.getIn(["chatLiveData","status"])==_constants_chat_status__WEBPACK_IMPORTED_MODULE_2__.X8&&a.chatwidget.getIn(["chatLiveData","uid"])>0;(1==i||r)&&a.chatwidget.hasIn(["chat_ui","survey_id"])&&(a.chatwidget.hasIn(["chat_ui","survey_button"])&&1!==a.chatwidget.getIn(["chat_ui_state","show_survey"])&&1!=i||(n=!0)),a.chatwidget.hasIn(["chat_ui","close_on_unload"])&&"embed"==a.chatwidget.get("mode")&&(!1!==a.chatwidget.get("isMobile")&&!0!==n||_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.sendMessageParent("endChat",[{sender:"endButton"}])),"popup"==a.chatwidget.get("mode")&&1==n&&_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.sendMessageParent("endChat",[{sender:"endButton"}]),a.chatwidget.hasIn(["chatData","id"])&&a.chatwidget.hasIn(["chatData","hash"])?axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+"chat/userclosechat/"+a.chatwidget.getIn(["chatData","id"])+"/"+a.chatwidget.getIn(["chatData","hash"]),null,defaultHeaders):!0===a.chatwidget.getIn(["proactive","has"])&&"popup"==window.lhcChat.mode&&window.opener&&hideInvitation()(e,t)}}function checkErrorCounter(){2==syncStatus.error_counter&&_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.sendMessageParent("reloadWidget",[])}function addMessage(e,t){return function(a,n){if(t||a({type:"ADD_MSG_TO_STORE",data:e.msg}),1!=syncStatus.add_msg){syncStatus.add_msg=!0;try{_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.eventEmitter.emitEvent("messageSend",[{chat_id:e.id,hash:e.hash,msg:e.msg}])}catch(e){_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.logJSError({stack:JSON.stringify(JSON.stringify(e))})}axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+"widgetrestapi/addmsguser",JSON.stringify(e),defaultHeaders).then((function(t){try{(t.data.error||n().chatwidget.getIn(["chatLiveData","error"]))&&a({type:"ADD_MESSAGES_SUBMITTED",data:{r:t.data.r,msg:e.msg}}),syncStatus.add_msg=!1,fetchMessages({active_widget:!0,theme:e.theme,chat_id:e.id,lmgsid:n().chatwidget.getIn(["chatLiveData","lmsgid"]),hash:e.hash})(a,n),t.data.t&&_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.sendMessageParent("botTrigger",[{trigger:t.data.t}]),void 0===t.data.r||!0===t.data.error&&!0===t.data.system?(syncStatus.error_counter++,2==syncStatus.error_counter&&(_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.logJSError({stack:JSON.stringify(JSON.stringify(t)+"\nRD:"+JSON.stringify(t.data)+"\nRH:"+JSON.stringify(t.headers)+"\nRS:"+JSON.stringify(t.status))}),checkErrorCounter()),_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.eventEmitter.emitEvent("messageSendError",[{chat_id:e.id,hash:e.hash,msg:JSON.stringify(t.data)}])):syncStatus.error_counter=0}catch(e){throw e}finally{syncStatus.add_msg=!1,syncStatus.add_msg_pending.length>0&&addMessage(syncStatus.add_msg_pending.shift(),!0)(a,n)}})).catch((function(t){if(isNetworkError(t))a({type:"ADD_MESSAGES_SUBMITTED",data:{r:"SEND_CONNECTION",msg:e.msg}}),a({type:"NO_CONNECTION",data:!0});else{syncStatus.error_counter++;var i;i=t.response?JSON.stringify(JSON.stringify(t)+"\nRD:"+JSON.stringify(t.response.data)+"\nRH:"+JSON.stringify(t.response.headers)+"\nRS:"+JSON.stringify(t.response.status)):(t.request,JSON.stringify(JSON.stringify(t))),2==syncStatus.error_counter?(_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.logJSError({stack:i}),_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.eventEmitter.emitEvent("messageSendError",[{chat_id:e.id,hash:e.hash,msg:i}]),checkErrorCounter()):(a({type:"ADD_MESSAGES_SUBMITTED",data:{r:"SEND_FAILED",msg:e.msg}}),syncStatus.add_msg=!1,addMessage(e,!0)(a,n))}syncStatus.add_msg=!1}))}else syncStatus.add_msg_pending.push(e)}}function userTyping(e,t){return function(a,n){var i=n();"true"===e?_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.eventEmitter.emitEvent("visitorTyping",[{chat_id:i.chatwidget.getIn(["chatData","id"]),hash:i.chatwidget.getIn(["chatData","hash"]),status:!0,msg:t}]):_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_0__.q.eventEmitter.emitEvent("visitorTyping",[{chat_id:i.chatwidget.getIn(["chatData","id"]),hash:i.chatwidget.getIn(["chatData","hash"]),status:!1}]),i.chatwidget.get("overrides").contains("typing")||axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+"chat/usertyping/"+i.chatwidget.getIn(["chatData","id"])+"/"+i.chatwidget.getIn(["chatData","hash"])+"/"+e,JSON.stringify({msg:t}),defaultHeaders).then((function(e){})).catch((function(e){console.log(e)}))}}function removeFilePreview(e){return function(t,a){var n=a();return axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+"file/removepreview",JSON.stringify({file_id:e.file_id,security_hash:e.security_hash,chat_id:n.chatwidget.getIn(["chatData","id"]),hash:n.chatwidget.getIn(["chatData","hash"])}),defaultHeaders).then((function(e){return e.data})).catch((function(e){throw console.log("Error removing file preview:",e),e}))}}function submitInlineSurvey(e){return axios__WEBPACK_IMPORTED_MODULE_1__.A.post(window.lhcChat.base_url+"survey/fillinline",JSON.stringify(e),defaultHeaders)}},5802:function(e,t,a){"use strict";var n=a(3029),i=a(2901),r=a(6822),s=a(3954),o=a(5361),c=a(6540);function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}var d=function(e){function t(e){return(0,n.A)(this,t),a=this,i=t,o=[e],i=(0,s.A)(i),(0,r.A)(a,l()?Reflect.construct(i,o||[],(0,s.A)(a).constructor):i.apply(a,o));var a,i,o}return(0,o.A)(t,e),(0,i.A)(t,[{key:"render",value:function(){return c.createElement(c.Fragment,null,c.createElement("div",{className:"fade modal-backdrop show"}),c.createElement("div",{role:"dialog",id:"dialog-content","aria-modal":"true",className:"fade modal show d-block p-2",tabIndex:"-1"},c.createElement("div",{className:"modal-content p-2 "+(this.props.full_height?"h-100":"")},this.props.as_html&&c.createElement("div",{className:this.props.full_height?"h-100":"",dangerouslySetInnerHTML:{__html:this.props.text}}),!this.props.as_html&&c.createElement("p",null,this.props.text),c.createElement("div",{className:"modal-footer"},c.createElement("button",{className:"btn btn-secondary btn-sm",onClick:this.props.close,type:"button"},this.props.closeText)))))}}])}(c.PureComponent);t.A=d},5869:function(e,t,a){var n=a(887);e.exports=function(e,t,a,i,r){var s=n(e,t,a,i,r);return s.next().then((function(e){return e.done?e.value:s.next()}))},e.exports.__esModule=!0,e.exports.default=e.exports},6811:function(e,t){t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},6822:function(e,t,a){"use strict";a.d(t,{A:function(){return r}});var n=a(2284),i=a(9417);function r(e,t){if(t&&("object"==(0,n.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.A)(e)}},6957:function(e,t,a){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,a=1,n=arguments.length;a<n;a++)for(var i in t=arguments[a])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.CDATA=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var s=a(5413),o=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),E(this,e)},e}();t.Node=o;var c=function(e){function t(t){var a=e.call(this)||this;return a.data=t,a}return i(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(o);t.DataNode=c;var l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Text,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(c);t.Text=l;var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Comment,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(c);t.Comment=d;var u=function(e){function t(t,a){var n=e.call(this,a)||this;return n.name=t,n.type=s.ElementType.Directive,n}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(c);t.ProcessingInstruction=u;var h=function(e){function t(t){var a=e.call(this)||this;return a.children=t,a}return i(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(o);t.NodeWithChildren=h;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.CDATA,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(h);t.CDATA=p;var g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Root,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(h);t.Document=g;var _=function(e){function t(t,a,n,i){void 0===n&&(n=[]),void 0===i&&(i="script"===t?s.ElementType.Script:"style"===t?s.ElementType.Style:s.ElementType.Tag);var r=e.call(this,n)||this;return r.name=t,r.attribs=a,r.type=i,r}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var a,n;return{name:t,value:e.attribs[t],namespace:null===(a=e["x-attribsNamespace"])||void 0===a?void 0:a[t],prefix:null===(n=e["x-attribsPrefix"])||void 0===n?void 0:n[t]}}))},enumerable:!1,configurable:!0}),t}(h);function f(e){return(0,s.isTag)(e)}function m(e){return e.type===s.ElementType.CDATA}function v(e){return e.type===s.ElementType.Text}function w(e){return e.type===s.ElementType.Comment}function y(e){return e.type===s.ElementType.Directive}function b(e){return e.type===s.ElementType.Root}function E(e,t){var a;if(void 0===t&&(t=!1),v(e))a=new l(e.data);else if(w(e))a=new d(e.data);else if(f(e)){var n=t?I(e.children):[],i=new _(e.name,r({},e.attribs),n);n.forEach((function(e){return e.parent=i})),null!=e.namespace&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=r({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=r({},e["x-attribsPrefix"])),a=i}else if(m(e)){n=t?I(e.children):[];var s=new p(n);n.forEach((function(e){return e.parent=s})),a=s}else if(b(e)){n=t?I(e.children):[];var o=new g(n);n.forEach((function(e){return e.parent=o})),e["x-mode"]&&(o["x-mode"]=e["x-mode"]),a=o}else{if(!y(e))throw new Error("Not implemented yet: ".concat(e.type));var c=new u(e.name,e.data);null!=e["x-name"]&&(c["x-name"]=e["x-name"],c["x-publicId"]=e["x-publicId"],c["x-systemId"]=e["x-systemId"]),a=c}return a.startIndex=e.startIndex,a.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(a.sourceCodeLocation=e.sourceCodeLocation),a}function I(e){for(var t=e.map((function(e){return E(e,!0)})),a=1;a<t.length;a++)t[a].prev=t[a-1],t[a-1].next=t[a];return t}t.Element=_,t.isTag=f,t.isCDATA=m,t.isText=v,t.isComment=w,t.isDirective=y,t.isDocument=b,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=E},6993:function(e,t,a){var n=a(5546);function i(){var t,a,r="function"==typeof Symbol?Symbol:{},s=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function c(e,i,r,s){var o=i&&i.prototype instanceof d?i:d,c=Object.create(o.prototype);return n(c,"_invoke",function(e,n,i){var r,s,o,c=0,d=i||[],u=!1,h={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,a){return r=e,s=0,o=t,h.n=a,l}};function p(e,n){for(s=e,o=n,a=0;!u&&c&&!i&&a<d.length;a++){var i,r=d[a],p=h.p,g=r[2];e>3?(i=g===n)&&(o=r[(s=r[4])?5:(s=3,3)],r[4]=r[5]=t):r[0]<=p&&((i=e<2&&p<r[1])?(s=0,h.v=n,h.n=r[1]):p<g&&(i=e<3||r[0]>n||n>g)&&(r[4]=e,r[5]=n,h.n=g,s=0))}if(i||e>1)return l;throw u=!0,n}return function(i,d,g){if(c>1)throw TypeError("Generator is already running");for(u&&1===d&&p(d,g),s=d,o=g;(a=s<2?t:o)||!u;){r||(s?s<3?(s>1&&(h.n=-1),p(s,o)):h.n=o:h.v=o);try{if(c=2,r){if(s||(i="next"),a=r[i]){if(!(a=a.call(r,o)))throw TypeError("iterator result is not an object");if(!a.done)return a;o=a.value,s<2&&(s=0)}else 1===s&&(a=r.return)&&a.call(r),s<2&&(o=TypeError("The iterator does not provide a '"+i+"' method"),s=1);r=t}else if((a=(u=h.n<0)?o:e.call(n,h))!==l)break}catch(e){r=t,s=1,o=e}finally{c=1}}return{value:a,done:u}}}(e,r,s),!0),c}var l={};function d(){}function u(){}function h(){}a=Object.getPrototypeOf;var p=[][s]?a(a([][s]())):(n(a={},s,(function(){return this})),a),g=h.prototype=d.prototype=Object.create(p);function _(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,n(e,o,"GeneratorFunction")),e.prototype=Object.create(g),e}return u.prototype=h,n(g,"constructor",h),n(h,"constructor",u),u.displayName="GeneratorFunction",n(h,o,"GeneratorFunction"),n(g),n(g,o,"Generator"),n(g,s,(function(){return this})),n(g,"toString",(function(){return"[object Generator]"})),(e.exports=i=function(){return{w:c,m:_}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},7463:function(e,t){"use strict";function a(e,t){var a=e.length;e.push(t);e:for(;0<a;){var n=a-1>>>1,i=e[n];if(!(0<r(i,t)))break e;e[n]=t,e[a]=i,a=n}}function n(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],a=e.pop();if(a!==t){e[0]=a;e:for(var n=0,i=e.length,s=i>>>1;n<s;){var o=2*(n+1)-1,c=e[o],l=o+1,d=e[l];if(0>r(c,a))l<i&&0>r(d,c)?(e[n]=d,e[l]=a,n=l):(e[n]=c,e[o]=a,n=o);else{if(!(l<i&&0>r(d,a)))break e;e[n]=d,e[l]=a,n=l}}}return t}function r(e,t){var a=e.sortIndex-t.sortIndex;return 0!==a?a:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,c=o.now();t.unstable_now=function(){return o.now()-c}}var l=[],d=[],u=1,h=null,p=3,g=!1,_=!1,f=!1,m="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,w="undefined"!=typeof setImmediate?setImmediate:null;function y(e){for(var t=n(d);null!==t;){if(null===t.callback)i(d);else{if(!(t.startTime<=e))break;i(d),t.sortIndex=t.expirationTime,a(l,t)}t=n(d)}}function b(e){if(f=!1,y(e),!_)if(null!==n(l))_=!0,P(E);else{var t=n(d);null!==t&&L(b,t.startTime-e)}}function E(e,a){_=!1,f&&(f=!1,v(D),D=-1),g=!0;var r=p;try{for(y(a),h=n(l);null!==h&&(!(h.expirationTime>a)||e&&!T());){var s=h.callback;if("function"==typeof s){h.callback=null,p=h.priorityLevel;var o=s(h.expirationTime<=a);a=t.unstable_now(),"function"==typeof o?h.callback=o:h===n(l)&&i(l),y(a)}else i(l);h=n(l)}if(null!==h)var c=!0;else{var u=n(d);null!==u&&L(b,u.startTime-a),c=!1}return c}finally{h=null,p=r,g=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var I,A=!1,S=null,D=-1,x=5,C=-1;function T(){return!(t.unstable_now()-C<x)}function k(){if(null!==S){var e=t.unstable_now();C=e;var a=!0;try{a=S(!0,e)}finally{a?I():(A=!1,S=null)}}else A=!1}if("function"==typeof w)I=function(){w(k)};else if("undefined"!=typeof MessageChannel){var O=new MessageChannel,M=O.port2;O.port1.onmessage=k,I=function(){M.postMessage(null)}}else I=function(){m(k,0)};function P(e){S=e,A||(A=!0,I())}function L(e,a){D=m((function(){e(t.unstable_now())}),a)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){_||g||(_=!0,P(E))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):x=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var a=p;p=t;try{return e()}finally{p=a}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var a=p;p=e;try{return t()}finally{p=a}},t.unstable_scheduleCallback=function(e,i,r){var s=t.unstable_now();switch(r="object"==typeof r&&null!==r&&"number"==typeof(r=r.delay)&&0<r?s+r:s,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return e={id:u++,callback:i,priorityLevel:e,startTime:r,expirationTime:o=r+o,sortIndex:-1},r>s?(e.sortIndex=r,a(d,e),null===n(l)&&e===n(d)&&(f?(v(D),D=-1):f=!0,L(b,r-s))):(e.sortIndex=o,a(l,e),_||g||(_=!0,P(E))),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=p;return function(){var a=p;p=t;try{return e.apply(this,arguments)}finally{p=a}}}},7731:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=r,t.escapeSpecialCharacters=function(e){return e.replace(i.CARRIAGE_RETURN_REGEX,i.CARRIAGE_RETURN_PLACEHOLDER)},t.revertEscapedCharacters=o,t.formatDOM=function e(t,a,i){void 0===a&&(a=null);for(var c,l=[],d=0,u=t.length;d<u;d++){var h=t[d];switch(h.nodeType){case 1:var p=s(h.nodeName);(c=new n.Element(p,r(h.attributes))).children=e("template"===p?h.content.childNodes:h.childNodes,c);break;case 3:c=new n.Text(o(h.nodeValue));break;case 8:c=new n.Comment(h.nodeValue);break;default:continue}var g=l[d-1]||null;g&&(g.next=c),c.parent=a,c.prev=g,c.next=null,l.push(c)}return i&&((c=new n.ProcessingInstruction(i.substring(0,i.indexOf(" ")).toLowerCase(),i)).next=l[0]||null,c.parent=a,l.unshift(c),l[1]&&(l[1].prev=l[0])),l};var n=a(1141),i=a(5270);function r(e){for(var t={},a=0,n=e.length;a<n;a++){var i=e[a];t[i.name]=i.value}return t}function s(e){return function(e){return i.CASE_SENSITIVE_TAG_NAMES_MAP[e]}(e=e.toLowerCase())||e}function o(e){return e.replace(i.CARRIAGE_RETURN_PLACEHOLDER_REGEX,i.CARRIAGE_RETURN)}},7800:function(e,t,a){"use strict";a.d(t,{A:function(){return i}});var n=a(3145);function i(e,t){if(e){if("string"==typeof e)return(0,n.A)(e,t);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?(0,n.A)(e,t):void 0}}},7912:function(e,t,a){"use strict";a.d(t,{q:function(){return r}});var n=a(3029),i=a(2901),r=new(function(){return(0,i.A)((function e(){(0,n.A)(this,e);var t,i=document.currentScript||(t=document.getElementsByTagName("script"))[t.length-1],r=a(2210);this.prefix=i.getAttribute("scope")||"lhc",this.prefixUppercase=this.prefix.toUpperCase(),this.eventEmitter=new r;try{this.hasSessionStorage=!!window.sessionStorage}catch(e){this.hasSessionStorage=!1}try{this.hasLocalStorage=!!window.localStorage}catch(e){this.hasLocalStorage=!1}}),[{key:"emitEvent",value:function(e,t,a){this.eventEmitter.emitEvent(e,t)}},{key:"sendMessageParent",value:function(e,t){window.opener&&!1===window.opener.closed?(window.opener.postMessage(this.prefix+"::"+e+"::"+JSON.stringify(t||null),"*"),"ready_popup"===e&&window.opener.parent&&!1===window.opener.parent.closed&&window.opener!=window.opener.parent&&(window.opener.parent.postMessage(this.prefix+"::"+e+"::"+JSON.stringify(t||null),"*"),window.opener.parent.parent&&!1===window.opener.parent.parent.closed&&window.opener.parent.parent!=window.opener.parent&&window.opener.parent.parent.postMessage(this.prefix+"::"+e+"::"+JSON.stringify(t||null),"*"))):window.parent&&!1===window.parent.closed&&window.parent.postMessage(this.prefix+"::"+e+"::"+JSON.stringify(t||null),"/"),"undefined"!=typeof LHCEventTracker&&LHCEventTracker(e,t)}},{key:"sendMessageParentDirect",value:function(e,t){var a=null;window.parent&&window.parent["$_"+this.prefixUppercase]&&!1===window.parent.closed?a=window.parent["$_"+this.prefixUppercase].eventListener:window.opener&&window.opener["$_"+this.prefixUppercase]&&!1===window.opener.closed&&(a=window.opener["$_"+this.prefixUppercase].eventListener),null!==a?a.emitEvent(e,t):this.sendMessageParent(e,t)}},{key:"setLocalStorage",value:function(e,t){if(this.hasLocalStorage&&localStorage.setItem)try{localStorage.setItem(this.prefix+e,t)}catch(e){}}},{key:"setSessionStorage",value:function(e,t){if(this.hasSessionStorage&&sessionStorage.setItem)try{sessionStorage.setItem(this.prefix+e,t)}catch(e){}}},{key:"getSessionStorage",value:function(e){return this.hasSessionStorage&&sessionStorage.getItem?sessionStorage.getItem(this.prefix+e):null}},{key:"getLocalStorage",value:function(e){return this.hasLocalStorage&&localStorage.getItem?localStorage.getItem(this.prefix+e):null}},{key:"removeSessionStorage",value:function(e){this.hasSessionStorage&&sessionStorage.removeItem&&sessionStorage.removeItem(this.prefix+e)}},{key:"removeLocalStorage",value:function(e){this.hasLocalStorage&&localStorage.removeItem&&localStorage.removeItem(this.prefix+e)}},{key:"getTimeZone",value:function(){try{var e=Intl.DateTimeFormat().resolvedOptions().timeZone;return"undefined"==e&&(e="UTC"),e}catch(e){var t=new Date;return(t.getTimezoneOffset()<(a=new Date(t.getFullYear(),0,1),n=new Date(t.getFullYear(),6,1),Math.max(a.getTimezoneOffset(),n.getTimezoneOffset()))?t.getTimezoneOffset():t.getTimezoneOffset()-60)/60*-1}var a,n}},{key:"getCustomFieldsSubmit",value:function(e){if(e.size>0){var t={name_items:[],values_req:[],value_items:[],value_types:[],encattr:[],value_show:[]};return e.forEach((function(e){t.value_items.push(e.get("value")),t.name_items.push(e.get("name")),t.values_req.push(!0===e.get("required")?"t":"f"),t.encattr.push(!0===e.get("encrypted")?"t":""),t.value_types.push(e.get("type")),t.value_show.push(e.get("show"))})),t}return null}},{key:"prefillFields",value:function(e){var t=e.props.chatwidget.get("attr_prefill");t.length>0&&t.forEach((function(t){e.setState(t)}))}},{key:"logJSError",value:function(e){var t;(t={}).location=location&&location.href?location.href:"",t.message=window.navigator.userAgent,t.stack=e.stack,t.stack=t.stack.replace(/(\r\n|\n|\r)/gm,"");var a=new XMLHttpRequest;a.open("POST",window.lhcChat.base_url+"audit/logjserror",!0),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send("data="+encodeURIComponent(JSON.stringify(t)))}}])}());window.lhcHelperfunctions=r},8016:function(e,t,a){"use strict";var n=a(6540),i=a(3029),r=a(2901),s=a(6822),o=a(3954),c=a(5361),l=a(4467),d=a(1225),u=a(5580),h=a(7912),p=a(8068),g=a(6524);function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_=function(){return!!e})()}var f,m,v=function(e){function t(e){var a,n,r,c;return(0,i.A)(this,t),n=this,r=t,c=[e],r=(0,o.A)(r),a=(0,s.A)(n,_()?Reflect.construct(r,c||[],(0,o.A)(n).constructor):r.apply(n,c)),(0,l.A)(a,"state",{dropdown:null}),a}return(0,c.A)(t,e),(0,r.A)(t,[{key:"componentDidMount",value:function(){if(document.getElementById(this.props.elementId)){var e=a(8943);this.setState({dropdown:new e(document.getElementById(this.props.elementId))})}}},{key:"componentWillUnmount",value:function(){this.state.dropdown&&delete this.state.dropdown}},{key:"render",value:function(){return this.props.children}}])}(n.PureComponent);function w(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(w=function(){return!!e})()}var y=(f=(0,d.Ng)((function(e){return{chatwidget:e.chatwidget}})),f(m=function(e){function t(e){var a,n,r,c;return(0,i.A)(this,t),n=this,r=t,c=[e],r=(0,o.A)(r),(a=(0,s.A)(n,w()?Reflect.construct(r,c||[],(0,o.A)(n).constructor):r.apply(n,c))).closeWidget=a.closeWidget.bind(a),a.endChat=a.endChat.bind(a),a.popup=a.popup.bind(a),a.switchColumn=a.switchColumn.bind(a),a}return(0,c.A)(t,e),(0,r.A)(t,[{key:"closeWidget",value:function(){this.props.dispatch((0,u.fJ)())}},{key:"endChat",value:function(){this.props.endChat()}},{key:"popup",value:function(){this.props.popupChat()}},{key:"switchColumn",value:function(){this.props.switchColumn()}},{key:"render",value:function(){var e=this,t=this.props.t,a=!this.props.chatwidget.hasIn(["chat_ui","clinst"])||this.props.chatwidget.get("isMobile"),i=this.props.chatwidget.hasIn(["chat_ui","custom_html_header_body"]),r="position-relative row header-chat"+(1==this.props.chatwidget.get("isMobile")?" mobile-header":" desktop-header")+(!0===this.props.chatwidget.get("isChatting")||!0===this.props.chatwidget.get("isOnline")&&!1===this.props.chatwidget.get("isOfflineMode")?" online-header":" offline-header"),s=!this.props.chatwidget.hasIn(["chat_ui","hide_popup"]),o=!0===this.props.chatwidget.get("isChatting")&&!this.props.chatwidget.hasIn(["chat_ui","hide_close"]),c=0,l=0,d=!1,u=!1,h=this.props.chatwidget.hasIn(["chat_ui","header_buttons"])&&this.props.chatwidget.getIn(["chat_ui","header_buttons"]).map((function(i,r){var l=i.get("pos");if("dropdown"!=l){if(!0===u&&(d=!0),l="left"==l?"start":"right"==l?"end":l,"min"==i.get("btn")&&a)return c++,n.createElement("a",{key:i.get("pos")+r,tabIndex:"0",onKeyPress:function(t){"Enter"===t.key&&e.closeWidget()},className:"minimize-icon header-link float-"+l,title:e.props.chatwidget.getIn(["chat_ui","min_text"])||t("button.minimize"),onClick:e.closeWidget},e.props.chatwidget.hasIn(["chat_ui","img_icon_min"])&&n.createElement("img",{className:"px-1",src:e.props.chatwidget.getIn(["chat_ui","img_icon_min"]),alt:""})||n.createElement("i",{className:"material-icons"},""));if("popup"==i.get("btn")&&s)return c++,n.createElement("a",{key:i.get("pos")+r,tabIndex:"0",onKeyPress:function(t){"Enter"===t.key&&e.popup()},className:"header-link float-"+l,title:e.props.chatwidget.getIn(["chat_ui","popup_text"])||t("button.popup"),onClick:e.popup},e.props.chatwidget.hasIn(["chat_ui","img_icon_popup"])&&n.createElement("img",{className:"px-1",src:e.props.chatwidget.getIn(["chat_ui","img_icon_popup"]),alt:""})||n.createElement("i",{className:"material-icons"},""));if("close"==i.get("btn")&&o){var h=e.props.chatwidget.getIn(["chat_ui","end_chat_text"])||t("button.end_chat");return c++,n.createElement("a",{key:i.get("pos")+r,tabIndex:"0",onKeyPress:function(t){"Enter"===t.key&&e.endChat()},title:h,className:"header-link float-"+l,onClick:e.endChat},e.props.chatwidget.hasIn(["chat_ui","img_icon_close"])&&n.createElement("img",{className:"px-1",src:e.props.chatwidget.getIn(["chat_ui","img_icon_close"]),alt:""})||n.createElement("i",{className:"material-icons"},""),i.get("print")&&n.createElement("span",{className:"end-chat-text"},h))}if("fullheight"==i.get("btn")&&!e.props.chatwidget.get("isMobile")){c++;var p;return p=e.props.chatwidget.get("position_placement").includes("full_height")?e.props.chatwidget.getIn(["chat_ui","fheight_text_class"])||t("button.fheight_text_class"):e.props.chatwidget.getIn(["chat_ui","fheight_text_col"])||t("button.fheight_text_col"),n.createElement("a",{key:i.get("pos")+r,tabIndex:"0",title:p,onKeyPress:function(t){"Enter"===t.key&&e.switchColumn()},className:"header-link float-"+l,onClick:e.switchColumn},e.props.chatwidget.hasIn(["chat_ui","img_icon_fheight"])&&n.createElement("img",{className:"px-1",src:e.props.chatwidget.getIn(["chat_ui","img_icon_fheight"]),alt:""})||n.createElement("i",{className:"material-icons"},e.props.chatwidget.get("position_placement").includes("full_height")?n.createElement(n.Fragment,null,""):n.createElement(n.Fragment,null,"")))}}else u=!0})),p=this.props.chatwidget.hasIn(["chat_ui","header_buttons"])&&this.props.chatwidget.getIn(["chat_ui","header_buttons"]).map((function(i,r){if("dropdown"==i.get("pos")){if("min"==i.get("btn")&&a){l++;var c=e.props.chatwidget.getIn(["chat_ui","min_text"])||t("button.minimize");return n.createElement("a",{key:i.get("pos")+r,tabIndex:"0",onKeyPress:function(t){"Enter"===t.key&&e.closeWidget()},className:"minimize-icon header-link header-burger-link d-block text-nowrap py-1 ps-1",title:c,onClick:e.closeWidget},e.props.chatwidget.hasIn(["chat_ui","img_icon_min"])&&n.createElement("img",{className:"px-1",src:e.props.chatwidget.getIn(["chat_ui","img_icon_min"]),alt:""})||n.createElement("i",{className:"material-icons"},""),n.createElement("span",{className:"menu-text text-nowrap"},c))}if("popup"==i.get("btn")&&s){l++;var d=e.props.chatwidget.getIn(["chat_ui","popup_text"])||t("button.popup");return n.createElement("a",{key:i.get("pos")+r,tabIndex:"0",onKeyPress:function(t){"Enter"===t.key&&e.popup()},className:"header-link header-burger-link d-block text-nowrap py-1 ps-1",title:d,onClick:e.popup},e.props.chatwidget.hasIn(["chat_ui","img_icon_popup"])&&n.createElement("img",{className:"px-1",src:e.props.chatwidget.getIn(["chat_ui","img_icon_popup"]),alt:""})||n.createElement("i",{className:"material-icons"},""),n.createElement("span",{className:"menu-text text-nowrap"},d))}if("close"==i.get("btn")&&o){l++;var u=e.props.chatwidget.getIn(["chat_ui","end_chat_text"])||t("button.end_chat");return n.createElement("a",{key:i.get("pos")+r,tabIndex:"0",title:u,onKeyPress:function(t){"Enter"===t.key&&e.endChat()},className:"header-link header-burger-link py-1 d-block text-nowrap ps-1",onClick:e.endChat},e.props.chatwidget.hasIn(["chat_ui","img_icon_close"])&&n.createElement("img",{className:"px-1",src:e.props.chatwidget.getIn(["chat_ui","img_icon_close"]),alt:""})||n.createElement("i",{className:"material-icons"},""),n.createElement("span",{className:"menu-text"},u))}if("fullheight"==i.get("btn")&&!e.props.chatwidget.get("isMobile")){l++;var h;return h=e.props.chatwidget.get("position_placement").includes("full_height")?e.props.chatwidget.getIn(["chat_ui","fheight_text_class"])||t("button.fheight_text_class"):e.props.chatwidget.getIn(["chat_ui","fheight_text_col"])||t("button.fheight_text_col"),n.createElement("a",{key:i.get("pos")+r,tabIndex:"0",onKeyPress:function(t){"Enter"===t.key&&e.switchColumn()},title:h,className:"header-link header-burger-link py-1 d-block text-nowrap ps-1",onClick:e.switchColumn},e.props.chatwidget.hasIn(["chat_ui","img_icon_fheight"])&&n.createElement("img",{className:"px-1",src:e.props.chatwidget.getIn(["chat_ui","img_icon_fheight"]),alt:""})||n.createElement("i",{className:"material-icons"},e.props.chatwidget.get("position_placement").includes("full_height")?n.createElement(n.Fragment,null,""):n.createElement(n.Fragment,null,"")," "),n.createElement("span",{className:"menu-text text-nowrap"},h))}}}));return n.createElement("div",{id:"widget-header-content",className:r},i&&n.createElement("div",{className:"lhc-custom-header-inside",dangerouslySetInnerHTML:{__html:this.props.chatwidget.getIn(["chat_ui","custom_html_header_body"])}}),(c>0||l>0)&&n.createElement("div",{className:"col-12 px-1 widget-header-menu"},!0===d&&h,l>0&&n.createElement("div",{className:"float-end position-relative"},n.createElement(v,{elementId:"headerDropDown"},n.createElement("div",{className:"btn-group dropup disable-select"},n.createElement("button",{tabIndex:"0",className:"header-link border-0 p-0",id:"headerDropDown","data-bs-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},n.createElement("i",{className:"material-icons"},"")),n.createElement("div",{className:"dropdown-menu shadow bg-white rounded lhc-dropdown-menu pe-2"},p)))),!1===d&&h))}}])}(n.Component))||m),b=(0,g.C)()(y),E=a(3044),I=a(3145),A=a(7800);function S(e){return function(e){if(Array.isArray(e))return(0,I.A)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,A.A)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var D=a(900),x=a(8168),C=a(296),T=a(321);function k(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(k=function(){return!!e})()}var O=n.lazy((function(){return a.e(595).then(a.bind(a,5595))})),M=n.lazy((function(){return a.e(941).then(a.bind(a,5941))})),P=function(e){function t(e){var a,n,r,c;return(0,i.A)(this,t),n=this,r=t,c=[e],r=(0,o.A)(r),a=(0,s.A)(n,k()?Reflect.construct(r,c||[],(0,o.A)(n).constructor):r.apply(n,c)),(0,l.A)(a,"state",{jsExecuted:!1,moreReactions:!1,reactToMessageId:0}),a.abstractClick=a.abstractClick.bind(a),a.imageLoaded=a.imageLoaded.bind(a),a.updateTriggerClicked=a.updateTriggerClicked.bind(a),a.disableEditor=!1,a.delayData=[],a}return(0,c.A)(t,e),(0,r.A)(t,[{key:"getDirectInnerText",value:function(e){for(var t=e.childNodes,a="",n=0;n<t.length;n++)3==t[n].nodeType&&(a+=t[n].data.trim());return a}},{key:"addLoader",value:function(e,t){1!=this.props.printButton||e["data-no-msg"]||"button"!=e.type&&"A"!==t.tagName||("A"!==t.tagName&&this.removeMetaMessage(e["data-id"],0),this.props.dispatch({type:"ADD_MSG_TO_STORE",data:this.getDirectInnerText(t)})),e["data-keep"]||e["data-no-change"]||"button"!=e.type||!t||(t.setAttribute("disabled","disabled"),t.innerHTML='<i class="material-icons lhc-spin"></i>'+t.innerHTML)}},{key:"abstractClick",value:function(e,t){var a=this,n=this.props.t;if(void 0===e.onchange){if(this.addLoader(e,t.target),e.onclick)if(-1!==e.onclick.indexOf("lhinst.updateTriggerClicked"))this.updateTriggerClicked({type:"/(type)/triggerclicked"},e,t.target),t.target.classList.add("visited");else if(-1!==e.onclick.indexOf("notificationsLHC.sendNotification"))this.props.dispatch((0,u.VC)()),t.target.innerHTML=n("notifications.subscribing"),setTimeout((function(){a.removeMetaMessage(e["data-id"])}),500);else if(-1!==e.onclick.indexOf("lhinst.moreReactions"))this.setState({moreReactions:!0,reactToMessageId:e["data-id"]}),t.stopPropagation();else if(-1!==e.onclick.indexOf("lhinst.reactionsToolbar"))this.props.setReactingTo(e["data-id"]!=this.props.reactToMessageId?e["data-id"]:0),t.stopPropagation();else if(-1!==e.onclick.indexOf("lhinst.reactionsClicked"))this.updateTriggerClicked({type:"/(type)/reactions"+(this.props.themeId?"/(theme)/"+this.props.themeId:"")},e,t.target),this.props.setReactingTo(0);else if(-1!==e.onclick.indexOf("lhinst.buttonClicked"))this.updateTriggerClicked({type:""},e,t.target),t.target.classList.add("visited");else if(-1!==e.onclick.indexOf("lhinst.startVoiceCall"))this.props.voiceCall();else if(-1!==e.onclick.indexOf("lhinst.chooseFile"))this.props.abstractAction("fileupload");else if(-1!==e.onclick.indexOf("lhinst.updateChatClicked"))this.updateTriggerClicked({type:"",mainType:"updatebuttonclicked"},e,t.target),t.target.classList.add("visited");else if(-1!==e.onclick.indexOf("lhinst.editGenericStep"))this.updateTriggerClicked({type:"/(type)/editgenericstep"},e,t.target),t.target.classList.add("visited");else if(-1!==e.onclick.indexOf("lhinst.hideShowAction")){var i=JSON.parse(e["data-load"]),r=document.getElementById("message-more-"+i.id);r.classList.contains("hide")?(t.target.innerText=i.hide_text,r.classList.remove("hide")):(t.target.innerText=i.show_text,r.classList.add("hide"))}else if(-1!==e.onclick.indexOf("lhinst.executeJS"))(0,u.tl)(e,this);else if(-1!==e.onclick.indexOf("lhinst.dropdownClicked")){var s=document.getElementById("id_generic_list-"+e["data-id"]);s&&"0"!=s.value&&""!=s.value?(e["data-payload"]=s.value,this.updateTriggerClicked({type:"/(type)/valueclicked"},e,t.target)):alert(n("bot.please_choose"))}else-1!==e.onclick.indexOf("lhinst.zoomImage")?h.q.sendMessageParentDirect("zoomImage",[{txt_download:n("bbcode.img_download"),src:e.src,title:e.title?e.title:""}]):(h.q.emitEvent("MessageClick",[e,this.props.dispatch]),console.log("Unknown click event: "+e.onclick));"IMG"===t.target.tagName||e.class&&-1!==e.class.indexOf("process-click")||t.preventDefault()}else{if(e.type&&"checkbox"==e.type){if("enable-confirm"==e["payload-type"]){var o=document.getElementById("confirm-button-"+e["data-id"]);t.target.checked?(o.removeAttribute("disabled"),o.onclick=function(t){return a.updateTriggerClicked({type:""},{"data-payload":"confirm","data-id":e["data-id"]},t.target)}):o.setAttribute("disabled","disabled")}return}var c=t.target.options[t.target.selectedIndex],l={"data-payload":c.getAttribute("data-payload"),"data-id":c.getAttribute("data-id")};"trigger"==c.getAttribute("payload-type")?this.updateTriggerClicked({type:"/(type)/triggerclicked"},l,t.target):"button"!=c.getAttribute("payload-type")&&"payload"!=c.getAttribute("payload-type")||this.updateTriggerClicked({type:""},l,t.target)}}},{key:"removeMetaMessage",value:function(e,t){setTimeout((function(){var t=document.getElementById("msg-"+e);if(t){var a,n=t.getElementsByClassName("meta-message-"+e);for(a=0;a<n.length;a++)n[a].parentNode.removeChild(n[a])}}),void 0===t?500:t)}},{key:"updateTriggerClicked",value:function(e,t,a){var n=this;this.props.dispatch((0,u.ZG)(e,{"payload-id":void 0===t["data-identifier"]?null:t["data-identifier"],payload:t["data-payload"],id:t["data-id"],processed:void 0===t["data-keep"]})).then((function(e){t["data-keep"]||n.removeMetaMessage(t["data-id"]),e.data.message_id_first&&e.data.message_id_first>0&&n.props.dispatch({type:"UPDATE_SCROLL_TO_MESSAGE",data:e.data.message_id_first}),e.data.t&&h.q.sendMessageParent("botTrigger",[{trigger:e.data.t}]),e.data.update_message?n.props.updateMessage(t["data-id"],n):(n.props.updateMessages({check_focus:!0}),n.props.updateStatus())}))}},{key:"imageLoaded",value:function(e){this.props.scrollBottom&&this.props.scrollBottom(!0,!0)}},{key:"componentDidUpdate",value:function(e,t,a){if(0!=this.props.reactToMessageId){var n=document.getElementById("reactions-toolbar-"+this.props.reactToMessageId),i=document.getElementById("msg-"+this.props.reactToMessageId);if(!n||!i)return;var r=n.clientWidth/2,s=i.offsetWidth,o=n.parentNode.offsetLeft;o+r>s?n.style.right="-"+(r-10)+"px":o<r-30&&(n.style.left=r-30+"px")}}},{key:"componentDidMount",value:function(){var e=this;this.props.setMetaUpdateState(-1!==this.props.msg.msg.indexOf("meta-auto-hide")),1==this.disableEditor?this.props.setEditorEnabled(!1):this.props.setEditorEnabled(!0),this.delayData.length>0&&this.delayData.forEach((function(t){e.props.sendDelay(t),e.props.scrollBottom(!1,!1)}))}},{key:"formatStringToCamelCase",value:function(e){var t=e.split("-");return 1===t.length?t[0]:t[0]+t.slice(1).map((function(e){return e[0].toUpperCase()+e.slice(1)})).join("")}},{key:"getStyleObjectFromString",value:function(e){var t=this,a={};return e.split(";").forEach((function(e){var n=e.split(":"),i=(0,C.A)(n,2),r=i[0],s=i[1];if(r){var o=t.formatStringToCamelCase(r.trim());a[o]=s.trim()}})),a}},{key:"render",value:function(){var e=this,t=(this.props.t,!1);if(!this.props.msg.msg||"string"!=typeof this.props.msg.msg)return n.createElement(n.Fragment,null);var a=(0,D.Ay)(this.props.msg.msg,{replace:function(a){if(a.attribs){var i=Object.assign({},a.attribs);if(a.attribs.class){if(a.attribs.className=a.attribs.class,-1!==a.attribs.className.indexOf("message-row")&&parseInt(e.props.reactToMessageId)==parseInt(a.attribs.id.replace("msg-",""))&&(a.attribs.className+=" current-reacting-to"),-1!==a.attribs.className.indexOf("message-row")&&(a.attribs.className+=" fade-in-fast index-row-"+e.props.id),-1!==a.attribs.className.indexOf("message-row")&&e.props.id>0)e.props.msg.msop>0&&e.props.msg.msop!=e.props.msg.lmsop&&0==t&&(a.attribs.className+=" operator-changes",t=!0);else if(e.props.profilePic&&-1!==a.attribs.className.indexOf("vis-icon-hld"))return n.createElement("img",{className:"profile-msg-pic",onLoad:e.imageLoaded,src:e.props.profilePic,alt:"",title:""});delete a.attribs.class}if(a.attribs.onclick&&delete a.attribs.onclick,a.name&&"img"===a.name){if(a.attribs.style&&(a.attribs.style=e.getStyleObjectFromString(a.attribs.style)),void 0===a.attribs["data-ignore-load"])return n.createElement("img",(0,x.A)({},a.attribs,{onLoad:e.imageLoaded,onClick:function(t){return e.abstractClick(i,t)}}))}else if(a.name&&"button"===a.name){if(i.onclick)return a.attribs.style&&(a.attribs.style=e.getStyleObjectFromString(a.attribs.style)),n.createElement("button",(0,x.A)({},a.attribs,{onClick:function(t){return e.abstractClick(i,t)}}),(0,D.zd)(a.children))}else if(a.name&&"a"===a.name){if(i.onclick)return a.attribs.style&&(a.attribs.style=e.getStyleObjectFromString(a.attribs.style)),n.createElement("a",(0,x.A)({},a.attribs,{onKeyPress:function(t){"Enter"===t.key&&e.abstractClick(i,t)},onClick:function(t){return e.abstractClick(i,t)}}),(0,D.zd)(a.children));if(e.props.embedMode&&"widget"==e.props.embedMode&&e.props.targetSame&&i.target&&"_blank"==i.target&&a.attribs.href){var r=a.attribs.href,s=window.parent.location.host;if(r.startsWith("http://".concat(s))||r.startsWith("https://".concat(s)))return a.attribs.style&&(a.attribs.style=e.getStyleObjectFromString(a.attribs.style)),a.attribs.target="_top",e.props.isMobile?n.createElement("a",(0,x.A)({},a.attribs,{onClick:function(t){return e.props.minimizeWidget()}}),(0,D.zd)(a.children)):n.createElement("a",a.attribs,(0,D.zd)(a.children))}}else if(a.name&&"select"===a.name){if(i.onchange)return a.attribs.style&&(a.attribs.style=e.getStyleObjectFromString(a.attribs.style)),n.createElement("select",(0,x.A)({},a.attribs,{onChange:function(t){return e.abstractClick(i,t)}}),(0,D.zd)(a.children))}else{if(a.name&&"inlineiframe"===a.name)return n.createElement(n.Suspense,{fallback:"..."},n.createElement(M,(0,x.A)({},a.attribs,{updateMessage:function(t){return e.props.updateMessage(t,e)}})));if(a.name&&"inlinesurvey"===a.name)return n.createElement(n.Suspense,{fallback:"..."},n.createElement(O,(0,x.A)({},a.attribs,{surveyOptions:a.children})));if(a.name&&"input"===a.name){if(a.attribs.type&&"checkbox"==a.attribs.type&&i.onchange)return a.attribs.style&&(a.attribs.style=e.getStyleObjectFromString(a.attribs.style)),n.createElement("input",(0,x.A)({type:"checkbox"},a.attribs,{onChange:function(t){return e.abstractClick(i,t)}}));if(a.attribs.type&&"radio"==a.attribs.type)return a.attribs.style&&(a.attribs.style=e.getStyleObjectFromString(a.attribs.style)),a.attribs.checked&&(a.attribs.defaultChecked=!0,delete a.attribs.checked),n.createElement("input",(0,x.A)({type:"radio"},a.attribs))}else if(a.name&&"script"===a.name&&a.attribs["data-bot-action"]){if(!a.attribs["data-bot-always"]){if(1==e.state.jsExecuted)return n.createElement(n.Fragment,null);e.setState({jsExecuted:!0})}return(0,u.tl)(a,e),n.createElement(n.Fragment,null)}}}}});return n.createElement(n.Fragment,null,this.state.moreReactions&&n.createElement(T.A,{setReaction:function(t){e.updateTriggerClicked({type:"/(type)/reactions"+(e.props.themeId?"/(theme)/"+e.props.themeId:"")},JSON.parse(t),null),e.setState({moreReactions:!1}),e.props.setReactingTo(0)},confirmClose:function(t){e.setState({moreReactions:!1})},cancelClose:function(t){e.setState({moreReactions:!1})},toggle:function(t){e.setState({moreReactions:!1})},dataUrl:"/chat/reacttomessagemodal/"+this.state.reactToMessageId+(this.props.themeId?"/(theme)/"+this.props.themeId:"")}),1==this.props.hasNew&&this.props.id==this.props.newId&&n.createElement("div",{id:"scroll-to-message",className:"message-admin border-bottom new-msg-holder border-danger text-center"},n.createElement("span",{className:"new-msg bg-danger text-white d-inline-block fs12 rounded-top"},this.props.newTitle)),a)}}])}(n.PureComponent),L=(0,g.C)()((0,d.Ng)()(P)),N=a(467),R=a(4756),B=a.n(R);function F(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function U(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?F(Object(a),!0).forEach((function(t){(0,l.A)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):F(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function j(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(j=function(){return!!e})()}var H=function(e){function t(e){var a,r,c,d;return(0,i.A)(this,t),r=this,c=t,d=[e],c=(0,o.A)(c),a=(0,s.A)(r,j()?Reflect.construct(c,d||[],(0,o.A)(r).constructor):c.apply(r,d)),(0,l.A)(a,"state",{hightlight:!1,files:[],uploading:!1,uploadProgress:{},successfullUploaded:!1}),a.fileInputRef=n.createRef(),a.openFileDialog=a.openFileDialog.bind(a),a.onFilesAddedUI=a.onFilesAddedUI.bind(a),a.onDragOver=a.onDragOver.bind(a),a.onDragLeave=a.onDragLeave.bind(a),a.onDrop=a.onDrop.bind(a),a.onPaste=a.onPaste.bind(a),a.onFilesAdded=a.onFilesAdded.bind(a),a.uploadFiles=a.uploadFiles.bind(a),a.sendRequest=a.sendRequest.bind(a),a}return(0,c.A)(t,e),(0,r.A)(t,[{key:"onFilesAdded",value:function(e){var t=this,a=this.props.t,n=new RegExp("(.|/)("+this.props.fileOptions.get("ft_us")+")$","i"),i=[];e.forEach((function(e){n.test(e.type)||n.test(e.name)||i.push(e.name+": "+a("file.incorrect_type")),e.size>t.props.fileOptions.get("fs")&&i.push(e.name+": "+a("file.to_big_file"))})),i.length>0?alert(i.join("\n")):this.setState({files:e})}},{key:"componentDidUpdate",value:function(e,t){this.state.files.length>0&&0==this.state.uploading&&this.uploadFiles()}},{key:"uploadFiles",value:(a=(0,N.A)(B().mark((function e(){var t,a=this;return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({uploadProgress:{},uploading:!0}),t=[],this.state.files.forEach((function(e){t.push(a.sendRequest(e))})),e.prev=1,e.next=2,Promise.all(t);case 2:this.setState({successfullUploaded:!0,uploading:!1,files:[]}),e.next=4;break;case 3:e.prev=3,e.catch(1),this.setState({successfullUploaded:!0,uploading:!1,files:[]});case 4:case"end":return e.stop()}}),e,this,[[1,3]])}))),function(){return a.apply(this,arguments)})},{key:"sendRequest",value:function(e){var t=this,a=this.props.t;return new Promise((function(n,i){var r=new XMLHttpRequest,s=new FormData;s.append("files",e,e.name),r.upload.addEventListener("progress",(function(n){n.lengthComputable&&(U({},t.state.uploadProgress)[e.name]={state:"pending",percentage:n.loaded/n.total*100},t.props.progress(a("file.uploading")+" "+Math.round(n.loaded/n.total*100)+"%"))})),r.upload.addEventListener("load",(function(n){U({},t.state.uploadProgress)[e.name]={state:"done",percentage:100},t.props.progress(a("file.processing"))})),r.onload=function(){var i=JSON.parse(r.response);if(i&&i.error&&"true"==i.error)i.error_msg?t.props.progress(i.error_msg):t.props.progress(a("file.upload_failed"));else if(t.props.progress(a("file.completed")),t.props.fileOptions.has("file_preview")&&t.props.fileOptions.get("file_preview")){var s={id:i.file_id||Date.now(),security_hash:i.security_hash||"",name:e.name,size:e.size,type:e.type,originalFile:e};e.type.startsWith("image/")&&(s.previewUrl=URL.createObjectURL(e)),t.props.onFilePreview&&t.props.onFilePreview(s)}else t.props.onCompletion();n(r)},r.upload.addEventListener("error",(function(a){var n=U({},t.state.uploadProgress);n[e.name]={state:"error",percentage:0},t.setState({uploadProgress:n}),i(r)})),r.open("POST",t.props.base_url+"/file/uploadfile/"+t.props.chat_id+"/"+t.props.hash),r.send(s)}))}},{key:"openFileDialog",value:function(){this.state.uploading||this.fileInputRef.current.click()}},{key:"onFilesAddedUI",value:function(e){var t=e.target.files,a=this.fileListToArray(t);this.onFilesAdded(a)}},{key:"onDragOver",value:function(e){e.preventDefault(),this.state.uploading||this.props.onDrag&&this.props.onDrag(!0)}},{key:"componentDidMount",value:function(){var e=this;setTimeout((function(){e.props.dropArea.current&&(e.props.dropArea.current.ondragover=e.onDragOver,e.props.dropArea.current.ondragleave=e.onDragLeave,e.props.dropArea.current.ondrop=e.onDrop,document.addEventListener("paste",e.onPaste),h.q.eventEmitter.addListener("fileupload",e.openFileDialog))}),1e3)}},{key:"componentWillUnmount",value:function(){this.props.dropArea.current&&(this.props.dropArea.current.ondragover=null,this.props.dropArea.current.ondragleave=null,this.props.dropArea.current.ondrop=null),h.q.eventEmitter.removeListener("fileupload",this.openFileDialog),document.removeEventListener("paste",this.onPaste)}},{key:"onPaste",value:function(e){var t=e&&e.clipboardData&&e.clipboardData.items;if(t&&t.length){for(var a=[],n=0;n<t.length;n++){var i=t[n].getAsFile&&t[n].getAsFile();i&&a.push(i)}a.length>0&&this.onFilesAdded(a)}}},{key:"onDragLeave",value:function(e){this.props.onDrag&&this.props.onDrag(!1)}},{key:"onDrop",value:function(e){if(e.preventDefault(),!this.state.uploading){var t=e.dataTransfer.files,a=this.fileListToArray(t);this.onFilesAdded(a),this.props.onDrag&&this.props.onDrag(!1)}}},{key:"fileListToArray",value:function(e){for(var t=[],a=0;a<e.length;a++)t.push(e.item(a));return t}},{key:"render",value:function(){var e=this;if(this.props.link)return n.createElement(n.Fragment,null,n.createElement("input",{onChange:this.onFilesAddedUI,ref:this.fileInputRef,id:"fileupload",type:"file",name:"files[]",multiple:!this.props.fileOptions.has("one_file_upload"),className:"d-none"}),n.createElement("a",{tabIndex:"0",onKeyPress:function(t){"Enter"===t.key&&e.openFileDialog()},className:"file-uploader",onClick:this.openFileDialog},n.createElement("i",{className:"material-icons chat-setting-item text-muted attach-ico"},"")))}}]);var a}(n.PureComponent),q=(0,g.C)()(H);function W(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(W=function(){return!!e})()}var K,z,V=function(e){function t(e){var a,n,r,c;return(0,i.A)(this,t),n=this,r=t,c=[e],r=(0,o.A)(r),a=(0,s.A)(n,W()?Reflect.construct(r,c||[],(0,o.A)(n).constructor):r.apply(n,c)),(0,l.A)(a,"state",{intervalId:null,intervalCheckStatusId:null}),a.syncChat=a.syncChat.bind(a),a.checkStatusChat=a.checkStatusChat.bind(a),a}return(0,c.A)(t,e),(0,r.A)(t,[{key:"syncChat",value:function(e){this.state.intervalId&&clearTimeout(this.state.intervalId),this.props.updateMessages(),this.setState({intervalId:setTimeout(this.syncChat,this.props.syncInterval)})}},{key:"checkStatusChat",value:function(){this.state.intervalCheckStatusId&&clearTimeout(this.state.intervalCheckStatusId),this.props.updateStatus(),this.setState({intervalCheckStatusId:setTimeout(this.checkStatusChat,this.props.syncInterval)})}},{key:"componentDidMount",value:function(){this.syncChat(),this.checkStatusChat()}},{key:"componentDidUpdate",value:function(e,t){this.props.status==p.X8||this.props.status_sub==p.Z9||this.props.status_sub==p.Km||this.props.status_sub==p.ag?(this.state.intervalId&&(clearTimeout(this.state.intervalId),this.state.intervalId=null),h.q.sendMessageParent("chatClosed",[])):this.state.intervalId||this.syncChat(),this.props.status_sub==e.status_sub&&this.props.status==e.status&&this.props.initClose==e.initClose&&e.hasSurvey==this.props.hasSurvey||this.checkStatusChat(),this.props.status!=p.X8&&this.props.status!=p.oF&&this.props.status!=p.HZ&&this.props.status_sub!=p.Z9||!this.state.intervalCheckStatusId||0!=this.props.hasSurvey||(clearTimeout(this.state.intervalCheckStatusId),this.state.intervalCheckStatusId=null)}},{key:"componentWillUnmount",value:function(){this.state.intervalId&&clearTimeout(this.state.intervalId),this.state.intervalCheckStatusId&&clearTimeout(this.state.intervalCheckStatusId)}},{key:"render",value:function(){return null}}])}(n.PureComponent),G=a(1083);function J(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(J=function(){return!!e})()}var $=(K=(0,d.Ng)((function(e){return{chat:e.chatwidget.get("chatData"),chat_ui:e.chatwidget.get("chat_ui")}})),K(z=function(e){function t(e){var a,n,r,c;return(0,i.A)(this,t),n=this,r=t,c=[e],r=(0,o.A)(r),(a=(0,s.A)(n,J()?Reflect.construct(r,c||[],(0,o.A)(n).constructor):r.apply(n,c))).abstractClick=a.abstractClick.bind(a),a.checkSwitchButtom=a.checkSwitchButtom.bind(a),a}return(0,c.A)(t,e),(0,r.A)(t,[{key:"abstractClick",value:function(e){var t=this;e.onclick&&("lhinst.voteAction($(this))"==e.onclick?(0,u.TG)({id:this.props.chat.get("id"),hash:this.props.chat.get("hash"),type:e["data-id"]}).then((function(e){t.props.updateStatus()})):"notificationsLHC.sendNotification()"==e.onclick?h.q.sendMessageParent("subscribeEvent",[{pk:this.props.chat_ui.get("notifications_pk")}]):-1!==e.onclick.indexOf("lhinst.transferToHuman")?(0,u.Ys)({id:this.props.chat.get("id"),hash:this.props.chat.get("hash")}).then((function(e){t.props.updateStatus()})):h.q.emitEvent("StatusClick",[e,this.props.dispatch]))}},{key:"checkSwitchButtom",value:function(){if(this.props.chat_ui.has("switch_to_human")){var e=this.props.vtm&&this.props.vtm>=this.props.chat_ui.get("switch_to_human")&&!1===this.props.survey_mode,t=function(e){var t=document.getElementById("transfer-to-human-btn");t&&t.classList[e?"remove":"add"]("hide")};e?G.A.get("".concat(window.lhcChat.base_url,"restapi/isonlinechat/").concat(this.props.chat.get("id"),"?exclude_bot=true")).then((function(e){t(e.data.isonline)})):t(!1)}}},{key:"componentDidMount",value:function(){this.checkSwitchButtom()}},{key:"componentDidUpdate",value:function(e,t,a){this.checkSwitchButtom()}},{key:"render",value:function(){var e=this;return(0,D.Ay)(this.props.status,{replace:function(t){if(t.attribs&&t.attribs.onclick&&t.name&&("i"==t.name||"a"==t.name)){var a=Object.assign({},t.attribs);return t.attribs.class&&(t.attribs.className=t.attribs.class,delete t.attribs.class),t.attribs.onclick&&delete t.attribs.onclick,n.createElement("i",(0,x.A)({},t.attribs,{onClick:function(t){return e.abstractClick(a)}}),(0,D.zd)(t.children))}}})}}])}(n.PureComponent))||z),X=$,Y=a(951);function Q(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Q=function(){return!!e})()}var Z,ee,te=function(e){function t(e){return(0,i.A)(this,t),a=this,n=t,r=[e],n=(0,o.A)(n),(0,s.A)(a,Q()?Reflect.construct(n,r||[],(0,o.A)(a).constructor):n.apply(a,r));var a,n,r}return(0,c.A)(t,e),(0,r.A)(t,[{key:"componentDidMount",value:function(){var e=document.getElementById("messages-scroll");e&&(e.scrollTop=e.scrollHeight+1e3)}},{key:"render",value:function(){return n.createElement(n.Fragment,null,null!==this.props.profileBefore&&n.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.profileBefore}}),n.createElement("div",{className:this.props.msg_expand,id:"messagesBlock",dangerouslySetInnerHTML:{__html:this.props.messagesBefore}}),!this.props.hideMessageField&&n.createElement("div",{className:"d-flex flex-row border-top position-relative message-send-area"},n.createElement("div",{className:"btn-group dropup disable-select ps-1 pt-2"},n.createElement("button",{type:"button",class:"border-0 p-0 material-icons settings text-muted",id:"chat-dropdown-options",role:"button","data-bs-toggle":"dropdown",tabindex:"0","aria-haspopup":"true","aria-expanded":"false"},"")),n.createElement("div",{className:"mx-auto w-100"},n.createElement(Y.A,{text:this.props.value,textMaxLength:"500",textAutoFocus:!0,classNameText:"ps-0 no-outline form-control rounded-0 form-control rounded-start-0 rounded-end-0 border-0",textPlaceholder:this.props.placeholderMessage,textareaRef:this.props.textMessageRef})),n.createElement("div",{className:"disable-select"},n.createElement("div",{className:"user-chatwidget-buttons pt-2 pe-1",id:"ChatSendButtonContainer"},n.createElement("i",{className:"material-icons text-muted-light settings me-0"},"")))))}}])}(n.PureComponent),ae=a(5802);function ne(e,t){var a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=function(e,t){if(e){if("string"==typeof e)return ie(e,t);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?ie(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){a&&(e=a);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,o=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return s=e.done,e},e:function(e){o=!0,r=e},f:function(){try{s||null==a.return||a.return()}finally{if(o)throw r}}}}function ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=Array(t);a<t;a++)n[a]=e[a];return n}function re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(re=function(){return!!e})()}var se,oe,ce=n.lazy((function(){return a.e(436).then(a.bind(a,4436))})),le=n.lazy((function(){return a.e(14).then(a.bind(a,5014))})),de=n.lazy((function(){return a.e(507).then(a.bind(a,8507))})),ue=n.lazy((function(){return a.e(806).then(a.bind(a,9806))})),he=n.lazy((function(){return a.e(396).then(a.bind(a,2396))})),pe=(Z=(0,d.Ng)((function(e){return{chatwidget:e.chatwidget}})),Z(ee=function(e){function t(e){var a,r,c,d;return(0,i.A)(this,t),r=this,c=t,d=[e],c=(0,o.A)(c),a=(0,s.A)(r,re()?Reflect.construct(c,d||[],(0,o.A)(r).constructor):c.apply(r,d)),(0,l.A)(a,"state",{value:"",changeLanguage:!1,showBBCode:null,mailChat:!1,dragging:!1,enabledEditor:!0,showMessages:!1,preloadSurvey:!1,gotToSurvey:!1,voiceMode:!1,showMail:!1,changeFontSize:!1,errorMode:!1,hasNew:!1,newId:0,scrollButton:!1,fontSize:100,reactToMsgId:0,otm:0,messages_ui:!0,previewFiles:[]}),(0,l.A)(a,"insertText",(function(e){var t=a.textMessageRef.current.selectionStart;a.setState({value:a.state.value.substring(0,t)+e+a.state.value.substring(t)})})),a.props.dispatch((0,u.tz)({id:a.props.chatwidget.getIn(["chatData","id"]),hash:a.props.chatwidget.getIn(["chatData","hash"]),theme:a.props.chatwidget.get("theme")})),a.updateMessages(),a.updateStatus(),a.enterKeyDown=a.enterKeyDown.bind(a),a.handleChange=a.handleChange.bind(a),a.sendMessage=a.sendMessage.bind(a),a.endChat=a.endChat.bind(a),a.mailChat=a.mailChat.bind(a),a.changeFont=a.changeFont.bind(a),a.voiceCall=a.voiceCall.bind(a),a.toggleModal=a.toggleModal.bind(a),a.setStatusText=a.setStatusText.bind(a),a.dragging=a.dragging.bind(a),a.scrollBottom=a.scrollBottom.bind(a),a.focusMessage=a.focusMessage.bind(a),a.setEditorEnabled=a.setEditorEnabled.bind(a),a.sendDelay=a.sendDelay.bind(a),a.unhideDelayed=a.unhideDelayed.bind(a),a.toggleSound=a.toggleSound.bind(a),a.goToSurvey=a.goToSurvey.bind(a),a.startVoiceRecording=a.startVoiceRecording.bind(a),a.cancelVoiceRecording=a.cancelVoiceRecording.bind(a),a.onScrollMessages=a.onScrollMessages.bind(a),a.scrollToMessage=a.scrollToMessage.bind(a),a.changeFontAction=a.changeFontAction.bind(a),a.setLanguageAction=a.setLanguageAction.bind(a),a.changeLanguage=a.changeLanguage.bind(a),a.onFilePreview=a.onFilePreview.bind(a),a.removeFilePreview=a.removeFilePreview.bind(a),a.messagesAreaRef=n.createRef(),a.textMessageRef=a.props.textMessageRef,a.updateMessages=a.updateMessages.bind(a),a.updateMessage=a.updateMessage.bind(a),a.updateStatus=a.updateStatus.bind(a),a.abstractAction=a.abstractAction.bind(a),a.updateMetaAutoHide=a.updateMetaAutoHide.bind(a),a.setMetaUpdateState=a.setMetaUpdateState.bind(a),a.keyUp=a.keyUp.bind(a),a.delayed=!1,a.delayQueue=[],a.intervalPending=null,a.intervalFunction=null,a.unhideDelayedTimer=null,a.pendingMetaUpdate=!1,a.timeoutNewMessage=null,a.timeoutScroll=null,a.widgetWasOpened=!1,a.isTyping=!1,a.typingStopped=null,a.typingStoppedAction=a.typingStoppedAction.bind(a),a.currentMessageTyping="",a}return(0,c.A)(t,e),(0,r.A)(t,[{key:"dragging",value:function(e){this.setState({dragging:e})}},{key:"goToSurvey",value:function(){this.props.dispatch({type:"UI_STATE",data:{attr:"show_survey",val:1}}),this.setState({gotToSurvey:!0})}},{key:"setStatusText",value:function(e){this.props.dispatch({type:"chat_status_changed",data:{text:e}})}},{key:"startVoiceRecording",value:function(){this.setState({voiceMode:!0})}},{key:"cancelVoiceRecording",value:function(){this.setState({voiceMode:!1})}},{key:"handleChange",value:function(e){this.setState({value:e.target.value}),h.q.setSessionStorage("_ttxt",e.target.value)}},{key:"onScrollMessages",value:function(){this.messagesAreaRef.current&&(this.widgetWasOpened=!0,this.messagesAreaRef.current.scrollHeight-this.messagesAreaRef.current.scrollTop-this.messagesAreaRef.current.offsetHeight>70?!0!==this.state.scrollButton&&this.setState({scrollButton:!0}):!1!==this.state.scrollButton&&(this.setState({scrollButton:!1,otm:0,hasNew:!1,newId:0}),this.props.dispatch({type:"UPDATE_LIVE_DATA",data:{attr:"lfmsgid",val:0}})))}},{key:"scrollToMessage",value:function(){var e=this;if(1==this.state.hasNew&&(clearTimeout(this.timeoutNewMessage),this.timeoutNewMessage=setTimeout((function(){e.setState({hasNew:!1,newId:0})}),1e3)),1==this.state.hasNew&&this.state.otm>0){this.setState({otm:0});try{document.getElementById("scroll-to-message").scrollIntoView()}catch(e){this.scrollBottom()}}else this.scrollBottom()}},{key:"changeFontAction",value:function(e){this.setState({fontSize:this.state.fontSize+(1==e?5:-5)}),h.q.setLocalStorage("_dfs",this.state.fontSize),this.scrollBottom()}},{key:"setLanguageAction",value:function(e){h.q.setLocalStorage("_lng",e),this.setState({changeLanguage:!1}),(0,u.WL)({lng:e,id:this.props.chatwidget.getIn(["chatData","id"]),hash:this.props.chatwidget.getIn(["chatData","hash"])}),h.q.emitEvent("change_language",[e]),this.updateStatus()}},{key:"componentDidMount",value:function(){var e=h.q.getSessionStorage("_ttxt");null!==e&&this.setState({value:e});var t=h.q.getLocalStorage("_dfs");null!==t&&this.setState({fontSize:parseInt(t)});var a=document.getElementById("CSChatMessage");null!==a&&(!0===this.props.chatwidget.get("shown")&&"widget"==this.props.chatwidget.get("mode")||"popup"==this.props.chatwidget.get("mode"))&&a.focus()}},{key:"focusMessage",value:function(){this.textMessageRef.current&&(this.textMessageRef.current.focus(),this.state.value.length>0&&(this.textMessageRef.current.selectionStart=this.state.value.length,this.textMessageRef.current.selectionEnd=this.state.value.length))}},{key:"setEditorEnabled",value:function(e){this.setState({enabledEditor:e})}},{key:"hasClass",value:function(e,t){return new RegExp("(\\s|^)"+t+"(\\s|$)").test(e.className)}},{key:"addClass",value:function(e,t){this.hasClass(e,t)||(e.className+=(e.className?" ":"")+t)}},{key:"removeClass",value:function(e,t){this.hasClass(e,t)&&(e.className=e.className.replace(new RegExp("(\\s|^)"+t+"(\\s|$)")," ").replace(/^\s+|\s+$/g,""))}},{key:"setMetaUpdateState",value:function(e){!1===e&&!0===this.pendingMetaUpdate&&(this.pendingMetaUpdate=!1,this.updateMetaAutoHide(!0),this.doScrollBottom()),!0===e&&(this.pendingMetaUpdate=!0,this.updateMetaAutoHide(),this.doScrollBottom())}},{key:"updateMetaAutoHide",value:function(e){var t=document.getElementById("messages-scroll");if(t){var a=".meta-auto-hide, .meta-auto-hide-normal",n=t.querySelectorAll(a);if(n.length>0){var i=e?0:1;for(r=0;r<n.length-i;r++)n[r].style.display="none";var r,s=t.lastChild;if(s&&void 0!==s.getElementsByClassName)for(n=s.querySelectorAll(a),r=0;r<n.length;r++)n[r].style.display=""}}}},{key:"nextUntil",value:function(e,t){for(var a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=[],r=!0;e=e.nextElementSibling;)r&&e&&!e.matches(t)==a?i.push(e):r=n;return i}},{key:"sendDelay",value:function(e){var t=this,a=e.id,n=e.duration,i=e.delay,r=e.untill_message,s=document.getElementById("msg-"+a);s&&(i>0&&this.addClass(s,"hide"),1==r&&this.nextUntil(s,".message-admin",!1,!0).length>0||setTimeout((function(){if(0==t.delayed)if(1==r)null!==t.intervalFunction&&t.intervalFunction(),t.intervalFunction=function(){var a=t.nextUntil(s,".message-admin",!1,!0);if(a.length>0)s.parentNode.removeChild(s),t.intervalFunction=null,clearInterval(t.intervalPending),a[0].scrollIntoView();else{if(!t.hasClass(s,"meta-hider")){t.addClass(s,"meta-hider"),t.addClass(s,"message-row-typing"),t.removeClass(s,"hide"),t.removeClass(s,"fade-in-fast");var n,i=ne(s.getElementsByClassName("msg-body"));try{for(i.s();!(n=i.n()).done;){var r=n.value;t.removeClass(r,"hide")}}catch(e){i.e(e)}finally{i.f()}t.scrollBottom(!1,!1)}if(e.expose_delays&&!t.hasClass(s,"message-row-typing-stream")){var o=Math.floor(Date.now()/1e3)-parseInt(e.expose_delays.stime);if(o>0){var c=s.querySelector(".msg-body");if(c)for(var l=1;l<=3;l++)e.expose_delays["delay_expose_"+l]&&o>parseInt(e.expose_delays["delay_expose_"+l])&&c.innerText!=e.expose_delays["delay_expose_text_"+l]&&(c.innerText=e.expose_delays["delay_expose_text_"+l])}}}},clearInterval(t.intervalPending),t.intervalFunction(),t.intervalPending=setInterval(t.intervalFunction,200);else{t.delayed=!0,t.addClass(s,"meta-hider"),t.addClass(s,"message-row-typing"),t.nextUntil(s,".meta-hider").forEach((function(e){t.addClass(e,"hide")})),t.unhideDelayedTimer=setTimeout((function(){t.unhideDelayed(a)}),1e3*n),t.removeClass(s,"hide"),t.removeClass(s,"fade-in-fast");var o,c=ne(s.getElementsByClassName("msg-body"));try{for(c.s();!(o=c.n()).done;){var l=o.value;t.removeClass(l,"hide")}}catch(e){c.e(e)}finally{c.f()}i>0&&(t.updateMetaAutoHide(),t.scrollBottom(!1,!1))}else t.addClass(s,"message-row-typing"),t.addClass(s,"meta-hider"),t.delayQueue.push({id:a,delay:n})}),1e3*i))}},{key:"unhideDelayed",value:function(e){var t=this,a=document.getElementById("msg-"+e);if(a){var n=!1;if(this.nextUntil(a,".meta-hider").forEach((function(e){t.removeClass(e,"hide"),0==n&&(e.scrollIntoView(),n=!0)})),a.parentNode.removeChild(a),this.updateMetaAutoHide(),this.delayQueue.length>0){var i=this.delayQueue.shift();setTimeout((function(){t.unhideDelayed(i.id)}),1e3*i.delay);var r=document.getElementById("msg-"+i.id);if(null!==r){this.removeClass(r,"hide"),this.removeClass(r,"fade-in-fast");var s,o=ne(r.getElementsByClassName("msg-body"));try{for(o.s();!(s=o.n()).done;){var c=s.value;this.removeClass(c,"hide")}}catch(e){o.e(e)}finally{o.f()}}}else this.delayed=!1}}},{key:"componentWillUnmount",value:function(){clearInterval(this.intervalPending),clearInterval(this.typingStopped),clearTimeout(this.unhideDelayedTimer),clearTimeout(this.timeoutNewMessage),clearTimeout(this.timeoutScroll)}},{key:"getSnapshotBeforeUpdate",value:function(e,t){if(e.chatwidget.getIn(["chatLiveData","messages"]).size!=this.props.chatwidget.getIn(["chatLiveData","messages"]).size){var a=!1,n=!0,i=0;this.messagesAreaRef.current&&((i=this.messagesAreaRef.current.scrollHeight-this.messagesAreaRef.current.scrollTop)-this.messagesAreaRef.current.offsetHeight<70?i=0:n=!1,a=!0);var r=this.state.hasNew,s=1==r?this.state.newId:0,o=1==r?this.state.otm:0;if(0!=e.chatwidget.getIn(["chatLiveData","messages"]).size&&!1===this.props.chatwidget.getIn(["chatLiveData","uw"])){var c=this.props.chatwidget.get("shown")&&"widget"==this.props.chatwidget.get("mode")||"widget"!=this.props.chatwidget.get("mode")&&document.hasFocus();0==r?(s=1==(r=0==c||0==window.lhcChat.is_focused||0==n||!1===this.state.messages_ui)?e.chatwidget.getIn(["chatLiveData","messages"]).size:0,o=this.props.chatwidget.getIn(["chatLiveData","otm"])):o+=this.props.chatwidget.getIn(["chatLiveData","otm"]);var l=this.props.chatwidget.hasIn(["chat_ui","msg_snippet"])&&this.props.chatwidget.getIn(["chatLiveData","messages",-1,"msg"]);h.q.emitEvent("play_sound",[{msop:this.props.chatwidget.getIn(["chatLiveData","msop"]),msg_body:l,otm:o,type:"new_message",sound_on:!0===this.props.chatwidget.getIn(["usersettings","soundOn"]),widget_open:c}])}else r=!1,s=0,o=0;if(this.setState({hasNew:r,newId:s,otm:o,scrollButton:!n}),1==a)return i}else{if(!1===e.chatwidget.get("shown")&&!0===this.props.chatwidget.get("shown"))return!0===this.widgetWasOpened&&this.messagesAreaRef.current?this.messagesAreaRef.current.scrollHeight-this.messagesAreaRef.current.scrollTop:(this.widgetWasOpened=!0,0);this.props.chatwidget.getIn(["chatLiveData","error"])&&(this.props.chatwidget.getIn(["chatLiveData","lmsg"])&&(0==this.state.errorMode||this.props.chatwidget.getIn(["chatLiveData","lmsg"])!=e.chatwidget.getIn(["chatLiveData","lmsg"]))||!this.props.chatwidget.getIn(["chatLiveData","lmsg"])&&0==this.state.errorMode)?this.setState({errorMode:!0,value:this.props.chatwidget.getIn(["chatLiveData","lmsg"])}):!this.props.chatwidget.getIn(["chatLiveData","error"])&&e.chatwidget.getIn(["chatLiveData","error"])&&this.setState({errorMode:!1,value:""})}return null}},{key:"componentDidUpdate",value:function(e,t,a){var n=this;t.previewFiles.length!=this.state.previewFiles.length&&this.scrollBottom(!1,!1),!1!==this.state.showMessages&&e.chatwidget.getIn(["chatLiveData","status"])==this.props.chatwidget.getIn(["chatLiveData","status"])&&e.chatwidget.getIn(["chatLiveData","msg_to_store"]).size==this.props.chatwidget.getIn(["chatLiveData","msg_to_store"]).size||(1==this.props.chatwidget.get("newChat")&&1==this.props.chatwidget.getIn(["chatLiveData","messages"]).size?this.scrollBottom(!1,!0):this.scrollBottom(!1,e.chatwidget.getIn(["chatLiveData","msg_to_store"]).size!=this.props.chatwidget.getIn(["chatLiveData","msg_to_store"]).size));var i=!1;if((!1===t.enabledEditor&&t.enabledEditor!=this.state.enabledEditor&&1==(i=!0)||this.props.chatwidget.get("msgLoaded")!==e.chatwidget.get("msgLoaded")&&(0==this.props.chatwidget.get("newChat")||1==(i=!0)))&&(0==i?this.scrollBottom(!1,!1):this.scrollBottom(!1,!0),(!0!==this.props.chatwidget.getIn(["chat_ui","auto_start"])||"embed"!=this.props.chatwidget.get("mode")||!1===this.props.chatwidget.getIn(["chat_ui","auto_start"])&&"embed"==this.props.chatwidget.get("mode")||!1===t.enabledEditor&&t.enabledEditor!=this.state.enabledEditor)&&(this.focusMessage(),setTimeout((function(){n.focusMessage()}),500))),null!==a&&this.messagesAreaRef.current){var r=document.getElementById("messages-scroll"),s=document.getElementById("scroll-to-message")||document.getElementById("msg-"+this.props.chatwidget.getIn(["chatLiveData","lfmsgid"]));r&&s&&-1===s.className.indexOf("ignore-auto-scroll")&&r.scrollHeight-r.offsetHeight-s.offsetTop>70?(this.setState({scrollButton:!0}),s.scrollIntoView()):this.messagesAreaRef.current.scrollTop=this.messagesAreaRef.current.scrollHeight-a}1==this.props.chatwidget.getIn(["chat_ui_state","confirm_close"])&&!1===this.state.preloadSurvey&&this.setState({preloadSurvey:!0}),!1===e.chatwidget.get("shown")&&!0===this.props.chatwidget.get("shown")&&"widget"==this.props.chatwidget.get("mode")&&this.textMessageRef.current&&this.textMessageRef.current.focus(),!0!==this.props.chatwidget.getIn(["chat_ui","start_on_close"])||!0!==this.props.chatwidget.getIn(["chatLiveData","closed"])||void 0!==e.chatwidget.getIn(["chatLiveData","closed"])&&!1!==e.chatwidget.hasIn(["chatLiveData","closed"])&&!1!==e.chatwidget.getIn(["chatLiveData","closed"])||this.props.chatwidget.getIn(["chat_ui","survey_id"])||this.props.endChat({show_start:this.props.chatwidget.get("shown")}),!0===this.props.chatwidget.getIn(["chatLiveData","closed"])&&0===this.props.chatwidget.getIn(["chatLiveData","status_sub"])&&5===e.chatwidget.getIn(["chatLiveData","status_sub"])&&this.props.dispatch((0,u.tz)({id:this.props.chatwidget.getIn(["chatData","id"]),hash:this.props.chatwidget.getIn(["chatData","hash"]),theme:this.props.chatwidget.get("theme")})),!0!==this.props.chatwidget.get("shown")||"widget"!=this.props.chatwidget.get("mode")&&"embed"!=this.props.chatwidget.get("mode")||!0!==this.props.chatwidget.get("initLoaded")||!0!==this.props.chatwidget.get("msgLoaded")||0!=e.chatwidget.get("msgLoaded")&&0!=e.chatwidget.get("initLoaded")||"widget"==this.props.chatwidget.get("mode")&&this.textMessageRef.current&&this.textMessageRef.current.focus(),null!==this.intervalFunction&&this.intervalFunction()}},{key:"doScrollBottom",value:function(e){var t;this.messagesAreaRef.current&&(e&&null!==(t=document.getElementById("msg-"+this.props.chatwidget.getIn(["chatLiveData","lfmsgid"])))&&-1===t.className.indexOf("ignore-auto-scroll")?t.scrollIntoView():this.messagesAreaRef.current.scrollTop=this.messagesAreaRef.current.scrollHeight+1e3)}},{key:"scrollBottom",value:function(e,t){var a=this;!this.messagesAreaRef.current||e&&this.state.scrollButton||(clearTimeout(this.timeoutScroll),this.doScrollBottom(t),this.timeoutScroll=setTimeout((function(){a.doScrollBottom(t),!1===a.state.showMessages&&a.setState({showMessages:!0})}),450))}},{key:"abstractAction",value:function(e,t){h.q.emitEvent(e,t)}},{key:"updateMessage",value:function(e){this.props.dispatch((0,u.nc)({msg_id:e,lmgsid:this.props.chatwidget.getIn(["chatLiveData","lmsgid"]),mode:this.props.chatwidget.get("mode"),theme:this.props.chatwidget.get("theme"),id:this.props.chatwidget.getIn(["chatData","id"]),hash:this.props.chatwidget.getIn(["chatData","hash"]),no_scroll:!0}))}},{key:"updateMessages",value:function(e){var t={chat_id:this.props.chatwidget.getIn(["chatData","id"]),hash:this.props.chatwidget.getIn(["chatData","hash"]),lmgsid:this.props.chatwidget.getIn(["chatLiveData","lmsgid"]),lfmsgid:this.props.chatwidget.getIn(["chatLiveData","lfmsgid"]),theme:this.props.chatwidget.get("theme"),new_chat:this.props.chatwidget.get("newChat"),active_widget:(this.props.chatwidget.get("shown")&&"widget"==this.props.chatwidget.get("mode")||"widget"!=this.props.chatwidget.get("mode")&&document.hasFocus())&&1==window.lhcChat.is_focused&&!1!==this.state.messages_ui};t.new_chat&&0===t.lmgsid&&(t.old_msg_id=this.props.chatwidget.getIn(["chatData","lmsg_id"])),this.props.dispatch((0,u.lj)(t)),e&&e.check_focus&&!1===this.props.chatwidget.get("isMobile")&&this.focusMessage()}},{key:"updateStatus",value:function(){this.props.dispatch((0,u.d1)({chat_id:this.props.chatwidget.getIn(["chatData","id"]),hash:this.props.chatwidget.getIn(["chatData","hash"]),theme:this.props.chatwidget.get("theme"),mode:this.props.chatwidget.get("mode")}))}},{key:"sendMessage",value:function(){if(0!=this.state.value.length||0!=this.state.previewFiles.length){h.q.setSessionStorage("_ttxt",""),this.setState({scrollButton:!1,otm:0,hasNew:!1,newId:0}),this.props.dispatch({type:"UPDATE_LIVE_DATA",data:{attr:"lfmsgid",val:0}});var e=this.state.previewFiles.map((function(e){return{id:e.id,security_hash:e.security_hash||"preview"}}));this.props.dispatch((0,u.tj)({id:this.props.chatwidget.getIn(["chatData","id"]),hash:this.props.chatwidget.getIn(["chatData","hash"]),msg:this.state.value,mn:this.props.chatwidget.hasIn(["chat_ui","mn"]),theme:this.props.chatwidget.get("theme"),lmgsid:this.props.chatwidget.getIn(["chatLiveData","lmsgid"]),attachments:e})),this.setState({value:"",errorMode:!1,previewFiles:[]}),this.currentMessageTyping="",this.focusMessage(),this.doScrollBottom()}}},{key:"enterKeyDown",value:function(e){"Enter"!==e.key||e.shiftKey||(this.props.chatwidget.getIn(["chatLiveData","lock_send"])||this.sendMessage(),e.preventDefault())}},{key:"keyUp",value:function(e){if("Enter"!==e.key&&!e.shiftKey)if(!1===this.isTyping){var t=this.props.t;this.isTyping=!0,this.props.dispatch((0,u.tQ)("true",this.props.chatwidget.hasIn(["chat_ui","hide_typing"])&&!0===this.props.chatwidget.getIn(["chat_ui","hide_typing"])?t("online_chat.visitor_typing"):this.state.value))}else if(clearTimeout(this.typingStopped),this.typingStopped=setTimeout(this.typingStoppedAction,6e3),this.currentMessageTyping!=this.state.value&&(Math.abs(this.currentMessageTyping.length-this.state.value.length)>6||this.props.chatwidget.get("overrides").contains("typing"))){var a=this.props.t;this.currentMessageTyping=this.state.value,this.props.dispatch((0,u.tQ)("true",this.props.chatwidget.hasIn(["chat_ui","hide_typing"])&&!0===this.props.chatwidget.getIn(["chat_ui","hide_typing"])?a("online_chat.visitor_typing"):this.state.value))}}},{key:"typingStoppedAction",value:function(){1==this.isTyping&&(this.isTyping=!1,this.props.dispatch((0,u.tQ)("false")))}},{key:"endChat",value:function(){this.props.endChat({show_start:this.props.chatwidget.get("shown")})}},{key:"toggleModal",value:function(){this.setState({showBBCode:!this.state.showBBCode}),this.state.showBBCode&&this.focusMessage()}},{key:"mailChat",value:function(){this.setState({showMail:!this.state.showMail})}},{key:"changeLanguage",value:function(){this.setState({changeLanguage:!this.state.changeLanguage})}},{key:"changeFont",value:function(){this.setState({changeFontSize:!this.state.changeFontSize})}},{key:"voiceCall",value:function(){var e=void 0!==window.screenLeft?window.screenLeft:window.screenX,t=void 0!==window.screenTop?window.screenTop:window.screenY,a=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,n=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,i=a/window.screen.availWidth,r=(a-parseInt(800))/2/i+e,s="scrollbars=yes,menubar=1,resizable=1,width=800,height=600,top="+((n-parseInt(600))/2/i+t)+",left="+r,o=window.open("",h.q.prefix+"_voice_popup_v2",s),c=!1,l=!1;try{!o||o.closed||void 0===o.closed||"about:blank"===o.location.href?(o=window.open(this.props.chatwidget.get("base_url")+"voicevideo/call/"+this.props.chatwidget.getIn(["chatData","id"])+"/"+this.props.chatwidget.getIn(["chatData","hash"]),h.q.prefix+"_voice_popup_v2",s),l=!0):c=!0}catch(e){c=!0}!o||o.closed||void 0===o.closed||1==l||!0===c&&o.focus()}},{key:"toggleSound",value:function(){this.props.dispatch({type:"toggleSound",data:!this.props.chatwidget.getIn(["usersettings","soundOn"])}),h.q.sendMessageParent("toggleSound",[{sender:"toolbarButton"}])}},{key:"onFilePreview",value:function(e){var t=this;this.setState((function(a){if(!0===t.props.chatwidget.getIn(["chat_ui","file_options","one_file_upload"]))return a.previewFiles.forEach((function(e){t.handleFileRemoval(e)})),{previewFiles:[e]};if(a.previewFiles.length>=4){var n=a.previewFiles[0];return t.handleFileRemoval(n),{previewFiles:[].concat(S(a.previewFiles.slice(1)),[e])}}return{previewFiles:[].concat(S(a.previewFiles),[e])}}))}},{key:"handleFileRemoval",value:function(e){e.previewUrl&&e.previewUrl.startsWith("blob:")&&URL.revokeObjectURL(e.previewUrl),e.security_hash&&"preview"!==e.security_hash&&this.props.dispatch((0,u.fd)({file_id:e.id,security_hash:e.security_hash})).then((function(){})).catch((function(e){console.warn("Failed to remove file from server:",e)}))}},{key:"removeFilePreview",value:function(e){var t=this;this.setState((function(a){var n=a.previewFiles.find((function(t){return t.id===e}));return n&&t.handleFileRemoval(n),{previewFiles:a.previewFiles.filter((function(t){return t.id!==e}))}}))}},{key:"render",value:function(){var e=this,t=this.props.t;if(!1===this.props.chatwidget.get("initLoaded")||!1===this.props.chatwidget.get("msgLoaded")){var a="flex-grow-1 overflow-scroll position-relative";return this.props.chatwidget.hasIn(["chat_ui","msg_expand"])&&(a="overflow-scroll position-relative"),!1===this.props.chatwidget.getIn(["onlineData","fetched"])?null:n.createElement(te,{textMessageRef:this.textMessageRef,value:this.state.value,profileBefore:this.props.profileBefore,msg_expand:a,messagesBefore:this.props.messagesBefore,placeholderMessage:this.props.chatwidget.hasIn(["chat_ui","placeholder_message"])?this.props.chatwidget.getIn(["chat_ui","placeholder_message"]):t("chat.type_here")})}if(this.props.chatwidget.hasIn(["chatLiveData","ru"])&&this.props.chatwidget.getIn(["chatLiveData","ru"]))return h=this.props.chatwidget.get("base_url")+this.props.chatwidget.getIn(["chatLiveData","ru"]),n.createElement(n.Fragment,null,n.createElement("iframe",{allowtransparency:"true",src:h,frameBorder:"0",className:"flex-grow-1 position-relative iframe-modal"}));if(this.props.chatwidget.get("chatLiveData").has("messages"))var i=this.props.chatwidget.getIn(["chatLiveData","messages"]).map((function(a,i){return n.createElement(L,{minimizeWidget:function(t){return e.props.dispatch((0,u.fJ)())},isMobile:e.props.chatwidget.get("isMobile"),reactToMessageId:e.state.reactToMsgId,setReactingTo:function(t){return e.setState({reactToMsgId:t})},themeId:e.props.chatwidget.get("theme"),profilePic:e.props.chatwidget.get("profile_pic"),embedMode:e.props.chatwidget.get("mode"),targetSame:e.props.chatwidget.getIn(["chat_ui","same_target_link"]),printButton:e.props.chatwidget.getIn(["chat_ui","print_btn_msg"]),newTitle:e.props.chatwidget.getIn(["chat_ui","cnew_msgh"])||t("button.new"),newId:e.state.newId,hasNew:e.state.hasNew,voiceCall:e.voiceCall,endChat:e.props.endChat,setMetaUpdateState:e.setMetaUpdateState,sendDelay:e.sendDelay,setEditorEnabled:e.setEditorEnabled,abstractAction:e.abstractAction,updateStatus:e.updateStatus,focusMessage:e.focusMessage,updateMessage:e.updateMessage,updateMessages:e.updateMessages,scrollBottom:e.scrollBottom,id:i,key:"msg_"+i,msg:a})}));else i="";var r;r=!0===this.state.dragging?t("chat.drop_files"):this.props.chatwidget.getIn(["chatLiveData","closed"])?t("chat.chat_closed"):this.state.previewFiles.length>0?this.props.chatwidget.hasIn(["chat_ui","placeholder_file_message"])?this.props.chatwidget.getIn(["chat_ui","placeholder_file_message"]):t("chat.files_attached"):this.props.chatwidget.hasIn(["chat_ui","placeholder_message"])?this.props.chatwidget.getIn(["chat_ui","placeholder_message"]):t("chat.type_here"),a="flex-grow-1 overflow-scroll position-relative";var s="bottom-message px-1";this.props.chatwidget.hasIn(["chat_ui","show_ts"])&&(s+=" show-msg-ts",this.props.chatwidget.hasIn(["chat_ui","show_ts_below"])&&(s+=" show-msg-ts-below")),this.props.chatwidget.hasIn(["chat_ui","msg_expand"])&&"embed"==this.props.chatwidget.get("mode")&&(a="overflow-scroll position-relative",s+=" position-relative"),this.props.chatwidget.hasIn(["chatLiveData","msg_to_store"])&&this.props.chatwidget.getIn(["chatLiveData","msg_to_store"]).size>0&&(s+=" has-msg-to-store"),!1===this.props.chatwidget.get("shown")&&!1===this.widgetWasOpened&&(s+=" invisible");var o="mx-auto w-100";1==this.props.chatwidget.getIn(["chatLiveData","closed"])&&(o+="embed"==this.props.chatwidget.get("mode")?" pe-2":" pe-1");var c=!0,l=!1,d=!1,h="",g="flex-grow-1 position-relative iframe-modal content-loader mb-2",_=this.props.chatwidget.hasIn(["chatLiveData","status_sub"])&&(this.props.chatwidget.getIn(["chatLiveData","status_sub"])==p.Z9||this.props.chatwidget.getIn(["chatLiveData","status_sub"])==p.Km&&(this.props.chatwidget.getIn(["chatLiveData","uid"])>0||this.props.chatwidget.getIn(["chatLiveData","status"])===p.oF||this.props.chatwidget.getIn(["chatLiveData","status"])==p.X8))||this.props.chatwidget.getIn(["chatLiveData","status"])==p.X8&&this.props.chatwidget.getIn(["chatLiveData","uid"])>0||!0===this.state.gotToSurvey;(this.props.chatwidget.hasIn(["chatLiveData","status_sub"])&&this.props.chatwidget.getIn(["chatLiveData","status_sub"])==p.Z9||this.props.chatwidget.getIn(["chatLiveData","status"])==p.X8&&this.props.chatwidget.getIn(["chatLiveData","status_sub"])!=p.Km)&&(d=!0),(!0===this.state.preloadSurvey||_)&&this.props.chatwidget.hasIn(["chat_ui","survey_id"])&&(h=this.props.chatwidget.get("base_url")+"survey/fillwidget/(chatid)/"+this.props.chatwidget.getIn(["chatData","id"])+"/(hash)/"+this.props.chatwidget.getIn(["chatData","hash"]),this.props.chatwidget.get("theme")&&(h=h+"/(theme)/"+this.props.chatwidget.get("theme")),h=h+"/(survey)/"+this.props.chatwidget.getIn(["chat_ui","survey_id"])+(!0===d?"/(force)/true":""),this.props.chatwidget.hasIn(["chat_ui","survey_url"])&&(h=this.props.chatwidget.getIn(["chat_ui","survey_url"]).replace("{chat_id}",this.props.chatwidget.getIn(["chatData","id"])).replace("{chat_hash}",this.props.chatwidget.getIn(["chatData","hash"]))+(!0===d?"?force=true":"")),l=!0,c=!1,(!1===_||this.props.chatwidget.hasIn(["chat_ui","survey_button"])&&0===this.props.chatwidget.getIn(["chat_ui_state","show_survey"])&&this.props.chatwidget.getIn(["chatLiveData","status"])==p.X8&&this.props.chatwidget.getIn(["chatLiveData","status_sub"])!=p.Z9&&this.props.chatwidget.getIn(["chatLiveData","status_sub"])!=p.Km||1==this.props.chatwidget.getIn(["chat_ui_state","confirm_close"]))&&(c=!0,g=" d-none"));var f=this.props.chatwidget.getIn(["chat_ui","end_chat_text"])||t("button.end_chat"),m={fontSize:(this.props.chatwidget.hasIn(["chat_ui","font_size"])?this.state.fontSize:"100")+"%"},w=this.props.chatwidget.hasIn(["chat_ui","taw"])?this.props.chatwidget.getIn(["chat_ui","taw"]):8.6;return n.createElement(n.Fragment,null,this.props.chatwidget.getIn(["chatLiveData","abort"])&&n.createElement(ae.A,{closeText:t("button.close"),close:function(t){return e.props.dispatch((0,u.fJ)(!0))},text:this.props.chatwidget.getIn(["chatLiveData","abort"])}),this.props.chatwidget.hasIn(["chat_ui","pre_survey_url"])&&this.props.chatwidget.getIn(["chatLiveData","uid"])>0&&2!==this.props.chatwidget.getIn(["chat_ui_state","pre_survey_done"])&&(1===this.props.chatwidget.getIn(["chat_ui_state","pre_survey_done"])||_)&&n.createElement(T.A,{cancelClose:function(t){return e.props.dispatch((0,u.g4)(!1))},confirmClose:function(t){return e.props.dispatch((0,u.g4)(!0))},toggle:this.props.cancelPresurvey,dataUrl:this.props.chatwidget.getIn(["chat_ui","pre_survey_url"])+this.props.chatwidget.getIn(["chatData","id"])+"/"+this.props.chatwidget.getIn(["chatData","hash"])+(this.props.chatwidget.hasIn(["chat_ui","survey_id"])?"/(hassurvey)/true":"")+(this.props.chatwidget.get("theme")?"/(theme)/"+this.props.chatwidget.get("theme"):null)}),l&&n.createElement(n.Fragment,null,0==c&&this.props.chatwidget.hasIn(["chatStatusData","result"])&&!this.props.chatwidget.hasIn(["chat_ui","hide_status"])&&this.props.chatwidget.getIn(["chatStatusData","result"])&&n.createElement("div",{id:"chat-status-container",className:"p-2 border-bottom live-status-"+this.props.chatwidget.getIn(["chatLiveData","status"])},n.createElement(X,{survey_mode:!0,updateStatus:this.updateStatus,vtm:this.props.chatwidget.hasIn(["chat_ui","switch_to_human"])&&this.props.chatwidget.getIn(["chatLiveData","status"])==p.oF?this.props.chatwidget.getIn(["chatLiveData","vtm"]):0,status:this.props.chatwidget.getIn(["chatStatusData","result"])})),n.createElement("iframe",{allowtransparency:"true",src:h,frameBorder:"0",className:g})),(c||l)&&n.createElement(V,{hasSurvey:l,syncInterval:this.props.chatwidget.getIn(["chat_ui","sync_interval"]),updateStatus:this.updateStatus,updateMessages:this.updateMessages,initClose:this.props.chatwidget.get("initClose"),dispatch:this.props.dispatch,status_sub:this.props.chatwidget.getIn(["chatLiveData","status_sub"]),status:this.props.chatwidget.getIn(["chatLiveData","status"]),theme:this.props.chatwidget.get("theme"),lmgsid:this.props.chatwidget.getIn(["chatLiveData","lmsgid"]),hash:this.props.chatwidget.getIn(["chatData","hash"]),chat_id:this.props.chatwidget.getIn(["chatData","id"])}),c&&n.createElement(n.Fragment,null,1==this.props.chatwidget.getIn(["chat_ui_state","confirm_close"])&&n.createElement(T.A,{confirmClose:this.props.endChat,cancelClose:this.props.cancelClose,toggle:this.props.cancelClose,dataUrl:"/chat/confirmleave/"+this.props.chatwidget.getIn(["chatData","id"])+"/"+this.props.chatwidget.getIn(["chatData","hash"])}),this.state.showBBCode&&n.createElement(T.A,{showModal:this.state.showBBCode,insertText:this.insertText,toggle:this.toggleModal,dataUrl:"/chat/bbcodeinsert/"+this.props.chatwidget.getIn(["chatData","id"])+"?react=1"}),this.state.changeLanguage&&n.createElement(T.A,{showModal:this.state.changeLanguage,setLanguage:this.setLanguageAction,insertText:this.insertText,toggle:this.changeLanguage,dataUrl:"/widgetrestapi/chooselanguage/(id)/"+this.props.chatwidget.getIn(["chatData","id"])+"/(hash)/"+this.props.chatwidget.getIn(["chatData","hash"])}),this.state.showMail&&n.createElement(n.Suspense,{fallback:"..."},n.createElement(le,{showModal:this.state.showMail,changeFont:this.changeFont,toggle:this.mailChat,chatHash:this.props.chatwidget.getIn(["chatData","hash"]),chatId:this.props.chatwidget.getIn(["chatData","id"])})),this.state.changeFontSize&&n.createElement(n.Suspense,{fallback:"..."},n.createElement(de,{showModal:this.state.changeFontSize,toggle:this.changeFont,changeFont:this.changeFontAction})),"embed"==this.props.chatwidget.get("mode")&&this.props.chatwidget.hasIn(["chat_ui","embed_cls"])&&1==this.props.chatwidget.getIn(["chat_ui","embed_cls"])&&n.createElement("div",{className:"close-modal-btn position-absolute"},this.props.chatwidget.hasIn(["chat_ui","close_btn"])&&n.createElement("a",{onClick:this.endChat,title:f},n.createElement("i",{className:"material-icons settings text-muted"},""),n.createElement("span",{className:"embed-close-title"},f))),this.props.chatwidget.hasIn(["chatStatusData","result"])&&!this.props.chatwidget.hasIn(["chat_ui","hide_status"])&&this.props.chatwidget.getIn(["chatStatusData","result"])&&n.createElement("div",{id:"chat-status-container",className:"p-2 border-bottom live-status-"+this.props.chatwidget.getIn(["chatLiveData","status"])},n.createElement(X,{survey_mode:!1,updateStatus:this.updateStatus,vtm:this.props.chatwidget.hasIn(["chat_ui","switch_to_human"])&&this.props.chatwidget.getIn(["chatLiveData","status"])==p.oF?this.props.chatwidget.getIn(["chatLiveData","vtm"]):0,status:this.props.chatwidget.getIn(["chatStatusData","result"])})),n.createElement("div",{className:a+(this.props.chatwidget.hasIn(["chat_ui","after_chat_status"])&&""!=this.props.chatwidget.getIn(["chat_ui","after_chat_status"])?" has-after-chat-status":""),onClick:function(t){e.setState({reactToMsgId:0})},id:"messagesBlock",onScrollCapture:this.onScrollMessages},this.props.chatwidget.hasIn(["chat_ui","after_chat_status"])&&""!=this.props.chatwidget.getIn(["chat_ui","after_chat_status"])&&n.createElement(n.Suspense,{fallback:""},n.createElement(ue,{setStateParent:function(t){return e.setState(t)},has_new:this.state.hasNew&&this.state.otm>0,attr:"after_chat_status"})),n.createElement("div",{className:s,id:"messages-scroll",style:m,ref:this.messagesAreaRef},this.props.chatwidget.hasIn(["chat_ui","prev_chat"])&&n.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.chatwidget.getIn(["chat_ui","prev_chat"])}}),i,this.props.chatwidget.hasIn(["chatLiveData","msg_to_store"])&&this.props.chatwidget.getIn(["chatLiveData","msg_to_store"]).size>0&&this.props.chatwidget.getIn(["chatLiveData","msg_to_store"]).map((function(t,a){return n.createElement("div",{"data-op-id":"0",className:"message-row response msg-to-store"},e.props.chatwidget.hasIn(["chat_ui","show_ts"])&&!e.props.chatwidget.hasIn(["chat_ui","show_ts_below"])&&n.createElement("div",{className:"msg-date"}," "),n.createElement("div",{className:"msg-body"},t.split("\n").map((function(e,t){return n.createElement(n.Fragment,{key:t},e,n.createElement("br",null))}))),e.props.chatwidget.hasIn(["chat_ui","show_ts"])&&e.props.chatwidget.hasIn(["chat_ui","show_ts_below"])&&n.createElement("div",{className:"msg-date"}," "))}))),this.state.scrollButton&&n.createElement("div",{className:"position-absolute btn-bottom-scroll fade-in",id:"id-btn-bottom-scroll"},n.createElement("button",{type:"button",onClick:this.scrollToMessage,className:"btn btn-sm btn-secondary"},this.state.hasNew&&this.state.otm>0&&n.createElement("div",null,n.createElement("i",{className:"material-icons"},""),this.state.otm," ",1==this.state.otm?this.props.chatwidget.getIn(["chat_ui","cnew_msg"])||t("button.new_msg"):this.props.chatwidget.getIn(["chat_ui","cnew_msgm"])||t("button.new_msgm"))||this.props.chatwidget.getIn(["chat_ui","cscroll_btn"])||t("button.scroll_bottom")))),this.state.previewFiles.length>0&&n.createElement(n.Suspense,{fallback:""},n.createElement(he,{previewFiles:this.state.previewFiles,onRemoveFile:this.removeFilePreview,t:t})),n.createElement("div",{className:(!1===this.props.chatwidget.get("msgLoaded")||!1===this.state.enabledEditor?"d-none ":"d-flex ")+"flex-row border-top position-relative message-send-area"},(this.props.chatwidget.getIn(["chatLiveData","ott"])||this.props.chatwidget.getIn(["chatLiveData","error"])&&"SEND_CONNECTION"!=this.props.chatwidget.getIn(["chatLiveData","error"])||this.props.chatwidget.get("network_down"))&&n.createElement("div",{id:"id-operator-typing",className:"bg-white ps-1"},this.props.chatwidget.getIn(["chatLiveData","error"])?-1===this.props.chatwidget.getIn(["chatLiveData","error"]).indexOf("SEND_")?this.props.chatwidget.getIn(["chatLiveData","error"]):t("online_chat."+this.props.chatwidget.getIn(["chatLiveData","error"]).toLowerCase()):this.props.chatwidget.get("network_down")?t("online_chat.send_connection"):this.props.chatwidget.getIn(["chatLiveData","ott"])),"embed"==this.props.chatwidget.get("mode")&&this.props.chatwidget.hasIn(["chat_ui","embed_cls"])&&2==this.props.chatwidget.getIn(["chat_ui","embed_cls"])&&n.createElement("div",{className:"inline-cls-btn pt-1 ps-2"},this.props.chatwidget.hasIn(["chat_ui","close_btn"])&&n.createElement("a",{onClick:this.endChat,title:f},n.createElement("i",{className:"material-icons settings text-muted me-0"},""))),n.createElement(v,{elementId:"chat-dropdown-options"},n.createElement("div",{className:"btn-group dropup disable-select ps-1 pt-2"},n.createElement("button",{type:"button",className:"border-0 p-0 material-icons settings text-muted",id:"chat-dropdown-options","data-bs-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},""),n.createElement("div",{className:"dropdown-menu shadow bg-white rounded lhc-dropdown-menu ms-1 "+("rtl"==window.lhcChat.staticJS.dir?"dropdown-menu-end":"")},n.createElement("div",{className:"d-flex flex-row ps-1"},n.createElement("a",{tabIndex:"0",onKeyPress:function(t){"Enter"===t.key&&e.toggleSound()},onClick:this.toggleSound,title:t("chat.option_sound")},n.createElement("i",{className:"material-icons chat-setting-item text-muted "+(!0===this.props.chatwidget.getIn(["usersettings","soundOn"])?"sound-on-ico":"sound-off-ico")},!0===this.props.chatwidget.getIn(["usersettings","soundOn"])?n.createElement(n.Fragment,null,""):n.createElement(n.Fragment,null,""))),this.props.chatwidget.hasIn(["chat_ui","print"])&&n.createElement("a",{tabIndex:"0",target:"_blank",href:this.props.chatwidget.get("base_url")+"chat/printchat/"+this.props.chatwidget.getIn(["chatData","id"])+"/"+this.props.chatwidget.getIn(["chatData","hash"]),title:t("button.print")},n.createElement("i",{className:"material-icons chat-setting-item text-muted print-ico"},"")),this.props.chatwidget.hasIn(["chat_ui","dwntxt"])&&n.createElement("a",{tabIndex:"0",target:"_blank",href:this.props.chatwidget.get("base_url")+"chat/downloadtxt/"+this.props.chatwidget.getIn(["chatData","id"])+"/"+this.props.chatwidget.getIn(["chatData","hash"]),title:t("button.dwntxt")},n.createElement("i",{className:"material-icons chat-setting-item text-muted download-ico"},"")),!this.props.chatwidget.getIn(["chatLiveData","closed"])&&this.props.chatwidget.hasIn(["chat_ui","file"])&&n.createElement(q,{fileOptions:this.props.chatwidget.getIn(["chat_ui","file_options"]),onDrag:this.dragging,dropArea:this.textMessageRef,onCompletion:this.updateMessages,onFilePreview:this.onFilePreview,progress:this.setStatusText,base_url:this.props.chatwidget.get("base_url"),chat_id:this.props.chatwidget.getIn(["chatData","id"]),hash:this.props.chatwidget.getIn(["chatData","hash"]),link:!0}),!this.props.chatwidget.getIn(["chatLiveData","closed"])&&1==this.props.chatwidget.getIn(["chatLiveData","status"])&&this.props.chatwidget.hasIn(["chat_ui","voice"])&&!0===this.props.chatwidget.getIn(["chat_ui","voice"])&&n.createElement("a",{tabIndex:"0",onClick:this.voiceCall,title:t("button.voice")},n.createElement("i",{className:"material-icons chat-setting-item text-muted voice-ico"},"")),!this.props.chatwidget.getIn(["chatLiveData","closed"])&&!this.props.chatwidget.hasIn(["chat_ui","bbc_btnh"])&&n.createElement("a",{tabIndex:"0",onKeyPress:function(t){"Enter"===t.key&&e.toggleModal()},onClick:this.toggleModal,title:t("button.bb_code")},n.createElement("i",{className:"material-icons chat-setting-item text-muted bbcode-ico"},"")),this.props.chatwidget.hasIn(["chat_ui","mail"])&&n.createElement("a",{tabIndex:"0",onKeyPress:function(t){"Enter"===t.key&&e.mailChat()},onClick:this.mailChat,title:t("button.mail")},n.createElement("i",{className:"material-icons chat-setting-item text-muted mail-ico"},"")),this.props.chatwidget.hasIn(["chat_ui","font_size"])&&n.createElement("a",{tabIndex:"0",onKeyPress:function(t){"Enter"===t.key&&e.changeFont(event)},onClick:function(t){return e.changeFont(t)}},n.createElement("i",{className:"material-icons chat-setting-item text-muted fs-ico"},"")),this.props.chatwidget.hasIn(["chat_ui","close_btn"])&&n.createElement("a",{tabIndex:"0",onKeyPress:function(t){"Enter"===t.key&&e.props.endChat()},onClick:this.props.endChat,title:f},n.createElement("i",{className:"material-icons chat-setting-item text-muted close-ico"},"")),this.props.chatwidget.hasIn(["chat_ui","lng_btnh"])&&n.createElement("a",{tabIndex:"0",onKeyPress:function(t){"Enter"===t.key&&e.changeLanguage()},onClick:this.changeLanguage,title:t("button.lang")},n.createElement("i",{className:"material-icons chat-setting-item text-muted lang-ico"},"")))))),n.createElement("div",{className:o},this.props.chatwidget.getIn(["chatLiveData","closed"])&&this.props.chatwidget.hasIn(["chat_ui","survey_id"])&&n.createElement("button",{type:"button",onClick:this.goToSurvey,className:"w-100 btn btn-success"},t("online_chat.go_to_survey")),(!this.props.chatwidget.getIn(["chatLiveData","closed"])||!this.props.chatwidget.hasIn(["chat_ui","survey_id"]))&&n.createElement(n.Fragment,null,n.createElement(Y.A,{text:this.props.chatwidget.getIn(["chatLiveData","closed"])?"":this.state.value,textMaxLength:this.props.chatwidget.getIn(["chat_ui","max_length"]),onTextTouchStart:this.scrollBottom,onTextKeyUp:this.keyUp,onTextChange:this.handleChange,onTextKeyDown:this.enterKeyDown,textReadOnly:this.props.chatwidget.getIn(["chatLiveData","closed"])||this.props.chatwidget.get("network_down"),onTextFocus:function(t){e.setState({reactToMsgId:0})},classNameText:"ps-0 no-outline form-control rounded-0 form-control rounded-start-0 rounded-end-0 border-0 "+(!0===this.props.chatwidget.get("shown")&&this.textMessageRef.current&&(/\r|\n/.exec(this.state.value)||this.state.value.length>this.textMessageRef.current.offsetWidth/w)?"msg-two-line":"msg-one-line"),textPlaceholder:r,textareaRef:this.props.textMessageRef}))),!this.props.chatwidget.getIn(["chatLiveData","closed"])&&!this.props.chatwidget.get("network_down")&&n.createElement("div",{className:"disable-select",id:"send-button-wrapper"},n.createElement("div",{className:"user-chatwidget-buttons pt-2 pe-1",id:"ChatSendButtonContainer"},!0===this.state.voiceMode&&n.createElement(n.Suspense,{fallback:"..."},n.createElement(ce,{onCompletion:this.updateMessages,progress:this.setStatusText,base_url:this.props.chatwidget.get("base_url"),chat_id:this.props.chatwidget.getIn(["chatData","id"]),hash:this.props.chatwidget.getIn(["chatData","hash"]),maxSeconds:this.props.chatwidget.getIn(["chat_ui","voice_message"]),cancel:this.cancelVoiceRecording})),(!this.props.chatwidget.hasIn(["chatLiveData","msg_to_store"])||0==this.props.chatwidget.getIn(["chatLiveData","msg_to_store"]).size)&&!this.props.chatwidget.getIn(["chatLiveData","lock_send"])&&this.props.chatwidget.hasIn(["chat_ui","voice_message"])&&void 0!==window.Audio&&0==this.state.value.length&&0==this.state.previewFiles.length&&!1===this.state.voiceMode&&n.createElement("a",{tabIndex:"0",onKeyPress:function(t){"Enter"===t.key&&e.startVoiceRecording()},onClick:this.startVoiceRecording,title:t("button.record_voice")},n.createElement("i",{className:"record-icon material-icons text-muted settings me-0"},"")),(!this.props.chatwidget.hasIn(["chatLiveData","msg_to_store"])||0==this.props.chatwidget.getIn(["chatLiveData","msg_to_store"]).size)&&!this.props.chatwidget.getIn(["chatLiveData","lock_send"])&&(!this.props.chatwidget.hasIn(["chat_ui","voice_message"])||!(void 0!==window.Audio)||(this.state.value.length>0||this.state.previewFiles.length>0)&&!1===this.state.voiceMode)&&n.createElement("a",{tabIndex:"0",onKeyDown:function(t){"Enter"===t.key&&(t.preventDefault(),e.sendMessage())},onClick:this.sendMessage,title:t("button.send_msg")},n.createElement("i",{className:"send-icon material-icons settings me-0"+(0==this.state.value.length&&0==this.state.previewFiles.length&&!1===this.state.voiceMode?" text-muted-light":" text-muted")},"")),(this.props.chatwidget.getIn(["chatLiveData","lock_send"])||this.props.chatwidget.hasIn(["chatLiveData","msg_to_store"])&&this.props.chatwidget.getIn(["chatLiveData","msg_to_store"]).size>0)&&n.createElement("i",{className:"in-progress-icon material-icons text-muted settings me-0"},""))))))}}])}(n.Component))||ee),ge=(0,g.C)()(pe);function _e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_e=function(){return!!e})()}var fe=n.lazy((function(){return a.e(835).then(a.bind(a,9835))})),me=n.lazy((function(){return a.e(472).then(a.bind(a,5472))})),ve=n.lazy((function(){return a.e(806).then(a.bind(a,9806))})),we=(se=(0,d.Ng)((function(e){return{chatwidget:e.chatwidget}})),se(oe=function(e){function t(e){var a,r,c,d;return(0,i.A)(this,t),r=this,c=t,d=[e],c=(0,o.A)(c),a=(0,s.A)(r,_e()?Reflect.construct(c,d||[],(0,o.A)(r).constructor):c.apply(r,d)),(0,l.A)(a,"state",{}),a.endChat=a.endChat.bind(a),a.popupChat=a.popupChat.bind(a),a.cancelClose=a.cancelClose.bind(a),a.setProfile=a.setProfile.bind(a),a.setMessages=a.setMessages.bind(a),a.setHideMessageField=a.setHideMessageField.bind(a),a.setBotPayload=a.setBotPayload.bind(a),a.switchColumn=a.switchColumn.bind(a),a.lastHeiht=0,a.profileHTML=null,a.messagesHTML=null,a.hideMessageField=!1,a.botPayload=null,a.textareaRef=n.createRef(),h.q.eventEmitter.addListener("end_chat_visitor",(function(e){return a.endChat()})),a}return(0,c.A)(t,e),(0,r.A)(t,[{key:"cancelClose",value:function(){this.props.dispatch({type:"UI_STATE",data:{attr:"confirm_close",val:0}})}},{key:"setBotPayload",value:function(e){this.botPayload=e}},{key:"endChat",value:function(e){if(void 0===e&&(e={}),!0===this.props.chatwidget.get("isChatting")&&!0===this.props.chatwidget.get("isOnline")&&!0===this.props.chatwidget.get("isOfflineMode")&&this.props.chatwidget.getIn(["chat_ui","survey_id"]))return this.props.dispatch({type:"attr_set",attr:["isOfflineMode"],data:!1}),void this.props.dispatch({type:"attr_set",attr:["chatLiveData","status_sub"],data:p.Z9});var t=!1,a=!1,n=!1,i=this.props.chatwidget.hasIn(["chatLiveData","status_sub"])&&(this.props.chatwidget.getIn(["chatLiveData","status_sub"])==p.ag||this.props.chatwidget.getIn(["chatLiveData","status_sub"])==p.Z9||this.props.chatwidget.getIn(["chatLiveData","status_sub"])==p.Km&&(this.props.chatwidget.getIn(["chatLiveData","uid"])>0||this.props.chatwidget.getIn(["chatLiveData","status"])===p.oF||this.props.chatwidget.getIn(["chatLiveData","status"])==p.X8)),r=this.props.chatwidget.getIn(["chatLiveData","status"])==p.X8&&this.props.chatwidget.getIn(["chatLiveData","uid"])>0;(1==i||r)&&this.props.chatwidget.hasIn(["chat_ui","survey_id"])&&(this.props.chatwidget.hasIn(["chat_ui","survey_button"])&&1!==this.props.chatwidget.getIn(["chat_ui_state","show_survey"])&&1!=i?a=!0:t=!0),!1===t&&this.props.chatwidget.hasIn(["chat_ui","confirm_close"])&&0===this.props.chatwidget.getIn(["chat_ui_state","confirm_close"])?this.props.dispatch({type:"UI_STATE",data:{attr:"confirm_close",val:1}}):(1===this.props.chatwidget.getIn(["chat_ui_state","confirm_close"])&&this.props.dispatch({type:"UI_STATE",data:{attr:"confirm_close",val:2}}),1===this.props.chatwidget.getIn(["chat_ui_state","pre_survey_done"])&&this.props.dispatch({type:"UI_STATE",data:{attr:"pre_survey_done",val:2}}),this.props.chatwidget.hasIn(["chat_ui","pre_survey_url"])&&0===this.props.chatwidget.getIn(["chat_ui_state","pre_survey_done"])&&this.props.chatwidget.getIn(["chatLiveData","uid"])>0&&(this.props.dispatch({type:"UI_STATE",data:{attr:"pre_survey_done",val:1}}),n=!0),!0!==a?!1===this.props.chatwidget.get("initClose")&&this.props.chatwidget.hasIn(["chat_ui","survey_id"])&&0==t&&(this.props.chatwidget.getIn(["chatLiveData","uid"])>0||!this.props.chatwidget.hasIn(["chat_ui","hide_survey_bot"])&&this.props.chatwidget.getIn(["chatLiveData","status"])===p.oF)?this.props.dispatch((0,u._0)({show_start:!(!e||!e.show_start)&&e.show_start,noCloseReason:"SHOW_SURVEY",noClose:!0,vid:this.props.chatwidget.get("vid"),chat:{id:this.props.chatwidget.getIn(["chatData","id"]),hash:this.props.chatwidget.getIn(["chatData","hash"])}})):0==n&&this.props.dispatch((0,u._0)({show_start:!(!e||!e.show_start)&&e.show_start,vid:this.props.chatwidget.get("vid"),chat:{id:this.props.chatwidget.getIn(["chatData","id"]),hash:this.props.chatwidget.getIn(["chatData","hash"])}})):this.props.dispatch({type:"UI_STATE",data:{attr:"show_survey",val:1}}))}},{key:"popupChat",value:function(){var e=null;window.parent&&window.parent["$_"+h.q.prefixUppercase]&&!1===window.parent.closed?e=window.parent["$_"+h.q.prefixUppercase].eventListener:window.opener&&window.opener["$_"+h.q.prefixUppercase]&&!1===window.opener.closed&&(e=window.opener["$_"+h.q.prefixUppercase].eventListener),null!==e?e.emitEvent("openPopup"):h.q.sendMessageParent("openPopup",[])}},{key:"switchColumn",value:function(){var e=this.props.chatwidget.get("position_placement").includes("full_height_")?this.props.chatwidget.get("position_placement_original"):"full_height"+(this.props.chatwidget.get("position_placement_original").includes("_right")?"_right":"_left");h.q.sendMessageParent("widgetHeight",[{position_placement:e}]),this.props.dispatch({type:"position_placement",data:e})}},{key:"setProfile",value:function(e){this.profileHTML=e}},{key:"setMessages",value:function(e){this.messagesHTML=e}},{key:"setHideMessageField",value:function(e){this.hideMessageField=e}},{key:"render",value:function(){var e=this;if(!1===this.props.chatwidget.get("loadedCore"))return null;if(!0===this.props.chatwidget.getIn(["proactive","pending"]))return n.createElement(n.Suspense,{fallback:"..."},n.createElement(me,{setBotPayload:this.setBotPayload}));var t="d-flex flex-column flex-grow-1 reset-container-margins";return"widget"==this.props.chatwidget.get("mode")?t+=1==this.props.chatwidget.get("isMobile")?" mobile-body":" desktop-body":"embed"==this.props.chatwidget.get("mode")&&(t+=1==this.props.chatwidget.get("isMobile")?" mobile-embed-body":" desktop-embed-body"),this.props.chatwidget.hasIn(["chat_ui","msg_expand"])&&"embed"==this.props.chatwidget.get("mode")&&(t+=" mh-100"),!0===this.props.chatwidget.get("isChatting")&&!1===this.props.chatwidget.get("isOfflineMode")?(t+=" online-chat online-chat-status-"+this.props.chatwidget.getIn(["chatLiveData","status"]),!1===this.props.chatwidget.getIn(["onlineData","fetched"])&&!1===this.props.chatwidget.get("initLoaded")&&(t+=" hide"),n.createElement(n.Fragment,null,this.props.chatwidget.hasIn(["chat_ui","custom_html_header"])&&(!0===this.props.chatwidget.getIn(["onlineData","fetched"])||!0===this.props.chatwidget.get("initLoaded"))&&n.createElement("div",{className:"lhc-custom-header-above",dangerouslySetInnerHTML:{__html:this.props.chatwidget.getIn(["chat_ui","custom_html_header"])}}),(!0===this.props.chatwidget.getIn(["onlineData","fetched"])||!0===this.props.chatwidget.get("initLoaded"))&&"widget"==this.props.chatwidget.get("mode")&&n.createElement(b,{switchColumn:this.switchColumn,popupChat:this.popupChat,endChat:this.endChat}),n.createElement("div",{className:t},n.createElement(ge,{textMessageRef:this.textareaRef,hideMessageField:this.hideMessageField,profileBefore:this.profileHTML,messagesBefore:this.messagesHTML,cancelClose:this.cancelClose,endChat:this.endChat})),this.props.chatwidget.hasIn(["chat_ui","custom_html_footer"])&&""!=this.props.chatwidget.getIn(["chat_ui","custom_html_footer"])&&(!0===this.props.chatwidget.getIn(["onlineData","fetched"])||!0===this.props.chatwidget.get("initLoaded"))&&(this.props.chatwidget.hasIn(["chat_ui","chfr"])&&n.createElement("div",{className:"lhc-custom-footer-below",dangerouslySetInnerHTML:{__html:this.props.chatwidget.getIn(["chat_ui","custom_html_footer"])}})||n.createElement(n.Suspense,{fallback:""},n.createElement("div",{className:"lhc-custom-footer-below"},n.createElement(ve,{setStateParent:function(t){return e.setState(t)},attr:"custom_html_footer"})))))):!0===this.props.chatwidget.get("isOnline")&&!1===this.props.chatwidget.get("isOfflineMode")?(this.props.chatwidget.getIn(["onlineData","fetched"])||!1!==this.props.chatwidget.get("chatEnded")||(t+=" hide"),t+=" start-chat",n.createElement(n.Fragment,null,this.props.chatwidget.hasIn(["chat_ui","custom_html_header"])&&(this.props.chatwidget.getIn(["onlineData","fetched"])||!0===this.props.chatwidget.get("chatEnded"))&&n.createElement("div",{className:"lhc-custom-header-above",dangerouslySetInnerHTML:{__html:this.props.chatwidget.getIn(["chat_ui","custom_html_header"])}}),(this.props.chatwidget.getIn(["onlineData","fetched"])||!0===this.props.chatwidget.get("chatEnded"))&&"widget"==this.props.chatwidget.get("mode")&&n.createElement(b,{switchColumn:this.switchColumn,popupChat:this.popupChat,endChat:this.endChat}),n.createElement("div",{className:t},n.createElement(E.A,{textMessageRef:this.textareaRef,botPayload:this.botPayload,setHideMessageField:this.setHideMessageField,setProfile:this.setProfile,setMessages:this.setMessages})),this.props.chatwidget.hasIn(["chat_ui","custom_html_footer"])&&this.props.chatwidget.getIn(["onlineData","fetched"])&&""!=this.props.chatwidget.getIn(["chat_ui","custom_html_footer"])&&(this.props.chatwidget.hasIn(["chat_ui","chfr"])&&n.createElement("div",{className:"lhc-custom-footer-below",dangerouslySetInnerHTML:{__html:this.props.chatwidget.getIn(["chat_ui","custom_html_footer"])}})||n.createElement(n.Suspense,{fallback:""},n.createElement("div",{className:"lhc-custom-footer-below"},n.createElement(ve,{setStateParent:function(t){return e.setState(t)},attr:"custom_html_footer"})))))):(t+=" offline-chat",n.createElement(n.Fragment,null,this.props.chatwidget.hasIn(["chat_ui","custom_html_header"])&&n.createElement("div",{className:"lhc-custom-header-above",dangerouslySetInnerHTML:{__html:this.props.chatwidget.getIn(["chat_ui","custom_html_header"])}}),"widget"==this.props.chatwidget.get("mode")&&n.createElement(b,{switchColumn:this.switchColumn,popupChat:this.popupChat,endChat:this.endChat}),n.createElement("div",{className:t},n.createElement(n.Suspense,{fallback:""},n.createElement(fe,null))),this.props.chatwidget.hasIn(["chat_ui","custom_html_footer"])&&""!=this.props.chatwidget.getIn(["chat_ui","custom_html_footer"])&&(this.props.chatwidget.hasIn(["chat_ui","chfr"])&&n.createElement("div",{className:"lhc-custom-footer-below",dangerouslySetInnerHTML:{__html:this.props.chatwidget.getIn(["chat_ui","custom_html_footer"])}})||n.createElement(n.Suspense,{fallback:""},n.createElement("div",{className:"lhc-custom-footer-below"},n.createElement(ve,{setStateParent:function(t){return e.setState(t)},attr:"custom_html_footer"}))))))}}])}(n.Component))||oe),ye=we,be=a(4196);function Ee(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ee=function(){return!!e})()}var Ie=function(e){function t(e){var a,n,r,c;return(0,i.A)(this,t),n=this,r=t,c=[e],r=(0,o.A)(r),a=(0,s.A)(n,Ee()?Reflect.construct(r,c||[],(0,o.A)(n).constructor):r.apply(n,c)),(0,l.A)(a,"state",{}),(0,l.A)(a,"playSound",(function(e){"new_message"==e.type?(!0===e.sound_on&&(!1===e.widget_open||!0===e.widget_open&&0==window.lhcChat.is_focused)&&a.playSoundFile("new_message"),0==e.widget_open&&h.q.sendMessageParent("unread_message",[{msop:e.msop||null,msg_body:e.msg_body||null,type:"unread_message",otm:e.otm||0}])):"new_invitation"==e.type&&!0===e.sound_on?null===h.q.getSessionStorage("_invs")&&(h.q.setSessionStorage("_invs",1),a.playSoundFile("new_invitation")):"new_chat"==e.type&&!0===e.sound_on&&a.playSoundFile("new_invitation"),0==window.lhcChat.is_focused&&h.q.sendMessageParent("unread_message_title",[{status:!1}])})),(0,l.A)(a,"playSoundFile",(function(e){new be.Howl({src:[window.lhcChat.base_url+"/widgetrestapi/loadsound/"+e+"_mp3",window.lhcChat.base_url+"/widgetrestapi/loadsound/"+e+"_ogg",window.lhcChat.base_url+"/widgetrestapi/loadsound/"+e+"_wav"],format:["mp3","ogg","wav"],autoplay:!0})})),h.q.eventEmitter.addListener("play_sound",(function(e){return a.playSound(e)})),a}return(0,c.A)(t,e),(0,r.A)(t,[{key:"render",value:function(){return null}}])}(n.PureComponent),Ae=(0,d.Ng)()(Ie);function Se(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Se=function(){return!!e})()}var De=function(e){function t(e){var a,n,r,c;return(0,i.A)(this,t),n=this,r=t,c=[e],r=(0,o.A)(r),(a=(0,s.A)(n,Se()?Reflect.construct(r,c||[],(0,o.A)(n).constructor):r.apply(n,c))).state={hasError:!1},a}return(0,c.A)(t,e),(0,r.A)(t,[{key:"componentDidCatch",value:function(e,t){this.setState({hasError:!0,error:e,info:t}),h.q.logJSError({stack:e.stack?JSON.stringify(e.stack):""})}},{key:"render",value:function(){return this.state.hasError?n.createElement("p",null,"Please re-load window because of an error."):this.props.children}}])}(n.Component);function xe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(xe=function(){return!!e})()}var Ce=function(e){function t(){return(0,i.A)(this,t),e=this,a=t,n=arguments,a=(0,o.A)(a),(0,s.A)(e,xe()?Reflect.construct(a,n||[],(0,o.A)(e).constructor):a.apply(e,n));var e,a,n}return(0,c.A)(t,e),(0,r.A)(t,[{key:"render",value:function(){return n.createElement(n.Fragment,null,n.createElement(De,null,n.createElement(Ae,null),n.createElement(ye,null)))}}])}(n.Component),Te=Ce;function ke(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function Oe(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(a),!0).forEach((function(t){(0,l.A)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):ke(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function Me(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Pe="function"==typeof Symbol&&Symbol.observable||"@@observable",Le=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ne={INIT:"@@redux/INIT"+Le(),REPLACE:"@@redux/REPLACE"+Le(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Le()}};function Re(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}var Be=a(9568),Fe=(0,Be.ss)({loadedCore:!1,shown:!0,isMobile:!1,isOnline:!1,isChatting:!1,isOfflineMode:!1,vars_encrypted:!1,newChat:!0,departmentDefault:null,theme:null,pvhash:null,phash:null,network_down:!1,leave_message:!0,mode:"widget",overrides:[],department:[],product:[],jsVars:[],jsVarsPrefill:[],offlineData:{fetched:!1},onlineData:{fetched:!1},customData:{fields:[]},api_data:null,attr_prefill:[],attr_prefill_admin:[],extension:{},chat_ui:{},chat_ui_state:{confirm_close:0,show_survey:0,pre_survey_done:0},processStatus:0,processStatusOffline:0,chatData:{},chatLiveData:{msg_to_store:[],lock_send:!1,lmsop:0,vtm:0,otm:0,msop:0,uid:0,error:"",lfmsgid:0,lmsgid:0,operator:"",messages:[],closed:!1,ott:"",status_sub:0,status:0},chatStatusData:{},usersettings:{soundOn:!1},vid:null,base_url:null,position_placement:"",position_placement_original:"",initClose:!1,initLoaded:!1,msgLoaded:!1,chatEnded:!1,proactive:{pending:!1,has:!1,data:{}},lang:"",bot_id:"",trigger_id:"",subject_id:"",operator:"",priority:null,ses_ref:null,captcha:{},validationErrors:{}}),Ue=function(e){for(var t=Object.keys(e),a={},n=0;n<t.length;n++){var i=t[n];"function"==typeof e[i]&&(a[i]=e[i])}var r,s=Object.keys(a);try{!function(e){Object.keys(e).forEach((function(t){var a=e[t];if(void 0===a(void 0,{type:Ne.INIT}))throw new Error(Me(12));if(void 0===a(void 0,{type:Ne.PROBE_UNKNOWN_ACTION()}))throw new Error(Me(13))}))}(a)}catch(e){r=e}return function(e,t){if(void 0===e&&(e={}),r)throw r;for(var n=!1,i={},o=0;o<s.length;o++){var c=s[o],l=a[c],d=e[c],u=l(d,t);if(void 0===u)throw t&&t.type,new Error(Me(14));i[c]=u,n=n||u!==d}return(n=n||s.length!==Object.keys(e).length)?i:e}}({chatwidget:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Fe,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"closedWidget":return!1===e.get("isChatting")&&(e=e.set("processStatus",0).set("isOfflineMode",!1)),e.set("shown",!1);case"loadedCore":return e.set("loadedCore",!0);case"attr_set":return e.setIn(t.attr,t.data);case"profile_pic":return e.set("profile_pic",-1!==t.data.indexOf("http:")||-1!==t.data.indexOf("https:")?t.data:window.lhcChat.base_url+"widgetrestapi/avatar/"+t.data);case"attr_rem":return e.removeIn(t.attr);case"vars_encrypted":case"processStatus":case"processStatusOffline":case"operator":case"leave_message":case"phash":case"pvhash":case"attr_prefill":case"attr_prefill_admin":case"isMobile":case"base_url":case"theme":case"jsVars":case"jsVarsPrefill":case"subject_id":case"bot_id":case"trigger_id":case"priority":case"position_placement":case"position_placement_original":case"lang":return e.set(t.type,t.data);case"widgetStatus":return 1==t.data&&!0===e.getIn(["proactive","pending"])&&(e=e.setIn(["proactive","pending"],!1)),1==t.data&&e.hasIn(["proactive","data","hide_on_open"])&&(e=e.set("proactive",(0,Be.ss)({pending:!1,has:!1,data:{}}))),e.set("shown",t.data);case"PROACTIVE":return e.set("proactive",{pending:!1===e.get("shown")&&!1===t.data.qinv,has:!0,data:t.data});case"HIDE_INVITATION":case"FULL_INVITATION":return e.setIn(["proactive","pending"],!1);case"CANCEL_INVITATION":return e.set("proactive",(0,Be.ss)({pending:!1,has:!1,data:{}}));case"toggleSound":return e.setIn(["usersettings","soundOn"],t.data);case"endedChat":return e.set("shown",!1).set("processStatus",0).set("processStatusOffline",0).set("isChatting",!1).set("newChat",!0).set("isOfflineMode",!1).set("proactive",(0,Be.ss)({pending:!1,has:!1,data:{}})).set("chatData",(0,Be.ss)({})).removeIn(["chat_ui","survey_id"]).removeIn(["chat_ui","cmmsg_widget"]).setIn(["onlineData","fetched"],!1).set("chatLiveData",(0,Be.ss)({msg_to_store:[],lock_send:!1,lmsop:0,vtm:0,otm:0,msop:0,uid:0,status:0,status_sub:0,uw:!1,ott:"",closed:!1,lfmsgid:0,lmsgid:0,operator:"",messages:[]})).set("chatStatusData",(0,Be.ss)({})).set("chat_ui_state",(0,Be.ss)({confirm_close:0,show_survey:0,pre_survey_done:0})).set("chatEnded",!0).set("initClose",!1).set("msgLoaded",!1).set("initLoaded",!1);case"chat_status_changed":return e.setIn(["chatLiveData","ott"],t.data.text);case"onlineStatus":return e.set("isOnline",t.data).setIn(["onlineData","fetched"],!1).setIn(["offlineData","fetched"],!1);case"OFFLINE_FIELDS_UPDATED":return e.set("offlineData",(0,Be.ss)({fetched:!0,disabled:t.data.disabled,fields_visible:t.data.fields_visible,fields:t.data.fields,department:t.data.department})).set("chat_ui",e.get("chat_ui").merge((0,Be.ss)(t.data.chat_ui)));case"department":case"mode":case"product":case"captcha":return e.set(t.type,(0,Be.ss)(t.data));case"INIT_PRODUCTS":return e.setIn(["onlineData","department","products"],(0,Be.ss)(t.data.products)).setIn(["onlineData","department","settings","product_required"],t.data.required);case"CHAT_SESSION_REFFERER":return e.set("ses_ref",t.data.ref);case"CHAT_ADD_OVERRIDE":return e.update("overrides",(function(e){return e.push(t.data)}));case"CHAT_REMOVE_OVERRIDE":return e.update("overrides",(function(e){return e.filter((function(e){return e!=t.data}))}));case"ONLINE_SUBMITTED":return!0===t.data.success?(h.q.sendMessageParent("chatStarted",[t.data.chatData,e.get("mode")]),"popup"==e.get("mode")&&(!0===h.q.hasSessionStorage?(h.q.setSessionStorage("_chat",JSON.stringify(t.data.chatData)),h.q.removeSessionStorage("_reset_chat")):document.location="#/"+t.data.chatData.id+"/"+t.data.chatData.hash),e.set("processStatus",2).set("isChatting",!0).set("shown",!0).set("chatData",(0,Be.ss)(t.data.chatData)).setIn(["chatLiveData","lfmsgid"],t.data.chatLiveData.message_id_first).set("validationErrors",(0,Be.ss)({}))):e.set("validationErrors",(0,Be.ss)(t.data.errors)).set("processStatus",0).setIn(["chat_ui","auto_start"],!1);case"OFFLINE_SUBMITTED":return!0===t.data.success?(h.q.sendMessageParent("offlineMessage",[]),e.set("processStatusOffline",2).set("validationErrors",(0,Be.ss)({}))):e.set("validationErrors",(0,Be.ss)(t.data.errors)).set("processStatusOffline",0);case"INIT_CLOSE":return e.set("initClose",!0);case"CHAT_ALREADY_STARTED":return e.set("processStatus",2).set("isChatting",!0).set("newChat",!1).set("chatData",(0,Be.ss)(t.data));case"OFFLINE_SUBMITTING":return e.set("processStatusOffline",1);case"CHAT_SET_VID":return e.set("vid",t.data);case"ONLINE_SUBMITTING":return e.set("processStatus",1);case"UI_STATE":return e.setIn(["chat_ui_state",t.data.attr],t.data.val);case"UPDATE_LIVE_DATA":return e.setIn(["chatLiveData",t.data.attr],t.data.val);case"ADD_MSG_TO_STORE":return e.updateIn(["chatLiveData","msg_to_store"],(function(e){return e.push(t.data)}));case"UPDATE_SCROLL_TO_MESSAGE":return t.data>e.getIn(["chatLiveData","lfmsgid"])?e.setIn(["chatLiveData","lfmsgid"],t.data):e;case"INIT_CHAT_SUBMITTED":return t.data.chat_ui_state&&(e=e.set("chat_ui_state",e.get("chat_ui_state").merge((0,Be.ss)(t.data.chat_ui_state)))),e.setIn(["chatLiveData","operator"],t.data.operator).set("chat_ui",e.get("chat_ui").merge((0,Be.ss)(t.data.chat_ui))).setIn(["chatLiveData","status_sub"],t.data.status_sub).setIn(["chatLiveData","status"],t.data.status).set("initLoaded",!0).setIn(["chatLiveData","closed"],t.data.closed&&!0===t.data.closed);case"REFRESH_UI_COMPLETED":return t.data.chat_ui_remove&&t.data.chat_ui_remove.forEach((function(t){e=e.removeIn(t)})),e.set("chat_ui",e.get("chat_ui").merge((0,Be.ss)(t.data.chat_ui)));case"REMOVE_CHAT_MESSAGE":var a=e.getIn(["chatLiveData","messages"]).findIndex((function(e){if(e.msg.includes('id="msg-'+t.data.msg_id+'"'))return!0}));return-1!==a&&((n=document.createElement("div")).innerHTML=e.getIn(["chatLiveData","messages",a,"msg"]),(i=n.querySelector("#msg-"+t.data.id))&&(n.innerHTML=n.innerHTML.replace(i.outerHTML,""),e=e.setIn(["chatLiveData","messages",a,"msg"],n.innerHTML))),e;case"FETCH_MESSAGE_SUBMITTED":var n,i,r=e.getIn(["chatLiveData","messages"]).findIndex((function(e){if(e.msg.includes('id="msg-'+t.data.id+'"'))return!0}));return-1!==r&&((n=document.createElement("div")).innerHTML=e.getIn(["chatLiveData","messages",r,"msg"]),(i=n.querySelector("#msg-"+t.data.id))&&(n.innerHTML=n.innerHTML.replace(i.outerHTML,t.data.msg),e=e.setIn(["chatLiveData","messages",r,"msg"],n.innerHTML))),e;case"FETCH_MESSAGES_SUBMITTED":if(!e.hasIn(["chatData","id"]))return e;if(t.data.closed_arg&&t.data.closed_arg.survey_id&&(e=e.setIn(["chat_ui","survey_id"],t.data.closed_arg.survey_id)),t.data.disable_survey&&(e=e.removeIn(["chat_ui","survey_id"])),t.data.extension&&(e=e.set("extension",e.get("extension").merge((0,Be.ss)(t.data.extension)))),""!==t.data.messages){if(t.data.f_msg_id<e.getIn(["chatLiveData","lmsgid"]))return e;e=e.updateIn(["chatLiveData","messages"],(function(a){return a.push({lmsop:e.getIn(["chatLiveData","msop"]),msop:t.data.msop,msg:t.data.messages})})).setIn(["chatLiveData","uw"],t.data.uw&&!0===t.data.uw).setIn(["chatLiveData","lmsgid"],t.data.message_id).setIn(["chatLiveData","lfmsgid"],t.data.message_id_first).setIn(["chatLiveData","msop"],t.data.lmsop||t.data.msop)}return t.data.vtm&&(e=e.updateIn(["chatLiveData","vtm"],(function(e){return e+t.data.vtm})).updateIn(["chatLiveData","msg_to_store"],(function(e){return e.splice(0,t.data.vtm)}))),t.data.otm&&(e=e.setIn(["chatLiveData","otm"],t.data.otm)),e.get("overrides").contains("typing")||(e=e.setIn(["chatLiveData","ott"],t.data.ott)),e.setIn(["chatLiveData","status_sub"],t.data.status_sub).setIn(["chatLiveData","status"],t.data.status).set("msgLoaded",!0).setIn(["chatLiveData","lock_send"],!!t.data.lock_send).set("network_down",!1).setIn(["chatLiveData","closed"],t.data.closed&&!0===t.data.closed);case"CHECK_CHAT_STATUS_FINISHED":return t.data.extension&&(e=e.set("extension",e.get("extension").merge((0,Be.ss)(t.data.extension)))),t.data.offline_mode&&(e=e.set("isOfflineMode",!0)),e.set("chatStatusData",(0,Be.ss)(t.data)).setIn(["chatLiveData","closed"],t.data.closed&&!0===t.data.closed||e.getIn(["chatLiveData","closed"])).setIn(["chatLiveData","status"],t.data.status).setIn(["chatLiveData","uid"],t.data.uid).setIn(["chatLiveData","ru"],t.data.ru?t.data.ru:null).set("chat_ui",e.get("chat_ui").merge((0,Be.ss)(t.data.chat_ui))).set("network_down",!1).setIn(["chatLiveData","status_sub"],t.data.status_sub);case"ONLINE_FIELDS_UPDATED":return e.set("onlineData",(0,Be.ss)({dep_forms:t.data.dep_forms,disabled:t.data.disabled,fetched:!0,paid:t.data.paid,fields_visible:t.data.fields_visible,fields:t.data.fields,department:t.data.department})).set("chat_ui",e.get("chat_ui").merge((0,Be.ss)(t.data.chat_ui)));case"CHAT_UI_UPDATE":return e.set("chat_ui",e.get("chat_ui").merge((0,Be.ss)(t.data)));case"CUSTOM_FIELDS":return e.set("customData",(0,Be.ss)({fields:t.data}));case"dep_default":return e.set("departmentDefault",t.data);case"survey":return e.setIn(["chat_ui","survey_id"],t.data);case"CUSTOM_FIELDS_ITEM":return e.setIn(["customData","fields",t.data.id,"value"],t.data.value);case"ADD_MESSAGES_SUBMITTED":return e.setIn(["chatLiveData","error"],t.data.r).setIn(["chatLiveData","lmsg"],t.data.r?t.data.msg:"").setIn(["chatLiveData","msg_to_store"],(0,Be.ss)([]));case"NO_CONNECTION":return e.set("network_down",t.data);default:return e}}}),je=a(1265),He=a(4784),qe=a(9677),We=function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return function(e){return function(){var a=e.apply(void 0,arguments),n=function(){throw new Error(Me(15))},i={getState:a.getState,dispatch:function(){return n.apply(void 0,arguments)}},r=t.map((function(e){return e(i)}));return n=Re.apply(void 0,r)(a.dispatch),Oe(Oe({},a),{},{dispatch:n})}}}(He.Ay,je.A),Ke=function e(t,a,n){var i;if("function"==typeof a&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Me(0));if("function"==typeof a&&void 0===n&&(n=a,a=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Me(1));return n(e)(t,a)}if("function"!=typeof t)throw new Error(Me(2));var r=t,s=a,o=[],c=o,l=!1;function d(){c===o&&(c=o.slice())}function u(){if(l)throw new Error(Me(3));return s}function h(e){if("function"!=typeof e)throw new Error(Me(4));if(l)throw new Error(Me(5));var t=!0;return d(),c.push(e),function(){if(t){if(l)throw new Error(Me(6));t=!1,d();var a=c.indexOf(e);c.splice(a,1),o=null}}}function p(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(Me(7));if(void 0===e.type)throw new Error(Me(8));if(l)throw new Error(Me(9));try{l=!0,s=r(s,e)}finally{l=!1}for(var t=o=c,a=0;a<t.length;a++)(0,t[a])();return e}return p({type:Ne.INIT}),(i={dispatch:p,subscribe:h,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(Me(10));r=e,p({type:Ne.REPLACE})}})[Pe]=function(){var e,t=h;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(Me(11));function a(){e.next&&e.next(u())}return a(),{unsubscribe:t(a)}}})[Pe]=function(){return this},e},i}(Ue,We);!function(e,t){var n={},i=[],r=[],s=!1;function o(e,t,a){if(null===document.getElementById("ext-"+e)){var n=document.getElementsByTagName("head")[0],s=document.createElement("script");s.setAttribute("type","text/javascript"),s.setAttribute("src",t),s.setAttribute("id","ext-"+e),n.appendChild(s),s.onreadystatechange=s.onload=function(){i.push(e+".init"),h.q.emitEvent(e+".init",a),"undefined"!==r[e+".init"]&&Array.isArray(r[e+".init"])&&(r[e+".init"].forEach((function(t){h.q.emitEvent(e+".init",t)})),delete r[e+".init"])}}else-1!==i.indexOf(e+".init")?h.q.emitEvent(e+".init",a):(void 0===r[e+".init"]&&(r[e+".init"]=[]),r[e+".init"].push(a))}function c(i,r){if(Array.isArray(r)&&(r.push(e),r.push(t),r.push(u.nc)),void 0!==n[i])o(i,n[i],r);else if("modal_ext"==i){var s=new Date;o(i,a.p.replace("/widgetv2/","")+"/modal.ext.min.js?"+s.getFullYear()+s.getMonth()+s.getDate(),r)}else{var c="/(ext)/"+i,l=t();l.chatwidget.hasIn(["chatData","id"])&&(c+="/(id)/"+l.chatwidget.getIn(["chatData","id"]),c+="/(hash)/"+l.chatwidget.getIn(["chatData","hash"]));var d=l.chatwidget.get("department").join("/");""!=d&&(c+="/(dep)/"+d),s=new Date,o(i,window.lhcChat.base_url+"widgetrestapi/executejs"+c+"?"+s.getFullYear()+s.getMonth()+s.getDate(),r)}}function l(n){if("string"==typeof n.data){var i=n.data.split(":")[0];if(void 0!==n.origin){var r=n.origin.replace("http://","").replace("https://","").replace(/:(\d+)$/,"");if(r!==document.domain&&void 0!==window.lhcChat&&(void 0===window.lhcChat.domain_lhc||window.lhcChat.domain_lhc!==r)&&"lhc_chat_closed_explicit"!=i&&"lhc_survey_completed"!=i&&"lhc_end_cookies"!=i&&("lhc_event"!=i||"lhc_event"==i&&!window.initializeLHC))return}if("lhc_chat_closed_explicit"==i){var o=t();o.chatwidget.hasIn(["chatData","hash"])&&o.chatwidget.hasIn(["chatData","id"])?e((0,u._0)({vid:o.chatwidget.get("vid"),chat:{id:o.chatwidget.getIn(["chatData","id"]),hash:o.chatwidget.getIn(["chatData","hash"])}})):"popup"==o.chatwidget.get("mode")?(h.q.sendMessageParent("endChat",[{sender:"endButton"}]),window.close()):h.q.sendMessageParent("closeWidget",[{sender:"closeButton"}])}else if("lhc_end_cookies"==i)t(),h.q.emitEvent("endCookies",[]);else if("lhc_survey_completed"==i){var l=t();e((0,u._0)({vid:l.chatwidget.get("vid"),chat:{id:l.chatwidget.getIn(["chatData","id"]),hash:l.chatwidget.getIn(["chatData","hash"])}},"survey"))}else if("lhc_load_ext"==i){var d=n.data.replace("lhc_load_ext:","").split("::");c(d[0],JSON.parse(d[1]))}else if("lhc_update_msg"==i){var p=n.data.replace("lhc_update_msg:","").split("::"),g=t();if("iframe_close"==p[1]||"iframe_inline_close"==p[1]){var _=document.getElementById("msg-"+p[0]);_&&_.parentNode.removeChild(_),e({type:"REMOVE_CHAT_MESSAGE",data:{msg_id:p[0]}})}(0,u.X)({id:g.chatwidget.getIn(["chatData","id"]),hash:g.chatwidget.getIn(["chatData","hash"]),msg_id:p[0]},{action:p[1]}).then((function(){"iframe_close"!=p[1]&&"iframe_inline_close"!=p[1]&&e((0,u.nc)({msg_id:p[0],lmgsid:g.chatwidget.getIn(["chatLiveData","lmsgid"]),mode:g.chatwidget.get("mode"),theme:g.chatwidget.get("theme"),id:g.chatwidget.getIn(["chatData","id"]),hash:g.chatwidget.getIn(["chatData","hash"]),no_scroll:!0}))}))}else if("lhc_trigger_click"==i){var f=n.data.replace("lhc_trigger_click:","").split("::");e((0,u.ZG)({type:"/(type)/manualtrigger"},{payload:f[0]})).then((function(a){if(a.data.t){h.q.sendMessageParent("botTrigger",[{trigger:a.data.t}]);var n=t();n.chatwidget.hasIn(["chatData","id"])&&e((0,u.lj)({chat_id:n.chatwidget.getIn(["chatData","id"]),hash:n.chatwidget.getIn(["chatData","hash"]),lmgsid:n.chatwidget.getIn(["chatLiveData","lmsgid"]),theme:n.chatwidget.get("theme")}))}}))}else if("lhc_event"==i){var m=n.data.replace("lhc_event:","").split("::"),v=JSON.parse(m[1]);Array.isArray(v)&&(v.push(e),v.push(t)),h.q.emitEvent(m[0],v)}else if("lhc_sizing_chat"==i)h.q.sendMessageParent("widgetHeight",[{height:parseInt(n.data.split(":")[1])+50}]);else if("lhc_init"==i){if(!0===s)return;s=!0;var w=JSON.parse(n.data.replace("lhc_init:",""));window.lhcChat={},window.lhcChat.base_url=w.base_url+(w.lang&&""!=w.lang?w.lang.replace("/","")+"/":""),window.lhcChat.base_url_direct=w.base_url,window.lhcChat.staticJS=w.staticJS,window.lhcChat.mode=w.mode,window.lhcChat.is_focused=!0,window.lhcChat.domain_lhc=w.domain_lhc||null,window.lhcChat.theme=w.theme||null,window.lhcChat.theme_v=w.theme_v||null,a.p=window.lhcChat.staticJS.chunk_js+"/";var y=new Date;qe.A.init({backend:{loadPath:w.base_url+"{{lng}}/widgetrestapi/lang/{{ns}}?v=11"+y.getFullYear()+y.getMonth()+y.getDate()},lng:w.lang&&""!=w.lang?w.lang.replace("/",""):"eng",fallbackLng:"eng",debug:!1,interpolation:{escapeValue:!1}},(function(){e({type:"loadedCore"})})),w.base_url=window.lhcChat.base_url,Object.keys(w).forEach((function(a){var n=w[a];"static_chat"===a?(n.id&&n.hash&&e({type:"CHAT_ALREADY_STARTED",data:{id:n.id,hash:n.hash}}),n.vid&&e({type:"CHAT_SET_VID",data:n.vid})):"ses_ref"===a?e({type:"CHAT_SESSION_REFFERER",data:{ref:n}}):"proactive"===a?setTimeout((function(){e((0,u.Yt)(n))}),!0===s?0:700):"lhc_event"===a?Object.keys(n).forEach((function(a){var i=n[a];Array.isArray(i)&&(i.push(e),i.push(t)),h.q.emitEvent(a,[i])})):e({type:a,data:n})}));var b=function(e){var t="focus"===e.type;1==t&&h.q.sendMessageParent("unread_message_title",[{status:!0}]),window.lhcChat.is_focused=t};if(window.addEventListener("focus",b),window.addEventListener("blur",b),window.addEventListener("pageshow",b),window.addEventListener("pagehide",b),"popup"==w.mode){h.q.sendMessageParent("endChatCookies"),h.q.getSessionStorage("_reset_chat")&&(window.location.hash="/#",h.q.emitEvent("endedChat"));var E=h.q.getSessionStorage("_chat");null===E||w.static_chat.id?w.static_chat.id&&h.q.setSessionStorage("_chat",JSON.stringify(w.static_chat)):e({type:"CHAT_ALREADY_STARTED",data:JSON.parse(E)})}}else if("lhc_continue_chat"==i){var I=t();e((0,u.tz)({id:I.chatwidget.getIn(["chatData","id"]),hash:I.chatwidget.getIn(["chatData","hash"]),theme:I.chatwidget.get("theme")})),e({type:"attr_rem",attr:["chat_ui","survey_id"]})}}}[{id:"closedWidget",cb:function(a){a&&a.mode&&"control"===a.mode&&1==t().chatwidget.getIn(["proactive","has"])&&e((0,u.Ox)()),e({type:"closedWidget",data:a})}},{id:"endedChat",cb:function(t){e({type:"endedChat",data:t}),"popup"==window.lhcChat.mode&&window.close(),t.survey&&e({type:"attr_set",attr:["chat_ui","survey_id"],data:t.survey})}},{id:"endCookies",cb:function(e){h.q.sendMessageParent("endChatCookies",[{force:!0}]),"popup"==window.lhcChat.mode&&(h.q.removeSessionStorage("_chat"),h.q.setSessionStorage("_reset_chat",1))}},{id:"reopenNotification",cb:function(t){e({type:"CHAT_ALREADY_STARTED",data:{id:t.id,hash:t.hash}})}},{id:"subcribedEvent",cb:function(t){e((0,u.cT)(t.payload))}},{id:"dispatch_direct",cb:function(t){e({type:t.type,data:t.data})}},{id:"attr_set",cb:function(t){e({type:"attr_set",attr:t.attr,data:t.data})}},{id:"attr_rem",cb:function(t){e({type:"attr_rem",attr:t.attr})}},{id:"dispatch_event",cb:function(a){var n=t(),i={};a.attr&&Object.keys(a.attr).forEach((function(e){i[e]=n.chatwidget.getIn(a.attr[e])})),a.attr_params&&Object.keys(a.attr_params).forEach((function(e){i[e]=a.attr_params[e]}));var r={fetchMessages:u.lj,addMessage:u.tj};e(r[a.func](i))}},{id:"onlineStatus",cb:function(t){e({type:"onlineStatus",data:t})}},{id:"toggleSound",cb:function(t){e({type:"toggleSound",data:t})}},{id:"widgetStatus",cb:function(t){e({type:"widgetStatus",data:t})}},{id:"vars_encrypted",cb:function(t){e({type:"vars_encrypted",data:t})}},{id:"jsVars",cb:function(t,a){e({type:"jsVars",data:t}),void 0!==a&&e({type:"jsVarsPrefill",data:a})}},{id:"ext_modules",cb:function(e){n=e}},{id:"extensionExecute",cb:function(e,t){c(e,t)}},{id:"chat_check_messages",cb:function(){var a=t();a.chatwidget.hasIn(["chatData","id"])&&e((0,u.lj)({chat_id:a.chatwidget.getIn(["chatData","id"]),hash:a.chatwidget.getIn(["chatData","hash"]),lmgsid:a.chatwidget.getIn(["chatLiveData","lmsgid"]),theme:a.chatwidget.get("theme")}))}},{id:"chat_check_status",cb:function(){var a=t();a.chatwidget.hasIn(["chatData","id"])&&e((0,u.d1)({chat_id:a.chatwidget.getIn(["chatData","id"]),hash:a.chatwidget.getIn(["chatData","hash"]),mode:a.chatwidget.get("mode"),theme:a.chatwidget.get("theme")}))}},{id:"proactive",cb:function(t){setTimeout((function(){e((0,u.Yt)(t))}),!0===s?0:700)}},{id:"focus_changed",cb:function(e){var t=e.status||document.hasFocus();t!=window.lhcChat.is_focused&&(window.lhcChat.is_focused=t,1==t&&h.q.sendMessageParent("unread_message_title",[{status:!0}]))}},{id:"change_language",cb:function(e){window.lhcChat.base_url=window.lhcChat.base_url_direct+(""!=e?e.replace("/","")+"/":""),""!=e&&qe.A.changeLanguage(e),h.q.sendMessageParent("change_language",[{lng:e}])}}].forEach((function(e){h.q.eventEmitter.addListener(e.id,e.cb)})),window.addEventListener?(window.addEventListener("message",l,!1),window.addEventListener("beforeunload",(function(){e((0,u.HF)())}),!1)):window.attachEvent?(window.attachEvent("onmessage",l),window.attachEvent("beforeunload",(function(){e((0,u.HF)())}))):document.attachEvent&&(document.attachEvent("onmessage",l),document.attachEvent("beforeunload",(function(){e((0,u.HF)())}))),window.addEventListener("offline",(function(){return e({type:"NO_CONNECTION",data:!0})})),window.opener||window.initializeLHC?window.initializeLHC&&(l({data:window.initializeLHC}),h.q.sendMessageParent("ready_popup",!!window.opener)):h.q.sendMessageParent("ready",!!window.opener)}(Ke.dispatch,Ke.getState);var ze=Ke,Ve=a(5338),Ge=document.getElementById("root"),Je=(0,Ve.H)(Ge);Je.render(n.createElement(d.Kq,{store:ze},n.createElement(Te,Je.dataset)))},8068:function(e,t,a){"use strict";a.d(t,{HZ:function(){return n},Km:function(){return o},X8:function(){return i},Z9:function(){return c},ag:function(){return s},oF:function(){return r}});var n=1,i=2,r=5,s=2,o=3,c=5},8168:function(e,t,a){"use strict";function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},n.apply(null,arguments)}a.d(t,{A:function(){return n}})},8587:function(e,t,a){"use strict";function n(e,t){if(null==e)return{};var a={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;a[n]=e[n]}return a}a.d(t,{A:function(){return n}})},8917:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var a=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,i=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(e,t){return t.toUpperCase()},c=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||i.test(e)||a.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(s,c):e.replace(r,c)).replace(n,o))}},9417:function(e,t,a){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}a.d(t,{A:function(){return n}})},9677:function(e,t,a){"use strict";var n=a(2526),i=a(5414),r=a(1347);n.A.use(r.A).use(i.r9),t.A=n.A},9788:function(e){var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,a=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,r=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,c=/^\s+|\s+$/g,l="";function d(e){return e?e.replace(c,l):l}e.exports=function(e,c){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];c=c||{};var u=1,h=1;function p(e){var t=e.match(a);t&&(u+=t.length);var n=e.lastIndexOf("\n");h=~n?e.length-n:h+e.length}function g(){var e={line:u,column:h};return function(t){return t.position=new _(e),w(),t}}function _(e){this.start=e,this.end={line:u,column:h},this.source=c.source}_.prototype.content=e;var f=[];function m(t){var a=new Error(c.source+":"+u+":"+h+": "+t);if(a.reason=t,a.filename=c.source,a.line=u,a.column=h,a.source=e,!c.silent)throw a;f.push(a)}function v(t){var a=t.exec(e);if(a){var n=a[0];return p(n),e=e.slice(n.length),a}}function w(){v(n)}function y(e){var t;for(e=e||[];t=b();)!1!==t&&e.push(t);return e}function b(){var t=g();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var a=2;l!=e.charAt(a)&&("*"!=e.charAt(a)||"/"!=e.charAt(a+1));)++a;if(a+=2,l===e.charAt(a-1))return m("End of comment missing");var n=e.slice(2,a-2);return h+=2,p(n),e=e.slice(a),h+=2,t({type:"comment",comment:n})}}function E(){var e=g(),a=v(i);if(a){if(b(),!v(r))return m("property missing ':'");var n=v(s),c=e({type:"declaration",property:d(a[0].replace(t,l)),value:n?d(n[0].replace(t,l)):l});return v(o),c}}return w(),function(){var e,t=[];for(y(t);e=E();)!1!==e&&(t.push(e),y(t));return t}()}},9982:function(e,t,a){"use strict";e.exports=a(7463)}},__webpack_module_cache__={},deferred,leafPrototypes,getProto,inProgress,dataWebpackPrefix;function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var a=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(a.exports,a,a.exports,__webpack_require__),a.exports}__webpack_require__.m=__webpack_modules__,deferred=[],__webpack_require__.O=function(e,t,a,n){if(!t){var i=1/0;for(c=0;c<deferred.length;c++){t=deferred[c][0],a=deferred[c][1],n=deferred[c][2];for(var r=!0,s=0;s<t.length;s++)(!1&n||i>=n)&&Object.keys(__webpack_require__.O).every((function(e){return __webpack_require__.O[e](t[s])}))?t.splice(s--,1):(r=!1,n<i&&(i=n));if(r){deferred.splice(c--,1);var o=a();void 0!==o&&(e=o)}}return e}n=n||0;for(var c=deferred.length;c>0&&deferred[c-1][2]>n;c--)deferred[c]=deferred[c-1];deferred[c]=[t,a,n]},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},getProto=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},__webpack_require__.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var a=Object.create(null);__webpack_require__.r(a);var n={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var i=2&t&&e;"object"==typeof i&&!~leafPrototypes.indexOf(i);i=getProto(i))Object.getOwnPropertyNames(i).forEach((function(t){n[t]=function(){return e[t]}}));return n.default=function(){return e},__webpack_require__.d(a,n),a},__webpack_require__.d=function(e,t){for(var a in t)__webpack_require__.o(t,a)&&!__webpack_require__.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},__webpack_require__.f={},__webpack_require__.e=function(e){return Promise.all(Object.keys(__webpack_require__.f).reduce((function(t,a){return __webpack_require__.f[a](e,t),t}),[]))},__webpack_require__.u=function(e){return e+"."+{14:"29311e7cb90a78401a2e",277:"f33d909ada22a49ceaa8",396:"da7a8f4bd7f9edbaeadc",436:"4b6f73a354508f8c15da",472:"045d7029d0be887844e5",507:"222ede2356ebeb58bb8e",595:"833a645b16b67091a9d1",806:"12706780f867038187f2",835:"17d2b69b4aa52ddd9245",923:"a558b1aca01ce5dbd82b",941:"4a7e68cf912c762c1ece"}[e]+".js"},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},inProgress={},dataWebpackPrefix="LHCReactAPP:",__webpack_require__.l=function(e,t,a,n){if(inProgress[e])inProgress[e].push(t);else{var i,r;if(void 0!==a)for(var s=document.getElementsByTagName("script"),o=0;o<s.length;o++){var c=s[o];if(c.getAttribute("src")==e||c.getAttribute("data-webpack")==dataWebpackPrefix+a){i=c;break}}i||(r=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,__webpack_require__.nc&&i.setAttribute("nonce",__webpack_require__.nc),i.setAttribute("data-webpack",dataWebpackPrefix+a),i.src=e,0!==i.src.indexOf(window.location.origin+"/")&&(i.crossOrigin="anonymous")),inProgress[e]=[t];var l=function(t,a){i.onerror=i.onload=null,clearTimeout(d);var n=inProgress[e];if(delete inProgress[e],i.parentNode&&i.parentNode.removeChild(i),n&&n.forEach((function(e){return e(a)})),t)return t(a)},d=setTimeout(l.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=l.bind(null,i.onerror),i.onload=l.bind(null,i.onload),r&&document.head.appendChild(i)}},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.p="./",function(){var e={792:0};__webpack_require__.f.j=function(t,a){var n=__webpack_require__.o(e,t)?e[t]:void 0;if(0!==n)if(n)a.push(n[2]);else{var i=new Promise((function(a,i){n=e[t]=[a,i]}));a.push(n[2]=i);var r=__webpack_require__.p+__webpack_require__.u(t),s=new Error;__webpack_require__.l(r,(function(a){if(__webpack_require__.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var i=a&&("load"===a.type?"missing":a.type),r=a&&a.target&&a.target.src;s.message="Loading chunk "+t+" failed.\n("+i+": "+r+")",s.name="ChunkLoadError",s.type=i,s.request=r,n[1](s)}}),"chunk-"+t,t)}},__webpack_require__.O.j=function(t){return 0===e[t]};var t=function(t,a){var n,i,r=a[0],s=a[1],o=a[2],c=0;if(r.some((function(t){return 0!==e[t]}))){for(n in s)__webpack_require__.o(s,n)&&(__webpack_require__.m[n]=s[n]);if(o)var l=o(__webpack_require__)}for(t&&t(a);c<r.length;c++)i=r[c],__webpack_require__.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return __webpack_require__.O(l)},a=self.webpackChunkLHCReactAPP=self.webpackChunkLHCReactAPP||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))}();var __webpack_exports__=__webpack_require__.O(void 0,[121],(function(){return __webpack_require__(8016)}));return __webpack_exports__=__webpack_require__.O(__webpack_exports__),__webpack_exports__=__webpack_exports__.default,__webpack_exports__}()})); //# sourceMappingURL=react.app.js.map
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | ���֧ߧ֧�ѧ�ڧ� ����ѧߧڧ��: 0.01 |
proxy
|
phpinfo
|
���ѧ����ۧܧ�